@webority-technologies/mobile-ui 0.0.1
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 +15 -0
- package/lib/commonjs/components/Accordion/Accordion.js +331 -0
- package/lib/commonjs/components/Accordion/index.js +26 -0
- package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +71 -0
- package/lib/commonjs/components/AnimatePresence/index.js +13 -0
- package/lib/commonjs/components/AppBar/AppBar.js +355 -0
- package/lib/commonjs/components/AppBar/index.js +20 -0
- package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +87 -0
- package/lib/commonjs/components/AsyncBlock/index.js +20 -0
- package/lib/commonjs/components/Autocomplete/Autocomplete.js +225 -0
- package/lib/commonjs/components/Autocomplete/index.js +13 -0
- package/lib/commonjs/components/Avatar/Avatar.js +348 -0
- package/lib/commonjs/components/Avatar/index.js +26 -0
- package/lib/commonjs/components/Badge/Badge.js +295 -0
- package/lib/commonjs/components/Badge/index.js +20 -0
- package/lib/commonjs/components/Banner/Banner.js +395 -0
- package/lib/commonjs/components/Banner/index.js +20 -0
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +336 -0
- package/lib/commonjs/components/BottomNavigation/index.js +20 -0
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +558 -0
- package/lib/commonjs/components/BottomSheet/index.js +26 -0
- package/lib/commonjs/components/Box/Box.js +204 -0
- package/lib/commonjs/components/Box/index.js +37 -0
- package/lib/commonjs/components/Button/Button.js +316 -0
- package/lib/commonjs/components/Button/index.js +20 -0
- package/lib/commonjs/components/Card/Card.js +314 -0
- package/lib/commonjs/components/Card/index.js +20 -0
- package/lib/commonjs/components/Carousel/Carousel.js +582 -0
- package/lib/commonjs/components/Carousel/index.js +20 -0
- package/lib/commonjs/components/Checkbox/Checkbox.js +184 -0
- package/lib/commonjs/components/Checkbox/index.js +20 -0
- package/lib/commonjs/components/Chip/Chip.js +347 -0
- package/lib/commonjs/components/Chip/index.js +20 -0
- package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +250 -0
- package/lib/commonjs/components/ChoiceGroup/index.js +20 -0
- package/lib/commonjs/components/Confetti/Confetti.js +177 -0
- package/lib/commonjs/components/Confetti/index.js +13 -0
- package/lib/commonjs/components/DatePicker/DatePicker.js +995 -0
- package/lib/commonjs/components/DatePicker/index.js +20 -0
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +745 -0
- package/lib/commonjs/components/DateRangePicker/index.js +20 -0
- package/lib/commonjs/components/Descriptions/Descriptions.js +107 -0
- package/lib/commonjs/components/Descriptions/index.js +20 -0
- package/lib/commonjs/components/Dialog/Dialog.js +245 -0
- package/lib/commonjs/components/Dialog/index.js +20 -0
- package/lib/commonjs/components/Divider/Divider.js +117 -0
- package/lib/commonjs/components/Divider/index.js +20 -0
- package/lib/commonjs/components/Drawer/Drawer.js +379 -0
- package/lib/commonjs/components/Drawer/index.js +20 -0
- package/lib/commonjs/components/EmptyState/EmptyState.js +207 -0
- package/lib/commonjs/components/EmptyState/index.js +20 -0
- package/lib/commonjs/components/FieldBase/Chevron.js +81 -0
- package/lib/commonjs/components/FieldBase/FieldBase.js +521 -0
- package/lib/commonjs/components/FieldBase/index.js +38 -0
- package/lib/commonjs/components/FilePicker/FilePicker.js +783 -0
- package/lib/commonjs/components/FilePicker/index.js +26 -0
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +517 -0
- package/lib/commonjs/components/FloatingActionButton/index.js +26 -0
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +90 -0
- package/lib/commonjs/components/ForceUpdateDialog/index.js +20 -0
- package/lib/commonjs/components/FormField/FormField.js +162 -0
- package/lib/commonjs/components/FormField/index.js +20 -0
- package/lib/commonjs/components/IconButton/IconButton.js +180 -0
- package/lib/commonjs/components/IconButton/index.js +13 -0
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +581 -0
- package/lib/commonjs/components/ImageGallery/index.js +20 -0
- package/lib/commonjs/components/InlineSelect/InlineSelect.js +178 -0
- package/lib/commonjs/components/InlineSelect/index.js +20 -0
- package/lib/commonjs/components/Input/Input.js +402 -0
- package/lib/commonjs/components/Input/index.js +20 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +115 -0
- package/lib/commonjs/components/KeyboardAwareScrollView/index.js +13 -0
- package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.js +135 -0
- package/lib/commonjs/components/KeyboardToolbar/index.js +13 -0
- package/lib/commonjs/components/ListItem/ListItem.js +338 -0
- package/lib/commonjs/components/ListItem/index.js +20 -0
- package/lib/commonjs/components/Modal/Modal.js +356 -0
- package/lib/commonjs/components/Modal/index.js +26 -0
- package/lib/commonjs/components/NumberInput/NumberInput.js +381 -0
- package/lib/commonjs/components/NumberInput/index.js +20 -0
- package/lib/commonjs/components/OTPInput/OTPInput.js +441 -0
- package/lib/commonjs/components/OTPInput/index.js +20 -0
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +450 -0
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +243 -0
- package/lib/commonjs/components/PhoneNumberInput/index.js +32 -0
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +156 -0
- package/lib/commonjs/components/PickerTrigger/index.js +20 -0
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +198 -0
- package/lib/commonjs/components/ProgressBar/index.js +20 -0
- package/lib/commonjs/components/Radio/Radio.js +117 -0
- package/lib/commonjs/components/Radio/RadioDot.js +105 -0
- package/lib/commonjs/components/Radio/RadioGroup.js +50 -0
- package/lib/commonjs/components/Radio/index.js +46 -0
- package/lib/commonjs/components/Rating/Rating.js +333 -0
- package/lib/commonjs/components/Rating/index.js +20 -0
- package/lib/commonjs/components/Repeater/Repeater.js +141 -0
- package/lib/commonjs/components/Repeater/index.js +20 -0
- package/lib/commonjs/components/SearchBar/SearchBar.js +284 -0
- package/lib/commonjs/components/SearchBar/index.js +20 -0
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +209 -0
- package/lib/commonjs/components/SegmentedControl/index.js +20 -0
- package/lib/commonjs/components/Select/Select.js +270 -0
- package/lib/commonjs/components/Select/index.js +20 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js +293 -0
- package/lib/commonjs/components/Skeleton/SkeletonClock.js +118 -0
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +309 -0
- package/lib/commonjs/components/Skeleton/SkeletonList.js +92 -0
- package/lib/commonjs/components/Skeleton/SkeletonProvider.js +114 -0
- package/lib/commonjs/components/Skeleton/SkeletonSkip.js +37 -0
- package/lib/commonjs/components/Skeleton/index.js +85 -0
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +258 -0
- package/lib/commonjs/components/SlideToConfirm/index.js +13 -0
- package/lib/commonjs/components/Slider/Slider.js +502 -0
- package/lib/commonjs/components/Slider/index.js +20 -0
- package/lib/commonjs/components/Spinner/Spinner.js +183 -0
- package/lib/commonjs/components/Spinner/index.js +20 -0
- package/lib/commonjs/components/Stepper/Stepper.js +595 -0
- package/lib/commonjs/components/Stepper/index.js +20 -0
- package/lib/commonjs/components/Swipeable/Swipeable.js +380 -0
- package/lib/commonjs/components/Swipeable/index.js +20 -0
- package/lib/commonjs/components/Switch/Switch.js +230 -0
- package/lib/commonjs/components/Switch/index.js +20 -0
- package/lib/commonjs/components/Tabs/Tabs.js +289 -0
- package/lib/commonjs/components/Tabs/index.js +20 -0
- package/lib/commonjs/components/TagInput/TagInput.js +174 -0
- package/lib/commonjs/components/TagInput/index.js +20 -0
- package/lib/commonjs/components/Text/Text.js +146 -0
- package/lib/commonjs/components/Text/index.js +13 -0
- package/lib/commonjs/components/TimePicker/TimePicker.js +692 -0
- package/lib/commonjs/components/TimePicker/index.js +20 -0
- package/lib/commonjs/components/Timeline/Timeline.js +147 -0
- package/lib/commonjs/components/Timeline/index.js +20 -0
- package/lib/commonjs/components/Toast/Toast.js +322 -0
- package/lib/commonjs/components/Toast/ToastProvider.js +199 -0
- package/lib/commonjs/components/Toast/index.js +39 -0
- package/lib/commonjs/components/Tooltip/Tooltip.js +410 -0
- package/lib/commonjs/components/Tooltip/index.js +20 -0
- package/lib/commonjs/components/index.js +596 -0
- package/lib/commonjs/form/FormContext.js +40 -0
- package/lib/commonjs/form/index.js +68 -0
- package/lib/commonjs/form/path.js +91 -0
- package/lib/commonjs/form/rules.js +73 -0
- package/lib/commonjs/form/types.js +2 -0
- package/lib/commonjs/form/useField.js +54 -0
- package/lib/commonjs/form/useForm.js +364 -0
- package/lib/commonjs/hooks/index.js +41 -0
- package/lib/commonjs/hooks/useControllableState.js +32 -0
- package/lib/commonjs/hooks/useDebounce.js +17 -0
- package/lib/commonjs/hooks/usePressAnimation.js +47 -0
- package/lib/commonjs/hooks/useReducedMotion.js +33 -0
- package/lib/commonjs/hooks/useToggle.js +22 -0
- package/lib/commonjs/index.js +341 -0
- package/lib/commonjs/initUI.js +24 -0
- package/lib/commonjs/network/NetworkStatusBanner.js +89 -0
- package/lib/commonjs/network/index.js +13 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/Gradient.js +56 -0
- package/lib/commonjs/theme/ThemeContext.js +101 -0
- package/lib/commonjs/theme/animatedValue.js +54 -0
- package/lib/commonjs/theme/index.js +127 -0
- package/lib/commonjs/theme/merge.js +30 -0
- package/lib/commonjs/theme/textStyle.js +39 -0
- package/lib/commonjs/theme/tokens.js +652 -0
- package/lib/commonjs/theme/types.js +6 -0
- package/lib/commonjs/utils/dimensions.js +31 -0
- package/lib/commonjs/utils/feedback.js +76 -0
- package/lib/commonjs/utils/hapticUtils.js +67 -0
- package/lib/commonjs/utils/index.js +114 -0
- package/lib/commonjs/utils/responsive.js +48 -0
- package/lib/commonjs/utils/shadows.js +12 -0
- package/lib/commonjs/utils/spacing.js +86 -0
- package/lib/commonjs/utils/warnUnknownProps.js +46 -0
- package/lib/module/components/Accordion/Accordion.js +325 -0
- package/lib/module/components/Accordion/index.js +4 -0
- package/lib/module/components/AnimatePresence/AnimatePresence.js +65 -0
- package/lib/module/components/AnimatePresence/index.js +4 -0
- package/lib/module/components/AppBar/AppBar.js +351 -0
- package/lib/module/components/AppBar/index.js +4 -0
- package/lib/module/components/AsyncBlock/AsyncBlock.js +81 -0
- package/lib/module/components/AsyncBlock/index.js +4 -0
- package/lib/module/components/Autocomplete/Autocomplete.js +220 -0
- package/lib/module/components/Autocomplete/index.js +4 -0
- package/lib/module/components/Avatar/Avatar.js +343 -0
- package/lib/module/components/Avatar/index.js +4 -0
- package/lib/module/components/Badge/Badge.js +291 -0
- package/lib/module/components/Badge/index.js +4 -0
- package/lib/module/components/Banner/Banner.js +391 -0
- package/lib/module/components/Banner/index.js +4 -0
- package/lib/module/components/BottomNavigation/BottomNavigation.js +332 -0
- package/lib/module/components/BottomNavigation/index.js +4 -0
- package/lib/module/components/BottomSheet/BottomSheet.js +553 -0
- package/lib/module/components/BottomSheet/index.js +4 -0
- package/lib/module/components/Box/Box.js +198 -0
- package/lib/module/components/Box/index.js +4 -0
- package/lib/module/components/Button/Button.js +312 -0
- package/lib/module/components/Button/index.js +4 -0
- package/lib/module/components/Card/Card.js +310 -0
- package/lib/module/components/Card/index.js +4 -0
- package/lib/module/components/Carousel/Carousel.js +578 -0
- package/lib/module/components/Carousel/index.js +4 -0
- package/lib/module/components/Checkbox/Checkbox.js +181 -0
- package/lib/module/components/Checkbox/index.js +4 -0
- package/lib/module/components/Chip/Chip.js +343 -0
- package/lib/module/components/Chip/index.js +4 -0
- package/lib/module/components/ChoiceGroup/ChoiceGroup.js +246 -0
- package/lib/module/components/ChoiceGroup/index.js +4 -0
- package/lib/module/components/Confetti/Confetti.js +173 -0
- package/lib/module/components/Confetti/index.js +4 -0
- package/lib/module/components/DatePicker/DatePicker.js +990 -0
- package/lib/module/components/DatePicker/index.js +4 -0
- package/lib/module/components/DateRangePicker/DateRangePicker.js +742 -0
- package/lib/module/components/DateRangePicker/index.js +4 -0
- package/lib/module/components/Descriptions/Descriptions.js +101 -0
- package/lib/module/components/Descriptions/index.js +4 -0
- package/lib/module/components/Dialog/Dialog.js +240 -0
- package/lib/module/components/Dialog/index.js +4 -0
- package/lib/module/components/Divider/Divider.js +114 -0
- package/lib/module/components/Divider/index.js +4 -0
- package/lib/module/components/Drawer/Drawer.js +375 -0
- package/lib/module/components/Drawer/index.js +4 -0
- package/lib/module/components/EmptyState/EmptyState.js +203 -0
- package/lib/module/components/EmptyState/index.js +4 -0
- package/lib/module/components/FieldBase/Chevron.js +75 -0
- package/lib/module/components/FieldBase/FieldBase.js +511 -0
- package/lib/module/components/FieldBase/index.js +4 -0
- package/lib/module/components/FilePicker/FilePicker.js +778 -0
- package/lib/module/components/FilePicker/index.js +4 -0
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +512 -0
- package/lib/module/components/FloatingActionButton/index.js +4 -0
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +84 -0
- package/lib/module/components/ForceUpdateDialog/index.js +4 -0
- package/lib/module/components/FormField/FormField.js +158 -0
- package/lib/module/components/FormField/index.js +4 -0
- package/lib/module/components/IconButton/IconButton.js +176 -0
- package/lib/module/components/IconButton/index.js +4 -0
- package/lib/module/components/ImageGallery/ImageGallery.js +576 -0
- package/lib/module/components/ImageGallery/index.js +4 -0
- package/lib/module/components/InlineSelect/InlineSelect.js +174 -0
- package/lib/module/components/InlineSelect/index.js +4 -0
- package/lib/module/components/Input/Input.js +398 -0
- package/lib/module/components/Input/index.js +4 -0
- package/lib/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.js +111 -0
- package/lib/module/components/KeyboardAwareScrollView/index.js +4 -0
- package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +130 -0
- package/lib/module/components/KeyboardToolbar/index.js +4 -0
- package/lib/module/components/ListItem/ListItem.js +334 -0
- package/lib/module/components/ListItem/index.js +4 -0
- package/lib/module/components/Modal/Modal.js +352 -0
- package/lib/module/components/Modal/index.js +4 -0
- package/lib/module/components/NumberInput/NumberInput.js +377 -0
- package/lib/module/components/NumberInput/index.js +4 -0
- package/lib/module/components/OTPInput/OTPInput.js +438 -0
- package/lib/module/components/OTPInput/index.js +4 -0
- package/lib/module/components/OptionSheet/OptionSheet.js +444 -0
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +238 -0
- package/lib/module/components/PhoneNumberInput/index.js +4 -0
- package/lib/module/components/PickerTrigger/PickerTrigger.js +152 -0
- package/lib/module/components/PickerTrigger/index.js +4 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +195 -0
- package/lib/module/components/ProgressBar/index.js +4 -0
- package/lib/module/components/Radio/Radio.js +113 -0
- package/lib/module/components/Radio/RadioDot.js +99 -0
- package/lib/module/components/Radio/RadioGroup.js +45 -0
- package/lib/module/components/Radio/index.js +6 -0
- package/lib/module/components/Rating/Rating.js +329 -0
- package/lib/module/components/Rating/index.js +4 -0
- package/lib/module/components/Repeater/Repeater.js +135 -0
- package/lib/module/components/Repeater/index.js +4 -0
- package/lib/module/components/SearchBar/SearchBar.js +280 -0
- package/lib/module/components/SearchBar/index.js +4 -0
- package/lib/module/components/SegmentedControl/SegmentedControl.js +205 -0
- package/lib/module/components/SegmentedControl/index.js +4 -0
- package/lib/module/components/Select/Select.js +266 -0
- package/lib/module/components/Select/index.js +4 -0
- package/lib/module/components/Skeleton/Skeleton.js +286 -0
- package/lib/module/components/Skeleton/SkeletonClock.js +111 -0
- package/lib/module/components/Skeleton/SkeletonContent.js +304 -0
- package/lib/module/components/Skeleton/SkeletonList.js +87 -0
- package/lib/module/components/Skeleton/SkeletonProvider.js +106 -0
- package/lib/module/components/Skeleton/SkeletonSkip.js +31 -0
- package/lib/module/components/Skeleton/index.js +9 -0
- package/lib/module/components/SlideToConfirm/SlideToConfirm.js +254 -0
- package/lib/module/components/SlideToConfirm/index.js +4 -0
- package/lib/module/components/Slider/Slider.js +498 -0
- package/lib/module/components/Slider/index.js +4 -0
- package/lib/module/components/Spinner/Spinner.js +179 -0
- package/lib/module/components/Spinner/index.js +4 -0
- package/lib/module/components/Stepper/Stepper.js +591 -0
- package/lib/module/components/Stepper/index.js +4 -0
- package/lib/module/components/Swipeable/Swipeable.js +375 -0
- package/lib/module/components/Swipeable/index.js +4 -0
- package/lib/module/components/Switch/Switch.js +227 -0
- package/lib/module/components/Switch/index.js +4 -0
- package/lib/module/components/Tabs/Tabs.js +285 -0
- package/lib/module/components/Tabs/index.js +4 -0
- package/lib/module/components/TagInput/TagInput.js +170 -0
- package/lib/module/components/TagInput/index.js +4 -0
- package/lib/module/components/Text/Text.js +142 -0
- package/lib/module/components/Text/index.js +4 -0
- package/lib/module/components/TimePicker/TimePicker.js +686 -0
- package/lib/module/components/TimePicker/index.js +4 -0
- package/lib/module/components/Timeline/Timeline.js +141 -0
- package/lib/module/components/Timeline/index.js +4 -0
- package/lib/module/components/Toast/Toast.js +317 -0
- package/lib/module/components/Toast/ToastProvider.js +191 -0
- package/lib/module/components/Toast/index.js +5 -0
- package/lib/module/components/Tooltip/Tooltip.js +405 -0
- package/lib/module/components/Tooltip/index.js +4 -0
- package/lib/module/components/index.js +65 -0
- package/lib/module/form/FormContext.js +32 -0
- package/lib/module/form/index.js +16 -0
- package/lib/module/form/path.js +84 -0
- package/lib/module/form/rules.js +59 -0
- package/lib/module/form/types.js +2 -0
- package/lib/module/form/useField.js +49 -0
- package/lib/module/form/useForm.js +360 -0
- package/lib/module/hooks/index.js +8 -0
- package/lib/module/hooks/useControllableState.js +28 -0
- package/lib/module/hooks/useDebounce.js +12 -0
- package/lib/module/hooks/usePressAnimation.js +42 -0
- package/lib/module/hooks/useReducedMotion.js +29 -0
- package/lib/module/hooks/useToggle.js +17 -0
- package/lib/module/index.js +17 -0
- package/lib/module/initUI.js +19 -0
- package/lib/module/network/NetworkStatusBanner.js +83 -0
- package/lib/module/network/index.js +4 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/Gradient.js +49 -0
- package/lib/module/theme/ThemeContext.js +93 -0
- package/lib/module/theme/animatedValue.js +49 -0
- package/lib/module/theme/index.js +51 -0
- package/lib/module/theme/merge.js +25 -0
- package/lib/module/theme/textStyle.js +34 -0
- package/lib/module/theme/tokens.js +648 -0
- package/lib/module/theme/types.js +4 -0
- package/lib/module/utils/dimensions.js +4 -0
- package/lib/module/utils/feedback.js +70 -0
- package/lib/module/utils/hapticUtils.js +60 -0
- package/lib/module/utils/index.js +9 -0
- package/lib/module/utils/responsive.js +42 -0
- package/lib/module/utils/shadows.js +7 -0
- package/lib/module/utils/spacing.js +82 -0
- package/lib/module/utils/warnUnknownProps.js +42 -0
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +48 -0
- package/lib/typescript/commonjs/components/Accordion/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +30 -0
- package/lib/typescript/commonjs/components/AnimatePresence/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +50 -0
- package/lib/typescript/commonjs/components/AppBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +39 -0
- package/lib/typescript/commonjs/components/AsyncBlock/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +53 -0
- package/lib/typescript/commonjs/components/Autocomplete/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +75 -0
- package/lib/typescript/commonjs/components/Avatar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +34 -0
- package/lib/typescript/commonjs/components/Badge/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +47 -0
- package/lib/typescript/commonjs/components/Banner/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +40 -0
- package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +113 -0
- package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Box/Box.d.ts +59 -0
- package/lib/typescript/commonjs/components/Box/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Button/Button.d.ts +41 -0
- package/lib/typescript/commonjs/components/Button/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +57 -0
- package/lib/typescript/commonjs/components/Card/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +77 -0
- package/lib/typescript/commonjs/components/Carousel/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +32 -0
- package/lib/typescript/commonjs/components/Checkbox/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +41 -0
- package/lib/typescript/commonjs/components/Chip/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +100 -0
- package/lib/typescript/commonjs/components/ChoiceGroup/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Confetti/Confetti.d.ts +41 -0
- package/lib/typescript/commonjs/components/Confetti/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +63 -0
- package/lib/typescript/commonjs/components/DatePicker/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +69 -0
- package/lib/typescript/commonjs/components/DateRangePicker/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +30 -0
- package/lib/typescript/commonjs/components/Descriptions/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +45 -0
- package/lib/typescript/commonjs/components/Dialog/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Divider/Divider.d.ts +19 -0
- package/lib/typescript/commonjs/components/Divider/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +56 -0
- package/lib/typescript/commonjs/components/Drawer/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/EmptyState/EmptyState.d.ts +24 -0
- package/lib/typescript/commonjs/components/EmptyState/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +20 -0
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +180 -0
- package/lib/typescript/commonjs/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +155 -0
- package/lib/typescript/commonjs/components/FilePicker/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +59 -0
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +47 -0
- package/lib/typescript/commonjs/components/ForceUpdateDialog/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +49 -0
- package/lib/typescript/commonjs/components/FormField/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +34 -0
- package/lib/typescript/commonjs/components/IconButton/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +55 -0
- package/lib/typescript/commonjs/components/ImageGallery/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +91 -0
- package/lib/typescript/commonjs/components/InlineSelect/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Input/Input.d.ts +69 -0
- package/lib/typescript/commonjs/components/Input/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
- package/lib/typescript/commonjs/components/KeyboardAwareScrollView/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
- package/lib/typescript/commonjs/components/KeyboardToolbar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +46 -0
- package/lib/typescript/commonjs/components/ListItem/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +47 -0
- package/lib/typescript/commonjs/components/Modal/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +42 -0
- package/lib/typescript/commonjs/components/NumberInput/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +35 -0
- package/lib/typescript/commonjs/components/OTPInput/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +57 -0
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +58 -0
- package/lib/typescript/commonjs/components/PhoneNumberInput/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +60 -0
- package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +33 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +33 -0
- package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +24 -0
- package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +17 -0
- package/lib/typescript/commonjs/components/Radio/index.d.ts +7 -0
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +37 -0
- package/lib/typescript/commonjs/components/Rating/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +43 -0
- package/lib/typescript/commonjs/components/Repeater/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +32 -0
- package/lib/typescript/commonjs/components/SearchBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +42 -0
- package/lib/typescript/commonjs/components/SegmentedControl/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Select/Select.d.ts +106 -0
- package/lib/typescript/commonjs/components/Select/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +80 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +102 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +30 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +66 -0
- package/lib/typescript/commonjs/components/Skeleton/SkeletonSkip.d.ts +25 -0
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +13 -0
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +33 -0
- package/lib/typescript/commonjs/components/SlideToConfirm/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +47 -0
- package/lib/typescript/commonjs/components/Slider/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +19 -0
- package/lib/typescript/commonjs/components/Spinner/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +49 -0
- package/lib/typescript/commonjs/components/Stepper/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +50 -0
- package/lib/typescript/commonjs/components/Swipeable/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +29 -0
- package/lib/typescript/commonjs/components/Switch/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +64 -0
- package/lib/typescript/commonjs/components/Tabs/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +36 -0
- package/lib/typescript/commonjs/components/TagInput/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Text/Text.d.ts +24 -0
- package/lib/typescript/commonjs/components/Text/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +62 -0
- package/lib/typescript/commonjs/components/TimePicker/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +44 -0
- package/lib/typescript/commonjs/components/Timeline/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +44 -0
- package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +26 -0
- package/lib/typescript/commonjs/components/Toast/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +28 -0
- package/lib/typescript/commonjs/components/Tooltip/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/index.d.ts +125 -0
- package/lib/typescript/commonjs/form/FormContext.d.ts +17 -0
- package/lib/typescript/commonjs/form/index.d.ts +10 -0
- package/lib/typescript/commonjs/form/path.d.ts +10 -0
- package/lib/typescript/commonjs/form/rules.d.ts +37 -0
- package/lib/typescript/commonjs/form/types.d.ts +94 -0
- package/lib/typescript/commonjs/form/useField.d.ts +27 -0
- package/lib/typescript/commonjs/form/useForm.d.ts +10 -0
- package/lib/typescript/commonjs/hooks/index.d.ts +9 -0
- package/lib/typescript/commonjs/hooks/useControllableState.d.ts +17 -0
- package/lib/typescript/commonjs/hooks/useDebounce.d.ts +2 -0
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +13 -0
- package/lib/typescript/commonjs/hooks/useReducedMotion.d.ts +8 -0
- package/lib/typescript/commonjs/hooks/useToggle.d.ts +9 -0
- package/lib/typescript/commonjs/index.d.ts +14 -0
- package/lib/typescript/commonjs/initUI.d.ts +12 -0
- package/lib/typescript/commonjs/network/NetworkStatusBanner.d.ts +19 -0
- package/lib/typescript/commonjs/network/index.d.ts +3 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/theme/Gradient.d.ts +11 -0
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts +18 -0
- package/lib/typescript/commonjs/theme/animatedValue.d.ts +39 -0
- package/lib/typescript/commonjs/theme/index.d.ts +18 -0
- package/lib/typescript/commonjs/theme/merge.d.ts +3 -0
- package/lib/typescript/commonjs/theme/textStyle.d.ts +18 -0
- package/lib/typescript/commonjs/theme/tokens.d.ts +4 -0
- package/lib/typescript/commonjs/theme/types.d.ts +913 -0
- package/lib/typescript/commonjs/utils/dimensions.d.ts +3 -0
- package/lib/typescript/commonjs/utils/feedback.d.ts +45 -0
- package/lib/typescript/commonjs/utils/hapticUtils.d.ts +12 -0
- package/lib/typescript/commonjs/utils/index.d.ts +11 -0
- package/lib/typescript/commonjs/utils/responsive.d.ts +23 -0
- package/lib/typescript/commonjs/utils/shadows.d.ts +4 -0
- package/lib/typescript/commonjs/utils/spacing.d.ts +61 -0
- package/lib/typescript/commonjs/utils/warnUnknownProps.d.ts +20 -0
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +48 -0
- package/lib/typescript/module/components/Accordion/index.d.ts +3 -0
- package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +30 -0
- package/lib/typescript/module/components/AnimatePresence/index.d.ts +3 -0
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +50 -0
- package/lib/typescript/module/components/AppBar/index.d.ts +3 -0
- package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +39 -0
- package/lib/typescript/module/components/AsyncBlock/index.d.ts +3 -0
- package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +53 -0
- package/lib/typescript/module/components/Autocomplete/index.d.ts +3 -0
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +75 -0
- package/lib/typescript/module/components/Avatar/index.d.ts +3 -0
- package/lib/typescript/module/components/Badge/Badge.d.ts +34 -0
- package/lib/typescript/module/components/Badge/index.d.ts +3 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts +47 -0
- package/lib/typescript/module/components/Banner/index.d.ts +3 -0
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +40 -0
- package/lib/typescript/module/components/BottomNavigation/index.d.ts +3 -0
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +113 -0
- package/lib/typescript/module/components/BottomSheet/index.d.ts +3 -0
- package/lib/typescript/module/components/Box/Box.d.ts +59 -0
- package/lib/typescript/module/components/Box/index.d.ts +3 -0
- package/lib/typescript/module/components/Button/Button.d.ts +41 -0
- package/lib/typescript/module/components/Button/index.d.ts +3 -0
- package/lib/typescript/module/components/Card/Card.d.ts +57 -0
- package/lib/typescript/module/components/Card/index.d.ts +3 -0
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +77 -0
- package/lib/typescript/module/components/Carousel/index.d.ts +3 -0
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +32 -0
- package/lib/typescript/module/components/Checkbox/index.d.ts +3 -0
- package/lib/typescript/module/components/Chip/Chip.d.ts +41 -0
- package/lib/typescript/module/components/Chip/index.d.ts +3 -0
- package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +100 -0
- package/lib/typescript/module/components/ChoiceGroup/index.d.ts +3 -0
- package/lib/typescript/module/components/Confetti/Confetti.d.ts +41 -0
- package/lib/typescript/module/components/Confetti/index.d.ts +3 -0
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +63 -0
- package/lib/typescript/module/components/DatePicker/index.d.ts +3 -0
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +69 -0
- package/lib/typescript/module/components/DateRangePicker/index.d.ts +3 -0
- package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +30 -0
- package/lib/typescript/module/components/Descriptions/index.d.ts +3 -0
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +45 -0
- package/lib/typescript/module/components/Dialog/index.d.ts +3 -0
- package/lib/typescript/module/components/Divider/Divider.d.ts +19 -0
- package/lib/typescript/module/components/Divider/index.d.ts +3 -0
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +56 -0
- package/lib/typescript/module/components/Drawer/index.d.ts +3 -0
- package/lib/typescript/module/components/EmptyState/EmptyState.d.ts +24 -0
- package/lib/typescript/module/components/EmptyState/index.d.ts +3 -0
- package/lib/typescript/module/components/FieldBase/Chevron.d.ts +20 -0
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +180 -0
- package/lib/typescript/module/components/FieldBase/index.d.ts +3 -0
- package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +155 -0
- package/lib/typescript/module/components/FilePicker/index.d.ts +3 -0
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +59 -0
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +3 -0
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +47 -0
- package/lib/typescript/module/components/ForceUpdateDialog/index.d.ts +3 -0
- package/lib/typescript/module/components/FormField/FormField.d.ts +49 -0
- package/lib/typescript/module/components/FormField/index.d.ts +3 -0
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +34 -0
- package/lib/typescript/module/components/IconButton/index.d.ts +3 -0
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +55 -0
- package/lib/typescript/module/components/ImageGallery/index.d.ts +3 -0
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +91 -0
- package/lib/typescript/module/components/InlineSelect/index.d.ts +3 -0
- package/lib/typescript/module/components/Input/Input.d.ts +69 -0
- package/lib/typescript/module/components/Input/index.d.ts +3 -0
- package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +20 -0
- package/lib/typescript/module/components/KeyboardAwareScrollView/index.d.ts +3 -0
- package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +29 -0
- package/lib/typescript/module/components/KeyboardToolbar/index.d.ts +3 -0
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +46 -0
- package/lib/typescript/module/components/ListItem/index.d.ts +4 -0
- package/lib/typescript/module/components/Modal/Modal.d.ts +47 -0
- package/lib/typescript/module/components/Modal/index.d.ts +3 -0
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +42 -0
- package/lib/typescript/module/components/NumberInput/index.d.ts +3 -0
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +35 -0
- package/lib/typescript/module/components/OTPInput/index.d.ts +3 -0
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +57 -0
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +58 -0
- package/lib/typescript/module/components/PhoneNumberInput/index.d.ts +3 -0
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +60 -0
- package/lib/typescript/module/components/PickerTrigger/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +33 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/module/components/Radio/Radio.d.ts +33 -0
- package/lib/typescript/module/components/Radio/RadioDot.d.ts +24 -0
- package/lib/typescript/module/components/Radio/RadioGroup.d.ts +17 -0
- package/lib/typescript/module/components/Radio/index.d.ts +7 -0
- package/lib/typescript/module/components/Rating/Rating.d.ts +37 -0
- package/lib/typescript/module/components/Rating/index.d.ts +3 -0
- package/lib/typescript/module/components/Repeater/Repeater.d.ts +43 -0
- package/lib/typescript/module/components/Repeater/index.d.ts +3 -0
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +32 -0
- package/lib/typescript/module/components/SearchBar/index.d.ts +3 -0
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +42 -0
- package/lib/typescript/module/components/SegmentedControl/index.d.ts +3 -0
- package/lib/typescript/module/components/Select/Select.d.ts +106 -0
- package/lib/typescript/module/components/Select/index.d.ts +3 -0
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +80 -0
- package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +60 -0
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +102 -0
- package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +30 -0
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +66 -0
- package/lib/typescript/module/components/Skeleton/SkeletonSkip.d.ts +25 -0
- package/lib/typescript/module/components/Skeleton/index.d.ts +13 -0
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +33 -0
- package/lib/typescript/module/components/SlideToConfirm/index.d.ts +3 -0
- package/lib/typescript/module/components/Slider/Slider.d.ts +47 -0
- package/lib/typescript/module/components/Slider/index.d.ts +3 -0
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +19 -0
- package/lib/typescript/module/components/Spinner/index.d.ts +3 -0
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +49 -0
- package/lib/typescript/module/components/Stepper/index.d.ts +3 -0
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +50 -0
- package/lib/typescript/module/components/Swipeable/index.d.ts +3 -0
- package/lib/typescript/module/components/Switch/Switch.d.ts +29 -0
- package/lib/typescript/module/components/Switch/index.d.ts +3 -0
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +64 -0
- package/lib/typescript/module/components/Tabs/index.d.ts +3 -0
- package/lib/typescript/module/components/TagInput/TagInput.d.ts +36 -0
- package/lib/typescript/module/components/TagInput/index.d.ts +3 -0
- package/lib/typescript/module/components/Text/Text.d.ts +24 -0
- package/lib/typescript/module/components/Text/index.d.ts +3 -0
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +62 -0
- package/lib/typescript/module/components/TimePicker/index.d.ts +3 -0
- package/lib/typescript/module/components/Timeline/Timeline.d.ts +44 -0
- package/lib/typescript/module/components/Timeline/index.d.ts +3 -0
- package/lib/typescript/module/components/Toast/Toast.d.ts +44 -0
- package/lib/typescript/module/components/Toast/ToastProvider.d.ts +26 -0
- package/lib/typescript/module/components/Toast/index.d.ts +5 -0
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +28 -0
- package/lib/typescript/module/components/Tooltip/index.d.ts +3 -0
- package/lib/typescript/module/components/index.d.ts +125 -0
- package/lib/typescript/module/form/FormContext.d.ts +17 -0
- package/lib/typescript/module/form/index.d.ts +10 -0
- package/lib/typescript/module/form/path.d.ts +10 -0
- package/lib/typescript/module/form/rules.d.ts +37 -0
- package/lib/typescript/module/form/types.d.ts +94 -0
- package/lib/typescript/module/form/useField.d.ts +27 -0
- package/lib/typescript/module/form/useForm.d.ts +10 -0
- package/lib/typescript/module/hooks/index.d.ts +9 -0
- package/lib/typescript/module/hooks/useControllableState.d.ts +17 -0
- package/lib/typescript/module/hooks/useDebounce.d.ts +2 -0
- package/lib/typescript/module/hooks/usePressAnimation.d.ts +13 -0
- package/lib/typescript/module/hooks/useReducedMotion.d.ts +8 -0
- package/lib/typescript/module/hooks/useToggle.d.ts +9 -0
- package/lib/typescript/module/index.d.ts +14 -0
- package/lib/typescript/module/initUI.d.ts +12 -0
- package/lib/typescript/module/network/NetworkStatusBanner.d.ts +19 -0
- package/lib/typescript/module/network/index.d.ts +3 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/theme/Gradient.d.ts +11 -0
- package/lib/typescript/module/theme/ThemeContext.d.ts +18 -0
- package/lib/typescript/module/theme/animatedValue.d.ts +39 -0
- package/lib/typescript/module/theme/index.d.ts +18 -0
- package/lib/typescript/module/theme/merge.d.ts +3 -0
- package/lib/typescript/module/theme/textStyle.d.ts +18 -0
- package/lib/typescript/module/theme/tokens.d.ts +4 -0
- package/lib/typescript/module/theme/types.d.ts +913 -0
- package/lib/typescript/module/utils/dimensions.d.ts +3 -0
- package/lib/typescript/module/utils/feedback.d.ts +45 -0
- package/lib/typescript/module/utils/hapticUtils.d.ts +12 -0
- package/lib/typescript/module/utils/index.d.ts +11 -0
- package/lib/typescript/module/utils/responsive.d.ts +23 -0
- package/lib/typescript/module/utils/shadows.d.ts +4 -0
- package/lib/typescript/module/utils/spacing.d.ts +61 -0
- package/lib/typescript/module/utils/warnUnknownProps.d.ts +20 -0
- package/package.json +101 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Badge = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../../theme/index.js");
|
|
10
|
+
var _index2 = require("../Skeleton/index.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
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); }
|
|
13
|
+
const toneFor = (theme, tone) => {
|
|
14
|
+
switch (tone) {
|
|
15
|
+
case 'primary':
|
|
16
|
+
return {
|
|
17
|
+
background: theme.colors.primary,
|
|
18
|
+
text: theme.colors.onPrimary
|
|
19
|
+
};
|
|
20
|
+
case 'success':
|
|
21
|
+
return {
|
|
22
|
+
background: theme.colors.success,
|
|
23
|
+
text: theme.colors.onSuccess
|
|
24
|
+
};
|
|
25
|
+
case 'warning':
|
|
26
|
+
return {
|
|
27
|
+
background: theme.colors.warning,
|
|
28
|
+
text: theme.colors.onWarning
|
|
29
|
+
};
|
|
30
|
+
case 'info':
|
|
31
|
+
return {
|
|
32
|
+
background: theme.colors.info,
|
|
33
|
+
text: theme.colors.onInfo
|
|
34
|
+
};
|
|
35
|
+
case 'neutral':
|
|
36
|
+
return {
|
|
37
|
+
background: theme.colors.background.tertiary,
|
|
38
|
+
text: theme.colors.text.primary
|
|
39
|
+
};
|
|
40
|
+
case 'error':
|
|
41
|
+
default:
|
|
42
|
+
return {
|
|
43
|
+
background: theme.colors.error,
|
|
44
|
+
text: theme.colors.onError
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const sizeMap = {
|
|
49
|
+
sm: {
|
|
50
|
+
fontSize: 10,
|
|
51
|
+
minWidth: 16,
|
|
52
|
+
height: 16,
|
|
53
|
+
paddingH: 5,
|
|
54
|
+
dot: 8
|
|
55
|
+
},
|
|
56
|
+
md: {
|
|
57
|
+
fontSize: 11,
|
|
58
|
+
minWidth: 20,
|
|
59
|
+
height: 20,
|
|
60
|
+
paddingH: 6,
|
|
61
|
+
dot: 10
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const anchorPosition = (anchor, offset) => {
|
|
65
|
+
const o = -offset;
|
|
66
|
+
switch (anchor) {
|
|
67
|
+
case 'topLeft':
|
|
68
|
+
return {
|
|
69
|
+
top: o,
|
|
70
|
+
left: o
|
|
71
|
+
};
|
|
72
|
+
case 'bottomRight':
|
|
73
|
+
return {
|
|
74
|
+
bottom: o,
|
|
75
|
+
right: o
|
|
76
|
+
};
|
|
77
|
+
case 'bottomLeft':
|
|
78
|
+
return {
|
|
79
|
+
bottom: o,
|
|
80
|
+
left: o
|
|
81
|
+
};
|
|
82
|
+
case 'topRight':
|
|
83
|
+
default:
|
|
84
|
+
return {
|
|
85
|
+
top: o,
|
|
86
|
+
right: o
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const formatValue = (value, max) => {
|
|
91
|
+
if (value === undefined || value === null) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
if (typeof value === 'number') {
|
|
95
|
+
if (value <= 0) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return value > max ? `${max}+` : String(value);
|
|
99
|
+
}
|
|
100
|
+
const str = String(value);
|
|
101
|
+
return str.length === 0 ? null : str;
|
|
102
|
+
};
|
|
103
|
+
const Badge = exports.Badge = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
104
|
+
const {
|
|
105
|
+
value,
|
|
106
|
+
max = 99,
|
|
107
|
+
variant = 'standard',
|
|
108
|
+
tone = 'error',
|
|
109
|
+
size = 'sm',
|
|
110
|
+
invisible = false,
|
|
111
|
+
loading = false,
|
|
112
|
+
children,
|
|
113
|
+
anchor = 'topRight',
|
|
114
|
+
pulse = false,
|
|
115
|
+
accessibilityLabel,
|
|
116
|
+
style,
|
|
117
|
+
badgeStyle,
|
|
118
|
+
textStyle,
|
|
119
|
+
testID
|
|
120
|
+
} = props;
|
|
121
|
+
const theme = (0, _index.useTheme)();
|
|
122
|
+
const tones = (0, _react.useMemo)(() => toneFor(theme, tone), [theme, tone]);
|
|
123
|
+
const overrides = theme.components.badge?.[size];
|
|
124
|
+
const sz = {
|
|
125
|
+
fontSize: overrides?.fontSize ?? sizeMap[size].fontSize,
|
|
126
|
+
minWidth: overrides?.minWidth ?? sizeMap[size].minWidth,
|
|
127
|
+
height: overrides?.height ?? sizeMap[size].height,
|
|
128
|
+
paddingH: overrides?.paddingHorizontal ?? sizeMap[size].paddingH,
|
|
129
|
+
dot: overrides?.dotSize ?? sizeMap[size].dot
|
|
130
|
+
};
|
|
131
|
+
const badgeBorderWidth = theme.components.badge?.borderWidth ?? 1.5;
|
|
132
|
+
const badgeAnchorOffset = theme.components.badge?.anchorOffset ?? 4;
|
|
133
|
+
const formatted = variant === 'dot' ? null : formatValue(value, max);
|
|
134
|
+
const shouldRender = !invisible && (variant === 'dot' || formatted !== null);
|
|
135
|
+
const pulseScale = (0, _react.useRef)((0, _index.createAnimatedValue)(1)).current;
|
|
136
|
+
(0, _react.useEffect)(() => {
|
|
137
|
+
if (!pulse || !shouldRender) {
|
|
138
|
+
(0, _index.setNativeValue)(pulseScale, 1);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const loop = _reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(pulseScale, {
|
|
142
|
+
toValue: 1.15,
|
|
143
|
+
duration: theme.motion.duration.slow,
|
|
144
|
+
easing: _reactNative.Easing.bezier(...theme.motion.easing.standard),
|
|
145
|
+
useNativeDriver: true
|
|
146
|
+
}), _reactNative.Animated.timing(pulseScale, {
|
|
147
|
+
toValue: 1,
|
|
148
|
+
duration: theme.motion.duration.slow,
|
|
149
|
+
easing: _reactNative.Easing.bezier(...theme.motion.easing.standard),
|
|
150
|
+
useNativeDriver: true
|
|
151
|
+
})]));
|
|
152
|
+
loop.start();
|
|
153
|
+
return () => {
|
|
154
|
+
loop.stop();
|
|
155
|
+
};
|
|
156
|
+
}, [pulse, shouldRender, pulseScale, theme]);
|
|
157
|
+
const isDot = variant === 'dot';
|
|
158
|
+
const a11yRole = isDot ? 'image' : 'text';
|
|
159
|
+
const a11yLabel = accessibilityLabel ?? (isDot ? 'Notification indicator' : formatted ? `${formatted} unread` : undefined);
|
|
160
|
+
const badgeContent = shouldRender ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
161
|
+
style: [styles.badge, isDot ? {
|
|
162
|
+
width: sz.dot,
|
|
163
|
+
height: sz.dot,
|
|
164
|
+
borderRadius: sz.dot / 2,
|
|
165
|
+
paddingHorizontal: 0
|
|
166
|
+
} : {
|
|
167
|
+
minWidth: sz.minWidth,
|
|
168
|
+
height: sz.height,
|
|
169
|
+
borderRadius: theme.radius.full,
|
|
170
|
+
paddingHorizontal: sz.paddingH
|
|
171
|
+
}, {
|
|
172
|
+
backgroundColor: tones.background,
|
|
173
|
+
transform: [{
|
|
174
|
+
scale: pulseScale
|
|
175
|
+
}]
|
|
176
|
+
}, children ? {
|
|
177
|
+
position: 'absolute',
|
|
178
|
+
borderWidth: badgeBorderWidth,
|
|
179
|
+
borderColor: theme.colors.background.elevated,
|
|
180
|
+
...anchorPosition(anchor, badgeAnchorOffset)
|
|
181
|
+
} : null, badgeStyle],
|
|
182
|
+
accessible: true,
|
|
183
|
+
accessibilityRole: a11yRole,
|
|
184
|
+
accessibilityLabel: a11yLabel,
|
|
185
|
+
children: !isDot && formatted !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
186
|
+
style: [styles.text, {
|
|
187
|
+
color: tones.text,
|
|
188
|
+
fontSize: sz.fontSize,
|
|
189
|
+
...(0, _index.fontFor)(theme, 'bold')
|
|
190
|
+
}, textStyle],
|
|
191
|
+
numberOfLines: 1,
|
|
192
|
+
allowFontScaling: false,
|
|
193
|
+
children: formatted ?? ' '
|
|
194
|
+
}) : null
|
|
195
|
+
}) : null;
|
|
196
|
+
const rendered = children ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
197
|
+
ref: ref,
|
|
198
|
+
style: [styles.wrapper, style],
|
|
199
|
+
testID: testID,
|
|
200
|
+
children: [children, badgeContent]
|
|
201
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
202
|
+
ref: ref,
|
|
203
|
+
style: style,
|
|
204
|
+
testID: testID,
|
|
205
|
+
children: badgeContent
|
|
206
|
+
});
|
|
207
|
+
if (loading) {
|
|
208
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BadgeSkeleton, {
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return rendered;
|
|
213
|
+
});
|
|
214
|
+
Badge.displayName = 'Badge';
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Placeholder shape for `<Badge>`. Dot variant renders a small circle at
|
|
218
|
+
* the dot size; standard variant renders a pill shape at the badge's
|
|
219
|
+
* resolved height. Anchored badges (with `children`) overlay the badge
|
|
220
|
+
* shape on a wrapper that hosts the children below.
|
|
221
|
+
*/
|
|
222
|
+
const BadgeSkeleton = ({
|
|
223
|
+
variant = 'standard',
|
|
224
|
+
size = 'md',
|
|
225
|
+
children,
|
|
226
|
+
anchor,
|
|
227
|
+
style,
|
|
228
|
+
badgeStyle
|
|
229
|
+
}) => {
|
|
230
|
+
const sz = sizeMap[size];
|
|
231
|
+
if (variant === 'dot') {
|
|
232
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
233
|
+
shape: "circle",
|
|
234
|
+
width: sz.dot,
|
|
235
|
+
height: sz.dot,
|
|
236
|
+
style: [badgeStyle, style]
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
const pillRadius = sz.height / 2;
|
|
240
|
+
// Anchored badge: render the children underneath, overlay the badge.
|
|
241
|
+
if (children !== undefined) {
|
|
242
|
+
const offsetStyle = anchor === 'topLeft' ? {
|
|
243
|
+
top: -sz.height / 2,
|
|
244
|
+
left: -sz.height / 2
|
|
245
|
+
} : anchor === 'bottomRight' ? {
|
|
246
|
+
bottom: -sz.height / 2,
|
|
247
|
+
right: -sz.height / 2
|
|
248
|
+
} : anchor === 'bottomLeft' ? {
|
|
249
|
+
bottom: -sz.height / 2,
|
|
250
|
+
left: -sz.height / 2
|
|
251
|
+
} : {
|
|
252
|
+
top: -sz.height / 2,
|
|
253
|
+
right: -sz.height / 2
|
|
254
|
+
};
|
|
255
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
256
|
+
style: [styles.wrapper, style],
|
|
257
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
258
|
+
style: [{
|
|
259
|
+
position: 'absolute'
|
|
260
|
+
}, offsetStyle],
|
|
261
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
262
|
+
width: sz.minWidth + sz.paddingH,
|
|
263
|
+
height: sz.height,
|
|
264
|
+
radius: pillRadius,
|
|
265
|
+
style: badgeStyle
|
|
266
|
+
})
|
|
267
|
+
})]
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
271
|
+
width: sz.minWidth + sz.paddingH,
|
|
272
|
+
height: sz.height,
|
|
273
|
+
radius: pillRadius,
|
|
274
|
+
style: [badgeStyle, style]
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
BadgeSkeleton.displayName = 'BadgeSkeleton';
|
|
278
|
+
Badge.Skeleton = BadgeSkeleton;
|
|
279
|
+
const styles = _reactNative.StyleSheet.create({
|
|
280
|
+
wrapper: {
|
|
281
|
+
position: 'relative',
|
|
282
|
+
alignSelf: 'flex-start'
|
|
283
|
+
},
|
|
284
|
+
badge: {
|
|
285
|
+
alignItems: 'center',
|
|
286
|
+
justifyContent: 'center',
|
|
287
|
+
flexDirection: 'row'
|
|
288
|
+
},
|
|
289
|
+
text: {
|
|
290
|
+
textAlign: 'center',
|
|
291
|
+
includeFontPadding: false
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
var _default = exports.default = Badge;
|
|
295
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Badge", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Badge.Badge;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "default", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Badge.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _Badge = _interopRequireWildcard(require("./Badge.js"));
|
|
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
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Banner = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _index = require("../../theme/index.js");
|
|
10
|
+
var _hapticUtils = require("../../utils/hapticUtils.js");
|
|
11
|
+
var _index2 = require("../Skeleton/index.js");
|
|
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 Banner = exports.Banner = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
15
|
+
const {
|
|
16
|
+
title,
|
|
17
|
+
message,
|
|
18
|
+
variant = 'info',
|
|
19
|
+
icon,
|
|
20
|
+
actions,
|
|
21
|
+
dismissible = false,
|
|
22
|
+
onDismiss,
|
|
23
|
+
haptic,
|
|
24
|
+
visible = true,
|
|
25
|
+
animateMount = true,
|
|
26
|
+
loading = false,
|
|
27
|
+
accessibilityLabel,
|
|
28
|
+
style,
|
|
29
|
+
containerStyle,
|
|
30
|
+
iconCircleStyle,
|
|
31
|
+
tintBarStyle,
|
|
32
|
+
closeButtonStyle,
|
|
33
|
+
actionButtonStyle,
|
|
34
|
+
testID
|
|
35
|
+
} = props;
|
|
36
|
+
const theme = (0, _index.useTheme)();
|
|
37
|
+
const styles = (0, _react.useMemo)(() => buildStyles(theme), [theme]);
|
|
38
|
+
const tint = (0, _react.useMemo)(() => tintFor(theme, variant), [theme, variant]);
|
|
39
|
+
const translateY = (0, _react.useRef)((0, _index.createAnimatedValue)(animateMount && visible ? -20 : 0)).current;
|
|
40
|
+
const opacity = (0, _react.useRef)((0, _index.createAnimatedValue)(animateMount && visible ? 0 : visible ? 1 : 0)).current;
|
|
41
|
+
const [mounted, setMounted] = (0, _react.useState)(visible);
|
|
42
|
+
const isFirstRun = (0, _react.useRef)(true);
|
|
43
|
+
|
|
44
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: runs on `visible` alone — adding `mounted` re-runs this effect after its own setMounted(false) and replays the enter animation
|
|
45
|
+
(0, _react.useEffect)(() => {
|
|
46
|
+
// Skip running an animation on first mount if animateMount is false.
|
|
47
|
+
if (isFirstRun.current) {
|
|
48
|
+
isFirstRun.current = false;
|
|
49
|
+
if (!animateMount) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
let anim;
|
|
54
|
+
if (visible) {
|
|
55
|
+
setMounted(true);
|
|
56
|
+
anim = _reactNative.Animated.parallel([_reactNative.Animated.timing(translateY, {
|
|
57
|
+
toValue: 0,
|
|
58
|
+
duration: theme.motion.duration.normal,
|
|
59
|
+
useNativeDriver: true
|
|
60
|
+
}), _reactNative.Animated.timing(opacity, {
|
|
61
|
+
toValue: 1,
|
|
62
|
+
duration: theme.motion.duration.normal,
|
|
63
|
+
useNativeDriver: true
|
|
64
|
+
})]);
|
|
65
|
+
anim.start();
|
|
66
|
+
} else if (mounted) {
|
|
67
|
+
anim = _reactNative.Animated.parallel([_reactNative.Animated.timing(translateY, {
|
|
68
|
+
toValue: -20,
|
|
69
|
+
duration: theme.motion.duration.fast,
|
|
70
|
+
useNativeDriver: true
|
|
71
|
+
}), _reactNative.Animated.timing(opacity, {
|
|
72
|
+
toValue: 0,
|
|
73
|
+
duration: theme.motion.duration.fast,
|
|
74
|
+
useNativeDriver: true
|
|
75
|
+
})]);
|
|
76
|
+
anim.start(() => {
|
|
77
|
+
setMounted(false);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return () => anim?.stop();
|
|
81
|
+
}, [visible]);
|
|
82
|
+
if (!mounted) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
const safeTitle = title ?? ' ';
|
|
86
|
+
const safeMessageString = typeof message === 'string' ? message ?? ' ' : '';
|
|
87
|
+
const renderIcon = () => {
|
|
88
|
+
if (icon === false) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
if (icon) {
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
93
|
+
style: styles.iconWrap,
|
|
94
|
+
children: icon
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
98
|
+
style: [styles.iconCircle, {
|
|
99
|
+
backgroundColor: tint.bar + '22'
|
|
100
|
+
}, iconCircleStyle],
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
102
|
+
style: [styles.iconGlyph, {
|
|
103
|
+
color: tint.glyphColor
|
|
104
|
+
}],
|
|
105
|
+
accessible: false,
|
|
106
|
+
children: tint.glyph
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const messageString = typeof message === 'string' ? message : '';
|
|
111
|
+
const builtA11y = accessibilityLabel ?? (title ? `${title}. ${messageString}` : messageString || undefined);
|
|
112
|
+
const liveRegion = variant === 'error' ? 'assertive' : 'polite';
|
|
113
|
+
const rendered = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
114
|
+
ref: ref,
|
|
115
|
+
accessibilityRole: 'alert',
|
|
116
|
+
accessibilityLiveRegion: liveRegion,
|
|
117
|
+
accessibilityLabel: builtA11y,
|
|
118
|
+
testID: testID,
|
|
119
|
+
style: [styles.container, {
|
|
120
|
+
backgroundColor: theme.colors.background.secondary,
|
|
121
|
+
borderRadius: theme.radius.md,
|
|
122
|
+
padding: theme.spacing.md,
|
|
123
|
+
opacity,
|
|
124
|
+
transform: [{
|
|
125
|
+
translateY
|
|
126
|
+
}]
|
|
127
|
+
}, style, containerStyle],
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
129
|
+
style: [styles.tintBar, {
|
|
130
|
+
backgroundColor: tint.bar
|
|
131
|
+
}, tintBarStyle]
|
|
132
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
133
|
+
style: styles.row,
|
|
134
|
+
children: [renderIcon(), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
135
|
+
style: styles.textBlock,
|
|
136
|
+
children: [title || loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
137
|
+
style: {
|
|
138
|
+
color: theme.colors.text.primary,
|
|
139
|
+
fontSize: theme.typography.fontSize.base,
|
|
140
|
+
fontWeight: theme.typography.fontWeight.semibold,
|
|
141
|
+
lineHeight: 20
|
|
142
|
+
},
|
|
143
|
+
numberOfLines: 2,
|
|
144
|
+
children: safeTitle
|
|
145
|
+
}) : null, typeof message === 'string' || loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
146
|
+
style: {
|
|
147
|
+
color: theme.colors.text.secondary,
|
|
148
|
+
fontSize: theme.typography.fontSize.sm,
|
|
149
|
+
lineHeight: 18,
|
|
150
|
+
marginTop: title ? 2 : 0
|
|
151
|
+
},
|
|
152
|
+
children: safeMessageString || ' '
|
|
153
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
154
|
+
style: {
|
|
155
|
+
marginTop: title ? 2 : 0
|
|
156
|
+
},
|
|
157
|
+
children: message
|
|
158
|
+
})]
|
|
159
|
+
}), dismissible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
160
|
+
accessibilityRole: "button",
|
|
161
|
+
accessibilityLabel: "Dismiss banner",
|
|
162
|
+
onPress: () => {
|
|
163
|
+
const h = (0, _hapticUtils.resolveHaptic)(haptic, 'selection');
|
|
164
|
+
if (h) {
|
|
165
|
+
(0, _hapticUtils.triggerHaptic)(h);
|
|
166
|
+
}
|
|
167
|
+
onDismiss?.();
|
|
168
|
+
},
|
|
169
|
+
hitSlop: 8,
|
|
170
|
+
style: ({
|
|
171
|
+
pressed
|
|
172
|
+
}) => [styles.closeBtn, {
|
|
173
|
+
backgroundColor: pressed ? theme.colors.surface.pressed : 'transparent'
|
|
174
|
+
}, closeButtonStyle],
|
|
175
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
176
|
+
style: {
|
|
177
|
+
color: theme.colors.text.secondary,
|
|
178
|
+
fontSize: theme.components.banner?.closeGlyphFontSize ?? 18,
|
|
179
|
+
fontWeight: theme.typography.fontWeight.bold,
|
|
180
|
+
lineHeight: 18
|
|
181
|
+
},
|
|
182
|
+
accessible: false,
|
|
183
|
+
children: "\xD7"
|
|
184
|
+
})
|
|
185
|
+
}) : null]
|
|
186
|
+
}), actions && actions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
187
|
+
style: styles.actionsRow,
|
|
188
|
+
children: actions.map((action, idx) => {
|
|
189
|
+
const isPrimary = (action.tone ?? 'primary') === 'primary';
|
|
190
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
191
|
+
accessibilityRole: "button",
|
|
192
|
+
accessibilityLabel: action.label,
|
|
193
|
+
onPress: () => {
|
|
194
|
+
const h = (0, _hapticUtils.resolveHaptic)(haptic, 'selection');
|
|
195
|
+
if (h) {
|
|
196
|
+
(0, _hapticUtils.triggerHaptic)(h);
|
|
197
|
+
}
|
|
198
|
+
action.onPress();
|
|
199
|
+
},
|
|
200
|
+
style: ({
|
|
201
|
+
pressed
|
|
202
|
+
}) => [styles.actionBtn, {
|
|
203
|
+
backgroundColor: pressed ? theme.colors.surface.pressed : 'transparent'
|
|
204
|
+
}, actionButtonStyle],
|
|
205
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
206
|
+
style: {
|
|
207
|
+
color: isPrimary ? tint.glyphColor : theme.colors.text.secondary,
|
|
208
|
+
fontSize: theme.typography.fontSize.sm,
|
|
209
|
+
fontWeight: theme.typography.fontWeight.semibold
|
|
210
|
+
},
|
|
211
|
+
numberOfLines: 1,
|
|
212
|
+
children: action.label
|
|
213
|
+
})
|
|
214
|
+
}, `${action.label}-${idx}`);
|
|
215
|
+
})
|
|
216
|
+
}) : null]
|
|
217
|
+
});
|
|
218
|
+
if (loading) {
|
|
219
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BannerSkeleton, {
|
|
220
|
+
...props
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
return rendered;
|
|
224
|
+
});
|
|
225
|
+
Banner.displayName = 'Banner';
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Placeholder shape for `<Banner>`. Keeps the icon circle on the left and
|
|
229
|
+
* shows title + 1-2 message lines + optional action button row. Outer
|
|
230
|
+
* container retains the elevated background so the banner footprint
|
|
231
|
+
* doesn't shift when it loads.
|
|
232
|
+
*/
|
|
233
|
+
const BannerSkeleton = ({
|
|
234
|
+
title,
|
|
235
|
+
actions,
|
|
236
|
+
icon,
|
|
237
|
+
containerStyle,
|
|
238
|
+
style
|
|
239
|
+
}) => {
|
|
240
|
+
const theme = (0, _index.useTheme)();
|
|
241
|
+
const showIcon = icon !== false;
|
|
242
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
243
|
+
style: [{
|
|
244
|
+
flexDirection: 'row',
|
|
245
|
+
alignItems: 'flex-start',
|
|
246
|
+
backgroundColor: theme.colors.background.elevated,
|
|
247
|
+
borderRadius: theme.radius.md,
|
|
248
|
+
padding: theme.spacing.md,
|
|
249
|
+
borderWidth: 1,
|
|
250
|
+
borderColor: theme.colors.border.primary
|
|
251
|
+
}, containerStyle, style],
|
|
252
|
+
accessibilityRole: "progressbar",
|
|
253
|
+
accessibilityState: {
|
|
254
|
+
busy: true
|
|
255
|
+
},
|
|
256
|
+
children: [showIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
257
|
+
style: {
|
|
258
|
+
marginRight: theme.spacing.sm
|
|
259
|
+
},
|
|
260
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
261
|
+
shape: "circle",
|
|
262
|
+
width: 32,
|
|
263
|
+
height: 32
|
|
264
|
+
})
|
|
265
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
266
|
+
style: {
|
|
267
|
+
flex: 1
|
|
268
|
+
},
|
|
269
|
+
children: [title !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
270
|
+
shape: "text",
|
|
271
|
+
width: "55%",
|
|
272
|
+
height: 16,
|
|
273
|
+
style: {
|
|
274
|
+
marginBottom: theme.spacing.xs
|
|
275
|
+
}
|
|
276
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.SkeletonText, {
|
|
277
|
+
lines: 2,
|
|
278
|
+
fontSize: 13,
|
|
279
|
+
lastLineWidth: "70%"
|
|
280
|
+
}), actions && actions.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
281
|
+
style: {
|
|
282
|
+
flexDirection: 'row',
|
|
283
|
+
marginTop: theme.spacing.sm
|
|
284
|
+
},
|
|
285
|
+
children: actions.map((_, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
|
|
286
|
+
width: 72,
|
|
287
|
+
height: 28,
|
|
288
|
+
shape: "rounded",
|
|
289
|
+
style: {
|
|
290
|
+
marginRight: theme.spacing.sm
|
|
291
|
+
}
|
|
292
|
+
}, `sk-banner-action-${i}`))
|
|
293
|
+
}) : null]
|
|
294
|
+
})]
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
BannerSkeleton.displayName = 'BannerSkeleton';
|
|
298
|
+
Banner.Skeleton = BannerSkeleton;
|
|
299
|
+
const tintFor = (theme, variant) => {
|
|
300
|
+
switch (variant) {
|
|
301
|
+
case 'success':
|
|
302
|
+
return {
|
|
303
|
+
bar: theme.colors.success,
|
|
304
|
+
glyphColor: theme.colors.success,
|
|
305
|
+
glyph: '✓'
|
|
306
|
+
};
|
|
307
|
+
case 'warning':
|
|
308
|
+
return {
|
|
309
|
+
bar: theme.colors.warning,
|
|
310
|
+
glyphColor: theme.colors.warning,
|
|
311
|
+
glyph: '⚠'
|
|
312
|
+
};
|
|
313
|
+
case 'error':
|
|
314
|
+
return {
|
|
315
|
+
bar: theme.colors.error,
|
|
316
|
+
glyphColor: theme.colors.error,
|
|
317
|
+
glyph: '✗'
|
|
318
|
+
};
|
|
319
|
+
case 'neutral':
|
|
320
|
+
return {
|
|
321
|
+
bar: theme.colors.text.tertiary,
|
|
322
|
+
glyphColor: theme.colors.text.secondary,
|
|
323
|
+
glyph: 'i'
|
|
324
|
+
};
|
|
325
|
+
case 'info':
|
|
326
|
+
default:
|
|
327
|
+
return {
|
|
328
|
+
bar: theme.colors.primary,
|
|
329
|
+
glyphColor: theme.colors.primary,
|
|
330
|
+
glyph: 'i'
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const buildStyles = theme => {
|
|
335
|
+
const iconCircleSize = theme.components.banner?.iconCircleSize ?? 28;
|
|
336
|
+
const closeButtonSize = theme.components.banner?.closeButtonSize ?? 28;
|
|
337
|
+
return _reactNative.StyleSheet.create({
|
|
338
|
+
container: {
|
|
339
|
+
overflow: 'hidden',
|
|
340
|
+
paddingLeft: theme.components.banner?.containerPaddingLeft ?? theme.spacing.md
|
|
341
|
+
},
|
|
342
|
+
tintBar: {
|
|
343
|
+
position: 'absolute',
|
|
344
|
+
left: 0,
|
|
345
|
+
top: 0,
|
|
346
|
+
bottom: 0,
|
|
347
|
+
width: theme.components.banner?.tintBarWidth ?? 4
|
|
348
|
+
},
|
|
349
|
+
row: {
|
|
350
|
+
flexDirection: 'row',
|
|
351
|
+
alignItems: 'flex-start'
|
|
352
|
+
},
|
|
353
|
+
iconWrap: {
|
|
354
|
+
marginRight: theme.components.banner?.iconGap ?? theme.spacing.sm
|
|
355
|
+
},
|
|
356
|
+
iconCircle: {
|
|
357
|
+
width: iconCircleSize,
|
|
358
|
+
height: iconCircleSize,
|
|
359
|
+
borderRadius: theme.components.banner?.iconCircleRadius ?? iconCircleSize / 2,
|
|
360
|
+
alignItems: 'center',
|
|
361
|
+
justifyContent: 'center',
|
|
362
|
+
marginRight: theme.components.banner?.iconGap ?? theme.spacing.sm
|
|
363
|
+
},
|
|
364
|
+
iconGlyph: {
|
|
365
|
+
fontSize: theme.components.banner?.iconGlyphFontSize ?? 15,
|
|
366
|
+
fontWeight: '700',
|
|
367
|
+
lineHeight: theme.components.banner?.iconGlyphLineHeight ?? 17
|
|
368
|
+
},
|
|
369
|
+
textBlock: {
|
|
370
|
+
flex: 1,
|
|
371
|
+
paddingRight: theme.components.banner?.textBlockPaddingRight ?? theme.spacing.xs
|
|
372
|
+
},
|
|
373
|
+
closeBtn: {
|
|
374
|
+
width: closeButtonSize,
|
|
375
|
+
height: closeButtonSize,
|
|
376
|
+
borderRadius: theme.components.banner?.closeButtonRadius ?? closeButtonSize / 2,
|
|
377
|
+
alignItems: 'center',
|
|
378
|
+
justifyContent: 'center',
|
|
379
|
+
marginLeft: theme.components.banner?.closeButtonMarginLeft ?? theme.spacing.xxs ?? 4
|
|
380
|
+
},
|
|
381
|
+
actionsRow: {
|
|
382
|
+
flexDirection: 'row',
|
|
383
|
+
justifyContent: 'flex-end',
|
|
384
|
+
marginTop: theme.components.banner?.actionsRowMarginTop ?? theme.spacing.xs,
|
|
385
|
+
gap: theme.components.banner?.actionsRowGap ?? 4
|
|
386
|
+
},
|
|
387
|
+
actionBtn: {
|
|
388
|
+
paddingHorizontal: theme.components.banner?.actionButtonPaddingHorizontal ?? theme.spacing.sm,
|
|
389
|
+
paddingVertical: theme.components.banner?.actionButtonPaddingVertical ?? 6,
|
|
390
|
+
borderRadius: theme.components.banner?.actionButtonRadius ?? theme.radius.sm
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
};
|
|
394
|
+
var _default = exports.default = Banner;
|
|
395
|
+
//# sourceMappingURL=Banner.js.map
|