@nori-ui/core 0.0.5 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/animated-view.cjs +13 -0
- package/dist/animation/animated-view.cjs.map +1 -0
- package/dist/animation/animated-view.d.cts +6 -0
- package/dist/animation/animated-view.d.ts +6 -0
- package/dist/animation/animated-view.js +4 -0
- package/dist/animation/animated-view.js.map +1 -0
- package/dist/animation/animated-view.web.cjs +9 -0
- package/dist/animation/animated-view.web.cjs.map +1 -0
- package/dist/animation/animated-view.web.d.cts +5 -0
- package/dist/animation/animated-view.web.d.ts +5 -0
- package/dist/animation/animated-view.web.js +8 -0
- package/dist/animation/animated-view.web.js.map +1 -0
- package/dist/animation/use-animated-number.cjs +80 -0
- package/dist/animation/use-animated-number.cjs.map +1 -0
- package/dist/animation/use-animated-number.d.cts +8 -0
- package/dist/animation/use-animated-number.d.ts +8 -0
- package/dist/animation/use-animated-number.js +4 -0
- package/dist/animation/use-animated-number.js.map +1 -0
- package/dist/animation/use-animated-number.web.cjs +28 -0
- package/dist/animation/use-animated-number.web.cjs.map +1 -0
- package/dist/animation/use-animated-number.web.d.cts +8 -0
- package/dist/animation/use-animated-number.web.d.ts +8 -0
- package/dist/animation/use-animated-number.web.js +25 -0
- package/dist/animation/use-animated-number.web.js.map +1 -0
- package/dist/{chunk-RX7UULY3.js → chunk-33S7ADWM.js} +3 -3
- package/dist/{chunk-RX7UULY3.js.map → chunk-33S7ADWM.js.map} +1 -1
- package/dist/chunk-3BDDPFCI.js +108 -0
- package/dist/chunk-3BDDPFCI.js.map +1 -0
- package/dist/chunk-3F4TXKDY.js +314 -0
- package/dist/chunk-3F4TXKDY.js.map +1 -0
- package/dist/chunk-5A2QOOVN.js +15 -0
- package/dist/chunk-5A2QOOVN.js.map +1 -0
- package/dist/chunk-5XEGZFG5.js +208 -0
- package/dist/chunk-5XEGZFG5.js.map +1 -0
- package/dist/chunk-6AD6KCVB.js +178 -0
- package/dist/chunk-6AD6KCVB.js.map +1 -0
- package/dist/chunk-7GPDNQSX.js +967 -0
- package/dist/chunk-7GPDNQSX.js.map +1 -0
- package/dist/chunk-7UKRN73P.js +42 -0
- package/dist/chunk-7UKRN73P.js.map +1 -0
- package/dist/chunk-7Z4NMNX6.js +64 -0
- package/dist/chunk-7Z4NMNX6.js.map +1 -0
- package/dist/chunk-ACLHDHX3.js +29 -0
- package/dist/chunk-ACLHDHX3.js.map +1 -0
- package/dist/chunk-BZLT6R62.js +80 -0
- package/dist/chunk-BZLT6R62.js.map +1 -0
- package/dist/chunk-CCUXO2HN.js +450 -0
- package/dist/chunk-CCUXO2HN.js.map +1 -0
- package/dist/chunk-CHXHRJNZ.js +43 -0
- package/dist/chunk-CHXHRJNZ.js.map +1 -0
- package/dist/chunk-DDGMLLS3.js +188 -0
- package/dist/chunk-DDGMLLS3.js.map +1 -0
- package/dist/chunk-EWWQQ5DB.js +654 -0
- package/dist/chunk-EWWQQ5DB.js.map +1 -0
- package/dist/chunk-FEPTH5RV.js +169 -0
- package/dist/chunk-FEPTH5RV.js.map +1 -0
- package/dist/{chunk-SSTXLK5I.js → chunk-FT2XBBQJ.js} +42 -6
- package/dist/chunk-FT2XBBQJ.js.map +1 -0
- package/dist/chunk-IKLA2CVQ.js +260 -0
- package/dist/chunk-IKLA2CVQ.js.map +1 -0
- package/dist/chunk-JQQ3FBN7.js +18 -0
- package/dist/chunk-JQQ3FBN7.js.map +1 -0
- package/dist/chunk-JSAG5YO7.js +69 -0
- package/dist/chunk-JSAG5YO7.js.map +1 -0
- package/dist/chunk-JZ774T7U.js +76 -0
- package/dist/chunk-JZ774T7U.js.map +1 -0
- package/dist/chunk-KWRDJPP3.js +10 -0
- package/dist/chunk-KWRDJPP3.js.map +1 -0
- package/dist/chunk-LVWNMQGR.js +1106 -0
- package/dist/chunk-LVWNMQGR.js.map +1 -0
- package/dist/chunk-LWLK6HSW.js +143 -0
- package/dist/chunk-LWLK6HSW.js.map +1 -0
- package/dist/chunk-MDOZGILD.js +134 -0
- package/dist/chunk-MDOZGILD.js.map +1 -0
- package/dist/chunk-MKSDYRWQ.js +446 -0
- package/dist/chunk-MKSDYRWQ.js.map +1 -0
- package/dist/chunk-MRJWPRCX.js +80 -0
- package/dist/chunk-MRJWPRCX.js.map +1 -0
- package/dist/chunk-NRYWNOG5.js +410 -0
- package/dist/chunk-NRYWNOG5.js.map +1 -0
- package/dist/chunk-OMU4R4Y5.js +144 -0
- package/dist/chunk-OMU4R4Y5.js.map +1 -0
- package/dist/chunk-PNP7L4TA.js +103 -0
- package/dist/chunk-PNP7L4TA.js.map +1 -0
- package/dist/chunk-QI6646JZ.js +3 -0
- package/dist/{chunk-UAKFCMWK.js.map → chunk-QI6646JZ.js.map} +1 -1
- package/dist/chunk-QJNV7YQP.js +138 -0
- package/dist/chunk-QJNV7YQP.js.map +1 -0
- package/dist/chunk-R5JMDDCB.js +292 -0
- package/dist/chunk-R5JMDDCB.js.map +1 -0
- package/dist/chunk-RB3YBWQ4.js +77 -0
- package/dist/chunk-RB3YBWQ4.js.map +1 -0
- package/dist/chunk-RFW5SRZA.js +23 -0
- package/dist/chunk-RFW5SRZA.js.map +1 -0
- package/dist/chunk-RGJ3NBKE.js +8 -0
- package/dist/chunk-RGJ3NBKE.js.map +1 -0
- package/dist/chunk-SFNDR6DI.js +485 -0
- package/dist/chunk-SFNDR6DI.js.map +1 -0
- package/dist/chunk-SWC5CNKE.js +13 -0
- package/dist/chunk-SWC5CNKE.js.map +1 -0
- package/dist/chunk-TLS54G6Y.js +15 -0
- package/dist/chunk-TLS54G6Y.js.map +1 -0
- package/dist/chunk-WCQVDF3K.js +12 -0
- package/dist/{chunk-7QVYU63E.js.map → chunk-WCQVDF3K.js.map} +1 -1
- package/dist/chunk-WGT345SV.js +427 -0
- package/dist/chunk-WGT345SV.js.map +1 -0
- package/dist/chunk-X7APG7G2.js +1566 -0
- package/dist/chunk-X7APG7G2.js.map +1 -0
- package/dist/chunk-XALU6LOT.js +306 -0
- package/dist/chunk-XALU6LOT.js.map +1 -0
- package/dist/chunk-YNKKEO2A.js +336 -0
- package/dist/chunk-YNKKEO2A.js.map +1 -0
- package/dist/chunk-ZBW3BA5R.js +148 -0
- package/dist/chunk-ZBW3BA5R.js.map +1 -0
- package/dist/{chunk-FXKIWONG.js → chunk-ZIBNLXIV.js} +12 -6
- package/dist/chunk-ZIBNLXIV.js.map +1 -0
- package/dist/chunk-ZMSIYLSI.js +563 -0
- package/dist/chunk-ZMSIYLSI.js.map +1 -0
- package/dist/chunk-ZQMNGPLE.js +981 -0
- package/dist/chunk-ZQMNGPLE.js.map +1 -0
- package/dist/chunk-ZRD4FQBT.js +153 -0
- package/dist/chunk-ZRD4FQBT.js.map +1 -0
- package/dist/client.cjs +11289 -439
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +68 -117
- package/dist/client.d.ts +68 -117
- package/dist/client.js +58 -40
- package/dist/client.js.map +1 -1
- package/dist/components/Accordion/index.cjs +900 -0
- package/dist/components/Accordion/index.cjs.map +1 -0
- package/dist/components/Accordion/index.d.cts +72 -0
- package/dist/components/Accordion/index.d.ts +72 -0
- package/dist/components/Accordion/index.js +10 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Alert/index.cjs +567 -0
- package/dist/components/Alert/index.cjs.map +1 -0
- package/dist/components/Alert/index.d.cts +41 -0
- package/dist/components/Alert/index.d.ts +41 -0
- package/dist/components/Alert/index.js +8 -0
- package/dist/components/Alert/index.js.map +1 -0
- package/dist/components/AlertDialog/index.cjs +892 -0
- package/dist/components/AlertDialog/index.cjs.map +1 -0
- package/dist/components/AlertDialog/index.d.cts +68 -0
- package/dist/components/AlertDialog/index.d.ts +68 -0
- package/dist/components/AlertDialog/index.js +9 -0
- package/dist/components/AlertDialog/index.js.map +1 -0
- package/dist/components/Avatar/index.cjs +427 -0
- package/dist/components/Avatar/index.cjs.map +1 -0
- package/dist/components/Avatar/index.d.cts +40 -0
- package/dist/components/Avatar/index.d.ts +40 -0
- package/dist/components/Avatar/index.js +7 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/index.cjs +433 -0
- package/dist/components/Badge/index.cjs.map +1 -0
- package/dist/components/Badge/index.d.cts +35 -0
- package/dist/components/Badge/index.d.ts +35 -0
- package/dist/components/Badge/index.js +7 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Box/index.cjs +415 -0
- package/dist/components/Box/index.cjs.map +1 -0
- package/dist/components/Box/index.d.cts +24 -0
- package/dist/components/Box/index.d.ts +24 -0
- package/dist/components/Box/index.js +9 -0
- package/dist/components/Box/index.js.map +1 -0
- package/dist/components/Breadcrumb/index.cjs +1939 -0
- package/dist/components/Breadcrumb/index.cjs.map +1 -0
- package/dist/components/Breadcrumb/index.d.cts +186 -0
- package/dist/components/Breadcrumb/index.d.ts +186 -0
- package/dist/components/Breadcrumb/index.js +11 -0
- package/dist/components/Breadcrumb/index.js.map +1 -0
- package/dist/components/Button/index.cjs +631 -0
- package/dist/components/Button/index.cjs.map +1 -0
- package/dist/components/Button/index.d.cts +27 -0
- package/dist/components/Button/index.d.ts +27 -0
- package/dist/components/Button/index.js +9 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Calendar/index.cjs +3017 -0
- package/dist/components/Calendar/index.cjs.map +1 -0
- package/dist/components/Calendar/index.d.cts +169 -0
- package/dist/components/Calendar/index.d.ts +169 -0
- package/dist/components/Calendar/index.js +11 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Card/index.cjs +469 -0
- package/dist/components/Card/index.cjs.map +1 -0
- package/dist/components/Card/index.d.cts +33 -0
- package/dist/components/Card/index.d.ts +33 -0
- package/dist/components/Card/index.js +7 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Checkbox/index.cjs +590 -0
- package/dist/components/Checkbox/index.cjs.map +1 -0
- package/dist/components/Checkbox/index.d.cts +22 -0
- package/dist/components/Checkbox/index.d.ts +22 -0
- package/dist/components/Checkbox/index.js +9 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Dialog/index.cjs +888 -0
- package/dist/components/Dialog/index.cjs.map +1 -0
- package/dist/components/Dialog/index.d.cts +56 -0
- package/dist/components/Dialog/index.d.ts +56 -0
- package/dist/components/Dialog/index.js +10 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/FloatButton/index.cjs +1254 -0
- package/dist/components/FloatButton/index.cjs.map +1 -0
- package/dist/components/FloatButton/index.d.cts +133 -0
- package/dist/components/FloatButton/index.d.ts +133 -0
- package/dist/components/FloatButton/index.js +11 -0
- package/dist/components/FloatButton/index.js.map +1 -0
- package/dist/components/HStack/index.cjs +480 -0
- package/dist/components/HStack/index.cjs.map +1 -0
- package/dist/components/HStack/index.d.cts +24 -0
- package/dist/components/HStack/index.d.ts +24 -0
- package/dist/components/HStack/index.js +9 -0
- package/dist/components/HStack/index.js.map +1 -0
- package/dist/components/InputGroup/index.cjs +638 -0
- package/dist/components/InputGroup/index.cjs.map +1 -0
- package/dist/components/InputGroup/index.d.cts +33 -0
- package/dist/components/InputGroup/index.d.ts +33 -0
- package/dist/components/InputGroup/index.js +7 -0
- package/dist/components/InputGroup/index.js.map +1 -0
- package/dist/components/Pagination/index.cjs +2501 -0
- package/dist/components/Pagination/index.cjs.map +1 -0
- package/dist/components/Pagination/index.d.cts +164 -0
- package/dist/components/Pagination/index.d.ts +164 -0
- package/dist/components/Pagination/index.js +12 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Popover/index.cjs +739 -0
- package/dist/components/Popover/index.cjs.map +1 -0
- package/dist/components/Popover/index.d.cts +44 -0
- package/dist/components/Popover/index.d.ts +44 -0
- package/dist/components/Popover/index.js +8 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Progress/index.cjs +493 -0
- package/dist/components/Progress/index.cjs.map +1 -0
- package/dist/components/Progress/index.d.cts +63 -0
- package/dist/components/Progress/index.d.ts +63 -0
- package/dist/components/Progress/index.js +7 -0
- package/dist/components/Progress/index.js.map +1 -0
- package/dist/components/Radio/index.cjs +584 -0
- package/dist/components/Radio/index.cjs.map +1 -0
- package/dist/components/Radio/index.d.cts +51 -0
- package/dist/components/Radio/index.d.ts +51 -0
- package/dist/components/Radio/index.js +7 -0
- package/dist/components/Radio/index.js.map +1 -0
- package/dist/components/SegmentedControl/index.cjs +502 -0
- package/dist/components/SegmentedControl/index.cjs.map +1 -0
- package/dist/components/SegmentedControl/index.d.cts +45 -0
- package/dist/components/SegmentedControl/index.d.ts +45 -0
- package/dist/components/SegmentedControl/index.js +7 -0
- package/dist/components/SegmentedControl/index.js.map +1 -0
- package/dist/components/Select/index.cjs +1359 -0
- package/dist/components/Select/index.cjs.map +1 -0
- package/dist/components/Select/index.d.cts +140 -0
- package/dist/components/Select/index.d.ts +140 -0
- package/dist/components/Select/index.js +8 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Separator/index.cjs +358 -0
- package/dist/components/Separator/index.cjs.map +1 -0
- package/dist/components/Separator/index.d.cts +28 -0
- package/dist/components/Separator/index.d.ts +28 -0
- package/dist/components/Separator/index.js +6 -0
- package/dist/components/Separator/index.js.map +1 -0
- package/dist/components/Skeleton/index.cjs +384 -0
- package/dist/components/Skeleton/index.cjs.map +1 -0
- package/dist/components/Skeleton/index.d.cts +30 -0
- package/dist/components/Skeleton/index.d.ts +30 -0
- package/dist/components/Skeleton/index.js +6 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Slider/index.cjs +880 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +84 -0
- package/dist/components/Slider/index.d.ts +84 -0
- package/dist/components/Slider/index.js +6 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Spinner/index.cjs +32 -0
- package/dist/components/Spinner/index.cjs.map +1 -0
- package/dist/components/Spinner/index.d.cts +25 -0
- package/dist/components/Spinner/index.d.ts +25 -0
- package/dist/components/Spinner/index.js +4 -0
- package/dist/components/Spinner/index.js.map +1 -0
- package/dist/components/Switch/index.cjs +623 -0
- package/dist/components/Switch/index.cjs.map +1 -0
- package/dist/components/Switch/index.d.cts +22 -0
- package/dist/components/Switch/index.d.ts +22 -0
- package/dist/components/Switch/index.js +10 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Tabs/index.cjs +630 -0
- package/dist/components/Tabs/index.cjs.map +1 -0
- package/dist/components/Tabs/index.d.cts +63 -0
- package/dist/components/Tabs/index.d.ts +63 -0
- package/dist/components/Tabs/index.js +7 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Text/index.cjs +401 -0
- package/dist/components/Text/index.cjs.map +1 -0
- package/dist/components/Text/index.d.cts +24 -0
- package/dist/components/Text/index.d.ts +24 -0
- package/dist/components/Text/index.js +7 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/TextArea/index.cjs +482 -0
- package/dist/components/TextArea/index.cjs.map +1 -0
- package/dist/components/TextArea/index.d.cts +25 -0
- package/dist/components/TextArea/index.d.ts +25 -0
- package/dist/components/TextArea/index.js +8 -0
- package/dist/components/TextArea/index.js.map +1 -0
- package/dist/components/TextInput/index.cjs +477 -0
- package/dist/components/TextInput/index.cjs.map +1 -0
- package/dist/components/TextInput/index.d.cts +33 -0
- package/dist/components/TextInput/index.d.ts +33 -0
- package/dist/components/TextInput/index.js +7 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/Toast/index.cjs +167 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.cts +143 -0
- package/dist/components/Toast/index.d.ts +143 -0
- package/dist/components/Toast/index.js +4 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toggle/index.cjs +770 -0
- package/dist/components/Toggle/index.cjs.map +1 -0
- package/dist/components/Toggle/index.d.cts +83 -0
- package/dist/components/Toggle/index.d.ts +83 -0
- package/dist/components/Toggle/index.js +7 -0
- package/dist/components/Toggle/index.js.map +1 -0
- package/dist/components/Tooltip/index.cjs +813 -0
- package/dist/components/Tooltip/index.cjs.map +1 -0
- package/dist/components/Tooltip/index.d.cts +55 -0
- package/dist/components/Tooltip/index.d.ts +55 -0
- package/dist/components/Tooltip/index.js +8 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/VStack/index.cjs +480 -0
- package/dist/components/VStack/index.cjs.map +1 -0
- package/dist/components/VStack/index.d.cts +19 -0
- package/dist/components/VStack/index.d.ts +19 -0
- package/dist/components/VStack/index.js +9 -0
- package/dist/components/VStack/index.js.map +1 -0
- package/dist/i18n/index.cjs +39 -3
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +4 -60
- package/dist/i18n/index.d.ts +4 -60
- package/dist/i18n/index.js +3 -2
- package/dist/icons/index.cjs +326 -26
- package/dist/icons/index.cjs.map +1 -1
- package/dist/icons/index.js +4 -3
- package/dist/index-D3_M3G6U.d.ts +19 -0
- package/dist/index-uXPK_Rg8.d.cts +19 -0
- package/dist/index.cjs +11176 -463
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -183
- package/dist/index.d.ts +39 -183
- package/dist/index.js +49 -9
- package/dist/resolve-D-GOaxZy.d.cts +60 -0
- package/dist/resolve-D-GOaxZy.d.ts +60 -0
- package/dist/slot/index.cjs +9 -3
- package/dist/slot/index.cjs.map +1 -1
- package/dist/slot/index.js +2 -2
- package/dist/stories/index.cjs +108 -0
- package/dist/stories/index.cjs.map +1 -0
- package/dist/stories/index.d.cts +46 -0
- package/dist/stories/index.d.ts +46 -0
- package/dist/stories/index.js +94 -0
- package/dist/stories/index.js.map +1 -0
- package/dist/theme/index.cjs +259 -26
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.cts +26 -0
- package/dist/theme/index.d.ts +26 -0
- package/dist/theme/index.js +4 -3
- package/dist/use-theme-CoqfnvRs.d.cts +112 -0
- package/dist/use-theme-CoqfnvRs.d.ts +112 -0
- package/dist/utils/cn.cjs +18 -6
- package/dist/utils/cn.cjs.map +1 -1
- package/dist/utils/cn.js +2 -2
- package/package.json +41 -10
- package/dist/chunk-6OABNXBY.js +0 -213
- package/dist/chunk-6OABNXBY.js.map +0 -1
- package/dist/chunk-7QVYU63E.js +0 -6
- package/dist/chunk-FXKIWONG.js.map +0 -1
- package/dist/chunk-NDEDMCHT.js +0 -40
- package/dist/chunk-NDEDMCHT.js.map +0 -1
- package/dist/chunk-SSTXLK5I.js.map +0 -1
- package/dist/chunk-UAKFCMWK.js +0 -3
- package/dist/chunk-X3AJNNF6.js +0 -539
- package/dist/chunk-X3AJNNF6.js.map +0 -1
- package/dist/chunk-XGM2K4TT.js +0 -31
- package/dist/chunk-XGM2K4TT.js.map +0 -1
- package/dist/stories/story-registry.cjs +0 -776
- package/dist/stories/story-registry.cjs.map +0 -1
- package/dist/stories/story-registry.d.cts +0 -13
- package/dist/stories/story-registry.d.ts +0 -13
- package/dist/stories/story-registry.js +0 -106
- package/dist/stories/story-registry.js.map +0 -1
|
@@ -0,0 +1,1254 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactNative = require('react-native');
|
|
5
|
+
var jsxRuntime = require('nativewind/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
var __defProp = Object.defineProperty;
|
|
28
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
29
|
+
var isDev = process.env.NODE_ENV !== "production";
|
|
30
|
+
var SafeAreaInsetsContext = /* @__PURE__ */ React__namespace.createContext(null);
|
|
31
|
+
if (isDev) {
|
|
32
|
+
SafeAreaInsetsContext.displayName = "SafeAreaInsetsContext";
|
|
33
|
+
}
|
|
34
|
+
var SafeAreaFrameContext = /* @__PURE__ */ React__namespace.createContext(null);
|
|
35
|
+
if (isDev) {
|
|
36
|
+
SafeAreaFrameContext.displayName = "SafeAreaFrameContext";
|
|
37
|
+
}
|
|
38
|
+
reactNative.StyleSheet.create({
|
|
39
|
+
fill: {
|
|
40
|
+
flex: 1
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
SafeAreaInsetsContext.Consumer;
|
|
44
|
+
|
|
45
|
+
// src/i18n/default-dictionary.ts
|
|
46
|
+
var defaultDictionary = {
|
|
47
|
+
// generic / shared
|
|
48
|
+
"common.cancel": "Cancel",
|
|
49
|
+
"common.confirm": "Confirm",
|
|
50
|
+
"common.close": "Close",
|
|
51
|
+
"common.back": "Back",
|
|
52
|
+
"common.loading": "Loading",
|
|
53
|
+
"common.error": "Something went wrong",
|
|
54
|
+
"common.retry": "Try again",
|
|
55
|
+
// breadcrumb
|
|
56
|
+
"breadcrumb.ariaLabel": "Breadcrumb",
|
|
57
|
+
"breadcrumb.expandLabel": "Show full path",
|
|
58
|
+
"breadcrumb.ellipsisLabel": "More",
|
|
59
|
+
"breadcrumb.currentPageLabel": "Current page",
|
|
60
|
+
"breadcrumb.siblingMenuLabel": "Open sibling pages",
|
|
61
|
+
// pagination
|
|
62
|
+
"pagination.ariaLabel": "Pagination",
|
|
63
|
+
"pagination.previous": "Previous page",
|
|
64
|
+
"pagination.next": "Next page",
|
|
65
|
+
"pagination.first": "First page",
|
|
66
|
+
"pagination.last": "Last page",
|
|
67
|
+
"pagination.ellipsis": "More pages",
|
|
68
|
+
"pagination.currentPage": "Current page",
|
|
69
|
+
"pagination.gotoPage": "Go to page {{page}}",
|
|
70
|
+
"pagination.range": "Showing {{from}}\u2013{{to}} of {{total}}",
|
|
71
|
+
"pagination.pageOf": "Page {{page}} of {{total}}",
|
|
72
|
+
"pagination.pageSizeLabel": "Items per page",
|
|
73
|
+
"pagination.jumperLabel": "Go to page",
|
|
74
|
+
"pagination.jumperPlaceholder": "#",
|
|
75
|
+
// floatButton
|
|
76
|
+
"floatButton.backToTop": "Back to top",
|
|
77
|
+
// calendar
|
|
78
|
+
"calendar.header.previous": "Previous",
|
|
79
|
+
"calendar.header.next": "Next",
|
|
80
|
+
"calendar.header.openMonthView": "Open month picker",
|
|
81
|
+
"calendar.header.openYearView": "Open year picker",
|
|
82
|
+
"calendar.header.openDayView": "Open day picker",
|
|
83
|
+
"calendar.today": "Today",
|
|
84
|
+
"calendar.clear": "Clear",
|
|
85
|
+
// button
|
|
86
|
+
"button.loadingLabel": "Loading",
|
|
87
|
+
// input
|
|
88
|
+
"input.clear": "Clear",
|
|
89
|
+
"input.passwordShow": "Show password",
|
|
90
|
+
"input.passwordHide": "Hide password",
|
|
91
|
+
// checkbox / switch
|
|
92
|
+
"checkbox.checked": "Checked",
|
|
93
|
+
"checkbox.unchecked": "Unchecked",
|
|
94
|
+
"switch.on": "On",
|
|
95
|
+
"switch.off": "Off"
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// src/i18n/resolve.ts
|
|
99
|
+
function resolveI18n(input, defaults) {
|
|
100
|
+
if (typeof input === "function") {
|
|
101
|
+
return (keyOrKeys, options) => input(keyOrKeys, options);
|
|
102
|
+
}
|
|
103
|
+
const dict = input ?? {};
|
|
104
|
+
return (keyOrKeys, options) => {
|
|
105
|
+
const keys = Array.isArray(keyOrKeys) ? keyOrKeys : [keyOrKeys];
|
|
106
|
+
for (const rawKey of keys) {
|
|
107
|
+
const key = pluralize(rawKey, options?.count);
|
|
108
|
+
const template = dict[key] ?? defaults[key];
|
|
109
|
+
if (template !== void 0) {
|
|
110
|
+
return interpolate(template, options);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const lastKey = keys[keys.length - 1];
|
|
114
|
+
if (options?.defaultValue !== void 0) {
|
|
115
|
+
return interpolate(options.defaultValue, options);
|
|
116
|
+
}
|
|
117
|
+
return lastKey ?? "";
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
__name(resolveI18n, "resolveI18n");
|
|
121
|
+
function pluralize(key, count) {
|
|
122
|
+
if (count === void 0) {
|
|
123
|
+
return key;
|
|
124
|
+
}
|
|
125
|
+
if (count === 1) {
|
|
126
|
+
return `${key}_one`;
|
|
127
|
+
}
|
|
128
|
+
return `${key}_other`;
|
|
129
|
+
}
|
|
130
|
+
__name(pluralize, "pluralize");
|
|
131
|
+
function interpolate(template, options) {
|
|
132
|
+
if (!options) {
|
|
133
|
+
return template;
|
|
134
|
+
}
|
|
135
|
+
return template.replace(/\{\{\s*([A-Za-z0-9_.-]+)\s*\}\}/g, (_match, name) => {
|
|
136
|
+
const value = options[name];
|
|
137
|
+
return value === void 0 || value === null ? "" : String(value);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
__name(interpolate, "interpolate");
|
|
141
|
+
var defaultValue = {
|
|
142
|
+
t: resolveI18n(void 0, defaultDictionary)
|
|
143
|
+
};
|
|
144
|
+
var I18nContext = React.createContext(defaultValue);
|
|
145
|
+
I18nContext.displayName = "I18nContext";
|
|
146
|
+
|
|
147
|
+
// src/i18n/use-translation.ts
|
|
148
|
+
function useTranslation() {
|
|
149
|
+
return React.useContext(I18nContext);
|
|
150
|
+
}
|
|
151
|
+
__name(useTranslation, "useTranslation");
|
|
152
|
+
|
|
153
|
+
// ../tokens/build/theme.ts
|
|
154
|
+
var theme = {
|
|
155
|
+
color: {
|
|
156
|
+
danger: "#ef4444",
|
|
157
|
+
info: "#3b82f6",
|
|
158
|
+
neutral: {
|
|
159
|
+
"100": "#f4f4f5",
|
|
160
|
+
"200": "#e4e4e7",
|
|
161
|
+
"300": "#d4d4d8",
|
|
162
|
+
"400": "#a1a1aa",
|
|
163
|
+
"50": "#fafafa",
|
|
164
|
+
"500": "#71717a",
|
|
165
|
+
"600": "#52525b",
|
|
166
|
+
"700": "#3f3f46",
|
|
167
|
+
"800": "#27272a",
|
|
168
|
+
"900": "#18181b"
|
|
169
|
+
},
|
|
170
|
+
primary: {
|
|
171
|
+
"100": "#ccfbf1",
|
|
172
|
+
"200": "#99f6e4",
|
|
173
|
+
"300": "#5eead4",
|
|
174
|
+
"400": "#2dd4bf",
|
|
175
|
+
"50": "#f0fdfa",
|
|
176
|
+
"500": "#14b8a6",
|
|
177
|
+
"600": "#0d9488",
|
|
178
|
+
"700": "#0f766e",
|
|
179
|
+
"800": "#115e59",
|
|
180
|
+
"900": "#134e4a"
|
|
181
|
+
},
|
|
182
|
+
success: "#22c55e",
|
|
183
|
+
warning: "#f59e0b"
|
|
184
|
+
},
|
|
185
|
+
fontFamily: {
|
|
186
|
+
body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
187
|
+
display: "ui-serif, Georgia, 'Times New Roman', serif",
|
|
188
|
+
mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
|
|
189
|
+
},
|
|
190
|
+
fontSize: {
|
|
191
|
+
"2xl": "24px",
|
|
192
|
+
"3xl": "30px",
|
|
193
|
+
"4xl": "36px",
|
|
194
|
+
lg: "18px",
|
|
195
|
+
md: "16px",
|
|
196
|
+
sm: "14px",
|
|
197
|
+
xl: "20px",
|
|
198
|
+
xs: "12px"
|
|
199
|
+
},
|
|
200
|
+
fontWeight: {
|
|
201
|
+
bold: "700",
|
|
202
|
+
medium: "500",
|
|
203
|
+
regular: "400",
|
|
204
|
+
semibold: "600"
|
|
205
|
+
},
|
|
206
|
+
lineHeight: {
|
|
207
|
+
normal: "1.4",
|
|
208
|
+
relaxed: "1.6",
|
|
209
|
+
tight: "1.2"
|
|
210
|
+
},
|
|
211
|
+
radius: {
|
|
212
|
+
"2xl": "16px",
|
|
213
|
+
full: "9999px",
|
|
214
|
+
lg: "8px",
|
|
215
|
+
md: "6px",
|
|
216
|
+
none: "0px",
|
|
217
|
+
sm: "4px",
|
|
218
|
+
xl: "12px"
|
|
219
|
+
},
|
|
220
|
+
semantic: {
|
|
221
|
+
background: {
|
|
222
|
+
default: "#fafafa",
|
|
223
|
+
elevated: "#ffffff",
|
|
224
|
+
subtle: "#f4f4f5"
|
|
225
|
+
},
|
|
226
|
+
border: {
|
|
227
|
+
default: "#e4e4e7",
|
|
228
|
+
strong: "#d4d4d8"
|
|
229
|
+
},
|
|
230
|
+
interactive: {
|
|
231
|
+
destructive: "#ef4444",
|
|
232
|
+
primary: "#0d9488",
|
|
233
|
+
primaryHover: "#0f766e",
|
|
234
|
+
primaryPressed: "#115e59"
|
|
235
|
+
},
|
|
236
|
+
text: {
|
|
237
|
+
default: "#18181b",
|
|
238
|
+
inverted: "#fafafa",
|
|
239
|
+
muted: "#52525b"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
shadow: {
|
|
243
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
|
|
244
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
|
|
245
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
|
|
246
|
+
},
|
|
247
|
+
spacing: {
|
|
248
|
+
"0": "0px",
|
|
249
|
+
"1": "4px",
|
|
250
|
+
"10": "40px",
|
|
251
|
+
"12": "48px",
|
|
252
|
+
"16": "64px",
|
|
253
|
+
"2": "8px",
|
|
254
|
+
"20": "80px",
|
|
255
|
+
"24": "96px",
|
|
256
|
+
"3": "12px",
|
|
257
|
+
"4": "16px",
|
|
258
|
+
"5": "20px",
|
|
259
|
+
"6": "24px",
|
|
260
|
+
"8": "32px"
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
var themeDark = {
|
|
264
|
+
color: {
|
|
265
|
+
danger: "#ef4444",
|
|
266
|
+
info: "#3b82f6",
|
|
267
|
+
neutral: {
|
|
268
|
+
"100": "#f4f4f5",
|
|
269
|
+
"200": "#e4e4e7",
|
|
270
|
+
"300": "#d4d4d8",
|
|
271
|
+
"400": "#a1a1aa",
|
|
272
|
+
"50": "#fafafa",
|
|
273
|
+
"500": "#71717a",
|
|
274
|
+
"600": "#52525b",
|
|
275
|
+
"700": "#3f3f46",
|
|
276
|
+
"800": "#27272a",
|
|
277
|
+
"900": "#18181b"
|
|
278
|
+
},
|
|
279
|
+
primary: {
|
|
280
|
+
"100": "#ccfbf1",
|
|
281
|
+
"200": "#99f6e4",
|
|
282
|
+
"300": "#5eead4",
|
|
283
|
+
"400": "#2dd4bf",
|
|
284
|
+
"50": "#f0fdfa",
|
|
285
|
+
"500": "#14b8a6",
|
|
286
|
+
"600": "#0d9488",
|
|
287
|
+
"700": "#0f766e",
|
|
288
|
+
"800": "#115e59",
|
|
289
|
+
"900": "#134e4a"
|
|
290
|
+
},
|
|
291
|
+
success: "#22c55e",
|
|
292
|
+
warning: "#f59e0b"
|
|
293
|
+
},
|
|
294
|
+
fontFamily: {
|
|
295
|
+
body: "system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
|
|
296
|
+
display: "ui-serif, Georgia, 'Times New Roman', serif",
|
|
297
|
+
mono: "ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace"
|
|
298
|
+
},
|
|
299
|
+
fontSize: {
|
|
300
|
+
"2xl": "24px",
|
|
301
|
+
"3xl": "30px",
|
|
302
|
+
"4xl": "36px",
|
|
303
|
+
lg: "18px",
|
|
304
|
+
md: "16px",
|
|
305
|
+
sm: "14px",
|
|
306
|
+
xl: "20px",
|
|
307
|
+
xs: "12px"
|
|
308
|
+
},
|
|
309
|
+
fontWeight: {
|
|
310
|
+
bold: "700",
|
|
311
|
+
medium: "500",
|
|
312
|
+
regular: "400",
|
|
313
|
+
semibold: "600"
|
|
314
|
+
},
|
|
315
|
+
lineHeight: {
|
|
316
|
+
normal: "1.4",
|
|
317
|
+
relaxed: "1.6",
|
|
318
|
+
tight: "1.2"
|
|
319
|
+
},
|
|
320
|
+
radius: {
|
|
321
|
+
"2xl": "16px",
|
|
322
|
+
full: "9999px",
|
|
323
|
+
lg: "8px",
|
|
324
|
+
md: "6px",
|
|
325
|
+
none: "0px",
|
|
326
|
+
sm: "4px",
|
|
327
|
+
xl: "12px"
|
|
328
|
+
},
|
|
329
|
+
semantic: {
|
|
330
|
+
background: {
|
|
331
|
+
default: "#18181b",
|
|
332
|
+
elevated: "#3f3f46",
|
|
333
|
+
subtle: "#27272a"
|
|
334
|
+
},
|
|
335
|
+
border: {
|
|
336
|
+
default: "#3f3f46",
|
|
337
|
+
strong: "#52525b"
|
|
338
|
+
},
|
|
339
|
+
interactive: {
|
|
340
|
+
destructive: "#ef4444",
|
|
341
|
+
primary: "#2dd4bf",
|
|
342
|
+
primaryHover: "#5eead4",
|
|
343
|
+
primaryPressed: "#99f6e4"
|
|
344
|
+
},
|
|
345
|
+
text: {
|
|
346
|
+
default: "#fafafa",
|
|
347
|
+
inverted: "#18181b",
|
|
348
|
+
muted: "#a1a1aa"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
shadow: {
|
|
352
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",
|
|
353
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",
|
|
354
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)"
|
|
355
|
+
},
|
|
356
|
+
spacing: {
|
|
357
|
+
"0": "0px",
|
|
358
|
+
"1": "4px",
|
|
359
|
+
"10": "40px",
|
|
360
|
+
"12": "48px",
|
|
361
|
+
"16": "64px",
|
|
362
|
+
"2": "8px",
|
|
363
|
+
"20": "80px",
|
|
364
|
+
"24": "96px",
|
|
365
|
+
"3": "12px",
|
|
366
|
+
"4": "16px",
|
|
367
|
+
"5": "20px",
|
|
368
|
+
"6": "24px",
|
|
369
|
+
"8": "32px"
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
var defaultTheme = {
|
|
373
|
+
light: theme,
|
|
374
|
+
dark: themeDark
|
|
375
|
+
};
|
|
376
|
+
var ThemeContext = React.createContext(defaultTheme);
|
|
377
|
+
ThemeContext.displayName = "ThemeContext";
|
|
378
|
+
var ColorSchemeOverrideContext = React.createContext(null);
|
|
379
|
+
ColorSchemeOverrideContext.displayName = "ColorSchemeOverrideContext";
|
|
380
|
+
var isWeb = reactNative.Platform.OS === "web";
|
|
381
|
+
function readWebScheme() {
|
|
382
|
+
if (typeof document === "undefined") {
|
|
383
|
+
return "light";
|
|
384
|
+
}
|
|
385
|
+
const root = document.documentElement;
|
|
386
|
+
if (root.classList.contains("dark")) {
|
|
387
|
+
return "dark";
|
|
388
|
+
}
|
|
389
|
+
if (root.getAttribute("data-theme") === "dark") {
|
|
390
|
+
return "dark";
|
|
391
|
+
}
|
|
392
|
+
return "light";
|
|
393
|
+
}
|
|
394
|
+
__name(readWebScheme, "readWebScheme");
|
|
395
|
+
function useColorScheme() {
|
|
396
|
+
const override = React.useContext(ColorSchemeOverrideContext);
|
|
397
|
+
const [scheme, setScheme] = React.useState(() => {
|
|
398
|
+
if (isWeb) {
|
|
399
|
+
return readWebScheme();
|
|
400
|
+
}
|
|
401
|
+
return reactNative.Appearance.getColorScheme() ?? "light";
|
|
402
|
+
});
|
|
403
|
+
React.useEffect(() => {
|
|
404
|
+
if (isWeb) {
|
|
405
|
+
const root = document.documentElement;
|
|
406
|
+
const update = /* @__PURE__ */ __name(() => setScheme(readWebScheme()), "update");
|
|
407
|
+
const observer = new MutationObserver(update);
|
|
408
|
+
observer.observe(root, { attributes: true, attributeFilter: ["class", "data-theme"] });
|
|
409
|
+
update();
|
|
410
|
+
return () => observer.disconnect();
|
|
411
|
+
}
|
|
412
|
+
const sub = reactNative.Appearance.addChangeListener(({ colorScheme }) => {
|
|
413
|
+
setScheme(colorScheme ?? "light");
|
|
414
|
+
});
|
|
415
|
+
return () => sub.remove();
|
|
416
|
+
}, []);
|
|
417
|
+
return override ?? scheme;
|
|
418
|
+
}
|
|
419
|
+
__name(useColorScheme, "useColorScheme");
|
|
420
|
+
|
|
421
|
+
// src/theme/use-theme-colors.ts
|
|
422
|
+
function useThemeColors() {
|
|
423
|
+
const scheme = useColorScheme();
|
|
424
|
+
const themePair = React.useContext(ThemeContext);
|
|
425
|
+
return scheme === "dark" ? themePair.dark : themePair.light;
|
|
426
|
+
}
|
|
427
|
+
__name(useThemeColors, "useThemeColors");
|
|
428
|
+
var isWeb2 = reactNative.Platform.OS === "web";
|
|
429
|
+
var make = /* @__PURE__ */ __name(({ path, glyph }) => /* @__PURE__ */ __name(function PlaceholderIcon({ size = 20, color = "currentColor" }) {
|
|
430
|
+
const colors = useThemeColors();
|
|
431
|
+
if (isWeb2) {
|
|
432
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
433
|
+
"svg",
|
|
434
|
+
{
|
|
435
|
+
width: size,
|
|
436
|
+
height: size,
|
|
437
|
+
viewBox: "0 0 24 24",
|
|
438
|
+
fill: "none",
|
|
439
|
+
stroke: color,
|
|
440
|
+
strokeWidth: "2",
|
|
441
|
+
strokeLinecap: "round",
|
|
442
|
+
strokeLinejoin: "round",
|
|
443
|
+
"aria-hidden": "true",
|
|
444
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: path })
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
const resolvedColor = color === "currentColor" ? colors.semantic.text.default : color;
|
|
449
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
450
|
+
reactNative.Text,
|
|
451
|
+
{
|
|
452
|
+
accessibilityElementsHidden: true,
|
|
453
|
+
importantForAccessibility: "no-hide-descendants",
|
|
454
|
+
style: { fontSize: size, lineHeight: size, color: resolvedColor },
|
|
455
|
+
children: glyph
|
|
456
|
+
}
|
|
457
|
+
);
|
|
458
|
+
}, "PlaceholderIcon"), "make");
|
|
459
|
+
var defaultSemanticIcons = {
|
|
460
|
+
checkmark: make({ path: "M20 6 9 17l-5-5", glyph: "\u2713" }),
|
|
461
|
+
close: make({ path: "M18 6 6 18 M6 6l12 12", glyph: "\u2715" }),
|
|
462
|
+
eye: make({
|
|
463
|
+
path: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z",
|
|
464
|
+
glyph: "\u{1F441}"
|
|
465
|
+
}),
|
|
466
|
+
eyeOff: make({
|
|
467
|
+
path: "M17.94 17.94A10 10 0 0 1 2 12s3.5-7 10-7c2 0 3.8.6 5.4 1.5 M1 1l22 22",
|
|
468
|
+
glyph: "\u{1F648}"
|
|
469
|
+
}),
|
|
470
|
+
chevronDown: make({ path: "m6 9 6 6 6-6", glyph: "\u2304" }),
|
|
471
|
+
chevronUp: make({ path: "m18 15-6-6-6 6", glyph: "\u2303" }),
|
|
472
|
+
alertTriangle: make({
|
|
473
|
+
path: "M12 9v4 M12 17h.01 M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z",
|
|
474
|
+
glyph: "\u26A0"
|
|
475
|
+
}),
|
|
476
|
+
info: make({
|
|
477
|
+
path: "M12 8h.01 M11 12h1v4h1 M12 22C6.48 22 2 17.52 2 12 2 6.48 6.48 2 12 2c5.52 0 10 4.48 10 10 0 5.52-4.48 10-10 10z",
|
|
478
|
+
glyph: "\u24D8"
|
|
479
|
+
}),
|
|
480
|
+
check: make({ path: "M20 6 9 17l-5-5", glyph: "\u2713" }),
|
|
481
|
+
x: make({ path: "M18 6 6 18 M6 6l12 12", glyph: "\u2715" })
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// src/theme/px.ts
|
|
485
|
+
function px(value) {
|
|
486
|
+
if (typeof value === "number") {
|
|
487
|
+
return value;
|
|
488
|
+
}
|
|
489
|
+
const n = Number.parseFloat(value);
|
|
490
|
+
return Number.isFinite(n) ? n : 0;
|
|
491
|
+
}
|
|
492
|
+
__name(px, "px");
|
|
493
|
+
|
|
494
|
+
// src/utils/cn.ts
|
|
495
|
+
function cn(...inputs) {
|
|
496
|
+
const out = [];
|
|
497
|
+
for (const input of inputs) {
|
|
498
|
+
append(out, input);
|
|
499
|
+
}
|
|
500
|
+
return out.join(" ");
|
|
501
|
+
}
|
|
502
|
+
__name(cn, "cn");
|
|
503
|
+
function append(out, input) {
|
|
504
|
+
if (!input) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
if (typeof input === "string") {
|
|
508
|
+
if (input.length > 0) {
|
|
509
|
+
out.push(input);
|
|
510
|
+
}
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
if (typeof input === "number") {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (Array.isArray(input)) {
|
|
517
|
+
for (const inner of input) {
|
|
518
|
+
append(out, inner);
|
|
519
|
+
}
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
if (typeof input === "object") {
|
|
523
|
+
for (const key of Object.keys(input)) {
|
|
524
|
+
if (input[key]) {
|
|
525
|
+
out.push(key);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
__name(append, "append");
|
|
531
|
+
var BASE_CONTAINER_LAYOUT = {
|
|
532
|
+
alignSelf: "flex-start",
|
|
533
|
+
flexDirection: "row",
|
|
534
|
+
alignItems: "center",
|
|
535
|
+
paddingVertical: 2,
|
|
536
|
+
// component-density literal — not from theme (no 2px spacing token)
|
|
537
|
+
borderWidth: 1,
|
|
538
|
+
borderColor: "transparent"
|
|
539
|
+
};
|
|
540
|
+
var Badge = /* @__PURE__ */ __name(({ tone = "neutral", appearance = "soft", children, className, testID }) => {
|
|
541
|
+
const colors = useThemeColors();
|
|
542
|
+
const isDark = useColorScheme() === "dark";
|
|
543
|
+
const invertedText = colors.semantic.text.inverted;
|
|
544
|
+
let palette;
|
|
545
|
+
if (tone === "neutral") {
|
|
546
|
+
palette = {
|
|
547
|
+
soft: isDark ? { bg: colors.color.neutral["800"], fg: colors.color.neutral["100"] } : { bg: colors.color.neutral["100"], fg: colors.color.neutral["700"] },
|
|
548
|
+
solid: {
|
|
549
|
+
bg: isDark ? colors.color.neutral["200"] : colors.color.neutral["700"],
|
|
550
|
+
fg: isDark ? colors.color.neutral["900"] : invertedText
|
|
551
|
+
},
|
|
552
|
+
outline: {
|
|
553
|
+
border: isDark ? colors.color.neutral["600"] : colors.color.neutral["300"],
|
|
554
|
+
fg: isDark ? colors.color.neutral["100"] : colors.color.neutral["700"]
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
} else if (tone === "primary") {
|
|
558
|
+
palette = {
|
|
559
|
+
soft: isDark ? { bg: colors.color.primary["900"], fg: colors.color.primary["200"] } : { bg: colors.color.primary["100"], fg: colors.color.primary["800"] },
|
|
560
|
+
solid: {
|
|
561
|
+
bg: isDark ? colors.color.primary["400"] : colors.color.primary["600"],
|
|
562
|
+
fg: isDark ? colors.color.primary["900"] : invertedText
|
|
563
|
+
},
|
|
564
|
+
outline: {
|
|
565
|
+
border: isDark ? colors.color.primary["400"] : colors.color.primary["300"],
|
|
566
|
+
fg: isDark ? colors.color.primary["200"] : colors.color.primary["700"]
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
} else if (tone === "success") {
|
|
570
|
+
palette = {
|
|
571
|
+
soft: isDark ? { bg: "#14532d", fg: "#bbf7d0" } : { bg: "#dcfce7", fg: "#166534" },
|
|
572
|
+
solid: { bg: colors.color.success, fg: invertedText },
|
|
573
|
+
outline: { border: colors.color.success, fg: isDark ? "#bbf7d0" : "#166534" }
|
|
574
|
+
};
|
|
575
|
+
} else if (tone === "warning") {
|
|
576
|
+
palette = {
|
|
577
|
+
soft: isDark ? { bg: "#78350f", fg: "#fde68a" } : { bg: "#fef3c7", fg: "#92400e" },
|
|
578
|
+
solid: { bg: colors.color.warning, fg: invertedText },
|
|
579
|
+
outline: { border: colors.color.warning, fg: isDark ? "#fde68a" : "#92400e" }
|
|
580
|
+
};
|
|
581
|
+
} else {
|
|
582
|
+
palette = {
|
|
583
|
+
soft: isDark ? { bg: "#7f1d1d", fg: "#fecaca" } : { bg: "#fee2e2", fg: "#991b1b" },
|
|
584
|
+
solid: { bg: colors.color.danger, fg: invertedText },
|
|
585
|
+
outline: { border: colors.color.danger, fg: isDark ? "#fecaca" : "#991b1b" }
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
const baseContainer = {
|
|
589
|
+
...BASE_CONTAINER_LAYOUT,
|
|
590
|
+
gap: px(colors.spacing["1"]),
|
|
591
|
+
paddingHorizontal: px(colors.spacing["2"]),
|
|
592
|
+
borderRadius: px(colors.radius.full)
|
|
593
|
+
};
|
|
594
|
+
const containerStyle = (() => {
|
|
595
|
+
if (appearance === "solid") {
|
|
596
|
+
return { ...baseContainer, backgroundColor: palette.solid.bg };
|
|
597
|
+
}
|
|
598
|
+
if (appearance === "outline") {
|
|
599
|
+
return { ...baseContainer, backgroundColor: "transparent", borderColor: palette.outline.border };
|
|
600
|
+
}
|
|
601
|
+
return { ...baseContainer, backgroundColor: palette.soft.bg };
|
|
602
|
+
})();
|
|
603
|
+
const textColor = (() => {
|
|
604
|
+
if (appearance === "solid") {
|
|
605
|
+
return palette.solid.fg;
|
|
606
|
+
}
|
|
607
|
+
if (appearance === "outline") {
|
|
608
|
+
return palette.outline.fg;
|
|
609
|
+
}
|
|
610
|
+
return palette.soft.fg;
|
|
611
|
+
})();
|
|
612
|
+
const baseText = {
|
|
613
|
+
fontFamily: colors.fontFamily.body,
|
|
614
|
+
fontSize: px(colors.fontSize.xs),
|
|
615
|
+
fontWeight: colors.fontWeight.medium,
|
|
616
|
+
lineHeight: px(colors.fontSize.xs) * Number(colors.lineHeight.normal)
|
|
617
|
+
};
|
|
618
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
619
|
+
reactNative.View,
|
|
620
|
+
{
|
|
621
|
+
...testID !== void 0 ? { testID } : {},
|
|
622
|
+
className: cn("inline-flex flex-row items-center gap-1 rounded-full px-2 py-0.5 border", className),
|
|
623
|
+
style: containerStyle,
|
|
624
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { ...baseText, color: textColor }, children })
|
|
625
|
+
}
|
|
626
|
+
);
|
|
627
|
+
}, "Badge");
|
|
628
|
+
var FloatButtonGroupContext = React.createContext(null);
|
|
629
|
+
var SIZE_MAP = {
|
|
630
|
+
small: { diameter: 40, iconSize: 18, fontSize: 14, padX: 16 },
|
|
631
|
+
medium: { diameter: 56, iconSize: 22, fontSize: 14, padX: 20 },
|
|
632
|
+
large: { diameter: 72, iconSize: 28, fontSize: 16, padX: 28 }
|
|
633
|
+
};
|
|
634
|
+
var DEFAULT_OFFSET_WEB = 24;
|
|
635
|
+
var DEFAULT_OFFSET_NATIVE = 16;
|
|
636
|
+
var FloatButtonRoot = /* @__PURE__ */ __name((props) => {
|
|
637
|
+
const groupCtx = React.useContext(FloatButtonGroupContext);
|
|
638
|
+
const colors = useThemeColors();
|
|
639
|
+
const insets = React.useContext(SafeAreaInsetsContext) ?? { top: 0, bottom: 0};
|
|
640
|
+
const { width: viewportWidth } = reactNative.useWindowDimensions();
|
|
641
|
+
const {
|
|
642
|
+
icon,
|
|
643
|
+
label,
|
|
644
|
+
accessibilityLabel,
|
|
645
|
+
shape: shapeProp,
|
|
646
|
+
size = groupCtx ? "small" : "medium",
|
|
647
|
+
variant = "primary",
|
|
648
|
+
tooltip,
|
|
649
|
+
badge,
|
|
650
|
+
disabled = false,
|
|
651
|
+
loading = false,
|
|
652
|
+
visible = true,
|
|
653
|
+
placement = "bottom-right",
|
|
654
|
+
positioning = "fixed",
|
|
655
|
+
offset,
|
|
656
|
+
respectSafeArea = false,
|
|
657
|
+
href,
|
|
658
|
+
dir = "ltr",
|
|
659
|
+
onLongPress,
|
|
660
|
+
className,
|
|
661
|
+
testID,
|
|
662
|
+
children,
|
|
663
|
+
onPress,
|
|
664
|
+
onClick,
|
|
665
|
+
"aria-haspopup": ariaHasPopup,
|
|
666
|
+
"aria-expanded": ariaExpanded
|
|
667
|
+
} = props;
|
|
668
|
+
if (process.env.NODE_ENV !== "production" && onPress && onClick) {
|
|
669
|
+
console.warn("<FloatButton>: both `onPress` and `onClick` defined \u2014 `onPress` will be used. Pick one.");
|
|
670
|
+
}
|
|
671
|
+
const onPressFn = onPress ?? onClick;
|
|
672
|
+
const shape = shapeProp ?? (label && icon ? "extended" : "circle");
|
|
673
|
+
const sizeTokens = SIZE_MAP[size];
|
|
674
|
+
const [tooltipVisible, setTooltipVisible] = React.useState(false);
|
|
675
|
+
const longPressFiredRef = React.useRef(false);
|
|
676
|
+
const handlePress = React.useCallback(
|
|
677
|
+
(event) => {
|
|
678
|
+
if (disabled || loading) {
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
if (longPressFiredRef.current) {
|
|
682
|
+
longPressFiredRef.current = false;
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
if (groupCtx) {
|
|
686
|
+
groupCtx.close();
|
|
687
|
+
}
|
|
688
|
+
onPressFn?.(event);
|
|
689
|
+
},
|
|
690
|
+
[disabled, loading, groupCtx, onPressFn]
|
|
691
|
+
);
|
|
692
|
+
const handleLongPress = React.useCallback(
|
|
693
|
+
(event) => {
|
|
694
|
+
if (disabled || loading) {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
longPressFiredRef.current = true;
|
|
698
|
+
onLongPress?.(event);
|
|
699
|
+
},
|
|
700
|
+
[disabled, loading, onLongPress]
|
|
701
|
+
);
|
|
702
|
+
const variantStyle = React.useMemo(() => resolveVariantStyle(variant, colors), [variant, colors]);
|
|
703
|
+
const positionStyle = groupCtx ? null : resolvePositionStyle({
|
|
704
|
+
placement,
|
|
705
|
+
positioning,
|
|
706
|
+
offset: offset ?? {},
|
|
707
|
+
dir,
|
|
708
|
+
insets,
|
|
709
|
+
viewportWidth,
|
|
710
|
+
respectSafeArea
|
|
711
|
+
});
|
|
712
|
+
const containerOpacity = visible ? disabled ? 0.4 : 1 : 0;
|
|
713
|
+
const isExtended = shape === "extended" && Boolean(label);
|
|
714
|
+
const containerDimensions = isExtended ? {
|
|
715
|
+
minWidth: sizeTokens.diameter,
|
|
716
|
+
height: sizeTokens.diameter,
|
|
717
|
+
paddingHorizontal: sizeTokens.padX,
|
|
718
|
+
borderRadius: sizeTokens.diameter / 2
|
|
719
|
+
} : {
|
|
720
|
+
width: sizeTokens.diameter,
|
|
721
|
+
height: sizeTokens.diameter,
|
|
722
|
+
borderRadius: shape === "square" ? px(colors.radius.lg) : sizeTokens.diameter / 2
|
|
723
|
+
};
|
|
724
|
+
const a11yLabel = accessibilityLabel ?? label ?? tooltip;
|
|
725
|
+
if (process.env.NODE_ENV !== "production" && !a11yLabel && icon) {
|
|
726
|
+
console.warn("<FloatButton>: provide `accessibilityLabel` or `label` for icon-only buttons (WCAG 2.2).");
|
|
727
|
+
}
|
|
728
|
+
const shadowStyle = React.useMemo(() => resolveShadowStyle(variant, colors), [variant, colors]);
|
|
729
|
+
const contentNode = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
730
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(SmallSpinner, { color: variantStyle.fg, size: sizeTokens.iconSize }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
731
|
+
reactNative.View,
|
|
732
|
+
{
|
|
733
|
+
style: {
|
|
734
|
+
width: sizeTokens.iconSize,
|
|
735
|
+
height: sizeTokens.iconSize,
|
|
736
|
+
alignItems: "center",
|
|
737
|
+
justifyContent: "center",
|
|
738
|
+
// Sets CSS `color` on the wrapper div under RN-Web
|
|
739
|
+
// so any nested SVG using `stroke="currentColor"`
|
|
740
|
+
// or `fill="currentColor"` inherits the variant fg.
|
|
741
|
+
// RN ignores `color` on a View (it's only valid on
|
|
742
|
+
// Text) — silently dropped on native.
|
|
743
|
+
color: variantStyle.fg
|
|
744
|
+
},
|
|
745
|
+
children: tintIcon(icon, variantStyle.fg)
|
|
746
|
+
}
|
|
747
|
+
),
|
|
748
|
+
isExtended ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
749
|
+
reactNative.Text,
|
|
750
|
+
{
|
|
751
|
+
style: {
|
|
752
|
+
marginLeft: px(colors.spacing["2"]),
|
|
753
|
+
color: variantStyle.fg,
|
|
754
|
+
fontFamily: colors.fontFamily.body,
|
|
755
|
+
fontSize: sizeTokens.fontSize,
|
|
756
|
+
fontWeight: colors.fontWeight.medium,
|
|
757
|
+
letterSpacing: -0.1,
|
|
758
|
+
fontVariant: ["tabular-nums"]
|
|
759
|
+
},
|
|
760
|
+
numberOfLines: 1,
|
|
761
|
+
children: label
|
|
762
|
+
}
|
|
763
|
+
) : null
|
|
764
|
+
] });
|
|
765
|
+
const wrapperStyle = {
|
|
766
|
+
...positionStyle ?? {},
|
|
767
|
+
opacity: containerOpacity,
|
|
768
|
+
// Web-only transitions for visibility/scale (silently dropped on native).
|
|
769
|
+
...reactNative.Platform.OS === "web" ? {
|
|
770
|
+
transitionProperty: "opacity, transform",
|
|
771
|
+
transitionDuration: "180ms",
|
|
772
|
+
transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
773
|
+
pointerEvents: visible ? "auto" : "none"
|
|
774
|
+
} : null
|
|
775
|
+
};
|
|
776
|
+
const buttonNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
777
|
+
reactNative.Pressable,
|
|
778
|
+
{
|
|
779
|
+
...testID !== void 0 ? { testID } : {},
|
|
780
|
+
role: "button",
|
|
781
|
+
accessibilityRole: "button",
|
|
782
|
+
accessibilityLabel: a11yLabel,
|
|
783
|
+
"aria-label": a11yLabel,
|
|
784
|
+
disabled: disabled || loading,
|
|
785
|
+
"aria-disabled": disabled || void 0,
|
|
786
|
+
"aria-busy": loading || void 0,
|
|
787
|
+
...ariaHasPopup !== void 0 ? { "aria-haspopup": ariaHasPopup } : {},
|
|
788
|
+
...ariaExpanded !== void 0 ? { "aria-expanded": ariaExpanded } : {},
|
|
789
|
+
onPress: handlePress,
|
|
790
|
+
onLongPress: onLongPress ? handleLongPress : void 0,
|
|
791
|
+
onHoverIn: () => setTooltipVisible(true),
|
|
792
|
+
onHoverOut: () => setTooltipVisible(false),
|
|
793
|
+
onFocus: () => setTooltipVisible(true),
|
|
794
|
+
onBlur: () => setTooltipVisible(false),
|
|
795
|
+
style: reactNative.Platform.OS === "web" ? (state) => {
|
|
796
|
+
const { pressed, hovered } = state;
|
|
797
|
+
return {
|
|
798
|
+
flexDirection: "row",
|
|
799
|
+
alignItems: "center",
|
|
800
|
+
justifyContent: "center",
|
|
801
|
+
backgroundColor: pressed ? variantStyle.bgPressed : hovered ? variantStyle.bgHover : variantStyle.bg,
|
|
802
|
+
...variantStyle.borderColor ? { borderWidth: 1, borderColor: variantStyle.borderColor } : null,
|
|
803
|
+
...containerDimensions,
|
|
804
|
+
...shadowStyle.resting,
|
|
805
|
+
...pressed ? { transform: [{ scale: 0.96 }], ...shadowStyle.pressed } : null,
|
|
806
|
+
...hovered && !pressed ? { transform: [{ translateY: -1 }], ...shadowStyle.hover } : null,
|
|
807
|
+
...{
|
|
808
|
+
transitionProperty: "background-color, box-shadow, transform",
|
|
809
|
+
transitionDuration: "150ms",
|
|
810
|
+
transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
811
|
+
cursor: disabled || loading ? "not-allowed" : "pointer",
|
|
812
|
+
outlineWidth: 0
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
} : {
|
|
816
|
+
flexDirection: "row",
|
|
817
|
+
alignItems: "center",
|
|
818
|
+
justifyContent: "center",
|
|
819
|
+
backgroundColor: variantStyle.bg,
|
|
820
|
+
...variantStyle.borderColor ? { borderWidth: 1, borderColor: variantStyle.borderColor } : null,
|
|
821
|
+
...containerDimensions,
|
|
822
|
+
...shadowStyle.resting
|
|
823
|
+
},
|
|
824
|
+
children: contentNode
|
|
825
|
+
}
|
|
826
|
+
);
|
|
827
|
+
const linkedButton = href && reactNative.Platform.OS === "web" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
828
|
+
"a",
|
|
829
|
+
{
|
|
830
|
+
href,
|
|
831
|
+
"aria-label": a11yLabel,
|
|
832
|
+
style: { textDecoration: "none", color: "inherit", display: "inline-flex" },
|
|
833
|
+
onClick: (e) => {
|
|
834
|
+
if (onPressFn) {
|
|
835
|
+
onPressFn({
|
|
836
|
+
preventDefault: /* @__PURE__ */ __name(() => e.preventDefault(), "preventDefault")
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
children: buttonNode
|
|
841
|
+
}
|
|
842
|
+
) : buttonNode;
|
|
843
|
+
const showTooltip = tooltip && (reactNative.Platform.OS === "web" ? tooltipVisible : groupCtx?.open ?? false);
|
|
844
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { className: cn(className), style: wrapperStyle, children: [
|
|
845
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flexDirection: "row", alignItems: "center", gap: px(colors.spacing["2"]) }, children: [
|
|
846
|
+
showTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipChip, { text: tooltip }) : null,
|
|
847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { position: "relative" }, children: [
|
|
848
|
+
linkedButton,
|
|
849
|
+
badge ? /* @__PURE__ */ jsxRuntime.jsx(BadgeOverlay, { badge, size }) : null
|
|
850
|
+
] })
|
|
851
|
+
] }),
|
|
852
|
+
children
|
|
853
|
+
] });
|
|
854
|
+
}, "FloatButtonRoot");
|
|
855
|
+
var FloatButtonGroup = /* @__PURE__ */ __name(({
|
|
856
|
+
trigger = "click",
|
|
857
|
+
open: openProp,
|
|
858
|
+
defaultOpen = false,
|
|
859
|
+
onOpenChange,
|
|
860
|
+
direction = "up",
|
|
861
|
+
backdrop = false,
|
|
862
|
+
expandIcon,
|
|
863
|
+
collapseIcon,
|
|
864
|
+
actions,
|
|
865
|
+
children,
|
|
866
|
+
...buttonProps
|
|
867
|
+
}) => {
|
|
868
|
+
const isControlled = openProp !== void 0;
|
|
869
|
+
const [innerOpen, setInnerOpen] = React.useState(defaultOpen);
|
|
870
|
+
const open = isControlled ? openProp : innerOpen;
|
|
871
|
+
const setOpen = React.useCallback(
|
|
872
|
+
(next) => {
|
|
873
|
+
if (!isControlled) {
|
|
874
|
+
setInnerOpen(next);
|
|
875
|
+
}
|
|
876
|
+
onOpenChange?.(next);
|
|
877
|
+
},
|
|
878
|
+
[isControlled, onOpenChange]
|
|
879
|
+
);
|
|
880
|
+
const close = React.useCallback(() => setOpen(false), [setOpen]);
|
|
881
|
+
const toggle = React.useCallback(() => setOpen(!open), [setOpen, open]);
|
|
882
|
+
const actionItems = actions ? actions.map((action, idx) => {
|
|
883
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FloatButton, { ...action }, `fab-action-${idx}`);
|
|
884
|
+
}) : children;
|
|
885
|
+
const groupCtxValue = React.useMemo(
|
|
886
|
+
() => ({
|
|
887
|
+
open,
|
|
888
|
+
close,
|
|
889
|
+
direction,
|
|
890
|
+
insideGroup: true,
|
|
891
|
+
indexRef: { next: 0 }
|
|
892
|
+
}),
|
|
893
|
+
[open, close, direction]
|
|
894
|
+
);
|
|
895
|
+
const triggerIcon = open ? collapseIcon ?? /* @__PURE__ */ jsxRuntime.jsx(RotatedIcon, { node: expandIcon ?? buttonProps.icon }) : expandIcon ?? buttonProps.icon;
|
|
896
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(FloatButtonGroupContext.Provider, { value: groupCtxValue, children: [
|
|
897
|
+
backdrop && open ? /* @__PURE__ */ jsxRuntime.jsx(Backdrop, { onPress: close, positioning: buttonProps.positioning ?? "fixed" }) : null,
|
|
898
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
899
|
+
GroupLayout,
|
|
900
|
+
{
|
|
901
|
+
direction,
|
|
902
|
+
placement: buttonProps.placement ?? "bottom-right",
|
|
903
|
+
positioning: buttonProps.positioning ?? "fixed",
|
|
904
|
+
offset: buttonProps.offset ?? {},
|
|
905
|
+
dir: buttonProps.dir ?? "ltr",
|
|
906
|
+
children: [
|
|
907
|
+
open ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: groupActionsLayoutStyle(direction), children: actionItems }) : null,
|
|
908
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
909
|
+
FloatButton,
|
|
910
|
+
{
|
|
911
|
+
...buttonProps,
|
|
912
|
+
icon: triggerIcon,
|
|
913
|
+
...trigger === "click" ? { onPress: toggle } : {},
|
|
914
|
+
...trigger === "longPress" ? { onLongPress: toggle } : {},
|
|
915
|
+
"aria-haspopup": "menu",
|
|
916
|
+
"aria-expanded": open
|
|
917
|
+
}
|
|
918
|
+
)
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
)
|
|
922
|
+
] });
|
|
923
|
+
}, "FloatButtonGroup");
|
|
924
|
+
var FloatButtonBackToTop = /* @__PURE__ */ __name(({
|
|
925
|
+
scrollRef,
|
|
926
|
+
visibilityThreshold = 400,
|
|
927
|
+
variant = "surface",
|
|
928
|
+
...rest
|
|
929
|
+
}) => {
|
|
930
|
+
const { t } = useTranslation();
|
|
931
|
+
const [visible, setVisible] = React.useState(false);
|
|
932
|
+
React.useEffect(() => {
|
|
933
|
+
if (reactNative.Platform.OS !== "web" || typeof window === "undefined") {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
const onScroll = /* @__PURE__ */ __name(() => setVisible(window.scrollY > visibilityThreshold), "onScroll");
|
|
937
|
+
onScroll();
|
|
938
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
939
|
+
return () => window.removeEventListener("scroll", onScroll);
|
|
940
|
+
}, [visibilityThreshold]);
|
|
941
|
+
const onPress = React.useCallback(() => {
|
|
942
|
+
if (reactNative.Platform.OS === "web" && typeof window !== "undefined") {
|
|
943
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
scrollRef?.current?.scrollTo?.({ y: 0, animated: true });
|
|
947
|
+
}, [scrollRef]);
|
|
948
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
949
|
+
FloatButton,
|
|
950
|
+
{
|
|
951
|
+
...rest,
|
|
952
|
+
variant,
|
|
953
|
+
visible,
|
|
954
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(defaultSemanticIcons.chevronUp, { size: 20 }),
|
|
955
|
+
accessibilityLabel: rest.accessibilityLabel ?? t("floatButton.backToTop", { defaultValue: "Back to top" }),
|
|
956
|
+
onPress
|
|
957
|
+
}
|
|
958
|
+
);
|
|
959
|
+
}, "FloatButtonBackToTop");
|
|
960
|
+
var FloatButton = Object.assign(FloatButtonRoot, {
|
|
961
|
+
Group: FloatButtonGroup,
|
|
962
|
+
BackToTop: FloatButtonBackToTop
|
|
963
|
+
});
|
|
964
|
+
var TooltipChip = /* @__PURE__ */ __name(({ text }) => {
|
|
965
|
+
const colors = useThemeColors();
|
|
966
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
967
|
+
reactNative.View,
|
|
968
|
+
{
|
|
969
|
+
accessibilityElementsHidden: true,
|
|
970
|
+
importantForAccessibility: "no-hide-descendants",
|
|
971
|
+
style: {
|
|
972
|
+
backgroundColor: colors.semantic.background.elevated,
|
|
973
|
+
borderRadius: px(colors.radius.sm) + 2,
|
|
974
|
+
borderWidth: 1,
|
|
975
|
+
borderColor: colors.semantic.border.default,
|
|
976
|
+
paddingHorizontal: px(colors.spacing["2"]),
|
|
977
|
+
paddingVertical: 4,
|
|
978
|
+
...reactNative.Platform.OS === "web" ? { boxShadow: "0 1px 2px rgba(0,0,0,0.06)" } : null
|
|
979
|
+
},
|
|
980
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
981
|
+
reactNative.Text,
|
|
982
|
+
{
|
|
983
|
+
style: {
|
|
984
|
+
color: colors.semantic.text.default,
|
|
985
|
+
fontFamily: colors.fontFamily.body,
|
|
986
|
+
fontSize: 13,
|
|
987
|
+
lineHeight: 16
|
|
988
|
+
},
|
|
989
|
+
children: text
|
|
990
|
+
}
|
|
991
|
+
)
|
|
992
|
+
}
|
|
993
|
+
);
|
|
994
|
+
}, "TooltipChip");
|
|
995
|
+
var BadgeOverlay = /* @__PURE__ */ __name(({ badge, size }) => {
|
|
996
|
+
const offsetTop = size === "large" ? -6 : -4;
|
|
997
|
+
const offsetRight = size === "large" ? -6 : -4;
|
|
998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
|
+
reactNative.View,
|
|
1000
|
+
{
|
|
1001
|
+
pointerEvents: "none",
|
|
1002
|
+
style: {
|
|
1003
|
+
position: "absolute",
|
|
1004
|
+
top: offsetTop,
|
|
1005
|
+
right: offsetRight,
|
|
1006
|
+
zIndex: 1
|
|
1007
|
+
},
|
|
1008
|
+
children: badge.dot ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: badge.tone ?? "danger", appearance: "solid", children: " " }) : /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: badge.tone ?? "danger", appearance: "solid", children: String(badge.count ?? 0) })
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
}, "BadgeOverlay");
|
|
1012
|
+
var SmallSpinner = /* @__PURE__ */ __name(({ color, size }) => {
|
|
1013
|
+
if (reactNative.Platform.OS === "web") {
|
|
1014
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1015
|
+
reactNative.View,
|
|
1016
|
+
{
|
|
1017
|
+
style: {
|
|
1018
|
+
width: size,
|
|
1019
|
+
height: size,
|
|
1020
|
+
borderRadius: size / 2,
|
|
1021
|
+
borderWidth: 2,
|
|
1022
|
+
borderColor: "transparent",
|
|
1023
|
+
borderTopColor: color,
|
|
1024
|
+
animationName: "fb-spin",
|
|
1025
|
+
animationDuration: "700ms",
|
|
1026
|
+
animationIterationCount: "infinite",
|
|
1027
|
+
animationTimingFunction: "linear"
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
+
reactNative.View,
|
|
1034
|
+
{
|
|
1035
|
+
style: {
|
|
1036
|
+
width: size,
|
|
1037
|
+
height: size,
|
|
1038
|
+
borderRadius: size / 2,
|
|
1039
|
+
borderWidth: 2,
|
|
1040
|
+
borderColor: color,
|
|
1041
|
+
opacity: 0.6
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
);
|
|
1045
|
+
}, "SmallSpinner");
|
|
1046
|
+
var Backdrop = /* @__PURE__ */ __name(({ onPress, positioning }) => {
|
|
1047
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
+
reactNative.Pressable,
|
|
1049
|
+
{
|
|
1050
|
+
onPress,
|
|
1051
|
+
accessibilityLabel: "Close",
|
|
1052
|
+
style: {
|
|
1053
|
+
position: reactNative.Platform.OS === "web" && positioning === "fixed" ? "fixed" : "absolute",
|
|
1054
|
+
top: 0,
|
|
1055
|
+
left: 0,
|
|
1056
|
+
right: 0,
|
|
1057
|
+
bottom: 0,
|
|
1058
|
+
backgroundColor: "rgba(0, 0, 0, 0.32)",
|
|
1059
|
+
zIndex: 49
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
}, "Backdrop");
|
|
1064
|
+
var RotatedIcon = /* @__PURE__ */ __name(({ node, color }) => {
|
|
1065
|
+
const tintedNode = color && React.isValidElement(node) ? React.cloneElement(node, { color }) : node;
|
|
1066
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1067
|
+
reactNative.View,
|
|
1068
|
+
{
|
|
1069
|
+
style: {
|
|
1070
|
+
transform: [{ rotate: "45deg" }],
|
|
1071
|
+
// CSS `color` cascades to nested `currentColor` SVGs on web.
|
|
1072
|
+
...color ? { color } : null,
|
|
1073
|
+
...reactNative.Platform.OS === "web" ? {
|
|
1074
|
+
transitionProperty: "transform",
|
|
1075
|
+
transitionDuration: "200ms",
|
|
1076
|
+
transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
1077
|
+
} : null
|
|
1078
|
+
},
|
|
1079
|
+
children: tintedNode
|
|
1080
|
+
}
|
|
1081
|
+
);
|
|
1082
|
+
}, "RotatedIcon");
|
|
1083
|
+
var GroupLayout = /* @__PURE__ */ __name(({
|
|
1084
|
+
direction,
|
|
1085
|
+
placement,
|
|
1086
|
+
positioning,
|
|
1087
|
+
offset,
|
|
1088
|
+
dir,
|
|
1089
|
+
children
|
|
1090
|
+
}) => {
|
|
1091
|
+
const insets = React.useContext(SafeAreaInsetsContext) ?? { top: 0, bottom: 0};
|
|
1092
|
+
const { width: viewportWidth } = reactNative.useWindowDimensions();
|
|
1093
|
+
const positionStyle = resolvePositionStyle({
|
|
1094
|
+
placement,
|
|
1095
|
+
positioning,
|
|
1096
|
+
offset,
|
|
1097
|
+
dir,
|
|
1098
|
+
insets,
|
|
1099
|
+
viewportWidth,
|
|
1100
|
+
respectSafeArea: false
|
|
1101
|
+
});
|
|
1102
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1103
|
+
reactNative.View,
|
|
1104
|
+
{
|
|
1105
|
+
style: {
|
|
1106
|
+
...positionStyle,
|
|
1107
|
+
flexDirection: direction === "left" || direction === "right" ? "row" : "column",
|
|
1108
|
+
alignItems: direction === "left" || direction === "right" ? "center" : "flex-end",
|
|
1109
|
+
justifyContent: direction === "up" ? "flex-end" : "flex-start"
|
|
1110
|
+
},
|
|
1111
|
+
children: direction === "up" || direction === "left" ? children : Array.isArray(children) ? [...children].reverse() : children
|
|
1112
|
+
}
|
|
1113
|
+
);
|
|
1114
|
+
}, "GroupLayout");
|
|
1115
|
+
function groupActionsLayoutStyle(direction) {
|
|
1116
|
+
const isVertical = direction === "up" || direction === "down";
|
|
1117
|
+
return {
|
|
1118
|
+
flexDirection: isVertical ? "column" : "row",
|
|
1119
|
+
alignItems: "flex-end",
|
|
1120
|
+
gap: 12,
|
|
1121
|
+
marginBottom: direction === "up" ? 12 : 0,
|
|
1122
|
+
marginTop: direction === "down" ? 12 : 0,
|
|
1123
|
+
marginRight: direction === "left" ? 12 : 0,
|
|
1124
|
+
marginLeft: direction === "right" ? 12 : 0
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
__name(groupActionsLayoutStyle, "groupActionsLayoutStyle");
|
|
1128
|
+
function resolveVariantStyle(variant, colors) {
|
|
1129
|
+
switch (variant) {
|
|
1130
|
+
case "primary":
|
|
1131
|
+
return {
|
|
1132
|
+
bg: colors.semantic.interactive.primary,
|
|
1133
|
+
bgHover: colors.semantic.interactive.primaryHover,
|
|
1134
|
+
bgPressed: colors.semantic.interactive.primaryPressed,
|
|
1135
|
+
fg: colors.semantic.text.inverted
|
|
1136
|
+
};
|
|
1137
|
+
case "secondary":
|
|
1138
|
+
return {
|
|
1139
|
+
bg: colors.semantic.background.subtle,
|
|
1140
|
+
bgHover: colors.semantic.background.elevated,
|
|
1141
|
+
bgPressed: colors.semantic.background.subtle,
|
|
1142
|
+
fg: colors.semantic.text.default,
|
|
1143
|
+
borderColor: colors.semantic.border.default
|
|
1144
|
+
};
|
|
1145
|
+
case "tertiary":
|
|
1146
|
+
return {
|
|
1147
|
+
bg: "transparent",
|
|
1148
|
+
bgHover: withAlpha(colors.semantic.interactive.primary, 0.08),
|
|
1149
|
+
bgPressed: withAlpha(colors.semantic.interactive.primary, 0.12),
|
|
1150
|
+
fg: colors.semantic.interactive.primary,
|
|
1151
|
+
borderColor: colors.semantic.interactive.primary
|
|
1152
|
+
};
|
|
1153
|
+
case "surface":
|
|
1154
|
+
return {
|
|
1155
|
+
bg: colors.semantic.background.elevated,
|
|
1156
|
+
bgHover: colors.semantic.background.subtle,
|
|
1157
|
+
bgPressed: colors.semantic.background.subtle,
|
|
1158
|
+
fg: colors.semantic.text.default,
|
|
1159
|
+
borderColor: colors.semantic.border.default
|
|
1160
|
+
};
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
__name(resolveVariantStyle, "resolveVariantStyle");
|
|
1164
|
+
function resolveShadowStyle(variant, colors) {
|
|
1165
|
+
if (reactNative.Platform.OS !== "web") {
|
|
1166
|
+
return {
|
|
1167
|
+
resting: {
|
|
1168
|
+
shadowColor: variant === "primary" ? colors.semantic.interactive.primary : "#000",
|
|
1169
|
+
shadowOffset: { width: 0, height: 6 },
|
|
1170
|
+
shadowOpacity: variant === "primary" ? 0.25 : 0.12,
|
|
1171
|
+
shadowRadius: 16,
|
|
1172
|
+
elevation: 6
|
|
1173
|
+
},
|
|
1174
|
+
hover: {},
|
|
1175
|
+
pressed: {
|
|
1176
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1177
|
+
shadowRadius: 6,
|
|
1178
|
+
elevation: 2
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
}
|
|
1182
|
+
const tint = variant === "primary" ? colors.semantic.interactive.primary : "#000";
|
|
1183
|
+
return {
|
|
1184
|
+
resting: {
|
|
1185
|
+
...{
|
|
1186
|
+
boxShadow: `0 1px 2px rgba(0,0,0,0.06), 0 8px 24px -6px ${withAlpha(tint, variant === "primary" ? 0.32 : 0.08)}`
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
hover: {
|
|
1190
|
+
...{
|
|
1191
|
+
boxShadow: `0 2px 4px rgba(0,0,0,0.08), 0 12px 28px -6px ${withAlpha(tint, variant === "primary" ? 0.4 : 0.12)}`
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
pressed: {
|
|
1195
|
+
...{ boxShadow: `0 1px 2px rgba(0,0,0,0.06)` }
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
__name(resolveShadowStyle, "resolveShadowStyle");
|
|
1200
|
+
function resolvePositionStyle({
|
|
1201
|
+
placement,
|
|
1202
|
+
positioning = "fixed",
|
|
1203
|
+
offset,
|
|
1204
|
+
dir,
|
|
1205
|
+
insets,
|
|
1206
|
+
viewportWidth,
|
|
1207
|
+
respectSafeArea
|
|
1208
|
+
}) {
|
|
1209
|
+
const defaultOffset = reactNative.Platform.OS === "web" ? DEFAULT_OFFSET_WEB : DEFAULT_OFFSET_NATIVE;
|
|
1210
|
+
const x = offset.x ?? defaultOffset;
|
|
1211
|
+
const y = offset.y ?? defaultOffset;
|
|
1212
|
+
const safeBottom = reactNative.Platform.OS !== "web" && respectSafeArea ? insets.bottom : 0;
|
|
1213
|
+
const safeTop = reactNative.Platform.OS !== "web" && respectSafeArea ? insets.top : 0;
|
|
1214
|
+
const flippedPlacement = dir === "rtl" ? placement === "bottom-right" ? "bottom-left" : placement === "bottom-left" ? "bottom-right" : placement === "top-right" ? "top-left" : "top-right" : placement;
|
|
1215
|
+
const cssPosition = reactNative.Platform.OS === "web" && positioning === "fixed" ? "fixed" : "absolute";
|
|
1216
|
+
const base = {
|
|
1217
|
+
position: cssPosition,
|
|
1218
|
+
zIndex: 50
|
|
1219
|
+
};
|
|
1220
|
+
switch (flippedPlacement) {
|
|
1221
|
+
case "bottom-right":
|
|
1222
|
+
return { ...base, bottom: y + safeBottom, right: x };
|
|
1223
|
+
case "bottom-left":
|
|
1224
|
+
return { ...base, bottom: y + safeBottom, left: x };
|
|
1225
|
+
case "top-right":
|
|
1226
|
+
return { ...base, top: y + safeTop, right: x };
|
|
1227
|
+
case "top-left":
|
|
1228
|
+
return { ...base, top: y + safeTop, left: x };
|
|
1229
|
+
}
|
|
1230
|
+
return base;
|
|
1231
|
+
}
|
|
1232
|
+
__name(resolvePositionStyle, "resolvePositionStyle");
|
|
1233
|
+
function tintIcon(icon, color) {
|
|
1234
|
+
if (!React.isValidElement(icon)) {
|
|
1235
|
+
return icon;
|
|
1236
|
+
}
|
|
1237
|
+
return React.cloneElement(icon, { color });
|
|
1238
|
+
}
|
|
1239
|
+
__name(tintIcon, "tintIcon");
|
|
1240
|
+
function withAlpha(color, alpha) {
|
|
1241
|
+
if (color.startsWith("#") && (color.length === 7 || color.length === 4)) {
|
|
1242
|
+
const expanded = color.length === 4 ? `#${color[1]}${color[1]}${color[2]}${color[2]}${color[3]}${color[3]}` : color;
|
|
1243
|
+
const r = Number.parseInt(expanded.slice(1, 3), 16);
|
|
1244
|
+
const g = Number.parseInt(expanded.slice(3, 5), 16);
|
|
1245
|
+
const b = Number.parseInt(expanded.slice(5, 7), 16);
|
|
1246
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
1247
|
+
}
|
|
1248
|
+
return color;
|
|
1249
|
+
}
|
|
1250
|
+
__name(withAlpha, "withAlpha");
|
|
1251
|
+
|
|
1252
|
+
exports.FloatButton = FloatButton;
|
|
1253
|
+
//# sourceMappingURL=index.cjs.map
|
|
1254
|
+
//# sourceMappingURL=index.cjs.map
|