@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.
Files changed (41) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +600 -166
  3. package/_index.css +34 -4
  4. package/components/badge/src/badge.component.d.ts +0 -4
  5. package/components/dialog/dialog-actions/dialog-actions.component.d.ts +8 -0
  6. package/components/dialog/dialog-content/dialog-content.component.d.ts +5 -0
  7. package/components/dialog/dialog-sub-title/dialog-sub-title.component.d.ts +5 -0
  8. package/components/dialog/dialog-title/dialog-title.component.d.ts +5 -0
  9. package/components/{modal → dialog}/index.d.ts +1 -1
  10. package/components/dialog/public-api.d.ts +5 -0
  11. package/components/dialog/src/dialog.component.d.ts +132 -0
  12. package/directives/auto-focus/src/autofocus.directive.d.ts +3 -3
  13. package/fesm2022/sixbell-telco-sdk-components-badge.mjs +1 -1
  14. package/fesm2022/sixbell-telco-sdk-components-badge.mjs.map +1 -1
  15. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs +305 -0
  16. package/fesm2022/sixbell-telco-sdk-components-dialog.mjs.map +1 -0
  17. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +3 -0
  18. package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
  19. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +2 -2
  20. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  21. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs +3 -3
  22. package/fesm2022/sixbell-telco-sdk-directives-auto-focus.mjs.map +1 -1
  23. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +221 -65
  24. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  25. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +211 -62
  26. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  27. package/package.json +13 -13
  28. package/sixbell-telco-sdk-1.2.0.tgz +0 -0
  29. package/utils/theme/README.md +185 -0
  30. package/utils/theme/src/theme.service.d.ts +168 -17
  31. package/utils/translation/README.md +274 -0
  32. package/utils/translation/public-api.d.ts +4 -0
  33. package/utils/translation/src/translation.service.d.ts +134 -49
  34. package/components/modal/modal-actions/modal-actions.component.d.ts +0 -8
  35. package/components/modal/modal-content/modal-content.component.d.ts +0 -5
  36. package/components/modal/modal-title/modal-title.component.d.ts +0 -5
  37. package/components/modal/public-api.d.ts +0 -4
  38. package/components/modal/src/modal.component.d.ts +0 -102
  39. package/fesm2022/sixbell-telco-sdk-components-modal.mjs +0 -202
  40. package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +0 -1
  41. package/sixbell-telco-sdk-1.1.0.tgz +0 -0
package/_index.css CHANGED
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  @plugin "daisyui/theme" {
15
- name: 'vivid_elegance_light';
15
+ name: 'sixbell_telco__light';
16
16
  default: true;
17
17
  prefersdark: false;
18
18
  color-scheme: 'light';
@@ -73,8 +73,10 @@
73
73
  --color-neutral-tertiary: oklch(100% 0 0);
74
74
  --color-neutral-tertiary-content: oklch(73.97% 0.0115 280.4);
75
75
  --color-base-placeholder: oklch(51.6% 0.0073 255.51);
76
+ --color-backdrop: oklch(0% 0 0/ 0.4);
76
77
 
77
78
  --shadow-primary: oklch(0.8975 0 0);
79
+ --shadow-backdrop: oklch(0% 0 0/ 0.25);
78
80
 
79
81
  --color-metrics-increase: oklch(74.59% 0.1812 152.33);
80
82
  --color-metrics-decrease: oklch(63.07% 0.194 29.44);
@@ -88,7 +90,7 @@
88
90
  }
89
91
 
90
92
  @plugin "daisyui/theme" {
91
- name: 'vivid_elegance_dark';
93
+ name: 'sixbell_telco__dark';
92
94
  default: false;
93
95
  prefersdark: true;
94
96
  color-scheme: 'dark';
@@ -148,8 +150,10 @@
148
150
  --color-neutral-tertiary: oklch(100% 0 0);
149
151
  --color-neutral-tertiary-content: oklch(73.97% 0.0115 280.4);
150
152
  --color-base-placeholder: oklch(51.6% 0.0073 255.51);
153
+ --color-backdrop: oklch(0% 0 0/ 0.4);
151
154
 
152
155
  --shadow-primary: oklch(0 0 0);
156
+ --shadow-backdrop: oklch(0% 0 0/ 0.25);
153
157
 
154
158
  --color-metrics-increase: oklch(74.59% 0.1812 152.33);
155
159
  --color-metrics-decrease: oklch(63.07% 0.194 29.44);
@@ -163,7 +167,7 @@
163
167
  }
