@juspay/svelte-ui-components 3.5.0 → 3.5.1

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 (152) hide show
  1. package/README.md +1 -1
  2. package/dist/Accordion/Accordion.svelte +1 -5
  3. package/dist/Accordion/properties.d.ts +0 -1
  4. package/dist/AreaChart/AreaChart.svelte +2 -8
  5. package/dist/AreaChart/properties.d.ts +0 -10
  6. package/dist/AttachmentChipRow/AttachmentChipRow.svelte +30 -30
  7. package/dist/AttachmentChipRow/properties.d.ts +6 -6
  8. package/dist/Banner/Banner.svelte +1 -5
  9. package/dist/Banner/properties.d.ts +0 -1
  10. package/dist/BarChart/BarChart.svelte +7 -13
  11. package/dist/BarChart/properties.d.ts +1 -9
  12. package/dist/Book/Book.svelte +1 -5
  13. package/dist/Book/properties.d.ts +0 -1
  14. package/dist/Calendar/Calendar.svelte +3 -11
  15. package/dist/Calendar/properties.d.ts +0 -11
  16. package/dist/Chat/Chat.svelte +9 -29
  17. package/dist/Chat/properties.d.ts +0 -9
  18. package/dist/Chat/types.d.ts +7 -0
  19. package/dist/ChatBubble/ChatBubble.svelte +3 -11
  20. package/dist/ChatBubble/properties.d.ts +0 -3
  21. package/dist/ChatComposer/ChatComposer.svelte +18 -44
  22. package/dist/ChatComposer/properties.d.ts +0 -12
  23. package/dist/ChatHeader/ChatHeader.svelte +1 -5
  24. package/dist/ChatHeader/properties.d.ts +0 -1
  25. package/dist/ChatMessage/ChatMessage.svelte +87 -11
  26. package/dist/ChatMessage/properties.d.ts +18 -3
  27. package/dist/ChatMessageList/ChatMessageList.svelte +5 -11
  28. package/dist/ChatMessageList/properties.d.ts +0 -6
  29. package/dist/ChatSuggestions/ChatSuggestions.svelte +1 -5
  30. package/dist/ChatSuggestions/properties.d.ts +0 -1
  31. package/dist/CheckListItem/CheckListItem.svelte +1 -5
  32. package/dist/CheckListItem/properties.d.ts +0 -1
  33. package/dist/Checkbox/Checkbox.svelte +1 -5
  34. package/dist/Checkbox/properties.d.ts +0 -1
  35. package/dist/ChipInput/ChipInput.svelte +10 -20
  36. package/dist/ChipInput/properties.d.ts +0 -4
  37. package/dist/Choicebox/Choicebox.svelte +1 -5
  38. package/dist/Choicebox/properties.d.ts +0 -1
  39. package/dist/ColorPicker/ColorPicker.svelte +4 -10
  40. package/dist/ColorPicker/properties.d.ts +0 -2
  41. package/dist/Combobox/Combobox.svelte +15 -33
  42. package/dist/Combobox/properties.d.ts +0 -8
  43. package/dist/CommandMenu/CommandMenu.svelte +2 -8
  44. package/dist/CommandMenu/properties.d.ts +0 -2
  45. package/dist/ContextMenu/ContextMenu.svelte +3 -11
  46. package/dist/ContextMenu/properties.d.ts +0 -3
  47. package/dist/DateRangePicker/DateRangePicker.svelte +6 -20
  48. package/dist/DateRangePicker/properties.d.ts +0 -19
  49. package/dist/Draggable/Draggable.svelte +7 -7
  50. package/dist/Draggable/properties.d.ts +3 -3
  51. package/dist/DualAxisBarChart/DualAxisBarChart.svelte +1 -5
  52. package/dist/DualAxisBarChart/properties.d.ts +0 -4
  53. package/dist/FileDropzoneTrigger/FileDropzoneTrigger.svelte +1 -5
  54. package/dist/FileDropzoneTrigger/properties.d.ts +0 -1
  55. package/dist/FileInput/FileInput.svelte +2 -8
  56. package/dist/FileInput/properties.d.ts +0 -2
  57. package/dist/FunnelChart/FunnelChart.svelte +2 -8
  58. package/dist/FunnelChart/properties.d.ts +0 -8
  59. package/dist/Gallery/Gallery.svelte +15 -15
  60. package/dist/Gallery/properties.d.ts +6 -6
  61. package/dist/HITL/HITL.svelte +10 -8
  62. package/dist/HITL/properties.d.ts +2 -2
  63. package/dist/IframeViewer/IframeViewer.svelte +3 -2
  64. package/dist/IframeViewer/properties.d.ts +1 -1
  65. package/dist/Img/Img.svelte +119 -39
  66. package/dist/Img/properties.d.ts +0 -1
  67. package/dist/Input/Input.svelte +22 -37
  68. package/dist/Input/properties.d.ts +3 -10
  69. package/dist/InputButton/InputButton.svelte +2 -2
  70. package/dist/LineChart/LineChart.svelte +4 -10
  71. package/dist/LineChart/properties.d.ts +1 -11
  72. package/dist/ListItem/ListItem.svelte +10 -22
  73. package/dist/ListItem/properties.d.ts +5 -10
  74. package/dist/LottiePlayer/LottiePlayer.svelte +2 -8
  75. package/dist/LottiePlayer/properties.d.ts +0 -2
  76. package/dist/MediaPlayer/MediaPlayer.svelte +1 -5
  77. package/dist/MediaPlayer/properties.d.ts +0 -1
  78. package/dist/MediaUpload/MediaUpload.svelte +6 -6
  79. package/dist/MediaUpload/properties.d.ts +3 -3
  80. package/dist/Menu/Menu.svelte +3 -11
  81. package/dist/Menu/properties.d.ts +0 -3
  82. package/dist/Modal/Modal.svelte +15 -31
  83. package/dist/Modal/properties.d.ts +5 -11
  84. package/dist/Pagination/Pagination.svelte +3 -7
  85. package/dist/Pagination/properties.d.ts +1 -2
  86. package/dist/PieChart/PieChart.svelte +4 -10
  87. package/dist/PieChart/properties.d.ts +1 -9
  88. package/dist/Pill/Pill.svelte +1 -5
  89. package/dist/Pill/properties.d.ts +0 -1
  90. package/dist/Radio/Radio.svelte +1 -5
  91. package/dist/Radio/properties.d.ts +0 -1
  92. package/dist/Resizable/Resizable.svelte +3 -11
  93. package/dist/Resizable/properties.d.ts +0 -3
  94. package/dist/SankeyChart/SankeyChart.svelte +4 -14
  95. package/dist/SankeyChart/properties.d.ts +0 -12
  96. package/dist/Scroller/Scroller.svelte +1 -5
  97. package/dist/Scroller/properties.d.ts +0 -1
  98. package/dist/Select/Select.svelte +3 -11
  99. package/dist/Select/properties.d.ts +0 -3
  100. package/dist/Sheet/Sheet.svelte +3 -11
  101. package/dist/Sheet/properties.d.ts +0 -3
  102. package/dist/Slider/Slider.svelte +2 -8
  103. package/dist/Slider/properties.d.ts +0 -2
  104. package/dist/Snippet/Snippet.svelte +1 -5
  105. package/dist/Snippet/properties.d.ts +0 -1
  106. package/dist/SplitButton/SplitButton.svelte +1 -5
  107. package/dist/SplitButton/properties.d.ts +0 -1
  108. package/dist/SplitInput/SplitInput.svelte +6 -14
  109. package/dist/SplitInput/properties.d.ts +0 -3
  110. package/dist/StatCard/StatCard.svelte +2 -2
  111. package/dist/StatCard/properties.d.ts +1 -1
  112. package/dist/Status/Status.svelte +2 -6
  113. package/dist/Status/properties.d.ts +1 -2
  114. package/dist/Stepper/Stepper.svelte +2 -12
  115. package/dist/Stepper/properties.d.ts +1 -14
  116. package/dist/Table/BuiltinCell.svelte +1 -1
  117. package/dist/Table/Table.svelte +16 -17
  118. package/dist/Table/properties.d.ts +3 -35
  119. package/dist/Tabs/Tabs.svelte +2 -8
  120. package/dist/Tabs/properties.d.ts +0 -2
  121. package/dist/TaskList/TaskList.svelte +1 -4
  122. package/dist/TaskList/properties.d.ts +0 -1
  123. package/dist/ThemeSwitcher/ThemeSwitcher.svelte +1 -5
  124. package/dist/ThemeSwitcher/properties.d.ts +0 -1
  125. package/dist/ThinkingIndicator/ThinkingIndicator.svelte +4 -10
  126. package/dist/ThinkingIndicator/properties.d.ts +1 -3
  127. package/dist/Toast/Toast.svelte +2 -2
  128. package/dist/Toast/properties.d.ts +1 -1
  129. package/dist/Toggle/Toggle.svelte +1 -5
  130. package/dist/Toggle/properties.d.ts +0 -1
  131. package/dist/ToolCallLog/ToolCallLog.svelte +1 -10
  132. package/dist/ToolCallLog/properties.d.ts +0 -1
  133. package/dist/Toolbar/Toolbar.svelte +2 -6
  134. package/dist/Toolbar/properties.d.ts +1 -2
  135. package/dist/TypewriterText/TypewriterText.svelte +3 -3
  136. package/dist/TypewriterText/properties.d.ts +1 -1
  137. package/dist-codemod/bin.js +32 -0
  138. package/dist-codemod/cli.js +175 -0
  139. package/dist-codemod/legacy-pairs.js +228 -0
  140. package/dist-codemod/transform.js +278 -0
  141. package/dist-codemod/wc-children.js +66 -0
  142. package/dist-wc/index.js +4458 -5127
  143. package/package.json +9 -7
  144. package/scripts/postinstall.mjs +14 -12
  145. package/dist/deprecation.d.ts +0 -42
  146. package/dist/deprecation.js +0 -57
  147. package/scripts/codemod/README.md +0 -76
  148. package/scripts/codemod/cli.ts +0 -206
  149. package/scripts/codemod/map.ts +0 -118
  150. package/scripts/codemod/transform.ts +0 -549
  151. package/scripts/codemod/tsconfig.json +0 -15
  152. package/scripts/codemod/wc-children.ts +0 -75
