@frontile/overlays 0.17.0-alpha.2 → 0.17.0-alpha.21

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.
Files changed (73) hide show
  1. package/declarations/-private/dom.d.ts +3 -6
  2. package/declarations/-private/dom.d.ts.map +1 -1
  3. package/declarations/components/backdrop.d.ts +40 -0
  4. package/declarations/components/backdrop.d.ts.map +1 -0
  5. package/declarations/components/drawer/body.d.ts +4 -0
  6. package/declarations/components/drawer/body.d.ts.map +1 -1
  7. package/declarations/components/drawer/footer.d.ts +4 -0
  8. package/declarations/components/drawer/footer.d.ts.map +1 -1
  9. package/declarations/components/drawer/header.d.ts +4 -0
  10. package/declarations/components/drawer/header.d.ts.map +1 -1
  11. package/declarations/components/drawer.d.ts +67 -16
  12. package/declarations/components/drawer.d.ts.map +1 -1
  13. package/declarations/components/modal/body.d.ts +4 -0
  14. package/declarations/components/modal/body.d.ts.map +1 -1
  15. package/declarations/components/modal/footer.d.ts +4 -0
  16. package/declarations/components/modal/footer.d.ts.map +1 -1
  17. package/declarations/components/modal/header.d.ts +4 -0
  18. package/declarations/components/modal/header.d.ts.map +1 -1
  19. package/declarations/components/modal.d.ts +68 -16
  20. package/declarations/components/modal.d.ts.map +1 -1
  21. package/declarations/components/overlay.d.ts +82 -44
  22. package/declarations/components/overlay.d.ts.map +1 -1
  23. package/declarations/components/popover.d.ts +157 -0
  24. package/declarations/components/popover.d.ts.map +1 -0
  25. package/declarations/components/portal-target.d.ts +16 -0
  26. package/declarations/components/portal-target.d.ts.map +1 -0
  27. package/declarations/components/portal.d.ts +39 -0
  28. package/declarations/components/portal.d.ts.map +1 -0
  29. package/declarations/index.d.ts +7 -0
  30. package/declarations/index.d.ts.map +1 -0
  31. package/declarations/portal-D1N7TxUb.d.ts +5 -0
  32. package/declarations/portal-D1N7TxUb.d.ts.map +1 -0
  33. package/declarations/template-registry.d.ts +2 -3
  34. package/declarations/template-registry.d.ts.map +1 -1
  35. package/dist/_app_/components/backdrop.js +1 -0
  36. package/dist/_app_/components/popover.js +1 -0
  37. package/dist/_app_/components/portal-target.js +1 -0
  38. package/dist/_app_/components/portal.js +1 -0
  39. package/dist/components/backdrop.js +42 -0
  40. package/dist/components/backdrop.js.map +1 -0
  41. package/dist/components/drawer/body.js +9 -5
  42. package/dist/components/drawer/body.js.map +1 -1
  43. package/dist/components/drawer/footer.js +9 -5
  44. package/dist/components/drawer/footer.js.map +1 -1
  45. package/dist/components/drawer/header.js +9 -5
  46. package/dist/components/drawer/header.js.map +1 -1
  47. package/dist/components/drawer.js +21 -23
  48. package/dist/components/drawer.js.map +1 -1
  49. package/dist/components/modal/body.js +9 -5
  50. package/dist/components/modal/body.js.map +1 -1
  51. package/dist/components/modal/footer.js +9 -5
  52. package/dist/components/modal/footer.js.map +1 -1
  53. package/dist/components/modal/header.js +9 -5
  54. package/dist/components/modal/header.js.map +1 -1
  55. package/dist/components/modal.js +20 -21
  56. package/dist/components/modal.js.map +1 -1
  57. package/dist/components/overlay.js +132 -132
  58. package/dist/components/overlay.js.map +1 -1
  59. package/dist/components/popover.js +198 -0
  60. package/dist/components/popover.js.map +1 -0
  61. package/dist/components/portal-target.js +10 -0
  62. package/dist/components/portal-target.js.map +1 -0
  63. package/dist/components/portal.js +10 -0
  64. package/dist/components/portal.js.map +1 -0
  65. package/dist/index.js +7 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/portal-D1N7TxUb.js +167 -0
  68. package/dist/portal-D1N7TxUb.js.map +1 -0
  69. package/package.json +28 -21
  70. package/declarations/components/drawer/index.d.ts +0 -69
  71. package/declarations/components/drawer/index.d.ts.map +0 -1
  72. package/declarations/components/modal/index.d.ts +0 -66
  73. package/declarations/components/modal/index.d.ts.map +0 -1
