@juspay/svelte-ui-components 2.111.0 → 2.111.2

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 (83) hide show
  1. package/dist/Accordion/Accordion.svelte +1 -0
  2. package/dist/Animations/ModalAnimation.svelte +4 -0
  3. package/dist/Animations/OverlayAnimation.svelte +5 -1
  4. package/dist/AreaChart/AreaChart.svelte +1 -0
  5. package/dist/Avatar/Avatar.svelte +8 -1
  6. package/dist/Badge/Badge.svelte +6 -1
  7. package/dist/Banner/Banner.svelte +1 -0
  8. package/dist/BarChart/BarChart.svelte +4 -0
  9. package/dist/Book/Book.svelte +1 -0
  10. package/dist/BrandLoader/BrandLoader.svelte +5 -1
  11. package/dist/Breadcrumb/Breadcrumb.svelte +1 -0
  12. package/dist/Browser/Browser.svelte +7 -1
  13. package/dist/Button/Button.svelte +1 -0
  14. package/dist/Calendar/Calendar.svelte +7 -1
  15. package/dist/Card/Card.svelte +1 -0
  16. package/dist/Carousel/Carousel.svelte +3 -0
  17. package/dist/CheckListItem/CheckListItem.svelte +1 -1
  18. package/dist/Checkbox/Checkbox.svelte +3 -0
  19. package/dist/Choicebox/Choicebox.svelte +1 -0
  20. package/dist/ColorPicker/ColorPicker.svelte +1 -0
  21. package/dist/Combobox/Combobox.svelte +10 -1
  22. package/dist/CommandMenu/CommandMenu.svelte +3 -0
  23. package/dist/ContextMenu/ContextMenu.svelte +2 -0
  24. package/dist/DateRangePicker/DateRangePicker.svelte +299 -17
  25. package/dist/DateRangePicker/properties.d.ts +7 -2
  26. package/dist/DateRangePicker/timeUtils.d.ts +6 -0
  27. package/dist/DateRangePicker/timeUtils.js +71 -0
  28. package/dist/DeltaIndicator/DeltaIndicator.svelte +1 -0
  29. package/dist/DualAxisBarChart/DualAxisBarChart.svelte +2 -0
  30. package/dist/EmptyState/EmptyState.svelte +5 -1
  31. package/dist/FileInput/FileInput.svelte +2 -0
  32. package/dist/FunnelChart/FunnelChart.svelte +2 -0
  33. package/dist/Gauge/Gauge.svelte +1 -0
  34. package/dist/GridItem/GridItem.svelte +1 -0
  35. package/dist/Icon/Icon.svelte +1 -0
  36. package/dist/IconStack/IconStack.svelte +5 -1
  37. package/dist/IframeViewer/IframeViewer.svelte +1 -1
  38. package/dist/Img/Img.svelte +9 -1
  39. package/dist/Input/Input.svelte +3 -0
  40. package/dist/InputButton/InputButton.svelte +5 -1
  41. package/dist/KeyValue/KeyValue.svelte +2 -1
  42. package/dist/KeyboardInput/KeyboardInput.svelte +1 -0
  43. package/dist/LineChart/LineChart.svelte +3 -0
  44. package/dist/ListItem/ListItem.svelte +5 -0
  45. package/dist/Loader/Loader.svelte +5 -1
  46. package/dist/LoadingDots/LoadingDots.svelte +2 -0
  47. package/dist/LottiePlayer/LottiePlayer.svelte +1 -0
  48. package/dist/Menu/Menu.svelte +2 -0
  49. package/dist/Modal/Modal.svelte +4 -1
  50. package/dist/Pagination/Pagination.svelte +4 -0
  51. package/dist/Phone/Phone.svelte +5 -1
  52. package/dist/PieChart/PieChart.svelte +1 -0
  53. package/dist/Pill/Pill.svelte +1 -0
  54. package/dist/Progress/Progress.svelte +5 -1
  55. package/dist/ProportionBar/ProportionBar.svelte +4 -0
  56. package/dist/Radio/Radio.svelte +1 -0
  57. package/dist/RelativeTime/RelativeTime.svelte +2 -0
  58. package/dist/SankeyChart/SankeyChart.svelte +1 -0
  59. package/dist/Scroller/Scroller.svelte +1 -0
  60. package/dist/Select/Select.svelte +18 -5
  61. package/dist/Sheet/Sheet.svelte +2 -0
  62. package/dist/Shimmer/Shimmer.svelte +5 -1
  63. package/dist/Slider/Slider.svelte +1 -0
  64. package/dist/Snippet/Snippet.svelte +5 -1
  65. package/dist/SplitButton/SplitButton.svelte +1 -0
  66. package/dist/SplitInput/SplitInput.svelte +1 -1
  67. package/dist/StatCard/StatCard.svelte +31 -4
  68. package/dist/Status/Status.svelte +5 -1
  69. package/dist/Stepper/Stepper.svelte +6 -1
  70. package/dist/Table/BuiltinCell.svelte +13 -2
  71. package/dist/Table/Table.svelte +24 -1
  72. package/dist/Tabs/Tabs.svelte +2 -1
  73. package/dist/ThemeSwitcher/ThemeSwitcher.svelte +6 -1
  74. package/dist/Toast/Toast.svelte +4 -2
  75. package/dist/Toggle/Toggle.svelte +7 -1
  76. package/dist/Toolbar/Toolbar.svelte +7 -3
  77. package/dist/Tooltip/Tooltip.svelte +5 -4
  78. package/dist/_chart/Axis.svelte +8 -1
  79. package/dist/_chart/ChartContainer.svelte +1 -0
  80. package/dist/_chart/ChartTooltip.svelte +3 -1
  81. package/dist/_chart/Legend.svelte +1 -0
  82. package/dist/testing-attributes.d.ts +36 -0
  83. package/package.json +1 -1
