@coze-arch/cli 0.0.10 → 0.0.11
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/lib/__templates__/expo/AGENTS.md +3 -3
- package/lib/__templates__/expo/README.md +3 -3
- package/lib/__templates__/expo/client/components/Provider.tsx +4 -1
- package/lib/__templates__/expo/client/components/Screen.tsx +4 -1
- package/lib/__templates__/expo/client/eslint.config.mjs +2 -0
- package/lib/__templates__/expo/client/global.css +1 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.animation.ts +178 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.constants.ts +62 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.md +437 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.styles.ts +95 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.tsx +340 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.types.ts +267 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.hooks.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.md +263 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.styles.ts +65 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.tsx +181 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.types.ts +99 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.utils.tsx +25 -0
- package/lib/__templates__/expo/client/heroui/components/alert/default-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/index.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/alert/success-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/warning-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.animation.ts +123 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.constants.ts +19 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.context.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.md +386 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.styles.ts +145 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.tsx +307 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.types.ts +239 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/index.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/person-icon.tsx +23 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.animation.ts +42 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.md +349 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.styles.ts +66 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.tsx +351 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.types.ts +150 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/index.ts +16 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.md +381 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.styles.ts +89 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.tsx +284 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.types.ts +175 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.utils.ts +34 -0
- package/lib/__templates__/expo/client/heroui/components/button/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.constants.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.md +186 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.styles.ts +35 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.tsx +153 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/card/index.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.animation.ts +202 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.md +311 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.styles.ts +105 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.tsx +251 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.types.ts +216 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.md +190 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.styles.ts +234 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.tsx +125 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.types.ts +69 -0
- package/lib/__templates__/expo/client/heroui/components/chip/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.md +109 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.styles.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.tsx +57 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.types.ts +30 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/index.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.context.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.md +241 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.styles.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.tsx +245 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.types.ts +67 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/index.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.animation.ts +53 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.constants.ts +30 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.md +129 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.styles.ts +25 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.tsx +81 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/description/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.animation.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.md +288 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.styles.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.tsx +379 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.types.ts +199 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/index.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.animation.ts +50 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.constants.ts +31 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.md +204 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.styles.ts +23 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.tsx +91 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.types.ts +79 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/input/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.md +193 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.styles.ts +51 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.tsx +96 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.types.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.animation.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.md +197 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.styles.ts +31 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.tsx +239 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.types.ts +98 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.animation.ts +199 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.constants.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.md +376 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.styles.ts +68 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.tsx +414 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.types.ts +275 -0
- package/lib/__templates__/expo/client/heroui/components/label/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.md +187 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.styles.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.tsx +172 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.types.ts +86 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.constants.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.md +387 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.styles.ts +40 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.tsx +206 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.types.ts +132 -0
- package/lib/__templates__/expo/client/heroui/components/menu/index.ts +38 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.animation.ts +121 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.constants.ts +37 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.md +620 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.styles.ts +107 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.tsx +664 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.types.ts +394 -0
- package/lib/__templates__/expo/client/heroui/components/popover/arrow-svg.tsx +180 -0
- package/lib/__templates__/expo/client/heroui/components/popover/index.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.animation.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.constants.ts +34 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.md +508 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.styles.ts +98 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.tsx +624 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.types.ts +290 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.animation.ts +450 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.constants.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.md +328 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.styles.ts +84 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.tsx +330 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.types.ts +386 -0
- package/lib/__templates__/expo/client/heroui/components/radio/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.animation.ts +92 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.constants.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.md +339 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.styles.ts +80 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.tsx +217 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.types.ts +106 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.animation.ts +20 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.context.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.md +273 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.styles.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.tsx +220 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.types.ts +64 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.animation.ts +132 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.constants.ts +21 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.md +206 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.styles.ts +52 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.tsx +262 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.types.ts +121 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.md +231 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.styles.ts +35 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.tsx +253 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.types.ts +160 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-icon.tsx +37 -0
- package/lib/__templates__/expo/client/heroui/components/select/index.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.animation.ts +92 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.constants.ts +53 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.md +796 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.styles.ts +149 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.tsx +828 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.types.ts +438 -0
- package/lib/__templates__/expo/client/heroui/components/separator/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.md +106 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.styles.ts +50 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.tsx +62 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.types.ts +40 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/linear-gradient.tsx +45 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.animation.ts +351 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.constants.ts +39 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.md +208 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.styles.ts +49 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.tsx +183 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.types.ts +191 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.md +247 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.tsx +94 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.types.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/slider/index.ts +23 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.animation.ts +87 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.constants.ts +24 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.md +348 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.styles.ts +85 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.tsx +413 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.types.ts +120 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/index.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner-icon.tsx +49 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.animation.ts +150 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.constants.ts +36 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.md +199 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.styles.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.tsx +198 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.types.ts +158 -0
- package/lib/__templates__/expo/client/heroui/components/surface/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.md +136 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.styles.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.tsx +66 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.types.ts +46 -0
- package/lib/__templates__/expo/client/heroui/components/switch/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.animation.ts +243 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.constants.ts +26 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.md +334 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.styles.ts +83 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.tsx +280 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.types.ts +208 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.animation.ts +246 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.constants.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.context.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.md +565 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.styles.ts +168 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.tsx +445 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.types.ts +341 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/index.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.animation.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.md +404 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.styles.ts +74 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.tsx +325 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.types.ts +125 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.md +133 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.tsx +44 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.types.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.animation.ts +20 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.md +256 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.tsx +82 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.types.ts +56 -0
- package/lib/__templates__/expo/client/heroui/components/toast/index.ts +4 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.animation.ts +381 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.hooks.ts +73 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.md +420 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.styles.ts +89 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.tsx +472 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.types.ts +320 -0
- package/lib/__templates__/expo/client/heroui/docs.md +47 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/use-is-on-surface.ts +8 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/use-theme-color.ts +137 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/cn.ts +12 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/color-kit/index.ts +2395 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/color-kit/types.ts +212 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/animated-check-icon.tsx +78 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/bottom-sheet-content-container.tsx +97 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/bottom-sheet-content.tsx +158 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/check-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/chevron-down-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/chevron-right-icon.tsx +29 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/close-icon.tsx +29 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/full-window-overlay.tsx +48 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/hero-text.tsx +71 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/animation-settings-context.ts +19 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/bottom-sheet-is-dragging-context.ts +11 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/form-field-context.ts +36 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/index.ts +14 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-augmented-ref.ts +32 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-bottom-sheet-aware-handlers.ts +94 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-bottom-sheet-gesture-handlers.ts +52 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-combined-animation-disabled-state.ts +49 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-controllable-state.ts +124 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-dev-info.ts +38 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-keyboard-status.ts +22 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-bottom-sheet-content-animation.ts +67 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-dialog-content-animation.ts +296 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-overlay-animation.ts +91 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-popover-content-animation.ts +199 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-root-animation.ts +26 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-relative-position.ts +353 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-resolved-style-property.ts +118 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/animation.ts +131 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/bottom-sheet.ts +99 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/index.ts +5 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/misc.ts +10 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/primitives.ts +146 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/theme.ts +18 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/animation.ts +266 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/children-to-string.ts +117 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/combine-styles.ts +17 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/create-context.ts +60 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/ease-gradient/create-interpolation.ts +35 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/ease-gradient/index.ts +97 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/get-element-by-display-name.ts +15 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/get-element-with-default.ts +17 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/has-prop.ts +18 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/index.tsx +51 -0
- package/lib/__templates__/expo/client/heroui/primitives/README.md +27 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.tsx +270 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.types.ts +117 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.utils.ts +12 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/activity-indicator.tsx +50 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/activity-indicator.types.ts +24 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/alert.tsx +124 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/alert.types.ts +87 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.tsx +171 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.types.ts +62 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.utils.ts +102 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/bottom-sheet.tsx +235 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/bottom-sheet.types.ts +127 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/checkbox.tsx +119 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/checkbox.types.ts +37 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/dialog.tsx +274 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/dialog.types.ts +129 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.tsx +431 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.types.ts +169 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.utils.ts +31 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/label.tsx +24 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/label.types.ts +39 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/menu.tsx +765 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/menu.types.ts +401 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/popover.tsx +382 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/popover.types.ts +201 -0
- package/lib/__templates__/expo/client/heroui/primitives/portal/index.ts +1 -0
- package/lib/__templates__/expo/client/heroui/primitives/portal/portal.tsx +126 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/radio.tsx +133 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/radio.types.ts +47 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/radio-group.tsx +114 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/radio-group.types.ts +65 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.tsx +705 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.types.ts +409 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.utils.ts +35 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.tsx +464 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.types.ts +208 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.utils.ts +93 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/index.ts +1 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/slot.tsx +122 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/types.ts +19 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/utils.ts +96 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/switch.tsx +61 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/switch.types.ts +55 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/tabs.tsx +202 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/tabs.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/tag-group.tsx +324 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/tag-group.types.ts +119 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/toast.tsx +138 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/toast.types.ts +86 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/provider.tsx +47 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/types.ts +27 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/provider.tsx +67 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/types.ts +114 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/provider.tsx +50 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/types.ts +39 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/provider.tsx +9 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/types.ts +52 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/insets-container.tsx +87 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/provider.tsx +431 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/reducer.ts +34 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/toast-config.context.ts +27 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/toast-item-renderer.tsx +45 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/types.ts +373 -0
- package/lib/__templates__/expo/client/heroui/styles/index.css +3 -0
- package/lib/__templates__/expo/client/heroui/styles/theme.css +112 -0
- package/lib/__templates__/expo/client/heroui/styles/utilities.css +8 -0
- package/lib/__templates__/expo/client/heroui/styles/variables.css +146 -0
- package/lib/__templates__/expo/client/package.json +4 -1
- package/lib/__templates__/expo/package.json +1 -1
- package/lib/__templates__/expo/pnpm-lock.yaml +68 -0
- package/lib/__templates__/nextjs/AGENTS.md +6 -4
- package/lib/__templates__/nextjs/eslint.config.mjs +9 -0
- package/lib/__templates__/taro/.coze +2 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +1 -2
- package/lib/__templates__/taro/config/index.ts +1 -1
- package/lib/__templates__/taro/package.json +1 -0
- package/lib/__templates__/taro/project.config.json +1 -1
- package/lib/cli.js +246 -252
- package/package.json +3 -2
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { forwardRef, useMemo } from 'react';
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
|
+
import { useThemeColor } from '../../helpers/external/hooks';
|
|
4
|
+
import { colorKit } from '../../helpers/external/utils';
|
|
5
|
+
import { HeroText } from '../../helpers/internal/components';
|
|
6
|
+
import type { PressableRef } from '../../helpers/internal/types';
|
|
7
|
+
import { childrenToString, createContext } from '../../helpers/internal/utils';
|
|
8
|
+
import {
|
|
9
|
+
PressableFeedback,
|
|
10
|
+
type PressableFeedbackHighlightAnimation,
|
|
11
|
+
type PressableFeedbackRippleAnimation,
|
|
12
|
+
type PressableFeedbackScaleAnimation,
|
|
13
|
+
} from '../pressable-feedback';
|
|
14
|
+
import { DISPLAY_NAME } from './button.constants';
|
|
15
|
+
import { buttonClassNames, buttonStyleSheet } from './button.styles';
|
|
16
|
+
import type {
|
|
17
|
+
ButtonContextValue,
|
|
18
|
+
ButtonLabelProps,
|
|
19
|
+
ButtonRootProps,
|
|
20
|
+
} from './button.types';
|
|
21
|
+
import { isAnimationDisabled, resolveAnimationObject } from './button.utils';
|
|
22
|
+
|
|
23
|
+
const [ButtonProvider, useButton] = createContext<ButtonContextValue>({
|
|
24
|
+
name: 'ButtonContext',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// --------------------------------------------------
|
|
28
|
+
|
|
29
|
+
const ButtonRoot = forwardRef<PressableRef, ButtonRootProps>((props, ref) => {
|
|
30
|
+
const {
|
|
31
|
+
children,
|
|
32
|
+
variant = 'primary',
|
|
33
|
+
feedbackVariant = 'scale-highlight',
|
|
34
|
+
animation,
|
|
35
|
+
size = 'md',
|
|
36
|
+
isIconOnly = false,
|
|
37
|
+
isDisabled = false,
|
|
38
|
+
className,
|
|
39
|
+
style,
|
|
40
|
+
accessibilityRole = 'button',
|
|
41
|
+
...restProps
|
|
42
|
+
} = props;
|
|
43
|
+
|
|
44
|
+
const [
|
|
45
|
+
themeColorAccentHover,
|
|
46
|
+
themeColorDefaultHover,
|
|
47
|
+
themeColorDangerHover,
|
|
48
|
+
themeColorDangerSoftHover,
|
|
49
|
+
] = useThemeColor([
|
|
50
|
+
'accent-hover',
|
|
51
|
+
'default-hover',
|
|
52
|
+
'danger-hover',
|
|
53
|
+
'danger-soft-hover',
|
|
54
|
+
]);
|
|
55
|
+
|
|
56
|
+
const stringifiedChildren = childrenToString(children);
|
|
57
|
+
|
|
58
|
+
const rootClassName = buttonClassNames.root({
|
|
59
|
+
variant,
|
|
60
|
+
size,
|
|
61
|
+
isIconOnly,
|
|
62
|
+
isDisabled,
|
|
63
|
+
className,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const resolvedAnimation = resolveAnimationObject(animation);
|
|
67
|
+
const allAnimationsDisabled = isAnimationDisabled(animation);
|
|
68
|
+
|
|
69
|
+
const highlightColorMap = useMemo(() => {
|
|
70
|
+
switch (variant) {
|
|
71
|
+
case 'primary':
|
|
72
|
+
return themeColorAccentHover;
|
|
73
|
+
case 'secondary':
|
|
74
|
+
return themeColorDefaultHover;
|
|
75
|
+
case 'tertiary':
|
|
76
|
+
return themeColorDefaultHover;
|
|
77
|
+
case 'outline':
|
|
78
|
+
return colorKit.setAlpha(themeColorDefaultHover, 0.3).hex();
|
|
79
|
+
case 'ghost':
|
|
80
|
+
return colorKit.setAlpha(themeColorDefaultHover, 0.3).hex();
|
|
81
|
+
case 'danger':
|
|
82
|
+
return themeColorDangerHover;
|
|
83
|
+
case 'danger-soft':
|
|
84
|
+
return themeColorDangerSoftHover;
|
|
85
|
+
}
|
|
86
|
+
}, [
|
|
87
|
+
variant,
|
|
88
|
+
themeColorAccentHover,
|
|
89
|
+
themeColorDefaultHover,
|
|
90
|
+
themeColorDangerHover,
|
|
91
|
+
themeColorDangerSoftHover,
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
const highlightAnimationConfig = useMemo(() => {
|
|
95
|
+
if (feedbackVariant !== 'scale-highlight') {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const highlightAnimation = resolvedAnimation?.highlight as
|
|
100
|
+
| PressableFeedbackHighlightAnimation
|
|
101
|
+
| undefined;
|
|
102
|
+
|
|
103
|
+
if (highlightAnimation === false || highlightAnimation === 'disabled') {
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const defaultConfig = {
|
|
108
|
+
backgroundColor: {
|
|
109
|
+
value: highlightColorMap,
|
|
110
|
+
},
|
|
111
|
+
opacity: {
|
|
112
|
+
value: [0, 1] as [number, number],
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
if (typeof highlightAnimation === 'object' && highlightAnimation !== null) {
|
|
117
|
+
return {
|
|
118
|
+
backgroundColor: {
|
|
119
|
+
...defaultConfig.backgroundColor,
|
|
120
|
+
...(highlightAnimation.backgroundColor ?? {}),
|
|
121
|
+
},
|
|
122
|
+
opacity: {
|
|
123
|
+
...defaultConfig.opacity,
|
|
124
|
+
...(highlightAnimation.opacity ?? {}),
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return defaultConfig;
|
|
130
|
+
}, [feedbackVariant, highlightColorMap, resolvedAnimation?.highlight]);
|
|
131
|
+
|
|
132
|
+
const rippleAnimationConfig = useMemo(() => {
|
|
133
|
+
if (feedbackVariant !== 'scale-ripple') {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const rippleAnimation = resolvedAnimation?.ripple as
|
|
138
|
+
| PressableFeedbackRippleAnimation
|
|
139
|
+
| undefined;
|
|
140
|
+
|
|
141
|
+
if (rippleAnimation === false || rippleAnimation === 'disabled') {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const defaultConfig = {
|
|
146
|
+
backgroundColor: { value: highlightColorMap },
|
|
147
|
+
opacity: { value: [0, 1, 0] as [number, number, number] },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
if (typeof rippleAnimation === 'object' && rippleAnimation !== null) {
|
|
151
|
+
return {
|
|
152
|
+
backgroundColor: {
|
|
153
|
+
...defaultConfig.backgroundColor,
|
|
154
|
+
...(rippleAnimation.backgroundColor ?? {}),
|
|
155
|
+
},
|
|
156
|
+
opacity: {
|
|
157
|
+
...defaultConfig.opacity,
|
|
158
|
+
...(rippleAnimation.opacity ?? {}),
|
|
159
|
+
},
|
|
160
|
+
...(rippleAnimation.scale !== undefined && {
|
|
161
|
+
scale: rippleAnimation.scale,
|
|
162
|
+
}),
|
|
163
|
+
...(rippleAnimation.progress !== undefined && {
|
|
164
|
+
progress: rippleAnimation.progress,
|
|
165
|
+
}),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return defaultConfig;
|
|
170
|
+
}, [feedbackVariant, highlightColorMap, resolvedAnimation?.ripple]);
|
|
171
|
+
|
|
172
|
+
const scaleAnimation = resolvedAnimation?.scale as
|
|
173
|
+
| PressableFeedbackScaleAnimation
|
|
174
|
+
| undefined;
|
|
175
|
+
|
|
176
|
+
const rootAnimation = useMemo(() => {
|
|
177
|
+
if (allAnimationsDisabled) {
|
|
178
|
+
return 'disable-all' as const;
|
|
179
|
+
}
|
|
180
|
+
if (feedbackVariant === 'none') {
|
|
181
|
+
return false as const;
|
|
182
|
+
}
|
|
183
|
+
if (scaleAnimation === false || scaleAnimation === 'disabled') {
|
|
184
|
+
return false as const;
|
|
185
|
+
}
|
|
186
|
+
if (typeof scaleAnimation === 'object' && scaleAnimation !== null) {
|
|
187
|
+
return { scale: scaleAnimation };
|
|
188
|
+
}
|
|
189
|
+
return undefined;
|
|
190
|
+
}, [allAnimationsDisabled, feedbackVariant, scaleAnimation]);
|
|
191
|
+
|
|
192
|
+
const contextValue = useMemo(
|
|
193
|
+
() => ({
|
|
194
|
+
size,
|
|
195
|
+
variant,
|
|
196
|
+
isDisabled,
|
|
197
|
+
}),
|
|
198
|
+
[size, variant, isDisabled]
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
const content = stringifiedChildren ? (
|
|
202
|
+
<ButtonLabel>{stringifiedChildren}</ButtonLabel>
|
|
203
|
+
) : (
|
|
204
|
+
children
|
|
205
|
+
);
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<ButtonProvider value={contextValue}>
|
|
209
|
+
<PressableFeedback
|
|
210
|
+
ref={ref}
|
|
211
|
+
isDisabled={isDisabled}
|
|
212
|
+
className={rootClassName}
|
|
213
|
+
style={
|
|
214
|
+
typeof style === 'function'
|
|
215
|
+
? (state) => [buttonStyleSheet.buttonRoot, style(state)]
|
|
216
|
+
: [buttonStyleSheet.buttonRoot, style]
|
|
217
|
+
}
|
|
218
|
+
accessibilityRole={accessibilityRole}
|
|
219
|
+
accessibilityState={{ disabled: isDisabled }}
|
|
220
|
+
animation={rootAnimation}
|
|
221
|
+
{...restProps}
|
|
222
|
+
>
|
|
223
|
+
{feedbackVariant === 'scale-highlight' &&
|
|
224
|
+
highlightAnimationConfig !== undefined && (
|
|
225
|
+
<PressableFeedback.Highlight animation={highlightAnimationConfig} />
|
|
226
|
+
)}
|
|
227
|
+
{feedbackVariant === 'scale-ripple' &&
|
|
228
|
+
rippleAnimationConfig !== undefined && (
|
|
229
|
+
<PressableFeedback.Ripple animation={rippleAnimationConfig} />
|
|
230
|
+
)}
|
|
231
|
+
{content}
|
|
232
|
+
</PressableFeedback>
|
|
233
|
+
</ButtonProvider>
|
|
234
|
+
);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// --------------------------------------------------
|
|
238
|
+
|
|
239
|
+
const ButtonLabel = forwardRef<RNText, ButtonLabelProps>((props, ref) => {
|
|
240
|
+
const { children, className, ...restProps } = props;
|
|
241
|
+
|
|
242
|
+
const { size, variant } = useButton();
|
|
243
|
+
|
|
244
|
+
const labelClassName = buttonClassNames.label({
|
|
245
|
+
size,
|
|
246
|
+
variant,
|
|
247
|
+
className,
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<HeroText ref={ref} className={labelClassName} {...restProps}>
|
|
252
|
+
{children}
|
|
253
|
+
</HeroText>
|
|
254
|
+
);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// --------------------------------------------------
|
|
258
|
+
|
|
259
|
+
ButtonRoot.displayName = DISPLAY_NAME.BUTTON_ROOT;
|
|
260
|
+
ButtonLabel.displayName = DISPLAY_NAME.BUTTON_LABEL;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Compound Button component with sub-components.
|
|
264
|
+
*
|
|
265
|
+
* @component Button - Main button container wrapping `PressableFeedback`. Handles press
|
|
266
|
+
* interactions, visual variants, and feedback animations. The `feedbackVariant` prop controls
|
|
267
|
+
* which effects are rendered (`scale-highlight`, `scale-ripple`, `scale`, or `none`), while the
|
|
268
|
+
* `animation` prop provides granular control over each sub-animation (scale, highlight, ripple).
|
|
269
|
+
* String children are automatically rendered as a label.
|
|
270
|
+
*
|
|
271
|
+
* @component Button.Label - Text content of the button. Inherits size and variant styling
|
|
272
|
+
* from the parent Button context.
|
|
273
|
+
*
|
|
274
|
+
* Props flow from Button to sub-components via context (size, variant, isDisabled).
|
|
275
|
+
*
|
|
276
|
+
* @see Full documentation: https://v3.heroui.com/docs/native/components/button
|
|
277
|
+
*/
|
|
278
|
+
const CompoundButton = Object.assign(ButtonRoot, {
|
|
279
|
+
/** Button label - renders text or custom content */
|
|
280
|
+
Label: ButtonLabel,
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
export { useButton };
|
|
284
|
+
export default CompoundButton;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import type { TextProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
AnimationRoot,
|
|
4
|
+
AnimationRootDisableAll,
|
|
5
|
+
} from '../../helpers/internal/types';
|
|
6
|
+
import type {
|
|
7
|
+
PressableFeedbackHighlightAnimation,
|
|
8
|
+
PressableFeedbackProps,
|
|
9
|
+
PressableFeedbackRippleAnimation,
|
|
10
|
+
PressableFeedbackScaleAnimation,
|
|
11
|
+
} from '../pressable-feedback';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Size variants for the Button component
|
|
15
|
+
*/
|
|
16
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Variant types for the Button component
|
|
20
|
+
*/
|
|
21
|
+
export type ButtonVariant =
|
|
22
|
+
| 'primary'
|
|
23
|
+
| 'secondary'
|
|
24
|
+
| 'tertiary'
|
|
25
|
+
| 'outline'
|
|
26
|
+
| 'ghost'
|
|
27
|
+
| 'danger'
|
|
28
|
+
| 'danger-soft';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Feedback variant that determines which PressableFeedback compound parts are rendered
|
|
32
|
+
*/
|
|
33
|
+
export type ButtonFeedbackVariant =
|
|
34
|
+
| 'scale-highlight'
|
|
35
|
+
| 'scale-ripple'
|
|
36
|
+
| 'scale'
|
|
37
|
+
| 'none';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Shared base props for the Button.Root component (common across all feedback variants)
|
|
41
|
+
*/
|
|
42
|
+
type ButtonRootPropsBase = Omit<PressableFeedbackProps, 'animation'> & {
|
|
43
|
+
/**
|
|
44
|
+
* Visual variant of the button
|
|
45
|
+
* @default 'primary'
|
|
46
|
+
*/
|
|
47
|
+
variant?: ButtonVariant;
|
|
48
|
+
/**
|
|
49
|
+
* Size of the button
|
|
50
|
+
* @default 'md'
|
|
51
|
+
*/
|
|
52
|
+
size?: ButtonSize;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the button displays an icon only (needed for correct layout)
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
isIconOnly?: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Props when feedbackVariant is 'scale-highlight' (default).
|
|
62
|
+
* Animation accepts scale and highlight configuration.
|
|
63
|
+
*/
|
|
64
|
+
export type ButtonRootPropsScaleHighlight = ButtonRootPropsBase & {
|
|
65
|
+
/**
|
|
66
|
+
* Feedback variant that renders Scale + Highlight compound parts
|
|
67
|
+
* @default 'scale-highlight'
|
|
68
|
+
*/
|
|
69
|
+
feedbackVariant?: 'scale-highlight';
|
|
70
|
+
/**
|
|
71
|
+
* Animation configuration for scale and highlight feedback
|
|
72
|
+
*/
|
|
73
|
+
animation?: AnimationRoot<{
|
|
74
|
+
/** Scale animation configuration */
|
|
75
|
+
scale?: PressableFeedbackScaleAnimation;
|
|
76
|
+
/** Highlight overlay configuration */
|
|
77
|
+
highlight?: PressableFeedbackHighlightAnimation;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Props when feedbackVariant is 'scale-ripple'.
|
|
83
|
+
* Animation accepts scale and ripple configuration.
|
|
84
|
+
*/
|
|
85
|
+
type ButtonRootPropsScaleRipple = ButtonRootPropsBase & {
|
|
86
|
+
/**
|
|
87
|
+
* Feedback variant that renders Scale + Ripple compound parts
|
|
88
|
+
*/
|
|
89
|
+
feedbackVariant: 'scale-ripple';
|
|
90
|
+
/**
|
|
91
|
+
* Animation configuration for scale and ripple feedback
|
|
92
|
+
*/
|
|
93
|
+
animation?: AnimationRoot<{
|
|
94
|
+
/** Scale animation configuration */
|
|
95
|
+
scale?: PressableFeedbackScaleAnimation;
|
|
96
|
+
/** Ripple overlay configuration */
|
|
97
|
+
ripple?: PressableFeedbackRippleAnimation;
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Props when feedbackVariant is 'scale'.
|
|
103
|
+
* Only the built-in scale animation is active — no highlight or ripple overlay is rendered.
|
|
104
|
+
*/
|
|
105
|
+
type ButtonRootPropsScale = ButtonRootPropsBase & {
|
|
106
|
+
/**
|
|
107
|
+
* Feedback variant that renders only the built-in scale animation (no highlight or ripple overlay)
|
|
108
|
+
*/
|
|
109
|
+
feedbackVariant: 'scale';
|
|
110
|
+
/**
|
|
111
|
+
* Animation configuration for scale-only feedback
|
|
112
|
+
*/
|
|
113
|
+
animation?: AnimationRoot<{
|
|
114
|
+
/** Scale animation configuration */
|
|
115
|
+
scale?: PressableFeedbackScaleAnimation;
|
|
116
|
+
}>;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Props when feedbackVariant is 'none'.
|
|
121
|
+
* All feedback effects are disabled — no scale, highlight, or ripple is rendered.
|
|
122
|
+
*/
|
|
123
|
+
type ButtonRootPropsNone = ButtonRootPropsBase & {
|
|
124
|
+
/**
|
|
125
|
+
* Feedback variant that disables all feedback effects (no scale, highlight, or ripple)
|
|
126
|
+
*/
|
|
127
|
+
feedbackVariant: 'none';
|
|
128
|
+
/**
|
|
129
|
+
* Only 'disable-all' is accepted when feedback is disabled
|
|
130
|
+
*/
|
|
131
|
+
animation?: AnimationRootDisableAll;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Props for the Button.Root component.
|
|
136
|
+
* Discriminated union based on `feedbackVariant` — the `animation` prop type
|
|
137
|
+
* is constrained to only the relevant sub-component configs for each variant.
|
|
138
|
+
*/
|
|
139
|
+
export type ButtonRootProps =
|
|
140
|
+
| ButtonRootPropsScaleHighlight
|
|
141
|
+
| ButtonRootPropsScaleRipple
|
|
142
|
+
| ButtonRootPropsScale
|
|
143
|
+
| ButtonRootPropsNone;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Props for the Button.Label component
|
|
147
|
+
*/
|
|
148
|
+
export interface ButtonLabelProps extends TextProps {
|
|
149
|
+
/**
|
|
150
|
+
* Content to be rendered as label
|
|
151
|
+
*/
|
|
152
|
+
children?: React.ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Additional CSS classes
|
|
155
|
+
*/
|
|
156
|
+
className?: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Context values shared between Button components
|
|
161
|
+
*/
|
|
162
|
+
export interface ButtonContextValue {
|
|
163
|
+
/**
|
|
164
|
+
* Size of the button
|
|
165
|
+
*/
|
|
166
|
+
size: ButtonSize;
|
|
167
|
+
/**
|
|
168
|
+
* Visual variant of the button
|
|
169
|
+
*/
|
|
170
|
+
variant: ButtonVariant;
|
|
171
|
+
/**
|
|
172
|
+
* Whether the button is disabled
|
|
173
|
+
*/
|
|
174
|
+
isDisabled: boolean;
|
|
175
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ButtonRootProps } from './button.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the animation prop into its object form.
|
|
5
|
+
* Returns `undefined` when the animation is a non-object value (boolean / string).
|
|
6
|
+
*/
|
|
7
|
+
export function resolveAnimationObject(
|
|
8
|
+
animation: ButtonRootProps['animation']
|
|
9
|
+
): Record<string, unknown> | undefined {
|
|
10
|
+
if (typeof animation === 'object' && animation !== null) {
|
|
11
|
+
return animation;
|
|
12
|
+
}
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Determines whether all animations should be disabled based on the animation prop value.
|
|
18
|
+
*/
|
|
19
|
+
export function isAnimationDisabled(
|
|
20
|
+
animation: ButtonRootProps['animation']
|
|
21
|
+
): boolean {
|
|
22
|
+
if (
|
|
23
|
+
animation === false ||
|
|
24
|
+
animation === 'disabled' ||
|
|
25
|
+
animation === 'disable-all'
|
|
26
|
+
) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (typeof animation === 'object' && animation !== null) {
|
|
30
|
+
const { state } = animation;
|
|
31
|
+
return state === false || state === 'disabled' || state === 'disable-all';
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display names for Card components
|
|
3
|
+
*/
|
|
4
|
+
export const DISPLAY_NAME = {
|
|
5
|
+
ROOT: 'HeroUINative.Card.Root',
|
|
6
|
+
HEADER: 'HeroUINative.Card.Header',
|
|
7
|
+
BODY: 'HeroUINative.Card.Body',
|
|
8
|
+
FOOTER: 'HeroUINative.Card.Footer',
|
|
9
|
+
TITLE: 'HeroUINative.Card.Title',
|
|
10
|
+
DESCRIPTION: 'HeroUINative.Card.Description',
|
|
11
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Card
|
|
2
|
+
|
|
3
|
+
Displays a card container with flexible layout sections for structured content.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Card } from '@/heroui';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Anatomy
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Card>
|
|
15
|
+
<Card.Header>...</Card.Header>
|
|
16
|
+
<Card.Body>
|
|
17
|
+
<Card.Title>...</Card.Title>
|
|
18
|
+
<Card.Description>...</Card.Description>
|
|
19
|
+
</Card.Body>
|
|
20
|
+
<Card.Footer>...</Card.Footer>
|
|
21
|
+
</Card>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- **Card**: Main container that extends Surface component. Provides base card structure with configurable surface variants and handles overall layout.
|
|
25
|
+
- **Card.Header**: Header section for top-aligned content like icons or badges.
|
|
26
|
+
- **Card.Body**: Main content area with flex-1 that expands to fill all available space between Card.Header and Card.Footer.
|
|
27
|
+
- **Card.Title**: Title text with foreground color and medium font weight.
|
|
28
|
+
- **Card.Description**: Description text with muted color and smaller font size.
|
|
29
|
+
- **Card.Footer**: Footer section for bottom-aligned actions like buttons.
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
### Basic Usage
|
|
34
|
+
|
|
35
|
+
The Card component creates a container with built-in sections for organized content.
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
<Card>
|
|
39
|
+
<Card.Body>...</Card.Body>
|
|
40
|
+
</Card>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### With Title and Description
|
|
44
|
+
|
|
45
|
+
Combine title and description components for structured text content.
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
<Card>
|
|
49
|
+
<Card.Body>
|
|
50
|
+
<Card.Title>...</Card.Title>
|
|
51
|
+
<Card.Description>...</Card.Description>
|
|
52
|
+
</Card.Body>
|
|
53
|
+
</Card>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Header and Footer
|
|
57
|
+
|
|
58
|
+
Add header and footer sections for icons, badges, or actions.
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
<Card>
|
|
62
|
+
<Card.Header>...</Card.Header>
|
|
63
|
+
<Card.Body>...</Card.Body>
|
|
64
|
+
<Card.Footer>...</Card.Footer>
|
|
65
|
+
</Card>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Variants
|
|
69
|
+
|
|
70
|
+
Control the card's background appearance using different variants.
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<Card variant="default">...</Card>
|
|
74
|
+
<Card variant="secondary">...</Card>
|
|
75
|
+
<Card variant="tertiary">...</Card>
|
|
76
|
+
<Card variant="transparent">...</Card>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Horizontal Layout
|
|
80
|
+
|
|
81
|
+
Create horizontal cards by using flex-row styling.
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
<Card className="flex-row gap-4">
|
|
85
|
+
<Image source={...} className="size-24 rounded-lg" />
|
|
86
|
+
</Card>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Background Image
|
|
90
|
+
|
|
91
|
+
Use an image as an absolute positioned background.
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<Card>
|
|
95
|
+
<Image source={...} className="absolute inset-0" />
|
|
96
|
+
<View className="gap-4">...</View>
|
|
97
|
+
</Card>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Example
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import { Button, Card } from '@/heroui';
|
|
104
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
105
|
+
import { View } from 'react-native';
|
|
106
|
+
|
|
107
|
+
export default function CardExample() {
|
|
108
|
+
return (
|
|
109
|
+
<Card>
|
|
110
|
+
<View className="gap-4">
|
|
111
|
+
<Card.Body className="mb-4">
|
|
112
|
+
<View className="gap-1 mb-2">
|
|
113
|
+
<Card.Title className="text-pink-500">$450</Card.Title>
|
|
114
|
+
<Card.Title>Living room Sofa • Collection 2025</Card.Title>
|
|
115
|
+
</View>
|
|
116
|
+
<Card.Description>
|
|
117
|
+
This sofa is perfect for modern tropical spaces, baroque inspired
|
|
118
|
+
spaces.
|
|
119
|
+
</Card.Description>
|
|
120
|
+
</Card.Body>
|
|
121
|
+
<Card.Footer className="gap-3">
|
|
122
|
+
<Button variant="primary">Buy now</Button>
|
|
123
|
+
<Button variant="ghost">
|
|
124
|
+
<Button.Label>Add to cart</Button.Label>
|
|
125
|
+
<Ionicons name="bag-outline" size={16} />
|
|
126
|
+
</Button>
|
|
127
|
+
</Card.Footer>
|
|
128
|
+
</View>
|
|
129
|
+
</Card>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
You can find more examples in the [GitHub repository](<https://github.com/heroui-inc/heroui-native/blob/rc/example/src/app/(home)/components/card.tsx>).
|
|
135
|
+
|
|
136
|
+
## API Reference
|
|
137
|
+
|
|
138
|
+
### Card
|
|
139
|
+
|
|
140
|
+
| prop | type | default | description |
|
|
141
|
+
| -------------- | --------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------- |
|
|
142
|
+
| `children` | `React.ReactNode` | - | Content to be rendered inside the card |
|
|
143
|
+
| `variant` | `'default' \| 'secondary' \| 'tertiary' \| 'transparent'` | `'default'` | Visual variant of the card surface |
|
|
144
|
+
| `className` | `string` | - | Additional CSS classes to apply |
|
|
145
|
+
| `animation` | `"disable-all" \| undefined` | `undefined` | Animation configuration. Use `"disable-all"` to disable all animations including children |
|
|
146
|
+
| `...ViewProps` | `ViewProps` | - | All standard React Native View props are supported |
|
|
147
|
+
|
|
148
|
+
### Card.Header
|
|
149
|
+
|
|
150
|
+
| prop | type | default | description |
|
|
151
|
+
| -------------- | ----------------- | ------- | -------------------------------------------------- |
|
|
152
|
+
| `children` | `React.ReactNode` | - | Children elements to be rendered inside the header |
|
|
153
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
154
|
+
| `...ViewProps` | `ViewProps` | - | All standard React Native View props are supported |
|
|
155
|
+
|
|
156
|
+
### Card.Body
|
|
157
|
+
|
|
158
|
+
| prop | type | default | description |
|
|
159
|
+
| -------------- | ----------------- | ------- | -------------------------------------------------- |
|
|
160
|
+
| `children` | `React.ReactNode` | - | Children elements to be rendered inside the body |
|
|
161
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
162
|
+
| `...ViewProps` | `ViewProps` | - | All standard React Native View props are supported |
|
|
163
|
+
|
|
164
|
+
### Card.Footer
|
|
165
|
+
|
|
166
|
+
| prop | type | default | description |
|
|
167
|
+
| -------------- | ----------------- | ------- | -------------------------------------------------- |
|
|
168
|
+
| `children` | `React.ReactNode` | - | Children elements to be rendered inside the footer |
|
|
169
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
170
|
+
| `...ViewProps` | `ViewProps` | - | All standard React Native View props are supported |
|
|
171
|
+
|
|
172
|
+
### Card.Title
|
|
173
|
+
|
|
174
|
+
| prop | type | default | description |
|
|
175
|
+
| -------------- | ----------------- | ------- | -------------------------------------------------- |
|
|
176
|
+
| `children` | `React.ReactNode` | - | Children elements to be rendered as the title text |
|
|
177
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
178
|
+
| `...TextProps` | `TextProps` | - | All standard React Native Text props are supported |
|
|
179
|
+
|
|
180
|
+
### Card.Description
|
|
181
|
+
|
|
182
|
+
| prop | type | default | description |
|
|
183
|
+
| -------------- | ----------------- | ------- | -------------------------------------------------------- |
|
|
184
|
+
| `children` | `React.ReactNode` | - | Children elements to be rendered as the description text |
|
|
185
|
+
| `className` | `string` | - | Additional CSS classes |
|
|
186
|
+
| `...TextProps` | `TextProps` | - | All standard React Native Text props are supported |
|