@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,742 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { AccessibilityInfo, Animated, Easing, Modal, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
import { createAnimatedValue, setNativeValue, useTheme } from "../../theme/index.js";
|
|
7
|
+
import { resolveHaptic, triggerHaptic } from "../../utils/index.js";
|
|
8
|
+
import { PickerTrigger } from "../PickerTrigger/index.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* DateRangePicker — supports two usage modes:
|
|
12
|
+
*
|
|
13
|
+
* 1. Controlled-modal mode (pass `visible` + `onClose`): renders only the
|
|
14
|
+
* modal; parent owns open/close state.
|
|
15
|
+
* 2. Trigger mode (omit `visible`): renders a built-in `PickerTrigger`
|
|
16
|
+
* field that opens an internally-managed modal on tap. Confirm fires
|
|
17
|
+
* `onChange?.(...)` and closes.
|
|
18
|
+
*/
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
21
|
+
const startOfDay = date => new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
22
|
+
const isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
23
|
+
const toIso = date => {
|
|
24
|
+
const y = date.getFullYear();
|
|
25
|
+
const m = String(date.getMonth() + 1).padStart(2, '0');
|
|
26
|
+
const d = String(date.getDate()).padStart(2, '0');
|
|
27
|
+
return `${y}-${m}-${d}`;
|
|
28
|
+
};
|
|
29
|
+
const addMonths = (date, delta) => new Date(date.getFullYear(), date.getMonth() + delta, 1);
|
|
30
|
+
const daysBetween = (a, b) => {
|
|
31
|
+
const diffMs = startOfDay(b).getTime() - startOfDay(a).getTime();
|
|
32
|
+
return Math.round(diffMs / DAY_MS);
|
|
33
|
+
};
|
|
34
|
+
const buildMonthMatrix = (anchor, weekStartsOn) => {
|
|
35
|
+
const year = anchor.getFullYear();
|
|
36
|
+
const month = anchor.getMonth();
|
|
37
|
+
const firstOfMonth = new Date(year, month, 1);
|
|
38
|
+
const firstWeekday = firstOfMonth.getDay();
|
|
39
|
+
const offset = (firstWeekday - weekStartsOn + 7) % 7;
|
|
40
|
+
const cells = [];
|
|
41
|
+
for (let i = 0; i < 42; i += 1) {
|
|
42
|
+
// Calendar arithmetic, not `gridStart + i * DAY_MS` (a fixed-ms step): adding a fixed 24h
|
|
43
|
+
// across a DST transition shifts local time by an hour, which duplicates
|
|
44
|
+
// or skips a day in the grid. Invisible in IST, wrong everywhere that
|
|
45
|
+
// observes DST.
|
|
46
|
+
const d = new Date(year, month, 1 - offset + i);
|
|
47
|
+
cells.push({
|
|
48
|
+
date: d,
|
|
49
|
+
inMonth: d.getMonth() === month,
|
|
50
|
+
iso: toIso(d)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return cells;
|
|
54
|
+
};
|
|
55
|
+
const weekdayLabels = (locale, weekStartsOn) => {
|
|
56
|
+
const fmt = new Intl.DateTimeFormat(locale, {
|
|
57
|
+
weekday: 'short'
|
|
58
|
+
});
|
|
59
|
+
const labels = [];
|
|
60
|
+
for (let i = 0; i < 7; i += 1) {
|
|
61
|
+
const day = (weekStartsOn + i) % 7;
|
|
62
|
+
const ref = new Date(1970, 0, 4 + day);
|
|
63
|
+
labels.push(fmt.format(ref));
|
|
64
|
+
}
|
|
65
|
+
return labels;
|
|
66
|
+
};
|
|
67
|
+
const formatMonthYear = (date, locale) => new Intl.DateTimeFormat(locale, {
|
|
68
|
+
month: 'long',
|
|
69
|
+
year: 'numeric'
|
|
70
|
+
}).format(date);
|
|
71
|
+
const formatRangePart = (date, locale) => new Intl.DateTimeFormat(locale, {
|
|
72
|
+
weekday: 'short',
|
|
73
|
+
day: 'numeric',
|
|
74
|
+
month: 'short'
|
|
75
|
+
}).format(date);
|
|
76
|
+
const formatLongDate = (date, locale) => new Intl.DateTimeFormat(locale, {
|
|
77
|
+
weekday: 'long',
|
|
78
|
+
year: 'numeric',
|
|
79
|
+
month: 'long',
|
|
80
|
+
day: 'numeric'
|
|
81
|
+
}).format(date);
|
|
82
|
+
const DateRangePicker = /*#__PURE__*/forwardRef((props, ref) => {
|
|
83
|
+
const {
|
|
84
|
+
visible,
|
|
85
|
+
value,
|
|
86
|
+
onChange,
|
|
87
|
+
onClose,
|
|
88
|
+
label,
|
|
89
|
+
placeholder,
|
|
90
|
+
helperText,
|
|
91
|
+
error,
|
|
92
|
+
required,
|
|
93
|
+
disabled,
|
|
94
|
+
size,
|
|
95
|
+
variant,
|
|
96
|
+
clearable,
|
|
97
|
+
onClear,
|
|
98
|
+
formatValue,
|
|
99
|
+
triggerStyle,
|
|
100
|
+
minDate,
|
|
101
|
+
maxDate,
|
|
102
|
+
disabledDates,
|
|
103
|
+
locale = 'en-IN',
|
|
104
|
+
weekStartsOn = 0,
|
|
105
|
+
title = 'Select Date Range',
|
|
106
|
+
confirmLabel = 'Confirm',
|
|
107
|
+
cancelLabel = 'Cancel',
|
|
108
|
+
maxRange,
|
|
109
|
+
haptic,
|
|
110
|
+
style,
|
|
111
|
+
containerStyle,
|
|
112
|
+
headerLabelStyle,
|
|
113
|
+
navButtonStyle,
|
|
114
|
+
footerButtonStyle,
|
|
115
|
+
testID
|
|
116
|
+
} = props;
|
|
117
|
+
const isControlled = visible !== undefined;
|
|
118
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
119
|
+
const open = isControlled ? visible : internalOpen;
|
|
120
|
+
|
|
121
|
+
// In trigger mode the trigger field is what's on screen by default, so it
|
|
122
|
+
// carries the bare testID; the calendar (only mounted once opened) gets a
|
|
123
|
+
// derived id to avoid two nodes sharing the same testID when both render.
|
|
124
|
+
const calendarTestID = isControlled ? testID : testID ? `${testID}-calendar` : undefined;
|
|
125
|
+
const theme = useTheme();
|
|
126
|
+
const insets = useSafeAreaInsets();
|
|
127
|
+
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
128
|
+
|
|
129
|
+
// Refreshed each time the picker opens: computed once at mount, an app left
|
|
130
|
+
// open overnight would keep highlighting yesterday.
|
|
131
|
+
const [today, setToday] = useState(() => startOfDay(new Date()));
|
|
132
|
+
useEffect(() => {
|
|
133
|
+
if (open) {
|
|
134
|
+
setToday(startOfDay(new Date()));
|
|
135
|
+
}
|
|
136
|
+
}, [open]);
|
|
137
|
+
const initialAnchor = value.start ? startOfDay(value.start) : today;
|
|
138
|
+
const [anchor, setAnchor] = useState(initialAnchor);
|
|
139
|
+
const [pendingStart, setPendingStart] = useState(value.start ? startOfDay(value.start) : null);
|
|
140
|
+
const [pendingEnd, setPendingEnd] = useState(value.end ? startOfDay(value.end) : null);
|
|
141
|
+
|
|
142
|
+
// Animations
|
|
143
|
+
const backdrop = useRef(createAnimatedValue(0)).current;
|
|
144
|
+
const sheet = useRef(createAnimatedValue(0)).current;
|
|
145
|
+
const monthSlide = useRef(createAnimatedValue(0)).current;
|
|
146
|
+
const monthFade = useRef(createAnimatedValue(1)).current;
|
|
147
|
+
|
|
148
|
+
// Sync external value -> pending state when it changes.
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
if (value.start) {
|
|
151
|
+
const s = startOfDay(value.start);
|
|
152
|
+
setPendingStart(s);
|
|
153
|
+
setAnchor(s);
|
|
154
|
+
} else {
|
|
155
|
+
setPendingStart(null);
|
|
156
|
+
}
|
|
157
|
+
if (value.end) {
|
|
158
|
+
setPendingEnd(startOfDay(value.end));
|
|
159
|
+
} else {
|
|
160
|
+
setPendingEnd(null);
|
|
161
|
+
}
|
|
162
|
+
}, [value.start, value.end]);
|
|
163
|
+
|
|
164
|
+
// Modal open / close animation. Backdrop opacity uses JS driver — see
|
|
165
|
+
// Modal.tsx for the Fabric reason. Sheet transform stays native.
|
|
166
|
+
useEffect(() => {
|
|
167
|
+
let anim;
|
|
168
|
+
if (open) {
|
|
169
|
+
backdrop.setValue(0);
|
|
170
|
+
setNativeValue(sheet, 0);
|
|
171
|
+
anim = Animated.parallel([Animated.timing(backdrop, {
|
|
172
|
+
toValue: 1,
|
|
173
|
+
duration: theme.motion.duration.normal,
|
|
174
|
+
easing: Easing.out(Easing.cubic),
|
|
175
|
+
useNativeDriver: false
|
|
176
|
+
}), Animated.spring(sheet, {
|
|
177
|
+
toValue: 1,
|
|
178
|
+
damping: theme.motion.spring.gentle.damping,
|
|
179
|
+
stiffness: theme.motion.spring.gentle.stiffness,
|
|
180
|
+
mass: theme.motion.spring.gentle.mass,
|
|
181
|
+
useNativeDriver: true
|
|
182
|
+
})]);
|
|
183
|
+
anim.start();
|
|
184
|
+
}
|
|
185
|
+
return () => anim?.stop();
|
|
186
|
+
}, [open, backdrop, sheet, theme.motion]);
|
|
187
|
+
const disabledIsoSet = useMemo(() => {
|
|
188
|
+
const set = new Set();
|
|
189
|
+
disabledDates?.forEach(d => set.add(toIso(startOfDay(d))));
|
|
190
|
+
return set;
|
|
191
|
+
}, [disabledDates]);
|
|
192
|
+
const minDay = useMemo(() => minDate ? startOfDay(minDate) : null, [minDate]);
|
|
193
|
+
const maxDay = useMemo(() => maxDate ? startOfDay(maxDate) : null, [maxDate]);
|
|
194
|
+
const isDisabled = useCallback(date => {
|
|
195
|
+
if (minDay && date.getTime() < minDay.getTime()) {
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
if (maxDay && date.getTime() > maxDay.getTime()) {
|
|
199
|
+
return true;
|
|
200
|
+
}
|
|
201
|
+
if (disabledIsoSet.has(toIso(date))) {
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
return false;
|
|
205
|
+
}, [minDay, maxDay, disabledIsoSet]);
|
|
206
|
+
const cells = useMemo(() => buildMonthMatrix(anchor, weekStartsOn), [anchor, weekStartsOn]);
|
|
207
|
+
const headerLabel = useMemo(() => formatMonthYear(anchor, locale), [anchor, locale]);
|
|
208
|
+
const weekdays = useMemo(() => weekdayLabels(locale, weekStartsOn), [locale, weekStartsOn]);
|
|
209
|
+
const animateMonthChange = useCallback(delta => {
|
|
210
|
+
if (haptic !== false) {
|
|
211
|
+
triggerHaptic('impactLight');
|
|
212
|
+
}
|
|
213
|
+
const direction = delta > 0 ? 1 : -1;
|
|
214
|
+
const distance = theme.components.dateRangePicker?.monthSlideDistance ?? 32;
|
|
215
|
+
const outDuration = theme.components.dateRangePicker?.monthSlideOutDuration ?? theme.motion.duration.fast ?? 140;
|
|
216
|
+
const inDuration = theme.components.dateRangePicker?.monthSlideInDuration ?? theme.motion.duration.fast ?? 160;
|
|
217
|
+
Animated.sequence([Animated.parallel([Animated.timing(monthSlide, {
|
|
218
|
+
toValue: -direction * distance,
|
|
219
|
+
duration: outDuration,
|
|
220
|
+
easing: Easing.out(Easing.quad),
|
|
221
|
+
useNativeDriver: true
|
|
222
|
+
}), Animated.timing(monthFade, {
|
|
223
|
+
toValue: 0,
|
|
224
|
+
duration: outDuration,
|
|
225
|
+
useNativeDriver: true
|
|
226
|
+
})]), Animated.timing(monthSlide, {
|
|
227
|
+
toValue: direction * distance,
|
|
228
|
+
duration: 0,
|
|
229
|
+
useNativeDriver: true
|
|
230
|
+
}), Animated.parallel([Animated.timing(monthSlide, {
|
|
231
|
+
toValue: 0,
|
|
232
|
+
duration: inDuration,
|
|
233
|
+
easing: Easing.out(Easing.cubic),
|
|
234
|
+
useNativeDriver: true
|
|
235
|
+
}), Animated.timing(monthFade, {
|
|
236
|
+
toValue: 1,
|
|
237
|
+
duration: inDuration,
|
|
238
|
+
useNativeDriver: true
|
|
239
|
+
})])]).start();
|
|
240
|
+
const next = addMonths(anchor, delta);
|
|
241
|
+
setAnchor(next);
|
|
242
|
+
AccessibilityInfo.announceForAccessibility(formatMonthYear(next, locale));
|
|
243
|
+
}, [anchor, haptic, locale, monthFade, monthSlide, theme.components.dateRangePicker, theme.motion.duration.fast]);
|
|
244
|
+
const goPrev = useCallback(() => animateMonthChange(-1), [animateMonthChange]);
|
|
245
|
+
const goNext = useCallback(() => animateMonthChange(1), [animateMonthChange]);
|
|
246
|
+
const pressDay = useCallback(cell => {
|
|
247
|
+
if (isDisabled(cell.date)) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
251
|
+
if (h) {
|
|
252
|
+
triggerHaptic(h);
|
|
253
|
+
}
|
|
254
|
+
const target = cell.date;
|
|
255
|
+
|
|
256
|
+
// First tap: pick start. Or, when there's already a complete range, restart.
|
|
257
|
+
if (!pendingStart || pendingStart && pendingEnd) {
|
|
258
|
+
setPendingStart(target);
|
|
259
|
+
setPendingEnd(null);
|
|
260
|
+
} else {
|
|
261
|
+
// We have a start but no end.
|
|
262
|
+
if (target.getTime() < pendingStart.getTime()) {
|
|
263
|
+
// Earlier than start — reset so this becomes the new start.
|
|
264
|
+
setPendingStart(target);
|
|
265
|
+
setPendingEnd(null);
|
|
266
|
+
} else if (isSameDay(target, pendingStart)) {
|
|
267
|
+
// Tapping start again — single-day range.
|
|
268
|
+
setPendingEnd(target);
|
|
269
|
+
} else {
|
|
270
|
+
if (maxRange && daysBetween(pendingStart, target) + 1 > maxRange) {
|
|
271
|
+
// Reject ranges longer than maxRange — restart from the new tap.
|
|
272
|
+
if (haptic !== false) {
|
|
273
|
+
triggerHaptic('notificationWarning');
|
|
274
|
+
}
|
|
275
|
+
setPendingStart(target);
|
|
276
|
+
setPendingEnd(null);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
setPendingEnd(target);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (!cell.inMonth) {
|
|
283
|
+
setAnchor(new Date(cell.date.getFullYear(), cell.date.getMonth(), 1));
|
|
284
|
+
}
|
|
285
|
+
}, [isDisabled, pendingStart, pendingEnd, maxRange, haptic]);
|
|
286
|
+
const handleCloseModal = useCallback(() => {
|
|
287
|
+
if (isControlled) {
|
|
288
|
+
onClose?.();
|
|
289
|
+
} else {
|
|
290
|
+
setInternalOpen(false);
|
|
291
|
+
}
|
|
292
|
+
}, [isControlled, onClose]);
|
|
293
|
+
const handleClose = useCallback(() => {
|
|
294
|
+
Animated.parallel([Animated.timing(backdrop, {
|
|
295
|
+
toValue: 0,
|
|
296
|
+
duration: theme.motion.duration.fast,
|
|
297
|
+
easing: Easing.bezier(...theme.motion.easing.accelerate),
|
|
298
|
+
useNativeDriver: false
|
|
299
|
+
}), Animated.timing(sheet, {
|
|
300
|
+
toValue: 0,
|
|
301
|
+
duration: theme.motion.duration.fast,
|
|
302
|
+
easing: Easing.bezier(...theme.motion.easing.accelerate),
|
|
303
|
+
useNativeDriver: true
|
|
304
|
+
})]).start(() => {
|
|
305
|
+
handleCloseModal();
|
|
306
|
+
});
|
|
307
|
+
}, [backdrop, handleCloseModal, sheet, theme.motion.duration.fast, theme.motion.easing.accelerate]);
|
|
308
|
+
const handleCancel = useCallback(() => {
|
|
309
|
+
if (haptic !== false) {
|
|
310
|
+
triggerHaptic('selection');
|
|
311
|
+
}
|
|
312
|
+
handleClose();
|
|
313
|
+
}, [handleClose, haptic]);
|
|
314
|
+
const handleConfirm = useCallback(() => {
|
|
315
|
+
if (!pendingStart || !pendingEnd) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (haptic !== false) {
|
|
319
|
+
triggerHaptic('notificationSuccess');
|
|
320
|
+
}
|
|
321
|
+
onChange?.({
|
|
322
|
+
start: pendingStart,
|
|
323
|
+
end: pendingEnd
|
|
324
|
+
});
|
|
325
|
+
handleClose();
|
|
326
|
+
}, [handleClose, onChange, pendingStart, pendingEnd, haptic]);
|
|
327
|
+
const sheetTranslate = sheet.interpolate({
|
|
328
|
+
inputRange: [0, 1],
|
|
329
|
+
outputRange: [320, 0]
|
|
330
|
+
});
|
|
331
|
+
const rangeHeader = useMemo(() => {
|
|
332
|
+
if (pendingStart && pendingEnd) {
|
|
333
|
+
return `${formatRangePart(pendingStart, locale)} — ${formatRangePart(pendingEnd, locale)}`;
|
|
334
|
+
}
|
|
335
|
+
if (pendingStart) {
|
|
336
|
+
return `${formatRangePart(pendingStart, locale)} — …`;
|
|
337
|
+
}
|
|
338
|
+
return '—';
|
|
339
|
+
}, [pendingStart, pendingEnd, locale]);
|
|
340
|
+
const isInRangeInclusive = useCallback(d => {
|
|
341
|
+
if (!pendingStart || !pendingEnd) {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
const t = startOfDay(d).getTime();
|
|
345
|
+
return t >= pendingStart.getTime() && t <= pendingEnd.getTime();
|
|
346
|
+
}, [pendingStart, pendingEnd]);
|
|
347
|
+
const confirmDisabled = !pendingStart || !pendingEnd;
|
|
348
|
+
const calendar = /*#__PURE__*/_jsxs(View, {
|
|
349
|
+
style: [styles.card, style, containerStyle],
|
|
350
|
+
ref: ref,
|
|
351
|
+
accessible: false,
|
|
352
|
+
testID: calendarTestID,
|
|
353
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
354
|
+
style: styles.titleRow,
|
|
355
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
356
|
+
style: styles.title,
|
|
357
|
+
accessibilityRole: "header",
|
|
358
|
+
children: title
|
|
359
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
360
|
+
style: styles.subtitle,
|
|
361
|
+
accessibilityLiveRegion: "polite",
|
|
362
|
+
children: rangeHeader
|
|
363
|
+
})]
|
|
364
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
365
|
+
style: styles.headerRow,
|
|
366
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
367
|
+
onPress: goPrev,
|
|
368
|
+
style: ({
|
|
369
|
+
pressed
|
|
370
|
+
}) => [styles.navBtn, pressed && styles.navBtnPressed, navButtonStyle],
|
|
371
|
+
accessibilityRole: "button",
|
|
372
|
+
accessibilityLabel: "Previous month",
|
|
373
|
+
hitSlop: 8,
|
|
374
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
375
|
+
style: styles.navText,
|
|
376
|
+
children: '‹'
|
|
377
|
+
})
|
|
378
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
379
|
+
style: [styles.headerLabelWrap, {
|
|
380
|
+
opacity: monthFade,
|
|
381
|
+
transform: [{
|
|
382
|
+
translateX: monthSlide
|
|
383
|
+
}]
|
|
384
|
+
}, headerLabelStyle],
|
|
385
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
386
|
+
style: styles.headerLabel,
|
|
387
|
+
accessibilityLiveRegion: "polite",
|
|
388
|
+
children: headerLabel
|
|
389
|
+
})
|
|
390
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
391
|
+
onPress: goNext,
|
|
392
|
+
style: ({
|
|
393
|
+
pressed
|
|
394
|
+
}) => [styles.navBtn, pressed && styles.navBtnPressed, navButtonStyle],
|
|
395
|
+
accessibilityRole: "button",
|
|
396
|
+
accessibilityLabel: "Next month",
|
|
397
|
+
hitSlop: 8,
|
|
398
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
399
|
+
style: styles.navText,
|
|
400
|
+
children: '›'
|
|
401
|
+
})
|
|
402
|
+
})]
|
|
403
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
404
|
+
style: styles.weekdayRow,
|
|
405
|
+
children: weekdays.map((wd, idx) => /*#__PURE__*/_jsx(View, {
|
|
406
|
+
style: styles.weekdayCell,
|
|
407
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
408
|
+
style: styles.weekdayText,
|
|
409
|
+
children: wd
|
|
410
|
+
})
|
|
411
|
+
}, `${wd}-${idx}`))
|
|
412
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
413
|
+
style: [styles.grid, {
|
|
414
|
+
opacity: monthFade,
|
|
415
|
+
transform: [{
|
|
416
|
+
translateX: monthSlide
|
|
417
|
+
}]
|
|
418
|
+
}],
|
|
419
|
+
children: Array.from({
|
|
420
|
+
length: 6
|
|
421
|
+
}).map((_, row) => /*#__PURE__*/_jsx(View, {
|
|
422
|
+
style: styles.gridRow,
|
|
423
|
+
children: cells.slice(row * 7, row * 7 + 7).map(cell => {
|
|
424
|
+
const disabled = isDisabled(cell.date);
|
|
425
|
+
const isStart = pendingStart ? isSameDay(cell.date, pendingStart) : false;
|
|
426
|
+
const isEnd = pendingEnd ? isSameDay(cell.date, pendingEnd) : false;
|
|
427
|
+
const inRange = isInRangeInclusive(cell.date);
|
|
428
|
+
const isMidRange = inRange && !isStart && !isEnd;
|
|
429
|
+
const todayCell = isSameDay(cell.date, today);
|
|
430
|
+
const edgeColor = theme.colors.primary;
|
|
431
|
+
const midColor = theme.colors.primaryMuted;
|
|
432
|
+
const textColor = isStart || isEnd ? theme.colors.text.inverse : !cell.inMonth ? theme.colors.text.tertiary : disabled ? theme.colors.text.disabled : theme.colors.text.primary;
|
|
433
|
+
const opacity = disabled ? 0.3 : !cell.inMonth ? 0.4 : 1;
|
|
434
|
+
|
|
435
|
+
// For middle days connect via a full-width bar background on the cell;
|
|
436
|
+
// edges connect on one side (right for start, left for end).
|
|
437
|
+
const showLeftBar = inRange && !!pendingStart && !!pendingEnd && (isEnd || isMidRange);
|
|
438
|
+
const showRightBar = inRange && !!pendingStart && !!pendingEnd && (isStart || isMidRange);
|
|
439
|
+
const a11ySuffix = isStart ? ', start of range' : isEnd ? ', end of range' : isMidRange ? ', in selected range' : '';
|
|
440
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
441
|
+
disabled: disabled,
|
|
442
|
+
onPress: () => pressDay(cell),
|
|
443
|
+
accessibilityRole: "button",
|
|
444
|
+
accessibilityLabel: `${formatLongDate(cell.date, locale)}${a11ySuffix}`,
|
|
445
|
+
accessibilityState: {
|
|
446
|
+
selected: isStart || isEnd,
|
|
447
|
+
disabled,
|
|
448
|
+
busy: isMidRange
|
|
449
|
+
},
|
|
450
|
+
style: styles.dayCell,
|
|
451
|
+
children: [showLeftBar ? /*#__PURE__*/_jsx(View, {
|
|
452
|
+
style: [styles.barLeft, {
|
|
453
|
+
backgroundColor: midColor
|
|
454
|
+
}],
|
|
455
|
+
pointerEvents: "none"
|
|
456
|
+
}) : null, showRightBar ? /*#__PURE__*/_jsx(View, {
|
|
457
|
+
style: [styles.barRight, {
|
|
458
|
+
backgroundColor: midColor
|
|
459
|
+
}],
|
|
460
|
+
pointerEvents: "none"
|
|
461
|
+
}) : null, /*#__PURE__*/_jsx(View, {
|
|
462
|
+
style: [styles.dayInner, {
|
|
463
|
+
backgroundColor: isStart || isEnd ? edgeColor : isMidRange ? midColor : 'transparent',
|
|
464
|
+
borderColor: todayCell && !(isStart || isEnd) ? edgeColor : 'transparent',
|
|
465
|
+
borderWidth: todayCell && !(isStart || isEnd) ? 1.5 : 0,
|
|
466
|
+
borderRadius: isMidRange ? theme.radius.none : theme.radius.full,
|
|
467
|
+
opacity
|
|
468
|
+
}],
|
|
469
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
470
|
+
style: [styles.dayText, {
|
|
471
|
+
color: textColor
|
|
472
|
+
}],
|
|
473
|
+
children: cell.date.getDate()
|
|
474
|
+
})
|
|
475
|
+
})]
|
|
476
|
+
}, cell.iso);
|
|
477
|
+
})
|
|
478
|
+
}, `r-${row}`))
|
|
479
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
480
|
+
style: styles.footer,
|
|
481
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
482
|
+
onPress: handleCancel,
|
|
483
|
+
style: ({
|
|
484
|
+
pressed
|
|
485
|
+
}) => [styles.footerBtn, styles.footerCancel, pressed && styles.footerBtnPressed, footerButtonStyle],
|
|
486
|
+
accessibilityRole: "button",
|
|
487
|
+
accessibilityLabel: cancelLabel,
|
|
488
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
489
|
+
style: [styles.footerBtnText, {
|
|
490
|
+
color: theme.colors.text.secondary
|
|
491
|
+
}],
|
|
492
|
+
children: cancelLabel
|
|
493
|
+
})
|
|
494
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
495
|
+
onPress: handleConfirm,
|
|
496
|
+
disabled: confirmDisabled,
|
|
497
|
+
style: ({
|
|
498
|
+
pressed
|
|
499
|
+
}) => [styles.footerBtn, styles.footerConfirm, {
|
|
500
|
+
backgroundColor: theme.colors.primary,
|
|
501
|
+
opacity: confirmDisabled ? 0.5 : 1
|
|
502
|
+
}, pressed && {
|
|
503
|
+
backgroundColor: theme.colors.primaryHover
|
|
504
|
+
}, footerButtonStyle],
|
|
505
|
+
accessibilityRole: "button",
|
|
506
|
+
accessibilityLabel: confirmLabel,
|
|
507
|
+
accessibilityState: {
|
|
508
|
+
disabled: confirmDisabled
|
|
509
|
+
},
|
|
510
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
511
|
+
style: [styles.footerBtnText, {
|
|
512
|
+
color: theme.colors.text.inverse
|
|
513
|
+
}],
|
|
514
|
+
children: confirmLabel
|
|
515
|
+
})
|
|
516
|
+
})]
|
|
517
|
+
})]
|
|
518
|
+
});
|
|
519
|
+
const triggerValueText = useMemo(() => {
|
|
520
|
+
if (!value.start || !value.end) {
|
|
521
|
+
return '';
|
|
522
|
+
}
|
|
523
|
+
const range = {
|
|
524
|
+
start: value.start,
|
|
525
|
+
end: value.end
|
|
526
|
+
};
|
|
527
|
+
if (formatValue) {
|
|
528
|
+
return formatValue(range);
|
|
529
|
+
}
|
|
530
|
+
return `${range.start.toLocaleDateString()} – ${range.end.toLocaleDateString()}`;
|
|
531
|
+
}, [value.start, value.end, formatValue]);
|
|
532
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
533
|
+
children: [!isControlled ? /*#__PURE__*/_jsx(PickerTrigger, {
|
|
534
|
+
label: label,
|
|
535
|
+
placeholder: placeholder,
|
|
536
|
+
helperText: helperText,
|
|
537
|
+
error: error,
|
|
538
|
+
required: required,
|
|
539
|
+
disabled: disabled,
|
|
540
|
+
size: size,
|
|
541
|
+
variant: variant,
|
|
542
|
+
clearable: clearable,
|
|
543
|
+
onClear: onClear,
|
|
544
|
+
value: triggerValueText,
|
|
545
|
+
onPress: () => setInternalOpen(true),
|
|
546
|
+
triggerStyle: triggerStyle,
|
|
547
|
+
testID: testID
|
|
548
|
+
}) : null, /*#__PURE__*/_jsx(Modal, {
|
|
549
|
+
visible: open,
|
|
550
|
+
transparent: true,
|
|
551
|
+
statusBarTranslucent: true,
|
|
552
|
+
navigationBarTranslucent: true,
|
|
553
|
+
animationType: "none",
|
|
554
|
+
onRequestClose: handleClose,
|
|
555
|
+
children: /*#__PURE__*/_jsxs(View
|
|
556
|
+
// Backdrop wraps the sheet — see Modal.tsx for the Fabric reason.
|
|
557
|
+
, {
|
|
558
|
+
collapsable: false,
|
|
559
|
+
style: [styles.backdrop, {
|
|
560
|
+
backgroundColor: theme.colors.background.overlay
|
|
561
|
+
}],
|
|
562
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
563
|
+
style: StyleSheet.absoluteFill,
|
|
564
|
+
onPress: handleClose,
|
|
565
|
+
accessibilityLabel: "Dismiss"
|
|
566
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
567
|
+
style: [styles.sheetWrap, {
|
|
568
|
+
paddingBottom: insets.bottom + theme.spacing.lg,
|
|
569
|
+
opacity: sheet,
|
|
570
|
+
transform: [{
|
|
571
|
+
translateY: sheetTranslate
|
|
572
|
+
}]
|
|
573
|
+
}],
|
|
574
|
+
accessibilityViewIsModal: true,
|
|
575
|
+
accessibilityRole: "none",
|
|
576
|
+
children: calendar
|
|
577
|
+
})]
|
|
578
|
+
})
|
|
579
|
+
})]
|
|
580
|
+
});
|
|
581
|
+
});
|
|
582
|
+
DateRangePicker.displayName = 'DateRangePicker';
|
|
583
|
+
const buildStyles = theme => {
|
|
584
|
+
const cardShadow = theme.shadows.lg;
|
|
585
|
+
return StyleSheet.create({
|
|
586
|
+
backdrop: {
|
|
587
|
+
...StyleSheet.absoluteFill
|
|
588
|
+
},
|
|
589
|
+
sheetWrap: {
|
|
590
|
+
position: 'absolute',
|
|
591
|
+
left: 0,
|
|
592
|
+
right: 0,
|
|
593
|
+
bottom: 0,
|
|
594
|
+
paddingHorizontal: theme.spacing.md,
|
|
595
|
+
paddingBottom: theme.spacing.lg
|
|
596
|
+
},
|
|
597
|
+
card: {
|
|
598
|
+
backgroundColor: theme.colors.background.elevated,
|
|
599
|
+
borderRadius: theme.radius.xl,
|
|
600
|
+
padding: theme.spacing.lg,
|
|
601
|
+
shadowColor: cardShadow.shadowColor,
|
|
602
|
+
shadowOffset: cardShadow.shadowOffset,
|
|
603
|
+
shadowOpacity: cardShadow.shadowOpacity,
|
|
604
|
+
shadowRadius: cardShadow.shadowRadius,
|
|
605
|
+
elevation: cardShadow.elevation
|
|
606
|
+
},
|
|
607
|
+
titleRow: {
|
|
608
|
+
marginBottom: theme.spacing.sm
|
|
609
|
+
},
|
|
610
|
+
title: {
|
|
611
|
+
fontSize: theme.typography.fontSize.lg,
|
|
612
|
+
fontWeight: theme.typography.fontWeight.semibold,
|
|
613
|
+
color: theme.colors.text.primary
|
|
614
|
+
},
|
|
615
|
+
subtitle: {
|
|
616
|
+
marginTop: theme.spacing.xxs,
|
|
617
|
+
fontSize: theme.typography.fontSize.sm,
|
|
618
|
+
color: theme.colors.text.secondary
|
|
619
|
+
},
|
|
620
|
+
headerRow: {
|
|
621
|
+
flexDirection: 'row',
|
|
622
|
+
alignItems: 'center',
|
|
623
|
+
justifyContent: 'space-between',
|
|
624
|
+
marginBottom: theme.spacing.md
|
|
625
|
+
},
|
|
626
|
+
navBtn: {
|
|
627
|
+
width: theme.components.dateRangePicker?.navButtonSize ?? 36,
|
|
628
|
+
height: theme.components.dateRangePicker?.navButtonSize ?? 36,
|
|
629
|
+
borderRadius: theme.radius.full,
|
|
630
|
+
alignItems: 'center',
|
|
631
|
+
justifyContent: 'center',
|
|
632
|
+
backgroundColor: theme.colors.background.secondary
|
|
633
|
+
},
|
|
634
|
+
navBtnPressed: {
|
|
635
|
+
backgroundColor: theme.colors.surface.pressed
|
|
636
|
+
},
|
|
637
|
+
navText: {
|
|
638
|
+
fontSize: theme.components.dateRangePicker?.navTextFontSize ?? 22,
|
|
639
|
+
lineHeight: theme.components.dateRangePicker?.navTextLineHeight ?? 24,
|
|
640
|
+
color: theme.colors.text.primary,
|
|
641
|
+
fontWeight: theme.typography.fontWeight.semibold
|
|
642
|
+
},
|
|
643
|
+
headerLabelWrap: {
|
|
644
|
+
flex: 1,
|
|
645
|
+
alignItems: 'center'
|
|
646
|
+
},
|
|
647
|
+
headerLabel: {
|
|
648
|
+
fontSize: theme.typography.fontSize.base,
|
|
649
|
+
fontWeight: theme.typography.fontWeight.semibold,
|
|
650
|
+
color: theme.colors.text.primary
|
|
651
|
+
},
|
|
652
|
+
weekdayRow: {
|
|
653
|
+
flexDirection: 'row',
|
|
654
|
+
marginBottom: theme.spacing.xs
|
|
655
|
+
},
|
|
656
|
+
weekdayCell: {
|
|
657
|
+
flex: 1,
|
|
658
|
+
alignItems: 'center',
|
|
659
|
+
paddingVertical: theme.spacing.xs
|
|
660
|
+
},
|
|
661
|
+
weekdayText: {
|
|
662
|
+
fontSize: theme.typography.fontSize.xs,
|
|
663
|
+
fontWeight: theme.typography.fontWeight.medium,
|
|
664
|
+
color: theme.colors.text.tertiary,
|
|
665
|
+
letterSpacing: theme.typography.letterSpacing.wide
|
|
666
|
+
},
|
|
667
|
+
grid: {
|
|
668
|
+
// Animated wrapper.
|
|
669
|
+
},
|
|
670
|
+
gridRow: {
|
|
671
|
+
flexDirection: 'row'
|
|
672
|
+
},
|
|
673
|
+
dayCell: {
|
|
674
|
+
flex: 1,
|
|
675
|
+
aspectRatio: 1,
|
|
676
|
+
alignItems: 'center',
|
|
677
|
+
justifyContent: 'center',
|
|
678
|
+
// No horizontal padding so the connector bars on adjacent cells meet
|
|
679
|
+
// without a gap. Vertical breathing room comes from dayInner's height.
|
|
680
|
+
padding: 0,
|
|
681
|
+
position: 'relative'
|
|
682
|
+
},
|
|
683
|
+
// Bars sit BEHIND dayInner and bridge the start/end circles to mid-range
|
|
684
|
+
// cells. Their height mirrors dayInner (~90% of cell height) so the visual
|
|
685
|
+
// pill is one continuous shape across multiple cells.
|
|
686
|
+
barLeft: {
|
|
687
|
+
position: 'absolute',
|
|
688
|
+
left: 0,
|
|
689
|
+
right: '50%',
|
|
690
|
+
top: '5%',
|
|
691
|
+
bottom: '5%'
|
|
692
|
+
},
|
|
693
|
+
barRight: {
|
|
694
|
+
position: 'absolute',
|
|
695
|
+
left: '50%',
|
|
696
|
+
right: 0,
|
|
697
|
+
top: '5%',
|
|
698
|
+
bottom: '5%'
|
|
699
|
+
},
|
|
700
|
+
dayInner: {
|
|
701
|
+
width: '90%',
|
|
702
|
+
height: '90%',
|
|
703
|
+
alignItems: 'center',
|
|
704
|
+
justifyContent: 'center'
|
|
705
|
+
},
|
|
706
|
+
dayText: {
|
|
707
|
+
fontSize: theme.typography.fontSize.sm,
|
|
708
|
+
fontWeight: theme.typography.fontWeight.medium
|
|
709
|
+
},
|
|
710
|
+
footer: {
|
|
711
|
+
flexDirection: 'row',
|
|
712
|
+
justifyContent: 'flex-end',
|
|
713
|
+
alignItems: 'center',
|
|
714
|
+
marginTop: theme.spacing.lg,
|
|
715
|
+
gap: theme.spacing.sm
|
|
716
|
+
},
|
|
717
|
+
footerBtn: {
|
|
718
|
+
paddingHorizontal: theme.spacing.lg,
|
|
719
|
+
paddingVertical: theme.spacing.sm,
|
|
720
|
+
borderRadius: theme.radius.md,
|
|
721
|
+
minHeight: theme.components.dateRangePicker?.footerButtonMinHeight ?? 40,
|
|
722
|
+
alignItems: 'center',
|
|
723
|
+
justifyContent: 'center'
|
|
724
|
+
},
|
|
725
|
+
footerCancel: {
|
|
726
|
+
backgroundColor: 'transparent'
|
|
727
|
+
},
|
|
728
|
+
footerConfirm: {
|
|
729
|
+
// backgroundColor set inline.
|
|
730
|
+
},
|
|
731
|
+
footerBtnPressed: {
|
|
732
|
+
opacity: 0.85
|
|
733
|
+
},
|
|
734
|
+
footerBtnText: {
|
|
735
|
+
fontSize: theme.typography.fontSize.sm,
|
|
736
|
+
fontWeight: theme.typography.fontWeight.semibold
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
};
|
|
740
|
+
export { DateRangePicker };
|
|
741
|
+
export default DateRangePicker;
|
|
742
|
+
//# sourceMappingURL=DateRangePicker.js.map
|