@@ -12,19 +12,11 @@
12
12
  separator,
13
13
  testId,
14
14
  classes,
15
- onchange: onchangeLegacy,
16
- onChange,
17
- oninput: oninputLegacy,
18
- onInput,
19
- oncomplete: oncompleteLegacy,
20
- onComplete
15
+ onchange,
16
+ oninput,
17
+ oncomplete
21
18
  }: SplitInputProperties = $props();
22
19
 
23
- // Event-casing phase 1: both spellings accepted, the correct one wins.
24
- const onchange = $derived(onChange ?? onchangeLegacy);
25
- const oncomplete = $derived(onComplete ?? oncompleteLegacy);
26
- const oninput = $derived(onInput ?? oninputLegacy);
27
-
28
20
  let fieldCount = $derived(typeof fields !== 'undefined' ? fields.length : length);
29
21
 
30
22
  let fieldConfigs: FieldConfig[] = $derived(
@@ -252,9 +244,9 @@
252
244
  disable={disabled}
253
245
  actionInput={true}
254
246
  classes="field-group-input"
255
- onInput={(v) => handleFieldInput(index, v)}
256
- onKeyDown={(e) => handleKeyDown(e, index)}
257
- onPaste={(e) => handlePaste(e, index)}
247
+ oninput={(v) => handleFieldInput(index, v)}
248
+ onkeydown={(e) => handleKeyDown(e, index)}
249
+ onpaste={(e) => handlePaste(e, index)}
258
250
  bind:this={inputRefs[index]}
259
251
  />
260
252
  {#if typeof config.label === 'string'}
@@ -15,9 +15,6 @@ export type OptionalSplitInputProperties = {
15
15
  };
16
16
  export type SplitInputEventProperties = {
17
17
  onchange?: (values: string[]) => void;
18
- onChange?: (values: string[]) => void;
19
18
  oninput?: (values: string[]) => void;
20
- onInput?: (values: string[]) => void;
21
19
  oncomplete?: (values: string[]) => void;
22
- onComplete?: (values: string[]) => void;
23
20
  };
@@ -21,7 +21,7 @@
21
21
  testId,
22
22
  classes,
23
23
  onclick,
24
- onCheckboxChange
24
+ oncheckboxchange
25
25
  }: StatCardProperties = $props();
26
26
 
27
27
  const isInteractive = $derived(typeof onclick === 'function');
@@ -67,7 +67,7 @@
67
67
  };