@@ -1,7 +1,4 @@
1
- /**
2
- * @private
3
- * @hide
4
- */
5
- export function getDOM(context: any): any;
6
- export function getElementById(doc: any, id: any): any;
1
+ export declare function getDOM(context: object): Document | null;
2
+ export declare function getElementById(doc: Document | Element, id: string): null | Element;
3
+ export declare function getElementByAttribute(doc: Document | Element, attribute: string, value?: string | undefined): null | Element;
7
4
  //# sourceMappingURL=dom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/-private/dom.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,0CAoBC;AAYD,uDAiBC"}
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/-private/dom.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAWvD;AAkBD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,QAAQ,GAAG,OAAO,EACvB,EAAE,EAAE,MAAM,GACT,IAAI,GAAG,OAAO,CAEhB;AAED,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,QAAQ,GAAG,OAAO,EACvB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAM,GAAG,SAAqB,GACpC,IAAI,GAAG,OAAO,CA2BhB"}
@@ -0,0 +1,40 @@
1
+ import Component from '@glimmer/component';
2
+ import type { CssTransitionSignature } from 'ember-css-transitions/modifiers/css-transition';
3
+ interface BackdropSignature {
4
+ Args: {
5
+ /**
6
+ * @defaultValue 'faded'
7
+ */
8
+ type?: 'none' | 'transparent' | 'faded' | 'blur';
9
+ class?: string;
10
+ /**
11
+ * @defaultValue false
12
+ */
13
+ inPlace?: boolean;
14
+ transition?: CssTransitionSignature['Args']['Named'];
15
+ };
16
+ Element: HTMLDivElement;
17
+ Blocks: {
18
+ default: [];
19
+ };
20
+ }
21
+ declare class Backdrop extends Component<BackdropSignature> {
22
+ get classNames(): string;
23
+ get transition(): {
24
+ didTransitionIn?: () => void;
25
+ didTransitionOut?: () => void;
26
+ enterClass?: string;
27
+ enterActiveClass?: string;
28
+ enterToClass?: string;
29
+ isEnabled?: boolean;
30
+ leaveClass?: string;
31
+ leaveActiveClass?: string;
32
+ leaveToClass?: string;
33
+ name?: string;
34
+ parentSelector?: string;
35
+ };
36
+ get isVisible(): boolean;
37
+ }
38
+ export { Backdrop, type BackdropSignature };
39
+ export default Backdrop;
40
+ //# sourceMappingURL=backdrop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../src/components/backdrop.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAG7F,UAAU,iBAAiB;IACzB,IAAI,EAAE;QACJ;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;QACjD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,UAAU,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;KACtD,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACjD,IAAI,UAAU,WAOb;IAED,IAAI,UAAU;;;;;;;;;;;;MAUb;IAED,IAAI,SAAS,YAEZ;CAeF;AAED,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -1,6 +1,10 @@
1
1
  import Component from '@glimmer/component';
2
2
  export interface DrawerBodyArgs {
3
3
  class?: string;
4
+ /**
5
+ * @internal
6
+ */
7
+ classFromParent?: string;
4
8
  }
