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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.rgba = rgba;
|
|
7
|
+
/**
|
|
8
|
+
* Converts a hex or rgb color string to rgba with the specified alpha value
|
|
9
|
+
* @param color - The color string (hex or rgb)
|
|
10
|
+
* @param alpha - Alpha value between 0 and 1
|
|
11
|
+
* @returns rgba color string
|
|
12
|
+
*/
|
|
13
|
+
function rgba(_theme) {
|
|
14
|
+
return (color, alpha) => {
|
|
15
|
+
// If it's already an rgba string, replace the alpha
|
|
16
|
+
if (color.startsWith('rgba')) {
|
|
17
|
+
return color.replace(/[\d.]+\)$/g, `${alpha})`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// If it's an rgb string, convert to rgba
|
|
21
|
+
if (color.startsWith('rgb(')) {
|
|
22
|
+
return color.replace('rgb(', 'rgba(').replace(')', `, ${alpha})`);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// If it's a hex color, convert to rgba
|
|
26
|
+
if (color.startsWith('#')) {
|
|
27
|
+
const hex = color.replace('#', '');
|
|
28
|
+
let r = 0;
|
|
29
|
+
let g = 0;
|
|
30
|
+
let b = 0;
|
|
31
|
+
if (hex.length === 3) {
|
|
32
|
+
r = parseInt(hex[0] + hex[0], 16);
|
|
33
|
+
g = parseInt(hex[1] + hex[1], 16);
|
|
34
|
+
b = parseInt(hex[2] + hex[2], 16);
|
|
35
|
+
} else if (hex.length === 6) {
|
|
36
|
+
r = parseInt(hex.slice(0, 2), 16);
|
|
37
|
+
g = parseInt(hex.slice(2, 4), 16);
|
|
38
|
+
b = parseInt(hex.slice(4, 6), 16);
|
|
39
|
+
} else {
|
|
40
|
+
// Invalid hex, return as is with alpha
|
|
41
|
+
return `rgba(0, 0, 0, ${alpha})`;
|
|
42
|
+
}
|
|
43
|
+
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// If we can't parse it, return as is
|
|
47
|
+
return color;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=rgba.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["rgba","_theme","color","alpha","startsWith","replace","hex","r","g","b","length","parseInt","slice"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/rgba.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAACC,KAAa,EAAEC,KAAa,KAAa;IAC/C;IACA,IAAID,KAAK,CAACE,UAAU,CAAC,M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AE,CAAC;MACnC,CAAC,MAAM;QACL;QACA,OAAO,iBAAiBT,KAAK,GAAG;MAClC;MAEA,OAAO,QAAQI,CAAC,KAAKC,CAAC,KAAKC,CAAC,KAAKN,KAAK,GAAG;IAC3C;;IAEA;IACA,OAAOD,KAAK;EACd,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.size = size;
|
|
7
|
+
var _index = require("../../get-size/index.js");
|
|
8
|
+
function size(_theme) {
|
|
9
|
+
return ({
|
|
10
|
+
size,
|
|
11
|
+
sizes
|
|
12
|
+
}) => {
|
|
13
|
+
return (0, _index.getSize)({
|
|
14
|
+
size,
|
|
15
|
+
sizes
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=size.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","size","_theme","sizes","getSize"],"sourceRoot":"../../../../../src","sources":["theme/functions/fns/size.ts"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,SAASC,IAAIA,CAACC,MAAW,EAAE;EAChC,OAAO,CAAiC;IACtCD,IAAI;IACJE;EAIF,CAAC,KAAa;IACZ,OAAO,IAAAC,cAAO,EAAC;MAAEH,IAAI;MAAEE;IAAM,CAAC,CAAC;EACjC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "em", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _rem.em;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "rem", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _rem.rem;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "withTextWrapper", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _withTextWrapper.withTextWrapper;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _rem = require("./rem.js");
|
|
25
|
+
var _withTextWrapper = require("./withTextWrapper.js");
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_rem","require","_withTextWrapper"],"sourceRoot":"../../../../src","sources":["theme/utils/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withTextWrapper = withTextWrapper;
|
|
7
|
+
var _index = require("../../components/Text/index.js");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
/**
|
|
10
|
+
* Conditionally wraps content in a Text component based on the withTextWrapper prop.
|
|
11
|
+
*
|
|
12
|
+
* In React Native, all text must be wrapped in a Text component. However, some
|
|
13
|
+
* components may need flexibility to render with or without this wrapper depending
|
|
14
|
+
* on whether their content is text or other components (like icons, views, etc.).
|
|
15
|
+
*
|
|
16
|
+
* @param children - The content to potentially wrap
|
|
17
|
+
* @param shouldWrap - Whether to wrap the content in a Text component
|
|
18
|
+
* @param textStyle - Optional style to apply to the Text wrapper
|
|
19
|
+
* @param textProps - Optional additional props to pass to the Text component
|
|
20
|
+
* @returns The children wrapped in Text if shouldWrap is true, otherwise just the children
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Wrap text content
|
|
24
|
+
* withTextWrapper('Hello', true, styles.text)
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Don't wrap components
|
|
28
|
+
* withTextWrapper(<Icon />, false)
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // Default behavior (wrap)
|
|
32
|
+
* withTextWrapper('Text', true, styles.text, { numberOfLines: 1 })
|
|
33
|
+
*/
|
|
34
|
+
function withTextWrapper(children, shouldWrap = true, textStyle, textProps) {
|
|
35
|
+
if (!shouldWrap) {
|
|
36
|
+
return children;
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Text, {
|
|
39
|
+
style: textStyle,
|
|
40
|
+
...textProps,
|
|
41
|
+
children: children
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Type helper for components that support the withTextWrapper pattern.
|
|
47
|
+
* Add this to your component props interface.
|
|
48
|
+
*/
|
|
49
|
+
//# sourceMappingURL=withTextWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","_jsxRuntime","withTextWrapper","children","shouldWrap","textStyle","textProps","jsx","Text","style"],"sourceRoot":"../../../../src","sources":["theme/utils/withTextWrapper.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAA6C,IAAAC,WAAA,GAAAD,OAAA;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,eAAeA,CAC7BC,QAAmB,EACnBC,UAAmB,GAAG,IAAI,EAC1BC,SAAe,EACfC,SAAiD,EACtC;EACX,IAAI,CAACF,UAAU,EAAE;IACf,OAAOD,QAAQ;EACjB;EAEA,oBACE,IAAAF,WAAA,CAAAM,GAAA,EAACR,MAAA,CAAAS,IAAI;IAACC,KAAK,EAAEJ,SAAU;IAAA,GAAKC,SAAS;IAAAH,QAAA,EAClCA;EAAQ,CACL,CAAC;AAEX;;AAEA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -56,7 +56,8 @@ const defaultProps = {
|
|
|
56
56
|
size: 'md',
|
|
57
57
|
weight: '400',
|
|
58
58
|
underline: true,
|
|
59
|
-
variant: 'link'
|
|
59
|
+
variant: 'link',
|
|
60
|
+
withTextWrapper: true
|
|
60
61
|
};
|
|
61
62
|
export const Anchor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
62
63
|
const {
|
|
@@ -69,6 +70,7 @@ export const Anchor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
69
70
|
onPress,
|
|
70
71
|
children,
|
|
71
72
|
style,
|
|
73
|
+
withTextWrapper: shouldWrapInText,
|
|
72
74
|
...others
|
|
73
75
|
} = useComponentDefaultProps('Anchor', defaultProps, props);
|
|
74
76
|
const {
|
|
@@ -90,6 +92,9 @@ export const Anchor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
90
92
|
Linking.openURL(href).catch(err => console.error('Failed to open URL:', err));
|
|
91
93
|
}
|
|
92
94
|
};
|
|
95
|
+
if (!shouldWrapInText) {
|
|
96
|
+
return children;
|
|
97
|
+
}
|
|
93
98
|
return /*#__PURE__*/_jsx(Text, {
|
|
94
99
|
ref: ref,
|
|
95
100
|
style: sx(styles.root, style),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","Linking","Text","useComponentDefaultProps","createStyles","rem","jsx","_jsx","sizes","xs","sm","md","lg","xl","useStyles","theme","color","size","weight","underline","variant","colors","primaryColor","fontSize","getVariantStyles","primaryBgColor","textDecorationLine","colorScheme","dark","white","black","root","fontWeight","defaultProps","Anchor","props","ref","href","onPress","children","style","others","styles","sx","name","handlePress","openURL","catch","err","console","error","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAAyBC,OAAO,QAAwB,cAAc;AACtE,SAASC,IAAI,QAAQ,kBAAS;AAO9B,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Linking","Text","useComponentDefaultProps","createStyles","rem","jsx","_jsx","sizes","xs","sm","md","lg","xl","useStyles","theme","color","size","weight","underline","variant","colors","primaryColor","fontSize","getVariantStyles","primaryBgColor","textDecorationLine","colorScheme","dark","white","black","root","fontWeight","defaultProps","withTextWrapper","Anchor","props","ref","href","onPress","children","style","shouldWrapInText","others","styles","sx","name","handlePress","openURL","catch","err","console","error","displayName"],"sourceRoot":"../../../../src","sources":["components/Anchor/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAAyBC,OAAO,QAAwB,cAAc;AACtE,SAASC,IAAI,QAAQ,kBAAS;AAO9B,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgC5C,MAAMC,KAAK,GAAG;EACZC,EAAE,EAAEJ,GAAG,CAAC,EAAE,CAAC;EACXK,EAAE,EAAEL,GAAG,CAAC,EAAE,CAAC;EACXM,EAAE,EAAEN,GAAG,CAAC,EAAE,CAAC;EACXO,EAAE,EAAEP,GAAG,CAAC,EAAE,CAAC;EACXQ,EAAE,EAAER,GAAG,CAAC,EAAE;AACZ,CAAC;AAED,MAAMS,SAAS,GAAGV,YAAY,CAC5B,CACEW,KAAK,EACL;EACEC,KAAK;EACLC,IAAI;EACJC,MAAM;EACNC;AAMF,CAAC,EACD;EAAEC;AAAQ,CAAC,KACR;EACH,MAAMC,M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AAK,EAAEC,GAAG,KAAK;EACpE,MAAM;IAAErB,KAAK;IAAEC,IAAI;IAAEC,MAAM;IAAEC,SAAS;IAAEC,OAAO;IAAEkB,IAAI;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,KAAK;IAAEP,eAAe,EAAEQ,gBAAgB;IAAE,GAAGC;EAAM,CAAC,GAC5HxC,wBAAwB,CAAC,QAAQ,EAAE8B,YAAY,EAAEG,KAAK,CAAC;EAEzD,MAAM;IAAEQ,MAAM;IAAEC;EAAE,CAAC,GAAG/B,SAAS,CAC7B;IAAEE,KAAK;IAAEC,IAAI;IAAEC,MAAM;IAAEC;EAAU,CAAC,EAClC;IAAE2B,IAAI,EAAE,QAAQ;IAAE1B;EAAQ,CAC5B,CAAQ;EAER,MAAM2B,WAAW,GAAGA,CAAA,KAAM;IACxB,IAAIR,OAAO,EAAE;MACXA,OAAO,CAAC,CAAC;IACX,CAAC,MAAM,IAAID,IAAI,EAAE;MACfrC,OAAO,CAAC+C,OAAO,CAACV,IAAI,CAAC,CAACW,KAAK,CAAEC,GAAG,IAC9BC,OAAO,CAACC,KAAK,CAAC,qBAAqB,EAAEF,GAAG,CAC1C,CAAC;IACH;EACF,CAAC;EAED,IAAI,CAACR,gBAAgB,EAAE;IACrB,OAAOF,QAAQ;EACjB;EAEA,oBACEjC,IAAA,CAACL,IAAI;IACHmC,GAAG,EAAEA,GAAI;IACTI,KAAK,EAAEI,EAAE,CAACD,MAAM,CAACb,IAAI,EAAEU,KAAK,CAAE;IAC9BF,OAAO,EAAEQ,WAAY;IAAA,GACjBJ,MAAM;IAAAH,QAAA,EAETA;EAAQ,CACL,CAAC;AAEX,CAAC,CAAC;AAEFL,MAAM,CAACkB,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { Text } from "../Text/index.js";
|
|
5
4
|
import { BoxView } from "../BoxView/index.js";
|
|
6
5
|
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
7
6
|
import { createStyles } from "../../theme/index.js";
|
|
8
7
|
import { rem } from "../../theme/utils/rem.js";
|
|
8
|
+
import { withTextWrapper } from "../../theme/utils/withTextWrapper.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const sizes = {
|
|
11
11
|
xs: {
|
|
@@ -132,7 +132,8 @@ const defaultProps = {
|
|
|
132
132
|
variant: 'light',
|
|
133
133
|
size: 'md',
|
|
134
134
|
radius: 'xl',
|
|
135
|
-
fullWidth: false
|
|
135
|
+
fullWidth: false,
|
|
136
|
+
withTextWrapper: true
|
|
136
137
|
};
|
|
137
138
|
export const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
138
139
|
const {
|
|
@@ -145,6 +146,7 @@ export const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
145
146
|
rightSection,
|
|
146
147
|
children,
|
|
147
148
|
style,
|
|
149
|
+
withTextWrapper: shouldWrapInText,
|
|
148
150
|
...others
|
|
149
151
|
} = useComponentDefaultProps('Badge', defaultProps, props);
|
|
150
152
|
const {
|
|
@@ -170,10 +172,7 @@ export const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
170
172
|
}), leftSection && /*#__PURE__*/_jsx(BoxView, {
|
|
171
173
|
style: styles.leftSection,
|
|
172
174
|
children: leftSection
|
|
173
|
-
}), /*#__PURE__*/_jsx(
|
|
174
|
-
style: styles.label,
|
|
175
|
-
children: children
|
|
176
|
-
}), rightSection && /*#__PURE__*/_jsx(BoxView, {
|
|
175
|
+
}), withTextWrapper(children, shouldWrapInText, styles.label), rightSection && /*#__PURE__*/_jsx(BoxView, {
|
|
177
176
|
style: styles.rightSection,
|
|
178
177
|
children: rightSection
|
|
179
178
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","BoxView","useComponentDefaultProps","createStyles","rem","withTextWrapper","jsx","_jsx","jsxs","_jsxs","sizes","xs","fontSize","height","paddingHorizontal","sm","md","lg","xl","dotSizes","useStyles","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","Badge","props","ref","children","style","shouldWrapInText","others","styles","sx","name","displayName"],"sourceRoot":"../../../../src","sources":["components/Badge/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,OAAO,QAAQ,qBAAY;AAQpC,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAC3C,SAASC,eAAe,QAAmC,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA+B/F,MAAMC,KAAK,GAAG;EACZC,EAAE,EAAE;IAAEC,QAAQ,EAAER,GAAG,CAAC,CAAC,CAAC;IAAES,MAAM,EAAET,GAAG,CAAC,EAAE,CAAQ;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,CAAC;EAAS,CAAC;EAClFW,EAAE,EAAE;IAAEH,QAAQ,EAAER,GAAG,CAAC,EAAE,CAAC;IAAES,MAAM,EAAET,GAAG,CAAC,EAAE,CAAQ;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,CAAC;EAAS,CAAC;EACnFY,EAAE,EAAE;IAAEJ,QAAQ,EAAER,GAAG,CAAC,EAAE,CAAC;IAAES,MAAM,EAAET,GAAG,CAAC,EAAE,CAAQ;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,EAAE;EAAS,CAAC;EACpFa,EAAE,E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,MAAM,CAACV,KAAK,CAAC,EACzDH,YAAY,iBAAI/C,IAAA,CAACN,OAAO;QAAC+D,KAAK,EAAEG,MAAM,CAACb,YAAa;QAAAS,QAAA,EAAET;MAAY,CAAU,CAAC;IAAA,CACvE;EAAC,CACH,CAAC;AAEd,CAAC,CAAC;AAEFM,KAAK,CAACU,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { BoxView } from "../BoxView/index.js";
|
|
5
|
-
import { Text } from "../Text/index.js";
|
|
6
5
|
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
7
6
|
import { createStyles } from "../../theme/index.js";
|
|
8
7
|
import { rem } from "../../theme/utils/rem.js";
|
|
8
|
+
import { withTextWrapper } from "../../theme/utils/withTextWrapper.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const useStyles = createStyles((theme, {
|
|
11
11
|
color,
|
|
@@ -45,7 +45,8 @@ const useStyles = createStyles((theme, {
|
|
|
45
45
|
});
|
|
46
46
|
const defaultProps = {
|
|
47
47
|
color: 'blue',
|
|
48
|
-
radius: 'sm'
|
|
48
|
+
radius: 'sm',
|
|
49
|
+
withTextWrapper: true
|
|
49
50
|
};
|
|
50
51
|
export const Blockquote = /*#__PURE__*/forwardRef((props, ref) => {
|
|
51
52
|
const {
|
|
@@ -54,7 +55,8 @@ export const Blockquote = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
54
55
|
cite,
|
|
55
56
|
radius,
|
|
56
57
|
children,
|
|
57
|
-
style
|
|
58
|
+
style,
|
|
59
|
+
withTextWrapper: shouldWrapInText
|
|
58
60
|
} = useComponentDefaultProps('Blockquote', defaultProps, props);
|
|
59
61
|
const {
|
|
60
62
|
styles,
|
|
@@ -77,13 +79,7 @@ export const Blockquote = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
77
79
|
children: icon
|
|
78
80
|
}), /*#__PURE__*/_jsxs(BoxView, {
|
|
79
81
|
style: styles.body,
|
|
80
|
-
children: [
|
|
81
|
-
style: styles.content,
|
|
82
|
-
children: children
|
|
83
|
-
}), cite && /*#__PURE__*/_jsx(Text, {
|
|
84
|
-
style: styles.cite,
|
|
85
|
-
children: cite
|
|
86
|
-
})]
|
|
82
|
+
children: [withTextWrapper(children, shouldWrapInText, styles.content), cite && withTextWrapper(cite, shouldWrapInText, styles.cite)]
|
|
87
83
|
})]
|
|
88
84
|
})
|
|
89
85
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","BoxView","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","BoxView","useComponentDefaultProps","createStyles","rem","withTextWrapper","jsx","_jsx","jsxs","_jsxs","useStyles","theme","color","radius","colors","primaryColor","root","backgroundColor","colorScheme","dark","gray","borderLeftWidth","borderLeftColor","primaryBgColor","borderRadius","fn","padding","spacing","md","inner","flexDirection","icon","marginRight","marginTop","body","flex","content","fontSize","lineHeight","white","black","marginBottom","cite","xs","defaultProps","Blockquote","props","ref","children","style","shouldWrapInText","styles","sx","others","name","displayName"],"sourceRoot":"../../../../src","sources":["components/Blockquote/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,OAAO,QAAQ,qBAAY;AAMpC,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAC3C,SAASC,eAAe,QAAmC,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAsB/F,MAAMC,SAAS,GAAGP,YAAY,CAC5B,CACEQ,KAAK,EACL;EACEC,KAAK;EACLC;AAIF,CAAC,KACE;EACH,MAAMC,MAAM,GAAGH,KAAK,CAACG,MAAM,CAACF,KAAK,CAAC,IAAID,KAAK,CA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AAA,CAACR,OAAO;QAACgD,KAAK,EAAEE,MAAM,CAACjB,IAAK;QAAAc,QAAA,GACzB3C,eAAe,CAAC2C,QAAQ,EAAEE,gBAAgB,EAAEC,MAAM,CAACf,OAAO,CAAC,EAC3DM,IAAI,IAAIrC,eAAe,CAACqC,IAAI,EAAEQ,gBAAgB,EAAEC,MAAM,CAACT,IAAI,CAAC;MAAA,CACtD,CAAC;IAAA,CACH;EAAC,CACH,CAAC;AAEd,CAAC,CAAC;AAEFG,UAAU,CAACU,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -177,10 +177,8 @@ const useStyles = createStyles((theme, {
|
|
|
177
177
|
},
|
|
178
178
|
inner: {
|
|
179
179
|
display: 'flex',
|
|
180
|
-
alignItems: 'center',
|
|
181
|
-
justifyContent: 'center',
|
|
182
180
|
height: '100%',
|
|
183
|
-
|
|
181
|
+
flex: 1
|
|
184
182
|
},
|
|
185
183
|
label: {
|
|
186
184
|
whiteSpace: 'nowrap',
|
|
@@ -188,7 +186,9 @@ const useStyles = createStyles((theme, {
|
|
|
188
186
|
overflow: 'hidden',
|
|
189
187
|
display: 'flex',
|
|
190
188
|
alignItems: 'center',
|
|
191
|
-
justifyContent: 'center'
|
|
189
|
+
justifyContent: 'center',
|
|
190
|
+
flexDirection: 'row',
|
|
191
|
+
flex: 1
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createStyles","getSize","rem","INPUT_SIZES","BUTTON_VARIANTS","sizes","height","xs","paddingLeft","paddingRight","sm","md","lg","xl","getSizeStyles","size","withLeftIcon","withRightIcon","_sizes","getWidthStyles","fullWidth","display","width","getVariantStyles","variant","theme","color","gradient","includes","colors","fn","backgroundColor","background","borderWidth","borderStyle","borderColor","border","useStyles","radius","compact","root","fontStyles","focusStyles","fontSizes","activeStyles","gray","transform","content","cover","borderRadius","cursor","icon","alignItems","leftIcon","marginRight","spacing","rightIcon","marginLeft","centerLoader","position","left","opacity","inner","
|
|
1
|
+
{"version":3,"names":["createStyles","getSize","rem","INPUT_SIZES","BUTTON_VARIANTS","sizes","height","xs","paddingLeft","paddingRight","sm","md","lg","xl","getSizeStyles","size","withLeftIcon","withRightIcon","_sizes","getWidthStyles","fullWidth","display","width","getVariantStyles","variant","theme","color","gradient","includes","colors","fn","backgroundColor","background","borderWidth","borderStyle","borderColor","border","useStyles","radius","compact","root","fontStyles","focusStyles","fontSizes","activeStyles","gray","transform","content","cover","borderRadius","cursor","icon","alignItems","leftIcon","marginRight","spacing","rightIcon","marginLeft","centerLoader","position","left","opacity","inner","flex","label","whiteSpace","overflow","justifyContent","flexDirection"],"sourceRoot":"../../../../src","sources":["components/Button/Button.styles.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,OAAO,QAAQ,sBAAa;AAEnD,SAASC,GAAG,QAAQ,0BAAuB;AAC3C,SAASC,WAAW,QAAQ,mBAAU;AAEtC,OAAO,MAAMC,eAAe,GAAG,CAC7B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,CACX;AAYD,OAAO,MAAMC,KAAK,GAAG;EACnB,IAAI,EAAE;IAAEC,MAAM,EAAEH,WAAW,CAACI,EAAE;IAAEC,WAAW,EAAEN,GAAG,CAAC,EAAE,CAAC;IAAEO,YAAY,EAAEP,GAAG,CAAC,EAAE;EAAE,CAAC;EAC7E,IAAI,EAAE;IAAEI,MAAM,EAAEH,WAAW,CAACO,EAAE;IAAEF,WAAW,EAAEN,GAAG,CAAC,EAAE,CAAC;IAAEO,YAAY,EAAEP,GAAG,CAAC,EAAE;EAAE,CAAC;EAC7E,IAAI,EAAE;IAAEI,MAAM,EAAEH,WAAW,CAACQ,EAAE;IAAEH,WAAW,EAAEN,GAAG,CAAC,EAAE,CAAC;IAAEO,YAAY,EAAEP,GAAG,CAAC,EAAE;EAAE,CAAC;EAC7E,IAAI,EAAE;IAAEI,MAAM,EAAEH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AAM;MACf+B,UAAU,EAAE;IACd,CAAC;IAEDC,QAAQ,EAAE;MACRC,WAAW,EAAE7B,KAAK,CAAC8B,OAAO,CAAChD;IAC7B,CAAC;IAEDiD,SAAS,EAAE;MACTC,UAAU,EAAEhC,KAAK,CAAC8B,OAAO,CAAChD;IAC5B,CAAC;IAEDmD,YAAY,EAAE;MACZC,QAAQ,EAAE,UAAU;MACpBC,IAAI,EAAE,KAAK;MACXd,SAAS,EAAE,kBAAkB;MAC7Be,OAAO,EAAE;IACX,CAAC;IAEDC,KAAK,EAAE;MACLzC,OAAO,EAAE,MAAM;MACff,MAAM,EAAE,MAAM;MACdyD,IAAI,EAAE;IACR,CAAC;IAEDC,KAAK,EAAE;MACLC,UAAU,EAAE,QAAQ;MACpB3D,MAAM,EAAE,MAAM;MACd4D,QAAQ,EAAE,QAAQ;MAClB7C,OAAO,EAAE,MAAM;MACf+B,UAAU,EAAE,QAAQ;MACpBe,cAAc,EAAE,QAAQ;MACxBC,aAAa,EAAE,KAAK;MACpBL,IAAI,EAAE;IACR;EACF,CAAC;AACH,CACF,CAAC;AACD,eAAe1B,SAAS","ignoreList":[]}
|
|
@@ -6,13 +6,14 @@ import { ActivityIndicator } from 'react-native';
|
|
|
6
6
|
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
7
7
|
import useStyles from "./Button.styles.js";
|
|
8
8
|
import { BoxView } from "../BoxView/index.js";
|
|
9
|
-
import {
|
|
9
|
+
import { withTextWrapper } from "../../theme/utils/withTextWrapper.js";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const defaultProps = {
|
|
12
12
|
size: 'sm',
|
|
13
13
|
type: 'button',
|
|
14
14
|
variant: 'filled',
|
|
15
|
-
loaderPosition: 'left'
|
|
15
|
+
loaderPosition: 'left',
|
|
16
|
+
withTextWrapper: true
|
|
16
17
|
};
|
|
17
18
|
export const _Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
19
|
const {
|
|
@@ -33,6 +34,7 @@ export const _Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
33
34
|
loaderProps,
|
|
34
35
|
gradient,
|
|
35
36
|
style,
|
|
37
|
+
withTextWrapper: shouldWrapInText,
|
|
36
38
|
...others
|
|
37
39
|
} = useComponentDefaultProps('Button', defaultProps, props);
|
|
38
40
|
const {
|
|
@@ -59,23 +61,21 @@ export const _Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
59
61
|
"data-loading": loading || undefined,
|
|
60
62
|
ref: ref,
|
|
61
63
|
...others,
|
|
62
|
-
children: /*#__PURE__*/
|
|
64
|
+
children: /*#__PURE__*/_jsx(BoxView, {
|
|
63
65
|
style: styles.inner,
|
|
64
|
-
children:
|
|
65
|
-
style: sx(styles.icon, styles.leftIcon),
|
|
66
|
-
children: loading && loaderPosition === 'left' ? loader : leftIcon
|
|
67
|
-
}), loading && loaderPosition === 'center' && /*#__PURE__*/_jsx(BoxView, {
|
|
68
|
-
style: styles.centerLoader,
|
|
69
|
-
children: loader
|
|
70
|
-
}), /*#__PURE__*/_jsx(BoxView, {
|
|
66
|
+
children: /*#__PURE__*/_jsxs(BoxView, {
|
|
71
67
|
style: styles.label,
|
|
72
|
-
children:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
children: [(leftIcon || loading && loaderPosition === 'left') && /*#__PURE__*/_jsx(BoxView, {
|
|
69
|
+
style: sx(styles.icon, styles.leftIcon),
|
|
70
|
+
children: loading && loaderPosition === 'left' ? loader : leftIcon
|
|
71
|
+
}), loading && loaderPosition === 'center' && /*#__PURE__*/_jsx(BoxView, {
|
|
72
|
+
style: styles.centerLoader,
|
|
73
|
+
children: loader
|
|
74
|
+
}), withTextWrapper(children, shouldWrapInText), (rightIcon || loading && loaderPosition === 'right') && /*#__PURE__*/_jsx(BoxView, {
|
|
75
|
+
style: sx(styles.icon, styles.rightIcon),
|
|
76
|
+
children: loading && loaderPosition === 'right' ? loader : rightIcon
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
79
|
})
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","UnstyledButton","ActivityIndicator","useComponentDefaultProps","useStyles","BoxView","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","UnstyledButton","ActivityIndicator","useComponentDefaultProps","useStyles","BoxView","withTextWrapper","jsx","_jsx","jsxs","_jsxs","defaultProps","size","type","variant","loaderPosition","_Button","props","ref","color","disabled","children","leftIcon","rightIcon","fullWidth","radius","uppercase","compact","loading","loaderProps","gradient","style","shouldWrapInText","others","styles","sx","withLeftIcon","withRightIcon","name","loader","root","undefined","inner","label","icon","centerLoader","Button"],"sourceRoot":"../../../../src","sources":["components/Button/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,cAAc,QAAQ,4BAAmB;AAUlD,SAASC,iBAAiB,QAAc,cAAc;AACtD,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,OAAOC,SAAS,MAAM,oBAAiB;AACvC,SAASC,OAAO,QAAQ,qBAAY;AACpC,SAASC,eAAe,QAAmC,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA0D/F,MAAMC,YAAkC,GAAG;EACzCC,IAAI,EAAE,IAAI;EACVC,IAAI,EAAE,QAAQ;EACdC,OAAO,EAAE,QAAQ;EACjBC,cAAc,EAAE,MAAM;EACtBT,eAAe,EAAE;AACnB,CAAC;AAED,OAAO,MAAMU,OAAO,gBAAGhB,UAAU,CAAoB,CAACiB,KAAK,EAAEC,GAAG,KAAK;EACnE,MAAM;IACJN,IAAI;IACJO,KAAK;IACLN,IAAI;IACJO,QAAQ;IACRC,QAAQ;IACRC,QAAQ;IACRC,SAAS;IACTC,SAAS;IACTV,OAAO;IACPW,MAAM;IACNC,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AAK,QAAQ,iBACrCP,IAAA,CAACH,OAAO;UAAC0B,KAAK,EAAEG,MAAM,CAACW,YAAa;UAAAxB,QAAA,EAAEkB;QAAM,CAAU,CACvD,EACAjC,eAAe,CAACe,QAAQ,EAAEW,gBAAgB,CAAC,EAC3C,CAACT,SAAS,IAAKK,OAAO,IAAIb,cAAc,KAAK,OAAQ,kBACpDP,IAAA,CAACH,OAAO;UAAC0B,KAAK,EAAEI,EAAE,CAACD,MAAM,CAACU,IAAI,EAAEV,MAAM,CAACX,SAAS,CAAE;UAAAF,QAAA,EAC/CO,OAAO,IAAIb,cAAc,KAAK,OAAO,GAAGwB,MAAM,GAAGhB;QAAS,CACpD,CACV;MAAA,CACM;IAAC,CACH;EAAC,CACI,CAAC;AAErB,CAAC,CAAQ;AAET,OAAO,MAAMuB,MAAM,GAAG9B,OAAO","ignoreList":[]}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { TouchableOpacity } from 'react-native';
|
|
5
5
|
import { BoxView } from "../BoxView/index.js";
|
|
6
|
-
import { Text } from "../Text/index.js";
|
|
7
6
|
import { useComponentDefaultProps } from "../../theme/theme-provider.js";
|
|
8
7
|
import { createStyles } from "../../theme/index.js";
|
|
9
8
|
import { rem } from "../../theme/utils/rem.js";
|
|
9
|
+
import { withTextWrapper } from "../../theme/utils/withTextWrapper.js";
|
|
10
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const sizes = {
|
|
12
12
|
xs: {
|
|
@@ -120,7 +120,8 @@ const defaultProps = {
|
|
|
120
120
|
radius: 'xl',
|
|
121
121
|
variant: 'filled',
|
|
122
122
|
disabled: false,
|
|
123
|
-
type: 'checkbox'
|
|
123
|
+
type: 'checkbox',
|
|
124
|
+
withTextWrapper: true
|
|
124
125
|
};
|
|
125
126
|
export const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
126
127
|
const {
|
|
@@ -138,6 +139,7 @@ export const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
138
139
|
textStyle,
|
|
139
140
|
value,
|
|
140
141
|
type,
|
|
142
|
+
withTextWrapper: shouldWrapInText,
|
|
141
143
|
...others
|
|
142
144
|
} = useComponentDefaultProps('Chip', defaultProps, props);
|
|
143
145
|
const [uncontrolledChecked, setUncontrolledChecked] = React.useState(defaultChecked || false);
|
|
@@ -174,10 +176,7 @@ export const Chip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
174
176
|
children: [showIcon && /*#__PURE__*/_jsx(BoxView, {
|
|
175
177
|
style: styles.icon,
|
|
176
178
|
children: icon
|
|
177
|
-
}),
|
|
178
|
-
style: sx(styles.text, textStyle),
|
|
179
|
-
children: children
|
|
180
|
-
})]
|
|
179
|
+
}), withTextWrapper(children, shouldWrapInText, sx(styles.text, textStyle))]
|
|
181
180
|
});
|
|
182
181
|
});
|
|
183
182
|
Chip.displayName = 'Chip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","TouchableOpacity","BoxView","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","TouchableOpacity","BoxView","useComponentDefaultProps","createStyles","rem","withTextWrapper","jsx","_jsx","jsxs","_jsxs","sizes","xs","height","fontSize","paddingHorizontal","sm","md","lg","xl","useStyles","theme","size","color","radius","variant","checked","disabled","colors","primaryColor","sizeStyles","getVariantStyles","backgroundColor","colorScheme","dark","gray","borderWidth","borderColor","primaryBgColor","fn","rgba","getTextColor","white","black","root","flexDirection","alignItems","justifyContent","borderRadius","opacity","icon","marginRight","text","fontWeight","defaultProps","type","Chip","props","ref","children","controlledChecked","defaultChecked","onChange","style","textStyle","value","shouldWrapInText","others","uncontrolledChecked","setUncontrolledChecked","useState","undefined","styles","sx","name","handlePress","newChecked","showIcon","onPress","activeOpacity","displayName","useGroupStyles","_theme","spacing","_spacing","flexWrap","gap","defaultGroupProps","multiple","ChipGroup","controlledValue","defaultValue","otherProps","uncontrolledValue","setUncontrolledValue","handleChipChange","chipValue","newValue","currentArray","Array","isArray","filter","v","isChecked","includes","enhancedChildren","Children","map","child","isValidElement","cloneElement","Group"],"sourceRoot":"../../../../src","sources":["components/Chip/index.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,gBAAgB,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,qBAAY;AAQpC,SAASC,wBAAwB,QAAQ,+BAA4B;AACrE,SAASC,YAAY,QAAQ,sBAAa;AAC1C,SAASC,GAAG,QAAQ,0BAAuB;AAC3C,SAASC,eAAe,QAAmC,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA8C/F,MAAMC,KAAK,GAAG;EACZC,EAAE,EAAE;IAAEC,MAAM,EAAER,GAAG,CAAC,EAAE,CAAQ;IAAES,QAAQ,EAAET,GAAG,CAAC,EAAE,CAAC;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,CAAC;EAAS,CAAC;EACnFW,EAAE,EAAE;IAAEH,MAAM,EAAER,GAAG,CAAC,EAAE,CAAQ;IAAES,QAAQ,EAAET,GAAG,CAAC,EAAE,CAAC;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,EAAE;EAAS,CAAC;EACpFY,EAAE,EAAE;IAAEJ,MAAM,EAAER,GAAG,CAAC,EAAE,CAAQ;IAAES,QAAQ,EAAET,GAAG,CAAC,EAAE,CAAC;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,EAAE;EAAS,CAAC;EACpFa,EAAE,EAAE;IAAEL,MAAM,EAAER,GAAG,CAAC,EAAE,CAAQ;IAAES,QAAQ,EAAET,GAAG,CAAC,EAAE,CAAC;IAAEU,iBAAiB,EAAEV,GAAG,CAAC,EAAE;EAAS,CAAC;EACpFc,EAAE,EAAE;IAAEN,MAAM,EAAER,GAAG,CAAC,EAAE,CAAQ;IAAES,QAAQ,EAAET,GAAG,CAAC,EAAE,CAAC;I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