@sixbell-telco/sdk 1.3.0 → 1.5.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 (97) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +437 -472
  3. package/_index.css +109 -11
  4. package/assets/styles/toast.css +8 -0
  5. package/components/forms/date-picker/constants/date-picker.constants.d.ts +13 -0
  6. package/components/forms/date-picker/index.d.ts +5 -0
  7. package/components/forms/date-picker/public-api.d.ts +3 -0
  8. package/components/forms/date-picker/src/date-picker.component.d.ts +323 -0
  9. package/components/forms/date-picker/types/date-picker.types.d.ts +39 -0
  10. package/components/{forms/datepicker → sonner}/index.d.ts +1 -1
  11. package/components/sonner/public-api.d.ts +2 -0
  12. package/components/sonner/src/sonner.component.d.ts +39 -0
  13. package/components/sonner/toaster/index.d.ts +5 -0
  14. package/components/sonner/toaster/public-api.d.ts +1 -0
  15. package/components/sonner/toaster/src/toaster.component.d.ts +89 -0
  16. package/components/toast/public-api.d.ts +9 -0
  17. package/components/toast/services/toast.service.d.ts +3 -0
  18. package/components/toast/toast-message/toast-message.component.d.ts +3 -0
  19. package/components/toast/toasts-container/toasts-container.component.d.ts +3 -0
  20. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs +885 -0
  21. package/fesm2022/sixbell-telco-sdk-components-forms-date-picker.mjs.map +1 -0
  22. package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs +132 -0
  23. package/fesm2022/sixbell-telco-sdk-components-sonner-toaster.mjs.map +1 -0
  24. package/fesm2022/sixbell-telco-sdk-components-sonner.mjs +179 -0
  25. package/fesm2022/sixbell-telco-sdk-components-sonner.mjs.map +1 -0
  26. package/fesm2022/sixbell-telco-sdk-components-toast.mjs +14 -0
  27. package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
  28. package/fesm2022/sixbell-telco-sdk-utils-date.mjs +90 -2
  29. package/fesm2022/sixbell-telco-sdk-utils-date.mjs.map +1 -1
  30. package/fesm2022/sixbell-telco-sdk-utils-logger.mjs +578 -0
  31. package/fesm2022/sixbell-telco-sdk-utils-logger.mjs.map +1 -0
  32. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs +1222 -0
  33. package/fesm2022/sixbell-telco-sdk-utils-resource-loader.mjs.map +1 -0
  34. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs +1434 -180
  35. package/fesm2022/sixbell-telco-sdk-utils-theme.mjs.map +1 -1
  36. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs +734 -182
  37. package/fesm2022/sixbell-telco-sdk-utils-translation.mjs.map +1 -1
  38. package/package.json +68 -51
  39. package/utils/date/src/date-utils.d.ts +44 -0
  40. package/utils/logger/README.md +539 -0
  41. package/utils/logger/index.d.ts +5 -0
  42. package/utils/logger/public-api.d.ts +3 -0
  43. package/utils/logger/src/constants.d.ts +15 -0
  44. package/utils/logger/src/logger.service.d.ts +123 -0
  45. package/utils/logger/src/models/logger.d.ts +25 -0
  46. package/utils/logger/src/providers/logger.provider.d.ts +3 -0
  47. package/utils/resource-loader/README.md +460 -0
  48. package/utils/resource-loader/index.d.ts +5 -0
  49. package/utils/resource-loader/public-api.d.ts +1 -0
  50. package/utils/resource-loader/src/cache/index.d.ts +2 -0
  51. package/utils/resource-loader/src/cache/layers/factory.d.ts +38 -0
  52. package/utils/resource-loader/src/cache/layers/index.d.ts +3 -0
  53. package/utils/resource-loader/src/cache/layers/indexed-db-cache.d.ts +118 -0
  54. package/utils/resource-loader/src/cache/layers/local-storage-cache.d.ts +86 -0
  55. package/utils/resource-loader/src/cache/layers/memory-cache.d.ts +76 -0
  56. package/utils/resource-loader/src/cache/types.d.ts +107 -0
  57. package/utils/resource-loader/src/config/index.d.ts +1 -0
  58. package/utils/resource-loader/src/config/load-config.d.ts +32 -0
  59. package/utils/resource-loader/src/constants.d.ts +38 -0
  60. package/utils/resource-loader/src/http/index.d.ts +1 -0
  61. package/utils/resource-loader/src/http/retryable-client.d.ts +43 -0
  62. package/utils/resource-loader/src/index.d.ts +1 -0
  63. package/utils/resource-loader/src/resource-loader.d.ts +67 -0
  64. package/utils/resource-loader/src/types.d.ts +152 -0
  65. package/utils/resource-loader/src/utils/cache-validator.d.ts +72 -0
  66. package/utils/resource-loader/src/utils/helpers.d.ts +15 -0
  67. package/utils/resource-loader/src/utils/index.d.ts +2 -0
  68. package/utils/theme/README.md +1054 -109
  69. package/utils/theme/public-api.d.ts +9 -1
  70. package/utils/theme/src/constants.d.ts +74 -0
  71. package/utils/theme/src/models/theme.d.ts +288 -0
  72. package/utils/theme/src/providers/constants.d.ts +7 -0
  73. package/utils/theme/src/providers/theme.provider.d.ts +13 -0
  74. package/utils/theme/src/providers/theme.provider.types.d.ts +29 -0
  75. package/utils/theme/src/theme-assets/theme-assets.service.d.ts +214 -0
  76. package/utils/theme/src/theme-assets/theme-assets.types.d.ts +10 -0
  77. package/utils/theme/src/theme-dom/theme-dom.service.d.ts +87 -0
  78. package/utils/theme/src/theme-scheme/theme-scheme.service.d.ts +44 -0
  79. package/utils/theme/src/theme-storage/theme-storage.service.d.ts +47 -0
  80. package/utils/theme/src/theme.service.d.ts +40 -186
  81. package/utils/theme/src/utils/utils.d.ts +86 -0
  82. package/utils/translation/README.md +1414 -176
  83. package/utils/translation/public-api.d.ts +6 -0
  84. package/utils/translation/src/constants.d.ts +52 -0
  85. package/utils/translation/src/models/translation.d.ts +59 -0
  86. package/utils/translation/src/providers/constants.d.ts +11 -0
  87. package/utils/translation/src/providers/translation.provider.d.ts +73 -0
  88. package/utils/translation/src/providers/translation.provider.types.d.ts +26 -0
  89. package/utils/translation/src/translation-dom/translation-dom.service.d.ts +26 -0
  90. package/utils/translation/src/translation-storage/translation-storage.service.d.ts +34 -0
  91. package/utils/translation/src/translation.service.d.ts +19 -166
  92. package/components/forms/datepicker/constants/datepicker.constants.d.ts +0 -5
  93. package/components/forms/datepicker/public-api.d.ts +0 -3
  94. package/components/forms/datepicker/src/datepicker.component.d.ts +0 -165
  95. package/components/forms/datepicker/types/datepicker.types.d.ts +0 -7
  96. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +0 -487
  97. package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +0 -1
