@juspay/svelte-ui-components 2.80.1 → 2.80.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 (50) hide show
  1. package/dist/Badge/Badge.svelte +1 -1
  2. package/dist/Banner/Banner.svelte +1 -1
  3. package/dist/Book/Book.svelte +1 -1
  4. package/dist/Browser/Browser.svelte +3 -3
  5. package/dist/Button/Button.svelte +1 -1
  6. package/dist/Calendar/Calendar.svelte +2 -2
  7. package/dist/Card/Card.svelte +1 -1
  8. package/dist/Checkbox/Checkbox.svelte +1 -1
  9. package/dist/Choicebox/Choicebox.svelte +1 -1
  10. package/dist/ColorPicker/ColorPicker.svelte +8 -5
  11. package/dist/Combobox/Combobox.svelte +2 -2
  12. package/dist/CommandMenu/CommandMenu.svelte +3 -3
  13. package/dist/ContextMenu/ContextMenu.svelte +1 -1
  14. package/dist/DateRangePicker/DateRangePicker.svelte +9 -9
  15. package/dist/FileInput/FileInput.svelte +1 -1
  16. package/dist/GridItem/GridItem.svelte +2 -2
  17. package/dist/Input/Input.svelte +5 -5
  18. package/dist/InputButton/InputButton.svelte +6 -3
  19. package/dist/KeyValue/KeyValue.svelte +129 -0
  20. package/dist/KeyValue/KeyValue.svelte.d.ts +4 -0
  21. package/dist/KeyValue/properties.d.ts +52 -0
  22. package/dist/KeyValue/properties.js +1 -0
  23. package/dist/KeyboardInput/KeyboardInput.svelte +1 -1
  24. package/dist/Menu/Menu.svelte +1 -1
  25. package/dist/Modal/Modal.svelte +3 -3
  26. package/dist/Pagination/Pagination.svelte +1 -1
  27. package/dist/PieChart/PieChart.svelte +1 -1
  28. package/dist/Progress/Progress.svelte +2 -2
  29. package/dist/ProportionBar/ProportionBar.svelte +2 -2
  30. package/dist/SankeyChart/SankeyChart.svelte +27 -3
  31. package/dist/SankeyChart/properties.d.ts +1 -0
  32. package/dist/Select/Select.svelte +3 -3
  33. package/dist/Sheet/Sheet.svelte +1 -1
  34. package/dist/Shimmer/Shimmer.svelte +1 -1
  35. package/dist/Slider/Slider.svelte +2 -2
  36. package/dist/Snippet/Snippet.svelte +2 -2
  37. package/dist/SplitButton/SplitButton.svelte +8 -2
  38. package/dist/StatCard/StatCard.svelte +4 -4
  39. package/dist/Table/Table.svelte +4 -4
  40. package/dist/ThemeSwitcher/ThemeSwitcher.svelte +4 -4
  41. package/dist/Toast/Toast.svelte +1 -1
  42. package/dist/Tooltip/Tooltip.svelte +2 -2
  43. package/dist/Tooltip/tooltip-action.js +1 -1
  44. package/dist/_chart/ChartContainer.svelte +5 -2
  45. package/dist/_chart/ChartTooltip.svelte +1 -1
  46. package/dist/_chart/geometry.js +6 -2
  47. package/dist/_chart/types.d.ts +1 -0
  48. package/dist/index.d.ts +2 -0
  49. package/dist/index.js +1 -0
  50. package/package.json +1 -1
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  .icon-img {
90
- border-radius: var(--badge-img-border-radius, 6px);
90
+ border-radius: var(--badge-img-border-radius, var(--radius, 4px));
91
91
  width: var(--badge-img-width, 64px);
92
92
  height: var(--badge-img-height, 64px);
93
93
  object-fit: var(--badge-object-fit, contain);
@@ -169,7 +169,7 @@
169
169
  --button-color: transparent;
170
170
  --button-border: none;
171
171
  --button-padding: 2px;
172
- --button-border-radius: var(--banner-dismiss-border-radius, 4px);
172
+ --button-border-radius: var(--banner-dismiss-border-radius, var(--radius, 4px));
173
173
  --button-text-color: var(--banner-dismiss-color, currentColor);
174
174
  --button-hover-color: var(--banner-dismiss-hover-background, rgba(0, 0, 0, 0.1));
175
175
  --cursor: inherit;
@@ -179,7 +179,7 @@
179
179
  .book {
180
180
  width: var(--book-width, 100%);
181
181
  background-color: var(--book-background, #ffffff);
182
- border-radius: var(--book-border-radius, 8px);
182
+ border-radius: var(--book-border-radius, var(--radius, 4px));
183
183
  border: var(--book-border, 1px solid #e0e0e0);
184
184
  outline: none;
185
185
  }
@@ -65,7 +65,7 @@
65
65
  }
66
66
 
67
67
  .browser.rounded {
68
- border-radius: var(--browser-border-radius, 12px);
68
+ border-radius: var(--browser-border-radius, var(--radius, 4px));
69
69
  }
70
70
 
71
71
  .browser.shadow {
@@ -148,7 +148,7 @@
148
148
 
149
149
  .tab {
150
150
  padding: var(--browser-tab-padding, 6px 16px);
151
- border-radius: var(--browser-tab-border-radius, 8px 8px 0 0);
151
+ border-radius: var(--browser-tab-border-radius, var(--radius, 4px) var(--radius, 4px) 0 0);
152
152
  font-size: var(--browser-tab-font-size, 13px);
153
153
  font-family: var(--browser-tab-font-family, inherit);
154
154
  white-space: nowrap;
@@ -167,7 +167,7 @@
167
167
  gap: 8px;
168
168
  padding: 0 12px;
169
169
  height: var(--browser-addressbar-height, 32px);
170
- border-radius: var(--browser-addressbar-border-radius, 6px);
170
+ border-radius: var(--browser-addressbar-border-radius, var(--radius, 4px));
171
171
  font-size: var(--browser-addressbar-font-size, 13px);
172
172
  font-family: var(--browser-addressbar-font-family, inherit);
173
173
  }
@@ -96,7 +96,7 @@
96
96
  height: var(--button-height, fit-content);
97
97
  padding: var(--button-padding, 16px);
98
98
  margin: var(--button-margin);
99
- border-radius: var(--button-border-radius, 0px);
99
+ border-radius: var(--button-border-radius, var(--radius, 4px));
100
100
  width: var(--button-width, fit-content);
101
101
  cursor: var(--cursor, pointer);
102
102
  opacity: var(--opacity, 1);
@@ -358,7 +358,7 @@
358
358
  padding: var(--calendar-padding, 16px);
359
359
  background-color: var(--calendar-background, #ffffff);
360
360
  border: var(--calendar-border, 1px solid #e0e0e0);
361
- border-radius: var(--calendar-border-radius, 8px);
361
+ border-radius: var(--calendar-border-radius, var(--radius, 4px));
362
362
  box-shadow: var(--calendar-box-shadow, none);
363
363
  box-sizing: border-box;
364
364
  user-select: none;
@@ -387,7 +387,7 @@
387
387
  --button-height: var(--calendar-nav-button-size, 32px);
388
388
  --button-border: none;
389
389
  --button-color: transparent;
390
- --button-border-radius: var(--calendar-nav-button-border-radius, 4px);
390
+ --button-border-radius: var(--calendar-nav-button-border-radius, var(--radius, 4px));
391
391
  --button-text-color: var(--calendar-nav-button-color, #666666);
392
392
  --button-padding: 0;
393
393
  --button-hover-color: var(--calendar-nav-button-hover-background, #f0f0f0);
@@ -90,7 +90,7 @@
90
90
  .card {
91
91
  background: var(--card-background, inherit);
92
92
  border: var(--card-border, 1px solid currentColor);
93
- border-radius: var(--card-border-radius, 8px);
93
+ border-radius: var(--card-border-radius, var(--radius, 4px));
94
94
  overflow: var(--card-overflow, hidden);
95
95
  color: inherit;
96
96
  cursor: var(--card-cursor, inherit);
@@ -106,7 +106,7 @@
106
106
  width: var(--checkbox-size, 20px);
107
107
  height: var(--checkbox-size, 20px);
108
108
  border: var(--checkbox-border, 2px solid #757575);
109
- border-radius: var(--checkbox-border-radius, 3px);
109
+ border-radius: var(--checkbox-border-radius, var(--radius, 4px));
110
110
  background-color: var(--checkbox-background, transparent);
111
111
  transition:
112
112
  background-color var(--checkbox-transition, 0.2s),
@@ -54,7 +54,7 @@
54
54
  align-items: var(--choicebox-align-items, center);
55
55
  padding: var(--choicebox-padding, 16px);
56
56
  border: var(--choicebox-border, 2px solid #d0d0d0);
57
- border-radius: var(--choicebox-border-radius, 12px);
57
+ border-radius: var(--choicebox-border-radius, var(--radius, 4px));
58
58
  background: var(--choicebox-background, #ffffff);
59
59
  gap: var(--choicebox-gap, 12px);
60
60
  cursor: var(--choicebox-cursor, pointer);
@@ -336,7 +336,10 @@
336
336
  .color-picker-swatch-btn {
337
337
  --button-color: var(--color-picker-swatch-btn-background, #f9fafb);
338
338
  --button-border: var(--color-picker-swatch-btn-border, 1px solid #d1d5db);
339
- --button-border-radius: var(--color-picker-swatch-btn-border-radius, 10px 0 0 10px);
339
+ --button-border-radius: var(
340
+ --color-picker-swatch-btn-border-radius,
341
+ var(--radius, 4px) 0 0 var(--radius, 4px)
342
+ );
340
343
  --button-hover-color: var(--color-picker-swatch-btn-hover-background, #f3f4f6);
341
344
  --button-padding: var(--color-picker-swatch-padding, 5px);
342
345
  --button-width: fit-content;
@@ -344,14 +347,14 @@
344
347
  }
345
348
 
346
349
  .color-picker-swatch-btn.standalone {
347
- --button-border-radius: var(--color-picker-swatch-btn-border-radius, 10px);
350
+ --button-border-radius: var(--color-picker-swatch-btn-border-radius, var(--radius, 4px));
348
351
  }
349
352
 
350
353
  .color-picker-checkerboard {
351
354
  display: block;
352
355
  width: var(--color-picker-swatch-size, 26px);
353
356
  height: var(--color-picker-swatch-size, 26px);
354
- border-radius: var(--color-picker-swatch-border-radius, 5px);
357
+ border-radius: var(--color-picker-swatch-border-radius, var(--radius, 4px));
355
358
  overflow: hidden;
356
359
  background-image:
357
360
  linear-gradient(45deg, #ccc 25%, transparent 25%),
@@ -414,7 +417,7 @@
414
417
  padding: var(--color-picker-popover-padding, 12px);
415
418
  background: var(--color-picker-popover-background, #ffffff);
416
419
  border: var(--color-picker-popover-border, 1px solid #e5e7eb);
417
- border-radius: var(--color-picker-popover-border-radius, 12px);
420
+ border-radius: var(--color-picker-popover-border-radius, var(--radius, 4px));
418
421
  box-shadow: var(
419
422
  --color-picker-popover-shadow,
420
423
  0 4px 24px rgba(0, 0, 0, 0.12),
@@ -432,7 +435,7 @@
432
435
  position: relative;
433
436
  width: 100%;
434
437
  aspect-ratio: 1 / 0.7;
435
- border-radius: var(--color-picker-panel-border-radius, 8px);
438
+ border-radius: var(--color-picker-panel-border-radius, var(--radius, 4px));
436
439
  cursor: crosshair;
437
440
  overflow: hidden;
438
441
  user-select: none;
@@ -313,7 +313,7 @@
313
313
  align-items: center;
314
314
  background: var(--combobox-input-background, #ffffff);
315
315
  border: var(--combobox-input-border, 1px solid #cccccc);
316
- border-radius: var(--combobox-input-border-radius, 6px);
316
+ border-radius: var(--combobox-input-border-radius, var(--radius, 4px));
317
317
  transition: var(--combobox-input-transition, border-color 0.15s, box-shadow 0.15s);
318
318
  }
319
319
 
@@ -369,7 +369,7 @@
369
369
  margin-top: var(--combobox-dropdown-gap, 4px);
370
370
  background: var(--combobox-dropdown-background, #ffffff);
371
371
  border: var(--combobox-dropdown-border, 1px solid #cccccc);
372
- border-radius: var(--combobox-dropdown-border-radius, 6px);
372
+ border-radius: var(--combobox-dropdown-border-radius, var(--radius, 4px));
373
373
  box-shadow: var(--combobox-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
374
374
  max-height: var(--combobox-dropdown-max-height, 200px);
375
375
  overflow-y: auto;
@@ -298,7 +298,7 @@
298
298
 
299
299
  .command-menu-dialog {
300
300
  background-color: var(--command-menu-background, #ffffff);
301
- border-radius: var(--command-menu-border-radius, 12px);
301
+ border-radius: var(--command-menu-border-radius, var(--radius, 4px));
302
302
  box-shadow: var(--command-menu-box-shadow, 0 16px 70px rgba(0, 0, 0, 0.2));
303
303
  width: var(--command-menu-width, 560px);
304
304
  max-width: var(--command-menu-max-width, 90vw);
@@ -380,7 +380,7 @@
380
380
  display: flex;
381
381
  align-items: center;
382
382
  padding: var(--command-menu-item-padding, 10px 12px);
383
- border-radius: var(--command-menu-item-border-radius, 8px);
383
+ border-radius: var(--command-menu-item-border-radius, var(--radius, 4px));
384
384
  cursor: pointer;
385
385
  gap: var(--command-menu-item-gap, 10px);
386
386
  font-size: var(--command-menu-item-font-size, 14px);
@@ -440,7 +440,7 @@
440
440
  min-width: var(--command-menu-kbd-min-width, 24px);
441
441
  height: var(--command-menu-kbd-height, 22px);
442
442
  padding: var(--command-menu-kbd-padding, 0 6px);
443
- border-radius: var(--command-menu-kbd-border-radius, 4px);
443
+ border-radius: var(--command-menu-kbd-border-radius, var(--radius, 4px));
444
444
  background-color: var(--command-menu-kbd-background, #f1f5f9);
445
445
  border: var(--command-menu-kbd-border, 1px solid #e2e8f0);
446
446
  color: var(--command-menu-kbd-color, #64748b);
@@ -227,7 +227,7 @@
227
227
  z-index: var(--context-menu-z-index, 1000);
228
228
  background-color: var(--context-menu-background-color, #ffffff);
229
229
  border: var(--context-menu-border, 1px solid #e0e0e0);
230
- border-radius: var(--context-menu-border-radius, 6px);
230
+ border-radius: var(--context-menu-border-radius, var(--radius, 4px));
231
231
  box-shadow: var(--context-menu-box-shadow, 0px 4px 16px rgba(0, 0, 0, 0.12));
232
232
  min-width: var(--context-menu-min-width, 160px);
233
233
  max-height: var(--context-menu-max-height, 240px);
@@ -933,7 +933,7 @@
933
933
  .drp-trigger-wrapper {
934
934
  --button-color: var(--drp-trigger-background, inherit);
935
935
  --button-border: var(--drp-trigger-border, 1px solid currentColor);
936
- --button-border-radius: var(--drp-trigger-border-radius, 6px);
936
+ --button-border-radius: var(--drp-trigger-border-radius, var(--radius, 4px));
937
937
  --button-text-color: var(--drp-trigger-color, inherit);
938
938
  --button-padding: var(--drp-trigger-padding, 8px 12px);
939
939
  --button-min-width: var(--drp-trigger-min-width, 200px);
@@ -976,7 +976,7 @@
976
976
  z-index: var(--drp-panel-z-index, 1000);
977
977
  background: var(--drp-panel-background, inherit);
978
978
  border: var(--drp-panel-border, 1px solid #e0e0e0);
979
- border-radius: var(--drp-panel-border-radius, 10px);
979
+ border-radius: var(--drp-panel-border-radius, var(--radius, 4px));
980
980
  box-shadow: var(--drp-panel-shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
981
981
  display: flex;
982
982
  flex-direction: column;
@@ -1019,7 +1019,7 @@
1019
1019
  padding: var(--drp-preset-padding, 7px 12px);
1020
1020
  background: none;
1021
1021
  border: none;
1022
- border-radius: var(--drp-preset-border-radius, 5px);
1022
+ border-radius: var(--drp-preset-border-radius, var(--radius, 4px));
1023
1023
  color: var(--drp-preset-color, inherit);
1024
1024
  cursor: pointer;
1025
1025
  white-space: nowrap;
@@ -1098,7 +1098,7 @@
1098
1098
  height: var(--drp-nav-btn-size, 32px);
1099
1099
  background: none;
1100
1100
  border: none;
1101
- border-radius: var(--drp-nav-btn-border-radius, 4px);
1101
+ border-radius: var(--drp-nav-btn-border-radius, var(--radius, 4px));
1102
1102
  cursor: pointer;
1103
1103
  color: var(--drp-nav-btn-color, inherit);
1104
1104
  transition: background 0.12s ease;
@@ -1175,7 +1175,7 @@
1175
1175
  min-width: 0;
1176
1176
  padding: var(--drp-date-input-padding, 10px 14px);
1177
1177
  border: var(--drp-date-input-border, 1px solid #d4d4d4);
1178
- border-radius: var(--drp-date-input-radius, 8px);
1178
+ border-radius: var(--drp-date-input-radius, var(--radius, 4px));
1179
1179
  background: var(--drp-date-input-background, #ffffff);
1180
1180
  }
1181
1181
 
@@ -1210,7 +1210,7 @@
1210
1210
  height: var(--drp-time-toggle-size, 40px);
1211
1211
  padding: 0;
1212
1212
  border: var(--drp-time-toggle-border, 1px solid #d4d4d4);
1213
- border-radius: var(--drp-time-toggle-radius, 8px);
1213
+ border-radius: var(--drp-time-toggle-radius, var(--radius, 4px));
1214
1214
  background: var(--drp-time-toggle-background, #f6f7f9);
1215
1215
  color: var(--drp-time-toggle-color, #555555);
1216
1216
  cursor: pointer;
@@ -1239,7 +1239,7 @@
1239
1239
  display: flex;
1240
1240
  align-items: center;
1241
1241
  border: var(--drp-time-input-border, 1px solid #d4d4d4);
1242
- border-radius: var(--drp-time-input-radius, 8px);
1242
+ border-radius: var(--drp-time-input-radius, var(--radius, 4px));
1243
1243
  background: var(--drp-time-input-background, #ffffff);
1244
1244
  }
1245
1245
 
@@ -1388,7 +1388,7 @@
1388
1388
  position: relative;
1389
1389
  --button-color: var(--drp-compare-trigger-background, inherit);
1390
1390
  --button-border: var(--drp-compare-trigger-border, 1px solid currentColor);
1391
- --button-border-radius: var(--drp-compare-trigger-border-radius, 6px);
1391
+ --button-border-radius: var(--drp-compare-trigger-border-radius, var(--radius, 4px));
1392
1392
  --button-text-color: var(--drp-compare-trigger-color, inherit);
1393
1393
  --button-padding: var(--drp-compare-trigger-padding, 8px 12px);
1394
1394
  --button-min-width: var(--drp-compare-trigger-min-width, 160px);
@@ -1407,7 +1407,7 @@
1407
1407
  z-index: var(--drp-panel-z-index, 1000);
1408
1408
  background: var(--drp-panel-background, inherit);
1409
1409
  border: var(--drp-panel-border, 1px solid #e0e0e0);
1410
- border-radius: var(--drp-panel-border-radius, 10px);
1410
+ border-radius: var(--drp-panel-border-radius, var(--radius, 4px));
1411
1411
  box-shadow: var(--drp-panel-shadow, 0 8px 24px rgba(0, 0, 0, 0.12));
1412
1412
  display: flex;
1413
1413
  flex-direction: column;
@@ -146,7 +146,7 @@
146
146
  justify-content: var(--file-input-justify-content, center);
147
147
  padding: var(--file-input-padding);
148
148
  border: var(--file-input-border);
149
- border-radius: var(--file-input-radius);
149
+ border-radius: var(--file-input-radius, var(--radius, 4px));
150
150
  background: var(--file-input-background);
151
151
  gap: var(--file-input-gap);
152
152
  text-align: var(--file-input-text-align, center);
@@ -65,7 +65,7 @@
65
65
  width: var(--grid-item-body-width, 64px);
66
66
  background-color: var(--grid-item-background-color, #faf9f9);
67
67
  border: var(--grid-item-border, 1px solid #eaeaea);
68
- border-radius: var(--grid-item-border-radius, 4px);
68
+ border-radius: var(--grid-item-border-radius, var(--radius, 4px));
69
69
  margin: var(--grid-item-margin, 8px 0 0 0);
70
70
  display: flex;
71
71
  justify-content: center;
@@ -101,7 +101,7 @@
101
101
  position: absolute;
102
102
  inset: 0px;
103
103
  margin: var(--grid-item-margin, 8px 0 0 0);
104
- border-radius: var(--grid-item-border-radius, 4px);
104
+ border-radius: var(--grid-item-border-radius, var(--radius, 4px));
105
105
  border: var(--animation-version, 32px solid #cbcccf66);
106
106
  animation: clipperAnimation var(--loader-animation-duration, 3s) infinite linear;
107
107
  }
@@ -331,12 +331,12 @@
331
331
  background-color: var(--input-background, white);
332
332
  font-size: var(--input-font-size, 16px) !important;
333
333
  font-family: var(--input-font-family, inherit);
334
- border-radius: var(--input-radius, 4px);
334
+ border-radius: var(--input-radius, var(--radius, 4px));
335
335
  outline: none;
336
336
  padding: var(--input-padding, 16px);
337
337
  font-weight: var(--input-font-weight, 500);
338
338
  width: var(--input-width, fit-content);
339
- margin: var(--input-margin, 0px 0px 12px 0px);
339
+ margin: var(--input-margin, 0);
340
340
  appearance: none !important;
341
341
  -webkit-appearance: none !important; /* For Safari MWeb */
342
342
  box-shadow: var(--input-box-shadow, 0px 1px 8px #2f537733);
@@ -364,7 +364,7 @@
364
364
  }
365
365
 
366
366
  .action-input {
367
- border-radius: var(--input-radius, 4px 0px 0px 4px);
367
+ border-radius: var(--input-radius, var(--radius, 4px) 0 0 var(--radius, 4px));
368
368
  box-shadow: var(--input-box-shadow, 0px 0px 0px #ffffff);
369
369
  margin-bottom: 0;
370
370
  }
@@ -396,7 +396,7 @@
396
396
  .input-field-wrap {
397
397
  position: relative;
398
398
  display: block;
399
- margin: var(--input-margin, 0px 0px 12px 0px);
399
+ margin: var(--input-margin, 0);
400
400
  }
401
401
 
402
402
  .input-field-wrap > :global(textarea),
@@ -429,7 +429,7 @@
429
429
  .input-icon-button:focus-visible {
430
430
  outline: var(--input-icon-focus-outline, 2px solid var(--input-focus-border-color, #005fcc));
431
431
  outline-offset: var(--input-icon-focus-outline-offset, 2px);
432
- border-radius: var(--input-icon-focus-radius, 2px);
432
+ border-radius: var(--input-icon-focus-radius, var(--radius, 4px));
433
433
  }
434
434
 
435
435
  .input-icon-left {
@@ -136,7 +136,7 @@
136
136
  font-size: var(--input-font-size, 16px) !important;
137
137
  font-weight: var(--input-button-font-weight, 500);
138
138
  margin: var(--input-button-margin);
139
- border-radius: var(--input-button-radius, 4px);
139
+ border-radius: var(--input-button-radius, var(--radius, 4px));
140
140
  border: var(--input-button-container-border);
141
141
  background: var(--input-button-container-background);
142
142
  padding: var(--input-button-container-padding);
@@ -145,7 +145,7 @@
145
145
  .input-button {
146
146
  display: flex;
147
147
  align-items: center;
148
- border-radius: var(--input-button-radius, 4px);
148
+ border-radius: var(--input-button-radius, var(--radius, 4px));
149
149
  border: var(--input-button-border);
150
150
  box-shadow: var(--input-button-box-shadow, 0px 1px 8px #2f537733);
151
151
  background: var(--input-button-background);
@@ -262,7 +262,10 @@
262
262
  --button-font-size: var(--right-button-font-size);
263
263
  --button-height: var(--right-button-height, 54px);
264
264
  --button-padding: var(--right-button-padding);
265
- --button-border-radius: var(--right-button-border-radius, 0px 4px 4px 0px);
265
+ --button-border-radius: var(
266
+ --right-button-border-radius,
267
+ 0 var(--radius, 4px) var(--radius, 4px) 0
268
+ );
266
269
  --button-width: var(--right-button-width, 100%);
267
270
  --cursor: var(--right-button-cursor);
268
271
  --opacity: var(--right-button-opacity);
@@ -0,0 +1,129 @@
1
+ <script lang="ts">
2
+ import type { KeyValueProperties, KeyValueItem } from './properties';
3
+
4
+ let {
5
+ items,
6
+ columns = 2,
7
+ layout = 'vertical',
8
+ size = 'md',
9
+ hideEmpty = true,
10
+ emptyText = '—',
11
+ valueSnippet,
12
+ labelSnippet,
13
+ testId,
14
+ classes = ''
15
+ }: KeyValueProperties = $props();
16
+
17
+ const isEmptyValue = (value: KeyValueItem['value']): boolean =>
18
+ value == null || (typeof value === 'string' && value.trim() === '');
19
+
20
+ let visibleItems = $derived(
21
+ hideEmpty ? items.filter((item) => !isEmptyValue(item.value)) : items
22
+ );
23
+
24
+ const displayValue = (item: KeyValueItem): string =>
25
+ isEmptyValue(item.value) ? emptyText : String(item.value);
26
+ </script>
27
+
28
+ <dl
29
+ class="key-value key-value--{layout} key-value--{size} {classes}"
30
+ style="--keyvalue-columns: {columns};"
31
+ data-pw={testId}
32
+ >
33
+ {#each visibleItems as item, index (item.label + '-' + index)}
34
+ <div class="key-value-item" data-pw={item.testId}>
35
+ <dt class="key-value-label">
36
+ {#if labelSnippet}
37
+ {@render labelSnippet(item, index)}
38
+ {:else}
39
+ {item.label}
40
+ {/if}
41
+ </dt>
42
+ <dd class="key-value-value">
43
+ {#if valueSnippet}
44
+ {@render valueSnippet(item, index)}
45
+ {:else}
46
+ {displayValue(item)}
47
+ {/if}
48
+ </dd>
49
+ </div>
50
+ {/each}
51
+ </dl>
52
+
53
+ <style>
54
+ .key-value {
55
+ display: grid;
56
+ grid-template-columns: repeat(var(--keyvalue-columns, 2), minmax(0, 1fr));
57
+ column-gap: var(--keyvalue-column-gap, 32px);
58
+ row-gap: var(--keyvalue-row-gap, 16px);
59
+ margin: 0;
60
+ width: 100%;
61
+ /* Size-preset defaults (overridable by --keyvalue-label-size / --keyvalue-value-size).
62
+ The value sits 2px below the label, so the key always reads as the heavier, larger element. */
63
+ --_kv-label-size: 16px;
64
+ --_kv-value-size: 14px;
65
+ }
66
+
67
+ .key-value--sm {
68
+ --_kv-label-size: 14px;
69
+ --_kv-value-size: 12px;
70
+ }
71
+
72
+ .key-value--md {
73
+ --_kv-label-size: 16px;
74
+ --_kv-value-size: 14px;
75
+ }
76
+
77
+ .key-value--lg {
78
+ --_kv-label-size: 18px;
79
+ --_kv-value-size: 16px;
80
+ }
81
+
82
+ .key-value-item {
83
+ display: flex;
84
+ min-width: 0;
85
+ }
86
+
87
+ .key-value--vertical .key-value-item {
88
+ flex-direction: column;
89
+ gap: var(--keyvalue-pair-gap, 4px);
90
+ }
91
+
92
+ .key-value--horizontal .key-value-item {
93
+ flex-direction: row;
94
+ align-items: baseline;
95
+ gap: var(--keyvalue-pair-gap, 12px);
96
+ }
97
+
98
+ .key-value-label {
99
+ margin: 0;
100
+ color: var(--keyvalue-label-color, #1a1a1a);
101
+ font-size: var(--keyvalue-label-size, var(--_kv-label-size, 13px));
102
+ font-weight: var(--keyvalue-label-weight, 600);
103
+ line-height: var(--keyvalue-label-line-height, 1.4);
104
+ }
105
+
106
+ .key-value--horizontal .key-value-label {
107
+ flex: 0 0 var(--keyvalue-label-width, 140px);
108
+ }
109
+
110
+ .key-value-value {
111
+ margin: 0;
112
+ color: var(--keyvalue-value-color, #555);
113
+ font-size: var(--keyvalue-value-size, var(--_kv-value-size, 16px));
114
+ font-weight: var(--keyvalue-value-weight, 400);
115
+ line-height: var(--keyvalue-value-line-height, 1.4);
116
+ overflow-wrap: anywhere;
117
+ }
118
+
119
+ .key-value--horizontal .key-value-value {
120
+ flex: 1 1 auto;
121
+ min-width: 0;
122
+ }
123
+
124
+ @media (max-width: 600px) {
125
+ .key-value {
126
+ grid-template-columns: 1fr;
127
+ }
128
+ }
129
+ </style>
@@ -0,0 +1,4 @@
1
+ import type { KeyValueProperties } from './properties';
2
+ declare const KeyValue: import("svelte").Component<KeyValueProperties, {}, "">;
3
+ type KeyValue = ReturnType<typeof KeyValue>;
4
+ export default KeyValue;
@@ -0,0 +1,52 @@
1
+ import type { Snippet } from 'svelte';
2
+ export type KeyValueProperties = MandatoryKeyValueProperties & OptionalKeyValueProperties;
3
+ export type KeyValueItem = {
4
+ /** The field label (the "key"). */
5
+ label: string;
6
+ /**
7
+ * The field value. May be `null`/`undefined`/empty — such items are skipped when
8
+ * `hideEmpty` is `true` (the default), or rendered as `emptyText` otherwise.
9
+ */
10
+ value?: string | number | null;
11
+ /** Optional per-item test id, emitted as `data-pw` on the item wrapper. */
12
+ testId?: string;
13
+ };
14
+ export type KeyValueLayout = 'vertical' | 'horizontal';
15
+ /** Size preset scaling the label/value typography. Mirrors Blend's KeyValuePair sizes. */
16
+ export type KeyValueSize = 'sm' | 'md' | 'lg';
17
+ export type MandatoryKeyValueProperties = {
18
+ items: KeyValueItem[];
19
+ };
20
+ export type OptionalKeyValueProperties = {
21
+ /**
22
+ * Number of columns the pairs flow across (row-major). Defaults to `2`. The grid
23
+ * collapses to a single column below the `--keyvalue-collapse-width` breakpoint.
24
+ */
25
+ columns?: number;
26
+ /**
27
+ * `'vertical'` (default) stacks the value beneath the label; `'horizontal'` places the
28
+ * label and value side-by-side (label width set by `--keyvalue-label-width`).
29
+ */
30
+ layout?: KeyValueLayout;
31
+ /**
32
+ * Typography size preset. `'sm'` (12/14px), `'md'` (13/16px, default), `'lg'` (14/18px) —
33
+ * label/value font sizes respectively. Individual `--keyvalue-label-size` /
34
+ * `--keyvalue-value-size` overrides always take precedence over the preset.
35
+ */
36
+ size?: KeyValueSize;
37
+ /**
38
+ * When `true` (default), items whose value is `null`, `undefined`, or an empty/whitespace
39
+ * string are omitted. Set `false` to render them as `emptyText` instead.
40
+ */
41
+ hideEmpty?: boolean;
42
+ /** Placeholder rendered for empty values when `hideEmpty` is `false`. Defaults to `'—'`. */
43
+ emptyText?: string;
44
+ /** Custom renderer for the value cell, receiving `(item, index)`. Falls back to plain text. */
45
+ valueSnippet?: Snippet<[KeyValueItem, number]>;
46
+ /** Custom renderer for the label cell, receiving `(item, index)`. Falls back to plain text. */
47
+ labelSnippet?: Snippet<[KeyValueItem, number]>;
48
+ /** Test selector applied as the `data-pw` attribute on the root grid. */
49
+ testId?: string;
50
+ /** Additional CSS classes for theming the root grid. */
51
+ classes?: string;
52
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -82,7 +82,7 @@
82
82
  color: var(--keyboard-input-key-color, #333333);
83
83
  background-color: var(--keyboard-input-key-background, #f5f5f5);
84
84
  border: var(--keyboard-input-key-border, 1px solid #d1d1d1);
85
- border-radius: var(--keyboard-input-key-border-radius, 4px);
85
+ border-radius: var(--keyboard-input-key-border-radius, var(--radius, 4px));
86
86
  box-shadow: var(--keyboard-input-key-box-shadow, 0 1px 0 #c4c4c4);
87
87
  min-width: var(--keyboard-input-key-min-width, 1.6em);
88
88
  padding: var(--keyboard-input-key-padding, 2px 6px);
@@ -284,7 +284,7 @@
284
284
  left: var(--menu-dropdown-left, 0);
285
285
  background-color: var(--menu-background-color, #ffffff);
286
286
  border: var(--menu-border, 1px solid #e0e0e0);
287
- border-radius: var(--menu-border-radius, 6px);
287
+ border-radius: var(--menu-border-radius, var(--radius, 4px));
288
288
  box-shadow: var(--menu-box-shadow, 0px 4px 16px rgba(0, 0, 0, 0.12));
289
289
  min-width: var(--menu-min-width, 160px);
290
290
  max-height: var(--menu-max-height, 240px);
@@ -245,7 +245,7 @@
245
245
  cursor: auto;
246
246
  display: flex;
247
247
  flex-direction: column;
248
- border-radius: var(--modal-border-radius, 0px);
248
+ border-radius: var(--modal-border-radius, var(--radius, 4px));
249
249
  overflow: var(--modal-content-overflow, auto);
250
250
  border-top: var(--modal-content-border-top);
251
251
  }
@@ -331,7 +331,7 @@
331
331
  --button-height: var(--modal-footer-secondary-button-height, fit-content);
332
332
  --button-padding: var(--modal-footer-secondary-button-padding, 16px);
333
333
  --button-margin: var(--modal-footer-secondary-button-margin);
334
- --button-border-radius: var(--modal-footer-secondary-button-border-radius, 0px);
334
+ --button-border-radius: var(--modal-footer-secondary-button-border-radius, var(--radius, 4px));
335
335
  --button-width: var(--modal-footer-secondary-button-width, fit-content);
336
336
  --cursor: var(--modal-footer-secondary-button-cursor, pointer);
337
337
  --opacity: var(--modal-footer-secondary-button-opacity, 1);
@@ -372,7 +372,7 @@
372
372
  --button-height: var(--modal-footer-primary-button-height, fit-content);
373
373
  --button-padding: var(--modal-footer-primary-button-padding, 16px);
374
374
  --button-margin: var(--modal-footer-primary-button-margin);
375
- --button-border-radius: var(--modal-footer-primary-button-border-radius, 0px);
375
+ --button-border-radius: var(--modal-footer-primary-button-border-radius, var(--radius, 4px));
376
376
  --button-width: var(--modal-footer-primary-button-width, fit-content);
377
377
  --cursor: var(--modal-footer-primary-button-cursor, pointer);
378
378
  --opacity: var(--modal-footer-primary-button-opacity, 1);
@@ -141,7 +141,7 @@
141
141
  color: var(--pagination-button-color, #3a4550);
142
142
  background: var(--pagination-button-background, transparent);
143
143
  border: var(--pagination-button-border, 1px solid #d1d5db);
144
- border-radius: var(--pagination-button-border-radius, 4px);
144
+ border-radius: var(--pagination-button-border-radius, var(--radius, 4px));
145
145
  cursor: var(--pagination-button-cursor, pointer);
146
146
  min-width: var(--pagination-button-min-width, 36px);
147
147
  height: var(--pagination-button-height, 36px);
@@ -372,7 +372,7 @@
372
372
  display: inline-block;
373
373
  width: var(--chart-legend-swatch-size, 12px);
374
374
  height: var(--chart-legend-swatch-size, 12px);
375
- border-radius: var(--piechart-legend-swatch-radius, 2px);
375
+ border-radius: var(--piechart-legend-swatch-radius, var(--radius, 4px));
376
376
  flex-shrink: 0;
377
377
  }
378
378
  .pie-legend-label {
@@ -33,14 +33,14 @@
33
33
  flex: 1;
34
34
  height: var(--progress-track-height, 8px);
35
35
  background: var(--progress-track-background, #e0e0e0);
36
- border-radius: var(--progress-track-border-radius, 4px);
36
+ border-radius: var(--progress-track-border-radius, var(--radius, 4px));
37
37
  overflow: hidden;
38
38
  }
39
39
 
40
40
  .bar {
41
41
  height: 100%;
42
42
  background: var(--progress-bar-background, #2196f3);
43
- border-radius: var(--progress-bar-border-radius, 4px);
43
+ border-radius: var(--progress-bar-border-radius, var(--radius, 4px));
44
44
  transition: var(--progress-bar-transition, width 0.3s ease);
45
45
  }
46
46
 
@@ -159,7 +159,7 @@
159
159
  .proportion-bar-track {
160
160
  width: 100%;
161
161
  height: var(--proportion-bar-track-height, 10px);
162
- border-radius: var(--proportion-bar-track-border-radius, 4px);
162
+ border-radius: var(--proportion-bar-track-border-radius, var(--radius, 4px));
163
163
  overflow: hidden;
164
164
  background: var(--proportion-bar-track-bg, #f0f0f0);
165
165
  }
@@ -189,7 +189,7 @@
189
189
  display: inline-block;
190
190
  width: var(--proportion-bar-swatch-size, 10px);
191
191
  height: var(--proportion-bar-swatch-size, 10px);
192
- border-radius: var(--proportion-bar-swatch-border-radius, 2px);
192
+ border-radius: var(--proportion-bar-swatch-border-radius, var(--radius, 4px));
193
193
  flex-shrink: 0;
194
194
  }
195
195
 
@@ -18,6 +18,7 @@
18
18
  showValues = false,
19
19
  showLabels = true,
20
20
  aspectRatio = 16 / 9,
21
+ maxHeight = Infinity,
21
22
  valueFormat,
22
23
  tooltipSnippet,
23
24
  empty,
@@ -89,6 +90,26 @@
89
90
  : (Math.max(0, chartWidth - MARGIN * 2) - nodeWidth) / (columnCount - 1)
90
91
  );
91
92
 
93
+ // Node labels render alongside their bar; long labels used to overflow into the
94
+ // next column and collide. Clip each to the horizontal room its column actually
95
+ // has and append an ellipsis (the full text stays available via the node tooltip).
96
+ const LABEL_CHAR_PX = 7.2; // ≈ 0.6em at the 12px default label size
97
+ const truncateLabel = (text: string, column: number): string => {
98
+ const available =
99
+ column === 0
100
+ ? MARGIN + 16
101
+ : column === columnCount - 1
102
+ ? Math.max(colWidth, MARGIN + 24)
103
+ : Math.max(0, colWidth - nodeWidth - 12);
104
+ const maxChars = Math.floor(available / LABEL_CHAR_PX);
105
+ // No usable room — hide the label rather than force text that would overflow;
106
+ // the full text is still reachable via the node's <title> on hover.
107
+ if (maxChars < 3) {
108
+ return '';
109
+ }
110
+ return text.length > maxChars ? text.slice(0, maxChars - 1) + '…' : text;
111
+ };
112
+
92
113
  // ── Helpers ────────────────────────────────────────────────────
93
114
 
94
115
  /** Percentage of source node's total value carried by a link (0–100, 2 dp). */
@@ -276,7 +297,7 @@
276
297
  {#if isEmpty && typeof empty === 'function'}
277
298
  <div class="chart-empty">{@render empty()}</div>
278
299
  {:else}
279
- <ChartContainer bind:width={chartWidth} bind:height={chartHeight} {aspectRatio}>
300
+ <ChartContainer bind:width={chartWidth} bind:height={chartHeight} {aspectRatio} {maxHeight}>
280
301
  <g transform="translate({MARGIN}, {MARGIN})">
281
302
  {#if columnLabels != null && columnLabels.length > 0}
282
303
  {#each columnLabels.slice(0, columnCount) as label, ci (ci)}
@@ -340,8 +361,11 @@
340
361
  y={node.y + node.height / 2}
341
362
  text-anchor={node.column === 0 ? 'end' : 'start'}
342
363
  dominant-baseline="middle"
343
- >{node.label}{#if showValues}
344
- ({format(node.value)}){/if}</text
364
+ >{truncateLabel(
365
+ showValues ? `${node.label} (${format(node.value)})` : node.label,
366
+ node.column
367
+ )}<title>{showValues ? `${node.label} (${format(node.value)})` : node.label}</title
368
+ ></text
345
369
  >
346
370
  {/if}
347
371
  {/each}
@@ -44,6 +44,7 @@ export type OptionalSankeyChartProperties = {
44
44
  showValues?: boolean;
45
45
  showLabels?: boolean;
46
46
  aspectRatio?: number;
47
+ maxHeight?: number;
47
48
  valueFormat?: (value: number) => string;
48
49
  tooltipSnippet?: Snippet<[SankeyTooltipContext]>;
49
50
  empty?: Snippet;
@@ -516,7 +516,7 @@
516
516
  padding: var(--select-trigger-padding, 8px 12px);
517
517
  background: var(--select-trigger-background, #ffffff);
518
518
  border: var(--select-trigger-border, 1px solid #cccccc);
519
- border-radius: var(--select-trigger-border-radius, 6px);
519
+ border-radius: var(--select-trigger-border-radius, var(--radius, 4px));
520
520
  cursor: pointer;
521
521
  outline: none;
522
522
  -webkit-tap-highlight-color: transparent;
@@ -603,7 +603,7 @@
603
603
  margin-top: var(--select-dropdown-gap, 4px);
604
604
  background: var(--select-dropdown-background, #ffffff);
605
605
  border: var(--select-dropdown-border, 1px solid #cccccc);
606
- border-radius: var(--select-dropdown-border-radius, 6px);
606
+ border-radius: var(--select-dropdown-border-radius, var(--radius, 4px));
607
607
  box-shadow: var(--select-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
608
608
  max-height: var(--select-dropdown-max-height, 200px);
609
609
  overflow-y: auto;
@@ -659,7 +659,7 @@
659
659
  width: var(--select-option-indicator-size, 18px);
660
660
  height: var(--select-option-indicator-size, 18px);
661
661
  border: var(--select-option-indicator-border, 2px solid #757575);
662
- border-radius: var(--select-option-indicator-border-radius, 3px);
662
+ border-radius: var(--select-option-indicator-border-radius, var(--radius, 4px));
663
663
  background-color: var(--select-option-indicator-background, transparent);
664
664
  color: var(--select-option-indicator-color, currentColor);
665
665
  transition:
@@ -248,7 +248,7 @@
248
248
  --button-width: var(--sheet-close-button-size, 32px);
249
249
  --button-height: var(--sheet-close-button-size, 32px);
250
250
  --button-border: none;
251
- --button-border-radius: var(--sheet-close-button-border-radius, 4px);
251
+ --button-border-radius: var(--sheet-close-button-border-radius, var(--radius, 4px));
252
252
  --button-color: var(--sheet-close-button-background, transparent);
253
253
  --button-text-color: var(--sheet-close-button-color, #666666);
254
254
  --button-font-size: var(--sheet-close-button-font-size, 16px);
@@ -10,7 +10,7 @@
10
10
  .shimmer {
11
11
  width: var(--shimmer-width, 100%);
12
12
  height: var(--shimmer-height, 16px);
13
- border-radius: var(--shimmer-border-radius, 4px);
13
+ border-radius: var(--shimmer-border-radius, var(--radius, 4px));
14
14
  background-color: var(--shimmer-background, #e0e0e0);
15
15
  opacity: var(--shimmer-opacity, 1);
16
16
  overflow: hidden;
@@ -71,7 +71,7 @@
71
71
  appearance: none;
72
72
  width: 100%;
73
73
  height: var(--slider-track-height, 6px);
74
- border-radius: var(--slider-track-border-radius, 3px);
74
+ border-radius: var(--slider-track-border-radius, var(--radius, 4px));
75
75
  background: var(
76
76
  --slider-track,
77
77
  linear-gradient(
@@ -144,7 +144,7 @@
144
144
 
145
145
  .slider-input::-moz-range-track {
146
146
  height: var(--slider-track-height, 6px);
147
- border-radius: var(--slider-track-border-radius, 3px);
147
+ border-radius: var(--slider-track-border-radius, var(--radius, 4px));
148
148
  background: transparent;
149
149
  }
150
150
 
@@ -58,7 +58,7 @@
58
58
  gap: var(--snippet-gap, 8px);
59
59
  background: var(--snippet-background, #1e1e1e);
60
60
  border: var(--snippet-border, 1px solid #333);
61
- border-radius: var(--snippet-border-radius, 6px);
61
+ border-radius: var(--snippet-border-radius, var(--radius, 4px));
62
62
  padding: var(--snippet-padding, 12px 16px);
63
63
  font-family: var(--snippet-font-family, monospace);
64
64
  font-size: var(--snippet-font-size, 14px);
@@ -93,7 +93,7 @@
93
93
  --button-text-color: var(--snippet-copy-color, #888);
94
94
  --button-border: var(--snippet-copy-border, none);
95
95
  --button-padding: var(--snippet-copy-padding, 4px);
96
- --button-border-radius: var(--snippet-copy-border-radius, 4px);
96
+ --button-border-radius: var(--snippet-copy-border-radius, var(--radius, 4px));
97
97
  --cursor: var(--snippet-copy-cursor, pointer);
98
98
  --button-hover-color: var(--snippet-copy-hover-background, #333);
99
99
  display: flex;
@@ -73,7 +73,10 @@
73
73
  --button-font-weight: var(--split-button-primary-font-weight, 500);
74
74
  --button-font-family: var(--split-button-primary-font-family);
75
75
  --button-border: var(--split-button-primary-border, none);
76
- --button-border-radius: var(--split-button-primary-border-radius, 4px 0 0 4px);
76
+ --button-border-radius: var(
77
+ --split-button-primary-border-radius,
78
+ var(--radius, 4px) 0 0 var(--radius, 4px)
79
+ );
77
80
  --button-hover-color: var(
78
81
  --split-button-primary-hover-background,
79
82
  var(--split-button-primary-background, #3a4550)
@@ -97,7 +100,10 @@
97
100
  display: flex;
98
101
  align-items: stretch;
99
102
  background-color: var(--split-button-trigger-background, #3a4550);
100
- border-radius: var(--split-button-trigger-border-radius, 0 4px 4px 0);
103
+ border-radius: var(
104
+ --split-button-trigger-border-radius,
105
+ 0 var(--radius, 4px) var(--radius, 4px) 0
106
+ );
101
107
  color: var(--split-button-trigger-color, white);
102
108
  cursor: pointer;
103
109
  }
@@ -198,10 +198,10 @@
198
198
  </div>
199
199
  {/if}
200
200
  </div>
201
+ {/if}
201
202
 
202
- {#if typeof subtitle === 'string' && subtitle.length > 0}
203
- <div class="statcard-subtitle">{subtitle}</div>
204
- {/if}
203
+ {#if typeof subtitle === 'string' && subtitle.length > 0}
204
+ <div class="statcard-subtitle">{subtitle}</div>
205
205
  {/if}
206
206
 
207
207
  {#if children}
@@ -221,7 +221,7 @@
221
221
  padding: var(--statcard-padding, 16px);
222
222
  background: var(--statcard-background, #ffffff);
223
223
  border: var(--statcard-border, 1px solid #e5e7eb);
224
- border-radius: var(--statcard-border-radius, 8px);
224
+ border-radius: var(--statcard-border-radius, var(--radius, 4px));
225
225
  box-shadow: var(--statcard-box-shadow, none);
226
226
  width: var(--statcard-width, auto);
227
227
  min-width: var(--statcard-min-width, 0);
@@ -520,7 +520,7 @@
520
520
  gap: var(--table-search-gap, 8px);
521
521
  padding: var(--table-search-padding, 8px 12px);
522
522
  border: var(--table-search-border, 1px solid #e5e7eb);
523
- border-radius: var(--table-search-border-radius, 8px);
523
+ border-radius: var(--table-search-border-radius, var(--radius, 4px));
524
524
  background-color: var(--table-search-background, #ffffff);
525
525
  margin-bottom: var(--table-search-margin-bottom, 8px);
526
526
  }
@@ -550,7 +550,7 @@
550
550
  .table-search-input:focus-visible {
551
551
  outline: 2px solid var(--table-focus-outline-color, #3b82f6);
552
552
  outline-offset: 2px;
553
- border-radius: var(--table-search-focus-border-radius, 2px);
553
+ border-radius: var(--table-search-focus-border-radius, var(--radius, 4px));
554
554
  }
555
555
 
556
556
  .table-search-input::placeholder {
@@ -587,7 +587,7 @@
587
587
  /* ── Container ──────────────────────────────────────────────────────────── */
588
588
  .table-container {
589
589
  border: var(--table-border, 1px solid #e5e7eb);
590
- border-radius: var(--table-border-radius, 8px);
590
+ border-radius: var(--table-border-radius, var(--radius, 4px));
591
591
  width: var(--table-container-width, 100%);
592
592
  overflow: hidden;
593
593
  }
@@ -700,7 +700,7 @@
700
700
  width: var(--table-checkbox-size, 18px);
701
701
  height: var(--table-checkbox-size, 18px);
702
702
  border: var(--table-checkbox-border, 2px solid #9ca3af);
703
- border-radius: var(--table-checkbox-border-radius, 3px);
703
+ border-radius: var(--table-checkbox-border-radius, var(--radius, 4px));
704
704
  background-color: var(--table-checkbox-background, transparent);
705
705
  cursor: pointer;
706
706
  flex-shrink: 0;
@@ -162,7 +162,7 @@
162
162
  height: var(--theme-switcher-size, 36px);
163
163
  padding: 0;
164
164
  border: none;
165
- border-radius: var(--theme-switcher-border-radius, 8px);
165
+ border-radius: var(--theme-switcher-border-radius, var(--radius, 4px));
166
166
  background-color: var(--theme-switcher-bg, transparent);
167
167
  cursor: pointer;
168
168
  color: var(--theme-switcher-icon-color, #374151);
@@ -211,14 +211,14 @@
211
211
  gap: var(--theme-switcher-segment-gap, 2px);
212
212
  padding: var(--theme-switcher-segment-padding, 4px);
213
213
  background-color: var(--theme-switcher-segment-bg, #f3f4f6);
214
- border-radius: var(--theme-switcher-border-radius, 8px);
214
+ border-radius: var(--theme-switcher-border-radius, var(--radius, 4px));
215
215
  }
216
216
 
217
217
  .segment-indicator {
218
218
  position: absolute;
219
219
  top: var(--theme-switcher-segment-padding, 4px);
220
220
  bottom: var(--theme-switcher-segment-padding, 4px);
221
- border-radius: var(--theme-switcher-segment-border-radius, 6px);
221
+ border-radius: var(--theme-switcher-segment-border-radius, var(--radius, 4px));
222
222
  background-color: var(--theme-switcher-segment-active-bg, #ffffff);
223
223
  box-shadow: var(--theme-switcher-segment-shadow, 0 1px 2px rgba(0, 0, 0, 0.1));
224
224
  transition:
@@ -235,7 +235,7 @@
235
235
  justify-content: center;
236
236
  padding: var(--theme-switcher-segment-button-padding, 6px 10px);
237
237
  border: none;
238
- border-radius: var(--theme-switcher-segment-border-radius, 6px);
238
+ border-radius: var(--theme-switcher-segment-border-radius, var(--radius, 4px));
239
239
  background: transparent;
240
240
  cursor: pointer;
241
241
  color: var(--theme-switcher-icon-color, #374151);
@@ -162,7 +162,7 @@
162
162
  font-family: var(--toast-font-family, inherit);
163
163
  font-weight: var(--toast-font-weight);
164
164
  height: var(--toast-height, fit-content);
165
- border-radius: var(--toast-border-radius, 0px);
165
+ border-radius: var(--toast-border-radius, var(--radius, 4px));
166
166
  border: var(--toast-border, none);
167
167
  border-style: var(--toast-border-style);
168
168
  width: var(--toast-width, fit-content);
@@ -107,7 +107,7 @@
107
107
  `font-weight:var(--tooltip-font-weight,400)`,
108
108
  `font-family:var(--tooltip-font-family,inherit)`,
109
109
  `padding:var(--tooltip-padding,6px 10px)`,
110
- `border-radius:var(--tooltip-border-radius,4px)`,
110
+ `border-radius: var(--tooltip-border-radius, var(--radius, 4px))`,
111
111
  `border:var(--tooltip-border,none)`,
112
112
  `box-shadow:var(--tooltip-box-shadow,0 2px 6px rgba(0,0,0,0.15))`,
113
113
  `white-space:normal`,
@@ -249,7 +249,7 @@
249
249
  font-weight: var(--tooltip-font-weight, 400);
250
250
  font-family: var(--tooltip-font-family);
251
251
  padding: var(--tooltip-padding, 6px 10px);
252
- border-radius: var(--tooltip-border-radius, 4px);
252
+ border-radius: var(--tooltip-border-radius, var(--radius, 4px));
253
253
  border: var(--tooltip-border, none);
254
254
  box-shadow: var(--tooltip-box-shadow, 0 2px 6px rgba(0, 0, 0, 0.15));
255
255
  white-space: normal;
@@ -104,7 +104,7 @@ export const tooltip = (node, options) => {
104
104
  `font-weight:var(--tooltip-font-weight,400)`,
105
105
  `font-family:var(--tooltip-font-family,inherit)`,
106
106
  `padding:var(--tooltip-padding,6px 10px)`,
107
- `border-radius:var(--tooltip-border-radius,4px)`,
107
+ `border-radius: var(--tooltip-border-radius, var(--radius, 4px))`,
108
108
  `border:var(--tooltip-border,none)`,
109
109
  `box-shadow:var(--tooltip-box-shadow,0 2px 6px rgba(0,0,0,0.15))`,
110
110
  'white-space:normal',
@@ -7,6 +7,7 @@
7
7
  height = $bindable(0),
8
8
  aspectRatio = 16 / 9,
9
9
  minHeight = 0,
10
+ maxHeight = Infinity,
10
11
  testId,
11
12
  classes,
12
13
  children
@@ -22,7 +23,7 @@
22
23
  const rect = containerEl.getBoundingClientRect();
23
24
  const w = Math.round(rect.width);
24
25
  width = w;
25
- height = Math.max(minHeight, Math.round(w / aspectRatio));
26
+ height = Math.min(maxHeight, Math.max(minHeight, Math.round(w / aspectRatio)));
26
27
  }
27
28
 
28
29
  // Re-measure whenever aspectRatio changes at runtime (e.g. semiCircle toggled).
@@ -30,8 +31,10 @@
30
31
  // the ResizeObserver and the component is being torn down.
31
32
  // eslint-disable-next-line no-restricted-syntax
32
33
  $effect(() => {
33
- // Reading aspectRatio here makes this effect re-run whenever it changes.
34
+ // Reading aspectRatio/maxHeight here makes this effect re-run whenever either
35
+ // changes, so the computed height stays current without waiting for a resize.
34
36
  void aspectRatio;
37
+ void maxHeight;
35
38
  if (isMounted) {
36
39
  measure();
37
40
  }
@@ -34,7 +34,7 @@
34
34
  font-size: var(--chart-tooltip-font-size, 12px);
35
35
  font-family: var(--chart-font-family, inherit);
36
36
  padding: var(--chart-tooltip-padding, 8px 12px);
37
- border-radius: var(--chart-tooltip-border-radius, 4px);
37
+ border-radius: var(--chart-tooltip-border-radius, var(--radius, 4px));
38
38
  box-shadow: var(--chart-tooltip-shadow, 0 2px 8px rgba(0, 0, 0, 0.2));
39
39
  pointer-events: none;
40
40
  max-width: var(--chart-tooltip-max-width, 280px);
@@ -115,12 +115,16 @@ export function computeSankeyLayout(nodes, links, width, height, nodeWidth = 16,
115
115
  for (const [, ids] of columnGroups) {
116
116
  for (const id of ids) {
117
117
  const deps = incoming.get(id) ?? [];
118
- if (deps.length > 0) {
118
+ const totalDepValue = deps.reduce((s, d) => s + d.value, 0);
119
+ // Only re-centre against incoming links when they carry positive volume.
120
+ // With all-zero weights the division yielded NaN, which propagated to
121
+ // every node position and collapsed the chart; keep the initial y instead.
122
+ if (totalDepValue > 0) {
119
123
  const weightedY = deps.reduce((s, d) => {
120
124
  const sy = nodeY.get(d.source) ?? 0;
121
125
  const sh = nodeH.get(d.source) ?? 0;
122
126
  return s + (sy + sh / 2) * d.value;
123
- }, 0) / deps.reduce((s, d) => s + d.value, 0);
127
+ }, 0) / totalDepValue;
124
128
  nodeY.set(id, Math.max(0, weightedY - (nodeH.get(id) ?? 0) / 2));
125
129
  }
126
130
  }
@@ -112,6 +112,7 @@ export type ChartContainerProperties = {
112
112
  height?: number;
113
113
  aspectRatio?: number;
114
114
  minHeight?: number;
115
+ maxHeight?: number;
115
116
  testId?: string;
116
117
  classes?: string;
117
118
  children: Snippet;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { default as Button } from './Button/Button.svelte';
4
4
  export { default as Input } from './Input/Input.svelte';
5
5
  export { default as InputButton } from './InputButton/InputButton.svelte';
6
6
  export { default as ListItem } from './ListItem/ListItem.svelte';
7
+ export { default as KeyValue } from './KeyValue/KeyValue.svelte';
7
8
  export { default as Loader } from './Loader/Loader.svelte';
8
9
  export { default as Toolbar } from './Toolbar/Toolbar.svelte';
9
10
  export { default as Icon } from './Icon/Icon.svelte';
@@ -77,6 +78,7 @@ export type * from './Modal/properties';
77
78
  export type * from './Input/properties';
78
79
  export type * from './InputButton/properties';
79
80
  export type * from './ListItem/properties';
81
+ export type * from './KeyValue/properties';
80
82
  export type * from './types';
81
83
  export type * from './Icon/properties';
82
84
  export type * from './BrandLoader/properties';
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export { default as Button } from './Button/Button.svelte';
4
4
  export { default as Input } from './Input/Input.svelte';
5
5
  export { default as InputButton } from './InputButton/InputButton.svelte';
6
6
  export { default as ListItem } from './ListItem/ListItem.svelte';
7
+ export { default as KeyValue } from './KeyValue/KeyValue.svelte';
7
8
  export { default as Loader } from './Loader/Loader.svelte';
8
9
  export { default as Toolbar } from './Toolbar/Toolbar.svelte';
9
10
  export { default as Icon } from './Icon/Icon.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.80.1",
3
+ "version": "2.80.2",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",