@nexara/nativeflow 0.1.1
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/LICENSE +20 -0
- package/README.md +67 -0
- package/lib/commonjs/assets/svg/Check.js +26 -0
- package/lib/commonjs/assets/svg/Check.js.map +1 -0
- package/lib/commonjs/assets/svg/X.js +24 -0
- package/lib/commonjs/assets/svg/X.js.map +1 -0
- package/lib/commonjs/assets/svg/index.js +21 -0
- package/lib/commonjs/assets/svg/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/AvatarImage.js +45 -0
- package/lib/commonjs/components/Avatar/AvatarImage.js.map +1 -0
- package/lib/commonjs/components/Avatar/AvatarText.js +45 -0
- package/lib/commonjs/components/Avatar/AvatarText.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +15 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/Button/Button.js +148 -0
- package/lib/commonjs/components/Button/Button.js.map +1 -0
- package/lib/commonjs/components/Button/utils.js +105 -0
- package/lib/commonjs/components/Button/utils.js.map +1 -0
- package/lib/commonjs/components/CheckBox/CheckBox.js +105 -0
- package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -0
- package/lib/commonjs/components/Chip/Chip.js +92 -0
- package/lib/commonjs/components/Chip/Chip.js.map +1 -0
- package/lib/commonjs/components/Chip/utils.js +73 -0
- package/lib/commonjs/components/Chip/utils.js.map +1 -0
- package/lib/commonjs/components/Dialog/Dialog.js +114 -0
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -0
- package/lib/commonjs/components/Dialog/DialogBody.js +37 -0
- package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -0
- package/lib/commonjs/components/Dialog/DialogDescription.js +39 -0
- package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -0
- package/lib/commonjs/components/Dialog/DialogFoot.js +38 -0
- package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -0
- package/lib/commonjs/components/Dialog/DialogHead.js +58 -0
- package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +42 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Divider/Divider.js +33 -0
- package/lib/commonjs/components/Divider/Divider.js.map +1 -0
- package/lib/commonjs/components/Grid/Grid.js +66 -0
- package/lib/commonjs/components/Grid/Grid.js.map +1 -0
- package/lib/commonjs/components/Header/Header.js +78 -0
- package/lib/commonjs/components/Header/Header.js.map +1 -0
- package/lib/commonjs/components/Icon/Icon.js +26 -0
- package/lib/commonjs/components/Icon/Icon.js.map +1 -0
- package/lib/commonjs/components/IconButton/IconButton.js +39 -0
- package/lib/commonjs/components/IconButton/IconButton.js.map +1 -0
- package/lib/commonjs/components/Link/Link.js +45 -0
- package/lib/commonjs/components/Link/Link.js.map +1 -0
- package/lib/commonjs/components/Menu/Menu.js +165 -0
- package/lib/commonjs/components/Menu/Menu.js.map +1 -0
- package/lib/commonjs/components/Menu/MenuItem.js +39 -0
- package/lib/commonjs/components/Menu/MenuItem.js.map +1 -0
- package/lib/commonjs/components/Menu/MenuItemLabel.js +31 -0
- package/lib/commonjs/components/Menu/MenuItemLabel.js.map +1 -0
- package/lib/commonjs/components/Menu/calculations.js +31 -0
- package/lib/commonjs/components/Menu/calculations.js.map +1 -0
- package/lib/commonjs/components/Menu/index.js +28 -0
- package/lib/commonjs/components/Menu/index.js.map +1 -0
- package/lib/commonjs/components/Portal/Portal.js +29 -0
- package/lib/commonjs/components/Portal/Portal.js.map +1 -0
- package/lib/commonjs/components/Portal/PortalContext.js +19 -0
- package/lib/commonjs/components/Portal/PortalContext.js.map +1 -0
- package/lib/commonjs/components/Portal/PortalProvider.js +47 -0
- package/lib/commonjs/components/Portal/PortalProvider.js.map +1 -0
- package/lib/commonjs/components/Progress/Progress.js +58 -0
- package/lib/commonjs/components/Progress/Progress.js.map +1 -0
- package/lib/commonjs/components/Provider/NativeProvider.js +44 -0
- package/lib/commonjs/components/Provider/NativeProvider.js.map +1 -0
- package/lib/commonjs/components/Slider/Slider.js +43 -0
- package/lib/commonjs/components/Slider/Slider.js.map +1 -0
- package/lib/commonjs/components/Stack/HStack.js +43 -0
- package/lib/commonjs/components/Stack/HStack.js.map +1 -0
- package/lib/commonjs/components/Stack/VStack.js +36 -0
- package/lib/commonjs/components/Stack/VStack.js.map +1 -0
- package/lib/commonjs/components/Stack/index.js +15 -0
- package/lib/commonjs/components/Stack/index.js.map +1 -0
- package/lib/commonjs/components/StyledComponents/StyledText.js +49 -0
- package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -0
- package/lib/commonjs/components/StyledComponents/StyledView.js +43 -0
- package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -0
- package/lib/commonjs/components/StyledComponents/index.js +21 -0
- package/lib/commonjs/components/StyledComponents/index.js.map +1 -0
- package/lib/commonjs/components/Surface/Surface.js +36 -0
- package/lib/commonjs/components/Surface/Surface.js.map +1 -0
- package/lib/commonjs/components/Switch/Switch.js +48 -0
- package/lib/commonjs/components/Switch/Switch.js.map +1 -0
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +105 -0
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/commonjs/components/UserInput/UserInput.js +122 -0
- package/lib/commonjs/components/UserInput/UserInput.js.map +1 -0
- package/lib/commonjs/components/UserInput/UserInputV2.js +95 -0
- package/lib/commonjs/components/UserInput/UserInputV2.js.map +1 -0
- package/lib/commonjs/components/UserInput/generateColors.js +18 -0
- package/lib/commonjs/components/UserInput/generateColors.js.map +1 -0
- package/lib/commonjs/constants/breakPoints.js +15 -0
- package/lib/commonjs/constants/breakPoints.js.map +1 -0
- package/lib/commonjs/constants/dialogSizes.js +15 -0
- package/lib/commonjs/constants/dialogSizes.js.map +1 -0
- package/lib/commonjs/constants/index.js +28 -0
- package/lib/commonjs/constants/index.js.map +1 -0
- package/lib/commonjs/constants/theme.js +21 -0
- package/lib/commonjs/constants/theme.js.map +1 -0
- package/lib/commonjs/constants/typographySizes.js +17 -0
- package/lib/commonjs/constants/typographySizes.js.map +1 -0
- package/lib/commonjs/helpers/CalculateGridSize.js +27 -0
- package/lib/commonjs/helpers/CalculateGridSize.js.map +1 -0
- package/lib/commonjs/helpers/DeviceSizeCategory.js +40 -0
- package/lib/commonjs/helpers/DeviceSizeCategory.js.map +1 -0
- package/lib/commonjs/helpers/LightenColorShades.js +14 -0
- package/lib/commonjs/helpers/LightenColorShades.js.map +1 -0
- package/lib/commonjs/helpers/ResponsiveCalculations.js +77 -0
- package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -0
- package/lib/commonjs/helpers/index.js +21 -0
- package/lib/commonjs/helpers/index.js.map +1 -0
- package/lib/commonjs/hooks/index.js +35 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useColorScheme.js +17 -0
- package/lib/commonjs/hooks/useColorScheme.js.map +1 -0
- package/lib/commonjs/hooks/useConditionalWindowDimension.js +15 -0
- package/lib/commonjs/hooks/useConditionalWindowDimension.js.map +1 -0
- package/lib/commonjs/hooks/useResponsive.js +11 -0
- package/lib/commonjs/hooks/useResponsive.js.map +1 -0
- package/lib/commonjs/hooks/useTheme.js +17 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/index.js +255 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/themes/DarkTheme.js +38 -0
- package/lib/commonjs/themes/DarkTheme.js.map +1 -0
- package/lib/commonjs/themes/LightTheme.js +97 -0
- package/lib/commonjs/themes/LightTheme.js.map +1 -0
- package/lib/commonjs/themes/createTheme.js +25 -0
- package/lib/commonjs/themes/createTheme.js.map +1 -0
- package/lib/commonjs/themes/index.js +21 -0
- package/lib/commonjs/themes/index.js.map +1 -0
- package/lib/commonjs/types/avatar.type.js +6 -0
- package/lib/commonjs/types/avatar.type.js.map +1 -0
- package/lib/commonjs/types/button.type.js +6 -0
- package/lib/commonjs/types/button.type.js.map +1 -0
- package/lib/commonjs/types/checkbox.type.js +6 -0
- package/lib/commonjs/types/checkbox.type.js.map +1 -0
- package/lib/commonjs/types/chip.type.js +6 -0
- package/lib/commonjs/types/chip.type.js.map +1 -0
- package/lib/commonjs/types/common.type.js +6 -0
- package/lib/commonjs/types/common.type.js.map +1 -0
- package/lib/commonjs/types/dialog.type.js +6 -0
- package/lib/commonjs/types/dialog.type.js.map +1 -0
- package/lib/commonjs/types/grid.type.js +6 -0
- package/lib/commonjs/types/grid.type.js.map +1 -0
- package/lib/commonjs/types/index.js +138 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/menu.type.js +6 -0
- package/lib/commonjs/types/menu.type.js.map +1 -0
- package/lib/commonjs/types/stack.type.js +6 -0
- package/lib/commonjs/types/stack.type.js.map +1 -0
- package/lib/commonjs/types/styledComponents.type.js +6 -0
- package/lib/commonjs/types/styledComponents.type.js.map +1 -0
- package/lib/commonjs/types/switch.type.js +6 -0
- package/lib/commonjs/types/switch.type.js.map +1 -0
- package/lib/commonjs/types/userInput.type.js +6 -0
- package/lib/commonjs/types/userInput.type.js.map +1 -0
- package/lib/module/assets/svg/Check.js +22 -0
- package/lib/module/assets/svg/Check.js.map +1 -0
- package/lib/module/assets/svg/X.js +20 -0
- package/lib/module/assets/svg/X.js.map +1 -0
- package/lib/module/assets/svg/index.js +5 -0
- package/lib/module/assets/svg/index.js.map +1 -0
- package/lib/module/components/Avatar/AvatarImage.js +40 -0
- package/lib/module/components/Avatar/AvatarImage.js.map +1 -0
- package/lib/module/components/Avatar/AvatarText.js +40 -0
- package/lib/module/components/Avatar/AvatarText.js.map +1 -0
- package/lib/module/components/Avatar/index.js +10 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/Button/Button.js +143 -0
- package/lib/module/components/Button/Button.js.map +1 -0
- package/lib/module/components/Button/utils.js +101 -0
- package/lib/module/components/Button/utils.js.map +1 -0
- package/lib/module/components/CheckBox/CheckBox.js +99 -0
- package/lib/module/components/CheckBox/CheckBox.js.map +1 -0
- package/lib/module/components/Chip/Chip.js +87 -0
- package/lib/module/components/Chip/Chip.js.map +1 -0
- package/lib/module/components/Chip/utils.js +69 -0
- package/lib/module/components/Chip/utils.js.map +1 -0
- package/lib/module/components/Dialog/Dialog.js +107 -0
- package/lib/module/components/Dialog/Dialog.js.map +1 -0
- package/lib/module/components/Dialog/DialogBody.js +32 -0
- package/lib/module/components/Dialog/DialogBody.js.map +1 -0
- package/lib/module/components/Dialog/DialogDescription.js +34 -0
- package/lib/module/components/Dialog/DialogDescription.js.map +1 -0
- package/lib/module/components/Dialog/DialogFoot.js +33 -0
- package/lib/module/components/Dialog/DialogFoot.js.map +1 -0
- package/lib/module/components/Dialog/DialogHead.js +53 -0
- package/lib/module/components/Dialog/DialogHead.js.map +1 -0
- package/lib/module/components/Dialog/index.js +8 -0
- package/lib/module/components/Dialog/index.js.map +1 -0
- package/lib/module/components/Divider/Divider.js +28 -0
- package/lib/module/components/Divider/Divider.js.map +1 -0
- package/lib/module/components/Grid/Grid.js +60 -0
- package/lib/module/components/Grid/Grid.js.map +1 -0
- package/lib/module/components/Header/Header.js +73 -0
- package/lib/module/components/Header/Header.js.map +1 -0
- package/lib/module/components/Icon/Icon.js +21 -0
- package/lib/module/components/Icon/Icon.js.map +1 -0
- package/lib/module/components/IconButton/IconButton.js +34 -0
- package/lib/module/components/IconButton/IconButton.js.map +1 -0
- package/lib/module/components/Link/Link.js +41 -0
- package/lib/module/components/Link/Link.js.map +1 -0
- package/lib/module/components/Menu/Menu.js +158 -0
- package/lib/module/components/Menu/Menu.js.map +1 -0
- package/lib/module/components/Menu/MenuItem.js +34 -0
- package/lib/module/components/Menu/MenuItem.js.map +1 -0
- package/lib/module/components/Menu/MenuItemLabel.js +26 -0
- package/lib/module/components/Menu/MenuItemLabel.js.map +1 -0
- package/lib/module/components/Menu/calculations.js +27 -0
- package/lib/module/components/Menu/calculations.js.map +1 -0
- package/lib/module/components/Menu/index.js +6 -0
- package/lib/module/components/Menu/index.js.map +1 -0
- package/lib/module/components/Portal/Portal.js +24 -0
- package/lib/module/components/Portal/Portal.js.map +1 -0
- package/lib/module/components/Portal/PortalContext.js +13 -0
- package/lib/module/components/Portal/PortalContext.js.map +1 -0
- package/lib/module/components/Portal/PortalProvider.js +40 -0
- package/lib/module/components/Portal/PortalProvider.js.map +1 -0
- package/lib/module/components/Progress/Progress.js +52 -0
- package/lib/module/components/Progress/Progress.js.map +1 -0
- package/lib/module/components/Provider/NativeProvider.js +38 -0
- package/lib/module/components/Provider/NativeProvider.js.map +1 -0
- package/lib/module/components/Slider/Slider.js +38 -0
- package/lib/module/components/Slider/Slider.js.map +1 -0
- package/lib/module/components/Stack/HStack.js +37 -0
- package/lib/module/components/Stack/HStack.js.map +1 -0
- package/lib/module/components/Stack/VStack.js +30 -0
- package/lib/module/components/Stack/VStack.js.map +1 -0
- package/lib/module/components/Stack/index.js +10 -0
- package/lib/module/components/Stack/index.js.map +1 -0
- package/lib/module/components/StyledComponents/StyledText.js +44 -0
- package/lib/module/components/StyledComponents/StyledText.js.map +1 -0
- package/lib/module/components/StyledComponents/StyledView.js +38 -0
- package/lib/module/components/StyledComponents/StyledView.js.map +1 -0
- package/lib/module/components/StyledComponents/index.js +5 -0
- package/lib/module/components/StyledComponents/index.js.map +1 -0
- package/lib/module/components/Surface/Surface.js +31 -0
- package/lib/module/components/Surface/Surface.js.map +1 -0
- package/lib/module/components/Switch/Switch.js +43 -0
- package/lib/module/components/Switch/Switch.js.map +1 -0
- package/lib/module/components/TouchableRipple/TouchableRipple.js +98 -0
- package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -0
- package/lib/module/components/UserInput/UserInput.js +119 -0
- package/lib/module/components/UserInput/UserInput.js.map +1 -0
- package/lib/module/components/UserInput/UserInputV2.js +90 -0
- package/lib/module/components/UserInput/UserInputV2.js.map +1 -0
- package/lib/module/components/UserInput/generateColors.js +14 -0
- package/lib/module/components/UserInput/generateColors.js.map +1 -0
- package/lib/module/constants/breakPoints.js +11 -0
- package/lib/module/constants/breakPoints.js.map +1 -0
- package/lib/module/constants/dialogSizes.js +11 -0
- package/lib/module/constants/dialogSizes.js.map +1 -0
- package/lib/module/constants/index.js +6 -0
- package/lib/module/constants/index.js.map +1 -0
- package/lib/module/constants/theme.js +17 -0
- package/lib/module/constants/theme.js.map +1 -0
- package/lib/module/constants/typographySizes.js +13 -0
- package/lib/module/constants/typographySizes.js.map +1 -0
- package/lib/module/helpers/CalculateGridSize.js +22 -0
- package/lib/module/helpers/CalculateGridSize.js.map +1 -0
- package/lib/module/helpers/DeviceSizeCategory.js +36 -0
- package/lib/module/helpers/DeviceSizeCategory.js.map +1 -0
- package/lib/module/helpers/LightenColorShades.js +10 -0
- package/lib/module/helpers/LightenColorShades.js.map +1 -0
- package/lib/module/helpers/ResponsiveCalculations.js +68 -0
- package/lib/module/helpers/ResponsiveCalculations.js.map +1 -0
- package/lib/module/helpers/index.js +5 -0
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/hooks/index.js +7 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useColorScheme.js +13 -0
- package/lib/module/hooks/useColorScheme.js.map +1 -0
- package/lib/module/hooks/useConditionalWindowDimension.js +11 -0
- package/lib/module/hooks/useConditionalWindowDimension.js.map +1 -0
- package/lib/module/hooks/useResponsive.js +7 -0
- package/lib/module/hooks/useResponsive.js.map +1 -0
- package/lib/module/hooks/useTheme.js +13 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/index.js +34 -0
- package/lib/module/index.js.map +2 -0
- package/lib/module/themes/DarkTheme.js +34 -0
- package/lib/module/themes/DarkTheme.js.map +1 -0
- package/lib/module/themes/LightTheme.js +92 -0
- package/lib/module/themes/LightTheme.js.map +1 -0
- package/lib/module/themes/createTheme.js +25 -0
- package/lib/module/themes/createTheme.js.map +1 -0
- package/lib/module/themes/index.js +6 -0
- package/lib/module/themes/index.js.map +1 -0
- package/lib/module/types/avatar.type.js +4 -0
- package/lib/module/types/avatar.type.js.map +1 -0
- package/lib/module/types/button.type.js +4 -0
- package/lib/module/types/button.type.js.map +1 -0
- package/lib/module/types/checkbox.type.js +4 -0
- package/lib/module/types/checkbox.type.js.map +1 -0
- package/lib/module/types/chip.type.js +4 -0
- package/lib/module/types/chip.type.js.map +1 -0
- package/lib/module/types/common.type.js +4 -0
- package/lib/module/types/common.type.js.map +1 -0
- package/lib/module/types/dialog.type.js +4 -0
- package/lib/module/types/dialog.type.js.map +1 -0
- package/lib/module/types/grid.type.js +4 -0
- package/lib/module/types/grid.type.js.map +1 -0
- package/lib/module/types/index.js +15 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/menu.type.js +4 -0
- package/lib/module/types/menu.type.js.map +1 -0
- package/lib/module/types/stack.type.js +4 -0
- package/lib/module/types/stack.type.js.map +1 -0
- package/lib/module/types/styledComponents.type.js +4 -0
- package/lib/module/types/styledComponents.type.js.map +1 -0
- package/lib/module/types/switch.type.js +4 -0
- package/lib/module/types/switch.type.js.map +1 -0
- package/lib/module/types/userInput.type.js +4 -0
- package/lib/module/types/userInput.type.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/assets/svg/Check.d.ts +6 -0
- package/lib/typescript/commonjs/src/assets/svg/Check.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/assets/svg/X.d.ts +6 -0
- package/lib/typescript/commonjs/src/assets/svg/X.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/assets/svg/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/assets/svg/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Avatar/AvatarImage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Avatar/AvatarText.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Avatar/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/utils.d.ts +16 -0
- package/lib/typescript/commonjs/src/components/Button/utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Chip/Chip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Chip/utils.d.ts +14 -0
- package/lib/typescript/commonjs/src/components/Chip/utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogDescription.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +9 -0
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Menu/MenuItemLabel.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/calculations.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/Menu/calculations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Portal/PortalContext.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Portal/PortalContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Portal/PortalProvider.d.ts +7 -0
- package/lib/typescript/commonjs/src/components/Portal/PortalProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Provider/NativeProvider.d.ts +32 -0
- package/lib/typescript/commonjs/src/components/Provider/NativeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Slider/Slider.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/Slider/Slider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Stack/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/Stack/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/components/StyledComponents/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Surface/Surface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts +6 -0
- package/lib/typescript/commonjs/src/components/Switch/Switch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +38 -0
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +30 -0
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/UserInput/generateColors.d.ts +8 -0
- package/lib/typescript/commonjs/src/components/UserInput/generateColors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/breakPoints.d.ts +11 -0
- package/lib/typescript/commonjs/src/constants/breakPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/dialogSizes.d.ts +4 -0
- package/lib/typescript/commonjs/src/constants/dialogSizes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/theme.d.ts +17 -0
- package/lib/typescript/commonjs/src/constants/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/typographySizes.d.ts +13 -0
- package/lib/typescript/commonjs/src/constants/typographySizes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/CalculateGridSize.d.ts +3 -0
- package/lib/typescript/commonjs/src/helpers/CalculateGridSize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/DeviceSizeCategory.d.ts +7 -0
- package/lib/typescript/commonjs/src/helpers/DeviceSizeCategory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +3 -0
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +6 -0
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useColorScheme.d.ts +3 -0
- package/lib/typescript/commonjs/src/hooks/useColorScheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useConditionalWindowDimension.d.ts +6 -0
- package/lib/typescript/commonjs/src/hooks/useConditionalWindowDimension.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useResponsive.d.ts +3 -0
- package/lib/typescript/commonjs/src/hooks/useResponsive.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts +5 -0
- package/lib/typescript/commonjs/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +48 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/themes/DarkTheme.d.ts +4 -0
- package/lib/typescript/commonjs/src/themes/DarkTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/themes/LightTheme.d.ts +4 -0
- package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/themes/createTheme.d.ts +1 -0
- package/lib/typescript/commonjs/src/themes/createTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/themes/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/themes/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/avatar.type.d.ts +34 -0
- package/lib/typescript/commonjs/src/types/avatar.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/button.type.d.ts +54 -0
- package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/checkbox.type.d.ts +41 -0
- package/lib/typescript/commonjs/src/types/checkbox.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/chip.type.d.ts +38 -0
- package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/common.type.d.ts +47 -0
- package/lib/typescript/commonjs/src/types/common.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts +66 -0
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/grid.type.d.ts +58 -0
- package/lib/typescript/commonjs/src/types/grid.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/menu.type.d.ts +90 -0
- package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/stack.type.d.ts +46 -0
- package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +91 -0
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/switch.type.d.ts +33 -0
- package/lib/typescript/commonjs/src/types/switch.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts +74 -0
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/assets/svg/Check.d.ts +6 -0
- package/lib/typescript/module/src/assets/svg/Check.d.ts.map +1 -0
- package/lib/typescript/module/src/assets/svg/X.d.ts +6 -0
- package/lib/typescript/module/src/assets/svg/X.d.ts.map +1 -0
- package/lib/typescript/module/src/assets/svg/index.d.ts +3 -0
- package/lib/typescript/module/src/assets/svg/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts +6 -0
- package/lib/typescript/module/src/components/Avatar/AvatarImage.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts +6 -0
- package/lib/typescript/module/src/components/Avatar/AvatarText.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Avatar/index.d.ts +8 -0
- package/lib/typescript/module/src/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Button/Button.d.ts +6 -0
- package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Button/utils.d.ts +16 -0
- package/lib/typescript/module/src/components/Button/utils.d.ts.map +1 -0
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts +6 -0
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Chip/Chip.d.ts +6 -0
- package/lib/typescript/module/src/components/Chip/Chip.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Chip/utils.d.ts +14 -0
- package/lib/typescript/module/src/components/Chip/utils.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts +6 -0
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts +9 -0
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts +6 -0
- package/lib/typescript/module/src/components/Dialog/DialogDescription.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts +9 -0
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts +9 -0
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts +11 -0
- package/lib/typescript/module/src/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Divider/Divider.d.ts +11 -0
- package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Grid/Grid.d.ts +6 -0
- package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Header/Header.d.ts +15 -0
- package/lib/typescript/module/src/components/Header/Header.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Icon/Icon.d.ts +9 -0
- package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -0
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +11 -0
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Link/Link.d.ts +8 -0
- package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/Menu.d.ts +6 -0
- package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts +6 -0
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts +6 -0
- package/lib/typescript/module/src/components/Menu/MenuItemLabel.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/calculations.d.ts +18 -0
- package/lib/typescript/module/src/components/Menu/calculations.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Menu/index.d.ts +7 -0
- package/lib/typescript/module/src/components/Menu/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Portal/Portal.d.ts +8 -0
- package/lib/typescript/module/src/components/Portal/Portal.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Portal/PortalContext.d.ts +11 -0
- package/lib/typescript/module/src/components/Portal/PortalContext.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Portal/PortalProvider.d.ts +7 -0
- package/lib/typescript/module/src/components/Portal/PortalProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Progress/Progress.d.ts +17 -0
- package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Provider/NativeProvider.d.ts +32 -0
- package/lib/typescript/module/src/components/Provider/NativeProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Slider/Slider.d.ts +11 -0
- package/lib/typescript/module/src/components/Slider/Slider.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/HStack.d.ts +6 -0
- package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/VStack.d.ts +6 -0
- package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Stack/index.d.ts +8 -0
- package/lib/typescript/module/src/components/Stack/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts +6 -0
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -0
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts +6 -0
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts.map +1 -0
- package/lib/typescript/module/src/components/StyledComponents/index.d.ts +5 -0
- package/lib/typescript/module/src/components/StyledComponents/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Surface/Surface.d.ts +6 -0
- package/lib/typescript/module/src/components/Surface/Surface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/Switch/Switch.d.ts +6 -0
- package/lib/typescript/module/src/components/Switch/Switch.d.ts.map +1 -0
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +11 -0
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +38 -0
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +30 -0
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -0
- package/lib/typescript/module/src/components/UserInput/generateColors.d.ts +8 -0
- package/lib/typescript/module/src/components/UserInput/generateColors.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/breakPoints.d.ts +11 -0
- package/lib/typescript/module/src/constants/breakPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/dialogSizes.d.ts +4 -0
- package/lib/typescript/module/src/constants/dialogSizes.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/index.d.ts +4 -0
- package/lib/typescript/module/src/constants/index.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/theme.d.ts +17 -0
- package/lib/typescript/module/src/constants/theme.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/typographySizes.d.ts +13 -0
- package/lib/typescript/module/src/constants/typographySizes.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/CalculateGridSize.d.ts +3 -0
- package/lib/typescript/module/src/helpers/CalculateGridSize.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/DeviceSizeCategory.d.ts +7 -0
- package/lib/typescript/module/src/helpers/DeviceSizeCategory.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +3 -0
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +6 -0
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/index.d.ts +3 -0
- package/lib/typescript/module/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/index.d.ts +5 -0
- package/lib/typescript/module/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useColorScheme.d.ts +3 -0
- package/lib/typescript/module/src/hooks/useColorScheme.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useConditionalWindowDimension.d.ts +6 -0
- package/lib/typescript/module/src/hooks/useConditionalWindowDimension.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useResponsive.d.ts +3 -0
- package/lib/typescript/module/src/hooks/useResponsive.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/useTheme.d.ts +5 -0
- package/lib/typescript/module/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +48 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/themes/DarkTheme.d.ts +4 -0
- package/lib/typescript/module/src/themes/DarkTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/themes/LightTheme.d.ts +4 -0
- package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/themes/createTheme.d.ts +1 -0
- package/lib/typescript/module/src/themes/createTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/themes/index.d.ts +3 -0
- package/lib/typescript/module/src/themes/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/avatar.type.d.ts +34 -0
- package/lib/typescript/module/src/types/avatar.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/button.type.d.ts +54 -0
- package/lib/typescript/module/src/types/button.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/checkbox.type.d.ts +41 -0
- package/lib/typescript/module/src/types/checkbox.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/chip.type.d.ts +38 -0
- package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/common.type.d.ts +47 -0
- package/lib/typescript/module/src/types/common.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/dialog.type.d.ts +66 -0
- package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/grid.type.d.ts +58 -0
- package/lib/typescript/module/src/types/grid.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +13 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/menu.type.d.ts +90 -0
- package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/stack.type.d.ts +46 -0
- package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/styledComponents.type.d.ts +91 -0
- package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/switch.type.d.ts +33 -0
- package/lib/typescript/module/src/types/switch.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/userInput.type.d.ts +74 -0
- package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -0
- package/package.json +197 -0
- package/src/assets/svg/Check.tsx +17 -0
- package/src/assets/svg/X.tsx +16 -0
- package/src/assets/svg/index.ts +2 -0
- package/src/components/Avatar/AvatarImage.tsx +39 -0
- package/src/components/Avatar/AvatarText.tsx +35 -0
- package/src/components/Avatar/index.ts +9 -0
- package/src/components/Button/Button.tsx +153 -0
- package/src/components/Button/utils.ts +142 -0
- package/src/components/CheckBox/CheckBox.tsx +102 -0
- package/src/components/Chip/Chip.tsx +89 -0
- package/src/components/Chip/utils.ts +96 -0
- package/src/components/Dialog/Dialog.tsx +116 -0
- package/src/components/Dialog/DialogBody.tsx +34 -0
- package/src/components/Dialog/DialogDescription.tsx +28 -0
- package/src/components/Dialog/DialogFoot.tsx +35 -0
- package/src/components/Dialog/DialogHead.tsx +51 -0
- package/src/components/Dialog/index.ts +11 -0
- package/src/components/Divider/Divider.tsx +35 -0
- package/src/components/Grid/Grid.tsx +61 -0
- package/src/components/Header/Header.tsx +81 -0
- package/src/components/Icon/Icon.tsx +28 -0
- package/src/components/IconButton/IconButton.tsx +36 -0
- package/src/components/Link/Link.tsx +31 -0
- package/src/components/Menu/Menu.tsx +139 -0
- package/src/components/Menu/MenuItem.tsx +36 -0
- package/src/components/Menu/MenuItemLabel.tsx +27 -0
- package/src/components/Menu/calculations.ts +34 -0
- package/src/components/Menu/index.ts +8 -0
- package/src/components/Portal/Portal.tsx +19 -0
- package/src/components/Portal/PortalContext.tsx +10 -0
- package/src/components/Portal/PortalProvider.tsx +37 -0
- package/src/components/Progress/Progress.tsx +69 -0
- package/src/components/Provider/NativeProvider.tsx +58 -0
- package/src/components/Slider/Slider.tsx +45 -0
- package/src/components/Stack/HStack.tsx +38 -0
- package/src/components/Stack/VStack.tsx +31 -0
- package/src/components/Stack/index.ts +9 -0
- package/src/components/StyledComponents/StyledText.tsx +44 -0
- package/src/components/StyledComponents/StyledView.tsx +42 -0
- package/src/components/StyledComponents/index.tsx +6 -0
- package/src/components/Surface/Surface.tsx +38 -0
- package/src/components/Switch/Switch.tsx +35 -0
- package/src/components/TouchableRipple/TouchableRipple.tsx +92 -0
- package/src/components/UserInput/UserInput.tsx +124 -0
- package/src/components/UserInput/UserInputV2.tsx +132 -0
- package/src/components/UserInput/generateColors.ts +14 -0
- package/src/constants/breakPoints.ts +18 -0
- package/src/constants/dialogSizes.ts +12 -0
- package/src/constants/index.ts +3 -0
- package/src/constants/theme.ts +33 -0
- package/src/constants/typographySizes.ts +22 -0
- package/src/helpers/CalculateGridSize.ts +26 -0
- package/src/helpers/DeviceSizeCategory.ts +22 -0
- package/src/helpers/LightenColorShades.ts +7 -0
- package/src/helpers/ResponsiveCalculations.ts +78 -0
- package/src/helpers/index.ts +2 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useColorScheme.tsx +12 -0
- package/src/hooks/useConditionalWindowDimension.tsx +7 -0
- package/src/hooks/useResponsive.tsx +6 -0
- package/src/hooks/useTheme.tsx +13 -0
- package/src/index.ts +52 -0
- package/src/index.tsx +3 -0
- package/src/themes/DarkTheme.ts +39 -0
- package/src/themes/LightTheme.ts +97 -0
- package/src/themes/createTheme.ts +23 -0
- package/src/themes/index.ts +4 -0
- package/src/types/avatar.type.ts +43 -0
- package/src/types/button.type.ts +76 -0
- package/src/types/checkbox.type.ts +57 -0
- package/src/types/chip.type.ts +55 -0
- package/src/types/common.type.ts +50 -0
- package/src/types/dialog.type.ts +91 -0
- package/src/types/grid.type.ts +70 -0
- package/src/types/index.ts +12 -0
- package/src/types/menu.type.ts +110 -0
- package/src/types/stack.type.ts +55 -0
- package/src/types/styledComponents.type.ts +111 -0
- package/src/types/switch.type.ts +39 -0
- package/src/types/userInput.type.ts +95 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
import { verticalScale, horizontalScale } from "../../helpers/ResponsiveCalculations";
|
|
4
|
+
import { StyledText, StyledView } from '../StyledComponents';
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { getButtonColors } from './utils';
|
|
7
|
+
import TouchableRipple from '../TouchableRipple/TouchableRipple';
|
|
8
|
+
import type { ButtonProps } from '../../types';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const Button: React.FC<ButtonProps> = ({
|
|
12
|
+
variant = 'contained',
|
|
13
|
+
type = 'flat',
|
|
14
|
+
fullWidth = false,
|
|
15
|
+
paddingH = 19,
|
|
16
|
+
paddingV = 14,
|
|
17
|
+
bg,
|
|
18
|
+
br = 5,
|
|
19
|
+
stroke = 1,
|
|
20
|
+
strokeColor,
|
|
21
|
+
titleColor,
|
|
22
|
+
title = 'Button',
|
|
23
|
+
titleFS,
|
|
24
|
+
titleVariant = 'h5',
|
|
25
|
+
titleFF,
|
|
26
|
+
size = 50,
|
|
27
|
+
rippleColor,
|
|
28
|
+
renderIcon,
|
|
29
|
+
renderLeftIcon,
|
|
30
|
+
renderRightIcon,
|
|
31
|
+
disabled = false,
|
|
32
|
+
buttonContainerStyle,
|
|
33
|
+
textStyle,
|
|
34
|
+
onPress,
|
|
35
|
+
...props
|
|
36
|
+
}) => {
|
|
37
|
+
const theme: any = useTheme();
|
|
38
|
+
|
|
39
|
+
const { backgroundColor, buttonTextColor, buttonBorderColor, buttonIconColor } = getButtonColors({
|
|
40
|
+
theme,
|
|
41
|
+
variant,
|
|
42
|
+
bg,
|
|
43
|
+
titleColor,
|
|
44
|
+
strokeColor,
|
|
45
|
+
disabled
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const STYLES = StyleSheet.create({
|
|
49
|
+
BUTTON_CONT: {
|
|
50
|
+
backgroundColor: backgroundColor,
|
|
51
|
+
borderWidth: variant === 'contained' ? 0 : stroke,
|
|
52
|
+
borderColor: buttonBorderColor,
|
|
53
|
+
maxWidth: '100%',
|
|
54
|
+
},
|
|
55
|
+
BUTTON_TEXT: {
|
|
56
|
+
color: buttonTextColor,
|
|
57
|
+
textAlign: 'center',
|
|
58
|
+
fontFamily: titleFF ?? '',
|
|
59
|
+
},
|
|
60
|
+
FLAT_BTN_CONT: {
|
|
61
|
+
borderRadius: verticalScale(br),
|
|
62
|
+
overflow: 'hidden',
|
|
63
|
+
alignSelf: fullWidth ? 'stretch' : 'flex-start',
|
|
64
|
+
},
|
|
65
|
+
FLAT_BUTTON_CONT: {
|
|
66
|
+
paddingVertical: verticalScale(paddingV),
|
|
67
|
+
paddingHorizontal: horizontalScale(!fullWidth ? paddingH : 30),
|
|
68
|
+
borderRadius: verticalScale(br),
|
|
69
|
+
flexDirection: 'row',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'space-between',
|
|
72
|
+
gap: horizontalScale(10),
|
|
73
|
+
},
|
|
74
|
+
ROUND_BUTTON_CONT: {
|
|
75
|
+
borderRadius: verticalScale(100),
|
|
76
|
+
height: verticalScale(size),
|
|
77
|
+
width: verticalScale(size),
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
justifyContent: 'center',
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<>
|
|
85
|
+
{type === 'flat' && (
|
|
86
|
+
<StyledView style={STYLES.FLAT_BTN_CONT}>
|
|
87
|
+
<TouchableRipple
|
|
88
|
+
onPress={onPress}
|
|
89
|
+
rippleColor={rippleColor}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
// ref={ref}
|
|
92
|
+
{...props}
|
|
93
|
+
>
|
|
94
|
+
<StyledView style={[STYLES.FLAT_BUTTON_CONT, STYLES.BUTTON_CONT, buttonContainerStyle]}>
|
|
95
|
+
{(renderLeftIcon || (fullWidth && renderRightIcon)) && (
|
|
96
|
+
<StyledView f={fullWidth ? 1 : undefined}>
|
|
97
|
+
{renderLeftIcon && React.cloneElement(renderLeftIcon, {
|
|
98
|
+
color: buttonIconColor
|
|
99
|
+
})}
|
|
100
|
+
</StyledView>
|
|
101
|
+
)}
|
|
102
|
+
|
|
103
|
+
<StyledView
|
|
104
|
+
flexShrink={1}
|
|
105
|
+
f={fullWidth ? 8 : undefined}
|
|
106
|
+
>
|
|
107
|
+
<StyledText numberOfLines={1} fs={titleFS} variant={titleVariant} style={[STYLES.BUTTON_TEXT, textStyle]}>
|
|
108
|
+
{title}
|
|
109
|
+
</StyledText>
|
|
110
|
+
</StyledView>
|
|
111
|
+
|
|
112
|
+
{(renderRightIcon || (fullWidth && renderLeftIcon)) && (
|
|
113
|
+
<StyledView alignItems='flex-end' f={fullWidth ? 1 : undefined}>
|
|
114
|
+
{renderRightIcon && React.cloneElement(renderRightIcon, {
|
|
115
|
+
color: buttonIconColor
|
|
116
|
+
})}
|
|
117
|
+
</StyledView>
|
|
118
|
+
)}
|
|
119
|
+
</StyledView>
|
|
120
|
+
</TouchableRipple>
|
|
121
|
+
</StyledView>
|
|
122
|
+
)}
|
|
123
|
+
|
|
124
|
+
{type === 'round' && (
|
|
125
|
+
<StyledView
|
|
126
|
+
alignSelf='flex-start'
|
|
127
|
+
borderRadius={verticalScale(100)}
|
|
128
|
+
overflow='hidden'
|
|
129
|
+
style={{
|
|
130
|
+
overflow: 'hidden',
|
|
131
|
+
borderRadius: verticalScale(100),
|
|
132
|
+
alignSelf: 'flex-start'
|
|
133
|
+
}}
|
|
134
|
+
>
|
|
135
|
+
<TouchableRipple
|
|
136
|
+
onPress={onPress}
|
|
137
|
+
rippleColor={rippleColor}
|
|
138
|
+
{...props}
|
|
139
|
+
>
|
|
140
|
+
<StyledView
|
|
141
|
+
style={[STYLES.BUTTON_CONT, STYLES.ROUND_BUTTON_CONT, buttonContainerStyle]}
|
|
142
|
+
>
|
|
143
|
+
{renderIcon}
|
|
144
|
+
</StyledView>
|
|
145
|
+
</TouchableRipple>
|
|
146
|
+
</StyledView>
|
|
147
|
+
)}
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export default Button;
|
|
153
|
+
export type { ButtonProps };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { ButtonVariant, ThemeTypes } from "../../types";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const getButtonBorderColor = ({
|
|
5
|
+
theme,
|
|
6
|
+
strokeColor,
|
|
7
|
+
disabled
|
|
8
|
+
}: {
|
|
9
|
+
theme: ThemeTypes;
|
|
10
|
+
strokeColor: string | undefined;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
}) => {
|
|
13
|
+
if (disabled) {
|
|
14
|
+
return theme.colors.outline;
|
|
15
|
+
}
|
|
16
|
+
if (strokeColor) {
|
|
17
|
+
return strokeColor
|
|
18
|
+
}
|
|
19
|
+
return theme.colors.outline;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
const getButtonTextColor = ({
|
|
24
|
+
theme,
|
|
25
|
+
checkVariant,
|
|
26
|
+
titleColor,
|
|
27
|
+
disabled
|
|
28
|
+
}: {
|
|
29
|
+
theme: ThemeTypes;
|
|
30
|
+
checkVariant: (variant: ButtonVariant) => boolean;
|
|
31
|
+
titleColor: string | undefined;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
}) => {
|
|
34
|
+
|
|
35
|
+
if (disabled) {
|
|
36
|
+
return theme.colors.textDisable;
|
|
37
|
+
}
|
|
38
|
+
else if (titleColor) {
|
|
39
|
+
return titleColor
|
|
40
|
+
}
|
|
41
|
+
else if (checkVariant('outlined')) {
|
|
42
|
+
return theme.colors.textPrimary;
|
|
43
|
+
}
|
|
44
|
+
return theme.colors.textSecondary;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const getButtonBackgroundColor = ({
|
|
48
|
+
theme,
|
|
49
|
+
checkVariant,
|
|
50
|
+
bg,
|
|
51
|
+
disabled
|
|
52
|
+
}: {
|
|
53
|
+
theme: ThemeTypes;
|
|
54
|
+
checkVariant: (variant: ButtonVariant) => boolean;
|
|
55
|
+
bg: string | undefined;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
}) => {
|
|
58
|
+
|
|
59
|
+
if (disabled) {
|
|
60
|
+
return theme.colors.disable;
|
|
61
|
+
}
|
|
62
|
+
else if (bg) {
|
|
63
|
+
return bg
|
|
64
|
+
}
|
|
65
|
+
else if (checkVariant('contained')) {
|
|
66
|
+
return theme.colors.primary;
|
|
67
|
+
}
|
|
68
|
+
else if (checkVariant('outlined')) {
|
|
69
|
+
return 'transparent';
|
|
70
|
+
}
|
|
71
|
+
return theme.colors.primary;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
const getButtonIconColor = ({
|
|
76
|
+
theme,
|
|
77
|
+
checkVariant,
|
|
78
|
+
disabled,
|
|
79
|
+
}: {
|
|
80
|
+
theme: ThemeTypes;
|
|
81
|
+
checkVariant: (variant: ButtonVariant) => boolean;
|
|
82
|
+
disabled: boolean;
|
|
83
|
+
}) => {
|
|
84
|
+
if (disabled) {
|
|
85
|
+
return theme.colors.iconDisable;
|
|
86
|
+
} else if (checkVariant('outlined')) {
|
|
87
|
+
return theme.colors.iconPrimary
|
|
88
|
+
}
|
|
89
|
+
return theme.colors.iconSecondary;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const getButtonColors = ({
|
|
93
|
+
theme,
|
|
94
|
+
variant,
|
|
95
|
+
bg,
|
|
96
|
+
titleColor,
|
|
97
|
+
strokeColor,
|
|
98
|
+
disabled
|
|
99
|
+
}: {
|
|
100
|
+
theme: ThemeTypes;
|
|
101
|
+
variant: ButtonVariant;
|
|
102
|
+
bg: string | undefined;
|
|
103
|
+
titleColor: string | undefined;
|
|
104
|
+
strokeColor: string | undefined;
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
}) => {
|
|
107
|
+
|
|
108
|
+
const checkVariant = (variantToCompare: ButtonVariant) => {
|
|
109
|
+
return variant === variantToCompare;
|
|
110
|
+
};
|
|
111
|
+
const backgroundColor = getButtonBackgroundColor({
|
|
112
|
+
theme,
|
|
113
|
+
checkVariant,
|
|
114
|
+
bg,
|
|
115
|
+
disabled
|
|
116
|
+
});
|
|
117
|
+
const buttonTextColor = getButtonTextColor({
|
|
118
|
+
theme,
|
|
119
|
+
checkVariant,
|
|
120
|
+
titleColor,
|
|
121
|
+
disabled
|
|
122
|
+
});
|
|
123
|
+
const buttonBorderColor = getButtonBorderColor({
|
|
124
|
+
theme,
|
|
125
|
+
strokeColor,
|
|
126
|
+
disabled
|
|
127
|
+
});
|
|
128
|
+
const buttonIconColor = getButtonIconColor({
|
|
129
|
+
checkVariant,
|
|
130
|
+
theme,
|
|
131
|
+
disabled
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
backgroundColor,
|
|
136
|
+
buttonTextColor,
|
|
137
|
+
buttonBorderColor,
|
|
138
|
+
buttonIconColor
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export { getButtonColors };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { StyleSheet, TouchableWithoutFeedback } from "react-native";
|
|
3
|
+
import { StyledText, StyledView } from "../StyledComponents";
|
|
4
|
+
import Animated, { useAnimatedStyle, useSharedValue, withSpring } from "react-native-reanimated";
|
|
5
|
+
import { useTheme } from "../../hooks";
|
|
6
|
+
import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
7
|
+
import { Check } from "../../assets/svg";
|
|
8
|
+
import type { CheckBoxProps } from "../../types";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const CheckBox: React.FC<CheckBoxProps> = ({
|
|
12
|
+
variant = 'square',
|
|
13
|
+
isChecked = false,
|
|
14
|
+
defaultValue = false,
|
|
15
|
+
activeBgColor,
|
|
16
|
+
inActiveBgColor = 'transparent',
|
|
17
|
+
iconColor,
|
|
18
|
+
disableBuiltInState = false,
|
|
19
|
+
disabled = false,
|
|
20
|
+
text,
|
|
21
|
+
fs,
|
|
22
|
+
textVariant = 'h6',
|
|
23
|
+
size = 20,
|
|
24
|
+
iconSize,
|
|
25
|
+
containerStyle,
|
|
26
|
+
textStyle,
|
|
27
|
+
checkBoxStyle,
|
|
28
|
+
onPress,
|
|
29
|
+
}) => {
|
|
30
|
+
const [isCheckboxChecked, setIsCheckboxChecked] = useState<boolean>(defaultValue);
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
setIsCheckboxChecked(defaultValue);
|
|
34
|
+
}, [defaultValue]);
|
|
35
|
+
|
|
36
|
+
const scaleVal = useSharedValue(1);
|
|
37
|
+
const { colors }: any = useTheme();
|
|
38
|
+
activeBgColor = disabled ? colors.disable : activeBgColor ?? colors.primary;
|
|
39
|
+
iconSize = iconSize ?? size / 1.5;
|
|
40
|
+
const bgColor = (!disableBuiltInState && isCheckboxChecked) || (disableBuiltInState && isChecked) ? activeBgColor : inActiveBgColor;
|
|
41
|
+
|
|
42
|
+
const STYLES = StyleSheet.create({
|
|
43
|
+
CONTAINER: {
|
|
44
|
+
flexDirection: 'row',
|
|
45
|
+
gap: horizontalScale(10),
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
alignSelf: 'flex-start',
|
|
48
|
+
},
|
|
49
|
+
CHECKBOX_PARENT_CONT: {
|
|
50
|
+
height: verticalScale(size),
|
|
51
|
+
width: verticalScale(size),
|
|
52
|
+
borderWidth: 0.8,
|
|
53
|
+
borderColor: disabled ? colors.disable : activeBgColor,
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
borderRadius: variant === 'square' ? 5 : verticalScale(size),
|
|
57
|
+
padding: verticalScale(7),
|
|
58
|
+
backgroundColor: bgColor,
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
63
|
+
transform: [{ scale: scaleVal.value }]
|
|
64
|
+
}));
|
|
65
|
+
|
|
66
|
+
const onUserClick = () => {
|
|
67
|
+
if (!disableBuiltInState) {
|
|
68
|
+
onPress?.(!isCheckboxChecked);
|
|
69
|
+
setIsCheckboxChecked(!isCheckboxChecked);
|
|
70
|
+
} else {
|
|
71
|
+
onPress?.(!isChecked);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (<>
|
|
75
|
+
<TouchableWithoutFeedback
|
|
76
|
+
onPressIn={() => scaleVal.value = withSpring(0.8)}
|
|
77
|
+
onPressOut={() => scaleVal.value = withSpring(1)}
|
|
78
|
+
onPress={onUserClick}
|
|
79
|
+
disabled={disabled}
|
|
80
|
+
>
|
|
81
|
+
<StyledView style={[STYLES.CONTAINER, containerStyle]}>
|
|
82
|
+
|
|
83
|
+
<Animated.View style={[STYLES.CHECKBOX_PARENT_CONT, checkBoxStyle, animatedStyle]}>
|
|
84
|
+
{
|
|
85
|
+
(disableBuiltInState ? isChecked : isCheckboxChecked) &&
|
|
86
|
+
<Check
|
|
87
|
+
color={iconColor ?? colors.iconSecondary}
|
|
88
|
+
size={verticalScale(iconSize)}
|
|
89
|
+
/>
|
|
90
|
+
}
|
|
91
|
+
</Animated.View>
|
|
92
|
+
{
|
|
93
|
+
text &&
|
|
94
|
+
<StyledText style={textStyle} fs={fs} variant={textVariant} primary>{text}</StyledText>
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
</StyledView>
|
|
98
|
+
</TouchableWithoutFeedback>
|
|
99
|
+
</>)
|
|
100
|
+
}
|
|
101
|
+
export default CheckBox;
|
|
102
|
+
export type { CheckBoxProps };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, Pressable, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { StyledText, StyledView } from '../StyledComponents';
|
|
4
|
+
import { horizontalScale, verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
5
|
+
import { useTheme } from '../../hooks';
|
|
6
|
+
import { getChipColors } from './utils';
|
|
7
|
+
import type { ChipProps } from '../../types';
|
|
8
|
+
|
|
9
|
+
const Chip: React.FC<ChipProps> = ({
|
|
10
|
+
title = 'Chip',
|
|
11
|
+
bg,
|
|
12
|
+
titleColor,
|
|
13
|
+
fs,
|
|
14
|
+
br = 7,
|
|
15
|
+
gap = 7,
|
|
16
|
+
paddingV = 9,
|
|
17
|
+
paddingH = 13,
|
|
18
|
+
stroke = 0.9,
|
|
19
|
+
strokeColor,
|
|
20
|
+
rippleColor,
|
|
21
|
+
disabled = false,
|
|
22
|
+
renderLeftIcon,
|
|
23
|
+
renderRightIcon,
|
|
24
|
+
containerStyle,
|
|
25
|
+
textStyle,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
|
|
29
|
+
const theme: any = useTheme();
|
|
30
|
+
|
|
31
|
+
const { buttonTextColor, buttonBorderColor, backgroundColor } = getChipColors({
|
|
32
|
+
theme,
|
|
33
|
+
bg,
|
|
34
|
+
titleColor,
|
|
35
|
+
strokeColor,
|
|
36
|
+
disabled
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const STYLES = StyleSheet.create({
|
|
40
|
+
CONTAINER: {
|
|
41
|
+
flexDirection: 'row',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
borderWidth: stroke,
|
|
44
|
+
borderColor: buttonBorderColor,
|
|
45
|
+
backgroundColor: backgroundColor,
|
|
46
|
+
borderRadius: verticalScale(br),
|
|
47
|
+
paddingVertical: verticalScale(paddingV),
|
|
48
|
+
paddingHorizontal: horizontalScale(paddingH),
|
|
49
|
+
gap: horizontalScale(gap)
|
|
50
|
+
},
|
|
51
|
+
TEXT: {
|
|
52
|
+
color: buttonTextColor,
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return (<>
|
|
56
|
+
<StyledView alignSelf='flex-start'>
|
|
57
|
+
<Pressable
|
|
58
|
+
android_ripple={{
|
|
59
|
+
color: rippleColor,
|
|
60
|
+
}}
|
|
61
|
+
{...props}
|
|
62
|
+
disabled={disabled}
|
|
63
|
+
>
|
|
64
|
+
<StyledView style={[STYLES.CONTAINER, containerStyle]}>
|
|
65
|
+
{
|
|
66
|
+
renderLeftIcon &&
|
|
67
|
+
<TouchableOpacity
|
|
68
|
+
disabled={disabled}
|
|
69
|
+
>
|
|
70
|
+
{renderLeftIcon}
|
|
71
|
+
</TouchableOpacity>
|
|
72
|
+
}
|
|
73
|
+
<StyledText primary variant='h5' fs={fs} style={[STYLES.TEXT, textStyle]}>{title}</StyledText>
|
|
74
|
+
{
|
|
75
|
+
renderRightIcon &&
|
|
76
|
+
<TouchableOpacity
|
|
77
|
+
disabled={disabled}
|
|
78
|
+
>
|
|
79
|
+
{renderRightIcon}
|
|
80
|
+
</TouchableOpacity>
|
|
81
|
+
}
|
|
82
|
+
</StyledView>
|
|
83
|
+
|
|
84
|
+
</Pressable>
|
|
85
|
+
</StyledView>
|
|
86
|
+
</>);
|
|
87
|
+
}
|
|
88
|
+
export default Chip;
|
|
89
|
+
export type { ChipProps };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ThemeTypes } from "../../types";
|
|
2
|
+
|
|
3
|
+
const getBorderColor = ({
|
|
4
|
+
theme,
|
|
5
|
+
strokeColor,
|
|
6
|
+
disabled,
|
|
7
|
+
}: {
|
|
8
|
+
theme: ThemeTypes;
|
|
9
|
+
strokeColor: string | undefined;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
}) => {
|
|
12
|
+
if (disabled) {
|
|
13
|
+
return theme.colors.disable;
|
|
14
|
+
}
|
|
15
|
+
if (strokeColor) {
|
|
16
|
+
return strokeColor
|
|
17
|
+
}
|
|
18
|
+
return theme.colors.outline;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
const getTextColor = ({
|
|
23
|
+
theme,
|
|
24
|
+
titleColor,
|
|
25
|
+
disabled
|
|
26
|
+
}: {
|
|
27
|
+
theme: ThemeTypes;
|
|
28
|
+
titleColor: string | undefined;
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
}) => {
|
|
31
|
+
if (disabled) {
|
|
32
|
+
return theme.colors.textDisable;
|
|
33
|
+
}
|
|
34
|
+
else if (titleColor) {
|
|
35
|
+
return titleColor;
|
|
36
|
+
}
|
|
37
|
+
return theme.colors.textTertiary;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getBgColor = ({
|
|
41
|
+
theme,
|
|
42
|
+
bg,
|
|
43
|
+
disabled
|
|
44
|
+
}: {
|
|
45
|
+
theme: ThemeTypes;
|
|
46
|
+
bg: string | undefined;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
}) => {
|
|
49
|
+
if (disabled) {
|
|
50
|
+
return theme.colors.disable;
|
|
51
|
+
}
|
|
52
|
+
else if (bg) {
|
|
53
|
+
return bg
|
|
54
|
+
}
|
|
55
|
+
return theme.colors.chipBgColor;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const getChipColors = ({
|
|
59
|
+
theme,
|
|
60
|
+
bg,
|
|
61
|
+
titleColor,
|
|
62
|
+
strokeColor,
|
|
63
|
+
disabled
|
|
64
|
+
}: {
|
|
65
|
+
theme: ThemeTypes;
|
|
66
|
+
bg: string | undefined;
|
|
67
|
+
titleColor: string | undefined;
|
|
68
|
+
strokeColor: string | undefined;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
}) => {
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
const backgroundColor = getBgColor({
|
|
74
|
+
theme,
|
|
75
|
+
bg,
|
|
76
|
+
disabled
|
|
77
|
+
});
|
|
78
|
+
const buttonTextColor = getTextColor({
|
|
79
|
+
theme,
|
|
80
|
+
titleColor,
|
|
81
|
+
disabled
|
|
82
|
+
});
|
|
83
|
+
const buttonBorderColor = getBorderColor({
|
|
84
|
+
theme,
|
|
85
|
+
strokeColor,
|
|
86
|
+
disabled,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
backgroundColor,
|
|
91
|
+
buttonTextColor,
|
|
92
|
+
buttonBorderColor
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export { getChipColors };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useState } from 'react';
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import { Keyboard, BackHandler } from 'react-native';
|
|
4
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming, withSpring } from 'react-native-reanimated';
|
|
5
|
+
import { dialogSizes } from '../../constants';
|
|
6
|
+
import Portal from '../Portal/Portal';
|
|
7
|
+
import type { DialogProps, DialogRefProps } from '../../types';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const Dialog = forwardRef<DialogRefProps, DialogProps>(({
|
|
11
|
+
variant = 'default',
|
|
12
|
+
// isVisible = false,
|
|
13
|
+
size = 'lg',
|
|
14
|
+
fullScreen,
|
|
15
|
+
backdropColor = 'rgba(0, 0, 0, 0.5)',
|
|
16
|
+
animationDuration = 800,
|
|
17
|
+
onClose,
|
|
18
|
+
children,
|
|
19
|
+
}, ref) => {
|
|
20
|
+
|
|
21
|
+
const [dialogVisible, setDialogVisible] = useState(false);
|
|
22
|
+
const scale = useSharedValue(0.8);
|
|
23
|
+
const opacity = useSharedValue(0);
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
opacity.value = withTiming(dialogVisible ? 1 : 0);
|
|
27
|
+
scale.value = withSpring(dialogVisible ? 1 : 0.8,
|
|
28
|
+
{
|
|
29
|
+
duration: animationDuration,
|
|
30
|
+
dampingRatio: 0.6,
|
|
31
|
+
stiffness: 36,
|
|
32
|
+
overshootClamping: false,
|
|
33
|
+
restDisplacementThreshold: 0.01,
|
|
34
|
+
restSpeedThreshold: 0.01,
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}, [dialogVisible]);
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
BackHandler.addEventListener('hardwareBackPress', hardwareBackPress)
|
|
41
|
+
return () => BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);
|
|
42
|
+
}, [dialogVisible]);
|
|
43
|
+
|
|
44
|
+
const hardwareBackPress = () => {
|
|
45
|
+
onClose?.();
|
|
46
|
+
setDialogVisible(false);
|
|
47
|
+
return dialogVisible;
|
|
48
|
+
};
|
|
49
|
+
useImperativeHandle(ref, () => ({
|
|
50
|
+
open: () => setDialogVisible(true),
|
|
51
|
+
close: () => setDialogVisible(false)
|
|
52
|
+
}));
|
|
53
|
+
|
|
54
|
+
const backdropAnimatedStyle = useAnimatedStyle(() => {
|
|
55
|
+
return {
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
top: 0,
|
|
58
|
+
bottom: 0,
|
|
59
|
+
left: 0,
|
|
60
|
+
right: 0,
|
|
61
|
+
backgroundColor: backdropColor,
|
|
62
|
+
justifyContent: 'center',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
opacity: opacity.value
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const modalContAnimatedStyle = useAnimatedStyle(() => {
|
|
68
|
+
return {
|
|
69
|
+
backgroundColor: '#fff',
|
|
70
|
+
borderRadius: 5,
|
|
71
|
+
width: `${dialogSizes[size]}%`,
|
|
72
|
+
borderWidth: 1,
|
|
73
|
+
borderColor: '#d4d4d4',
|
|
74
|
+
minHeight: fullScreen ? '100%' : 'auto',
|
|
75
|
+
maxHeight: fullScreen ? '100%' : '80%',
|
|
76
|
+
opacity: opacity.value,
|
|
77
|
+
transform: [{
|
|
78
|
+
scale: scale.value
|
|
79
|
+
}],
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const renderChildrenWithVariant = () => {
|
|
83
|
+
return React.Children.map(children, (child) => {
|
|
84
|
+
if (React.isValidElement(child)) {
|
|
85
|
+
return cloneElement(child as ReactElement<any>, { variant });
|
|
86
|
+
}
|
|
87
|
+
return child;
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const handleStartShouldSetResponder = (): boolean => {
|
|
92
|
+
Keyboard.dismiss();
|
|
93
|
+
onClose?.();
|
|
94
|
+
setDialogVisible(false);
|
|
95
|
+
return true;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return (<>
|
|
99
|
+
<Portal name='dialog'>
|
|
100
|
+
<Animated.View
|
|
101
|
+
style={backdropAnimatedStyle}
|
|
102
|
+
pointerEvents={dialogVisible ? 'auto' : 'none'}
|
|
103
|
+
onStartShouldSetResponder={handleStartShouldSetResponder}
|
|
104
|
+
>
|
|
105
|
+
<Animated.View
|
|
106
|
+
style={modalContAnimatedStyle}
|
|
107
|
+
onStartShouldSetResponder={() => true}
|
|
108
|
+
>
|
|
109
|
+
{renderChildrenWithVariant()}
|
|
110
|
+
</Animated.View>
|
|
111
|
+
</Animated.View>
|
|
112
|
+
</Portal>
|
|
113
|
+
</>);
|
|
114
|
+
});
|
|
115
|
+
export default Dialog;
|
|
116
|
+
export type { DialogProps };
|