@frontile/overlays 0.17.0-beta.10 → 0.17.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,8 +51,8 @@ export interface DrawerSignature {
|
|
|
51
51
|
Blocks: {
|
|
52
52
|
default: [
|
|
53
53
|
{
|
|
54
|
-
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'
|
|
55
|
-
Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'
|
|
54
|
+
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick' | 'class'>;
|
|
55
|
+
Header: WithBoundArgs<typeof DrawerHeader, 'labelledById' | 'classFromParent'>;
|
|
56
56
|
Body: WithBoundArgs<typeof DrawerBody, 'classFromParent'>;
|
|
57
57
|
Footer: WithBoundArgs<typeof DrawerFooter, 'classFromParent'>;
|
|
58
58
|
headerId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,gBAAgB,CAAC,MAAM,CAAC,EACtB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,eAAe,GACf,QAAQ,GACR,oBAAoB,GACpB,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AAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC5D,QAAQ,SAA6B;IAErC,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,IAAI,eAAe,IAAI,OAAO,CAI7B;IAED,IAAI,SAAS,wCAEZ;IAED,IAAI,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAOV;IACD,IAAI,UAAU;;;;;;;;;;;;MAUb;CAoCF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sources":["../../src/components/drawer.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport Overlay, { type OverlaySignature } from './overlay';\nimport DrawerBody from './drawer/body';\nimport DrawerFooter from './drawer/footer';\nimport DrawerHeader from './drawer/header';\nimport { CloseButton } from '@frontile/buttons';\nimport type { WithBoundArgs } from '@glint/template';\nimport {\n useStyles,\n type SlotsToClasses,\n type DrawerSlots,\n type DrawerVariants\n} from '@frontile/theme';\n\nexport interface DrawerArgs\n extends Pick<\n OverlaySignature['Args'],\n | 'isOpen'\n | 'onOpen'\n | 'onClose'\n | 'didClose'\n | 'renderInPlace'\n | 'target'\n | 'transitionDuration'\n | 'backdrop'\n | 'disableTransitions'\n | 'disableFocusTrap'\n | 'focusTrapOptions'\n | 'closeOnOutsideClick'\n | 'closeOnEscapeKey'\n | 'backdropTransition'\n > {\n /**\n * The transition to be used in the Drawer.\n *\n * @defaultValue {name: 'overlay-transition--slide-from-[placement]'}\n */\n transition?: OverlaySignature['Args']['transition'];\n\n /**\n * If set to false, the close button will not be displayed,\n * closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set\n * to false.\n *\n * @defaultValue true\n */\n allowClosing?: boolean;\n\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */\n allowCloseButton?: boolean;\n\n /**\n * The Close Button size.\n */\n closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n /**\n * The Drawer can appear from any side of the screen. The 'placement'\n * option allows to choose where it appears from.\n *\n * @defaultValue 'right'\n */\n placement?: DrawerVariants['placement'];\n\n /**\n * The Drawer size.\n *\n * @defaultValue 'md'\n */\n size?: DrawerVariants['size'];\n\n classes?: SlotsToClasses<DrawerSlots>;\n}\n\nexport interface DrawerSignature {\n Args: DrawerArgs;\n Blocks: {\n default: [\n {\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../src/components/drawer.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport Overlay, { type OverlaySignature } from './overlay';\nimport DrawerBody from './drawer/body';\nimport DrawerFooter from './drawer/footer';\nimport DrawerHeader from './drawer/header';\nimport { CloseButton } from '@frontile/buttons';\nimport type { WithBoundArgs } from '@glint/template';\nimport {\n useStyles,\n type SlotsToClasses,\n type DrawerSlots,\n type DrawerVariants\n} from '@frontile/theme';\n\nexport interface DrawerArgs\n extends Pick<\n OverlaySignature['Args'],\n | 'isOpen'\n | 'onOpen'\n | 'onClose'\n | 'didClose'\n | 'renderInPlace'\n | 'target'\n | 'transitionDuration'\n | 'backdrop'\n | 'disableTransitions'\n | 'disableFocusTrap'\n | 'focusTrapOptions'\n | 'closeOnOutsideClick'\n | 'closeOnEscapeKey'\n | 'backdropTransition'\n > {\n /**\n * The transition to be used in the Drawer.\n *\n * @defaultValue {name: 'overlay-transition--slide-from-[placement]'}\n */\n transition?: OverlaySignature['Args']['transition'];\n\n /**\n * If set to false, the close button will not be displayed,\n * closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set\n * to false.\n *\n * @defaultValue true\n */\n allowClosing?: boolean;\n\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */\n allowCloseButton?: boolean;\n\n /**\n * The Close Button size.\n */\n closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n /**\n * The Drawer can appear from any side of the screen. The 'placement'\n * option allows to choose where it appears from.\n *\n * @defaultValue 'right'\n */\n placement?: DrawerVariants['placement'];\n\n /**\n * The Drawer size.\n *\n * @defaultValue 'md'\n */\n size?: DrawerVariants['size'];\n\n classes?: SlotsToClasses<DrawerSlots>;\n}\n\nexport interface DrawerSignature {\n Args: DrawerArgs;\n Blocks: {\n default: [\n {\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick' | 'class'>;\n Header: WithBoundArgs<\n typeof DrawerHeader,\n 'labelledById' | 'classFromParent'\n >;\n Body: WithBoundArgs<typeof DrawerBody, 'classFromParent'>;\n Footer: WithBoundArgs<typeof DrawerFooter, 'classFromParent'>;\n headerId: string;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class Drawer extends Component<DrawerSignature> {\n headerId = `${guidFor(this)}-header`;\n\n get preventClosing(): boolean {\n return this.args.allowClosing === false;\n }\n\n get showCloseButton(): boolean {\n return (\n this.args.allowClosing !== false && this.args.allowCloseButton !== false\n );\n }\n\n get placement() {\n return this.args.placement || 'right';\n }\n\n get classes() {\n const { drawer } = useStyles();\n\n return drawer({\n placement: this.placement,\n size: this.args.size || 'md'\n });\n }\n get transition() {\n let options: OverlaySignature['Args']['transition'] = {\n name: `overlay-transition--slide-from-${this.placement}`\n };\n\n if (typeof this.args.transition === 'object') {\n return { ...options, ...this.args.transition };\n }\n\n return options;\n }\n\n <template>\n <Overlay\n @isOpen={{@isOpen}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @didClose={{@didClose}}\n @renderInPlace={{@renderInPlace}}\n @target={{@target}}\n @transitionDuration={{@transitionDuration}}\n @backdrop={{@backdrop}}\n @disableTransitions={{@disableTransitions}}\n @disableFocusTrap={{@disableFocusTrap}}\n @focusTrapOptions={{@focusTrapOptions}}\n @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}}\n @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}}\n @backdropTransition={{@backdropTransition}}\n @transition={{this.transition}}\n @closeOnOverlayElementClick={{true}}\n >\n <div\n class={{this.classes.base class=@classes.base}}\n tabindex=\"0\"\n role=\"dialog\"\n aria-labelledby={{this.headerId}}\n ...attributes\n >\n {{#if this.showCloseButton}}\n <CloseButton\n @onClick={{@onClose}}\n @size={{@closeButtonSize}}\n @class={{this.classes.closeButton class=@classes.closeButton}}\n />\n {{/if}}\n\n {{yield\n (hash\n CloseButton=(component\n CloseButton\n onClick=@onClose\n class=(this.classes.closeButton class=@classes.closeButton)\n )\n Header=(component\n DrawerHeader\n labelledById=this.headerId\n classFromParent=(this.classes.header class=@classes.header)\n )\n Body=(component\n DrawerBody\n placement=this.placement\n classFromParent=(this.classes.body class=@classes.body)\n )\n Footer=(component\n DrawerFooter\n placement=this.placement\n classFromParent=(this.classes.footer class=@classes.footer)\n )\n headerId=this.headerId\n )\n }}\n </div>\n </Overlay>\n </template>\n}\n"],"names":["Drawer","Component","headerId","guidFor","preventClosing","args","allowClosing","showCloseButton","allowCloseButton","placement","classes","drawer","useStyles","size","transition","options","name","setComponentTemplate","precompileTemplate","strictMode","scope","Overlay","CloseButton","hash","DrawerHeader","DrawerBody","DrawerFooter"],"mappings":";;;;;;;;;;;;AAmGe,MAAMA,eAAeC,SAAU,CAAA;AAC5CC,EAAAA,QAAA,GAAW,CAAGC,EAAAA,OAAA,CAAQ,IAAI,CAAE,CAAQ,OAAA,CAAA;EAEpC,IAAIC,cAAAA,GAA0B;AAC5B,IAAA,OAAO,IAAI,CAACC,IAAI,CAACC,YAAY,KAAK,KAAA;AACpC;EAEA,IAAIC,eAAAA,GAA2B;AAC7B,IAAA,OACE,IAAI,CAACF,IAAI,CAACC,YAAY,KAAK,KAAS,IAAA,IAAI,CAACD,IAAI,CAACG,gBAAgB,KAAK,KACrE;AACF;EAEA,IAAIC,SAAYA,GAAA;AACd,IAAA,OAAO,IAAI,CAACJ,IAAI,CAACI,SAAS,IAAI,OAAA;AAChC;EAEA,IAAIC,OAAUA,GAAA;IACZ,MAAM;AAAEC,MAAAA;KAAQ,GAAGC,SAAA,EAAA;AAEnB,IAAA,OAAOD,MAAO,CAAA;MACZF,SAAW,EAAA,IAAI,CAACA,SAAS;AACzBI,MAAAA,IAAA,EAAM,IAAI,CAACR,IAAI,CAACQ,IAAI,IAAI;AAC1B,KAAA,CAAA;AACF;EACA,IAAIC,UAAaA,GAAA;AACf,IAAA,IAAIC,OAAkD,GAAA;AACpDC,MAAAA,IAAA,EAAM,CAAA,+BAAA,EAAkC,IAAI,CAACP,SAAS,CAAA;KACxD;IAEA,IAAI,OAAO,IAAI,CAACJ,IAAI,CAACS,UAAU,KAAK,QAAU,EAAA;MAC5C,OAAO;AAAE,QAAA,GAAGC,OAAO;QAAE,GAAG,IAAI,CAACV,IAAI,CAACS;OAAW;AAC/C;AAEA,IAAA,OAAOC,OAAA;AACT;AAEA,EAAA;IAAAE,oBAAA,CAAAC,kBAAA,CA6DA,28CAAA,EAAA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;QAAAC,WAAA;QAAAC,IAAA;QAAAC,YAAA;QAAAC,UAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontile/overlays",
|
|
3
|
-
"version": "0.17.0-beta.
|
|
3
|
+
"version": "0.17.0-beta.11",
|
|
4
4
|
"description": "Component Library for Ember Octane apps: overlays",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@embroider/addon-shim": "^1.9.0",
|
|
56
56
|
"@embroider/macros": "^1.16.10",
|
|
57
|
-
"@frontile/buttons": "0.17.0-beta.
|
|
57
|
+
"@frontile/buttons": "0.17.0-beta.11",
|
|
58
58
|
"@frontile/theme": "0.17.0-beta.10",
|
|
59
59
|
"@glint/template": "1.5.2",
|
|
60
60
|
"ember-click-outside": "^6.1.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"./components/portal.js": "./dist/_app_/components/portal.js"
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "018bd653db02bd420e446498ba1175a33e5d9697"
|
|
121
121
|
}
|