@webority/mobile-ui 0.165.0 → 0.168.0
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/dist/canvas-kit/kit.js +10 -10
- package/dist/canvas-kit/manifest.json +22 -13
- package/dist/canvas-kit/release.json +6 -6
- package/lib/commonjs/components/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/commonjs/components/AmountSlider/index.js +1 -1
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/AppBar/index.js +1 -1
- package/lib/commonjs/components/AppLockOverlay/AppLockOverlay.js +1 -1
- package/lib/commonjs/components/AppLockOverlay/index.js +1 -1
- package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/commonjs/components/AsyncBlock/index.js +1 -1
- package/lib/commonjs/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/commonjs/components/Autocomplete/Autocomplete.js +1 -1
- package/lib/commonjs/components/Autocomplete/index.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Avatar/index.js +1 -1
- package/lib/commonjs/components/Badge/Badge.js +1 -1
- package/lib/commonjs/components/Badge/index.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/Banner/index.js +1 -1
- package/lib/commonjs/components/BarChart/BarChart.js +1 -1
- package/lib/commonjs/components/BarChart/index.js +1 -1
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/commonjs/components/BottomNavigation/index.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/BottomSheet/index.js +1 -1
- package/lib/commonjs/components/Button/Button.js +1 -1
- package/lib/commonjs/components/Calendar/Calendar.js +1 -1
- package/lib/commonjs/components/Calendar/index.js +1 -1
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Card/index.js +1 -1
- package/lib/commonjs/components/Carousel/Carousel.js +1 -1
- package/lib/commonjs/components/Carousel/index.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Chip/Chip.js +1 -1
- package/lib/commonjs/components/Chip/index.js +1 -1
- package/lib/commonjs/components/Composer/Composer.js +1 -1
- package/lib/commonjs/components/Composer/index.js +1 -1
- package/lib/commonjs/components/Confirm/confirm.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DatePicker/index.js +1 -1
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/DateRangePicker/index.js +1 -1
- package/lib/commonjs/components/DateSeparator/DateSeparator.js +1 -1
- package/lib/commonjs/components/DateSeparator/index.js +1 -1
- package/lib/commonjs/components/DecimalInput/DecimalInput.js +1 -1
- package/lib/commonjs/components/DecimalInput/index.js +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +1 -1
- package/lib/commonjs/components/Drawer/Drawer.js +1 -1
- package/lib/commonjs/components/Drawer/index.js +1 -1
- package/lib/commonjs/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/commonjs/components/ErrorBoundary/index.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/FilePicker/FilePicker.js +1 -1
- package/lib/commonjs/components/FilePicker/index.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/index.js +1 -1
- package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
- package/lib/commonjs/components/ForceUpdateDialog/index.js +1 -1
- package/lib/commonjs/components/FormField/FormField.js +1 -1
- package/lib/commonjs/components/FormField/index.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/ImageGallery/index.js +1 -1
- package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/commonjs/components/InlineSelect/index.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/Input/index.js +1 -1
- package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.js +1 -1
- package/lib/commonjs/components/KeyboardToolbar/index.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/commonjs/components/LoaderOverlay/index.js +1 -1
- package/lib/commonjs/components/Menu/Menu.js +1 -1
- package/lib/commonjs/components/Menu/index.js +1 -1
- package/lib/commonjs/components/Menu/menuModel.js +1 -1
- package/lib/commonjs/components/Menu/useContextMenu.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/commonjs/components/MessageBubble/index.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/MessageList/index.js +1 -1
- package/lib/commonjs/components/Modal/Modal.js +1 -1
- package/lib/commonjs/components/Modal/index.js +1 -1
- package/lib/commonjs/components/NonModalBottomSheet/NonModalBottomSheet.js +1 -1
- package/lib/commonjs/components/NonModalBottomSheet/index.js +1 -1
- package/lib/commonjs/components/NumberInput/NumberInput.js +1 -1
- package/lib/commonjs/components/NumberInput/index.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPResendRow.js +1 -1
- package/lib/commonjs/components/OTPInput/index.js +1 -1
- package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/commonjs/components/OnboardingPager/index.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/OptionSheet/index.js +1 -1
- package/lib/commonjs/components/PagedListFooter/PagedListFooter.js +1 -1
- package/lib/commonjs/components/PagedListFooter/index.js +1 -1
- package/lib/commonjs/components/PermissionPrompt/PermissionPrompt.js +1 -1
- package/lib/commonjs/components/PermissionPrompt/index.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/index.js +1 -1
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/commonjs/components/PickerTrigger/index.js +1 -1
- package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/commonjs/components/ProfileCompletion/index.js +1 -1
- package/lib/commonjs/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/commonjs/components/ProfilePicker/index.js +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +1 -1
- package/lib/commonjs/components/Radio/Radio.js +1 -1
- package/lib/commonjs/components/Rating/Rating.js +1 -1
- package/lib/commonjs/components/Rating/index.js +1 -1
- package/lib/commonjs/components/Repeater/Repeater.js +1 -1
- package/lib/commonjs/components/Repeater/index.js +1 -1
- package/lib/commonjs/components/RichTextEditor/RichTextEditor.js +1 -1
- package/lib/commonjs/components/RichTextEditor/index.js +1 -1
- package/lib/commonjs/components/RichTextEditor/markdownActions.js +1 -1
- package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/commonjs/components/ScannerOverlay/index.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -1
- package/lib/commonjs/components/SearchBar/index.js +1 -1
- package/lib/commonjs/components/SectionHeader/SectionHeader.js +1 -1
- package/lib/commonjs/components/SectionHeader/index.js +1 -1
- package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/commonjs/components/Select/Select.js +1 -1
- package/lib/commonjs/components/Select/index.js +1 -1
- package/lib/commonjs/components/SignaturePad/SignaturePad.js +1 -1
- package/lib/commonjs/components/SignaturePad/index.js +1 -1
- package/lib/commonjs/components/Skeleton/Skeleton.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/commonjs/components/Skeleton/index.js +1 -1
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/commonjs/components/SlideToConfirm/index.js +1 -1
- package/lib/commonjs/components/Slider/Slider.js +1 -1
- package/lib/commonjs/components/SliderField/SliderField.js +1 -1
- package/lib/commonjs/components/SliderField/index.js +1 -1
- package/lib/commonjs/components/SortableList/SortableList.js +1 -1
- package/lib/commonjs/components/SortableList/index.js +1 -1
- package/lib/commonjs/components/Sparkline/Sparkline.js +1 -1
- package/lib/commonjs/components/Sparkline/index.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +1 -1
- package/lib/commonjs/components/Spinner/index.js +1 -1
- package/lib/commonjs/components/Stepper/Stepper.js +1 -1
- package/lib/commonjs/components/Stepper/index.js +1 -1
- package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
- package/lib/commonjs/components/Switch/Switch.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.js +1 -1
- package/lib/commonjs/components/TimePicker/index.js +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -1
- package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
- package/lib/commonjs/components/Toast/index.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tooltip/index.js +1 -1
- package/lib/commonjs/components/Tour/Tour.js +1 -1
- package/lib/commonjs/components/Tour/index.js +1 -1
- package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/commonjs/components/TypingIndicator/index.js +1 -1
- package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
- package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/commonjs/components/WheelPicker/index.js +1 -1
- package/lib/commonjs/components/index.js +1 -1
- package/lib/commonjs/form/HookFormField.js +1 -1
- package/lib/commonjs/hooks/useRefreshControl.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/navigation/DiscardGuard.js +1 -1
- package/lib/commonjs/navigation/index.js +1 -1
- package/lib/commonjs/network/NetworkStatusBanner.js +1 -1
- package/lib/commonjs/text/index.js +1 -0
- package/lib/commonjs/text/phone/amountSlider.g.js +1 -0
- package/lib/commonjs/text/phone/asyncBlock.g.js +1 -0
- package/lib/commonjs/text/phone/authedImage.g.js +1 -0
- package/lib/commonjs/text/phone/autocomplete.g.js +1 -0
- package/lib/commonjs/text/phone/avatar.g.js +1 -0
- package/lib/commonjs/text/phone/badge.g.js +1 -0
- package/lib/commonjs/text/phone/banner.g.js +1 -0
- package/lib/commonjs/text/phone/bar.g.js +1 -0
- package/lib/commonjs/text/phone/barChart.g.js +1 -0
- package/lib/commonjs/text/phone/bottomNavigation.g.js +1 -0
- package/lib/commonjs/text/phone/bottomSheet.g.js +1 -0
- package/lib/commonjs/text/phone/button.g.js +1 -0
- package/lib/commonjs/text/phone/calendar.g.js +1 -0
- package/lib/commonjs/text/phone/card.g.js +1 -0
- package/lib/commonjs/text/phone/carousel.g.js +1 -0
- package/lib/commonjs/text/phone/catalogue.g.js +1 -0
- package/lib/commonjs/text/phone/chip.g.js +1 -0
- package/lib/commonjs/text/phone/composer.g.js +1 -0
- package/lib/commonjs/text/phone/confirm.g.js +1 -0
- package/lib/commonjs/text/phone/datePicker.g.js +1 -0
- package/lib/commonjs/text/phone/dateRangePicker.g.js +1 -0
- package/lib/commonjs/text/phone/dateSeparator.g.js +1 -0
- package/lib/commonjs/text/phone/decimalInput.g.js +1 -0
- package/lib/commonjs/text/phone/discardGuard.g.js +1 -0
- package/lib/commonjs/text/phone/drawer.g.js +1 -0
- package/lib/commonjs/text/phone/errorBoundary.g.js +1 -0
- package/lib/commonjs/text/phone/filePicker.g.js +1 -0
- package/lib/commonjs/text/phone/floatingActionButton.g.js +1 -0
- package/lib/commonjs/text/phone/forceUpdateDialog.g.js +1 -0
- package/lib/commonjs/text/phone/formField.g.js +1 -0
- package/lib/commonjs/text/phone/imageGallery.g.js +1 -0
- package/lib/commonjs/text/phone/index.g.js +1 -0
- package/lib/commonjs/text/phone/inlineSelect.g.js +1 -0
- package/lib/commonjs/text/phone/input.g.js +1 -0
- package/lib/commonjs/text/phone/keyboardToolbar.g.js +1 -0
- package/lib/commonjs/text/phone/loaderOverlay.g.js +1 -0
- package/lib/commonjs/text/phone/lockOverlay.g.js +1 -0
- package/lib/commonjs/text/phone/menu.g.js +1 -0
- package/lib/commonjs/text/phone/messageBubble.g.js +1 -0
- package/lib/commonjs/text/phone/messageList.g.js +1 -0
- package/lib/commonjs/text/phone/modal.g.js +1 -0
- package/lib/commonjs/text/phone/networkStatusBanner.g.js +1 -0
- package/lib/commonjs/text/phone/nonModalBottomSheet.g.js +1 -0
- package/lib/commonjs/text/phone/numberInput.g.js +1 -0
- package/lib/commonjs/text/phone/onboardingPager.g.js +1 -0
- package/lib/commonjs/text/phone/optionSheet.g.js +1 -0
- package/lib/commonjs/text/phone/otpInput.g.js +1 -0
- package/lib/commonjs/text/phone/pagedListFooter.g.js +1 -0
- package/lib/commonjs/text/phone/permissionPrompt.g.js +1 -0
- package/lib/commonjs/text/phone/phoneNumberInput.g.js +1 -0
- package/lib/commonjs/text/phone/pickerTrigger.g.js +1 -0
- package/lib/commonjs/text/phone/profileCompletion.g.js +1 -0
- package/lib/commonjs/text/phone/profilePicker.g.js +1 -0
- package/lib/commonjs/text/phone/progressBar.g.js +1 -0
- package/lib/commonjs/text/phone/rating.g.js +1 -0
- package/lib/commonjs/text/phone/refreshControl.g.js +1 -0
- package/lib/commonjs/text/phone/repeater.g.js +1 -0
- package/lib/commonjs/text/phone/richTextEditor.g.js +1 -0
- package/lib/commonjs/text/phone/scannerOverlay.g.js +1 -0
- package/lib/commonjs/text/phone/searchBar.g.js +1 -0
- package/lib/commonjs/text/phone/sectionHeader.g.js +1 -0
- package/lib/commonjs/text/phone/select.g.js +1 -0
- package/lib/commonjs/text/phone/signaturePad.g.js +1 -0
- package/lib/commonjs/text/phone/skeleton.g.js +1 -0
- package/lib/commonjs/text/phone/slideToConfirm.g.js +1 -0
- package/lib/commonjs/text/phone/slider.g.js +1 -0
- package/lib/commonjs/text/phone/sliderField.g.js +1 -0
- package/lib/commonjs/text/phone/sortableList.g.js +1 -0
- package/lib/commonjs/text/phone/sparkline.g.js +1 -0
- package/lib/commonjs/text/phone/spinner.g.js +1 -0
- package/lib/commonjs/text/phone/stepper.g.js +1 -0
- package/lib/commonjs/text/phone/timePicker.g.js +1 -0
- package/lib/commonjs/text/phone/toast.g.js +1 -0
- package/lib/commonjs/text/phone/tooltip.g.js +1 -0
- package/lib/commonjs/text/phone/tour.g.js +1 -0
- package/lib/commonjs/text/phone/typingIndicator.g.js +1 -0
- package/lib/commonjs/text/phone/wheelPicker.g.js +1 -0
- package/lib/commonjs/text/textStore.js +1 -0
- package/lib/commonjs/theme/tokens.generated.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +1 -1
- package/lib/module/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/module/components/AmountSlider/index.js +1 -1
- package/lib/module/components/AppBar/AppBar.js +1 -1
- package/lib/module/components/AppBar/index.js +1 -1
- package/lib/module/components/AppLockOverlay/AppLockOverlay.js +1 -1
- package/lib/module/components/AppLockOverlay/index.js +1 -1
- package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/module/components/AsyncBlock/index.js +1 -1
- package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/module/components/Autocomplete/Autocomplete.js +1 -1
- package/lib/module/components/Autocomplete/index.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Avatar/index.js +1 -1
- package/lib/module/components/Badge/Badge.js +1 -1
- package/lib/module/components/Badge/index.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/Banner/index.js +1 -1
- package/lib/module/components/BarChart/BarChart.js +1 -1
- package/lib/module/components/BarChart/index.js +1 -1
- package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/module/components/BottomNavigation/index.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/BottomSheet/index.js +1 -1
- package/lib/module/components/Button/Button.js +1 -1
- package/lib/module/components/Calendar/Calendar.js +1 -1
- package/lib/module/components/Calendar/index.js +1 -1
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Card/index.js +1 -1
- package/lib/module/components/Carousel/Carousel.js +1 -1
- package/lib/module/components/Carousel/index.js +1 -1
- package/lib/module/components/Checkbox/Checkbox.js +1 -1
- package/lib/module/components/Chip/Chip.js +1 -1
- package/lib/module/components/Chip/index.js +1 -1
- package/lib/module/components/Composer/Composer.js +1 -1
- package/lib/module/components/Composer/index.js +1 -1
- package/lib/module/components/Confirm/confirm.js +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DatePicker/index.js +1 -1
- package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/DateRangePicker/index.js +1 -1
- package/lib/module/components/DateSeparator/DateSeparator.js +1 -1
- package/lib/module/components/DateSeparator/index.js +1 -1
- package/lib/module/components/DecimalInput/DecimalInput.js +1 -1
- package/lib/module/components/DecimalInput/index.js +1 -1
- package/lib/module/components/Dialog/Dialog.js +1 -1
- package/lib/module/components/Drawer/Drawer.js +1 -1
- package/lib/module/components/Drawer/index.js +1 -1
- package/lib/module/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/module/components/ErrorBoundary/index.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/FilePicker/FilePicker.js +1 -1
- package/lib/module/components/FilePicker/index.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/FloatingActionButton/index.js +1 -1
- package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +1 -1
- package/lib/module/components/ForceUpdateDialog/index.js +1 -1
- package/lib/module/components/FormField/FormField.js +1 -1
- package/lib/module/components/FormField/index.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/ImageGallery/index.js +1 -1
- package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/module/components/InlineSelect/index.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/Input/index.js +1 -1
- package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +1 -1
- package/lib/module/components/KeyboardToolbar/index.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/module/components/LoaderOverlay/index.js +1 -1
- package/lib/module/components/Menu/Menu.js +1 -1
- package/lib/module/components/Menu/index.js +1 -1
- package/lib/module/components/Menu/menuModel.js +1 -1
- package/lib/module/components/Menu/useContextMenu.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/module/components/MessageBubble/index.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/MessageList/index.js +1 -1
- package/lib/module/components/Modal/Modal.js +1 -1
- package/lib/module/components/Modal/index.js +1 -1
- package/lib/module/components/NonModalBottomSheet/NonModalBottomSheet.js +1 -1
- package/lib/module/components/NonModalBottomSheet/index.js +1 -1
- package/lib/module/components/NumberInput/NumberInput.js +1 -1
- package/lib/module/components/NumberInput/index.js +1 -1
- package/lib/module/components/OTPInput/OTPInput.js +1 -1
- package/lib/module/components/OTPInput/OTPResendRow.js +1 -1
- package/lib/module/components/OTPInput/index.js +1 -1
- package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/module/components/OnboardingPager/index.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/OptionSheet/index.js +1 -1
- package/lib/module/components/PagedListFooter/PagedListFooter.js +1 -1
- package/lib/module/components/PagedListFooter/index.js +1 -1
- package/lib/module/components/PermissionPrompt/PermissionPrompt.js +1 -1
- package/lib/module/components/PermissionPrompt/index.js +1 -1
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/PhoneNumberInput/index.js +1 -1
- package/lib/module/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/module/components/PickerTrigger/index.js +1 -1
- package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/module/components/ProfileCompletion/index.js +1 -1
- package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/module/components/ProfilePicker/index.js +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/module/components/ProgressBar/index.js +1 -1
- package/lib/module/components/Radio/Radio.js +1 -1
- package/lib/module/components/Rating/Rating.js +1 -1
- package/lib/module/components/Rating/index.js +1 -1
- package/lib/module/components/Repeater/Repeater.js +1 -1
- package/lib/module/components/Repeater/index.js +1 -1
- package/lib/module/components/RichTextEditor/RichTextEditor.js +1 -1
- package/lib/module/components/RichTextEditor/index.js +1 -1
- package/lib/module/components/RichTextEditor/markdownActions.js +1 -1
- package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/module/components/ScannerOverlay/index.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -1
- package/lib/module/components/SearchBar/SearchBar.js +1 -1
- package/lib/module/components/SearchBar/SearchPanel.js +1 -1
- package/lib/module/components/SearchBar/index.js +1 -1
- package/lib/module/components/SectionHeader/SectionHeader.js +1 -1
- package/lib/module/components/SectionHeader/index.js +1 -1
- package/lib/module/components/SegmentedControl/SegmentedControl.js +1 -1
- package/lib/module/components/Select/Select.js +1 -1
- package/lib/module/components/Select/index.js +1 -1
- package/lib/module/components/SignaturePad/SignaturePad.js +1 -1
- package/lib/module/components/SignaturePad/index.js +1 -1
- package/lib/module/components/Skeleton/Skeleton.js +1 -1
- package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/module/components/Skeleton/index.js +1 -1
- package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
- package/lib/module/components/SlideToConfirm/index.js +1 -1
- package/lib/module/components/Slider/Slider.js +1 -1
- package/lib/module/components/SliderField/SliderField.js +1 -1
- package/lib/module/components/SliderField/index.js +1 -1
- package/lib/module/components/SortableList/SortableList.js +1 -1
- package/lib/module/components/SortableList/index.js +1 -1
- package/lib/module/components/Sparkline/Sparkline.js +1 -1
- package/lib/module/components/Sparkline/index.js +1 -1
- package/lib/module/components/Spinner/Spinner.js +1 -1
- package/lib/module/components/Spinner/index.js +1 -1
- package/lib/module/components/Stepper/Stepper.js +1 -1
- package/lib/module/components/Stepper/index.js +1 -1
- package/lib/module/components/Swipeable/Swipeable.js +1 -1
- package/lib/module/components/Switch/Switch.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.js +1 -1
- package/lib/module/components/TimePicker/index.js +1 -1
- package/lib/module/components/Toast/Toast.js +1 -1
- package/lib/module/components/Toast/ToastProvider.js +1 -1
- package/lib/module/components/Toast/index.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tooltip/index.js +1 -1
- package/lib/module/components/Tour/Tour.js +1 -1
- package/lib/module/components/Tour/index.js +1 -1
- package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/module/components/TypingIndicator/index.js +1 -1
- package/lib/module/components/WheelPicker/Wheel.js +1 -1
- package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/module/components/WheelPicker/index.js +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/form/HookFormField.js +1 -1
- package/lib/module/hooks/useRefreshControl.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/navigation/DiscardGuard.js +1 -1
- package/lib/module/navigation/index.js +1 -1
- package/lib/module/network/NetworkStatusBanner.js +1 -1
- package/lib/module/text/index.js +1 -0
- package/lib/module/text/phone/amountSlider.g.js +1 -0
- package/lib/module/text/phone/asyncBlock.g.js +1 -0
- package/lib/module/text/phone/authedImage.g.js +1 -0
- package/lib/module/text/phone/autocomplete.g.js +1 -0
- package/lib/module/text/phone/avatar.g.js +1 -0
- package/lib/module/text/phone/badge.g.js +1 -0
- package/lib/module/text/phone/banner.g.js +1 -0
- package/lib/module/text/phone/bar.g.js +1 -0
- package/lib/module/text/phone/barChart.g.js +1 -0
- package/lib/module/text/phone/bottomNavigation.g.js +1 -0
- package/lib/module/text/phone/bottomSheet.g.js +1 -0
- package/lib/module/text/phone/button.g.js +1 -0
- package/lib/module/text/phone/calendar.g.js +1 -0
- package/lib/module/text/phone/card.g.js +1 -0
- package/lib/module/text/phone/carousel.g.js +1 -0
- package/lib/module/text/phone/catalogue.g.js +1 -0
- package/lib/module/text/phone/chip.g.js +1 -0
- package/lib/module/text/phone/composer.g.js +1 -0
- package/lib/module/text/phone/confirm.g.js +1 -0
- package/lib/module/text/phone/datePicker.g.js +1 -0
- package/lib/module/text/phone/dateRangePicker.g.js +1 -0
- package/lib/module/text/phone/dateSeparator.g.js +1 -0
- package/lib/module/text/phone/decimalInput.g.js +1 -0
- package/lib/module/text/phone/discardGuard.g.js +1 -0
- package/lib/module/text/phone/drawer.g.js +1 -0
- package/lib/module/text/phone/errorBoundary.g.js +1 -0
- package/lib/module/text/phone/filePicker.g.js +1 -0
- package/lib/module/text/phone/floatingActionButton.g.js +1 -0
- package/lib/module/text/phone/forceUpdateDialog.g.js +1 -0
- package/lib/module/text/phone/formField.g.js +1 -0
- package/lib/module/text/phone/imageGallery.g.js +1 -0
- package/lib/module/text/phone/index.g.js +1 -0
- package/lib/module/text/phone/inlineSelect.g.js +1 -0
- package/lib/module/text/phone/input.g.js +1 -0
- package/lib/module/text/phone/keyboardToolbar.g.js +1 -0
- package/lib/module/text/phone/loaderOverlay.g.js +1 -0
- package/lib/module/text/phone/lockOverlay.g.js +1 -0
- package/lib/module/text/phone/menu.g.js +1 -0
- package/lib/module/text/phone/messageBubble.g.js +1 -0
- package/lib/module/text/phone/messageList.g.js +1 -0
- package/lib/module/text/phone/modal.g.js +1 -0
- package/lib/module/text/phone/networkStatusBanner.g.js +1 -0
- package/lib/module/text/phone/nonModalBottomSheet.g.js +1 -0
- package/lib/module/text/phone/numberInput.g.js +1 -0
- package/lib/module/text/phone/onboardingPager.g.js +1 -0
- package/lib/module/text/phone/optionSheet.g.js +1 -0
- package/lib/module/text/phone/otpInput.g.js +1 -0
- package/lib/module/text/phone/pagedListFooter.g.js +1 -0
- package/lib/module/text/phone/permissionPrompt.g.js +1 -0
- package/lib/module/text/phone/phoneNumberInput.g.js +1 -0
- package/lib/module/text/phone/pickerTrigger.g.js +1 -0
- package/lib/module/text/phone/profileCompletion.g.js +1 -0
- package/lib/module/text/phone/profilePicker.g.js +1 -0
- package/lib/module/text/phone/progressBar.g.js +1 -0
- package/lib/module/text/phone/rating.g.js +1 -0
- package/lib/module/text/phone/refreshControl.g.js +1 -0
- package/lib/module/text/phone/repeater.g.js +1 -0
- package/lib/module/text/phone/richTextEditor.g.js +1 -0
- package/lib/module/text/phone/scannerOverlay.g.js +1 -0
- package/lib/module/text/phone/searchBar.g.js +1 -0
- package/lib/module/text/phone/sectionHeader.g.js +1 -0
- package/lib/module/text/phone/select.g.js +1 -0
- package/lib/module/text/phone/signaturePad.g.js +1 -0
- package/lib/module/text/phone/skeleton.g.js +1 -0
- package/lib/module/text/phone/slideToConfirm.g.js +1 -0
- package/lib/module/text/phone/slider.g.js +1 -0
- package/lib/module/text/phone/sliderField.g.js +1 -0
- package/lib/module/text/phone/sortableList.g.js +1 -0
- package/lib/module/text/phone/sparkline.g.js +1 -0
- package/lib/module/text/phone/spinner.g.js +1 -0
- package/lib/module/text/phone/stepper.g.js +1 -0
- package/lib/module/text/phone/timePicker.g.js +1 -0
- package/lib/module/text/phone/toast.g.js +1 -0
- package/lib/module/text/phone/tooltip.g.js +1 -0
- package/lib/module/text/phone/tour.g.js +1 -0
- package/lib/module/text/phone/typingIndicator.g.js +1 -0
- package/lib/module/text/phone/wheelPicker.g.js +1 -0
- package/lib/module/text/textStore.js +1 -0
- package/lib/module/theme/tokens.generated.js +1 -1
- package/lib/text/en.json +508 -0
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +1 -3
- package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.d.ts +3 -11
- package/lib/typescript/commonjs/components/AmountSlider/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +3 -8
- package/lib/typescript/commonjs/components/AppBar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/AppLockOverlay/AppLockOverlay.d.ts +2 -10
- package/lib/typescript/commonjs/components/AppLockOverlay/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +2 -8
- package/lib/typescript/commonjs/components/AsyncBlock/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/AuthedImage/AuthedImage.d.ts +2 -7
- package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +3 -7
- package/lib/typescript/commonjs/components/Autocomplete/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +3 -13
- package/lib/typescript/commonjs/components/Avatar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +2 -6
- package/lib/typescript/commonjs/components/Badge/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +4 -9
- package/lib/typescript/commonjs/components/Banner/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +2 -7
- package/lib/typescript/commonjs/components/BarChart/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +2 -7
- package/lib/typescript/commonjs/components/BottomNavigation/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +3 -7
- package/lib/typescript/commonjs/components/BottomSheet/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Button/Button.d.ts +4 -8
- package/lib/typescript/commonjs/components/Button/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/Calendar/Calendar.d.ts +2 -8
- package/lib/typescript/commonjs/components/Calendar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Card/Card.d.ts +4 -12
- package/lib/typescript/commonjs/components/Card/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +3 -8
- package/lib/typescript/commonjs/components/Carousel/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +1 -3
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +3 -8
- package/lib/typescript/commonjs/components/Chip/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Composer/Composer.d.ts +2 -6
- package/lib/typescript/commonjs/components/Composer/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Confirm/confirm.d.ts +2 -3
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +5 -21
- package/lib/typescript/commonjs/components/DatePicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +5 -11
- package/lib/typescript/commonjs/components/DateRangePicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +3 -7
- package/lib/typescript/commonjs/components/DateSeparator/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/DecimalInput/DecimalInput.d.ts +3 -6
- package/lib/typescript/commonjs/components/DecimalInput/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +3 -3
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +3 -7
- package/lib/typescript/commonjs/components/Drawer/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ErrorBoundary/ErrorBoundary.d.ts +2 -7
- package/lib/typescript/commonjs/components/ErrorBoundary/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +4 -3
- package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +2 -29
- package/lib/typescript/commonjs/components/FilePicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +4 -14
- package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +6 -10
- package/lib/typescript/commonjs/components/ForceUpdateDialog/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +5 -7
- package/lib/typescript/commonjs/components/FormField/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +3 -9
- package/lib/typescript/commonjs/components/ImageGallery/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +2 -8
- package/lib/typescript/commonjs/components/InlineSelect/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Input/Input.d.ts +5 -10
- package/lib/typescript/commonjs/components/Input/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +2 -7
- package/lib/typescript/commonjs/components/KeyboardToolbar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +2 -1
- package/lib/typescript/commonjs/components/LoaderOverlay/LoaderOverlay.d.ts +2 -6
- package/lib/typescript/commonjs/components/LoaderOverlay/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +3 -2
- package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +3 -2
- package/lib/typescript/commonjs/components/Menu/index.d.ts +1 -2
- package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +0 -6
- package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +3 -2
- package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +2 -13
- package/lib/typescript/commonjs/components/MessageBubble/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +2 -10
- package/lib/typescript/commonjs/components/MessageList/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +3 -6
- package/lib/typescript/commonjs/components/Modal/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/NonModalBottomSheet/NonModalBottomSheet.d.ts +3 -6
- package/lib/typescript/commonjs/components/NonModalBottomSheet/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -10
- package/lib/typescript/commonjs/components/NumberInput/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +2 -5
- package/lib/typescript/commonjs/components/OTPInput/OTPResendRow.d.ts +2 -10
- package/lib/typescript/commonjs/components/OTPInput/index.d.ts +4 -4
- package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +2 -12
- package/lib/typescript/commonjs/components/OnboardingPager/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +2 -13
- package/lib/typescript/commonjs/components/OptionSheet/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/PagedListFooter/PagedListFooter.d.ts +2 -7
- package/lib/typescript/commonjs/components/PagedListFooter/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.d.ts +2 -12
- package/lib/typescript/commonjs/components/PermissionPrompt/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +2 -14
- package/lib/typescript/commonjs/components/PhoneNumberInput/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +3 -9
- package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.d.ts +2 -6
- package/lib/typescript/commonjs/components/ProfileCompletion/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +2 -12
- package/lib/typescript/commonjs/components/ProfilePicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +3 -8
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +1 -3
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +3 -8
- package/lib/typescript/commonjs/components/Rating/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +2 -7
- package/lib/typescript/commonjs/components/Repeater/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/RichTextEditor/RichTextEditor.d.ts +2 -3
- package/lib/typescript/commonjs/components/RichTextEditor/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +2 -28
- package/lib/typescript/commonjs/components/ScannerOverlay/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +2 -16
- package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +3 -3
- package/lib/typescript/commonjs/components/SearchBar/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +3 -5
- package/lib/typescript/commonjs/components/SectionHeader/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +1 -3
- package/lib/typescript/commonjs/components/Select/Select.d.ts +7 -12
- package/lib/typescript/commonjs/components/Select/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +2 -35
- package/lib/typescript/commonjs/components/SignaturePad/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +2 -6
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +3 -2
- package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +3 -2
- package/lib/typescript/commonjs/components/Skeleton/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +2 -7
- package/lib/typescript/commonjs/components/SlideToConfirm/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +1 -3
- package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +2 -11
- package/lib/typescript/commonjs/components/SliderField/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/SortableList/SortableList.d.ts +2 -6
- package/lib/typescript/commonjs/components/SortableList/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +2 -6
- package/lib/typescript/commonjs/components/Sparkline/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +2 -5
- package/lib/typescript/commonjs/components/Spinner/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +3 -15
- package/lib/typescript/commonjs/components/Stepper/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +1 -1
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -3
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +6 -19
- package/lib/typescript/commonjs/components/TimePicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +2 -7
- package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +3 -2
- package/lib/typescript/commonjs/components/Toast/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +3 -10
- package/lib/typescript/commonjs/components/Tooltip/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/Tour/Tour.d.ts +2 -9
- package/lib/typescript/commonjs/components/Tour/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +2 -5
- package/lib/typescript/commonjs/components/TypingIndicator/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +2 -15
- package/lib/typescript/commonjs/components/WheelPicker/index.d.ts +2 -2
- package/lib/typescript/commonjs/components/index.d.ts +129 -129
- package/lib/typescript/commonjs/form/HookFormField.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/navigation/DiscardGuard.d.ts +2 -8
- package/lib/typescript/commonjs/navigation/index.d.ts +2 -2
- package/lib/typescript/commonjs/text/index.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/amountSlider.g.d.ts +10 -0
- package/lib/typescript/commonjs/text/phone/asyncBlock.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/authedImage.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/autocomplete.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/avatar.g.d.ts +13 -0
- package/lib/typescript/commonjs/text/phone/badge.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/banner.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/bar.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/barChart.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/bottomNavigation.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/bottomSheet.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/button.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/calendar.g.d.ts +12 -0
- package/lib/typescript/commonjs/text/phone/card.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/carousel.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/catalogue.g.d.ts +153 -0
- package/lib/typescript/commonjs/text/phone/chip.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/composer.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/confirm.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/datePicker.g.d.ts +18 -0
- package/lib/typescript/commonjs/text/phone/dateRangePicker.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/dateSeparator.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/decimalInput.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/discardGuard.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/drawer.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/errorBoundary.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/filePicker.g.d.ts +20 -0
- package/lib/typescript/commonjs/text/phone/floatingActionButton.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/forceUpdateDialog.g.d.ts +9 -0
- package/lib/typescript/commonjs/text/phone/formField.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/imageGallery.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/index.g.d.ts +76 -0
- package/lib/typescript/commonjs/text/phone/inlineSelect.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/input.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/keyboardToolbar.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/loaderOverlay.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/lockOverlay.g.d.ts +10 -0
- package/lib/typescript/commonjs/text/phone/menu.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/messageBubble.g.d.ts +14 -0
- package/lib/typescript/commonjs/text/phone/messageList.g.d.ts +11 -0
- package/lib/typescript/commonjs/text/phone/modal.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/networkStatusBanner.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/nonModalBottomSheet.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/numberInput.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/onboardingPager.g.d.ts +9 -0
- package/lib/typescript/commonjs/text/phone/optionSheet.g.d.ts +13 -0
- package/lib/typescript/commonjs/text/phone/otpInput.g.d.ts +12 -0
- package/lib/typescript/commonjs/text/phone/pagedListFooter.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/permissionPrompt.g.d.ts +21 -0
- package/lib/typescript/commonjs/text/phone/phoneNumberInput.g.d.ts +12 -0
- package/lib/typescript/commonjs/text/phone/pickerTrigger.g.d.ts +8 -0
- package/lib/typescript/commonjs/text/phone/profileCompletion.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/profilePicker.g.d.ts +9 -0
- package/lib/typescript/commonjs/text/phone/progressBar.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/rating.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/refreshControl.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/repeater.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/richTextEditor.g.d.ts +15 -0
- package/lib/typescript/commonjs/text/phone/scannerOverlay.g.d.ts +16 -0
- package/lib/typescript/commonjs/text/phone/searchBar.g.d.ts +17 -0
- package/lib/typescript/commonjs/text/phone/sectionHeader.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/select.g.d.ts +9 -0
- package/lib/typescript/commonjs/text/phone/signaturePad.g.d.ts +24 -0
- package/lib/typescript/commonjs/text/phone/skeleton.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/slideToConfirm.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/slider.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/sliderField.g.d.ts +11 -0
- package/lib/typescript/commonjs/text/phone/sortableList.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/sparkline.g.d.ts +6 -0
- package/lib/typescript/commonjs/text/phone/spinner.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/stepper.g.d.ts +13 -0
- package/lib/typescript/commonjs/text/phone/timePicker.g.d.ts +15 -0
- package/lib/typescript/commonjs/text/phone/toast.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/tooltip.g.d.ts +7 -0
- package/lib/typescript/commonjs/text/phone/tour.g.d.ts +9 -0
- package/lib/typescript/commonjs/text/phone/typingIndicator.g.d.ts +5 -0
- package/lib/typescript/commonjs/text/phone/wheelPicker.g.d.ts +15 -0
- package/lib/typescript/commonjs/text/textStore.d.ts +20 -0
- package/lib/typescript/commonjs/theme/tokens.generated.d.ts +1 -1
- package/lib/typescript/commonjs/theme/types.d.ts +1 -1
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +1 -3
- package/lib/typescript/module/components/AmountSlider/AmountSlider.d.ts +3 -11
- package/lib/typescript/module/components/AmountSlider/index.d.ts +2 -2
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +3 -8
- package/lib/typescript/module/components/AppBar/index.d.ts +2 -2
- package/lib/typescript/module/components/AppLockOverlay/AppLockOverlay.d.ts +2 -10
- package/lib/typescript/module/components/AppLockOverlay/index.d.ts +2 -2
- package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +2 -8
- package/lib/typescript/module/components/AsyncBlock/index.d.ts +2 -2
- package/lib/typescript/module/components/AuthedImage/AuthedImage.d.ts +2 -7
- package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +3 -7
- package/lib/typescript/module/components/Autocomplete/index.d.ts +2 -2
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +3 -13
- package/lib/typescript/module/components/Avatar/index.d.ts +2 -2
- package/lib/typescript/module/components/Badge/Badge.d.ts +2 -6
- package/lib/typescript/module/components/Badge/index.d.ts +2 -2
- package/lib/typescript/module/components/Banner/Banner.d.ts +4 -9
- package/lib/typescript/module/components/Banner/index.d.ts +2 -2
- package/lib/typescript/module/components/BarChart/BarChart.d.ts +2 -7
- package/lib/typescript/module/components/BarChart/index.d.ts +2 -2
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +2 -7
- package/lib/typescript/module/components/BottomNavigation/index.d.ts +2 -2
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +3 -7
- package/lib/typescript/module/components/BottomSheet/index.d.ts +2 -2
- package/lib/typescript/module/components/Button/Button.d.ts +4 -8
- package/lib/typescript/module/components/Button/index.d.ts +1 -1
- package/lib/typescript/module/components/Calendar/Calendar.d.ts +2 -8
- package/lib/typescript/module/components/Calendar/index.d.ts +2 -2
- package/lib/typescript/module/components/Card/Card.d.ts +4 -12
- package/lib/typescript/module/components/Card/index.d.ts +2 -2
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +3 -8
- package/lib/typescript/module/components/Carousel/index.d.ts +2 -2
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +1 -3
- package/lib/typescript/module/components/Chip/Chip.d.ts +3 -8
- package/lib/typescript/module/components/Chip/index.d.ts +2 -2
- package/lib/typescript/module/components/Composer/Composer.d.ts +2 -6
- package/lib/typescript/module/components/Composer/index.d.ts +2 -2
- package/lib/typescript/module/components/Confirm/confirm.d.ts +2 -3
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +5 -21
- package/lib/typescript/module/components/DatePicker/index.d.ts +2 -2
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +5 -11
- package/lib/typescript/module/components/DateRangePicker/index.d.ts +2 -2
- package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +3 -7
- package/lib/typescript/module/components/DateSeparator/index.d.ts +2 -2
- package/lib/typescript/module/components/DecimalInput/DecimalInput.d.ts +3 -6
- package/lib/typescript/module/components/DecimalInput/index.d.ts +2 -2
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +3 -3
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +3 -7
- package/lib/typescript/module/components/Drawer/index.d.ts +2 -2
- package/lib/typescript/module/components/ErrorBoundary/ErrorBoundary.d.ts +2 -7
- package/lib/typescript/module/components/ErrorBoundary/index.d.ts +2 -2
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +4 -3
- package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +2 -29
- package/lib/typescript/module/components/FilePicker/index.d.ts +2 -2
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +4 -14
- package/lib/typescript/module/components/FloatingActionButton/index.d.ts +2 -2
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +6 -10
- package/lib/typescript/module/components/ForceUpdateDialog/index.d.ts +2 -2
- package/lib/typescript/module/components/FormField/FormField.d.ts +5 -7
- package/lib/typescript/module/components/FormField/index.d.ts +2 -2
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +3 -9
- package/lib/typescript/module/components/ImageGallery/index.d.ts +2 -2
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +2 -8
- package/lib/typescript/module/components/InlineSelect/index.d.ts +2 -2
- package/lib/typescript/module/components/Input/Input.d.ts +5 -10
- package/lib/typescript/module/components/Input/index.d.ts +2 -2
- package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +2 -7
- package/lib/typescript/module/components/KeyboardToolbar/index.d.ts +2 -2
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +2 -1
- package/lib/typescript/module/components/LoaderOverlay/LoaderOverlay.d.ts +2 -6
- package/lib/typescript/module/components/LoaderOverlay/index.d.ts +2 -2
- package/lib/typescript/module/components/Menu/Menu.d.ts +3 -2
- package/lib/typescript/module/components/Menu/MenuSurface.d.ts +3 -2
- package/lib/typescript/module/components/Menu/index.d.ts +1 -2
- package/lib/typescript/module/components/Menu/menuModel.d.ts +0 -6
- package/lib/typescript/module/components/Menu/useContextMenu.d.ts +3 -2
- package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +2 -13
- package/lib/typescript/module/components/MessageBubble/index.d.ts +2 -2
- package/lib/typescript/module/components/MessageList/MessageList.d.ts +2 -10
- package/lib/typescript/module/components/MessageList/index.d.ts +2 -2
- package/lib/typescript/module/components/Modal/Modal.d.ts +3 -6
- package/lib/typescript/module/components/Modal/index.d.ts +2 -2
- package/lib/typescript/module/components/NonModalBottomSheet/NonModalBottomSheet.d.ts +3 -6
- package/lib/typescript/module/components/NonModalBottomSheet/index.d.ts +2 -2
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -10
- package/lib/typescript/module/components/NumberInput/index.d.ts +2 -2
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +2 -5
- package/lib/typescript/module/components/OTPInput/OTPResendRow.d.ts +2 -10
- package/lib/typescript/module/components/OTPInput/index.d.ts +4 -4
- package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +2 -12
- package/lib/typescript/module/components/OnboardingPager/index.d.ts +2 -2
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +2 -13
- package/lib/typescript/module/components/OptionSheet/index.d.ts +2 -2
- package/lib/typescript/module/components/PagedListFooter/PagedListFooter.d.ts +2 -7
- package/lib/typescript/module/components/PagedListFooter/index.d.ts +2 -2
- package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.d.ts +2 -12
- package/lib/typescript/module/components/PermissionPrompt/index.d.ts +2 -2
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +2 -14
- package/lib/typescript/module/components/PhoneNumberInput/index.d.ts +2 -2
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +3 -9
- package/lib/typescript/module/components/PickerTrigger/index.d.ts +2 -2
- package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.d.ts +2 -6
- package/lib/typescript/module/components/ProfileCompletion/index.d.ts +2 -2
- package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +2 -12
- package/lib/typescript/module/components/ProfilePicker/index.d.ts +2 -2
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +3 -8
- package/lib/typescript/module/components/ProgressBar/index.d.ts +2 -2
- package/lib/typescript/module/components/Radio/Radio.d.ts +1 -3
- package/lib/typescript/module/components/Rating/Rating.d.ts +3 -8
- package/lib/typescript/module/components/Rating/index.d.ts +2 -2
- package/lib/typescript/module/components/Repeater/Repeater.d.ts +2 -7
- package/lib/typescript/module/components/Repeater/index.d.ts +1 -1
- package/lib/typescript/module/components/RichTextEditor/RichTextEditor.d.ts +2 -3
- package/lib/typescript/module/components/RichTextEditor/index.d.ts +2 -2
- package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +2 -28
- package/lib/typescript/module/components/ScannerOverlay/index.d.ts +2 -2
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +2 -16
- package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +3 -3
- package/lib/typescript/module/components/SearchBar/index.d.ts +2 -2
- package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +3 -5
- package/lib/typescript/module/components/SectionHeader/index.d.ts +2 -2
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +1 -3
- package/lib/typescript/module/components/Select/Select.d.ts +7 -12
- package/lib/typescript/module/components/Select/index.d.ts +1 -1
- package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +2 -35
- package/lib/typescript/module/components/SignaturePad/index.d.ts +2 -2
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +2 -6
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +3 -2
- package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +3 -2
- package/lib/typescript/module/components/Skeleton/index.d.ts +2 -2
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +2 -7
- package/lib/typescript/module/components/SlideToConfirm/index.d.ts +2 -2
- package/lib/typescript/module/components/Slider/Slider.d.ts +1 -3
- package/lib/typescript/module/components/SliderField/SliderField.d.ts +2 -11
- package/lib/typescript/module/components/SliderField/index.d.ts +2 -2
- package/lib/typescript/module/components/SortableList/SortableList.d.ts +2 -6
- package/lib/typescript/module/components/SortableList/index.d.ts +2 -2
- package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +2 -6
- package/lib/typescript/module/components/Sparkline/index.d.ts +2 -2
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +2 -5
- package/lib/typescript/module/components/Spinner/index.d.ts +2 -2
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +3 -15
- package/lib/typescript/module/components/Stepper/index.d.ts +2 -2
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +1 -1
- package/lib/typescript/module/components/Switch/Switch.d.ts +1 -3
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +6 -19
- package/lib/typescript/module/components/TimePicker/index.d.ts +2 -2
- package/lib/typescript/module/components/Toast/Toast.d.ts +2 -7
- package/lib/typescript/module/components/Toast/ToastProvider.d.ts +3 -2
- package/lib/typescript/module/components/Toast/index.d.ts +2 -2
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +3 -10
- package/lib/typescript/module/components/Tooltip/index.d.ts +2 -2
- package/lib/typescript/module/components/Tour/Tour.d.ts +2 -9
- package/lib/typescript/module/components/Tour/index.d.ts +2 -2
- package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +2 -5
- package/lib/typescript/module/components/TypingIndicator/index.d.ts +2 -2
- package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +2 -15
- package/lib/typescript/module/components/WheelPicker/index.d.ts +2 -2
- package/lib/typescript/module/components/index.d.ts +129 -129
- package/lib/typescript/module/form/HookFormField.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/navigation/DiscardGuard.d.ts +2 -8
- package/lib/typescript/module/navigation/index.d.ts +2 -2
- package/lib/typescript/module/text/index.d.ts +8 -0
- package/lib/typescript/module/text/phone/amountSlider.g.d.ts +10 -0
- package/lib/typescript/module/text/phone/asyncBlock.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/authedImage.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/autocomplete.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/avatar.g.d.ts +13 -0
- package/lib/typescript/module/text/phone/badge.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/banner.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/bar.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/barChart.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/bottomNavigation.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/bottomSheet.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/button.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/calendar.g.d.ts +12 -0
- package/lib/typescript/module/text/phone/card.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/carousel.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/catalogue.g.d.ts +153 -0
- package/lib/typescript/module/text/phone/chip.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/composer.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/confirm.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/datePicker.g.d.ts +18 -0
- package/lib/typescript/module/text/phone/dateRangePicker.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/dateSeparator.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/decimalInput.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/discardGuard.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/drawer.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/errorBoundary.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/filePicker.g.d.ts +20 -0
- package/lib/typescript/module/text/phone/floatingActionButton.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/forceUpdateDialog.g.d.ts +9 -0
- package/lib/typescript/module/text/phone/formField.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/imageGallery.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/index.g.d.ts +76 -0
- package/lib/typescript/module/text/phone/inlineSelect.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/input.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/keyboardToolbar.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/loaderOverlay.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/lockOverlay.g.d.ts +10 -0
- package/lib/typescript/module/text/phone/menu.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/messageBubble.g.d.ts +14 -0
- package/lib/typescript/module/text/phone/messageList.g.d.ts +11 -0
- package/lib/typescript/module/text/phone/modal.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/networkStatusBanner.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/nonModalBottomSheet.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/numberInput.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/onboardingPager.g.d.ts +9 -0
- package/lib/typescript/module/text/phone/optionSheet.g.d.ts +13 -0
- package/lib/typescript/module/text/phone/otpInput.g.d.ts +12 -0
- package/lib/typescript/module/text/phone/pagedListFooter.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/permissionPrompt.g.d.ts +21 -0
- package/lib/typescript/module/text/phone/phoneNumberInput.g.d.ts +12 -0
- package/lib/typescript/module/text/phone/pickerTrigger.g.d.ts +8 -0
- package/lib/typescript/module/text/phone/profileCompletion.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/profilePicker.g.d.ts +9 -0
- package/lib/typescript/module/text/phone/progressBar.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/rating.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/refreshControl.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/repeater.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/richTextEditor.g.d.ts +15 -0
- package/lib/typescript/module/text/phone/scannerOverlay.g.d.ts +16 -0
- package/lib/typescript/module/text/phone/searchBar.g.d.ts +17 -0
- package/lib/typescript/module/text/phone/sectionHeader.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/select.g.d.ts +9 -0
- package/lib/typescript/module/text/phone/signaturePad.g.d.ts +24 -0
- package/lib/typescript/module/text/phone/skeleton.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/slideToConfirm.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/slider.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/sliderField.g.d.ts +11 -0
- package/lib/typescript/module/text/phone/sortableList.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/sparkline.g.d.ts +6 -0
- package/lib/typescript/module/text/phone/spinner.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/stepper.g.d.ts +13 -0
- package/lib/typescript/module/text/phone/timePicker.g.d.ts +15 -0
- package/lib/typescript/module/text/phone/toast.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/tooltip.g.d.ts +7 -0
- package/lib/typescript/module/text/phone/tour.g.d.ts +9 -0
- package/lib/typescript/module/text/phone/typingIndicator.g.d.ts +5 -0
- package/lib/typescript/module/text/phone/wheelPicker.g.d.ts +15 -0
- package/lib/typescript/module/text/textStore.d.ts +20 -0
- package/lib/typescript/module/theme/tokens.generated.d.ts +1 -1
- package/lib/typescript/module/theme/types.d.ts +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{assertValidValue}from"../../utils/assertValidValue.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{MenuSurface}from"./MenuSurface.js";import{
|
|
1
|
+
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{useMobileUiText}from"../../text/index.js";import{MENU_TEXT}from"../../text/phone/menu.g.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{MenuSurface}from"./MenuSurface.js";import{menuActions,visibleGroups,visibleTopActions}from"./menuModel.js";import{webOnly}from"./webOnly.js";import{jsx as _jsx}from"react/jsx-runtime";export const useContextMenu=(e,t={})=>{const s=useMobileUiText("menu",MENU_TEXT),i=useRef(null),[n,o]=useState(!1),[a,r]=useState(!1),[l,c]=useState(null);assertValidValue("ContextMenu","unavailable",e?.unavailable,["hide","disable"]),assertValidValue("ContextMenu","presentation",e?.presentation,["auto","popover","sheet"]),assertValidValue("ContextMenu","placement",e?.placement,["top","bottom","auto"]);const u=e?.unavailable??"hide",p=e?.items,m=e?.topActions,b=useMemo(()=>p?visibleGroups(p,u):[],[p,u]),f=useMemo(()=>visibleTopActions(m,u),[m,u]),v=useMemo(()=>menuActions(b,f),[b,f]),M=b.length>0||f.length>0,d=useRef(e);d.current=e;const h=useRef(t);h.current=t;const x=useRef(v);x.current=v;const C=useCallback(e=>{e&&r(!0),o(e),d.current?.onOpenChange?.(e)},[]);useEffect(()=>{!M&&n&&C(!1)},[M,n,C]);const g=useCallback(()=>{i.current?.measureInWindow((e,t,s,i)=>{c({x:e,y:t,width:s,height:i}),C(!0)})},[C]),A=useCallback(()=>{const e=resolveHaptic(h.current.haptic,"longPress");e&&triggerHaptic(e),g()},[g]),j=useCallback(e=>{const t=x.current.find(t=>t.name===e.nativeEvent.actionName);if(!t)return void h.current.onAccessibilityAction?.(e);const s=resolveHaptic(h.current.haptic,"selection");s&&triggerHaptic(s),t.item.onPress?.()},[]),y=t.accessibilityActions,V=useMemo(()=>[...y??[],...v.map(e=>({name:e.name,label:e.label}))],[y,v]),T=useMemo(()=>M?{onLongPress:A,accessibilityActions:V,onAccessibilityAction:j,...webOnly({onContextMenu:e=>{e.preventDefault?.(),g()}})}:{},[M,A,V,j,g]),w=useCallback(()=>C(!1),[C]),S=useCallback(()=>i.current,[]);return{enabled:M,hostRef:i,hostProps:T,renderSurface:i=>e&&M&&a?_jsx(MenuSurface,{open:n,anchor:l,items:e.items,title:e.title,topActions:e.topActions,placement:e.placement??"bottom",presentation:e.presentation??"auto",unavailable:u,context:!0,preview:!1===e.preview?void 0:e.preview??i,onClose:w,restoreFocusTo:S,haptic:t.haptic,accessibilityLabel:e.accessibilityLabel,labels:{...s,...e.labels},testID:t.testID?`${t.testID}-context`:void 0}):null}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{markdownToPlainText}from"@webority/markdown-core";import{formatTime}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef}from"react";import{Platform,Pressable,StyleSheet,View}from"react-native";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{AppIcon}from"../AppIcon/index.js";import{Button}from"../Button/index.js";import{Markdown}from"../Markdown/index.js";import{useContextMenu}from"../Menu/useContextMenu.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{markdownToPlainText}from"@webority/markdown-core";import{formatTime}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef}from"react";import{Platform,Pressable,StyleSheet,View}from"react-native";import{fillText,useMobileUiText}from"../../text/index.js";import{MESSAGE_BUBBLE_TEXT}from"../../text/phone/messageBubble.g.js";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{AppIcon}from"../AppIcon/index.js";import{Button}from"../Button/index.js";import{Markdown}from"../Markdown/index.js";import{useContextMenu}from"../Menu/useContextMenu.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const replyLabel=(e,s)=>s?fillText(e.replyTo,{author:s}):e.reply,MAX_WIDTH="85%",STATUS_ICON=14,statusIcon=e=>{switch(e){case"sending":return"clock";case"sent":return"check";case"failed":return"alert-circle";default:return"check-check"}},statusColour=(e,s)=>{switch(s){case"read":return e.colors["info-text"];case"failed":return e.colors["danger-text"];default:return e.colors["text-subtle"]}};export const MessageBubble=({side:e,text:s,children:t,markdown:o,groupPosition:r="single",author:a,time:i,status:n,replyTo:l,streaming:c=!1,error:u,onRetry:d,actions:m,onCopy:b,onLongPress:p,footer:x,labels:f,haptic:h,style:y,testID:g})=>{assertValidValue("MessageBubble","side",e,["mine","theirs"]),assertValidValue("MessageBubble","groupPosition",r,["single","first","middle","last"]),assertValidValue("MessageBubble","status",n,["sending","sent","delivered","read","failed"]);const T=useTheme(),j=useMemo(()=>buildStyles(T),[T]),P=useMobileUiText("messageBubble",MESSAGE_BUBBLE_TEXT),M=useMemo(()=>f?{...P,...f}:P,[P,f]),B="mine"===e,_=!u&&(o??"theirs"===e),L="single"===r||"first"===r,S="single"===r||"last"===r,k=null==i?"":formatTime(i),w=("failed"===n||Boolean(u))&&Boolean(d),I=B?M.you:a??"",v=useMemo(()=>{const e=[];return b&&!m?.some(e=>"copy"===e.name)&&e.push({name:"copy",label:M.copy,onPress:()=>b(s)}),m&&e.push(...m),l?.onPress&&e.push({name:"openReply",label:replyLabel(M,l.author),onPress:l.onPress}),w&&d&&e.push({name:"retry",label:M.retry,onPress:d}),e},[m,b,s,l,w,d,M]),C=(m?.length??0)>0||Boolean(b),V=useMemo(()=>C?{items:v.map(({name:e,label:s,onPress:t})=>({key:e,label:s,onPress:t}))}:void 0,[C,v]),E=useContextMenu(V,{haptic:h,testID:g}),R=E.hostProps.onLongPress,A=!t||(m?.length??0)>0,$=n&&B?M[n]:"",D=useMemo(()=>_&&null==t?markdownToPlainText(s):s,[_,t,s]),H=[I,k,D,l?`${replyLabel(M,l.author)}: ${l.text}`:"",$].filter(Boolean).join(", "),z=useRef(c);useEffect(()=>{z.current&&!c&&!u&&s&&announce(I?`${I}, ${D}`:D),z.current=c},[c,u,s,D,I]);const O=useRef(u);useEffect(()=>{u&&u!==O.current&&announce(u,{polite:!1}),O.current=u},[u]);const U=useCallback(e=>{R?.(e),p?.()},[R,p]),W=useCallback(e=>{v.find(s=>s.name===e.nativeEvent.actionName)?.onPress()},[v]),X=T.radius.xl,q=T.radius.sm,F=B?{borderTopRightRadius:L?X:q,borderBottomRightRadius:S?X:q}:{borderTopLeftRadius:L?X:q,borderBottomLeftRadius:S?X:q},G=t??(_?_jsx(Markdown,{children:s}):_jsx(Text,{variant:"body",children:s})),N=l?_jsxs(Pressable,{onPress:l.onPress,disabled:!l.onPress,accessibilityRole:l.onPress?"button":void 0,accessibilityLabel:`${replyLabel(M,l.author)}: ${l.text}`,style:j.quote,children:[l.author?_jsx(Text,{variant:"caption",weight:"semibold",color:"link",numberOfLines:1,children:l.author}):null,_jsx(Text,{variant:"bodySmall",color:"secondary",numberOfLines:2,children:l.text})]}):null,J=[j.bubble,B?j.mine:j.theirs,F],K=A?{accessible:!0,accessibilityLabel:H,accessibilityState:{busy:c},"aria-busy":c,accessibilityActions:v.map(({name:e,label:s})=>({name:e,label:s})),onAccessibilityAction:W}:{accessible:!1},Q=C?_jsxs(Pressable,{ref:E.hostRef,...E.hostProps,onLongPress:U,delayLongPress:350,style:J,testID:g?`${g}-bubble`:void 0,...K,children:[N,G]}):_jsxs(View,{style:J,testID:g?`${g}-bubble`:void 0,...K,children:[N,G]}),Y=S&&(""!==k||B&&n);return _jsxs(View,{style:[j.root,B?j.rootMine:j.rootTheirs,{marginTop:L?T.space.sm:T.space.xxs},y],accessibilityState:{busy:c},"aria-busy":c,testID:g,children:[!B&&L&&a?_jsx(Text,{variant:"caption",color:"secondary",style:j.author,numberOfLines:1,importantForAccessibility:A?"no-hide-descendants":"auto",accessibilityElementsHidden:A,..."web"===Platform.OS?{"aria-hidden":!0}:null,children:a}):null,Q,E.renderSurface(),Y?_jsxs(View,{style:[j.meta,B?j.metaMine:null],importantForAccessibility:A?"no-hide-descendants":"auto",accessibilityElementsHidden:A,children:[k?_jsx(Text,{variant:"caption",color:"tertiary",children:k}):null,B&&n?_jsx(AppIcon,{name:statusIcon(n),size:14,color:statusColour(T,n),accessibilityLabel:M[n],testID:g?`${g}-status-${n}`:void 0}):null]}):null,u?_jsx(Text,{variant:"bodySmall",color:"danger",style:B?j.endText:null,children:u}):null,w?_jsx(Button,{label:M.retry,variant:"link",size:"sm",leftIcon:"refresh-cw",onPress:d,testID:g?`${g}-retry`:void 0}):null,x]})};const buildStyles=e=>StyleSheet.create({root:{maxWidth:"85%",gap:e.space.xs},rootMine:{alignSelf:"flex-end",alignItems:"flex-end"},rootTheirs:{alignSelf:"flex-start",alignItems:"flex-start"},author:{paddingHorizontal:e.space.md},bubble:{borderRadius:e.radius.xl,...smoothCorners,paddingHorizontal:e.space.md,paddingVertical:e.space.sm,gap:e.space.xs},mine:{backgroundColor:e.colors["primary-soft"]},theirs:{backgroundColor:e.colors["bg-subtle"]},quote:{borderLeftWidth:3,borderLeftColor:e.colors.primary,paddingLeft:e.space.sm,paddingVertical:e.space.xs},meta:{flexDirection:"row",alignItems:"center",gap:e.space.xs,paddingHorizontal:e.space.xs},metaMine:{justifyContent:"flex-end"},endText:{textAlign:"right"}});export default MessageBubble;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,MessageBubble}from"./MessageBubble.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{formatDate}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{FlatList,StyleSheet,View}from"react-native";import{KeyboardChatScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{smoothCorners}from"../../utils/corners.js";import{Badge}from"../Badge/index.js";import{DateSeparator,dayLabel}from"../DateSeparator/index.js";import{IconButton}from"../IconButton/index.js";import{Spinner}from"../Spinner/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{formatDate}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{FlatList,StyleSheet,View}from"react-native";import{KeyboardChatScrollView}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{pluralText,useMobileUiText}from"../../text/index.js";import{MESSAGE_LIST_TEXT}from"../../text/phone/messageList.g.js";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{smoothCorners}from"../../utils/corners.js";import{Badge}from"../Badge/index.js";import{DateSeparator,dayLabel}from"../DateSeparator/index.js";import{IconButton}from"../IconButton/index.js";import{Spinner}from"../Spinner/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const JUMP_AT=160,FOLLOW_AT=48,KEEP_POSITION={minIndexForVisible:0,autoscrollToTopThreshold:160},positionOf=(e,t)=>e?t?"middle":"last":t?"first":"single";export function MessageList({messages:e,keyExtractor:t,renderMessage:o,getAuthorKey:n,getDate:s,firstUnreadKey:r,onLoadOlder:i,loadingOlder:a=!1,hasOlder:l=!0,typing:u,empty:c,getAnnouncement:d,followNew:m,keyboardAware:p=!0,keyboardOffset:f,labels:x,now:b,onScroll:y,onContentSizeChange:g,contentContainerStyle:h,style:j,testID:S,...v}){const C=useTheme(),T=useSafeAreaInsets(),_=useReducedMotion(),w=useMemo(()=>buildStyles(C),[C]),E=useMobileUiText("messageList",MESSAGE_LIST_TEXT),L=useMemo(()=>({...E,...x}),[E,x]),I=f??T.bottom,O=useRef(null),k=useRef(!1),M=useRef(!0),V=useRef(0),[D,P]=useState(!1),[R,A]=useState(0),B=useMemo(()=>{const o=s?e.map(e=>formatDate(s(e))):null,i=n?e.map(n):null,a=void 0===r?-1:e.findIndex(e=>t(e)===r);return e.map((t,n)=>{const r=n===e.length-1,l=null!==o&&(r||o[n]!==o[n+1]),u=null!==i&&!r&&i[n+1]===i[n]&&!l&&n!==a,c=null!==i&&n>0&&i[n-1]===i[n]&&(null===o||o[n-1]===o[n])&&n-1!==a;return{groupPosition:positionOf(u,c),day:l&&s?dayLabel(s(t),{now:b,labels:L}):null,unread:n===a}})},[e,s,n,r,t,b,L]),F=useCallback(()=>{M.current=!0,O.current?.scrollToOffset({offset:0,animated:!_}),A(0)},[_]),K=e[0],z=void 0===K?null:t(K),U=useRef(z);useEffect(()=>{const o=U.current;if(U.current=z,null===o||null===z||o===z)return;const n=e.findIndex(e=>t(e)===o);if(-1===n)return void A(0);const s=e.slice(0,n).reverse();for(const e of s){const t=d?.(e);t&&announce(t)}m&&s.some(m)?F():k.current&&A(e=>e+s.length)},[z,e,t,d,m,F]);const G=useCallback(e=>{M.current=e.nativeEvent.contentOffset.y<=48;const t=e.nativeEvent.contentOffset.y>160;t!==k.current&&(k.current=t,P(t),t||A(0)),y?.(e)},[y]),H=useCallback((e,t)=>{const o=t>V.current;V.current=t,o&&M.current&&O.current?.scrollToOffset({offset:0,animated:!1}),g?.(e,t)},[g]),N=useCallback(()=>{l&&!a&&i?.()},[l,a,i]),$=useCallback(({item:e,index:t})=>{const n=B[t];return _jsxs(View,{children:[n?.day?_jsx(DateSeparator,{label:n.day}):null,n?.unread?_jsx(DateSeparator,{label:L.unread,emphasis:!0}):null,o({item:e,index:t,groupPosition:n?.groupPosition??"single"})]})},[B,L.unread,o]),X=useCallback(e=>t(e),[t]),J=useCallback(e=>_jsx(KeyboardChatScrollView,{...e,inverted:!0,offset:I}),[I]),W=R>0?`${pluralText(L,"newMessages",R)}. ${L.jumpToLatest}`:L.jumpToLatest;return _jsxs(View,{style:[w.root,j],children:[_jsx(FlatList,{keyboardShouldPersistTaps:"handled",maintainVisibleContentPosition:KEEP_POSITION,...v,ref:O,data:e,renderItem:$,keyExtractor:X,inverted:!0,onScroll:G,onContentSizeChange:H,onEndReached:i?N:void 0,ListHeaderComponent:u?_jsx(View,{children:u}):void 0,ListFooterComponent:a?_jsx(Spinner,{size:"sm",accessibilityLabel:L.loadingOlder,style:w.older}):void 0,ListEmptyComponent:c?_jsx(View,{style:w.fill,children:c}):void 0,renderScrollComponent:p?J:void 0,contentContainerStyle:[w.content,0===e.length?w.grow:null,h],testID:S}),D?_jsxs(View,{style:w.jump,pointerEvents:"box-none",children:[_jsx(View,{style:w.jumpDisc,children:_jsx(IconButton,{icon:"arrow-down",accessibilityLabel:W,variant:"ghost",tone:"neutral",onPress:F,testID:S?`${S}-jump`:void 0})}),R>0?_jsx(View,{style:w.count,pointerEvents:"none",importantForAccessibility:"no-hide-descendants",accessibilityElementsHidden:!0,children:_jsx(Badge,{value:R,max:99,tone:"primary",size:"sm"})}):null]}):null]})}const buildStyles=e=>StyleSheet.create({root:{flex:1},content:{paddingHorizontal:e.space.md,paddingVertical:e.space.sm},grow:{flexGrow:1},fill:{flex:1},older:{paddingVertical:e.space.md},jump:{position:"absolute",right:e.space.md,bottom:e.space.md},jumpDisc:{borderRadius:e.radius.pill,...smoothCorners,backgroundColor:e.colors.surface,...e.shadow.elevated},count:{position:"absolute",top:-e.space.xs,right:-e.space.xs}});export default MessageList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,MessageList}from"./MessageList.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Animated,Dimensions,Easing,Keyboard,Platform,Pressable,Modal as RNModal,StyleSheet,useWindowDimensions,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{transparentOf,withAlpha}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{computePlacement,placementMaxHeight,placementRoom}from"../../utils/placement.js";import{squircleHostRadius}from"../../utils/squircle.js";import{ModalSafeArea,useModalInsets}from"../ModalSafeArea/ModalSafeArea.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{ToastHost}from"../Toast/ToastProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Animated,Dimensions,Easing,Keyboard,Platform,Pressable,Modal as RNModal,StyleSheet,useWindowDimensions,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{useMobileUiText}from"../../text/index.js";import{MODAL_TEXT}from"../../text/phone/modal.g.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{transparentOf,withAlpha}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{computePlacement,placementMaxHeight,placementRoom}from"../../utils/placement.js";import{squircleHostRadius}from"../../utils/squircle.js";import{ModalSafeArea,useModalInsets}from"../ModalSafeArea/ModalSafeArea.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{ToastHost}from"../Toast/ToastProvider.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const MODAL_PRESENTATIONS=["centered","bottom","fullScreen","anchored"];export const MODAL_DISMISS_GRACE_MS=300;const SCALE_START_VALUE=.9,Modal=forwardRef((e,t)=>{assertValidValue("Modal","presentation",e.presentation,MODAL_PRESENTATIONS);const{open:o,onClose:r,presentation:i="centered",backdropOpacity:s,backdropPressClose:n=!0,animationDuration:a,animateMount:l=!0,accessibilityLabel:c,hardwareBackPress:u=!0,children:d,contentStyle:m,backdropStyle:p,restoreFocusRef:f,onDismissed:h,haptic:g,labels:b,anchor:v,placement:S="auto",align:x="center",testID:y,bare:A=!1,onInsetsChange:M}=e,w=useTheme(),C=useMobileUiText("modal",MODAL_TEXT),D=useMemo(()=>({...C,...b}),[C,b]),R=usePresenceMotion(),[V,T]=useModalInsets();useEffect(()=>{M?.(V)},[V,M]);const{width:j,height:E}=useWindowDimensions(),[_,I]=useState({width:0,height:0}),N=a??R.duration("default"),k=Dimensions.get("window").height,H=useRef(!l&&o),P=H.current,L=useRef(createAnimatedValue(P?1:.9)).current,O=useRef(createAnimatedValue(P?1:0)).current,W=useRef(createAnimatedValue(P?0:k)).current,q=useRef(createAnimatedValue(P?1:0)).current,z=useRef(null),F=useRef(!1),[B,U]=useState(o),K=useMemo(()=>buildStyles(w),[w]),X=useMemo(()=>{if("anchored"!==i||void 0===v)return null;const e={width:j,height:E,insets:{top:V.top,bottom:V.bottom,left:0,right:0}},t=computePlacement(v,_,e,S,{align:x});return{...t,maxHeight:placementMaxHeight(t.placement,placementRoom(v,e))}},[i,v,_,S,x,j,E,V.top,V.bottom]),G=useMemo(()=>{const e=w.colors.scrim;return"number"!=typeof s?"anchored"===i?transparentOf(e):e:withAlpha(e,s)??e},[w.colors.scrim,s,i]),Y=useMemo(()=>q.interpolate({inputRange:[0,1],outputRange:[transparentOf(G),G]}),[q,G]);useEffect(()=>{o&&(Keyboard.dismiss(),U(!0))},[o]),useEffect(()=>{const e=[];if(o&&B&&H.current)H.current=!1;else if(o&&B){const t=Animated.timing(q,{toValue:1,duration:R.duration("default"),useNativeDriver:!1});if(t.start(),e.push(t),R.reduced||"anchored"===i){O.setValue(0),W.setValue(0),L.setValue(1);const t=Animated.timing(O,{toValue:1,duration:N,useNativeDriver:nativeDriver});t.start(),e.push(t)}else if("bottom"===i){O.setValue(1);const t=Animated.spring(W,{toValue:0,damping:w.motion.spring.gentle.damping,stiffness:w.motion.spring.gentle.stiffness,mass:w.motion.spring.gentle.mass,useNativeDriver:nativeDriver});t.start(),e.push(t)}else{const t=Animated.parallel([Animated.spring(L,{toValue:1,damping:w.motion.spring.gentle.damping,stiffness:w.motion.spring.gentle.stiffness,mass:w.motion.spring.gentle.mass,useNativeDriver:nativeDriver}),Animated.timing(O,{toValue:1,duration:N,useNativeDriver:nativeDriver})]);t.start(),e.push(t)}}else if(B){const t=R.duration("fast"),o=Easing.bezier(...w.motion.ease.accelerate),r=Animated.timing(O,{toValue:0,duration:t,easing:o,useNativeDriver:nativeDriver}),s=R.reduced||"anchored"===i?r:"bottom"===i?Animated.timing(W,{toValue:k,duration:t,easing:o,useNativeDriver:nativeDriver}):Animated.parallel([Animated.timing(L,{toValue:.9,duration:t,easing:o,useNativeDriver:nativeDriver}),r]),n=Animated.parallel([s,Animated.timing(q,{toValue:0,duration:R.duration("default"),useNativeDriver:!1})]);n.start(({finished:e})=>{e&&(W.setValue(k),U(!1))}),e.push(n)}return()=>e.forEach(e=>{e.stop()})},[o,B,i,N,L,O,q,W,k,w.motion.spring.gentle.damping,w.motion.spring.gentle.stiffness,w.motion.spring.gentle.mass,R,w.motion.ease.accelerate]),useEffect(()=>{if("web"===Platform.OS)return;let e,t;return o?(e=setTimeout(()=>{z.current&&AccessibilityInfo.sendAccessibilityEvent(z.current,"focus")},150),F.current=!0):F.current&&(F.current=!1,f?.current&&(t=setTimeout(()=>{const e=f.current;e&&AccessibilityInfo.sendAccessibilityEvent(e,"focus")},N))),()=>{e&&clearTimeout(e),t&&clearTimeout(t)}},[o,N,f]);const $=useRef(h);$.current=h;const J=useRef(!1);useEffect(()=>{if(o)return void(J.current=!0);if(!J.current)return;J.current=!1;const e=setTimeout(()=>$.current?.(),300);return()=>clearTimeout(e)},[o]);const Q=useCallback(()=>{if(!n)return;const e=resolveHaptic(g,"selection");e&&triggerHaptic(e),r()},[n,r,g]),Z=useCallback(()=>{u&&r()},[u,r]),ee=useSquircle(!A&&"bottom"!==i&&"fullScreen"!==i&&"anchored"!==i,w.radius.xl),te=useCallback(e=>{ee.onLayout(e);const{width:t,height:o}=e.nativeEvent.layout;I(e=>e.width===t&&e.height===o?e:{width:t,height:o})},[ee.onLayout]),oe=useMemo(()=>A?"bottom"===i?K.bottomContent:"fullScreen"===i?K.fullScreenContent:K.bareCentredContent:"anchored"===i?[K.anchoredContent,{left:X?.x,top:X?.y,maxHeight:X?.maxHeight,backgroundColor:w.colors.surface,borderRadius:w.radius.lg,...smoothCorners},w.shadow.modal]:"fullScreen"===i?[K.fullScreenContent,{backgroundColor:w.colors.surface}]:"bottom"===i?[K.bottomContent,{backgroundColor:w.colors.surface,borderTopLeftRadius:w.radius.xl,borderTopRightRadius:w.radius.xl,...smoothCorners,paddingTop:w.space.lg,paddingHorizontal:w.space.lg,paddingBottom:w.space.lg+V.bottom},w.shadow.modal]:[K.centeredContent,{backgroundColor:w.colors.surface,borderRadius:ee.active&&ee.size?squircleHostRadius(ee.size.width,ee.size.height,w.radius.xl):w.radius.xl,...smoothCorners,padding:w.space.xl},w.shadow.modal],[i,w,K,V.bottom,ee.active,ee.size,X,A]),re=useMemo(()=>"anchored"===i?K.anchoredWrapper:"bottom"===i?K.bottomWrapper:"fullScreen"===i?K.fullScreenWrapper:K.centeredWrapper,[i,K]),ie=useMemo(()=>"bottom"===i?{opacity:O,transform:[{translateY:W}]}:"fullScreen"===i||"anchored"===i?{opacity:O}:{opacity:O,transform:[{scale:L}]},[i,L,O,W]);if("anchored"===i&&void 0===v)throw new Error('[@webority/mobile-ui] Modal: presentation "anchored" needs an anchor.');if(A&&"anchored"===i)throw new Error('[@webority/mobile-ui] Modal: presentation "anchored" bare does not combine with presentation anchored.');return _jsx(RNModal,{visible:B,transparent:!0,statusBarTranslucent:!0,navigationBarTranslucent:!0,animationType:"none",onRequestClose:Z,testID:y,children:_jsx(View,{ref:e=>{z.current=e,"function"==typeof t?t(e):t&&(t.current=e)},style:K.root,accessible:!1,accessibilityViewIsModal:!0,accessibilityRole:"alert",accessibilityLabel:c,children:_jsxs(ModalSafeArea,{onInsets:T,children:[_jsxs(Animated.View,{collapsable:!1,style:[StyleSheet.absoluteFill,re,{backgroundColor:Y},p],children:[_jsx(Pressable,{style:StyleSheet.absoluteFill,onPress:Q,accessibilityRole:n?"button":void 0,accessibilityLabel:n?D.close:void 0,accessible:!!n&&void 0,importantForAccessibility:n?void 0:"no",disabled:!n,testID:y?`${y}-backdrop`:void 0}),_jsxs(Animated.View,{style:[oe,ie,_.height>0||"anchored"!==i?null:K.unmeasured,m],onLayout:te,pointerEvents:A&&"fullScreen"===i?"box-none":"auto",needsOffscreenAlphaCompositing:!0,children:[ee.active&&ee.size?_jsx(SquircleFill,{width:ee.size.width,height:ee.size.height,radius:w.radius.xl,fill:w.colors.surface}):null,d]})]}),_jsx(ToastHost,{})]})})})});Modal.displayName="Modal";const buildStyles=e=>StyleSheet.create({root:{flex:1},centeredWrapper:{flex:1,alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},centeredContent:{maxWidth:"90%",width:"90%"},bottomWrapper:{flex:1,justifyContent:"flex-end"},bottomContent:{width:"100%"},fullScreenWrapper:{flex:1},fullScreenContent:{flex:1},anchoredWrapper:{flex:1},anchoredContent:{position:"absolute"},unmeasured:{opacity:0},bareCentredContent:{alignSelf:"center"}});export{Modal};export default Modal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,MODAL_DISMISS_GRACE_MS,Modal}from"./Modal.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useEffectEvent,useMemo,useRef,useState}from"react";import{Dimensions,ScrollView,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{PRESENCE_REDUCE_MOTION,usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{smoothCorners}from"../../utils/corners.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useCallback,useEffect,useEffectEvent,useMemo,useRef,useState}from"react";import{Dimensions,ScrollView,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{PRESENCE_REDUCE_MOTION,usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{fillText,useMobileUiText}from"../../text/index.js";import{NON_MODAL_BOTTOM_SHEET_TEXT}from"../../text/phone/nonModalBottomSheet.g.js";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{smoothCorners}from"../../utils/corners.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const ERROR_PREFIX="[@webority/mobile-ui] NonModalBottomSheet: ",SPRING_CONFIG={damping:20,stiffness:240,mass:1},CLOSE_VELOCITY_THRESHOLD=1e3,DRAG_ACTIVATION_OFFSET=10,OVERSHOOT_TO_CLOSE=80,PERCENT_PATTERN=/^(\d+(?:\.\d+)?|\.\d+)%$/,parsePercent=e=>{if("string"!=typeof e)return;const t=PERCENT_PATTERN.exec(e);if(!t)return;const o=Number(t[1]);return o>0&&o<=100?o:void 0},isValidSnapPoint=e=>"number"==typeof e?Number.isFinite(e)&&e>0:void 0!==parsePercent(e),validateProps=(e,t)=>{if(0===e.length)throw new Error(`${ERROR_PREFIX}snapPoints needs at least one snap point.`);for(const t of e)if(!isValidSnapPoint(t))throw new Error(`${ERROR_PREFIX}snap point ${String(t)} is not a positive number or a percentage up to 100%.`);if(null!=t&&(!Number.isInteger(t)||t<0||t>=e.length))throw new Error(`${ERROR_PREFIX}snapIndex ${t} is outside the snap points.`)},resolveNonModalSnapPoints=(e,t)=>e.map(e=>"number"==typeof e?e:parseFloat(e)/100*t).sort((e,t)=>e-t),topAt=(e,t,o)=>{const n=e[o];if(void 0===n)throw new Error(`${ERROR_PREFIX}snap index ${o} has no snap point.`);return Math.max(0,t-n)},NonModalBottomSheet=e=>{const{open:t,onClose:o,snapPoints:n,snapIndex:s,onSnapChange:i,enablePanDownToClose:r=!0,scrollable:a=!1,title:l,header:c,footer:u,labels:d,handleIndicatorStyle:h,sheetStyle:m,children:p,accessibilityLabel:f,testID:E}=e;validateProps(n,s);const b=useMobileUiText("nonModalBottomSheet",NON_MODAL_BOTTOM_SHEET_TEXT),v=useMemo(()=>({...b,...d}),[b,d]),S=useTheme(),R=usePresenceMotion(),x=R.reduced,g=useMemo(()=>buildStyles(S),[S]),[T,w]=useState(()=>Dimensions.get("window").height),_=useCallback(e=>{const t=e.nativeEvent.layout.height;t>0&&w(t)},[]),N=useMemo(()=>resolveNonModalSnapPoints(n,T),[n,T]),y=N[N.length-1]??0,M=T,O=Math.max(0,T-y),C=useCallback(e=>topAt(N,T,e),[N,T]),[P,I]=useState(!1),[j,A]=useState(-1),V=useRef(-1),k=useRef(o);k.current=o;const D=useRef(i);D.current=i;const F=useSharedValue(M),B=useSharedValue(M),G=useCallback(()=>{V.current<0&&I(!1)},[]),L=useCallback(()=>{if(V.current=-1,A(-1),x)return F.value=M,void G();F.value=withTiming(M,{duration:R.duration("fast"),easing:Easing.bezier(...S.motion.ease.accelerate),reduceMotion:PRESENCE_REDUCE_MOTION},e=>{"worklet";e&&scheduleOnRN(G)})},[M,R,x,S.motion.ease.accelerate,F,G]),$=useCallback(e=>{const t=C(e);F.value=x?t:withSpring(t,SPRING_CONFIG)},[x,C,F]),H=useCallback((e,t)=>{e!==V.current&&(V.current=e,A(e),$(e),t&&D.current?.(e))},[$]),X=useEffectEvent(e=>{if(!e)return void(V.current>=0&&L());const t=s??0;I(!0);const o=C(t);x?F.value=o:(F.value=M,F.value=withSpring(o,SPRING_CONFIG)),V.current=t,A(t)});useEffect(()=>{X(t)},[t]);const U=useEffectEvent(e=>{t&&P&&e!==V.current&&H(e,!1)});useEffect(()=>{null!=s&&U(s)},[s]);const Y=useEffectEvent(e=>{const t=V.current;t>=0&&(F.value=topAt(N,e,t))});useEffect(()=>{Y(T)},[T]);const z=useCallback(e=>{if(e<0)return triggerHaptic("selection"),L(),void k.current();e!==V.current?H(e,!0):$(e)},[H,$,L]),q=useCallback(e=>{const t=V.current;t<0||H(Math.min(Math.max(t+e,0),N.length-1),!0)},[H,N.length]),J=useMemo(()=>N.map(e=>T-e),[N,T]),K=useMemo(()=>{const e=J,t=O,o=r;return{testID:E?`${E}-pan-gesture`:"non-modal-bottom-sheet-pan-gesture",activeOffsetY:[-10,10],onActivate:()=>{"worklet";B.value=F.value},onUpdate:e=>{"worklet";const o=B.value+e.translationY;F.value=o<t?t+.25*(o-t):o},onDeactivate:t=>{"worklet";const n=F.value,s=e[0];if(void 0===s)return;if(t.velocityY>1e3)return void scheduleOnRN(z,o?-1:0);if(o&&n-s>80)return void scheduleOnRN(z,-1);let i=0,r=1/0,a=0;for(const t of e){const e=Math.abs(n-t);e<r&&(r=e,i=a),a++}scheduleOnRN(z,i)}}},[B,r,z,O,J,E,F]),Q=usePanGesture(K),W=useAnimatedStyle(()=>({top:Math.max(F.value,O)}),[O]),Z=useAnimatedStyle(()=>{const e=Math.max(F.value,O),t=T-e;return{height:Math.max(0,Math.min(t,y))}},[T,y,O]);return P?_jsx(View,{collapsable:!1,style:StyleSheet.absoluteFill,pointerEvents:"box-none",onLayout:_,testID:E,children:_jsx(Animated.View,{accessibilityLabel:f,testID:E?`${E}-sheet`:void 0,style:[g.sheet,{height:y,backgroundColor:S.colors.surface,borderTopLeftRadius:S.radius.xl,borderTopRightRadius:S.radius.xl,...smoothCorners,...S.shadow.modal},m,W],children:_jsxs(Animated.View,{style:[g.body,Z],children:[_jsx(GestureDetector,{gesture:Q,children:_jsx(View,{style:g.handleRow,accessible:!0,accessibilityRole:"adjustable",accessibilityLabel:v.dragHandle,accessibilityHint:v.swipeHintText,accessibilityValue:{text:fillText(v.snapPointText,{position:j+1,total:N.length})},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:e=>{"increment"===e.nativeEvent.actionName?q(1):"decrement"===e.nativeEvent.actionName&&q(-1)},testID:E?`${E}-handle`:void 0,children:_jsx(View,{style:[g.handle,{backgroundColor:S.colors.border},h]})})}),null!=l?_jsx(Text,{variant:"title",accessibilityRole:"header",children:l}):null,c,a?_jsx(ScrollView,{style:g.scrollContent,children:p}):_jsx(View,{style:g.content,children:p}),u]})})}):null};NonModalBottomSheet.displayName="NonModalBottomSheet";const buildStyles=e=>StyleSheet.create({sheet:{position:"absolute",left:0,right:0,overflow:"hidden"},body:{overflow:"hidden"},handleRow:{alignItems:"center",justifyContent:"center",alignSelf:"stretch",paddingTop:e.space.md,paddingBottom:e.space.xl},handle:{width:36,height:4,borderRadius:e.radius.pill,...smoothCorners},content:{flex:1,overflow:"hidden"},scrollContent:{flex:1}});export{NonModalBottomSheet};export default NonModalBottomSheet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,NonModalBottomSheet}from"./NonModalBottomSheet.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import React,{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const NUMBER_INPUT_SIZES=["sm","md","lg"],NUMBER_INPUT_VARIANTS=["inline","horizontal"]
|
|
1
|
+
"use strict";import React,{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{useMobileUiText}from"../../text/index.js";import{NUMBER_INPUT_TEXT}from"../../text/phone/numberInput.g.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const NUMBER_INPUT_SIZES=["sm","md","lg"],NUMBER_INPUT_VARIANTS=["inline","horizontal"],DEFAULT_LONG_PRESS_DELAY=500,DEFAULT_LONG_PRESS_INTERVAL=80,roundToPrecision=(e,t)=>{if(!Number.isFinite(e))return 0;if(t<=0)return Math.round(e);const i=10**t;return Math.round(e*i)/i},clamp=(e,t,i)=>e<t?t:e>i?i:e,formatValue=(e,t,i)=>Number.isFinite(e)?t&&i>0?e.toFixed(i):String(Math.trunc(e)):"",sanitizeTyped=(e,t)=>{if(!e)return"";let i=e.replace(/[^0-9.-]/g,"");if(i=i.replace(/(?!^)-/g,""),t){const e=i.indexOf(".");-1!==e&&(i=i.slice(0,e+1)+i.slice(e+1).replace(/\./g,""))}else i=i.replace(/\./g,"");return i},NumberInput=forwardRef((e,t)=>{const{value:i,defaultValue:s,onChange:l,min:r=Number.NEGATIVE_INFINITY,max:a=Number.POSITIVE_INFINITY,step:n=1,allowDecimal:o=!1,precision:c=0,label:u,help:d,helperText:m,error:b,disabled:p=!1,size:f="md",variant:x="inline",unit:h,haptic:T,labels:y,accessibilityLabel:S,style:g,inputStyle:I,buttonStyle:N,unitStyle:_,labelStyle:F,textInputProps:j,testID:V}=e;assertValidValue("NumberInput","size",e.size,NUMBER_INPUT_SIZES),assertValidValue("NumberInput","variant",e.variant,NUMBER_INPUT_VARIANTS);const v=useMobileUiText("numberInput",NUMBER_INPUT_TEXT),R=useMemo(()=>({...v,...y}),[v,y]),[C,E]=useControllableState({value:i,defaultValue:s??e.min??0,onChange:l}),P=useTheme(),z=resolveFieldSize(P,f),w=resolveFieldTextStyle(P,{disabled:p}),M=useMemo(()=>buildStyles(P),[P]),L=useRef(null),[U,k]=useState(formatValue(C,o,c)),[A,B]=useState(!1),[D,H]=useState(!1),O=useCallback(()=>{p||L.current?.focus()},[p]),G=useRef(null),W=useRef(null),Y=useCallback(()=>{null!==G.current&&(clearTimeout(G.current),G.current=null),null!==W.current&&(clearInterval(W.current),W.current=null)},[]);useEffect(()=>Y,[Y]),useEffect(()=>{A||k(formatValue(C,o,c))},[C,o,c,A]);const $=C<=r,X=C>=a,Z=!p,q=useCallback(e=>{const t=roundToPrecision(e,o?c:0),i=clamp(t,r,a);i!==C&&E(i)},[o,a,r,E,c,C]),J=useCallback(()=>{if(!Z||$)return;const e=resolveHaptic(T,"selection");e&&triggerHaptic(e),q(C-n)},[$,Z,T,q,n,C]),K=useCallback(()=>{if(!Z||X)return;const e=resolveHaptic(T,"selection");e&&triggerHaptic(e),q(C+n)},[X,Z,T,q,n,C]);React.useImperativeHandle(t,()=>({focus:()=>L.current?.focus(),blur:()=>L.current?.blur(),clear:()=>{k(""),Number.isFinite(r)&&r>0?E(r):E(0<r?r:Math.min(a,0))}}),[a,r,E]);const Q=useCallback(e=>{Z&&(Y(),G.current=setTimeout(()=>{W.current=setInterval(()=>{"inc"===e?K():J()},80)},500))},[Y,J,K,Z]),ee=useCallback(e=>{const t=sanitizeTyped(e,o);k(t);const i=Number(t);""!==t&&"-"!==t&&"."!==t&&Number.isFinite(i)&&i>=r&&i<=a&&i!==C&&E(roundToPrecision(i,o?c:0))},[o,a,r,E,c,C]),te=useCallback(()=>{B(!1),H(!1);const e=Number(U);if(""===U||!Number.isFinite(e))return void k(formatValue(C,o,c));const t=roundToPrecision(e,o?c:0),i=clamp(t,r,a);i!==C&&E(i),k(formatValue(i,o,c))},[o,U,a,r,E,c,C]),ie=useCallback(()=>{B(!0),H(!0)},[]),se=$||p?P.colors["text-disabled"]:P.colors["text-body"],le=X||p?P.colors["text-disabled"]:P.colors["text-body"],re=z.icon+8,renderStepper=(e,t,i,s,l,r)=>_jsx(Pressable,{onPress:t,onLongPress:()=>Q(e),onPressOut:Y,delayLongPress:500,disabled:i,accessibilityRole:"button",accessibilityLabel:s,accessibilityState:{disabled:i},"aria-disabled":i,style:({pressed:e})=>[{width:re,height:re,alignItems:"center",justifyContent:"center",borderRadius:P.radius.pill,...smoothCorners},e&&!i?{backgroundColor:P.colors["surface-pressed"]}:null,N],testID:`${V??"numberinput"}-${"inc"===e?"plus":"minus"}`,children:_jsx(Text,{variant:"body",weight:"semibold",style:{fontSize:z.icon,color:l,fontWeight:P.weight.semibold,lineHeight:z.icon+2},children:r})}),ae=S??fieldTextAsString(u)??R.input,ne=!0===b||hasFieldText(b),oe=_jsx(FieldBase,{testID:V?`${V}-field`:void 0,size:f,disabled:p,error:ne,filled:!0,focused:D,onPress:O,pressFeedback:!1,leading:renderStepper("dec",J,$||p,R.decrease,se,"−"),trailing:renderStepper("inc",K,X||p,R.increase,le,"+"),children:_jsxs(View,{style:M.inputRow,children:[_jsx(TextInput,{ref:L,value:U,onChangeText:ee,onFocus:ie,onBlur:te,editable:!p,keyboardType:o?"decimal-pad":"number-pad",selectTextOnFocus:!0,accessibilityRole:"adjustable",accessibilityLabel:ae,accessibilityValue:{now:Number.isFinite(C)?C:0},accessibilityState:{disabled:p},"aria-disabled":p,accessibilityActions:[{name:"increment",label:R.increase},{name:"decrement",label:R.decrease}],onAccessibilityAction:e=>{"increment"===e.nativeEvent.actionName&&K(),"decrement"===e.nativeEvent.actionName&&J()},style:[M.input,{fontSize:z.text,color:w.color,...w.weightStyle},I],...j}),h?_jsx(Text,{variant:"bodySmall",style:[M.unit,{fontSize:z.text,color:w.placeholderColor},_],children:h}):null]})}),ce=hasFieldText(u)?_jsx(FieldLabel,{size:f,help:d,style:F,children:u}):null,ue=_jsx(FieldMessage,{size:f,error:ne,text:ne?b:m});return _jsxs(View,"horizontal"===x?{style:[M.horizontalContainer,g],testID:V,accessibilityState:{disabled:p},"aria-disabled":p,children:[_jsx(View,{style:M.horizontalLabelWrap,children:ce}),_jsxs(View,{children:[oe,ue]})]}:{style:[g],testID:V,accessibilityState:{disabled:p},"aria-disabled":p,children:[ce,oe,ue]})});NumberInput.displayName="NumberInput";const buildStyles=e=>StyleSheet.create({inputRow:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center"},input:{flex:1,textAlign:"center",padding:e.space.none,margin:e.space.none,includeFontPadding:!1},unit:{marginLeft:e.space.xs},label:{marginBottom:e.space.xs},helper:{marginTop:e.space.xs},horizontalContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},horizontalLabelWrap:{flexShrink:1,paddingRight:e.space.md}});export{NumberInput};export default NumberInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,NumberInput}from"./NumberInput.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState,useReducedMotion}from"../../hooks/index.js";import{createAnimatedValue,fontFor,resolveOtpInputSize,setNativeValue,useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{FieldBase,FieldMessage,hasFieldText}from"../FieldBase/FieldBase.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{forwardRef,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState,useReducedMotion}from"../../hooks/index.js";import{fillText,useMobileUiText}from"../../text/index.js";import{OTP_INPUT_TEXT}from"../../text/phone/otpInput.g.js";import{createAnimatedValue,fontFor,resolveOtpInputSize,setNativeValue,useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{FieldBase,FieldMessage,hasFieldText}from"../FieldBase/FieldBase.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const cellAt=(e,t)=>{const i=e[t];if(void 0===i)throw new Error(`OTP cell ${t} is outside the ${e.length} cells.`);return i},sanitizeChar=(e,t)=>e?"number-pad"===t?e.replace(/\D/g,""):e:"",OTPInput=forwardRef((e,t)=>{const{value:i,defaultValue:n,onChange:s,onComplete:r,length:a=6,keyboardType:o="number-pad",autoFocus:l=!1,autoFocusDelay:u=0,disabled:c=!1,error:d,size:m="md",secure:p=!1,haptic:f,labels:g,onFocus:h,accessibilityLabel:b,style:x,cellStyle:y,textStyle:v,testID:T}=e;assertValidValue("OTPInput","size",e.size,["sm","md","lg"]),assertValidValue("OTPInput","keyboardType",e.keyboardType,["number-pad","default"]);const j=useMobileUiText("otpInput",OTP_INPUT_TEXT),V=useMemo(()=>({...j,...g}),[j,g]),[C,k]=useControllableState({value:i,defaultValue:n??"",onChange:s}),A=useTheme(),I=useMemo(()=>buildStyles(A),[A]),w=resolveOtpInputSize(A,m),E=A.components["otp-input"][m].radius,S=useRef([]),[M,D]=useState(-1),[F,O]=useState(0),P=useRef(null),_=useRef(createAnimatedValue(0)).current,R=useRef(new Map),z=useMemo(()=>{const e=R.current,t=[];for(let i=0;i<a;i+=1){let n=e.get(i);n||(n=new Animated.Value(0),e.set(i,n)),t.push(n)}for(const t of Array.from(e.keys()))t>=a&&e.delete(t);return t},[a]),N=useRef(-1),H=A.settings.components["otp-input"]?.shakeOnError??!1,B=useReducedMotion(),L=!0===d||hasFieldText(d);useEffect(()=>{let e;return null===P.current||!L||P.current||(f&&triggerHaptic("notificationError"),H&&!B&&(setNativeValue(_,0),e=Animated.sequence([Animated.timing(_,{toValue:1,duration:A.motion.duration.instant,easing:Easing.linear,useNativeDriver:nativeDriver}),Animated.timing(_,{toValue:-1,duration:A.motion.duration.instant,easing:Easing.linear,useNativeDriver:nativeDriver}),Animated.timing(_,{toValue:1,duration:A.motion.duration.instant,easing:Easing.linear,useNativeDriver:nativeDriver}),Animated.timing(_,{toValue:0,duration:A.motion.duration.instant,easing:Easing.linear,useNativeDriver:nativeDriver})]),e.start())),P.current=L,()=>e?.stop()},[L,_,H,f,B,A.motion.duration.instant]),useEffect(()=>{const e=N.current;if(N.current=M,e===M)return;if(-1===e&&-1===M)return;const t=[];return z.forEach((i,n)=>{const s=n===M?1:0;if(n!==M&&n!==e)return;const r=Animated.timing(i,{toValue:s,duration:A.motion.duration.fast,easing:Easing.bezier(...A.motion.ease["in-out"]),useNativeDriver:nativeDriver});r.start(),t.push(r)}),()=>t.forEach(e=>{e.stop()})},[M,z,A]);const U=useCallback(e=>{const t=S.current[e];t&&t.focus()},[]);useImperativeHandle(t,()=>({focus:()=>U(0),blur:()=>{const e=S.current[Math.max(M,0)];e?.blur()},clear:()=>{k(""),U(0)}}),[U,M,k]),useEffect(()=>{if(l&&!c){const e=setTimeout(()=>U(0),u);return()=>clearTimeout(e)}},[l,u,c,U]);const W=useMemo(()=>{const e=new Array(a).fill("");for(let t=0;t<Math.min(C.length,a);t+=1)e[t]=C.charAt(t);return e},[C,a]),X=useMemo(()=>W.map((e,t)=>({key:`otp-cell-${t}`,index:t,char:e})),[W]),$=useCallback(e=>{const t=e.slice(0,a);t!==C&&(k(t),t.length===a&&r&&r(t))},[a,k,r,C]),q=useCallback((e,t)=>{const i=t.replace(/\u200B/g,""),n=sanitizeChar(i,o);if(!n){const t=W.slice(),i=cellAt(W,e).length>0;if(t[e]="",$(t.join("").slice(0,a)),!i&&e>0){const t=W.slice();t[e-1]="",$(t.join("")),U(e-1)}return}const s=cellAt(W,e),r=s&&n.length>a&&n.startsWith(s)?n.slice(s.length):n;if(r.length>=a){const t=r.slice(0,a),i=C.length;return $(t),t.length!==i&&f&&triggerHaptic(f),void S.current[e]?.blur()}const l=W.slice();let u=e;for(let e=0;e<n.length&&u<a;e+=1)l[u]=n.charAt(e),u+=1;const c=l.join("").slice(0,a),d=C.length;$(c),c.length!==d&&f&&triggerHaptic(f);const m=Math.min(u,a-1);u>=a?S.current[e]?.blur():U(m)},[W,U,o,a,f,$,C]),G=useCallback((e,t)=>{if("Backspace"!==t.nativeEvent.key)return;if(0===cellAt(W,e).length){if(e>0){const t=W.slice();t[e-1]="",$(t.join("")),U(e-1)}}else{const t=W.slice();t[e]="",$(t.join(""))}},[W,U,$]),K=useCallback((e,t)=>{D(e),h?.(t)},[h]),J=useCallback(()=>{D(-1)},[]),Q=useCallback(()=>{if(c)return;const e=W.indexOf("");U(-1===e?a-1:e)},[W,c,U,a]),Y=useCallback(e=>{O(e.nativeEvent.layout.width)},[]),Z=b??fillText(V.field,{length:a}),ee=F>0?Math.max(24,Math.min(w.cell,Math.floor((F-w.gap*(a-1))/a))):w.cell,te=_.interpolate({inputRange:[-1,1],outputRange:[-6,6]});return _jsxs(View,{style:x,onLayout:Y,accessible:!0,accessibilityRole:"none",accessibilityLabel:Z,accessibilityValue:{text:i},accessibilityState:{disabled:c},"aria-disabled":c,testID:T,children:[_jsx(Pressable,{onPress:Q,disabled:c,accessible:!1,children:_jsx(Animated.View,{style:[I.row,{columnGap:w.gap,transform:[{translateX:te}]}],children:X.map(({key:e,index:t,char:i})=>{const n=M===t,s=i.length>0,r=L?A.colors["danger-border"]:A.colors["focus-ring"],l=z[t];if(!l)return null;const u=p&&s?"●":i;return _jsxs(View,{style:I.cellWrapper,children:[_jsxs(FieldBase,{size:m,width:ee,height:ee,radius:E,borderWidth:1.5,focused:n,error:L,filled:s,disabled:c,paddingHorizontal:A.space.none,paddingVertical:A.space.none,gap:A.space.none,style:y,children:[_jsx(TextInput,{ref:e=>{S.current[t]=e},value:(p&&s?"":i)||"",onChangeText:e=>q(t,e),onKeyPress:e=>G(t,e),onFocus:e=>K(t,e),onBlur:J,keyboardType:o,editable:!c,selectTextOnFocus:!0,caretHidden:s,maxLength:a+1,textContentType:"oneTimeCode",autoComplete:0===t?"sms-otp":"off",importantForAutofill:0===t?"yes":"no",style:[I.input,{fontSize:w.text,color:A.colors["text-body"],...fontFor(A,"semibold")},v]}),p&&s?_jsx(View,{pointerEvents:"none",style:I.maskOverlay,children:_jsx(Text,{variant:"body",weight:"semibold",style:[{fontSize:w.text},v],children:u})}):null]}),_jsx(Animated.View,{style:[I.underline,{backgroundColor:r,opacity:l}]})]},e)})})}),_jsx(FieldMessage,{size:m,error:!0,text:d})]})});OTPInput.displayName="OTPInput";const buildStyles=e=>StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},cellWrapper:{alignItems:"center"},input:{width:"100%",height:"100%",textAlign:"center",padding:e.space.none},maskOverlay:{...StyleSheet.absoluteFill,alignItems:"center",justifyContent:"center"},underline:{marginTop:e.space.xs,height:2,width:"60%",borderRadius:e.radius.pill,...smoothCorners}});export{OTPInput};export default OTPInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{View}from"react-native";import{makeStyles}from"../../theme/index.js";import{Button}from"../Button/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useMemo}from"react";import{View}from"react-native";import{fillText,pluralText,useMobileUiText}from"../../text/index.js";import{OTP_INPUT_TEXT}from"../../text/phone/otpInput.g.js";import{makeStyles}from"../../theme/index.js";import{Button}from"../Button/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const TOUCH_TARGET=44,countdownText=e=>`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")}`,useStyles=makeStyles(e=>({row:{alignItems:"center",columnGap:e.space.md,flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",minHeight:44,rowGap:e.space.xs,width:"100%"}})),OTPResendRow=({resendSecondsLeft:e,expirySecondsLeft:t,onResend:s,resending:n=!1,labels:i,style:o,testID:r})=>{const a=useStyles(),x=useMobileUiText("otpInput",OTP_INPUT_TEXT),l=useMemo(()=>({...x,...i}),[x,i]),d=0===t,p=d||0===e;return _jsxs(View,{style:[a.row,o],children:[null==t?_jsx(View,{}):_jsx(Text,{variant:"caption",testID:r?`${r}-expiry`:void 0,children:d?l.expired:fillText(l.expiresIn,{time:countdownText(t)})}),p?_jsx(Button,{variant:"link",label:d?l.sendNew:l.resend,onPress:s,disabled:n,testID:r?`${r}-resend`:void 0}):_jsx(Text,{variant:"caption",accessibilityLabel:pluralText(l,"resendWaitSpoken",e,{seconds:e}),testID:r?`${r}-resend-wait`:void 0,children:fillText(l.resendIn,{time:countdownText(e)})})]})};OTPResendRow.displayName="OTPResendRow";export{OTPResendRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,OTPInput}from"./OTPInput.js";export{OTPResendRow}from"./OTPResendRow.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,ScrollView,StyleSheet,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{smoothCorners}from"../../utils/corners.js";import{Button}from"../Button/index.js";import{Carousel}from"../Carousel/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,Pressable,ScrollView,StyleSheet,View}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{fillText,useMobileUiText}from"../../text/index.js";import{ONBOARDING_PAGER_TEXT}from"../../text/phone/onboardingPager.g.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{smoothCorners}from"../../utils/corners.js";import{Button}from"../Button/index.js";import{Carousel}from"../Carousel/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const ONBOARDING_MAX_PAGES=6,CONTROL_HEIGHT=44,DOT_SIZE=8,DOT_ACTIVE_WIDTH=24,OnboardingPager=({pages:e,onDone:t,onSkip:o,labels:s,safeArea:n=!0,haptic:i="selection",testID:a})=>{const r=useTheme(),l=useSafeAreaInsets(),c=useReducedMotion(),u=useMemo(()=>buildStyles(r),[r]),d=useMobileUiText("onboardingPager",ONBOARDING_PAGER_TEXT),m=useMemo(()=>s?{...d,...s}:d,[d,s]),p=useMemo(()=>e.slice(0,6),[e]),g=p.length,b=useCallback((e,t)=>fillText(m.step,{position:e,total:t}),[m.step]),x=useRef(null),[f,h]=useState(0),y=f>=g-1,j=useCallback(e=>{e<0||e>=g||x.current?.scrollTo(e,!c)},[g,c]),_=useCallback(e=>j(f+e),[j,f]),S=useCallback(()=>{y?t():j(f+1)},[y,t,j,f]),I=useRef(f);useEffect(()=>{if(I.current===f)return;I.current=f;const e=p[f];e&&announce(`${b(f+1,g)}, ${e.title}`)},[f,p,g,b]);const C=useCallback((e,t)=>_jsx(ScrollView,{style:u.page,contentContainerStyle:u.pageContent,showsVerticalScrollIndicator:!1,bounces:!1,children:_jsxs(View,{accessible:!0,accessibilityLabel:`${b(t+1,g)}, ${e.title}. ${e.body}`,style:u.pageGroup,children:[e.art?_jsx(View,{style:u.art,children:e.art}):null,_jsx(Text,{variant:"h2",align:"center",children:e.title}),_jsx(Text,{variant:"body",color:"secondary",align:"center",children:e.body})]})}),[u,b,g]);return 0===g?null:_jsxs(View,{style:[u.root,n?{paddingTop:l.top,paddingBottom:l.bottom}:null],testID:a,children:[_jsx(View,{style:u.skipRow,children:_jsx(Button,{label:m.skip,variant:"ghost",tone:"neutral",hitSlop:{top:2,bottom:2,left:8,right:8},haptic:i,onPress:o,testID:a?`${a}-skip`:void 0})}),_jsx(Carousel,{ref:x,data:p,renderItem:C,keyExtractor:e=>e.key,onIndexChange:h,showPagination:!1,style:u.carousel,testID:a?`${a}-pages`:void 0}),_jsxs(View,{style:u.footer,children:[g>1?_jsx(PageControl,{keys:p.map(e=>e.key),index:f,label:m.pageControl,valueText:b(f+1,g),reduceMotion:c,theme:r,onStep:_,testID:a?`${a}-dots`:void 0}):null,_jsx(Button,{label:y?m.done:m.next,size:"lg",fullWidth:!0,haptic:i,onPress:S,testID:a?`${a}-next`:void 0})]})]})};OnboardingPager.displayName="OnboardingPager";const PageControl=({keys:e,index:t,label:o,valueText:s,reduceMotion:n,theme:i,onStep:a,testID:r})=>{const l=useCallback(e=>{"increment"===e.nativeEvent.actionName?a(1):"decrement"===e.nativeEvent.actionName&&a(-1)},[a]);return _jsxs(View,{accessible:!0,accessibilityRole:"adjustable",accessibilityLabel:o,accessibilityValue:{min:0,max:e.length-1,now:t,text:s},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:l,style:controlStyles.control,testID:r,children:[_jsx(View,{style:controlStyles.dots,pointerEvents:"none",children:e.map((e,o)=>_jsx(Dot,{active:o===t,reduceMotion:n,theme:i},e))}),_jsx(Pressable,{accessible:!1,importantForAccessibility:"no",style:controlStyles.back,onPress:()=>a(-1),testID:r?`${r}-back`:void 0}),_jsx(Pressable,{accessible:!1,importantForAccessibility:"no",style:controlStyles.forward,onPress:()=>a(1),testID:r?`${r}-forward`:void 0})]})},Dot=({active:e,reduceMotion:t,theme:o})=>{const s=useRef(createAnimatedValue(e?1:0)).current;return useEffect(()=>{const n=Animated.timing(s,{toValue:e?1:0,duration:t?0:o.motion.duration.default,easing:Easing.bezier(...o.motion.ease["in-out"]),useNativeDriver:!1});return n.start(),()=>n.stop()},[e,t,s,o]),_jsx(Animated.View,{style:{width:s.interpolate({inputRange:[0,1],outputRange:[8,24]}),height:8,marginHorizontal:o.space.xs,borderRadius:4,...smoothCorners,backgroundColor:s.interpolate({inputRange:[0,1],outputRange:[o.colors.border,o.colors.primary]})}})},controlStyles=StyleSheet.create({control:{alignSelf:"center",height:44,minWidth:88,alignItems:"center",justifyContent:"center"},dots:{flexDirection:"row",alignItems:"center"},back:{position:"absolute",top:0,bottom:0,start:0,width:"50%"},forward:{position:"absolute",top:0,bottom:0,end:0,width:"50%"}}),buildStyles=e=>StyleSheet.create({root:{flex:1,backgroundColor:e.colors.bg},skipRow:{minHeight:44,paddingHorizontal:e.space.lg,alignItems:"flex-end",justifyContent:"center"},carousel:{flex:1},page:{flex:1},pageContent:{flexGrow:1,justifyContent:"center",paddingHorizontal:e.space.xl,paddingVertical:e.space.lg},pageGroup:{alignItems:"stretch",gap:e.space.md},art:{alignItems:"center",alignSelf:"stretch",marginBottom:e.space.xl},footer:{paddingHorizontal:e.space.lg,paddingBottom:e.space.lg,gap:e.space.sm}});export{OnboardingPager};export default OnboardingPager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,OnboardingPager}from"./OnboardingPager.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Dimensions,FlatList,Pressable,StatusBar,StyleSheet,TextInput,View}from"react-native";import{GestureDetector,GestureHandlerRootView,useNativeGesture}from"react-native-gesture-handler";import{useKeyboardState}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useDragToDismiss}from"../../hooks/useDragToDismiss.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Modal}from"../Modal/index.js";import{Text}from"../Text/index.js";import{selectOptionAction,selectOptionDescription,selectOptionDisabled,selectOptionIcon,selectOptionLabel,selectOptionValue}from"./optionAccessors.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const SEARCH_ICON_SIZE=18;export const DEFAULT_OPTION_SHEET_LABELS=Object.freeze({searchPlaceholder:"Search…",empty:"No options",done:"Done",closePicker:"Close picker",fallbackName:"Options",searchOptions:"Search options",clearSearch:"Clear search",jumpToLetter:"Jump to letter",jumpTo:e=>`Jump to ${e}`});const hostStyle=StyleSheet.create({host:{padding:0,paddingTop:0,paddingHorizontal:0,paddingBottom:0,backgroundColor:"transparent",borderTopLeftRadius:0,borderTopRightRadius:0,shadowOpacity:0,elevation:0}}).host;function OptionSheetPanel(e){const{onClose:t,title:o,options:s,sections:i,renderSectionHeader:r,renderOption:l,alphabetIndex:n=!1,labels:a,getOptionLabel:c,getOptionValue:d,getOptionDescription:p,isOptionDisabled:u,getOptionIcon:h,destructiveOf:m,getOptionAction:g,value:b,onChange:x,multi:y=!1,searchable:f=!1,searchSelectionColor:S,accessibilityLabel:T,optionStyle:j,selectedOptionStyle:w,optionTextStyle:C,selectedOptionTextStyle:_,testID:k}=e,I=c??selectOptionLabel,L=d??selectOptionValue,O=p??selectOptionDescription,R=u??selectOptionDisabled,D=h??selectOptionIcon,V=g??selectOptionAction,v=useTheme(),P=useSafeAreaInsets(),H=useMemo(()=>buildStyles(v),[v]),[M,A]=useState(""),B=Dimensions.get("window").height,z=Math.round(.7*B),E=useRef(createAnimatedValue(0)).current,{handleGesture:F,opacity:W}=useDragToDismiss({drag:E,travel:z,onDismiss:t,testID:k}),N=useNativeGesture(),G=useKeyboardState(e=>e.height),U=Math.max(0,Math.round(G)),$=Math.max(P.top,StatusBar.currentHeight??0)+v.space.sm,J=U>0,K=J?Math.max(0,Math.min(z,B-U-$)):z,Y=useMemo(()=>{const e=f?M.trim().toLowerCase():"",matches=t=>0===e.length||I(t).toLowerCase().includes(e)||(O(t)??"").toLowerCase().includes(e);if(!i)return s.filter(matches).map(e=>({kind:"option",option:e}));const t=[];return i.forEach((e,o)=>{const s=e.options.filter(matches);if(0!==s.length){t.push({kind:"header",title:e.title});for(const e of s)t.push({kind:"option",option:e,section:o})}}),t},[f,M,s,i,I,O]),Z=useCallback(()=>{t()},[t]),Q=useRef(null),X=useMemo(()=>{const e=new Map;if(!n)return e;let t=0;if(i)for(const[e,o]of Y.entries())"header"===o.kind&&(t=e+1);for(const[o,s]of Y.entries()){if(o<t||"option"!==s.kind)continue;const i=I(s.option).trim().charAt(0).toUpperCase(),r=/^[A-Z]$/.test(i)?i:"#";e.has(r)||e.set(r,o)}return e},[n,Y,i,I]),q=n&&X.size>0&&0===M.trim().length,ee=useMemo(()=>[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ",...X.has("#")?["#"]:[]],[X]),te=useCallback(e=>{const t=X.get(e);void 0!==t&&Q.current?.scrollToIndex({index:t,animated:!0,viewPosition:0})},[X]),oe=useRef(null),se=useCallback(()=>{null!==oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),ie=useCallback(e=>{Q.current?.scrollToOffset({offset:e.averageItemLength*e.index,animated:!1}),se(),oe.current=setTimeout(()=>{oe.current=null,Q.current?.scrollToIndex({index:e.index,animated:!0,viewPosition:0})},50)},[se]);useEffect(()=>se,[se]);return _jsx(GestureHandlerRootView,{style:H.gestureRoot,children:_jsxs(Animated.View,{testID:k,accessibilityViewIsModal:!0,accessibilityLabel:T??o??a.fallbackName,style:[H.sheet,{maxHeight:K,marginBottom:U,paddingBottom:J?v.space.lg:P.bottom+v.space.lg,backgroundColor:v.colors.surface,borderTopLeftRadius:v.radius.xl,borderTopRightRadius:v.radius.xl,...smoothCorners,opacity:W,transform:[{translateY:E}],...v.shadow.modal}],children:[_jsx(GestureDetector,{gesture:F,children:_jsxs(View,{children:[_jsx(View,{style:H.sheetHandleRow,children:_jsx(View,{style:[H.sheetHandle,{backgroundColor:v.colors.border}]})}),o?_jsx(Text,{variant:"title",style:[H.sheetTitle,{paddingHorizontal:v.space.lg,marginBottom:v.space.sm}],children:o}):null]})}),f?_jsx(View,{style:[H.searchWrap,{marginHorizontal:v.space.lg,marginBottom:v.space.sm}],children:_jsxs(View,{style:[H.searchBox,{backgroundColor:v.colors["bg-subtle"],borderColor:v.colors.border,borderRadius:v.radius.md,...smoothCorners,paddingHorizontal:v.space.md,gap:v.space.sm}],children:[(v.settings.icons.search??defaultIcons.search)({size:18,color:v.colors["text-subtle"]}),_jsx(TextInput,{value:M,onChangeText:A,placeholder:a.searchPlaceholder,placeholderTextColor:v.colors["text-subtle"],selectionColor:S??v.colors["focus-ring"],accessibilityLabel:a.searchOptions,style:[H.searchInput,{color:v.colors["text-body"],fontSize:v.text.base.size,paddingVertical:v.space.sm}]}),M.length>0?_jsx(Pressable,{onPress:()=>A(""),hitSlop:8,...hitSlopMarker(8),accessibilityRole:"button",accessibilityLabel:a.clearSearch,children:(v.settings.icons.close??defaultIcons.close)({size:18,color:v.colors["text-muted"]})}):null]})}):null,_jsxs(View,{style:[H.listWrap,q?H.listRow:null],children:[_jsx(GestureDetector,{gesture:N,children:_jsx(FlatList,{ref:Q,data:Y,keyExtractor:e=>"header"===e.kind?`h:${e.title}`:`o:${e.section??""}:${String(L(e.option))}`,renderItem:({item:e,index:t})=>{if("header"===e.kind)return _jsx(View,{accessible:!0,accessibilityRole:"header",style:[H.sectionHeader,{paddingHorizontal:v.space.lg,paddingTop:v.space.md}],children:r?r(e.title):_jsx(Text,{variant:"caption",weight:"semibold",color:"tertiary",style:H.sectionTitle,children:e.title.toUpperCase()})});const o=e.option,s=I(o),i=L(o),n=O(o),a=D(o),c=(d=i,Array.isArray(b)?b.some(e=>String(e)===String(d)):null!=b&&String(b)===String(d));var d;const p=R(o),u=m?.(o)??!1,h=V(o);return _jsxs(Pressable,{onPress:()=>{if(h)return h(),void Z();x(i,o)},disabled:p,android_ripple:{color:v.colors["surface-pressed"],borderless:!1},accessibilityRole:"button",accessibilityLabel:s,accessibilityState:{selected:c,disabled:p},"aria-selected":c,"aria-disabled":p,style:({pressed:e})=>[H.optionRow,{backgroundColor:c?v.colors["surface-selected"]:e?v.colors["surface-pressed"]:"transparent",opacity:p?.5:1,paddingHorizontal:v.space.lg,paddingVertical:v.space.md},j,c?w:null],children:[l?_jsx(View,{style:H.optionTextWrap,children:l({option:o,selected:c,disabled:p,index:t})}):_jsxs(_Fragment,{children:[a?_jsx(View,{style:H.optionIcon,children:a}):null,_jsxs(View,{style:H.optionTextWrap,children:[_jsx(Text,{variant:"body",weight:c?"semibold":"medium",color:u?"danger":c?"brand":void 0,style:[H.optionLabel,C,c?_:null],children:s}),n?_jsx(Text,{variant:"bodySmall",color:"tertiary",numberOfLines:2,style:H.optionDescription,children:n}):null]})]}),y?_jsx(View,{style:[H.checkbox,{borderColor:c?v.colors.primary:v.colors.border,backgroundColor:c?v.colors.primary:"transparent"}],children:c?_jsx(View,{style:H.checkboxTick}):null}):c?"icon"===v.settings.components["option-sheet"]?.selectedMarker?_jsx(View,{style:H.singleSelectedIcon,children:(v.settings.icons.selectedTick??defaultIcons.selectedTick)({size:20,color:v.colors.primary})}):_jsx(View,{style:[H.singleSelectedDot,{backgroundColor:v.colors.primary}]}):null]})},onScrollToIndexFailed:ie,overScrollMode:"never",bounces:!1,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!q,style:q?H.listBesideRail:null,ListEmptyComponent:_jsx(Text,{variant:"bodySmall",color:"tertiary",align:"center",style:{paddingVertical:v.space.xl},children:a.empty})})}),q?_jsx(View,{style:[H.rail,{paddingRight:v.space.xs}],accessibilityRole:"list",accessibilityLabel:a.jumpToLetter,testID:"option-sheet-alphabet",children:ee.map(e=>{const t=X.has(e);return _jsx(Pressable,{onPress:()=>te(e),disabled:!t,hitSlop:{left:8,right:8},...hitSlopMarker({left:8,right:8}),accessibilityRole:"button",accessibilityLabel:a.jumpTo(e),accessibilityState:{disabled:!t},"aria-disabled":!t,style:H.railLetter,children:_jsx(Text,{variant:"caption",weight:"semibold",color:t?"brand":"tertiary",style:[H.railLetterText,{opacity:t?1:.45}],children:e})},e)})}):null]}),y?_jsx(View,{style:[H.sheetFooter,{borderTopColor:v.colors["border-subtle"],paddingHorizontal:v.space.lg,paddingVertical:v.space.md}],children:_jsx(Pressable,{onPress:Z,accessibilityRole:"button",accessibilityLabel:a.done,style:({pressed:e})=>[H.doneButton,{backgroundColor:e?v.colors["primary-pressed"]:v.colors.primary,borderRadius:v.radius.md,...smoothCorners,paddingVertical:v.space.sm,paddingHorizontal:v.space.lg}],children:_jsx(Text,{variant:"body",weight:"semibold",style:{color:v.colors["on-primary"]},children:a.done})})}):null]})})}export function OptionSheet(e){const{open:t,onOpenChange:o,onAfterClose:s,labels:i,onClose:r,haptic:l,...n}=e,a=useMemo(()=>({...DEFAULT_OPTION_SHEET_LABELS,...i}),[i]),c=useRef(o);c.current=o;const d=useRef(!1);return useEffect(()=>{d.current!==t&&(d.current=t,c.current?.(t))},[t]),_jsx(Modal,{open:t,onClose:r,presentation:"bottom",onDismissed:s,haptic:l,contentStyle:hostStyle,labels:{close:a.closePicker},accessibilityLabel:n.accessibilityLabel??n.title??a.fallbackName,children:_jsx(OptionSheetPanel,{...n,onClose:r,labels:a})})}OptionSheet.displayName="OptionSheet";const buildStyles=e=>StyleSheet.create({gestureRoot:{width:"100%"},sheet:{paddingBottom:e.space.lg,overflow:"hidden"},sheetHandleRow:{alignItems:"center",paddingTop:e.space.sm,paddingBottom:e.space.sm},sheetHandle:{width:36,height:4,borderRadius:e.radius.pill,...smoothCorners},sheetTitle:{includeFontPadding:!1},searchWrap:{width:"auto"},searchBox:{flexDirection:"row",alignItems:"center",borderWidth:1},searchInput:{flex:1,includeFontPadding:!1},optionRow:{flexDirection:"row",alignItems:"center"},sectionHeader:{paddingBottom:e.space.xs},listWrap:{flexShrink:1},listRow:{flexDirection:"row"},listBesideRail:{flex:1},rail:{justifyContent:"space-between",alignItems:"center",alignSelf:"stretch",paddingVertical:e.space.xs},railLetter:{paddingHorizontal:e.space.xs,minHeight:14,justifyContent:"center"},railLetterText:{includeFontPadding:!1,lineHeight:Math.round(e.text.xs.size*e.leading.heading)},sectionTitle:{includeFontPadding:!1,letterSpacing:.6},optionIcon:{marginRight:e.space.md},optionTextWrap:{flex:1},optionLabel:{includeFontPadding:!1},optionDescription:{includeFontPadding:!1,marginTop:e.space.xxs},checkbox:{width:22,height:22,borderRadius:e.radius.sm,...smoothCorners,borderWidth:2,alignItems:"center",justifyContent:"center",marginLeft:e.space.md},checkboxTick:{width:10,height:6,borderLeftWidth:2,borderBottomWidth:2,borderColor:e.colors["on-primary"],transform:[{rotate:"-45deg"},{translateY:-1}]},singleSelectedDot:{width:8,height:8,borderRadius:e.radius.pill,...smoothCorners,marginLeft:e.space.md},singleSelectedIcon:{marginLeft:e.space.md},sheetFooter:{borderTopWidth:StyleSheet.hairlineWidth,alignItems:"flex-end"},doneButton:{alignSelf:"flex-end"}});export default OptionSheet;
|
|
1
|
+
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Dimensions,FlatList,Pressable,StatusBar,StyleSheet,TextInput,View}from"react-native";import{GestureDetector,GestureHandlerRootView,useNativeGesture}from"react-native-gesture-handler";import{useKeyboardState}from"react-native-keyboard-controller";import{useSafeAreaInsets}from"react-native-safe-area-context";import{useDragToDismiss}from"../../hooks/useDragToDismiss.js";import{fillText,useMobileUiText}from"../../text/index.js";import{OPTION_SHEET_TEXT}from"../../text/phone/optionSheet.g.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{smoothCorners}from"../../utils/corners.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Modal}from"../Modal/index.js";import{Text}from"../Text/index.js";import{selectOptionAction,selectOptionDescription,selectOptionDisabled,selectOptionIcon,selectOptionLabel,selectOptionValue}from"./optionAccessors.js";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";const SEARCH_ICON_SIZE=18,hostStyle=StyleSheet.create({host:{padding:0,paddingTop:0,paddingHorizontal:0,paddingBottom:0,backgroundColor:"transparent",borderTopLeftRadius:0,borderTopRightRadius:0,shadowOpacity:0,elevation:0}}).host;function OptionSheetPanel(e){const{onClose:t,title:o,options:s,sections:i,renderSectionHeader:r,renderOption:l,alphabetIndex:n=!1,labels:a,getOptionLabel:c,getOptionValue:d,getOptionDescription:p,isOptionDisabled:u,getOptionIcon:h,destructiveOf:m,getOptionAction:g,value:b,onChange:x,multi:f=!1,searchable:y=!1,searchSelectionColor:S,accessibilityLabel:T,optionStyle:j,selectedOptionStyle:w,optionTextStyle:C,selectedOptionTextStyle:_,testID:I}=e,k=c??selectOptionLabel,O=d??selectOptionValue,R=p??selectOptionDescription,L=u??selectOptionDisabled,V=h??selectOptionIcon,D=g??selectOptionAction,v=useTheme(),H=useSafeAreaInsets(),M=useMemo(()=>buildStyles(v),[v]),[P,A]=useState(""),B=Dimensions.get("window").height,z=Math.round(.7*B),E=useRef(createAnimatedValue(0)).current,{handleGesture:F,opacity:W}=useDragToDismiss({drag:E,travel:z,onDismiss:t,testID:I}),G=useNativeGesture(),N=useKeyboardState(e=>e.height),U=Math.max(0,Math.round(N)),$=Math.max(H.top,StatusBar.currentHeight??0)+v.space.sm,K=U>0,X=K?Math.max(0,Math.min(z,B-U-$)):z,Y=useMemo(()=>{const e=y?P.trim().toLowerCase():"",matches=t=>0===e.length||k(t).toLowerCase().includes(e)||(R(t)??"").toLowerCase().includes(e);if(!i)return s.filter(matches).map(e=>({kind:"option",option:e}));const t=[];return i.forEach((e,o)=>{const s=e.options.filter(matches);if(0!==s.length){t.push({kind:"header",title:e.title});for(const e of s)t.push({kind:"option",option:e,section:o})}}),t},[y,P,s,i,k,R]),Z=useCallback(()=>{t()},[t]),J=useRef(null),Q=useMemo(()=>{const e=new Map;if(!n)return e;let t=0;if(i)for(const[e,o]of Y.entries())"header"===o.kind&&(t=e+1);for(const[o,s]of Y.entries()){if(o<t||"option"!==s.kind)continue;const i=k(s.option).trim().charAt(0).toUpperCase(),r=/^[A-Z]$/.test(i)?i:"#";e.has(r)||e.set(r,o)}return e},[n,Y,i,k]),q=n&&Q.size>0&&0===P.trim().length,ee=useMemo(()=>[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ",...Q.has("#")?["#"]:[]],[Q]),te=useCallback(e=>{const t=Q.get(e);void 0!==t&&J.current?.scrollToIndex({index:t,animated:!0,viewPosition:0})},[Q]),oe=useRef(null),se=useCallback(()=>{null!==oe.current&&(clearTimeout(oe.current),oe.current=null)},[]),ie=useCallback(e=>{J.current?.scrollToOffset({offset:e.averageItemLength*e.index,animated:!1}),se(),oe.current=setTimeout(()=>{oe.current=null,J.current?.scrollToIndex({index:e.index,animated:!0,viewPosition:0})},50)},[se]);useEffect(()=>se,[se]);return _jsx(GestureHandlerRootView,{style:M.gestureRoot,children:_jsxs(Animated.View,{testID:I,accessibilityViewIsModal:!0,accessibilityLabel:T??o??a.fallbackName,style:[M.sheet,{maxHeight:X,marginBottom:U,paddingBottom:K?v.space.lg:H.bottom+v.space.lg,backgroundColor:v.colors.surface,borderTopLeftRadius:v.radius.xl,borderTopRightRadius:v.radius.xl,...smoothCorners,opacity:W,transform:[{translateY:E}],...v.shadow.modal}],children:[_jsx(GestureDetector,{gesture:F,children:_jsxs(View,{children:[_jsx(View,{style:M.sheetHandleRow,children:_jsx(View,{style:[M.sheetHandle,{backgroundColor:v.colors.border}]})}),o?_jsx(Text,{variant:"title",style:[M.sheetTitle,{paddingHorizontal:v.space.lg,marginBottom:v.space.sm}],children:o}):null]})}),y?_jsx(View,{style:[M.searchWrap,{marginHorizontal:v.space.lg,marginBottom:v.space.sm}],children:_jsxs(View,{style:[M.searchBox,{backgroundColor:v.colors["bg-subtle"],borderColor:v.colors.border,borderRadius:v.radius.md,...smoothCorners,paddingHorizontal:v.space.md,gap:v.space.sm}],children:[(v.settings.icons.search??defaultIcons.search)({size:18,color:v.colors["text-subtle"]}),_jsx(TextInput,{value:P,onChangeText:A,placeholder:a.searchPlaceholder,placeholderTextColor:v.colors["text-subtle"],selectionColor:S??v.colors["focus-ring"],accessibilityLabel:a.searchOptions,style:[M.searchInput,{color:v.colors["text-body"],fontSize:v.text.base.size,paddingVertical:v.space.sm}]}),P.length>0?_jsx(Pressable,{onPress:()=>A(""),hitSlop:8,...hitSlopMarker(8),accessibilityRole:"button",accessibilityLabel:a.clearSearch,children:(v.settings.icons.close??defaultIcons.close)({size:18,color:v.colors["text-muted"]})}):null]})}):null,_jsxs(View,{style:[M.listWrap,q?M.listRow:null],children:[_jsx(GestureDetector,{gesture:G,children:_jsx(FlatList,{ref:J,data:Y,keyExtractor:e=>"header"===e.kind?`h:${e.title}`:`o:${e.section??""}:${String(O(e.option))}`,renderItem:({item:e,index:t})=>{if("header"===e.kind)return _jsx(View,{accessible:!0,accessibilityRole:"header",style:[M.sectionHeader,{paddingHorizontal:v.space.lg,paddingTop:v.space.md}],children:r?r(e.title):_jsx(Text,{variant:"caption",weight:"semibold",color:"tertiary",style:M.sectionTitle,children:e.title.toUpperCase()})});const o=e.option,s=k(o),i=O(o),n=R(o),a=V(o),c=(d=i,Array.isArray(b)?b.some(e=>String(e)===String(d)):null!=b&&String(b)===String(d));var d;const p=L(o),u=m?.(o)??!1,h=D(o);return _jsxs(Pressable,{onPress:()=>{if(h)return h(),void Z();x(i,o)},disabled:p,android_ripple:{color:v.colors["surface-pressed"],borderless:!1},accessibilityRole:"button",accessibilityLabel:s,accessibilityState:{selected:c,disabled:p},"aria-selected":c,"aria-disabled":p,style:({pressed:e})=>[M.optionRow,{backgroundColor:c?v.colors["surface-selected"]:e?v.colors["surface-pressed"]:"transparent",opacity:p?.5:1,paddingHorizontal:v.space.lg,paddingVertical:v.space.md},j,c?w:null],children:[l?_jsx(View,{style:M.optionTextWrap,children:l({option:o,selected:c,disabled:p,index:t})}):_jsxs(_Fragment,{children:[a?_jsx(View,{style:M.optionIcon,children:a}):null,_jsxs(View,{style:M.optionTextWrap,children:[_jsx(Text,{variant:"body",weight:c?"semibold":"medium",color:u?"danger":c?"brand":void 0,style:[M.optionLabel,C,c?_:null],children:s}),n?_jsx(Text,{variant:"bodySmall",color:"tertiary",numberOfLines:2,style:M.optionDescription,children:n}):null]})]}),f?_jsx(View,{style:[M.checkbox,{borderColor:c?v.colors.primary:v.colors.border,backgroundColor:c?v.colors.primary:"transparent"}],children:c?_jsx(View,{style:M.checkboxTick}):null}):c?"icon"===v.settings.components["option-sheet"]?.selectedMarker?_jsx(View,{style:M.singleSelectedIcon,children:(v.settings.icons.selectedTick??defaultIcons.selectedTick)({size:20,color:v.colors.primary})}):_jsx(View,{style:[M.singleSelectedDot,{backgroundColor:v.colors.primary}]}):null]})},onScrollToIndexFailed:ie,overScrollMode:"never",bounces:!1,keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!q,style:q?M.listBesideRail:null,ListEmptyComponent:_jsx(Text,{variant:"bodySmall",color:"tertiary",align:"center",style:{paddingVertical:v.space.xl},children:a.empty})})}),q?_jsx(View,{style:[M.rail,{paddingRight:v.space.xs}],accessibilityRole:"list",accessibilityLabel:a.jumpToLetter,testID:"option-sheet-alphabet",children:ee.map(e=>{const t=Q.has(e);return _jsx(Pressable,{onPress:()=>te(e),disabled:!t,hitSlop:{left:8,right:8},...hitSlopMarker({left:8,right:8}),accessibilityRole:"button",accessibilityLabel:fillText(a.jumpTo,{letter:e}),accessibilityState:{disabled:!t},"aria-disabled":!t,style:M.railLetter,children:_jsx(Text,{variant:"caption",weight:"semibold",color:t?"brand":"tertiary",style:[M.railLetterText,{opacity:t?1:.45}],children:e})},e)})}):null]}),f?_jsx(View,{style:[M.sheetFooter,{borderTopColor:v.colors["border-subtle"],paddingHorizontal:v.space.lg,paddingVertical:v.space.md}],children:_jsx(Pressable,{onPress:Z,accessibilityRole:"button",accessibilityLabel:a.done,style:({pressed:e})=>[M.doneButton,{backgroundColor:e?v.colors["primary-pressed"]:v.colors.primary,borderRadius:v.radius.md,...smoothCorners,paddingVertical:v.space.sm,paddingHorizontal:v.space.lg}],children:_jsx(Text,{variant:"body",weight:"semibold",style:{color:v.colors["on-primary"]},children:a.done})})}):null]})})}export function OptionSheet(e){const{open:t,onOpenChange:o,onAfterClose:s,labels:i,onClose:r,haptic:l,...n}=e,a=useMobileUiText("optionSheet",OPTION_SHEET_TEXT),c=useMemo(()=>({...a,...i}),[a,i]),d=useRef(o);d.current=o;const p=useRef(!1);return useEffect(()=>{p.current!==t&&(p.current=t,d.current?.(t))},[t]),_jsx(Modal,{open:t,onClose:r,presentation:"bottom",onDismissed:s,haptic:l,contentStyle:hostStyle,labels:{close:c.closePicker},accessibilityLabel:n.accessibilityLabel??n.title??c.fallbackName,children:_jsx(OptionSheetPanel,{...n,onClose:r,labels:c})})}OptionSheet.displayName="OptionSheet";const buildStyles=e=>StyleSheet.create({gestureRoot:{width:"100%"},sheet:{paddingBottom:e.space.lg,overflow:"hidden"},sheetHandleRow:{alignItems:"center",paddingTop:e.space.sm,paddingBottom:e.space.sm},sheetHandle:{width:36,height:4,borderRadius:e.radius.pill,...smoothCorners},sheetTitle:{includeFontPadding:!1},searchWrap:{width:"auto"},searchBox:{flexDirection:"row",alignItems:"center",borderWidth:1},searchInput:{flex:1,includeFontPadding:!1},optionRow:{flexDirection:"row",alignItems:"center"},sectionHeader:{paddingBottom:e.space.xs},listWrap:{flexShrink:1},listRow:{flexDirection:"row"},listBesideRail:{flex:1},rail:{justifyContent:"space-between",alignItems:"center",alignSelf:"stretch",paddingVertical:e.space.xs},railLetter:{paddingHorizontal:e.space.xs,minHeight:14,justifyContent:"center"},railLetterText:{includeFontPadding:!1,lineHeight:Math.round(e.text.xs.size*e.leading.heading)},sectionTitle:{includeFontPadding:!1,letterSpacing:.6},optionIcon:{marginRight:e.space.md},optionTextWrap:{flex:1},optionLabel:{includeFontPadding:!1},optionDescription:{includeFontPadding:!1,marginTop:e.space.xxs},checkbox:{width:22,height:22,borderRadius:e.radius.sm,...smoothCorners,borderWidth:2,alignItems:"center",justifyContent:"center",marginLeft:e.space.md},checkboxTick:{width:10,height:6,borderLeftWidth:2,borderBottomWidth:2,borderColor:e.colors["on-primary"],transform:[{rotate:"-45deg"},{translateY:-1}]},singleSelectedDot:{width:8,height:8,borderRadius:e.radius.pill,...smoothCorners,marginLeft:e.space.md},singleSelectedIcon:{marginLeft:e.space.md},sheetFooter:{borderTopWidth:StyleSheet.hairlineWidth,alignItems:"flex-end"},doneButton:{alignSelf:"flex-end"}});export default OptionSheet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,OptionSheet}from"./OptionSheet.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useMemo}from"react";import{View}from"react-native";import{makeStyles}from"../../theme/index.js";import{Button}from"../Button/index.js";import{Spinner}from"../Spinner/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const useStyles=makeStyles(e=>({root:{alignItems:"center",flexDirection:"row",gap:e.space.sm,justifyContent:"center",paddingVertical:e.space.md}}));export
|
|
1
|
+
"use strict";import{useMemo}from"react";import{View}from"react-native";import{useMobileUiText}from"../../text/index.js";import{PAGED_LIST_FOOTER_TEXT}from"../../text/phone/pagedListFooter.g.js";import{makeStyles}from"../../theme/index.js";import{Button}from"../Button/index.js";import{Spinner}from"../Spinner/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const useStyles=makeStyles(e=>({root:{alignItems:"center",flexDirection:"row",gap:e.space.sm,justifyContent:"center",paddingVertical:e.space.md}}));export function PagedListFooter({paging:e,labels:t,testID:r}){const s=useStyles(),o=useMobileUiText("pagedListFooter",PAGED_LIST_FOOTER_TEXT),i=useMemo(()=>({...o,...t}),[o,t]);return e.errorMore?_jsxs(View,{style:s.root,accessibilityLiveRegion:"polite",testID:r,children:[_jsx(Text,{variant:"caption",color:"danger",children:i.failed}),_jsx(Button,{label:i.retry,variant:"ghost",size:"sm",onPress:e.retryMore,testID:r?`${r}-retry`:void 0})]}):e.loadingMore?_jsx(View,{style:s.root,testID:r,children:_jsx(Spinner,{size:"sm",accessibilityLabel:i.loadingMore})}):null}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{PagedListFooter}from"./PagedListFooter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useEffect,useMemo,useRef}from"react";import{StyleSheet,View}from"react-native";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Button}from"../Button/index.js";import{IconBadge}from"../IconBadge/index.js";import{Text}from"../Text/index.js";import{usePermissionPrompt}from"./usePermissionPrompt.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useEffect,useMemo,useRef}from"react";import{StyleSheet,View}from"react-native";import{fillText,useMobileUiText}from"../../text/index.js";import{PERMISSION_PROMPT_TEXT}from"../../text/phone/permissionPrompt.g.js";import{useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Button}from"../Button/index.js";import{IconBadge}from"../IconBadge/index.js";import{Text}from"../Text/index.js";import{usePermissionPrompt}from"./usePermissionPrompt.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const ACCESS_TEXT_KEY={camera:"accessCamera",microphone:"accessMicrophone",photos:"accessPhotos",photosAdd:"accessPhotos",mediaLibrary:"accessMediaLibrary",location:"accessLocation",locationAlways:"accessLocation",contacts:"accessContacts",calendar:"accessCalendar",reminders:"accessReminders",notifications:"accessNotifications",bluetooth:"accessBluetooth",storage:"accessStorage"},unavailableMessage=(e,s,t,i)=>{const a=i[ACCESS_TEXT_KEY[e]];return fillText("unavailable"===s?i.notAvailable:t?i.offWithSettings:i.off,{access:a})};export const PermissionPrompt=e=>{const{kind:s,title:t,reason:i,icon:a,onResult:n,fallback:o,haptic:r="selection",labels:l,style:c,testID:u}=e;assertValidValue("PermissionPrompt","kind",s,Object.keys(ACCESS_TEXT_KEY));const m=useMobileUiText("permissionPrompt",PERMISSION_PROMPT_TEXT),p=useMemo(()=>({...m,...l}),[m,l]),d=useTheme(),x=useMemo(()=>buildStyles(d),[d]),h=usePermissionPrompt(s,{onResult:n}),f=unavailableMessage(s,h.status,h.showSettings,p),g=useRef(!1);if(useEffect(()=>{"explain"!==h.view?("unavailable"===h.view&&g.current&&announce(f),g.current=!1):g.current=!0},[h.view,f]),"explain"!==h.view&&"unavailable"!==h.view)return _jsx(View,{style:c,testID:u});const j="explain"===h.view;return _jsxs(View,{style:[x.root,c],testID:u,children:[_jsxs(View,{style:x.header,children:[a?_jsx(IconBadge,{icon:a,size:"lg",tone:j?"primary":"neutral"}):null,_jsx(Text,{variant:"h3",align:"center",children:t}),_jsx(Text,{variant:"body",color:"secondary",align:"center",children:j?i:f})]}),_jsxs(View,j?{style:x.actions,children:[_jsx(Button,{haptic:r,label:p.proceed,size:"lg",fullWidth:!0,loading:h.requesting,onPress:()=>{h.request()}}),h.cancellable?_jsx(Button,{haptic:r,label:p.cancel,size:"lg",fullWidth:!0,variant:"ghost",tone:"neutral",disabled:h.requesting,onPress:h.cancel}):null]}:{style:x.actions,children:[o?_jsx(Button,{haptic:r,label:o.label,size:"lg",fullWidth:!0,onPress:o.onPress}):null,h.showSettings?_jsx(View,{style:x.link,children:_jsx(Button,{haptic:r,label:p.openSettings,variant:"link",onPress:()=>{h.openSettings()}})}):null]})]})};const buildStyles=e=>StyleSheet.create({root:{gap:e.space.lg,paddingVertical:e.space.lg},header:{alignItems:"center",gap:e.space.sm},actions:{gap:e.space.sm},link:{alignItems:"center",paddingVertical:e.space.sm}});export default PermissionPrompt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,PermissionPrompt}from"./PermissionPrompt.js";export{usePermissionPrompt}from"./usePermissionPrompt.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{countryFlagEmoji,formatPhoneAsTyped,getFormatterConfig,getPhoneCountries,isSupportedCountry,isValidNationalNumber,maxNationalNumberLength,splitPhoneNumber}from"@webority/mobile-core";import{PHONE_COUNTRY_NAMES}from"@webority/mobile-core/phone/countries";import{forwardRef,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{fontFor,resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,RequiredPlaceholder,resolveFieldTextStyle}from"../FieldBase/index.js";import{Chevron}from"../FieldBase/Chevron.js";import{useFloatingLabel}from"../FieldBase/useFloatingLabel.js";import{OptionSheet}from"../OptionSheet/OptionSheet.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_PHONE_NUMBER_INPUT_LABELS=Object.freeze({placeholder:"Phone number",popular:"Popular",allCountries:"All countries",countrySheetTitle:"Country code",countrySearchPlaceholder:"Search…",invalid:"Enter a valid number",invalidMobile:"Enter a valid mobile number",countryButton:e=>`Country code, currently +${e}`});export const DEFAULT_CALLING_CODES=[{iso:"AU",code:"61",label:"Australia"},{iso:"CA",code:"1",label:"Canada"},{iso:"IN",code:"91",label:"India"},{iso:"SA",code:"966",label:"Saudi Arabia"},{iso:"SG",code:"65",label:"Singapore"},{iso:"AE",code:"971",label:"United Arab Emirates"},{iso:"GB",code:"44",label:"United Kingdom"},{iso:"US",code:"1",label:"United States"}];export const ALL_CALLING_CODES=getPhoneCountries().map(e=>({iso:e.iso,code:e.callingCode,label:PHONE_COUNTRY_NAMES[e.iso]??e.iso})).sort((e,t)=>e.label.localeCompare(t.label));const digitsOnly=e=>e.replace(/[^0-9]/g,"");export const formatE164=e=>`+${e.callingCode}${e.nationalNumber}`;export const parseE164=(e,t,o)=>{const i=e.replace(/[^0-9]/g,"");if(!i)return null;const n=splitPhoneNumber(`+${i}`);let l=n?.callingCode,r=n?.nationalNumber??"";if(!l){const e=Array.from(new Set(t.map(e=>e.code))).sort((e,t)=>t.length-e.length);if(l=e.find(e=>i.startsWith(e)),!l)return null;r=i.slice(l.length)}const a=t.filter(e=>e.code===l),s=a.find(e=>e.iso===o)?.iso??a.find(e=>e.iso===n?.country)?.iso??n?.country??a[0]?.iso??"";return{callingCode:l,nationalNumber:r,iso:s}};const planOf=e=>isSupportedCountry(e)?e:null,assertDefaultCountryVisible=(e,t)=>{if(void 0!==e&&!t.some(t=>t.iso===e))throw new RangeError(`PhoneNumberInput: defaultCountry "${e}" is not among the visible countries. Add it to countries, or remove it from hiddenCountries.`)};export const PhoneNumberInput=forwardRef((e,t)=>{const{value:o,defaultValue:i,onChange:n,e164:l,onChangeE164:r,returnKeyType:a,submitBehavior:s,onSubmitEditing:u,onComplete:d,onValidityChange:c,countries:p=ALL_CALLING_CODES,popularCountries:m,hiddenCountries:b,showFlag:f=!0,renderFlag:h,renderCountry:g,showAlphabetIndex:y,defaultCountry:N,validation:C="any",maxLength:x,formatAsYouType:v=!0,countryLocked:S=!1,label:E,labelMode:T="top",labelStyle:F,placeholder:I,helperText:P,error:L,invalidMessage:_,required:j,disabled:A=!1,size:O="md",variant:V,radius:M,labels:w,haptic:B,accessibilityLabel:D,countryAccessibilityLabel:U,onFocus:k,onBlur:z,style:R,testID:$}=e;assertValidValue("PhoneNumberInput","size",e.size,["sm","md","lg"]),assertValidValue("PhoneNumberInput","variant",e.variant,["outline","filled","underline"]),assertValidValue("PhoneNumberInput","labelMode",e.labelMode,["top","float"]),assertValidValue("PhoneNumberInput","validation",!1===e.validation?void 0:e.validation,["any","mobile"]);const H=useTheme(),W=useMemo(()=>buildStyles(H),[H]),q=useRef(null),G=useMemo(()=>w?{...DEFAULT_PHONE_NUMBER_INPUT_LABELS,...w}:DEFAULT_PHONE_NUMBER_INPUT_LABELS,[w]),Y=I??G.placeholder,K=useMemo(()=>/-([A-Za-z]{2})(?:-|$)/.exec(getFormatterConfig().locale)?.[1]?.toUpperCase(),[]),Z=useMemo(()=>b?.length?p.filter(e=>!b.includes(e.iso)):p,[p,b]),J=useMemo(()=>{if(!m?.length)return;const e=m.map(e=>Z.find(t=>t.iso===e)).filter(e=>void 0!==e);return e.length?[{title:G.popular,options:e},{title:G.allCountries,options:Z}]:void 0},[m,G.popular,G.allCountries,Z]),Q=useCallback((e,t,o)=>{if(!e)return null;if(h)return h(e);if(!f)return null;const i=countryFlagEmoji(e.iso);return i?_jsx(Text,{variant:"body",style:[W.flag,{fontSize:t}],testID:o,children:i}):null},[h,f,W.flag]),X=useCallback(e=>{const t=planOf(e),o=t?maxNationalNumberLength(t,!1===C?"any":C):Number.POSITIVE_INFINITY;return x?Math.min(o,x):o},[x,C]),ee=useCallback((e,t)=>e.slice(0,X(t)),[X]),te=useCallback((e,t)=>{const o=planOf(t)??void 0,i=splitPhoneNumber(e,o);if(!i)return null;const n=i.country??t,l=p.find(e=>e.iso===n);return{callingCode:l?.code??i.callingCode,nationalNumber:ee(i.nationalNumber,n),iso:l?.iso??n}},[p,ee]);useState(()=>assertDefaultCountryVisible(N,Z));const oe=useMemo(()=>{const e=Z.find(e=>e.iso===(N??K))??Z[0]??p[0],t={callingCode:e?.code??"",nationalNumber:"",iso:e?.iso??""};return"string"==typeof i?te(i,t.iso)??t:i??t},[p,Z,N,K,i,te]),ie=useCallback(e=>{if(!1===C)return e.nationalNumber.length>0;const t=planOf(e.iso);return t?isValidNationalNumber(e.nationalNumber,t,C):e.nationalNumber.length>0},[C]),[ne,le]=useState(oe.iso),re=useMemo(()=>{if(void 0===l)return;const e=l?parseE164(l,p,ne):null;if(e)return{...e,nationalNumber:ee(e.nationalNumber,e.iso)};const t=p.find(e=>e.iso===ne);return{callingCode:t?.code??oe.callingCode,nationalNumber:"",iso:ne}},[l,p,ne,oe.callingCode,ee]),ae=useCallback(e=>{le(e.iso),n?.(e),r?.(e.nationalNumber?formatE164(e):"",{country:p.find(t=>t.iso===e.iso),national:e.nationalNumber,valid:ie(e)})},[n,r,p,ie]),[se,ue]=useControllableState({value:o??re,defaultValue:oe,onChange:ae}),[de,ce]=useState(!1),pe=useCallback(()=>{A||q.current?.focus()},[A]),[me,be]=useState(!1),[fe,he]=useState(!1),[ge,ye]=useState(!1),Ne=useRef(!1);useEffect(()=>{ge||(Ne.current=!1)},[ge]);const Ce=resolveFieldSize(H,O),xe=resolveFieldTextStyle(H,{disabled:A}),ve=V??H.settings.components.field?.defaultVariant??"outline",Se="underline"===ve,Ee=H.space.md,[Te,Fe]=useState(0),Ie=Te+Ee+1+Ee,Pe=se.nationalNumber.length>0,Le=j&&!E&&!Pe&&Y.length>0,je=de||Pe,Ae=Boolean(E)&&"float"===T&&Te>0,Oe=useFloatingLabel({label:E,enabled:Ae,floated:je,required:j,variant:ve,sizeTokens:Ce,leadingOffset:Ie,paddingLeft:Se?H.space.none:Ce["padding-x"],color:H.colors["field-label"],style:F}),Ve=useMemo(()=>p.find(e=>e.iso===se.iso),[p,se.iso]),Me=planOf(se.iso),we=v&&Me?formatPhoneAsTyped(se.nationalNumber,Me):se.nationalNumber,Be=X(se.iso),De=0===se.nationalNumber.length||me||!Number.isFinite(Be)?void 0:we.length+Math.max(0,Be-se.nationalNumber.length),Ue=ie(se);useEffect(()=>{Pe||he(!1)},[Pe]);const ke=Me?maxNationalNumberLength(Me,!1===C?"any":C):Number.POSITIVE_INFINITY,ze=se.nationalNumber.length>=ke,Re=!1!==C&&!1!==_&&Pe&&!Ue&&(fe||ze),$e="mobile"===C?G.invalidMobile:G.invalid,He=hasFieldText(L)?L:Re?_||$e:void 0,We=!0===L||hasFieldText(He),qe=useRef(Ue),Ge=useRef(se);Ge.current=se,useEffect(()=>{qe.current!==Ue&&(qe.current=Ue,c?.(Ue),Ue&&d?.(formatE164(Ge.current)))},[Ue,d,c]);const Ye=useCallback(e=>{if(e.includes("+")){const t=te(e,se.iso);if(t&&!S&&Z.some(e=>e.iso===t.iso))return void ue(t);if(t&&t.iso===se.iso)return void ue(t)}ue({...se,nationalNumber:ee(digitsOnly(e),se.iso)})},[Z,S,se,te,ee,ue]),Ke=useCallback(e=>{ue({callingCode:e.code,iso:e.iso,nationalNumber:ee(se.nationalNumber,e.iso)}),ye(!1);const t=resolveHaptic(B,"selection");t&&triggerHaptic(t)},[se,B,ee,ue]);useImperativeHandle(t,()=>({focus:()=>q.current?.focus(),blur:()=>q.current?.blur(),clear:()=>ue({...Ge.current,nationalNumber:""}),isFocused:()=>q.current?.isFocused()??!1,getValue:()=>Ge.current,getE164:()=>formatE164(Ge.current),getFormatted:()=>{const e=Ge.current,t=planOf(e.iso);return t?formatPhoneAsTyped(e.nationalNumber,t):e.nationalNumber},isValid:()=>ie(Ge.current),getCountry:()=>p.find(e=>e.iso===Ge.current.iso)}),[p,ie,ue]);const Ze=A||S,Je=_jsx(FieldBase,{testID:$?`${$}-field`:void 0,size:O,variant:ve,radius:M,topNotch:Oe.topNotch,focused:de,disabled:A,error:We,filled:Pe,onPress:pe,pressFeedback:!1,leadingDivider:!0,paddingLeft:Se?H.space.none:void 0,leading:_jsxs(Pressable,{onPress:()=>{Ze||(Ne.current=!0,ye(!0))},disabled:Ze,accessibilityRole:"button",accessibilityLabel:U??G.countryButton(se.callingCode),accessibilityState:{disabled:Ze},"aria-disabled":Ze,hitSlop:6,...hitSlopMarker(6),onLayout:e=>{const{width:t}=e.nativeEvent.layout;Fe(e=>e===t?e:t)},style:W.codeTrigger,testID:$?`${$}-code`:void 0,children:[Q(Ve,Ce.text,$?`${$}-flag`:void 0),_jsx(Text,{variant:"body",style:[W.codeText,{color:xe.color,fontSize:Ce.text}],children:`+${se.callingCode}`}),S?null:_jsx(Chevron,{color:A?H.colors["field-icon-disabled"]:H.colors["field-icon"],size:Ce.icon,open:ge})]}),children:_jsxs(View,{style:W.inputWrap,children:[_jsx(TextInput,{ref:q,value:we,maxLength:De,onChangeText:Ye,returnKeyType:a,submitBehavior:s,onSubmitEditing:u,onSelectionChange:e=>{const{start:t,end:o}=e.nativeEvent.selection;be(t!==o)},onFocus:()=>{ce(!0),k?.()},onBlur:()=>{ce(!1),Pe&&!Ne.current&&he(!0),z?.()},editable:!A,placeholder:Ae&&!je||Le?void 0:Y,placeholderTextColor:xe.placeholderColor,accessibilityLabel:D??E??Y,selectionColor:H.colors["field-caret"],keyboardType:"phone-pad",textContentType:"telephoneNumber",autoComplete:"tel",style:[W.input,{color:xe.color,fontSize:Ce.text,...xe.weightStyle,paddingLeft:Se?H.space.none:void 0}],testID:$?`${$}-input`:void 0}),Le?_jsx(RequiredPlaceholder,{text:Y,color:xe.placeholderColor,fontSize:Ce.text,weightStyle:xe.weightStyle}):null]})});return _jsxs(View,{style:R,testID:$,children:[E&&"top"===T?_jsx(FieldLabel,{size:O,required:j,children:E}):null,_jsxs(View,{style:W.fieldWrapper,children:[Je,Oe.node]}),_jsx(FieldMessage,{size:O,error:We,text:We?He:P}),_jsx(OptionSheet,{open:ge,haptic:B,onClose:()=>ye(!1),title:G.countrySheetTitle,options:Z,sections:J,getOptionLabel:e=>`${e.label} (+${e.code})`,getOptionValue:e=>e.iso,getOptionIcon:e=>Q(e,H.text.lg.size),renderOption:g?({option:e,selected:t})=>g(e,{selected:t}):void 0,value:Ve?.iso,onChange:(e,t)=>Ke(t),searchable:Z.length>8,labels:{searchPlaceholder:G.countrySearchPlaceholder},alphabetIndex:y??Z.length>20})]})});PhoneNumberInput.displayName="PhoneNumberInput";const buildStyles=e=>StyleSheet.create({fieldWrapper:{position:"relative",overflow:"visible"},codeTrigger:{flexDirection:"row",alignItems:"center",gap:e.space.xxs},flag:{includeFontPadding:!1,marginRight:e.space.xs},codeText:{...fontFor(e,"semibold"),fontWeight:"600",includeFontPadding:!1,writingDirection:"ltr"},input:{padding:e.space.none,margin:e.space.none,includeFontPadding:!1,writingDirection:"ltr"},inputWrap:{flex:1,alignSelf:"stretch",justifyContent:"center"}});export default PhoneNumberInput;
|
|
1
|
+
"use strict";import{countryFlagEmoji,formatPhoneAsTyped,getFormatterConfig,getPhoneCountries,isSupportedCountry,isValidNationalNumber,maxNationalNumberLength,splitPhoneNumber}from"@webority/mobile-core";import{PHONE_COUNTRY_NAMES}from"@webority/mobile-core/phone/countries";import{forwardRef,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{fillText,useMobileUiText}from"../../text/index.js";import{PHONE_NUMBER_INPUT_TEXT}from"../../text/phone/phoneNumberInput.g.js";import{fontFor,resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,RequiredPlaceholder,resolveFieldTextStyle}from"../FieldBase/index.js";import{Chevron}from"../FieldBase/Chevron.js";import{useFloatingLabel}from"../FieldBase/useFloatingLabel.js";import{OptionSheet}from"../OptionSheet/OptionSheet.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_CALLING_CODES=[{iso:"AU",code:"61",label:"Australia"},{iso:"CA",code:"1",label:"Canada"},{iso:"IN",code:"91",label:"India"},{iso:"SA",code:"966",label:"Saudi Arabia"},{iso:"SG",code:"65",label:"Singapore"},{iso:"AE",code:"971",label:"United Arab Emirates"},{iso:"GB",code:"44",label:"United Kingdom"},{iso:"US",code:"1",label:"United States"}];export const ALL_CALLING_CODES=getPhoneCountries().map(e=>({iso:e.iso,code:e.callingCode,label:PHONE_COUNTRY_NAMES[e.iso]??e.iso})).sort((e,t)=>e.label.localeCompare(t.label));const digitsOnly=e=>e.replace(/[^0-9]/g,"");export const formatE164=e=>`+${e.callingCode}${e.nationalNumber}`;export const parseE164=(e,t,o)=>{const i=e.replace(/[^0-9]/g,"");if(!i)return null;const n=splitPhoneNumber(`+${i}`);let l=n?.callingCode,a=n?.nationalNumber??"";if(!l){const e=Array.from(new Set(t.map(e=>e.code))).sort((e,t)=>t.length-e.length);if(l=e.find(e=>i.startsWith(e)),!l)return null;a=i.slice(l.length)}const r=t.filter(e=>e.code===l),s=r.find(e=>e.iso===o)?.iso??r.find(e=>e.iso===n?.country)?.iso??n?.country??r[0]?.iso??"";return{callingCode:l,nationalNumber:a,iso:s}};const planOf=e=>isSupportedCountry(e)?e:null,assertDefaultCountryVisible=(e,t)=>{if(void 0!==e&&!t.some(t=>t.iso===e))throw new RangeError(`PhoneNumberInput: defaultCountry "${e}" is not among the visible countries. Add it to countries, or remove it from hiddenCountries.`)};export const PhoneNumberInput=forwardRef((e,t)=>{const{value:o,defaultValue:i,onChange:n,e164:l,onChangeE164:a,returnKeyType:r,submitBehavior:s,onSubmitEditing:u,onComplete:d,onValidityChange:c,countries:p=ALL_CALLING_CODES,popularCountries:m,hiddenCountries:b,showFlag:f=!0,renderFlag:h,renderCountry:g,showAlphabetIndex:N,defaultCountry:x,validation:C="any",maxLength:y,formatAsYouType:v=!0,countryLocked:S=!1,label:T,labelMode:I="top",labelStyle:F,placeholder:E,helperText:P,error:j,invalidMessage:_,required:L,disabled:V=!1,size:O="md",variant:M,radius:A,labels:w,haptic:k,accessibilityLabel:z,countryAccessibilityLabel:D,onFocus:R,onBlur:U,style:B,testID:$}=e;assertValidValue("PhoneNumberInput","size",e.size,["sm","md","lg"]),assertValidValue("PhoneNumberInput","variant",e.variant,["outline","filled","underline"]),assertValidValue("PhoneNumberInput","labelMode",e.labelMode,["top","float"]),assertValidValue("PhoneNumberInput","validation",!1===e.validation?void 0:e.validation,["any","mobile"]);const H=useTheme(),W=useMemo(()=>buildStyles(H),[H]),q=useRef(null),G=useMobileUiText("phoneNumberInput",PHONE_NUMBER_INPUT_TEXT),Y=useMemo(()=>({...G,...w}),[G,w]),K=E??Y.placeholder,X=useMemo(()=>/-([A-Za-z]{2})(?:-|$)/.exec(getFormatterConfig().locale)?.[1]?.toUpperCase(),[]),Z=useMemo(()=>b?.length?p.filter(e=>!b.includes(e.iso)):p,[p,b]),J=useMemo(()=>{if(!m?.length)return;const e=m.map(e=>Z.find(t=>t.iso===e)).filter(e=>void 0!==e);return e.length?[{title:Y.popular,options:e},{title:Y.allCountries,options:Z}]:void 0},[m,Y.popular,Y.allCountries,Z]),Q=useCallback((e,t,o)=>{if(!e)return null;if(h)return h(e);if(!f)return null;const i=countryFlagEmoji(e.iso);return i?_jsx(Text,{variant:"body",style:[W.flag,{fontSize:t}],testID:o,children:i}):null},[h,f,W.flag]),ee=useCallback(e=>{const t=planOf(e),o=t?maxNationalNumberLength(t,!1===C?"any":C):Number.POSITIVE_INFINITY;return y?Math.min(o,y):o},[y,C]),te=useCallback((e,t)=>e.slice(0,ee(t)),[ee]),oe=useCallback((e,t)=>{const o=planOf(t)??void 0,i=splitPhoneNumber(e,o);if(!i)return null;const n=i.country??t,l=p.find(e=>e.iso===n);return{callingCode:l?.code??i.callingCode,nationalNumber:te(i.nationalNumber,n),iso:l?.iso??n}},[p,te]);useState(()=>assertDefaultCountryVisible(x,Z));const ie=useMemo(()=>{const e=Z.find(e=>e.iso===(x??X))??Z[0]??p[0],t={callingCode:e?.code??"",nationalNumber:"",iso:e?.iso??""};return"string"==typeof i?oe(i,t.iso)??t:i??t},[p,Z,x,X,i,oe]),ne=useCallback(e=>{if(!1===C)return e.nationalNumber.length>0;const t=planOf(e.iso);return t?isValidNationalNumber(e.nationalNumber,t,C):e.nationalNumber.length>0},[C]),[le,ae]=useState(ie.iso),re=useMemo(()=>{if(void 0===l)return;const e=l?parseE164(l,p,le):null;if(e)return{...e,nationalNumber:te(e.nationalNumber,e.iso)};const t=p.find(e=>e.iso===le);return{callingCode:t?.code??ie.callingCode,nationalNumber:"",iso:le}},[l,p,le,ie.callingCode,te]),se=useCallback(e=>{ae(e.iso),n?.(e),a?.(e.nationalNumber?formatE164(e):"",{country:p.find(t=>t.iso===e.iso),national:e.nationalNumber,valid:ne(e)})},[n,a,p,ne]),[ue,de]=useControllableState({value:o??re,defaultValue:ie,onChange:se}),[ce,pe]=useState(!1),me=useCallback(()=>{V||q.current?.focus()},[V]),[be,fe]=useState(!1),[he,ge]=useState(!1),[Ne,xe]=useState(!1),Ce=useRef(!1);useEffect(()=>{Ne||(Ce.current=!1)},[Ne]);const ye=resolveFieldSize(H,O),ve=resolveFieldTextStyle(H,{disabled:V}),Se=M??H.settings.components.field?.defaultVariant??"outline",Te="underline"===Se,Ie=H.space.md,[Fe,Ee]=useState(0),Pe=Fe+Ie+1+Ie,je=ue.nationalNumber.length>0,Le=L&&!T&&!je&&K.length>0,Ve=ce||je,Oe=Boolean(T)&&"float"===I&&Fe>0,Me=useFloatingLabel({label:T,enabled:Oe,floated:Ve,required:L,variant:Se,sizeTokens:ye,leadingOffset:Pe,paddingLeft:Te?H.space.none:ye["padding-x"],color:H.colors["field-label"],style:F}),Ae=useMemo(()=>p.find(e=>e.iso===ue.iso),[p,ue.iso]),we=planOf(ue.iso),ke=v&&we?formatPhoneAsTyped(ue.nationalNumber,we):ue.nationalNumber,ze=ee(ue.iso),De=0===ue.nationalNumber.length||be||!Number.isFinite(ze)?void 0:ke.length+Math.max(0,ze-ue.nationalNumber.length),Re=ne(ue);useEffect(()=>{je||ge(!1)},[je]);const Ue=we?maxNationalNumberLength(we,!1===C?"any":C):Number.POSITIVE_INFINITY,Be=ue.nationalNumber.length>=Ue,$e=!1!==C&&!1!==_&&je&&!Re&&(he||Be),He="mobile"===C?Y.invalidMobile:Y.invalid,We=hasFieldText(j)?j:$e?_||He:void 0,qe=!0===j||hasFieldText(We),Ge=useRef(Re),Ye=useRef(ue);Ye.current=ue,useEffect(()=>{Ge.current!==Re&&(Ge.current=Re,c?.(Re),Re&&d?.(formatE164(Ye.current)))},[Re,d,c]);const Ke=useCallback(e=>{if(e.includes("+")){const t=oe(e,ue.iso);if(t&&!S&&Z.some(e=>e.iso===t.iso))return void de(t);if(t&&t.iso===ue.iso)return void de(t)}de({...ue,nationalNumber:te(digitsOnly(e),ue.iso)})},[Z,S,ue,oe,te,de]),Xe=useCallback(e=>{de({callingCode:e.code,iso:e.iso,nationalNumber:te(ue.nationalNumber,e.iso)}),xe(!1);const t=resolveHaptic(k,"selection");t&&triggerHaptic(t)},[ue,k,te,de]);useImperativeHandle(t,()=>({focus:()=>q.current?.focus(),blur:()=>q.current?.blur(),clear:()=>de({...Ye.current,nationalNumber:""}),isFocused:()=>q.current?.isFocused()??!1,getValue:()=>Ye.current,getE164:()=>formatE164(Ye.current),getFormatted:()=>{const e=Ye.current,t=planOf(e.iso);return t?formatPhoneAsTyped(e.nationalNumber,t):e.nationalNumber},isValid:()=>ne(Ye.current),getCountry:()=>p.find(e=>e.iso===Ye.current.iso)}),[p,ne,de]);const Ze=V||S,Je=_jsx(FieldBase,{testID:$?`${$}-field`:void 0,size:O,variant:Se,radius:A,topNotch:Me.topNotch,focused:ce,disabled:V,error:qe,filled:je,onPress:me,pressFeedback:!1,leadingDivider:!0,paddingLeft:Te?H.space.none:void 0,leading:_jsxs(Pressable,{onPress:()=>{Ze||(Ce.current=!0,xe(!0))},disabled:Ze,accessibilityRole:"button",accessibilityLabel:D??fillText(Y.countryButton,{callingCode:ue.callingCode}),accessibilityState:{disabled:Ze},"aria-disabled":Ze,hitSlop:6,...hitSlopMarker(6),onLayout:e=>{const{width:t}=e.nativeEvent.layout;Ee(e=>e===t?e:t)},style:W.codeTrigger,testID:$?`${$}-code`:void 0,children:[Q(Ae,ye.text,$?`${$}-flag`:void 0),_jsx(Text,{variant:"body",style:[W.codeText,{color:ve.color,fontSize:ye.text}],children:`+${ue.callingCode}`}),S?null:_jsx(Chevron,{color:V?H.colors["field-icon-disabled"]:H.colors["field-icon"],size:ye.icon,open:Ne})]}),children:_jsxs(View,{style:W.inputWrap,children:[_jsx(TextInput,{ref:q,value:ke,maxLength:De,onChangeText:Ke,returnKeyType:r,submitBehavior:s,onSubmitEditing:u,onSelectionChange:e=>{const{start:t,end:o}=e.nativeEvent.selection;fe(t!==o)},onFocus:()=>{pe(!0),R?.()},onBlur:()=>{pe(!1),je&&!Ce.current&&ge(!0),U?.()},editable:!V,placeholder:Oe&&!Ve||Le?void 0:K,placeholderTextColor:ve.placeholderColor,accessibilityLabel:z??T??K,selectionColor:H.colors["field-caret"],keyboardType:"phone-pad",textContentType:"telephoneNumber",autoComplete:"tel",style:[W.input,{color:ve.color,fontSize:ye.text,...ve.weightStyle,paddingLeft:Te?H.space.none:void 0}],testID:$?`${$}-input`:void 0}),Le?_jsx(RequiredPlaceholder,{text:K,color:ve.placeholderColor,fontSize:ye.text,weightStyle:ve.weightStyle}):null]})});return _jsxs(View,{style:B,testID:$,children:[T&&"top"===I?_jsx(FieldLabel,{size:O,required:L,children:T}):null,_jsxs(View,{style:W.fieldWrapper,children:[Je,Me.node]}),_jsx(FieldMessage,{size:O,error:qe,text:qe?We:P}),_jsx(OptionSheet,{open:Ne,haptic:k,onClose:()=>xe(!1),title:Y.countrySheetTitle,options:Z,sections:J,getOptionLabel:e=>`${e.label} (+${e.code})`,getOptionValue:e=>e.iso,getOptionIcon:e=>Q(e,H.text.lg.size),renderOption:g?({option:e,selected:t})=>g(e,{selected:t}):void 0,value:Ae?.iso,onChange:(e,t)=>Xe(t),searchable:Z.length>8,labels:{searchPlaceholder:Y.countrySearchPlaceholder},alphabetIndex:N??Z.length>20})]})});PhoneNumberInput.displayName="PhoneNumberInput";const buildStyles=e=>StyleSheet.create({fieldWrapper:{position:"relative",overflow:"visible"},codeTrigger:{flexDirection:"row",alignItems:"center",gap:e.space.xxs},flag:{includeFontPadding:!1,marginRight:e.space.xs},codeText:{...fontFor(e,"semibold"),fontWeight:"600",includeFontPadding:!1,writingDirection:"ltr"},input:{padding:e.space.none,margin:e.space.none,includeFontPadding:!1,writingDirection:"ltr"},inputWrap:{flex:1,alignSelf:"stretch",justifyContent:"center"}});export default PhoneNumberInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{ALL_CALLING_CODES,DEFAULT_CALLING_CODES,
|
|
1
|
+
"use strict";export{ALL_CALLING_CODES,DEFAULT_CALLING_CODES,default,formatE164,PhoneNumberInput,parseE164}from"./PhoneNumberInput.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useMemo}from"react";import{StyleSheet,View}from"react-native";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,RequiredMark,resolveFieldTextStyle}from"../FieldBase/index.js";import{Chevron}from"../FieldBase/Chevron.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{forwardRef,useMemo}from"react";import{StyleSheet,View}from"react-native";import{useMobileUiText}from"../../text/index.js";import{PICKER_TRIGGER_TEXT}from"../../text/phone/pickerTrigger.g.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,RequiredMark,resolveFieldTextStyle}from"../FieldBase/index.js";import{Chevron}from"../FieldBase/Chevron.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const PickerTrigger=forwardRef((e,i)=>{assertValidValue("PickerTrigger","size",e.size,["sm","md","lg"]),assertValidValue("PickerTrigger","variant",e.variant,["outline","filled","underline"]);const{value:l,placeholder:r,label:t,help:s,helperText:o,error:a,required:d=!1,onPress:n,clearable:c=!1,onClear:x,leftIcon:u,trailing:g,disabled:m=!1,size:T="md",variant:b,style:y,triggerStyle:h,valueStyle:f,labelStyle:p,messageStyle:j,accessibilityLabel:S,labels:v,testID:F}=e,P=useMobileUiText("pickerTrigger",PICKER_TRIGGER_TEXT),_=useMemo(()=>({...P,...v}),[P,v]),R=useTheme(),z=useMemo(()=>buildStyles(R),[R]),k=resolveFieldSize(R,T),V=resolveFieldTextStyle(R,{disabled:m}),w="string"==typeof l&&l.length>0,M=!0===a||hasFieldText(a),I=hasFieldText(t),C=w?l:r??_.placeholder,E=w?V.color:V.placeholderColor,L=w?`${fieldTextAsString(t)??_.selection}: ${l}`:r??_.noSelection,q=S??L,B={disabled:m},G=void 0===g,D=c&&w&&!m;return _jsxs(View,{style:[z.root,y],testID:F,children:[I?_jsx(FieldLabel,{size:T,required:d,help:s,style:p,children:t}):null,_jsx(FieldBase,{size:T,variant:b,disabled:m,error:M,filled:w,onPress:n,leading:u,trailing:D||G||null!==g?_jsxs(View,{style:z.trailingRow,children:[D?_jsx(Text,{variant:"body",onPress:()=>{m||x?.()},accessibilityRole:"button",accessibilityLabel:_.clear,style:{fontSize:k.icon,color:R.colors["text-muted"],paddingHorizontal:R.space.xs},children:"×"}):null,void 0!==g?g:G?_jsx(Chevron,{size:k.icon,color:m?R.colors["text-disabled"]:R.colors["text-subtle"]}):null]}):null,accessibilityLabel:q,accessibilityState:B,accessibilityRole:"button",style:h,children:_jsxs(Text,{variant:"body",numberOfLines:1,style:[z.valueText,{color:E,fontSize:k.text,...V.weightStyle},f],children:[C,w||!d||I?null:_jsx(RequiredMark,{})]})}),_jsx(FieldMessage,{size:T,error:M,text:M?a:o,style:j})]})});PickerTrigger.displayName="PickerTrigger";const buildStyles=e=>StyleSheet.create({root:{width:"100%"},label:{includeFontPadding:!1},valueText:{flex:1,includeFontPadding:!1},message:{includeFontPadding:!1},trailingRow:{flexDirection:"row",alignItems:"center"}});export{PickerTrigger};export default PickerTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,PickerTrigger}from"./PickerTrigger.js";
|