68
68
 
69
69
  const handleCheckboxChange = (checked: boolean): void => {
70
- onCheckboxChange?.(checked);
70
+ oncheckboxchange?.(checked);
71
71
  };
72
72
 
73
73
  /**
@@ -142,5 +142,5 @@ export type StatCardEventProperties = {
142
142
  /** Makes the card interactive: adds `role="button"`, `tabindex=0`, and wires click/Enter/Space. */
143
143
  onclick?: (event: MouseEvent) => void;
144
144
  /** Fired when the header checkbox changes. */
145
- onCheckboxChange?: (checked: boolean) => void;
145
+ oncheckboxchange?: (checked: boolean) => void;
146
146
  };
@@ -33,8 +33,7 @@
33
33
  statusDescription = '',
34
34
  buttonProperties,
35
35
  classes,
36
- onbuttonClick: onbuttonClickLegacy,
37
- onButtonClick,
36
+ onbuttonclick,
38
37
  icon,
39
38
  descriptionSnippet,
40
39
  children,
@@ -46,9 +45,6 @@
46
45
  const statusIconFallback = $derived(
47
46
  statusIcon === LEGACY_DEFAULT_STATUS_ICON ? BUILTIN_STATUS_ICON : null
48
47
  );
49
-
50
- // Event-casing phase 1: both spellings accepted, the correct one wins.
51
- const onbuttonClick = $derived(onButtonClick ?? onbuttonClickLegacy);
52
48
  </script>
53
49
 
54
50
  <div
@@ -78,7 +74,7 @@
78
74
  {/if}
79
75
  </div>
