react-native-mantine 0.5.0 → 0.7.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 +1 -358
- package/lib/commonjs/components/Anchor/index.js +6 -1
- package/lib/commonjs/components/Anchor/index.js.map +1 -1
- package/lib/commonjs/components/Badge/index.js +12 -13
- package/lib/commonjs/components/Badge/index.js.map +1 -1
- package/lib/commonjs/components/Blockquote/index.js +8 -12
- package/lib/commonjs/components/Blockquote/index.js.map +1 -1
- package/lib/commonjs/components/Button/Button.styles.js +4 -4
- package/lib/commonjs/components/Button/Button.styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +17 -17
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +8 -9
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/CloseButton/index.js +5 -30
- package/lib/commonjs/components/CloseButton/index.js.map +1 -1
- package/lib/commonjs/components/Code/index.js +13 -8
- package/lib/commonjs/components/Code/index.js.map +1 -1
- package/lib/commonjs/components/Collapse/index.js +10 -2
- package/lib/commonjs/components/Collapse/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +51 -8
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Drawer/index.js +4 -13
- package/lib/commonjs/components/Drawer/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +53 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/Kbd/index.js +7 -8
- package/lib/commonjs/components/Kbd/index.js.map +1 -1
- package/lib/commonjs/components/List/index.js +6 -5
- package/lib/commonjs/components/List/index.js.map +1 -1
- package/lib/commonjs/components/Mark/index.js +4 -0
- package/lib/commonjs/components/Mark/index.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +20 -22
- package/lib/commonjs/components/Menu/index.js.map +1 -1
- package/lib/commonjs/components/Modal/index.js +10 -16
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/NavLink/index.js +7 -11
- package/lib/commonjs/components/NavLink/index.js.map +1 -1
- package/lib/commonjs/components/Notification/index.js +5 -8
- package/lib/commonjs/components/Notification/index.js.map +1 -1
- package/lib/commonjs/components/NumberInput/index.js +2 -1
- package/lib/commonjs/components/NumberInput/index.js.map +1 -1
- package/lib/commonjs/components/PasswordInput/index.js +5 -6
- package/lib/commonjs/components/PasswordInput/index.js.map +1 -1
- package/lib/commonjs/components/PinInput/index.js +7 -2
- package/lib/commonjs/components/PinInput/index.js.map +1 -1
- package/lib/commonjs/components/Popover/index.js +8 -7
- package/lib/commonjs/components/Popover/index.js.map +1 -1
- package/lib/commonjs/components/RingProgress/index.js +49 -7
- package/lib/commonjs/components/RingProgress/index.js.map +1 -1
- package/lib/commonjs/components/SegmentedControl/index.js +7 -4
- package/lib/commonjs/components/SegmentedControl/index.js.map +1 -1
- package/lib/commonjs/components/Slider/index.js +28 -3
- package/lib/commonjs/components/Slider/index.js.map +1 -1
- package/lib/commonjs/components/Stepper/index.js.map +1 -1
- package/lib/commonjs/components/Table/Table.example.js +131 -0
- package/lib/commonjs/components/Table/Table.example.js.map +1 -0
- package/lib/commonjs/components/Table/index.js +85 -29
- package/lib/commonjs/components/Table/index.js.map +1 -1
- package/lib/commonjs/components/TextInput/index.js +2 -2
- package/lib/commonjs/components/TextInput/index.js.map +1 -1
- package/lib/commonjs/components/Timeline/index.js +12 -5
- package/lib/commonjs/components/Timeline/index.js.map +1 -1
- package/lib/commonjs/components/Title/index.js +4 -0
- package/lib/commonjs/components/Title/index.js.map +1 -1
- package/lib/commonjs/components/Tooltip/index.js +12 -11
- package/lib/commonjs/components/Tooltip/index.js.map +1 -1
- package/lib/commonjs/components/TransferList/index.js +3 -8
- package/lib/commonjs/components/TransferList/index.js.map +1 -1
- package/lib/commonjs/components/Transition/index.js +4 -0
- package/lib/commonjs/components/Transition/index.js.map +1 -1
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js +4 -0
- package/lib/commonjs/components/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/commonjs/components/index.js +22 -22
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/theme/functions/attach-functions.js +3 -0
- package/lib/commonjs/theme/functions/attach-functions.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/helpers.js +12 -1
- package/lib/commonjs/theme/functions/fns/helpers.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/index.js +4 -0
- package/lib/commonjs/theme/functions/fns/index.js.map +1 -1
- package/lib/commonjs/theme/functions/fns/rgba.js +50 -0
- package/lib/commonjs/theme/functions/fns/rgba.js.map +1 -0
- package/lib/commonjs/theme/functions/fns/size.js +19 -0
- package/lib/commonjs/theme/functions/fns/size.js.map +1 -0
- package/lib/commonjs/theme/utils/index.js +26 -0
- package/lib/commonjs/theme/utils/index.js.map +1 -0
- package/lib/commonjs/theme/utils/withTextWrapper.js +49 -0
- package/lib/commonjs/theme/utils/withTextWrapper.js.map +1 -0
- package/lib/module/components/Anchor/index.js +6 -1
- package/lib/module/components/Anchor/index.js.map +1 -1
- package/lib/module/components/Badge/index.js +5 -6
- package/lib/module/components/Badge/index.js.map +1 -1
- package/lib/module/components/Blockquote/index.js +6 -10
- package/lib/module/components/Blockquote/index.js.map +1 -1
- package/lib/module/components/Button/Button.styles.js +4 -4
- package/lib/module/components/Button/Button.styles.js.map +1 -1
- package/lib/module/components/Button/index.js +17 -17
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Chip/index.js +5 -6
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/CloseButton/index.js +6 -31
- package/lib/module/components/CloseButton/index.js.map +1 -1
- package/lib/module/components/Code/index.js +13 -8
- package/lib/module/components/Code/index.js.map +1 -1
- package/lib/module/components/Collapse/index.js +10 -2
- package/lib/module/components/Collapse/index.js.map +1 -1
- package/lib/module/components/Dialog/index.js +52 -9
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Drawer/index.js +4 -13
- package/lib/module/components/Drawer/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +48 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/Kbd/index.js +5 -6
- package/lib/module/components/Kbd/index.js.map +1 -1
- package/lib/module/components/List/index.js +6 -5
- package/lib/module/components/List/index.js.map +1 -1
- package/lib/module/components/Mark/index.js +4 -0
- package/lib/module/components/Mark/index.js.map +1 -1
- package/lib/module/components/Menu/index.js +16 -18
- package/lib/module/components/Menu/index.js.map +1 -1
- package/lib/module/components/Modal/index.js +10 -16
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/NavLink/index.js +5 -9
- package/lib/module/components/NavLink/index.js.map +1 -1
- package/lib/module/components/Notification/index.js +5 -8
- package/lib/module/components/Notification/index.js.map +1 -1
- package/lib/module/components/NumberInput/index.js +2 -1
- package/lib/module/components/NumberInput/index.js.map +1 -1
- package/lib/module/components/PasswordInput/index.js +5 -6
- package/lib/module/components/PasswordInput/index.js.map +1 -1
- package/lib/module/components/PinInput/index.js +7 -2
- package/lib/module/components/PinInput/index.js.map +1 -1
- package/lib/module/components/Popover/index.js +9 -8
- package/lib/module/components/Popover/index.js.map +1 -1
- package/lib/module/components/RingProgress/index.js +51 -9
- package/lib/module/components/RingProgress/index.js.map +1 -1
- package/lib/module/components/SegmentedControl/index.js +7 -4
- package/lib/module/components/SegmentedControl/index.js.map +1 -1
- package/lib/module/components/Slider/index.js +28 -3
- package/lib/module/components/Slider/index.js.map +1 -1
- package/lib/module/components/Stepper/index.js.map +1 -1
- package/lib/module/components/Table/Table.example.js +128 -0
- package/lib/module/components/Table/Table.example.js.map +1 -0
- package/lib/module/components/Table/index.js +86 -29
- package/lib/module/components/Table/index.js.map +1 -1
- package/lib/module/components/TextInput/index.js +2 -2
- package/lib/module/components/TextInput/index.js.map +1 -1
- package/lib/module/components/Timeline/index.js +12 -5
- package/lib/module/components/Timeline/index.js.map +1 -1
- package/lib/module/components/Title/index.js +4 -0
- package/lib/module/components/Title/index.js.map +1 -1
- package/lib/module/components/Tooltip/index.js +11 -10
- package/lib/module/components/Tooltip/index.js.map +1 -1
- package/lib/module/components/TransferList/index.js +4 -9
- package/lib/module/components/TransferList/index.js.map +1 -1
- package/lib/module/components/Transition/index.js +5 -1
- package/lib/module/components/Transition/index.js.map +1 -1
- package/lib/module/components/UnstyledButton/UnstyledButton.js +4 -0
- package/lib/module/components/UnstyledButton/UnstyledButton.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/theme/functions/attach-functions.js +3 -0
- package/lib/module/theme/functions/attach-functions.js.map +1 -1
- package/lib/module/theme/functions/fns/helpers.js +10 -0
- package/lib/module/theme/functions/fns/helpers.js.map +1 -1
- package/lib/module/theme/functions/fns/index.js +4 -0
- package/lib/module/theme/functions/fns/index.js.map +1 -1
- package/lib/module/theme/functions/fns/rgba.js +46 -0
- package/lib/module/theme/functions/fns/rgba.js.map +1 -0
- package/lib/module/theme/functions/fns/size.js +15 -0
- package/lib/module/theme/functions/fns/size.js.map +1 -0
- package/lib/module/theme/utils/index.js +5 -0
- package/lib/module/theme/utils/index.js.map +1 -0
- package/lib/module/theme/utils/withTextWrapper.js +45 -0
- package/lib/module/theme/utils/withTextWrapper.js.map +1 -0
- package/lib/typescript/commonjs/src/components/Anchor/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Anchor/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Badge/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Badge/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Blockquote/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Chip/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CloseButton/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Code/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Collapse/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Drawer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Icon/index.d.ts +26 -0
- package/lib/typescript/commonjs/src/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Kbd/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Kbd/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/List/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/List/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Mark/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Mark/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NavLink/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/NavLink/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/NumberInput/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/Popover/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/SegmentedControl/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Slider/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stepper/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/Table/Table.example.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Table/index.d.ts +23 -9
- package/lib/typescript/commonjs/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TextInput/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 +2 -1
- 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/Transition/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/UnstyledButton/UnstyledButton.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/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/helpers.d.ts +7 -0
- 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 +7 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts +8 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/rgba.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts +6 -0
- package/lib/typescript/commonjs/src/theme/functions/fns/size.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/utils/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/theme/utils/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts +41 -0
- package/lib/typescript/commonjs/src/theme/utils/withTextWrapper.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Anchor/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Anchor/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Badge/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Badge/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Blockquote/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Blockquote/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Chip/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CloseButton/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Code/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Code/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Collapse/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/index.d.ts +2 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Drawer/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Icon/index.d.ts +26 -0
- package/lib/typescript/module/src/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Kbd/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Kbd/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/List/index.d.ts +2 -1
- package/lib/typescript/module/src/components/List/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Mark/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Mark/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/index.d.ts +3 -2
- package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Modal/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NavLink/index.d.ts +2 -1
- package/lib/typescript/module/src/components/NavLink/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Notification/index.d.ts +2 -1
- package/lib/typescript/module/src/components/Notification/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/NumberInput/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/Popover/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/SegmentedControl/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Slider/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stepper/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Table/Table.example.d.ts +3 -0
- package/lib/typescript/module/src/components/Table/Table.example.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Table/index.d.ts +23 -9
- package/lib/typescript/module/src/components/Table/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TextInput/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 +2 -1
- 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/Transition/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.d.ts +2 -0
- package/lib/typescript/module/src/components/UnstyledButton/UnstyledButton.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/theme/functions/attach-functions.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/helpers.d.ts +7 -0
- 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 +7 -0
- package/lib/typescript/module/src/theme/functions/fns/index.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts +8 -0
- package/lib/typescript/module/src/theme/functions/fns/rgba.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts +6 -0
- package/lib/typescript/module/src/theme/functions/fns/size.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/utils/index.d.ts +3 -0
- package/lib/typescript/module/src/theme/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts +41 -0
- package/lib/typescript/module/src/theme/utils/withTextWrapper.d.ts.map +1 -0
- package/package.json +12 -9
- package/src/components/Anchor/index.tsx +8 -2
- package/src/components/Badge/index.tsx +5 -3
- package/src/components/Blockquote/index.tsx +6 -5
- package/src/components/Button/Button.styles.ts +3 -3
- package/src/components/Button/index.tsx +57 -63
- package/src/components/Chip/index.tsx +8 -6
- package/src/components/CloseButton/index.tsx +2 -23
- package/src/components/Code/index.tsx +19 -14
- package/src/components/Collapse/index.tsx +11 -2
- package/src/components/Dialog/index.tsx +54 -9
- package/src/components/Drawer/index.tsx +7 -13
- package/src/components/Icon/index.tsx +74 -0
- package/src/components/Kbd/index.tsx +5 -4
- package/src/components/List/index.tsx +8 -9
- package/src/components/Mark/index.tsx +7 -2
- package/src/components/Menu/index.tsx +21 -17
- package/src/components/Modal/index.tsx +11 -16
- package/src/components/NavLink/index.tsx +6 -4
- package/src/components/Notification/index.tsx +6 -7
- package/src/components/NumberInput/index.tsx +57 -15
- package/src/components/PasswordInput/index.tsx +2 -2
- package/src/components/PinInput/index.tsx +24 -9
- package/src/components/Popover/index.tsx +13 -10
- package/src/components/RingProgress/index.tsx +51 -8
- package/src/components/SegmentedControl/index.tsx +6 -4
- package/src/components/Slider/index.tsx +14 -3
- package/src/components/Stepper/index.tsx +5 -4
- package/src/components/Table/Table.example.tsx +85 -0
- package/src/components/Table/index.tsx +162 -43
- package/src/components/TextInput/index.tsx +93 -66
- package/src/components/Timeline/index.tsx +19 -12
- package/src/components/Title/index.tsx +7 -2
- package/src/components/Tooltip/index.tsx +13 -10
- package/src/components/TransferList/index.tsx +1 -5
- package/src/components/Transition/index.tsx +14 -2
- package/src/components/UnstyledButton/UnstyledButton.tsx +5 -1
- package/src/components/index.tsx +1 -1
- package/src/theme/functions/attach-functions.ts +3 -0
- package/src/theme/functions/fns/helpers.ts +19 -7
- package/src/theme/functions/fns/index.ts +4 -0
- package/src/theme/functions/fns/rgba.ts +45 -0
- package/src/theme/functions/fns/size.ts +14 -0
- package/src/theme/utils/index.ts +2 -0
- package/src/theme/utils/withTextWrapper.tsx +58 -0
- package/lib/commonjs/components/Portal/index.js +0 -69
- package/lib/commonjs/components/Portal/index.js.map +0 -1
- package/lib/module/components/Portal/index.js +0 -62
- package/lib/module/components/Portal/index.js.map +0 -1
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts +0 -10
- package/lib/typescript/commonjs/src/components/Portal/index.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Portal/index.d.ts +0 -10
- package/lib/typescript/module/src/components/Portal/index.d.ts.map +0 -1
- package/src/components/Portal/index.tsx +0 -75
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# React Native Mantine
|
|
1
|
+
# React Native Mantine (WIP/WORK IN PROGRESS)
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
@@ -15,22 +15,6 @@ A comprehensive React Native component library inspired by [Mantine](https://man
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## Overview
|
|
19
|
-
|
|
20
|
-
**React Native Mantine** is a feature-rich component library that ports the popular Mantine UI library to React Native. With 70+ professionally designed components, a powerful theming system, and full TypeScript support, it provides everything you need to build stunning mobile applications.
|
|
21
|
-
|
|
22
|
-
### Key Features
|
|
23
|
-
|
|
24
|
-
- **70+ Components** - Comprehensive collection organized by functionality
|
|
25
|
-
- **Full TypeScript Support** - Built with TypeScript 5.2.2 with strict mode
|
|
26
|
-
- **Powerful Theme System** - Extensive customization with color schemes, variants, and sizes
|
|
27
|
-
- **Consistent API** - Familiar API patterns across all components
|
|
28
|
-
- **Production Ready** - Thoroughly tested and battle-tested components
|
|
29
|
-
- **Active Development** - Regular updates and improvements
|
|
30
|
-
- **Zero Dependencies** - Minimal peer dependencies (React Native, expo-linear-gradient, expo-font, expo-clipboard)
|
|
31
|
-
|
|
32
|
-
---
|
|
33
|
-
|
|
34
18
|
## Quick Start
|
|
35
19
|
|
|
36
20
|
### 🚀 Use the Template
|
|
@@ -107,347 +91,6 @@ function MyComponent() {
|
|
|
107
91
|
|
|
108
92
|
---
|
|
109
93
|
|
|
110
|
-
## Components
|
|
111
|
-
|
|
112
|
-
React Native Mantine includes a comprehensive set of components organized by category:
|
|
113
|
-
|
|
114
|
-
### Core Components (9)
|
|
115
|
-
|
|
116
|
-
Essential building blocks for any application.
|
|
117
|
-
|
|
118
|
-
- **BoxView** - Base component for layout and styling
|
|
119
|
-
- **Group** - Horizontal layout with spacing control
|
|
120
|
-
- **Stack** - Vertical layout with spacing control
|
|
121
|
-
- **Text** - Styled text component with variants
|
|
122
|
-
- **Button** - Customizable button with variants and states
|
|
123
|
-
- **UnstyledButton** - Minimal button without default styles
|
|
124
|
-
- **ActionIcon** - Icon button for compact actions
|
|
125
|
-
- **Input** - Base input component
|
|
126
|
-
- **Loader** - Loading indicator with variants
|
|
127
|
-
|
|
128
|
-
### Layout & Typography (8)
|
|
129
|
-
|
|
130
|
-
Components for structuring content and displaying text.
|
|
131
|
-
|
|
132
|
-
- **Center** - Center content horizontally and vertically
|
|
133
|
-
- **Container** - Responsive container with max-width
|
|
134
|
-
- **Flex** - Flexbox layout component
|
|
135
|
-
- **Space** - Add spacing between elements
|
|
136
|
-
- **Title** - Heading component (h1-h6)
|
|
137
|
-
- **Highlight** - Highlight text within strings
|
|
138
|
-
- **Mark** - Mark/highlight specific text
|
|
139
|
-
- **Code** - Display inline code
|
|
140
|
-
|
|
141
|
-
### Feedback & Forms (12)
|
|
142
|
-
|
|
143
|
-
Visual feedback and form input components.
|
|
144
|
-
|
|
145
|
-
- **Badge** - Display tags, status, or categories
|
|
146
|
-
- **Avatar** - User avatar with image or initials
|
|
147
|
-
- **Paper** - Container with shadow and border
|
|
148
|
-
- **Divider** - Horizontal or vertical divider
|
|
149
|
-
- **Progress** - Progress bar indicator
|
|
150
|
-
- **Skeleton** - Loading placeholder
|
|
151
|
-
- **TextInput** - Single-line text input
|
|
152
|
-
- **Textarea** - Multi-line text input
|
|
153
|
-
- **PasswordInput** - Password input with visibility toggle
|
|
154
|
-
- **Switch** - Toggle switch control
|
|
155
|
-
- **Checkbox** - Checkbox input
|
|
156
|
-
- **Radio** - Radio button input
|
|
157
|
-
|
|
158
|
-
### Overlays & Dialogs (13)
|
|
159
|
-
|
|
160
|
-
Interactive overlay components and modals.
|
|
161
|
-
|
|
162
|
-
- **Overlay** - Semi-transparent overlay
|
|
163
|
-
- **Portal** - Render components in a portal
|
|
164
|
-
- **Modal** - Modal dialog component
|
|
165
|
-
- **Drawer** - Slide-out drawer panel
|
|
166
|
-
- **Dialog** - Simple dialog for quick actions
|
|
167
|
-
- **Collapse** - Collapsible content container
|
|
168
|
-
- **Accordion** - Collapsible sections
|
|
169
|
-
- **Spoiler** - Hide content with show more/less
|
|
170
|
-
- **Notification** - Toast notification
|
|
171
|
-
- **NumberInput** - Numeric input with controls
|
|
172
|
-
- **PinInput** - PIN code input
|
|
173
|
-
- **Chip** - Selectable chip component
|
|
174
|
-
- **NativeSelect** - Native select dropdown
|
|
175
|
-
|
|
176
|
-
### Data Display (9)
|
|
177
|
-
|
|
178
|
-
Components for displaying data and interactive controls.
|
|
179
|
-
|
|
180
|
-
- **Slider** - Slider input for range selection
|
|
181
|
-
- **Rating** - Star rating component
|
|
182
|
-
- **Stepper** - Step-by-step progress indicator
|
|
183
|
-
- **SegmentedControl** - Segmented control toggle
|
|
184
|
-
- **Pagination** - Pagination controls
|
|
185
|
-
- **Card** - Card container with sections
|
|
186
|
-
- **Timeline** - Vertical timeline component
|
|
187
|
-
- **Table** - Data table component
|
|
188
|
-
- **List** - Ordered or unordered lists
|
|
189
|
-
|
|
190
|
-
### Media & Utilities (8)
|
|
191
|
-
|
|
192
|
-
Image display and utility components.
|
|
193
|
-
|
|
194
|
-
- **Image** - Image component with placeholder
|
|
195
|
-
- **BackgroundImage** - Background image container
|
|
196
|
-
- **ThemeIcon** - Icon with theme colors
|
|
197
|
-
- **ColorSwatch** - Color preview swatch
|
|
198
|
-
- **Transition** - Animation transition wrapper
|
|
199
|
-
- **CloseButton** - Close button icon
|
|
200
|
-
- **CopyButton** - Copy to clipboard button
|
|
201
|
-
- **Burger** - Hamburger menu button
|
|
202
|
-
|
|
203
|
-
### Navigation & Advanced (13)
|
|
204
|
-
|
|
205
|
-
Navigation components and advanced features.
|
|
206
|
-
|
|
207
|
-
- **Anchor** - Styled link/anchor component
|
|
208
|
-
- **Kbd** - Keyboard key display
|
|
209
|
-
- **Indicator** - Badge indicator overlay
|
|
210
|
-
- **Grid** - Responsive grid layout
|
|
211
|
-
- **SimpleGrid** - Simple grid with equal columns
|
|
212
|
-
- **AspectRatio** - Maintain aspect ratio container
|
|
213
|
-
- **MediaQuery** - Responsive media queries
|
|
214
|
-
- **Blockquote** - Quote block styling
|
|
215
|
-
- **Breadcrumbs** - Breadcrumb navigation
|
|
216
|
-
- **NavLink** - Navigation link component
|
|
217
|
-
- **LoadingOverlay** - Full overlay with loader
|
|
218
|
-
- **Tooltip** - Tooltip on hover/press
|
|
219
|
-
- **Popover** - Popover menu
|
|
220
|
-
- **Menu** - Dropdown menu component
|
|
221
|
-
- **Select** - Select dropdown with search
|
|
222
|
-
- **MultiSelect** - Multi-selection dropdown
|
|
223
|
-
- **RingProgress** - Circular progress indicator
|
|
224
|
-
- **TransferList** - Dual list transfer component
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Theme System
|
|
229
|
-
|
|
230
|
-
React Native Mantine includes a powerful theming system that allows extensive customization of colors, sizes, spacing, and more.
|
|
231
|
-
|
|
232
|
-
### Using the Theme Provider
|
|
233
|
-
|
|
234
|
-
```tsx
|
|
235
|
-
import { ThemeProvider, createTheme } from 'react-native-mantine';
|
|
236
|
-
|
|
237
|
-
const customTheme = createTheme({
|
|
238
|
-
primaryColor: 'blue',
|
|
239
|
-
primaryShade: 6,
|
|
240
|
-
fontFamily: 'CustomFont',
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
function App() {
|
|
244
|
-
return (
|
|
245
|
-
<ThemeProvider theme={customTheme}>
|
|
246
|
-
{/* Your app */}
|
|
247
|
-
</ThemeProvider>
|
|
248
|
-
);
|
|
249
|
-
}
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Accessing Theme in Components
|
|
253
|
-
|
|
254
|
-
```tsx
|
|
255
|
-
import { useTheme } from 'react-native-mantine';
|
|
256
|
-
|
|
257
|
-
function MyComponent() {
|
|
258
|
-
const theme = useTheme();
|
|
259
|
-
|
|
260
|
-
return (
|
|
261
|
-
<View style={{ backgroundColor: theme.colors.blue[6] }}>
|
|
262
|
-
<Text style={{ color: theme.white }}>
|
|
263
|
-
Themed Component
|
|
264
|
-
</Text>
|
|
265
|
-
</View>
|
|
266
|
-
);
|
|
267
|
-
}
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Theme Configuration
|
|
271
|
-
|
|
272
|
-
The theme object includes:
|
|
273
|
-
|
|
274
|
-
- **Colors** - 14 color palettes (blue, red, green, etc.) with 10 shades each
|
|
275
|
-
- **Primary Color** - Default component color
|
|
276
|
-
- **Font Sizes** - xs, sm, md, lg, xl
|
|
277
|
-
- **Spacing** - xs, sm, md, lg, xl
|
|
278
|
-
- **Radius** - Border radius values
|
|
279
|
-
- **Shadows** - Shadow presets (xs, sm, md, lg, xl)
|
|
280
|
-
- **Headings** - Typography for h1-h6
|
|
281
|
-
- **Dark/Light Mode** - Built-in color scheme support
|
|
282
|
-
|
|
283
|
-
### Available Colors
|
|
284
|
-
|
|
285
|
-
- **Primary Colors:** blue, cyan, teal, green, lime
|
|
286
|
-
- **Accent Colors:** red, pink, grape, violet, indigo
|
|
287
|
-
- **Neutral Colors:** gray, gray2, dark, secondary
|
|
288
|
-
- **Warm Colors:** yellow, orange
|
|
289
|
-
|
|
290
|
-
### Component Variants
|
|
291
|
-
|
|
292
|
-
Most components support multiple variants:
|
|
293
|
-
|
|
294
|
-
- **filled** - Solid background color
|
|
295
|
-
- **outline** - Border with transparent background
|
|
296
|
-
- **light** - Light background with theme color
|
|
297
|
-
- **white** - White background
|
|
298
|
-
- **default** - Default styling
|
|
299
|
-
- **subtle** - Minimal styling
|
|
300
|
-
- **gradient** - Gradient background (for buttons)
|
|
301
|
-
|
|
302
|
-
### Sizes
|
|
303
|
-
|
|
304
|
-
Components support consistent sizing:
|
|
305
|
-
|
|
306
|
-
- **xs** - Extra small
|
|
307
|
-
- **sm** - Small
|
|
308
|
-
- **md** - Medium (default)
|
|
309
|
-
- **lg** - Large
|
|
310
|
-
- **xl** - Extra large
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## Creating Custom Styles
|
|
315
|
-
|
|
316
|
-
Use the `createStyles` hook to create component-specific styles with theme access:
|
|
317
|
-
|
|
318
|
-
```tsx
|
|
319
|
-
import { createStyles } from 'react-native-mantine';
|
|
320
|
-
|
|
321
|
-
const useStyles = createStyles((theme, params) => ({
|
|
322
|
-
container: {
|
|
323
|
-
backgroundColor: theme.colors[params.color][6],
|
|
324
|
-
padding: theme.spacing.md,
|
|
325
|
-
borderRadius: theme.radius.md,
|
|
326
|
-
},
|
|
327
|
-
text: {
|
|
328
|
-
color: theme.white,
|
|
329
|
-
fontSize: theme.fontSizes.lg,
|
|
330
|
-
},
|
|
331
|
-
}));
|
|
332
|
-
|
|
333
|
-
function MyComponent({ color = 'blue' }) {
|
|
334
|
-
const { styles } = useStyles({ color });
|
|
335
|
-
|
|
336
|
-
return (
|
|
337
|
-
<View style={styles.container}>
|
|
338
|
-
<Text style={styles.text}>Custom Styled Component</Text>
|
|
339
|
-
</View>
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
---
|
|
345
|
-
|
|
346
|
-
## Advanced Examples
|
|
347
|
-
|
|
348
|
-
### Button Variants
|
|
349
|
-
|
|
350
|
-
```tsx
|
|
351
|
-
import { Stack, Button } from 'react-native-mantine';
|
|
352
|
-
|
|
353
|
-
function ButtonExamples() {
|
|
354
|
-
return (
|
|
355
|
-
<Stack spacing="md">
|
|
356
|
-
<Button variant="filled" color="blue">Filled Button</Button>
|
|
357
|
-
<Button variant="outline" color="red">Outline Button</Button>
|
|
358
|
-
<Button variant="light" color="green">Light Button</Button>
|
|
359
|
-
<Button variant="subtle" color="violet">Subtle Button</Button>
|
|
360
|
-
<Button variant="gradient" gradient={{ from: 'indigo', to: 'cyan' }}>
|
|
361
|
-
Gradient Button
|
|
362
|
-
</Button>
|
|
363
|
-
</Stack>
|
|
364
|
-
);
|
|
365
|
-
}
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
### Form Example
|
|
369
|
-
|
|
370
|
-
```tsx
|
|
371
|
-
import { Stack, TextInput, PasswordInput, Checkbox, Button } from 'react-native-mantine';
|
|
372
|
-
|
|
373
|
-
function LoginForm() {
|
|
374
|
-
return (
|
|
375
|
-
<Stack spacing="md" padding="lg">
|
|
376
|
-
<TextInput
|
|
377
|
-
label="Email"
|
|
378
|
-
placeholder="your@email.com"
|
|
379
|
-
required
|
|
380
|
-
/>
|
|
381
|
-
<PasswordInput
|
|
382
|
-
label="Password"
|
|
383
|
-
placeholder="Your password"
|
|
384
|
-
required
|
|
385
|
-
/>
|
|
386
|
-
<Checkbox label="Remember me" />
|
|
387
|
-
<Button fullWidth>Sign In</Button>
|
|
388
|
-
</Stack>
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
### Modal Example
|
|
394
|
-
|
|
395
|
-
```tsx
|
|
396
|
-
import { useState } from 'react';
|
|
397
|
-
import { Modal, Button, Text, Stack } from 'react-native-mantine';
|
|
398
|
-
|
|
399
|
-
function ModalExample() {
|
|
400
|
-
const [opened, setOpened] = useState(false);
|
|
401
|
-
|
|
402
|
-
return (
|
|
403
|
-
<>
|
|
404
|
-
<Button onPress={() => setOpened(true)}>Open Modal</Button>
|
|
405
|
-
|
|
406
|
-
<Modal
|
|
407
|
-
opened={opened}
|
|
408
|
-
onClose={() => setOpened(false)}
|
|
409
|
-
title="Welcome!"
|
|
410
|
-
>
|
|
411
|
-
<Stack spacing="md">
|
|
412
|
-
<Text>This is a modal dialog</Text>
|
|
413
|
-
<Button onPress={() => setOpened(false)}>Close</Button>
|
|
414
|
-
</Stack>
|
|
415
|
-
</Modal>
|
|
416
|
-
</>
|
|
417
|
-
);
|
|
418
|
-
}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
### Grid Layout
|
|
422
|
-
|
|
423
|
-
```tsx
|
|
424
|
-
import { Grid, Paper, Text } from 'react-native-mantine';
|
|
425
|
-
|
|
426
|
-
function GridExample() {
|
|
427
|
-
return (
|
|
428
|
-
<Grid>
|
|
429
|
-
<Grid.Col span={6}>
|
|
430
|
-
<Paper padding="md" shadow="sm">
|
|
431
|
-
<Text>Column 1</Text>
|
|
432
|
-
</Paper>
|
|
433
|
-
</Grid.Col>
|
|
434
|
-
<Grid.Col span={6}>
|
|
435
|
-
<Paper padding="md" shadow="sm">
|
|
436
|
-
<Text>Column 2</Text>
|
|
437
|
-
</Paper>
|
|
438
|
-
</Grid.Col>
|
|
439
|
-
<Grid.Col span={12}>
|
|
440
|
-
<Paper padding="md" shadow="sm">
|
|
441
|
-
<Text>Full Width Column</Text>
|
|
442
|
-
</Paper>
|
|
443
|
-
</Grid.Col>
|
|
444
|
-
</Grid>
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
---
|
|
450
|
-
|
|
451
94
|
## Example App
|
|
452
95
|
|
|
453
96
|
The library includes a comprehensive example application showcasing all components with live examples and code snippets.
|
|
@@ -61,7 +61,8 @@ const defaultProps = {
|
|
|
61
61
|
size: 'md',
|
|
62
62
|
weight: '400',
|
|
63
63
|
underline: true,
|
|
64
|
-
variant: 'link'
|
|
64
|
+
variant: 'link',
|
|
65
|
+
withTextWrapper: true
|
|
65
66
|
};
|
|
66
67
|
const Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
67
68
|
const {
|
|
@@ -74,6 +75,7 @@ const Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
|
|
|
74
75
|
onPress,
|
|
75
76
|
children,
|
|
76
77
|
style,
|
|
78
|
+
withTextWrapper: shouldWrapInText,
|
|
77
79
|
...others
|
|
78
80
|
} = (0, _themeProvider.useComponentDefaultProps)('Anchor', defaultProps, props);
|
|
79
81
|
const {
|
|
@@ -95,6 +97,9 @@ const Anchor = exports.Anchor = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
|
|
|
95
97
|
_reactNative.Linking.openURL(href).catch(err => console.error('Failed to open URL:', err));
|
|
96
98
|
}
|
|
97
99
|
};
|
|
100
|
+
if (!shouldWrapInText) {
|
|
101
|
+
return children;
|
|
102
|
+
}
|
|
98
103
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
|
|
99
104
|
ref: ref,
|
|
100
105
|
style: sx(styles.root, style),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_themeProvider","_index2","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","size","weight","underline","variant","colors","primaryColor","fontSize","getVariantStyles","primaryBgColor","textDecorationLine","colorScheme","dark","white","black","root","fontWeight","defaultProps","Anchor","exports","forwardRef","props","ref","href","onPress","children","style","others","useComponentDefaultProps","styles","sx","name","handlePress","Linking","openURL","catch","err","console","error","jsx","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAA4C,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;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_themeProvider","_index2","_rem","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","rem","sm","md","lg","xl","useStyles","createStyles","theme","color","size","weight","underline","variant","colors","primaryColor","fontSize","getVariantStyles","primaryBgColor","textDecorationLine","colorScheme","dark","white","black","root","fontWeight","defaultProps","withTextWrapper","Anchor","exports","forwardRef","props","ref","href","onPress","children","style","shouldWrapInText","others","useComponentDefaultProps","styles","sx","name","handlePress","Linking","openURL","catch","err","console","error","jsx","Text","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAA4C,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,iBAA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AAEC,OAAO;IAAEC,QAAQ;IAAEC,KAAK;IAAET,eAAe,EAAEU,gBAAgB;IAAE,GAAGC;EAAM,CAAC,GAC5H,IAAAC,uCAAwB,EAAC,QAAQ,EAAEb,YAAY,EAAEK,KAAK,CAAC;EAEzD,MAAM;IAAES,MAAM;IAAEC;EAAE,CAAC,GAAGnC,SAAS,CAC7B;IAAEG,KAAK;IAAEC,IAAI;IAAEC,MAAM;IAAEC;EAAU,CAAC,EAClC;IAAE8B,IAAI,EAAE,QAAQ;IAAE7B;EAAQ,CAC5B,CAAQ;EAER,MAAM8B,WAAW,GAAGA,CAAA,KAAM;IACxB,IAAIT,OAAO,EAAE;MACXA,OAAO,CAAC,CAAC;IACX,CAAC,MAAM,IAAID,IAAI,EAAE;MACfW,oBAAO,CAACC,OAAO,CAACZ,IAAI,CAAC,CAACa,KAAK,CAAEC,GAAG,IAC9BC,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAEF,GAAG,CAC1C,CAAC;IACH;EACF,CAAC;EAED,IAAI,CAACV,gBAAgB,EAAE;IACrB,OAAOF,QAAQ;EACjB;EAEA,oBACE,IAAAxD,WAAA,CAAAuE,GAAA,EAAC3E,MAAA,CAAA4E,IAAI;IACHnB,GAAG,EAAEA,GAAI;IACTI,KAAK,EAAEK,EAAE,CAACD,MAAM,CAAChB,IAAI,EAAEY,KAAK,CAAE;IAC9BF,OAAO,EAAES,WAAY;IAAA,GACjBL,MAAM;IAAAH,QAAA,EAETA;EAAQ,CACL,CAAC;AAEX,CAAC,CAAC;AAEFP,MAAM,CAACwB,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Badge = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _index = require("../
|
|
9
|
-
var _index2 = require("../BoxView/index.js");
|
|
8
|
+
var _index = require("../BoxView/index.js");
|
|
10
9
|
var _themeProvider = require("../../theme/theme-provider.js");
|
|
11
|
-
var
|
|
10
|
+
var _index2 = require("../../theme/index.js");
|
|
12
11
|
var _rem = require("../../theme/utils/rem.js");
|
|
12
|
+
var _withTextWrapper = require("../../theme/utils/withTextWrapper.js");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
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); }
|
|
15
15
|
const sizes = {
|
|
@@ -46,7 +46,7 @@ const dotSizes = {
|
|
|
46
46
|
lg: (0, _rem.rem)(8),
|
|
47
47
|
xl: (0, _rem.rem)(10)
|
|
48
48
|
};
|
|
49
|
-
const useStyles = (0,
|
|
49
|
+
const useStyles = (0, _index2.createStyles)((theme, {
|
|
50
50
|
color,
|
|
51
51
|
radius,
|
|
52
52
|
fullWidth
|
|
@@ -137,7 +137,8 @@ const defaultProps = {
|
|
|
137
137
|
variant: 'light',
|
|
138
138
|
size: 'md',
|
|
139
139
|
radius: 'xl',
|
|
140
|
-
fullWidth: false
|
|
140
|
+
fullWidth: false,
|
|
141
|
+
withTextWrapper: true
|
|
141
142
|
};
|
|
142
143
|
const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
143
144
|
const {
|
|
@@ -150,6 +151,7 @@ const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =
|
|
|
150
151
|
rightSection,
|
|
151
152
|
children,
|
|
152
153
|
style,
|
|
154
|
+
withTextWrapper: shouldWrapInText,
|
|
153
155
|
...others
|
|
154
156
|
} = (0, _themeProvider.useComponentDefaultProps)('Badge', defaultProps, props);
|
|
155
157
|
const {
|
|
@@ -164,21 +166,18 @@ const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =
|
|
|
164
166
|
variant,
|
|
165
167
|
size
|
|
166
168
|
});
|
|
167
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
169
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
168
170
|
ref: ref,
|
|
169
171
|
style: sx(styles.root, style),
|
|
170
172
|
...others,
|
|
171
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
173
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
|
|
172
174
|
style: styles.inner,
|
|
173
|
-
children: [variant === 'dot' && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
175
|
+
children: [variant === 'dot' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
174
176
|
style: styles.dot
|
|
175
|
-
}), leftSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
177
|
+
}), leftSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
176
178
|
style: styles.leftSection,
|
|
177
179
|
children: leftSection
|
|
178
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
|
179
|
-
style: styles.label,
|
|
180
|
-
children: children
|
|
181
|
-
}), rightSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.BoxView, {
|
|
180
|
+
}), (0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, styles.label), rightSection && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxView, {
|
|
182
181
|
style: styles.rightSection,
|
|
183
182
|
children: rightSection
|
|
184
183
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_index","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_index","_themeProvider","_index2","_rem","_withTextWrapper","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","sizes","xs","fontSize","rem","height","paddingHorizontal","sm","md","lg","xl","dotSizes","useStyles","createStyles","theme","color","radius","fullWidth","variant","size","colors","primaryColor","sizeStyles","getVariantStyles","backgroundColor","primaryBgColor","white","gray","borderWidth","borderColor","colorScheme","dark","black","root","borderRadius","fn","flexDirection","alignItems","justifyContent","fontWeight","textTransform","overflow","width","inner","leftSection","marginRight","spacing","rightSection","marginLeft","dot","label","whiteSpace","defaultProps","withTextWrapper","Badge","exports","forwardRef","props","ref","children","style","shouldWrapInText","others","useComponentDefaultProps","styles","sx","name","jsx","BoxView","jsxs","displayName"],"sourceRoot":"../../../../src","sources":["components/Badge/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAA+F,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,GA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GAAA,EAAC3F,MAAA,CAAA4F,OAAO;QAACR,KAAK,EAAEI,MAAM,CAACpB,WAAY;QAAAe,QAAA,EAAEf;MAAW,CAAU,CAAC,EAC1E,IAAAS,gCAAe,EAACM,QAAQ,EAAEE,gBAAgB,EAAEG,MAAM,CAACd,KAAK,CAAC,EACzDH,YAAY,iBAAI,IAAAlE,WAAA,CAAAsF,GAAA,EAAC3F,MAAA,CAAA4F,OAAO;QAACR,KAAK,EAAEI,MAAM,CAACjB,YAAa;QAAAY,QAAA,EAAEZ;MAAY,CAAU,CAAC;IAAA,CACvE;EAAC,CACH,CAAC;AAEd,CAAC,CAAC;AAEFO,KAAK,CAACgB,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Blockquote = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _index = require("../BoxView/index.js");
|
|
9
|
-
var _index2 = require("../Text/index.js");
|
|
10
9
|
var _themeProvider = require("../../theme/theme-provider.js");
|
|
11
|
-
var
|
|
10
|
+
var _index2 = require("../../theme/index.js");
|
|
12
11
|
var _rem = require("../../theme/utils/rem.js");
|
|
12
|
+
var _withTextWrapper = require("../../theme/utils/withTextWrapper.js");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
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); }
|
|
15
|
-
const useStyles = (0,
|
|
15
|
+
const useStyles = (0, _index2.createStyles)((theme, {
|
|
16
16
|
color,
|
|
17
17
|
radius
|
|
18
18
|
}) => {
|
|
@@ -50,7 +50,8 @@ const useStyles = (0, _index3.createStyles)((theme, {
|
|
|
50
50
|
});
|
|
51
51
|
const defaultProps = {
|
|
52
52
|
color: 'blue',
|
|
53
|
-
radius: 'sm'
|
|
53
|
+
radius: 'sm',
|
|
54
|
+
withTextWrapper: true
|
|
54
55
|
};
|
|
55
56
|
const Blockquote = exports.Blockquote = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
56
57
|
const {
|
|
@@ -59,7 +60,8 @@ const Blockquote = exports.Blockquote = /*#__PURE__*/(0, _react.forwardRef)((pro
|
|
|
59
60
|
cite,
|
|
60
61
|
radius,
|
|
61
62
|
children,
|
|
62
|
-
style
|
|
63
|
+
style,
|
|
64
|
+
withTextWrapper: shouldWrapInText
|
|
63
65
|
} = (0, _themeProvider.useComponentDefaultProps)('Blockquote', defaultProps, props);
|
|
64
66
|
const {
|
|
65
67
|
styles,
|
|
@@ -82,13 +84,7 @@ const Blockquote = exports.Blockquote = /*#__PURE__*/(0, _react.forwardRef)((pro
|
|
|
82
84
|
children: icon
|
|
83
85
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.BoxView, {
|
|
84
86
|
style: styles.body,
|
|
85
|
-
children: [
|
|
86
|
-
style: styles.content,
|
|
87
|
-
children: children
|
|
88
|
-
}), cite && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
|
|
89
|
-
style: styles.cite,
|
|
90
|
-
children: cite
|
|
91
|
-
})]
|
|
87
|
+
children: [(0, _withTextWrapper.withTextWrapper)(children, shouldWrapInText, styles.content), cite && (0, _withTextWrapper.withTextWrapper)(cite, shouldWrapInText, styles.cite)]
|
|
92
88
|
})]
|
|
93
89
|
})
|
|
94
90
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_index","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_index","_themeProvider","_index2","_rem","_withTextWrapper","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useStyles","createStyles","theme","color","radius","colors","primaryColor","root","backgroundColor","colorScheme","dark","gray","borderLeftWidth","borderLeftColor","primaryBgColor","borderRadius","fn","padding","spacing","md","inner","flexDirection","icon","marginRight","marginTop","rem","body","flex","content","fontSize","lineHeight","white","black","marginBottom","cite","xs","defaultProps","withTextWrapper","Blockquote","exports","forwardRef","props","ref","children","style","shouldWrapInText","useComponentDefaultProps","styles","sx","others","name","jsx","BoxView","jsxs","displayName"],"sourceRoot":"../../../../src","sources":["components/Blockquote/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAMA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAA+F,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,CAA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index.createStyles)((theme, {
|
|
|
181
181
|
},
|
|
182
182
|
inner: {
|
|
183
183
|
display: 'flex',
|
|
184
|
-
alignItems: 'center',
|
|
185
|
-
justifyContent: 'center',
|
|
186
184
|
height: '100%',
|
|
187
|
-
|
|
185
|
+
flex: 1
|
|
188
186
|
},
|
|
189
187
|
label: {
|
|
190
188
|
whiteSpace: 'nowrap',
|
|
@@ -192,7 +190,9 @@ const useStyles = (0, _index.createStyles)((theme, {
|
|
|
192
190
|
overflow: 'hidden',
|
|
193
191
|
display: 'flex',
|
|
194
192
|
alignItems: 'center',
|
|
195
|
-
justifyContent: 'center'
|
|
193
|
+
justifyContent: 'center',
|
|
194
|
+
flexDirection: 'row',
|
|
195
|
+
flex: 1
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
});
|