@nexara/nativeflow 0.1.6 → 0.1.8
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 -1
- package/lib/commonjs/components/Avatar/AvatarImage.js +3 -9
- package/lib/commonjs/components/Avatar/AvatarImage.js.map +1 -1
- package/lib/commonjs/components/Avatar/AvatarText.js +2 -4
- package/lib/commonjs/components/Avatar/AvatarText.js.map +1 -1
- package/lib/commonjs/components/Button/Button.js +24 -23
- package/lib/commonjs/components/Button/Button.js.map +1 -1
- package/lib/commonjs/components/Button/utils.js +34 -27
- package/lib/commonjs/components/Button/utils.js.map +1 -1
- package/lib/commonjs/components/CheckBox/CheckBox.js +43 -39
- package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/commonjs/components/Chip/Chip.js +21 -25
- package/lib/commonjs/components/Chip/Chip.js.map +1 -1
- package/lib/commonjs/components/Chip/utils.js +31 -18
- package/lib/commonjs/components/Chip/utils.js.map +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +14 -10
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogBody.js +7 -7
- package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogDescription.js +7 -9
- package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogFoot.js +13 -16
- package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogHead.js +22 -27
- package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
- package/lib/commonjs/components/Divider/Divider.js +4 -8
- package/lib/commonjs/components/Divider/Divider.js.map +1 -1
- package/lib/commonjs/components/Grid/Grid.js +3 -4
- package/lib/commonjs/components/Grid/Grid.js.map +1 -1
- package/lib/commonjs/components/Icon/Icon.js +4 -5
- package/lib/commonjs/components/Icon/Icon.js.map +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +21 -20
- package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/components/Link/Link.js +13 -17
- package/lib/commonjs/components/Link/Link.js.map +1 -1
- package/lib/commonjs/components/Menu/Menu.js +14 -9
- package/lib/commonjs/components/Menu/Menu.js.map +1 -1
- package/lib/commonjs/components/Menu/MenuItem.js +3 -5
- package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
- package/lib/commonjs/components/Menu/MenuItemLabel.js +2 -8
- package/lib/commonjs/components/Menu/MenuItemLabel.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalContext.js +1 -2
- package/lib/commonjs/components/Portal/PortalContext.js.map +1 -1
- package/lib/commonjs/components/Portal/PortalProvider.js +1 -2
- package/lib/commonjs/components/Portal/PortalProvider.js.map +1 -1
- package/lib/commonjs/components/Progress/Progress.js +6 -7
- package/lib/commonjs/components/Progress/Progress.js.map +1 -1
- package/lib/commonjs/components/Provider/ContextManager.js +16 -0
- package/lib/commonjs/components/Provider/ContextManager.js.map +1 -0
- package/lib/commonjs/components/Provider/NativeProvider.js +18 -9
- package/lib/commonjs/components/Provider/NativeProvider.js.map +1 -1
- package/lib/commonjs/components/Radio/RadioGroup.js +46 -0
- package/lib/commonjs/components/Radio/RadioGroup.js.map +1 -0
- package/lib/commonjs/components/Radio/RadioItem.js +77 -0
- package/lib/commonjs/components/Radio/RadioItem.js.map +1 -0
- package/lib/commonjs/components/Radio/index.js +15 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Slider/Slider.js +4 -4
- package/lib/commonjs/components/Slider/Slider.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +3 -9
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +4 -10
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledText.js +20 -9
- package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledView.js +6 -8
- package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/commonjs/components/Surface/Surface.js +24 -21
- package/lib/commonjs/components/Surface/Surface.js.map +1 -1
- package/lib/commonjs/components/Switch/Switch.js +13 -10
- package/lib/commonjs/components/Switch/Switch.js.map +1 -1
- package/lib/commonjs/components/UserInput/UserInput.js +23 -18
- package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
- package/lib/commonjs/components/UserInput/generateColors.js +3 -3
- package/lib/commonjs/components/UserInput/generateColors.js.map +1 -1
- package/lib/commonjs/constants/typographySizes.js +11 -7
- package/lib/commonjs/constants/typographySizes.js.map +1 -1
- package/lib/commonjs/helpers/ResponsiveCalculations.js +47 -53
- package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/commonjs/hooks/index.js +3 -3
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/{useResponsive.js → useScalingMode.js} +3 -3
- package/lib/commonjs/hooks/useScalingMode.js.map +1 -0
- package/lib/commonjs/index.d.js +2 -0
- package/lib/commonjs/index.d.js.map +1 -0
- package/lib/commonjs/index.js +27 -40
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/themes/DarkTheme.js +185 -25
- package/lib/commonjs/themes/DarkTheme.js.map +1 -1
- package/lib/commonjs/themes/LightTheme.js +89 -81
- package/lib/commonjs/themes/LightTheme.js.map +1 -1
- package/lib/commonjs/types/divider.type.js +6 -0
- package/lib/commonjs/types/divider.type.js.map +1 -0
- package/lib/commonjs/types/index.js +44 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/link.type.js +6 -0
- package/lib/commonjs/types/link.type.js.map +1 -0
- package/lib/commonjs/types/radio.type.js +6 -0
- package/lib/commonjs/types/radio.type.js.map +1 -0
- package/lib/commonjs/types/surface.type.js +6 -0
- package/lib/commonjs/types/surface.type.js.map +1 -0
- package/lib/commonjs/utils/index.js +2 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/module/components/Avatar/AvatarImage.js +3 -8
- package/lib/module/components/Avatar/AvatarImage.js.map +1 -1
- package/lib/module/components/Avatar/AvatarText.js +2 -3
- package/lib/module/components/Avatar/AvatarText.js.map +1 -1
- package/lib/module/components/Button/Button.js +23 -22
- package/lib/module/components/Button/Button.js.map +1 -1
- package/lib/module/components/Button/utils.js +34 -27
- package/lib/module/components/Button/utils.js.map +1 -1
- package/lib/module/components/CheckBox/CheckBox.js +37 -31
- package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/module/components/Chip/Chip.js +22 -26
- package/lib/module/components/Chip/Chip.js.map +1 -1
- package/lib/module/components/Chip/utils.js +30 -18
- package/lib/module/components/Chip/utils.js.map +1 -1
- package/lib/module/components/Dialog/Dialog.js +13 -8
- package/lib/module/components/Dialog/Dialog.js.map +1 -1
- package/lib/module/components/Dialog/DialogBody.js +9 -8
- package/lib/module/components/Dialog/DialogBody.js.map +1 -1
- package/lib/module/components/Dialog/DialogDescription.js +8 -9
- package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/module/components/Dialog/DialogFoot.js +14 -16
- package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/module/components/Dialog/DialogHead.js +24 -28
- package/lib/module/components/Dialog/DialogHead.js.map +1 -1
- package/lib/module/components/Divider/Divider.js +5 -8
- package/lib/module/components/Divider/Divider.js.map +1 -1
- package/lib/module/components/Grid/Grid.js +4 -3
- package/lib/module/components/Grid/Grid.js.map +1 -1
- package/lib/module/components/Icon/Icon.js +3 -3
- package/lib/module/components/Icon/Icon.js.map +1 -1
- package/lib/module/components/IconButton/IconButton.js +20 -19
- package/lib/module/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/Link/Link.js +15 -19
- package/lib/module/components/Link/Link.js.map +1 -1
- package/lib/module/components/Menu/Menu.js +14 -8
- package/lib/module/components/Menu/Menu.js.map +1 -1
- package/lib/module/components/Menu/MenuItem.js +4 -5
- package/lib/module/components/Menu/MenuItem.js.map +1 -1
- package/lib/module/components/Menu/MenuItemLabel.js +2 -7
- package/lib/module/components/Menu/MenuItemLabel.js.map +1 -1
- package/lib/module/components/Progress/Progress.js +7 -6
- package/lib/module/components/Progress/Progress.js.map +1 -1
- package/lib/module/components/Provider/ContextManager.js +10 -0
- package/lib/module/components/Provider/ContextManager.js.map +1 -0
- package/lib/module/components/Provider/NativeProvider.js +17 -7
- package/lib/module/components/Provider/NativeProvider.js.map +1 -1
- package/lib/module/components/Radio/RadioGroup.js +41 -0
- package/lib/module/components/Radio/RadioGroup.js.map +1 -0
- package/lib/module/components/Radio/RadioItem.js +73 -0
- package/lib/module/components/Radio/RadioItem.js.map +1 -0
- package/lib/module/components/Radio/index.js +10 -0
- package/lib/module/components/Radio/index.js.map +1 -0
- package/lib/module/components/Slider/Slider.js +5 -5
- package/lib/module/components/Slider/Slider.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +3 -7
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +4 -8
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledText.js +20 -8
- package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledView.js +6 -7
- package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/module/components/Surface/Surface.js +24 -20
- package/lib/module/components/Surface/Surface.js.map +1 -1
- package/lib/module/components/Switch/Switch.js +14 -11
- package/lib/module/components/Switch/Switch.js.map +1 -1
- package/lib/module/components/UserInput/UserInput.js +24 -19
- package/lib/module/components/UserInput/UserInput.js.map +1 -1
- package/lib/module/components/UserInput/generateColors.js +3 -3
- package/lib/module/components/UserInput/generateColors.js.map +1 -1
- package/lib/module/constants/typographySizes.js +11 -7
- package/lib/module/constants/typographySizes.js.map +1 -1
- package/lib/module/helpers/ResponsiveCalculations.js +46 -48
- package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/module/hooks/index.js +1 -1
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useScalingMode.js +7 -0
- package/lib/module/hooks/useScalingMode.js.map +1 -0
- package/lib/module/index.d.js +2 -0
- package/lib/module/index.d.js.map +1 -0
- package/lib/module/index.js +4 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/themes/DarkTheme.js +188 -24
- package/lib/module/themes/DarkTheme.js.map +1 -1
- package/lib/module/themes/LightTheme.js +88 -81
- package/lib/module/themes/LightTheme.js.map +1 -1
- package/lib/module/themes/index.js +0 -1
- package/lib/module/themes/index.js.map +1 -1
- package/lib/module/types/divider.type.js +4 -0
- package/lib/module/types/divider.type.js.map +1 -0
- package/lib/module/types/index.js +4 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/link.type.js +4 -0
- package/lib/module/types/link.type.js.map +1 -0
- package/lib/module/types/radio.type.js +4 -0
- package/lib/module/types/radio.type.js.map +1 -0
- package/lib/module/types/surface.type.js +4 -0
- package/lib/module/types/surface.type.js.map +1 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/typescript/commonjs/scripts/generateConfig.d.ts +1 -0
- package/lib/typescript/commonjs/scripts/generateConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/scripts/readConfig.d.ts +1 -0
- package/lib/typescript/commonjs/scripts/readConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/utils.d.ts +0 -1
- package/lib/typescript/commonjs/src/components/Button/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Chip/utils.d.ts +3 -2
- package/lib/typescript/commonjs/src/components/Chip/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts +4 -4
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts +3 -8
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +4 -2
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts +3 -10
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Provider/ContextManager.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/Provider/ContextManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Provider/NativeProvider.d.ts +9 -4
- package/lib/typescript/commonjs/src/components/Provider/NativeProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/Radio/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/Radio/RadioItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Radio/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts +3 -3
- package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +36 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/constants/typographySizes.d.ts +2 -8
- package/lib/typescript/commonjs/src/constants/typographySizes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +0 -3
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useScalingMode.d.ts +5 -0
- package/lib/typescript/commonjs/src/hooks/useScalingMode.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +5 -5
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/themes/DarkTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/avatar.type.d.ts +0 -2
- package/lib/typescript/commonjs/src/types/avatar.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/button.type.d.ts +20 -20
- package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/checkbox.type.d.ts +20 -14
- package/lib/typescript/commonjs/src/types/checkbox.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/chip.type.d.ts +21 -13
- package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/common.type.d.ts +72 -22
- package/lib/typescript/commonjs/src/types/common.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts +13 -12
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/divider.type.d.ts +11 -0
- package/lib/typescript/commonjs/src/types/divider.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/grid.type.d.ts +2 -1
- package/lib/typescript/commonjs/src/types/grid.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/link.type.d.ts +12 -0
- package/lib/typescript/commonjs/src/types/link.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/menu.type.d.ts +4 -16
- package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/radio.type.d.ts +61 -0
- package/lib/typescript/commonjs/src/types/radio.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -14
- package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +25 -72
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/surface.type.d.ts +16 -0
- package/lib/typescript/commonjs/src/types/surface.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts +10 -13
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/scripts/generateConfig.d.ts +1 -0
- package/lib/typescript/module/scripts/generateConfig.d.ts.map +1 -0
- package/lib/typescript/module/scripts/readConfig.d.ts +1 -0
- package/lib/typescript/module/scripts/readConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts +2 -2
- package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts +2 -2
- package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/Button.d.ts +2 -2
- package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/utils.d.ts +0 -1
- package/lib/typescript/module/src/components/Button/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts +2 -2
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Chip/Chip.d.ts +2 -2
- package/lib/typescript/module/src/components/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Chip/utils.d.ts +3 -2
- package/lib/typescript/module/src/components/Chip/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts +4 -4
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts +2 -2
- package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts +2 -2
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts +2 -2
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Divider/Divider.d.ts +3 -8
- package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Grid/Grid.d.ts +2 -2
- package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +4 -2
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Link/Link.d.ts +3 -10
- package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/Menu.d.ts +2 -2
- package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts +2 -2
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts +2 -2
- package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Progress/Progress.d.ts +2 -2
- package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Provider/ContextManager.d.ts +3 -0
- package/lib/typescript/module/src/components/Provider/ContextManager.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Provider/NativeProvider.d.ts +9 -4
- package/lib/typescript/module/src/components/Provider/NativeProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts +5 -0
- package/lib/typescript/module/src/components/Radio/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Radio/RadioItem.d.ts +5 -0
- package/lib/typescript/module/src/components/Radio/RadioItem.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Radio/index.d.ts +6 -0
- package/lib/typescript/module/src/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/HStack.d.ts +2 -2
- package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/VStack.d.ts +2 -2
- package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts +2 -2
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts +2 -2
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Surface/Surface.d.ts +3 -3
- package/lib/typescript/module/src/components/Surface/Surface.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Switch/Switch.d.ts +2 -2
- package/lib/typescript/module/src/components/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +36 -1
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/module/src/constants/typographySizes.d.ts +2 -8
- package/lib/typescript/module/src/constants/typographySizes.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +0 -3
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/index.d.ts +1 -1
- package/lib/typescript/module/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useScalingMode.d.ts +5 -0
- package/lib/typescript/module/src/hooks/useScalingMode.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +5 -5
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/themes/DarkTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/types/avatar.type.d.ts +0 -2
- package/lib/typescript/module/src/types/avatar.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/button.type.d.ts +20 -20
- package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/checkbox.type.d.ts +20 -14
- package/lib/typescript/module/src/types/checkbox.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/chip.type.d.ts +21 -13
- package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/common.type.d.ts +72 -22
- package/lib/typescript/module/src/types/common.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/dialog.type.d.ts +13 -12
- package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/divider.type.d.ts +11 -0
- package/lib/typescript/module/src/types/divider.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/grid.type.d.ts +2 -1
- package/lib/typescript/module/src/types/grid.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/index.d.ts +4 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types/link.type.d.ts +12 -0
- package/lib/typescript/module/src/types/link.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/menu.type.d.ts +4 -16
- package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/radio.type.d.ts +61 -0
- package/lib/typescript/module/src/types/radio.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/stack.type.d.ts +6 -14
- package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/styledComponents.type.d.ts +25 -72
- package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/surface.type.d.ts +16 -0
- package/lib/typescript/module/src/types/surface.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/userInput.type.d.ts +10 -13
- package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/index.d.ts +1 -0
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -0
- package/package.json +9 -4
- package/src/components/Avatar/AvatarImage.tsx +2 -7
- package/src/components/Avatar/AvatarText.tsx +4 -4
- package/src/components/Button/Button.tsx +35 -26
- package/src/components/Button/utils.ts +30 -30
- package/src/components/CheckBox/CheckBox.tsx +33 -29
- package/src/components/Chip/Chip.tsx +25 -32
- package/src/components/Chip/utils.ts +34 -20
- package/src/components/Dialog/Dialog.tsx +11 -6
- package/src/components/Dialog/DialogBody.tsx +13 -13
- package/src/components/Dialog/DialogDescription.tsx +9 -9
- package/src/components/Dialog/DialogFoot.tsx +19 -20
- package/src/components/Dialog/DialogHead.tsx +17 -21
- package/src/components/Divider/Divider.tsx +7 -15
- package/src/components/Grid/Grid.tsx +6 -5
- package/src/components/Icon/Icon.tsx +3 -3
- package/src/components/IconButton/IconButton.tsx +26 -17
- package/src/components/Link/Link.tsx +20 -29
- package/src/components/Menu/Menu.tsx +11 -7
- package/src/components/Menu/MenuItem.tsx +6 -6
- package/src/components/Menu/MenuItemLabel.tsx +4 -9
- package/src/components/Progress/Progress.tsx +8 -7
- package/src/components/Provider/ContextManager.tsx +9 -0
- package/src/components/Provider/NativeProvider.tsx +25 -10
- package/src/components/Radio/RadioGroup.tsx +40 -0
- package/src/components/Radio/RadioItem.tsx +72 -0
- package/src/components/Radio/index.ts +9 -0
- package/src/components/Slider/Slider.tsx +3 -3
- package/src/components/Stack/HStack.tsx +5 -8
- package/src/components/Stack/VStack.tsx +6 -11
- package/src/components/StyledComponents/StyledText.tsx +17 -8
- package/src/components/StyledComponents/StyledView.tsx +7 -8
- package/src/components/Surface/Surface.tsx +20 -27
- package/src/components/Switch/Switch.tsx +12 -10
- package/src/components/UserInput/UserInput.tsx +25 -19
- package/src/components/UserInput/generateColors.ts +3 -3
- package/src/constants/typographySizes.ts +13 -15
- package/src/helpers/ResponsiveCalculations.ts +50 -49
- package/src/hooks/index.ts +1 -1
- package/src/hooks/{useResponsive.tsx → useScalingMode.tsx} +2 -2
- package/src/index.d.ts +3 -0
- package/src/index.ts +7 -7
- package/src/themes/DarkTheme.ts +169 -30
- package/src/themes/LightTheme.ts +78 -85
- package/src/themes/index.ts +0 -1
- package/src/types/avatar.type.ts +0 -3
- package/src/types/button.type.ts +20 -20
- package/src/types/checkbox.type.ts +22 -15
- package/src/types/chip.type.ts +24 -15
- package/src/types/common.type.ts +82 -23
- package/src/types/dialog.type.ts +15 -14
- package/src/types/divider.type.ts +15 -0
- package/src/types/grid.type.ts +2 -1
- package/src/types/index.ts +5 -1
- package/src/types/link.type.ts +15 -0
- package/src/types/menu.type.ts +4 -19
- package/src/types/radio.type.ts +78 -0
- package/src/types/stack.type.ts +7 -17
- package/src/types/styledComponents.type.ts +27 -75
- package/src/types/surface.type.ts +19 -0
- package/src/types/userInput.type.ts +10 -14
- package/src/utils/index.ts +0 -0
- package/lib/commonjs/components/Header/Header.js +0 -78
- package/lib/commonjs/components/Header/Header.js.map +0 -1
- package/lib/commonjs/helpers/LightenColorShades.js +0 -27
- package/lib/commonjs/helpers/LightenColorShades.js.map +0 -1
- package/lib/commonjs/hooks/useResponsive.js.map +0 -1
- package/lib/commonjs/themes/createTheme.js +0 -25
- package/lib/commonjs/themes/createTheme.js.map +0 -1
- package/lib/module/components/Header/Header.js +0 -73
- package/lib/module/components/Header/Header.js.map +0 -1
- package/lib/module/helpers/LightenColorShades.js +0 -23
- package/lib/module/helpers/LightenColorShades.js.map +0 -1
- package/lib/module/hooks/useResponsive.js +0 -7
- package/lib/module/hooks/useResponsive.js.map +0 -1
- package/lib/module/themes/createTheme.js +0 -25
- package/lib/module/themes/createTheme.js.map +0 -1
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts +0 -16
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +0 -3
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useResponsive.d.ts +0 -3
- package/lib/typescript/commonjs/src/hooks/useResponsive.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/themes/createTheme.d.ts +0 -1
- package/lib/typescript/commonjs/src/themes/createTheme.d.ts.map +0 -1
- package/lib/typescript/module/src/components/Header/Header.d.ts +0 -16
- package/lib/typescript/module/src/components/Header/Header.d.ts.map +0 -1
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +0 -3
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useResponsive.d.ts +0 -3
- package/lib/typescript/module/src/hooks/useResponsive.d.ts.map +0 -1
- package/lib/typescript/module/src/themes/createTheme.d.ts +0 -1
- package/lib/typescript/module/src/themes/createTheme.d.ts.map +0 -1
- package/src/components/Header/Header.tsx +0 -82
- package/src/helpers/LightenColorShades.ts +0 -27
- package/src/themes/createTheme.ts +0 -23
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import type { DialogBodyProps } from '../../types';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { ScrollView } from 'react-native';
|
|
3
|
+
import { horizontalScale, verticalScale } from '../../helpers/ResponsiveCalculations';
|
|
4
|
+
import type { DialogBodyProps, StyledViewProps } from '../../types';
|
|
5
|
+
import { StyledView } from '../StyledComponents';
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
interface props extends DialogBodyProps {
|
|
8
|
-
variant?: 'classic' | 'default';
|
|
8
|
+
interface props extends DialogBodyProps, StyledViewProps {
|
|
9
|
+
variant?: 'classic' | 'default';
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const DialogBody:
|
|
12
|
+
const DialogBody: FC<props> = ({
|
|
12
13
|
variant,
|
|
13
14
|
scrollEnable = true,
|
|
14
15
|
containerStyle,
|
|
15
16
|
children,
|
|
17
|
+
...rest
|
|
16
18
|
}) => {
|
|
17
19
|
const style = {
|
|
18
|
-
paddingVertical: variant == 'default' ?
|
|
19
|
-
paddingHorizontal:
|
|
20
|
-
gap: 20,
|
|
20
|
+
paddingVertical: variant == 'default' ? verticalScale(16) : 0,
|
|
21
|
+
paddingHorizontal: horizontalScale(variant == 'default' ? 16 : 25),
|
|
21
22
|
};
|
|
22
23
|
return (<>
|
|
23
|
-
|
|
24
24
|
<ScrollView scrollEnabled={scrollEnable}>
|
|
25
|
-
<
|
|
25
|
+
<StyledView style={[style, containerStyle]} pointerEvents='box-none' {...rest}>
|
|
26
26
|
{children}
|
|
27
|
-
</
|
|
27
|
+
</StyledView>
|
|
28
28
|
</ScrollView>
|
|
29
29
|
</>);
|
|
30
30
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type FC } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { verticalScale } from '../../helpers/ResponsiveCalculations';
|
|
4
4
|
import { StyledText } from '../StyledComponents';
|
|
5
5
|
import type { DialogDescriptionProps } from '../../types';
|
|
6
6
|
|
|
7
|
-
const DialogDescription:
|
|
8
|
-
|
|
9
|
-
fs,
|
|
7
|
+
const DialogDescription: FC<DialogDescriptionProps> = ({
|
|
8
|
+
fScale = 'sm',
|
|
10
9
|
containerStyle,
|
|
11
10
|
textStyle,
|
|
12
11
|
children,
|
|
12
|
+
...rest
|
|
13
13
|
}) => {
|
|
14
14
|
return (<>
|
|
15
15
|
<View style={containerStyle}>
|
|
16
16
|
<StyledText
|
|
17
|
-
style={[{ lineHeight:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
style={[{ lineHeight: verticalScale(20) }, textStyle]}
|
|
18
|
+
variant='tertiary'
|
|
19
|
+
fScale={fScale}
|
|
20
|
+
{...rest}
|
|
21
21
|
>
|
|
22
22
|
{children}
|
|
23
23
|
</StyledText>
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { moderateScale } from '../../helpers/ResponsiveCalculations';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type ViewStyle } from 'react-native';
|
|
3
|
+
import { horizontalScale, verticalScale } from '../../helpers/ResponsiveCalculations';
|
|
5
4
|
import type { DialogFootProps } from '../../types';
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { StyledView } from '../StyledComponents';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
interface props extends DialogFootProps {
|
|
9
10
|
variant?: 'classic' | 'default';
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
const DialogFoot:
|
|
13
|
+
const DialogFoot: FC<props> = ({
|
|
13
14
|
variant,
|
|
14
15
|
containerStyle,
|
|
15
|
-
children
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
16
18
|
}) => {
|
|
17
|
-
const
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
|
|
21
|
+
const dynamicStyles: ViewStyle = {
|
|
18
22
|
borderTopWidth: variant === 'default' ? 0.7 : 0,
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
borderColor: theme?.colors.border.subtle,
|
|
24
|
+
padding: verticalScale(variant === 'default' ? 16 : 20),
|
|
25
|
+
paddingHorizontal: horizontalScale(variant === 'default' ? 16 : 25),
|
|
26
|
+
justifyContent: 'flex-end',
|
|
27
|
+
flexDirection: 'row'
|
|
21
28
|
};
|
|
22
29
|
return (<>
|
|
23
|
-
<
|
|
30
|
+
<StyledView style={[dynamicStyles, containerStyle]} {...rest}>
|
|
24
31
|
{children}
|
|
25
|
-
</
|
|
32
|
+
</StyledView>
|
|
26
33
|
</>);
|
|
27
34
|
}
|
|
28
35
|
export default DialogFoot;
|
|
29
|
-
export type { DialogFootProps };
|
|
30
|
-
|
|
31
|
-
const STYLES = StyleSheet.create({
|
|
32
|
-
CONTAINER: {
|
|
33
|
-
borderColor: '#d4d4d4',
|
|
34
|
-
justifyContent: 'flex-end',
|
|
35
|
-
gap: moderateScale(15)
|
|
36
|
-
},
|
|
37
|
-
});
|
|
36
|
+
export type { DialogFootProps };
|
|
@@ -1,38 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { View, StyleSheet
|
|
3
|
-
import {
|
|
4
|
-
import { X } from '../../assets/svg';
|
|
1
|
+
import { useMemo, type FC } from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import { verticalScale } from '../../helpers/ResponsiveCalculations';
|
|
5
4
|
import { StyledText } from '../StyledComponents';
|
|
6
5
|
import type { DialogHeadProps } from '../../types';
|
|
6
|
+
import { useTheme } from '../../hooks';
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
interface props extends DialogHeadProps {
|
|
10
10
|
variant?: 'classic' | 'default';
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const DialogHead:
|
|
13
|
+
const DialogHead: FC<props> = ({
|
|
14
14
|
variant = 'default',
|
|
15
|
-
title
|
|
16
|
-
|
|
15
|
+
title,
|
|
16
|
+
fScale = 'xl',
|
|
17
17
|
fs,
|
|
18
|
+
ff,
|
|
18
19
|
containerStyle,
|
|
19
|
-
|
|
20
|
+
titleStyle,
|
|
20
21
|
children
|
|
21
22
|
}) => {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
const STYLES = useMemo(Styles, []);
|
|
25
|
+
|
|
22
26
|
const dynamicStyles = {
|
|
23
27
|
borderBottomWidth: variant == 'default' ? 0.7 : 0,
|
|
24
|
-
|
|
28
|
+
borderColor: theme?.colors.border.subtle,
|
|
29
|
+
padding: verticalScale(variant === 'default' ? 16 : 25),
|
|
25
30
|
};
|
|
26
31
|
return (<>
|
|
27
|
-
|
|
28
32
|
<View style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
|
|
29
|
-
<
|
|
30
|
-
<StyledText style={[STYLES.HEADER_TEXT, textStyle]} fs={fs} variant={textVariant}>{title}</StyledText>
|
|
31
|
-
{children}
|
|
32
|
-
</View>
|
|
33
|
-
<TouchableOpacity>
|
|
34
|
-
<X color='gray' size={moderateScale(20)} />
|
|
35
|
-
</TouchableOpacity>
|
|
33
|
+
<StyledText style={[STYLES.HEADER_TEXT, titleStyle]} fs={fs} ff={ff} fScale={fScale}>{title || children}</StyledText>
|
|
36
34
|
</View>
|
|
37
35
|
</>);
|
|
38
36
|
}
|
|
@@ -40,15 +38,13 @@ export default DialogHead;
|
|
|
40
38
|
export type { DialogHeadProps };
|
|
41
39
|
|
|
42
40
|
|
|
43
|
-
const
|
|
41
|
+
const Styles = () => StyleSheet.create({
|
|
44
42
|
CONTAINER: {
|
|
45
|
-
|
|
46
|
-
paddingBottom: moderateScale(16),
|
|
43
|
+
paddingBottom: verticalScale(16),
|
|
47
44
|
justifyContent: 'space-between',
|
|
48
45
|
flexDirection: 'row',
|
|
49
46
|
},
|
|
50
47
|
HEADER_TEXT: {
|
|
51
48
|
fontWeight: 'bold',
|
|
52
|
-
color: '#000',
|
|
53
49
|
}
|
|
54
50
|
});
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { ViewStyle, StyleProp } from "react-native";
|
|
1
|
+
import { type FC } from 'react';
|
|
3
2
|
import { StyledView } from '../StyledComponents';
|
|
4
3
|
import { useTheme } from '../../hooks';
|
|
4
|
+
import type { DividerProps } from '../../types';
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
thickness
|
|
9
|
-
style?: StyleProp<ViewStyle>
|
|
10
|
-
color?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const Divider: React.FC<DividerProps> = ({
|
|
14
|
-
thickness = 0.2,
|
|
7
|
+
const Divider: FC<DividerProps> = ({
|
|
8
|
+
thickness = 0.7,
|
|
15
9
|
color,
|
|
16
10
|
style
|
|
17
11
|
}) => {
|
|
18
|
-
|
|
19
12
|
const theme = useTheme();
|
|
20
|
-
|
|
21
13
|
const dynamicStyles = {
|
|
22
14
|
borderWidth: thickness,
|
|
23
|
-
borderColor: color ?? theme?.colors.
|
|
15
|
+
borderColor: color ?? theme?.colors.border.subtle
|
|
24
16
|
};
|
|
25
|
-
return (
|
|
17
|
+
return (
|
|
26
18
|
<StyledView style={[dynamicStyles, style]} />
|
|
27
|
-
|
|
19
|
+
);
|
|
28
20
|
};
|
|
29
21
|
export default Divider;
|
|
30
22
|
export type { DividerProps };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { useMemo, type FC } from 'react';
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
3
|
import { getGridValue } from '../../helpers';
|
|
4
4
|
import { useConditionalWindowDimension } from '../../hooks';
|
|
5
5
|
import type { GridProps } from '../../types';
|
|
6
|
+
import { StyledView } from '../StyledComponents';
|
|
6
7
|
|
|
7
|
-
const Grid:
|
|
8
|
+
const Grid: FC<GridProps> = ({
|
|
8
9
|
container = false,
|
|
9
10
|
item = false,
|
|
10
11
|
spacing = 0,
|
|
@@ -48,12 +49,12 @@ const Grid: React.FC<GridProps> = ({
|
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
51
|
return (<>
|
|
51
|
-
<
|
|
52
|
+
<StyledView
|
|
52
53
|
style={[STYLES.MAIN_CONT, containerStyle]}
|
|
53
54
|
{...rest}
|
|
54
55
|
>
|
|
55
56
|
{children}
|
|
56
|
-
</
|
|
57
|
+
</StyledView>
|
|
57
58
|
</>);
|
|
58
59
|
};
|
|
59
60
|
export default Grid;
|
|
@@ -18,11 +18,11 @@ const Icon: React.FC<IconProps> = ({
|
|
|
18
18
|
return React.cloneElement(renderIcon as React.ReactElement<any>,
|
|
19
19
|
{
|
|
20
20
|
...renderIcon?.props,
|
|
21
|
-
size: verticalScale(renderIcon?.props?.size ??
|
|
22
|
-
color: color ?? (renderIcon?.props.color ?? theme?.colors.
|
|
21
|
+
size: verticalScale(renderIcon?.props?.size ?? 17),
|
|
22
|
+
color: color ?? (renderIcon?.props.color ?? theme?.colors.typography.secondary)
|
|
23
23
|
}
|
|
24
24
|
)
|
|
25
|
-
}, [color, theme]);
|
|
25
|
+
}, [color, theme, renderIcon.props]);
|
|
26
26
|
|
|
27
27
|
return (<>
|
|
28
28
|
{renderCallBackIcon}
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type {
|
|
1
|
+
import React, { isValidElement } from "react";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
3
|
import { TouchableOpacity, type TouchableOpacityProps } from "react-native";
|
|
4
|
-
import { StyledView } from "../StyledComponents";
|
|
5
|
-
// import TouchableRipple from "../TouchableRipple/TouchableRipple";
|
|
6
4
|
import Icon from "../Icon/Icon";
|
|
7
|
-
import { verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
8
5
|
|
|
9
6
|
|
|
10
7
|
type IconButtonProps = TouchableOpacityProps & {
|
|
11
8
|
rippleColor?: string;
|
|
12
|
-
children?:
|
|
9
|
+
children?: ReactElement<{ size: number }>;
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
const IconButton: React.FC<IconButtonProps> = ({
|
|
16
13
|
rippleColor,
|
|
17
14
|
children,
|
|
15
|
+
style,
|
|
18
16
|
...rest
|
|
19
17
|
}) => {
|
|
20
18
|
|
|
19
|
+
let size = 40;
|
|
20
|
+
|
|
21
|
+
if (!(isValidElement(children) && 'size' in children.props)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
size = children.props.size! * 1.5;
|
|
25
|
+
|
|
21
26
|
return (<>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
<TouchableOpacity
|
|
28
|
+
// rippleColor={rippleColor}
|
|
29
|
+
style={[{
|
|
30
|
+
borderRadius: 100,
|
|
31
|
+
height: size,
|
|
32
|
+
width: size,
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
}, style]}
|
|
36
|
+
{...rest}
|
|
37
|
+
>
|
|
38
|
+
<Icon
|
|
39
|
+
renderIcon={React.cloneElement(children as React.ReactElement<any>)}
|
|
40
|
+
/>
|
|
41
|
+
</TouchableOpacity>
|
|
33
42
|
</>)
|
|
34
43
|
}
|
|
35
44
|
export default IconButton;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { useCallback, type FC } from "react";
|
|
2
2
|
import { StyledText } from "../StyledComponents";
|
|
3
|
-
import { Linking, StyleSheet
|
|
4
|
-
import {
|
|
5
|
-
import type { TypographyVariant } from "../../types";
|
|
3
|
+
import { Linking, StyleSheet } from "react-native";
|
|
4
|
+
import type { LinkProps } from "../../types";
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
title
|
|
10
|
-
href: string;
|
|
11
|
-
textVariant?: TypographyVariant;
|
|
12
|
-
style?: TextStyle
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const Link: React.FC<props> = ({
|
|
16
|
-
title = '',
|
|
7
|
+
const Link: FC<LinkProps> = ({
|
|
8
|
+
title = 'Link',
|
|
17
9
|
href,
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
style,
|
|
11
|
+
...rest
|
|
20
12
|
}) => {
|
|
21
13
|
const onUserPress = useCallback(async () => {
|
|
22
14
|
const supported = await Linking.canOpenURL(href);
|
|
@@ -24,25 +16,24 @@ const Link: React.FC<props> = ({
|
|
|
24
16
|
await Linking.openURL(href);
|
|
25
17
|
}
|
|
26
18
|
}, [href]);
|
|
27
|
-
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</>)
|
|
19
|
+
return (
|
|
20
|
+
<StyledText
|
|
21
|
+
color='#0000FF'
|
|
22
|
+
style={[STYLES.TEXT, style]}
|
|
23
|
+
onPress={onUserPress}
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
26
|
+
{title}
|
|
27
|
+
</StyledText>
|
|
28
|
+
)
|
|
38
29
|
}
|
|
39
30
|
|
|
40
31
|
export default Link;
|
|
41
32
|
|
|
42
33
|
const STYLES = StyleSheet.create({
|
|
43
34
|
TEXT: {
|
|
44
|
-
borderBottomColor: '#0000FF',
|
|
45
|
-
borderBottomWidth: 0.8,
|
|
46
|
-
alignSelf: 'flex-start',
|
|
35
|
+
// borderBottomColor: '#0000FF',
|
|
36
|
+
// borderBottomWidth: 0.8,
|
|
37
|
+
// alignSelf: 'flex-start',
|
|
47
38
|
}
|
|
48
39
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useRef, useCallback, useEffect, } from "react";
|
|
1
|
+
import React, { useState, useRef, useCallback, useEffect, useMemo, type FC, } from "react";
|
|
2
2
|
import { StyleSheet, Pressable, View, ScrollView, Animated } from "react-native";
|
|
3
3
|
import { StyledView } from "../StyledComponents";
|
|
4
4
|
import Portal from "../Portal/Portal";
|
|
@@ -6,8 +6,9 @@ import { positionCalculations } from "./calculations";
|
|
|
6
6
|
import type { menuLayoutTypes, anchorLayoutTypes } from "./calculations";
|
|
7
7
|
import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
8
8
|
import type { MenuProps } from "../../types";
|
|
9
|
+
import { useTheme } from "../../hooks";
|
|
9
10
|
|
|
10
|
-
const Menu:
|
|
11
|
+
const Menu: FC<MenuProps> = ({
|
|
11
12
|
placement = 'top',
|
|
12
13
|
anchor,
|
|
13
14
|
disableBuiltInState = false,
|
|
@@ -23,8 +24,10 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
23
24
|
const menuLayoutRef = useRef<menuLayoutTypes>({ height: 0, width: 0 });
|
|
24
25
|
const buttonRef = useRef<View>(null!);
|
|
25
26
|
const animatedScaleRef = useRef(new Animated.Value(1)).current;
|
|
27
|
+
const theme = useTheme();
|
|
26
28
|
|
|
27
29
|
const positions = (useCallback(() => (positionCalculations(anchorLayoutRef.current, menuLayoutRef.current, placement)), [menuLayoutRef, anchorLayoutRef, placement]))();
|
|
30
|
+
const STYLES = useMemo(Styles, []);
|
|
28
31
|
|
|
29
32
|
useEffect(() => {
|
|
30
33
|
Animated.timing(animatedScaleRef, {
|
|
@@ -84,6 +87,7 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
84
87
|
const dynamicStyles = {
|
|
85
88
|
left: positions.left,
|
|
86
89
|
top: positions.top,
|
|
90
|
+
backgroundColor: theme?.colors.background.elevated
|
|
87
91
|
};
|
|
88
92
|
|
|
89
93
|
const menuAnimatedStyle = {
|
|
@@ -92,7 +96,6 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
92
96
|
};
|
|
93
97
|
|
|
94
98
|
return (<>
|
|
95
|
-
|
|
96
99
|
<Portal
|
|
97
100
|
name='Menu'
|
|
98
101
|
>
|
|
@@ -110,16 +113,17 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
110
113
|
</Pressable>
|
|
111
114
|
</Portal>
|
|
112
115
|
|
|
113
|
-
<StyledView
|
|
114
|
-
|
|
116
|
+
<StyledView>
|
|
117
|
+
<StyledView ref={buttonRef} onLayout={measureLayout} alignSelf='flex-start'>
|
|
118
|
+
{anchor && React.isValidElement<{ onPress: () => void }>(anchor) && React.cloneElement(anchor, { onPress: onOpen})}
|
|
119
|
+
</StyledView>
|
|
115
120
|
</StyledView>
|
|
116
|
-
|
|
117
121
|
</>)
|
|
118
122
|
}
|
|
119
123
|
export default Menu;
|
|
120
124
|
export type { MenuProps };
|
|
121
125
|
|
|
122
|
-
const
|
|
126
|
+
const Styles = () => StyleSheet.create({
|
|
123
127
|
MENU_CONT: {
|
|
124
128
|
shadowColor: "#000",
|
|
125
129
|
backgroundColor: '#fff',
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type FC } from "react";
|
|
2
2
|
import { TouchableOpacity } from "react-native";
|
|
3
3
|
import { StyledView } from "../StyledComponents";
|
|
4
|
-
import { horizontalScale,
|
|
4
|
+
import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
5
5
|
import type { MenuItemProps } from "../../types";
|
|
6
6
|
|
|
7
|
-
const MenuItem:
|
|
7
|
+
const MenuItem: FC<MenuItemProps> = ({
|
|
8
8
|
paddingV = 11,
|
|
9
9
|
paddingH = 17,
|
|
10
10
|
gap = 12,
|
|
11
|
-
|
|
11
|
+
itemStyle,
|
|
12
12
|
children,
|
|
13
13
|
...rest
|
|
14
14
|
}) => {
|
|
@@ -22,8 +22,8 @@ const MenuItem: React.FC<MenuItemProps> = ({
|
|
|
22
22
|
paddingVertical={verticalScale(paddingV)}
|
|
23
23
|
flexDirection='row'
|
|
24
24
|
align="center"
|
|
25
|
-
gap={
|
|
26
|
-
style={
|
|
25
|
+
gap={horizontalScale(gap)}
|
|
26
|
+
style={itemStyle}
|
|
27
27
|
>
|
|
28
28
|
{children}
|
|
29
29
|
</StyledView>
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type FC } from "react";
|
|
2
2
|
import { StyledText } from "../StyledComponents";
|
|
3
3
|
import type { MenuItemLabelProps } from "../../types";
|
|
4
4
|
|
|
5
|
-
const MenuItemLabel:
|
|
6
|
-
fs,
|
|
7
|
-
style,
|
|
5
|
+
const MenuItemLabel: FC<MenuItemLabelProps> = ({
|
|
8
6
|
children,
|
|
9
|
-
textVariant = 'h5',
|
|
10
7
|
...rest
|
|
11
8
|
}) => {
|
|
12
|
-
|
|
13
9
|
return (<>
|
|
14
10
|
<StyledText
|
|
15
|
-
fs={fs}
|
|
16
|
-
variant={textVariant}
|
|
17
|
-
color="#000"
|
|
18
11
|
numberOfLines={1}
|
|
19
12
|
flexShrink={1}
|
|
13
|
+
fScale='sm'
|
|
14
|
+
variant='secondary'
|
|
20
15
|
{...rest}
|
|
21
16
|
>
|
|
22
17
|
{children}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect, useMemo, useRef, type FC } from 'react';
|
|
2
2
|
import { Animated, StyleSheet } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
4
4
|
import { StyledView } from '../StyledComponents';
|
|
5
5
|
import { useTheme } from '../../hooks';
|
|
6
6
|
import type { ProgressProps } from '../../types';
|
|
7
7
|
|
|
8
|
-
const Progress:
|
|
8
|
+
const Progress: FC<ProgressProps> = ({
|
|
9
9
|
value = 50,
|
|
10
10
|
thickness = 5,
|
|
11
11
|
br = 100,
|
|
12
|
-
trackColor
|
|
12
|
+
trackColor,
|
|
13
13
|
progressColor,
|
|
14
14
|
}) => {
|
|
15
15
|
|
|
16
16
|
const animatedWidth = useRef(new Animated.Value(value)).current;
|
|
17
17
|
const theme = useTheme();
|
|
18
|
+
trackColor = theme?.colors.palette.natural[200];
|
|
18
19
|
|
|
19
20
|
useEffect(() => {
|
|
20
21
|
Animated.timing(animatedWidth, {
|
|
@@ -27,12 +28,12 @@ const Progress: React.FC<ProgressProps> = ({
|
|
|
27
28
|
const dynamicStyles = useMemo(() => ({
|
|
28
29
|
TRACK: {
|
|
29
30
|
backgroundColor: trackColor,
|
|
30
|
-
borderRadius:
|
|
31
|
+
borderRadius: verticalScale(br),
|
|
31
32
|
height: verticalScale(thickness),
|
|
32
33
|
},
|
|
33
34
|
TRACK_ITEM: {
|
|
34
|
-
backgroundColor: progressColor ?? theme?.colors.primary,
|
|
35
|
-
borderRadius:
|
|
35
|
+
backgroundColor: progressColor ?? theme?.colors.brand.primary,
|
|
36
|
+
borderRadius: verticalScale(br),
|
|
36
37
|
}
|
|
37
38
|
}), [br, trackColor, thickness, progressColor, theme]);
|
|
38
39
|
|