orbital-ds 0.41.0 → 0.48.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 (321) hide show
  1. package/AGENTS.md +54 -12
  2. package/CHANGELOG.md +458 -0
  3. package/README.md +2 -2
  4. package/components.manifest.json +6630 -3569
  5. package/dist/hooks/use-esc-close-stack.js +38 -0
  6. package/dist/hooks/use-simulated-progress.js +30 -0
  7. package/dist/lib/brand-allowlist.js +703 -0
  8. package/dist/lib/brand-runtime.js +85 -0
  9. package/dist/lib/echarts-presets.js +152 -1
  10. package/dist/lib/echarts-setup.js +2 -0
  11. package/dist/lib/format.js +177 -0
  12. package/dist/lib/i18n.js +35 -2
  13. package/dist/lib/locales/de.js +536 -0
  14. package/dist/lib/locales/fr.js +536 -0
  15. package/dist/lib/locales/he.js +536 -0
  16. package/dist/lib/locales/it.js +536 -0
  17. package/dist/ui/auth-form.js +13 -6
  18. package/dist/ui/ayuda.js +4 -1
  19. package/dist/ui/breadcrumb.js +1 -1
  20. package/dist/ui/calendar.js +3 -0
  21. package/dist/ui/carousel.js +10 -5
  22. package/dist/ui/context-menu.js +3 -3
  23. package/dist/ui/cta-banner.js +63 -0
  24. package/dist/ui/date-time.js +55 -0
  25. package/dist/ui/description-list.js +86 -0
  26. package/dist/ui/detail-panel.js +2 -2
  27. package/dist/ui/dropdown-menu.js +1 -1
  28. package/dist/ui/faq.js +25 -0
  29. package/dist/ui/feature-grid.js +40 -0
  30. package/dist/ui/hero.js +145 -0
  31. package/dist/ui/landing-section.js +59 -0
  32. package/dist/ui/mfa-challenge.js +1 -1
  33. package/dist/ui/next-step-card.js +92 -0
  34. package/dist/ui/page-header.js +20 -11
  35. package/dist/ui/pagination.js +2 -2
  36. package/dist/ui/pricing-table.js +86 -0
  37. package/dist/ui/quantity.js +27 -0
  38. package/dist/ui/sheet.js +6 -2
  39. package/dist/ui/sidebar.js +7 -3
  40. package/dist/ui/tag-input.js +169 -0
  41. package/dist/ui/testimonial.js +61 -0
  42. package/dist/ui/textarea.js +7 -1
  43. package/dist/ui/usage-meter.js +116 -0
  44. package/dist/ui/week-strip.js +2 -2
  45. package/docs/adr/0001-rtl-clases-logicas.md +14 -1
  46. package/docs/designer/flujo.md +1 -1
  47. package/docs/designer/patrones.md +45 -1
  48. package/manifest/actions.json +364 -0
  49. package/manifest/agents.json +399 -0
  50. package/manifest/ai.json +128 -0
  51. package/manifest/auth.json +1547 -0
  52. package/manifest/chat.json +612 -0
  53. package/manifest/content.json +2793 -0
  54. package/manifest/data.json +2802 -0
  55. package/manifest/feedback.json +1005 -0
  56. package/manifest/forms.json +1954 -0
  57. package/manifest/motion.json +196 -0
  58. package/manifest/navigation.json +1792 -0
  59. package/manifest/overlays.json +934 -0
  60. package/package.json +240 -238
  61. package/scripts/cli.mjs +124 -8
  62. package/scripts/doctor.mjs +153 -2
  63. package/scripts/eslint-plugin.mjs +125 -0
  64. package/scripts/i18n.mjs +1 -1
  65. package/scripts/manifest.mjs +179 -7
  66. package/scripts/upgrade.mjs +126 -0
  67. package/skill/SKILL.md +8 -3
  68. package/dist/hooks/use-ds-messages.d.ts +0 -537
  69. package/dist/hooks/use-ds-motion.d.ts +0 -17
  70. package/dist/hooks/use-in-view.d.ts +0 -9
  71. package/dist/hooks/use-mobile.d.ts +0 -3
  72. package/dist/lib/a2ui-catalog.d.ts +0 -42
  73. package/dist/lib/a2ui.d.ts +0 -289
  74. package/dist/lib/ai-events.d.ts +0 -15
  75. package/dist/lib/auth-better-auth.d.ts +0 -29
  76. package/dist/lib/auth-flow.d.ts +0 -85
  77. package/dist/lib/auth-providers.d.ts +0 -194
  78. package/dist/lib/auth.d.ts +0 -68
  79. package/dist/lib/echarts-presets.d.ts +0 -227
  80. package/dist/lib/echarts-server.d.ts +0 -15
  81. package/dist/lib/echarts-setup.d.ts +0 -8
  82. package/dist/lib/echarts-theme.d.ts +0 -36
  83. package/dist/lib/header-control.d.ts +0 -4
  84. package/dist/lib/i18n.d.ts +0 -545
  85. package/dist/lib/image-upload.d.ts +0 -41
  86. package/dist/lib/motion.d.ts +0 -74
  87. package/dist/lib/presets.d.ts +0 -8
  88. package/dist/lib/template-syntax.d.ts +0 -22
  89. package/dist/lib/utils.d.ts +0 -5
  90. package/dist/motion.css +0 -146
  91. package/dist/styles.css +0 -1737
  92. package/dist/themes/chocolate.css +0 -259
  93. package/dist/themes/chocolate.fonts.css +0 -2
  94. package/dist/themes/chocolate.guide.md +0 -30
  95. package/dist/themes/chocolate.meta.json +0 -61
  96. package/dist/themes/chocolate.scoped.css +0 -259
  97. package/dist/themes/chocolate.tokens.json +0 -49
  98. package/dist/themes/fractalia.css +0 -556
  99. package/dist/themes/fractalia.fonts.css +0 -3
  100. package/dist/themes/fractalia.guide.md +0 -86
  101. package/dist/themes/fractalia.meta.json +0 -112
  102. package/dist/themes/fractalia.scoped.css +0 -556
  103. package/dist/themes/fractalia.tokens.json +0 -39
  104. package/dist/themes/friendly.css +0 -375
  105. package/dist/themes/friendly.fonts.css +0 -2
  106. package/dist/themes/friendly.guide.md +0 -38
  107. package/dist/themes/friendly.meta.json +0 -82
  108. package/dist/themes/friendly.scoped.css +0 -375
  109. package/dist/themes/friendly.tokens.json +0 -45
  110. package/dist/themes/lagoon.css +0 -362
  111. package/dist/themes/lagoon.fonts.css +0 -2
  112. package/dist/themes/lagoon.guide.md +0 -47
  113. package/dist/themes/lagoon.meta.json +0 -85
  114. package/dist/themes/lagoon.scoped.css +0 -362
  115. package/dist/themes/lagoon.tokens.json +0 -49
  116. package/dist/themes/liquid.css +0 -510
  117. package/dist/themes/liquid.fonts.css +0 -7
  118. package/dist/themes/liquid.guide.md +0 -82
  119. package/dist/themes/liquid.meta.json +0 -134
  120. package/dist/themes/liquid.scoped.css +0 -510
  121. package/dist/themes/liquid.tokens.json +0 -47
  122. package/dist/themes/matcha.css +0 -259
  123. package/dist/themes/matcha.fonts.css +0 -2
  124. package/dist/themes/matcha.guide.md +0 -30
  125. package/dist/themes/matcha.meta.json +0 -61
  126. package/dist/themes/matcha.scoped.css +0 -259
  127. package/dist/themes/matcha.tokens.json +0 -49
  128. package/dist/themes/qratia.css +0 -264
  129. package/dist/themes/qratia.fonts.css +0 -2
  130. package/dist/themes/qratia.guide.md +0 -34
  131. package/dist/themes/qratia.meta.json +0 -49
  132. package/dist/themes/qratia.scoped.css +0 -264
  133. package/dist/themes/qratia.tokens.json +0 -49
  134. package/dist/themes/stone.css +0 -263
  135. package/dist/themes/stone.fonts.css +0 -2
  136. package/dist/themes/stone.guide.md +0 -30
  137. package/dist/themes/stone.meta.json +0 -47
  138. package/dist/themes/stone.scoped.css +0 -263
  139. package/dist/themes/stone.tokens.json +0 -49
  140. package/dist/themes/tactile.css +0 -596
  141. package/dist/themes/tactile.fonts.css +0 -3
  142. package/dist/themes/tactile.guide.md +0 -82
  143. package/dist/themes/tactile.meta.json +0 -182
  144. package/dist/themes/tactile.scoped.css +0 -596
  145. package/dist/themes/tactile.tokens.json +0 -42
  146. package/dist/themes/twitter.css +0 -364
  147. package/dist/themes/twitter.fonts.css +0 -6
  148. package/dist/themes/twitter.guide.md +0 -35
  149. package/dist/themes/twitter.meta.json +0 -90
  150. package/dist/themes/twitter.scoped.css +0 -364
  151. package/dist/themes/twitter.tokens.json +0 -45
  152. package/dist/themes/y2k.css +0 -259
  153. package/dist/themes/y2k.fonts.css +0 -2
  154. package/dist/themes/y2k.guide.md +0 -30
  155. package/dist/themes/y2k.meta.json +0 -59
  156. package/dist/themes/y2k.scoped.css +0 -259
  157. package/dist/themes/y2k.tokens.json +0 -49
  158. package/dist/themes/zyro.css +0 -442
  159. package/dist/themes/zyro.fonts.css +0 -2
  160. package/dist/themes/zyro.guide.md +0 -33
  161. package/dist/themes/zyro.meta.json +0 -74
  162. package/dist/themes/zyro.scoped.css +0 -442
  163. package/dist/themes/zyro.tokens.json +0 -46
  164. package/dist/ui/a2ui-renderer.d.ts +0 -33
  165. package/dist/ui/accordion.d.ts +0 -9
  166. package/dist/ui/agent-events.d.ts +0 -32
  167. package/dist/ui/ai-tag.d.ts +0 -8
  168. package/dist/ui/alert-dialog.d.ts +0 -23
  169. package/dist/ui/alert.d.ts +0 -13
  170. package/dist/ui/animated-number.d.ts +0 -9
  171. package/dist/ui/app-bar.d.ts +0 -10
  172. package/dist/ui/aspect-ratio.d.ts +0 -7
  173. package/dist/ui/attachment.d.ts +0 -26
  174. package/dist/ui/auth-backdrop.d.ts +0 -20
  175. package/dist/ui/auth-form.d.ts +0 -113
  176. package/dist/ui/auth-layout.d.ts +0 -72
  177. package/dist/ui/auth-parts.d.ts +0 -43
  178. package/dist/ui/auth-status.d.ts +0 -23
  179. package/dist/ui/avatar.d.ts +0 -16
  180. package/dist/ui/ayuda.d.ts +0 -22
  181. package/dist/ui/badge.d.ts +0 -15
  182. package/dist/ui/banner.d.ts +0 -14
  183. package/dist/ui/bottom-nav.d.ts +0 -15
  184. package/dist/ui/breadcrumb.d.ts +0 -12
  185. package/dist/ui/bubble.d.ts +0 -19
  186. package/dist/ui/button-group.d.ts +0 -15
  187. package/dist/ui/button.d.ts +0 -14
  188. package/dist/ui/calendar.d.ts +0 -15
  189. package/dist/ui/card-stack.d.ts +0 -9
  190. package/dist/ui/card.d.ts +0 -28
  191. package/dist/ui/carousel.d.ts +0 -33
  192. package/dist/ui/chain-of-thought.d.ts +0 -19
  193. package/dist/ui/chart-card.d.ts +0 -28
  194. package/dist/ui/chart.d.ts +0 -46
  195. package/dist/ui/chart.js +0 -254
  196. package/dist/ui/chat-composer.d.ts +0 -39
  197. package/dist/ui/checkbox.d.ts +0 -6
  198. package/dist/ui/choice-card.d.ts +0 -16
  199. package/dist/ui/code-block.d.ts +0 -14
  200. package/dist/ui/collapsible.d.ts +0 -8
  201. package/dist/ui/combobox.d.ts +0 -26
  202. package/dist/ui/command-palette.d.ts +0 -36
  203. package/dist/ui/command.d.ts +0 -22
  204. package/dist/ui/confirm-action.d.ts +0 -18
  205. package/dist/ui/confirm-dialog.d.ts +0 -21
  206. package/dist/ui/connected-accounts.d.ts +0 -25
  207. package/dist/ui/content-card.d.ts +0 -52
  208. package/dist/ui/context-menu.d.ts +0 -31
  209. package/dist/ui/conversation-list.d.ts +0 -24
  210. package/dist/ui/copy-button.d.ts +0 -14
  211. package/dist/ui/data-table.d.ts +0 -198
  212. package/dist/ui/date-picker.d.ts +0 -65
  213. package/dist/ui/detail-panel.d.ts +0 -16
  214. package/dist/ui/dialog.d.ts +0 -19
  215. package/dist/ui/direction.d.ts +0 -1
  216. package/dist/ui/dock.d.ts +0 -13
  217. package/dist/ui/drawer.d.ts +0 -18
  218. package/dist/ui/dropdown-menu.d.ts +0 -31
  219. package/dist/ui/dropzone.d.ts +0 -44
  220. package/dist/ui/echart.d.ts +0 -31
  221. package/dist/ui/empty-state.d.ts +0 -26
  222. package/dist/ui/empty.d.ts +0 -15
  223. package/dist/ui/entity-list.d.ts +0 -25
  224. package/dist/ui/error-page.d.ts +0 -28
  225. package/dist/ui/error-state.d.ts +0 -16
  226. package/dist/ui/eyebrow.d.ts +0 -7
  227. package/dist/ui/field.d.ts +0 -28
  228. package/dist/ui/file-upload.d.ts +0 -42
  229. package/dist/ui/filter-bar.d.ts +0 -38
  230. package/dist/ui/form-layout.d.ts +0 -19
  231. package/dist/ui/gauge.d.ts +0 -40
  232. package/dist/ui/generated-image.d.ts +0 -14
  233. package/dist/ui/generated-table.d.ts +0 -11
  234. package/dist/ui/heatmap-grid.d.ts +0 -39
  235. package/dist/ui/hover-card.d.ts +0 -8
  236. package/dist/ui/i18n-provider.d.ts +0 -11
  237. package/dist/ui/icon-tile.d.ts +0 -11
  238. package/dist/ui/input-group.d.ts +0 -22
  239. package/dist/ui/input-otp.d.ts +0 -13
  240. package/dist/ui/input.d.ts +0 -5
  241. package/dist/ui/instruction-editor.d.ts +0 -64
  242. package/dist/ui/item.d.ts +0 -26
  243. package/dist/ui/kbd.d.ts +0 -6
  244. package/dist/ui/label.d.ts +0 -5
  245. package/dist/ui/legend.d.ts +0 -32
  246. package/dist/ui/level-meter.d.ts +0 -16
  247. package/dist/ui/load-more.d.ts +0 -19
  248. package/dist/ui/loading-state.d.ts +0 -14
  249. package/dist/ui/locale-switcher.d.ts +0 -19
  250. package/dist/ui/markdown.d.ts +0 -14
  251. package/dist/ui/marker.d.ts +0 -13
  252. package/dist/ui/media-card.d.ts +0 -13
  253. package/dist/ui/menubar.d.ts +0 -31
  254. package/dist/ui/message-actions.d.ts +0 -12
  255. package/dist/ui/message-scroller.d.ts +0 -16
  256. package/dist/ui/message.d.ts +0 -12
  257. package/dist/ui/mfa-challenge.d.ts +0 -33
  258. package/dist/ui/mfa-setup.d.ts +0 -29
  259. package/dist/ui/mosaic.d.ts +0 -15
  260. package/dist/ui/motion-provider.d.ts +0 -11
  261. package/dist/ui/native-select.d.ts +0 -10
  262. package/dist/ui/navigation-menu.d.ts +0 -15
  263. package/dist/ui/notice-review.d.ts +0 -32
  264. package/dist/ui/notifications.d.ts +0 -81
  265. package/dist/ui/oauth-consent.d.ts +0 -54
  266. package/dist/ui/page-header.d.ts +0 -22
  267. package/dist/ui/page-loader.d.ts +0 -23
  268. package/dist/ui/page-shell.d.ts +0 -8
  269. package/dist/ui/pagination.d.ts +0 -22
  270. package/dist/ui/panel.d.ts +0 -12
  271. package/dist/ui/passkey-list.d.ts +0 -17
  272. package/dist/ui/password-input.d.ts +0 -5
  273. package/dist/ui/password-strength.d.ts +0 -14
  274. package/dist/ui/popover.d.ts +0 -12
  275. package/dist/ui/progress.d.ts +0 -9
  276. package/dist/ui/proportion-bar.d.ts +0 -27
  277. package/dist/ui/questionnaire.d.ts +0 -24
  278. package/dist/ui/radio-group.d.ts +0 -8
  279. package/dist/ui/reasoning.d.ts +0 -10
  280. package/dist/ui/resizable.d.ts +0 -10
  281. package/dist/ui/reveal.d.ts +0 -11
  282. package/dist/ui/scroll-area.d.ts +0 -7
  283. package/dist/ui/search-box.d.ts +0 -32
  284. package/dist/ui/select.d.ts +0 -19
  285. package/dist/ui/separator.d.ts +0 -6
  286. package/dist/ui/session-list.d.ts +0 -19
  287. package/dist/ui/session-timeout.d.ts +0 -13
  288. package/dist/ui/sheet.d.ts +0 -16
  289. package/dist/ui/shield.d.ts +0 -21
  290. package/dist/ui/show-more.d.ts +0 -12
  291. package/dist/ui/sidebar.d.ts +0 -90
  292. package/dist/ui/sign-out-dialog.d.ts +0 -17
  293. package/dist/ui/skeleton.d.ts +0 -10
  294. package/dist/ui/slider.d.ts +0 -23
  295. package/dist/ui/sonner.d.ts +0 -6
  296. package/dist/ui/sparkline.d.ts +0 -26
  297. package/dist/ui/spinner.d.ts +0 -5
  298. package/dist/ui/stat-group.d.ts +0 -8
  299. package/dist/ui/stat.d.ts +0 -90
  300. package/dist/ui/status-badge.d.ts +0 -39
  301. package/dist/ui/status-hero.d.ts +0 -12
  302. package/dist/ui/step-dots.d.ts +0 -10
  303. package/dist/ui/step-flow.d.ts +0 -48
  304. package/dist/ui/step-ring.d.ts +0 -12
  305. package/dist/ui/stepper.d.ts +0 -20
  306. package/dist/ui/suggestions.d.ts +0 -8
  307. package/dist/ui/switch.d.ts +0 -8
  308. package/dist/ui/table.d.ts +0 -12
  309. package/dist/ui/tabs.d.ts +0 -14
  310. package/dist/ui/task-loader.d.ts +0 -14
  311. package/dist/ui/task-progress.d.ts +0 -18
  312. package/dist/ui/textarea.d.ts +0 -11
  313. package/dist/ui/theme-toggle.d.ts +0 -14
  314. package/dist/ui/timeline.d.ts +0 -29
  315. package/dist/ui/toast.d.ts +0 -19
  316. package/dist/ui/toggle-group.d.ts +0 -14
  317. package/dist/ui/toggle.d.ts +0 -12
  318. package/dist/ui/tool-call.d.ts +0 -15
  319. package/dist/ui/tooltip.d.ts +0 -9
  320. package/dist/ui/week-strip.d.ts +0 -12
  321. package/dist/ui/workflow-run.d.ts +0 -23
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "../lib/utils.js";
4
+ import { Card } from "./card.js";
5
+ import { IconTile } from "./icon-tile.js";
6
+ const PRESETS = {
7
+ activate: { tone: "info", emphasis: true },
8
+ open: { tone: "success", emphasis: false },
9
+ resolve: { tone: "warning", emphasis: true },
10
+ inactive: { tone: "neutral", emphasis: false }
11
+ };
12
+ const ACCENT = {
13
+ info: "before:bg-info",
14
+ success: "before:bg-success",
15
+ warning: "before:bg-warning",
16
+ danger: "before:bg-danger",
17
+ neutral: "before:bg-neutral"
18
+ };
19
+ function NextStepCard({
20
+ preset = "open",
21
+ tone,
22
+ emphasis,
23
+ icon,
24
+ title,
25
+ status,
26
+ description,
27
+ meta,
28
+ action,
29
+ secondaryActions,
30
+ headingLevel = 2,
31
+ className,
32
+ children,
33
+ ...props
34
+ }) {
35
+ const p = PRESETS[preset];
36
+ const t = tone ?? p.tone;
37
+ const accent = emphasis ?? p.emphasis;
38
+ const Heading = `h${headingLevel}`;
39
+ return /* @__PURE__ */ jsxs(
40
+ Card,
41
+ {
42
+ "data-slot": "next-step-card",
43
+ "data-preset": preset,
44
+ "data-tone": t,
45
+ "data-emphasis": accent || void 0,
46
+ className: cn(
47
+ "@container/next-step-card",
48
+ accent && cn(
49
+ "relative isolate before:pointer-events-none before:absolute before:inset-y-0 before:start-0 before:w-(--ds-next-step-accent-w) before:content-['']",
50
+ ACCENT[t]
51
+ ),
52
+ className
53
+ ),
54
+ ...props,
55
+ children: [
56
+ /* @__PURE__ */ jsxs(
57
+ "div",
58
+ {
59
+ "data-slot": "next-step-card-layout",
60
+ className: "flex min-w-0 flex-col gap-(--ds-card-spacing) px-(--ds-card-spacing) @lg/next-step-card:flex-row @lg/next-step-card:items-start",
61
+ children: [
62
+ icon != null && /* @__PURE__ */ jsx(IconTile, { "data-slot": "next-step-card-icon", "aria-hidden": "true", tone: t === "neutral" ? "neutral" : t, size: "md", children: icon }),
63
+ /* @__PURE__ */ jsxs("div", { "data-slot": "next-step-card-body", className: "flex min-w-0 flex-1 flex-col gap-1", children: [
64
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1", children: [
65
+ /* @__PURE__ */ jsx(Heading, { "data-slot": "next-step-card-title", className: "min-w-0 text-base leading-tight font-(--ds-heading-weight) text-card-foreground", children: title }),
66
+ status
67
+ ] }),
68
+ description != null && /* @__PURE__ */ jsx("p", { "data-slot": "next-step-card-description", className: "text-sm text-pretty text-muted-foreground", children: description }),
69
+ meta != null && /* @__PURE__ */ jsx("div", { "data-slot": "next-step-card-meta", className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground", children: meta })
70
+ ] }),
71
+ (action != null || secondaryActions != null) && /* @__PURE__ */ jsxs(
72
+ "div",
73
+ {
74
+ "data-slot": "next-step-card-actions",
75
+ className: "flex flex-col-reverse gap-2 *:w-full @sm/next-step-card:flex-row @sm/next-step-card:flex-wrap @sm/next-step-card:*:w-auto @lg/next-step-card:shrink-0 @lg/next-step-card:justify-end",
76
+ children: [
77
+ secondaryActions,
78
+ action
79
+ ]
80
+ }
81
+ )
82
+ ]
83
+ }
84
+ ),
85
+ children != null && /* @__PURE__ */ jsx("div", { "data-slot": "next-step-card-content", className: "flex min-w-0 flex-col gap-3 px-(--ds-card-spacing)", children })
86
+ ]
87
+ }
88
+ );
89
+ }
90
+ export {
91
+ NextStepCard
92
+ };
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { IconTile } from "./icon-tile.js";
4
4
  const HEADER_PRESETS = {
@@ -6,12 +6,8 @@ const HEADER_PRESETS = {
6
6
  compact: "[--ds-page-title-size:var(--ds-page-title-size-compact)] [--ds-page-title-size-wide:var(--ds-page-title-size-compact-wide)] mb-(--ds-section-gap)",
7
7
  canvas: "max-w-none"
8
8
  };
9
- function PageHeader({
10
- preset = "page",
11
- className,
12
- ...props
13
- }) {
14
- return /* @__PURE__ */ jsx(
9
+ function PageHeader({ preset = "page", title, description, actions, className, children, ...props }) {
10
+ return /* @__PURE__ */ jsxs(
15
11
  "header",
16
12
  {
17
13
  "data-slot": "page-header",
@@ -21,7 +17,13 @@ function PageHeader({
21
17
  HEADER_PRESETS[preset],
22
18
  className
23
19
  ),
24
- ...props
20
+ ...props,
21
+ children: [
22
+ title != null && /* @__PURE__ */ jsx(PageHeaderTitle, { children: title }),
23
+ description != null && /* @__PURE__ */ jsx(PageHeaderDescription, { children: description }),
24
+ actions != null && /* @__PURE__ */ jsx(PageHeaderActions, { children: actions }),
25
+ children
26
+ ]
25
27
  }
26
28
  );
27
29
  }
@@ -74,8 +76,8 @@ function PageHeaderNotice({ className, ...props }) {
74
76
  }
75
77
  );
76
78
  }
77
- function SectionHeader({ className, ...props }) {
78
- return /* @__PURE__ */ jsx(
79
+ function SectionHeader({ title, description, actions, icon, iconTone, className, children, ...props }) {
80
+ return /* @__PURE__ */ jsxs(
79
81
  "div",
80
82
  {
81
83
  "data-slot": "section-header",
@@ -83,7 +85,14 @@ function SectionHeader({ className, ...props }) {
83
85
  "group/section-header @container/section-header mb-(--ds-section-gap) grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 gap-y-0 [grid-template-areas:'title_actions'_'description_actions'] has-data-[slot=section-header-icon]:grid-cols-[auto_minmax(0,1fr)_auto] has-data-[slot=section-header-icon]:[grid-template-areas:'icon_title_actions'_'icon_description_actions']",
84
86
  className
85
87
  ),
86
- ...props
88
+ ...props,
89
+ children: [
90
+ icon != null && /* @__PURE__ */ jsx(SectionHeaderIcon, { tone: iconTone, children: icon }),
91
+ title != null && /* @__PURE__ */ jsx(SectionHeaderTitle, { children: title }),
92
+ description != null && /* @__PURE__ */ jsx(SectionHeaderDescription, { children: description }),
93
+ actions != null && /* @__PURE__ */ jsx(SectionHeaderActions, { children: actions }),
94
+ children
95
+ ]
87
96
  }
88
97
  );
89
98
  }
@@ -73,7 +73,7 @@ function PaginationPrevious({
73
73
  className: cn("ps-2", className),
74
74
  ...props,
75
75
  children: [
76
- /* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start" }),
76
+ /* @__PURE__ */ jsx(ChevronLeftIcon, { "data-icon": "inline-start", className: "rtl:rotate-180" }),
77
77
  /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: text ?? t.paginationPrevious })
78
78
  ]
79
79
  }
@@ -95,7 +95,7 @@ function PaginationNext({
95
95
  ...props,
96
96
  children: [
97
97
  /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: text ?? t.paginationNext }),
98
- /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })
98
+ /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end", className: "rtl:rotate-180" })
99
99
  ]
100
100
  }
