@eodparks/ui 0.0.0-stage → 0.2.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 (176) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accordion.d.ts +36 -0
  3. package/dist/accordion.js +57 -0
  4. package/dist/alert-dialog.d.ts +50 -0
  5. package/dist/alert-dialog.js +149 -0
  6. package/dist/alert.d.ts +23 -0
  7. package/dist/alert.js +87 -0
  8. package/dist/avatar.d.ts +35 -0
  9. package/dist/avatar.js +118 -0
  10. package/dist/badge.d.ts +27 -0
  11. package/dist/badge.js +148 -0
  12. package/dist/button-Bu72BGjv.d.ts +15 -0
  13. package/dist/button-DEsRlveL.js +86 -0
  14. package/dist/button.d.ts +2 -0
  15. package/dist/button.js +1 -0
  16. package/dist/calendar-DhsRPq2D.d.ts +23 -0
  17. package/dist/calendar-kbn4gZ1a.js +110 -0
  18. package/dist/calendar.d.ts +2 -0
  19. package/dist/calendar.js +1 -0
  20. package/dist/card-tkP52GwZ.js +77 -0
  21. package/dist/card.d.ts +18 -0
  22. package/dist/card.js +1 -0
  23. package/dist/chart.d.ts +52 -0
  24. package/dist/chart.js +163 -0
  25. package/dist/checkbox.d.ts +7 -0
  26. package/dist/checkbox.js +26 -0
  27. package/dist/cn-B-fHM4Ov.js +12 -0
  28. package/dist/collapsible.d.ts +10 -0
  29. package/dist/collapsible.js +23 -0
  30. package/dist/command.d.ts +38 -0
  31. package/dist/command.js +124 -0
  32. package/dist/date-picker.d.ts +46 -0
  33. package/dist/date-picker.js +159 -0
  34. package/dist/dialog-JjpMFEDR.js +117 -0
  35. package/dist/dialog.d.ts +2 -0
  36. package/dist/dialog.js +3 -0
  37. package/dist/dropdown-menu-B_VG1VXX.js +116 -0
  38. package/dist/dropdown-menu-CZ8xcq1d.d.ts +38 -0
  39. package/dist/dropdown-menu.d.ts +2 -0
  40. package/dist/dropdown-menu.js +1 -0
  41. package/dist/empty-state-B11Uq0U_.js +66 -0
  42. package/dist/empty-state.d.ts +15 -0
  43. package/dist/empty-state.js +1 -0
  44. package/dist/error-state.d.ts +48 -0
  45. package/dist/error-state.js +139 -0
  46. package/dist/field-Cwhz73-_.d.ts +15 -0
  47. package/dist/field-D-n7O1n6.js +63 -0
  48. package/dist/field.d.ts +2 -0
  49. package/dist/field.js +1 -0
  50. package/dist/focus-ring-BpxMbGAn.js +3 -0
  51. package/dist/form-actions.d.ts +21 -0
  52. package/dist/form-actions.js +41 -0
  53. package/dist/forms/formik.d.ts +20 -0
  54. package/dist/forms/formik.js +50 -0
  55. package/dist/forms/rhf.d.ts +32 -0
  56. package/dist/forms/rhf.js +114 -0
  57. package/dist/icon-button-XAjcFsZ2.js +14 -0
  58. package/dist/icon-button.d.ts +9 -0
  59. package/dist/icon-button.js +1 -0
  60. package/dist/icon.d.ts +15 -0
  61. package/dist/icon.js +21 -0
  62. package/dist/index-C-tNDS8C.d.ts +29 -0
  63. package/dist/input-BxjcqQS1.js +49 -0
  64. package/dist/input-group.d.ts +12 -0
  65. package/dist/input-group.js +26 -0
  66. package/dist/input.d.ts +15 -0
  67. package/dist/input.js +1 -0
  68. package/dist/label-BrOAJU1p.js +31 -0
  69. package/dist/label-CUAiaBbm.d.ts +13 -0
  70. package/dist/label.d.ts +2 -0
  71. package/dist/label.js +1 -0
  72. package/dist/native-select.d.ts +8 -0
  73. package/dist/native-select.js +41 -0
  74. package/dist/page-header.d.ts +19 -0
  75. package/dist/page-header.js +51 -0
  76. package/dist/pagination.d.ts +47 -0
  77. package/dist/pagination.js +131 -0
  78. package/dist/password-input.d.ts +14 -0
  79. package/dist/password-input.js +41 -0
  80. package/dist/popover.d.ts +19 -0
  81. package/dist/popover.js +54 -0
  82. package/dist/popup-CLsuJ-AA.js +6 -0
  83. package/dist/progress.d.ts +8 -0
  84. package/dist/progress.js +36 -0
  85. package/dist/radio-group.d.ts +14 -0
  86. package/dist/radio-group.js +25 -0
  87. package/dist/scroll-area.d.ts +16 -0
  88. package/dist/scroll-area.js +52 -0
  89. package/dist/select-Cq_JDuYO.js +266 -0
  90. package/dist/select.d.ts +40 -0
  91. package/dist/select.js +1 -0
  92. package/dist/separator.d.ts +8 -0
  93. package/dist/separator.js +38 -0
  94. package/dist/sheet.d.ts +27 -0
  95. package/dist/sheet.js +95 -0
  96. package/dist/skeleton.d.ts +19 -0
  97. package/dist/skeleton.js +45 -0
  98. package/dist/spinner.d.ts +13 -0
  99. package/dist/spinner.js +44 -0
  100. package/dist/switch.d.ts +7 -0
  101. package/dist/switch.js +19 -0
  102. package/dist/table.d.ts +24 -0
  103. package/dist/table.js +75 -0
  104. package/dist/tabs.d.ts +24 -0
  105. package/dist/tabs.js +74 -0
  106. package/dist/textarea.d.ts +5 -0
  107. package/dist/textarea.js +15 -0
  108. package/dist/theme-toggle.d.ts +11 -0
  109. package/dist/theme-toggle.js +50 -0
  110. package/dist/toast.d.ts +12 -0
  111. package/dist/toast.js +105 -0
  112. package/dist/tooltip-BsVKZDXs.js +47 -0
  113. package/dist/tooltip.d.ts +18 -0
  114. package/dist/tooltip.js +1 -0
  115. package/dist/typography-Dy3PCTrL.js +34 -0
  116. package/dist/typography.d.ts +11 -0
  117. package/dist/typography.js +1 -0
  118. package/dist/visually-hidden-BrCs6ZEy.js +11 -0
  119. package/dist/visually-hidden.d.ts +3 -0
  120. package/dist/visually-hidden.js +1 -0
  121. package/docs/accessibility.md +95 -0
  122. package/docs/accordion.md +89 -0
  123. package/docs/alert-dialog.md +157 -0
  124. package/docs/alert.md +70 -0
  125. package/docs/avatar.md +57 -0
  126. package/docs/badge.md +51 -0
  127. package/docs/button.md +121 -0
  128. package/docs/calendar.md +116 -0
  129. package/docs/card.md +74 -0
  130. package/docs/chart.md +93 -0
  131. package/docs/checkbox.md +119 -0
  132. package/docs/collapsible.md +76 -0
  133. package/docs/command.md +114 -0
  134. package/docs/date-picker.md +177 -0
  135. package/docs/dialog.md +110 -0
  136. package/docs/dropdown-menu.md +126 -0
  137. package/docs/empty-state.md +65 -0
  138. package/docs/error-state.md +59 -0
  139. package/docs/field.md +54 -0
  140. package/docs/form-actions.md +55 -0
  141. package/docs/forms/formik.md +42 -0
  142. package/docs/forms/rhf.md +64 -0
  143. package/docs/icon-button.md +84 -0
  144. package/docs/icon.md +77 -0
  145. package/docs/input-group.md +47 -0
  146. package/docs/input.md +46 -0
  147. package/docs/label.md +33 -0
  148. package/docs/layout.md +102 -0
  149. package/docs/llms.txt +72 -0
  150. package/docs/native-select.md +87 -0
  151. package/docs/page-header.md +61 -0
  152. package/docs/pagination.md +107 -0
  153. package/docs/password-input.md +30 -0
  154. package/docs/popover.md +103 -0
  155. package/docs/progress.md +53 -0
  156. package/docs/radio-group.md +119 -0
  157. package/docs/scroll-area.md +85 -0
  158. package/docs/select.md +106 -0
  159. package/docs/separator.md +38 -0
  160. package/docs/sheet.md +118 -0
  161. package/docs/skeleton.md +50 -0
  162. package/docs/spinner.md +46 -0
  163. package/docs/switch.md +92 -0
  164. package/docs/table.md +87 -0
  165. package/docs/tabs.md +96 -0
  166. package/docs/textarea.md +38 -0
  167. package/docs/theme-toggle.md +76 -0
  168. package/docs/toast.md +95 -0
  169. package/docs/tooltip.md +101 -0
  170. package/docs/typography.md +96 -0
  171. package/docs/visually-hidden.md +44 -0
  172. package/layer.css +22 -0
  173. package/package.json +275 -3
  174. package/skills/eod-ui/SKILL.md +37 -0
  175. package/styles.css +2 -0
  176. package/README.md +0 -3
