@lglab/compose-ui 0.28.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/accordion.d.ts +49 -40
  2. package/dist/accordion.d.ts.map +1 -0
  3. package/dist/accordion.js +47 -45
  4. package/dist/accordion.js.map +1 -0
  5. package/dist/alert-dialog.d.ts +93 -87
  6. package/dist/alert-dialog.d.ts.map +1 -0
  7. package/dist/alert-dialog.js +94 -111
  8. package/dist/alert-dialog.js.map +1 -0
  9. package/dist/autocomplete.d.ts +99 -96
  10. package/dist/autocomplete.d.ts.map +1 -0
  11. package/dist/autocomplete.js +92 -116
  12. package/dist/autocomplete.js.map +1 -0
  13. package/dist/avatar.d.ts +56 -47
  14. package/dist/avatar.d.ts.map +1 -0
  15. package/dist/avatar.js +66 -79
  16. package/dist/avatar.js.map +1 -0
  17. package/dist/badge.d.ts +48 -42
  18. package/dist/badge.d.ts.map +1 -0
  19. package/dist/badge.js +195 -202
  20. package/dist/badge.js.map +1 -0
  21. package/dist/button.d.ts +26 -21
  22. package/dist/button.d.ts.map +1 -0
  23. package/dist/button.js +24 -24
  24. package/dist/button.js.map +1 -0
  25. package/dist/card.d.ts +105 -99
  26. package/dist/card.d.ts.map +1 -0
  27. package/dist/card.js +105 -66
  28. package/dist/card.js.map +1 -0
  29. package/dist/checkbox-group.d.ts +16 -12
  30. package/dist/checkbox-group.d.ts.map +1 -0
  31. package/dist/checkbox-group.js +18 -14
  32. package/dist/checkbox-group.js.map +1 -0
  33. package/dist/checkbox.d.ts +25 -19
  34. package/dist/checkbox.d.ts.map +1 -0
  35. package/dist/checkbox.js +26 -32
  36. package/dist/checkbox.js.map +1 -0
  37. package/dist/collapsible.d.ts +32 -26
  38. package/dist/collapsible.d.ts.map +1 -0
  39. package/dist/collapsible.js +32 -32
  40. package/dist/collapsible.js.map +1 -0
  41. package/dist/combobox.d.ts +191 -182
  42. package/dist/combobox.d.ts.map +1 -0
  43. package/dist/combobox.js +176 -250
  44. package/dist/combobox.js.map +1 -0
  45. package/dist/components/table/filters.d.ts +29 -0
  46. package/dist/components/table/filters.d.ts.map +1 -0
  47. package/dist/components/table/filters.js +47 -0
  48. package/dist/components/table/filters.js.map +1 -0
  49. package/dist/components/table/primitives.d.ts +93 -0
  50. package/dist/components/table/primitives.d.ts.map +1 -0
  51. package/dist/components/table/primitives.js +129 -0
  52. package/dist/components/table/primitives.js.map +1 -0
  53. package/dist/components/table/sort.js +17 -0
  54. package/dist/components/table/sort.js.map +1 -0
  55. package/dist/components/table/types.d.ts +101 -0
  56. package/dist/components/table/types.d.ts.map +1 -0
  57. package/dist/context-menu.d.ts +151 -138
  58. package/dist/context-menu.d.ts.map +1 -0
  59. package/dist/context-menu.js +151 -173
  60. package/dist/context-menu.js.map +1 -0
  61. package/dist/dialog.d.ts +101 -92
  62. package/dist/dialog.d.ts.map +1 -0
  63. package/dist/dialog.js +101 -105
  64. package/dist/dialog.js.map +1 -0
  65. package/dist/drawer.d.ts +109 -99
  66. package/dist/drawer.d.ts.map +1 -0
  67. package/dist/drawer.js +120 -111
  68. package/dist/drawer.js.map +1 -0
  69. package/dist/field.d.ts +61 -54
  70. package/dist/field.d.ts.map +1 -0
  71. package/dist/field.js +58 -27
  72. package/dist/field.js.map +1 -0
  73. package/dist/fieldset.d.ts +24 -19
  74. package/dist/fieldset.d.ts.map +1 -0
  75. package/dist/fieldset.js +26 -18
  76. package/dist/fieldset.js.map +1 -0
  77. package/dist/form.d.ts +16 -12
  78. package/dist/form.d.ts.map +1 -0
  79. package/dist/form.js +18 -8
  80. package/dist/form.js.map +1 -0
  81. package/dist/index.d.ts +48 -2115
  82. package/dist/index.js +47 -318
  83. package/dist/input.d.ts +16 -12
  84. package/dist/input.d.ts.map +1 -0
  85. package/dist/input.js +19 -9
  86. package/dist/input.js.map +1 -0
  87. package/dist/lib/arrow-svg.js +28 -0
  88. package/dist/lib/arrow-svg.js.map +1 -0
  89. package/dist/lib/button-variants.d.ts +6 -0
  90. package/dist/lib/button-variants.d.ts.map +1 -0
  91. package/dist/lib/button-variants.js +31 -0
  92. package/dist/lib/button-variants.js.map +1 -0
  93. package/dist/lib/control-variants.d.ts +6 -0
  94. package/dist/lib/control-variants.d.ts.map +1 -0
  95. package/dist/lib/control-variants.js +38 -0
  96. package/dist/lib/control-variants.js.map +1 -0
  97. package/dist/lib/form-variants.js +11 -0
  98. package/dist/lib/form-variants.js.map +1 -0
  99. package/dist/lib/tooltip-variants.d.ts +5 -0
  100. package/dist/lib/tooltip-variants.d.ts.map +1 -0
  101. package/dist/lib/tooltip-variants.js +36 -0
  102. package/dist/lib/tooltip-variants.js.map +1 -0
  103. package/dist/lib/utils.js +11 -0
  104. package/dist/lib/utils.js.map +1 -0
  105. package/dist/menu.d.ts +151 -138
  106. package/dist/menu.d.ts.map +1 -0
  107. package/dist/menu.js +151 -146
  108. package/dist/menu.js.map +1 -0
  109. package/dist/menubar.d.ts +168 -155
  110. package/dist/menubar.d.ts.map +1 -0
  111. package/dist/menubar.js +163 -169
  112. package/dist/menubar.js.map +1 -0
  113. package/dist/meter.d.ts +53 -43
  114. package/dist/meter.d.ts.map +1 -0
  115. package/dist/meter.js +59 -64
  116. package/dist/meter.js.map +1 -0
  117. package/dist/navigation-menu.d.ts +111 -96
  118. package/dist/navigation-menu.d.ts.map +1 -0
  119. package/dist/navigation-menu.js +117 -175
  120. package/dist/navigation-menu.js.map +1 -0
  121. package/dist/number-field.d.ts +64 -54
  122. package/dist/number-field.d.ts.map +1 -0
  123. package/dist/number-field.js +61 -69
  124. package/dist/number-field.js.map +1 -0
  125. package/dist/pagination.d.ts +184 -0
  126. package/dist/pagination.d.ts.map +1 -0
  127. package/dist/pagination.js +164 -0
  128. package/dist/pagination.js.map +1 -0
  129. package/dist/popover.d.ts +90 -82
  130. package/dist/popover.d.ts.map +1 -0
  131. package/dist/popover.js +85 -94
  132. package/dist/popover.js.map +1 -0
  133. package/dist/preview-card.d.ts +58 -54
  134. package/dist/preview-card.d.ts.map +1 -0
  135. package/dist/preview-card.js +57 -81
  136. package/dist/preview-card.js.map +1 -0
  137. package/dist/progress.d.ts +48 -40
  138. package/dist/progress.d.ts.map +1 -0
  139. package/dist/progress.js +46 -50
  140. package/dist/progress.js.map +1 -0
  141. package/dist/radio-group.d.ts +16 -12
  142. package/dist/radio-group.d.ts.map +1 -0
  143. package/dist/radio-group.js +18 -14
  144. package/dist/radio-group.js.map +1 -0
  145. package/dist/radio.d.ts +24 -19
  146. package/dist/radio.d.ts.map +1 -0
  147. package/dist/radio.js +25 -34
  148. package/dist/radio.js.map +1 -0
  149. package/dist/scroll-area.d.ts +57 -47
  150. package/dist/scroll-area.d.ts.map +1 -0
  151. package/dist/scroll-area.js +54 -56
  152. package/dist/scroll-area.js.map +1 -0
  153. package/dist/select.d.ts +146 -133
  154. package/dist/select.d.ts.map +1 -0
  155. package/dist/select.js +133 -167
  156. package/dist/select.js.map +1 -0
  157. package/dist/separator.d.ts +17 -12
  158. package/dist/separator.d.ts.map +1 -0
  159. package/dist/separator.js +19 -23
  160. package/dist/separator.js.map +1 -0
  161. package/dist/skeleton.d.ts +20 -0
  162. package/dist/skeleton.d.ts.map +1 -0
  163. package/dist/skeleton.js +27 -0
  164. package/dist/skeleton.js.map +1 -0
  165. package/dist/slider.d.ts +56 -47
  166. package/dist/slider.d.ts.map +1 -0
  167. package/dist/slider.js +53 -62
  168. package/dist/slider.js.map +1 -0
  169. package/dist/styles/default.css +15 -1
  170. package/dist/switch.d.ts +24 -19
  171. package/dist/switch.d.ts.map +1 -0
  172. package/dist/switch.js +23 -39
  173. package/dist/switch.js.map +1 -0
  174. package/dist/table/index.d.ts +5 -0
  175. package/dist/table/index.js +5 -0
  176. package/dist/table/use-table.d.ts +9 -0
  177. package/dist/table/use-table.d.ts.map +1 -0
  178. package/dist/table/use-table.js +256 -0
  179. package/dist/table/use-table.js.map +1 -0
  180. package/dist/tabs.d.ts +60 -49
  181. package/dist/tabs.d.ts.map +1 -0
  182. package/dist/tabs.js +76 -84
  183. package/dist/tabs.js.map +1 -0
  184. package/dist/textarea.d.ts +15 -11
  185. package/dist/textarea.d.ts.map +1 -0
  186. package/dist/textarea.js +18 -14
  187. package/dist/textarea.js.map +1 -0
  188. package/dist/toast.d.ts +87 -81
  189. package/dist/toast.d.ts.map +1 -0
  190. package/dist/toast.js +79 -150
  191. package/dist/toast.js.map +1 -0
  192. package/dist/toggle-group.d.ts +34 -29
  193. package/dist/toggle-group.d.ts.map +1 -0
  194. package/dist/toggle-group.js +31 -34
  195. package/dist/toggle-group.js.map +1 -0
  196. package/dist/toggle.d.ts +24 -21
  197. package/dist/toggle.d.ts.map +1 -0
  198. package/dist/toggle.js +22 -15
  199. package/dist/toggle.js.map +1 -0
  200. package/dist/toolbar.d.ts +64 -56
  201. package/dist/toolbar.d.ts.map +1 -0
  202. package/dist/toolbar.js +57 -68
  203. package/dist/toolbar.js.map +1 -0
  204. package/dist/tooltip.d.ts +67 -62
  205. package/dist/tooltip.d.ts.map +1 -0
  206. package/dist/tooltip.js +65 -90
  207. package/dist/tooltip.js.map +1 -0
  208. package/package.json +25 -13
  209. package/dist/arrow-svg-C6zQTvgS.js +0 -40
  210. package/dist/button-variants-CbFMPwc8.js +0 -33
  211. package/dist/control-variants-Bwep4n0y.js +0 -37
  212. package/dist/form-variants-LJ8gIbk0.js +0 -9
  213. package/dist/utils-B6yFEsav.js +0 -8