80
76
  {#if typeof buttonProperties === 'object'}
81
- <Button {...buttonProperties} onclick={onbuttonClick} />
77
+ <Button {...buttonProperties} onclick={onbuttonclick} />
82
78
  {/if}
83
79
  {#if typeof children === 'function'}
84
80
  {@render children()}
@@ -55,6 +55,5 @@ export type StatusProperties = StatusEventProperties & {
55
55
  testId?: string;
56
56
  };
57
57
  export type StatusEventProperties = {
58
- onbuttonClick?: () => void;
59
- onButtonClick?: () => void;
58
+ onbuttonclick?: () => void;
60
59
  };
@@ -10,16 +10,9 @@
10
10
  testId,
11
11
  suppressRoleAndTabindex,
12
12
  suppressContainerTestId,
13
- onstepclick: onstepclickLegacy,
14
- onStepClick,
15
- onhandleStepClick: onhandleStepClickLegacy,
16
- onHandleStepClick
13
+ onhandlestepclick
17
14
  }: StepperProperties = $props();
18
15
 
19
- // Event-casing phase 1: both spellings accepted, the correct one wins.
20
- const onhandleStepClick = $derived(onHandleStepClick ?? onhandleStepClickLegacy);
21
- const onstepclick = $derived(onStepClick ?? onstepclickLegacy);
22
-
23
16
  const resolveStatus = (stepIndex: number, explicitStatus: StepStatus | null): StepStatus => {
24
17
  if (explicitStatus !== null) {
25
18
  return explicitStatus;
@@ -33,9 +26,6 @@
33
26
  return 'pending';
34
27
  };
35
28
 
36
- // Support the deprecated onhandleStepClick alias — onstepclick takes priority.
37
- const effectiveStepClick = $derived(onstepclick ?? onhandleStepClick);
38
-
39
29
  // Per-step ids always derive from testId, even when the container itself is
40
30
  // opted out of claiming it — only the container's own data-pw/testID is suppressed.
41
31
  const containerTestId = $derived(
@@ -61,7 +51,7 @@
61
51
  : ''} {effectiveStatus === 'completed' ? 'completed-step' : ''}"
62
52
  >
63
53
  <Step
64
- onclick={effectiveStepClick}
54
+ onclick={onhandlestepclick}
65
55
  label={currentStep.label}
66
56
  icon={currentStep.icon}
67
57
  stepIndex={stepIndex + 1}
@@ -52,17 +52,7 @@ export type OptionalStepperProperties = {
52
52
  suppressContainerTestId?: boolean;
53
53
  };
54
54
  export type StepperEventProperties = {
55
- onstepclick?: (event: {
56
- selectedIndex: number;
57
- }) => void;
58
- onStepClick?: (event: {
59
- selectedIndex: number;
60
- }) => void;
61
- /** @deprecated Use `onstepclick` instead. */
62
- onhandleStepClick?: (event: {
63
- selectedIndex: number;
64
- }) => void;
65
- onHandleStepClick?: (event: {
55
+ onhandlestepclick?: (event: {
66
56
  selectedIndex: number;
67
57
  }) => void;
68
58
  };
@@ -84,9 +74,6 @@ export type StepEventProperties = {
84
74
  onclick?: (event: {
85
75
  selectedIndex: number;
86
76
  }) => void;
87
- onClick?: (event: {
88
- selectedIndex: number;
89
- }) => void;
90
77
  onkeydown?: (event: KeyboardEvent) => void;
91
78
  };
92
79
  export type StepProperties = OptionalStepProperties & StepEventProperties & {
@@ -352,7 +352,7 @@
352
352
  : null}
353
353
  onErrorMessage={inputData.onErrorMessage ?? null}
354
354
  actionInput={false}
355
- onInput={(newValue) => column.onInput?.(rowIndex, newValue, originalIndex)}
355
+ oninput={(newValue) => column.onInput?.(rowIndex, newValue, originalIndex)}
356
356
  {...inputData.iconUrl ? { leftIcon: inputLeadingIcon } : {}}
357
357
  />
358
358
  </span>
@@ -36,16 +36,15 @@
36
36
  sortDefaultIcon,
37
37
  cell,
38
38
  empty,
39
- onRowClick,
40
- onSort,
41
- onCellChange: _onCellChange,
39
+ onrowclick,
40
+ onsort,
42
41
  classes,
43
42
  paginatorSlot,
44
43
  getRowTestId,
45
44
  getCellTestId,
46
45
  checkboxSelection,
47
46
  searchConfig,
48
- onSearchChange,
47
+ onsearchchange,
49
48
  pagination,
50
49
  toolbarSlot,
51
50
  rowNumberColumn = false,
@@ -111,12 +110,12 @@
111
110
  sortColumn = colIndex;
112
111
  sortDirection = 'asc';
113
112
  }
114
- onSort?.(colIndex, sortDirection);
113
+ onsort?.(colIndex, sortDirection);
115
114
  };
116
115
 
117
116
  // ─── Row click ───────────────────────────────────────────────────────────────
118
117
  const handleRowClick = (rowIndex: number, rowData: JSONValue[], originalIndex: number): void => {
119
- onRowClick?.(rowIndex, rowData, originalIndex);
118
+ onrowclick?.(rowIndex, rowData, originalIndex);
120
119
  };
121
120
 
122
121
  const handleRowKeydown = (
@@ -127,11 +126,11 @@
127
126
  ): void => {
128
127
  if (event.key === 'Enter' || event.key === ' ') {
129
128
  event.preventDefault();
130
- onRowClick?.(rowIndex, rowData, originalIndex);
129
+ onrowclick?.(rowIndex, rowData, originalIndex);
131
130
  }
132
131
  };
133
132
 
134
- let isRowClickable = $derived(typeof onRowClick === 'function');
133
+ let isRowClickable = $derived(typeof onrowclick === 'function');
135
134
  let isStickyHeader = $derived(stickyHeader || isTableScrollable);
136
135
 
137
136
  // ─── Horizontal-scroll affordance ────────────────────────────────────────
@@ -168,7 +167,7 @@
168
167
  // ─── C2-3: Search ─────────────────────────────────────────────────────────
169
168
  let searchTerm = $state('');
170
169
  let hasSearchConfig = $derived(!!searchConfig);
171
- let isServerSearch = $derived(typeof onSearchChange === 'function');
170
+ let isServerSearch = $derived(typeof onsearchchange === 'function');
172
171
  let searchInputRef = $state<HTMLInputElement | null>(null);
173
172
  let inlineSearchInputRef = $state<{ focus: () => void } | null>(null);
174
173
  let inlineSearchTriggerRef = $state<HTMLElement | null>(null);
@@ -180,7 +179,7 @@
180
179
  pageOverride = 1;
181
180
  pagination?.onPageChange?.(1);
182
181
  if (isServerSearch) {
183
- onSearchChange?.(term);
182
+ onsearchchange?.(term);
184
183
  }
185
184
  };
186
185
 
@@ -217,7 +216,7 @@
217
216
 
218
217
  // The expanded guard matters: collapsing unmounts the focused input, which can
219
218
  // fire blur on the way out. Without it, an Escape (or close-button) collapse
220
- // re-enters clearSearch and fires a second onSearchChange('') — a duplicate
219
+ // re-enters clearSearch and fires a second onsearchchange('') — a duplicate
221
220
  // request on the server-search path.
222
221
  const collapseInlineSearchIfEmpty = (): void => {
223
222
  if (isInlineSearchExpanded && searchTerm.trim() === '') {
@@ -305,7 +304,7 @@
305
304
  });
306
305
 
307
306
  /**
308
- * Client-side filtered rows. When `onSearchChange` is provided (server
307
+ * Client-side filtered rows. When `onsearchchange` is provided (server
309
308
  * delegation) or `searchConfig` is absent, the sorted data passes through
310
309
  * untouched.
311
310
  */
@@ -406,7 +405,7 @@
406
405
  /**
407
406
  * Offset that converts the render loop's page-local index back into an index
408
407
  * into the consumer-supplied rows. Client-mode pagination slices internally,
409
- * so page 2+ would otherwise hand handlers (onRowClick, column handlers,
408
+ * so page 2+ would otherwise hand handlers (onrowclick, column handlers,
410
409
  * cell snippets, test-id callbacks) an index that mis-addresses the
411
410
  * consumer's full array. Server mode supplies the current page as the whole
412
411
  * array, so no offset applies.
@@ -837,9 +836,9 @@
837
836
  testId={searchConfig?.testId ?? ''}
838
837
  ariaLabel={searchConfig?.placeholder ?? 'Search'}
839
838
  autoComplete="off"
840
- onInput={(value: string) => updateSearch(value)}
841
- onBlur={collapseInlineSearchIfEmpty}
842
- onKeyDown={handleInlineSearchKeyDown}
839
+ oninput={(value: string) => updateSearch(value)}
840
+ onblur={collapseInlineSearchIfEmpty}
841
+ onkeydown={handleInlineSearchKeyDown}
843
842
  classes="table-inline-search-input"
844
843
  />
845
844
  <span class="table-inline-search-clear">
@@ -1077,7 +1076,7 @@
1077
1076
  prevButtonTestId={pagination.prevButtonTestId}
1078
1077
  nextButtonTestId={pagination.nextButtonTestId}
1079
1078
  onchange={handlePageChange}
1080
- onLoadMore={pagination.onLoadMore}
1079
+ onloadmore={pagination.onLoadMore}
1081
1080
  />
1082
1081
  {/if}
1083
1082
  </span>
@@ -526,44 +526,12 @@ export type OptionalTableProperties = {
526
526
  searchConfig?: TableSearchConfig;
527
527
  };
528
528
  export type TableEventProperties = {
529
- onRowClick?: (rowIndex: number, rowData: JSONValue[], originalIndex: number) => void;
530
- onSort?: (columnIndex: number, direction: SortDirection) => void;
531
- /**
532
- * C2-2: Callback invoked when a cell value changes via an editable element
533
- * inside the consumer's `cell` snippet (e.g. an `<Input>` or `<Select>`).
534
- *
535
- * **How to wire it**: Svelte 5 snippets execute in the consumer's scope, so
536
- * `onCellChange` is NOT forwarded by Table — you must close over your own
537
- * handler directly inside the snippet:
538
- *
539
- * ```svelte
540
- * <script>
541
- * let rows = $state(myData);
542
- * const handleCellChange = (rowIndex, colIndex, newValue) => {
543
- * rows[rowIndex][colIndex] = newValue;
544
- * };
545
- * </script>
546
- *
547
- * <Table tableData={rows}>
548
- * {#snippet cell(value, rowIndex, colIndex)}
549
- * <Input
550
- * value={String(value ?? '')}
551
- * onInput={(newValue) => handleCellChange(rowIndex, colIndex, newValue)}
552
- * />
553
- * {/snippet}
554
- * </Table>
555
- * ```
556
- *
557
- * Table never mutates `tableData`; the consumer owns the source-of-truth
558
- * array. Pass `onCellChange` as a top-level prop if you want Table to expose
559
- * this handler to parent components via the standard props channel — it does
560
- * not change the wiring inside the snippet.
561
- */
562
- onCellChange?: (rowIndex: number, colIndex: number, newValue: JSONValue) => void;
529
+ onrowclick?: (rowIndex: number, rowData: JSONValue[], originalIndex: number) => void;
530
+ onsort?: (columnIndex: number, direction: SortDirection) => void;
563
531
  /**
564
532
  * C2-3: When provided, the built-in client-side filtering is disabled and
565
533
  * this callback is called on every search input change instead, letting the
566
534
  * server decide what rows to show.
567
535
  */
568
- onSearchChange?: (searchTerm: string) => void;
536
+ onsearchchange?: (searchTerm: string) => void;
569
537
  };