@@ -0,0 +1,117 @@
1
+ import { Dialog as Dialog$1, DialogBackdrop, DialogClose as DialogClose$1, DialogContent as DialogContent$1, DialogDescription as DialogDescription$1, DialogTitle as DialogTitle$1, DialogTrigger as DialogTrigger$1 } from "@ui-sdk/react/dialog";
2
+ import { renderElement } from "@ui-sdk/react/primitive";
3
+ import { cva } from "class-variance-authority";
4
+ import { XIcon } from "lucide-react";
5
+ import { useRef } from "react";
6
+ import { t as cn } from "./cn-B-fHM4Ov.js";
7
+ import { t as focusRing } from "./focus-ring-BpxMbGAn.js";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ // src/dialog/dialog.tsx
10
+ function withState(base, className) {
11
+ return (state) => cn(base, typeof className === "function" ? className(state) : className);
12
+ }
13
+ const doubleClickMs = 500;
14
+ function Dialog({ onOpenChange, ...props }) {
15
+ const opener = useRef(null);
16
+ return /* @__PURE__ */ jsx(Dialog$1, {
17
+ ...props,
18
+ onOpenChange: (open, details) => {
19
+ const event = details.event;
20
+ if (open) opener.current = event instanceof MouseEvent && event.target instanceof Element ? {
21
+ rect: event.target.getBoundingClientRect(),
22
+ at: event.timeStamp
23
+ } : null;
24
+ const last = opener.current;
25
+ if (!open && details.reason === "outside-press" && event instanceof MouseEvent && last && event.timeStamp - last.at < doubleClickMs && event.clientX >= last.rect.left && event.clientX <= last.rect.right && event.clientY >= last.rect.top && event.clientY <= last.rect.bottom) {
26
+ details.cancel();
27
+ return;
28
+ }
29
+ onOpenChange?.(open, details);
30
+ }
31
+ });
32
+ }
33
+ function DialogTrigger(props) {
34
+ return /* @__PURE__ */ jsx(DialogTrigger$1, { ...props });
35
+ }
36
+ const motion = "transition-[opacity,scale] duration-150 data-starting-style:opacity-0 data-ending-style:opacity-0 motion-reduce:duration-0";
37
+ const dialogContentVariants = cva([
38
+ "m-0 flex w-[calc(100%-2rem)] -translate-1/2 flex-col gap-4 overflow-y-auto overscroll-contain rounded-surface border bg-background p-6 text-start text-foreground shadow-lg outline-hidden wrap-anywhere",
39
+ "data-starting-style:scale-95 data-ending-style:scale-95 motion-reduce:data-starting-style:scale-100 motion-reduce:data-ending-style:scale-100",
40
+ motion
41
+ ], {
42
+ variants: {
43
+ size: {
44
+ sm: "max-w-sm",
45
+ md: "max-w-lg",
46
+ lg: "max-w-2xl",
47
+ xl: "max-w-4xl"
48
+ },
49
+ inline: {
50
+ true: "absolute top-1/2 left-1/2 max-h-[calc(100%-2rem)]",
51
+ false: "fixed top-1/2 left-1/2 max-h-[calc(100dvh-2rem)] max-sm:top-0 max-sm:left-0 max-sm:h-dvh max-sm:max-h-none max-sm:w-full max-sm:max-w-none max-sm:translate-none max-sm:rounded-none max-sm:border-0"
52
+ }
53
+ },
54
+ defaultVariants: {
55
+ size: "md",
56
+ inline: false
57
+ }
58
+ });
59
+ function DialogContent({ size = "md", inline = false, showCloseButton = true, closeLabel = "Close", className, children, ...props }) {
60
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DialogBackdrop, {
61
+ render: /* @__PURE__ */ jsx("div", { "data-slot": "dialog-overlay" }),
62
+ className: cn(inline ? "absolute" : "fixed", "inset-0 m-0 bg-overlay/80", motion)
63
+ }), /* @__PURE__ */ jsx(DialogContent$1, {
64
+ ...props,
65
+ inline,
66
+ className: withState(dialogContentVariants({
67
+ size,
68
+ inline
69
+ }), className),
70
+ children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(state) : children, showCloseButton && /* @__PURE__ */ jsx(DialogClose$1, {
71
+ "aria-label": closeLabel,
72
+ className: cn("absolute end-4 top-4 inline-flex size-8 items-center justify-center rounded-item text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-hidden focus-visible:ring-(length:--focus-ring-width) focus-visible:ring-ring focus-visible:ring-offset-[length:var(--focus-ring-offset)] focus-visible:ring-offset-background"),
73
+ children: /* @__PURE__ */ jsx(XIcon, {
74
+ "aria-hidden": "true",
75
+ className: "size-4"
76
+ })
77
+ })] })
78
+ })] });
79
+ }
80
+ function DialogHeader({ className, ...props }) {
81
+ return renderElement("div", {
82
+ ...props,
83
+ "data-slot": "dialog-header",
84
+ className: cn("flex flex-col gap-1.5 pe-8", className)
85
+ }, props.render);
86
+ }
87
+ function DialogBody({ className, ...props }) {
88
+ return renderElement("div", {
89
+ tabIndex: 0,
90
+ ...props,
91
+ "data-slot": "dialog-body",
92
+ className: cn("-mx-1 min-h-0 flex-1 overflow-y-auto overscroll-contain rounded-item px-1", focusRing, className)
93
+ }, props.render);
94
+ }
95
+ function DialogFooter({ className, ...props }) {
96
+ return renderElement("div", {
97
+ ...props,
98
+ "data-slot": "dialog-footer",
99
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)
100
+ }, props.render);
101
+ }
102
+ function DialogTitle({ className, ...props }) {
103
+ return /* @__PURE__ */ jsx(DialogTitle$1, {
104
+ ...props,
105
+ className: withState("text-lg leading-tight font-semibold", className)
106
+ });
107
+ }
108
+ function DialogDescription({ className, ...props }) {
109
+ return /* @__PURE__ */ jsx(DialogDescription$1, {
110
+ ...props,
111
+ className: withState("text-sm text-muted-foreground", className)
112
+ });
113
+ }
114
+ function DialogClose(props) {
115
+ return /* @__PURE__ */ jsx(DialogClose$1, { ...props });
116
+ }
117
+ export { DialogDescription as a, DialogTitle as c, DialogContent as i, DialogTrigger as l, DialogBody as n, DialogFooter as o, DialogClose as r, DialogHeader as s, Dialog as t, dialogContentVariants as u };
@@ -0,0 +1,2 @@
1
+ import { _ as DialogTriggerProps, a as DialogClose, c as DialogContentProps, d as DialogFooter, f as DialogHeader, g as DialogTrigger, h as DialogTitleProps, i as DialogBody, l as DialogDescription, m as DialogTitle, n as createDialogController, o as DialogCloseProps, p as DialogProps, r as Dialog, s as DialogContent, t as DialogController, u as DialogDescriptionProps, v as dialogContentVariants } from "./index-C-tNDS8C.js";
2
+ export { Dialog, DialogBody, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, type DialogController, DialogDescription, type DialogDescriptionProps, DialogFooter, DialogHeader, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, createDialogController, dialogContentVariants };
package/dist/dialog.js ADDED
@@ -0,0 +1,3 @@
1
+ import { a as DialogDescription, c as DialogTitle, i as DialogContent, l as DialogTrigger, n as DialogBody, o as DialogFooter, r as DialogClose, s as DialogHeader, t as Dialog, u as dialogContentVariants } from "./dialog-JjpMFEDR.js";
2
+ import { createDialogController } from "@ui-sdk/react/dialog";
3
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, createDialogController, dialogContentVariants };
@@ -0,0 +1,116 @@
1
+ import { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from "@ui-sdk/react/menu";
2
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
3
+ import { createContext, use, useId } from "react";
4
+ import { n as withBase, t as cn } from "./cn-B-fHM4Ov.js";
5
+ import { n as popupMotion, r as popupSurface } from "./popup-CLsuJ-AA.js";
6
+ import { n as textVariants } from "./typography-Dy3PCTrL.js";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ // src/dropdown-menu/dropdown-menu.tsx
9
+ function DropdownMenu(props) {
10
+ return /* @__PURE__ */ jsx(Menu, { ...props });
11
+ }
12
+ function DropdownMenuTrigger(props) {
13
+ return /* @__PURE__ */ jsx(MenuTrigger, { ...props });
14
+ }
15
+ const contentClass = cn(popupSurface, popupMotion, "max-h-(--available-height) min-w-32 max-w-(--available-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto overscroll-contain outline-hidden");
16
+ function DropdownMenuContent({ side = "bottom", align = "center", sideOffset = 4, className, ...props }) {
17
+ return /* @__PURE__ */ jsx(MenuContent, {
18
+ side,
19
+ align,
20
+ sideOffset,
21
+ className: withBase(contentClass, className),
22
+ ...props
23
+ });
24
+ }
25
+ const itemClass = cn(textVariants({ variant: "small" }), "relative flex w-full cursor-default items-center gap-2 rounded-item px-2 py-1.5 text-start outline-none select-none", "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:outline-solid data-highlighted:outline-(length:--focus-ring-width) data-highlighted:-outline-offset-(length:--focus-ring-width) data-highlighted:outline-ring data-disabled:cursor-not-allowed data-disabled:opacity-50", "[&>svg]:pointer-events-none [&>svg]:size-4 [&>svg]:shrink-0", "[&>[data-slot=menu-shortcut]]:ms-auto [&>[data-slot=menu-shortcut]]:ps-4 [&>[data-slot=menu-shortcut]]:text-xs/4 [&>[data-slot=menu-shortcut]]:tracking-widest [&>[data-slot=menu-shortcut]]:text-muted-foreground");
26
+ const destructiveClass = "text-destructive data-highlighted:bg-destructive-subtle data-highlighted:text-destructive-subtle-foreground data-highlighted:outline-destructive";
27
+ function DropdownMenuItem({ inset, variant = "default", destructive, className, ...props }) {
28
+ const danger = destructive ?? variant === "destructive";
29
+ return /* @__PURE__ */ jsx(MenuItem, {
30
+ destructive: danger,
31
+ "data-variant": danger ? "destructive" : "default",
32
+ className: withBase(cn(itemClass, inset && "ps-8", danger && destructiveClass), className),
33
+ ...props
34
+ });
35
+ }
36
+ const choiceClass = cn(itemClass, "ps-8 pe-2");
37
+ const indicatorClass = "pointer-events-none absolute start-2 flex size-4 items-center justify-center";
38
+ function DropdownMenuCheckboxItem({ value, className, children, ...props }) {
39
+ const id = useId();
40
+ return /* @__PURE__ */ jsx(MenuCheckboxItem, {
41
+ value: value ?? id,
42
+ className: withBase(choiceClass, className),
43
+ ...props,
44
+ children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
45
+ "aria-hidden": true,
46
+ className: indicatorClass,
47
+ children: state.checked && /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" })
48
+ }), typeof children === "function" ? children(state) : children] })
49
+ });
50
+ }
51
+ function DropdownMenuRadioGroup(props) {
52
+ return /* @__PURE__ */ jsx(InGroup, {
53
+ value: true,
54
+ children: /* @__PURE__ */ jsx(MenuRadioGroup, { ...props })
55
+ });
56
+ }
57
+ function DropdownMenuRadioItem({ className, children, ...props }) {
58
+ return /* @__PURE__ */ jsx(MenuRadioItem, {
59
+ className: withBase(choiceClass, className),
60
+ ...props,
61
+ children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
62
+ "aria-hidden": true,
63
+ className: indicatorClass,
64
+ children: state.checked && /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" })
65
+ }), typeof children === "function" ? children(state) : children] })
66
+ });
67
+ }
68
+ const InGroup = createContext(false);
69
+ function DropdownMenuGroup({ className, ...props }) {
70
+ return /* @__PURE__ */ jsx(InGroup, {
71
+ value: true,
72
+ children: /* @__PURE__ */ jsx(MenuGroup, {
73
+ className: withBase("flex flex-col", className),
74
+ ...props
75
+ })
76
+ });
77
+ }
78
+ function DropdownMenuLabel({ inset, className, children, ...props }) {
79
+ const base = cn(textVariants({ variant: "label" }), "px-2 py-1.5", inset && "ps-8");
80
+ if (use(InGroup)) return /* @__PURE__ */ jsx(MenuGroupLabel, {
81
+ className: withBase(base, className),
82
+ ...props,
83
+ children
84
+ });
85
+ return /* @__PURE__ */ jsx("div", {
86
+ "data-slot": "menu-label",
87
+ className: typeof className === "function" ? cn(base, className({})) : cn(base, className),
88
+ children: typeof children === "function" ? children({}) : children
89
+ });
90
+ }
91
+ function DropdownMenuSeparator({ className, ...props }) {
92
+ return /* @__PURE__ */ jsx(MenuSeparator, {
93
+ className: withBase("-mx-1 my-1 h-px bg-border", className),
94
+ ...props
95
+ });
96
+ }
97
+ function DropdownMenuSub(props) {
98
+ return /* @__PURE__ */ jsx(MenuSub, { ...props });
99
+ }
100
+ function DropdownMenuSubTrigger({ inset, className, children, ...props }) {
101
+ return /* @__PURE__ */ jsx(MenuSubTrigger, {
102
+ className: withBase(cn(itemClass, "data-open:bg-accent data-open:text-accent-foreground", inset && "ps-8"), className),
103
+ ...props,
104
+ children: (state) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(state) : children, /* @__PURE__ */ jsx(ChevronRightIcon, {
105
+ "aria-hidden": true,
106
+ className: "ms-auto size-4 rtl:-scale-x-100"
107
+ })] })
108
+ });
109
+ }
110
+ function DropdownMenuSubContent({ className, ...props }) {
111
+ return /* @__PURE__ */ jsx(MenuSubContent, {
112
+ className: withBase(contentClass, className),
113
+ ...props
114
+ });
115
+ }
116
+ export { DropdownMenuItem as a, DropdownMenuRadioItem as c, DropdownMenuSubContent as d, DropdownMenuSubTrigger as f, DropdownMenuGroup as i, DropdownMenuSeparator as l, DropdownMenuCheckboxItem as n, DropdownMenuLabel as o, DropdownMenuTrigger as p, DropdownMenuContent as r, DropdownMenuRadioGroup as s, DropdownMenu as t, DropdownMenuSub as u };
@@ -0,0 +1,38 @@
1
+ import { Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from "@ui-sdk/react/menu";
2
+ import { ComponentProps } from "react";
3
+ type DropdownMenuProps = ComponentProps<typeof Menu>;
4
+ declare function DropdownMenu(props: DropdownMenuProps): import("react").JSX.Element;
5
+ type DropdownMenuTriggerProps = ComponentProps<typeof MenuTrigger>;
6
+ declare function DropdownMenuTrigger(props: DropdownMenuTriggerProps): import("react").JSX.Element;
7
+ type DropdownMenuContentProps = ComponentProps<typeof MenuContent>;
8
+ declare function DropdownMenuContent({ side, align, sideOffset, className, ...props }: DropdownMenuContentProps): import("react").JSX.Element;
9
+ type DropdownMenuItemProps = ComponentProps<typeof MenuItem> & {
10
+ inset?: boolean;
11
+ variant?: "default" | "destructive";
12
+ };
13
+ declare function DropdownMenuItem({ inset, variant, destructive, className, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
14
+ type DropdownMenuCheckboxItemProps = Omit<ComponentProps<typeof MenuCheckboxItem>, "value"> & {
15
+ value?: string;
16
+ };
17
+ declare function DropdownMenuCheckboxItem({ value, className, children, ...props }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
18
+ type DropdownMenuRadioGroupProps = ComponentProps<typeof MenuRadioGroup>;
19
+ declare function DropdownMenuRadioGroup(props: DropdownMenuRadioGroupProps): import("react").JSX.Element;
20
+ type DropdownMenuRadioItemProps = ComponentProps<typeof MenuRadioItem>;
21
+ declare function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuRadioItemProps): import("react").JSX.Element;
22
+ type DropdownMenuGroupProps = ComponentProps<typeof MenuGroup>;
23
+ declare function DropdownMenuGroup({ className, ...props }: DropdownMenuGroupProps): import("react").JSX.Element;
24
+ type DropdownMenuLabelProps = ComponentProps<typeof MenuGroupLabel> & {
25
+ inset?: boolean;
26
+ };
27
+ declare function DropdownMenuLabel({ inset, className, children, ...props }: DropdownMenuLabelProps): import("react").JSX.Element;
28
+ type DropdownMenuSeparatorProps = ComponentProps<typeof MenuSeparator>;
29
+ declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react").JSX.Element;
30
+ type DropdownMenuSubProps = ComponentProps<typeof MenuSub>;
31
+ declare function DropdownMenuSub(props: DropdownMenuSubProps): import("react").JSX.Element;
32
+ type DropdownMenuSubTriggerProps = ComponentProps<typeof MenuSubTrigger> & {
33
+ inset?: boolean;
34
+ };
35
+ declare function DropdownMenuSubTrigger({ inset, className, children, ...props }: DropdownMenuSubTriggerProps): import("react").JSX.Element;
36
+ type DropdownMenuSubContentProps = ComponentProps<typeof MenuSubContent>;
37
+ declare function DropdownMenuSubContent({ className, ...props }: DropdownMenuSubContentProps): import("react").JSX.Element;
38
+ export { DropdownMenuSubTrigger as C, DropdownMenuTriggerProps as E, DropdownMenuSubProps as S, DropdownMenuTrigger as T, DropdownMenuSeparator as _, DropdownMenuContentProps as a, DropdownMenuSubContent as b, DropdownMenuItem as c, DropdownMenuLabelProps as d, DropdownMenuProps as f, DropdownMenuRadioItemProps as g, DropdownMenuRadioItem as h, DropdownMenuContent as i, DropdownMenuItemProps as l, DropdownMenuRadioGroupProps as m, DropdownMenuCheckboxItem as n, DropdownMenuGroup as o, DropdownMenuRadioGroup as p, DropdownMenuCheckboxItemProps as r, DropdownMenuGroupProps as s, DropdownMenu as t, DropdownMenuLabel as u, DropdownMenuSeparatorProps as v, DropdownMenuSubTriggerProps as w, DropdownMenuSubContentProps as x, DropdownMenuSub as y };
@@ -0,0 +1,2 @@
1
+ import { C as DropdownMenuSubTrigger, E as DropdownMenuTriggerProps, S as DropdownMenuSubProps, T as DropdownMenuTrigger, _ as DropdownMenuSeparator, a as DropdownMenuContentProps, b as DropdownMenuSubContent, c as DropdownMenuItem, d as DropdownMenuLabelProps, f as DropdownMenuProps, g as DropdownMenuRadioItemProps, h as DropdownMenuRadioItem, i as DropdownMenuContent, l as DropdownMenuItemProps, m as DropdownMenuRadioGroupProps, n as DropdownMenuCheckboxItem, o as DropdownMenuGroup, p as DropdownMenuRadioGroup, r as DropdownMenuCheckboxItemProps, s as DropdownMenuGroupProps, t as DropdownMenu, u as DropdownMenuLabel, v as DropdownMenuSeparatorProps, w as DropdownMenuSubTriggerProps, x as DropdownMenuSubContentProps, y as DropdownMenuSub } from "./dropdown-menu-CZ8xcq1d.js";
2
+ export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
@@ -0,0 +1 @@
1
+ export { t as DropdownMenu, n as DropdownMenuCheckboxItem, r as DropdownMenuContent, i as DropdownMenuGroup, a as DropdownMenuItem, o as DropdownMenuLabel, s as DropdownMenuRadioGroup, c as DropdownMenuRadioItem, l as DropdownMenuSeparator, u as DropdownMenuSub, d as DropdownMenuSubContent, f as DropdownMenuSubTrigger, p as DropdownMenuTrigger } from "./dropdown-menu-B_VG1VXX.js";
@@ -0,0 +1,66 @@
1
+ import { renderElement } from "@ui-sdk/react/primitive";
2
+ import { InboxIcon, SearchXIcon, TriangleAlertIcon } from "lucide-react";
3
+ import { createContext, useContext } from "react";
4
+ import { n as withBase } from "./cn-B-fHM4Ov.js";
5
+ import { n as textVariants } from "./typography-Dy3PCTrL.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/patterns/empty-state/empty-state.tsx
8
+ const defaultIcons = {
9
+ zero: InboxIcon,
10
+ "no-results": SearchXIcon,
11
+ error: TriangleAlertIcon
12
+ };
13
+ const EmptyStateContext = createContext({
14
+ variant: "zero",
15
+ compact: false
16
+ });
17
+ function EmptyState({ variant = "zero", compact = false, render, className, ...props }) {
18
+ return /* @__PURE__ */ jsx(EmptyStateContext.Provider, {
19
+ value: {
20
+ variant,
21
+ compact
22
+ },
23
+ children: renderElement("div", {
24
+ ...props,
25
+ "data-slot": "empty-state",
26
+ "data-variant": variant,
27
+ ...compact && { "data-compact": "" },
28
+ className: withBase(`flex flex-col items-center justify-center gap-2 text-center ${compact ? "p-4" : "p-8"}`, className)
29
+ }, render)
30
+ });
31
+ }
32
+ /** A decorative icon in a muted disc. With no children it shows the icon of the variant. */
33
+ function EmptyStateIcon({ children, render, className, ...props }) {
34
+ const { variant, compact } = useContext(EmptyStateContext);
35
+ const Glyph = defaultIcons[variant];
36
+ return renderElement("div", {
37
+ "aria-hidden": true,
38
+ ...props,
39
+ "data-slot": "empty-state-icon",
40
+ className: withBase(`flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground ${compact ? "size-8 [&_svg]:size-4" : "size-12 [&_svg]:size-6"}`, className),
41
+ children: children ?? /* @__PURE__ */ jsx(Glyph, {})
42
+ }, render);
43
+ }
44
+ function EmptyStateTitle({ render, className, ...props }) {
45
+ const { compact } = useContext(EmptyStateContext);
46
+ return renderElement("h2", {
47
+ ...props,
48
+ "data-slot": "empty-state-title",
49
+ className: withBase(`wrap-anywhere ${textVariants({ variant: compact ? "label" : "section-title" })}`, className)
50
+ }, render);
51
+ }
52
+ function EmptyStateDescription({ render, className, ...props }) {
53
+ return renderElement("p", {
54
+ ...props,
55
+ "data-slot": "empty-state-description",
56
+ className: withBase(`max-w-prose wrap-anywhere text-pretty text-muted-foreground ${textVariants({ variant: "small" })}`, className)
57
+ }, render);
58
+ }
59
+ function EmptyStateActions({ render, className, ...props }) {
60
+ return renderElement("div", {
61
+ ...props,
62
+ "data-slot": "empty-state-actions",
63
+ className: withBase("flex flex-wrap items-center justify-center gap-2 pt-2", className)
64
+ }, render);
65
+ }
66
+ export { EmptyStateTitle as a, EmptyStateIcon as i, EmptyStateActions as n, EmptyStateDescription as r, EmptyState as t };
@@ -0,0 +1,15 @@
1
+ import { PartProps } from "@ui-sdk/react/primitive";
2
+ type EmptyStateVariant = "zero" | "no-results" | "error";
3
+ type EmptyStateProps = PartProps<"div"> & {
4
+ /** Nothing created yet, a search or filter found nothing, or content failed to load. */
5
+ variant?: EmptyStateVariant;
6
+ /** For a card, a popover or a table row. */
7
+ compact?: boolean;
8
+ };
9
+ declare function EmptyState({ variant, compact, render, className, ...props }: EmptyStateProps): import("react").JSX.Element;
10
+ /** A decorative icon in a muted disc. With no children it shows the icon of the variant. */
11
+ declare function EmptyStateIcon({ children, render, className, ...props }: PartProps<"div">): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
12
+ declare function EmptyStateTitle({ render, className, ...props }: PartProps<"h2">): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
13
+ declare function EmptyStateDescription({ render, className, ...props }: PartProps<"p">): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
14
+ declare function EmptyStateActions({ render, className, ...props }: PartProps<"div">): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
15
+ export { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIcon, type EmptyStateProps, EmptyStateTitle, type EmptyStateVariant };
@@ -0,0 +1 @@
1
+ export { t as EmptyState, n as EmptyStateActions, r as EmptyStateDescription, i as EmptyStateIcon, a as EmptyStateTitle } from "./empty-state-B11Uq0U_.js";
@@ -0,0 +1,48 @@
1
+ import { PartProps } from "@ui-sdk/react/primitive";
2
+ import { Component, ErrorInfo, ReactNode } from "react";
3
+ type ErrorStateProps = Omit<PartProps<"div">, "title"> & {
4
+ /** `page` replaces a screen and carries its `h1`; `section` replaces a region; `inline` sits in a form or a card. */
5
+ variant?: "page" | "section" | "inline";
6
+ title: ReactNode;
7
+ description?: ReactNode;
8
+ /** A reference people can quote to support. */
9
+ errorId?: string;
10
+ errorIdLabel?: string;
11
+ /** Shows a retry button. */
12
+ onRetry?: () => void;
13
+ retryLabel?: string;
14
+ /** More actions beside retry. */
15
+ children?: ReactNode;
16
+ };
17
+ declare function ErrorState({ variant, title, description, errorId, errorIdLabel, onRetry, retryLabel, children, render, className, ...props }: ErrorStateProps): import("react").JSX.Element;
18
+ type FallbackProps = {
19
+ error: Error;
20
+ reset: () => void;
21
+ };
22
+ type ErrorBoundaryProps = {
23
+ children: ReactNode;
24
+ /** What to show instead of the children after a render error. */
25
+ fallback: ReactNode | ((props: FallbackProps) => ReactNode);
26
+ /** Report the error, once. */
27
+ onError?: (error: Error, info: ErrorInfo) => void;
28
+ /** When any value changes, the boundary tries its children again. */
29
+ resetKeys?: readonly unknown[];
30
+ };
31
+ declare class ErrorBoundary extends Component<ErrorBoundaryProps, {
32
+ error: Error | null;
33
+ }> {
34
+ state: {
35
+ error: Error | null;
36
+ };
37
+ static getDerivedStateFromError(error: unknown): {
38
+ error: Error;
39
+ };
40
+ componentDidCatch(error: Error, info: ErrorInfo): void;
41
+ private restore;
42
+ componentDidUpdate(previous: ErrorBoundaryProps, before: {
43
+ error: Error | null;
44
+ }): void;
45
+ reset: () => void;
46
+ render(): ReactNode;
47
+ }
48
+ export { ErrorBoundary, type ErrorBoundaryProps, ErrorState, type ErrorStateProps, type FallbackProps };
@@ -0,0 +1,139 @@
1
+ import { renderElement } from "@ui-sdk/react/primitive";
2
+ import { TriangleAlertIcon } from "lucide-react";
3
+ import { Component } from "react";
4
+ import { t as Button } from "./button-DEsRlveL.js";
5
+ import { n as withBase } from "./cn-B-fHM4Ov.js";
6
+ import { n as textVariants } from "./typography-Dy3PCTrL.js";
7
+ import { a as EmptyStateTitle, i as EmptyStateIcon, n as EmptyStateActions, r as EmptyStateDescription, t as EmptyState } from "./empty-state-B11Uq0U_.js";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ // src/patterns/error-state/error-state.tsx
10
+ function ErrorId({ label, id }) {
11
+ return /* @__PURE__ */ jsxs("p", {
12
+ "data-slot": "error-state-id",
13
+ className: `flex flex-wrap items-center justify-center gap-1.5 ${textVariants({ variant: "caption" })}`,
14
+ children: [
15
+ label,
16
+ " ",
17
+ /* @__PURE__ */ jsx("code", {
18
+ className: "font-mono wrap-anywhere text-foreground select-all",
19
+ children: id
20
+ })
21
+ ]
22
+ });
23
+ }
24
+ function ErrorState({ variant = "section", title, description, errorId, errorIdLabel = "Error ID", onRetry, retryLabel = "Try again", children, render, className, ...props }) {
25
+ const actions = onRetry || children;
26
+ if (variant === "inline") return renderElement("div", {
27
+ role: "alert",
28
+ ...props,
29
+ "data-slot": "error-state",
30
+ "data-error-state": "inline",
31
+ className: withBase("flex items-start gap-3 rounded-item border border-destructive-border bg-destructive-subtle p-3 text-destructive-subtle-foreground", className),
32
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(TriangleAlertIcon, {
33
+ "aria-hidden": "true",
34
+ className: "mt-0.5 size-4 shrink-0"
35
+ }), /* @__PURE__ */ jsxs("div", {
36
+ className: "flex min-w-0 flex-1 flex-col gap-1",
37
+ children: [
38
+ /* @__PURE__ */ jsx("p", {
39
+ className: `wrap-anywhere ${textVariants({ variant: "label" })}`,
40
+ children: title
41
+ }),
42
+ description && /* @__PURE__ */ jsx("p", {
43
+ className: `wrap-anywhere ${textVariants({ variant: "small" })}`,
44
+ children: description
45
+ }),
46
+ errorId && /* @__PURE__ */ jsxs("p", {
47
+ "data-slot": "error-state-id",
48
+ className: textVariants({ variant: "small" }),
49
+ children: [
50
+ errorIdLabel,
51
+ " ",
52
+ /* @__PURE__ */ jsx("code", {
53
+ className: "font-mono wrap-anywhere select-all",
54
+ children: errorId
55
+ })
56
+ ]
57
+ }),
58
+ actions && /* @__PURE__ */ jsxs("div", {
59
+ className: "flex flex-wrap items-center gap-2 pt-1",
60
+ children: [onRetry && /* @__PURE__ */ jsx(Button, {
61
+ variant: "outline",
62
+ size: "sm",
63
+ onClick: onRetry,
64
+ children: retryLabel
65
+ }), children]
66
+ })
67
+ ]
68
+ })] })
69
+ }, render);
70
+ const page = variant === "page";
71
+ return /* @__PURE__ */ jsxs(EmptyState, {
72
+ variant: "error",
73
+ role: "alert",
74
+ render,
75
+ ...props,
76
+ "data-error-state": variant,
77
+ className: withBase(page ? "min-h-96" : "rounded-surface border", className),
78
+ children: [
79
+ /* @__PURE__ */ jsx(EmptyStateIcon, {}),
80
+ /* @__PURE__ */ jsx(EmptyStateTitle, {
81
+ render: page ? /* @__PURE__ */ jsx("h1", {}) : void 0,
82
+ children: title
83
+ }),
84
+ description && /* @__PURE__ */ jsx(EmptyStateDescription, { children: description }),
85
+ errorId && /* @__PURE__ */ jsx(ErrorId, {
86
+ label: errorIdLabel,
87
+ id: errorId
88
+ }),
89
+ actions && /* @__PURE__ */ jsxs(EmptyStateActions, { children: [onRetry && /* @__PURE__ */ jsx(Button, {
90
+ onClick: onRetry,
91
+ children: retryLabel
92
+ }), children] })
93
+ ]
94
+ });
95
+ }
96
+ var ErrorBoundary = class extends Component {
97
+ state = { error: null };
98
+ static getDerivedStateFromError(error) {
99
+ return { error: error instanceof Error ? error : new Error(String(error)) };
100
+ }
101
+ componentDidCatch(error, info) {
102
+ this.props.onError?.(error, info);
103
+ }
104
+ restore = null;
105
+ componentDidUpdate(previous, before) {
106
+ if (before.error && !this.state.error && this.restore) {
107
+ const { parent, index } = this.restore;
108
+ this.restore = null;
109
+ const target = parent.children[index];
110
+ if (target instanceof HTMLElement && document.activeElement === document.body) {
111
+ if (!target.hasAttribute("tabindex")) target.tabIndex = -1;
112
+ target.focus();
113
+ }
114
+ }
115
+ const { resetKeys = [] } = this.props;
116
+ const keys = previous.resetKeys ?? [];
117
+ const changed = resetKeys.length !== keys.length || resetKeys.some((key, i) => !Object.is(key, keys[i]));
118
+ if (before.error && this.state.error && changed) this.reset();
119
+ }
120
+ reset = () => {
121
+ const host = document.activeElement?.closest("[data-error-state]");
122
+ const parent = host?.parentElement;
123
+ this.restore = parent ? {
124
+ parent,
125
+ index: Array.from(parent.children).indexOf(host)
126
+ } : null;
127
+ this.setState({ error: null });
128
+ };
129
+ render() {
130
+ const { error } = this.state;
131
+ if (!error) return this.props.children;
132
+ const { fallback } = this.props;
133
+ return typeof fallback === "function" ? fallback({
134
+ error,
135
+ reset: this.reset
136
+ }) : fallback;
137
+ }
138
+ };
139
+ export { ErrorBoundary, ErrorState };
@@ -0,0 +1,15 @@
1
+ import { Field as Field$1, FieldDescription as FieldDescription$1, FieldError as FieldError$1, FieldGroup as FieldGroup$1, FieldLabel as FieldLabel$1, FieldLegend as FieldLegend$1, FieldSet as FieldSet$1 } from "@ui-sdk/react/field";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ComponentProps } from "react";
4
+ declare const layout: (props?: ({
5
+ orientation?: "vertical" | "horizontal" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type FieldProps = ComponentProps<typeof Field$1> & VariantProps<typeof layout>;
8
+ declare function Field({ orientation, className, ...props }: FieldProps): import("react").JSX.Element;
9
+ declare function FieldLabel({ className, ...props }: ComponentProps<typeof FieldLabel$1>): import("react").JSX.Element;
10
+ declare function FieldDescription({ className, ...props }: ComponentProps<typeof FieldDescription$1>): import("react").JSX.Element;
11
+ declare function FieldError({ className, ...props }: ComponentProps<typeof FieldError$1>): import("react").JSX.Element;
12
+ declare function FieldSet({ className, ...props }: ComponentProps<typeof FieldSet$1>): import("react").JSX.Element;
13
+ declare function FieldLegend({ className, ...props }: ComponentProps<typeof FieldLegend$1>): import("react").JSX.Element;
14
+ declare function FieldGroup({ className, ...props }: ComponentProps<typeof FieldGroup$1>): import("react").JSX.Element;
15
+ export { FieldLabel as a, FieldSet as c, FieldGroup as i, FieldDescription as n, FieldLegend as o, FieldError as r, FieldProps as s, Field as t };
@@ -0,0 +1,63 @@
1
+ import { Field as Field$1, FieldDescription as FieldDescription$1, FieldError as FieldError$1, FieldGroup as FieldGroup$1, FieldLabel as FieldLabel$1, FieldLegend as FieldLegend$1, FieldSet as FieldSet$1 } from "@ui-sdk/react/field";
2
+ import { cva } from "class-variance-authority";
3
+ import { n as withBase, t as cn } from "./cn-B-fHM4Ov.js";
4
+ import { n as labelClass } from "./label-BrOAJU1p.js";
5
+ import { n as textVariants } from "./typography-Dy3PCTrL.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/field/field.tsx
8
+ const layout = cva("gap-1.5", {
9
+ variants: { orientation: {
10
+ vertical: "flex flex-col",
11
+ horizontal: "grid grid-cols-1 sm:grid-cols-[minmax(0,12rem)_minmax(0,1fr)] sm:gap-x-4"
12
+ } },
13
+ defaultVariants: { orientation: "vertical" }
14
+ });
15
+ const labelLayout = "group-data-[orientation=horizontal]/field:sm:flex group-data-[orientation=horizontal]/field:sm:min-h-(--control-h) group-data-[orientation=horizontal]/field:sm:items-center group-data-[orientation=horizontal]/field:sm:gap-1";
16
+ const secondColumn = "group-data-[orientation=horizontal]/field:sm:col-start-2";
17
+ const descriptionClass = cn(textVariants({ variant: "caption" }), secondColumn);
18
+ const errorClass = cn(textVariants({ variant: "small" }), "text-destructive", secondColumn);
19
+ function Field({ orientation = "vertical", className, ...props }) {
20
+ return /* @__PURE__ */ jsx(Field$1, {
21
+ "data-orientation": orientation,
22
+ ...props,
23
+ className: withBase(cn("group/field", layout({ orientation })), className)
24
+ });
25
+ }
26
+ const requiredMark = "data-required:after:ms-1 data-required:after:text-destructive data-required:after:content-['*'_/_'']";
27
+ function FieldLabel({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(FieldLabel$1, {
29
+ ...props,
30
+ className: withBase(cn(labelClass, requiredMark, labelLayout), className)
31
+ });
32
+ }
33
+ function FieldDescription({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx(FieldDescription$1, {
35
+ ...props,
36
+ className: withBase(descriptionClass, className)
37
+ });
38
+ }
39
+ function FieldError({ className, ...props }) {
40
+ return /* @__PURE__ */ jsx(FieldError$1, {
41
+ ...props,
42
+ className: withBase(errorClass, className)
43
+ });
44
+ }
45
+ function FieldSet({ className, ...props }) {
46
+ return /* @__PURE__ */ jsx(FieldSet$1, {
47
+ ...props,
48
+ className: withBase("flex min-w-0 flex-col gap-4", className)
49
+ });
50
+ }
51
+ function FieldLegend({ className, ...props }) {
52
+ return /* @__PURE__ */ jsx(FieldLegend$1, {
53
+ ...props,
54
+ className: withBase(cn(textVariants({ variant: "section-title" }), "mb-3"), className)
55
+ });
56
+ }
57
+ function FieldGroup({ className, ...props }) {
58
+ return /* @__PURE__ */ jsx(FieldGroup$1, {
59
+ ...props,
60
+ className: withBase("flex flex-col gap-4", className)
61
+ });
62
+ }
63
+ export { FieldLabel as a, descriptionClass as c, layout as d, secondColumn as f, FieldGroup as i, errorClass as l, FieldDescription as n, FieldLegend as o, FieldError as r, FieldSet as s, Field as t, labelLayout as u };
@@ -0,0 +1,2 @@
1
+ import { a as FieldLabel, c as FieldSet, i as FieldGroup, n as FieldDescription, o as FieldLegend, r as FieldError, s as FieldProps, t as Field } from "./field-Cwhz73-_.js";
2
+ export { Field, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldProps, FieldSet };
package/dist/field.js ADDED
@@ -0,0 +1 @@
1
+ export { t as Field, n as FieldDescription, r as FieldError, i as FieldGroup, a as FieldLabel, o as FieldLegend, s as FieldSet } from "./field-D-n7O1n6.js";