@vamos-ui/react 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +4 -0
  2. package/dist/blocks/block-heading.js +1 -1
  3. package/dist/blocks/block-image.js +1 -1
  4. package/dist/blocks/block-link.js +2 -2
  5. package/dist/blocks/index.d.ts +5 -5
  6. package/dist/blocks/index.js +5 -5
  7. package/dist/blocks/labels.d.ts +8 -0
  8. package/dist/blocks/labels.js +60 -0
  9. package/dist/blocks/section-header.js +1 -1
  10. package/dist/blocks/section.js +2 -2
  11. package/dist/blocks/site/_kit-1.js +1 -1
  12. package/dist/blocks/site/announcement-bar.js +1 -1
  13. package/dist/blocks/site/article-layout.d.ts +1 -0
  14. package/dist/blocks/site/article-layout.js +2 -1
  15. package/dist/blocks/site/blog-list.d.ts +1 -0
  16. package/dist/blocks/site/blog-list.js +3 -2
  17. package/dist/blocks/site/contact-dock.js +3 -1
  18. package/dist/blocks/site/contact-form.js +1 -1
  19. package/dist/blocks/site/cta.d.ts +2 -2
  20. package/dist/blocks/site/cta.js +6 -4
  21. package/dist/blocks/site/feature-grid.d.ts +1 -0
  22. package/dist/blocks/site/feature-grid.js +5 -4
  23. package/dist/blocks/site/feature-tabs.js +1 -1
  24. package/dist/blocks/site/footer.d.ts +11 -2
  25. package/dist/blocks/site/footer.js +36 -11
  26. package/dist/blocks/site/gallery-section.d.ts +6 -1
  27. package/dist/blocks/site/gallery-section.js +5 -4
  28. package/dist/blocks/site/hero.d.ts +3 -2
  29. package/dist/blocks/site/hero.js +7 -5
  30. package/dist/blocks/site/logo-strip.d.ts +1 -0
  31. package/dist/blocks/site/logo-strip.js +1 -1
  32. package/dist/blocks/site/map-hours.d.ts +2 -2
  33. package/dist/blocks/site/map-hours.js +4 -2
  34. package/dist/blocks/site/media-text.d.ts +4 -1
  35. package/dist/blocks/site/media-text.js +4 -3
  36. package/dist/blocks/site/menu-list.d.ts +7 -3
  37. package/dist/blocks/site/menu-list.js +34 -7
  38. package/dist/blocks/site/navbar.d.ts +1 -0
  39. package/dist/blocks/site/navbar.js +6 -5
  40. package/dist/blocks/site/not-found.js +2 -1
  41. package/dist/blocks/site/page-intro.d.ts +1 -0
  42. package/dist/blocks/site/page-intro.js +2 -1
  43. package/dist/blocks/site/process.d.ts +1 -0
  44. package/dist/blocks/site/process.js +2 -1
  45. package/dist/blocks/site/registry-1.d.ts +1 -1
  46. package/dist/blocks/site/registry-2.d.ts +5 -0
  47. package/dist/blocks/site/registry-2.js +5 -3
  48. package/dist/blocks/site/rich-text-section.js +2 -1
  49. package/dist/blocks/site/shared/heading-lines.d.ts +9 -0
  50. package/dist/blocks/site/shared/heading-lines.js +32 -0
  51. package/dist/blocks/site/shared/image-sizes.d.ts +25 -0
  52. package/dist/blocks/site/shared/image-sizes.js +37 -0
  53. package/dist/blocks/site/shared/island-keys.d.ts +1 -1
  54. package/dist/blocks/site/shared/island-keys.js +1 -1
  55. package/dist/blocks/site/shared/labels-2.d.ts +17 -1
  56. package/dist/blocks/site/shared/labels-2.js +832 -6
  57. package/dist/blocks/site/shared/open-now.d.ts +1 -1
  58. package/dist/blocks/site/shared/open-now.js +1 -1
  59. package/dist/blocks/site/shared/opening-hours.d.ts +18 -2
  60. package/dist/blocks/site/shared/opening-hours.js +36 -7
  61. package/dist/blocks/site/shared/tap.d.ts +9 -0
  62. package/dist/blocks/site/shared/tap.js +16 -0
  63. package/dist/blocks/site/site-shell.js +3 -3
  64. package/dist/blocks/site/team.d.ts +1 -1
  65. package/dist/blocks/site/team.js +4 -3
  66. package/dist/blocks/site/testimonials.d.ts +2 -2
  67. package/dist/blocks/site/testimonials.js +3 -3
  68. package/dist/business/approval-flow.js +2 -2
  69. package/dist/business/import-wizard.js +1 -1
  70. package/dist/business/line-items.js +1 -1
  71. package/dist/business/multi-step-form.js +2 -2
  72. package/dist/business/permission-matrix.js +1 -1
  73. package/dist/business/setup-checklist.js +2 -2
  74. package/dist/business/signer-status.js +1 -1
  75. package/dist/charts/bar-chart.js +1 -1
  76. package/dist/charts/bar-list.js +1 -1
  77. package/dist/charts/chart-shell.d.ts +9 -2
  78. package/dist/charts/chart-shell.js +11 -5
  79. package/dist/charts/chart.js +1 -1
  80. package/dist/charts/combo-chart.js +5 -7
  81. package/dist/charts/donut-chart.js +1 -1
  82. package/dist/charts/funnel.js +1 -1
  83. package/dist/charts/gauge.js +2 -2
  84. package/dist/charts/utils.d.ts +10 -0
  85. package/dist/charts/utils.js +46 -0
  86. package/dist/components/accordion.d.ts +1 -1
  87. package/dist/components/accordion.js +8 -8
  88. package/dist/components/activity-timeline.js +11 -11
  89. package/dist/components/address-field.js +3 -3
  90. package/dist/components/alert-dialog.d.ts +1 -1
  91. package/dist/components/alert-dialog.js +8 -8
  92. package/dist/components/alert.js +2 -2
  93. package/dist/components/app-shell.js +3 -3
  94. package/dist/components/aspect-ratio.d.ts +26 -0
  95. package/dist/components/aspect-ratio.js +42 -0
  96. package/dist/components/attachment-list.js +2 -2
  97. package/dist/components/audit-log.js +1 -1
  98. package/dist/components/avatar.d.ts +1 -1
  99. package/dist/components/avatar.js +8 -8
  100. package/dist/components/backup-codes.js +1 -1
  101. package/dist/components/badge.js +3 -3
  102. package/dist/components/breadcrumb.js +10 -9
  103. package/dist/components/button-group.js +4 -4
  104. package/dist/components/button.js +4 -4
  105. package/dist/components/calendar.js +5 -5
  106. package/dist/components/card.js +8 -8
  107. package/dist/components/carousel.d.ts +12 -3
  108. package/dist/components/carousel.js +17 -14
  109. package/dist/components/checkbox.d.ts +1 -1
  110. package/dist/components/checkbox.js +6 -6
  111. package/dist/components/collapsible.d.ts +36 -0
  112. package/dist/components/collapsible.js +37 -0
  113. package/dist/components/color-picker.js +3 -3
  114. package/dist/components/combobox.js +1 -1
  115. package/dist/components/command.js +9 -9
  116. package/dist/components/comment-thread.js +3 -3
  117. package/dist/components/context-menu.d.ts +1 -1
  118. package/dist/components/context-menu.js +9 -9
  119. package/dist/components/currency-input.js +1 -1
  120. package/dist/components/date-picker.js +2 -2
  121. package/dist/components/date-range-picker.js +1 -1
  122. package/dist/components/description-list.js +2 -2
  123. package/dist/components/dialog.d.ts +1 -1
  124. package/dist/components/dialog.js +9 -9
  125. package/dist/components/dropdown-menu.d.ts +1 -1
  126. package/dist/components/dropdown-menu.js +9 -9
  127. package/dist/components/editor-layout.js +9 -9
  128. package/dist/components/empty-state.js +2 -2
  129. package/dist/components/entity-card.js +1 -1
  130. package/dist/components/file-upload.js +5 -5
  131. package/dist/components/formatted-input.js +3 -3
  132. package/dist/components/hierarchy-chart.js +1 -1
  133. package/dist/components/hover-card.d.ts +1 -1
  134. package/dist/components/hover-card.js +3 -3
  135. package/dist/components/iban-input.js +1 -1
  136. package/dist/components/id-input.js +3 -3
  137. package/dist/components/image.d.ts +18 -2
  138. package/dist/components/image.js +16 -9
  139. package/dist/components/input-otp.js +6 -6
  140. package/dist/components/input.d.ts +1 -1
  141. package/dist/components/input.js +6 -6
  142. package/dist/components/item.js +4 -4
  143. package/dist/components/kbd.js +3 -3
  144. package/dist/components/list-layout.js +9 -9
  145. package/dist/components/menubar.d.ts +96 -0
  146. package/dist/components/menubar.js +123 -0
  147. package/dist/components/native-select.js +1 -1
  148. package/dist/components/navigation-menu.d.ts +1 -1
  149. package/dist/components/navigation-menu.js +12 -11
  150. package/dist/components/notification-center.js +4 -4
  151. package/dist/components/page-header.js +3 -3
  152. package/dist/components/pagination.js +9 -9
  153. package/dist/components/phone-input.js +1 -1
  154. package/dist/components/pin-map.js +1 -1
  155. package/dist/components/placeholder-art.d.ts +51 -0
  156. package/dist/components/placeholder-art.js +82 -0
  157. package/dist/components/popover.d.ts +1 -1
  158. package/dist/components/popover.js +7 -7
  159. package/dist/components/progress.js +3 -3
  160. package/dist/components/qr-code.js +1 -1
  161. package/dist/components/radio-group.d.ts +1 -1
  162. package/dist/components/radio-group.js +4 -4
  163. package/dist/components/record-detail-layout.js +10 -10
  164. package/dist/components/record-picker.js +2 -2
  165. package/dist/components/resizable.js +2 -2
  166. package/dist/components/scroll-area.d.ts +1 -1
  167. package/dist/components/scroll-area.js +4 -4
  168. package/dist/components/select.d.ts +1 -1
  169. package/dist/components/select.js +10 -10
  170. package/dist/components/separator.d.ts +1 -1
  171. package/dist/components/separator.js +3 -3
  172. package/dist/components/settings-layout.js +6 -6
  173. package/dist/components/sheet.js +3 -3
  174. package/dist/components/sidebar.js +12 -11
  175. package/dist/components/signature-pad.js +1 -1
  176. package/dist/components/skeleton.js +5 -5
  177. package/dist/components/sla-timer.js +2 -2
  178. package/dist/components/slider.d.ts +1 -1
  179. package/dist/components/slider.js +2 -2
  180. package/dist/components/slug-input.js +1 -1
  181. package/dist/components/sparkline.js +1 -1
  182. package/dist/components/spinner.js +2 -2
  183. package/dist/components/stat.js +5 -5
  184. package/dist/components/status-picker.js +2 -2
  185. package/dist/components/stepper.js +1 -1
  186. package/dist/components/switch.d.ts +1 -1
  187. package/dist/components/switch.js +3 -3
  188. package/dist/components/table.js +10 -10
  189. package/dist/components/tabs.d.ts +1 -1
  190. package/dist/components/tabs.js +11 -11
  191. package/dist/components/tag-input.js +1 -1
  192. package/dist/components/task-list.js +1 -1
  193. package/dist/components/time-picker.js +3 -3
  194. package/dist/components/toggle.d.ts +2 -1
  195. package/dist/components/toggle.js +7 -6
  196. package/dist/components/tooltip.d.ts +1 -1
  197. package/dist/components/tooltip.js +5 -4
  198. package/dist/components/top-bar.js +4 -4
  199. package/dist/components/tour.js +1 -1
  200. package/dist/components/tree-select.js +2 -2
  201. package/dist/components/tree-view.js +3 -3
  202. package/dist/components/typography.js +11 -11
  203. package/dist/components/user-picker.js +2 -2
  204. package/dist/components/version-history.js +3 -3
  205. package/dist/data-table/data-table.js +1 -1
  206. package/dist/data-table/filter-bar.js +2 -2
  207. package/dist/data-table/index.d.ts +15 -8
  208. package/dist/data-table/index.js +9 -8
  209. package/dist/data-table/saved-views.js +1 -1
  210. package/dist/editor/block-editor.js +1 -1
  211. package/dist/editor/context.js +1 -1
  212. package/dist/editor/menus.js +1 -1
  213. package/dist/fonts/font-picker.js +3 -3
  214. package/dist/fonts/pairing-picker.js +1 -1
  215. package/dist/fonts/provider.js +1 -1
  216. package/dist/index.d.ts +188 -90
  217. package/dist/index.js +94 -90
  218. package/dist/lib/data-islands.js +1 -1
  219. package/dist/lib/field-context.js +1 -1
  220. package/dist/lib/floating-arrow.js +1 -1
  221. package/dist/lib/islands.js +1 -1
  222. package/dist/lib/layer.js +3 -3
  223. package/dist/lib/locale.js +2 -2
  224. package/dist/lib/menu.js +2 -2
  225. package/dist/lib/provider.js +4 -4
  226. package/dist/lib/theme-scope.js +4 -3
  227. package/dist/lib/value-format.js +1 -1
  228. package/dist/lib/variants.js +2 -2
  229. package/dist/locales/ar.d.ts +2087 -0
  230. package/dist/locales/ar.js +2088 -0
  231. package/dist/locales/de.d.ts +2087 -0
  232. package/dist/locales/de.js +2088 -0
  233. package/dist/locales/en.d.ts +1 -0
  234. package/dist/locales/en.js +1 -0
  235. package/dist/locales/es.d.ts +2087 -0
  236. package/dist/locales/es.js +2087 -0
  237. package/dist/locales/fr.d.ts +2087 -0
  238. package/dist/locales/fr.js +2088 -0
  239. package/dist/locales/tr.d.ts +1 -0
  240. package/dist/locales/tr.js +1 -0
  241. package/dist/media/focal-point.js +1 -1
  242. package/dist/media/gallery.js +1 -1
  243. package/dist/media/image-cropper.js +1 -1
  244. package/dist/media/image-field.js +2 -2
  245. package/dist/media/lightbox.js +4 -3
  246. package/dist/media/link-preview.js +3 -3
  247. package/dist/media/media-library.js +4 -4
  248. package/dist/media/media-picker.js +1 -1
  249. package/dist/media/media-provider.js +1 -1
  250. package/dist/media/video-player.js +4 -4
  251. package/dist/motion/count-up.js +1 -1
  252. package/dist/motion/motion-scope.js +2 -2
  253. package/dist/motion/page-transition.js +1 -1
  254. package/dist/motion/parallax.js +2 -2
  255. package/dist/motion/pointer.js +3 -3
  256. package/dist/motion/reveal.js +3 -3
  257. package/dist/motion/skeleton-swap.js +1 -1
  258. package/dist/motion/text-reveal.d.ts +3 -1
  259. package/dist/motion/text-reveal.js +6 -4
  260. package/dist/motion/ticker.js +1 -1
  261. package/dist/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  262. package/dist/render/block-renderer.js +1 -1
  263. package/dist/scheduler/gantt.js +2 -2
  264. package/dist/scheduler/resource-calendar.js +2 -2
  265. package/dist/scheduler/scheduler.js +3 -3
  266. package/dist/scheduler/time-tracker.js +4 -4
  267. package/dist/sortable/kanban.js +2 -2
  268. package/dist/sortable/sortable-list.js +2 -2
  269. package/dist/sortable/sortable.js +4 -4
  270. package/dist/styles/blocks.css +18 -9
  271. package/dist/styles/editors.css +2 -1
  272. package/dist/styles/media.css +31 -5
  273. package/dist/styles.css +39 -9
  274. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Slider as SliderPrimitive } from "radix-ui";
