@campxdev/react-native-blueprint 0.1.8 → 0.1.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/README.md +188 -89
- package/lib/commonjs/app/_layout.js +34 -0
- package/lib/commonjs/app/_layout.js.map +1 -0
- package/lib/commonjs/assets/icons/weather_icons/drizzle.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/foggy.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/freezing_rain.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/partly_cloudy.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/rainy.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/showers.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/sunny_weather.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/thunderstorm.png +0 -0
- package/lib/commonjs/assets/icons/weather_icons/thunderstorm_hail.png +0 -0
- package/lib/commonjs/components/theme-config.js +274 -0
- package/lib/commonjs/components/theme-config.js.map +1 -0
- package/lib/commonjs/components/ui/Accordion.js +235 -0
- package/lib/commonjs/components/ui/Accordion.js.map +1 -0
- package/lib/commonjs/components/ui/Alert-Dialog.js +280 -0
- package/lib/commonjs/components/ui/Alert-Dialog.js.map +1 -0
- package/lib/commonjs/components/ui/Alert.js +113 -0
- package/lib/commonjs/components/ui/Alert.js.map +1 -0
- package/lib/commonjs/components/ui/AppBar.js +407 -0
- package/lib/commonjs/components/ui/AppBar.js.map +1 -0
- package/lib/commonjs/components/ui/Aspect-Ratio.js +30 -0
- package/lib/commonjs/components/ui/Aspect-Ratio.js.map +1 -0
- package/lib/commonjs/components/ui/Avatar.js +101 -0
- package/lib/commonjs/components/ui/Avatar.js.map +1 -0
- package/lib/commonjs/components/ui/Badge.js +131 -0
- package/lib/commonjs/components/ui/Badge.js.map +1 -0
- package/lib/commonjs/components/ui/Bottom-Sheet.js +156 -0
- package/lib/commonjs/components/ui/Bottom-Sheet.js.map +1 -0
- package/lib/commonjs/components/ui/Button.js +92 -0
- package/lib/commonjs/components/ui/Button.js.map +1 -0
- package/lib/commonjs/components/ui/Card.js +180 -0
- package/lib/commonjs/components/ui/Card.js.map +1 -0
- package/lib/commonjs/components/ui/Checkbox.js +69 -0
- package/lib/commonjs/components/ui/Checkbox.js.map +1 -0
- package/lib/commonjs/components/ui/Collapsible.js +45 -0
- package/lib/commonjs/components/ui/Collapsible.js.map +1 -0
- package/lib/commonjs/components/ui/Context-Menu.js +304 -0
- package/lib/commonjs/components/ui/Context-Menu.js.map +1 -0
- package/lib/commonjs/components/ui/Custom-Card.js +210 -0
- package/lib/commonjs/components/ui/Custom-Card.js.map +1 -0
- package/lib/commonjs/components/ui/Dialog.js +214 -0
- package/lib/commonjs/components/ui/Dialog.js.map +1 -0
- package/lib/commonjs/components/ui/Dropdown-Menu.js +438 -0
- package/lib/commonjs/components/ui/Dropdown-Menu.js.map +1 -0
- package/lib/commonjs/components/ui/Floating-Action.js +55 -0
- package/lib/commonjs/components/ui/Floating-Action.js.map +1 -0
- package/lib/commonjs/components/ui/Greeting-Card.js +401 -0
- package/lib/commonjs/components/ui/Greeting-Card.js.map +1 -0
- package/lib/commonjs/components/ui/Hover-Card.js +100 -0
- package/lib/commonjs/components/ui/Hover-Card.js.map +1 -0
- package/lib/commonjs/components/ui/Icon.js +76 -0
- package/lib/commonjs/components/ui/Icon.js.map +1 -0
- package/lib/commonjs/components/ui/Input.js +79 -0
- package/lib/commonjs/components/ui/Input.js.map +1 -0
- package/lib/commonjs/components/ui/Label.js +48 -0
- package/lib/commonjs/components/ui/Label.js.map +1 -0
- package/lib/commonjs/components/ui/Menubar.js +392 -0
- package/lib/commonjs/components/ui/Menubar.js.map +1 -0
- package/lib/commonjs/components/ui/Native-Only-Animated-View.js +43 -0
- package/lib/commonjs/components/ui/Native-Only-Animated-View.js.map +1 -0
- package/lib/commonjs/components/ui/NavBar.js +356 -0
- package/lib/commonjs/components/ui/NavBar.js.map +1 -0
- package/lib/commonjs/components/ui/Popover.js +105 -0
- package/lib/commonjs/components/ui/Popover.js.map +1 -0
- package/lib/commonjs/components/ui/Progress.js +127 -0
- package/lib/commonjs/components/ui/Progress.js.map +1 -0
- package/lib/commonjs/components/ui/Radio-Group.js +78 -0
- package/lib/commonjs/components/ui/Radio-Group.js.map +1 -0
- package/lib/commonjs/components/ui/Select.js +283 -0
- package/lib/commonjs/components/ui/Select.js.map +1 -0
- package/lib/commonjs/components/ui/Separator.js +62 -0
- package/lib/commonjs/components/ui/Separator.js.map +1 -0
- package/lib/commonjs/components/ui/SizedBox.js +106 -0
- package/lib/commonjs/components/ui/SizedBox.js.map +1 -0
- package/lib/commonjs/components/ui/Skeleton.js +60 -0
- package/lib/commonjs/components/ui/Skeleton.js.map +1 -0
- package/lib/commonjs/components/ui/Slider.js +178 -0
- package/lib/commonjs/components/ui/Slider.js.map +1 -0
- package/lib/commonjs/components/ui/Switch.js +57 -0
- package/lib/commonjs/components/ui/Switch.js.map +1 -0
- package/lib/commonjs/components/ui/Table.js +161 -0
- package/lib/commonjs/components/ui/Table.js.map +1 -0
- package/lib/commonjs/components/ui/Tabs.js +111 -0
- package/lib/commonjs/components/ui/Tabs.js.map +1 -0
- package/lib/commonjs/components/ui/Text.js +73 -0
- package/lib/commonjs/components/ui/Text.js.map +1 -0
- package/lib/commonjs/components/ui/Textarea.js +93 -0
- package/lib/commonjs/components/ui/Textarea.js.map +1 -0
- package/lib/commonjs/components/ui/Theme-Toggle.js +160 -0
- package/lib/commonjs/components/ui/Theme-Toggle.js.map +1 -0
- package/lib/commonjs/components/ui/Toast.js +107 -0
- package/lib/commonjs/components/ui/Toast.js.map +1 -0
- package/lib/commonjs/components/ui/Toggle-Group.js +133 -0
- package/lib/commonjs/components/ui/Toggle-Group.js.map +1 -0
- package/lib/commonjs/components/ui/Toggle.js +110 -0
- package/lib/commonjs/components/ui/Toggle.js.map +1 -0
- package/lib/commonjs/components/ui/Tooltip.js +110 -0
- package/lib/commonjs/components/ui/Tooltip.js.map +1 -0
- package/lib/commonjs/components/ui/index.js +479 -0
- package/lib/commonjs/components/ui/index.js.map +1 -0
- package/lib/commonjs/global.css +417 -0
- package/lib/commonjs/index.js +118 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/ThemeProvider.js +180 -0
- package/lib/commonjs/lib/ThemeProvider.js.map +1 -0
- package/lib/commonjs/lib/cornerRadius.js +171 -0
- package/lib/commonjs/lib/cornerRadius.js.map +1 -0
- package/lib/commonjs/lib/fonts.js +101 -0
- package/lib/commonjs/lib/fonts.js.map +1 -0
- package/lib/commonjs/lib/slot-helpers.js +24 -0
- package/lib/commonjs/lib/slot-helpers.js.map +1 -0
- package/lib/commonjs/lib/theme.js +215 -0
- package/lib/commonjs/lib/theme.js.map +1 -0
- package/lib/commonjs/lib/utils.js +142 -0
- package/lib/commonjs/lib/utils.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types/components.d.js +6 -0
- package/lib/commonjs/types/components.d.js.map +1 -0
- package/lib/commonjs/types/global.d.js +8 -0
- package/lib/commonjs/types/global.d.js.map +1 -0
- package/lib/commonjs/types/rn-primitives.d.js +6 -0
- package/lib/commonjs/types/rn-primitives.d.js.map +1 -0
- package/lib/module/components/ui/Alert-Dialog.js.map +1 -1
- package/lib/module/components/ui/Context-Menu.js.map +1 -1
- package/lib/module/components/ui/Dropdown-Menu.js.map +1 -1
- package/lib/module/components/ui/Menubar.js.map +1 -1
- package/lib/module/components/ui/Tabs.js.map +1 -1
- package/lib/module/components/ui/Toggle-Group.js.map +1 -1
- package/lib/module/lib/fonts.js +81 -8
- package/lib/module/lib/fonts.js.map +1 -1
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/app/_layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/theme-config.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Accordion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Alert-Dialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Alert.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/AppBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Aspect-Ratio.d.ts.map +1 -0
- package/lib/typescript/{src → commonjs/src}/components/ui/Avatar.d.ts +59 -59
- package/lib/typescript/{src → commonjs/src}/components/ui/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/ui/Badge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Bottom-Sheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Checkbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Collapsible.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Context-Menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Custom-Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Dialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Dropdown-Menu.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Floating-Action.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Greeting-Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Hover-Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Input.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Label.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Menubar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Native-Only-Animated-View.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/NavBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Popover.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Radio-Group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Select.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Separator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/SizedBox.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Skeleton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Slider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Switch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Table.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Tabs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Text.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Textarea.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Theme-Toggle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Toast.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Toggle-Group.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Toggle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/Tooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/ui/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/cornerRadius.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/fonts.d.ts +16 -0
- package/lib/typescript/commonjs/src/lib/fonts.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/slot-helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lib/utils.d.ts.map +1 -0
- package/lib/typescript/module/src/app/_layout.d.ts +7 -0
- package/lib/typescript/module/src/app/_layout.d.ts.map +1 -0
- package/lib/typescript/module/src/components/theme-config.d.ts +174 -0
- package/lib/typescript/module/src/components/theme-config.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Accordion.d.ts +103 -0
- package/lib/typescript/module/src/components/ui/Accordion.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Alert-Dialog.d.ts +145 -0
- package/lib/typescript/module/src/components/ui/Alert-Dialog.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Alert.d.ts +61 -0
- package/lib/typescript/module/src/components/ui/Alert.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/AppBar.d.ts +227 -0
- package/lib/typescript/module/src/components/ui/AppBar.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Aspect-Ratio.d.ts +24 -0
- package/lib/typescript/module/src/components/ui/Aspect-Ratio.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Avatar.d.ts +1486 -0
- package/lib/typescript/module/src/components/ui/Avatar.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Badge.d.ts +77 -0
- package/lib/typescript/module/src/components/ui/Badge.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Bottom-Sheet.d.ts +43 -0
- package/lib/typescript/module/src/components/ui/Bottom-Sheet.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Button.d.ts +23 -0
- package/lib/typescript/module/src/components/ui/Button.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Card.d.ts +93 -0
- package/lib/typescript/module/src/components/ui/Card.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Checkbox.d.ts +36 -0
- package/lib/typescript/module/src/components/ui/Checkbox.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Collapsible.d.ts +37 -0
- package/lib/typescript/module/src/components/ui/Collapsible.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Context-Menu.d.ts +107 -0
- package/lib/typescript/module/src/components/ui/Context-Menu.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Custom-Card.d.ts +103 -0
- package/lib/typescript/module/src/components/ui/Custom-Card.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Dialog.d.ts +90 -0
- package/lib/typescript/module/src/components/ui/Dialog.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Dropdown-Menu.d.ts +242 -0
- package/lib/typescript/module/src/components/ui/Dropdown-Menu.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Floating-Action.d.ts +44 -0
- package/lib/typescript/module/src/components/ui/Floating-Action.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Greeting-Card.d.ts +153 -0
- package/lib/typescript/module/src/components/ui/Greeting-Card.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Hover-Card.d.ts +49 -0
- package/lib/typescript/module/src/components/ui/Hover-Card.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Icon.d.ts +43 -0
- package/lib/typescript/module/src/components/ui/Icon.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Input.d.ts +54 -0
- package/lib/typescript/module/src/components/ui/Input.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Label.d.ts +34 -0
- package/lib/typescript/module/src/components/ui/Label.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Menubar.d.ts +142 -0
- package/lib/typescript/module/src/components/ui/Menubar.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Native-Only-Animated-View.d.ts +26 -0
- package/lib/typescript/module/src/components/ui/Native-Only-Animated-View.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/NavBar.d.ts +273 -0
- package/lib/typescript/module/src/components/ui/NavBar.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Popover.d.ts +54 -0
- package/lib/typescript/module/src/components/ui/Popover.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Progress.d.ts +27 -0
- package/lib/typescript/module/src/components/ui/Progress.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Radio-Group.d.ts +47 -0
- package/lib/typescript/module/src/components/ui/Radio-Group.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Select.d.ts +86 -0
- package/lib/typescript/module/src/components/ui/Select.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Separator.d.ts +40 -0
- package/lib/typescript/module/src/components/ui/Separator.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/SizedBox.d.ts +79 -0
- package/lib/typescript/module/src/components/ui/SizedBox.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Skeleton.d.ts +42 -0
- package/lib/typescript/module/src/components/ui/Skeleton.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Slider.d.ts +56 -0
- package/lib/typescript/module/src/components/ui/Slider.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Switch.d.ts +34 -0
- package/lib/typescript/module/src/components/ui/Switch.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Table.d.ts +80 -0
- package/lib/typescript/module/src/components/ui/Table.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Tabs.d.ts +51 -0
- package/lib/typescript/module/src/components/ui/Tabs.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Text.d.ts +45 -0
- package/lib/typescript/module/src/components/ui/Text.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Textarea.d.ts +65 -0
- package/lib/typescript/module/src/components/ui/Textarea.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Theme-Toggle.d.ts +67 -0
- package/lib/typescript/module/src/components/ui/Theme-Toggle.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Toast.d.ts +56 -0
- package/lib/typescript/module/src/components/ui/Toast.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Toggle-Group.d.ts +49 -0
- package/lib/typescript/module/src/components/ui/Toggle-Group.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Toggle.d.ts +53 -0
- package/lib/typescript/module/src/components/ui/Toggle.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/Tooltip.d.ts +51 -0
- package/lib/typescript/module/src/components/ui/Tooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/components/ui/index.d.ts +44 -0
- package/lib/typescript/module/src/components/ui/index.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +9 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/ThemeProvider.d.ts +137 -0
- package/lib/typescript/module/src/lib/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/cornerRadius.d.ts +112 -0
- package/lib/typescript/module/src/lib/cornerRadius.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/fonts.d.ts +16 -0
- package/lib/typescript/module/src/lib/fonts.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/slot-helpers.d.ts +32 -0
- package/lib/typescript/module/src/lib/slot-helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/theme.d.ts +87 -0
- package/lib/typescript/module/src/lib/theme.d.ts.map +1 -0
- package/lib/typescript/module/src/lib/utils.d.ts +111 -0
- package/lib/typescript/module/src/lib/utils.d.ts.map +1 -0
- package/package.json +180 -50
- package/src/components/ui/Alert-Dialog.tsx +2 -2
- package/src/components/ui/Context-Menu.tsx +1 -1
- package/src/components/ui/Dropdown-Menu.tsx +1 -1
- package/src/components/ui/Menubar.tsx +2 -2
- package/src/components/ui/Tabs.tsx +1 -1
- package/src/components/ui/Toggle-Group.tsx +2 -2
- package/src/lib/fonts.ts +83 -12
- package/lib/typescript/src/app/_layout.d.ts.map +0 -1
- package/lib/typescript/src/components/theme-config.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Accordion.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Alert-Dialog.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Alert.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/AppBar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Aspect-Ratio.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Badge.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Bottom-Sheet.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Button.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Checkbox.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Collapsible.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Context-Menu.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Custom-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Dialog.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Dropdown-Menu.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Floating-Action.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Greeting-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Hover-Card.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Icon.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Input.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Label.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Menubar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Native-Only-Animated-View.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/NavBar.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Popover.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Progress.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Radio-Group.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Select.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Separator.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/SizedBox.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Skeleton.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Slider.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Switch.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Table.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Tabs.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Text.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Textarea.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Theme-Toggle.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toast.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toggle-Group.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Toggle.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Tooltip.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/index.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/lib/ThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/lib/cornerRadius.d.ts.map +0 -1
- package/lib/typescript/src/lib/fonts.d.ts +0 -21
- package/lib/typescript/src/lib/fonts.d.ts.map +0 -1
- package/lib/typescript/src/lib/slot-helpers.d.ts.map +0 -1
- package/lib/typescript/src/lib/theme.d.ts.map +0 -1
- package/lib/typescript/src/lib/utils.d.ts.map +0 -1
- /package/lib/typescript/{src → commonjs/src}/app/_layout.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/theme-config.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Accordion.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Alert-Dialog.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Alert.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/AppBar.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Aspect-Ratio.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Badge.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Bottom-Sheet.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Button.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Card.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Checkbox.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Collapsible.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Context-Menu.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Custom-Card.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Dialog.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Dropdown-Menu.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Floating-Action.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Greeting-Card.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Hover-Card.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Icon.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Input.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Label.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Menubar.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Native-Only-Animated-View.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/NavBar.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Popover.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Progress.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Radio-Group.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Select.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Separator.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/SizedBox.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Skeleton.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Slider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Switch.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Table.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Tabs.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Text.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Textarea.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Theme-Toggle.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Toast.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Toggle-Group.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Toggle.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/Tooltip.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/components/ui/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/lib/ThemeProvider.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/lib/cornerRadius.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/lib/slot-helpers.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/lib/theme.d.ts +0 -0
- /package/lib/typescript/{src → commonjs/src}/lib/utils.d.ts +0 -0
- /package/lib/typescript/{package.json → module/package.json} +0 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AppBarVariants = exports.AppBarIcons = exports.AppBar = void 0;
|
|
7
|
+
var _lucideReactNative = require("lucide-react-native");
|
|
8
|
+
var _nativewind = require("nativewind");
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
12
|
+
var _utils = require("../../lib/utils");
|
|
13
|
+
var _Icon = require("./Icon");
|
|
14
|
+
var _Text = require("./Text");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
|
+
const View = (0, _nativewind.cssInterop)(_reactNative.View, {
|
|
18
|
+
className: 'style'
|
|
19
|
+
});
|
|
20
|
+
const Pressable = (0, _nativewind.cssInterop)(_reactNative.Pressable, {
|
|
21
|
+
className: 'style'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for an action item in the AppBar
|
|
26
|
+
*
|
|
27
|
+
* @property {LucideIcon} icon - Icon component from lucide-react-native
|
|
28
|
+
* @property {() => void} [onPress] - Callback when action is pressed
|
|
29
|
+
* @property {string} [label] - Accessibility label for the action
|
|
30
|
+
* @property {string} [className] - Additional classes for the action button container
|
|
31
|
+
* @property {string} [iconClassName] - Additional classes for the icon
|
|
32
|
+
* @property {boolean} [disabled] - Whether the action is disabled
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* const actions: AppBarAction[] = [
|
|
37
|
+
* { icon: Search, onPress: handleSearch, label: 'Search' },
|
|
38
|
+
* { icon: MoreVertical, onPress: handleMore, label: 'More options' }
|
|
39
|
+
* ];
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Props for AppBar component - A flexible top app bar following Material Design guidelines
|
|
45
|
+
*
|
|
46
|
+
* @property {string | React.ReactNode} [title] - AppBar title text or custom component
|
|
47
|
+
* @property {string} [subtitle] - Optional subtitle text displayed below title
|
|
48
|
+
*
|
|
49
|
+
* @property {React.ReactNode} [leading] - Custom leading widget (can include multiple icons or custom components, overrides default back button)
|
|
50
|
+
* @property {boolean} [showLeading=true] - Whether to show the leading widget
|
|
51
|
+
* @property {() => void} [onLeadingPress] - Callback when leading icon is pressed (only used if no custom leading provided)
|
|
52
|
+
* @property {LucideIcon} [leadingIcon=ArrowLeft] - Icon for the leading button (only used if no custom leading provided)
|
|
53
|
+
*
|
|
54
|
+
* @property {React.ReactNode} [center] - Custom center component (overrides title/subtitle, can include images, text, or complex layouts)
|
|
55
|
+
*
|
|
56
|
+
* @property {AppBarAction[]} [actions=[]] - Array of action items to display on the right (supports multiple icons)
|
|
57
|
+
*
|
|
58
|
+
* @property {string} [className] - Additional classes for the root container
|
|
59
|
+
* @property {string} [titleClassName] - Additional classes for the title text
|
|
60
|
+
* @property {string} [subtitleClassName] - Additional classes for the subtitle text
|
|
61
|
+
* @property {string} [contentClassName] - Additional classes for the content container
|
|
62
|
+
* @property {string} [leadingClassName] - Additional classes for the leading section container
|
|
63
|
+
* @property {string} [centerClassName] - Additional classes for the center section container
|
|
64
|
+
* @property {string} [actionsClassName] - Additional classes for the actions section container
|
|
65
|
+
*
|
|
66
|
+
* @property {boolean} [centerTitle=false] - Whether to center the title
|
|
67
|
+
* @property {number} [elevation=4] - Elevation level for shadow (0 = no shadow)
|
|
68
|
+
* @property {boolean} [transparent=false] - Whether the AppBar background is transparent
|
|
69
|
+
*
|
|
70
|
+
* @property {boolean} [useSafeArea=true] - Whether to respect safe area insets
|
|
71
|
+
*
|
|
72
|
+
* @property {string} [backgroundColor] - Custom background color class
|
|
73
|
+
* @property {string} [foregroundColor] - Custom foreground/text color class
|
|
74
|
+
*
|
|
75
|
+
* @property {'default' | 'light-content' | 'dark-content'} [statusBarStyle] - Status bar text color (auto-adjusts based on theme if not set)
|
|
76
|
+
* @property {string} [statusBarColor] - Status bar background color (Android)
|
|
77
|
+
*
|
|
78
|
+
* @property {number} [height] - Custom height in pixels (default: 56px per Material Design)
|
|
79
|
+
*
|
|
80
|
+
* @property {React.ReactNode} [bottom] - Additional content below main app bar (e.g., tabs, search)
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* // Simple app bar with title
|
|
85
|
+
* <AppBar title="Home" />
|
|
86
|
+
*
|
|
87
|
+
* // With custom center containing image and text
|
|
88
|
+
* <AppBar
|
|
89
|
+
* center={
|
|
90
|
+
* <View className="flex-row items-center gap-2">
|
|
91
|
+
* <Image source={logo} className="w-8 h-8" />
|
|
92
|
+
* <Text className="text-lg font-bold">MyApp</Text>
|
|
93
|
+
* </View>
|
|
94
|
+
* }
|
|
95
|
+
* />
|
|
96
|
+
*
|
|
97
|
+
* // With multiple leading icons
|
|
98
|
+
* <AppBar
|
|
99
|
+
* title="Settings"
|
|
100
|
+
* leading={
|
|
101
|
+
* <View className="flex-row items-center">
|
|
102
|
+
* <IconButton icon={Menu} onPress={openMenu} />
|
|
103
|
+
* <IconButton icon={ArrowLeft} onPress={goBack} />
|
|
104
|
+
* </View>
|
|
105
|
+
* }
|
|
106
|
+
* actions={[
|
|
107
|
+
* { icon: Search, onPress: handleSearch },
|
|
108
|
+
* { icon: Settings, onPress: openSettings },
|
|
109
|
+
* { icon: MoreVertical, onPress: handleMore }
|
|
110
|
+
* ]}
|
|
111
|
+
* />
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* A flexible top app bar component following Material Design guidelines
|
|
117
|
+
*
|
|
118
|
+
* Provides consistent navigation and actions across your app with support for:
|
|
119
|
+
* - Customizable leading navigation (back button, menu, custom widget)
|
|
120
|
+
* - Title and subtitle with flexible positioning
|
|
121
|
+
* - Action buttons on the right side
|
|
122
|
+
* - Safe area insets handling
|
|
123
|
+
* - Platform-specific status bar configuration
|
|
124
|
+
* - Transparent overlay mode
|
|
125
|
+
* - Bottom content slot for tabs or search bars
|
|
126
|
+
*
|
|
127
|
+
* @component
|
|
128
|
+
* @example
|
|
129
|
+
* ```tsx
|
|
130
|
+
* // Basic with back button
|
|
131
|
+
* <AppBar
|
|
132
|
+
* title="Profile"
|
|
133
|
+
* onLeadingPress={() => navigation.goBack()}
|
|
134
|
+
* />
|
|
135
|
+
*
|
|
136
|
+
* // With menu and actions
|
|
137
|
+
* <AppBar
|
|
138
|
+
* title="Home"
|
|
139
|
+
* leadingIcon={Menu}
|
|
140
|
+
* onLeadingPress={openDrawer}
|
|
141
|
+
* actions={[
|
|
142
|
+
* { icon: Search, onPress: handleSearch },
|
|
143
|
+
* { icon: Settings, onPress: openSettings }
|
|
144
|
+
* ]}
|
|
145
|
+
* />
|
|
146
|
+
*
|
|
147
|
+
* // Transparent overlay (for use over content)
|
|
148
|
+
* <AppBar
|
|
149
|
+
* title="Photo"
|
|
150
|
+
* transparent
|
|
151
|
+
* foregroundColor="text-white"
|
|
152
|
+
* statusBarStyle="light-content"
|
|
153
|
+
* />
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @accessibility
|
|
157
|
+
* - Leading button includes "Navigate back" accessibility label
|
|
158
|
+
* - Action buttons support custom accessibility labels
|
|
159
|
+
* - Proper button role for all interactive elements
|
|
160
|
+
*/
|
|
161
|
+
const AppBar = exports.AppBar = /*#__PURE__*/React.forwardRef(({
|
|
162
|
+
title,
|
|
163
|
+
subtitle,
|
|
164
|
+
leading,
|
|
165
|
+
showLeading = true,
|
|
166
|
+
onLeadingPress,
|
|
167
|
+
leadingIcon = _lucideReactNative.ArrowLeft,
|
|
168
|
+
center,
|
|
169
|
+
actions = [],
|
|
170
|
+
className,
|
|
171
|
+
titleClassName,
|
|
172
|
+
subtitleClassName,
|
|
173
|
+
contentClassName,
|
|
174
|
+
leadingClassName,
|
|
175
|
+
centerClassName,
|
|
176
|
+
actionsClassName,
|
|
177
|
+
centerTitle = false,
|
|
178
|
+
elevation = 4,
|
|
179
|
+
transparent = false,
|
|
180
|
+
useSafeArea = true,
|
|
181
|
+
backgroundColor,
|
|
182
|
+
foregroundColor,
|
|
183
|
+
statusBarStyle,
|
|
184
|
+
statusBarColor,
|
|
185
|
+
height,
|
|
186
|
+
bottom
|
|
187
|
+
}, ref) => {
|
|
188
|
+
// Get the current color scheme for dark mode support
|
|
189
|
+
const {
|
|
190
|
+
colorScheme
|
|
191
|
+
} = (0, _nativewind.useColorScheme)();
|
|
192
|
+
const isDark = colorScheme === 'dark';
|
|
193
|
+
|
|
194
|
+
// Default height following Material Design guidelines
|
|
195
|
+
const defaultHeight = 56;
|
|
196
|
+
const appBarHeight = height ?? defaultHeight;
|
|
197
|
+
|
|
198
|
+
// Determine status bar style based on theme if not explicitly set
|
|
199
|
+
const defaultStatusBarStyle = transparent ? 'light-content' // Transparent bars usually overlay content, so use light text
|
|
200
|
+
: isDark ? 'light-content' : 'dark-content';
|
|
201
|
+
const resolvedStatusBarStyle = statusBarStyle ?? defaultStatusBarStyle;
|
|
202
|
+
|
|
203
|
+
// Background color
|
|
204
|
+
const bgColor = transparent ? 'bg-transparent' : backgroundColor || 'bg-background';
|
|
205
|
+
|
|
206
|
+
// Shadow/elevation styles
|
|
207
|
+
const elevationStyle = !transparent && elevation > 0 ? 'border-b border-border shadow-sm' : '';
|
|
208
|
+
|
|
209
|
+
// Render center/title content
|
|
210
|
+
const renderCenter = () => {
|
|
211
|
+
// If custom center is provided, use it
|
|
212
|
+
if (center) {
|
|
213
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
214
|
+
className: (0, _utils.cn)('flex-1 justify-center', centerClassName),
|
|
215
|
+
children: center
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Otherwise fall back to title/subtitle
|
|
220
|
+
if (!title) return null;
|
|
221
|
+
if (typeof title === 'string') {
|
|
222
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(View, {
|
|
223
|
+
className: (0, _utils.cn)('flex-1 justify-center', subtitle && 'gap-0.5', centerClassName),
|
|
224
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
225
|
+
className: (0, _utils.cn)('text-xl font-semibold', foregroundColor || 'text-foreground', titleClassName),
|
|
226
|
+
numberOfLines: 1,
|
|
227
|
+
ellipsizeMode: "tail",
|
|
228
|
+
children: title
|
|
229
|
+
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
230
|
+
className: (0, _utils.cn)('text-xs', foregroundColor ? 'opacity-70' : 'text-muted-foreground', subtitleClassName),
|
|
231
|
+
numberOfLines: 1,
|
|
232
|
+
ellipsizeMode: "tail",
|
|
233
|
+
children: subtitle
|
|
234
|
+
})]
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
238
|
+
className: (0, _utils.cn)('flex-1 justify-center', centerClassName),
|
|
239
|
+
children: title
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// Render leading icon/widget
|
|
244
|
+
const renderLeading = () => {
|
|
245
|
+
if (!showLeading) return null;
|
|
246
|
+
if (leading) {
|
|
247
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
248
|
+
className: (0, _utils.cn)('mr-2', leadingClassName),
|
|
249
|
+
children: leading
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (onLeadingPress) {
|
|
253
|
+
const LeadingIcon = leadingIcon;
|
|
254
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Pressable, {
|
|
255
|
+
onPress: onLeadingPress,
|
|
256
|
+
className: (0, _utils.cn)('mr-2 -ml-2 h-10 w-10 items-center justify-center rounded-full active:bg-accent/50', leadingClassName),
|
|
257
|
+
accessibilityRole: "button",
|
|
258
|
+
accessibilityLabel: "Navigate back",
|
|
259
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
260
|
+
as: LeadingIcon,
|
|
261
|
+
size: 24,
|
|
262
|
+
className: (0, _utils.cn)(foregroundColor || 'text-foreground')
|
|
263
|
+
})
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
return null;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// Render action items
|
|
270
|
+
const renderActions = () => {
|
|
271
|
+
if (!actions || actions.length === 0) return null;
|
|
272
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
273
|
+
className: (0, _utils.cn)('flex-row items-center gap-1', actionsClassName),
|
|
274
|
+
children: actions.map((action, index) => {
|
|
275
|
+
const ActionIcon = action.icon;
|
|
276
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Pressable, {
|
|
277
|
+
onPress: action.onPress,
|
|
278
|
+
disabled: action.disabled,
|
|
279
|
+
className: (0, _utils.cn)('h-10 w-10 items-center justify-center rounded-full active:bg-accent/50', action.disabled && 'opacity-50', action.className),
|
|
280
|
+
accessibilityRole: "button",
|
|
281
|
+
accessibilityLabel: action.label || `Action ${index + 1}`,
|
|
282
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
283
|
+
as: ActionIcon,
|
|
284
|
+
size: 24,
|
|
285
|
+
className: (0, _utils.cn)(foregroundColor || 'text-foreground', action.iconClassName)
|
|
286
|
+
})
|
|
287
|
+
}, index);
|
|
288
|
+
})
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
292
|
+
children: [_reactNative.Platform.OS !== 'web' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.StatusBar, {
|
|
293
|
+
barStyle: resolvedStatusBarStyle,
|
|
294
|
+
backgroundColor: statusBarColor || 'transparent',
|
|
295
|
+
translucent: useSafeArea
|
|
296
|
+
}), useSafeArea ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
297
|
+
edges: ['top'],
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(View, {
|
|
299
|
+
ref: ref,
|
|
300
|
+
className: (0, _utils.cn)(bgColor, elevationStyle, className),
|
|
301
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(View, {
|
|
302
|
+
className: (0, _utils.cn)('flex-row items-center justify-between px-4', contentClassName),
|
|
303
|
+
style: {
|
|
304
|
+
height: appBarHeight
|
|
305
|
+
},
|
|
306
|
+
children: [renderLeading(), /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
307
|
+
className: (0, _utils.cn)('flex-1', centerTitle && 'items-center', !centerTitle && 'items-start'),
|
|
308
|
+
children: renderCenter()
|
|
309
|
+
}), renderActions()]
|
|
310
|
+
}), bottom && /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
311
|
+
className: "pb-2",
|
|
312
|
+
children: bottom
|
|
313
|
+
})]
|
|
314
|
+
})
|
|
315
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(View, {
|
|
316
|
+
ref: ref,
|
|
317
|
+
className: (0, _utils.cn)(bgColor, elevationStyle, className),
|
|
318
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(View, {
|
|
319
|
+
className: (0, _utils.cn)('flex-row items-center justify-between px-4', contentClassName),
|
|
320
|
+
style: {
|
|
321
|
+
height: appBarHeight
|
|
322
|
+
},
|
|
323
|
+
children: [renderLeading(), /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
324
|
+
className: (0, _utils.cn)('flex-1', centerTitle && 'items-center', !centerTitle && 'items-start'),
|
|
325
|
+
children: renderCenter()
|
|
326
|
+
}), renderActions()]
|
|
327
|
+
}), bottom && /*#__PURE__*/(0, _jsxRuntime.jsx)(View, {
|
|
328
|
+
className: "pb-2",
|
|
329
|
+
children: bottom
|
|
330
|
+
})]
|
|
331
|
+
})]
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
AppBar.displayName = 'AppBar';
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Pre-configured AppBar variants for common use cases
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* ```tsx
|
|
341
|
+
* // Simple app bar without navigation
|
|
342
|
+
* <AppBarVariants.Simple title="Home" />
|
|
343
|
+
*
|
|
344
|
+
* // With back button
|
|
345
|
+
* <AppBarVariants.WithBack title="Details" onLeadingPress={goBack} />
|
|
346
|
+
*
|
|
347
|
+
* // With menu drawer
|
|
348
|
+
* <AppBarVariants.WithMenu title="Main" onLeadingPress={openDrawer} />
|
|
349
|
+
*
|
|
350
|
+
* // Transparent overlay
|
|
351
|
+
* <AppBarVariants.Transparent title="Gallery" />
|
|
352
|
+
*
|
|
353
|
+
* // Centered title
|
|
354
|
+
* <AppBarVariants.Centered title="About" />
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
const AppBarVariants = exports.AppBarVariants = {
|
|
358
|
+
// Simple app bar with just a title
|
|
359
|
+
Simple: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(AppBar, {
|
|
360
|
+
...props,
|
|
361
|
+
showLeading: false
|
|
362
|
+
}),
|
|
363
|
+
// App bar with back button
|
|
364
|
+
WithBack: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(AppBar, {
|
|
365
|
+
...props,
|
|
366
|
+
showLeading: true
|
|
367
|
+
}),
|
|
368
|
+
// App bar with menu icon
|
|
369
|
+
WithMenu: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(AppBar, {
|
|
370
|
+
...props,
|
|
371
|
+
leadingIcon: _lucideReactNative.Menu,
|
|
372
|
+
showLeading: true
|
|
373
|
+
}),
|
|
374
|
+
// Transparent app bar (for use over content)
|
|
375
|
+
Transparent: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(AppBar, {
|
|
376
|
+
...props,
|
|
377
|
+
transparent: true,
|
|
378
|
+
elevation: 0
|
|
379
|
+
}),
|
|
380
|
+
// Centered title app bar
|
|
381
|
+
Centered: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(AppBar, {
|
|
382
|
+
...props,
|
|
383
|
+
centerTitle: true
|
|
384
|
+
})
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Common icons exported for convenience when configuring AppBar
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* ```tsx
|
|
392
|
+
* import { AppBar, AppBarIcons } from './AppBar';
|
|
393
|
+
*
|
|
394
|
+
* <AppBar
|
|
395
|
+
* leadingIcon={AppBarIcons.Menu}
|
|
396
|
+
* actions={[
|
|
397
|
+
* { icon: AppBarIcons.MoreVertical, onPress: handleMore }
|
|
398
|
+
* ]}
|
|
399
|
+
* />
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
const AppBarIcons = exports.AppBarIcons = {
|
|
403
|
+
Menu: _lucideReactNative.Menu,
|
|
404
|
+
ArrowLeft: _lucideReactNative.ArrowLeft,
|
|
405
|
+
MoreVertical: _lucideReactNative.MoreVertical
|
|
406
|
+
};
|
|
407
|
+
//# sourceMappingURL=AppBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_lucideReactNative","require","_nativewind","React","_interopRequireWildcard","_reactNative","_reactNativeSafeAreaContext","_utils","_Icon","_Text","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","View","cssInterop","RNView","className","Pressable","RNPressable","AppBar","exports","forwardRef","title","subtitle","leading","showLeading","onLeadingPress","leadingIcon","ArrowLeft","center","actions","titleClassName","subtitleClassName","contentClassName","leadingClassName","centerClassName","actionsClassName","centerTitle","elevation","transparent","useSafeArea","backgroundColor","foregroundColor","statusBarStyle","statusBarColor","height","bottom","ref","colorScheme","useColorScheme","isDark","defaultHeight","appBarHeight","defaultStatusBarStyle","resolvedStatusBarStyle","bgColor","elevationStyle","renderCenter","jsx","cn","children","jsxs","Text","numberOfLines","ellipsizeMode","renderLeading","LeadingIcon","onPress","accessibilityRole","accessibilityLabel","Icon","as","size","renderActions","length","map","action","index","ActionIcon","icon","disabled","label","iconClassName","Fragment","Platform","OS","StatusBar","barStyle","translucent","SafeAreaView","edges","style","displayName","AppBarVariants","Simple","props","WithBack","WithMenu","Menu","Transparent","Centered","AppBarIcons","MoreVertical"],"sourceRoot":"../../../../src","sources":["components/ui/AppBar.tsx"],"mappings":";;;;;;AACA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAMA,IAAAK,2BAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AAA8B,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAE9B,MAAMkB,IAAI,GAAG,IAAAC,sBAAU,EAACC,iBAAM,EAAE;EAC9BC,SAAS,EAAE;AACb,CAAC,CAA6B;AAC9B,MAAMC,SAAS,GAAG,IAAAH,sBAAU,EAACI,sBAAW,EAAE;EACxCF,SAAS,EAAE;AACb,CAAC,CAA6B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,M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Property(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AspectRatio = void 0;
|
|
7
|
+
var AspectRatioPrimitive = _interopRequireWildcard(require("@rn-primitives/aspect-ratio"));
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
9
|
+
/**
|
|
10
|
+
* Maintains a consistent aspect ratio for its child content
|
|
11
|
+
*
|
|
12
|
+
* Displays content within a desired ratio (e.g., 16/9, 4/3, 1/1) regardless of available space.
|
|
13
|
+
* Commonly used for images, videos, and embedded content that require specific proportions.
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* // 16:9 aspect ratio for video container
|
|
19
|
+
* <AspectRatio ratio={16 / 9} className="bg-muted">
|
|
20
|
+
* <Image source={{uri: 'video-thumbnail.jpg'}} className="h-full w-full rounded-md object-cover" />
|
|
21
|
+
* </AspectRatio>
|
|
22
|
+
*
|
|
23
|
+
* // Square aspect ratio for avatars
|
|
24
|
+
* <AspectRatio ratio={1} className="w-full">
|
|
25
|
+
* <Image source={{uri: 'avatar.jpg'}} className="h-full w-full" />
|
|
26
|
+
* </AspectRatio>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const AspectRatio = exports.AspectRatio = AspectRatioPrimitive.Root;
|
|
30
|
+
//# sourceMappingURL=Aspect-Ratio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AspectRatioPrimitive","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AspectRatio","exports","Root"],"sourceRoot":"../../../../src","sources":["components/ui/Aspect-Ratio.tsx"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAoE,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMkB,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGtB,oBAAoB,CAACwB,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AvatarImage = exports.AvatarFallback = exports.Avatar = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _nativewind = require("nativewind");
|
|
10
|
+
var _utils = require("../../lib/utils");
|
|
11
|
+
var Slot = _interopRequireWildcard(require("@rn-primitives/slot"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const View = (0, _nativewind.cssInterop)(_reactNative.View, {
|
|
15
|
+
className: 'style'
|
|
16
|
+
});
|
|
17
|
+
(0, _nativewind.cssInterop)(Slot.View, {
|
|
18
|
+
className: 'style'
|
|
19
|
+
});
|
|
20
|
+
const Image = (0, _nativewind.cssInterop)(_reactNative.Image, {
|
|
21
|
+
className: 'style'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Avatar container component
|
|
26
|
+
*
|
|
27
|
+
* Circular container for displaying user avatars with images or fallback initials.
|
|
28
|
+
* Use with AvatarImage and AvatarFallback for complete functionality.
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <Avatar>
|
|
34
|
+
* <AvatarImage source={{ uri: userPhoto }} alt="User avatar" />
|
|
35
|
+
* <AvatarFallback>
|
|
36
|
+
* <Text>JD</Text>
|
|
37
|
+
* </AvatarFallback>
|
|
38
|
+
* </Avatar>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @property {boolean} [asChild] - When true, merges props into immediate child
|
|
42
|
+
* @property {string} [className] - Additional Tailwind classes
|
|
43
|
+
*/
|
|
44
|
+
const Avatar = exports.Avatar = /*#__PURE__*/React.forwardRef(({
|
|
45
|
+
className,
|
|
46
|
+
asChild = false,
|
|
47
|
+
...props
|
|
48
|
+
}, ref) => {
|
|
49
|
+
const Component = asChild ? Slot.View : View;
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
51
|
+
className: (0, _utils.cn)('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className),
|
|
52
|
+
ref: ref,
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
Avatar.displayName = 'Avatar';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* AvatarImage - Image component for avatar
|
|
60
|
+
*
|
|
61
|
+
* Displays the user's profile image. Falls back to AvatarFallback if image fails to load.
|
|
62
|
+
*
|
|
63
|
+
* @property {ImageSource} source - Image source (local or remote URI)
|
|
64
|
+
* @property {string} [alt] - Alternative text for accessibility
|
|
65
|
+
* @property {string} [className] - Additional Tailwind classes
|
|
66
|
+
*/
|
|
67
|
+
const AvatarImage = exports.AvatarImage = /*#__PURE__*/React.forwardRef(({
|
|
68
|
+
className,
|
|
69
|
+
...props
|
|
70
|
+
}, ref) => {
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Image, {
|
|
72
|
+
className: (0, _utils.cn)('aspect-square h-full w-full', className),
|
|
73
|
+
ref: ref,
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
AvatarImage.displayName = 'AvatarImage';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* AvatarFallback - Fallback content when image is unavailable
|
|
81
|
+
*
|
|
82
|
+
* Typically displays user initials or an icon. Shows when AvatarImage fails to load
|
|
83
|
+
* or is not provided.
|
|
84
|
+
*
|
|
85
|
+
* @property {boolean} [asChild] - When true, merges props into immediate child
|
|
86
|
+
* @property {string} [className] - Additional Tailwind classes
|
|
87
|
+
*/
|
|
88
|
+
const AvatarFallback = exports.AvatarFallback = /*#__PURE__*/React.forwardRef(({
|
|
89
|
+
className,
|
|
90
|
+
asChild = false,
|
|
91
|
+
...props
|
|
92
|
+
}, ref) => {
|
|
93
|
+
const Component = asChild ? Slot.View : View;
|
|
94
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
95
|
+
className: (0, _utils.cn)('flex h-full w-full items-center justify-center rounded-full bg-muted', className),
|
|
96
|
+
ref: ref,
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
AvatarFallback.displayName = 'AvatarFallback';
|
|
101
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_nativewind","_utils","Slot","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","View","cssInterop","RNView","className","Image","RNImage","Avatar","exports","forwardRef","asChild","props","ref","Component","jsx","cn","displayName","AvatarImage","AvatarFallback"],"sourceRoot":"../../../../src","sources":["components/ui/Avatar.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC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