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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useEffect, useRef } from 'react';
|
|
2
|
-
import { Animated } from 'react-native';
|
|
2
|
+
import { Animated, Dimensions, ScrollView } from 'react-native';
|
|
3
3
|
import { Paper } from '../Paper';
|
|
4
4
|
import type { DefaultProps, MantineNumberSize, SpacingValue } from '../../theme/types';
|
|
5
5
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
@@ -30,6 +30,9 @@ export interface DialogProps extends DefaultProps {
|
|
|
30
30
|
bottom?: number;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
/** If true, dialog will be centered on screen */
|
|
34
|
+
centered?: boolean;
|
|
35
|
+
|
|
33
36
|
/** If true, dialog will show shadow */
|
|
34
37
|
withShadow?: boolean;
|
|
35
38
|
|
|
@@ -57,6 +60,7 @@ const useStyles = createStyles(
|
|
|
57
60
|
{
|
|
58
61
|
size,
|
|
59
62
|
position,
|
|
63
|
+
centered,
|
|
60
64
|
}: {
|
|
61
65
|
size: MantineNumberSize | number;
|
|
62
66
|
position?: {
|
|
@@ -65,6 +69,7 @@ const useStyles = createStyles(
|
|
|
65
69
|
right?: number;
|
|
66
70
|
bottom?: number;
|
|
67
71
|
};
|
|
72
|
+
centered?: boolean;
|
|
68
73
|
}
|
|
69
74
|
) => {
|
|
70
75
|
const getSize = () => {
|
|
@@ -73,6 +78,28 @@ const useStyles = createStyles(
|
|
|
73
78
|
return rem(sizes[sizeKey] || sizes.md);
|
|
74
79
|
};
|
|
75
80
|
|
|
81
|
+
const screenHeight = Dimensions.get('window').height;
|
|
82
|
+
const verticalMargin = 40; // Safety margin from screen edges
|
|
83
|
+
|
|
84
|
+
// If centered, calculate center position
|
|
85
|
+
if (centered) {
|
|
86
|
+
return {
|
|
87
|
+
root: {
|
|
88
|
+
position: 'absolute' as const,
|
|
89
|
+
width: getSize() as any,
|
|
90
|
+
maxWidth: '90%' as any,
|
|
91
|
+
maxHeight: (screenHeight - verticalMargin) as any,
|
|
92
|
+
zIndex: 1000,
|
|
93
|
+
// Center horizontally and vertically
|
|
94
|
+
left: '5%' as any,
|
|
95
|
+
right: '5%' as any,
|
|
96
|
+
top: '50%' as any,
|
|
97
|
+
transform: [{ translateY: -(screenHeight * 0.25) }] as any,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Default positioning logic
|
|
76
103
|
const defaultPosition = {
|
|
77
104
|
bottom: 20,
|
|
78
105
|
right: 20,
|
|
@@ -84,11 +111,23 @@ const useStyles = createStyles(
|
|
|
84
111
|
const posLeft = finalPosition && typeof finalPosition === 'object' && 'left' in finalPosition ? finalPosition.left : undefined;
|
|
85
112
|
const posRight = finalPosition && typeof finalPosition === 'object' && 'right' in finalPosition ? finalPosition.right : undefined;
|
|
86
113
|
|
|
114
|
+
// Calculate max height based on viewport and position
|
|
115
|
+
let maxHeight = screenHeight - verticalMargin;
|
|
116
|
+
|
|
117
|
+
// Adjust max height based on position
|
|
118
|
+
if (posTop !== undefined) {
|
|
119
|
+
maxHeight = screenHeight - posTop - verticalMargin;
|
|
120
|
+
}
|
|
121
|
+
if (posBottom !== undefined) {
|
|
122
|
+
maxHeight = screenHeight - posBottom - verticalMargin;
|
|
123
|
+
}
|
|
124
|
+
|
|
87
125
|
return {
|
|
88
126
|
root: {
|
|
89
127
|
position: 'absolute' as const,
|
|
90
128
|
width: getSize() as any,
|
|
91
129
|
maxWidth: '90%' as any as any,
|
|
130
|
+
maxHeight: maxHeight as any,
|
|
92
131
|
zIndex: 1000,
|
|
93
132
|
...(posTop !== undefined && { top: rem(posTop) as any }),
|
|
94
133
|
...(posBottom !== undefined && { bottom: rem(posBottom) as any }),
|
|
@@ -116,6 +155,7 @@ export const Dialog = forwardRef<any, DialogProps>((props, ref) => {
|
|
|
116
155
|
padding,
|
|
117
156
|
radius,
|
|
118
157
|
position,
|
|
158
|
+
centered,
|
|
119
159
|
withShadow,
|
|
120
160
|
withBorder,
|
|
121
161
|
style,
|
|
@@ -123,7 +163,7 @@ export const Dialog = forwardRef<any, DialogProps>((props, ref) => {
|
|
|
123
163
|
...otherProps
|
|
124
164
|
} = useComponentDefaultProps('Dialog', defaultProps, props);
|
|
125
165
|
|
|
126
|
-
const { styles, sx } = useStyles({ size, position}, { name: 'Dialog' }) as any;
|
|
166
|
+
const { styles, sx } = useStyles({ size, position, centered }, { name: 'Dialog' }) as any;
|
|
127
167
|
|
|
128
168
|
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
129
169
|
const slideAnim = useRef(new Animated.Value(50)).current;
|
|
@@ -174,14 +214,19 @@ export const Dialog = forwardRef<any, DialogProps>((props, ref) => {
|
|
|
174
214
|
]}
|
|
175
215
|
{...otherProps}
|
|
176
216
|
>
|
|
177
|
-
<
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
p={padding}
|
|
181
|
-
withBorder={withBorder}
|
|
217
|
+
<ScrollView
|
|
218
|
+
showsVerticalScrollIndicator={false}
|
|
219
|
+
bounces={false}
|
|
182
220
|
>
|
|
183
|
-
|
|
184
|
-
|
|
221
|
+
<Paper
|
|
222
|
+
shadow={withShadow ? 'lg' : undefined}
|
|
223
|
+
radius={radius}
|
|
224
|
+
p={padding}
|
|
225
|
+
withBorder={withBorder}
|
|
226
|
+
>
|
|
227
|
+
{children}
|
|
228
|
+
</Paper>
|
|
229
|
+
</ScrollView>
|
|
185
230
|
</Animated.View>
|
|
186
231
|
);
|
|
187
232
|
});
|
|
@@ -264,22 +264,16 @@ export const Drawer = forwardRef<any, DrawerProps>((props, ref) => {
|
|
|
264
264
|
onRequestClose={onClose}
|
|
265
265
|
statusBarTranslucent
|
|
266
266
|
>
|
|
267
|
+
{/* Full screen overlay backdrop */}
|
|
267
268
|
{withOverlay && (
|
|
268
|
-
<
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
>
|
|
274
|
-
<Overlay
|
|
275
|
-
opacity={overlayOpacity}
|
|
276
|
-
color={overlayColor}
|
|
277
|
-
onPress={handleOverlayPress}
|
|
278
|
-
style={{ position: 'absolute' }}
|
|
279
|
-
/>
|
|
280
|
-
</Animated.View>
|
|
269
|
+
<Overlay
|
|
270
|
+
opacity={overlayOpacity}
|
|
271
|
+
color={overlayColor}
|
|
272
|
+
onPress={handleOverlayPress}
|
|
273
|
+
/>
|
|
281
274
|
)}
|
|
282
275
|
|
|
276
|
+
{/* Drawer container positioned over overlay */}
|
|
283
277
|
<BoxView style={styles.overlay} pointerEvents="box-none">
|
|
284
278
|
<Animated.View
|
|
285
279
|
ref={ref}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
|
+
import type { TextStyle } from 'react-native';
|
|
3
|
+
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
|
4
|
+
import { useTheme } from '../../theme/theme-provider';
|
|
5
|
+
|
|
6
|
+
export interface IconProps {
|
|
7
|
+
/** Icon name from FontAwesome */
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
/** Icon size in pixels */
|
|
11
|
+
size?: number;
|
|
12
|
+
|
|
13
|
+
/** Icon color */
|
|
14
|
+
color?: string;
|
|
15
|
+
|
|
16
|
+
/** Additional styles */
|
|
17
|
+
style?: TextStyle;
|
|
18
|
+
|
|
19
|
+
/** Whether to use theme color */
|
|
20
|
+
useThemeColor?: boolean;
|
|
21
|
+
|
|
22
|
+
/** Allow font scaling */
|
|
23
|
+
allowFontScaling?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const defaultProps: Partial<IconProps> = {
|
|
27
|
+
size: 16,
|
|
28
|
+
allowFontScaling: false,
|
|
29
|
+
useThemeColor: false,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Icon component using react-native-vector-icons with FontAwesome
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <Icon name="heart" size={24} color="red" />
|
|
38
|
+
* <Icon name="star" size={20} useThemeColor />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export const Icon = forwardRef<any, IconProps>((props, ref) => {
|
|
42
|
+
const {
|
|
43
|
+
name,
|
|
44
|
+
size,
|
|
45
|
+
color,
|
|
46
|
+
style,
|
|
47
|
+
useThemeColor,
|
|
48
|
+
allowFontScaling,
|
|
49
|
+
...others
|
|
50
|
+
} = {
|
|
51
|
+
...defaultProps,
|
|
52
|
+
...props,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const theme = useTheme();
|
|
56
|
+
|
|
57
|
+
const iconColor = color || (useThemeColor
|
|
58
|
+
? (theme.colorScheme === 'dark' ? theme.colors.dark?.[0] : theme.black)
|
|
59
|
+
: undefined);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<FontAwesomeIcon
|
|
63
|
+
ref={ref}
|
|
64
|
+
name={name}
|
|
65
|
+
size={size}
|
|
66
|
+
color={iconColor}
|
|
67
|
+
style={style}
|
|
68
|
+
allowFontScaling={allowFontScaling}
|
|
69
|
+
{...others}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
Icon.displayName = 'Icon';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BoxView } from '../BoxView';
|
|
3
|
-
import { Text } from '../Text';
|
|
4
3
|
import type { DefaultProps, MantineSize } from '../../theme/types';
|
|
5
4
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
6
5
|
import { createStyles } from '../../theme';
|
|
7
6
|
import { rem } from '../../theme/utils/rem';
|
|
7
|
+
import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
8
8
|
|
|
9
|
-
export interface KbdProps extends DefaultProps {
|
|
9
|
+
export interface KbdProps extends DefaultProps, WithTextWrapperProps {
|
|
10
10
|
/** Kbd size */
|
|
11
11
|
size?: MantineSize;
|
|
12
12
|
|
|
@@ -63,10 +63,11 @@ const useStyles = createStyles(
|
|
|
63
63
|
|
|
64
64
|
const defaultProps: Partial<KbdProps> = {
|
|
65
65
|
size: 'md',
|
|
66
|
+
withTextWrapper: true,
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
export const Kbd = forwardRef<any, KbdProps>((props, ref) => {
|
|
69
|
-
const { size, children, style, ...otherProps} = useComponentDefaultProps(
|
|
70
|
+
const { size, children, style, withTextWrapper: shouldWrapInText, ...otherProps} = useComponentDefaultProps(
|
|
70
71
|
'Kbd',
|
|
71
72
|
defaultProps,
|
|
72
73
|
props
|
|
@@ -76,7 +77,7 @@ export const Kbd = forwardRef<any, KbdProps>((props, ref) => {
|
|
|
76
77
|
|
|
77
78
|
return (
|
|
78
79
|
<BoxView ref={ref} style={sx(styles.root, style)} {...otherProps}>
|
|
79
|
-
|
|
80
|
+
{withTextWrapper(children, shouldWrapInText, styles.label)}
|
|
80
81
|
</BoxView>
|
|
81
82
|
);
|
|
82
83
|
});
|
|
@@ -5,6 +5,7 @@ import type { DefaultProps, SpacingValue } from '../../theme/types';
|
|
|
5
5
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
6
6
|
import { createStyles } from '../../theme';
|
|
7
7
|
import { rem } from '../../theme/utils/rem';
|
|
8
|
+
import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
8
9
|
|
|
9
10
|
interface ListContextValue {
|
|
10
11
|
type: 'ordered' | 'unordered';
|
|
@@ -59,7 +60,7 @@ export interface ListProps extends DefaultProps {
|
|
|
59
60
|
style?: any;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
export interface ListItemProps extends DefaultProps {
|
|
63
|
+
export interface ListItemProps extends DefaultProps, WithTextWrapperProps {
|
|
63
64
|
/** Item children */
|
|
64
65
|
children?: React.ReactNode;
|
|
65
66
|
|
|
@@ -156,7 +157,9 @@ const defaultProps: Partial<ListProps> = {
|
|
|
156
157
|
startIndex: 1,
|
|
157
158
|
};
|
|
158
159
|
|
|
159
|
-
const defaultItemProps: Partial<ListItemProps> = {
|
|
160
|
+
const defaultItemProps: Partial<ListItemProps> = {
|
|
161
|
+
withTextWrapper: true,
|
|
162
|
+
};
|
|
160
163
|
|
|
161
164
|
const getListMarker = (
|
|
162
165
|
type: 'ordered' | 'unordered',
|
|
@@ -228,7 +231,7 @@ const ListRoot = forwardRef<any, ListProps>((props, ref) => {
|
|
|
228
231
|
<BoxView ref={ref} style={sx(styles.root, style)} {...others}>
|
|
229
232
|
{childrenArray.map((child, index) => {
|
|
230
233
|
if (!React.isValidElement(child)) return child;
|
|
231
|
-
return React.cloneElement(child as React.ReactElement
|
|
234
|
+
return React.cloneElement<ListItemProps>(child as React.ReactElement<ListItemProps>, {
|
|
232
235
|
key: index,
|
|
233
236
|
__index: index,
|
|
234
237
|
});
|
|
@@ -239,7 +242,7 @@ const ListRoot = forwardRef<any, ListProps>((props, ref) => {
|
|
|
239
242
|
});
|
|
240
243
|
|
|
241
244
|
export const ListItem = forwardRef<any, ListItemProps>((props, ref) => {
|
|
242
|
-
const { children, icon: itemIcon, style, __index, ...others} = {
|
|
245
|
+
const { children, icon: itemIcon, style, __index, withTextWrapper: shouldWrapInText, ...others} = {
|
|
243
246
|
...defaultItemProps,
|
|
244
247
|
...props,
|
|
245
248
|
};
|
|
@@ -271,11 +274,7 @@ export const ListItem = forwardRef<any, ListItemProps>((props, ref) => {
|
|
|
271
274
|
<BoxView ref={ref} style={sx(styles.item, style)} {...others}>
|
|
272
275
|
<BoxView style={styles.icon}>{renderIcon()}</BoxView>
|
|
273
276
|
<BoxView style={styles.content}>
|
|
274
|
-
{
|
|
275
|
-
<Text style={styles.contentText}>{children}</Text>
|
|
276
|
-
) : (
|
|
277
|
-
children
|
|
278
|
-
)}
|
|
277
|
+
{withTextWrapper(children, shouldWrapInText, styles.contentText)}
|
|
279
278
|
</BoxView>
|
|
280
279
|
</BoxView>
|
|
281
280
|
);
|
|
@@ -2,8 +2,9 @@ import React, { forwardRef } from 'react';
|
|
|
2
2
|
import { Text } from '../Text';
|
|
3
3
|
import type { TextProps } from '../Text';
|
|
4
4
|
import { useTheme } from '../../theme/theme-provider';
|
|
5
|
+
import type { WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
5
6
|
|
|
6
|
-
export interface MarkProps extends TextProps {
|
|
7
|
+
export interface MarkProps extends TextProps, WithTextWrapperProps {
|
|
7
8
|
/** Background color key from theme.colors or CSS color value */
|
|
8
9
|
color?: string;
|
|
9
10
|
|
|
@@ -16,7 +17,7 @@ export interface MarkProps extends TextProps {
|
|
|
16
17
|
* Default background is yellow
|
|
17
18
|
*/
|
|
18
19
|
export const Mark = forwardRef<any, MarkProps>((props, ref) => {
|
|
19
|
-
const { children, color = 'yellow', style, ...others} = props;
|
|
20
|
+
const { children, color = 'yellow', style, withTextWrapper: shouldWrapInText = true, ...others} = props;
|
|
20
21
|
|
|
21
22
|
const theme = useTheme();
|
|
22
23
|
|
|
@@ -30,6 +31,10 @@ export const Mark = forwardRef<any, MarkProps>((props, ref) => {
|
|
|
30
31
|
return color;
|
|
31
32
|
};
|
|
32
33
|
|
|
34
|
+
if (!shouldWrapInText) {
|
|
35
|
+
return children;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
return (
|
|
34
39
|
<Text
|
|
35
40
|
ref={ref}
|
|
@@ -3,11 +3,10 @@ import {
|
|
|
3
3
|
View,
|
|
4
4
|
TouchableOpacity,
|
|
5
5
|
Animated,
|
|
6
|
+
Modal,
|
|
6
7
|
} from 'react-native';
|
|
7
8
|
import { BoxView } from '../BoxView';
|
|
8
|
-
import { Text } from '../Text';
|
|
9
9
|
import { Divider } from '../Divider';
|
|
10
|
-
import { Portal } from '../Portal';
|
|
11
10
|
import type {
|
|
12
11
|
DefaultProps,
|
|
13
12
|
MantineColor,
|
|
@@ -15,6 +14,7 @@ import type {
|
|
|
15
14
|
} from '../../theme/types';
|
|
16
15
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
17
16
|
import { createStyles } from '../../theme';
|
|
17
|
+
import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
18
18
|
|
|
19
19
|
export interface MenuProps extends DefaultProps {
|
|
20
20
|
/** Controlled opened state */
|
|
@@ -68,7 +68,7 @@ export interface MenuDropdownProps extends DefaultProps {
|
|
|
68
68
|
style?: any;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export interface MenuItemProps extends DefaultProps {
|
|
71
|
+
export interface MenuItemProps extends DefaultProps, WithTextWrapperProps {
|
|
72
72
|
/** Item icon */
|
|
73
73
|
icon?: React.ReactNode;
|
|
74
74
|
|
|
@@ -91,7 +91,7 @@ export interface MenuItemProps extends DefaultProps {
|
|
|
91
91
|
style?: any;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
export interface MenuLabelProps extends DefaultProps {
|
|
94
|
+
export interface MenuLabelProps extends DefaultProps, WithTextWrapperProps {
|
|
95
95
|
children: React.ReactNode;
|
|
96
96
|
style?: any;
|
|
97
97
|
}
|
|
@@ -171,7 +171,7 @@ interface MenuContextValue {
|
|
|
171
171
|
opened: boolean;
|
|
172
172
|
setOpened: (opened: boolean) => void;
|
|
173
173
|
closeOnItemClick: boolean;
|
|
174
|
-
targetRef: React.RefObject<View>;
|
|
174
|
+
targetRef: React.RefObject<View | null>;
|
|
175
175
|
dropdownPosition: { top: number; left: number; width: number };
|
|
176
176
|
setDropdownPosition: (pos: { top: number; left: number; width: number }) => void;
|
|
177
177
|
}
|
|
@@ -198,6 +198,7 @@ const defaultMenuProps: Partial<MenuProps> = {
|
|
|
198
198
|
|
|
199
199
|
const defaultItemProps: Partial<MenuItemProps> = {
|
|
200
200
|
disabled: false,
|
|
201
|
+
withTextWrapper: true,
|
|
201
202
|
};
|
|
202
203
|
|
|
203
204
|
const MenuTarget: React.FC<MenuTargetProps> = ({ children }) => {
|
|
@@ -216,7 +217,7 @@ const MenuTarget: React.FC<MenuTargetProps> = ({ children }) => {
|
|
|
216
217
|
setOpened(true);
|
|
217
218
|
};
|
|
218
219
|
|
|
219
|
-
return React.cloneElement(children
|
|
220
|
+
return React.cloneElement(children as React.ReactElement<any>, {
|
|
220
221
|
ref: targetRef,
|
|
221
222
|
onPress: handlePress,
|
|
222
223
|
});
|
|
@@ -241,16 +242,19 @@ const MenuDropdown: React.FC<MenuDropdownProps> = ({ children, style, ...others
|
|
|
241
242
|
}
|
|
242
243
|
|
|
243
244
|
return (
|
|
244
|
-
<
|
|
245
|
+
<Modal
|
|
246
|
+
visible={opened}
|
|
247
|
+
transparent
|
|
248
|
+
animationType="none"
|
|
249
|
+
onRequestClose={() => setOpened(false)}
|
|
250
|
+
statusBarTranslucent
|
|
251
|
+
>
|
|
245
252
|
<TouchableOpacity
|
|
246
253
|
activeOpacity={1}
|
|
247
254
|
onPress={() => setOpened(false)}
|
|
248
255
|
style={{
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
left: 0,
|
|
252
|
-
right: 0,
|
|
253
|
-
bottom: 0,
|
|
256
|
+
flex: 1,
|
|
257
|
+
backgroundColor: 'transparent',
|
|
254
258
|
}}
|
|
255
259
|
>
|
|
256
260
|
<Animated.View
|
|
@@ -268,12 +272,12 @@ const MenuDropdown: React.FC<MenuDropdownProps> = ({ children, style, ...others
|
|
|
268
272
|
{children}
|
|
269
273
|
</Animated.View>
|
|
270
274
|
</TouchableOpacity>
|
|
271
|
-
</
|
|
275
|
+
</Modal>
|
|
272
276
|
);
|
|
273
277
|
};
|
|
274
278
|
|
|
275
279
|
const MenuItem = forwardRef<any, MenuItemProps>((props, ref) => {
|
|
276
|
-
const { icon, color, children, onPress, disabled, rightSection, style, ...others } =
|
|
280
|
+
const { icon, color, children, onPress, disabled, rightSection, style, withTextWrapper: shouldWrapInText, ...others } =
|
|
277
281
|
useComponentDefaultProps('MenuItem', defaultItemProps, props);
|
|
278
282
|
|
|
279
283
|
const { setOpened, closeOnItemClick } = useMenuContext();
|
|
@@ -304,19 +308,19 @@ const MenuItem = forwardRef<any, MenuItemProps>((props, ref) => {
|
|
|
304
308
|
{...others}
|
|
305
309
|
>
|
|
306
310
|
{icon && <BoxView style={styles.icon}>{icon}</BoxView>}
|
|
307
|
-
|
|
311
|
+
{withTextWrapper(children, shouldWrapInText, styles.label)}
|
|
308
312
|
{rightSection && <BoxView style={styles.rightSection}>{rightSection}</BoxView>}
|
|
309
313
|
</TouchableOpacity>
|
|
310
314
|
);
|
|
311
315
|
});
|
|
312
316
|
|
|
313
317
|
const MenuLabel = forwardRef<any, MenuLabelProps>((props, ref) => {
|
|
314
|
-
const { children, style, ...others } = props;
|
|
318
|
+
const { children, style, withTextWrapper: shouldWrapInText = true, ...others } = props;
|
|
315
319
|
const { styles, sx } = useLabelStyles({}, { name: 'MenuLabel' }) as any;
|
|
316
320
|
|
|
317
321
|
return (
|
|
318
322
|
<BoxView ref={ref} style={sx(styles.label, style)} {...others}>
|
|
319
|
-
|
|
323
|
+
{withTextWrapper(children, shouldWrapInText, styles.label)}
|
|
320
324
|
</BoxView>
|
|
321
325
|
);
|
|
322
326
|
});
|
|
@@ -110,10 +110,11 @@ const useStyles = createStyles(
|
|
|
110
110
|
return {
|
|
111
111
|
overlay: {
|
|
112
112
|
flex: 1,
|
|
113
|
-
backgroundColor: '
|
|
113
|
+
backgroundColor: 'transparent',
|
|
114
114
|
justifyContent: centered ? 'center' : 'flex-start',
|
|
115
115
|
alignItems: 'center',
|
|
116
116
|
paddingTop: (centered ? 0 : rem(60)) as any,
|
|
117
|
+
zIndex: 1001, // Ensure modal content is above backdrop
|
|
117
118
|
},
|
|
118
119
|
container: {
|
|
119
120
|
backgroundColor: theme.colorScheme === 'dark' ? (theme.colors.dark || [])[7] : theme.white,
|
|
@@ -124,6 +125,7 @@ const useStyles = createStyles(
|
|
|
124
125
|
...(fullScreen && {
|
|
125
126
|
height: '100%',
|
|
126
127
|
}),
|
|
128
|
+
zIndex: 1002, // Ensure modal content is above its parent overlay
|
|
127
129
|
},
|
|
128
130
|
header: {
|
|
129
131
|
padding: getPadding(),
|
|
@@ -254,24 +256,17 @@ export const Modal = forwardRef<any, ModalProps>((props, ref) => {
|
|
|
254
256
|
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
255
257
|
style={{ flex: 1 }}
|
|
256
258
|
>
|
|
259
|
+
{/* Full screen overlay backdrop */}
|
|
257
260
|
{withOverlay && (
|
|
258
|
-
<
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
]}
|
|
265
|
-
>
|
|
266
|
-
<Overlay
|
|
267
|
-
opacity={overlayOpacity}
|
|
268
|
-
color={overlayColor}
|
|
269
|
-
onPress={handleOverlayPress}
|
|
270
|
-
style={{ position: 'absolute' }}
|
|
271
|
-
/>
|
|
272
|
-
</Animated.View>
|
|
261
|
+
<Overlay
|
|
262
|
+
opacity={overlayOpacity}
|
|
263
|
+
color={overlayColor}
|
|
264
|
+
onPress={handleOverlayPress}
|
|
265
|
+
zIndex={1000}
|
|
266
|
+
/>
|
|
273
267
|
)}
|
|
274
268
|
|
|
269
|
+
{/* Modal container positioned over overlay */}
|
|
275
270
|
<TouchableOpacity
|
|
276
271
|
activeOpacity={1}
|
|
277
272
|
style={styles.overlay}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { UnstyledButton } from '../UnstyledButton';
|
|
3
3
|
import { BoxView } from '../BoxView';
|
|
4
|
-
import { Text } from '../Text';
|
|
5
4
|
import type {
|
|
6
5
|
DefaultProps,
|
|
7
6
|
MantineColor,
|
|
@@ -10,8 +9,9 @@ import type {
|
|
|
10
9
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
11
10
|
import { createStyles } from '../../theme';
|
|
12
11
|
import { rem } from '../../theme/utils/rem';
|
|
12
|
+
import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
13
13
|
|
|
14
|
-
export interface NavLinkProps extends DefaultProps {
|
|
14
|
+
export interface NavLinkProps extends DefaultProps, WithTextWrapperProps {
|
|
15
15
|
/** Link label */
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
|
|
@@ -156,6 +156,7 @@ const defaultProps: Partial<NavLinkProps> = {
|
|
|
156
156
|
active: false,
|
|
157
157
|
disabled: false,
|
|
158
158
|
disableIfNoPress: true,
|
|
159
|
+
withTextWrapper: true,
|
|
159
160
|
};
|
|
160
161
|
|
|
161
162
|
export const NavLink = forwardRef<any, NavLinkProps>((props, ref) => {
|
|
@@ -172,6 +173,7 @@ export const NavLink = forwardRef<any, NavLinkProps>((props, ref) => {
|
|
|
172
173
|
onPress,
|
|
173
174
|
style,
|
|
174
175
|
disableIfNoPress,
|
|
176
|
+
withTextWrapper: shouldWrapInText,
|
|
175
177
|
...others
|
|
176
178
|
} = useComponentDefaultProps('NavLink', defaultProps, props);
|
|
177
179
|
|
|
@@ -192,8 +194,8 @@ export const NavLink = forwardRef<any, NavLinkProps>((props, ref) => {
|
|
|
192
194
|
>
|
|
193
195
|
{icon && <BoxView style={styles.icon}>{icon}</BoxView>}
|
|
194
196
|
<BoxView style={styles.body}>
|
|
195
|
-
{label &&
|
|
196
|
-
{description &&
|
|
197
|
+
{label && withTextWrapper(label, shouldWrapInText, styles.label)}
|
|
198
|
+
{description && withTextWrapper(description, shouldWrapInText, styles.description)}
|
|
197
199
|
</BoxView>
|
|
198
200
|
{rightSection && <BoxView style={styles.rightSection}>{rightSection}</BoxView>}
|
|
199
201
|
</UnstyledButton>
|
|
@@ -6,8 +6,9 @@ import type { DefaultProps, MantineColor, MantineNumberSize } from '../../theme/
|
|
|
6
6
|
import { useComponentDefaultProps } from '../../theme/theme-provider';
|
|
7
7
|
import { createStyles } from '../../theme';
|
|
8
8
|
import { rem } from '../../theme/utils/rem';
|
|
9
|
+
import { withTextWrapper, type WithTextWrapperProps } from '../../theme/utils/withTextWrapper';
|
|
9
10
|
|
|
10
|
-
export interface NotificationProps extends DefaultProps {
|
|
11
|
+
export interface NotificationProps extends DefaultProps, WithTextWrapperProps {
|
|
11
12
|
/** Notification title */
|
|
12
13
|
title?: React.ReactNode;
|
|
13
14
|
|
|
@@ -128,6 +129,7 @@ const defaultProps: Partial<NotificationProps> = {
|
|
|
128
129
|
withCloseButton: true,
|
|
129
130
|
withBorder: true,
|
|
130
131
|
loading: false,
|
|
132
|
+
withTextWrapper: true,
|
|
131
133
|
};
|
|
132
134
|
|
|
133
135
|
export const Notification = forwardRef<any, NotificationProps>((props, ref) => {
|
|
@@ -142,6 +144,7 @@ export const Notification = forwardRef<any, NotificationProps>((props, ref) => {
|
|
|
142
144
|
loading,
|
|
143
145
|
withBorder,
|
|
144
146
|
style,
|
|
147
|
+
withTextWrapper: shouldWrapInText,
|
|
145
148
|
...others
|
|
146
149
|
} = useComponentDefaultProps('Notification', defaultProps, props);
|
|
147
150
|
|
|
@@ -155,12 +158,8 @@ export const Notification = forwardRef<any, NotificationProps>((props, ref) => {
|
|
|
155
158
|
{icon && <BoxView style={styles.icon}>{icon}</BoxView>}
|
|
156
159
|
|
|
157
160
|
<BoxView style={styles.body}>
|
|
158
|
-
{title && (
|
|
159
|
-
|
|
160
|
-
)}
|
|
161
|
-
{message && (
|
|
162
|
-
<Text style={styles.message}>{typeof message === 'string' ? message : message}</Text>
|
|
163
|
-
)}
|
|
161
|
+
{title && withTextWrapper(title, shouldWrapInText, styles.title)}
|
|
162
|
+
{message && withTextWrapper(message, shouldWrapInText, styles.message)}
|
|
164
163
|
</BoxView>
|
|
165
164
|
|
|
166
165
|
{withCloseButton && onClose && (
|