@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 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/design-tokens/spacing.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;CAsBV,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,OAAO,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Design Tokens: Spacing
|
|
4
|
+
*
|
|
5
|
+
* Based on a 4px grid.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.spacing = void 0;
|
|
9
|
+
exports.spacing = {
|
|
10
|
+
0: 0,
|
|
11
|
+
1: 4,
|
|
12
|
+
2: 8,
|
|
13
|
+
3: 12,
|
|
14
|
+
4: 16,
|
|
15
|
+
5: 20,
|
|
16
|
+
6: 24,
|
|
17
|
+
7: 28,
|
|
18
|
+
8: 32,
|
|
19
|
+
9: 36,
|
|
20
|
+
10: 40,
|
|
21
|
+
11: 44,
|
|
22
|
+
12: 48,
|
|
23
|
+
14: 56,
|
|
24
|
+
16: 64,
|
|
25
|
+
20: 80,
|
|
26
|
+
24: 96,
|
|
27
|
+
28: 112,
|
|
28
|
+
32: 128,
|
|
29
|
+
36: 144,
|
|
30
|
+
40: 160,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spacing.js","sourceRoot":"","sources":["../../src/design-tokens/spacing.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,OAAO,GAAG;IACrB,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE;IACL,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;CACC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Design Tokens: Typography
|
|
3
|
+
*/
|
|
4
|
+
export declare const fontFamily: {
|
|
5
|
+
readonly sans: "System";
|
|
6
|
+
readonly mono: "Courier New";
|
|
7
|
+
};
|
|
8
|
+
export declare const fontSize: {
|
|
9
|
+
readonly xs: 12;
|
|
10
|
+
readonly sm: 14;
|
|
11
|
+
readonly base: 16;
|
|
12
|
+
readonly lg: 18;
|
|
13
|
+
readonly xl: 20;
|
|
14
|
+
readonly '2xl': 24;
|
|
15
|
+
readonly '3xl': 30;
|
|
16
|
+
};
|
|
17
|
+
export declare const fontWeight: {
|
|
18
|
+
readonly normal: "400";
|
|
19
|
+
readonly medium: "500";
|
|
20
|
+
readonly semibold: "600";
|
|
21
|
+
readonly bold: "700";
|
|
22
|
+
};
|
|
23
|
+
export declare const lineHeight: {
|
|
24
|
+
readonly none: 1;
|
|
25
|
+
readonly tight: 1.25;
|
|
26
|
+
readonly normal: 1.5;
|
|
27
|
+
readonly relaxed: 1.75;
|
|
28
|
+
};
|
|
29
|
+
export declare const letterSpacing: {
|
|
30
|
+
readonly tighter: -0.5;
|
|
31
|
+
readonly tight: -0.25;
|
|
32
|
+
readonly normal: 0;
|
|
33
|
+
readonly wide: 0.25;
|
|
34
|
+
readonly wider: 0.5;
|
|
35
|
+
readonly widest: 1;
|
|
36
|
+
};
|
|
37
|
+
export type FontSize = keyof typeof fontSize;
|
|
38
|
+
export type FontWeight = keyof typeof fontWeight;
|
|
39
|
+
export type LineHeight = keyof typeof lineHeight;
|
|
40
|
+
//# sourceMappingURL=typography.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/design-tokens/typography.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,UAAU;;;;;CAKb,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAC7C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Design Tokens: Typography
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.letterSpacing = exports.lineHeight = exports.fontWeight = exports.fontSize = exports.fontFamily = void 0;
|
|
7
|
+
exports.fontFamily = {
|
|
8
|
+
sans: 'System',
|
|
9
|
+
mono: 'Courier New',
|
|
10
|
+
};
|
|
11
|
+
exports.fontSize = {
|
|
12
|
+
xs: 12,
|
|
13
|
+
sm: 14,
|
|
14
|
+
base: 16,
|
|
15
|
+
lg: 18,
|
|
16
|
+
xl: 20,
|
|
17
|
+
'2xl': 24,
|
|
18
|
+
'3xl': 30,
|
|
19
|
+
};
|
|
20
|
+
exports.fontWeight = {
|
|
21
|
+
normal: '400',
|
|
22
|
+
medium: '500',
|
|
23
|
+
semibold: '600',
|
|
24
|
+
bold: '700',
|
|
25
|
+
};
|
|
26
|
+
exports.lineHeight = {
|
|
27
|
+
none: 1,
|
|
28
|
+
tight: 1.25,
|
|
29
|
+
normal: 1.5,
|
|
30
|
+
relaxed: 1.75,
|
|
31
|
+
};
|
|
32
|
+
exports.letterSpacing = {
|
|
33
|
+
tighter: -0.5,
|
|
34
|
+
tight: -0.25,
|
|
35
|
+
normal: 0,
|
|
36
|
+
wide: 0.25,
|
|
37
|
+
wider: 0.5,
|
|
38
|
+
widest: 1,
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography.js","sourceRoot":"","sources":["../../src/design-tokens/typography.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,aAAa;CACX,CAAC;AAEE,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,IAAI,EAAE,EAAE;IACR,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;CACD,CAAC;AAEE,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,KAAK;CACH,CAAC;AAEE,QAAA,UAAU,GAAG;IACxB,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,IAAI;CACL,CAAC;AAEE,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,CAAC,GAAG;IACb,KAAK,EAAE,CAAC,IAAI;IACZ,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Primitive: Box
|
|
3
|
+
*
|
|
4
|
+
* A flexible layout primitive. Accepts all ViewProps plus theme-aware style
|
|
5
|
+
* tokens (padding, margin, background, border, shadow, etc.) resolved via
|
|
6
|
+
* the theme context.
|
|
7
|
+
*
|
|
8
|
+
* Static styles live in StyleSheet.create; dynamic values are token references.
|
|
9
|
+
*/
|
|
10
|
+
import type { ViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
11
|
+
import type { Spacing } from '../design-tokens/spacing';
|
|
12
|
+
import type { BorderRadius } from '../design-tokens/border-radius';
|
|
13
|
+
import type { ShadowKey } from '../design-tokens/shadows';
|
|
14
|
+
export interface BoxProps extends ViewProps {
|
|
15
|
+
p?: Spacing;
|
|
16
|
+
px?: Spacing;
|
|
17
|
+
py?: Spacing;
|
|
18
|
+
pt?: Spacing;
|
|
19
|
+
pr?: Spacing;
|
|
20
|
+
pb?: Spacing;
|
|
21
|
+
pl?: Spacing;
|
|
22
|
+
m?: Spacing;
|
|
23
|
+
mx?: Spacing;
|
|
24
|
+
my?: Spacing;
|
|
25
|
+
mt?: Spacing;
|
|
26
|
+
mr?: Spacing;
|
|
27
|
+
mb?: Spacing;
|
|
28
|
+
ml?: Spacing;
|
|
29
|
+
bg?: keyof import('../theme/types').ThemeColors;
|
|
30
|
+
borderRadius?: BorderRadius;
|
|
31
|
+
shadow?: ShadowKey;
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
33
|
+
}
|
|
34
|
+
export declare function Box({ p, px, py, pt, pr, pb, pl, m, mx, my, mt, mr, mb, ml, bg, borderRadius: radius, shadow: shadowKey, style, children, ...rest }: BoxProps): import("react").JSX.Element;
|
|
35
|
+
export declare namespace Box {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/primitives/Box.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG1D,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,OAAO,gBAAgB,EAAE,WAAW,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAMD,wBAAgB,GAAG,CAAC,EAClB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACzB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACzB,EAAE,EACF,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,SAAS,EACjB,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,QAAQ,+BA6DV;yBAtEe,GAAG"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Box = Box;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
* ANAN-UI — Primitive: Box
|
|
7
|
+
*
|
|
8
|
+
* A flexible layout primitive. Accepts all ViewProps plus theme-aware style
|
|
9
|
+
* tokens (padding, margin, background, border, shadow, etc.) resolved via
|
|
10
|
+
* the theme context.
|
|
11
|
+
*
|
|
12
|
+
* Static styles live in StyleSheet.create; dynamic values are token references.
|
|
13
|
+
*/
|
|
14
|
+
const react_native_1 = require("react-native");
|
|
15
|
+
const theme_1 = require("../theme");
|
|
16
|
+
const cn_1 = require("../utils/cn");
|
|
17
|
+
const baseStyles = react_native_1.StyleSheet.create({
|
|
18
|
+
root: {},
|
|
19
|
+
});
|
|
20
|
+
function Box({ p, px, py, pt, pr, pb, pl, m, mx, my, mt, mr, mb, ml, bg, borderRadius: radius, shadow: shadowKey, style, children, ...rest }) {
|
|
21
|
+
const { theme } = (0, theme_1.useTheme)();
|
|
22
|
+
const paddingStyle = {};
|
|
23
|
+
if (p !== undefined) {
|
|
24
|
+
paddingStyle.padding = theme.spacing.scale[p];
|
|
25
|
+
}
|
|
26
|
+
if (px !== undefined) {
|
|
27
|
+
paddingStyle.paddingHorizontal = theme.spacing.scale[px];
|
|
28
|
+
}
|
|
29
|
+
if (py !== undefined) {
|
|
30
|
+
paddingStyle.paddingVertical = theme.spacing.scale[py];
|
|
31
|
+
}
|
|
32
|
+
if (pt !== undefined)
|
|
33
|
+
paddingStyle.paddingTop = theme.spacing.scale[pt];
|
|
34
|
+
if (pr !== undefined)
|
|
35
|
+
paddingStyle.paddingRight = theme.spacing.scale[pr];
|
|
36
|
+
if (pb !== undefined)
|
|
37
|
+
paddingStyle.paddingBottom = theme.spacing.scale[pb];
|
|
38
|
+
if (pl !== undefined)
|
|
39
|
+
paddingStyle.paddingLeft = theme.spacing.scale[pl];
|
|
40
|
+
const marginStyle = {};
|
|
41
|
+
if (m !== undefined) {
|
|
42
|
+
marginStyle.margin = theme.spacing.scale[m];
|
|
43
|
+
}
|
|
44
|
+
if (mx !== undefined) {
|
|
45
|
+
marginStyle.marginHorizontal = theme.spacing.scale[mx];
|
|
46
|
+
}
|
|
47
|
+
if (my !== undefined) {
|
|
48
|
+
marginStyle.marginVertical = theme.spacing.scale[my];
|
|
49
|
+
}
|
|
50
|
+
if (mt !== undefined)
|
|
51
|
+
marginStyle.marginTop = theme.spacing.scale[mt];
|
|
52
|
+
if (mr !== undefined)
|
|
53
|
+
marginStyle.marginRight = theme.spacing.scale[mr];
|
|
54
|
+
if (mb !== undefined)
|
|
55
|
+
marginStyle.marginBottom = theme.spacing.scale[mb];
|
|
56
|
+
if (ml !== undefined)
|
|
57
|
+
marginStyle.marginLeft = theme.spacing.scale[ml];
|
|
58
|
+
const backgroundStyle = {};
|
|
59
|
+
if (bg !== undefined) {
|
|
60
|
+
backgroundStyle.backgroundColor = theme.colors[bg];
|
|
61
|
+
}
|
|
62
|
+
const radiusStyle = {};
|
|
63
|
+
if (radius !== undefined) {
|
|
64
|
+
radiusStyle.borderRadius = theme.borderRadius.scale[radius];
|
|
65
|
+
}
|
|
66
|
+
const shadowStyle = shadowKey !== undefined ? theme.shadows.resolve(shadowKey) : {};
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { ...rest, style: (0, cn_1.cn)(baseStyles.root, paddingStyle, marginStyle, backgroundStyle, radiusStyle, shadowStyle, style), children: children }));
|
|
68
|
+
}
|
|
69
|
+
Box.displayName = 'Box';
|
|
70
|
+
//# sourceMappingURL=Box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.js","sourceRoot":"","sources":["../../src/primitives/Box.tsx"],"names":[],"mappings":";;AAgDA,kBAsEC;;AAtHD;;;;;;;;GAQG;AAEH,+CAAgD;AAMhD,oCAAoC;AACpC,oCAAiC;AA2BjC,MAAM,UAAU,GAAG,yBAAU,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,EAAE;CACT,CAAC,CAAC;AAEH,SAAgB,GAAG,CAAC,EAClB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACzB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EACzB,EAAE,EACF,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,SAAS,EACjB,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACE;IACT,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAE7B,MAAM,YAAY,GAAc,EAAE,CAAC;IACnC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACrB,YAAY,CAAC,iBAAiB,GAAG,KAAK,CAAC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AAE,KAAK,SAAS;QAAE,WAAW,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxE,IAAI,EAAE,KAAK,SAAS;QAAE,WAAW,CAAC,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzE,IAAI,EAAE,KAAK,SAAS;QAAE,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAEvE,MAAM,eAAe,GAAc,EAAE,CAAC;IACtC,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACrB,eAAe,CAAC,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,WAAW,GAAc,EAAE,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,WAAW,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,WAAW,GAAG,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpF,OAAO,CACL,uBAAC,mBAAI,OACC,IAAI,EACR,KAAK,EAAE,IAAA,OAAE,EACP,UAAU,CAAC,IAAI,EACf,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,EACX,KAAK,CACN,YAEA,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC;AAED,GAAG,CAAC,WAAW,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Primitive: Pressable
|
|
3
|
+
*
|
|
4
|
+
* A touchable primitive with theme-aware styling and full accessibility.
|
|
5
|
+
* Wraps React Native's Pressable. Uses the render prop's `pressed` state to
|
|
6
|
+
* apply a pressed visual style (opacity by default, or a `pressedStyle`
|
|
7
|
+
* override) without re-mounting or nesting child pressables.
|
|
8
|
+
*
|
|
9
|
+
* Supports disabled state (visual + accessibility) and forwards all
|
|
10
|
+
* Pressable props.
|
|
11
|
+
*/
|
|
12
|
+
import type { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
13
|
+
import type { Spacing } from '../design-tokens/spacing';
|
|
14
|
+
import type { BorderRadius } from '../design-tokens/border-radius';
|
|
15
|
+
export interface PressablePrimitiveProps extends Omit<PressableProps, 'style'> {
|
|
16
|
+
p?: Spacing;
|
|
17
|
+
px?: Spacing;
|
|
18
|
+
py?: Spacing;
|
|
19
|
+
bg?: keyof import('../theme/types').ThemeColors;
|
|
20
|
+
borderRadius?: BorderRadius;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Extra style applied while the pressable is pressed. */
|
|
23
|
+
pressedStyle?: StyleProp<ViewStyle>;
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
}
|
|
26
|
+
export declare function PressablePrimitive({ p, px, py, bg, borderRadius: radius, disabled, pressedStyle, style, children, onPress, onLongPress, onPressIn, onPressOut, ...rest }: PressablePrimitiveProps): import("react").JSX.Element;
|
|
27
|
+
export declare namespace PressablePrimitive {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../src/primitives/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;IAC5E,CAAC,CAAC,EAAE,OAAO,CAAC;IACZ,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,OAAO,gBAAgB,EAAE,WAAW,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AASD,wBAAgB,kBAAkB,CAAC,EACjC,CAAC,EACD,EAAE,EACF,EAAE,EACF,EAAE,EACF,YAAY,EAAE,MAAM,EACpB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,SAAS,EACT,UAAU,EACV,GAAG,IAAI,EACR,EAAE,uBAAuB,+BA+CzB;yBA9De,kBAAkB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PressablePrimitive = PressablePrimitive;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
* ANAN-UI — Primitive: Pressable
|
|
7
|
+
*
|
|
8
|
+
* A touchable primitive with theme-aware styling and full accessibility.
|
|
9
|
+
* Wraps React Native's Pressable. Uses the render prop's `pressed` state to
|
|
10
|
+
* apply a pressed visual style (opacity by default, or a `pressedStyle`
|
|
11
|
+
* override) without re-mounting or nesting child pressables.
|
|
12
|
+
*
|
|
13
|
+
* Supports disabled state (visual + accessibility) and forwards all
|
|
14
|
+
* Pressable props.
|
|
15
|
+
*/
|
|
16
|
+
const react_native_1 = require("react-native");
|
|
17
|
+
const theme_1 = require("../theme");
|
|
18
|
+
const cn_1 = require("../utils/cn");
|
|
19
|
+
const baseStyles = react_native_1.StyleSheet.create({
|
|
20
|
+
root: {},
|
|
21
|
+
pressed: {
|
|
22
|
+
opacity: 0.75,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
function PressablePrimitive({ p, px, py, bg, borderRadius: radius, disabled, pressedStyle, style, children, onPress, onLongPress, onPressIn, onPressOut, ...rest }) {
|
|
26
|
+
const { theme } = (0, theme_1.useTheme)();
|
|
27
|
+
const paddingStyle = {};
|
|
28
|
+
if (p !== undefined) {
|
|
29
|
+
paddingStyle.padding = theme.spacing.scale[p];
|
|
30
|
+
}
|
|
31
|
+
if (px !== undefined) {
|
|
32
|
+
paddingStyle.paddingHorizontal = theme.spacing.scale[px];
|
|
33
|
+
}
|
|
34
|
+
if (py !== undefined) {
|
|
35
|
+
paddingStyle.paddingVertical = theme.spacing.scale[py];
|
|
36
|
+
}
|
|
37
|
+
const backgroundStyle = {};
|
|
38
|
+
if (bg !== undefined) {
|
|
39
|
+
backgroundStyle.backgroundColor = theme.colors[bg];
|
|
40
|
+
}
|
|
41
|
+
const radiusStyle = {};
|
|
42
|
+
if (radius !== undefined) {
|
|
43
|
+
radiusStyle.borderRadius = theme.borderRadius.scale[radius];
|
|
44
|
+
}
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { disabled: disabled, onPress: disabled ? undefined : onPress, onLongPress: disabled ? undefined : onLongPress, onPressIn: disabled ? undefined : onPressIn, onPressOut: disabled ? undefined : onPressOut, style: ({ pressed }) => (0, cn_1.cn)(baseStyles.root, paddingStyle, backgroundStyle, radiusStyle, disabled ? { opacity: 0.5 } : {}, pressed ? (pressedStyle ?? baseStyles.pressed) : {}, style), ...rest, children: children }));
|
|
46
|
+
}
|
|
47
|
+
PressablePrimitive.displayName = 'Pressable';
|
|
48
|
+
//# sourceMappingURL=Pressable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.js","s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AAC;QACzB,WAAW,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,CACL,uBAAC,wBAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EACvC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAC/C,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAC3C,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAC7C,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CACrB,IAAA,OAAE,EACA,UAAU,CAAC,IAAI,EACf,YAAY,EACZ,eAAe,EACf,WAAW,EACX,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAChC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EACnD,KAAK,CACN,KAEC,IAAI,YAEP,QAAQ,GACC,CACb,CAAC;AACJ,CAAC;AAED,kBAAkB,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Primitive: Text
|
|
3
|
+
*
|
|
4
|
+
* A text primitive with theme-aware typography tokens.
|
|
5
|
+
* Supports color, fontSize, fontWeight, lineHeight, and text alignment.
|
|
6
|
+
*/
|
|
7
|
+
import type { TextProps, StyleProp, TextStyle } from 'react-native';
|
|
8
|
+
import type { FontSize } from '../design-tokens/typography';
|
|
9
|
+
import type { FontWeight } from '../design-tokens/typography';
|
|
10
|
+
import type { LineHeight } from '../design-tokens/typography';
|
|
11
|
+
export interface TextPrimitiveProps extends TextProps {
|
|
12
|
+
color?: keyof import('../theme/types').ThemeColors;
|
|
13
|
+
fontSize?: FontSize;
|
|
14
|
+
fontWeight?: FontWeight;
|
|
15
|
+
lineHeight?: LineHeight;
|
|
16
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
17
|
+
style?: StyleProp<TextStyle>;
|
|
18
|
+
}
|
|
19
|
+
export declare function TextPrimitive({ color, fontSize: size, fontWeight: weight, lineHeight: height, align, style, children, ...rest }: TextPrimitiveProps): import("react").JSX.Element;
|
|
20
|
+
export declare namespace TextPrimitive {
|
|
21
|
+
var displayName: string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,KAAK,CAAC,EAAE,MAAM,OAAO,gBAAgB,EAAE,WAAW,CAAC;IACnD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAMD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,kBAAkB,+BA4CpB;yBArDe,aAAa"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextPrimitive = TextPrimitive;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
/**
|
|
6
|
+
* ANAN-UI — Primitive: Text
|
|
7
|
+
*
|
|
8
|
+
* A text primitive with theme-aware typography tokens.
|
|
9
|
+
* Supports color, fontSize, fontWeight, lineHeight, and text alignment.
|
|
10
|
+
*/
|
|
11
|
+
const react_native_1 = require("react-native");
|
|
12
|
+
const theme_1 = require("../theme");
|
|
13
|
+
const cn_1 = require("../utils/cn");
|
|
14
|
+
const baseStyles = react_native_1.StyleSheet.create({
|
|
15
|
+
root: {},
|
|
16
|
+
});
|
|
17
|
+
function TextPrimitive({ color, fontSize: size, fontWeight: weight, lineHeight: height, align, style, children, ...rest }) {
|
|
18
|
+
const { theme } = (0, theme_1.useTheme)();
|
|
19
|
+
const colorStyle = {};
|
|
20
|
+
if (color !== undefined) {
|
|
21
|
+
colorStyle.color = theme.colors[color];
|
|
22
|
+
}
|
|
23
|
+
const sizeStyle = {};
|
|
24
|
+
if (size !== undefined) {
|
|
25
|
+
sizeStyle.fontSize = theme.typography.fontSize[size];
|
|
26
|
+
}
|
|
27
|
+
const weightStyle = {};
|
|
28
|
+
if (weight !== undefined) {
|
|
29
|
+
weightStyle.fontWeight = theme.typography.fontWeight[weight];
|
|
30
|
+
}
|
|
31
|
+
const heightStyle = {};
|
|
32
|
+
if (height !== undefined) {
|
|
33
|
+
heightStyle.lineHeight = theme.typography.lineHeight[height];
|
|
34
|
+
}
|
|
35
|
+
const alignStyle = {};
|
|
36
|
+
if (align !== undefined) {
|
|
37
|
+
alignStyle.textAlign = align;
|
|
38
|
+
}
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { ...rest, style: (0, cn_1.cn)(baseStyles.root, colorStyle, sizeStyle, weightStyle, heightStyle, alignStyle, style), children: children }));
|
|
40
|
+
}
|
|
41
|
+
TextPrimitive.displayName = 'Text';
|
|
42
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../src/primitives/Text.tsx"],"names":[],"mappings":";;AA4BA,sCAqDC;;AAjFD;;;;;GAKG;AAEH,+CAAgD;AAEhD,oCAAoC;AACpC,oCAAiC;AAcjC,MAAM,UAAU,GAAG,yBAAU,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,EAAE;CACT,CAAC,CAAC;AAEH,SAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACY;IACnB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAE7B,MAAM,UAAU,GAAc,EAAE,CAAC;IACjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,SAAS,GAAc,EAAE,CAAC;IAChC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,SAAS,CAAC,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,WAAW,GAAc,EAAE,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,WAAW,GAAc,EAAE,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,WAAW,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,UAAU,GAAc,EAAE,CAAC;IACjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,OAAO,CACL,uBAAC,mBAAI,OACC,IAAI,EACR,KAAK,EAAE,IAAA,OAAE,EACP,UAAU,CAAC,IAAI,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,KAAK,CACN,YAEA,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Primitive: Barrel Export
|
|
3
|
+
*/
|
|
4
|
+
export { Box } from './Box';
|
|
5
|
+
export { TextPrimitive } from './Text';
|
|
6
|
+
export { PressablePrimitive as Pressable } from './Pressable';
|
|
7
|
+
export type { BoxProps } from './Box';
|
|
8
|
+
export type { TextPrimitiveProps } from './Text';
|
|
9
|
+
export type { PressablePrimitiveProps as PressableProps } from './Pressable';
|
|
10
|
+
/** @deprecated The primitive `Text` is now exported as `TextPrimitive`; the public `Text` component lives in `components/text`. */
|
|
11
|
+
export { TextPrimitive as Text } from './Text';
|
|
12
|
+
/** @deprecated Use `TextPrimitiveProps`; the public `TextProps` belongs to the `Text` component. */
|
|
13
|
+
export type { TextPrimitiveProps as TextProps } from './Text';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAC9D,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,YAAY,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,YAAY,EAAE,uBAAuB,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7E,mIAAmI;AACnI,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC/C,oGAAoG;AACpG,YAAY,EAAE,kBAAkB,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Primitive: Barrel Export
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Text = exports.Pressable = exports.TextPrimitive = exports.Box = void 0;
|
|
7
|
+
var Box_1 = require("./Box");
|
|
8
|
+
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return Box_1.Box; } });
|
|
9
|
+
var Text_1 = require("./Text");
|
|
10
|
+
Object.defineProperty(exports, "TextPrimitive", { enumerable: true, get: function () { return Text_1.TextPrimitive; } });
|
|
11
|
+
var Pressable_1 = require("./Pressable");
|
|
12
|
+
Object.defineProperty(exports, "Pressable", { enumerable: true, get: function () { return Pressable_1.PressablePrimitive; } });
|
|
13
|
+
/** @deprecated The primitive `Text` is now exported as `TextPrimitive`; the public `Text` component lives in `components/text`. */
|
|
14
|
+
var Text_2 = require("./Text");
|
|
15
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_2.TextPrimitive; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,+BAAuC;AAA9B,qGAAA,aAAa,OAAA;AACtB,yCAA8D;AAArD,sGAAA,kBAAkB,OAAa;AAKxC,mIAAmI;AACnI,+BAA+C;AAAtC,4FAAA,aAAa,OAAQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Theme: ThemeContext
|
|
3
|
+
*
|
|
4
|
+
* React Context holding the active theme. Provided by ThemeProvider.
|
|
5
|
+
*/
|
|
6
|
+
import type { Theme, ThemeContextValue } from './types';
|
|
7
|
+
export declare const ThemeContext: import("react").Context<ThemeContextValue | undefined>;
|
|
8
|
+
export declare function useTheme(): ThemeContextValue;
|
|
9
|
+
export type { Theme, ThemeContextValue };
|
|
10
|
+
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAExD,eAAO,MAAM,YAAY,wDAA0D,CAAC;AAEpF,wBAAgB,QAAQ,IAAI,iBAAiB,CAM5C;AAED,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ANAN-UI — Theme: ThemeContext
|
|
4
|
+
*
|
|
5
|
+
* React Context holding the active theme. Provided by ThemeProvider.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ThemeContext = void 0;
|
|
9
|
+
exports.useTheme = useTheme;
|
|
10
|
+
const react_1 = require("react");
|
|
11
|
+
exports.ThemeContext = (0, react_1.createContext)(undefined);
|
|
12
|
+
function useTheme() {
|
|
13
|
+
const context = (0, react_1.useContext)(exports.ThemeContext);
|
|
14
|
+
if (context === undefined) {
|
|
15
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ThemeContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeContext.js","sourceRoot":"","sources":["../../src/theme/ThemeContext.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,4BAMC;AAXD,iCAAkD;AAGrC,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAgC,SAAS,CAAC,CAAC;AAEpF,SAAgB,QAAQ;IACtB,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC;IACzC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Theme: ThemeProvider
|
|
3
|
+
*
|
|
4
|
+
* Provides theme context to the component tree. Supports light, dark, and
|
|
5
|
+
* custom themes. Reads the system color scheme via React Native Appearance.
|
|
6
|
+
*/
|
|
7
|
+
import type { ThemeName, ColorScheme, ThemeColors } from './types';
|
|
8
|
+
import type { CustomThemeOverride } from './themes';
|
|
9
|
+
type ThemeDefinition = {
|
|
10
|
+
name: ThemeName;
|
|
11
|
+
colorScheme: ColorScheme;
|
|
12
|
+
colors: ThemeColors;
|
|
13
|
+
};
|
|
14
|
+
declare const THEME_DEFINITIONS: Record<ThemeName, ThemeDefinition>;
|
|
15
|
+
interface ThemeProviderProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
defaultTheme?: ThemeName;
|
|
18
|
+
customThemeOverride?: CustomThemeOverride;
|
|
19
|
+
}
|
|
20
|
+
export declare function ThemeProvider({ children, defaultTheme, customThemeOverride, }: ThemeProviderProps): import("react").JSX.Element;
|
|
21
|
+
export type { ThemeProviderProps };
|
|
22
|
+
export { THEME_DEFINITIONS };
|
|
23
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAGV,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA4BpD,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAC,SAAS,EAAE,eAAe,CAGzD,CAAC;AAoCF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAsB,EACtB,mBAAmB,GACpB,EAAE,kBAAkB,+BA+CpB;AAED,YAAY,EAAE,kBAAkB,EAAE,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.THEME_DEFINITIONS = void 0;
|
|
4
|
+
exports.ThemeProvider = ThemeProvider;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/**
|
|
7
|
+
* ANAN-UI — Theme: ThemeProvider
|
|
8
|
+
*
|
|
9
|
+
* Provides theme context to the component tree. Supports light, dark, and
|
|
10
|
+
* custom themes. Reads the system color scheme via React Native Appearance.
|
|
11
|
+
*/
|
|
12
|
+
const react_1 = require("react");
|
|
13
|
+
const react_native_1 = require("react-native");
|
|
14
|
+
const ThemeContext_1 = require("./ThemeContext");
|
|
15
|
+
const themes_1 = require("./themes");
|
|
16
|
+
const design_tokens_1 = require("../design-tokens");
|
|
17
|
+
const THEME_DEFINITIONS = {
|
|
18
|
+
light: themes_1.lightTheme,
|
|
19
|
+
dark: themes_1.darkTheme,
|
|
20
|
+
};
|
|
21
|
+
exports.THEME_DEFINITIONS = THEME_DEFINITIONS;
|
|
22
|
+
function buildThemeObject(def) {
|
|
23
|
+
return {
|
|
24
|
+
name: def.name,
|
|
25
|
+
colorScheme: def.colorScheme,
|
|
26
|
+
colors: def.colors,
|
|
27
|
+
typography: {
|
|
28
|
+
fontFamily: design_tokens_1.fontFamily,
|
|
29
|
+
fontSize: design_tokens_1.fontSize,
|
|
30
|
+
fontWeight: design_tokens_1.fontWeight,
|
|
31
|
+
lineHeight: design_tokens_1.lineHeight,
|
|
32
|
+
letterSpacing: design_tokens_1.letterSpacing,
|
|
33
|
+
},
|
|
34
|
+
spacing: {
|
|
35
|
+
scale: design_tokens_1.spacing,
|
|
36
|
+
},
|
|
37
|
+
borderRadius: {
|
|
38
|
+
scale: design_tokens_1.borderRadius,
|
|
39
|
+
},
|
|
40
|
+
shadows: {
|
|
41
|
+
keys: design_tokens_1.shadow,
|
|
42
|
+
resolve: (key) => {
|
|
43
|
+
return { ...design_tokens_1.shadow[key] };
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
elevation: {
|
|
47
|
+
scale: design_tokens_1.elevation,
|
|
48
|
+
},
|
|
49
|
+
animation: {
|
|
50
|
+
duration: design_tokens_1.animation.duration,
|
|
51
|
+
easing: design_tokens_1.animation.easing,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function ThemeProvider({ children, defaultTheme = 'light', customThemeOverride, }) {
|
|
56
|
+
const rnScheme = (0, react_native_1.useColorScheme)();
|
|
57
|
+
const systemTheme = rnScheme === 'dark' ? 'dark' : 'light';
|
|
58
|
+
const [storedTheme, setStoredTheme] = (0, react_1.useState)(defaultTheme);
|
|
59
|
+
const [explicitTheme, setExplicitTheme] = (0, react_1.useState)(undefined);
|
|
60
|
+
const themeName = explicitTheme ?? storedTheme;
|
|
61
|
+
const baseTheme = THEME_DEFINITIONS[themeName];
|
|
62
|
+
const theme = (0, react_1.useMemo)(() => {
|
|
63
|
+
const built = buildThemeObject(baseTheme);
|
|
64
|
+
if (customThemeOverride) {
|
|
65
|
+
built.colors = { ...built.colors, ...customThemeOverride };
|
|
66
|
+
}
|
|
67
|
+
return built;
|
|
68
|
+
}, [baseTheme, customThemeOverride]);
|
|
69
|
+
const setTheme = (0, react_1.useCallback)((next) => {
|
|
70
|
+
setExplicitTheme(next);
|
|
71
|
+
setStoredTheme(next);
|
|
72
|
+
}, []);
|
|
73
|
+
const toggleTheme = (0, react_1.useCallback)(() => {
|
|
74
|
+
const next = themeName === 'light' ? 'dark' : 'light';
|
|
75
|
+
setExplicitTheme(next);
|
|
76
|
+
setStoredTheme(next);
|
|
77
|
+
}, [themeName]);
|
|
78
|
+
const value = (0, react_1.useMemo)(() => ({
|
|
79
|
+
theme,
|
|
80
|
+
setTheme,
|
|
81
|
+
toggleTheme,
|
|
82
|
+
colorScheme: theme.colorScheme,
|
|
83
|
+
systemTheme,
|
|
84
|
+
}), [theme, setTheme, toggleTheme, systemTheme]);
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(ThemeContext_1.ThemeContext.Provider, { value: value, children: children }));
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=ThemeProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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KAAK,CAAC,WAAW;QAC9B,WAAW;KACZ,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAC5C,CAAC;IAEF,OAAO,CACL,uBAAC,2BAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CACxE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ANAN-UI — Theme: Barrel Export
|
|
3
|
+
*/
|
|
4
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
5
|
+
export { useTheme } from './useTheme';
|
|
6
|
+
export type { Theme, ThemeContextValue, ColorScheme, ThemeName, ThemeColors } from './types';
|
|
7
|
+
export { lightTheme, darkTheme } from './themes';
|
|
8
|
+
export type { CustomThemeOverride } from './themes';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|