@sixbell-telco/sdk 1.0.3 → 1.2.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +641 -163
  3. package/_index.css +85 -28
  4. package/components/avatar/src/avatar.component.d.ts +40 -26
  5. package/components/badge/src/badge.component.d.ts +0 -4
  6. package/components/button/src/button.component.d.ts +2 -2
  7. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +8 -0
  8. package/components/dialog/dialog-content/dialog-content.component.d.ts +5 -0
  9. package/components/dialog/dialog-sub-title/dialog-sub-title.component.d.ts +5 -0
  10. package/components/dialog/dialog-title/dialog-title.component.d.ts +5 -0
  11. package/components/dialog/index.d.ts +5 -0
  12. package/components/dialog/public-api.d.ts +5 -0
  13. package/components/dialog/src/dialog.component.d.ts +132 -0
  14. package/components/dropdown/dropdown-chevron/dropdown-chevron.component.d.ts +39 -0
  15. package/components/dropdown/dropdown-content/dropdown-content.component.d.ts +41 -0
  16. package/components/dropdown/dropdown-group/dropdown-group.component.d.ts +9 -0
  17. package/components/dropdown/dropdown-item/dropdown-item.component.d.ts +23 -12
  18. package/components/dropdown/dropdown-item-checkbox/dropdown-item-checkbox.component.d.ts +49 -0
  19. package/components/dropdown/dropdown-item-radio/dropdown-item-radio.component.d.ts +53 -0
  20. package/components/dropdown/dropdown-label/dropdown-label.component.d.ts +17 -0
  21. package/components/dropdown/dropdown-separator/dropdown-separator.component.d.ts +21 -0
  22. package/components/dropdown/dropdown-trigger/dropdown-trigger.component.d.ts +121 -0
  23. package/components/dropdown/public-api.d.ts +9 -0
  24. package/components/dropdown/src/dropdown.component.d.ts +20 -174
  25. package/components/dropdown/src/services/dropdown.service.d.ts +22 -0
  26. package/components/dropdown-menu/bar/dropdown-menu-bar/dropdown-menu-bar.component.d.ts +22 -0
  27. package/components/dropdown-menu/bar/dropdown-menu-bar-content/dropdown-menu-bar-content.component.d.ts +64 -0
  28. package/components/dropdown-menu/bar/dropdown-menu-bar-item/dropdown-menu-bar-item.component.d.ts +37 -0
  29. package/components/dropdown-menu/bar/dropdown-menu-bar-item-checkbox/dropdown-menu-bar-item-checkbox.component.d.ts +54 -0
  30. package/components/dropdown-menu/bar/dropdown-menu-bar-item-radio/dropdown-menu-bar-item-radio.component.d.ts +58 -0
  31. package/components/dropdown-menu/bar/dropdown-menu-bar-label/dropdown-menu-bar-label.component.d.ts +16 -0
  32. package/components/dropdown-menu/bar/dropdown-menu-bar-separator/dropdown-menu-bar-separator.component.d.ts +16 -0
  33. package/components/dropdown-menu/bar/dropdown-menu-bar-sub-trigger/dropdown-menu-bar-sub-trigger.component.d.ts +29 -0
  34. package/components/dropdown-menu/bar/dropdown-menu-bar-trigger/dropdown-menu-bar-trigger.component.d.ts +50 -0
  35. package/components/dropdown-menu/bar/index.d.ts +5 -0
  36. package/components/dropdown-menu/bar/public-api.d.ts +9 -0
  37. package/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.d.ts +23 -0
  38. package/components/dropdown-menu/context/index.d.ts +5 -0
  39. package/components/dropdown-menu/context/public-api.d.ts +1 -0
  40. package/components/dropdown-menu/dropdown-menu-chevron/dropdown-menu-chevron.component.d.ts +43 -0
  41. package/components/dropdown-menu/index.d.ts +5 -0
  42. package/components/dropdown-menu/public-api.d.ts +13 -0
  43. package/components/dropdown-menu/src/directives/dropdown-menu.directive.d.ts +40 -0
  44. package/components/dropdown-menu/src/dropdown-menu/dropdown-menu.component.d.ts +9 -0
  45. package/components/dropdown-menu/src/dropdown-menu-content/dropdown-menu-content.component.d.ts +40 -0
  46. package/components/dropdown-menu/src/dropdown-menu-group/dropdown-menu-group.component.d.ts +8 -0
  47. package/components/dropdown-menu/src/dropdown-menu-item/dropdown-menu-item.component.d.ts +38 -0
  48. package/components/dropdown-menu/src/dropdown-menu-label/dropdown-menu-label.component.d.ts +16 -0
  49. package/components/dropdown-menu/src/dropdown-menu-separator/dropdown-menu-separator.component.d.ts +16 -0
  50. package/components/dropdown-menu/src/dropdown-menu-sub/dropdown-menu-sub.component.d.ts +8 -0
  51. package/components/dropdown-menu/src/dropdown-menu-sub-content/dropdown-menu-sub-content.component.d.ts +31 -0
  52. package/components/dropdown-menu/src/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.component.d.ts +18 -0
  53. package/components/dropdown-menu/src/dropdown-menu-trigger/dropdown-menu-trigger.component.d.ts +19 -0
  54. package/components/dropdown-menu/src/services/dropdown-menu.service.d.ts +22 -0
  55. package/directives/auto-focus/src/autofocus.directive.d.ts +3 -3
  56. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +75 -39
  57. package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
  58. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +1 -1
  59. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  60. package/fesm2022/sixbell-telco-sdk-components-button.mjs +1 -0
  61. package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
  62. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +305 -0
  63. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -0
  64. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs +529 -0
  65. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-bar.mjs.map +1 -0
  66. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs +52 -0
  67. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu-context.mjs.map +1 -0
  68. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs +539 -0
  69. package/fesm2022/sixbell-telco-sdk-components-dropdown-menu.mjs.map +1 -0
  70. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +592 -213
  71. package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
  72. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +5 -2
  73. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  74. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +2 -2
  75. package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
  76. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +1 -1
  77. package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
  78. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +2 -2
  79. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  80. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +3 -3
  81. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  82. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +295 -0
  83. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -0
  84. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +332 -0
  85. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -0
  86. package/package.json +29 -9
  87. package/sixbell-telco-sdk-1.2.0.tgz +0 -0
  88. package/utils/theme/README.md +185 -0
  89. package/{components/modal → utils/theme}/index.d.ts +1 -1
  90. package/utils/theme/public-api.d.ts +1 -0
  91. package/utils/theme/src/theme.service.d.ts +206 -0
  92. package/utils/translation/README.md +274 -0
  93. package/utils/translation/index.d.ts +5 -0
  94. package/utils/translation/public-api.d.ts +5 -0
  95. package/utils/translation/src/translation.service.d.ts +197 -0
  96. package/components/modal/modal-actions/modal-actions.component.d.ts +0 -8
  97. package/components/modal/modal-content/modal-content.component.d.ts +0 -5
  98. package/components/modal/modal-title/modal-title.component.d.ts +0 -5
  99. package/components/modal/public-api.d.ts +0 -4
  100. package/components/modal/src/modal.component.d.ts +0 -102
  101. package/fesm2022/sixbell-telco-sdk-components-modal.mjs +0 -202
  102. package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +0 -1
  103. package/sixbell-telco-sdk-1.0.3.tgz +0 -0