@@ -12,6 +12,7 @@
12
12
  role="button"
13
13
  tabindex="0"
14
14
  data-pw={typeof testId === 'string' ? testId : null}
15
+ testID={typeof testId === 'string' ? testId : null}
15
16
  >
16
17
  {#if typeof svg === 'string' && svg.length > 0}
17
18
  <!-- eslint-disable svelte/no-at-html-tags -->
@@ -4,7 +4,11 @@
4
4
  let { icons, classes, testId }: IconStackProperties = $props();
5
5
  </script>
6
6
 
7
- <div class="stack-container {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}>
7
+ <div
8
+ class="stack-container {classes ?? ''}"
9
+ data-pw={typeof testId === 'string' ? testId : null}
10
+ testID={typeof testId === 'string' ? testId : null}
11
+ >
8
12
  {#each icons as icon, i (i)}
9
13
  <div class="stack-icon" style:z-index={icons.length - i}>
10
14
  {#if icon.type === 'image'}
@@ -42,7 +42,7 @@
42
42
  });
43
43
  </script>
44
44
 
45
- <div class="iframe-viewer {classes ?? ''}" data-pw={testId}>
45
+ <div class="iframe-viewer {classes ?? ''}" data-pw={testId} testID={testId}>
46
46
  {#if src}
47
47
  <iframe bind:this={iframeEl} {src} {title} {allow} {sandbox} {loading} {referrerpolicy}
48
48
  ></iframe>
@@ -116,9 +116,17 @@
116
116
  aria-label={alt.length > 0 ? alt : null}
117
117
  aria-hidden={alt.length === 0 ? 'true' : null}
118
118
  data-pw={testId}
119
+ testID={testId}
119
120
  ></svg>
120
121
  {:else}
121
- <img class={classes ?? ''} src={currentSrc} {alt} onerror={handleFallback} data-pw={testId} />
122
+ <img
123
+ class={classes ?? ''}
124
+ src={currentSrc}
125
+ {alt}
126
+ onerror={handleFallback}
127
+ data-pw={testId}
128
+ testID={testId}
129
+ />
122
130
  {/if}
123
131
 
124
132
  <style>
@@ -275,6 +275,7 @@
275
275
  onclick={onClick}
276
276
  onkeydown={onKeyDown}
277
277
  data-pw={testId}
278
+ testID={testId}
278
279
  class:action-input={actionInput}
279
280
  style="--focus-border: {addFocusColor ? 1 : 0}px;"
280
281
  style:resize={effectiveResize}
@@ -307,6 +308,7 @@
307
308
  onclick={onClick}
308
309
  onkeydown={onKeyDown}
309
310
  data-pw={testId}
311
+ testID={testId}
310
312
  class:action-input={actionInput}
311
313
  disabled={disable}
312
314
  bind:this={inputElement}
@@ -362,6 +364,7 @@
362
364
  <div
363
365
  class="error-message"
364
366
  data-pw={typeof testId === 'string' && testId.length > 0 ? `${testId}-error-message` : null}
367
+ testID={typeof testId === 'string' && testId.length > 0 ? `${testId}-error-message` : null}
365
368
  >
366
369
  {onErrorMessage}
367
370
  </div>
@@ -62,7 +62,11 @@
62
62
  }
63
63
  </script>
64
64
 
65
- <div class="container {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}>
65
+ <div
66
+ class="container {classes ?? ''}"
67
+ data-pw={typeof testId === 'string' ? testId : null}
68
+ testID={typeof testId === 'string' ? testId : null}
69
+ >
66
70
  {#if inputProperties.label && inputProperties.label !== ''}
67
71
  <label class="label" for={inputProperties.name}>
68
72
  {inputProperties.label}{#if mandatory}<span class="mandatory-marker" aria-label="required">
@@ -29,9 +29,10 @@
29
29
  class="key-value key-value--{layout} key-value--{size} {classes}"
30
30
  style="--keyvalue-columns: {columns};"
31
31
  data-pw={testId}
32
+ testID={testId}
32
33
  >
33
34
  {#each visibleItems as item, index (item.label + '-' + index)}
34
- <div class="key-value-item" data-pw={item.testId}>
35
+ <div class="key-value-item" data-pw={item.testId} testID={item.testId}>
35
36
  <dt class="key-value-label">
36
37
  {#if labelSnippet}
37
38
  {@render labelSnippet(item, index)}
@@ -43,6 +43,7 @@
43
43
  <span
44
44
  class="keyboard-input {classes ?? ''}"
45
45
  data-pw={typeof testId === 'string' ? testId : null}
46
+ testID={typeof testId === 'string' ? testId : null}
46
47
  onclick={interactive ? onclick : null}
47
48
  onkeydown={interactive ? handleKeydown : null}
48
49
  role={interactive ? 'button' : null}
@@ -519,6 +519,7 @@
519
519
  class="line-chart {classes ?? ''}"
520
520
  bind:this={containerEl}
521
521
  data-pw={typeof testId === 'string' ? testId : null}
522
+ testID={typeof testId === 'string' ? testId : null}
522
523
  >
523
524
  {#if isEmpty && typeof empty === 'function'}
524
525
  <div class="chart-empty">{@render empty()}</div>
@@ -627,6 +628,7 @@
627
628
  r={dotRadius + 6}
628
629
  fill={hp.color}
629
630
  data-pw={`dot-halo-${i}`}
631
+ testID={`dot-halo-${i}`}
630
632
  />
631
633
  {/each}
632
634
 
@@ -720,6 +722,7 @@
720
722
  height={dims.innerHeight}
721
723
  fill="transparent"
722
724
  data-pw="hover-overlay"
725
+ testID="hover-overlay"
723
726
  onpointermove={handleOverlayMove}
724
727
  onpointerleave={handleLeave}
725
728
  onclick={handleClick}
@@ -73,6 +73,7 @@
73
73
  aria-selected={ariaSelected}
74
74
  {id}
75
75
  data-pw={testId}
76
+ testID={testId}
76
77
  >
77
78
  <div
78
79
  class="top-section"
@@ -82,6 +83,7 @@
82
83
  role="button"
83
84
  tabindex="0"
84
85
  data-pw={topSectionTestId}
86
+ testID={topSectionTestId}
85
87
  >
86
88
  <div class="left-content">
87
89
  {#if typeof leftImageUrl === 'string' && leftImageUrl.length > 0}
@@ -92,6 +94,7 @@
92
94
  role="button"
93
95
  tabindex="0"
94
96
  data-pw={leftImageTestId}
97
+ testID={leftImageTestId}
95
98
  >
96
99
  <Img src={leftImageUrl} alt="" fallback={leftImageFallbackUrl} />
97
100
  </div>
@@ -110,6 +113,7 @@
110
113
  role="button"
111
114
  tabindex="0"
112
115
  data-pw={centerTextTestId}
116
+ testID={centerTextTestId}
113
117
  >
114
118
  <!-- eslint-disable-next-line -->
115
119
  {@html label}
@@ -131,6 +135,7 @@
131
135
  role="button"
132
136
  tabindex="0"
133
137
  data-pw={rightImageTestId}
138
+ testID={rightImageTestId}
134
139
  >
135
140
  <div class="right-img-wrapper">
136
141
  <Img src={rightImageUrl} alt="" />
@@ -4,7 +4,11 @@
4
4
  let { classes, testId }: LoaderProperties = $props();
5
5
  </script>
6
6
 
7
- <div class="loader {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}></div>
7
+ <div
8
+ class="loader {classes ?? ''}"
9
+ data-pw={typeof testId === 'string' ? testId : null}
10
+ testID={typeof testId === 'string' ? testId : null}
11
+ ></div>
8
12
 
9
13
  <style>
10
14
  .loader {
@@ -11,6 +11,7 @@
11
11
  role="status"
12
12
  aria-label="Loading"
13
13
  data-pw={typeof testId === 'string' ? testId : null}
14
+ testID={typeof testId === 'string' ? testId : null}
14
15
  >
15
16
  {#each { length: count } as _, i (i)}
16
17
  <span
@@ -18,6 +19,7 @@
18
19
  class:pulse={animation === 'pulse'}
19
20
  style="--i: {i}"
20
21
  data-pw={typeof testId === 'string' ? `${testId}-dot-${i}` : null}
22
+ testID={typeof testId === 'string' ? `${testId}-dot-${i}` : null}
21
23
  ></span>
22
24
  {/each}
23
25
  </span>
@@ -107,6 +107,7 @@
107
107
  aria-hidden={ariaHidden ? 'true' : null}
108
108
  role={ariaHidden ? null : 'img'}
109
109
  data-pw={typeof testId === 'string' ? testId : null}
110
+ testID={typeof testId === 'string' ? testId : null}
110
111
  ></div>
111
112
 
112
113
  <style>
@@ -343,6 +343,7 @@
343
343
  class="menu-container {classes ?? ''}"
344
344
  bind:this={menuContainerEl}
345
345
  data-pw={typeof testId === 'string' ? testId : null}
346
+ testID={typeof testId === 'string' ? testId : null}
346
347
  >
347
348
  <div
348
349
  class="menu-trigger"
@@ -402,6 +403,7 @@
402
403
  }
403
404
  }}
404
405
  data-pw={typeof testId === 'string' ? `${testId}-item-${item.value}` : null}
406
+ testID={typeof testId === 'string' ? `${testId}-item-${item.value}` : null}
405
407
  >
406
408
  {#if typeof item.icon === 'string'}
407
409
  <span class="menu-item-icon">
@@ -150,6 +150,7 @@
150
150
  role="button"
151
151
  tabindex="0"
152
152
  data-pw={testId}
153
+ testID={testId}
153
154
  >
154
155
  <ModalAnimation enable={enableTransition} {align} {transitionType}>
155
156
  <div class="modal-content {size}">
@@ -162,6 +163,7 @@
162
163
  role="button"
163
164
  tabindex="0"
164
165
  data-pw={leftImageTestId}
166
+ testID={leftImageTestId}
165
167
  >
166
168
  <!-- Inline SVGs so currentColor icons inherit the header text
167
169
  colour; non-SVG URLs fall back to a plain <img>. -->
@@ -175,7 +177,7 @@
175
177
  </div>
176
178
  {/if}
177
179
  {#if typeof header.text === 'string' && header.text.length > 0}
178
- <div class="header-text" data-pw={header.testId}>
180
+ <div class="header-text" data-pw={header.testId} testID={header.testId}>
179
181
  {header.text}
180
182
  </div>
181
183
  {/if}
@@ -186,6 +188,7 @@
186
188
  onclick={handleRightImageClick}
187
189
  onkeydown={handleRightImageKeyDown}
188
190
  data-pw={header.buttonTestId}
191
+ testID={header.buttonTestId}
189
192
  >
190
193
  <Img
191
194
  inlineSvg
@@ -70,6 +70,7 @@
70
70
  class="pagination {classes ?? ''}"
71
71
  class:disabled
72
72
  data-pw={typeof testId === 'string' && testId.length > 0 ? testId : null}
73
+ testID={typeof testId === 'string' && testId.length > 0 ? testId : null}
73
74
  >
74
75
  <button
75
76
  class="page-button prev-button"
@@ -77,6 +78,7 @@
77
78
  onclick={() => goToPage(currentPage - 1)}
78
79
  aria-label="Previous page"
79
80
  data-pw={typeof prevButtonTestId === 'string' ? prevButtonTestId : null}
81
+ testID={typeof prevButtonTestId === 'string' ? prevButtonTestId : null}
80
82
  >
81
83
  &#8249;
82
84
  </button>
@@ -105,6 +107,7 @@
105
107
  onclick={loadMore}
106
108
  aria-label="Load more"
107
109
  data-pw={typeof nextButtonTestId === 'string' ? nextButtonTestId : null}
110
+ testID={typeof nextButtonTestId === 'string' ? nextButtonTestId : null}
108
111
  >
109
112
  &#8250;
110
113
  </button>
@@ -115,6 +118,7 @@
115
118
  onclick={() => goToPage(currentPage + 1)}
116
119
  aria-label="Next page"
117
120
  data-pw={typeof nextButtonTestId === 'string' ? nextButtonTestId : null}
121
+ testID={typeof nextButtonTestId === 'string' ? nextButtonTestId : null}
118
122
  >
119
123
  &#8250;
120
124
  </button>
@@ -16,7 +16,11 @@
16
16
  let isModern = $derived(variant === 'modern');
17
17
  </script>
18
18
 
19
- <div class="phone-wrapper {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}>
19
+ <div
20
+ class="phone-wrapper {classes ?? ''}"
21
+ data-pw={typeof testId === 'string' ? testId : null}
22
+ testID={typeof testId === 'string' ? testId : null}
23
+ >
20
24
  <div class="side-buttons-left">
21
25
  <div class="side-button volume-up"></div>
22
26
  <div class="side-button volume-down"></div>
@@ -292,6 +292,7 @@
292
292
  class="pie-chart {classes ?? ''}"
293
293
  bind:this={containerEl}
294
294
  data-pw={typeof testId === 'string' ? testId : null}
295
+ testID={typeof testId === 'string' ? testId : null}
295
296
  >
296
297
  {#if isEmpty && typeof empty === 'function'}
297
298
  <div class="chart-empty">{@render empty()}</div>
@@ -52,6 +52,7 @@
52
52
  tabindex={interactive ? 0 : null}
53
53
  aria-disabled={interactive && disabled ? true : null}
54
54
  data-pw={typeof testId === 'string' ? testId : null}
55
+ testID={typeof testId === 'string' ? testId : null}
55
56
  >
56
57
  {#if typeof leadingIcon === 'function'}
57
58
  <span class="pill-leading-icon">{@render leadingIcon()}</span>
@@ -7,7 +7,11 @@
7
7
  let isIndeterminate = $derived(value < 0);
8
8
  </script>
9
9
 
10
- <div class="container {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}>
10
+ <div
11
+ class="container {classes ?? ''}"
12
+ data-pw={typeof testId === 'string' ? testId : null}
13
+ testID={typeof testId === 'string' ? testId : null}
14
+ >
11
15
  <div class="track">
12
16
  <div
13
17
  class="bar"
@@ -100,6 +100,7 @@
100
100
  class="proportion-bar {classes ?? ''}"
101
101
  style={trackHeightStyle}
102
102
  data-pw={typeof testId === 'string' ? testId : null}
103
+ testID={typeof testId === 'string' ? testId : null}
103
104
  >
104
105
  <div class="proportion-bar-track">
105
106
  <svg
@@ -110,6 +111,7 @@
110
111
  aria-hidden={showLegend ? 'true' : null}
111
112
  aria-label={showLegend ? null : ariaSummary}
112
113
  data-pw={typeof testId === 'string' ? `${testId}-svg` : null}
114
+ testID={typeof testId === 'string' ? `${testId}-svg` : null}
113
115
  >
114
116
  {#each rectSegments as rectSegment, rectIndex (rectIndex)}
115
117
  <rect
@@ -135,11 +137,13 @@
135
137
  class="proportion-bar-legend"
136
138
  aria-label="Segment breakdown"
137
139
  data-pw={typeof testId === 'string' ? `${testId}-legend` : null}
140
+ testID={typeof testId === 'string' ? `${testId}-legend` : null}
138
141
  >
139
142
  {#each computedSegments as computedSegment, legendIndex (legendIndex)}
140
143
  <li
141
144
  class="proportion-bar-legend-item"
142
145
  data-pw={typeof testId === 'string' ? `${testId}-legend-item-${legendIndex}` : null}
146
+ testID={typeof testId === 'string' ? `${testId}-legend-item-${legendIndex}` : null}
143
147
  >
144
148
  <span
145
149
  class="proportion-bar-swatch"
@@ -27,6 +27,7 @@
27
27
  class="radio-container {classes ?? ''}"
28
28
  class:disabled
29
29
  data-pw={typeof testId === 'string' ? testId : null}
30
+ testID={typeof testId === 'string' ? testId : null}
30
31
  >
31
32
  <input
32
33
  type="radio"
@@ -92,6 +92,7 @@
92
92
  class="relative-time {classes ?? ''}"
93
93
  datetime={isoString}
94
94
  data-pw={typeof testId === 'string' ? testId : null}
95
+ testID={typeof testId === 'string' ? testId : null}
95
96
  >
96
97
  {relativeText}
97
98
  </time>
@@ -101,6 +102,7 @@
101
102
  class="relative-time {classes ?? ''}"
102
103
  datetime={isoString}
103
104
  data-pw={typeof testId === 'string' ? testId : null}
105
+ testID={typeof testId === 'string' ? testId : null}
104
106
  >
105
107
  {relativeText}
106
108
  </time>
@@ -477,6 +477,7 @@
477
477
  class="sankey-chart {classes ?? ''}"
478
478
  bind:this={containerEl}
479
479
  data-pw={typeof testId === 'string' ? testId : null}
480
+ testID={typeof testId === 'string' ? testId : null}
480
481
  >
481
482
  {#if isEmpty && typeof empty === 'function'}
482
483
  <div class="chart-empty">{@render empty()}</div>
@@ -159,6 +159,7 @@
159
159
  class:horizontal={direction === 'horizontal'}
160
160
  class:vertical={direction === 'vertical'}
161
161
  data-pw={typeof testId === 'string' ? testId : null}
162
+ testID={typeof testId === 'string' ? testId : null}
162
163
  >
163
164
  {#if showArrowControls && canScrollPrev}
164
165
  <div class="arrow arrow-prev">
@@ -390,7 +390,7 @@
390
390
  class:disabled
391
391
  class:ghost={hierarchy === 'ghost'}
392
392
  bind:this={containerEl}
393
- {...typeof testId === 'string' ? { 'data-pw': testId } : {}}
393
+ {...typeof testId === 'string' ? { 'data-pw': testId, testID: testId } : {}}
394
394
  >
395
395
  <div
396
396
  class="select-trigger"
@@ -428,6 +428,7 @@
428
428
  autocomplete="off"
429
429
  tabindex={disabled ? -1 : 0}
430
430
  data-pw={typeof testId === 'string' ? `${testId}-search` : null}
431
+ testID={typeof testId === 'string' ? `${testId}-search` : null}
431
432
  />
432
433
  {/if}
433
434
  {:else}
@@ -453,6 +454,7 @@
453
454
  autocomplete="off"
454
455
  tabindex={disabled ? -1 : 0}
455
456
  data-pw={typeof testId === 'string' ? `${testId}-search` : null}
457
+ testID={typeof testId === 'string' ? `${testId}-search` : null}
456
458
  />
457
459
  {:else if value.length === 0}
458
460
  <span class="select-placeholder">{placeholder}</span>
@@ -471,6 +473,7 @@
471
473
  autocomplete="off"
472
474
  tabindex={disabled ? -1 : 0}
473
475
  data-pw={typeof testId === 'string' ? `${testId}-search` : null}
476
+ testID={typeof testId === 'string' ? `${testId}-search` : null}
474
477
  />
475
478
  {:else}
476
479
  <span class={displayText.length > 0 ? 'select-value' : 'select-placeholder'}>
@@ -512,7 +515,9 @@
512
515
  ? `${selectAllLabel}, ${selectedFilteredCount} of ${filteredItems.length} selected`
513
516
  : selectAllLabel}
514
517
  tabindex="-1"
515
- {...typeof testId === 'string' ? { 'data-pw': `${testId}-select-all` } : {}}
518
+ {...typeof testId === 'string'
519
+ ? { 'data-pw': `${testId}-select-all`, testID: `${testId}-select-all` }
520
+ : {}}
516
521
  onclick={toggleSelectAll}
517
522
  onmouseenter={() => (highlightedIndex = index)}
518
523
  >
@@ -529,6 +534,7 @@
529
534
  aria-hidden="true"
530
535
  data-checked={allFilteredSelected ? 'true' : 'false'}
531
536
  data-pw={typeof testId === 'string' ? `${testId}-select-all-indicator` : null}
537
+ testID={typeof testId === 'string' ? `${testId}-select-all-indicator` : null}
532
538
  >
533
539
  {#if allFilteredSelected}
534
540
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
@@ -537,6 +543,7 @@
537
543
  <span
538
544
  class="select-option-dash"
539
545
  data-pw={typeof testId === 'string' ? `${testId}-select-all-dash` : null}
546
+ testID={typeof testId === 'string' ? `${testId}-select-all-dash` : null}
540
547
  ></span>
541
548
  {/if}
542
549
  </span>
@@ -555,11 +562,14 @@
555
562
  aria-selected={value.includes(row.item.id)}
556
563
  tabindex="-1"
557
564
  {...typeof row.item.testId === 'string'
558
- ? { 'data-pw': row.item.testId }
565
+ ? { 'data-pw': row.item.testId, testID: row.item.testId }
559
566
  : typeof itemTestId === 'string'
560
- ? { 'data-pw': `${itemTestId}-${row.item.id}` }
567
+ ? {
568
+ 'data-pw': `${itemTestId}-${row.item.id}`,
569
+ testID: `${itemTestId}-${row.item.id}`
570
+ }
561
571
  : typeof testId === 'string'
562
- ? { 'data-pw': `${testId}-${row.item.id}` }
572
+ ? { 'data-pw': `${testId}-${row.item.id}`, testID: `${testId}-${row.item.id}` }
563
573
  : {}}
564
574
  onclick={() => selectItem(row.item.id)}
565
575
  onmouseenter={() => (highlightedIndex = index)}
@@ -579,6 +589,9 @@
579
589
  data-pw={typeof testId === 'string'
580
590
  ? `${testId}-option-indicator-${row.item.id}`
581
591
  : null}
592
+ testID={typeof testId === 'string'
593
+ ? `${testId}-option-indicator-${row.item.id}`
594
+ : null}
582
595
  >
583
596
  {#if value.includes(row.item.id)}
584
597
  <!-- eslint-disable-next-line svelte/no-at-html-tags -->
@@ -136,6 +136,7 @@
136
136
  role="button"
137
137
  tabindex="-1"
138
138
  data-pw={typeof testId === 'string' ? testId : null}
139
+ testID={typeof testId === 'string' ? testId : null}
139
140
  transition:fade={{ duration: 200 }}
140
141
  >
141
142
  <div
@@ -146,6 +147,7 @@
146
147
  aria-label={title ?? 'Sheet'}
147
148
  tabindex="-1"
148
149
  data-pw={typeof testId === 'string' ? `${testId}-panel` : null}
150
+ testID={typeof testId === 'string' ? `${testId}-panel` : null}
149
151
  transition:fly|global={flyParams}
150
152
  onintroend={handleIntroEnd}
151
153
  onoutroend={handleOutroEnd}
@@ -4,7 +4,11 @@
4
4
  let { testId, classes }: ShimmerProperties = $props();
5
5
  </script>
6
6
 
7
- <div class="shimmer {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}></div>
7
+ <div
8
+ class="shimmer {classes ?? ''}"
9
+ data-pw={typeof testId === 'string' ? testId : null}
10
+ testID={typeof testId === 'string' ? testId : null}
11
+ ></div>
8
12
 
9
13
  <style>
10
14
  .shimmer {
@@ -43,6 +43,7 @@
43
43
  {value}
44
44
  {disabled}
45
45
  data-pw={typeof testId === 'string' ? testId : null}
46
+ testID={typeof testId === 'string' ? testId : null}
46
47
  oninput={handleInput}
47
48
  onchange={handleChange}
48
49
  style="--slider-fill-percent: {percentage}%"
@@ -29,7 +29,11 @@
29
29
  }
30
30
  </script>
31
31
 
32
- <div class="snippet {classes ?? ''}" data-pw={typeof testId === 'string' ? testId : null}>
32
+ <div
33
+ class="snippet {classes ?? ''}"
34
+ data-pw={typeof testId === 'string' ? testId : null}
35
+ testID={typeof testId === 'string' ? testId : null}
36
+ >
33
37
  <code class="snippet-code">
34
38
  <span class="snippet-prompt">{prompt}</span>
35
39
  <span class="snippet-text">{text}</span>
@@ -34,6 +34,7 @@
34
34
  class="split-button {classes ?? ''}"
35
35
  class:disabled
36
36
  data-pw={typeof testId === 'string' ? testId : null}
37
+ testID={typeof testId === 'string' ? testId : null}
37
38
  >
38
39
  <div class="split-button-primary">
39
40
  <Button {text} onclick={handlePrimaryClick} {disabled} />
@@ -144,7 +144,7 @@
144
144
  }
145
145
  </script>
146
146
 
147
- <div class="field-group {classes ?? ''}" data-pw={testId}>
147
+ <div class="field-group {classes ?? ''}" data-pw={testId} testID={testId}>
148
148
  {#each fieldConfigs as config, index (index)}
149
149
  {#if typeof separator === 'string' && index > 0}
150
150
  <span class="field-group-separator">{separator}</span>