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":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","scale","sm","md","lg","xl","useStyles","createStyles","theme","labelPosition","size","sizeStyles","root","flexDirection","alignItems","label","fontSize","fontSizes","color","colorScheme","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_themeProvider","_index3","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","scale","sm","md","lg","xl","useStyles","createStyles","theme","labelPosition","size","sizeStyles","root","flexDirection","alignItems","label","fontSize","fontSizes","color","colorScheme","fn","themeColor","black","marginLeft","spacing","marginRight","switch","transform","defaultProps","disabled","Switch","exports","forwardRef","props","ref","checked","onChange","style","wrapperStyle","useComponentDefaultProps","useTheme","styles","sx","name","handleChange","value","colorKey","primaryColor","falseColor","trueColor","trackColor","false","true","thumbColor","Platform","OS","white","switchComponent","jsx","onValueChange","ios_backgroundColor","jsxs","BoxView","children","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAA2C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AA+B3C,MAAMkB,KAAK,GAAG;EACZC,EAAE,EAAE;IAAEC,KAAK,EAAE;EAAI,CAAC;EAClBC,EAAE,EAAE;IAAED,KAAK,EAAE;EAAI,CAAC;EAClBE,EAAE,EAAE;IAAEF,KAAK,EAAE;EAAE,CAAC;EAChBG,EAAE,EAAE;IAAEH,KAAK,EAAE;EAAI,CAAC;EAClBI,EAAE,EAAE;IAAEJ,KAAK,EAAE;EAAI;AACnB,CAAC;AAED,MAAMK,SAAS,GAAG,IAAAC,oBAAY,EAC5B,CACEC,KAAK,EACL;EACEC,aAAa;EACbC;AAIF,CAAC,KACE;EACH,MAAMC,UAAU,GAAGZ,KAAK,CAACW,IAAI,CAAuB,IAAIX,KAAK,CAACI,EAAE;EAEhE,OAAO;IACLS,IAAI,EAAE;MACJC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE;IACd,CAAC;IACDC,KAAK,EAAE;MACLC,QAAQ,EAAER,KAAK,CAACS,SAAS,CAACf,EAAY;MACtCgB,KAAK,EAAEV,KAAK,CAACW,WAAW,KAAK,MAAM,GAAGX,KAAK,CAACY,EAAE,CAACC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,GAAGb,KAAK,CAACc,KAAK;MAClFC,UAAU,EAAEd,aAAa,KAAK,OAAO,GAAGD,KAAK,CAACgB,OAAO,CAACtB,EAAE,GAAG,CAAC;MAC5DuB,WAAW,EAAEhB,aAAa,KAAK,MAAM,GAAGD,KAAK,CAACgB,OAAO,CAACtB,EAAE,GAAG;IAC7D,CAAC;IACDwB,MAAM,EAAE;MACNC,SAAS,EAAE,CAAC;QAAE1B,KAAK,EAAEU,UAAU,CAACV;MAAM,CAAC;IACzC;EACF,CAAC;AACH,CACF,CAAQ;AAER,MAAM2B,YAAkC,GAAG;EACzClB,IAAI,EAAE,IAAI;EACVQ,KAAK,EAAE,MAAM;EACbT,aAAa,EAAE,OAAO;EACtBoB,QAAQ,EAAE;AACZ,CAAC;AAEM,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAG,IAAAE,iBAAU,EAAmB,CAACC,KAAK,EAAEC,GAAG,KAAK;EACjE,MAAM;IACJnB,KAAK;IACLL,IAAI;IACJQ,KAAK;IACLT,aAAa;IACb0B,OAAO;IACPC,QAAQ;IACRP,QAAQ;IACRQ,KAAK;IACLC;EACF,CAAC,GAAG,IAAAC,uCAAwB,EAAC,QAAQ,EAAEX,YAAY,EAAEK,KAAK,CAAC;EAE3D,MAAMzB,KAAK,GAAG,IAAAgC,uBAAQ,EAAC,CAAC;EACxB,MAAM;IAAEC,MAAM;IAAEC;EAAG,CAAC,GAAGpC,SAAS,CAAC;IAAEG,aAAa;IAAEC;EAAK,CAAC,EAAE;IAAEiC,IAAI,EAAE;EAAS,CAAC,CAAQ;EAEpF,MAAMC,YAAY,GAAIC,KAAc,IAAK;IACvC,IAAI,CAAChB,QAAQ,EAAE;MACbO,QAAQ,GAAGS,KAAK,CAAC;IACnB;EACF,CAAC;EAED,MAAMC,QAAQ,GAAG5B,KAAK,IAAIV,KAAK,CAACuC,YAAY;EAC5C,MAAMC,UAAU,GAAGxC,KAAK,CAACW,WAAW,KAAK,MAAM,GAAGX,KAAK,CAACY,EAAE,CAACC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,GAAGb,KAAK,CAACY,EAAE,CAACC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;EACjH,MAAM4B,SAAS,GAAGzC,KAAK,CAACY,EAAE,CAACC,UAAU,CAACyB,QAAQ,EAAE,CAAC,CAAC;EAClD,MAAMI,UAA2C,GAAG;IAClDC,KAAK,EAAEH,UAAU,IAAI,MAAM;IAC3BI,IAAI,EAAEH,SAAS,IAAI;EACrB,CAAC;EAED,MAAMI,UAAU,GACdC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GACjB/C,KAAK,CAACgD,KAAK,GACXrB,OAAO,GACP3B,KAAK,CAACgD,KAAK,GACXhD,KAAK,CAACW,WAAW,KAAK,MAAM,GAC5BX,KAAK,CAACY,EAAE,CAACC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,GAC9Bb,KAAK,CAACY,EAAE,CAACC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;EAEpC,MAAMoC,eAAe,gBACnB,IAAA9E,WAAA,CAAA+E,GAAA,EAACpF,YAAA,CAAAwD,MAAQ;IACPI,GAAG,EAAEA,GAAI;IACTW,KAAK,EAAEV,OAAQ;IACfwB,aAAa,EAAEf,YAAa;IAC5BM,UAAU,EAAEA,UAAW;IACvBG,UAAU,EAAEA,UAAW;IACvBO,mBAAmB,EAAEV,UAAU,CAACC,KAAM;IACtCtB,QAAQ,EAAEA,QAAS;IACnBQ,KAAK,EAAEK,EAAE,CAACD,MAAM,CAACf,MAAM,EAAEW,KAAK;EAAE,CACjC,CACF;EAED,IAAI,CAACtB,KAAK,EAAE;IACV,OAAO0C,eAAe;EACxB;EAEA,oBACE,IAAA9E,WAAA,CAAAkF,IAAA,EAACtF,MAAA,CAAAuF,OAAO;IAACzB,KAAK,EAAEK,EAAE,CAACD,MAAM,CAAC7B,IAAI,EAAE0B,YAAY,CAAE;IAAAyB,QAAA,GAC3CtD,aAAa,KAAK,MAAM,iBAAI,IAAA9B,WAAA,CAAA+E,GAAA,EAAClF,OAAA,CAAAwF,IAAI;MAAC3B,KAAK,EAAEI,MAAM,CAAC1B,KAAM;MAAAgD,QAAA,EAAEhD;IAAK,CAAO,CAAC,EACrE0C,eAAe,EACfhD,aAAa,KAAK,OAAO,iBAAI,IAAA9B,WAAA,CAAA+E,GAAA,EAAClF,OAAA,CAAAwF,IAAI;MAAC3B,KAAK,EAAEI,MAAM,CAAC1B,KAAM;MAAAgD,QAAA,EAAEhD;IAAK,CAAO,CAAC;EAAA,CAChE,CAAC;AAEd,CAAC,CAAC;AAEFe,MAAM,CAACmC,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Table = void 0;
|
|
6
|
+
exports._Table = exports.Table = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _index = require("../BoxView/index.js");
|
|
@@ -11,203 +11,159 @@ var _index2 = require("../Text/index.js");
|
|
|
11
11
|
var _themeProvider = require("../../theme/theme-provider.js");
|
|
12
12
|
var _index3 = require("../../theme/index.js");
|
|
13
13
|
var _rem = require("../../theme/utils/rem.js");
|
|
14
|
-
var _withTextWrapper = require("../../theme/utils/withTextWrapper.js");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
-
const
|
|
18
|
-
const useTableContext = () => {
|
|
19
|
-
const context = (0, _react.useContext)(TableContext);
|
|
20
|
-
return context;
|
|
21
|
-
};
|
|
22
|
-
const fontSizes = {
|
|
23
|
-
xs: (0, _rem.rem)(10),
|
|
24
|
-
sm: (0, _rem.rem)(12),
|
|
25
|
-
md: (0, _rem.rem)(14),
|
|
26
|
-
lg: (0, _rem.rem)(16),
|
|
27
|
-
xl: (0, _rem.rem)(18)
|
|
28
|
-
};
|
|
29
|
-
const useTableStyles = (0, _index3.createStyles)((theme, {
|
|
30
|
-
withBorder,
|
|
31
|
-
captionSide,
|
|
32
|
-
flex,
|
|
33
|
-
flexGrow,
|
|
34
|
-
flexShrink,
|
|
35
|
-
flexBasis
|
|
36
|
-
}) => ({
|
|
37
|
-
wrapper: {
|
|
38
|
-
// Apply flex properties to allow table to expand in container
|
|
39
|
-
...(flex !== undefined && {
|
|
40
|
-
flex
|
|
41
|
-
}),
|
|
42
|
-
...(flexGrow !== undefined && {
|
|
43
|
-
flexGrow
|
|
44
|
-
}),
|
|
45
|
-
...(flexShrink !== undefined && {
|
|
46
|
-
flexShrink
|
|
47
|
-
}),
|
|
48
|
-
...(flexBasis !== undefined && {
|
|
49
|
-
flexBasis
|
|
50
|
-
})
|
|
51
|
-
},
|
|
52
|
-
root: {
|
|
53
|
-
width: '100%',
|
|
54
|
-
borderCollapse: 'collapse',
|
|
55
|
-
...(withBorder && {
|
|
56
|
-
borderWidth: 1,
|
|
57
|
-
borderColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3]
|
|
58
|
-
})
|
|
59
|
-
},
|
|
60
|
-
caption: {
|
|
61
|
-
fontSize: theme.fontSizes.sm,
|
|
62
|
-
color: theme.colorScheme === 'dark' ? theme.colors.dark?.[2] : theme.colors.gray?.[6],
|
|
63
|
-
paddingVertical: theme.spacing.xs,
|
|
64
|
-
textAlign: 'center',
|
|
65
|
-
...(captionSide === 'bottom' && {
|
|
66
|
-
order: 1
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
}));
|
|
70
|
-
const useTableHeadStyles = (0, _index3.createStyles)(theme => ({
|
|
71
|
-
thead: {
|
|
72
|
-
borderBottomWidth: 1,
|
|
73
|
-
borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3]
|
|
74
|
-
}
|
|
75
|
-
}));
|
|
76
|
-
const useTableRowStyles = (0, _index3.createStyles)((theme, {
|
|
77
|
-
striped,
|
|
78
|
-
isEven
|
|
79
|
-
}) => ({
|
|
80
|
-
tr: {
|
|
81
|
-
flexDirection: 'row',
|
|
82
|
-
borderBottomWidth: 1,
|
|
83
|
-
borderBottomColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[4] : theme.colors.gray?.[3],
|
|
84
|
-
...(striped && isEven && {
|
|
85
|
-
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark?.[6] : theme.colors.gray?.[0]
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
}));
|
|
89
|
-
const useTableCellStyles = (0, _index3.createStyles)((theme, {
|
|
90
|
-
fontSize,
|
|
91
|
-
verticalSpacing,
|
|
16
|
+
const useStyles = (0, _index3.createStyles)((theme, {
|
|
92
17
|
horizontalSpacing,
|
|
18
|
+
verticalSpacing,
|
|
19
|
+
fontSize,
|
|
20
|
+
withBorder,
|
|
93
21
|
withColumnBorders,
|
|
94
|
-
|
|
95
|
-
width
|
|
22
|
+
striped
|
|
96
23
|
}) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
return
|
|
24
|
+
const borderColor = theme.colorScheme === 'dark' ? (theme.colors.dark || [])[4] : (theme.colors.gray || [])[3];
|
|
25
|
+
const getSpacing = size => {
|
|
26
|
+
if (typeof size === 'number') return (0, _rem.rem)(size);
|
|
27
|
+
return theme.spacing[size] || theme.spacing.xs;
|
|
100
28
|
};
|
|
101
|
-
const
|
|
102
|
-
if (typeof
|
|
103
|
-
return theme.
|
|
29
|
+
const getFontSize = size => {
|
|
30
|
+
if (typeof size === 'number') return size;
|
|
31
|
+
return theme.fontSizes[size] || theme.fontSizes.sm;
|
|
104
32
|
};
|
|
33
|
+
const hPadding = getSpacing(horizontalSpacing);
|
|
34
|
+
const vPadding = getSpacing(verticalSpacing);
|
|
35
|
+
const cellFontSize = getFontSize(fontSize);
|
|
105
36
|
return {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
37
|
+
root: {
|
|
38
|
+
width: '100%',
|
|
39
|
+
backgroundColor: 'transparent'
|
|
40
|
+
},
|
|
41
|
+
scrollView: {
|
|
42
|
+
width: '100%'
|
|
43
|
+
},
|
|
44
|
+
container: {
|
|
45
|
+
flexDirection: 'column',
|
|
46
|
+
borderWidth: withBorder ? 1 : 0,
|
|
47
|
+
borderColor: withBorder ? borderColor : 'transparent',
|
|
48
|
+
borderStyle: 'solid'
|
|
49
|
+
},
|
|
50
|
+
caption: {
|
|
51
|
+
paddingHorizontal: hPadding,
|
|
52
|
+
paddingVertical: theme.spacing.xs,
|
|
53
|
+
fontSize: theme.fontSizes.sm,
|
|
54
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[2] : (theme.colors.gray || [])[6],
|
|
55
|
+
textAlign: 'left'
|
|
56
|
+
},
|
|
57
|
+
captionTop: {
|
|
58
|
+
marginBottom: 0
|
|
59
|
+
},
|
|
60
|
+
captionBottom: {
|
|
61
|
+
marginTop: 0
|
|
62
|
+
},
|
|
63
|
+
thead: {
|
|
64
|
+
flexDirection: 'column'
|
|
65
|
+
},
|
|
66
|
+
tbody: {
|
|
67
|
+
flexDirection: 'column'
|
|
68
|
+
},
|
|
69
|
+
tfoot: {
|
|
70
|
+
flexDirection: 'column'
|
|
71
|
+
},
|
|
72
|
+
tr: {
|
|
73
|
+
flexDirection: 'row'
|
|
74
|
+
},
|
|
75
|
+
th: {
|
|
76
|
+
flex: 1,
|
|
77
|
+
paddingHorizontal: hPadding,
|
|
78
|
+
paddingVertical: vPadding,
|
|
79
|
+
borderBottomWidth: 1,
|
|
80
|
+
borderBottomColor: borderColor,
|
|
81
|
+
borderBottomStyle: 'solid',
|
|
82
|
+
borderRightWidth: withColumnBorders ? 1 : 0,
|
|
83
|
+
borderRightColor: withColumnBorders ? borderColor : 'transparent',
|
|
84
|
+
borderRightStyle: 'solid',
|
|
85
|
+
justifyContent: 'center'
|
|
86
|
+
},
|
|
87
|
+
thText: {
|
|
88
|
+
fontWeight: 'bold',
|
|
89
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : (theme.colors.gray || [])[7],
|
|
90
|
+
fontSize: cellFontSize
|
|
91
|
+
},
|
|
92
|
+
td: {
|
|
93
|
+
flex: 1,
|
|
94
|
+
paddingHorizontal: hPadding,
|
|
95
|
+
paddingVertical: vPadding,
|
|
96
|
+
borderTopWidth: 1,
|
|
97
|
+
borderTopColor: borderColor,
|
|
98
|
+
borderTopStyle: 'solid',
|
|
99
|
+
borderRightWidth: withColumnBorders ? 1 : 0,
|
|
100
|
+
borderRightColor: withColumnBorders ? borderColor : 'transparent',
|
|
101
|
+
borderRightStyle: 'solid',
|
|
102
|
+
justifyContent: 'center'
|
|
103
|
+
},
|
|
104
|
+
tdText: {
|
|
105
|
+
color: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[0] : theme.black,
|
|
106
|
+
fontSize: cellFontSize
|
|
107
|
+
},
|
|
108
|
+
firstBodyRow: {
|
|
109
|
+
borderTopWidth: 0
|
|
110
|
+
},
|
|
111
|
+
lastCell: {
|
|
112
|
+
borderRightWidth: 0
|
|
113
|
+
},
|
|
114
|
+
stripedRow: striped ? {
|
|
115
|
+
backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[6] : (theme.colors.gray || [])[0]
|
|
116
|
+
} : {}
|
|
125
117
|
};
|
|
126
118
|
});
|
|
127
119
|
const defaultProps = {
|
|
128
|
-
horizontalSpacing: 'xs',
|
|
129
|
-
verticalSpacing: 'xs',
|
|
130
|
-
fontSize: 'sm',
|
|
131
120
|
striped: false,
|
|
132
121
|
highlightOnHover: false,
|
|
122
|
+
captionSide: 'top',
|
|
123
|
+
horizontalSpacing: 'xs',
|
|
124
|
+
fontSize: 'sm',
|
|
125
|
+
verticalSpacing: 7,
|
|
133
126
|
withBorder: false,
|
|
134
127
|
withColumnBorders: false,
|
|
135
|
-
|
|
128
|
+
horizontallyScrollable: false
|
|
136
129
|
};
|
|
137
|
-
|
|
130
|
+
|
|
131
|
+
// Context to share table configuration with child components
|
|
132
|
+
|
|
133
|
+
const TableContext = /*#__PURE__*/_react.default.createContext(null);
|
|
134
|
+
const useTableContext = () => {
|
|
135
|
+
const context = _react.default.useContext(TableContext);
|
|
136
|
+
if (!context) {
|
|
137
|
+
throw new Error('Table compound components must be used within Table');
|
|
138
|
+
}
|
|
139
|
+
return context;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
// Table Caption Component
|
|
143
|
+
const TableCaption = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
138
144
|
const {
|
|
139
145
|
children,
|
|
140
|
-
horizontalSpacing,
|
|
141
|
-
verticalSpacing,
|
|
142
|
-
fontSize,
|
|
143
|
-
striped,
|
|
144
|
-
highlightOnHover: _highlightOnHover,
|
|
145
|
-
withBorder,
|
|
146
|
-
withColumnBorders,
|
|
147
|
-
captionSide,
|
|
148
|
-
caption,
|
|
149
|
-
flex,
|
|
150
|
-
flexGrow,
|
|
151
|
-
flexShrink,
|
|
152
|
-
flexBasis,
|
|
153
146
|
style,
|
|
154
147
|
...others
|
|
155
|
-
} =
|
|
148
|
+
} = props;
|
|
156
149
|
const {
|
|
157
150
|
styles,
|
|
158
151
|
sx
|
|
159
|
-
} =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
// Track column widths to ensure alignment across rows
|
|
171
|
-
const [columnWidths, setColumnWidths] = (0, _react.useState)([]);
|
|
172
|
-
const onCellLayout = (0, _react.useCallback)((columnIndex, width) => {
|
|
173
|
-
setColumnWidths(prevWidths => {
|
|
174
|
-
const newWidths = [...prevWidths];
|
|
175
|
-
// Store the maximum width for each column to ensure all cells in that column have the same width
|
|
176
|
-
if (!newWidths[columnIndex] || width > newWidths[columnIndex]) {
|
|
177
|
-
newWidths[columnIndex] = width;
|
|
178
|
-
}
|
|
179
|
-
return newWidths;
|
|
180
|
-
});
|
|
181
|
-
}, []);
|
|
182
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TableContext.Provider, {
|
|
183
|
-
value: {
|
|
184
|
-
striped: striped,
|
|
185
|
-
highlightOnHover: _highlightOnHover,
|
|
186
|
-
withBorder: withBorder,
|
|
187
|
-
withColumnBorders: withColumnBorders,
|
|
188
|
-
fontSize: fontSize,
|
|
189
|
-
verticalSpacing: verticalSpacing,
|
|
190
|
-
horizontalSpacing: horizontalSpacing,
|
|
191
|
-
columnWidths,
|
|
192
|
-
onCellLayout
|
|
193
|
-
},
|
|
194
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
195
|
-
horizontal: true,
|
|
196
|
-
style: styles.wrapper,
|
|
197
|
-
showsHorizontalScrollIndicator: true,
|
|
198
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
|
|
199
|
-
ref: ref,
|
|
200
|
-
style: sx(styles.root, style),
|
|
201
|
-
...others,
|
|
202
|
-
children: [caption && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
203
|
-
style: styles.caption,
|
|
204
|
-
children: caption
|
|
205
|
-
}), children]
|
|
206
|
-
})
|
|
207
|
-
})
|
|
152
|
+
} = useTableContext();
|
|
153
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
154
|
+
ref: ref,
|
|
155
|
+
style: sx(styles.caption, style),
|
|
156
|
+
...others,
|
|
157
|
+
children: typeof children === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
158
|
+
style: styles.caption,
|
|
159
|
+
children: children
|
|
160
|
+
}) : children
|
|
208
161
|
});
|
|
209
162
|
});
|
|
210
|
-
|
|
163
|
+
TableCaption.displayName = 'Table.Caption';
|
|
164
|
+
|
|
165
|
+
// Table Head Component
|
|
166
|
+
const THead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
211
167
|
const {
|
|
212
168
|
children,
|
|
213
169
|
style,
|
|
@@ -216,9 +172,7 @@ const Thead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
216
172
|
const {
|
|
217
173
|
styles,
|
|
218
174
|
sx
|
|
219
|
-
} =
|
|
220
|
-
name: 'Thead'
|
|
221
|
-
});
|
|
175
|
+
} = useTableContext();
|
|
222
176
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
223
177
|
ref: ref,
|
|
224
178
|
style: sx(styles.thead, style),
|
|
@@ -226,168 +180,198 @@ const Thead = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
226
180
|
children: children
|
|
227
181
|
});
|
|
228
182
|
});
|
|
229
|
-
|
|
183
|
+
THead.displayName = 'Table.THead';
|
|
184
|
+
|
|
185
|
+
// Table Body Component
|
|
186
|
+
const TBody = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
230
187
|
const {
|
|
231
188
|
children,
|
|
232
189
|
style,
|
|
233
190
|
...others
|
|
234
191
|
} = props;
|
|
235
|
-
const
|
|
192
|
+
const {
|
|
193
|
+
styles,
|
|
194
|
+
sx,
|
|
195
|
+
striped
|
|
196
|
+
} = useTableContext();
|
|
197
|
+
|
|
198
|
+
// Process children to add row styling
|
|
199
|
+
const processedChildren = _react.default.Children.map(children, (child, index) => {
|
|
200
|
+
if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
|
|
201
|
+
const isOddRow = index % 2 === 1;
|
|
202
|
+
const childProps = child.props;
|
|
203
|
+
const rowStyle = [childProps.style, striped && isOddRow && styles.stripedRow].filter(Boolean);
|
|
204
|
+
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
205
|
+
'style': rowStyle.length > 0 ? rowStyle : childProps.style,
|
|
206
|
+
'data-index': index,
|
|
207
|
+
'data-first': index === 0
|
|
208
|
+
});
|
|
209
|
+
});
|
|
236
210
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
237
211
|
ref: ref,
|
|
238
|
-
style: style,
|
|
212
|
+
style: sx(styles.tbody, style),
|
|
239
213
|
...others,
|
|
240
|
-
children:
|
|
241
|
-
if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
|
|
242
|
-
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
243
|
-
key: index,
|
|
244
|
-
__index: index
|
|
245
|
-
});
|
|
246
|
-
})
|
|
214
|
+
children: processedChildren
|
|
247
215
|
});
|
|
248
216
|
});
|
|
249
|
-
|
|
217
|
+
TBody.displayName = 'Table.TBody';
|
|
218
|
+
|
|
219
|
+
// Table Footer Component
|
|
220
|
+
const TFoot = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
250
221
|
const {
|
|
251
222
|
children,
|
|
252
223
|
style,
|
|
253
224
|
...others
|
|
254
225
|
} = props;
|
|
226
|
+
const {
|
|
227
|
+
styles,
|
|
228
|
+
sx
|
|
229
|
+
} = useTableContext();
|
|
255
230
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
256
231
|
ref: ref,
|
|
257
|
-
style: style,
|
|
232
|
+
style: sx(styles.tfoot, style),
|
|
258
233
|
...others,
|
|
259
234
|
children: children
|
|
260
235
|
});
|
|
261
236
|
});
|
|
237
|
+
TFoot.displayName = 'Table.TFoot';
|
|
238
|
+
|
|
239
|
+
// Table Row Component
|
|
262
240
|
const Tr = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
263
241
|
const {
|
|
264
242
|
children,
|
|
265
243
|
style,
|
|
266
|
-
__index,
|
|
267
244
|
...others
|
|
268
245
|
} = props;
|
|
269
|
-
const context = useTableContext();
|
|
270
246
|
const {
|
|
271
247
|
styles,
|
|
272
248
|
sx
|
|
273
|
-
} =
|
|
274
|
-
striped: context?.striped ?? false,
|
|
275
|
-
highlightOnHover: context?.highlightOnHover ?? false,
|
|
276
|
-
isEven: (__index ?? 0) % 2 === 0
|
|
277
|
-
}, {
|
|
278
|
-
name: 'Tr'
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
// Add column indices to children (Th and Td components)
|
|
282
|
-
const childrenArray = _react.default.Children.toArray(children);
|
|
283
|
-
const childrenWithColumnIndex = childrenArray.map((child, index) => {
|
|
284
|
-
if (! /*#__PURE__*/_react.default.isValidElement(child)) return child;
|
|
285
|
-
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
286
|
-
__columnIndex: index
|
|
287
|
-
});
|
|
288
|
-
});
|
|
249
|
+
} = useTableContext();
|
|
289
250
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
290
251
|
ref: ref,
|
|
291
252
|
style: sx(styles.tr, style),
|
|
292
253
|
...others,
|
|
293
|
-
children:
|
|
254
|
+
children: children
|
|
294
255
|
});
|
|
295
256
|
});
|
|
257
|
+
Tr.displayName = 'Table.Tr';
|
|
258
|
+
|
|
259
|
+
// Table Header Cell Component
|
|
296
260
|
const Th = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
297
261
|
const {
|
|
298
262
|
children,
|
|
299
263
|
style,
|
|
300
|
-
|
|
301
|
-
__columnIndex,
|
|
264
|
+
colSpan,
|
|
302
265
|
...others
|
|
303
266
|
} = props;
|
|
304
|
-
const context = useTableContext();
|
|
305
|
-
const columnIndex = __columnIndex ?? 0;
|
|
306
|
-
const columnWidth = context?.columnWidths?.[columnIndex];
|
|
307
267
|
const {
|
|
308
268
|
styles,
|
|
309
269
|
sx
|
|
310
|
-
} =
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
withColumnBorders: context?.withColumnBorders ?? false,
|
|
315
|
-
isHeader: true,
|
|
316
|
-
width: columnWidth
|
|
317
|
-
}, {
|
|
318
|
-
name: 'Th'
|
|
319
|
-
});
|
|
320
|
-
const handleLayout = (0, _react.useCallback)(event => {
|
|
321
|
-
const {
|
|
322
|
-
width
|
|
323
|
-
} = event.nativeEvent.layout;
|
|
324
|
-
if (context?.onCellLayout && width > 0) {
|
|
325
|
-
context.onCellLayout(columnIndex, width);
|
|
326
|
-
}
|
|
327
|
-
}, [context, columnIndex]);
|
|
270
|
+
} = useTableContext();
|
|
271
|
+
const cellStyle = [styles.th, colSpan && {
|
|
272
|
+
flex: colSpan
|
|
273
|
+
}, style].filter(Boolean);
|
|
328
274
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
329
275
|
ref: ref,
|
|
330
|
-
style: sx(
|
|
331
|
-
onLayout: handleLayout,
|
|
276
|
+
style: sx(...cellStyle),
|
|
332
277
|
...others,
|
|
333
|
-
children: (0,
|
|
278
|
+
children: typeof children === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
279
|
+
style: styles.thText,
|
|
280
|
+
children: children
|
|
281
|
+
}) : children
|
|
334
282
|
});
|
|
335
283
|
});
|
|
284
|
+
Th.displayName = 'Table.Th';
|
|
285
|
+
|
|
286
|
+
// Table Data Cell Component
|
|
336
287
|
const Td = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
337
288
|
const {
|
|
338
289
|
children,
|
|
339
290
|
style,
|
|
340
|
-
|
|
341
|
-
__columnIndex,
|
|
291
|
+
colSpan,
|
|
342
292
|
...others
|
|
343
293
|
} = props;
|
|
344
|
-
const context = useTableContext();
|
|
345
|
-
const columnIndex = __columnIndex ?? 0;
|
|
346
|
-
const columnWidth = context?.columnWidths?.[columnIndex];
|
|
347
294
|
const {
|
|
348
295
|
styles,
|
|
349
296
|
sx
|
|
350
|
-
} =
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
isHeader: false,
|
|
356
|
-
width: columnWidth
|
|
357
|
-
}, {
|
|
358
|
-
name: 'Td'
|
|
359
|
-
});
|
|
360
|
-
const handleLayout = (0, _react.useCallback)(event => {
|
|
361
|
-
const {
|
|
362
|
-
width
|
|
363
|
-
} = event.nativeEvent.layout;
|
|
364
|
-
if (context?.onCellLayout && width > 0) {
|
|
365
|
-
context.onCellLayout(columnIndex, width);
|
|
366
|
-
}
|
|
367
|
-
}, [context, columnIndex]);
|
|
297
|
+
} = useTableContext();
|
|
298
|
+
const isFirstRow = others['data-first'];
|
|
299
|
+
const cellStyle = [styles.td, isFirstRow && styles.firstBodyRow, colSpan && {
|
|
300
|
+
flex: colSpan
|
|
301
|
+
}, style].filter(Boolean);
|
|
368
302
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
369
303
|
ref: ref,
|
|
370
|
-
style: sx(
|
|
371
|
-
onLayout: handleLayout,
|
|
304
|
+
style: sx(...cellStyle),
|
|
372
305
|
...others,
|
|
373
|
-
children: (0,
|
|
306
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
307
|
+
style: styles.tdText,
|
|
308
|
+
children: children
|
|
309
|
+
})
|
|
374
310
|
});
|
|
375
311
|
});
|
|
376
|
-
Table.displayName = 'Table';
|
|
377
|
-
Thead.displayName = 'Table.Thead';
|
|
378
|
-
Tbody.displayName = 'Table.Tbody';
|
|
379
|
-
Tfoot.displayName = 'Table.Tfoot';
|
|
380
|
-
Tr.displayName = 'Table.Tr';
|
|
381
|
-
Th.displayName = 'Table.Th';
|
|
382
312
|
Td.displayName = 'Table.Td';
|
|
383
313
|
|
|
384
|
-
//
|
|
314
|
+
// Main Table Component
|
|
315
|
+
const _Table = exports._Table = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
316
|
+
const {
|
|
317
|
+
striped,
|
|
318
|
+
highlightOnHover,
|
|
319
|
+
captionSide,
|
|
320
|
+
horizontalSpacing,
|
|
321
|
+
verticalSpacing,
|
|
322
|
+
fontSize,
|
|
323
|
+
withBorder,
|
|
324
|
+
withColumnBorders,
|
|
325
|
+
children,
|
|
326
|
+
style,
|
|
327
|
+
horizontallyScrollable,
|
|
328
|
+
...others
|
|
329
|
+
} = (0, _themeProvider.useComponentDefaultProps)('Table', defaultProps, props);
|
|
330
|
+
const {
|
|
331
|
+
styles,
|
|
332
|
+
sx
|
|
333
|
+
} = useStyles({
|
|
334
|
+
horizontalSpacing,
|
|
335
|
+
verticalSpacing,
|
|
336
|
+
fontSize,
|
|
337
|
+
withBorder,
|
|
338
|
+
withColumnBorders,
|
|
339
|
+
striped
|
|
340
|
+
}, {
|
|
341
|
+
name: 'Table'
|
|
342
|
+
});
|
|
343
|
+
const contextValue = {
|
|
344
|
+
styles,
|
|
345
|
+
sx,
|
|
346
|
+
striped: striped || false,
|
|
347
|
+
highlightOnHover: highlightOnHover || false
|
|
348
|
+
};
|
|
349
|
+
const tableContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
|
|
350
|
+
ref: ref,
|
|
351
|
+
style: sx(styles.container, style),
|
|
352
|
+
...others,
|
|
353
|
+
children: [captionSide === 'top' && _react.default.Children.toArray(children).find(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName === 'Table.Caption'), _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName !== 'Table.Caption'), captionSide === 'bottom' && _react.default.Children.toArray(children).find(child => /*#__PURE__*/_react.default.isValidElement(child) && child.type.displayName === 'Table.Caption')]
|
|
354
|
+
});
|
|
355
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TableContext.Provider, {
|
|
356
|
+
value: contextValue,
|
|
357
|
+
children: horizontallyScrollable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
358
|
+
horizontal: true,
|
|
359
|
+
style: styles.scrollView,
|
|
360
|
+
showsHorizontalScrollIndicator: true,
|
|
361
|
+
children: tableContent
|
|
362
|
+
}) : tableContent
|
|
363
|
+
});
|
|
364
|
+
});
|
|
365
|
+
_Table.displayName = 'Table';
|
|
385
366
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
367
|
+
// Attach compound components
|
|
368
|
+
const Table = exports.Table = Object.assign(_Table, {
|
|
369
|
+
Caption: TableCaption,
|
|
370
|
+
THead,
|
|
371
|
+
TBody,
|
|
372
|
+
TFoot,
|
|
373
|
+
Tr,
|
|
374
|
+
Th,
|
|
375
|
+
Td
|
|
376
|
+
});
|
|
393
377
|
//# sourceMappingURL=index.js.map
|