@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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Theme: Barrel Export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.darkTheme = exports.lightTheme = exports.useTheme = exports.ThemeProvider = void 0;
|
|
7
|
+
var ThemeProvider_1 = require("./ThemeProvider");
|
|
8
|
+
Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
|
|
9
|
+
var useTheme_1 = require("./useTheme");
|
|
10
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return useTheme_1.useTheme; } });
|
|
11
|
+
var themes_1 = require("./themes");
|
|
12
|
+
Object.defineProperty(exports, "lightTheme", { enumerable: true, get: function () { return themes_1.lightTheme; } });
|
|
13
|
+
Object.defineProperty(exports, "darkTheme", { enumerable: true, get: function () { return themes_1.darkTheme; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAEjB,mCAAiD;AAAxC,oGAAA,UAAU,OAAA;AAAE,mGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Theme: Theme Definitions (light / dark)
|
|
3
|
+
*
|
|
4
|
+
* Maps semantic color roles to raw design token values.
|
|
5
|
+
*/
|
|
6
|
+
import type { ThemeColors, ThemeName, ColorScheme } from './types';
|
|
7
|
+
export declare const lightThemeColors: ThemeColors;
|
|
8
|
+
export declare const darkThemeColors: ThemeColors;
|
|
9
|
+
export declare const lightTheme: {
|
|
10
|
+
name: ThemeName;
|
|
11
|
+
colorScheme: ColorScheme;
|
|
12
|
+
colors: ThemeColors;
|
|
13
|
+
};
|
|
14
|
+
export declare const darkTheme: {
|
|
15
|
+
name: ThemeName;
|
|
16
|
+
colorScheme: ColorScheme;
|
|
17
|
+
colors: ThemeColors;
|
|
18
|
+
};
|
|
19
|
+
export type CustomThemeOverride = Partial<ThemeColors>;
|
|
20
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiDnE,eAAO,MAAM,gBAAgB,aAAuB,CAAC;AACrD,eAAO,MAAM,eAAe,aAAsB,CAAC;AAEnD,eAAO,MAAM,UAAU,EAAE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAIxF,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAIvF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Theme: Theme Definitions (light / dark)
|
|
4
|
+
*
|
|
5
|
+
* Maps semantic color roles to raw design token values.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.darkTheme = exports.lightTheme = exports.darkThemeColors = exports.lightThemeColors = void 0;
|
|
9
|
+
const design_tokens_1 = require("../design-tokens");
|
|
10
|
+
function buildColors(scheme) {
|
|
11
|
+
const isDark = scheme === 'dark';
|
|
12
|
+
const bg = isDark ? design_tokens_1.colors.slate[950] : design_tokens_1.colors.slate[50];
|
|
13
|
+
const fg = isDark ? design_tokens_1.colors.slate[50] : design_tokens_1.colors.slate[900];
|
|
14
|
+
const card = isDark ? design_tokens_1.colors.slate[900] : '#ffffff';
|
|
15
|
+
const cardFg = isDark ? design_tokens_1.colors.slate[50] : design_tokens_1.colors.slate[900];
|
|
16
|
+
const popover = isDark ? design_tokens_1.colors.slate[900] : '#ffffff';
|
|
17
|
+
const popoverFg = isDark ? design_tokens_1.colors.slate[50] : design_tokens_1.colors.slate[900];
|
|
18
|
+
const primary = design_tokens_1.colors.primary[600];
|
|
19
|
+
const primaryFg = '#ffffff';
|
|
20
|
+
const secondary = isDark ? design_tokens_1.colors.slate[800] : design_tokens_1.colors.slate[100];
|
|
21
|
+
const secondaryFg = isDark ? design_tokens_1.colors.slate[50] : design_tokens_1.colors.slate[900];
|
|
22
|
+
const muted = isDark ? design_tokens_1.colors.slate[800] : design_tokens_1.colors.slate[100];
|
|
23
|
+
const mutedFg = isDark ? design_tokens_1.colors.slate[400] : design_tokens_1.colors.slate[500];
|
|
24
|
+
const accent = design_tokens_1.colors.accent[600];
|
|
25
|
+
const accentFg = '#ffffff';
|
|
26
|
+
const destructive = design_tokens_1.colors.destructive[600];
|
|
27
|
+
const destructiveFg = '#ffffff';
|
|
28
|
+
const border = isDark ? design_tokens_1.colors.border.dark : design_tokens_1.colors.border.light;
|
|
29
|
+
const input = isDark ? design_tokens_1.colors.slate[800] : design_tokens_1.colors.slate[100];
|
|
30
|
+
const ring = design_tokens_1.colors.primary[500];
|
|
31
|
+
return {
|
|
32
|
+
background: bg,
|
|
33
|
+
foreground: fg,
|
|
34
|
+
card,
|
|
35
|
+
cardForeground: cardFg,
|
|
36
|
+
popover,
|
|
37
|
+
popoverForeground: popoverFg,
|
|
38
|
+
primary,
|
|
39
|
+
primaryForeground: primaryFg,
|
|
40
|
+
secondary,
|
|
41
|
+
secondaryForeground: secondaryFg,
|
|
42
|
+
muted,
|
|
43
|
+
mutedForeground: mutedFg,
|
|
44
|
+
accent,
|
|
45
|
+
accentForeground: accentFg,
|
|
46
|
+
destructive,
|
|
47
|
+
destructiveForeground: destructiveFg,
|
|
48
|
+
border,
|
|
49
|
+
input,
|
|
50
|
+
ring,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.lightThemeColors = buildColors('light');
|
|
54
|
+
exports.darkThemeColors = buildColors('dark');
|
|
55
|
+
exports.lightTheme = {
|
|
56
|
+
name: 'light',
|
|
57
|
+
colorScheme: 'light',
|
|
58
|
+
colors: exports.lightThemeColors,
|
|
59
|
+
};
|
|
60
|
+
exports.darkTheme = {
|
|
61
|
+
name: 'dark',
|
|
62
|
+
colorScheme: 'dark',
|
|
63
|
+
colors: exports.darkThemeColors,
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/theme/themes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Theme: Theme Types
|
|
3
|
+
*
|
|
4
|
+
* The resolved theme object consumed by components.
|
|
5
|
+
* Semantic roles are mapped to raw design token values by the theme layer.
|
|
6
|
+
*/
|
|
7
|
+
import type { FontSize, FontWeight, LineHeight } from '../design-tokens/typography';
|
|
8
|
+
import type { Spacing } from '../design-tokens/spacing';
|
|
9
|
+
import type { BorderRadius } from '../design-tokens/border-radius';
|
|
10
|
+
import type { ShadowKey, ElevationKey } from '../design-tokens/shadows';
|
|
11
|
+
import type { AnimationDuration, AnimationEasing } from '../design-tokens/animation';
|
|
12
|
+
import type { TextStyle } from 'react-native';
|
|
13
|
+
export type ColorScheme = 'light' | 'dark';
|
|
14
|
+
export type ThemeName = 'light' | 'dark';
|
|
15
|
+
export interface ThemeColors {
|
|
16
|
+
background: string;
|
|
17
|
+
foreground: string;
|
|
18
|
+
card: string;
|
|
19
|
+
cardForeground: string;
|
|
20
|
+
popover: string;
|
|
21
|
+
popoverForeground: string;
|
|
22
|
+
primary: string;
|
|
23
|
+
primaryForeground: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
secondaryForeground: string;
|
|
26
|
+
muted: string;
|
|
27
|
+
mutedForeground: string;
|
|
28
|
+
accent: string;
|
|
29
|
+
accentForeground: string;
|
|
30
|
+
destructive: string;
|
|
31
|
+
destructiveForeground: string;
|
|
32
|
+
border: string;
|
|
33
|
+
input: string;
|
|
34
|
+
ring: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ThemeTypography {
|
|
37
|
+
fontFamily: {
|
|
38
|
+
sans: string;
|
|
39
|
+
mono: string;
|
|
40
|
+
};
|
|
41
|
+
fontSize: Record<FontSize, number>;
|
|
42
|
+
fontWeight: Record<FontWeight, NonNullable<TextStyle['fontWeight']>>;
|
|
43
|
+
lineHeight: Record<LineHeight, number>;
|
|
44
|
+
letterSpacing: Record<string, number>;
|
|
45
|
+
}
|
|
46
|
+
export interface ThemeSpacing {
|
|
47
|
+
scale: Record<Spacing, number>;
|
|
48
|
+
}
|
|
49
|
+
export interface ThemeBorderRadius {
|
|
50
|
+
scale: Record<BorderRadius, number>;
|
|
51
|
+
}
|
|
52
|
+
export interface ThemeShadows {
|
|
53
|
+
keys: Record<ShadowKey, {
|
|
54
|
+
shadowColor?: string;
|
|
55
|
+
shadowOffset?: {
|
|
56
|
+
width: number;
|
|
57
|
+
height: number;
|
|
58
|
+
};
|
|
59
|
+
shadowOpacity?: number;
|
|
60
|
+
shadowRadius?: number;
|
|
61
|
+
elevation?: number;
|
|
62
|
+
} | {
|
|
63
|
+
elevation: number;
|
|
64
|
+
}>;
|
|
65
|
+
resolve: (key: ShadowKey) => ReturnType<typeof import('../design-tokens/shadows').resolveShadow>;
|
|
66
|
+
}
|
|
67
|
+
export interface ThemeElevation {
|
|
68
|
+
scale: Record<ElevationKey, number>;
|
|
69
|
+
}
|
|
70
|
+
export interface ThemeAnimation {
|
|
71
|
+
duration: Record<AnimationDuration, number>;
|
|
72
|
+
easing: Record<AnimationEasing, string>;
|
|
73
|
+
}
|
|
74
|
+
export interface Theme {
|
|
75
|
+
name: ThemeName;
|
|
76
|
+
colorScheme: ColorScheme;
|
|
77
|
+
colors: ThemeColors;
|
|
78
|
+
typography: ThemeTypography;
|
|
79
|
+
spacing: ThemeSpacing;
|
|
80
|
+
borderRadius: ThemeBorderRadius;
|
|
81
|
+
shadows: ThemeShadows;
|
|
82
|
+
elevation: ThemeElevation;
|
|
83
|
+
animation: ThemeAnimation;
|
|
84
|
+
}
|
|
85
|
+
export interface ThemeContextValue {
|
|
86
|
+
theme: Theme;
|
|
87
|
+
setTheme: (theme: ThemeName) => void;
|
|
88
|
+
toggleTheme: () => void;
|
|
89
|
+
colorScheme: ColorScheme;
|
|
90
|
+
systemTheme: ColorScheme;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Theme: Theme Types
|
|
4
|
+
*
|
|
5
|
+
* The resolved theme object consumed by components.
|
|
6
|
+
* Semantic roles are mapped to raw design token values by the theme layer.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Theme: useTheme hook re-export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useTheme = void 0;
|
|
7
|
+
const ThemeContext_1 = require("./ThemeContext");
|
|
8
|
+
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeContext_1.useTheme; } });
|
|
9
|
+
//# sourceMappingURL=useTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.js","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDAA0C;AACjC,yFADA,uBAAQ,OACA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Utility: cn
|
|
3
|
+
*
|
|
4
|
+
* Merges React Native style props (StyleProp arrays / objects) into a single
|
|
5
|
+
* flattened array suitable for the `style` prop. Later styles win (React Native
|
|
6
|
+
* applies left-to-right). Filters out falsy values.
|
|
7
|
+
*
|
|
8
|
+
* Unlike classnames-based `cn`, there is no conflict resolution — RN style
|
|
9
|
+
* arrays already cascade by order. This is a convenience for conditional styles.
|
|
10
|
+
*/
|
|
11
|
+
import type { StyleProp, ViewStyle, TextStyle, ImageStyle } from 'react-native';
|
|
12
|
+
type StyleValue = StyleProp<ViewStyle | TextStyle | ImageStyle>;
|
|
13
|
+
type MergedStyle = ViewStyle | TextStyle | ImageStyle;
|
|
14
|
+
export declare function cn(...styles: StyleValue[]): MergedStyle[];
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=cn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEhF,KAAK,UAAU,GAAG,SAAS,CAAC,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;AAEhE,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAmBzD"}
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Utility: cn
|
|
4
|
+
*
|
|
5
|
+
* Merges React Native style props (StyleProp arrays / objects) into a single
|
|
6
|
+
* flattened array suitable for the `style` prop. Later styles win (React Native
|
|
7
|
+
* applies left-to-right). Filters out falsy values.
|
|
8
|
+
*
|
|
9
|
+
* Unlike classnames-based `cn`, there is no conflict resolution — RN style
|
|
10
|
+
* arrays already cascade by order. This is a convenience for conditional styles.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.cn = cn;
|
|
14
|
+
function cn(...styles) {
|
|
15
|
+
const result = [];
|
|
16
|
+
const push = (style) => {
|
|
17
|
+
if (!style)
|
|
18
|
+
return;
|
|
19
|
+
if (Array.isArray(style)) {
|
|
20
|
+
for (const item of style) {
|
|
21
|
+
push(item);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
result.push(style);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
for (const style of styles) {
|
|
29
|
+
push(style);
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=cn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.js","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAQH,gBAmBC;AAnBD,SAAgB,EAAE,CAAC,GAAG,MAAoB;IACxC,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,MAAM,IAAI,GAAG,CAAC,KAAiB,EAAQ,EAAE;QACvC,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,IAAI,CAAC,IAAkB,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,KAAoB,CAAC,CAAC;QACpC,CAAC;IACH,CAAC,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Utility: createVariants
|
|
3
|
+
*
|
|
4
|
+
* Builds a variant resolver for React Native components.
|
|
5
|
+
*
|
|
6
|
+
* Given a variant config (base + variant/size records + defaults), returns a
|
|
7
|
+
* function that resolves the appropriate StyleSheet style array based on the
|
|
8
|
+
* component's props and the active theme.
|
|
9
|
+
*
|
|
10
|
+
* Styles are resolved at render time (inside the component) so theme switches
|
|
11
|
+
* are reflected immediately. Variant definitions themselves are pure functions
|
|
12
|
+
* of (props, theme).
|
|
13
|
+
*/
|
|
14
|
+
import type { ViewStyle, TextStyle, StyleProp } from 'react-native';
|
|
15
|
+
export interface VariantConfig<V extends string, S extends string> {
|
|
16
|
+
base: ViewStyle | TextStyle;
|
|
17
|
+
variants: {
|
|
18
|
+
variant: Record<V, ViewStyle | TextStyle>;
|
|
19
|
+
size: Record<S, ViewStyle | TextStyle>;
|
|
20
|
+
};
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: V;
|
|
23
|
+
size: S;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface VariantProps<V extends string, S extends string> {
|
|
27
|
+
variant?: V;
|
|
28
|
+
size?: S;
|
|
29
|
+
}
|
|
30
|
+
export declare function createVariants<V extends string, S extends string>(config: VariantConfig<V, S>): (props: VariantProps<V, S>) => (ViewStyle | TextStyle)[];
|
|
31
|
+
export type { StyleProp };
|
|
32
|
+
//# sourceMappingURL=createVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVariants.d.ts","sourceRoot":"","sources":["../../src/utils/createVariants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM;IAC/D,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;QAC1C,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;KACxC,CAAC;IACF,eAAe,EAAE;QAAE,OAAO,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;CAC1C;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM;IAC9D,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,IAAI,CAAC,EAAE,CAAC,CAAC;CACV;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAC/D,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,IAEnB,OAAO,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,CAS9D;AAED,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Utility: createVariants
|
|
4
|
+
*
|
|
5
|
+
* Builds a variant resolver for React Native components.
|
|
6
|
+
*
|
|
7
|
+
* Given a variant config (base + variant/size records + defaults), returns a
|
|
8
|
+
* function that resolves the appropriate StyleSheet style array based on the
|
|
9
|
+
* component's props and the active theme.
|
|
10
|
+
*
|
|
11
|
+
* Styles are resolved at render time (inside the component) so theme switches
|
|
12
|
+
* are reflected immediately. Variant definitions themselves are pure functions
|
|
13
|
+
* of (props, theme).
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.createVariants = createVariants;
|
|
17
|
+
function createVariants(config) {
|
|
18
|
+
return (props) => {
|
|
19
|
+
const variant = props.variant ?? config.defaultVariants.variant;
|
|
20
|
+
const size = props.size ?? config.defaultVariants.size;
|
|
21
|
+
const variantStyle = config.variants.variant[variant];
|
|
22
|
+
const sizeStyle = config.variants.size[size];
|
|
23
|
+
return [config.base, variantStyle, sizeStyle].filter(Boolean);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=createVariants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVariants.js","sourceRoot":"","sources":["../../src/utils/createVariants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAoBH,wCAYC;AAZD,SAAgB,cAAc,CAC5B,MAA2B;IAE3B,OAAO,CAAC,KAAyB,EAA6B,EAAE;QAC9D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;QAChE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;QAEvD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACtD,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Utility: Barrel Export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.mergeAccessibilityProps = exports.createVariants = exports.cn = void 0;
|
|
7
|
+
var cn_1 = require("./cn");
|
|
8
|
+
Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return cn_1.cn; } });
|
|
9
|
+
var createVariants_1 = require("./createVariants");
|
|
10
|
+
Object.defineProperty(exports, "createVariants", { enumerable: true, get: function () { return createVariants_1.createVariants; } });
|
|
11
|
+
var mergeProps_1 = require("./mergeProps");
|
|
12
|
+
Object.defineProperty(exports, "mergeAccessibilityProps", { enumerable: true, get: function () { return mergeProps_1.mergeAccessibilityProps; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2BAA0B;AAAjB,wFAAA,EAAE,OAAA;AACX,mDAAyF;AAAhF,gHAAA,cAAc,OAAA;AACvB,2CAAuD;AAA9C,qHAAA,uBAAuB,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Utility: mergeProps
|
|
3
|
+
*
|
|
4
|
+
* Merges accessibility and event-handler props safely. Intended for use when
|
|
5
|
+
* composing primitives (e.g. Pressable inside a custom component) so that
|
|
6
|
+
* consumer-provided accessibility props are preserved and forwarded.
|
|
7
|
+
*/
|
|
8
|
+
import type { AccessibilityProps } from 'react-native';
|
|
9
|
+
export declare function mergeAccessibilityProps<T extends Record<string, unknown>>(base: T, extra?: AccessibilityProps): T & Partial<AccessibilityProps>;
|
|
10
|
+
//# sourceMappingURL=mergeProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeProps.d.ts","sourceRoot":"","sources":["../../src/utils/mergeProps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,wBAAgB,uBAAuB,CACrC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAEjC,IAAI,EAAE,CAAC,EACP,KAAK,CAAC,EAAE,kBAAkB,GACzB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAmBjC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Utility: mergeProps
|
|
4
|
+
*
|
|
5
|
+
* Merges accessibility and event-handler props safely. Intended for use when
|
|
6
|
+
* composing primitives (e.g. Pressable inside a custom component) so that
|
|
7
|
+
* consumer-provided accessibility props are preserved and forwarded.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.mergeAccessibilityProps = mergeAccessibilityProps;
|
|
11
|
+
function mergeAccessibilityProps(base, extra) {
|
|
12
|
+
return {
|
|
13
|
+
...base,
|
|
14
|
+
...(extra?.accessibilityLabel !== undefined && {
|
|
15
|
+
accessibilityLabel: extra.accessibilityLabel,
|
|
16
|
+
}),
|
|
17
|
+
...(extra?.accessibilityRole !== undefined && {
|
|
18
|
+
accessibilityRole: extra.accessibilityRole,
|
|
19
|
+
}),
|
|
20
|
+
...(extra?.accessibilityHint !== undefined && {
|
|
21
|
+
accessibilityHint: extra.accessibilityHint,
|
|
22
|
+
}),
|
|
23
|
+
...(extra?.accessibilityState !== undefined && {
|
|
24
|
+
accessibilityState: extra.accessibilityState,
|
|
25
|
+
}),
|
|
26
|
+
...(extra?.accessibilityValue !== undefined && {
|
|
27
|
+
accessibilityValue: extra.accessibilityValue,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=mergeProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeProps.js","sourceRoot":"","sources":["../../src/utils/mergeProps.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAIH,0DAwBC;AAxBD,SAAgB,uBAAuB,CAGrC,IAAO,EACP,KAA0B;IAE1B,OAAO;QACL,GAAG,IAAI;QACP,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,IAAI;YAC7C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;SAC7C,CAAC;QACF,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,IAAI;YAC5C,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;SAC3C,CAAC;QACF,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,IAAI;YAC5C,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;SAC3C,CAAC;QACF,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,IAAI;YAC7C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;SAC7C,CAAC;QACF,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,SAAS,IAAI;YAC7C,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;SAC7C,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnative/ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Production-ready React Native component library inspired by shadcn/ui",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"react-native": "src/index.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"react-native": "./src/index.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"src",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"build": "tsc"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"react-native",
|
|
31
|
+
"expo",
|
|
32
|
+
"ui-library",
|
|
33
|
+
"components",
|
|
34
|
+
"design-system",
|
|
35
|
+
"rnative"
|
|
36
|
+
],
|
|
37
|
+
"author": "",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"type": "commonjs",
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": ">=18.2.0",
|
|
42
|
+
"react-native": ">=0.73.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"react": "^18.2.0",
|
|
46
|
+
"react-native": "^0.73.6",
|
|
47
|
+
"typescript": "^5.4.5"
|
|
48
|
+
}
|
|
6
49
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Component: Accordion Styles
|
|
3
|
+
*
|
|
4
|
+
* Static styles created with StyleSheet.create. The item divider color and
|
|
5
|
+
* chevron color are resolved from the theme at render time.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { StyleSheet } from 'react-native';
|
|
9
|
+
import { spacing } from '../../design-tokens';
|
|
10
|
+
|
|
11
|
+
export const accordionStyles = StyleSheet.create({
|
|
12
|
+
root: {
|
|
13
|
+
width: '100%',
|
|
14
|
+
},
|
|
15
|
+
item: {
|
|
16
|
+
borderBottomWidth: StyleSheet.hairlineWidth,
|
|
17
|
+
},
|
|
18
|
+
trigger: {
|
|
19
|
+
flexDirection: 'row',
|
|
20
|
+
alignItems: 'center',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gap: spacing[2],
|
|
23
|
+
minHeight: 48,
|
|
24
|
+
paddingVertical: spacing[3],
|
|
25
|
+
},
|
|
26
|
+
triggerLabel: {
|
|
27
|
+
flex: 1,
|
|
28
|
+
},
|
|
29
|
+
content: {
|
|
30
|
+
paddingBottom: spacing[4],
|
|
31
|
+
paddingTop: spacing[1],
|
|
32
|
+
},
|
|
33
|
+
chevron: {
|
|
34
|
+
width: 10,
|
|
35
|
+
height: 10,
|
|
36
|
+
borderTopWidth: 2,
|
|
37
|
+
borderRightWidth: 2,
|
|
38
|
+
},
|
|
39
|
+
chevronCollapsed: {
|
|
40
|
+
// Corner (top + right borders) rotated to point downwards.
|
|
41
|
+
transform: [{ rotate: '135deg' }],
|
|
42
|
+
},
|
|
43
|
+
chevronExpanded: {
|
|
44
|
+
transform: [{ rotate: '-45deg' }],
|
|
45
|
+
},
|
|
46
|
+
});
|