package/_index.css CHANGED
@@ -1,5 +1,6 @@
1
1
  @import 'tailwindcss' source('../');
2
2
  @import '@angular/cdk/overlay-prebuilt.css';
3
+ /* Legacy toast system (deprecated) + Sonner relies on component classes */
3
4
  @import './assets/styles/toast.css';
4
5
 
5
6
  @plugin "@midudev/tailwind-animations";
@@ -56,7 +57,7 @@
56
57
 
57
58
  /* Custom Colors */
58
59
  --color-base-50: color-mix(in oklch, var(--color-base-200), #000 7%);
59
- --color-primary-light: color-mix(in oklch, var(--color-primary) 60%, #fff 40%);
60
+ --color-primary-light: color-mix(in oklch, var(--color-primary) 75%, #fff);
60
61
  --color-primary-gradient: color-mix(in oklch, var(--color-primary) 60%, #121212);
61
62
  --color-primary-gradient-content: oklch(100% 0 0);
62
63
  --color-secondary-gradient: color-mix(in oklch, var(--color-secondary) 60%, #121212);
@@ -137,7 +138,7 @@
137
138
 
138
139
  /* Custom Colors */
139
140
  --color-base-50: color-mix(in oklch, var(--color-base-200), #000 7%);
140
- --color-primary-light: color-mix(in oklch, var(--color-primary) 60%, #fff 40%);
141
+ --color-primary-light: color-mix(in oklch, var(--color-primary) 75%, #000);
141
142
  --color-primary-gradient: color-mix(in oklch, var(--color-primary) 60%, #121212);
142
143
  --color-primary-gradient-content: oklch(100% 0 0);
143
144
  --color-secondary-gradient: color-mix(in oklch, var(--color-secondary) 60%, #121212);
@@ -175,7 +176,7 @@
175
176
  @theme {
176
177
  /* Color tokens registered for Tailwind utilities; values provided in theme plugin blocks */
177
178
  --color-base-50: color-mix(in oklch, var(--color-base-200), #000 7%);
178
- --color-primary-light: color-mix(in oklch, var(--color-primary) 60%, #fff 40%);
179
+ --color-primary-light: color-mix(in oklch, var(--color-primary) 75%, #fff);
179
180
  --color-primary-gradient: color-mix(in oklch, var(--color-primary) 60%, #121212);
180
181
  --color-primary-gradient-content: oklch(100% 0 0);
181
182
  --color-secondary-gradient: color-mix(in oklch, var(--color-secondary) 60%, #121212);
@@ -208,8 +209,11 @@
208
209
  --font-poppins: Poppins, sans-serif;
209
210
  --font-heading: Poppins, sans-serif;
210
211
  --font-body: Poppins, sans-serif;
211
- --shadow-main: 0px 0px 4px 0px var(--shadow-primary);
212
- --shadow-backdrop: 0px 25px 50px -12px var(--shadow-backdrop);
212
+ --shadow-main:
213
+ var(--color-shadow-primary) 0px 0px 0px 0px, var(--color-shadow-primary) 0px 0px 0px 0px, var(--color-shadow-primary) 0px 0px 0px 0px,
214
+ var(--color-shadow-primary) 0px 0px 0px 0px, var(--color-shadow-primary) 0px 4px 6px -1px, var(--color-shadow-primary) 0px 2px 4px -2px;
215
+ --shadow-main-lg: 0 4px 12px var(--color-shadow-primary);
216
+ --shadow-backdrop: 0px 25px 50px -12px var(--color-shadow-backdrop);
213
217
  --font-weight-inherit: inherit;
214
218
  --ease-ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
215
219
  --ease-ease-in-and-out-back: cubic-bezier(0.68, -0.55, 0.27, 1.55);
@@ -305,6 +309,10 @@
305
309
  max-width: 100%;
306
310
  }
307
311
 
312
+ input[type='time']::-webkit-calendar-picker-indicator {
313
+ background: none;
314
+ }
315
+
308
316
  @media (prefers-reduced-motion: reduce) {
309
317
  * {
310
318
  animation-duration: 0.01ms !important;
@@ -433,17 +441,12 @@
433
441
  --color-text-on-accent: var(--color-primary-content);
434
442
 
435
443
  @apply font-body;
436
-
437
- &::part(button):hover {
438
- @apply bg-primary text-primary-content;
439
- }
440
-
441
444
  &::part(button) {
442
445
  @apply rounded-selector transition-colors duration-150 ease-linear;
443
446
  }
444
447
 
445
448
  &::part(range-inner) {
446
- @apply bg-primary/80 text-primary-content rounded-none;
449
+ @apply bg-primary-light text-primary-content rounded-none;
447
450
  }
448
451
 
449
452
  &::part(range-start) {
@@ -457,6 +460,23 @@
457
460
  &::part(range-start range-end) {
458
461
  @apply rounded-selector;
459
462
  }
463
+
464
+ &::part(today) {
465
+ color: var(--color-primary);
466
+ }
467
+
468
+ &::part(today selected),
469
+ &::part(today):focus-visible {
470
+ @apply text-primary-content;
471
+ }
472
+
473
+ /* Hover outline only for non-selected day buttons; selected part overrides this */
474
+ &::part(button):hover {
475
+ @apply bg-base-50 text-base-content;
476
+ }
477
+ &::part(button selected):hover {
478
+ @apply bg-primary text-primary-content;
479
+ }
460
480
  }
461
481
 
462
482
  calendar-date {
@@ -585,4 +605,82 @@
585
605
  @apply border-base-300 bg-base-300 placeholder-base-content text-base-content/40 cursor-not-allowed;
586
606
  }
587
607
  }
608
+
609
+ .hide-x-scrollbar {
610
+ scrollbar-width: none; /* Firefox */
611
+ -ms-overflow-style: none; /* IE 10+ */
612
+ }
613
+ .hide-x-scrollbar::-webkit-scrollbar {
614
+ height: 0 !important; /* Chrome/Safari */
615
+ }
616
+
617
+ /* Auto-hide/show scrollbars on hover (overlay-like, no reserved gutter) */
618
+ .scrollbar-x-auto-hide {
619
+ overflow-x: auto;
620
+ scrollbar-gutter: auto; /* don't reserve space */
621
+ -ms-overflow-style: none; /* IE/Edge */
622
+ scrollbar-width: thin; /* Firefox: keep thickness constant */
623
+ scrollbar-color: transparent transparent; /* invisible by default */
624
+ }
625
+ /* WebKit: keep thickness constant; toggle visibility via color */
626
+ .scrollbar-x-auto-hide::-webkit-scrollbar {
627
+ height: 8px;
628
+ background: transparent;
629
+ }
630
+ .scrollbar-x-auto-hide::-webkit-scrollbar-thumb {
631
+ background-color: transparent;
632
+ border-radius: 4px;
633
+ }
634
+ .scrollbar-x-auto-hide:hover {
635
+ scrollbar-color: var(--color-scroll-thumb) transparent;
636
+ }
637
+ .scrollbar-x-auto-hide:hover::-webkit-scrollbar-thumb {
638
+ background-color: var(--color-scroll-thumb);
639
+ }
640
+
641
+ .scrollbar-y-auto-hide {
642
+ overflow-y: auto;
643
+ scrollbar-gutter: auto; /* don't reserve space */
644
+ -ms-overflow-style: none; /* IE/Edge */
645
+ scrollbar-width: thin; /* Firefox */
646
+ scrollbar-color: transparent transparent; /* invisible by default */
647
+ }
648
+ .scrollbar-y-auto-hide::-webkit-scrollbar {
649
+ width: 8px;
650
+ background: transparent;
651
+ }
652
+ .scrollbar-y-auto-hide::-webkit-scrollbar-thumb {
653
+ background-color: transparent;
654
+ border-radius: 4px;
655
+ }
656
+ .scrollbar-y-auto-hide:hover {
657
+ scrollbar-color: var(--color-scroll-thumb) transparent;
658
+ }
659
+ .scrollbar-y-auto-hide:hover::-webkit-scrollbar-thumb {
660
+ background-color: var(--color-scroll-thumb);
661
+ }
662
+
663
+ /* Both axes */
664
+ .scrollbar-auto-hide {
665
+ overflow: auto;
666
+ scrollbar-gutter: auto;
667
+ -ms-overflow-style: none;
668
+ scrollbar-width: thin; /* Firefox */
669
+ scrollbar-color: transparent transparent; /* invisible by default */
670
+ }
671
+ .scrollbar-auto-hide::-webkit-scrollbar {
672
+ width: 8px;
673
+ height: 8px;
674
+ background: transparent;
675
+ }
676
+ .scrollbar-auto-hide::-webkit-scrollbar-thumb {
677
+ background-color: transparent;
678
+ border-radius: 4px;
679
+ }
680
+ .scrollbar-auto-hide:hover {
681
+ scrollbar-color: var(--color-scroll-thumb) transparent;
682
+ }
683
+ .scrollbar-auto-hide:hover::-webkit-scrollbar-thumb {
684
+ background-color: var(--color-scroll-thumb);
685
+ }
588
686
  }
@@ -1,3 +1,11 @@
1
+ /* DEPRECATED: Legacy toast system styles
2
+ * --------------------------------------------------
3
+ * Retained for backward compatibility while migrating
4
+ * to ngx-sonner based toasts. Do not modify stacking
5
+ * logic; new styling lives inside Sonner component via
6
+ * Tailwind utility classes. Remove this file only when
7
+ * all consumers have switched to the new API.
8
+ */
1
9
  @use 'tailwindcss/base';
2
10
 
3
11
  .toast-container > st-toast-message:nth-child(n + 4) > .toast-message {
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Supported locales (BCP 47) for the date picker.
3
+ * These map directly to the underlying calendar web component locale attribute.
4
+ */
5
+ export declare const SUPPORTED_LOCALES: readonly ["en-US", "en-GB", "es-ES", "es-MX", "fr-FR", "de-DE", "it-IT", "pt-BR", "pt-PT", "ja-JP", "ko-KR", "zh-CN", "zh-TW", "ru-RU", "ar-SA", "hi-IN", "nl-NL", "sv-SE", "da-DK", "no-NO", "fi-FI", "pl-PL", "tr-TR", "he-IL", "th-TH", "vi-VN"];
6
+ /** Allowed datepicker modes */
7
+ export declare const DATEPICKER_MODES: readonly ["single", "range"];
8
+ /** Allowed time display formats for trigger text */
9
+ export declare const TIME_DISPLAY_FORMATS: readonly ["24h", "12h"];
10
+ /** Allowed Intl.DateTimeFormat dateStyle values we support */
11
+ export declare const DATE_STYLES: readonly ["short", "medium", "long", "full"];
12
+ /** Allowed number of calendars in range mode */
13
+ export declare const RANGE_CALENDARS: readonly [1, 2];
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sixbell-telco/sdk/components/forms/date-picker" />
5
+ export * from './public-api';
@@ -0,0 +1,3 @@
1
+ export * from './constants/date-picker.constants';
2
+ export * from './src/date-picker.component';
3
+ export * from './types/date-picker.types';
@@ -0,0 +1,323 @@
1
+ import { ControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
2
+ import { OverlayComponent } from '@sixbell-telco/sdk/components/overlay';
3
+ import { DateRange, QuickRangePreset } from '@sixbell-telco/sdk/utils/date';
4
+ import 'cally';
5
+ import { DatePickerValue, OptionalTimeString } from '../types/date-picker.types';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Datepicker - Single date and date range picker with optional time selection
9
+ *
10
+ * @remarks
11
+ * This component wraps Cally.js calendar elements and provides a rich, accessible
12
+ * date and date-range picking experience for Angular apps. It supports:
13
+ * - Single or range modes
14
+ * - Quick action ranges
15
+ * - Optional time selection with minutes or seconds
16
+ * - 12h/24h time display for the trigger text
17
+ * - Locale-aware calendar (auto-mapped from the TranslationService or overridden)
18
+ * - Form integration (reactive forms) and standalone usage
19
+ *
20
+ * The component is exported as `stDatepicker` for template reference variables
21
+ * to access methods (e.g. displayValue()).
22
+ *
23
+ * @example Basic single date
24
+ * ```html
25
+ * <st-datepicker
26
+ * label="Pick a date"
27
+ * mode="single"
28
+ * format="DD/MM/YYYY"
29
+ * (dateUpdated)="onDate($event)"
30
+ * #picker="stDatepicker"
31
+ * >
32
+ * <st-button [outline]="true">{{ picker.displayValue() || 'Pick a date' }}</st-button>
33
+ * </st-datepicker>
34
+ * ```
35
+ *
36
+ * @example Date range with time (minutes)
37
+ * ```html
38
+ * <st-datepicker
39
+ * label="Pick range with time"
40
+ * mode="range"
41
+ * [showTimePicker]="true"
42
+ * [showSeconds]="false"
43
+ * (rangeUpdated)="onRange($event)"
44
+ * (startTimeChanged)="onStartTime($event)"
45
+ * (endTimeChanged)="onEndTime($event)"
46
+ * #picker="stDatepicker"
47
+ * >
48
+ * <st-button [outline]="true">{{ picker.displayValue() || 'Pick range' }}</st-button>
49
+ * </st-datepicker>
50
+ * ```
51
+ *
52
+ * @example Reactive form control (range)
53
+ * ```html
54
+ * <form [formGroup]="form">
55
+ * <st-datepicker
56
+ * [parentForm]="form"
57
+ * formControlName="range"
58
+ * mode="range"
59
+ * [rangeCalendars]="2"
60
+ * [showQuickActions]="true"
61
+ * name="range"
62
+ * >
63
+ * <st-input [value]="picker.displayValue()" [readonly]="true" name="range"></st-input>
64
+ * </st-datepicker>
65
+ * </form>
66
+ * ```
67
+ */
68
+ export declare class DatepickerComponent implements ControlValueAccessor {
69
+ /** Internal state for single date (ISO format) */
70
+ private readonly _selectedDateValue;
71
+ /** Internal state for date range (ISO format) */
72
+ private readonly _selectedRangeValue;
73
+ /** Disabled state */
74
+ private readonly _disabled;
75
+ /** Flag to prevent concurrent range updates */
76
+ private isUpdatingRange;
77
+ /** Translation service for reactive language changes */
78
+ private readonly translationService;
79
+ /** Form change callback */
80
+ private onControlChange;
81
+ /** Form touch callback */
82
+ private onControlTouch;
83
+ /** Overlay reference for controlling calendar popup */
84
+ datePickerOverlay: import("@angular/core").Signal<OverlayComponent | undefined>;
85
+ /** Label displayed above the fieldset legend */
86
+ label: import("@angular/core").InputSignal<string>;
87
+ /**
88
+ * Picker mode
89
+ * @defaultValue 'single'
90
+ * @remarks 'single' for single date, 'range' for start/end selection
91
+ */
92
+ mode: import("@angular/core").InputSignal<"single" | "range">;
93
+ /**
94
+ * Display/parse format for dates
95
+ * @defaultValue 'DD/MM/YYYY'
96
+ * @remarks Used for trigger text and for parsing external values (when provided as display strings)
97
+ */
98
+ format: import("@angular/core").InputSignal<"DD/MM/YYYY" | "MM/DD/YYYY" | "YYYY-MM-DD" | "DD-MM-YYYY" | "MM-DD-YYYY" | "YYYY/MM/DD" | "DD.MM.YYYY" | "MM.DD.YYYY" | "YYYY.MM.DD">;
99
+ /**
100
+ * Locale used by the calendar web component
101
+ * @defaultValue 'en-US'
102
+ * @remarks If omitted or set to 'en-US', the component will auto-map from the TranslationService using `languageMapping`.
103
+ */
104
+ language: import("@angular/core").InputSignal<"en-US" | "en-GB" | "es-ES" | "es-MX" | "fr-FR" | "de-DE" | "it-IT" | "pt-BR" | "pt-PT" | "ja-JP" | "ko-KR" | "zh-CN" | "zh-TW" | "ru-RU" | "ar-SA" | "hi-IN" | "nl-NL" | "sv-SE" | "da-DK" | "no-NO" | "fi-FI" | "pl-PL" | "tr-TR" | "he-IL" | "th-TH" | "vi-VN">;
105
+ /** Optional minimum selectable date (display or ISO). Internally coerced to ISO. */
106
+ minDate: import("@angular/core").InputSignal<string | null>;
107
+ /** Optional maximum selectable date (display or ISO). Internally coerced to ISO. */
108
+ maxDate: import("@angular/core").InputSignal<string | null>;
109
+ /** Single date value (external binding). Accepts display or ISO; stored internally as ISO. */
110
+ value: import("@angular/core").InputSignal<string>;
111
+ /** Date range value (external binding). Accepts display or ISO; stored internally as ISO. */
112
+ rangeValue: import("@angular/core").InputSignal<DateRange | null>;
113
+ /** Name attribute for associated input (useful when wrapping with st-input). */
114
+ name: import("@angular/core").InputSignal<string>;
115
+ /**
116
+ * Number of calendars to show in range mode
117
+ * @defaultValue 2
118
+ */
119
+ rangeCalendars: import("@angular/core").InputSignal<2 | 1>;
120
+ /**
121
+ * Whether to show quick action buttons for common ranges
122
+ * @defaultValue true
123
+ */
124
+ showQuickActions: import("@angular/core").InputSignal<boolean>;
125
+ /**
126
+ * Whether to show time pickers for start/end
127
+ * @defaultValue false
128
+ */
129
+ showTimePicker: import("@angular/core").InputSignal<boolean>;
130
+ /**
131
+ * Whether to include seconds in time inputs and display
132
+ * @defaultValue false
133
+ */
134
+ showSeconds: import("@angular/core").InputSignal<boolean>;
135
+ /**
136
+ * Time display format for trigger text
137
+ * @defaultValue '24h'
138
+ * @remarks Affects only the textual display in the trigger, not the underlying stored time format
139
+ */
140
+ timeDisplayFormat: import("@angular/core").InputSignal<"24h" | "12h">;
141
+ /**
142
+ * Mapping of translation language codes (e.g. 'en','es','pt') to calendar locales (e.g. 'en-US','es-MX','pt-BR')
143
+ * @defaultValue { en: 'en-US', es: 'es-MX', pt: 'pt-BR' }
144
+ */
145
+ languageMapping: import("@angular/core").InputSignal<Record<string, "en-US" | "en-GB" | "es-ES" | "es-MX" | "fr-FR" | "de-DE" | "it-IT" | "pt-BR" | "pt-PT" | "ja-JP" | "ko-KR" | "zh-CN" | "zh-TW" | "ru-RU" | "ar-SA" | "hi-IN" | "nl-NL" | "sv-SE" | "da-DK" | "no-NO" | "fi-FI" | "pl-PL" | "tr-TR" | "he-IL" | "th-TH" | "vi-VN">>;
146
+ /**
147
+ * Use locale-based formatting for the trigger display instead of the custom pattern
148
+ * @defaultValue false
149
+ */
150
+ useLocaleDisplay: import("@angular/core").InputSignal<boolean>;
151
+ /**
152
+ * Locale date style when useLocaleDisplay=true
153
+ * @defaultValue 'short'
154
+ */
155
+ dateStyle: import("@angular/core").InputSignal<"short" | "medium" | "long" | "full">;
156
+ /** Optional external defaults for start/end time (HH:mm or HH:mm:ss). When empty string, inputs render blank. */
157
+ startTimeValue: import("@angular/core").InputSignal<OptionalTimeString>;
158
+ endTimeValue: import("@angular/core").InputSignal<OptionalTimeString>;
159
+ /**
160
+ * Current start time value (internal signal). Empty when unset.
161
+ * @internal
162
+ */
163
+ readonly startTime: import("@angular/core").WritableSignal<OptionalTimeString>;
164
+ /**
165
+ * Current end time value (internal signal). Empty when unset.
166
+ * @internal
167
+ */
168
+ readonly endTime: import("@angular/core").WritableSignal<OptionalTimeString>;
169
+ /** Parent reactive form group (optional) */
170
+ parentForm: import("@angular/core").InputSignal<FormGroup<any> | null>;
171
+ /** Name of the form control inside the parent form (optional) */
172
+ formControlName: import("@angular/core").InputSignal<string>;
173
+ /**
174
+ * Emits formatted single date when it changes
175
+ * @remarks Uses the `format` (or locale display if enabled). For range mode, use `rangeUpdated`.
176
+ */
177
+ dateUpdated: import("@angular/core").OutputEmitterRef<string>;
178
+ /**
179
+ * Emits an ISO `DateRange` when both start & end are selected
180
+ * @remarks Start/end are always emitted in ISO (YYYY-MM-DD). Time values are emitted separately.
181
+ */
182
+ rangeUpdated: import("@angular/core").OutputEmitterRef<DateRange>;
183
+ /** Emits formatted date when value changes (single mode). Alias of `dateUpdated`. */
184
+ valueChanged: import("@angular/core").OutputEmitterRef<string>;
185
+ /** Emits ISO date range (alias of `rangeUpdated`). */
186
+ rangeValueChanged: import("@angular/core").OutputEmitterRef<DateRange>;
187
+ /** Emits start time (HH:mm or HH:mm:ss) changes; empty string when cleared */
188
+ startTimeChanged: import("@angular/core").OutputEmitterRef<OptionalTimeString>;
189
+ /** Emits end time (HH:mm or HH:mm:ss) changes; empty string when cleared */
190
+ endTimeChanged: import("@angular/core").OutputEmitterRef<OptionalTimeString>;
191
+ /** Effective minimum date (input or default 10 years ago) */
192
+ effectiveMinDate: import("@angular/core").Signal<string>;
193
+ /** Effective maximum date (input or default 10 years ahead) */
194
+ effectiveMaxDate: import("@angular/core").Signal<string>;
195
+ /** Locale for calendar components */
196
+ calendarLocale: import("@angular/core").Signal<"en-US" | "en-GB" | "es-ES" | "es-MX" | "fr-FR" | "de-DE" | "it-IT" | "pt-BR" | "pt-PT" | "ja-JP" | "ko-KR" | "zh-CN" | "zh-TW" | "ru-RU" | "ar-SA" | "hi-IN" | "nl-NL" | "sv-SE" | "da-DK" | "no-NO" | "fi-FI" | "pl-PL" | "tr-TR" | "he-IL" | "th-TH" | "vi-VN">;
197
+ /** Form control instance from parent form group */
198
+ formField: import("@angular/core").Signal<FormControl<any> | null>;
199
+ /** Formatted display value for single date */
200
+ selectedDate: import("@angular/core").Signal<string>;
201
+ /** Formatted display value for date range */
202
+ selectedRange: import("@angular/core").Signal<{
203
+ start: string;
204
+ end: string;
205
+ } | null>;
206
+ /** @internal Value for calendar-range component (ISO/ISO format) */
207
+ rangeCalendarValue: import("@angular/core").Signal<string>;
208
+ displayValue: import("@angular/core").Signal<string>;
209
+ /** Time values normalized for the inputs based on showSeconds */
210
+ startTimeDisplay: import("@angular/core").Signal<string>;
211
+ endTimeDisplay: import("@angular/core").Signal<string>;
212
+ /** Keep internal state in sync when rangeValue input changes */
213
+ syncInputEff: import("@angular/core").EffectRef;
214
+ /** Sync external start/end time inputs into internal signals */
215
+ syncTimeInputsEff: import("@angular/core").EffectRef;
216
+ /** Exposed selected date value (ISO format) for template access */
217
+ selectedDateValue: import("@angular/core").Signal<string>;
218
+ private formatMonthYear;
219
+ private formatWeekday;
220
+ private formatDateLocale;
221
+ fromDay: import("@angular/core").Signal<string>;
222
+ fromMonthYear: import("@angular/core").Signal<string>;
223
+ fromWeekday: import("@angular/core").Signal<string>;
224
+ toDay: import("@angular/core").Signal<string>;
225
+ toMonthYear: import("@angular/core").Signal<string>;
226
+ toWeekday: import("@angular/core").Signal<string>;
227
+ constructor();
228
+ /**
229
+ * Initialize component values based on inputs
230
+ */
231
+ private initializeValues;
232
+ /**
233
+ * Set single date value programmatically
234
+ */
235
+ private setSingleDateValue;
236
+ /**
237
+ * Emit change events and notify form controls
238
+ */
239
+ private emitChanges;
240
+ /**
241
+ * Close overlay if available
242
+ */
243
+ private closeOverlay;
244
+ /**
245
+ * Handle calendar change events from Cally components
246
+ * @internal
247
+ */
248
+ onCalendarChange(calendarElement: HTMLElement, event?: Event): void;
249
+ /**
250
+ * Apply a predefined quick range preset
251
+ * @param preset One of: 'last7Days' | 'last30Days' | 'last6Months' | 'lastYear'
252
+ * @remarks This updates the date range (ISO). Time inputs are not modified.
253
+ */
254
+ selectQuickRange(preset: QuickRangePreset): Promise<void>;
255
+ /**
256
+ * Apply a time-based quick range (last N hours). Visible only when time picker is enabled.
257
+ * @param hours Number of hours to go back from now
258
+ * @remarks Updates the date range and emits start/end time strings (HH:mm:ss)
259
+ */
260
+ selectQuickLastHours(hours: number): Promise<void>;
261
+ /**
262
+ * Clear the current range selection
263
+ * @remarks Also clears start/end time inputs and emits empty strings for time changes.
264
+ */
265
+ clearRange(): Promise<void>;
266
+ /**
267
+ * Clear the current single date selection
268
+ */
269
+ clearDate(): void;
270
+ /**
271
+ * Set range value programmatically
272
+ */
273
+ private setRangeValue;
274
+ /**
275
+ * Update calendar element to ensure Cally.js synchronization
276
+ */
277
+ private updateCalendarElementValue;
278
+ /**
279
+ * Handle single date calendar change
280
+ */
281
+ private handleSingleCalendarChange;
282
+ /**
283
+ * Handle range calendar change
284
+ */
285
+ private handleRangeCalendarChange;
286
+ /**
287
+ * Finalize range selection: ensure same-day times if needed and emit when selection is complete
288
+ */
289
+ private finalizeRangeSelection;
290
+ /**
291
+ * Extract date value from calendar element
292
+ */
293
+ private extractDateValue;
294
+ /**
295
+ * Extract range value from calendar element
296
+ */
297
+ private extractRangeValue;
298
+ /**
299
+ * Write external model value into the component
300
+ */
301
+ writeValue(obj: DatePickerValue): void;
302
+ /**
303
+ * Register form change callback
304
+ */
305
+ registerOnChange(fn: (value: DatePickerValue) => void): void;
306
+ /**
307
+ * Register form touched callback
308
+ */
309
+ registerOnTouched(fn: () => void): void;
310
+ /**
311
+ * Update disabled state from Angular forms
312
+ */
313
+ setDisabledState(isDisabled: boolean): void;
314
+ /** Icons for navigation buttons */
315
+ readonly iconChevronLeft = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z\"></path></svg>";
316
+ readonly iconChevronRight = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z\"></path></svg>";
317
+ readonly iconClock = "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\" style=\"stroke-width:var(--ng-icon__stroke-width, 1.5)\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z\"></path></svg>";
318
+ private clampTime;
319
+ onStartTimeChange(ev: Event): void;
320
+ onEndTimeChange(ev: Event): void;
321
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>;
322
+ static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "st-datepicker", ["stDatepicker"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "rangeValue": { "alias": "rangeValue"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "rangeCalendars": { "alias": "rangeCalendars"; "required": false; "isSignal": true; }; "showQuickActions": { "alias": "showQuickActions"; "required": false; "isSignal": true; }; "showTimePicker": { "alias": "showTimePicker"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "timeDisplayFormat": { "alias": "timeDisplayFormat"; "required": false; "isSignal": true; }; "languageMapping": { "alias": "languageMapping"; "required": false; "isSignal": true; }; "useLocaleDisplay": { "alias": "useLocaleDisplay"; "required": false; "isSignal": true; }; "dateStyle": { "alias": "dateStyle"; "required": false; "isSignal": true; }; "startTimeValue": { "alias": "startTimeValue"; "required": false; "isSignal": true; }; "endTimeValue": { "alias": "endTimeValue"; "required": false; "isSignal": true; }; "parentForm": { "alias": "parentForm"; "required": false; "isSignal": true; }; "formControlName": { "alias": "formControlName"; "required": false; "isSignal": true; }; }, { "dateUpdated": "dateUpdated"; "rangeUpdated": "rangeUpdated"; "valueChanged": "valueChanged"; "rangeValueChanged": "rangeValueChanged"; "startTimeChanged": "startTimeChanged"; "endTimeChanged": "endTimeChanged"; }, never, ["*"], true, never>;
323
+ }
@@ -0,0 +1,39 @@
1
+ import { DATE_STYLES, DATEPICKER_MODES, RANGE_CALENDARS, SUPPORTED_LOCALES, TIME_DISPLAY_FORMATS } from '../constants/date-picker.constants';
2
+ /** Union type of all supported locale strings for the datepicker. */
3
+ export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
4
+ /**
5
+ * Union type for datepicker component values
6
+ */
7
+ export type DatePickerValue = string | import('@sixbell-telco/sdk/utils/date').DateRange | null;
8
+ /** Derived union types from constants for the public API */
9
+ /** One of 'single' or 'range' */
10
+ export type DatepickerMode = (typeof DATEPICKER_MODES)[number];
11
+ /** Time display format for trigger text: '24h' | '12h' */
12
+ export type TimeDisplayFormat = (typeof TIME_DISPLAY_FORMATS)[number];
13
+ /** Intl.DateTimeFormat dateStyle value used when useLocaleDisplay=true */
14
+ export type DateStyle = (typeof DATE_STYLES)[number];
15
+ /** Number of calendars to display in range mode: 1 | 2 */
16
+ export type RangeCalendars = (typeof RANGE_CALENDARS)[number];
17
+ /** Time string with minutes precision (e.g. 09:30) */
18
+ /** Time with minutes precision (e.g. "09:30"). Always 2-digit HH and mm. */
19
+ export type TimeMinutesString = `${number}${number}:${number}${number}`;
20
+ /** Time string with seconds precision (e.g. 09:30:15) */
21
+ /** Time with seconds precision (e.g. "09:30:15"). Always 2-digit HH, mm, ss. */
22
+ export type TimeSecondsString = `${number}${number}:${number}${number}:${number}${number}`;
23
+ /** Time string accepted by the datepicker time inputs/outputs */
24
+ /**
25
+ * Canonical time string shape accepted by the datepicker time inputs/outputs.
26
+ * Values are either HH:mm or HH:mm:ss with leading zeros.
27
+ */
28
+ export type TimeString = TimeMinutesString | TimeSecondsString;
29
+ /** Time string or empty string to represent an unset time */
30
+ /**
31
+ * Official "unset time" representation used by the datepicker API.
32
+ * - Use '' (empty string) to indicate no time has been selected/set yet.
33
+ * - Use TimeString when a time is explicitly selected.
34
+ *
35
+ * Notes for consumers:
36
+ * - Bind startTimeValue/endTimeValue with '' to clear/reset the time input.
37
+ * - Listen to (startTimeChanged)/(endTimeChanged) which emit OptionalTimeString and handle '' as "no time".
38
+ */
39
+ export type OptionalTimeString = TimeString | '';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
- /// <amd-module name="@sixbell-telco/sdk/components/forms/datepicker" />
4
+ /// <amd-module name="@sixbell-telco/sdk/components/sonner" />
5
5
  export * from './public-api';
@@ -0,0 +1,2 @@
1
+ export * from './src/sonner.component';
2
+ export * from './toaster/src/toaster.component';
@@ -0,0 +1,39 @@
1
+ import { Type } from '@angular/core';
2
+ import { toast as ngxToast } from 'ngx-sonner';
3
+ /**
4
+ * @internal
5
+ * Generates base toast classes with style variants for semantic colors
6
+ */
7
+ export declare const toastVariants: (props?: ({
8
+ variant?: "default" | "success" | "error" | "warning" | "info" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ /** Possible toast style variants */
11
+ export type ToastVariantProps = 'default' | 'success' | 'error' | 'warning' | 'info' | null | undefined;
12
+ /**
13
+ * Toast function with semantic variants and Tailwind styling
14
+ * Proxies ngx-sonner toast functionality with SDK styling
15
+ */
16
+ declare function createToast(message: string, options?: Record<string, unknown>): string | number;
17
+ declare namespace createToast {
18
+ var success: (message: string, options?: Record<string, unknown>) => string | number;
19
+ var error: (message: string, options?: Record<string, unknown>) => string | number;
20
+ var warning: (message: string, options?: Record<string, unknown>) => string | number;
21
+ var info: (message: string, options?: Record<string, unknown>) => string | number;
22
+ var loading: (message: string, options?: Record<string, unknown>) => string | number;
23
+ var promise: (promise: Promise<unknown>, options: Record<string, unknown>) => string | number | undefined;
24
+ var custom: (component: Type<unknown>, options?: Record<string, unknown>) => string | number;
25
+ var dismiss: (id?: string | number) => string | number | undefined;
26
+ var dismissAll: () => string | number | undefined;
27
+ }
28
+ export declare const toast: typeof createToast & {
29
+ success: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
30
+ error: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
31
+ warning: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
32
+ info: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
33
+ loading: (message: string, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
34
+ promise: (promise: Promise<unknown>, options: Record<string, unknown>) => ReturnType<typeof ngxToast>;
35
+ custom: (component: Type<unknown>, options?: Record<string, unknown>) => ReturnType<typeof ngxToast>;
36
+ dismiss: (id?: string | number) => ReturnType<typeof ngxToast>;
37
+ dismissAll: () => ReturnType<typeof ngxToast>;
38
+ };
39
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sixbell-telco/sdk/components/sonner/toaster" />
5
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ export * from './src/toaster.component';