5
9
  export interface DrawerBodySignature {
6
10
  Args: DrawerBodyArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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
+ {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;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,6 +1,10 @@
1
1
  import Component from '@glimmer/component';
2
2
  export interface DrawerFooterArgs {
3
3
  class?: string;
4
+ /**
5
+ * @internal
6
+ */
7
+ classFromParent?: string;
4
8
  }
5
9
  export interface DrawerFooterSignature {
6
10
  Args: DrawerFooterArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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
+ {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;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"}
@@ -5,6 +5,10 @@ export interface DrawerHeaderArgs {
5
5
  */
6
6
  labelledById: string;
7
7
  class?: string;
8
+ /**
9
+ * @internal
10
+ */
11
+ classFromParent?: string;
8
12
  }
9
13
  export interface DrawerHeaderSignature {
10
14
  Args: DrawerHeaderArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;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"}
@@ -1,17 +1,18 @@
1
1
  import Component from '@glimmer/component';
2
- import { type OverlayArgs } from './overlay';
2
+ import { type OverlaySignature } from './overlay';
3
3
  import DrawerBody from './drawer/body';
4
4
  import DrawerFooter from './drawer/footer';
5
5
  import DrawerHeader from './drawer/header';
6
- import CloseButton from '@frontile/core/components/close-button';
6
+ import { CloseButton } from '@frontile/buttons';
7
7
  import type { WithBoundArgs } from '@glint/template';
8
- export interface DrawerArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
8
+ import { type SlotsToClasses, type DrawerSlots, type DrawerVariants } from '@frontile/theme';
9
+ export interface DrawerArgs extends Pick<OverlaySignature['Args'], 'isOpen' | 'onOpen' | 'onClose' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'disableFocusTrap' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition'> {
9
10
  /**
10
- * The name of the transition to be used in the Drawer.
11
+ * The transition to be used in the Drawer.
11
12
  *
12
- * @defaultValue 'overlay-transition--slide-from-[placement]'
13
+ * @defaultValue {name: 'overlay-transition--slide-from-[placement]'}
13
14
  */
14
- transitionName?: string;
15
+ transition?: OverlaySignature['Args']['transition'];
15
16
  /**
16
17
  * If set to false, the close button will not be displayed,
17
18
  * closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
@@ -36,13 +37,14 @@ export interface DrawerArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
36
37
  *
37
38
  * @defaultValue 'right'
38
39
  */
39
- placement?: 'top' | 'bottom' | 'left' | 'right';
40
+ placement?: DrawerVariants['placement'];
40
41
  /**
41
42
  * The Drawer size.
42
43
  *
43
44
  * @defaultValue 'md'
44
45
  */
45
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
46
+ size?: DrawerVariants['size'];
47
+ classes?: SlotsToClasses<DrawerSlots>;
46
48
  }
47
49
  export interface DrawerSignature {
48
50
  Args: DrawerArgs;
@@ -50,9 +52,9 @@ export interface DrawerSignature {
50
52
  default: [
51
53
  {
52
54
  CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;
53
- Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'> & WithBoundArgs<typeof DrawerHeader, 'class'>;
54
- Body: WithBoundArgs<typeof DrawerBody, 'class'>;
55
- Footer: WithBoundArgs<typeof DrawerFooter, 'class'>;
55
+ Header: WithBoundArgs<typeof DrawerHeader, 'labelledById'> & WithBoundArgs<typeof DrawerHeader, 'classFromParent'>;
56
+ Body: WithBoundArgs<typeof DrawerBody, 'classFromParent'>;
57
+ Footer: WithBoundArgs<typeof DrawerFooter, 'classFromParent'>;
56
58
  headerId: string;
57
59
  }
58
60
  ];
@@ -65,11 +67,60 @@ export default class Drawer extends Component<DrawerSignature> {
65
67
  get showCloseButton(): boolean;
66
68
  get placement(): "top" | "bottom" | "left" | "right";
67
69
  get classes(): {
68
- base: string;
69
- closeButton: string;
70
- header: string;
71
- body: string;
72
- footer: string;
70
+ base: (slotProps?: ({
71
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
72
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
73
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
74
+ closeButton: (slotProps?: ({
75
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
76
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
77
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
78
+ header: (slotProps?: ({
79
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
80
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
81
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
82
+ body: (slotProps?: ({
83
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
84
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
85
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
86
+ footer: (slotProps?: ({
87
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
88
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
89
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
90
+ } & {
91
+ base: (slotProps?: ({
92
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
93
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
94
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
95
+ closeButton: (slotProps?: ({
96
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
97
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
98
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
99
+ header: (slotProps?: ({
100
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
101
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
102
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
103
+ body: (slotProps?: ({
104
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
105
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
106
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
107
+ footer: (slotProps?: ({
108
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
109
+ placement?: "top" | "bottom" | "left" | "right" | undefined;
110
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
111
+ } & {};
112
+ get transition(): {
113
+ didTransitionIn?: () => void;
114
+ didTransitionOut?: () => void;
115
+ enterClass?: string;
116
+ enterActiveClass?: string;
117
+ enterToClass?: string;
118
+ isEnabled?: boolean;
119
+ leaveClass?: string;
120
+ leaveActiveClass?: string;
121
+ leaveToClass?: string;
122
+ name?: string;
123
+ parentSelector?: string;
73
124
  };
74
125
  }
75
126
  //# sourceMappingURL=drawer.d.ts.map
@@ -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,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGrD,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,EAA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AO,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,iBAAiB,CAAC,CAAC;gBACxD,IAAI,EAAE,aAAa,CAAC,OAAO,UAAU,EAAE,iBAAiB,CAAC,CAAC;gBAC1D,MAAM,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,iBAAiB,CAAC,CAAC;gBAC9D,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,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAOV;IACD,IAAI,UAAU;;;;;;;;;;;;MAUb;CAoCF"}
@@ -1,6 +1,10 @@
1
1
  import Component from '@glimmer/component';
2
2
  export interface ModalBodyArgs {
3
3
  class?: string;
4
+ /**
5
+ * @internal
6
+ */
7
+ classFromParent?: string;
4
8
  }
5
9
  export interface ModalBodySignature {
6
10
  Args: ModalBodyArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/modal/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,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
+ {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/components/modal/body.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,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,6 +1,10 @@
1
1
  import Component from '@glimmer/component';
2
2
  export interface ModalFooterArgs {
3
3
  class?: string;
4
+ /**
5
+ * @internal
6
+ */
7
+ classFromParent?: string;
4
8
  }
5
9
  export interface ModalFooterSignature {
6
10
  Args: ModalFooterArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/modal/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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;CAYvE"}
1
+ {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../src/components/modal/footer.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;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;CAYvE"}
@@ -5,6 +5,10 @@ export interface ModalHeaderArgs {
5
5
  * The id used to reference labelledById in Modal component
6
6
  */
7
7
  labelledById: string;
8
+ /**
9
+ * @internal
10
+ */
11
+ classFromParent?: string;
8
12
  }
9
13
  export interface ModalHeaderSignature {
10
14
  Args: ModalHeaderArgs;
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/modal/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;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"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../src/components/modal/header.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;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"}
@@ -1,16 +1,18 @@
1
1
  import Component from '@glimmer/component';
2
- import { type OverlayArgs } from './overlay';
2
+ import { type OverlaySignature } from './overlay';
3
3
  import ModalFooter from './modal/footer';
4
4
  import ModalBody from './modal/body';
5
5
  import ModalHeader from './modal/header';
6
- import CloseButton from '@frontile/core/components/close-button';
6
+ import { CloseButton } from '@frontile/buttons';
7
+ import { type SlotsToClasses, type ModalSlots, type ModalVariants } from '@frontile/theme';
7
8
  import type { WithBoundArgs } from '@glint/template';
8
- export interface ModalArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
9
+ export interface ModalArgs extends Pick<OverlaySignature['Args'], 'isOpen' | 'onOpen' | 'onClose' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'disableFocusTrap' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition'> {
9
10
  /**
10
- * The name of the transition to be used in the modal.
11
- * @defaultValue 'overlay-transition--zoom'
11
+ * The transition to be used in the Modal.
12
+ *
13
+ * @defaultValue {name: 'overlay-transition--zoom'}
12
14
  */
13
- transitionName?: string;
15
+ transition?: OverlaySignature['Args']['transition'];
14
16
  /**
15
17
  * If set to false, the close button will not be displayed,
16
18
  * closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
@@ -40,17 +42,18 @@ export interface ModalArgs extends Omit<OverlayArgs, 'contentTransitionName'> {
40
42
  *
41
43
  * @defaultValue 'lg'
42
44
  */
43
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
45
+ size?: ModalVariants['size'];
46
+ classes?: SlotsToClasses<ModalSlots>;
44
47
  }
45
48
  export interface ModalSignature {
46
49
  Args: ModalArgs;
47
50
  Blocks: {
48
51
  default: [
49
52
  {
50
- CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'> & WithBoundArgs<typeof CloseButton, 'class'>;
51
- Header: WithBoundArgs<typeof ModalHeader, 'labelledById'> & WithBoundArgs<typeof ModalHeader, 'class'>;
52
- Body: WithBoundArgs<typeof ModalBody, 'class'>;
53
- Footer: WithBoundArgs<typeof ModalFooter, 'class'>;
53
+ CloseButton: WithBoundArgs<typeof CloseButton, 'onClick' | 'class'>;
54
+ Header: WithBoundArgs<typeof ModalHeader, 'labelledById' | 'classFromParent'>;
55
+ Body: WithBoundArgs<typeof ModalBody, 'classFromParent'>;
56
+ Footer: WithBoundArgs<typeof ModalFooter, 'classFromParent'>;
54
57
  headerId: string;
55
58
  }
56
59
  ];
@@ -63,11 +66,60 @@ export default class Modal extends Component<ModalSignature> {
63
66
  get showCloseButton(): boolean;
64
67
  get size(): "sm" | "md" | "lg" | "xl" | "xs" | "full";
65
68
  get classes(): {
66
- base: string;
67
- closeButton: string;
68
- header: string;
69
- body: string;
70
- footer: string;
69
+ base: (slotProps?: ({
70
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
71
+ isCentered?: boolean | undefined;
72
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
73
+ closeButton: (slotProps?: ({
74
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
75
+ isCentered?: boolean | undefined;
76
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
77
+ header: (slotProps?: ({
78
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
79
+ isCentered?: boolean | undefined;
80
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
81
+ body: (slotProps?: ({
82
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
83
+ isCentered?: boolean | undefined;
84
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
85
+ footer: (slotProps?: ({
86
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
87
+ isCentered?: boolean | undefined;
88
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
89
+ } & {
90
+ base: (slotProps?: ({
91
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
92
+ isCentered?: boolean | undefined;
93
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
94
+ closeButton: (slotProps?: ({
95
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
96
+ isCentered?: boolean | undefined;
97
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
98
+ header: (slotProps?: ({
99
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
100
+ isCentered?: boolean | undefined;
101
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
102
+ body: (slotProps?: ({
103
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
104
+ isCentered?: boolean | undefined;
105
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
106
+ footer: (slotProps?: ({
107
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "full" | undefined;
108
+ isCentered?: boolean | undefined;
109
+ } & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
110
+ } & {};
111
+ get transition(): {
112
+ didTransitionIn?: () => void;
113
+ didTransitionOut?: () => void;
114
+ enterClass?: string;
115
+ enterActiveClass?: string;
116
+ enterToClass?: string;
117
+ isEnabled?: boolean;
118
+ leaveClass?: string;
119
+ leaveActiveClass?: string;
120
+ leaveToClass?: string;
121
+ name?: string;
122
+ parentSelector?: string;
71
123
  };
72
124
  }
73
125
  //# sourceMappingURL=modal.d.ts.map
@@ -1 +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;AACzC,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAEjE,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,EA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;;;;;;;;;;WAOV;IAED,IAAI,UAAU;;;;;;;;;;;;MAUb;CAoCF"}
@@ -1,30 +1,17 @@
1
1
  import Component from '@glimmer/component';
2
- export interface OverlayArgs {
3
- /**
4
- * Whether to render in place or in the specified/default destination
5
- *
6
- * @defaultValue false
7
- */
8
- renderInPlace?: boolean;
9
- /**
10
- * The destination where the overlay will be inserted, defaults to
11
- * `document.body`
12
- *
13
- * @defaultValue undefined
14
- */
15
- destinationElementId?: string;
2
+ import { type BackdropSignature } from './backdrop';
3
+ import { type PortalSignature } from './portal';
4
+ import type { ModifierLike } from '@glint/template';
5
+ import type { CssTransitionSignature } from 'ember-css-transitions/modifiers/css-transition';
6
+ interface Args extends Pick<PortalSignature['Args'], 'renderInPlace' | 'target'> {
16
7
  /**
17
8
  * Duration of the animation
18
9
  *
19
10
  * @defaultValue 200
20
11
  */
21
12
  transitionDuration?: number;
22
- /**
23
- * Whether to hide the backdrop or not
24
- *
25
- * @defaultValue false
26
- */
27
- disableBackdrop?: boolean;
13
+ backdrop?: BackdropSignature['Args']['type'];
14
+ backdropTransition?: BackdropSignature['Args']['transition'];
28
15
  /**
29
16
  * Disable css transitions
30
17
  *
@@ -40,7 +27,7 @@ export interface OverlayArgs {
40
27
  /**
41
28
  * Focus trap options
42
29
  *
43
- * @defaultValue { allowOutsideClick: true }
30
+ * @defaultValue { clickOutsideDeactivates: true, allowOutsideClick: true }
44
31
  */
45
32
  focusTrapOptions?: unknown;
46
33
  /**
@@ -66,6 +53,12 @@ export interface OverlayArgs {
66
53
  * @defaultValue true
67
54
  */
68
55
  closeOnOutsideClick?: boolean;
56
+ /**
57
+ * Whether to close when the overlay element is clicked, used for modal and drawer components.
58
+ *
59
+ * @defaultValue false
60
+ */
61
+ closeOnOverlayElementClick?: boolean;
69
62
  /**
70
63
  * Whether to close when the escape key is pressed
71
64
  *
@@ -73,45 +66,90 @@ export interface OverlayArgs {
73
66
  */
74
67
  closeOnEscapeKey?: boolean;
75
68
  /**
76
- * The name of the transition to be used in the backdrop.
69
+ * Transition options
77
70
  *
78
- * @defaultValue 'overlay-transition--fade'
71
+ * @defaultValue {name:'overlay-transition--fade'}
79
72
  */
80
- backdropTransitionName?: string;
73
+ transition?: CssTransitionSignature['Args']['Named'];
74
+ disableFlexContent?: boolean;
75
+ customContentModifier?: ModifierLike<{
76
+ Element: HTMLElement;
77
+ }>;
78
+ class?: string;
81
79
  /**
82
- * The name of the transition to be used in the content.
83
- *
84
- * @defaultValue 'overlay-transition--fade'
80
+ * @defaultValue false
85
81
  */
86
- contentTransitionName?: string;
82
+ preventFocusRestore?: boolean;
83
+ /**
84
+ * @defaultValue true
85
+ */
86
+ blockScroll?: boolean;
87
87
  }
88
- export interface OverlaySignature {
89
- Args: OverlayArgs;
88
+ interface OverlaySignature {
89
+ Args: Args;
90
90
  Element: HTMLDivElement;
91
91
  Blocks: {
92
92
  default: [];
93
93
  };
94
94
  }
95
- export default class Overlay extends Component<OverlaySignature> {
95
+ declare class Overlay extends Component<OverlaySignature> {
96
96
  keepOpen: boolean;
97
97
  contentElement: HTMLElement | undefined;
98
+ focusedElement: Element | null | undefined;
98
99
  mouseDownContentElement: EventTarget | null;
99
- get destinationElement(): HTMLElement | null;
100
- get isVisible(): boolean;
101
- get isBackdropVisible(): boolean;
102
- get isAnimationEnabled(): boolean;
103
- get focusTrapOptions(): unknown;
104
- handleOverlayClick(): void;
105
- handleContentClick(event: MouseEvent): void;
106
100
  handleClose(): void;
101
+ handleContentClick(event: MouseEvent): void;
102
+ handleOutsideClick(e: Event): void;
107
103
  handleContentMouseDown(event: MouseEvent): void;
108
104
  handleKeyDown(event: KeyboardEvent): void;
109
- setup(element: HTMLElement): void;
110
- teardown(): void;
111
- get classes(): {
112
- base: string;
113
- backdrop: string;
114
- content: string;
105
+ setupContent: import("ember-modifier").FunctionBasedModifier<{
106
+ Args: {
107
+ Positional: unknown[];
108
+ Named: import("ember-modifier/-private/signature").EmptyObject;
109
+ };
110
+ Element: HTMLDivElement;
111
+ }>;
112
+ get isVisible(): boolean;
113
+ get backdrop(): BackdropSignature['Args']['type'];
114
+ get isAnimationEnabled(): boolean;
115
+ get focusTrapOptions(): unknown;
116
+ get classes(): string;
117
+ get customContentModifier(): ModifierLike<{
118
+ Element: HTMLElement;
119
+ }> | import("ember-modifier").FunctionBasedModifier<{
120
+ Args: {
121
+ Positional: unknown[];
122
+ Named: import("ember-modifier/-private/signature").EmptyObject;
123
+ };
124
+ Element: Element;
125
+ }>;
126
+ get backdropTransition(): {
127
+ didTransitionIn?: () => void;
128
+ didTransitionOut?: () => void;
129
+ enterClass?: string;
130
+ enterActiveClass?: string;
131
+ enterToClass?: string;
132
+ isEnabled?: boolean;
133
+ leaveClass?: string;
134
+ leaveActiveClass?: string;
135
+ leaveToClass?: string;
136
+ name?: string;
137
+ parentSelector?: string;
138
+ };
139
+ get transition(): {
140
+ didTransitionIn?: () => void;
141
+ didTransitionOut?: () => void;
142
+ enterClass?: string;
143
+ enterActiveClass?: string;
144
+ enterToClass?: string;
145
+ isEnabled?: boolean;
146
+ leaveClass?: string;
147
+ leaveActiveClass?: string;
148
+ leaveToClass?: string;
149
+ name?: string;
150
+ parentSelector?: string;
115
151
  };
116
152
  }
153
+ export { Overlay, type OverlaySignature };
154
+ export default Overlay;
117
155
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/components/overlay.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAwC3C,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,C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