@@ -18,16 +18,10 @@
18
18
  scrollRightIcon,
19
19
  tab,
20
20
  classes,
21
- onchange: onchangeLegacy,
22
- onChange,
23
- onkeychange: onkeychangeLegacy,
24
- onKeyChange
21
+ onchange,
22
+ onkeychange
25
23
  }: TabsProperties = $props();
26
24
 
27
- // Event-casing phase 1: both spellings accepted, the correct one wins.
28
- const onchange = $derived(onChange ?? onchangeLegacy);
29
- const onkeychange = $derived(onKeyChange ?? onkeychangeLegacy);
30
-
31
25
  const isVertical = $derived(orientation === 'vertical');
32
26
 
33
27
  const isObjectMode = $derived(items.length > 0 && typeof items.at(0) === 'object');
@@ -55,7 +55,5 @@ export type OptionalTabsProperties = {
55
55
  };
56
56
  export type TabsEventProperties = {
57
57
  onchange?: (index: number, label: string) => void;
58
- onChange?: (index: number, label: string) => void;
59
58
  onkeychange?: (key: string) => void;
60
- onKeyChange?: (key: string) => void;
61
59
  };
@@ -4,10 +4,7 @@
4
4
  import Button from '../Button/Button.svelte';
5
5
  import type { TaskListProperties } from './properties';
