react-native-mantine 0.1.15 → 0.2.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/lib/commonjs/components/Accordion/index.js +251 -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 +108 -0
- package/lib/commonjs/components/Anchor/index.js.map +1 -0
- package/lib/commonjs/components/AspectRatio/index.js +66 -0
- package/lib/commonjs/components/AspectRatio/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +129 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/BackgroundImage/index.js +56 -0
- package/lib/commonjs/components/BackgroundImage/index.js.map +1 -0
- package/lib/commonjs/components/Badge/index.js +190 -0
- package/lib/commonjs/components/Badge/index.js.map +1 -0
- package/lib/commonjs/components/Blockquote/index.js +98 -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 +58 -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 +2 -1
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +136 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Center/index.js +36 -0
- package/lib/commonjs/components/Center/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +140 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/Chip/index.js +269 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/CloseButton/index.js +137 -0
- package/lib/commonjs/components/CloseButton/index.js.map +1 -0
- package/lib/commonjs/components/Code/index.js +68 -0
- package/lib/commonjs/components/Code/index.js.map +1 -0
- package/lib/commonjs/components/Collapse/index.js +83 -0
- package/lib/commonjs/components/Collapse/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/index.js +96 -0
- package/lib/commonjs/components/ColorSwatch/index.js.map +1 -0
- package/lib/commonjs/components/Container/index.js +71 -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 +140 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Divider/index.js +148 -0
- package/lib/commonjs/components/Divider/index.js.map +1 -0
- package/lib/commonjs/components/Drawer/index.js +252 -0
- package/lib/commonjs/components/Drawer/index.js.map +1 -0
- package/lib/commonjs/components/Flex/index.js +63 -0
- package/lib/commonjs/components/Flex/index.js.map +1 -0
- package/lib/commonjs/components/Grid/index.js +145 -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 +133 -0
- package/lib/commonjs/components/Image/index.js.map +1 -0
- package/lib/commonjs/components/Indicator/index.js +199 -0
- package/lib/commonjs/components/Indicator/index.js.map +1 -0
- package/lib/commonjs/components/Kbd/index.js +96 -0
- package/lib/commonjs/components/Kbd/index.js.map +1 -0
- package/lib/commonjs/components/List/index.js +217 -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 +47 -0
- package/lib/commonjs/components/Mark/index.js.map +1 -0
- package/lib/commonjs/components/MediaQuery/index.js +89 -0
- package/lib/commonjs/components/MediaQuery/index.js.map +1 -0
- package/lib/commonjs/components/Menu/index.js +306 -0
- package/lib/commonjs/components/Menu/index.js.map +1 -0
- package/lib/commonjs/components/Modal/index.js +236 -0
- package/lib/commonjs/components/Modal/index.js.map +1 -0
- package/lib/commonjs/components/MultiSelect/index.js +300 -0
- package/lib/commonjs/components/MultiSelect/index.js.map +1 -0
- package/lib/commonjs/components/NativeSelect/index.js +295 -0
- package/lib/commonjs/components/NativeSelect/index.js.map +1 -0
- package/lib/commonjs/components/NavLink/index.js +164 -0
- package/lib/commonjs/components/NavLink/index.js.map +1 -0
- package/lib/commonjs/components/Notification/index.js +143 -0
- package/lib/commonjs/components/Notification/index.js.map +1 -0
- package/lib/commonjs/components/NumberInput/index.js +268 -0
- package/lib/commonjs/components/NumberInput/index.js.map +1 -0
- package/lib/commonjs/components/Overlay/index.js +78 -0
- package/lib/commonjs/components/Overlay/index.js.map +1 -0
- package/lib/commonjs/components/Pagination/index.js +254 -0
- package/lib/commonjs/components/Pagination/index.js.map +1 -0
- package/lib/commonjs/components/Paper/index.js +156 -0
- package/lib/commonjs/components/Paper/index.js.map +1 -0
- package/lib/commonjs/components/PasswordInput/index.js +68 -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 +163 -0
- package/lib/commonjs/components/Popover/index.js.map +1 -0
- package/lib/commonjs/components/Portal/index.js +70 -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 +136 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Rating/index.js +152 -0
- package/lib/commonjs/components/Rating/index.js.map +1 -0
- package/lib/commonjs/components/RingProgress/index.js +175 -0
- package/lib/commonjs/components/RingProgress/index.js.map +1 -0
- package/lib/commonjs/components/SegmentedControl/index.js +226 -0
- package/lib/commonjs/components/SegmentedControl/index.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +245 -0
- package/lib/commonjs/components/Select/index.js.map +1 -0
- package/lib/commonjs/components/SimpleGrid/index.js +102 -0
- package/lib/commonjs/components/SimpleGrid/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +112 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Slider/index.js +276 -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 +110 -0
- package/lib/commonjs/components/Spoiler/index.js.map +1 -0
- package/lib/commonjs/components/Stepper/index.js +276 -0
- package/lib/commonjs/components/Stepper/index.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +119 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Table/index.js +314 -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 +185 -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 +145 -0
- package/lib/commonjs/components/ThemeIcon/index.js.map +1 -0
- package/lib/commonjs/components/Timeline/index.js +242 -0
- package/lib/commonjs/components/Timeline/index.js.map +1 -0
- package/lib/commonjs/components/Title/index.js +45 -0
- package/lib/commonjs/components/Title/index.js.map +1 -0
- package/lib/commonjs/components/Tooltip/index.js +187 -0
- package/lib/commonjs/components/Tooltip/index.js.map +1 -0
- package/lib/commonjs/components/TransferList/index.js +293 -0
- package/lib/commonjs/components/TransferList/index.js.map +1 -0
- package/lib/commonjs/components/Transition/index.js +175 -0
- package/lib/commonjs/components/Transition/index.js.map +1 -0
- package/lib/commonjs/components/index.js +759 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/theme/create-theme.js +1 -0
- 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 +5 -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/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/theme/create-theme.js +1 -0
- 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/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/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/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/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/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/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/utils/rem.d.ts +2 -2
- package/lib/typescript/module/src/theme/utils/rem.d.ts.map +1 -1
- package/package.json +3 -1
- 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 +1 -0
- 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/utils/rem.ts +9 -7
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SegmentedControl = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../BoxView/index.js");
|
|
10
|
+
var _index2 = require("../Text/index.js");
|
|
11
|
+
var _themeProvider = require("../../theme/theme-provider.js");
|
|
12
|
+
var _index3 = require("../../theme/index.js");
|
|
13
|
+
var _rem = require("../../theme/utils/rem.js");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const sizes = {
|
|
18
|
+
xs: {
|
|
19
|
+
fontSize: (0, _rem.rem)(10),
|
|
20
|
+
padding: (0, _rem.rem)(4),
|
|
21
|
+
height: (0, _rem.rem)(24)
|
|
22
|
+
},
|
|
23
|
+
sm: {
|
|
24
|
+
fontSize: (0, _rem.rem)(12),
|
|
25
|
+
padding: (0, _rem.rem)(6),
|
|
26
|
+
height: (0, _rem.rem)(28)
|
|
27
|
+
},
|
|
28
|
+
md: {
|
|
29
|
+
fontSize: (0, _rem.rem)(14),
|
|
30
|
+
padding: (0, _rem.rem)(8),
|
|
31
|
+
height: (0, _rem.rem)(32)
|
|
32
|
+
},
|
|
33
|
+
lg: {
|
|
34
|
+
fontSize: (0, _rem.rem)(16),
|
|
35
|
+
padding: (0, _rem.rem)(10),
|
|
36
|
+
height: (0, _rem.rem)(38)
|
|
37
|
+
},
|
|
38
|
+
xl: {
|
|
39
|
+
fontSize: (0, _rem.rem)(18),
|
|
40
|
+
padding: (0, _rem.rem)(12),
|
|
41
|
+
height: (0, _rem.rem)(44)
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const useStyles = (0, _index3.createStyles)((theme, {
|
|
45
|
+
radius,
|
|
46
|
+
disabled,
|
|
47
|
+
orientation,
|
|
48
|
+
fullWidth
|
|
49
|
+
}, {
|
|
50
|
+
size
|
|
51
|
+
}) => {
|
|
52
|
+
const sizeStyles = sizes[size] || sizes.md;
|
|
53
|
+
return {
|
|
54
|
+
root: {
|
|
55
|
+
position: 'relative',
|
|
56
|
+
flexDirection: orientation === 'horizontal' ? 'row' : 'column',
|
|
57
|
+
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[6] : theme.colors.gray?.[1],
|
|
58
|
+
borderRadius: theme.fn.radius(radius),
|
|
59
|
+
padding: (0, _rem.rem)(4),
|
|
60
|
+
opacity: disabled ? 0.5 : 1,
|
|
61
|
+
...(fullWidth && {
|
|
62
|
+
width: '100%'
|
|
63
|
+
})
|
|
64
|
+
},
|
|
65
|
+
indicator: {
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
backgroundColor: theme.white,
|
|
68
|
+
borderRadius: theme.fn.radius(radius),
|
|
69
|
+
shadowColor: '#000',
|
|
70
|
+
shadowOffset: {
|
|
71
|
+
width: 0,
|
|
72
|
+
height: 1
|
|
73
|
+
},
|
|
74
|
+
shadowOpacity: 0.05,
|
|
75
|
+
shadowRadius: 1,
|
|
76
|
+
elevation: 1,
|
|
77
|
+
...(theme.colorScheme === 'dark' && {
|
|
78
|
+
backgroundColor: theme.colors.dark?.[5]
|
|
79
|
+
})
|
|
80
|
+
},
|
|
81
|
+
segment: {
|
|
82
|
+
flex: 1,
|
|
83
|
+
paddingHorizontal: sizeStyles.padding,
|
|
84
|
+
paddingVertical: sizeStyles.padding,
|
|
85
|
+
minHeight: sizeStyles.height,
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
borderRadius: theme.fn.radius(radius),
|
|
89
|
+
zIndex: 1
|
|
90
|
+
},
|
|
91
|
+
label: {
|
|
92
|
+
fontSize: sizeStyles.fontSize,
|
|
93
|
+
fontWeight: '500',
|
|
94
|
+
textAlign: 'center'
|
|
95
|
+
},
|
|
96
|
+
activeLabel: {
|
|
97
|
+
color: theme.colorScheme === 'dark' ? theme.white : theme.black
|
|
98
|
+
},
|
|
99
|
+
inactiveLabel: {
|
|
100
|
+
color: theme.colorScheme === 'dark' ? theme.colors.dark?.[1] : theme.colors.gray?.[7]
|
|
101
|
+
},
|
|
102
|
+
disabledLabel: {
|
|
103
|
+
color: theme.colorScheme === 'dark' ? theme.colors.dark?.[3] : theme.colors.gray?.[5]
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
const defaultProps = {
|
|
108
|
+
size: 'md',
|
|
109
|
+
color: 'blue',
|
|
110
|
+
radius: 'sm',
|
|
111
|
+
disabled: false,
|
|
112
|
+
orientation: 'horizontal',
|
|
113
|
+
fullWidth: false,
|
|
114
|
+
transitionDuration: 200
|
|
115
|
+
};
|
|
116
|
+
const SegmentedControl = exports.SegmentedControl = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
117
|
+
const {
|
|
118
|
+
value: controlledValue,
|
|
119
|
+
defaultValue,
|
|
120
|
+
onChange,
|
|
121
|
+
data,
|
|
122
|
+
size,
|
|
123
|
+
color,
|
|
124
|
+
radius,
|
|
125
|
+
disabled,
|
|
126
|
+
orientation,
|
|
127
|
+
fullWidth,
|
|
128
|
+
transitionDuration,
|
|
129
|
+
style,
|
|
130
|
+
...others
|
|
131
|
+
} = (0, _themeProvider.useComponentDefaultProps)('SegmentedControl', defaultProps, props);
|
|
132
|
+
const {
|
|
133
|
+
styles,
|
|
134
|
+
sx
|
|
135
|
+
} = useStyles({
|
|
136
|
+
color,
|
|
137
|
+
radius,
|
|
138
|
+
disabled,
|
|
139
|
+
orientation,
|
|
140
|
+
fullWidth
|
|
141
|
+
}, {
|
|
142
|
+
name: 'SegmentedControl',
|
|
143
|
+
size
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
// Normalize data to SegmentedControlItem[]
|
|
147
|
+
const normalizedData = data.map(item => typeof item === 'string' ? {
|
|
148
|
+
label: item,
|
|
149
|
+
value: item,
|
|
150
|
+
disabled: false
|
|
151
|
+
} : item);
|
|
152
|
+
const [uncontrolledValue, setUncontrolledValue] = (0, _react.useState)(defaultValue ?? normalizedData[0]?.value ?? '');
|
|
153
|
+
const [segmentLayouts, setSegmentLayouts] = (0, _react.useState)([]);
|
|
154
|
+
const value = controlledValue !== undefined ? controlledValue : uncontrolledValue;
|
|
155
|
+
const activeIndex = normalizedData.findIndex(item => item.value === value);
|
|
156
|
+
const indicatorPosition = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
157
|
+
const indicatorSize = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
158
|
+
(0, _react.useEffect)(() => {
|
|
159
|
+
if (segmentLayouts[activeIndex]) {
|
|
160
|
+
const layout = segmentLayouts[activeIndex];
|
|
161
|
+
_reactNative.Animated.parallel([_reactNative.Animated.timing(indicatorPosition, {
|
|
162
|
+
toValue: orientation === 'horizontal' ? layout.x : layout.y,
|
|
163
|
+
duration: transitionDuration,
|
|
164
|
+
useNativeDriver: false
|
|
165
|
+
}), _reactNative.Animated.timing(indicatorSize, {
|
|
166
|
+
toValue: orientation === 'horizontal' ? layout.width : layout.height,
|
|
167
|
+
duration: transitionDuration,
|
|
168
|
+
useNativeDriver: false
|
|
169
|
+
})]).start();
|
|
170
|
+
}
|
|
171
|
+
}, [activeIndex, segmentLayouts, orientation, transitionDuration, indicatorPosition, indicatorSize]);
|
|
172
|
+
const handleSegmentLayout = (index, event) => {
|
|
173
|
+
const {
|
|
174
|
+
x,
|
|
175
|
+
y,
|
|
176
|
+
width,
|
|
177
|
+
height
|
|
178
|
+
} = event.nativeEvent.layout;
|
|
179
|
+
setSegmentLayouts(prev => {
|
|
180
|
+
const newLayouts = [...prev];
|
|
181
|
+
newLayouts[index] = {
|
|
182
|
+
x,
|
|
183
|
+
y,
|
|
184
|
+
width,
|
|
185
|
+
height
|
|
186
|
+
};
|
|
187
|
+
return newLayouts;
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
const handlePress = item => {
|
|
191
|
+
if (disabled || item.disabled) return;
|
|
192
|
+
if (controlledValue === undefined) {
|
|
193
|
+
setUncontrolledValue(item.value);
|
|
194
|
+
}
|
|
195
|
+
onChange?.(item.value);
|
|
196
|
+
};
|
|
197
|
+
const indicatorStyle = {
|
|
198
|
+
[orientation === 'horizontal' ? 'left' : 'top']: indicatorPosition,
|
|
199
|
+
[orientation === 'horizontal' ? 'width' : 'height']: indicatorSize,
|
|
200
|
+
[orientation === 'horizontal' ? 'height' : 'width']: '100%'
|
|
201
|
+
};
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
|
|
203
|
+
ref: ref,
|
|
204
|
+
style: sx(styles.root, style),
|
|
205
|
+
...others,
|
|
206
|
+
children: [segmentLayouts.length === normalizedData.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
207
|
+
style: [styles.indicator, indicatorStyle]
|
|
208
|
+
}), normalizedData.map((item, index) => {
|
|
209
|
+
const isActive = item.value === value;
|
|
210
|
+
const isDisabled = disabled || item.disabled;
|
|
211
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
212
|
+
style: styles.segment,
|
|
213
|
+
onPress: () => handlePress(item),
|
|
214
|
+
disabled: isDisabled,
|
|
215
|
+
activeOpacity: 0.7,
|
|
216
|
+
onLayout: event => handleSegmentLayout(index, event),
|
|
217
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
218
|
+
style: [styles.label, isActive ? styles.activeLabel : styles.inactiveLabel, isDisabled && styles.disabledLabel],
|
|
219
|
+
children: item.label
|
|
220
|
+
})
|
|
221
|
+
}, item.value);
|
|
222
|
+
})]
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
SegmentedControl.displayName = 'SegmentedControl';
|
|
226
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_rem","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","sizes","xs","fontSize","rem","padding","height","sm","md","lg","xl","useStyles","createStyles","theme","radius","disabled","orientation","fullWidth","size","sizeStyles","root","position","flexDirection","backgroundColor","colorScheme","colors","dark","gray","borderRadius","fn","opacity","width","indicator","white","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","segment","flex","paddingHorizontal","paddingVertical","minHeight","justifyContent","alignItems","zIndex","label","fontWeight","textAlign","activeLabel","color","black","inactiveLabel","disabledLabel","defaultProps","transitionDuration","SegmentedControl","exports","forwardRef","props","ref","value","controlledValue","defaultValue","onChange","data","style","others","useComponentDefaultProps","styles","sx","name","normalizedData","map","item","uncontrolledValue","setUncontrolledValue","useState","segmentLayouts","setSegmentLayouts","undefined","activeIndex","findIndex","indicatorPosition","useRef","Animated","Value","current","indicatorSize","useEffect","layout","parallel","timing","toValue","x","y","duration","useNativeDriver","start","handleSegmentLayout","index","event","nativeEvent","prev","newLayouts","handlePress","indicatorStyle","jsxs","BoxView","children","length","jsx","View","isActive","isDisabled","TouchableOpacity","onPress","activeOpacity","onLayout","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/SegmentedControl/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG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= _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../BoxView/index.js");
|
|
10
|
+
var _index2 = require("../Text/index.js");
|
|
11
|
+
var _index3 = require("../TextInput/index.js");
|
|
12
|
+
var _themeProvider = require("../../theme/theme-provider.js");
|
|
13
|
+
var _index4 = require("../../theme/index.js");
|
|
14
|
+
var _rem = require("../../theme/utils/rem.js");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
const useStyles = (0, _index4.createStyles)((theme, {
|
|
19
|
+
color
|
|
20
|
+
}) => {
|
|
21
|
+
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
22
|
+
return {
|
|
23
|
+
modalOverlay: {
|
|
24
|
+
flex: 1,
|
|
25
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
26
|
+
justifyContent: 'flex-end'
|
|
27
|
+
},
|
|
28
|
+
modalContent: {
|
|
29
|
+
backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[7] : theme.white,
|
|
30
|
+
borderTopLeftRadius: theme.radius.lg,
|
|
31
|
+
borderTopRightRadius: theme.radius.lg,
|
|
32
|
+
maxHeight: '80%'
|
|
33
|
+
},
|
|
34
|
+
searchContainer: {
|
|
35
|
+
padding: theme.spacing.md,
|
|
36
|
+
borderBottomWidth: 1,
|
|
37
|
+
borderBottomColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[2]
|
|
38
|
+
},
|
|
39
|
+
listContainer: {
|
|
40
|
+
paddingVertical: (0, _rem.rem)(8)
|
|
41
|
+
},
|
|
42
|
+
item: {
|
|
43
|
+
paddingVertical: (0, _rem.rem)(12),
|
|
44
|
+
paddingHorizontal: theme.spacing.md,
|
|
45
|
+
flexDirection: 'row',
|
|
46
|
+
alignItems: 'center'
|
|
47
|
+
},
|
|
48
|
+
itemSelected: {
|
|
49
|
+
backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[5] : colors?.[0] || (theme.colors.gray || [])[0]
|
|
50
|
+
},
|
|
51
|
+
itemDisabled: {
|
|
52
|
+
opacity: 0.4
|
|
53
|
+
},
|
|
54
|
+
itemText: {
|
|
55
|
+
fontSize: (0, _rem.rem)(14),
|
|
56
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black
|
|
57
|
+
},
|
|
58
|
+
itemTextSelected: {
|
|
59
|
+
fontWeight: '600',
|
|
60
|
+
color: colors?.[6] || colors?.[5] || theme.primaryBgColor
|
|
61
|
+
},
|
|
62
|
+
groupLabel: {
|
|
63
|
+
paddingVertical: (0, _rem.rem)(8),
|
|
64
|
+
paddingHorizontal: theme.spacing.md,
|
|
65
|
+
fontSize: (0, _rem.rem)(12),
|
|
66
|
+
fontWeight: '600',
|
|
67
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6],
|
|
68
|
+
textTransform: 'uppercase'
|
|
69
|
+
},
|
|
70
|
+
emptyState: {
|
|
71
|
+
padding: theme.spacing.xl,
|
|
72
|
+
alignItems: 'center'
|
|
73
|
+
},
|
|
74
|
+
emptyText: {
|
|
75
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6]
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
const defaultProps = {
|
|
80
|
+
size: 'md',
|
|
81
|
+
radius: 'sm',
|
|
82
|
+
color: 'blue',
|
|
83
|
+
disabled: false,
|
|
84
|
+
searchable: false,
|
|
85
|
+
clearable: false,
|
|
86
|
+
maxDropdownHeight: 400,
|
|
87
|
+
searchPlaceholder: 'Search...',
|
|
88
|
+
clearButtonLabel: 'Clear'
|
|
89
|
+
};
|
|
90
|
+
const normalizeData = data => {
|
|
91
|
+
return data.map(item => typeof item === 'string' ? {
|
|
92
|
+
value: item,
|
|
93
|
+
label: item
|
|
94
|
+
} : item);
|
|
95
|
+
};
|
|
96
|
+
const Select = exports.Select = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
97
|
+
const {
|
|
98
|
+
data,
|
|
99
|
+
value: controlledValue,
|
|
100
|
+
defaultValue,
|
|
101
|
+
onChange,
|
|
102
|
+
placeholder,
|
|
103
|
+
label,
|
|
104
|
+
description,
|
|
105
|
+
error,
|
|
106
|
+
size,
|
|
107
|
+
radius,
|
|
108
|
+
color,
|
|
109
|
+
disabled,
|
|
110
|
+
searchable,
|
|
111
|
+
searchPlaceholder,
|
|
112
|
+
clearable,
|
|
113
|
+
clearButtonLabel,
|
|
114
|
+
maxDropdownHeight,
|
|
115
|
+
icon,
|
|
116
|
+
rightSection,
|
|
117
|
+
style,
|
|
118
|
+
...others
|
|
119
|
+
} = (0, _themeProvider.useComponentDefaultProps)('Select', defaultProps, props);
|
|
120
|
+
const [opened, setOpened] = (0, _react.useState)(false);
|
|
121
|
+
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
122
|
+
const [value, setValue] = (0, _react.useState)(defaultValue || '');
|
|
123
|
+
const {
|
|
124
|
+
styles
|
|
125
|
+
} = useStyles({
|
|
126
|
+
color,
|
|
127
|
+
size
|
|
128
|
+
}, {
|
|
129
|
+
name: 'Select'
|
|
130
|
+
});
|
|
131
|
+
const isControlled = controlledValue !== undefined;
|
|
132
|
+
const currentValue = isControlled ? controlledValue : value;
|
|
133
|
+
const normalizedData = normalizeData(data);
|
|
134
|
+
const selectedItem = normalizedData.find(item => item.value === currentValue);
|
|
135
|
+
const filteredData = searchable ? normalizedData.filter(item => item.label.toLowerCase().includes(searchQuery.toLowerCase())) : normalizedData;
|
|
136
|
+
const handleSelect = itemValue => {
|
|
137
|
+
if (!isControlled) {
|
|
138
|
+
setValue(itemValue);
|
|
139
|
+
}
|
|
140
|
+
onChange?.(itemValue);
|
|
141
|
+
setOpened(false);
|
|
142
|
+
setSearchQuery('');
|
|
143
|
+
};
|
|
144
|
+
const handleClear = () => {
|
|
145
|
+
if (!isControlled) {
|
|
146
|
+
setValue('');
|
|
147
|
+
}
|
|
148
|
+
onChange?.('');
|
|
149
|
+
};
|
|
150
|
+
const groupedData = {};
|
|
151
|
+
let ungroupedItems = [];
|
|
152
|
+
filteredData.forEach(item => {
|
|
153
|
+
if (item.group) {
|
|
154
|
+
if (!groupedData[item.group]) {
|
|
155
|
+
groupedData[item.group] = [];
|
|
156
|
+
}
|
|
157
|
+
groupedData[item.group].push(item);
|
|
158
|
+
} else {
|
|
159
|
+
ungroupedItems.push(item);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
163
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.TextInput, {
|
|
164
|
+
ref: ref,
|
|
165
|
+
label: label,
|
|
166
|
+
description: description,
|
|
167
|
+
error: error,
|
|
168
|
+
size: size,
|
|
169
|
+
radius: radius,
|
|
170
|
+
icon: icon,
|
|
171
|
+
rightSection: rightSection,
|
|
172
|
+
value: selectedItem?.label || '',
|
|
173
|
+
placeholder: placeholder,
|
|
174
|
+
editable: !disabled,
|
|
175
|
+
onPress: () => !disabled && setOpened(true),
|
|
176
|
+
style: style,
|
|
177
|
+
...others
|
|
178
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
179
|
+
visible: opened,
|
|
180
|
+
transparent: true,
|
|
181
|
+
animationType: "slide",
|
|
182
|
+
onRequestClose: () => setOpened(false),
|
|
183
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
184
|
+
activeOpacity: 1,
|
|
185
|
+
style: styles.modalOverlay,
|
|
186
|
+
onPress: () => setOpened(false),
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
188
|
+
activeOpacity: 1,
|
|
189
|
+
style: styles.modalContent,
|
|
190
|
+
children: [searchable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
191
|
+
style: styles.searchContainer,
|
|
192
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.TextInput, {
|
|
193
|
+
placeholder: searchPlaceholder,
|
|
194
|
+
value: searchQuery,
|
|
195
|
+
onChange: e => setSearchQuery(e.nativeEvent.text),
|
|
196
|
+
autoFocus: true
|
|
197
|
+
})
|
|
198
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
199
|
+
style: {
|
|
200
|
+
maxHeight: maxDropdownHeight
|
|
201
|
+
},
|
|
202
|
+
contentContainerStyle: styles.listContainer,
|
|
203
|
+
children: [clearable && currentValue && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
204
|
+
style: styles.item,
|
|
205
|
+
onPress: handleClear,
|
|
206
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
207
|
+
style: styles.itemText,
|
|
208
|
+
children: clearButtonLabel
|
|
209
|
+
})
|
|
210
|
+
}), ungroupedItems.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
211
|
+
style: [styles.item, currentValue === item.value && styles.itemSelected, item.disabled && styles.itemDisabled],
|
|
212
|
+
onPress: () => !item.disabled && handleSelect(item.value),
|
|
213
|
+
disabled: item.disabled,
|
|
214
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
215
|
+
style: [styles.itemText, currentValue === item.value && styles.itemTextSelected],
|
|
216
|
+
children: item.label
|
|
217
|
+
})
|
|
218
|
+
}, item.value)), Object.keys(groupedData).map(group => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.default.Fragment, {
|
|
219
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
220
|
+
style: styles.groupLabel,
|
|
221
|
+
children: group
|
|
222
|
+
}), (groupedData[group] || []).map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
223
|
+
style: [styles.item, currentValue === item.value && styles.itemSelected, item.disabled && styles.itemDisabled],
|
|
224
|
+
onPress: () => !item.disabled && handleSelect(item.value),
|
|
225
|
+
disabled: item.disabled,
|
|
226
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
227
|
+
style: [styles.itemText, currentValue === item.value && styles.itemTextSelected],
|
|
228
|
+
children: item.label
|
|
229
|
+
})
|
|
230
|
+
}, item.value))]
|
|
231
|
+
}, group)), filteredData.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
232
|
+
style: styles.emptyState,
|
|
233
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
234
|
+
style: styles.emptyText,
|
|
235
|
+
children: "No options found"
|
|
236
|
+
})
|
|
237
|
+
})]
|
|
238
|
+
})]
|
|
239
|
+
})
|
|
240
|
+
})
|
|
241
|
+
})]
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
Select.displayName = 'Select';
|
|
245
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_index3","_themeProvider","_index4","_rem","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useStyles","createStyles","theme","color","colors","primaryColor","modalOverlay","flex","backgroundColor","justifyContent","modalContent","colorScheme","dark","white","borderTopLeftRadius","radius","lg","borderTopRightRadius","maxHeight","searchContainer","padding","spacing","md","borderBottomWidth","borderBottomColor","gray","listContainer","paddingVertical","rem","item","paddingHorizontal","flexDirection","alignItems","itemSelected","itemDisabled","opacity","itemText","fontSize","black","itemTextSelected","fontWeight","primaryBgColor","groupLabel","textTransform","emptyState","xl","emptyText","defaultProps","size","disabled","searchable","clearable","maxDropdownHeight","searchPlaceholder","clearButtonLabel","normalizeData","data","map","value","label","Select","exports","forwardRef","props","ref","controlledValue","defaultValue","onChange","placeholder","description","error","icon","rightSection","style","others","useComponentDefaultProps","opened","setOpened","useState","searchQuery","setSearchQuery","setValue","styles","name","isControlled","undefined","currentValue","normalizedData","selectedItem","find","filteredData","filter","toLowerCase","includes","handleSelect","itemValue","handleClear","groupedData","ungroupedItems","forEach","group","push","jsxs","Fragment","children","jsx","TextInput","editable","onPress","Modal","visible","transparent","animationType","onRequestClose","TouchableOpacity","activeOpacity","BoxView","nativeEvent","text","autoFocus","ScrollView","contentContainerStyle","Text","keys","length","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAOA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,IAAA,GAAAP,OAAA;AAA4C,IAAA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,OAAO,EAAEA,CAAA,KAAM,CAAC/E,IAAI,CAACoB,QAAQ,IAAI6C,YAAY,CAACjE,IAAI,CAAC6B,KAAK,CAAE;gBAC1DT,QAAQ,EAAEpB,IAAI,CAACoB,QAAS;gBAAAuD,QAAA,eAExB,IAAA7H,WAAA,CAAA8H,GAAA,EAACnI,OAAA,CAAAoJ,IAAI;kBACHjD,KAAK,EAAE,CACLS,MAAM,CAAC9C,QAAQ,EACfkD,YAAY,KAAKzD,IAAI,CAAC6B,KAAK,IAAIwB,MAAM,CAAC3C,gBAAgB,CACtD;kBAAAiE,QAAA,EAED3E,IAAI,CAAC8B;gBAAK,CACP;cAAC,GAhBF9B,IAAI,CAAC6B,KAiBM,CACnB,CAAC;YAAA,GAtBiB0C,KAuBL,CACjB,CAAC,EAEDV,YAAY,CAACkC,MAAM,KAAK,CAAC,iBACxB,IAAAjJ,WAAA,CAAA8H,GAAA,EAACpI,MAAA,CAAA+I,OAAO;cAAC3C,KAAK,EAAES,MAAM,CAACtC,UAAW;cAAA4D,QAAA,eAChC,IAAA7H,WAAA,CAAA8H,GAAA,EAACnI,OAAA,CAAAoJ,IAAI;gBAACjD,KAAK,EAAES,MAAM,CAACpC,SAAU;gBAAA0D,QAAA,EAAC;cAAgB,CAAM;YAAC,CAC/C,CACV;UAAA,CACS,CAAC;QAAA,CACG;MAAC,CACH;IAAC,CACd,CAAC;EAAA,CACR,CAAC;AAEP,CAAC,CAAC;AAEF5C,MAAM,CAACiE,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SimpleGrid = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../BoxView/index.js");
|
|
10
|
+
var _themeProvider = require("../../theme/theme-provider.js");
|
|
11
|
+
var _index2 = require("../../theme/index.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
const useStyles = (0, _index2.createStyles)((theme, {
|
|
16
|
+
cols,
|
|
17
|
+
spacing,
|
|
18
|
+
verticalSpacing
|
|
19
|
+
}) => {
|
|
20
|
+
const horizontalSpacing = theme.fn.size({
|
|
21
|
+
size: spacing,
|
|
22
|
+
sizes: theme.spacing
|
|
23
|
+
});
|
|
24
|
+
const rowSpacing = theme.fn.size({
|
|
25
|
+
size: verticalSpacing || spacing,
|
|
26
|
+
sizes: theme.spacing
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
root: {
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
flexWrap: 'wrap',
|
|
32
|
+
margin: -horizontalSpacing / 2
|
|
33
|
+
},
|
|
34
|
+
child: {
|
|
35
|
+
flexBasis: `${100 / cols}%`,
|
|
36
|
+
flexGrow: 0,
|
|
37
|
+
flexShrink: 0,
|
|
38
|
+
paddingHorizontal: horizontalSpacing / 2,
|
|
39
|
+
paddingVertical: rowSpacing / 2
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
const defaultProps = {
|
|
44
|
+
cols: 1,
|
|
45
|
+
spacing: 'md'
|
|
46
|
+
};
|
|
47
|
+
const SimpleGrid = exports.SimpleGrid = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
48
|
+
const {
|
|
49
|
+
cols,
|
|
50
|
+
spacing,
|
|
51
|
+
verticalSpacing,
|
|
52
|
+
breakpoints,
|
|
53
|
+
children,
|
|
54
|
+
style
|
|
55
|
+
} = (0, _themeProvider.useComponentDefaultProps)('SimpleGrid', defaultProps, props);
|
|
56
|
+
const [dimensions, setDimensions] = (0, _react.useState)(_reactNative.Dimensions.get('window'));
|
|
57
|
+
const [activeCols, setActiveCols] = (0, _react.useState)(cols);
|
|
58
|
+
const [activeSpacing, setActiveSpacing] = (0, _react.useState)(spacing);
|
|
59
|
+
(0, _react.useEffect)(() => {
|
|
60
|
+
const subscription = _reactNative.Dimensions.addEventListener('change', ({
|
|
61
|
+
window
|
|
62
|
+
}) => {
|
|
63
|
+
setDimensions(window);
|
|
64
|
+
});
|
|
65
|
+
return () => subscription?.remove();
|
|
66
|
+
}, []);
|
|
67
|
+
(0, _react.useEffect)(() => {
|
|
68
|
+
if (breakpoints && breakpoints.length > 0) {
|
|
69
|
+
const width = dimensions.width;
|
|
70
|
+
const sorted = [...breakpoints].sort((a, b) => b.maxWidth - a.maxWidth);
|
|
71
|
+
const breakpoint = sorted.find(bp => width <= bp.maxWidth);
|
|
72
|
+
if (breakpoint) {
|
|
73
|
+
setActiveCols(breakpoint.cols);
|
|
74
|
+
setActiveSpacing(breakpoint.spacing || spacing);
|
|
75
|
+
} else {
|
|
76
|
+
setActiveCols(cols);
|
|
77
|
+
setActiveSpacing(spacing);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, [dimensions, breakpoints, cols, spacing]);
|
|
81
|
+
const {
|
|
82
|
+
styles,
|
|
83
|
+
sx
|
|
84
|
+
} = useStyles({
|
|
85
|
+
cols: activeCols,
|
|
86
|
+
spacing: activeSpacing,
|
|
87
|
+
verticalSpacing
|
|
88
|
+
}, {
|
|
89
|
+
name: 'SimpleGrid'
|
|
90
|
+
});
|
|
91
|
+
const childArray = _react.default.Children.toArray(children);
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
93
|
+
ref: ref,
|
|
94
|
+
style: sx(styles.root, style),
|
|
95
|
+
children: childArray.map((child, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
96
|
+
style: styles.child,
|
|
97
|
+
children: child
|
|
98
|
+
}, index))
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
SimpleGrid.displayName = 'SimpleGrid';
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_themeProvider","_index2","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useStyles","createStyles","theme","cols","spacing","verticalSpacing","horizontalSpacing","fn","size","sizes","rowSpacing","root","flexDirection","flexWrap","margin","child","flexBasis","flexGrow","flexShrink","paddingHorizontal","paddingVertical","defaultProps","SimpleGrid","exports","forwardRef","props","ref","breakpoints","children","style","useComponentDefaultProps","dimensions","setDimensions","useState","Dimensions","activeCols","setActiveCols","activeSpacing","setActiveSpacing","useEffect","subscription","addEventListener","window","remove","length","width","sorted","sort","b","maxWidth","breakpoint","find","bp","styles","sx","name","childArray","React","Children","toArray","jsx","BoxView","map","index","displayName"],"sourceRoot":"../../../../src","sources":["components/SimpleGrid/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA2C,IAAAK,WAA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