@tomo-inc/tomo-ui 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1069 -0
- package/dist/index.js +976 -0
- package/dist/tailwind/plugin.cjs +67 -0
- package/dist/tailwind/plugin.js +42 -0
- package/dist/theme/animations/index.d.mts +105 -0
- package/dist/theme/animations/index.d.ts +105 -0
- package/dist/theme/animations/index.js +133 -0
- package/dist/theme/animations/index.mjs +6 -0
- package/dist/theme/chunk-3HDE5SVQ.mjs +241 -0
- package/dist/theme/chunk-3K3T5W6T.mjs +210 -0
- package/dist/theme/chunk-3LKKH4AR.mjs +17 -0
- package/dist/theme/chunk-5UIRR2JQ.mjs +31 -0
- package/dist/theme/chunk-63DOJZ5V.mjs +108 -0
- package/dist/theme/chunk-6JJPIEK7.mjs +28 -0
- package/dist/theme/chunk-6N2H53XF.mjs +42 -0
- package/dist/theme/chunk-6PXDSEN7.mjs +418 -0
- package/dist/theme/chunk-7ZMFUXZH.mjs +229 -0
- package/dist/theme/chunk-A2K7D7MR.mjs +446 -0
- package/dist/theme/chunk-BSQAJJ3Q.mjs +164 -0
- package/dist/theme/chunk-CAM646RT.mjs +491 -0
- package/dist/theme/chunk-CR75Q2EZ.mjs +218 -0
- package/dist/theme/chunk-CT4RPJWF.mjs +17 -0
- package/dist/theme/chunk-CWYZ2GEH.mjs +0 -0
- package/dist/theme/chunk-D2DWF4OD.mjs +195 -0
- package/dist/theme/chunk-D2FF7S3A.mjs +188 -0
- package/dist/theme/chunk-D2XMP2NC.mjs +6 -0
- package/dist/theme/chunk-DCEG5LGX.mjs +17 -0
- package/dist/theme/chunk-DJLZADVO.mjs +33 -0
- package/dist/theme/chunk-DOGZ47O4.mjs +15 -0
- package/dist/theme/chunk-DWPAOIB3.mjs +341 -0
- package/dist/theme/chunk-FCBE5KQW.mjs +388 -0
- package/dist/theme/chunk-FNXKWQV3.mjs +247 -0
- package/dist/theme/chunk-G4RCK475.mjs +155 -0
- package/dist/theme/chunk-GCJZQJCJ.mjs +426 -0
- package/dist/theme/chunk-GHZ36ATJ.mjs +17 -0
- package/dist/theme/chunk-GQT3YUX3.mjs +77 -0
- package/dist/theme/chunk-GSRZWDGA.mjs +62 -0
- package/dist/theme/chunk-HN25UZIQ.mjs +372 -0
- package/dist/theme/chunk-HSSYMEQU.mjs +178 -0
- package/dist/theme/chunk-HUBDRSA4.mjs +49 -0
- package/dist/theme/chunk-IAS3SFA4.mjs +42 -0
- package/dist/theme/chunk-JGY6VQQQ.mjs +87 -0
- package/dist/theme/chunk-JUEOCLA3.mjs +17 -0
- package/dist/theme/chunk-KGFOLKLU.mjs +157 -0
- package/dist/theme/chunk-KUNVFLXJ.mjs +41 -0
- package/dist/theme/chunk-KUROSFJE.mjs +12 -0
- package/dist/theme/chunk-KXPLHLA6.mjs +109 -0
- package/dist/theme/chunk-L2OL7R23.mjs +17 -0
- package/dist/theme/chunk-M63AFAHO.mjs +0 -0
- package/dist/theme/chunk-MPVWW3DX.mjs +30 -0
- package/dist/theme/chunk-NY7ORCUI.mjs +36 -0
- package/dist/theme/chunk-O5X46N53.mjs +21 -0
- package/dist/theme/chunk-OA5N2ZUW.mjs +385 -0
- package/dist/theme/chunk-OR5PUD24.mjs +17 -0
- package/dist/theme/chunk-OZTMQS2F.mjs +496 -0
- package/dist/theme/chunk-PI7LN7ID.mjs +449 -0
- package/dist/theme/chunk-PLHTHAXH.mjs +63 -0
- package/dist/theme/chunk-POSTVCTR.mjs +18 -0
- package/dist/theme/chunk-QPMYACSN.mjs +140 -0
- package/dist/theme/chunk-QZTWGJ72.mjs +16 -0
- package/dist/theme/chunk-R2M62V4J.mjs +417 -0
- package/dist/theme/chunk-RUIUXVZ4.mjs +26 -0
- package/dist/theme/chunk-S4SSZHUU.mjs +60 -0
- package/dist/theme/chunk-SBOMX3YT.mjs +21 -0
- package/dist/theme/chunk-SCJBZBCG.mjs +308 -0
- package/dist/theme/chunk-SJ6TR3DD.mjs +0 -0
- package/dist/theme/chunk-SJT6KBYE.mjs +62 -0
- package/dist/theme/chunk-SZIFQ3NN.mjs +288 -0
- package/dist/theme/chunk-T3GWIVAM.mjs +17 -0
- package/dist/theme/chunk-TFDLNKJZ.mjs +891 -0
- package/dist/theme/chunk-TX3FPB7D.mjs +28 -0
- package/dist/theme/chunk-UFVD3L5A.mjs +33 -0
- package/dist/theme/chunk-UQQ5KWB7.mjs +844 -0
- package/dist/theme/chunk-US4SNHVL.mjs +12 -0
- package/dist/theme/chunk-USYXK6WO.mjs +852 -0
- package/dist/theme/chunk-WBQAMGXK.mjs +0 -0
- package/dist/theme/chunk-WH6SPIFG.mjs +30 -0
- package/dist/theme/chunk-WQEDQHKX.mjs +0 -0
- package/dist/theme/chunk-WY2VNUPE.mjs +98 -0
- package/dist/theme/chunk-XRG7KRVS.mjs +310 -0
- package/dist/theme/chunk-YJLQTC7L.mjs +0 -0
- package/dist/theme/chunk-YOGOMZU6.mjs +465 -0
- package/dist/theme/chunk-YZFP7WEH.mjs +193 -0
- package/dist/theme/chunk-YZXRWBZX.mjs +24 -0
- package/dist/theme/chunk-YZYGFPNK.mjs +17 -0
- package/dist/theme/chunk-ZQGNWTBN.mjs +450 -0
- package/dist/theme/colors/blue.d.mts +14 -0
- package/dist/theme/colors/blue.d.ts +14 -0
- package/dist/theme/colors/blue.js +41 -0
- package/dist/theme/colors/blue.mjs +6 -0
- package/dist/theme/colors/common.d.mts +103 -0
- package/dist/theme/colors/common.d.ts +103 -0
- package/dist/theme/colors/common.js +155 -0
- package/dist/theme/colors/common.mjs +14 -0
- package/dist/theme/colors/cyan.d.mts +14 -0
- package/dist/theme/colors/cyan.d.ts +14 -0
- package/dist/theme/colors/cyan.js +41 -0
- package/dist/theme/colors/cyan.mjs +6 -0
- package/dist/theme/colors/green.d.mts +14 -0
- package/dist/theme/colors/green.d.ts +14 -0
- package/dist/theme/colors/green.js +41 -0
- package/dist/theme/colors/green.mjs +6 -0
- package/dist/theme/colors/index.d.mts +109 -0
- package/dist/theme/colors/index.d.ts +109 -0
- package/dist/theme/colors/index.js +339 -0
- package/dist/theme/colors/index.mjs +24 -0
- package/dist/theme/colors/pink.d.mts +14 -0
- package/dist/theme/colors/pink.d.ts +14 -0
- package/dist/theme/colors/pink.js +41 -0
- package/dist/theme/colors/pink.mjs +6 -0
- package/dist/theme/colors/purple.d.mts +14 -0
- package/dist/theme/colors/purple.d.ts +14 -0
- package/dist/theme/colors/purple.js +41 -0
- package/dist/theme/colors/purple.mjs +6 -0
- package/dist/theme/colors/red.d.mts +14 -0
- package/dist/theme/colors/red.d.ts +14 -0
- package/dist/theme/colors/red.js +41 -0
- package/dist/theme/colors/red.mjs +6 -0
- package/dist/theme/colors/semantic.d.mts +10 -0
- package/dist/theme/colors/semantic.d.ts +10 -0
- package/dist/theme/colors/semantic.js +331 -0
- package/dist/theme/colors/semantic.mjs +20 -0
- package/dist/theme/colors/types.d.mts +39 -0
- package/dist/theme/colors/types.d.ts +39 -0
- package/dist/theme/colors/types.js +18 -0
- package/dist/theme/colors/types.mjs +1 -0
- package/dist/theme/colors/yellow.d.mts +14 -0
- package/dist/theme/colors/yellow.d.ts +14 -0
- package/dist/theme/colors/yellow.js +41 -0
- package/dist/theme/colors/yellow.mjs +6 -0
- package/dist/theme/colors/zinc.d.mts +14 -0
- package/dist/theme/colors/zinc.d.ts +14 -0
- package/dist/theme/colors/zinc.js +41 -0
- package/dist/theme/colors/zinc.mjs +6 -0
- package/dist/theme/colors.d.mts +4 -0
- package/dist/theme/colors.d.ts +4 -0
- package/dist/theme/colors.js +339 -0
- package/dist/theme/colors.mjs +25 -0
- package/dist/theme/components/accordion.d.mts +228 -0
- package/dist/theme/components/accordion.d.ts +228 -0
- package/dist/theme/components/accordion.js +334 -0
- package/dist/theme/components/accordion.mjs +21 -0
- package/dist/theme/components/alert.d.mts +211 -0
- package/dist/theme/components/alert.d.ts +211 -0
- package/dist/theme/components/alert.js +641 -0
- package/dist/theme/components/alert.mjs +19 -0
- package/dist/theme/components/autocomplete.d.mts +95 -0
- package/dist/theme/components/autocomplete.d.ts +95 -0
- package/dist/theme/components/autocomplete.js +292 -0
- package/dist/theme/components/autocomplete.mjs +14 -0
- package/dist/theme/components/avatar.d.mts +300 -0
- package/dist/theme/components/avatar.d.ts +300 -0
- package/dist/theme/components/avatar.js +508 -0
- package/dist/theme/components/avatar.mjs +21 -0
- package/dist/theme/components/badge.d.mts +223 -0
- package/dist/theme/components/badge.d.ts +223 -0
- package/dist/theme/components/badge.js +688 -0
- package/dist/theme/components/badge.mjs +19 -0
- package/dist/theme/components/breadcrumbs.d.mts +379 -0
- package/dist/theme/components/breadcrumbs.d.ts +379 -0
- package/dist/theme/components/breadcrumbs.js +481 -0
- package/dist/theme/components/breadcrumbs.mjs +21 -0
- package/dist/theme/components/button.d.mts +188 -0
- package/dist/theme/components/button.d.ts +188 -0
- package/dist/theme/components/button.js +766 -0
- package/dist/theme/components/button.mjs +21 -0
- package/dist/theme/components/calendar.d.mts +279 -0
- package/dist/theme/components/calendar.d.ts +279 -0
- package/dist/theme/components/calendar.js +679 -0
- package/dist/theme/components/calendar.mjs +19 -0
- package/dist/theme/components/card.d.mts +257 -0
- package/dist/theme/components/card.d.ts +257 -0
- package/dist/theme/components/card.js +392 -0
- package/dist/theme/components/card.mjs +19 -0
- package/dist/theme/components/checkbox.d.mts +375 -0
- package/dist/theme/components/checkbox.d.ts +375 -0
- package/dist/theme/components/checkbox.js +478 -0
- package/dist/theme/components/checkbox.mjs +21 -0
- package/dist/theme/components/chip.d.mts +340 -0
- package/dist/theme/components/chip.d.ts +340 -0
- package/dist/theme/components/chip.js +802 -0
- package/dist/theme/components/chip.mjs +19 -0
- package/dist/theme/components/code.d.mts +80 -0
- package/dist/theme/components/code.d.ts +80 -0
- package/dist/theme/components/code.js +342 -0
- package/dist/theme/components/code.mjs +19 -0
- package/dist/theme/components/date-input.d.mts +377 -0
- package/dist/theme/components/date-input.d.ts +377 -0
- package/dist/theme/components/date-input.js +694 -0
- package/dist/theme/components/date-input.mjs +14 -0
- package/dist/theme/components/date-picker.d.mts +220 -0
- package/dist/theme/components/date-picker.d.ts +220 -0
- package/dist/theme/components/date-picker.js +261 -0
- package/dist/theme/components/date-picker.mjs +16 -0
- package/dist/theme/components/divider.d.mts +31 -0
- package/dist/theme/components/divider.d.ts +31 -0
- package/dist/theme/components/divider.js +250 -0
- package/dist/theme/components/divider.mjs +14 -0
- package/dist/theme/components/drawer.d.mts +169 -0
- package/dist/theme/components/drawer.d.ts +169 -0
- package/dist/theme/components/drawer.js +291 -0
- package/dist/theme/components/drawer.mjs +14 -0
- package/dist/theme/components/drip.d.mts +13 -0
- package/dist/theme/components/drip.d.ts +13 -0
- package/dist/theme/components/drip.js +241 -0
- package/dist/theme/components/drip.mjs +14 -0
- package/dist/theme/components/dropdown.d.mts +247 -0
- package/dist/theme/components/dropdown.d.ts +247 -0
- package/dist/theme/components/dropdown.js +610 -0
- package/dist/theme/components/dropdown.mjs +25 -0
- package/dist/theme/components/form.d.mts +19 -0
- package/dist/theme/components/form.d.ts +19 -0
- package/dist/theme/components/form.js +241 -0
- package/dist/theme/components/form.mjs +14 -0
- package/dist/theme/components/image.d.mts +174 -0
- package/dist/theme/components/image.d.ts +174 -0
- package/dist/theme/components/image.js +369 -0
- package/dist/theme/components/image.mjs +14 -0
- package/dist/theme/components/index.d.mts +46 -0
- package/dist/theme/components/index.d.ts +46 -0
- package/dist/theme/components/index.js +11850 -0
- package/dist/theme/components/index.mjs +226 -0
- package/dist/theme/components/input-otp.d.mts +282 -0
- package/dist/theme/components/input-otp.d.ts +282 -0
- package/dist/theme/components/input-otp.js +684 -0
- package/dist/theme/components/input-otp.mjs +19 -0
- package/dist/theme/components/input.d.mts +458 -0
- package/dist/theme/components/input.d.ts +458 -0
- package/dist/theme/components/input.js +1133 -0
- package/dist/theme/components/input.mjs +19 -0
- package/dist/theme/components/kbd.d.mts +50 -0
- package/dist/theme/components/kbd.d.ts +50 -0
- package/dist/theme/components/kbd.js +262 -0
- package/dist/theme/components/kbd.mjs +14 -0
- package/dist/theme/components/link.d.mts +107 -0
- package/dist/theme/components/link.d.ts +107 -0
- package/dist/theme/components/link.js +344 -0
- package/dist/theme/components/link.mjs +21 -0
- package/dist/theme/components/listbox.d.mts +3 -0
- package/dist/theme/components/listbox.d.ts +3 -0
- package/dist/theme/components/listbox.js +728 -0
- package/dist/theme/components/listbox.mjs +24 -0
- package/dist/theme/components/menu.d.mts +324 -0
- package/dist/theme/components/menu.d.ts +324 -0
- package/dist/theme/components/menu.js +728 -0
- package/dist/theme/components/menu.mjs +23 -0
- package/dist/theme/components/modal.d.mts +380 -0
- package/dist/theme/components/modal.d.ts +380 -0
- package/dist/theme/components/modal.js +428 -0
- package/dist/theme/components/modal.mjs +19 -0
- package/dist/theme/components/navbar.d.mts +246 -0
- package/dist/theme/components/navbar.d.ts +246 -0
- package/dist/theme/components/navbar.js +445 -0
- package/dist/theme/components/navbar.mjs +19 -0
- package/dist/theme/components/number-input.d.mts +461 -0
- package/dist/theme/components/number-input.d.ts +461 -0
- package/dist/theme/components/number-input.js +1094 -0
- package/dist/theme/components/number-input.mjs +19 -0
- package/dist/theme/components/pagination.d.mts +282 -0
- package/dist/theme/components/pagination.d.ts +282 -0
- package/dist/theme/components/pagination.js +732 -0
- package/dist/theme/components/pagination.mjs +19 -0
- package/dist/theme/components/popover.d.mts +339 -0
- package/dist/theme/components/popover.d.ts +339 -0
- package/dist/theme/components/popover.js +494 -0
- package/dist/theme/components/popover.mjs +19 -0
- package/dist/theme/components/progress.d.mts +498 -0
- package/dist/theme/components/progress.d.ts +498 -0
- package/dist/theme/components/progress.js +471 -0
- package/dist/theme/components/progress.mjs +16 -0
- package/dist/theme/components/radio.d.mts +354 -0
- package/dist/theme/components/radio.d.ts +354 -0
- package/dist/theme/components/radio.js +424 -0
- package/dist/theme/components/radio.mjs +21 -0
- package/dist/theme/components/scroll-shadow.d.mts +45 -0
- package/dist/theme/components/scroll-shadow.d.ts +45 -0
- package/dist/theme/components/scroll-shadow.js +265 -0
- package/dist/theme/components/scroll-shadow.mjs +14 -0
- package/dist/theme/components/select.d.mts +515 -0
- package/dist/theme/components/select.d.ts +515 -0
- package/dist/theme/components/select.js +1077 -0
- package/dist/theme/components/select.mjs +19 -0
- package/dist/theme/components/skeleton.d.mts +60 -0
- package/dist/theme/components/skeleton.d.ts +60 -0
- package/dist/theme/components/skeleton.js +289 -0
- package/dist/theme/components/skeleton.mjs +14 -0
- package/dist/theme/components/slider.d.mts +482 -0
- package/dist/theme/components/slider.d.ts +482 -0
- package/dist/theme/components/slider.js +618 -0
- package/dist/theme/components/slider.mjs +19 -0
- package/dist/theme/components/snippet.d.mts +206 -0
- package/dist/theme/components/snippet.d.ts +206 -0
- package/dist/theme/components/snippet.js +610 -0
- package/dist/theme/components/snippet.mjs +19 -0
- package/dist/theme/components/spacer.d.mts +31 -0
- package/dist/theme/components/spacer.d.ts +31 -0
- package/dist/theme/components/spacer.js +250 -0
- package/dist/theme/components/spacer.mjs +14 -0
- package/dist/theme/components/spinner.d.mts +398 -0
- package/dist/theme/components/spinner.d.ts +398 -0
- package/dist/theme/components/spinner.js +537 -0
- package/dist/theme/components/spinner.mjs +14 -0
- package/dist/theme/components/table.d.mts +428 -0
- package/dist/theme/components/table.d.ts +428 -0
- package/dist/theme/components/table.js +521 -0
- package/dist/theme/components/table.mjs +19 -0
- package/dist/theme/components/tabs.d.mts +359 -0
- package/dist/theme/components/tabs.d.ts +359 -0
- package/dist/theme/components/tabs.js +724 -0
- package/dist/theme/components/tabs.mjs +19 -0
- package/dist/theme/components/toast.d.mts +329 -0
- package/dist/theme/components/toast.d.ts +329 -0
- package/dist/theme/components/toast.js +718 -0
- package/dist/theme/components/toast.mjs +21 -0
- package/dist/theme/components/toggle.d.mts +243 -0
- package/dist/theme/components/toggle.d.ts +243 -0
- package/dist/theme/components/toggle.js +437 -0
- package/dist/theme/components/toggle.mjs +19 -0
- package/dist/theme/components/user.d.mts +63 -0
- package/dist/theme/components/user.d.ts +63 -0
- package/dist/theme/components/user.js +259 -0
- package/dist/theme/components/user.mjs +19 -0
- package/dist/theme/default-layout.d.mts +8 -0
- package/dist/theme/default-layout.d.ts +8 -0
- package/dist/theme/default-layout.js +75 -0
- package/dist/theme/default-layout.mjs +10 -0
- package/dist/theme/index.d.mts +62 -0
- package/dist/theme/index.d.ts +62 -0
- package/dist/theme/index.js +12601 -0
- package/dist/theme/index.mjs +300 -0
- package/dist/theme/plugin.d.mts +12 -0
- package/dist/theme/plugin.d.ts +12 -0
- package/dist/theme/plugin.js +866 -0
- package/dist/theme/plugin.mjs +30 -0
- package/dist/theme/types.d.mts +138 -0
- package/dist/theme/types.d.ts +138 -0
- package/dist/theme/types.js +18 -0
- package/dist/theme/types.mjs +1 -0
- package/dist/theme/utilities/animation.d.mts +15 -0
- package/dist/theme/utilities/animation.d.ts +15 -0
- package/dist/theme/utilities/animation.js +38 -0
- package/dist/theme/utilities/animation.mjs +6 -0
- package/dist/theme/utilities/custom.d.mts +27 -0
- package/dist/theme/utilities/custom.d.ts +27 -0
- package/dist/theme/utilities/custom.js +50 -0
- package/dist/theme/utilities/custom.mjs +6 -0
- package/dist/theme/utilities/index.d.mts +114 -0
- package/dist/theme/utilities/index.d.ts +114 -0
- package/dist/theme/utilities/index.js +188 -0
- package/dist/theme/utilities/index.mjs +11 -0
- package/dist/theme/utilities/scrollbar-hide.d.mts +24 -0
- package/dist/theme/utilities/scrollbar-hide.d.ts +24 -0
- package/dist/theme/utilities/scrollbar-hide.js +50 -0
- package/dist/theme/utilities/scrollbar-hide.mjs +6 -0
- package/dist/theme/utilities/text.d.mts +23 -0
- package/dist/theme/utilities/text.d.ts +23 -0
- package/dist/theme/utilities/text.js +46 -0
- package/dist/theme/utilities/text.mjs +6 -0
- package/dist/theme/utilities/transition.d.mts +58 -0
- package/dist/theme/utilities/transition.d.ts +58 -0
- package/dist/theme/utilities/transition.js +86 -0
- package/dist/theme/utilities/transition.mjs +8 -0
- package/dist/theme/utils/classes.d.mts +35 -0
- package/dist/theme/utils/classes.d.ts +35 -0
- package/dist/theme/utils/classes.js +119 -0
- package/dist/theme/utils/classes.mjs +22 -0
- package/dist/theme/utils/cn.d.mts +5 -0
- package/dist/theme/utils/cn.d.ts +5 -0
- package/dist/theme/utils/cn.js +231 -0
- package/dist/theme/utils/cn.mjs +13 -0
- package/dist/theme/utils/index.d.mts +8 -0
- package/dist/theme/utils/index.d.ts +8 -0
- package/dist/theme/utils/index.js +421 -0
- package/dist/theme/utils/index.mjs +47 -0
- package/dist/theme/utils/merge-classes.d.mts +12 -0
- package/dist/theme/utils/merge-classes.d.ts +12 -0
- package/dist/theme/utils/merge-classes.js +41 -0
- package/dist/theme/utils/merge-classes.mjs +6 -0
- package/dist/theme/utils/object.d.mts +12 -0
- package/dist/theme/utils/object.d.ts +12 -0
- package/dist/theme/utils/object.js +77 -0
- package/dist/theme/utils/object.mjs +10 -0
- package/dist/theme/utils/theme.d.mts +9 -0
- package/dist/theme/utils/theme.d.ts +9 -0
- package/dist/theme/utils/theme.js +30 -0
- package/dist/theme/utils/theme.mjs +6 -0
- package/dist/theme/utils/tv.d.mts +5 -0
- package/dist/theme/utils/tv.d.ts +5 -0
- package/dist/theme/utils/tv.js +234 -0
- package/dist/theme/utils/tv.mjs +13 -0
- package/dist/theme/utils/tw-merge-config.d.mts +25 -0
- package/dist/theme/utils/tw-merge-config.d.ts +25 -0
- package/dist/theme/utils/tw-merge-config.js +215 -0
- package/dist/theme/utils/tw-merge-config.mjs +14 -0
- package/dist/theme/utils/types.d.mts +10 -0
- package/dist/theme/utils/types.d.ts +10 -0
- package/dist/theme/utils/types.js +18 -0
- package/dist/theme/utils/types.mjs +0 -0
- package/dist/theme/utils/variants.d.mts +67 -0
- package/dist/theme/utils/variants.d.ts +67 -0
- package/dist/theme/utils/variants.js +101 -0
- package/dist/theme/utils/variants.mjs +6 -0
- package/package.json +3 -3
- package/project.json +15 -8
- package/scripts/copy-heroui-theme.mjs +26 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorVariants
|
|
3
|
+
} from "./chunk-GQT3YUX3.mjs";
|
|
4
|
+
import {
|
|
5
|
+
tv
|
|
6
|
+
} from "./chunk-TX3FPB7D.mjs";
|
|
7
|
+
import {
|
|
8
|
+
dataFocusVisibleClasses
|
|
9
|
+
} from "./chunk-JGY6VQQQ.mjs";
|
|
10
|
+
|
|
11
|
+
// src/components/tabs.ts
|
|
12
|
+
var tabs = tv({
|
|
13
|
+
slots: {
|
|
14
|
+
base: "inline-flex",
|
|
15
|
+
tabList: [
|
|
16
|
+
"relative",
|
|
17
|
+
"flex",
|
|
18
|
+
"p-1",
|
|
19
|
+
"h-fit",
|
|
20
|
+
"gap-2",
|
|
21
|
+
"items-center",
|
|
22
|
+
"flex-nowrap",
|
|
23
|
+
"overflow-x-scroll",
|
|
24
|
+
"scrollbar-hide",
|
|
25
|
+
"bg-default-100"
|
|
26
|
+
],
|
|
27
|
+
tab: [
|
|
28
|
+
"z-0",
|
|
29
|
+
"w-full",
|
|
30
|
+
"px-3",
|
|
31
|
+
"py-1",
|
|
32
|
+
"flex",
|
|
33
|
+
"group",
|
|
34
|
+
"relative",
|
|
35
|
+
"justify-center",
|
|
36
|
+
"items-center",
|
|
37
|
+
"outline-solid outline-transparent",
|
|
38
|
+
"cursor-pointer",
|
|
39
|
+
"transition-opacity",
|
|
40
|
+
"tap-highlight-transparent",
|
|
41
|
+
"data-[disabled=true]:cursor-not-allowed",
|
|
42
|
+
"data-[disabled=true]:opacity-30",
|
|
43
|
+
"data-[hover-unselected=true]:opacity-disabled",
|
|
44
|
+
// focus ring
|
|
45
|
+
...dataFocusVisibleClasses
|
|
46
|
+
],
|
|
47
|
+
tabContent: [
|
|
48
|
+
"relative",
|
|
49
|
+
"z-10",
|
|
50
|
+
"text-inherit",
|
|
51
|
+
"whitespace-nowrap",
|
|
52
|
+
"transition-colors",
|
|
53
|
+
"text-default-500",
|
|
54
|
+
"group-data-[selected=true]:text-foreground"
|
|
55
|
+
],
|
|
56
|
+
cursor: [
|
|
57
|
+
"absolute",
|
|
58
|
+
"z-0",
|
|
59
|
+
"bg-white",
|
|
60
|
+
"will-change-[transform,width,height]",
|
|
61
|
+
"transition-[left,top,width,height]",
|
|
62
|
+
"duration-250",
|
|
63
|
+
"ease-out"
|
|
64
|
+
],
|
|
65
|
+
panel: [
|
|
66
|
+
"py-3",
|
|
67
|
+
"px-1",
|
|
68
|
+
"outline-solid outline-transparent",
|
|
69
|
+
"data-[inert=true]:hidden",
|
|
70
|
+
// focus ring
|
|
71
|
+
...dataFocusVisibleClasses
|
|
72
|
+
],
|
|
73
|
+
tabWrapper: []
|
|
74
|
+
},
|
|
75
|
+
variants: {
|
|
76
|
+
variant: {
|
|
77
|
+
solid: {
|
|
78
|
+
cursor: "inset-0"
|
|
79
|
+
},
|
|
80
|
+
light: {
|
|
81
|
+
tabList: "bg-transparent dark:bg-transparent",
|
|
82
|
+
cursor: "inset-0"
|
|
83
|
+
},
|
|
84
|
+
underlined: {
|
|
85
|
+
tabList: "bg-transparent dark:bg-transparent",
|
|
86
|
+
cursor: "h-[2px] w-[80%] bottom-0 shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]"
|
|
87
|
+
},
|
|
88
|
+
bordered: {
|
|
89
|
+
tabList: "bg-transparent dark:bg-transparent border-medium border-default-200 shadow-xs",
|
|
90
|
+
cursor: "inset-0"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
color: {
|
|
94
|
+
default: {},
|
|
95
|
+
primary: {},
|
|
96
|
+
secondary: {},
|
|
97
|
+
success: {},
|
|
98
|
+
warning: {},
|
|
99
|
+
danger: {}
|
|
100
|
+
},
|
|
101
|
+
size: {
|
|
102
|
+
sm: {
|
|
103
|
+
tabList: "rounded-medium",
|
|
104
|
+
tab: "h-7 text-tiny rounded-small",
|
|
105
|
+
cursor: "rounded-small"
|
|
106
|
+
},
|
|
107
|
+
md: {
|
|
108
|
+
tabList: "rounded-medium",
|
|
109
|
+
tab: "h-8 text-small rounded-small",
|
|
110
|
+
cursor: "rounded-small"
|
|
111
|
+
},
|
|
112
|
+
lg: {
|
|
113
|
+
tabList: "rounded-large",
|
|
114
|
+
tab: "h-9 text-medium rounded-medium",
|
|
115
|
+
cursor: "rounded-medium"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
radius: {
|
|
119
|
+
none: {
|
|
120
|
+
tabList: "rounded-none",
|
|
121
|
+
tab: "rounded-none",
|
|
122
|
+
cursor: "rounded-none"
|
|
123
|
+
},
|
|
124
|
+
sm: {
|
|
125
|
+
tabList: "rounded-medium",
|
|
126
|
+
tab: "rounded-small",
|
|
127
|
+
cursor: "rounded-small"
|
|
128
|
+
},
|
|
129
|
+
md: {
|
|
130
|
+
tabList: "rounded-medium",
|
|
131
|
+
tab: "rounded-small",
|
|
132
|
+
cursor: "rounded-small"
|
|
133
|
+
},
|
|
134
|
+
lg: {
|
|
135
|
+
tabList: "rounded-large",
|
|
136
|
+
tab: "rounded-medium",
|
|
137
|
+
cursor: "rounded-medium"
|
|
138
|
+
},
|
|
139
|
+
full: {
|
|
140
|
+
tabList: "rounded-full",
|
|
141
|
+
tab: "rounded-full",
|
|
142
|
+
cursor: "rounded-full"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
fullWidth: {
|
|
146
|
+
true: {
|
|
147
|
+
base: "w-full",
|
|
148
|
+
tabList: "w-full"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
isDisabled: {
|
|
152
|
+
true: {
|
|
153
|
+
tabList: "opacity-disabled pointer-events-none"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
disableAnimation: {
|
|
157
|
+
true: {
|
|
158
|
+
tab: "transition-none",
|
|
159
|
+
tabContent: "transition-none"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
placement: {
|
|
163
|
+
top: {},
|
|
164
|
+
start: {
|
|
165
|
+
tabList: "flex-col",
|
|
166
|
+
panel: "py-0 px-3",
|
|
167
|
+
tabWrapper: "flex"
|
|
168
|
+
},
|
|
169
|
+
end: {
|
|
170
|
+
tabList: "flex-col",
|
|
171
|
+
panel: "py-0 px-3",
|
|
172
|
+
tabWrapper: "flex flex-row-reverse"
|
|
173
|
+
},
|
|
174
|
+
bottom: {
|
|
175
|
+
tabWrapper: "flex flex-col-reverse"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
defaultVariants: {
|
|
180
|
+
color: "default",
|
|
181
|
+
variant: "solid",
|
|
182
|
+
size: "md",
|
|
183
|
+
fullWidth: false,
|
|
184
|
+
isDisabled: false
|
|
185
|
+
},
|
|
186
|
+
compoundVariants: [
|
|
187
|
+
/**
|
|
188
|
+
* Variants & Colors
|
|
189
|
+
*/
|
|
190
|
+
// solid + bordered + light && color
|
|
191
|
+
{
|
|
192
|
+
variant: ["solid", "bordered", "light"],
|
|
193
|
+
color: "default",
|
|
194
|
+
class: {
|
|
195
|
+
cursor: ["bg-background", "dark:bg-default", "shadow-small"],
|
|
196
|
+
tabContent: "group-data-[selected=true]:text-default-foreground"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
variant: ["solid", "bordered", "light"],
|
|
201
|
+
color: "primary",
|
|
202
|
+
class: {
|
|
203
|
+
cursor: colorVariants.solid.primary,
|
|
204
|
+
tabContent: "group-data-[selected=true]:text-primary-foreground"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
variant: ["solid", "bordered", "light"],
|
|
209
|
+
color: "secondary",
|
|
210
|
+
class: {
|
|
211
|
+
cursor: colorVariants.solid.secondary,
|
|
212
|
+
tabContent: "group-data-[selected=true]:text-secondary-foreground"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
variant: ["solid", "bordered", "light"],
|
|
217
|
+
color: "success",
|
|
218
|
+
class: {
|
|
219
|
+
cursor: colorVariants.solid.success,
|
|
220
|
+
tabContent: "group-data-[selected=true]:text-success-foreground"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
variant: ["solid", "bordered", "light"],
|
|
225
|
+
color: "warning",
|
|
226
|
+
class: {
|
|
227
|
+
cursor: colorVariants.solid.warning,
|
|
228
|
+
tabContent: "group-data-[selected=true]:text-warning-foreground"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
variant: ["solid", "bordered", "light"],
|
|
233
|
+
color: "danger",
|
|
234
|
+
class: {
|
|
235
|
+
cursor: colorVariants.solid.danger,
|
|
236
|
+
tabContent: "group-data-[selected=true]:text-danger-foreground"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
// underlined && color
|
|
240
|
+
{
|
|
241
|
+
variant: "underlined",
|
|
242
|
+
color: "default",
|
|
243
|
+
class: {
|
|
244
|
+
cursor: "bg-foreground",
|
|
245
|
+
tabContent: "group-data-[selected=true]:text-foreground"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
variant: "underlined",
|
|
250
|
+
color: "primary",
|
|
251
|
+
class: {
|
|
252
|
+
cursor: "bg-primary",
|
|
253
|
+
tabContent: "group-data-[selected=true]:text-primary"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
variant: "underlined",
|
|
258
|
+
color: "secondary",
|
|
259
|
+
class: {
|
|
260
|
+
cursor: "bg-secondary",
|
|
261
|
+
tabContent: "group-data-[selected=true]:text-secondary"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
variant: "underlined",
|
|
266
|
+
color: "success",
|
|
267
|
+
class: {
|
|
268
|
+
cursor: "bg-success",
|
|
269
|
+
tabContent: "group-data-[selected=true]:text-success"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
variant: "underlined",
|
|
274
|
+
color: "warning",
|
|
275
|
+
class: {
|
|
276
|
+
cursor: "bg-warning",
|
|
277
|
+
tabContent: "group-data-[selected=true]:text-warning"
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
variant: "underlined",
|
|
282
|
+
color: "danger",
|
|
283
|
+
class: {
|
|
284
|
+
cursor: "bg-danger",
|
|
285
|
+
tabContent: "group-data-[selected=true]:text-danger"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
/**
|
|
289
|
+
* Disable animation & Variants & Colors
|
|
290
|
+
*/
|
|
291
|
+
// disabledAnimation && underlined
|
|
292
|
+
{
|
|
293
|
+
disableAnimation: true,
|
|
294
|
+
variant: "underlined",
|
|
295
|
+
class: {
|
|
296
|
+
tab: [
|
|
297
|
+
"after:content-['']",
|
|
298
|
+
"after:absolute",
|
|
299
|
+
"after:bottom-0",
|
|
300
|
+
"after:h-[2px]",
|
|
301
|
+
"after:w-[80%]",
|
|
302
|
+
"after:opacity-0",
|
|
303
|
+
"after:shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]",
|
|
304
|
+
"data-[selected=true]:after:opacity-100"
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
// disableAnimation && color && solid/bordered
|
|
309
|
+
{
|
|
310
|
+
disableAnimation: true,
|
|
311
|
+
color: "default",
|
|
312
|
+
variant: ["solid", "bordered", "light"],
|
|
313
|
+
class: {
|
|
314
|
+
tab: "data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
disableAnimation: true,
|
|
319
|
+
color: "primary",
|
|
320
|
+
variant: ["solid", "bordered", "light"],
|
|
321
|
+
class: {
|
|
322
|
+
tab: "data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
disableAnimation: true,
|
|
327
|
+
color: "secondary",
|
|
328
|
+
variant: ["solid", "bordered", "light"],
|
|
329
|
+
class: {
|
|
330
|
+
tab: "data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
disableAnimation: true,
|
|
335
|
+
color: "success",
|
|
336
|
+
variant: ["solid", "bordered", "light"],
|
|
337
|
+
class: {
|
|
338
|
+
tab: "data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
disableAnimation: true,
|
|
343
|
+
color: "warning",
|
|
344
|
+
variant: ["solid", "bordered", "light"],
|
|
345
|
+
class: {
|
|
346
|
+
tab: "data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
disableAnimation: true,
|
|
351
|
+
color: "danger",
|
|
352
|
+
variant: ["solid", "bordered", "light"],
|
|
353
|
+
class: {
|
|
354
|
+
tab: "data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
// disableAnimation && color && underlined
|
|
358
|
+
{
|
|
359
|
+
disableAnimation: true,
|
|
360
|
+
color: "default",
|
|
361
|
+
variant: "underlined",
|
|
362
|
+
class: {
|
|
363
|
+
tab: "data-[selected=true]:after:bg-foreground"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
disableAnimation: true,
|
|
368
|
+
color: "primary",
|
|
369
|
+
variant: "underlined",
|
|
370
|
+
class: {
|
|
371
|
+
tab: "data-[selected=true]:after:bg-primary"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
disableAnimation: true,
|
|
376
|
+
color: "secondary",
|
|
377
|
+
variant: "underlined",
|
|
378
|
+
class: {
|
|
379
|
+
tab: "data-[selected=true]:after:bg-secondary"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
disableAnimation: true,
|
|
384
|
+
color: "success",
|
|
385
|
+
variant: "underlined",
|
|
386
|
+
class: {
|
|
387
|
+
tab: "data-[selected=true]:after:bg-success"
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
disableAnimation: true,
|
|
392
|
+
color: "warning",
|
|
393
|
+
variant: "underlined",
|
|
394
|
+
class: {
|
|
395
|
+
tab: "data-[selected=true]:after:bg-warning"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
disableAnimation: true,
|
|
400
|
+
color: "danger",
|
|
401
|
+
variant: "underlined",
|
|
402
|
+
class: {
|
|
403
|
+
tab: "data-[selected=true]:after:bg-danger"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
compoundSlots: [
|
|
408
|
+
{
|
|
409
|
+
variant: "underlined",
|
|
410
|
+
slots: ["tab", "tabList", "cursor"],
|
|
411
|
+
class: ["rounded-none"]
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
export {
|
|
417
|
+
tabs
|
|
418
|
+
};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isBaseTheme
|
|
3
|
+
} from "./chunk-D2XMP2NC.mjs";
|
|
4
|
+
import {
|
|
5
|
+
baseStyles
|
|
6
|
+
} from "./chunk-JGY6VQQQ.mjs";
|
|
7
|
+
import {
|
|
8
|
+
utilities
|
|
9
|
+
} from "./chunk-6JJPIEK7.mjs";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_TRANSITION_DURATION
|
|
12
|
+
} from "./chunk-GSRZWDGA.mjs";
|
|
13
|
+
import {
|
|
14
|
+
semanticColors
|
|
15
|
+
} from "./chunk-G4RCK475.mjs";
|
|
16
|
+
import {
|
|
17
|
+
flattenThemeObject
|
|
18
|
+
} from "./chunk-KUNVFLXJ.mjs";
|
|
19
|
+
import {
|
|
20
|
+
darkLayout,
|
|
21
|
+
defaultLayout,
|
|
22
|
+
lightLayout
|
|
23
|
+
} from "./chunk-HUBDRSA4.mjs";
|
|
24
|
+
import {
|
|
25
|
+
animations
|
|
26
|
+
} from "./chunk-KXPLHLA6.mjs";
|
|
27
|
+
import {
|
|
28
|
+
commonColors
|
|
29
|
+
} from "./chunk-IAS3SFA4.mjs";
|
|
30
|
+
|
|
31
|
+
// src/plugin.ts
|
|
32
|
+
import Color from "color";
|
|
33
|
+
import plugin from "tailwindcss/plugin.js";
|
|
34
|
+
import deepMerge from "deepmerge";
|
|
35
|
+
import { omit, kebabCase, mapKeys } from "@heroui/shared-utils";
|
|
36
|
+
var DEFAULT_PREFIX = "heroui";
|
|
37
|
+
var parsedColorsCache = {};
|
|
38
|
+
var resolveConfig = (themes = {}, defaultTheme, prefix) => {
|
|
39
|
+
const resolved = {
|
|
40
|
+
variants: [],
|
|
41
|
+
utilities: {},
|
|
42
|
+
colors: {},
|
|
43
|
+
baseStyles: {}
|
|
44
|
+
};
|
|
45
|
+
for (const [themeName, { extend, layout, colors }] of Object.entries(themes)) {
|
|
46
|
+
let cssSelector = `.${themeName}`;
|
|
47
|
+
const scheme = themeName === "light" || themeName === "dark" ? themeName : extend;
|
|
48
|
+
let baseSelector = "";
|
|
49
|
+
if (themeName === defaultTheme) {
|
|
50
|
+
baseSelector = `:root, [data-theme=${themeName}]`;
|
|
51
|
+
}
|
|
52
|
+
baseSelector && (resolved.baseStyles[baseSelector] = scheme ? {
|
|
53
|
+
"color-scheme": scheme
|
|
54
|
+
} : {});
|
|
55
|
+
resolved.utilities[cssSelector] = scheme ? {
|
|
56
|
+
"color-scheme": scheme
|
|
57
|
+
} : {};
|
|
58
|
+
const flatColors = flattenThemeObject(colors);
|
|
59
|
+
const flatLayout = layout ? mapKeys(layout, (_, key) => kebabCase(key)) : {};
|
|
60
|
+
resolved.variants.push({
|
|
61
|
+
name: themeName,
|
|
62
|
+
definition: [`&.${themeName}`, `&[data-theme='${themeName}']`]
|
|
63
|
+
});
|
|
64
|
+
for (const [colorName, colorValue] of Object.entries(flatColors)) {
|
|
65
|
+
if (!colorValue) return;
|
|
66
|
+
try {
|
|
67
|
+
const parsedColor = parsedColorsCache[colorValue] || Color(colorValue).hsl().round(2).array();
|
|
68
|
+
parsedColorsCache[colorValue] = parsedColor;
|
|
69
|
+
const [h, s, l, defaultAlphaValue] = parsedColor;
|
|
70
|
+
const herouiColorVariable = `--${prefix}-${colorName}`;
|
|
71
|
+
resolved.utilities[cssSelector][herouiColorVariable] = `${h} ${s}% ${l}%`;
|
|
72
|
+
baseSelector && (resolved.baseStyles[baseSelector][herouiColorVariable] = `${h} ${s}% ${l}%`);
|
|
73
|
+
resolved.colors[colorName] = `hsl(var(${herouiColorVariable}) / ${defaultAlphaValue != null ? defaultAlphaValue : "<alpha-value>"})`;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.log("error", error == null ? void 0 : error.message);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
for (const [key, value] of Object.entries(flatLayout)) {
|
|
79
|
+
if (!value) return;
|
|
80
|
+
const layoutVariablePrefix = `--${prefix}-${key}`;
|
|
81
|
+
if (typeof value === "object") {
|
|
82
|
+
for (const [nestedKey, nestedValue] of Object.entries(value)) {
|
|
83
|
+
const nestedLayoutVariable = `${layoutVariablePrefix}-${nestedKey}`;
|
|
84
|
+
resolved.utilities[cssSelector][nestedLayoutVariable] = nestedValue;
|
|
85
|
+
baseSelector && (resolved.baseStyles[baseSelector][nestedLayoutVariable] = nestedValue);
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
const formattedValue = layoutVariablePrefix.includes("opacity") && typeof value === "number" ? value.toString().replace(/^0\./, ".") : value;
|
|
89
|
+
resolved.utilities[cssSelector][layoutVariablePrefix] = formattedValue;
|
|
90
|
+
baseSelector && (resolved.baseStyles[baseSelector][layoutVariablePrefix] = formattedValue);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return resolved;
|
|
95
|
+
};
|
|
96
|
+
var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
97
|
+
const resolved = resolveConfig(themes, defaultTheme, prefix);
|
|
98
|
+
const createStripeGradient = (stripeColor, backgroundColor) => `linear-gradient(45deg, hsl(var(--${prefix}-${stripeColor})) 25%, hsl(var(--${prefix}-${backgroundColor})) 25%, hsl(var(--${prefix}-${backgroundColor})) 50%, hsl(var(--${prefix}-${stripeColor})) 50%, hsl(var(--${prefix}-${stripeColor})) 75%, hsl(var(--${prefix}-${backgroundColor})) 75%, hsl(var(--${prefix}-${backgroundColor})))`;
|
|
99
|
+
return plugin(
|
|
100
|
+
({ addBase, addUtilities, addVariant }) => {
|
|
101
|
+
addBase({
|
|
102
|
+
[":root, [data-theme]"]: {
|
|
103
|
+
...baseStyles(prefix)
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
addBase({ ...resolved == null ? void 0 : resolved.baseStyles });
|
|
107
|
+
addUtilities({ ...resolved == null ? void 0 : resolved.utilities, ...utilities });
|
|
108
|
+
resolved == null ? void 0 : resolved.variants.forEach((variant) => {
|
|
109
|
+
addVariant(variant.name, variant.definition);
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
// extend the colors config
|
|
113
|
+
{
|
|
114
|
+
theme: {
|
|
115
|
+
extend: {
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
colors: {
|
|
118
|
+
...addCommonColors ? commonColors : {},
|
|
119
|
+
...resolved == null ? void 0 : resolved.colors
|
|
120
|
+
},
|
|
121
|
+
scale: {
|
|
122
|
+
"80": "0.8",
|
|
123
|
+
"85": "0.85"
|
|
124
|
+
},
|
|
125
|
+
height: {
|
|
126
|
+
divider: `var(--${prefix}-divider-weight)`
|
|
127
|
+
},
|
|
128
|
+
width: {
|
|
129
|
+
divider: `var(--${prefix}-divider-weight)`
|
|
130
|
+
},
|
|
131
|
+
borderRadius: {
|
|
132
|
+
small: `var(--${prefix}-radius-small)`,
|
|
133
|
+
medium: `var(--${prefix}-radius-medium)`,
|
|
134
|
+
large: `var(--${prefix}-radius-large)`
|
|
135
|
+
},
|
|
136
|
+
opacity: {
|
|
137
|
+
hover: `var(--${prefix}-hover-opacity)`,
|
|
138
|
+
disabled: `var(--${prefix}-disabled-opacity)`
|
|
139
|
+
},
|
|
140
|
+
borderWidth: {
|
|
141
|
+
small: `var(--${prefix}-border-width-small)`,
|
|
142
|
+
medium: `var(--${prefix}-border-width-medium)`,
|
|
143
|
+
large: `var(--${prefix}-border-width-large)`,
|
|
144
|
+
1: "1px",
|
|
145
|
+
1.5: "1.5px",
|
|
146
|
+
3: "3px",
|
|
147
|
+
5: "5px"
|
|
148
|
+
},
|
|
149
|
+
boxShadow: {
|
|
150
|
+
small: `var(--${prefix}-box-shadow-small)`,
|
|
151
|
+
medium: `var(--${prefix}-box-shadow-medium)`,
|
|
152
|
+
large: `var(--${prefix}-box-shadow-large)`
|
|
153
|
+
},
|
|
154
|
+
backgroundSize: {
|
|
155
|
+
"stripe-size": "1.25rem 1.25rem"
|
|
156
|
+
},
|
|
157
|
+
backgroundImage: {
|
|
158
|
+
"stripe-gradient-default": createStripeGradient("default-200", "default-400"),
|
|
159
|
+
"stripe-gradient-primary": createStripeGradient("primary-200", "primary"),
|
|
160
|
+
"stripe-gradient-secondary": createStripeGradient("secondary-200", "secondary"),
|
|
161
|
+
"stripe-gradient-success": createStripeGradient("success-200", "success"),
|
|
162
|
+
"stripe-gradient-warning": createStripeGradient("warning-200", "warning"),
|
|
163
|
+
"stripe-gradient-danger": createStripeGradient("danger-200", "danger")
|
|
164
|
+
},
|
|
165
|
+
transitionDuration: {
|
|
166
|
+
0: "0ms",
|
|
167
|
+
250: "250ms",
|
|
168
|
+
400: "400ms",
|
|
169
|
+
DEFAULT: DEFAULT_TRANSITION_DURATION
|
|
170
|
+
},
|
|
171
|
+
transitionTimingFunction: {
|
|
172
|
+
"soft-spring": "cubic-bezier(0.155, 1.105, 0.295, 1.12)"
|
|
173
|
+
},
|
|
174
|
+
...animations
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
};
|
|
180
|
+
var heroui = (config = {}) => {
|
|
181
|
+
var _a, _b, _c, _d;
|
|
182
|
+
const {
|
|
183
|
+
themes: themeObject = {},
|
|
184
|
+
defaultTheme = "light",
|
|
185
|
+
layout: userLayout,
|
|
186
|
+
defaultExtendTheme = "light",
|
|
187
|
+
prefix: defaultPrefix = DEFAULT_PREFIX,
|
|
188
|
+
addCommonColors = false
|
|
189
|
+
} = config;
|
|
190
|
+
const userLightColors = ((_a = themeObject == null ? void 0 : themeObject.light) == null ? void 0 : _a.colors) || {};
|
|
191
|
+
const userDarkColors = ((_b = themeObject == null ? void 0 : themeObject.dark) == null ? void 0 : _b.colors) || {};
|
|
192
|
+
const defaultLayoutObj = userLayout && typeof userLayout === "object" ? deepMerge(defaultLayout, userLayout) : defaultLayout;
|
|
193
|
+
const baseLayouts = {
|
|
194
|
+
light: {
|
|
195
|
+
...defaultLayoutObj,
|
|
196
|
+
...lightLayout
|
|
197
|
+
},
|
|
198
|
+
dark: {
|
|
199
|
+
...defaultLayoutObj,
|
|
200
|
+
...darkLayout
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
let otherThemes = omit(themeObject, ["light", "dark"]) || {};
|
|
204
|
+
Object.entries(otherThemes).forEach(([themeName, { extend, colors, layout }]) => {
|
|
205
|
+
const baseTheme = extend && isBaseTheme(extend) ? extend : defaultExtendTheme;
|
|
206
|
+
const baseColors = semanticColors[baseTheme];
|
|
207
|
+
otherThemes[themeName].colors = colors && typeof colors === "object" ? deepMerge(baseColors, colors) : baseColors;
|
|
208
|
+
const baseLayout = extend ? baseLayouts[extend] : defaultLayoutObj;
|
|
209
|
+
otherThemes[themeName].layout = layout && typeof layout === "object" ? deepMerge(baseLayout, layout) : baseLayout;
|
|
210
|
+
});
|
|
211
|
+
const light = {
|
|
212
|
+
layout: deepMerge(baseLayouts.light, ((_c = themeObject == null ? void 0 : themeObject.light) == null ? void 0 : _c.layout) || {}),
|
|
213
|
+
colors: deepMerge(semanticColors.light, userLightColors)
|
|
214
|
+
};
|
|
215
|
+
const dark = {
|
|
216
|
+
layout: deepMerge(baseLayouts.dark, ((_d = themeObject == null ? void 0 : themeObject.dark) == null ? void 0 : _d.layout) || {}),
|
|
217
|
+
colors: deepMerge(semanticColors.dark, userDarkColors)
|
|
218
|
+
};
|
|
219
|
+
const themes = {
|
|
220
|
+
light,
|
|
221
|
+
dark,
|
|
222
|
+
...otherThemes
|
|
223
|
+
};
|
|
224
|
+
return corePlugin(themes, defaultTheme, defaultPrefix, addCommonColors);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export {
|
|
228
|
+
heroui
|
|
229
|
+
};
|