@frontile/overlays 0.17.0-alpha.2 → 0.17.0-alpha.20
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/-private/dom.d.ts +3 -6
- package/declarations/-private/dom.d.ts.map +1 -1
- package/declarations/components/backdrop.d.ts +40 -0
- package/declarations/components/backdrop.d.ts.map +1 -0
- package/declarations/components/drawer.d.ts +19 -6
- package/declarations/components/drawer.d.ts.map +1 -1
- package/declarations/components/modal.d.ts +22 -8
- package/declarations/components/modal.d.ts.map +1 -1
- package/declarations/components/overlay.d.ts +82 -44
- package/declarations/components/overlay.d.ts.map +1 -1
- package/declarations/components/popover.d.ts +157 -0
- package/declarations/components/popover.d.ts.map +1 -0
- package/declarations/components/portal-target.d.ts +16 -0
- package/declarations/components/portal-target.d.ts.map +1 -0
- package/declarations/components/portal.d.ts +39 -0
- package/declarations/components/portal.d.ts.map +1 -0
- package/declarations/index.d.ts +7 -0
- package/declarations/index.d.ts.map +1 -0
- package/declarations/portal-D1N7TxUb.d.ts +5 -0
- package/declarations/portal-D1N7TxUb.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +2 -3
- package/declarations/template-registry.d.ts.map +1 -1
- package/dist/_app_/components/backdrop.js +1 -0
- package/dist/_app_/components/popover.js +1 -0
- package/dist/_app_/components/portal-target.js +1 -0
- package/dist/_app_/components/portal.js +1 -0
- package/dist/components/backdrop.js +42 -0
- package/dist/components/backdrop.js.map +1 -0
- package/dist/components/drawer/body.js +3 -3
- package/dist/components/drawer/body.js.map +1 -1
- package/dist/components/drawer/footer.js +3 -3
- package/dist/components/drawer/footer.js.map +1 -1
- package/dist/components/drawer/header.js +3 -3
- package/dist/components/drawer/header.js.map +1 -1
- package/dist/components/drawer.js +21 -10
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/modal/body.js +3 -3
- package/dist/components/modal/body.js.map +1 -1
- package/dist/components/modal/footer.js +3 -3
- package/dist/components/modal/footer.js.map +1 -1
- package/dist/components/modal/header.js +3 -3
- package/dist/components/modal/header.js.map +1 -1
- package/dist/components/modal.js +20 -8
- package/dist/components/modal.js.map +1 -1
- package/dist/components/overlay.js +132 -132
- package/dist/components/overlay.js.map +1 -1
- package/dist/components/popover.js +198 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/portal-target.js +10 -0
- package/dist/components/portal-target.js.map +1 -0
- package/dist/components/portal.js +10 -0
- package/dist/components/portal.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/portal-D1N7TxUb.js +167 -0
- package/dist/portal-D1N7TxUb.js.map +1 -0
- package/package.json +28 -21
- package/declarations/components/drawer/index.d.ts +0 -69
- package/declarations/components/drawer/index.d.ts.map +0 -1
- package/declarations/components/modal/index.d.ts +0 -66
- package/declarations/components/modal/index.d.ts.map +0 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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.
|
|
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,17 +1,17 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { type
|
|
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/
|
|
6
|
+
import { CloseButton } from '@frontile/buttons';
|
|
7
7
|
import type { WithBoundArgs } from '@glint/template';
|
|
8
|
-
export interface DrawerArgs extends
|
|
8
|
+
export interface DrawerArgs extends Pick<OverlaySignature['Args'], 'isOpen' | 'onOpen' | 'onClose' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'disableFocusTrap' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition'> {
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
10
|
+
* The transition to be used in the Drawer.
|
|
11
11
|
*
|
|
12
|
-
* @defaultValue 'overlay-transition--slide-from-[placement]'
|
|
12
|
+
* @defaultValue {name: 'overlay-transition--slide-from-[placement]'}
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
transition?: OverlaySignature['Args']['transition'];
|
|
15
15
|
/**
|
|
16
16
|
* If set to false, the close button will not be displayed,
|
|
17
17
|
* closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
|
|
@@ -71,5 +71,18 @@ export default class Drawer extends Component<DrawerSignature> {
|
|
|
71
71
|
body: string;
|
|
72
72
|
footer: string;
|
|
73
73
|
};
|
|
74
|
+
get transition(): {
|
|
75
|
+
didTransitionIn?: () => void;
|
|
76
|
+
didTransitionOut?: () => void;
|
|
77
|
+
enterClass?: string;
|
|
78
|
+
enterActiveClass?: string;
|
|
79
|
+
enterToClass?: string;
|
|
80
|
+
isEnabled?: boolean;
|
|
81
|
+
leaveClass?: string;
|
|
82
|
+
leaveActiveClass?: string;
|
|
83
|
+
leaveToClass?: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
parentSelector?: string;
|
|
86
|
+
};
|
|
74
87
|
}
|
|
75
88
|
//# 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,
|
|
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;AAC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AO,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC9C,IAAI,EAAE,aAAa,CAAC,OAAO,UAAU,EAAE,OAAO,CAAC,CAAC;gBAChD,MAAM,EAAE,aAAa,CAAC,OAAO,YAAY,EAAE,OAAO,CAAC,CAAC;gBACpD,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;;;;;;MAeV;IACD,IAAI,UAAU;;;;;;;;;;;;MAUb;CAoCF"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { type
|
|
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/
|
|
6
|
+
import { CloseButton } from '@frontile/buttons';
|
|
7
7
|
import type { WithBoundArgs } from '@glint/template';
|
|
8
|
-
export interface ModalArgs extends
|
|
8
|
+
export interface ModalArgs extends Pick<OverlaySignature['Args'], 'isOpen' | 'onOpen' | 'onClose' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'disableFocusTrap' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition'> {
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
10
|
+
* The transition to be used in the Modal.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue {name: 'overlay-transition--zoom'}
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
transition?: OverlaySignature['Args']['transition'];
|
|
14
15
|
/**
|
|
15
16
|
* If set to false, the close button will not be displayed,
|
|
16
17
|
* closeOnOutsideClick will be set to false, and closeOnEscapeKey will also be set
|
|
@@ -47,8 +48,8 @@ export interface ModalSignature {
|
|
|
47
48
|
Blocks: {
|
|
48
49
|
default: [
|
|
49
50
|
{
|
|
50
|
-
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick'
|
|
51
|
-
Header: WithBoundArgs<typeof ModalHeader, 'labelledById'
|
|
51
|
+
CloseButton: WithBoundArgs<typeof CloseButton, 'onClick' | 'class'>;
|
|
52
|
+
Header: WithBoundArgs<typeof ModalHeader, 'labelledById' | 'class'>;
|
|
52
53
|
Body: WithBoundArgs<typeof ModalBody, 'class'>;
|
|
53
54
|
Footer: WithBoundArgs<typeof ModalFooter, 'class'>;
|
|
54
55
|
headerId: string;
|
|
@@ -69,5 +70,18 @@ export default class Modal extends Component<ModalSignature> {
|
|
|
69
70
|
body: string;
|
|
70
71
|
footer: string;
|
|
71
72
|
};
|
|
73
|
+
get transition(): {
|
|
74
|
+
didTransitionIn?: () => void;
|
|
75
|
+
didTransitionOut?: () => void;
|
|
76
|
+
enterClass?: string;
|
|
77
|
+
enterActiveClass?: string;
|
|
78
|
+
enterToClass?: string;
|
|
79
|
+
isEnabled?: boolean;
|
|
80
|
+
leaveClass?: string;
|
|
81
|
+
leaveActiveClass?: string;
|
|
82
|
+
leaveToClass?: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
parentSelector?: string;
|
|
85
|
+
};
|
|
72
86
|
}
|
|
73
87
|
//# 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,
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../src/components/mod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pE,MAAM,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC;gBACpE,IAAI,EAAE,aAAa,CAAC,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;gBAC/C,MAAM,EAAE,aAAa,CAAC,OAAO,WAAW,EAAE,OAAO,CAAC,CAAC;gBACnD,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;IAED,IAAI,OAAO;;;;;;MAeV;IAED,IAAI,UAAU;;;;;;;;;;;;MAUb;CAoCF"}
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
69
|
+
* Transition options
|
|
77
70
|
*
|
|
78
|
-
* @defaultValue 'overlay-transition--fade'
|
|
71
|
+
* @defaultValue {name:'overlay-transition--fade'}
|
|
79
72
|
*/
|
|
80
|
-
|
|
73
|
+
transition?: CssTransitionSignature['Args']['Named'];
|
|
74
|
+
disableFlexContent?: boolean;
|
|
75
|
+
customContentModifier?: ModifierLike<{
|
|
76
|
+
Element: HTMLElement;
|
|
77
|
+
}>;
|
|
78
|
+
class?: string;
|
|
81
79
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* @defaultValue 'overlay-transition--fade'
|
|
80
|
+
* @defaultValue false
|
|
85
81
|
*/
|
|
86
|
-
|
|
82
|
+
preventFocusRestore?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* @defaultValue true
|
|
85
|
+
*/
|
|
86
|
+
blockScroll?: boolean;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
Args:
|
|
88
|
+
interface OverlaySignature {
|
|
89
|
+
Args: Args;
|
|
90
90
|
Element: HTMLDivElement;
|
|
91
91
|
Blocks: {
|
|
92
92
|
default: [];
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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":"
|
|
1
|
+
{"version":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;;;;;;;;;MAWb;CAuCF;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type OverlaySignature } from './overlay';
|
|
3
|
+
import type { ModifierLike } from '@glint/template';
|
|
4
|
+
import type { WithBoundArgs } from '@glint/template';
|
|
5
|
+
import type { Signature as VelcroSignature } from 'ember-velcro/modifiers/velcro';
|
|
6
|
+
interface PopoverSignature {
|
|
7
|
+
Args: {
|
|
8
|
+
/**
|
|
9
|
+
* Placement of the menu when open
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue 'bottom-start'
|
|
12
|
+
*/
|
|
13
|
+
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
14
|
+
flipOptions?: VelcroSignature['Args']['Named']['flipOptions'];
|
|
15
|
+
middleware?: VelcroSignature['Args']['Named']['middleware'];
|
|
16
|
+
shiftOptions?: VelcroSignature['Args']['Named']['shiftOptions'];
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue 5
|
|
19
|
+
*/
|
|
20
|
+
offsetOptions?: VelcroSignature['Args']['Named']['offsetOptions'];
|
|
21
|
+
/**
|
|
22
|
+
* @defaultValue 'absolute'
|
|
23
|
+
*/
|
|
24
|
+
strategy?: VelcroSignature['Args']['Named']['strategy'];
|
|
25
|
+
isOpen?: boolean;
|
|
26
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
27
|
+
didClose?: () => void;
|
|
28
|
+
};
|
|
29
|
+
Element: HTMLUListElement;
|
|
30
|
+
Blocks: {
|
|
31
|
+
default: [
|
|
32
|
+
{
|
|
33
|
+
anchor: ModifierLike<{
|
|
34
|
+
Element: HTMLElement;
|
|
35
|
+
}>;
|
|
36
|
+
isOpen: boolean;
|
|
37
|
+
toggle: () => void;
|
|
38
|
+
open: () => void;
|
|
39
|
+
close: () => void;
|
|
40
|
+
trigger: ModifierLike<{
|
|
41
|
+
Element: HTMLElement;
|
|
42
|
+
Args: {
|
|
43
|
+
Positional: [eventType?: 'click' | 'hover'];
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
Content: WithBoundArgs<typeof Content, 'loop' | 'isOpen' | 'id' | 'toggle' | 'internalDidClose' | 'blockScroll' | 'backdrop'>;
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
declare class Popover extends Component<PopoverSignature> {
|
|
52
|
+
triggerEl?: HTMLElement;
|
|
53
|
+
menuId: string;
|
|
54
|
+
_isOpen: boolean;
|
|
55
|
+
isClosing: boolean;
|
|
56
|
+
preventFocusRestore: boolean;
|
|
57
|
+
get isOpen(): boolean;
|
|
58
|
+
toggle: (event?: Event) => void;
|
|
59
|
+
open: () => void;
|
|
60
|
+
close: () => void;
|
|
61
|
+
trigger: import("ember-modifier").FunctionBasedModifier<{
|
|
62
|
+
Args: {
|
|
63
|
+
Positional: [eventType?: "click" | "hover" | undefined];
|
|
64
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
65
|
+
};
|
|
66
|
+
Element: HTMLElement;
|
|
67
|
+
}>;
|
|
68
|
+
updateAriaExtanded: import("ember-modifier").FunctionBasedModifier<{
|
|
69
|
+
Args: {
|
|
70
|
+
Positional: unknown[];
|
|
71
|
+
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
72
|
+
};
|
|
73
|
+
Element: HTMLElement;
|
|
74
|
+
}>;
|
|
75
|
+
didClose: () => void;
|
|
76
|
+
}
|
|
77
|
+
interface ContentArgs extends Pick<OverlaySignature['Args'], 'onOpen' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition' | 'blockScroll'> {
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
loop: ModifierLike<{
|
|
82
|
+
Element: HTMLElement;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
isOpen: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
toggle: () => void;
|
|
92
|
+
/**
|
|
93
|
+
* @ignore
|
|
94
|
+
*/
|
|
95
|
+
internalDidClose: () => void;
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
preventFocusRestore?: boolean;
|
|
104
|
+
class?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The transition to be used in the Modal.
|
|
107
|
+
*
|
|
108
|
+
* @defaultValue {name: 'overlay-transition--scale'}
|
|
109
|
+
*/
|
|
110
|
+
transition?: OverlaySignature['Args']['transition'];
|
|
111
|
+
/**
|
|
112
|
+
* @defaultValue true
|
|
113
|
+
*/
|
|
114
|
+
disableFocusTrap?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The size of the content.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue 'md'
|
|
119
|
+
*/
|
|
120
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
121
|
+
}
|
|
122
|
+
interface ContentSignature {
|
|
123
|
+
Args: ContentArgs;
|
|
124
|
+
Element: HTMLDivElement;
|
|
125
|
+
Blocks: {
|
|
126
|
+
default: [];
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Component yielded from Popover
|
|
131
|
+
*/
|
|
132
|
+
declare class Content extends Component<ContentSignature> {
|
|
133
|
+
get loop(): ModifierLike<{
|
|
134
|
+
Element: HTMLElement;
|
|
135
|
+
}>;
|
|
136
|
+
get classNames(): string;
|
|
137
|
+
get backdrop(): OverlaySignature['Args']['backdrop'];
|
|
138
|
+
get transition(): {
|
|
139
|
+
didTransitionIn?: () => void;
|
|
140
|
+
didTransitionOut?: () => void;
|
|
141
|
+
enterClass?: string;
|
|
142
|
+
enterActiveClass?: string;
|
|
143
|
+
enterToClass?: string;
|
|
144
|
+
isEnabled?: boolean;
|
|
145
|
+
leaveClass?: string;
|
|
146
|
+
leaveActiveClass?: string;
|
|
147
|
+
leaveToClass?: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
parentSelector?: string;
|
|
150
|
+
};
|
|
151
|
+
get blockScroll(): boolean;
|
|
152
|
+
get disableFocusTrap(): boolean;
|
|
153
|
+
didClose: () => void;
|
|
154
|
+
}
|
|
155
|
+
export { Popover, type PopoverSignature, type ContentSignature };
|
|
156
|
+
export default Popover;
|
|
157
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAW,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAS3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAElF,UAAU,gBAAgB;IACxB,IAAI,EAAE;QACJ;;;;WAIG;QACH,SAAS,CAAC,EACN,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;QAEf,WAAW,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC;QAC9D,UA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EAAE,EAAE,CAAA;KAAE,CAAC;CACzB;AAED;;GAEG;AACH,cAAM,OAAQ,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC/C,IAAI,IAAI;iBA1DsB,WAAW;OAgExC;IAED,IAAI,UAAU,WAGb;IAED,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAEnD;IAED,IAAI,UAAU;;;;;;;;;;;;MAUb;IAED,IAAI,WAAW,YAKd;IAED,IAAI,gBAAgB,YAKnB;IAED,QAAQ,aAQN;CAiBH;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,CAAC;AACjE,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TOC } from '@ember/component/template-only';
|
|
2
|
+
declare const PortalTarget: TOC<{
|
|
3
|
+
Args: {
|
|
4
|
+
/**
|
|
5
|
+
* Target name
|
|
6
|
+
*/
|
|
7
|
+
for?: string;
|
|
8
|
+
};
|
|
9
|
+
Blocks: {
|
|
10
|
+
default: [];
|
|
11
|
+
};
|
|
12
|
+
Element: HTMLElement;
|
|
13
|
+
}>;
|
|
14
|
+
export { PortalTarget };
|
|
15
|
+
export default PortalTarget;
|
|
16
|
+
//# sourceMappingURL=portal-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-target.d.ts","sourceRoot":"","sources":["../../src/components/portal-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAE1D,QAAA,MAAM,YAAY,EAAE,GAAG,CAAC;IACtB,IAAI,EAAE;QACJ;;WAEG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB,CAWC,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
interface PortalSignature {
|
|
3
|
+
Args: {
|
|
4
|
+
/**
|
|
5
|
+
* Whether to render in place or in the specified/default destination
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue false
|
|
8
|
+
*/
|
|
9
|
+
renderInPlace?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The target where to render the portal.
|
|
12
|
+
* There are 3 options: 1) `Element` object, 2) element id, 3) portal target name.
|
|
13
|
+
*
|
|
14
|
+
* For element id, string must be prefixed with `#`.
|
|
15
|
+
* If no value is passee in, we will render to the closest unnamed portal target,
|
|
16
|
+
* parent portal or `document.body`.
|
|
17
|
+
*/
|
|
18
|
+
target?: string | Element;
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue true
|
|
21
|
+
*/
|
|
22
|
+
appendToParentPortal?: boolean;
|
|
23
|
+
};
|
|
24
|
+
Element: HTMLDivElement;
|
|
25
|
+
Blocks: {
|
|
26
|
+
default: [];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
declare function findParentPortal(origin: Element | null): Element | null;
|
|
30
|
+
declare class Portal extends Component<PortalSignature> {
|
|
31
|
+
id: string;
|
|
32
|
+
dom: Document | null;
|
|
33
|
+
get destinationElement(): Element | null;
|
|
34
|
+
get portalMarker(): Element | null;
|
|
35
|
+
needsTarget: (destEl: Element | null) => boolean;
|
|
36
|
+
}
|
|
37
|
+
export { Portal, type PortalSignature, findParentPortal };
|
|
38
|
+
export default Portal;
|
|
39
|
+
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/components/portal.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAiC3C,UAAU,eAAe;IACvB,IAAI,EAAE;QACJ;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAC;QAExB;;;;;;;WAOG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAE1B;;WAEG;QACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;KAChC,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAC;CACzB;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,GAAG,IAAI,CAehE;AA4BD,cAAM,MAAO,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC7C,EAAE,SAAiB;IACnB,GAAG,kBAAgB;IAEnB,IAAI,kBAAkB,IAAI,OAAO,GAAG,IAAI,CA8CvC;IAED,IAAI,YAAY,IAAI,OAAO,GAAG,IAAI,CAOjC;IAED,WAAW,WAAY,OAAO,GAAG,IAAI,KAAG,OAAO,CAU7C;CAsDH;AAED,OAAO,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAE,CAAC;AAC1D,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Overlay } from './components/overlay';
|
|
2
|
+
export { default as Modal } from './components/modal';
|
|
3
|
+
export { default as Drawer } from './components/drawer';
|
|
4
|
+
export * from './components/portal';
|
|
5
|
+
export * from './components/portal-target';
|
|
6
|
+
export * from './components/popover';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare function getDOM(context: object): Document | null;
|
|
2
|
+
declare function getElementById(doc: Document | Element, id: string): null | Element;
|
|
3
|
+
declare function getElementByAttribute(doc: Document | Element, attribute: string, value?: string | undefined): null | Element;
|
|
4
|
+
export { getDOM, getElementById, getElementByAttribute };
|
|
5
|
+
//# sourceMappingURL=portal-D1N7TxUb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-D1N7TxUb.d.ts","sourceRoot":"","sources":["../src/-private/dom.ts"],"names":[],"mappings":"AAEA,iBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAWvD;AAkBD,iBAAgB,cAAc,CAC5B,GAAG,EAAE,QAAQ,GAAG,OAAO,EACvB,EAAE,EAAE,MAAM,GACT,IAAI,GAAG,OAAO,CAEhB;AAED,iBAAgB,qBAAqB,CACnC,GAAG,EAAE,QAAQ,GAAG,OAAO,EACvB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAM,GAAG,SAAqB,GACpC,IAAI,GAAG,OAAO,CA2BhB"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type Overlay from './
|
|
2
|
-
import type Drawer from './components/drawer';
|
|
3
|
-
import type Modal from './components/modal';
|
|
1
|
+
import type { Overlay, Modal, Drawer, Popover } from './index';
|
|
4
2
|
export default interface Registry {
|
|
5
3
|
Overlay: typeof Overlay;
|
|
6
4
|
Drawer: typeof Drawer;
|
|
7
5
|
Modal: typeof Modal;
|
|
6
|
+
Popover: typeof Popover;
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=template-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAE/D,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC/B,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,OAAO,EAAE,OAAO,OAAO,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/overlays/components/backdrop";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@frontile/overlays/components/popover";
|