164
168
 
165
169
  @theme {
166
- --color-base-50: var(--color-base-50);
170
+ --color-base-50: var(--base-50);
167
171
  --color-primary-gradient: var(--primary-gradient);
168
172
  --color-primary-gradient-content: var(--primary-gradient-content);
169
173
  --color-secondary-gradient: var(--secondary-gradient);
@@ -179,6 +183,8 @@
179
183
  --color-neutral-tertiary: var(--neutral-tertiary);
180
184
  --color-neutral-tertiary-content: var(--neutral-tertiary-content);
181
185
  --color-base-placeholder: var(--base-placeholder);
186
+ --color-backdrop: var(--backdrop);
187
+ --shadow-backdrop: var(--shadow-backdrop);
182
188
 
183
189
  --color-metrics-increase: var(--metrics-increase);
184
190
  --color-metrics-decrease: var(--metrics-decrease);
@@ -195,6 +201,7 @@
195
201
  --font-body: Poppins, sans-serif;
196
202
 
197
203
  --shadow-main: 0px 0px 4px 0px var(--shadow-primary);
204
+ --shadow-backdrop: 0px 25px 50px -12px var(--shadow-backdrop);
198
205
 
199
206
  --font-weight-inherit: inherit;
200
207
 
@@ -207,6 +214,8 @@
207
214
  --animate-fade-in: fadeIn 1s;
208
215
  --animate-fade-out: fadeOut 1s;
209
216
  --animate-wave: wave 1s linear infinite;
217
+ --animate-enter: enter 0.15s ease 0s 1 normal none;
218
+ --animate-exit: exit 0.15s ease 0s 1 normal none;
210
219
 
211
220
  --text-xxs: 0.625rem;
212
221
  --text-xxs--line-height: 0.625rem;
@@ -220,6 +229,28 @@
220
229
  transform: scaleY(1);
221
230
  }
222
231
  }
232
+
233
+ @keyframes enter {
234
+ 0% {
235
+ opacity: 0;
236
+ transform: scale(0.95);
237
+ }
238
+ 100% {
239
+ opacity: 1;
240
+ transform: scale(1);
241
+ }
242
+ }
243
+
244
+ @keyframes exit {
245
+ 0% {
246
+ opacity: 1;
247
+ transform: scale(1);
248
+ }
249
+ 100% {
250
+ opacity: 0;
251
+ transform: scale(0.95);
252
+ }
253
+ }
223
254
  }
224
255
 
225
256
  @layer base {
@@ -355,7 +386,6 @@
355
386
  opacity: 0;
356
387
  }
357
388
  }
358
-
359
389
  .animate-wave {
360
390
  animation-delay: calc(1s - var(--i));
361
391
  }
@@ -1,8 +1,4 @@
1
1
  import * as i0 from "@angular/core";
