@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,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Select — single + multi select with bottom-sheet picker.
|
|
5
|
+
*
|
|
6
|
+
* The trigger is a FieldBase row; the picker itself is the shared OptionSheet
|
|
7
|
+
* primitive (also behind InlineSelect), so the sheet look + behaviour never
|
|
8
|
+
* drift between the two. Supports optional client-side search, theme-aware
|
|
9
|
+
* styling, full a11y, and dark-mode auto.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
13
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
14
|
+
import { useTheme } from "../../theme/index.js";
|
|
15
|
+
import { resolveHaptic, triggerHaptic } from "../../utils/index.js";
|
|
16
|
+
import { Chevron } from "../FieldBase/Chevron.js";
|
|
17
|
+
import { FieldBase, RequiredMark, resolveFieldSize, resolveFieldTextStyle, resolveVariantColors } from "../FieldBase/FieldBase.js";
|
|
18
|
+
import { OptionSheet } from "../OptionSheet/OptionSheet.js";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
// `unknown` here keeps the forwardRef signature non-generic — consumers who
|
|
21
|
+
// pass non-`SelectOption` shapes use the accessor props; type inference is
|
|
22
|
+
// preserved at the call site via the `SelectProps<T>` union.
|
|
23
|
+
const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
24
|
+
const {
|
|
25
|
+
options,
|
|
26
|
+
getOptionLabel,
|
|
27
|
+
getOptionValue,
|
|
28
|
+
getOptionDisabled,
|
|
29
|
+
getOptionDescription,
|
|
30
|
+
getOptionIcon,
|
|
31
|
+
placeholder,
|
|
32
|
+
searchable = false,
|
|
33
|
+
haptic,
|
|
34
|
+
label,
|
|
35
|
+
title,
|
|
36
|
+
required = false,
|
|
37
|
+
error,
|
|
38
|
+
disabled = false,
|
|
39
|
+
size = 'md',
|
|
40
|
+
variant: variantProp,
|
|
41
|
+
leftIcon,
|
|
42
|
+
rightIcon,
|
|
43
|
+
chevronColor,
|
|
44
|
+
chevronSize,
|
|
45
|
+
borderRadius: borderRadiusProp,
|
|
46
|
+
accessibilityLabel,
|
|
47
|
+
style,
|
|
48
|
+
triggerStyle,
|
|
49
|
+
textStyle,
|
|
50
|
+
optionStyle,
|
|
51
|
+
selectedOptionStyle,
|
|
52
|
+
optionTextStyle,
|
|
53
|
+
selectedOptionTextStyle,
|
|
54
|
+
testID
|
|
55
|
+
} = props;
|
|
56
|
+
const multi = props.multi === true;
|
|
57
|
+
|
|
58
|
+
// Accessors — fall back to SelectOption-shaped reads when unset so the
|
|
59
|
+
// default/typed call site keeps zero boilerplate.
|
|
60
|
+
const labelOf = useCallback(o => getOptionLabel ? getOptionLabel(o) : o.label ?? '', [getOptionLabel]);
|
|
61
|
+
const valueOf = useCallback(o => getOptionValue ? getOptionValue(o) : o.value, [getOptionValue]);
|
|
62
|
+
const disabledOf = useCallback(o => getOptionDisabled ? getOptionDisabled(o) : o.disabled === true, [getOptionDisabled]);
|
|
63
|
+
const descriptionOf = useCallback(o => getOptionDescription ? getOptionDescription(o) : o.description, [getOptionDescription]);
|
|
64
|
+
const iconOf = useCallback(o => getOptionIcon ? getOptionIcon(o) : o.icon, [getOptionIcon]);
|
|
65
|
+
const theme = useTheme();
|
|
66
|
+
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
67
|
+
const sizeTokens = resolveFieldSize(theme, size);
|
|
68
|
+
const fieldText = resolveFieldTextStyle(theme, {
|
|
69
|
+
disabled
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Variant resolution mirrors Input: caller prop → component-specific token →
|
|
73
|
+
// shared field-family token → library default. Lets a brand flip every
|
|
74
|
+
// input-style control in one place while keeping a Select-specific override.
|
|
75
|
+
const variant = variantProp ?? theme.components.select?.defaultVariant ?? theme.components.field?.defaultVariant ?? 'outlined';
|
|
76
|
+
|
|
77
|
+
// Bridge the legacy fill-colour API (components.select.fillColors[variant])
|
|
78
|
+
// onto FieldBase's FieldVariantTokens shape — same mapping Input uses.
|
|
79
|
+
const fillOverrides = useMemo(() => {
|
|
80
|
+
const legacy = theme.components.select?.fillColors?.[variant];
|
|
81
|
+
if (!legacy) {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
const overrides = {};
|
|
85
|
+
if (legacy.idleEmpty !== undefined) {
|
|
86
|
+
overrides.backgroundIdleEmpty = legacy.idleEmpty;
|
|
87
|
+
}
|
|
88
|
+
if (legacy.idleFilled !== undefined) {
|
|
89
|
+
overrides.backgroundIdleFilled = legacy.idleFilled;
|
|
90
|
+
}
|
|
91
|
+
if (legacy.focus !== undefined) {
|
|
92
|
+
overrides.backgroundFocused = legacy.focus;
|
|
93
|
+
}
|
|
94
|
+
if (legacy.error !== undefined) {
|
|
95
|
+
overrides.backgroundError = legacy.error;
|
|
96
|
+
}
|
|
97
|
+
if (legacy.disabled !== undefined) {
|
|
98
|
+
overrides.backgroundDisabled = legacy.disabled;
|
|
99
|
+
}
|
|
100
|
+
return Object.keys(overrides).length > 0 ? overrides : undefined;
|
|
101
|
+
}, [theme.components.select?.fillColors, variant]);
|
|
102
|
+
const borderRadiusOverride = borderRadiusProp ?? theme.components.select?.borderRadius;
|
|
103
|
+
const [open, setOpen] = useState(false);
|
|
104
|
+
|
|
105
|
+
// Selection helpers — typed to keep callbacks fully type-safe.
|
|
106
|
+
const isSelected = useCallback(optValue => {
|
|
107
|
+
if (multi) {
|
|
108
|
+
const arr = props.value ?? [];
|
|
109
|
+
return arr.includes(optValue);
|
|
110
|
+
}
|
|
111
|
+
return props.value === optValue;
|
|
112
|
+
}, [multi, props.value]);
|
|
113
|
+
const selectedOptions = useMemo(() => {
|
|
114
|
+
if (multi) {
|
|
115
|
+
const arr = props.value ?? [];
|
|
116
|
+
return options.filter(o => arr.includes(valueOf(o)));
|
|
117
|
+
}
|
|
118
|
+
const v = props.value;
|
|
119
|
+
if (v === undefined || v === null) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
const found = options.find(o => valueOf(o) === v);
|
|
123
|
+
return found ? [found] : [];
|
|
124
|
+
}, [multi, options, props.value, valueOf]);
|
|
125
|
+
const handleOpen = useCallback(() => {
|
|
126
|
+
if (disabled) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
130
|
+
if (h) {
|
|
131
|
+
triggerHaptic(h);
|
|
132
|
+
}
|
|
133
|
+
setOpen(true);
|
|
134
|
+
}, [disabled, haptic]);
|
|
135
|
+
const handleClose = useCallback(() => {
|
|
136
|
+
setOpen(false);
|
|
137
|
+
}, []);
|
|
138
|
+
const handleSelect = useCallback(option => {
|
|
139
|
+
if (disabledOf(option)) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const optValue = valueOf(option);
|
|
143
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
144
|
+
if (h) {
|
|
145
|
+
triggerHaptic(h);
|
|
146
|
+
}
|
|
147
|
+
if (multi) {
|
|
148
|
+
const current = props.value ?? [];
|
|
149
|
+
const next = current.includes(optValue) ? current.filter(v => v !== optValue) : [...current, optValue];
|
|
150
|
+
props.onChange(next);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
props.onChange(optValue);
|
|
154
|
+
handleClose();
|
|
155
|
+
}, [multi, props, handleClose, disabledOf, valueOf, haptic]);
|
|
156
|
+
|
|
157
|
+
// Trigger label / placeholder text.
|
|
158
|
+
const triggerText = selectedOptions.length === 0 ? placeholder ?? 'Select…' : selectedOptions.map(o => labelOf(o)).join(', ');
|
|
159
|
+
const showingPlaceholder = selectedOptions.length === 0;
|
|
160
|
+
const hasError = typeof error === 'string' && error.length > 0;
|
|
161
|
+
const a11ySummary = selectedOptions.length === 0 ? placeholder ?? 'No selection' : `Selected: ${selectedOptions.map(o => labelOf(o)).join(', ')}`;
|
|
162
|
+
const a11yLabel = accessibilityLabel ?? `${label ?? 'Select'}. ${a11ySummary}`;
|
|
163
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
164
|
+
style: [styles.container, style],
|
|
165
|
+
testID: testID,
|
|
166
|
+
children: [label ? /*#__PURE__*/_jsxs(Text, {
|
|
167
|
+
style: [styles.label, {
|
|
168
|
+
color: hasError ? theme.colors.error : theme.colors.text.secondary,
|
|
169
|
+
fontSize: theme.typography.fontSize.sm,
|
|
170
|
+
fontWeight: theme.typography.fontWeight.medium,
|
|
171
|
+
marginBottom: theme.spacing.xxs
|
|
172
|
+
}],
|
|
173
|
+
children: [label, required ? /*#__PURE__*/_jsx(RequiredMark, {}) : null]
|
|
174
|
+
}) : null, /*#__PURE__*/_jsx(View, {
|
|
175
|
+
ref: ref,
|
|
176
|
+
collapsable: false,
|
|
177
|
+
children: /*#__PURE__*/_jsx(FieldBase, {
|
|
178
|
+
size: size,
|
|
179
|
+
variant: variant,
|
|
180
|
+
disabled: disabled,
|
|
181
|
+
error: hasError,
|
|
182
|
+
filled: selectedOptions.length > 0,
|
|
183
|
+
onPress: handleOpen,
|
|
184
|
+
borderRadius: borderRadiusOverride,
|
|
185
|
+
fillOverrides: fillOverrides,
|
|
186
|
+
accessibilityRole: "button",
|
|
187
|
+
accessibilityLabel: a11yLabel,
|
|
188
|
+
accessibilityState: {
|
|
189
|
+
disabled,
|
|
190
|
+
expanded: open
|
|
191
|
+
},
|
|
192
|
+
style: triggerStyle,
|
|
193
|
+
leading: leftIcon ? /*#__PURE__*/_jsx(View, {
|
|
194
|
+
children: leftIcon
|
|
195
|
+
}) : null,
|
|
196
|
+
trailing: rightIcon ? /*#__PURE__*/_jsx(View, {
|
|
197
|
+
children: rightIcon
|
|
198
|
+
}) : /*#__PURE__*/_jsx(Chevron, {
|
|
199
|
+
color: chevronColor ?? (disabled ? theme.colors.text.disabled : theme.colors.text.tertiary),
|
|
200
|
+
size: chevronSize ?? sizeTokens.iconSize,
|
|
201
|
+
open: open,
|
|
202
|
+
style: styles.chevron
|
|
203
|
+
}),
|
|
204
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
205
|
+
style: [styles.triggerText, {
|
|
206
|
+
color: showingPlaceholder ? fieldText.placeholderColor : fieldText.color,
|
|
207
|
+
fontSize: sizeTokens.fontSize,
|
|
208
|
+
...fieldText.weightStyle
|
|
209
|
+
}, textStyle],
|
|
210
|
+
numberOfLines: 1,
|
|
211
|
+
children: triggerText
|
|
212
|
+
})
|
|
213
|
+
})
|
|
214
|
+
}), hasError ? /*#__PURE__*/_jsx(Text, {
|
|
215
|
+
style: [styles.errorText, {
|
|
216
|
+
color: theme.colors.error,
|
|
217
|
+
fontSize: theme.typography.fontSize.xs,
|
|
218
|
+
marginTop: theme.spacing.xxs
|
|
219
|
+
}],
|
|
220
|
+
accessibilityLiveRegion: "polite",
|
|
221
|
+
children: error
|
|
222
|
+
}) : null, /*#__PURE__*/_jsx(OptionSheet, {
|
|
223
|
+
open: open,
|
|
224
|
+
onClose: handleClose,
|
|
225
|
+
title: title,
|
|
226
|
+
accessibilityLabel: label ?? placeholder ?? 'Options',
|
|
227
|
+
options: options,
|
|
228
|
+
labelOf: labelOf,
|
|
229
|
+
valueOf: valueOf,
|
|
230
|
+
disabledOf: disabledOf,
|
|
231
|
+
descriptionOf: descriptionOf,
|
|
232
|
+
iconOf: iconOf,
|
|
233
|
+
isSelected: isSelected,
|
|
234
|
+
onSelect: handleSelect,
|
|
235
|
+
multi: multi,
|
|
236
|
+
searchable: searchable,
|
|
237
|
+
optionStyle: optionStyle,
|
|
238
|
+
selectedOptionStyle: selectedOptionStyle,
|
|
239
|
+
optionTextStyle: optionTextStyle,
|
|
240
|
+
selectedOptionTextStyle: selectedOptionTextStyle,
|
|
241
|
+
searchSelectionColor: resolveVariantColors(theme, variant, fillOverrides).borderFocusedRepresentative
|
|
242
|
+
})]
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
Select.displayName = 'Select';
|
|
246
|
+
const buildStyles = _theme => StyleSheet.create({
|
|
247
|
+
container: {
|
|
248
|
+
width: '100%'
|
|
249
|
+
},
|
|
250
|
+
label: {
|
|
251
|
+
includeFontPadding: false
|
|
252
|
+
},
|
|
253
|
+
triggerText: {
|
|
254
|
+
flex: 1,
|
|
255
|
+
includeFontPadding: false
|
|
256
|
+
},
|
|
257
|
+
errorText: {
|
|
258
|
+
includeFontPadding: false
|
|
259
|
+
},
|
|
260
|
+
chevron: {
|
|
261
|
+
marginLeft: 8
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
export { Select };
|
|
265
|
+
export default Select;
|
|
266
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton — the leaf placeholder primitive.
|
|
5
|
+
*
|
|
6
|
+
* Every Skeleton on screen reads the shared shimmer/pulse clock from
|
|
7
|
+
* `SkeletonProvider` (see SkeletonClock.tsx). One native-driver loop per
|
|
8
|
+
* provider drives every instance, so 50 placeholders on a list don't spawn
|
|
9
|
+
* 50 timers and the shimmer bands never drift out of phase.
|
|
10
|
+
*
|
|
11
|
+
* Visual:
|
|
12
|
+
* - A View with the base color and `overflow: hidden` + radius gives the
|
|
13
|
+
* placeholder its shape.
|
|
14
|
+
* - For `animation: 'shimmer'`, an Animated.View carrying a 3-stop
|
|
15
|
+
* `LinearGradient` (transparent → highlight → transparent) translates
|
|
16
|
+
* across the box. The radius clips it to the right outline automatically.
|
|
17
|
+
* - For `animation: 'pulse'`, a full-fill Animated.View fades its opacity
|
|
18
|
+
* between 0 and 0.6. Cheap and useful for tiny shapes where a sweep
|
|
19
|
+
* would barely be visible.
|
|
20
|
+
* - For `animation: 'none'` (or when the OS Reduce Motion preference is
|
|
21
|
+
* on), just the base color renders.
|
|
22
|
+
*
|
|
23
|
+
* `variant` describes the SHAPE: rect (default), rounded (theme.radius.md),
|
|
24
|
+
* circle (50%), or text (small radius, slightly inset height). Set width /
|
|
25
|
+
* height directly for full control.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import React, { useMemo, useState } from 'react';
|
|
29
|
+
import { Animated, StyleSheet, View } from 'react-native';
|
|
30
|
+
import { useTheme } from "../../theme/index.js";
|
|
31
|
+
|
|
32
|
+
// `react-native-linear-gradient` is an OPTIONAL peer dep. When it's installed
|
|
33
|
+
// we sweep a real gradient band across the shimmer. When it isn't, we fall
|
|
34
|
+
// back to a solid-color band — still works, just less polished. This keeps
|
|
35
|
+
// the library deployable in apps that don't need gradients elsewhere.
|
|
36
|
+
let LinearGradientImpl = null;
|
|
37
|
+
try {
|
|
38
|
+
LinearGradientImpl = require('react-native-linear-gradient').default;
|
|
39
|
+
} catch {
|
|
40
|
+
// Optional peer; resolved lazily by consumers that need shimmer polish.
|
|
41
|
+
}
|
|
42
|
+
import { Responsive } from "../../utils/index.js";
|
|
43
|
+
import { useSkeletonClock } from "./SkeletonClock.js";
|
|
44
|
+
import { useSkeletonDefaults } from "./SkeletonProvider.js";
|
|
45
|
+
|
|
46
|
+
/** Animation pattern. */
|
|
47
|
+
|
|
48
|
+
/** Sweep speed for the shimmer band. Ignored for pulse / none. */
|
|
49
|
+
|
|
50
|
+
/** Pre-defined shape archetype. Plays nicely with `width`/`height` overrides. */
|
|
51
|
+
|
|
52
|
+
/** `theme.radius` token name or a literal pixel value. */
|
|
53
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
54
|
+
const resolveRadius = (theme, radius) => {
|
|
55
|
+
if (typeof radius === 'number') {
|
|
56
|
+
return radius;
|
|
57
|
+
}
|
|
58
|
+
return theme.radius[radius];
|
|
59
|
+
};
|
|
60
|
+
const resolveWidth = width => {
|
|
61
|
+
if (width === undefined) {
|
|
62
|
+
return '100%';
|
|
63
|
+
}
|
|
64
|
+
if (typeof width === 'number') {
|
|
65
|
+
return width;
|
|
66
|
+
}
|
|
67
|
+
return width;
|
|
68
|
+
};
|
|
69
|
+
const radiusForShape = (theme, shape, width, height, explicit) => {
|
|
70
|
+
if (explicit !== undefined) {
|
|
71
|
+
return resolveRadius(theme, explicit);
|
|
72
|
+
}
|
|
73
|
+
switch (shape) {
|
|
74
|
+
case 'circle':
|
|
75
|
+
// Half the smallest known dimension. If width is a percentage we can't
|
|
76
|
+
// resolve here — fall back to height/2 which is the typical caller
|
|
77
|
+
// intent (square avatars).
|
|
78
|
+
return Math.floor(typeof width === 'number' ? Math.min(width, height) / 2 : height / 2);
|
|
79
|
+
case 'rounded':
|
|
80
|
+
return theme.radius.md;
|
|
81
|
+
case 'text':
|
|
82
|
+
return theme.radius.sm;
|
|
83
|
+
case 'rect':
|
|
84
|
+
default:
|
|
85
|
+
return theme.radius.sm;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const Skeleton = ({
|
|
89
|
+
shape = 'rect',
|
|
90
|
+
width = '100%',
|
|
91
|
+
height = 16,
|
|
92
|
+
radius,
|
|
93
|
+
variant,
|
|
94
|
+
speed: _speedProp,
|
|
95
|
+
colors,
|
|
96
|
+
style,
|
|
97
|
+
testID
|
|
98
|
+
}) => {
|
|
99
|
+
const theme = useTheme();
|
|
100
|
+
const defaults = useSkeletonDefaults();
|
|
101
|
+
const clock = useSkeletonClock();
|
|
102
|
+
const resolvedVariant = variant ?? defaults.variant ?? 'shimmer';
|
|
103
|
+
const effectiveVariant = clock.enabled ? resolvedVariant : 'none';
|
|
104
|
+
const backgroundColor = colors?.background ?? defaults.colors?.background ?? theme.colors.skeleton.background;
|
|
105
|
+
const highlightColor = colors?.highlight ?? defaults.colors?.highlight ?? theme.colors.skeleton.highlight;
|
|
106
|
+
const styles = useMemo(() => buildStyles(), []);
|
|
107
|
+
const resolvedWidth = resolveWidth(width);
|
|
108
|
+
const resolvedHeight = Responsive.size(height);
|
|
109
|
+
const borderRadius = radiusForShape(theme, shape, resolvedWidth, resolvedHeight, radius);
|
|
110
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
111
|
+
const handleLayout = event => {
|
|
112
|
+
const next = event.nativeEvent.layout.width;
|
|
113
|
+
if (next !== containerWidth) {
|
|
114
|
+
setContainerWidth(next);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// The shimmer band is wider than the box so the gradient feathers off the
|
|
119
|
+
// edges instead of popping at them. Width = 70% of container, capped to a
|
|
120
|
+
// sensible minimum so tiny placeholders still get a visible sweep.
|
|
121
|
+
const bandWidth = useMemo(() => {
|
|
122
|
+
if (containerWidth <= 0) {
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
return Math.max(48, containerWidth * 0.7);
|
|
126
|
+
}, [containerWidth]);
|
|
127
|
+
|
|
128
|
+
// Interpolate the shared 0→1 clock into translateX. The band starts fully
|
|
129
|
+
// off the left edge and ends fully off the right edge, so each loop sweeps
|
|
130
|
+
// the full width regardless of how wide the placeholder is.
|
|
131
|
+
const translateX = useMemo(() => {
|
|
132
|
+
if (containerWidth <= 0) {
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
return clock.shimmer.interpolate({
|
|
136
|
+
inputRange: [0, 1],
|
|
137
|
+
outputRange: [-bandWidth, containerWidth]
|
|
138
|
+
});
|
|
139
|
+
}, [clock.shimmer, bandWidth, containerWidth]);
|
|
140
|
+
const overlay = useMemo(() => {
|
|
141
|
+
if (effectiveVariant === 'none') {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
if (effectiveVariant === 'pulse') {
|
|
145
|
+
// Pulse fades a full-fill highlight overlay in and out. Cheaper than
|
|
146
|
+
// shimmer and visible at any size.
|
|
147
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
148
|
+
pointerEvents: "none",
|
|
149
|
+
style: [StyleSheet.absoluteFill, {
|
|
150
|
+
backgroundColor: highlightColor,
|
|
151
|
+
opacity: clock.pulse.interpolate({
|
|
152
|
+
inputRange: [0, 1],
|
|
153
|
+
outputRange: [0, 0.55]
|
|
154
|
+
})
|
|
155
|
+
}]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (containerWidth <= 0) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// 3-stop gradient: transparent → highlight → transparent. Feathered
|
|
163
|
+
// edges feel premium; a solid band looks like a bug. When the optional
|
|
164
|
+
// gradient package isn't installed we render the band as a solid
|
|
165
|
+
// highlight rectangle — visibly different but still recognizably a
|
|
166
|
+
// shimmer effect.
|
|
167
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
168
|
+
pointerEvents: "none",
|
|
169
|
+
style: [styles.shimmerBand, {
|
|
170
|
+
width: bandWidth,
|
|
171
|
+
transform: [{
|
|
172
|
+
translateX
|
|
173
|
+
}]
|
|
174
|
+
}],
|
|
175
|
+
children: LinearGradientImpl ? /*#__PURE__*/_jsx(LinearGradientImpl, {
|
|
176
|
+
colors: ['transparent', highlightColor, 'transparent'],
|
|
177
|
+
locations: [0, 0.5, 1],
|
|
178
|
+
start: {
|
|
179
|
+
x: 0,
|
|
180
|
+
y: 0.5
|
|
181
|
+
},
|
|
182
|
+
end: {
|
|
183
|
+
x: 1,
|
|
184
|
+
y: 0.5
|
|
185
|
+
},
|
|
186
|
+
style: StyleSheet.absoluteFill
|
|
187
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
188
|
+
style: [StyleSheet.absoluteFill, {
|
|
189
|
+
backgroundColor: highlightColor,
|
|
190
|
+
opacity: 0.55
|
|
191
|
+
}]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}, [effectiveVariant, highlightColor, clock.pulse, containerWidth, styles.shimmerBand, bandWidth, translateX]);
|
|
195
|
+
return /*#__PURE__*/_jsx(View, {
|
|
196
|
+
onLayout: handleLayout,
|
|
197
|
+
accessible: true,
|
|
198
|
+
accessibilityLabel: "Loading",
|
|
199
|
+
accessibilityRole: "progressbar",
|
|
200
|
+
accessibilityState: {
|
|
201
|
+
busy: true
|
|
202
|
+
},
|
|
203
|
+
accessibilityLiveRegion: "polite",
|
|
204
|
+
testID: testID,
|
|
205
|
+
style: [styles.base, {
|
|
206
|
+
width: resolvedWidth,
|
|
207
|
+
height: resolvedHeight,
|
|
208
|
+
borderRadius,
|
|
209
|
+
backgroundColor
|
|
210
|
+
}, style],
|
|
211
|
+
children: overlay
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
Skeleton.displayName = 'Skeleton';
|
|
215
|
+
const SkeletonCircle = ({
|
|
216
|
+
size,
|
|
217
|
+
style,
|
|
218
|
+
...rest
|
|
219
|
+
}) => {
|
|
220
|
+
const diameter = Responsive.size(size);
|
|
221
|
+
return /*#__PURE__*/_jsx(Skeleton, {
|
|
222
|
+
...rest,
|
|
223
|
+
shape: "circle",
|
|
224
|
+
width: diameter,
|
|
225
|
+
height: size,
|
|
226
|
+
style: [{
|
|
227
|
+
width: diameter,
|
|
228
|
+
height: diameter,
|
|
229
|
+
borderRadius: diameter / 2
|
|
230
|
+
}, style]
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
SkeletonCircle.displayName = 'SkeletonCircle';
|
|
234
|
+
const SkeletonText = ({
|
|
235
|
+
lines = 3,
|
|
236
|
+
lastLineWidth = '60%',
|
|
237
|
+
spacing,
|
|
238
|
+
fontSize = 14,
|
|
239
|
+
variant,
|
|
240
|
+
speed,
|
|
241
|
+
radius = 'sm',
|
|
242
|
+
width = '100%',
|
|
243
|
+
style,
|
|
244
|
+
testID
|
|
245
|
+
}) => {
|
|
246
|
+
const theme = useTheme();
|
|
247
|
+
const gap = spacing ?? theme.spacing.xs;
|
|
248
|
+
const lineHeight = Responsive.font(fontSize);
|
|
249
|
+
const safeLines = Math.max(1, lines);
|
|
250
|
+
return /*#__PURE__*/_jsx(View, {
|
|
251
|
+
style: style,
|
|
252
|
+
testID: testID,
|
|
253
|
+
children: Array.from({
|
|
254
|
+
length: safeLines
|
|
255
|
+
}).map((_, index) => {
|
|
256
|
+
const isLast = index === safeLines - 1;
|
|
257
|
+
const lineWidth = isLast && safeLines > 1 ? lastLineWidth : width;
|
|
258
|
+
return /*#__PURE__*/_jsx(Skeleton, {
|
|
259
|
+
shape: "text",
|
|
260
|
+
width: lineWidth,
|
|
261
|
+
height: lineHeight,
|
|
262
|
+
radius: radius,
|
|
263
|
+
variant: variant,
|
|
264
|
+
speed: speed,
|
|
265
|
+
style: index < safeLines - 1 ? {
|
|
266
|
+
marginBottom: gap
|
|
267
|
+
} : undefined
|
|
268
|
+
}, index);
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
};
|
|
272
|
+
SkeletonText.displayName = 'SkeletonText';
|
|
273
|
+
const buildStyles = () => StyleSheet.create({
|
|
274
|
+
base: {
|
|
275
|
+
overflow: 'hidden'
|
|
276
|
+
},
|
|
277
|
+
shimmerBand: {
|
|
278
|
+
position: 'absolute',
|
|
279
|
+
top: 0,
|
|
280
|
+
bottom: 0,
|
|
281
|
+
left: 0
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
export { Skeleton, SkeletonCircle, SkeletonText };
|
|
285
|
+
export default Skeleton;
|
|
286
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SkeletonClock — single shared animation tick for every <Skeleton> on screen.
|
|
5
|
+
*
|
|
6
|
+
* Why this exists: previously every Skeleton primitive ran its own
|
|
7
|
+
* `Animated.loop` on its own `Animated.Value`. A list of 20 placeholders =
|
|
8
|
+
* 20 independent native-driver timers, each starting at a slightly different
|
|
9
|
+
* mount frame, so their shimmer bands drift out of phase within ~1s and the
|
|
10
|
+
* surface feels noisy. CSS-driven web skeleton libs (react-loading-skeleton,
|
|
11
|
+
* MUI) avoid this because the browser owns a single timeline. We emulate
|
|
12
|
+
* that on RN by hoisting the loop into context.
|
|
13
|
+
*
|
|
14
|
+
* The clock produces a value in `[0, 1)` that wraps every `duration` ms. Each
|
|
15
|
+
* Skeleton interpolates that value into its own translateX / opacity output.
|
|
16
|
+
* One native-driver loop, no drift, ~zero JS cost.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
|
|
20
|
+
import { Animated, Easing } from 'react-native';
|
|
21
|
+
import { createAnimatedValue } from "../../theme/index.js";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
const SHIMMER_DURATION = {
|
|
24
|
+
slow: 1800,
|
|
25
|
+
normal: 1200,
|
|
26
|
+
fast: 800
|
|
27
|
+
};
|
|
28
|
+
const PULSE_DURATION = 1000;
|
|
29
|
+
const SkeletonClockContext = /*#__PURE__*/createContext(null);
|
|
30
|
+
/**
|
|
31
|
+
* Owns the loops. Mount one of these inside `SkeletonProvider`; every
|
|
32
|
+
* `<Skeleton>` below it shares the same animated values.
|
|
33
|
+
*/
|
|
34
|
+
export const SkeletonClockProvider = ({
|
|
35
|
+
speed,
|
|
36
|
+
enabled,
|
|
37
|
+
variant: _variant,
|
|
38
|
+
children
|
|
39
|
+
}) => {
|
|
40
|
+
const shimmer = useRef(createAnimatedValue(0)).current;
|
|
41
|
+
const pulse = useRef(createAnimatedValue(0)).current;
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!enabled) {
|
|
44
|
+
// Park the values at a deterministic "off" state so any consumer that
|
|
45
|
+
// happens to be reading them still gets a visible (static) skeleton.
|
|
46
|
+
shimmer.setValue(0);
|
|
47
|
+
pulse.setValue(0.5);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Both loops use the native driver — the JS thread doesn't tick for
|
|
52
|
+
// either. Both run continuously; consumers read whichever they need.
|
|
53
|
+
// The negligible cost of running the *other* loop is worth keeping
|
|
54
|
+
// variant switching instant (no remount, no loop teardown).
|
|
55
|
+
const shimmerLoop = Animated.loop(Animated.timing(shimmer, {
|
|
56
|
+
toValue: 1,
|
|
57
|
+
duration: SHIMMER_DURATION[speed],
|
|
58
|
+
easing: Easing.linear,
|
|
59
|
+
useNativeDriver: true
|
|
60
|
+
}));
|
|
61
|
+
const pulseLoop = Animated.loop(Animated.sequence([Animated.timing(pulse, {
|
|
62
|
+
toValue: 1,
|
|
63
|
+
duration: PULSE_DURATION / 2,
|
|
64
|
+
easing: Easing.inOut(Easing.ease),
|
|
65
|
+
useNativeDriver: true
|
|
66
|
+
}), Animated.timing(pulse, {
|
|
67
|
+
toValue: 0,
|
|
68
|
+
duration: PULSE_DURATION / 2,
|
|
69
|
+
easing: Easing.inOut(Easing.ease),
|
|
70
|
+
useNativeDriver: true
|
|
71
|
+
})]));
|
|
72
|
+
shimmerLoop.start();
|
|
73
|
+
pulseLoop.start();
|
|
74
|
+
return () => {
|
|
75
|
+
shimmerLoop.stop();
|
|
76
|
+
pulseLoop.stop();
|
|
77
|
+
};
|
|
78
|
+
// `variant` is intentionally NOT a dependency — both loops always run
|
|
79
|
+
// so switching variants is a single render with no loop teardown.
|
|
80
|
+
}, [speed, enabled, shimmer, pulse]);
|
|
81
|
+
const value = useMemo(() => ({
|
|
82
|
+
shimmer,
|
|
83
|
+
pulse,
|
|
84
|
+
enabled
|
|
85
|
+
}), [shimmer, pulse, enabled]);
|
|
86
|
+
return /*#__PURE__*/_jsx(SkeletonClockContext.Provider, {
|
|
87
|
+
value: value,
|
|
88
|
+
children: children
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
SkeletonClockProvider.displayName = 'SkeletonClockProvider';
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Read the active clock. Returns a fallback "always-still" clock when no
|
|
95
|
+
* provider is mounted, so the primitives still render (statically) outside
|
|
96
|
+
* one — keeps demo/storybook usage friction-free.
|
|
97
|
+
*/
|
|
98
|
+
export const useSkeletonClock = () => {
|
|
99
|
+
const ctx = useContext(SkeletonClockContext);
|
|
100
|
+
if (ctx) {
|
|
101
|
+
return ctx;
|
|
102
|
+
}
|
|
103
|
+
// Fallback: a permanently-stopped clock. Created once at module scope.
|
|
104
|
+
return fallbackClock;
|
|
105
|
+
};
|
|
106
|
+
const fallbackClock = {
|
|
107
|
+
shimmer: createAnimatedValue(0),
|
|
108
|
+
pulse: createAnimatedValue(0.5),
|
|
109
|
+
enabled: false
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=SkeletonClock.js.map
|