react-native-mantine 0.14.0 → 0.16.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 +70 -232
- 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 +79 -57
- 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/Table/index.js +257 -273
- package/lib/commonjs/components/Table/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/components/index.js +29 -29
- package/lib/commonjs/components/index.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 +80 -58
- 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/Table/index.js +257 -274
- package/lib/module/components/Table/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/components/index.js +3 -1
- package/lib/module/components/index.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/Table/index.d.ts +17 -83
- package/lib/typescript/commonjs/src/components/Table/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/components/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/index.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/Table/index.d.ts +17 -83
- package/lib/typescript/module/src/components/Table/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/components/index.d.ts +1 -1
- package/lib/typescript/module/src/components/index.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 +93 -62
- 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/Table/index.tsx +333 -413
- 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/components/index.tsx +3 -1
- 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/lib/commonjs/components/Table/Table.example.js +0 -323
- package/lib/commonjs/components/Table/Table.example.js.map +0 -1
- package/lib/module/components/Table/Table.example.js +0 -318
- package/lib/module/components/Table/Table.example.js.map +0 -1
- package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts +0 -13
- package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Table/Table.example.d.ts +0 -13
- package/lib/typescript/module/src/components/Table/Table.example.d.ts.map +0 -1
- package/src/components/Table/Table.example.tsx +0 -215
- package/src/theme/index.tsx +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["dimmed","theme","colorScheme","currentMode","colors","dark","gray"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/dimmed.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,MAAMA,CAACC,
|
|
1
|
+
{"version":3,"names":["dimmed","theme","colorScheme","currentMode","colors","dark","gray"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/dimmed.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,MAAMA,CAACC,KAAuB,EAAE;EAC9C,OAAO,MAAM;IACX,MAAMC,WAAW,GAAGD,KAAK,CAACE,WAAW,IAAI,OAAO;IAChD,OAAOD,WAAW,KAAK,MAAM,GACzBD,KAAK,CAACG,MAAM,CAACC,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS,GACnCJ,KAAK,CAACG,MAAM,CAACE,IAAI,GAAG,CAAC,CAAC,IAAI,SAAS;EACzC,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["themeColor","getPrimaryShade","degToCoordinates","deg","angle","radians","Math","PI","endX","cos","endY","sin","start","x","y","end","gradient","theme","payload","merged","from","defaultGradient","primaryColor","to","primaryShade","fromColor","color","shade","toColor","colors","linearGradientString","join"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/gradient/gradient.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["themeColor","getPrimaryShade","degToCoordinates","deg","angle","radians","Math","PI","endX","cos","endY","sin","start","x","y","end","gradient","theme","payload","merged","from","defaultGradient","primaryColor","to","primaryShade","fromColor","color","shade","toColor","colors","linearGradientString","join"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/gradient/gradient.ts"],"mappings":";;AACA,SAASA,UAAU,QAAQ,+BAA4B;AACvD,SAASC,eAAe,QAAQ,qBAAkB;;AAElD;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAACC,GAAW,EAAsE;EACzG,MAAMC,KAAK,GAAG,CAAED,GAAG,GAAG,GAAG,GAAI,GAAG,IAAI,GAAG,CAAC,CAAC;EACzC,MAAME,OAAO,GAAID,KAAK,GAAGE,IAAI,CAACC,EAAE,GAAI,GAAG;;EAEvC;EACA,MAAMC,IAAI,GAAGF,IAAI,CAACG,GAAG,CAACJ,OAAO,GAAGC,IAAI,CAACC,EAAE,GAAG,CAAC,CAAC;EAC5C,MAAMG,IAAI,GAAGJ,IAAI,CAACK,GAAG,CAACN,OAAO,GAAGC,IAAI,CAACC,EAAE,GAAG,CAAC,CAAC;;EAE5C;EACA,MAAMK,KAAK,GA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IACF,CAAC;EACH,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASe,oBAAoBA,CAAC3B,GAAW,EAAE,GAAG0B,MAAgB,EAAE;EACrE,OAAO,mBAAmB1B,GAAG,QAAQ0B,MAAM,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG;AAC3D","ignoreList":[]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { getSize } from "../../get-size/index.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns base font styles from theme
|
|
7
|
+
* Includes fontFamily and lineHeight
|
|
8
|
+
*/
|
|
3
9
|
export const fontStyles = theme => () => ({
|
|
4
|
-
fontFamily: theme.fontFamily
|
|
10
|
+
fontFamily: theme.fontFamily,
|
|
11
|
+
lineHeight: theme.lineHeight
|
|
5
12
|
});
|
|
6
13
|
|
|
7
14
|
/**
|
|
@@ -9,7 +16,46 @@ export const fontStyles = theme => () => ({
|
|
|
9
16
|
*/
|
|
10
17
|
export const inputFontStyles = theme => () => {
|
|
11
18
|
return {
|
|
12
|
-
fontFamily: theme.
|
|
19
|
+
fontFamily: theme.fontFamilyInput,
|
|
20
|
+
fontSize: theme.fontSizes.md,
|
|
21
|
+
lineHeight: theme.lineHeights.md
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get font size from theme
|
|
27
|
+
* @param size - Size key or number
|
|
28
|
+
*/
|
|
29
|
+
export const fontSize = theme => size => {
|
|
30
|
+
return getSize({
|
|
31
|
+
size,
|
|
32
|
+
sizes: theme.fontSizes
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Get line height from theme
|
|
38
|
+
* @param size - Size key or number (unitless multiplier)
|
|
39
|
+
*/
|
|
40
|
+
export const lineHeight = theme => size => {
|
|
41
|
+
return getSize({
|
|
42
|
+
size,
|
|
43
|
+
sizes: theme.lineHeights
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get heading styles by order
|
|
49
|
+
* @param order - Heading level (1-6)
|
|
50
|
+
*/
|
|
51
|
+
export const headingStyles = theme => order => {
|
|
52
|
+
const headingKey = `h${order}`;
|
|
53
|
+
const heading = theme.headings.sizes[headingKey];
|
|
54
|
+
return {
|
|
55
|
+
fontSize: heading.fontSize,
|
|
56
|
+
lineHeight: heading.lineHeight * heading.fontSize,
|
|
57
|
+
fontWeight: heading.fontWeight ?? theme.headings.fontWeight ?? theme.fontWeights.bold,
|
|
58
|
+
fontFamily: heading.fontFamily ?? theme.headings.fontFamily ?? theme.fontFamilyBold
|
|
13
59
|
};
|
|
14
60
|
};
|
|
15
61
|
export const focusStyles = _theme => () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fontStyles","theme","fontFamily","inputFontStyles","focusStyles","_theme","placeholderStyles","opacity","cover","offset","position","top","right","bottom","left","hover","styles","activeStyles","transform","scale"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/helpers.ts"],"mappings":";;AAEA,OAAO,
|
|
1
|
+
{"version":3,"names":["getSize","fontStyles","theme","fontFamily","lineHeight","inputFontStyles","fontFamilyInput","fontSize","fontSizes","md","lineHeights","size","sizes","headingStyles","order","headingKey","heading","headings","fontWeight","fontWeights","bold","fontFamilyBold","focusStyles","_theme","placeholderStyles","opacity","cover","offset","position","top","right","bottom","left","hover","styles","activeStyles","transform","scale"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/helpers.ts"],"mappings":";;AAEA,SAASA,OAAO,QAAQ,yBAAgB;;AAExC;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,KAAuB,IAAK,OAAO;EAC5DC,UAAU,EAAED,KAAK,CAACC,UAAU;EAC5BC,UAAU,EAAEF,KAAK,CAACE;AACpB,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,e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B,GAAID,MAAwB,IAAK,OAAO;EACpE;EACAE,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,OAAO,MAAMC,KAAK,GACfH,MAAwB,IACzB,CAACI,MAAc,GAAG,CAAC,MAAM;EACvBC,QAAQ,EAAE,UAAmB;EAC7BC,GAAG,EAAEF,MAAM;EACXG,KAAK,EAAEH,MAAM;EACbI,MAAM,EAAEJ,MAAM;EACdK,IAAI,EAAEL;AACR,CAAC,CAAC;AAEJ,OAAO,MAAMM,KAAK,GAAIV,MAAwB,IAAMW,MAAW,KAAM;EACnE;EACA;EACA,GAAGA;AACL,CAAC,CAAC;AAEF,OAAO,MAAMC,YAAY,GAAIZ,MAAwB,KAAM;EACzD;EACAE,OAAO,EAAE,GAAG;EACZW,SAAS,EAAE,CAAC;IAAEC,KAAK,EAAE;EAAK,CAAC;AAC7B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Theme helper functions
|
|
5
|
+
* Exports all utility functions for theme manipulation
|
|
6
|
+
*/
|
|
7
|
+
|
|
3
8
|
import { radius } from "./radius.js";
|
|
4
9
|
import { rgba } from "./rgba.js";
|
|
5
10
|
import { size } from "./size.js";
|
|
6
11
|
import { themeColor } from "./theme-color/theme-color.js";
|
|
7
12
|
import { variant } from "./variant.js";
|
|
8
|
-
import { getPrimaryShade } from "./primary-shade.js";
|
|
13
|
+
import { getPrimaryShade, getPrimaryColor } from "./primary-shade.js";
|
|
9
14
|
import { shadow } from "./shadow.js";
|
|
10
15
|
import { gradient } from "./gradient/gradient.js";
|
|
11
16
|
import { lighten } from "./lighten.js";
|
|
@@ -13,20 +18,43 @@ import { darken } from "./darken.js";
|
|
|
13
18
|
import { dimmed } from "./dimmed.js";
|
|
14
19
|
import { largerThan, smallerThan } from "./breakpoints.js";
|
|
15
20
|
import * as helpers from "./helpers.js";
|
|
21
|
+
import { createColorSchemeValueFunction, createColorSchemeConstantsFunction } from "./color-scheme-value.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Collection of all theme helper functions
|
|
25
|
+
* Used by attach-functions to create theme.fn object
|
|
26
|
+
*/
|
|
16
27
|
export const fns = {
|
|
17
|
-
|
|
18
|
-
rgba,
|
|
19
|
-
size,
|
|
20
|
-
variant,
|
|
28
|
+
// Color functions
|
|
21
29
|
themeColor,
|
|
22
30
|
getPrimaryShade,
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
getPrimaryColor,
|
|
32
|
+
// Variant function
|
|
33
|
+
variant,
|
|
34
|
+
// Color manipulation
|
|
35
|
+
rgba,
|
|
25
36
|
lighten,
|
|
26
37
|
darken,
|
|
27
38
|
dimmed,
|
|
39
|
+
// Size and spacing
|
|
40
|
+
radius,
|
|
41
|
+
size,
|
|
42
|
+
// Visual effects
|
|
43
|
+
shadow,
|
|
44
|
+
gradient,
|
|
45
|
+
// Responsive
|
|
28
46
|
largerThan,
|
|
29
47
|
smallerThan,
|
|
48
|
+
// Color scheme helpers
|
|
49
|
+
colorSchemeValue: createColorSchemeValueFunction,
|
|
50
|
+
colorSchemeConstants: createColorSchemeConstantsFunction,
|
|
51
|
+
// Helper functions from helpers module
|
|
30
52
|
...helpers
|
|
31
53
|
};
|
|
54
|
+
|
|
55
|
+
// Re-export individual functions for direct imports
|
|
56
|
+
export { radius, rgba, size, themeColor, variant, getPrimaryShade, getPrimaryColor, shadow, gradient, lighten, darken, dimmed, largerThan, smallerThan };
|
|
57
|
+
|
|
58
|
+
// Re-export color scheme helpers
|
|
59
|
+
export { colorSchemeValue, resolveColorSchemeValue, resolveColorSchemeConstants, isColorSchemeValue, createColorSchemeValueFunction, createColorSchemeConstantsFunction } from "./color-scheme-value.js";
|
|
32
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["radius","rgba","size","themeColor","variant","getPrimaryShade","shadow","gradient","lighten","darken","dimmed","largerThan","smallerThan","helpers","fns"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/index.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,eAAe,QAAQ,oBAAiB;
|
|
1
|
+
{"version":3,"names":["radius","rgba","size","themeColor","variant","getPrimaryShade","getPrimaryColor","shadow","gradient","lighten","darken","dimmed","largerThan","smallerThan","helpers","createColorSchemeValueFunction","createColorSchemeConstantsFunction","fns","colorSchemeValue","colorSchemeConstants","resolveColorSchemeValue","resolveColorSchemeConstants","isColorSchemeValue"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,aAAU;AACjC,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,IAAI,QAAQ,WAAQ;AAC7B,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,eAAe,EAAEC,eAAe,QAAQ,oBAAiB;AAClE,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,QAAQ,QAAQ,wBAAqB;AAC9C,SAASC,OAAO,QAAQ,cAAW;AACnC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,MAAM,QAAQ,aAAU;AACjC,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAe;AACvD,OAAO,KAAKC,OAAO,MAAM,cAAW;AACpC,SACEC,8BAA8B,EAC9BC,kCAAkC,QAC7B,yBAAsB;;AAE7B;AACA;AACA;AACA;AACA,OAAO,MAAMC,GAAG,GAAG;EACjB;EACAd,UAAU;EACVE,eAAe;EACfC,eAAe;EAEf;EACAF,OAAO;EAEP;EACAH,IAAI;EACJQ,OAAO;EACPC,MAAM;EACNC,MAAM;EAEN;EACAX,MAAM;EACNE,IAAI;EAEJ;EACAK,MAAM;EACNC,QAAQ;EAER;EACAI,UAAU;EACVC,WAAW;EAEX;EACAK,gBAAgB,EAAEH,8BAA8B;EAChDI,oBAAoB,EAAEH,kCAAkC;EAExD;EACA,GAAGF;AACL,CAAC;;AAED;AACA,SACEd,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,OAAO,EACPC,eAAe,EACfC,eAAe,EACfC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,MAAM,EACNC,MAAM,EACNC,UAAU,EACVC,WAAW;;AAGb;AACA,SACEK,gBAAgB,EAChBE,uBAAuB,EACvBC,2BAA2B,EAC3BC,kBAAkB,EAClBP,8BAA8B,EAC9BC,kCAAkC,QAC7B,yBAAsB","ignoreList":[]}
|
|
@@ -1,14 +1,90 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
+
* Primary shade helper function
|
|
4
5
|
* Returns the appropriate primary shade based on the current color scheme
|
|
5
|
-
*
|
|
6
|
+
* Aligned with Mantine web's primaryShade implementation
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Get the primary shade for the current color scheme
|
|
11
|
+
*
|
|
12
|
+
* If theme.primaryShade is a number, returns that number.
|
|
13
|
+
* If theme.primaryShade is an object with light/dark values, returns the
|
|
14
|
+
* appropriate value based on the color scheme.
|
|
15
|
+
*
|
|
16
|
+
* @param theme - Mantine theme object
|
|
17
|
+
* @param colorScheme - Optional color scheme override (light or dark)
|
|
18
|
+
* @returns Shade value (0-9)
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // With theme.primaryShade = { light: 6, dark: 8 }
|
|
22
|
+
* // and theme.colorScheme = 'light'
|
|
23
|
+
* getPrimaryShade(theme) // returns 6
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // With explicit colorScheme override
|
|
27
|
+
* getPrimaryShade(theme, 'dark') // returns 8
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // With theme.primaryShade = 7 (single number)
|
|
31
|
+
* getPrimaryShade(theme) // returns 7
|
|
6
32
|
*/
|
|
7
33
|
export function getPrimaryShade(theme, colorScheme) {
|
|
34
|
+
// If primaryShade is a single number, return it directly
|
|
8
35
|
if (typeof theme.primaryShade === 'number') {
|
|
9
36
|
return theme.primaryShade;
|
|
10
37
|
}
|
|
11
|
-
|
|
38
|
+
|
|
39
|
+
// Determine which color scheme to use
|
|
40
|
+
// Priority: 1. parameter override, 2. theme.colorScheme, 3. default to 'light'
|
|
41
|
+
const scheme = colorScheme || theme.colorScheme || 'light';
|
|
42
|
+
|
|
43
|
+
// Return the appropriate shade for the color scheme
|
|
12
44
|
return theme.primaryShade[scheme];
|
|
13
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Curried version of getPrimaryShade for use with theme.fn
|
|
49
|
+
* Matches Mantine web's theme.fn.primaryShade signature
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export function createPrimaryShadeFunction(theme) {
|
|
54
|
+
return colorScheme => {
|
|
55
|
+
return getPrimaryShade(theme, colorScheme);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get the primary color at the primary shade
|
|
61
|
+
*
|
|
62
|
+
* @param theme - Mantine theme object
|
|
63
|
+
* @param colorScheme - Optional color scheme override
|
|
64
|
+
* @returns Color string value
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* // Get primary color at primary shade
|
|
68
|
+
* getPrimaryColor(theme) // returns '#228be6' (blue[6])
|
|
69
|
+
*/
|
|
70
|
+
export function getPrimaryColor(theme, colorScheme) {
|
|
71
|
+
const shade = getPrimaryShade(theme, colorScheme);
|
|
72
|
+
const primaryPalette = theme.colors[theme.primaryColor];
|
|
73
|
+
if (!primaryPalette) {
|
|
74
|
+
console.warn(`Primary color "${theme.primaryColor}" not found in theme.colors. Falling back to 'blue'.`);
|
|
75
|
+
return theme.colors.blue?.[shade] || '#228be6';
|
|
76
|
+
}
|
|
77
|
+
return primaryPalette[shade] || primaryPalette[0] || '#228be6';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Curried version of getPrimaryColor for use with theme.fn
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export function createPrimaryColorFunction(theme) {
|
|
86
|
+
return colorScheme => {
|
|
87
|
+
return getPrimaryColor(theme, colorScheme);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
14
90
|
//# sourceMappingURL=primary-shade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getPrimaryShade","theme","colorScheme","primaryShade","scheme","
|
|
1
|
+
{"version":3,"names":["getPrimaryShade","theme","colorScheme","primaryShade","scheme","createPrimaryShadeFunction","getPrimaryColor","shade","primaryPalette","colors","primaryColor","console","warn","blue","createPrimaryColorFunction"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/primary-shade.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAACC,KAAuB,EAAEC,WAAyB,EAAS;EACzF;EACA,IAAI,OAAOD,KAAK,CAACE,YAAY,KAAK,QAAQ,EAAE;IAC1C,OAAOF,KAAK,CAACE,YAAY;EAC3B;;EAEA;EACA;EACA,MAAMC,MAAM,GAAGF,WAAW,IAAID,KAAK,CAACC,WAAW,IAAI,OAAO;;EAE1D;EACA,OAAOD,KAAK,CAACE,YAAY,CAACC,MAAM,CAAC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAACJ,KAAuB,EAAE;EAClE,OAAQC,WAAyB,IAAY;IAC3C,OAAOF,eAAe,CAACC,KAAK,EAAEC,WAAW,CAAC;EAC5C,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,eAAeA,CAACL,KAAuB,EAAEC,WAAyB,EAAU;EAC1F,MAAMK,KAAK,GAAGP,eAAe,CAACC,KAAK,EAAEC,WAAW,CAAC;EACjD,MAAMM,cAAc,GAAGP,KAAK,CAACQ,MAAM,CAACR,KAAK,CAACS,YAAY,CAAC;EAEvD,IAAI,CAACF,cAAc,EAAE;IACnBG,OAAO,CAACC,IAAI,CACV,kBAAkBX,KAAK,CAACS,YAAY,sDACtC,CAAC;IACD,OAAOT,KAAK,CAACQ,MAAM,CAACI,IAAI,GAAGN,KAAK,CAAC,IAAI,SAAS;EAChD;EAEA,OAAOC,cAAc,CAACD,KAAK,CAAC,IAAIC,cAAc,CAAC,CAAC,CAAC,IAAI,SAAS;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,0BAA0BA,CAACb,KAAuB,EAAE;EAClE,OAAQC,WAAyB,IAAa;IAC5C,OAAOI,eAAe,CAACL,KAAK,EAAEC,WAAW,CAAC;EAC5C,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","SHADOW_CONFIG","xs","ios","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","android","elevation","sm","md","lg","xl","shadow","size","shadowSize","shadowConfig","OS"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/shadow.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAavC;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAkF,GAAG;EACzFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDC,EAAE,EAAE;IACFT,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDE,EAAE,EAAE;IACFV,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDG,EAAE,EAAE;IACFX,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDI,EAAE,EAAE;IACFZ,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,MAAMA,CAACC,
|
|
1
|
+
{"version":3,"names":["Platform","SHADOW_CONFIG","xs","ios","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","android","elevation","sm","md","lg","xl","shadow","size","shadowSize","shadowConfig","OS"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/shadow.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAavC;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAkF,GAAG;EACzFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDC,EAAE,EAAE;IACFT,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDE,EAAE,EAAE;IACFV,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDG,EAAE,EAAE;IACFX,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,GAAG;MAClBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF,CAAC;EACDI,EAAE,EAAE;IACFZ,GAAG,EAAE;MACHC,WAAW,EAAE,MAAM;MACnBC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAC;MACrCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb;EACF;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,MAAMA,CAACC,IAAkB,EAAgB;EACvD,IAAI,CAACA,IAAI,EAAE;IACT,OAAO,CAAC,CAAC;EACX;EAEA,MAAMC,UAAU,GAAGD,IAAqB;EACxC,MAAME,YAAY,GAAGlB,aAAa,CAACiB,UAAU,CAAC;EAE9C,IAAI,CAACC,YAAY,EAAE;IACjB,OAAO,CAAC,CAAC;EACX;EAEA,OAAOnB,QAAQ,CAACoB,EAAE,KAAK,KAAK,GAAGD,YAAY,CAAChB,GAAG,GAAGgB,YAAY,CAACT,OAAO;AACxE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getSize","size","_theme","sizes"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/size.ts"],"mappings":";;AACA,SAASA,OAAO,QAAQ,yBAAgB;AAExC,OAAO,SAASC,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAAiC;IACtCD,IAAI;IACJE;EAIF,CAAC,
|
|
1
|
+
{"version":3,"names":["getSize","size","_theme","sizes"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/size.ts"],"mappings":";;AACA,SAASA,OAAO,QAAQ,yBAAgB;AAExC,OAAO,SAASC,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAAiC;IACtCD,IAAI;IACJE;EAIF,CAAC,KAAsB;IACrB,IAAI,CAACF,IAAI,EAAE,OAAO,CAAC;IACnB,OAAOD,OAAO,CAAC;MAAEC,IAAI,EAAEA,IAAyB;MAAEE;IAAM,CAAC,CAAC;EAC5D,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Color utility functions for custom color support
|
|
5
|
+
* Handles detection and manipulation of custom hex/rgb/rgba colors
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Check if a color string is a custom color value (not a palette key)
|
|
10
|
+
*
|
|
11
|
+
* Custom colors include:
|
|
12
|
+
* - Hex colors: #fff, #ffffff
|
|
13
|
+
* - RGB colors: rgb(255, 255, 255)
|
|
14
|
+
* - RGBA colors: rgba(255, 255, 255, 0.5)
|
|
15
|
+
* - HSL colors: hsl(0, 100%, 50%)
|
|
16
|
+
* - HSLA colors: hsla(0, 100%, 50%, 0.5)
|
|
17
|
+
* - CSS named colors like 'transparent', 'currentColor'
|
|
18
|
+
*
|
|
19
|
+
* @param color - Color string to check
|
|
20
|
+
* @returns true if color is a custom value, false if it might be a palette key
|
|
21
|
+
*/
|
|
22
|
+
export function isCustomColor(color) {
|
|
23
|
+
if (!color || typeof color !== 'string') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Check for hex colors
|
|
28
|
+
if (color.startsWith('#')) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Check for rgb/rgba colors
|
|
33
|
+
if (color.startsWith('rgb')) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Check for hsl/hsla colors
|
|
38
|
+
if (color.startsWith('hsl')) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Check for CSS keywords
|
|
43
|
+
if (color === 'transparent' || color === 'currentColor') {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Otherwise, assume it's a palette key or CSS named color
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Generate a lighter shade of a custom color
|
|
53
|
+
* Used when shade 0-5 is requested for custom colors
|
|
54
|
+
*
|
|
55
|
+
* @param color - Base color (hex or rgb) - treated as shade 6
|
|
56
|
+
* @param shadeIndex - Shade index (0-5)
|
|
57
|
+
* @returns Lighter color string
|
|
58
|
+
*/
|
|
59
|
+
export function generateLighterShade(color, shadeIndex) {
|
|
60
|
+
// For shades 0-5, lighten the color (base is shade 6)
|
|
61
|
+
// shade 0 = lightest (90% lighter), shade 5 = slightly lighter (15% lighter)
|
|
62
|
+
const lightenAmount = (6 - shadeIndex) * 0.15; // 0.9 to 0.15
|
|
63
|
+
|
|
64
|
+
// Use the lighten algorithm from lighten.ts
|
|
65
|
+
const rgba = parseColorToRgba(color);
|
|
66
|
+
if (!rgba) return color;
|
|
67
|
+
const {
|
|
68
|
+
r,
|
|
69
|
+
g,
|
|
70
|
+
b,
|
|
71
|
+
a
|
|
72
|
+
} = rgba;
|
|
73
|
+
const light = input => Math.round(input + (255 - input) * lightenAmount);
|
|
74
|
+
return `rgba(${light(r)}, ${light(g)}, ${light(b)}, ${a})`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Generate a darker shade of a custom color
|
|
79
|
+
* Used when shade 7-9 is requested for custom colors
|
|
80
|
+
*
|
|
81
|
+
* @param color - Base color (hex or rgb) - treated as shade 6
|
|
82
|
+
* @param shadeIndex - Shade index (7-9)
|
|
83
|
+
* @returns Darker color string
|
|
84
|
+
*/
|
|
85
|
+
export function generateDarkerShade(color, shadeIndex) {
|
|
86
|
+
// For shades 7-9, darken the color (base is shade 6)
|
|
87
|
+
// shade 7 = slightly darker (10% darker), shade 9 = darkest (30% darker)
|
|
88
|
+
const darkenAmount = (shadeIndex - 6) * 0.1; // 0.1 to 0.3
|
|
89
|
+
|
|
90
|
+
// Use the darken algorithm from darken.ts
|
|
91
|
+
const rgba = parseColorToRgba(color);
|
|
92
|
+
if (!rgba) return color;
|
|
93
|
+
const {
|
|
94
|
+
r,
|
|
95
|
+
g,
|
|
96
|
+
b,
|
|
97
|
+
a
|
|
98
|
+
} = rgba;
|
|
99
|
+
const f = 1 - darkenAmount;
|
|
100
|
+
const dark = input => Math.round(input * f);
|
|
101
|
+
return `rgba(${dark(r)}, ${dark(g)}, ${dark(b)}, ${a})`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get a shade variation of a custom color
|
|
106
|
+
*
|
|
107
|
+
* For custom colors, we treat shade 6 as the base color (no modification).
|
|
108
|
+
* This aligns with the default primaryShade for light mode.
|
|
109
|
+
* Shades 0-5 are lighter, shades 7-9 are darker.
|
|
110
|
+
*
|
|
111
|
+
* @param color - Base color (hex or rgb)
|
|
112
|
+
* @param shade - Shade index (0-9), where 6 is the base color
|
|
113
|
+
* @returns Color at the requested shade
|
|
114
|
+
*/
|
|
115
|
+
export function getCustomColorShade(color, shade) {
|
|
116
|
+
// Shade 6 is treated as the base color (most common primaryShade for light mode)
|
|
117
|
+
if (shade === 6) {
|
|
118
|
+
return color;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Lighter shades (0-5)
|
|
122
|
+
if (shade < 6) {
|
|
123
|
+
return generateLighterShade(color, shade);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Darker shades (7-9)
|
|
127
|
+
return generateDarkerShade(color, shade);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Parse color string to RGBA object
|
|
132
|
+
* Supports hex and rgb/rgba formats
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
function parseColorToRgba(color) {
|
|
136
|
+
// Handle hex colors
|
|
137
|
+
if (color.startsWith('#')) {
|
|
138
|
+
return hexToRgba(color);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Handle rgb/rgba colors
|
|
142
|
+
if (color.startsWith('rgb')) {
|
|
143
|
+
return rgbStringToRgba(color);
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
function isHexColor(hex) {
|
|
148
|
+
const HEX_REGEXP = /^#?([0-9A-F]{3}){1,2}$/i;
|
|
149
|
+
return HEX_REGEXP.test(hex);
|
|
150
|
+
}
|
|
151
|
+
function hexToRgba(color) {
|
|
152
|
+
if (!isHexColor(color)) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
let hexString = color.replace('#', '');
|
|
156
|
+
|
|
157
|
+
// Handle shorthand hex (#fff -> #ffffff)
|
|
158
|
+
if (hexString.length === 3) {
|
|
159
|
+
const shorthandHex = hexString.split('');
|
|
160
|
+
hexString = [shorthandHex[0], shorthandHex[0], shorthandHex[1], shorthandHex[1], shorthandHex[2], shorthandHex[2]].join('');
|
|
161
|
+
}
|
|
162
|
+
const parsed = parseInt(hexString, 16);
|
|
163
|
+
const r = parsed >> 16 & 255;
|
|
164
|
+
const g = parsed >> 8 & 255;
|
|
165
|
+
const b = parsed & 255;
|
|
166
|
+
return {
|
|
167
|
+
r,
|
|
168
|
+
g,
|
|
169
|
+
b,
|
|
170
|
+
a: 1
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function rgbStringToRgba(color) {
|
|
174
|
+
const parts = color.replace(/[^0-9,.]/g, '').split(',').map(Number);
|
|
175
|
+
if (parts.length < 3) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
const r = parts[0] || 0;
|
|
179
|
+
const g = parts[1] || 0;
|
|
180
|
+
const b = parts[2] || 0;
|
|
181
|
+
const a = parts[3] !== undefined ? parts[3] : 1;
|
|
182
|
+
return {
|
|
183
|
+
r,
|
|
184
|
+
g,
|
|
185
|
+
b,
|
|
186
|
+
a
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=color-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isCustomColor","color","startsWith","generateLighterShade","shadeIndex","lightenAmount","rgba","parseColorToRgba","r","g","b","a","light","input","Math","round","generateDarkerShade","darkenAmount","f","dark","getCustomColorShade","shade","hexToRgba","rgbStringToRgba","isHexColor","hex","HEX_REGEXP","test","hexString","replace","length","shorthandHex","split","join","parsed","parseInt","parts","map","Number","undefined"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/theme-color/color-utils.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAACC,KAAa,EAAW;EACpD,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACvC,OAAO,KAAK;EACd;;EAEA;EACA,IAAIA,KAAK,CAACC,UAAU,CAAC,GAAG,CAAC,EAAE;IACzB,OAAO,IAAI;EACb;;EAEA;EACA,IAAID,KAAK,CAACC,UAAU,CAAC,KAAK,CAAC,EAAE;IAC3B,OAAO,IAAI;EACb;;EAEA;EACA,IAAID,KAAK,CAACC,UAAU,CAAC,KAAK,CAAC,EAAE;IAC3B,OAAO,IAAI;EACb;;EAEA;EACA,IAAID,KAAK,KAAK,aAAa,IAAIA,KAAK,KAAK,cAAc,EAAE;IACvD,OAAO,IAAI;EACb;;EAEA;EACA,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,oBAAoBA,CAACF,KAAa,EAAEG,UAAkB,EAAU;EAC9E;EACA;EACA,MAAMC,aAAa,GAAG,CAAC,CAAC,GAAGD,UAAU,IAAI,IAAI,CAAC,CAAC;;EAE/C;EACA,MAAME,IAAI,GAAGC,gBAAgB,CAACN,KAAK,CAAC;EACpC,IAAI,CAACK,IAAI,EAAE,OAAOL,KAAK;EAEvB,MAAM;IAAEO,CAAC;IAAEC,CAAC;IAAEC,CAAC;IAAEC;EAAE,CAAC,GAAGL,IAAI;EAC3B,MAAMM,KAAK,GAAIC,KAAa,IAAKC,IAAI,CAACC,KAAK,CAACF,KAAK,GAAG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E,CAAC;AAC1B;AAEA,SAASY,eAAeA,CAACtB,KAAa,EAAe;EACnD,MAAMmC,KAAK,GAAGnC,KAAK,CAAC4B,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAACG,KAAK,CAAC,GAAG,CAAC,CAACK,GAAG,CAACC,MAAM,CAAC;EAEnE,IAAIF,KAAK,CAACN,MAAM,GAAG,CAAC,EAAE;IACpB,OAAO,IAAI;EACb;EAEA,MAAMtB,CAAC,GAAG4B,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;EACvB,MAAM3B,CAAC,GAAG2B,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;EACvB,MAAM1B,CAAC,GAAG0B,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;EACvB,MAAMzB,CAAC,GAAGyB,KAAK,CAAC,CAAC,CAAC,KAAKG,SAAS,GAAGH,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;EAE/C,OAAO;IAAE5B,CAAC;IAAEC,CAAC;IAAEC,CAAC;IAAEC;EAAE,CAAC;AACvB","ignoreList":[]}
|
|
@@ -1,31 +1,113 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Theme color helper function
|
|
5
|
+
* Retrieves colors from theme palette with proper shade handling
|
|
6
|
+
* Aligned with Mantine web's themeColor implementation
|
|
7
|
+
*
|
|
8
|
+
* Now supports custom color values (hex, rgb, rgba) that are not in the theme palette.
|
|
9
|
+
* Custom colors can be shaded on the fly using color manipulation algorithms.
|
|
10
|
+
*/
|
|
11
|
+
|
|
3
12
|
import { getPrimaryShade } from "../primary-shade.js";
|
|
13
|
+
import { isCustomColor, getCustomColorShade } from "./color-utils.js";
|
|
14
|
+
/**
|
|
15
|
+
* Get a color value from the theme
|
|
16
|
+
*
|
|
17
|
+
* @param theme - Mantine theme object
|
|
18
|
+
* @param color - Color name or CSS color value (now supports hex/rgb/rgba)
|
|
19
|
+
* @param shade - Optional shade (0-9). If not provided, uses primaryShade
|
|
20
|
+
* @param primaryFallback - If true and color not found, falls back to primary color
|
|
21
|
+
* @returns Color string value
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // Get blue at primary shade (6 for light mode, 8 for dark mode)
|
|
25
|
+
* themeColor({ theme, color: 'blue' })
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Get blue at specific shade
|
|
29
|
+
* themeColor({ theme, color: 'blue', shade: 5 })
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Pass through CSS color values
|
|
33
|
+
* themeColor({ theme, color: '#ff0000' }) // returns '#ff0000'
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Use custom hex color with shade
|
|
37
|
+
* themeColor({ theme, color: '#FF5733', shade: 7 }) // returns darker version
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Use custom rgb color with shade
|
|
41
|
+
* themeColor({ theme, color: 'rgb(255, 87, 51)', shade: 3 }) // returns lighter version
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Use primary color fallback
|
|
45
|
+
* themeColor({ theme, color: 'unknown', primaryFallback: true })
|
|
46
|
+
*/
|
|
4
47
|
export function themeColor({
|
|
5
48
|
theme,
|
|
6
49
|
color,
|
|
7
|
-
shade
|
|
50
|
+
shade,
|
|
51
|
+
primaryFallback = false
|
|
8
52
|
}) {
|
|
53
|
+
// Handle undefined/null color
|
|
9
54
|
if (!color) {
|
|
10
|
-
return
|
|
55
|
+
return primaryFallback ? themeColor({
|
|
56
|
+
theme,
|
|
57
|
+
color: theme.primaryColor,
|
|
58
|
+
shade
|
|
59
|
+
}) : '';
|
|
11
60
|
}
|
|
12
61
|
|
|
13
|
-
//
|
|
14
|
-
if (
|
|
62
|
+
// Check if this is a custom color value (hex, rgb, rgba, etc.)
|
|
63
|
+
if (isCustomColor(color)) {
|
|
64
|
+
// If shade is specified, generate a shade variation
|
|
65
|
+
if (shade !== undefined) {
|
|
66
|
+
return getCustomColorShade(color, shade);
|
|
67
|
+
}
|
|
68
|
+
// Otherwise return the color as-is
|
|
15
69
|
return color;
|
|
16
70
|
}
|
|
17
71
|
|
|
18
|
-
// Get from theme
|
|
72
|
+
// Get color palette from theme
|
|
19
73
|
const colorPalette = theme.colors[color];
|
|
74
|
+
|
|
75
|
+
// If color not in palette
|
|
20
76
|
if (!colorPalette) {
|
|
21
|
-
//
|
|
77
|
+
// Try primary fallback if enabled
|
|
78
|
+
if (primaryFallback && color !== theme.primaryColor) {
|
|
79
|
+
return themeColor({
|
|
80
|
+
theme,
|
|
81
|
+
color: theme.primaryColor,
|
|
82
|
+
shade
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
// Otherwise return the color string as-is (might be a named CSS color)
|
|
22
86
|
return color;
|
|
23
87
|
}
|
|
24
88
|
|
|
25
|
-
//
|
|
89
|
+
// Determine which shade to use
|
|
26
90
|
const colorShade = shade !== undefined ? shade : getPrimaryShade(theme);
|
|
27
91
|
|
|
28
|
-
//
|
|
29
|
-
|
|
92
|
+
// Get the color at the specified shade
|
|
93
|
+
const resolvedColor = colorPalette[colorShade];
|
|
94
|
+
|
|
95
|
+
// Return the color or fall back to first shade
|
|
96
|
+
return resolvedColor || colorPalette[0] || color;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Curried version of themeColor for use with theme.fn
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export function createThemeColorFunction(theme) {
|
|
104
|
+
return (color, shade, primaryFallback) => {
|
|
105
|
+
return themeColor({
|
|
106
|
+
theme,
|
|
107
|
+
color,
|
|
108
|
+
shade,
|
|
109
|
+
primaryFallback
|
|
110
|
+
});
|
|
111
|
+
};
|
|
30
112
|
}
|
|
31
113
|
//# sourceMappingURL=theme-color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getPrimaryShade","themeColor","theme","color","shade","
|
|
1
|
+
{"version":3,"names":["getPrimaryShade","isCustomColor","getCustomColorShade","themeColor","theme","color","shade","primaryFallback","primaryColor","undefined","colorPalette","colors","colorShade","resolvedColor","createThemeColorFunction"],"sourceRoot":"../../../../../../src","sources":["theme/functions/fns/theme-color/theme-color.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,eAAe,QAAQ,qBAAkB;AAClD,SAASC,aAAa,EAAEC,mBAAmB,QAAQ,kBAAe;AASlE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAC;EACzBC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,eAAe,GAAG;AACH,CAAC,EAAU;EAC1B;EACA,IAAI,CAACF,KAAK,EAAE;IACV,OAAOE,eAAe,GAAGJ,UAAU,CAAC;MAAEC,KAAK;MAAEC,KAAK,EAAED,KAAK,CAACI,YAAY;MAAEF;IAAM,CAAC,CAAC,GAAG,EAAE;EACvF;;EAEA;EACA,IAAIL,aAAa,CAACI,KAAK,CAAC,EAAE;IACxB;IACA,IAAIC,KAAK,KAAKG,SAAS,EAAE;MACvB,OAAOP,mBAAmB,CAACG,KAAK,EAAEC,KAAK,CAAC;IAC1C;IACA;IACA,OAAOD,KAAK;EACd;;EAEA;EACA,MAAMK,YAAY,GAAGN,KAAK,CAACO,MAAM,CAACN,KAAK,CAAC;;EAExC;EACA,IAAI,CAACK,YAAY,EAAE;IACjB;IACA,IAAIH,eAAe,IAAIF,KAAK,KAAKD,KAAK,CAACI,YAAY,EAAE;MACnD,OAAOL,UAAU,CAAC;QAAEC,KAAK;QAAEC,KAAK,EAAED,KAAK,CAACI,YAAY;QAAEF;MAAM,CAAC,CAAC;IAChE;IACA;IACA,OAAOD,KAAK;EACd;;EAEA;EACA,MAAMO,UAAU,G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