@sikka/hawa 0.26.29 → 0.26.31
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/Chip-H5BnuDdx.d.ts +36 -0
- package/dist/Chip-hr2gRBJ-.d.mts +36 -0
- package/dist/DropdownMenu-EUL-D3I3.d.mts +95 -0
- package/dist/DropdownMenu-SPisqCzV.d.ts +95 -0
- package/dist/Radio-K1WGpnGA.d.ts +75 -0
- package/dist/Radio-hsrLKNxE.d.mts +75 -0
- package/dist/Toast-VBd4UvlM.d.mts +26 -0
- package/dist/Toast-pOd4uGZz.d.ts +26 -0
- package/dist/accordion/index.d.mts +51 -0
- package/dist/accordion/index.d.ts +51 -0
- package/dist/accordion/index.js +272 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/accordion/index.mjs +228 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/alert/index.d.mts +29 -0
- package/dist/alert/index.d.ts +29 -0
- package/dist/alert/index.js +443 -0
- package/dist/alert/index.js.map +1 -0
- package/dist/alert/index.mjs +403 -0
- package/dist/alert/index.mjs.map +1 -0
- package/dist/appLayout/index.d.mts +126 -0
- package/dist/appLayout/index.d.ts +126 -0
- package/dist/appLayout/index.js +1326 -0
- package/dist/appLayout/index.js.map +1 -0
- package/dist/appLayout/index.mjs +1286 -0
- package/dist/appLayout/index.mjs.map +1 -0
- package/dist/appMenubar/index.d.mts +33 -0
- package/dist/appMenubar/index.d.ts +33 -0
- package/dist/appMenubar/index.js +282 -0
- package/dist/appMenubar/index.js.map +1 -0
- package/dist/appMenubar/index.mjs +225 -0
- package/dist/appMenubar/index.mjs.map +1 -0
- package/dist/appStores/index.d.mts +8 -0
- package/dist/appStores/index.d.ts +8 -0
- package/dist/appStores/index.js +76 -0
- package/dist/appStores/index.js.map +1 -0
- package/dist/appStores/index.mjs +39 -0
- package/dist/appStores/index.mjs.map +1 -0
- package/dist/appTabs/index.d.mts +18 -0
- package/dist/appTabs/index.d.ts +18 -0
- package/dist/appTabs/index.js +93 -0
- package/dist/appTabs/index.js.map +1 -0
- package/dist/appTabs/index.mjs +51 -0
- package/dist/appTabs/index.mjs.map +1 -0
- package/dist/appTopbar/index.d.mts +44 -0
- package/dist/appTopbar/index.d.ts +44 -0
- package/dist/appTopbar/index.js +484 -0
- package/dist/appTopbar/index.js.map +1 -0
- package/dist/appTopbar/index.mjs +442 -0
- package/dist/appTopbar/index.mjs.map +1 -0
- package/dist/avatar/index.d.mts +16 -0
- package/dist/avatar/index.d.ts +16 -0
- package/dist/avatar/index.js +162 -0
- package/dist/avatar/index.js.map +1 -0
- package/dist/avatar/index.mjs +122 -0
- package/dist/avatar/index.mjs.map +1 -0
- package/dist/backToTop/index.d.mts +15 -0
- package/dist/backToTop/index.d.ts +15 -0
- package/dist/backToTop/index.js +396 -0
- package/dist/backToTop/index.js.map +1 -0
- package/dist/backToTop/index.mjs +356 -0
- package/dist/backToTop/index.mjs.map +1 -0
- package/dist/badge/index.d.mts +13 -0
- package/dist/badge/index.d.ts +13 -0
- package/dist/badge/index.js +127 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/index.mjs +84 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/blocks/auth/index.d.mts +202 -0
- package/dist/blocks/auth/index.d.ts +202 -0
- package/dist/blocks/auth/index.js +4197 -0
- package/dist/blocks/auth/index.mjs +3389 -0
- package/dist/blocks/feedback/index.d.mts +74 -0
- package/dist/blocks/feedback/index.d.ts +74 -0
- package/dist/blocks/feedback/index.js +1544 -0
- package/dist/blocks/feedback/index.mjs +558 -0
- package/dist/blocks/index.d.mts +480 -0
- package/dist/blocks/index.d.ts +480 -0
- package/dist/blocks/index.js +6700 -0
- package/dist/blocks/index.mjs +2550 -0
- package/dist/blocks/misc/index.d.mts +90 -0
- package/dist/blocks/misc/index.d.ts +90 -0
- package/dist/blocks/misc/index.js +1186 -0
- package/dist/blocks/misc/index.mjs +387 -0
- package/dist/blocks/pricing/index.d.mts +93 -0
- package/dist/blocks/pricing/index.d.ts +93 -0
- package/dist/blocks/pricing/index.js +1528 -0
- package/dist/blocks/pricing/index.mjs +677 -0
- package/dist/breadcrumb/index.d.mts +14 -0
- package/dist/breadcrumb/index.d.ts +14 -0
- package/dist/breadcrumb/index.js +64 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/breadcrumb/index.mjs +27 -0
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/button/index.d.mts +16 -0
- package/dist/button/index.d.ts +16 -0
- package/dist/button/index.js +302 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/index.mjs +261 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/card/index.d.mts +17 -0
- package/dist/card/index.d.ts +17 -0
- package/dist/card/index.js +140 -0
- package/dist/card/index.js.map +1 -0
- package/dist/card/index.mjs +93 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/carousel/index.d.mts +15 -0
- package/dist/carousel/index.d.ts +15 -0
- package/dist/carousel/index.js +194 -0
- package/dist/carousel/index.js.map +1 -0
- package/dist/carousel/index.mjs +152 -0
- package/dist/carousel/index.mjs.map +1 -0
- package/dist/checkbox/index.d.mts +20 -0
- package/dist/checkbox/index.d.ts +20 -0
- package/dist/checkbox/index.js +185 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/checkbox/index.mjs +143 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/chip/index.d.mts +36 -0
- package/dist/chip/index.d.ts +36 -0
- package/dist/chip/index.js +130 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/chip/index.mjs +88 -0
- package/dist/chip/index.mjs.map +1 -0
- package/dist/chunk-3ODWQVIA.mjs +12 -0
- package/dist/chunk-3ODWQVIA.mjs.map +1 -0
- package/dist/chunk-4EGKGSGY.mjs +129 -0
- package/dist/chunk-53OZVR57.mjs +108 -0
- package/dist/chunk-53OZVR57.mjs.map +1 -0
- package/dist/chunk-5YXZXYLH.mjs +67 -0
- package/dist/chunk-CBRGWUZG.mjs +11 -0
- package/dist/chunk-CBRGWUZG.mjs.map +1 -0
- package/dist/chunk-D22AALLE.mjs +22 -0
- package/dist/chunk-D36MPDGE.mjs +476 -0
- package/dist/chunk-F3DQJHTG.mjs +3113 -0
- package/dist/chunk-FQ6WVEHW.mjs +151 -0
- package/dist/chunk-GVJYACGA.mjs +189 -0
- package/dist/chunk-HYXZRCZW.mjs +265 -0
- package/dist/chunk-HYXZRCZW.mjs.map +1 -0
- package/dist/chunk-JNUGOUYJ.mjs +154 -0
- package/dist/chunk-JX5YLRCU.mjs +443 -0
- package/dist/chunk-JX5YLRCU.mjs.map +1 -0
- package/dist/chunk-MQUAGP7K.mjs +1098 -0
- package/dist/chunk-NMS5LCSQ.mjs +195 -0
- package/dist/chunk-NV3KR5Y7.mjs +82 -0
- package/dist/chunk-NV3KR5Y7.mjs.map +1 -0
- package/dist/chunk-OQ7MNEYW.mjs +151 -0
- package/dist/chunk-OQ7MNEYW.mjs.map +1 -0
- package/dist/chunk-OY66MBXP.mjs +163 -0
- package/dist/chunk-R4HAAT6R.mjs +131 -0
- package/dist/chunk-WUHNPHD5.mjs +0 -0
- package/dist/chunk-ZFXKCRJC.mjs +11 -0
- package/dist/chunk-ZS3FB3PO.mjs +12 -0
- package/dist/codeBlock/index.d.mts +24 -0
- package/dist/codeBlock/index.d.ts +24 -0
- package/dist/codeBlock/index.js +518 -0
- package/dist/codeBlock/index.js.map +1 -0
- package/dist/codeBlock/index.mjs +433 -0
- package/dist/codeBlock/index.mjs.map +1 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +50 -0
- package/dist/collapsible/index.js.map +1 -0
- package/dist/collapsible/index.mjs +13 -0
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/colorPicker/index.d.mts +34 -0
- package/dist/colorPicker/index.d.ts +34 -0
- package/dist/colorPicker/index.js +276 -0
- package/dist/colorPicker/index.js.map +1 -0
- package/dist/colorPicker/index.mjs +171 -0
- package/dist/colorPicker/index.mjs.map +1 -0
- package/dist/combobox/index.d.mts +41 -0
- package/dist/combobox/index.d.ts +41 -0
- package/dist/combobox/index.js +749 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/combobox/index.mjs +295 -0
- package/dist/combobox/index.mjs.map +1 -0
- package/dist/command/index.d.mts +48 -0
- package/dist/command/index.d.ts +48 -0
- package/dist/command/index.js +486 -0
- package/dist/command/index.js.map +1 -0
- package/dist/command/index.mjs +23 -0
- package/dist/command/index.mjs.map +1 -0
- package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
- package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
- package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
- package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
- package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
- package/dist/commonTypes-CKtkuNFH.d.mts +11 -0
- package/dist/commonTypes-CKtkuNFH.d.ts +11 -0
- package/dist/commonTypes-GhKAraJw.d.mts +4 -0
- package/dist/commonTypes-GhKAraJw.d.ts +4 -0
- package/dist/commonTypes-MxCJyrHv.d.mts +8 -0
- package/dist/commonTypes-MxCJyrHv.d.ts +8 -0
- package/dist/commonTypes-PBumfOBg.d.mts +3 -0
- package/dist/commonTypes-PBumfOBg.d.ts +3 -0
- package/dist/commonTypes-WPhcN3Vr.d.mts +5 -0
- package/dist/commonTypes-WPhcN3Vr.d.ts +5 -0
- package/dist/commonTypes-_11epZYh.d.mts +4 -0
- package/dist/commonTypes-_11epZYh.d.ts +4 -0
- package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
- package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
- package/dist/copyrights/index.d.mts +17 -0
- package/dist/copyrights/index.d.ts +17 -0
- package/dist/copyrights/index.js +46 -0
- package/dist/copyrights/index.js.map +1 -0
- package/dist/copyrights/index.mjs +9 -0
- package/dist/copyrights/index.mjs.map +1 -0
- package/dist/count/index.d.mts +11 -0
- package/dist/count/index.d.ts +11 -0
- package/dist/count/index.js +46 -0
- package/dist/count/index.js.map +1 -0
- package/dist/count/index.mjs +9 -0
- package/dist/count/index.mjs.map +1 -0
- package/dist/dataTable/index.d.mts +41 -0
- package/dist/dataTable/index.d.ts +41 -0
- package/dist/dataTable/index.js +1305 -0
- package/dist/dataTable/index.js.map +1 -0
- package/dist/dataTable/index.mjs +1273 -0
- package/dist/dataTable/index.mjs.map +1 -0
- package/dist/destroyableCard/index.d.mts +12 -0
- package/dist/destroyableCard/index.d.ts +12 -0
- package/dist/destroyableCard/index.js +204 -0
- package/dist/destroyableCard/index.js.map +1 -0
- package/dist/destroyableCard/index.mjs +164 -0
- package/dist/destroyableCard/index.mjs.map +1 -0
- package/dist/dialog/index.d.mts +57 -0
- package/dist/dialog/index.d.ts +57 -0
- package/dist/dialog/index.js +369 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/dialog/index.mjs +315 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/docsLayout/index.d.mts +37 -0
- package/dist/docsLayout/index.d.ts +37 -0
- package/dist/docsLayout/index.js +928 -0
- package/dist/docsLayout/index.js.map +1 -0
- package/dist/docsLayout/index.mjs +888 -0
- package/dist/docsLayout/index.mjs.map +1 -0
- package/dist/docsSidebar/index.d.mts +11 -0
- package/dist/docsSidebar/index.d.ts +11 -0
- package/dist/docsSidebar/index.js +112 -0
- package/dist/docsSidebar/index.js.map +1 -0
- package/dist/docsSidebar/index.mjs +70 -0
- package/dist/docsSidebar/index.mjs.map +1 -0
- package/dist/dropdownMenu/index.d.mts +96 -0
- package/dist/dropdownMenu/index.d.ts +96 -0
- package/dist/dropdownMenu/index.js +421 -0
- package/dist/dropdownMenu/index.js.map +1 -0
- package/dist/dropdownMenu/index.mjs +363 -0
- package/dist/dropdownMenu/index.mjs.map +1 -0
- package/dist/elements/index.d.mts +788 -0
- package/dist/elements/index.d.ts +788 -0
- package/dist/elements/index.js +7835 -0
- package/dist/elements/index.mjs +3418 -0
- package/dist/fileDropzone/index.d.mts +37 -0
- package/dist/fileDropzone/index.d.ts +37 -0
- package/dist/fileDropzone/index.js +665 -0
- package/dist/fileDropzone/index.js.map +1 -0
- package/dist/fileDropzone/index.mjs +625 -0
- package/dist/fileDropzone/index.mjs.map +1 -0
- package/dist/fileUploader/index.d.mts +5 -0
- package/dist/fileUploader/index.d.ts +5 -0
- package/dist/fileUploader/index.js +62 -0
- package/dist/fileUploader/index.js.map +1 -0
- package/dist/fileUploader/index.mjs +25 -0
- package/dist/fileUploader/index.mjs.map +1 -0
- package/dist/glow/index.d.mts +16 -0
- package/dist/glow/index.d.ts +16 -0
- package/dist/glow/index.js +149 -0
- package/dist/glow/index.js.map +1 -0
- package/dist/glow/index.mjs +111 -0
- package/dist/glow/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +108 -0
- package/dist/hooks/index.d.ts +108 -0
- package/dist/hooks/index.js +459 -0
- package/dist/hooks/index.mjs +255 -0
- package/dist/index.d.mts +1932 -0
- package/dist/index.d.ts +1932 -0
- package/dist/index.js +12126 -0
- package/dist/index.mjs +11911 -0
- package/dist/input/index.d.mts +43 -0
- package/dist/input/index.d.ts +43 -0
- package/dist/input/index.js +293 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/index.mjs +158 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/interfaceSettings/index.d.mts +18 -0
- package/dist/interfaceSettings/index.d.ts +18 -0
- package/dist/interfaceSettings/index.js +419 -0
- package/dist/interfaceSettings/index.js.map +1 -0
- package/dist/interfaceSettings/index.mjs +282 -0
- package/dist/interfaceSettings/index.mjs.map +1 -0
- package/dist/label/index.d.mts +13 -0
- package/dist/label/index.d.ts +13 -0
- package/dist/label/index.js +143 -0
- package/dist/label/index.js.map +1 -0
- package/dist/label/index.mjs +103 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/layout/index.d.mts +256 -0
- package/dist/layout/index.d.ts +256 -0
- package/dist/layout/index.js +2627 -0
- package/dist/layout/index.mjs +1393 -0
- package/dist/loading/index.d.mts +15 -0
- package/dist/loading/index.d.ts +15 -0
- package/dist/loading/index.js +226 -0
- package/dist/loading/index.js.map +1 -0
- package/dist/loading/index.mjs +184 -0
- package/dist/loading/index.mjs.map +1 -0
- package/dist/logos/index.d.mts +27 -0
- package/dist/logos/index.d.ts +27 -0
- package/dist/logos/index.js +245 -0
- package/dist/logos/index.js.map +1 -0
- package/dist/logos/index.mjs +208 -0
- package/dist/logos/index.mjs.map +1 -0
- package/dist/navbar/index.d.mts +17 -0
- package/dist/navbar/index.d.ts +17 -0
- package/dist/navbar/index.js +166 -0
- package/dist/navbar/index.js.map +1 -0
- package/dist/navbar/index.mjs +126 -0
- package/dist/navbar/index.mjs.map +1 -0
- package/dist/navigationMenu/index.d.mts +39 -0
- package/dist/navigationMenu/index.d.ts +39 -0
- package/dist/navigationMenu/index.js +222 -0
- package/dist/navigationMenu/index.js.map +1 -0
- package/dist/navigationMenu/index.mjs +170 -0
- package/dist/navigationMenu/index.mjs.map +1 -0
- package/dist/pagination/index.d.mts +11 -0
- package/dist/pagination/index.d.ts +11 -0
- package/dist/pagination/index.js +161 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/pagination/index.mjs +119 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/passwordInput/index.d.mts +13 -0
- package/dist/passwordInput/index.d.ts +13 -0
- package/dist/passwordInput/index.js +577 -0
- package/dist/passwordInput/index.js.map +1 -0
- package/dist/passwordInput/index.mjs +534 -0
- package/dist/passwordInput/index.mjs.map +1 -0
- package/dist/phoneInput/index.d.mts +23 -0
- package/dist/phoneInput/index.d.ts +23 -0
- package/dist/phoneInput/index.js +2081 -0
- package/dist/phoneInput/index.js.map +1 -0
- package/dist/phoneInput/index.mjs +2041 -0
- package/dist/phoneInput/index.mjs.map +1 -0
- package/dist/pinInput/index.d.mts +20 -0
- package/dist/pinInput/index.d.ts +20 -0
- package/dist/pinInput/index.js +132 -0
- package/dist/pinInput/index.js.map +1 -0
- package/dist/pinInput/index.mjs +90 -0
- package/dist/pinInput/index.mjs.map +1 -0
- package/dist/popover/index.d.mts +23 -0
- package/dist/popover/index.d.ts +23 -0
- package/dist/popover/index.js +113 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/popover/index.mjs +69 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/progress/index.d.mts +6 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +72 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress/index.mjs +30 -0
- package/dist/progress/index.mjs.map +1 -0
- package/dist/progressCircle/index.d.mts +16 -0
- package/dist/progressCircle/index.d.ts +16 -0
- package/dist/progressCircle/index.js +160 -0
- package/dist/progressCircle/index.js.map +1 -0
- package/dist/progressCircle/index.mjs +118 -0
- package/dist/progressCircle/index.mjs.map +1 -0
- package/dist/radio/index.d.mts +39 -0
- package/dist/radio/index.d.ts +39 -0
- package/dist/radio/index.js +330 -0
- package/dist/radio/index.js.map +1 -0
- package/dist/radio/index.mjs +290 -0
- package/dist/radio/index.mjs.map +1 -0
- package/dist/scrollArea/index.d.mts +10 -0
- package/dist/scrollArea/index.d.ts +10 -0
- package/dist/scrollArea/index.js +91 -0
- package/dist/scrollArea/index.js.map +1 -0
- package/dist/scrollArea/index.mjs +48 -0
- package/dist/scrollArea/index.mjs.map +1 -0
- package/dist/scrollIndicator/index.d.mts +9 -0
- package/dist/scrollIndicator/index.d.ts +9 -0
- package/dist/scrollIndicator/index.js +80 -0
- package/dist/scrollIndicator/index.js.map +1 -0
- package/dist/scrollIndicator/index.mjs +43 -0
- package/dist/scrollIndicator/index.mjs.map +1 -0
- package/dist/select/index.d.mts +50 -0
- package/dist/select/index.d.ts +50 -0
- package/dist/select/index.js +322 -0
- package/dist/select/index.js.map +1 -0
- package/dist/select/index.mjs +282 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/separator/index.d.mts +10 -0
- package/dist/separator/index.d.ts +10 -0
- package/dist/separator/index.js +67 -0
- package/dist/separator/index.js.map +1 -0
- package/dist/separator/index.mjs +25 -0
- package/dist/separator/index.mjs.map +1 -0
- package/dist/sheet/index.d.mts +30 -0
- package/dist/sheet/index.d.ts +30 -0
- package/dist/sheet/index.js +202 -0
- package/dist/sheet/index.js.map +1 -0
- package/dist/sheet/index.mjs +151 -0
- package/dist/sheet/index.mjs.map +1 -0
- package/dist/sidebar/index.d.mts +48 -0
- package/dist/sidebar/index.d.ts +48 -0
- package/dist/sidebar/index.js +342 -0
- package/dist/sidebar/index.js.map +1 -0
- package/dist/sidebar/index.mjs +299 -0
- package/dist/sidebar/index.mjs.map +1 -0
- package/dist/signature/index.d.mts +27 -0
- package/dist/signature/index.d.ts +27 -0
- package/dist/signature/index.js +242 -0
- package/dist/signature/index.js.map +1 -0
- package/dist/signature/index.mjs +200 -0
- package/dist/signature/index.mjs.map +1 -0
- package/dist/simpleTable/index.d.mts +30 -0
- package/dist/simpleTable/index.d.ts +30 -0
- package/dist/simpleTable/index.js +250 -0
- package/dist/simpleTable/index.js.map +1 -0
- package/dist/simpleTable/index.mjs +214 -0
- package/dist/simpleTable/index.mjs.map +1 -0
- package/dist/skeleton/index.d.mts +10 -0
- package/dist/skeleton/index.d.ts +10 -0
- package/dist/skeleton/index.js +76 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/index.mjs +34 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +67 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/index.mjs +25 -0
- package/dist/slider/index.mjs.map +1 -0
- package/dist/sortButton/index.d.mts +10 -0
- package/dist/sortButton/index.d.ts +10 -0
- package/dist/sortButton/index.js +337 -0
- package/dist/sortButton/index.js.map +1 -0
- package/dist/sortButton/index.mjs +43 -0
- package/dist/sortButton/index.mjs.map +1 -0
- package/dist/splitButton/index.d.mts +52 -0
- package/dist/splitButton/index.d.ts +52 -0
- package/dist/splitButton/index.js +693 -0
- package/dist/splitButton/index.js.map +1 -0
- package/dist/splitButton/index.mjs +401 -0
- package/dist/splitButton/index.mjs.map +1 -0
- package/dist/stats/index.d.mts +19 -0
- package/dist/stats/index.d.ts +19 -0
- package/dist/stats/index.js +192 -0
- package/dist/stats/index.js.map +1 -0
- package/dist/stats/index.mjs +155 -0
- package/dist/stats/index.mjs.map +1 -0
- package/dist/stopPropagationWrapper/index.d.mts +5 -0
- package/dist/stopPropagationWrapper/index.d.ts +5 -0
- package/dist/stopPropagationWrapper/index.js +49 -0
- package/dist/stopPropagationWrapper/index.js.map +1 -0
- package/dist/stopPropagationWrapper/index.mjs +12 -0
- package/dist/stopPropagationWrapper/index.mjs.map +1 -0
- package/dist/switch/index.d.mts +12 -0
- package/dist/switch/index.d.ts +12 -0
- package/dist/switch/index.js +125 -0
- package/dist/switch/index.js.map +1 -0
- package/dist/switch/index.mjs +83 -0
- package/dist/switch/index.mjs.map +1 -0
- package/dist/table/index.d.mts +21 -0
- package/dist/table/index.d.ts +21 -0
- package/dist/table/index.js +173 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/index.mjs +124 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/tabs/index.d.mts +33 -0
- package/dist/tabs/index.d.ts +33 -0
- package/dist/tabs/index.js +201 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs/index.mjs +158 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/textTypes-559CaoOV.d.mts +88 -0
- package/dist/textTypes-559CaoOV.d.ts +88 -0
- package/dist/textarea/index.d.mts +27 -0
- package/dist/textarea/index.d.ts +27 -0
- package/dist/textarea/index.js +230 -0
- package/dist/textarea/index.js.map +1 -0
- package/dist/textarea/index.mjs +190 -0
- package/dist/textarea/index.mjs.map +1 -0
- package/dist/toast/index.d.mts +26 -0
- package/dist/toast/index.d.ts +26 -0
- package/dist/toast/index.js +198 -0
- package/dist/toast/index.js.map +1 -0
- package/dist/toast/index.mjs +20 -0
- package/dist/toast/index.mjs.map +1 -0
- package/dist/toaster/index.d.mts +9 -0
- package/dist/toaster/index.d.ts +9 -0
- package/dist/toaster/index.js +354 -0
- package/dist/toaster/index.js.map +1 -0
- package/dist/toaster/index.mjs +185 -0
- package/dist/toaster/index.mjs.map +1 -0
- package/dist/types/index.d.mts +115 -0
- package/dist/types/index.d.ts +115 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.mjs +0 -0
- package/package.json +5 -5
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
3
|
+
import { P as PositionType } from '../commonTypes-2IGtJ5cq.js';
|
4
|
+
|
5
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
6
|
+
interface PopoverProps {
|
7
|
+
side?: PositionType;
|
8
|
+
align?: "start" | "center" | "end";
|
9
|
+
trigger?: React.ReactNode;
|
10
|
+
children: React.ReactNode;
|
11
|
+
className?: string;
|
12
|
+
sideOffset?: number;
|
13
|
+
disableTrigger?: any;
|
14
|
+
width?: "trigger" | "default";
|
15
|
+
open?: boolean;
|
16
|
+
contentProps?: PopoverPrimitive.PopoverContentProps;
|
17
|
+
triggerProps?: PopoverPrimitive.PopoverTriggerProps;
|
18
|
+
}
|
19
|
+
type HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;
|
20
|
+
declare const Popover: React.FC<HawaPopoverTypes>;
|
21
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
22
|
+
|
23
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
@@ -0,0 +1,113 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
|
30
|
+
// elements/popover/index.ts
|
31
|
+
var popover_exports = {};
|
32
|
+
__export(popover_exports, {
|
33
|
+
Popover: () => Popover,
|
34
|
+
PopoverContent: () => PopoverContent,
|
35
|
+
PopoverTrigger: () => PopoverTrigger
|
36
|
+
});
|
37
|
+
module.exports = __toCommonJS(popover_exports);
|
38
|
+
|
39
|
+
// elements/popover/Popover.tsx
|
40
|
+
var React = __toESM(require("react"));
|
41
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
42
|
+
|
43
|
+
// util/index.ts
|
44
|
+
var import_clsx = require("clsx");
|
45
|
+
var import_tailwind_merge = require("tailwind-merge");
|
46
|
+
function cn(...inputs) {
|
47
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
48
|
+
}
|
49
|
+
|
50
|
+
// elements/popover/Popover.tsx
|
51
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
52
|
+
PopoverPrimitive.Content,
|
53
|
+
{
|
54
|
+
ref,
|
55
|
+
align,
|
56
|
+
sideOffset,
|
57
|
+
className: cn(
|
58
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
59
|
+
className
|
60
|
+
),
|
61
|
+
...props
|
62
|
+
}
|
63
|
+
)));
|
64
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
65
|
+
var Popover = ({
|
66
|
+
trigger,
|
67
|
+
children,
|
68
|
+
className,
|
69
|
+
align = "center",
|
70
|
+
side,
|
71
|
+
sideOffset = 4,
|
72
|
+
open,
|
73
|
+
width = "default",
|
74
|
+
disableTrigger,
|
75
|
+
contentProps,
|
76
|
+
triggerProps,
|
77
|
+
...props
|
78
|
+
}) => {
|
79
|
+
let widthStyles = {
|
80
|
+
trigger: "var(--radix-popover-trigger-width)",
|
81
|
+
default: "auto"
|
82
|
+
};
|
83
|
+
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
|
84
|
+
PopoverPrimitive.Trigger,
|
85
|
+
{
|
86
|
+
className: "hawa-w-full",
|
87
|
+
disabled: disableTrigger,
|
88
|
+
...triggerProps
|
89
|
+
},
|
90
|
+
trigger
|
91
|
+
), /* @__PURE__ */ React.createElement(
|
92
|
+
PopoverContent,
|
93
|
+
{
|
94
|
+
side,
|
95
|
+
className,
|
96
|
+
align,
|
97
|
+
sideOffset,
|
98
|
+
style: {
|
99
|
+
width: widthStyles[width]
|
100
|
+
},
|
101
|
+
...contentProps
|
102
|
+
},
|
103
|
+
children
|
104
|
+
));
|
105
|
+
};
|
106
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
107
|
+
// Annotate the CommonJS export names for ESM import in node:
|
108
|
+
0 && (module.exports = {
|
109
|
+
Popover,
|
110
|
+
PopoverContent,
|
111
|
+
PopoverTrigger
|
112
|
+
});
|
113
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../elements/popover/index.ts","../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Popover\";\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\"\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width]\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nexport { Popover, PopoverContent, PopoverTrigger };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,uBAAkC;;;ACFlC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADGA,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oCAAkB,yBAAjB,MACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAmBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC,WAAU;AAAA,MACV,UAAU;AAAA,MACT,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,MAC1B;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;","names":[]}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import {
|
2
|
+
cn
|
3
|
+
} from "../chunk-CBRGWUZG.mjs";
|
4
|
+
|
5
|
+
// elements/popover/Popover.tsx
|
6
|
+
import * as React from "react";
|
7
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
8
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
|
9
|
+
PopoverPrimitive.Content,
|
10
|
+
{
|
11
|
+
ref,
|
12
|
+
align,
|
13
|
+
sideOffset,
|
14
|
+
className: cn(
|
15
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
16
|
+
className
|
17
|
+
),
|
18
|
+
...props
|
19
|
+
}
|
20
|
+
)));
|
21
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
22
|
+
var Popover = ({
|
23
|
+
trigger,
|
24
|
+
children,
|
25
|
+
className,
|
26
|
+
align = "center",
|
27
|
+
side,
|
28
|
+
sideOffset = 4,
|
29
|
+
open,
|
30
|
+
width = "default",
|
31
|
+
disableTrigger,
|
32
|
+
contentProps,
|
33
|
+
triggerProps,
|
34
|
+
...props
|
35
|
+
}) => {
|
36
|
+
let widthStyles = {
|
37
|
+
trigger: "var(--radix-popover-trigger-width)",
|
38
|
+
default: "auto"
|
39
|
+
};
|
40
|
+
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
|
41
|
+
PopoverPrimitive.Trigger,
|
42
|
+
{
|
43
|
+
className: "hawa-w-full",
|
44
|
+
disabled: disableTrigger,
|
45
|
+
...triggerProps
|
46
|
+
},
|
47
|
+
trigger
|
48
|
+
), /* @__PURE__ */ React.createElement(
|
49
|
+
PopoverContent,
|
50
|
+
{
|
51
|
+
side,
|
52
|
+
className,
|
53
|
+
align,
|
54
|
+
sideOffset,
|
55
|
+
style: {
|
56
|
+
width: widthStyles[width]
|
57
|
+
},
|
58
|
+
...contentProps
|
59
|
+
},
|
60
|
+
children
|
61
|
+
));
|
62
|
+
};
|
63
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
64
|
+
export {
|
65
|
+
Popover,
|
66
|
+
PopoverContent,
|
67
|
+
PopoverTrigger
|
68
|
+
};
|
69
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../elements/popover/Popover.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nimport { cn } from \"@util/index\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps &\n React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\"\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger\n className=\"hawa-w-full\"\n disabled={disableTrigger}\n {...triggerProps}\n >\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width]\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nexport { Popover, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAEvB,YAAY,sBAAsB;AAMlC,IAAM,iBAAuB,iBAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oCAAkB,yBAAjB,MACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAmBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC;AAAA,IAAkB;AAAA,IAAjB;AAAA,MACC,WAAU;AAAA,MACV,UAAU;AAAA,MACT,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,MAC1B;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;","names":[]}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
3
|
+
|
4
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
5
|
+
|
6
|
+
export { Progress };
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
3
|
+
|
4
|
+
declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
5
|
+
|
6
|
+
export { Progress };
|
@@ -0,0 +1,72 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
|
30
|
+
// elements/progress/index.ts
|
31
|
+
var progress_exports = {};
|
32
|
+
__export(progress_exports, {
|
33
|
+
Progress: () => Progress
|
34
|
+
});
|
35
|
+
module.exports = __toCommonJS(progress_exports);
|
36
|
+
|
37
|
+
// elements/progress/Progress.tsx
|
38
|
+
var React = __toESM(require("react"));
|
39
|
+
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
40
|
+
|
41
|
+
// util/index.ts
|
42
|
+
var import_clsx = require("clsx");
|
43
|
+
var import_tailwind_merge = require("tailwind-merge");
|
44
|
+
function cn(...inputs) {
|
45
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
46
|
+
}
|
47
|
+
|
48
|
+
// elements/progress/Progress.tsx
|
49
|
+
var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
50
|
+
ProgressPrimitive.Root,
|
51
|
+
{
|
52
|
+
ref,
|
53
|
+
className: cn(
|
54
|
+
"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary",
|
55
|
+
className
|
56
|
+
),
|
57
|
+
...props
|
58
|
+
},
|
59
|
+
/* @__PURE__ */ React.createElement(
|
60
|
+
ProgressPrimitive.Indicator,
|
61
|
+
{
|
62
|
+
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
63
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
64
|
+
}
|
65
|
+
)
|
66
|
+
));
|
67
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
69
|
+
0 && (module.exports = {
|
70
|
+
Progress
|
71
|
+
});
|
72
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../elements/progress/index.ts","../../elements/progress/Progress.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Progress\";\n","import * as React from \"react\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"@util/index\";\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,wBAAmC;;;ACFnC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADCA,IAAM,WAAiB,iBAGrB,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AAAA,EAEJ;AAAA,IAAmB;AAAA,IAAlB;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,EAAE,KAAK;AAAA;AAAA,EAC5D;AACF,CACD;AACD,SAAS,cAAgC,uBAAK;","names":[]}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import {
|
2
|
+
cn
|
3
|
+
} from "../chunk-CBRGWUZG.mjs";
|
4
|
+
|
5
|
+
// elements/progress/Progress.tsx
|
6
|
+
import * as React from "react";
|
7
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
8
|
+
var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
9
|
+
ProgressPrimitive.Root,
|
10
|
+
{
|
11
|
+
ref,
|
12
|
+
className: cn(
|
13
|
+
"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary",
|
14
|
+
className
|
15
|
+
),
|
16
|
+
...props
|
17
|
+
},
|
18
|
+
/* @__PURE__ */ React.createElement(
|
19
|
+
ProgressPrimitive.Indicator,
|
20
|
+
{
|
21
|
+
className: "hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all",
|
22
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
23
|
+
}
|
24
|
+
)
|
25
|
+
));
|
26
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
27
|
+
export {
|
28
|
+
Progress
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../elements/progress/Progress.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"@util/index\";\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn(\n \"hawa-relative hawa-h-4 hawa-w-full hawa-overflow-hidden hawa-rounded hawa-bg-secondary\",\n className\n )}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"hawa-h-full hawa-w-full hawa-flex-1 hawa-bg-primary hawa-transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAEvB,YAAY,uBAAuB;AAInC,IAAM,WAAiB,iBAGrB,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AAAA,EAEJ;AAAA,IAAmB;AAAA,IAAlB;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,WAAW,eAAe,OAAO,SAAS,EAAE,KAAK;AAAA;AAAA,EAC5D;AACF,CACD;AACD,SAAS,cAAgC,uBAAK;","names":[]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React__default from 'react';
|
2
|
+
|
3
|
+
type Size = "xs" | "sm" | "md" | "lg" | "xl";
|
4
|
+
interface ProgressCircleProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
5
|
+
value?: number;
|
6
|
+
size?: Size;
|
7
|
+
color?: any;
|
8
|
+
showAnimation?: boolean;
|
9
|
+
tooltip?: string;
|
10
|
+
radius?: number;
|
11
|
+
strokeWidth?: number;
|
12
|
+
children?: React__default.ReactNode;
|
13
|
+
}
|
14
|
+
declare const ProgressCircle: React__default.ForwardRefExoticComponent<ProgressCircleProps & React__default.RefAttributes<HTMLDivElement>>;
|
15
|
+
|
16
|
+
export { ProgressCircle };
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React__default from 'react';
|
2
|
+
|
3
|
+
type Size = "xs" | "sm" | "md" | "lg" | "xl";
|
4
|
+
interface ProgressCircleProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
5
|
+
value?: number;
|
6
|
+
size?: Size;
|
7
|
+
color?: any;
|
8
|
+
showAnimation?: boolean;
|
9
|
+
tooltip?: string;
|
10
|
+
radius?: number;
|
11
|
+
strokeWidth?: number;
|
12
|
+
children?: React__default.ReactNode;
|
13
|
+
}
|
14
|
+
declare const ProgressCircle: React__default.ForwardRefExoticComponent<ProgressCircleProps & React__default.RefAttributes<HTMLDivElement>>;
|
15
|
+
|
16
|
+
export { ProgressCircle };
|
@@ -0,0 +1,160 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
19
|
+
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
|
30
|
+
// elements/progressCircle/index.ts
|
31
|
+
var progressCircle_exports = {};
|
32
|
+
__export(progressCircle_exports, {
|
33
|
+
ProgressCircle: () => ProgressCircle
|
34
|
+
});
|
35
|
+
module.exports = __toCommonJS(progressCircle_exports);
|
36
|
+
|
37
|
+
// elements/progressCircle/ProgressCircle.tsx
|
38
|
+
var import_react = __toESM(require("react"));
|
39
|
+
|
40
|
+
// util/index.ts
|
41
|
+
var import_clsx = require("clsx");
|
42
|
+
var import_tailwind_merge = require("tailwind-merge");
|
43
|
+
function cn(...inputs) {
|
44
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
45
|
+
}
|
46
|
+
|
47
|
+
// elements/progressCircle/ProgressCircle.tsx
|
48
|
+
var size2config = {
|
49
|
+
xs: {
|
50
|
+
radius: 15,
|
51
|
+
strokeWidth: 3
|
52
|
+
},
|
53
|
+
sm: {
|
54
|
+
radius: 19,
|
55
|
+
strokeWidth: 4
|
56
|
+
},
|
57
|
+
md: {
|
58
|
+
radius: 32,
|
59
|
+
strokeWidth: 6
|
60
|
+
},
|
61
|
+
lg: {
|
62
|
+
radius: 52,
|
63
|
+
strokeWidth: 8
|
64
|
+
},
|
65
|
+
xl: {
|
66
|
+
radius: 80,
|
67
|
+
strokeWidth: 10
|
68
|
+
}
|
69
|
+
};
|
70
|
+
function getLimitedValue(input) {
|
71
|
+
if (input === void 0) {
|
72
|
+
return 0;
|
73
|
+
} else if (input > 100) {
|
74
|
+
return 100;
|
75
|
+
} else {
|
76
|
+
return input;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
var ProgressCircle = import_react.default.forwardRef((props, ref) => {
|
80
|
+
const {
|
81
|
+
value: inputValue,
|
82
|
+
size = "md",
|
83
|
+
className,
|
84
|
+
showAnimation = true,
|
85
|
+
color,
|
86
|
+
tooltip,
|
87
|
+
radius: inputRadius,
|
88
|
+
strokeWidth: inputStrokeWidth,
|
89
|
+
children,
|
90
|
+
...other
|
91
|
+
} = props;
|
92
|
+
const value = getLimitedValue(inputValue);
|
93
|
+
const radius = inputRadius ?? size2config[size].radius;
|
94
|
+
const strokeWidth = inputStrokeWidth ?? size2config[size].strokeWidth;
|
95
|
+
const normalizedRadius = radius - strokeWidth / 2;
|
96
|
+
const circumference = normalizedRadius * 2 * Math.PI;
|
97
|
+
const strokeDashoffset = value / 100 * circumference;
|
98
|
+
const offset = circumference - strokeDashoffset;
|
99
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
100
|
+
"div",
|
101
|
+
{
|
102
|
+
ref,
|
103
|
+
className: cn(
|
104
|
+
"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center",
|
105
|
+
className
|
106
|
+
)
|
107
|
+
},
|
108
|
+
/* @__PURE__ */ import_react.default.createElement(
|
109
|
+
"svg",
|
110
|
+
{
|
111
|
+
width: radius * 2,
|
112
|
+
height: radius * 2,
|
113
|
+
viewBox: `0 0 ${radius * 2} ${radius * 2}`,
|
114
|
+
className: "hawa-rotate-180 hawa-transform"
|
115
|
+
},
|
116
|
+
/* @__PURE__ */ import_react.default.createElement(
|
117
|
+
"circle",
|
118
|
+
{
|
119
|
+
r: normalizedRadius,
|
120
|
+
cx: radius,
|
121
|
+
cy: radius,
|
122
|
+
strokeWidth,
|
123
|
+
fill: "transparent",
|
124
|
+
stroke: "",
|
125
|
+
strokeLinecap: "round",
|
126
|
+
className: cn(
|
127
|
+
"hawa-transition-colors hawa-ease-linear",
|
128
|
+
" hawa-stroke-primary/20"
|
129
|
+
)
|
130
|
+
}
|
131
|
+
),
|
132
|
+
value > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
133
|
+
"circle",
|
134
|
+
{
|
135
|
+
r: normalizedRadius,
|
136
|
+
cx: radius,
|
137
|
+
cy: radius,
|
138
|
+
strokeWidth,
|
139
|
+
strokeDasharray: circumference + " " + circumference,
|
140
|
+
strokeDashoffset: offset,
|
141
|
+
fill: "transparent",
|
142
|
+
stroke: "",
|
143
|
+
strokeLinecap: "round",
|
144
|
+
className: cn(
|
145
|
+
"hawa-transition-colors hawa-ease-linear",
|
146
|
+
"hawa-stroke-primary",
|
147
|
+
showAnimation ? "hawa-transition-all hawa-duration-300 hawa-ease-in-out" : ""
|
148
|
+
)
|
149
|
+
}
|
150
|
+
) : null
|
151
|
+
),
|
152
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: cn("hawa-absolute hawa-flex") }, children)
|
153
|
+
));
|
154
|
+
});
|
155
|
+
ProgressCircle.displayName = "ProgressCircle";
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
157
|
+
0 && (module.exports = {
|
158
|
+
ProgressCircle
|
159
|
+
});
|
160
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../elements/progressCircle/index.ts","../../elements/progressCircle/ProgressCircle.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./ProgressCircle\";\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype GaugeType = {\n value: number; // Value between 0 and 100\n maxValue: number; // Value between 0 and 100\n design?: \"full-circle\" | \"half-circle\";\n};\n\ntype Size = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\ninterface ProgressCircleProps extends React.HTMLAttributes<HTMLDivElement> {\n value?: number;\n size?: Size;\n color?: any;\n showAnimation?: boolean;\n tooltip?: string;\n radius?: number;\n strokeWidth?: number;\n children?: React.ReactNode;\n}\n\nconst size2config: Record<Size, { strokeWidth: number; radius: number }> = {\n xs: {\n radius: 15,\n strokeWidth: 3\n },\n sm: {\n radius: 19,\n strokeWidth: 4\n },\n md: {\n radius: 32,\n strokeWidth: 6\n },\n lg: {\n radius: 52,\n strokeWidth: 8\n },\n xl: {\n radius: 80,\n strokeWidth: 10\n }\n};\n\nfunction getLimitedValue(input: number | undefined) {\n if (input === undefined) {\n return 0;\n } else if (input > 100) {\n return 100;\n } else {\n return input;\n }\n}\nexport const ProgressCircle = React.forwardRef<\n HTMLDivElement,\n ProgressCircleProps\n>((props, ref) => {\n const {\n value: inputValue,\n size = \"md\",\n className,\n showAnimation = true,\n color,\n tooltip,\n radius: inputRadius,\n strokeWidth: inputStrokeWidth,\n children,\n ...other\n } = props;\n\n const value = getLimitedValue(inputValue);\n const radius = inputRadius ?? size2config[size].radius;\n const strokeWidth = inputStrokeWidth ?? size2config[size].strokeWidth;\n const normalizedRadius = radius - strokeWidth / 2;\n const circumference = normalizedRadius * 2 * Math.PI;\n const strokeDashoffset = (value / 100) * circumference;\n const offset = circumference - strokeDashoffset;\n\n return (\n <>\n <div\n ref={ref}\n className={cn(\n \"hawa-flex hawa-flex-col hawa-items-center hawa-justify-center\",\n className\n )}\n >\n <svg\n width={radius * 2}\n height={radius * 2}\n viewBox={`0 0 ${radius * 2} ${radius * 2}`}\n className=\"hawa-rotate-180 hawa-transform\"\n >\n <circle\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n strokeWidth={strokeWidth}\n fill=\"transparent\"\n stroke=\"\"\n strokeLinecap=\"round\"\n className={cn(\n \"hawa-transition-colors hawa-ease-linear\",\n \" hawa-stroke-primary/20\"\n )}\n />\n {value > 0 ? (\n <circle\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n strokeWidth={strokeWidth}\n strokeDasharray={circumference + \" \" + circumference}\n strokeDashoffset={offset}\n fill=\"transparent\"\n stroke=\"\"\n strokeLinecap=\"round\"\n className={cn(\n \"hawa-transition-colors hawa-ease-linear\",\n \"hawa-stroke-primary\",\n showAnimation\n ? \"hawa-transition-all hawa-duration-300 hawa-ease-in-out\"\n : \"\"\n )}\n />\n ) : null}\n </svg>\n <div className={cn(\"hawa-absolute hawa-flex\")}>{children}</div>\n </div>\n </>\n );\n});\n\nProgressCircle.displayName = \"ProgressCircle\";\n\n// export const Gauge: React.FC<GaugeType> = ({\n// value = 0,\n// maxValue = 100,\n// children,\n// design = \"full-circle\",\n// }) => {\n// // const radius = 16;\n// // const fullCircumference = 2 * Math.PI * radius; // Full circle circumference\n// // const halfCircumference = Math.PI * radius; // Half circle circumference, updated\n// // const percentage = value / maxValue;\n// // const fullOffset = fullCircumference - percentage * fullCircumference;\n// // const halfOffset = halfCircumference - percentage * halfCircumference; // Updated offset for half-circle\n// // const strokeDasharray = percentage * halfCircumference;\n// // const strokeDashoffset = halfCircumference * (1 - percentage);\n\n// // const FullCircle = () => (\n// // <svg className={\"hawa-h-36 hawa-w-36\"} viewBox=\"0 0 36 36\">\n// // <circle\n// // cx=\"18\"\n// // cy=\"18\"\n// // r={radius}\n// // strokeWidth=\"2\"\n// // stroke=\"lightgray\"\n// // fill=\"none\"\n// // />\n// // <circle\n// // cx=\"18\"\n// // cy=\"18\"\n// // r={radius}\n// // strokeWidth=\"2\"\n// // stroke=\"#009\"\n// // fill=\"none\"\n// // strokeLinecap=\"round\"\n// // strokeDasharray={fullCircumference}\n// // strokeDashoffset={fullOffset}\n// // style={{\n// // transition: \"stroke-dashoffset 0.35s\",\n// // transform: \"rotate(180deg)\",\n// // transformOrigin: \"50% 50%\",\n// // }}\n// // />\n// // <text\n// // x=\"50%\"\n// // y=\"50%\"\n// // alignmentBaseline=\"middle\"\n// // textAnchor=\"middle\"\n// // fontSize=\"10\"\n// // fill=\"#000\"\n// // >\n// // {value}\n// // </text>\n// // </svg>\n// // );\n// // const HalfCircle = () => (\n// // <svg className={\"hawa-h-36 hawa-w-36\"} viewBox=\"0 0 36 36\">\n// // <path\n// // d=\"M 4,18 A 14,14 0 0,1 32,18\"\n// // strokeWidth=\"4\"\n// // stroke=\"lightgray\"\n// // fill=\"none\"\n// // />\n// // <path\n// // d=\"M 4,18 A 14,14 0 0,1 32,18\"\n// // strokeWidth=\"4\"\n// // stroke=\"#00f\"\n// // fill=\"none\"\n// // // strokeDasharray={`${strokeDasharray}`}\n// // // strokeDashoffset={`${strokeDashoffset}`}\n// // strokeDasharray={50}\n// // strokeDashoffset={50}\n// // style={{\n// // transition: \"stroke-dashoffset 0.35s\",\n// // transformOrigin: \"50% 50%\",\n// // }}\n// // />\n// // <text\n// // x=\"50%\"\n// // y=\"45%\"\n// // alignmentBaseline=\"middle\"\n// // textAnchor=\"middle\"\n// // fontSize=\"8\"\n// // fill=\"#000\"\n// // >\n// // {value}\n// // </text>\n// // </svg>\n// // );\n// return (\n// <div className=\"hawa-flex hawa-flex-row hawa-gap-x-3\">\n// <div aria-label=\"Gauge\" role=\"status\">\n// {/* {design === \"full-circle\" ? <FullCircle /> : <HalfCircle />} */}\n// <AlmostFullCircle value={value} size=\"lg\">\n// {children}\n// </AlmostFullCircle>\n// </div>\n// </div>\n// );\n// };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;;;ACAlB,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADkBA,IAAM,cAAqE;AAAA,EACzE,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,aAAa;AAAA,EACf;AACF;AAEA,SAAS,gBAAgB,OAA2B;AAClD,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT,WAAW,QAAQ,KAAK;AACtB,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AACO,IAAM,iBAAiB,aAAAA,QAAM,WAGlC,CAAC,OAAO,QAAQ;AAChB,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,aAAa;AAAA,IACb;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,QAAQ,gBAAgB,UAAU;AACxC,QAAM,SAAS,eAAe,YAAY,IAAI,EAAE;AAChD,QAAM,cAAc,oBAAoB,YAAY,IAAI,EAAE;AAC1D,QAAM,mBAAmB,SAAS,cAAc;AAChD,QAAM,gBAAgB,mBAAmB,IAAI,KAAK;AAClD,QAAM,mBAAoB,QAAQ,MAAO;AACzC,QAAM,SAAS,gBAAgB;AAE/B,SACE,6BAAAA,QAAA,2BAAAA,QAAA,gBACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA;AAAA,IAEA,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,SAAS;AAAA,QAChB,QAAQ,SAAS;AAAA,QACjB,SAAS,OAAO,SAAS,CAAC,IAAI,SAAS,CAAC;AAAA,QACxC,WAAU;AAAA;AAAA,MAEV,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ;AAAA,UACA,MAAK;AAAA,UACL,QAAO;AAAA,UACP,eAAc;AAAA,UACd,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UACF;AAAA;AAAA,MACF;AAAA,MACC,QAAQ,IACP,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,IAAI;AAAA,UACJ;AAAA,UACA,iBAAiB,gBAAgB,MAAM;AAAA,UACvC,kBAAkB;AAAA,UAClB,MAAK;AAAA,UACL,QAAO;AAAA,UACP,eAAc;AAAA,UACd,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA,gBACI,2DACA;AAAA,UACN;AAAA;AAAA,MACF,IACE;AAAA,IACN;AAAA,IACA,6BAAAA,QAAA,cAAC,SAAI,WAAW,GAAG,yBAAyB,KAAI,QAAS;AAAA,EAC3D,CACF;AAEJ,CAAC;AAED,eAAe,cAAc;","names":["React"]}
|