@bricks-toolkit/toolkit 0.1.1 → 0.1.2
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/README.md +9 -9
- package/dist/avatar/index.cjs +11 -1
- package/dist/avatar/index.mjs +2 -1
- package/dist/badge/index.cjs +11 -1
- package/dist/badge/index.mjs +2 -1
- package/dist/breadcrumbs/index.cjs +11 -1
- package/dist/breadcrumbs/index.mjs +2 -1
- package/dist/button/index.cjs +13 -2
- package/dist/button/index.mjs +4 -2
- package/dist/card/index.cjs +31 -1
- package/dist/card/index.mjs +2 -1
- package/dist/checkbox/index.cjs +11 -1
- package/dist/checkbox/index.mjs +2 -1
- package/dist/chunk-2POU3NX4.mjs +192 -0
- package/dist/chunk-32SKYPQW.mjs +156 -0
- package/dist/chunk-446OJWC6.mjs +285 -0
- package/dist/chunk-4DA7CRNV.mjs +376 -0
- package/dist/chunk-4DR57X7U.mjs +182 -0
- package/dist/chunk-4QSDPHPI.mjs +285 -0
- package/dist/chunk-56ILK7Y4.cjs +315 -0
- package/dist/chunk-5J3OMAO4.cjs +222 -0
- package/dist/chunk-5RKET2JO.cjs +287 -0
- package/dist/chunk-65UZC3FK.mjs +312 -0
- package/dist/chunk-6CC5KIA5.cjs +148 -0
- package/dist/chunk-6R3OYBQ6.cjs +209 -0
- package/dist/chunk-6UO72EJA.cjs +2 -0
- package/dist/chunk-6ZCY4O5M.mjs +63 -0
- package/dist/chunk-7364SUK6.mjs +359 -0
- package/dist/chunk-7DDDQ3RH.cjs +66 -0
- package/dist/chunk-7PDGAIC3.cjs +189 -0
- package/dist/chunk-7R5JRJ2W.cjs +255 -0
- package/dist/chunk-7WNJ7L4Z.mjs +335 -0
- package/dist/chunk-AJXVELXK.cjs +218 -0
- package/dist/chunk-ARTXRQO6.mjs +1 -0
- package/dist/chunk-B4OV5GRT.cjs +510 -0
- package/dist/chunk-B5MYGYJY.mjs +122 -0
- package/dist/chunk-BBVWG5GH.cjs +75 -0
- package/dist/chunk-BVBCAAES.mjs +35 -0
- package/dist/chunk-CBA54EY4.mjs +508 -0
- package/dist/chunk-CMER5LO3.mjs +330 -0
- package/dist/chunk-DHC5LI2P.cjs +338 -0
- package/dist/chunk-DMLPA65B.mjs +107 -0
- package/dist/chunk-DN2GFJF4.mjs +175 -0
- package/dist/chunk-ECLNLPOR.cjs +70 -0
- package/dist/chunk-EV463QT5.cjs +53 -0
- package/dist/chunk-FOVJHEWH.mjs +51 -0
- package/dist/chunk-G4HVY6FM.mjs +203 -0
- package/dist/chunk-H77YWN3L.mjs +220 -0
- package/dist/chunk-HIWJDLIS.cjs +124 -0
- package/dist/chunk-HQGDSOSN.mjs +274 -0
- package/dist/chunk-JKPNJ4PZ.mjs +313 -0
- package/dist/chunk-JV6AWBN5.mjs +113 -0
- package/dist/chunk-KA35BV7V.mjs +207 -0
- package/dist/chunk-KLBABQEJ.cjs +378 -0
- package/dist/chunk-L5VQZZVR.cjs +3197 -0
- package/dist/chunk-LTG6YP5I.cjs +69 -0
- package/dist/chunk-MVUNJPGH.cjs +184 -0
- package/dist/chunk-NMJ5CVZH.cjs +2 -0
- package/dist/chunk-NRCNRHXL.cjs +109 -0
- package/dist/chunk-NRZIXK35.cjs +276 -0
- package/dist/chunk-OCPFOFJ4.mjs +3195 -0
- package/dist/chunk-OEU5VG3D.cjs +362 -0
- package/dist/chunk-OPOCCRJG.cjs +193 -0
- package/dist/chunk-OQPCL5XX.mjs +187 -0
- package/dist/chunk-PCYGJNEQ.cjs +280 -0
- package/dist/chunk-PJH2KEWK.mjs +200 -0
- package/dist/chunk-PJWELBN2.cjs +115 -0
- package/dist/chunk-Q3IFXFFD.cjs +202 -0
- package/dist/chunk-R72GDCWE.cjs +314 -0
- package/dist/chunk-RAD5VJHR.mjs +146 -0
- package/dist/chunk-RYWDZHKG.mjs +274 -0
- package/dist/chunk-S7VEND5Z.cjs +162 -0
- package/dist/chunk-SBNNV6FE.mjs +1 -0
- package/dist/chunk-SFUOCZJY.mjs +187 -0
- package/dist/chunk-SHQ2MPBE.mjs +73 -0
- package/dist/chunk-TIVSMCXZ.mjs +253 -0
- package/dist/chunk-TNGW5YHA.cjs +37 -0
- package/dist/chunk-VC7MOPU6.cjs +287 -0
- package/dist/chunk-VHVFRWF5.mjs +64 -0
- package/dist/chunk-VKQDW7C2.mjs +336 -0
- package/dist/chunk-VRZFAKSV.cjs +177 -0
- package/dist/chunk-W2ZAPLQH.cjs +337 -0
- package/dist/chunk-XFNRKHHF.cjs +332 -0
- package/dist/chunk-Y3NTKFUE.mjs +66 -0
- package/dist/chunk-Y6AN7AWX.cjs +205 -0
- package/dist/chunk-YMMNWJT6.cjs +134 -0
- package/dist/chunk-YOTCXSXL.mjs +132 -0
- package/dist/combo-box/index.cjs +11 -1
- package/dist/combo-box/index.mjs +2 -1
- package/dist/date-picker/index.cjs +11 -2
- package/dist/date-picker/index.mjs +2 -2
- package/dist/dialog/index.cjs +27 -1
- package/dist/dialog/index.mjs +2 -1
- package/dist/dropdown-menu/index.cjs +27 -1
- package/dist/dropdown-menu/index.mjs +2 -1
- package/dist/email/index.cjs +11 -2
- package/dist/email/index.mjs +2 -2
- package/dist/file-upload/index.cjs +11 -1
- package/dist/file-upload/index.mjs +2 -1
- package/dist/header/index.cjs +14 -2
- package/dist/header/index.mjs +5 -2
- package/dist/icon-button/index.cjs +13 -2
- package/dist/icon-button/index.mjs +4 -2
- package/dist/image/index.cjs +12 -1
- package/dist/image/index.mjs +3 -1
- package/dist/index.cjs +839 -2
- package/dist/index.d.ts +141 -75
- package/dist/index.mjs +601 -2
- package/dist/link/index.cjs +11 -1
- package/dist/link/index.mjs +2 -1
- package/dist/loader/index.cjs +11 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/modal/index.cjs +27 -1
- package/dist/modal/index.mjs +2 -1
- package/dist/multi-select/index.cjs +11 -2
- package/dist/multi-select/index.mjs +2 -2
- package/dist/otp-input/index.cjs +11 -1
- package/dist/otp-input/index.mjs +2 -1
- package/dist/password-input/index.cjs +11 -2
- package/dist/password-input/index.mjs +2 -2
- package/dist/phone/index.cjs +11 -2
- package/dist/phone/index.mjs +2 -2
- package/dist/radio-button/index.cjs +11 -1
- package/dist/radio-button/index.mjs +2 -1
- package/dist/search-input/index.cjs +12 -2
- package/dist/search-input/index.mjs +3 -2
- package/dist/select/index.cjs +11 -2
- package/dist/select/index.mjs +2 -2
- package/dist/sidebar/index.cjs +11 -1
- package/dist/sidebar/index.mjs +2 -1
- package/dist/skeleton/index.cjs +27 -1
- package/dist/skeleton/index.mjs +2 -1
- package/dist/styles.css +5074 -1
- package/dist/table/index.cjs +15 -1
- package/dist/table/index.mjs +2 -1
- package/dist/tabs/index.cjs +14 -2
- package/dist/tabs/index.mjs +5 -2
- package/dist/text-input/index.cjs +11 -2
- package/dist/text-input/index.mjs +2 -2
- package/dist/theme-provider/index.cjs +14 -1
- package/dist/theme-provider/index.mjs +1 -1
- package/dist/time-picker/index.cjs +11 -2
- package/dist/time-picker/index.mjs +2 -2
- package/dist/toaster/index.cjs +11 -1
- package/dist/toaster/index.mjs +2 -1
- package/dist/tooltip/index.cjs +12 -1
- package/dist/tooltip/index.mjs +3 -1
- package/package.json +122 -141
- package/dist/components/Accordion/Accordion.d.ts +0 -5
- package/dist/components/Accordion/Accordion.types.d.ts +0 -32
- package/dist/components/Accordion/index.d.ts +0 -2
- package/dist/components/Avatar/Avatar.d.ts +0 -2
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -11
- package/dist/components/Avatar/Avatar.test.d.ts +0 -1
- package/dist/components/Avatar/Avatar.types.d.ts +0 -24
- package/dist/components/Avatar/index.d.ts +0 -2
- package/dist/components/Badge/Badge.d.ts +0 -11
- package/dist/components/Badge/Badge.stories.d.ts +0 -21
- package/dist/components/Badge/Badge.test.d.ts +0 -1
- package/dist/components/Badge/Badge.types.d.ts +0 -43
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +0 -27
- package/dist/components/Breadcrumbs/index.d.ts +0 -2
- package/dist/components/Button/Button.d.ts +0 -2
- package/dist/components/Button/Button.stories.d.ts +0 -20
- package/dist/components/Button/Button.test.d.ts +0 -1
- package/dist/components/Button/Button.types.d.ts +0 -24
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Card/Card.d.ts +0 -25
- package/dist/components/Card/Card.stories.d.ts +0 -8
- package/dist/components/Card/Card.test.d.ts +0 -1
- package/dist/components/Card/Card.types.d.ts +0 -14
- package/dist/components/Card/index.d.ts +0 -2
- package/dist/components/Checkbox/Checkbox.d.ts +0 -2
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -16
- package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -31
- package/dist/components/Checkbox/index.d.ts +0 -2
- package/dist/components/ComboBox/ComboBox.d.ts +0 -2
- package/dist/components/ComboBox/ComboBox.stories.d.ts +0 -12
- package/dist/components/ComboBox/ComboBox.test.d.ts +0 -1
- package/dist/components/ComboBox/ComboBox.types.d.ts +0 -57
- package/dist/components/ComboBox/index.d.ts +0 -2
- package/dist/components/DatePicker/DatePicker.d.ts +0 -2
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -25
- package/dist/components/DatePicker/DatePicker.test.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +0 -27
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/Dialog/Dialog.d.ts +0 -6
- package/dist/components/Dialog/Dialog.stories.d.ts +0 -9
- package/dist/components/Dialog/Dialog.test.d.ts +0 -1
- package/dist/components/Dialog/Dialog.types.d.ts +0 -52
- package/dist/components/Dialog/index.d.ts +0 -2
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -7
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -9
- package/dist/components/DropdownMenu/DropdownMenu.test.d.ts +0 -1
- package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +0 -24
- package/dist/components/DropdownMenu/index.d.ts +0 -2
- package/dist/components/Email/Email.d.ts +0 -2
- package/dist/components/Email/Email.stories.d.ts +0 -11
- package/dist/components/Email/Email.test.d.ts +0 -1
- package/dist/components/Email/Email.types.d.ts +0 -33
- package/dist/components/Email/index.d.ts +0 -2
- package/dist/components/FileUpload/FileUpload.d.ts +0 -2
- package/dist/components/FileUpload/FileUpload.stories.d.ts +0 -10
- package/dist/components/FileUpload/FileUpload.test.d.ts +0 -1
- package/dist/components/FileUpload/FileUpload.types.d.ts +0 -22
- package/dist/components/FileUpload/index.d.ts +0 -2
- package/dist/components/Header/Header.d.ts +0 -7
- package/dist/components/Header/Header.stories.d.ts +0 -8
- package/dist/components/Header/Header.test.d.ts +0 -1
- package/dist/components/Header/Header.types.d.ts +0 -19
- package/dist/components/Header/index.d.ts +0 -2
- package/dist/components/IconButton/IconButton.d.ts +0 -2
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -17
- package/dist/components/IconButton/IconButton.types.d.ts +0 -10
- package/dist/components/IconButton/index.d.ts +0 -2
- package/dist/components/Image/Image.d.ts +0 -6
- package/dist/components/Image/Image.stories.d.ts +0 -13
- package/dist/components/Image/Image.test.d.ts +0 -1
- package/dist/components/Image/Image.types.d.ts +0 -40
- package/dist/components/Image/index.d.ts +0 -2
- package/dist/components/Link/Link.d.ts +0 -2
- package/dist/components/Link/Link.stories.d.ts +0 -15
- package/dist/components/Link/Link.test.d.ts +0 -1
- package/dist/components/Link/Link.types.d.ts +0 -20
- package/dist/components/Link/index.d.ts +0 -2
- package/dist/components/Loader/Loader.d.ts +0 -2
- package/dist/components/Loader/Loader.stories.d.ts +0 -12
- package/dist/components/Loader/Loader.test.d.ts +0 -1
- package/dist/components/Loader/Loader.types.d.ts +0 -17
- package/dist/components/Loader/index.d.ts +0 -2
- package/dist/components/Modal/Modal.d.ts +0 -14
- package/dist/components/Modal/Modal.stories.d.ts +0 -14
- package/dist/components/Modal/Modal.test.d.ts +0 -1
- package/dist/components/Modal/Modal.types.d.ts +0 -100
- package/dist/components/Modal/index.d.ts +0 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts +0 -2
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -15
- package/dist/components/MultiSelect/MultiSelect.test.d.ts +0 -1
- package/dist/components/MultiSelect/MultiSelect.types.d.ts +0 -55
- package/dist/components/MultiSelect/index.d.ts +0 -2
- package/dist/components/OtpInput/OtpInput.d.ts +0 -2
- package/dist/components/OtpInput/OtpInput.stories.d.ts +0 -10
- package/dist/components/OtpInput/OtpInput.test.d.ts +0 -1
- package/dist/components/OtpInput/OtpInput.types.d.ts +0 -53
- package/dist/components/OtpInput/index.d.ts +0 -2
- package/dist/components/PasswordInput/PasswordInput.d.ts +0 -2
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +0 -23
- package/dist/components/PasswordInput/PasswordInput.test.d.ts +0 -1
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +0 -27
- package/dist/components/PasswordInput/index.d.ts +0 -2
- package/dist/components/Phone/Phone.d.ts +0 -2
- package/dist/components/Phone/Phone.stories.d.ts +0 -11
- package/dist/components/Phone/Phone.test.d.ts +0 -1
- package/dist/components/Phone/Phone.types.d.ts +0 -36
- package/dist/components/Phone/countries.d.ts +0 -8
- package/dist/components/Phone/index.d.ts +0 -2
- package/dist/components/RadioButton/RadioButton.d.ts +0 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -21
- package/dist/components/RadioButton/RadioButton.test.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.types.d.ts +0 -51
- package/dist/components/RadioButton/index.d.ts +0 -2
- package/dist/components/SearchInput/SearchInput.d.ts +0 -6
- package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -8
- package/dist/components/SearchInput/SearchInput.test.d.ts +0 -1
- package/dist/components/SearchInput/SearchInput.types.d.ts +0 -12
- package/dist/components/SearchInput/index.d.ts +0 -2
- package/dist/components/Select/Select.d.ts +0 -2
- package/dist/components/Select/Select.stories.d.ts +0 -12
- package/dist/components/Select/Select.test.d.ts +0 -1
- package/dist/components/Select/Select.types.d.ts +0 -31
- package/dist/components/Select/index.d.ts +0 -2
- package/dist/components/Sidebar/Sidebar.d.ts +0 -7
- package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -10
- package/dist/components/Sidebar/Sidebar.test.d.ts +0 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +0 -87
- package/dist/components/Sidebar/index.d.ts +0 -2
- package/dist/components/Skeleton/Skeleton.d.ts +0 -26
- package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -13
- package/dist/components/Skeleton/Skeleton.types.d.ts +0 -47
- package/dist/components/Skeleton/index.d.ts +0 -2
- package/dist/components/Stepper/Stepper.d.ts +0 -2
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -23
- package/dist/components/Stepper/Stepper.test.d.ts +0 -1
- package/dist/components/Stepper/Stepper.types.d.ts +0 -47
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Table/Pagination.d.ts +0 -3
- package/dist/components/Table/Table.d.ts +0 -3
- package/dist/components/Table/Table.stories.d.ts +0 -13
- package/dist/components/Table/Table.test.d.ts +0 -1
- package/dist/components/Table/Table.types.d.ts +0 -85
- package/dist/components/Table/index.d.ts +0 -3
- package/dist/components/Tabs/Tabs.d.ts +0 -2
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -17
- package/dist/components/Tabs/Tabs.test.d.ts +0 -1
- package/dist/components/Tabs/Tabs.types.d.ts +0 -21
- package/dist/components/Tabs/index.d.ts +0 -2
- package/dist/components/TextInput/TextInput.d.ts +0 -2
- package/dist/components/TextInput/TextInput.stories.d.ts +0 -25
- package/dist/components/TextInput/TextInput.test.d.ts +0 -1
- package/dist/components/TextInput/TextInput.types.d.ts +0 -29
- package/dist/components/TextInput/index.d.ts +0 -2
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -8
- package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +0 -16
- package/dist/components/ThemeProvider/ThemeProvider.test.d.ts +0 -1
- package/dist/components/ThemeProvider/ThemeProvider.types.d.ts +0 -112
- package/dist/components/ThemeProvider/index.d.ts +0 -2
- package/dist/components/TimePicker/TimePicker.d.ts +0 -2
- package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -23
- package/dist/components/TimePicker/TimePicker.test.d.ts +0 -1
- package/dist/components/TimePicker/TimePicker.types.d.ts +0 -27
- package/dist/components/TimePicker/index.d.ts +0 -2
- package/dist/components/Toaster/Toaster.d.ts +0 -2
- package/dist/components/Toaster/Toaster.stories.d.ts +0 -13
- package/dist/components/Toaster/Toaster.test.d.ts +0 -1
- package/dist/components/Toaster/Toaster.types.d.ts +0 -23
- package/dist/components/Toaster/index.d.ts +0 -2
- package/dist/components/Toggle/Toggle.d.ts +0 -2
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -11
- package/dist/components/Toggle/Toggle.types.d.ts +0 -10
- package/dist/components/Toggle/index.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -13
- package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.types.d.ts +0 -33
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/utils/cn.d.ts +0 -2
- package/dist/utils/index.d.ts +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,601 @@
|
|
|
1
|
-
import*as ae from'react';import {forwardRef,useId,useState,useRef,useEffect,useMemo,useCallback,createContext,useLayoutEffect,useContext,Children}from'react';import {ChevronDownIcon,CheckIcon as CheckIcon$1,XMarkIcon as XMarkIcon$1,ChevronRightIcon as ChevronRightIcon$1,ChevronUpDownIcon,ChevronUpIcon}from'@heroicons/react/20/solid';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {MagnifyingGlassIcon,InformationCircleIcon,ExclamationTriangleIcon,ExclamationCircleIcon,CheckCircleIcon,XMarkIcon,ArrowPathIcon,ChevronLeftIcon,ChevronRightIcon,CloudArrowUpIcon,EyeIcon,EyeSlashIcon,Bars3Icon,ChevronDoubleLeftIcon,ChevronDoubleRightIcon,ChevronDownIcon as ChevronDownIcon$1}from'@heroicons/react/24/outline';import {createPortal}from'react-dom';import {CheckIcon,MinusIcon}from'@heroicons/react/16/solid';import {UserIcon}from'@heroicons/react/24/solid';function t(...r){return twMerge(clsx(r))}var dt=[{name:"Afghanistan",id:"AF",dialCode:"+93",maxLength:9,flag:"\u{1F1E6}\u{1F1EB}"},{name:"Albania",id:"AL",dialCode:"+355",maxLength:9,flag:"\u{1F1E6}\u{1F1F1}"},{name:"Algeria",id:"DZ",dialCode:"+213",maxLength:9,flag:"\u{1F1E9}\u{1F1FF}"},{name:"Andorra",id:"AD",dialCode:"+376",maxLength:6,flag:"\u{1F1E6}\u{1F1E9}"},{name:"Angola",id:"AO",dialCode:"+244",maxLength:9,flag:"\u{1F1E6}\u{1F1F4}"},{name:"Argentina",id:"AR",dialCode:"+54",maxLength:10,flag:"\u{1F1E6}\u{1F1F7}"},{name:"Armenia",id:"AM",dialCode:"+374",maxLength:8,flag:"\u{1F1E6}\u{1F1F2}"},{name:"Australia",id:"AU",dialCode:"+61",maxLength:9,flag:"\u{1F1E6}\u{1F1FA}"},{name:"Austria",id:"AT",dialCode:"+43",maxLength:13,flag:"\u{1F1E6}\u{1F1F9}"},{name:"Azerbaijan",id:"AZ",dialCode:"+994",maxLength:9,flag:"\u{1F1E6}\u{1F1FF}"},{name:"Bahrain",id:"BH",dialCode:"+973",maxLength:8,flag:"\u{1F1E7}\u{1F1ED}"},{name:"Bangladesh",id:"BD",dialCode:"+880",maxLength:10,flag:"\u{1F1E7}\u{1F1E9}"},{name:"Belarus",id:"BY",dialCode:"+375",maxLength:9,flag:"\u{1F1E7}\u{1F1FE}"},{name:"Belgium",id:"BE",dialCode:"+32",maxLength:9,flag:"\u{1F1E7}\u{1F1EA}"},{name:"Bolivia",id:"BO",dialCode:"+591",maxLength:8,flag:"\u{1F1E7}\u{1F1F4}"},{name:"Bosnia and Herzegovina",id:"BA",dialCode:"+387",maxLength:8,flag:"\u{1F1E7}\u{1F1E6}"},{name:"Brazil",id:"BR",dialCode:"+55",maxLength:11,flag:"\u{1F1E7}\u{1F1F7}"},{name:"Bulgaria",id:"BG",dialCode:"+359",maxLength:9,flag:"\u{1F1E7}\u{1F1EC}"},{name:"Cambodia",id:"KH",dialCode:"+855",maxLength:9,flag:"\u{1F1F0}\u{1F1ED}"},{name:"Canada",id:"CA",dialCode:"+1",maxLength:10,flag:"\u{1F1E8}\u{1F1E6}"},{name:"Chile",id:"CL",dialCode:"+56",maxLength:9,flag:"\u{1F1E8}\u{1F1F1}"},{name:"China",id:"CN",dialCode:"+86",maxLength:11,flag:"\u{1F1E8}\u{1F1F3}"},{name:"Colombia",id:"CO",dialCode:"+57",maxLength:10,flag:"\u{1F1E8}\u{1F1F4}"},{name:"Costa Rica",id:"CR",dialCode:"+506",maxLength:8,flag:"\u{1F1E8}\u{1F1F7}"},{name:"Croatia",id:"HR",dialCode:"+385",maxLength:9,flag:"\u{1F1ED}\u{1F1F7}"},{name:"Cuba",id:"CU",dialCode:"+53",maxLength:8,flag:"\u{1F1E8}\u{1F1FA}"},{name:"Cyprus",id:"CY",dialCode:"+357",maxLength:8,flag:"\u{1F1E8}\u{1F1FE}"},{name:"Czech Republic",id:"CZ",dialCode:"+420",maxLength:9,flag:"\u{1F1E8}\u{1F1FF}"},{name:"Denmark",id:"DK",dialCode:"+45",maxLength:8,flag:"\u{1F1E9}\u{1F1F0}"},{name:"Ecuador",id:"EC",dialCode:"+593",maxLength:9,flag:"\u{1F1EA}\u{1F1E8}"},{name:"Egypt",id:"EG",dialCode:"+20",maxLength:10,flag:"\u{1F1EA}\u{1F1EC}"},{name:"Estonia",id:"EE",dialCode:"+372",maxLength:8,flag:"\u{1F1EA}\u{1F1EA}"},{name:"Ethiopia",id:"ET",dialCode:"+251",maxLength:9,flag:"\u{1F1EA}\u{1F1F9}"},{name:"Finland",id:"FI",dialCode:"+358",maxLength:10,flag:"\u{1F1EB}\u{1F1EE}"},{name:"France",id:"FR",dialCode:"+33",maxLength:9,flag:"\u{1F1EB}\u{1F1F7}"},{name:"Georgia",id:"GE",dialCode:"+995",maxLength:9,flag:"\u{1F1EC}\u{1F1EA}"},{name:"Germany",id:"DE",dialCode:"+49",maxLength:11,flag:"\u{1F1E9}\u{1F1EA}"},{name:"Ghana",id:"GH",dialCode:"+233",maxLength:9,flag:"\u{1F1EC}\u{1F1ED}"},{name:"Greece",id:"GR",dialCode:"+30",maxLength:10,flag:"\u{1F1EC}\u{1F1F7}"},{name:"Guatemala",id:"GT",dialCode:"+502",maxLength:8,flag:"\u{1F1EC}\u{1F1F9}"},{name:"Hong Kong",id:"HK",dialCode:"+852",maxLength:8,flag:"\u{1F1ED}\u{1F1F0}"},{name:"Hungary",id:"HU",dialCode:"+36",maxLength:9,flag:"\u{1F1ED}\u{1F1FA}"},{name:"Iceland",id:"IS",dialCode:"+354",maxLength:7,flag:"\u{1F1EE}\u{1F1F8}"},{name:"India",id:"IN",dialCode:"+91",maxLength:10,flag:"\u{1F1EE}\u{1F1F3}"},{name:"Indonesia",id:"ID",dialCode:"+62",maxLength:12,flag:"\u{1F1EE}\u{1F1E9}"},{name:"Iran",id:"IR",dialCode:"+98",maxLength:10,flag:"\u{1F1EE}\u{1F1F7}"},{name:"Iraq",id:"IQ",dialCode:"+964",maxLength:10,flag:"\u{1F1EE}\u{1F1F6}"},{name:"Ireland",id:"IE",dialCode:"+353",maxLength:9,flag:"\u{1F1EE}\u{1F1EA}"},{name:"Israel",id:"IL",dialCode:"+972",maxLength:9,flag:"\u{1F1EE}\u{1F1F1}"},{name:"Italy",id:"IT",dialCode:"+39",maxLength:10,flag:"\u{1F1EE}\u{1F1F9}"},{name:"Japan",id:"JP",dialCode:"+81",maxLength:10,flag:"\u{1F1EF}\u{1F1F5}"},{name:"Jordan",id:"JO",dialCode:"+962",maxLength:9,flag:"\u{1F1EF}\u{1F1F4}"},{name:"Kazakhstan",id:"KZ",dialCode:"+7",maxLength:10,flag:"\u{1F1F0}\u{1F1FF}"},{name:"Kenya",id:"KE",dialCode:"+254",maxLength:9,flag:"\u{1F1F0}\u{1F1EA}"},{name:"Kuwait",id:"KW",dialCode:"+965",maxLength:8,flag:"\u{1F1F0}\u{1F1FC}"},{name:"Latvia",id:"LV",dialCode:"+371",maxLength:8,flag:"\u{1F1F1}\u{1F1FB}"},{name:"Lebanon",id:"LB",dialCode:"+961",maxLength:8,flag:"\u{1F1F1}\u{1F1E7}"},{name:"Lithuania",id:"LT",dialCode:"+370",maxLength:8,flag:"\u{1F1F1}\u{1F1F9}"},{name:"Luxembourg",id:"LU",dialCode:"+352",maxLength:9,flag:"\u{1F1F1}\u{1F1FA}"},{name:"Macau",id:"MO",dialCode:"+853",maxLength:8,flag:"\u{1F1F2}\u{1F1F4}"},{name:"Malaysia",id:"MY",dialCode:"+60",maxLength:10,flag:"\u{1F1F2}\u{1F1FE}"},{name:"Mexico",id:"MX",dialCode:"+52",maxLength:10,flag:"\u{1F1F2}\u{1F1FD}"},{name:"Morocco",id:"MA",dialCode:"+212",maxLength:9,flag:"\u{1F1F2}\u{1F1E6}"},{name:"Myanmar",id:"MM",dialCode:"+95",maxLength:9,flag:"\u{1F1F2}\u{1F1F2}"},{name:"Nepal",id:"NP",dialCode:"+977",maxLength:10,flag:"\u{1F1F3}\u{1F1F5}"},{name:"Netherlands",id:"NL",dialCode:"+31",maxLength:9,flag:"\u{1F1F3}\u{1F1F1}"},{name:"New Zealand",id:"NZ",dialCode:"+64",maxLength:9,flag:"\u{1F1F3}\u{1F1FF}"},{name:"Nigeria",id:"NG",dialCode:"+234",maxLength:10,flag:"\u{1F1F3}\u{1F1EC}"},{name:"Norway",id:"NO",dialCode:"+47",maxLength:8,flag:"\u{1F1F3}\u{1F1F4}"},{name:"Oman",id:"OM",dialCode:"+968",maxLength:8,flag:"\u{1F1F4}\u{1F1F2}"},{name:"Pakistan",id:"PK",dialCode:"+92",maxLength:10,flag:"\u{1F1F5}\u{1F1F0}"},{name:"Panama",id:"PA",dialCode:"+507",maxLength:8,flag:"\u{1F1F5}\u{1F1E6}"},{name:"Paraguay",id:"PY",dialCode:"+595",maxLength:9,flag:"\u{1F1F5}\u{1F1FE}"},{name:"Peru",id:"PE",dialCode:"+51",maxLength:9,flag:"\u{1F1F5}\u{1F1EA}"},{name:"Philippines",id:"PH",dialCode:"+63",maxLength:10,flag:"\u{1F1F5}\u{1F1ED}"},{name:"Poland",id:"PL",dialCode:"+48",maxLength:9,flag:"\u{1F1F5}\u{1F1F1}"},{name:"Portugal",id:"PT",dialCode:"+351",maxLength:9,flag:"\u{1F1F5}\u{1F1F9}"},{name:"Qatar",id:"QA",dialCode:"+974",maxLength:8,flag:"\u{1F1F6}\u{1F1E6}"},{name:"Romania",id:"RO",dialCode:"+40",maxLength:9,flag:"\u{1F1F7}\u{1F1F4}"},{name:"Russia",id:"RU",dialCode:"+7",maxLength:10,flag:"\u{1F1F7}\u{1F1FA}"},{name:"Saudi Arabia",id:"SA",dialCode:"+966",maxLength:9,flag:"\u{1F1F8}\u{1F1E6}"},{name:"Serbia",id:"RS",dialCode:"+381",maxLength:9,flag:"\u{1F1F7}\u{1F1F8}"},{name:"Singapore",id:"SG",dialCode:"+65",maxLength:8,flag:"\u{1F1F8}\u{1F1EC}"},{name:"Slovakia",id:"SK",dialCode:"+421",maxLength:9,flag:"\u{1F1F8}\u{1F1F0}"},{name:"Slovenia",id:"SI",dialCode:"+386",maxLength:8,flag:"\u{1F1F8}\u{1F1EE}"},{name:"South Africa",id:"ZA",dialCode:"+27",maxLength:9,flag:"\u{1F1FF}\u{1F1E6}"},{name:"South Korea",id:"KR",dialCode:"+82",maxLength:10,flag:"\u{1F1F0}\u{1F1F7}"},{name:"Spain",id:"ES",dialCode:"+34",maxLength:9,flag:"\u{1F1EA}\u{1F1F8}"},{name:"Sri Lanka",id:"LK",dialCode:"+94",maxLength:9,flag:"\u{1F1F1}\u{1F1F0}"},{name:"Sweden",id:"SE",dialCode:"+46",maxLength:9,flag:"\u{1F1F8}\u{1F1EA}"},{name:"Switzerland",id:"CH",dialCode:"+41",maxLength:9,flag:"\u{1F1E8}\u{1F1ED}"},{name:"Syria",id:"SY",dialCode:"+963",maxLength:9,flag:"\u{1F1F8}\u{1F1FE}"},{name:"Taiwan",id:"TW",dialCode:"+886",maxLength:9,flag:"\u{1F1F9}\u{1F1FC}"},{name:"Thailand",id:"TH",dialCode:"+66",maxLength:9,flag:"\u{1F1F9}\u{1F1ED}"},{name:"Tunisia",id:"TN",dialCode:"+216",maxLength:8,flag:"\u{1F1F9}\u{1F1F3}"},{name:"Turkey",id:"TR",dialCode:"+90",maxLength:10,flag:"\u{1F1F9}\u{1F1F7}"},{name:"Ukraine",id:"UA",dialCode:"+380",maxLength:9,flag:"\u{1F1FA}\u{1F1E6}"},{name:"United Arab Emirates",id:"AE",dialCode:"+971",maxLength:9,flag:"\u{1F1E6}\u{1F1EA}"},{name:"United Kingdom",id:"GB",dialCode:"+44",maxLength:10,flag:"\u{1F1EC}\u{1F1E7}"},{name:"United States",id:"US",dialCode:"+1",maxLength:10,flag:"\u{1F1FA}\u{1F1F8}"},{name:"Uruguay",id:"UY",dialCode:"+598",maxLength:8,flag:"\u{1F1FA}\u{1F1FE}"},{name:"Uzbekistan",id:"UZ",dialCode:"+998",maxLength:9,flag:"\u{1F1FA}\u{1F1FF}"},{name:"Venezuela",id:"VE",dialCode:"+58",maxLength:10,flag:"\u{1F1FB}\u{1F1EA}"},{name:"Vietnam",id:"VN",dialCode:"+84",maxLength:9,flag:"\u{1F1FB}\u{1F1F3}"},{name:"Yemen",id:"YE",dialCode:"+967",maxLength:9,flag:"\u{1F1FE}\u{1F1EA}"}];var Fn={xs:"h-6 text-xs",sm:"h-8 text-sm",md:"h-10 text-sm",lg:"h-11 text-base",xl:"h-12 text-lg"},_n={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},On={default:"rounded-md border border-border bg-surface shadow-sm focus-within:ring-2 focus-within:ring-primary/40 focus-within:border-primary transition-all duration-normal",filled:"rounded-md border border-transparent bg-surface-secondary focus-within:bg-surface focus-within:ring-2 focus-within:ring-primary/40 focus-within:border-primary transition-all duration-normal",flushed:"rounded-none border-0 border-b border-border bg-transparent focus-within:border-primary transition-all",unstyled:"border-0 bg-transparent p-0"},$n={default:{default:"border-border focus-within:border-primary focus-within:ring-primary/40",filled:"focus-within:border-primary focus-within:ring-primary/40",flushed:"border-border focus-within:border-primary",unstyled:""},error:{default:"border-error focus-within:border-error focus-within:ring-error/20",filled:"bg-error/5 focus-within:border-error focus-within:ring-error/20",flushed:"border-error focus-within:border-error",unstyled:""},success:{default:"border-success focus-within:border-success focus-within:ring-success/20",filled:"bg-success/5 focus-within:border-success focus-within:ring-success/20",flushed:"border-success focus-within:border-success",unstyled:""},warning:{default:"border-warning focus-within:border-warning focus-within:ring-warning/20",filled:"bg-warning/5 border-warning focus-within:border-warning focus-within:ring-warning/20",flushed:"border-warning focus-within:border-warning",unstyled:""}},jn={default:"text-text-muted",error:"text-error",success:"text-success",warning:"text-warning"},Kn="cursor-not-allowed opacity-50 bg-surface-secondary [&_*]:cursor-not-allowed";function Un(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var Zt=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,clearable:y,isLoading:g,value:R,defaultValue:h,onChange:w,showFlag:L=true,defaultCountryCode:D="+91",autoComplete:H="tel",...A},F){let $=useId(),V=E??$,U=`${V}-helper`,_=`${V}-state`,[X,T]=useState(null),[O,N]=useState(false),[S,P]=useState(""),z=useRef(null),[K,Y]=useState(h??{countryCode:D,phoneNumber:""}),Q=R!==void 0,J=Q?R:K,ee=dt.find(G=>G.dialCode===J.countryCode)??dt[0],xe=ee?.maxLength??15,ye=y&&J.phoneNumber.length>0,yt=m!==void 0,vt=p!==void 0||!!ye||!!g,Le=X?"error":l,W=Un(Le,X??i,a,c),ve=[o?U:null,W?_:null].filter(Boolean).join(" ")||void 0,Ae=G=>{Q||Y(G),w&&w(G);},Me=G=>{let ke=G.target.value,Ct=ke.replace(/\D/g,"");T(Ct!==ke?"Only numbers are allowed":null),!(Ct.length>xe)&&Ae({...J,phoneNumber:Ct});},En=()=>{T(null),Ae({...J,phoneNumber:""});};useEffect(()=>{if(!O)return;let G=ke=>{z.current&&!z.current.contains(ke.target)&&N(false);};return document.addEventListener("mousedown",G),()=>{document.removeEventListener("mousedown",G);}},[O]);let Wt=dt.filter(G=>G.name.toLowerCase().includes(S.toLowerCase())||G.dialCode.includes(S)),Tn=()=>g?jsxs("svg",{className:"animate-spin h-4 w-4 text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):ye?jsx("button",{type:"button",onClick:En,disabled:C,className:"flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast disabled:cursor-not-allowed","aria-label":"Clear input",children:jsx(XMarkIcon$1,{className:"w-4 h-4"})}):p,In=u!==void 0||s==="flushed"||s==="unstyled"?"":"rounded-l-md";return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:V,className:t("font-black leading-none text-text mb-2 uppercase tracking-widest",_n[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch",f?"w-full":"w-fit",v),children:[u!==void 0&&jsx("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",children:u}),jsxs("div",{ref:z,className:t("relative flex flex-1 items-stretch",Fn[d],On[s],$n[Le][s],C?Kn:"",u!==void 0&&b!==void 0?"rounded-none":u!==void 0?"rounded-l-none":b!==void 0?"rounded-r-none":""),children:[jsxs("button",{type:"button",onClick:()=>{N(!O);},disabled:!!C||!!g,className:t("relative flex items-center justify-center flex-shrink-0 px-2 sm:px-3 text-text bg-surface-secondary border-r border-border hover:bg-hover active:bg-active transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:z-10 disabled:cursor-not-allowed",In),children:[L&&ee&&jsx("span",{className:"mr-1.5 text-base sm:text-lg opacity-90",children:ee.flag}),jsx("span",{className:"text-sm font-medium",children:ee?.dialCode??D}),jsx(ChevronDownIcon,{className:t("w-3.5 h-3.5 ml-1.5 text-text-secondary transition-transform",O&&"rotate-180")})]}),O&&jsxs("div",{className:"absolute top-full left-0 mt-1 w-64 rounded-md border border-border bg-surface p-1 shadow-lg z-dropdown flex flex-col animate-in fade-in zoom-in-95 duration-fast",children:[jsx("div",{className:"px-2 py-1.5 pb-2 sticky top-0 bg-surface z-10 border-b border-divider",children:jsx("input",{type:"text",placeholder:"Search country...",className:"w-full text-sm bg-transparent px-1 focus:outline-none text-text placeholder:text-text-muted",value:S,onChange:G=>{P(G.target.value);},onKeyDown:G=>{G.stopPropagation();}})}),jsx("ul",{role:"listbox",className:"max-h-56 overflow-y-auto overflow-x-hidden p-1 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent",children:Wt.length>0?Wt.map(G=>jsxs("li",{role:"option",tabIndex:0,"aria-selected":J.countryCode===G.dialCode,className:t("flex items-center px-2 py-1.5 text-sm rounded-sm cursor-pointer transition-colors outline-none focus:bg-hover active:bg-active",J.countryCode===G.dialCode?"bg-primary/10 text-primary font-medium":"text-text"),onKeyDown:ke=>{(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),Ae({...J,countryCode:G.dialCode}),N(false),P(""));},onClick:()=>{Ae({...J,countryCode:G.dialCode}),N(false),P("");},children:[jsx("span",{className:"mr-2 text-base",children:G.flag}),jsx("span",{className:"flex-1 truncate",children:G.name}),jsx("span",{className:t("text-xs ml-2",J.countryCode===G.dialCode?"text-primary/70":"text-text-muted"),children:G.dialCode})]},G.id)):jsx("li",{className:"px-2 py-3 text-center text-sm text-text-muted",children:"No countries found"})})]}),yt&&jsx("div",{className:"flex items-center pl-3",children:jsx("span",{className:"text-text-secondary flex items-center justify-center",children:m})}),jsx("input",{ref:F,...A,id:V,disabled:!!C||!!g,type:"tel",inputMode:"numeric",value:J.phoneNumber,onChange:Me,autoComplete:H,"aria-invalid":Le==="error"?true:void 0,"aria-describedby":ve,"aria-required":n,maxLength:xe,className:t("flex-1 w-full bg-transparent border-none outline-none focus:ring-0 focus:outline-none focus:border-none focus-visible:ring-0 focus-visible:outline-none px-3 min-w-0 transition-colors duration-150 disabled:cursor-not-allowed",I)}),vt&&jsx("div",{className:"flex items-center pr-3",children:jsx("span",{className:"text-text-secondary flex items-center justify-center",children:Tn()})})]}),b!==void 0&&jsx("span",{className:"inline-flex items-center rounded-r-md border border-l-0 border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",children:b})]}),o!==void 0&&jsx("p",{id:U,className:t("text-xs leading-tight text-text-muted",M),children:o}),W!==void 0&&jsx("p",{id:_,role:Le==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1",jn[Le],M),children:W})]})});Zt.displayName="Phone";var Yn={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},Qn={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},eo={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none",unstyled:"border-0 bg-transparent p-0 focus:outline-none"},to={default:{default:"border-border focus:border-primary",filled:"focus:border-primary",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error",filled:"bg-error/5 focus:border-error",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success",filled:"bg-success/5 focus:border-success",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning",filled:"bg-warning/5 focus:border-warning",flushed:"border-warning focus:border-warning",unstyled:""}},ro={default:"text-text-muted",error:"text-error",success:"text-success",warning:"text-warning"};function no(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function Yt({children:r,side:e}){return jsx("span",{"aria-hidden":"true",className:t("inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",e==="left"?"rounded-l-md border-r-0":"rounded-r-md border-l-0"),children:r})}var Xe=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,clearable:y,isLoading:g,multiline:R,rows:h=4,type:w="text",value:L,onChange:D,...H},A){let F=useId(),$=E??F,V=`${$}-helper`,U=`${$}-state`,[_,X]=useState(w),T=w==="password",N=y&&(typeof L=="string"||typeof L=="number")&&String(L).length>0,S=m!==void 0,P=p!==void 0||!!N||!!g||T,z=no(l,i,a,c),K=[o?V:null,z?U:null].filter(Boolean).join(" ")||void 0,Y=()=>{let ee=A&&typeof A=="object"&&"current"in A?A.current:null;if(ee){Object.getOwnPropertyDescriptor((R?window.HTMLTextAreaElement:window.HTMLInputElement).prototype,"value")?.set?.call(ee,"");let xe=new Event("input",{bubbles:true});ee.dispatchEvent(xe);}else D&&D({target:{value:""},currentTarget:{value:""},preventDefault:()=>{},stopPropagation:()=>{}});},Q=()=>g?jsxs("svg",{className:"animate-spin h-5 w-5 text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):N?jsx("button",{type:"button",onClick:Y,className:"flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-interaction-hover p-0.5 transition w-6 h-6 border-0 bg-transparent cursor-pointer","aria-label":"Clear input",children:jsx(XMarkIcon,{className:"w-[18px] h-[18px]"})}):T?jsx("button",{type:"button",onClick:()=>{X(ee=>ee==="password"?"text":"password");},className:"flex items-center justify-center rounded-full text-text-muted hover:text-text transition w-6 h-6 border-0 bg-transparent cursor-pointer","aria-label":_==="password"?"Show password":"Hide password",children:_==="password"?jsx(EyeIcon,{className:"w-5 h-5"}):jsx(EyeSlashIcon,{className:"w-5 h-5"})}):p,J={id:$,disabled:!!C||!!g,value:L,onChange:D,"aria-invalid":l==="error"?true:void 0,"aria-describedby":K,"aria-required":n,className:t("w-full bg-transparent border-0 focus:outline-none focus:ring-0 outline-none h-full",!R&&Yn[d],R&&"py-3 px-4 resize-none",w==="number"&&"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",I),style:{paddingLeft:S?"0.5rem":void 0,paddingRight:P?"0.5rem":void 0},...H};return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:$,className:t("font-black leading-none text-text mb-2 uppercase tracking-widest",Qn[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch transition-all duration-150 overflow-hidden",eo[s],to[l][s],f?"w-full":"w-fit","focus-within:ring-4 focus-within:ring-primary/20 focus-within:border-primary",C&&"opacity-50 cursor-not-allowed bg-surface-secondary",R&&"h-auto",v),children:[u!==void 0&&jsx(Yt,{side:"left",children:u}),jsxs("div",{className:"flex flex-1 items-center min-w-0",children:[S&&jsx("div",{className:t("pl-3 shrink-0 flex items-center justify-center",R&&"self-start mt-3"),"aria-hidden":"true",children:m}),jsx("div",{className:"flex-1 min-w-0 h-full",children:R?jsx("textarea",{ref:A,rows:h,...J}):jsx("input",{ref:A,type:_,...J,onKeyDown:ee=>{w==="number"&&["e","E","+"].includes(ee.key)&&ee.preventDefault(),H.onKeyDown?.(ee);}})}),P&&jsx("div",{className:t("pr-3 shrink-0 flex items-center justify-center text-text-secondary",R&&"self-start mt-3"),style:{width:"2.5rem"},"aria-hidden":"true",children:Q()})]}),b!==void 0&&jsx(Yt,{side:"right",children:b})]}),o!==void 0&&jsx("p",{id:V,className:t("text-xs leading-tight text-text-muted ",M),children:o}),z!==void 0&&jsx("p",{id:U,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1",ro[l],M),children:z})]})});Xe.displayName="TextInput";var er=forwardRef(({debounce:r=300,onDebouncedChange:e,onChange:n,value:o,defaultValue:i,clearable:a=true,leftElement:c,...s},d)=>{let[l,f]=useState(o??i??""),[m,p]=useState(o),[u,b]=useState(String(o??i??""));return o!==m&&(f(o??""),p(o),b(String(o??""))),useEffect(()=>{if(String(l)===u)return;let I=setTimeout(()=>{e&&(e(String(l)),b(String(l)));},r);return ()=>{clearTimeout(I);}},[l,r,e,u]),jsx(Xe,{...s,ref:d,value:l,onChange:I=>{f(I.target.value),n&&n(I);},clearable:a,leftElement:c??jsx(MagnifyingGlassIcon,{className:"w-[18px] h-[18px] text-text-muted"}),type:"text"})});er.displayName="SearchInput";var tr=150,uo={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"},mo={top:"top-full left-1/2 -translate-x-1/2",bottom:"bottom-full left-1/2 -translate-x-1/2",left:"left-full top-1/2 -translate-y-1/2",right:"right-full top-1/2 -translate-y-1/2"},fo={top:"border-l-transparent border-r-transparent border-b-transparent",bottom:"border-l-transparent border-r-transparent border-t-transparent",left:"border-t-transparent border-b-transparent border-r-transparent",right:"border-t-transparent border-b-transparent border-l-transparent"},po={top:"translate-y-1",bottom:"-translate-y-1",left:"translate-x-1",right:"-translate-x-1"},go={sm:"px-2 py-1 text-xs rounded-md",md:"px-3 py-1.5 text-sm rounded-lg",lg:"px-4 py-2 text-sm rounded-xl"},bo={dark:["bg-gray-900 text-gray-50","shadow-[0_4px_16px_rgba(0,0,0,0.35)]","ring-1 ring-white/10"].join(" "),primary:["bg-gradient-to-b from-blue-500 to-blue-600 text-white","shadow-[0_4px_16px_rgba(59,130,246,0.45)]","ring-1 ring-blue-400/30"].join(" "),light:["bg-white text-gray-800","border border-gray-200/80","shadow-[0_4px_16px_rgba(0,0,0,0.10)]"].join(" ")},xo={dark:{top:"border-t-gray-900",bottom:"border-b-gray-900",left:"border-l-gray-900",right:"border-r-gray-900"},primary:{top:"border-t-blue-600",bottom:"border-b-blue-500",left:"border-l-blue-600",right:"border-r-blue-500"},light:{top:"border-t-gray-200",bottom:"border-b-gray-200",left:"border-l-gray-200",right:"border-r-gray-200"}};function Nt({content:r,children:e,placement:n="top",trigger:o="hover",showDelay:i=0,hideDelay:a=100,size:c="md",variant:s="dark",open:d,disabled:l=false,maxWidth:f=240,className:m,wrapperClassName:p}){let[u,b]=useState(false),[B,v]=useState(false),[I,k]=useState(false),[M,E]=useState({top:0,left:0}),[C,x]=useState(n),y=d!==void 0,g=y?d:u,R=useRef(null),h=useRef(null),w=useRef(null),L=useRef(null),D=useRef(null),H=useId(),A=useCallback(()=>{w.current&&clearTimeout(w.current),L.current&&clearTimeout(L.current),D.current&&clearTimeout(D.current);},[]),F=useCallback(()=>{if(l||y)return;A();let T=()=>{b(true);};i>0?w.current=setTimeout(T,i):T();},[l,y,A,i]),$=useCallback(()=>{y||(A(),L.current=setTimeout(()=>{b(false);},a));},[y,A,a]),V=useCallback(()=>{l||y||b(T=>!T);},[l,y]);useEffect(()=>{let T=null;return g&&!l?(A(),T=requestAnimationFrame(()=>{v(true),T=requestAnimationFrame(()=>{k(true);});})):(T=requestAnimationFrame(()=>{k(false);}),D.current=setTimeout(()=>{v(false);},tr)),()=>{T&&cancelAnimationFrame(T),D.current&&clearTimeout(D.current);}},[g,l,A]);let U=useCallback(()=>{if(!R.current||!g)return;let T=R.current.getBoundingClientRect(),O=h.current,N=8,S=n,P=Q=>{switch(Q){case "top":return {t:T.top-N,l:T.left+T.width/2};case "bottom":return {t:T.bottom+N,l:T.left+T.width/2};case "left":return {t:T.top+T.height/2,l:T.left-N};case "right":return {t:T.top+T.height/2,l:T.right+N}}},z=P(n),K=z.t,Y=z.l;if(O){let Q=O.getBoundingClientRect(),J=12;if(n==="top"&&T.top-Q.height-N<J?S="bottom":n==="bottom"&&T.bottom+Q.height+N>window.innerHeight-J?S="top":n==="left"&&T.left-Q.width-N<J?S="right":n==="right"&&T.right+Q.width+N>window.innerWidth-J&&(S="left"),S!==n){let ye=P(S);K=ye.t,Y=ye.l;}let ee=Q.width/2,xe=Q.height/2;S==="top"||S==="bottom"?Y=Math.max(J+ee,Math.min(window.innerWidth-J-ee,Y)):K=Math.max(J+xe,Math.min(window.innerHeight-J-xe,K));}x(S),E({top:K,left:Y});},[g,n]);useLayoutEffect(()=>{if(!g)return;let T=null,O=()=>{T=requestAnimationFrame(U);};return O(),window.addEventListener("resize",O),window.addEventListener("scroll",O,true),()=>{T!==null&&cancelAnimationFrame(T),window.removeEventListener("resize",O),window.removeEventListener("scroll",O,true);}},[g,U]),useEffect(()=>{if(!g)return;let T=O=>{O.key==="Escape"&&(A(),b(false));};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T);}},[g,A]),useEffect(()=>A,[A]);let _={};(o==="hover"||o==="focus")&&(_.onFocus=F,_.onBlur=$),o==="hover"?(_.onMouseEnter=F,_.onMouseLeave=$):o==="click"&&(_.onClick=V),_.onKeyDown=T=>{(T.key==="Enter"||T.key===" ")&&V();};let X=e;return jsxs("span",{ref:R,className:t("relative inline-flex isolate z-0",p),"aria-describedby":g&&!l?H:void 0,..._,children:[jsx("span",{className:"relative z-0",children:X}),B&&!l&&createPortal(jsx("div",{ref:h,className:t("pointer-events-none fixed z-[9999]",uo[C]),style:{top:M.top,left:M.left},children:jsxs("div",{id:H,role:"tooltip",style:{maxWidth:f,transitionDuration:`${tr.toString()}ms`},className:t("relative min-w-max whitespace-normal break-words","font-sans font-medium tracking-tight text-center leading-snug","transition-[opacity,transform] ease-out",I?"opacity-100 translate-x-0 translate-y-0":["opacity-0",po[C]].join(" "),bo[s],go[c],m),children:[jsx("div",{"aria-hidden":"true",className:t("absolute border-[6px]","drop-shadow-sm",mo[C],fo[C],xo[s][C])}),r]})}),document.body)]})}var wo={xs:"h-6 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-sm",lg:"h-11 px-6 text-base",xl:"h-12 px-8 text-lg"},yo={xs:"w-3 h-3",sm:"w-3.5 h-3.5",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5"},vo={primary:"bg-primary text-text-inverse hover:bg-primary-hover hover:shadow-xl hover:shadow-primary/20 active:scale-95 border border-transparent shadow-md focus-visible:ring-primary/40 transition-all duration-normal",secondary:"bg-secondary text-text hover:bg-secondary-hover border border-transparent focus-visible:ring-primary/40",outline:"bg-transparent text-text border border-border hover:bg-hover hover:text-text focus-visible:ring-primary/40",ghost:"bg-transparent text-text border border-transparent hover:bg-hover hover:text-text focus-visible:ring-primary/40",danger:"bg-error text-text-inverse hover:bg-error/90 border border-transparent shadow-sm focus-visible:ring-error/40",success:"bg-success text-text-inverse hover:bg-success/90 border border-transparent shadow-sm focus-visible:ring-success/40",warning:"bg-warning text-text-inverse hover:bg-warning/90 border border-transparent shadow-sm focus-visible:ring-warning/40",info:"bg-info text-text-inverse hover:bg-info/90 border border-transparent shadow-sm focus-visible:ring-info/40"},Co="opacity-50 cursor-not-allowed shadow-none",mt=forwardRef(function({children:e,className:n,variant:o="primary",size:i="md",fullWidth:a=false,isLoading:c=false,loadingText:s,disabled:d=false,leftIcon:l,rightIcon:f,tooltip:m,tooltipPlacement:p="top",type:u="button",...b},B){let v=d||c,I=jsxs("div",{className:t("relative flex items-center justify-center",yo[i]),children:[jsx("div",{className:"absolute inset-0 rounded-full border-1 border-current opacity-20 animate-ping"}),jsxs("svg",{className:"animate-spin relative z-10 w-full h-full",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",role:"status",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-90",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]}),k=jsx("button",{ref:B,type:u,disabled:v,"aria-disabled":v,"aria-busy":c,className:t("relative inline-flex items-center justify-center gap-2 font-bold rounded-md transition-[background-color,border-color,color,box-shadow,transform,opacity] duration-normal focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-surface",wo[i],vo[o],a?"w-full":"",v?Co:"",n),...b,children:c&&s?jsxs(Fragment,{children:[I,jsx("span",{children:s})]}):jsxs(Fragment,{children:[l&&jsx("span",{className:t("inline-flex shrink-0",c&&"invisible opacity-0"),children:l}),jsx("span",{className:t("truncate flex items-center justify-center",c&&"invisible opacity-0"),children:e}),f&&jsx("span",{className:t("inline-flex shrink-0",c&&"invisible opacity-0"),children:f}),c&&!s&&jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:I})]})});return m?jsx(Nt,{content:m,placement:p,wrapperClassName:a?"w-full":"",children:k}):k});mt.displayName="Button";var Ro={xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-11 h-11",xl:"w-12 h-12"},Be=forwardRef(({icon:r,"aria-label":e,isRound:n,className:o,size:i="md",...a},c)=>jsx(mt,{ref:c,size:i,className:t("p-0 flex-shrink-0 min-w-0",Ro[i],n&&"rounded-full",o),"aria-label":e,...a,children:r}));Be.displayName="IconButton";var Pt=({groups:r,isCollapsed:e,onToggleCollapse:n,logo:o,footer:i,className:a,glass:c=false,width:s=288,collapsedWidth:d=80,showToggleButton:l=false,togglePosition:f="center",position:m="left",centerIcons:p=true,classNames:u={},styles:b={},renderItem:B})=>{let[v,I]=useState(false),[k,M]=useState({}),E=e??v,C=()=>{let h=!E;n?n(h):I(h);},x=h=>{M(w=>({...w,[h]:!w[h]}));},y=E?d:s,g=(h,w=0)=>{if(h.hidden)return null;if(B)return jsx("div",{children:B(h,E)},h.id);let L=h.items&&h.items.length>0,D=k[h.id]??!!h.isExpanded,H=h.component??"button",A=jsxs(Fragment,{children:[h.icon&&jsx("span",{className:t("shrink-0 transition-colors duration-normal",h.isActive?"text-text-inverse":"text-text-muted group-hover:text-text",E&&p&&"mx-auto",u.itemIcon),style:b.itemIcon,children:h.icon}),!E&&jsx("span",{className:t("truncate",u.itemLabel),style:b.itemLabel,children:h.label}),!E&&jsxs("div",{className:"ml-auto flex items-center gap-2",children:[h.badge&&jsx("span",{className:"shrink-0",children:h.badge}),L&&jsx(ChevronDownIcon$1,{className:t("w-4 h-4 transition-transform duration-normal",D&&"rotate-180")})]}),E&&jsx("div",{className:"absolute left-full ml-2 px-2 py-1 bg-surface-secondary border border-border rounded shadow-lg text-xs opacity-0 pointer-events-none group-hover:opacity-100 transition-opacity z-index-tooltip whitespace-nowrap text-text",children:h.label})]});return jsxs("div",{className:"w-full",children:[jsx(H,{type:H==="button"?"button":void 0,onClick:F=>{L&&!E&&(F.preventDefault(),x(h.id)),h.onClick?.();},className:t("w-full flex items-center gap-4 transition-all duration-normal group relative text-base rounded-lg",w===0?"px-4 py-3":"px-3 py-2 pl-10",h.isActive?"bg-black text-text-inverse shadow-md shadow-black/20 font-bold":"text-text-secondary hover:bg-hover hover:text-text",E&&"justify-center px-0",h.isActive&&u.itemActive,E&&u.itemCollapsed,u.item),style:b.item,title:E?h.label:void 0,...h.componentProps??{},children:A}),L&&D&&!E&&jsx("div",{className:"mt-1 space-y-1",children:h.items?.map(F=>g(F,w+1))})]},h.id)},R=l&&jsx("button",{onClick:C,className:t("absolute z-index-popover flex items-center justify-center w-8 h-8 rounded-full bg-surface border border-border shadow-sm hover:shadow-md transition-all duration-normal hover:bg-hover text-text-muted hover:text-text",m==="left"?"-right-4":"-left-4",f==="top"&&"top-12",f==="center"&&"top-1/2 -translate-y-1/2",f==="bottom"&&"bottom-12",u.toggleButton),style:b.toggleButton,"aria-label":E?"Expand sidebar":"Collapse sidebar",children:E?m==="left"?jsx(ChevronRightIcon,{className:"w-4 h-4"}):jsx(ChevronLeftIcon,{className:"w-4 h-4"}):m==="left"?jsx(ChevronLeftIcon,{className:"w-4 h-4"}):jsx(ChevronRightIcon,{className:"w-4 h-4"})});return jsxs("aside",{className:t("flex flex-col h-full bg-surface transition-all duration-slow ease-in-out z-index-sticky shadow-premium relative",m==="right"&&"border-l border-border",m==="left"&&"border-r border-border",c&&"glass",u.root,a),style:{width:y,...b.root},children:[R,o&&jsx("div",{className:t("flex items-center px-6 pt-10 pb-6",E&&"justify-center px-0",u.header),style:b.header,children:o}),jsx("div",{className:t("flex-1 overflow-y-auto overflow-x-hidden px-4 py-6 space-y-10 custom-scrollbar",u.content),style:b.content,children:r.map(h=>h.hidden?null:jsxs("div",{className:t("space-y-4",u.group),style:b.group,children:[h.label&&!E&&jsx("h3",{className:t("px-2 text-xs font-bold text-text-muted uppercase tracking-wider",u.groupLabel),style:b.groupLabel,children:h.label}),jsx("div",{className:"space-y-1",children:h.items.map(w=>g(w))})]},h.id))}),i&&jsx("div",{className:t("p-6 mt-auto border-t border-border/50",E&&"flex justify-center px-0",u.footer),style:b.footer,children:i})]})};Pt.displayName="Sidebar";var Tt=({logo:r,children:e,actions:n,userSection:o,isSticky:i=true,className:a,glass:c=false,onMenuToggle:s})=>jsxs("header",{className:t("h-16 flex items-center justify-between px-6 bg-surface border-b border-border transition-all duration-normal",i&&"sticky top-0 z-index-sticky",c&&"glass",a),children:[jsxs("div",{className:"flex items-center gap-4",children:[s&&jsx(Be,{icon:jsx(Bars3Icon,{className:"w-5 h-5"}),"aria-label":"Toggle Menu",variant:"ghost",size:"sm",onClick:s,className:"lg:hidden"}),r&&jsx("div",{className:"flex items-center",children:r})]}),jsx("div",{className:"flex-1 max-w-xl px-8 hidden md:block",children:e}),jsxs("div",{className:"flex items-center gap-2",children:[n&&jsx("div",{className:"flex items-center gap-1",children:n}),o&&jsx("div",{className:"flex items-center pl-2 ml-2 border-l border-border h-8",children:o})]})]});Tt.displayName="Header";var Ao={xs:"w-3.5 h-3.5",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-7 h-7"},Ho={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},ir={xs:"text-[10px]",sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},zo={default:"border-border text-accent focus:ring-accent/40",error:"border-error text-error focus:ring-error/20",success:"border-success text-success focus:ring-success/20",warning:"border-warning text-warning focus:ring-warning/20"},Vo={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},Fo="disabled:opacity-50 disabled:bg-surface-secondary disabled:cursor-not-allowed disabled:border-border";function _o(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var lr=forwardRef(function({id:e,label:n,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,size:s="md",state:d="default",indeterminate:l=false,className:f,containerClassName:m,wrapperClassName:p,inputClassName:u,labelClassName:b,messageClassName:B,disabled:v=false,required:I=false,...k},M){let E=useId(),C=e??`checkbox-${E.replace(/:/g,"")}`,x=`${C}-helper`,y=`${C}-state`,g=useRef(null),R=D=>{g.current=D,typeof M=="function"?M(D):M&&(M.current=D);};useEffect(()=>{g.current&&(g.current.indeterminate=l);},[l]);let h=_o(d,i,a,c),w=[o?x:null,h?y:null].filter(Boolean).join(" ")||void 0,L=o??h;return jsxs("div",{className:t("relative flex items-start",m,p,f),children:[jsxs("div",{className:"relative flex h-6 w-auto items-center justify-center",children:[jsx("input",{...k,ref:R,id:C,type:"checkbox",disabled:v,required:I,"aria-invalid":d==="error"?true:void 0,"aria-describedby":w,className:t("peer appearance-none rounded-sm border bg-surface transition-all duration-normal","checked:bg-current checked:border-transparent","indeterminate:bg-current indeterminate:border-transparent","focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface",Ao[s],zo[d],Fo,u)}),jsx(CheckIcon,{className:t("pointer-events-none absolute inset-0 m-auto text-text-inverse opacity-0 transition-opacity peer-checked:opacity-100",s==="xs"?"w-2.5 h-2.5":s==="sm"?"w-3 h-3":s==="md"?"w-3.5 h-3.5":s==="lg"?"w-4 h-4":"w-5 h-5")}),jsx(MinusIcon,{className:t("pointer-events-none absolute inset-0 m-auto text-text-inverse opacity-0 transition-opacity peer-indeterminate:opacity-100",s==="xs"?"w-2.5 h-2.5":s==="sm"?"w-3 h-3":s==="md"?"w-3.5 h-3.5":s==="lg"?"w-4 h-4":"w-5 h-5")})]}),(!!n||!!L)&&jsxs("div",{className:"ml-3 flex flex-col pt-0.5",children:[n&&jsxs("label",{htmlFor:C,className:t("font-bold leading-none text-text uppercase tracking-widest select-none",v&&"opacity-50 cursor-not-allowed",Ho[s],b),children:[n,I&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),o&&jsx("p",{id:x,className:t("text-text-muted mt-1 font-medium",v&&"opacity-50",ir[s],B),children:o}),h&&jsx("p",{id:y,role:d==="error"?"alert":void 0,className:t("mt-1",v&&"opacity-50",Vo[d],ir[s],B),children:h})]})]})});lr.displayName="Checkbox";var Jo={success:jsx(CheckCircleIcon,{className:"w-5 h-5"}),error:jsx(ExclamationCircleIcon,{className:"w-5 h-5"}),warning:jsx(ExclamationTriangleIcon,{className:"w-5 h-5"}),info:jsx(InformationCircleIcon,{className:"w-5 h-5"})},Go={success:"bg-white/20",error:"bg-white/20",warning:"bg-white/20",info:"bg-white/20"},qo={success:"bg-success/20 text-success",error:"bg-error/20 text-error",warning:"bg-warning/20 text-warning",info:"bg-info/20 text-info"},Wo={success:"bg-success/10 text-success",error:"bg-error/10 text-error",warning:"bg-warning/10 text-warning",info:"bg-info/10 text-info"},Zo={solid:{success:"bg-success text-text border-transparent shadow-[0_8px_32px_rgba(16,185,129,0.3)]",error:"bg-error text-text border-transparent shadow-[0_8px_32px_rgba(239,68,68,0.3)]",warning:"bg-warning text-text border-transparent shadow-[0_8px_32px_rgba(245,158,11,0.3)]",info:"bg-info text-text border-transparent shadow-[0_8px_32px_rgba(59,130,246,0.3)]"},subtle:{success:"bg-success/10 text-text border-success/25 shadow-[0_8px_32px_rgba(16,185,129,0.12)]",error:"bg-error/10 text-text border-error/25 shadow-[0_8px_32px_rgba(239,68,68,0.12)]",warning:"bg-warning/10 text-text border-warning/25 shadow-[0_8px_32px_rgba(245,158,11,0.12)]",info:"bg-info/10 text-text border-info/25 shadow-[0_8px_32px_rgba(59,130,246,0.12)]"},"left-accent":{success:"bg-surface border-border border-l-success shadow-[0_8px_24px_rgba(0,0,0,0.08)] text-text",error:"bg-surface border-border border-l-error shadow-[0_8px_24px_rgba(0,0,0,0.08)] text-text",warning:"bg-surface border-border border-l-warning shadow-[0_8px_24px_rgba(0,0,0,0.08)] text-text",info:"bg-surface border-border border-l-info shadow-[0_8px_24px_rgba(0,0,0,0.08)] text-text"}},Yo={success:"text-success",error:"text-error",warning:"text-warning",info:"text-info"},cr=forwardRef((r,e)=>{let{title:n,description:o,status:i="info",variant:a="solid",isClosable:c=true,onClose:s,className:d}=r,l=a==="solid",f=a==="left-accent",m=l?Go[i]:f?Wo[i]:qo[i];return jsxs("div",{ref:e,role:"alert",className:t("relative flex w-full min-w-80 max-w-sm items-start gap-3 px-4 py-3.5 rounded-xl border overflow-hidden transition-all duration-200",f&&"border-l-4 rounded-l-none",Zo[a][i],d),children:[jsx("div",{className:t("flex-shrink-0 flex items-center justify-center w-8 h-8 rounded-lg mt-0.5",m),children:Jo[i]}),jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[n&&jsx("p",{className:t("text-sm font-bold leading-tight tracking-wide",!l&&Yo[i]),children:n}),o&&jsx("p",{className:t("text-sm leading-relaxed mt-0.5",l?"opacity-90":"text-text-secondary"),children:o})]}),c&&jsx("button",{type:"button",onClick:s,className:t("flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-md transition-all duration-150 active:scale-90",l?"hover:bg-white/20 text-text-inverse":"hover:bg-black/10 dark:hover:bg-white/10 text-text-secondary hover:text-text"),"aria-label":"Close",children:jsx(XMarkIcon,{className:"w-4 h-4 stroke-2"})})]})});cr.displayName="Toaster";var aa={xs:"py-1 px-2 text-xs min-h-[1.75rem]",sm:"py-1.5 px-3 text-sm min-h-[2.125rem]",md:"py-2 px-3 text-sm min-h-[2.5rem]",lg:"py-2.5 px-4 text-base min-h-[3rem]",xl:"py-3 px-4 text-lg min-h-[3.5rem]"},mr={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},sa={default:"rounded-md border border-border bg-surface shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-0 transition-all duration-normal",filled:"rounded-md border border-transparent bg-surface-secondary focus-visible:bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-0 transition-all duration-normal",flushed:"rounded-none border-0 border-b border-border bg-transparent focus-visible:outline-none focus-visible:ring-0",unstyled:"border-0 bg-transparent p-0 focus-visible:outline-none focus-visible:ring-0"},ia={default:{default:"border-border focus-visible:border-primary focus-visible:ring-primary/40",filled:"focus-visible:border-primary focus-visible:ring-primary/40",flushed:"border-border focus-visible:border-primary",unstyled:""},error:{default:"border-error focus-visible:border-error focus-visible:ring-error/20",filled:"bg-error/5 focus-visible:border-error focus-visible:ring-error/20",flushed:"border-error focus-visible:border-error",unstyled:""},success:{default:"border-success focus-visible:border-success focus-visible:ring-success/20",filled:"bg-success/5 focus-visible:border-success focus-visible:ring-success/20",flushed:"border-success focus-visible:border-success",unstyled:""},warning:{default:"border-warning focus-visible:border-warning focus-visible:ring-warning/20",filled:"bg-warning/5 focus-visible:border-warning focus-visible:ring-warning/20",flushed:"border-warning focus-visible:border-warning",unstyled:""}},la={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},da="disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";function ca(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var It=forwardRef(function({options:e,value:n,defaultValue:o=[],onChange:i,placeholder:a="Select options...",label:c,required:s=false,helperText:d,errorMessage:l,successMessage:f,warningMessage:m,variant:p="default",size:u="md",state:b="default",fullWidth:B=true,disabled:v=false,isLoading:I=false,id:k,wrapperClassName:M,triggerClassName:E,dropdownClassName:C,labelClassName:x,helperClassName:y},g){let R=useId(),h=k??R,w=`${h}-helper`,L=`${h}-state`,D=`${h}-listbox`,[H,A]=useState(false),[F,$]=useState(o),V=n!==void 0,U=V?n:F,_=useRef(null),X=()=>{v||I||A(P=>!P);},T=P=>{let z;U.includes(P)?z=U.filter(K=>K!==P):z=[...U,P],V||$(z),i?.(z);};useEffect(()=>{let P=z=>{_.current&&!_.current.contains(z.target)&&A(false);};return H&&(document.addEventListener("mousedown",P),document.addEventListener("touchstart",P)),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("touchstart",P);}},[H]);let O=ca(b,l,f,m),N=[d?w:null,O?L:null].filter(Boolean).join(" ")||void 0,S=e.filter(P=>U.includes(P.value)).map(P=>P.label);return jsxs("div",{ref:_,className:t("relative flex flex-col gap-1",B?"w-full":"w-fit",H&&"z-[60]",M),children:[c!==void 0&&jsxs("label",{htmlFor:h,className:t("font-black leading-none text-text uppercase tracking-widest",mr[u],v&&"opacity-50 cursor-not-allowed",x),children:[c,s&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("button",{ref:g,id:h,type:"button",disabled:v||I,"aria-haspopup":"listbox","aria-expanded":H,"aria-controls":H?D:void 0,"aria-invalid":b==="error"?true:void 0,"aria-describedby":N,onClick:X,className:t("w-full flex items-center justify-between text-left transition-colors duration-150",aa[u],sa[p],ia[b][p],da,E),children:[jsx("div",{className:"flex flex-wrap gap-1 truncate",children:S.length>0?jsx("span",{className:"truncate text-text font-bold leading-tight",children:S.join(", ")}):jsx("span",{className:"text-text-muted truncate transition-all duration-normal",children:a})}),jsx("div",{className:"shrink-0 ml-2 text-text-muted",children:I?jsxs("svg",{className:"animate-spin h-4 w-4 text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):jsx(ChevronDownIcon,{className:t("w-4 h-4 transition-transform duration-200",H&&"rotate-180")})})]}),H&&jsx("div",{className:t("absolute z-dropdown w-full mt-1 bg-surface border border-border rounded-md shadow-lg","max-h-60 overflow-y-auto py-1 animate-in fade-in zoom-in-95 duration-200","top-full left-0",C),children:jsx("ul",{id:D,role:"listbox","aria-multiselectable":"true",className:"flex flex-col outline-none",tabIndex:-1,children:e.length===0?jsx("li",{className:"px-3 py-2 text-sm text-gray-500 text-center",children:"No options available"}):e.map(P=>{let z=U.includes(P.value);return jsxs("li",{role:"option","aria-selected":z,onClick:()=>{T(P.value);},onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),T(P.value));},tabIndex:0,className:t("flex items-center gap-2 px-3 py-2 cursor-pointer transition-all duration-fast","hover:bg-hover"+(z?"/60":""),z?"text-primary font-bold":"text-text",mr[u]),children:[jsx("div",{className:t("flex shrink-0 items-center justify-center w-4 h-4 border rounded-sm transition-all duration-normal",z?"bg-primary border-primary":"border-border"),children:z&&jsx(CheckIcon$1,{className:"w-3 h-3 text-text-inverse"})}),jsx("span",{className:"truncate",children:P.label})]},P.value)})})}),(d!==void 0||O!==void 0)&&jsxs("div",{className:"mt-1",children:[d!==void 0&&jsx("p",{id:w,className:t("text-xs leading-tight text-text-muted font-medium",y),children:d}),O!==void 0&&jsx("p",{id:L,role:b==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1 font-medium",la[b],y),children:O})]})]})});It.displayName="MultiSelect";var fr={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},pa={sm:"text-xs",md:"text-sm",lg:"text-sm"},ga={default:"border-border text-accent focus:ring-accent/40 checked:border-accent checked:bg-accent",error:"border-error text-error focus:ring-error/20 checked:border-error checked:bg-error",success:"border-success text-success focus:ring-success/20 checked:border-success checked:bg-success",warning:"border-warning text-warning focus:ring-warning/20 checked:border-warning checked:bg-warning"},ba={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"};function xa(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var Lt=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,size:s="md",state:d="default",className:l,wrapperClassName:f,inputClassName:m,labelClassName:p,helperClassName:u,id:b,disabled:B,onClick:v,onPointerDown:I,onKeyDown:k,...M},E){let C=useId(),x=b??C,y=`${x}-helper`,g=`${x}-state`,R=xa(d,i,a,c),h=[o?y:null,R?g:null].filter(Boolean).join(" ")||void 0,w=useRef(false),L=A=>{w.current=A.currentTarget.checked,I&&I(A);},D=A=>{(A.key===" "||A.key==="Enter")&&(w.current=A.currentTarget.checked),k&&k(A);},H=A=>{if(w.current){A.currentTarget.checked=false;let $=Reflect.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked")?.set;$&&Reflect.apply($,A.currentTarget,[false]);let V=new Event("change",{bubbles:true});A.currentTarget.dispatchEvent(V);}v&&v(A);};return jsxs("div",{className:t("flex flex-col gap-1",f,l),children:[jsxs("div",{className:"flex items-start gap-2",children:[jsxs("div",{className:t("flex items-center justify-center shrink-0 relative",fr[s]),children:[jsx("input",{ref:E,...M,id:x,type:"radio",disabled:B,"aria-invalid":d==="error"?true:void 0,"aria-describedby":h,required:n,onClick:H,onPointerDown:L,onKeyDown:D,className:t("peer m-0 appearance-none rounded-full border bg-surface transition-all overflow-hidden focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-surface disabled:cursor-not-allowed disabled:bg-surface-secondary disabled:border-border disabled:checked:bg-border",fr[s],ga[d],m)}),jsx("span",{className:"pointer-events-none absolute h-[1em] w-[1em] rounded-full text-[0.4em] text-text-inverse opacity-0 transition-opacity peer-checked:bg-current peer-checked:opacity-100 peer-disabled:peer-checked:bg-text-muted/40"})]}),e!==void 0&&jsxs("label",{htmlFor:x,className:t("font-bold leading-none text-text mt-[0.125rem] select-none uppercase tracking-widest",B&&"opacity-50 cursor-not-allowed",pa[s],p),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]})]}),(o!==void 0||R!==void 0)&&jsxs("div",{className:t("ml-6",s==="sm"&&"ml-6",s==="md"&&"ml-7",s==="lg"&&"ml-8"),children:[o!==void 0&&jsx("p",{id:y,className:t("text-xs leading-tight text-text-muted font-medium",u),children:o}),R!==void 0&&jsx("p",{id:g,role:d==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1 font-medium",ba[d],u),children:R})]})]})});Lt.displayName="RadioButton";var va={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},Ca={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},Sa={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",unstyled:"border-0 bg-transparent p-0 focus:outline-none focus:ring-0"},Ra={default:{default:"border-border focus:border-primary focus:ring-primary/40",filled:"focus:border-primary focus:ring-primary/40",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error focus:ring-error/20",filled:"bg-error/5 focus:border-error focus:ring-error/20",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success focus:ring-success/20",filled:"bg-success/5 focus:border-success focus:ring-success/20",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning focus:ring-warning/20",filled:"bg-warning/5 focus:border-warning focus:ring-warning/20",flushed:"border-warning focus:border-warning",unstyled:""}},ka={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},Na="disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";function Pa(r,e,n){let o={xs:"pl-6",sm:"pl-8",md:"pl-9",lg:"pl-10",xl:"pl-11"},i={xs:"pr-8",sm:"pr-10",md:"pr-11",lg:"pr-12",xl:"pr-12"},a=[];return r&&a.push(o[n]),e&&a.push(i[n]),a.join(" ")}function Ea(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function pr({children:r,side:e,size:n,pointerEvents:o=false}){return jsx("span",{"aria-hidden":"true",className:t("absolute top-1/2 -translate-y-1/2 text-text-secondary flex items-center justify-center",!o&&"pointer-events-none",e==="left"?"left-3":"right-3",{xs:"w-3.5 h-3.5",sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5"}[n]),children:r})}function gr({children:r,side:e}){return jsx("span",{"aria-hidden":"true",className:t("inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",e==="left"?"rounded-l-md border-r-0":"rounded-r-md border-l-0"),children:r})}var Mt=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,clearable:y,isLoading:g,value:R,onChange:h,...w},L){let D=useId(),H=E??D,A=`${H}-helper`,F=`${H}-state`,V=y&&typeof R=="string"&&R.length>0,U=m!==void 0,_=p!==void 0||!!V||!!g,X=Ea(l,i,a,c),T=[o?A:null,X?F:null].filter(Boolean).join(" ")||void 0,O=()=>{if(L&&typeof L!="function"&&L.current){let z=Reflect.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;z&&Reflect.apply(z,L.current,[""]);let K=new Event("input",{bubbles:true});L.current.dispatchEvent(K);}else h&&h({target:{value:""},currentTarget:{value:""},preventDefault:()=>{},stopPropagation:()=>{}});},N=()=>g?jsxs("svg",{className:"animate-spin h-full w-full text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):V?jsx("button",{type:"button",onClick:O,className:"pointer-events-auto flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast","aria-label":"Clear time",children:jsx(XMarkIcon,{className:"w-full h-full",strokeWidth:2.5})}):p,S=jsx("input",{ref:L,id:H,disabled:!!C||!!g,type:"time",value:R,onChange:h,"aria-invalid":l==="error"?true:void 0,"aria-describedby":T,"aria-required":n,className:t("w-full transition-colors duration-150","[&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:opacity-60 hover:[&::-webkit-calendar-picker-indicator]:opacity-100",va[d],Sa[s],Ra[l][s],Na,Pa(U,_,d),I),...w});return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:H,className:t("font-black leading-none text-text uppercase tracking-widest",Ca[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch",f?"w-full":"w-fit",v),children:[u!==void 0&&jsx(gr,{side:"left",children:u}),jsxs("div",{className:"relative flex flex-1 items-center",children:[U&&jsx(pr,{side:"left",size:d,children:m}),jsx("div",{className:t("flex-1",u!==void 0&&b!==void 0?"[&>input]:rounded-none":u!==void 0?"[&>input]:rounded-l-none":b!==void 0?"[&>input]:rounded-r-none":""),children:S}),_&&jsx(pr,{side:"right",size:d,pointerEvents:!p&&!!V,children:N()})]}),b!==void 0&&jsx(gr,{side:"right",children:b})]}),o!==void 0&&jsx("p",{id:A,className:t("text-xs leading-tight text-text-muted font-medium",M),children:o}),X!==void 0&&jsx("p",{id:F,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1 font-medium",ka[l],M),children:X})]})});Mt.displayName="TimePicker";var Ma={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},Ba={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},Da={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 transition-all duration-normal",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",unstyled:"border-0 bg-transparent p-0 focus:outline-none focus:ring-0"},Aa={default:{default:"border-border focus:border-primary focus:ring-primary/40",filled:"focus:border-primary focus:ring-primary/40",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error focus:ring-error/20",filled:"bg-error/5 focus:border-error focus:ring-error/20",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success focus:ring-success/20",filled:"bg-success/5 focus:border-success focus:ring-success/20",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning focus:ring-warning/20",filled:"bg-warning/5 focus:border-warning focus:ring-warning/20",flushed:"border-warning focus:border-warning",unstyled:""}},Ha={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},za="disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";function Va(r,e,n){let o={xs:"pl-6",sm:"pl-8",md:"pl-9",lg:"pl-10",xl:"pl-11"},i={xs:"pr-6",sm:"pr-8",md:"pr-9",lg:"pr-10",xl:"pr-11"},a=[];return r&&a.push(o[n]),e&&a.push(i[n]),a.join(" ")}function Fa(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function br({children:r,side:e,size:n,pointerEvents:o=false}){return jsx("span",{"aria-hidden":"true",className:t("absolute top-1/2 -translate-y-1/2 text-text-secondary flex items-center justify-center",!o&&"pointer-events-none",e==="left"?"left-3":"right-3",{xs:"w-3.5 h-3.5",sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5"}[n]),children:r})}function xr({children:r,side:e}){return jsx("span",{"aria-hidden":"true",className:t("inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",e==="left"?"rounded-l-md border-r-0":"rounded-r-md border-l-0"),children:r})}var Bt=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,clearable:y,isLoading:g,value:R,onChange:h,...w},L){let D=useId(),H=E??D,A=`${H}-helper`,F=`${H}-state`,V=y&&typeof R=="string"&&R.length>0,U=m!==void 0,_=p!==void 0||!!V||!!g,X=Fa(l,i,a,c),T=[o?A:null,X?F:null].filter(Boolean).join(" ")||void 0,O=()=>{if(L&&typeof L!="function"&&L.current){let z=Reflect.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set;z&&Reflect.apply(z,L.current,[""]);let K=new Event("input",{bubbles:true});L.current.dispatchEvent(K);}else h&&h({target:{value:""},currentTarget:{value:""},preventDefault:()=>{},stopPropagation:()=>{}});},N=()=>g?jsxs("svg",{className:"animate-spin h-full w-full text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):V?jsx("button",{type:"button",onClick:O,className:"flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast","aria-label":"Clear input",children:jsx(XMarkIcon,{className:"w-full h-full",strokeWidth:2.5})}):p,S=jsx("input",{ref:L,id:H,disabled:!!C||!!g,type:"date",value:R,onChange:h,"aria-invalid":l==="error"?true:void 0,"aria-describedby":T,"aria-required":n,className:t("w-full transition-colors duration-150",Ma[d],Da[s],Aa[l][s],za,Va(U,_,d),I),...w});return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:H,className:t("font-black leading-none text-text uppercase tracking-widest",Ba[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch",f?"w-full":"w-fit",v),children:[u!==void 0&&jsx(xr,{side:"left",children:u}),jsxs("div",{className:"relative flex flex-1 items-center",children:[U&&jsx(br,{side:"left",size:d,children:m}),jsx("div",{className:t("flex-1",u!==void 0&&b!==void 0?"[&>input]:rounded-none":u!==void 0?"[&>input]:rounded-l-none":b!==void 0?"[&>input]:rounded-r-none":""),children:S}),_&&jsx(br,{side:"right",size:d,pointerEvents:!p&&!!V,children:N()})]}),b!==void 0&&jsx(xr,{side:"right",children:b})]}),o!==void 0&&jsx("p",{id:A,className:t("text-xs leading-tight text-text-muted font-medium",M),children:o}),X!==void 0&&jsx("p",{id:F,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1 font-medium",Ha[l],M),children:X})]})});Bt.displayName="DatePicker";var Xa={xs:"w-8 h-8 text-sm",sm:"w-10 h-10 text-base",md:"w-12 h-12 text-lg",lg:"w-14 h-14 text-xl",xl:"w-16 h-16 text-2xl"},Ja={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},Ga={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",unstyled:"border-0 bg-transparent p-0 focus:outline-none focus:ring-0"},qa={default:{default:"border-border focus:border-primary focus:ring-primary/40",filled:"focus:border-primary focus:ring-primary/40",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error focus:ring-error/20",filled:"bg-error/5 focus:border-error focus:ring-error/20",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success focus:ring-success/20",filled:"bg-success/5 focus:border-success focus:ring-success/20",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning focus:ring-warning/20",filled:"bg-warning/5 focus:border-warning focus:ring-warning/20",flushed:"border-warning focus:border-warning",unstyled:""}},Wa={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},Za="disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";function Ya(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var hr=forwardRef(function({length:e=4,value:n="",onChange:o,onComplete:i,label:a,required:c=false,helperText:s,errorMessage:d,successMessage:l,warningMessage:f,variant:m="default",size:p="md",state:u="default",className:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C=false,isLoading:x=false,mask:y=false,alphanumeric:g=false},R){let h=useId(),w=E??h,L=`${w}-helper`,D=`${w}-state`,[H,A]=useState(Array.from({length:e},()=>"")),F=useRef([]);useEffect(()=>{let N=n.split("").slice(0,e),S=Array.from({length:e},()=>"");for(let P=0;P<N.length;P++)S[P]=N[P]??"";requestAnimationFrame(()=>{A(P=>S.some((K,Y)=>K!==P[Y])?S:P);});},[n,e]);let $=N=>{let S=N.join("");o&&o(S),i&&S.length===e&&!N.includes("")&&i(S);},V=N=>{N>=0&&N<e&&(F.current[N]?.focus(),setTimeout(()=>{F.current[N]?.setSelectionRange(1,1);},0));},U=(N,S)=>{let P=N.target.value;if(P.length>1&&(P=P.slice(-1)),!g&&P&&!/^\d+$/.test(P)||g&&P&&!/^[a-zA-Z0-9]+$/.test(P))return;let z=[...H];z[S]=P,A(z),$(z),P&&S<e-1&&V(S+1);},_=(N,S)=>{if(N.key==="Backspace"){if(!H[S]&&S>0){N.preventDefault();let P=[...H];P[S-1]="",A(P),$(P),V(S-1);}}else N.key==="ArrowLeft"&&S>0?(N.preventDefault(),V(S-1)):N.key==="ArrowRight"&&S<e-1&&(N.preventDefault(),V(S+1));},X=N=>{N.preventDefault();let S=N.clipboardData.getData("text/plain").trim();if(g?S=S.replace(/[^a-zA-Z0-9]/g,""):S=S.replace(/[^\d]/g,""),!S)return;let P=[...H],z=-1;for(let K=0;K<e;K++)K<S.length&&(P[K]=S[K]??"",z=K);A(P),$(P),z>-1&&V(Math.min(z+1,e-1));},T=Ya(u,d,l,f),O=C||x;return jsxs("div",{ref:R,id:w,className:t("flex flex-col gap-2 w-fit",B,b),children:[a!==void 0&&jsxs("label",{htmlFor:`${w}-0`,className:t("font-black leading-none text-text uppercase tracking-widest",Ja[p],k),children:[a,c&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-center gap-2",v),children:[H.map((N,S)=>jsx("input",{id:`${w}-${String(S)}`,ref:P=>{F.current[S]=P;},type:y?"password":"text",inputMode:g?"text":"numeric",autoComplete:"one-time-code",maxLength:1,disabled:O,value:N,onChange:P=>{U(P,S);},onKeyDown:P=>{_(P,S);},onPaste:X,"aria-invalid":u==="error"?true:void 0,"aria-describedby":[L,D].filter(Boolean).join(" ")||void 0,className:t("text-center transition-colors duration-150",Xa[p],Ga[m],qa[u][m],Za,I)},`${w}-${String(S)}`)),x&&jsx("div",{className:"ml-2",children:jsx(ArrowPathIcon,{className:"animate-spin h-5 w-5 text-gray-400"})})]}),s!==void 0&&jsx("p",{id:L,className:t("text-xs leading-tight text-text-muted font-medium",M),children:s}),T!==void 0&&jsx("p",{id:D,role:u==="error"?"alert":void 0,className:t("text-xs leading-tight font-medium",Wa[u],M),children:T})]})});hr.displayName="OtpInput";var rs={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},ns={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},os={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none",unstyled:"border-0 bg-transparent p-0 focus:outline-none"},as={default:{default:"border-border focus:border-primary",filled:"focus:border-primary",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error",filled:"bg-error/5 focus:border-error",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success",filled:"bg-success/5 focus:border-success",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning",filled:"bg-warning/5 border-warning focus:border-warning",flushed:"border-warning focus:border-warning",unstyled:""}},ss={default:"text-text-muted",error:"text-error",success:"text-success",warning:"text-warning"};function is(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function wr({children:r,side:e}){return jsx("span",{"aria-hidden":"true",className:t("inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",e==="left"?"rounded-l-md border-r-0":"rounded-r-md border-l-0"),children:r})}var yr=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,clearable:y,isLoading:g,multiple:R=false,autoCapitalize:h="none",autoComplete:w="email",spellCheck:L=false,value:D,onChange:H,...A},F){let $=useId(),V=E??$,U=`${V}-helper`,_=`${V}-state`,T=y&&(typeof D=="string"||typeof D=="number")&&String(D).length>0,O=m!==void 0,N=p!==void 0||!!T||!!g,S=is(l,i,a,c),P=[o?U:null,S?_:null].filter(Boolean).join(" ")||void 0,z=()=>{if(F&&typeof F!="function"&&F.current){Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(F.current,"");let Y=new Event("input",{bubbles:true});F.current.dispatchEvent(Y);}else H&&H({target:{value:""},currentTarget:{value:""},preventDefault:()=>{},stopPropagation:()=>{}});},K=()=>g?jsxs("svg",{className:"animate-spin h-5 w-5 text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):T?jsx("button",{type:"button",onClick:z,className:"flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-interaction-hover p-0.5 transition w-6 h-6 border-0 bg-transparent cursor-pointer","aria-label":"Clear input",children:jsx(XMarkIcon$1,{className:"w-5 h-5"})}):p;return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:V,className:t("font-black leading-none text-text mb-2 uppercase tracking-widest",ns[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch transition-all duration-150 overflow-hidden",os[s],as[l][s],f?"w-full":"w-fit","focus-within:ring-4 focus-within:ring-primary/20 focus-within:border-primary",C&&"opacity-50 cursor-not-allowed bg-surface-secondary",v),children:[u!==void 0&&jsx(wr,{side:"left",children:u}),jsxs("div",{className:"flex flex-1 items-center min-w-0",children:[O&&jsx("div",{className:"pl-3 shrink-0 flex items-center justify-center",children:m}),jsx("div",{className:"flex-1 min-w-0 h-full",children:jsx("input",{ref:F,...A,id:V,disabled:!!C||!!g,type:"email",multiple:R,autoCapitalize:h,autoComplete:w,spellCheck:L,value:D,onChange:H,"aria-invalid":l==="error"?true:void 0,"aria-describedby":P,"aria-required":n,className:t("w-full bg-transparent border-0 focus:outline-none focus:ring-0 outline-none h-full",rs[d],I),style:{paddingLeft:O?"0.5rem":void 0,paddingRight:N||T?"0.5rem":void 0}})}),N&&jsx("div",{className:"pr-3 shrink-0 flex items-center justify-center text-text-secondary",style:{width:"2.5rem"},children:K()})]}),b!==void 0&&jsx(wr,{side:"right",children:b})]}),o!==void 0&&jsx("p",{id:U,className:t("text-xs leading-tight text-text-muted",M),children:o}),S!==void 0&&jsx("p",{id:_,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1 ",ss[l],M),children:S})]})});yr.displayName="Email";var ls={default:"bg-surface text-text border border-border shadow-sm",outlined:"bg-surface text-text border border-border",elevated:"bg-surface text-text border-transparent shadow-md",filled:"bg-surface-secondary border-transparent text-text-secondary"},ds={none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},vr=forwardRef(function({className:e,variant:n="default",padding:o="none",...i},a){return jsx("div",{ref:a,className:t("rounded-lg flex flex-col transition-all duration-normal",ls[n],ds[o],e),...i})});vr.displayName="Card";var Cr=forwardRef(function({className:e,...n},o){return jsx("div",{ref:o,className:t("flex flex-col space-y-1 p-4",e),...n})});Cr.displayName="CardHeader";var Sr=forwardRef(function({className:e,children:n,...o},i){return jsx("h3",{ref:i,className:t("font-bold leading-none tracking-tight text-lg text-text",e),...o,children:n})});Sr.displayName="CardTitle";var Rr=forwardRef(function({className:e,...n},o){return jsx("p",{ref:o,className:t("text-sm text-text-secondary",e),...n})});Rr.displayName="CardDescription";var kr=forwardRef(function({className:e,...n},o){return jsx("div",{ref:o,className:t("p-4 pt-0",e),...n})});kr.displayName="CardContent";var Nr=forwardRef(function({className:e,...n},o){return jsx("div",{ref:o,className:t("flex items-center p-4 pt-0",e),...n})});Nr.displayName="CardFooter";var us={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl"},ms={primary:"text-primary hover:text-primary-hover active:text-primary-active",secondary:"text-text-secondary hover:text-text active:text-text",danger:"text-error hover:text-error/80 active:text-error/90",ghost:"text-text-muted hover:text-text active:text-text hover:bg-hover px-2 py-0.5 rounded-sm transition-all duration-normal"},fs={always:"underline underline-offset-4",hover:"hover:underline hover:underline-offset-4",none:"no-underline"},ps="opacity-50 cursor-not-allowed pointer-events-none",Pr=forwardRef(function({children:e,className:n,variant:o="primary",size:i="md",underline:a="hover",isExternal:c=false,disabled:s=false,leftIcon:d,rightIcon:l,href:f,rel:m,target:p,...u},b){let B=c?"_blank":p,v=c?t("noopener noreferrer",m):m,I=s?void 0:f;return jsxs("a",{ref:b,href:I,target:B,rel:v,"aria-disabled":s?"true":void 0,role:s&&!I?"link":void 0,tabIndex:s?-1:void 0,className:t("inline-flex items-center gap-1.5 transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-surface",us[i],ms[o],o==="ghost"?"no-underline":fs[a],s?ps:"",n),...u,children:[d&&jsx("span",{className:"inline-flex shrink-0",children:d}),jsx("span",{children:e}),l&&jsx("span",{className:"inline-flex shrink-0",children:l})]})});Pr.displayName="Link";var ys={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},vs={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},Cs={default:"rounded-md border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0",unstyled:"border-0 bg-transparent p-0 focus:outline-none focus:ring-0"},Ss={default:{default:"border-border focus:border-primary focus:ring-primary/40",filled:"focus:border-primary focus:ring-primary/40",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error focus:ring-error/20",filled:"bg-error/5 focus:border-error focus:ring-error/20",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success focus:ring-success/20",filled:"bg-success/5 focus:border-success focus:ring-success/20",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning focus:ring-warning/20",filled:"bg-warning/5 focus:border-warning focus:ring-warning/20",flushed:"border-warning focus:border-warning",unstyled:""}},Rs={default:"text-text-muted",error:"text-error",success:"text-success",warning:"text-warning"};function ks(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function Tr({children:r,side:e}){return jsx("span",{"aria-hidden":"true",className:t("inline-flex items-center border border-border bg-surface-secondary px-3 text-sm text-text-secondary select-none",e==="left"?"rounded-l-md border-r-0":"rounded-r-md border-l-0"),children:r})}var Ir=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,prefix:u,suffix:b,wrapperClassName:B,inputGroupClassName:v,inputClassName:I,labelClassName:k,helperClassName:M,id:E,disabled:C,className:x,isLoading:y,showPasswordToggle:g=true,value:R,onChange:h,onKeyUp:w,onKeyDown:L,...D},H){let A=useId(),F=E??A,$=`${F}-helper`,V=`${F}-state`,U=`${F}-capslock`,[_,X]=useState(false),[T,O]=useState(false),N=J=>{O(J.getModifierState("CapsLock")),w&&w(J);},S=J=>{O(J.getModifierState("CapsLock")),L&&L(J);},P=m!==void 0,z=p!==void 0||!!y||g,K=ks(l,i,a,c),Y=[o?$:null,K?V:null,T?U:null].filter(Boolean).join(" ")||void 0,Q=()=>y?jsxs("svg",{className:"animate-spin h-5 w-5 text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):g?jsx("button",{type:"button",tabIndex:-1,onClick:()=>{X(J=>!J);},className:"flex items-center justify-center rounded-full text-text-muted hover:text-text transition focus:outline-none w-6 h-6","aria-label":_?"Hide password":"Show password",children:_?jsx(EyeSlashIcon,{className:"w-5 h-5"}):jsx(EyeIcon,{className:"w-5 h-5"})}):p;return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",B,x),children:[e!==void 0&&jsxs("label",{htmlFor:F,className:t("font-black leading-none mb-2 text-text uppercase tracking-widest",vs[d],k),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{className:t("flex items-stretch transition-all duration-150 overflow-hidden",Cs[s],Ss[l][s],f?"w-full":"w-fit","focus-within:ring-4 focus-within:ring-primary/20 focus-within:border-primary",C&&"opacity-50 cursor-not-allowed bg-surface-secondary",v),children:[u!==void 0&&jsx(Tr,{side:"left",children:u}),jsxs("div",{className:"flex flex-1 items-center min-w-0",children:[P&&jsx("div",{className:"pl-3 flex-shrink-0 flex items-center justify-center",children:m}),jsx("div",{className:"flex-1 min-w-0 h-full",children:jsx("input",{ref:H,...D,id:F,disabled:!!C||!!y,type:_?"text":"password",value:R,onChange:h,onKeyUp:N,onKeyDown:S,"aria-invalid":l==="error"?true:void 0,"aria-describedby":Y,"aria-required":n,className:t("w-full bg-transparent border-0 focus:outline-none focus:ring-0 outline-none h-full",ys[d],I),style:{paddingLeft:P?"0.5rem":void 0,paddingRight:z?"0.5rem":void 0}})}),z&&jsx("div",{className:"pr-3 flex-shrink-0 flex items-center justify-center text-text-secondary",style:{width:"2.5rem"},children:Q()})]}),b!==void 0&&jsx(Tr,{side:"right",children:b})]}),o!==void 0&&jsx("p",{id:$,className:t("text-xs leading-tight text-text-muted",M),children:o}),T&&jsx("p",{id:U,className:"text-xs leading-tight text-warning font-black uppercase tracking-widest",children:"Caps Lock is on"}),K!==void 0&&jsx("p",{id:V,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1",Rs[l],M),children:K})]})});Ir.displayName="PasswordInput";var Is={xs:"h-8 px-3 text-xs tracking-tight",sm:"h-9 px-4 text-sm tracking-tight",md:"h-10 px-5 text-sm font-medium tracking-tight",lg:"h-11 px-6 text-base font-medium tracking-tight",xl:"h-12 px-8 text-lg font-medium tracking-tight"},Ls={default:"border-b border-border/60 bg-transparent gap-2",filled:"bg-surface-secondary/80 p-1.5 rounded-xl gap-1.5 border border-border/40 shadow-inner backdrop-blur-sm",flushed:"border-b border-border/60 bg-transparent gap-8",unstyled:"gap-4"},Ms={default:{default:"border border-transparent text-text-muted hover:text-text hover:bg-hover/5 rounded-t-lg mb-[-1px] transition-all duration-normal",selected:"border border-border border-b-surface text-primary rounded-t-lg mb-[-1px] bg-surface font-bold shadow-[0_-4px_12px_-4px_rgba(0,0,0,0.08)]"},filled:{default:"text-text-muted hover:text-text rounded-lg hover:bg-hover/30 transition-all duration-normal px-4",selected:"bg-surface text-primary shadow-md rounded-lg font-bold scale-[1.02] px-4"},flushed:{default:"border-b-2 border-transparent text-text-muted hover:text-text hover:border-border/40 mb-[-1px] transition-all duration-normal px-1",selected:"border-b-2 border-primary text-primary mb-[-1px] font-bold px-1 tracking-normal"},unstyled:{default:"text-text-muted hover:text-text transition-all duration-normal opacity-70 hover:opacity-100",selected:"text-primary font-bold"}},Mr=forwardRef(function({items:e,defaultSelectedId:n,selectedId:o,onChange:i,variant:a="default",size:c="md",fullWidth:s=false,className:d,tabListClassName:l,tabClassName:f,tabPanelClassName:m,...p},u){let[b,B]=useState(()=>o!==void 0?o:n!==void 0?n:e.length>0?e[0]?.id??"":""),v=useRef(null),[I,k]=useState(false),[M,E]=useState(false),C=o!==void 0,x=C?o:b,y=(w,L)=>{L||(C||B(w),i?.(w));},g=()=>{if(v.current){let{scrollLeft:w,scrollWidth:L,clientWidth:D}=v.current;k(w>5),E(w<L-D-5);}};useEffect(()=>{let w=v.current;if(!w)return;g(),w.addEventListener("scroll",g),window.addEventListener("resize",g);let L=setTimeout(g,100);return ()=>{w.removeEventListener("scroll",g),window.removeEventListener("resize",g),clearTimeout(L);}},[e,s]);let R=w=>{if(v.current){let L=v.current.clientWidth/2;v.current.scrollBy({left:w==="left"?-L:L,behavior:"smooth"});}};useEffect(()=>{if(v.current){let w=v.current.querySelector('[aria-selected="true"]');w&&w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"});}},[x]);let h=e.find(w=>w.id===x);return e.length===0?null:jsxs("div",{ref:u,className:t("w-full",d),...p,children:[jsxs("div",{className:"relative group/tabs flex items-center",children:[I&&jsxs("div",{className:"absolute left-0 z-20 flex h-full items-center pl-1 lg:hidden pointer-events-none",children:[jsx(Be,{icon:jsx(ChevronLeftIcon,{className:"w-4 h-4"}),"aria-label":"Scroll left",variant:"ghost",size:"xs",isRound:true,onClick:()=>{R("left");},className:"pointer-events-auto shadow-xl border border-border/20 bg-surface/98 backdrop-blur-xl hover:bg-primary hover:text-surface transition-all duration-300"}),jsx("div",{className:"w-12 h-full bg-gradient-to-r from-surface/80 to-transparent pointer-events-none -ml-6"})]}),jsx("div",{ref:v,className:t("flex-1 overflow-x-auto scrollbar-none scroll-smooth",a==="filled"?"py-1":"",s&&"w-full"),children:jsx("div",{role:"tablist",className:t("flex flex-nowrap",(s||a!=="filled")&&"min-w-full",a==="filled"&&"w-max mx-auto lg:mx-0",Ls[a],l),children:e.map(w=>{let L=w.id===x,D=w.disabled;return jsx("button",{type:"button",role:"tab","aria-selected":L,"aria-disabled":D,disabled:D,onClick:()=>{y(w.id,D);},className:t("flex items-center justify-center font-medium transition-all duration-normal outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-surface whitespace-nowrap shrink-0",Is[c],Ms[a][L?"selected":"default"],s&&"flex-1",D&&"opacity-50 cursor-not-allowed pointer-events-none",f),children:w.label},w.id)})})}),M&&jsxs("div",{className:"absolute right-0 z-20 flex h-full items-center pr-1 lg:hidden pointer-events-none",children:[jsx("div",{className:"w-8 h-full bg-gradient-to-l from-surface to-transparent pointer-events-none -mr-4"}),jsx(Be,{icon:jsx(ChevronRightIcon,{className:"w-4 h-4"}),"aria-label":"Scroll right",variant:"ghost",size:"xs",isRound:true,onClick:()=>{R("right");},className:"pointer-events-auto shadow-xl border border-border/20 bg-surface/98 backdrop-blur-xl hover:bg-primary hover:text-surface transition-all duration-300"})]})]}),jsx("div",{role:"tabpanel",className:t("pt-4",m),tabIndex:0,children:h?.content})]})});Mr.displayName="Tabs";var Hs={"2xs":"w-4 h-4 text-[10px]",xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-14 h-14 text-xl","2xl":"w-16 h-16 text-2xl","3xl":"w-20 h-20 text-3xl","4xl":"w-24 h-24 text-4xl"},zs={circle:"rounded-full",square:"rounded-none",rounded:"rounded-md"},Vs={default:"ring-0",error:"ring-2 ring-error ring-offset-2 ring-offset-surface",success:"ring-2 ring-success ring-offset-2 ring-offset-surface",warning:"ring-2 ring-warning ring-offset-2 ring-offset-surface",offline:"ring-2 ring-border ring-offset-2 ring-offset-surface",online:"ring-2 ring-success ring-offset-2 ring-offset-surface",busy:"ring-2 ring-error ring-offset-2 ring-offset-surface",away:"ring-2 ring-warning ring-offset-2 ring-offset-surface"},Fs={default:"hidden",error:"bg-error",success:"bg-success",warning:"bg-warning",offline:"bg-border",online:"bg-success",busy:"bg-error",away:"bg-warning"};function Br(r){let e=r.trim().split(/\s+/);if(e.length===0)return "";if(e.length===1)return e[0]?.substring(0,2).toUpperCase()??"";let n=e[0],o=e[e.length-1];return `${n?.[0]??""}${o?.[0]??""}`.toUpperCase()}var zt=forwardRef(function({size:e="md",variant:n="circle",state:o="default",stateType:i="border",fallback:a,alt:c,src:s,className:d,containerClassName:l,fallbackClassName:f,...m},p){let[u,b]=useState(false),B=typeof s!="string"||s.length===0||u,v="";typeof a=="string"?v=Br(a):typeof c=="string"&&c.length>0&&(v=Br(c));let I=typeof a=="string"||typeof a>"u"?jsx("span",{className:t("flex h-full w-full items-center justify-center font-bold text-text-muted",f),children:v||jsx(UserIcon,{className:"h-3/5 w-3/5 text-text-muted/40","aria-hidden":"true"})}):jsx("span",{className:t("flex h-full w-full items-center justify-center",f),children:a});return jsxs("div",{className:t("relative inline-block",l),children:[jsx("div",{ref:p,className:t("relative inline-flex shrink-0 items-center justify-center overflow-hidden bg-surface-secondary",Hs[e],zs[n],i==="border"?Vs[o]:"",d),children:B?I:jsx("img",{src:s,alt:c,onError:()=>{b(true);},className:"h-full w-full object-cover",...m})}),i==="badge"&&o!=="default"&&jsx("span",{className:t("absolute bottom-0 right-0 block rounded-full border-2 border-surface",Fs[o],e==="2xs"||e==="xs"?"h-2 w-2":e==="sm"?"h-2.5 w-2.5":e==="md"?"h-3 w-3":e==="lg"?"h-3.5 w-3.5":e==="xl"?"h-4 w-4":e==="2xl"?"h-4.5 w-4.5":e==="3xl"?"h-5 w-5":"h-6 w-6",n==="square"?"-translate-x-1/2 -translate-y-1/2":"")})]})});zt.displayName="Avatar";var Xs={sm:"p-4 text-sm",md:"p-8 text-sm",lg:"p-12 text-base"},Js={sm:"text-xs",md:"text-sm",lg:"text-sm"},Gs={default:"border-border hover:border-primary-hover bg-surface focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",error:"border-error bg-error/5 focus-within:ring-2 focus-within:ring-error/20",success:"border-success bg-success/5 focus-within:ring-2 focus-within:ring-success/20",warning:"border-warning bg-warning/5 focus-within:ring-2 focus-within:ring-warning/20"},Dr={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"},Ar=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,size:s="md",state:d="default",fullWidth:l=true,wrapperClassName:f,labelClassName:m,helperClassName:p,dropzoneClassName:u,icon:b,maxSize:B,maxFiles:v,onFilesSelected:I,accept:k,multiple:M,disabled:E,id:C,className:x,...y},g){let R=useId(),h=C??R,w=useRef(null),[L,D]=useState(false),H=N=>{N.preventDefault(),E||D(true);},A=()=>{D(false);},F=N=>{if(N.preventDefault(),D(false),E)return;let S=Array.from(N.dataTransfer.files);V(S);},$=N=>{N.target.files&&V(Array.from(N.target.files));},V=N=>{let S=N;v&&N.length>v&&(S=N.slice(0,v)),B&&(S=S.filter(P=>P.size<=B)),I&&I(S);},U=()=>{w.current&&w.current.click();},_=`${h}-helper`,X=`${h}-state`,T=d==="error"?i:d==="success"?a:d==="warning"?c:void 0,O=N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),U());};return jsxs("div",{className:t("flex flex-col gap-1.5",l?"w-full":"w-fit",f,x),children:[e&&jsxs("label",{htmlFor:h,className:t("font-black leading-none text-text uppercase tracking-widest",Js[s],m),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{onDragOver:H,onDragLeave:A,onDrop:F,onClick:U,onKeyDown:O,role:"button",tabIndex:E?-1:0,"aria-disabled":E,className:t("relative flex flex-col items-center justify-center border-2 border-dashed rounded-lg transition-all cursor-pointer group",Xs[s],Gs[d],L&&"border-primary bg-primary/5 scale-[1.01] shadow-md",E&&"opacity-50 cursor-not-allowed bg-surface-secondary border-border",u),children:[jsx("input",{...y,ref:N=>{w.current=N,typeof g=="function"?g(N):g&&(g.current=N);},id:h,type:"file",accept:k,multiple:M,disabled:E,onChange:$,className:"sr-only"}),jsxs("div",{className:"flex flex-col items-center gap-2 text-center pointer-events-none",children:[b??jsx(CloudArrowUpIcon,{className:t("w-10 h-10 mb-2 transition-all duration-normal group-hover:scale-110",d==="default"?"text-text-muted":Dr[d])}),jsx("span",{className:"font-bold text-text transition-colors group-hover:text-primary",children:"Click to upload or drag and drop"}),jsxs("span",{className:"text-xs text-text-muted font-medium",children:[k?`Available formats: ${k}`:"Any file type",B&&` (Max ${String(Math.round(B/1024/1024))}MB)`]})]})]}),o&&jsx("p",{id:_,className:t("text-xs text-text-muted font-medium mt-1",p),children:o}),T&&jsx("p",{id:X,role:d==="error"?"alert":void 0,className:t("text-xs font-bold mt-1",Dr[d],p),children:T})]})});Ar.displayName="FileUpload";var Qs={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full m-0 rounded-none h-full"};function ei({isOpen:r,onClose:e,children:n,size:o="md",isCentered:i=false,closeOnOverlayClick:a=true,closeOnEsc:c=true,trapFocus:s=true,lockScroll:d=true,contentClassName:l,overlayClassName:f,showBackdrop:m=true,isModal:p=true,ariaLabel:u,ariaLabelledby:b,ariaDescribedby:B}){let v=useRef(null),I=useRef(null),k=useCallback(()=>{e();},[e]);return useEffect(()=>{if(r){I.current=document.activeElement,p&&d&&(document.body.style.overflow="hidden");let M=E=>{if(c&&E.key==="Escape"){k();return}if(p&&s&&E.key==="Tab"){let C=v.current?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!C||C.length===0)return;let x=C[0],y=C[C.length-1];E.shiftKey?document.activeElement===x&&(y.focus(),E.preventDefault()):document.activeElement===y&&(x.focus(),E.preventDefault());}};return document.addEventListener("keydown",M),p&&setTimeout(()=>{let E=v.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');E!=null?E.focus():v.current?.focus();},0),()=>{document.removeEventListener("keydown",M),p&&d&&(document.body.style.overflow=""),I.current?.focus();}}},[r,c,k,d,s,p]),r?createPortal(jsx("div",{role:"presentation",className:t("fixed inset-0 z-50 flex items-start justify-center p-4 sm:p-6 overflow-y-auto transition-opacity duration-300",m&&"bg-black/60 backdrop-blur-sm",!p&&"pointer-events-none",i&&"items-center",f),onClick:M=>{a&&M.target===M.currentTarget&&k();},children:jsx("div",{ref:v,role:"dialog",tabIndex:-1,"aria-modal":p?"true":"false","aria-label":u,"aria-labelledby":b,"aria-describedby":B,className:t("relative w-full mx-auto bg-surface rounded-xl shadow-lg border border-border transition-all duration-300 transform scale-100 opacity-100 flex flex-col",o!=="full"&&"max-h-[90vh]",!p&&"pointer-events-auto",Qs[o],l),children:n})}),document.body):null}function ti({children:r,className:e}){return jsx("div",{className:t("px-6 py-5 border-b border-border/60",e),children:jsx("h2",{className:"text-xl font-bold text-text uppercase tracking-wider",children:r})})}function ri({children:r,className:e}){return jsx("div",{className:t("px-6 py-6 overflow-y-auto flex-1 text-text-secondary leading-relaxed font-medium",e),children:r})}function ni({children:r,className:e}){return jsx("div",{className:t("px-6 py-4 bg-surface-secondary border-t border-border flex items-center justify-end gap-3 rounded-b-xl",e),children:r})}function oi({onClick:r,className:e}){return jsx("button",{type:"button",onClick:r,className:t("absolute top-4 right-4 p-2 text-text-muted hover:text-text hover:bg-hover rounded-lg transition-all duration-fast",e),"aria-label":"Close dialog",children:jsx(XMarkIcon,{className:"w-5 h-5"})})}var di={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl",full:"max-w-full w-full h-full m-0 rounded-none"},ci={xs:"w-64",sm:"w-80",md:"w-96",lg:"w-[30rem]",xl:"w-[36rem]","2xl":"w-[42rem]","3xl":"w-[48rem]","4xl":"w-[56rem]","5xl":"w-[64rem]","6xl":"w-[72rem]","7xl":"w-[80rem]",full:"w-full"},ui={default:"bg-surface border border-border shadow-[0_20px_60px_-10px_rgba(0,0,0,0.2),0_8px_20px_-8px_rgba(0,0,0,0.1)]",glass:"bg-white/10 dark:bg-black/20 backdrop-blur-xl border border-white/20 dark:border-white/10 shadow-[0_25px_50px_-12px_rgba(0,0,0,0.4)]",flat:"bg-surface shadow-[0_4px_24px_rgba(0,0,0,0.08)]"},mi={top:"items-start pt-16",center:"items-center",bottom:"items-end pb-0",left:"items-stretch justify-start p-0",right:"items-stretch justify-end p-0"},fi={top:"",center:"",bottom:"rounded-b-none w-full max-w-full",left:"rounded-l-none rounded-r-2xl h-full max-h-full my-0",right:"rounded-r-none rounded-l-2xl h-full max-h-full my-0"},ot=function({isOpen:e,onClose:n,children:o,size:i="md",variant:a="default",position:c="center",closeOnOverlayClick:s=true,closeOnEsc:d=true,trapFocus:l=true,lockScroll:f=true,contentClassName:m,overlayClassName:p,showBackdrop:u=true,ariaLabel:b,ariaLabelledby:B,ariaDescribedby:v}){let I=useRef(null),k=useRef(null),M=useCallback(()=>{n();},[n]);if(useEffect(()=>{if(e){k.current=document.activeElement,f&&(document.body.style.overflow="hidden");let h=w=>{if(d&&w.key==="Escape"){M();return}if(l&&w.key==="Tab"){let L=I.current?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!L||L.length===0)return;let D=L[0],H=L[L.length-1];w.shiftKey?document.activeElement===D&&(H.focus(),w.preventDefault()):document.activeElement===H&&(D.focus(),w.preventDefault());}};return document.addEventListener("keydown",h),setTimeout(()=>{let w=I.current?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');w!=null?w.focus():I.current?.focus();},50),()=>{document.removeEventListener("keydown",h),f&&(document.body.style.overflow=""),k.current?.focus();}}},[e,d,M,f,l]),!e)return null;let E=c==="bottom",C=c==="left",x=c==="right",y=C||x,g="animate-[modal-zoom-in_200ms_cubic-bezier(0.34,1.56,0.64,1)_forwards]";E&&(g="animate-[modal-slide-up_250ms_cubic-bezier(0.32,0.72,0,1)_forwards]"),C&&(g="animate-[modal-slide-right_250ms_cubic-bezier(0.32,0.72,0,1)_forwards]"),x&&(g="animate-[modal-slide-left_250ms_cubic-bezier(0.32,0.72,0,1)_forwards]");let R=y?ci[i]:di[i];return createPortal(jsx("div",{role:"presentation",className:t("fixed inset-0 z-[1050] flex justify-center",!y&&"overflow-y-auto p-4",u&&"bg-black/50 backdrop-blur-[3px]","animate-[modal-overlay-in_200ms_ease-out_forwards]",mi[c],p),onClick:h=>{s&&h.target===h.currentTarget&&M();},children:jsx("div",{ref:I,role:"dialog",tabIndex:-1,"aria-modal":"true","aria-label":b,"aria-labelledby":B,"aria-describedby":v,className:t("relative flex flex-col",!y&&!E&&i!=="full"&&"w-full mx-auto max-h-[90vh] my-4 rounded-2xl",E&&"rounded-2xl",y&&"mx-0",g,ui[a],R,fi[c],m),children:o})}),document.body)};function Vr({children:r,className:e,icon:n,description:o}){return jsxs("div",{className:t("relative px-6 py-5 border-b border-border/60 flex-shrink-0",e),children:[n&&jsx("div",{className:"mb-3 w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:n}),jsx("h2",{className:"text-lg font-semibold text-text leading-tight tracking-tight",children:r}),o&&jsx("p",{className:"mt-1 text-sm text-text-muted leading-relaxed",children:o})]})}function Fr({children:r,className:e,noPadding:n=false}){return jsx("div",{className:t("flex-1 overflow-y-auto text-text-secondary text-sm leading-relaxed",!n&&"px-6 py-5",e),children:r})}var pi={left:"justify-start",center:"justify-center",right:"justify-end"};function _r({children:r,className:e,align:n="right"}){return jsx("div",{className:t("flex-shrink-0 px-6 py-4 border-t border-border/60 bg-surface-secondary/30 flex flex-wrap items-center gap-3 rounded-b-2xl",pi[n],e),children:r})}function Or({onClick:r,className:e}){return jsx("button",{type:"button",onClick:r,className:t("absolute top-4 right-4 z-10","w-8 h-8 flex items-center justify-center rounded-lg","text-text-muted hover:text-text","bg-transparent hover:bg-hover","transition-all duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",e),"aria-label":"Close modal",children:jsx(XMarkIcon,{className:"w-4 h-4",strokeWidth:2})})}ot.Header=Vr;ot.Body=Fr;ot.Footer=_r;ot.CloseButton=Or;var Ci={xs:"h-6 px-2 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-3 text-sm",lg:"h-11 px-4 text-base",xl:"h-12 px-4 text-lg"},Si={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},Kr={xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2.5 text-base",xl:"px-4 py-3 text-lg"},Ri={default:"border-border focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/40",error:"border-error focus-within:ring-2 focus-within:ring-error/20",success:"border-success focus-within:ring-2 focus-within:ring-success/20",warning:"border-warning focus-within:ring-2 focus-within:ring-warning/20"},ki={default:"text-text-muted",error:"text-error font-medium",success:"text-success font-medium",warning:"text-warning font-medium"};function Ni(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}var Ur=forwardRef(function({options:e,value:n,onChange:o,multiple:i=false,searchable:a=true,clearable:c=false,label:s,required:d=false,helperText:l,errorMessage:f,successMessage:m,warningMessage:p,state:u="default",size:b="md",fullWidth:B=true,placeholder:v="Select\u2026",noOptionsMessage:I="No options",wrapperClassName:k,inputClassName:M,listClassName:E,labelClassName:C,helperClassName:x,disabled:y,id:g,className:R,...h},w){let L=useId(),D=g??L,H=`${D}-listbox`,A=`${D}-helper`,F=`${D}-state`,[$,V]=useState(false),[U,_]=useState(""),[X,T]=useState(-1),O=useRef(null),N=useRef(null),S=useMemo(()=>n==null?[]:Array.isArray(n)?n:[n],[n]),P=$&&a?U:S.map(j=>e.find(W=>W.value===j)?.label??j).join(", "),z=$&&a&&U.length>0?e.filter(j=>j.label.toLowerCase().includes(U.toLowerCase())):e;useEffect(()=>{let j=W=>{O.current&&!O.current.contains(W.target)&&(V(false),_(""));};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j);}},[]);let K=useCallback(()=>{y||(V(true),_(""),T(-1));},[y]),Y=useCallback(()=>{V(false),_(""),T(-1);},[]),Q=useCallback(j=>{if(!j.disabled)if(i){let W=S.includes(j.value)?S.filter(ve=>ve!==j.value):[...S,j.value];o?.(W);}else o?.(j.value),Y();},[i,S,o,Y]),J=useCallback(()=>{o?.(i?[]:""),_(""),N.current?.focus();},[i,o]),ee=j=>{_(j.target.value),T(-1),$||V(true);},xe=j=>{if(!y)switch(j.key){case "ArrowDown":j.preventDefault(),$?T(W=>W<z.length-1?W+1:W):K();break;case "ArrowUp":j.preventDefault(),T(W=>W>0?W-1:0);break;case "Enter":if(j.preventDefault(),!$)K();else if(X>=0&&X<z.length){let W=z[X];W!=null&&Q(W);}break;case "Escape":j.preventDefault(),Y();break;case "Tab":Y();break;}},ye=Ni(u,f,m,p),yt=[l?A:null,ye?F:null].filter(Boolean).join(" ")||void 0,vt=c&&S.length>0&&!y,Le=j=>S.includes(j);return jsxs("div",{className:t("flex flex-col gap-1",B?"w-full":"w-fit",$&&"z-[60]",k,R),children:[s!=null&&jsxs("label",{htmlFor:D,className:t("font-black leading-none text-text uppercase tracking-widest",Si[b],C),children:[s,d&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsxs("div",{ref:O,className:"relative",onKeyDown:xe,children:[jsxs("div",{className:t("flex items-center w-full rounded-md border bg-surface shadow-sm transition-all duration-normal",Ci[b],Ri[u],y&&"cursor-not-allowed opacity-50 bg-surface-secondary"),children:[jsx("input",{...h,ref:j=>{N.current=j,typeof w=="function"?w(j):w!=null&&(w.current=j);},id:D,role:"combobox",type:"text",autoComplete:"off","aria-expanded":$,"aria-haspopup":"listbox","aria-controls":H,"aria-autocomplete":a?"list":"none","aria-activedescendant":X>=0?`${H}-opt-${String(X)}`:void 0,"aria-invalid":u==="error"?true:void 0,"aria-required":d,"aria-describedby":yt,disabled:y,readOnly:!a,placeholder:S.length===0?v:void 0,value:P,onChange:a?ee:void 0,onFocus:K,onClick:K,className:t("flex-1 min-w-0 bg-transparent outline-none placeholder:text-text-muted transition-all duration-normal",!a&&"cursor-pointer select-none",M)}),jsxs("div",{className:"flex items-center gap-0.5 ml-1 shrink-0",children:[vt&&jsx("button",{type:"button","aria-label":"Clear selection",onMouseDown:j=>{j.preventDefault();},onClick:J,className:"flex items-center justify-center rounded-full text-text-muted hover:text-text hover:bg-hover p-0.5 transition-all duration-fast",children:jsx(XMarkIcon$1,{className:"w-3.5 h-3.5"})}),jsx("span",{"aria-hidden":"true",className:t("text-text-muted transition-transform duration-200",$&&"rotate-180"),children:jsx(ChevronDownIcon,{className:"w-4 h-4"})})]})]}),$&&jsx("ul",{id:H,role:"listbox","aria-multiselectable":i,"aria-label":s??"Options",className:t("absolute z-dropdown mt-1 w-full bg-surface border border-border rounded-lg shadow-lg overflow-y-auto max-h-60 py-1.5 animate-in fade-in zoom-in-95 duration-normal",E),children:z.length===0?jsx("li",{className:t("text-text-muted italic select-none font-medium",Kr[b]),children:I}):z.map((j,W)=>{let ve=Le(j.value),Ae=W===X;return jsxs("li",{id:`${H}-opt-${String(W)}`,role:"option","aria-selected":ve,"aria-disabled":j.disabled,onMouseDown:Me=>{Me.preventDefault();},onClick:()=>{Q(j);},onKeyDown:Me=>{(Me.key==="Enter"||Me.key===" ")&&(Me.preventDefault(),Q(j));},onMouseEnter:()=>{T(W);},className:t("flex items-center gap-2 cursor-pointer select-none transition-all duration-fast font-medium",Kr[b],Ae&&!j.disabled&&"bg-hover",ve&&"text-primary font-bold",j.disabled&&"cursor-not-allowed opacity-40"),children:[i&&jsx("span",{className:t("shrink-0 w-4 h-4 rounded-sm border flex items-center justify-center transition-all duration-normal",ve?"bg-primary border-primary":"border-border"),"aria-hidden":"true",children:ve&&jsx(CheckIcon$1,{className:"w-2.5 h-2.5 text-text-inverse"})}),!i&&jsx("span",{className:"w-4 shrink-0","aria-hidden":"true",children:ve&&jsx(CheckIcon$1,{className:"w-4 h-4 text-primary"})}),j.label]},j.value)})})]}),l!=null&&jsx("p",{id:A,className:t("text-xs leading-tight text-text-muted font-medium",x),children:l}),ye!=null&&jsx("p",{id:F,role:u==="error"?"alert":void 0,className:t("text-xs leading-tight font-medium",ki[u],x),children:ye})]})});Ur.displayName="ComboBox";var Li=[10,20,50];function Ft({total:r,page:e,pageSize:n,totalPages:o,hasNextPage:i,hasPrevPage:a,onPageChange:c,onPageSizeChange:s,pageSizeOptions:d=Li,showSizeChanger:l,className:f}){let m=o??Math.max(1,Math.ceil(r/n)),p=a??e>1,u=i??e<m,b=Mi(e,m),B=Math.min((e-1)*n+1,r),v=Math.min(e*n,r),I=l??s!=null;return jsxs("div",{className:t("flex flex-col sm:flex-row items-center justify-between gap-3 py-3 px-4 border-t border-border bg-surface-secondary/50 rounded-b-xl text-sm",f),children:[jsx("p",{className:"text-text-secondary shrink-0",children:r===0?"No items":`${String(B)}\u2013${String(v)} of ${String(r)} items`}),jsxs("div",{className:"flex items-center gap-2 flex-wrap justify-center",children:[I&&s!=null&&jsxs("div",{className:"flex items-center gap-1.5",children:[jsx("span",{className:"text-text-muted",children:"Rows:"}),jsx("select",{value:n,"aria-label":"Rows per page",onChange:k=>{s(Number(k.target.value));},className:"border border-border rounded-sm py-1 pl-2 pr-6 text-sm text-text bg-surface focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary cursor-pointer transition-all duration-normal",children:d.map(k=>jsx("option",{value:k,children:k},k))})]}),jsxs("nav",{"aria-label":"Pagination",className:"flex items-center gap-1",children:[jsx(at,{onClick:()=>{c(1);},disabled:!p,"aria-label":"First page",children:jsx(ChevronDoubleLeftIcon,{className:"w-3.5 h-3.5"})}),jsx(at,{onClick:()=>{c(e-1);},disabled:!p,"aria-label":"Previous page",children:jsx(ChevronLeftIcon,{className:"w-3.5 h-3.5"})}),b.map((k,M)=>k==="\u2026"?jsx("span",{className:"w-8 text-center text-text-muted/60 select-none","aria-hidden":"true",children:"\u2026"},`ellipsis-${String(M)}`):jsx(at,{onClick:()=>{c(k);},active:k===e,"aria-label":`Page ${String(k)}`,"aria-current":k===e?"page":void 0,children:k},k)),jsx(at,{onClick:()=>{c(e+1);},disabled:!u,"aria-label":"Next page",children:jsx(ChevronRightIcon,{className:"w-3.5 h-3.5"})}),jsx(at,{onClick:()=>{c(m);},disabled:!u,"aria-label":"Last page",children:jsx(ChevronDoubleRightIcon,{className:"w-3.5 h-3.5"})})]})]})]})}function at({children:r,active:e=false,disabled:n=false,className:o,...i}){return jsx("button",{type:"button",disabled:n,className:t("min-w-[32px] h-8 px-2 rounded-sm font-medium transition-all duration-normal text-sm flex items-center justify-center",e?"bg-primary text-text-inverse shadow-sm":"text-text-secondary hover:bg-hover active:bg-active",n&&"opacity-40 cursor-not-allowed pointer-events-none",o),...i,children:r})}function Mi(r,e){if(e<=7)return Array.from({length:e},(a,c)=>c+1);let n=[1];r>3&&n.push("\u2026");let o=Math.max(2,r-1),i=Math.min(e-1,r+1);for(let a=o;a<=i;a++)n.push(a);return r<e-2&&n.push("\u2026"),n.push(e),n}var Xr={sm:"px-3 py-1.5 text-xs",md:"px-4 py-3 text-sm",lg:"px-5 py-4 text-base"},Vi={sm:"px-3 py-2 text-xs",md:"px-4 py-3 text-sm",lg:"px-5 py-4 text-base"};function Fi({direction:r}){return jsxs("span",{"aria-hidden":"true",className:"inline-flex flex-col ml-1 -space-y-1.5",children:[jsx(ChevronUpIcon,{className:t("w-3.5 h-3.5 transition-all duration-normal",r==="asc"?"text-primary":"text-text-muted/30")}),jsx(ChevronDownIcon,{className:t("w-3.5 h-3.5 transition-all duration-normal",r==="desc"?"text-primary":"text-text-muted/30")})]})}function _i({cols:r,size:e}){return jsx(Fragment,{children:Array.from({length:5}).map((n,o)=>jsx("tr",{children:Array.from({length:r}).map((i,a)=>jsx("td",{className:Xr[e],children:jsx("div",{className:"h-4 bg-surface-secondary rounded-sm animate-pulse",style:{width:`${String(Math.floor(60+Math.random()*30))}%`}})},a))},o))})}function Oi({data:r,columns:e,rowKey:n,loading:o=false,emptyMessage:i="No data",striped:a=false,bordered:c=false,hoverable:s=true,stickyHeader:d=false,size:l="md",sortState:f,onSortChange:m,className:p,tableClassName:u,pagination:b,headerVariant:B="light"}){let[v,I]=useState(null),k=f??v,M=useCallback(x=>{if(!x.sortable)return;let y={key:x.key,direction:k?.key===x.key&&k.direction==="asc"?"desc":"asc"};m?m(y):I(y);},[k,m]),E=useMemo(()=>!k||m?r:[...r].sort((x,y)=>{let g=x[k.key],R=y[k.key],h=typeof g=="string"&&typeof R=="string"?g.localeCompare(R):String(g).localeCompare(String(R));return k.direction==="asc"?h:-h}),[r,k,m]),C=!o&&E.length===0;return jsxs("div",{className:t("w-full overflow-hidden rounded-xl border border-border bg-surface shadow-sm transition-colors duration-normal",c&&"border",p),children:[jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:t("w-full border-collapse",u),children:[jsx("thead",{className:t(d&&"sticky top-0 z-dropdown"),children:jsx("tr",{className:t("border-b border-border transition-colors duration-normal",B==="light"?"bg-surface-secondary":"bg-black"),children:e.map(x=>{let y=k?.key===x.key,g=y?k.direction:null;return jsx("th",{scope:"col",style:{width:x.width},"aria-sort":y?g==="asc"?"ascending":"descending":x.sortable?"none":void 0,className:t(Vi[l],"font-black tracking-widest uppercase whitespace-nowrap select-none transition-all duration-normal",B==="light"?"text-text-secondary":"text-white",x.align==="center"&&"text-center",x.align==="right"&&"text-right",x.sortable&&"cursor-pointer hover:bg-hover",B==="dark"&&x.sortable&&"hover:bg-white/10",c&&"border border-border",x.headerClassName),onClick:x.sortable?()=>{M(x);}:void 0,onKeyDown:x.sortable?R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),M(x));}:void 0,tabIndex:x.sortable?0:void 0,children:jsxs("span",{className:t("flex items-center gap-1",x.align==="center"&&"justify-center",x.align==="right"&&"justify-end"),children:[x.header,x.sortable&&jsx(Fi,{direction:g})]})},x.key)})})}),jsx("tbody",{children:o?jsx(_i,{cols:e.length,size:l}):C?jsx("tr",{children:jsx("td",{colSpan:e.length,className:"py-16 text-center text-text-muted text-sm font-medium",children:i})}):E.map((x,y)=>jsx("tr",{className:t("border-b border-border-light last:border-0 transition-colors duration-fast",a&&y%2!==0&&"bg-surface-secondary/40",s&&"hover:bg-hover/60"),children:e.map(g=>jsx("td",{className:t(Xr[l],"text-text font-medium",g.align==="center"&&"text-center",g.align==="right"&&"text-right",c&&"border border-border",g.cellClassName),children:g.render?g.render(x,y):(()=>{let R=x[g.key];return R==null?"":typeof R=="object"?JSON.stringify(R):String(R)})()},g.key))},n(x)))})]})}),b&&jsx(Ft,{...b})]})}var _t={xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg"},Jr={slash:jsx("span",{"aria-hidden":"true",className:"select-none text-text-muted/60",children:"/"}),chevron:jsx(ChevronRightIcon$1,{"aria-hidden":"true",className:"w-4 h-4 text-text-muted/60 shrink-0"}),dot:jsx("span",{"aria-hidden":"true",className:"select-none text-text-muted/60",children:"\xB7"})};function Ui(r){return typeof r=="string"&&r in Jr?Jr[r]:r}function Gr({item:r,isCurrent:e,size:n}){let o=t("inline-flex items-center gap-1 transition-colors leading-none",_t[n],e?"font-bold text-text cursor-default":r.disabled?"text-text-muted cursor-not-allowed":"text-primary hover:text-primary-hover hover:underline underline-offset-4 cursor-pointer");return e?jsx("span",{className:o,"aria-current":"page",children:r.label}):r.disabled?jsx("span",{className:o,children:r.label}):r.onClick!=null?jsx("button",{type:"button",onClick:r.onClick,className:o,children:r.label}):r.href!=null?jsx("a",{href:r.href,className:o,children:r.label}):jsx("span",{className:o,children:r.label})}function Xi({items:r,separator:e="chevron",size:n="sm",collapsible:o=false,maxItems:i=4,className:a}){let[c,s]=useState(false);if(r.length===0)return null;let d=Ui(e),l,f=false;if(o&&!c&&r.length>i){let p=Math.max(1,i-1);l=r.slice(0,p),f=true;}else l=r;let m=[];if(l.forEach((p,u)=>{let b=!f&&u===r.length-1;u>0&&m.push(jsx("li",{role:"presentation",className:"flex items-center",children:d},`sep-${String(u)}`)),m.push(jsx("li",{className:"flex items-center",children:jsx(Gr,{item:p,isCurrent:b,size:n})},`item-${String(u)}`));}),f){m.push(jsx("li",{role:"presentation",className:"flex items-center",children:d},"sep-ellipsis")),m.push(jsx("li",{className:"flex items-center",children:jsx("button",{type:"button","aria-label":"Show full path",onClick:()=>{s(true);},className:t("text-text-muted hover:text-text-secondary transition-colors leading-none px-1",_t[n]),children:"\xB7\xB7\xB7"})},"ellipsis"));let p=r[r.length-1];p!=null&&(m.push(jsx("li",{role:"presentation",className:"flex items-center",children:d},"sep-last")),m.push(jsx("li",{className:"flex items-center",children:jsx(Gr,{item:p,isCurrent:true,size:n})},"item-last")));}return jsx("nav",{"aria-label":"Breadcrumb",className:t("w-full",a),children:jsx("ol",{className:t("flex flex-wrap items-center gap-1",_t[n]),children:m})})}var qr={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-9 h-9",xl:"w-12 h-12"},Ji={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},Gi={xs:"h-0.5 w-16",sm:"h-1 w-24",md:"h-1.5 w-32",lg:"h-2 w-48",xl:"h-2.5 w-64"},qi={xs:"w-5 h-5",sm:"w-7 h-7",md:"w-10 h-10",lg:"w-14 h-14",xl:"w-20 h-20"},Wr={primary:"text-primary",secondary:"text-secondary",success:"text-success",error:"text-error",warning:"text-warning",white:"text-text-inverse",current:"text-current"},$t={primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",white:"bg-text-inverse",current:"bg-current"};function Wi({size:r,color:e}){return jsxs("div",{className:t("relative flex items-center justify-center",qr[r]),children:[jsx("div",{className:t("absolute inset-0 rounded-full border-2 border-current opacity-20 animate-ping",Wr[e])}),jsxs("svg",{className:t("animate-spin relative z-10",qr[r],Wr[e]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),jsx("path",{className:"opacity-90",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})]})}function Zi({size:r,color:e}){return jsx("div",{className:"flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(n=>jsx("span",{style:{animationDelay:`${String(n*160)}ms`},className:t("rounded-full animate-bounce",Ji[r],$t[e])},n))})}function Yi({size:r,color:e}){return jsx("span",{"aria-hidden":"true",className:t("rounded-full animate-ping",qi[r],$t[e],"opacity-75")})}function Qi({size:r,color:e}){return jsx("div",{"aria-hidden":"true",className:t("rounded-full overflow-hidden bg-divider",Gi[r]),children:jsx("div",{className:t("h-full rounded-full animate-[bar-slide_1.4s_ease-in-out_infinite]",$t[e]),style:{width:"40%",animation:"bar-slide 1.4s ease-in-out infinite"}})})}var el={spinner:Wi,dots:Zi,pulse:Yi,bar:Qi};function tl({variant:r="spinner",size:e="md",color:n="primary",label:o="Loading\u2026",fullscreen:i=false,className:a}){let c=el[r],s=jsxs("div",{role:"status","aria-label":o,className:t("inline-flex flex-col items-center justify-center gap-2",!i&&a),children:[jsx(c,{size:e,color:n}),jsx("span",{className:"sr-only",children:o})]});return i?jsx("div",{className:t("fixed inset-0 z-50 flex items-center justify-center bg-surface/80 backdrop-blur-md",a),children:s}):s}var rl={default:"animate-pulse bg-skeleton",wave:"skeleton-wave bg-skeleton",pulse:"animate-pulse bg-skeleton-shine"},nl={rectangle:"rounded-sm",circle:"rounded-full",rounded:"rounded-md"},ge=forwardRef(function({className:e,variant:n="wave",shape:o="rectangle",width:i,height:a,style:c,...s},d){return jsx("div",{ref:d,role:"status","aria-busy":"true","aria-label":"Loading",style:{width:i!==void 0?typeof i=="number"?`${String(i)}px`:i:void 0,height:a!==void 0?typeof a=="number"?`${String(a)}px`:a:void 0,...c},className:t("overflow-hidden",rl[n],nl[o],e),...s})});ge.displayName="Skeleton";var jt=forwardRef(function({lines:e=3,variant:n="wave",shortLast:o=true,className:i,...a},c){return jsx("div",{ref:c,className:t("flex flex-col gap-2",i),role:"status","aria-busy":"true","aria-label":"Loading",...a,children:Array.from({length:e}).map((s,d)=>{let l=d===e-1;return jsx(ge,{variant:n,height:14,className:t(l&&o?"w-3/5":"w-full")},d)})})});jt.displayName="SkeletonText";var Zr=forwardRef(function({size:e=40,variant:n="wave",className:o,...i},a){return jsx(ge,{ref:a,variant:n,shape:"circle",width:e,height:e,className:t("shrink-0",o),...i})});Zr.displayName="SkeletonAvatar";var Yr=forwardRef(function({showImage:e=true,imageHeight:n=160,lines:o=3,variant:i="wave",className:a,...c},s){return jsxs("div",{ref:s,className:t("rounded-lg border border-border bg-surface overflow-hidden flex flex-col",a),role:"status","aria-busy":"true","aria-label":"Loading",...c,children:[e&&jsx(ge,{variant:i,shape:"rectangle",height:n,className:"w-full rounded-none"}),jsxs("div",{className:"flex flex-col gap-2 p-4",children:[jsx(ge,{variant:i,height:20,className:"w-2/3"}),jsx(jt,{lines:o,variant:i,className:"mt-1"}),jsxs("div",{className:"flex items-center gap-2 mt-2",children:[jsx(ge,{variant:i,width:80,height:32,shape:"rounded"}),jsx(ge,{variant:i,width:80,height:32,shape:"rounded"})]})]})]})});Yr.displayName="SkeletonCard";var Qr=forwardRef(function({rows:e=5,columns:n=4,variant:o="wave",showHeader:i=true,className:a,...c},s){return jsxs("div",{ref:s,className:t("w-full rounded-lg border border-border overflow-hidden bg-surface",a),role:"status","aria-busy":"true","aria-label":"Loading",...c,children:[i&&jsx("div",{className:"flex items-center gap-4 border-b border-border px-4 py-2 bg-surface-secondary",children:Array.from({length:n}).map((d,l)=>jsx(ge,{variant:o,height:14,className:t(l===0?"w-1/4":l===n-1?"w-16":"flex-1")},l))}),Array.from({length:e}).map((d,l)=>jsx("div",{className:t("flex items-center gap-4 px-4 py-2",l<e-1&&"border-b border-border"),children:Array.from({length:n}).map((f,m)=>jsx(ge,{variant:o,height:14,className:t(m===0?"w-1/4":m===n-1?"w-16":"flex-1")},m))},l))]})});Qr.displayName="SkeletonTable";var al={primary:"bg-primary text-text-inverse shadow-sm shadow-primary/30",secondary:"bg-secondary text-text shadow-sm shadow-secondary/30",success:"bg-success text-text-inverse shadow-sm shadow-success/30",error:"bg-error text-text-inverse shadow-sm shadow-error/30",warning:"bg-warning text-text-inverse shadow-sm shadow-warning/30",info:"bg-info text-text-inverse shadow-sm shadow-info/30",accent:"bg-accent text-text-inverse shadow-sm shadow-accent/30",gray:"bg-surface-secondary text-text-secondary shadow-sm",blue:"bg-primary text-text-inverse shadow-sm shadow-primary/30",green:"bg-success text-text-inverse shadow-sm shadow-success/30",red:"bg-error text-text-inverse shadow-sm shadow-error/30",yellow:"bg-warning text-text-inverse shadow-sm shadow-warning/30",purple:"bg-purple-600 text-white shadow-sm shadow-purple-500/30",pink:"bg-pink-500 text-white shadow-sm shadow-pink-500/30",orange:"bg-orange-500 text-white shadow-sm shadow-orange-500/30",cyan:"bg-cyan-500 text-white shadow-sm shadow-cyan-500/30",teal:"bg-teal-500 text-white shadow-sm shadow-teal-500/30",indigo:"bg-indigo-500 text-white shadow-sm shadow-indigo-500/30"},rn={primary:"bg-primary/10 text-primary ring-1 ring-inset ring-primary/20",secondary:"bg-secondary/10 text-secondary ring-1 ring-inset ring-secondary/20",success:"bg-success/10 text-success ring-1 ring-inset ring-success/20",error:"bg-error/10 text-error ring-1 ring-inset ring-error/20",warning:"bg-warning/10 text-warning ring-1 ring-inset ring-warning/20",info:"bg-info/10 text-info ring-1 ring-inset ring-info/20",accent:"bg-accent/10 text-accent ring-1 ring-inset ring-accent/20",gray:"bg-surface-secondary/60 text-text-secondary ring-1 ring-inset ring-border/40",blue:"bg-primary/10 text-primary ring-1 ring-inset ring-primary/20",green:"bg-success/10 text-success ring-1 ring-inset ring-success/20",red:"bg-error/10 text-error ring-1 ring-inset ring-error/20",yellow:"bg-warning/10 text-warning ring-1 ring-inset ring-warning/20",purple:"bg-purple-500/10 text-purple-500 ring-1 ring-inset ring-purple-500/25",pink:"bg-pink-500/10 text-pink-500 ring-1 ring-inset ring-pink-500/25",orange:"bg-orange-500/10 text-orange-500 ring-1 ring-inset ring-orange-500/25",cyan:"bg-cyan-500/10 text-cyan-500 ring-1 ring-inset ring-cyan-500/25",teal:"bg-teal-500/10 text-teal-500 ring-1 ring-inset ring-teal-500/25",indigo:"bg-indigo-500/10 text-indigo-500 ring-1 ring-inset ring-indigo-500/25"},sl={primary:"border border-primary/60 text-primary bg-transparent",secondary:"border border-secondary/60 text-secondary bg-transparent",success:"border border-success/60 text-success bg-transparent",error:"border border-error/60 text-error bg-transparent",warning:"border border-warning/60 text-warning bg-transparent",info:"border border-info/60 text-info bg-transparent",accent:"border border-accent/60 text-accent bg-transparent",gray:"border border-border text-text-secondary bg-transparent",blue:"border border-primary/60 text-primary bg-transparent",green:"border border-success/60 text-success bg-transparent",red:"border border-error/60 text-error bg-transparent",yellow:"border border-warning/60 text-warning bg-transparent",purple:"border border-purple-500/60 text-purple-500 bg-transparent",pink:"border border-pink-500/60 text-pink-500 bg-transparent",orange:"border border-orange-500/60 text-orange-500 bg-transparent",cyan:"border border-cyan-500/60 text-cyan-500 bg-transparent",teal:"border border-teal-500/60 text-teal-500 bg-transparent",indigo:"border border-indigo-500/60 text-indigo-500 bg-transparent"},il={primary:"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-sm shadow-blue-500/30",secondary:"bg-gradient-to-r from-slate-500 to-slate-700 text-white shadow-sm shadow-slate-500/30",success:"bg-gradient-to-r from-green-400 to-emerald-600 text-white shadow-sm shadow-green-500/30",error:"bg-gradient-to-r from-red-500 to-rose-600 text-white shadow-sm shadow-red-500/30",warning:"bg-gradient-to-r from-amber-400 to-orange-500 text-white shadow-sm shadow-amber-500/30",info:"bg-gradient-to-r from-sky-400 to-blue-600 text-white shadow-sm shadow-blue-500/30",accent:"bg-gradient-to-r from-cyan-400 to-sky-600 text-white shadow-sm shadow-cyan-500/30",gray:"bg-gradient-to-r from-slate-400 to-slate-500 text-white shadow-sm",blue:"bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-sm shadow-blue-500/30",green:"bg-gradient-to-r from-green-400 to-emerald-600 text-white shadow-sm shadow-green-500/30",red:"bg-gradient-to-r from-red-500 to-rose-600 text-white shadow-sm shadow-red-500/30",yellow:"bg-gradient-to-r from-amber-400 to-orange-500 text-white shadow-sm shadow-amber-500/30",purple:"bg-gradient-to-r from-purple-500 to-violet-600 text-white shadow-sm shadow-purple-500/30",pink:"bg-gradient-to-r from-pink-500 to-fuchsia-600 text-white shadow-sm shadow-pink-500/30",orange:"bg-gradient-to-r from-orange-400 to-red-500 text-white shadow-sm shadow-orange-500/30",cyan:"bg-gradient-to-r from-cyan-400 to-sky-500 text-white shadow-sm shadow-cyan-500/30",teal:"bg-gradient-to-r from-teal-400 to-cyan-500 text-white shadow-sm shadow-teal-500/30",indigo:"bg-gradient-to-r from-indigo-500 to-purple-600 text-white shadow-sm shadow-indigo-500/30"},en={primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",error:"bg-error",warning:"bg-warning",info:"bg-info",accent:"bg-accent",gray:"bg-slate-400",blue:"bg-primary",green:"bg-success",red:"bg-error",yellow:"bg-warning",purple:"bg-purple-500",pink:"bg-pink-500",orange:"bg-orange-500",cyan:"bg-cyan-500",teal:"bg-teal-500",indigo:"bg-indigo-500"},ll={solid:r=>al[r],soft:r=>rn[r],outline:r=>sl[r],gradient:r=>il[r]},dl={xs:"px-1.5 py-px text-[10px] leading-4 gap-1",sm:"px-2 py-0.5 text-xs leading-4 gap-1",md:"px-2.5 py-0.5 text-xs leading-5 gap-1",lg:"px-3 py-1 text-sm leading-5 gap-1.5"},cl={xs:"w-1.5 h-1.5",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"},ul={xs:"w-3 h-3",sm:"w-3 h-3",md:"w-3.5 h-3.5",lg:"w-4 h-4"},ml={rounded:"rounded-md",pill:"rounded-full",square:"rounded-none"};function fl(){return jsx(XMarkIcon$1,{className:"w-full h-full","aria-hidden":"true"})}function pl({children:r,variant:e="soft",color:n="blue",size:o="md",shape:i="pill",icon:a,trailingIcon:c,onRemove:s,pulse:d=false,count:l,maxCount:f=99,uppercase:m=false,tracking:p=false,as:u="span",className:b,...B}){let v=e==="dot",I=v?rn[n]:ll[e](n),k=l!==void 0?l>f?`${f.toString()}+`:String(l):null;return jsxs(u,{className:t("inline-flex items-center font-medium leading-none select-none whitespace-nowrap","transition-all duration-150 ease-out",dl[o],ml[i],I,m&&"uppercase",p&&"tracking-wide",(u==="button"||u==="a")&&"cursor-pointer",b),...B,children:[v&&jsxs("span",{className:"relative inline-flex shrink-0","aria-hidden":"true",children:[d&&jsx("span",{className:t("absolute inset-0 rounded-full animate-ping opacity-60",en[n])}),jsx("span",{className:t("rounded-full shrink-0",cl[o],en[n])})]}),!v&&a!=null&&jsx("span",{"aria-hidden":"true",className:"shrink-0 inline-flex",children:a}),k??r,!v&&c!=null&&s==null&&jsx("span",{"aria-hidden":"true",className:"shrink-0 inline-flex",children:c}),s!=null&&jsx("button",{type:"button","aria-label":"Remove",onClick:M=>{M.stopPropagation(),s();},className:t("inline-flex items-center justify-center rounded-full shrink-0 -mr-0.5","opacity-70 hover:opacity-100","hover:bg-black/10 dark:hover:bg-white/15","transition-all duration-100",ul[o]),children:jsx(fl,{})})]})}var nn=ae.createContext(null);function Kt(){let r=ae.useContext(nn);if(!r)throw new Error("DropdownMenu components must be used within a DropdownMenu");return r}var on=({children:r,open:e,onOpenChange:n,className:o})=>{let[i,a]=ae.useState(false),[c,s]=ae.useState(null),d=e??i,l=ae.useCallback(f=>{a(f),n?.(f);},[n]);return ae.useEffect(()=>{if(!d)return;let f=m=>{c&&!c.contains(m.target)&&!m.target.closest("[data-dropdown-content]")&&l(false);};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f);}},[d,l,c]),ae.useEffect(()=>{if(!d)return;let f=m=>{m.key==="Escape"&&(l(false),c?.focus());};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f);}},[d,l,c]),jsx(nn.Provider,{value:{open:d,setOpen:l,triggerElement:c,setTriggerElement:s},children:jsx("div",{className:t("relative inline-block",o),children:r})})},bl={sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-11 px-5 text-base"},xl={default:"bg-surface border border-border text-text shadow-sm hover:bg-hover focus:ring-2 focus:ring-primary/40",subtle:"bg-surface-secondary text-text hover:bg-active",ghost:"bg-transparent text-text-secondary hover:bg-hover"},an=ae.forwardRef(({children:r,className:e,size:n="md",variant:o="default",onClick:i,...a},c)=>{let{open:s,setOpen:d,setTriggerElement:l}=Kt(),f=ae.useCallback(u=>{l(u),typeof c=="function"?c(u):c&&(c.current=u);},[c,l]),m=u=>{d(!s),i?.(u);};return jsxs("button",{ref:f,type:"button","aria-expanded":s,"aria-haspopup":"menu",className:t("inline-flex items-center justify-center rounded-md font-bold uppercase tracking-widest transition-all duration-normal focus:outline-none disabled:opacity-50 disabled:pointer-events-none",bl[n],xl[o],e),onClick:m,...a,children:[r,jsx(ChevronDownIcon,{className:t("ml-2 h-4 w-4 transition-transform duration-200",s&&"rotate-180")})]})}),sn=ae.forwardRef(({children:r,className:e,align:n="left",width:o=220,...i},a)=>{let{open:c}=Kt();return c?jsx("div",{ref:a,"data-dropdown-content":true,role:"menu",style:{width:o},className:t("absolute top-full z-dropdown mt-2 min-w-32 overflow-hidden rounded-lg border border-border bg-surface p-1.5 text-text shadow-lg ring-1 ring-border/5 animate-in fade-in zoom-in-95 duration-normal",{left:"left-0",right:"right-0",center:"left-1/2 -translate-x-1/2"}[n],e),...i,children:r}):null}),ln=ae.forwardRef(({children:r,className:e,disabled:n,destructive:o,icon:i,shortcut:a,onClick:c,...s},d)=>{let{setOpen:l}=Kt(),f=p=>{n||(c?.(p),l(false));},m=p=>{n||(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),c?.(p),l(false));};return jsxs("div",{ref:d,role:"menuitem","aria-disabled":n,tabIndex:n?-1:0,className:t("relative flex cursor-default select-none items-center rounded-sm px-3 py-2 text-sm outline-none transition-all duration-fast focus:bg-hover data-disabled:pointer-events-none data-disabled:opacity-50 hover:bg-hover font-medium",o&&"text-error hover:bg-error/10 hover:text-error",n&&"opacity-50 pointer-events-none",e),onClick:f,onKeyDown:m,...s,children:[i&&jsx("span",{className:"mr-2 flex h-4 w-4 items-center justify-center",children:i}),jsx("span",{className:"flex-1",children:r}),a&&jsx("span",{className:"ml-auto text-xs tracking-widest text-text-muted font-bold",children:a})]})}),dn=({className:r,...e})=>jsx("div",{className:t("-mx-1.5 my-1 h-px bg-divider",r),...e});on.displayName="DropdownMenu";an.displayName="DropdownMenuTrigger";sn.displayName="DropdownMenuContent";ln.displayName="DropdownMenuItem";dn.displayName="DropdownMenuSeparator";var un=createContext(void 0),Ut=({children:r,defaultTheme:e="system",storageKey:n="ui-theme",themeConfig:o,...i})=>{let[a,c]=useState(()=>{if(typeof window>"u")return e;let d=localStorage.getItem(n);return d||e});useEffect(()=>{let d=window.document.documentElement,l=()=>{d.classList.remove("light","dark");let f=a==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;if(d.classList.add(f),o){let m=o[f]??{};Object.entries(m).forEach(([p,u])=>{if(u){let b=`--${p.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`;d.style.setProperty(b,u);}});}};if(l(),a==="system"){let f=window.matchMedia("(prefers-color-scheme: dark)"),m=()=>{l();};return f.addEventListener("change",m),()=>{f.removeEventListener("change",m);}}},[a,o]);let s={theme:a,setTheme:d=>{localStorage.setItem(n,d),c(d);}};return o!==void 0&&(s.themeConfig=o),jsx(un.Provider,{...i,value:s,children:r})},mn=()=>{let r=useContext(un);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r};Ut.displayName="ThemeProvider";var Nl={xs:"h-6 py-0 pl-2 pr-8 text-xs",sm:"h-8 py-0 pl-3 pr-8 text-sm",md:"h-10 py-0 pl-3 pr-10 text-sm",lg:"h-11 py-0 pl-4 pr-10 text-base",xl:"h-12 py-0 pl-4 pr-12 text-lg"},Pl={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-sm",xl:"text-base"},El={default:"rounded-md border border-border bg-surface shadow-sm focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 appearance-none transition-all duration-normal",filled:"rounded-md border border-transparent bg-surface-secondary focus:bg-surface focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-0 appearance-none transition-all duration-normal",flushed:"rounded-none border-0 border-b border-border bg-transparent focus:outline-none focus:ring-0 appearance-none transition-all duration-normal",unstyled:"border-0 bg-transparent p-0 focus:outline-none focus:ring-0 appearance-none"},Tl={default:{default:"border-border focus:border-primary focus:ring-primary/40",filled:"focus:border-primary focus:ring-primary/40",flushed:"border-border focus:border-primary",unstyled:""},error:{default:"border-error focus:border-error focus:ring-error/20",filled:"bg-error/5 focus:border-error focus:ring-error/20",flushed:"border-error focus:border-error",unstyled:""},success:{default:"border-success focus:border-success focus:ring-success/20",filled:"bg-success/5 focus:border-success focus:ring-success/20",flushed:"border-success focus:border-success",unstyled:""},warning:{default:"border-warning focus:border-warning focus:ring-warning/20",filled:"bg-warning/5 focus:border-warning focus:ring-warning/20",flushed:"border-warning focus:border-warning",unstyled:""}},Il={default:"text-text-muted",error:"text-error",success:"text-success",warning:"text-warning"},Ll="disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-surface-secondary";function Ml(r,e){return r?{xs:"pl-6",sm:"pl-8",md:"pl-9",lg:"pl-10",xl:"pl-11"}[e]:""}function Bl(r,e,n,o){if(r==="error"&&e)return e;if(r==="success"&&n)return n;if(r==="warning"&&o)return o}function fn({children:r,side:e,size:n,pointerEvents:o=false}){return jsx("span",{"aria-hidden":"true",className:t("absolute top-1/2 -translate-y-1/2 text-text-secondary flex items-center justify-center",!o&&"pointer-events-none",e==="left"?"left-3":"right-3",{xs:"w-3.5 h-3.5",sm:"w-4 h-4",md:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5"}[n]),children:r})}var Dl=()=>jsx(ChevronUpDownIcon,{className:"w-full h-full","aria-hidden":"true"}),Xt=forwardRef(function({label:e,required:n=false,helperText:o,errorMessage:i,successMessage:a,warningMessage:c,variant:s="default",size:d="md",state:l="default",fullWidth:f=true,leftElement:m,rightElement:p,wrapperClassName:u,inputGroupClassName:b,inputClassName:B,labelClassName:v,helperClassName:I,id:k,disabled:M,className:E,isLoading:C,options:x=[],placeholder:y,children:g,...R},h){let w=useId(),L=k??w,D=`${L}-helper`,H=`${L}-state`,A=m!==void 0,F=Bl(l,i,a,c),$=[o?D:null,F?H:null].filter(Boolean).join(" ")||void 0,V=()=>C?jsxs("svg",{className:"animate-spin h-full w-full text-text-muted",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):p!==void 0?p:jsx(Dl,{}),U=jsxs("select",{...R,ref:h,id:L,disabled:!!M||!!C,"aria-invalid":l==="error"?true:void 0,"aria-describedby":$,"aria-required":n,className:t("w-full transition-colors duration-150",Nl[d],El[s],Tl[l][s],Ll,Ml(A,d),B),children:[y&&jsx("option",{value:"",disabled:true,hidden:true,children:y}),x.length>0?x.map((_,X)=>jsx("option",{value:_.value,disabled:_.disabled,children:_.label},X)):g]});return jsxs("div",{className:t("flex flex-col gap-1",f?"w-full":"w-fit",u,E),children:[e!==void 0&&jsxs("label",{htmlFor:L,className:t("font-black leading-none text-text mt-1 uppercase tracking-widest",Pl[d],v),children:[e,n&&jsx("span",{"aria-hidden":"true",className:"ml-1 text-error",children:"*"})]}),jsx("div",{className:t("flex items-stretch",f?"w-full":"w-fit",b),children:jsxs("div",{className:"relative flex flex-1 items-center",children:[A&&jsx(fn,{side:"left",size:d,children:m}),jsx("div",{className:"flex-1",children:U}),jsx(fn,{side:"right",size:d,pointerEvents:!p,children:V()})]})}),o!==void 0&&jsx("p",{id:D,className:t("text-xs leading-tight text-text-muted",I),children:o}),F!==void 0&&jsx("p",{id:H,role:l==="error"?"alert":void 0,className:t("text-xs leading-tight mt-1",Il[l],I),children:F})]})});Xt.displayName="Select";var pn=forwardRef(function({src:e,alt:n,fallback:o,loadingComponent:i,showSkeleton:a=true,aspectRatio:c,objectFit:s="cover",className:d,containerClassName:l,onLoad:f,onError:m,style:p,...u},b){let[B,v]=useState(true),[I,k]=useState(false),[M,E]=useState(e);e!==M&&(E(e),v(true),k(false));let C=R=>{v(false),f?.(R);},x=R=>{v(false),k(true),m?.(R);},y=()=>{let R=t("h-full w-full",s==="cover"&&"object-cover",s==="contain"&&"object-contain",s==="fill"&&"object-fill",s==="none"&&"object-none",s==="scale-down"&&"object-scale-down",d);return typeof o=="string"?jsx("img",{src:o,alt:n,className:R,...u}):jsx("div",{className:R,children:o??jsx("div",{className:"flex h-full w-full items-center justify-center bg-surface-secondary text-text-tertiary",children:jsx("svg",{className:"h-1/3 w-1/3 opacity-20",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})})})},g={aspectRatio:c,...p};return jsxs("div",{className:t("relative overflow-hidden",!c&&"h-full w-full",l),style:g,children:[B&&a&&jsx("div",{className:"absolute inset-0 z-10",children:i??jsx(ge,{className:"h-full w-full",variant:"wave"})}),I?y():jsx("img",{ref:b,src:e,alt:n,onLoad:C,onError:x,className:t("transition-opacity duration-500 ease-in-out",B?"opacity-0":"opacity-100",s==="cover"&&"object-cover",s==="contain"&&"object-contain",s==="fill"&&"object-fill",s==="none"&&"object-none",s==="scale-down"&&"object-scale-down","h-full w-full",d),...u})]})});pn.displayName="Image";function gn(r,e,n){return n||(r<e?"completed":r===e?"active":"upcoming")}var Fl={sm:"w-7 h-7 text-xs",md:"w-9 h-9 text-sm",lg:"w-11 h-11 text-base"},_l={sm:"mt-[14px]",md:"mt-[18px]",lg:"mt-[22px]"},Ol={sm:"ml-[13px]",md:"ml-[17px]",lg:"ml-[21px]"},bn={sm:"text-xs",md:"text-sm",lg:"text-base"},xn={sm:"text-[10px]",md:"text-xs",lg:"text-sm"},$l={default:{completed:"bg-primary text-text-inverse shadow-md shadow-primary/30 ring-2 ring-primary/20 ring-offset-2 ring-offset-surface",active:"bg-primary text-text-inverse shadow-lg shadow-primary/40 ring-2 ring-primary/30 ring-offset-2 ring-offset-surface scale-110",upcoming:"bg-surface-secondary text-text-muted border border-border ring-2 ring-transparent ring-offset-2 ring-offset-surface",error:"bg-error text-text-inverse shadow-md shadow-error/30 ring-2 ring-error/20 ring-offset-2 ring-offset-surface"},filled:{completed:"bg-primary text-text-inverse shadow-md shadow-primary/30",active:"bg-gradient-to-br from-primary to-accent text-text-inverse shadow-lg shadow-primary/40 scale-110",upcoming:"bg-surface-secondary text-text-muted",error:"bg-error text-text-inverse shadow-md shadow-error/30"},outlined:{completed:"bg-transparent border-2 border-primary text-primary ring-2 ring-primary/10 ring-offset-2 ring-offset-surface",active:"bg-primary/10 border-2 border-primary text-primary ring-2 ring-primary/20 ring-offset-2 ring-offset-surface scale-110",upcoming:"bg-transparent border-2 border-border text-text-muted",error:"bg-transparent border-2 border-error text-error ring-2 ring-error/10"},minimal:{completed:"bg-primary/15 text-primary",active:"bg-primary text-text-inverse shadow-md shadow-primary/30 scale-110",upcoming:"bg-surface-secondary text-text-muted",error:"bg-error/15 text-error"}};function hn(r){return r==="completed"?"bg-primary":r==="error"?"bg-error":"bg-border"}function jl({className:r}){return jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-hidden":"true",children:jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})}function Kl({className:r}){return jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:r,"aria-hidden":"true",children:jsx("path",{d:"M10 8.586L7.707 6.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 101.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z"})})}function wn({step:r,index:e,status:n,variant:o,size:i}){let a={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},c;return n==="completed"&&!r.icon?c=jsx(jl,{className:a[i]}):n==="error"&&!r.icon?c=jsx(Kl,{className:a[i]}):r.icon?c=r.icon:c=jsx("span",{className:"font-bold leading-none",children:e+1}),jsxs("div",{className:t("relative shrink-0 flex items-center justify-center rounded-full","transition-all duration-300 ease-out",Fl[i],$l[o][n]),"aria-current":n==="active"?"step":void 0,children:[c,n==="active"&&jsx("span",{className:"absolute inset-0 rounded-full animate-ping opacity-20 bg-primary"})]})}var yn=forwardRef(function({steps:e,currentStep:n,onChange:o,variant:i="default",size:a="md",orientation:c="horizontal",clickable:s=false,showContent:d=true,className:l,connectorClassName:f,stepClassName:m,...p},u){let[b,B]=useState(0),v=n!==void 0,I=v?n:b,k=(C,x)=>{!s||x||(v||B(C),o?.(C));},M=c==="horizontal",E=e[I];return jsxs("div",{ref:u,className:t("w-full",M?"flex flex-col gap-6":"flex gap-6",l),...p,children:[M?jsx("div",{role:"list","aria-label":"Progress steps",className:"flex flex-row items-start w-full",children:e.map((C,x)=>{let y=gn(x,I,C.status),g=x===e.length-1,R=s&&!C.disabled;return jsxs("div",{role:"listitem",className:t("flex flex-row items-start",g?"shrink-0":"flex-1"),children:[jsxs("div",{className:t("flex flex-col items-center gap-2 shrink-0",m),children:[jsx("button",{type:"button",onClick:()=>{k(x,C.disabled);},disabled:!R,"aria-disabled":!R||C.disabled,className:t("block focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 rounded-full",R?"cursor-pointer hover:opacity-80 transition-opacity":"cursor-default"),children:jsx(wn,{step:C,index:x,status:y,variant:i,size:a})}),jsxs("div",{className:"flex flex-col items-center text-center max-w-[80px]",children:[jsx("span",{className:t("font-semibold leading-tight transition-colors duration-200",bn[a],y==="active"&&"text-primary",y==="completed"&&"text-text",y==="upcoming"&&"text-text-muted",y==="error"&&"text-error"),children:C.label}),C.description&&jsx("span",{className:t("text-text-muted leading-tight mt-0.5",xn[a],y==="active"&&"text-text-secondary"),children:C.description})]})]}),!g&&jsx("div",{className:t("flex-1 h-[2px] rounded-full transition-all duration-500",_l[a],hn(y),f),"aria-hidden":"true"})]},C.id)})}):jsx("div",{role:"list","aria-label":"Progress steps",className:"flex flex-col items-start",children:e.map((C,x)=>{let y=gn(x,I,C.status),g=x===e.length-1,R=s&&!C.disabled;return jsxs("div",{role:"listitem",className:t("flex flex-col",m),children:[jsxs("div",{className:"flex flex-row items-start gap-3",children:[jsx("button",{type:"button",onClick:()=>{k(x,C.disabled);},disabled:!R,"aria-disabled":!R||C.disabled,className:t("block shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 rounded-full",R?"cursor-pointer hover:opacity-80 transition-opacity":"cursor-default"),children:jsx(wn,{step:C,index:x,status:y,variant:i,size:a})}),jsxs("div",{className:"flex flex-col items-start pt-1",children:[jsx("span",{className:t("font-semibold leading-tight transition-colors duration-200",bn[a],y==="active"&&"text-primary",y==="completed"&&"text-text",y==="upcoming"&&"text-text-muted",y==="error"&&"text-error"),children:C.label}),C.description&&jsx("span",{className:t("text-text-muted leading-tight mt-0.5",xn[a],y==="active"&&"text-text-secondary"),children:C.description})]})]}),!g&&jsx("div",{className:t("w-[2px] min-h-[28px] rounded-full transition-all duration-500 my-1",Ol[a],hn(y),f),"aria-hidden":"true"})]},C.id)})}),d&&E?.content&&jsx("div",{role:"region","aria-live":"polite",className:"w-full rounded-lg border border-border bg-surface p-5 shadow-sm",children:E.content})]})});yn.displayName="Stepper";var Xl={sm:{track:"w-8 h-4",thumb:"w-3 h-3 translate-x-0.5 peer-checked:translate-x-[1.125rem]"},md:{track:"w-11 h-6",thumb:"w-5 h-5 translate-x-0.5 peer-checked:translate-x-[1.375rem]"},lg:{track:"w-14 h-8",thumb:"w-7 h-7 translate-x-0.5 peer-checked:translate-x-[1.625rem]"}},Jl={default:"peer-checked:bg-primary",error:"peer-checked:bg-error",success:"peer-checked:bg-success",warning:"peer-checked:bg-warning"},Cn=forwardRef(({className:r,size:e="md",state:n="default",label:o,helperText:i,errorText:a,disabled:c,...s},d)=>{let{track:l,thumb:f}=Xl[e];return jsxs("div",{className:t("flex flex-col gap-1.5",r),children:[jsxs("label",{className:t("relative inline-flex items-center cursor-pointer select-none",c&&"cursor-not-allowed"),children:[jsx("input",{type:"checkbox",ref:d,className:"sr-only peer",disabled:c,...s}),jsx("div",{className:t("rounded-full transition-colors duration-200 bg-border peer-focus:ring-2 peer-focus:ring-primary/20",l,Jl[n],c&&"opacity-50")}),jsx("div",{className:t("absolute top-0.5 left-0 bg-white rounded-full transition-transform duration-200 shadow-sm",f)}),o&&jsx("span",{className:t("ml-3 text-sm font-medium text-text",c&&"opacity-50"),children:o})]}),(a!==void 0||i!==void 0)&&jsx("p",{className:t("text-xs",a?"text-error":"text-text-muted"),children:a??i})]})});Cn.displayName="Toggle";var Nn=createContext(void 0),Pn=createContext(void 0),qt=createContext(void 0),Wl=({children:r,className:e,isOpen:n,onToggle:o,disabled:i=false})=>{let a=useContext(Nn),c=useContext(Pn),[s,d]=useState(false),l=a!==void 0&&c!==void 0,f=n??(l?a.openIndices.includes(c):s),m=useCallback(()=>{i||(o?o():l?a.toggleIndex(c):d(p=>!p));},[i,o,l,a,c]);return jsx(qt.Provider,{value:{isOpen:f,toggle:m,disabled:i},children:jsx("div",{className:t("border border-border rounded-lg overflow-hidden mb-2 last:mb-0",e),children:r})})},Zl=({children:r,className:e,hideChevron:n=false,icon:o,rightContent:i})=>{let a=useContext(qt);if(!a)throw new Error("AccordionTrigger must be used within an AccordionItem");let{isOpen:c,toggle:s,disabled:d}=a;return jsxs("div",{className:t("flex items-center justify-between bg-surface transition-colors",!d&&"hover:bg-interaction-hover",c&&"border-b border-border",e),children:[jsxs("button",{type:"button",className:t("flex flex-1 items-center gap-3 p-4 cursor-pointer select-none focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary/20 text-left",d&&"cursor-not-allowed opacity-50"),onClick:s,disabled:d,"aria-expanded":c,children:[!n&&(o??jsx(ChevronDownIcon$1,{className:t("w-5 h-5 transition-transform duration-200 text-text-muted",c&&"rotate-180")})),jsx("div",{className:"font-medium text-text",children:r})]}),i&&jsx("div",{className:"flex items-center p-4",role:"presentation",onClick:l=>{l.stopPropagation();},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&l.stopPropagation();},children:i})]})},Yl=({children:r,className:e})=>{let n=useContext(qt);if(!n)throw new Error("AccordionContent must be used within an AccordionItem");let{isOpen:o}=n;return o?jsx("div",{className:t("p-4 bg-surface animate-in fade-in slide-in-from-top-2 duration-200",e),children:r}):null},Ql=({children:r,className:e,allowMultiple:n=false,defaultOpenIndices:o=[]})=>{let[i,a]=useState(o),c=useCallback(s=>{a(d=>d.includes(s)?d.filter(l=>l!==s):n?[...d,s]:[s]);},[n]);return jsx(Nn.Provider,{value:{openIndices:i,toggleIndex:c},children:jsx("div",{className:t("w-full",e),children:Children.map(r,(s,d)=>jsx(Pn.Provider,{value:d,children:s},d))})})};
|
|
2
|
-
export{
|
|
1
|
+
export { Modal, ModalBody, ModalCloseButton, ModalFooter, ModalHeader } from './chunk-HQGDSOSN.mjs';
|
|
2
|
+
export { SearchInput } from './chunk-VHVFRWF5.mjs';
|
|
3
|
+
export { ThemeProvider, useTheme } from './chunk-Y3NTKFUE.mjs';
|
|
4
|
+
import './chunk-SBNNV6FE.mjs';
|
|
5
|
+
export { Tabs } from './chunk-G4HVY6FM.mjs';
|
|
6
|
+
export { TextInput } from './chunk-CMER5LO3.mjs';
|
|
7
|
+
export { TimePicker } from './chunk-VKQDW7C2.mjs';
|
|
8
|
+
export { Toaster } from './chunk-YOTCXSXL.mjs';
|
|
9
|
+
export { Sidebar } from './chunk-PJH2KEWK.mjs';
|
|
10
|
+
export { Header } from './chunk-FOVJHEWH.mjs';
|
|
11
|
+
export { Image } from './chunk-JV6AWBN5.mjs';
|
|
12
|
+
export { IconButton } from './chunk-BVBCAAES.mjs';
|
|
13
|
+
export { Skeleton, SkeletonAvatar, SkeletonCard, SkeletonTable, SkeletonText } from './chunk-32SKYPQW.mjs';
|
|
14
|
+
export { MultiSelect } from './chunk-JKPNJ4PZ.mjs';
|
|
15
|
+
export { OtpInput } from './chunk-RYWDZHKG.mjs';
|
|
16
|
+
export { PasswordInput } from './chunk-446OJWC6.mjs';
|
|
17
|
+
export { Phone } from './chunk-CBA54EY4.mjs';
|
|
18
|
+
export { RadioButton } from './chunk-DN2GFJF4.mjs';
|
|
19
|
+
export { Select } from './chunk-TIVSMCXZ.mjs';
|
|
20
|
+
export { Pagination, Table } from './chunk-7364SUK6.mjs';
|
|
21
|
+
export { ComboBox } from './chunk-4DA7CRNV.mjs';
|
|
22
|
+
export { DatePicker } from './chunk-7WNJ7L4Z.mjs';
|
|
23
|
+
export { Dialog, DialogBody, DialogCloseButton, DialogFooter, DialogHeader } from './chunk-OQPCL5XX.mjs';
|
|
24
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from './chunk-2POU3NX4.mjs';
|
|
25
|
+
export { Email } from './chunk-4QSDPHPI.mjs';
|
|
26
|
+
export { FileUpload } from './chunk-KA35BV7V.mjs';
|
|
27
|
+
export { Link } from './chunk-SHQ2MPBE.mjs';
|
|
28
|
+
export { Loader } from './chunk-4DR57X7U.mjs';
|
|
29
|
+
export { Avatar } from './chunk-B5MYGYJY.mjs';
|
|
30
|
+
export { Badge } from './chunk-H77YWN3L.mjs';
|
|
31
|
+
export { Breadcrumbs } from './chunk-DMLPA65B.mjs';
|
|
32
|
+
import './chunk-ARTXRQO6.mjs';
|
|
33
|
+
export { Button } from './chunk-RAD5VJHR.mjs';
|
|
34
|
+
export { Tooltip } from './chunk-65UZC3FK.mjs';
|
|
35
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './chunk-6ZCY4O5M.mjs';
|
|
36
|
+
export { Checkbox } from './chunk-SFUOCZJY.mjs';
|
|
37
|
+
import { cn } from './chunk-OCPFOFJ4.mjs';
|
|
38
|
+
export { cn } from './chunk-OCPFOFJ4.mjs';
|
|
39
|
+
import { forwardRef, useState, createContext, useContext, useCallback, Children } from 'react';
|
|
40
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
41
|
+
import { ChevronDownIcon } from '@heroicons/react/24/outline';
|
|
42
|
+
|
|
43
|
+
function deriveStatus(index, currentStep, override) {
|
|
44
|
+
if (override) return override;
|
|
45
|
+
if (index < currentStep) return "completed";
|
|
46
|
+
if (index === currentStep) return "active";
|
|
47
|
+
return "upcoming";
|
|
48
|
+
}
|
|
49
|
+
var indicatorSizeClasses = {
|
|
50
|
+
sm: "w-7 h-7 text-xs",
|
|
51
|
+
md: "w-9 h-9 text-sm",
|
|
52
|
+
lg: "w-11 h-11 text-base"
|
|
53
|
+
};
|
|
54
|
+
var connectorOffsetH = {
|
|
55
|
+
sm: "mt-[14px]",
|
|
56
|
+
// half of h-7 = 28/2
|
|
57
|
+
md: "mt-[18px]",
|
|
58
|
+
// half of h-9 = 36/2
|
|
59
|
+
lg: "mt-[22px]"
|
|
60
|
+
// half of h-11 = 44/2
|
|
61
|
+
};
|
|
62
|
+
var connectorOffsetV = {
|
|
63
|
+
sm: "ml-[13px]",
|
|
64
|
+
// (28-2)/2 = 13
|
|
65
|
+
md: "ml-[17px]",
|
|
66
|
+
// (36-2)/2 = 17
|
|
67
|
+
lg: "ml-[21px]"
|
|
68
|
+
// (44-2)/2 = 21
|
|
69
|
+
};
|
|
70
|
+
var labelSizeClasses = {
|
|
71
|
+
sm: "text-xs",
|
|
72
|
+
md: "text-sm",
|
|
73
|
+
lg: "text-base"
|
|
74
|
+
};
|
|
75
|
+
var descSizeClasses = {
|
|
76
|
+
sm: "text-[10px]",
|
|
77
|
+
md: "text-xs",
|
|
78
|
+
lg: "text-sm"
|
|
79
|
+
};
|
|
80
|
+
var indicatorClasses = {
|
|
81
|
+
default: {
|
|
82
|
+
completed: "bg-primary text-text-inverse shadow-md shadow-primary/30 ring-2 ring-primary/20 ring-offset-2 ring-offset-surface",
|
|
83
|
+
active: "bg-primary text-text-inverse shadow-lg shadow-primary/40 ring-2 ring-primary/30 ring-offset-2 ring-offset-surface scale-110",
|
|
84
|
+
upcoming: "bg-surface-secondary text-text-muted border border-border ring-2 ring-transparent ring-offset-2 ring-offset-surface",
|
|
85
|
+
error: "bg-error text-text-inverse shadow-md shadow-error/30 ring-2 ring-error/20 ring-offset-2 ring-offset-surface"
|
|
86
|
+
},
|
|
87
|
+
filled: {
|
|
88
|
+
completed: "bg-primary text-text-inverse shadow-md shadow-primary/30",
|
|
89
|
+
active: "bg-gradient-to-br from-primary to-accent text-text-inverse shadow-lg shadow-primary/40 scale-110",
|
|
90
|
+
upcoming: "bg-surface-secondary text-text-muted",
|
|
91
|
+
error: "bg-error text-text-inverse shadow-md shadow-error/30"
|
|
92
|
+
},
|
|
93
|
+
outlined: {
|
|
94
|
+
completed: "bg-transparent border-2 border-primary text-primary ring-2 ring-primary/10 ring-offset-2 ring-offset-surface",
|
|
95
|
+
active: "bg-primary/10 border-2 border-primary text-primary ring-2 ring-primary/20 ring-offset-2 ring-offset-surface scale-110",
|
|
96
|
+
upcoming: "bg-transparent border-2 border-border text-text-muted",
|
|
97
|
+
error: "bg-transparent border-2 border-error text-error ring-2 ring-error/10"
|
|
98
|
+
},
|
|
99
|
+
minimal: {
|
|
100
|
+
completed: "bg-primary/15 text-primary",
|
|
101
|
+
active: "bg-primary text-text-inverse shadow-md shadow-primary/30 scale-110",
|
|
102
|
+
upcoming: "bg-surface-secondary text-text-muted",
|
|
103
|
+
error: "bg-error/15 text-error"
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
function connectorColorClass(status) {
|
|
107
|
+
if (status === "completed") return "bg-primary";
|
|
108
|
+
if (status === "error") return "bg-error";
|
|
109
|
+
return "bg-border";
|
|
110
|
+
}
|
|
111
|
+
function CheckIcon({ className }) {
|
|
112
|
+
return /* @__PURE__ */ jsx(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
116
|
+
viewBox: "0 0 20 20",
|
|
117
|
+
fill: "currentColor",
|
|
118
|
+
className,
|
|
119
|
+
"aria-hidden": "true",
|
|
120
|
+
children: /* @__PURE__ */ jsx(
|
|
121
|
+
"path",
|
|
122
|
+
{
|
|
123
|
+
fillRule: "evenodd",
|
|
124
|
+
d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",
|
|
125
|
+
clipRule: "evenodd"
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
function ErrorIcon({ className }) {
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
"svg",
|
|
134
|
+
{
|
|
135
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
136
|
+
viewBox: "0 0 20 20",
|
|
137
|
+
fill: "currentColor",
|
|
138
|
+
className,
|
|
139
|
+
"aria-hidden": "true",
|
|
140
|
+
children: /* @__PURE__ */ jsx("path", { d: "M10 8.586L7.707 6.293a1 1 0 00-1.414 1.414L8.586 10l-2.293 2.293a1 1 0 101.414 1.414L10 11.414l2.293 2.293a1 1 0 001.414-1.414L11.414 10l2.293-2.293a1 1 0 00-1.414-1.414L10 8.586z" })
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function StepIndicator({ step, index, status, variant, size }) {
|
|
145
|
+
const iconSize = { sm: "w-3 h-3", md: "w-4 h-4", lg: "w-5 h-5" };
|
|
146
|
+
let content;
|
|
147
|
+
if (status === "completed" && !step.icon) {
|
|
148
|
+
content = /* @__PURE__ */ jsx(CheckIcon, { className: iconSize[size] });
|
|
149
|
+
} else if (status === "error" && !step.icon) {
|
|
150
|
+
content = /* @__PURE__ */ jsx(ErrorIcon, { className: iconSize[size] });
|
|
151
|
+
} else if (step.icon) {
|
|
152
|
+
content = step.icon;
|
|
153
|
+
} else {
|
|
154
|
+
content = /* @__PURE__ */ jsx("span", { className: "font-bold leading-none", children: index + 1 });
|
|
155
|
+
}
|
|
156
|
+
return /* @__PURE__ */ jsxs(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
className: cn(
|
|
160
|
+
"relative shrink-0 flex items-center justify-center rounded-full",
|
|
161
|
+
"transition-all duration-300 ease-out",
|
|
162
|
+
indicatorSizeClasses[size],
|
|
163
|
+
indicatorClasses[variant][status]
|
|
164
|
+
),
|
|
165
|
+
"aria-current": status === "active" ? "step" : void 0,
|
|
166
|
+
children: [
|
|
167
|
+
content,
|
|
168
|
+
status === "active" && /* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full animate-ping opacity-20 bg-primary" })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
var Stepper = forwardRef(function Stepper2({
|
|
174
|
+
steps,
|
|
175
|
+
currentStep: externalCurrentStep,
|
|
176
|
+
onChange,
|
|
177
|
+
variant = "default",
|
|
178
|
+
size = "md",
|
|
179
|
+
orientation = "horizontal",
|
|
180
|
+
clickable = false,
|
|
181
|
+
showContent = true,
|
|
182
|
+
className,
|
|
183
|
+
connectorClassName,
|
|
184
|
+
stepClassName,
|
|
185
|
+
...rest
|
|
186
|
+
}, ref) {
|
|
187
|
+
const [internalStep, setInternalStep] = useState(0);
|
|
188
|
+
const isControlled = externalCurrentStep !== void 0;
|
|
189
|
+
const currentStep = isControlled ? externalCurrentStep : internalStep;
|
|
190
|
+
const handleStepClick = (index, disabled) => {
|
|
191
|
+
if (!clickable || disabled) return;
|
|
192
|
+
if (!isControlled) setInternalStep(index);
|
|
193
|
+
onChange?.(index);
|
|
194
|
+
};
|
|
195
|
+
const isHorizontal = orientation === "horizontal";
|
|
196
|
+
const activeStep = steps[currentStep];
|
|
197
|
+
return /* @__PURE__ */ jsxs(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
ref,
|
|
201
|
+
className: cn("w-full", isHorizontal ? "flex flex-col gap-6" : "flex gap-6", className),
|
|
202
|
+
...rest,
|
|
203
|
+
children: [
|
|
204
|
+
isHorizontal ? (
|
|
205
|
+
/*
|
|
206
|
+
* HORIZONTAL layout
|
|
207
|
+
* The track is: [step] [connector] [step] [connector] [step]
|
|
208
|
+
* All siblings in one flex-row so the connector sits BETWEEN steps.
|
|
209
|
+
* Each step is flex-col (circle on top, label below).
|
|
210
|
+
* The connector uses mt-[X] to vertically center itself with the circle.
|
|
211
|
+
*/
|
|
212
|
+
/* @__PURE__ */ jsx("div", { role: "list", "aria-label": "Progress steps", className: "flex flex-row items-start w-full", children: steps.map((step, index) => {
|
|
213
|
+
const status = deriveStatus(index, currentStep, step.status);
|
|
214
|
+
const isLast = index === steps.length - 1;
|
|
215
|
+
const isClickable = clickable && !step.disabled;
|
|
216
|
+
return /* @__PURE__ */ jsxs(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
role: "listitem",
|
|
220
|
+
className: cn("flex flex-row items-start", isLast ? "shrink-0" : "flex-1"),
|
|
221
|
+
children: [
|
|
222
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center gap-2 shrink-0", stepClassName), children: [
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
"button",
|
|
225
|
+
{
|
|
226
|
+
type: "button",
|
|
227
|
+
onClick: () => {
|
|
228
|
+
handleStepClick(index, step.disabled);
|
|
229
|
+
},
|
|
230
|
+
disabled: !isClickable,
|
|
231
|
+
"aria-disabled": !isClickable || step.disabled,
|
|
232
|
+
className: cn(
|
|
233
|
+
"block focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 rounded-full",
|
|
234
|
+
isClickable ? "cursor-pointer hover:opacity-80 transition-opacity" : "cursor-default"
|
|
235
|
+
),
|
|
236
|
+
children: /* @__PURE__ */ jsx(
|
|
237
|
+
StepIndicator,
|
|
238
|
+
{
|
|
239
|
+
step,
|
|
240
|
+
index,
|
|
241
|
+
status,
|
|
242
|
+
variant,
|
|
243
|
+
size
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
}
|
|
247
|
+
),
|
|
248
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center max-w-[80px]", children: [
|
|
249
|
+
/* @__PURE__ */ jsx(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
className: cn(
|
|
253
|
+
"font-semibold leading-tight transition-colors duration-200",
|
|
254
|
+
labelSizeClasses[size],
|
|
255
|
+
status === "active" && "text-primary",
|
|
256
|
+
status === "completed" && "text-text",
|
|
257
|
+
status === "upcoming" && "text-text-muted",
|
|
258
|
+
status === "error" && "text-error"
|
|
259
|
+
),
|
|
260
|
+
children: step.label
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
step.description && /* @__PURE__ */ jsx(
|
|
264
|
+
"span",
|
|
265
|
+
{
|
|
266
|
+
className: cn(
|
|
267
|
+
"text-text-muted leading-tight mt-0.5",
|
|
268
|
+
descSizeClasses[size],
|
|
269
|
+
status === "active" && "text-text-secondary"
|
|
270
|
+
),
|
|
271
|
+
children: step.description
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] })
|
|
275
|
+
] }),
|
|
276
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
className: cn(
|
|
280
|
+
"flex-1 h-[2px] rounded-full transition-all duration-500",
|
|
281
|
+
connectorOffsetH[size],
|
|
282
|
+
connectorColorClass(status),
|
|
283
|
+
connectorClassName
|
|
284
|
+
),
|
|
285
|
+
"aria-hidden": "true"
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
step.id
|
|
291
|
+
);
|
|
292
|
+
}) })
|
|
293
|
+
) : (
|
|
294
|
+
/*
|
|
295
|
+
* VERTICAL layout
|
|
296
|
+
* Each step is: [circle | label]
|
|
297
|
+
* [vertical line]
|
|
298
|
+
* The line is a sibling BELOW the circle row, offset left to align under the circle center.
|
|
299
|
+
*/
|
|
300
|
+
/* @__PURE__ */ jsx("div", { role: "list", "aria-label": "Progress steps", className: "flex flex-col items-start", children: steps.map((step, index) => {
|
|
301
|
+
const status = deriveStatus(index, currentStep, step.status);
|
|
302
|
+
const isLast = index === steps.length - 1;
|
|
303
|
+
const isClickable = clickable && !step.disabled;
|
|
304
|
+
return /* @__PURE__ */ jsxs("div", { role: "listitem", className: cn("flex flex-col", stepClassName), children: [
|
|
305
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-row items-start gap-3", children: [
|
|
306
|
+
/* @__PURE__ */ jsx(
|
|
307
|
+
"button",
|
|
308
|
+
{
|
|
309
|
+
type: "button",
|
|
310
|
+
onClick: () => {
|
|
311
|
+
handleStepClick(index, step.disabled);
|
|
312
|
+
},
|
|
313
|
+
disabled: !isClickable,
|
|
314
|
+
"aria-disabled": !isClickable || step.disabled,
|
|
315
|
+
className: cn(
|
|
316
|
+
"block shrink-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 rounded-full",
|
|
317
|
+
isClickable ? "cursor-pointer hover:opacity-80 transition-opacity" : "cursor-default"
|
|
318
|
+
),
|
|
319
|
+
children: /* @__PURE__ */ jsx(
|
|
320
|
+
StepIndicator,
|
|
321
|
+
{
|
|
322
|
+
step,
|
|
323
|
+
index,
|
|
324
|
+
status,
|
|
325
|
+
variant,
|
|
326
|
+
size
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start pt-1", children: [
|
|
332
|
+
/* @__PURE__ */ jsx(
|
|
333
|
+
"span",
|
|
334
|
+
{
|
|
335
|
+
className: cn(
|
|
336
|
+
"font-semibold leading-tight transition-colors duration-200",
|
|
337
|
+
labelSizeClasses[size],
|
|
338
|
+
status === "active" && "text-primary",
|
|
339
|
+
status === "completed" && "text-text",
|
|
340
|
+
status === "upcoming" && "text-text-muted",
|
|
341
|
+
status === "error" && "text-error"
|
|
342
|
+
),
|
|
343
|
+
children: step.label
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
step.description && /* @__PURE__ */ jsx(
|
|
347
|
+
"span",
|
|
348
|
+
{
|
|
349
|
+
className: cn(
|
|
350
|
+
"text-text-muted leading-tight mt-0.5",
|
|
351
|
+
descSizeClasses[size],
|
|
352
|
+
status === "active" && "text-text-secondary"
|
|
353
|
+
),
|
|
354
|
+
children: step.description
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] })
|
|
358
|
+
] }),
|
|
359
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
360
|
+
"div",
|
|
361
|
+
{
|
|
362
|
+
className: cn(
|
|
363
|
+
"w-[2px] min-h-[28px] rounded-full transition-all duration-500 my-1",
|
|
364
|
+
connectorOffsetV[size],
|
|
365
|
+
connectorColorClass(status),
|
|
366
|
+
connectorClassName
|
|
367
|
+
),
|
|
368
|
+
"aria-hidden": "true"
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] }, step.id);
|
|
372
|
+
}) })
|
|
373
|
+
),
|
|
374
|
+
showContent && activeStep?.content && /* @__PURE__ */ jsx(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
role: "region",
|
|
378
|
+
"aria-live": "polite",
|
|
379
|
+
className: "w-full rounded-lg border border-border bg-surface p-5 shadow-sm",
|
|
380
|
+
children: activeStep.content
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
});
|
|
387
|
+
Stepper.displayName = "Stepper";
|
|
388
|
+
var sizeClasses = {
|
|
389
|
+
sm: {
|
|
390
|
+
track: "w-8 h-4",
|
|
391
|
+
thumb: "w-3 h-3 translate-x-0.5 peer-checked:translate-x-[1.125rem]"
|
|
392
|
+
},
|
|
393
|
+
md: {
|
|
394
|
+
track: "w-11 h-6",
|
|
395
|
+
thumb: "w-5 h-5 translate-x-0.5 peer-checked:translate-x-[1.375rem]"
|
|
396
|
+
},
|
|
397
|
+
lg: {
|
|
398
|
+
track: "w-14 h-8",
|
|
399
|
+
thumb: "w-7 h-7 translate-x-0.5 peer-checked:translate-x-[1.625rem]"
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
var stateClasses = {
|
|
403
|
+
default: "peer-checked:bg-primary",
|
|
404
|
+
error: "peer-checked:bg-error",
|
|
405
|
+
success: "peer-checked:bg-success",
|
|
406
|
+
warning: "peer-checked:bg-warning"
|
|
407
|
+
};
|
|
408
|
+
var Toggle = forwardRef(
|
|
409
|
+
({ className, size = "md", state = "default", label, helperText, errorText, disabled, ...props }, ref) => {
|
|
410
|
+
const { track: trackSize, thumb: thumbSize } = sizeClasses[size];
|
|
411
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [
|
|
412
|
+
/* @__PURE__ */ jsxs(
|
|
413
|
+
"label",
|
|
414
|
+
{
|
|
415
|
+
className: cn(
|
|
416
|
+
"relative inline-flex items-center cursor-pointer select-none",
|
|
417
|
+
disabled && "cursor-not-allowed"
|
|
418
|
+
),
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx(
|
|
421
|
+
"input",
|
|
422
|
+
{
|
|
423
|
+
type: "checkbox",
|
|
424
|
+
ref,
|
|
425
|
+
className: "sr-only peer",
|
|
426
|
+
disabled,
|
|
427
|
+
...props
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
/* @__PURE__ */ jsx(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
className: cn(
|
|
434
|
+
"rounded-full transition-colors duration-200 bg-border peer-focus:ring-2 peer-focus:ring-primary/20",
|
|
435
|
+
trackSize,
|
|
436
|
+
stateClasses[state],
|
|
437
|
+
disabled && "opacity-50"
|
|
438
|
+
)
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
/* @__PURE__ */ jsx(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
className: cn(
|
|
445
|
+
"absolute top-0.5 left-0 bg-white rounded-full transition-transform duration-200 shadow-sm",
|
|
446
|
+
thumbSize
|
|
447
|
+
)
|
|
448
|
+
}
|
|
449
|
+
),
|
|
450
|
+
label && /* @__PURE__ */ jsx("span", { className: cn("ml-3 text-sm font-medium text-text", disabled && "opacity-50"), children: label })
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
(errorText !== void 0 || helperText !== void 0) && /* @__PURE__ */ jsx("p", { className: cn("text-xs", errorText ? "text-error" : "text-text-muted"), children: errorText ?? helperText })
|
|
455
|
+
] });
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
Toggle.displayName = "Toggle";
|
|
459
|
+
var AccordionContext = createContext(void 0);
|
|
460
|
+
var AccordionItemIndexContext = createContext(void 0);
|
|
461
|
+
var AccordionItemContext = createContext(void 0);
|
|
462
|
+
var AccordionItem = ({
|
|
463
|
+
children,
|
|
464
|
+
className,
|
|
465
|
+
isOpen: controlledIsOpen,
|
|
466
|
+
onToggle,
|
|
467
|
+
disabled = false
|
|
468
|
+
}) => {
|
|
469
|
+
const groupContext = useContext(AccordionContext);
|
|
470
|
+
const index = useContext(AccordionItemIndexContext);
|
|
471
|
+
const [internalIsOpen, setInternalIsOpen] = useState(false);
|
|
472
|
+
const isGrouped = groupContext !== void 0 && index !== void 0;
|
|
473
|
+
const isOpen = controlledIsOpen ?? (isGrouped ? groupContext.openIndices.includes(index) : internalIsOpen);
|
|
474
|
+
const toggle = useCallback(() => {
|
|
475
|
+
if (disabled) return;
|
|
476
|
+
if (onToggle) {
|
|
477
|
+
onToggle();
|
|
478
|
+
} else if (isGrouped) {
|
|
479
|
+
groupContext.toggleIndex(index);
|
|
480
|
+
} else {
|
|
481
|
+
setInternalIsOpen((prev) => !prev);
|
|
482
|
+
}
|
|
483
|
+
}, [disabled, onToggle, isGrouped, groupContext, index]);
|
|
484
|
+
return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { isOpen, toggle, disabled }, children: /* @__PURE__ */ jsx(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
className: cn("border border-border rounded-lg overflow-hidden mb-2 last:mb-0", className),
|
|
488
|
+
children
|
|
489
|
+
}
|
|
490
|
+
) });
|
|
491
|
+
};
|
|
492
|
+
var AccordionTrigger = ({
|
|
493
|
+
children,
|
|
494
|
+
className,
|
|
495
|
+
hideChevron = false,
|
|
496
|
+
icon,
|
|
497
|
+
rightContent
|
|
498
|
+
}) => {
|
|
499
|
+
const itemContext = useContext(AccordionItemContext);
|
|
500
|
+
if (!itemContext) {
|
|
501
|
+
throw new Error("AccordionTrigger must be used within an AccordionItem");
|
|
502
|
+
}
|
|
503
|
+
const { isOpen, toggle, disabled } = itemContext;
|
|
504
|
+
return /* @__PURE__ */ jsxs(
|
|
505
|
+
"div",
|
|
506
|
+
{
|
|
507
|
+
className: cn(
|
|
508
|
+
"flex items-center justify-between bg-surface transition-colors",
|
|
509
|
+
!disabled && "hover:bg-interaction-hover",
|
|
510
|
+
isOpen && "border-b border-border",
|
|
511
|
+
className
|
|
512
|
+
),
|
|
513
|
+
children: [
|
|
514
|
+
/* @__PURE__ */ jsxs(
|
|
515
|
+
"button",
|
|
516
|
+
{
|
|
517
|
+
type: "button",
|
|
518
|
+
className: cn(
|
|
519
|
+
"flex flex-1 items-center gap-3 p-4 cursor-pointer select-none focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary/20 text-left",
|
|
520
|
+
disabled && "cursor-not-allowed opacity-50"
|
|
521
|
+
),
|
|
522
|
+
onClick: toggle,
|
|
523
|
+
disabled,
|
|
524
|
+
"aria-expanded": isOpen,
|
|
525
|
+
children: [
|
|
526
|
+
!hideChevron && (icon ?? /* @__PURE__ */ jsx(
|
|
527
|
+
ChevronDownIcon,
|
|
528
|
+
{
|
|
529
|
+
className: cn(
|
|
530
|
+
"w-5 h-5 transition-transform duration-200 text-text-muted",
|
|
531
|
+
isOpen && "rotate-180"
|
|
532
|
+
)
|
|
533
|
+
}
|
|
534
|
+
)),
|
|
535
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-text", children })
|
|
536
|
+
]
|
|
537
|
+
}
|
|
538
|
+
),
|
|
539
|
+
rightContent && /* @__PURE__ */ jsx(
|
|
540
|
+
"div",
|
|
541
|
+
{
|
|
542
|
+
className: "flex items-center p-4",
|
|
543
|
+
role: "presentation",
|
|
544
|
+
onClick: (e) => {
|
|
545
|
+
e.stopPropagation();
|
|
546
|
+
},
|
|
547
|
+
onKeyDown: (e) => {
|
|
548
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
549
|
+
e.stopPropagation();
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
children: rightContent
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
};
|
|
559
|
+
var AccordionContent = ({
|
|
560
|
+
children,
|
|
561
|
+
className
|
|
562
|
+
}) => {
|
|
563
|
+
const itemContext = useContext(AccordionItemContext);
|
|
564
|
+
if (!itemContext) {
|
|
565
|
+
throw new Error("AccordionContent must be used within an AccordionItem");
|
|
566
|
+
}
|
|
567
|
+
const { isOpen } = itemContext;
|
|
568
|
+
if (!isOpen) return null;
|
|
569
|
+
return /* @__PURE__ */ jsx(
|
|
570
|
+
"div",
|
|
571
|
+
{
|
|
572
|
+
className: cn(
|
|
573
|
+
"p-4 bg-surface animate-in fade-in slide-in-from-top-2 duration-200",
|
|
574
|
+
className
|
|
575
|
+
),
|
|
576
|
+
children
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
};
|
|
580
|
+
var Accordion = ({
|
|
581
|
+
children,
|
|
582
|
+
className,
|
|
583
|
+
allowMultiple = false,
|
|
584
|
+
defaultOpenIndices = []
|
|
585
|
+
}) => {
|
|
586
|
+
const [openIndices, setOpenIndices] = useState(defaultOpenIndices);
|
|
587
|
+
const toggleIndex = useCallback(
|
|
588
|
+
(index) => {
|
|
589
|
+
setOpenIndices((prev) => {
|
|
590
|
+
if (prev.includes(index)) {
|
|
591
|
+
return prev.filter((i) => i !== index);
|
|
592
|
+
}
|
|
593
|
+
return allowMultiple ? [...prev, index] : [index];
|
|
594
|
+
});
|
|
595
|
+
},
|
|
596
|
+
[allowMultiple]
|
|
597
|
+
);
|
|
598
|
+
return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { openIndices, toggleIndex }, children: /* @__PURE__ */ jsx("div", { className: cn("w-full", className), children: Children.map(children, (child, index) => /* @__PURE__ */ jsx(AccordionItemIndexContext.Provider, { value: index, children: child }, index)) }) });
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Stepper, Toggle };
|