@sixbell-telco/sdk 1.1.0 → 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.
- package/CHANGELOG.md +58 -0
- package/README.md +600 -166
- package/_index.css +34 -4
- package/components/badge/src/badge.component.d.ts +0 -4
- package/components/dialog/dialog-actions/dialog-actions.component.d.ts +8 -0
- package/components/dialog/dialog-content/dialog-content.component.d.ts +5 -0
- package/components/dialog/dialog-sub-title/dialog-sub-title.component.d.ts +5 -0
- package/components/dialog/dialog-title/dialog-title.component.d.ts +5 -0
- package/components/{modal → dialog}/index.d.ts +1 -1
- package/components/dialog/public-api.d.ts +5 -0
- package/components/dialog/src/dialog.component.d.ts +132 -0
- package/directives/auto-focus/src/autofocus.directive.d.ts +3 -3
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs +1 -1
- package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +305 -0
- package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +3 -0
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +3 -3
- package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +221 -65
- package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +211 -62
- package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
- package/package.json +13 -13
- package/sixbell-telco-sdk-1.2.0.tgz +0 -0
- package/utils/theme/README.md +185 -0
- package/utils/theme/src/theme.service.d.ts +168 -17
- package/utils/translation/README.md +274 -0
- package/utils/translation/public-api.d.ts +4 -0
- package/utils/translation/src/translation.service.d.ts +134 -49
- package/components/modal/modal-actions/modal-actions.component.d.ts +0 -8
- package/components/modal/modal-content/modal-content.component.d.ts +0 -5
- package/components/modal/modal-title/modal-title.component.d.ts +0 -5
- package/components/modal/public-api.d.ts +0 -4
- package/components/modal/src/modal.component.d.ts +0 -102
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs +0 -202
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +0 -1
- package/sixbell-telco-sdk-1.1.0.tgz +0 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, computed, ChangeDetectionStrategy, Component, model, output, inject, viewChild, signal, effect } from '@angular/core';
|
|
4
|
+
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
5
|
+
import { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';
|
|
6
|
+
import { Dialog } from '@angular/cdk/dialog';
|
|
7
|
+
import { Overlay } from '@angular/cdk/overlay';
|
|
8
|
+
import { cva } from 'class-variance-authority';
|
|
9
|
+
|
|
10
|
+
class DialogActionsComponent {
|
|
11
|
+
// Base table properties
|
|
12
|
+
alignment = input('left');
|
|
13
|
+
componentClass = computed(() => cn('modal-action text-pretty font-body leading-normal', {
|
|
14
|
+
'justify-start': this.alignment() === 'left',
|
|
15
|
+
'justify-end': this.alignment() === 'right',
|
|
16
|
+
'justify-center': this.alignment() === 'center',
|
|
17
|
+
}));
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: DialogActionsComponent, isStandalone: true, selector: "st-dialog-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 });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogActionsComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ selector: 'st-dialog-actions', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"componentClass()\">\n\t<ng-content></ng-content>\n</div>\n" }]
|
|
24
|
+
}] });
|
|
25
|
+
|
|
26
|
+
class DialogContentComponent {
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogContentComponent, isStandalone: true, selector: "st-dialog-content", ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
29
|
+
}
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogContentComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'st-dialog-content', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
33
|
+
}] });
|
|
34
|
+
|
|
35
|
+
class DialogSubTitleComponent {
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogSubTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogSubTitleComponent, isStandalone: true, selector: "st-dialog-sub-title", ngImport: i0, template: "<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["tyVariant", "tyColor", "tyFontWeight", "tyTextOverflow"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
|
+
}
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogSubTitleComponent, decorators: [{
|
|
40
|
+
type: Component,
|
|
41
|
+
args: [{ selector: 'st-dialog-sub-title', imports: [CommonModule, TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n" }]
|
|
42
|
+
}] });
|
|
43
|
+
|
|
44
|
+
class DialogTitleComponent {
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.0", type: DialogTitleComponent, isStandalone: true, selector: "st-dialog-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 });
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogTitleComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'st-dialog-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" }]
|
|
51
|
+
}] });
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* CSS class generator for dialog component variants
|
|
55
|
+
* Uses carefully selected DaisyUI classes that don't conflict with CDK positioning
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
const dialogComponent = cva([
|
|
59
|
+
'bg-base-200',
|
|
60
|
+
'rounded-box',
|
|
61
|
+
'shadow-backdrop',
|
|
62
|
+
'p-6',
|
|
63
|
+
'text-base-content',
|
|
64
|
+
'relative',
|
|
65
|
+
'data-[state=closed]:animate-exit data-[state=open]:animate-enter',
|
|
66
|
+
], {
|
|
67
|
+
variants: {
|
|
68
|
+
width: {
|
|
69
|
+
xs: ['w-64'],
|
|
70
|
+
sm: ['w-80'],
|
|
71
|
+
md: ['w-96'],
|
|
72
|
+
lg: ['w-[32rem]'],
|
|
73
|
+
xl: ['w-[36rem]'],
|
|
74
|
+
'2xl': ['w-[42rem]'],
|
|
75
|
+
'3xl': ['w-[48rem]'],
|
|
76
|
+
'4xl': ['w-[56rem]'],
|
|
77
|
+
'5xl': ['w-[64rem]'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
compoundVariants: [],
|
|
81
|
+
defaultVariants: {
|
|
82
|
+
width: 'md',
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* A customizable dialog component using Angular CDK Dialog for declarative usage
|
|
87
|
+
*
|
|
88
|
+
* @remarks
|
|
89
|
+
* This component provides a declarative way to create dialogs with content projection.
|
|
90
|
+
* Uses CDK Dialog under the hood to avoid z-index issues with native dialog elements.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```html
|
|
94
|
+
* <st-dialog
|
|
95
|
+
* [(opened)]="isDialogOpen"
|
|
96
|
+
* width="lg"
|
|
97
|
+
* alignment="center"
|
|
98
|
+
* (closed)="handleDialogClosed()">
|
|
99
|
+
* <st-dialog-title>Confirm Action</st-dialog-title>
|
|
100
|
+
* <st-dialog-content>
|
|
101
|
+
* Are you sure you want to proceed?
|
|
102
|
+
* </st-dialog-content>
|
|
103
|
+
* <st-dialog-actions>
|
|
104
|
+
* <st-button (click)="confirmAction()">Confirm</st-button>
|
|
105
|
+
* <st-button variant="secondary" (click)="closeDialog()">Cancel</st-button>
|
|
106
|
+
* </st-dialog-actions>
|
|
107
|
+
* </st-dialog>
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
class DialogComponent {
|
|
111
|
+
/**
|
|
112
|
+
* Specifies the maximum width of the dialog content
|
|
113
|
+
* @defaultValue 'md'
|
|
114
|
+
*/
|
|
115
|
+
width = input('md');
|
|
116
|
+
/**
|
|
117
|
+
* Controls the horizontal positioning of the dialog (x-axis)
|
|
118
|
+
* @defaultValue 'center'
|
|
119
|
+
*/
|
|
120
|
+
xPosition = input('center');
|
|
121
|
+
/**
|
|
122
|
+
* Controls the vertical positioning of the dialog (y-axis)
|
|
123
|
+
* @defaultValue 'center'
|
|
124
|
+
*/
|
|
125
|
+
yPosition = input('center');
|
|
126
|
+
/**
|
|
127
|
+
* Controls the visibility state of the dialog
|
|
128
|
+
* Supports two-way binding via Angular's model
|
|
129
|
+
*/
|
|
130
|
+
opened = model(false);
|
|
131
|
+
/** Event emitted when the dialog closes */
|
|
132
|
+
closed = output();
|
|
133
|
+
/** Event emitted when clicking outside the dialog content */
|
|
134
|
+
clickOutside = output();
|
|
135
|
+
/** @internal CDK Dialog service */
|
|
136
|
+
dialog = inject(Dialog);
|
|
137
|
+
/** @internal CDK Overlay service for positioning */
|
|
138
|
+
overlay = inject(Overlay);
|
|
139
|
+
/** @internal Reference to the dialog template */
|
|
140
|
+
dialogTemplate = viewChild('dialogTemplate');
|
|
141
|
+
/** @internal Reference to the current open dialog */
|
|
142
|
+
dialogRef = null;
|
|
143
|
+
/** @internal Animation state signal for controlling CSS animations */
|
|
144
|
+
animationState = signal('closed');
|
|
145
|
+
/** @internal Flag to track if we're in the process of closing */
|
|
146
|
+
isClosing = false;
|
|
147
|
+
/**
|
|
148
|
+
* Computes the data-state attribute value for CSS animations
|
|
149
|
+
* @returns Current animation state
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
dataState = computed(() => this.animationState());
|
|
153
|
+
/**
|
|
154
|
+
* Computes CSS classes for dialog content based on current configuration
|
|
155
|
+
* @returns Combined Tailwind classes string
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
componentClass = computed(() => {
|
|
159
|
+
return cn(dialogComponent({
|
|
160
|
+
width: this.width(),
|
|
161
|
+
}));
|
|
162
|
+
});
|
|
163
|
+
/** @internal Handles open/close state changes */
|
|
164
|
+
openedEffect = effect(() => {
|
|
165
|
+
if (this.opened()) {
|
|
166
|
+
this.openDialog();
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
this.closeDialog();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
/**
|
|
173
|
+
* Computed CDK Dialog configuration based on x/y axis signals
|
|
174
|
+
* Uses CDK's overlay positioning system for full axis control
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
dialogConfig = computed(() => {
|
|
178
|
+
const x = this.xPosition();
|
|
179
|
+
const y = this.yPosition();
|
|
180
|
+
const baseConfig = {
|
|
181
|
+
hasBackdrop: true,
|
|
182
|
+
disableClose: true, // Prevent automatic close, we handle it manually for animations
|
|
183
|
+
autoFocus: true,
|
|
184
|
+
restoreFocus: true,
|
|
185
|
+
backdropClass: ['bg-backdrop'],
|
|
186
|
+
panelClass: ['st-dialog-panel'],
|
|
187
|
+
// Use noop scroll strategy to prevent body scroll changes that affect sticky navbar
|
|
188
|
+
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
189
|
+
};
|
|
190
|
+
let positionStrategy = this.overlay.position().global();
|
|
191
|
+
// X axis
|
|
192
|
+
switch (x) {
|
|
193
|
+
case 'start':
|
|
194
|
+
positionStrategy = positionStrategy.left('2rem');
|
|
195
|
+
break;
|
|
196
|
+
case 'end':
|
|
197
|
+
positionStrategy = positionStrategy.right('2rem');
|
|
198
|
+
break;
|
|
199
|
+
default:
|
|
200
|
+
positionStrategy = positionStrategy.centerHorizontally();
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
// Y axis
|
|
204
|
+
switch (y) {
|
|
205
|
+
case 'top':
|
|
206
|
+
positionStrategy = positionStrategy.top('2rem');
|
|
207
|
+
break;
|
|
208
|
+
case 'bottom':
|
|
209
|
+
positionStrategy = positionStrategy.bottom('2rem');
|
|
210
|
+
break;
|
|
211
|
+
default:
|
|
212
|
+
positionStrategy = positionStrategy.centerVertically();
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
...baseConfig,
|
|
217
|
+
positionStrategy,
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* Opens the dialog using CDK Dialog
|
|
222
|
+
* @internal
|
|
223
|
+
*/
|
|
224
|
+
openDialog() {
|
|
225
|
+
if (this.dialogRef || !this.dialogTemplate()) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.dialogRef = this.dialog.open(this.dialogTemplate(), this.dialogConfig());
|
|
229
|
+
// Set open state for animation
|
|
230
|
+
this.animationState.set('open');
|
|
231
|
+
this.isClosing = false;
|
|
232
|
+
// Handle dialog close events
|
|
233
|
+
this.dialogRef.closed.subscribe(() => {
|
|
234
|
+
this.dialogRef = null;
|
|
235
|
+
this.animationState.set('closed');
|
|
236
|
+
this.isClosing = false;
|
|
237
|
+
if (this.opened()) {
|
|
238
|
+
this.opened.set(false);
|
|
239
|
+
this.closed.emit();
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
// Handle backdrop clicks
|
|
243
|
+
this.dialogRef.backdropClick.subscribe(() => {
|
|
244
|
+
this.clickOutside.emit();
|
|
245
|
+
this.close();
|
|
246
|
+
});
|
|
247
|
+
// Handle escape key
|
|
248
|
+
this.dialogRef.keydownEvents.subscribe((event) => {
|
|
249
|
+
if (event.key === 'Escape') {
|
|
250
|
+
this.close();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Public method to close the dialog
|
|
256
|
+
* Can be called directly from parent components or child components
|
|
257
|
+
*/
|
|
258
|
+
close() {
|
|
259
|
+
this.opened.set(false);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Closes the dialog using CDK Dialog
|
|
263
|
+
* @internal
|
|
264
|
+
*/
|
|
265
|
+
closeDialog() {
|
|
266
|
+
if (this.dialogRef && !this.isClosing) {
|
|
267
|
+
// Set closing flag and closed state for animation
|
|
268
|
+
this.isClosing = true;
|
|
269
|
+
this.animationState.set('closed');
|
|
270
|
+
// The actual CDK close will be triggered by the animation end event
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Handles animation end events to trigger the actual dialog close
|
|
275
|
+
* @internal
|
|
276
|
+
*/
|
|
277
|
+
onAnimationEnd(event) {
|
|
278
|
+
const target = event.target;
|
|
279
|
+
// Only handle animations on the main dialog element
|
|
280
|
+
if (target.hasAttribute('data-state') && this.isClosing && this.dialogRef) {
|
|
281
|
+
// Animation finished, now actually close the CDK dialog
|
|
282
|
+
this.dialogRef.close();
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Handles the close button click
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
handleCloseClick() {
|
|
290
|
+
this.close();
|
|
291
|
+
}
|
|
292
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
293
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.0", type: DialogComponent, isStandalone: true, selector: "st-dialog", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "openedChange", closed: "closed", clickOutside: "clickOutside" }, viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">\u2715</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
294
|
+
}
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
296
|
+
type: Component,
|
|
297
|
+
args: [{ selector: 'st-dialog', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">\u2715</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n" }]
|
|
298
|
+
}] });
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Generated bundle index. Do not edit.
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
export { DialogActionsComponent, DialogComponent, DialogContentComponent, DialogSubTitleComponent, DialogTitleComponent, dialogComponent };
|
|
305
|
+
//# sourceMappingURL=sixbell-telco-sdk-components-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-dialog.mjs","sources":["../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.ts","../../../projects/sdk/components/dialog/dialog-actions/dialog-actions.component.html","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.ts","../../../projects/sdk/components/dialog/dialog-content/dialog-content.component.html","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.ts","../../../projects/sdk/components/dialog/dialog-sub-title/dialog-sub-title.component.html","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.ts","../../../projects/sdk/components/dialog/dialog-title/dialog-title.component.html","../../../projects/sdk/components/dialog/src/dialog.component.ts","../../../projects/sdk/components/dialog/src/dialog.component.html","../../../projects/sdk/components/dialog/sixbell-telco-sdk-components-dialog.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-dialog-actions',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-actions.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogActionsComponent {\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\tselector: 'st-dialog-content',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog-content.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogContentComponent {}\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\tselector: 'st-dialog-sub-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-sub-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogSubTitleComponent {}\n","<div class=\"mb-6\">\n\t<h3 typography tyFontWeight=\"medium\" tyColor=\"base\" tyVariant=\"h3\">\n\t\t<ng-content></ng-content>\n\t</h3>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\n\n@Component({\n\tselector: 'st-dialog-title',\n\timports: [CommonModule, TypographyDirective],\n\ttemplateUrl: './dialog-title.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogTitleComponent {}\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 { Dialog, DialogConfig, DialogRef } from '@angular/cdk/dialog';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, model, output, signal, TemplateRef, viewChild } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/**\n * CSS class generator for dialog component variants\n * Uses carefully selected DaisyUI classes that don't conflict with CDK positioning\n * @internal\n */\nexport const dialogComponent = cva(\n\t[\n\t\t'bg-base-200',\n\t\t'rounded-box',\n\t\t'shadow-backdrop',\n\t\t'p-6',\n\t\t'text-base-content',\n\t\t'relative',\n\t\t'data-[state=closed]:animate-exit data-[state=open]:animate-enter',\n\t],\n\t{\n\t\tvariants: {\n\t\t\twidth: {\n\t\t\t\txs: ['w-64'],\n\t\t\t\tsm: ['w-80'],\n\t\t\t\tmd: ['w-96'],\n\t\t\t\tlg: ['w-[32rem]'],\n\t\t\t\txl: ['w-[36rem]'],\n\t\t\t\t'2xl': ['w-[42rem]'],\n\t\t\t\t'3xl': ['w-[48rem]'],\n\t\t\t\t'4xl': ['w-[56rem]'],\n\t\t\t\t'5xl': ['w-[64rem]'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\twidth: 'md',\n\t\t},\n\t},\n);\n\n/** Possible width values for the dialog component */\nexport type DialogWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;\n\n/** Possible vertical alignment values for the dialog component */\nexport type DialogAlignmentProps = 'top' | 'center' | 'bottom' | 'start' | 'end' | null | undefined;\n\n/** Animation states for the dialog */\ntype AnimationState = 'closed' | 'open';\n\n/** Configuration properties for the dialog component */\nexport type DialogProps = {\n\twidth?: DialogWidthProps;\n\talignment?: DialogAlignmentProps;\n};\n\n/**\n * A customizable dialog component using Angular CDK Dialog for declarative usage\n *\n * @remarks\n * This component provides a declarative way to create dialogs with content projection.\n * Uses CDK Dialog under the hood to avoid z-index issues with native dialog elements.\n *\n * @example\n * ```html\n * <st-dialog\n * [(opened)]=\"isDialogOpen\"\n * width=\"lg\"\n * alignment=\"center\"\n * (closed)=\"handleDialogClosed()\">\n * <st-dialog-title>Confirm Action</st-dialog-title>\n * <st-dialog-content>\n * Are you sure you want to proceed?\n * </st-dialog-content>\n * <st-dialog-actions>\n * <st-button (click)=\"confirmAction()\">Confirm</st-button>\n * <st-button variant=\"secondary\" (click)=\"closeDialog()\">Cancel</st-button>\n * </st-dialog-actions>\n * </st-dialog>\n * ```\n */\n@Component({\n\tselector: 'st-dialog',\n\timports: [CommonModule],\n\ttemplateUrl: './dialog.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogComponent {\n\t/**\n\t * Specifies the maximum width of the dialog content\n\t * @defaultValue 'md'\n\t */\n\twidth = input<DialogWidthProps>('md');\n\n\t/**\n\t * Controls the horizontal positioning of the dialog (x-axis)\n\t * @defaultValue 'center'\n\t */\n\txPosition = input<'start' | 'center' | 'end'>('center');\n\n\t/**\n\t * Controls the vertical positioning of the dialog (y-axis)\n\t * @defaultValue 'center'\n\t */\n\tyPosition = input<'top' | 'center' | 'bottom'>('center');\n\n\t/**\n\t * Controls the visibility state of the dialog\n\t * Supports two-way binding via Angular's model\n\t */\n\topened = model<boolean>(false);\n\n\t/** Event emitted when the dialog closes */\n\tclosed = output<void>();\n\n\t/** Event emitted when clicking outside the dialog content */\n\tclickOutside = output<void>();\n\n\t/** @internal CDK Dialog service */\n\tprivate readonly dialog = inject(Dialog);\n\n\t/** @internal CDK Overlay service for positioning */\n\tprivate readonly overlay = inject(Overlay);\n\n\t/** @internal Reference to the dialog template */\n\tdialogTemplate = viewChild<TemplateRef<unknown>>('dialogTemplate');\n\n\t/** @internal Reference to the current open dialog */\n\tprivate dialogRef: DialogRef<unknown> | null = null;\n\n\t/** @internal Animation state signal for controlling CSS animations */\n\tprivate readonly animationState = signal<AnimationState>('closed');\n\n\t/** @internal Flag to track if we're in the process of closing */\n\tprivate isClosing = false;\n\n\t/**\n\t * Computes the data-state attribute value for CSS animations\n\t * @returns Current animation state\n\t * @internal\n\t */\n\tdataState = computed(() => this.animationState());\n\n\t/**\n\t * Computes CSS classes for dialog 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\tdialogComponent({\n\t\t\t\twidth: this.width(),\n\t\t\t}),\n\t\t);\n\t});\n\n\t/** @internal Handles open/close state changes */\n\topenedEffect = effect(() => {\n\t\tif (this.opened()) {\n\t\t\tthis.openDialog();\n\t\t} else {\n\t\t\tthis.closeDialog();\n\t\t}\n\t});\n\n\t/**\n\t * Computed CDK Dialog configuration based on x/y axis signals\n\t * Uses CDK's overlay positioning system for full axis control\n\t * @internal\n\t */\n\tprivate readonly dialogConfig = computed<DialogConfig>(() => {\n\t\tconst x = this.xPosition();\n\t\tconst y = this.yPosition();\n\n\t\tconst baseConfig: DialogConfig = {\n\t\t\thasBackdrop: true,\n\t\t\tdisableClose: true, // Prevent automatic close, we handle it manually for animations\n\t\t\tautoFocus: true,\n\t\t\trestoreFocus: true,\n\t\t\tbackdropClass: ['bg-backdrop'],\n\t\t\tpanelClass: ['st-dialog-panel'],\n\t\t\t// Use noop scroll strategy to prevent body scroll changes that affect sticky navbar\n\t\t\tscrollStrategy: this.overlay.scrollStrategies.noop(),\n\t\t};\n\n\t\tlet positionStrategy = this.overlay.position().global();\n\n\t\t// X axis\n\t\tswitch (x) {\n\t\t\tcase 'start':\n\t\t\t\tpositionStrategy = positionStrategy.left('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'end':\n\t\t\t\tpositionStrategy = positionStrategy.right('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerHorizontally();\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Y axis\n\t\tswitch (y) {\n\t\t\tcase 'top':\n\t\t\t\tpositionStrategy = positionStrategy.top('2rem');\n\t\t\t\tbreak;\n\t\t\tcase 'bottom':\n\t\t\t\tpositionStrategy = positionStrategy.bottom('2rem');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpositionStrategy = positionStrategy.centerVertically();\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\t...baseConfig,\n\t\t\tpositionStrategy,\n\t\t};\n\t});\n\n\t/**\n\t * Opens the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate openDialog() {\n\t\tif (this.dialogRef || !this.dialogTemplate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.dialogRef = this.dialog.open(this.dialogTemplate()!, this.dialogConfig() as DialogConfig<unknown, DialogRef<unknown, unknown>>);\n\n\t\t// Set open state for animation\n\t\tthis.animationState.set('open');\n\t\tthis.isClosing = false;\n\n\t\t// Handle dialog close events\n\t\tthis.dialogRef.closed.subscribe(() => {\n\t\t\tthis.dialogRef = null;\n\t\t\tthis.animationState.set('closed');\n\t\t\tthis.isClosing = false;\n\t\t\tif (this.opened()) {\n\t\t\t\tthis.opened.set(false);\n\t\t\t\tthis.closed.emit();\n\t\t\t}\n\t\t});\n\n\t\t// Handle backdrop clicks\n\t\tthis.dialogRef.backdropClick.subscribe(() => {\n\t\t\tthis.clickOutside.emit();\n\t\t\tthis.close();\n\t\t});\n\n\t\t// Handle escape key\n\t\tthis.dialogRef.keydownEvents.subscribe((event: KeyboardEvent) => {\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Public method to close the dialog\n\t * Can be called directly from parent components or child components\n\t */\n\tclose() {\n\t\tthis.opened.set(false);\n\t}\n\n\t/**\n\t * Closes the dialog using CDK Dialog\n\t * @internal\n\t */\n\tprivate closeDialog() {\n\t\tif (this.dialogRef && !this.isClosing) {\n\t\t\t// Set closing flag and closed state for animation\n\t\t\tthis.isClosing = true;\n\t\t\tthis.animationState.set('closed');\n\n\t\t\t// The actual CDK close will be triggered by the animation end event\n\t\t}\n\t}\n\n\t/**\n\t * Handles animation end events to trigger the actual dialog close\n\t * @internal\n\t */\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tconst target = event.target as HTMLElement;\n\n\t\t// Only handle animations on the main dialog element\n\t\tif (target.hasAttribute('data-state') && this.isClosing && this.dialogRef) {\n\t\t\t// Animation finished, now actually close the CDK dialog\n\t\t\tthis.dialogRef.close();\n\t\t}\n\t}\n\n\t/**\n\t * Handles the close button click\n\t * @internal\n\t */\n\thandleCloseClick() {\n\t\tthis.close();\n\t}\n}\n","<!-- Dialog template for CDK Dialog -->\n<ng-template #dialogTemplate>\n\t<!-- Dialog content with data-driven animations -->\n\t<div [class]=\"componentClass()\" [attr.data-state]=\"dataState()\" (animationend)=\"onAnimationEnd($event)\">\n\t\t<!-- Close button -->\n\t\t<div class=\"absolute top-2 right-2\">\n\t\t\t<button class=\"btn btn-circle btn-ghost btn-sm\" (click)=\"handleCloseClick()\" aria-label=\"Close dialog\">✕</button>\n\t\t</div>\n\n\t\t<!-- Content projection -->\n\t\t<ng-content select=\"st-dialog-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-sub-title\"></ng-content>\n\t\t<ng-content select=\"st-dialog-content\"></ng-content>\n\n\t\t<!-- Actions section with spacing -->\n\t\t<div class=\"flex justify-end gap-2 pt-4\">\n\t\t\t<ng-content select=\"st-dialog-actions\"></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAYa,sBAAsB,CAAA;;AAElC,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,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,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,ECZnC,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,sBAAsB,EAAA,UAAA,E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EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,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,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,cAAA,EAAA,MAAA,EAAA,QAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzF5B,m2BAoBA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDiEW,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,CAAC,YAAY,CAAC,EAEN,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,m2BAAA,EAAA;;;AEvFhD;;AAEG;;;;"}
|
|
@@ -432,6 +432,9 @@ class ComboboxComponent {
|
|
|
432
432
|
const trigger = this.blurTrigger();
|
|
433
433
|
if (!control)
|
|
434
434
|
return this.componentClass();
|
|
435
|
+
if (control.pristine && !control.touched) {
|
|
436
|
+
return this.componentClass();
|
|
437
|
+
}
|
|
435
438
|
const isTouched = control.touched || trigger > 0;
|
|
436
439
|
this.statusSignal();
|
|
437
440
|
this.stateSignal();
|