@campxdev/react-native-blueprint 0.1.9 → 0.1.12
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 +287 -26
- 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/components/ui/index.js +24 -19
- package/lib/module/components/ui/index.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 +65 -65
- package/lib/typescript/{src → commonjs/src}/components/ui/Avatar.d.ts.map +1 -1
- package/lib/typescript/{src → commonjs/src}/components/ui/Badge.d.ts +3 -3
- 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/{src → commonjs/src}/components/ui/Button.d.ts +3 -3
- 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/{src → commonjs/src}/components/ui/index.d.ts +19 -19
- 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 +609 -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/components/ui/index.ts +24 -19
- 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/Bottom-Sheet.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}/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,274 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.THEME_PRESETS = exports.THEME_COLORS = exports.DARK_MODE_CLASSES = void 0;
|
|
7
|
+
exports.getNativeThemeColors = getNativeThemeColors;
|
|
8
|
+
exports.getThemeColorValue = getThemeColorValue;
|
|
9
|
+
exports.hslToRgb = hslToRgb;
|
|
10
|
+
exports.isValidThemeColor = isValidThemeColor;
|
|
11
|
+
exports.withDarkMode = withDarkMode;
|
|
12
|
+
/**
|
|
13
|
+
* Comprehensive Dark Theme Configuration
|
|
14
|
+
*
|
|
15
|
+
* This file provides complete theme tokens and utilities for consistent
|
|
16
|
+
* dark mode support across all components in the Blueprint library.
|
|
17
|
+
*
|
|
18
|
+
* Best Practices:
|
|
19
|
+
* - Uses HSL color format for better color manipulation
|
|
20
|
+
* - Provides semantic color tokens (not raw colors)
|
|
21
|
+
* - Maintains proper contrast ratios for accessibility (WCAG AA/AAA)
|
|
22
|
+
* - Consistent with Tailwind CSS conventions
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Color tokens for light and dark themes
|
|
27
|
+
* Each token follows the pattern: purpose-variant
|
|
28
|
+
*/
|
|
29
|
+
const THEME_COLORS = exports.THEME_COLORS = {
|
|
30
|
+
light: {
|
|
31
|
+
// Base colors
|
|
32
|
+
background: 'hsl(0, 0%, 100%)',
|
|
33
|
+
// Pure white
|
|
34
|
+
foreground: 'hsl(0, 0%, 3.9%)',
|
|
35
|
+
// Near black
|
|
36
|
+
|
|
37
|
+
// Card colors
|
|
38
|
+
card: 'hsl(0, 0%, 100%)',
|
|
39
|
+
cardForeground: 'hsl(0, 0%, 3.9%)',
|
|
40
|
+
// Popover colors
|
|
41
|
+
popover: 'hsl(0, 0%, 100%)',
|
|
42
|
+
popoverForeground: 'hsl(0, 0%, 3.9%)',
|
|
43
|
+
// Primary action colors
|
|
44
|
+
primary: 'hsl(0, 0%, 9%)',
|
|
45
|
+
primaryForeground: 'hsl(0, 0%, 98%)',
|
|
46
|
+
// Secondary action colors
|
|
47
|
+
secondary: 'hsl(0, 0%, 96.1%)',
|
|
48
|
+
secondaryForeground: 'hsl(0, 0%, 9%)',
|
|
49
|
+
// Muted/subtle colors
|
|
50
|
+
muted: 'hsl(0, 0%, 96.1%)',
|
|
51
|
+
mutedForeground: 'hsl(0, 0%, 45.1%)',
|
|
52
|
+
// Accent colors
|
|
53
|
+
accent: 'hsl(0, 0%, 96.1%)',
|
|
54
|
+
accentForeground: 'hsl(0, 0%, 9%)',
|
|
55
|
+
// Destructive/error colors
|
|
56
|
+
destructive: 'hsl(0, 84.2%, 60.2%)',
|
|
57
|
+
destructiveForeground: 'hsl(0, 0%, 98%)',
|
|
58
|
+
// Border and input colors
|
|
59
|
+
border: 'hsl(0, 0%, 89.8%)',
|
|
60
|
+
input: 'hsl(0, 0%, 89.8%)',
|
|
61
|
+
ring: 'hsl(0, 0%, 63%)',
|
|
62
|
+
// Success colors
|
|
63
|
+
success: 'hsl(142, 76%, 36%)',
|
|
64
|
+
successForeground: 'hsl(0, 0%, 98%)',
|
|
65
|
+
// Warning colors
|
|
66
|
+
warning: 'hsl(38, 92%, 50%)',
|
|
67
|
+
warningForeground: 'hsl(0, 0%, 9%)',
|
|
68
|
+
// Info colors
|
|
69
|
+
info: 'hsl(199, 89%, 48%)',
|
|
70
|
+
infoForeground: 'hsl(0, 0%, 98%)'
|
|
71
|
+
},
|
|
72
|
+
dark: {
|
|
73
|
+
// Base colors
|
|
74
|
+
background: 'hsl(0, 0%, 3.9%)',
|
|
75
|
+
// Near black
|
|
76
|
+
foreground: 'hsl(0, 0%, 98%)',
|
|
77
|
+
// Near white
|
|
78
|
+
|
|
79
|
+
// Card colors
|
|
80
|
+
card: 'hsl(0, 0%, 3.9%)',
|
|
81
|
+
cardForeground: 'hsl(0, 0%, 98%)',
|
|
82
|
+
// Popover colors
|
|
83
|
+
popover: 'hsl(0, 0%, 3.9%)',
|
|
84
|
+
popoverForeground: 'hsl(0, 0%, 98%)',
|
|
85
|
+
// Primary action colors (inverted from light)
|
|
86
|
+
primary: 'hsl(0, 0%, 98%)',
|
|
87
|
+
primaryForeground: 'hsl(0, 0%, 9%)',
|
|
88
|
+
// Secondary action colors
|
|
89
|
+
secondary: 'hsl(0, 0%, 14.9%)',
|
|
90
|
+
secondaryForeground: 'hsl(0, 0%, 98%)',
|
|
91
|
+
// Muted/subtle colors
|
|
92
|
+
muted: 'hsl(0, 0%, 14.9%)',
|
|
93
|
+
mutedForeground: 'hsl(0, 0%, 63.9%)',
|
|
94
|
+
// Accent colors
|
|
95
|
+
accent: 'hsl(0, 0%, 14.9%)',
|
|
96
|
+
accentForeground: 'hsl(0, 0%, 98%)',
|
|
97
|
+
// Destructive/error colors
|
|
98
|
+
destructive: 'hsl(0, 62.8%, 30.6%)',
|
|
99
|
+
destructiveForeground: 'hsl(0, 0%, 98%)',
|
|
100
|
+
// Border and input colors
|
|
101
|
+
border: 'hsl(0, 0%, 14.9%)',
|
|
102
|
+
input: 'hsl(0, 0%, 14.9%)',
|
|
103
|
+
ring: 'hsl(0, 0%, 45%)',
|
|
104
|
+
// Success colors
|
|
105
|
+
success: 'hsl(142, 76%, 36%)',
|
|
106
|
+
successForeground: 'hsl(0, 0%, 98%)',
|
|
107
|
+
// Warning colors
|
|
108
|
+
warning: 'hsl(38, 92%, 50%)',
|
|
109
|
+
warningForeground: 'hsl(0, 0%, 9%)',
|
|
110
|
+
// Info colors
|
|
111
|
+
info: 'hsl(199, 89%, 48%)',
|
|
112
|
+
infoForeground: 'hsl(0, 0%, 98%)'
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Convert HSL string to React Native ColorValue
|
|
118
|
+
* Useful for native platform styling where HSL needs to be converted
|
|
119
|
+
*/
|
|
120
|
+
function hslToRgb(hsl) {
|
|
121
|
+
// Extract h, s, l from "hsl(h, s%, l%)" format
|
|
122
|
+
const match = hsl.match(/hsl\((\d+),\s*(\d+(?:\.\d+)?)%,\s*(\d+(?:\.\d+)?)%\)/);
|
|
123
|
+
if (!match || !match[1] || !match[2] || !match[3]) return hsl;
|
|
124
|
+
const h = parseInt(match[1], 10) / 360;
|
|
125
|
+
const s = parseFloat(match[2]) / 100;
|
|
126
|
+
const l = parseFloat(match[3]) / 100;
|
|
127
|
+
let r, g, b;
|
|
128
|
+
if (s === 0) {
|
|
129
|
+
r = g = b = l;
|
|
130
|
+
} else {
|
|
131
|
+
const hue2rgb = (p, q, t) => {
|
|
132
|
+
if (t < 0) t += 1;
|
|
133
|
+
if (t > 1) t -= 1;
|
|
134
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
135
|
+
if (t < 1 / 2) return q;
|
|
136
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
137
|
+
return p;
|
|
138
|
+
};
|
|
139
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
140
|
+
const p = 2 * l - q;
|
|
141
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
142
|
+
g = hue2rgb(p, q, h);
|
|
143
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
144
|
+
}
|
|
145
|
+
const toHex = x => {
|
|
146
|
+
const hex = Math.round(x * 255).toString(16);
|
|
147
|
+
return hex.length === 1 ? '0' + hex : hex;
|
|
148
|
+
};
|
|
149
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Get theme color value based on current theme mode
|
|
154
|
+
* Automatically selects the appropriate color from light/dark theme
|
|
155
|
+
*/
|
|
156
|
+
function getThemeColorValue(colorKey, isDark, asRgb = false) {
|
|
157
|
+
const color = isDark ? THEME_COLORS.dark[colorKey] : THEME_COLORS.light[colorKey];
|
|
158
|
+
return asRgb ? hslToRgb(color) : color;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Component-specific dark mode class mappings
|
|
163
|
+
* Use these to ensure consistent styling across all components
|
|
164
|
+
*/
|
|
165
|
+
const DARK_MODE_CLASSES = exports.DARK_MODE_CLASSES = {
|
|
166
|
+
// Text variants
|
|
167
|
+
text: {
|
|
168
|
+
default: 'dark:text-foreground',
|
|
169
|
+
muted: 'dark:text-muted-foreground',
|
|
170
|
+
primary: 'dark:text-primary-foreground',
|
|
171
|
+
secondary: 'dark:text-secondary-foreground',
|
|
172
|
+
accent: 'dark:text-accent-foreground',
|
|
173
|
+
destructive: 'dark:text-destructive-foreground',
|
|
174
|
+
card: 'dark:text-card-foreground'
|
|
175
|
+
},
|
|
176
|
+
// Background variants
|
|
177
|
+
background: {
|
|
178
|
+
default: 'dark:bg-background',
|
|
179
|
+
card: 'dark:bg-card',
|
|
180
|
+
primary: 'dark:bg-primary',
|
|
181
|
+
secondary: 'dark:bg-secondary',
|
|
182
|
+
muted: 'dark:bg-muted',
|
|
183
|
+
accent: 'dark:bg-accent',
|
|
184
|
+
destructive: 'dark:bg-destructive',
|
|
185
|
+
popover: 'dark:bg-popover'
|
|
186
|
+
},
|
|
187
|
+
// Border variants
|
|
188
|
+
border: {
|
|
189
|
+
default: 'dark:border-border',
|
|
190
|
+
input: 'dark:border-input',
|
|
191
|
+
primary: 'dark:border-primary',
|
|
192
|
+
muted: 'dark:border-muted',
|
|
193
|
+
accent: 'dark:border-accent',
|
|
194
|
+
destructive: 'dark:border-destructive'
|
|
195
|
+
},
|
|
196
|
+
// Interactive states
|
|
197
|
+
state: {
|
|
198
|
+
hover: 'dark:hover:bg-accent',
|
|
199
|
+
active: 'dark:active:bg-accent',
|
|
200
|
+
focus: 'dark:focus:ring-ring',
|
|
201
|
+
disabled: 'dark:disabled:opacity-50'
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Helper to combine base classes with dark mode classes
|
|
207
|
+
* Ensures consistent application of dark mode styles
|
|
208
|
+
*/
|
|
209
|
+
function withDarkMode(baseClass, darkClass, additionalClasses) {
|
|
210
|
+
return [baseClass, darkClass, additionalClasses].filter(Boolean).join(' ');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Pre-configured class strings for common component patterns
|
|
215
|
+
* Use these for consistent styling across the library
|
|
216
|
+
*/
|
|
217
|
+
const THEME_PRESETS = exports.THEME_PRESETS = {
|
|
218
|
+
// Card-like containers
|
|
219
|
+
card: 'bg-card text-card-foreground dark:bg-card dark:text-card-foreground border border-border dark:border-border',
|
|
220
|
+
// Input fields
|
|
221
|
+
input: 'bg-background text-foreground dark:bg-background dark:text-foreground border border-input dark:border-input',
|
|
222
|
+
// Buttons - primary
|
|
223
|
+
buttonPrimary: 'bg-primary text-primary-foreground dark:bg-primary dark:text-primary-foreground',
|
|
224
|
+
// Buttons - secondary
|
|
225
|
+
buttonSecondary: 'bg-secondary text-secondary-foreground dark:bg-secondary dark:text-secondary-foreground',
|
|
226
|
+
// Buttons - outline
|
|
227
|
+
buttonOutline: 'bg-background text-foreground dark:bg-background dark:text-foreground border border-input dark:border-input',
|
|
228
|
+
// Buttons - ghost
|
|
229
|
+
buttonGhost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground',
|
|
230
|
+
// Destructive elements
|
|
231
|
+
destructive: 'bg-destructive text-destructive-foreground dark:bg-destructive dark:text-destructive-foreground',
|
|
232
|
+
// Muted/subtle elements
|
|
233
|
+
muted: 'bg-muted text-muted-foreground dark:bg-muted dark:text-muted-foreground',
|
|
234
|
+
// Popover/dropdown
|
|
235
|
+
popover: 'bg-popover text-popover-foreground dark:bg-popover dark:text-popover-foreground border border-border dark:border-border'
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Semantic color map for native components
|
|
240
|
+
* Use these for StyleSheet-based styling
|
|
241
|
+
*/
|
|
242
|
+
function getNativeThemeColors(isDark) {
|
|
243
|
+
return {
|
|
244
|
+
background: hslToRgb(getThemeColorValue('background', isDark)),
|
|
245
|
+
foreground: hslToRgb(getThemeColorValue('foreground', isDark)),
|
|
246
|
+
card: hslToRgb(getThemeColorValue('card', isDark)),
|
|
247
|
+
cardForeground: hslToRgb(getThemeColorValue('cardForeground', isDark)),
|
|
248
|
+
primary: hslToRgb(getThemeColorValue('primary', isDark)),
|
|
249
|
+
primaryForeground: hslToRgb(getThemeColorValue('primaryForeground', isDark)),
|
|
250
|
+
secondary: hslToRgb(getThemeColorValue('secondary', isDark)),
|
|
251
|
+
secondaryForeground: hslToRgb(getThemeColorValue('secondaryForeground', isDark)),
|
|
252
|
+
muted: hslToRgb(getThemeColorValue('muted', isDark)),
|
|
253
|
+
mutedForeground: hslToRgb(getThemeColorValue('mutedForeground', isDark)),
|
|
254
|
+
accent: hslToRgb(getThemeColorValue('accent', isDark)),
|
|
255
|
+
accentForeground: hslToRgb(getThemeColorValue('accentForeground', isDark)),
|
|
256
|
+
destructive: hslToRgb(getThemeColorValue('destructive', isDark)),
|
|
257
|
+
destructiveForeground: hslToRgb(getThemeColorValue('destructiveForeground', isDark)),
|
|
258
|
+
border: hslToRgb(getThemeColorValue('border', isDark)),
|
|
259
|
+
input: hslToRgb(getThemeColorValue('input', isDark)),
|
|
260
|
+
ring: hslToRgb(getThemeColorValue('ring', isDark))
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Type-safe theme color keys
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Check if a color key exists in the theme
|
|
270
|
+
*/
|
|
271
|
+
function isValidThemeColor(key) {
|
|
272
|
+
return key in THEME_COLORS.light;
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=theme-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["THEME_COLORS","exports","light","background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","destructive","destructiveForeground","border","input","ring","success","successForeground","warning","warningForeground","info","infoForeground","dark","hslToRgb","hsl","match","h","parseInt","s","parseFloat","l","r","g","b","hue2rgb","p","q","t","toHex","x","hex","Math","round","toString","length","getThemeColorValue","colorKey","isDark","asRgb","color","DARK_MODE_CLASSES","text","default","state","hover","active","focus","disabled","withDarkMode","baseClass","darkClass","additionalClasses","filter","Boolean","join","THEME_PRESETS","buttonPrimary","buttonSecondary","buttonOutline","buttonGhost","getNativeThemeColors","isValidThemeColor","key"],"sourceRoot":"../../../src","sources":["components/theme-config.ts"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACO,MAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,KAAK,EAAE;IACL;IACAC,UAAU,EAAE,kBAAkB;IAAE;IAChCC,UAAU,EAAE,kBAAkB;IAAE;;IAEhC;IACAC,IAAI,EAAE,kBAAkB;IACxBC,cAAc,EAAE,kBAAkB;IAElC;IACAC,OAAO,EAAE,kBAAkB;IAC3BC,iBAAiB,EAAE,kBAAkB;IAErC;IACAC,OAAO,EAAE,gBAAgB;IACzBC,iBAAiB,EAAE,iBAAiB;IAEpC;IACAC,SAAS,EAAE,mBAAmB;IAC9BC,mBAAmB,EAAE,gBAAgB;IAErC;IACAC,KAAK,EAAE,mBAAmB;IAC1BC,eAAe,EAAE,mBAAmB;IAEpC;IACAC,MAAM,EAAE,mBAAmB;IAC3BC,gBAAgB,EAAE,gBAAgB;IAElC;IACAC,WAAW,EAAE,sBAAsB;IACnCC,qBAAqB,EAAE,iBAAiB;IAExC;IACAC,MAAM,EAAE,mBAAmB;IAC3BC,KAAK,EAAE,mBAAmB;IAC1BC,IAAI,EAAE,iBAAiB;IAEvB;IACAC,OAAO,EAAE,oBAAoB;IAC7BC,iBAAiB,EAAE,iBAAiB;IAEpC;IACAC,OAAO,EAAE,mBAAmB;IAC5BC,iBAAiB,EAAE,gBAAgB;IAEnC;IACAC,IAAI,EAAE,oBAAoB;IAC1BC,cAAc,EAAE;EAClB,CAAC;EACDC,IAAI,EAAE;IACJ;IACAzB,UAAU,EAAE,kBAAkB;IAAE;IAChCC,UAAU,EAAE,iBAAiB;IAAE;;IAE/B;IACAC,IAAI,EAAE,kBAAkB;IACxBC,cAAc,EAAE,iBAAiB;IAEjC;IACAC,OAAO,EAAE,kBA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":[]}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Accordion = Accordion;
|
|
7
|
+
exports.AccordionContent = AccordionContent;
|
|
8
|
+
exports.AccordionItem = AccordionItem;
|
|
9
|
+
exports.AccordionTrigger = AccordionTrigger;
|
|
10
|
+
var AccordionPrimitive = _interopRequireWildcard(require("@rn-primitives/accordion"));
|
|
11
|
+
var _lucideReactNative = require("lucide-react-native");
|
|
12
|
+
var _nativewind = require("nativewind");
|
|
13
|
+
var _reactNative = require("react-native");
|
|
14
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
15
|
+
var _utils = require("../../lib/utils");
|
|
16
|
+
var _Icon = require("./Icon");
|
|
17
|
+
var _Text = require("./Text");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
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); }
|
|
20
|
+
(0, _nativewind.cssInterop)(_reactNative.View, {
|
|
21
|
+
className: 'style'
|
|
22
|
+
});
|
|
23
|
+
(0, _nativewind.cssInterop)(_reactNative.Pressable, {
|
|
24
|
+
className: 'style'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Root accordion container with smooth animations
|
|
29
|
+
*
|
|
30
|
+
* A vertically stacked set of interactive panels where only one or multiple panels can be expanded at a time.
|
|
31
|
+
* Features smooth layout animations using Reanimated for a polished user experience.
|
|
32
|
+
*
|
|
33
|
+
* @component
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Single selection
|
|
37
|
+
* <Accordion type="single" collapsible defaultValue="item-1">
|
|
38
|
+
* <AccordionItem value="item-1">
|
|
39
|
+
* <AccordionTrigger>
|
|
40
|
+
* <Text>Question 1</Text>
|
|
41
|
+
* </AccordionTrigger>
|
|
42
|
+
* <AccordionContent>
|
|
43
|
+
* <Text>Answer 1</Text>
|
|
44
|
+
* </AccordionContent>
|
|
45
|
+
* </AccordionItem>
|
|
46
|
+
* </Accordion>
|
|
47
|
+
*
|
|
48
|
+
* // Multiple selection
|
|
49
|
+
* <Accordion type="multiple">
|
|
50
|
+
* <AccordionItem value="item-1">
|
|
51
|
+
* <AccordionTrigger><Text>Section 1</Text></AccordionTrigger>
|
|
52
|
+
* <AccordionContent><Text>Content 1</Text></AccordionContent>
|
|
53
|
+
* </AccordionItem>
|
|
54
|
+
* <AccordionItem value="item-2">
|
|
55
|
+
* <AccordionTrigger><Text>Section 2</Text></AccordionTrigger>
|
|
56
|
+
* <AccordionContent><Text>Content 2</Text></AccordionContent>
|
|
57
|
+
* </AccordionItem>
|
|
58
|
+
* </Accordion>
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @accessibility
|
|
62
|
+
* - Implements WAI-ARIA accordion pattern
|
|
63
|
+
* - Keyboard navigation with arrow keys and Enter/Space
|
|
64
|
+
* - Proper ARIA attributes for expanded/collapsed states
|
|
65
|
+
*/
|
|
66
|
+
function Accordion({
|
|
67
|
+
children,
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.LayoutAnimationConfig, {
|
|
71
|
+
skipEntering: true,
|
|
72
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionPrimitive.Root, {
|
|
73
|
+
...props,
|
|
74
|
+
asChild: _reactNative.Platform.OS !== 'web',
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
76
|
+
layout: _reactNativeReanimated.LinearTransition.duration(200),
|
|
77
|
+
children: children
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Individual accordion item with border styling
|
|
85
|
+
*
|
|
86
|
+
* Contains a trigger and content section. Each item must have a unique value prop
|
|
87
|
+
* for identification within the parent Accordion.
|
|
88
|
+
*
|
|
89
|
+
* @component
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* <AccordionItem value="item-1">
|
|
93
|
+
* <AccordionTrigger>
|
|
94
|
+
* <Text>Click to expand</Text>
|
|
95
|
+
* </AccordionTrigger>
|
|
96
|
+
* <AccordionContent>
|
|
97
|
+
* <Text>Hidden content revealed on expansion</Text>
|
|
98
|
+
* </AccordionContent>
|
|
99
|
+
* </AccordionItem>
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
function AccordionItem({
|
|
103
|
+
children,
|
|
104
|
+
className,
|
|
105
|
+
value,
|
|
106
|
+
...props
|
|
107
|
+
}) {
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionPrimitive.Item, {
|
|
109
|
+
className: (0, _utils.cn)('border-border border-b', _reactNative.Platform.select({
|
|
110
|
+
web: 'last:border-b-0'
|
|
111
|
+
}), className),
|
|
112
|
+
value: value,
|
|
113
|
+
asChild: true,
|
|
114
|
+
...props,
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
116
|
+
className: "native:overflow-hidden",
|
|
117
|
+
layout: _reactNative.Platform.select({
|
|
118
|
+
native: _reactNativeReanimated.LinearTransition.duration(200)
|
|
119
|
+
}),
|
|
120
|
+
children: children
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
const Trigger = _reactNative.Platform.OS === 'web' ? _reactNative.View : _reactNative.Pressable;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Clickable trigger button that toggles accordion item expansion
|
|
128
|
+
*
|
|
129
|
+
* Features an animated chevron icon that rotates based on expansion state.
|
|
130
|
+
* Automatically manages focus states and hover effects on web.
|
|
131
|
+
*
|
|
132
|
+
* @component
|
|
133
|
+
* @example
|
|
134
|
+
* ```tsx
|
|
135
|
+
* <AccordionTrigger>
|
|
136
|
+
* <Text>Click to toggle</Text>
|
|
137
|
+
* </AccordionTrigger>
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @accessibility
|
|
141
|
+
* - Automatically includes chevron icon for visual expansion indicator
|
|
142
|
+
* - Focus visible states for keyboard navigation on web
|
|
143
|
+
* - Disabled state prevents interaction
|
|
144
|
+
*/
|
|
145
|
+
function AccordionTrigger({
|
|
146
|
+
className,
|
|
147
|
+
children,
|
|
148
|
+
...props
|
|
149
|
+
}) {
|
|
150
|
+
const {
|
|
151
|
+
isExpanded
|
|
152
|
+
} = AccordionPrimitive.useItemContext();
|
|
153
|
+
const progress = (0, _reactNativeReanimated.useDerivedValue)(() => isExpanded ? (0, _reactNativeReanimated.withTiming)(1, {
|
|
154
|
+
duration: 250
|
|
155
|
+
}) : (0, _reactNativeReanimated.withTiming)(0, {
|
|
156
|
+
duration: 200
|
|
157
|
+
}), [isExpanded]);
|
|
158
|
+
const chevronStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
159
|
+
transform: [{
|
|
160
|
+
rotate: `${progress.value * 180}deg`
|
|
161
|
+
}]
|
|
162
|
+
}), [progress]);
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.TextClassContext.Provider, {
|
|
164
|
+
value: (0, _utils.cn)('text-foreground text-left text-sm font-medium', _reactNative.Platform.select({
|
|
165
|
+
web: 'group-hover:underline'
|
|
166
|
+
})),
|
|
167
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionPrimitive.Header, {
|
|
168
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionPrimitive.Trigger, {
|
|
169
|
+
...props,
|
|
170
|
+
asChild: true,
|
|
171
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Trigger, {
|
|
172
|
+
className: (0, _utils.cn)('flex-row items-start justify-between gap-4 rounded-md py-4 disabled:opacity-50', _reactNative.Platform.select({
|
|
173
|
+
web: 'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 outline-none transition-all hover:underline focus-visible:ring-[3px] disabled:pointer-events-none [&[data-state=open]>svg]:rotate-180'
|
|
174
|
+
}), className),
|
|
175
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
176
|
+
children: children
|
|
177
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
178
|
+
style: chevronStyle,
|
|
179
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
180
|
+
as: _lucideReactNative.ChevronDown,
|
|
181
|
+
size: 16,
|
|
182
|
+
className: (0, _utils.cn)('text-muted-foreground shrink-0', _reactNative.Platform.select({
|
|
183
|
+
web: 'pointer-events-none translate-y-0.5 transition-transform duration-200'
|
|
184
|
+
}))
|
|
185
|
+
})
|
|
186
|
+
})]
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Collapsible content container with smooth animations
|
|
195
|
+
*
|
|
196
|
+
* Automatically animates height changes when expanding/collapsing. Uses platform-specific
|
|
197
|
+
* animations (CSS transitions on web, Reanimated on native).
|
|
198
|
+
*
|
|
199
|
+
* @component
|
|
200
|
+
* @example
|
|
201
|
+
* ```tsx
|
|
202
|
+
* <AccordionContent>
|
|
203
|
+
* <Text>This content slides in and out smoothly</Text>
|
|
204
|
+
* <View className="mt-2">
|
|
205
|
+
* <Text>Additional content here</Text>
|
|
206
|
+
* </View>
|
|
207
|
+
* </AccordionContent>
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
function AccordionContent({
|
|
211
|
+
className,
|
|
212
|
+
children,
|
|
213
|
+
...props
|
|
214
|
+
}) {
|
|
215
|
+
const {
|
|
216
|
+
isExpanded
|
|
217
|
+
} = AccordionPrimitive.useItemContext();
|
|
218
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.TextClassContext.Provider, {
|
|
219
|
+
value: "text-foreground text-sm",
|
|
220
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AccordionPrimitive.Content, {
|
|
221
|
+
className: (0, _utils.cn)('overflow-hidden', _reactNative.Platform.select({
|
|
222
|
+
web: isExpanded ? 'animate-accordion-down' : 'animate-accordion-up'
|
|
223
|
+
})),
|
|
224
|
+
...props,
|
|
225
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
226
|
+
exiting: _reactNative.Platform.select({
|
|
227
|
+
native: _reactNativeReanimated.FadeOutUp.duration(200)
|
|
228
|
+
}),
|
|
229
|
+
className: (0, _utils.cn)('pb-4', className),
|
|
230
|
+
children: children
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AccordionPrimitive","_interopRequireWildcard","require","_lucideReactNative","_nativewind","_reactNative","_reactNativeReanimated","_utils","_Icon","_Text","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","cssInterop","View","className","Pressable","Accordion","children","props","jsx","LayoutAnimationConfig","skipEntering","Root","asChild","Platform","OS","layout","LinearTransition","duration","AccordionItem","value","Item","cn","select","web","native","Trigger","AccordionTrigger","isExpanded","useItemContext","progress","useDerivedValue","withTiming","chevronStyle","useAnimatedStyle","transform","rotate","TextClassContext","Provider","Header","jsxs","Fragment","style","Icon","as","ChevronDown","size","AccordionContent","Content","exiting","FadeOutUp"],"sourceRoot":"../../../../src","sources":["components/ui/Accordion.tsx"],"mappings":";;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAL,uBAAA,CAAAC,OAAA;AAQA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAA0C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAD,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAU,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,CA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