@devalok/shilp-sutra 0.31.0 → 0.33.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 (278) hide show
  1. package/LICENSE +21 -0
  2. package/dist/_chunks/badge-group.js +123 -172
  3. package/dist/_chunks/date-time-picker.js +851 -0
  4. package/dist/_chunks/document-preview.js +92 -0
  5. package/dist/_chunks/file-preview.js +511 -0
  6. package/dist/_chunks/image-preview.js +90 -0
  7. package/dist/_chunks/mention-suggestion.js +362 -0
  8. package/dist/_chunks/primitives.js +109 -109
  9. package/dist/_chunks/stat-row.js +144 -124
  10. package/dist/_chunks/tiptap.js +11595 -7731
  11. package/dist/_chunks/use-calendar.js +117 -890
  12. package/dist/_chunks/vendor-client.js +1055 -894
  13. package/dist/ai/block-renderer.d.ts +2 -1
  14. package/dist/ai/block-renderer.d.ts.map +1 -1
  15. package/dist/ai/block-renderer.js +30 -29
  16. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  17. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  18. package/dist/ai/blocks/divider.d.ts.map +1 -1
  19. package/dist/ai/blocks/error.d.ts.map +1 -1
  20. package/dist/ai/blocks/info.d.ts.map +1 -1
  21. package/dist/ai/blocks/loading.d.ts.map +1 -1
  22. package/dist/ai/blocks/stat-row.d.ts.map +1 -1
  23. package/dist/ai/blocks/success.d.ts.map +1 -1
  24. package/dist/ai/blocks/text.d.ts.map +1 -1
  25. package/dist/ai/command-bar.d.ts +18 -0
  26. package/dist/ai/command-bar.d.ts.map +1 -1
  27. package/dist/ai/command-bar.js +126 -125
  28. package/dist/ai/conversation.d.ts +13 -1
  29. package/dist/ai/conversation.d.ts.map +1 -1
  30. package/dist/ai/conversation.js +78 -78
  31. package/dist/ai/types.d.ts +0 -1
  32. package/dist/ai/types.d.ts.map +1 -1
  33. package/dist/ai/types.js +0 -1
  34. package/dist/composed/bulk-action-bar.d.ts +6 -4
  35. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  36. package/dist/composed/bulk-action-bar.js +102 -58
  37. package/dist/composed/command-palette.d.ts +9 -0
  38. package/dist/composed/command-palette.d.ts.map +1 -1
  39. package/dist/composed/command-palette.js +68 -68
  40. package/dist/composed/confirm-dialog.d.ts +1 -1
  41. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  42. package/dist/composed/confirm-dialog.js +10 -10
  43. package/dist/composed/date-picker/date-picker.d.ts +11 -1
  44. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  45. package/dist/composed/date-picker/index.js +9 -8
  46. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  47. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  48. package/dist/composed/deadline-indicator.d.ts +1 -1
  49. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  50. package/dist/composed/deadline-indicator.js +39 -36
  51. package/dist/composed/emoji-picker.d.ts +14 -2
  52. package/dist/composed/emoji-picker.d.ts.map +1 -1
  53. package/dist/composed/emoji-picker.js +66 -55
  54. package/dist/composed/error-boundary.d.ts +21 -1
  55. package/dist/composed/error-boundary.d.ts.map +1 -1
  56. package/dist/composed/error-boundary.js +47 -32
  57. package/dist/composed/extensions/emoji-data.d.ts +35 -0
  58. package/dist/composed/extensions/emoji-data.d.ts.map +1 -0
  59. package/dist/composed/extensions/emoji-node.d.ts +11 -0
  60. package/dist/composed/extensions/emoji-node.d.ts.map +1 -0
  61. package/dist/composed/extensions/emoji-suggestion.d.ts +4 -6
  62. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
  63. package/dist/composed/extensions/slash-command.d.ts +35 -0
  64. package/dist/composed/extensions/slash-command.d.ts.map +1 -0
  65. package/dist/composed/file-preview/audio-preview.d.ts +7 -0
  66. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
  67. package/dist/composed/file-preview/document-preview.d.ts +7 -0
  68. package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
  69. package/dist/composed/file-preview/embed-preview.d.ts +7 -0
  70. package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
  71. package/dist/composed/file-preview/image-preview.d.ts +7 -0
  72. package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
  73. package/dist/composed/file-preview/shared.d.ts +20 -0
  74. package/dist/composed/file-preview/shared.d.ts.map +1 -0
  75. package/dist/composed/file-preview/video-preview.d.ts +6 -0
  76. package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
  77. package/dist/composed/file-preview.d.ts.map +1 -1
  78. package/dist/composed/file-preview.js +10 -662
  79. package/dist/composed/filter-bar.d.ts +10 -2
  80. package/dist/composed/filter-bar.d.ts.map +1 -1
  81. package/dist/composed/filter-bar.js +42 -43
  82. package/dist/composed/form-section.d.ts +1 -1
  83. package/dist/composed/form-section.d.ts.map +1 -1
  84. package/dist/composed/form-section.js +22 -21
  85. package/dist/composed/index.d.ts +9 -3
  86. package/dist/composed/index.d.ts.map +1 -1
  87. package/dist/composed/index.js +79 -69
  88. package/dist/composed/inline-edit.d.ts +1 -1
  89. package/dist/composed/inline-edit.d.ts.map +1 -1
  90. package/dist/composed/inline-edit.js +33 -32
  91. package/dist/composed/markdown-viewer.d.ts +1 -1
  92. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  93. package/dist/composed/markdown-viewer.js +60 -59
  94. package/dist/composed/master-detail.d.ts +11 -7
  95. package/dist/composed/master-detail.d.ts.map +1 -1
  96. package/dist/composed/master-detail.js +123 -84
  97. package/dist/composed/responsive-overlay.d.ts +8 -0
  98. package/dist/composed/responsive-overlay.d.ts.map +1 -1
  99. package/dist/composed/rich-chat-input/attachment-strip.d.ts +15 -0
  100. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -0
  101. package/dist/composed/rich-chat-input/audio-player.d.ts +11 -0
  102. package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -0
  103. package/dist/composed/rich-chat-input/audio-waveform.d.ts +24 -0
  104. package/dist/composed/rich-chat-input/audio-waveform.d.ts.map +1 -0
  105. package/dist/composed/rich-chat-input/chat-toolbar.d.ts +51 -0
  106. package/dist/composed/rich-chat-input/chat-toolbar.d.ts.map +1 -0
  107. package/dist/composed/rich-chat-input/recording-overlay.d.ts +15 -0
  108. package/dist/composed/rich-chat-input/recording-overlay.d.ts.map +1 -0
  109. package/dist/composed/rich-chat-input/reply-banner.d.ts +8 -0
  110. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -0
  111. package/dist/composed/rich-chat-input/schedule-send.d.ts +22 -0
  112. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -0
  113. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts +18 -0
  114. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts.map +1 -0
  115. package/dist/composed/rich-chat-input.d.ts +91 -0
  116. package/dist/composed/rich-chat-input.d.ts.map +1 -0
  117. package/dist/composed/rich-chat-input.js +1861 -0
  118. package/dist/composed/rich-text-editor.d.ts +14 -3
  119. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  120. package/dist/composed/rich-text-editor.js +278 -447
  121. package/dist/composed/schedule-view.d.ts +9 -1
  122. package/dist/composed/schedule-view.d.ts.map +1 -1
  123. package/dist/hooks/index.d.ts +2 -0
  124. package/dist/hooks/index.d.ts.map +1 -1
  125. package/dist/hooks/index.js +8 -4
  126. package/dist/hooks/use-touch-device.d.ts +12 -0
  127. package/dist/hooks/use-touch-device.d.ts.map +1 -0
  128. package/dist/hooks/use-touch-device.js +13 -0
  129. package/dist/hooks/use-viewport-height.d.ts +11 -0
  130. package/dist/hooks/use-viewport-height.d.ts.map +1 -0
  131. package/dist/hooks/use-viewport-height.js +16 -0
  132. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  133. package/dist/shell/bottom-navbar.js +72 -63
  134. package/dist/shell/command-registry.d.ts.map +1 -1
  135. package/dist/shell/notification-center.d.ts.map +1 -1
  136. package/dist/shell/notification-center.js +77 -77
  137. package/dist/shell/top-bar.d.ts +2 -2
  138. package/dist/shell/top-bar.d.ts.map +1 -1
  139. package/dist/shell/top-bar.js +61 -60
  140. package/dist/tailwind/index.cjs +51 -7
  141. package/dist/tailwind/preset.d.ts.map +1 -1
  142. package/dist/tailwind/preset.js +51 -7
  143. package/dist/tokens/primitives.css +3 -1
  144. package/dist/tokens/semantic.css +16 -13
  145. package/dist/ui/autocomplete.d.ts.map +1 -1
  146. package/dist/ui/autocomplete.js +38 -39
  147. package/dist/ui/badge.d.ts +104 -2
  148. package/dist/ui/badge.d.ts.map +1 -1
  149. package/dist/ui/banner.d.ts.map +1 -1
  150. package/dist/ui/banner.js +8 -7
  151. package/dist/ui/button-group.d.ts +27 -37
  152. package/dist/ui/button-group.d.ts.map +1 -1
  153. package/dist/ui/button-group.js +95 -29
  154. package/dist/ui/button.d.ts +2 -2
  155. package/dist/ui/button.d.ts.map +1 -1
  156. package/dist/ui/button.js +118 -134
  157. package/dist/ui/card.js +24 -24
  158. package/dist/ui/charts/area-chart.d.ts +2 -0
  159. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  160. package/dist/ui/charts/bar-chart.d.ts +2 -0
  161. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  162. package/dist/ui/charts/chart-container.d.ts +2 -0
  163. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  164. package/dist/ui/charts/index.js +583 -577
  165. package/dist/ui/charts/line-chart.d.ts +2 -0
  166. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  167. package/dist/ui/charts/pie-chart.d.ts +2 -0
  168. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  169. package/dist/ui/charts/radar-chart.d.ts +2 -0
  170. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  171. package/dist/ui/checkbox.d.ts +2 -0
  172. package/dist/ui/checkbox.d.ts.map +1 -1
  173. package/dist/ui/checkbox.js +36 -27
  174. package/dist/ui/color-input.js +5 -5
  175. package/dist/ui/combobox.d.ts +6 -1
  176. package/dist/ui/combobox.d.ts.map +1 -1
  177. package/dist/ui/combobox.js +1 -1
  178. package/dist/ui/context-menu.js +1 -1
  179. package/dist/ui/data-table-body.d.ts +12 -0
  180. package/dist/ui/data-table-body.d.ts.map +1 -0
  181. package/dist/ui/data-table-body.js +219 -0
  182. package/dist/ui/data-table-bulk-actions.d.ts +19 -0
  183. package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
  184. package/dist/ui/data-table-bulk-actions.js +61 -0
  185. package/dist/ui/data-table-card.d.ts +9 -0
  186. package/dist/ui/data-table-card.d.ts.map +1 -0
  187. package/dist/ui/data-table-card.js +73 -0
  188. package/dist/ui/data-table-context.d.ts +62 -0
  189. package/dist/ui/data-table-context.d.ts.map +1 -0
  190. package/dist/ui/data-table-context.js +48 -0
  191. package/dist/ui/data-table-header.d.ts +10 -0
  192. package/dist/ui/data-table-header.d.ts.map +1 -0
  193. package/dist/ui/data-table-header.js +141 -0
  194. package/dist/ui/data-table-pagination.d.ts +13 -0
  195. package/dist/ui/data-table-pagination.d.ts.map +1 -0
  196. package/dist/ui/data-table-pagination.js +84 -0
  197. package/dist/ui/data-table.d.ts +11 -9
  198. package/dist/ui/data-table.d.ts.map +1 -1
  199. package/dist/ui/data-table.js +258 -573
  200. package/dist/ui/dialog.d.ts +6 -2
  201. package/dist/ui/dialog.d.ts.map +1 -1
  202. package/dist/ui/dialog.js +84 -82
  203. package/dist/ui/dropdown-menu.js +1 -1
  204. package/dist/ui/hover-card.d.ts +7 -0
  205. package/dist/ui/hover-card.d.ts.map +1 -1
  206. package/dist/ui/hover-card.js +3 -3
  207. package/dist/ui/icon-group.d.ts +2 -4
  208. package/dist/ui/icon-group.d.ts.map +1 -1
  209. package/dist/ui/icon-group.js +22 -23
  210. package/dist/ui/index.d.ts +2 -2
  211. package/dist/ui/index.d.ts.map +1 -1
  212. package/dist/ui/index.js +324 -327
  213. package/dist/ui/label.js +1 -1
  214. package/dist/ui/lib/bottom-sheet.d.ts +16 -0
  215. package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
  216. package/dist/ui/menubar.d.ts.map +1 -1
  217. package/dist/ui/menubar.js +64 -73
  218. package/dist/ui/navigation-menu.d.ts.map +1 -1
  219. package/dist/ui/navigation-menu.js +40 -44
  220. package/dist/ui/number-input.d.ts.map +1 -1
  221. package/dist/ui/number-input.js +19 -17
  222. package/dist/ui/popover.d.ts.map +1 -1
  223. package/dist/ui/popover.js +107 -32
  224. package/dist/ui/progress-ring.d.ts.map +1 -1
  225. package/dist/ui/progress-ring.js +80 -80
  226. package/dist/ui/progress.js +4 -4
  227. package/dist/ui/radio.d.ts +5 -2
  228. package/dist/ui/radio.d.ts.map +1 -1
  229. package/dist/ui/radio.js +29 -20
  230. package/dist/ui/search-input.d.ts.map +1 -1
  231. package/dist/ui/search-input.js +13 -12
  232. package/dist/ui/segmented-control.d.ts +6 -108
  233. package/dist/ui/segmented-control.d.ts.map +1 -1
  234. package/dist/ui/segmented-control.js +86 -272
  235. package/dist/ui/select.js +5 -5
  236. package/dist/ui/separator.js +5 -5
  237. package/dist/ui/sheet.d.ts +2 -0
  238. package/dist/ui/sheet.d.ts.map +1 -1
  239. package/dist/ui/sheet.js +102 -84
  240. package/dist/ui/sidebar.d.ts.map +1 -1
  241. package/dist/ui/sidebar.js +200 -175
  242. package/dist/ui/slider.js +14 -14
  243. package/dist/ui/split-button.d.ts +45 -0
  244. package/dist/ui/split-button.d.ts.map +1 -0
  245. package/dist/ui/split-button.js +282 -0
  246. package/dist/ui/status-dot.js +8 -8
  247. package/dist/ui/stepper.d.ts.map +1 -1
  248. package/dist/ui/stepper.js +33 -31
  249. package/dist/ui/switch.js +3 -3
  250. package/dist/ui/tabs.js +6 -6
  251. package/dist/ui/toast-types.d.ts +0 -1
  252. package/dist/ui/toast-types.d.ts.map +1 -1
  253. package/dist/ui/toast-types.js +0 -1
  254. package/dist/ui/toast.d.ts.map +1 -1
  255. package/dist/ui/toast.js +156 -150
  256. package/dist/ui/toggle-group.js +1 -1
  257. package/dist/ui/toggle.js +1 -1
  258. package/dist/ui/tooltip.js +3 -3
  259. package/docs/components/composed/emoji-picker.md +9 -0
  260. package/docs/components/composed/rich-chat-input.md +88 -0
  261. package/docs/components/composed/rich-text-editor.md +5 -0
  262. package/docs/components/ui/button-group.md +9 -0
  263. package/docs/components/ui/button.md +4 -0
  264. package/docs/components/ui/data-table-body.md +13 -0
  265. package/docs/components/ui/data-table-bulk-actions.md +13 -0
  266. package/docs/components/ui/data-table-card.md +13 -0
  267. package/docs/components/ui/data-table-context.md +13 -0
  268. package/docs/components/ui/data-table-header.md +13 -0
  269. package/docs/components/ui/data-table-pagination.md +13 -0
  270. package/docs/components/ui/split-button.md +41 -0
  271. package/llms-full.txt +235 -48
  272. package/llms.txt +54 -2
  273. package/package.json +30 -31
  274. package/dist/ui/chip.d.ts +0 -19
  275. package/dist/ui/chip.d.ts.map +0 -1
  276. package/dist/ui/chip.js +0 -14
  277. package/dist/ui/lib/use-ripple.d.ts +0 -14
  278. package/dist/ui/lib/use-ripple.d.ts.map +0 -1
