@frontile/overlays 0.18.0-alpha.1 → 0.18.0-alpha.10
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/backdrop.d.ts +1 -39
- package/declarations/components/drawer/body.d.ts +1 -17
- package/declarations/components/drawer/footer.d.ts +1 -17
- package/declarations/components/drawer/header.d.ts +1 -21
- package/declarations/components/drawer.d.ts +1 -125
- package/declarations/components/modal/body.d.ts +1 -17
- package/declarations/components/modal/footer.d.ts +1 -17
- package/declarations/components/modal/header.d.ts +1 -21
- package/declarations/components/modal.d.ts +1 -124
- package/declarations/components/overlay.d.ts +1 -161
- package/declarations/components/popover.d.ts +1 -165
- package/declarations/components/portal-target.d.ts +1 -15
- package/declarations/components/portal.d.ts +1 -38
- package/declarations/index.d.ts +1 -6
- package/declarations/template-registry.d.ts +1 -7
- package/dist/components/backdrop.js +1 -43
- package/dist/components/backdrop.js.map +1 -1
- package/dist/components/drawer/body.js +1 -17
- package/dist/components/drawer/body.js.map +1 -1
- package/dist/components/drawer/footer.js +1 -17
- package/dist/components/drawer/footer.js.map +1 -1
- package/dist/components/drawer/header.js +1 -17
- package/dist/components/drawer/header.js.map +1 -1
- package/dist/components/drawer.js +1 -60
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/modal/body.js +1 -17
- package/dist/components/modal/body.js.map +1 -1
- package/dist/components/modal/footer.js +1 -17
- package/dist/components/modal/footer.js.map +1 -1
- package/dist/components/modal/header.js +1 -17
- package/dist/components/modal/header.js.map +1 -1
- package/dist/components/modal.js +1 -60
- package/dist/components/modal.js.map +1 -1
- package/dist/components/overlay.js +1 -16
- package/dist/components/overlay.js.map +1 -1
- package/dist/components/popover.js +1 -230
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal-target.js +1 -9
- package/dist/components/portal-target.js.map +1 -1
- package/dist/components/portal.js +1 -8
- package/dist/components/portal.js.map +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -11
|
@@ -1,165 +1 @@
|
|
|
1
|
-
|
|
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' | 'triggerWidth'>;
|
|
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
|
-
triggerWidth?: number;
|
|
58
|
-
get isOpen(): boolean;
|
|
59
|
-
toggle: (event?: Event) => void;
|
|
60
|
-
open: () => void;
|
|
61
|
-
close: () => void;
|
|
62
|
-
trigger: import("ember-modifier").FunctionBasedModifier<{
|
|
63
|
-
Args: {
|
|
64
|
-
Positional: [eventType?: "click" | "hover" | undefined];
|
|
65
|
-
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
66
|
-
};
|
|
67
|
-
Element: HTMLElement;
|
|
68
|
-
}>;
|
|
69
|
-
updateAriaExtanded: import("ember-modifier").FunctionBasedModifier<{
|
|
70
|
-
Args: {
|
|
71
|
-
Positional: unknown[];
|
|
72
|
-
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
73
|
-
};
|
|
74
|
-
Element: HTMLElement;
|
|
75
|
-
}>;
|
|
76
|
-
didClose: () => void;
|
|
77
|
-
}
|
|
78
|
-
interface ContentArgs extends Pick<OverlaySignature['Args'], 'onOpen' | 'didClose' | 'renderInPlace' | 'target' | 'transitionDuration' | 'backdrop' | 'disableTransitions' | 'focusTrapOptions' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'backdropTransition' | 'blockScroll' | 'preventAutoFocus'> {
|
|
79
|
-
/**
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
|
-
loop: ModifierLike<{
|
|
83
|
-
Element: HTMLElement;
|
|
84
|
-
}>;
|
|
85
|
-
/**
|
|
86
|
-
* @internal
|
|
87
|
-
*/
|
|
88
|
-
isOpen: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* @internal
|
|
91
|
-
*/
|
|
92
|
-
toggle: () => void;
|
|
93
|
-
/**
|
|
94
|
-
* @ignore
|
|
95
|
-
*/
|
|
96
|
-
internalDidClose: () => void;
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
id: string;
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
preventFocusRestore?: boolean;
|
|
105
|
-
triggerWidth?: number;
|
|
106
|
-
class?: string;
|
|
107
|
-
/**
|
|
108
|
-
* The transition to be used in the Modal.
|
|
109
|
-
*
|
|
110
|
-
* @defaultValue {name: 'overlay-transition--scale'}
|
|
111
|
-
*/
|
|
112
|
-
transition?: OverlaySignature['Args']['transition'];
|
|
113
|
-
/**
|
|
114
|
-
* @defaultValue true
|
|
115
|
-
*/
|
|
116
|
-
disableFocusTrap?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* The size of the content.
|
|
119
|
-
*
|
|
120
|
-
* @defaultValue 'md'
|
|
121
|
-
*/
|
|
122
|
-
size?: 'sm' | 'md' | 'lg' | 'xl' | 'trigger';
|
|
123
|
-
}
|
|
124
|
-
interface ContentSignature {
|
|
125
|
-
Args: ContentArgs;
|
|
126
|
-
Element: HTMLDivElement;
|
|
127
|
-
Blocks: {
|
|
128
|
-
default: [];
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Component yielded from Popover
|
|
133
|
-
*/
|
|
134
|
-
declare class Content extends Component<ContentSignature> {
|
|
135
|
-
get loop(): ModifierLike<{
|
|
136
|
-
Element: HTMLElement;
|
|
137
|
-
}>;
|
|
138
|
-
get classNames(): string;
|
|
139
|
-
get backdrop(): OverlaySignature['Args']['backdrop'];
|
|
140
|
-
get transition(): {
|
|
141
|
-
didTransitionIn?: () => void;
|
|
142
|
-
didTransitionOut?: () => void;
|
|
143
|
-
enterClass?: string;
|
|
144
|
-
enterActiveClass?: string;
|
|
145
|
-
enterToClass?: string;
|
|
146
|
-
isEnabled?: boolean;
|
|
147
|
-
leaveClass?: string;
|
|
148
|
-
leaveActiveClass?: string;
|
|
149
|
-
leaveToClass?: string;
|
|
150
|
-
name?: string;
|
|
151
|
-
parentSelector?: string;
|
|
152
|
-
};
|
|
153
|
-
get blockScroll(): boolean;
|
|
154
|
-
get disableFocusTrap(): boolean;
|
|
155
|
-
didClose: () => void;
|
|
156
|
-
updateTriggerWidth: import("ember-modifier").FunctionBasedModifier<{
|
|
157
|
-
Args: {
|
|
158
|
-
Positional: unknown[];
|
|
159
|
-
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
160
|
-
};
|
|
161
|
-
Element: HTMLDivElement;
|
|
162
|
-
}>;
|
|
163
|
-
}
|
|
164
|
-
export { Popover, type PopoverSignature, type ContentSignature };
|
|
165
|
-
export default Popover;
|
|
1
|
+
export * from 'frontile/components/overlays/popover';
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
export * from 'frontile/components/overlays/portal-target';
|
|
@@ -1,38 +1 @@
|
|
|
1
|
-
|
|
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 passed 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;
|
|
1
|
+
export * from 'frontile/components/overlays/portal';
|
package/declarations/index.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export
|
|
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';
|
|
1
|
+
export * from 'frontile/overlays';
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default interface Registry {
|
|
3
|
-
Overlay: typeof Overlay;
|
|
4
|
-
Drawer: typeof Drawer;
|
|
5
|
-
Modal: typeof Modal;
|
|
6
|
-
Popover: typeof Popover;
|
|
7
|
-
}
|
|
1
|
+
export type { default } from 'frontile/template-registry';
|
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { cssTransition } from 'ember-css-transitions';
|
|
3
|
-
import { useStyles } from '@frontile/theme';
|
|
4
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
|
-
import { setComponentTemplate } from '@ember/component';
|
|
6
|
-
|
|
7
|
-
class Backdrop extends Component {
|
|
8
|
-
get classNames() {
|
|
9
|
-
const {
|
|
10
|
-
backdrop
|
|
11
|
-
} = useStyles();
|
|
12
|
-
return backdrop({
|
|
13
|
-
class: this.args.class,
|
|
14
|
-
type: this.args.type,
|
|
15
|
-
inPlace: this.args.inPlace
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
get transition() {
|
|
19
|
-
let options = {
|
|
20
|
-
name: 'overlay-transition--fade'
|
|
21
|
-
};
|
|
22
|
-
if (typeof this.args.transition === 'object') {
|
|
23
|
-
return {
|
|
24
|
-
...options,
|
|
25
|
-
...this.args.transition
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return options;
|
|
29
|
-
}
|
|
30
|
-
get isVisible() {
|
|
31
|
-
return this.args.type !== 'none';
|
|
32
|
-
}
|
|
33
|
-
static {
|
|
34
|
-
setComponentTemplate(precompileTemplate("\n {{#if this.isVisible}}\n <div {{cssTransition didTransitionIn=this.transition.didTransitionIn didTransitionOut=this.transition.didTransitionOut enterClass=this.transition.enterClass enterActiveClass=this.transition.enterActiveClass enterToClass=this.transition.enterToClass isEnabled=this.transition.isEnabled leaveClass=this.transition.leaveClass leaveActiveClass=this.transition.leaveActiveClass leaveToClass=this.transition.leaveToClass name=this.transition.name parentSelector=this.transition.parentSelector}} class={{this.classNames}} ...attributes>\n </div>\n {{/if}}\n ", {
|
|
35
|
-
strictMode: true,
|
|
36
|
-
scope: () => ({
|
|
37
|
-
cssTransition
|
|
38
|
-
})
|
|
39
|
-
}), this);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { Backdrop, Backdrop as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/backdrop';
|
|
44
2
|
//# sourceMappingURL=backdrop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop.js","sources":[
|
|
1
|
+
{"version":3,"file":"backdrop.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class DrawerBody extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { DrawerBody as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/drawer/body';
|
|
18
2
|
//# sourceMappingURL=body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":[
|
|
1
|
+
{"version":3,"file":"body.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class DrawerFooter extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { DrawerFooter as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/drawer/footer';
|
|
18
2
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":[
|
|
1
|
+
{"version":3,"file":"footer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class DrawerHeader extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div id={{@labelledById}} class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { DrawerHeader as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/drawer/header';
|
|
18
2
|
//# sourceMappingURL=header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":[
|
|
1
|
+
{"version":3,"file":"header.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,61 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { guidFor } from '@ember/object/internals';
|
|
3
|
-
import { hash } from '@ember/helper';
|
|
4
|
-
import { O as Overlay } from '../overlay-CtCgH4Fk.js';
|
|
5
|
-
import DrawerBody from './drawer/body.js';
|
|
6
|
-
import DrawerFooter from './drawer/footer.js';
|
|
7
|
-
import DrawerHeader from './drawer/header.js';
|
|
8
|
-
import { CloseButton } from '@frontile/buttons';
|
|
9
|
-
import { useStyles } from '@frontile/theme';
|
|
10
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
-
import { setComponentTemplate } from '@ember/component';
|
|
12
|
-
|
|
13
|
-
class Drawer extends Component {
|
|
14
|
-
headerId = `${guidFor(this)}-header`;
|
|
15
|
-
get preventClosing() {
|
|
16
|
-
return this.args.allowClosing === false;
|
|
17
|
-
}
|
|
18
|
-
get showCloseButton() {
|
|
19
|
-
return this.args.allowClosing !== false && this.args.allowCloseButton !== false;
|
|
20
|
-
}
|
|
21
|
-
get placement() {
|
|
22
|
-
return this.args.placement || 'right';
|
|
23
|
-
}
|
|
24
|
-
get classes() {
|
|
25
|
-
const {
|
|
26
|
-
drawer
|
|
27
|
-
} = useStyles();
|
|
28
|
-
return drawer({
|
|
29
|
-
placement: this.placement,
|
|
30
|
-
size: this.args.size || 'md'
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
get transition() {
|
|
34
|
-
let options = {
|
|
35
|
-
name: `overlay-transition--slide-from-${this.placement}`
|
|
36
|
-
};
|
|
37
|
-
if (typeof this.args.transition === 'object') {
|
|
38
|
-
return {
|
|
39
|
-
...options,
|
|
40
|
-
...this.args.transition
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return options;
|
|
44
|
-
}
|
|
45
|
-
static {
|
|
46
|
-
setComponentTemplate(precompileTemplate("\n <Overlay @isOpen={{@isOpen}} @onClose={{@onClose}} @onOpen={{@onOpen}} @didClose={{@didClose}} @renderInPlace={{@renderInPlace}} @target={{@target}} @transitionDuration={{@transitionDuration}} @backdrop={{@backdrop}} @disableTransitions={{@disableTransitions}} @disableFocusTrap={{@disableFocusTrap}} @focusTrapOptions={{@focusTrapOptions}} @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}} @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}} @backdropTransition={{@backdropTransition}} @transition={{this.transition}} @closeOnOverlayElementClick={{true}}>\n <div class={{this.classes.base class=@classes.base}} tabindex=\"0\" role=\"dialog\" aria-labelledby={{this.headerId}} ...attributes>\n {{#if this.showCloseButton}}\n <CloseButton @onPress={{@onClose}} @size={{@closeButtonSize}} @class={{this.classes.closeButton class=@classes.closeButton}} />\n {{/if}}\n\n {{yield (hash CloseButton=(component CloseButton onPress=@onClose class=(this.classes.closeButton class=@classes.closeButton)) Header=(component DrawerHeader labelledById=this.headerId classFromParent=(this.classes.header class=@classes.header)) Body=(component DrawerBody placement=this.placement classFromParent=(this.classes.body class=@classes.body)) Footer=(component DrawerFooter placement=this.placement classFromParent=(this.classes.footer class=@classes.footer)) headerId=this.headerId)}}\n </div>\n </Overlay>\n ", {
|
|
47
|
-
strictMode: true,
|
|
48
|
-
scope: () => ({
|
|
49
|
-
Overlay,
|
|
50
|
-
CloseButton,
|
|
51
|
-
hash,
|
|
52
|
-
DrawerHeader,
|
|
53
|
-
DrawerBody,
|
|
54
|
-
DrawerFooter
|
|
55
|
-
})
|
|
56
|
-
}), this);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { Drawer as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/drawer';
|
|
61
2
|
//# sourceMappingURL=drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sources":[
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class ModalBody extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { ModalBody as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/modal/body';
|
|
18
2
|
//# sourceMappingURL=body.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":[
|
|
1
|
+
{"version":3,"file":"body.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class ModalFooter extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { ModalFooter as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/modal/footer';
|
|
18
2
|
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":[
|
|
1
|
+
{"version":3,"file":"footer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { twMerge } from '@frontile/theme';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
class ModalHeader extends Component {
|
|
7
|
-
static {
|
|
8
|
-
setComponentTemplate(precompileTemplate("\n <div id={{@labelledById}} class={{twMerge @classFromParent @class}} ...attributes>\n {{yield}}\n </div>\n ", {
|
|
9
|
-
strictMode: true,
|
|
10
|
-
scope: () => ({
|
|
11
|
-
twMerge
|
|
12
|
-
})
|
|
13
|
-
}), this);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { ModalHeader as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/modal/header';
|
|
18
2
|
//# sourceMappingURL=header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":[
|
|
1
|
+
{"version":3,"file":"header.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/components/modal.js
CHANGED
|
@@ -1,61 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { guidFor } from '@ember/object/internals';
|
|
3
|
-
import { hash } from '@ember/helper';
|
|
4
|
-
import { O as Overlay } from '../overlay-CtCgH4Fk.js';
|
|
5
|
-
import ModalFooter from './modal/footer.js';
|
|
6
|
-
import ModalBody from './modal/body.js';
|
|
7
|
-
import ModalHeader from './modal/header.js';
|
|
8
|
-
import { CloseButton } from '@frontile/buttons';
|
|
9
|
-
import { useStyles } from '@frontile/theme';
|
|
10
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
11
|
-
import { setComponentTemplate } from '@ember/component';
|
|
12
|
-
|
|
13
|
-
class Modal extends Component {
|
|
14
|
-
headerId = `${guidFor(this)}-header`;
|
|
15
|
-
get preventClosing() {
|
|
16
|
-
return this.args.allowClosing === false;
|
|
17
|
-
}
|
|
18
|
-
get showCloseButton() {
|
|
19
|
-
return this.args.allowClosing !== false && this.args.allowCloseButton !== false;
|
|
20
|
-
}
|
|
21
|
-
get size() {
|
|
22
|
-
return this.args.size || 'lg';
|
|
23
|
-
}
|
|
24
|
-
get classes() {
|
|
25
|
-
const {
|
|
26
|
-
modal
|
|
27
|
-
} = useStyles();
|
|
28
|
-
return modal({
|
|
29
|
-
size: this.size,
|
|
30
|
-
isCentered: this.args.isCentered
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
get transition() {
|
|
34
|
-
let options = {
|
|
35
|
-
name: 'overlay-transition--zoom'
|
|
36
|
-
};
|
|
37
|
-
if (typeof this.args.transition === 'object') {
|
|
38
|
-
return {
|
|
39
|
-
...options,
|
|
40
|
-
...this.args.transition
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return options;
|
|
44
|
-
}
|
|
45
|
-
static {
|
|
46
|
-
setComponentTemplate(precompileTemplate("\n <Overlay @isOpen={{@isOpen}} @onClose={{@onClose}} @onOpen={{@onOpen}} @didClose={{@didClose}} @renderInPlace={{@renderInPlace}} @target={{@target}} @transitionDuration={{@transitionDuration}} @backdrop={{@backdrop}} @disableTransitions={{@disableTransitions}} @disableFocusTrap={{@disableFocusTrap}} @focusTrapOptions={{@focusTrapOptions}} @closeOnOutsideClick={{if this.preventClosing false @closeOnOutsideClick}} @closeOnEscapeKey={{if this.preventClosing false @closeOnEscapeKey}} @backdropTransition={{@backdropTransition}} @transition={{this.transition}} @closeOnOverlayElementClick={{true}}>\n <div class={{this.classes.base class=@classes.base}} tabindex=\"0\" role=\"dialog\" aria-labelledby={{this.headerId}} ...attributes>\n {{#if this.showCloseButton}}\n <CloseButton @onPress={{@onClose}} @size={{@closeButtonSize}} @class={{this.classes.closeButton class=@classes.closeButton}} />\n {{/if}}\n\n {{yield (hash CloseButton=(component CloseButton onPress=@onClose class=(this.classes.closeButton class=@classes.closeButton)) Header=(component ModalHeader labelledById=this.headerId classFromParent=(this.classes.header class=@classes.header)) Body=(component ModalBody classFromParent=(this.classes.body class=@classes.body)) Footer=(component ModalFooter classFromParent=(this.classes.footer class=@classes.footer)) headerId=this.headerId)}}\n </div>\n </Overlay>\n ", {
|
|
47
|
-
strictMode: true,
|
|
48
|
-
scope: () => ({
|
|
49
|
-
Overlay,
|
|
50
|
-
CloseButton,
|
|
51
|
-
hash,
|
|
52
|
-
ModalHeader,
|
|
53
|
-
ModalBody,
|
|
54
|
-
ModalFooter
|
|
55
|
-
})
|
|
56
|
-
}), this);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { Modal as default };
|
|
1
|
+
export { default } from 'frontile/components/overlays/modal';
|
|
61
2
|
//# sourceMappingURL=modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":[
|
|
1
|
+
{"version":3,"file":"modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|