@bricks-toolkit/toolkit 0.1.0 → 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/{components/Button/Button.types.d.ts → Button.types-BsQYqZml.d.ts} +8 -5
- package/dist/Button.types-D-srlWFf.d.mts +27 -0
- package/dist/{components/TextInput/TextInput.types.d.ts → TextInput.types-DRI8HQza.d.mts} +8 -5
- package/dist/TextInput.types-DRI8HQza.d.ts +32 -0
- package/dist/{components/Tooltip/Tooltip.types.d.ts → Tooltip.types-PbUasE3C.d.mts} +9 -6
- package/dist/Tooltip.types-PbUasE3C.d.ts +36 -0
- package/dist/avatar/index.cjs +11 -0
- package/dist/{components/Avatar/Avatar.types.d.ts → avatar/index.d.mts} +10 -5
- package/dist/avatar/index.d.ts +29 -0
- package/dist/avatar/index.mjs +2 -0
- package/dist/badge/index.cjs +11 -0
- package/dist/{components/Badge/Badge.types.d.ts → badge/index.d.mts} +20 -6
- package/dist/badge/index.d.ts +57 -0
- package/dist/badge/index.mjs +2 -0
- package/dist/breadcrumbs/index.cjs +11 -0
- package/dist/{components/Breadcrumbs/Breadcrumbs.types.d.ts → breadcrumbs/index.d.mts} +10 -5
- package/dist/breadcrumbs/index.d.ts +32 -0
- package/dist/breadcrumbs/index.mjs +2 -0
- package/dist/button/index.cjs +13 -0
- package/dist/button/index.d.mts +8 -0
- package/dist/button/index.d.ts +8 -0
- package/dist/button/index.mjs +4 -0
- package/dist/card/index.cjs +31 -0
- package/dist/card/index.d.mts +42 -0
- package/dist/card/index.d.ts +42 -0
- package/dist/card/index.mjs +2 -0
- package/dist/checkbox/index.cjs +11 -0
- package/dist/{components/Checkbox/Checkbox.types.d.ts → checkbox/index.d.mts} +9 -4
- package/dist/checkbox/index.d.ts +36 -0
- package/dist/checkbox/index.mjs +2 -0
- 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 -0
- package/dist/{components/ComboBox/ComboBox.types.d.ts → combo-box/index.d.mts} +10 -5
- package/dist/combo-box/index.d.ts +62 -0
- package/dist/combo-box/index.mjs +2 -0
- package/dist/date-picker/index.cjs +11 -0
- package/dist/date-picker/index.d.mts +32 -0
- package/dist/date-picker/index.d.ts +32 -0
- package/dist/date-picker/index.mjs +2 -0
- package/dist/dialog/index.cjs +27 -0
- package/dist/{components/Dialog/Dialog.types.d.ts → dialog/index.d.mts} +16 -7
- package/dist/dialog/index.d.ts +61 -0
- package/dist/dialog/index.mjs +2 -0
- package/dist/dropdown-menu/index.cjs +27 -0
- package/dist/dropdown-menu/index.d.mts +34 -0
- package/dist/dropdown-menu/index.d.ts +34 -0
- package/dist/dropdown-menu/index.mjs +2 -0
- package/dist/email/index.cjs +11 -0
- package/dist/{components/Email/Email.types.d.ts → email/index.d.mts} +10 -5
- package/dist/email/index.d.ts +38 -0
- package/dist/email/index.mjs +2 -0
- package/dist/file-upload/index.cjs +11 -0
- package/dist/file-upload/index.d.mts +27 -0
- package/dist/file-upload/index.d.ts +27 -0
- package/dist/file-upload/index.mjs +2 -0
- package/dist/header/index.cjs +14 -0
- package/dist/{components/Header/Header.types.d.ts → header/index.d.mts} +11 -2
- package/dist/header/index.d.ts +28 -0
- package/dist/header/index.mjs +5 -0
- package/dist/icon-button/index.cjs +13 -0
- package/dist/icon-button/index.d.mts +16 -0
- package/dist/icon-button/index.d.ts +16 -0
- package/dist/icon-button/index.mjs +4 -0
- package/dist/image/index.cjs +12 -0
- package/dist/{components/Image/Image.types.d.ts → image/index.d.mts} +10 -2
- package/dist/image/index.d.ts +48 -0
- package/dist/image/index.mjs +3 -0
- package/dist/index.cjs +839 -0
- package/dist/index.d.mts +141 -0
- package/dist/index.d.ts +141 -75
- package/dist/index.mjs +601 -0
- package/dist/link/index.cjs +11 -0
- package/dist/{components/Link/Link.types.d.ts → link/index.d.mts} +10 -5
- package/dist/link/index.d.ts +25 -0
- package/dist/link/index.mjs +2 -0
- package/dist/loader/index.cjs +11 -0
- package/dist/{components/Loader/Loader.types.d.ts → loader/index.d.mts} +8 -4
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.mjs +2 -0
- package/dist/modal/index.cjs +27 -0
- package/dist/{components/Modal/Modal.types.d.ts → modal/index.d.mts} +25 -9
- package/dist/modal/index.d.ts +116 -0
- package/dist/modal/index.mjs +2 -0
- package/dist/multi-select/index.cjs +11 -0
- package/dist/{components/MultiSelect/MultiSelect.types.d.ts → multi-select/index.d.mts} +9 -5
- package/dist/multi-select/index.d.ts +59 -0
- package/dist/multi-select/index.mjs +2 -0
- package/dist/otp-input/index.cjs +11 -0
- package/dist/{components/OtpInput/OtpInput.types.d.ts → otp-input/index.d.mts} +8 -4
- package/dist/otp-input/index.d.ts +57 -0
- package/dist/otp-input/index.mjs +2 -0
- package/dist/password-input/index.cjs +11 -0
- package/dist/password-input/index.d.mts +32 -0
- package/dist/password-input/index.d.ts +32 -0
- package/dist/password-input/index.mjs +2 -0
- package/dist/phone/index.cjs +11 -0
- package/dist/{components/Phone/Phone.types.d.ts → phone/index.d.mts} +11 -6
- package/dist/phone/index.d.ts +41 -0
- package/dist/phone/index.mjs +2 -0
- package/dist/radio-button/index.cjs +11 -0
- package/dist/{components/RadioButton/RadioButton.types.d.ts → radio-button/index.d.mts} +9 -4
- package/dist/radio-button/index.d.ts +56 -0
- package/dist/radio-button/index.mjs +2 -0
- package/dist/search-input/index.cjs +12 -0
- package/dist/search-input/index.d.mts +22 -0
- package/dist/search-input/index.d.ts +22 -0
- package/dist/search-input/index.mjs +3 -0
- package/dist/select/index.cjs +11 -0
- package/dist/{components/Select/Select.types.d.ts → select/index.d.mts} +11 -6
- package/dist/select/index.d.ts +36 -0
- package/dist/select/index.mjs +2 -0
- package/dist/sidebar/index.cjs +11 -0
- package/dist/{components/Sidebar/Sidebar.types.d.ts → sidebar/index.d.mts} +15 -6
- package/dist/sidebar/index.d.ts +96 -0
- package/dist/sidebar/index.mjs +2 -0
- package/dist/skeleton/index.cjs +27 -0
- package/dist/skeleton/index.d.mts +76 -0
- package/dist/skeleton/index.d.ts +76 -0
- package/dist/skeleton/index.mjs +2 -0
- package/dist/styles.css +5075 -0
- package/dist/styles.d.mts +2 -0
- package/dist/styles.d.ts +2 -0
- package/dist/table/index.cjs +15 -0
- package/dist/{components/Table/Table.types.d.ts → table/index.d.mts} +16 -9
- package/dist/table/index.d.ts +92 -0
- package/dist/table/index.mjs +2 -0
- package/dist/tabs/index.cjs +14 -0
- package/dist/tabs/index.d.mts +26 -0
- package/dist/tabs/index.d.ts +26 -0
- package/dist/tabs/index.mjs +5 -0
- package/dist/text-input/index.cjs +11 -0
- package/dist/text-input/index.d.mts +7 -0
- package/dist/text-input/index.d.ts +7 -0
- package/dist/text-input/index.mjs +2 -0
- package/dist/theme-provider/index.cjs +14 -0
- package/dist/{components/ThemeProvider/ThemeProvider.types.d.ts → theme-provider/index.d.mts} +16 -6
- package/dist/theme-provider/index.d.ts +122 -0
- package/dist/theme-provider/index.mjs +1 -0
- package/dist/time-picker/index.cjs +11 -0
- package/dist/time-picker/index.d.mts +32 -0
- package/dist/time-picker/index.d.ts +32 -0
- package/dist/time-picker/index.mjs +2 -0
- package/dist/toaster/index.cjs +11 -0
- package/dist/{components/Toaster/Toaster.types.d.ts → toaster/index.d.mts} +9 -4
- package/dist/toaster/index.d.ts +28 -0
- package/dist/toaster/index.mjs +2 -0
- package/dist/tooltip/index.cjs +12 -0
- package/dist/tooltip/index.d.mts +7 -0
- package/dist/tooltip/index.d.ts +7 -0
- package/dist/tooltip/index.mjs +3 -0
- package/package.json +78 -95
- 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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
ADDED
|
@@ -0,0 +1,601 @@
|
|
|
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 };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type LinkVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
4
|
+
type LinkSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type LinkUnderline = 'always' | 'hover' | 'none';
|
|
6
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
6
7
|
/** The styling variant of the link */
|
|
7
8
|
variant?: LinkVariant;
|
|
8
9
|
/** The text size of the link */
|
|
@@ -18,3 +19,7 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
18
19
|
/** An optional icon element to display after the text */
|
|
19
20
|
rightIcon?: ReactNode;
|
|
20
21
|
}
|
|
22
|
+
|
|
23
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
|
|
25
|
+
export { Link, type LinkProps, type LinkSize, type LinkUnderline, type LinkVariant };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type LinkVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
4
|
+
type LinkSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
type LinkUnderline = 'always' | 'hover' | 'none';
|
|
6
|
+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
7
|
+
/** The styling variant of the link */
|
|
8
|
+
variant?: LinkVariant;
|
|
9
|
+
/** The text size of the link */
|
|
10
|
+
size?: LinkSize;
|
|
11
|
+
/** Controls when the underline decoration is visible */
|
|
12
|
+
underline?: LinkUnderline;
|
|
13
|
+
/** If true, natively configures target="_blank" and secure rel attributes */
|
|
14
|
+
isExternal?: boolean;
|
|
15
|
+
/** Disables the link securely (removes pointer events and sets aria-disabled) */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** An optional icon element to display before the text */
|
|
18
|
+
leftIcon?: ReactNode;
|
|
19
|
+
/** An optional icon element to display after the text */
|
|
20
|
+
rightIcon?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
24
|
+
|
|
25
|
+
export { Link, type LinkProps, type LinkSize, type LinkUnderline, type LinkVariant };
|