@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,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { Slot } from "radix-ui";
3
+ import * as Slot from "radix-ui/slot";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../lib/cn.js";
6
6
  /*
7
7
  * Typography — server-compatible. Headings read the data-font axis: --font-heading,
8
8
  * --display-weight / --display-tracking / --display-em, and scale with --display-scale.
9
9
  */
10
- export const headingVariants = cva("text-balance text-fg [overflow-wrap:break-word]", {
10
+ export const headingVariants = /*#__PURE__*/ cva("text-balance text-fg [overflow-wrap:break-word]", {
11
11
  variants: {
12
12
  size: {
13
13
  /** 56px × display-scale (fluid down to 38px on phones). Hero / page title on websites. */
@@ -35,14 +35,14 @@ const defaultSize = { 1: "xl", 2: "lg", 3: "md", 4: "sm", 5: "sm", 6: "sm" };
35
35
  * <Heading level={2} size="md">Billing details</Heading>
36
36
  * ```
37
37
  */
38
- export const Heading = React.forwardRef(function Heading({ level = 2, size, asChild, className, ...props }, ref) {
38
+ export const Heading = /*#__PURE__*/ React.forwardRef(function Heading({ level = 2, size, asChild, className, ...props }, ref) {
39
39
  const Comp = (asChild ? Slot.Root : `h${level}`);
40
40
  return _jsx(Comp, { ref: ref, "data-slot": "heading", "data-size": size ?? defaultSize[level], className: cn(headingVariants({ size: size ?? defaultSize[level] }), className), ...props });
41
41
  });
42
42
  /* ------------------------------------------------------------------ */
43
43
  /* Text */
44
44
  /* ------------------------------------------------------------------ */
45
- export const textVariants = cva("", {
45
+ export const textVariants = /*#__PURE__*/ cva("", {
46
46
  variants: {
47
47
  size: {
48
48
  xs: "text-xs leading-[1.45]",
@@ -78,22 +78,22 @@ export const textVariants = cva("", {
78
78
  * <Text truncate={2}>{post.excerpt}</Text>
79
79
  * ```
80
80
  */
81
- export const Text = React.forwardRef(function Text({ as = "p", size, tone, weight, truncate, tabular, asChild, className, style, title, children, ...props }, ref) {
81
+ export const Text = /*#__PURE__*/ React.forwardRef(function Text({ as = "p", size, tone, weight, truncate, tabular, asChild, className, style, title, children, ...props }, ref) {
82
82
  const Comp = (asChild ? Slot.Root : as);
83
83
  const lines = typeof truncate === "number" && truncate > 1 ? truncate : undefined;
84
84
  const autoTitle = truncate && title === undefined && (typeof children === "string" || typeof children === "number") ? String(children) : title;
85
85
  return (_jsx(Comp, { ref: ref, "data-slot": "text", title: autoTitle, className: cn(textVariants({ size, tone, weight }), as === "p" && !truncate && "text-pretty", (truncate === true || truncate === 1) && "truncate", lines && "overflow-hidden [display:-webkit-box] [-webkit-box-orient:vertical]", tabular && "tabular", className), style: lines ? { ...style, WebkitLineClamp: lines } : style, ...props, children: children }));
86
86
  });
87
87
  /** The opening paragraph under a page or article title. */
88
- export const Lead = React.forwardRef(function Lead({ className, ...props }, ref) {
88
+ export const Lead = /*#__PURE__*/ React.forwardRef(function Lead({ className, ...props }, ref) {
89
89
  return _jsx("p", { ref: ref, "data-slot": "lead", className: cn("text-pretty text-[length:var(--text-lead)] leading-[1.5] text-fg-muted", className), ...props });
90
90
  });
91
91
  /** Inline code: `slug`, `npm run build`, a field key. */
92
- export const Code = React.forwardRef(function Code({ className, ...props }, ref) {
92
+ export const Code = /*#__PURE__*/ React.forwardRef(function Code({ className, ...props }, ref) {
93
93
  return (_jsx("code", { ref: ref, "data-slot": "code", className: cn("rounded-[5px] border border-line bg-selected px-[0.36em] py-[0.08em] font-mono text-[0.86em] text-fg [overflow-wrap:anywhere]", className), ...props }));
94
94
  });
95
95
  /** A pulled quote or testimonial, set in the heading face. */
96
- export const Blockquote = React.forwardRef(function Blockquote({ attribution, className, children, ...props }, ref) {
96
+ export const Blockquote = /*#__PURE__*/ React.forwardRef(function Blockquote({ attribution, className, children, ...props }, ref) {
97
97
  return (_jsxs("figure", { "data-slot": "blockquote", className: cn("grid gap-2.5 border-s-2 border-accent-ink ps-5", className), children: [_jsx("blockquote", { ref: ref, className: "font-display text-[length:calc(22px*var(--display-scale))] leading-[1.4] text-fg [&_em]:[font-style:var(--display-em)]", ...props, children: children }), attribution ? _jsx("figcaption", { className: "text-[13px] text-fg-subtle", children: attribution }) : null] }));
98
98
  });
99
99
  /**
@@ -105,7 +105,7 @@ export const Blockquote = React.forwardRef(function Blockquote({ attribution, cl
105
105
  * <Numeric signOf={-4.2}>−4.2%</Numeric>
106
106
  * ```
107
107
  */
108
- export const Numeric = React.forwardRef(function Numeric({ mono, signOf, className, ...props }, ref) {
108
+ export const Numeric = /*#__PURE__*/ React.forwardRef(function Numeric({ mono, signOf, className, ...props }, ref) {
109
109
  return (_jsx("span", { ref: ref, "data-slot": "numeric", className: cn("tabular whitespace-nowrap", mono && "font-mono text-[0.94em]", signOf !== undefined && (signOf < 0 ? "text-danger" : signOf > 0 ? "text-success" : "text-fg-muted"), className), ...props }));
110
110
  });
111
111
  /**
@@ -118,11 +118,11 @@ export const Numeric = React.forwardRef(function Numeric({ mono, signOf, classNa
118
118
  * <Prose size="lg" lang="en"><h2>Opening hours</h2><p>…</p></Prose>
119
119
  * ```
120
120
  */
121
- export const Prose = React.forwardRef(function Prose({ size = "md", html, fullWidth, asChild, className, children, ...props }, ref) {
121
+ export const Prose = /*#__PURE__*/ React.forwardRef(function Prose({ size = "md", html, fullWidth, asChild, className, children, ...props }, ref) {
122
122
  const Comp = asChild ? Slot.Root : "div";
123
123
  return (_jsx(Comp, { ref: ref, "data-slot": "prose", className: cn("prose-ui", size === "sm" && "prose-ui-sm", size === "lg" && "prose-ui-lg", fullWidth && "max-w-none", className), ...(html !== undefined ? { dangerouslySetInnerHTML: { __html: html } } : { children }), ...props }));
124
124
  });
125
125
  /** Wraps a wide table inside Prose in a keyboard-scrollable region. */
126
- export const ProseTable = React.forwardRef(function ProseTable({ label, className, ...props }, ref) {
126
+ export const ProseTable = /*#__PURE__*/ React.forwardRef(function ProseTable({ label, className, ...props }, ref) {
127
127
  return _jsx("div", { ref: ref, role: "region", "aria-label": label, tabIndex: 0, "data-slot": "prose-table", className: cn(className), ...props });
128
128
  });
@@ -67,7 +67,7 @@ function Bold({ text, query, locale }) {
67
67
  * <UserPicker multiple trigger="avatars" source={people} value={assignees} onValueChange={setAssignees} aria-label="Assignees" />
68
68
  * ```
69
69
  */
70
- export const UserPicker = React.forwardRef(function UserPicker(props, ref) {
70
+ export const UserPicker = /*#__PURE__*/ React.forwardRef(function UserPicker(props, ref) {
71
71
  const { source, teams, getTeamMembers, currentUserId, trigger = "field", maxAvatars = 3, roleLabel, labels, selectedRecords, ...rest } = props;
72
72
  const t = useLabels("userPicker", userPickerLabels, labels);
73
73
  const { locale } = useLocale();
@@ -156,7 +156,7 @@ export const UserPicker = React.forwardRef(function UserPicker(props, ref) {
156
156
  return _jsx(RecordPicker, { ref: ref, ...shared, source: combined, multiple: false, renderTrigger: renderTrigger });
157
157
  });
158
158
  /** Avatar stack + "+" — the compact trigger for table cells and record headers. */
159
- const AvatarsTrigger = React.forwardRef(function AvatarsTrigger({ selected, max, size = "md", className, "aria-label": label, ...props }, ref) {
159
+ const AvatarsTrigger = /*#__PURE__*/ React.forwardRef(function AvatarsTrigger({ selected, max, size = "md", className, "aria-label": label, ...props }, ref) {
160
160
  const avatarSize = size === "sm" ? "xs" : size === "lg" ? "md" : "sm";
161
161
  return (_jsxs("button", { ref: ref, type: "button", "data-slot": "user-picker-avatars", className: cn("group/avatars inline-flex items-center gap-1 rounded-full p-0.5 pe-1 outline-none transition-colors hover:bg-hover focus-ring disabled:pointer-events-none disabled:opacity-50", className), ...props, children: [label ? _jsx("span", { className: "sr-only", children: label }) : null, selected.length ? (_jsx(AvatarGroup, { max: max, size: avatarSize, "aria-hidden": true, children: selected.map((u) => (_jsx(Avatar, { name: u.name, src: u.avatarUrl }, u.id))) })) : null, _jsx("span", { "aria-hidden": true, className: cn("inline-flex items-center justify-center rounded-full border border-dashed border-field-border-hover text-fg-subtle transition-colors group-hover/avatars:border-fg-subtle group-hover/avatars:text-fg", avatarSize === "xs" ? "size-5 [&_svg]:size-3" : avatarSize === "sm" ? "size-6 [&_svg]:size-3.5" : "size-8 [&_svg]:size-4"), children: _jsx(Plus, {}) })] }));
162
162
  });
@@ -164,7 +164,7 @@ function Segments({ line }) {
164
164
  * <DiffView before={v11.body} after={v12.body} mode="split" beforeLabel="v11" afterLabel="v12" />
165
165
  * ```
166
166
  */
167
- export const DiffView = React.forwardRef(function DiffView({ before, after, granularity = "word", mode = "unified", context = 3, beforeLabel, afterLabel, lineNumbers = true, toolbar = true, actions, wrap = true, labels, className, ...props }, ref) {
167
+ export const DiffView = /*#__PURE__*/ React.forwardRef(function DiffView({ before, after, granularity = "word", mode = "unified", context = 3, beforeLabel, afterLabel, lineNumbers = true, toolbar = true, actions, wrap = true, labels, className, ...props }, ref) {
168
168
  const t = useLabels("versionHistory", versionHistoryLabels, labels);
169
169
  const f = useFormat();
170
170
  const lines = React.useMemo(() => diffText(before, after, granularity), [before, after, granularity]);
@@ -275,7 +275,7 @@ function humanize(key) {
275
275
  * ]} />
276
276
  * ```
277
277
  */
278
- export const FieldDiff = React.forwardRef(function FieldDiff({ before, after, fields, onlyChanges = true, beforeLabel, afterLabel, labels, className, ...props }, ref) {
278
+ export const FieldDiff = /*#__PURE__*/ React.forwardRef(function FieldDiff({ before, after, fields, onlyChanges = true, beforeLabel, afterLabel, labels, className, ...props }, ref) {
279
279
  const t = useLabels("versionHistory", versionHistoryLabels, labels);
280
280
  const f = useFormat();
281
281
  const defs = fields ?? diffRecords(before, after).map((d) => ({ key: d.key, label: humanize(d.key) }));
@@ -314,7 +314,7 @@ export const FieldDiff = React.forwardRef(function FieldDiff({ before, after, fi
314
314
  * />
315
315
  * ```
316
316
  */
317
- export const VersionHistory = React.forwardRef(function VersionHistory({ versions, compare, defaultCompare, onCompareChange, loadVersion, fields, onRestore, layout = "page", defaultMode, granularity = "word", context = 3, labels, className, ...props }, ref) {
317
+ export const VersionHistory = /*#__PURE__*/ React.forwardRef(function VersionHistory({ versions, compare, defaultCompare, onCompareChange, loadVersion, fields, onRestore, layout = "page", defaultMode, granularity = "word", context = 3, labels, className, ...props }, ref) {
318
318
  const t = useLabels("versionHistory", versionHistoryLabels, labels);
319
319
  const f = useFormat();
320
320
  const sorted = React.useMemo(() => [...versions].sort((a, b) => b.createdAt.localeCompare(a.createdAt)), [versions]);
@@ -162,7 +162,7 @@ const features = tableFeatures({
162
162
  sortedRowModel: createSortedRowModel(),
163
163
  paginatedRowModel: createPaginatedRowModel(),
164
164
  });
165
- const DataTableContext = React.createContext(null);
165
+ const DataTableContext = /*#__PURE__*/ React.createContext(null);
166
166
  /**
167
167
  * The table's state and helpers, for custom layouts and bindings inside `<DataTable>`.
168
168
  *
@@ -394,7 +394,7 @@ const chipSize = {
394
394
  * One applied filter: `Stage │ is any of │ Proposal, Won │ ×`. Every segment is its own button
395
395
  * with a full accessible name; × removes it (Delete / Backspace too).
396
396
  */
397
- export const FilterChip = React.forwardRef(function FilterChip({ clause, field, onEdit, onRemove, readOnly, disabled, size = "md", labels, optionCache }, ref) {
397
+ export const FilterChip = /*#__PURE__*/ React.forwardRef(function FilterChip({ clause, field, onEdit, onRemove, readOnly, disabled, size = "md", labels, optionCache }, ref) {
398
398
  const t = useLabels("filterBar", filterBarLabels, labels);
399
399
  const format = useFormat();
400
400
  const dl = React.useMemo(() => describeLabelsFrom(t), [t]);
@@ -421,7 +421,7 @@ export const FilterChip = React.forwardRef(function FilterChip({ clause, field,
421
421
  * <FilterBar fields={fields} value={filters} onChange={setFilters} resultCount={rows.length} />
422
422
  * ```
423
423
  */
424
- export const FilterBar = React.forwardRef(function FilterBar({ fields, value: valueProp, defaultValue, onChange, q, onQChange, searchPlaceholder, facets, resultCount, maxVisibleChips, layout = "auto", size = "md", disabled, readOnly, me, addRequest, actions, labels, className, ...props }, ref) {
424
+ export const FilterBar = /*#__PURE__*/ React.forwardRef(function FilterBar({ fields, value: valueProp, defaultValue, onChange, q, onQChange, searchPlaceholder, facets, resultCount, maxVisibleChips, layout = "auto", size = "md", disabled, readOnly, me, addRequest, actions, labels, className, ...props }, ref) {
425
425
  const t = useLabels("filterBar", filterBarLabels, labels);
426
426
  const format = useFormat();
427
427
  const dl = React.useMemo(() => describeLabelsFrom(t), [t]);
@@ -1,8 +1,15 @@
1
- export * from "./types.js";
2
- export * from "./filter-fns.js";
3
- export * from "./url-state.js";
4
- export * from "./view-state.js";
5
- export * from "./csv.js";
6
- export * from "./filter-bar.js";
7
- export * from "./saved-views.js";
8
- export * from "./data-table.js";
1
+ export { ME, clauseId, createListState, defaultOps, emptyColumnsState, emptyFilterGroup, emptySelection, fieldOps, flattenClauses, isClauseComplete, isCursorPage, isFilterGroup, isRowSelected, opTakesNoValue, selectionCount } from "./types.js";
2
+ export type { ColumnsState, CursorPage, DataTableSelection, FieldType, FilterClause, FilterFieldDef, FilterGroup, FilterOp, FilterOption, ListDensity, ListState, ListStateChangeReason, OffsetPage, PageState, RelativeDate, RelativeDatePreset, SavedView, SortClause, ViewState } from "./types.js";
3
+ export { addDays, applyFilters, dayKey, describeFilters, describeValue, filterOpLabels, hasActiveFilters, matchClause, readField, relativeDateLabels, resolveRelativeDate, searchRows, weekStartFor } from "./filter-fns.js";
4
+ export type { DescribeLabels, FilterContext } from "./filter-fns.js";
5
+ export { createHistoryAdapter, createMemoryAdapter, decodeFilters, encodeFilters, listStateToParams, mergeListStateIntoSearch, parseListState, resolveUrlKeys, serializeListState } from "./url-state.js";
6
+ export type { ParseOptions, SerializeOptions, UrlStateAdapter, UrlStateKeys, UrlStateOptions } from "./url-state.js";
7
+ export { applyViewState, resolveInitialView, toViewState, viewStateEqual } from "./view-state.js";
8
+ export { csvDelimiter, downloadCsv, escapeCsvCell, toCsv } from "./csv.js";
9
+ export type { CsvCell, CsvOptions } from "./csv.js";
10
+ export { FilterBar, FilterChip, filterBarLabels } from "./filter-bar.js";
11
+ export type { FilterBarLabels, FilterBarProps, FilterChipProps } from "./filter-bar.js";
12
+ export { SavedViews, savedViewsLabels } from "./saved-views.js";
13
+ export type { SavedViewsLabels, SavedViewsProps, SavedViewsSaveInput } from "./saved-views.js";
14
+ export { DataTable, DataTableBulkBar, DataTableCards, DataTableContent, DataTableExport, DataTableFilterBar, DataTableFooter, DataTableSavedViews, DataTableSearch, DataTableToolbar, DataTableValue, DataTableViewOptions, dataTableLabels, filterFieldsFromColumns, readColumnValue, useDataTable } from "./data-table.js";
15
+ export type { DataTableBulkAction, DataTableCellContext, DataTableCellEditor, DataTableColumn, DataTableContextValue, DataTableExportOptions, DataTableLabels, DataTableProps, DataTableSavedViewsProps, DataTableSearchProps } from "./data-table.js";
@@ -1,9 +1,10 @@
1
1
  // Public API of @vamos-ui/react/data-table — Data Table, Filter bar, Saved views and the shared list-state contract.
2
- export * from "./types.js";
3
- export * from "./filter-fns.js";
4
- export * from "./url-state.js";
5
- export * from "./view-state.js";
6
- export * from "./csv.js";
7
- export * from "./filter-bar.js";
8
- export * from "./saved-views.js";
9
- export * from "./data-table.js";
2
+ // Named re-exports on purpose (not `export *`): see scripts/named-exports.mjs.
3
+ export { ME, clauseId, createListState, defaultOps, emptyColumnsState, emptyFilterGroup, emptySelection, fieldOps, flattenClauses, isClauseComplete, isCursorPage, isFilterGroup, isRowSelected, opTakesNoValue, selectionCount } from "./types.js";
4
+ export { addDays, applyFilters, dayKey, describeFilters, describeValue, filterOpLabels, hasActiveFilters, matchClause, readField, relativeDateLabels, resolveRelativeDate, searchRows, weekStartFor } from "./filter-fns.js";
5
+ export { createHistoryAdapter, createMemoryAdapter, decodeFilters, encodeFilters, listStateToParams, mergeListStateIntoSearch, parseListState, resolveUrlKeys, serializeListState } from "./url-state.js";
6
+ export { applyViewState, resolveInitialView, toViewState, viewStateEqual } from "./view-state.js";
7
+ export { csvDelimiter, downloadCsv, escapeCsvCell, toCsv } from "./csv.js";
8
+ export { FilterBar, FilterChip, filterBarLabels } from "./filter-bar.js";
9
+ export { SavedViews, savedViewsLabels } from "./saved-views.js";
10
+ export { DataTable, DataTableBulkBar, DataTableCards, DataTableContent, DataTableExport, DataTableFilterBar, DataTableFooter, DataTableSavedViews, DataTableSearch, DataTableToolbar, DataTableValue, DataTableViewOptions, dataTableLabels, filterFieldsFromColumns, readColumnValue, useDataTable } from "./data-table.js";
@@ -76,7 +76,7 @@ function defaultShareUrl(id) {
76
76
  * <SavedViews views={views} {...table.savedViewsBinding(views)} onSave={create} onUpdate={update} />
77
77
  * ```
78
78
  */
79
- export const SavedViews = React.forwardRef(function SavedViews({ views, activeId, current, isDirty: dirtyProp, onSelect, onSave, onUpdate, onRename, onDelete, onSetDefault, onReset, getShareUrl = defaultShareUrl, permissions, variant = "auto", showAll = true, maxVisible = 4, sortByName, panelId, size = "md", labels, className, ...props }, ref) {
79
+ export const SavedViews = /*#__PURE__*/ React.forwardRef(function SavedViews({ views, activeId, current, isDirty: dirtyProp, onSelect, onSave, onUpdate, onRename, onDelete, onSetDefault, onReset, getShareUrl = defaultShareUrl, permissions, variant = "auto", showAll = true, maxVisible = 4, sortByName, panelId, size = "md", labels, className, ...props }, ref) {
80
80
  const t = useLabels("savedViews", savedViewsLabels, labels);
81
81
  const { locale } = useLocale();
82
82
  const { ref: measureRef, width } = useContainerWidth();
@@ -238,7 +238,7 @@ export function BlockEditor(props) {
238
238
  * The editable canvas. Wears the site theme (`canvasTheme`) and is always `solid`, even inside a
239
239
  * glass admin, for long-text readability and scroll performance.
240
240
  */
241
- export const BlockEditorContent = React.forwardRef(function BlockEditorContent({ className, ...props }, ref) {
241
+ export const BlockEditorContent = /*#__PURE__*/ React.forwardRef(function BlockEditorContent({ className, ...props }, ref) {
242
242
  const { editor, variant, lang, editorLabel, a11y, readOnly, size, canvasTheme = {} } = useBlockEditor();
243
243
  // ARIA on the contenteditable element (Tiptap owns the node).
244
244
  React.useEffect(() => {
@@ -17,7 +17,7 @@ export function createSlashStore() {
17
17
  close: { current: null },
18
18
  };
19
19
  }
20
- export const BlockEditorContext = React.createContext(null);
20
+ export const BlockEditorContext = /*#__PURE__*/ React.createContext(null);
21
21
  /** The surrounding `BlockEditor` (editor instance, registry, labels…). */
22
22
  export function useBlockEditor() {
23
23
  const ctx = React.useContext(BlockEditorContext);
@@ -43,7 +43,7 @@ function useToolbarKeys(editor) {
43
43
  items[next].focus();
44
44
  }, [editor]);
45
45
  }
46
- const ToolbarButton = React.forwardRef(function ToolbarButton({ label, shortcut, active, first, className, children, ...props }, ref) {
46
+ const ToolbarButton = /*#__PURE__*/ React.forwardRef(function ToolbarButton({ label, shortcut, active, first, className, children, ...props }, ref) {
47
47
  return (_jsx(IconButtonTooltip, { label: label, shortcut: shortcut, side: "top", children: _jsx("button", { ref: ref, type: "button", "data-toolbar-item": "", "aria-label": label, "aria-pressed": active === undefined ? undefined : active, tabIndex: first ? 0 : -1,
48
48
  // Keep the text selection: never steal focus on pointer down.
49
49
  onMouseDown: (e) => e.preventDefault(), className: cn("vui-tb-btn focus-ring", className), ...props, children: children }) }));
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Check, ChevronsUpDown, Search } from "lucide-react";
5
- import { Popover as PopoverPrimitive } from "radix-ui";
5
+ import * as PopoverPrimitive from "radix-ui/popover";
6
6
  import { cn } from "../lib/cn.js";
7
7
  import { controlVariants } from "../lib/variants.js";
8
8
  import { useControllableState } from "../lib/use-controllable-state.js";
@@ -73,7 +73,7 @@ function useSeen(root) {
73
73
  * focus stays in the search field; ↑/↓, PageUp/PageDown, Home/End (with Ctrl) move, Enter selects.
74
74
  * Use it inline (settings pages) or through `FontPicker` (popover).
75
75
  */
76
- export const FontPickerList = React.forwardRef(function FontPickerList({ value: valueProp, defaultValue, onValueChange, fonts = googleFonts, categories, previewText = FONT_PREVIEW_TEXT, loadPreviews = true, specimen = true, autoFocus, listHeight = "18rem", labels, className, ...props }, ref) {
76
+ export const FontPickerList = /*#__PURE__*/ React.forwardRef(function FontPickerList({ value: valueProp, defaultValue, onValueChange, fonts = googleFonts, categories, previewText = FONT_PREVIEW_TEXT, loadPreviews = true, specimen = true, autoFocus, listHeight = "18rem", labels, className, ...props }, ref) {
77
77
  const t = useLabels("fontPicker", fontPickerLabels, labels);
78
78
  const { locale } = useLocale();
79
79
  const uid = React.useId();
@@ -201,7 +201,7 @@ export const FontPickerList = React.forwardRef(function FontPickerList({ value:
201
201
  * A select-like trigger that opens the searchable font list in a popover. Closes on selection.
202
202
  * Inside a `Field` it picks up the id, description and invalid state.
203
203
  */
204
- export const FontPicker = React.forwardRef(function FontPicker(rawProps, ref) {
204
+ export const FontPicker = /*#__PURE__*/ React.forwardRef(function FontPicker(rawProps, ref) {
205
205
  const props = useFieldControl(rawProps);
206
206
  const { open: openProp, defaultOpen, onOpenChange, size = "md", placeholder, disabled, showCategory = true, align = "start", id, name, required, className, contentClassName, value: valueProp, defaultValue, onValueChange, labels, loadPreviews = true, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, ...listProps } = props;
207
207
  delete listProps.readOnly;
@@ -17,7 +17,7 @@ export const fontPairingPickerLabels = {
17
17
  * Pick one of the curated pairings. A WAI-ARIA radio group with a roving tab stop:
18
18
  * arrow keys move and select, Home/End jump to the ends.
19
19
  */
20
- export const FontPairingPicker = React.forwardRef(function FontPairingPicker({ value: valueProp, defaultValue, onValueChange, pairings = fontPairings, layout = "grid", showDescription, loadPreviews = true, disabled, labels, className, onKeyDown, ...props }, ref) {
20
+ export const FontPairingPicker = /*#__PURE__*/ React.forwardRef(function FontPairingPicker({ value: valueProp, defaultValue, onValueChange, pairings = fontPairings, layout = "grid", showDescription, loadPreviews = true, disabled, labels, className, onKeyDown, ...props }, ref) {
21
21
  const t = useLabels("fontPairingPicker", fontPairingPickerLabels, labels);
22
22
  const [value, setValue] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? null, name: "FontPairingPicker" });
23
23
  const refs = React.useRef([]);
@@ -5,7 +5,7 @@ import { cn } from "../lib/cn.js";
5
5
  import { useControllableState, useIsomorphicLayoutEffect } from "../lib/use-controllable-state.js";
6
6
  import { applyFontPairing, clearFontPairing, fontPairings, getFontPairing, pairingFamilies, pairingVars } from "./pairings.js";
7
7
  import { loadGoogleFonts } from "./loader.js";
8
- const FontPairingContext = React.createContext(null);
8
+ const FontPairingContext = /*#__PURE__*/ React.createContext(null);
9
9
  /** The active pairing and a setter. Outside a `FontProvider` it returns the Editorial preset and a no-op setter. */
10
10
  export function useFontPairing() {
11
11
  return React.useContext(FontPairingContext) ?? { pairing: fontPairings[0], setPairing: () => { }, pairings: fontPairings };