4
+ import * as SliderPrimitive from "radix-ui/slider";
5
5
  import { cn } from "../lib/cn.js";
6
6
  import { mergeIds } from "../lib/compose-refs.js";
7
7
  import { FieldContextReset, useFieldContext } from "../lib/field-context.js";
@@ -36,7 +36,7 @@ const snap = (n, min, step) => {
36
36
  * <Slider defaultValue={[60]} marks={[0, 25, 50, 75, 100]} aria-label="Deal probability" />
37
37
  * ```
38
38
  */
39
- export const Slider = React.forwardRef(function Slider({ value: valueProp, defaultValue, onValueChange, onValueCommit, min = 0, max = 100, step = 1, marks, formatValue, formatOptions, showValue = "hover", withInputs, size = "md", thumbLabels, name, names, invalid, readOnly, required, disabled, labels, id, className, orientation = "horizontal", "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }, ref) {
39
+ export const Slider = /*#__PURE__*/ React.forwardRef(function Slider({ value: valueProp, defaultValue, onValueChange, onValueCommit, min = 0, max = 100, step = 1, marks, formatValue, formatOptions, showValue = "hover", withInputs, size = "md", thumbLabels, name, names, invalid, readOnly, required, disabled, labels, id, className, orientation = "horizontal", "aria-label": ariaLabel, "aria-labelledby": labelledBy, "aria-describedby": describedBy, ...props }, ref) {
40
40
  const field = useFieldContext();
41
41
  const t = useLabels("slider", sliderLabels, labels);
42
42
  const f = useFormat();
@@ -39,7 +39,7 @@ const slugLabels = {
39
39
  * <SlugInput variant="permalink" source={title} prefix="https://vamos.ist/blog/" />
40
40
  * ```
41
41
  */
42
- export const SlugInput = React.forwardRef(function SlugInput(props, forwardedRef) {
42
+ export const SlugInput = /*#__PURE__*/ React.forwardRef(function SlugInput(props, forwardedRef) {
43
43
  const { value, defaultValue, onValueChange, source, locked: lockedProp, defaultLocked, onLockedChange, prefix, maxLength = 80, locale: localeProp, validate, suggestUnique, validateDelay = 350, variant = "field", href, size, name, id, disabled, invalid, placeholder, labels, className, "aria-label": ariaLabel, "aria-describedby": describedByProp, ...rest } = props;
44
44
  const { locale: providerLocale } = useLocale();
45
45
  const locale = localeProp ?? providerLocale;
@@ -14,7 +14,7 @@ const SIZES = { xs: [64, 20], sm: [96, 32], md: [160, 40] };
14
14
  * <Sparkline values={weekly} variant="bars" size="xs" domain={[0, 120]} label={sparklineSummary(weekly)} />
15
15
  * ```
16
16
  */
17
- export const Sparkline = React.forwardRef(function Sparkline({ values, variant = "line", size = "sm", width, height, color, strokeWidth = 1.6, showLast, showMinMax, reference, domain, label, className, style, ...props }, ref) {
17
+ export const Sparkline = /*#__PURE__*/ React.forwardRef(function Sparkline({ values, variant = "line", size = "sm", width, height, color, strokeWidth = 1.6, showLast, showMinMax, reference, domain, label, className, style, ...props }, ref) {
18
18
  const gradientId = `spark-${React.useId().replace(/:/g, "")}`;
19
19
  const fluid = width === "100%";
20
20
  const w = typeof width === "number" ? width : SIZES[size][0];
@@ -4,7 +4,7 @@ import { cva } from "class-variance-authority";
4
4
  import { cn } from "../lib/cn.js";
5
5
  const SIZES = { xs: 12, sm: 16, md: 20, lg: 28 };
6
6
  const STROKE = { xs: 3, sm: 2.75, md: 2.5, lg: 2.25 };
7
- export const spinnerVariants = cva("ui-spinner inline-block shrink-0 align-middle", {
7
+ export const spinnerVariants = /*#__PURE__*/ cva("ui-spinner inline-block shrink-0 align-middle", {
8
8
  variants: {
9
9
  tone: {
10
10
  /** Inherits the text colour — the default inside buttons. */
@@ -24,7 +24,7 @@ export const spinnerVariants = cva("ui-spinner inline-block shrink-0 align-middl
24
24
  * <Button loading>Save</Button> // uses a decorative Spinner
25
25
  * ```
26
26
  */
27
- export const Spinner = React.forwardRef(function Spinner({ size = "sm", tone, label, delay, className, style, ...props }, ref) {
27
+ export const Spinner = /*#__PURE__*/ React.forwardRef(function Spinner({ size = "sm", tone, label, delay, className, style, ...props }, ref) {
28
28
  const px = typeof size === "number" ? size : SIZES[size];
29
29
  const stroke = typeof size === "number" ? (size <= 14 ? 3 : size >= 26 ? 2.25 : 2.5) : STROKE[size];
30
30
  const svg = (_jsxs("svg", { ref: ref, "data-slot": "spinner", viewBox: "0 0 24 24", width: px, height: px, fill: "none", "aria-hidden": true, focusable: "false", className: cn(spinnerVariants({ tone }), delay ? "ui-spinner-delayed" : undefined, className), style: delay ? { ...style, "--spinner-delay": `${delay}ms` } : style, ...props, children: [_jsx("circle", { cx: "12", cy: "12", r: "9.25", stroke: "currentColor", strokeOpacity: 0.18, strokeWidth: stroke }), _jsx("circle", { className: "ui-spinner-arc", cx: "12", cy: "12", r: "9.25", stroke: "currentColor", strokeWidth: stroke, strokeLinecap: "round", transform: "rotate(-90 12 12)" })] }));
@@ -10,7 +10,7 @@ import { Sparkline, sparklineDirection } from "./sparkline.js";
10
10
  /* ------------------------------------------------------------------ */
11
11
  /* Delta */
12
12
  /* ------------------------------------------------------------------ */
13
- const deltaVariants = cva("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap font-medium leading-none [&_svg]:shrink-0", {
13
+ const deltaVariants = /*#__PURE__*/ cva("inline-flex shrink-0 items-center gap-0.5 whitespace-nowrap font-medium leading-none [&_svg]:shrink-0", {
14
14
  variants: {
15
15
  variant: {
16
16
  text: "text-xs [&_svg]:size-3.5",
@@ -34,7 +34,7 @@ const deltaVariants = cva("inline-flex shrink-0 items-center gap-0.5 whitespace-
34
34
  * <Delta value={1250} kind="currency" variant="badge" />
35
35
  * ```
36
36
  */
37
- export const Delta = React.forwardRef(function Delta({ value, kind = "percent", currency, intent = "higher-is-better", variant, precision, srLabel, comparison, labels, className, ...props }, ref) {
37
+ export const Delta = /*#__PURE__*/ React.forwardRef(function Delta({ value, kind = "percent", currency, intent = "higher-is-better", variant, precision, srLabel, comparison, labels, className, ...props }, ref) {
38
38
  const has = typeof value === "number" && Number.isFinite(value);
39
39
  const dir = has ? Math.sign(value) : 0;
40
40
  const good = intent === "neutral" || dir === 0 ? 0 : intent === "higher-is-better" ? dir : -dir;
@@ -45,7 +45,7 @@ export const Delta = React.forwardRef(function Delta({ value, kind = "percent",
45
45
  /* ------------------------------------------------------------------ */
46
46
  /* Stat parts */
47
47
  /* ------------------------------------------------------------------ */
48
- const statVariants = cva("group/stat relative grid min-w-0 grid-cols-[minmax(0,1fr)_auto] content-start items-start gap-x-3 [grid-template-areas:'label_delta'_'value_trend'_'target_target'_'foot_foot']" +
48
+ const statVariants = /*#__PURE__*/ cva("group/stat relative grid min-w-0 grid-cols-[minmax(0,1fr)_auto] content-start items-start gap-x-3 [grid-template-areas:'label_delta'_'value_trend'_'target_target'_'foot_foot']" +
49
49
  // without a sparkline the value may use the full width (a wide delta must not squeeze "$3,815,400.00")
50
50
  " [&:not(:has([data-slot=stat-trend]))_[data-slot=stat-value]]:[grid-column:1/-1]", {
51
51
  variants: {
@@ -74,7 +74,7 @@ const statVariants = cva("group/stat relative grid min-w-0 grid-cols-[minmax(0,1
74
74
  *
75
75
  * Compose for custom layouts: `<Stat><StatLabel/><StatValue/><StatDelta/><StatTrend/><StatFooter/></Stat>`.
76
76
  */
77
- export const Stat = React.forwardRef(function Stat({ label, value, format, delta, deltaKind = "percent", deltaVariant, intent = "higher-is-better", comparison, trend, trendVariant = "line", target, icon: Icon, href, loading, error, errorAction, variant = "card", size = "md", labels, className, children, ...props }, ref) {
77
+ export const Stat = /*#__PURE__*/ React.forwardRef(function Stat({ label, value, format, delta, deltaKind = "percent", deltaVariant, intent = "higher-is-better", comparison, trend, trendVariant = "line", target, icon: Icon, href, loading, error, errorAction, variant = "card", size = "md", labels, className, children, ...props }, ref) {
78
78
  const trendId = React.useId();
79
79
  const dir = trend ? sparklineDirection(trend) : 0;
80
80
  const good = intent === "neutral" || dir === 0 ? 0 : intent === "higher-is-better" ? dir : -dir;
@@ -125,6 +125,6 @@ const columnClasses = {
125
125
  * A responsive row of Stats. Columns follow the container width, not the viewport, so the same
126
126
  * row works in a page, a sheet or a dashboard widget.
127
127
  */
128
- export const StatGroup = React.forwardRef(function StatGroup({ columns = 4, variant = "cards", className, children, ...props }, ref) {
128
+ export const StatGroup = /*#__PURE__*/ React.forwardRef(function StatGroup({ columns = 4, variant = "cards", className, children, ...props }, ref) {
129
129
  return (_jsx("div", { ref: ref, "data-slot": "stat-group", className: cn("@container", className), ...props, children: _jsx("div", { className: cn("grid grid-cols-1", columnClasses[columns], variant === "cards" ? "gap-(--gap)" : "surface overflow-hidden rounded-ui-lg [&>*]:shadow-[-1px_-1px_0_0_var(--line)]"), children: children }) }));
130
130
  });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Select as SelectPrimitive } from "radix-ui";
4
+ import * as SelectPrimitive from "radix-ui/select";
5
5
  import { Check, ChevronDown } from "lucide-react";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { useFieldControl } from "../lib/field-context.js";
@@ -83,7 +83,7 @@ export function StatusBadge({ status, size = "md", className }) {
83
83
  * confirm={(s) => s.value === "rejected" && { title: "Reject request?", requireNote: true, tone: "danger" }} />
84
84
  * ```
85
85
  */
86
- export const StatusPicker = React.forwardRef(function StatusPicker({ statuses, value: valueProp, defaultValue, onValueChange, transitions, confirm, onError, trigger = "badge", groupByCategory, name, size = "md", disabled: disabledProp, readOnly: readOnlyProp, loading, fieldLabel, labels, className, ...rest }, ref) {
86
+ export const StatusPicker = /*#__PURE__*/ React.forwardRef(function StatusPicker({ statuses, value: valueProp, defaultValue, onValueChange, transitions, confirm, onError, trigger = "badge", groupByCategory, name, size = "md", disabled: disabledProp, readOnly: readOnlyProp, loading, fieldLabel, labels, className, ...rest }, ref) {
87
87
  const t = useLabels("statusPicker", statusPickerLabels, labels);
88
88
  const control = useFieldControl({
89
89
  id: rest.id,
@@ -41,7 +41,7 @@ export function StepIndicator({ status, number, icon, loading, size = "md", clas
41
41
  * An ordered list; the current step has `aria-current="step"` and every step's name includes its
42
42
  * position and status ("Step 2 of 4, Map columns, current").
43
43
  */
44
- export const Stepper = React.forwardRef(function Stepper({ value, onValueChange, navigable = "completed", orientation = "horizontal", variant = "numbered", size = "md", steps: stepsProp, loading, responsive = true, labels, className, children, "aria-label": ariaLabel, ...props }, ref) {
44
+ export const Stepper = /*#__PURE__*/ React.forwardRef(function Stepper({ value, onValueChange, navigable = "completed", orientation = "horizontal", variant = "numbered", size = "md", steps: stepsProp, loading, responsive = true, labels, className, children, "aria-label": ariaLabel, ...props }, ref) {
45
45
  const t = useLabels("stepper", stepperLabels, labels);
46
46
  const raw = stepsProp ??
47
47
  React.Children.toArray(children)
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { Switch as SwitchPrimitive } from "radix-ui";
2
+ import * as SwitchPrimitive from "radix-ui/switch";
3
3
  export declare const switchVariants: (props?: ({
4
4
  size?: "sm" | "md" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Switch as SwitchPrimitive } from "radix-ui";
4
+ import * as SwitchPrimitive from "radix-ui/switch";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { mergeIds } from "../lib/compose-refs.js";
8
8
  import { useFieldControl } from "../lib/field-context.js";
9
9
  import { useControllableState } from "../lib/use-controllable-state.js";
10
10
  import { Spinner } from "./spinner.js";
11
- export const switchVariants = cva([
11
+ export const switchVariants = /*#__PURE__*/ cva([
12
12
  "group/switch relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent p-[2px] outline-none",
13
13
  "bg-track transition-[background-color,box-shadow] duration-200",
14
14
  "data-[state=unchecked]:hover:bg-[color-mix(in_srgb,var(--track),var(--fg)_9%)]",
@@ -36,7 +36,7 @@ export const switchVariants = cva([
36
36
  * <Switch size="sm" checked={active} onCheckedChange={save} loading={saving} aria-label="Active" />
37
37
  * ```
38
38
  */
39
- export const Switch = React.forwardRef(function Switch(rawProps, ref) {
39
+ export const Switch = /*#__PURE__*/ React.forwardRef(function Switch(rawProps, ref) {
40
40
  const { checked: checkedProp, defaultChecked, onCheckedChange, label, description, labelPosition = "end", size = "md", loading, invalid, className, controlClassName, style, ...rest } = rawProps;
41
41
  const control = useFieldControl({ ...rest, "aria-invalid": invalid ? true : rest["aria-invalid"] });
42
42
  const { readOnly, required, ...controlProps } = control;
@@ -9,7 +9,7 @@ const alignClass = { start: "text-start", center: "text-center", end: "text-end"
9
9
  * Scroll wrapper for a Table: horizontal (and optional vertical) scrolling with soft edge fades
10
10
  * that show there is more content. It is a focusable, named region so keyboard users can scroll.
11
11
  */
12
- export const TableContainer = React.forwardRef(function TableContainer({ className, maxHeight, style, ...props }, ref) {
12
+ export const TableContainer = /*#__PURE__*/ React.forwardRef(function TableContainer({ className, maxHeight, style, ...props }, ref) {
13
13
  return (_jsx("div", { ref: ref, role: "region", tabIndex: 0, "data-slot": "table-container", className: cn("ui-table-scroll relative w-full overflow-auto overscroll-x-contain rounded-[inherit] focus-ring", className), style: maxHeight ? { maxHeight, ...style } : style, ...props }));
14
14
  });
15
15
  /**
@@ -26,7 +26,7 @@ export const TableContainer = React.forwardRef(function TableContainer({ classNa
26
26
  * </TableContainer>
27
27
  * ```
28
28
  */
29
- export const Table = React.forwardRef(function Table({ className, density = "inherit", striped, hover = true, bordered = "rows", stickyHeader, stickyFirstColumn, layout = "auto", children, ...props }, ref) {
29
+ export const Table = /*#__PURE__*/ React.forwardRef(function Table({ className, density = "inherit", striped, hover = true, bordered = "rows", stickyHeader, stickyFirstColumn, layout = "auto", children, ...props }, ref) {
30
30
  if (process.env.NODE_ENV !== "production" && !props["aria-label"] && !props["aria-labelledby"]) {
31
31
  const hasCaption = React.Children.toArray(children).some((c) => React.isValidElement(c) && c.type === TableCaption);
32
32
  if (!hasCaption)
@@ -35,38 +35,38 @@ export const Table = React.forwardRef(function Table({ className, density = "inh
35
35
  return (_jsx("table", { ref: ref, "data-slot": "table", "data-density": density === "inherit" ? undefined : density, "data-striped": striped ? "" : undefined, "data-hover": hover ? "" : undefined, "data-bordered": bordered, "data-sticky-header": stickyHeader ? "" : undefined, "data-sticky-column": stickyFirstColumn ? "" : undefined, className: cn("ui-table w-full caption-bottom border-separate border-spacing-0 text-[13px] text-fg", layout === "fixed" && "table-fixed", className), ...props, children: children }));
36
36
  });
37
37
  /** Names the table. Visible under the table by default; `visuallyHidden` keeps it for screen readers. */
38
- export const TableCaption = React.forwardRef(function TableCaption({ className, visuallyHidden, side = "bottom", ...props }, ref) {
38
+ export const TableCaption = /*#__PURE__*/ React.forwardRef(function TableCaption({ className, visuallyHidden, side = "bottom", ...props }, ref) {
39
39
  return (_jsx("caption", { ref: ref, "data-slot": "table-caption", className: cn(visuallyHidden ? "sr-only" : "px-(--cell-px) py-3 text-start text-xs text-fg-subtle", side === "top" && "caption-top pt-0", className), ...props }));
40
40
  });
41
- export const TableHeader = React.forwardRef(function TableHeader({ className, ...props }, ref) {
41
+ export const TableHeader = /*#__PURE__*/ React.forwardRef(function TableHeader({ className, ...props }, ref) {
42
42
  return _jsx("thead", { ref: ref, "data-slot": "table-header", className: className, ...props });
43
43
  });
44
- export const TableBody = React.forwardRef(function TableBody({ className, ...props }, ref) {
44
+ export const TableBody = /*#__PURE__*/ React.forwardRef(function TableBody({ className, ...props }, ref) {
45
45
  return _jsx("tbody", { ref: ref, "data-slot": "table-body", className: className, ...props });
46
46
  });
47
- export const TableFooter = React.forwardRef(function TableFooter({ className, ...props }, ref) {
47
+ export const TableFooter = /*#__PURE__*/ React.forwardRef(function TableFooter({ className, ...props }, ref) {
48
48
  return _jsx("tfoot", { ref: ref, "data-slot": "table-footer", className: cn("font-medium", className), ...props });
49
49
  });
50
- export const TableRow = React.forwardRef(function TableRow({ className, selected, disabled, highlighted, ...props }, ref) {
50
+ export const TableRow = /*#__PURE__*/ React.forwardRef(function TableRow({ className, selected, disabled, highlighted, ...props }, ref) {
51
51
  return (_jsx("tr", { ref: ref, "data-slot": "table-row", "data-state": selected ? "selected" : undefined, "data-disabled": disabled ? "" : undefined, "data-highlighted": highlighted ? "" : undefined, "aria-selected": selected === undefined ? undefined : selected, "aria-disabled": disabled || undefined, className: className, ...props }));
52
52
  });
53
53
  /**
54
54
  * Column header (`<th scope="col">`). With `onSort` the label becomes a button and the cell
55
55
  * gets `aria-sort`.
56
56
  */
57
- export const TableHead = React.forwardRef(function TableHead({ className, align, numeric, sort, onSort, scope = "col", children, ...props }, ref) {
57
+ export const TableHead = /*#__PURE__*/ React.forwardRef(function TableHead({ className, align, numeric, sort, onSort, scope = "col", children, ...props }, ref) {
58
58
  const a = align ?? (numeric ? "end" : "start");
59
59
  const sortable = sort !== undefined || onSort !== undefined;
60
60
  const SortIcon = sort === "asc" ? ArrowUp : sort === "desc" ? ArrowDown : ChevronsUpDown;
61
61
  return (_jsx("th", { ref: ref, scope: scope, "data-slot": "table-head", "data-numeric": numeric ? "" : undefined, "aria-sort": sortable ? (sort === "asc" ? "ascending" : sort === "desc" ? "descending" : "none") : undefined, className: cn("h-[calc(var(--row-h)*0.78)] px-(--cell-px) align-middle text-xs font-medium whitespace-nowrap text-fg-muted", alignClass[a], className), ...props, children: sortable ? (_jsxs("button", { type: "button", onClick: onSort, "data-sorted": sort ? "" : undefined, className: cn("-mx-1.5 inline-flex items-center gap-1 rounded-ui-sm px-1.5 py-1 font-medium transition-colors hover:bg-hover hover:text-fg focus-ring data-sorted:text-fg", a === "end" && "flex-row-reverse"), children: [children, _jsx(SortIcon, { "aria-hidden": true, className: cn("size-3.5 shrink-0", sort ? "text-fg" : "text-fg-subtle") })] })) : (children) }));
62
62
  });
63
- export const TableCell = React.forwardRef(function TableCell({ className, align, numeric, truncate, rowHeader, children, ...props }, ref) {
63
+ export const TableCell = /*#__PURE__*/ React.forwardRef(function TableCell({ className, align, numeric, truncate, rowHeader, children, ...props }, ref) {
64
64
  const a = align ?? (numeric ? "end" : "start");
65
65
  const Comp = rowHeader ? "th" : "td";
66
66
  const clamp = typeof truncate === "number" && truncate > 1;
67
67
  return (_jsx(Comp, { ref: ref, ...(rowHeader ? { scope: "row" } : {}), "data-slot": "table-cell", "data-numeric": numeric ? "" : undefined, className: cn("h-(--row-h) px-(--cell-px) py-2 align-middle", alignClass[a], numeric && "font-mono text-[12.5px] whitespace-nowrap tabular", rowHeader && "font-medium", truncate === true || truncate === 1 ? "max-w-0 truncate" : null, className), ...props, children: clamp ? (_jsx("span", { className: "line-clamp-(--lines)", style: { ["--lines"]: truncate }, children: children })) : (children) }));
68
68
  });
69
69
  /** A single full-width row for an empty table body. */
70
- export const TableEmpty = React.forwardRef(function TableEmpty({ colSpan, icon, title, description, className, children, ...props }, ref) {
70
+ export const TableEmpty = /*#__PURE__*/ React.forwardRef(function TableEmpty({ colSpan, icon, title, description, className, children, ...props }, ref) {
71
71
  return (_jsx("tr", { ref: ref, "data-slot": "table-empty", className: className, ...props, children: _jsx("td", { colSpan: colSpan, className: "px-(--cell-px) py-8", children: _jsx(EmptyState, { kind: "no-results", size: "sm", icon: icon, title: title ?? _jsx(DataLabel, { ns: "table", id: "empty" }), description: description, actions: children }) }) }));
72
72
  });
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { Tabs as RadixTabs } from "radix-ui";
2
+ import * as RadixTabs from "radix-ui/tabs";
3
3
  import { type VariantProps } from "class-variance-authority";
4
4
  import { type BadgeProps } from "./badge.js";
5
5
  export declare const tabsListVariants: (props?: ({
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Tabs as RadixTabs } from "radix-ui";
4
+ import * as RadixTabs from "radix-ui/tabs";
5
5
  import { cva } from "class-variance-authority";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { useControllableState } from "../lib/use-controllable-state.js";
@@ -12,7 +12,7 @@ import { Badge } from "./badge.js";
12
12
  /* ------------------------------------------------------------------ */
13
13
  /* Variants (shared by Radix tabs and link tabs) */
14
14
  /* ------------------------------------------------------------------ */
15
- export const tabsListVariants = cva("relative flex min-w-max", {
15
+ export const tabsListVariants = /*#__PURE__*/ cva("relative flex min-w-max", {
16
16
  variants: {
17
17
  variant: {
18
18
  /** Pages and records: hairline rule with an accent underline on the selected tab. */
@@ -26,7 +26,7 @@ export const tabsListVariants = cva("relative flex min-w-max", {
26
26
  },
27
27
  defaultVariants: { variant: "underline" },
28
28
  });
29
- export const tabsTriggerVariants = cva([
29
+ export const tabsTriggerVariants = /*#__PURE__*/ cva([
30
30
  "group/tab relative inline-flex shrink-0 select-none items-center gap-2 whitespace-nowrap font-medium text-fg-muted outline-none",
31
31
  "transition-[color,background-color,box-shadow] duration-150 focus-ring",
32
32
  "hover:text-fg data-selected:text-fg",
@@ -60,8 +60,8 @@ export const tabsTriggerVariants = cva([
60
60
  ],
61
61
  defaultVariants: { variant: "underline", size: "md" },
62
62
  });
63
- const TabsContext = React.createContext({ value: "", orientation: "horizontal" });
64
- const TabsListContext = React.createContext({ variant: "underline", size: "md" });
63
+ const TabsContext = /*#__PURE__*/ React.createContext({ value: "", orientation: "horizontal" });
64
+ const TabsListContext = /*#__PURE__*/ React.createContext({ variant: "underline", size: "md" });
65
65
  /**
66
66
  * Switches between views of the same context (WAI-ARIA Tabs: arrows, Home/End).
67
67
  * Inactive panels unmount by default; pass `forceMount` on a `TabsContent` to keep it.
@@ -79,13 +79,13 @@ const TabsListContext = React.createContext({ variant: "underline", size: "md" }
79
79
  * `activationMode="manual"` for heavy panels (focus moves with arrows, Enter/Space selects).
80
80
  * For route-based tabs use `TabsLinkList` — that is navigation, not the Tabs pattern.
81
81
  */
82
- export const Tabs = React.forwardRef(function Tabs({ value: valueProp, defaultValue, onValueChange, orientation = "horizontal", className, ...props }, ref) {
82
+ export const Tabs = /*#__PURE__*/ React.forwardRef(function Tabs({ value: valueProp, defaultValue, onValueChange, orientation = "horizontal", className, ...props }, ref) {
83
83
  const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? "", onChange: onValueChange, name: "Tabs" });
84
84
  const ctx = React.useMemo(() => ({ value, orientation }), [value, orientation]);
85
85
  return (_jsx(TabsContext.Provider, { value: ctx, children: _jsx(RadixTabs.Root, { ref: ref, "data-slot": "tabs", value: value, onValueChange: setValue, orientation: orientation, className: cn("flex flex-col gap-4 data-[orientation=vertical]:flex-row data-[orientation=vertical]:gap-6", className), ...props }) }));
86
86
  });
87
87
  /** The row (or column) of tab triggers. */
88
- export const TabsList = React.forwardRef(function TabsList({ variant = "underline", size = "md", fill, overflow = "scroll", className, children, ...props }, ref) {
88
+ export const TabsList = /*#__PURE__*/ React.forwardRef(function TabsList({ variant = "underline", size = "md", fill, overflow = "scroll", className, children, ...props }, ref) {
89
89
  const { value, orientation } = React.useContext(TabsContext);
90
90
  const scrollRef = React.useRef(null);
91
91
  const scrolls = overflow === "scroll" && orientation === "horizontal" && !fill;
@@ -109,7 +109,7 @@ export const TabsList = React.forwardRef(function TabsList({ variant = "underlin
109
109
  return (_jsx(TabsListContext.Provider, { value: ctx, children: scrolls ? (_jsx("div", { ref: scrollRef, "data-slot": "tabs-scroller", "data-edge-fade": "x", className: "min-w-0 scrollbar-none overflow-x-auto overscroll-x-contain", children: list })) : (list) }));
110
110
  });
111
111
  /** One tab. `value` must match a `TabsContent`. */
112
- export const TabsTrigger = React.forwardRef(function TabsTrigger({ value, icon, count, badgeTone, className, children, ...props }, ref) {
112
+ export const TabsTrigger = /*#__PURE__*/ React.forwardRef(function TabsTrigger({ value, icon, count, badgeTone, className, children, ...props }, ref) {
113
113
  const { variant, size } = React.useContext(TabsListContext);
114
114
  const selected = React.useContext(TabsContext).value === value;
115
115
  // Tabs used as a filter (no TabsContent) would point aria-controls at a panel that never
@@ -134,7 +134,7 @@ function TabContent({ icon, count, badgeTone, children }) {
134
134
  return (_jsxs(_Fragment, { children: [icon ? (_jsx("span", { "aria-hidden": true, className: "inline-flex text-fg-subtle transition-colors group-hover/tab:text-fg-muted group-data-selected/tab:text-current", children: icon })) : null, _jsx("span", { className: "truncate", children: children }), count !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "sr-only", children: ", " }), _jsx(Badge, { count: count, tone: badgeTone ?? "neutral", className: "-me-0.5" })] })) : null] }));
135
135
  }
136
136
  /** The panel for one tab. Unmounted while inactive unless `forceMount`. */
137
- export const TabsContent = React.forwardRef(function TabsContent({ className, ...props }, ref) {
137
+ export const TabsContent = /*#__PURE__*/ React.forwardRef(function TabsContent({ className, ...props }, ref) {
138
138
  return _jsx(RadixTabs.Content, { ref: ref, "data-slot": "tabs-content", className: cn("min-w-0 flex-1 rounded-ui outline-none focus-ring", className), ...props });
139
139
  });
140
140
  /**
@@ -149,7 +149,7 @@ export const TabsContent = React.forwardRef(function TabsContent({ className, ..
149
149
  * </TabsLinkList>
150
150
  * ```
151
151
  */
152
- export const TabsLinkList = React.forwardRef(function TabsLinkList({ variant = "underline", size = "md", fill, orientation = "horizontal", overflow = "scroll", className, children, ...props }, ref) {
152
+ export const TabsLinkList = /*#__PURE__*/ React.forwardRef(function TabsLinkList({ variant = "underline", size = "md", fill, orientation = "horizontal", overflow = "scroll", className, children, ...props }, ref) {
153
153
  const scrollRef = React.useRef(null);
154
154
  const composed = useComposedRefs(ref, scrollRef);
155
155
  const scrolls = overflow === "scroll" && orientation === "horizontal" && !fill;
@@ -164,7 +164,7 @@ export const TabsLinkList = React.forwardRef(function TabsLinkList({ variant = "
164
164
  return (_jsx(TabsListContext.Provider, { value: ctx, children: _jsx("nav", { ref: composed, "data-slot": "tabs-link-list", "data-edge-fade": scrolls ? "x" : undefined, className: cn(scrolls && "min-w-0 scrollbar-none overflow-x-auto overscroll-x-contain", className), ...props, children: _jsx("div", { "data-orientation": orientation, "data-variant": variant, className: tabsListVariants({ variant, fill }), children: React.Children.map(children, (child) => React.isValidElement(child) ? React.cloneElement(child, { "data-orientation": orientation }) : child) }) }) }));
165
165
  });
166
166
  /** One route tab. Renders the app's `Link`. */
167
- export const TabsLink = React.forwardRef(function TabsLink({ href, active, exact, icon, count, badgeTone, disabled, className, children, ...props }, ref) {
167
+ export const TabsLink = /*#__PURE__*/ React.forwardRef(function TabsLink({ href, active, exact, icon, count, badgeTone, disabled, className, children, ...props }, ref) {
168
168
  const Link = useLink();
169
169
  const { isActive } = useNavigation();
170
170
  const { variant, size } = React.useContext(TabsListContext);
@@ -40,7 +40,7 @@ const PASTE_SPLIT = /[,;\n\r\t]+/;
40
40
  * <TagInput validate={(v) => /^\S+@\S+\.\S+$/.test(v) || "Not an email address"} />
41
41
  * ```
42
42
  */
43
- export const TagInput = React.forwardRef(function TagInput(props, forwardedRef) {
43
+ export const TagInput = /*#__PURE__*/ React.forwardRef(function TagInput(props, forwardedRef) {
44
44
  const { value: valueProp, defaultValue, onValueChange, suggestions, allowCustom = true, delimiters = ["Enter", "Tab", ","], max, maxLength, validate, transform = defaultTransform, dedupe = "fold", tagTone, addOnBlur = false, name: nameProp, placeholder, size = "md", variant = "default", invalid, className, labels, } = props;
45
45
  const t = useLabels("tagInput", tagInputLabels, labels);
46
46
  const { locale } = useLocale();
@@ -55,7 +55,7 @@ function applyDone(items, overrides) {
55
55
  * <TaskList variant="checklist" items={prePublish} onToggle={toggle} />
56
56
  * ```
57
57
  */
58
- export const TaskList = React.forwardRef(function TaskList({ items, onToggle, onAdd, onEdit, onRemove, onReorder, title, hideCompleted: hideProp, defaultHideCompleted = false, onHideCompletedChange, showProgress = true, sortCompleted, variant = "list", today, readOnly, labels, className, ...props }, ref) {
58
+ export const TaskList = /*#__PURE__*/ React.forwardRef(function TaskList({ items, onToggle, onAdd, onEdit, onRemove, onReorder, title, hideCompleted: hideProp, defaultHideCompleted = false, onHideCompletedChange, showProgress = true, sortCompleted, variant = "list", today, readOnly, labels, className, ...props }, ref) {
59
59
  const t = useLabels("taskList", taskListLabels, labels);
60
60
  const f = useFormat();
61
61
  const { timeZone } = useLocale();
@@ -51,7 +51,7 @@ export function isTimeOutOfRange(value, opts) {
51
51
  * <Field label="Start"><TimeInput value={time} onValueChange={setTime} /></Field>
52
52
  * ```
53
53
  */
54
- export const TimeInput = React.forwardRef(function TimeInput(rawProps, ref) {
54
+ export const TimeInput = /*#__PURE__*/ React.forwardRef(function TimeInput(rawProps, ref) {
55
55
  const field = useFieldContext();
56
56
  const { value: valueProp, defaultValue, onValueChange, hourCycle: hourCycleProp, step = 1, seconds = false, min, max, disabledTimes, name, size = "md", variant = "default", invalid, icon, trailing, className, labels, onBlur, ...rest } = rawProps;
57
57
  const props = useFieldControl({ ...rest, name, "aria-invalid": invalid ? true : rest["aria-invalid"] });
@@ -308,7 +308,7 @@ export const TimeInput = React.forwardRef(function TimeInput(rawProps, ref) {
308
308
  * <TimePicker value={time} onValueChange={setTime} slots step={30} min="09:00" max="18:00" />
309
309
  * ```
310
310
  */
311
- export const TimePicker = React.forwardRef(function TimePicker({ slots = false, step = 15, slotRange, open: openProp, onOpenChange, value: valueProp, defaultValue, onValueChange, labels, ...props }, ref) {
311
+ export const TimePicker = /*#__PURE__*/ React.forwardRef(function TimePicker({ slots = false, step = 15, slotRange, open: openProp, onOpenChange, value: valueProp, defaultValue, onValueChange, labels, ...props }, ref) {
312
312
  const t = useLabels("timePicker", timePickerLabels, labels);
313
313
  const { locale } = useLocale();
314
314
  const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? null, onChange: onValueChange, name: "TimePicker" });
@@ -383,7 +383,7 @@ export function timeRangeMinutes(range, overnight = false) {
383
383
  * Start and end time with a duration hint (shift start/end, opening hours). The end must be after
384
384
  * the start unless `overnight` is set.
385
385
  */
386
- export const TimeRangePicker = React.forwardRef(function TimeRangePicker({ value: valueProp, defaultValue, onValueChange, overnight = false, showDuration = true, nameStart, nameEnd, labels, className, size = "md", ...props }, ref) {
386
+ export const TimeRangePicker = /*#__PURE__*/ React.forwardRef(function TimeRangePicker({ value: valueProp, defaultValue, onValueChange, overnight = false, showDuration = true, nameStart, nameEnd, labels, className, size = "md", ...props }, ref) {
387
387
  const t = useLabels("timePicker", timePickerLabels, labels);
388
388
  const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? { start: null, end: null }, onChange: onValueChange, name: "TimeRangePicker" });
389
389
  const minutes = timeRangeMinutes(value, overnight);
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
- import { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
2
+ import * as TogglePrimitive from "radix-ui/toggle";
3
+ import * as ToggleGroupPrimitive from "radix-ui/toggle-group";
3
4
  export declare const toggleVariants: (props?: ({
4
5
  variant?: "outline" | "ghost" | "segmented" | null | undefined;
5
6
  size?: "sm" | "md" | "lg" | "xs" | null | undefined;
@@ -1,10 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
4
+ import * as TogglePrimitive from "radix-ui/toggle";
5
+ import * as ToggleGroupPrimitive from "radix-ui/toggle-group";
5
6
  import { cva } from "class-variance-authority";
6
7
  import { cn } from "../lib/cn.js";
7
- export const toggleVariants = cva([
8
+ export const toggleVariants = /*#__PURE__*/ cva([
8
9
  "relative inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap font-medium outline-none",
9
10
  "transition-[background-color,color,box-shadow,border-color] duration-150 focus-ring [&_svg]:shrink-0",
10
11
  "disabled:pointer-events-none disabled:opacity-45",
@@ -36,7 +37,7 @@ export const toggleVariants = cva([
36
37
  * <Toggle variant="outline" defaultPressed>Show archived</Toggle>
37
38
  * ```
38
39
  */
39
- export const Toggle = React.forwardRef(function Toggle({ variant = "ghost", size = "md", label, className, children, title, ...props }, ref) {
40
+ export const Toggle = /*#__PURE__*/ React.forwardRef(function Toggle({ variant = "ghost", size = "md", label, className, children, title, ...props }, ref) {
40
41
  const iconOnly = Boolean(label) && !hasText(children);
41
42
  return (_jsx(TogglePrimitive.Root, { ref: ref, "data-slot": "toggle", "aria-label": props["aria-label"] ?? (iconOnly ? label : undefined), title: title ?? (iconOnly ? label : undefined), className: cn(toggleVariants({ variant, size, iconOnly }), className), ...props, children: children }));
42
43
  });
@@ -50,7 +51,7 @@ function hasText(node) {
50
51
  });
51
52
  return found;
52
53
  }
53
- const ToggleGroupContext = React.createContext({ variant: "outline", size: "md" });
54
+ const ToggleGroupContext = /*#__PURE__*/ React.createContext({ variant: "outline", size: "md" });
54
55
  const trackClass = (orientation) => cn("gap-0.5 rounded-ui border border-line bg-selected p-[3px]", orientation === "vertical" ? "flex-col" : "");
55
56
  /**
56
57
  * A set of toggles with roving focus (one tab stop, arrow keys move): view switches, alignment,
@@ -64,7 +65,7 @@ const trackClass = (orientation) => cn("gap-0.5 rounded-ui border border-line bg
64
65
  * </ToggleGroup>
65
66
  * ```
66
67
  */
67
- export const ToggleGroup = React.forwardRef(function ToggleGroup(props, ref) {
68
+ export const ToggleGroup = /*#__PURE__*/ React.forwardRef(function ToggleGroup(props, ref) {
68
69
  const { variant = "segmented", size = "md", orientation = "horizontal", block, className, children, ...rest } = props;
69
70
  const ctx = React.useMemo(() => ({ variant, size }), [variant, size]);
70
71
  const layout = cn("relative isolate items-stretch", block ? "flex w-full [&>*]:flex-1" : "inline-flex w-fit max-w-full", orientation === "vertical" && "flex-col", variant === "segmented" && trackClass(orientation),
@@ -93,7 +94,7 @@ function SingleToggleGroup({ value, defaultValue, onValueChange, allowEmpty = fa
93
94
  }, children: children }));
94
95
  }
95
96
  /** One toggle inside a `ToggleGroup`. */
96
- export const ToggleGroupItem = React.forwardRef(function ToggleGroupItem({ label, className, children, title, ...props }, ref) {
97
+ export const ToggleGroupItem = /*#__PURE__*/ React.forwardRef(function ToggleGroupItem({ label, className, children, title, ...props }, ref) {
97
98
  const { variant, size } = React.useContext(ToggleGroupContext);
98
99
  const iconOnly = Boolean(label) && !hasText(children);
99
100
  const segmentSize = variant === "segmented"
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { Tooltip as TooltipPrimitive } from "radix-ui";
2
+ import * as TooltipPrimitive from "radix-ui/tooltip";
3
3
  import { type VariantProps } from "class-variance-authority";
4
4
  /** `true` when a `TooltipProvider` is above this point (IconButton switches from `title` to Tooltip). */
5
5
  export declare function useHasTooltipProvider(): boolean;
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Slot, Tooltip as TooltipPrimitive } from "radix-ui";
4
+ import * as Slot from "radix-ui/slot";
5
+ import * as TooltipPrimitive from "radix-ui/tooltip";
5
6
  import { cva } from "class-variance-authority";
6
7
  import { cn } from "../lib/cn.js";
7
8
  import { usePortalContainer } from "../lib/theme-scope.js";
@@ -10,7 +11,7 @@ import { KbdGroup } from "./kbd.js";
10
11
  /* ------------------------------------------------------------------ */
11
12
  /* Provider */
12
13
  /* ------------------------------------------------------------------ */
13
- const TooltipProviderContext = React.createContext(false);
14
+ const TooltipProviderContext = /*#__PURE__*/ React.createContext(false);
14
15
  /** `true` when a `TooltipProvider` is above this point (IconButton switches from `title` to Tooltip). */
15
16
  export function useHasTooltipProvider() {
16
17
  return React.useContext(TooltipProviderContext);
@@ -32,7 +33,7 @@ export function TooltipRoot(props) {
32
33
  return (_jsx(EnsureProvider, { children: _jsx(TooltipPrimitive.Root, { ...props }) }));
33
34
  }
34
35
  export const TooltipTrigger = TooltipPrimitive.Trigger;
35
- export const tooltipContentVariants = cva([
36
+ export const tooltipContentVariants = /*#__PURE__*/ cva([
36
37
  "ui-pop z-(--z-tooltip) max-w-[min(18rem,calc(100vw-1.5rem))] select-none rounded-ui-sm px-2 py-1 text-[12.5px] leading-snug font-medium",
37
38
  // tooltips never blur — they open and close too often to spend the glass budget on
38
39
  "[--blur:0px] backdrop-filter-none",
@@ -51,7 +52,7 @@ export const tooltipContentVariants = cva([
51
52
  },
52
53
  defaultVariants: { tone: "inverted" },
53
54
  });
54
- export const TooltipContent = React.forwardRef(function TooltipContent({ className, tone, arrow = false, shortcut, sideOffset = 6, collisionPadding = 8, children, ...props }, ref) {
55
+ export const TooltipContent = /*#__PURE__*/ React.forwardRef(function TooltipContent({ className, tone, arrow = false, shortcut, sideOffset = 6, collisionPadding = 8, children, ...props }, ref) {
55
56
  const container = usePortalContainer();
56
57
  const inverted = (tone ?? "inverted") === "inverted";
57
58
  return (_jsx(TooltipPrimitive.Portal, { container: container, children: _jsxs(TooltipPrimitive.Content, { ref: ref, "data-slot": "tooltip-content", "data-tone": tone ?? "inverted", sideOffset: sideOffset, collisionPadding: collisionPadding, className: cn(tooltipContentVariants({ tone }), className), ...props, children: [_jsx("span", { className: "min-w-0", children: children }), shortcut ? (_jsx(KbdGroup, { keys: shortcut, size: "sm", variant: "ghost", className: cn("-me-0.5", inverted && "[&_kbd_kbd]:border-[color-mix(in_srgb,var(--scene)_28%,transparent)] [&_kbd_kbd]:text-[color-mix(in_srgb,var(--scene)_78%,transparent)]") })) : null, arrow ? (_jsx(TooltipPrimitive.Arrow, { asChild: true, width: 10, height: 5, children: _jsx(FloatingArrow, { width: 10, height: 5, fill: inverted ? "var(--fg)" : "var(--popover-nested)", stroke: inverted ? "none" : "var(--popover-border)" }) })) : null] }) }));
@@ -19,7 +19,7 @@ const topBarLabels = {
19
19
  * Bridge between the top bar and the App shell (mobile nav button). App shell provides it; outside
20
20
  * a shell the menu button needs its own `onClick`.
21
21
  */
22
- export const TopBarShellContext = React.createContext(null);
22
+ export const TopBarShellContext = /*#__PURE__*/ React.createContext(null);
23
23
  /**
24
24
  * The sticky bar above the content: mobile menu button, ⌘K search, contextual actions,
25
25
  * notifications and the user menu. The same in every app.
@@ -33,7 +33,7 @@ export const TopBarShellContext = React.createContext(null);
33
33
  * </TopBar>
34
34
  * ```
35
35
  */
36
- export const TopBar = React.forwardRef(function TopBar({ sticky = true, variant = "bar", scrollTarget, className, role, ...props }, ref) {
36
+ export const TopBar = /*#__PURE__*/ React.forwardRef(function TopBar({ sticky = true, variant = "bar", scrollTarget, className, role, ...props }, ref) {
37
37
  const [scrolled, setScrolled] = React.useState(false);
38
38
  React.useEffect(() => {
39
39
  if (typeof window === "undefined")
@@ -64,7 +64,7 @@ export function TopBarSeparator({ className }) {
64
64
  return _jsx("span", { "aria-hidden": true, "data-slot": "top-bar-separator", className: cn("mx-1 h-5 w-px shrink-0 bg-line", className) });
65
65
  }
66
66
  /** Opens the App shell's mobile navigation. Visible only below 768px. */
67
- export const TopBarMenuButton = React.forwardRef(function TopBarMenuButton({ className, onClick, labels, ...props }, ref) {
67
+ export const TopBarMenuButton = /*#__PURE__*/ React.forwardRef(function TopBarMenuButton({ className, onClick, labels, ...props }, ref) {
68
68
  const shell = React.useContext(TopBarShellContext);
69
69
  const t = useLabels("topBar", topBarLabels, labels);
70
70
  return (_jsx(IconButton, { ref: ref, label: t("menu"), size: "sm", tooltip: false, "aria-expanded": shell ? shell.mobileNavOpen : undefined, "aria-haspopup": "dialog", onClick: (e) => {
@@ -77,7 +77,7 @@ export const TopBarMenuButton = React.forwardRef(function TopBarMenuButton({ cla
77
77
  * The ⌘K trigger: a real button that looks like a field. Collapses to an icon button when the bar is
78
78
  * narrower than 560px.
79
79
  */
80
- export const TopBarSearch = React.forwardRef(function TopBarSearch({ placeholder, shortcut = "mod+k", onOpen, onClick, className, labels, ...props }, ref) {
80
+ export const TopBarSearch = /*#__PURE__*/ React.forwardRef(function TopBarSearch({ placeholder, shortcut = "mod+k", onOpen, onClick, className, labels, ...props }, ref) {
81
81
  const t = useLabels("topBar", topBarLabels, labels);
82
82
  const palette = useCommandPalette();
83
83
  const open = (e) => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Popover as PopoverPrimitive } from "radix-ui";
4
+ import * as PopoverPrimitive from "radix-ui/popover";
5
5
  import { X } from "lucide-react";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { useLabels } from "../lib/labels.js";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Popover as PopoverPrimitive } from "radix-ui";
4
+ import * as PopoverPrimitive from "radix-ui/popover";
5
5
  import { ChevronsUpDown, Plus, Search, X } from "lucide-react";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { FieldContextReset, useFieldControl } from "../lib/field-context.js";
@@ -60,7 +60,7 @@ function PathSeparator() {
60
60
  * <TreeSelect multiple nodes={regions} valueMode="parent" value={territories} onValueChange={setTerritories} />
61
61
  * ```
62
62
  */
63
- export const TreeSelect = React.forwardRef(function TreeSelect(props, ref) {
63
+ export const TreeSelect = /*#__PURE__*/ React.forwardRef(function TreeSelect(props, ref) {
64
64
  const { nodes, loadChildren, selectable = "any", showPath = true, defaultExpanded = "selected", onCreate, searchable = true, mode = "popover", height = 288, size = "md", placeholder, searchPlaceholder, labels, className, } = props;
65
65
  const multiple = props.multiple === true;
66
66
  const t = useLabels("treeSelect", treeSelectLabels, labels);
@@ -19,7 +19,7 @@ const treeViewLabels = {
19
19
  noMatches: "No matches for “{query}”",
20
20
  results: "{count, plural, =0 {No matches} one {# match} other {# matches}}",
21
21
  };
22
- export const treeRowVariants = cva([
22
+ export const treeRowVariants = /*#__PURE__*/ cva([
23
23
  "group/tree-row relative flex w-full min-w-0 cursor-default select-none items-center gap-1.5 rounded-ui-sm pe-1.5 text-start outline-none",
24
24
  "transition-colors duration-100",
25
25
  "hover:bg-hover focus-visible:bg-hover focus-visible:shadow-[inset_0_0_0_2px_var(--ring)]",
@@ -57,7 +57,7 @@ export function TreeLabelText({ text, query, locale }) {
57
57
  * icon, label, badge and hover actions. Used by Tree view and Tree select; render it inside an
58
58
  * element carrying `tree.getTreeProps()`.
59
59
  */
60
- export const TreeViewRow = React.forwardRef(function TreeViewRow({ item, tree, indent = 16, guides = true, size = "md", variant = "default", checkbox, query, label, actions, labels, onRowClick, className, style, onClick, onDoubleClick, ...props }, ref) {
60
+ export const TreeViewRow = /*#__PURE__*/ React.forwardRef(function TreeViewRow({ item, tree, indent = 16, guides = true, size = "md", variant = "default", checkbox, query, label, actions, labels, onRowClick, className, style, onClick, onDoubleClick, ...props }, ref) {
61
61
  const t = useLabels("treeView", treeViewLabels, labels);
62
62
  const { locale } = useLocale();
63
63
  const { node } = item;
@@ -95,7 +95,7 @@ export const TreeViewRow = React.forwardRef(function TreeViewRow({ item, tree, i
95
95
  * <TreeView aria-label="Categories" data={categories} selectionMode="checkbox" checkValueMode="leaf" />
96
96
  * ```
97
97
  */
98
- export const TreeView = React.forwardRef(function TreeView({ data, expanded, defaultExpanded, onExpandedChange, selectionMode = "single", selected, defaultSelected, onSelectedChange, cascade, checkValueMode, isSelectable, loadChildren, filter, onAction, renderActions, renderLabel, virtual = false, height, indent = 16, guides = true, variant = "default", size = "md", emptyState, labels, className, style, ...props }, ref) {
98
+ export const TreeView = /*#__PURE__*/ React.forwardRef(function TreeView({ data, expanded, defaultExpanded, onExpandedChange, selectionMode = "single", selected, defaultSelected, onSelectedChange, cascade, checkValueMode, isSelectable, loadChildren, filter, onAction, renderActions, renderLabel, virtual = false, height, indent = 16, guides = true, variant = "default", size = "md", emptyState, labels, className, style, ...props }, ref) {
99
99
  const t = useLabels("treeView", treeViewLabels, labels);
100
100
  const { locale, dir } = useLocale();
101
101
  const checkbox = selectionMode === "checkbox";