@@ -0,0 +1,52 @@
1
+ import * as i1 from '@angular/cdk/menu';
2
+ import { CdkContextMenuTrigger } from '@angular/cdk/menu';
3
+ import { DOCUMENT } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, input, Component } from '@angular/core';
6
+
7
+ /**
8
+ * DropdownContextMenuTrigger - Trigger for context menu (right-click)
9
+ */
10
+ class DropdownContextMenuTriggerComponent {
11
+ document = inject(DOCUMENT);
12
+ originalBodyOverflow = '';
13
+ /**
14
+ * Whether the context menu is disabled
15
+ */
16
+ disabled = input(false);
17
+ /**
18
+ * Handle menu opened - prevent body scroll
19
+ */
20
+ onMenuOpened() {
21
+ this.originalBodyOverflow = this.document.body.style.overflow;
22
+ this.document.body.style.overflow = 'hidden';
23
+ }
24
+ /**
25
+ * Handle menu closed - restore body scroll
26
+ */
27
+ onMenuClosed() {
28
+ this.document.body.style.overflow = this.originalBodyOverflow;
29
+ }
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownContextMenuTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownContextMenuTriggerComponent, isStandalone: true, selector: "st-dropdown-context-menu-trigger", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "opened": "onMenuOpened()", "closed": "onMenuClosed()" } }, hostDirectives: [{ directive: i1.CdkContextMenuTrigger, inputs: ["cdkContextMenuTriggerFor", "menuTriggerFor"], outputs: ["cdkContextMenuOpened", "opened", "cdkContextMenuClosed", "closed"] }], ngImport: i0, template: "<ng-content></ng-content>\n" });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownContextMenuTriggerComponent, decorators: [{
34
+ type: Component,
35
+ args: [{ selector: 'st-dropdown-context-menu-trigger', standalone: true, imports: [], hostDirectives: [
36
+ {
37
+ directive: CdkContextMenuTrigger,
38
+ inputs: ['cdkContextMenuTriggerFor: menuTriggerFor'],
39
+ outputs: ['cdkContextMenuOpened: opened', 'cdkContextMenuClosed: closed'],
40
+ },
41
+ ], host: {
42
+ '(opened)': 'onMenuOpened()',
43
+ '(closed)': 'onMenuClosed()',
44
+ }, template: "<ng-content></ng-content>\n" }]
45
+ }] });
46
+
47
+ /**
48
+ * Generated bundle index. Do not edit.
49
+ */
50
+
51
+ export { DropdownContextMenuTriggerComponent };
52
+ //# sourceMappingURL=sixbell-telco-sdk-components-dropdown-menu-context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sixbell-telco-sdk-components-dropdown-menu-context.mjs","sources":["../../../projects/sdk/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.ts","../../../projects/sdk/components/dropdown-menu/context/dropdown-context-menu-trigger/dropdown-context-menu-trigger.component.html","../../../projects/sdk/components/dropdown-menu/context/sixbell-telco-sdk-components-dropdown-menu-context.ts"],"sourcesContent":["import { CdkContextMenuTrigger } from '@angular/cdk/menu';\nimport { DOCUMENT } from '@angular/common';\nimport { Component, inject, input } from '@angular/core';\n\n/**\n * DropdownContextMenuTrigger - Trigger for context menu (right-click)\n */\n@Component({\n\tselector: 'st-dropdown-context-menu-trigger',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './dropdown-context-menu-trigger.component.html',\n\thostDirectives: [\n\t\t{\n\t\t\tdirective: CdkContextMenuTrigger,\n\t\t\tinputs: ['cdkContextMenuTriggerFor: menuTriggerFor'],\n\t\t\toutputs: ['cdkContextMenuOpened: opened', 'cdkContextMenuClosed: closed'],\n\t\t},\n\t],\n\thost: {\n\t\t'(opened)': 'onMenuOpened()',\n\t\t'(closed)': 'onMenuClosed()',\n\t},\n})\nexport class DropdownContextMenuTriggerComponent {\n\tprivate readonly document = inject(DOCUMENT);\n\tprivate originalBodyOverflow = '';\n\n\t/**\n\t * Whether the context menu is disabled\n\t */\n\tdisabled = input<boolean>(false);\n\n\t/**\n\t * Handle menu opened - prevent body scroll\n\t */\n\tonMenuOpened(): void {\n\t\tthis.originalBodyOverflow = this.document.body.style.overflow;\n\t\tthis.document.body.style.overflow = 'hidden';\n\t}\n\n\t/**\n\t * Handle menu closed - restore body scroll\n\t */\n\tonMenuClosed(): void {\n\t\tthis.document.body.style.overflow = this.originalBodyOverflow;\n\t}\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIA;;AAEG;MAkBU,mCAAmC,CAAA;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IACpC,oBAAoB,GAAG,EAAE;AAEjC;;AAEG;AACH,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAEhC;;AAEG;IACH,YAAY,GAAA;AACX,QAAA,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;QAC7D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ;;AAG7C;;AAEG;IACH,YAAY,GAAA;AACX,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,oBAAoB;;uGArBlD,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mCAAmC,4fCxBhD,6BACA,EAAA,CAAA;;2FDuBa,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAjB/C,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kCAAkC,EAChC,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,EAAE,EAEK,cAAA,EAAA;AACf,wBAAA;AACC,4BAAA,SAAS,EAAE,qBAAqB;4BAChC,MAAM,EAAE,CAAC,0CAA0C,CAAC;AACpD,4BAAA,OAAO,EAAE,CAAC,8BAA8B,EAAE,8BAA8B,CAAC;AACzE,yBAAA;qBACD,EACK,IAAA,EAAA;AACL,wBAAA,UAAU,EAAE,gBAAgB;AAC5B,wBAAA,UAAU,EAAE,gBAAgB;AAC5B,qBAAA,EAAA,QAAA,EAAA,6BAAA,EAAA;;;AEtBF;;AAEG;;;;"}
@@ -0,0 +1,539 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, Injectable, inject, input, computed, Component, output, TemplateRef, ViewChild, Directive } from '@angular/core';
3
+ import { IconComponent } from '@sixbell-telco/sdk/components/icon';
4
+ import { matChevronRight } from '@sixbell-telco/sdk/components/icon/material/baseline';
5
+ import { cn } from '@sixbell-telco/sdk/utils/cn';
6
+ import * as i1 from '@angular/cdk/menu';
7
+ import { MENU_STACK, CdkMenu, CdkMenuItem, CdkMenuTrigger, MenuStack } from '@angular/cdk/menu';
8
+ import { CommonModule } from '@angular/common';
9
+
10
+ /**
11
+ * Service to manage dropdown menu state
12
+ * Used by dropdown menu components to communicate state to chevron
13
+ */
14
+ class DropdownMenuStateService {
15
+ _isOpen = signal(false);
16
+ /**
17
+ * Current open state of the dropdown menu
18
+ */
19
+ isOpen = this._isOpen.asReadonly();
20
+ /**
21
+ * Set the open state
22
+ */
23
+ setOpen(open) {
24
+ this._isOpen.set(open);
25
+ }
26
+ /**
27
+ * Toggle the open state
28
+ */
29
+ toggle() {
30
+ this._isOpen.update((current) => !current);
31
+ }
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
33
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuStateService });
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuStateService, decorators: [{
36
+ type: Injectable
37
+ }] });
38
+
39
+ /**
40
+ * DropdownMenuChevron - Chevron indicator for dropdown menu triggers (especially submenus)
41
+ * Automatically rotates based on menu state
42
+ */
43
+ class DropdownMenuChevronComponent {
44
+ dropdownMenuService = inject(DropdownMenuStateService, { optional: true });
45
+ /**
46
+ * Custom icon to use instead of default chevron right
47
+ */
48
+ icon = input(matChevronRight);
49
+ /**
50
+ * Additional CSS classes
51
+ */
52
+ class = input('');
53
+ /**
54
+ * Size of the chevron using Icon component size types
55
+ */
56
+ size = input('md');
57
+ /**
58
+ * Color of the chevron using Icon component color types
59
+ */
60
+ color = input('inherit');
61
+ /**
62
+ * Position relative to content
63
+ */
64
+ position = input('right');
65
+ /**
66
+ * Whether the menu is open (for rotation) - now uses service or input
67
+ */
68
+ isOpen = input(false);
69
+ /**
70
+ * Computed open state that uses service first, then input
71
+ */
72
+ computedIsOpen = computed(() => {
73
+ const serviceState = this.dropdownMenuService?.isOpen() ?? false;
74
+ const inputState = this.isOpen();
75
+ return serviceState || inputState;
76
+ });
77
+ /**
78
+ * Computed classes for the chevron
79
+ */
80
+ chevronClasses = computed(() => {
81
+ const marginClasses = {
82
+ left: 'mr-2',
83
+ right: 'ml-2',
84
+ };
85
+ return cn(marginClasses[this.position()], 'transition-transform duration-200 ease-in-out', this.computedIsOpen() && 'rotate-90', this.class());
86
+ });
87
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuChevronComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
88
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuChevronComponent, isStandalone: true, selector: "st-dropdown-menu-chevron", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<st-icon [icon]=\"icon()\" [size]=\"size()\" [color]=\"color()\" [class]=\"chevronClasses()\"></st-icon>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }] });
89
+ }
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuChevronComponent, decorators: [{
91
+ type: Component,
92
+ args: [{ selector: 'st-dropdown-menu-chevron', standalone: true, imports: [IconComponent], template: "<st-icon [icon]=\"icon()\" [size]=\"size()\" [color]=\"color()\" [class]=\"chevronClasses()\"></st-icon>\n" }]
93
+ }] });
94
+
95
+ /**
96
+ * DropdownMenuContent - Container for dropdown menu items
97
+ */
98
+ class DropdownMenuContentComponent {
99
+ menuStack = inject(MENU_STACK, { optional: true });
100
+ template;
101
+ ngAfterViewInit() {
102
+ // Ensure template is available
103
+ console.log('Menu template ref:', this.template);
104
+ }
105
+ /**
106
+ * Custom CSS classes
107
+ */
108
+ class = input('');
109
+ /**
110
+ * Size variant
111
+ */
112
+ size = input('md');
113
+ /**
114
+ * Emitted when the menu is closed
115
+ */
116
+ closed = output();
117
+ /**
118
+ * Handle ESC key press
119
+ */
120
+ onEscapeKey(event) {
121
+ event.preventDefault();
122
+ event.stopPropagation();
123
+ this.closeMenu();
124
+ }
125
+ /**
126
+ * Handle menu closed event
127
+ */
128
+ onMenuClosed() {
129
+ this.closed.emit();
130
+ // Additional cleanup can be done here if needed
131
+ }
132
+ /**
133
+ * Close this menu and all child menus
134
+ */
135
+ closeMenu() {
136
+ this.menuStack?.closeAll();
137
+ }
138
+ /**
139
+ * Computed CSS classes for the menu
140
+ */
141
+ menuClass = () => cn('menu', 'bg-base-200', 'rounded-box', 'shadow-main', 'border', 'border-neutral', 'min-w-full', {
142
+ 'menu-xs': this.size() === 'xs',
143
+ 'menu-sm': this.size() === 'sm',
144
+ 'menu-md': this.size() === 'md',
145
+ 'menu-lg': this.size() === 'lg',
146
+ 'menu-xl': this.size() === 'xl',
147
+ }, this.class());
148
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
149
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuContentComponent, isStandalone: true, selector: "st-dropdown-menu-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { listeners: { "keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["menuTemplate"], descendants: true, read: TemplateRef, static: true }], exportAs: ["menuContent"], ngImport: i0, template: "<ng-template #menuTemplate>\n\t<ul cdkMenu role=\"menu\" [class]=\"menuClass()\" (closed)=\"onMenuClosed()\" tabindex=\"-1\">\n\t\t<ng-content></ng-content>\n\t</ul>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }] });
150
+ }
151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuContentComponent, decorators: [{
152
+ type: Component,
153
+ args: [{ selector: 'st-dropdown-menu-content', standalone: true, imports: [CdkMenu], host: {
154
+ '(keydown.escape)': 'onEscapeKey($event)',
155
+ }, exportAs: 'menuContent', template: "<ng-template #menuTemplate>\n\t<ul cdkMenu role=\"menu\" [class]=\"menuClass()\" (closed)=\"onMenuClosed()\" tabindex=\"-1\">\n\t\t<ng-content></ng-content>\n\t</ul>\n</ng-template>\n" }]
156
+ }], propDecorators: { template: [{
157
+ type: ViewChild,
158
+ args: ['menuTemplate', { static: true, read: TemplateRef }]
159
+ }] } });
160
+
161
+ /**
162
+ * DropdownMenuGroup - Groups related menu items together
163
+ */
164
+ class DropdownMenuGroupComponent {
165
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
166
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DropdownMenuGroupComponent, isStandalone: true, selector: "st-dropdown-menu-group", ngImport: i0, template: "<ng-content></ng-content>\n" });
167
+ }
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuGroupComponent, decorators: [{
169
+ type: Component,
170
+ args: [{ selector: 'st-dropdown-menu-group', standalone: true, imports: [], template: "<ng-content></ng-content>\n" }]
171
+ }] });
172
+
173
+ /**
174
+ * DropdownMenuItem - Individual menu item
175
+ */
176
+ class DropdownMenuItemComponent {
177
+ menuStack = inject(MENU_STACK, { optional: true });
178
+ /**
179
+ * Whether the menu item is disabled
180
+ */
181
+ disabled = input(false);
182
+ /**
183
+ * Whether the menu item is active
184
+ */
185
+ active = input(false);
186
+ /**
187
+ * Optional keyboard shortcut text
188
+ */
189
+ shortcut = input();
190
+ /**
191
+ * Custom CSS classes
192
+ */
193
+ class = input('');
194
+ /**
195
+ * Emitted when the menu item is triggered/clicked
196
+ */
197
+ triggered = output();
198
+ /**
199
+ * Handle item click - close all menus unless disabled
200
+ */
201
+ onItemClick() {
202
+ if (!this.disabled()) {
203
+ // Emit the triggered event first
204
+ this.triggered.emit();
205
+ // For context menus, we need to close ALL menus including nested ones
206
+ // Use requestAnimationFrame to ensure the DOM has processed the click
207
+ requestAnimationFrame(() => {
208
+ // Close all menus in the stack - this should close the entire hierarchy
209
+ if (this.menuStack) {
210
+ this.menuStack.closeAll();
211
+ }
212
+ // Additional fallback: try to close any remaining open context menus
213
+ // by dispatching escape key or clicking outside
214
+ const escapeEvent = new KeyboardEvent('keydown', {
215
+ key: 'Escape',
216
+ bubbles: true,
217
+ cancelable: true,
218
+ });
219
+ document.dispatchEvent(escapeEvent);
220
+ });
221
+ }
222
+ }
223
+ /**
224
+ * Computed CSS classes for the menu item
225
+ */
226
+ itemClass = () => cn({
227
+ 'menu-disabled': this.disabled(),
228
+ 'menu-active': this.active(),
229
+ }, this.class());
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
231
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: DropdownMenuItemComponent, isStandalone: true, selector: "st-dropdown-menu-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, shortcut: { classPropertyName: "shortcut", publicName: "shortcut", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { triggered: "triggered" }, hostDirectives: [{ directive: i1.CdkMenuItem, outputs: ["cdkMenuItemTriggered", "triggered"] }], ngImport: i0, template: "<li [class]=\"itemClass()\" (click)=\"onItemClick()\" (keydown.enter)=\"onItemClick()\" (keydown.space)=\"onItemClick()\" tabindex=\"0\" role=\"menuitem\">\n\t<a class=\"flex items-center justify-between\">\n\t\t<span class=\"flex-1\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t@if (shortcut(); as shortcutText) {\n\t\t\t<span class=\"ml-auto text-xs opacity-60\">{{ shortcutText }}</span>\n\t\t}\n\t</a>\n</li>\n" });
232
+ }
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuItemComponent, decorators: [{
234
+ type: Component,
235
+ args: [{ selector: 'st-dropdown-menu-item', standalone: true, imports: [], hostDirectives: [
236
+ {
237
+ directive: CdkMenuItem,
238
+ outputs: ['cdkMenuItemTriggered: triggered'],
239
+ },
240
+ ], template: "<li [class]=\"itemClass()\" (click)=\"onItemClick()\" (keydown.enter)=\"onItemClick()\" (keydown.space)=\"onItemClick()\" tabindex=\"0\" role=\"menuitem\">\n\t<a class=\"flex items-center justify-between\">\n\t\t<span class=\"flex-1\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t@if (shortcut(); as shortcutText) {\n\t\t\t<span class=\"ml-auto text-xs opacity-60\">{{ shortcutText }}</span>\n\t\t}\n\t</a>\n</li>\n" }]
241
+ }] });
242
+
243
+ /**
244
+ * DropdownMenuLabel - Label for menu sections
245
+ */
246
+ class DropdownMenuLabelComponent {
247
+ /**
248
+ * Custom CSS classes
249
+ */
250
+ class = input('');
251
+ /**
252
+ * Computed CSS classes for the label
253
+ */
254
+ labelClass = () => cn('menu-title', this.class());
255
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
256
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuLabelComponent, isStandalone: true, selector: "st-dropdown-menu-label", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<li [class]=\"labelClass()\">\n\t<ng-content></ng-content>\n</li>\n" });
257
+ }
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuLabelComponent, decorators: [{
259
+ type: Component,
260
+ args: [{ selector: 'st-dropdown-menu-label', standalone: true, template: "<li [class]=\"labelClass()\">\n\t<ng-content></ng-content>\n</li>\n" }]
261
+ }] });
262
+
263
+ /**
264
+ * DropdownMenuSeparator - Visual separator between menu sections
265
+ */
266
+ class DropdownMenuSeparatorComponent {
267
+ /**
268
+ * Custom CSS classes
269
+ */
270
+ class = input('');
271
+ /**
272
+ * Computed CSS classes for the separator
273
+ */
274
+ separatorClass = () => cn('pointer-events-none w-full p-0 left-0 top-0 mx-0 my-1', this.class());
275
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
276
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuSeparatorComponent, isStandalone: true, selector: "st-dropdown-menu-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<li [class]=\"separatorClass()\"></li>\n" });
277
+ }
278
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSeparatorComponent, decorators: [{
279
+ type: Component,
280
+ args: [{ selector: 'st-dropdown-menu-separator', standalone: true, template: "<li [class]=\"separatorClass()\"></li>\n" }]
281
+ }] });
282
+
283
+ /**
284
+ * DropdownMenuSubContent - Container for submenu items
285
+ */
286
+ class DropdownMenuSubContentComponent {
287
+ menuStack = inject(MENU_STACK, { optional: true });
288
+ template;
289
+ /**
290
+ * Custom CSS classes
291
+ */
292
+ class = input('');
293
+ /**
294
+ * Size variant
295
+ */
296
+ size = input('md');
297
+ /**
298
+ * Handle ESC key press
299
+ */
300
+ onEscapeKey(event) {
301
+ event.preventDefault();
302
+ event.stopPropagation();
303
+ this.closeMenu();
304
+ }
305
+ /**
306
+ * Close this menu and all child menus
307
+ */
308
+ closeMenu() {
309
+ this.menuStack?.closeAll();
310
+ }
311
+ /**
312
+ * Computed CSS classes for the submenu
313
+ */
314
+ subMenuClass = () => cn('menu', 'bg-base-200', 'rounded-box', 'shadow-main', 'border', 'border-neutral', 'min-w-full', {
315
+ 'menu-xs': this.size() === 'xs',
316
+ 'menu-sm': this.size() === 'sm',
317
+ 'menu-md': this.size() === 'md',
318
+ 'menu-lg': this.size() === 'lg',
319
+ 'menu-xl': this.size() === 'xl',
320
+ }, this.class());
321
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
322
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuSubContentComponent, isStandalone: true, selector: "st-dropdown-menu-sub-content", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "onEscapeKey($event)" } }, viewQueries: [{ propertyName: "template", first: true, predicate: ["menuTemplate"], descendants: true, read: TemplateRef, static: true }], exportAs: ["menuContent"], ngImport: i0, template: "<ng-template #menuTemplate>\n\t<ul cdkMenu role=\"menu\" [class]=\"subMenuClass()\" tabindex=\"-1\">\n\t\t<ng-content></ng-content>\n\t</ul>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkMenu, selector: "[cdkMenu]", outputs: ["closed"], exportAs: ["cdkMenu"] }] });
323
+ }
324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubContentComponent, decorators: [{
325
+ type: Component,
326
+ args: [{ selector: 'st-dropdown-menu-sub-content', standalone: true, imports: [CdkMenu], exportAs: 'menuContent', host: {
327
+ '(keydown.escape)': 'onEscapeKey($event)',
328
+ }, template: "<ng-template #menuTemplate>\n\t<ul cdkMenu role=\"menu\" [class]=\"subMenuClass()\" tabindex=\"-1\">\n\t\t<ng-content></ng-content>\n\t</ul>\n</ng-template>\n" }]
329
+ }], propDecorators: { template: [{
330
+ type: ViewChild,
331
+ args: ['menuTemplate', { static: true, read: TemplateRef }]
332
+ }] } });
333
+
334
+ /**
335
+ * DropdownMenuSubTrigger - Trigger for opening a submenu
336
+ */
337
+ class DropdownMenuSubTriggerComponent {
338
+ dropdownMenuService = inject(DropdownMenuStateService, { optional: true });
339
+ // Icons
340
+ iconChevronRight = matChevronRight;
341
+ // Inputs
342
+ disabled = input(false);
343
+ className = input();
344
+ // State - use local signal for this specific submenu
345
+ isOpen = signal(false);
346
+ // Computed styles
347
+ triggerClass = computed(() => cn('focus:outline-none focus:bg-base-200 hover:bg-base-200 cursor-pointer', this.disabled() && 'disabled pointer-events-none opacity-50', this.className()));
348
+ chevronClass = computed(() => cn('w-4 h-4 transition-transform duration-200 ease-in-out', this.isOpen() && 'rotate-90'));
349
+ // Event handlers
350
+ onMenuOpened() {
351
+ this.isOpen.set(true);
352
+ // Also sync with the dropdown menu service if available
353
+ this.dropdownMenuService?.setOpen(true);
354
+ }
355
+ onMenuClosed() {
356
+ this.isOpen.set(false);
357
+ // Also sync with the dropdown menu service if available
358
+ this.dropdownMenuService?.setOpen(false);
359
+ }
360
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
361
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuSubTriggerComponent, isStandalone: true, selector: "st-dropdown-menu-sub-trigger", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "cdkMenuOpened": "onMenuOpened()", "cdkMenuClosed": "onMenuClosed()" } }, hostDirectives: [{ directive: i1.CdkMenuItem }, { directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "menuTriggerFor"], outputs: ["cdkMenuOpened", "cdkMenuOpened", "cdkMenuClosed", "cdkMenuClosed"] }], ngImport: i0, template: "<li [class]=\"triggerClass()\" (cdkMenuOpened)=\"onMenuOpened()\" (cdkMenuClosed)=\"onMenuClosed()\">\n\t<a class=\"flex items-center justify-between\">\n\t\t<span class=\"flex-1\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<st-icon [icon]=\"iconChevronRight\" color=\"inherit\" [class]=\"chevronClass()\"></st-icon>\n\t</a>\n</li>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "st-icon", inputs: ["color", "size", "icon"] }] });
362
+ }
363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubTriggerComponent, decorators: [{
364
+ type: Component,
365
+ args: [{ selector: 'st-dropdown-menu-sub-trigger', standalone: true, imports: [IconComponent], hostDirectives: [
366
+ {
367
+ directive: CdkMenuItem,
368
+ },
369
+ {
370
+ directive: CdkMenuTrigger,
371
+ inputs: ['cdkMenuTriggerFor: menuTriggerFor'],
372
+ outputs: ['cdkMenuOpened: cdkMenuOpened', 'cdkMenuClosed: cdkMenuClosed'],
373
+ },
374
+ ], host: {
375
+ '(cdkMenuOpened)': 'onMenuOpened()',
376
+ '(cdkMenuClosed)': 'onMenuClosed()',
377
+ }, template: "<li [class]=\"triggerClass()\" (cdkMenuOpened)=\"onMenuOpened()\" (cdkMenuClosed)=\"onMenuClosed()\">\n\t<a class=\"flex items-center justify-between\">\n\t\t<span class=\"flex-1\">\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<st-icon [icon]=\"iconChevronRight\" color=\"inherit\" [class]=\"chevronClass()\"></st-icon>\n\t</a>\n</li>\n" }]
378
+ }] });
379
+
380
+ /**
381
+ * DropdownMenuSub - Container for submenu functionality
382
+ */
383
+ class DropdownMenuSubComponent {
384
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
385
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DropdownMenuSubComponent, isStandalone: true, selector: "st-dropdown-menu-sub", providers: [
386
+ {
387
+ provide: MENU_STACK,
388
+ useClass: MenuStack,
389
+ },
390
+ ], ngImport: i0, template: "<ng-content></ng-content>\n" });
391
+ }
392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuSubComponent, decorators: [{
393
+ type: Component,
394
+ args: [{ selector: 'st-dropdown-menu-sub', standalone: true, providers: [
395
+ {
396
+ provide: MENU_STACK,
397
+ useClass: MenuStack,
398
+ },
399
+ ], template: "<ng-content></ng-content>\n" }]
400
+ }] });
401
+
402
+ /**
403
+ * DropdownMenuTrigger - Trigger element for opening dropdown menu
404
+ * The component acts as the trigger itself
405
+ */
406
+ class DropdownMenuTriggerComponent {
407
+ dropdownMenuService = inject(DropdownMenuStateService, { optional: true });
408
+ /**
409
+ * Handle menu opened event
410
+ */
411
+ onMenuOpened() {
412
+ this.dropdownMenuService?.setOpen(true);
413
+ }
414
+ /**
415
+ * Handle menu closed event
416
+ */
417
+ onMenuClosed() {
418
+ this.dropdownMenuService?.setOpen(false);
419
+ }
420
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
421
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DropdownMenuTriggerComponent, isStandalone: true, selector: "st-dropdown-menu-trigger", host: { attributes: { "cdkMenuItem": "", "role": "button", "tabindex": "0" }, listeners: { "cdkMenuOpened": "onMenuOpened()", "cdkMenuClosed": "onMenuClosed()" }, styleAttribute: "display: inline-block; cursor: pointer;" }, hostDirectives: [{ directive: i1.CdkMenuTrigger, inputs: ["cdkMenuTriggerFor", "menuTriggerFor"], outputs: ["cdkMenuOpened", "cdkMenuOpened", "cdkMenuClosed", "cdkMenuClosed"] }, { directive: i1.CdkMenuItem }], ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] });
422
+ }
423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuTriggerComponent, decorators: [{
424
+ type: Component,
425
+ args: [{ selector: 'st-dropdown-menu-trigger', standalone: true, imports: [CommonModule], host: {
426
+ cdkMenuItem: '',
427
+ role: 'button',
428
+ tabindex: '0',
429
+ style: 'display: inline-block; cursor: pointer;',
430
+ '(cdkMenuOpened)': 'onMenuOpened()',
431
+ '(cdkMenuClosed)': 'onMenuClosed()',
432
+ }, hostDirectives: [
433
+ {
434
+ directive: CdkMenuTrigger,
435
+ inputs: ['cdkMenuTriggerFor: menuTriggerFor'],
436
+ outputs: ['cdkMenuOpened: cdkMenuOpened', 'cdkMenuClosed: cdkMenuClosed'],
437
+ },
438
+ {
439
+ directive: CdkMenuItem,
440
+ },
441
+ ], template: "<ng-content></ng-content>\n" }]
442
+ }] });
443
+
444
+ /**
445
+ * DropdownMenu - Container component that provides the menu context
446
+ * Provides a shared MENU_STACK for all nested menus and DropdownMenuStateService for state management
447
+ */
448
+ class DropdownMenuComponent {
449
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
450
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DropdownMenuComponent, isStandalone: true, selector: "st-dropdown-menu", providers: [
451
+ {
452
+ provide: MENU_STACK,
453
+ useClass: MenuStack,
454
+ },
455
+ DropdownMenuStateService,
456
+ ], ngImport: i0, template: "<ng-content></ng-content>\n" });
457
+ }
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuComponent, decorators: [{
459
+ type: Component,
460
+ args: [{ selector: 'st-dropdown-menu', standalone: true, providers: [
461
+ {
462
+ provide: MENU_STACK,
463
+ useClass: MenuStack,
464
+ },
465
+ DropdownMenuStateService,
466
+ ], template: "<ng-content></ng-content>\n" }]
467
+ }] });
468
+
469
+ /**
470
+ * Directive to mark an element as dropdown menu content
471
+ * This allows the trigger to reference the content without ng-template
472
+ */
473
+ class DropdownMenuContentDirective {
474
+ elementRef;
475
+ /**
476
+ * Unique identifier for this menu content
477
+ */
478
+ contentId = input.required();
479
+ constructor(elementRef) {
480
+ this.elementRef = elementRef;
481
+ }
482
+ /**
483
+ * Get the native element for CDK menu trigger
484
+ */
485
+ get element() {
486
+ return this.elementRef.nativeElement;
487
+ }
488
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuContentDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
489
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.0", type: DropdownMenuContentDirective, isStandalone: true, selector: "[stDropdownMenuContent]", inputs: { contentId: { classPropertyName: "contentId", publicName: "contentId", isSignal: true, isRequired: true, transformFunction: null } }, exportAs: ["dropdownMenuContent"], ngImport: i0 });
490
+ }
491
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuContentDirective, decorators: [{
492
+ type: Directive,
493
+ args: [{
494
+ selector: '[stDropdownMenuContent]',
495
+ standalone: true,
496
+ exportAs: 'dropdownMenuContent',
497
+ }]
498
+ }], ctorParameters: () => [{ type: i0.ElementRef }] });
499
+ /**
500
+ * Service to manage dropdown menu content references
501
+ */
502
+ class DropdownMenuService {
503
+ contentRegistry = new Map();
504
+ /**
505
+ * Register a menu content directive
506
+ */
507
+ registerContent(id, directive) {
508
+ this.contentRegistry.set(id, directive);
509
+ }
510
+ /**
511
+ * Unregister a menu content directive
512
+ */
513
+ unregisterContent(id) {
514
+ this.contentRegistry.delete(id);
515
+ }
516
+ /**
517
+ * Get a registered menu content by ID
518
+ */
519
+ getContent(id) {
520
+ return this.contentRegistry.get(id);
521
+ }
522
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
523
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuService, providedIn: 'root' });
524
+ }
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DropdownMenuService, decorators: [{
526
+ type: Injectable,
527
+ args: [{
528
+ providedIn: 'root',
529
+ }]
530
+ }] });
531
+
532
+ // Menu components
533
+
534
+ /**
535
+ * Generated bundle index. Do not edit.
536
+ */
537
+
538
+ export { DropdownMenuChevronComponent, DropdownMenuComponent, DropdownMenuContentComponent, DropdownMenuContentDirective, DropdownMenuGroupComponent, DropdownMenuItemComponent, DropdownMenuLabelComponent, DropdownMenuSeparatorComponent, DropdownMenuService, DropdownMenuStateService, DropdownMenuSubComponent, DropdownMenuSubContentComponent, DropdownMenuSubTriggerComponent, DropdownMenuTriggerComponent };
539
+ //# sourceMappingURL=sixbell-telco-sdk-components-dropdown-menu.mjs.map