@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,285 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tabs — top tabs with animated underline (or pills) indicator.
|
|
5
|
+
*
|
|
6
|
+
* Layout: equal-width row by default, or horizontal-scrollable when
|
|
7
|
+
* `scrollable` is true. The active indicator (underline or pill) is an
|
|
8
|
+
* Animated.View positioned absolutely; its translateX + width spring to the
|
|
9
|
+
* measured layout of the active tab. Driven by native driver where possible
|
|
10
|
+
* (transform); width animates separately on the JS thread because RN's
|
|
11
|
+
* native driver does not support layout props.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
15
|
+
import { Animated, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
16
|
+
import { createAnimatedValue, useTheme } from "../../theme/index.js";
|
|
17
|
+
import { resolveHaptic, triggerHaptic } from "../../utils/index.js";
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
const Tabs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
20
|
+
const {
|
|
21
|
+
tabs,
|
|
22
|
+
activeKey,
|
|
23
|
+
onChange,
|
|
24
|
+
variant = 'underline',
|
|
25
|
+
scrollable = false,
|
|
26
|
+
align = 'left',
|
|
27
|
+
style,
|
|
28
|
+
containerStyle,
|
|
29
|
+
tabStyle,
|
|
30
|
+
tabLabelStyle,
|
|
31
|
+
tabIconStyle,
|
|
32
|
+
tabBadgeStyle,
|
|
33
|
+
dividerStyle,
|
|
34
|
+
indicatorStyle,
|
|
35
|
+
progress,
|
|
36
|
+
haptic,
|
|
37
|
+
accessibilityLabel,
|
|
38
|
+
testID
|
|
39
|
+
} = props;
|
|
40
|
+
const theme = useTheme();
|
|
41
|
+
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
42
|
+
const tabsTokens = theme.components.tabs;
|
|
43
|
+
const tabPaddingHorizontal = tabsTokens?.tabPaddingHorizontal ?? theme.spacing.lg;
|
|
44
|
+
const tabPaddingVertical = tabsTokens?.tabPaddingVertical ?? theme.spacing.md;
|
|
45
|
+
const tabIconSpacing = tabsTokens?.tabIconSpacing ?? 6;
|
|
46
|
+
const underlineHeight = tabsTokens?.underlineHeight ?? 2;
|
|
47
|
+
const pillInset = tabsTokens?.pillInset ?? 4;
|
|
48
|
+
const disabledOpacity = tabsTokens?.disabledOpacity ?? 0.45;
|
|
49
|
+
const badgeGap = tabsTokens?.badgeGap ?? 6;
|
|
50
|
+
|
|
51
|
+
// Per-tab measured layouts (key → {x, width}).
|
|
52
|
+
const [layouts, setLayouts] = useState({});
|
|
53
|
+
const indicatorTranslateX = useRef(createAnimatedValue(0)).current;
|
|
54
|
+
const indicatorWidth = useRef(createAnimatedValue(0)).current;
|
|
55
|
+
const activeLayout = layouts[activeKey];
|
|
56
|
+
|
|
57
|
+
// Progress-driven mode: when the caller supplies a fractional-index signal
|
|
58
|
+
// and every tab has reported its layout, the indicator's translateX/width
|
|
59
|
+
// are interpolated from that signal — the press-spring is suppressed so the
|
|
60
|
+
// two drivers don't fight for the same view.
|
|
61
|
+
const allMeasured = tabs.every(t => layouts[t.key] !== undefined);
|
|
62
|
+
const useProgress = progress !== undefined && allMeasured && tabs.length > 1;
|
|
63
|
+
const progressTranslateX = useMemo(() => {
|
|
64
|
+
if (!useProgress || !progress) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return progress.interpolate({
|
|
68
|
+
inputRange: tabs.map((_, i) => i),
|
|
69
|
+
outputRange: tabs.map(t => layouts[t.key].x),
|
|
70
|
+
extrapolate: 'clamp'
|
|
71
|
+
});
|
|
72
|
+
}, [useProgress, progress, tabs, layouts]);
|
|
73
|
+
const progressWidth = useMemo(() => {
|
|
74
|
+
if (!useProgress || !progress) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return progress.interpolate({
|
|
78
|
+
inputRange: tabs.map((_, i) => i),
|
|
79
|
+
outputRange: tabs.map(t => layouts[t.key].width),
|
|
80
|
+
extrapolate: 'clamp'
|
|
81
|
+
});
|
|
82
|
+
}, [useProgress, progress, tabs, layouts]);
|
|
83
|
+
|
|
84
|
+
// Animate indicator whenever activeKey or its layout changes.
|
|
85
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `activeKey` is the TRIGGER that moves the indicator; the body reads the derived `activeLayout`, so removing it would stop the indicator from animating on tab change
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (!activeLayout) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (useProgress) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const spring = theme.motion.spring.snappy;
|
|
94
|
+
const anim = Animated.parallel([
|
|
95
|
+
// Both must use the JS driver: width can't run on native, and mixing
|
|
96
|
+
// drivers on the same view (transform native + width JS) trips RN's
|
|
97
|
+
// "node already moved to native" guard under the new architecture.
|
|
98
|
+
Animated.spring(indicatorTranslateX, {
|
|
99
|
+
toValue: activeLayout.x,
|
|
100
|
+
damping: spring.damping,
|
|
101
|
+
stiffness: spring.stiffness,
|
|
102
|
+
mass: spring.mass,
|
|
103
|
+
useNativeDriver: false
|
|
104
|
+
}), Animated.spring(indicatorWidth, {
|
|
105
|
+
toValue: activeLayout.width,
|
|
106
|
+
damping: spring.damping,
|
|
107
|
+
stiffness: spring.stiffness,
|
|
108
|
+
mass: spring.mass,
|
|
109
|
+
useNativeDriver: false
|
|
110
|
+
})]);
|
|
111
|
+
anim.start();
|
|
112
|
+
return () => anim.stop();
|
|
113
|
+
}, [activeLayout, activeKey, indicatorTranslateX, indicatorWidth, theme.motion.spring.snappy, useProgress]);
|
|
114
|
+
const handleLayout = useCallback(key => e => {
|
|
115
|
+
const {
|
|
116
|
+
x,
|
|
117
|
+
width
|
|
118
|
+
} = e.nativeEvent.layout;
|
|
119
|
+
setLayouts(prev => {
|
|
120
|
+
const existing = prev[key];
|
|
121
|
+
if (existing && existing.x === x && existing.width === width) {
|
|
122
|
+
return prev;
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
...prev,
|
|
126
|
+
[key]: {
|
|
127
|
+
x,
|
|
128
|
+
width
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}, []);
|
|
133
|
+
const handlePress = useCallback(tab => {
|
|
134
|
+
if (tab.disabled) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (tab.key === activeKey) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
141
|
+
if (h) {
|
|
142
|
+
triggerHaptic(h);
|
|
143
|
+
}
|
|
144
|
+
onChange(tab.key);
|
|
145
|
+
}, [activeKey, onChange, haptic]);
|
|
146
|
+
const indicatorIsPill = variant === 'pills';
|
|
147
|
+
|
|
148
|
+
// Indicator visual.
|
|
149
|
+
const indicator = /*#__PURE__*/_jsx(Animated.View, {
|
|
150
|
+
pointerEvents: "none",
|
|
151
|
+
style: [indicatorIsPill ? styles.indicatorPill : styles.indicatorUnderline, indicatorIsPill ? {
|
|
152
|
+
top: pillInset,
|
|
153
|
+
bottom: pillInset
|
|
154
|
+
} : {
|
|
155
|
+
height: underlineHeight
|
|
156
|
+
}, {
|
|
157
|
+
width: progressWidth ?? indicatorWidth,
|
|
158
|
+
transform: [{
|
|
159
|
+
translateX: progressTranslateX ?? indicatorTranslateX
|
|
160
|
+
}],
|
|
161
|
+
backgroundColor: indicatorIsPill ? theme.colors.primaryMuted : theme.colors.primary,
|
|
162
|
+
borderRadius: indicatorIsPill ? theme.radius.full : 0
|
|
163
|
+
}, indicatorStyle]
|
|
164
|
+
});
|
|
165
|
+
const renderTabs = () => tabs.map(tab => {
|
|
166
|
+
const isActive = tab.key === activeKey;
|
|
167
|
+
const isDisabled = tab.disabled === true;
|
|
168
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
169
|
+
onPress: () => handlePress(tab),
|
|
170
|
+
onLayout: handleLayout(tab.key),
|
|
171
|
+
disabled: isDisabled,
|
|
172
|
+
accessibilityRole: "tab",
|
|
173
|
+
accessibilityLabel: tab.label,
|
|
174
|
+
accessibilityState: {
|
|
175
|
+
selected: isActive,
|
|
176
|
+
disabled: isDisabled
|
|
177
|
+
},
|
|
178
|
+
android_ripple: {
|
|
179
|
+
color: theme.colors.surface.pressed,
|
|
180
|
+
borderless: false
|
|
181
|
+
},
|
|
182
|
+
style: ({
|
|
183
|
+
pressed
|
|
184
|
+
}) => [styles.tab, scrollable ? null : styles.tabFlex, {
|
|
185
|
+
paddingHorizontal: tabPaddingHorizontal,
|
|
186
|
+
paddingVertical: tabPaddingVertical,
|
|
187
|
+
opacity: isDisabled ? disabledOpacity : 1,
|
|
188
|
+
backgroundColor: pressed ? theme.colors.surface.pressed : 'transparent'
|
|
189
|
+
}, tabStyle],
|
|
190
|
+
children: [tab.icon ? /*#__PURE__*/_jsx(View, {
|
|
191
|
+
style: [styles.tabIcon, {
|
|
192
|
+
marginRight: tabIconSpacing
|
|
193
|
+
}, tabIconStyle],
|
|
194
|
+
children: tab.icon
|
|
195
|
+
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
196
|
+
style: [styles.tabLabel, {
|
|
197
|
+
color: isActive ? theme.colors.primary : theme.colors.text.tertiary,
|
|
198
|
+
fontSize: theme.typography.fontSize.base,
|
|
199
|
+
fontWeight: isActive ? theme.typography.fontWeight.semibold : theme.typography.fontWeight.medium
|
|
200
|
+
}, tabLabelStyle],
|
|
201
|
+
numberOfLines: 1,
|
|
202
|
+
children: tab.label
|
|
203
|
+
}), tab.badge !== undefined && tab.badge !== null ? /*#__PURE__*/_jsx(View, {
|
|
204
|
+
style: [styles.tabBadge, {
|
|
205
|
+
marginLeft: badgeGap,
|
|
206
|
+
backgroundColor: theme.colors.primaryMuted,
|
|
207
|
+
borderRadius: theme.radius.full,
|
|
208
|
+
paddingHorizontal: theme.spacing.xs
|
|
209
|
+
}, tabBadgeStyle],
|
|
210
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
211
|
+
style: {
|
|
212
|
+
color: theme.colors.primary,
|
|
213
|
+
fontSize: theme.typography.fontSize.xs,
|
|
214
|
+
fontWeight: theme.typography.fontWeight.semibold
|
|
215
|
+
},
|
|
216
|
+
numberOfLines: 1,
|
|
217
|
+
children: String(tab.badge)
|
|
218
|
+
})
|
|
219
|
+
}) : null]
|
|
220
|
+
}, tab.key);
|
|
221
|
+
});
|
|
222
|
+
const baseRowStyle = {
|
|
223
|
+
flexDirection: 'row',
|
|
224
|
+
alignItems: 'stretch',
|
|
225
|
+
justifyContent: scrollable ? 'flex-start' : align === 'center' ? 'center' : 'flex-start',
|
|
226
|
+
position: 'relative'
|
|
227
|
+
};
|
|
228
|
+
return /*#__PURE__*/_jsx(View, {
|
|
229
|
+
ref: ref,
|
|
230
|
+
style: [styles.container, {
|
|
231
|
+
borderBottomColor: theme.colors.border.secondary,
|
|
232
|
+
borderBottomWidth: variant === 'underline' ? StyleSheet.hairlineWidth : 0
|
|
233
|
+
}, variant === 'underline' ? dividerStyle : null, style, containerStyle],
|
|
234
|
+
accessibilityRole: "tablist",
|
|
235
|
+
accessibilityLabel: accessibilityLabel,
|
|
236
|
+
testID: testID,
|
|
237
|
+
children: scrollable ? /*#__PURE__*/_jsxs(ScrollView, {
|
|
238
|
+
horizontal: true,
|
|
239
|
+
showsHorizontalScrollIndicator: false,
|
|
240
|
+
contentContainerStyle: [baseRowStyle],
|
|
241
|
+
keyboardShouldPersistTaps: "handled",
|
|
242
|
+
children: [renderTabs(), indicator]
|
|
243
|
+
}) : /*#__PURE__*/_jsxs(View, {
|
|
244
|
+
style: baseRowStyle,
|
|
245
|
+
children: [renderTabs(), indicator]
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
Tabs.displayName = 'Tabs';
|
|
250
|
+
const buildStyles = _theme => StyleSheet.create({
|
|
251
|
+
container: {
|
|
252
|
+
width: '100%',
|
|
253
|
+
position: 'relative'
|
|
254
|
+
},
|
|
255
|
+
tab: {
|
|
256
|
+
flexDirection: 'row',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
justifyContent: 'center'
|
|
259
|
+
},
|
|
260
|
+
tabFlex: {
|
|
261
|
+
flex: 1
|
|
262
|
+
},
|
|
263
|
+
tabIcon: {},
|
|
264
|
+
tabLabel: {
|
|
265
|
+
includeFontPadding: false
|
|
266
|
+
},
|
|
267
|
+
tabBadge: {
|
|
268
|
+
minWidth: 18,
|
|
269
|
+
alignItems: 'center',
|
|
270
|
+
justifyContent: 'center'
|
|
271
|
+
},
|
|
272
|
+
indicatorUnderline: {
|
|
273
|
+
position: 'absolute',
|
|
274
|
+
left: 0,
|
|
275
|
+
bottom: 0
|
|
276
|
+
},
|
|
277
|
+
indicatorPill: {
|
|
278
|
+
position: 'absolute',
|
|
279
|
+
left: 0,
|
|
280
|
+
zIndex: -1
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
export { Tabs };
|
|
284
|
+
export default Tabs;
|
|
285
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useCallback, useMemo, useState } from 'react';
|
|
4
|
+
import { StyleSheet, TextInput, View } from 'react-native';
|
|
5
|
+
import { useControllableState } from "../../hooks/index.js";
|
|
6
|
+
import { fontFor, useTheme } from "../../theme/index.js";
|
|
7
|
+
import { resolveHaptic, triggerHaptic } from "../../utils/index.js";
|
|
8
|
+
import { Chip } from "../Chip/index.js";
|
|
9
|
+
import { FieldBase } from "../FieldBase/index.js";
|
|
10
|
+
import { FormField } from "../FormField/index.js";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
/**
|
|
13
|
+
* Chips as input — the "type a value, press enter, it becomes a tag" field.
|
|
14
|
+
* Chip renders a tag and Input takes text, but nothing joined them, so consumers
|
|
15
|
+
* built this by hand each time (and each one disagreed about backspace).
|
|
16
|
+
*/
|
|
17
|
+
export const TagInput = /*#__PURE__*/forwardRef((props, ref) => {
|
|
18
|
+
const {
|
|
19
|
+
value,
|
|
20
|
+
defaultValue,
|
|
21
|
+
onChange,
|
|
22
|
+
placeholder,
|
|
23
|
+
label,
|
|
24
|
+
helperText,
|
|
25
|
+
error,
|
|
26
|
+
required,
|
|
27
|
+
disabled = false,
|
|
28
|
+
size = 'md',
|
|
29
|
+
variant,
|
|
30
|
+
maxTags,
|
|
31
|
+
unique = true,
|
|
32
|
+
transform,
|
|
33
|
+
separators = [','],
|
|
34
|
+
haptic,
|
|
35
|
+
style,
|
|
36
|
+
testID
|
|
37
|
+
} = props;
|
|
38
|
+
const theme = useTheme();
|
|
39
|
+
const styles = useMemo(() => buildStyles(theme), [theme]);
|
|
40
|
+
const [tags, setTags] = useControllableState({
|
|
41
|
+
value,
|
|
42
|
+
defaultValue: defaultValue ?? [],
|
|
43
|
+
onChange
|
|
44
|
+
});
|
|
45
|
+
const [draft, setDraft] = useState('');
|
|
46
|
+
const [focused, setFocused] = useState(false);
|
|
47
|
+
const atCapacity = typeof maxTags === 'number' && tags.length >= maxTags;
|
|
48
|
+
const commit = useCallback(raw => {
|
|
49
|
+
const candidate = transform ? transform(raw.trim()) : raw.trim();
|
|
50
|
+
if (!candidate) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (atCapacity) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (unique && tags.some(t => t.toLowerCase() === candidate.toLowerCase())) {
|
|
57
|
+
setDraft('');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setTags([...tags, candidate]);
|
|
61
|
+
setDraft('');
|
|
62
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
63
|
+
if (h) {
|
|
64
|
+
triggerHaptic(h);
|
|
65
|
+
}
|
|
66
|
+
}, [atCapacity, haptic, setTags, tags, transform, unique]);
|
|
67
|
+
const removeAt = useCallback(index => {
|
|
68
|
+
const next = tags.filter((_, i) => i !== index);
|
|
69
|
+
setTags(next);
|
|
70
|
+
const h = resolveHaptic(haptic, 'selection');
|
|
71
|
+
if (h) {
|
|
72
|
+
triggerHaptic(h);
|
|
73
|
+
}
|
|
74
|
+
}, [haptic, setTags, tags]);
|
|
75
|
+
const handleChangeText = useCallback(text => {
|
|
76
|
+
// A separator keystroke commits rather than being typed into the draft.
|
|
77
|
+
const hit = separators.find(s => s.length > 0 && text.includes(s));
|
|
78
|
+
if (hit) {
|
|
79
|
+
const [head] = text.split(hit);
|
|
80
|
+
commit(head);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
setDraft(text);
|
|
84
|
+
}, [commit, separators]);
|
|
85
|
+
const handleKeyPress = useCallback(e => {
|
|
86
|
+
if (disabled) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// Backspace on an empty draft removes the last tag — the behaviour every
|
|
90
|
+
// hand-rolled version got wrong or skipped.
|
|
91
|
+
if (e.nativeEvent.key === 'Backspace' && draft === '' && tags.length > 0) {
|
|
92
|
+
removeAt(tags.length - 1);
|
|
93
|
+
}
|
|
94
|
+
}, [disabled, draft, removeAt, tags.length]);
|
|
95
|
+
const field = /*#__PURE__*/_jsx(FieldBase, {
|
|
96
|
+
size: size,
|
|
97
|
+
variant: variant,
|
|
98
|
+
focused: focused,
|
|
99
|
+
disabled: disabled,
|
|
100
|
+
error: Boolean(error),
|
|
101
|
+
filled: tags.length > 0 || draft.length > 0,
|
|
102
|
+
style: style,
|
|
103
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
104
|
+
style: styles.wrap,
|
|
105
|
+
children: [tags.map((tag, index) => /*#__PURE__*/_jsx(Chip, {
|
|
106
|
+
label: tag,
|
|
107
|
+
size: "sm",
|
|
108
|
+
onClose: disabled ? undefined : () => removeAt(index),
|
|
109
|
+
haptic: haptic
|
|
110
|
+
}, `${tag}-${index}`)), /*#__PURE__*/_jsx(TextInput, {
|
|
111
|
+
ref: ref,
|
|
112
|
+
value: draft,
|
|
113
|
+
onChangeText: handleChangeText,
|
|
114
|
+
onKeyPress: handleKeyPress,
|
|
115
|
+
onSubmitEditing: () => commit(draft),
|
|
116
|
+
onFocus: () => setFocused(true),
|
|
117
|
+
onBlur: () => {
|
|
118
|
+
setFocused(false);
|
|
119
|
+
// Committing on blur means a typed-but-unsubmitted value is not lost.
|
|
120
|
+
commit(draft);
|
|
121
|
+
},
|
|
122
|
+
editable: !disabled && !atCapacity,
|
|
123
|
+
placeholder: atCapacity ? undefined : placeholder,
|
|
124
|
+
placeholderTextColor: theme.colors.text.tertiary,
|
|
125
|
+
blurOnSubmit: false,
|
|
126
|
+
returnKeyType: "done",
|
|
127
|
+
style: [styles.input, {
|
|
128
|
+
color: theme.colors.text.primary,
|
|
129
|
+
fontSize: theme.typography.fontSize.base
|
|
130
|
+
}],
|
|
131
|
+
testID: testID ? `${testID}-input` : undefined
|
|
132
|
+
})]
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
if (!label && !helperText && !error) {
|
|
136
|
+
return /*#__PURE__*/_jsx(View, {
|
|
137
|
+
testID: testID,
|
|
138
|
+
children: field
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return /*#__PURE__*/_jsx(View, {
|
|
142
|
+
testID: testID,
|
|
143
|
+
children: /*#__PURE__*/_jsx(FormField, {
|
|
144
|
+
label: label,
|
|
145
|
+
helperText: helperText,
|
|
146
|
+
error: error,
|
|
147
|
+
required: required,
|
|
148
|
+
children: field
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
TagInput.displayName = 'TagInput';
|
|
153
|
+
const buildStyles = theme => StyleSheet.create({
|
|
154
|
+
wrap: {
|
|
155
|
+
flex: 1,
|
|
156
|
+
flexDirection: 'row',
|
|
157
|
+
flexWrap: 'wrap',
|
|
158
|
+
alignItems: 'center',
|
|
159
|
+
gap: theme.spacing.xs,
|
|
160
|
+
paddingVertical: theme.spacing.xs
|
|
161
|
+
},
|
|
162
|
+
input: {
|
|
163
|
+
...fontFor(theme, 'normal'),
|
|
164
|
+
flexGrow: 1,
|
|
165
|
+
minWidth: 80,
|
|
166
|
+
padding: 0
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export default TagInput;
|
|
170
|
+
//# sourceMappingURL=TagInput.js.map
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { Text as RNText } from 'react-native';
|
|
5
|
+
import { fontFor, useTheme } from "../../theme/index.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const VARIANTS = {
|
|
8
|
+
display: {
|
|
9
|
+
size: '4xl',
|
|
10
|
+
weight: 'bold',
|
|
11
|
+
line: 'tight',
|
|
12
|
+
color: 'primary',
|
|
13
|
+
heading: true
|
|
14
|
+
},
|
|
15
|
+
h1: {
|
|
16
|
+
size: '3xl',
|
|
17
|
+
weight: 'bold',
|
|
18
|
+
line: 'tight',
|
|
19
|
+
color: 'primary',
|
|
20
|
+
heading: true
|
|
21
|
+
},
|
|
22
|
+
h2: {
|
|
23
|
+
size: '2xl',
|
|
24
|
+
weight: 'semibold',
|
|
25
|
+
line: 'tight',
|
|
26
|
+
color: 'primary',
|
|
27
|
+
heading: true
|
|
28
|
+
},
|
|
29
|
+
h3: {
|
|
30
|
+
size: 'xl',
|
|
31
|
+
weight: 'semibold',
|
|
32
|
+
line: 'tight',
|
|
33
|
+
color: 'primary',
|
|
34
|
+
heading: true
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
size: 'lg',
|
|
38
|
+
weight: 'semibold',
|
|
39
|
+
line: 'normal',
|
|
40
|
+
color: 'primary'
|
|
41
|
+
},
|
|
42
|
+
body: {
|
|
43
|
+
size: 'base',
|
|
44
|
+
weight: 'normal',
|
|
45
|
+
line: 'normal',
|
|
46
|
+
color: 'primary'
|
|
47
|
+
},
|
|
48
|
+
bodySmall: {
|
|
49
|
+
size: 'sm',
|
|
50
|
+
weight: 'normal',
|
|
51
|
+
line: 'normal',
|
|
52
|
+
color: 'secondary'
|
|
53
|
+
},
|
|
54
|
+
caption: {
|
|
55
|
+
size: 'xs',
|
|
56
|
+
weight: 'normal',
|
|
57
|
+
line: 'normal',
|
|
58
|
+
color: 'tertiary'
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
size: 'sm',
|
|
62
|
+
weight: 'medium',
|
|
63
|
+
line: 'normal',
|
|
64
|
+
color: 'secondary'
|
|
65
|
+
},
|
|
66
|
+
overline: {
|
|
67
|
+
size: 'xs',
|
|
68
|
+
weight: 'semibold',
|
|
69
|
+
line: 'normal',
|
|
70
|
+
color: 'secondary',
|
|
71
|
+
uppercase: true,
|
|
72
|
+
letterSpacing: 'wide'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const TEXT_ROLES = {
|
|
76
|
+
primary: true,
|
|
77
|
+
secondary: true,
|
|
78
|
+
tertiary: true,
|
|
79
|
+
inverse: true,
|
|
80
|
+
disabled: true,
|
|
81
|
+
link: true
|
|
82
|
+
};
|
|
83
|
+
const SEMANTIC = {
|
|
84
|
+
success: true,
|
|
85
|
+
warning: true,
|
|
86
|
+
error: true,
|
|
87
|
+
info: true
|
|
88
|
+
};
|
|
89
|
+
const resolveColor = (theme, color) => {
|
|
90
|
+
// Text roles win over the same-named brand colour ('primary' -> text.primary),
|
|
91
|
+
// which is the intent the vast majority of the time for text.
|
|
92
|
+
if (TEXT_ROLES[color]) {
|
|
93
|
+
return theme.colors.text[color];
|
|
94
|
+
}
|
|
95
|
+
if (SEMANTIC[color]) {
|
|
96
|
+
return theme.colors[color];
|
|
97
|
+
}
|
|
98
|
+
return color; // raw colour string
|
|
99
|
+
};
|
|
100
|
+
const Text = /*#__PURE__*/forwardRef((props, ref) => {
|
|
101
|
+
const {
|
|
102
|
+
variant = 'body',
|
|
103
|
+
color,
|
|
104
|
+
weight,
|
|
105
|
+
size,
|
|
106
|
+
align,
|
|
107
|
+
italic,
|
|
108
|
+
underline,
|
|
109
|
+
style,
|
|
110
|
+
children,
|
|
111
|
+
...rest
|
|
112
|
+
} = props;
|
|
113
|
+
const theme = useTheme();
|
|
114
|
+
const textStyle = useMemo(() => {
|
|
115
|
+
const spec = VARIANTS[variant];
|
|
116
|
+
const fontSize = typeof size === 'number' ? size : theme.typography.fontSize[size ?? spec.size];
|
|
117
|
+
const lineHeight = Math.round(fontSize * theme.typography.lineHeight[spec.line]);
|
|
118
|
+
return {
|
|
119
|
+
fontSize,
|
|
120
|
+
lineHeight,
|
|
121
|
+
color: resolveColor(theme, color ?? spec.color),
|
|
122
|
+
textAlign: align,
|
|
123
|
+
textTransform: spec.uppercase ? 'uppercase' : undefined,
|
|
124
|
+
letterSpacing: spec.letterSpacing ? theme.typography.letterSpacing[spec.letterSpacing] : undefined,
|
|
125
|
+
fontStyle: italic ? 'italic' : undefined,
|
|
126
|
+
textDecorationLine: underline ? 'underline' : undefined,
|
|
127
|
+
...fontFor(theme, weight ?? spec.weight)
|
|
128
|
+
};
|
|
129
|
+
}, [theme, variant, color, weight, size, align, italic, underline]);
|
|
130
|
+
const heading = VARIANTS[variant].heading;
|
|
131
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
132
|
+
ref: ref,
|
|
133
|
+
style: [textStyle, style],
|
|
134
|
+
accessibilityRole: heading ? 'header' : rest.accessibilityRole,
|
|
135
|
+
...rest,
|
|
136
|
+
children: children
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
Text.displayName = 'Text';
|
|
140
|
+
export { Text };
|
|
141
|
+
export default Text;
|
|
142
|
+
//# sourceMappingURL=Text.js.map
|