6
6
 
7
- let { rows, onretry: onretryLegacy, onRetry, testId, classes }: TaskListProperties = $props();
8
-
9
- // Event-casing phase 1: both spellings accepted, the correct one wins.
10
- const onretry = $derived(onRetry ?? onretryLegacy);
7
+ let { rows, onretry, testId, classes }: TaskListProperties = $props();
11
8
 
12
9
  // Rows appended in one update stagger relative to the batch, not the list start —
13
10
  // mirrors ThinkingTrace's growthWatcher so a host that streams rows in gets the
@@ -19,7 +19,6 @@ export type MandatoryTaskListProperties = {
19
19
  export type OptionalTaskListProperties = {
20
20
  /** Fires when a failed row's retry button is clicked, with that row's index. */
21
21
  onretry?: (index: number) => void;
22
- onRetry?: (index: number) => void;
23
22
  testId?: string;
24
23
  classes?: string;
25
24
  };
@@ -30,13 +30,9 @@
30
30
  storageKey = 'theme-preference',
31
31
  testId,
32
32
  classes,
33
- onchange: onchangeLegacy,
34
- onChange
33
+ onchange
35
34
  }: ThemeSwitcherProperties = $props();
36
35
 
37
- // Event-casing phase 1: both spellings accepted, the correct one wins.
38
- const onchange = $derived(onChange ?? onchangeLegacy);
39
-
40
36
  let currentValue: string = $state(value ?? 'system');
