@makolabs/ripple 1.7.11 → 1.8.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/dist/adapters/ai/OpenAIAdapter.d.ts +8 -1
  2. package/dist/adapters/ai/OpenAIAdapter.js +2 -2
  3. package/dist/adapters/storage/BaseAdapter.js +2 -2
  4. package/dist/adapters/storage/S3Adapter.js +1 -6
  5. package/dist/adapters/storage/types.d.ts +3 -3
  6. package/dist/ai/AIChatInterface.svelte +0 -1
  7. package/dist/ai/ai-chat-interface.d.ts +21 -22
  8. package/dist/ai/content-detector.js +0 -1
  9. package/dist/button/Button.svelte +9 -2
  10. package/dist/button/button.d.ts +39 -40
  11. package/dist/charts/Chart.svelte +4 -1
  12. package/dist/drawer/Drawer.svelte +57 -23
  13. package/dist/drawer/drawer.d.ts +18 -19
  14. package/dist/elements/accordion/Accordion.svelte +39 -18
  15. package/dist/elements/accordion/accordion.d.ts +21 -22
  16. package/dist/elements/alert/Alert.svelte +20 -8
  17. package/dist/elements/badge/Badge.svelte +5 -2
  18. package/dist/elements/badge/badge.d.ts +39 -40
  19. package/dist/elements/dropdown/Dropdown.svelte +18 -2
  20. package/dist/elements/dropdown/Select.svelte +17 -5
  21. package/dist/elements/dropdown/dropdown.d.ts +18 -19
  22. package/dist/elements/dropdown/select.d.ts +18 -19
  23. package/dist/elements/pagination/Pagination.svelte +15 -2
  24. package/dist/elements/pagination/Pagination.svelte.d.ts +1 -0
  25. package/dist/forms/Checkbox.svelte +16 -4
  26. package/dist/forms/Form.svelte +0 -2
  27. package/dist/forms/Input.svelte +16 -4
  28. package/dist/forms/NumberInput.svelte +8 -1
  29. package/dist/forms/RadioInputs.svelte +14 -5
  30. package/dist/forms/Slider.svelte +6 -4
  31. package/dist/forms/Toggle.svelte +67 -29
  32. package/dist/forms/slider.d.ts +72 -10
  33. package/dist/forms/slider.js +21 -0
  34. package/dist/header/Breadcrumbs.svelte +47 -24
  35. package/dist/header/PageHeader.svelte +12 -2
  36. package/dist/header/breadcrumbs.d.ts +47 -39
  37. package/dist/helper/deprecation.d.ts +14 -0
  38. package/dist/helper/deprecation.js +24 -0
  39. package/dist/helper/testid.d.ts +10 -0
  40. package/dist/helper/testid.js +17 -0
  41. package/dist/index.d.ts +147 -47
  42. package/dist/index.js +1 -0
  43. package/dist/layout/activity-list/activity-list.d.ts +21 -22
  44. package/dist/layout/card/Card.svelte +19 -5
  45. package/dist/layout/card/card.d.ts +21 -22
  46. package/dist/layout/card/ranked-card.d.ts +2 -1
  47. package/dist/layout/navbar/Navbar.svelte +14 -16
  48. package/dist/layout/navbar/navbar.d.ts +19 -19
  49. package/dist/layout/sidebar/Sidebar.svelte +6 -3
  50. package/dist/layout/table/Table.svelte +237 -303
  51. package/dist/layout/table/table.d.ts +24 -25
  52. package/dist/layout/tabs/Tab.svelte +3 -1
  53. package/dist/layout/tabs/TabGroup.svelte +7 -4
  54. package/dist/layout/tabs/tabs.d.ts +39 -40
  55. package/dist/modal/Modal.svelte +124 -21
  56. package/dist/modal/modal.d.ts +18 -19
  57. package/dist/modal/modal.js +2 -2
  58. package/dist/user-management/UserModal.svelte +1 -1
  59. package/dist/user-management/UserTable.svelte +3 -3
  60. package/dist/user-management/UserViewModal.svelte +2 -2
  61. package/dist/variants.d.ts +13 -13
  62. package/package.json +9 -6
  63. package/dist/ai/AIChatInterfaceTestWrapper.svelte +0 -26
  64. package/dist/ai/AIChatInterfaceTestWrapper.svelte.d.ts +0 -17
  65. package/dist/button/ButtonTestWrapper.svelte +0 -10
  66. package/dist/button/ButtonTestWrapper.svelte.d.ts +0 -7
  67. package/dist/drawer/DrawerTestWrapper.svelte +0 -19
  68. package/dist/drawer/DrawerTestWrapper.svelte.d.ts +0 -9
  69. package/dist/elements/accordion/AccordionTestWrapper.svelte +0 -21
  70. package/dist/elements/accordion/AccordionTestWrapper.svelte.d.ts +0 -10
  71. package/dist/elements/badge/BadgeTestWrapper.svelte +0 -14
  72. package/dist/elements/badge/BadgeTestWrapper.svelte.d.ts +0 -9
  73. package/dist/forms/CheckboxTestWrapper.svelte +0 -8
  74. package/dist/forms/CheckboxTestWrapper.svelte.d.ts +0 -4
  75. package/dist/forms/InputTestWrapper.svelte +0 -8
  76. package/dist/forms/InputTestWrapper.svelte.d.ts +0 -4
  77. package/dist/forms/ToggleTestWrapper.svelte +0 -8
  78. package/dist/forms/ToggleTestWrapper.svelte.d.ts +0 -7
  79. package/dist/layout/card/CardTestWrapper.svelte +0 -15
  80. package/dist/layout/card/CardTestWrapper.svelte.d.ts +0 -7
  81. package/dist/modal/ModalTestWrapper.svelte +0 -20
  82. package/dist/modal/ModalTestWrapper.svelte.d.ts +0 -8
  83. package/dist/user-management/UserManagementTestWrapper.svelte +0 -32
  84. package/dist/user-management/UserManagementTestWrapper.svelte.d.ts +0 -12
  85. package/dist/user-management/UserModalTestWrapper.svelte +0 -22
  86. package/dist/user-management/UserModalTestWrapper.svelte.d.ts +0 -7
  87. package/dist/user-management/UserTableTestWrapper.svelte +0 -41
  88. package/dist/user-management/UserTableTestWrapper.svelte.d.ts +0 -7
  89. package/dist/user-management/UserViewModalTestWrapper.svelte +0 -22
  90. package/dist/user-management/UserViewModalTestWrapper.svelte.d.ts +0 -7
