@kubetail/ui 0.3.2 → 2.0.0-rc2

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 (232) hide show
  1. package/README.md +2 -1
  2. package/dist/elements/button.cjs +2 -0
  3. package/dist/elements/button.cjs.map +1 -0
  4. package/dist/elements/button.d.ts +18 -0
  5. package/dist/elements/button.js +36 -0
  6. package/dist/elements/button.js.map +1 -0
  7. package/dist/elements/button.stories.d.ts +32 -0
  8. package/dist/elements/calendar.cjs +2 -0
  9. package/dist/elements/calendar.cjs.map +1 -0
  10. package/dist/elements/calendar.d.ts +4 -0
  11. package/dist/elements/{Calendar.js → calendar.js} +4 -4
  12. package/dist/elements/calendar.js.map +1 -0
  13. package/dist/elements/calendar.stories.d.ts +17 -0
  14. package/dist/elements/calendar.test.d.ts +0 -0
  15. package/dist/elements/card.cjs +2 -0
  16. package/dist/elements/card.cjs.map +1 -0
  17. package/dist/elements/card.d.ts +8 -0
  18. package/dist/elements/card.js +57 -0
  19. package/dist/elements/card.js.map +1 -0
  20. package/dist/elements/card.stories.d.ts +15 -0
  21. package/dist/elements/checkbox.cjs +2 -0
  22. package/dist/elements/checkbox.cjs.map +1 -0
  23. package/dist/elements/checkbox.d.ts +3 -0
  24. package/dist/elements/checkbox.js +29 -0
  25. package/dist/elements/checkbox.js.map +1 -0
  26. package/dist/elements/checkbox.stories.d.ts +15 -0
  27. package/dist/elements/checkbox.test.d.ts +0 -0
  28. package/dist/elements/dropdown-menu.cjs +2 -0
  29. package/dist/elements/dropdown-menu.cjs.map +1 -0
  30. package/dist/elements/dropdown-menu.d.ts +25 -0
  31. package/dist/elements/dropdown-menu.js +196 -0
  32. package/dist/elements/dropdown-menu.js.map +1 -0
  33. package/dist/elements/dropdown-menu.stories.d.ts +16 -0
  34. package/dist/elements/dropdown-menu.test.d.ts +0 -0
  35. package/dist/elements/form.cjs +2 -0
  36. package/dist/elements/form.cjs.map +1 -0
  37. package/dist/elements/form.d.ts +23 -0
  38. package/dist/elements/form.js +83 -0
  39. package/dist/elements/form.js.map +1 -0
  40. package/dist/elements/form.stories.d.ts +16 -0
  41. package/dist/elements/form.test.d.ts +0 -0
  42. package/dist/elements/input.cjs +2 -0
  43. package/dist/elements/input.cjs.map +1 -0
  44. package/dist/elements/input.d.ts +2 -0
  45. package/dist/elements/input.js +22 -0
  46. package/dist/elements/input.js.map +1 -0
  47. package/dist/elements/input.stories.d.ts +35 -0
  48. package/dist/elements/input.test.d.ts +0 -0
  49. package/dist/elements/label.cjs +2 -0
  50. package/dist/elements/label.cjs.map +1 -0
  51. package/dist/elements/label.d.ts +3 -0
  52. package/dist/elements/label.js +20 -0
  53. package/dist/elements/label.js.map +1 -0
  54. package/dist/elements/label.stories.d.ts +17 -0
  55. package/dist/elements/popover.cjs +2 -0
  56. package/dist/elements/popover.cjs.map +1 -0
  57. package/dist/elements/popover.d.ts +7 -0
  58. package/dist/elements/popover.js +41 -0
  59. package/dist/elements/popover.js.map +1 -0
  60. package/dist/elements/popover.stories.d.ts +17 -0
  61. package/dist/elements/popover.test.d.ts +0 -0
  62. package/dist/elements/select.cjs +2 -0
  63. package/dist/elements/select.cjs.map +1 -0
  64. package/dist/elements/select.d.ts +14 -0
  65. package/dist/elements/select.js +146 -0
  66. package/dist/elements/select.js.map +1 -0
  67. package/dist/elements/select.stories.d.ts +20 -0
  68. package/dist/elements/select.test.d.ts +0 -0
  69. package/dist/elements/spinner.cjs +2 -0
  70. package/dist/elements/spinner.cjs.map +1 -0
  71. package/dist/elements/spinner.d.ts +7 -0
  72. package/dist/elements/{Spinner.js → spinner.js} +5 -5
  73. package/dist/elements/spinner.js.map +1 -0
  74. package/dist/elements/{Spinner.stories.d.ts → spinner.stories.d.ts} +1 -1
  75. package/dist/elements/table.cjs +2 -0
  76. package/dist/elements/table.cjs.map +1 -0
  77. package/dist/elements/table.d.ts +9 -0
  78. package/dist/elements/table.js +71 -0
  79. package/dist/elements/table.js.map +1 -0
  80. package/dist/elements/table.stories.d.ts +17 -0
  81. package/dist/elements/tabs.cjs +2 -0
  82. package/dist/elements/tabs.cjs.map +1 -0
  83. package/dist/elements/tabs.d.ts +6 -0
  84. package/dist/elements/tabs.js +42 -0
  85. package/dist/elements/tabs.js.map +1 -0
  86. package/dist/elements/tabs.stories.d.ts +18 -0
  87. package/dist/index.css +216 -90
  88. package/package.json +20 -11
  89. package/dist/elements/Alert.cjs +0 -2
  90. package/dist/elements/Alert.cjs.map +0 -1
  91. package/dist/elements/Alert.d.ts +0 -9
  92. package/dist/elements/Alert.js +0 -13
  93. package/dist/elements/Alert.js.map +0 -1
  94. package/dist/elements/Alert.stories.d.ts +0 -11
  95. package/dist/elements/Button.cjs +0 -2
  96. package/dist/elements/Button.cjs.map +0 -1
  97. package/dist/elements/Button.d.ts +0 -9
  98. package/dist/elements/Button.js +0 -44
  99. package/dist/elements/Button.js.map +0 -1
  100. package/dist/elements/Button.stories.d.ts +0 -15
  101. package/dist/elements/Calendar.cjs +0 -2
  102. package/dist/elements/Calendar.cjs.map +0 -1
  103. package/dist/elements/Calendar.d.ts +0 -3
  104. package/dist/elements/Calendar.js.map +0 -1
  105. package/dist/elements/Calendar.stories.d.ts +0 -10
  106. package/dist/elements/Container.cjs +0 -2
  107. package/dist/elements/Container.cjs.map +0 -1
  108. package/dist/elements/Container.d.ts +0 -8
  109. package/dist/elements/Container.js +0 -7
  110. package/dist/elements/Container.js.map +0 -1
  111. package/dist/elements/Container.stories.d.ts +0 -14
  112. package/dist/elements/DataTable/Body.cjs +0 -2
  113. package/dist/elements/DataTable/Body.cjs.map +0 -1
  114. package/dist/elements/DataTable/Body.d.ts +0 -6
  115. package/dist/elements/DataTable/Body.js +0 -8
  116. package/dist/elements/DataTable/Body.js.map +0 -1
  117. package/dist/elements/DataTable/DataCell.cjs +0 -2
  118. package/dist/elements/DataTable/DataCell.cjs.map +0 -1
  119. package/dist/elements/DataTable/DataCell.d.ts +0 -6
  120. package/dist/elements/DataTable/DataCell.js +0 -19
  121. package/dist/elements/DataTable/DataCell.js.map +0 -1
  122. package/dist/elements/DataTable/Header.cjs +0 -2
  123. package/dist/elements/DataTable/Header.cjs.map +0 -1
  124. package/dist/elements/DataTable/Header.d.ts +0 -20
  125. package/dist/elements/DataTable/Header.js +0 -23
  126. package/dist/elements/DataTable/Header.js.map +0 -1
  127. package/dist/elements/DataTable/HeaderCell.cjs +0 -2
  128. package/dist/elements/DataTable/HeaderCell.cjs.map +0 -1
  129. package/dist/elements/DataTable/HeaderCell.d.ts +0 -10
  130. package/dist/elements/DataTable/HeaderCell.js +0 -45
  131. package/dist/elements/DataTable/HeaderCell.js.map +0 -1
  132. package/dist/elements/DataTable/Row.cjs +0 -2
  133. package/dist/elements/DataTable/Row.cjs.map +0 -1
  134. package/dist/elements/DataTable/Row.d.ts +0 -6
  135. package/dist/elements/DataTable/Row.js +0 -7
  136. package/dist/elements/DataTable/Row.js.map +0 -1
  137. package/dist/elements/DataTable/index.cjs +0 -2
  138. package/dist/elements/DataTable/index.cjs.map +0 -1
  139. package/dist/elements/DataTable/index.d.ts +0 -25
  140. package/dist/elements/DataTable/index.js +0 -31
  141. package/dist/elements/DataTable/index.js.map +0 -1
  142. package/dist/elements/DataTable/shared.cjs +0 -2
  143. package/dist/elements/DataTable/shared.cjs.map +0 -1
  144. package/dist/elements/DataTable/shared.d.ts +0 -6
  145. package/dist/elements/DataTable/shared.js +0 -8
  146. package/dist/elements/DataTable/shared.js.map +0 -1
  147. package/dist/elements/DataTable.stories.d.ts +0 -11
  148. package/dist/elements/DropdownMenu.cjs +0 -2
  149. package/dist/elements/DropdownMenu.cjs.map +0 -1
  150. package/dist/elements/DropdownMenu.d.ts +0 -26
  151. package/dist/elements/DropdownMenu.js +0 -125
  152. package/dist/elements/DropdownMenu.js.map +0 -1
  153. package/dist/elements/DropdownMenu.stories.d.ts +0 -9
  154. package/dist/elements/Form.cjs +0 -2
  155. package/dist/elements/Form.cjs.map +0 -1
  156. package/dist/elements/Form.d.ts +0 -22
  157. package/dist/elements/Form.js +0 -29
  158. package/dist/elements/Form.js.map +0 -1
  159. package/dist/elements/Form.stories.d.ts +0 -11
  160. package/dist/elements/FormCheck.cjs +0 -2
  161. package/dist/elements/FormCheck.cjs.map +0 -1
  162. package/dist/elements/FormCheck.d.ts +0 -7
  163. package/dist/elements/FormCheck.js +0 -17
  164. package/dist/elements/FormCheck.js.map +0 -1
  165. package/dist/elements/FormCheck.stories.d.ts +0 -14
  166. package/dist/elements/FormControl.cjs +0 -2
  167. package/dist/elements/FormControl.cjs.map +0 -1
  168. package/dist/elements/FormControl.d.ts +0 -12
  169. package/dist/elements/FormControl.js +0 -19
  170. package/dist/elements/FormControl.js.map +0 -1
  171. package/dist/elements/FormControlFeedback.cjs +0 -2
  172. package/dist/elements/FormControlFeedback.cjs.map +0 -1
  173. package/dist/elements/FormControlFeedback.d.ts +0 -8
  174. package/dist/elements/FormControlFeedback.js +0 -8
  175. package/dist/elements/FormControlFeedback.js.map +0 -1
  176. package/dist/elements/FormControlFeedback.test.d.ts +0 -1
  177. package/dist/elements/FormFeedback.cjs +0 -2
  178. package/dist/elements/FormFeedback.cjs.map +0 -1
  179. package/dist/elements/FormFeedback.d.ts +0 -8
  180. package/dist/elements/FormFeedback.js +0 -8
  181. package/dist/elements/FormFeedback.js.map +0 -1
  182. package/dist/elements/FormFeedback.test.d.ts +0 -1
  183. package/dist/elements/FormFieldset.cjs +0 -2
  184. package/dist/elements/FormFieldset.cjs.map +0 -1
  185. package/dist/elements/FormFieldset.d.ts +0 -2
  186. package/dist/elements/FormFieldset.js +0 -11
  187. package/dist/elements/FormFieldset.js.map +0 -1
  188. package/dist/elements/FormFieldset.test.d.ts +0 -1
  189. package/dist/elements/FormGroup.cjs +0 -2
  190. package/dist/elements/FormGroup.cjs.map +0 -1
  191. package/dist/elements/FormGroup.d.ts +0 -10
  192. package/dist/elements/FormGroup.js +0 -13
  193. package/dist/elements/FormGroup.js.map +0 -1
  194. package/dist/elements/FormGroup.test.d.ts +0 -1
  195. package/dist/elements/FormLabel.cjs +0 -2
  196. package/dist/elements/FormLabel.cjs.map +0 -1
  197. package/dist/elements/FormLabel.d.ts +0 -6
  198. package/dist/elements/FormLabel.js +0 -15
  199. package/dist/elements/FormLabel.js.map +0 -1
  200. package/dist/elements/FormLabel.test.d.ts +0 -1
  201. package/dist/elements/FormOption.cjs +0 -2
  202. package/dist/elements/FormOption.cjs.map +0 -1
  203. package/dist/elements/FormOption.d.ts +0 -2
  204. package/dist/elements/FormOption.js +0 -10
  205. package/dist/elements/FormOption.js.map +0 -1
  206. package/dist/elements/FormSelect.cjs +0 -2
  207. package/dist/elements/FormSelect.cjs.map +0 -1
  208. package/dist/elements/FormSelect.d.ts +0 -5
  209. package/dist/elements/FormSelect.js +0 -13
  210. package/dist/elements/FormSelect.js.map +0 -1
  211. package/dist/elements/Popover.cjs +0 -2
  212. package/dist/elements/Popover.cjs.map +0 -1
  213. package/dist/elements/Popover.d.ts +0 -7
  214. package/dist/elements/Popover.js +0 -26
  215. package/dist/elements/Popover.js.map +0 -1
  216. package/dist/elements/Popover.stories.d.ts +0 -9
  217. package/dist/elements/Spinner.cjs +0 -2
  218. package/dist/elements/Spinner.cjs.map +0 -1
  219. package/dist/elements/Spinner.d.ts +0 -7
  220. package/dist/elements/Spinner.js.map +0 -1
  221. package/dist/elements/Tabs.cjs +0 -2
  222. package/dist/elements/Tabs.cjs.map +0 -1
  223. package/dist/elements/Tabs.d.ts +0 -6
  224. package/dist/elements/Tabs.js +0 -47
  225. package/dist/elements/Tabs.js.map +0 -1
  226. package/dist/elements/Tabs.stories.d.ts +0 -9
  227. /package/dist/elements/{Alert.test.d.ts → button.test.d.ts} +0 -0
  228. /package/dist/elements/{Button.test.d.ts → card.test.d.ts} +0 -0
  229. /package/dist/elements/{Container.test.d.ts → label.test.d.ts} +0 -0
  230. /package/dist/elements/{Form.test.d.ts → spinner.test.d.ts} +0 -0
  231. /package/dist/elements/{FormCheck.test.d.ts → table.test.d.ts} +0 -0
  232. /package/dist/elements/{FormControl.test.d.ts → tabs.test.d.ts} +0 -0