41
37
  let systemPreference: string = $state('light');
42
38
 
@@ -16,5 +16,4 @@ export type OptionalThemeSwitcherProperties = {
16
16
  };
17
17
  export type ThemeSwitcherEventProperties = {
18
18
  onchange?: (value: string, resolvedValue: string) => void;
19
- onChange?: (value: string, resolvedValue: string) => void;
20
19
  };
@@ -12,7 +12,7 @@
12
12
  expanded = $bindable(false),
13
13
  variant = 'default',
14
14
  showElapsed = false,
15
- onToggle,
15
+ ontoggle,
16
16
  avatar,
17
17
  toggleIcon,
18
18
  testId,
@@ -27,17 +27,11 @@
27
27
  moreLabel,
28
28
  selectable = false,
29
29
  selected = $bindable(null),
30
- onrowselect: onrowselectLegacy,
31
- onRowSelect,
32
- onsettled: onsettledLegacy,
33
- onSettled,
30
+ onrowselect,
31
+ onsettled,
34
32
  collapseDelayMs = 2600
35
33
  }: ThinkingIndicatorProperties = $props();
36
34
 
37
- // Event-casing phase 1: both spellings accepted, the correct one wins.
38
- const onrowselect = $derived(onRowSelect ?? onrowselectLegacy);
39
- const onsettled = $derived(onSettled ?? onsettledLegacy);
40
-
41
35
  // `rows` being present at all (even `[]`) puts the indicator into trace mode: the
42
36
  // Accordion body renders the kind-aware trace instead of the `detail` paragraph,
43
37
  // and that alone is enough to make the indicator expandable.
@@ -68,7 +62,7 @@
68
62
  const handleToggle = (): void => {
69
63
  manuallyToggled = true;
70
64
  expanded = !expanded;
71
- onToggle?.();
65
+ ontoggle?.();
72
66
  };
73
67
 
74
68
  // Elapsed counter: ticks while the label is live (see `labelIsBusy`); freezes at its
@@ -43,7 +43,7 @@ export type OptionalThinkingIndicatorProperties = {
43
43
  * shape). No effect on the `bare` or `chip` variants.
44
44
  */
45
45
  showElapsed?: boolean;
46
- onToggle?: () => void;
46
+ ontoggle?: () => void;
47
47
  /** Leading indicator. Falls back to the built-in `Loader` spinner. */
48
48
  avatar?: Snippet;
49
49
  /** Disclosure chevron. Falls back to a built-in chevron that rotates on expand. */
