@juspay/svelte-ui-components 4.29.1 → 4.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +15 -14
  2. package/dist/Accordion/Accordion.svelte +18 -0
  3. package/dist/AnimatedNumber/AnimatedNumber.svelte +702 -0
  4. package/dist/AnimatedNumber/AnimatedNumber.svelte.d.ts +4 -0
  5. package/dist/AnimatedNumber/motion.d.ts +47 -0
  6. package/dist/AnimatedNumber/motion.js +190 -0
  7. package/dist/AnimatedNumber/properties.d.ts +42 -0
  8. package/dist/AnimatedNumber/properties.js +1 -0
  9. package/dist/Badge/Badge.svelte +20 -3
  10. package/dist/Badge/properties.d.ts +9 -0
  11. package/dist/Book/Book.svelte +9 -0
  12. package/dist/Calendar/Calendar.svelte +34 -2
  13. package/dist/Carousel/Carousel.svelte +17 -2
  14. package/dist/ChatBubble/ChatBubble.svelte +12 -0
  15. package/dist/ChatComposer/ChatComposer.svelte +9 -0
  16. package/dist/CommandMenu/CommandMenu.svelte +13 -0
  17. package/dist/DateRangePicker/DateRangePicker.svelte +77 -20
  18. package/dist/DeltaIndicator/DeltaIndicator.svelte +12 -1
  19. package/dist/DeltaIndicator/properties.d.ts +9 -0
  20. package/dist/Gallery/Gallery.svelte +16 -0
  21. package/dist/Gauge/Gauge.svelte +21 -2
  22. package/dist/Gauge/properties.d.ts +13 -0
  23. package/dist/Input/Input.svelte +34 -26
  24. package/dist/KeyboardInput/KeyboardInput.svelte +1 -1
  25. package/dist/ListItem/ListItem.svelte +27 -2
  26. package/dist/ListItem/label.d.ts +11 -0
  27. package/dist/ListItem/label.js +40 -0
  28. package/dist/ListItem/properties.d.ts +52 -0
  29. package/dist/MediaUpload/MediaUpload.svelte +12 -1
  30. package/dist/MediaUpload/properties.d.ts +9 -0
  31. package/dist/Menu/Menu.svelte +11 -2
  32. package/dist/Modal/Modal.svelte +14 -4
  33. package/dist/PieChart/PieChart.svelte +16 -1
  34. package/dist/PieChart/properties.d.ts +13 -0
  35. package/dist/Progress/Progress.svelte +21 -1
  36. package/dist/Progress/properties.d.ts +12 -0
  37. package/dist/ProportionBar/ProportionBar.svelte +7 -1
  38. package/dist/ProportionBar/ProportionBar.svelte.d.ts +0 -19
  39. package/dist/ProportionBar/properties.d.ts +10 -0
  40. package/dist/Select/Select.svelte +23 -8
  41. package/dist/SplitButton/SplitButton.svelte +4 -1
  42. package/dist/SplitInput/SplitInput.svelte +1 -1
  43. package/dist/StatCard/StatCard.svelte +22 -4
  44. package/dist/StatCard/properties.d.ts +12 -0
  45. package/dist/Table/BuiltinCell.svelte +19 -2
  46. package/dist/Table/cellData.js +3 -0
  47. package/dist/Table/properties.d.ts +15 -0
  48. package/dist/Tabs/Tabs.svelte +16 -0
  49. package/dist/index.d.ts +2 -0
  50. package/dist/index.js +1 -0
  51. package/dist/styles/theme-dark.css +27 -3
  52. package/dist-codemod/codemod/migration-assets/legacy-display.css +2 -1
  53. package/dist-codemod/codemod/migration-assets/legacy-palette.css +4 -1
  54. package/dist-codemod/codemod/migration-assets/wc-display.json +5 -0
  55. package/dist-wc/index.js +1334 -754
  56. package/package.json +4 -2
package/README.md CHANGED
@@ -138,20 +138,21 @@ fix to something that did not work.
138
138
 
139
139
  ### Display & Data
140
140
 
