@rnative/ui 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/components/accordion/Accordion.d.ts +31 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.js +121 -0
- package/dist/components/accordion/Accordion.js.map +1 -0
- package/dist/components/accordion/Accordion.styles.d.ts +8 -0
- package/dist/components/accordion/Accordion.styles.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.styles.js +48 -0
- package/dist/components/accordion/Accordion.styles.js.map +1 -0
- package/dist/components/accordion/Accordion.types.d.ts +45 -0
- package/dist/components/accordion/Accordion.types.d.ts.map +1 -0
- package/dist/components/accordion/Accordion.types.js +9 -0
- package/dist/components/accordion/Accordion.types.js.map +1 -0
- package/dist/components/accordion/index.d.ts +6 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +12 -0
- package/dist/components/accordion/index.js.map +1 -0
- package/dist/components/alert/Alert.d.ts +16 -0
- package/dist/components/alert/Alert.d.ts.map +1 -0
- package/dist/components/alert/Alert.js +28 -0
- package/dist/components/alert/Alert.js.map +1 -0
- package/dist/components/alert/Alert.styles.d.ts +8 -0
- package/dist/components/alert/Alert.styles.d.ts.map +1 -0
- package/dist/components/alert/Alert.styles.js +36 -0
- package/dist/components/alert/Alert.styles.js.map +1 -0
- package/dist/components/alert/Alert.types.d.ts +22 -0
- package/dist/components/alert/Alert.types.d.ts.map +1 -0
- package/dist/components/alert/Alert.types.js +9 -0
- package/dist/components/alert/Alert.types.js.map +1 -0
- package/dist/components/alert/Alert.variants.d.ts +19 -0
- package/dist/components/alert/Alert.variants.d.ts.map +1 -0
- package/dist/components/alert/Alert.variants.js +51 -0
- package/dist/components/alert/Alert.variants.js.map +1 -0
- package/dist/components/alert/index.d.ts +6 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +9 -0
- package/dist/components/alert/index.js.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +13 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +31 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/avatar/Avatar.styles.d.ts +8 -0
- package/dist/components/avatar/Avatar.styles.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.styles.js +22 -0
- package/dist/components/avatar/Avatar.styles.js.map +1 -0
- package/dist/components/avatar/Avatar.types.d.ts +21 -0
- package/dist/components/avatar/Avatar.types.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.types.js +9 -0
- package/dist/components/avatar/Avatar.types.js.map +1 -0
- package/dist/components/avatar/Avatar.variants.d.ts +23 -0
- package/dist/components/avatar/Avatar.variants.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.variants.js +48 -0
- package/dist/components/avatar/Avatar.variants.js.map +1 -0
- package/dist/components/avatar/index.d.ts +6 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +9 -0
- package/dist/components/avatar/index.js.map +1 -0
- package/dist/components/badge/Badge.d.ts +12 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/Badge.js +25 -0
- package/dist/components/badge/Badge.js.map +1 -0
- package/dist/components/badge/Badge.styles.d.ts +8 -0
- package/dist/components/badge/Badge.styles.d.ts.map +1 -0
- package/dist/components/badge/Badge.styles.js +32 -0
- package/dist/components/badge/Badge.styles.js.map +1 -0
- package/dist/components/badge/Badge.types.d.ts +16 -0
- package/dist/components/badge/Badge.types.d.ts.map +1 -0
- package/dist/components/badge/Badge.types.js +8 -0
- package/dist/components/badge/Badge.types.js.map +1 -0
- package/dist/components/badge/Badge.variants.d.ts +23 -0
- package/dist/components/badge/Badge.variants.d.ts.map +1 -0
- package/dist/components/badge/Badge.variants.js +48 -0
- package/dist/components/badge/Badge.variants.js.map +1 -0
- package/dist/components/badge/index.d.ts +6 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +9 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/button/Button.d.ts +16 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +61 -0
- package/dist/components/button/Button.js.map +1 -0
- package/dist/components/button/Button.styles.d.ts +8 -0
- package/dist/components/button/Button.styles.d.ts.map +1 -0
- package/dist/components/button/Button.styles.js +18 -0
- package/dist/components/button/Button.styles.js.map +1 -0
- package/dist/components/button/Button.types.d.ts +23 -0
- package/dist/components/button/Button.types.d.ts.map +1 -0
- package/dist/components/button/Button.types.js +6 -0
- package/dist/components/button/Button.types.js.map +1 -0
- package/dist/components/button/Button.variants.d.ts +11 -0
- package/dist/components/button/Button.variants.d.ts.map +1 -0
- package/dist/components/button/Button.variants.js +65 -0
- package/dist/components/button/Button.variants.js.map +1 -0
- package/dist/components/button/index.d.ts +6 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +9 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/Card.d.ts +36 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/Card.js +53 -0
- package/dist/components/card/Card.js.map +1 -0
- package/dist/components/card/Card.styles.d.ts +8 -0
- package/dist/components/card/Card.styles.d.ts.map +1 -0
- package/dist/components/card/Card.styles.js +30 -0
- package/dist/components/card/Card.styles.js.map +1 -0
- package/dist/components/card/Card.types.d.ts +22 -0
- package/dist/components/card/Card.types.d.ts.map +1 -0
- package/dist/components/card/Card.types.js +9 -0
- package/dist/components/card/Card.types.js.map +1 -0
- package/dist/components/card/Card.variants.d.ts +14 -0
- package/dist/components/card/Card.variants.d.ts.map +1 -0
- package/dist/components/card/Card.variants.js +32 -0
- package/dist/components/card/Card.variants.js.map +1 -0
- package/dist/components/card/index.d.ts +6 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +14 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/CheckBox.d.ts +14 -0
- package/dist/components/checkbox/CheckBox.d.ts.map +1 -0
- package/dist/components/checkbox/CheckBox.js +40 -0
- package/dist/components/checkbox/CheckBox.js.map +1 -0
- package/dist/components/checkbox/CheckBox.styles.d.ts +8 -0
- package/dist/components/checkbox/CheckBox.styles.d.ts.map +1 -0
- package/dist/components/checkbox/CheckBox.styles.js +32 -0
- package/dist/components/checkbox/CheckBox.styles.js.map +1 -0
- package/dist/components/checkbox/CheckBox.types.d.ts +24 -0
- package/dist/components/checkbox/CheckBox.types.d.ts.map +1 -0
- package/dist/components/checkbox/CheckBox.types.js +9 -0
- package/dist/components/checkbox/CheckBox.types.js.map +1 -0
- package/dist/components/checkbox/CheckBox.variants.d.ts +14 -0
- package/dist/components/checkbox/CheckBox.variants.d.ts.map +1 -0
- package/dist/components/checkbox/CheckBox.variants.js +19 -0
- package/dist/components/checkbox/CheckBox.variants.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +6 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +9 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/combobox/ComboBox.d.ts +16 -0
- package/dist/components/combobox/ComboBox.d.ts.map +1 -0
- package/dist/components/combobox/ComboBox.js +79 -0
- package/dist/components/combobox/ComboBox.js.map +1 -0
- package/dist/components/combobox/ComboBox.styles.d.ts +8 -0
- package/dist/components/combobox/ComboBox.styles.d.ts.map +1 -0
- package/dist/components/combobox/ComboBox.styles.js +57 -0
- package/dist/components/combobox/ComboBox.styles.js.map +1 -0
- package/dist/components/combobox/ComboBox.types.d.ts +46 -0
- package/dist/components/combobox/ComboBox.types.d.ts.map +1 -0
- package/dist/components/combobox/ComboBox.types.js +9 -0
- package/dist/components/combobox/ComboBox.types.js.map +1 -0
- package/dist/components/combobox/ComboBox.variants.d.ts +22 -0
- package/dist/components/combobox/ComboBox.variants.d.ts.map +1 -0
- package/dist/components/combobox/ComboBox.variants.js +68 -0
- package/dist/components/combobox/ComboBox.variants.js.map +1 -0
- package/dist/components/combobox/index.d.ts +6 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +9 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/dialog/Dialog.d.ts +36 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.js +84 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/Dialog.styles.d.ts +8 -0
- package/dist/components/dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.styles.js +52 -0
- package/dist/components/dialog/Dialog.styles.js.map +1 -0
- package/dist/components/dialog/Dialog.types.d.ts +48 -0
- package/dist/components/dialog/Dialog.types.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.types.js +10 -0
- package/dist/components/dialog/Dialog.types.js.map +1 -0
- package/dist/components/dialog/Dialog.variants.d.ts +13 -0
- package/dist/components/dialog/Dialog.variants.d.ts.map +1 -0
- package/dist/components/dialog/Dialog.variants.js +19 -0
- package/dist/components/dialog/Dialog.variants.js.map +1 -0
- package/dist/components/dialog/index.d.ts +6 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +14 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/fab/FAB.d.ts +14 -0
- package/dist/components/fab/FAB.d.ts.map +1 -0
- package/dist/components/fab/FAB.js +46 -0
- package/dist/components/fab/FAB.js.map +1 -0
- package/dist/components/fab/FAB.styles.d.ts +8 -0
- package/dist/components/fab/FAB.styles.d.ts.map +1 -0
- package/dist/components/fab/FAB.styles.js +51 -0
- package/dist/components/fab/FAB.styles.js.map +1 -0
- package/dist/components/fab/FAB.types.d.ts +23 -0
- package/dist/components/fab/FAB.types.d.ts.map +1 -0
- package/dist/components/fab/FAB.types.js +8 -0
- package/dist/components/fab/FAB.types.js.map +1 -0
- package/dist/components/fab/FAB.variants.d.ts +48 -0
- package/dist/components/fab/FAB.variants.d.ts.map +1 -0
- package/dist/components/fab/FAB.variants.js +43 -0
- package/dist/components/fab/FAB.variants.js.map +1 -0
- package/dist/components/fab/index.d.ts +6 -0
- package/dist/components/fab/index.d.ts.map +1 -0
- package/dist/components/fab/index.js +9 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +46 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/input/Input.d.ts +17 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/Input.js +59 -0
- package/dist/components/input/Input.js.map +1 -0
- package/dist/components/input/Input.styles.d.ts +8 -0
- package/dist/components/input/Input.styles.d.ts.map +1 -0
- package/dist/components/input/Input.styles.js +25 -0
- package/dist/components/input/Input.styles.js.map +1 -0
- package/dist/components/input/Input.types.d.ts +25 -0
- package/dist/components/input/Input.types.d.ts.map +1 -0
- package/dist/components/input/Input.types.js +9 -0
- package/dist/components/input/Input.types.js.map +1 -0
- package/dist/components/input/Input.variants.d.ts +23 -0
- package/dist/components/input/Input.variants.d.ts.map +1 -0
- package/dist/components/input/Input.variants.js +61 -0
- package/dist/components/input/Input.variants.js.map +1 -0
- package/dist/components/input/index.d.ts +6 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +9 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/separator/Separator.d.ts +17 -0
- package/dist/components/separator/Separator.d.ts.map +1 -0
- package/dist/components/separator/Separator.js +46 -0
- package/dist/components/separator/Separator.js.map +1 -0
- package/dist/components/separator/Separator.styles.d.ts +8 -0
- package/dist/components/separator/Separator.styles.d.ts.map +1 -0
- package/dist/components/separator/Separator.styles.js +25 -0
- package/dist/components/separator/Separator.styles.js.map +1 -0
- package/dist/components/separator/Separator.types.d.ts +25 -0
- package/dist/components/separator/Separator.types.d.ts.map +1 -0
- package/dist/components/separator/Separator.types.js +8 -0
- package/dist/components/separator/Separator.types.js.map +1 -0
- package/dist/components/separator/index.d.ts +6 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/index.js +9 -0
- package/dist/components/separator/index.js.map +1 -0
- package/dist/components/text/Text.d.ts +18 -0
- package/dist/components/text/Text.d.ts.map +1 -0
- package/dist/components/text/Text.js +45 -0
- package/dist/components/text/Text.js.map +1 -0
- package/dist/components/text/Text.types.d.ts +14 -0
- package/dist/components/text/Text.types.d.ts.map +1 -0
- package/dist/components/text/Text.types.js +10 -0
- package/dist/components/text/Text.types.js.map +1 -0
- package/dist/components/text/Text.variants.d.ts +23 -0
- package/dist/components/text/Text.variants.d.ts.map +1 -0
- package/dist/components/text/Text.variants.js +32 -0
- package/dist/components/text/Text.variants.js.map +1 -0
- package/dist/components/text/index.d.ts +6 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +9 -0
- package/dist/components/text/index.js.map +1 -0
- package/dist/design-tokens/animation.d.ts +22 -0
- package/dist/design-tokens/animation.d.ts.map +1 -0
- package/dist/design-tokens/animation.js +23 -0
- package/dist/design-tokens/animation.js.map +1 -0
- package/dist/design-tokens/border-radius.d.ts +15 -0
- package/dist/design-tokens/border-radius.d.ts.map +1 -0
- package/dist/design-tokens/border-radius.js +17 -0
- package/dist/design-tokens/border-radius.js.map +1 -0
- package/dist/design-tokens/colors.d.ts +179 -0
- package/dist/design-tokens/colors.d.ts.map +1 -0
- package/dist/design-tokens/colors.js +109 -0
- package/dist/design-tokens/colors.js.map +1 -0
- package/dist/design-tokens/index.d.ts +16 -0
- package/dist/design-tokens/index.d.ts.map +1 -0
- package/dist/design-tokens/index.js +32 -0
- package/dist/design-tokens/index.js.map +1 -0
- package/dist/design-tokens/shadows.d.ts +103 -0
- package/dist/design-tokens/shadows.d.ts.map +1 -0
- package/dist/design-tokens/shadows.js +75 -0
- package/dist/design-tokens/shadows.js.map +1 -0
- package/dist/design-tokens/spacing.d.ts +30 -0
- package/dist/design-tokens/spacing.d.ts.map +1 -0
- package/dist/design-tokens/spacing.js +32 -0
- package/dist/design-tokens/spacing.js.map +1 -0
- package/dist/design-tokens/typography.d.ts +40 -0
- package/dist/design-tokens/typography.d.ts.map +1 -0
- package/dist/design-tokens/typography.js +40 -0
- package/dist/design-tokens/typography.js.map +1 -0
- package/dist/primitives/Box.d.ts +38 -0
- package/dist/primitives/Box.d.ts.map +1 -0
- package/dist/primitives/Box.js +70 -0
- package/dist/primitives/Box.js.map +1 -0
- package/dist/primitives/Pressable.d.ts +30 -0
- package/dist/primitives/Pressable.d.ts.map +1 -0
- package/dist/primitives/Pressable.js +48 -0
- package/dist/primitives/Pressable.js.map +1 -0
- package/dist/primitives/Text.d.ts +23 -0
- package/dist/primitives/Text.d.ts.map +1 -0
- package/dist/primitives/Text.js +42 -0
- package/dist/primitives/Text.js.map +1 -0
- package/dist/primitives/index.d.ts +14 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +16 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/theme/ThemeContext.d.ts +10 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -0
- package/dist/theme/ThemeContext.js +19 -0
- package/dist/theme/ThemeContext.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +23 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +87 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +9 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/themes.d.ts +20 -0
- package/dist/theme/themes.d.ts.map +1 -0
- package/dist/theme/themes.js +65 -0
- package/dist/theme/themes.js.map +1 -0
- package/dist/theme/types.d.ts +92 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/theme/types.js +9 -0
- package/dist/theme/types.js.map +1 -0
- package/dist/theme/useTheme.d.ts +7 -0
- package/dist/theme/useTheme.d.ts.map +1 -0
- package/dist/theme/useTheme.js +9 -0
- package/dist/theme/useTheme.js.map +1 -0
- package/dist/utils/cn.d.ts +16 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +33 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/createVariants.d.ts +32 -0
- package/dist/utils/createVariants.d.ts.map +1 -0
- package/dist/utils/createVariants.js +26 -0
- package/dist/utils/createVariants.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/mergeProps.d.ts +10 -0
- package/dist/utils/mergeProps.d.ts.map +1 -0
- package/dist/utils/mergeProps.js +31 -0
- package/dist/utils/mergeProps.js.map +1 -0
- package/package.json +46 -3
- package/src/components/accordion/Accordion.styles.ts +46 -0
- package/src/components/accordion/Accordion.tsx +247 -0
- package/src/components/accordion/Accordion.types.ts +52 -0
- package/src/components/accordion/index.ts +17 -0
- package/src/components/alert/Alert.styles.ts +34 -0
- package/src/components/alert/Alert.tsx +87 -0
- package/src/components/alert/Alert.types.ts +24 -0
- package/src/components/alert/Alert.variants.ts +57 -0
- package/src/components/alert/index.ts +6 -0
- package/src/components/avatar/Avatar.styles.ts +20 -0
- package/src/components/avatar/Avatar.tsx +74 -0
- package/src/components/avatar/Avatar.types.ts +24 -0
- package/src/components/avatar/Avatar.variants.ts +55 -0
- package/src/components/avatar/index.ts +6 -0
- package/src/components/badge/Badge.styles.ts +30 -0
- package/src/components/badge/Badge.tsx +47 -0
- package/src/components/badge/Badge.types.ts +24 -0
- package/src/components/badge/Badge.variants.ts +62 -0
- package/src/components/badge/index.ts +6 -0
- package/src/components/button/Button.styles.ts +16 -0
- package/src/components/button/Button.tsx +108 -0
- package/src/components/button/Button.types.ts +30 -0
- package/src/components/button/Button.variants.ts +68 -0
- package/src/components/button/index.ts +6 -0
- package/src/components/card/Card.styles.ts +28 -0
- package/src/components/card/Card.tsx +112 -0
- package/src/components/card/Card.types.ts +26 -0
- package/src/components/card/Card.variants.ts +38 -0
- package/src/components/card/index.ts +18 -0
- package/src/components/checkbox/CheckBox.styles.ts +30 -0
- package/src/components/checkbox/CheckBox.tsx +98 -0
- package/src/components/checkbox/CheckBox.types.ts +26 -0
- package/src/components/checkbox/CheckBox.variants.ts +25 -0
- package/src/components/checkbox/index.ts +6 -0
- package/src/components/combobox/ComboBox.styles.ts +55 -0
- package/src/components/combobox/ComboBox.tsx +224 -0
- package/src/components/combobox/ComboBox.types.ts +51 -0
- package/src/components/combobox/ComboBox.variants.ts +82 -0
- package/src/components/combobox/index.ts +6 -0
- package/src/components/dialog/Dialog.styles.ts +50 -0
- package/src/components/dialog/Dialog.tsx +221 -0
- package/src/components/dialog/Dialog.types.ts +55 -0
- package/src/components/dialog/Dialog.variants.ts +24 -0
- package/src/components/dialog/index.ts +20 -0
- package/src/components/fab/FAB.styles.ts +49 -0
- package/src/components/fab/FAB.tsx +84 -0
- package/src/components/fab/FAB.types.ts +31 -0
- package/src/components/fab/FAB.variants.ts +55 -0
- package/src/components/fab/index.ts +6 -0
- package/src/components/index.ts +88 -0
- package/src/components/input/Input.styles.ts +23 -0
- package/src/components/input/Input.tsx +139 -0
- package/src/components/input/Input.types.ts +28 -0
- package/src/components/input/Input.variants.ts +71 -0
- package/src/components/input/index.ts +6 -0
- package/src/components/separator/Separator.styles.ts +23 -0
- package/src/components/separator/Separator.tsx +70 -0
- package/src/components/separator/Separator.types.ts +28 -0
- package/src/components/separator/index.ts +10 -0
- package/src/components/text/Text.tsx +75 -0
- package/src/components/text/Text.types.ts +27 -0
- package/src/components/text/Text.variants.ts +44 -0
- package/src/components/text/index.ts +6 -0
- package/src/design-tokens/animation.ts +23 -0
- package/src/design-tokens/border-radius.ts +16 -0
- package/src/design-tokens/colors.ts +120 -0
- package/src/design-tokens/index.ts +21 -0
- package/src/design-tokens/shadows.ts +78 -0
- package/src/design-tokens/spacing.ts +31 -0
- package/src/design-tokens/typography.ts +45 -0
- package/src/primitives/Box.tsx +121 -0
- package/src/primitives/Pressable.tsx +106 -0
- package/src/primitives/Text.tsx +84 -0
- package/src/primitives/index.ts +15 -0
- package/src/theme/ThemeContext.ts +20 -0
- package/src/theme/ThemeProvider.tsx +152 -0
- package/src/theme/index.ts +9 -0
- package/src/theme/themes.ts +71 -0
- package/src/theme/types.ts +89 -0
- package/src/theme/useTheme.ts +7 -0
- package/src/utils/cn.ts +37 -0
- package/src/utils/createVariants.ts +47 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/mergeProps.ts +35 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Dialog
|
|
3
|
+
*
|
|
4
|
+
* A modal dialog with composable sub-components. Controlled via `open` /
|
|
5
|
+
* `onOpenChange`. Supports backdrop dismiss and Android hardware back.
|
|
6
|
+
*
|
|
7
|
+
* The content exposes `accessibilityViewIsModal` so screen readers trap
|
|
8
|
+
* focus within the dialog. The overlay is a semi-transparent backdrop that
|
|
9
|
+
* captures taps to dismiss when `dismissible` is true.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { createContext, useContext, useEffect } from 'react';
|
|
13
|
+
import {
|
|
14
|
+
View,
|
|
15
|
+
Modal,
|
|
16
|
+
Pressable,
|
|
17
|
+
BackHandler,
|
|
18
|
+
StyleSheet,
|
|
19
|
+
} from 'react-native';
|
|
20
|
+
import { useTheme } from '../../theme';
|
|
21
|
+
import { cn } from '../../utils/cn';
|
|
22
|
+
import { TextPrimitive } from '../../primitives/Text';
|
|
23
|
+
import { getDialogVariants } from './Dialog.variants';
|
|
24
|
+
import { dialogStyles } from './Dialog.styles';
|
|
25
|
+
import type {
|
|
26
|
+
DialogProps,
|
|
27
|
+
DialogContentProps,
|
|
28
|
+
DialogTitleProps,
|
|
29
|
+
DialogDescriptionProps,
|
|
30
|
+
DialogFooterProps,
|
|
31
|
+
DialogCloseProps,
|
|
32
|
+
} from './Dialog.types';
|
|
33
|
+
|
|
34
|
+
interface DialogContextValue {
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const DialogContext = createContext<DialogContextValue | null>(null);
|
|
39
|
+
|
|
40
|
+
function useDialogContext(): DialogContextValue {
|
|
41
|
+
const ctx = useContext(DialogContext);
|
|
42
|
+
if (ctx === null) {
|
|
43
|
+
throw new Error('Dialog sub-components must be used within a <Dialog>');
|
|
44
|
+
}
|
|
45
|
+
return ctx;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function Dialog({
|
|
49
|
+
open,
|
|
50
|
+
onOpenChange,
|
|
51
|
+
dismissible = true,
|
|
52
|
+
animationType = 'fade',
|
|
53
|
+
overlayColor,
|
|
54
|
+
overlayOpacity = 0.5,
|
|
55
|
+
style,
|
|
56
|
+
children,
|
|
57
|
+
...rest
|
|
58
|
+
}: DialogProps) {
|
|
59
|
+
const { theme } = useTheme();
|
|
60
|
+
const { content: contentVariant, overlay: overlayVariant } = getDialogVariants(theme);
|
|
61
|
+
|
|
62
|
+
// Android hardware back dismiss
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!open || !dismissible) return;
|
|
65
|
+
const sub = BackHandler.addEventListener('hardwareBackPress', () => {
|
|
66
|
+
onOpenChange(false);
|
|
67
|
+
return true;
|
|
68
|
+
});
|
|
69
|
+
return () => sub.remove();
|
|
70
|
+
}, [open, dismissible, onOpenChange]);
|
|
71
|
+
|
|
72
|
+
if (!open) return null;
|
|
73
|
+
|
|
74
|
+
const backdropColor = overlayColor ?? `rgba(0, 0, 0, ${overlayOpacity})`;
|
|
75
|
+
|
|
76
|
+
const context = {
|
|
77
|
+
onClose: () => onOpenChange(false),
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<DialogContext.Provider value={context}>
|
|
82
|
+
<Modal
|
|
83
|
+
visible={open}
|
|
84
|
+
animationType={animationType}
|
|
85
|
+
transparent
|
|
86
|
+
onRequestClose={dismissible ? () => onOpenChange(false) : undefined}
|
|
87
|
+
supportedOrientations={[
|
|
88
|
+
'portrait',
|
|
89
|
+
'landscape-left',
|
|
90
|
+
'landscape-right',
|
|
91
|
+
'portrait-upside-down',
|
|
92
|
+
]}
|
|
93
|
+
>
|
|
94
|
+
<View
|
|
95
|
+
accessibilityElementsHidden={!open}
|
|
96
|
+
importantForAccessibility={open ? 'auto' : 'no-hide-descendants'}
|
|
97
|
+
style={cn(dialogStyles.overlay, overlayVariant, { backgroundColor: backdropColor })}
|
|
98
|
+
>
|
|
99
|
+
<Pressable
|
|
100
|
+
onPress={dismissible ? () => onOpenChange(false) : undefined}
|
|
101
|
+
style={StyleSheet.absoluteFill}
|
|
102
|
+
accessibilityElementsHidden
|
|
103
|
+
importantForAccessibility="no-hide-descendants"
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<View
|
|
107
|
+
accessibilityViewIsModal
|
|
108
|
+
{...rest}
|
|
109
|
+
style={cn(dialogStyles.content, contentVariant, style)}
|
|
110
|
+
>
|
|
111
|
+
{children}
|
|
112
|
+
</View>
|
|
113
|
+
</View>
|
|
114
|
+
</Modal>
|
|
115
|
+
</DialogContext.Provider>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
Dialog.displayName = 'Dialog';
|
|
120
|
+
|
|
121
|
+
export function DialogContent({
|
|
122
|
+
style,
|
|
123
|
+
children,
|
|
124
|
+
...rest
|
|
125
|
+
}: DialogContentProps) {
|
|
126
|
+
return (
|
|
127
|
+
<View {...rest} style={style}>
|
|
128
|
+
{children}
|
|
129
|
+
</View>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
DialogContent.displayName = 'DialogContent';
|
|
134
|
+
|
|
135
|
+
export function DialogTitle({
|
|
136
|
+
style,
|
|
137
|
+
children,
|
|
138
|
+
...rest
|
|
139
|
+
}: DialogTitleProps) {
|
|
140
|
+
return (
|
|
141
|
+
<TextPrimitive
|
|
142
|
+
color="foreground"
|
|
143
|
+
fontSize="lg"
|
|
144
|
+
fontWeight="semibold"
|
|
145
|
+
accessibilityRole="header"
|
|
146
|
+
{...rest}
|
|
147
|
+
style={style}
|
|
148
|
+
>
|
|
149
|
+
{children}
|
|
150
|
+
</TextPrimitive>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
DialogTitle.displayName = 'DialogTitle';
|
|
155
|
+
|
|
156
|
+
export function DialogDescription({
|
|
157
|
+
style,
|
|
158
|
+
children,
|
|
159
|
+
...rest
|
|
160
|
+
}: DialogDescriptionProps) {
|
|
161
|
+
return (
|
|
162
|
+
<TextPrimitive
|
|
163
|
+
color="mutedForeground"
|
|
164
|
+
fontSize="sm"
|
|
165
|
+
{...rest}
|
|
166
|
+
style={style}
|
|
167
|
+
>
|
|
168
|
+
{children}
|
|
169
|
+
</TextPrimitive>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
DialogDescription.displayName = 'DialogDescription';
|
|
174
|
+
|
|
175
|
+
export function DialogFooter({
|
|
176
|
+
style,
|
|
177
|
+
children,
|
|
178
|
+
...rest
|
|
179
|
+
}: DialogFooterProps) {
|
|
180
|
+
return (
|
|
181
|
+
<View {...rest} style={cn(dialogStyles.footer, style)}>
|
|
182
|
+
{children}
|
|
183
|
+
</View>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
DialogFooter.displayName = 'DialogFooter';
|
|
188
|
+
|
|
189
|
+
export function DialogClose({
|
|
190
|
+
label = 'Close',
|
|
191
|
+
style,
|
|
192
|
+
...rest
|
|
193
|
+
}: DialogCloseProps) {
|
|
194
|
+
const { theme } = useTheme();
|
|
195
|
+
const { onClose } = useDialogContext();
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<Pressable
|
|
199
|
+
{...rest}
|
|
200
|
+
onPress={onClose}
|
|
201
|
+
accessibilityRole="button"
|
|
202
|
+
accessibilityLabel={label}
|
|
203
|
+
hitSlop={8}
|
|
204
|
+
style={cn(
|
|
205
|
+
dialogStyles.closeButton,
|
|
206
|
+
{ backgroundColor: theme.colors.muted },
|
|
207
|
+
style,
|
|
208
|
+
)}
|
|
209
|
+
>
|
|
210
|
+
<TextPrimitive
|
|
211
|
+
color="mutedForeground"
|
|
212
|
+
fontSize="sm"
|
|
213
|
+
fontWeight="bold"
|
|
214
|
+
>
|
|
215
|
+
{'\u00D7'}
|
|
216
|
+
</TextPrimitive>
|
|
217
|
+
</Pressable>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
DialogClose.displayName = 'DialogClose';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Dialog Types
|
|
3
|
+
*
|
|
4
|
+
* A modal dialog with composable sub-components (Title, Description, Footer,
|
|
5
|
+
* Close). Controlled via `open` / `onOpenChange`. Supports backdrop dismiss
|
|
6
|
+
* and Android hardware back.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
|
|
12
|
+
export type DialogAnimation = 'fade' | 'slide' | 'none';
|
|
13
|
+
|
|
14
|
+
export interface DialogProps extends Omit<ViewProps, 'style' | 'onChange'> {
|
|
15
|
+
/** Controlled open state. */
|
|
16
|
+
open: boolean;
|
|
17
|
+
/** Called when the dialog should close. */
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
/** Allows closing via backdrop press or Android back. Defaults to `true`. */
|
|
20
|
+
dismissible?: boolean;
|
|
21
|
+
/** Animation type. Defaults to `fade`. */
|
|
22
|
+
animationType?: DialogAnimation;
|
|
23
|
+
/** Optional overlay color for the backdrop. */
|
|
24
|
+
overlayColor?: string;
|
|
25
|
+
/** Optional overlay opacity (0-1). Defaults to 0.5. */
|
|
26
|
+
overlayOpacity?: number;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DialogContentProps extends Omit<ViewProps, 'style'> {
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DialogTitleProps extends Omit<ViewProps, 'style'> {
|
|
37
|
+
style?: StyleProp<ViewStyle>;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface DialogDescriptionProps extends Omit<ViewProps, 'style'> {
|
|
42
|
+
style?: StyleProp<ViewStyle>;
|
|
43
|
+
children?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface DialogFooterProps extends Omit<ViewProps, 'style'> {
|
|
47
|
+
style?: StyleProp<ViewStyle>;
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface DialogCloseProps extends Omit<ViewProps, 'style'> {
|
|
52
|
+
/** Accessible label for the close button. Defaults to "Close". */
|
|
53
|
+
label?: string;
|
|
54
|
+
style?: StyleProp<ViewStyle>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Dialog Variants
|
|
3
|
+
*
|
|
4
|
+
* Content surface style resolved against the active theme at render time.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { ViewStyle } from 'react-native';
|
|
8
|
+
import type { Theme } from '../../theme/types';
|
|
9
|
+
|
|
10
|
+
export interface DialogVariantConfig {
|
|
11
|
+
content: ViewStyle;
|
|
12
|
+
overlay: ViewStyle;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getDialogVariants(theme: Theme): DialogVariantConfig {
|
|
16
|
+
return {
|
|
17
|
+
content: {
|
|
18
|
+
backgroundColor: theme.colors.card,
|
|
19
|
+
},
|
|
20
|
+
overlay: {
|
|
21
|
+
backgroundColor: theme.colors.background,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Dialog Barrel Export
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
Dialog,
|
|
7
|
+
DialogContent,
|
|
8
|
+
DialogTitle,
|
|
9
|
+
DialogDescription,
|
|
10
|
+
DialogFooter,
|
|
11
|
+
DialogClose,
|
|
12
|
+
} from './Dialog';
|
|
13
|
+
export type {
|
|
14
|
+
DialogProps,
|
|
15
|
+
DialogContentProps,
|
|
16
|
+
DialogTitleProps,
|
|
17
|
+
DialogDescriptionProps,
|
|
18
|
+
DialogFooterProps,
|
|
19
|
+
DialogCloseProps,
|
|
20
|
+
} from './Dialog.types';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: FAB Styles
|
|
3
|
+
*
|
|
4
|
+
* Static styles created with StyleSheet.create. Positioning for fixed FABs
|
|
5
|
+
* and base sizing; colors/shadows are resolved from the theme at render time.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { StyleSheet } from 'react-native';
|
|
9
|
+
|
|
10
|
+
export const fabStyles = StyleSheet.create({
|
|
11
|
+
root: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
borderRadius: 9999,
|
|
15
|
+
},
|
|
16
|
+
fixed: {
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
right: 16,
|
|
19
|
+
bottom: 16,
|
|
20
|
+
},
|
|
21
|
+
topLeft: {
|
|
22
|
+
top: 16,
|
|
23
|
+
left: 16,
|
|
24
|
+
},
|
|
25
|
+
topRight: {
|
|
26
|
+
top: 16,
|
|
27
|
+
right: 16,
|
|
28
|
+
},
|
|
29
|
+
bottomLeft: {
|
|
30
|
+
bottom: 16,
|
|
31
|
+
left: 16,
|
|
32
|
+
},
|
|
33
|
+
bottomRight: {
|
|
34
|
+
bottom: 16,
|
|
35
|
+
right: 16,
|
|
36
|
+
},
|
|
37
|
+
sm: {
|
|
38
|
+
width: 40,
|
|
39
|
+
height: 40,
|
|
40
|
+
},
|
|
41
|
+
default: {
|
|
42
|
+
width: 56,
|
|
43
|
+
height: 56,
|
|
44
|
+
},
|
|
45
|
+
lg: {
|
|
46
|
+
width: 72,
|
|
47
|
+
height: 72,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: FAB
|
|
3
|
+
*
|
|
4
|
+
* A floating action button with variant/size/position support. When `fixed`
|
|
5
|
+
* (default), it positions itself at a screen corner. Exposes
|
|
6
|
+
* `accessibilityRole="button"` with ≥48dp hit targets. Themed shadow
|
|
7
|
+
* elevates the FAB.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useTheme } from '../../theme';
|
|
11
|
+
import { cn } from '../../utils/cn';
|
|
12
|
+
import { PressablePrimitive } from '../../primitives/Pressable';
|
|
13
|
+
import { TextPrimitive } from '../../primitives/Text';
|
|
14
|
+
import { getFABVariants, getFABShadow } from './FAB.variants';
|
|
15
|
+
import { fabStyles } from './FAB.styles';
|
|
16
|
+
import type { FABProps, FABVariant, FABSize, FABPosition } from './FAB.types';
|
|
17
|
+
import type { FontSize } from '../../design-tokens/typography';
|
|
18
|
+
|
|
19
|
+
function toStyleKey(position: FABPosition): 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' {
|
|
20
|
+
switch (position) {
|
|
21
|
+
case 'top-left':
|
|
22
|
+
return 'topLeft';
|
|
23
|
+
case 'top-right':
|
|
24
|
+
return 'topRight';
|
|
25
|
+
case 'bottom-left':
|
|
26
|
+
return 'bottomLeft';
|
|
27
|
+
case 'bottom-right':
|
|
28
|
+
return 'bottomRight';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const glyphSize: Record<FABSize, FontSize> = {
|
|
33
|
+
sm: 'base',
|
|
34
|
+
default: 'lg',
|
|
35
|
+
lg: 'xl',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export function FAB({
|
|
39
|
+
children = '+',
|
|
40
|
+
variant: variantProp,
|
|
41
|
+
size: sizeProp,
|
|
42
|
+
position = 'bottom-right',
|
|
43
|
+
disabled = false,
|
|
44
|
+
fixed = true,
|
|
45
|
+
style,
|
|
46
|
+
...rest
|
|
47
|
+
}: FABProps) {
|
|
48
|
+
const { theme } = useTheme();
|
|
49
|
+
const { variant, defaultVariant, defaultSize } = getFABVariants(theme);
|
|
50
|
+
const variantKey: FABVariant = variantProp ?? defaultVariant;
|
|
51
|
+
const sizeKey: FABSize = sizeProp ?? defaultSize;
|
|
52
|
+
|
|
53
|
+
const entry = variant[variantKey];
|
|
54
|
+
const positionStyle = fixed ? fabStyles[toStyleKey(position)] : undefined;
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<PressablePrimitive
|
|
58
|
+
{...rest}
|
|
59
|
+
disabled={disabled}
|
|
60
|
+
accessibilityRole="button"
|
|
61
|
+
accessibilityState={{ disabled }}
|
|
62
|
+
style={cn(
|
|
63
|
+
fabStyles.root,
|
|
64
|
+
fabStyles[sizeKey],
|
|
65
|
+
entry.container,
|
|
66
|
+
getFABShadow(),
|
|
67
|
+
positionStyle,
|
|
68
|
+
disabled && { opacity: 0.5 },
|
|
69
|
+
style,
|
|
70
|
+
)}
|
|
71
|
+
hitSlop={12}
|
|
72
|
+
>
|
|
73
|
+
<TextPrimitive
|
|
74
|
+
color={entry.textColor}
|
|
75
|
+
fontSize={glyphSize[sizeKey]}
|
|
76
|
+
fontWeight="bold"
|
|
77
|
+
>
|
|
78
|
+
{children}
|
|
79
|
+
</TextPrimitive>
|
|
80
|
+
</PressablePrimitive>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
FAB.displayName = 'FAB';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: FAB Types
|
|
3
|
+
*
|
|
4
|
+
* A floating action button with variant/size/position support.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
9
|
+
|
|
10
|
+
export type FABVariant = 'default' | 'secondary' | 'outline' | 'destructive';
|
|
11
|
+
|
|
12
|
+
export type FABSize = 'sm' | 'default' | 'lg';
|
|
13
|
+
|
|
14
|
+
export type FABPosition =
|
|
15
|
+
| 'top-left'
|
|
16
|
+
| 'top-right'
|
|
17
|
+
| 'bottom-left'
|
|
18
|
+
| 'bottom-right';
|
|
19
|
+
|
|
20
|
+
export interface FABProps extends Omit<PressableProps, 'style'> {
|
|
21
|
+
/** FAB content (icon or text). Defaults to "+". */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
variant?: FABVariant;
|
|
24
|
+
size?: FABSize;
|
|
25
|
+
/** Position when used as a fixed overlay. Defaults to `bottom-right`. */
|
|
26
|
+
position?: FABPosition;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Whether the FAB is fixed to the screen edges. Defaults to `true`. */
|
|
29
|
+
fixed?: boolean;
|
|
30
|
+
style?: StyleProp<ViewStyle>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: FAB Variants
|
|
3
|
+
*
|
|
4
|
+
* Variant surface colors and text color roles resolved against the active
|
|
5
|
+
* theme at render time, plus the themed elevation shadow.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ViewStyle } from 'react-native';
|
|
9
|
+
import type { Theme, ThemeColors } from '../../theme/types';
|
|
10
|
+
import type { FABVariant, FABSize } from './FAB.types';
|
|
11
|
+
import { resolveShadow } from '../../design-tokens';
|
|
12
|
+
|
|
13
|
+
export interface FABVariantEntry {
|
|
14
|
+
container: ViewStyle;
|
|
15
|
+
textColor: keyof ThemeColors;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface FABVariantConfig {
|
|
19
|
+
variant: Record<FABVariant, FABVariantEntry>;
|
|
20
|
+
defaultVariant: FABVariant;
|
|
21
|
+
defaultSize: FABSize;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getFABVariants(theme: Theme): FABVariantConfig {
|
|
25
|
+
return {
|
|
26
|
+
variant: {
|
|
27
|
+
default: {
|
|
28
|
+
container: { backgroundColor: theme.colors.primary },
|
|
29
|
+
textColor: 'primaryForeground',
|
|
30
|
+
},
|
|
31
|
+
secondary: {
|
|
32
|
+
container: { backgroundColor: theme.colors.secondary },
|
|
33
|
+
textColor: 'secondaryForeground',
|
|
34
|
+
},
|
|
35
|
+
outline: {
|
|
36
|
+
container: {
|
|
37
|
+
backgroundColor: 'transparent',
|
|
38
|
+
borderWidth: 1,
|
|
39
|
+
borderColor: theme.colors.primary,
|
|
40
|
+
},
|
|
41
|
+
textColor: 'primary',
|
|
42
|
+
},
|
|
43
|
+
destructive: {
|
|
44
|
+
container: { backgroundColor: theme.colors.destructive },
|
|
45
|
+
textColor: 'destructiveForeground',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
defaultVariant: 'default',
|
|
49
|
+
defaultSize: 'default',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getFABShadow() {
|
|
54
|
+
return resolveShadow('md');
|
|
55
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Components: Barrel Export
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { Button } from './button';
|
|
6
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from './button/Button.types';
|
|
7
|
+
|
|
8
|
+
export { Text } from './text';
|
|
9
|
+
export type { TextProps, TextVariant } from './text/Text.types';
|
|
10
|
+
|
|
11
|
+
export { Input } from './input';
|
|
12
|
+
export type { InputProps, InputVariant, InputSize } from './input/Input.types';
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
Card,
|
|
16
|
+
CardHeader,
|
|
17
|
+
CardTitle,
|
|
18
|
+
CardDescription,
|
|
19
|
+
CardContent,
|
|
20
|
+
CardFooter,
|
|
21
|
+
} from './card';
|
|
22
|
+
export type {
|
|
23
|
+
CardProps,
|
|
24
|
+
CardPartProps,
|
|
25
|
+
CardTextPartProps,
|
|
26
|
+
CardVariant,
|
|
27
|
+
} from './card/Card.types';
|
|
28
|
+
|
|
29
|
+
export { Separator } from './separator';
|
|
30
|
+
export type {
|
|
31
|
+
SeparatorProps,
|
|
32
|
+
SeparatorOrientation,
|
|
33
|
+
SeparatorVariant,
|
|
34
|
+
} from './separator/Separator.types';
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
Accordion,
|
|
38
|
+
AccordionItem,
|
|
39
|
+
AccordionTrigger,
|
|
40
|
+
AccordionContent,
|
|
41
|
+
} from './accordion';
|
|
42
|
+
export type {
|
|
43
|
+
AccordionProps,
|
|
44
|
+
AccordionType,
|
|
45
|
+
AccordionItemProps,
|
|
46
|
+
AccordionTriggerProps,
|
|
47
|
+
AccordionContentProps,
|
|
48
|
+
} from './accordion/Accordion.types';
|
|
49
|
+
|
|
50
|
+
export { Alert } from './alert';
|
|
51
|
+
export type { AlertProps, AlertVariant } from './alert/Alert.types';
|
|
52
|
+
|
|
53
|
+
export { Avatar } from './avatar';
|
|
54
|
+
export type { AvatarProps, AvatarSize, AvatarVariant } from './avatar/Avatar.types';
|
|
55
|
+
|
|
56
|
+
export { Badge } from './badge';
|
|
57
|
+
export type { BadgeProps, BadgeVariant, BadgeSize } from './badge/Badge.types';
|
|
58
|
+
|
|
59
|
+
export { CheckBox } from './checkbox';
|
|
60
|
+
export type { CheckBoxProps, CheckBoxSize } from './checkbox/CheckBox.types';
|
|
61
|
+
|
|
62
|
+
export { ComboBox } from './combobox';
|
|
63
|
+
export type {
|
|
64
|
+
ComboBoxProps,
|
|
65
|
+
ComboBoxVariant,
|
|
66
|
+
ComboBoxSize,
|
|
67
|
+
ComboBoxOption,
|
|
68
|
+
} from './combobox/ComboBox.types';
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
Dialog,
|
|
72
|
+
DialogContent,
|
|
73
|
+
DialogTitle,
|
|
74
|
+
DialogDescription,
|
|
75
|
+
DialogFooter,
|
|
76
|
+
DialogClose,
|
|
77
|
+
} from './dialog';
|
|
78
|
+
export type {
|
|
79
|
+
DialogProps,
|
|
80
|
+
DialogContentProps,
|
|
81
|
+
DialogTitleProps,
|
|
82
|
+
DialogDescriptionProps,
|
|
83
|
+
DialogFooterProps,
|
|
84
|
+
DialogCloseProps,
|
|
85
|
+
} from './dialog/Dialog.types';
|
|
86
|
+
|
|
87
|
+
export { FAB } from './fab';
|
|
88
|
+
export type { FABProps, FABVariant, FABSize, FABPosition } from './fab/FAB.types';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Input Styles
|
|
3
|
+
*
|
|
4
|
+
* Static styles created with StyleSheet.create. Theme-dependent values
|
|
5
|
+
* (colors, focus/error borders) are resolved at render time in Input.tsx.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { StyleSheet } from 'react-native';
|
|
9
|
+
|
|
10
|
+
export const inputStyles = StyleSheet.create({
|
|
11
|
+
container: {
|
|
12
|
+
width: '100%',
|
|
13
|
+
},
|
|
14
|
+
field: {
|
|
15
|
+
width: '100%',
|
|
16
|
+
},
|
|
17
|
+
label: {
|
|
18
|
+
marginBottom: 4,
|
|
19
|
+
},
|
|
20
|
+
message: {
|
|
21
|
+
marginTop: 4,
|
|
22
|
+
},
|
|
23
|
+
});
|