react-native-mantine 0.1.15 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +603 -7
- package/lib/commonjs/components/Accordion/index.js +250 -0
- package/lib/commonjs/components/Accordion/index.js.map +1 -0
- package/lib/commonjs/components/ActionIcon/ActionIcon.js +23 -28
- package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/components/Anchor/index.js +107 -0
- package/lib/commonjs/components/Anchor/index.js.map +1 -0
- package/lib/commonjs/components/AspectRatio/index.js +65 -0
- package/lib/commonjs/components/AspectRatio/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +128 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/BackgroundImage/index.js +55 -0
- package/lib/commonjs/components/BackgroundImage/index.js.map +1 -0
- package/lib/commonjs/components/Badge/index.js +189 -0
- package/lib/commonjs/components/Badge/index.js.map +1 -0
- package/lib/commonjs/components/Blockquote/index.js +97 -0
- package/lib/commonjs/components/Blockquote/index.js.map +1 -0
- package/lib/commonjs/components/BoxView/index.js +66 -2
- package/lib/commonjs/components/BoxView/index.js.map +1 -1
- package/lib/commonjs/components/Breadcrumbs/index.js +57 -0
- package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -0
- package/lib/commonjs/components/Burger/index.js +183 -0
- package/lib/commonjs/components/Burger/index.js.map +1 -0
- package/lib/commonjs/components/Button/Button.styles.js +35 -18
- package/lib/commonjs/components/Button/Button.styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +3 -3
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +135 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Center/index.js +35 -0
- package/lib/commonjs/components/Center/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +139 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/Chip/index.js +268 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/CloseButton/index.js +136 -0
- package/lib/commonjs/components/CloseButton/index.js.map +1 -0
- package/lib/commonjs/components/Code/index.js +67 -0
- package/lib/commonjs/components/Code/index.js.map +1 -0
- package/lib/commonjs/components/Collapse/index.js +82 -0
- package/lib/commonjs/components/Collapse/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/index.js +95 -0
- package/lib/commonjs/components/ColorSwatch/index.js.map +1 -0
- package/lib/commonjs/components/Container/index.js +70 -0
- package/lib/commonjs/components/Container/index.js.map +1 -0
- package/lib/commonjs/components/CopyButton/index.js +54 -0
- package/lib/commonjs/components/CopyButton/index.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +139 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Divider/index.js +147 -0
- package/lib/commonjs/components/Divider/index.js.map +1 -0
- package/lib/commonjs/components/Drawer/index.js +251 -0
- package/lib/commonjs/components/Drawer/index.js.map +1 -0
- package/lib/commonjs/components/Flex/index.js +62 -0
- package/lib/commonjs/components/Flex/index.js.map +1 -0
- package/lib/commonjs/components/Grid/index.js +144 -0
- package/lib/commonjs/components/Grid/index.js.map +1 -0
- package/lib/commonjs/components/Group/index.js +22 -1
- package/lib/commonjs/components/Group/index.js.map +1 -1
- package/lib/commonjs/components/Highlight/index.js +74 -0
- package/lib/commonjs/components/Highlight/index.js.map +1 -0
- package/lib/commonjs/components/Image/index.js +132 -0
- package/lib/commonjs/components/Image/index.js.map +1 -0
- package/lib/commonjs/components/Indicator/index.js +198 -0
- package/lib/commonjs/components/Indicator/index.js.map +1 -0
- package/lib/commonjs/components/Kbd/index.js +95 -0
- package/lib/commonjs/components/Kbd/index.js.map +1 -0
- package/lib/commonjs/components/List/index.js +216 -0
- package/lib/commonjs/components/List/index.js.map +1 -0
- package/lib/commonjs/components/Loader/Loader.js +25 -18
- package/lib/commonjs/components/Loader/Loader.js.map +1 -1
- package/lib/commonjs/components/LoadingOverlay/index.js +84 -0
- package/lib/commonjs/components/LoadingOverlay/index.js.map +1 -0
- package/lib/commonjs/components/Mark/index.js +46 -0
- package/lib/commonjs/components/Mark/index.js.map +1 -0
- package/lib/commonjs/components/MediaQuery/index.js +88 -0
- package/lib/commonjs/components/MediaQuery/index.js.map +1 -0
- package/lib/commonjs/components/Menu/index.js +305 -0
- package/lib/commonjs/components/Menu/index.js.map +1 -0
- package/lib/commonjs/components/Modal/index.js +235 -0
- package/lib/commonjs/components/Modal/index.js.map +1 -0
- package/lib/commonjs/components/MultiSelect/index.js +299 -0
- package/lib/commonjs/components/MultiSelect/index.js.map +1 -0
- package/lib/commonjs/components/NativeSelect/index.js +294 -0
- package/lib/commonjs/components/NativeSelect/index.js.map +1 -0
- package/lib/commonjs/components/NavLink/index.js +163 -0
- package/lib/commonjs/components/NavLink/index.js.map +1 -0
- package/lib/commonjs/components/Notification/index.js +142 -0
- package/lib/commonjs/components/Notification/index.js.map +1 -0
- package/lib/commonjs/components/NumberInput/index.js +267 -0
- package/lib/commonjs/components/NumberInput/index.js.map +1 -0
- package/lib/commonjs/components/Overlay/index.js +77 -0
- package/lib/commonjs/components/Overlay/index.js.map +1 -0
- package/lib/commonjs/components/Pagination/index.js +253 -0
- package/lib/commonjs/components/Pagination/index.js.map +1 -0
- package/lib/commonjs/components/Paper/index.js +155 -0
- package/lib/commonjs/components/Paper/index.js.map +1 -0
- package/lib/commonjs/components/PasswordInput/index.js +67 -0
- package/lib/commonjs/components/PasswordInput/index.js.map +1 -0
- package/lib/commonjs/components/PinInput/index.js +186 -0
- package/lib/commonjs/components/PinInput/index.js.map +1 -0
- package/lib/commonjs/components/Popover/index.js +162 -0
- package/lib/commonjs/components/Popover/index.js.map +1 -0
- package/lib/commonjs/components/Portal/index.js +69 -0
- package/lib/commonjs/components/Portal/index.js.map +1 -0
- package/lib/commonjs/components/Progress/index.js +124 -0
- package/lib/commonjs/components/Progress/index.js.map +1 -0
- package/lib/commonjs/components/Radio/index.js +135 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Rating/index.js +151 -0
- package/lib/commonjs/components/Rating/index.js.map +1 -0
- package/lib/commonjs/components/RingProgress/index.js +174 -0
- package/lib/commonjs/components/RingProgress/index.js.map +1 -0
- package/lib/commonjs/components/SegmentedControl/index.js +225 -0
- package/lib/commonjs/components/SegmentedControl/index.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +244 -0
- package/lib/commonjs/components/Select/index.js.map +1 -0
- package/lib/commonjs/components/SimpleGrid/index.js +101 -0
- package/lib/commonjs/components/SimpleGrid/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +111 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Slider/index.js +275 -0
- package/lib/commonjs/components/Slider/index.js.map +1 -0
- package/lib/commonjs/components/Space/index.js +45 -0
- package/lib/commonjs/components/Space/index.js.map +1 -0
- package/lib/commonjs/components/Spoiler/index.js +109 -0
- package/lib/commonjs/components/Spoiler/index.js.map +1 -0
- package/lib/commonjs/components/Stepper/index.js +275 -0
- package/lib/commonjs/components/Stepper/index.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +118 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Table/index.js +313 -0
- package/lib/commonjs/components/Table/index.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +7 -2
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/TextInput/index.js +184 -0
- package/lib/commonjs/components/TextInput/index.js.map +1 -0
- package/lib/commonjs/components/Textarea/index.js +54 -0
- package/lib/commonjs/components/Textarea/index.js.map +1 -0
- package/lib/commonjs/components/ThemeIcon/index.js +144 -0
- package/lib/commonjs/components/ThemeIcon/index.js.map +1 -0
- package/lib/commonjs/components/Timeline/index.js +241 -0
- package/lib/commonjs/components/Timeline/index.js.map +1 -0
- package/lib/commonjs/components/Title/index.js +44 -0
- package/lib/commonjs/components/Title/index.js.map +1 -0
- package/lib/commonjs/components/Tooltip/index.js +186 -0
- package/lib/commonjs/components/Tooltip/index.js.map +1 -0
- package/lib/commonjs/components/TransferList/index.js +292 -0
- package/lib/commonjs/components/TransferList/index.js.map +1 -0
- package/lib/commonjs/components/Transition/index.js +174 -0
- package/lib/commonjs/components/Transition/index.js.map +1 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +1 -2
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/components/index.js +759 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/hooks/useCachedResources.js +1 -2
- package/lib/commonjs/hooks/useCachedResources.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/create-theme.js +4 -1
- package/lib/commonjs/theme/create-theme.js.map +1 -1
- package/lib/commonjs/theme/default-theme.js +2 -0
- package/lib/commonjs/theme/default-theme.js.map +1 -1
- package/lib/commonjs/theme/functions/attach-functions.js +12 -2
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/helpers.js +44 -0
- package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/index.js +4 -1
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +26 -4
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/variant.js +89 -2
- package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
- package/lib/commonjs/theme/get-size/index.js +2 -2
- package/lib/commonjs/theme/get-size/index.js.map +1 -1
- package/lib/commonjs/theme/theme-provider.js +10 -9
- package/lib/commonjs/theme/theme-provider.js.map +1 -1
- package/lib/commonjs/theme/utils/rem.js +8 -6
- package/lib/commonjs/theme/utils/rem.js.map +1 -1
- package/lib/module/components/Accordion/index.js +246 -0
- package/lib/module/components/Accordion/index.js.map +1 -0
- package/lib/module/components/ActionIcon/ActionIcon.js +25 -29
- package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/components/Anchor/index.js +102 -0
- package/lib/module/components/Anchor/index.js.map +1 -0
- package/lib/module/components/AspectRatio/index.js +60 -0
- package/lib/module/components/AspectRatio/index.js.map +1 -0
- package/lib/module/components/Avatar/index.js +123 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/BackgroundImage/index.js +50 -0
- package/lib/module/components/BackgroundImage/index.js.map +1 -0
- package/lib/module/components/Badge/index.js +184 -0
- package/lib/module/components/Badge/index.js.map +1 -0
- package/lib/module/components/Blockquote/index.js +92 -0
- package/lib/module/components/Blockquote/index.js.map +1 -0
- package/lib/module/components/BoxView/index.js +66 -2
- package/lib/module/components/BoxView/index.js.map +1 -1
- package/lib/module/components/Breadcrumbs/index.js +52 -0
- package/lib/module/components/Breadcrumbs/index.js.map +1 -0
- package/lib/module/components/Burger/index.js +180 -0
- package/lib/module/components/Burger/index.js.map +1 -0
- package/lib/module/components/Button/Button.styles.js +35 -18
- package/lib/module/components/Button/Button.styles.js.map +1 -1
- package/lib/module/components/Button/index.js +1 -0
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Card/index.js +130 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Center/index.js +30 -0
- package/lib/module/components/Center/index.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +134 -0
- package/lib/module/components/Checkbox/index.js.map +1 -0
- package/lib/module/components/Chip/index.js +263 -0
- package/lib/module/components/Chip/index.js.map +1 -0
- package/lib/module/components/CloseButton/index.js +132 -0
- package/lib/module/components/CloseButton/index.js.map +1 -0
- package/lib/module/components/Code/index.js +62 -0
- package/lib/module/components/Code/index.js.map +1 -0
- package/lib/module/components/Collapse/index.js +77 -0
- package/lib/module/components/Collapse/index.js.map +1 -0
- package/lib/module/components/ColorSwatch/index.js +90 -0
- package/lib/module/components/ColorSwatch/index.js.map +1 -0
- package/lib/module/components/Container/index.js +65 -0
- package/lib/module/components/Container/index.js.map +1 -0
- package/lib/module/components/CopyButton/index.js +48 -0
- package/lib/module/components/CopyButton/index.js.map +1 -0
- package/lib/module/components/Dialog/index.js +134 -0
- package/lib/module/components/Dialog/index.js.map +1 -0
- package/lib/module/components/Divider/index.js +142 -0
- package/lib/module/components/Divider/index.js.map +1 -0
- package/lib/module/components/Drawer/index.js +246 -0
- package/lib/module/components/Drawer/index.js.map +1 -0
- package/lib/module/components/Flex/index.js +57 -0
- package/lib/module/components/Flex/index.js.map +1 -0
- package/lib/module/components/Grid/index.js +139 -0
- package/lib/module/components/Grid/index.js.map +1 -0
- package/lib/module/components/Group/index.js +22 -1
- package/lib/module/components/Group/index.js.map +1 -1
- package/lib/module/components/Highlight/index.js +70 -0
- package/lib/module/components/Highlight/index.js.map +1 -0
- package/lib/module/components/Image/index.js +127 -0
- package/lib/module/components/Image/index.js.map +1 -0
- package/lib/module/components/Indicator/index.js +193 -0
- package/lib/module/components/Indicator/index.js.map +1 -0
- package/lib/module/components/Kbd/index.js +90 -0
- package/lib/module/components/Kbd/index.js.map +1 -0
- package/lib/module/components/List/index.js +211 -0
- package/lib/module/components/List/index.js.map +1 -0
- package/lib/module/components/Loader/Loader.js +26 -19
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/LoadingOverlay/index.js +80 -0
- package/lib/module/components/LoadingOverlay/index.js.map +1 -0
- package/lib/module/components/Mark/index.js +41 -0
- package/lib/module/components/Mark/index.js.map +1 -0
- package/lib/module/components/MediaQuery/index.js +82 -0
- package/lib/module/components/MediaQuery/index.js.map +1 -0
- package/lib/module/components/Menu/index.js +300 -0
- package/lib/module/components/Menu/index.js.map +1 -0
- package/lib/module/components/Modal/index.js +230 -0
- package/lib/module/components/Modal/index.js.map +1 -0
- package/lib/module/components/MultiSelect/index.js +294 -0
- package/lib/module/components/MultiSelect/index.js.map +1 -0
- package/lib/module/components/NativeSelect/index.js +289 -0
- package/lib/module/components/NativeSelect/index.js.map +1 -0
- package/lib/module/components/NavLink/index.js +158 -0
- package/lib/module/components/NavLink/index.js.map +1 -0
- package/lib/module/components/Notification/index.js +137 -0
- package/lib/module/components/Notification/index.js.map +1 -0
- package/lib/module/components/NumberInput/index.js +262 -0
- package/lib/module/components/NumberInput/index.js.map +1 -0
- package/lib/module/components/Overlay/index.js +72 -0
- package/lib/module/components/Overlay/index.js.map +1 -0
- package/lib/module/components/Pagination/index.js +248 -0
- package/lib/module/components/Pagination/index.js.map +1 -0
- package/lib/module/components/Paper/index.js +150 -0
- package/lib/module/components/Paper/index.js.map +1 -0
- package/lib/module/components/PasswordInput/index.js +62 -0
- package/lib/module/components/PasswordInput/index.js.map +1 -0
- package/lib/module/components/PinInput/index.js +182 -0
- package/lib/module/components/PinInput/index.js.map +1 -0
- package/lib/module/components/Popover/index.js +157 -0
- package/lib/module/components/Popover/index.js.map +1 -0
- package/lib/module/components/Portal/index.js +62 -0
- package/lib/module/components/Portal/index.js.map +1 -0
- package/lib/module/components/Progress/index.js +120 -0
- package/lib/module/components/Progress/index.js.map +1 -0
- package/lib/module/components/Radio/index.js +130 -0
- package/lib/module/components/Radio/index.js.map +1 -0
- package/lib/module/components/Rating/index.js +146 -0
- package/lib/module/components/Rating/index.js.map +1 -0
- package/lib/module/components/RingProgress/index.js +169 -0
- package/lib/module/components/RingProgress/index.js.map +1 -0
- package/lib/module/components/SegmentedControl/index.js +220 -0
- package/lib/module/components/SegmentedControl/index.js.map +1 -0
- package/lib/module/components/Select/index.js +239 -0
- package/lib/module/components/Select/index.js.map +1 -0
- package/lib/module/components/SimpleGrid/index.js +96 -0
- package/lib/module/components/SimpleGrid/index.js.map +1 -0
- package/lib/module/components/Skeleton/index.js +106 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Slider/index.js +270 -0
- package/lib/module/components/Slider/index.js.map +1 -0
- package/lib/module/components/Space/index.js +41 -0
- package/lib/module/components/Space/index.js.map +1 -0
- package/lib/module/components/Spoiler/index.js +104 -0
- package/lib/module/components/Spoiler/index.js.map +1 -0
- package/lib/module/components/Stepper/index.js +270 -0
- package/lib/module/components/Stepper/index.js.map +1 -0
- package/lib/module/components/Switch/index.js +113 -0
- package/lib/module/components/Switch/index.js.map +1 -0
- package/lib/module/components/Table/index.js +308 -0
- package/lib/module/components/Table/index.js.map +1 -0
- package/lib/module/components/Text/index.js +7 -2
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/TextInput/index.js +179 -0
- package/lib/module/components/TextInput/index.js.map +1 -0
- package/lib/module/components/Textarea/index.js +50 -0
- package/lib/module/components/Textarea/index.js.map +1 -0
- package/lib/module/components/ThemeIcon/index.js +140 -0
- package/lib/module/components/ThemeIcon/index.js.map +1 -0
- package/lib/module/components/Timeline/index.js +236 -0
- package/lib/module/components/Timeline/index.js.map +1 -0
- package/lib/module/components/Title/index.js +39 -0
- package/lib/module/components/Title/index.js.map +1 -0
- package/lib/module/components/Tooltip/index.js +181 -0
- package/lib/module/components/Tooltip/index.js.map +1 -0
- package/lib/module/components/TransferList/index.js +287 -0
- package/lib/module/components/TransferList/index.js.map +1 -0
- package/lib/module/components/Transition/index.js +169 -0
- package/lib/module/components/Transition/index.js.map +1 -0
- package/lib/module/components/index.js +101 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/theme/create-theme.js +4 -1
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/default-theme.js +2 -0
- package/lib/module/theme/default-theme.js.map +1 -1
- package/lib/module/theme/functions/attach-functions.js +12 -2
- package/lib/module/theme/functions/attach-functions.js.map +1 -1
- package/lib/module/theme/functions/fns/helpers.js +34 -0
- package/lib/module/theme/functions/fns/helpers.js.map +1 -0
- package/lib/module/theme/functions/fns/index.js +3 -1
- package/lib/module/theme/functions/fns/index.js.map +1 -1
- package/lib/module/theme/functions/fns/theme-color/theme-color.js +26 -4
- package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/module/theme/functions/fns/variant.js +89 -2
- package/lib/module/theme/functions/fns/variant.js.map +1 -1
- package/lib/module/theme/get-size/index.js +2 -2
- package/lib/module/theme/get-size/index.js.map +1 -1
- package/lib/module/theme/theme-provider.js +9 -7
- package/lib/module/theme/theme-provider.js.map +1 -1
- package/lib/module/theme/utils/rem.js +8 -6
- package/lib/module/theme/utils/rem.js.map +1 -1
- package/lib/typescript/commonjs/src/components/Accordion/index.d.ts +54 -0
- package/lib/typescript/commonjs/src/components/Accordion/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Anchor/index.d.ts +25 -0
- package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/AspectRatio/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/components/AspectRatio/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Avatar/index.d.ts +23 -0
- package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/BackgroundImage/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/BackgroundImage/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Badge/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/BoxView/index.d.ts +28 -0
- package/lib/typescript/commonjs/src/components/BoxView/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Breadcrumbs/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/components/Breadcrumbs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Burger/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/Burger/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Card/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Center/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/Center/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Chip/index.d.ts +51 -0
- package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/CloseButton/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/CloseButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Code/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Collapse/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/components/Collapse/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ColorSwatch/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/components/ColorSwatch/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Container/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/components/Container/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/CopyButton/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/CopyButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts +31 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Divider/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/components/Divider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Drawer/index.d.ts +36 -0
- package/lib/typescript/commonjs/src/components/Drawer/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Flex/index.d.ts +27 -0
- package/lib/typescript/commonjs/src/components/Flex/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Grid/index.d.ts +38 -0
- package/lib/typescript/commonjs/src/components/Grid/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Group/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Group/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Highlight/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/components/Highlight/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Image/index.d.ts +31 -0
- package/lib/typescript/commonjs/src/components/Image/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Indicator/index.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/Indicator/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Input/Input.styles.d.ts +5 -5
- package/lib/typescript/commonjs/src/components/Kbd/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/components/Kbd/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/List/index.d.ts +42 -0
- package/lib/typescript/commonjs/src/components/List/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/LoadingOverlay/index.d.ts +23 -0
- package/lib/typescript/commonjs/src/components/LoadingOverlay/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Mark/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/Mark/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/MediaQuery/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/MediaQuery/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts +64 -0
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Modal/index.d.ts +40 -0
- package/lib/typescript/commonjs/src/components/Modal/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts +53 -0
- package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts +45 -0
- package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/NavLink/index.d.ts +30 -0
- package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts +28 -0
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/NumberInput/index.d.ts +47 -0
- package/lib/typescript/commonjs/src/components/NumberInput/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Overlay/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Overlay/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Pagination/index.d.ts +37 -0
- package/lib/typescript/commonjs/src/components/Pagination/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Paper/index.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/Paper/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/PasswordInput/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/PasswordInput/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/PinInput/index.d.ts +33 -0
- package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Popover/index.d.ts +44 -0
- package/lib/typescript/commonjs/src/components/Popover/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Progress/index.d.ts +29 -0
- package/lib/typescript/commonjs/src/components/Progress/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Radio/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Rating/index.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/Rating/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts +61 -0
- package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/SegmentedControl/index.d.ts +35 -0
- package/lib/typescript/commonjs/src/components/SegmentedControl/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Select/index.d.ts +53 -0
- package/lib/typescript/commonjs/src/components/Select/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Skeleton/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Slider/index.d.ts +43 -0
- package/lib/typescript/commonjs/src/components/Slider/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Space/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/Space/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Spoiler/index.d.ts +22 -0
- package/lib/typescript/commonjs/src/components/Spoiler/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stepper/index.d.ts +55 -0
- package/lib/typescript/commonjs/src/components/Stepper/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Switch/index.d.ts +24 -0
- package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Table/index.d.ts +72 -0
- package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Text/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TextInput/index.d.ts +31 -0
- package/lib/typescript/commonjs/src/components/TextInput/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Textarea/index.d.ts +12 -0
- package/lib/typescript/commonjs/src/components/Textarea/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Timeline/index.d.ts +52 -0
- package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Title/index.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts +36 -0
- package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/TransferList/index.d.ts +42 -0
- package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Transition/index.d.ts +25 -0
- package/lib/typescript/commonjs/src/components/Transition/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/index.d.ts +69 -0
- package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts +20 -0
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +23 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +22 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +8 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +19 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/utils/rem.d.ts +2 -2
- package/lib/typescript/commonjs/src/theme/utils/rem.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Accordion/index.d.ts +54 -0
- package/lib/typescript/module/src/components/Accordion/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts +4 -4
- package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Anchor/index.d.ts +25 -0
- package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/AspectRatio/index.d.ts +12 -0
- package/lib/typescript/module/src/components/AspectRatio/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Avatar/index.d.ts +23 -0
- package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/BackgroundImage/index.d.ts +15 -0
- package/lib/typescript/module/src/components/BackgroundImage/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Badge/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Blockquote/index.d.ts +18 -0
- package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/BoxView/index.d.ts +28 -0
- package/lib/typescript/module/src/components/BoxView/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Breadcrumbs/index.d.ts +12 -0
- package/lib/typescript/module/src/components/Breadcrumbs/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Burger/index.d.ts +21 -0
- package/lib/typescript/module/src/components/Burger/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Button/Button.styles.d.ts +5 -0
- package/lib/typescript/module/src/components/Button/Button.styles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/index.d.ts +1 -0
- package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Card/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Center/index.d.ts +15 -0
- package/lib/typescript/module/src/components/Center/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Checkbox/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Checkbox/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Chip/index.d.ts +51 -0
- package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/CloseButton/index.d.ts +22 -0
- package/lib/typescript/module/src/components/CloseButton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Code/index.d.ts +15 -0
- package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Collapse/index.d.ts +20 -0
- package/lib/typescript/module/src/components/Collapse/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ColorSwatch/index.d.ts +20 -0
- package/lib/typescript/module/src/components/ColorSwatch/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Container/index.d.ts +20 -0
- package/lib/typescript/module/src/components/Container/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/CopyButton/index.d.ts +15 -0
- package/lib/typescript/module/src/components/CopyButton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts +31 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Divider/index.d.ts +20 -0
- package/lib/typescript/module/src/components/Divider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Drawer/index.d.ts +36 -0
- package/lib/typescript/module/src/components/Drawer/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Flex/index.d.ts +27 -0
- package/lib/typescript/module/src/components/Flex/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Grid/index.d.ts +38 -0
- package/lib/typescript/module/src/components/Grid/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Group/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Group/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Highlight/index.d.ts +19 -0
- package/lib/typescript/module/src/components/Highlight/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Image/index.d.ts +31 -0
- package/lib/typescript/module/src/components/Image/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Indicator/index.d.ts +32 -0
- package/lib/typescript/module/src/components/Indicator/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Input/Input.styles.d.ts +5 -5
- package/lib/typescript/module/src/components/Kbd/index.d.ts +12 -0
- package/lib/typescript/module/src/components/Kbd/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/List/index.d.ts +42 -0
- package/lib/typescript/module/src/components/List/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/module/src/components/LoadingOverlay/index.d.ts +23 -0
- package/lib/typescript/module/src/components/LoadingOverlay/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Mark/index.d.ts +14 -0
- package/lib/typescript/module/src/components/Mark/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/MediaQuery/index.d.ts +24 -0
- package/lib/typescript/module/src/components/MediaQuery/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/index.d.ts +64 -0
- package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Modal/index.d.ts +40 -0
- package/lib/typescript/module/src/components/Modal/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/MultiSelect/index.d.ts +53 -0
- package/lib/typescript/module/src/components/MultiSelect/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/NativeSelect/index.d.ts +45 -0
- package/lib/typescript/module/src/components/NativeSelect/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/NavLink/index.d.ts +30 -0
- package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Notification/index.d.ts +28 -0
- package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/NumberInput/index.d.ts +47 -0
- package/lib/typescript/module/src/components/NumberInput/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Overlay/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Overlay/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Pagination/index.d.ts +37 -0
- package/lib/typescript/module/src/components/Pagination/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Paper/index.d.ts +18 -0
- package/lib/typescript/module/src/components/Paper/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/PasswordInput/index.d.ts +15 -0
- package/lib/typescript/module/src/components/PasswordInput/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/PinInput/index.d.ts +33 -0
- package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Popover/index.d.ts +44 -0
- package/lib/typescript/module/src/components/Popover/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Portal/index.d.ts +10 -0
- package/lib/typescript/module/src/components/Portal/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Progress/index.d.ts +29 -0
- package/lib/typescript/module/src/components/Progress/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Radio/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Rating/index.d.ts +32 -0
- package/lib/typescript/module/src/components/Rating/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/RingProgress/index.d.ts +61 -0
- package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/SegmentedControl/index.d.ts +35 -0
- package/lib/typescript/module/src/components/SegmentedControl/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Select/index.d.ts +53 -0
- package/lib/typescript/module/src/components/Select/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/SimpleGrid/index.d.ts +22 -0
- package/lib/typescript/module/src/components/SimpleGrid/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Skeleton/index.d.ts +22 -0
- package/lib/typescript/module/src/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Slider/index.d.ts +43 -0
- package/lib/typescript/module/src/components/Slider/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Space/index.d.ts +13 -0
- package/lib/typescript/module/src/components/Space/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Spoiler/index.d.ts +22 -0
- package/lib/typescript/module/src/components/Spoiler/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stepper/index.d.ts +55 -0
- package/lib/typescript/module/src/components/Stepper/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Switch/index.d.ts +24 -0
- package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Table/index.d.ts +72 -0
- package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Text/index.d.ts +4 -0
- package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TextInput/index.d.ts +31 -0
- package/lib/typescript/module/src/components/TextInput/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Textarea/index.d.ts +12 -0
- package/lib/typescript/module/src/components/Textarea/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ThemeIcon/index.d.ts +21 -0
- package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Timeline/index.d.ts +52 -0
- package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Title/index.d.ts +14 -0
- package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Tooltip/index.d.ts +36 -0
- package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/TransferList/index.d.ts +42 -0
- package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Transition/index.d.ts +25 -0
- package/lib/typescript/module/src/components/Transition/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/index.d.ts +69 -0
- package/lib/typescript/module/src/components/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/default-theme.d.ts +20 -0
- package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +23 -0
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts +22 -1
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/radius.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +8 -1
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +19 -1
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/utils/rem.d.ts +2 -2
- package/lib/typescript/module/src/theme/utils/rem.d.ts.map +1 -1
- package/package.json +11 -8
- package/src/components/Accordion/index.tsx +297 -0
- package/src/components/ActionIcon/ActionIcon.tsx +61 -44
- package/src/components/Anchor/index.tsx +139 -0
- package/src/components/AspectRatio/index.tsx +68 -0
- package/src/components/Avatar/index.tsx +164 -0
- package/src/components/BackgroundImage/index.tsx +77 -0
- package/src/components/Badge/index.tsx +193 -0
- package/src/components/Blockquote/index.tsx +104 -0
- package/src/components/BoxView/index.tsx +90 -2
- package/src/components/Breadcrumbs/index.tsx +64 -0
- package/src/components/Burger/index.tsx +230 -0
- package/src/components/Button/Button.styles.ts +36 -16
- package/src/components/Button/index.tsx +3 -1
- package/src/components/Card/index.tsx +166 -0
- package/src/components/Center/index.tsx +40 -0
- package/src/components/Checkbox/index.tsx +168 -0
- package/src/components/Chip/index.tsx +350 -0
- package/src/components/CloseButton/index.tsx +154 -0
- package/src/components/Code/index.tsx +83 -0
- package/src/components/Collapse/index.tsx +108 -0
- package/src/components/ColorSwatch/index.tsx +106 -0
- package/src/components/Container/index.tsx +92 -0
- package/src/components/CopyButton/index.tsx +60 -0
- package/src/components/Dialog/index.tsx +189 -0
- package/src/components/Divider/index.tsx +161 -0
- package/src/components/Drawer/index.tsx +315 -0
- package/src/components/Flex/index.tsx +87 -0
- package/src/components/Grid/index.tsx +167 -0
- package/src/components/Group/index.tsx +24 -5
- package/src/components/Highlight/index.tsx +93 -0
- package/src/components/Image/index.tsx +180 -0
- package/src/components/Indicator/index.tsx +240 -0
- package/src/components/Kbd/index.tsx +84 -0
- package/src/components/List/index.tsx +294 -0
- package/src/components/Loader/Loader.tsx +27 -17
- package/src/components/LoadingOverlay/index.tsx +103 -0
- package/src/components/Mark/index.tsx +51 -0
- package/src/components/MediaQuery/index.tsx +133 -0
- package/src/components/Menu/index.tsx +395 -0
- package/src/components/Modal/index.tsx +318 -0
- package/src/components/MultiSelect/index.tsx +458 -0
- package/src/components/NativeSelect/index.tsx +387 -0
- package/src/components/NavLink/index.tsx +205 -0
- package/src/components/Notification/index.tsx +175 -0
- package/src/components/NumberInput/index.tsx +356 -0
- package/src/components/Overlay/index.tsx +100 -0
- package/src/components/Pagination/index.tsx +336 -0
- package/src/components/Paper/index.tsx +155 -0
- package/src/components/PasswordInput/index.tsx +78 -0
- package/src/components/PinInput/index.tsx +251 -0
- package/src/components/Popover/index.tsx +244 -0
- package/src/components/Portal/index.tsx +75 -0
- package/src/components/Progress/index.tsx +182 -0
- package/src/components/Radio/index.tsx +169 -0
- package/src/components/Rating/index.tsx +214 -0
- package/src/components/RingProgress/index.tsx +206 -0
- package/src/components/SegmentedControl/index.tsx +259 -0
- package/src/components/Select/index.tsx +377 -0
- package/src/components/SimpleGrid/index.tsx +119 -0
- package/src/components/Skeleton/index.tsx +149 -0
- package/src/components/Slider/index.tsx +338 -0
- package/src/components/Space/index.tsx +48 -0
- package/src/components/Spoiler/index.tsx +123 -0
- package/src/components/Stepper/index.tsx +388 -0
- package/src/components/Switch/index.tsx +146 -0
- package/src/components/Table/index.tsx +402 -0
- package/src/components/Text/index.tsx +6 -1
- package/src/components/TextInput/index.tsx +232 -0
- package/src/components/Textarea/index.tsx +61 -0
- package/src/components/ThemeIcon/index.tsx +167 -0
- package/src/components/Timeline/index.tsx +331 -0
- package/src/components/Title/index.tsx +53 -0
- package/src/components/Tooltip/index.tsx +259 -0
- package/src/components/TransferList/index.tsx +399 -0
- package/src/components/Transition/index.tsx +225 -0
- package/src/components/index.tsx +101 -0
- package/src/theme/create-theme.ts +3 -1
- package/src/theme/default-theme.ts +24 -0
- package/src/theme/functions/attach-functions.ts +8 -1
- package/src/theme/functions/fns/helpers.ts +36 -0
- package/src/theme/functions/fns/index.ts +2 -0
- package/src/theme/functions/fns/theme-color/theme-color.ts +34 -3
- package/src/theme/functions/fns/variant.ts +110 -2
- package/src/theme/get-size/index.ts +2 -2
- package/src/theme/theme-provider.tsx +7 -7
- package/src/theme/utils/rem.ts +9 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useRef","useState","TextInput","BoxView","useComponentDefaultProps","createStyles","getSize","rem","jsx","_jsx","sizes","xs","sm","md","lg","xl","useStyles","theme","size","radius","error","disabled","spacing","getSpacing","root","flexDirection","alignItems","gap","input","width","height","borderRadius","fn","borderWidth","borderColor","colors","red","colorScheme","dark","gray","backgroundColor","white","fontSize","fontSizes","textAlign","color","black","opacity","inputFocused","primaryColor","primaryBgColor","defaultProps","length","mask","type","PinInput","props","ref","value","controlledValue","defaultValue","onChange","onComplete","style","inputStyle","others","uncontrolledValue","setUncontrolledValue","focusedIndex","setFocusedIndex","undefined","inputRefs","styles","sx","name","handleChange","text","index","isValid","test","pastedText","slice","newValue","padEnd","nextIndex","Math","min","current","focus","replace","newValueArray","split","join","handleKeyPress","e","nativeEvent","key","currentValue","charAt","children","Array","from","_","inputValue","displayValue","el","onChangeText","onKeyPress","onFocus","onBlur","maxLength","keyboardType","editable","selectTextOnFocus","displayName"],"sourceRoot":"../../../../src","sources":["components/PinInput/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACpD,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,OAAO,QAAQ,qBAAY;AAEpC,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,EAAEC,OAAO,QAAQ,sBAAa;AACnD,SAASC,GAAG,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA+C5C,MAAMC,KAAK,GAAG;EACZC,EAAE,EAAEJ,GAAG,CAAC,EAAE,CAAC;EACXK,EAAE,EAAEL,GAAG,CAAC,EAAE,CAAC;EACXM,EAAE,EAAEN,GAAG,CAAC,EAAE,CAAC;EACXO,EAAE,EAAEP,GAAG,CAAC,EAAE,CAAC;EACXQ,EAAE,EAAER,GAAG,CAAC,EAAE;AACZ,CAAC;AAED,MAAM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AAI,CAAC;MAAEjD,MAAM,EAAEA;IAAQ,CAAC,EAAE,CAACkD,CAAC,EAAEzB,KAAK,KAAK;MAC7C,MAAM0B,UAAU,GAAG7C,KAAK,CAACwC,MAAM,CAACrB,KAAK,CAAC,IAAI,EAAE;MAC5C,MAAM2B,YAAY,GAAGD,UAAU,KAAK,GAAG,GAAG,EAAE,GAAGA,UAAU;MAEzD,oBACE9F,IAAA,CAACP,SAAS;QAERuD,GAAG,EAAGgD,EAAE,IAAMlC,SAAS,CAACgB,OAAO,CAACV,KAAK,CAAC,GAAG4B,EAAI;QAC7C/C,KAAK,EAAEL,IAAI,IAAImD,YAAY,GAAG,GAAG,GAAGA,YAAa;QACjDE,YAAY,EAAG9B,IAAI,IAAKD,YAAY,CAACC,IAAI,EAAEC,KAAK,CAAE;QAClD8B,UAAU,EAAGb,CAAC,IAAKD,cAAc,CAACC,CAAC,EAAEjB,KAAK,CAAE;QAC5C+B,OAAO,EAAEA,CAAA,KAAMvC,eAAe,CAACQ,KAAK,CAAE;QACtCgC,MAAM,EAAEA,CAAA,KAAMxC,eAAe,CAAC,IAAI,CAAE;QACpCyC,SAAS,EAAE,CAAE;QACbC,YAAY,EAAEzD,IAAI,KAAK,QAAQ,GAAG,YAAY,GAAG,SAAU;QAC3D0D,QAAQ,EAAE,CAAC3F,QAAS;QACpB4F,iBAAiB;QACjBlD,KAAK,EAAEU,EAAE,CACPD,MAAM,CAAC5C,KAAK,EACZwC,YAAY,KAAKS,KAAK,IAAIL,MAAM,CAACxB,YAAY,EAC7CgB,UACF;MAAE,GAfGa,KAgBN,CAAC;IAEN,CAAC;EAAC,CACK,CAAC;AAEd,CAAC,CAAC;AAEFtB,QAAQ,CAAC2D,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useState, useRef } from 'react';
|
|
4
|
+
import { View, TouchableWithoutFeedback, Animated } from 'react-native';
|
|
5
|
+
import { BoxView } from "../BoxView/index.js";
|
|
6
|
+
import { Portal } from "../Portal/index.js";
|
|
7
|
+
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const defaultProps = {
|
|
10
|
+
position: 'bottom',
|
|
11
|
+
width: 260,
|
|
12
|
+
radius: 'md',
|
|
13
|
+
shadow: 'md',
|
|
14
|
+
withArrow: false,
|
|
15
|
+
arrowSize: 7,
|
|
16
|
+
arrowOffset: 5,
|
|
17
|
+
closeOnClickOutside: true,
|
|
18
|
+
closeOnEscape: true,
|
|
19
|
+
zIndex: 1000
|
|
20
|
+
};
|
|
21
|
+
const PopoverContext = /*#__PURE__*/React.createContext(null);
|
|
22
|
+
const usePopoverContext = () => {
|
|
23
|
+
const ctx = React.useContext(PopoverContext);
|
|
24
|
+
if (!ctx) {
|
|
25
|
+
throw new Error('Popover components must be used within Popover');
|
|
26
|
+
}
|
|
27
|
+
return ctx;
|
|
28
|
+
};
|
|
29
|
+
const PopoverTarget = ({
|
|
30
|
+
children
|
|
31
|
+
}) => {
|
|
32
|
+
const {
|
|
33
|
+
setOpened,
|
|
34
|
+
targetRef,
|
|
35
|
+
setDropdownPosition
|
|
36
|
+
} = usePopoverContext();
|
|
37
|
+
const handlePress = () => {
|
|
38
|
+
if (targetRef.current) {
|
|
39
|
+
targetRef.current.measureInWindow((x, y, width, height) => {
|
|
40
|
+
setDropdownPosition({
|
|
41
|
+
top: y + height + 8,
|
|
42
|
+
left: x,
|
|
43
|
+
width
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
setOpened(true);
|
|
48
|
+
};
|
|
49
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
50
|
+
ref: targetRef,
|
|
51
|
+
onPress: handlePress
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const PopoverDropdown = ({
|
|
55
|
+
children,
|
|
56
|
+
style,
|
|
57
|
+
...others
|
|
58
|
+
}) => {
|
|
59
|
+
const {
|
|
60
|
+
opened,
|
|
61
|
+
setOpened,
|
|
62
|
+
dropdownPosition
|
|
63
|
+
} = usePopoverContext();
|
|
64
|
+
const opacity = useRef(new Animated.Value(0)).current;
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
if (opened) {
|
|
67
|
+
Animated.timing(opacity, {
|
|
68
|
+
toValue: 1,
|
|
69
|
+
duration: 150,
|
|
70
|
+
useNativeDriver: true
|
|
71
|
+
}).start();
|
|
72
|
+
}
|
|
73
|
+
}, [opened, opacity]);
|
|
74
|
+
if (!opened) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/_jsx(Portal, {
|
|
78
|
+
children: /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
79
|
+
onPress: () => setOpened(false),
|
|
80
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
81
|
+
style: {
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
top: 0,
|
|
84
|
+
left: 0,
|
|
85
|
+
right: 0,
|
|
86
|
+
bottom: 0
|
|
87
|
+
},
|
|
88
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
89
|
+
style: [{
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: dropdownPosition.top,
|
|
92
|
+
left: dropdownPosition.left,
|
|
93
|
+
opacity
|
|
94
|
+
}, style],
|
|
95
|
+
...others,
|
|
96
|
+
children: children
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
export const Popover = Object.assign(/*#__PURE__*/forwardRef((props, ref) => {
|
|
103
|
+
const {
|
|
104
|
+
position,
|
|
105
|
+
width,
|
|
106
|
+
radius,
|
|
107
|
+
shadow,
|
|
108
|
+
withArrow,
|
|
109
|
+
arrowSize,
|
|
110
|
+
arrowOffset,
|
|
111
|
+
closeOnClickOutside,
|
|
112
|
+
closeOnEscape,
|
|
113
|
+
opened: controlledOpened,
|
|
114
|
+
onChange,
|
|
115
|
+
zIndex,
|
|
116
|
+
children,
|
|
117
|
+
style,
|
|
118
|
+
...others
|
|
119
|
+
} = useComponentDefaultProps('Popover', defaultProps, props);
|
|
120
|
+
const [opened, setOpened] = useState(false);
|
|
121
|
+
const [dropdownPosition, setDropdownPosition] = useState({
|
|
122
|
+
top: 0,
|
|
123
|
+
left: 0,
|
|
124
|
+
width: 0
|
|
125
|
+
});
|
|
126
|
+
const targetRef = useRef(null);
|
|
127
|
+
const isControlled = controlledOpened !== undefined;
|
|
128
|
+
const isOpened = isControlled ? controlledOpened : opened;
|
|
129
|
+
const handleSetOpened = value => {
|
|
130
|
+
if (!isControlled) {
|
|
131
|
+
setOpened(value);
|
|
132
|
+
}
|
|
133
|
+
onChange?.(value);
|
|
134
|
+
};
|
|
135
|
+
const contextValue = {
|
|
136
|
+
opened: isOpened,
|
|
137
|
+
setOpened: handleSetOpened,
|
|
138
|
+
targetRef,
|
|
139
|
+
dropdownPosition,
|
|
140
|
+
setDropdownPosition
|
|
141
|
+
};
|
|
142
|
+
return /*#__PURE__*/_jsx(PopoverContext.Provider, {
|
|
143
|
+
value: contextValue,
|
|
144
|
+
children: /*#__PURE__*/_jsx(BoxView, {
|
|
145
|
+
ref: ref,
|
|
146
|
+
...others,
|
|
147
|
+
children: children
|
|
148
|
+
})
|
|
149
|
+
});
|
|
150
|
+
}), {
|
|
151
|
+
Target: PopoverTarget,
|
|
152
|
+
Dropdown: PopoverDropdown
|
|
153
|
+
});
|
|
154
|
+
Popover.displayName = 'Popover';
|
|
155
|
+
PopoverTarget.displayName = 'Popover.Target';
|
|
156
|
+
PopoverDropdown.displayName = 'Popover.Dropdown';
|
|
157
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useState","useRef","View","TouchableWithoutFeedback","Animated","BoxView","Portal","useComponentDefaultProps","jsx","_jsx","defaultProps","position","width","radius","shadow","withArrow","arrowSize","arrowOffset","closeOnClickOutside","closeOnEscape","zIndex","PopoverContext","createContext","usePopoverContext","ctx","useContext","Error","PopoverTarget","children","setOpened","targetRef","setDropdownPosition","handlePress","current","measureInWindow","x","y","height","top","left","cloneElement","ref","onPress","PopoverDropdown","style","others","opened","dropdownPosition","opacity","Value","useEffect","timing","toValue","duration","useNativeDriver","start","right","bottom","Popover","Object","assign","props","controlledOpened","onChange","isControlled","undefined","isOpened","handleSetOpened","value","contextValue","Provider","Target","Dropdown","displayName"],"sourceRoot":"../../../../src","sources":["components/Popover/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,OAAO;AAC3D,SACEC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACH,cAAc;AACrB,SAASC,OAAO,QAAQ,qBAAY;AACpC,SAASC,MAAM,QAAQ,oBAAW;AAMlC,SAASC,wBAAwB,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAiEtE,MAAMC,YAAmC,GAAG;EAC1CC,QAAQ,EAAE,QAAQ;EAClBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,IAAI;EACZC,SAAS,EAAE,KAAK;EAChBC,SAAS,EAAE,CAAC;EACZC,WAAW,EAAE,CAAC;EACdC,mBAAmB,EAAE,IAAI;EACzBC,aAAa,EAAE,IAAI;EACnBC,MAAM,EAAE;AACV,CAAC;AAUD,MAAMC,cAAc,gBAAGvB,KAAK,CAACwB,aAAa,CAA6B,IAAI,CAAC;AAE5E,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EAC9B,MAAMC,GAAG,GAAG1B,KAAK,CAAC2B,UAAU,CAACJ,cAAc,CAAC;EAC5C,IAAI,CAACG,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,gDAAgD,CAAC;EACnE;EACA,OAAOF,GAAG;AACZ,CAAC;AA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AG/B,QAAQ,CAAC;IACvDsC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACP3B,KAAK,EAAE;EACT,CAAC,CAAC;EACF,MAAMkB,SAAS,GAAG7B,MAAM,CAAO,IAAI,CAAC;EAEpC,MAAM+D,YAAY,GAAGF,gBAAgB,KAAKG,SAAS;EACnD,MAAMC,QAAQ,GAAGF,YAAY,GAAGF,gBAAgB,GAAGhB,MAAM;EAEzD,MAAMqB,eAAe,GAAIC,KAAc,IAAK;IAC1C,IAAI,CAACJ,YAAY,EAAE;MACjBnC,SAAS,CAACuC,KAAK,CAAC;IAClB;IACAL,QAAQ,GAAGK,KAAK,CAAC;EACnB,CAAC;EAED,MAAMC,YAAiC,GAAG;IACxCvB,MAAM,EAAEoB,QAAQ;IAChBrC,SAAS,EAAEsC,eAAe;IAC1BrC,SAAS;IACTiB,gBAAgB;IAChBhB;EACF,CAAC;EAED,oBACEtB,IAAA,CAACY,cAAc,CAACiD,QAAQ;IAACF,KAAK,EAAEC,YAAa;IAAAzC,QAAA,eAC3CnB,IAAA,CAACJ,OAAO;MAACoC,GAAG,EAAEA,GAAI;MAAA,GAAKI,MAAM;MAAAjB,QAAA,EAC1BA;IAAQ,CACF;EAAC,CACa,CAAC;AAE9B,CAAC,CAAC,EACF;EACE2C,MAAM,EAAE5C,aAAa;EACrB6C,QAAQ,EAAE7B;AACZ,CACF,CAAC;AAEDe,OAAO,CAACe,WAAW,GAAG,SAAS;AAC/B9C,aAAa,CAAC8C,WAAW,GAAG,gBAAgB;AAC5C9B,eAAe,CAAC8B,WAAW,GAAG,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { createContext, useContext, useState, useCallback } from 'react';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const PortalContext = /*#__PURE__*/createContext(null);
|
|
7
|
+
export const PortalProvider = ({
|
|
8
|
+
children
|
|
9
|
+
}) => {
|
|
10
|
+
const [portals, setPortals] = useState(new Map());
|
|
11
|
+
const nextKey = React.useRef(0);
|
|
12
|
+
const mount = useCallback(child => {
|
|
13
|
+
const key = nextKey.current++;
|
|
14
|
+
setPortals(prev => {
|
|
15
|
+
const next = new Map(prev);
|
|
16
|
+
next.set(key, child);
|
|
17
|
+
return next;
|
|
18
|
+
});
|
|
19
|
+
return key;
|
|
20
|
+
}, []);
|
|
21
|
+
const unmount = useCallback(key => {
|
|
22
|
+
setPortals(prev => {
|
|
23
|
+
const next = new Map(prev);
|
|
24
|
+
next.delete(key);
|
|
25
|
+
return next;
|
|
26
|
+
});
|
|
27
|
+
}, []);
|
|
28
|
+
return /*#__PURE__*/_jsxs(PortalContext.Provider, {
|
|
29
|
+
value: {
|
|
30
|
+
mount,
|
|
31
|
+
unmount
|
|
32
|
+
},
|
|
33
|
+
children: [children, /*#__PURE__*/_jsx(View, {
|
|
34
|
+
style: StyleSheet.absoluteFill,
|
|
35
|
+
pointerEvents: "box-none",
|
|
36
|
+
children: Array.from(portals.entries()).map(([key, child]) => /*#__PURE__*/_jsx(React.Fragment, {
|
|
37
|
+
children: child
|
|
38
|
+
}, key))
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export const Portal = ({
|
|
43
|
+
children
|
|
44
|
+
}) => {
|
|
45
|
+
const context = useContext(PortalContext);
|
|
46
|
+
const [, setKey] = useState(null);
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (!context) {
|
|
49
|
+
console.warn('Portal used without PortalProvider');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const portalKey = context.mount(children);
|
|
53
|
+
setKey(portalKey);
|
|
54
|
+
return () => {
|
|
55
|
+
context.unmount(portalKey);
|
|
56
|
+
};
|
|
57
|
+
}, [children, context]);
|
|
58
|
+
return null;
|
|
59
|
+
};
|
|
60
|
+
Portal.displayName = 'Portal';
|
|
61
|
+
PortalProvider.displayName = 'PortalProvider';
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","useState","useCallback","View","StyleSheet","jsx","_jsx","jsxs","_jsxs","PortalContext","PortalProvider","children","portals","setPortals","Map","nextKey","useRef","mount","child","key","current","prev","next","set","unmount","delete","Provider","value","style","absoluteFill","pointerEvents","Array","from","entries","map","Fragment","Portal","context","setKey","useEffect","console","warn","portalKey","displayName"],"sourceRoot":"../../../../src","sources":["components/Portal/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC/E,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOhD,MAAMC,aAAa,gBAAGV,aAAa,CAA4B,IAAI,CAAC;AAMpE,OAAO,MAAMW,cAA6C,GAAGA,CAAC;EAAEC;AAAS,CAAC,KAAK;EAC7E,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGZ,QAAQ,CAA+B,IAAIa,GAAG,CAAC,CAAC,CAAC;EAC/E,MAAMC,OAAO,GAAGjB,KAAK,CAACkB,MAAM,CAAC,CAAC,CAAC;EAE/B,MAAMC,KAAK,GAAGf,WAAW,CAAEgB,KAAsB,IAAK;IACpD,MAAMC,GAAG,GAAGJ,OAAO,CAACK,OAAO,EAAE;IAC7BP,UAAU,CAAEQ,IAAI,IAAK;MACnB,MAAMC,IAAI,GAAG,IAAIR,GAAG,CAACO,IAAI,CAAC;MAC1BC,IAAI,CAACC,GAAG,CAACJ,GAAG,EAAED,KAAK,CAAC;MACpB,OAAOI,IAAI;IACb,CAAC,CAAC;IACF,OAAOH,GAAG;EACZ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMK,OAAO,GAAG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AC/B,QAAQ,EAAE0B,OAAO,CAAC,CAAC;EAEvB,OAAO,IAAI;AACb,CAAC;AAEDD,MAAM,CAACO,WAAW,GAAG,QAAQ;AAC7BjC,cAAc,CAACiC,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useEffect, useRef } from 'react';
|
|
4
|
+
import { Animated } from 'react-native';
|
|
5
|
+
import { BoxView } from "../BoxView/index.js";
|
|
6
|
+
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
7
|
+
import { createStyles } from "../../theme/index.js";
|
|
8
|
+
import { rem } from "../../theme/utils/rem.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const sizes = {
|
|
11
|
+
xs: rem(3),
|
|
12
|
+
sm: rem(5),
|
|
13
|
+
md: rem(8),
|
|
14
|
+
lg: rem(12),
|
|
15
|
+
xl: rem(16)
|
|
16
|
+
};
|
|
17
|
+
const useStyles = createStyles((theme, {
|
|
18
|
+
color,
|
|
19
|
+
radius,
|
|
20
|
+
size,
|
|
21
|
+
striped
|
|
22
|
+
}) => {
|
|
23
|
+
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
24
|
+
const sizeValue = typeof size === 'number' ? rem(size) : sizes[size] || sizes.md;
|
|
25
|
+
return {
|
|
26
|
+
root: {
|
|
27
|
+
height: sizeValue,
|
|
28
|
+
backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[2],
|
|
29
|
+
borderRadius: theme.fn.radius(radius),
|
|
30
|
+
overflow: 'hidden'
|
|
31
|
+
},
|
|
32
|
+
bar: {
|
|
33
|
+
height: '100%',
|
|
34
|
+
backgroundColor: colors?.[6] || colors?.[5] || theme.primaryBgColor,
|
|
35
|
+
...(striped && {
|
|
36
|
+
backgroundImage: `linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)`,
|
|
37
|
+
backgroundSize: `${sizeValue} ${sizeValue}`
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
section: {
|
|
41
|
+
height: '100%'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
const defaultProps = {
|
|
46
|
+
value: 0,
|
|
47
|
+
color: 'blue',
|
|
48
|
+
size: 'md',
|
|
49
|
+
radius: 'sm',
|
|
50
|
+
striped: false,
|
|
51
|
+
animate: false
|
|
52
|
+
};
|
|
53
|
+
export const Progress = /*#__PURE__*/forwardRef((props, ref) => {
|
|
54
|
+
const {
|
|
55
|
+
value,
|
|
56
|
+
color,
|
|
57
|
+
size,
|
|
58
|
+
radius,
|
|
59
|
+
striped,
|
|
60
|
+
animate,
|
|
61
|
+
sections,
|
|
62
|
+
style,
|
|
63
|
+
...others
|
|
64
|
+
} = useComponentDefaultProps('Progress', defaultProps, props);
|
|
65
|
+
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
Animated.timing(animatedValue, {
|
|
68
|
+
toValue: value || 0,
|
|
69
|
+
duration: 300,
|
|
70
|
+
useNativeDriver: false
|
|
71
|
+
}).start();
|
|
72
|
+
}, [value, animatedValue]);
|
|
73
|
+
const {
|
|
74
|
+
styles,
|
|
75
|
+
sx,
|
|
76
|
+
theme
|
|
77
|
+
} = useStyles({
|
|
78
|
+
color,
|
|
79
|
+
radius,
|
|
80
|
+
size,
|
|
81
|
+
striped
|
|
82
|
+
}, {
|
|
83
|
+
name: 'Progress'
|
|
84
|
+
});
|
|
85
|
+
const renderSections = () => {
|
|
86
|
+
if (!sections || sections.length === 0) {
|
|
87
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
88
|
+
style: [styles.bar, {
|
|
89
|
+
width: animatedValue.interpolate({
|
|
90
|
+
inputRange: [0, 100],
|
|
91
|
+
outputRange: ['0%', '100%']
|
|
92
|
+
})
|
|
93
|
+
}]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return sections.map((section, index) => {
|
|
97
|
+
const sectionColors = theme.colors[section.color] || theme.colors[theme.primaryColor];
|
|
98
|
+
return /*#__PURE__*/_jsx(BoxView, {
|
|
99
|
+
style: [styles.section, {
|
|
100
|
+
width: `${section.value}%`,
|
|
101
|
+
backgroundColor: sectionColors?.[6] || sectionColors?.[5] || theme.primaryBgColor
|
|
102
|
+
}]
|
|
103
|
+
}, index);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
return /*#__PURE__*/_jsx(BoxView, {
|
|
107
|
+
ref: ref,
|
|
108
|
+
style: sx(styles.root, style),
|
|
109
|
+
...others,
|
|
110
|
+
children: sections && sections.length > 0 ? /*#__PURE__*/_jsx(BoxView, {
|
|
111
|
+
style: {
|
|
112
|
+
flexDirection: 'row',
|
|
113
|
+
height: '100%'
|
|
114
|
+
},
|
|
115
|
+
children: renderSections()
|
|
116
|
+
}) : renderSections()
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
Progress.displayName = 'Progress';
|
|
120
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useEffect","useRef","Animated","BoxView","useComponentDefaultProps","createStyles","rem","jsx","_jsx","sizes","xs","sm","md","lg","xl","useStyles","theme","color","radius","size","striped","colors","primaryColor","sizeValue","root","height","backgroundColor","colorScheme","dark","gray","borderRadius","fn","overflow","bar","primaryBgColor","backgroundImage","backgroundSize","section","defaultProps","value","animate","Progress","props","ref","sections","style","others","animatedValue","Value","current","timing","toValue","duration","useNativeDriver","start","styles","sx","name","renderSections","length","View","width","interpolate","inputRange","outputRange","map","index","sectionColors","children","flexDirection","displayName"],"sourceRoot":"../../../../src","sources":["components/Progress/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,EAA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0C,KAAK,EAAE;QAAEwB,aAAa,EAAE,KAAK;QAAE5C,MAAM,EAAE;MAAO,CAAE;MAAA2C,QAAA,EAAEV,cAAc,CAAC;IAAC,CAAU,CAAC,GAEtFA,cAAc,CAAC;EAChB,CACM,CAAC;AAEd,CAAC,CAAC;AAEFjB,QAAQ,CAAC6B,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useEffect, useRef } from 'react';
|
|
4
|
+
import { Pressable, Animated } from 'react-native';
|
|
5
|
+
import { BoxView } from "../BoxView/index.js";
|
|
6
|
+
import { Text } from "../Text/index.js";
|
|
7
|
+
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
8
|
+
import { createStyles } from "../../theme/index.js";
|
|
9
|
+
import { rem } from "../../theme/utils/rem.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const sizes = {
|
|
12
|
+
xs: rem(14),
|
|
13
|
+
sm: rem(18),
|
|
14
|
+
md: rem(22),
|
|
15
|
+
lg: rem(28),
|
|
16
|
+
xl: rem(36)
|
|
17
|
+
};
|
|
18
|
+
const useStyles = createStyles((theme, {
|
|
19
|
+
size,
|
|
20
|
+
color,
|
|
21
|
+
disabled
|
|
22
|
+
}) => {
|
|
23
|
+
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
24
|
+
const radioSize = sizes[size] || sizes.md;
|
|
25
|
+
const innerSize = radioSize * 0.5;
|
|
26
|
+
return {
|
|
27
|
+
root: {
|
|
28
|
+
flexDirection: 'row',
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
opacity: disabled ? 0.5 : 1
|
|
31
|
+
},
|
|
32
|
+
radio: {
|
|
33
|
+
width: radioSize,
|
|
34
|
+
height: radioSize,
|
|
35
|
+
borderRadius: radioSize / 2,
|
|
36
|
+
borderWidth: 2,
|
|
37
|
+
borderColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[4],
|
|
38
|
+
backgroundColor: 'transparent',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center'
|
|
41
|
+
},
|
|
42
|
+
checked: {
|
|
43
|
+
borderColor: colors?.[6] || colors?.[5] || theme.primaryBgColor
|
|
44
|
+
},
|
|
45
|
+
inner: {
|
|
46
|
+
width: rem(innerSize),
|
|
47
|
+
height: rem(innerSize),
|
|
48
|
+
borderRadius: rem(innerSize / 2),
|
|
49
|
+
backgroundColor: colors?.[6] || colors?.[5] || theme.primaryBgColor
|
|
50
|
+
},
|
|
51
|
+
label: {
|
|
52
|
+
fontSize: theme.fontSizes.sm,
|
|
53
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
|
|
54
|
+
marginLeft: theme.spacing.sm,
|
|
55
|
+
flex: 1
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
const defaultProps = {
|
|
60
|
+
size: 'md',
|
|
61
|
+
color: 'blue',
|
|
62
|
+
checked: false,
|
|
63
|
+
disabled: false
|
|
64
|
+
};
|
|
65
|
+
export const Radio = /*#__PURE__*/forwardRef((props, ref) => {
|
|
66
|
+
const {
|
|
67
|
+
label,
|
|
68
|
+
size,
|
|
69
|
+
color,
|
|
70
|
+
value,
|
|
71
|
+
checked,
|
|
72
|
+
onChange,
|
|
73
|
+
disabled,
|
|
74
|
+
style,
|
|
75
|
+
wrapperStyle,
|
|
76
|
+
...others
|
|
77
|
+
} = useComponentDefaultProps('Radio', defaultProps, props);
|
|
78
|
+
const {
|
|
79
|
+
styles,
|
|
80
|
+
sx
|
|
81
|
+
} = useStyles({
|
|
82
|
+
size,
|
|
83
|
+
color,
|
|
84
|
+
disabled
|
|
85
|
+
}, {
|
|
86
|
+
name: 'Radio'
|
|
87
|
+
});
|
|
88
|
+
const scaleAnim = useRef(new Animated.Value(checked ? 1 : 0)).current;
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
Animated.spring(scaleAnim, {
|
|
91
|
+
toValue: checked ? 1 : 0,
|
|
92
|
+
useNativeDriver: true,
|
|
93
|
+
tension: 100,
|
|
94
|
+
friction: 7
|
|
95
|
+
}).start();
|
|
96
|
+
}, [checked, scaleAnim]);
|
|
97
|
+
const handlePress = () => {
|
|
98
|
+
if (!disabled && value !== undefined) {
|
|
99
|
+
onChange?.(value);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const radioContent = /*#__PURE__*/_jsx(BoxView, {
|
|
103
|
+
style: sx(styles.radio, checked && styles.checked, style),
|
|
104
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
105
|
+
style: [styles.inner, {
|
|
106
|
+
transform: [{
|
|
107
|
+
scale: scaleAnim
|
|
108
|
+
}],
|
|
109
|
+
opacity: scaleAnim
|
|
110
|
+
}]
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
114
|
+
ref: ref,
|
|
115
|
+
onPress: handlePress,
|
|
116
|
+
disabled: disabled,
|
|
117
|
+
style: sx(styles.root, wrapperStyle),
|
|
118
|
+
accessibilityRole: "radio",
|
|
119
|
+
accessibilityState: {
|
|
120
|
+
checked
|
|
121
|
+
},
|
|
122
|
+
...others,
|
|
123
|
+
children: [radioContent, label && /*#__PURE__*/_jsx(Text, {
|
|
124
|
+
style: styles.label,
|
|
125
|
+
children: label
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
Radio.displayName = 'Radio';
|
|
130
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useEffect","useRef","Pressable","Animated","BoxView","Text","useComponentDefaultProps","createStyles","rem","jsx","_jsx","jsxs","_jsxs","sizes","xs","sm","md","lg","xl","useStyles","theme","size","color","disabled","colors","primaryColor","radioSize","innerSize","root","flexDirection","alignItems","opacity","radio","width","height","borderRadius","borderWidth","borderColor","colorScheme","dark","gray","backgroundColor","justifyContent","checked","primaryBgColor","inner","label","fontSize","fontSizes","black","marginLeft","spacing","flex","defaultProps","Radio","props","ref","value","onChange","style","wrapperStyle","others","styles","sx","name","scaleAnim","Value","current","spring","toValue","useNativeDriver","tension","friction","start","handlePress","undefined","radioContent","children","View","transform","scale","onPress","accessibilityRole","accessibilityState","displayName"],"sourceRoot":"../../../../src","sources":["components/Radio/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC5D,SAASC,SAAS,EAAEC,QAAQ,QAAQ,cAAc;AAClD,SAASC,OAAO,QAAQ,qBAAY;AACpC,SAASC,IAAI,QAAQ,kBAAS;AAE9B,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA+B5C,MAAMC,KAAK,GAAG;EACZC,EAAE,EAAEN,GAAG,CAAC,EAAE,CAAC;EACXO,EAAE,EAAEP,GAAG,CAAC,EAAE,CAAC;EACXQ,EAAE,EAAER,GAAG,CAAC,EAAE,CAAC;EACXS,EAAE,EAAET,GAAG,CAAC,EAAE,CAAC;EACXU,EAAE,EAAEV,GAAG,CAAC,EAAE;AACZ,CAAC;AAED,MAAMW,SAAS,GAAGZ,YAAY,CAC5B,CACEa,KAAK,EACL;EACEC,IAAI;EACJC,KAAK;EACLC;AAKF,CAAC,KACE;EACH,MAAMC,MAAM,GAAGJ,KAAK,CAACI,MAAM,CAACF,KAAK,CAAC,IAAIF,KAAK,CAACI,MAAM,CAACJ,KAAK,CAACK,YAAY,CAAC;EACtE,MAAMC,SAAS,GAAGb,KAAK,CAACQ,IAAI,CAAuB,IAAIR,KAAK,CAACG,EAAE;EAC/D,MAAMW,SAA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AQ,GAAGD,KAAK,CAAC;IACnB;EACF,CAAC;EAED,MAAMmB,YAAY,gBAChBlE,IAAA,CAACN,OAAO;IAACuD,KAAK,EAAEI,EAAE,CAACD,MAAM,CAAC9B,KAAK,EAAEW,OAAO,IAAImB,MAAM,CAACnB,OAAO,EAAEgB,KAAK,CAAE;IAAAkB,QAAA,eACjEnE,IAAA,CAACP,QAAQ,CAAC2E,IAAI;MACZnB,KAAK,EAAE,CACLG,MAAM,CAACjB,KAAK,EACZ;QACEkC,SAAS,EAAE,CAAC;UAAEC,KAAK,EAAEf;QAAU,CAAC,CAAC;QACjClC,OAAO,EAAEkC;MACX,CAAC;IACD,CACH;EAAC,CACK,CACV;EAED,oBACErD,KAAA,CAACV,SAAS;IACRsD,GAAG,EAAEA,GAAI;IACTyB,OAAO,EAAEP,WAAY;IACrBnD,QAAQ,EAAEA,QAAS;IACnBoC,KAAK,EAAEI,EAAE,CAACD,MAAM,CAAClC,IAAI,EAAEgC,YAAY,CAAE;IACrCsB,iBAAiB,EAAC,OAAO;IACzBC,kBAAkB,EAAE;MAAExC;IAAQ,CAAE;IAAA,GAC5BkB,MAAM;IAAAgB,QAAA,GAETD,YAAY,EACZ9B,KAAK,iBAAIpC,IAAA,CAACL,IAAI;MAACsD,KAAK,EAAEG,MAAM,CAAChB,KAAM;MAAA+B,QAAA,EAAE/B;IAAK,CAAO,CAAC;EAAA,CAC1C,CAAC;AAEhB,CAAC,CAAC;AAEFQ,KAAK,CAAC8B,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useState } from 'react';
|
|
4
|
+
import { TouchableOpacity } from 'react-native';
|
|
5
|
+
import { BoxView } from "../BoxView/index.js";
|
|
6
|
+
import { Text } from "../Text/index.js";
|
|
7
|
+
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
8
|
+
import { createStyles } from "../../theme/index.js";
|
|
9
|
+
import { rem } from "../../theme/utils/rem.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
const sizes = {
|
|
12
|
+
xs: rem(14),
|
|
13
|
+
sm: rem(18),
|
|
14
|
+
md: rem(24),
|
|
15
|
+
lg: rem(32),
|
|
16
|
+
xl: rem(40)
|
|
17
|
+
};
|
|
18
|
+
const useStyles = createStyles((theme, {
|
|
19
|
+
color,
|
|
20
|
+
emptyColor
|
|
21
|
+
}, {
|
|
22
|
+
size
|
|
23
|
+
}) => {
|
|
24
|
+
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
25
|
+
const emptyColors = theme.colors[emptyColor] || theme.colors.gray;
|
|
26
|
+
const sizeValue = sizes[size] || sizes.md;
|
|
27
|
+
return {
|
|
28
|
+
root: {
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
},
|
|
32
|
+
symbolWrapper: {
|
|
33
|
+
marginHorizontal: rem(2)
|
|
34
|
+
},
|
|
35
|
+
symbol: {
|
|
36
|
+
fontSize: sizeValue,
|
|
37
|
+
lineHeight: sizeValue
|
|
38
|
+
},
|
|
39
|
+
symbolFilled: {
|
|
40
|
+
color: colors?.[6] || colors?.[5] || theme.primaryBgColor
|
|
41
|
+
},
|
|
42
|
+
symbolEmpty: {
|
|
43
|
+
color: emptyColors?.[3] || emptyColors?.[2] || theme.colors.gray?.[3]
|
|
44
|
+
},
|
|
45
|
+
symbolHovered: {
|
|
46
|
+
opacity: 0.6
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const defaultProps = {
|
|
51
|
+
count: 5,
|
|
52
|
+
size: 'md',
|
|
53
|
+
color: 'yellow',
|
|
54
|
+
emptyColor: 'gray',
|
|
55
|
+
fractions: 1,
|
|
56
|
+
readOnly: false,
|
|
57
|
+
highlightSelectedOnly: false
|
|
58
|
+
};
|
|
59
|
+
const StarSymbol = ({
|
|
60
|
+
filled
|
|
61
|
+
}) => {
|
|
62
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
63
|
+
children: filled ? '★' : '☆'
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export const Rating = /*#__PURE__*/forwardRef((props, ref) => {
|
|
67
|
+
const {
|
|
68
|
+
value: controlledValue,
|
|
69
|
+
defaultValue,
|
|
70
|
+
onChange,
|
|
71
|
+
count,
|
|
72
|
+
size,
|
|
73
|
+
color,
|
|
74
|
+
emptyColor,
|
|
75
|
+
symbol,
|
|
76
|
+
emptySymbol,
|
|
77
|
+
fractions,
|
|
78
|
+
readOnly,
|
|
79
|
+
highlightSelectedOnly,
|
|
80
|
+
style,
|
|
81
|
+
...others
|
|
82
|
+
} = useComponentDefaultProps('Rating', defaultProps, props);
|
|
83
|
+
const {
|
|
84
|
+
styles,
|
|
85
|
+
sx
|
|
86
|
+
} = useStyles({
|
|
87
|
+
color,
|
|
88
|
+
emptyColor,
|
|
89
|
+
readOnly
|
|
90
|
+
}, {
|
|
91
|
+
name: 'Rating',
|
|
92
|
+
size
|
|
93
|
+
});
|
|
94
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? 0);
|
|
95
|
+
const [hoveredValue, setHoveredValue] = useState(-1);
|
|
96
|
+
const value = controlledValue !== undefined ? controlledValue : uncontrolledValue;
|
|
97
|
+
const handleClick = index => {
|
|
98
|
+
if (readOnly) return;
|
|
99
|
+
const newValue = index + 1;
|
|
100
|
+
if (controlledValue === undefined) {
|
|
101
|
+
setUncontrolledValue(newValue);
|
|
102
|
+
}
|
|
103
|
+
onChange?.(newValue);
|
|
104
|
+
};
|
|
105
|
+
const renderSymbol = index => {
|
|
106
|
+
const currentValue = hoveredValue >= 0 && !highlightSelectedOnly ? hoveredValue : value;
|
|
107
|
+
const isActive = index < currentValue;
|
|
108
|
+
|
|
109
|
+
// For fractional ratings, calculate fill percentage
|
|
110
|
+
const fillPercentage = index < Math.floor(currentValue) ? 1 : index === Math.floor(currentValue) ? currentValue % 1 : 0;
|
|
111
|
+
const isHovered = hoveredValue >= 0 && index <= hoveredValue;
|
|
112
|
+
const symbolContent = symbol || /*#__PURE__*/_jsx(StarSymbol, {
|
|
113
|
+
filled: isActive
|
|
114
|
+
});
|
|
115
|
+
const emptySymbolContent = emptySymbol || /*#__PURE__*/_jsx(StarSymbol, {
|
|
116
|
+
filled: false
|
|
117
|
+
});
|
|
118
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
119
|
+
onPress: () => handleClick(index),
|
|
120
|
+
onPressIn: () => !readOnly && setHoveredValue(index),
|
|
121
|
+
onPressOut: () => !readOnly && setHoveredValue(-1),
|
|
122
|
+
disabled: readOnly,
|
|
123
|
+
style: styles.symbolWrapper,
|
|
124
|
+
activeOpacity: 0.7,
|
|
125
|
+
children: /*#__PURE__*/_jsx(BoxView, {
|
|
126
|
+
children: fillPercentage > 0 ? /*#__PURE__*/_jsx(Text, {
|
|
127
|
+
style: [styles.symbol, styles.symbolFilled, isHovered && !highlightSelectedOnly && styles.symbolHovered],
|
|
128
|
+
children: symbolContent
|
|
129
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
130
|
+
style: [styles.symbol, styles.symbolEmpty, isHovered && !highlightSelectedOnly && styles.symbolHovered],
|
|
131
|
+
children: emptySymbolContent
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
}, index);
|
|
135
|
+
};
|
|
136
|
+
return /*#__PURE__*/_jsx(BoxView, {
|
|
137
|
+
ref: ref,
|
|
138
|
+
style: sx(styles.root, style),
|
|
139
|
+
...others,
|
|
140
|
+
children: Array.from({
|
|
141
|
+
length: count
|
|
142
|
+
}, (_, index) => renderSymbol(index))
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
Rating.displayName = 'Rating';
|
|
146
|
+
//# sourceMappingURL=index.js.map
|