package/dist/ui/slider.js CHANGED
@@ -1,28 +1,28 @@
1
1
  "use client";
2
2
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
3
  import * as f from "react";
4
- import { aE as r, aF as m, aG as b, aH as u } from "../_chunks/primitives.js";
5
- import { cn as h } from "./lib/utils.js";
6
- const v = f.forwardRef(({ className: i, "aria-label": l, value: a, defaultValue: o, ...n }, t) => {
7
- const s = (a ?? o ?? [0]).length;
4
+ import { aD as s, aE as b, aF as u, aG as h } from "../_chunks/primitives.js";
5
+ import { cn as m } from "./lib/utils.js";
6
+ const v = f.forwardRef(({ className: i, "aria-label": l, value: a, defaultValue: o, ...t }, n) => {
7
+ const r = (a ?? o ?? [0]).length;
8
8
  return /* @__PURE__ */ d(
9
- r,
9
+ s,
10
10
  {
11
- ref: t,
11
+ ref: n,
12
12
  value: a,
13
13
  defaultValue: o,
14
- className: h(
14
+ className: m(
15
15
  "relative flex w-full touch-none select-none items-center",
16
16
  i
17
17
  ),
18
- ...n,
18
+ ...t,
19
19
  children: [
20
- /* @__PURE__ */ e(m, { className: "relative h-ds-02b w-full grow overflow-hidden rounded-ds-full bg-surface-raised-hover", children: /* @__PURE__ */ e(b, { className: "absolute h-full bg-accent-9" }) }),
21
- Array.from({ length: s }, (g, c) => /* @__PURE__ */ e(
22
- u,
20
+ /* @__PURE__ */ e(b, { className: "relative h-ds-02b w-full grow overflow-hidden rounded-ds-full bg-surface-raised-hover", children: /* @__PURE__ */ e(u, { className: "absolute h-full bg-accent-9" }) }),
21
+ Array.from({ length: r }, (g, c) => /* @__PURE__ */ e(
22
+ h,
23
23
  {
24
- "aria-label": s === 1 ? l : void 0,
25
- className: "block h-ico-sm w-ico-sm rounded-ds-full border-2 border-accent-7 bg-surface-overlay shadow-raised transition-[color,transform,box-shadow] duration-fast-02 ease-productive-standard hover:scale-110 hover:shadow-raised-hover active:scale-[1.15] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled"
24
+ "aria-label": r === 1 ? l : void 0,
25
+ className: "touch-target block h-6 w-6 rounded-ds-full border-2 border-accent-7 bg-surface-overlay shadow-raised transition-[color,transform,box-shadow] duration-fast-02 ease-productive-standard hover:scale-110 hover:shadow-raised-hover active:scale-[1.15] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled"
26
26
  },
27
27
  c
28
28
  ))
@@ -30,7 +30,7 @@ const v = f.forwardRef(({ className: i, "aria-label": l, value: a, defaultValue:
30
30
  }
31
31
  );
32
32
  });
33
- v.displayName = r.displayName;
33
+ v.displayName = s.displayName;
34
34
  export {
35
35
  v as Slider
36
36
  };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { Placement } from '@floating-ui/dom';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { buttonVariants } from './button';
5
+ import * as React from 'react';
6
+ type SplitButtonVariant = 'solid' | 'soft' | 'outline';
7
+ type SplitButtonColor = NonNullable<VariantProps<typeof buttonVariants>['color']>;
8
+ type SplitButtonSize = 'xs' | 'sm' | 'md' | 'icon-xs' | 'icon-sm' | 'icon-md';
9
+ export interface SplitButtonProps {
10
+ /** Primary action content (left side). */
11
+ children: React.ReactNode;
12
+ /** Primary click handler (left side). */
13
+ onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
14
+ /** Content rendered inside the floating dropdown panel. */
15
+ dropdownContent?: React.ReactNode;
16
+ /** Controlled open state. */
17
+ open?: boolean;
18
+ /** Called when open state changes. Uncontrolled if omitted. */
19
+ onOpenChange?: (open: boolean) => void;
20
+ /** @default 'solid' */
21
+ variant?: SplitButtonVariant;
22
+ /** @default 'accent' */
23
+ color?: SplitButtonColor;
24
+ /** @default 'md' */
25
+ size?: SplitButtonSize;
26
+ /** Disable both halves. */
27
+ disabled?: boolean;
28
+ /** aria-label for the primary button. */
29
+ 'aria-label'?: string;
30
+ /** aria-label for the dropdown trigger. @default 'More options' */
31
+ dropdownLabel?: string;
32
+ /** Custom icon for the dropdown trigger. Defaults to chevron-down. */
33
+ dropdownIcon?: React.ReactNode;
34
+ /** Which side the dropdown trigger sits on. @default 'right' */
35
+ triggerSide?: 'left' | 'right';
36
+ /** Preferred placement for the dropdown panel. @default 'top-end' */
37
+ placement?: Placement;
38
+ /** Width of the trigger (chevron) half. @default 'auto' */
39
+ triggerWidth?: number | string;
40
+ className?: string;
41
+ }
42
+ declare const SplitButton: React.ForwardRefExoticComponent<SplitButtonProps & React.RefAttributes<HTMLDivElement>>;
43
+ export { SplitButton };
44
+ export type { SplitButtonVariant, SplitButtonColor, SplitButtonSize };
45
+ //# sourceMappingURL=split-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-button.d.ts","sourceRoot":"","sources":["../../src/ui/split-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEnG,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAKzC,KAAK,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;AACtD,KAAK,gBAAgB,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;AACjF,KAAK,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAE7E,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yCAAyC;IACzC,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IACzD,2DAA2D;IAC3D,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjC,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,+DAA+D;IAC/D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,uBAAuB;IACvB,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,wBAAwB;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,oBAAoB;IACpB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,sEAAsE;IACtE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,qEAAqE;IACrE,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2FD,QAAA,MAAM,WAAW,yFAuNhB,CAAA;AAID,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,282 @@
1
+ "use client";
2
+ import { jsxs as m, Fragment as C, jsx as s } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ import { d as G, q as J, i as Q, e as T, g as V } from "../_chunks/vendor-client.js";
5
+ import { cn as o } from "./lib/utils.js";
6
+ import { A as X, m as Y } from "../_chunks/framer.js";
7
+ const A = {
8
+ solid: {
9
+ accent: "bg-accent-11/20",
10
+ error: "bg-error-11/20",
11
+ success: "bg-success-11/20",
12
+ warning: "bg-warning-11/20",
13
+ neutral: "bg-neutral-8/30"
14
+ },
15
+ soft: {
16
+ accent: "bg-accent-6",
17
+ error: "bg-error-6",
18
+ success: "bg-success-6",
19
+ warning: "bg-warning-6",
20
+ neutral: "bg-surface-border"
21
+ },
22
+ outline: {
23
+ accent: "bg-accent-7",
24
+ error: "bg-error-7",
25
+ success: "bg-success-7",
26
+ warning: "bg-warning-7",
27
+ neutral: "bg-surface-border-strong"
28
+ }
29
+ }, N = {
30
+ xs: "h-ds-xs-plus",
31
+ sm: "h-ds-sm",
32
+ md: "h-ds-md",
33
+ "icon-xs": "h-ds-xs-plus",
34
+ "icon-sm": "h-ds-sm",
35
+ "icon-md": "h-ds-md"
36
+ }, Z = {
37
+ xs: "text-ds-sm",
38
+ sm: "text-ds-sm",
39
+ md: "text-ds-md",
40
+ "icon-xs": "text-ds-sm",
41
+ "icon-sm": "text-ds-sm",
42
+ "icon-md": "text-ds-md"
43
+ }, _ = {
44
+ xs: "px-ds-03 gap-1",
45
+ sm: "px-ds-04 gap-1.5",
46
+ md: "px-ds-05 gap-2",
47
+ "icon-xs": "px-ds-02",
48
+ "icon-sm": "px-ds-03",
49
+ "icon-md": "px-ds-04"
50
+ }, I = {
51
+ xs: "px-ds-02",
52
+ sm: "px-ds-02",
53
+ md: "px-ds-03",
54
+ "icon-xs": "px-ds-01",
55
+ "icon-sm": "px-ds-02",
56
+ "icon-md": "px-ds-02"
57
+ }, W = {
58
+ xs: "rounded-ds-md",
59
+ sm: "rounded-ds-md",
60
+ md: "rounded-ds-lg",
61
+ "icon-xs": "rounded-ds-sm",
62
+ "icon-sm": "rounded-ds-md",
63
+ "icon-md": "rounded-ds-md"
64
+ };
65
+ function z(c, i) {
66
+ const u = {
67
+ solid: {
68
+ accent: "bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-11",
69
+ error: "bg-error-9 text-error-fg hover:bg-error-10 active:bg-error-11",
70
+ success: "bg-success-9 text-success-fg hover:bg-success-10 active:bg-success-11",
71
+ warning: "bg-warning-9 text-warning-fg hover:bg-warning-10 active:bg-warning-11",
72
+ neutral: "bg-neutral-5 text-surface-fg hover:bg-neutral-7 active:bg-neutral-8"
73
+ },
74
+ soft: {
75
+ accent: "bg-accent-3 text-accent-11 hover:bg-accent-4 active:bg-accent-5",
76
+ error: "bg-error-3 text-error-11 hover:bg-error-4 active:bg-error-5",
77
+ success: "bg-success-3 text-success-11 hover:bg-success-4 active:bg-success-5",
78
+ warning: "bg-warning-3 text-warning-11 hover:bg-warning-4 active:bg-warning-5",
79
+ neutral: "bg-surface-raised-hover text-surface-fg-muted hover:bg-surface-raised-active active:bg-neutral-5"
80
+ },
81
+ outline: {
82
+ accent: "bg-transparent text-accent-11 hover:bg-accent-3 active:bg-accent-4",
83
+ error: "bg-transparent text-error-11 hover:bg-error-3 active:bg-error-4",
84
+ success: "bg-transparent text-success-11 hover:bg-success-3 active:bg-success-4",
85
+ warning: "bg-transparent text-warning-11 hover:bg-warning-3 active:bg-warning-4",
86
+ neutral: "bg-transparent text-surface-fg hover:bg-surface-raised-hover active:bg-surface-raised-active"
87
+ }
88
+ };
89
+ return u[c][i] ?? u[c].accent;
90
+ }
91
+ function ee(c) {
92
+ const i = {
93
+ accent: "border-accent-7",
94
+ error: "border-error-7",
95
+ success: "border-success-7",
96
+ warning: "border-warning-7",
97
+ neutral: "border-surface-border-strong"
98
+ };
99
+ return i[c] ?? i.accent;
100
+ }
101
+ function M({ className: c }) {
102
+ return /* @__PURE__ */ s("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", className: c, "aria-hidden": "true", children: /* @__PURE__ */ s("path", { d: "M3 4.5L6 7.5L9 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
103
+ }
104
+ const se = n.forwardRef(
105
+ function({
106
+ children: i,
107
+ onClick: u,
108
+ dropdownContent: E,
109
+ open: j,
110
+ onOpenChange: p,
111
+ variant: l = "solid",
112
+ color: v = "accent",
113
+ size: r = "md",
114
+ disabled: x = !1,
115
+ "aria-label": L,
116
+ dropdownLabel: R = "More options",
117
+ dropdownIcon: B,
118
+ triggerSide: O = "right",
119
+ placement: S = "top-end",
120
+ triggerWidth: g,
121
+ className: q
122
+ }, D) {
123
+ const [F, H] = n.useState(!1), h = j !== void 0, e = h ? j : F, b = n.useRef(null), f = n.useRef(null), w = n.useId(), d = n.useCallback(
124
+ (t) => {
125
+ p && p(t), h || H(t);
126
+ },
127
+ [p, h]
128
+ );
129
+ n.useEffect(() => {
130
+ if (!e || !b.current || !f.current) return;
131
+ const t = b.current, a = f.current;
132
+ return G(t, a, () => {
133
+ J(t, a, {
134
+ placement: S,
135
+ middleware: [
136
+ Q(8),
137
+ T({ fallbackPlacements: ["bottom-end", "top-start", "bottom-start"] }),
138
+ V({ padding: 8 })
139
+ ]
140
+ }).then(({ x: K, y: U }) => {
141
+ Object.assign(a.style, { left: `${K}px`, top: `${U}px` });
142
+ });
143
+ });
144
+ }, [e, S]), n.useEffect(() => {
145
+ if (!e) return;
146
+ const t = (a) => {
147
+ const k = a.target;
148
+ b.current?.contains(k) || f.current?.contains(k) || d(!1);
149
+ };
150
+ return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
151
+ }, [e, d]), n.useEffect(() => {
152
+ if (!e) return;
153
+ const t = (a) => {
154
+ a.key === "Escape" && d(!1);
155
+ };
156
+ return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
157
+ }, [e, d]);
158
+ const y = z(l, v), $ = A[l][v] ?? A[l].accent, P = g != null ? { width: typeof g == "number" ? `${g}px` : g } : void 0;
159
+ return /* @__PURE__ */ m(C, { children: [
160
+ /* @__PURE__ */ s(
161
+ "div",
162
+ {
163
+ ref: D,
164
+ role: "group",
165
+ "aria-label": L ?? void 0,
166
+ className: o("relative inline-flex", q),
167
+ children: /* @__PURE__ */ m(
168
+ "div",
169
+ {
170
+ ref: b,
171
+ className: o(
172
+ "inline-flex items-stretch overflow-hidden",
173
+ W[r],
174
+ l === "solid" && "shadow-raised",
175
+ l === "outline" && `border ${ee(v)}`
176
+ ),
177
+ children: [
178
+ O === "left" && /* @__PURE__ */ m(C, { children: [
179
+ /* @__PURE__ */ s(
180
+ "button",
181
+ {
182
+ type: "button",
183
+ onClick: () => d(!e),
184
+ disabled: x,
185
+ "aria-label": R,
186
+ "aria-haspopup": "menu",
187
+ "aria-expanded": e,
188
+ "aria-controls": e ? w : void 0,
189
+ className: o(
190
+ "inline-flex items-center justify-center select-none",
191
+ "transition-colors duration-fast-01 ease-productive-standard",
192
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-inset",
193
+ "disabled:pointer-events-none disabled:opacity-action-disabled",
194
+ y,
195
+ N[r],
196
+ I[r]
197
+ ),
198
+ style: P,
199
+ children: B ?? /* @__PURE__ */ s(M, {})
200
+ }
201
+ ),
202
+ /* @__PURE__ */ s("div", { className: o("w-px self-stretch", $) })
203
+ ] }),
204
+ /* @__PURE__ */ s(
205
+ "button",
206
+ {
207
+ type: "button",
208
+ onClick: u,
209
+ disabled: x,
210
+ "aria-label": L,
211
+ className: o(
212
+ "inline-flex items-center justify-center font-semibold select-none whitespace-nowrap",
213
+ "transition-colors duration-fast-01 ease-productive-standard",
214
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-inset",
215
+ "disabled:pointer-events-none disabled:opacity-action-disabled",
216
+ y,
217
+ N[r],
218
+ Z[r],
219
+ _[r]
220
+ ),
221
+ children: i
222
+ }
223
+ ),
224
+ O === "right" && /* @__PURE__ */ m(C, { children: [
225
+ /* @__PURE__ */ s("div", { className: o("w-px self-stretch", $) }),
226
+ /* @__PURE__ */ s(
227
+ "button",
228
+ {
229
+ type: "button",
230
+ onClick: () => d(!e),
231
+ disabled: x,
232
+ "aria-label": R,
233
+ "aria-haspopup": "menu",
234
+ "aria-expanded": e,
235
+ "aria-controls": e ? w : void 0,
236
+ className: o(
237
+ "inline-flex items-center justify-center select-none",
238
+ "transition-colors duration-fast-01 ease-productive-standard",
239
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-inset",
240
+ "disabled:pointer-events-none disabled:opacity-action-disabled",
241
+ y,
242
+ N[r],
243
+ I[r]
244
+ ),
245
+ style: P,
246
+ children: B ?? /* @__PURE__ */ s(M, {})
247
+ }
248
+ )
249
+ ] })
250
+ ]
251
+ }
252
+ )
253
+ }
254
+ ),
255
+ /* @__PURE__ */ s(X, { children: e && E && /* @__PURE__ */ s(
256
+ "div",
257
+ {
258
+ ref: f,
259
+ id: w,
260
+ role: "menu",
261
+ className: "fixed z-popover",
262
+ style: { top: 0, left: 0 },
263
+ children: /* @__PURE__ */ s(
264
+ Y.div,
265
+ {
266
+ initial: { opacity: 0, scale: 0.95 },
267
+ animate: { opacity: 1, scale: 1 },
268
+ exit: { opacity: 0, scale: 0.95 },
269
+ transition: { duration: 0.15 },
270
+ className: "rounded-ds-lg border border-surface-border-strong bg-surface-overlay shadow-floating",
271
+ children: E
272
+ }
273
+ )
274
+ }
275
+ ) })
276
+ ] });
277
+ }
278
+ );
279
+ se.displayName = "SplitButton";
280
+ export {
281
+ se as SplitButton
282
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as l, jsx as n } from "react/jsx-runtime";
3
3
  import * as b from "react";
4
- import { cn as r } from "./lib/utils.js";
4
+ import { cn as t } from "./lib/utils.js";
5
5
  const f = {
6
6
  healthy: "bg-success-9",
7
7
  warning: "bg-warning-9",
@@ -31,15 +31,15 @@ const f = {
31
31
  md: { dot: "h-2 w-2", pulse: "h-2 w-2", text: "text-ds-sm" },
32
32
  lg: { dot: "h-2.5 w-2.5", pulse: "h-2.5 w-2.5", text: "text-ds-sm" }
33
33
  }, C = b.forwardRef(
34
- ({ status: e, size: s = "md", variant: i = "filled", pulse: o, label: t, labelClassName: c, className: d, "aria-label": u, ...g }, p) => {
35
- const x = o ?? e === "healthy", a = N[s], h = t ? `${t} — ${e}` : `Status: ${e}`, m = i === "ring" ? r("relative inline-flex rounded-full border-[1.5px]", a.dot, v[e], "bg-transparent") : r("relative inline-flex rounded-full", a.dot, f[e]);
34
+ ({ status: e, size: s = "md", variant: i = "filled", pulse: o, label: r, labelClassName: c, className: d, "aria-label": u, ...g }, p) => {
35
+ const x = o ?? e === "healthy", a = N[s], m = r ? `${r} — ${e}` : `Status: ${e}`, h = i === "ring" ? t("relative inline-flex rounded-full border-[1.5px]", a.dot, v[e], "bg-transparent") : t("relative inline-flex rounded-full", a.dot, f[e]);
36
36
  return /* @__PURE__ */ l(
37
37
  "span",
38
38
  {
39
39
  ref: p,
40
40
  role: "status",
41
- "aria-label": u ?? h,
42
- className: r("inline-flex items-center gap-ds-02", d),
41
+ "aria-label": u ?? m,
42
+ className: t("inline-flex items-center gap-ds-02", d),
43
43
  ...g,
44
44
  children: [
45
45
  /* @__PURE__ */ l("span", { className: "relative inline-flex shrink-0", children: [
@@ -47,12 +47,12 @@ const f = {
47
47
  "span",
48
48
  {
49
49
  "data-pulse": "",
50
- className: r("absolute inline-flex rounded-full animate-ping", a.pulse, y[e])
50
+ className: t("absolute inline-flex rounded-full animate-ping motion-reduce:animate-none", a.pulse, y[e])
51
51
  }
52
52
  ),
53
- /* @__PURE__ */ n("span", { className: m })
53
+ /* @__PURE__ */ n("span", { className: h })
54
54
  ] }),
55
- t && /* @__PURE__ */ n("span", { className: r(a.text, w[e], "font-sans", c), children: t })
55
+ r && /* @__PURE__ */ n("span", { className: t(a.text, w[e], "font-sans", c), children: r })
56
56
  ]
57
57
  }
58
58
  );
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/ui/stepper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,UAAU,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjE,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,OAAO,qFAyDZ,CAAA;AAED;;;;;;;;;;;GAWG;AACH,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAID,QAAA,MAAM,IAAI,kFA4ET,CAAA;AAED;;;;;;;;;;;GAWG;AACH,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAmBD,iBAAS,cAAc,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAyB/E;kBAzBQ,cAAc;;;AA+BvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/ui/stepper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,UAAU,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjE,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,OAAO,qFAyDZ,CAAA;AAED;;;;;;;;;;;GAWG;AACH,UAAU,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAID,QAAA,MAAM,IAAI,kFA8ET,CAAA;AAED;;;;;;;;;;;GAWG;AACH,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAmBD,iBAAS,cAAc,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAyB/E;kBAzBQ,cAAc;;;AA+BvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,mBAAmB,EAAE,CAAA"}
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as u } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
- import { cn as a } from "./lib/utils.js";
4
+ import { cn as i } from "./lib/utils.js";
5
5
  import { springs as x } from "./lib/motion.js";
6
- import { m as h, A as N } from "../_chunks/framer.js";
6
+ import { m as v, A as N } from "../_chunks/framer.js";
7
7
  const b = s.createContext({
8
8
  activeStep: 0,
9
9
  orientation: "horizontal",
10
10
  stepperId: ""
11
11
  }), y = s.forwardRef(
12
- ({ activeStep: e, orientation: r = "horizontal", className: d, children: i, ...o }, g) => {
13
- const c = s.Children.toArray(i), p = s.useId(), f = s.useMemo(
12
+ ({ activeStep: e, orientation: r = "horizontal", className: d, children: o, ...c }, g) => {
13
+ const a = s.Children.toArray(o), p = s.useId(), f = s.useMemo(
14
14
  () => ({ activeStep: e, orientation: r, stepperId: p }),
15
15
  [e, r, p]
16
16
  );
@@ -18,28 +18,28 @@ const b = s.createContext({
18
18
  "div",
19
19
  {
20
20
  ref: g,
21
- className: a(
21
+ className: i(
22
22
  "flex gap-ds-02",
23
23
  r === "vertical" ? "flex-col" : "flex-row items-center",
24
24
  d
25
25
  ),
26
26
  role: "list",
27
- ...o,
28
- children: c.map((m, l) => /* @__PURE__ */ u(s.Fragment, { children: [
27
+ ...c,
28
+ children: a.map((m, l) => /* @__PURE__ */ u(s.Fragment, { children: [
29
29
  s.isValidElement(m) ? s.cloneElement(m, { _index: l }) : m,
30
- l < c.length - 1 && /* @__PURE__ */ t(
30
+ l < a.length - 1 && /* @__PURE__ */ t(
31
31
  "div",
32
32
  {
33
- className: a(
33
+ className: i(
34
34
  "relative flex-1 overflow-hidden",
35
35
  r === "vertical" ? "ml-ds-04 w-ds-01 min-h-ds-05" : "h-ds-01 min-w-ds-05",
36
36
  "bg-surface-border"
37
37
  ),
38
38
  "aria-hidden": "true",
39
39
  children: /* @__PURE__ */ t(
40
- h.div,
40
+ v.div,
41
41
  {
42
- className: a(
42
+ className: i(
43
43
  "absolute inset-0 bg-accent-9",
44
44
  r === "vertical" ? "origin-top" : "origin-left"
45
45
  ),
@@ -57,8 +57,8 @@ const b = s.createContext({
57
57
  ) });
58
58
  }
59
59
  ), w = s.forwardRef(
60
- ({ label: e, description: r, icon: d, className: i, ...o }, g) => {
61
- const { _index: c = 0, ...p } = o, { activeStep: f, orientation: m, stepperId: l } = s.useContext(b), n = c < f ? "completed" : c === f ? "active" : "pending";
60
+ ({ label: e, description: r, icon: d, className: o, ...c }, g) => {
61
+ const { _index: a = 0, ...p } = c, { activeStep: f, orientation: m, stepperId: l } = s.useContext(b), n = a < f ? "completed" : a === f ? "active" : "pending";
62
62
  return /* @__PURE__ */ u(
63
63
  "div",
64
64
  {
@@ -66,17 +66,19 @@ const b = s.createContext({
66
66
  "data-step": "",
67
67
  "data-state": n,
68
68
  role: "listitem",
69
- className: a(
69
+ "aria-current": n === "active" ? "step" : void 0,
70
+ "aria-label": `Step ${a + 1}: ${e}, ${n === "completed" ? "completed" : n === "active" ? "current" : "upcoming"}`,
71
+ className: i(
70
72
  "flex items-center gap-ds-03",
71
73
  m === "vertical" && "py-ds-02",
72
- i
74
+ o
73
75
  ),
74
76
  ...p,
75
77
  children: [
76
78
  /* @__PURE__ */ u(
77
79
  "div",
78
80
  {
79
- className: a(
81
+ className: i(
80
82
  "relative flex-shrink-0 flex items-center justify-center w-ds-sm h-ds-sm rounded-ds-full text-ds-sm font-semibold",
81
83
  n === "completed" && "bg-accent-9 text-accent-fg",
82
84
  n === "active" && "text-accent-fg",
@@ -84,7 +86,7 @@ const b = s.createContext({
84
86
  ),
85
87
  children: [
86
88
  n === "active" && /* @__PURE__ */ t(
87
- h.div,
89
+ v.div,
88
90
  {
89
91
  layoutId: `${l}-stepper-active`,
90
92
  className: "absolute inset-0 rounded-ds-full bg-accent-9",
@@ -92,7 +94,7 @@ const b = s.createContext({
92
94
  }
93
95
  ),
94
96
  /* @__PURE__ */ t("span", { className: "relative z-10", children: d || (n === "completed" ? /* @__PURE__ */ t(
95
- h.svg,
97
+ v.svg,
96
98
  {
97
99
  className: "w-ico-sm h-ico-sm",
98
100
  viewBox: "0 0 24 24",
@@ -106,7 +108,7 @@ const b = s.createContext({
106
108
  transition: x.bouncy,
107
109
  children: /* @__PURE__ */ t("polyline", { points: "20 6 9 17 4 12" })
108
110
  }
109
- ) : c + 1) })
111
+ ) : a + 1) })
110
112
  ]
111
113
  }
112
114
  ),
@@ -114,7 +116,7 @@ const b = s.createContext({
114
116
  /* @__PURE__ */ t(
115
117
  "span",
116
118
  {
117
- className: a(
119
+ className: i(
118
120
  "text-ds-md font-medium leading-ds-snug",
119
121
  n === "pending" ? "text-surface-fg-subtle" : "text-surface-fg"
120
122
  ),
@@ -127,10 +129,10 @@ const b = s.createContext({
127
129
  }
128
130
  );
129
131
  }
130
- ), v = 40, C = {
132
+ ), h = 40, C = {
131
133
  enter: (e) => ({
132
134
  opacity: 0,
133
- x: e * v
135
+ x: e * h
134
136
  }),
135
137
  center: {
136
138
  opacity: 1,
@@ -138,17 +140,17 @@ const b = s.createContext({
138
140
  },
139
141
  exit: (e) => ({
140
142
  opacity: 0,
141
- x: e * -v
143
+ x: e * -h
142
144
  })
143
145
  };
144
- function I({ activeStep: e, children: r, className: d }) {
145
- const i = s.useRef(e), o = e >= i.current ? 1 : -1;
146
+ function S({ activeStep: e, children: r, className: d }) {
147
+ const o = s.useRef(e), c = e >= o.current ? 1 : -1;
146
148
  return s.useEffect(() => {
147
- i.current = e;
148
- }, [e]), /* @__PURE__ */ t("div", { className: a("relative overflow-hidden", d), children: /* @__PURE__ */ t(N, { mode: "wait", custom: o, children: /* @__PURE__ */ t(
149
- h.div,
149
+ o.current = e;
150
+ }, [e]), /* @__PURE__ */ t("div", { className: i("relative overflow-hidden", d), children: /* @__PURE__ */ t(N, { mode: "wait", custom: c, children: /* @__PURE__ */ t(
151
+ v.div,
150
152
  {
151
- custom: o,
153
+ custom: c,
152
154
  variants: C,
153
155
  initial: "enter",
154
156
  animate: "center",
@@ -161,9 +163,9 @@ function I({ activeStep: e, children: r, className: d }) {
161
163
  }
162
164
  y.displayName = "Stepper";
163
165
  w.displayName = "Step";
164
- I.displayName = "StepperContent";
166
+ S.displayName = "StepperContent";
165
167
  export {
166
168
  w as Step,
167
169
  y as Stepper,
168
- I as StepperContent
170
+ S as StepperContent
169
171
  };
package/dist/ui/switch.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import * as a from "react";
4
- import { an as c, ao as C } from "../_chunks/primitives.js";
4
+ import { am as c, an as C } from "../_chunks/primitives.js";
5
5
  import { springs as y } from "./lib/motion.js";
6
6
  import { cn as n } from "./lib/utils.js";
7
7
  import { m as N } from "../_chunks/framer.js";
8
8
  const R = {
9
- sm: { track: "h-[18px] w-[32px]", thumb: "h-[14px] w-[14px]", travel: 14 },
9
+ sm: { track: "h-6 w-[38px]", thumb: "h-5 w-5", travel: 16 },
10
10
  md: { track: "h-6 w-11", thumb: "h-ico-md w-ico-md", travel: 20 },
11
11
  lg: { track: "h-7 w-[52px]", thumb: "h-6 w-6", travel: 24 }
12
12
  }, j = {
@@ -24,7 +24,7 @@ const R = {
24
24
  c,
25
25
  {
26
26
  className: n(
27
- "peer inline-flex shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-raised transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=unchecked]:bg-surface-border-strong data-[state=unchecked]:hover:bg-surface-raised-active",
27
+ "touch-target peer inline-flex shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-raised transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=unchecked]:bg-surface-border-strong data-[state=unchecked]:hover:bg-surface-raised-active",
28
28
  w,
29
29
  j[m],
30
30
  d && "border-error-7 data-[state=checked]:bg-error-9",