@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,405 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Animated, Dimensions, Easing, Modal, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { createAnimatedValue, useTheme } from "../../theme/index.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
+
const DEFAULT_TOOLTIP_GAP = 8;
|
|
8
|
+
const DEFAULT_SCREEN_PADDING = 8;
|
|
9
|
+
const DEFAULT_PRESS_AUTO_HIDE_MS = 4000;
|
|
10
|
+
const DEFAULT_ARROW_HALF_WIDTH = 4; // half of 8px arrow base
|
|
11
|
+
const DEFAULT_ARROW_HEIGHT = 6;
|
|
12
|
+
const DEFAULT_ARROW_CORNER_PADDING = 12;
|
|
13
|
+
const DEFAULT_MAX_WIDTH = 240;
|
|
14
|
+
const DEFAULT_LINE_HEIGHT = 18;
|
|
15
|
+
const Tooltip = props => {
|
|
16
|
+
const {
|
|
17
|
+
content,
|
|
18
|
+
children,
|
|
19
|
+
placement = 'auto',
|
|
20
|
+
trigger = 'longPress',
|
|
21
|
+
visible: controlledVisible,
|
|
22
|
+
onVisibleChange,
|
|
23
|
+
hideOnContentPress = true,
|
|
24
|
+
maxWidth,
|
|
25
|
+
showArrow = true,
|
|
26
|
+
accessibilityLabel,
|
|
27
|
+
style,
|
|
28
|
+
containerStyle,
|
|
29
|
+
arrowStyle: arrowStyleOverride,
|
|
30
|
+
messageStyle,
|
|
31
|
+
testID
|
|
32
|
+
} = props;
|
|
33
|
+
const theme = useTheme();
|
|
34
|
+
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
35
|
+
const tooltipTokens = theme.components.tooltip;
|
|
36
|
+
const TOOLTIP_GAP = tooltipTokens?.gap ?? DEFAULT_TOOLTIP_GAP;
|
|
37
|
+
const SCREEN_PADDING = tooltipTokens?.screenPadding ?? DEFAULT_SCREEN_PADDING;
|
|
38
|
+
const PRESS_AUTO_HIDE_MS = tooltipTokens?.pressAutoHideMs ?? DEFAULT_PRESS_AUTO_HIDE_MS;
|
|
39
|
+
const ARROW_HALF_WIDTH = tooltipTokens?.arrowHalfWidth ?? DEFAULT_ARROW_HALF_WIDTH;
|
|
40
|
+
const ARROW_HEIGHT = tooltipTokens?.arrowHeight ?? DEFAULT_ARROW_HEIGHT;
|
|
41
|
+
const ARROW_CORNER_PADDING = tooltipTokens?.arrowCornerPadding ?? DEFAULT_ARROW_CORNER_PADDING;
|
|
42
|
+
const MESSAGE_LINE_HEIGHT = tooltipTokens?.lineHeight ?? DEFAULT_LINE_HEIGHT;
|
|
43
|
+
const resolvedMaxWidth = maxWidth ?? tooltipTokens?.maxWidth ?? DEFAULT_MAX_WIDTH;
|
|
44
|
+
const enableScaleAnimation = tooltipTokens?.enableScaleAnimation ?? false;
|
|
45
|
+
const exitDurationMs = tooltipTokens?.exitDurationMs ?? 150;
|
|
46
|
+
const isControlled = trigger === 'manual' || typeof controlledVisible === 'boolean';
|
|
47
|
+
const [internalVisible, setInternalVisible] = useState(false);
|
|
48
|
+
const visible = isControlled ? Boolean(controlledVisible) : internalVisible;
|
|
49
|
+
const [anchor, setAnchor] = useState(null);
|
|
50
|
+
const [size, setSize] = useState({
|
|
51
|
+
width: 0,
|
|
52
|
+
height: 0
|
|
53
|
+
});
|
|
54
|
+
const wrapperRef = useRef(null);
|
|
55
|
+
const scale = useRef(createAnimatedValue(visible ? 1 : enableScaleAnimation ? 0.85 : 1)).current;
|
|
56
|
+
const opacity = useRef(createAnimatedValue(visible ? 1 : 0)).current;
|
|
57
|
+
const autoHideTimer = useRef(null);
|
|
58
|
+
const didMount = useRef(false);
|
|
59
|
+
const setVisible = useCallback(next => {
|
|
60
|
+
if (!isControlled) {
|
|
61
|
+
setInternalVisible(next);
|
|
62
|
+
}
|
|
63
|
+
onVisibleChange?.(next);
|
|
64
|
+
}, [isControlled, onVisibleChange]);
|
|
65
|
+
const measureAnchor = useCallback(() => {
|
|
66
|
+
if (!wrapperRef.current) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
wrapperRef.current.measureInWindow((x, y, width, height) => {
|
|
70
|
+
setAnchor({
|
|
71
|
+
x,
|
|
72
|
+
y,
|
|
73
|
+
width,
|
|
74
|
+
height
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}, []);
|
|
78
|
+
const handleTrigger = useCallback(_event => {
|
|
79
|
+
measureAnchor();
|
|
80
|
+
setVisible(true);
|
|
81
|
+
}, [measureAnchor, setVisible]);
|
|
82
|
+
const handleHide = useCallback(() => {
|
|
83
|
+
setVisible(false);
|
|
84
|
+
}, [setVisible]);
|
|
85
|
+
|
|
86
|
+
// Animations + auto-hide
|
|
87
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: entry/exit is driven by `visible` alone; `handleHide`/`measureAnchor` are re-created per render and declaring them would re-run the mount branch and re-arm the auto-hide timer continuously
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
// On first mount, skip the entry animation if we're already visible
|
|
90
|
+
// (avoids native-driver bootstrap issues during render).
|
|
91
|
+
if (!didMount.current) {
|
|
92
|
+
didMount.current = true;
|
|
93
|
+
if (visible) {
|
|
94
|
+
measureAnchor();
|
|
95
|
+
if (trigger === 'press') {
|
|
96
|
+
if (autoHideTimer.current) {
|
|
97
|
+
clearTimeout(autoHideTimer.current);
|
|
98
|
+
}
|
|
99
|
+
autoHideTimer.current = setTimeout(() => {
|
|
100
|
+
handleHide();
|
|
101
|
+
}, PRESS_AUTO_HIDE_MS);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return () => {
|
|
105
|
+
if (autoHideTimer.current) {
|
|
106
|
+
clearTimeout(autoHideTimer.current);
|
|
107
|
+
autoHideTimer.current = null;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
let anim;
|
|
112
|
+
if (visible) {
|
|
113
|
+
measureAnchor();
|
|
114
|
+
const enterAnims = [Animated.timing(opacity, {
|
|
115
|
+
toValue: 1,
|
|
116
|
+
duration: theme.motion.duration.fast,
|
|
117
|
+
useNativeDriver: true
|
|
118
|
+
})];
|
|
119
|
+
if (enableScaleAnimation) {
|
|
120
|
+
enterAnims.push(Animated.spring(scale, {
|
|
121
|
+
toValue: 1,
|
|
122
|
+
damping: theme.motion.spring.snappy.damping,
|
|
123
|
+
stiffness: theme.motion.spring.snappy.stiffness,
|
|
124
|
+
mass: theme.motion.spring.snappy.mass,
|
|
125
|
+
useNativeDriver: true
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
anim = Animated.parallel(enterAnims);
|
|
129
|
+
anim.start();
|
|
130
|
+
if (trigger === 'press') {
|
|
131
|
+
if (autoHideTimer.current) {
|
|
132
|
+
clearTimeout(autoHideTimer.current);
|
|
133
|
+
}
|
|
134
|
+
autoHideTimer.current = setTimeout(() => {
|
|
135
|
+
handleHide();
|
|
136
|
+
}, PRESS_AUTO_HIDE_MS);
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
const exitAnims = [Animated.timing(opacity, {
|
|
140
|
+
toValue: 0,
|
|
141
|
+
duration: exitDurationMs,
|
|
142
|
+
easing: Easing.bezier(...theme.motion.easing.accelerate),
|
|
143
|
+
useNativeDriver: true
|
|
144
|
+
})];
|
|
145
|
+
if (enableScaleAnimation) {
|
|
146
|
+
exitAnims.push(Animated.timing(scale, {
|
|
147
|
+
toValue: 0.85,
|
|
148
|
+
duration: exitDurationMs,
|
|
149
|
+
easing: Easing.bezier(...theme.motion.easing.accelerate),
|
|
150
|
+
useNativeDriver: true
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
anim = Animated.parallel(exitAnims);
|
|
154
|
+
anim.start();
|
|
155
|
+
if (autoHideTimer.current) {
|
|
156
|
+
clearTimeout(autoHideTimer.current);
|
|
157
|
+
autoHideTimer.current = null;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return () => {
|
|
161
|
+
anim?.stop();
|
|
162
|
+
if (autoHideTimer.current) {
|
|
163
|
+
clearTimeout(autoHideTimer.current);
|
|
164
|
+
autoHideTimer.current = null;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}, [visible]);
|
|
168
|
+
const handleContentLayout = e => {
|
|
169
|
+
const {
|
|
170
|
+
width,
|
|
171
|
+
height
|
|
172
|
+
} = e.nativeEvent.layout;
|
|
173
|
+
if (width !== size.width || height !== size.height) {
|
|
174
|
+
setSize({
|
|
175
|
+
width,
|
|
176
|
+
height
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const position = useMemo(() => {
|
|
181
|
+
const screen = Dimensions.get('window');
|
|
182
|
+
if (!anchor) {
|
|
183
|
+
// Fallback before measurement: render off-screen-ish at top-left, will reposition on layout.
|
|
184
|
+
return {
|
|
185
|
+
top: SCREEN_PADDING,
|
|
186
|
+
left: SCREEN_PADDING,
|
|
187
|
+
placement: 'bottom',
|
|
188
|
+
arrowOffset: 0
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const tooltipWidth = size.width || Math.min(resolvedMaxWidth, screen.width - SCREEN_PADDING * 2);
|
|
192
|
+
const tooltipHeight = size.height || 0;
|
|
193
|
+
|
|
194
|
+
// Choose placement.
|
|
195
|
+
let resolved;
|
|
196
|
+
if (placement === 'auto') {
|
|
197
|
+
const space = {
|
|
198
|
+
top: anchor.y,
|
|
199
|
+
bottom: screen.height - (anchor.y + anchor.height),
|
|
200
|
+
left: anchor.x,
|
|
201
|
+
right: screen.width - (anchor.x + anchor.width)
|
|
202
|
+
};
|
|
203
|
+
const max = Math.max(space.top, space.bottom, space.left, space.right);
|
|
204
|
+
if (max === space.bottom) {
|
|
205
|
+
resolved = 'bottom';
|
|
206
|
+
} else if (max === space.top) {
|
|
207
|
+
resolved = 'top';
|
|
208
|
+
} else if (max === space.right) {
|
|
209
|
+
resolved = 'right';
|
|
210
|
+
} else {
|
|
211
|
+
resolved = 'left';
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
resolved = placement;
|
|
215
|
+
}
|
|
216
|
+
let top = 0;
|
|
217
|
+
let left = 0;
|
|
218
|
+
if (resolved === 'top') {
|
|
219
|
+
top = anchor.y - tooltipHeight - TOOLTIP_GAP;
|
|
220
|
+
left = anchor.x + anchor.width / 2 - tooltipWidth / 2;
|
|
221
|
+
} else if (resolved === 'bottom') {
|
|
222
|
+
top = anchor.y + anchor.height + TOOLTIP_GAP;
|
|
223
|
+
left = anchor.x + anchor.width / 2 - tooltipWidth / 2;
|
|
224
|
+
} else if (resolved === 'left') {
|
|
225
|
+
top = anchor.y + anchor.height / 2 - tooltipHeight / 2;
|
|
226
|
+
left = anchor.x - tooltipWidth - TOOLTIP_GAP;
|
|
227
|
+
} else {
|
|
228
|
+
top = anchor.y + anchor.height / 2 - tooltipHeight / 2;
|
|
229
|
+
left = anchor.x + anchor.width + TOOLTIP_GAP;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Clamp to screen.
|
|
233
|
+
left = Math.max(SCREEN_PADDING, Math.min(left, screen.width - tooltipWidth - SCREEN_PADDING));
|
|
234
|
+
top = Math.max(SCREEN_PADDING, Math.min(top, screen.height - tooltipHeight - SCREEN_PADDING));
|
|
235
|
+
|
|
236
|
+
// Compute arrow offset along the card's trigger-facing edge so the caret stays
|
|
237
|
+
// pointing at the trigger even after the card is clamped to the viewport.
|
|
238
|
+
let arrowOffset = 0;
|
|
239
|
+
if (resolved === 'top' || resolved === 'bottom') {
|
|
240
|
+
const triggerCenterX = anchor.x + anchor.width / 2;
|
|
241
|
+
const desired = triggerCenterX - left; // x-offset from card's left edge
|
|
242
|
+
const min = ARROW_CORNER_PADDING;
|
|
243
|
+
const max = Math.max(min, tooltipWidth - ARROW_CORNER_PADDING);
|
|
244
|
+
arrowOffset = Math.max(min, Math.min(desired, max));
|
|
245
|
+
} else {
|
|
246
|
+
const triggerCenterY = anchor.y + anchor.height / 2;
|
|
247
|
+
const desired = triggerCenterY - top;
|
|
248
|
+
const min = ARROW_CORNER_PADDING;
|
|
249
|
+
const max = Math.max(min, tooltipHeight - ARROW_CORNER_PADDING);
|
|
250
|
+
arrowOffset = Math.max(min, Math.min(desired, max));
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
top,
|
|
254
|
+
left,
|
|
255
|
+
placement: resolved,
|
|
256
|
+
arrowOffset
|
|
257
|
+
};
|
|
258
|
+
}, [anchor, size, placement, resolvedMaxWidth, SCREEN_PADDING, TOOLTIP_GAP, ARROW_CORNER_PADDING]);
|
|
259
|
+
|
|
260
|
+
// Build the cloned trigger.
|
|
261
|
+
const triggerProps = {};
|
|
262
|
+
if (trigger === 'longPress') {
|
|
263
|
+
triggerProps.onLongPress = handleTrigger;
|
|
264
|
+
triggerProps.accessibilityHint = 'Long press for more info';
|
|
265
|
+
} else if (trigger === 'press') {
|
|
266
|
+
const childOnPress = children.props.onPress;
|
|
267
|
+
triggerProps.onPress = e => {
|
|
268
|
+
childOnPress?.(e);
|
|
269
|
+
handleTrigger(e);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
const clonedChild = /*#__PURE__*/React.cloneElement(children, triggerProps);
|
|
273
|
+
const a11yLabel = accessibilityLabel ?? (typeof content === 'string' ? content : 'Tooltip');
|
|
274
|
+
|
|
275
|
+
// Arrow style: a CSS-triangle implemented via 0-width view with transparent
|
|
276
|
+
// borders. We rotate the base (placement='top' = arrow on bottom-edge pointing
|
|
277
|
+
// down) into the four cardinal orientations.
|
|
278
|
+
const arrowStyle = useMemo(() => {
|
|
279
|
+
if (!showArrow) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
const arrowColor = theme.colors.background.inverse;
|
|
283
|
+
const base = {
|
|
284
|
+
position: 'absolute',
|
|
285
|
+
width: 0,
|
|
286
|
+
height: 0,
|
|
287
|
+
backgroundColor: 'transparent',
|
|
288
|
+
borderStyle: 'solid',
|
|
289
|
+
borderLeftWidth: ARROW_HALF_WIDTH,
|
|
290
|
+
borderRightWidth: ARROW_HALF_WIDTH,
|
|
291
|
+
borderBottomWidth: ARROW_HEIGHT,
|
|
292
|
+
borderTopWidth: 0,
|
|
293
|
+
borderLeftColor: 'transparent',
|
|
294
|
+
borderRightColor: 'transparent',
|
|
295
|
+
borderTopColor: 'transparent',
|
|
296
|
+
borderBottomColor: arrowColor
|
|
297
|
+
};
|
|
298
|
+
if (position.placement === 'top') {
|
|
299
|
+
// Card is above trigger; arrow on bottom edge, pointing down.
|
|
300
|
+
return {
|
|
301
|
+
...base,
|
|
302
|
+
bottom: -ARROW_HEIGHT,
|
|
303
|
+
left: position.arrowOffset - ARROW_HALF_WIDTH,
|
|
304
|
+
transform: [{
|
|
305
|
+
rotate: '180deg'
|
|
306
|
+
}]
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
if (position.placement === 'bottom') {
|
|
310
|
+
// Card below trigger; arrow on top edge, pointing up.
|
|
311
|
+
return {
|
|
312
|
+
...base,
|
|
313
|
+
top: -ARROW_HEIGHT,
|
|
314
|
+
left: position.arrowOffset - ARROW_HALF_WIDTH
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
if (position.placement === 'left') {
|
|
318
|
+
// Card left of trigger; arrow on right edge, pointing right.
|
|
319
|
+
return {
|
|
320
|
+
...base,
|
|
321
|
+
right: -ARROW_HEIGHT,
|
|
322
|
+
top: position.arrowOffset - ARROW_HALF_WIDTH,
|
|
323
|
+
transform: [{
|
|
324
|
+
rotate: '90deg'
|
|
325
|
+
}]
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
// 'right': card right of trigger; arrow on left edge, pointing left.
|
|
329
|
+
return {
|
|
330
|
+
...base,
|
|
331
|
+
left: -ARROW_HEIGHT,
|
|
332
|
+
top: position.arrowOffset - ARROW_HALF_WIDTH,
|
|
333
|
+
transform: [{
|
|
334
|
+
rotate: '-90deg'
|
|
335
|
+
}]
|
|
336
|
+
};
|
|
337
|
+
}, [showArrow, position, theme, ARROW_HALF_WIDTH, ARROW_HEIGHT]);
|
|
338
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
339
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
340
|
+
ref: wrapperRef,
|
|
341
|
+
collapsable: false,
|
|
342
|
+
onLayout: measureAnchor,
|
|
343
|
+
testID: testID,
|
|
344
|
+
children: clonedChild
|
|
345
|
+
}), /*#__PURE__*/_jsx(Modal, {
|
|
346
|
+
visible: visible,
|
|
347
|
+
transparent: true,
|
|
348
|
+
statusBarTranslucent: true,
|
|
349
|
+
presentationStyle: "overFullScreen",
|
|
350
|
+
animationType: "none",
|
|
351
|
+
onRequestClose: handleHide,
|
|
352
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
353
|
+
style: StyleSheet.absoluteFill,
|
|
354
|
+
onPress: hideOnContentPress ? handleHide : undefined,
|
|
355
|
+
accessibilityLabel: "Close tooltip",
|
|
356
|
+
accessibilityRole: "button",
|
|
357
|
+
children: visible ? /*#__PURE__*/_jsxs(Animated.View, {
|
|
358
|
+
accessibilityRole: 'tooltip',
|
|
359
|
+
accessibilityLiveRegion: "polite",
|
|
360
|
+
accessibilityLabel: a11yLabel,
|
|
361
|
+
onLayout: handleContentLayout,
|
|
362
|
+
style: [{
|
|
363
|
+
position: 'absolute',
|
|
364
|
+
top: position.top,
|
|
365
|
+
left: position.left,
|
|
366
|
+
maxWidth: resolvedMaxWidth,
|
|
367
|
+
opacity,
|
|
368
|
+
transform: [{
|
|
369
|
+
scale
|
|
370
|
+
}]
|
|
371
|
+
}, style, containerStyle],
|
|
372
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
373
|
+
style: [styles.tooltip, {
|
|
374
|
+
backgroundColor: theme.colors.background.inverse,
|
|
375
|
+
borderRadius: theme.radius.md,
|
|
376
|
+
paddingHorizontal: theme.spacing.md,
|
|
377
|
+
paddingVertical: theme.spacing.sm,
|
|
378
|
+
...theme.shadows.lg,
|
|
379
|
+
shadowColor: theme.shadows.lg.shadowColor
|
|
380
|
+
}],
|
|
381
|
+
children: typeof content === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
382
|
+
style: [{
|
|
383
|
+
color: theme.colors.text.inverse,
|
|
384
|
+
fontSize: theme.typography.fontSize.sm,
|
|
385
|
+
lineHeight: MESSAGE_LINE_HEIGHT
|
|
386
|
+
}, messageStyle],
|
|
387
|
+
children: content
|
|
388
|
+
}) : content
|
|
389
|
+
}), arrowStyle ? /*#__PURE__*/_jsx(View, {
|
|
390
|
+
style: [arrowStyle, arrowStyleOverride],
|
|
391
|
+
pointerEvents: "none"
|
|
392
|
+
}) : null]
|
|
393
|
+
}) : null
|
|
394
|
+
})
|
|
395
|
+
})]
|
|
396
|
+
});
|
|
397
|
+
};
|
|
398
|
+
const buildStyles = _theme => StyleSheet.create({
|
|
399
|
+
tooltip: {
|
|
400
|
+
overflow: 'hidden'
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
export { Tooltip };
|
|
404
|
+
export default Tooltip;
|
|
405
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Accordion, AccordionGroup } from "./Accordion/index.js";
|
|
4
|
+
export { AnimatePresence } from "./AnimatePresence/index.js";
|
|
5
|
+
export { AppBar } from "./AppBar/index.js";
|
|
6
|
+
export { AsyncBlock } from "./AsyncBlock/index.js";
|
|
7
|
+
export { Autocomplete } from "./Autocomplete/index.js";
|
|
8
|
+
export { Avatar, AvatarGroup } from "./Avatar/index.js";
|
|
9
|
+
export { Badge } from "./Badge/index.js";
|
|
10
|
+
export { Banner } from "./Banner/index.js";
|
|
11
|
+
export { BottomNavigation } from "./BottomNavigation/index.js";
|
|
12
|
+
export { BottomSheet, useBottomSheet } from "./BottomSheet/index.js";
|
|
13
|
+
export { Box, Row, Spacer, Stack } from "./Box/index.js";
|
|
14
|
+
export { Button } from "./Button/index.js";
|
|
15
|
+
export { Card } from "./Card/index.js";
|
|
16
|
+
export { Carousel } from "./Carousel/index.js";
|
|
17
|
+
export { Checkbox } from "./Checkbox/index.js";
|
|
18
|
+
export { Chip } from "./Chip/index.js";
|
|
19
|
+
export { ChoiceGroup } from "./ChoiceGroup/index.js";
|
|
20
|
+
export { Confetti } from "./Confetti/index.js";
|
|
21
|
+
export { DatePicker } from "./DatePicker/index.js";
|
|
22
|
+
export { DateRangePicker } from "./DateRangePicker/index.js";
|
|
23
|
+
export { Descriptions } from "./Descriptions/index.js";
|
|
24
|
+
export { Dialog } from "./Dialog/index.js";
|
|
25
|
+
export { Divider } from "./Divider/index.js";
|
|
26
|
+
export { Drawer } from "./Drawer/index.js";
|
|
27
|
+
export { EmptyState } from "./EmptyState/index.js";
|
|
28
|
+
export { FilePicker, formatFileSize } from "./FilePicker/index.js";
|
|
29
|
+
export { FloatingActionButton, FloatingActionButtonGroup } from "./FloatingActionButton/index.js";
|
|
30
|
+
export { ForceUpdateDialog } from "./ForceUpdateDialog/index.js";
|
|
31
|
+
export { FormField } from "./FormField/index.js";
|
|
32
|
+
export { IconButton } from "./IconButton/index.js";
|
|
33
|
+
export { ImageGallery } from "./ImageGallery/index.js";
|
|
34
|
+
export { InlineSelect } from "./InlineSelect/index.js";
|
|
35
|
+
export { Input } from "./Input/index.js";
|
|
36
|
+
export { KeyboardAwareScrollView } from "./KeyboardAwareScrollView/index.js";
|
|
37
|
+
export { KeyboardToolbar } from "./KeyboardToolbar/index.js";
|
|
38
|
+
export { ListItem } from "./ListItem/index.js";
|
|
39
|
+
export { MODAL_DISMISS_GRACE_MS, Modal } from "./Modal/index.js";
|
|
40
|
+
export { NumberInput } from "./NumberInput/index.js";
|
|
41
|
+
export { OTPInput } from "./OTPInput/index.js";
|
|
42
|
+
export { DEFAULT_CALLING_CODES, formatE164, PhoneNumberInput } from "./PhoneNumberInput/index.js";
|
|
43
|
+
export { PickerTrigger } from "./PickerTrigger/index.js";
|
|
44
|
+
export { ProgressBar } from "./ProgressBar/index.js";
|
|
45
|
+
export { Radio, RadioDot, RadioGroup } from "./Radio/index.js";
|
|
46
|
+
export { Rating } from "./Rating/index.js";
|
|
47
|
+
export { Repeater } from "./Repeater/index.js";
|
|
48
|
+
export { SearchBar } from "./SearchBar/index.js";
|
|
49
|
+
export { SegmentedControl } from "./SegmentedControl/index.js";
|
|
50
|
+
export { Select } from "./Select/index.js";
|
|
51
|
+
export { Skeleton, SkeletonCircle, SkeletonClockProvider, SkeletonContent, SkeletonList, SkeletonProvider, SkeletonSkip, SkeletonText, useReduceMotion, useSkeletonClock, useSkeletonDefaults } from "./Skeleton/index.js";
|
|
52
|
+
export { Slider } from "./Slider/index.js";
|
|
53
|
+
export { SlideToConfirm } from "./SlideToConfirm/index.js";
|
|
54
|
+
export { Spinner } from "./Spinner/index.js";
|
|
55
|
+
export { Stepper } from "./Stepper/index.js";
|
|
56
|
+
export { Swipeable } from "./Swipeable/index.js";
|
|
57
|
+
export { Switch } from "./Switch/index.js";
|
|
58
|
+
export { Tabs } from "./Tabs/index.js";
|
|
59
|
+
export { TagInput } from "./TagInput/index.js";
|
|
60
|
+
export { Text } from "./Text/index.js";
|
|
61
|
+
export { Timeline } from "./Timeline/index.js";
|
|
62
|
+
export { TimePicker } from "./TimePicker/index.js";
|
|
63
|
+
export { Toast, ToastProvider, toast, useToast } from "./Toast/index.js";
|
|
64
|
+
export { Tooltip } from "./Tooltip/index.js";
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { createContext, useContext } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const FormContext = /*#__PURE__*/createContext(null);
|
|
6
|
+
/**
|
|
7
|
+
* Provides a {@link useForm} instance to descendants so `<FormField name>`,
|
|
8
|
+
* {@link useField} and {@link useFieldArray} can bind by name.
|
|
9
|
+
*/
|
|
10
|
+
export const Form = ({
|
|
11
|
+
form,
|
|
12
|
+
children
|
|
13
|
+
}) => /*#__PURE__*/_jsx(FormContext.Provider, {
|
|
14
|
+
value: form,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
Form.displayName = 'Form';
|
|
18
|
+
|
|
19
|
+
/** Read the surrounding form. Throws if there is no `<Form>` ancestor. */
|
|
20
|
+
export function useFormContext() {
|
|
21
|
+
const ctx = useContext(FormContext);
|
|
22
|
+
if (!ctx) {
|
|
23
|
+
throw new Error('useFormContext / useField / <FormField name> must be rendered inside a <Form> from @webority-technologies/mobile-ui.');
|
|
24
|
+
}
|
|
25
|
+
return ctx;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Read the surrounding form, or null when there is no `<Form>` ancestor. */
|
|
29
|
+
export function useOptionalFormContext() {
|
|
30
|
+
return useContext(FormContext);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=FormContext.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { Form, useFormContext, useOptionalFormContext } from "./FormContext.js";
|
|
4
|
+
export { deletePath, getPath, setPath } from "./path.js";
|
|
5
|
+
|
|
6
|
+
// Validation rule presets (the dependency-free Yup replacement):
|
|
7
|
+
// import { rules } from '@webority-technologies/mobile-ui';
|
|
8
|
+
// validate: { email: [rules.required(), rules.email()] }
|
|
9
|
+
// import-then-export instead of `export * as` — consumer apps compile this
|
|
10
|
+
// library from source via Metro, and their babel preset does not transform
|
|
11
|
+
// export-namespace-from syntax outside the app root.
|
|
12
|
+
import * as rules from "./rules.js";
|
|
13
|
+
export { useField, useFieldArray } from "./useField.js";
|
|
14
|
+
export { useForm } from "./useForm.js";
|
|
15
|
+
export { rules };
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Immutable get/set/delete for dot- and bracket-notation field paths
|
|
5
|
+
* ("address.city", "phones[0]", "items[2].qty"). Lets a single flat `name`
|
|
6
|
+
* string address nested values and array items, so the form engine can treat
|
|
7
|
+
* every field uniformly regardless of how deep it lives in the value tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const tokenize = path => {
|
|
11
|
+
const tokens = [];
|
|
12
|
+
const re = /[^.[\]]+/g;
|
|
13
|
+
let m;
|
|
14
|
+
while ((m = re.exec(path)) !== null) {
|
|
15
|
+
const raw = m[0];
|
|
16
|
+
tokens.push(/^\d+$/.test(raw) ? Number(raw) : raw);
|
|
17
|
+
}
|
|
18
|
+
return tokens;
|
|
19
|
+
};
|
|
20
|
+
export const getPath = (obj, path) => {
|
|
21
|
+
const tokens = tokenize(path);
|
|
22
|
+
let cur = obj;
|
|
23
|
+
for (const t of tokens) {
|
|
24
|
+
if (cur == null || typeof cur !== 'object') {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
cur = cur[t];
|
|
28
|
+
}
|
|
29
|
+
return cur;
|
|
30
|
+
};
|
|
31
|
+
export const setPath = (obj, path, value) => {
|
|
32
|
+
const tokens = tokenize(path);
|
|
33
|
+
if (tokens.length === 0) {
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
const root = Array.isArray(obj) ? [...obj] : {
|
|
37
|
+
...obj
|
|
38
|
+
};
|
|
39
|
+
let cur = root;
|
|
40
|
+
for (let i = 0; i < tokens.length - 1; i++) {
|
|
41
|
+
const t = tokens[i];
|
|
42
|
+
const next = tokens[i + 1];
|
|
43
|
+
const child = cur[t];
|
|
44
|
+
// Clone the existing branch so we never mutate the previous value tree;
|
|
45
|
+
// create the right container shape when the branch is missing.
|
|
46
|
+
const cloned = child != null && typeof child === 'object' ? Array.isArray(child) ? [...child] : {
|
|
47
|
+
...child
|
|
48
|
+
} : typeof next === 'number' ? [] : {};
|
|
49
|
+
cur[t] = cloned;
|
|
50
|
+
cur = cloned;
|
|
51
|
+
}
|
|
52
|
+
cur[tokens[tokens.length - 1]] = value;
|
|
53
|
+
return root;
|
|
54
|
+
};
|
|
55
|
+
export const deletePath = (obj, path) => {
|
|
56
|
+
const tokens = tokenize(path);
|
|
57
|
+
if (tokens.length === 0) {
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
const root = Array.isArray(obj) ? [...obj] : {
|
|
61
|
+
...obj
|
|
62
|
+
};
|
|
63
|
+
let cur = root;
|
|
64
|
+
for (let i = 0; i < tokens.length - 1; i++) {
|
|
65
|
+
const t = tokens[i];
|
|
66
|
+
const child = cur[t];
|
|
67
|
+
if (child == null || typeof child !== 'object') {
|
|
68
|
+
return root;
|
|
69
|
+
}
|
|
70
|
+
const cloned = Array.isArray(child) ? [...child] : {
|
|
71
|
+
...child
|
|
72
|
+
};
|
|
73
|
+
cur[t] = cloned;
|
|
74
|
+
cur = cloned;
|
|
75
|
+
}
|
|
76
|
+
const last = tokens[tokens.length - 1];
|
|
77
|
+
if (Array.isArray(cur) && typeof last === 'number') {
|
|
78
|
+
cur.splice(last, 1);
|
|
79
|
+
} else {
|
|
80
|
+
delete cur[last];
|
|
81
|
+
}
|
|
82
|
+
return root;
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=path.js.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Validation rule presets — the dependency-free replacement for Yup chains.
|
|
5
|
+
* Each factory returns a {@link ValidationRule}. Rules built on the project's
|
|
6
|
+
* `validators` module skip empty values (so `required()` owns emptiness and you
|
|
7
|
+
* don't get duplicate errors), and accept an optional custom message.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { isAadhaar, isAlphanumeric, isEmail, isGstin, isIfsc, isIndianMobile, isIndianPincode, isInteger, isNumeric, isPan, isPhone, isStrongPassword, isUrl } from '@webority-technologies/mobile-core';
|
|
11
|
+
import { getPath } from "./path.js";
|
|
12
|
+
const isEmptyValue = v => v == null || v === '' || Array.isArray(v) && v.length === 0;
|
|
13
|
+
const fromPredicate = (predicate, defaultMsg) => message => value => isEmptyValue(value) || predicate(value) ? undefined : message ?? defaultMsg;
|
|
14
|
+
export const required = (message = 'This field is required') => value => {
|
|
15
|
+
// A required boolean (e.g. "accept terms" checkbox) must be true.
|
|
16
|
+
if (typeof value === 'boolean') {
|
|
17
|
+
return value ? undefined : message;
|
|
18
|
+
}
|
|
19
|
+
return isEmptyValue(value) ? message : undefined;
|
|
20
|
+
};
|
|
21
|
+
export const email = fromPredicate(isEmail, 'Enter a valid email');
|
|
22
|
+
export const mobile = fromPredicate(isIndianMobile, 'Enter a valid mobile number');
|
|
23
|
+
export const phone = fromPredicate(isPhone, 'Enter a valid phone number');
|
|
24
|
+
export const url = fromPredicate(isUrl, 'Enter a valid URL');
|
|
25
|
+
export const numeric = fromPredicate(isNumeric, 'Enter a valid number');
|
|
26
|
+
export const integer = fromPredicate(isInteger, 'Enter a whole number');
|
|
27
|
+
export const alphanumeric = fromPredicate(isAlphanumeric, 'Use letters and numbers only');
|
|
28
|
+
export const pincode = fromPredicate(isIndianPincode, 'Enter a valid 6-digit PIN code');
|
|
29
|
+
export const pan = fromPredicate(isPan, 'Enter a valid PAN');
|
|
30
|
+
export const gstin = fromPredicate(isGstin, 'Enter a valid GSTIN');
|
|
31
|
+
export const aadhaar = fromPredicate(isAadhaar, 'Enter a valid Aadhaar number');
|
|
32
|
+
export const ifsc = fromPredicate(isIfsc, 'Enter a valid IFSC code');
|
|
33
|
+
export const minLength = (length, message) => value => isEmptyValue(value) || String(value).length >= length ? undefined : message ?? `Must be at least ${length} characters`;
|
|
34
|
+
export const maxLength = (length, message) => value => value == null || String(value).length <= length ? undefined : message ?? `Must be at most ${length} characters`;
|
|
35
|
+
export const min = (n, message) => value => isEmptyValue(value) || Number(value) >= n ? undefined : message ?? `Must be at least ${n}`;
|
|
36
|
+
export const max = (n, message) => value => isEmptyValue(value) || Number(value) <= n ? undefined : message ?? `Must be at most ${n}`;
|
|
37
|
+
export const pattern = (regex, message = 'Invalid format') => value => isEmptyValue(value) || regex.test(String(value)) ? undefined : message;
|
|
38
|
+
export const oneOf = (allowed, message = 'Invalid selection') => value => isEmptyValue(value) || allowed.includes(value) ? undefined : message;
|
|
39
|
+
|
|
40
|
+
/** Cross-field equality (e.g. confirm-password). `otherField` is a field path. */
|
|
41
|
+
export const matches = (otherField, message = 'Values do not match') => (value, allValues) => value === getPath(allValues, otherField) ? undefined : message;
|
|
42
|
+
export const strongPassword = (rules, message = 'Password is too weak') => value => isEmptyValue(value) || isStrongPassword(value, rules) ? undefined : message;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Wrap any custom check. Return `true` (valid), `false` (invalid → default
|
|
46
|
+
* message), or a string (invalid → that message). Async is supported — return
|
|
47
|
+
* a Promise of the same.
|
|
48
|
+
*/
|
|
49
|
+
export const custom = (fn, message = 'Invalid value') => async (value, allValues) => {
|
|
50
|
+
const result = await fn(value, allValues);
|
|
51
|
+
if (result === true) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (result === false) {
|
|
55
|
+
return message;
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=rules.js.map
|