shirkasoft-ui-components 1.3.15 → 1.4.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 (90) hide show
  1. package/README.md +447 -71
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +163 -102
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/package.json +33 -3
  61. package/src/baseline.css +2472 -0
  62. package/src/theme.css +15 -543
  63. package/src/themes/ocean.css +56 -0
  64. package/src/themes/sunset.css +55 -0
  65. package/src/themes/violet.css +25 -0
  66. package/src/tokens.css +612 -0
  67. package/types/shirkasoft-ui-components-button.d.ts +1 -1
  68. package/types/shirkasoft-ui-components-config.d.ts +368 -0
  69. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
  70. package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
  71. package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
  72. package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
  73. package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
  74. package/types/shirkasoft-ui-components-knob.d.ts +28 -7
  75. package/types/shirkasoft-ui-components-modal.d.ts +11 -7
  76. package/types/shirkasoft-ui-components-notification.d.ts +2 -1
  77. package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
  78. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
  79. package/types/shirkasoft-ui-components-select.d.ts +24 -8
  80. package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
  81. package/types/shirkasoft-ui-components-table.d.ts +91 -80
  82. package/types/shirkasoft-ui-components-tag.d.ts +1 -1
  83. package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
  84. package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
  85. package/types/shirkasoft-ui-components-theme.d.ts +88 -0
  86. package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
  87. package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
  88. package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
  89. package/types/shirkasoft-ui-components-utils.d.ts +16 -6
  90. package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
