@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
@@ -1,202 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { input, computed, ChangeDetectionStrategy, Component, output, viewChild, model, effect } from '@angular/core';
4
- import { cn } from '@sixbell-telco/sdk/utils/cn';
5
- import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
6
- import { matCloseOutline } from '@sixbell-telco/sdk/components/icon/material/outline';
7
- import { cva } from 'class-variance-authority';
8
-
9
- class ModalActionsComponent {
10
- // Base table properties
11
- alignment = input('left');
12
- componentClass = computed(() => cn('modal-action text-pretty font-body leading-normal', {
13
- 'justify-start': this.alignment() === 'left',
14
- 'justify-end': this.alignment() === 'right',
15
- 'justify-center': this.alignment() === 'center',
16
- }));
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: ModalActionsComponent, isStandalone: true, selector: "st-modal-actions", inputs: { alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
- }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalActionsComponent, decorators: [{
21
- type: Component,
22
- args: [{ selector: 'st-modal-actions', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n" }]
23
- }] });
24
-
25
- class ModalContentComponent {
26
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: ModalContentComponent, isStandalone: true, selector: "st-modal-content", ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
28
- }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalContentComponent, decorators: [{
30
- type: Component,
31
- args: [{ selector: 'st-modal-content', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
32
- }] });
33
-
34
- class ModalTitleComponent {
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: ModalTitleComponent, isStandalone: true, selector: "st-modal-title", ngImport: i0, template: "<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalTitleComponent, decorators: [{
39
- type: Component,
40
- args: [{ selector: 'st-modal-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n" }]
41
- }] });
42
-
43
- /**
44
- * CSS class generator for modal component variants
45
- * @internal
46
- */
47
- const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-content', 'w-11/12'], {
48
- variants: {
49
- width: {
50
- xs: ['max-w-xs'],
51
- sm: ['max-w-sm'],
52
- md: ['max-w-md'],
53
- lg: ['max-w-lg'],
54
- xl: ['max-w-xl'],
55
- '2xl': ['max-w-2xl'],
56
- '3xl': ['max-w-3xl'],
57
- '4xl': ['max-w-4xl'],
58
- '5xl': ['max-w-5xl'],
59
- },
60
- aligment: {
61
- top: ['modal-top'],
62
- center: ['modal-middle'],
63
- bottom: ['modal-bottom'],
64
- start: ['modal-start'],
65
- end: ['modal-end'],
66
- },
67
- },
68
- compoundVariants: [],
69
- defaultVariants: {
70
- width: 'md',
71
- aligment: 'center',
72
- },
73
- });
74
- /**
75
- * A customizable modal dialog component with Tailwind CSS integration
76
- *
77
- * @remarks
78
- * Uses Angular's signal-based inputs and outputs for reactive state management.
79
- * Supports various sizes and vertical alignments through input properties.
80
- *
81
- * @example
82
- * ```html
83
- * <st-modal
84
- * modalId="confirmDialog"
85
- * [(opened)]="isOpen"
86
- * width="lg"
87
- * alignment="top"
88
- * (close)="handleClose()"
89
- * (clickOutside)="handleClickOustide()"
90
- * />
91
- * ```
92
- */
93
- class ModalComponent {
94
- /**
95
- * Specifies the maximum width of the modal content
96
- * @defaultValue 'md'
97
- */
98
- width = input();
99
- /**
100
- * Controls the vertical positioning of the modal
101
- * @defaultValue 'center'
102
- */
103
- alignment = input('center');
104
- /** Required unique identifier for the modal dialog */
105
- modalId = input.required();
106
- /** Event emitted when clicking outside the modal content */
107
- clickOutside = output();
108
- /** Event emitted when the modal closes */
109
- closed = output();
110
- /** @internal Icon reference for close button */
111
- iconClose = matCloseOutline;
112
- /** @internal Reference to the underlying dialog element */
113
- dialog = viewChild('dialog');
114
- /**
115
- * Controls the visibility state of the modal
116
- * Supports two-way binding via Angular's model
117
- */
118
- opened = model(false);
119
- /** @internal Handles open/close state changes */
120
- openedEffect = effect(() => {
121
- if (this.opened()) {
122
- this.handleOpen();
123
- }
124
- else {
125
- this.handleClose();
126
- }
127
- });
128
- /**
129
- * Computes CSS classes for modal content based on current configuration
130
- * @returns Combined Tailwind classes string
131
- * @internal
132
- */
133
- componentClass = computed(() => {
134
- return cn(modalComponent({
135
- width: this.width(),
136
- aligment: this.alignment(),
137
- }));
138
- });
139
- /**
140
- * Computes CSS classes for modal overlay positioning
141
- * @returns Combined positioning classes string
142
- * @internal
143
- */
144
- modalClass = computed(() => {
145
- return cn('modal', {
146
- 'modal-top': this.alignment() === 'top',
147
- 'modal-middle': this.alignment() === 'center',
148
- 'modal-bottom': this.alignment() === 'bottom',
149
- 'modal-start': this.alignment() === 'start',
150
- 'modal-end': this.alignment() === 'end',
151
- });
152
- });
153
- /** @internal Opens the native dialog element */
154
- handleOpen() {
155
- this.dialog()?.nativeElement.showModal();
156
- }
157
- /** @internal Closes the native dialog element */
158
- handleClose() {
159
- this.dialog()?.nativeElement.close();
160
- }
161
- /**
162
- * Public method to close the modal and emit close event
163
- * Can be called directly from parent components
164
- */
165
- handleCloseClick() {
166
- this.opened.set(false);
167
- this.closed.emit();
168
- }
169
- /**
170
- * Handles cancel events from the dialog element
171
- * @param event - Native dialog cancel event
172
- * @internal
173
- */
174
- handleCancelClick(event) {
175
- event.preventDefault();
176
- this.opened.set(false);
177
- this.closed.emit();
178
- }
179
- /**
180
- * Handles click events outside the modal content
181
- * @param event - Native mouse event
182
- * @internal
183
- */
184
- handleClickOutside(event) {
185
- event.preventDefault();
186
- this.opened.set(false);
187
- this.clickOutside.emit();
188
- }
189
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.0", type: ModalComponent, isStandalone: true, selector: "st-modal", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, modalId: { classPropertyName: "modalId", publicName: "modalId", isSignal: true, isRequired: true, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickOutside: "clickOutside", closed: "closed", opened: "openedChange" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass()\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass()\">\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute top-0 right-0\" (click)=\"handleCloseClick()\">\u2715</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n", styles: [""] });
191
- }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ModalComponent, decorators: [{
193
- type: Component,
194
- args: [{ selector: 'st-modal', imports: [], template: "<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass()\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass()\">\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute top-0 right-0\" (click)=\"handleCloseClick()\">\u2715</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n" }]
195
- }] });
196
-
197
- /**
198
- * Generated bundle index. Do not edit.
199
- */
200
-
201
- export { ModalActionsComponent, ModalComponent, ModalContentComponent, ModalTitleComponent, modalComponent };
202
- //# sourceMappingURL=sixbell-telco-sdk-components-modal.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-modal.mjs","sources":["../../../projects/sdk/components/modal/modal-actions/modal-actions.component.ts","../../../projects/sdk/components/modal/modal-actions/modal-actions.component.html","../../../projects/sdk/components/modal/modal-content/modal-content.component.ts","../../../projects/sdk/components/modal/modal-content/modal-content.component.html","../../../projects/sdk/components/modal/modal-title/modal-title.component.ts","../../../projects/sdk/components/modal/modal-title/modal-title.component.html","../../../projects/sdk/components/modal/src/modal.component.ts","../../../projects/sdk/components/modal/src/modal.component.html","../../../projects/sdk/components/modal/sixbell-telco-sdk-components-modal.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\n\nexport type ModalActionsAligmentProps = 'left' | 'right' | 'center';\n\n@Component({\n\tselector: 'st-modal-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './modal-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalActionsComponent {\n\t// Base table properties\n\talignment = input<ModalActionsAligmentProps>('left');\n\n\tcomponentClass = computed(() =>\n\t\tcn('modal-action text-pretty font-body leading-normal', {\n\t\t\t'justify-start': this.alignment() === 'left',\n\t\t\t'justify-end': this.alignment() === 'right',\n\t\t\t'justify-center': this.alignment() === 'center',\n\t\t}),\n\t);\n}\n","<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\n selector: 'st-modal-content',\n imports: [CommonModule],\n templateUrl: './modal-content.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ModalContentComponent {}\n","<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\n selector: 'st-modal-title',\n imports: [CommonModule, TypographyDirective],\n templateUrl: './modal-title.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ModalTitleComponent {}\n","<div class=\"mb-6\">\n\t<h2 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h2\">\n\t\t<ng-content></ng-content>\n\t</h2>\n</div>\n","import { Component, computed, effect, ElementRef, input, model, output, viewChild } from '@angular/core';\nimport { matCloseOutline } from '@sixbell-telco/sdk/components/icon/material/outline';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/**\n * CSS class generator for modal component variants\n * @internal\n */\nexport const modalComponent = cva(['modal-box', 'bg-base-200', 'p-6', 'text-base-content', 'w-11/12'], {\n\tvariants: {\n\t\twidth: {\n\t\t\txs: ['max-w-xs'],\n\t\t\tsm: ['max-w-sm'],\n\t\t\tmd: ['max-w-md'],\n\t\t\tlg: ['max-w-lg'],\n\t\t\txl: ['max-w-xl'],\n\t\t\t'2xl': ['max-w-2xl'],\n\t\t\t'3xl': ['max-w-3xl'],\n\t\t\t'4xl': ['max-w-4xl'],\n\t\t\t'5xl': ['max-w-5xl'],\n\t\t},\n\t\taligment: {\n\t\t\ttop: ['modal-top'],\n\t\t\tcenter: ['modal-middle'],\n\t\t\tbottom: ['modal-bottom'],\n\t\t\tstart: ['modal-start'],\n\t\t\tend: ['modal-end'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\twidth: 'md',\n\t\taligment: 'center',\n\t},\n});\n\n/** Possible width values for the modal component */\nexport type ModalWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;\n\n/** Possible vertical alignment values for the modal component */\nexport type ModalAlignmentProps = 'top' | 'center' | 'bottom' | 'start' | 'end' | null | undefined;\n\n/** Configuration properties for the modal component */\nexport type ModalProps = {\n\twidth?: ModalWidthProps;\n\talignment?: ModalAlignmentProps;\n};\n\n/**\n * A customizable modal dialog component with Tailwind CSS integration\n *\n * @remarks\n * Uses Angular's signal-based inputs and outputs for reactive state management.\n * Supports various sizes and vertical alignments through input properties.\n *\n * @example\n * ```html\n * <st-modal\n * modalId=\"confirmDialog\"\n * [(opened)]=\"isOpen\"\n * width=\"lg\"\n * alignment=\"top\"\n * (close)=\"handleClose()\"\n * (clickOutside)=\"handleClickOustide()\"\n * />\n * ```\n */\n@Component({\n\tselector: 'st-modal',\n\timports: [],\n\ttemplateUrl: './modal.component.html',\n\tstyles: '',\n})\nexport class ModalComponent {\n\t/**\n\t * Specifies the maximum width of the modal content\n\t * @defaultValue 'md'\n\t */\n\twidth = input<ModalWidthProps>();\n\n\t/**\n\t * Controls the vertical positioning of the modal\n\t * @defaultValue 'center'\n\t */\n\talignment = input<ModalAlignmentProps>('center');\n\n\t/** Required unique identifier for the modal dialog */\n\tmodalId = input.required<string>();\n\n\t/** Event emitted when clicking outside the modal content */\n\tclickOutside = output<void>();\n\n\t/** Event emitted when the modal closes */\n\tclosed = output<void>();\n\n\t/** @internal Icon reference for close button */\n\ticonClose = matCloseOutline;\n\n\t/** @internal Reference to the underlying dialog element */\n\tdialog = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n\t/**\n\t * Controls the visibility state of the modal\n\t * Supports two-way binding via Angular's model\n\t */\n\topened = model<boolean>(false);\n\n\t/** @internal Handles open/close state changes */\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.handleOpen();\n\t\t} else {\n\t\t\tthis.handleClose();\n\t\t}\n\t});\n\n\t/**\n\t * Computes CSS classes for modal content based on current configuration\n\t * @returns Combined Tailwind classes string\n\t * @internal\n\t */\n\tcomponentClass = computed(() => {\n\t\treturn cn(\n\t\t\tmodalComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t\taligment: this.alignment(),\n\t\t\t}),\n\t\t);\n\t});\n\n\t/**\n\t * Computes CSS classes for modal overlay positioning\n\t * @returns Combined positioning classes string\n\t * @internal\n\t */\n\tmodalClass = computed(() => {\n\t\treturn cn('modal', {\n\t\t\t'modal-top': this.alignment() === 'top',\n\t\t\t'modal-middle': this.alignment() === 'center',\n\t\t\t'modal-bottom': this.alignment() === 'bottom',\n\t\t\t'modal-start': this.alignment() === 'start',\n\t\t\t'modal-end': this.alignment() === 'end',\n\t\t});\n\t});\n\n\t/** @internal Opens the native dialog element */\n\thandleOpen() {\n\t\tthis.dialog()?.nativeElement.showModal();\n\t}\n\n\t/** @internal Closes the native dialog element */\n\thandleClose() {\n\t\tthis.dialog()?.nativeElement.close();\n\t}\n\n\t/**\n\t * Public method to close the modal and emit close event\n\t * Can be called directly from parent components\n\t */\n\thandleCloseClick() {\n\t\tthis.opened.set(false);\n\t\tthis.closed.emit();\n\t}\n\n\t/**\n\t * Handles cancel events from the dialog element\n\t * @param event - Native dialog cancel event\n\t * @internal\n\t */\n\thandleCancelClick(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.closed.emit();\n\t}\n\n\t/**\n\t * Handles click events outside the modal content\n\t * @param event - Native mouse event\n\t * @internal\n\t */\n\thandleClickOutside(event: Event) {\n\t\tevent.preventDefault();\n\t\tthis.opened.set(false);\n\t\tthis.clickOutside.emit();\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/elements-content -->\n<dialog #dialog [id]=\"modalId()\" [class]=\"modalClass()\" (cancel)=\"handleCancelClick($event)\">\n\t<div [class]=\"componentClass()\">\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm absolute top-0 right-0\" (click)=\"handleCloseClick()\">✕</button>\n\t\t</div>\n\t\t<ng-content select=\"st-modal-title\"></ng-content>\n\t\t<ng-content select=\"st-modal-content\"></ng-content>\n\t\t<ng-content select=\"st-modal-actions\"></ng-content>\n\t</div>\n\t<form method=\"dialog\" class=\"modal-backdrop\">\n\t\t<button (click)=\"handleClickOutside($event)\"></button>\n\t</form>\n</dialog>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAYa,qBAAqB,CAAA;;AAEjC,IAAA,SAAS,GAAG,KAAK,CAA4B,MAAM,CAAC;IAEpD,cAAc,GAAG,QAAQ,CAAC,MACzB,EAAE,CAAC,mDAAmD,EAAE;AACvD,QAAA,eAAe,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,MAAM;AAC5C,QAAA,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,OAAO;AAC3C,QAAA,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,QAAQ;AAC/C,KAAA,CAAC,CACF;uGAVW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECZlC,2EAGA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDKW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBANjC,SAAS;AACC,YAAA,IAAA,EAAA,CA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