101
101
  );
@@ -0,0 +1,86 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { CheckIcon, MinusIcon } from "lucide-react";
4
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
5
+ import { cn } from "../lib/utils.js";
6
+ function PricingTable({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx("div", { className: "@container/pricing w-full", children: /* @__PURE__ */ jsx(
8
+ "div",
9
+ {
10
+ "data-slot": "pricing-table",
11
+ className: cn(
12
+ "grid grid-cols-1 items-stretch gap-(--ds-landing-grid-gap) @2xl/pricing:grid-cols-2 @5xl/pricing:auto-cols-fr @5xl/pricing:grid-flow-col @5xl/pricing:grid-cols-none",
13
+ className
14
+ ),
15
+ ...props
16
+ }
17
+ ) });
18
+ }
19
+ function PricingPlan({ name, price, period, description, badge, featured = false, action, footnote, className, children, ...props }) {
20
+ return /* @__PURE__ */ jsxs(
21
+ "div",
22
+ {
23
+ "data-slot": "pricing-plan",
24
+ "data-featured": featured || void 0,
25
+ className: cn(
26
+ "flex min-w-0 flex-col gap-(--ds-card-spacing) rounded-card border bg-card p-(--ds-card-spacing) text-sm text-card-foreground shadow-card",
27
+ "data-featured:border-(--ds-pricing-featured-ring) data-featured:ring-(length:--ds-pricing-featured-ring-w) data-featured:ring-(--ds-pricing-featured-ring)",
28
+ className
29
+ ),
30
+ ...props,
31
+ children: [
32
+ /* @__PURE__ */ jsxs("div", { "data-slot": "pricing-plan-header", className: "flex flex-col gap-2", children: [
33
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
34
+ /* @__PURE__ */ jsx("h3", { "data-slot": "pricing-plan-name", className: "text-base font-(--ds-heading-weight)", children: name }),
35
+ badge
36
+ ] }),
37
+ description != null ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-muted-foreground", children: description }) : null,
38
+ /* @__PURE__ */ jsxs("p", { className: "flex flex-wrap items-baseline gap-1", children: [
39
+ /* @__PURE__ */ jsx(
40
+ "span",
41
+ {
42
+ "data-slot": "pricing-plan-price",
43
+ className: "text-(length:--ds-pricing-price-size) leading-none font-(--ds-heading-weight) tracking-(--ds-heading-tracking) tabular-nums",
44
+ children: price
45
+ }
46
+ ),
47
+ period != null ? /* @__PURE__ */ jsx("span", { "data-slot": "pricing-plan-period", className: "text-muted-foreground", children: period }) : null
48
+ ] })
49
+ ] }),
50
+ action != null ? /* @__PURE__ */ jsxs("div", { "data-slot": "pricing-plan-action", className: "flex flex-col gap-2", children: [
51
+ action,
52
+ footnote != null ? /* @__PURE__ */ jsx("p", { className: "text-center text-xs text-muted-foreground", children: footnote }) : null
53
+ ] }) : null,
54
+ children != null ? /* @__PURE__ */ jsx("ul", { "data-slot": "pricing-plan-features", className: "flex flex-col gap-2 border-t border-border pt-(--ds-card-spacing)", children }) : null
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ function PricingFeature({ included = true, className, children, ...props }) {
60
+ const t = useDsMessages();
61
+ return /* @__PURE__ */ jsxs(
62
+ "li",
63
+ {
64
+ "data-slot": "pricing-feature",
65
+ "data-included": included,
66
+ className: cn("flex items-start gap-2 data-[included=false]:text-muted-foreground", className),
67
+ ...props,
68
+ children: [
69
+ included ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0 text-primary" }) : /* @__PURE__ */ jsx(MinusIcon, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0" }),
70
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
71
+ children,
72
+ included ? null : /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
73
+ " (",
74
+ t.planNotIncluded,
75
+ ")"
76
+ ] })
77
+ ] })
78
+ ]
79
+ }
80
+ );
81
+ }
82
+ export {
83
+ PricingFeature,
84
+ PricingPlan,
85
+ PricingTable
86
+ };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useDsLocale, useDsMessages } from "../hooks/use-ds-messages.js";
4
+ import { formatQuantity } from "../lib/format.js";
5
+ import { cn } from "../lib/utils.js";
6
+ function Quantity({ value, unit, system, unitDisplay, maximumFractionDigits, compact, className, ...props }) {
7
+ const locale = useDsLocale();
8
+ const t = useDsMessages();
9
+ const text = formatQuantity(value, unit, { locale, system, unitDisplay, maximumFractionDigits, compact });
10
+ return /* @__PURE__ */ jsx(
11
+ "span",
12
+ {
13
+ "data-slot": "quantity",
14
+ "data-state": text == null ? "empty" : "value",
15
+ "data-unit": unit,
16
+ className: cn("tabular-nums", className),
17
+ ...props,
18
+ children: text ?? /* @__PURE__ */ jsxs(Fragment, { children: [
19
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\u2014" }),
20
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: t.statNoData })
21
+ ] })
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ Quantity
27
+ };
package/dist/ui/sheet.js CHANGED
@@ -5,6 +5,8 @@ import { cn } from "../lib/utils.js";
5
5
  import { Button } from "./button.js";
