@kivid/native-components 1.0.0-alpha.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/README.md +57 -0
- package/assets/adaptive-icon.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/fonts/Nunito-Bold.ttf +0 -0
- package/assets/fonts/Nunito-BoldItalic.ttf +0 -0
- package/assets/fonts/Nunito-Italic.ttf +0 -0
- package/assets/fonts/Nunito-Medium.ttf +0 -0
- package/assets/fonts/Nunito-MediumItalic.ttf +0 -0
- package/assets/fonts/Nunito-Regular.ttf +0 -0
- package/assets/fonts/Nunito-SemiBold.ttf +0 -0
- package/assets/fonts/Nunito-SemiBoldItalic.ttf +0 -0
- package/assets/icon.png +0 -0
- package/assets/splash.png +0 -0
- package/dist/README.md +57 -0
- package/dist/commonjs/components/Button/assets/class-variants.js +91 -0
- package/dist/commonjs/components/Button/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/Button/assets/design-system-showcase.js +1455 -0
- package/dist/commonjs/components/Button/assets/design-system-showcase.js.map +1 -0
- package/dist/commonjs/components/Button/index.js +116 -0
- package/dist/commonjs/components/Button/index.js.map +1 -0
- package/dist/commonjs/components/Button/types.js +6 -0
- package/dist/commonjs/components/Button/types.js.map +1 -0
- package/dist/commonjs/components/Chip/assets/class-variants.js +63 -0
- package/dist/commonjs/components/Chip/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/Chip/enums/chip-size.js +12 -0
- package/dist/commonjs/components/Chip/enums/chip-size.js.map +1 -0
- package/dist/commonjs/components/Chip/enums/chip-variant.js +13 -0
- package/dist/commonjs/components/Chip/enums/chip-variant.js.map +1 -0
- package/dist/commonjs/components/Chip/enums/index.js +28 -0
- package/dist/commonjs/components/Chip/enums/index.js.map +1 -0
- package/dist/commonjs/components/Chip/index.js +38 -0
- package/dist/commonjs/components/Chip/index.js.map +1 -0
- package/dist/commonjs/components/Chip/types.js +6 -0
- package/dist/commonjs/components/Chip/types.js.map +1 -0
- package/dist/commonjs/components/HighlightedText/index.js +46 -0
- package/dist/commonjs/components/HighlightedText/index.js.map +1 -0
- package/dist/commonjs/components/HighlightedText/types.js +6 -0
- package/dist/commonjs/components/HighlightedText/types.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js +74 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/types.js +6 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAdd/types.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js +79 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/types.js +6 -0
- package/dist/commonjs/components/InformationStatus/components/GradientAlert/types.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js +74 -0
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/types.js +6 -0
- package/dist/commonjs/components/InformationStatus/components/GradientCheck/types.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js +72 -0
- package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/GradientClose/types.js +6 -0
- package/dist/commonjs/components/InformationStatus/components/GradientClose/types.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/components/index.js +50 -0
- package/dist/commonjs/components/InformationStatus/components/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/enums.js +14 -0
- package/dist/commonjs/components/InformationStatus/enums.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/index.js +75 -0
- package/dist/commonjs/components/InformationStatus/index.js.map +1 -0
- package/dist/commonjs/components/InformationStatus/types.js +6 -0
- package/dist/commonjs/components/InformationStatus/types.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/assets/class-variants.js +64 -0
- package/dist/commonjs/components/InputCheckbox/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/enums/checkbox-variant.js +17 -0
- package/dist/commonjs/components/InputCheckbox/enums/checkbox-variant.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/enums/index.js +28 -0
- package/dist/commonjs/components/InputCheckbox/enums/index.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/enums/select-variant.js +12 -0
- package/dist/commonjs/components/InputCheckbox/enums/select-variant.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/icons/CheckIcon/index.js +28 -0
- package/dist/commonjs/components/InputCheckbox/icons/CheckIcon/index.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/icons/IndeterminateIcon/index.js +28 -0
- package/dist/commonjs/components/InputCheckbox/icons/IndeterminateIcon/index.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/icons/index.js +20 -0
- package/dist/commonjs/components/InputCheckbox/icons/index.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/index.js +53 -0
- package/dist/commonjs/components/InputCheckbox/index.js.map +1 -0
- package/dist/commonjs/components/InputCheckbox/types.js +6 -0
- package/dist/commonjs/components/InputCheckbox/types.js.map +1 -0
- package/dist/commonjs/components/InputOTP/components/InformationStatus/index.js +93 -0
- package/dist/commonjs/components/InputOTP/components/InformationStatus/index.js.map +1 -0
- package/dist/commonjs/components/InputOTP/components/InformationStatus/types.js +6 -0
- package/dist/commonjs/components/InputOTP/components/InformationStatus/types.js.map +1 -0
- package/dist/commonjs/components/InputOTP/components/index.js +17 -0
- package/dist/commonjs/components/InputOTP/components/index.js.map +1 -0
- package/dist/commonjs/components/InputOTP/enums/index.js +17 -0
- package/dist/commonjs/components/InputOTP/enums/index.js.map +1 -0
- package/dist/commonjs/components/InputOTP/enums/information-status.js +15 -0
- package/dist/commonjs/components/InputOTP/enums/information-status.js.map +1 -0
- package/dist/commonjs/components/InputOTP/index.js +135 -0
- package/dist/commonjs/components/InputOTP/index.js.map +1 -0
- package/dist/commonjs/components/InputOTP/types.js +6 -0
- package/dist/commonjs/components/InputOTP/types.js.map +1 -0
- package/dist/commonjs/components/LoadingDots/assets/loading-button-dark.json +1 -0
- package/dist/commonjs/components/LoadingDots/assets/loading-button-grape.json +1 -0
- package/dist/commonjs/components/LoadingDots/assets/loading-button-light.json +1 -0
- package/dist/commonjs/components/LoadingDots/index.js +45 -0
- package/dist/commonjs/components/LoadingDots/index.js.map +1 -0
- package/dist/commonjs/components/LoadingDots/types.js +6 -0
- package/dist/commonjs/components/LoadingDots/types.js.map +1 -0
- package/dist/commonjs/components/Seal/assets/class-variants.js +64 -0
- package/dist/commonjs/components/Seal/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/Seal/components/AddIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/AddIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/AlertIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/AlertIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/ErrorIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/ErrorIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/LeftIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/LeftIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/MinusIcon/index.js +30 -0
- package/dist/commonjs/components/Seal/components/MinusIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/RightIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/RightIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/SuccessIcon/index.js +32 -0
- package/dist/commonjs/components/Seal/components/SuccessIcon/index.js.map +1 -0
- package/dist/commonjs/components/Seal/components/index.js +55 -0
- package/dist/commonjs/components/Seal/components/index.js.map +1 -0
- package/dist/commonjs/components/Seal/enums/index.js +17 -0
- package/dist/commonjs/components/Seal/enums/index.js.map +1 -0
- package/dist/commonjs/components/Seal/enums/seal-variant.js +17 -0
- package/dist/commonjs/components/Seal/enums/seal-variant.js.map +1 -0
- package/dist/commonjs/components/Seal/index.js +52 -0
- package/dist/commonjs/components/Seal/index.js.map +1 -0
- package/dist/commonjs/components/Seal/types.js +6 -0
- package/dist/commonjs/components/Seal/types.js.map +1 -0
- package/dist/commonjs/components/Title/components/icon/index.js +49 -0
- package/dist/commonjs/components/Title/components/icon/index.js.map +1 -0
- package/dist/commonjs/components/Title/components/icon/types.js +15 -0
- package/dist/commonjs/components/Title/components/icon/types.js.map +1 -0
- package/dist/commonjs/components/Title/components/index.js +28 -0
- package/dist/commonjs/components/Title/components/index.js.map +1 -0
- package/dist/commonjs/components/Title/components/marker/index.js +33 -0
- package/dist/commonjs/components/Title/components/marker/index.js.map +1 -0
- package/dist/commonjs/components/Title/components/marker/types.js +2 -0
- package/dist/commonjs/components/Title/components/marker/types.js.map +1 -0
- package/dist/commonjs/components/Title/index.js +44 -0
- package/dist/commonjs/components/Title/index.js.map +1 -0
- package/dist/commonjs/components/Title/types.js +6 -0
- package/dist/commonjs/components/Title/types.js.map +1 -0
- package/dist/commonjs/components/Toggle/assets/class-variants.js +37 -0
- package/dist/commonjs/components/Toggle/assets/class-variants.js.map +1 -0
- package/dist/commonjs/components/Toggle/enums/index.js +17 -0
- package/dist/commonjs/components/Toggle/enums/index.js.map +1 -0
- package/dist/commonjs/components/Toggle/enums/variant.js +15 -0
- package/dist/commonjs/components/Toggle/enums/variant.js.map +1 -0
- package/dist/commonjs/components/Toggle/index.js +41 -0
- package/dist/commonjs/components/Toggle/index.js.map +1 -0
- package/dist/commonjs/components/Toggle/types.js +6 -0
- package/dist/commonjs/components/Toggle/types.js.map +1 -0
- package/dist/commonjs/components/Typography/index.js +52 -0
- package/dist/commonjs/components/Typography/index.js.map +1 -0
- package/dist/commonjs/components/Typography/types.js +6 -0
- package/dist/commonjs/components/Typography/types.js.map +1 -0
- package/dist/commonjs/components/index.js +127 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/hooks/index.js +17 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/use-fonts.js +31 -0
- package/dist/commonjs/hooks/use-fonts.js.map +1 -0
- package/dist/commonjs/iconography/Icons/index.js +97 -0
- package/dist/commonjs/iconography/Icons/index.js.map +1 -0
- package/dist/commonjs/iconography/Icons/types.js +6 -0
- package/dist/commonjs/iconography/Icons/types.js.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/nativewind-env.d.js +3 -0
- package/dist/commonjs/nativewind-env.d.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/welcome.mdx +3 -0
- package/dist/module/components/Button/assets/class-variants.js +88 -0
- package/dist/module/components/Button/assets/class-variants.js.map +1 -0
- package/dist/module/components/Button/assets/design-system-showcase.js +1451 -0
- package/dist/module/components/Button/assets/design-system-showcase.js.map +1 -0
- package/dist/module/components/Button/index.js +110 -0
- package/dist/module/components/Button/index.js.map +1 -0
- package/dist/module/components/Button/types.js +4 -0
- package/dist/module/components/Button/types.js.map +1 -0
- package/dist/module/components/Chip/assets/class-variants.js +59 -0
- package/dist/module/components/Chip/assets/class-variants.js.map +1 -0
- package/dist/module/components/Chip/enums/chip-size.js +8 -0
- package/dist/module/components/Chip/enums/chip-size.js.map +1 -0
- package/dist/module/components/Chip/enums/chip-variant.js +9 -0
- package/dist/module/components/Chip/enums/chip-variant.js.map +1 -0
- package/dist/module/components/Chip/enums/index.js +5 -0
- package/dist/module/components/Chip/enums/index.js.map +1 -0
- package/dist/module/components/Chip/index.js +34 -0
- package/dist/module/components/Chip/index.js.map +1 -0
- package/dist/module/components/Chip/types.js +4 -0
- package/dist/module/components/Chip/types.js.map +1 -0
- package/dist/module/components/HighlightedText/index.js +41 -0
- package/dist/module/components/HighlightedText/index.js.map +1 -0
- package/dist/module/components/HighlightedText/types.js +4 -0
- package/dist/module/components/HighlightedText/types.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientAdd/index.js +69 -0
- package/dist/module/components/InformationStatus/components/GradientAdd/index.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientAdd/types.js +4 -0
- package/dist/module/components/InformationStatus/components/GradientAdd/types.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientAlert/index.js +74 -0
- package/dist/module/components/InformationStatus/components/GradientAlert/index.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientAlert/types.js +4 -0
- package/dist/module/components/InformationStatus/components/GradientAlert/types.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientCheck/index.js +69 -0
- package/dist/module/components/InformationStatus/components/GradientCheck/index.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientCheck/types.js +4 -0
- package/dist/module/components/InformationStatus/components/GradientCheck/types.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientClose/index.js +67 -0
- package/dist/module/components/InformationStatus/components/GradientClose/index.js.map +1 -0
- package/dist/module/components/InformationStatus/components/GradientClose/types.js +4 -0
- package/dist/module/components/InformationStatus/components/GradientClose/types.js.map +1 -0
- package/dist/module/components/InformationStatus/components/index.js +7 -0
- package/dist/module/components/InformationStatus/components/index.js.map +1 -0
- package/dist/module/components/InformationStatus/enums.js +10 -0
- package/dist/module/components/InformationStatus/enums.js.map +1 -0
- package/dist/module/components/InformationStatus/index.js +71 -0
- package/dist/module/components/InformationStatus/index.js.map +1 -0
- package/dist/module/components/InformationStatus/types.js +4 -0
- package/dist/module/components/InformationStatus/types.js.map +1 -0
- package/dist/module/components/InputCheckbox/assets/class-variants.js +60 -0
- package/dist/module/components/InputCheckbox/assets/class-variants.js.map +1 -0
- package/dist/module/components/InputCheckbox/enums/checkbox-variant.js +13 -0
- package/dist/module/components/InputCheckbox/enums/checkbox-variant.js.map +1 -0
- package/dist/module/components/InputCheckbox/enums/index.js +5 -0
- package/dist/module/components/InputCheckbox/enums/index.js.map +1 -0
- package/dist/module/components/InputCheckbox/enums/select-variant.js +8 -0
- package/dist/module/components/InputCheckbox/enums/select-variant.js.map +1 -0
- package/dist/module/components/InputCheckbox/icons/CheckIcon/index.js +22 -0
- package/dist/module/components/InputCheckbox/icons/CheckIcon/index.js.map +1 -0
- package/dist/module/components/InputCheckbox/icons/IndeterminateIcon/index.js +22 -0
- package/dist/module/components/InputCheckbox/icons/IndeterminateIcon/index.js.map +1 -0
- package/dist/module/components/InputCheckbox/icons/index.js +5 -0
- package/dist/module/components/InputCheckbox/icons/index.js.map +1 -0
- package/dist/module/components/InputCheckbox/index.js +49 -0
- package/dist/module/components/InputCheckbox/index.js.map +1 -0
- package/dist/module/components/InputCheckbox/types.js +4 -0
- package/dist/module/components/InputCheckbox/types.js.map +1 -0
- package/dist/module/components/InputOTP/components/InformationStatus/index.js +87 -0
- package/dist/module/components/InputOTP/components/InformationStatus/index.js.map +1 -0
- package/dist/module/components/InputOTP/components/InformationStatus/types.js +4 -0
- package/dist/module/components/InputOTP/components/InformationStatus/types.js.map +1 -0
- package/dist/module/components/InputOTP/components/index.js +4 -0
- package/dist/module/components/InputOTP/components/index.js.map +1 -0
- package/dist/module/components/InputOTP/enums/index.js +4 -0
- package/dist/module/components/InputOTP/enums/index.js.map +1 -0
- package/dist/module/components/InputOTP/enums/information-status.js +11 -0
- package/dist/module/components/InputOTP/enums/information-status.js.map +1 -0
- package/dist/module/components/InputOTP/index.js +130 -0
- package/dist/module/components/InputOTP/index.js.map +1 -0
- package/dist/module/components/InputOTP/types.js +4 -0
- package/dist/module/components/InputOTP/types.js.map +1 -0
- package/dist/module/components/LoadingDots/assets/loading-button-dark.json +1 -0
- package/dist/module/components/LoadingDots/assets/loading-button-grape.json +1 -0
- package/dist/module/components/LoadingDots/assets/loading-button-light.json +1 -0
- package/dist/module/components/LoadingDots/index.js +39 -0
- package/dist/module/components/LoadingDots/index.js.map +1 -0
- package/dist/module/components/LoadingDots/types.js +4 -0
- package/dist/module/components/LoadingDots/types.js.map +1 -0
- package/dist/module/components/Seal/assets/class-variants.js +60 -0
- package/dist/module/components/Seal/assets/class-variants.js.map +1 -0
- package/dist/module/components/Seal/components/AddIcon/index.js +27 -0
- package/dist/module/components/Seal/components/AddIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/AlertIcon/index.js +27 -0
- package/dist/module/components/Seal/components/AlertIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/ErrorIcon/index.js +27 -0
- package/dist/module/components/Seal/components/ErrorIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/LeftIcon/index.js +27 -0
- package/dist/module/components/Seal/components/LeftIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/MinusIcon/index.js +25 -0
- package/dist/module/components/Seal/components/MinusIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/RightIcon/index.js +27 -0
- package/dist/module/components/Seal/components/RightIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/SuccessIcon/index.js +27 -0
- package/dist/module/components/Seal/components/SuccessIcon/index.js.map +1 -0
- package/dist/module/components/Seal/components/index.js +10 -0
- package/dist/module/components/Seal/components/index.js.map +1 -0
- package/dist/module/components/Seal/enums/index.js +4 -0
- package/dist/module/components/Seal/enums/index.js.map +1 -0
- package/dist/module/components/Seal/enums/seal-variant.js +13 -0
- package/dist/module/components/Seal/enums/seal-variant.js.map +1 -0
- package/dist/module/components/Seal/index.js +46 -0
- package/dist/module/components/Seal/index.js.map +1 -0
- package/dist/module/components/Seal/types.js +4 -0
- package/dist/module/components/Seal/types.js.map +1 -0
- package/dist/module/components/Title/components/icon/index.js +45 -0
- package/dist/module/components/Title/components/icon/index.js.map +1 -0
- package/dist/module/components/Title/components/icon/types.js +11 -0
- package/dist/module/components/Title/components/icon/types.js.map +1 -0
- package/dist/module/components/Title/components/index.js +5 -0
- package/dist/module/components/Title/components/index.js.map +1 -0
- package/dist/module/components/Title/components/marker/index.js +29 -0
- package/dist/module/components/Title/components/marker/index.js.map +1 -0
- package/dist/module/components/Title/components/marker/types.js +2 -0
- package/dist/module/components/Title/components/marker/types.js.map +1 -0
- package/dist/module/components/Title/index.js +41 -0
- package/dist/module/components/Title/index.js.map +1 -0
- package/dist/module/components/Title/types.js +4 -0
- package/dist/module/components/Title/types.js.map +1 -0
- package/dist/module/components/Toggle/assets/class-variants.js +34 -0
- package/dist/module/components/Toggle/assets/class-variants.js.map +1 -0
- package/dist/module/components/Toggle/enums/index.js +4 -0
- package/dist/module/components/Toggle/enums/index.js.map +1 -0
- package/dist/module/components/Toggle/enums/variant.js +11 -0
- package/dist/module/components/Toggle/enums/variant.js.map +1 -0
- package/dist/module/components/Toggle/index.js +37 -0
- package/dist/module/components/Toggle/index.js.map +1 -0
- package/dist/module/components/Toggle/types.js +4 -0
- package/dist/module/components/Toggle/types.js.map +1 -0
- package/dist/module/components/Typography/index.js +47 -0
- package/dist/module/components/Typography/index.js.map +1 -0
- package/dist/module/components/Typography/types.js +4 -0
- package/dist/module/components/Typography/types.js.map +1 -0
- package/dist/module/components/index.js +14 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/hooks/index.js +4 -0
- package/dist/module/hooks/index.js.map +1 -0
- package/dist/module/hooks/use-fonts.js +27 -0
- package/dist/module/hooks/use-fonts.js.map +1 -0
- package/dist/module/iconography/Icons/index.js +92 -0
- package/dist/module/iconography/Icons/index.js.map +1 -0
- package/dist/module/iconography/Icons/types.js +4 -0
- package/dist/module/iconography/Icons/types.js.map +1 -0
- package/dist/module/index.js +4 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/nativewind-env.d.js +3 -0
- package/dist/module/nativewind-env.d.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/welcome.mdx +3 -0
- package/dist/package.json +57 -0
- package/dist/typescript/components/Button/assets/class-variants.d.ts +16 -0
- package/dist/typescript/components/Button/assets/design-system-showcase.d.ts +1448 -0
- package/dist/typescript/components/Button/index.d.ts +6 -0
- package/dist/typescript/components/Button/types.d.ts +16 -0
- package/dist/typescript/components/Chip/assets/class-variants.d.ts +5 -0
- package/dist/typescript/components/Chip/enums/chip-size.d.ts +4 -0
- package/dist/typescript/components/Chip/enums/chip-variant.d.ts +5 -0
- package/dist/typescript/components/Chip/enums/index.d.ts +2 -0
- package/dist/typescript/components/Chip/index.d.ts +2 -0
- package/dist/typescript/components/Chip/types.d.ts +11 -0
- package/dist/typescript/components/HighlightedText/index.d.ts +6 -0
- package/dist/typescript/components/HighlightedText/types.d.ts +9 -0
- package/dist/typescript/components/InformationStatus/components/GradientAdd/index.d.ts +3 -0
- package/dist/typescript/components/InformationStatus/components/GradientAdd/types.d.ts +5 -0
- package/dist/typescript/components/InformationStatus/components/GradientAlert/index.d.ts +3 -0
- package/dist/typescript/components/InformationStatus/components/GradientAlert/types.d.ts +5 -0
- package/dist/typescript/components/InformationStatus/components/GradientCheck/index.d.ts +3 -0
- package/dist/typescript/components/InformationStatus/components/GradientCheck/types.d.ts +5 -0
- package/dist/typescript/components/InformationStatus/components/GradientClose/index.d.ts +3 -0
- package/dist/typescript/components/InformationStatus/components/GradientClose/types.d.ts +5 -0
- package/dist/typescript/components/InformationStatus/components/index.d.ts +4 -0
- package/dist/typescript/components/InformationStatus/enums.d.ts +6 -0
- package/dist/typescript/components/InformationStatus/index.d.ts +2 -0
- package/dist/typescript/components/InformationStatus/types.d.ts +14 -0
- package/dist/typescript/components/InputCheckbox/assets/class-variants.d.ts +6 -0
- package/dist/typescript/components/InputCheckbox/enums/checkbox-variant.d.ts +9 -0
- package/dist/typescript/components/InputCheckbox/enums/index.d.ts +2 -0
- package/dist/typescript/components/InputCheckbox/enums/select-variant.d.ts +4 -0
- package/dist/typescript/components/InputCheckbox/icons/CheckIcon/index.d.ts +2 -0
- package/dist/typescript/components/InputCheckbox/icons/IndeterminateIcon/index.d.ts +2 -0
- package/dist/typescript/components/InputCheckbox/icons/index.d.ts +2 -0
- package/dist/typescript/components/InputCheckbox/index.d.ts +2 -0
- package/dist/typescript/components/InputCheckbox/types.d.ts +10 -0
- package/dist/typescript/components/InputOTP/components/InformationStatus/index.d.ts +3 -0
- package/dist/typescript/components/InputOTP/components/InformationStatus/types.d.ts +6 -0
- package/dist/typescript/components/InputOTP/components/index.d.ts +1 -0
- package/dist/typescript/components/InputOTP/enums/index.d.ts +1 -0
- package/dist/typescript/components/InputOTP/enums/information-status.d.ts +7 -0
- package/dist/typescript/components/InputOTP/index.d.ts +3 -0
- package/dist/typescript/components/InputOTP/types.d.ts +11 -0
- package/dist/typescript/components/LoadingDots/index.d.ts +3 -0
- package/dist/typescript/components/LoadingDots/types.d.ts +9 -0
- package/dist/typescript/components/Seal/assets/class-variants.d.ts +5 -0
- package/dist/typescript/components/Seal/components/AddIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/AlertIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/ErrorIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/LeftIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/MinusIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/RightIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/SuccessIcon/index.d.ts +2 -0
- package/dist/typescript/components/Seal/components/index.d.ts +7 -0
- package/dist/typescript/components/Seal/enums/index.d.ts +1 -0
- package/dist/typescript/components/Seal/enums/seal-variant.d.ts +9 -0
- package/dist/typescript/components/Seal/index.d.ts +3 -0
- package/dist/typescript/components/Seal/types.d.ts +14 -0
- package/dist/typescript/components/Title/components/icon/index.d.ts +2 -0
- package/dist/typescript/components/Title/components/icon/types.d.ts +12 -0
- package/dist/typescript/components/Title/components/index.d.ts +2 -0
- package/dist/typescript/components/Title/components/marker/index.d.ts +2 -0
- package/dist/typescript/components/Title/components/marker/types.d.ts +4 -0
- package/dist/typescript/components/Title/index.d.ts +7 -0
- package/dist/typescript/components/Title/types.d.ts +7 -0
- package/dist/typescript/components/Toggle/assets/class-variants.d.ts +6 -0
- package/dist/typescript/components/Toggle/enums/index.d.ts +1 -0
- package/dist/typescript/components/Toggle/enums/variant.d.ts +7 -0
- package/dist/typescript/components/Toggle/index.d.ts +2 -0
- package/dist/typescript/components/Toggle/types.d.ts +7 -0
- package/dist/typescript/components/Typography/index.d.ts +27 -0
- package/dist/typescript/components/Typography/types.d.ts +7 -0
- package/dist/typescript/components/index.d.ts +11 -0
- package/dist/typescript/hooks/index.d.ts +1 -0
- package/dist/typescript/hooks/use-fonts.d.ts +10 -0
- package/dist/typescript/iconography/Icons/index.d.ts +2 -0
- package/dist/typescript/iconography/Icons/types.d.ts +11 -0
- package/dist/typescript/index.d.ts +1 -0
- package/index.js +6 -0
- package/package.json +128 -0
- package/src/components/Button/assets/class-variants.ts +111 -0
- package/src/components/Button/assets/design-system-showcase.ts +1745 -0
- package/src/components/Button/index.stories.tsx +407 -0
- package/src/components/Button/index.tsx +137 -0
- package/src/components/Button/types.ts +31 -0
- package/src/components/Chip/assets/class-variants.ts +68 -0
- package/src/components/Chip/enums/chip-size.ts +4 -0
- package/src/components/Chip/enums/chip-variant.ts +5 -0
- package/src/components/Chip/enums/index.ts +2 -0
- package/src/components/Chip/index.stories.tsx +95 -0
- package/src/components/Chip/index.tsx +35 -0
- package/src/components/Chip/types.ts +13 -0
- package/src/components/HighlightedText/index.stories.tsx +110 -0
- package/src/components/HighlightedText/index.tsx +38 -0
- package/src/components/HighlightedText/types.ts +10 -0
- package/src/components/InformationStatus/components/GradientAdd/index.tsx +74 -0
- package/src/components/InformationStatus/components/GradientAdd/types.ts +6 -0
- package/src/components/InformationStatus/components/GradientAlert/index.tsx +81 -0
- package/src/components/InformationStatus/components/GradientAlert/types.ts +6 -0
- package/src/components/InformationStatus/components/GradientCheck/index.tsx +75 -0
- package/src/components/InformationStatus/components/GradientCheck/types.ts +6 -0
- package/src/components/InformationStatus/components/GradientClose/index.tsx +73 -0
- package/src/components/InformationStatus/components/GradientClose/types.ts +6 -0
- package/src/components/InformationStatus/components/index.ts +4 -0
- package/src/components/InformationStatus/enums.ts +6 -0
- package/src/components/InformationStatus/index.stories.tsx +112 -0
- package/src/components/InformationStatus/index.tsx +76 -0
- package/src/components/InformationStatus/types.ts +16 -0
- package/src/components/InputCheckbox/assets/class-variants.ts +90 -0
- package/src/components/InputCheckbox/enums/checkbox-variant.ts +9 -0
- package/src/components/InputCheckbox/enums/index.ts +2 -0
- package/src/components/InputCheckbox/enums/select-variant.ts +4 -0
- package/src/components/InputCheckbox/icons/CheckIcon/index.tsx +23 -0
- package/src/components/InputCheckbox/icons/IndeterminateIcon/index.tsx +23 -0
- package/src/components/InputCheckbox/icons/index.ts +2 -0
- package/src/components/InputCheckbox/index.stories.tsx +133 -0
- package/src/components/InputCheckbox/index.tsx +53 -0
- package/src/components/InputCheckbox/types.ts +13 -0
- package/src/components/InputOTP/components/InformationStatus/index.tsx +105 -0
- package/src/components/InputOTP/components/InformationStatus/types.ts +6 -0
- package/src/components/InputOTP/components/index.ts +1 -0
- package/src/components/InputOTP/enums/index.ts +1 -0
- package/src/components/InputOTP/enums/information-status.ts +7 -0
- package/src/components/InputOTP/index.stories.tsx +247 -0
- package/src/components/InputOTP/index.tsx +177 -0
- package/src/components/InputOTP/types.ts +12 -0
- package/src/components/LoadingDots/assets/loading-button-dark.json +1 -0
- package/src/components/LoadingDots/assets/loading-button-grape.json +1 -0
- package/src/components/LoadingDots/assets/loading-button-light.json +1 -0
- package/src/components/LoadingDots/index.stories.tsx +74 -0
- package/src/components/LoadingDots/index.tsx +37 -0
- package/src/components/LoadingDots/types.ts +10 -0
- package/src/components/Seal/assets/class-variants.ts +70 -0
- package/src/components/Seal/components/AddIcon/index.tsx +26 -0
- package/src/components/Seal/components/AlertIcon/index.tsx +26 -0
- package/src/components/Seal/components/ErrorIcon/index.tsx +26 -0
- package/src/components/Seal/components/LeftIcon/index.tsx +26 -0
- package/src/components/Seal/components/MinusIcon/index.tsx +24 -0
- package/src/components/Seal/components/RightIcon/index.tsx +26 -0
- package/src/components/Seal/components/SuccessIcon/index.tsx +26 -0
- package/src/components/Seal/components/index.ts +7 -0
- package/src/components/Seal/enums/index.ts +1 -0
- package/src/components/Seal/enums/seal-variant.ts +9 -0
- package/src/components/Seal/index.stories.tsx +124 -0
- package/src/components/Seal/index.tsx +53 -0
- package/src/components/Seal/types.ts +18 -0
- package/src/components/Title/components/icon/index.tsx +51 -0
- package/src/components/Title/components/icon/types.ts +12 -0
- package/src/components/Title/components/index.ts +2 -0
- package/src/components/Title/components/marker/index.tsx +25 -0
- package/src/components/Title/components/marker/types.ts +13 -0
- package/src/components/Title/index.stories.tsx +619 -0
- package/src/components/Title/index.tsx +36 -0
- package/src/components/Title/types.ts +7 -0
- package/src/components/Toggle/assets/class-variants.ts +40 -0
- package/src/components/Toggle/enums/index.ts +1 -0
- package/src/components/Toggle/enums/variant.ts +7 -0
- package/src/components/Toggle/index.stories.tsx +88 -0
- package/src/components/Toggle/index.tsx +42 -0
- package/src/components/Toggle/types.ts +8 -0
- package/src/components/Typography/index.stories.tsx +260 -0
- package/src/components/Typography/index.tsx +46 -0
- package/src/components/Typography/types.ts +8 -0
- package/src/components/index.ts +11 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-fonts.ts +22 -0
- package/src/iconography/Icons/index.stories.tsx +23 -0
- package/src/iconography/Icons/index.tsx +89 -0
- package/src/iconography/Icons/types.ts +12 -0
- package/src/index.ts +1 -0
- package/src/nativewind-env.d.ts +1 -0
- package/src/welcome.mdx +3 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native";
|
|
2
|
+
import { InformationStatus } from "./index";
|
|
3
|
+
import { InformationStatusOptionsEnum } from "./enums";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
|
|
6
|
+
const statusOptions = Object.values(InformationStatusOptionsEnum);
|
|
7
|
+
const sizeOptions = ["small", "medium", "large"];
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof InformationStatus> = {
|
|
10
|
+
title: "Components/InformationStatus",
|
|
11
|
+
component: InformationStatus,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: "centered",
|
|
14
|
+
},
|
|
15
|
+
tags: ["autodocs"],
|
|
16
|
+
argTypes: {
|
|
17
|
+
status: {
|
|
18
|
+
control: { type: "select" },
|
|
19
|
+
options: statusOptions,
|
|
20
|
+
description: "Status of the information",
|
|
21
|
+
table: {
|
|
22
|
+
type: { summary: statusOptions.join(" | ") },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
square: {
|
|
26
|
+
control: { type: "boolean" },
|
|
27
|
+
description: "Whether the status indicator is square-shaped",
|
|
28
|
+
},
|
|
29
|
+
size: {
|
|
30
|
+
control: { type: "select" },
|
|
31
|
+
options: sizeOptions,
|
|
32
|
+
description: "Size of the status indicator",
|
|
33
|
+
table: {
|
|
34
|
+
type: { summary: sizeOptions.join(" | ") },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
|
|
43
|
+
export const Status: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
status: InformationStatusOptionsEnum.SUCCESS,
|
|
46
|
+
size: "medium",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const All: Story = {
|
|
51
|
+
render: (args) => {
|
|
52
|
+
return (
|
|
53
|
+
<View className="flex flex-col gap-500">
|
|
54
|
+
<View className="flex flex-row gap-400">
|
|
55
|
+
{statusOptions.map((status) => (
|
|
56
|
+
<InformationStatus key={status} status={status} size={"small"} />
|
|
57
|
+
))}
|
|
58
|
+
</View>
|
|
59
|
+
|
|
60
|
+
<View className="flex flex-row gap-400">
|
|
61
|
+
{statusOptions.map((status) => (
|
|
62
|
+
<InformationStatus key={status} status={status} size={"medium"} />
|
|
63
|
+
))}
|
|
64
|
+
</View>
|
|
65
|
+
|
|
66
|
+
<View className="flex flex-row gap-400">
|
|
67
|
+
{statusOptions.map((status) => (
|
|
68
|
+
<InformationStatus key={status} status={status} size={"large"} />
|
|
69
|
+
))}
|
|
70
|
+
</View>
|
|
71
|
+
|
|
72
|
+
<View className="flex flex-row gap-400">
|
|
73
|
+
{statusOptions.map((status) => (
|
|
74
|
+
<InformationStatus
|
|
75
|
+
key={status}
|
|
76
|
+
status={status}
|
|
77
|
+
size={"small"}
|
|
78
|
+
square
|
|
79
|
+
/>
|
|
80
|
+
))}
|
|
81
|
+
</View>
|
|
82
|
+
|
|
83
|
+
<View className="flex flex-row gap-400">
|
|
84
|
+
{statusOptions.map((status) => (
|
|
85
|
+
<InformationStatus
|
|
86
|
+
key={status}
|
|
87
|
+
status={status}
|
|
88
|
+
size={"medium"}
|
|
89
|
+
square
|
|
90
|
+
/>
|
|
91
|
+
))}
|
|
92
|
+
</View>
|
|
93
|
+
|
|
94
|
+
<View className="flex flex-row gap-400">
|
|
95
|
+
{statusOptions.map((status) => (
|
|
96
|
+
<InformationStatus
|
|
97
|
+
key={status}
|
|
98
|
+
status={status}
|
|
99
|
+
size={"large"}
|
|
100
|
+
square
|
|
101
|
+
/>
|
|
102
|
+
))}
|
|
103
|
+
</View>
|
|
104
|
+
</View>
|
|
105
|
+
);
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
args: {
|
|
109
|
+
status: InformationStatusOptionsEnum.SUCCESS,
|
|
110
|
+
size: "medium",
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GradientAdd,
|
|
3
|
+
GradientAlert,
|
|
4
|
+
GradientCheck,
|
|
5
|
+
GradientClose,
|
|
6
|
+
} from "./components";
|
|
7
|
+
import type { InformationStatusProps } from "./types";
|
|
8
|
+
import { InformationStatusOptionsEnum } from "./enums";
|
|
9
|
+
import { cva } from "class-variance-authority";
|
|
10
|
+
import { merge } from "@butterfly/tailwind-preset";
|
|
11
|
+
import { View } from "react-native";
|
|
12
|
+
|
|
13
|
+
export function InformationStatus(props: InformationStatusProps) {
|
|
14
|
+
const { status, size = "medium", square = false, className, style } = props;
|
|
15
|
+
|
|
16
|
+
const mappedIconSize = {
|
|
17
|
+
small: 16,
|
|
18
|
+
medium: 24,
|
|
19
|
+
large: 32,
|
|
20
|
+
}[size];
|
|
21
|
+
|
|
22
|
+
const iconMap = {
|
|
23
|
+
[InformationStatusOptionsEnum.SUCCESS]: () => (
|
|
24
|
+
<GradientCheck size={mappedIconSize} color="#F2F7F7" />
|
|
25
|
+
),
|
|
26
|
+
[InformationStatusOptionsEnum.ERROR]: () => (
|
|
27
|
+
<GradientClose size={mappedIconSize} color="#F2F7F7" />
|
|
28
|
+
),
|
|
29
|
+
[InformationStatusOptionsEnum.WARNING]: () => (
|
|
30
|
+
<GradientAlert size={mappedIconSize} color="#F2F7F7" />
|
|
31
|
+
),
|
|
32
|
+
[InformationStatusOptionsEnum.ADD]: () => (
|
|
33
|
+
<GradientAdd size={mappedIconSize} color="#F2F7F7" />
|
|
34
|
+
),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const selectedVariants = cva(
|
|
38
|
+
["flex items-center justify-center color-chia-200"],
|
|
39
|
+
{
|
|
40
|
+
variants: {
|
|
41
|
+
variant: {
|
|
42
|
+
add: "bg-grape-500",
|
|
43
|
+
success: "bg-pear-500",
|
|
44
|
+
error: "bg-blackberry-500",
|
|
45
|
+
warning: "bg-tangerine-500",
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
small: [`${square ? "w-900 h-900" : "w-1000 h-700"}`],
|
|
49
|
+
medium: [`${square ? "w-1000 h-1000" : "w-1200 h-800"}`],
|
|
50
|
+
large: [`${square ? "w-1100 h-1100" : "w-[80px] h-900"}`],
|
|
51
|
+
},
|
|
52
|
+
square: {
|
|
53
|
+
true: "rounded-700",
|
|
54
|
+
false: "rounded-500",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const Icon = iconMap[status];
|
|
61
|
+
|
|
62
|
+
const informationStatusStyle = merge(
|
|
63
|
+
selectedVariants({
|
|
64
|
+
variant: status,
|
|
65
|
+
size: size,
|
|
66
|
+
square: square,
|
|
67
|
+
}),
|
|
68
|
+
className
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<View className={informationStatusStyle} style={style}>
|
|
73
|
+
<Icon />
|
|
74
|
+
</View>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { SvgProps } from "react-native-svg";
|
|
3
|
+
import { InformationStatusOptionsEnum } from "./enums";
|
|
4
|
+
|
|
5
|
+
export interface InformationStatusProps {
|
|
6
|
+
status: InformationStatusOptionsEnum;
|
|
7
|
+
size?: "small" | "medium" | "large";
|
|
8
|
+
square?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface InformationStatusIconProps extends SvgProps {
|
|
14
|
+
size?: number;
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
import { CheckboxVariantEnum } from "../enums";
|
|
3
|
+
|
|
4
|
+
export const inputCheckboxVariants = cva(
|
|
5
|
+
"flex items-center justify-center w-[20px] h-[20px] rounded-500 border transition-all duration-200",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
[CheckboxVariantEnum.GRAPE]: [
|
|
10
|
+
"bg-chia-200 border-chia-400",
|
|
11
|
+
"disabled:bg-grape-300 disabled:border-grape-300",
|
|
12
|
+
],
|
|
13
|
+
[CheckboxVariantEnum.JAVA]: [
|
|
14
|
+
"bg-chia-200 border-chia-400",
|
|
15
|
+
"disabled:bg-java-300 disabled:border-java-300",
|
|
16
|
+
],
|
|
17
|
+
[CheckboxVariantEnum.PEAR]: [
|
|
18
|
+
"bg-chia-200 border-chia-400",
|
|
19
|
+
"disabled:bg-pear-300 disabled:border-pear-300",
|
|
20
|
+
],
|
|
21
|
+
[CheckboxVariantEnum.TANGERINE]: [
|
|
22
|
+
"bg-chia-200 border-chia-400",
|
|
23
|
+
"disabled:bg-tangerine-300 disabled:border-tangerine-300",
|
|
24
|
+
],
|
|
25
|
+
[CheckboxVariantEnum.CHIA]: [
|
|
26
|
+
"bg-chia-200 border-chia-400",
|
|
27
|
+
"disabled:bg-chia-300 disabled:border-chia-300",
|
|
28
|
+
],
|
|
29
|
+
[CheckboxVariantEnum.PITAYA]: [
|
|
30
|
+
"bg-chia-200 border-chia-400",
|
|
31
|
+
"disabled:bg-pitaya-300 disabled:border-pitaya-300",
|
|
32
|
+
],
|
|
33
|
+
[CheckboxVariantEnum.MANGO]: [
|
|
34
|
+
"bg-chia-200 border-chia-400",
|
|
35
|
+
"disabled:bg-mango-300 disabled:border-mango-300",
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
isChecked: {
|
|
39
|
+
true: null,
|
|
40
|
+
false: "border-lychee-300 bg-lychee-200",
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
true: "opacity-50 cursor-not-allowed",
|
|
44
|
+
false: "cursor-pointer",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
compoundVariants: [
|
|
48
|
+
{
|
|
49
|
+
variant: CheckboxVariantEnum.GRAPE,
|
|
50
|
+
isChecked: true,
|
|
51
|
+
class: "bg-grape-500 border-grape-500",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
variant: CheckboxVariantEnum.JAVA,
|
|
55
|
+
isChecked: true,
|
|
56
|
+
class: "bg-java-500 border-java-500",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
variant: CheckboxVariantEnum.PEAR,
|
|
60
|
+
isChecked: true,
|
|
61
|
+
class: "bg-pear-500 border-pear-500",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
variant: CheckboxVariantEnum.TANGERINE,
|
|
65
|
+
isChecked: true,
|
|
66
|
+
class: "bg-tangerine-500 border-tangerine-500",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
variant: CheckboxVariantEnum.CHIA,
|
|
70
|
+
isChecked: true,
|
|
71
|
+
class: "bg-chia-600 border-chia-600",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
variant: CheckboxVariantEnum.PITAYA,
|
|
75
|
+
isChecked: true,
|
|
76
|
+
class: "bg-pitaya-500 border-pitaya-500",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
variant: CheckboxVariantEnum.MANGO,
|
|
80
|
+
isChecked: true,
|
|
81
|
+
class: "bg-mango-500 border-mango-500",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
variant: CheckboxVariantEnum.JAVA,
|
|
86
|
+
isChecked: false,
|
|
87
|
+
disabled: false,
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import type { SvgProps } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
export const CheckIcon = (props: SvgProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
fill="#F2F7F7"
|
|
8
|
+
viewBox="0 0 10 2"
|
|
9
|
+
width={10}
|
|
10
|
+
height={2}
|
|
11
|
+
color="#F2F7F7"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<Path
|
|
15
|
+
stroke="#F2F7F7"
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
d="M0.833344 1.00008C0.833344 0.539844 1.20644 0.166748 1.66668 0.166748H8.33334C8.79358 0.166748 9.16668 0.539844 9.16668 1.00008C9.16668 1.46032 8.79358 1.83341 8.33334 1.83341H1.66668C1.20644 1.83341 0.833344 1.46032 0.833344 1.00008Z"
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import type { SvgProps } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
export const IndeterminateIcon = (props: SvgProps) => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
fill="#F2F7F7"
|
|
8
|
+
viewBox="0 0 9 6"
|
|
9
|
+
width={9}
|
|
10
|
+
height={6}
|
|
11
|
+
color="#F2F7F7"
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<Path
|
|
15
|
+
stroke="#F2F7F7"
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
d="M8.1025 0.590872C8.42045 0.923619 8.40847 1.45112 8.07572 1.76908L3.88967 5.76908C3.57149 6.07312 3.07174 6.07733 2.74848 5.77869L0.267856 3.48703C-0.0702016 3.17472 -0.0910764 2.6475 0.22123 2.30944C0.533537 1.97138 1.06076 1.95051 1.39882 2.26281L3.30432 4.02317L6.92429 0.564094C7.25704 0.246136 7.78454 0.258125 8.1025 0.590872Z"
|
|
19
|
+
/>
|
|
20
|
+
</Svg>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native";
|
|
2
|
+
|
|
3
|
+
import { InputCheckbox } from ".";
|
|
4
|
+
import { CheckboxVariantEnum, SelectVariantEnum } from "./enums";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
import { HighlightedText } from "../HighlightedText";
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof InputCheckbox> = {
|
|
11
|
+
title: "Components/InputCheckbox",
|
|
12
|
+
component: InputCheckbox,
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: "centered",
|
|
15
|
+
},
|
|
16
|
+
argTypes: {
|
|
17
|
+
isChecked: {
|
|
18
|
+
control: "boolean",
|
|
19
|
+
description: "Controls whether the checkbox is checked",
|
|
20
|
+
},
|
|
21
|
+
onChange: {
|
|
22
|
+
action: "changed",
|
|
23
|
+
description: "Callback fired when checkbox state changes",
|
|
24
|
+
},
|
|
25
|
+
variant: {
|
|
26
|
+
control: "select",
|
|
27
|
+
options: Object.values(CheckboxVariantEnum),
|
|
28
|
+
description: "Visual variant of the checkbox",
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: Object.values(CheckboxVariantEnum).join(" | ") },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
control: "boolean",
|
|
35
|
+
description: "Whether the checkbox is disabled",
|
|
36
|
+
},
|
|
37
|
+
selectType: {
|
|
38
|
+
control: "select",
|
|
39
|
+
options: Object.values(SelectVariantEnum),
|
|
40
|
+
description: "Type of selection indicator",
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: Object.values(SelectVariantEnum).join(" | ") },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
args: {
|
|
47
|
+
isChecked: false,
|
|
48
|
+
disabled: false,
|
|
49
|
+
variant: CheckboxVariantEnum.JAVA,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof InputCheckbox>;
|
|
55
|
+
|
|
56
|
+
export const Default: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
isChecked: false,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const AllVariants: Story = {
|
|
63
|
+
render: () => {
|
|
64
|
+
return (
|
|
65
|
+
<View>
|
|
66
|
+
{Object.values(CheckboxVariantEnum).map((variant) => (
|
|
67
|
+
<View
|
|
68
|
+
key={variant}
|
|
69
|
+
className="flex flex-row items-center gap-700 m-600"
|
|
70
|
+
>
|
|
71
|
+
<InputCheckbox
|
|
72
|
+
variant={variant}
|
|
73
|
+
isChecked={false}
|
|
74
|
+
onChange={() => {}}
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
<InputCheckbox variant={variant} isChecked onChange={() => {}} />
|
|
78
|
+
|
|
79
|
+
<InputCheckbox
|
|
80
|
+
variant={variant}
|
|
81
|
+
selectType={SelectVariantEnum.INDETERMINATE}
|
|
82
|
+
isChecked
|
|
83
|
+
onChange={() => {}}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<InputCheckbox
|
|
87
|
+
variant={variant}
|
|
88
|
+
isChecked
|
|
89
|
+
disabled
|
|
90
|
+
onChange={() => {}}
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<InputCheckbox
|
|
94
|
+
variant={variant}
|
|
95
|
+
selectType={SelectVariantEnum.INDETERMINATE}
|
|
96
|
+
isChecked
|
|
97
|
+
disabled
|
|
98
|
+
onChange={() => {}}
|
|
99
|
+
/>
|
|
100
|
+
</View>
|
|
101
|
+
))}
|
|
102
|
+
</View>
|
|
103
|
+
);
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const Interactive: Story = {
|
|
108
|
+
render: (args) => {
|
|
109
|
+
const [isChecked, setIsChecked] = useState(args.isChecked || false);
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<View className="flex flex-col gap-300">
|
|
113
|
+
<InputCheckbox
|
|
114
|
+
{...args}
|
|
115
|
+
isChecked={isChecked}
|
|
116
|
+
onChange={(value) => {
|
|
117
|
+
setIsChecked(value);
|
|
118
|
+
args.onChange?.(value);
|
|
119
|
+
}}
|
|
120
|
+
/>
|
|
121
|
+
<HighlightedText
|
|
122
|
+
text="Status:"
|
|
123
|
+
highlightText={isChecked ? "Checked" : "Unchecked"}
|
|
124
|
+
className="mt-500"
|
|
125
|
+
/>
|
|
126
|
+
</View>
|
|
127
|
+
);
|
|
128
|
+
},
|
|
129
|
+
args: {
|
|
130
|
+
isChecked: false,
|
|
131
|
+
disabled: false,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { InputCheckboxProps } from "./types";
|
|
2
|
+
import { CheckboxVariantEnum, SelectVariantEnum } from "./enums";
|
|
3
|
+
import { inputCheckboxVariants } from "./assets/class-variants";
|
|
4
|
+
import { TouchableOpacity, View } from "react-native";
|
|
5
|
+
import { CheckIcon, IndeterminateIcon } from "./icons";
|
|
6
|
+
|
|
7
|
+
export function InputCheckbox(props: InputCheckboxProps) {
|
|
8
|
+
const {
|
|
9
|
+
isChecked = false,
|
|
10
|
+
selectType = SelectVariantEnum.SELECTED,
|
|
11
|
+
variant = CheckboxVariantEnum.JAVA,
|
|
12
|
+
onChange,
|
|
13
|
+
disabled = false
|
|
14
|
+
} = props;
|
|
15
|
+
|
|
16
|
+
function handleChange() {
|
|
17
|
+
onChange(!isChecked);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function renderIcon() {
|
|
21
|
+
if (!isChecked) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (selectType === SelectVariantEnum.INDETERMINATE) {
|
|
26
|
+
return <CheckIcon />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return <IndeterminateIcon />;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View className="relative inline-flex flex-row items-center">
|
|
34
|
+
<TouchableOpacity
|
|
35
|
+
onPress={handleChange}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
accessible
|
|
38
|
+
accessibilityRole="checkbox"
|
|
39
|
+
accessibilityState={{ checked: isChecked }}
|
|
40
|
+
>
|
|
41
|
+
<View
|
|
42
|
+
className={inputCheckboxVariants({
|
|
43
|
+
variant,
|
|
44
|
+
disabled,
|
|
45
|
+
isChecked
|
|
46
|
+
})}
|
|
47
|
+
>
|
|
48
|
+
{renderIcon()}
|
|
49
|
+
</View>
|
|
50
|
+
</TouchableOpacity>
|
|
51
|
+
</View>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CheckboxVariantEnum, SelectVariantEnum } from "./enums";
|
|
2
|
+
|
|
3
|
+
export type CheckboxVariant = CheckboxVariantEnum;
|
|
4
|
+
|
|
5
|
+
export type CheckboxSelectType = SelectVariantEnum;
|
|
6
|
+
|
|
7
|
+
export interface InputCheckboxProps {
|
|
8
|
+
isChecked?: boolean;
|
|
9
|
+
selectType?: CheckboxSelectType;
|
|
10
|
+
variant?: CheckboxVariant;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onChange(value: boolean): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import type { InformationStatusProps } from "./types";
|
|
5
|
+
|
|
6
|
+
import { merge } from "@butterfly/tailwind-preset";
|
|
7
|
+
import Button from "../../../Button";
|
|
8
|
+
import { HighlightedText } from "../../../HighlightedText";
|
|
9
|
+
import LoadingDots from "../../../LoadingDots";
|
|
10
|
+
import { Chip } from "../../../Chip";
|
|
11
|
+
import { Text } from "react-native";
|
|
12
|
+
import { ChipVariantEnum } from "../../../Chip/enums";
|
|
13
|
+
import { SealVariantEnum } from "../../../Seal/enums";
|
|
14
|
+
import { InformationStatusEnum } from "../../enums";
|
|
15
|
+
|
|
16
|
+
export function InformationStatus(props: InformationStatusProps) {
|
|
17
|
+
const {
|
|
18
|
+
status = InformationStatusEnum.DEFAULT,
|
|
19
|
+
disabled = false,
|
|
20
|
+
onPress,
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
23
|
+
const renderInformation = useMemo(() => {
|
|
24
|
+
const textStyle = merge("", disabled && "opacity-50");
|
|
25
|
+
|
|
26
|
+
if (status === InformationStatusEnum.DEFAULT) {
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<Button
|
|
30
|
+
variant="outline"
|
|
31
|
+
corners="medium"
|
|
32
|
+
disabled={disabled}
|
|
33
|
+
onPress={onPress}
|
|
34
|
+
size="small"
|
|
35
|
+
>
|
|
36
|
+
Reenviar código
|
|
37
|
+
</Button>
|
|
38
|
+
|
|
39
|
+
<HighlightedText
|
|
40
|
+
highlightText="Pronto,"
|
|
41
|
+
text="você já pode reenviar o código."
|
|
42
|
+
reverse
|
|
43
|
+
className={textStyle}
|
|
44
|
+
/>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (status === InformationStatusEnum.LOADING) {
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<LoadingDots variant="dark" />
|
|
53
|
+
<HighlightedText
|
|
54
|
+
highlightText="Validando código,"
|
|
55
|
+
text="por favor aguarde."
|
|
56
|
+
reverse
|
|
57
|
+
className={textStyle}
|
|
58
|
+
/>
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (status === InformationStatusEnum.SUCCESS) {
|
|
64
|
+
return (
|
|
65
|
+
<>
|
|
66
|
+
<Chip
|
|
67
|
+
variant={ChipVariantEnum.OUTLINE}
|
|
68
|
+
sealVariant={SealVariantEnum.SUCCESS}
|
|
69
|
+
label="Confirmado"
|
|
70
|
+
/>
|
|
71
|
+
<HighlightedText
|
|
72
|
+
highlightText="Código validado"
|
|
73
|
+
text="com sucesso."
|
|
74
|
+
reverse
|
|
75
|
+
className={textStyle}
|
|
76
|
+
/>
|
|
77
|
+
</>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (status === InformationStatusEnum.ERROR) {
|
|
82
|
+
return (
|
|
83
|
+
<>
|
|
84
|
+
<Button
|
|
85
|
+
variant="outline"
|
|
86
|
+
corners="medium"
|
|
87
|
+
disabled={disabled}
|
|
88
|
+
onPress={onPress}
|
|
89
|
+
size="small"
|
|
90
|
+
>
|
|
91
|
+
Reenviar código
|
|
92
|
+
</Button>
|
|
93
|
+
|
|
94
|
+
<Text className={disabled ? "opacity-50" : ""}>
|
|
95
|
+
O código não confere
|
|
96
|
+
</Text>
|
|
97
|
+
</>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}, [disabled, onPress, status]);
|
|
101
|
+
|
|
102
|
+
return <>{renderInformation}</>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export default InformationStatus;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./InformationStatus";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./information-status";
|