import BaseLayout from './baseLayout' const Drawer = (($) => { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME = 'drawer' const DATA_KEY = `bmd.${NAME}` const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}` const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME] const Keycodes = { ESCAPE: 27 //ENTER: 13, //SPACE: 32 } const ClassName = { IN: 'in', DRAWER_IN: `bmd-drawer-in`, DRAWER_OUT: `bmd-drawer-out`, DRAWER: 'bmd-layout-drawer', CONTAINER: 'bmd-layout-container' } const Default = { focusSelector: `a, button, input` } /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Drawer extends BaseLayout { // $element is expected to be the trigger // i.e.