react-native-mantine 0.1.11
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/LICENSE +20 -0
- package/README.md +28 -0
- package/lib/commonjs/components/ActionIcon/ActionIcon.js +71 -0
- package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -0
- package/lib/commonjs/components/ActionIcon/index.js +13 -0
- package/lib/commonjs/components/ActionIcon/index.js.map +1 -0
- package/lib/commonjs/components/BoxView/index.js +30 -0
- package/lib/commonjs/components/BoxView/index.js.map +1 -0
- package/lib/commonjs/components/Group/index.js +33 -0
- package/lib/commonjs/components/Group/index.js.map +1 -0
- package/lib/commonjs/components/Loader/Loader.js +42 -0
- package/lib/commonjs/components/Loader/Loader.js.map +1 -0
- package/lib/commonjs/components/Loader/index.js +13 -0
- package/lib/commonjs/components/Loader/index.js.map +1 -0
- package/lib/commonjs/components/Stack/index.js +30 -0
- package/lib/commonjs/components/Stack/index.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +51 -0
- package/lib/commonjs/components/Text/index.js.map +1 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +42 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js +24 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js.map +1 -0
- package/lib/commonjs/components/UnstyledButton/index.js +13 -0
- package/lib/commonjs/components/UnstyledButton/index.js.map +1 -0
- package/lib/commonjs/components/index.js +72 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/fonts/Nunito-Bold.ttf +0 -0
- package/lib/commonjs/fonts/Nunito-Regular.ttf +0 -0
- package/lib/commonjs/fonts/Nunito-SemiBold.ttf +0 -0
- package/lib/commonjs/hooks/useCachedResources.js +36 -0
- package/lib/commonjs/hooks/useCachedResources.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/theme/constants.js +25 -0
- package/lib/commonjs/theme/constants.js.map +1 -0
- package/lib/commonjs/theme/create-styles.js +25 -0
- package/lib/commonjs/theme/create-styles.js.map +1 -0
- package/lib/commonjs/theme/default-theme.js +132 -0
- package/lib/commonjs/theme/default-theme.js.map +1 -0
- package/lib/commonjs/theme/filter-props.js +15 -0
- package/lib/commonjs/theme/filter-props.js.map +1 -0
- package/lib/commonjs/theme/functions/attach-functions.js +18 -0
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/index.js +15 -0
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/radius.js +16 -0
- package/lib/commonjs/theme/functions/fns/radius.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +12 -0
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/variant.js +11 -0
- package/lib/commonjs/theme/functions/fns/variant.js.map +1 -0
- package/lib/commonjs/theme/generate-theme.js +30 -0
- package/lib/commonjs/theme/generate-theme.js.map +1 -0
- package/lib/commonjs/theme/get-size/index.js +16 -0
- package/lib/commonjs/theme/get-size/index.js.map +1 -0
- package/lib/commonjs/theme/index.js +46 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/theme-provider.js +106 -0
- package/lib/commonjs/theme/theme-provider.js.map +1 -0
- package/lib/commonjs/theme/theme.d.js +2 -0
- package/lib/commonjs/theme/theme.d.js.map +1 -0
- package/lib/commonjs/theme/types/ColorScheme.js +2 -0
- package/lib/commonjs/theme/types/ColorScheme.js.map +1 -0
- package/lib/commonjs/theme/types/DefaultProps.js +2 -0
- package/lib/commonjs/theme/types/DefaultProps.js.map +1 -0
- package/lib/commonjs/theme/types/MantineColor.js +6 -0
- package/lib/commonjs/theme/types/MantineColor.js.map +1 -0
- package/lib/commonjs/theme/types/MantineSize.js +2 -0
- package/lib/commonjs/theme/types/MantineSize.js.map +1 -0
- package/lib/commonjs/theme/types/MantineStyleSystem.js +6 -0
- package/lib/commonjs/theme/types/MantineStyleSystem.js.map +1 -0
- package/lib/commonjs/theme/types/Tuple.js +2 -0
- package/lib/commonjs/theme/types/Tuple.js.map +1 -0
- package/lib/commonjs/theme/types/Variants.js +2 -0
- package/lib/commonjs/theme/types/Variants.js.map +1 -0
- package/lib/commonjs/theme/types/index.js +2 -0
- package/lib/commonjs/theme/types/index.js.map +1 -0
- package/lib/module/components/ActionIcon/ActionIcon.js +66 -0
- package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -0
- package/lib/module/components/ActionIcon/index.js +4 -0
- package/lib/module/components/ActionIcon/index.js.map +1 -0
- package/lib/module/components/BoxView/index.js +26 -0
- package/lib/module/components/BoxView/index.js.map +1 -0
- package/lib/module/components/Group/index.js +28 -0
- package/lib/module/components/Group/index.js.map +1 -0
- package/lib/module/components/Loader/Loader.js +38 -0
- package/lib/module/components/Loader/Loader.js.map +1 -0
- package/lib/module/components/Loader/index.js +4 -0
- package/lib/module/components/Loader/index.js.map +1 -0
- package/lib/module/components/Stack/index.js +25 -0
- package/lib/module/components/Stack/index.js.map +1 -0
- package/lib/module/components/Text/index.js +47 -0
- package/lib/module/components/Text/index.js.map +1 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.js +35 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +20 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -0
- package/lib/module/components/UnstyledButton/index.js +4 -0
- package/lib/module/components/UnstyledButton/index.js.map +1 -0
- package/lib/module/components/index.js +9 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/fonts/Nunito-Bold.ttf +0 -0
- package/lib/module/fonts/Nunito-Regular.ttf +0 -0
- package/lib/module/fonts/Nunito-SemiBold.ttf +0 -0
- package/lib/module/hooks/useCachedResources.js +30 -0
- package/lib/module/hooks/useCachedResources.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theme/constants.js +21 -0
- package/lib/module/theme/constants.js.map +1 -0
- package/lib/module/theme/create-styles.js +21 -0
- package/lib/module/theme/create-styles.js.map +1 -0
- package/lib/module/theme/default-theme.js +128 -0
- package/lib/module/theme/default-theme.js.map +1 -0
- package/lib/module/theme/filter-props.js +11 -0
- package/lib/module/theme/filter-props.js.map +1 -0
- package/lib/module/theme/functions/attach-functions.js +14 -0
- package/lib/module/theme/functions/attach-functions.js.map +1 -0
- package/lib/module/theme/functions/fns/index.js +11 -0
- package/lib/module/theme/functions/fns/index.js.map +1 -0
- package/lib/module/theme/functions/fns/radius.js +12 -0
- package/lib/module/theme/functions/fns/radius.js.map +1 -0
- package/lib/module/theme/functions/fns/theme-color/theme-color.js +8 -0
- package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -0
- package/lib/module/theme/functions/fns/variant.js +6 -0
- package/lib/module/theme/functions/fns/variant.js.map +1 -0
- package/lib/module/theme/generate-theme.js +25 -0
- package/lib/module/theme/generate-theme.js.map +1 -0
- package/lib/module/theme/get-size/index.js +12 -0
- package/lib/module/theme/get-size/index.js.map +1 -0
- package/lib/module/theme/index.js +7 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/theme-provider.js +94 -0
- package/lib/module/theme/theme-provider.js.map +1 -0
- package/lib/module/theme/theme.d.js +2 -0
- package/lib/module/theme/theme.d.js.map +1 -0
- package/lib/module/theme/types/ColorScheme.js +2 -0
- package/lib/module/theme/types/ColorScheme.js.map +1 -0
- package/lib/module/theme/types/DefaultProps.js +2 -0
- package/lib/module/theme/types/DefaultProps.js.map +1 -0
- package/lib/module/theme/types/MantineColor.js +4 -0
- package/lib/module/theme/types/MantineColor.js.map +1 -0
- package/lib/module/theme/types/MantineSize.js +2 -0
- package/lib/module/theme/types/MantineSize.js.map +1 -0
- package/lib/module/theme/types/MantineStyleSystem.js +4 -0
- package/lib/module/theme/types/MantineStyleSystem.js.map +1 -0
- package/lib/module/theme/types/Tuple.js +2 -0
- package/lib/module/theme/types/Tuple.js.map +1 -0
- package/lib/module/theme/types/Variants.js +2 -0
- package/lib/module/theme/types/Variants.js.map +1 -0
- package/lib/module/theme/types/index.js +2 -0
- package/lib/module/theme/types/index.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/ActionIcon/ActionIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ActionIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/ActionIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/BoxView/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/BoxView/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Group/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/Group/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Loader/Loader.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/Loader/Loader.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Loader/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/Loader/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Stack/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Text/index.d.ts +20 -0
- package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useCachedResources.d.ts +2 -0
- package/lib/typescript/commonjs/src/hooks/useCachedResources.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/constants.d.ts +13 -0
- package/lib/typescript/commonjs/src/theme/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/create-styles.d.ts +12 -0
- package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts +58 -0
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/filter-props.d.ts +6 -0
- package/lib/typescript/commonjs/src/theme/filter-props.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +2 -0
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts +3 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/radius.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +2 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts +2 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/generate-theme.d.ts +3 -0
- package/lib/typescript/commonjs/src/theme/generate-theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/get-size/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/theme/get-size/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +21 -0
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/ColorScheme.d.ts +2 -0
- package/lib/typescript/commonjs/src/theme/types/ColorScheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/types/DefaultProps.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/MantineColor.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/types/MantineColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/MantineSize.d.ts +4 -0
- package/lib/typescript/commonjs/src/theme/types/MantineSize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/MantineStyleSystem.d.ts +5 -0
- package/lib/typescript/commonjs/src/theme/types/MantineStyleSystem.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/Tuple.d.ts +4 -0
- package/lib/typescript/commonjs/src/theme/types/Tuple.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/Variants.d.ts +2 -0
- package/lib/typescript/commonjs/src/theme/types/Variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/types/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/types/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts +17 -0
- package/lib/typescript/module/src/components/ActionIcon/ActionIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ActionIcon/index.d.ts +3 -0
- package/lib/typescript/module/src/components/ActionIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/BoxView/index.d.ts +17 -0
- package/lib/typescript/module/src/components/BoxView/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Group/index.d.ts +9 -0
- package/lib/typescript/module/src/components/Group/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Loader/Loader.d.ts +14 -0
- package/lib/typescript/module/src/components/Loader/Loader.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Loader/index.d.ts +3 -0
- package/lib/typescript/module/src/components/Loader/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/index.d.ts +6 -0
- package/lib/typescript/module/src/components/Stack/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Text/index.d.ts +20 -0
- package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts +10 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +9 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UnstyledButton/index.d.ts +3 -0
- package/lib/typescript/module/src/components/UnstyledButton/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/index.d.ts +7 -0
- package/lib/typescript/module/src/components/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useCachedResources.d.ts +2 -0
- package/lib/typescript/module/src/hooks/useCachedResources.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +5 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/constants.d.ts +13 -0
- package/lib/typescript/module/src/theme/constants.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/create-styles.d.ts +12 -0
- package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/default-theme.d.ts +58 -0
- package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/filter-props.d.ts +6 -0
- package/lib/typescript/module/src/theme/filter-props.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +2 -0
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts +8 -0
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/radius.d.ts +3 -0
- package/lib/typescript/module/src/theme/functions/fns/radius.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +2 -0
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts +2 -0
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/generate-theme.d.ts +3 -0
- package/lib/typescript/module/src/theme/generate-theme.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/get-size/index.d.ts +6 -0
- package/lib/typescript/module/src/theme/get-size/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/index.d.ts +5 -0
- package/lib/typescript/module/src/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/theme-provider.d.ts +21 -0
- package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/ColorScheme.d.ts +2 -0
- package/lib/typescript/module/src/theme/types/ColorScheme.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/DefaultProps.d.ts +8 -0
- package/lib/typescript/module/src/theme/types/DefaultProps.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/MantineColor.d.ts +8 -0
- package/lib/typescript/module/src/theme/types/MantineColor.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/MantineSize.d.ts +4 -0
- package/lib/typescript/module/src/theme/types/MantineSize.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/MantineStyleSystem.d.ts +5 -0
- package/lib/typescript/module/src/theme/types/MantineStyleSystem.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/Tuple.d.ts +4 -0
- package/lib/typescript/module/src/theme/types/Tuple.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/Variants.d.ts +2 -0
- package/lib/typescript/module/src/theme/types/Variants.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/types/index.d.ts +8 -0
- package/lib/typescript/module/src/theme/types/index.d.ts.map +1 -0
- package/package.json +194 -0
- package/src/components/ActionIcon/ActionIcon.tsx +64 -0
- package/src/components/ActionIcon/index.ts +3 -0
- package/src/components/BoxView/index.tsx +30 -0
- package/src/components/Group/index.tsx +48 -0
- package/src/components/Loader/Loader.tsx +50 -0
- package/src/components/Loader/index.ts +2 -0
- package/src/components/Stack/index.tsx +29 -0
- package/src/components/Text/index.tsx +81 -0
- package/src/components/UnstyledButton/UnstyledButton.styles.ts +16 -0
- package/src/components/UnstyledButton/UnstyledButton.tsx +34 -0
- package/src/components/UnstyledButton/index.ts +2 -0
- package/src/components/index.tsx +6 -0
- package/src/fonts/Nunito-Bold.ttf +0 -0
- package/src/fonts/Nunito-Regular.ttf +0 -0
- package/src/fonts/Nunito-SemiBold.ttf +0 -0
- package/src/hooks/useCachedResources.ts +30 -0
- package/src/index.tsx +4 -0
- package/src/theme/constants.ts +20 -0
- package/src/theme/create-styles.ts +31 -0
- package/src/theme/default-theme.ts +359 -0
- package/src/theme/filter-props.ts +12 -0
- package/src/theme/functions/attach-functions.ts +12 -0
- package/src/theme/functions/fns/index.ts +9 -0
- package/src/theme/functions/fns/radius.ts +16 -0
- package/src/theme/functions/fns/theme-color/theme-color.ts +6 -0
- package/src/theme/functions/fns/variant.ts +3 -0
- package/src/theme/generate-theme.ts +20 -0
- package/src/theme/get-size/index.ts +18 -0
- package/src/theme/index.tsx +4 -0
- package/src/theme/theme-provider.tsx +131 -0
- package/src/theme/theme.d.ts +13 -0
- package/src/theme/types/ColorScheme.ts +1 -0
- package/src/theme/types/DefaultProps.ts +13 -0
- package/src/theme/types/MantineColor.ts +28 -0
- package/src/theme/types/MantineSize.ts +3 -0
- package/src/theme/types/MantineStyleSystem.ts +62 -0
- package/src/theme/types/Tuple.ts +9 -0
- package/src/theme/types/Variants.ts +1 -0
- package/src/theme/types/index.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attach-functions.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/functions/attach-functions.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,GAAG,CASnD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { radius } from './radius';
|
|
2
|
+
import { themeColor } from './theme-color/theme-color';
|
|
3
|
+
export declare const fns: {
|
|
4
|
+
radius: typeof radius;
|
|
5
|
+
variant: (_theme: any) => (_variant: string) => {};
|
|
6
|
+
themeColor: typeof themeColor;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,eAAO,MAAM,GAAG;;;;CAIf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/radius.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAG,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEtD,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,WAChB,iBAAiB,KAAG,MAAM,GAAG,MAAM,CAYnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-color.d.ts","sourceRoot":"","sources":["../../../../../../../../src/theme/functions/fns/theme-color/theme-color.ts"],"names":[],"mappings":"AACA,wBAAgB,UAAU,CAAC,MAAM,EAAE,GAAG,YACpB,GAAG,QAGpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../../../../src/theme/functions/fns/variant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAY,GAAG,gBAAgB,MAAM,OAExD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-theme.d.ts","sourceRoot":"","sources":["../../../../../src/theme/generate-theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,eAAO,MAAM,aAAa,WAAY,OAAO,CAAC,MAAM,CAAC,KAAG,MAiBvD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MantineNumberSize } from 'react-native-mantine';
|
|
2
|
+
export declare function getSize<Sizes extends Record<any, any>, Key extends keyof Sizes, Size extends MantineNumberSize>({ size, sizes, }: {
|
|
3
|
+
size: Size;
|
|
4
|
+
sizes: Sizes;
|
|
5
|
+
}): Size extends Key ? Sizes[Size] : Size extends number ? number : Size;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/get-size/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,wBAAgB,OAAO,CACrB,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAC9B,GAAG,SAAS,MAAM,KAAK,EACvB,IAAI,SAAS,iBAAiB,EAC9B,EACA,IAAI,EACJ,KAAK,GACN,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;CACd,GAAG,IAAI,SAAS,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,SAAS,MAAM,GAAG,MAAM,GAAG,IAAI,CAKvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/theme/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { TTheme } from './default-theme';
|
|
4
|
+
type ThemeProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
theme?: Partial<TTheme>;
|
|
7
|
+
forceMode?: 'light' | 'dark';
|
|
8
|
+
};
|
|
9
|
+
export declare const ThemeContext: React.Context<any>;
|
|
10
|
+
export declare const ThemeProvider: ({ children, theme, forceMode, }: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
theme: TTheme;
|
|
13
|
+
forceMode?: "light" | "dark";
|
|
14
|
+
}) => React.ReactElement;
|
|
15
|
+
export declare const useTheme: () => TTheme;
|
|
16
|
+
export declare const Theme: ({ children, theme: themeOverwrite, forceMode, }: ThemeProps) => React.ReactElement;
|
|
17
|
+
export declare function useComponentDefaultProps<T extends Record<string, any>, U extends Partial<T> = {}>(component: string, defaultProps: U, props: T): T & {
|
|
18
|
+
[Key in Extract<keyof T, keyof U>]-?: U[Key] | NonNullable<T[Key]>;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=theme-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../../../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAM9C,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,YAAY,oBAA2B,CAAC;AAErD,eAAO,MAAM,aAAa,oCAIvB;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,YAkDT,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,MAAkC,CAAC;AAE/D,eAAO,MAAM,KAAK,oDAIf,UAAU,KAAG,KAAK,CAAC,YAerB,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,EAEzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,CAAC,GACP,CAAC,GAAG;KACJ,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CACnE,CASA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorScheme.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/ColorScheme.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type CSSObject = any;
|
|
2
|
+
export type ClassNames<StylesNames extends string> = Partial<Record<StylesNames, string>>;
|
|
3
|
+
export type Styles<StylesNames extends string, StylesParams extends Record<string, any> = never> = Partial<Record<StylesNames, CSSObject>> | ((theme: any, params: StylesParams, context: any) => Partial<Record<StylesNames, CSSObject>>);
|
|
4
|
+
export interface DefaultProps {
|
|
5
|
+
style?: any;
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=DefaultProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultProps.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/DefaultProps.ts"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG,GAAG,CAAA;AACpB,MAAM,MAAM,UAAU,CAAC,WAAW,SAAS,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1F,MAAM,MAAM,MAAM,CAAC,WAAW,SAAS,MAAM,EAAE,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,IAC3F,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,GACvC,CAAC,CACC,KAAK,EAAE,GAAG,EACV,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,GAAG,KACT,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,GAAG,CAAC;CACb"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Tuple } from './Tuple';
|
|
2
|
+
export type DefaultMantineColor = 'dark' | 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal' | (string & {});
|
|
3
|
+
export type MantineThemeColorsOverride = {};
|
|
4
|
+
export type MantineThemeColors = MantineThemeColorsOverride extends {
|
|
5
|
+
colors: Record<infer CustomColors, Tuple<string, 10>>;
|
|
6
|
+
} ? Record<CustomColors, Tuple<string, 10>> : Record<DefaultMantineColor, Tuple<string, 10>>;
|
|
7
|
+
export type MantineColor = keyof MantineThemeColors;
|
|
8
|
+
//# sourceMappingURL=MantineColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MantineColor.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineColor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,MAAM,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE5C,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,SAAS;IAClE,MAAM,EAAE,MAAM,CAAC,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;CACvD,GACG,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GACvC,MAAM,CAAC,mBAAmB,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MantineSize.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineSize.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAC3E,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MantineNumberSize, MantineSize } from './MantineSize';
|
|
2
|
+
export type SystemProp<Value> = Value | Partial<Record<MantineSize | (string & {}), Value>>;
|
|
3
|
+
export type SpacingValue = MantineNumberSize | (string & {});
|
|
4
|
+
export type MantineStyleSystemProps = any;
|
|
5
|
+
//# sourceMappingURL=MantineStyleSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MantineStyleSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/MantineStyleSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,MAAM,UAAU,CAAC,KAAK,IACxB,KAAK,GACL,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAExD,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE7D,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tuple.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/Tuple.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAC3E,CAAC,GACD,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAE9B,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,GAChD,MAAM,SAAS,CAAC,GACd,CAAC,EAAE,GACH,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GACpB,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Variants.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/Variants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { ColorScheme } from './ColorScheme';
|
|
2
|
+
export type { DefaultProps, ClassNames, Styles } from './DefaultProps';
|
|
3
|
+
export type { MantineColor, MantineThemeColors, DefaultMantineColor, MantineThemeColorsOverride, } from './MantineColor';
|
|
4
|
+
export type { MantineStyleSystemProps, SystemProp, SpacingValue } from './MantineStyleSystem';
|
|
5
|
+
export type { MantineNumberSize, MantineSize, MantineSizes } from './MantineSize';
|
|
6
|
+
export type { Tuple } from './Tuple';
|
|
7
|
+
export type { Variants } from './Variants';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,uBAAuB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClF,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-mantine",
|
|
3
|
+
"version": "0.1.11",
|
|
4
|
+
"description": "Make Mantine Accessable on React Native",
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "./lib/commonjs/index.js",
|
|
7
|
+
"module": "./lib/module/index.js",
|
|
8
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
13
|
+
"default": "./lib/module/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
17
|
+
"default": "./lib/commonjs/index.js"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"src",
|
|
23
|
+
"lib",
|
|
24
|
+
"android",
|
|
25
|
+
"ios",
|
|
26
|
+
"cpp",
|
|
27
|
+
"*.podspec",
|
|
28
|
+
"!ios/build",
|
|
29
|
+
"!android/build",
|
|
30
|
+
"!android/gradle",
|
|
31
|
+
"!android/gradlew",
|
|
32
|
+
"!android/gradlew.bat",
|
|
33
|
+
"!android/local.properties",
|
|
34
|
+
"!**/__tests__",
|
|
35
|
+
"!**/__fixtures__",
|
|
36
|
+
"!**/__mocks__",
|
|
37
|
+
"!**/.*"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"example": "yarn workspace react-native-mantine-example",
|
|
41
|
+
"test": "jest",
|
|
42
|
+
"typecheck": "tsc",
|
|
43
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\" --config ./.eslintrc.json",
|
|
44
|
+
"clean": "del-cli lib",
|
|
45
|
+
"prepare": "bob build",
|
|
46
|
+
"release": "release-it",
|
|
47
|
+
"typescript": "tsc --noEmit"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"react-native",
|
|
51
|
+
"ios",
|
|
52
|
+
"android"
|
|
53
|
+
],
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/auronsan/react-native-mantine.git"
|
|
57
|
+
},
|
|
58
|
+
"author": "Auronsan <auronsanjr@gmail.com> (https://github.com/auronsan)",
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"bugs": {
|
|
61
|
+
"url": "https://github.com/auronsan/react-native-mantine/issues"
|
|
62
|
+
},
|
|
63
|
+
"homepage": "https://github.com/auronsan/react-native-mantine#readme",
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"registry": "https://registry.npmjs.org/"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@babel/eslint-parser": "^7.25.1",
|
|
69
|
+
"@commitlint/config-conventional": "^17.0.2",
|
|
70
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
71
|
+
"@react-native/eslint-config": "^0.73.1",
|
|
72
|
+
"@release-it/conventional-changelog": "^5.0.0",
|
|
73
|
+
"@types/jest": "^29.5.5",
|
|
74
|
+
"@types/lodash-es": "^4.17.12",
|
|
75
|
+
"@types/react": "^18.2.44",
|
|
76
|
+
"commitlint": "^17.0.2",
|
|
77
|
+
"del-cli": "^5.1.0",
|
|
78
|
+
"eslint": "^8.51.0",
|
|
79
|
+
"eslint-config-prettier": "^9.0.0",
|
|
80
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
81
|
+
"jest": "^29.7.0",
|
|
82
|
+
"prettier": "^3.0.3",
|
|
83
|
+
"prettier-eslint": "^16.3.0",
|
|
84
|
+
"react": "18.2.0",
|
|
85
|
+
"react-native": "0.74.5",
|
|
86
|
+
"react-native-builder-bob": "^0.30.2",
|
|
87
|
+
"release-it": "^15.0.0",
|
|
88
|
+
"typescript": "^5.2.2"
|
|
89
|
+
},
|
|
90
|
+
"resolutions": {
|
|
91
|
+
"@types/react": "^18.2.44"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"react": "*",
|
|
95
|
+
"react-native": "*"
|
|
96
|
+
},
|
|
97
|
+
"workspaces": [
|
|
98
|
+
"example"
|
|
99
|
+
],
|
|
100
|
+
"packageManager": "yarn@3.6.1",
|
|
101
|
+
"jest": {
|
|
102
|
+
"preset": "react-native",
|
|
103
|
+
"modulePathIgnorePatterns": [
|
|
104
|
+
"<rootDir>/example/node_modules",
|
|
105
|
+
"<rootDir>/lib/"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"commitlint": {
|
|
109
|
+
"extends": [
|
|
110
|
+
"@commitlint/config-conventional"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"release-it": {
|
|
114
|
+
"git": {
|
|
115
|
+
"commitMessage": "chore: release ${version}",
|
|
116
|
+
"tagName": "v${version}"
|
|
117
|
+
},
|
|
118
|
+
"npm": {
|
|
119
|
+
"publish": true
|
|
120
|
+
},
|
|
121
|
+
"github": {
|
|
122
|
+
"release": true
|
|
123
|
+
},
|
|
124
|
+
"plugins": {
|
|
125
|
+
"@release-it/conventional-changelog": {
|
|
126
|
+
"preset": "angular"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"eslintConfig": {
|
|
131
|
+
"root": true,
|
|
132
|
+
"extends": [
|
|
133
|
+
"@react-native",
|
|
134
|
+
"prettier"
|
|
135
|
+
],
|
|
136
|
+
"rules": {
|
|
137
|
+
"react/react-in-jsx-scope": "off",
|
|
138
|
+
"prettier/prettier": [
|
|
139
|
+
"error",
|
|
140
|
+
{
|
|
141
|
+
"quoteProps": "consistent",
|
|
142
|
+
"singleQuote": true,
|
|
143
|
+
"tabWidth": 2,
|
|
144
|
+
"trailingComma": "es5",
|
|
145
|
+
"useTabs": false
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"eslintIgnore": [
|
|
151
|
+
"node_modules/",
|
|
152
|
+
"lib/"
|
|
153
|
+
],
|
|
154
|
+
"prettier": {
|
|
155
|
+
"quoteProps": "consistent",
|
|
156
|
+
"singleQuote": true,
|
|
157
|
+
"tabWidth": 2,
|
|
158
|
+
"trailingComma": "es5",
|
|
159
|
+
"useTabs": false
|
|
160
|
+
},
|
|
161
|
+
"react-native-builder-bob": {
|
|
162
|
+
"source": "src",
|
|
163
|
+
"output": "lib",
|
|
164
|
+
"targets": [
|
|
165
|
+
[
|
|
166
|
+
"commonjs",
|
|
167
|
+
{
|
|
168
|
+
"esm": true
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
"module",
|
|
173
|
+
{
|
|
174
|
+
"esm": true
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
"typescript",
|
|
179
|
+
{
|
|
180
|
+
"project": "tsconfig.build.json",
|
|
181
|
+
"esm": true
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"create-react-native-library": {
|
|
187
|
+
"type": "library",
|
|
188
|
+
"version": "0.41.2"
|
|
189
|
+
},
|
|
190
|
+
"dependencies": {
|
|
191
|
+
"expo-font": "^12.0.10",
|
|
192
|
+
"lodash-es": "^4.17.21"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { isValidElement } from 'react';
|
|
2
|
+
import { TouchableOpacity } from 'react-native';
|
|
3
|
+
import { createStyles } from '../../theme/create-styles';
|
|
4
|
+
import { BoxView } from '../BoxView';
|
|
5
|
+
import { getSize } from '../../theme';
|
|
6
|
+
|
|
7
|
+
export type ActionIconProps = {
|
|
8
|
+
onPress?: (payload: any) => void;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
icon: React.ReactNode;
|
|
11
|
+
minWidth?: number;
|
|
12
|
+
style?: any;
|
|
13
|
+
size: any;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const ActionIcon = ({
|
|
17
|
+
onPress = () => {},
|
|
18
|
+
children,
|
|
19
|
+
icon,
|
|
20
|
+
minWidth = 100,
|
|
21
|
+
style,
|
|
22
|
+
size = 'md',
|
|
23
|
+
}: ActionIconProps): React.ReactElement => {
|
|
24
|
+
const { styles } = useStyles({ minWidth, size });
|
|
25
|
+
return (
|
|
26
|
+
<TouchableOpacity
|
|
27
|
+
onPress={typeof onPress === 'function' ? onPress : () => {}}
|
|
28
|
+
style={[style, styles.container]}
|
|
29
|
+
>
|
|
30
|
+
<>
|
|
31
|
+
<BoxView style={styles.containerButton}>{icon}</BoxView>
|
|
32
|
+
{isValidElement(children) ? children : <></>}
|
|
33
|
+
</>
|
|
34
|
+
</TouchableOpacity>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const sizes = {
|
|
39
|
+
xs: 18,
|
|
40
|
+
sm: 22,
|
|
41
|
+
md: 28,
|
|
42
|
+
lg: 34,
|
|
43
|
+
xl: 44,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const useStyles = createStyles((theme, { minWidth = 100, size = 40 }) => {
|
|
47
|
+
return {
|
|
48
|
+
container: {
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
minWidth: minWidth,
|
|
51
|
+
},
|
|
52
|
+
containerButton: {
|
|
53
|
+
backgroundColor:
|
|
54
|
+
theme.currentMode === 'dark'
|
|
55
|
+
? theme.primaryBgColor
|
|
56
|
+
: theme.secondaryBgColor,
|
|
57
|
+
borderRadius: 50,
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
height: getSize({ size: size, sizes }),
|
|
61
|
+
width: getSize({ size: size, sizes }),
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import { View as DefaultView } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type CustomViewStyle = {
|
|
5
|
+
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type ViewProps = DefaultView['props'] & {
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
fullHeight?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
style?: CustomViewStyle;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const BoxView = forwardRef((props: ViewProps, ref: any) => {
|
|
16
|
+
const { style, fullWidth, fullHeight, ...otherProps } = props;
|
|
17
|
+
return (
|
|
18
|
+
<DefaultView
|
|
19
|
+
style={[
|
|
20
|
+
style,
|
|
21
|
+
{
|
|
22
|
+
...(fullWidth ? { width: '100%' } : {}),
|
|
23
|
+
...(fullHeight ? { height: '100%' } : {}),
|
|
24
|
+
},
|
|
25
|
+
]}
|
|
26
|
+
ref={ref}
|
|
27
|
+
{...otherProps}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { BoxView } from '../BoxView';
|
|
4
|
+
import type { ViewProps } from '../BoxView';
|
|
5
|
+
|
|
6
|
+
export const Group = ({
|
|
7
|
+
children,
|
|
8
|
+
position,
|
|
9
|
+
style,
|
|
10
|
+
alignCenter = true,
|
|
11
|
+
alignBottom = false,
|
|
12
|
+
noWrap = false,
|
|
13
|
+
spacing = 5,
|
|
14
|
+
...rest
|
|
15
|
+
}: ViewProps & {
|
|
16
|
+
position?: string;
|
|
17
|
+
alignCenter?: boolean;
|
|
18
|
+
alignBottom?: boolean;
|
|
19
|
+
noWrap?: boolean;
|
|
20
|
+
spacing?: number;
|
|
21
|
+
}): React.ReactElement => {
|
|
22
|
+
return (
|
|
23
|
+
<BoxView
|
|
24
|
+
style={{
|
|
25
|
+
gap: spacing,
|
|
26
|
+
flexDirection: 'row',
|
|
27
|
+
justifyContent:
|
|
28
|
+
position === 'apart'
|
|
29
|
+
? 'space-between'
|
|
30
|
+
: position === 'center'
|
|
31
|
+
? 'center'
|
|
32
|
+
: position === 'right'
|
|
33
|
+
? 'flex-end'
|
|
34
|
+
: 'flex-start',
|
|
35
|
+
flexWrap: noWrap ? 'nowrap' : 'wrap',
|
|
36
|
+
alignItems: alignCenter
|
|
37
|
+
? 'center'
|
|
38
|
+
: alignBottom
|
|
39
|
+
? 'flex-end'
|
|
40
|
+
: 'flex-start',
|
|
41
|
+
...(style as ViewStyle),
|
|
42
|
+
}}
|
|
43
|
+
{...rest}
|
|
44
|
+
>
|
|
45
|
+
{children}
|
|
46
|
+
</BoxView>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ActivityIndicator } from 'react-native';
|
|
2
|
+
import type { MantineNumberSize, MantineColor } from '../../theme/types';
|
|
3
|
+
|
|
4
|
+
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
5
|
+
|
|
6
|
+
// const sizes = {
|
|
7
|
+
// xs: 18,
|
|
8
|
+
// sm: 22,
|
|
9
|
+
// md: 36,
|
|
10
|
+
// lg: 44,
|
|
11
|
+
// xl: 58,
|
|
12
|
+
// };
|
|
13
|
+
|
|
14
|
+
export interface LoaderProps {
|
|
15
|
+
/** Defines width of loader */
|
|
16
|
+
size?: MantineNumberSize;
|
|
17
|
+
|
|
18
|
+
/** Loader color from theme */
|
|
19
|
+
color?: MantineColor;
|
|
20
|
+
|
|
21
|
+
/** Loader appearance */
|
|
22
|
+
variant?: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const defaultProps: Partial<LoaderProps> = {
|
|
26
|
+
size: 'md',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export function Loader(props: LoaderProps) {
|
|
30
|
+
const { size, color, variant, ...others } = useComponentDefaultProps(
|
|
31
|
+
'Loader',
|
|
32
|
+
defaultProps,
|
|
33
|
+
props
|
|
34
|
+
);
|
|
35
|
+
return (
|
|
36
|
+
<ActivityIndicator
|
|
37
|
+
// size={getSize({ size, sizes })}
|
|
38
|
+
// color={
|
|
39
|
+
// theme.fn.variant({
|
|
40
|
+
// variant: 'filled',
|
|
41
|
+
// primaryFallback: false,
|
|
42
|
+
// color: color || theme.primaryColor,
|
|
43
|
+
// }).background
|
|
44
|
+
// }
|
|
45
|
+
{...others}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Loader.displayName = '@mantine/core/Loader';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import { BoxView } from '../BoxView';
|
|
4
|
+
import type { ViewProps } from '../BoxView';
|
|
5
|
+
|
|
6
|
+
export const Stack = ({
|
|
7
|
+
children,
|
|
8
|
+
position,
|
|
9
|
+
style,
|
|
10
|
+
spacing = 15,
|
|
11
|
+
...rest
|
|
12
|
+
}: ViewProps & {
|
|
13
|
+
position?: string;
|
|
14
|
+
spacing?: number;
|
|
15
|
+
}): React.ReactElement => {
|
|
16
|
+
return (
|
|
17
|
+
<BoxView
|
|
18
|
+
style={{
|
|
19
|
+
gap: spacing,
|
|
20
|
+
flexDirection: 'column',
|
|
21
|
+
...(position === 'center' ? { alignItems: 'center' } : {}),
|
|
22
|
+
...(style as ViewStyle),
|
|
23
|
+
}}
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</BoxView>
|
|
28
|
+
);
|
|
29
|
+
};
|