@@ -0,0 +1,368 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Signal, Provider, EnvironmentProviders } from '@angular/core';
3
+ import { ShkThemeConfig } from 'shirkasoft-ui-components/theme';
4
+
5
+ /**
6
+ * Shirkasoft UI Components.
7
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
8
+ * Belongs to Shirkasoft.
9
+ */
10
+ /** Kind of value an option holds; drives validation and the editor a settings UI shows. */
11
+ type ShkOptionType = 'string' | 'number' | 'boolean' | 'select' | 'color';
12
+ /** One allowed value of a `select` option. */
13
+ interface ShkOptionChoice<T = unknown> {
14
+ value: T;
15
+ label: string;
16
+ }
17
+ /**
18
+ * Definition of a configurable option (an entry of the options registry).
19
+ *
20
+ * The library registers its own (`dates.*`, `numbers.*`, `theme.*`); apps add
21
+ * theirs with `withOptions([...])` or `ShkConfigService.register()`.
22
+ */
23
+ interface ShkOptionDef<T = unknown> {
24
+ /** Unique key, conventionally `module.name` (e.g. `dates.format`). */
25
+ key: string;
26
+ /** Group the option belongs to (e.g. `dates`); used to list options by module. */
27
+ module: string;
28
+ type: ShkOptionType;
29
+ /** Value used until the option is set (or after `reset`). */
30
+ default: T;
31
+ /** Human-readable name for a settings screen. */
32
+ label?: string;
33
+ /** Longer help text for a settings screen. */
34
+ description?: string;
35
+ /** Allowed values for `select` options. */
36
+ choices?: readonly ShkOptionChoice<T>[];
37
+ /**
38
+ * `select` options only: also accept values outside `choices` (the choices
39
+ * are then suggestions, e.g. any BCP 47 locale or ISO currency code).
40
+ */
41
+ allowCustom?: boolean;
42
+ /** Lower bound for `number` options. */
43
+ min?: number;
44
+ /** Upper bound for `number` options. */
45
+ max?: number;
46
+ /**
47
+ * Whether `withPersistence()` stores this option. Defaults to `true`.
48
+ * Options persisted elsewhere (e.g. the theme service) set it to `false`.
49
+ */
50
+ persist?: boolean;
51
+ }
52
+ /** An option as listed by `ShkConfigService.options()`: its definition plus its current value. */
53
+ interface ShkOptionEntry<T = unknown> extends ShkOptionDef<T> {
54
+ value: T;
55
+ /** True when the current value equals the default. */
56
+ isDefault: boolean;
57
+ }
58
+ /** How the date picker shows the selected date when the field is not being edited. */
59
+ type ShkDateDisplayStyle = 'long' | 'medium' | 'short' | 'format';
60
+ /** Values of the options the library registers, by key (gives typed `get`/`set`). */
61
+ interface ShkConfigValues {
62
+ /** BCP 47 locale for month/day names (e.g. `es`, `en-US`). */
63
+ 'dates.locale': string;
64
+ /**
65
+ * Date pattern (`dd/MM/yyyy`, `yyyy-MM-dd`, `d MMM yyyy`…). Empty = automatic:
66
+ * `MM/dd/yyyy` for English locales, `dd/MM/yyyy` otherwise.
67
+ */
68
+ 'dates.format': string;
69
+ 'dates.displayStyle': ShkDateDisplayStyle;
70
+ 'dates.hourFormat': '12' | '24';
71
+ /** First day of the week (0 = Sunday … 6 = Saturday); `null` = from the locale. */
72
+ 'dates.weekStart': number | null;
73
+ /** BCP 47 locale for number grouping/decimal separators. */
74
+ 'numbers.locale': string;
75
+ /** ISO 4217 currency code (e.g. `USD`, `EUR`, `CUP`). */
76
+ 'numbers.currency': string;
77
+ /** Symbol shown by money inputs. Empty = derived from the currency (`$`, `€`…). */
78
+ 'numbers.currencySymbol': string;
79
+ /** Decimal places for money amounts; `null` = the currency's own (2 for USD, 0 for JPY). */
80
+ 'numbers.decimals': number | null;
81
+ /** Active theme pack (built-in or registered with `withTheme({ themes })`). */
82
+ 'theme.name': string;
83
+ 'theme.scheme': 'light' | 'dark' | 'system';
84
+ /** Primary color override applied on top of the theme. Empty = the theme's own. */
85
+ 'theme.primary': string;
86
+ /** Neutral palette override (`slate`, `gray`, `zinc`, `neutral`, `stone`). Empty = the theme's own. */
87
+ 'theme.surface': string;
88
+ }
89
+ type ShkConfigKey = keyof ShkConfigValues;
90
+
91
+ /** What a `with*()` feature contributes to the registry. */
92
+ interface ShkConfigFeature {
93
+ /** Extra option definitions to register. */
94
+ options?: readonly ShkOptionDef[];
95
+ /** App-level defaults for registered options (what `reset` returns to). */
96
+ defaults?: Readonly<Record<string, unknown>>;
97
+ }
98
+ /** Features collected from `provideShk(...)`. */
99
+ declare const SHK_CONFIG_FEATURES: InjectionToken<readonly ShkConfigFeature[]>;
100
+ /** Storage settings enabled by `withPersistence()`. */
101
+ interface ShkConfigPersistence {
102
+ /** localStorage key. Defaults to `shk-config`. */
103
+ storageKey: string;
104
+ }
105
+ declare const SHK_CONFIG_PERSISTENCE: InjectionToken<ShkConfigPersistence>;
106
+ /**
107
+ * Value held outside the registry (e.g. by `ShkThemeService`). The registry
108
+ * reads and writes through it, so both stay in sync.
109
+ */
110
+ interface ShkOptionSource<T = unknown> {
111
+ value: Signal<T>;
112
+ set(value: T): void;
113
+ }
114
+ /**
115
+ * Registry of the library's configurable options ("nomenclador" de opciones).
116
+ *
117
+ * Every option has a key (`dates.format`), a module, a type and a default.
118
+ * Components read options as signals, so changing one at runtime updates every
119
+ * component that uses it. A settings screen can list them with `options()`.
120
+ *
121
+ * ```ts
122
+ * const config = inject(ShkConfigService);
123
+ * config.get('dates.format')(); // 'dd/MM/yyyy'
124
+ * config.set('numbers.currency', 'EUR'); // every price input/table updates
125
+ * config.options(); // definitions + current values
126
+ * ```
127
+ */
128
+ declare class ShkConfigService {
129
+ private readonly win;
130
+ private readonly persistence;
131
+ /** Registered definitions, by key. */
132
+ private readonly defs;
133
+ /** Values set explicitly (anything else falls back to the definition's default). */
134
+ private readonly values;
135
+ /** Options whose value lives elsewhere. */
136
+ private readonly sources;
137
+ /** Stored values whose option is not registered yet; applied on `register`. */
138
+ private pending;
139
+ /** Cached per-key signals returned by `get`. */
140
+ private readonly cache;
141
+ /** Every registered option with its current value, in registration order. */
142
+ readonly options: Signal<ShkOptionEntry[]>;
143
+ /** Module names in registration order (`dates`, `numbers`, `theme`, …). */
144
+ readonly modules: Signal<string[]>;
145
+ constructor();
146
+ /** Current value of an option as a signal. Throws for unknown keys. */
147
+ get<K extends ShkConfigKey>(key: K): Signal<ShkConfigValues[K]>;
148
+ get<T = unknown>(key: string): Signal<T>;
149
+ /** Whether an option is registered (e.g. `theme.*` only exists with `withTheme()`). */
150
+ has(key: string): boolean;
151
+ /** Current value of an option (non-reactive read). */
152
+ value<K extends ShkConfigKey>(key: K): ShkConfigValues[K];
153
+ value<T = unknown>(key: string): T;
154
+ /**
155
+ * Sets an option. The value is validated against the definition (type,
156
+ * choices, bounds); an invalid value throws and changes nothing.
157
+ */
158
+ set<K extends ShkConfigKey>(key: K, value: ShkConfigValues[K]): void;
159
+ set(key: string, value: unknown): void;
160
+ /** Restores one option (or all of them) to its default. */
161
+ reset(key?: string): void;
162
+ /**
163
+ * Adds option definitions (or replaces existing ones with the same key).
164
+ * Stored values for them are applied if they are still valid.
165
+ */
166
+ register(defs: readonly ShkOptionDef[]): void;
167
+ /**
168
+ * Binds an option to a value held elsewhere (used by `withTheme()` to share
169
+ * `theme.name`/`theme.scheme` with `ShkThemeService`).
170
+ */
171
+ bind<T>(key: string, source: ShkOptionSource<T>): void;
172
+ /** Changes the defaults of registered options (`reset` returns to these). */
173
+ private setDefaults;
174
+ private read;
175
+ private requireDef;
176
+ /** Returns the value coerced to the option's type, or throws if it is not acceptable. */
177
+ private validate;
178
+ private loadStored;
179
+ private save;
180
+ static ɵfac: i0.ɵɵFactoryDeclaration<ShkConfigService, never>;
181
+ static ɵprov: i0.ɵɵInjectableDeclaration<ShkConfigService>;
182
+ }
183
+
184
+ /**
185
+ * Shirkasoft UI Components.
186
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
187
+ * Belongs to Shirkasoft.
188
+ *
189
+ * Builds the `--shk-primary-*` scale from a single color with CSS `color-mix()`,
190
+ * so the browser derives every shade and no color math ships in JavaScript.
191
+ */
192
+ /** A theme registered with `withTheme({ themes })`. */
193
+ interface ShkCustomTheme {
194
+ /** Main brand color (hex). It becomes `--shk-primary-600`, the shade buttons use. */
195
+ primary: string;
196
+ /** Name shown in settings screens. Defaults to the theme key. */
197
+ label?: string;
198
+ /** Extra CSS custom properties for the theme, e.g. `{ '--shk-surface-50': '#f8fafc' }`. */
199
+ vars?: Readonly<Record<`--shk-${string}`, string>>;
200
+ }
201
+ /** `--shk-primary-50` … `--shk-primary-950` (and the accent vars) derived from one color. */
202
+ declare function primaryScale(color: string): Record<string, string>;
203
+ /** Neutral palettes for `theme.surface` (Tailwind scales, 50 … 900). */
204
+ declare const SURFACE_PALETTES: Readonly<Record<string, {
205
+ label: string;
206
+ scale: readonly string[];
207
+ }>>;
208
+ /** A selectable combination shown as a preset: a theme pack and its colors. */
209
+ interface ShkThemePreset {
210
+ /** Theme name (`theme.name`). */
211
+ name: string;
212
+ label: string;
213
+ /** Its primary color (`--shk-primary-600`). */
214
+ primary: string;
215
+ /** Its surface palette (a `SURFACE_PALETTES` key), or '' when it has its own. */
216
+ surface: string;
217
+ }
218
+ /** The built-in theme packs as presets. */
219
+ declare const BUILT_IN_PRESETS: readonly ShkThemePreset[];
220
+
221
+ /**
222
+ * Theme packs offered as presets (built-in + `withTheme({ themes })`), with the
223
+ * primary color and surface each one uses. Read by `shk-theme-picker`.
224
+ */
225
+ declare const SHK_THEME_PRESETS: InjectionToken<readonly ShkThemePreset[]>;
226
+ /** A configuration module passed to `provideShk()`. */
227
+ interface ShkFeature {
228
+ /** @internal */
229
+ readonly ɵproviders: (Provider | EnvironmentProviders)[];
230
+ }
231
+ /**
232
+ * Configures the library. Every module is optional; component inputs still
233
+ * override the configured values.
234
+ *
235
+ * ```ts
236
+ * bootstrapApplication(App, {
237
+ * providers: [
238
+ * provideShk(
239
+ * withDates({ locale: 'es', format: 'dd/MM/yyyy' }),
240
+ * withNumbers({ currency: 'EUR', locale: 'es-ES' }),
241
+ * withTheme({ defaultTheme: 'marca', themes: { marca: '#2563eb' } }),
242
+ * withPersistence(),
243
+ * ),
244
+ * ],
245
+ * });
246
+ * ```
247
+ */
248
+ declare function provideShk(...features: ShkFeature[]): EnvironmentProviders;
249
+ /** App defaults for the date options (`dates.*`). */
250
+ interface ShkDatesConfig {
251
+ locale?: ShkConfigValues['dates.locale'];
252
+ format?: ShkConfigValues['dates.format'];
253
+ displayStyle?: ShkConfigValues['dates.displayStyle'];
254
+ hourFormat?: ShkConfigValues['dates.hourFormat'];
255
+ weekStart?: ShkConfigValues['dates.weekStart'];
256
+ }
257
+ /** Date module: locale, pattern, display style, 12/24 h and first day of the week. */
258
+ declare function withDates(config: ShkDatesConfig): ShkFeature;
259
+ /** App defaults for the number and currency options (`numbers.*`). */
260
+ interface ShkNumbersConfig {
261
+ locale?: ShkConfigValues['numbers.locale'];
262
+ currency?: ShkConfigValues['numbers.currency'];
263
+ currencySymbol?: ShkConfigValues['numbers.currencySymbol'];
264
+ decimals?: ShkConfigValues['numbers.decimals'];
265
+ }
266
+ /** Number module: separators locale, currency, currency symbol and decimals. */
267
+ declare function withNumbers(config: ShkNumbersConfig): ShkFeature;
268
+ /** Theme module settings. */
269
+ interface ShkThemeModuleConfig extends ShkThemeConfig {
270
+ /**
271
+ * Extra themes generated from one color: `{ marca: '#2563eb' }` or
272
+ * `{ marca: { primary: '#2563eb', label: 'Marca', vars: { … } } }`.
273
+ */
274
+ themes?: Readonly<Record<string, string | ShkCustomTheme>>;
275
+ /** Primary color applied on top of any theme (`theme.primary`). Empty = none. */
276
+ primary?: string;
277
+ /** Neutral palette applied on top of any theme (`theme.surface`). Empty = none. */
278
+ surface?: string;
279
+ }
280
+ /**
281
+ * Theme module: built-in and custom themes, light/dark/system scheme and a
282
+ * runtime primary color. Replaces `provideShkTheme()` (do not use both).
283
+ *
284
+ * `theme.name` and `theme.scheme` are shared with `ShkThemeService` (which
285
+ * persists them); `theme.primary` is stored by `withPersistence()`.
286
+ */
287
+ declare function withTheme(config?: ShkThemeModuleConfig): ShkFeature;
288
+ /** Registers app-defined options in the same registry (`app.pageSize`, …). */
289
+ declare function withOptions(options: readonly ShkOptionDef[]): ShkFeature;
290
+ /**
291
+ * Persists changed options in localStorage so they survive reloads.
292
+ * Options with `persist: false` are skipped (the theme service stores its own).
293
+ */
294
+ declare function withPersistence(config?: {
295
+ storageKey?: string;
296
+ }): ShkFeature;
297
+
298
+ /**
299
+ * Shirkasoft UI Components.
300
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
301
+ * Belongs to Shirkasoft.
302
+ */
303
+
304
+ /** Date options (`dates.*`), always registered. */
305
+ declare const DATE_OPTIONS: readonly ShkOptionDef[];
306
+ /** Number and currency options (`numbers.*`), always registered. */
307
+ declare const NUMBER_OPTIONS: readonly ShkOptionDef[];
308
+
309
+ /**
310
+ * Shirkasoft UI Components.
311
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
312
+ * Belongs to Shirkasoft.
313
+ *
314
+ * Locale-aware formatting helpers used by the components and available to apps.
315
+ * Pure functions on top of `Intl`: no Angular locale data needs registering.
316
+ */
317
+ /** Default numeric pattern for a locale: `MM/dd/yyyy` for English, `dd/MM/yyyy` otherwise. */
318
+ declare function resolveDateFormat(format: string | null | undefined, locale: string): string;
319
+ /** Converts a value to a `Date`. ISO date-only strings (`2026-12-31`) are read as local dates. */
320
+ declare function toDate(value: Date | string | number | null | undefined): Date | null;
321
+ /**
322
+ * Formats a date with a pattern (`dd/MM/yyyy`, `d MMM yyyy`, `yyyy-MM-dd HH:mm`…).
323
+ *
324
+ * Tokens: `yyyy y yy` year · `MMMM MMM MM M` month · `dd d` day · `EEEE EEE` weekday ·
325
+ * `HH H` 0-23 · `hh h` 1-12 · `mm` minutes · `ss` seconds · `a` AM/PM ·
326
+ * `'text'` literal. Month and weekday names follow `locale`, with its own casing
327
+ * ("31 dic 2026" in Spanish, "Dec 31, 2026" in English).
328
+ * Returns an empty string for empty or invalid values.
329
+ */
330
+ declare function formatDate(value: Date | string | number | null | undefined, pattern: string, locale: string): string;
331
+ /** An `Intl` date (and optional time) style. */
332
+ type ShkIntlStyle = 'full' | 'long' | 'medium' | 'short';
333
+ /**
334
+ * Date formatted with an `Intl` style (`long`: "31 de diciembre de 2026"),
335
+ * optionally followed by the time in `timeStyle`.
336
+ */
337
+ declare function formatDateStyle(value: Date | string | number | null | undefined, style: ShkIntlStyle, locale: string, timeStyle?: ShkIntlStyle): string;
338
+ /** A pattern reduced to the parts a user types: field order and separator. */
339
+ interface TypedDateLayout {
340
+ /** Order of day/month/year in the pattern. */
341
+ order: readonly ('d' | 'm' | 'y')[];
342
+ /** Separator between the parts (`/`, `-` or `.`). */
343
+ separator: string;
344
+ }
345
+ /**
346
+ * Field order and separator of a pattern, for typing dates in an input.
347
+ * Named months and weekdays are typed as numbers (`d MMM yyyy` → `dd/MM/yyyy`).
348
+ */
349
+ declare function typedDateLayout(pattern: string): TypedDateLayout;
350
+ /** Narrow currency symbol (`USD` → `$`, `EUR` → `€`). Unknown codes are returned as-is. */
351
+ declare function currencySymbol(currency: string, locale: string): string;
352
+ /**
353
+ * Formats an amount as money (`$1,234.50`, `1.234,50 €`, `¥1,000`).
354
+ * `decimals` `null`/omitted = the currency's own digits (2 for USD, 0 for JPY).
355
+ */
356
+ declare function formatCurrency(value: number | string | null | undefined, currency: string, locale: string, decimals?: number | null): string;
357
+ /** Decimal digits a currency uses by default (USD → 2, JPY → 0, BHD → 3). Unknown codes → 2. */
358
+ declare function currencyDecimals(currency: string): number;
359
+ /** Formats a number with the locale's grouping and decimal separators. */
360
+ declare function formatNumber(value: number, locale: string, maxDecimals?: number, minDecimals?: number): string;
361
+ /** Decimal and grouping separators of a locale (`es-ES` → `,` and `.`). */
362
+ declare function numberSeparators(locale: string): {
363
+ decimal: string;
364
+ group: string;
365
+ };
366
+
367
+ export { BUILT_IN_PRESETS, DATE_OPTIONS, NUMBER_OPTIONS, SHK_CONFIG_FEATURES, SHK_CONFIG_PERSISTENCE, SHK_THEME_PRESETS, SURFACE_PALETTES, ShkConfigService, currencyDecimals, currencySymbol, formatCurrency, formatDate, formatDateStyle, formatNumber, numberSeparators, primaryScale, provideShk, resolveDateFormat, toDate, typedDateLayout, withDates, withNumbers, withOptions, withPersistence, withTheme };
368
+ export type { ShkConfigFeature, ShkConfigKey, ShkConfigPersistence, ShkConfigValues, ShkCustomTheme, ShkDateDisplayStyle, ShkDatesConfig, ShkFeature, ShkIntlStyle, ShkNumbersConfig, ShkOptionChoice, ShkOptionDef, ShkOptionEntry, ShkOptionSource, ShkOptionType, ShkThemeModuleConfig, ShkThemePreset, TypedDateLayout };
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy } from '@angular/core';
3
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
3
4
 
4
5
  /**
5
6
  * Shirkasoft UI Components.
@@ -11,7 +12,7 @@ import { OnDestroy } from '@angular/core';
11
12
  * with the user's choice.
12
13
  */
13
14
  declare class ConfirmDialogComponent implements OnDestroy {
14
- protected getIcon: (name: any) => any;
15
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
15
16
  /** Title shown in the dialog header. */
16
17
  title: _angular_core.InputSignal<string>;
17
18
  /** Message body of the dialog. */