@frame-ui-ng/components 0.3.0-beta.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/src/styles/button.css +5 -1
- package/button-group/src/styles/button-group.css +6 -0
- package/confirm-popover/src/styles/confirm-popover.css +20 -0
- package/drag-drop/src/styles/_vars.css +28 -0
- package/drag-drop/src/styles/drag-drop.css +132 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs +26 -21
- package/fesm2022/frame-ui-ng-components-accordion.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-alert.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-avatar.mjs +7 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-badge.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs +13 -6
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-button-group.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-button.mjs +5 -0
- package/fesm2022/frame-ui-ng-components-button.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-calendar.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-card.mjs +15 -15
- package/fesm2022/frame-ui-ng-components-card.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-carousel.mjs +33 -16
- package/fesm2022/frame-ui-ng-components-carousel.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-checkbox.mjs +7 -9
- package/fesm2022/frame-ui-ng-components-checkbox.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-collapsible.mjs +24 -23
- package/fesm2022/frame-ui-ng-components-collapsible.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-combobox.mjs +113 -68
- package/fesm2022/frame-ui-ng-components-combobox.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-command.mjs +47 -16
- package/fesm2022/frame-ui-ng-components-command.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-confirm-modal.mjs +165 -0
- package/fesm2022/frame-ui-ng-components-confirm-modal.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-confirm-popover.mjs +423 -0
- package/fesm2022/frame-ui-ng-components-confirm-popover.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs +71 -45
- package/fesm2022/frame-ui-ng-components-context-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-date-picker.mjs +3 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-drag-drop.mjs +293 -0
- package/fesm2022/frame-ui-ng-components-drag-drop.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs +74 -37
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-empty.mjs +6 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-field.mjs +21 -12
- package/fesm2022/frame-ui-ng-components-field.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-forms.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-hover-card.mjs +49 -43
- package/fesm2022/frame-ui-ng-components-hover-card.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-input-otp.mjs +69 -69
- package/fesm2022/frame-ui-ng-components-input-otp.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-input.mjs +13 -0
- package/fesm2022/frame-ui-ng-components-input.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-item.mjs +10 -0
- package/fesm2022/frame-ui-ng-components-item.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-menubar.mjs +15 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-modal.mjs +221 -129
- package/fesm2022/frame-ui-ng-components-modal.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs +14 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-pagination.mjs +45 -36
- package/fesm2022/frame-ui-ng-components-pagination.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-popover.mjs +63 -51
- package/fesm2022/frame-ui-ng-components-popover.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-progress.mjs +4 -1
- package/fesm2022/frame-ui-ng-components-progress.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-radio-group.mjs +5 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-resizable.mjs +22 -26
- package/fesm2022/frame-ui-ng-components-resizable.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-select.mjs +62 -14
- package/fesm2022/frame-ui-ng-components-select.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-separator.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-sheet.mjs +118 -104
- package/fesm2022/frame-ui-ng-components-sheet.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-sidebar.mjs +45 -24
- package/fesm2022/frame-ui-ng-components-sidebar.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-skeleton.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-slider.mjs +82 -75
- package/fesm2022/frame-ui-ng-components-slider.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-spinner.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-switch.mjs +6 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-table.mjs +76 -50
- package/fesm2022/frame-ui-ng-components-table.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-tabs.mjs +4 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-textarea.mjs +1 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-toast.mjs +2 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-toggle.mjs +23 -16
- package/fesm2022/frame-ui-ng-components-toggle.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-tooltip.mjs +74 -25
- package/fesm2022/frame-ui-ng-components-tooltip.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components-utils.mjs +20 -0
- package/fesm2022/frame-ui-ng-components-utils.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs +36 -20
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs.map +1 -1
- package/fesm2022/frame-ui-ng-components.mjs +1737 -845
- package/fesm2022/frame-ui-ng-components.mjs.map +1 -1
- package/item/src/styles/item.css +188 -187
- package/modal/src/styles/modal.css +10 -1
- package/package.json +18 -2
- package/popover/src/styles/popover.css +106 -101
- package/sidebar/src/styles/sidebar.css +10 -4
- package/src/styles/blueprint.css +98 -0
- package/src/styles/components.css +2 -0
- package/styles/blueprint.css +98 -0
- package/styles/components.css +2 -0
- package/styles.css +2 -0
- package/tooltip/src/styles/tooltip.css +4 -4
- package/types/frame-ui-ng-components-accordion.d.ts +11 -4
- package/types/frame-ui-ng-components-alert.d.ts +4 -0
- package/types/frame-ui-ng-components-avatar.d.ts +7 -0
- package/types/frame-ui-ng-components-badge.d.ts +4 -0
- package/types/frame-ui-ng-components-breadcrumb.d.ts +7 -0
- package/types/frame-ui-ng-components-button-group.d.ts +1 -0
- package/types/frame-ui-ng-components-button.d.ts +5 -0
- package/types/frame-ui-ng-components-calendar.d.ts +1 -0
- package/types/frame-ui-ng-components-card.d.ts +8 -3
- package/types/frame-ui-ng-components-carousel.d.ts +11 -2
- package/types/frame-ui-ng-components-checkbox.d.ts +3 -2
- package/types/frame-ui-ng-components-collapsible.d.ts +9 -4
- package/types/frame-ui-ng-components-combobox.d.ts +33 -4
- package/types/frame-ui-ng-components-command.d.ts +26 -4
- package/types/frame-ui-ng-components-confirm-modal.d.ts +50 -0
- package/types/frame-ui-ng-components-confirm-popover.d.ts +87 -0
- package/types/frame-ui-ng-components-context-menu.d.ts +29 -10
- package/types/frame-ui-ng-components-date-picker.d.ts +1 -0
- package/types/frame-ui-ng-components-drag-drop.d.ts +103 -0
- package/types/frame-ui-ng-components-dropdown-menu.d.ts +32 -9
- package/types/frame-ui-ng-components-empty.d.ts +6 -0
- package/types/frame-ui-ng-components-field.d.ts +9 -0
- package/types/frame-ui-ng-components-forms.d.ts +1 -0
- package/types/frame-ui-ng-components-hover-card.d.ts +8 -2
- package/types/frame-ui-ng-components-input-otp.d.ts +5 -1
- package/types/frame-ui-ng-components-input.d.ts +13 -0
- package/types/frame-ui-ng-components-item.d.ts +10 -0
- package/types/frame-ui-ng-components-menubar.d.ts +15 -0
- package/types/frame-ui-ng-components-modal.d.ts +30 -7
- package/types/frame-ui-ng-components-navigation-menu.d.ts +14 -0
- package/types/frame-ui-ng-components-pagination.d.ts +8 -0
- package/types/frame-ui-ng-components-popover.d.ts +14 -2
- package/types/frame-ui-ng-components-progress.d.ts +2 -0
- package/types/frame-ui-ng-components-radio-group.d.ts +5 -0
- package/types/frame-ui-ng-components-resizable.d.ts +3 -0
- package/types/frame-ui-ng-components-select.d.ts +23 -2
- package/types/frame-ui-ng-components-separator.d.ts +1 -0
- package/types/frame-ui-ng-components-sheet.d.ts +13 -0
- package/types/frame-ui-ng-components-sidebar.d.ts +23 -2
- package/types/frame-ui-ng-components-skeleton.d.ts +1 -0
- package/types/frame-ui-ng-components-slider.d.ts +5 -2
- package/types/frame-ui-ng-components-spinner.d.ts +1 -0
- package/types/frame-ui-ng-components-switch.d.ts +6 -0
- package/types/frame-ui-ng-components-table.d.ts +26 -0
- package/types/frame-ui-ng-components-tabs.d.ts +4 -0
- package/types/frame-ui-ng-components-textarea.d.ts +1 -0
- package/types/frame-ui-ng-components-toast.d.ts +2 -0
- package/types/frame-ui-ng-components-toggle.d.ts +8 -2
- package/types/frame-ui-ng-components-tooltip.d.ts +11 -2
- package/types/frame-ui-ng-components-utils.d.ts +5 -0
- package/types/frame-ui-ng-components-virtual-scroll.d.ts +11 -2
- package/types/frame-ui-ng-components.d.ts +525 -96
|
@@ -5,6 +5,7 @@ import { NgComponentOutlet } from '@angular/common';
|
|
|
5
5
|
import { FrButton, FrButtonLabel } from '@frame-ui-ng/components/button';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
7
|
|
|
8
|
+
/** Content slot for modal. */
|
|
8
9
|
class FrModalContent {
|
|
9
10
|
templateRef = inject((TemplateRef));
|
|
10
11
|
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
@@ -57,6 +58,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
57
58
|
}]
|
|
58
59
|
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], backdropClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], closeOnDestroy: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnDestroy", required: false }] }], closeOnNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnNavigation", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], disableClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableClose", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
|
|
59
60
|
|
|
61
|
+
/** Close control for modal. */
|
|
60
62
|
class FrModalClose {
|
|
61
63
|
dialogRef = inject(DialogRef, { optional: true });
|
|
62
64
|
result = input(undefined, { ...(ngDevMode ? { debugName: "result" } : /* istanbul ignore next */ {}), alias: 'frModalClose' });
|
|
@@ -76,24 +78,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
76
78
|
},
|
|
77
79
|
}]
|
|
78
80
|
}], propDecorators: { result: [{ type: i0.Input, args: [{ isSignal: true, alias: "frModalClose", required: false }] }] } });
|
|
81
|
+
/** Panel slot for modal. */
|
|
79
82
|
class FrModalPanel {
|
|
80
83
|
scrollable = input(false, { ...(ngDevMode ? { debugName: "scrollable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
81
84
|
showCloseButton = input(true, { ...(ngDevMode ? { debugName: "showCloseButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
82
85
|
size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
83
86
|
stickyFooter = input(false, { ...(ngDevMode ? { debugName: "stickyFooter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
84
87
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FrModalPanel, isStandalone: true, selector: "[frModalPanel], frame-modal-panel", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, stickyFooter: { classPropertyName: "stickyFooter", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-scrollable": "scrollable() ? \"\" : null", "attr.data-sticky-footer": "stickyFooter() ? \"\" : null", "attr.data-size": "size()" }, classAttribute: "frame-modal__panel" }, ngImport: i0, template: `
|
|
86
|
-
<ng-content />
|
|
87
|
-
@if (showCloseButton()) {
|
|
88
|
-
<button
|
|
89
|
-
class="frame-modal__close"
|
|
90
|
-
frModalClose
|
|
91
|
-
type="button"
|
|
92
|
-
aria-label="Close dialog"
|
|
93
|
-
>
|
|
94
|
-
<span aria-hidden="true">×</span>
|
|
95
|
-
</button>
|
|
96
|
-
}
|
|
88
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FrModalPanel, isStandalone: true, selector: "[frModalPanel], frame-modal-panel", inputs: { scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, stickyFooter: { classPropertyName: "stickyFooter", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-scrollable": "scrollable() ? \"\" : null", "attr.data-sticky-footer": "stickyFooter() ? \"\" : null", "attr.data-size": "size()" }, classAttribute: "frame-modal__panel" }, ngImport: i0, template: `
|
|
89
|
+
<ng-content />
|
|
90
|
+
@if (showCloseButton()) {
|
|
91
|
+
<button
|
|
92
|
+
class="frame-modal__close"
|
|
93
|
+
frModalClose
|
|
94
|
+
type="button"
|
|
95
|
+
aria-label="Close dialog"
|
|
96
|
+
>
|
|
97
|
+
<span aria-hidden="true">×</span>
|
|
98
|
+
</button>
|
|
99
|
+
}
|
|
97
100
|
`, isInline: true, dependencies: [{ kind: "directive", type: FrModalClose, selector: "[frModalClose]", inputs: ["frModalClose"] }] });
|
|
98
101
|
}
|
|
99
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalPanel, decorators: [{
|
|
@@ -106,22 +109,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
106
109
|
'[attr.data-sticky-footer]': 'stickyFooter() ? "" : null',
|
|
107
110
|
'[attr.data-size]': 'size()',
|
|
108
111
|
},
|
|
109
|
-
template: `
|
|
110
|
-
<ng-content />
|
|
111
|
-
@if (showCloseButton()) {
|
|
112
|
-
<button
|
|
113
|
-
class="frame-modal__close"
|
|
114
|
-
frModalClose
|
|
115
|
-
type="button"
|
|
116
|
-
aria-label="Close dialog"
|
|
117
|
-
>
|
|
118
|
-
<span aria-hidden="true">×</span>
|
|
119
|
-
</button>
|
|
120
|
-
}
|
|
112
|
+
template: `
|
|
113
|
+
<ng-content />
|
|
114
|
+
@if (showCloseButton()) {
|
|
115
|
+
<button
|
|
116
|
+
class="frame-modal__close"
|
|
117
|
+
frModalClose
|
|
118
|
+
type="button"
|
|
119
|
+
aria-label="Close dialog"
|
|
120
|
+
>
|
|
121
|
+
<span aria-hidden="true">×</span>
|
|
122
|
+
</button>
|
|
123
|
+
}
|
|
121
124
|
`,
|
|
122
125
|
imports: [FrModalClose],
|
|
123
126
|
}]
|
|
124
127
|
}], propDecorators: { scrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollable", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], stickyFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyFooter", required: false }] }] } });
|
|
128
|
+
/** Header slot for modal. */
|
|
125
129
|
class FrModalHeader {
|
|
126
130
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
131
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrModalHeader, isStandalone: true, selector: "[frModalHeader], frame-modal-header", host: { classAttribute: "frame-modal__header" }, ngImport: i0 });
|
|
@@ -135,6 +139,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
135
139
|
},
|
|
136
140
|
}]
|
|
137
141
|
}] });
|
|
142
|
+
/** Body slot for modal. */
|
|
138
143
|
class FrModalBody {
|
|
139
144
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
140
145
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrModalBody, isStandalone: true, selector: "[frModalBody], frame-modal-body", host: { classAttribute: "frame-modal__body" }, ngImport: i0 });
|
|
@@ -148,6 +153,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
148
153
|
},
|
|
149
154
|
}]
|
|
150
155
|
}] });
|
|
156
|
+
/** Footer slot for modal. */
|
|
151
157
|
class FrModalFooter {
|
|
152
158
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
153
159
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrModalFooter, isStandalone: true, selector: "[frModalFooter], frame-modal-footer", host: { classAttribute: "frame-modal__footer" }, ngImport: i0 });
|
|
@@ -161,6 +167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
161
167
|
},
|
|
162
168
|
}]
|
|
163
169
|
}] });
|
|
170
|
+
/** Title slot for modal. */
|
|
164
171
|
class FrModalTitle {
|
|
165
172
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
166
173
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrModalTitle, isStandalone: true, selector: "[frModalTitle], frame-modal-title", host: { classAttribute: "frame-modal__title" }, ngImport: i0 });
|
|
@@ -174,6 +181,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
174
181
|
},
|
|
175
182
|
}]
|
|
176
183
|
}] });
|
|
184
|
+
/** Description slot for modal. */
|
|
177
185
|
class FrModalDescription {
|
|
178
186
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
179
187
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrModalDescription, isStandalone: true, selector: "[frModalDescription], frame-modal-description", host: { classAttribute: "frame-modal__description" }, ngImport: i0 });
|
|
@@ -188,8 +196,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
188
196
|
}]
|
|
189
197
|
}] });
|
|
190
198
|
|
|
199
|
+
/** Reference handle for an opened modal. */
|
|
200
|
+
class FrModalRef extends DialogRef {
|
|
201
|
+
}
|
|
202
|
+
|
|
191
203
|
const FR_MODAL_DATA = DIALOG_DATA;
|
|
204
|
+
const FR_MODAL_REF = FrModalRef;
|
|
192
205
|
|
|
206
|
+
/** Default shell for modal content, title, and footer actions. */
|
|
193
207
|
class FrModalShell {
|
|
194
208
|
dialogRef = inject((DialogRef));
|
|
195
209
|
injector = inject(Injector);
|
|
@@ -209,51 +223,51 @@ class FrModalShell {
|
|
|
209
223
|
}
|
|
210
224
|
}
|
|
211
225
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalShell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
212
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FrModalShell, isStandalone: true, selector: "frame-modal-shell", ngImport: i0, template: `
|
|
213
|
-
<div
|
|
214
|
-
frModalPanel
|
|
215
|
-
[size]="options.size ?? 'md'"
|
|
216
|
-
[showCloseButton]="options.showCloseButton ?? true"
|
|
217
|
-
[scrollable]="options.scrollable ?? false"
|
|
218
|
-
[stickyFooter]="options.stickyFooter ?? false"
|
|
219
|
-
>
|
|
220
|
-
@if (options.title || options.description) {
|
|
221
|
-
<div frModalHeader>
|
|
222
|
-
@if (options.title) {
|
|
223
|
-
<h2 frModalTitle>{{ options.title }}</h2>
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
@if (options.description) {
|
|
227
|
-
<p frModalDescription>{{ options.description }}</p>
|
|
228
|
-
}
|
|
229
|
-
</div>
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
<div frModalBody>
|
|
233
|
-
<ng-container
|
|
234
|
-
[ngComponentOutlet]="options.bodyComponent"
|
|
235
|
-
[ngComponentOutletInputs]="options.bodyInputs ?? {}"
|
|
236
|
-
[ngComponentOutletInjector]="bodyInjector"
|
|
237
|
-
/>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
@if (options.footerActions?.length) {
|
|
241
|
-
<div frModalFooter>
|
|
242
|
-
@for (action of options.footerActions; track action.label) {
|
|
243
|
-
<button
|
|
244
|
-
frButton
|
|
245
|
-
type="button"
|
|
246
|
-
[appearance]="action.appearance ?? 'primary'"
|
|
247
|
-
[disabled]="action.disabled ?? false"
|
|
248
|
-
[attr.aria-label]="action.ariaLabel ?? null"
|
|
249
|
-
(click)="handleAction(action)"
|
|
250
|
-
>
|
|
251
|
-
<span frButtonLabel>{{ action.label }}</span>
|
|
252
|
-
</button>
|
|
253
|
-
}
|
|
254
|
-
</div>
|
|
255
|
-
}
|
|
256
|
-
</div>
|
|
226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.16", type: FrModalShell, isStandalone: true, selector: "frame-modal-shell", ngImport: i0, template: `
|
|
227
|
+
<div
|
|
228
|
+
frModalPanel
|
|
229
|
+
[size]="options.size ?? 'md'"
|
|
230
|
+
[showCloseButton]="options.showCloseButton ?? true"
|
|
231
|
+
[scrollable]="options.scrollable ?? false"
|
|
232
|
+
[stickyFooter]="options.stickyFooter ?? false"
|
|
233
|
+
>
|
|
234
|
+
@if (options.title || options.description) {
|
|
235
|
+
<div frModalHeader>
|
|
236
|
+
@if (options.title) {
|
|
237
|
+
<h2 frModalTitle>{{ options.title }}</h2>
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@if (options.description) {
|
|
241
|
+
<p frModalDescription>{{ options.description }}</p>
|
|
242
|
+
}
|
|
243
|
+
</div>
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
<div frModalBody>
|
|
247
|
+
<ng-container
|
|
248
|
+
[ngComponentOutlet]="options.bodyComponent"
|
|
249
|
+
[ngComponentOutletInputs]="options.bodyInputs ?? {}"
|
|
250
|
+
[ngComponentOutletInjector]="bodyInjector"
|
|
251
|
+
/>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
@if (options.footerActions?.length) {
|
|
255
|
+
<div frModalFooter>
|
|
256
|
+
@for (action of options.footerActions; track action.label) {
|
|
257
|
+
<button
|
|
258
|
+
frButton
|
|
259
|
+
type="button"
|
|
260
|
+
[appearance]="action.appearance ?? 'primary'"
|
|
261
|
+
[disabled]="action.disabled ?? false"
|
|
262
|
+
[attr.aria-label]="action.ariaLabel ?? null"
|
|
263
|
+
(click)="handleAction(action)"
|
|
264
|
+
>
|
|
265
|
+
<span frButtonLabel>{{ action.label }}</span>
|
|
266
|
+
</button>
|
|
267
|
+
}
|
|
268
|
+
</div>
|
|
269
|
+
}
|
|
270
|
+
</div>
|
|
257
271
|
`, isInline: true, dependencies: [{ kind: "directive", type: FrButton, selector: "a[frButton], button[frButton]", inputs: ["appearance", "disabled", "loading", "loadingDisplay", "radius", "size"] }, { kind: "directive", type: FrButtonLabel, selector: "[frButtonLabel]" }, { kind: "directive", type: FrModalBody, selector: "[frModalBody], frame-modal-body" }, { kind: "directive", type: FrModalDescription, selector: "[frModalDescription], frame-modal-description" }, { kind: "directive", type: FrModalFooter, selector: "[frModalFooter], frame-modal-footer" }, { kind: "directive", type: FrModalHeader, selector: "[frModalHeader], frame-modal-header" }, { kind: "component", type: FrModalPanel, selector: "[frModalPanel], frame-modal-panel", inputs: ["scrollable", "showCloseButton", "size", "stickyFooter"] }, { kind: "directive", type: FrModalTitle, selector: "[frModalTitle], frame-modal-title" }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }] });
|
|
258
272
|
}
|
|
259
273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalShell, decorators: [{
|
|
@@ -271,79 +285,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
271
285
|
FrModalTitle,
|
|
272
286
|
NgComponentOutlet,
|
|
273
287
|
],
|
|
274
|
-
template: `
|
|
275
|
-
<div
|
|
276
|
-
frModalPanel
|
|
277
|
-
[size]="options.size ?? 'md'"
|
|
278
|
-
[showCloseButton]="options.showCloseButton ?? true"
|
|
279
|
-
[scrollable]="options.scrollable ?? false"
|
|
280
|
-
[stickyFooter]="options.stickyFooter ?? false"
|
|
281
|
-
>
|
|
282
|
-
@if (options.title || options.description) {
|
|
283
|
-
<div frModalHeader>
|
|
284
|
-
@if (options.title) {
|
|
285
|
-
<h2 frModalTitle>{{ options.title }}</h2>
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
@if (options.description) {
|
|
289
|
-
<p frModalDescription>{{ options.description }}</p>
|
|
290
|
-
}
|
|
291
|
-
</div>
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
<div frModalBody>
|
|
295
|
-
<ng-container
|
|
296
|
-
[ngComponentOutlet]="options.bodyComponent"
|
|
297
|
-
[ngComponentOutletInputs]="options.bodyInputs ?? {}"
|
|
298
|
-
[ngComponentOutletInjector]="bodyInjector"
|
|
299
|
-
/>
|
|
300
|
-
</div>
|
|
301
|
-
|
|
302
|
-
@if (options.footerActions?.length) {
|
|
303
|
-
<div frModalFooter>
|
|
304
|
-
@for (action of options.footerActions; track action.label) {
|
|
305
|
-
<button
|
|
306
|
-
frButton
|
|
307
|
-
type="button"
|
|
308
|
-
[appearance]="action.appearance ?? 'primary'"
|
|
309
|
-
[disabled]="action.disabled ?? false"
|
|
310
|
-
[attr.aria-label]="action.ariaLabel ?? null"
|
|
311
|
-
(click)="handleAction(action)"
|
|
312
|
-
>
|
|
313
|
-
<span frButtonLabel>{{ action.label }}</span>
|
|
314
|
-
</button>
|
|
315
|
-
}
|
|
316
|
-
</div>
|
|
317
|
-
}
|
|
318
|
-
</div>
|
|
288
|
+
template: `
|
|
289
|
+
<div
|
|
290
|
+
frModalPanel
|
|
291
|
+
[size]="options.size ?? 'md'"
|
|
292
|
+
[showCloseButton]="options.showCloseButton ?? true"
|
|
293
|
+
[scrollable]="options.scrollable ?? false"
|
|
294
|
+
[stickyFooter]="options.stickyFooter ?? false"
|
|
295
|
+
>
|
|
296
|
+
@if (options.title || options.description) {
|
|
297
|
+
<div frModalHeader>
|
|
298
|
+
@if (options.title) {
|
|
299
|
+
<h2 frModalTitle>{{ options.title }}</h2>
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@if (options.description) {
|
|
303
|
+
<p frModalDescription>{{ options.description }}</p>
|
|
304
|
+
}
|
|
305
|
+
</div>
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
<div frModalBody>
|
|
309
|
+
<ng-container
|
|
310
|
+
[ngComponentOutlet]="options.bodyComponent"
|
|
311
|
+
[ngComponentOutletInputs]="options.bodyInputs ?? {}"
|
|
312
|
+
[ngComponentOutletInjector]="bodyInjector"
|
|
313
|
+
/>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
@if (options.footerActions?.length) {
|
|
317
|
+
<div frModalFooter>
|
|
318
|
+
@for (action of options.footerActions; track action.label) {
|
|
319
|
+
<button
|
|
320
|
+
frButton
|
|
321
|
+
type="button"
|
|
322
|
+
[appearance]="action.appearance ?? 'primary'"
|
|
323
|
+
[disabled]="action.disabled ?? false"
|
|
324
|
+
[attr.aria-label]="action.ariaLabel ?? null"
|
|
325
|
+
(click)="handleAction(action)"
|
|
326
|
+
>
|
|
327
|
+
<span frButtonLabel>{{ action.label }}</span>
|
|
328
|
+
</button>
|
|
329
|
+
}
|
|
330
|
+
</div>
|
|
331
|
+
}
|
|
332
|
+
</div>
|
|
319
333
|
`,
|
|
320
334
|
}]
|
|
321
335
|
}] });
|
|
322
336
|
|
|
323
337
|
const DEFAULT_PANEL_CLASS = 'frame-modal__overlay-pane';
|
|
324
338
|
const DEFAULT_BACKDROP_CLASS = 'frame-modal__backdrop';
|
|
339
|
+
/** Service for opening modal dialogs. */
|
|
325
340
|
class FrModalService {
|
|
326
341
|
dialog = inject(Dialog);
|
|
327
|
-
open(content, config
|
|
328
|
-
|
|
342
|
+
open(content, dataOrConfig, config) {
|
|
343
|
+
const resolvedConfig = resolveOpenConfig(content, dataOrConfig, config);
|
|
344
|
+
if (isComponentType(content) && hasShellOptions(resolvedConfig)) {
|
|
329
345
|
const shellConfig = {
|
|
330
|
-
...withoutShellOptions(
|
|
346
|
+
...withoutShellOptions(resolvedConfig),
|
|
331
347
|
data: {
|
|
332
348
|
bodyComponent: content,
|
|
333
|
-
bodyData:
|
|
334
|
-
bodyInputs:
|
|
335
|
-
description:
|
|
336
|
-
footerActions:
|
|
337
|
-
scrollable:
|
|
338
|
-
showCloseButton:
|
|
339
|
-
size:
|
|
340
|
-
stickyFooter:
|
|
341
|
-
title:
|
|
349
|
+
bodyData: resolvedConfig.bodyData ?? resolvedConfig.data,
|
|
350
|
+
bodyInputs: resolvedConfig.inputs ?? resolvedConfig.bodyInputs,
|
|
351
|
+
description: resolvedConfig.description,
|
|
352
|
+
footerActions: resolvedConfig.footerActions,
|
|
353
|
+
scrollable: resolvedConfig.scrollable,
|
|
354
|
+
showCloseButton: resolvedConfig.showCloseButton,
|
|
355
|
+
size: resolvedConfig.size,
|
|
356
|
+
stickyFooter: resolvedConfig.stickyFooter,
|
|
357
|
+
title: resolvedConfig.title,
|
|
342
358
|
},
|
|
343
359
|
};
|
|
344
360
|
return this.dialog.open(FrModalShell, this.withDefaultClasses(shellConfig));
|
|
345
361
|
}
|
|
346
|
-
return this.dialog.open(content, this.withDefaultClasses(
|
|
362
|
+
return this.dialog.open(content, this.withDefaultClasses(resolvedConfig));
|
|
347
363
|
}
|
|
348
364
|
closeAll() {
|
|
349
365
|
this.dialog.closeAll();
|
|
@@ -357,6 +373,7 @@ class FrModalService {
|
|
|
357
373
|
...config,
|
|
358
374
|
panelClass: mergeClassList(config.panelClass, DEFAULT_PANEL_CLASS),
|
|
359
375
|
backdropClass: mergeClassList(config.backdropClass, DEFAULT_BACKDROP_CLASS),
|
|
376
|
+
providers: withModalRefProvider(config.providers),
|
|
360
377
|
};
|
|
361
378
|
}
|
|
362
379
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -375,6 +392,7 @@ function hasShellOptions(config) {
|
|
|
375
392
|
config.bodyInputs,
|
|
376
393
|
config.description,
|
|
377
394
|
config.footerActions,
|
|
395
|
+
config.inputs,
|
|
378
396
|
config.scrollable,
|
|
379
397
|
config.showCloseButton,
|
|
380
398
|
config.size,
|
|
@@ -383,9 +401,72 @@ function hasShellOptions(config) {
|
|
|
383
401
|
].some((value) => value !== undefined);
|
|
384
402
|
}
|
|
385
403
|
function withoutShellOptions(config) {
|
|
386
|
-
const { bodyData: _bodyData, bodyInputs: _bodyInputs, description: _description, footerActions: _footerActions, scrollable: _scrollable, showCloseButton: _showCloseButton, size: _size, stickyFooter: _stickyFooter, title: _title, ...dialogConfig } = config;
|
|
404
|
+
const { bodyData: _bodyData, bodyInputs: _bodyInputs, description: _description, footerActions: _footerActions, inputs: _inputs, scrollable: _scrollable, showCloseButton: _showCloseButton, size: _size, stickyFooter: _stickyFooter, title: _title, ...dialogConfig } = config;
|
|
387
405
|
return dialogConfig;
|
|
388
406
|
}
|
|
407
|
+
function resolveOpenConfig(content, dataOrConfig, config) {
|
|
408
|
+
if (!isComponentType(content)) {
|
|
409
|
+
return (dataOrConfig ?? {});
|
|
410
|
+
}
|
|
411
|
+
// Component opens support the shorthand `open(Component, data, config)` shape.
|
|
412
|
+
if (config) {
|
|
413
|
+
return {
|
|
414
|
+
...config,
|
|
415
|
+
data: dataOrConfig,
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
if (dataOrConfig === undefined) {
|
|
419
|
+
return {};
|
|
420
|
+
}
|
|
421
|
+
// Without a third argument, distinguish raw data from a full modal config by known keys.
|
|
422
|
+
if (isModalConfig(dataOrConfig)) {
|
|
423
|
+
return dataOrConfig;
|
|
424
|
+
}
|
|
425
|
+
return {
|
|
426
|
+
data: dataOrConfig,
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
const CONFIG_KEYS = new Set([
|
|
430
|
+
'ariaDescribedBy',
|
|
431
|
+
'ariaLabel',
|
|
432
|
+
'ariaLabelledBy',
|
|
433
|
+
'ariaModal',
|
|
434
|
+
'autoFocus',
|
|
435
|
+
'backdropClass',
|
|
436
|
+
'bodyData',
|
|
437
|
+
'bodyInputs',
|
|
438
|
+
'closeOnDestroy',
|
|
439
|
+
'closeOnNavigation',
|
|
440
|
+
'data',
|
|
441
|
+
'description',
|
|
442
|
+
'direction',
|
|
443
|
+
'disableClose',
|
|
444
|
+
'footerActions',
|
|
445
|
+
'height',
|
|
446
|
+
'inputs',
|
|
447
|
+
'maxHeight',
|
|
448
|
+
'maxWidth',
|
|
449
|
+
'minHeight',
|
|
450
|
+
'minWidth',
|
|
451
|
+
'panelClass',
|
|
452
|
+
'positionStrategy',
|
|
453
|
+
'providers',
|
|
454
|
+
'restoreFocus',
|
|
455
|
+
'role',
|
|
456
|
+
'scrollable',
|
|
457
|
+
'showCloseButton',
|
|
458
|
+
'size',
|
|
459
|
+
'stickyFooter',
|
|
460
|
+
'title',
|
|
461
|
+
'viewContainerRef',
|
|
462
|
+
'width',
|
|
463
|
+
]);
|
|
464
|
+
function isModalConfig(value) {
|
|
465
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
466
|
+
return false;
|
|
467
|
+
}
|
|
468
|
+
return Object.keys(value).some((key) => CONFIG_KEYS.has(key));
|
|
469
|
+
}
|
|
389
470
|
function mergeClassList(classList, defaultClass) {
|
|
390
471
|
const classes = Array.isArray(classList)
|
|
391
472
|
? classList
|
|
@@ -394,7 +475,18 @@ function mergeClassList(classList, defaultClass) {
|
|
|
394
475
|
: [];
|
|
395
476
|
return Array.from(new Set([defaultClass, ...classes].filter(Boolean)));
|
|
396
477
|
}
|
|
478
|
+
function withModalRefProvider(providers) {
|
|
479
|
+
const modalRefProvider = { provide: FrModalRef, useExisting: DialogRef };
|
|
480
|
+
if (typeof providers === 'function') {
|
|
481
|
+
return (dialogRef, config, container) => [
|
|
482
|
+
modalRefProvider,
|
|
483
|
+
...providers(dialogRef, config, container),
|
|
484
|
+
];
|
|
485
|
+
}
|
|
486
|
+
return [modalRefProvider, ...(providers ?? [])];
|
|
487
|
+
}
|
|
397
488
|
|
|
489
|
+
/** Trigger control for modal. */
|
|
398
490
|
class FrModalTrigger {
|
|
399
491
|
static CUSTOM_PROPERTY_PREFIX = '--frame-modal-';
|
|
400
492
|
destroyRef = inject(DestroyRef);
|
|
@@ -521,5 +613,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
|
|
|
521
613
|
* Generated bundle index. Do not edit.
|
|
522
614
|
*/
|
|
523
615
|
|
|
524
|
-
export { FR_MODAL_DATA, FrModalBody, FrModalClose, FrModalContent, FrModalDescription, FrModalFooter, FrModalHeader, FrModalModule, FrModalPanel, FrModalService, FrModalShell, FrModalTitle, FrModalTrigger };
|
|
616
|
+
export { FR_MODAL_DATA, FR_MODAL_REF, FrModalBody, FrModalClose, FrModalContent, FrModalDescription, FrModalFooter, FrModalHeader, FrModalModule, FrModalPanel, FrModalRef, FrModalService, FrModalShell, FrModalTitle, FrModalTrigger };
|
|
525
617
|
//# sourceMappingURL=frame-ui-ng-components-modal.mjs.map
|