@frame-ui-ng/components 0.1.0-beta.0
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/LICENSE.md +9 -0
- package/README.md +31 -0
- package/accordion/src/styles/_vars.css +25 -0
- package/accordion/src/styles/accordion.css +87 -0
- package/alert/src/styles/_vars.css +28 -0
- package/alert/src/styles/alert.css +77 -0
- package/avatar/src/styles/_vars.css +34 -0
- package/avatar/src/styles/avatar.css +209 -0
- package/badge/src/styles/_vars.css +16 -0
- package/badge/src/styles/badge.css +125 -0
- package/breadcrumb/src/styles/_vars.css +16 -0
- package/breadcrumb/src/styles/breadcrumb.css +98 -0
- package/button/src/styles/_vars.css +20 -0
- package/button/src/styles/button-icon.css +18 -0
- package/button/src/styles/button-label.css +3 -0
- package/button/src/styles/button.css +243 -0
- package/button-group/src/styles/button-group.css +69 -0
- package/calendar/src/styles/_vars.css +29 -0
- package/calendar/src/styles/calendar.css +226 -0
- package/card/src/styles/_vars.css +17 -0
- package/card/src/styles/card.css +142 -0
- package/carousel/src/styles/_vars.css +7 -0
- package/carousel/src/styles/carousel.css +89 -0
- package/checkbox/src/styles/_vars.css +22 -0
- package/checkbox/src/styles/checkbox.css +95 -0
- package/collapsible/src/styles/_vars.css +13 -0
- package/collapsible/src/styles/collapsible.css +42 -0
- package/combobox/src/styles/_vars.css +60 -0
- package/combobox/src/styles/combobox.css +285 -0
- package/command/src/styles/_vars.css +37 -0
- package/command/src/styles/command.css +171 -0
- package/context-menu/src/styles/context-menu.css +5 -0
- package/date-picker/src/styles/_vars.css +29 -0
- package/date-picker/src/styles/date-picker.css +177 -0
- package/dropdown-menu/src/styles/_vars.css +34 -0
- package/dropdown-menu/src/styles/dropdown-menu-item.css +87 -0
- package/dropdown-menu/src/styles/dropdown-menu-motion.css +42 -0
- package/dropdown-menu/src/styles/dropdown-menu-panel.css +26 -0
- package/dropdown-menu/src/styles/dropdown-menu.css +4 -0
- package/empty/src/styles/_vars.css +23 -0
- package/empty/src/styles/empty.css +108 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs +268 -0
- package/fesm2022/frame-ui-ng-components-accordion.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs +102 -0
- package/fesm2022/frame-ui-ng-components-alert.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs +197 -0
- package/fesm2022/frame-ui-ng-components-avatar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs +120 -0
- package/fesm2022/frame-ui-ng-components-badge.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs +156 -0
- package/fesm2022/frame-ui-ng-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs +44 -0
- package/fesm2022/frame-ui-ng-components-button-group.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-button.mjs +150 -0
- package/fesm2022/frame-ui-ng-components-button.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs +559 -0
- package/fesm2022/frame-ui-ng-components-calendar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-card.mjs +169 -0
- package/fesm2022/frame-ui-ng-components-card.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-carousel.mjs +454 -0
- package/fesm2022/frame-ui-ng-components-carousel.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-checkbox.mjs +83 -0
- package/fesm2022/frame-ui-ng-components-checkbox.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-collapsible.mjs +191 -0
- package/fesm2022/frame-ui-ng-components-collapsible.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-combobox.mjs +859 -0
- package/fesm2022/frame-ui-ng-components-combobox.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-command.mjs +658 -0
- package/fesm2022/frame-ui-ng-components-command.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs +579 -0
- package/fesm2022/frame-ui-ng-components-context-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs +512 -0
- package/fesm2022/frame-ui-ng-components-date-picker.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs +647 -0
- package/fesm2022/frame-ui-ng-components-dropdown-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs +134 -0
- package/fesm2022/frame-ui-ng-components-empty.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-field.mjs +210 -0
- package/fesm2022/frame-ui-ng-components-field.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs +89 -0
- package/fesm2022/frame-ui-ng-components-forms.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-hover-card.mjs +412 -0
- package/fesm2022/frame-ui-ng-components-hover-card.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-input-otp.mjs +327 -0
- package/fesm2022/frame-ui-ng-components-input-otp.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-input.mjs +250 -0
- package/fesm2022/frame-ui-ng-components-input.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-item.mjs +207 -0
- package/fesm2022/frame-ui-ng-components-item.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs +371 -0
- package/fesm2022/frame-ui-ng-components-menubar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-modal.mjs +525 -0
- package/fesm2022/frame-ui-ng-components-modal.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs +322 -0
- package/fesm2022/frame-ui-ng-components-navigation-menu.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-pagination.mjs +327 -0
- package/fesm2022/frame-ui-ng-components-pagination.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-popover.mjs +454 -0
- package/fesm2022/frame-ui-ng-components-popover.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-progress.mjs +96 -0
- package/fesm2022/frame-ui-ng-components-progress.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs +124 -0
- package/fesm2022/frame-ui-ng-components-radio-group.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-resizable.mjs +325 -0
- package/fesm2022/frame-ui-ng-components-resizable.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-select.mjs +434 -0
- package/fesm2022/frame-ui-ng-components-select.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs +51 -0
- package/fesm2022/frame-ui-ng-components-separator.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-sheet.mjs +514 -0
- package/fesm2022/frame-ui-ng-components-sheet.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-sidebar.mjs +628 -0
- package/fesm2022/frame-ui-ng-components-sidebar.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs +46 -0
- package/fesm2022/frame-ui-ng-components-skeleton.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-slider.mjs +279 -0
- package/fesm2022/frame-ui-ng-components-slider.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs +51 -0
- package/fesm2022/frame-ui-ng-components-spinner.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs +130 -0
- package/fesm2022/frame-ui-ng-components-switch.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-table.mjs +594 -0
- package/fesm2022/frame-ui-ng-components-table.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs +208 -0
- package/fesm2022/frame-ui-ng-components-tabs.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs +40 -0
- package/fesm2022/frame-ui-ng-components-textarea.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs +346 -0
- package/fesm2022/frame-ui-ng-components-toast.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-toggle.mjs +127 -0
- package/fesm2022/frame-ui-ng-components-toggle.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-tooltip.mjs +425 -0
- package/fesm2022/frame-ui-ng-components-tooltip.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs +321 -0
- package/fesm2022/frame-ui-ng-components-virtual-scroll.mjs.map +1 -0
- package/fesm2022/frame-ui-ng-components.mjs +10278 -0
- package/fesm2022/frame-ui-ng-components.mjs.map +1 -0
- package/field/src/styles/_vars.css +20 -0
- package/field/src/styles/field.css +165 -0
- package/hover-card/src/styles/_vars.css +21 -0
- package/hover-card/src/styles/hover-card.css +76 -0
- package/input/src/styles/_vars.css +65 -0
- package/input/src/styles/input-group.css +112 -0
- package/input/src/styles/input.css +163 -0
- package/input-otp/src/styles/_vars.css +21 -0
- package/input-otp/src/styles/input-otp.css +116 -0
- package/item/src/styles/_vars.css +34 -0
- package/item/src/styles/item.css +187 -0
- package/menubar/src/styles/_vars.css +22 -0
- package/menubar/src/styles/menubar.css +70 -0
- package/modal/src/styles/_vars.css +18 -0
- package/modal/src/styles/modal.css +179 -0
- package/navigation-menu/src/styles/_vars.css +45 -0
- package/navigation-menu/src/styles/navigation-menu.css +245 -0
- package/package.json +243 -0
- package/pagination/src/styles/_vars.css +22 -0
- package/pagination/src/styles/pagination.css +138 -0
- package/popover/src/styles/_vars.css +24 -0
- package/popover/src/styles/popover.css +101 -0
- package/progress/src/styles/_vars.css +15 -0
- package/progress/src/styles/progress.css +64 -0
- package/radio-group/src/styles/_vars.css +29 -0
- package/radio-group/src/styles/radio-group.css +137 -0
- package/resizable/src/styles/_vars.css +20 -0
- package/resizable/src/styles/resizable.css +130 -0
- package/select/src/styles/_vars.css +28 -0
- package/select/src/styles/select-content.css +19 -0
- package/select/src/styles/select-feedback.css +6 -0
- package/select/src/styles/select-item.css +69 -0
- package/select/src/styles/select-trigger.css +95 -0
- package/select/src/styles/select.css +5 -0
- package/separator/src/styles/_vars.css +9 -0
- package/separator/src/styles/separator.css +25 -0
- package/sheet/src/styles/_vars.css +18 -0
- package/sheet/src/styles/sheet.css +215 -0
- package/sidebar/src/styles/_vars.css +24 -0
- package/sidebar/src/styles/sidebar.css +531 -0
- package/skeleton/src/styles/_vars.css +8 -0
- package/skeleton/src/styles/skeleton.css +40 -0
- package/slider/src/styles/_vars.css +17 -0
- package/slider/src/styles/slider.css +147 -0
- package/spinner/src/styles/_vars.css +9 -0
- package/spinner/src/styles/spinner.css +62 -0
- package/src/styles/components.css +47 -0
- package/styles/components.css +47 -0
- package/styles.css +49 -0
- package/switch/src/styles/_vars.css +34 -0
- package/switch/src/styles/switch.css +131 -0
- package/table/src/styles/_vars.css +25 -0
- package/table/src/styles/table.css +245 -0
- package/tabs/src/styles/_vars.css +23 -0
- package/tabs/src/styles/tabs.css +164 -0
- package/textarea/src/styles/_vars.css +20 -0
- package/textarea/src/styles/textarea.css +60 -0
- package/toast/src/styles/_vars.css +47 -0
- package/toast/src/styles/toast.css +314 -0
- package/toggle/src/styles/_vars.css +24 -0
- package/toggle/src/styles/toggle.css +110 -0
- package/tooltip/src/styles/_vars.css +21 -0
- package/tooltip/src/styles/tooltip.css +103 -0
- package/types/frame-ui-ng-components-accordion.d.ts +75 -0
- package/types/frame-ui-ng-components-alert.d.ts +30 -0
- package/types/frame-ui-ng-components-avatar.d.ts +65 -0
- package/types/frame-ui-ng-components-badge.d.ts +35 -0
- package/types/frame-ui-ng-components-breadcrumb.d.ts +40 -0
- package/types/frame-ui-ng-components-button-group.d.ts +18 -0
- package/types/frame-ui-ng-components-button.d.ts +50 -0
- package/types/frame-ui-ng-components-calendar.d.ts +101 -0
- package/types/frame-ui-ng-components-card.d.ts +51 -0
- package/types/frame-ui-ng-components-carousel.d.ts +117 -0
- package/types/frame-ui-ng-components-checkbox.d.ts +25 -0
- package/types/frame-ui-ng-components-collapsible.d.ts +55 -0
- package/types/frame-ui-ng-components-combobox.d.ts +201 -0
- package/types/frame-ui-ng-components-command.d.ts +198 -0
- package/types/frame-ui-ng-components-context-menu.d.ts +149 -0
- package/types/frame-ui-ng-components-date-picker.d.ts +95 -0
- package/types/frame-ui-ng-components-dropdown-menu.d.ts +182 -0
- package/types/frame-ui-ng-components-empty.d.ts +44 -0
- package/types/frame-ui-ng-components-field.d.ts +60 -0
- package/types/frame-ui-ng-components-forms.d.ts +39 -0
- package/types/frame-ui-ng-components-hover-card.d.ts +94 -0
- package/types/frame-ui-ng-components-input-otp.d.ts +70 -0
- package/types/frame-ui-ng-components-input.d.ts +67 -0
- package/types/frame-ui-ng-components-item.d.ts +62 -0
- package/types/frame-ui-ng-components-menubar.d.ts +76 -0
- package/types/frame-ui-ng-components-modal.d.ts +148 -0
- package/types/frame-ui-ng-components-navigation-menu.d.ts +74 -0
- package/types/frame-ui-ng-components-pagination.d.ts +79 -0
- package/types/frame-ui-ng-components-popover.d.ts +95 -0
- package/types/frame-ui-ng-components-progress.d.ts +24 -0
- package/types/frame-ui-ng-components-radio-group.d.ts +40 -0
- package/types/frame-ui-ng-components-resizable.d.ts +61 -0
- package/types/frame-ui-ng-components-select.d.ts +114 -0
- package/types/frame-ui-ng-components-separator.d.ts +19 -0
- package/types/frame-ui-ng-components-sheet.d.ts +146 -0
- package/types/frame-ui-ng-components-sidebar.d.ts +163 -0
- package/types/frame-ui-ng-components-skeleton.d.ts +18 -0
- package/types/frame-ui-ng-components-slider.d.ts +56 -0
- package/types/frame-ui-ng-components-spinner.d.ts +23 -0
- package/types/frame-ui-ng-components-switch.d.ts +38 -0
- package/types/frame-ui-ng-components-table.d.ts +125 -0
- package/types/frame-ui-ng-components-tabs.d.ts +62 -0
- package/types/frame-ui-ng-components-textarea.d.ts +14 -0
- package/types/frame-ui-ng-components-toast.d.ts +74 -0
- package/types/frame-ui-ng-components-toggle.d.ts +45 -0
- package/types/frame-ui-ng-components-tooltip.d.ts +99 -0
- package/types/frame-ui-ng-components-virtual-scroll.d.ts +106 -0
- package/types/frame-ui-ng-components.d.ts +2746 -0
- package/virtual-scroll/src/styles/virtual-scroll.css +54 -0
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import * as i1 from '@angular/cdk/menu';
|
|
2
|
+
import { CdkMenu, CdkTargetMenuAim, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuGroup, CdkMenuItemRadio, CdkMenuTrigger } from '@angular/cdk/menu';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, Injectable, input, Directive, inject, signal, effect, TemplateRef, booleanAttribute, DestroyRef, ElementRef, NgModule } from '@angular/core';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
|
|
7
|
+
function defaultPositions(isSubmenu) {
|
|
8
|
+
return buildConnectedPositions({
|
|
9
|
+
align: 'start',
|
|
10
|
+
alignOffset: 0,
|
|
11
|
+
isSubmenu,
|
|
12
|
+
side: isSubmenu ? 'right' : 'bottom',
|
|
13
|
+
sideOffset: 4,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function buildConnectedPositions(options) {
|
|
17
|
+
const placements = primaryPlacement(options);
|
|
18
|
+
return [placements.primary, placements.fallback];
|
|
19
|
+
}
|
|
20
|
+
function primaryPlacement(options) {
|
|
21
|
+
if (options.isSubmenu) {
|
|
22
|
+
const isRight = options.side !== 'left';
|
|
23
|
+
const horizontalOffset = isRight ? options.sideOffset : -options.sideOffset;
|
|
24
|
+
const originY = submenuOriginY(options.align);
|
|
25
|
+
const overlayY = submenuOverlayY(options.align);
|
|
26
|
+
return {
|
|
27
|
+
primary: {
|
|
28
|
+
originX: isRight ? 'end' : 'start',
|
|
29
|
+
originY,
|
|
30
|
+
overlayX: isRight ? 'start' : 'end',
|
|
31
|
+
overlayY,
|
|
32
|
+
offsetX: horizontalOffset,
|
|
33
|
+
offsetY: options.alignOffset,
|
|
34
|
+
},
|
|
35
|
+
fallback: {
|
|
36
|
+
originX: isRight ? 'start' : 'end',
|
|
37
|
+
originY,
|
|
38
|
+
overlayX: isRight ? 'end' : 'start',
|
|
39
|
+
overlayY,
|
|
40
|
+
offsetX: -horizontalOffset,
|
|
41
|
+
offsetY: options.alignOffset,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const isBottom = options.side !== 'top';
|
|
46
|
+
const verticalOffset = isBottom ? options.sideOffset : -options.sideOffset;
|
|
47
|
+
const originX = rootOriginX(options.align);
|
|
48
|
+
const overlayX = rootOverlayX(options.align);
|
|
49
|
+
return {
|
|
50
|
+
primary: {
|
|
51
|
+
originX,
|
|
52
|
+
originY: isBottom ? 'bottom' : 'top',
|
|
53
|
+
overlayX,
|
|
54
|
+
overlayY: isBottom ? 'top' : 'bottom',
|
|
55
|
+
offsetX: options.alignOffset,
|
|
56
|
+
offsetY: verticalOffset,
|
|
57
|
+
},
|
|
58
|
+
fallback: {
|
|
59
|
+
originX,
|
|
60
|
+
originY: isBottom ? 'top' : 'bottom',
|
|
61
|
+
overlayX,
|
|
62
|
+
overlayY: isBottom ? 'bottom' : 'top',
|
|
63
|
+
offsetX: options.alignOffset,
|
|
64
|
+
offsetY: -verticalOffset,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function rootOriginX(align) {
|
|
69
|
+
if (align === 'center') {
|
|
70
|
+
return 'center';
|
|
71
|
+
}
|
|
72
|
+
return align;
|
|
73
|
+
}
|
|
74
|
+
function rootOverlayX(align) {
|
|
75
|
+
if (align === 'center') {
|
|
76
|
+
return 'center';
|
|
77
|
+
}
|
|
78
|
+
return align;
|
|
79
|
+
}
|
|
80
|
+
function submenuOriginY(align) {
|
|
81
|
+
if (align === 'center') {
|
|
82
|
+
return 'center';
|
|
83
|
+
}
|
|
84
|
+
return align === 'end' ? 'bottom' : 'top';
|
|
85
|
+
}
|
|
86
|
+
function submenuOverlayY(align) {
|
|
87
|
+
if (align === 'center') {
|
|
88
|
+
return 'center';
|
|
89
|
+
}
|
|
90
|
+
return align === 'end' ? 'bottom' : 'top';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const FR_DROPDOWN_MENU_PARENT = new InjectionToken('FrDropdownMenuParent');
|
|
94
|
+
class FrDropdownMenuTree {
|
|
95
|
+
triggers = new Set();
|
|
96
|
+
closeTimeoutId = null;
|
|
97
|
+
pointerInsideCount = 0;
|
|
98
|
+
register(trigger) {
|
|
99
|
+
this.triggers.add(trigger);
|
|
100
|
+
}
|
|
101
|
+
unregister(trigger) {
|
|
102
|
+
this.triggers.delete(trigger);
|
|
103
|
+
}
|
|
104
|
+
cancelClose() {
|
|
105
|
+
if (this.closeTimeoutId !== null) {
|
|
106
|
+
clearTimeout(this.closeTimeoutId);
|
|
107
|
+
this.closeTimeoutId = null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
enterInteractiveArea() {
|
|
111
|
+
this.pointerInsideCount += 1;
|
|
112
|
+
this.cancelClose();
|
|
113
|
+
}
|
|
114
|
+
leaveInteractiveArea(delay) {
|
|
115
|
+
this.pointerInsideCount = Math.max(0, this.pointerInsideCount - 1);
|
|
116
|
+
if (this.pointerInsideCount === 0) {
|
|
117
|
+
this.scheduleClose(delay);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
scheduleClose(delay) {
|
|
121
|
+
this.cancelClose();
|
|
122
|
+
this.closeTimeoutId = setTimeout(() => {
|
|
123
|
+
this.closeAll();
|
|
124
|
+
}, delay);
|
|
125
|
+
}
|
|
126
|
+
closeAll() {
|
|
127
|
+
this.cancelClose();
|
|
128
|
+
for (const trigger of this.triggers) {
|
|
129
|
+
trigger.close();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTree, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
133
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTree });
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTree, decorators: [{
|
|
136
|
+
type: Injectable
|
|
137
|
+
}] });
|
|
138
|
+
class FrDropdownMenu {
|
|
139
|
+
closeDelay = input(140, ...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
|
|
140
|
+
triggerMode = input('click', ...(ngDevMode ? [{ debugName: "triggerMode" }] : /* istanbul ignore next */ []));
|
|
141
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
142
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenu, isStandalone: true, selector: "[frDropdownMenu]", inputs: { closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, triggerMode: { classPropertyName: "triggerMode", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "frame-dropdown-menu-root" }, providers: [
|
|
143
|
+
FrDropdownMenuTree,
|
|
144
|
+
{
|
|
145
|
+
provide: FR_DROPDOWN_MENU_PARENT,
|
|
146
|
+
useExisting: FrDropdownMenu,
|
|
147
|
+
},
|
|
148
|
+
], ngImport: i0 });
|
|
149
|
+
}
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenu, decorators: [{
|
|
151
|
+
type: Directive,
|
|
152
|
+
args: [{
|
|
153
|
+
selector: '[frDropdownMenu]',
|
|
154
|
+
providers: [
|
|
155
|
+
FrDropdownMenuTree,
|
|
156
|
+
{
|
|
157
|
+
provide: FR_DROPDOWN_MENU_PARENT,
|
|
158
|
+
useExisting: FrDropdownMenu,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
host: {
|
|
162
|
+
class: 'frame-dropdown-menu-root',
|
|
163
|
+
},
|
|
164
|
+
}]
|
|
165
|
+
}], propDecorators: { closeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], triggerMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }] } });
|
|
166
|
+
class FrDropdownMenuSub {
|
|
167
|
+
parent = inject(FR_DROPDOWN_MENU_PARENT, { skipSelf: true });
|
|
168
|
+
closeDelayInput = input(null, { ...(ngDevMode ? { debugName: "closeDelayInput" } : /* istanbul ignore next */ {}), alias: 'closeDelay' });
|
|
169
|
+
triggerModeInput = input(null, { ...(ngDevMode ? { debugName: "triggerModeInput" } : /* istanbul ignore next */ {}), alias: 'triggerMode' });
|
|
170
|
+
closeDelay = signal(this.parent.closeDelay(), ...(ngDevMode ? [{ debugName: "closeDelay" }] : /* istanbul ignore next */ []));
|
|
171
|
+
triggerMode = signal(this.parent.triggerMode(), ...(ngDevMode ? [{ debugName: "triggerMode" }] : /* istanbul ignore next */ []));
|
|
172
|
+
constructor() {
|
|
173
|
+
effect(() => {
|
|
174
|
+
this.closeDelay.set(this.closeDelayInput() ?? this.parent.closeDelay());
|
|
175
|
+
this.triggerMode.set(this.triggerModeInput() ?? this.parent.triggerMode());
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
179
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuSub, isStandalone: true, selector: "[frDropdownMenuSub]", inputs: { closeDelayInput: { classPropertyName: "closeDelayInput", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, triggerModeInput: { classPropertyName: "triggerModeInput", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "frame-dropdown-menu-sub" }, providers: [
|
|
180
|
+
{
|
|
181
|
+
provide: FR_DROPDOWN_MENU_PARENT,
|
|
182
|
+
useExisting: FrDropdownMenuSub,
|
|
183
|
+
},
|
|
184
|
+
], ngImport: i0 });
|
|
185
|
+
}
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSub, decorators: [{
|
|
187
|
+
type: Directive,
|
|
188
|
+
args: [{
|
|
189
|
+
selector: '[frDropdownMenuSub]',
|
|
190
|
+
providers: [
|
|
191
|
+
{
|
|
192
|
+
provide: FR_DROPDOWN_MENU_PARENT,
|
|
193
|
+
useExisting: FrDropdownMenuSub,
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
host: {
|
|
197
|
+
class: 'frame-dropdown-menu-sub',
|
|
198
|
+
},
|
|
199
|
+
}]
|
|
200
|
+
}], ctorParameters: () => [], propDecorators: { closeDelayInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeDelay", required: false }] }], triggerModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }] } });
|
|
201
|
+
|
|
202
|
+
const FR_DROPDOWN_MENU_CONTENT = new InjectionToken('FrDropdownMenuContent');
|
|
203
|
+
class FrDropdownMenuContent {
|
|
204
|
+
templateRef = inject((TemplateRef));
|
|
205
|
+
align = input('start', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
206
|
+
alignOffset = input(0, ...(ngDevMode ? [{ debugName: "alignOffset" }] : /* istanbul ignore next */ []));
|
|
207
|
+
debugVisible = input(false, { ...(ngDevMode ? { debugName: "debugVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
208
|
+
side = input('bottom', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
209
|
+
sideOffset = input(4, ...(ngDevMode ? [{ debugName: "sideOffset" }] : /* istanbul ignore next */ []));
|
|
210
|
+
isDebugVisible() {
|
|
211
|
+
return this.debugVisible();
|
|
212
|
+
}
|
|
213
|
+
getPositions(isSubmenu) {
|
|
214
|
+
return buildConnectedPositions({
|
|
215
|
+
align: this.align(),
|
|
216
|
+
alignOffset: this.alignOffset(),
|
|
217
|
+
isSubmenu,
|
|
218
|
+
side: this.side(),
|
|
219
|
+
sideOffset: this.sideOffset(),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
223
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuContent, isStandalone: true, selector: "ng-template[frDropdownMenuContent], ng-template[frDropdownMenuSubContent]", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, alignOffset: { classPropertyName: "alignOffset", publicName: "alignOffset", isSignal: true, isRequired: false, transformFunction: null }, debugVisible: { classPropertyName: "debugVisible", publicName: "debugVisible", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, sideOffset: { classPropertyName: "sideOffset", publicName: "sideOffset", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
224
|
+
{
|
|
225
|
+
provide: FR_DROPDOWN_MENU_CONTENT,
|
|
226
|
+
useExisting: FrDropdownMenuContent,
|
|
227
|
+
},
|
|
228
|
+
], exportAs: ["frDropdownMenuContent"], ngImport: i0 });
|
|
229
|
+
}
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuContent, decorators: [{
|
|
231
|
+
type: Directive,
|
|
232
|
+
args: [{
|
|
233
|
+
selector: 'ng-template[frDropdownMenuContent], ng-template[frDropdownMenuSubContent]',
|
|
234
|
+
exportAs: 'frDropdownMenuContent',
|
|
235
|
+
providers: [
|
|
236
|
+
{
|
|
237
|
+
provide: FR_DROPDOWN_MENU_CONTENT,
|
|
238
|
+
useExisting: FrDropdownMenuContent,
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
}]
|
|
242
|
+
}], propDecorators: { align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], alignOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignOffset", required: false }] }], debugVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "debugVisible", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], sideOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "sideOffset", required: false }] }] } });
|
|
243
|
+
class FrDropdownMenuPanel {
|
|
244
|
+
side = inject(FR_DROPDOWN_MENU_CONTENT).side;
|
|
245
|
+
tree = inject(FrDropdownMenuTree);
|
|
246
|
+
parent = inject(FR_DROPDOWN_MENU_PARENT);
|
|
247
|
+
handleMouseEnter() {
|
|
248
|
+
this.tree.enterInteractiveArea();
|
|
249
|
+
}
|
|
250
|
+
handleMouseLeave() {
|
|
251
|
+
this.tree.leaveInteractiveArea(this.parent.closeDelay());
|
|
252
|
+
}
|
|
253
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
254
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuPanel, isStandalone: true, selector: "[frDropdownMenuPanel]", host: { attributes: { "tabindex": "-1" }, listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" }, properties: { "attr.data-side": "side()" }, classAttribute: "frame-dropdown-menu__content" }, hostDirectives: [{ directive: i1.CdkMenu }, { directive: i1.CdkTargetMenuAim }], ngImport: i0 });
|
|
255
|
+
}
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuPanel, decorators: [{
|
|
257
|
+
type: Directive,
|
|
258
|
+
args: [{
|
|
259
|
+
selector: '[frDropdownMenuPanel]',
|
|
260
|
+
hostDirectives: [CdkMenu, CdkTargetMenuAim],
|
|
261
|
+
host: {
|
|
262
|
+
class: 'frame-dropdown-menu__content',
|
|
263
|
+
'[attr.data-side]': 'side()',
|
|
264
|
+
tabindex: '-1',
|
|
265
|
+
'(mouseenter)': 'handleMouseEnter()',
|
|
266
|
+
'(mouseleave)': 'handleMouseLeave()'
|
|
267
|
+
},
|
|
268
|
+
}]
|
|
269
|
+
}] });
|
|
270
|
+
|
|
271
|
+
class FrDropdownMenuItem {
|
|
272
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
273
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
275
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuItem, isStandalone: true, selector: "[frDropdownMenuItem]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-dropdown-menu__item" }, hostDirectives: [{ directive: i1.CdkMenuItem }], ngImport: i0 });
|
|
276
|
+
}
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuItem, decorators: [{
|
|
278
|
+
type: Directive,
|
|
279
|
+
args: [{
|
|
280
|
+
selector: '[frDropdownMenuItem]',
|
|
281
|
+
hostDirectives: [CdkMenuItem],
|
|
282
|
+
host: {
|
|
283
|
+
class: 'frame-dropdown-menu__item',
|
|
284
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
285
|
+
'[attr.data-variant]': 'variant()',
|
|
286
|
+
},
|
|
287
|
+
}]
|
|
288
|
+
}], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
289
|
+
class FrDropdownMenuCheckboxItem {
|
|
290
|
+
checkboxItem = inject(CdkMenuItemCheckbox);
|
|
291
|
+
checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), alias: 'checked',
|
|
292
|
+
transform: booleanAttribute });
|
|
293
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
294
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
295
|
+
constructor() {
|
|
296
|
+
effect(() => {
|
|
297
|
+
this.checkboxItem.checked = this.checked();
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuCheckboxItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
301
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuCheckboxItem, isStandalone: true, selector: "button[frDropdownMenuCheckboxItem]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-checked": "checkboxItem.checked ? \"\" : null", "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-dropdown-menu__item frame-dropdown-menu__checkbox-item" }, hostDirectives: [{ directive: i1.CdkMenuItemCheckbox }], ngImport: i0 });
|
|
302
|
+
}
|
|
303
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuCheckboxItem, decorators: [{
|
|
304
|
+
type: Directive,
|
|
305
|
+
args: [{
|
|
306
|
+
selector: 'button[frDropdownMenuCheckboxItem]',
|
|
307
|
+
hostDirectives: [CdkMenuItemCheckbox],
|
|
308
|
+
host: {
|
|
309
|
+
class: 'frame-dropdown-menu__item frame-dropdown-menu__checkbox-item',
|
|
310
|
+
'[attr.data-checked]': 'checkboxItem.checked ? "" : null',
|
|
311
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
312
|
+
'[attr.data-variant]': 'variant()',
|
|
313
|
+
},
|
|
314
|
+
}]
|
|
315
|
+
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
316
|
+
class FrDropdownMenuRadioGroup {
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
318
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuRadioGroup, isStandalone: true, selector: "[frDropdownMenuRadioGroup]", host: { classAttribute: "frame-dropdown-menu__radio-group" }, hostDirectives: [{ directive: i1.CdkMenuGroup }], ngImport: i0 });
|
|
319
|
+
}
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuRadioGroup, decorators: [{
|
|
321
|
+
type: Directive,
|
|
322
|
+
args: [{
|
|
323
|
+
selector: '[frDropdownMenuRadioGroup]',
|
|
324
|
+
hostDirectives: [CdkMenuGroup],
|
|
325
|
+
host: {
|
|
326
|
+
class: 'frame-dropdown-menu__radio-group',
|
|
327
|
+
},
|
|
328
|
+
}]
|
|
329
|
+
}] });
|
|
330
|
+
class FrDropdownMenuRadioItem {
|
|
331
|
+
radioItem = inject(CdkMenuItemRadio);
|
|
332
|
+
checked = input(false, { ...(ngDevMode ? { debugName: "checked" } : /* istanbul ignore next */ {}), alias: 'checked',
|
|
333
|
+
transform: booleanAttribute });
|
|
334
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
335
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
336
|
+
constructor() {
|
|
337
|
+
effect(() => {
|
|
338
|
+
this.radioItem.checked = this.checked();
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuRadioItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
342
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuRadioItem, isStandalone: true, selector: "button[frDropdownMenuRadioItem]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-checked": "radioItem.checked ? \"\" : null", "attr.data-inset": "inset() ? \"\" : null", "attr.data-variant": "variant()" }, classAttribute: "frame-dropdown-menu__item frame-dropdown-menu__radio-item" }, hostDirectives: [{ directive: i1.CdkMenuItemRadio }], ngImport: i0 });
|
|
343
|
+
}
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuRadioItem, decorators: [{
|
|
345
|
+
type: Directive,
|
|
346
|
+
args: [{
|
|
347
|
+
selector: 'button[frDropdownMenuRadioItem]',
|
|
348
|
+
hostDirectives: [CdkMenuItemRadio],
|
|
349
|
+
host: {
|
|
350
|
+
class: 'frame-dropdown-menu__item frame-dropdown-menu__radio-item',
|
|
351
|
+
'[attr.data-checked]': 'radioItem.checked ? "" : null',
|
|
352
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
353
|
+
'[attr.data-variant]': 'variant()',
|
|
354
|
+
},
|
|
355
|
+
}]
|
|
356
|
+
}], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
357
|
+
class FrDropdownMenuLabel {
|
|
358
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
360
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuLabel, isStandalone: true, selector: "[frDropdownMenuLabel]", inputs: { inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-inset": "inset() ? \"\" : null" }, classAttribute: "frame-dropdown-menu__label" }, ngImport: i0 });
|
|
361
|
+
}
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuLabel, decorators: [{
|
|
363
|
+
type: Directive,
|
|
364
|
+
args: [{
|
|
365
|
+
selector: '[frDropdownMenuLabel]',
|
|
366
|
+
host: {
|
|
367
|
+
class: 'frame-dropdown-menu__label',
|
|
368
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
369
|
+
},
|
|
370
|
+
}]
|
|
371
|
+
}], propDecorators: { inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }] } });
|
|
372
|
+
class FrDropdownMenuSeparator {
|
|
373
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
374
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuSeparator, isStandalone: true, selector: "[frDropdownMenuSeparator]", host: { attributes: { "role": "separator" }, classAttribute: "frame-dropdown-menu__separator" }, ngImport: i0 });
|
|
375
|
+
}
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSeparator, decorators: [{
|
|
377
|
+
type: Directive,
|
|
378
|
+
args: [{
|
|
379
|
+
selector: '[frDropdownMenuSeparator]',
|
|
380
|
+
host: {
|
|
381
|
+
class: 'frame-dropdown-menu__separator',
|
|
382
|
+
role: 'separator',
|
|
383
|
+
},
|
|
384
|
+
}]
|
|
385
|
+
}] });
|
|
386
|
+
class FrDropdownMenuShortcut {
|
|
387
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuShortcut, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
388
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuShortcut, isStandalone: true, selector: "[frDropdownMenuShortcut]", host: { classAttribute: "frame-dropdown-menu__shortcut" }, ngImport: i0 });
|
|
389
|
+
}
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuShortcut, decorators: [{
|
|
391
|
+
type: Directive,
|
|
392
|
+
args: [{
|
|
393
|
+
selector: '[frDropdownMenuShortcut]',
|
|
394
|
+
host: {
|
|
395
|
+
class: 'frame-dropdown-menu__shortcut',
|
|
396
|
+
},
|
|
397
|
+
}]
|
|
398
|
+
}] });
|
|
399
|
+
class FrDropdownMenuItemIndicator {
|
|
400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
401
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuItemIndicator, isStandalone: true, selector: "[frDropdownMenuItemIndicator]", host: { attributes: { "aria-hidden": "true" }, classAttribute: "frame-dropdown-menu__indicator" }, ngImport: i0 });
|
|
402
|
+
}
|
|
403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuItemIndicator, decorators: [{
|
|
404
|
+
type: Directive,
|
|
405
|
+
args: [{
|
|
406
|
+
selector: '[frDropdownMenuItemIndicator]',
|
|
407
|
+
host: {
|
|
408
|
+
class: 'frame-dropdown-menu__indicator',
|
|
409
|
+
'aria-hidden': 'true',
|
|
410
|
+
},
|
|
411
|
+
}]
|
|
412
|
+
}] });
|
|
413
|
+
|
|
414
|
+
class FrDropdownMenuTriggerBase {
|
|
415
|
+
static CUSTOM_PROPERTY_PREFIX = '--frame-dropdown-menu-';
|
|
416
|
+
cdkMenuTrigger = inject(CdkMenuTrigger);
|
|
417
|
+
destroyRef = inject(DestroyRef);
|
|
418
|
+
elementRef = inject(ElementRef);
|
|
419
|
+
tree = inject(FrDropdownMenuTree);
|
|
420
|
+
parent = inject(FR_DROPDOWN_MENU_PARENT);
|
|
421
|
+
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
422
|
+
constructor() {
|
|
423
|
+
this.tree.register(this);
|
|
424
|
+
effect(() => {
|
|
425
|
+
const content = this.menuContent();
|
|
426
|
+
this.cdkMenuTrigger.menuTemplateRef = content?.templateRef ?? null;
|
|
427
|
+
this.cdkMenuTrigger.menuPosition = this.resolvePositions();
|
|
428
|
+
if (content?.isDebugVisible() && !this.cdkMenuTrigger.isOpen()) {
|
|
429
|
+
queueMicrotask(() => {
|
|
430
|
+
if (!this.cdkMenuTrigger.isOpen()) {
|
|
431
|
+
this.cdkMenuTrigger.open();
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
this.cdkMenuTrigger.opened.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
437
|
+
this.tree.cancelClose();
|
|
438
|
+
this.isOpen.set(true);
|
|
439
|
+
queueMicrotask(() => {
|
|
440
|
+
this.syncCustomPropertiesToOverlay();
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
this.cdkMenuTrigger.closed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
444
|
+
if (this.menuContent()?.isDebugVisible()) {
|
|
445
|
+
queueMicrotask(() => {
|
|
446
|
+
if (!this.cdkMenuTrigger.isOpen()) {
|
|
447
|
+
this.cdkMenuTrigger.open();
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.isOpen.set(false);
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
get triggerMode() {
|
|
456
|
+
return this.triggerModeInput() ?? this.parent.triggerMode();
|
|
457
|
+
}
|
|
458
|
+
get closeDelay() {
|
|
459
|
+
return this.parent.closeDelay();
|
|
460
|
+
}
|
|
461
|
+
resolvePositions() {
|
|
462
|
+
return (this.menuContent()?.getPositions(this.isSubmenuTrigger) ??
|
|
463
|
+
defaultPositions(this.isSubmenuTrigger));
|
|
464
|
+
}
|
|
465
|
+
openFromHover() {
|
|
466
|
+
if (this.triggerMode === 'hover' || this.triggerMode === 'both') {
|
|
467
|
+
this.tree.cancelClose();
|
|
468
|
+
if (!this.cdkMenuTrigger.isOpen()) {
|
|
469
|
+
this.cdkMenuTrigger.open();
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
handleMouseEnter() {
|
|
474
|
+
this.tree.enterInteractiveArea();
|
|
475
|
+
this.openFromHover();
|
|
476
|
+
}
|
|
477
|
+
handleMouseLeave() {
|
|
478
|
+
if (this.menuContent()?.isDebugVisible()) {
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
if (this.triggerMode === 'hover' || this.triggerMode === 'both') {
|
|
482
|
+
this.tree.leaveInteractiveArea(this.closeDelay);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
close() {
|
|
486
|
+
if (this.menuContent()?.isDebugVisible()) {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (this.cdkMenuTrigger.isOpen()) {
|
|
490
|
+
this.cdkMenuTrigger.close();
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
ngOnDestroy() {
|
|
494
|
+
this.tree.unregister(this);
|
|
495
|
+
}
|
|
496
|
+
syncCustomPropertiesToOverlay() {
|
|
497
|
+
const overlayRef = this.cdkMenuTrigger
|
|
498
|
+
.overlayRef;
|
|
499
|
+
const overlayElement = overlayRef?.overlayElement ?? null;
|
|
500
|
+
if (!overlayElement) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
const menuPanel = overlayElement.querySelector('.frame-dropdown-menu__content') ?? overlayElement;
|
|
504
|
+
const sourceStyles = getComputedStyle(this.elementRef.nativeElement);
|
|
505
|
+
for (let index = 0; index < sourceStyles.length; index += 1) {
|
|
506
|
+
const propertyName = sourceStyles.item(index);
|
|
507
|
+
if (!propertyName.startsWith(FrDropdownMenuTriggerBase.CUSTOM_PROPERTY_PREFIX)) {
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
const propertyValue = sourceStyles.getPropertyValue(propertyName);
|
|
511
|
+
overlayElement.style.setProperty(propertyName, propertyValue);
|
|
512
|
+
menuPanel.style.setProperty(propertyName, propertyValue);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTriggerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
516
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.16", type: FrDropdownMenuTriggerBase, isStandalone: true, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()" } }, ngImport: i0 });
|
|
517
|
+
}
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTriggerBase, decorators: [{
|
|
519
|
+
type: Directive,
|
|
520
|
+
args: [{
|
|
521
|
+
host: {
|
|
522
|
+
'(mouseenter)': 'handleMouseEnter()',
|
|
523
|
+
'(mouseleave)': 'handleMouseLeave()',
|
|
524
|
+
},
|
|
525
|
+
}]
|
|
526
|
+
}], ctorParameters: () => [] });
|
|
527
|
+
class FrDropdownMenuTrigger extends FrDropdownMenuTriggerBase {
|
|
528
|
+
menuContent = input(null, { ...(ngDevMode ? { debugName: "menuContent" } : /* istanbul ignore next */ {}), alias: 'frDropdownMenuTrigger' });
|
|
529
|
+
triggerModeInput = input(null, { ...(ngDevMode ? { debugName: "triggerModeInput" } : /* istanbul ignore next */ {}), alias: 'triggerMode' });
|
|
530
|
+
isSubmenuTrigger = false;
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
532
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuTrigger, isStandalone: true, selector: "[frDropdownMenuTrigger]", inputs: { menuContent: { classPropertyName: "menuContent", publicName: "frDropdownMenuTrigger", isSignal: true, isRequired: false, transformFunction: null }, triggerModeInput: { classPropertyName: "triggerModeInput", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-state": "isOpen() ? \"open\" : \"closed\"" }, classAttribute: "frame-dropdown-menu__trigger" }, usesInheritance: true, hostDirectives: [{ directive: i1.CdkMenuTrigger }], ngImport: i0 });
|
|
533
|
+
}
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuTrigger, decorators: [{
|
|
535
|
+
type: Directive,
|
|
536
|
+
args: [{
|
|
537
|
+
selector: '[frDropdownMenuTrigger]',
|
|
538
|
+
hostDirectives: [CdkMenuTrigger],
|
|
539
|
+
host: {
|
|
540
|
+
class: 'frame-dropdown-menu__trigger',
|
|
541
|
+
'[attr.data-state]': 'isOpen() ? "open" : "closed"',
|
|
542
|
+
},
|
|
543
|
+
}]
|
|
544
|
+
}], propDecorators: { menuContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "frDropdownMenuTrigger", required: false }] }], triggerModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }] } });
|
|
545
|
+
class FrDropdownMenuSubTrigger extends FrDropdownMenuTriggerBase {
|
|
546
|
+
menuContent = input(null, { ...(ngDevMode ? { debugName: "menuContent" } : /* istanbul ignore next */ {}), alias: 'frDropdownMenuSubTrigger' });
|
|
547
|
+
inset = input(false, { ...(ngDevMode ? { debugName: "inset" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
548
|
+
triggerModeInput = input(null, { ...(ngDevMode ? { debugName: "triggerModeInput" } : /* istanbul ignore next */ {}), alias: 'triggerMode' });
|
|
549
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
550
|
+
isSubmenuTrigger = true;
|
|
551
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSubTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
552
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: FrDropdownMenuSubTrigger, isStandalone: true, selector: "[frDropdownMenuSubTrigger]", inputs: { menuContent: { classPropertyName: "menuContent", publicName: "frDropdownMenuSubTrigger", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, triggerModeInput: { classPropertyName: "triggerModeInput", publicName: "triggerMode", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-inset": "inset() ? \"\" : null", "attr.data-state": "isOpen() ? \"open\" : \"closed\"", "attr.data-variant": "variant()" }, classAttribute: "frame-dropdown-menu__item frame-dropdown-menu__sub-trigger" }, usesInheritance: true, hostDirectives: [{ directive: i1.CdkMenuItem }, { directive: i1.CdkMenuTrigger }], ngImport: i0 });
|
|
553
|
+
}
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuSubTrigger, decorators: [{
|
|
555
|
+
type: Directive,
|
|
556
|
+
args: [{
|
|
557
|
+
selector: '[frDropdownMenuSubTrigger]',
|
|
558
|
+
hostDirectives: [CdkMenuItem, CdkMenuTrigger],
|
|
559
|
+
host: {
|
|
560
|
+
class: 'frame-dropdown-menu__item frame-dropdown-menu__sub-trigger',
|
|
561
|
+
'[attr.data-inset]': 'inset() ? "" : null',
|
|
562
|
+
'[attr.data-state]': 'isOpen() ? "open" : "closed"',
|
|
563
|
+
'[attr.data-variant]': 'variant()',
|
|
564
|
+
},
|
|
565
|
+
}]
|
|
566
|
+
}], propDecorators: { menuContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "frDropdownMenuSubTrigger", required: false }] }], inset: [{ type: i0.Input, args: [{ isSignal: true, alias: "inset", required: false }] }], triggerModeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerMode", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
567
|
+
|
|
568
|
+
const FR_DROPDOWN_MENU_ALIGNMENTS = ['center', 'end', 'start'];
|
|
569
|
+
const FR_DROPDOWN_MENU_SIDES = ['bottom', 'left', 'right', 'top'];
|
|
570
|
+
const FR_DROPDOWN_MENU_TRIGGER_MODES = ['both', 'click', 'hover'];
|
|
571
|
+
const FR_DROPDOWN_MENU_ITEM_VARIANTS = ['default', 'destructive'];
|
|
572
|
+
|
|
573
|
+
class FrDropdownMenuModule {
|
|
574
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
575
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuModule, imports: [FrDropdownMenu,
|
|
576
|
+
FrDropdownMenuCheckboxItem,
|
|
577
|
+
FrDropdownMenuContent,
|
|
578
|
+
FrDropdownMenuItem,
|
|
579
|
+
FrDropdownMenuItemIndicator,
|
|
580
|
+
FrDropdownMenuLabel,
|
|
581
|
+
FrDropdownMenuPanel,
|
|
582
|
+
FrDropdownMenuRadioGroup,
|
|
583
|
+
FrDropdownMenuRadioItem,
|
|
584
|
+
FrDropdownMenuSeparator,
|
|
585
|
+
FrDropdownMenuShortcut,
|
|
586
|
+
FrDropdownMenuSub,
|
|
587
|
+
FrDropdownMenuSubTrigger,
|
|
588
|
+
FrDropdownMenuTrigger], exports: [FrDropdownMenu,
|
|
589
|
+
FrDropdownMenuCheckboxItem,
|
|
590
|
+
FrDropdownMenuContent,
|
|
591
|
+
FrDropdownMenuItem,
|
|
592
|
+
FrDropdownMenuItemIndicator,
|
|
593
|
+
FrDropdownMenuLabel,
|
|
594
|
+
FrDropdownMenuPanel,
|
|
595
|
+
FrDropdownMenuRadioGroup,
|
|
596
|
+
FrDropdownMenuRadioItem,
|
|
597
|
+
FrDropdownMenuSeparator,
|
|
598
|
+
FrDropdownMenuShortcut,
|
|
599
|
+
FrDropdownMenuSub,
|
|
600
|
+
FrDropdownMenuSubTrigger,
|
|
601
|
+
FrDropdownMenuTrigger] });
|
|
602
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuModule });
|
|
603
|
+
}
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: FrDropdownMenuModule, decorators: [{
|
|
605
|
+
type: NgModule,
|
|
606
|
+
args: [{
|
|
607
|
+
imports: [
|
|
608
|
+
FrDropdownMenu,
|
|
609
|
+
FrDropdownMenuCheckboxItem,
|
|
610
|
+
FrDropdownMenuContent,
|
|
611
|
+
FrDropdownMenuItem,
|
|
612
|
+
FrDropdownMenuItemIndicator,
|
|
613
|
+
FrDropdownMenuLabel,
|
|
614
|
+
FrDropdownMenuPanel,
|
|
615
|
+
FrDropdownMenuRadioGroup,
|
|
616
|
+
FrDropdownMenuRadioItem,
|
|
617
|
+
FrDropdownMenuSeparator,
|
|
618
|
+
FrDropdownMenuShortcut,
|
|
619
|
+
FrDropdownMenuSub,
|
|
620
|
+
FrDropdownMenuSubTrigger,
|
|
621
|
+
FrDropdownMenuTrigger,
|
|
622
|
+
],
|
|
623
|
+
exports: [
|
|
624
|
+
FrDropdownMenu,
|
|
625
|
+
FrDropdownMenuCheckboxItem,
|
|
626
|
+
FrDropdownMenuContent,
|
|
627
|
+
FrDropdownMenuItem,
|
|
628
|
+
FrDropdownMenuItemIndicator,
|
|
629
|
+
FrDropdownMenuLabel,
|
|
630
|
+
FrDropdownMenuPanel,
|
|
631
|
+
FrDropdownMenuRadioGroup,
|
|
632
|
+
FrDropdownMenuRadioItem,
|
|
633
|
+
FrDropdownMenuSeparator,
|
|
634
|
+
FrDropdownMenuShortcut,
|
|
635
|
+
FrDropdownMenuSub,
|
|
636
|
+
FrDropdownMenuSubTrigger,
|
|
637
|
+
FrDropdownMenuTrigger,
|
|
638
|
+
],
|
|
639
|
+
}]
|
|
640
|
+
}] });
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Generated bundle index. Do not edit.
|
|
644
|
+
*/
|
|
645
|
+
|
|
646
|
+
export { FR_DROPDOWN_MENU_ALIGNMENTS, FR_DROPDOWN_MENU_CONTENT, FR_DROPDOWN_MENU_ITEM_VARIANTS, FR_DROPDOWN_MENU_PARENT, FR_DROPDOWN_MENU_SIDES, FR_DROPDOWN_MENU_TRIGGER_MODES, FrDropdownMenu, FrDropdownMenuCheckboxItem, FrDropdownMenuContent, FrDropdownMenuItem, FrDropdownMenuItemIndicator, FrDropdownMenuLabel, FrDropdownMenuModule, FrDropdownMenuPanel, FrDropdownMenuRadioGroup, FrDropdownMenuRadioItem, FrDropdownMenuSeparator, FrDropdownMenuShortcut, FrDropdownMenuSub, FrDropdownMenuSubTrigger, FrDropdownMenuTree, FrDropdownMenuTrigger, buildConnectedPositions, defaultPositions };
|
|
647
|
+
//# sourceMappingURL=frame-ui-ng-components-dropdown-menu.mjs.map
|