react-native-mantine 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -0
- package/lib/commonjs/components/ActionIcon/ActionIcon.js +1 -1
- package/lib/commonjs/components/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/commonjs/components/Anchor/index.js +3 -4
- package/lib/commonjs/components/Anchor/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +1 -2
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Badge/index.js +54 -24
- package/lib/commonjs/components/Badge/index.js.map +1 -1
- package/lib/commonjs/components/Blockquote/index.js +4 -5
- package/lib/commonjs/components/Blockquote/index.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +7 -1
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Center/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js +4 -5
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +40 -21
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Code/index.js +6 -4
- package/lib/commonjs/components/Code/index.js.map +1 -1
- package/lib/commonjs/components/Grid/index.js +18 -13
- package/lib/commonjs/components/Grid/index.js.map +1 -1
- package/lib/commonjs/components/Highlight/index.js +1 -1
- package/lib/commonjs/components/Highlight/index.js.map +1 -1
- package/lib/commonjs/components/Indicator/index.js +2 -3
- package/lib/commonjs/components/Indicator/index.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +4 -5
- package/lib/commonjs/components/Menu/index.js.map +1 -1
- package/lib/commonjs/components/MultiSelect/index.js +8 -9
- package/lib/commonjs/components/MultiSelect/index.js.map +1 -1
- package/lib/commonjs/components/NativeSelect/index.js +14 -14
- package/lib/commonjs/components/NativeSelect/index.js.map +1 -1
- package/lib/commonjs/components/NavLink/index.js +43 -20
- package/lib/commonjs/components/NavLink/index.js.map +1 -1
- package/lib/commonjs/components/Notification/index.js +5 -6
- package/lib/commonjs/components/Notification/index.js.map +1 -1
- package/lib/commonjs/components/Pagination/index.js +5 -6
- package/lib/commonjs/components/Pagination/index.js.map +1 -1
- package/lib/commonjs/components/PinInput/index.js +3 -3
- package/lib/commonjs/components/PinInput/index.js.map +1 -1
- package/lib/commonjs/components/Progress/index.js +3 -5
- package/lib/commonjs/components/Progress/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +4 -5
- package/lib/commonjs/components/Radio/index.js.map +1 -1
- package/lib/commonjs/components/Rating/index.js +2 -4
- package/lib/commonjs/components/Rating/index.js.map +1 -1
- package/lib/commonjs/components/RingProgress/index.js +3 -4
- package/lib/commonjs/components/RingProgress/index.js.map +1 -1
- package/lib/commonjs/components/Select/index.js +7 -8
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/SimpleGrid/index.js +4 -2
- package/lib/commonjs/components/SimpleGrid/index.js.map +1 -1
- package/lib/commonjs/components/Spoiler/index.js +1 -1
- package/lib/commonjs/components/Spoiler/index.js.map +1 -1
- package/lib/commonjs/components/Stepper/index.js +8 -6
- package/lib/commonjs/components/Stepper/index.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +4 -5
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +78 -17
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/ThemeIcon/index.js +40 -19
- package/lib/commonjs/components/ThemeIcon/index.js.map +1 -1
- package/lib/commonjs/components/Timeline/index.js +6 -5
- package/lib/commonjs/components/Timeline/index.js.map +1 -1
- package/lib/commonjs/components/Title/index.js +5 -17
- package/lib/commonjs/components/Title/index.js.map +1 -1
- package/lib/commonjs/components/Tooltip/index.js +1 -2
- package/lib/commonjs/components/Tooltip/index.js.map +1 -1
- package/lib/commonjs/components/TransferList/index.js +9 -10
- package/lib/commonjs/components/TransferList/index.js.map +1 -1
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js +2 -2
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
- package/lib/commonjs/index.js +34 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/theme/create-theme.js +114 -25
- package/lib/commonjs/theme/create-theme.js.map +1 -1
- package/lib/commonjs/theme/default-colors.js +103 -0
- package/lib/commonjs/theme/default-colors.js.map +1 -0
- package/lib/commonjs/theme/default-theme.js +144 -128
- package/lib/commonjs/theme/default-theme.js.map +1 -1
- package/lib/commonjs/theme/functions/attach-functions.js +46 -14
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/breakpoints.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/color-scheme-value.js +190 -0
- package/lib/commonjs/theme/functions/fns/color-scheme-value.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/dimmed.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/gradient/gradient.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/helpers.js +51 -3
- package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/index.js +151 -6
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/primary-shade.js +81 -2
- package/lib/commonjs/theme/functions/fns/primary-shade.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/shadow.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/size.js +2 -1
- package/lib/commonjs/theme/functions/fns/size.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js +196 -0
- package/lib/commonjs/theme/functions/fns/theme-color/color-utils.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js +92 -9
- package/lib/commonjs/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/variant.js +112 -17
- package/lib/commonjs/theme/functions/fns/variant.js.map +1 -1
- package/lib/commonjs/theme/functions/index.js +172 -0
- package/lib/commonjs/theme/functions/index.js.map +1 -0
- package/lib/commonjs/theme/index.js +116 -14
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/commonjs/theme/theme-provider.js +1 -22
- package/lib/commonjs/theme/theme-provider.js.map +1 -1
- package/lib/commonjs/theme/types.js +6 -0
- package/lib/commonjs/theme/types.js.map +1 -0
- package/lib/commonjs/theme/utils/withTextWrapper.js +1 -2
- package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -1
- package/lib/module/components/ActionIcon/ActionIcon.js +1 -1
- package/lib/module/components/ActionIcon/ActionIcon.js.map +1 -1
- package/lib/module/components/Anchor/index.js +3 -4
- package/lib/module/components/Anchor/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +1 -2
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Badge/index.js +54 -24
- package/lib/module/components/Badge/index.js.map +1 -1
- package/lib/module/components/Blockquote/index.js +4 -5
- package/lib/module/components/Blockquote/index.js.map +1 -1
- package/lib/module/components/Button/index.js +7 -1
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Center/index.js.map +1 -1
- package/lib/module/components/Checkbox/index.js +4 -5
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Chip/index.js +40 -21
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Code/index.js +6 -4
- package/lib/module/components/Code/index.js.map +1 -1
- package/lib/module/components/Grid/index.js +18 -13
- package/lib/module/components/Grid/index.js.map +1 -1
- package/lib/module/components/Highlight/index.js +1 -1
- package/lib/module/components/Highlight/index.js.map +1 -1
- package/lib/module/components/Indicator/index.js +2 -3
- package/lib/module/components/Indicator/index.js.map +1 -1
- package/lib/module/components/Menu/index.js +4 -5
- package/lib/module/components/Menu/index.js.map +1 -1
- package/lib/module/components/MultiSelect/index.js +8 -9
- package/lib/module/components/MultiSelect/index.js.map +1 -1
- package/lib/module/components/NativeSelect/index.js +14 -14
- package/lib/module/components/NativeSelect/index.js.map +1 -1
- package/lib/module/components/NavLink/index.js +43 -20
- package/lib/module/components/NavLink/index.js.map +1 -1
- package/lib/module/components/Notification/index.js +5 -6
- package/lib/module/components/Notification/index.js.map +1 -1
- package/lib/module/components/Pagination/index.js +5 -6
- package/lib/module/components/Pagination/index.js.map +1 -1
- package/lib/module/components/PinInput/index.js +3 -3
- package/lib/module/components/PinInput/index.js.map +1 -1
- package/lib/module/components/Progress/index.js +3 -5
- package/lib/module/components/Progress/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +4 -5
- package/lib/module/components/Radio/index.js.map +1 -1
- package/lib/module/components/Rating/index.js +2 -4
- package/lib/module/components/Rating/index.js.map +1 -1
- package/lib/module/components/RingProgress/index.js +3 -4
- package/lib/module/components/RingProgress/index.js.map +1 -1
- package/lib/module/components/Select/index.js +7 -8
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/SimpleGrid/index.js +4 -2
- package/lib/module/components/SimpleGrid/index.js.map +1 -1
- package/lib/module/components/Spoiler/index.js +1 -1
- package/lib/module/components/Spoiler/index.js.map +1 -1
- package/lib/module/components/Stepper/index.js +8 -6
- package/lib/module/components/Stepper/index.js.map +1 -1
- package/lib/module/components/Switch/index.js +4 -5
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/index.js +78 -17
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/ThemeIcon/index.js +40 -19
- package/lib/module/components/ThemeIcon/index.js.map +1 -1
- package/lib/module/components/Timeline/index.js +6 -5
- package/lib/module/components/Timeline/index.js.map +1 -1
- package/lib/module/components/Title/index.js +5 -17
- package/lib/module/components/Title/index.js.map +1 -1
- package/lib/module/components/Tooltip/index.js +1 -2
- package/lib/module/components/Tooltip/index.js.map +1 -1
- package/lib/module/components/TransferList/index.js +9 -10
- package/lib/module/components/TransferList/index.js.map +1 -1
- package/lib/module/components/UnstyledButton/UnstyledButton.styles.js +2 -2
- package/lib/module/components/UnstyledButton/UnstyledButton.styles.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/theme/create-theme.js +114 -24
- package/lib/module/theme/create-theme.js.map +1 -1
- package/lib/module/theme/default-colors.js +99 -0
- package/lib/module/theme/default-colors.js.map +1 -0
- package/lib/module/theme/default-theme.js +143 -127
- package/lib/module/theme/default-theme.js.map +1 -1
- package/lib/module/theme/functions/attach-functions.js +47 -14
- package/lib/module/theme/functions/attach-functions.js.map +1 -1
- package/lib/module/theme/functions/fns/breakpoints.js.map +1 -1
- package/lib/module/theme/functions/fns/color-scheme-value.js +180 -0
- package/lib/module/theme/functions/fns/color-scheme-value.js.map +1 -0
- package/lib/module/theme/functions/fns/dimmed.js.map +1 -1
- package/lib/module/theme/functions/fns/gradient/gradient.js.map +1 -1
- package/lib/module/theme/functions/fns/helpers.js +48 -2
- package/lib/module/theme/functions/fns/helpers.js.map +1 -1
- package/lib/module/theme/functions/fns/index.js +35 -7
- package/lib/module/theme/functions/fns/index.js.map +1 -1
- package/lib/module/theme/functions/fns/primary-shade.js +78 -2
- package/lib/module/theme/functions/fns/primary-shade.js.map +1 -1
- package/lib/module/theme/functions/fns/shadow.js.map +1 -1
- package/lib/module/theme/functions/fns/size.js +2 -1
- package/lib/module/theme/functions/fns/size.js.map +1 -1
- package/lib/module/theme/functions/fns/theme-color/color-utils.js +189 -0
- package/lib/module/theme/functions/fns/theme-color/color-utils.js.map +1 -0
- package/lib/module/theme/functions/fns/theme-color/theme-color.js +91 -9
- package/lib/module/theme/functions/fns/theme-color/theme-color.js.map +1 -1
- package/lib/module/theme/functions/fns/variant.js +112 -17
- package/lib/module/theme/functions/fns/variant.js.map +1 -1
- package/lib/module/theme/functions/index.js +22 -0
- package/lib/module/theme/functions/index.js.map +1 -0
- package/lib/module/theme/index.js +16 -4
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/theme-provider.js +1 -22
- package/lib/module/theme/theme-provider.js.map +1 -1
- package/lib/module/theme/types.js +4 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/theme/utils/withTextWrapper.js +1 -2
- package/lib/module/theme/utils/withTextWrapper.js.map +1 -1
- package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/Button.styles.d.ts +8 -8
- package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Center/index.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/Center/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Container/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Container/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Flex/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Flex/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Grid/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Highlight/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/MultiSelect/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NativeSelect/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Pagination/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/PinInput/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Progress/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Rating/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/RingProgress/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/SimpleGrid/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Text/index.d.ts +54 -7
- package/lib/typescript/commonjs/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ThemeIcon/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Timeline/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Title/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/Title/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Tooltip/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TransferList/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/create-styles.d.ts +1 -1
- package/lib/typescript/commonjs/src/theme/create-styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/create-theme.d.ts +68 -2
- package/lib/typescript/commonjs/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/default-colors.d.ts +12 -0
- package/lib/typescript/commonjs/src/theme/default-colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts +15 -108
- package/lib/typescript/commonjs/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts +20 -1
- package/lib/typescript/commonjs/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts +3 -3
- package/lib/typescript/commonjs/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts +2 -2
- package/lib/typescript/commonjs/src/theme/functions/fns/dimmed.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
- package/lib/typescript/commonjs/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +36 -8
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts +40 -14
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts +53 -3
- package/lib/typescript/commonjs/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/shadow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +2 -2
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
- 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 +52 -19
- package/lib/typescript/commonjs/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/index.d.ts +19 -0
- package/lib/typescript/commonjs/src/theme/functions/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/index.d.ts +9 -6
- package/lib/typescript/commonjs/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/types.d.ts +494 -0
- package/lib/typescript/commonjs/src/theme/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +1 -1
- package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/Button.styles.d.ts +8 -8
- package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Center/index.d.ts +1 -2
- package/lib/typescript/module/src/components/Center/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Container/index.d.ts +2 -2
- package/lib/typescript/module/src/components/Container/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Flex/index.d.ts +2 -2
- package/lib/typescript/module/src/components/Flex/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Grid/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Highlight/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/MultiSelect/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NativeSelect/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Pagination/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/PinInput/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Progress/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Rating/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/RingProgress/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/SimpleGrid/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Text/index.d.ts +54 -7
- package/lib/typescript/module/src/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/ThemeIcon/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Timeline/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Title/index.d.ts +1 -0
- package/lib/typescript/module/src/components/Title/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Tooltip/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TransferList/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts +2 -2
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.styles.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/create-styles.d.ts +1 -1
- package/lib/typescript/module/src/theme/create-styles.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/create-theme.d.ts +68 -2
- package/lib/typescript/module/src/theme/create-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/default-colors.d.ts +12 -0
- package/lib/typescript/module/src/theme/default-colors.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/default-theme.d.ts +15 -108
- package/lib/typescript/module/src/theme/default-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts +20 -1
- package/lib/typescript/module/src/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts +3 -3
- package/lib/typescript/module/src/theme/functions/fns/breakpoints.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts +100 -0
- package/lib/typescript/module/src/theme/functions/fns/color-scheme-value.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts +2 -2
- package/lib/typescript/module/src/theme/functions/fns/dimmed.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts +2 -3
- package/lib/typescript/module/src/theme/functions/fns/gradient/gradient.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +36 -8
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts +40 -14
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts +53 -3
- package/lib/typescript/module/src/theme/functions/fns/primary-shade.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts +1 -1
- package/lib/typescript/module/src/theme/functions/fns/shadow.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts +2 -2
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts +50 -0
- package/lib/typescript/module/src/theme/functions/fns/theme-color/color-utils.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/theme-color/theme-color.d.ts +51 -5
- 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 +52 -19
- package/lib/typescript/module/src/theme/functions/fns/variant.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/index.d.ts +19 -0
- package/lib/typescript/module/src/theme/functions/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/index.d.ts +9 -6
- package/lib/typescript/module/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/theme-provider.d.ts +1 -1
- package/lib/typescript/module/src/theme/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/types.d.ts +494 -0
- package/lib/typescript/module/src/theme/types.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +1 -1
- package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionIcon/ActionIcon.tsx +3 -3
- package/src/components/Anchor/index.tsx +3 -4
- package/src/components/Avatar/index.tsx +1 -2
- package/src/components/Badge/index.tsx +36 -19
- package/src/components/Blockquote/index.tsx +4 -6
- package/src/components/Button/index.tsx +5 -1
- package/src/components/Center/index.tsx +1 -2
- package/src/components/Checkbox/index.tsx +4 -5
- package/src/components/Chip/index.tsx +25 -18
- package/src/components/Code/index.tsx +7 -5
- package/src/components/Container/index.tsx +2 -2
- package/src/components/Flex/index.tsx +2 -2
- package/src/components/Grid/index.tsx +16 -10
- package/src/components/Highlight/index.tsx +1 -2
- package/src/components/Indicator/index.tsx +3 -4
- package/src/components/Menu/index.tsx +8 -10
- package/src/components/MultiSelect/index.tsx +13 -15
- package/src/components/NativeSelect/index.tsx +34 -21
- package/src/components/NavLink/index.tsx +27 -23
- package/src/components/Notification/index.tsx +5 -6
- package/src/components/Pagination/index.tsx +5 -6
- package/src/components/PinInput/index.tsx +5 -6
- package/src/components/Progress/index.tsx +5 -6
- package/src/components/Radio/index.tsx +4 -5
- package/src/components/Rating/index.tsx +2 -4
- package/src/components/RingProgress/index.tsx +3 -5
- package/src/components/Select/index.tsx +11 -13
- package/src/components/SimpleGrid/index.tsx +5 -2
- package/src/components/Spoiler/index.tsx +1 -1
- package/src/components/Stepper/index.tsx +17 -17
- package/src/components/Switch/index.tsx +5 -6
- package/src/components/Text/index.tsx +125 -28
- package/src/components/ThemeIcon/index.tsx +23 -23
- package/src/components/Timeline/index.tsx +12 -15
- package/src/components/Title/index.tsx +5 -22
- package/src/components/Tooltip/index.tsx +1 -3
- package/src/components/TransferList/index.tsx +16 -18
- package/src/components/UnstyledButton/UnstyledButton.styles.ts +4 -2
- package/src/index.tsx +1 -1
- package/src/theme/create-styles.ts +1 -1
- package/src/theme/create-theme.ts +134 -23
- package/src/theme/default-colors.ts +252 -0
- package/src/theme/default-theme.ts +178 -392
- package/src/theme/functions/attach-functions.ts +57 -10
- package/src/theme/functions/fns/breakpoints.ts +4 -4
- package/src/theme/functions/fns/color-scheme-value.ts +200 -0
- package/src/theme/functions/fns/dimmed.ts +2 -2
- package/src/theme/functions/fns/gradient/gradient.ts +2 -3
- package/src/theme/functions/fns/helpers.ts +50 -9
- package/src/theme/functions/fns/index.ts +63 -3
- package/src/theme/functions/fns/primary-shade.ts +84 -8
- package/src/theme/functions/fns/shadow.ts +1 -1
- package/src/theme/functions/fns/size.ts +4 -3
- package/src/theme/functions/fns/theme-color/color-utils.ts +193 -0
- package/src/theme/functions/fns/theme-color/theme-color.ts +85 -17
- package/src/theme/functions/fns/variant.ts +106 -44
- package/src/theme/functions/index.ts +19 -0
- package/src/theme/index.ts +91 -0
- package/src/theme/theme-provider.tsx +2 -17
- package/src/theme/types.ts +625 -0
- package/src/theme/utils/withTextWrapper.tsx +2 -3
- package/src/theme/index.tsx +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTextWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/utils/withTextWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,EACnB,UAAU,GAAE,OAAc,EAC1B,SAAS,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"withTextWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/theme/utils/withTextWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,SAAS,EACnB,UAAU,GAAE,OAAc,EAC1B,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GACtC,SAAS,CAUX;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
package/package.json
CHANGED
|
@@ -67,9 +67,9 @@ const useStyles = createStyles(
|
|
|
67
67
|
backgroundColor:
|
|
68
68
|
variant === 'transparent'
|
|
69
69
|
? 'transparent'
|
|
70
|
-
: theme.
|
|
71
|
-
? theme.
|
|
72
|
-
: theme.
|
|
70
|
+
: theme.colorScheme === 'dark'
|
|
71
|
+
? theme.fn.primaryColor()
|
|
72
|
+
: theme.fn.themeColor('gray', 1),
|
|
73
73
|
borderRadius: sizeValue / 2,
|
|
74
74
|
alignItems: 'center',
|
|
75
75
|
justifyContent: 'center',
|
|
@@ -65,24 +65,23 @@ const useStyles = createStyles(
|
|
|
65
65
|
},
|
|
66
66
|
{ variant }
|
|
67
67
|
) => {
|
|
68
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
69
68
|
const fontSize = sizes[size as keyof typeof sizes] || sizes.md;
|
|
70
69
|
|
|
71
70
|
const getVariantStyles = () => {
|
|
72
71
|
switch (variant) {
|
|
73
72
|
case 'link':
|
|
74
73
|
return {
|
|
75
|
-
color:
|
|
74
|
+
color: theme.fn.themeColor(color, 6),
|
|
76
75
|
textDecorationLine: underline ? 'underline' : 'none',
|
|
77
76
|
};
|
|
78
77
|
case 'text':
|
|
79
78
|
return {
|
|
80
|
-
color: theme.colorScheme === 'dark' ?
|
|
79
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
|
|
81
80
|
textDecorationLine: 'none',
|
|
82
81
|
};
|
|
83
82
|
default:
|
|
84
83
|
return {
|
|
85
|
-
color:
|
|
84
|
+
color: theme.fn.themeColor(color, 6),
|
|
86
85
|
textDecorationLine: underline ? 'underline' : 'none',
|
|
87
86
|
};
|
|
88
87
|
}
|
|
@@ -59,7 +59,6 @@ const useStyles = createStyles(
|
|
|
59
59
|
size: MantineSize | number;
|
|
60
60
|
}
|
|
61
61
|
) => {
|
|
62
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
63
62
|
const sizeValue = typeof size === 'number' ? rem(size) : sizes[size as keyof typeof sizes] || sizes.md;
|
|
64
63
|
|
|
65
64
|
return {
|
|
@@ -68,7 +67,7 @@ const useStyles = createStyles(
|
|
|
68
67
|
height: sizeValue as any,
|
|
69
68
|
borderRadius: theme.fn.radius(radius),
|
|
70
69
|
overflow: 'hidden',
|
|
71
|
-
backgroundColor:
|
|
70
|
+
backgroundColor: theme.fn.themeColor(color, 6),
|
|
72
71
|
justifyContent: 'center',
|
|
73
72
|
alignItems: 'center',
|
|
74
73
|
} as any,
|
|
@@ -71,40 +71,53 @@ const useStyles = createStyles(
|
|
|
71
71
|
},
|
|
72
72
|
{ variant, size }
|
|
73
73
|
) => {
|
|
74
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
75
74
|
const sizeStyles = sizes[size as keyof typeof sizes] || sizes.md;
|
|
76
75
|
|
|
77
76
|
const getVariantStyles = () => {
|
|
78
77
|
switch (variant) {
|
|
79
|
-
case 'filled':
|
|
78
|
+
case 'filled': {
|
|
79
|
+
const variantStyles = theme.fn.variant({ variant: 'filled', color });
|
|
80
80
|
return {
|
|
81
|
-
backgroundColor:
|
|
82
|
-
color:
|
|
81
|
+
backgroundColor: variantStyles.background,
|
|
82
|
+
color: variantStyles.color,
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
case 'light': {
|
|
86
|
+
const variantStyles = theme.fn.variant({ variant: 'light', color });
|
|
85
87
|
return {
|
|
86
|
-
backgroundColor:
|
|
87
|
-
color:
|
|
88
|
+
backgroundColor: variantStyles.background,
|
|
89
|
+
color: variantStyles.color,
|
|
88
90
|
};
|
|
89
|
-
|
|
91
|
+
}
|
|
92
|
+
case 'outline': {
|
|
93
|
+
const variantStyles = theme.fn.variant({ variant: 'outline', color });
|
|
90
94
|
return {
|
|
91
|
-
backgroundColor:
|
|
92
|
-
color:
|
|
95
|
+
backgroundColor: variantStyles.background,
|
|
96
|
+
color: variantStyles.color,
|
|
93
97
|
borderWidth: 1,
|
|
94
|
-
borderColor:
|
|
98
|
+
borderColor: variantStyles.border,
|
|
95
99
|
};
|
|
100
|
+
}
|
|
96
101
|
case 'dot':
|
|
97
102
|
return {
|
|
98
|
-
backgroundColor: theme.colorScheme === 'dark'
|
|
99
|
-
|
|
103
|
+
backgroundColor: theme.colorScheme === 'dark'
|
|
104
|
+
? theme.fn.themeColor('dark', 5)
|
|
105
|
+
: theme.white,
|
|
106
|
+
color: theme.colorScheme === 'dark'
|
|
107
|
+
? theme.fn.themeColor('dark', 0)
|
|
108
|
+
: theme.black,
|
|
100
109
|
borderWidth: 1,
|
|
101
|
-
borderColor: theme.colorScheme === 'dark'
|
|
110
|
+
borderColor: theme.colorScheme === 'dark'
|
|
111
|
+
? theme.fn.themeColor('dark', 4)
|
|
112
|
+
: theme.fn.themeColor('gray', 3),
|
|
102
113
|
};
|
|
103
|
-
default:
|
|
114
|
+
default: {
|
|
115
|
+
const variantStyles = theme.fn.variant({ variant: 'filled', color });
|
|
104
116
|
return {
|
|
105
|
-
backgroundColor:
|
|
106
|
-
color:
|
|
117
|
+
backgroundColor: variantStyles.background,
|
|
118
|
+
color: variantStyles.color,
|
|
107
119
|
};
|
|
120
|
+
}
|
|
108
121
|
}
|
|
109
122
|
};
|
|
110
123
|
|
|
@@ -137,7 +150,7 @@ const useStyles = createStyles(
|
|
|
137
150
|
width: (dotSizes[size as keyof typeof dotSizes] || dotSizes.md) as any,
|
|
138
151
|
height: (dotSizes[size as keyof typeof dotSizes] || dotSizes.md) as any,
|
|
139
152
|
borderRadius: (dotSizes[size as keyof typeof dotSizes] || dotSizes.md) as any,
|
|
140
|
-
backgroundColor:
|
|
153
|
+
backgroundColor: theme.fn.themeColor(color || theme.primaryColor),
|
|
141
154
|
marginRight: theme.spacing.xs,
|
|
142
155
|
},
|
|
143
156
|
label: {
|
|
@@ -180,12 +193,16 @@ export const Badge = forwardRef<any, BadgeProps>((props, ref) => {
|
|
|
180
193
|
{ name: 'Badge', variant, size }
|
|
181
194
|
) as any;
|
|
182
195
|
|
|
196
|
+
// Get the text color from the variant styles
|
|
197
|
+
// We need to cast to access the color property since TypeScript doesn't know the exact type
|
|
198
|
+
const textColor = (styles.root as any).color as string;
|
|
199
|
+
|
|
183
200
|
return (
|
|
184
201
|
<BoxView ref={ref} style={sx(styles.root, style)} {...others}>
|
|
185
202
|
<BoxView style={styles.inner}>
|
|
186
203
|
{variant === 'dot' && <BoxView style={styles.dot} />}
|
|
187
204
|
{leftSection && <BoxView style={styles.leftSection}>{leftSection}</BoxView>}
|
|
188
|
-
{withTextWrapper(children, shouldWrapInText, styles.label)}
|
|
205
|
+
{withTextWrapper(children, shouldWrapInText, { ...styles.label, color: textColor })}
|
|
189
206
|
{rightSection && <BoxView style={styles.rightSection}>{rightSection}</BoxView>}
|
|
190
207
|
</BoxView>
|
|
191
208
|
</BoxView>
|
|
@@ -41,14 +41,12 @@ const useStyles = createStyles(
|
|
|
41
41
|
radius: MantineNumberSize;
|
|
42
42
|
}
|
|
43
43
|
) => {
|
|
44
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
45
|
-
|
|
46
44
|
return {
|
|
47
45
|
root: {
|
|
48
46
|
backgroundColor:
|
|
49
|
-
theme.colorScheme === 'dark' ? theme.
|
|
47
|
+
theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 6) : theme.fn.themeColor('gray', 0),
|
|
50
48
|
borderLeftWidth: 4,
|
|
51
|
-
borderLeftColor:
|
|
49
|
+
borderLeftColor: theme.fn.themeColor(color, 6),
|
|
52
50
|
borderRadius: theme.fn.radius(radius),
|
|
53
51
|
padding: theme.spacing.md,
|
|
54
52
|
},
|
|
@@ -65,13 +63,13 @@ const useStyles = createStyles(
|
|
|
65
63
|
content: {
|
|
66
64
|
fontSize: rem(16),
|
|
67
65
|
lineHeight: rem(24),
|
|
68
|
-
color: theme.colorScheme === 'dark' ? theme.
|
|
66
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
|
|
69
67
|
marginBottom: 0,
|
|
70
68
|
},
|
|
71
69
|
cite: {
|
|
72
70
|
fontSize: rem(14),
|
|
73
71
|
marginTop: theme.spacing.xs,
|
|
74
|
-
color: theme.colorScheme === 'dark' ? theme.
|
|
72
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 2) : theme.fn.themeColor('gray', 6),
|
|
75
73
|
},
|
|
76
74
|
};
|
|
77
75
|
}
|
|
@@ -120,6 +120,10 @@ export const _Button = forwardRef<View, ButtonProps>((props, ref) => {
|
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
|
|
123
|
+
// Get the text color from the variant styles
|
|
124
|
+
// We need to cast to access the color property since TypeScript doesn't know the exact type
|
|
125
|
+
const textColor = (styles.root as any).color as string;
|
|
126
|
+
|
|
123
127
|
const loader = <ActivityIndicator />;
|
|
124
128
|
|
|
125
129
|
const buttonContent = (
|
|
@@ -134,7 +138,7 @@ export const _Button = forwardRef<View, ButtonProps>((props, ref) => {
|
|
|
134
138
|
{loading && loaderPosition === 'center' && (
|
|
135
139
|
<BoxView style={styles.centerLoader}>{loader}</BoxView>
|
|
136
140
|
)}
|
|
137
|
-
{withTextWrapper(children, shouldWrapInText)}
|
|
141
|
+
{withTextWrapper(children, shouldWrapInText, { color: textColor })}
|
|
138
142
|
{(rightIcon || (loading && loaderPosition === 'right')) && (
|
|
139
143
|
<BoxView style={sx(styles.icon, styles.rightIcon)}>
|
|
140
144
|
{loading && loaderPosition === 'right' ? loader : rightIcon}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BoxView } from '../BoxView';
|
|
3
3
|
import type { ViewProps } from '../BoxView';
|
|
4
|
-
import type { DefaultProps } from '../../theme/types';
|
|
5
4
|
|
|
6
|
-
export interface CenterProps extends
|
|
5
|
+
export interface CenterProps extends ViewProps {
|
|
7
6
|
/** Content that should be centered */
|
|
8
7
|
children?: React.ReactNode;
|
|
9
8
|
|
|
@@ -57,7 +57,6 @@ const useStyles = createStyles(
|
|
|
57
57
|
disabled: boolean;
|
|
58
58
|
}
|
|
59
59
|
) => {
|
|
60
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
61
60
|
const checkboxSize = sizes[size as keyof typeof sizes] || sizes.md;
|
|
62
61
|
|
|
63
62
|
return {
|
|
@@ -71,14 +70,14 @@ const useStyles = createStyles(
|
|
|
71
70
|
height: checkboxSize as any,
|
|
72
71
|
borderRadius: theme.radius.sm,
|
|
73
72
|
borderWidth: 2,
|
|
74
|
-
borderColor: theme.colorScheme === 'dark' ?
|
|
73
|
+
borderColor: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 4) : theme.fn.themeColor('gray', 4),
|
|
75
74
|
backgroundColor: 'transparent',
|
|
76
75
|
justifyContent: 'center',
|
|
77
76
|
alignItems: 'center',
|
|
78
77
|
},
|
|
79
78
|
checked: {
|
|
80
|
-
borderColor:
|
|
81
|
-
backgroundColor:
|
|
79
|
+
borderColor: theme.fn.themeColor(color, 6),
|
|
80
|
+
backgroundColor: theme.fn.themeColor(color, 6),
|
|
82
81
|
},
|
|
83
82
|
checkmark: {
|
|
84
83
|
color: theme.white,
|
|
@@ -87,7 +86,7 @@ const useStyles = createStyles(
|
|
|
87
86
|
},
|
|
88
87
|
label: {
|
|
89
88
|
fontSize: theme.fontSizes.sm as number,
|
|
90
|
-
color: theme.colorScheme === 'dark' ?
|
|
89
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
|
|
91
90
|
marginLeft: theme.spacing.sm,
|
|
92
91
|
flex: 1,
|
|
93
92
|
},
|
|
@@ -84,45 +84,52 @@ const useStyles = createStyles(
|
|
|
84
84
|
disabled: boolean;
|
|
85
85
|
}
|
|
86
86
|
) => {
|
|
87
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
88
87
|
const sizeStyles = sizes[size as keyof typeof sizes] || sizes.md;
|
|
89
88
|
|
|
90
89
|
const getVariantStyles = () => {
|
|
91
90
|
if (!checked) {
|
|
92
91
|
return {
|
|
93
|
-
backgroundColor:
|
|
94
|
-
theme.
|
|
92
|
+
backgroundColor: theme.colorScheme === 'dark'
|
|
93
|
+
? theme.fn.themeColor('dark', 6)
|
|
94
|
+
: theme.fn.themeColor('gray', 1),
|
|
95
95
|
borderWidth: 1,
|
|
96
|
-
borderColor:
|
|
97
|
-
|
|
96
|
+
borderColor: theme.colorScheme === 'dark'
|
|
97
|
+
? theme.fn.themeColor('dark', 4)
|
|
98
|
+
: theme.fn.themeColor('gray', 4),
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
switch (variant) {
|
|
102
|
-
case 'filled':
|
|
103
|
+
case 'filled': {
|
|
104
|
+
const variantStyles = theme.fn.variant({ variant: 'filled', color });
|
|
103
105
|
return {
|
|
104
|
-
backgroundColor:
|
|
106
|
+
backgroundColor: variantStyles.background,
|
|
105
107
|
borderWidth: 0,
|
|
106
108
|
};
|
|
107
|
-
|
|
109
|
+
}
|
|
110
|
+
case 'outline': {
|
|
111
|
+
const variantStyles = theme.fn.variant({ variant: 'outline', color });
|
|
108
112
|
return {
|
|
109
|
-
backgroundColor:
|
|
113
|
+
backgroundColor: variantStyles.background,
|
|
110
114
|
borderWidth: 1,
|
|
111
|
-
borderColor:
|
|
115
|
+
borderColor: variantStyles.border,
|
|
112
116
|
};
|
|
113
|
-
|
|
117
|
+
}
|
|
118
|
+
case 'light': {
|
|
114
119
|
return {
|
|
115
|
-
backgroundColor:
|
|
116
|
-
theme.
|
|
117
|
-
|
|
118
|
-
: colors?.[0] || (theme.colors.gray || [])[1],
|
|
120
|
+
backgroundColor: theme.colorScheme === 'dark'
|
|
121
|
+
? theme.fn.rgba(theme.fn.themeColor(color || theme.primaryColor, 9), 0.25)
|
|
122
|
+
: theme.fn.themeColor(color || theme.primaryColor, 0),
|
|
119
123
|
borderWidth: 0,
|
|
120
124
|
};
|
|
121
|
-
|
|
125
|
+
}
|
|
126
|
+
default: {
|
|
127
|
+
const variantStyles = theme.fn.variant({ variant: 'filled', color });
|
|
122
128
|
return {
|
|
123
|
-
backgroundColor:
|
|
129
|
+
backgroundColor: variantStyles.background,
|
|
124
130
|
borderWidth: 0,
|
|
125
131
|
};
|
|
132
|
+
}
|
|
126
133
|
}
|
|
127
134
|
};
|
|
128
135
|
|
|
@@ -136,7 +143,7 @@ const useStyles = createStyles(
|
|
|
136
143
|
return theme.white;
|
|
137
144
|
case 'outline':
|
|
138
145
|
case 'light':
|
|
139
|
-
return
|
|
146
|
+
return theme.fn.themeColor(color || theme.primaryColor);
|
|
140
147
|
default:
|
|
141
148
|
return theme.white;
|
|
142
149
|
}
|
|
@@ -27,10 +27,10 @@ export const Code = forwardRef<any, CodeProps>((props, ref) => {
|
|
|
27
27
|
const primaryShade = getPrimaryShade(theme);
|
|
28
28
|
|
|
29
29
|
// Get background and text colors
|
|
30
|
-
const backgroundColor = theme.
|
|
30
|
+
const backgroundColor = theme.fn.themeColor('gray', 0);
|
|
31
31
|
const textColor = color
|
|
32
|
-
? theme.
|
|
33
|
-
: theme.
|
|
32
|
+
? theme.fn.themeColor(color, primaryShade)
|
|
33
|
+
: (theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.fn.themeColor('gray', 9));
|
|
34
34
|
|
|
35
35
|
// Monospace font - in React Native, we can use 'Courier' or 'Courier New'
|
|
36
36
|
const codeStyles = {
|
|
@@ -61,8 +61,10 @@ export const Code = forwardRef<any, CodeProps>((props, ref) => {
|
|
|
61
61
|
children,
|
|
62
62
|
shouldWrapInText,
|
|
63
63
|
{
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
style: {
|
|
65
|
+
fontFamily: 'Courier',
|
|
66
|
+
fontSize: theme.fontSizes.sm as number || 14,
|
|
67
|
+
},
|
|
66
68
|
color: textColor,
|
|
67
69
|
}
|
|
68
70
|
)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BoxView } from '../BoxView';
|
|
3
3
|
import type { ViewProps } from '../BoxView';
|
|
4
|
-
import type {
|
|
4
|
+
import type { MantineNumberSize } from '../../theme/types';
|
|
5
5
|
import { useTheme } from '../../theme/theme-provider';
|
|
6
6
|
import { Dimensions } from 'react-native';
|
|
7
7
|
|
|
8
|
-
export interface ContainerProps extends
|
|
8
|
+
export interface ContainerProps extends ViewProps {
|
|
9
9
|
/** Predefined container max-width or number for max-width in px */
|
|
10
10
|
size?: MantineNumberSize | number;
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BoxView } from '../BoxView';
|
|
3
3
|
import type { ViewProps } from '../BoxView';
|
|
4
|
-
import type {
|
|
4
|
+
import type { MantineNumberSize } from '../../theme/types';
|
|
5
5
|
import { useTheme } from '../../theme/theme-provider';
|
|
6
6
|
import type { FlexStyle } from 'react-native';
|
|
7
7
|
|
|
8
|
-
export interface FlexProps extends
|
|
8
|
+
export interface FlexProps extends ViewProps {
|
|
9
9
|
/** Set flex-direction property */
|
|
10
10
|
direction?: FlexStyle['flexDirection'];
|
|
11
11
|
|
|
@@ -56,15 +56,20 @@ const useGridStyles = createStyles(
|
|
|
56
56
|
align: 'stretch' | 'center' | 'flex-start' | 'flex-end';
|
|
57
57
|
justify: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
|
|
58
58
|
}
|
|
59
|
-
) =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
) => {
|
|
60
|
+
const gutterValue = theme.fn.size({ size: gutter, sizes: theme.spacing });
|
|
61
|
+
const gutterNumber = typeof gutterValue === 'number' ? gutterValue : parseFloat(gutterValue) || 0;
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
root: {
|
|
65
|
+
flexDirection: 'row' as const,
|
|
66
|
+
flexWrap: 'wrap' as const,
|
|
67
|
+
alignItems: align,
|
|
68
|
+
justifyContent: justify,
|
|
69
|
+
margin: -gutterNumber / 2,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
68
73
|
);
|
|
69
74
|
|
|
70
75
|
const useColStyles = createStyles(
|
|
@@ -86,7 +91,8 @@ const useColStyles = createStyles(
|
|
|
86
91
|
grow: boolean;
|
|
87
92
|
}
|
|
88
93
|
) => {
|
|
89
|
-
const
|
|
94
|
+
const gutterValue = theme.fn.size({ size: gutter, sizes: theme.spacing });
|
|
95
|
+
const gutterSize = typeof gutterValue === 'number' ? gutterValue : parseFloat(gutterValue) || 0;
|
|
90
96
|
const colSpan = span || columns;
|
|
91
97
|
const percentage = (colSpan / columns) * 100;
|
|
92
98
|
const offsetPercentage = offset ? (offset / columns) * 100 : 0;
|
|
@@ -39,8 +39,7 @@ export const Highlight = forwardRef<any, HighlightProps>((props, ref) => {
|
|
|
39
39
|
const highlights = Array.isArray(highlight) ? highlight : [highlight];
|
|
40
40
|
|
|
41
41
|
// Get default highlight background color
|
|
42
|
-
const defaultHighlightBg =
|
|
43
|
-
theme.colors[highlightColor]?.[2] || theme.colors.yellow?.[2] || '#ffec99';
|
|
42
|
+
const defaultHighlightBg = theme.fn.themeColor(highlightColor, 2);
|
|
44
43
|
|
|
45
44
|
const defaultStyles = {
|
|
46
45
|
backgroundColor: defaultHighlightBg,
|
|
@@ -92,7 +92,6 @@ const useStyles = createStyles(
|
|
|
92
92
|
inline: boolean;
|
|
93
93
|
}
|
|
94
94
|
) => {
|
|
95
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
96
95
|
const indicatorSize =
|
|
97
96
|
typeof size === 'number' ? rem(size) : sizes[size as keyof typeof sizes] || sizes.md;
|
|
98
97
|
|
|
@@ -160,11 +159,11 @@ const useStyles = createStyles(
|
|
|
160
159
|
height: indicatorSize,
|
|
161
160
|
borderRadius: theme.fn.radius(radius),
|
|
162
161
|
backgroundColor: disabled
|
|
163
|
-
? theme.
|
|
164
|
-
:
|
|
162
|
+
? theme.fn.themeColor('gray', 5)
|
|
163
|
+
: theme.fn.themeColor(color, 6),
|
|
165
164
|
...(withBorder && {
|
|
166
165
|
borderWidth: 2,
|
|
167
|
-
borderColor: theme.colorScheme === 'dark' ?
|
|
166
|
+
borderColor: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 7) : theme.white,
|
|
168
167
|
}),
|
|
169
168
|
alignItems: 'center',
|
|
170
169
|
justifyContent: 'center',
|
|
@@ -116,8 +116,6 @@ const useItemStyles = createStyles(
|
|
|
116
116
|
theme,
|
|
117
117
|
{ color, disabled }: { color: MantineColor; disabled: boolean }
|
|
118
118
|
) => {
|
|
119
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
120
|
-
|
|
121
119
|
return {
|
|
122
120
|
item: {
|
|
123
121
|
flexDirection: 'row',
|
|
@@ -129,24 +127,24 @@ const useItemStyles = createStyles(
|
|
|
129
127
|
itemHovered: {
|
|
130
128
|
backgroundColor:
|
|
131
129
|
theme.colorScheme === 'dark'
|
|
132
|
-
?
|
|
133
|
-
:
|
|
130
|
+
? theme.fn.themeColor('dark', 5)
|
|
131
|
+
: theme.fn.themeColor('gray', 0),
|
|
134
132
|
},
|
|
135
133
|
icon: {
|
|
136
134
|
marginRight: theme.spacing.sm,
|
|
137
135
|
color: color
|
|
138
|
-
?
|
|
136
|
+
? theme.fn.themeColor(color, 6)
|
|
139
137
|
: theme.colorScheme === 'dark'
|
|
140
|
-
?
|
|
141
|
-
:
|
|
138
|
+
? theme.fn.themeColor('dark', 0)
|
|
139
|
+
: theme.fn.themeColor('gray', 7),
|
|
142
140
|
},
|
|
143
141
|
label: {
|
|
144
142
|
flex: 1,
|
|
145
143
|
fontSize: 14,
|
|
146
144
|
color: color
|
|
147
|
-
?
|
|
145
|
+
? theme.fn.themeColor(color, 6)
|
|
148
146
|
: theme.colorScheme === 'dark'
|
|
149
|
-
?
|
|
147
|
+
? theme.fn.themeColor('dark', 0)
|
|
150
148
|
: theme.black,
|
|
151
149
|
},
|
|
152
150
|
rightSection: {
|
|
@@ -162,7 +160,7 @@ const useLabelStyles = createStyles((theme) => ({
|
|
|
162
160
|
paddingHorizontal: theme.spacing.md,
|
|
163
161
|
fontSize: 12,
|
|
164
162
|
fontWeight: '600',
|
|
165
|
-
color: theme.colorScheme === 'dark' ?
|
|
163
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 2) : theme.fn.themeColor('gray', 6),
|
|
166
164
|
textTransform: 'uppercase',
|
|
167
165
|
},
|
|
168
166
|
}));
|
|
@@ -94,8 +94,6 @@ const useStyles = createStyles(
|
|
|
94
94
|
theme,
|
|
95
95
|
{ color }: { color: MantineColor; size: MantineSize }
|
|
96
96
|
) => {
|
|
97
|
-
const colors = theme.colors[color] || theme.colors[theme.primaryColor];
|
|
98
|
-
|
|
99
97
|
return {
|
|
100
98
|
valuesContainer: {
|
|
101
99
|
flexDirection: 'row',
|
|
@@ -110,7 +108,7 @@ const useStyles = createStyles(
|
|
|
110
108
|
},
|
|
111
109
|
modalContent: {
|
|
112
110
|
backgroundColor:
|
|
113
|
-
theme.colorScheme === 'dark' ?
|
|
111
|
+
theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 7) : theme.white,
|
|
114
112
|
borderTopLeftRadius: theme.radius.lg,
|
|
115
113
|
borderTopRightRadius: theme.radius.lg,
|
|
116
114
|
maxHeight: '80%',
|
|
@@ -120,8 +118,8 @@ const useStyles = createStyles(
|
|
|
120
118
|
borderBottomWidth: 1,
|
|
121
119
|
borderBottomColor:
|
|
122
120
|
theme.colorScheme === 'dark'
|
|
123
|
-
?
|
|
124
|
-
:
|
|
121
|
+
? theme.fn.themeColor('dark', 4)
|
|
122
|
+
: theme.fn.themeColor('gray', 2),
|
|
125
123
|
},
|
|
126
124
|
listContainer: {
|
|
127
125
|
paddingVertical: rem(8) as any as any,
|
|
@@ -135,8 +133,8 @@ const useStyles = createStyles(
|
|
|
135
133
|
itemSelected: {
|
|
136
134
|
backgroundColor:
|
|
137
135
|
theme.colorScheme === 'dark'
|
|
138
|
-
?
|
|
139
|
-
:
|
|
136
|
+
? theme.fn.themeColor('dark', 5)
|
|
137
|
+
: theme.fn.themeColor(color, 0),
|
|
140
138
|
},
|
|
141
139
|
itemDisabled: {
|
|
142
140
|
opacity: 0.4,
|
|
@@ -145,11 +143,11 @@ const useStyles = createStyles(
|
|
|
145
143
|
flex: 1,
|
|
146
144
|
fontSize: rem(14),
|
|
147
145
|
marginLeft: theme.spacing.sm,
|
|
148
|
-
color: theme.colorScheme === 'dark' ?
|
|
146
|
+
color: theme.colorScheme === 'dark' ? theme.fn.themeColor('dark', 0) : theme.black,
|
|
149
147
|
},
|
|
150
148
|
itemTextSelected: {
|
|
151
149
|
fontWeight: '600',
|
|
152
|
-
color:
|
|
150
|
+
color: theme.fn.themeColor(color, 6),
|
|
153
151
|
},
|
|
154
152
|
groupLabel: {
|
|
155
153
|
paddingVertical: rem(8) as any,
|
|
@@ -158,8 +156,8 @@ const useStyles = createStyles(
|
|
|
158
156
|
fontWeight: '600',
|
|
159
157
|
color:
|
|
160
158
|
theme.colorScheme === 'dark'
|
|
161
|
-
?
|
|
162
|
-
:
|
|
159
|
+
? theme.fn.themeColor('dark', 2)
|
|
160
|
+
: theme.fn.themeColor('gray', 6),
|
|
163
161
|
textTransform: 'uppercase',
|
|
164
162
|
},
|
|
165
163
|
emptyState: {
|
|
@@ -169,16 +167,16 @@ const useStyles = createStyles(
|
|
|
169
167
|
emptyText: {
|
|
170
168
|
color:
|
|
171
169
|
theme.colorScheme === 'dark'
|
|
172
|
-
?
|
|
173
|
-
:
|
|
170
|
+
? theme.fn.themeColor('dark', 2)
|
|
171
|
+
: theme.fn.themeColor('gray', 6),
|
|
174
172
|
},
|
|
175
173
|
footer: {
|
|
176
174
|
padding: theme.spacing.md,
|
|
177
175
|
borderTopWidth: 1,
|
|
178
176
|
borderTopColor:
|
|
179
177
|
theme.colorScheme === 'dark'
|
|
180
|
-
?
|
|
181
|
-
:
|
|
178
|
+
? theme.fn.themeColor('dark', 4)
|
|
179
|
+
: theme.fn.themeColor('gray', 2),
|
|
182
180
|
flexDirection: 'row',
|
|
183
181
|
justifyContent: 'space-between',
|
|
184
182
|
},
|