@omer-x/tailwind-ui-kit 1.0.0-alpha.4 → 1.0.0-alpha.40

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 (250) hide show
  1. package/MIGRATION.md +283 -0
  2. package/README.md +1440 -0
  3. package/dist/components/button/BaseButton.d.ts +40 -12
  4. package/dist/components/button/BaseButton.js +35 -51
  5. package/dist/components/button/BaseToggle.d.ts +35 -0
  6. package/dist/components/button/BaseToggle.js +23 -0
  7. package/dist/components/button/BaseToggleGroup.d.ts +26 -0
  8. package/dist/components/button/BaseToggleGroup.js +12 -0
  9. package/dist/components/button/buttonStyles.d.ts +3 -0
  10. package/dist/components/button/buttonStyles.js +29 -0
  11. package/dist/components/button/index.d.ts +4 -4
  12. package/dist/components/button/index.js +4 -4
  13. package/dist/components/dialog/BaseAlertDialog.d.ts +49 -0
  14. package/dist/components/dialog/BaseAlertDialog.js +27 -0
  15. package/dist/components/dialog/BaseAlertDialogTrigger.d.ts +16 -0
  16. package/dist/components/dialog/BaseAlertDialogTrigger.js +11 -0
  17. package/dist/components/dialog/BaseDialog.d.ts +58 -0
  18. package/dist/components/dialog/BaseDialog.js +24 -0
  19. package/dist/components/dialog/BaseDialogClose.d.ts +13 -0
  20. package/dist/components/dialog/BaseDialogClose.js +7 -0
  21. package/dist/components/dialog/BaseDialogDescription.d.ts +8 -0
  22. package/dist/components/dialog/BaseDialogDescription.js +7 -0
  23. package/dist/components/dialog/BaseDialogPopup.d.ts +41 -0
  24. package/dist/components/dialog/BaseDialogPopup.js +29 -0
  25. package/dist/components/dialog/BaseDialogTitle.d.ts +8 -0
  26. package/dist/components/dialog/BaseDialogTitle.js +11 -0
  27. package/dist/components/dialog/BaseDialogTrigger.d.ts +20 -0
  28. package/dist/components/dialog/BaseDialogTrigger.js +11 -0
  29. package/dist/components/dialog/createAlertDialogHandle.d.ts +14 -0
  30. package/dist/components/dialog/createAlertDialogHandle.js +11 -0
  31. package/dist/components/dialog/createDialogHandle.d.ts +36 -0
  32. package/dist/components/dialog/createDialogHandle.js +31 -0
  33. package/dist/components/dialog/index.d.ts +8 -5
  34. package/dist/components/dialog/index.js +5 -8
  35. package/dist/components/disclosure/BaseAccordion.d.ts +48 -0
  36. package/dist/components/disclosure/BaseAccordion.js +18 -0
  37. package/dist/components/disclosure/BaseAccordionItem.d.ts +20 -0
  38. package/dist/components/disclosure/BaseAccordionItem.js +10 -0
  39. package/dist/components/disclosure/BaseAccordionPanel.d.ts +20 -0
  40. package/dist/components/disclosure/BaseAccordionPanel.js +15 -0
  41. package/dist/components/disclosure/BaseAccordionTrigger.d.ts +22 -0
  42. package/dist/components/disclosure/BaseAccordionTrigger.js +23 -0
  43. package/dist/components/disclosure/BaseCollapsible.d.ts +33 -0
  44. package/dist/components/disclosure/BaseCollapsible.js +16 -0
  45. package/dist/components/disclosure/BaseCollapsiblePanel.d.ts +20 -0
  46. package/dist/components/disclosure/BaseCollapsiblePanel.js +15 -0
  47. package/dist/components/disclosure/BaseCollapsibleTrigger.d.ts +15 -0
  48. package/dist/components/disclosure/BaseCollapsibleTrigger.js +16 -0
  49. package/dist/components/disclosure/index.d.ts +6 -0
  50. package/dist/components/disclosure/index.js +3 -0
  51. package/dist/components/disclosure/panelTransition.d.ts +7 -0
  52. package/dist/components/disclosure/panelTransition.js +9 -0
  53. package/dist/components/display/BaseAvatar.d.ts +24 -0
  54. package/dist/components/display/BaseAvatar.js +35 -0
  55. package/dist/components/display/BaseAvatarFallback.d.ts +14 -0
  56. package/dist/components/display/BaseAvatarFallback.js +14 -0
  57. package/dist/components/display/BaseAvatarImage.d.ts +23 -0
  58. package/dist/components/display/BaseAvatarImage.js +14 -0
  59. package/dist/components/display/BaseMeter.d.ts +60 -0
  60. package/dist/components/display/BaseMeter.js +45 -0
  61. package/dist/components/display/BaseMeterIndicator.d.ts +9 -0
  62. package/dist/components/display/BaseMeterIndicator.js +12 -0
  63. package/dist/components/display/BaseMeterLabel.d.ts +9 -0
  64. package/dist/components/display/BaseMeterLabel.js +7 -0
  65. package/dist/components/display/BaseMeterTrack.d.ts +12 -0
  66. package/dist/components/display/BaseMeterTrack.js +12 -0
  67. package/dist/components/display/BaseMeterValue.d.ts +14 -0
  68. package/dist/components/display/BaseMeterValue.js +10 -0
  69. package/dist/components/display/barStyles.d.ts +5 -0
  70. package/dist/components/display/barStyles.js +20 -0
  71. package/dist/components/display/index.d.ts +4 -0
  72. package/dist/components/display/index.js +3 -0
  73. package/dist/components/elements/JustAnchor.d.ts +7 -0
  74. package/dist/components/elements/JustAnchor.js +11 -0
  75. package/dist/components/elements/JustButton.d.ts +7 -0
  76. package/dist/components/elements/JustButton.js +11 -0
  77. package/dist/components/elements/JustDiv.d.ts +7 -0
  78. package/dist/components/elements/JustDiv.js +11 -0
  79. package/dist/components/elements/JustInput.d.ts +7 -0
  80. package/dist/components/elements/JustInput.js +11 -0
  81. package/dist/components/elements/JustSpan.d.ts +7 -0
  82. package/dist/components/elements/JustSpan.js +11 -0
  83. package/dist/components/elements/index.d.ts +6 -0
  84. package/dist/components/elements/index.js +6 -0
  85. package/dist/components/form/BaseAutocomplete.d.ts +198 -0
  86. package/dist/components/form/BaseAutocomplete.js +49 -0
  87. package/dist/components/form/BaseAutocompleteClear.d.ts +18 -0
  88. package/dist/components/form/BaseAutocompleteClear.js +7 -0
  89. package/dist/components/form/BaseAutocompleteCollection.d.ts +8 -0
  90. package/dist/components/form/BaseAutocompleteCollection.js +7 -0
  91. package/dist/components/form/BaseAutocompleteEmpty.d.ts +11 -0
  92. package/dist/components/form/BaseAutocompleteEmpty.js +10 -0
  93. package/dist/components/form/BaseAutocompleteGroup.d.ts +10 -0
  94. package/dist/components/form/BaseAutocompleteGroup.js +7 -0
  95. package/dist/components/form/BaseAutocompleteGroupLabel.d.ts +8 -0
  96. package/dist/components/form/BaseAutocompleteGroupLabel.js +7 -0
  97. package/dist/components/form/BaseAutocompleteIcon.d.ts +8 -0
  98. package/dist/components/form/BaseAutocompleteIcon.js +7 -0
  99. package/dist/components/form/BaseAutocompleteInput.d.ts +12 -0
  100. package/dist/components/form/BaseAutocompleteInput.js +12 -0
  101. package/dist/components/form/BaseAutocompleteInputGroup.d.ts +9 -0
  102. package/dist/components/form/BaseAutocompleteInputGroup.js +11 -0
  103. package/dist/components/form/BaseAutocompleteItem.d.ts +20 -0
  104. package/dist/components/form/BaseAutocompleteItem.js +11 -0
  105. package/dist/components/form/BaseAutocompleteList.d.ts +14 -0
  106. package/dist/components/form/BaseAutocompleteList.js +11 -0
  107. package/dist/components/form/BaseAutocompletePopup.d.ts +111 -0
  108. package/dist/components/form/BaseAutocompletePopup.js +45 -0
  109. package/dist/components/form/BaseAutocompleteRow.d.ts +8 -0
  110. package/dist/components/form/BaseAutocompleteRow.js +7 -0
  111. package/dist/components/form/BaseAutocompleteSeparator.d.ts +13 -0
  112. package/dist/components/form/BaseAutocompleteSeparator.js +7 -0
  113. package/dist/components/form/BaseAutocompleteStatus.d.ts +11 -0
  114. package/dist/components/form/BaseAutocompleteStatus.js +10 -0
  115. package/dist/components/form/BaseAutocompleteTrigger.d.ts +11 -0
  116. package/dist/components/form/BaseAutocompleteTrigger.js +7 -0
  117. package/dist/components/form/BaseAutocompleteValue.d.ts +8 -0
  118. package/dist/components/form/BaseAutocompleteValue.js +7 -0
  119. package/dist/components/form/BaseCheckbox.d.ts +49 -0
  120. package/dist/components/form/BaseCheckbox.js +31 -0
  121. package/dist/components/form/BaseCheckboxGroup.d.ts +24 -0
  122. package/dist/components/form/BaseCheckboxGroup.js +20 -0
  123. package/dist/components/form/BaseFieldset.d.ts +21 -0
  124. package/dist/components/form/BaseFieldset.js +18 -0
  125. package/dist/components/form/BaseForm.d.ts +13 -0
  126. package/dist/components/form/BaseForm.js +78 -0
  127. package/dist/components/form/BaseFormField.d.ts +33 -0
  128. package/dist/components/form/BaseFormField.js +33 -0
  129. package/dist/components/form/BaseInput.d.ts +8 -0
  130. package/dist/components/form/BaseInput.js +12 -0
  131. package/dist/components/form/BaseRadio.d.ts +30 -0
  132. package/dist/components/form/BaseRadio.js +22 -0
  133. package/dist/components/form/BaseRadioGroup.d.ts +28 -0
  134. package/dist/components/form/BaseRadioGroup.js +21 -0
  135. package/dist/components/form/BaseSwitch.d.ts +35 -0
  136. package/dist/components/form/BaseSwitch.js +21 -0
  137. package/dist/components/form/ClientSideError.d.ts +9 -0
  138. package/dist/components/form/ClientSideError.js +39 -0
  139. package/dist/components/form/FieldRoot.d.ts +8 -0
  140. package/dist/components/form/FieldRoot.js +25 -0
  141. package/dist/components/form/FormContext.d.ts +28 -0
  142. package/dist/components/form/FormContext.js +12 -0
  143. package/dist/components/form/InsideFieldContext.d.ts +2 -0
  144. package/dist/components/form/InsideFieldContext.js +5 -0
  145. package/dist/components/form/ServerSideError.d.ts +8 -0
  146. package/dist/components/form/ServerSideError.js +15 -0
  147. package/dist/components/form/autocompleteTypes.d.ts +16 -0
  148. package/dist/components/form/autocompleteTypes.js +1 -0
  149. package/dist/components/form/index.d.ts +21 -0
  150. package/dist/components/form/index.js +13 -0
  151. package/dist/components/form/inputSizes.d.ts +11 -0
  152. package/dist/components/form/inputSizes.js +19 -0
  153. package/dist/components/form/useAutocompleteFilter.d.ts +19 -0
  154. package/dist/components/form/useAutocompleteFilter.js +12 -0
  155. package/dist/components/form/useFormMessages.d.ts +10 -0
  156. package/dist/components/form/useFormMessages.js +16 -0
  157. package/dist/components/layout/Container.d.ts +4 -10
  158. package/dist/components/layout/Container.js +9 -10
  159. package/dist/components/layout/index.d.ts +2 -3
  160. package/dist/components/layout/index.js +1 -4
  161. package/dist/components/menu/BaseContextMenu.d.ts +150 -0
  162. package/dist/components/menu/BaseContextMenu.js +38 -0
  163. package/dist/components/menu/BaseContextMenuTrigger.d.ts +15 -0
  164. package/dist/components/menu/BaseContextMenuTrigger.js +10 -0
  165. package/dist/components/menu/BaseMenu.d.ts +171 -0
  166. package/dist/components/menu/BaseMenu.js +62 -0
  167. package/dist/components/menu/BaseMenuArrow.d.ts +19 -0
  168. package/dist/components/menu/BaseMenuArrow.js +10 -0
  169. package/dist/components/menu/BaseMenuCheckboxItem.d.ts +37 -0
  170. package/dist/components/menu/BaseMenuCheckboxItem.js +25 -0
  171. package/dist/components/menu/BaseMenuClear.d.ts +16 -0
  172. package/dist/components/menu/BaseMenuClear.js +10 -0
  173. package/dist/components/menu/BaseMenuEmpty.d.ts +8 -0
  174. package/dist/components/menu/BaseMenuEmpty.js +7 -0
  175. package/dist/components/menu/BaseMenuGroup.d.ts +8 -0
  176. package/dist/components/menu/BaseMenuGroup.js +7 -0
  177. package/dist/components/menu/BaseMenuGroupLabel.d.ts +8 -0
  178. package/dist/components/menu/BaseMenuGroupLabel.js +11 -0
  179. package/dist/components/menu/BaseMenuInput.d.ts +15 -0
  180. package/dist/components/menu/BaseMenuInput.js +10 -0
  181. package/dist/components/menu/BaseMenuItem.d.ts +24 -0
  182. package/dist/components/menu/BaseMenuItem.js +12 -0
  183. package/dist/components/menu/BaseMenuLinkItem.d.ts +20 -0
  184. package/dist/components/menu/BaseMenuLinkItem.js +12 -0
  185. package/dist/components/menu/BaseMenuList.d.ts +11 -0
  186. package/dist/components/menu/BaseMenuList.js +14 -0
  187. package/dist/components/menu/BaseMenuPopup.d.ts +116 -0
  188. package/dist/components/menu/BaseMenuPopup.js +42 -0
  189. package/dist/components/menu/BaseMenuRadioGroup.d.ts +19 -0
  190. package/dist/components/menu/BaseMenuRadioGroup.js +10 -0
  191. package/dist/components/menu/BaseMenuRadioItem.d.ts +36 -0
  192. package/dist/components/menu/BaseMenuRadioItem.js +24 -0
  193. package/dist/components/menu/BaseMenuSeparator.d.ts +11 -0
  194. package/dist/components/menu/BaseMenuSeparator.js +11 -0
  195. package/dist/components/menu/BaseMenuSubmenu.d.ts +13 -0
  196. package/dist/components/menu/BaseMenuSubmenu.js +22 -0
  197. package/dist/components/menu/BaseMenuSubmenuTrigger.d.ts +43 -0
  198. package/dist/components/menu/BaseMenuSubmenuTrigger.js +20 -0
  199. package/dist/components/menu/BaseMenuTrigger.d.ts +26 -0
  200. package/dist/components/menu/BaseMenuTrigger.js +11 -0
  201. package/dist/components/menu/BaseMenuViewport.d.ts +18 -0
  202. package/dist/components/menu/BaseMenuViewport.js +11 -0
  203. package/dist/components/menu/BaseMenubar.d.ts +187 -0
  204. package/dist/components/menu/BaseMenubar.js +18 -0
  205. package/dist/components/menu/createMenuHandle.d.ts +30 -0
  206. package/dist/components/menu/createMenuHandle.js +27 -0
  207. package/dist/components/menu/index.d.ts +20 -0
  208. package/dist/components/menu/index.js +5 -0
  209. package/dist/components/menu/menuItemStyles.d.ts +6 -0
  210. package/dist/components/menu/menuItemStyles.js +27 -0
  211. package/dist/components/menu/menuTypes.d.ts +69 -0
  212. package/dist/components/menu/menuTypes.js +16 -0
  213. package/dist/components/page/Pagination.d.ts +27 -0
  214. package/dist/components/page/Pagination.js +68 -0
  215. package/dist/components/page/index.d.ts +3 -0
  216. package/dist/components/page/index.js +3 -0
  217. package/dist/components/page/usePagination.d.ts +30 -0
  218. package/dist/components/page/usePagination.js +41 -0
  219. package/dist/components/table/TableCell.d.ts +13 -0
  220. package/dist/components/table/TableCell.js +17 -0
  221. package/dist/components/table/Tdx.d.ts +6 -10
  222. package/dist/components/table/Tdx.js +11 -9
  223. package/dist/components/table/index.d.ts +3 -3
  224. package/dist/components/table/index.js +3 -4
  225. package/dist/hooks/index.d.ts +2 -0
  226. package/dist/hooks/index.js +1 -0
  227. package/dist/hooks/useRipples.d.ts +2 -5
  228. package/dist/hooks/useRipples.js +44 -32
  229. package/dist/utils/cn.d.ts +6 -5
  230. package/dist/utils/cn.js +8 -6
  231. package/dist/utils/dirty-form.d.ts +7 -0
  232. package/dist/utils/dirty-form.js +40 -0
  233. package/dist/utils/index.d.ts +3 -2
  234. package/dist/utils/index.js +2 -3
  235. package/dist/utils/render.d.ts +31 -0
  236. package/dist/utils/render.js +24 -0
  237. package/dist/utils/split-class-name.d.ts +15 -0
  238. package/dist/utils/split-class-name.js +18 -0
  239. package/package.json +64 -26
  240. package/typescript-badge.d.ts +4 -0
  241. package/dist/components/button/PulseButton.d.ts +0 -10
  242. package/dist/components/button/PulseButton.js +0 -24
  243. package/dist/components/dialog/AnimatedPopup.d.ts +0 -6
  244. package/dist/components/dialog/AnimatedPopup.js +0 -34
  245. package/dist/components/dialog/DialogBackdrop.d.ts +0 -6
  246. package/dist/components/dialog/DialogBackdrop.js +0 -26
  247. package/dist/components/dialog/DialogTitle.d.ts +0 -6
  248. package/dist/components/dialog/DialogTitle.js +0 -19
  249. package/dist/styles/ripple.module.css +0 -10
  250. package/dist/styles/ripple.module.d.ts +0 -2
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { CheckboxGroup } from "@base-ui/react/checkbox-group";
3
+ import { Field } from "@base-ui/react/field";
4
+ import { cn } from "cn";
5
+ import { jsx } from "react/jsx-runtime";
6
+ // src/components/form/BaseCheckboxGroup.tsx
7
+ const BaseCheckboxGroup = ({ name, onValueChange, className, ...otherProps }) => {
8
+ const group = /* @__PURE__ */ jsx(CheckboxGroup, {
9
+ ...otherProps,
10
+ onValueChange: onValueChange && ((value, details) => onValueChange(value, details.event)),
11
+ className: cn("flex flex-col gap-2", className)
12
+ });
13
+ if (!name) return group;
14
+ return /* @__PURE__ */ jsx(Field.Root, {
15
+ name,
16
+ className: "contents",
17
+ children: group
18
+ });
19
+ };
20
+ export { BaseCheckboxGroup as default };
@@ -0,0 +1,21 @@
1
+ import { RenderProp } from "../../utils/render.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+ export type FieldsetState = {
4
+ disabled: boolean;
5
+ };
6
+ type BaseFieldsetProps = ComponentProps<"fieldset"> & {
7
+ render?: RenderProp<"fieldset", FieldsetState>;
8
+ /** The fieldset's caption, rendered before the children. It labels the fieldset for assistive technology. */
9
+ legend?: ReactNode;
10
+ /** Classes for the legend. */
11
+ legendClassName?: string;
12
+ /** Render another element for the legend. It stays linked to the fieldset through `aria-labelledby`. */
13
+ renderLegend?: RenderProp<"div", FieldsetState>;
14
+ /** Disables every control inside, including the ones in a `BaseFormField`. */
15
+ disabled?: boolean;
16
+ };
17
+ /**
18
+ * A `<fieldset>` that groups related controls under a stylable legend.
19
+ */
20
+ declare const BaseFieldset: ({ legend, legendClassName, renderLegend, className, children, ...otherProps }: BaseFieldsetProps) => import("react").JSX.Element;
21
+ export { BaseFieldset as default };
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { Fieldset } from "@base-ui/react/fieldset";
3
+ import { cn } from "cn";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ // src/components/form/BaseFieldset.tsx
6
+ /**
7
+ * A `<fieldset>` that groups related controls under a stylable legend.
8
+ */
9
+ const BaseFieldset = ({ legend, legendClassName, renderLegend, className, children, ...otherProps }) => /* @__PURE__ */ jsxs(Fieldset.Root, {
10
+ ...otherProps,
11
+ className: cn("flex min-w-0 flex-col gap-3", className),
12
+ children: [typeof legend !== "undefined" && /* @__PURE__ */ jsx(Fieldset.Legend, {
13
+ render: renderLegend,
14
+ className: cn("font-semibold", legendClassName),
15
+ children: legend
16
+ }), children]
17
+ });
18
+ export { BaseFieldset as default };
@@ -0,0 +1,13 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ import { MessageFormatter } from "./FormContext.js";
3
+ import { FormAction, FormActionState } from "@omer-x/next-form-actions";
4
+ type BaseFormProps<Data> = Omit<ComponentPropsWithoutRef<"form">, "action"> & {
5
+ action: FormAction<Data>;
6
+ formatMessage?: MessageFormatter;
7
+ defaultValues?: Record<string, unknown>;
8
+ onlyDirty?: boolean;
9
+ resetOnSuccess?: boolean;
10
+ onResult?: (result: FormActionState<Data>) => void;
11
+ };
12
+ declare const BaseForm: <Data>({ action, formatMessage, defaultValues, onlyDirty, resetOnSuccess, onResult, onSubmit, children, ...otherProps }: BaseFormProps<Data>) => import("react").JSX.Element;
13
+ export { BaseForm as default };
@@ -0,0 +1,78 @@
1
+ "use client";
2
+ import { Form } from "@base-ui/react/form";
3
+ import { Fragment, startTransition, useActionState, useRef } from "react";
4
+ import { getDirtyFormData } from "../../utils/dirty-form.js";
5
+ import { FormContext } from "./FormContext.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/components/form/BaseForm.tsx
8
+ const INITIAL_STATE = {
9
+ result: { status: "idle" },
10
+ submissionId: 0,
11
+ resetCount: 0
12
+ };
13
+ const NO_FIELD_ERRORS = {};
14
+ const formatAsIs = (code) => code;
15
+ const BaseForm = ({ action, formatMessage = formatAsIs, defaultValues = {}, onlyDirty = false, resetOnSuccess = false, onResult, onSubmit, children, ...otherProps }) => {
16
+ const submit = async (previous, formData) => {
17
+ const result = await action(previous.result, formData);
18
+ onResult?.(result);
19
+ return {
20
+ result,
21
+ submissionId: previous.submissionId + 1,
22
+ resetCount: resetOnSuccess && result.status === "success" ? previous.resetCount + 1 : previous.resetCount
23
+ };
24
+ };
25
+ const [{ result: state, submissionId, resetCount }, formAction, pending] = useActionState(submit, INITIAL_STATE);
26
+ const fieldsRef = useRef(/* @__PURE__ */ new Set());
27
+ const registerField = (fieldName) => {
28
+ fieldsRef.current.add(fieldName);
29
+ };
30
+ const unregisterField = (fieldName) => {
31
+ fieldsRef.current.delete(fieldName);
32
+ };
33
+ const fieldErrors = state.status === "failure" ? state.fieldErrors : NO_FIELD_ERRORS;
34
+ const mountedFieldErrors = {};
35
+ const messages = [];
36
+ if (state.status === "failure" && state.message) messages.push({
37
+ key: "message",
38
+ type: state.message.type,
39
+ text: formatMessage(state.message.text)
40
+ });
41
+ for (const [fieldName, errors] of Object.entries(fieldErrors)) {
42
+ const texts = errors.map((error) => formatMessage(error.code, error.params));
43
+ if (fieldsRef.current.has(fieldName)) mountedFieldErrors[fieldName] = texts;
44
+ else texts.forEach((text, index) => {
45
+ messages.push({
46
+ key: `field:${fieldName}:${index}`,
47
+ type: "error",
48
+ text
49
+ });
50
+ });
51
+ }
52
+ return /* @__PURE__ */ jsx(Form, {
53
+ ...otherProps,
54
+ errors: mountedFieldErrors,
55
+ onSubmit: (e) => {
56
+ e.stopPropagation();
57
+ onSubmit?.(e);
58
+ if (e.defaultPrevented) return;
59
+ e.preventDefault();
60
+ const form = e.currentTarget;
61
+ const formData = onlyDirty ? getDirtyFormData(form, defaultValues) : new FormData(form, e.nativeEvent.submitter);
62
+ startTransition(() => formAction(formData));
63
+ },
64
+ children: /* @__PURE__ */ jsx(FormContext, {
65
+ value: {
66
+ fieldErrors,
67
+ messages,
68
+ submissionId,
69
+ formatMessage,
70
+ pending,
71
+ registerField,
72
+ unregisterField
73
+ },
74
+ children: /* @__PURE__ */ jsx(Fragment, { children }, resetCount)
75
+ })
76
+ });
77
+ };
78
+ export { BaseForm as default };
@@ -0,0 +1,33 @@
1
+ import { RenderProp } from "../../utils/render.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+ import { ZodType } from "zod";
4
+ export type FieldState = {
5
+ disabled: boolean;
6
+ /** The control has lost focus at least once. */
7
+ touched: boolean;
8
+ /** The value differs from the initial one. */
9
+ dirty: boolean;
10
+ /** `null` until the field is validated. */
11
+ valid: boolean | null;
12
+ filled: boolean;
13
+ focused: boolean;
14
+ };
15
+ /** The native constraints read from the field's schema. */
16
+ export type FieldConstraints = Pick<ComponentProps<"input">, "type" | "required" | "minLength" | "maxLength" | "min" | "max">;
17
+ type BaseFormFieldProps = {
18
+ schema: ZodType;
19
+ name: string;
20
+ label?: string;
21
+ control?: RenderProp<"input", FieldState>;
22
+ /**
23
+ * Renders a control that isn't a single `<input>` (e.g. `BaseAutocomplete`) instead of `control`.
24
+ * Gets the constraints read from `schema`; pass on the ones the control supports.
25
+ * The control takes the field's `name` by itself.
26
+ */
27
+ children?: (constraints: FieldConstraints) => ReactNode;
28
+ renderLabel?: RenderProp<"label", FieldState>;
29
+ renderErrors?: RenderProp<"div", FieldState>;
30
+ className?: string;
31
+ };
32
+ declare const BaseFormField: ({ schema, name, label, control, children, renderLabel, renderErrors, className }: BaseFormFieldProps) => import("react").JSX.Element;
33
+ export { BaseFormField as default };
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { getFieldConstraints } from "@omer-x/zod-to-form-constraints";
4
+ import { cn } from "cn";
5
+ import ClientSideError from "./ClientSideError.js";
6
+ import FieldRoot from "./FieldRoot.js";
7
+ import ServerSideError from "./ServerSideError.js";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ // src/components/form/BaseFormField.tsx
10
+ const BaseFormField = ({ schema, name, label, control, children, renderLabel, renderErrors, className }) => /* @__PURE__ */ jsxs(FieldRoot, {
11
+ name,
12
+ className: cn("flex w-full flex-col items-start gap-1", className),
13
+ children: [
14
+ typeof label !== "undefined" && /* @__PURE__ */ jsx(Field.Label, {
15
+ render: renderLabel,
16
+ children: label
17
+ }),
18
+ children ? children(getFieldConstraints(schema)) : /* @__PURE__ */ jsx(Field.Control, {
19
+ name,
20
+ render: control,
21
+ ...getFieldConstraints(schema)
22
+ }),
23
+ /* @__PURE__ */ jsx(ClientSideError, {
24
+ schema,
25
+ render: renderErrors
26
+ }),
27
+ /* @__PURE__ */ jsx(ServerSideError, {
28
+ name,
29
+ render: renderErrors
30
+ })
31
+ ]
32
+ });
33
+ export { BaseFormField as default };
@@ -0,0 +1,8 @@
1
+ import { ComponentProps } from "react";
2
+ import JustInput from "../elements/JustInput.js";
3
+ import { InputSize } from "./inputSizes.js";
4
+ type BaseInputProps = Omit<ComponentProps<typeof JustInput>, "size"> & {
5
+ size?: InputSize;
6
+ };
7
+ declare const BaseInput: ({ size, className, ...otherProps }: BaseInputProps) => import("react").JSX.Element;
8
+ export { BaseInput as default };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { cn } from "cn";
3
+ import "react";
4
+ import JustInput from "../elements/JustInput.js";
5
+ import { inputBaseClasses, inputSizeClasses } from "./inputSizes.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/components/form/BaseInput.tsx
8
+ const BaseInput = ({ size = "md", className, ...otherProps }) => /* @__PURE__ */ jsx(JustInput, {
9
+ ...otherProps,
10
+ className: cn(inputSizeClasses(size), inputBaseClasses, className)
11
+ });
12
+ export { BaseInput as default };
@@ -0,0 +1,30 @@
1
+ import { RenderProp } from "../../utils/render.js";
2
+ import { ComponentProps, ReactNode, Ref } from "react";
3
+ export type RadioState = {
4
+ checked: boolean;
5
+ disabled: boolean;
6
+ readOnly: boolean;
7
+ required: boolean;
8
+ };
9
+ type BaseRadioProps = Omit<ComponentProps<"span">, "onChange" | "defaultValue"> & {
10
+ label: ReactNode;
11
+ /** Submitted under the group's `name` when this radio is selected. */
12
+ value: string;
13
+ render?: RenderProp<"span", RadioState>;
14
+ /** Classes for the `<label>` around the radio and its text. */
15
+ labelClassName?: string;
16
+ /** Shown inside the radio when selected, e.g. a dot. */
17
+ icon?: ReactNode;
18
+ renderIndicator?: RenderProp<"span", RadioState>;
19
+ /** Keep the indicator in the DOM when not selected, e.g. to animate it out with CSS. */
20
+ keepIndicatorMounted?: boolean;
21
+ disabled?: boolean;
22
+ readOnly?: boolean;
23
+ required?: boolean;
24
+ /** A ref to the hidden `<input>` of this radio. */
25
+ inputRef?: Ref<HTMLInputElement>;
26
+ /** Set to `true` when `render` renders a `<button>`. */
27
+ nativeButton?: boolean;
28
+ };
29
+ declare const BaseRadio: ({ label, labelClassName, icon, renderIndicator, keepIndicatorMounted, className, ...otherProps }: BaseRadioProps) => import("react").JSX.Element;
30
+ export { BaseRadio as default };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { Radio } from "@base-ui/react/radio";
4
+ import { cn } from "cn";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ // src/components/form/BaseRadio.tsx
7
+ const BaseRadio = ({ label, labelClassName, icon, renderIndicator, keepIndicatorMounted, className, ...otherProps }) => /* @__PURE__ */ jsxs(Field.Item, {
8
+ disabled: otherProps.disabled,
9
+ render: /* @__PURE__ */ jsx("label", {}),
10
+ className: cn("flex items-center gap-2 text-sm font-normal", labelClassName),
11
+ children: [/* @__PURE__ */ jsx(Radio.Root, {
12
+ ...otherProps,
13
+ className: cn("flex", "size-4", "shrink-0", "items-center", "justify-center", "rounded-full", "transition-colors", "duration-150", "ease-[ease]", "focus-visible:outline-2", "focus-visible:outline-offset-2", className),
14
+ children: /* @__PURE__ */ jsx(Radio.Indicator, {
15
+ keepMounted: keepIndicatorMounted,
16
+ className: "flex size-full items-center justify-center",
17
+ render: renderIndicator,
18
+ children: icon
19
+ })
20
+ }), label]
21
+ });
22
+ export { BaseRadio as default };
@@ -0,0 +1,28 @@
1
+ import { ComponentProps, Ref } from "react";
2
+ import { RenderProp } from "../../utils/render.js";
3
+ export type RadioGroupState = {
4
+ disabled: boolean;
5
+ readOnly: boolean;
6
+ required: boolean;
7
+ };
8
+ type BaseRadioGroupProps = Omit<ComponentProps<"div">, "onChange" | "defaultValue"> & {
9
+ render?: RenderProp<"div", RadioGroupState>;
10
+ /** Submitted name of the group. The selected radio's `value` is sent under it. */
11
+ name?: string;
12
+ /** The `value` of the selected radio, when controlled. */
13
+ value?: string;
14
+ /** The `value` of the radio selected at first. */
15
+ defaultValue?: string;
16
+ /** Called with the selected radio's `value` and the DOM event that changed it. */
17
+ onValueChange?: (value: string, event: Event) => void;
18
+ disabled?: boolean;
19
+ readOnly?: boolean;
20
+ /** The user must select a radio before the form submits. */
21
+ required?: boolean;
22
+ /** The `id` of a `<form>` to submit with, when the group isn't inside it. */
23
+ form?: string;
24
+ /** A ref to the hidden `<input>` of the selected (or first enabled) radio. */
25
+ inputRef?: Ref<HTMLInputElement>;
26
+ };
27
+ declare const BaseRadioGroup: ({ onValueChange, className, ...otherProps }: BaseRadioGroupProps) => import("react").JSX.Element;
28
+ export { BaseRadioGroup as default };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { RadioGroup } from "@base-ui/react/radio-group";
4
+ import { cn } from "cn";
5
+ import { use } from "react";
6
+ import { InsideFieldContext } from "./InsideFieldContext.js";
7
+ import { jsx } from "react/jsx-runtime";
8
+ // src/components/form/BaseRadioGroup.tsx
9
+ const BaseRadioGroup = ({ onValueChange, className, ...otherProps }) => {
10
+ const group = /* @__PURE__ */ jsx(RadioGroup, {
11
+ ...otherProps,
12
+ onValueChange: onValueChange && ((value, details) => onValueChange(value, details.event)),
13
+ className: cn("flex flex-col gap-2", className)
14
+ });
15
+ if (use(InsideFieldContext)) return group;
16
+ return /* @__PURE__ */ jsx(Field.Root, {
17
+ className: "contents",
18
+ children: group
19
+ });
20
+ };
21
+ export { BaseRadioGroup as default };
@@ -0,0 +1,35 @@
1
+ import { ComponentProps, ReactNode, Ref } from "react";
2
+ import { RenderProp } from "../../utils/render.js";
3
+ export type SwitchState = {
4
+ checked: boolean;
5
+ disabled: boolean;
6
+ readOnly: boolean;
7
+ required: boolean;
8
+ };
9
+ type BaseSwitchProps = Omit<ComponentProps<"span">, "onChange" | "defaultChecked" | "defaultValue"> & {
10
+ label: ReactNode;
11
+ render?: RenderProp<"span", SwitchState>;
12
+ /** Classes for the `<label>` around the switch and its text. */
13
+ labelClassName?: string;
14
+ renderThumb?: RenderProp<"span", SwitchState>;
15
+ name?: string;
16
+ /** Submitted when checked. */
17
+ value?: string;
18
+ /** Submitted when unchecked. */
19
+ uncheckedValue?: string;
20
+ checked?: boolean;
21
+ defaultChecked?: boolean;
22
+ /** Called with the new state and the DOM event that changed it. */
23
+ onCheckedChange?: (checked: boolean, event: Event) => void;
24
+ disabled?: boolean;
25
+ readOnly?: boolean;
26
+ required?: boolean;
27
+ /** The `id` of a `<form>` to submit with, when the switch isn't inside it. */
28
+ form?: string;
29
+ /** A ref to the hidden `<input>` that holds the value. */
30
+ inputRef?: Ref<HTMLInputElement>;
31
+ /** Set to `true` when `render` renders a `<button>`. */
32
+ nativeButton?: boolean;
33
+ };
34
+ declare const BaseSwitch: ({ label, labelClassName, renderThumb, onCheckedChange, value, uncheckedValue, className, ...otherProps }: BaseSwitchProps) => import("react").JSX.Element;
35
+ export { BaseSwitch as default };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { Switch } from "@base-ui/react/switch";
3
+ import { cn } from "cn";
4
+ import "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ // src/components/form/BaseSwitch.tsx
7
+ const BaseSwitch = ({ label, labelClassName, renderThumb, onCheckedChange, value = "true", uncheckedValue = "false", className, ...otherProps }) => /* @__PURE__ */ jsxs("label", {
8
+ className: cn("flex items-center gap-2 text-sm font-normal", labelClassName),
9
+ children: [/* @__PURE__ */ jsx(Switch.Root, {
10
+ ...otherProps,
11
+ value,
12
+ uncheckedValue,
13
+ onCheckedChange: onCheckedChange && ((checked, details) => onCheckedChange(checked, details.event)),
14
+ className: cn("flex", "h-5", "w-9", "shrink-0", "p-0.5", "transition-colors", "duration-150", "ease-[ease]", "focus-visible:outline-2", "focus-visible:outline-offset-2", className),
15
+ children: /* @__PURE__ */ jsx(Switch.Thumb, {
16
+ className: cn("size-3.5", "transition-[translate,background-color]", "duration-150", "ease-[ease]", "data-checked:translate-x-4"),
17
+ render: renderThumb
18
+ })
19
+ }), label]
20
+ });
21
+ export { BaseSwitch as default };
@@ -0,0 +1,9 @@
1
+ import { FieldState } from "./BaseFormField.js";
2
+ import { RenderProp } from "../../utils/render.js";
3
+ import { ZodType } from "zod";
4
+ type ClientSideErrorProps = {
5
+ schema: ZodType;
6
+ render?: RenderProp<"div", FieldState>;
7
+ };
8
+ declare const ClientSideError: ({ schema, render }: ClientSideErrorProps) => import("react").JSX.Element[];
9
+ export { ClientSideError as default };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { getErrorMessagePayload } from "@omer-x/zod-to-form-constraints";
4
+ import { use } from "react";
5
+ import { FormContext } from "./FormContext.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/components/form/ClientSideError.tsx
8
+ const VALIDITY_STATES = [
9
+ "valueMissing",
10
+ "typeMismatch",
11
+ "patternMismatch",
12
+ "tooShort",
13
+ "tooLong",
14
+ "rangeUnderflow",
15
+ "rangeOverflow",
16
+ "stepMismatch",
17
+ "badInput"
18
+ ];
19
+ const PARAM_NAMES = {
20
+ tooShort: "minimum",
21
+ rangeUnderflow: "minimum",
22
+ tooLong: "maximum",
23
+ rangeOverflow: "maximum"
24
+ };
25
+ const FormattedError = ({ schema, state }) => {
26
+ const { formatMessage } = use(FormContext);
27
+ const paramName = PARAM_NAMES[state];
28
+ if (!paramName) return formatMessage(state);
29
+ return formatMessage(state, { [paramName]: getErrorMessagePayload(schema, state) });
30
+ };
31
+ const ClientSideError = ({ schema, render }) => VALIDITY_STATES.map((state) => /* @__PURE__ */ jsx(Field.Error, {
32
+ match: state,
33
+ render,
34
+ children: /* @__PURE__ */ jsx(FormattedError, {
35
+ schema,
36
+ state
37
+ })
38
+ }, state));
39
+ export { ClientSideError as default };
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from "react";
2
+ type FieldRootProps = {
3
+ name: string;
4
+ className?: string;
5
+ children: ReactNode;
6
+ };
7
+ declare const FieldRoot: ({ name, className, children }: FieldRootProps) => import("react").JSX.Element;
8
+ export { FieldRoot as default };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { use, useEffect } from "react";
4
+ import { FormContext } from "./FormContext.js";
5
+ import { InsideFieldContext } from "./InsideFieldContext.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ // src/components/form/FieldRoot.tsx
8
+ const FieldRoot = ({ name, className, children }) => {
9
+ const { registerField, unregisterField } = use(FormContext);
10
+ useEffect(() => {
11
+ registerField(name);
12
+ return () => {
13
+ unregisterField(name);
14
+ };
15
+ }, [name]);
16
+ return /* @__PURE__ */ jsx(Field.Root, {
17
+ name,
18
+ className,
19
+ children: /* @__PURE__ */ jsx(InsideFieldContext, {
20
+ value: true,
21
+ children
22
+ })
23
+ });
24
+ };
25
+ export { FieldRoot as default };
@@ -0,0 +1,28 @@
1
+ import { FieldError, FormMessage } from "@omer-x/next-form-actions";
2
+ /**
3
+ * Turns an error code (a server error code, a browser validity state or a form message text)
4
+ * and its params into display text.
5
+ */
6
+ export type MessageFormatter = (code: string, params?: Record<string, unknown>) => string;
7
+ /**
8
+ * A form-level message of the latest result, already formatted.
9
+ */
10
+ export type DisplayedFormMessage = {
11
+ /**
12
+ * Stable within one result, for use as a React key.
13
+ */
14
+ key: string;
15
+ type: FormMessage["type"];
16
+ text: string;
17
+ };
18
+ interface FormContextInterface {
19
+ fieldErrors: Record<string, FieldError[]>;
20
+ messages: DisplayedFormMessage[];
21
+ submissionId: number;
22
+ formatMessage: MessageFormatter;
23
+ pending: boolean;
24
+ registerField: (fieldName: string) => void;
25
+ unregisterField: (fieldName: string) => void;
26
+ }
27
+ export declare const FormContext: import("react").Context<FormContextInterface>;
28
+ export {};
@@ -0,0 +1,12 @@
1
+ import { createContext } from "react";
2
+ // src/components/form/FormContext.ts
3
+ const FormContext = createContext({
4
+ fieldErrors: {},
5
+ messages: [],
6
+ submissionId: 0,
7
+ formatMessage: (code) => code,
8
+ pending: false,
9
+ registerField: () => null,
10
+ unregisterField: () => null
11
+ });
12
+ export { FormContext };
@@ -0,0 +1,2 @@
1
+ /** `true` inside a `BaseFormField`, whose field wraps its controls. */
2
+ export declare const InsideFieldContext: import("react").Context<boolean>;
@@ -0,0 +1,5 @@
1
+ import { createContext } from "react";
2
+ // src/components/form/InsideFieldContext.ts
3
+ /** `true` inside a `BaseFormField`, whose field wraps its controls. */
4
+ const InsideFieldContext = createContext(false);
5
+ export { InsideFieldContext };
@@ -0,0 +1,8 @@
1
+ import { FieldState } from "./BaseFormField.js";
2
+ import { RenderProp } from "../../utils/render.js";
3
+ type ServerSideErrorProps = {
4
+ name: string;
5
+ render?: RenderProp<"div", FieldState>;
6
+ };
7
+ declare const ServerSideError: ({ name, render }: ServerSideErrorProps) => import("react").JSX.Element[];
8
+ export { ServerSideError as default };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import { Field } from "@base-ui/react/field";
3
+ import { use } from "react";
4
+ import { FormContext } from "./FormContext.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ // src/components/form/ServerSideError.tsx
7
+ const ServerSideError = ({ name, render }) => {
8
+ const { fieldErrors, formatMessage } = use(FormContext);
9
+ return (Object.hasOwn(fieldErrors, name) ? fieldErrors[name] : []).map((error, index) => /* @__PURE__ */ jsx(Field.Error, {
10
+ match: true,
11
+ render,
12
+ children: formatMessage(error.code, error.params)
13
+ }, `${index}:${error.code}`));
14
+ };
15
+ export { ServerSideError as default };
@@ -0,0 +1,16 @@
1
+ import { FieldState } from "./BaseFormField.js";
2
+ /** The side of the input the popup is placed on. */
3
+ export type AutocompleteSide = "top" | "bottom" | "left" | "right" | "inline-end" | "inline-start";
4
+ /** How the popup is aligned along its side. */
5
+ export type AutocompleteAlign = "start" | "center" | "end";
6
+ /** State of the input, the input group and the trigger. */
7
+ export type AutocompleteInputState = FieldState & {
8
+ open: boolean;
9
+ readOnly: boolean;
10
+ /** The side the popup is placed on, `null` while it's closed. */
11
+ popupSide: AutocompleteSide | null;
12
+ /** Whether no item matches. */
13
+ listEmpty: boolean;
14
+ };
15
+ /** How the popup was opened or closed. Empty when it's unknown (e.g. opened from code). */
16
+ export type AutocompleteInteractionType = "mouse" | "touch" | "pen" | "keyboard" | "";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import BaseInput from "./BaseInput.js";
2
+ import BaseSwitch, { SwitchState } from "./BaseSwitch.js";
3
+ import BaseCheckbox, { CheckboxState } from "./BaseCheckbox.js";
4
+ import BaseCheckboxGroup, { CheckboxGroupState } from "./BaseCheckboxGroup.js";
5
+ import BaseForm from "./BaseForm.js";
6
+ import BaseFormField, { FieldConstraints, FieldState } from "./BaseFormField.js";
7
+ import useFormMessages from "./useFormMessages.js";
8
+ import { DisplayedFormMessage, MessageFormatter } from "./FormContext.js";
9
+ import _default, { AutocompleteActions, AutocompleteHighlightReason, AutocompleteItemGroup } from "./BaseAutocomplete.js";
10
+ import useAutocompleteFilter, { AutocompleteFilter, UseAutocompleteFilterOptions } from "./useAutocompleteFilter.js";
11
+ import { AutocompleteAlign, AutocompleteInputState, AutocompleteInteractionType, AutocompleteSide } from "./autocompleteTypes.js";
12
+ import { AutocompleteClearState } from "./BaseAutocompleteClear.js";
13
+ import { AutocompleteItemState } from "./BaseAutocompleteItem.js";
14
+ import { AutocompleteListState } from "./BaseAutocompleteList.js";
15
+ import { AutocompleteArrowState, AutocompleteBackdropState, AutocompleteCollisionAvoidance, AutocompleteFocusTarget, AutocompleteOffsetFunction, AutocompletePopupState, AutocompletePositionerState } from "./BaseAutocompletePopup.js";
16
+ import { AutocompleteSeparatorState } from "./BaseAutocompleteSeparator.js";
17
+ import { InputSize } from "./inputSizes.js";
18
+ import BaseFieldset, { FieldsetState } from "./BaseFieldset.js";
19
+ import BaseRadioGroup, { RadioGroupState } from "./BaseRadioGroup.js";
20
+ import BaseRadio, { RadioState } from "./BaseRadio.js";
21
+ export { type AutocompleteActions, type AutocompleteAlign, type AutocompleteArrowState, type AutocompleteBackdropState, type AutocompleteClearState, type AutocompleteCollisionAvoidance, type AutocompleteFilter, type AutocompleteFocusTarget, type AutocompleteHighlightReason, type AutocompleteInputState, type AutocompleteInteractionType, type AutocompleteItemGroup, type AutocompleteItemState, type AutocompleteListState, type AutocompleteOffsetFunction, type AutocompletePopupState, type AutocompletePositionerState, type AutocompleteSeparatorState, type AutocompleteSide, _default as BaseAutocomplete, BaseCheckbox, BaseCheckboxGroup, BaseFieldset, BaseForm, BaseFormField, BaseInput, BaseRadio, BaseRadioGroup, BaseSwitch, type CheckboxGroupState, type CheckboxState, type DisplayedFormMessage, type FieldConstraints, type FieldState, type FieldsetState, type InputSize, type MessageFormatter, type RadioGroupState, type RadioState, type SwitchState, type UseAutocompleteFilterOptions, useAutocompleteFilter, useFormMessages };
@@ -0,0 +1,13 @@
1
+ import BaseInput from "./BaseInput.js";
2
+ import BaseSwitch from "./BaseSwitch.js";
3
+ import BaseCheckbox from "./BaseCheckbox.js";
4
+ import BaseCheckboxGroup from "./BaseCheckboxGroup.js";
5
+ import BaseForm from "./BaseForm.js";
6
+ import BaseFormField from "./BaseFormField.js";
7
+ import useFormMessages from "./useFormMessages.js";
8
+ import BaseAutocomplete_default from "./BaseAutocomplete.js";
9
+ import useAutocompleteFilter from "./useAutocompleteFilter.js";
10
+ import BaseFieldset from "./BaseFieldset.js";
11
+ import BaseRadioGroup from "./BaseRadioGroup.js";
12
+ import BaseRadio from "./BaseRadio.js";
13
+ export { BaseAutocomplete_default as BaseAutocomplete, BaseCheckbox, BaseCheckboxGroup, BaseFieldset, BaseForm, BaseFormField, BaseInput, BaseRadio, BaseRadioGroup, BaseSwitch, useAutocompleteFilter, useFormMessages };