@frontile/overlays 0.16.0-alpha.0 → 0.16.1
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.
- package/declarations/components/drawer/body.d.ts +1 -1
- package/declarations/components/drawer/body.d.ts.map +1 -1
- package/declarations/components/drawer/footer.d.ts +1 -1
- package/declarations/components/drawer/footer.d.ts.map +1 -1
- package/declarations/components/drawer/header.d.ts +1 -1
- package/declarations/components/drawer/header.d.ts.map +1 -1
- package/declarations/components/drawer.d.ts +69 -0
- package/declarations/components/drawer.d.ts.map +1 -0
- package/declarations/components/modal/body.d.ts +1 -1
- package/declarations/components/modal/body.d.ts.map +1 -1
- package/declarations/components/modal/footer.d.ts +1 -1
- package/declarations/components/modal/footer.d.ts.map +1 -1
- package/declarations/components/modal/header.d.ts +1 -1
- package/declarations/components/modal/header.d.ts.map +1 -1
- package/declarations/components/modal.d.ts +66 -0
- package/declarations/components/modal.d.ts.map +1 -0
- package/dist/_app_/components/drawer.js +1 -0
- package/dist/_app_/components/modal.js +1 -0
- package/dist/components/drawer/body.js.map +1 -1
- package/dist/components/drawer/footer.js.map +1 -1
- package/dist/components/drawer/header.js.map +1 -1
- package/dist/components/{drawer/index.js → drawer.js} +5 -5
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/modal/body.js.map +1 -1
- package/dist/components/modal/footer.js.map +1 -1
- package/dist/components/modal/header.js.map +1 -1
- package/dist/components/{modal/index.js → modal.js} +5 -5
- package/dist/components/modal.js.map +1 -0
- package/package.json +6 -6
- package/dist/_app_/components/drawer/index.js +0 -1
- package/dist/_app_/components/modal/index.js +0 -1
- package/dist/components/drawer/index.js.map +0 -1
- package/dist/components/modal/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;IACnE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;CAYrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;IACrE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;CAYzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC;IACrE,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AACD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;CAazE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type OverlayArgs } from './overlay';
|
|
3
|
+
import DrawerBody from './drawer/body';
|
|
4
|
+
import DrawerFooter from './drawer/footer';
|
|
5
|
+
import DrawerHeader from './drawer/header';
|
|
6
|
+
import CloseButton from '@frontile/core/components/close-button';
|
|
7
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
8
|
+
export interface DrawerArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the transition to be used in the Drawer.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue 'overlay-transition--slide-from-[placement]'
|
|
13
|
+
*/
|
|
14
|
+
transitionName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* If set to false, the close button will not be displayed,
|
|
17
|
+
* closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
|
|
18
|
+
* to false.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue true
|
|
21
|
+
*/
|
|
22
|
+
allowClosing?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If set to false, the close button will not be displayed.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue true
|
|
27
|
+
*/
|
|
28
|
+
allowCloseButton?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The Close Button size.
|
|
31
|
+
*/
|
|
32
|
+
closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
33
|
+
/**
|
|
34
|
+
* The Drawer can appear from any side of the screen. The 'placement'
|
|
35
|
+
* option allows to choose where it appears from.
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue 'right'
|
|
38
|
+
*/
|
|
39
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
40
|
+
/**
|
|
41
|
+
* The Drawer size.
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue 'md'
|
|
44
|
+
*/
|
|
45
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
46
|
+
}
|
|
47
|
+
export interface DrawerSignature {
|
|
48
|
+
Args: DrawerArgs;
|
|
49
|
+
Blocks: {
|
|
50
|
+
default: [
|
|
51
|
+
{
|
|
52
|
+
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;
|
|
53
|
+
Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'> & WithBoundArgs<typeof DrawerHeader, 'size'>;
|
|
54
|
+
Body: WithBoundArgs<typeof DrawerBody, 'size'>;
|
|
55
|
+
Footer: WithBoundArgs<typeof DrawerFooter, 'size'>;
|
|
56
|
+
headerId: string;
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
Element: HTMLDivElement;
|
|
61
|
+
}
|
|
62
|
+
export default class Drawer extends Component<DrawerSignature> {
|
|
63
|
+
headerId: string;
|
|
64
|
+
get preventClosing(): boolean;
|
|
65
|
+
get showCloseButton(): boolean;
|
|
66
|
+
get placement(): "left" | "top" | "bottom" | "right";
|
|
67
|
+
get size(): string;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=drawer.d.ts.map
|
|
@@ -0,0 +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,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAC5E;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEnD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAEhD;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,SAAS,CAAC,GACvD,aAAa,CAAC,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;gBAC7C,MAAM,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,cAAc,CAAC,GACxD,aAAa,CAAC,OAAO,YAAY,EAAE,MAAM,CAAC,CAAC;gBAC7C,IAAI,EAAE,aAAa,CAAC,OAAO,UAAU,EAAE,MAAM,CAAC,CAAC;gBAC/C,MAAM,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,MAAM,CAAC,CAAC;gBACnD,QAAQ,EAAE,MAAM,CAAC;aAClB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;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,IAAI,IAAI,MAAM,CAMjB;CA6CF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/modal/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/modal/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;CAAG;AAEjE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;CAYnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/modal/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/modal/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;CAAG;AAEnE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;CAYvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/modal/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/modal/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;IAC9D;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;CAavE"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type OverlayArgs } from './overlay';
|
|
3
|
+
import ModalFooter from './modal/footer';
|
|
4
|
+
import ModalBody from './modal/body';
|
|
5
|
+
import ModalHeader from './modal/header';
|
|
6
|
+
import CloseButton from '@frontile/core/components/close-button';
|
|
7
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
8
|
+
export interface ModalArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the transition to be used in the modal.
|
|
11
|
+
* @defaultValue 'overlay-transition--zoom'
|
|
12
|
+
*/
|
|
13
|
+
transitionName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* If set to false, the close button will not be displayed,
|
|
16
|
+
* closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
|
|
17
|
+
* to false.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue true
|
|
20
|
+
*/
|
|
21
|
+
allowClosing?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* If set to false, the close button will not be displayed.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue true
|
|
26
|
+
*/
|
|
27
|
+
allowCloseButton?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The Close Button size.
|
|
30
|
+
*/
|
|
31
|
+
closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
32
|
+
/**
|
|
33
|
+
* If set to true, the modal will be vertically centered
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
isCentered?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The Modal size.
|
|
40
|
+
*
|
|
41
|
+
* @defaultValue 'lg'
|
|
42
|
+
*/
|
|
43
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
44
|
+
}
|
|
45
|
+
export interface ModalSignature {
|
|
46
|
+
Args: ModalArgs;
|
|
47
|
+
Blocks: {
|
|
48
|
+
default: [
|
|
49
|
+
{
|
|
50
|
+
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;
|
|
51
|
+
Header: WithBoundArgs<typeof ModalHeader, 'labelledById'> & WithBoundArgs<typeof ModalHeader, 'size'>;
|
|
52
|
+
Body: WithBoundArgs<typeof ModalBody, 'size'>;
|
|
53
|
+
Footer: WithBoundArgs<typeof ModalFooter, 'size'>;
|
|
54
|
+
headerId: string;
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
};
|
|
58
|
+
Element: HTMLDivElement;
|
|
59
|
+
}
|
|
60
|
+
export default class Modal extends Component<ModalSignature> {
|
|
61
|
+
headerId: string;
|
|
62
|
+
get preventClosing(): boolean;
|
|
63
|
+
get showCloseButton(): boolean;
|
|
64
|
+
get size(): "full" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/components/modal.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAgB,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAC3E;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEnD;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,WAAW,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,SAAS,CAAC,GACvD,aAAa,CAAC,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;gBAC7C,MAAM,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,cAAc,CAAC,GACvD,aAAa,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,CAAC;gBAC5C,IAAI,EAAE,aAAa,CAAC,OAAO,SAAS,EAAE,MAAM,CAAC,CAAC;gBAC9C,MAAM,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,CAAC;gBAClD,QAAQ,EAAE,MAAM,CAAC;aAClB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1D,QAAQ,SAA6B;IAErC,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,IAAI,eAAe,IAAI,OAAO,CAI7B;IAED,IAAI,IAAI,8CAEP;CA6CF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/overlays/components/drawer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/overlays/components/modal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":["../../../src/components/drawer/body.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '
|
|
1
|
+
{"version":3,"file":"body.js","sources":["../../../src/components/drawer/body.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '../drawer';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface DrawerBodyArgs extends Pick<DrawerArgs, 'placement'> {\n size: string;\n}\nexport interface DrawerBodySignature {\n Args: DrawerBodyArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class DrawerBody extends Component<DrawerBodySignature> {\n static{\n template(`\n <div\n class={{useFrontileClass \"drawer\" @placement @size part=\"body\"}}\n ...attributes\n >\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["DrawerBody","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAce,MAAMA,UAAU,SAASC,SAAS,CAAsB,EAAA;AAgBtEC,MAAA,GAhBoBF,UAAU,CAAA;AAEvBG,oBAAA,CAAAC,kBAAA,CAOH,iIAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":["../../../src/components/drawer/footer.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '
|
|
1
|
+
{"version":3,"file":"footer.js","sources":["../../../src/components/drawer/footer.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '../drawer';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface DrawerFooterArgs extends Pick<DrawerArgs, 'placement'> {\n size: string;\n}\nexport interface DrawerFooterSignature {\n Args: DrawerFooterArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class DrawerFooter extends Component<DrawerFooterSignature> {\n static{\n template(`\n <div\n class={{useFrontileClass \"drawer\" @placement @size part=\"footer\"}}\n ...attributes\n >\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["DrawerFooter","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAce,MAAMA,YAAY,SAASC,SAAS,CAAwB,EAAA;AAgB1EC,MAAA,GAhBoBF,YAAY,CAAA;AAEzBG,oBAAA,CAAAC,kBAAA,CAOH,mIAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../src/components/drawer/header.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../src/components/drawer/header.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { DrawerArgs } from '../drawer';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface DrawerHeaderArgs extends Pick<DrawerArgs, 'placement'> {\n size: string;\n /**\n * The id used to reference labelledById in Drawer component\n */ labelledById: string;\n}\nexport interface DrawerHeaderSignature {\n Args: DrawerHeaderArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class DrawerHeader extends Component<DrawerHeaderSignature> {\n static{\n template(`\n <div\n id={{@labelledById}}\n class={{useFrontileClass \"drawer\" @placement @size part=\"header\"}}\n ...attributes\n >\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["DrawerHeader","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAiBe,MAAMA,YAAY,SAASC,SAAS,CAAwB,EAAA;AAiB1EC,MAAA,GAjBoBF,YAAY,CAAA;AAEzBG,oBAAA,CAAAC,kBAAA,CAQH,wJAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -2,10 +2,10 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { guidFor } from '@ember/object/internals';
|
|
4
4
|
import { concat, hash } from '@ember/helper';
|
|
5
|
-
import Overlay from '
|
|
6
|
-
import DrawerBody from './body.js';
|
|
7
|
-
import DrawerFooter from './footer.js';
|
|
8
|
-
import DrawerHeader from './header.js';
|
|
5
|
+
import Overlay from './overlay.js';
|
|
6
|
+
import DrawerBody from './drawer/body.js';
|
|
7
|
+
import DrawerFooter from './drawer/footer.js';
|
|
8
|
+
import DrawerHeader from './drawer/header.js';
|
|
9
9
|
import useFrontileClass from '@frontile/core/helpers/use-frontile-class';
|
|
10
10
|
import CloseButton from '@frontile/core/components/close-button';
|
|
11
11
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
@@ -47,4 +47,4 @@ setComponentTemplate(precompileTemplate("\n <Overlay @isOpen={{@isOpen}} @onC
|
|
|
47
47
|
}), _class);
|
|
48
48
|
|
|
49
49
|
export { Drawer as default };
|
|
50
|
-
//# sourceMappingURL=
|
|
50
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../src/components/drawer.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { concat, hash } from '@ember/helper';\nimport Overlay, { type OverlayArgs } from './overlay';\nimport DrawerBody from './drawer/body';\nimport DrawerFooter from './drawer/footer';\nimport DrawerHeader from './drawer/header';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nimport CloseButton from '@frontile/core/components/close-button';\nimport type { WithBoundArgs } from '@glint/template';\nexport interface DrawerArgs extends Omit<OverlayArgs, 'contentTransitionName'> {\n /**\n * The name of the transition to be used in the Drawer.\n *\n * @defaultValue 'overlay-transition--slide-from-[placement]'\n */ transitionName?: string;\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 */ allowClosing?: boolean;\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */ allowCloseButton?: boolean;\n /**\n * The Close Button size.\n */ closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\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 */ placement?: 'top' | 'bottom' | 'left' | 'right';\n /**\n * The Drawer size.\n *\n * @defaultValue 'md'\n */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\nexport interface DrawerSignature {\n Args: DrawerArgs;\n Blocks: {\n default: [{\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;\n Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'> & WithBoundArgs<typeof DrawerHeader, 'size'>;\n Body: WithBoundArgs<typeof DrawerBody, 'size'>;\n Footer: WithBoundArgs<typeof DrawerFooter, 'size'>;\n headerId: string;\n }];\n };\n Element: HTMLDivElement;\n}\nexport default class Drawer extends Component<DrawerSignature> {\n headerId = `${guidFor(this)}-header`;\n get preventClosing(): boolean {\n return this.args.allowClosing === false;\n }\n get showCloseButton(): boolean {\n return (this.args.allowClosing !== false && this.args.allowCloseButton !== false);\n }\n get placement() {\n return this.args.placement || 'right';\n }\n get size(): string {\n const dir1 = [\n 'top',\n 'bottom'\n ].includes(this.placement) ? 'vertical' : 'horizontal';\n return `${this.args.size || 'md'}-${dir1}`;\n }\n static{\n template(`\n <Overlay\n @isOpen={{@isOpen}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @didClose={{@didClose}}\n @renderInPlace={{@renderInPlace}}\n @destinationElementId={{@destinationElementId}}\n @transitionDuration={{@transitionDuration}}\n @disableBackdrop={{@disableBackdrop}}\n @disableTransitions={{@disableTransitions}}\n @disableFocusTrap={{@disableFocusTrap}}\n @focusTrapOptions={{@focusTrapOptions}}\n @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}}\n @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}}\n @backdropTransitionName={{@backdropTransitionName}}\n @contentTransitionName={{if\n @transitionName\n @transitionName\n (concat \"overlay-transition--slide-from-\" this.placement)\n }}\n >\n {{#let\n (useFrontileClass \"drawer\" this.placement this.size part=\"close-btn\")\n as |closeBtnClass|\n }}\n <div\n class={{useFrontileClass \"drawer\" this.placement this.size}}\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={{closeBtnClass}}\n />\n {{/if}}\n\n {{yield\n (hash\n CloseButton=(component\n CloseButton onClick=@onClose class=closeBtnClass\n )\n Header=(component\n DrawerHeader\n labelledById=this.headerId\n placement=this.placement\n size=this.size\n )\n Body=(component\n DrawerBody placement=this.placement size=this.size\n )\n Footer=(component\n DrawerFooter placement=this.placement size=this.size\n )\n headerId=this.headerId\n )\n }}\n </div>\n {{/let}}\n </Overlay>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["Drawer","Component","constructor","args","_defineProperty","guidFor","preventClosing","allowClosing","showCloseButton","allowCloseButton","placement","size","dir1","includes","_class","setComponentTemplate","precompileTemplate","scope","Overlay","concat","useFrontileClass","CloseButton","hash","DrawerHeader","DrawerBody","DrawerFooter","strictMode"],"mappings":";;;;;;;;;;;;;;AAyDe,MAAMA,MAAM,SAASC,SAAS,CAAkB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,eAAA,mBAC/C,CAAEC,EAAAA,OAAO,CAAC,IAAI,CAAE,CAAQ,OAAA,CAAA,CAAA,CAAA;AAAA,GAAA;EACpC,IAAIC,cAAcA,GAAY;AAC1B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACI,YAAY,KAAK,KAAK,CAAA;AAC3C,GAAA;EACA,IAAIC,eAAeA,GAAY;AAC3B,IAAA,OAAQ,IAAI,CAACL,IAAI,CAACI,YAAY,KAAK,KAAK,IAAI,IAAI,CAACJ,IAAI,CAACM,gBAAgB,KAAK,KAAK,CAAA;AACpF,GAAA;EACA,IAAIC,SAASA,GAAG;AACZ,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,SAAS,IAAI,OAAO,CAAA;AACzC,GAAA;EACA,IAAIC,IAAIA,GAAW;AACf,IAAA,MAAMC,IAAI,GAAG,CACT,KAAK,EACL,QAAQ,CACX,CAACC,QAAQ,CAAC,IAAI,CAACH,SAAS,CAAC,GAAG,UAAU,GAAG,YAAY,CAAA;IACtD,OAAQ,CAAA,EAAE,IAAI,CAACP,IAAI,CAACQ,IAAI,IAAI,IAAK,CAAGC,CAAAA,EAAAA,IAAK,CAAC,CAAA,CAAA;AAC9C,GAAA;AAyEJ,CAAA;AAACE,MAAA,GA1FoBd,MAAM,CAAA;AAmBnBe,oBAAA,CAAAC,kBAAA,CAgEH,ihDAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,gBAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC,YAAA;IAAAC,UAAA;AAAAC,IAAAA,YAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAZ,MAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":["../../../src/components/modal/body.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '
|
|
1
|
+
{"version":3,"file":"body.js","sources":["../../../src/components/modal/body.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '../modal';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface ModalBodyArgs extends Pick<ModalArgs, 'size'> {\n}\nexport interface ModalBodySignature {\n Args: ModalBodyArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class ModalBody extends Component<ModalBodySignature> {\n static{\n template(`\n <div class={{useFrontileClass \"modal\" @size part=\"body\"}} ...attributes>\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ModalBody","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAae,MAAMA,SAAS,SAASC,SAAS,CAAqB,EAAA;AAapEC,MAAA,GAboBF,SAAS,CAAA;AAEtBG,oBAAA,CAAAC,kBAAA,CAIH,qHAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":["../../../src/components/modal/footer.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '
|
|
1
|
+
{"version":3,"file":"footer.js","sources":["../../../src/components/modal/footer.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '../modal';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface ModalFooterArgs extends Pick<ModalArgs, 'size'> {\n}\nexport interface ModalFooterSignature {\n Args: ModalFooterArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class ModalFooter extends Component<ModalFooterSignature> {\n static{\n template(`\n <div class={{useFrontileClass \"modal\" @size part=\"footer\"}} ...attributes>\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ModalFooter","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAae,MAAMA,WAAW,SAASC,SAAS,CAAuB,EAAA;AAaxEC,MAAA,GAboBF,WAAW,CAAA;AAExBG,oBAAA,CAAAC,kBAAA,CAIH,uHAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../src/components/modal/header.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../src/components/modal/header.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport type { ModalArgs } from '../modal';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nexport interface ModalHeaderArgs extends Pick<ModalArgs, 'size'> {\n /**\n * The id used to reference labelledById in Modal component\n */ labelledById: string;\n}\nexport interface ModalHeaderSignature {\n Args: ModalHeaderArgs;\n Element: HTMLDivElement;\n Blocks: {\n default: [];\n };\n}\nexport default class ModalHeader extends Component<ModalHeaderSignature> {\n static{\n template(`\n <div\n id={{@labelledById}}\n class={{useFrontileClass \"modal\" @size part=\"header\"}}\n ...attributes\n >\n {{yield}}\n </div>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["ModalHeader","Component","_class","setComponentTemplate","precompileTemplate","scope","useFrontileClass","strictMode"],"mappings":";;;;;;AAgBe,MAAMA,WAAW,SAASC,SAAS,CAAuB,EAAA;AAiBxEC,MAAA,GAjBoBF,WAAW,CAAA;AAExBG,oBAAA,CAAAC,kBAAA,CAQH,4IAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;AAAAC,IAAAA,gBAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAL,MAAA,CAAA;;;;"}
|
|
@@ -2,10 +2,10 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { guidFor } from '@ember/object/internals';
|
|
4
4
|
import { hash } from '@ember/helper';
|
|
5
|
-
import Overlay from '
|
|
6
|
-
import ModalFooter from './footer.js';
|
|
7
|
-
import ModalBody from './body.js';
|
|
8
|
-
import ModalHeader from './header.js';
|
|
5
|
+
import Overlay from './overlay.js';
|
|
6
|
+
import ModalFooter from './modal/footer.js';
|
|
7
|
+
import ModalBody from './modal/body.js';
|
|
8
|
+
import ModalHeader from './modal/header.js';
|
|
9
9
|
import useFrontileClass from '@frontile/core/helpers/use-frontile-class';
|
|
10
10
|
import CloseButton from '@frontile/core/components/close-button';
|
|
11
11
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
@@ -42,4 +42,4 @@ setComponentTemplate(precompileTemplate("\n <Overlay @isOpen={{@isOpen}} @onC
|
|
|
42
42
|
}), _class);
|
|
43
43
|
|
|
44
44
|
export { Modal as default };
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=modal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../src/components/modal.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport Overlay, { type OverlayArgs } from './overlay';\nimport ModalFooter from './modal/footer';\nimport ModalBody from './modal/body';\nimport ModalHeader from './modal/header';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nimport CloseButton from '@frontile/core/components/close-button';\nimport type { WithBoundArgs } from '@glint/template';\nexport interface ModalArgs extends Omit<OverlayArgs, 'contentTransitionName'> {\n /**\n * The name of the transition to be used in the modal.\n * @defaultValue 'overlay-transition--zoom'\n */ transitionName?: string;\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 */ allowClosing?: boolean;\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */ allowCloseButton?: boolean;\n /**\n * The Close Button size.\n */ closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /**\n * If set to true, the modal will be vertically centered\n *\n * @defaultValue false\n */ isCentered?: boolean;\n /**\n * The Modal size.\n *\n * @defaultValue 'lg'\n */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\nexport interface ModalSignature {\n Args: ModalArgs;\n Blocks: {\n default: [{\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;\n Header: WithBoundArgs<typeof ModalHeader, 'labelledById'> & WithBoundArgs<typeof ModalHeader, 'size'>;\n Body: WithBoundArgs<typeof ModalBody, 'size'>;\n Footer: WithBoundArgs<typeof ModalFooter, 'size'>;\n headerId: string;\n }];\n };\n Element: HTMLDivElement;\n}\nexport default class Modal extends Component<ModalSignature> {\n headerId = `${guidFor(this)}-header`;\n get preventClosing(): boolean {\n return this.args.allowClosing === false;\n }\n get showCloseButton(): boolean {\n return (this.args.allowClosing !== false && this.args.allowCloseButton !== false);\n }\n get size() {\n return this.args.size || 'lg';\n }\n static{\n template(`\n <Overlay\n @isOpen={{@isOpen}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @didClose={{@didClose}}\n @renderInPlace={{@renderInPlace}}\n @destinationElementId={{@destinationElementId}}\n @transitionDuration={{@transitionDuration}}\n @disableBackdrop={{@disableBackdrop}}\n @disableTransitions={{@disableTransitions}}\n @disableFocusTrap={{@disableFocusTrap}}\n @focusTrapOptions={{@focusTrapOptions}}\n @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}}\n @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}}\n @backdropTransitionName={{@backdropTransitionName}}\n @contentTransitionName={{if\n @transitionName\n @transitionName\n \"overlay-transition--zoom\"\n }}\n >\n {{#let\n (useFrontileClass \"modal\" this.size part=\"close-btn\")\n as |closeBtnClass|\n }}\n <div\n class={{useFrontileClass\n \"modal\"\n (if @isCentered \"centered\")\n this.size\n }}\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={{closeBtnClass}}\n />\n {{/if}}\n\n {{yield\n (hash\n CloseButton=(component\n CloseButton onClick=@onClose class=closeBtnClass\n )\n Header=(component\n ModalHeader labelledById=this.headerId size=this.size\n )\n Body=(component ModalBody size=this.size)\n Footer=(component ModalFooter size=this.size)\n headerId=this.headerId\n )\n }}\n </div>\n {{/let}}\n </Overlay>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["Modal","Component","constructor","args","_defineProperty","guidFor","preventClosing","allowClosing","showCloseButton","allowCloseButton","size","_class","setComponentTemplate","precompileTemplate","scope","Overlay","useFrontileClass","CloseButton","hash","ModalHeader","ModalBody","ModalFooter","strictMode"],"mappings":";;;;;;;;;;;;;;AAuDe,MAAMA,KAAK,SAASC,SAAS,CAAiB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,eAAA,mBAC7C,CAAEC,EAAAA,OAAO,CAAC,IAAI,CAAE,CAAQ,OAAA,CAAA,CAAA,CAAA;AAAA,GAAA;EACpC,IAAIC,cAAcA,GAAY;AAC1B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACI,YAAY,KAAK,KAAK,CAAA;AAC3C,GAAA;EACA,IAAIC,eAAeA,GAAY;AAC3B,IAAA,OAAQ,IAAI,CAACL,IAAI,CAACI,YAAY,KAAK,KAAK,IAAI,IAAI,CAACJ,IAAI,CAACM,gBAAgB,KAAK,KAAK,CAAA;AACpF,GAAA;EACA,IAAIC,IAAIA,GAAG;AACP,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,IAAI,IAAI,IAAI,CAAA;AACjC,GAAA;AAsEJ,CAAA;AAACC,MAAA,GAhFoBX,KAAK,CAAA;AAYlBY,oBAAA,CAAAC,kBAAA,CA6DH,k6CAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,OAAA;IAAAC,gBAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC,WAAA;IAAAC,SAAA;AAAAC,IAAAA,WAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAX,MAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontile/overlays",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Component Library for Ember Octane apps: overlays",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@ember/render-modifiers": "^2.1.0",
|
|
45
45
|
"@embroider/addon-shim": "^1.8.7",
|
|
46
|
-
"@frontile/core": "^0.16.
|
|
47
|
-
"@frontile/tailwindcss-plugin-helpers": "^0.
|
|
46
|
+
"@frontile/core": "^0.16.1",
|
|
47
|
+
"@frontile/tailwindcss-plugin-helpers": "^0.16.1",
|
|
48
48
|
"ember-css-transitions": "^4.4.0",
|
|
49
49
|
"ember-focus-trap": "^1.0.2"
|
|
50
50
|
},
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
"type": "addon",
|
|
83
83
|
"main": "addon-main.js",
|
|
84
84
|
"app-js": {
|
|
85
|
+
"./components/drawer.js": "./dist/_app_/components/drawer.js",
|
|
85
86
|
"./components/drawer/body.js": "./dist/_app_/components/drawer/body.js",
|
|
86
87
|
"./components/drawer/footer.js": "./dist/_app_/components/drawer/footer.js",
|
|
87
88
|
"./components/drawer/header.js": "./dist/_app_/components/drawer/header.js",
|
|
88
|
-
"./components/
|
|
89
|
+
"./components/modal.js": "./dist/_app_/components/modal.js",
|
|
89
90
|
"./components/modal/body.js": "./dist/_app_/components/modal/body.js",
|
|
90
91
|
"./components/modal/footer.js": "./dist/_app_/components/modal/footer.js",
|
|
91
92
|
"./components/modal/header.js": "./dist/_app_/components/modal/header.js",
|
|
92
|
-
"./components/modal/index.js": "./dist/_app_/components/modal/index.js",
|
|
93
93
|
"./components/overlay.js": "./dist/_app_/components/overlay.js"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
]
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "c7bbfa63b633ef722edf17cea3d43a5860851aa0"
|
|
121
121
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "@frontile/overlays/components/drawer/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "@frontile/overlays/components/modal/index";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/drawer/index.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { concat, hash } from '@ember/helper';\nimport Overlay, { type OverlayArgs } from '../overlay';\nimport DrawerBody from './body';\nimport DrawerFooter from './footer';\nimport DrawerHeader from './header';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nimport CloseButton from '@frontile/core/components/close-button';\nimport type { WithBoundArgs } from '@glint/template';\nexport interface DrawerArgs extends Omit<OverlayArgs, 'contentTransitionName'> {\n /**\n * The name of the transition to be used in the Drawer.\n *\n * @defaultValue 'overlay-transition--slide-from-[placement]'\n */ transitionName?: string;\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 */ allowClosing?: boolean;\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */ allowCloseButton?: boolean;\n /**\n * The Close Button size.\n */ closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\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 */ placement?: 'top' | 'bottom' | 'left' | 'right';\n /**\n * The Drawer size.\n *\n * @defaultValue 'md'\n */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\nexport interface DrawerSignature {\n Args: DrawerArgs;\n Blocks: {\n default: [{\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;\n Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'> & WithBoundArgs<typeof DrawerHeader, 'size'>;\n Body: WithBoundArgs<typeof DrawerBody, 'size'>;\n Footer: WithBoundArgs<typeof DrawerFooter, 'size'>;\n headerId: string;\n }];\n };\n Element: HTMLDivElement;\n}\nexport default class Drawer extends Component<DrawerSignature> {\n headerId = `${guidFor(this)}-header`;\n get preventClosing(): boolean {\n return this.args.allowClosing === false;\n }\n get showCloseButton(): boolean {\n return (this.args.allowClosing !== false && this.args.allowCloseButton !== false);\n }\n get placement() {\n return this.args.placement || 'right';\n }\n get size(): string {\n const dir1 = [\n 'top',\n 'bottom'\n ].includes(this.placement) ? 'vertical' : 'horizontal';\n return `${this.args.size || 'md'}-${dir1}`;\n }\n static{\n template(`\n <Overlay\n @isOpen={{@isOpen}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @didClose={{@didClose}}\n @renderInPlace={{@renderInPlace}}\n @destinationElementId={{@destinationElementId}}\n @transitionDuration={{@transitionDuration}}\n @disableBackdrop={{@disableBackdrop}}\n @disableTransitions={{@disableTransitions}}\n @disableFocusTrap={{@disableFocusTrap}}\n @focusTrapOptions={{@focusTrapOptions}}\n @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}}\n @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}}\n @backdropTransitionName={{@backdropTransitionName}}\n @contentTransitionName={{if\n @transitionName\n @transitionName\n (concat \"overlay-transition--slide-from-\" this.placement)\n }}\n >\n {{#let\n (useFrontileClass \"drawer\" this.placement this.size part=\"close-btn\")\n as |closeBtnClass|\n }}\n <div\n class={{useFrontileClass \"drawer\" this.placement this.size}}\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={{closeBtnClass}}\n />\n {{/if}}\n\n {{yield\n (hash\n CloseButton=(component\n CloseButton onClick=@onClose class=closeBtnClass\n )\n Header=(component\n DrawerHeader\n labelledById=this.headerId\n placement=this.placement\n size=this.size\n )\n Body=(component\n DrawerBody placement=this.placement size=this.size\n )\n Footer=(component\n DrawerFooter placement=this.placement size=this.size\n )\n headerId=this.headerId\n )\n }}\n </div>\n {{/let}}\n </Overlay>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["Drawer","Component","constructor","args","_defineProperty","guidFor","preventClosing","allowClosing","showCloseButton","allowCloseButton","placement","size","dir1","includes","_class","setComponentTemplate","precompileTemplate","scope","Overlay","concat","useFrontileClass","CloseButton","hash","DrawerHeader","DrawerBody","DrawerFooter","strictMode"],"mappings":";;;;;;;;;;;;;;AAyDe,MAAMA,MAAM,SAASC,SAAS,CAAkB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,eAAA,mBAC/C,CAAEC,EAAAA,OAAO,CAAC,IAAI,CAAE,CAAQ,OAAA,CAAA,CAAA,CAAA;AAAA,GAAA;EACpC,IAAIC,cAAcA,GAAY;AAC1B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACI,YAAY,KAAK,KAAK,CAAA;AAC3C,GAAA;EACA,IAAIC,eAAeA,GAAY;AAC3B,IAAA,OAAQ,IAAI,CAACL,IAAI,CAACI,YAAY,KAAK,KAAK,IAAI,IAAI,CAACJ,IAAI,CAACM,gBAAgB,KAAK,KAAK,CAAA;AACpF,GAAA;EACA,IAAIC,SAASA,GAAG;AACZ,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,SAAS,IAAI,OAAO,CAAA;AACzC,GAAA;EACA,IAAIC,IAAIA,GAAW;AACf,IAAA,MAAMC,IAAI,GAAG,CACT,KAAK,EACL,QAAQ,CACX,CAACC,QAAQ,CAAC,IAAI,CAACH,SAAS,CAAC,GAAG,UAAU,GAAG,YAAY,CAAA;IACtD,OAAQ,CAAA,EAAE,IAAI,CAACP,IAAI,CAACQ,IAAI,IAAI,IAAK,CAAGC,CAAAA,EAAAA,IAAK,CAAC,CAAA,CAAA;AAC9C,GAAA;AAyEJ,CAAA;AAACE,MAAA,GA1FoBd,MAAM,CAAA;AAmBnBe,oBAAA,CAAAC,kBAAA,CAgEH,ihDAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,gBAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC,YAAA;IAAAC,UAAA;AAAAC,IAAAA,YAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAZ,MAAA,CAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/modal/index.gts"],"sourcesContent":["import { template } from \"@ember/template-compiler\";\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\nimport { hash } from '@ember/helper';\nimport Overlay, { type OverlayArgs } from '../overlay';\nimport ModalFooter from './footer';\nimport ModalBody from './body';\nimport ModalHeader from './header';\nimport useFrontileClass from '@frontile/core/helpers/use-frontile-class';\nimport CloseButton from '@frontile/core/components/close-button';\nimport type { WithBoundArgs } from '@glint/template';\nexport interface ModalArgs extends Omit<OverlayArgs, 'contentTransitionName'> {\n /**\n * The name of the transition to be used in the modal.\n * @defaultValue 'overlay-transition--zoom'\n */ transitionName?: string;\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 */ allowClosing?: boolean;\n /**\n * If set to false, the close button will not be displayed.\n *\n * @defaultValue true\n */ allowCloseButton?: boolean;\n /**\n * The Close Button size.\n */ closeButtonSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n /**\n * If set to true, the modal will be vertically centered\n *\n * @defaultValue false\n */ isCentered?: boolean;\n /**\n * The Modal size.\n *\n * @defaultValue 'lg'\n */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\nexport interface ModalSignature {\n Args: ModalArgs;\n Blocks: {\n default: [{\n CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;\n Header: WithBoundArgs<typeof ModalHeader, 'labelledById'> & WithBoundArgs<typeof ModalHeader, 'size'>;\n Body: WithBoundArgs<typeof ModalBody, 'size'>;\n Footer: WithBoundArgs<typeof ModalFooter, 'size'>;\n headerId: string;\n }];\n };\n Element: HTMLDivElement;\n}\nexport default class Modal extends Component<ModalSignature> {\n headerId = `${guidFor(this)}-header`;\n get preventClosing(): boolean {\n return this.args.allowClosing === false;\n }\n get showCloseButton(): boolean {\n return (this.args.allowClosing !== false && this.args.allowCloseButton !== false);\n }\n get size() {\n return this.args.size || 'lg';\n }\n static{\n template(`\n <Overlay\n @isOpen={{@isOpen}}\n @onClose={{@onClose}}\n @onOpen={{@onOpen}}\n @didClose={{@didClose}}\n @renderInPlace={{@renderInPlace}}\n @destinationElementId={{@destinationElementId}}\n @transitionDuration={{@transitionDuration}}\n @disableBackdrop={{@disableBackdrop}}\n @disableTransitions={{@disableTransitions}}\n @disableFocusTrap={{@disableFocusTrap}}\n @focusTrapOptions={{@focusTrapOptions}}\n @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}}\n @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}}\n @backdropTransitionName={{@backdropTransitionName}}\n @contentTransitionName={{if\n @transitionName\n @transitionName\n \"overlay-transition--zoom\"\n }}\n >\n {{#let\n (useFrontileClass \"modal\" this.size part=\"close-btn\")\n as |closeBtnClass|\n }}\n <div\n class={{useFrontileClass\n \"modal\"\n (if @isCentered \"centered\")\n this.size\n }}\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={{closeBtnClass}}\n />\n {{/if}}\n\n {{yield\n (hash\n CloseButton=(component\n CloseButton onClick=@onClose class=closeBtnClass\n )\n Header=(component\n ModalHeader labelledById=this.headerId size=this.size\n )\n Body=(component ModalBody size=this.size)\n Footer=(component ModalFooter size=this.size)\n headerId=this.headerId\n )\n }}\n </div>\n {{/let}}\n </Overlay>\n `, {\n component: this,\n eval () {\n return eval(arguments[0]);\n }\n });\n }\n}\n"],"names":["Modal","Component","constructor","args","_defineProperty","guidFor","preventClosing","allowClosing","showCloseButton","allowCloseButton","size","_class","setComponentTemplate","precompileTemplate","scope","Overlay","useFrontileClass","CloseButton","hash","ModalHeader","ModalBody","ModalFooter","strictMode"],"mappings":";;;;;;;;;;;;;;AAuDe,MAAMA,KAAK,SAASC,SAAS,CAAiB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,eAAA,mBAC7C,CAAEC,EAAAA,OAAO,CAAC,IAAI,CAAE,CAAQ,OAAA,CAAA,CAAA,CAAA;AAAA,GAAA;EACpC,IAAIC,cAAcA,GAAY;AAC1B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACI,YAAY,KAAK,KAAK,CAAA;AAC3C,GAAA;EACA,IAAIC,eAAeA,GAAY;AAC3B,IAAA,OAAQ,IAAI,CAACL,IAAI,CAACI,YAAY,KAAK,KAAK,IAAI,IAAI,CAACJ,IAAI,CAACM,gBAAgB,KAAK,KAAK,CAAA;AACpF,GAAA;EACA,IAAIC,IAAIA,GAAG;AACP,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,IAAI,IAAI,IAAI,CAAA;AACjC,GAAA;AAsEJ,CAAA;AAACC,MAAA,GAhFoBX,KAAK,CAAA;AAYlBY,oBAAA,CAAAC,kBAAA,CA6DH,k6CAAA,EAAA;AAAAC,EAAAA,KAAA,EAAAA,OAAA;IAAAC,OAAA;IAAAC,gBAAA;IAAAC,WAAA;IAAAC,IAAA;IAAAC,WAAA;IAAAC,SAAA;AAAAC,IAAAA,WAAAA;AAAA,GAAA,CAAA;EAAAC,UAAA,EAAA,IAAA;AAKG,CAAC,CAAC,EAAAX,MAAA,CAAA;;;;"}
|