@@ -1,125 +0,0 @@
1
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
- import * as e from "@radix-ui/react-dropdown-menu";
3
- import { ChevronRight as m, Check as p, Circle as c } from "lucide-react";
4
- import { forwardRef as d } from "react";
5
- import { cn as r } from "../lib/utils.js";
6
- const S = e.Root, C = e.Trigger, z = e.Group, R = e.Portal, k = e.Sub, T = e.RadioGroup, u = d(({ className: o, inset: t, children: a, ...s }, i) => /* @__PURE__ */ l(
7
- e.SubTrigger,
8
- {
9
- ref: i,
10
- className: r(
11
- "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
12
- t && "pl-8",
13
- o
14
- ),
15
- ...s,
16
- children: [
17
- a,
18
- /* @__PURE__ */ n(m, { className: "ml-auto" })
19
- ]
20
- }
21
- ));
22
- u.displayName = e.SubTrigger.displayName;
23
- const f = d(({ className: o, ...t }, a) => /* @__PURE__ */ n(
24
- e.SubContent,
25
- {
26
- ref: a,
27
- className: r(
28
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
29
- o
30
- ),
31
- ...t
32
- }
33
- ));
34
- f.displayName = e.SubContent.displayName;
35
- const h = d(({ className: o, sideOffset: t = 4, ...a }, s) => /* @__PURE__ */ n(e.Portal, { children: /* @__PURE__ */ n(
36
- e.Content,
37
- {
38
- ref: s,
39
- sideOffset: t,
40
- className: r(
41
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-md",
42
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
43
- o
44
- ),
45
- ...a
46
- }
47
- ) }));
48
- h.displayName = e.Content.displayName;
49
- const b = d(({ className: o, inset: t, ...a }, s) => /* @__PURE__ */ n(
50
- e.Item,
51
- {
52
- ref: s,
53
- className: r(
54
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
55
- t && "pl-8",
56
- o
57
- ),
58
- ...a
59
- }
60
- ));
61
- b.displayName = e.Item.displayName;
62
- const g = d(({ className: o, children: t, checked: a, ...s }, i) => /* @__PURE__ */ l(
63
- e.CheckboxItem,
64
- {
65
- ref: i,
66
- className: r(
67
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
68
- o
69
- ),
70
- checked: a,
71
- ...s,
72
- children: [
73
- /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(p, { className: "h-4 w-4" }) }) }),
74
- t
75
- ]
76
- }
77
- ));
78
- g.displayName = e.CheckboxItem.displayName;
79
- const N = d(({ className: o, children: t, ...a }, s) => /* @__PURE__ */ l(
80
- e.RadioItem,
81
- {
82
- ref: s,
83
- className: r(
84
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
85
- o
86
- ),
87
- ...a,
88
- children: [
89
- /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(c, { className: "h-2 w-2 fill-current" }) }) }),
90
- t
91
- ]
92
- }
93
- ));
94
- N.displayName = e.RadioItem.displayName;
95
- const w = d(({ className: o, inset: t, ...a }, s) => /* @__PURE__ */ n(
96
- e.Label,
97
- {
98
- ref: s,
99
- className: r("px-2 py-1.5 text-sm font-semibold", t && "pl-8", o),
100
- ...a
101
- }
102
- ));
103
- w.displayName = e.Label.displayName;
104
- const x = d(({ className: o, ...t }, a) => /* @__PURE__ */ n(e.Separator, { ref: a, className: r("-mx-1 my-1 h-px bg-chrome-300", o), ...t }));
105
- x.displayName = e.Separator.displayName;
106
- const y = ({ className: o, ...t }) => /* @__PURE__ */ n("span", { className: r("ml-auto text-xs tracking-widest opacity-60", o), ...t });
107
- y.displayName = "DropdownMenuShortcut";
108
- export {
109
- S as DropdownMenu,
110
- g as DropdownMenuCheckboxItem,
111
- h as DropdownMenuContent,
112
- z as DropdownMenuGroup,
113
- b as DropdownMenuItem,
114
- w as DropdownMenuLabel,
115
- R as DropdownMenuPortal,
116
- T as DropdownMenuRadioGroup,
117
- N as DropdownMenuRadioItem,
118
- x as DropdownMenuSeparator,
119
- y as DropdownMenuShortcut,
120
- k as DropdownMenuSub,
121
- f as DropdownMenuSubContent,
122
- u as DropdownMenuSubTrigger,
123
- C as DropdownMenuTrigger
124
- };
125
- //# sourceMappingURL=DropdownMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownMenu.js","sources":["../../src/elements/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-chrome-100 data-[state=open]:bg-chrome-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\n\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\n\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border border-chrome-300 bg-popover p-1 text-popover-foreground shadow-md',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\n\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\n\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-chrome-100 focus:text-chrome-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\n\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\n\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-chrome-300', className)} {...props} />\n));\n\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n);\n\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAMA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAE/CM,IAAyBC,EAK7B,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAASC,MAC3C,gBAAAC;AAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACD,gBAAAK,EAACC,GAAA,EAAa,WAAU,UAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AACpC,CACD;AAEDV,EAAuB,cAAcN,EAAsB,WAAW;AAEtE,MAAMiB,IAAyBV,EAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAA,GAASC,MAC1B,gBAAAG;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,EAAA;AACN,CACD;AAEDM,EAAuB,cAAcjB,EAAsB,WAAW;AAEtE,MAAMkB,IAAsBX,EAG1B,CAAC,EAAE,WAAAC,GAAW,YAAAW,IAAa,GAAG,GAAGR,EAAA,GAASC,MAC1C,gBAAAG,EAACf,EAAsB,QAAtB,EACC,UAAA,gBAAAe;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,YAAAO;AAAA,IACA,WAAWL;AAAA,MACT;AAAA,MACA;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,EAAA;AACN,GACF,CACD;AAEDO,EAAoB,cAAclB,EAAsB,QAAQ;AAEhE,MAAMoB,IAAmBb,EAKvB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGE,EAAA,GAASC,MACjC,gBAAAG;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,EAAA;AACN,CACD;AAEDS,EAAiB,cAAcpB,EAAsB,KAAK;AAE1D,MAAMqB,IAA2Bd,EAG/B,CAAC,EAAE,WAAAC,GAAW,UAAAE,GAAU,SAAAY,GAAS,GAAGX,KAASC,MAC7C,gBAAAC;AAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAEF,SAAAc;AAAA,IACC,GAAGX;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAI,EAAC,QAAA,EAAK,WAAU,gEACd,UAAA,gBAAAA,EAACf,EAAsB,eAAtB,EACC,UAAA,gBAAAe,EAACQ,GAAA,EAAM,WAAU,UAAA,CAAU,EAAA,CAC7B,GACF;AAAA,MACCb;AAAA,IAAA;AAAA,EAAA;AACH,CACD;AAEDW,EAAyB,cAAcrB,EAAsB,aAAa;AAE1E,MAAMwB,IAAwBjB,EAG5B,CAAC,EAAE,WAAAC,GAAW,UAAAE,GAAU,GAAGC,EAAA,GAASC,MACpC,gBAAAC;AAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAI,EAAC,QAAA,EAAK,WAAU,gEACd,UAAA,gBAAAA,EAACf,EAAsB,eAAtB,EACC,UAAA,gBAAAe,EAACU,GAAA,EAAO,WAAU,uBAAA,CAAuB,EAAA,CAC3C,GACF;AAAA,MACCf;AAAA,IAAA;AAAA,EAAA;AACH,CACD;AAEDc,EAAsB,cAAcxB,EAAsB,UAAU;AAEpE,MAAM0B,IAAoBnB,EAKxB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGE,EAAA,GAASC,MACjC,gBAAAG;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE,EAAG,qCAAqCL,KAAS,QAAQD,CAAS;AAAA,IAC5E,GAAGG;AAAA,EAAA;AACN,CACD;AAEDe,EAAkB,cAAc1B,EAAsB,MAAM;AAE5D,MAAM2B,IAAwBpB,EAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAA,GAASC,MAC1B,gBAAAG,EAACf,EAAsB,WAAtB,EAAgC,KAAAY,GAAU,WAAWE,EAAG,iCAAiCN,CAAS,GAAI,GAAGG,GAAO,CAClH;AAEDgB,EAAsB,cAAc3B,EAAsB,UAAU;AAEpE,MAAM4B,IAAuB,CAAC,EAAE,WAAApB,GAAW,GAAGG,EAAA,MAC5C,gBAAAI,EAAC,QAAA,EAAK,WAAWD,EAAG,8CAA8CN,CAAS,GAAI,GAAGG,EAAA,CAAO;AAG3FiB,EAAqB,cAAc;"}
@@ -1,9 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- tags: string[];
5
- component: import('react').FC<import('@radix-ui/react-dropdown-menu').DropdownMenuProps>;
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Default: Story;
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("react/jsx-runtime"),c=require("react"),n=require("../lib/utils.cjs"),i=require("./FormCheck.cjs"),u=require("./FormControl.cjs"),m=require("./FormFeedback.cjs"),F=require("./FormFieldset.cjs"),a=require("./FormGroup.cjs"),l=require("./FormLabel.cjs"),q=require("./FormOption.cjs"),p=require("./FormSelect.cjs"),d="space-y-8",e=c.forwardRef(({className:r,...o},t)=>s.jsx("form",{...o,ref:t,className:n.cn(d,r)}));e.displayName="Form";const b=Object.assign(e,{Check:i,Control:u,Group:a.default,Feedback:m,Fieldset:F,Label:l,Option:q,Select:p});module.exports=b;
2
- //# sourceMappingURL=Form.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Form.cjs","sources":["../../src/elements/Form.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport FormCheck from './FormCheck';\nimport FormControl from './FormControl';\nimport FormFeedback from './FormFeedback';\nimport FormFieldset from './FormFieldset';\nimport FormGroup from './FormGroup';\nimport FormLabel from './FormLabel';\nimport FormOption from './FormOption';\nimport FormSelect from './FormSelect';\n\nconst baseCls = 'space-y-8';\n\nconst Form = forwardRef(\n ({ className, ...props }: React.ComponentPropsWithoutRef<'form'>, ref: React.ForwardedRef<HTMLFormElement>) => (\n <form {...props} ref={ref} className={cn(baseCls, className)} />\n ),\n);\n\nForm.displayName = 'Form';\n\ntype FormType = typeof Form;\n\nexport interface FormExportType extends FormType {\n Check: typeof FormCheck;\n Control: typeof FormControl;\n Group: typeof FormGroup;\n Feedback: typeof FormFeedback;\n Fieldset: typeof FormFieldset;\n Label: typeof FormLabel;\n Option: typeof FormOption;\n Select: typeof FormSelect;\n}\n\nconst FormExport: FormExportType = Object.assign(Form, {\n Check: FormCheck,\n Control: FormControl,\n Group: FormGroup,\n Feedback: FormFeedback,\n Fieldset: FormFieldset,\n Label: FormLabel,\n Option: FormOption,\n Select: FormSelect,\n});\n\nexport default FormExport;\n"],"names":["baseCls","Form","forwardRef","className","props","ref","jsx","cn","FormExport","FormCheck","FormControl","FormGroup","FormFeedback","FormFieldset","FormLabel","FormOption","FormSelect"],"mappings":"qVA2BMA,EAAU,YAEVC,EAAOC,EAAAA,WACX,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAAiDC,IAChEC,EAAAA,IAAC,OAAA,CAAM,GAAGF,EAAO,IAAAC,EAAU,UAAWE,EAAAA,GAAGP,EAASG,CAAS,CAAA,CAAG,CAElE,EAEAF,EAAK,YAAc,OAenB,MAAMO,EAA6B,OAAO,OAAOP,EAAM,CACrD,MAAOQ,EACP,QAASC,EACT,MAAOC,EAAAA,QACP,SAAUC,EACV,SAAUC,EACV,MAAOC,EACP,OAAQC,EACR,OAAQC,CACV,CAAC"}
@@ -1,22 +0,0 @@
1
- import { default as FormCheck } from './FormCheck';
2
- import { default as FormControl } from './FormControl';
3
- import { default as FormFeedback } from './FormFeedback';
4
- import { default as FormFieldset } from './FormFieldset';
5
- import { default as FormGroup } from './FormGroup';
6
- import { default as FormLabel } from './FormLabel';
7
- import { default as FormOption } from './FormOption';
8
- import { default as FormSelect } from './FormSelect';
9
- declare const Form: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & import('react').RefAttributes<HTMLFormElement>>;
10
- type FormType = typeof Form;
11
- export interface FormExportType extends FormType {
12
- Check: typeof FormCheck;
13
- Control: typeof FormControl;
14
- Group: typeof FormGroup;
15
- Feedback: typeof FormFeedback;
16
- Fieldset: typeof FormFieldset;
17
- Label: typeof FormLabel;
18
- Option: typeof FormOption;
19
- Select: typeof FormSelect;
20
- }
21
- declare const FormExport: FormExportType;
22
- export default FormExport;
@@ -1,29 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import { cn as i } from "../lib/utils.js";
4
- import f from "./FormCheck.js";
5
- import s from "./FormControl.js";
6
- import F from "./FormFeedback.js";
7
- import a from "./FormFieldset.js";
8
- import c from "./FormGroup.js";
9
- import l from "./FormLabel.js";
10
- import n from "./FormOption.js";
11
- import d from "./FormSelect.js";
12
- const b = "space-y-8", o = p(
13
- ({ className: r, ...m }, t) => /* @__PURE__ */ e("form", { ...m, ref: t, className: i(b, r) })
14
- );
15
- o.displayName = "Form";
16
- const N = Object.assign(o, {
17
- Check: f,
18
- Control: s,
19
- Group: c,
20
- Feedback: F,
21
- Fieldset: a,
22
- Label: l,
23
- Option: n,
24
- Select: d
25
- });
26
- export {
27
- N as default
28
- };
29
- //# sourceMappingURL=Form.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Form.js","sources":["../../src/elements/Form.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport FormCheck from './FormCheck';\nimport FormControl from './FormControl';\nimport FormFeedback from './FormFeedback';\nimport FormFieldset from './FormFieldset';\nimport FormGroup from './FormGroup';\nimport FormLabel from './FormLabel';\nimport FormOption from './FormOption';\nimport FormSelect from './FormSelect';\n\nconst baseCls = 'space-y-8';\n\nconst Form = forwardRef(\n ({ className, ...props }: React.ComponentPropsWithoutRef<'form'>, ref: React.ForwardedRef<HTMLFormElement>) => (\n <form {...props} ref={ref} className={cn(baseCls, className)} />\n ),\n);\n\nForm.displayName = 'Form';\n\ntype FormType = typeof Form;\n\nexport interface FormExportType extends FormType {\n Check: typeof FormCheck;\n Control: typeof FormControl;\n Group: typeof FormGroup;\n Feedback: typeof FormFeedback;\n Fieldset: typeof FormFieldset;\n Label: typeof FormLabel;\n Option: typeof FormOption;\n Select: typeof FormSelect;\n}\n\nconst FormExport: FormExportType = Object.assign(Form, {\n Check: FormCheck,\n Control: FormControl,\n Group: FormGroup,\n Feedback: FormFeedback,\n Fieldset: FormFieldset,\n Label: FormLabel,\n Option: FormOption,\n Select: FormSelect,\n});\n\nexport default FormExport;\n"],"names":["baseCls","Form","forwardRef","className","props","ref","jsx","cn","FormExport","FormCheck","FormControl","FormGroup","FormFeedback","FormFieldset","FormLabel","FormOption","FormSelect"],"mappings":";;;;;;;;;;;AA2BA,MAAMA,IAAU,aAEVC,IAAOC;AAAA,EACX,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAAiDC,MAChE,gBAAAC,EAAC,QAAA,EAAM,GAAGF,GAAO,KAAAC,GAAU,WAAWE,EAAGP,GAASG,CAAS,EAAA,CAAG;AAElE;AAEAF,EAAK,cAAc;AAenB,MAAMO,IAA6B,OAAO,OAAOP,GAAM;AAAA,EACrD,OAAOQ;AAAA,EACP,SAASC;AAAAA,EACT,OAAOC;AAAA,EACP,UAAUC;AAAA,EACV,UAAUC;AAAA,EACV,OAAOC;AAAA,EACP,QAAQC;AAAA,EACR,QAAQC;AACV,CAAC;"}
@@ -1,11 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- tags: string[];
5
- component: import('./Form').FormExportType;
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Empty: Story;
10
- export declare const WithData: Story;
11
- export declare const WithErrors: Story;
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),u=require("react"),l=require("../lib/utils.cjs"),f="flex items-center",m="h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50",d="ml-2 block text-sm text-chrome-900",t=u.forwardRef(({as:c="input",className:o,id:s,label:r,...n},i)=>{const a=c;return e.jsxs("div",{className:l.cn(f,o),children:[e.jsx(a,{...n,ref:i,id:s,type:"checkbox",className:m}),r&&e.jsx("label",{htmlFor:s,className:d,children:r})]})});t.displayName="FormCheck";module.exports=t;
2
- //# sourceMappingURL=FormCheck.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormCheck.cjs","sources":["../../src/elements/FormCheck.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\nconst labelBaseCls = 'ml-2 block text-sm text-chrome-900';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n label?: React.ReactNode;\n}\n\nconst FormCheck = forwardRef(\n ({ as = 'input', className, id, label, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n\n return (\n <div className={cn(wrapperBaseCls, className)}>\n <Tag {...props} ref={ref} id={id} type=\"checkbox\" className={inputBaseCls} />\n {label && (\n <label htmlFor={id} className={labelBaseCls}>\n {label}\n </label>\n )}\n </div>\n );\n },\n);\n\nFormCheck.displayName = 'FormCheck';\n\nexport default FormCheck;\n"],"names":["wrapperBaseCls","inputBaseCls","labelBaseCls","FormCheck","forwardRef","as","className","id","label","props","ref","Tag","cn","jsx"],"mappings":"mGAkBMA,EAAiB,oBACjBC,EACJ,+JACIC,EAAe,qCAQfC,EAAYC,EAAAA,WAChB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,GAAAC,EAAI,MAAAC,EAAO,GAAGC,CAAA,EAAgBC,IAA8C,CACtG,MAAMC,EAAMN,EAEZ,cACG,MAAA,CAAI,UAAWO,EAAAA,GAAGZ,EAAgBM,CAAS,EAC1C,SAAA,CAAAO,EAAAA,IAACF,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,GAAAH,EAAQ,KAAK,WAAW,UAAWN,EAAc,EAC1EO,GACCK,EAAAA,IAAC,QAAA,CAAM,QAASN,EAAI,UAAWL,EAC5B,SAAAM,CAAA,CACH,CAAA,EAEJ,CAEJ,CACF,EAEAL,EAAU,YAAc"}
@@ -1,7 +0,0 @@
1
- export interface Props extends React.ComponentPropsWithoutRef<'input'> {
2
- as?: React.ElementType;
3
- id?: string;
4
- label?: React.ReactNode;
5
- }
6
- declare const FormCheck: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
7
- export default FormCheck;
@@ -1,17 +0,0 @@
1
- import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as l } from "react";
3
- import { cn as m } from "../lib/utils.js";
4
- const f = "flex items-center", u = "h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50", p = "ml-2 block text-sm text-chrome-900", d = l(
5
- ({ as: r = "input", className: t, id: e, label: o, ...c }, n) => {
6
- const a = r;
7
- return /* @__PURE__ */ i("div", { className: m(f, t), children: [
8
- /* @__PURE__ */ s(a, { ...c, ref: n, id: e, type: "checkbox", className: u }),
9
- o && /* @__PURE__ */ s("label", { htmlFor: e, className: p, children: o })
10
- ] });
11
- }
12
- );
13
- d.displayName = "FormCheck";
14
- export {
15
- d as default
16
- };
17
- //# sourceMappingURL=FormCheck.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormCheck.js","sources":["../../src/elements/FormCheck.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst wrapperBaseCls = 'flex items-center';\nconst inputBaseCls =\n 'h-4 w-4 rounded border-input ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:opacity-50';\nconst labelBaseCls = 'ml-2 block text-sm text-chrome-900';\n\nexport interface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n label?: React.ReactNode;\n}\n\nconst FormCheck = forwardRef(\n ({ as = 'input', className, id, label, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n\n return (\n <div className={cn(wrapperBaseCls, className)}>\n <Tag {...props} ref={ref} id={id} type=\"checkbox\" className={inputBaseCls} />\n {label && (\n <label htmlFor={id} className={labelBaseCls}>\n {label}\n </label>\n )}\n </div>\n );\n },\n);\n\nFormCheck.displayName = 'FormCheck';\n\nexport default FormCheck;\n"],"names":["wrapperBaseCls","inputBaseCls","labelBaseCls","FormCheck","forwardRef","as","className","id","label","props","ref","Tag","cn","jsx"],"mappings":";;;AAkBA,MAAMA,IAAiB,qBACjBC,IACJ,gKACIC,IAAe,sCAQfC,IAAYC;AAAA,EAChB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,IAAAC,GAAI,OAAAC,GAAO,GAAGC,EAAA,GAAgBC,MAA8C;AACtG,UAAMC,IAAMN;AAEZ,6BACG,OAAA,EAAI,WAAWO,EAAGZ,GAAgBM,CAAS,GAC1C,UAAA;AAAA,MAAA,gBAAAO,EAACF,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,IAAAH,GAAQ,MAAK,YAAW,WAAWN,GAAc;AAAA,MAC1EO,KACC,gBAAAK,EAAC,SAAA,EAAM,SAASN,GAAI,WAAWL,GAC5B,UAAAM,EAAA,CACH;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEAL,EAAU,cAAc;"}
@@ -1,14 +0,0 @@
1
- import { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- tags: string[];
5
- component: import('react').ForwardRefExoticComponent<import('./FormCheck').Props & import('react').RefAttributes<HTMLInputElement>>;
6
- args: {
7
- label: string;
8
- };
9
- };
10
- export default meta;
11
- type Story = StoryObj<typeof meta>;
12
- export declare const Default: Story;
13
- export declare const Checked: Story;
14
- export declare const Disabled: Story;
@@ -1,2 +0,0 @@
1
- "use strict";const d=require("react/jsx-runtime"),o=require("react"),l=require("../lib/utils.cjs"),a=require("./FormGroup.cjs"),f=require("./FormControlFeedback.cjs"),b="flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium",e=o.forwardRef(({as:r="input",className:t,id:n,...s},c)=>{const i=r,{controlId:u}=o.useContext(a.Context);return d.jsx(i,{...s,ref:c,id:n||u,className:l.cn(b,t)})});e.displayName="FormControl";const m=Object.assign(e,{Feedback:f});module.exports=m;
2
- //# sourceMappingURL=FormControl.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormControl.cjs","sources":["../../src/elements/FormControl.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium';\n\ninterface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n}\n\nconst FormControl = forwardRef(\n ({ as = 'input', className, id, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormControl.displayName = 'FormControl';\n\ntype FormControlType = typeof FormControl;\n\ninterface FormControlExportType extends FormControlType {\n Feedback: typeof FormControlFeedback;\n}\n\nconst FormControlExport: FormControlExportType = Object.assign(FormControl, {\n Feedback: FormControlFeedback,\n});\n\nexport default FormControlExport;\n"],"names":["baseCls","FormControl","forwardRef","as","className","id","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn","FormControlExport","FormControlFeedback"],"mappings":"uKAqBMA,EACJ,6UAOIC,EAAcC,EAAAA,WAClB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,GAAAC,EAAI,GAAGC,CAAA,EAAgBC,IAA8C,CAC/F,MAAMC,EAAML,EACN,CAAE,UAAAM,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAACJ,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,GAAIF,GAAMI,EAAW,UAAWI,EAAAA,GAAGb,EAASI,CAAS,CAAA,CAAG,CAC3F,CACF,EAEAH,EAAY,YAAc,cAQ1B,MAAMa,EAA2C,OAAO,OAAOb,EAAa,CAC1E,SAAUc,CACZ,CAAC"}
@@ -1,12 +0,0 @@
1
- import { default as FormControlFeedback } from './FormControlFeedback';
2
- interface Props extends React.ComponentPropsWithoutRef<'input'> {
3
- as?: React.ElementType;
4
- id?: string;
5
- }
6
- declare const FormControl: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLInputElement>>;
7
- type FormControlType = typeof FormControl;
8
- interface FormControlExportType extends FormControlType {
9
- Feedback: typeof FormControlFeedback;
10
- }
11
- declare const FormControlExport: FormControlExportType;
12
- export default FormControlExport;
@@ -1,19 +0,0 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as l, useContext as a } from "react";
3
- import { cn as c } from "../lib/utils.js";
4
- import { Context as m } from "./FormGroup.js";
5
- import u from "./FormControlFeedback.js";
6
- const p = "flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium", o = l(
7
- ({ as: r = "input", className: t, id: e, ...n }, s) => {
8
- const f = r, { controlId: i } = a(m);
9
- return /* @__PURE__ */ d(f, { ...n, ref: s, id: e || i, className: c(p, t) });
10
- }
11
- );
12
- o.displayName = "FormControl";
13
- const k = Object.assign(o, {
14
- Feedback: u
15
- });
16
- export {
17
- k as default
18
- };
19
- //# sourceMappingURL=FormControl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormControl.js","sources":["../../src/elements/FormControl.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\nimport FormControlFeedback from './FormControlFeedback';\n\nconst baseCls =\n 'flex h-10 w-full rounded border border-input bg-background px-3 py-2 text-sm placeholder:text-muted-foreground ring-offset-background focus:outline-none focus:border-input focus:ring focus:ring-ring focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 file:border-0 file:bg-transparent file:text-sm file:font-medium';\n\ninterface Props extends React.ComponentPropsWithoutRef<'input'> {\n as?: React.ElementType;\n id?: string;\n}\n\nconst FormControl = forwardRef(\n ({ as = 'input', className, id, ...props }: Props, ref: React.ForwardedRef<HTMLInputElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} id={id || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormControl.displayName = 'FormControl';\n\ntype FormControlType = typeof FormControl;\n\ninterface FormControlExportType extends FormControlType {\n Feedback: typeof FormControlFeedback;\n}\n\nconst FormControlExport: FormControlExportType = Object.assign(FormControl, {\n Feedback: FormControlFeedback,\n});\n\nexport default FormControlExport;\n"],"names":["baseCls","FormControl","forwardRef","as","className","id","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn","FormControlExport","FormControlFeedback"],"mappings":";;;;;AAqBA,MAAMA,IACJ,8UAOIC,IAAcC;AAAA,EAClB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,IAAAC,GAAI,GAAGC,EAAA,GAAgBC,MAA8C;AAC/F,UAAMC,IAAML,GACN,EAAE,WAAAM,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,WAAO,gBAAAC,EAACJ,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,IAAIF,KAAMI,GAAW,WAAWI,EAAGb,GAASI,CAAS,EAAA,CAAG;AAAA,EAC3F;AACF;AAEAH,EAAY,cAAc;AAQ1B,MAAMa,IAA2C,OAAO,OAAOb,GAAa;AAAA,EAC1E,UAAUc;AACZ,CAAC;"}
@@ -1,2 +0,0 @@
1
- "use strict";const n=require("react/jsx-runtime"),c=require("../lib/utils.cjs"),a="text-sm font-medium text-danger !-mb-6",e=({as:t="div",className:s,...o})=>{const r=t;return n.jsx(r,{...o,className:c.cn(a,s)})};e.displayName="FormControlFeedback";module.exports=e;
2
- //# sourceMappingURL=FormControlFeedback.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormControlFeedback.cjs","sources":["../../src/elements/FormControlFeedback.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'text-sm font-medium text-danger !-mb-6';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n as?: React.ElementType;\n}\n\nconst FormControlFeedback = ({ as = 'div', className, ...props }: Props) => {\n const Tag = as;\n\n return <Tag {...props} className={cn(baseCls, className)} />;\n};\n\nFormControlFeedback.displayName = 'FormControlFeedback';\n\nexport default FormControlFeedback;\n"],"names":["baseCls","FormControlFeedback","as","className","props","Tag","jsx","cn"],"mappings":"gFAgBMA,EAAU,yCAMVC,EAAsB,CAAC,CAAE,GAAAC,EAAK,MAAO,UAAAC,EAAW,GAAGC,KAAmB,CAC1E,MAAMC,EAAMH,EAEZ,OAAOI,EAAAA,IAACD,GAAK,GAAGD,EAAO,UAAWG,KAAGP,EAASG,CAAS,EAAG,CAC5D,EAEAF,EAAoB,YAAc"}
@@ -1,8 +0,0 @@
1
- interface Props extends React.ComponentPropsWithoutRef<'div'> {
2
- as?: React.ElementType;
3
- }
4
- declare const FormControlFeedback: {
5
- ({ as, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
6
- displayName: string;
7
- };
8
- export default FormControlFeedback;
@@ -1,8 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { cn as m } from "../lib/utils.js";
3
- const r = "text-sm font-medium text-danger !-mb-6", s = ({ as: o = "div", className: t, ...e }) => /* @__PURE__ */ a(o, { ...e, className: m(r, t) });
4
- s.displayName = "FormControlFeedback";
5
- export {
6
- s as default
7
- };
8
- //# sourceMappingURL=FormControlFeedback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormControlFeedback.js","sources":["../../src/elements/FormControlFeedback.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'text-sm font-medium text-danger !-mb-6';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n as?: React.ElementType;\n}\n\nconst FormControlFeedback = ({ as = 'div', className, ...props }: Props) => {\n const Tag = as;\n\n return <Tag {...props} className={cn(baseCls, className)} />;\n};\n\nFormControlFeedback.displayName = 'FormControlFeedback';\n\nexport default FormControlFeedback;\n"],"names":["baseCls","FormControlFeedback","as","className","props","jsx","cn"],"mappings":";;AAgBA,MAAMA,IAAU,0CAMVC,IAAsB,CAAC,EAAE,IAAAC,IAAK,OAAO,WAAAC,GAAW,GAAGC,QAGhD,gBAAAC,EAFKH,KAEC,GAAGE,GAAO,WAAWE,EAAGN,GAASG,CAAS,GAAG;AAG5DF,EAAoB,cAAc;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("react/jsx-runtime"),n=require("../lib/utils.cjs"),m="text-base font-medium text-danger !mt-0 !-mb-4",e=({as:s="div",className:t,...r})=>{const a=s;return c.jsx(a,{...r,className:n.cn(m,t)})};e.displayName="FormFeedback";module.exports=e;
2
- //# sourceMappingURL=FormFeedback.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormFeedback.cjs","sources":["../../src/elements/FormFeedback.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'text-base font-medium text-danger !mt-0 !-mb-4';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n as?: React.ElementType;\n}\n\nconst FormFeedback = ({ as = 'div', className, ...props }: Props) => {\n const Tag = as;\n\n return <Tag {...props} className={cn(baseCls, className)} />;\n};\n\nFormFeedback.displayName = 'FormFeedback';\n\nexport default FormFeedback;\n"],"names":["baseCls","FormFeedback","as","className","props","Tag","jsx","cn"],"mappings":"gFAgBMA,EAAU,iDAMVC,EAAe,CAAC,CAAE,GAAAC,EAAK,MAAO,UAAAC,EAAW,GAAGC,KAAmB,CACnE,MAAMC,EAAMH,EAEZ,OAAOI,EAAAA,IAACD,GAAK,GAAGD,EAAO,UAAWG,KAAGP,EAASG,CAAS,EAAG,CAC5D,EAEAF,EAAa,YAAc"}
@@ -1,8 +0,0 @@
1
- interface Props extends React.ComponentPropsWithoutRef<'div'> {
2
- as?: React.ElementType;
3
- }
4
- declare const FormFeedback: {
5
- ({ as, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
6
- displayName: string;
7
- };
8
- export default FormFeedback;
@@ -1,8 +0,0 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { cn as o } from "../lib/utils.js";
3
- const s = "text-base font-medium text-danger !mt-0 !-mb-4", r = ({ as: e = "div", className: t, ...a }) => /* @__PURE__ */ m(e, { ...a, className: o(s, t) });
4
- r.displayName = "FormFeedback";
5
- export {
6
- r as default
7
- };
8
- //# sourceMappingURL=FormFeedback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormFeedback.js","sources":["../../src/elements/FormFeedback.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'text-base font-medium text-danger !mt-0 !-mb-4';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n as?: React.ElementType;\n}\n\nconst FormFeedback = ({ as = 'div', className, ...props }: Props) => {\n const Tag = as;\n\n return <Tag {...props} className={cn(baseCls, className)} />;\n};\n\nFormFeedback.displayName = 'FormFeedback';\n\nexport default FormFeedback;\n"],"names":["baseCls","FormFeedback","as","className","props","jsx","cn"],"mappings":";;AAgBA,MAAMA,IAAU,kDAMVC,IAAe,CAAC,EAAE,IAAAC,IAAK,OAAO,WAAAC,GAAW,GAAGC,QAGzC,gBAAAC,EAFKH,KAEC,GAAGE,GAAO,WAAWE,EAAGN,GAASG,CAAS,GAAG;AAG5DF,EAAa,cAAc;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";const c=require("react/jsx-runtime"),i=require("react"),o=require("../lib/utils.cjs"),a="space-y-8",e=i.forwardRef(({className:s,...t},r)=>c.jsx("fieldset",{...t,ref:r,className:o.cn(a,s)}));e.displayName="FormFieldset";module.exports=e;
2
- //# sourceMappingURL=FormFieldset.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormFieldset.cjs","sources":["../../src/elements/FormFieldset.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'space-y-8';\n\nconst FormFieldset = forwardRef(\n (\n { className, ...props }: React.ComponentPropsWithoutRef<'fieldset'>,\n ref: React.ForwardedRef<HTMLFieldSetElement>,\n ) => <fieldset {...props} ref={ref} className={cn(baseCls, className)} />,\n);\n\nFormFieldset.displayName = 'FormFieldset';\n\nexport default FormFieldset;\n"],"names":["baseCls","FormFieldset","forwardRef","className","props","ref","jsx","cn"],"mappings":"mGAkBMA,EAAU,YAEVC,EAAeC,EAAAA,WACnB,CACE,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAChBC,IACGC,EAAAA,IAAC,WAAA,CAAU,GAAGF,EAAO,IAAAC,EAAU,UAAWE,EAAAA,GAAGP,EAASG,CAAS,CAAA,CAAG,CACzE,EAEAF,EAAa,YAAc"}
@@ -1,2 +0,0 @@
1
- declare const FormFieldset: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref"> & import('react').RefAttributes<HTMLFieldSetElement>>;
2
- export default FormFieldset;
@@ -1,11 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as m } from "react";
3
- import { cn as t } from "../lib/utils.js";
4
- const a = "space-y-8", f = m(
5
- ({ className: e, ...s }, o) => /* @__PURE__ */ r("fieldset", { ...s, ref: o, className: t(a, e) })
6
- );
7
- f.displayName = "FormFieldset";
8
- export {
9
- f as default
10
- };
11
- //# sourceMappingURL=FormFieldset.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormFieldset.js","sources":["../../src/elements/FormFieldset.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nconst baseCls = 'space-y-8';\n\nconst FormFieldset = forwardRef(\n (\n { className, ...props }: React.ComponentPropsWithoutRef<'fieldset'>,\n ref: React.ForwardedRef<HTMLFieldSetElement>,\n ) => <fieldset {...props} ref={ref} className={cn(baseCls, className)} />,\n);\n\nFormFieldset.displayName = 'FormFieldset';\n\nexport default FormFieldset;\n"],"names":["baseCls","FormFieldset","forwardRef","className","props","ref","jsx","cn"],"mappings":";;;AAkBA,MAAMA,IAAU,aAEVC,IAAeC;AAAA,EACnB,CACE,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAChBC,MACG,gBAAAC,EAAC,YAAA,EAAU,GAAGF,GAAO,KAAAC,GAAU,WAAWE,EAAGP,GAASG,CAAS,EAAA,CAAG;AACzE;AAEAF,EAAa,cAAc;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),e=require("react"),i=require("../lib/utils.cjs"),s=e.createContext({}),l="space-y-1",o=e.forwardRef(({className:u,controlId:t,...n},c)=>{const a=e.useMemo(()=>({controlId:t}),[t]);return r.jsx(s.Provider,{value:a,children:r.jsx("div",{...n,ref:c,className:i.cn(l,u)})})});o.displayName="FormGroup";exports.Context=s;exports.default=o;
2
- //# sourceMappingURL=FormGroup.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormGroup.cjs","sources":["../../src/elements/FormGroup.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, forwardRef, useMemo } from 'react';\n\nimport { cn } from '@/lib/utils';\n\ntype ContextState = {\n controlId: string | undefined;\n};\n\nconst Context = createContext({} as ContextState); // for passing `controlId`\nconst baseCls = 'space-y-1';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n controlId?: string;\n}\n\nconst FormGroup = forwardRef(({ className, controlId, ...props }: Props, ref: React.ForwardedRef<HTMLDivElement>) => {\n const context = useMemo(() => ({ controlId }), [controlId]);\n\n return (\n <Context.Provider value={context}>\n <div {...props} ref={ref} className={cn(baseCls, className)} />\n </Context.Provider>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport { Context };\nexport default FormGroup;\n"],"names":["Context","createContext","baseCls","FormGroup","forwardRef","className","controlId","props","ref","context","useMemo","jsx","cn"],"mappings":"kMAsBMA,EAAUC,EAAAA,cAAc,CAAA,CAAkB,EAC1CC,EAAU,YAMVC,EAAYC,EAAAA,WAAW,CAAC,CAAE,UAAAC,EAAW,UAAAC,EAAW,GAAGC,CAAA,EAAgBC,IAA4C,CACnH,MAAMC,EAAUC,EAAAA,QAAQ,KAAO,CAAE,UAAAJ,IAAc,CAACA,CAAS,CAAC,EAE1D,aACGN,EAAQ,SAAR,CAAiB,MAAOS,EACvB,SAAAE,MAAC,MAAA,CAAK,GAAGJ,EAAO,IAAAC,EAAU,UAAWI,EAAAA,GAAGV,EAASG,CAAS,EAAG,EAC/D,CAEJ,CAAC,EAEDF,EAAU,YAAc"}
@@ -1,10 +0,0 @@
1
- type ContextState = {
2
- controlId: string | undefined;
3
- };
4
- declare const Context: import('react').Context<ContextState>;
5
- interface Props extends React.ComponentPropsWithoutRef<'div'> {
6
- controlId?: string;
7
- }
8
- declare const FormGroup: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
9
- export { Context };
10
- export default FormGroup;
@@ -1,13 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { createContext as m, forwardRef as c, useMemo as n } from "react";
3
- import { cn as p } from "../lib/utils.js";
4
- const i = m({}), f = "space-y-1", u = c(({ className: r, controlId: o, ...t }, s) => {
5
- const a = n(() => ({ controlId: o }), [o]);
6
- return /* @__PURE__ */ e(i.Provider, { value: a, children: /* @__PURE__ */ e("div", { ...t, ref: s, className: p(f, r) }) });
7
- });
8
- u.displayName = "FormGroup";
9
- export {
10
- i as Context,
11
- u as default
12
- };
13
- //# sourceMappingURL=FormGroup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormGroup.js","sources":["../../src/elements/FormGroup.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { createContext, forwardRef, useMemo } from 'react';\n\nimport { cn } from '@/lib/utils';\n\ntype ContextState = {\n controlId: string | undefined;\n};\n\nconst Context = createContext({} as ContextState); // for passing `controlId`\nconst baseCls = 'space-y-1';\n\ninterface Props extends React.ComponentPropsWithoutRef<'div'> {\n controlId?: string;\n}\n\nconst FormGroup = forwardRef(({ className, controlId, ...props }: Props, ref: React.ForwardedRef<HTMLDivElement>) => {\n const context = useMemo(() => ({ controlId }), [controlId]);\n\n return (\n <Context.Provider value={context}>\n <div {...props} ref={ref} className={cn(baseCls, className)} />\n </Context.Provider>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport { Context };\nexport default FormGroup;\n"],"names":["Context","createContext","baseCls","FormGroup","forwardRef","className","controlId","props","ref","context","useMemo","jsx","cn"],"mappings":";;;AAsBA,MAAMA,IAAUC,EAAc,CAAA,CAAkB,GAC1CC,IAAU,aAMVC,IAAYC,EAAW,CAAC,EAAE,WAAAC,GAAW,WAAAC,GAAW,GAAGC,EAAA,GAAgBC,MAA4C;AACnH,QAAMC,IAAUC,EAAQ,OAAO,EAAE,WAAAJ,MAAc,CAACA,CAAS,CAAC;AAE1D,2BACGN,EAAQ,UAAR,EAAiB,OAAOS,GACvB,UAAA,gBAAAE,EAAC,OAAA,EAAK,GAAGJ,GAAO,KAAAC,GAAU,WAAWI,EAAGV,GAASG,CAAS,GAAG,GAC/D;AAEJ,CAAC;AAEDF,EAAU,cAAc;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";const i=require("react/jsx-runtime"),e=require("react"),u=require("../lib/utils.cjs"),d=require("./FormGroup.cjs"),m="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t=e.forwardRef(({as:o="label",className:r,htmlFor:s,...n},a)=>{const c=o,{controlId:l}=e.useContext(d.Context);return i.jsx(c,{...n,ref:a,htmlFor:s||l,className:u.cn(m,r)})});t.displayName="FormLabel";module.exports=t;
2
- //# sourceMappingURL=FormLabel.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLabel.cjs","sources":["../../src/elements/FormLabel.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":"gIAoBMA,EAAU,6FAOVC,EAAYC,EAAAA,WAChB,CAAC,CAAE,GAAAC,EAAK,QAAS,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAA,EAAgBC,IAA8C,CACpG,MAAMC,EAAML,EACN,CAAE,UAAAM,CAAA,EAAcC,EAAAA,WAAWC,SAAgB,EAEjD,OAAOC,EAAAA,IAACJ,EAAA,CAAK,GAAGF,EAAO,IAAAC,EAAU,QAASF,GAAWI,EAAW,UAAWI,EAAAA,GAAGb,EAASI,CAAS,CAAA,CAAG,CACrG,CACF,EAEAH,EAAU,YAAc"}
@@ -1,6 +0,0 @@
1
- interface Props extends React.ComponentPropsWithoutRef<'label'> {
2
- as?: React.ElementType;
3
- htmlFor?: string;
4
- }
5
- declare const FormLabel: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLLabelElement>>;
6
- export default FormLabel;
@@ -1,15 +0,0 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as n, useContext as d } from "react";
3
- import { cn as i } from "../lib/utils.js";
4
- import { Context as c } from "./FormGroup.js";
5
- const p = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", f = n(
6
- ({ as: o = "label", className: e, htmlFor: t, ...r }, a) => {
7
- const m = o, { controlId: s } = d(c);
8
- return /* @__PURE__ */ l(m, { ...r, ref: a, htmlFor: t || s, className: i(p, e) });
9
- }
10
- );
11
- f.displayName = "FormLabel";
12
- export {
13
- f as default
14
- };
15
- //# sourceMappingURL=FormLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLabel.js","sources":["../../src/elements/FormLabel.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef, useContext } from 'react';\n\nimport { cn } from '@/lib/utils';\n\nimport { Context as FormGroupContext } from './FormGroup';\n\nconst baseCls = 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70';\n\ninterface Props extends React.ComponentPropsWithoutRef<'label'> {\n as?: React.ElementType;\n htmlFor?: string;\n}\n\nconst FormLabel = forwardRef(\n ({ as = 'label', className, htmlFor, ...props }: Props, ref: React.ForwardedRef<HTMLLabelElement>) => {\n const Tag = as;\n const { controlId } = useContext(FormGroupContext);\n\n return <Tag {...props} ref={ref} htmlFor={htmlFor || controlId} className={cn(baseCls, className)} />;\n },\n);\n\nFormLabel.displayName = 'FormLabel';\n\nexport default FormLabel;\n"],"names":["baseCls","FormLabel","forwardRef","as","className","htmlFor","props","ref","Tag","controlId","useContext","FormGroupContext","jsx","cn"],"mappings":";;;;AAoBA,MAAMA,IAAU,8FAOVC,IAAYC;AAAA,EAChB,CAAC,EAAE,IAAAC,IAAK,SAAS,WAAAC,GAAW,SAAAC,GAAS,GAAGC,EAAA,GAAgBC,MAA8C;AACpG,UAAMC,IAAML,GACN,EAAE,WAAAM,EAAA,IAAcC,EAAWC,CAAgB;AAEjD,WAAO,gBAAAC,EAACJ,GAAA,EAAK,GAAGF,GAAO,KAAAC,GAAU,SAASF,KAAWI,GAAW,WAAWI,EAAGb,GAASI,CAAS,EAAA,CAAG;AAAA,EACrG;AACF;AAEAH,EAAU,cAAc;"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("react/jsx-runtime"),i=require("react"),o=i.forwardRef(({className:r,...t},e)=>s.jsx("option",{...t,ref:e,className:r}));o.displayName="FormOption";module.exports=o;
2
- //# sourceMappingURL=FormOption.cjs.map