@@ -83,10 +83,8 @@ export type OptionalThinkingIndicatorProperties = {
83
83
  /** Bindable index of the selected coding row (`null` = none). */
84
84
  selected?: number | null;
85
85
  onrowselect?: (index: number | null) => void;
86
- onRowSelect?: (index: number | null) => void;
87
86
  /** Fires exactly once, the moment `busy` flips false. No effect while `busy` is never set. */
88
87
  onsettled?: () => void;
89
- onSettled?: () => void;
90
88
  /**
91
89
  * Delay (ms) before the automatic post-settle collapse fires once `busy` flips
92
90
  * false. `null` disables the automatic collapse. Has no effect while `busy` is
@@ -22,7 +22,7 @@
22
22
  messageTestId,
23
23
  subTextTestId,
24
24
  closeIconTestId,
25
- onToastHide,
25
+ ontoasthide,
26
26
  bottomContent,
27
27
  classes
28
28
  }: ToastProperties = $props();
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  function handleAnimationEnd() {
43
- onToastHide?.();
43
+ ontoasthide?.();
44
44
  }
45
45
 
46
46
  function getAnimationConfig(
@@ -24,6 +24,6 @@ export type OptionalToastProperties = {
24
24
  classes?: string;
25
25
  };
26
26
  export type ToastEventProperties = {
27
- onToastHide?: () => void;
27
+ ontoasthide?: () => void;
28
28
  };
29
29
  export type ToastProperties = MandatoryToastProperties & OptionalToastProperties & ToastEventProperties;
@@ -10,13 +10,9 @@
10
10
  id,
11
11
  ariaLabel,
12
12
  ariaLabelledby,
13
- onclick: onclickLegacy,
14
- onClick
13
+ onclick
15
14
  }: ToggleProperties = $props();
16
15
 
17
- // Event-casing phase 1: both spellings accepted, the correct one wins.
18
- const onclick = $derived(onClick ?? onclickLegacy);
19
-
20
16
  // Stable across hydration so the hidden input stays named and text remains clickable.
21
17
  const generatedId = $props.id();
22
18
  const inputId = $derived(id?.trim() || `toggle-${generatedId}`);
@@ -22,5 +22,4 @@ export type OptionalToggleProperties = {
22
22
  };
23
23
  export type ToggleEventProperties = {
24
24
  onclick?: (checked: boolean) => void;
25
- onClick?: (checked: boolean) => void;
26
25
  };
@@ -6,16 +6,7 @@
6
6
  import { computeMenuDropdownPosition } from '../Menu/dropdownPosition';
7
7
  import type { ToolCallChip, ToolCallLogProperties } from './properties';
8
8
 
9
- let {
10
- chips,
11
- onchipclick: onchipclickLegacy,
12
- onChipClick,
13
- testId,
14
- classes
15
- }: ToolCallLogProperties = $props();
16
-
17
- // Event-casing phase 1: both spellings accepted, the correct one wins.
18
- const onchipclick = $derived(onChipClick ?? onchipclickLegacy);
9
+ let { chips, onchipclick, testId, classes }: ToolCallLogProperties = $props();
19
10
 
20
11
  // Exactly one popover open at a time, component-local.
21
12
  let openIndex = $state<number | null>(null);
@@ -22,7 +22,6 @@ export type MandatoryToolCallLogProperties = {
22
22
  };
23
23
  export type OptionalToolCallLogProperties = {
24
24
  onchipclick?: (index: number, chip: ToolCallChip) => void;
25
- onChipClick?: (index: number, chip: ToolCallChip) => void;
26
25
  testId?: string;
27
26
  classes?: string;
28
27
  };
@@ -11,16 +11,12 @@
11
11
  rightContent,
12
12
  additionalContent,
13
13
  classes,
14
- onbackClick: onbackClickLegacy,
15
- onBackClick,
14
+ onbackclick,
16
15
  onkeydown,
17
16
  testId,
18
17
  headingTestId
19
18
  }: ToolbarProperties = $props();
20
19
 
21
- // Event-casing phase 1: both spellings accepted, the correct one wins.
22
- const onbackClick = $derived(onBackClick ?? onbackClickLegacy);
23
-
24
20
  // `backIcon={null}` (or '') has always meant "render no back control at all", and consumers
25
21
  // rely on it; only the DEFAULT changes, from a CDN image to the inline icon.
26
22
  const showBackControl = $derived(showBackButton && backIcon !== null && backIcon !== '');
@@ -42,7 +38,7 @@
42
38
  type="button"
43
39
  class="back"
44
40
  aria-label={backAccessibleName}
45
- onclick={onbackClick}
41
+ onclick={onbackclick}
46
42
  {onkeydown}
47
43
  >
48
44
  {#if typeof backIcon === 'string'}
@@ -13,7 +13,6 @@ export type ToolbarProperties = ToolbarEventProperties & {
13
13
  headingTestId?: string;
14
14
  };
15
15
  export type ToolbarEventProperties = {
16
- onbackClick?: () => void;
17
- onBackClick?: () => void;
16
+ onbackclick?: () => void;
18
17
  onkeydown?: (event: KeyboardEvent) => void;
19
18
  };
@@ -9,7 +9,7 @@
9
9
  renderText,
10
10
  variableDelay,
11
11
  resolveDelay,
12
- onProgress,
12
+ onprogress,
13
13
  renderCharacter,
14
14
  testId,
15
15
  classes
@@ -87,7 +87,7 @@
87
87
  }
88
88
  displayedText = text.substring(0, currentIndex + 1);
89
89
  currentIndex++;
90
- onProgress?.({ index: currentIndex, total: text.length, displayedText });
90
+ onprogress?.({ index: currentIndex, total: text.length, displayedText });
91
91
  timeoutId = setTimeout(
92
92
  typeNextCharacter,
93
93
  resolveTypingDelay(revealedCharacter, revealedCharacterIndex)
@@ -141,7 +141,7 @@
141
141
  currentIndex = text.length;
142
142
  revealedWordCount = countWhitespace(text);
143
143
  if (hadRemainingText) {
144
- onProgress?.({ index: currentIndex, total: text.length, displayedText });
144
+ onprogress?.({ index: currentIndex, total: text.length, displayedText });
145
145
  }
146
146
  }
147
147
  });
@@ -105,7 +105,7 @@ export type OptionalTypewriterTextProperties = {
105
105
  * `false` while text remains, since the rest appears at once) — scroll a container to
106
106
  * follow the reveal, or show how far along it is. Not called when omitted.
107
107
  */
108
- onProgress?: (progress: TypewriterProgress) => void;
108
+ onprogress?: (progress: TypewriterProgress) => void;
109
109
  /**
110
110
  * Render each revealed character yourself — highlight a token, wrap a number — instead
111
111
  * of the plain text node. Ignored when `renderText` is set, since that renderer already