6
6
  import { XIcon } from "lucide-react";
7
7
  import { useDsMessages } from "../hooks/use-ds-messages.js";
8
+ import { useDirection } from "@base-ui/react/direction-provider";
9
+ import { dsPhysicalSide } from "../lib/i18n.js";
8
10
  function Sheet({ ...props }) {
9
11
  return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
10
12
  }
@@ -33,11 +35,13 @@ function SheetOverlay({ className, ...props }) {
33
35
  function SheetContent({
34
36
  className,
35
37
  children,
36
- side = "right",
38
+ side: sideProp = "end",
37
39
  showCloseButton = true,
38
40
  ...props
39
41
  }) {
40
42
  const t = useDsMessages();
43
+ const direction = useDirection();
44
+ const side = sideProp === "top" || sideProp === "bottom" ? sideProp : dsPhysicalSide(sideProp, direction);
41
45
  return /* @__PURE__ */ jsxs(SheetPortal, { children: [
42
46
  /* @__PURE__ */ jsx(SheetOverlay, {}),
43
47
  /* @__PURE__ */ jsxs(
@@ -46,7 +50,7 @@ function SheetContent({
46
50
  "data-slot": "sheet-content",
47
51
  "data-side": side,
48
52
  className: cn(
49
- "fixed z-(--ds-z-overlay) flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-overlay transition duration-(--ds-motion-base) ease-(--ds-ease-panel) data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t-(length:--ds-rule-w) data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e-(length:--ds-rule-w) data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s-(length:--ds-rule-w) data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b-(length:--ds-rule-w) data-[side=left]:sm:max-w-(--ds-sheet-w) data-[side=right]:sm:max-w-(--ds-sheet-w) data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
53
+ "fixed z-(--ds-z-overlay) flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-overlay transition duration-(--ds-motion-base) ease-(--ds-ease-panel) data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t-(length:--ds-rule-w) data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:ltr:border-e-(length:--ds-rule-w) data-[side=left]:rtl:border-s-(length:--ds-rule-w) data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:ltr:border-s-(length:--ds-rule-w) data-[side=right]:rtl:border-e-(length:--ds-rule-w) data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b-(length:--ds-rule-w) data-[side=left]:sm:max-w-(--ds-sheet-w) data-[side=right]:sm:max-w-(--ds-sheet-w) data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
50
54
  className
51
55
  ),
52
56
  ...props,
@@ -25,6 +25,8 @@ import {
25
25
  import { PanelLeftIcon } from "lucide-react";
26
26
  import { useDsMessages } from "../hooks/use-ds-messages.js";
27
27
  import { dsWarn } from "../lib/presets.js";
28
+ import { useDirection } from "@base-ui/react/direction-provider";
29
+ import { dsPhysicalSide } from "../lib/i18n.js";
28
30
  const SIDEBAR_COOKIE_NAME = "sidebar_state";
29
31
  const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
30
32
  const SIDEBAR_WIDTH = "var(--ds-sidebar-w)";
@@ -126,7 +128,7 @@ function SidebarProvider({
126
128
  ) });
127
129
  }
128
130
  function Sidebar({
129
- side = "left",
131
+ side: sideProp = "start",
130
132
  preset,
131
133
  variant: variantProp,
132
134
  collapsible: collapsibleProp,
@@ -140,6 +142,8 @@ function Sidebar({
140
142
  }) {
141
143
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
142
144
  const t = useDsMessages();
145
+ const direction = useDirection();
146
+ const side = dsPhysicalSide(sideProp, dir === "rtl" || dir === "ltr" ? dir : direction);
143
147
  const base = preset ? SIDEBAR_PRESETS[preset] : SIDEBAR_BASE;
144
148
  const variant = variantProp ?? base.variant;
145
149
  const collapsible = collapsibleProp ?? base.collapsible;
@@ -224,7 +228,7 @@ function Sidebar({
224
228
  className: cn(
225
229
  "fixed inset-y-0 z-(--ds-z-sidebar) hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-(--ds-motion-base) ease-(--ds-ease-collapse) data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
226
230
  // Adjust the padding for floating and inset variants.
227
- variant === "floating" || variant === "inset" ? "p-(--ds-sidebar-pad) group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(var(--ds-sidebar-pad)*2)+(var(--ds-sidebar-ring)*2))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e-(length:--ds-rule-w) group-data-[side=right]:border-s-(length:--ds-rule-w)",
231
+ variant === "floating" || variant === "inset" ? "p-(--ds-sidebar-pad) group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(var(--ds-sidebar-pad)*2)+(var(--ds-sidebar-ring)*2))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:ltr:border-e-(length:--ds-rule-w) group-data-[side=left]:rtl:border-s-(length:--ds-rule-w) group-data-[side=right]:ltr:border-s-(length:--ds-rule-w) group-data-[side=right]:rtl:border-e-(length:--ds-rule-w)",
228
232
  className
229
233
  ),
230
234
  ...props,
@@ -532,7 +536,7 @@ function SidebarMenuButton({
532
536
  /* @__PURE__ */ jsx(
533
537
  TooltipContent,
534
538
  {
535
- side: "right",
539
+ side: "inline-end",
536
540
  align: "center",
537
541
  hidden: state !== "collapsed" || isMobile,
538
542
  ...tooltip
@@ -0,0 +1,169 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { XIcon } from "lucide-react";
4
+ import * as React from "react";
5
+ import { useDsMessages } from "../hooks/use-ds-messages.js";
6
+ import { cn } from "../lib/utils.js";
7
+ import { Button } from "./button.js";
8
+ function TagInput({
9
+ value: valueProp,
10
+ defaultValue = [],
11
+ onValueChange,
12
+ separators = [","],
13
+ max,
14
+ validate,
15
+ allowDuplicates = false,
16
+ addOnBlur = true,
17
+ name,
18
+ disabled,
19
+ className,
20
+ inputClassName,
21
+ placeholder,
22
+ onKeyDown,
23
+ onBlur,
24
+ onPaste,
25
+ "aria-invalid": ariaInvalid,
26
+ ...props
27
+ }) {
28
+ const t = useDsMessages();
29
+ const [inner, setInner] = React.useState(defaultValue);
30
+ const tags = valueProp ?? inner;
31
+ const [draft, setDraft] = React.useState("");
32
+ const [rejected, setRejected] = React.useState(false);
33
+ const inputRef = React.useRef(null);
34
+ const full = max != null && tags.length >= max;
35
+ const commit = (next) => {
36
+ if (valueProp === void 0) setInner(next);
37
+ onValueChange?.(next);
38
+ };
39
+ const add = (raw) => {
40
+ const next = [...tags];
41
+ const left = [];
42
+ for (const r of raw) {
43
+ const tag = r.trim();
44
+ if (!tag) continue;
45
+ const dup = !allowDuplicates && next.some((x) => x.toLowerCase() === tag.toLowerCase());
46
+ if (dup) continue;
47
+ if (max != null && next.length >= max || validate && !validate(tag)) {
48
+ left.push(tag);
49
+ continue;
50
+ }
51
+ next.push(tag);
52
+ }
53
+ if (next.length !== tags.length) commit(next);
54
+ return left;
55
+ };
56
+ const flush = () => {
57
+ if (!draft.trim()) return;
58
+ const left = add([draft]);
59
+ setRejected(left.length > 0);
60
+ setDraft(left.join(" "));
61
+ };
62
+ const remove = (i) => {
63
+ commit(tags.filter((_, j) => j !== i));
64
+ inputRef.current?.focus();
65
+ };
66
+ const splitter = new RegExp(`[${separators.map((s) => s.replace(/[\\\]^-]/g, "\\$&")).join("")}\\n]`);
67
+ return /* @__PURE__ */ jsxs(
68
+ "div",
69
+ {
70
+ "data-slot": "tag-input",
71
+ "data-disabled": disabled || void 0,
72
+ "data-full": full || void 0,
73
+ className: cn(
74
+ "flex min-h-(--ds-control-h-md) w-full min-w-0 cursor-text flex-wrap items-center gap-1.5 rounded-control border border-(--ds-field-border) bg-(--ds-field-bg) bg-clip-padding px-(--ds-field-px) py-1.5 text-sm transition-colors duration-(--ds-motion-snap) focus-within:border-ring focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-aria-invalid:border-(--ds-invalid-border) has-aria-invalid:ring-(length:--ds-ring-width) has-aria-invalid:ring-(--ds-invalid-ring) has-data-[slot=tag-input-tag]:ps-1.5 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-(--ds-disabled-opacity)",
75
+ className
76
+ ),
77
+ onMouseDown: (e) => {
78
+ if (e.target === e.currentTarget) {
79
+ e.preventDefault();
80
+ inputRef.current?.focus();
81
+ }
82
+ },
83
+ children: [
84
+ tags.map((tag, i) => /* @__PURE__ */ jsxs(
85
+ "span",
86
+ {
87
+ "data-slot": "tag-input-tag",
88
+ className: "flex h-(--ds-chip-h) max-w-full min-w-0 items-center gap-1 rounded-control bg-muted-foreground/10 ps-2 text-xs font-(--ds-medium-weight) text-foreground",
89
+ children: [
90
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: tag }),
91
+ /* @__PURE__ */ jsx(
92
+ Button,
93
+ {
94
+ type: "button",
95
+ variant: "ghost",
96
+ size: "icon-xs",
97
+ "data-slot": "tag-input-remove",
98
+ className: "-ms-1 opacity-50 hover:opacity-100",
99
+ disabled,
100
+ "aria-label": t.tagRemove.replace("{name}", tag),
101
+ onClick: () => remove(i),
102
+ children: /* @__PURE__ */ jsx(XIcon, { className: "pointer-events-none" })
103
+ }
104
+ ),
105
+ name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value: tag }) : null
106
+ ]
107
+ },
108
+ `${tag}-${i}`
109
+ )),
110
+ /* @__PURE__ */ jsx(
111
+ "input",
112
+ {
113
+ ref: inputRef,
114
+ "data-slot": "tag-input-field",
115
+ className: cn("min-w-16 flex-1 bg-transparent outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed", inputClassName),
116
+ value: draft,
117
+ disabled,
118
+ readOnly: full,
119
+ placeholder: full ? void 0 : placeholder,
120
+ "aria-label": props["aria-label"] ?? (props.id || props["aria-labelledby"] ? void 0 : t.tagAdd),
121
+ "aria-invalid": ariaInvalid ?? (rejected || void 0),
122
+ onChange: (e) => {
123
+ setRejected(false);
124
+ const v = e.target.value;
125
+ if (splitter.test(v)) {
126
+ const parts = v.split(splitter);
127
+ const rest = parts.pop() ?? "";
128
+ const left = add(parts);
129
+ setRejected(left.length > 0);
130
+ setDraft([...left, rest].filter(Boolean).join(" "));
131
+ } else setDraft(v);
132
+ },
133
+ onKeyDown: (e) => {
134
+ onKeyDown?.(e);
135
+ if (e.defaultPrevented || e.nativeEvent.isComposing) return;
136
+ if (e.key === "Enter") {
137
+ if (draft.trim()) {
138
+ e.preventDefault();
139
+ flush();
140
+ }
141
+ } else if (e.key === "Backspace" && draft === "" && tags.length > 0) {
142
+ e.preventDefault();
143
+ commit(tags.slice(0, -1));
144
+ }
145
+ },
146
+ onPaste: (e) => {
147
+ onPaste?.(e);
148
+ if (e.defaultPrevented) return;
149
+ const text = e.clipboardData.getData("text");
150
+ if (!splitter.test(text)) return;
151
+ e.preventDefault();
152
+ const left = add(text.split(splitter));
153
+ setRejected(left.length > 0);
154
+ setDraft(left.join(" "));
155
+ },
156
+ onBlur: (e) => {
157
+ onBlur?.(e);
158
+ if (addOnBlur) flush();
159
+ },
160
+ ...props
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ );
166
+ }
167
+ export {
168
+ TagInput
169
+ };
@@ -0,0 +1,61 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ function Testimonial({ quote, author, role, avatar, logo, size = "default", variant, className, ...props }) {
4
+ const v = variant ?? (size === "lg" ? "plain" : "card");
5
+ const lg = size === "lg";
6
+ return /* @__PURE__ */ jsxs(
7
+ "figure",
8
+ {
9
+ "data-slot": "testimonial",
10
+ "data-size": size,
11
+ "data-variant": v,
12
+ className: cn(
13
+ "flex min-w-0 flex-col gap-(--ds-card-spacing) text-sm",
14
+ v === "card" && "rounded-card border bg-card p-(--ds-card-spacing) text-card-foreground shadow-card",
15
+ lg && "mx-auto max-w-(--ds-landing-measure) items-center text-center",
16
+ className
17
+ ),
18
+ ...props,
19
+ children: [
20
+ logo != null ? /* @__PURE__ */ jsx("div", { "data-slot": "testimonial-logo", className: "flex h-8 items-center [&>img]:h-full [&>img]:w-auto", children: logo }) : null,
21
+ /* @__PURE__ */ jsx(
22
+ "blockquote",
23
+ {
24
+ "data-slot": "testimonial-quote",
25
+ className: cn(
26
+ "text-pretty",
27
+ lg ? "text-(length:--ds-testimonial-quote-size-lg) leading-snug font-(--ds-heading-weight) tracking-(--ds-heading-tracking)" : "text-(length:--ds-testimonial-quote-size)",
28
+ "before:content-[open-quote] after:content-[close-quote]"
29
+ ),
30
+ children: quote
31
+ }
32
+ ),
33
+ /* @__PURE__ */ jsxs("figcaption", { "data-slot": "testimonial-author", className: cn("mt-auto flex items-center gap-3", lg && "justify-center"), children: [
34
+ avatar,
35
+ /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-col", lg ? "items-center" : "items-start"), children: [
36
+ /* @__PURE__ */ jsx("span", { "data-slot": "testimonial-name", className: "font-(--ds-medium-weight)", children: author }),
37
+ role != null ? /* @__PURE__ */ jsx("span", { "data-slot": "testimonial-role", className: "text-muted-foreground", children: role }) : null
38
+ ] })
39
+ ] })
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ function TestimonialGrid({ columns = 3, className, ...props }) {
45
+ return /* @__PURE__ */ jsx("div", { className: "@container/testimonials w-full", children: /* @__PURE__ */ jsx(
46
+ "div",
47
+ {
48
+ "data-slot": "testimonial-grid",
49
+ className: cn(
50
+ "grid grid-cols-1 gap-(--ds-landing-grid-gap) @2xl/testimonials:grid-cols-2",
51
+ columns === 3 && "@5xl/testimonials:grid-cols-3",
52
+ className
53
+ ),
54
+ ...props
55
+ }
56
+ ) });
57
+ }
58
+ export {
59
+ Testimonial,
60
+ TestimonialGrid
61
+ };
@@ -1,12 +1,18 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
- function Textarea({ className, ...props }) {
3
+ function Textarea({
4
+ className,
5
+ autoGrow = false,
6
+ ...props
7
+ }) {
4
8
  return /* @__PURE__ */ jsx(
5
9
  "textarea",
6
10
  {
7
11
  "data-slot": "textarea",
12
+ "data-auto-grow": autoGrow || void 0,
8
13
  className: cn(
9
14
  "min-h-16 w-full min-w-0 rounded-field-multiline border border-(--ds-field-border) bg-(--ds-field-bg) px-(--ds-field-px) py-2 text-base transition-colors duration-(--ds-motion-snap) outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-(--ds-disabled-opacity) aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(length:--ds-ring-width) aria-invalid:ring-(--ds-invalid-ring) md:text-sm",
15
+ autoGrow && "max-h-(--ds-textarea-max-h) resize-none overflow-y-auto [field-sizing:content]",
10
16
  className
11
17
  ),
12
18
  ...props