@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,88 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
+
import { Toggle } from './index';
|
|
3
|
+
import type { ToggleProps } from './types';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { VariantEnum } from './enums';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<ToggleProps> = {
|
|
8
|
+
title: 'Components/Toggle',
|
|
9
|
+
component: Toggle,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
checked: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'Whether the toggle is checked',
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Whether the toggle is disabled',
|
|
22
|
+
},
|
|
23
|
+
onChange: {
|
|
24
|
+
action: 'changed',
|
|
25
|
+
description: 'Callback fired when the toggle state changes',
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
control: 'select',
|
|
29
|
+
options: Object.values(VariantEnum),
|
|
30
|
+
description: 'The variant of the toggle',
|
|
31
|
+
table: {
|
|
32
|
+
type: { summary: Object.values(VariantEnum).join(" | ") },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<typeof meta>;
|
|
40
|
+
|
|
41
|
+
export const Default: Story = {
|
|
42
|
+
args: {
|
|
43
|
+
checked: false,
|
|
44
|
+
disabled: false,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const Checked: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
checked: true,
|
|
51
|
+
disabled: false,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Disabled: Story = {
|
|
56
|
+
args: {
|
|
57
|
+
checked: false,
|
|
58
|
+
disabled: true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const DisabledChecked: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
checked: true,
|
|
65
|
+
disabled: true,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const Interactive: Story = {
|
|
70
|
+
args: {
|
|
71
|
+
checked: false,
|
|
72
|
+
disabled: false,
|
|
73
|
+
},
|
|
74
|
+
render: (args) => {
|
|
75
|
+
const [checked, setChecked] = useState(args.checked);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Toggle
|
|
79
|
+
{...args}
|
|
80
|
+
checked={checked}
|
|
81
|
+
onChange={(newChecked) => {
|
|
82
|
+
setChecked(newChecked);
|
|
83
|
+
args.onChange?.(newChecked);
|
|
84
|
+
}}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ToggleProps } from "./types";
|
|
2
|
+
import { Pressable, View } from "react-native";
|
|
3
|
+
import { VariantEnum } from "./enums";
|
|
4
|
+
import { merge } from "@butterfly/tailwind-preset";
|
|
5
|
+
import { toggleVariants } from "./assets/class-variants";
|
|
6
|
+
|
|
7
|
+
export function Toggle(props: ToggleProps) {
|
|
8
|
+
const {
|
|
9
|
+
checked,
|
|
10
|
+
disabled = false,
|
|
11
|
+
variant = VariantEnum.JAVA,
|
|
12
|
+
onChange,
|
|
13
|
+
} = props;
|
|
14
|
+
|
|
15
|
+
const handleToggle = () => {
|
|
16
|
+
if (disabled) return;
|
|
17
|
+
|
|
18
|
+
if (onChange) {
|
|
19
|
+
onChange(!checked);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const mergeToggleClass = merge(
|
|
24
|
+
toggleVariants({ variant, checked, disabled }),
|
|
25
|
+
disabled && !checked ? "bg-chia-400" : ""
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Pressable
|
|
30
|
+
onPress={handleToggle}
|
|
31
|
+
className="w-[40px] h-[24px] bg-chia-400 rounded-500"
|
|
32
|
+
>
|
|
33
|
+
<View className={mergeToggleClass}>
|
|
34
|
+
<View
|
|
35
|
+
className={`absolute left-300 bottom-300 w-600 h-600 bg-chia-200 rounded-400 transition-all duration-300 ${
|
|
36
|
+
checked ? "translate-x-[16px]" : "translate-x-100"
|
|
37
|
+
}`}
|
|
38
|
+
></View>
|
|
39
|
+
</View>
|
|
40
|
+
</Pressable>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native";
|
|
2
|
+
import { Typography } from "./index";
|
|
3
|
+
import type { TypographyVariant } from "@butterfly/tailwind-preset";
|
|
4
|
+
import { ScrollView, View } from "react-native";
|
|
5
|
+
|
|
6
|
+
const allOptions: TypographyVariant[] = [
|
|
7
|
+
"text-display_large_700",
|
|
8
|
+
"text-display_large_500",
|
|
9
|
+
"text-display_large_300",
|
|
10
|
+
"text-display_medium_700",
|
|
11
|
+
"text-display_medium_500",
|
|
12
|
+
"text-display_medium_300",
|
|
13
|
+
"text-display_small_700",
|
|
14
|
+
"text-display_small_500",
|
|
15
|
+
"text-display_small_300",
|
|
16
|
+
"text-headline_large_700",
|
|
17
|
+
"text-headline_large_500",
|
|
18
|
+
"text-headline_large_300",
|
|
19
|
+
"text-headline_medium_700",
|
|
20
|
+
"text-headline_medium_500",
|
|
21
|
+
"text-headline_medium_300",
|
|
22
|
+
"text-headline_small_700",
|
|
23
|
+
"text-headline_small_500",
|
|
24
|
+
"text-headline_small_300",
|
|
25
|
+
"text-title_large_700",
|
|
26
|
+
"text-title_large_500",
|
|
27
|
+
"text-title_large_300",
|
|
28
|
+
"text-title_medium_700",
|
|
29
|
+
"text-title_medium_500",
|
|
30
|
+
"text-title_medium_300",
|
|
31
|
+
"text-title_small_700",
|
|
32
|
+
"text-title_small_500",
|
|
33
|
+
"text-title_small_300",
|
|
34
|
+
"text-body_large_700",
|
|
35
|
+
"text-body_large_500",
|
|
36
|
+
"text-body_large_300",
|
|
37
|
+
"text-body_medium_700",
|
|
38
|
+
"text-body_medium_500",
|
|
39
|
+
"text-body_medium_300",
|
|
40
|
+
"text-body_small_700",
|
|
41
|
+
"text-body_small_500",
|
|
42
|
+
"text-body_small_300",
|
|
43
|
+
"text-label_large_700",
|
|
44
|
+
"text-label_large_500",
|
|
45
|
+
"text-label_large_300",
|
|
46
|
+
"text-label_medium_700",
|
|
47
|
+
"text-label_medium_500",
|
|
48
|
+
"text-label_medium_300",
|
|
49
|
+
"text-label_small_700",
|
|
50
|
+
"text-label_small_500",
|
|
51
|
+
"text-label_small_300",
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const meta: Meta<typeof Typography> = {
|
|
55
|
+
title: "Components/Typography",
|
|
56
|
+
component: Typography,
|
|
57
|
+
parameters: {
|
|
58
|
+
docs: {
|
|
59
|
+
description: {
|
|
60
|
+
component:
|
|
61
|
+
"Universal typography component for React Native that provides access to all design system text styles with automatic font-family mapping.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
argTypes: {
|
|
66
|
+
variant: {
|
|
67
|
+
control: { type: "select" },
|
|
68
|
+
options: allOptions,
|
|
69
|
+
description: "Typography variant from the design system",
|
|
70
|
+
},
|
|
71
|
+
children: {
|
|
72
|
+
control: { type: "text" },
|
|
73
|
+
description: "Content to display",
|
|
74
|
+
},
|
|
75
|
+
className: {
|
|
76
|
+
control: { type: "text" },
|
|
77
|
+
description: "Additional NativeWind classes",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
args: {
|
|
81
|
+
variant: "text-body_medium_300",
|
|
82
|
+
children: "Sample text content",
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default meta;
|
|
87
|
+
type Story = StoryObj<typeof Typography>;
|
|
88
|
+
|
|
89
|
+
export const Default: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
variant: "text-body_medium_300",
|
|
92
|
+
children: "This is the default body text style",
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const Interactive: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
variant: "text-body_medium_300",
|
|
99
|
+
children: "Change the variant using the controls to see different styles",
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// Comprehensive showcase of all 45 typography variants
|
|
104
|
+
export const AllVariants: Story = {
|
|
105
|
+
render: () => {
|
|
106
|
+
const roles: Record<string, TypographyVariant[]> = {
|
|
107
|
+
display: [
|
|
108
|
+
"text-display_large_700",
|
|
109
|
+
"text-display_large_500",
|
|
110
|
+
"text-display_large_300",
|
|
111
|
+
"text-display_medium_700",
|
|
112
|
+
"text-display_medium_500",
|
|
113
|
+
"text-display_medium_300",
|
|
114
|
+
"text-display_small_700",
|
|
115
|
+
"text-display_small_500",
|
|
116
|
+
"text-display_small_300",
|
|
117
|
+
],
|
|
118
|
+
headline: [
|
|
119
|
+
"text-headline_large_700",
|
|
120
|
+
"text-headline_large_500",
|
|
121
|
+
"text-headline_large_300",
|
|
122
|
+
"text-headline_medium_700",
|
|
123
|
+
"text-headline_medium_500",
|
|
124
|
+
"text-headline_medium_300",
|
|
125
|
+
"text-headline_small_700",
|
|
126
|
+
"text-headline_small_500",
|
|
127
|
+
"text-headline_small_300",
|
|
128
|
+
],
|
|
129
|
+
title: [
|
|
130
|
+
"text-title_large_700",
|
|
131
|
+
"text-title_large_500",
|
|
132
|
+
"text-title_large_300",
|
|
133
|
+
"text-title_medium_700",
|
|
134
|
+
"text-title_medium_500",
|
|
135
|
+
"text-title_medium_300",
|
|
136
|
+
"text-title_small_700",
|
|
137
|
+
"text-title_small_500",
|
|
138
|
+
"text-title_small_300",
|
|
139
|
+
],
|
|
140
|
+
body: [
|
|
141
|
+
"text-body_large_700",
|
|
142
|
+
"text-body_large_500",
|
|
143
|
+
"text-body_large_300",
|
|
144
|
+
"text-body_medium_700",
|
|
145
|
+
"text-body_medium_500",
|
|
146
|
+
"text-body_medium_300",
|
|
147
|
+
"text-body_small_700",
|
|
148
|
+
"text-body_small_500",
|
|
149
|
+
"text-body_small_300",
|
|
150
|
+
],
|
|
151
|
+
label: [
|
|
152
|
+
"text-label_large_700",
|
|
153
|
+
"text-label_large_500",
|
|
154
|
+
"text-label_large_300",
|
|
155
|
+
"text-label_medium_700",
|
|
156
|
+
"text-label_medium_500",
|
|
157
|
+
"text-label_medium_300",
|
|
158
|
+
"text-label_small_700",
|
|
159
|
+
"text-label_small_500",
|
|
160
|
+
"text-label_small_300",
|
|
161
|
+
],
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
return (
|
|
165
|
+
<ScrollView>
|
|
166
|
+
<View style={{ padding: 4, gap: 24 }}>
|
|
167
|
+
{Object.entries(roles).map(([role, variants]) => (
|
|
168
|
+
<View key={role} style={{ gap: 12 }}>
|
|
169
|
+
<Typography
|
|
170
|
+
variant="text-title_medium_700"
|
|
171
|
+
style={{
|
|
172
|
+
textTransform: "capitalize",
|
|
173
|
+
borderBottomWidth: 1,
|
|
174
|
+
borderBottomColor: "#e5e5e5",
|
|
175
|
+
paddingBottom: 8,
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
{role}
|
|
179
|
+
</Typography>
|
|
180
|
+
<View style={{ gap: 8 }}>
|
|
181
|
+
{variants.map((variant, index) => {
|
|
182
|
+
const [, size, weight] = variant.split("_");
|
|
183
|
+
return (
|
|
184
|
+
<View key={index}>
|
|
185
|
+
<View
|
|
186
|
+
key={variant}
|
|
187
|
+
style={{
|
|
188
|
+
flexDirection: "column",
|
|
189
|
+
alignItems: "flex-start",
|
|
190
|
+
gap: 12,
|
|
191
|
+
padding: 12,
|
|
192
|
+
backgroundColor: "#f9f9f9",
|
|
193
|
+
borderRadius: 8,
|
|
194
|
+
}}
|
|
195
|
+
>
|
|
196
|
+
<Typography
|
|
197
|
+
variant="text-label_small_300"
|
|
198
|
+
style={{
|
|
199
|
+
fontFamily: "monospace",
|
|
200
|
+
backgroundColor: "#e5e5e5",
|
|
201
|
+
paddingHorizontal: 8,
|
|
202
|
+
paddingVertical: 4,
|
|
203
|
+
borderRadius: 4,
|
|
204
|
+
minWidth: 140,
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
{variant}
|
|
208
|
+
</Typography>
|
|
209
|
+
<Typography variant={variant as TypographyVariant}>
|
|
210
|
+
{size.charAt(0).toUpperCase() + size.slice(1)}{" "}
|
|
211
|
+
{weight === "300"
|
|
212
|
+
? "Regular"
|
|
213
|
+
: weight === "500"
|
|
214
|
+
? "Medium"
|
|
215
|
+
: "Bold"}
|
|
216
|
+
</Typography>
|
|
217
|
+
</View>
|
|
218
|
+
<View
|
|
219
|
+
style={{
|
|
220
|
+
height: 2,
|
|
221
|
+
backgroundColor: "#e5e5e5",
|
|
222
|
+
width: "100%",
|
|
223
|
+
}}
|
|
224
|
+
/>
|
|
225
|
+
</View>
|
|
226
|
+
);
|
|
227
|
+
})}
|
|
228
|
+
</View>
|
|
229
|
+
</View>
|
|
230
|
+
))}
|
|
231
|
+
</View>
|
|
232
|
+
</ScrollView>
|
|
233
|
+
);
|
|
234
|
+
},
|
|
235
|
+
parameters: {
|
|
236
|
+
docs: {
|
|
237
|
+
description: {
|
|
238
|
+
story:
|
|
239
|
+
"Complete showcase of all 45 typography variants organized by role (display, headline, title, body, label), size (small, medium, large), and weight (300, 500, 700).",
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
// Custom styling example
|
|
246
|
+
export const WithCustomStyling: Story = {
|
|
247
|
+
args: {
|
|
248
|
+
variant: "text-headline_medium_500",
|
|
249
|
+
className: "text-blue-600",
|
|
250
|
+
children: "Custom styled headline with color override",
|
|
251
|
+
},
|
|
252
|
+
parameters: {
|
|
253
|
+
docs: {
|
|
254
|
+
description: {
|
|
255
|
+
story:
|
|
256
|
+
"Shows how className prop can override or extend the base typography styles using NativeWind.",
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "react-native";
|
|
3
|
+
import type { TypographyProps } from "./types";
|
|
4
|
+
import { merge } from "@butterfly/tailwind-preset";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Universal Typography component for React Native.
|
|
8
|
+
*
|
|
9
|
+
* This component provides:
|
|
10
|
+
* - Type-safe access to all typography variants from your design tokens
|
|
11
|
+
* - Automatic font-family mapping based on font weight
|
|
12
|
+
* - NativeWind className support for additional styling
|
|
13
|
+
* - Consistent typography across your React Native app
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Display text with automatic font mapping
|
|
17
|
+
* <Typography variant="text-display_large_700">Hero Title</Typography>
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // Body text with medium weight
|
|
21
|
+
* <Typography variant="text-body_medium_500">Content text</Typography>
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // With additional styling
|
|
25
|
+
* <Typography variant="text-label_small_300" className="text-gray-600">
|
|
26
|
+
* Form label
|
|
27
|
+
* </Typography>
|
|
28
|
+
*/
|
|
29
|
+
export const Typography: React.FC<TypographyProps> = ({
|
|
30
|
+
variant,
|
|
31
|
+
className,
|
|
32
|
+
style,
|
|
33
|
+
children,
|
|
34
|
+
...props
|
|
35
|
+
}) => {
|
|
36
|
+
const textClassName = merge(`font-nunito`, variant, className);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Text className={textClassName} {...props}>
|
|
40
|
+
{children}
|
|
41
|
+
</Text>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
Typography.displayName = "Typography";
|
|
46
|
+
export default Typography;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TextProps as RNTextProps } from "react-native";
|
|
2
|
+
import type { TypographyVariant } from "@butterfly/tailwind-preset";
|
|
3
|
+
|
|
4
|
+
export interface TypographyProps extends Omit<RNTextProps, "children"> {
|
|
5
|
+
variant: TypographyVariant;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./Button";
|
|
2
|
+
export * from "./Chip";
|
|
3
|
+
export * from "./InformationStatus";
|
|
4
|
+
export * from "./InputCheckbox";
|
|
5
|
+
export * from "./InputOTP";
|
|
6
|
+
export * from "./HighlightedText";
|
|
7
|
+
export * from "./LoadingDots";
|
|
8
|
+
export * from "./Seal";
|
|
9
|
+
export * from "./Title";
|
|
10
|
+
export * from "./Toggle";
|
|
11
|
+
export * from "./Typography";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./use-fonts";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useFonts as useExpoFonts } from "expo-font";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A hook to load the custom fonts for the design system.
|
|
5
|
+
* This should be used in the root component of the application (e.g., App.tsx).
|
|
6
|
+
*
|
|
7
|
+
* @returns A boolean indicating if the fonts have been loaded, and an error object if one occurred.
|
|
8
|
+
*/
|
|
9
|
+
export const useBrandFonts = () => {
|
|
10
|
+
const [fontsLoaded, fontError] = useExpoFonts({
|
|
11
|
+
"Nunito-Bold": require("../../assets/fonts/Nunito-Bold.ttf"),
|
|
12
|
+
"Nunito-BoldItalic": require("../../assets/fonts/Nunito-BoldItalic.ttf"),
|
|
13
|
+
"Nunito-Italic": require("../../assets/fonts/Nunito-Italic.ttf"),
|
|
14
|
+
"Nunito-Medium": require("../../assets/fonts/Nunito-Medium.ttf"),
|
|
15
|
+
"Nunito-MediumItalic": require("../../assets/fonts/Nunito-MediumItalic.ttf"),
|
|
16
|
+
"Nunito-Regular": require("../../assets/fonts/Nunito-Regular.ttf"),
|
|
17
|
+
"Nunito-SemiBold": require("../../assets/fonts/Nunito-SemiBold.ttf"),
|
|
18
|
+
"Nunito-SemiBoldItalic": require("../../assets/fonts/Nunito-SemiBoldItalic.ttf"),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return { fontsLoaded, fontError };
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-native";
|
|
2
|
+
import { Icons } from ".";
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Iconography/Icons",
|
|
6
|
+
component: Icons,
|
|
7
|
+
argTypes: {
|
|
8
|
+
size: {
|
|
9
|
+
control: { type: "number" },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
size: 24,
|
|
14
|
+
},
|
|
15
|
+
} satisfies Meta<typeof Icons>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const AllIcons: Story = {
|
|
21
|
+
name: "Todos os Ícones",
|
|
22
|
+
args: {},
|
|
23
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as IconsNative from '@butterfly/icons/native';
|
|
2
|
+
import React, { useMemo, useState } from 'react';
|
|
3
|
+
import type { IconsProps, IconProps } from './types';
|
|
4
|
+
import { Alert, FlatList, Pressable, SafeAreaView, Text, TextInput, View } from 'react-native';
|
|
5
|
+
|
|
6
|
+
export function Icons(props: IconsProps) {
|
|
7
|
+
const { size = 24, color = 'currentColor' } = props;
|
|
8
|
+
|
|
9
|
+
const icons = Object.entries(IconsNative).map(([name, IconComponent]) => ({
|
|
10
|
+
name,
|
|
11
|
+
component: IconComponent as React.FC<IconProps>,
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
const [searchTerm, setSearchTerm] = useState('');
|
|
15
|
+
|
|
16
|
+
const iconsFiltered = useMemo(() => {
|
|
17
|
+
const sorted = [...icons].sort((a, b) => a.name.localeCompare(b.name));
|
|
18
|
+
return sorted.filter(icon =>
|
|
19
|
+
icon.name.toLowerCase().includes(searchTerm.toLowerCase())
|
|
20
|
+
);
|
|
21
|
+
}, [icons, searchTerm]);
|
|
22
|
+
|
|
23
|
+
function handleIconPress(name: string) {
|
|
24
|
+
const isCurrentColor = color === 'currentColor';
|
|
25
|
+
const component = `<${name} size={${size}} ${isCurrentColor ? '' : `color="${color}"`} />`;
|
|
26
|
+
|
|
27
|
+
Alert.alert(`Ícone selecionado: ${component}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<SafeAreaView
|
|
32
|
+
className='m-16'
|
|
33
|
+
>
|
|
34
|
+
<TextInput
|
|
35
|
+
placeholder="Pesquisar ícones..."
|
|
36
|
+
placeholderTextColor="#98A3A3"
|
|
37
|
+
style={{
|
|
38
|
+
width: '100%',
|
|
39
|
+
height: 40,
|
|
40
|
+
marginBottom: 16,
|
|
41
|
+
borderRadius: 8,
|
|
42
|
+
borderWidth: 1,
|
|
43
|
+
borderColor: '#98A3A3',
|
|
44
|
+
paddingHorizontal: 12,
|
|
45
|
+
fontSize: 16,
|
|
46
|
+
}}
|
|
47
|
+
onChangeText={setSearchTerm}
|
|
48
|
+
value={searchTerm}
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<FlatList
|
|
52
|
+
data={iconsFiltered}
|
|
53
|
+
keyExtractor={({ name }) => name}
|
|
54
|
+
numColumns={4}
|
|
55
|
+
columnWrapperStyle={{
|
|
56
|
+
justifyContent: "flex-start",
|
|
57
|
+
}}
|
|
58
|
+
contentContainerStyle={{
|
|
59
|
+
paddingBottom: 32,
|
|
60
|
+
}}
|
|
61
|
+
renderItem={({ item: { name, component: IconComponent } }) => (
|
|
62
|
+
<View style={{ flex: 1, alignItems: "center", marginVertical: 8 }}>
|
|
63
|
+
<Pressable
|
|
64
|
+
style={{
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
padding: 8,
|
|
68
|
+
}}
|
|
69
|
+
onPress={() => handleIconPress(name)}
|
|
70
|
+
>
|
|
71
|
+
<IconComponent size={size} color={color} />
|
|
72
|
+
<Text
|
|
73
|
+
style={{
|
|
74
|
+
marginTop: 8,
|
|
75
|
+
fontSize: 12,
|
|
76
|
+
textAlign: "center",
|
|
77
|
+
maxWidth: 100,
|
|
78
|
+
}}
|
|
79
|
+
numberOfLines={1}
|
|
80
|
+
>
|
|
81
|
+
{name}
|
|
82
|
+
</Text>
|
|
83
|
+
</Pressable>
|
|
84
|
+
</View>
|
|
85
|
+
)}
|
|
86
|
+
/>
|
|
87
|
+
</SafeAreaView>
|
|
88
|
+
);
|
|
89
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
package/src/welcome.mdx
ADDED