@@ -0,0 +1,24 @@
1
+ const warned = new Set();
2
+ /**
3
+ * Logs a console.warn once per component+prop combination when a deprecated prop is used.
4
+ * @param component - Component name (e.g. 'Modal', 'Card')
5
+ * @param props - The raw props object from $props()
6
+ * @param map - Map of deprecated prop names to their replacements (e.g. { titleclass: 'titleClass' })
7
+ */
8
+ export function warnDeprecatedProps(component, props, map) {
9
+ for (const [oldName, newName] of Object.entries(map)) {
10
+ if (props[oldName] !== undefined && !warned.has(`${component}.${oldName}`)) {
11
+ warned.add(`${component}.${oldName}`);
12
+ console.warn(`[ripple-ui] ${component}: "${oldName}" is deprecated, use "${newName}" instead.`);
13
+ }
14
+ }
15
+ }
16
+ /**
17
+ * Reset warnings — only for testing.
18
+ * Note: In SSR, the warned Set persists across requests within the same process,
19
+ * so warnings will only fire once per server lifetime. This is acceptable for
20
+ * development-time deprecation notices.
21
+ */
22
+ export function resetDeprecationWarnings() {
23
+ warned.clear();
24
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Builds a data-testid value.
3
+ * Pattern: [prefix-]component[-element][-index]
4
+ *
5
+ * @param component - Component name (e.g., 'button', 'input', 'modal')
6
+ * @param element - Optional sub-element suffix (e.g., 'label', 'close', 'trigger')
7
+ * @param prefix - Optional consumer-provided prefix for multi-instance disambiguation
8
+ * @param index - Optional index for dynamic lists (e.g., table rows, select options). Can be a compound string like "0-1" for nested lists.
9
+ */
10
+ export declare function buildTestId(component: string, element?: string, prefix?: string, index?: number | string): string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Builds a data-testid value.
3
+ * Pattern: [prefix-]component[-element][-index]
4
+ *
5
+ * @param component - Component name (e.g., 'button', 'input', 'modal')
6
+ * @param element - Optional sub-element suffix (e.g., 'label', 'close', 'trigger')
7
+ * @param prefix - Optional consumer-provided prefix for multi-instance disambiguation
8
+ * @param index - Optional index for dynamic lists (e.g., table rows, select options). Can be a compound string like "0-1" for nested lists.
9
+ */
10
+ export function buildTestId(component, element, prefix, index) {
11
+ let id = prefix ? `${prefix}-${component}` : component;
12
+ if (element)
13
+ id += `-${element}`;
14
+ if (index !== undefined)
15
+ id += `-${index}`;
16
+ return id;
17
+ }
package/dist/index.d.ts CHANGED
@@ -14,7 +14,9 @@ export type VariantColors = (typeof Color)[keyof typeof Color];
14
14
  * - ChartColors: Record type mapping ChartColor enum to string values
15
15
  */
16
16
  export { Color, Size, ChartColor };
17
+ export { buildTestId } from './helper/testid.js';
17
18
  import type { ClassValue } from 'tailwind-variants';
19
+ export type { ClassValue } from 'tailwind-variants';
18
20
  import type { Snippet } from 'svelte';
19
21
  import type { Component } from 'svelte';
20
22
  import type { HTMLButtonAttributes, HTMLAttributeAnchorTarget, DOMAttributes } from 'svelte/elements';
@@ -27,6 +29,7 @@ export type BadgeProps = {
27
29
  class?: ClassValue;
28
30
  children: Snippet;
29
31
  onclose?: (event: MouseEvent) => void;
32
+ testId?: string;
30
33
  };
31
34
  export type BaseButtonProps = {
32
35
  class?: ClassValue;
@@ -37,6 +40,7 @@ export type BaseButtonProps = {
37
40
  disabled?: boolean | undefined | null;
38
41
  isLoading?: boolean;
39
42
  children?: Snippet;
43
+ testId?: string;
40
44
  };
41
45
  export type ButtonHTMLProps = {
42
46
  href?: never;
@@ -55,16 +59,29 @@ export type ModalProps = {
55
59
  description?: string;
56
60
  size?: VariantSizes;
57
61
  hideCloseButton?: boolean;
58
- class?: string;
59
- contentclass?: string;
60
- bodyclass?: string;
61
- titleclass?: string;
62
- headerclass?: string;
63
- backdropclass?: string;
64
- footerclass?: string;
62
+ class?: ClassValue;
63
+ /** @deprecated Use contentClass instead */
64
+ contentclass?: ClassValue;
65
+ contentClass?: ClassValue;
66
+ /** @deprecated Use bodyClass instead */
67
+ bodyclass?: ClassValue;
68
+ bodyClass?: ClassValue;
69
+ /** @deprecated Use titleClass instead */
70
+ titleclass?: ClassValue;
71
+ titleClass?: ClassValue;
72
+ /** @deprecated Use headerClass instead */
73
+ headerclass?: ClassValue;
74
+ headerClass?: ClassValue;
75
+ /** @deprecated Use backdropClass instead */
76
+ backdropclass?: ClassValue;
77
+ backdropClass?: ClassValue;
78
+ /** @deprecated Use footerClass instead */
79
+ footerclass?: ClassValue;
80
+ footerClass?: ClassValue;
65
81
  children?: Snippet;
66
82
  footer?: Snippet;
67
83
  header?: Snippet;
84
+ testId?: string;
68
85
  };
69
86
  export type DrawerProps = {
70
87
  open?: boolean;
@@ -72,16 +89,29 @@ export type DrawerProps = {
72
89
  title?: string;
73
90
  position?: 'left' | 'right';
74
91
  size?: VariantSizes;
75
- class?: string;
76
- backdropclass?: string;
77
- contentclass?: string;
78
- headerclass?: string;
79
- bodyclass?: string;
80
- titleclass?: string;
81
- footerclass?: string;
92
+ class?: ClassValue;
93
+ /** @deprecated Use backdropClass instead */
94
+ backdropclass?: ClassValue;
95
+ backdropClass?: ClassValue;
96
+ /** @deprecated Use contentClass instead */
97
+ contentclass?: ClassValue;
98
+ contentClass?: ClassValue;
99
+ /** @deprecated Use headerClass instead */
100
+ headerclass?: ClassValue;
101
+ headerClass?: ClassValue;
102
+ /** @deprecated Use bodyClass instead */
103
+ bodyclass?: ClassValue;
104
+ bodyClass?: ClassValue;
105
+ /** @deprecated Use titleClass instead */
106
+ titleclass?: ClassValue;
107
+ titleClass?: ClassValue;
108
+ /** @deprecated Use footerClass instead */
109
+ footerclass?: ClassValue;
110
+ footerClass?: ClassValue;
82
111
  children?: Snippet;
83
112
  header?: Snippet;
84
113
  footer?: Snippet;
114
+ testId?: string;
85
115
  };
86
116
  export type DropdownItem = {
87
117
  label: string;
@@ -115,6 +145,7 @@ export type DropdownMenuProps = {
115
145
  position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
116
146
  width?: string;
117
147
  header?: DropHeaderConfig;
148
+ testId?: string;
118
149
  };
119
150
  export type SelectItem = {
120
151
  label: string;
@@ -144,24 +175,31 @@ export type SelectProps = {
144
175
  }) => void;
145
176
  onopen?: () => void;
146
177
  onclose?: () => void;
178
+ testId?: string;
147
179
  };
148
180
  export type CardProps = {
149
181
  color?: VariantColors;
150
182
  title?: string;
151
183
  class?: ClassValue;
184
+ /** @deprecated Use titleClass instead */
152
185
  titleclass?: ClassValue;
186
+ titleClass?: ClassValue;
187
+ /** @deprecated Use bodyClass instead */
153
188
  bodyclass?: ClassValue;
189
+ bodyClass?: ClassValue;
154
190
  children?: Snippet;
155
191
  custom?: Snippet;
192
+ testId?: string;
156
193
  };
157
194
  export type AlertProps = {
158
195
  title?: string;
159
196
  message: string;
160
197
  color?: VariantColors;
161
- class?: string;
198
+ class?: ClassValue;
162
199
  onclose?: () => void;
163
200
  footer?: Snippet;
164
201
  icon?: Component;
202
+ testId?: string;
165
203
  };
166
204
  export type MetricDetail = {
167
205
  label: string;
@@ -175,6 +213,7 @@ export type MetricCardProps = {
175
213
  percent?: number;
176
214
  segments?: ProgressSegment[];
177
215
  class?: ClassValue;
216
+ testId?: string;
178
217
  };
179
218
  export type { RankedCardProps, RankedCardItem, RankedCardMetric } from './layout/card/ranked-card.js';
180
219
  export type DataRow = Record<string, any>;
@@ -206,20 +245,40 @@ export type TableProps<T extends DataRow = any> = {
206
245
  selectable?: boolean;
207
246
  selected?: T[];
208
247
  class?: ClassValue;
248
+ /** @deprecated Use wrapperClass instead */
209
249
  wrapperclass?: ClassValue;
250
+ wrapperClass?: ClassValue;
251
+ /** @deprecated Use tableClass instead */
210
252
  tableclass?: ClassValue;
253
+ tableClass?: ClassValue;
254
+ /** @deprecated Use theadClass instead */
211
255
  theadclass?: ClassValue;
256
+ theadClass?: ClassValue;
257
+ /** @deprecated Use tbodyClass instead */
212
258
  tbodyclass?: ClassValue;
259
+ tbodyClass?: ClassValue;
260
+ /** @deprecated Use trClass instead */
213
261
  trclass?: ClassValue;
262
+ trClass?: ClassValue;
263
+ /** @deprecated Use thClass instead */
214
264
  thclass?: ClassValue;
265
+ thClass?: ClassValue;
266
+ /** @deprecated Use tdClass instead */
215
267
  tdclass?: ClassValue;
268
+ tdClass?: ClassValue;
269
+ /** @deprecated Use footerClass instead */
216
270
  footerclass?: ClassValue;
271
+ footerClass?: ClassValue;
272
+ /** @deprecated Use paginationClass instead */
217
273
  paginationclass?: ClassValue;
274
+ paginationClass?: ClassValue;
218
275
  onrowclick?: (row: T, index: number) => void;
219
276
  onsort?: (sortState: SortState) => void;
220
277
  onselect?: (selected: T[]) => void;
221
278
  onpagechange?: (page: number) => void;
279
+ /** @deprecated Use rowClass instead */
222
280
  rowclass?: (row: T, index: number) => ClassValue;
281
+ rowClass?: (row: T, index: number) => ClassValue;
223
282
  loading?: boolean;
224
283
  expandedContent?: Snippet<[T]>;
225
284
  pagination?: boolean;
@@ -232,11 +291,16 @@ export type TableProps<T extends DataRow = any> = {
232
291
  title?: string;
233
292
  subtitle?: string;
234
293
  headerActions?: Snippet;
294
+ selectAllScope?: 'page' | 'all';
295
+ rowKey?: string;
296
+ expandable?: boolean;
297
+ testId?: string;
235
298
  };
236
299
  export type BreadcrumbItem = {
237
300
  label: string;
238
301
  href: string;
239
302
  current?: boolean;
303
+ icon?: Component;
240
304
  };
241
305
  export type BreadcrumbsProps = {
242
306
  items: BreadcrumbItem[];
@@ -244,11 +308,20 @@ export type BreadcrumbsProps = {
244
308
  weight?: 'normal' | 'medium' | 'semibold' | 'bold';
245
309
  color?: VariantColors;
246
310
  icon?: Component;
247
- class?: string;
248
- listclass?: string;
249
- itemclass?: string;
250
- separatorclass?: string;
251
- wrapperclass?: string;
311
+ class?: ClassValue;
312
+ /** @deprecated Use listClass instead */
313
+ listclass?: ClassValue;
314
+ listClass?: ClassValue;
315
+ /** @deprecated Use itemClass instead */
316
+ itemclass?: ClassValue;
317
+ itemClass?: ClassValue;
318
+ /** @deprecated Use separatorClass instead */
319
+ separatorclass?: ClassValue;
320
+ separatorClass?: ClassValue;
321
+ /** @deprecated Use wrapperClass instead */
322
+ wrapperclass?: ClassValue;
323
+ wrapperClass?: ClassValue;
324
+ testId?: string;
252
325
  };
253
326
  export type PageHeaderProps = {
254
327
  title: string;
@@ -256,8 +329,11 @@ export type PageHeaderProps = {
256
329
  breadcrumbs?: BreadcrumbItem[];
257
330
  children?: Snippet;
258
331
  class?: ClassValue;
332
+ /** @deprecated Use titleClass instead */
259
333
  titleclass?: ClassValue;
334
+ titleClass?: ClassValue;
260
335
  layout?: 'vertical' | 'horizontal';
336
+ testId?: string;
261
337
  };
262
338
  export type TabItem = {
263
339
  value: string;
@@ -265,17 +341,6 @@ export type TabItem = {
265
341
  icon?: Component;
266
342
  disabled?: boolean;
267
343
  };
268
- export type TabsProps = {
269
- tabs: TabItem[];
270
- selected?: string;
271
- color?: VariantColors;
272
- size?: VariantSizes;
273
- class?: ClassValue;
274
- listClass?: ClassValue;
275
- panelClass?: ClassValue;
276
- onchange?: (value: string) => void;
277
- children?: Snippet<[string]>;
278
- };
279
344
  export type NavbarLinkItem = {
280
345
  label: string;
281
346
  href: string;
@@ -290,6 +355,7 @@ export type NavbarProps = {
290
355
  brand?: Snippet;
291
356
  children?: Snippet;
292
357
  actions?: Snippet;
358
+ testId?: string;
293
359
  };
294
360
  export type MenuBar = {
295
361
  collapsed: boolean;
@@ -329,12 +395,14 @@ export interface NavGroupProps {
329
395
  active?: boolean;
330
396
  children?: Snippet;
331
397
  class?: ClassValue;
398
+ testId?: string;
332
399
  }
333
400
  export interface NavItemProps {
334
401
  href: string;
335
402
  active?: boolean;
336
403
  children: Snippet<[ClassValue]>;
337
404
  class?: ClassValue;
405
+ testId?: string;
338
406
  }
339
407
  export interface SidebarProps {
340
408
  items?: NavigationItem[];
@@ -343,6 +411,7 @@ export interface SidebarProps {
343
411
  footer?: Snippet<[{
344
412
  collapsed: boolean;
345
413
  }]>;
414
+ testId?: string;
346
415
  }
347
416
  export { tv, cn } from './helper/cls.js';
348
417
  export { isRouteActive } from './helper/nav.svelte.js';
@@ -372,6 +441,7 @@ export type TabProps = {
372
441
  size?: VariantSizes;
373
442
  variant?: 'line' | 'pill';
374
443
  onclick?: (event: Event) => void;
444
+ testId?: string;
375
445
  };
376
446
  export type TabsGroupProps = {
377
447
  tabs: TabItem[];
@@ -385,12 +455,14 @@ export type TabsGroupProps = {
385
455
  panelClass?: ClassValue;
386
456
  children?: Snippet<[active: string]>;
387
457
  onchange?: (value: string) => void;
458
+ testId?: string;
388
459
  };
389
460
  export type TabContentProps = {
390
461
  value: string;
391
462
  persisted?: boolean;
392
463
  panelClass?: ClassValue;
393
464
  children?: Snippet<[value: string]>;
465
+ testId?: string;
394
466
  };
395
467
  export { default as Tab } from './layout/tabs/Tab.svelte';
396
468
  export { default as TabContent } from './layout/tabs/TabContent.svelte';
@@ -541,9 +613,10 @@ export interface ChartProps<T> {
541
613
  colors?: Partial<ChartColors>;
542
614
  height?: string;
543
615
  width?: string;
544
- class?: string;
616
+ class?: ClassValue;
545
617
  onpointclick?: (event: PointClickType<T>) => void;
546
618
  onchartrender?: (event: ChartRenderType<T>) => void;
619
+ testId?: string;
547
620
  }
548
621
  export { default as Chart } from './charts/Chart.svelte';
549
622
  export interface FileUploadProps {
@@ -564,11 +637,11 @@ export interface FileUploadProps {
564
637
  /**
565
638
  * CSS class for the component container
566
639
  */
567
- class?: string;
640
+ class?: ClassValue;
568
641
  /**
569
642
  * CSS class for the dropzone
570
643
  */
571
- dropzoneClass?: string;
644
+ dropzoneClass?: ClassValue;
572
645
  /**
573
646
  * ID for the file input element
574
647
  * @default 'file-upload'
@@ -582,11 +655,13 @@ export interface FileUploadProps {
582
655
  * Content to display when no files are uploaded
583
656
  */
584
657
  uploadContent?: Snippet;
658
+ testId?: string;
585
659
  }
586
660
  export interface FilePreviewProps {
587
661
  files: UploadedFile[];
588
662
  ondelete?: (fileId: string, index: number) => void;
589
- class?: string;
663
+ class?: ClassValue;
664
+ testId?: string;
590
665
  }
591
666
  export interface UploadedFile {
592
667
  FileID: string;
@@ -619,13 +694,14 @@ export { default as CodeRenderer } from './ai/CodeRenderer.svelte';
619
694
  export * from './ai/content-detector.js';
620
695
  export interface FormProps<T extends Record<string, unknown>> {
621
696
  form: SuperForm<any>;
622
- class?: string;
697
+ class?: ClassValue;
623
698
  method?: 'GET' | 'POST' | 'dialog' | 'get' | 'post' | 'DIALOG' | null | undefined;
624
699
  action?: string;
625
700
  enctype?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain' | null | undefined;
626
701
  autocomplete?: 'on' | 'off';
627
702
  novalidate?: boolean;
628
703
  children?: Snippet;
704
+ testId?: string;
629
705
  }
630
706
  export type InputProps = {
631
707
  type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'textarea';
@@ -635,10 +711,11 @@ export type InputProps = {
635
711
  placeholder?: string;
636
712
  required?: boolean;
637
713
  disabled?: boolean;
638
- class?: string;
714
+ class?: ClassValue;
639
715
  size?: VariantSizes;
640
716
  id?: string;
641
717
  errors?: string[];
718
+ testId?: string;
642
719
  } & DOMAttributes<HTMLInputElement>;
643
720
  export type RadioOption = {
644
721
  value: string;
@@ -650,28 +727,30 @@ export type RadioInputsProps = {
650
727
  options: RadioOption[];
651
728
  value?: string;
652
729
  disabled?: boolean;
653
- class?: string;
730
+ class?: ClassValue;
654
731
  size?: VariantSizes;
655
732
  color?: VariantColors;
656
733
  errors?: string[];
657
734
  required?: boolean;
735
+ testId?: string;
658
736
  };
659
737
  export type CheckboxProps = {
660
738
  name: string;
661
739
  label?: string;
662
740
  value?: boolean;
663
741
  disabled?: boolean;
664
- class?: string;
742
+ class?: ClassValue;
665
743
  size?: VariantSizes;
666
744
  color?: VariantColors;
667
745
  errors?: string[];
668
746
  required?: boolean;
747
+ testId?: string;
669
748
  };
670
749
  export interface ToggleProps {
671
750
  name: string;
672
751
  label?: string;
673
752
  disabled?: boolean;
674
- class?: string;
753
+ class?: ClassValue;
675
754
  value?: boolean;
676
755
  size?: VariantSizes;
677
756
  color?: VariantColors;
@@ -679,6 +758,7 @@ export interface ToggleProps {
679
758
  errors?: string[];
680
759
  offColor?: string;
681
760
  onColor?: string;
761
+ testId?: string;
682
762
  }
683
763
  export type CurrencyOption = {
684
764
  value: string;
@@ -690,13 +770,14 @@ export type NumberInputProps = {
690
770
  label?: string;
691
771
  placeholder?: string;
692
772
  size?: VariantSizes;
693
- class?: string;
773
+ class?: ClassValue;
694
774
  unit?: string;
695
775
  units?: CurrencyOption[];
696
776
  errors?: string[];
697
777
  disabled?: boolean;
698
778
  dropdownicon?: Component;
699
779
  onunitchange?: (prevUnit: string, newUnit: string) => void;
780
+ testId?: string;
700
781
  };
701
782
  export interface DateRangeProps {
702
783
  startDate?: Date;
@@ -704,7 +785,7 @@ export interface DateRangeProps {
704
785
  minDate?: Date;
705
786
  maxDate?: Date;
706
787
  disabled?: boolean;
707
- class?: string;
788
+ class?: ClassValue;
708
789
  placeholder?: string;
709
790
  startLabel?: string;
710
791
  endLabel?: string;
@@ -715,6 +796,7 @@ export interface DateRangeProps {
715
796
  }) => void;
716
797
  id?: string;
717
798
  name?: string;
799
+ testId?: string;
718
800
  }
719
801
  export interface DateSelectEvent {
720
802
  startDate: Date | null;
@@ -727,10 +809,11 @@ export type TagsProps = {
727
809
  errors?: string[];
728
810
  placeholder?: string;
729
811
  size?: VariantSizes;
730
- class?: string;
812
+ class?: ClassValue;
731
813
  suggestions?: string[];
732
814
  onaddtag?: (tag: string) => void;
733
815
  onremovetag?: (tag: string) => void;
816
+ testId?: string;
734
817
  };
735
818
  export { default as Form } from './forms/Form.svelte';
736
819
  export { default as Input } from './forms/Input.svelte';
@@ -755,7 +838,7 @@ export interface SliderProps {
755
838
  disabled?: boolean;
756
839
  size?: VariantSizes;
757
840
  errors?: string[];
758
- class?: string;
841
+ class?: ClassValue;
759
842
  min?: number;
760
843
  max?: number;
761
844
  step?: number;
@@ -769,6 +852,7 @@ export interface SliderProps {
769
852
  formatOptions?: Intl.NumberFormatOptions & {
770
853
  notation?: NotationType;
771
854
  };
855
+ testId?: string;
772
856
  }
773
857
  export type ProgressSegment = {
774
858
  value: number;
@@ -786,8 +870,9 @@ export type ProgressProps = {
786
870
  showLabels?: boolean;
787
871
  showValues?: boolean;
788
872
  class?: ClassValue;
789
- labelClass?: string;
790
- barClass?: string;
873
+ labelClass?: ClassValue;
874
+ barClass?: ClassValue;
875
+ testId?: string;
791
876
  };
792
877
  export { default as Progress } from './elements/progress/Progress.svelte';
793
878
  export type AccordionProps = {
@@ -799,14 +884,21 @@ export type AccordionProps = {
799
884
  open?: boolean;
800
885
  color?: VariantColors;
801
886
  class?: ClassValue;
887
+ /** @deprecated Use titleClass instead */
802
888
  titleclass?: ClassValue;
889
+ titleClass?: ClassValue;
890
+ /** @deprecated Use bodyClass instead */
803
891
  bodyclass?: ClassValue;
892
+ bodyClass?: ClassValue;
893
+ /** @deprecated Use headerClass instead */
804
894
  headerclass?: ClassValue;
895
+ headerClass?: ClassValue;
805
896
  icon?: Component;
806
897
  iconPosition?: 'start' | 'end';
807
898
  bordered?: boolean;
808
899
  onexpand?: () => void;
809
900
  oncollapse?: () => void;
901
+ testId?: string;
810
902
  };
811
903
  export { default as Accordion } from './elements/accordion/Accordion.svelte';
812
904
  export interface TimelineItem {
@@ -825,9 +917,10 @@ export type RadioPillProps = {
825
917
  options: RadioOption[];
826
918
  value?: string;
827
919
  label?: string;
828
- class?: string;
920
+ class?: ClassValue;
829
921
  errors?: string[];
830
922
  onchange?: (value: string) => void;
923
+ testId?: string;
831
924
  };
832
925
  export type FilterTab = {
833
926
  value: string;
@@ -849,6 +942,7 @@ export type CompactFiltersProps = {
849
942
  summaryClass?: ClassValue;
850
943
  expandedClass?: ClassValue;
851
944
  FilterIcon?: Component;
945
+ testId?: string;
852
946
  };
853
947
  export type ActivityItemBadge = {
854
948
  text: string;
@@ -875,6 +969,7 @@ export type ActivityListProps = {
875
969
  itemClass?: ClassValue;
876
970
  onItemClick?: (item: ActivityItem, index: number) => void;
877
971
  children?: Snippet;
972
+ testId?: string;
878
973
  };
879
974
  export { CompactFilters } from './filters/index.js';
880
975
  export * from './file-browser/index.js';
@@ -920,6 +1015,7 @@ export interface FileBrowserProps {
920
1015
  selectedFiles: string[];
921
1016
  navToFileFolder: (fileKey: string) => void;
922
1017
  }) => any;
1018
+ testId?: string;
923
1019
  }
924
1020
  export interface GetUsersOptions {
925
1021
  page: number;
@@ -983,6 +1079,7 @@ export interface UserTableProps {
983
1079
  onEdit: (user: User) => void;
984
1080
  onDelete: (userId: string) => void;
985
1081
  class?: ClassValue;
1082
+ testId?: string;
986
1083
  }
987
1084
  export interface UserModalProps {
988
1085
  open?: boolean;
@@ -993,6 +1090,7 @@ export interface UserModalProps {
993
1090
  onSave: (user: User, mode: 'create' | 'edit') => void | Promise<void>;
994
1091
  onClose?: () => void;
995
1092
  class?: ClassValue;
1093
+ testId?: string;
996
1094
  }
997
1095
  export interface UserViewModalProps {
998
1096
  open?: boolean;
@@ -1003,6 +1101,7 @@ export interface UserViewModalProps {
1003
1101
  onRegenerateApiKey?: (userId: string) => Promise<void>;
1004
1102
  onClose: () => void;
1005
1103
  class?: ClassValue;
1104
+ testId?: string;
1006
1105
  }
1007
1106
  /**
1008
1107
  * User Management Adapter Interface
@@ -1068,6 +1167,7 @@ export interface UserManagementProps {
1068
1167
  */
1069
1168
  permissions?: Permission[];
1070
1169
  class?: ClassValue;
1170
+ testId?: string;
1071
1171
  }
1072
1172
  export interface FormErrors {
1073
1173
  [key: string]: string;
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { ChartColor, Color, Size } from './variants.js';
8
8
  * - ChartColors: Record type mapping ChartColor enum to string values
9
9
  */
10
10
  export { Color, Size, ChartColor };
11
+ export { buildTestId } from './helper/testid.js';
11
12
  // Helper utilities
12
13
  export { tv, cn } from './helper/cls.js';
13
14
  export { isRouteActive } from './helper/nav.svelte.js';