@me1a/ui 2.2.2 → 2.2.4
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.
- package/dist/{atoms/accordion.mjs → accordion/index.mjs} +2 -2
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/{atoms/avatar.mjs → avatar/index.mjs} +2 -2
- package/dist/avatar/index.mjs.map +1 -0
- package/dist/{atoms/badge.d.mts → badge/index.d.mts} +9 -8
- package/dist/{atoms/badge.mjs → badge/index.mjs} +2 -2
- package/dist/{atoms/badge.mjs.map → badge/index.mjs.map} +1 -1
- package/dist/{atoms/box.mjs → box/index.mjs} +2 -2
- package/dist/box/index.mjs.map +1 -0
- package/dist/{atoms/breadcrumb.mjs → breadcrumb/index.mjs} +2 -2
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/{atoms/button.d.mts → button/index.d.mts} +2 -2
- package/dist/{atoms/button.mjs → button/index.mjs} +2 -2
- package/dist/button/index.mjs.map +1 -0
- package/dist/card/index.d.mts +127 -0
- package/dist/card/index.mjs +2 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/{atoms/checkbox.mjs → checkbox/index.mjs} +2 -2
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/{atoms/collapsible.mjs → collapsible/index.mjs} +2 -2
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/{atoms/command.mjs → command/index.mjs} +2 -2
- package/dist/command/index.mjs.map +1 -0
- package/dist/container/index.d.mts +33 -0
- package/dist/{atoms/container.mjs → container/index.mjs} +2 -2
- package/dist/container/index.mjs.map +1 -0
- package/dist/{atoms/dialog.mjs → dialog/index.mjs} +2 -2
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/{organisms/drawer.mjs → drawer/index.mjs} +2 -2
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/{organisms/dropdown-menu.d.mts → dropdown-menu/index.d.mts} +2 -2
- package/dist/{organisms/dropdown-menu.mjs → dropdown-menu/index.mjs} +2 -2
- package/dist/dropdown-menu/index.mjs.map +1 -0
- package/dist/{rhf/form.mjs → form/index.mjs} +2 -2
- package/dist/form/index.mjs.map +1 -0
- package/dist/{hooks.d.mts → hooks/index.d.mts} +2 -2
- package/dist/{hooks.mjs → hooks/index.mjs} +2 -2
- package/dist/{hooks.js.map → hooks/index.mjs.map} +1 -1
- package/dist/index.d.mts +159 -39
- package/dist/index.mjs +47 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{atoms/input.mjs → input/index.mjs} +2 -2
- package/dist/{atoms/input.mjs.map → input/index.mjs.map} +1 -1
- package/dist/{atoms/label.d.mts → label/index.d.mts} +2 -2
- package/dist/{atoms/label.mjs → label/index.mjs} +2 -2
- package/dist/{atoms/label.mjs.map → label/index.mjs.map} +1 -1
- package/dist/{molecules/navigation-menu.d.mts → navigation-menu/index.d.mts} +21 -20
- package/dist/{molecules/navigation-menu.mjs → navigation-menu/index.mjs} +2 -2
- package/dist/navigation-menu/index.mjs.map +1 -0
- package/dist/{atoms/page-loader.d.mts → page-loader/index.d.mts} +2 -2
- package/dist/{atoms/page-loader.mjs → page-loader/index.mjs} +2 -2
- package/dist/page-loader/index.mjs.map +1 -0
- package/dist/{atoms/pagination.d.mts → pagination/index.d.mts} +2 -2
- package/dist/{atoms/pagination.mjs → pagination/index.mjs} +2 -2
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/{atoms/popover.mjs → popover/index.mjs} +2 -2
- package/dist/popover/index.mjs.map +1 -0
- package/dist/{atoms/radio-group.d.mts → radio-group/index.d.mts} +2 -2
- package/dist/{atoms/radio-group.mjs → radio-group/index.mjs} +2 -2
- package/dist/radio-group/index.mjs.map +1 -0
- package/dist/{atoms/resizable.mjs → resizable/index.mjs} +2 -2
- package/dist/resizable/index.mjs.map +1 -0
- package/dist/{rhf/rhf-checkbox.mjs → rhf-checkbox/index.mjs} +2 -2
- package/dist/rhf-checkbox/index.mjs.map +1 -0
- package/dist/{rhf/rhf-multi-select.mjs → rhf-multi-select/index.mjs} +2 -2
- package/dist/rhf-multi-select/index.mjs.map +1 -0
- package/dist/{rhf/rhf-radio-button-group.mjs → rhf-radio-button-group/index.mjs} +2 -2
- package/dist/rhf-radio-button-group/index.mjs.map +1 -0
- package/dist/{rhf/rhf-radio-group.mjs → rhf-radio-group/index.mjs} +2 -2
- package/dist/rhf-radio-group/index.mjs.map +1 -0
- package/dist/{rhf/rhf-select.mjs → rhf-select/index.mjs} +2 -2
- package/dist/rhf-select/index.mjs.map +1 -0
- package/dist/{rhf/rhf-switch.mjs → rhf-switch/index.mjs} +2 -2
- package/dist/rhf-switch/index.mjs.map +1 -0
- package/dist/{rhf/rhf-textarea.mjs → rhf-textarea/index.mjs} +2 -2
- package/dist/rhf-textarea/index.mjs.map +1 -0
- package/dist/{atoms/separator.mjs → separator/index.mjs} +2 -2
- package/dist/separator/index.mjs.map +1 -0
- package/dist/{atoms/sheet.d.mts → sheet/index.d.mts} +2 -2
- package/dist/{atoms/sheet.mjs → sheet/index.mjs} +2 -2
- package/dist/{atoms/sheet.mjs.map → sheet/index.mjs.map} +1 -1
- package/dist/{organisms/sidebar.d.mts → sidebar/index.d.mts} +4 -4
- package/dist/{organisms/sidebar.mjs → sidebar/index.mjs} +2 -2
- package/dist/sidebar/index.mjs.map +1 -0
- package/dist/skeleton/index.d.mts +17 -0
- package/dist/skeleton/index.mjs +2 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/{atoms/stack.mjs → stack/index.mjs} +2 -2
- package/dist/{atoms/stack.mjs.map → stack/index.mjs.map} +1 -1
- package/dist/{atoms/switch.mjs → switch/index.mjs} +2 -2
- package/dist/switch/index.mjs.map +1 -0
- package/dist/{atoms/table.mjs → table/index.mjs} +2 -2
- package/dist/{atoms/table.mjs.map → table/index.mjs.map} +1 -1
- package/dist/tabs/index.d.mts +97 -0
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/{atoms/text-field.d.mts → text-field/index.d.mts} +2 -2
- package/dist/{atoms/text-field.mjs → text-field/index.mjs} +2 -2
- package/dist/text-field/index.mjs.map +1 -0
- package/dist/textarea/index.d.mts +24 -0
- package/dist/{atoms/textarea.mjs → textarea/index.mjs} +2 -2
- package/dist/textarea/index.mjs.map +1 -0
- package/dist/{atoms/toast.d.mts → toast/index.d.mts} +2 -2
- package/dist/{atoms/toast.mjs → toast/index.mjs} +2 -2
- package/dist/{atoms/toast.mjs.map → toast/index.mjs.map} +1 -1
- package/dist/{atoms/toaster.mjs → toaster/index.mjs} +2 -2
- package/dist/toaster/index.mjs.map +1 -0
- package/dist/{atoms/tooltip.mjs → tooltip/index.mjs} +2 -2
- package/dist/tooltip/index.mjs.map +1 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/{atoms/typography.d.mts → typography/index.d.mts} +2 -2
- package/dist/{atoms/typography.mjs → typography/index.mjs} +2 -2
- package/dist/typography/index.mjs.map +1 -0
- package/dist/utils/index.d.mts +5 -0
- package/dist/{utils.mjs → utils/index.mjs} +2 -2
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +197 -257
- package/dist/atoms/accordion.d.ts +0 -94
- package/dist/atoms/accordion.js +0 -2
- package/dist/atoms/accordion.js.map +0 -1
- package/dist/atoms/accordion.mjs.map +0 -1
- package/dist/atoms/avatar.d.ts +0 -34
- package/dist/atoms/avatar.js +0 -2
- package/dist/atoms/avatar.js.map +0 -1
- package/dist/atoms/avatar.mjs.map +0 -1
- package/dist/atoms/badge.d.ts +0 -40
- package/dist/atoms/badge.js +0 -2
- package/dist/atoms/badge.js.map +0 -1
- package/dist/atoms/box.d.ts +0 -50
- package/dist/atoms/box.js +0 -2
- package/dist/atoms/box.js.map +0 -1
- package/dist/atoms/box.mjs.map +0 -1
- package/dist/atoms/breadcrumb.d.ts +0 -35
- package/dist/atoms/breadcrumb.js +0 -2
- package/dist/atoms/breadcrumb.js.map +0 -1
- package/dist/atoms/breadcrumb.mjs.map +0 -1
- package/dist/atoms/button.d.ts +0 -82
- package/dist/atoms/button.js +0 -2
- package/dist/atoms/button.js.map +0 -1
- package/dist/atoms/button.mjs.map +0 -1
- package/dist/atoms/checkbox.d.ts +0 -21
- package/dist/atoms/checkbox.js +0 -2
- package/dist/atoms/checkbox.js.map +0 -1
- package/dist/atoms/checkbox.mjs.map +0 -1
- package/dist/atoms/collapsible.d.ts +0 -26
- package/dist/atoms/collapsible.js +0 -2
- package/dist/atoms/collapsible.js.map +0 -1
- package/dist/atoms/collapsible.mjs.map +0 -1
- package/dist/atoms/command.d.ts +0 -122
- package/dist/atoms/command.js +0 -2
- package/dist/atoms/command.js.map +0 -1
- package/dist/atoms/command.mjs.map +0 -1
- package/dist/atoms/container.js +0 -2
- package/dist/atoms/container.js.map +0 -1
- package/dist/atoms/container.mjs.map +0 -1
- package/dist/atoms/dialog.d.ts +0 -35
- package/dist/atoms/dialog.js +0 -2
- package/dist/atoms/dialog.js.map +0 -1
- package/dist/atoms/dialog.mjs.map +0 -1
- package/dist/atoms/input.d.ts +0 -12
- package/dist/atoms/input.js +0 -2
- package/dist/atoms/input.js.map +0 -1
- package/dist/atoms/label.d.ts +0 -18
- package/dist/atoms/label.js +0 -2
- package/dist/atoms/label.js.map +0 -1
- package/dist/atoms/page-loader.d.ts +0 -29
- package/dist/atoms/page-loader.js +0 -2
- package/dist/atoms/page-loader.js.map +0 -1
- package/dist/atoms/page-loader.mjs.map +0 -1
- package/dist/atoms/pagination.d.ts +0 -105
- package/dist/atoms/pagination.js +0 -2
- package/dist/atoms/pagination.js.map +0 -1
- package/dist/atoms/pagination.mjs.map +0 -1
- package/dist/atoms/popover.d.ts +0 -30
- package/dist/atoms/popover.js +0 -2
- package/dist/atoms/popover.js.map +0 -1
- package/dist/atoms/popover.mjs.map +0 -1
- package/dist/atoms/radio-group.d.ts +0 -62
- package/dist/atoms/radio-group.js +0 -2
- package/dist/atoms/radio-group.js.map +0 -1
- package/dist/atoms/radio-group.mjs.map +0 -1
- package/dist/atoms/resizable.d.ts +0 -53
- package/dist/atoms/resizable.js +0 -2
- package/dist/atoms/resizable.js.map +0 -1
- package/dist/atoms/resizable.mjs.map +0 -1
- package/dist/atoms/separator.d.ts +0 -13
- package/dist/atoms/separator.js +0 -2
- package/dist/atoms/separator.js.map +0 -1
- package/dist/atoms/separator.mjs.map +0 -1
- package/dist/atoms/sheet.d.ts +0 -42
- package/dist/atoms/sheet.js +0 -2
- package/dist/atoms/sheet.js.map +0 -1
- package/dist/atoms/skeleton.js +0 -2
- package/dist/atoms/skeleton.js.map +0 -1
- package/dist/atoms/skeleton.mjs +0 -2
- package/dist/atoms/skeleton.mjs.map +0 -1
- package/dist/atoms/stack.d.ts +0 -121
- package/dist/atoms/stack.js +0 -2
- package/dist/atoms/stack.js.map +0 -1
- package/dist/atoms/switch.d.ts +0 -21
- package/dist/atoms/switch.js +0 -2
- package/dist/atoms/switch.js.map +0 -1
- package/dist/atoms/switch.mjs.map +0 -1
- package/dist/atoms/table.d.ts +0 -53
- package/dist/atoms/table.js +0 -2
- package/dist/atoms/table.js.map +0 -1
- package/dist/atoms/text-field.d.ts +0 -65
- package/dist/atoms/text-field.js +0 -2
- package/dist/atoms/text-field.js.map +0 -1
- package/dist/atoms/text-field.mjs.map +0 -1
- package/dist/atoms/textarea.js +0 -2
- package/dist/atoms/textarea.js.map +0 -1
- package/dist/atoms/textarea.mjs.map +0 -1
- package/dist/atoms/toast.d.ts +0 -18
- package/dist/atoms/toast.js +0 -2
- package/dist/atoms/toast.js.map +0 -1
- package/dist/atoms/toaster.d.ts +0 -26
- package/dist/atoms/toaster.js +0 -2
- package/dist/atoms/toaster.js.map +0 -1
- package/dist/atoms/toaster.mjs.map +0 -1
- package/dist/atoms/tooltip.d.ts +0 -25
- package/dist/atoms/tooltip.js +0 -2
- package/dist/atoms/tooltip.js.map +0 -1
- package/dist/atoms/tooltip.mjs.map +0 -1
- package/dist/atoms/typography.d.ts +0 -24
- package/dist/atoms/typography.js +0 -2
- package/dist/atoms/typography.js.map +0 -1
- package/dist/atoms/typography.mjs.map +0 -1
- package/dist/atoms.d.mts +0 -1237
- package/dist/atoms.d.ts +0 -1237
- package/dist/atoms.js +0 -2
- package/dist/atoms.js.map +0 -1
- package/dist/atoms.mjs +0 -2
- package/dist/atoms.mjs.map +0 -1
- package/dist/hooks.d.ts +0 -57
- package/dist/hooks.js +0 -2
- package/dist/hooks.mjs.map +0 -1
- package/dist/index.d.ts +0 -2619
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/molecules/card.d.mts +0 -72
- package/dist/molecules/card.d.ts +0 -72
- package/dist/molecules/card.js +0 -2
- package/dist/molecules/card.js.map +0 -1
- package/dist/molecules/card.mjs +0 -2
- package/dist/molecules/card.mjs.map +0 -1
- package/dist/molecules/navigation-menu.d.ts +0 -103
- package/dist/molecules/navigation-menu.js +0 -2
- package/dist/molecules/navigation-menu.js.map +0 -1
- package/dist/molecules/navigation-menu.mjs.map +0 -1
- package/dist/molecules/tabs.d.mts +0 -32
- package/dist/molecules/tabs.d.ts +0 -32
- package/dist/molecules/tabs.js +0 -2
- package/dist/molecules/tabs.js.map +0 -1
- package/dist/molecules/tabs.mjs +0 -2
- package/dist/molecules/tabs.mjs.map +0 -1
- package/dist/molecules.d.mts +0 -201
- package/dist/molecules.d.ts +0 -201
- package/dist/molecules.js +0 -2
- package/dist/molecules.js.map +0 -1
- package/dist/molecules.mjs +0 -2
- package/dist/molecules.mjs.map +0 -1
- package/dist/organisms/drawer.d.ts +0 -63
- package/dist/organisms/drawer.js +0 -2
- package/dist/organisms/drawer.js.map +0 -1
- package/dist/organisms/drawer.mjs.map +0 -1
- package/dist/organisms/dropdown-menu.d.ts +0 -335
- package/dist/organisms/dropdown-menu.js +0 -2
- package/dist/organisms/dropdown-menu.js.map +0 -1
- package/dist/organisms/dropdown-menu.mjs.map +0 -1
- package/dist/organisms/sidebar.d.ts +0 -328
- package/dist/organisms/sidebar.js +0 -2
- package/dist/organisms/sidebar.js.map +0 -1
- package/dist/organisms/sidebar.mjs.map +0 -1
- package/dist/organisms.d.mts +0 -717
- package/dist/organisms.d.ts +0 -717
- package/dist/organisms.js +0 -2
- package/dist/organisms.js.map +0 -1
- package/dist/organisms.mjs +0 -2
- package/dist/organisms.mjs.map +0 -1
- package/dist/rhf/form.d.ts +0 -96
- package/dist/rhf/form.js +0 -2
- package/dist/rhf/form.js.map +0 -1
- package/dist/rhf/form.mjs.map +0 -1
- package/dist/rhf/rhf-checkbox.d.ts +0 -57
- package/dist/rhf/rhf-checkbox.js +0 -2
- package/dist/rhf/rhf-checkbox.js.map +0 -1
- package/dist/rhf/rhf-checkbox.mjs.map +0 -1
- package/dist/rhf/rhf-multi-select.d.ts +0 -84
- package/dist/rhf/rhf-multi-select.js +0 -2
- package/dist/rhf/rhf-multi-select.js.map +0 -1
- package/dist/rhf/rhf-multi-select.mjs.map +0 -1
- package/dist/rhf/rhf-radio-button-group.d.ts +0 -73
- package/dist/rhf/rhf-radio-button-group.js +0 -2
- package/dist/rhf/rhf-radio-button-group.js.map +0 -1
- package/dist/rhf/rhf-radio-button-group.mjs.map +0 -1
- package/dist/rhf/rhf-radio-group.d.ts +0 -103
- package/dist/rhf/rhf-radio-group.js +0 -2
- package/dist/rhf/rhf-radio-group.js.map +0 -1
- package/dist/rhf/rhf-radio-group.mjs.map +0 -1
- package/dist/rhf/rhf-select.d.ts +0 -80
- package/dist/rhf/rhf-select.js +0 -2
- package/dist/rhf/rhf-select.js.map +0 -1
- package/dist/rhf/rhf-select.mjs.map +0 -1
- package/dist/rhf/rhf-switch.d.ts +0 -57
- package/dist/rhf/rhf-switch.js +0 -2
- package/dist/rhf/rhf-switch.js.map +0 -1
- package/dist/rhf/rhf-switch.mjs.map +0 -1
- package/dist/rhf/rhf-textarea.d.ts +0 -66
- package/dist/rhf/rhf-textarea.js +0 -2
- package/dist/rhf/rhf-textarea.js.map +0 -1
- package/dist/rhf/rhf-textarea.mjs.map +0 -1
- package/dist/rhf.d.mts +0 -614
- package/dist/rhf.d.ts +0 -614
- package/dist/rhf.js +0 -2
- package/dist/rhf.js.map +0 -1
- package/dist/rhf.mjs +0 -2
- package/dist/rhf.mjs.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/types.mjs +0 -2
- package/dist/types.mjs.map +0 -1
- package/dist/utils.js +0 -2
- package/dist/utils.js.map +0 -1
- package/dist/utils.mjs.map +0 -1
- /package/dist/{atoms/accordion.d.mts → accordion/index.d.mts} +0 -0
- /package/dist/{atoms/avatar.d.mts → avatar/index.d.mts} +0 -0
- /package/dist/{atoms/box.d.mts → box/index.d.mts} +0 -0
- /package/dist/{atoms/breadcrumb.d.mts → breadcrumb/index.d.mts} +0 -0
- /package/dist/{atoms/checkbox.d.mts → checkbox/index.d.mts} +0 -0
- /package/dist/{atoms/collapsible.d.mts → collapsible/index.d.mts} +0 -0
- /package/dist/{atoms/command.d.mts → command/index.d.mts} +0 -0
- /package/dist/{atoms/dialog.d.mts → dialog/index.d.mts} +0 -0
- /package/dist/{organisms/drawer.d.mts → drawer/index.d.mts} +0 -0
- /package/dist/{rhf/form.d.mts → form/index.d.mts} +0 -0
- /package/dist/{atoms/input.d.mts → input/index.d.mts} +0 -0
- /package/dist/{atoms/popover.d.mts → popover/index.d.mts} +0 -0
- /package/dist/{atoms/resizable.d.mts → resizable/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-checkbox.d.mts → rhf-checkbox/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-multi-select.d.mts → rhf-multi-select/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-radio-button-group.d.mts → rhf-radio-button-group/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-radio-group.d.mts → rhf-radio-group/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-select.d.mts → rhf-select/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-switch.d.mts → rhf-switch/index.d.mts} +0 -0
- /package/dist/{rhf/rhf-textarea.d.mts → rhf-textarea/index.d.mts} +0 -0
- /package/dist/{atoms/separator.d.mts → separator/index.d.mts} +0 -0
- /package/dist/{atoms/stack.d.mts → stack/index.d.mts} +0 -0
- /package/dist/{atoms/switch.d.mts → switch/index.d.mts} +0 -0
- /package/dist/{atoms/table.d.mts → table/index.d.mts} +0 -0
- /package/dist/{atoms/toaster.d.mts → toaster/index.d.mts} +0 -0
- /package/dist/{atoms/tooltip.d.mts → tooltip/index.d.mts} +0 -0
package/dist/rhf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var reactHookForm=require('react-hook-form'),T=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),reactSlot=require('@radix-ui/react-slot'),Fe=require('@radix-ui/react-label'),classVarianceAuthority=require('class-variance-authority'),re=require('@radix-ui/react-checkbox'),lucideReact=require('lucide-react'),ie=require('@radix-ui/react-switch'),H=require('@radix-ui/react-radio-group'),reactPopover=require('@radix-ui/react-popover'),cmdk=require('cmdk');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var T__namespace=/*#__PURE__*/_interopNamespace(T);var Fe__namespace=/*#__PURE__*/_interopNamespace(Fe);var re__namespace=/*#__PURE__*/_interopNamespace(re);var ie__namespace=/*#__PURE__*/_interopNamespace(ie);var H__namespace=/*#__PURE__*/_interopNamespace(H);function r(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var be=T__namespace.forwardRef(({className:t,type:e,...o},m)=>jsxRuntime.jsx("input",{type:e,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:m,...o}));be.displayName="Input";var Qe=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(Fe__namespace.Root,{ref:o,className:r(Qe(),t),...e}));X.displayName=Fe__namespace.Root.displayName;var tt=reactHookForm.FormProvider,Ce=T__namespace.createContext({}),P=({...t})=>jsxRuntime.jsx(Ce.Provider,{value:{name:t.name},children:jsxRuntime.jsx(reactHookForm.Controller,{...t})}),ae=()=>{let t=T__namespace.useContext(Ce),e=T__namespace.useContext(Ne),{getFieldState:o,formState:m}=reactHookForm.useFormContext(),s=o(t.name,m);if(!t)throw new Error("useFormField should be used within <FormField>");let{id:i}=e;return {id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},Ne=T__namespace.createContext({}),h=T__namespace.forwardRef(({className:t,...e},o)=>{let m=T__namespace.useId();return jsxRuntime.jsx(Ne.Provider,{value:{id:m},children:jsxRuntime.jsx("div",{ref:o,className:r("space-y-2",t),...e})})});h.displayName="FormItem";var R=T__namespace.forwardRef(({className:t,...e},o)=>{let{error:m,formItemId:s}=ae();return jsxRuntime.jsx(X,{ref:o,className:r(m&&"text-destructive",t),htmlFor:s,...e})});R.displayName="FormLabel";var v=T__namespace.forwardRef(({...t},e)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=ae();return jsxRuntime.jsx(reactSlot.Slot,{ref:e,id:m,"aria-describedby":o?`${s} ${i}`:`${s}`,"aria-invalid":!!o,...t})});v.displayName="FormControl";var x=T__namespace.forwardRef(({className:t,...e},o)=>{let{formDescriptionId:m}=ae();return jsxRuntime.jsx("p",{ref:o,id:m,className:r("text-sm text-muted-foreground",t),...e})});x.displayName="FormDescription";var C=T__namespace.forwardRef(({className:t,children:e,...o},m)=>{let{error:s,formMessageId:i}=ae(),l=s?String(s?.message??""):e;return l?jsxRuntime.jsx("p",{ref:m,id:i,className:r("text-sm font-medium text-destructive",t),...o,children:l}):null});C.displayName="FormMessage";function ao({name:t,label:e,description:o,className:m,type:s="text",warningText:i,required:l,disabled:N,readOnly:c,placeholder:F,"aria-label":f,"aria-describedby":u,onBlur:b,...n}){let{control:d}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:d,render:({field:a,fieldState:{error:y}})=>jsxRuntime.jsxs(h,{children:[e&&jsxRuntime.jsxs(R,{children:[e,l&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsx(be,{...a,type:s,value:s==="number"&&a.value===0?"":a.value,onChange:w=>{s==="number"?a.onChange(Number(w.target.value)):a.onChange(w.target.value);},onBlur:w=>{s!=="number"&&typeof a.value=="string"&&a.onChange(a.value.trim()),a.onBlur(),b?.(w);},className:r(y&&"border-destructive focus-visible:ring-destructive",m),disabled:N,readOnly:c,required:l,placeholder:F,"aria-label":f,"aria-describedby":u,"aria-invalid":!!y,"aria-required":l,...n})}),o&&jsxRuntime.jsx(x,{children:o}),y&&jsxRuntime.jsx(C,{children:y.message}),!y&&i&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:i})]})})}var ye=T__namespace.forwardRef(({className:t,autoResize:e=false,...o},m)=>{let s=T__namespace.useRef(null);return T__namespace.useEffect(()=>{if(!e||!s.current)return;let i=s.current,l=()=>{i.style.height="auto",i.style.height=`${i.scrollHeight}px`;};return i.addEventListener("input",l),l(),()=>i.removeEventListener("input",l)},[e]),jsxRuntime.jsx("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:m,...o})});ye.displayName="Textarea";function fo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,autoResize:F,"aria-label":f,"aria-describedby":u,onBlur:b,...n}){let{control:d}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:d,render:({field:a,fieldState:{error:y}})=>jsxRuntime.jsxs(h,{children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsx(ye,{...a,value:a.value,onChange:w=>{a.onChange(w.target.value);},onBlur:w=>{typeof a.value=="string"&&a.onChange(a.value.trim()),a.onBlur(),b?.(w);},className:r(y&&"border-destructive focus-visible:ring-destructive",m),disabled:l,readOnly:N,required:i,placeholder:c,"aria-label":f,"aria-describedby":u,"aria-invalid":!!y,"aria-required":i,autoResize:F,...n})}),o&&jsxRuntime.jsx(x,{children:o}),y&&jsxRuntime.jsx(C,{children:y.message}),!y&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}var me=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(re__namespace.Root,{ref:o,className:r("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:jsxRuntime.jsx(re__namespace.Indicator,{className:r("flex items-center justify-center text-current"),"aria-hidden":"true",children:jsxRuntime.jsx(lucideReact.Check,{className:"h-4 w-4"})})}));me.displayName=re__namespace.Root.displayName;function wo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,...f}){let{control:u}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:u,render:({field:b,fieldState:{error:n}})=>jsxRuntime.jsxs(h,{className:"flex flex-row items-start space-x-3 space-y-0",children:[jsxRuntime.jsx(v,{children:jsxRuntime.jsx(me,{checked:b.value,onCheckedChange:b.onChange,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!n,"aria-required":i,...f})}),jsxRuntime.jsxs("div",{className:"space-y-1 leading-none",children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),o&&jsxRuntime.jsx(x,{children:o}),n&&jsxRuntime.jsx(C,{children:n.message}),!n&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})]})})}var le=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(ie__namespace.Root,{className:r("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:o,children:jsxRuntime.jsx(ie__namespace.Thumb,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));le.displayName=ie__namespace.Root.displayName;function Do({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,...f}){let{control:u}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:u,render:({field:b,fieldState:{error:n}})=>jsxRuntime.jsxs(h,{className:"flex flex-row items-start space-x-3 space-y-0",children:[jsxRuntime.jsx(v,{children:jsxRuntime.jsx(le,{checked:b.value,onCheckedChange:b.onChange,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!n,"aria-required":i,...f})}),jsxRuntime.jsxs("div",{className:"space-y-1 leading-none",children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),o&&jsxRuntime.jsx(x,{children:o}),n&&jsxRuntime.jsx(C,{children:n.message}),!n&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})]})})}var U=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(H__namespace.Root,{className:r("grid gap-3",t),...e,ref:o}));U.displayName=H__namespace.Root.displayName;var ne=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(H__namespace.Item,{ref:o,className:r("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:jsxRuntime.jsx(H__namespace.Indicator,{className:"flex items-center justify-center",children:jsxRuntime.jsx(lucideReact.Circle,{className:"h-3.5 w-3.5 fill-primary"})})}));ne.displayName=H__namespace.Item.displayName;var de=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx("div",{ref:o,className:r("flex items-center gap-2",t),...e}));de.displayName="RadioItemContainer";var pe=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(X,{ref:o,className:r("text-sm font-medium leading-none cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...e}));pe.displayName="RadioItemLabel";function Uo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,children:f,...u}){let{control:b}=reactHookForm.useFormContext(),n="options"in u;return jsxRuntime.jsx(P,{name:t,control:b,render:({field:d,fieldState:{error:a}})=>jsxRuntime.jsxs(h,{className:"space-y-3",children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsxs(U,{onValueChange:d.onChange,defaultValue:d.value,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!a,"aria-required":i,...u,children:[n&&u.options.map(y=>jsxRuntime.jsxs(de,{children:[jsxRuntime.jsx(ne,{value:y.id,id:y.id}),jsxRuntime.jsx(pe,{htmlFor:y.id,children:y.label})]},y.id)),!n&&f]})}),o&&jsxRuntime.jsx(x,{children:o}),a&&jsxRuntime.jsx(C,{children:a.message}),!a&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}var ke=classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),$=T__namespace.forwardRef(({className:t,variant:e,size:o,asChild:m=false,startIcon:s,endIcon:i,loading:l=false,disabled:N,children:c,type:F="button","aria-label":f,...u},b)=>{let n=m?reactSlot.Slot:"button",d=N||l,a=f||(typeof c=="string"?c:void 0),y=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),!d&&u.onClick&&u.onClick(w));};return m?jsxRuntime.jsx(n,{className:r(ke({variant:e,size:o,className:t})),ref:b,disabled:d,type:F,"aria-label":a,"aria-disabled":d,...u,children:c}):jsxRuntime.jsxs(n,{className:r(ke({variant:e,size:o,className:t})),ref:b,disabled:d,type:F,"aria-label":a,"aria-disabled":d,onKeyDown:y,...u,children:[l&&jsxRuntime.jsx(lucideReact.Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!l&&s&&jsxRuntime.jsx("span",{className:"mr-2","aria-hidden":"true",children:s}),c,!l&&i&&jsxRuntime.jsx("span",{className:"ml-2","aria-hidden":"true",children:i})]})});$.displayName="Button";function na({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,options:f,...u}){let{control:b}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:b,render:({field:n,fieldState:{error:d}})=>jsxRuntime.jsxs(h,{className:"space-y-3",children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsx(U,{onValueChange:n.onChange,defaultValue:n.value,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!d,"aria-required":i,className:"flex gap-2 p-2 border border-gray-200 rounded-md w-fit",...u,children:f.map(a=>jsxRuntime.jsx($,{size:a.size??"sm",variant:n.value===a.id?"default":"secondary",onClick:()=>n.onChange(a.id),role:"radio","aria-checked":n.value===a.id,disabled:l,children:a.label},a.id))})}),o&&jsxRuntime.jsx(x,{children:o}),s&&jsxRuntime.jsx(x,{className:"text-warning",children:s}),d&&jsxRuntime.jsx(C,{children:d.message})]})})}var Y=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(cmdk.Command,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));Y.displayName=cmdk.Command.displayName;var Z=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsxRuntime.jsx(cmdk.Command.Input,{ref:o,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Z.displayName=cmdk.Command.Input.displayName;var j=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(cmdk.Command.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));j.displayName=cmdk.Command.List.displayName;var ee=T__namespace.forwardRef((t,e)=>jsxRuntime.jsx(cmdk.Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));ee.displayName=cmdk.Command.Empty.displayName;var q=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(cmdk.Command.Group,{ref:o,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));q.displayName=cmdk.Command.Group.displayName;var fe=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(cmdk.Command.Separator,{ref:o,className:r("-mx-1 h-px bg-border",t),...e}));fe.displayName=cmdk.Command.Separator.displayName;var W=T__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(cmdk.Command.Item,{ref:o,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));W.displayName=cmdk.Command.Item.displayName;var gt=classVarianceAuthority.cva("",{variants:{variant:{h1:"scroll-m-5 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-5 text-3xl font-semibold tracking-tight",h3:"scroll-m-5 text-2xl font-semibold tracking-tight",h4:"scroll-m-5 text-xl font-semibold tracking-tight",h5:"scroll-m-5 text-lg font-semibold tracking-tight",h6:"scroll-m-5 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",blockquote:"mt-6 border-l-2 border-slate-300 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2",lead:"text-xl text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",align:"left"}}),te=T__namespace.forwardRef(({className:t,variant:e,align:o,as:m="p",...s},i)=>jsxRuntime.jsx(m,{className:r(gt({variant:e,align:o,className:t})),ref:i,...s}));te.displayName="Typography";function Ee({options:t,value:e,onChange:o,placeholder:m="Select an option",disabled:s,required:i,error:l,className:N,fullWidth:c,searchable:F,id:f,renderCommandList:u}){let[b,n]=T__namespace.useState(false),d=t?.find(a=>a.id===e);return jsxRuntime.jsx("div",{className:r(c&&"w-full"),children:jsxRuntime.jsxs(reactPopover.Popover,{open:b,onOpenChange:n,children:[jsxRuntime.jsx(reactPopover.PopoverTrigger,{asChild:true,children:jsxRuntime.jsxs($,{variant:"outline",role:"combobox","aria-expanded":b,"aria-controls":f?`${f}-content`:void 0,"aria-required":i,"aria-invalid":!!l,disabled:s,className:r("w-[13rem] justify-between",!e&&"text-muted-foreground",c&&"w-full",l&&"border-destructive focus-visible:ring-destructive",N),children:[d?d.label:m,jsxRuntime.jsx(lucideReact.ChevronDown,{className:r("opacity-50",b&&"rotate-180")})]})}),jsxRuntime.jsx(reactPopover.PopoverContent,{className:r("w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md",c&&"w-full"),align:"start",children:jsxRuntime.jsxs(Y,{children:[F&&jsxRuntime.jsx(Z,{placeholder:"Search...",className:"h-9",disabled:s}),jsxRuntime.jsxs(j,{className:"max-h-[12rem] overflow-y-auto",children:[jsxRuntime.jsx(ee,{children:"No items found."}),u?u(t):jsxRuntime.jsx(q,{children:t?.map(a=>jsxRuntime.jsxs(W,{value:a.label,onSelect:()=>{o(a.id),n(false);},disabled:a.disabled,className:r("flex items-center justify-between cursor-pointer my-1",e===a.id&&"bg-accent text-accent-foreground",a.disabled&&"opacity-50 cursor-not-allowed",a.className),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[a.startIcon&&a.startIcon,jsxRuntime.jsx(te,{variant:"small",children:a.label})]}),a.endIcon&&jsxRuntime.jsx("div",{className:"ml-2",children:a.endIcon})]},a.id))})]})]})})]})})}function Oe({options:t,value:e,onChange:o,placeholder:m="Select options",disabled:s,required:i,error:l,className:N,fullWidth:c,searchable:F,id:f,maxSelections:u,showSelectAll:b,renderCommandList:n}){let[d,a]=T__namespace.useState(false),y=t.filter(p=>e.includes(p.id)),w=p=>{if(e.includes(p))o(e.filter(k=>k!==p));else {if(u&&e.length>=u)return;o([...e,p]);}},$e=()=>{let p=t.filter(k=>!k.disabled);e.length===p.length?o([]):o(p.map(k=>k.id));},qe=(p,k)=>{k.stopPropagation(),o(e.filter(We=>We!==p));};return jsxRuntime.jsx("div",{className:r(c&&"w-full"),children:jsxRuntime.jsxs(reactPopover.Popover,{open:d,onOpenChange:a,children:[jsxRuntime.jsx(reactPopover.PopoverTrigger,{asChild:true,children:jsxRuntime.jsxs($,{variant:"outline",role:"combobox","aria-expanded":d,"aria-controls":f?`${f}-content`:void 0,"aria-label":m,"aria-required":i,"aria-invalid":!!l,disabled:s,id:f,className:r("w-[13rem] justify-between min-h-[2.5rem] h-auto",!e.length&&"text-muted-foreground",c&&"w-full",l&&"border-destructive focus-visible:ring-destructive",N),children:[jsxRuntime.jsx("div",{className:"flex flex-wrap gap-1",children:y.length>0?y.map(p=>jsxRuntime.jsxs("div",{className:"flex items-center gap-1 bg-secondary text-secondary-foreground px-2 py-0.5 rounded-md text-sm",children:[jsxRuntime.jsx("span",{children:p.label}),jsxRuntime.jsx("span",{onClick:k=>qe(p.id,k),className:"hover:bg-secondary-foreground/20 rounded-sm",children:jsxRuntime.jsx(lucideReact.X,{className:"h-3 w-3"})})]},p.id)):jsxRuntime.jsx("span",{children:m})}),jsxRuntime.jsx(lucideReact.ChevronDown,{className:r("opacity-50",d&&"rotate-180")})]})}),jsxRuntime.jsx(reactPopover.PopoverContent,{id:f?`${f}-content`:void 0,className:r("w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md",c&&"w-full"),align:"start",children:jsxRuntime.jsxs(Y,{children:[F&&jsxRuntime.jsx(Z,{placeholder:"Search...",className:"h-9",disabled:s}),jsxRuntime.jsxs(j,{className:"max-h-[12rem] overflow-y-auto",children:[jsxRuntime.jsx(ee,{children:"No items found."}),jsxRuntime.jsxs(q,{children:[b&&jsxRuntime.jsxs(W,{onSelect:$e,className:"flex items-center gap-2 cursor-pointer my-1",children:[jsxRuntime.jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded border border-primary",children:e.length===t.filter(p=>!p.disabled).length&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),jsxRuntime.jsx(te,{variant:"small",children:"Select All"})]}),jsxRuntime.jsx(fe,{})]}),n?n(t):jsxRuntime.jsx(q,{children:t.map(p=>jsxRuntime.jsxs(W,{value:p.id,onSelect:()=>w(p.id),disabled:p.disabled,className:r("flex items-center justify-between cursor-pointer my-1",p.disabled&&"opacity-50 cursor-not-allowed",p.className),children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded border border-primary",children:e.includes(p.id)&&jsxRuntime.jsx(lucideReact.Check,{className:"h-3 w-3"})}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[p.startIcon&&p.startIcon,jsxRuntime.jsx(te,{variant:"small",children:p.label})]})]}),p.endIcon&&jsxRuntime.jsx("div",{className:"ml-2",children:p.endIcon})]},p.id))})]})]})})]})})}function za({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,"aria-label":F,"aria-describedby":f,options:u,...b}){let{control:n}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:n,render:({field:d,fieldState:{error:a}})=>jsxRuntime.jsxs(h,{children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsx(Oe,{...d,options:u,value:d.value||[],onChange:d.onChange,className:r(a&&"border-destructive focus-visible:ring-destructive",m),disabled:l||N,required:i,placeholder:c,"aria-label":F,"aria-describedby":f,"aria-invalid":!!a,"aria-required":i,...b})}),o&&jsxRuntime.jsx(x,{children:o}),a&&jsxRuntime.jsx(C,{children:a.message}),!a&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}function Za({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,"aria-label":F,"aria-describedby":f,options:u,...b}){let{control:n}=reactHookForm.useFormContext();return jsxRuntime.jsx(P,{name:t,control:n,render:({field:d,fieldState:{error:a}})=>jsxRuntime.jsxs(h,{children:[e&&jsxRuntime.jsxs(R,{children:[e,i&&jsxRuntime.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsxRuntime.jsx(v,{children:jsxRuntime.jsx(Ee,{...d,options:u,value:d.value||"",onChange:d.onChange,className:r(a&&"border-destructive focus-visible:ring-destructive",m),disabled:l||N,required:i,placeholder:c,"aria-label":F,"aria-describedby":f,"aria-invalid":!!a,"aria-required":i,...b})}),o&&jsxRuntime.jsx(x,{children:o}),a&&jsxRuntime.jsx(C,{children:a.message}),!a&&s&&jsxRuntime.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}exports.Form=tt;exports.FormControl=v;exports.FormDescription=x;exports.FormField=P;exports.FormItem=h;exports.FormLabel=R;exports.FormMessage=C;exports.RHFCheckbox=wo;exports.RHFMultiSelect=za;exports.RHFRadioButtonGroup=na;exports.RHFRadioGroup=Uo;exports.RHFSelect=Za;exports.RHFSwitch=Do;exports.RHFTextField=ao;exports.RHFTextarea=fo;exports.useFormField=ae;//# sourceMappingURL=rhf.js.map
|
|
2
|
-
//# sourceMappingURL=rhf.js.map
|
package/dist/rhf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/cn.ts","../src/components/atoms/input/input.tsx","../src/components/atoms/label/label.tsx","../src/components/rhf/form/form.tsx","../src/components/rhf/rhf-text-field/rhf-text-field.tsx","../src/components/atoms/textarea/textarea.tsx","../src/components/rhf/rhf-textarea/rhf-textarea.tsx","../src/components/atoms/checkbox/checkbox.tsx","../src/components/rhf/rhf-checkbox/rhf-checkbox.tsx","../src/components/atoms/switch/switch.tsx","../src/components/rhf/rhf-switch/rhf-switch.tsx","../src/components/atoms/radio-group/radio-group.tsx","../src/components/rhf/rhf-radio-group/rhf-radio-group.tsx","../src/components/atoms/button/button.tsx","../src/components/rhf/rhf-radio-button-group/rhf-radio-button-group.tsx","../src/components/atoms/command/command.tsx","../src/components/atoms/typography/typography.tsx","../src/components/atoms/select/select.tsx","../src/components/atoms/select/multi-select.tsx","../src/components/rhf/rhf-multi-select/rhf-multi-select.tsx","../src/components/rhf/rhf-select/rhf-select.tsx"],"names":["cn","inputs","twMerge","clsx","Input","Re","className","type","props","ref","jsx","labelVariants","cva","Label","ve","Fe","Form","FormProvider","FormFieldContext","T","FormField","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","id","FormItem","FormLabel","error","formItemId","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","RHFTextField","name","label","description","warningText","required","disabled","readOnly","placeholder","ariaLabel","ariaDescribedby","onBlur","other","control","field","jsxs","e","Textarea","J","autoResize","internalRef","textarea","resizeTextarea","RHFTextarea","Checkbox","Te","re","Check","RHFCheckbox","Switch","Ie","ie","RHFSwitch","RadioGroup","se","H","RadioGroupItem","Circle","RadioItemContainer","RadioItemLabel","RHFRadioGroup","hasOptions","option","buttonVariants","Button","Le","variant","size","asChild","startIcon","endIcon","loading","Comp","isDisabled","buttonAriaLabel","handleKeyDown","event","Loader2","RHFRadioButtonGroup","options","Command","D","CommandPrimitive","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","typographyVariants","Typography","He","align","Component","Select","value","onChange","fullWidth","searchable","renderCommandList","open","setOpen","Ge","selectedOption","Popover","PopoverTrigger","ChevronDown","PopoverContent","MultiSelect","maxSelections","showSelectAll","_e","selectedOptions","handleSelect","optionId","selectedId","handleSelectAll","enabledOptions","handleRemove","X","o","RHFMultiSelect","RHFSelect"],"mappings":"ilCAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCMA,IAAMG,EAAAA,CAAcC,YAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,IAAAC,CAAAA,CAAAA,CAAM,GAAGC,CAAM,EAAGC,CAE5BC,GAAAA,cAAAA,CAAC,OACC,CAAA,CAAA,IAAA,CAAMH,CACN,CAAA,SAAA,CAAWP,EACT,yWACAM,CAAAA,CACF,CACA,CAAA,GAAA,CAAKG,CACJ,CAAA,GAAGD,EACN,CAGN,CAAA,CACAJ,GAAM,WAAc,CAAA,OAAA,CCpBpB,IAAMO,EAAgBC,CAAAA,0BAAAA,CACpB,4FACF,CAAA,CAaMC,CAAc,CAAAC,YAAA,CAAA,UAAA,CAClB,CAAC,CAAE,SAAA,CAAAR,CAAW,CAAA,GAAGE,CAAM,CAAA,CAAGC,IACxBC,cAAgB,CAAAK,aAAA,CAAA,IAAA,CAAf,CAAoB,GAAA,CAAKN,CAAK,CAAA,SAAA,CAAWT,EAAGW,EAAc,EAAA,CAAGL,CAAS,CAAI,CAAA,GAAGE,EAAO,CAEzF,CAAA,CACAK,CAAM,CAAA,WAAA,CAA6BE,aAAK,CAAA,IAAA,CAAA,WAAA,CCTlCC,IAAAA,EAAAA,CAAOC,0BASPC,CAAAA,EAAAA,CAAyBC,2BAAqC,EAA2B,C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EACAG,CAAYtC,EAAAA,cAAAA,CAAC,MAAK,CAAA,CAAA,SAAA,CAAU,uBAAwB,CAAA,QAAA,CAAA,GAAA,CAAC,GACxD,CAEFA,CAAAA,cAAAA,CAACyB,CAAA,CAAA,CACC,QAAAzB,CAAAA,cAAAA,CAAC4G,GAAA,CACE,GAAG7D,CACJ,CAAA,OAAA,CAAS6C,CACT,CAAA,KAAA,CAAO7C,EAAM,KAAS,EAAA,EAAA,CACtB,QAAUA,CAAAA,CAAAA,CAAM,QAChB,CAAA,SAAA,CAAWzD,EACTiC,CAAS,EAAA,mDAAA,CACT3B,CACF,CAAA,CACA,QAAU2C,CAAAA,CAAAA,EAAYC,EACtB,QAAUF,CAAAA,CAAAA,CACV,WAAaG,CAAAA,CAAAA,CACb,YAAYC,CAAAA,CAAAA,CACZ,mBAAkBC,CAClB,CAAA,cAAA,CAAc,CAAC,CAACpB,CAChB,CAAA,eAAA,CAAee,EACd,GAAGO,CAAAA,CACN,CACF,CAAA,CAAA,CACCT,CAAepC,EAAAA,cAAAA,CAAC6B,EAAA,CAAiB,QAAA,CAAAO,CAAY,CAAA,CAAA,CAC7Cb,CAASvB,EAAAA,cAAAA,CAAC8B,EAAA,CAAa,QAAA,CAAAP,CAAM,CAAA,OAAA,CAAQ,CACrC,CAAA,CAACA,GAASc,CACTrC,EAAAA,cAAAA,CAAC,GAAE,CAAA,CAAA,SAAA,CAAU,8CAA+C,CAAA,IAAA,CAAK,QAC9D,QAAAqC,CAAAA,CAAAA,CACH,CAEJ,CAAA,CAAA,CAAA,CAEJ,CAEJ","file":"rhf.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues\n} from \"react-hook-form\"\n\nimport { cn } from \"@/utils/cn\"\nimport { Label } from \"@/components/atoms/label\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue)\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const { id } = itemContext\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue)\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n }\n)\nFormItem.displayName = \"FormItem\"\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField()\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n )\n})\nFormLabel.displayName = \"FormLabel\"\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n})\nFormControl.displayName = \"FormControl\"\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField()\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n )\n})\nFormDescription.displayName = \"FormDescription\"\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : children\n\n if (!body) {\n return null\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-sm font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n )\n})\nFormMessage.displayName = \"FormMessage\"\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Input } from \"@/components/atoms/input\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextFieldProps } from \"./rhf-text-field.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A text field component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextfield--docs\n *\n * * @example\n * ```tsx\n * <Form>\n * <RHFTextField name=\"name\" label=\"Name\" />\n * <RHFTextField name=\"email\" label=\"Email\" />\n * </Form>\n * ```\n */\nexport function RHFTextField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n type = \"text\",\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextFieldProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Input\n {...field}\n type={type}\n value={type === \"number\" && field.value === 0 ? \"\" : field.value}\n onChange={(e) => {\n if (type === \"number\") {\n field.onChange(Number(e.target.value))\n } else {\n field.onChange(e.target.value)\n }\n }}\n onBlur={(e) => {\n // trim if a string\n if (type !== \"number\" && typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport { TextareaProps } from \"./textarea.types\"\n\n/**\n * Textarea component for creating accessible text areas.\n * Built on top of shadcn/ui's Textarea component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs\n *\n * @example\n * ```tsx\n * <Textarea placeholder=\"Enter text\" />\n * ```\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoResize = false, ...props }, ref) => {\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n\n React.useEffect(() => {\n if (!autoResize || !internalRef.current) return\n\n const textarea = internalRef.current\n const resizeTextarea = () => {\n textarea.style.height = \"auto\"\n textarea.style.height = `${textarea.scrollHeight}px`\n }\n\n textarea.addEventListener(\"input\", resizeTextarea)\n resizeTextarea() // Initial resize\n\n return () => textarea.removeEventListener(\"input\", resizeTextarea)\n }, [autoResize])\n\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Textarea } from \"@/components/atoms/textarea\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFTextareaProps } from \"./rhf-textarea.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A textarea component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhftextarea--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFTextarea name=\"description\" label=\"Description\" />\n * </Form>\n * ```\n */\nexport function RHFTextarea<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n autoResize,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n onBlur,\n ...other\n}: RHFTextareaProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n {...field}\n value={field.value}\n onChange={(e) => {\n field.onChange(e.target.value)\n }}\n onBlur={(e) => {\n // trim if a string\n if (typeof field.value === \"string\") {\n field.onChange(field.value.trim())\n }\n field.onBlur() // pass to react-hook-form\n onBlur?.(e) // pass to wrapper\n }}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n autoResize={autoResize}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","/**\n * Checkbox component built on top of Radix UI's Checkbox primitive.\n * Provides a customizable checkbox input with proper accessibility and keyboard navigation.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-checkbox--docs\n *\n * @example\n * ```tsx\n * <Checkbox id=\"terms\" name=\"terms\" />\n * <label htmlFor=\"terms\">Accept terms and conditions</label>\n * ```\n */\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\nimport type { CheckboxProps } from \"./checkbox.types\"\n\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n aria-hidden=\"true\"\n >\n <Check className=\"h-4 w-4\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Checkbox } from \"@/components/atoms/checkbox\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFCheckboxProps } from \"./rhf-checkbox.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A checkbox component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfcheckbox--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFCheckbox name=\"terms\" label=\"Accept terms and conditions\" />\n * </Form>\n * ```\n */\nexport function RHFCheckbox<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RHFCheckboxProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"flex flex-row items-start space-x-3 space-y-0\">\n <FormControl>\n <Checkbox\n checked={field.value}\n onCheckedChange={field.onChange}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </div>\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/utils/index\"\nimport { SwitchProps } from \"./switch.types\"\n\n/**\n * Switch component that provides a toggle input control.\n * Built on top of Radix UI's Switch primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-switch--docs\n *\n * @example\n * ```tsx\n * <Switch />\n * <Switch defaultChecked />\n * <Switch disabled />\n * ```\n */\nconst Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>, SwitchProps>(\n ({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n )\n)\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Switch } from \"@/components/atoms/switch\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFSwitchProps } from \"./rhf-switch.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A switch component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfswitch--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFSwitch name=\"notifications\" label=\"Enable notifications\" />\n * </Form>\n * ```\n */\nexport function RHFSwitch<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n ...other\n}: RHFSwitchProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"flex flex-row items-start space-x-3 space-y-0\">\n <FormControl>\n <Switch\n checked={field.value}\n onCheckedChange={field.onChange}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </div>\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport { Circle } from \"lucide-react\"\n\nimport { cn } from \"@/utils\"\nimport { Label } from \"@/components/atoms/label\"\n\n/**\n * RadioGroup component that allows users to select a single option from a list.\n * Built on top of Radix UI's RadioGroup primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-radio-group--docs\n *\n * @example\n * ```tsx\n * <RadioGroup defaultValue=\"option-1\">\n * <RadioGroupItem value=\"option-1\">Option 1</RadioGroupItem>\n * <RadioGroupItem value=\"option-2\">Option 2</RadioGroupItem>\n * </RadioGroup>\n * ```\n */\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn(\"grid gap-3\", className)} {...props} ref={ref} />\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\n/**\n * RadioGroupItem component that represents a single option in a RadioGroup.\n * Built on top of Radix UI's RadioGroupItem primitive.\n *\n * @example\n * ```tsx\n * <RadioGroupItem value=\"option-1\">Option 1</RadioGroupItem>\n * ```\n */\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"h-3.5 w-3.5 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\n/**\n * RadioItemContainer component that provides a container for radio group items with proper spacing and layout.\n *\n * @example\n * ```tsx\n * <RadioItemContainer>\n * <RadioGroupItem value=\"option-1\">Option 1</RadioGroupItem>\n * <RadioGroupItem value=\"option-2\">Option 2</RadioGroupItem>\n * </RadioItemContainer>\n * ```\n */\nconst RadioItemContainer = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return <div ref={ref} className={cn(\"flex items-center gap-2\", className)} {...props} />\n }\n)\nRadioItemContainer.displayName = \"RadioItemContainer\"\n\n/**\n * RadioItemLabel component that provides a label for individual radio items.\n * Built on top of the Label component.\n *\n * @example\n * ```tsx\n * <RadioItemLabel>Select an option</RadioItemLabel>\n * ```\n */\nconst RadioItemLabel = React.forwardRef<\n React.ElementRef<typeof Label>,\n React.ComponentPropsWithoutRef<typeof Label>\n>(({ className, ...props }, ref) => {\n return (\n <Label\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className\n )}\n {...props}\n />\n )\n})\nRadioItemLabel.displayName = \"RadioItemLabel\"\n\nexport { RadioGroup, RadioGroupItem, RadioItemContainer, RadioItemLabel }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport {\n RadioGroup,\n RadioGroupItem,\n RadioItemLabel,\n RadioItemContainer\n} from \"@/components/atoms/radio-group\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport {\n RHFRadioGroupOption,\n type RHFRadioGroupProps,\n type RHFRadioGroupWithOptionsProps\n} from \"./rhf-radio-group.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A radio group component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiogroup--docs\n *\n * @example\n * ```tsx\n * // Using children\n * <Form>\n * <RHFRadioGroup name=\"preference\" label=\"Select your preference\">\n * <RadioGroupItem value=\"option1\" label=\"Option 1\" />\n * <RadioGroupItem value=\"option2\" label=\"Option 2\" />\n * </RHFRadioGroup>\n * </Form>\n *\n * // Using options prop\n * <Form>\n * <RHFRadioGroup\n * name=\"preference\"\n * label=\"Select your preference\"\n * options={[\n * { id: \"option1\", label: \"Option 1\" },\n * { id: \"option2\", label: \"Option 2\" }\n * ]}\n * />\n * </Form>\n * ```\n */\nexport function RHFRadioGroup<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n children,\n ...other\n}: RHFRadioGroupProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n const hasOptions = \"options\" in other\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"space-y-3\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <RadioGroup\n onValueChange={field.onChange}\n defaultValue={field.value}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n >\n {hasOptions &&\n (other as RHFRadioGroupWithOptionsProps<TFieldValues, TName>).options.map(\n (option: RHFRadioGroupOption) => (\n <RadioItemContainer key={option.id}>\n <RadioGroupItem value={option.id} id={option.id} />\n <RadioItemLabel htmlFor={option.id}>{option.label}</RadioItemLabel>\n </RadioItemContainer>\n )\n )}\n {!hasOptions && children}\n </RadioGroup>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { Loader2 } from \"lucide-react\"\nimport { ButtonProps } from \"./button.types\"\n\n/**\n * Button variant styles using class-variance-authority.\n * Defines the visual styles for different button variants and sizes.\n * Follows WCAG 2.1 Level AA guidelines for accessibility.\n *\n * @example\n * ```tsx\n * <Button variant=\"primary\" size=\"lg\">Click me</Button>\n * ```\n */\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive: \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\"\n } as const,\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\"\n } as const\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n)\n\n/**\n * A versatile button component that supports multiple variants, sizes, and can be rendered as a child component.\n * Built on top of Radix UI's Slot primitive for maximum flexibility.\n * Implements proper accessibility features and follows WCAG 2.1 Level AA guidelines.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-button--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Destructive button with small size\n * <Button variant=\"destructive\" size=\"sm\">Delete</Button>\n *\n * // As a link\n * <Button variant=\"link\" asChild>\n * <a href=\"/about\">About</a>\n * </Button>\n *\n * // With icons\n * <Button startIcon={<Icon />}>With Start Icon</Button>\n * <Button endIcon={<Icon />}>With End Icon</Button>\n *\n * // Loading state\n * <Button loading>Loading</Button>\n * ```\n *\n * @param {ButtonProps} props - The component props\n * @param {React.Ref<HTMLButtonElement>} ref - Forwarded ref\n * @returns {JSX.Element} A button element\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n startIcon,\n endIcon,\n loading = false,\n disabled,\n children,\n type = \"button\",\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const isDisabled = disabled || loading\n const buttonAriaLabel = ariaLabel || (typeof children === \"string\" ? children : undefined)\n\n // Handle keyboard interaction\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n if (!isDisabled && props.onClick) {\n props.onClick(event as unknown as React.MouseEvent<HTMLButtonElement>)\n }\n }\n }\n\n if (asChild) {\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n {...props}\n >\n {children}\n </Comp>\n )\n }\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={isDisabled}\n type={type}\n aria-label={buttonAriaLabel}\n aria-disabled={isDisabled}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {loading && (\n <Loader2\n className=\"mr-2 h-4 w-4 animate-spin\"\n role=\"status\"\n aria-label=\"Loading\"\n aria-hidden=\"true\"\n />\n )}\n {!loading && startIcon && (\n <span className=\"mr-2\" aria-hidden=\"true\">\n {startIcon}\n </span>\n )}\n {children}\n {!loading && endIcon && (\n <span className=\"ml-2\" aria-hidden=\"true\">\n {endIcon}\n </span>\n )}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { RadioGroup } from \"@/components/atoms/radio-group\"\nimport { Button } from \"@/components/atoms/button\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFRadioButtonGroupProps } from \"./rhf-radio-button-group.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A radio button group component that integrates with React Hook Form.\n * Uses buttons instead of traditional radio inputs for a more modern look.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfradiobuttongroup--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFRadioButtonGroup\n * name=\"preference\"\n * label=\"Select your preference\"\n * options={[\n * { value: \"option1\", label: \"Option 1\" },\n * { value: \"option2\", label: \"Option 2\" },\n * { value: \"option3\", label: \"Option 3\" }\n * ]}\n * />\n * </Form>\n * ```\n */\nexport function RHFRadioButtonGroup<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n options,\n ...other\n}: RHFRadioButtonGroupProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem className=\"space-y-3\">\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <RadioGroup\n onValueChange={field.onChange}\n defaultValue={field.value}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n className=\"flex gap-2 p-2 border border-gray-200 rounded-md w-fit\"\n {...other}\n >\n {options.map((option) => (\n <Button\n key={option.id}\n size={option.size ?? \"sm\"}\n variant={field.value === option.id ? \"default\" : \"secondary\"}\n onClick={() => field.onChange(option.id)}\n role=\"radio\"\n aria-checked={field.value === option.id}\n disabled={disabled}\n >\n {option.label}\n </Button>\n ))}\n </RadioGroup>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {warningText && <FormDescription className=\"text-warning\">{warningText}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n </FormItem>\n )}\n />\n )\n}\n","import * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\nimport { Dialog, DialogContent } from \"@/components/atoms/dialog\"\nimport {\n type CommandProps,\n type CommandRef,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandInputRef,\n type CommandListProps,\n type CommandListRef,\n type CommandEmptyProps,\n type CommandEmptyRef,\n type CommandGroupProps,\n type CommandGroupRef,\n type CommandSeparatorProps,\n type CommandSeparatorRef,\n type CommandItemProps,\n type CommandItemRef,\n type CommandShortcutProps\n} from \"./command.types\"\n\n/**\n * Command component that provides a command palette interface.\n * Built on top of cmdk and Radix UI's Dialog primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-command--docs\n *\n * @example\n * ```tsx\n * <Command>\n * <CommandInput placeholder=\"Search...\" />\n * <CommandList>\n * <CommandEmpty>No results found.</CommandEmpty>\n * <CommandGroup heading=\"Suggestions\">\n * <CommandItem>Calendar</CommandItem>\n * <CommandItem>Search</CommandItem>\n * </CommandGroup>\n * </CommandList>\n * </Command>\n * ```\n */\nconst Command = React.forwardRef<CommandRef, CommandProps>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<CommandInputRef, CommandInputProps>(\n ({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n )\n)\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<CommandListRef, CommandListProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n )\n)\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<CommandEmptyRef, CommandEmptyProps>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<CommandGroupRef, CommandGroupProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n)\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<CommandSeparatorRef, CommandSeparatorProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n )\n)\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<CommandItemRef, CommandItemProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className\n )}\n {...props}\n />\n )\n)\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: CommandShortcutProps) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nconst typographyVariants = cva(\"\", {\n variants: {\n variant: {\n h1: \"scroll-m-5 text-4xl font-extrabold tracking-tight lg:text-5xl\",\n h2: \"scroll-m-5 text-3xl font-semibold tracking-tight\",\n h3: \"scroll-m-5 text-2xl font-semibold tracking-tight\",\n h4: \"scroll-m-5 text-xl font-semibold tracking-tight\",\n h5: \"scroll-m-5 text-lg font-semibold tracking-tight\",\n h6: \"scroll-m-5 text-base font-semibold tracking-tight\",\n p: \"leading-7 [&:not(:first-child)]:mt-6\",\n blockquote: \"mt-6 border-l-2 border-slate-300 pl-6 italic\",\n list: \"my-6 ml-6 list-disc [&>li]:mt-2\",\n lead: \"text-xl text-muted-foreground\",\n large: \"text-lg font-semibold\",\n small: \"text-sm font-medium leading-none\",\n muted: \"text-sm text-muted-foreground\"\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n justify: \"text-justify\"\n }\n },\n defaultVariants: {\n variant: \"p\",\n align: \"left\"\n }\n})\n\nexport interface TypographyProps\n extends React.HTMLAttributes<HTMLElement>,\n VariantProps<typeof typographyVariants> {\n as?: React.ElementType\n}\n\n/**\n * Typography component for creating accessible text elements.\n * Built on top of shadcn/ui's Typography component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-typography--docs\n *\n */\nconst Typography = React.forwardRef<HTMLElement, TypographyProps>(\n ({ className, variant, align, as: Component = \"p\", ...props }, ref) => {\n return (\n <Component\n className={cn(typographyVariants({ variant, align, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTypography.displayName = \"Typography\"\n\nexport { Typography, typographyVariants }\n","\"use client\"\n\nimport * as React from \"react\"\nimport { ChevronDown } from \"lucide-react\"\n\nimport { cn } from \"@/utils\"\n\nimport { Popover, PopoverContent, PopoverTrigger } from \"@radix-ui/react-popover\"\nimport { Button } from \"../button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList\n} from \"../command\"\nimport { Typography } from \"../typography\"\n\nexport type SelectOption = {\n id: string\n label: string\n startIcon?: React.ReactNode\n endIcon?: React.ReactNode\n className?: string\n disabled?: boolean\n}\n\nexport type SelectProps = {\n /** Whether the select is searchable */\n searchable?: boolean\n /** Whether the select should take up the full width of its container */\n fullWidth?: boolean\n /** Currently selected value */\n value: string\n /** Array of options to display in the select */\n options: SelectOption[]\n /** Callback fired when the value changes */\n // eslint-disable-next-line no-unused-vars\n onChange: (value: string) => void\n /** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */\n // eslint-disable-next-line no-unused-vars\n renderCommandList?: (options: SelectOption[]) => React.ReactNode\n /** Placeholder text to show when no value is selected */\n placeholder?: string\n /** Whether the select is disabled */\n disabled?: boolean\n /** Whether the select is required */\n required?: boolean\n /** Error message to display */\n error?: string\n /** Additional class name for the select */\n className?: string\n /** ID for the select element */\n id?: string\n}\n\n/**\n * SearchableSelect component that provides a searchable dropdown select input.\n * Built on top of Radix UI's Select primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs-atoms-select--docs\n *\n * @example\n * ```tsx\n * <Select\n * options={[\n * { id: \"1\", label: \"Option 1\" },\n * { id: \"2\", label: \"Option 2\" }\n * ]}\n * value=\"1\"\n * onChange={setValue}\n * required\n * />\n * ```\n */\nexport function Select({\n options,\n value,\n onChange,\n placeholder = \"Select an option\",\n disabled,\n required,\n error,\n className,\n fullWidth,\n searchable,\n id,\n renderCommandList\n}: SelectProps) {\n const [open, setOpen] = React.useState(false)\n const selectedOption = options?.find((option) => option.id === value)\n\n return (\n <div className={cn(fullWidth && \"w-full\")}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={id ? `${id}-content` : undefined}\n aria-required={required}\n aria-invalid={!!error}\n disabled={disabled}\n className={cn(\n \"w-[13rem] justify-between\",\n !value && \"text-muted-foreground\",\n fullWidth && \"w-full\",\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n >\n {selectedOption ? selectedOption.label : placeholder}\n <ChevronDown className={cn(\"opacity-50\", open && \"rotate-180\")} />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className={cn(\n \"w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md\",\n fullWidth && \"w-full\"\n )}\n align=\"start\"\n >\n <Command>\n {searchable && (\n <CommandInput placeholder=\"Search...\" className=\"h-9\" disabled={disabled} />\n )}\n <CommandList className=\"max-h-[12rem] overflow-y-auto\">\n <CommandEmpty>No items found.</CommandEmpty>\n {renderCommandList ? (\n renderCommandList(options)\n ) : (\n <CommandGroup>\n {options?.map((option) => (\n <CommandItem\n value={option.label}\n key={option.id}\n onSelect={() => {\n onChange(option.id)\n setOpen(false)\n }}\n disabled={option.disabled}\n className={cn(\n \"flex items-center justify-between cursor-pointer my-1\",\n value === option.id && \"bg-accent text-accent-foreground\",\n option.disabled && \"opacity-50 cursor-not-allowed\",\n option.className\n )}\n >\n <div className=\"flex items-center gap-1\">\n {option.startIcon && option.startIcon}\n <Typography variant=\"small\">{option.label}</Typography>\n </div>\n {option.endIcon && <div className=\"ml-2\">{option.endIcon}</div>}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/utils\"\n\nimport { Popover, PopoverContent, PopoverTrigger } from \"@radix-ui/react-popover\"\nimport { Button } from \"../button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator\n} from \"../command\"\nimport { Typography } from \"../typography\"\n\nexport type MultiSelectOption = {\n id: string\n label: string\n startIcon?: React.ReactNode\n endIcon?: React.ReactNode\n className?: string\n disabled?: boolean\n}\n\nexport type MultiSelectProps = {\n /** Whether the select is searchable */\n searchable?: boolean\n /** Whether the select should take up the full width of its container */\n fullWidth?: boolean\n /** Array of options to display in the select */\n options: MultiSelectOption[]\n /** Currently selected values */\n value: string[]\n /** Callback fired when the values change */\n // eslint-disable-next-line no-unused-vars\n onChange: (value: string[]) => void\n /** Render a custom CommandList for the select, if not provided, the select will render a default CommandList with the options */\n // eslint-disable-next-line no-unused-vars\n renderCommandList?: (options: MultiSelectOption[]) => React.ReactNode\n /** Placeholder text to show when no value is selected */\n placeholder?: string\n /** Whether the select is disabled */\n disabled?: boolean\n /** Whether the select is required */\n required?: boolean\n /** Error message to display */\n error?: string\n /** Additional class name for the select */\n className?: string\n /** ID for the select element */\n id?: string\n /** Maximum number of selections allowed */\n maxSelections?: number\n /** Whether to show the select all option */\n showSelectAll?: boolean\n}\n\n/**\n * MultiSelect component that provides a searchable dropdown select input with multiple selection.\n * Built on top of Radix UI's Select primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs-atoms-multiselect--docs\n *\n * @example\n * ```tsx\n * <MultiSelect\n * options={[\n * { id: \"1\", label: \"Option 1\" },\n * { id: \"2\", label: \"Option 2\" }\n * ]}\n * value={[\"1\"]}\n * onChange={setValue}\n * showSelectAll\n * />\n * ```\n */\nexport function MultiSelect({\n options,\n value,\n onChange,\n placeholder = \"Select options\",\n disabled,\n required,\n error,\n className,\n fullWidth,\n searchable,\n id,\n maxSelections,\n showSelectAll,\n renderCommandList\n}: MultiSelectProps) {\n const [open, setOpen] = React.useState(false)\n const selectedOptions = options.filter((option) => value.includes(option.id))\n\n const handleSelect = (optionId: string) => {\n if (value.includes(optionId)) {\n onChange(value.filter((selectedId) => selectedId !== optionId))\n } else {\n if (maxSelections && value.length >= maxSelections) {\n return\n }\n onChange([...value, optionId])\n }\n }\n\n const handleSelectAll = () => {\n const enabledOptions = options.filter((option) => !option.disabled)\n if (value.length === enabledOptions.length) {\n onChange([])\n } else {\n onChange(enabledOptions.map((option) => option.id))\n }\n }\n\n const handleRemove = (optionId: string, e: React.MouseEvent) => {\n e.stopPropagation()\n onChange(value.filter((selectedId) => selectedId !== optionId))\n }\n\n return (\n <div className={cn(fullWidth && \"w-full\")}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n aria-controls={id ? `${id}-content` : undefined}\n aria-label={placeholder}\n aria-required={required}\n aria-invalid={!!error}\n disabled={disabled}\n id={id}\n className={cn(\n \"w-[13rem] justify-between min-h-[2.5rem] h-auto\",\n !value.length && \"text-muted-foreground\",\n fullWidth && \"w-full\",\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n >\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.length > 0 ? (\n selectedOptions.map((option) => (\n <div\n key={option.id}\n className=\"flex items-center gap-1 bg-secondary text-secondary-foreground px-2 py-0.5 rounded-md text-sm\"\n >\n <span>{option.label}</span>\n <span\n onClick={(e) => handleRemove(option.id, e)}\n className=\"hover:bg-secondary-foreground/20 rounded-sm\"\n >\n <X className=\"h-3 w-3\" />\n </span>\n </div>\n ))\n ) : (\n <span>{placeholder}</span>\n )}\n </div>\n <ChevronDown className={cn(\"opacity-50\", open && \"rotate-180\")} />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n id={id ? `${id}-content` : undefined}\n className={cn(\n \"w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md\",\n fullWidth && \"w-full\"\n )}\n align=\"start\"\n >\n <Command>\n {searchable && (\n <CommandInput placeholder=\"Search...\" className=\"h-9\" disabled={disabled} />\n )}\n <CommandList className=\"max-h-[12rem] overflow-y-auto\">\n <CommandEmpty>No items found.</CommandEmpty>\n <CommandGroup>\n {showSelectAll && (\n <CommandItem\n onSelect={handleSelectAll}\n className=\"flex items-center gap-2 cursor-pointer my-1\"\n >\n <div className=\"flex h-4 w-4 items-center justify-center rounded border border-primary\">\n {value.length === options.filter((o) => !o.disabled).length && (\n <Check className=\"h-3 w-3\" />\n )}\n </div>\n <Typography variant=\"small\">Select All</Typography>\n </CommandItem>\n )}\n <CommandSeparator />\n </CommandGroup>\n {renderCommandList ? (\n renderCommandList(options)\n ) : (\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n value={option.id}\n key={option.id}\n onSelect={() => handleSelect(option.id)}\n disabled={option.disabled}\n className={cn(\n \"flex items-center justify-between cursor-pointer my-1\",\n option.disabled && \"opacity-50 cursor-not-allowed\",\n option.className\n )}\n >\n <div className=\"flex items-center gap-2\">\n <div className=\"flex h-4 w-4 items-center justify-center rounded border border-primary\">\n {value.includes(option.id) && <Check className=\"h-3 w-3\" />}\n </div>\n <div className=\"flex items-center gap-1\">\n {option.startIcon && option.startIcon}\n <Typography variant=\"small\">{option.label}</Typography>\n </div>\n </div>\n {option.endIcon && <div className=\"ml-2\">{option.endIcon}</div>}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { MultiSelect } from \"@/components/atoms/select\"\n\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFMultiSelectProps } from \"./rhf-multi-select.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A multi-select component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfmultiselect--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFMultiSelect\n * name=\"countries\"\n * label=\"Countries\"\n * options={[\n * { id: \"us\", label: \"United States\" },\n * { id: \"ca\", label: \"Canada\" }\n * ]}\n *\n * />\n * </Form>\n * ```\n */\nexport function RHFMultiSelect<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n options,\n ...other\n}: RHFMultiSelectProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => {\n return (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <MultiSelect\n {...field}\n options={options}\n value={field.value || []}\n onChange={field.onChange}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled || readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )\n }}\n />\n )\n}\n","import * as React from \"react\"\nimport { useFormContext, type FieldValues, type FieldPath } from \"react-hook-form\"\nimport { Select } from \"@/components/atoms/select\"\nimport { cn } from \"@/utils/cn\"\nimport {\n FormControl,\n FormItem,\n FormMessage,\n FormLabel,\n FormDescription,\n FormField\n} from \"@/components/rhf/form\"\nimport { type RHFSelectProps } from \"./rhf-select.types\"\n\n// ----------------------------------------------------------------------\n\n/**\n * A select component that integrates with React Hook Form.\n * Provides form validation, error handling, and accessibility features.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/molecules-rhf-rhfselect--docs\n *\n * @example\n * ```tsx\n * <Form>\n * <RHFSelect\n * name=\"country\"\n * label=\"Country\"\n * options={[\n * { id: \"us\", label: \"United States\" },\n * { id: \"ca\", label: \"Canada\" }\n * ]}\n * />\n * </Form>\n * ```\n */\nexport function RHFSelect<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>\n>({\n name,\n label,\n description,\n className,\n warningText,\n required,\n disabled,\n readOnly,\n placeholder,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedby,\n options,\n ...other\n}: RHFSelectProps<TFieldValues, TName>) {\n const { control } = useFormContext<TFieldValues>()\n\n return (\n <FormField\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormItem>\n {label && (\n <FormLabel>\n {label}\n {required && <span className=\"text-destructive ml-1\">*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Select\n {...field}\n options={options}\n value={field.value || \"\"}\n onChange={field.onChange}\n className={cn(\n error && \"border-destructive focus-visible:ring-destructive\",\n className\n )}\n disabled={disabled || readOnly}\n required={required}\n placeholder={placeholder}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-invalid={!!error}\n aria-required={required}\n {...other}\n />\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {error && <FormMessage>{error.message}</FormMessage>}\n {!error && warningText && (\n <p className=\"text-sm text-yellow-600 dark:text-yellow-500\" role=\"alert\">\n {warningText}\n </p>\n )}\n </FormItem>\n )}\n />\n )\n}\n"]}
|
package/dist/rhf.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {useFormContext,FormProvider,Controller}from'react-hook-form';import*as T from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';import {Slot}from'@radix-ui/react-slot';import*as Fe from'@radix-ui/react-label';import {cva}from'class-variance-authority';import*as re from'@radix-ui/react-checkbox';import {Check,Circle,Loader2,Search,X as X$1,ChevronDown}from'lucide-react';import*as ie from'@radix-ui/react-switch';import*as H from'@radix-ui/react-radio-group';import {Popover,PopoverTrigger,PopoverContent}from'@radix-ui/react-popover';import {Command}from'cmdk';function r(...t){return twMerge(clsx(t))}var be=T.forwardRef(({className:t,type:e,...o},m)=>jsx("input",{type:e,className:r("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:m,...o}));be.displayName="Input";var Qe=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),X=T.forwardRef(({className:t,...e},o)=>jsx(Fe.Root,{ref:o,className:r(Qe(),t),...e}));X.displayName=Fe.Root.displayName;var tt=FormProvider,Ce=T.createContext({}),P=({...t})=>jsx(Ce.Provider,{value:{name:t.name},children:jsx(Controller,{...t})}),ae=()=>{let t=T.useContext(Ce),e=T.useContext(Ne),{getFieldState:o,formState:m}=useFormContext(),s=o(t.name,m);if(!t)throw new Error("useFormField should be used within <FormField>");let{id:i}=e;return {id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},Ne=T.createContext({}),h=T.forwardRef(({className:t,...e},o)=>{let m=T.useId();return jsx(Ne.Provider,{value:{id:m},children:jsx("div",{ref:o,className:r("space-y-2",t),...e})})});h.displayName="FormItem";var R=T.forwardRef(({className:t,...e},o)=>{let{error:m,formItemId:s}=ae();return jsx(X,{ref:o,className:r(m&&"text-destructive",t),htmlFor:s,...e})});R.displayName="FormLabel";var v=T.forwardRef(({...t},e)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=ae();return jsx(Slot,{ref:e,id:m,"aria-describedby":o?`${s} ${i}`:`${s}`,"aria-invalid":!!o,...t})});v.displayName="FormControl";var x=T.forwardRef(({className:t,...e},o)=>{let{formDescriptionId:m}=ae();return jsx("p",{ref:o,id:m,className:r("text-sm text-muted-foreground",t),...e})});x.displayName="FormDescription";var C=T.forwardRef(({className:t,children:e,...o},m)=>{let{error:s,formMessageId:i}=ae(),l=s?String(s?.message??""):e;return l?jsx("p",{ref:m,id:i,className:r("text-sm font-medium text-destructive",t),...o,children:l}):null});C.displayName="FormMessage";function ao({name:t,label:e,description:o,className:m,type:s="text",warningText:i,required:l,disabled:N,readOnly:c,placeholder:F,"aria-label":f,"aria-describedby":u,onBlur:b,...n}){let{control:d}=useFormContext();return jsx(P,{name:t,control:d,render:({field:a,fieldState:{error:y}})=>jsxs(h,{children:[e&&jsxs(R,{children:[e,l&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsx(be,{...a,type:s,value:s==="number"&&a.value===0?"":a.value,onChange:w=>{s==="number"?a.onChange(Number(w.target.value)):a.onChange(w.target.value);},onBlur:w=>{s!=="number"&&typeof a.value=="string"&&a.onChange(a.value.trim()),a.onBlur(),b?.(w);},className:r(y&&"border-destructive focus-visible:ring-destructive",m),disabled:N,readOnly:c,required:l,placeholder:F,"aria-label":f,"aria-describedby":u,"aria-invalid":!!y,"aria-required":l,...n})}),o&&jsx(x,{children:o}),y&&jsx(C,{children:y.message}),!y&&i&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:i})]})})}var ye=T.forwardRef(({className:t,autoResize:e=false,...o},m)=>{let s=T.useRef(null);return T.useEffect(()=>{if(!e||!s.current)return;let i=s.current,l=()=>{i.style.height="auto",i.style.height=`${i.scrollHeight}px`;};return i.addEventListener("input",l),l(),()=>i.removeEventListener("input",l)},[e]),jsx("textarea",{className:r("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:m,...o})});ye.displayName="Textarea";function fo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,autoResize:F,"aria-label":f,"aria-describedby":u,onBlur:b,...n}){let{control:d}=useFormContext();return jsx(P,{name:t,control:d,render:({field:a,fieldState:{error:y}})=>jsxs(h,{children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsx(ye,{...a,value:a.value,onChange:w=>{a.onChange(w.target.value);},onBlur:w=>{typeof a.value=="string"&&a.onChange(a.value.trim()),a.onBlur(),b?.(w);},className:r(y&&"border-destructive focus-visible:ring-destructive",m),disabled:l,readOnly:N,required:i,placeholder:c,"aria-label":f,"aria-describedby":u,"aria-invalid":!!y,"aria-required":i,autoResize:F,...n})}),o&&jsx(x,{children:o}),y&&jsx(C,{children:y.message}),!y&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}var me=T.forwardRef(({className:t,...e},o)=>jsx(re.Root,{ref:o,className:r("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...e,children:jsx(re.Indicator,{className:r("flex items-center justify-center text-current"),"aria-hidden":"true",children:jsx(Check,{className:"h-4 w-4"})})}));me.displayName=re.Root.displayName;function wo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,...f}){let{control:u}=useFormContext();return jsx(P,{name:t,control:u,render:({field:b,fieldState:{error:n}})=>jsxs(h,{className:"flex flex-row items-start space-x-3 space-y-0",children:[jsx(v,{children:jsx(me,{checked:b.value,onCheckedChange:b.onChange,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!n,"aria-required":i,...f})}),jsxs("div",{className:"space-y-1 leading-none",children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),o&&jsx(x,{children:o}),n&&jsx(C,{children:n.message}),!n&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})]})})}var le=T.forwardRef(({className:t,...e},o)=>jsx(ie.Root,{className:r("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:o,children:jsx(ie.Thumb,{className:r("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));le.displayName=ie.Root.displayName;function Do({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,...f}){let{control:u}=useFormContext();return jsx(P,{name:t,control:u,render:({field:b,fieldState:{error:n}})=>jsxs(h,{className:"flex flex-row items-start space-x-3 space-y-0",children:[jsx(v,{children:jsx(le,{checked:b.value,onCheckedChange:b.onChange,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!n,"aria-required":i,...f})}),jsxs("div",{className:"space-y-1 leading-none",children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),o&&jsx(x,{children:o}),n&&jsx(C,{children:n.message}),!n&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})]})})}var U=T.forwardRef(({className:t,...e},o)=>jsx(H.Root,{className:r("grid gap-3",t),...e,ref:o}));U.displayName=H.Root.displayName;var ne=T.forwardRef(({className:t,...e},o)=>jsx(H.Item,{ref:o,className:r("aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:jsx(H.Indicator,{className:"flex items-center justify-center",children:jsx(Circle,{className:"h-3.5 w-3.5 fill-primary"})})}));ne.displayName=H.Item.displayName;var de=T.forwardRef(({className:t,...e},o)=>jsx("div",{ref:o,className:r("flex items-center gap-2",t),...e}));de.displayName="RadioItemContainer";var pe=T.forwardRef(({className:t,...e},o)=>jsx(X,{ref:o,className:r("text-sm font-medium leading-none cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),...e}));pe.displayName="RadioItemLabel";function Uo({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,children:f,...u}){let{control:b}=useFormContext(),n="options"in u;return jsx(P,{name:t,control:b,render:({field:d,fieldState:{error:a}})=>jsxs(h,{className:"space-y-3",children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsxs(U,{onValueChange:d.onChange,defaultValue:d.value,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!a,"aria-required":i,...u,children:[n&&u.options.map(y=>jsxs(de,{children:[jsx(ne,{value:y.id,id:y.id}),jsx(pe,{htmlFor:y.id,children:y.label})]},y.id)),!n&&f]})}),o&&jsx(x,{children:o}),a&&jsx(C,{children:a.message}),!a&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}var ke=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),$=T.forwardRef(({className:t,variant:e,size:o,asChild:m=false,startIcon:s,endIcon:i,loading:l=false,disabled:N,children:c,type:F="button","aria-label":f,...u},b)=>{let n=m?Slot:"button",d=N||l,a=f||(typeof c=="string"?c:void 0),y=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),!d&&u.onClick&&u.onClick(w));};return m?jsx(n,{className:r(ke({variant:e,size:o,className:t})),ref:b,disabled:d,type:F,"aria-label":a,"aria-disabled":d,...u,children:c}):jsxs(n,{className:r(ke({variant:e,size:o,className:t})),ref:b,disabled:d,type:F,"aria-label":a,"aria-disabled":d,onKeyDown:y,...u,children:[l&&jsx(Loader2,{className:"mr-2 h-4 w-4 animate-spin",role:"status","aria-label":"Loading","aria-hidden":"true"}),!l&&s&&jsx("span",{className:"mr-2","aria-hidden":"true",children:s}),c,!l&&i&&jsx("span",{className:"ml-2","aria-hidden":"true",children:i})]})});$.displayName="Button";function na({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,"aria-label":c,"aria-describedby":F,options:f,...u}){let{control:b}=useFormContext();return jsx(P,{name:t,control:b,render:({field:n,fieldState:{error:d}})=>jsxs(h,{className:"space-y-3",children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsx(U,{onValueChange:n.onChange,defaultValue:n.value,disabled:l,"aria-label":c,"aria-describedby":F,"aria-invalid":!!d,"aria-required":i,className:"flex gap-2 p-2 border border-gray-200 rounded-md w-fit",...u,children:f.map(a=>jsx($,{size:a.size??"sm",variant:n.value===a.id?"default":"secondary",onClick:()=>n.onChange(a.id),role:"radio","aria-checked":n.value===a.id,disabled:l,children:a.label},a.id))})}),o&&jsx(x,{children:o}),s&&jsx(x,{className:"text-warning",children:s}),d&&jsx(C,{children:d.message})]})})}var Y=T.forwardRef(({className:t,...e},o)=>jsx(Command,{ref:o,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));Y.displayName=Command.displayName;var Z=T.forwardRef(({className:t,...e},o)=>jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[jsx(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),jsx(Command.Input,{ref:o,className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Z.displayName=Command.Input.displayName;var j=T.forwardRef(({className:t,...e},o)=>jsx(Command.List,{ref:o,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));j.displayName=Command.List.displayName;var ee=T.forwardRef((t,e)=>jsx(Command.Empty,{ref:e,className:"py-6 text-center text-sm",...t}));ee.displayName=Command.Empty.displayName;var q=T.forwardRef(({className:t,...e},o)=>jsx(Command.Group,{ref:o,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));q.displayName=Command.Group.displayName;var fe=T.forwardRef(({className:t,...e},o)=>jsx(Command.Separator,{ref:o,className:r("-mx-1 h-px bg-border",t),...e}));fe.displayName=Command.Separator.displayName;var W=T.forwardRef(({className:t,...e},o)=>jsx(Command.Item,{ref:o,className:r("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t),...e}));W.displayName=Command.Item.displayName;var gt=cva("",{variants:{variant:{h1:"scroll-m-5 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-5 text-3xl font-semibold tracking-tight",h3:"scroll-m-5 text-2xl font-semibold tracking-tight",h4:"scroll-m-5 text-xl font-semibold tracking-tight",h5:"scroll-m-5 text-lg font-semibold tracking-tight",h6:"scroll-m-5 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",blockquote:"mt-6 border-l-2 border-slate-300 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2",lead:"text-xl text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",align:"left"}}),te=T.forwardRef(({className:t,variant:e,align:o,as:m="p",...s},i)=>jsx(m,{className:r(gt({variant:e,align:o,className:t})),ref:i,...s}));te.displayName="Typography";function Ee({options:t,value:e,onChange:o,placeholder:m="Select an option",disabled:s,required:i,error:l,className:N,fullWidth:c,searchable:F,id:f,renderCommandList:u}){let[b,n]=T.useState(false),d=t?.find(a=>a.id===e);return jsx("div",{className:r(c&&"w-full"),children:jsxs(Popover,{open:b,onOpenChange:n,children:[jsx(PopoverTrigger,{asChild:true,children:jsxs($,{variant:"outline",role:"combobox","aria-expanded":b,"aria-controls":f?`${f}-content`:void 0,"aria-required":i,"aria-invalid":!!l,disabled:s,className:r("w-[13rem] justify-between",!e&&"text-muted-foreground",c&&"w-full",l&&"border-destructive focus-visible:ring-destructive",N),children:[d?d.label:m,jsx(ChevronDown,{className:r("opacity-50",b&&"rotate-180")})]})}),jsx(PopoverContent,{className:r("w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md",c&&"w-full"),align:"start",children:jsxs(Y,{children:[F&&jsx(Z,{placeholder:"Search...",className:"h-9",disabled:s}),jsxs(j,{className:"max-h-[12rem] overflow-y-auto",children:[jsx(ee,{children:"No items found."}),u?u(t):jsx(q,{children:t?.map(a=>jsxs(W,{value:a.label,onSelect:()=>{o(a.id),n(false);},disabled:a.disabled,className:r("flex items-center justify-between cursor-pointer my-1",e===a.id&&"bg-accent text-accent-foreground",a.disabled&&"opacity-50 cursor-not-allowed",a.className),children:[jsxs("div",{className:"flex items-center gap-1",children:[a.startIcon&&a.startIcon,jsx(te,{variant:"small",children:a.label})]}),a.endIcon&&jsx("div",{className:"ml-2",children:a.endIcon})]},a.id))})]})]})})]})})}function Oe({options:t,value:e,onChange:o,placeholder:m="Select options",disabled:s,required:i,error:l,className:N,fullWidth:c,searchable:F,id:f,maxSelections:u,showSelectAll:b,renderCommandList:n}){let[d,a]=T.useState(false),y=t.filter(p=>e.includes(p.id)),w=p=>{if(e.includes(p))o(e.filter(k=>k!==p));else {if(u&&e.length>=u)return;o([...e,p]);}},$e=()=>{let p=t.filter(k=>!k.disabled);e.length===p.length?o([]):o(p.map(k=>k.id));},qe=(p,k)=>{k.stopPropagation(),o(e.filter(We=>We!==p));};return jsx("div",{className:r(c&&"w-full"),children:jsxs(Popover,{open:d,onOpenChange:a,children:[jsx(PopoverTrigger,{asChild:true,children:jsxs($,{variant:"outline",role:"combobox","aria-expanded":d,"aria-controls":f?`${f}-content`:void 0,"aria-label":m,"aria-required":i,"aria-invalid":!!l,disabled:s,id:f,className:r("w-[13rem] justify-between min-h-[2.5rem] h-auto",!e.length&&"text-muted-foreground",c&&"w-full",l&&"border-destructive focus-visible:ring-destructive",N),children:[jsx("div",{className:"flex flex-wrap gap-1",children:y.length>0?y.map(p=>jsxs("div",{className:"flex items-center gap-1 bg-secondary text-secondary-foreground px-2 py-0.5 rounded-md text-sm",children:[jsx("span",{children:p.label}),jsx("span",{onClick:k=>qe(p.id,k),className:"hover:bg-secondary-foreground/20 rounded-sm",children:jsx(X$1,{className:"h-3 w-3"})})]},p.id)):jsx("span",{children:m})}),jsx(ChevronDown,{className:r("opacity-50",d&&"rotate-180")})]})}),jsx(PopoverContent,{id:f?`${f}-content`:void 0,className:r("w-[13rem] p-0 rounded-md border bg-popover text-popover-foreground shadow-md",c&&"w-full"),align:"start",children:jsxs(Y,{children:[F&&jsx(Z,{placeholder:"Search...",className:"h-9",disabled:s}),jsxs(j,{className:"max-h-[12rem] overflow-y-auto",children:[jsx(ee,{children:"No items found."}),jsxs(q,{children:[b&&jsxs(W,{onSelect:$e,className:"flex items-center gap-2 cursor-pointer my-1",children:[jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded border border-primary",children:e.length===t.filter(p=>!p.disabled).length&&jsx(Check,{className:"h-3 w-3"})}),jsx(te,{variant:"small",children:"Select All"})]}),jsx(fe,{})]}),n?n(t):jsx(q,{children:t.map(p=>jsxs(W,{value:p.id,onSelect:()=>w(p.id),disabled:p.disabled,className:r("flex items-center justify-between cursor-pointer my-1",p.disabled&&"opacity-50 cursor-not-allowed",p.className),children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"flex h-4 w-4 items-center justify-center rounded border border-primary",children:e.includes(p.id)&&jsx(Check,{className:"h-3 w-3"})}),jsxs("div",{className:"flex items-center gap-1",children:[p.startIcon&&p.startIcon,jsx(te,{variant:"small",children:p.label})]})]}),p.endIcon&&jsx("div",{className:"ml-2",children:p.endIcon})]},p.id))})]})]})})]})})}function za({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,"aria-label":F,"aria-describedby":f,options:u,...b}){let{control:n}=useFormContext();return jsx(P,{name:t,control:n,render:({field:d,fieldState:{error:a}})=>jsxs(h,{children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsx(Oe,{...d,options:u,value:d.value||[],onChange:d.onChange,className:r(a&&"border-destructive focus-visible:ring-destructive",m),disabled:l||N,required:i,placeholder:c,"aria-label":F,"aria-describedby":f,"aria-invalid":!!a,"aria-required":i,...b})}),o&&jsx(x,{children:o}),a&&jsx(C,{children:a.message}),!a&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}function Za({name:t,label:e,description:o,className:m,warningText:s,required:i,disabled:l,readOnly:N,placeholder:c,"aria-label":F,"aria-describedby":f,options:u,...b}){let{control:n}=useFormContext();return jsx(P,{name:t,control:n,render:({field:d,fieldState:{error:a}})=>jsxs(h,{children:[e&&jsxs(R,{children:[e,i&&jsx("span",{className:"text-destructive ml-1",children:"*"})]}),jsx(v,{children:jsx(Ee,{...d,options:u,value:d.value||"",onChange:d.onChange,className:r(a&&"border-destructive focus-visible:ring-destructive",m),disabled:l||N,required:i,placeholder:c,"aria-label":F,"aria-describedby":f,"aria-invalid":!!a,"aria-required":i,...b})}),o&&jsx(x,{children:o}),a&&jsx(C,{children:a.message}),!a&&s&&jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",role:"alert",children:s})]})})}export{tt as Form,v as FormControl,x as FormDescription,P as FormField,h as FormItem,R as FormLabel,C as FormMessage,wo as RHFCheckbox,za as RHFMultiSelect,na as RHFRadioButtonGroup,Uo as RHFRadioGroup,Za as RHFSelect,Do as RHFSwitch,ao as RHFTextField,fo as RHFTextarea,ae as useFormField};//# sourceMappingURL=rhf.mjs.map
|
|
2
|
-
//# sourceMappingURL=rhf.mjs.map
|