2
- export type Route = {
3
- label: string;
4
- path: string;
5
- };
6
2
  /**
7
3
  * @internal
8
4
  * Generates base badge classes with style variants
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export type ModalActionsAligmentProps = 'left' | 'right' | 'center';
3
+ export declare class DialogActionsComponent {
4
+ alignment: import("@angular/core").InputSignal<ModalActionsAligmentProps>;
5
+ componentClass: import("@angular/core").Signal<string>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogActionsComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogActionsComponent, "st-dialog-actions", never, { "alignment": { "alias": "alignment"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
8
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DialogContentComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogContentComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogContentComponent, "st-dialog-content", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DialogSubTitleComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogSubTitleComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogSubTitleComponent, "st-dialog-sub-title", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DialogTitleComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogTitleComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogTitleComponent, "st-dialog-title", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- /// <amd-module name="@sixbell-telco/sdk/components/modal" />
4
+ /// <amd-module name="@sixbell-telco/sdk/components/dialog" />
5
5
  export * from './public-api';
@@ -0,0 +1,5 @@
1
+ export * from './dialog-actions/dialog-actions.component';
2
+ export * from './dialog-content/dialog-content.component';
3
+ export * from './dialog-sub-title/dialog-sub-title.component';
4
+ export * from './dialog-title/dialog-title.component';
5
+ export * from './src/dialog.component';
@@ -0,0 +1,132 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * CSS class generator for dialog component variants
5
+ * Uses carefully selected DaisyUI classes that don't conflict with CDK positioning
6
+ * @internal
7
+ */
8
+ export declare const dialogComponent: (props?: ({
9
+ width?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ /** Possible width values for the dialog component */
12
+ export type DialogWidthProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | null | undefined;
13
+ /** Possible vertical alignment values for the dialog component */
14
+ export type DialogAlignmentProps = 'top' | 'center' | 'bottom' | 'start' | 'end' | null | undefined;
15
+ /** Animation states for the dialog */
16
+ type AnimationState = 'closed' | 'open';
17
+ /** Configuration properties for the dialog component */
18
+ export type DialogProps = {
19
+ width?: DialogWidthProps;
20
+ alignment?: DialogAlignmentProps;
21
+ };
22
+ /**
23
+ * A customizable dialog component using Angular CDK Dialog for declarative usage
24
+ *
25
+ * @remarks
26
+ * This component provides a declarative way to create dialogs with content projection.
27
+ * Uses CDK Dialog under the hood to avoid z-index issues with native dialog elements.
28
+ *
29
+ * @example
30
+ * ```html
31
+ * <st-dialog
32
+ * [(opened)]="isDialogOpen"
33
+ * width="lg"
34
+ * alignment="center"
35
+ * (closed)="handleDialogClosed()">
36
+ * <st-dialog-title>Confirm Action</st-dialog-title>
37
+ * <st-dialog-content>
38
+ * Are you sure you want to proceed?
39
+ * </st-dialog-content>
40
+ * <st-dialog-actions>
41
+ * <st-button (click)="confirmAction()">Confirm</st-button>
42
+ * <st-button variant="secondary" (click)="closeDialog()">Cancel</st-button>
43
+ * </st-dialog-actions>
44
+ * </st-dialog>
45
+ * ```
46
+ */
47
+ export declare class DialogComponent {
48
+ /**
49
+ * Specifies the maximum width of the dialog content
50
+ * @defaultValue 'md'
51
+ */
52
+ width: import("@angular/core").InputSignal<DialogWidthProps>;
53
+ /**
54
+ * Controls the horizontal positioning of the dialog (x-axis)
55
+ * @defaultValue 'center'
56
+ */
57
+ xPosition: import("@angular/core").InputSignal<"center" | "start" | "end">;
58
+ /**
59
+ * Controls the vertical positioning of the dialog (y-axis)
60
+ * @defaultValue 'center'
61
+ */
62
+ yPosition: import("@angular/core").InputSignal<"center" | "top" | "bottom">;
63
+ /**
64
+ * Controls the visibility state of the dialog
65
+ * Supports two-way binding via Angular's model
66
+ */
67
+ opened: import("@angular/core").ModelSignal<boolean>;
68
+ /** Event emitted when the dialog closes */
69
+ closed: import("@angular/core").OutputEmitterRef<void>;
70
+ /** Event emitted when clicking outside the dialog content */
71
+ clickOutside: import("@angular/core").OutputEmitterRef<void>;
72
+ /** @internal CDK Dialog service */
73
+ private readonly dialog;
74
+ /** @internal CDK Overlay service for positioning */
75
+ private readonly overlay;
76
+ /** @internal Reference to the dialog template */
77
+ dialogTemplate: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
78
+ /** @internal Reference to the current open dialog */
79
+ private dialogRef;
80
+ /** @internal Animation state signal for controlling CSS animations */
81
+ private readonly animationState;
82
+ /** @internal Flag to track if we're in the process of closing */
83
+ private isClosing;
84
+ /**
85
+ * Computes the data-state attribute value for CSS animations
86
+ * @returns Current animation state
87
+ * @internal
88
+ */
89
+ dataState: import("@angular/core").Signal<AnimationState>;
90
+ /**
91
+ * Computes CSS classes for dialog content based on current configuration
92
+ * @returns Combined Tailwind classes string
93
+ * @internal
94
+ */
95
+ componentClass: import("@angular/core").Signal<string>;
96
+ /** @internal Handles open/close state changes */
97
+ openedEffect: import("@angular/core").EffectRef;
98
+ /**
99
+ * Computed CDK Dialog configuration based on x/y axis signals
100
+ * Uses CDK's overlay positioning system for full axis control
101
+ * @internal
102
+ */
103
+ private readonly dialogConfig;
104
+ /**
105
+ * Opens the dialog using CDK Dialog
106
+ * @internal
107
+ */
108
+ private openDialog;
109
+ /**
110
+ * Public method to close the dialog
111
+ * Can be called directly from parent components or child components
112
+ */
113
+ close(): void;
114
+ /**
115
+ * Closes the dialog using CDK Dialog
116
+ * @internal
117
+ */
118
+ private closeDialog;
119
+ /**
120
+ * Handles animation end events to trigger the actual dialog close
121
+ * @internal
122
+ */
123
+ onAnimationEnd(event: AnimationEvent): void;
124
+ /**
125
+ * Handles the close button click
126
+ * @internal
127
+ */
128
+ handleCloseClick(): void;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
130
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "st-dialog", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "closed": "closed"; "clickOutside": "clickOutside"; }, never, ["st-dialog-title", "st-dialog-sub-title", "st-dialog-content", "st-dialog-actions"], true, never>;
131
+ }
132
+ export {};
@@ -19,10 +19,10 @@ import * as i0 from "@angular/core";
19
19
  * <!-- Conditional autofocus -->
20
20
  * <input [stAutofocus]="shouldFocus" />
21
21
  *
22
- * <!-- In a form inside a modal -->
23
- * <st-modal>
22
+ * <!-- In a form inside a dialog -->
23
+ * <st-dialog>
24
24
  * <input [stAutofocus]="true" />
25
- * </st-modal>
25
+ * </st-dialog>
26
26
  * ```
27
27
  *
28
28
  * @usageNotes
@@ -103,7 +103,7 @@ class BadgeComponent {
103
103
  * @internal
104
104
  * Computed class string for the badge container
105
105
  */
106
- componentClass = computed(() => cn(badgeComponent({
106
+ componentClass = computed(() => cn('h-auto', badgeComponent({
107
107
  variant: this.variant(),
108
108
  size: this.size(),
109
109
  iconPosition: this.iconPosition(),
@@ -1 +1 @@
1
- {"version":3,"file":"sixbell-telco-sdk-components-badge.mjs","sources":["../../../projects/sdk/components/badge/src/badge.component.ts","../../../projects/sdk/components/badge/src/badge.component.html","../../../projects/sdk/components/badge/sixbell-telco-sdk-components-badge.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport type Route = {\n\tlabel: string;\n\tpath: string;\n};\n\n/**\n * @internal\n * Generates base badge classes with style variants\n */\nexport const badgeComponent = cva(\n\t['badge', 'text-pretty', 'font-body', 'leading-normal', 'font-normal', 'inline-flex', 'align-top', 'items-center', 'leading-normal'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: ['badge-primary'],\n\t\t\t\tsecondary: ['badge-secondary'],\n\t\t\t\ttertiary: ['badge-tertiary'],\n\t\t\t\taccent: ['badge-accent'],\n\t\t\t\tsuccess: ['badge-success'],\n\t\t\t\tinfo: ['badge-info'],\n\t\t\t\twarning: ['badge-warning'],\n\t\t\t\terror: ['badge-error'],\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\txs: ['badge-xs'],\n\t\t\t\tsm: ['badge-sm'],\n\t\t\t\tmd: ['badge-md'],\n\t\t\t\tlg: ['badge-lg'],\n\t\t\t\txl: ['badge-xl'],\n\t\t\t},\n\t\t\ticonPosition: {\n\t\t\t\tleft: [''],\n\t\t\t\tright: ['flex-row-reverse'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'primary',\n\t\t\tsize: 'md',\n\t\t\ticonPosition: 'left',\n\t\t},\n\t},\n);\n\n/** Possible badge style variants */\nexport type BadgeVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'info' | 'warning' | 'error' | null | undefined;\n\n/** Possible badge size variants */\nexport type BadgeSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/** Possible icon positions relative to badge text */\nexport type BadgeIconPositionProps = 'left' | 'right' | null | undefined;\n\n/** Configuration object for badge styling variants */\nexport type BadgeProps = {\n\tvariant?: BadgeVariantProps;\n\tsize?: BadgeSizeProps;\n\ticonPosition?: BadgeIconPositionProps;\n};\n\n/**\n * A customizable badge component with multiple variants and icon support\n *\n * @remarks\n * Built with Tailwind CSS and class-variance-authority for style management.\n * Supports various styling variants, sizes, icon positions, and state modifiers.\n *\n * @example\n * ```html\n * <st-badge\n * variant=\"primary\"\n * size=\"md\"\n * icon=\"info\"\n * iconPosition=\"left\"\n * >\n * New Feature\n * </st-badge>\n * ```\n */\n@Component({\n\tselector: 'st-badge',\n\timports: [IconComponent, CommonModule],\n\ttemplateUrl: './badge.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent {\n\t/**\n\t * Badge style variant\n\t * @defaultValue 'primary'\n\t */\n\tvariant = input<BadgeVariantProps>();\n\n\t/**\n\t * Badge size variant\n\t * @defaultValue 'md'\n\t */\n\tsize = input<BadgeSizeProps>();\n\n\t/**\n\t * Outline style (border with transparent fill)\n\t * @defaultValue false\n\t */\n\toutline = input<boolean>(false);\n\n\t/**\n\t * Soft style (muted/subdued color variant)\n\t * @defaultValue false\n\t */\n\tsoft = input<boolean>(false);\n\n\t/**\n\t * Dash style (dashed border)\n\t * @defaultValue false\n\t */\n\tdash = input<boolean>(false);\n\n\t/**\n\t * Ghost style (transparent background)\n\t * @defaultValue false\n\t */\n\tghost = input<boolean>(false);\n\n\t/**\n\t * Icon name (from icon library)\n\t */\n\ticon = input<string | undefined>();\n\n\t/**\n\t * Position of icon relative to text\n\t * @defaultValue 'left'\n\t */\n\ticonPosition = input<BadgeIconPositionProps>();\n\n\t/**\n\t * @internal\n\t * Computed class string for the badge container\n\t */\n\tcomponentClass = computed(() =>\n\t\tcn(\n\t\t\tbadgeComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t}),\n\t\t\t{\n\t\t\t\t'badge-outline': this.outline(),\n\t\t\t\t'badge-soft': this.soft(),\n\t\t\t\t'badge-dash': this.dash(),\n\t\t\t\t'badge-ghost': this.ghost(),\n\t\t\t},\n\t\t),\n\t);\n}\n","@let iconVar = this.icon();\n@let componentClassVar = this.componentClass();\n\n<span [class]=\"componentClassVar\">\n\t@if (iconVar) {\n\t\t<st-icon [icon]=\"iconVar\" color=\"inherit\" size=\"auto\"></st-icon>\n\t}\n\t<ng-content></ng-content>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAWA;;;AAGG;AACU,MAAA,cAAc,GAAG,GAAG,CAChC,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC,EACpI;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,eAAe,CAAC;YAC1B,SAAS,EAAE,CAAC,iBAAiB,CAAC;YAC9B,QAAQ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A,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,kQASA,ED8EW,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,aAAa,sFAAE,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKzB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;+BACC,UAAU,EAAA,OAAA,EACX,CAAC,aAAa,EAAE,YAAY,CAAC,EAAA,eAAA,EAGrB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kQAAA,EAAA;;;AE1FhD;;AAEG;;;;"}
1
+ {"version":3,"file":"sixbell-telco-sdk-components-badge.mjs","sources":["../../../projects/sdk/components/badge/src/badge.component.ts","../../../projects/sdk/components/badge/src/badge.component.html","../../../projects/sdk/components/badge/sixbell-telco-sdk-components-badge.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { IconComponent } from '@sixbell-telco/sdk/components/icon';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\n/**\n * @internal\n * Generates base badge classes with style variants\n */\nexport const badgeComponent = cva(\n\t['badge', 'text-pretty', 'font-body', 'leading-normal', 'font-normal', 'inline-flex', 'align-top', 'items-center', 'leading-normal'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tprimary: ['badge-primary'],\n\t\t\t\tsecondary: ['badge-secondary'],\n\t\t\t\ttertiary: ['badge-tertiary'],\n\t\t\t\taccent: ['badge-accent'],\n\t\t\t\tsuccess: ['badge-success'],\n\t\t\t\tinfo: ['badge-info'],\n\t\t\t\twarning: ['badge-warning'],\n\t\t\t\terror: ['badge-error'],\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\txs: ['badge-xs'],\n\t\t\t\tsm: ['badge-sm'],\n\t\t\t\tmd: ['badge-md'],\n\t\t\t\tlg: ['badge-lg'],\n\t\t\t\txl: ['badge-xl'],\n\t\t\t},\n\t\t\ticonPosition: {\n\t\t\t\tleft: [''],\n\t\t\t\tright: ['flex-row-reverse'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'primary',\n\t\t\tsize: 'md',\n\t\t\ticonPosition: 'left',\n\t\t},\n\t},\n);\n\n/** Possible badge style variants */\nexport type BadgeVariantProps = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'success' | 'info' | 'warning' | 'error' | null | undefined;\n\n/** Possible badge size variants */\nexport type BadgeSizeProps = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | null | undefined;\n\n/** Possible icon positions relative to badge text */\nexport type BadgeIconPositionProps = 'left' | 'right' | null | undefined;\n\n/** Configuration object for badge styling variants */\nexport type BadgeProps = {\n\tvariant?: BadgeVariantProps;\n\tsize?: BadgeSizeProps;\n\ticonPosition?: BadgeIconPositionProps;\n};\n\n/**\n * A customizable badge component with multiple variants and icon support\n *\n * @remarks\n * Built with Tailwind CSS and class-variance-authority for style management.\n * Supports various styling variants, sizes, icon positions, and state modifiers.\n *\n * @example\n * ```html\n * <st-badge\n * variant=\"primary\"\n * size=\"md\"\n * icon=\"info\"\n * iconPosition=\"left\"\n * >\n * New Feature\n * </st-badge>\n * ```\n */\n@Component({\n\tselector: 'st-badge',\n\timports: [IconComponent, CommonModule],\n\ttemplateUrl: './badge.component.html',\n\tstyles: '',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent {\n\t/**\n\t * Badge style variant\n\t * @defaultValue 'primary'\n\t */\n\tvariant = input<BadgeVariantProps>();\n\n\t/**\n\t * Badge size variant\n\t * @defaultValue 'md'\n\t */\n\tsize = input<BadgeSizeProps>();\n\n\t/**\n\t * Outline style (border with transparent fill)\n\t * @defaultValue false\n\t */\n\toutline = input<boolean>(false);\n\n\t/**\n\t * Soft style (muted/subdued color variant)\n\t * @defaultValue false\n\t */\n\tsoft = input<boolean>(false);\n\n\t/**\n\t * Dash style (dashed border)\n\t * @defaultValue false\n\t */\n\tdash = input<boolean>(false);\n\n\t/**\n\t * Ghost style (transparent background)\n\t * @defaultValue false\n\t */\n\tghost = input<boolean>(false);\n\n\t/**\n\t * Icon name (from icon library)\n\t */\n\ticon = input<string | undefined>();\n\n\t/**\n\t * Position of icon relative to text\n\t * @defaultValue 'left'\n\t */\n\ticonPosition = input<BadgeIconPositionProps>();\n\n\t/**\n\t * @internal\n\t * Computed class string for the badge container\n\t */\n\tcomponentClass = computed(() =>\n\t\tcn(\n\t\t\t'h-auto',\n\t\t\tbadgeComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t\ticonPosition: this.iconPosition(),\n\t\t\t}),\n\t\t\t{\n\t\t\t\t'badge-outline': this.outline(),\n\t\t\t\t'badge-soft': this.soft(),\n\t\t\t\t'badge-dash': this.dash(),\n\t\t\t\t'badge-ghost': this.ghost(),\n\t\t\t},\n\t\t),\n\t);\n}\n","@let iconVar = this.icon();\n@let componentClassVar = this.componentClass();\n\n<span [class]=\"componentClassVar\">\n\t@if (iconVar) {\n\t\t<st-icon [icon]=\"iconVar\" color=\"inherit\" size=\"auto\"></st-icon>\n\t}\n\t<ng-content></ng-content>\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAMA;;;AAGG;AACU,MAAA,cAAc,GAAG,GAAG,CAChC,CAAC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,CAAC,EACpI;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,eAAe,CAAC;YAC1B,SAAS,EAAE,CAAC,iBAAiB,CAAC;YAC9B,QAAQ,EAAE,CAAC,gBAAgB,CAAC;YAC5B,MAAM,EAAE,CAAC,cAAc,CAAC;YACxB,OAAO,EAAE,CAAC,eAAe,CAAC;YAC1B,IAAI,EAAE,CAAC,YAAY,CAAC;YACpB,OAAO,EAAE,CAAC,eAAe,CAAC;YAC1B,KAAK,EAAE,CAAC,aAAa,CAAC;AACtB,SAAA;AACD,QAAA,IAAI,EAAE;YACL,EAAE,EAAE,CAAC,UAAU,CAAC;YAChB,EAAE,EAAE,CAAC,UAAU,CAAC;YAChB,EAAE,EAAE,CAAC,UAAU,CAAC;YAChB,EAAE,EAAE,CAAC,UAAU,CAAC;YAChB,EAAE,EAAE,CAAC,UAAU,CAAC;AAChB,SAAA;AACD,QAAA,YAAY,EAAE;YACb,IAAI,EAAE,CAAC,EAAE,CAAC;YACV,KAAK,EAAE,CAAC,kBAAkB,CAAC;AAC3B,SAAA;AACD,KAAA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