package/dist/drawer.js CHANGED
@@ -1,112 +1,121 @@
1
- "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { Dialog as s } from "@base-ui/react/dialog";
4
- import { cva as i } from "class-variance-authority";
5
- import { b as n } from "./button-variants-CbFMPwc8.js";
6
- import { c as t } from "./utils-B6yFEsav.js";
7
- const d = (a) => /* @__PURE__ */ e(s.Root, { ...a });
8
- d.displayName = "DrawerRoot";
9
- const c = ({ className: a, variant: r, size: o, ...l }) => /* @__PURE__ */ e(
10
- s.Trigger,
11
- {
12
- className: t(n({ variant: r, size: o }), a),
13
- ...l
14
- }
15
- );
16
- c.displayName = "DrawerTrigger";
17
- const p = (a) => /* @__PURE__ */ e(s.Portal, { ...a });
18
- p.displayName = "DrawerPortal";
19
- const m = ({ className: a, ...r }) => /* @__PURE__ */ e(
20
- s.Backdrop,
21
- {
22
- className: t(
23
- "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
24
- "transition-opacity duration-300",
25
- "data-starting-style:opacity-0 data-ending-style:opacity-0",
26
- a
27
- ),
28
- ...r
29
- }
30
- );
31
- m.displayName = "DrawerBackdrop";
32
- const u = i(
33
- [
34
- "fixed z-50 flex flex-col bg-background p-6 shadow-lg",
35
- "transition-transform duration-300 ease-out",
36
- "scale-[calc(1-0.1*var(--nested-dialogs))]",
37
- "data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
38
- ],
39
- {
40
- variants: {
41
- side: {
42
- top: [
43
- "inset-x-0 top-0 border-b border-border",
44
- "data-starting-style:-translate-y-full",
45
- "data-ending-style:-translate-y-full"
46
- ],
47
- right: [
48
- "inset-y-0 right-0 h-full w-sm max-w-full border-l border-border",
49
- "data-starting-style:translate-x-full",
50
- "data-ending-style:translate-x-full"
51
- ],
52
- bottom: [
53
- "inset-x-0 bottom-0 border-t border-border",
54
- "data-starting-style:translate-y-full",
55
- "data-ending-style:translate-y-full"
56
- ],
57
- left: [
58
- "inset-y-0 left-0 h-full w-sm max-w-full border-r border-border",
59
- "data-starting-style:-translate-x-full",
60
- "data-ending-style:-translate-x-full"
61
- ]
62
- }
63
- },
64
- defaultVariants: {
65
- side: "right"
66
- }
67
- }
68
- ), g = ({ className: a, side: r, ...o }) => /* @__PURE__ */ e(
69
- s.Popup,
70
- {
71
- className: t(u({ side: r }), a),
72
- ...o
73
- }
74
- );
75
- g.displayName = "DrawerPopup";
76
- const f = ({ className: a, ...r }) => /* @__PURE__ */ e(
77
- s.Title,
78
- {
79
- className: t("text-lg font-semibold leading-none tracking-tight", a),
80
- ...r
81
- }
82
- );
83
- f.displayName = "DrawerTitle";
84
- const y = ({ className: a, ...r }) => /* @__PURE__ */ e(s.Description, { className: t("", a), ...r });
85
- y.displayName = "DrawerDescription";
86
- const w = ({ className: a, variant: r, size: o, ...l }) => /* @__PURE__ */ e(
87
- s.Close,
88
- {
89
- className: t(n({ variant: r ?? "outline", size: o }), a),
90
- ...l
91
- }
92
- );
93
- w.displayName = "DrawerClose";
94
- const b = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("flex flex-col space-y-1.5", a), ...r });
95
- b.displayName = "DrawerHeader";
96
- const D = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("py-5", a), ...r });
97
- D.displayName = "DrawerContent";
98
- const N = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("", a), ...r });
99
- N.displayName = "DrawerFooter";
100
- export {
101
- m as DrawerBackdrop,
102
- w as DrawerClose,
103
- D as DrawerContent,
104
- y as DrawerDescription,
105
- N as DrawerFooter,
106
- b as DrawerHeader,
107
- g as DrawerPopup,
108
- p as DrawerPortal,
109
- d as DrawerRoot,
110
- f as DrawerTitle,
111
- c as DrawerTrigger
1
+ 'use client';
2
+
3
+ import { buttonVariants } from "./lib/button-variants.js";
4
+ import { cn } from "./lib/utils.js";
5
+ import "react";
6
+ import { cva } from "class-variance-authority";
7
+ import { jsx } from "react/jsx-runtime";
8
+ import { Dialog } from "@base-ui/react/dialog";
9
+
10
+ //#region src/components/drawer.tsx
11
+ const DrawerRoot = (props) => {
12
+ return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
112
13
  };
14
+ DrawerRoot.displayName = "DrawerRoot";
15
+ const DrawerTrigger = ({ className, variant, size, ...props }) => {
16
+ return /* @__PURE__ */ jsx(Dialog.Trigger, {
17
+ className: cn(buttonVariants({
18
+ variant,
19
+ size
20
+ }), className),
21
+ ...props
22
+ });
23
+ };
24
+ DrawerTrigger.displayName = "DrawerTrigger";
25
+ const DrawerPortal = (props) => {
26
+ return /* @__PURE__ */ jsx(Dialog.Portal, { ...props });
27
+ };
28
+ DrawerPortal.displayName = "DrawerPortal";
29
+ const DrawerBackdrop = ({ className, ...props }) => {
30
+ return /* @__PURE__ */ jsx(Dialog.Backdrop, {
31
+ className: cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", "transition-opacity duration-300", "data-starting-style:opacity-0 data-ending-style:opacity-0", className),
32
+ ...props
33
+ });
34
+ };
35
+ DrawerBackdrop.displayName = "DrawerBackdrop";
36
+ const drawerPopupVariants = cva([
37
+ "fixed z-50 flex flex-col bg-background p-6 shadow-lg",
38
+ "transition-transform duration-300 ease-out",
39
+ "scale-[calc(1-0.1*var(--nested-dialogs))]",
40
+ "data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
41
+ ], {
42
+ variants: { side: {
43
+ top: [
44
+ "inset-x-0 top-0 border-b border-border",
45
+ "data-starting-style:-translate-y-full",
46
+ "data-ending-style:-translate-y-full"
47
+ ],
48
+ right: [
49
+ "inset-y-0 right-0 h-full w-sm max-w-full border-l border-border",
50
+ "data-starting-style:translate-x-full",
51
+ "data-ending-style:translate-x-full"
52
+ ],
53
+ bottom: [
54
+ "inset-x-0 bottom-0 border-t border-border",
55
+ "data-starting-style:translate-y-full",
56
+ "data-ending-style:translate-y-full"
57
+ ],
58
+ left: [
59
+ "inset-y-0 left-0 h-full w-sm max-w-full border-r border-border",
60
+ "data-starting-style:-translate-x-full",
61
+ "data-ending-style:-translate-x-full"
62
+ ]
63
+ } },
64
+ defaultVariants: { side: "right" }
65
+ });
66
+ const DrawerPopup = ({ className, side, ...props }) => {
67
+ return /* @__PURE__ */ jsx(Dialog.Popup, {
68
+ className: cn(drawerPopupVariants({ side }), className),
69
+ ...props
70
+ });
71
+ };
72
+ DrawerPopup.displayName = "DrawerPopup";
73
+ const DrawerTitle = ({ className, ...props }) => {
74
+ return /* @__PURE__ */ jsx(Dialog.Title, {
75
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
76
+ ...props
77
+ });
78
+ };
79
+ DrawerTitle.displayName = "DrawerTitle";
80
+ const DrawerDescription = ({ className, ...props }) => {
81
+ return /* @__PURE__ */ jsx(Dialog.Description, {
82
+ className: cn("", className),
83
+ ...props
84
+ });
85
+ };
86
+ DrawerDescription.displayName = "DrawerDescription";
87
+ const DrawerClose = ({ className, variant, size, ...props }) => {
88
+ return /* @__PURE__ */ jsx(Dialog.Close, {
89
+ className: cn(buttonVariants({
90
+ variant: variant ?? "outline",
91
+ size
92
+ }), className),
93
+ ...props
94
+ });
95
+ };
96
+ DrawerClose.displayName = "DrawerClose";
97
+ const DrawerHeader = ({ className, ...props }) => {
98
+ return /* @__PURE__ */ jsx("div", {
99
+ className: cn("flex flex-col space-y-1.5", className),
100
+ ...props
101
+ });
102
+ };
103
+ DrawerHeader.displayName = "DrawerHeader";
104
+ const DrawerContent = ({ className, ...props }) => {
105
+ return /* @__PURE__ */ jsx("div", {
106
+ className: cn("py-5", className),
107
+ ...props
108
+ });
109
+ };
110
+ DrawerContent.displayName = "DrawerContent";
111
+ const DrawerFooter = ({ className, ...props }) => {
112
+ return /* @__PURE__ */ jsx("div", {
113
+ className: cn("", className),
114
+ ...props
115
+ });
116
+ };
117
+ DrawerFooter.displayName = "DrawerFooter";
118
+
119
+ //#endregion
120
+ export { DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger };
121
+ //# sourceMappingURL=drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.js","names":["BaseDialog"],"sources":["../src/components/drawer.tsx"],"sourcesContent":["'use client'\n\nimport { Dialog as BaseDialog } from '@base-ui/react/dialog'\nimport { cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport {\n type ButtonSize,\n type ButtonVariant,\n buttonVariants,\n} from '../lib/button-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// DrawerRoot\n// ============================================================================\n\ntype DrawerRootProps = React.ComponentProps<typeof BaseDialog.Root>\n\nconst DrawerRoot = (props: DrawerRootProps) => {\n return <BaseDialog.Root {...props} />\n}\n\nDrawerRoot.displayName = 'DrawerRoot'\n\n// ============================================================================\n// DrawerTrigger\n// ============================================================================\n\ntype DrawerTriggerProps = React.ComponentProps<typeof BaseDialog.Trigger> & {\n /** Visual style variant */\n variant?: ButtonVariant\n /** Size of the trigger button */\n size?: ButtonSize\n}\n\nconst DrawerTrigger = ({ className, variant, size, ...props }: DrawerTriggerProps) => {\n return (\n <BaseDialog.Trigger\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nDrawerTrigger.displayName = 'DrawerTrigger'\n\n// ============================================================================\n// DrawerPortal\n// ============================================================================\n\ntype DrawerPortalProps = React.ComponentProps<typeof BaseDialog.Portal>\n\nconst DrawerPortal = (props: DrawerPortalProps) => {\n return <BaseDialog.Portal {...props} />\n}\n\nDrawerPortal.displayName = 'DrawerPortal'\n\n// ============================================================================\n// DrawerBackdrop\n// ============================================================================\n\ntype DrawerBackdropProps = React.ComponentProps<typeof BaseDialog.Backdrop>\n\nconst DrawerBackdrop = ({ className, ...props }: DrawerBackdropProps) => {\n return (\n <BaseDialog.Backdrop\n className={cn(\n 'fixed inset-0 z-50 bg-black/50 backdrop-blur-sm',\n 'transition-opacity duration-300',\n 'data-starting-style:opacity-0 data-ending-style:opacity-0',\n className,\n )}\n {...props}\n />\n )\n}\n\nDrawerBackdrop.displayName = 'DrawerBackdrop'\n\n// ============================================================================\n// DrawerPopup\n// ============================================================================\n\nconst drawerPopupVariants = cva(\n [\n 'fixed z-50 flex flex-col bg-background p-6 shadow-lg',\n 'transition-transform duration-300 ease-out',\n 'scale-[calc(1-0.1*var(--nested-dialogs))]',\n 'data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5',\n ],\n {\n variants: {\n side: {\n top: [\n 'inset-x-0 top-0 border-b border-border',\n 'data-starting-style:-translate-y-full',\n 'data-ending-style:-translate-y-full',\n ],\n right: [\n 'inset-y-0 right-0 h-full w-sm max-w-full border-l border-border',\n 'data-starting-style:translate-x-full',\n 'data-ending-style:translate-x-full',\n ],\n bottom: [\n 'inset-x-0 bottom-0 border-t border-border',\n 'data-starting-style:translate-y-full',\n 'data-ending-style:translate-y-full',\n ],\n left: [\n 'inset-y-0 left-0 h-full w-sm max-w-full border-r border-border',\n 'data-starting-style:-translate-x-full',\n 'data-ending-style:-translate-x-full',\n ],\n },\n },\n defaultVariants: {\n side: 'right',\n },\n },\n)\n\ntype DrawerPopupProps = React.ComponentProps<typeof BaseDialog.Popup> & {\n /** Side from which the drawer slides in */\n side?: 'top' | 'right' | 'bottom' | 'left'\n}\n\nconst DrawerPopup = ({ className, side, ...props }: DrawerPopupProps) => {\n return (\n <BaseDialog.Popup\n className={cn(drawerPopupVariants({ side }), className)}\n {...props}\n />\n )\n}\n\nDrawerPopup.displayName = 'DrawerPopup'\n\n// ============================================================================\n// DrawerTitle\n// ============================================================================\n\ntype DrawerTitleProps = React.ComponentProps<typeof BaseDialog.Title>\n\nconst DrawerTitle = ({ className, ...props }: DrawerTitleProps) => {\n return (\n <BaseDialog.Title\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n )\n}\n\nDrawerTitle.displayName = 'DrawerTitle'\n\n// ============================================================================\n// DrawerDescription\n// ============================================================================\n\ntype DrawerDescriptionProps = React.ComponentProps<typeof BaseDialog.Description>\n\nconst DrawerDescription = ({ className, ...props }: DrawerDescriptionProps) => {\n return <BaseDialog.Description className={cn('', className)} {...props} />\n}\n\nDrawerDescription.displayName = 'DrawerDescription'\n\n// ============================================================================\n// DrawerClose\n// ============================================================================\n\ntype DrawerCloseProps = React.ComponentProps<typeof BaseDialog.Close> & {\n /** Visual style variant */\n variant?: ButtonVariant\n /** Size of the close button */\n size?: ButtonSize\n}\n\nconst DrawerClose = ({ className, variant, size, ...props }: DrawerCloseProps) => {\n return (\n <BaseDialog.Close\n className={cn(buttonVariants({ variant: variant ?? 'outline', size }), className)}\n {...props}\n />\n )\n}\n\nDrawerClose.displayName = 'DrawerClose'\n\n// ============================================================================\n// DrawerHeader (Utility Component)\n// ============================================================================\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerHeader = ({ className, ...props }: DrawerHeaderProps) => {\n return <div className={cn('flex flex-col space-y-1.5', className)} {...props} />\n}\n\nDrawerHeader.displayName = 'DrawerHeader'\n\n// ============================================================================\n// DrawerContent (Utility Component)\n// ============================================================================\n\ntype DrawerContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerContent = ({ className, ...props }: DrawerContentProps) => {\n return <div className={cn('py-5', className)} {...props} />\n}\n\nDrawerContent.displayName = 'DrawerContent'\n\n// ============================================================================\n// DrawerFooter (Utility Component)\n// ============================================================================\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>\n\nconst DrawerFooter = ({ className, ...props }: DrawerFooterProps) => {\n return <div className={cn('', className)} {...props} />\n}\n\nDrawerFooter.displayName = 'DrawerFooter'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n DrawerRoot,\n DrawerTrigger,\n DrawerPortal,\n DrawerBackdrop,\n DrawerPopup,\n DrawerTitle,\n DrawerDescription,\n DrawerClose,\n DrawerHeader,\n DrawerContent,\n DrawerFooter,\n}\n\nexport type {\n DrawerRootProps,\n DrawerTriggerProps,\n DrawerPortalProps,\n DrawerBackdropProps,\n DrawerPopupProps,\n DrawerTitleProps,\n DrawerDescriptionProps,\n DrawerCloseProps,\n DrawerHeaderProps,\n DrawerContentProps,\n DrawerFooterProps,\n}\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,cAAc,UAA2B;AAC7C,QAAO,oBAACA,OAAW,QAAK,GAAI,QAAS;;AAGvC,WAAW,cAAc;AAazB,MAAM,iBAAiB,EAAE,WAAW,SAAS,MAAM,GAAG,YAAgC;AACpF,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM,CAAC,EAAE,UAAU;EAC3D,GAAI;GACJ;;AAIN,cAAc,cAAc;AAQ5B,MAAM,gBAAgB,UAA6B;AACjD,QAAO,oBAACA,OAAW,UAAO,GAAI,QAAS;;AAGzC,aAAa,cAAc;AAQ3B,MAAM,kBAAkB,EAAE,WAAW,GAAG,YAAiC;AACvE,QACE,oBAACA,OAAW;EACV,WAAW,GACT,mDACA,mCACA,6DACA,UACD;EACD,GAAI;GACJ;;AAIN,eAAe,cAAc;AAM7B,MAAM,sBAAsB,IAC1B;CACE;CACA;CACA;CACA;CACD,EACD;CACE,UAAU,EACR,MAAM;EACJ,KAAK;GACH;GACA;GACA;GACD;EACD,OAAO;GACL;GACA;GACA;GACD;EACD,QAAQ;GACN;GACA;GACA;GACD;EACD,MAAM;GACJ;GACA;GACA;GACD;EACF,EACF;CACD,iBAAiB,EACf,MAAM,SACP;CACF,CACF;AAOD,MAAM,eAAe,EAAE,WAAW,MAAM,GAAG,YAA8B;AACvE,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,oBAAoB,EAAE,MAAM,CAAC,EAAE,UAAU;EACvD,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,eAAe,EAAE,WAAW,GAAG,YAA8B;AACjE,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,qDAAqD,UAAU;EAC7E,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,qBAAqB,EAAE,WAAW,GAAG,YAAoC;AAC7E,QAAO,oBAACA,OAAW;EAAY,WAAW,GAAG,IAAI,UAAU;EAAE,GAAI;GAAS;;AAG5E,kBAAkB,cAAc;AAahC,MAAM,eAAe,EAAE,WAAW,SAAS,MAAM,GAAG,YAA8B;AAChF,QACE,oBAACA,OAAW;EACV,WAAW,GAAG,eAAe;GAAE,SAAS,WAAW;GAAW;GAAM,CAAC,EAAE,UAAU;EACjF,GAAI;GACJ;;AAIN,YAAY,cAAc;AAQ1B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAAC;EAAI,WAAW,GAAG,6BAA6B,UAAU;EAAE,GAAI;GAAS;;AAGlF,aAAa,cAAc;AAQ3B,MAAM,iBAAiB,EAAE,WAAW,GAAG,YAAgC;AACrE,QAAO,oBAAC;EAAI,WAAW,GAAG,QAAQ,UAAU;EAAE,GAAI;GAAS;;AAG7D,cAAc,cAAc;AAQ5B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAAC;EAAI,WAAW,GAAG,IAAI,UAAU;EAAE,GAAI;GAAS;;AAGzD,aAAa,cAAc"}
package/dist/field.d.ts CHANGED
@@ -1,54 +1,61 @@
1
- import { Field } from '@base-ui/react/field';
2
- import { JSX } from 'react/jsx-runtime';
3
- import * as React_2 from 'react';
4
-
5
- export declare const FieldControl: {
6
- ({ className, ...props }: FieldControlProps): JSX.Element;
7
- displayName: string;
8
- };
9
-
10
- export declare type FieldControlProps = React_2.ComponentProps<typeof Field.Control>;
11
-
12
- export declare const FieldDescription: {
13
- ({ className, ...props }: FieldDescriptionProps): JSX.Element;
14
- displayName: string;
15
- };
16
-
17
- export declare type FieldDescriptionProps = React_2.ComponentProps<typeof Field.Description>;
18
-
19
- export declare const FieldError: {
20
- ({ className, ...props }: FieldErrorProps): JSX.Element;
21
- displayName: string;
22
- };
23
-
24
- export declare type FieldErrorProps = React_2.ComponentProps<typeof Field.Error>;
25
-
26
- export declare const FieldItem: {
27
- ({ className, ...props }: FieldItemProps): JSX.Element;
28
- displayName: string;
29
- };
30
-
31
- export declare type FieldItemProps = React_2.ComponentProps<typeof Field.Item>;
32
-
33
- export declare const FieldLabel: {
34
- ({ className, ...props }: FieldLabelProps): JSX.Element;
35
- displayName: string;
36
- };
37
-
38
- export declare type FieldLabelProps = React_2.ComponentProps<typeof Field.Label>;
39
-
40
- export declare const FieldRoot: {
41
- ({ className, ...props }: FieldRootProps): JSX.Element;
42
- displayName: string;
43
- };
44
-
45
- export declare type FieldRootProps = React_2.ComponentProps<typeof Field.Root>;
46
-
47
- export declare const FieldValidity: {
48
- (props: FieldValidityProps): JSX.Element;
49
- displayName: string;
50
- };
51
-
52
- export declare type FieldValidityProps = React_2.ComponentProps<typeof Field.Validity>;
53
-
54
- export { }
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime245 from "react/jsx-runtime";
3
+ import { Field } from "@base-ui/react/field";
4
+
5
+ //#region src/components/field.d.ts
6
+ type FieldRootProps = React.ComponentProps<typeof Field.Root>;
7
+ declare const FieldRoot: {
8
+ ({
9
+ className,
10
+ ...props
11
+ }: FieldRootProps): react_jsx_runtime245.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ type FieldLabelProps = React.ComponentProps<typeof Field.Label>;
15
+ declare const FieldLabel: {
16
+ ({
17
+ className,
18
+ ...props
19
+ }: FieldLabelProps): react_jsx_runtime245.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ type FieldControlProps = React.ComponentProps<typeof Field.Control>;
23
+ declare const FieldControl: {
24
+ ({
25
+ className,
26
+ ...props
27
+ }: FieldControlProps): react_jsx_runtime245.JSX.Element;
28
+ displayName: string;
29
+ };
30
+ type FieldDescriptionProps = React.ComponentProps<typeof Field.Description>;
31
+ declare const FieldDescription: {
32
+ ({
33
+ className,
34
+ ...props
35
+ }: FieldDescriptionProps): react_jsx_runtime245.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ type FieldErrorProps = React.ComponentProps<typeof Field.Error>;
39
+ declare const FieldError: {
40
+ ({
41
+ className,
42
+ ...props
43
+ }: FieldErrorProps): react_jsx_runtime245.JSX.Element;
44
+ displayName: string;
45
+ };
46
+ type FieldItemProps = React.ComponentProps<typeof Field.Item>;
47
+ declare const FieldItem: {
48
+ ({
49
+ className,
50
+ ...props
51
+ }: FieldItemProps): react_jsx_runtime245.JSX.Element;
52
+ displayName: string;
53
+ };
54
+ type FieldValidityProps = React.ComponentProps<typeof Field.Validity>;
55
+ declare const FieldValidity: {
56
+ (props: FieldValidityProps): react_jsx_runtime245.JSX.Element;
57
+ displayName: string;
58
+ };
59
+ //#endregion
60
+ export { FieldControl, type FieldControlProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldItem, type FieldItemProps, FieldLabel, type FieldLabelProps, FieldRoot, type FieldRootProps, FieldValidity, type FieldValidityProps };
61
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","names":[],"sources":["../src/components/field.tsx"],"sourcesContent":[],"mappings":";;;;;KAmBK,cAAA,GAAiB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEtD;;;;KAAsC,iBAAc,oBAAA,CAAA,GAAA,CAAA;EAFrD,WAAA,EAAA,MAAc;CAAA;KAYd,eAAA,GAAkB,KAAA,CAAM,cAZ+B,CAAA,OAYT,KAAA,CAAU,KAZD,CAAA;cActD,UAdsB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAcG,eAdH,CAAA,EAckB,oBAAA,CAAA,GAAA,CAAA,OAdlB;EAEpC,WAAA,EAEL,MAAA;CAAA;KAoBI,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,KAAA,CAAU;cAEzD,YAxBsC,EAAA;;IAAc,SAAA;IAAA,GAAA;EAAA,CAAA,EAwBX,iBAxBW,CAAA,EAwBM,oBAAA,CAAA,GAAA,CAAA,OAxBN;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KAkCrD,qBAAA,GAAwB,KAAA,CAAM,cAxBf,CAAA,OAwBqC,KAAA,CAAU,WAxB/C,CAAA;cA0Bd,gBA1BuD,EAAA;;IAAtC,SAAM;IAAA,GAAA;EAAA,CAAA,EA0BsB,qBA1BtB,CAAA,EA0B2C,oBAAA,CAAA,GAAA,CAAA,OA1B3C;EAAc,WAAA,EAAA,MAAA;AAAA,CAAA;KAoCtC,eAAA,GAAkB,KAAA,CAAM,cAhC5B,CAAA,OAgCkD,KAAA,CAAU,KAhC5D,CAAA;cAkCK;;IApCuC,SAAA;IAAA,GAAA;EAAA,CAAA,EAoCA,eApCA,CAAA,EAoCe,oBAAA,CAAA,GAAA,CAAA,OApCf;aAAe,EAAA,MAAA;CAAA;AAAA,KA8CvD,cAAA,GAAiB,KAAA,CAAM,cApCN,CAAA,OAoC4B,KAAA,CAAU,IApCtC,CAAA;cAsChB,SAtCgB,EAAA;;IAA+B,SAAU;IAAA,GAAA;EAAA,CAAA,EAsCnB,cAtCmB,CAAA,EAsCL,oBAAA,CAAA,GAAA,CAAA,OAtCK;aAAhC,EAAA,MAAA;CAAc;AAAA,KAgDxC,kBAAA,GAAqB,KAAA,CAAM,cA5C/B,CAAA,OA4CqD,KAAA,CAAU,QA5C/D,CAAA;cA8CK,aA9CL,EAAA;UA8C6B,qBAAkB,oBAAA,CAAA,GAAA,CAAA;aAhDD,EAAA,MAAA"}
package/dist/field.js CHANGED
@@ -1,28 +1,59 @@
1
- "use client";
2
- import { jsx as s } from "react/jsx-runtime";
3
- import { Field as i } from "@base-ui/react/field";
4
- import { i as a, d as r, e as o, f as d, l as m, a as n } from "./form-variants-LJ8gIbk0.js";
5
- import { c as t } from "./utils-B6yFEsav.js";
6
- const c = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Root, { className: t(n, e), ...l });
7
- c.displayName = "FieldRoot";
8
- const p = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Label, { className: t(m, e), ...l });
9
- p.displayName = "FieldLabel";
10
- const y = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Control, { className: t(a, e), ...l });
11
- y.displayName = "FieldControl";
12
- const F = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Description, { className: t(r, e), ...l });
13
- F.displayName = "FieldDescription";
14
- const N = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Error, { className: t(o, e), ...l });
15
- N.displayName = "FieldError";
16
- const u = ({ className: e, ...l }) => /* @__PURE__ */ s(i.Item, { className: t(d, e), ...l });
17
- u.displayName = "FieldItem";
18
- const f = (e) => /* @__PURE__ */ s(i.Validity, { ...e });
19
- f.displayName = "FieldValidity";
20
- export {
21
- y as FieldControl,
22
- F as FieldDescription,
23
- N as FieldError,
24
- u as FieldItem,
25
- p as FieldLabel,
26
- c as FieldRoot,
27
- f as FieldValidity
1
+ 'use client';
2
+
3
+ import { cn } from "./lib/utils.js";
4
+ import { descriptionStyles, errorStyles, fieldItemStyles, fieldRootStyles, inputBaseStyles, labelStyles } from "./lib/form-variants.js";
5
+ import "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { Field } from "@base-ui/react/field";
8
+
9
+ //#region src/components/field.tsx
10
+ const FieldRoot = ({ className, ...props }) => {
11
+ return /* @__PURE__ */ jsx(Field.Root, {
12
+ className: cn(fieldRootStyles, className),
13
+ ...props
14
+ });
28
15
  };
16
+ FieldRoot.displayName = "FieldRoot";
17
+ const FieldLabel = ({ className, ...props }) => {
18
+ return /* @__PURE__ */ jsx(Field.Label, {
19
+ className: cn(labelStyles, className),
20
+ ...props
21
+ });
22
+ };
23
+ FieldLabel.displayName = "FieldLabel";
24
+ const FieldControl = ({ className, ...props }) => {
25
+ return /* @__PURE__ */ jsx(Field.Control, {
26
+ className: cn(inputBaseStyles, className),
27
+ ...props
28
+ });
29
+ };
30
+ FieldControl.displayName = "FieldControl";
31
+ const FieldDescription = ({ className, ...props }) => {
32
+ return /* @__PURE__ */ jsx(Field.Description, {
33
+ className: cn(descriptionStyles, className),
34
+ ...props
35
+ });
36
+ };
37
+ FieldDescription.displayName = "FieldDescription";
38
+ const FieldError = ({ className, ...props }) => {
39
+ return /* @__PURE__ */ jsx(Field.Error, {
40
+ className: cn(errorStyles, className),
41
+ ...props
42
+ });
43
+ };
44
+ FieldError.displayName = "FieldError";
45
+ const FieldItem = ({ className, ...props }) => {
46
+ return /* @__PURE__ */ jsx(Field.Item, {
47
+ className: cn(fieldItemStyles, className),
48
+ ...props
49
+ });
50
+ };
51
+ FieldItem.displayName = "FieldItem";
52
+ const FieldValidity = (props) => {
53
+ return /* @__PURE__ */ jsx(Field.Validity, { ...props });
54
+ };
55
+ FieldValidity.displayName = "FieldValidity";
56
+
57
+ //#endregion
58
+ export { FieldControl, FieldDescription, FieldError, FieldItem, FieldLabel, FieldRoot, FieldValidity };
59
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","names":["BaseField"],"sources":["../src/components/field.tsx"],"sourcesContent":["'use client'\n\nimport { Field as BaseField } from '@base-ui/react/field'\nimport * as React from 'react'\n\nimport {\n descriptionStyles,\n errorStyles,\n fieldItemStyles,\n fieldRootStyles,\n inputBaseStyles,\n labelStyles,\n} from '../lib/form-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FieldRoot\n// ============================================================================\n\ntype FieldRootProps = React.ComponentProps<typeof BaseField.Root>\n\nconst FieldRoot = ({ className, ...props }: FieldRootProps) => {\n return <BaseField.Root className={cn(fieldRootStyles, className)} {...props} />\n}\n\nFieldRoot.displayName = 'FieldRoot'\n\n// ============================================================================\n// FieldLabel\n// ============================================================================\n\ntype FieldLabelProps = React.ComponentProps<typeof BaseField.Label>\n\nconst FieldLabel = ({ className, ...props }: FieldLabelProps) => {\n return <BaseField.Label className={cn(labelStyles, className)} {...props} />\n}\n\nFieldLabel.displayName = 'FieldLabel'\n\n// ============================================================================\n// FieldControl\n// ============================================================================\n\ntype FieldControlProps = React.ComponentProps<typeof BaseField.Control>\n\nconst FieldControl = ({ className, ...props }: FieldControlProps) => {\n return <BaseField.Control className={cn(inputBaseStyles, className)} {...props} />\n}\n\nFieldControl.displayName = 'FieldControl'\n\n// ============================================================================\n// FieldDescription\n// ============================================================================\n\ntype FieldDescriptionProps = React.ComponentProps<typeof BaseField.Description>\n\nconst FieldDescription = ({ className, ...props }: FieldDescriptionProps) => {\n return <BaseField.Description className={cn(descriptionStyles, className)} {...props} />\n}\n\nFieldDescription.displayName = 'FieldDescription'\n\n// ============================================================================\n// FieldError\n// ============================================================================\n\ntype FieldErrorProps = React.ComponentProps<typeof BaseField.Error>\n\nconst FieldError = ({ className, ...props }: FieldErrorProps) => {\n return <BaseField.Error className={cn(errorStyles, className)} {...props} />\n}\n\nFieldError.displayName = 'FieldError'\n\n// ============================================================================\n// FieldItem\n// ============================================================================\n\ntype FieldItemProps = React.ComponentProps<typeof BaseField.Item>\n\nconst FieldItem = ({ className, ...props }: FieldItemProps) => {\n return <BaseField.Item className={cn(fieldItemStyles, className)} {...props} />\n}\n\nFieldItem.displayName = 'FieldItem'\n\n// ============================================================================\n// FieldValidity\n// ============================================================================\n\ntype FieldValidityProps = React.ComponentProps<typeof BaseField.Validity>\n\nconst FieldValidity = (props: FieldValidityProps) => {\n return <BaseField.Validity {...props} />\n}\n\nFieldValidity.displayName = 'FieldValidity'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n FieldRoot,\n FieldLabel,\n FieldControl,\n FieldDescription,\n FieldError,\n FieldItem,\n FieldValidity,\n}\n\nexport type {\n FieldRootProps,\n FieldLabelProps,\n FieldControlProps,\n FieldDescriptionProps,\n FieldErrorProps,\n FieldItemProps,\n FieldValidityProps,\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAM,aAAa,EAAE,WAAW,GAAG,YAA4B;AAC7D,QAAO,oBAACA,MAAU;EAAK,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGjF,UAAU,cAAc;AAQxB,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAACA,MAAU;EAAM,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAG9E,WAAW,cAAc;AAQzB,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QAAO,oBAACA,MAAU;EAAQ,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGpF,aAAa,cAAc;AAQ3B,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QAAO,oBAACA,MAAU;EAAY,WAAW,GAAG,mBAAmB,UAAU;EAAE,GAAI;GAAS;;AAG1F,iBAAiB,cAAc;AAQ/B,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAACA,MAAU;EAAM,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAG9E,WAAW,cAAc;AAQzB,MAAM,aAAa,EAAE,WAAW,GAAG,YAA4B;AAC7D,QAAO,oBAACA,MAAU;EAAK,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGjF,UAAU,cAAc;AAQxB,MAAM,iBAAiB,UAA8B;AACnD,QAAO,oBAACA,MAAU,YAAS,GAAI,QAAS;;AAG1C,cAAc,cAAc"}
@@ -1,19 +1,24 @@
1
- import { Fieldset } from '@base-ui/react/fieldset';
2
- import { JSX } from 'react/jsx-runtime';
3
- import * as React_2 from 'react';
4
-
5
- export declare const FieldsetLegend: {
6
- ({ className, ...props }: FieldsetLegendProps): JSX.Element;
7
- displayName: string;
8
- };
9
-
10
- export declare type FieldsetLegendProps = React_2.ComponentProps<typeof Fieldset.Legend>;
11
-
12
- export declare const FieldsetRoot: {
13
- ({ className, ...props }: FieldsetRootProps): JSX.Element;
14
- displayName: string;
15
- };
16
-
17
- export declare type FieldsetRootProps = React_2.ComponentProps<typeof Fieldset.Root>;
18
-
19
- export { }
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime252 from "react/jsx-runtime";
3
+ import { Fieldset } from "@base-ui/react/fieldset";
4
+
5
+ //#region src/components/fieldset.d.ts
6
+ type FieldsetRootProps = React.ComponentProps<typeof Fieldset.Root>;
7
+ declare const FieldsetRoot: {
8
+ ({
9
+ className,
10
+ ...props
11
+ }: FieldsetRootProps): react_jsx_runtime252.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ type FieldsetLegendProps = React.ComponentProps<typeof Fieldset.Legend>;
15
+ declare const FieldsetLegend: {
16
+ ({
17
+ className,
18
+ ...props
19
+ }: FieldsetLegendProps): react_jsx_runtime252.JSX.Element;
20
+ displayName: string;
21
+ };
22
+ //#endregion
23
+ export { FieldsetLegend, type FieldsetLegendProps, FieldsetRoot, type FieldsetRootProps };
24
+ //# sourceMappingURL=fieldset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.d.ts","names":[],"sources":["../src/components/fieldset.tsx"],"sourcesContent":[],"mappings":";;;;;KAYK,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAE5D;;;;KAAyC,oBAAiB,oBAAA,CAAA,GAAA,CAAA;EAF3D,WAAA,EAAA,MAAA;CAAiB;KAiBjB,mBAAA,GAAsB,KAAA,CAAM,cAjBiC,CAAA,OAiBX,QAAA,CAAa,MAjBF,CAAA;cAmB5D,cAnByB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAmBI,mBAnBJ,CAAA,EAmBuB,oBAAA,CAAA,GAAA,CAAA,OAnBvB;EAEvC,WAAA,EAAA,MAOL;CAAA"}
package/dist/fieldset.js CHANGED
@@ -1,19 +1,27 @@
1
- "use client";
2
- import { jsx as s } from "react/jsx-runtime";
3
- import { Fieldset as o } from "@base-ui/react/fieldset";
4
- import { l as r } from "./form-variants-LJ8gIbk0.js";
5
- import { c as l } from "./utils-B6yFEsav.js";
6
- const a = ({ className: e, ...t }) => /* @__PURE__ */ s(
7
- o.Root,
8
- {
9
- className: l("flex flex-col items-start gap-2", e),
10
- ...t
11
- }
12
- );
13
- a.displayName = "FieldsetRoot";
14
- const i = ({ className: e, ...t }) => /* @__PURE__ */ s(o.Legend, { className: l(r, e), ...t });
15
- i.displayName = "FieldsetLegend";
16
- export {
17
- i as FieldsetLegend,
18
- a as FieldsetRoot
1
+ 'use client';
2
+
3
+ import { cn } from "./lib/utils.js";
4
+ import { labelStyles } from "./lib/form-variants.js";
5
+ import "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { Fieldset } from "@base-ui/react/fieldset";
8
+
9
+ //#region src/components/fieldset.tsx
10
+ const FieldsetRoot = ({ className, ...props }) => {
11
+ return /* @__PURE__ */ jsx(Fieldset.Root, {
12
+ className: cn("flex flex-col items-start gap-2", className),
13
+ ...props
14
+ });
19
15
  };
16
+ FieldsetRoot.displayName = "FieldsetRoot";
17
+ const FieldsetLegend = ({ className, ...props }) => {
18
+ return /* @__PURE__ */ jsx(Fieldset.Legend, {
19
+ className: cn(labelStyles, className),
20
+ ...props
21
+ });
22
+ };
23
+ FieldsetLegend.displayName = "FieldsetLegend";
24
+
25
+ //#endregion
26
+ export { FieldsetLegend, FieldsetRoot };
27
+ //# sourceMappingURL=fieldset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.js","names":["BaseFieldset"],"sources":["../src/components/fieldset.tsx"],"sourcesContent":["'use client'\n\nimport { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'\nimport * as React from 'react'\n\nimport { labelStyles } from '../lib/form-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FieldsetRoot\n// ============================================================================\n\ntype FieldsetRootProps = React.ComponentProps<typeof BaseFieldset.Root>\n\nconst FieldsetRoot = ({ className, ...props }: FieldsetRootProps) => {\n return (\n <BaseFieldset.Root\n className={cn('flex flex-col items-start gap-2', className)}\n {...props}\n />\n )\n}\n\nFieldsetRoot.displayName = 'FieldsetRoot'\n\n// ============================================================================\n// FieldsetLegend\n// ============================================================================\n\ntype FieldsetLegendProps = React.ComponentProps<typeof BaseFieldset.Legend>\n\nconst FieldsetLegend = ({ className, ...props }: FieldsetLegendProps) => {\n return <BaseFieldset.Legend className={cn(labelStyles, className)} {...props} />\n}\n\nFieldsetLegend.displayName = 'FieldsetLegend'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { FieldsetRoot, FieldsetLegend }\n\nexport type { FieldsetRootProps, FieldsetLegendProps }\n"],"mappings":";;;;;;;;;AAcA,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QACE,oBAACA,SAAa;EACZ,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,aAAa,cAAc;AAQ3B,MAAM,kBAAkB,EAAE,WAAW,GAAG,YAAiC;AACvE,QAAO,oBAACA,SAAa;EAAO,WAAW,GAAG,aAAa,UAAU;EAAE,GAAI;GAAS;;AAGlF,eAAe,cAAc"}
package/dist/form.d.ts CHANGED
@@ -1,12 +1,16 @@
1
- import { Form } from '@base-ui/react/form';
2
- import { JSX } from 'react/jsx-runtime';
3
- import * as React_2 from 'react';
4
-
5
- export declare const FormRoot: {
6
- ({ className, ...props }: FormRootProps): JSX.Element;
7
- displayName: string;
8
- };
9
-
10
- export declare type FormRootProps = React_2.ComponentProps<typeof Form>;
11
-
12
- export { }
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime273 from "react/jsx-runtime";
3
+ import { Form } from "@base-ui/react/form";
4
+
5
+ //#region src/components/form.d.ts
6
+ type FormRootProps = React.ComponentProps<typeof Form>;
7
+ declare const FormRoot: {
8
+ ({
9
+ className,
10
+ ...props
11
+ }: FormRootProps): react_jsx_runtime273.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ //#endregion
15
+ export { FormRoot, type FormRootProps };
16
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","names":[],"sources":["../src/components/form.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,aAAA,GAAgB,KAAA,CAAM,sBAAsB;cAE3C;;;;KAAqC,gBAAa,oBAAA,CAAA,GAAA,CAAA;EAFnD,WAAA,EAAA,MAAa;CAAA"}
package/dist/form.js CHANGED
@@ -1,9 +1,19 @@
1
- "use client";
2
- import { jsx as m } from "react/jsx-runtime";
3
- import { Form as t } from "@base-ui/react/form";
4
- import { c as e } from "./utils-B6yFEsav.js";
5
- const s = ({ className: o, ...r }) => /* @__PURE__ */ m(t, { className: e("flex flex-col gap-4", o), ...r });
6
- s.displayName = "FormRoot";
7
- export {
8
- s as FormRoot
1
+ 'use client';
2
+
3
+ import { cn } from "./lib/utils.js";
4
+ import "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ import { Form } from "@base-ui/react/form";
7
+
8
+ //#region src/components/form.tsx
9
+ const FormRoot = ({ className, ...props }) => {
10
+ return /* @__PURE__ */ jsx(Form, {
11
+ className: cn("flex flex-col gap-4", className),
12
+ ...props
13
+ });
9
14
  };
15
+ FormRoot.displayName = "FormRoot";
16
+
17
+ //#endregion
18
+ export { FormRoot };
19
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","names":["BaseForm"],"sources":["../src/components/form.tsx"],"sourcesContent":["'use client'\n\nimport { Form as BaseForm } from '@base-ui/react/form'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// FormRoot\n// ============================================================================\n\ntype FormRootProps = React.ComponentProps<typeof BaseForm>\n\nconst FormRoot = ({ className, ...props }: FormRootProps) => {\n return <BaseForm className={cn('flex flex-col gap-4', className)} {...props} />\n}\n\nFormRoot.displayName = 'FormRoot'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { FormRoot }\n\nexport type { FormRootProps }\n"],"mappings":";;;;;;;;AAaA,MAAM,YAAY,EAAE,WAAW,GAAG,YAA2B;AAC3D,QAAO,oBAACA;EAAS,WAAW,GAAG,uBAAuB,UAAU;EAAE,GAAI;GAAS;;AAGjF,SAAS,cAAc"}