141
- | Component | Description | Docs |
142
- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
143
- | **Avatar** | Circular avatar with image (Img with fallback) or text initial. | [docs](docs/Avatar.md) |
144
- | **Badge** | Icon with a numeric/text badge overlay in the corner. | [docs](docs/Badge.md) |
145
- | **GridItem** | Grid cell with icon, label, and loading overlay animation. | [docs](docs/GridItem.md) |
146
- | **Icon** | Clickable icon with optional text label. | [docs](docs/Icon.md) |
147
- | **IconStack** | Layered horizontal stack of overlapping circular icons/avatars. | [docs](docs/IconStack.md) |
148
- | **Img** | Image with automatic fallback on load error. | [docs](docs/Img.md) |
149
- | **ListItem** | Multi-section list row with images, labels, and accordion expansion. | [docs](docs/ListItem.md) |
150
- | **Pill** | Compact label/tag for status or categories, optionally clickable with a11y. | [docs](docs/Pill.md) |
151
- | **Status** | Full-screen status display for success/failure screens. | [docs](docs/Status.md) |
152
- | **Table** | Data table with keyed columns, built-in cell renderers, sorting, pagination and selection. | [docs](docs/Table.md) |
153
- | **RelativeTime** | Auto-updating relative time display ("5 minutes ago") with locale support and optional tooltip. | [docs](docs/RelativeTime.md) |
154
- | **AspectRatio** | Constrains content to a fixed width-to-height ratio using CSS `aspect-ratio`, reserving layout space before an image, video or iframe loads. | [docs](docs/AspectRatio.md) |
141
+ | Component | Description | Docs |
142
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
143
+ | **AnimatedNumber** | Per-digit odometer that rolls a number to its new value. Takes a number formatted through `Intl.NumberFormat`, or an already-formatted string. | [docs](docs/AnimatedNumber.md) |
144
+ | **Avatar** | Circular avatar with image (Img with fallback) or text initial. | [docs](docs/Avatar.md) |
145
+ | **Badge** | Icon with a numeric/text badge overlay in the corner. | [docs](docs/Badge.md) |
146
+ | **GridItem** | Grid cell with icon, label, and loading overlay animation. | [docs](docs/GridItem.md) |
147
+ | **Icon** | Clickable icon with optional text label. | [docs](docs/Icon.md) |
148
+ | **IconStack** | Layered horizontal stack of overlapping circular icons/avatars. | [docs](docs/IconStack.md) |
149
+ | **Img** | Image with automatic fallback on load error. | [docs](docs/Img.md) |
150
+ | **ListItem** | Multi-section list row with images, labels, and accordion expansion. | [docs](docs/ListItem.md) |
151
+ | **Pill** | Compact label/tag for status or categories, optionally clickable with a11y. | [docs](docs/Pill.md) |
152
+ | **Status** | Full-screen status display for success/failure screens. | [docs](docs/Status.md) |
153
+ | **Table** | Data table with keyed columns, built-in cell renderers, sorting, pagination and selection. | [docs](docs/Table.md) |
154
+ | **RelativeTime** | Auto-updating relative time display ("5 minutes ago") with locale support and optional tooltip. | [docs](docs/RelativeTime.md) |
155
+ | **AspectRatio** | Constrains content to a fixed width-to-height ratio using CSS `aspect-ratio`, reserving layout space before an image, video or iframe loads. | [docs](docs/AspectRatio.md) |
155
156
 
156
157
  ### Feedback & Loading
157
158
 
@@ -106,6 +106,24 @@
106
106
  grid-template-rows: 1fr;
107
107
  }
108
108
 
109
+ /* The expand/collapse is a real size change, which is what the preference is
110
+ about, and nothing was stopping it: DESIGN_PRINCIPLES.md section 1 reasons a
111
+ finite transition needs no guard because --motion-duration handles it, but
112
+ this rule reads --accordion-transition, and no stylesheet in this library
113
+ assigns either token -- both exist purely as fallback rungs for a consumer to
114
+ reach. Safe to drop outright because the transition is finite: the panel
115
+ lands open or closed rather than stranded part-way, unlike an indefinite
116
+ animation collapsed onto its 0% keyframe.
117
+
118
+ Declared on `.accordion` to match the base rule's specificity and placed
119
+ after it, so it wins; `.accordion.expanded` sets only grid-template-rows and
120
+ never re-declares the transition, so it cannot silently override this. */
121
+ @media (prefers-reduced-motion: reduce) {
122
+ .accordion {
123
+ transition: none;
124
+ }
125
+ }
126
+
109
127
  .accordion-content {
110
128
  min-height: 0;
111
129
  }