@webority/mobile-ui 0.164.0 → 0.167.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/LICENSE.txt +1 -1
- package/dist/canvas-kit/kit.js +10 -10
- package/dist/canvas-kit/manifest.json +27 -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/IconBadge/IconBadge.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/TagInput/TagInput.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/useDragToDismiss.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/merge.js +1 -1
- 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/IconBadge/IconBadge.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/TagInput/TagInput.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/useDragToDismiss.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/merge.js +1 -1
- 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 +4 -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 +4 -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 +4 -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 +4 -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 +6 -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 +5 -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 +4 -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 +6 -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 +4 -3
- 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 +4 -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 +4 -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 +3 -14
- 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 +3 -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 +3 -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/Screen/Screen.d.ts +1 -0
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +3 -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 +6 -3
- package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +3 -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/TagInput/TagInput.d.ts +1 -0
- 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/hooks/useDragToDismiss.d.ts +2 -0
- 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 +10 -4
- 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 +4 -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 +4 -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 +4 -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 +4 -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 +6 -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 +5 -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 +4 -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 +6 -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 +4 -3
- 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 +4 -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 +4 -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 +3 -14
- 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 +3 -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 +3 -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/Screen/Screen.d.ts +1 -0
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +3 -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 +6 -3
- package/lib/typescript/module/components/SliderField/SliderField.d.ts +3 -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/TagInput/TagInput.d.ts +1 -0
- 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/hooks/useDragToDismiss.d.ts +2 -0
- 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 +10 -4
- package/package.json +12 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{memo,useMemo}from"react";import{Pressable,ScrollView,StyleSheet,View}from"react-native";import{fontFor,useTheme}from"../../theme/index.js";import{AppIcon}from"../AppIcon/index.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/index.js";import{splitHighlight}from"./highlight.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const TOUCH=44,ICON=18;export const normalizeSuggestion=e=>"string"==typeof e?{text:e}:e;export const SearchScopeBar=({scopes:e,scope:s,disabled:t,haptic:i,labels:o,onChange:
|
|
1
|
+
"use strict";import{memo,useMemo}from"react";import{Pressable,ScrollView,StyleSheet,View}from"react-native";import{fillText}from"../../text/index.js";import{fontFor,useTheme}from"../../theme/index.js";import{AppIcon}from"../AppIcon/index.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/index.js";import{splitHighlight}from"./highlight.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const TOUCH=44,ICON=18;export const normalizeSuggestion=e=>"string"==typeof e?{text:e}:e;export const SearchScopeBar=({scopes:e,scope:s,disabled:t,haptic:i,labels:o,onChange:l})=>{const n=useTheme(),r=useMemo(()=>buildStyles(n),[n]);return _jsx(ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,keyboardShouldPersistTaps:"handled",contentContainerStyle:r.scopes,accessibilityLabel:o.scope,children:e.map(e=>_jsx(Chip,{label:e.label,selected:e.value===s,disabled:t,haptic:i,onPress:()=>l(e.value),style:r.scopeChip},e.value))})};export const SearchRecents=({recents:e,labels:s,onSelect:t,onRemove:i,onClear:o,onHold:l,onRelease:n})=>{const r=useTheme(),c=useMemo(()=>buildStyles(r),[r]);return _jsxs(View,{style:c.list,children:[_jsxs(View,{style:c.header,children:[_jsx(Text,{variant:"label",accessibilityRole:"header",style:c.headerTitle,children:s.recents}),o?_jsx(Pressable,{onPress:o,onPressIn:l,onPressOut:n,accessibilityRole:"button",accessibilityLabel:s.clearAllRecents,style:c.clearAll,children:_jsx(Text,{variant:"label",color:"link",children:s.clearAll})}):null]}),e.map(e=>_jsxs(View,{style:c.row,children:[_jsxs(Pressable,{onPress:()=>t(e),onPressIn:l,onPressOut:n,accessibilityRole:"button",accessibilityLabel:e,accessibilityHint:s.searchAgain,android_ripple:{color:r.colors["surface-pressed"]},style:({pressed:e})=>[c.rowMain,e?{backgroundColor:r.colors["surface-pressed"]}:null],children:[_jsx(View,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:_jsx(AppIcon,{name:"history",size:18,color:r.colors["text-subtle"]})}),_jsx(Text,{variant:"body",numberOfLines:1,style:c.rowText,children:e})]}),i?_jsx(Pressable,{onPress:()=>i(e),onPressIn:l,onPressOut:n,accessibilityRole:"button",accessibilityLabel:fillText(s.removeRecent,{text:e}),style:c.remove,children:_jsx(View,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:_jsx(AppIcon,{name:"x",size:18,color:r.colors["text-muted"]})})}):null]},e))]})};const SuggestionRow=memo(({item:e,query:s,onSelect:t,onHold:i,onRelease:o,theme:l,styles:n})=>{const r=splitHighlight(e.text,s),c=e.icon?renderSlotIcon(e.icon,{size:18,color:l.colors["text-subtle"],disabled:!1}):_jsx(AppIcon,{name:"search",size:18,color:l.colors["text-subtle"]});return _jsxs(Pressable,{onPress:()=>t(e),onPressIn:i,onPressOut:o,accessibilityRole:"button",accessibilityLabel:e.subtitle?`${e.text}, ${e.subtitle}`:e.text,android_ripple:{color:l.colors["surface-pressed"]},style:({pressed:e})=>[n.rowMain,n.suggestion,e?{backgroundColor:l.colors["surface-pressed"]}:null],children:[_jsx(View,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:c}),_jsxs(View,{style:n.rowText,children:[_jsx(Text,{variant:"body",color:"secondary",numberOfLines:1,children:r.map(e=>_jsx(Text,{variant:"body",color:"secondary",style:e.match?n.match:void 0,children:e.text},e.start))}),e.subtitle?_jsx(Text,{variant:"caption",numberOfLines:1,children:e.subtitle}):null]})]})});SuggestionRow.displayName="SuggestionRow";export const SearchSuggestions=({suggestions:e,query:s,onSelect:t,onHold:i,onRelease:o})=>{const l=useTheme(),n=useMemo(()=>buildStyles(l),[l]);return _jsx(View,{style:n.list,children:e.map(e=>_jsx(SuggestionRow,{item:e,query:s,onSelect:t,onHold:i,onRelease:o,theme:l,styles:n},e.id??e.text))})};const buildStyles=e=>({...StyleSheet.create({scopes:{flexDirection:"row",alignItems:"center",gap:e.space.sm,paddingTop:e.space.sm},scopeChip:{minHeight:44},list:{width:"100%",paddingTop:e.space.xs},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",minHeight:44,paddingHorizontal:e.space.xs},headerTitle:{flex:1},clearAll:{minHeight:44,minWidth:44,justifyContent:"center",alignItems:"flex-end"},row:{flexDirection:"row",alignItems:"center"},rowMain:{flex:1,flexDirection:"row",alignItems:"center",gap:e.space.md,minHeight:44,paddingHorizontal:e.space.xs},suggestion:{paddingVertical:e.space.xs},rowText:{flex:1},remove:{width:44,height:44,alignItems:"center",justifyContent:"center"}}),match:{...fontFor(e,"bold"),color:e.colors["text-body"]}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,SearchBar}from"./SearchBar.js";export{useRecentSearches}from"./useRecentSearches.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useMemo}from"react";import{View}from"react-native";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Button}from"../Button/index.js";import{RequiredMark}from"../FieldBase/index.js";import{Text}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const
|
|
1
|
+
"use strict";import{useMemo}from"react";import{View}from"react-native";import{fillText,useMobileUiText}from"../../text/index.js";import{SECTION_HEADER_TEXT}from"../../text/phone/sectionHeader.g.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Button}from"../Button/index.js";import{RequiredMark}from"../FieldBase/index.js";import{Text}from"../Text/Text.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const SectionHeader=e=>{const{children:t,variant:i,flush:s,flushBottom:r=!1,required:o=!1,action:a,labels:l,style:n,testID:m}=e;assertValidValue("SectionHeader","variant",e.variant,["title","caps","sub"]);const c=useTheme(),u=c.settings.components["section-header"],d=i??u?.defaultVariant??"title",x=s??u?.defaultFlush??!1,p=useMobileUiText("sectionHeader",SECTION_HEADER_TEXT),f=useMemo(()=>({...p,...l}),[p,l]),h=useMemo(()=>({marginTop:x?0:c.space.lg,marginBottom:r?0:c.space.sm}),[c,x,r]),j=useMemo(()=>({flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:c.space.sm}),[c]),T=useMemo(()=>({flex:1}),[]),v="caps"===d?{variant:"overline",color:"tertiary",weight:void 0}:"sub"===d?{variant:"label",color:"primary",weight:"semibold"}:{variant:"title",color:void 0,weight:void 0},g=_jsxs(Text,{variant:v.variant,color:v.color,weight:v.weight,accessibilityRole:"header",accessibilityLabel:o&&"string"==typeof t?fillText(f.required,{heading:t}):void 0,style:a?T:[h,n],testID:m,children:[t,o?_jsx(RequiredMark,{}):null]});return a?_jsxs(View,{style:[j,h,n],children:[g,_jsx(Button,{variant:"link",size:"sm",label:a.label,onPress:a.onPress,testID:a.testID})]}):g};export default SectionHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,SectionHeader}from"./SectionHeader.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{createAnimatedValue,resolveSegmentedControlSize,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{nativeDriver}from"../../utils/nativeDriver.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{FieldLabel,FieldMessage,hasFieldText}from"../FieldBase/index.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const LABEL_LINE_HEIGHT_RATIO=1.25,activeInkFor=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"neutral":return e.colors["text-body"];case"success":return e.colors["success-text"];case"warning":return e.colors["warning-text"];case"danger":return e.colors["danger-text"];case"info":return e.colors["info-text"]}},SegmentedControl=forwardRef((e,t)=>{const{segments:r,label:
|
|
1
|
+
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Animated,Pressable,StyleSheet,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{createAnimatedValue,resolveSegmentedControlSize,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{nativeDriver}from"../../utils/nativeDriver.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{FieldLabel,FieldMessage,hasFieldText}from"../FieldBase/index.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const LABEL_LINE_HEIGHT_RATIO=1.25,activeInkFor=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"neutral":return e.colors["text-body"];case"success":return e.colors["success-text"];case"warning":return e.colors["warning-text"];case"danger":return e.colors["danger-text"];case"info":return e.colors["info-text"]}},SegmentedControl=forwardRef((e,t)=>{const{segments:r,label:s,helperText:i,error:l,value:o,defaultValue:n,onChange:a,size:d="md",fullWidth:c=!0,disabled:u=!1,tone:m="primary",variant:h="segmented",radius:g,labelLines:p=1,haptic:f,accessibilityLabel:b,style:x,segmentStyle:y,selectedIndicatorStyle:S,textStyle:v,labelStyle:w,testID:C}=e;assertValidValue("SegmentedControl","size",e.size,["sm","md","lg"]),assertValidValue("SegmentedControl","tone",e.tone,["primary","success","warning","danger","info","neutral"]),assertValidValue("SegmentedControl","variant",e.variant,["underline","pills","segmented"]);const[j]=r;if(void 0===j)throw new Error("SegmentedControl needs at least one segment");const[V,k]=useControllableState({value:o,defaultValue:n??j.value,onChange:e=>{null!==e&&a?.(e)}}),F=useTheme(),I=F.components["segmented-control"],L=useMemo(()=>buildStyles(F),[F]),_=useMemo(()=>resolveSegmentedControlSize(F,d),[F,d]),z=p>=2?2:1,M=z>1,R="segmented"===h,T="underline"===h,E="pills"===h,A=R?F.space[I["track-padding"]]:0,D=Math.ceil(1.25*_.text)*(z-1),H=I["underline-height"],q=F.space[I["pill-inset"]],B="number"==typeof g?g:g?F.radius[g]:void 0,W=B??F.radius.md,P=void 0===B?F.radius.sm:Math.max(B-A,0),N=B??F.radius.pill,G=B??F.radius.none,[O,X]=useState([]),J=useRef(createAnimatedValue(0)).current,K=Math.max(0,r.findIndex(e=>e.value===V)),Q=O[K],U=Q?.x,Y=useCallback(e=>{const t=F.motion.spring.snappy,r=Animated.spring(J,{toValue:e,damping:t.damping,stiffness:t.stiffness,mass:t.mass,overshootClamping:!0,useNativeDriver:nativeDriver});return r.start(),r},[F.motion.spring.snappy,J]);useEffect(()=>{X(e=>e.length===r.length||0===e.length?e:[])},[r.length]);const Z=useRef(null);useEffect(()=>{if(void 0===U)return;const e=null!==Z.current&&Z.current!==K;if(Z.current=K,!e)return void J.setValue(U);const t=Y(U);return()=>t.stop()},[K,U,Y,J]);const $=useCallback((e,t)=>{const{x:r,width:s}=t.nativeEvent.layout;X(t=>{const i=t[e];if(i&&i.x===r&&i.width===s)return t;const l=t.slice();return l[e]={x:r,width:s},l})},[]),ee=useCallback(e=>{if(u)return;if(e.value===V)return;const t=resolveHaptic(f,"selection");t&&triggerHaptic(t),k(e.value)},[u,k,V,f]),te=R?F.colors.thumb:E?F.colors["primary-soft"]:F.colors.primary,re=R?P:E?N:G,se=activeInkFor(F,m),ie=F.colors["bg-muted"],le=useSquircle(R,W),oe=!0===l||hasFieldText(l),ne=oe&&!u,ae=F.colors["field-border-error"],de=F.size.border,ce=hasFieldText(s),ue=oe?l:i,me=hasFieldText(ue),he=_jsxs(View,{ref:t,accessibilityRole:"radiogroup",accessibilityLabel:b??("string"==typeof s?s:void 0),testID:C,style:[L.track,{...M?{minHeight:_.height+D}:{height:_.height},opacity:u?.55:1,alignSelf:c?"stretch":"flex-start"},R?{borderRadius:W,...smoothCorners,backgroundColor:le.active?"transparent":ie,padding:A}:T?{borderBottomColor:ne?ae:F.colors["border-subtle"],borderBottomWidth:StyleSheet.hairlineWidth}:null,x],onLayout:le.onLayout,children:[le.active&&le.size?_jsx(SquircleFill,{width:le.size.width,height:le.size.height,radius:W,fill:ie,stroke:ne?ae:void 0,strokeWidth:de}):null,_jsxs(View,{style:L.row,children:[Q?_jsx(Animated.View,{pointerEvents:"none",style:[L.thumb,R?M?{top:0,bottom:0}:{top:0,height:_.height-2*A}:E?{top:q,bottom:q,left:q}:{bottom:0,height:H},{width:E?Math.max(Q.width-2*q,0):Q.width,borderRadius:re,...smoothCorners,backgroundColor:te,transform:[{translateX:J}]},S]}):null,r.map((e,t)=>{const r=e.value===V,s=r?se:F.colors["text-subtle"],i=renderSlotIcon(e.icon,{color:s,size:_.icon,selected:r,disabled:u});return _jsxs(Pressable,{onPress:()=>ee(e),onLayout:e=>$(t,e),disabled:u,accessibilityRole:"radio",accessibilityLabel:e.label,accessibilityState:{checked:r,selected:r,disabled:u},"aria-checked":r,"aria-disabled":u,style:({pressed:e})=>[L.segment,M?L.segmentMultiline:null,{paddingHorizontal:_["padding-x"],opacity:e&&!r?.7:1},y],children:[i?_jsx(View,{style:L.segmentIcon,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:i}):null,_jsx(Text,{variant:"label",weight:r?"semibold":"medium",style:[L.segmentLabel,M?L.segmentLabelMultiline:null,{color:s,fontSize:_.text},v,w],numberOfLines:z,children:e.label})]},String(e.value))})]}),!ne||T||le.active?null:_jsx(View,{pointerEvents:"none",style:[StyleSheet.absoluteFill,{borderWidth:de,borderColor:ae,borderRadius:R?W:N,...smoothCorners}]})]});return ce||me?_jsxs(View,{style:{alignSelf:c?"stretch":"flex-start"},children:[ce?_jsx(FieldLabel,{size:d,children:s}):null,he,me?_jsx(FieldMessage,{size:d,text:ue,error:oe}):null]}):he});SegmentedControl.displayName="SegmentedControl";const buildStyles=e=>StyleSheet.create({track:{flexDirection:"row",alignItems:"stretch",position:"relative"},row:{flex:1,flexDirection:"row",alignItems:"stretch",position:"relative",overflow:"hidden"},thumb:{position:"absolute",left:0},segment:{flexGrow:1,flexShrink:1,flexBasis:"auto",flexDirection:"row",alignItems:"center",justifyContent:"center"},segmentIcon:{marginRight:e.space.xs},segmentMultiline:{paddingVertical:e.space.xs},segmentLabel:{includeFontPadding:!1},segmentLabelMultiline:{flexShrink:1,textAlign:"center"}});export{SegmentedControl};export default SegmentedControl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{renderSlotIcon,slotIconView}from"../AppIcon/slotIcon.js";import{Chevron}from"../FieldBase/Chevron.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,RequiredMark,resolveFieldTextStyle,resolveVariantColors}from"../FieldBase/FieldBase.js";import{
|
|
1
|
+
"use strict";import{useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import{fillText,useMobileUiText}from"../../text/index.js";import{SELECT_TEXT}from"../../text/phone/select.g.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{renderSlotIcon,slotIconView}from"../AppIcon/slotIcon.js";import{Chevron}from"../FieldBase/Chevron.js";import{FieldBase,FieldLabel,FieldMessage,fieldTextAsString,hasFieldText,RequiredMark,resolveFieldTextStyle,resolveVariantColors}from"../FieldBase/FieldBase.js";import{OptionSheet}from"../OptionSheet/OptionSheet.js";import{selectOptionDescription,selectOptionDisabled,selectOptionIcon,selectOptionLabel,selectOptionValue}from"../OptionSheet/optionAccessors.js";import{Text}from"../Text/index.js";import{TextInkContext}from"../Text/textInk.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const sameSelectValue=(e,t)=>String(e)===String(t),containsValue=(e,t)=>e.some(e=>sameSelectValue(e,t));function Select(e){assertValidValue("Select","size",e.size,["sm","md","lg"]),assertValidValue("Select","variant",e.variant,["outline","filled","underline"]);const{options:t,getOptionLabel:l,getOptionValue:i,isOptionDisabled:o,getOptionDescription:s,getOptionIcon:n,placeholder:r,onOpenChange:a,searchable:c=!1,haptic:d,labels:p,label:u,help:x,title:h,required:m=!1,error:f,helperText:g,prefix:S,numberOfLines:b=1,disabled:v=!1,size:y="md",variant:T,leftIcon:j,rightIcon:O,chevronColor:C,chevronSize:V,radius:F,accessibilityLabel:I,labelStyle:k,style:_,triggerStyle:z,textStyle:L,optionStyle:H,selectedOptionStyle:M,optionTextStyle:D,selectedOptionTextStyle:w,testID:P,ref:E}=e,R=!0===e.multi,A={...useMobileUiText("select",SELECT_TEXT),...p},B=useCallback(e=>l?l(e):selectOptionLabel(e),[l]),N=useCallback(e=>i?i(e):selectOptionValue(e),[i]),q=useCallback(e=>o?o(e):selectOptionDisabled(e),[o]),U=useCallback(e=>s?s(e):selectOptionDescription(e),[s]),X=useCallback(e=>n?n(e):selectOptionIcon(e),[n]),$=useTheme(),G=useMemo(()=>buildStyles($),[$]),J=resolveFieldSize($,y),K=resolveFieldTextStyle($,{disabled:v}),Q=T??$.settings.components.select?.defaultVariant??$.settings.components.field?.defaultVariant??"outline",[W,Y]=useState(!1),Z=useMemo(()=>{if(R){const l=e.value??[];return t.filter(e=>containsValue(l,N(e)))}const l=e.value;if(null==l)return[];const i=t.find(e=>sameSelectValue(N(e),l));return i?[i]:[]},[R,t,e.value,N]),ee=useCallback(()=>{if(v)return;const e=resolveHaptic(d,"selection");e&&triggerHaptic(e),Y(!0)},[v,d]),te=useCallback(()=>{Y(!1)},[]),le=useCallback(t=>{if(q(t))return;const l=N(t),i=resolveHaptic(d,"selection");if(i&&triggerHaptic(i),R){const t=e.value??[],i=containsValue(t,l)?t.filter(e=>!sameSelectValue(e,l)):[...t,l];return void e.onChange(i)}e.onChange(l),te()},[R,e,te,q,N,d]),ie=0===Z.length?r??A.placeholder:Z.map(e=>B(e)).join(", "),oe=0===Z.length,se=!0===f||hasFieldText(f),ne=hasFieldText(u),re=fieldTextAsString(u),ae=Math.round(1.4*J.text),ce=useMemo(()=>({fontSize:J.text,color:K.placeholderColor}),[J.text,K.placeholderColor]),de={color:v?$.colors["field-icon-disabled"]:W?$.colors["field-icon-focus"]:$.colors["field-icon"],size:J.icon,disabled:v,focused:W,error:se},pe=0===Z.length?r??A.noSelection:fillText(A.selected,{summary:Z.map(e=>B(e)).join(", ")}),ue=I??`${re??A.fallbackName}. ${pe}`;return _jsxs(View,{style:[G.container,_],testID:P,children:[ne?_jsx(FieldLabel,{size:y,required:m,help:x,style:k,children:u}):null,_jsx(View,{ref:E,collapsable:!1,children:_jsxs(FieldBase,{size:y,variant:Q,disabled:v,error:se,filled:Z.length>0,onPress:ee,radius:F,paddingHorizontal:"underline"===Q?$.space.none:void 0,accessibilityRole:"button",accessibilityLabel:ue,accessibilityState:{disabled:v,expanded:W},"aria-disabled":v,"aria-expanded":W,style:z,slotAlign:1===b?"center":"top",slotLineHeight:1===b?void 0:ae,leading:j?slotIconView(j,renderSlotIcon(j,de)):null,trailing:O?slotIconView(O,renderSlotIcon(O,de)):_jsx(Chevron,{color:C??(v?$.colors["text-disabled"]:$.colors["text-subtle"]),size:V??J.icon,open:W,style:G.chevron}),children:[hasFieldText(S)?"string"==typeof S||"number"==typeof S?_jsx(Text,{variant:"body",style:[G.prefix,{color:K.placeholderColor,fontSize:J.text,lineHeight:1===b?void 0:ae,marginRight:$.space.xs}],children:S}):_jsx(View,{style:[G.prefixNode,{minHeight:1===b?void 0:ae,justifyContent:"center",marginRight:$.space.xs}],children:_jsx(Text,{variant:"body",style:[G.prefix,{color:K.placeholderColor,fontSize:J.text,lineHeight:1===b?void 0:ae}],children:_jsx(TextInkContext.Provider,{value:ce,children:S})})}):null,_jsxs(Text,{variant:"body",style:[G.triggerText,{color:oe?K.placeholderColor:K.color,fontSize:J.text,lineHeight:1===b?void 0:ae,...K.weightStyle},L],numberOfLines:b,children:[ie,oe&&m&&!ne?_jsx(RequiredMark,{}):null]})]})}),_jsx(FieldMessage,{size:y,error:se,text:se?f:g}),_jsx(OptionSheet,{open:W,onClose:te,onOpenChange:a,haptic:d,title:h??re,accessibilityLabel:re??(ne?h:void 0)??r??A.sheetName,options:t,getOptionLabel:B,getOptionValue:N,isOptionDisabled:q,getOptionDescription:U,getOptionIcon:X,value:e.value,onChange:(e,t)=>le(t),multi:R,searchable:c,labels:{...void 0===A.searchPlaceholder?{}:{searchPlaceholder:A.searchPlaceholder},...void 0===A.empty?{}:{empty:A.empty}},optionStyle:H,selectedOptionStyle:M,optionTextStyle:D,selectedOptionTextStyle:w,searchSelectionColor:resolveVariantColors($,Q).borderFocusedRepresentative})]})}Select.displayName="Select";const buildStyles=e=>StyleSheet.create({container:{width:"100%"},label:{includeFontPadding:!1},triggerText:{flex:1,includeFontPadding:!1},errorText:{includeFontPadding:!1},prefix:{flexShrink:0,includeFontPadding:!1},prefixNode:{flexShrink:0},chevron:{marginLeft:e.space.sm}});export{Select};export default Select;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,Select}from"./Select.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{formatDateTime}from"@webority/mobile-core";import{forwardRef,memo,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Modal,PixelRatio,Platform,StyleSheet,useWindowDimensions,View}from"react-native";import{GestureDetector,GestureHandlerRootView,useCompetingGestures,usePanGesture}from"react-native-gesture-handler";import Svg,{Path,Rect,Text as SvgText}from"react-native-svg";import{lightTheme,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{Button}from"../Button/index.js";import{Input}from"../Input/index.js";import{Text}from"../Text/index.js";import{BASELINE_RATIO,buildSignatureSvg,distanceBetween,FALLBACK_WIDTH,pointOf,strokePath,typedFontSize}from"./signatureGeometry.js";import{writePng}from"./writePng";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_SIGNATURE_PAD_LABELS=Object.freeze({pad:"Signature pad",padHint:"Draw with one finger. To sign without drawing, use the type your name action.",caption:"Sign above the line. To start with an up or down stroke, rest your finger a moment first.",typedCaption:"Your typed name is used as your signature.",undo:"Undo",clear:"Clear",typeInstead:"Type your name instead",drawInstead:"Draw instead",typedLabel:"Type your name",typedPlaceholder:"Your full name",empty:"Not signed",signed:"Signed",typingAnnouncement:"Signing by typing your name. Your typed name is used as your signature. Choose Draw instead to sign with your finger.",drawingAnnouncement:"Signing by drawing. Use one finger on the pad.",clearedAnnouncement:"Signature cleared",undoneAnnouncement:"Last stroke removed",emptyError:"Add a signature first.",expand:"Expand",done:"Done",close:"Close"});const STROKE_WIDTH=2.5,SIDEWAYS_TO_DRAW=6,UPRIGHT_TO_SCROLL=8,REST_TO_DRAW_MS=200,MIN_POINT_GAP=.8,DEFAULT_HEIGHT=180,EXPANDED_CHROME=200,DEFAULT_NAME_LENGTH=100,MAX_EXPORT_SCALE=3,MIN_TARGET=44,BASELINE_OPACITY=.3,DISABLED_OPACITY=.5,TARGET_STYLE={minHeight:44},defaultScriptFont=()=>Platform.select({ios:"Snell Roundhand",default:"cursive"}),cssFontStack=e=>"cursive"===e?"cursive":`'${e}', cursive`,useScreenReader=()=>{const[e,t]=useState(!1);return useEffect(()=>{let e=!0;AccessibilityInfo.isScreenReaderEnabled().then(n=>{e&&t(n)});const n=AccessibilityInfo.addEventListener("screenReaderChanged",t);return()=>{e=!1,n.remove()}},[]),e},StrokePath=memo(({points:e,color:t})=>_jsx(Path,{d:strokePath(e),stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}));StrokePath.displayName="SignaturePadStroke";const Marks=({mode:e,strokes:t,name:n,color:a,fontFamily:r,width:o,height:s})=>"draw"===e?_jsx(_Fragment,{children:t.map(e=>_jsx(StrokePath,{points:e.points,color:a},e.id))}):n?_jsx(SvgText,{x:o/2,y:s*BASELINE_RATIO,fontSize:typedFontSize(o,n),fontFamily:r,textAnchor:"middle",fill:a,children:n}):null,SignaturePadSurface=forwardRef((e,t)=>{const{expandable:n,initialStrokes:a,onChange:r,initialTypedName:o="",onTypedNameChange:s,defaultMode:i="draw",onModeChange:l,onEmptyChange:d,allowTyped:u=!0,signedBy:c,signedAt:p,height:m=DEFAULT_HEIGHT,maxNameLength:h=DEFAULT_NAME_LENGTH,inkColor:g,paperColor:y,scriptFontFamily:f,labels:S,haptic:x="selection",disabled:w=!1,style:T,testID:b}=e;assertValidValue("SignaturePad","defaultMode",e.defaultMode,["draw","type"]);const _=useTheme(),E=void 0===g&&void 0===y,A=E?_.colors["text-body"]:g??lightTheme.colors["text-body"],C=E?_.colors.surface:y??lightTheme.colors.surface,v=E?lightTheme.colors["text-body"]:A,R=E?lightTheme.colors.surface:C,I=v!==A||R!==C,j=f??defaultScriptFont(),P=useMemo(()=>({...DEFAULT_SIGNATURE_PAD_LABELS,...S}),[S]),D=useScreenReader(),k=useRef(null),L=useRef(null),[F,M]=useState(0),[G,N]=useState(()=>(a??[]).map((e,t)=>({id:t+1,points:[...e]}))),B=useRef(G),O=useRef(G.length),H=useRef(null),V=useRef(null),[Y,$]=useState(u?i:"draw"),[z,U]=useState(o),[W,K]=useState(null),X=useRef(!1),{height:q}=useWindowDimensions(),[J,Q]=useState(!1),[Z,ee]=useState([]),te=useRef({onChange:r,onTypedNameChange:s,onModeChange:l,onEmptyChange:d});useEffect(()=>{te.current={onChange:r,onTypedNameChange:s,onModeChange:l,onEmptyChange:d}});const ne="draw"===Y&&!w,ae="draw"===Y?0===G.length:0===z.trim().length,re=useRef(null);useEffect(()=>{re.current!==ae&&(re.current=ae,te.current.onEmptyChange?.(ae))},[ae]);const oe=useCallback(e=>{B.current=e,N(e)},[]),se=useCallback(()=>{K(Date.now()),te.current.onChange?.(B.current.map(e=>e.points))},[]),ie=useMemo(()=>{const pan=e=>({enabled:ne,runOnJS:!0,onBegin:e=>{H.current=pointOf(e.x,e.y)},onActivate:t=>{V.current=e,O.current+=1;const n=pointOf(t.x,t.y);oe([...B.current,{id:O.current,points:[H.current??n,n]}])},onUpdate:t=>{if(V.current!==e)return;const n=B.current[B.current.length-1];if(void 0===n)throw new Error("The stroke being drawn is missing.");const a=pointOf(t.x,t.y),r=n.points[n.points.length-1];if(void 0===r)throw new Error("A drawn stroke has no points.");distanceBetween(r,a)<.8||oe([...B.current.slice(0,-1),{...n,points:[...n.points,a]}])},onFinalize:()=>{V.current===e&&(V.current=null,se())}});return{sidewaysConfig:{...pan("sideways"),activeOffsetX:[-6,6],failOffsetY:[-8,8]},restedConfig:{...pan("rested"),activateAfterLongPress:200}}},[ne,oe,se]),le=usePanGesture(ie.sidewaysConfig),de=usePanGesture(ie.restedConfig),ue=useCompetingGestures(le,de),ce=useCallback(e=>{$(e),te.current.onModeChange?.(e),announce("type"===e?P.typingAnnouncement:P.drawingAnnouncement)},[P.typingAnnouncement,P.drawingAnnouncement]);useEffect(()=>{D&&u&&!X.current&&"draw"===Y&&0===B.current.length&&ce("type")},[D,u,Y,ce]);const pe=useCallback(()=>{X.current=!0,ce("draw"===Y?"type":"draw")},[Y,ce]),me=useCallback(e=>{U(e),K(Date.now()),te.current.onTypedNameChange?.(e)},[]),he=useCallback(()=>{"type"===Y?me(""):(oe([]),se()),announce(P.clearedAnnouncement)},[Y,me,oe,se,P.clearedAnnouncement]),ge=useCallback(()=>{"draw"===Y&&0!==B.current.length&&(oe(B.current.slice(0,-1)),se(),announce(P.undoneAnnouncement))},[Y,oe,se,P.undoneAnnouncement]),ye=useCallback(()=>{ee(B.current.map(e=>e.points)),Q(!0)},[]),fe=useCallback(()=>{Q(!1)},[]),Se=useCallback(()=>{oe(Z.map(e=>(O.current+=1,{id:O.current,points:[...e]}))),se(),Q(!1)},[Z,oe,se]),xe=F||FALLBACK_WIDTH;useImperativeHandle(t,()=>({toFile:()=>new Promise((e,t)=>{if(ae)return void t(new Error(P.emptyError));const n=I?L.current:k.current;if(!n)return void t(new Error("The signature pad is not on screen."));const a=Math.min(3,Math.max(1,PixelRatio.get()));n.toDataURL(n=>{writePng(n).then(e,t)},{width:xe*a,height:m*a})}),toSvg:()=>buildSignatureSvg({width:xe,height:m,mode:Y,strokes:G.map(e=>e.points),typedName:z,ink:v,paper:R,strokeWidth:2.5,fontFamily:cssFontStack(j)}),clear:he,undo:ge,isEmpty:()=>ae}),[ae,P.emptyError,xe,m,Y,G,z,I,v,R,j,he,ge]);const we=useMemo(()=>[{name:"undo",label:P.undo},{name:"clear",label:P.clear},...u?[{name:"toggleMode",label:"draw"===Y?P.typeInstead:P.drawInstead}]:[]],[P.undo,P.clear,P.typeInstead,P.drawInstead,u,Y]),Te=useCallback(e=>{if(w)return;const{actionName:t}=e.nativeEvent;"undo"===t?ge():"clear"===t?he():"toggleMode"===t&&u&&pe()},[w,ge,he,pe,u]),be=useCallback(e=>{M(e.nativeEvent.layout.width)},[]),Ee=useMemo(()=>StyleSheet.create({root:{gap:_.space.sm},pad:{height:m,borderWidth:_.size.border,borderColor:_.colors.border,borderRadius:_.radius.md,...smoothCorners,overflow:"hidden",backgroundColor:C,opacity:w?.5:1},baseline:{position:"absolute",left:_.space.md,right:_.space.md,top:m*BASELINE_RATIO,height:StyleSheet.hairlineWidth,backgroundColor:A,opacity:.3},actions:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:_.space.xs},trailing:{flexDirection:"row",alignItems:"center",gap:_.space.xs},expandedRoot:{flex:1,padding:_.space.md,gap:_.space.sm,backgroundColor:_.colors.bg},expandedBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),[_,m,C,A,w]),Ae=z.trim(),Ce=p??W,ve=c&&!ae?`Signed by ${c}${Ce?`, ${formatDateTime(Ce)}`:""}`:null,Re="type"===Y&&Ae?`${P.pad}. ${Ae}`:P.pad;return _jsxs(View,{style:[Ee.root,T],testID:b,children:[_jsx(GestureDetector,{gesture:ue,children:_jsxs(View,{style:Ee.pad,onLayout:be,accessible:!0,accessibilityRole:"image",accessibilityLabel:Re,accessibilityHint:"draw"===Y?P.padHint:void 0,accessibilityValue:{text:ae?P.empty:P.signed},accessibilityState:{disabled:w},"aria-disabled":w,accessibilityActions:we,onAccessibilityAction:Te,children:[I?_jsxs(Svg,{ref:L,style:StyleSheet.absoluteFill,width:"100%",height:m,children:[_jsx(Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:R}),_jsx(Marks,{mode:Y,strokes:G,name:Ae,color:v,fontFamily:j,width:xe,height:m})]}):null,_jsxs(Svg,{ref:k,width:"100%",height:m,children:[_jsx(Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:C}),_jsx(Marks,{mode:Y,strokes:G,name:Ae,color:A,fontFamily:j,width:xe,height:m})]}),_jsx(View,{pointerEvents:"none",style:Ee.baseline})]})}),"type"===Y?_jsx(Input,{label:P.typedLabel,placeholder:P.typedPlaceholder,value:z,onChangeText:me,maxLength:h,disabled:w,autoComplete:"name",textContentType:"name",autoCapitalize:"words",autoCorrect:!1,returnKeyType:"done",testID:b?`${b}-name`:void 0}):null,_jsx(Text,{variant:"caption",color:"tertiary",children:"draw"===Y?P.caption:P.typedCaption}),_jsxs(View,{style:Ee.actions,children:[u?_jsx(Button,{label:"draw"===Y?P.typeInstead:P.drawInstead,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,disabled:w,onPress:pe,testID:b?`${b}-mode`:void 0}):_jsx(View,{}),"draw"===Y?_jsxs(View,{style:Ee.trailing,children:[G.length>0?_jsxs(_Fragment,{children:[_jsx(Button,{label:P.undo,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,disabled:w,onPress:ge,testID:b?`${b}-undo`:void 0}),_jsx(Button,{label:P.clear,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,disabled:w,onPress:he,testID:b?`${b}-clear`:void 0})]}):null,n?_jsx(Button,{label:P.expand,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,disabled:w,onPress:ye,testID:b?`${b}-expand`:void 0}):null]}):null,"type"===Y&&Ae?_jsx(Button,{label:P.clear,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,disabled:w,onPress:he,testID:b?`${b}-clear`:void 0}):null]}),ve?_jsx(Text,{variant:"caption",color:"secondary",children:ve}):null,n?_jsx(Modal,{visible:J,animationType:"slide",presentationStyle:"fullScreen",onRequestClose:fe,children:_jsxs(ExpandedRoot,{style:Ee.expandedRoot,children:[_jsxs(View,{style:Ee.expandedBar,children:[_jsx(Button,{label:P.close,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,onPress:fe,testID:b?`${b}-close`:void 0}),_jsx(Button,{label:P.done,variant:"solid",tone:"primary",size:"md",style:TARGET_STYLE,haptic:x,onPress:Se,testID:b?`${b}-done`:void 0})]}),J?_jsx(SignaturePadSurface,{expandable:!1,defaultMode:"draw",allowTyped:!1,initialStrokes:Z,onChange:ee,height:Math.max(DEFAULT_HEIGHT,q-200),inkColor:g,paperColor:y,scriptFontFamily:f,labels:S,haptic:x,testID:b?`${b}-expanded`:void 0}):null]})}):null]})});SignaturePadSurface.displayName="SignaturePadSurface";const ExpandedRoot="android"===Platform.OS?GestureHandlerRootView:View,SignaturePad=forwardRef((e,t)=>_jsx(SignaturePadSurface,{...e,expandable:!0,ref:t}));SignaturePad.displayName="SignaturePad";export{SignaturePad};export default SignaturePad;
|
|
1
|
+
"use strict";import{formatDateTime}from"@webority/mobile-core";import{forwardRef,memo,useCallback,useEffect,useImperativeHandle,useMemo,useRef,useState}from"react";import{AccessibilityInfo,Modal,PixelRatio,Platform,StyleSheet,useWindowDimensions,View}from"react-native";import{GestureDetector,GestureHandlerRootView,useCompetingGestures,usePanGesture}from"react-native-gesture-handler";import Svg,{Path,Rect,Text as SvgText}from"react-native-svg";import{useMobileUiText}from"../../text/index.js";import{SIGNATURE_PAD_TEXT}from"../../text/phone/signaturePad.g.js";import{lightTheme,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{Button}from"../Button/index.js";import{Input}from"../Input/index.js";import{Text}from"../Text/index.js";import{BASELINE_RATIO,buildSignatureSvg,distanceBetween,FALLBACK_WIDTH,pointOf,strokePath,typedFontSize}from"./signatureGeometry.js";import{writePng}from"./writePng";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";const STROKE_WIDTH=2.5,SIDEWAYS_TO_DRAW=6,UPRIGHT_TO_SCROLL=8,REST_TO_DRAW_MS=200,MIN_POINT_GAP=.8,DEFAULT_HEIGHT=180,EXPANDED_CHROME=200,DEFAULT_NAME_LENGTH=100,MAX_EXPORT_SCALE=3,MIN_TARGET=44,BASELINE_OPACITY=.3,DISABLED_OPACITY=.5,TARGET_STYLE={minHeight:44},defaultScriptFont=()=>Platform.select({ios:"Snell Roundhand",default:"cursive"}),cssFontStack=e=>"cursive"===e?"cursive":`'${e}', cursive`,useScreenReader=()=>{const[e,t]=useState(!1);return useEffect(()=>{let e=!0;AccessibilityInfo.isScreenReaderEnabled().then(n=>{e&&t(n)});const n=AccessibilityInfo.addEventListener("screenReaderChanged",t);return()=>{e=!1,n.remove()}},[]),e},StrokePath=memo(({points:e,color:t})=>_jsx(Path,{d:strokePath(e),stroke:t,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}));StrokePath.displayName="SignaturePadStroke";const Marks=({mode:e,strokes:t,name:n,color:a,fontFamily:r,width:o,height:s})=>"draw"===e?_jsx(_Fragment,{children:t.map(e=>_jsx(StrokePath,{points:e.points,color:a},e.id))}):n?_jsx(SvgText,{x:o/2,y:s*BASELINE_RATIO,fontSize:typedFontSize(o,n),fontFamily:r,textAnchor:"middle",fill:a,children:n}):null,SignaturePadSurface=forwardRef((e,t)=>{const{expandable:n,initialStrokes:a,onChange:r,initialTypedName:o="",onTypedNameChange:s,defaultMode:i="draw",onModeChange:l,onEmptyChange:d,allowTyped:c=!0,signedBy:u,signedAt:p,height:m=DEFAULT_HEIGHT,maxNameLength:h=DEFAULT_NAME_LENGTH,inkColor:g,paperColor:f,scriptFontFamily:y,labels:x,haptic:S="selection",disabled:T=!1,style:b,testID:_}=e;assertValidValue("SignaturePad","defaultMode",e.defaultMode,["draw","type"]);const w=useTheme(),E=void 0===g&&void 0===f,C=E?w.colors["text-body"]:g??lightTheme.colors["text-body"],A=E?w.colors.surface:f??lightTheme.colors.surface,v=E?lightTheme.colors["text-body"]:C,R=E?lightTheme.colors.surface:A,j=v!==C||R!==A,I=y??defaultScriptFont(),P=useMobileUiText("signaturePad",SIGNATURE_PAD_TEXT),k=useMemo(()=>({...P,...x}),[P,x]),D=useScreenReader(),L=useRef(null),M=useRef(null),[F,G]=useState(0),[N,B]=useState(()=>(a??[]).map((e,t)=>({id:t+1,points:[...e]}))),O=useRef(N),H=useRef(N.length),V=useRef(null),$=useRef(null),[z,W]=useState(c?i:"draw"),[U,Y]=useState(o),[X,K]=useState(null),q=useRef(!1),{height:J}=useWindowDimensions(),[Q,Z]=useState(!1),[ee,te]=useState([]),ne=useRef({onChange:r,onTypedNameChange:s,onModeChange:l,onEmptyChange:d});useEffect(()=>{ne.current={onChange:r,onTypedNameChange:s,onModeChange:l,onEmptyChange:d}});const ae="draw"===z&&!T,re="draw"===z?0===N.length:0===U.trim().length,oe=useRef(null);useEffect(()=>{oe.current!==re&&(oe.current=re,ne.current.onEmptyChange?.(re))},[re]);const se=useCallback(e=>{O.current=e,B(e)},[]),ie=useCallback(()=>{K(Date.now()),ne.current.onChange?.(O.current.map(e=>e.points))},[]),le=useMemo(()=>{const pan=e=>({enabled:ae,runOnJS:!0,onBegin:e=>{V.current=pointOf(e.x,e.y)},onActivate:t=>{$.current=e,H.current+=1;const n=pointOf(t.x,t.y);se([...O.current,{id:H.current,points:[V.current??n,n]}])},onUpdate:t=>{if($.current!==e)return;const n=O.current[O.current.length-1];if(void 0===n)throw new Error("The stroke being drawn is missing.");const a=pointOf(t.x,t.y),r=n.points[n.points.length-1];if(void 0===r)throw new Error("A drawn stroke has no points.");distanceBetween(r,a)<.8||se([...O.current.slice(0,-1),{...n,points:[...n.points,a]}])},onFinalize:()=>{$.current===e&&($.current=null,ie())}});return{sidewaysConfig:{...pan("sideways"),activeOffsetX:[-6,6],failOffsetY:[-8,8]},restedConfig:{...pan("rested"),activateAfterLongPress:200}}},[ae,se,ie]),de=usePanGesture(le.sidewaysConfig),ce=usePanGesture(le.restedConfig),ue=useCompetingGestures(de,ce),pe=useCallback(e=>{W(e),ne.current.onModeChange?.(e),announce("type"===e?k.typingAnnouncement:k.drawingAnnouncement)},[k.typingAnnouncement,k.drawingAnnouncement]);useEffect(()=>{D&&c&&!q.current&&"draw"===z&&0===O.current.length&&pe("type")},[D,c,z,pe]);const me=useCallback(()=>{q.current=!0,pe("draw"===z?"type":"draw")},[z,pe]),he=useCallback(e=>{Y(e),K(Date.now()),ne.current.onTypedNameChange?.(e)},[]),ge=useCallback(()=>{"type"===z?he(""):(se([]),ie()),announce(k.clearedAnnouncement)},[z,he,se,ie,k.clearedAnnouncement]),fe=useCallback(()=>{"draw"===z&&0!==O.current.length&&(se(O.current.slice(0,-1)),ie(),announce(k.undoneAnnouncement))},[z,se,ie,k.undoneAnnouncement]),ye=useCallback(()=>{te(O.current.map(e=>e.points)),Z(!0)},[]),xe=useCallback(()=>{Z(!1)},[]),Se=useCallback(()=>{se(ee.map(e=>(H.current+=1,{id:H.current,points:[...e]}))),ie(),Z(!1)},[ee,se,ie]),Te=F||FALLBACK_WIDTH;useImperativeHandle(t,()=>({toFile:()=>new Promise((e,t)=>{if(re)return void t(new Error(k.emptyError));const n=j?M.current:L.current;if(!n)return void t(new Error("The signature pad is not on screen."));const a=Math.min(3,Math.max(1,PixelRatio.get()));n.toDataURL(n=>{writePng(n).then(e,t)},{width:Te*a,height:m*a})}),toSvg:()=>buildSignatureSvg({width:Te,height:m,mode:z,strokes:N.map(e=>e.points),typedName:U,ink:v,paper:R,strokeWidth:2.5,fontFamily:cssFontStack(I)}),clear:ge,undo:fe,isEmpty:()=>re}),[re,k.emptyError,Te,m,z,N,U,j,v,R,I,ge,fe]);const be=useMemo(()=>[{name:"undo",label:k.undo},{name:"clear",label:k.clear},...c?[{name:"toggleMode",label:"draw"===z?k.typeInstead:k.drawInstead}]:[]],[k.undo,k.clear,k.typeInstead,k.drawInstead,c,z]),we=useCallback(e=>{if(T)return;const{actionName:t}=e.nativeEvent;"undo"===t?fe():"clear"===t?ge():"toggleMode"===t&&c&&me()},[T,fe,ge,me,c]),Ee=useCallback(e=>{G(e.nativeEvent.layout.width)},[]),Ce=useMemo(()=>StyleSheet.create({root:{gap:w.space.sm},pad:{height:m,borderWidth:w.size.border,borderColor:w.colors.border,borderRadius:w.radius.md,...smoothCorners,overflow:"hidden",backgroundColor:A,opacity:T?.5:1},baseline:{position:"absolute",left:w.space.md,right:w.space.md,top:m*BASELINE_RATIO,height:StyleSheet.hairlineWidth,backgroundColor:C,opacity:.3},actions:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:w.space.xs},trailing:{flexDirection:"row",alignItems:"center",gap:w.space.xs},expandedRoot:{flex:1,padding:w.space.md,gap:w.space.sm,backgroundColor:w.colors.bg},expandedBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),[w,m,A,C,T]),Ae=U.trim(),ve=p??X,Re=u&&!re?`Signed by ${u}${ve?`, ${formatDateTime(ve)}`:""}`:null,je="type"===z&&Ae?`${k.pad}. ${Ae}`:k.pad;return _jsxs(View,{style:[Ce.root,b],testID:_,children:[_jsx(GestureDetector,{gesture:ue,children:_jsxs(View,{style:Ce.pad,onLayout:Ee,accessible:!0,accessibilityRole:"image",accessibilityLabel:je,accessibilityHint:"draw"===z?k.padHint:void 0,accessibilityValue:{text:re?k.empty:k.signed},accessibilityState:{disabled:T},"aria-disabled":T,accessibilityActions:be,onAccessibilityAction:we,children:[j?_jsxs(Svg,{ref:M,style:StyleSheet.absoluteFill,width:"100%",height:m,children:[_jsx(Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:R}),_jsx(Marks,{mode:z,strokes:N,name:Ae,color:v,fontFamily:I,width:Te,height:m})]}):null,_jsxs(Svg,{ref:L,width:"100%",height:m,children:[_jsx(Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:A}),_jsx(Marks,{mode:z,strokes:N,name:Ae,color:C,fontFamily:I,width:Te,height:m})]}),_jsx(View,{pointerEvents:"none",style:Ce.baseline})]})}),"type"===z?_jsx(Input,{label:k.typedLabel,placeholder:k.typedPlaceholder,value:U,onChangeText:he,maxLength:h,disabled:T,autoComplete:"name",textContentType:"name",autoCapitalize:"words",autoCorrect:!1,returnKeyType:"done",testID:_?`${_}-name`:void 0}):null,_jsx(Text,{variant:"caption",color:"tertiary",children:"draw"===z?k.caption:k.typedCaption}),_jsxs(View,{style:Ce.actions,children:[c?_jsx(Button,{label:"draw"===z?k.typeInstead:k.drawInstead,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,disabled:T,onPress:me,testID:_?`${_}-mode`:void 0}):_jsx(View,{}),"draw"===z?_jsxs(View,{style:Ce.trailing,children:[N.length>0?_jsxs(_Fragment,{children:[_jsx(Button,{label:k.undo,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,disabled:T,onPress:fe,testID:_?`${_}-undo`:void 0}),_jsx(Button,{label:k.clear,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,disabled:T,onPress:ge,testID:_?`${_}-clear`:void 0})]}):null,n?_jsx(Button,{label:k.expand,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,disabled:T,onPress:ye,testID:_?`${_}-expand`:void 0}):null]}):null,"type"===z&&Ae?_jsx(Button,{label:k.clear,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,disabled:T,onPress:ge,testID:_?`${_}-clear`:void 0}):null]}),Re?_jsx(Text,{variant:"caption",color:"secondary",children:Re}):null,n?_jsx(Modal,{visible:Q,animationType:"slide",presentationStyle:"fullScreen",onRequestClose:xe,children:_jsxs(ExpandedRoot,{style:Ce.expandedRoot,children:[_jsxs(View,{style:Ce.expandedBar,children:[_jsx(Button,{label:k.close,variant:"ghost",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,onPress:xe,testID:_?`${_}-close`:void 0}),_jsx(Button,{label:k.done,variant:"solid",tone:"primary",size:"md",style:TARGET_STYLE,haptic:S,onPress:Se,testID:_?`${_}-done`:void 0})]}),Q?_jsx(SignaturePadSurface,{expandable:!1,defaultMode:"draw",allowTyped:!1,initialStrokes:ee,onChange:te,height:Math.max(DEFAULT_HEIGHT,J-200),inkColor:g,paperColor:f,scriptFontFamily:y,labels:x,haptic:S,testID:_?`${_}-expanded`:void 0}):null]})}):null]})});SignaturePadSurface.displayName="SignaturePadSurface";const ExpandedRoot="android"===Platform.OS?GestureHandlerRootView:View,SignaturePad=forwardRef((e,t)=>_jsx(SignaturePadSurface,{...e,expandable:!0,ref:t}));SignaturePad.displayName="SignaturePad";export{SignaturePad};export default SignaturePad;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{SignaturePad}from"./SignaturePad.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useMemo,useState}from"react";import{Animated,StyleSheet,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{toBackgroundImage}from"../../theme/Gradient.js";import{useScreenDimensions}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{useSkeletonClock}from"./SkeletonClock.js";import{useSkeletonDefaults}from"./SkeletonProvider.js";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useMemo,useState}from"react";import{Animated,StyleSheet,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useMobileUiText}from"../../text/index.js";import{SKELETON_TEXT}from"../../text/phone/skeleton.g.js";import{useTheme}from"../../theme/index.js";import{toBackgroundImage}from"../../theme/Gradient.js";import{useScreenDimensions}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{useSkeletonClock}from"./SkeletonClock.js";import{useSkeletonDefaults}from"./SkeletonProvider.js";import{jsx as _jsx}from"react/jsx-runtime";const resolveRadius=(e,t)=>"number"==typeof t?t:e.radius[t],resolveWidth=e=>void 0===e?"100%":e,radiusForShape=(e,t,s,o,i)=>{if(void 0!==i)return resolveRadius(e,i);switch(t){case"circle":return"number"==typeof s?Math.min(s,o)/2:o/2;case"rounded":return e.radius.md;default:return e.radius.sm}},Skeleton=e=>{const{shape:t="rect",width:s="100%",height:o=16,radius:i,variant:r,colors:n,labels:a,style:l,testID:u}=e;assertValidValue("Skeleton","shape",e.shape,["rect","rounded","circle","text"]),assertValidValue("Skeleton","variant",e.variant,["shimmer","pulse","none"]);const m=useTheme(),d=useSkeletonDefaults(),c=useSkeletonClock(),h=useReducedMotion(),p=r??d.variant??"shimmer",S=h&&"auto"===(d.animation??"auto");let k=p;c.enabled?S&&"shimmer"===p&&(k="pulse"):k="none";const x=n?.background??d.colors?.background??m.colors.skeleton,y=n?.highlight??d.colors?.highlight??m.colors["skeleton-highlight"],{responsive:b}=useScreenDimensions(),g=useMemo(()=>buildStyles(),[]),f=useMobileUiText("skeleton",SKELETON_TEXT),v=useMemo(()=>({...f,...a}),[f,a]),j=resolveWidth(s),M=b.size(o),T=radiusForShape(m,t,j,M,i),[w,V]=useState(0),R=useMemo(()=>w<=0?0:Math.max(48,.7*w),[w]),C=useMemo(()=>w<=0?0:c.shimmer.interpolate({inputRange:[0,1],outputRange:[-R,w]}),[c.shimmer,R,w]),_=useMemo(()=>"none"===k?null:"pulse"===k?_jsx(Animated.View,{pointerEvents:"none",style:[StyleSheet.absoluteFill,{backgroundColor:y,opacity:c.pulse.interpolate({inputRange:[0,1],outputRange:[0,.55]})}]}):w<=0?null:_jsx(Animated.View,{pointerEvents:"none",style:[g.shimmerBand,{width:R,transform:[{translateX:C}],experimental_backgroundImage:[toBackgroundImage({colors:["transparent",y,"transparent"],locations:[0,.5,1],start:{x:0,y:.5},end:{x:1,y:.5}})]}]}),[k,y,c.pulse,w,g.shimmerBand,R,C]);return _jsx(View,{onLayout:e=>{const t=e.nativeEvent.layout.width;t!==w&&V(t)},accessible:!0,accessibilityLabel:v.loading,accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,accessibilityLiveRegion:"polite",testID:u,style:[g.base,{width:j,height:M,borderRadius:T,...smoothCorners,backgroundColor:x},l],children:_})};Skeleton.displayName="Skeleton";const SkeletonCircle=({size:e,style:t,...s})=>{const{responsive:o}=useScreenDimensions(),i=o.size(e);return _jsx(Skeleton,{...s,shape:"circle",width:i,height:e,style:t})};SkeletonCircle.displayName="SkeletonCircle";const SkeletonText=({lines:e=3,lastLineWidth:t="60%",spacing:s,fontSize:o,variant:i,radius:r="sm",width:n="100%",labels:a,style:l,testID:u})=>{const m=useTheme(),d=s??m.space.xs,c=Math.max(1,e),h=useMemo(()=>Array.from({length:c},(e,t)=>({key:`sk-text-line-${t}`,index:t})),[c]);return _jsx(View,{style:l,testID:u,children:h.map(e=>{const s=e.index===c-1;return _jsx(Skeleton,{shape:"text",width:s&&c>1?t:n,height:o??m.text.base.size,radius:r,variant:i,labels:a,style:e.index<c-1?{marginBottom:d}:void 0},e.key)})})};SkeletonText.displayName="SkeletonText";const buildStyles=()=>StyleSheet.create({base:{overflow:"hidden"},shimmerBand:{position:"absolute",top:0,bottom:0,left:0}});export{Skeleton,SkeletonCircle,SkeletonText};export default Skeleton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import React,{Children,cloneElement,isValidElement,useEffect,useMemo,useRef}from"react";import{Animated,Image,StyleSheet,Text,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{isRecord}from"../../utils/guards.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{Text as LibraryText}from"../Text/index.js";import{
|
|
1
|
+
"use strict";import React,{Children,cloneElement,isValidElement,useEffect,useMemo,useRef}from"react";import{Animated,Image,StyleSheet,Text,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{useMobileUiText}from"../../text/index.js";import{SKELETON_TEXT}from"../../text/phone/skeleton.g.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{isRecord}from"../../utils/guards.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{Text as LibraryText}from"../Text/index.js";import{Skeleton}from"./Skeleton.js";import{useSkeletonDefaults}from"./SkeletonProvider.js";import{SkeletonSkip}from"./SkeletonSkip.js";import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";const DEFAULT_REVEAL_FADE_MS=300,flattenStyle=e=>({...StyleSheet.flatten(e)}),isWidthText=e=>"auto"===e||"100%"===e||/^\d+(\.\d+)?%$/.test(e),isComponentType=e=>"function"==typeof e||isRecord(e),resolveWidth=(e,t)=>"number"==typeof e||"string"==typeof e&&isWidthText(e)?e:t,resolveRadius=(e,t)=>"number"==typeof e?e:t,skeletonizeNode=(e,t,i,r,s="r")=>{if(null==t||"boolean"==typeof t)return null;if("string"==typeof t||"number"==typeof t)return _jsx(Skeleton,{shape:"text",width:"60%",height:14,variant:i,colors:r},`${s}-text`);if(Array.isArray(t))return Children.map(t,(t,n)=>skeletonizeNode(e,t,i,r,`${s}-${n}`));if(!isValidElement(t))return null;const n=t,o=n.props??{},l=n.type;if(l===SkeletonSkip)return cloneElement(n,{key:`${s}-skip`});if(("function"==typeof l||"object"==typeof l)&&"Skeleton"in l&&isComponentType(l.Skeleton)){const e=l.Skeleton;return _jsx(e,{...o},`${s}-self`)}if(l===Image){const e=flattenStyle(o.style),t=resolveWidth(e.width,"100%"),n="number"==typeof e.height?e.height:120,l=resolveRadius(e.borderRadius,"sm");return _jsx(Skeleton,{width:t,height:n,radius:l,variant:i,colors:r,style:{margin:"number"==typeof e.margin?e.margin:void 0}},`${s}-img`)}if(l===Text||l===LibraryText){const t=flattenStyle(o.style),n="number"==typeof t.fontSize?t.fontSize:e.text.base.size,l=resolveWidth(t.width,"85%");return _jsx(Skeleton,{shape:"text",width:l,height:Math.round(1.15*n),variant:i,colors:r,style:{marginVertical:e.space.xxs}},`${s}-txt`)}if(null!=o.children)return cloneElement(n,{key:`${s}-w`},skeletonizeNode(e,o.children,i,r,`${s}-c`));if(l===View){const e=flattenStyle(o.style);if(null!=e.width||null!=e.height){const t=resolveWidth(e.width,"100%"),n="number"==typeof e.height?e.height:20,o=resolveRadius(e.borderRadius,"sm");return _jsx(Skeleton,{width:t,height:n,radius:o,variant:i,colors:r},`${s}-vw`)}}return cloneElement(n,{key:`${s}-leaf`})},SkeletonContent=e=>{const{loading:t,children:i,placeholder:r,variant:s,count:n=1,colors:o,labels:l,fadeDuration:a,style:u,testID:c}=e;assertValidValue("SkeletonContent","variant",e.variant,["shimmer","pulse","none"]);const m=useTheme(),d=useMobileUiText("skeleton",SKELETON_TEXT),f=useMemo(()=>({...d,...l}),[d,l]),h=useMemo(()=>Array.from({length:n},(e,t)=>({key:`sk-slot-${t}`})),[n]),p=useSkeletonDefaults(),y=usePresenceMotion(),k=a??p.fadeDuration??(y.reduced?y.duration("default"):300),S=useRef(t),x=useRef(createAnimatedValue(t?0:1)).current;if(useEffect(()=>{let e;return S.current&&!t?(x.setValue(0),e=Animated.timing(x,{toValue:1,duration:k,useNativeDriver:nativeDriver}),e.start()):!S.current&&t&&x.setValue(1),S.current=t,()=>e?.stop()},[t,x,k]),!t)return k<=0?_jsx(_Fragment,{children:i}):_jsx(Animated.View,{style:[u,{opacity:x}],testID:c,children:i});if(void 0!==r){const e=n>1?h.map(e=>_jsx(React.Fragment,{children:r},e.key)):r;return _jsx(View,{style:u,testID:c,accessible:!0,accessibilityLabel:f.loading,accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,accessibilityLiveRegion:"polite",children:e})}const b=n>1?h.map(e=>_jsx(React.Fragment,{children:i},e.key)):i;return _jsx(View,{style:u,testID:c,accessible:!0,accessibilityLabel:f.loading,accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,accessibilityLiveRegion:"polite",children:skeletonizeNode(m,b,s,o)})};SkeletonContent.displayName="SkeletonContent";export{SkeletonContent};export default SkeletonContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,Skeleton,SkeletonCircle,SkeletonText}from"./Skeleton.js";export{SkeletonClockProvider,useSkeletonClock}from"./SkeletonClock.js";export{SkeletonContent}from"./SkeletonContent.js";export{SkeletonList}from"./SkeletonList.js";export{SkeletonProvider,useSkeletonDefaults}from"./SkeletonProvider.js";export{SkeletonSkip}from"./SkeletonSkip.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import React,{forwardRef,useCallback,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{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{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import React,{forwardRef,useCallback,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useMobileUiText}from"../../text/index.js";import{SLIDE_TO_CONFIRM_TEXT}from"../../text/phone/slideToConfirm.g.js";import{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{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const SIZE_MAP={sm:{height:44,pad:"xxs"},md:{height:56,pad:"xs"},lg:{height:64,pad:"sm"}},Chevron=({color:e,size:t})=>_jsx(View,{style:{width:0,height:0,borderTopWidth:.4*t,borderBottomWidth:.4*t,borderLeftWidth:.55*t,borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:e,marginLeft:.2*t}}),SlideToConfirm=forwardRef((e,t)=>{const{onConfirm:i,label:a,tone:r="primary",size:o="md",disabled:s=!1,threshold:n=.9,resetAfter:l=!1,haptic:u,icon:c,labels:d,style:m,trackStyle:h,handleStyle:f,labelStyle:p,testID:b}=e;assertValidValue("SlideToConfirm","tone",e.tone,["primary","success","warning","danger","info","neutral"]),assertValidValue("SlideToConfirm","size",e.size,["sm","md","lg"]);const g=useMobileUiText("slideToConfirm",SLIDE_TO_CONFIRM_TEXT),v=useMemo(()=>({...g,...d}),[g,d]),S=useMemo(()=>[{name:"activate",label:v.confirmAction},{name:"increment",label:v.confirmAction}],[v.confirmAction]),x=useTheme(),y=SIZE_MAP[o],C=x.space[y.pad],T=y.height-2*C,w=useMemo(()=>buildStyles(x,y),[x,y]),j=x.colors[r],[A,V]=useState(!1),_=useSharedValue(0),k=useSharedValue(0),M=useSharedValue(0),E=useRef(null),R=useCallback(()=>{const e=resolveHaptic(u,"notificationSuccess");e&&triggerHaptic(e)},[u]),I=useCallback(()=>{V(!1),_.value=withSpring(0,{damping:18,stiffness:160,mass:1})},[_]),D=useCallback(()=>{V(!0),R(),i(),!1!==l&&(E.current&&clearTimeout(E.current),E.current=setTimeout(I,l))},[R,i,l,I]),L=useCallback(e=>{if(s||A)return;const{actionName:t}=e.nativeEvent;"activate"!==t&&"increment"!==t||D()},[s,A,D]);React.useEffect(()=>()=>{cancelAnimation(_),E.current&&clearTimeout(E.current)},[_]);const O=useCallback(e=>{k.value=Math.max(0,e.nativeEvent.layout.width-T-2*C)},[k,T,C]),N=useMemo(()=>{const e=n,t={damping:18,stiffness:160,mass:1},i={duration:x.motion.duration.fast,easing:Easing.out(Easing.cubic)};return{enabled:!s&&!A,minDistance:0,onActivate:()=>{"worklet";M.value=_.value},onUpdate:e=>{"worklet";_.value=Math.min(Math.max(M.value+e.translationX,0),k.value)},onDeactivate:()=>{"worklet";k.value>0&&_.value>=k.value*e?(_.value=withTiming(k.value,i),scheduleOnRN(D)):_.value=withSpring(0,t)}}},[s,A,n,_,k,M,D,x.motion.duration.fast]),z=usePanGesture(N),P=useAnimatedStyle(()=>({transform:[{translateX:_.value}]}),[_]),W=useAnimatedStyle(()=>({width:_.value+T+C}),[_,T,C]),G=useAnimatedStyle(()=>{const e=k.value>0?k.value:1;return{opacity:Math.max(0,1-_.value/(.6*e))}},[k,_]);return _jsxs(View,{ref:t,style:[w.track,{backgroundColor:x.colors["bg-subtle"]},h,m],onLayout:O,testID:b,accessibilityRole:"adjustable",accessibilityLabel:A?v.confirmed:a??v.slide,accessibilityState:{disabled:s},"aria-disabled":s,accessibilityActions:S,onAccessibilityAction:L,children:[_jsx(Animated.View,{style:[w.fill,{backgroundColor:j,opacity:s?.5:1},W],pointerEvents:"none"}),_jsx(Animated.View,{style:[w.labelWrap,G],pointerEvents:"none",children:_jsx(Text,{variant:"body",style:[w.label,{color:x.colors["text-muted"]},p],numberOfLines:1,children:A?v.confirmed:a??v.slide})}),_jsx(GestureDetector,{gesture:z,children:_jsx(Animated.View,{style:[w.handle,{width:T,height:T,borderRadius:x.radius.pill,...smoothCorners,backgroundColor:x.colors.surface,opacity:s?.5:1,...x.shadow.card},f,P],children:c??_jsx(Chevron,{color:j,size:.5*T})})})]})});SlideToConfirm.displayName="SlideToConfirm";const buildStyles=(e,t)=>StyleSheet.create({track:{height:t.height,borderRadius:e.radius.pill,...smoothCorners,justifyContent:"center",overflow:"hidden",padding:e.space[t.pad]},fill:{position:"absolute",left:0,top:0,bottom:0,borderRadius:e.radius.pill,...smoothCorners},labelWrap:{position:"absolute",left:t.height,right:t.height},label:{textAlign:"center",includeFontPadding:!1},handle:{alignItems:"center",justifyContent:"center"}});export{SlideToConfirm};export default SlideToConfirm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{SlideToConfirm}from"./SlideToConfirm.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Platform,Pressable,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useControllableState}from"../../hooks/index.js";import{resolveSliderSize,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{Text}from"../Text/index.js";import{sliderToneInk}from"./valueText.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const VARIANT_SIZE_MAP={inset:{sm:{trackHeight:14,thumbDiameter:10},md:{trackHeight:20,thumbDiameter:14},lg:{trackHeight:26,thumbDiameter:18}},minimal:{sm:{trackHeight:2,thumbDiameter:14},md:{trackHeight:3,thumbDiameter:18},lg:{trackHeight:4,thumbDiameter:22}},bar:{sm:{trackHeight:20,thumbDiameter:20},md:{trackHeight:28,thumbDiameter:28},lg:{trackHeight:36,thumbDiameter:36}}},INSET_RING_RATIO=.3,MIN_THUMB_TOUCH=44,clamp=(e,t,a)=>Math.min(Math.max(e,t),a),snapToStep=(e,t,a,i)=>{if(i<=0)return clamp(e,t,a);const r=Math.round((e-t)/i)*i+t,s=String(i).split(".")[1]?.length??0,n=s>0?Number(r.toFixed(s)):r;return clamp(n,t,a)},BUBBLE_GAP=2,BUBBLE_CARET=8,BUBBLE_WRAP_WIDTH=160,NO_SHADOW={shadowOpacity:0,elevation:0},defaultFormatLabel=e=>String(e),isPair=e=>Array.isArray(e),Slider=forwardRef((e,t)=>{const{min:a=0,max:i=100,step:r=1,disabled:s=!1,tone:n="primary",size:o="md",variant:l="default",showLabel:u=!1,snapThumb:c=!1,formatLabel:d=defaultFormatLabel,renderLabel:m,accessibilityLabel:h,haptic:b,style:g,containerStyle:f,trackStyle:p,fillStyle:v,thumbStyle:w,labelStyle:y,thumbPressScale:S,labelShowDuration:k,labelOpacity:C,testID:x}=e;assertValidValue("Slider","tone",e.tone,["primary","success","warning","danger","info","neutral"]),assertValidValue("Slider","size",e.size,["sm","md","lg"]),assertValidValue("Slider","variant",e.variant,["default","inset","minimal","bar"]);const A=useTheme(),V=useMemo(()=>{const e=resolveSliderSize(A,o);return{trackHeight:e["track-height"],thumbDiameter:e["thumb-diameter"]}},[A,o]),j=useMemo(()=>"default"===l?V:VARIANT_SIZE_MAP[l][o],[V,o,l]),M="inset"===l?j.trackHeight/2:0,_=A.settings.components.slider?.thumbPressAnimation??!1,D=S??1.1,R=k??A.motion.duration.fast,H=C??1,E=useMemo(()=>buildStyles(A,j),[A,j]),O=useMemo(()=>({damping:A.motion.spring.snappy.damping,stiffness:A.motion.spring.snappy.stiffness,mass:A.motion.spring.snappy.mass}),[A.motion.spring.snappy]),[T,P]=useState(0),N=A.colors[n],I=sliderToneInk(A,n),W=!0===e.range,L=useCallback(t=>{if(!0!==e.range){if(Array.isArray(t))throw new Error("Slider received a range value in single mode.");e.onChange?.(t)}else{if(!Array.isArray(t))throw new Error("Slider received a single value in range mode.");e.onChange?.(t)}},[e.onChange,e.range]),[X,B]=useControllableState({value:e.value,defaultValue:e.defaultValue??(W?[a,i]:a),onChange:L}),F=useSharedValue(0),G=useSharedValue(0),z=useSharedValue(isPair(X)?X[0]:X),U=useSharedValue(isPair(X)?X[1]:X),Z=useSharedValue(0),$=useSharedValue(0),J=useSharedValue(1),q=useSharedValue(1),K="always"===u,Q=useSharedValue(K?1:0),Y=useSharedValue(K?1:0),ee=useMemo(()=>10**(String(r).split(".")[1]?.length??0),[r]);useEffect(()=>()=>{cancelAnimation(F),cancelAnimation(G),cancelAnimation(J),cancelAnimation(q),cancelAnimation(Q),cancelAnimation(Y)},[F,G,J,q,Q,Y]);const te=useCallback((e,t)=>{const r=t-2*M;return i===a||r<=0?M:M+(e-a)/(i-a)*r},[a,i,M]),ae=useCallback((e,t)=>{const s=t-2*M;if(s<=0)return a;const n=clamp((e-M)/s,0,1);return snapToStep(a+n*(i-a),a,i,r)},[a,i,r,M]),ie=useRef(!1),re=A.motion.duration.fast,se=useRef(X);se.current=X;const ne=useRef(T);ne.current=T;const oe=useCallback((e=!1)=>{const t=ne.current;if(t<=0)return;const place=t=>e?withTiming(t,{duration:re,easing:Easing.out(Easing.cubic)}):t,a=se.current;if(isPair(a)){const[e,i]=a,r=Math.min(e,i),s=Math.max(e,i);z.value=r,U.value=s,F.value=place(te(r,t)),G.value=place(te(s,t))}else{const e=a;z.value=e,U.value=e,F.value=place(te(e,t))}},[te,z,U,F,G,re]),[le,ue]=useState(0),ce=useRef(!1),de=useCallback(e=>{ie.current=e,e||(ce.current=!0,ue(e=>e+1))},[]);useEffect(()=>{if(ie.current)return;const e=ce.current;ce.current=!1,oe(e)},[JSON.stringify(X),T,le,oe]);const me=useCallback(e=>{const t=e.nativeEvent.layout.width;$.value=t,P(t)},[$]),he=useCallback((e,t)=>{B(W?[e,t]:e)},[W,B]),be=useCallback(()=>{const e=resolveHaptic(b,"selection");e&&triggerHaptic(e)},[b]),ge=useRef(he);ge.current=he;const fe=useRef(be);fe.current=be;const pe=useCallback((e,t)=>ge.current(e,t),[]),ve=useCallback(()=>fe.current(),[]),we=Math.max(0,(44-j.thumbDiameter)/2),ye=we>0?we:void 0,Se=useCallback(e=>{const t="low"===e?F:G,n="low"===e?z:U,o="low"===e?U:z,l="low"===e?J:q,d="low"===e?Q:Y,m="low"===e,h=a,b=i,g=r,f=ee,p=W,v=D,w=_,y=!0===u,S=c,k=H,C=R,x=O,A=M,follow=e=>{"worklet";const a=$.value-2*A;if(a<=0||!Number.isFinite(e))return;const i=Math.min(Math.max(Z.value+e,A),$.value-A);let r=h+(i-A)/a*(b-h);g>0&&(r=Math.round((r-h)/g)*g+h,r=Math.round(r*f)/f),r=Math.min(Math.max(r,h),b),p&&(m&&r>o.value&&(r=o.value),!m&&r<o.value&&(r=o.value)),t.value=S||b===h?b===h?A:A+(r-h)/(b-h)*a:p?m?Math.min(i,G.value):Math.max(i,F.value):i,r!==n.value&&(n.value=r,r!==h&&r!==b||scheduleOnRN(ve),scheduleOnRN(pe,z.value,U.value))};return{enabled:!s,minDistance:0,...void 0===ye?{}:{hitSlop:ye},onActivate:()=>{"worklet";scheduleOnRN(de,!0),Z.value=t.value,w&&(l.value=withSpring(v,x)),y&&(d.value=withTiming(k,{duration:C,easing:Easing.out(Easing.cubic)})),scheduleOnRN(ve)},onUpdate:e=>{"worklet";follow(e.translationX)},onDeactivate:e=>{"worklet";follow(e.translationX),w&&(l.value=withSpring(1,x)),y&&(d.value=withTiming(0,{duration:C,easing:Easing.out(Easing.cubic)}))},onFinalize:()=>{"worklet";scheduleOnRN(de,!1)}}},[s,a,i,r,ee,W,D,_,u,c,H,R,O,M,ye,pe,ve,de,F,G,z,U,J,q,Q,Y,Z,$]),ke=useMemo(()=>Se("low"),[Se]),Ce=useMemo(()=>Se("high"),[Se]),xe=usePanGesture(ke),Ae=usePanGesture(Ce),Ve=useCallback(e=>{if(s||W||T<=0)return;const t=clamp(e.nativeEvent.locationX,0,T),a=ae(t,T);a!==z.value&&(be(),z.value=a,F.value=withTiming(te(a,T),{duration:A.motion.duration.fast,easing:Easing.out(Easing.cubic)}),he(a,a))},[s,W,T,ae,te,he,be,F,z,A.motion.duration.fast]),je=useCallback(e=>{if(s)return;const t="increment"===e.nativeEvent.actionName?r:-r,n=r>0?Math.round(t*ee)/ee:t;if(W){const e=Math.round((z.value+n)*ee)/ee,t=clamp(e,a,U.value);t!==z.value&&(z.value=t,F.value=te(t,T),be(),he(t,U.value))}else{const e=Math.round((z.value+n)*ee)/ee,t=clamp(e,a,i);t!==z.value&&(z.value=t,F.value=te(t,T),be(),he(t,t))}},[s,r,ee,W,a,i,te,T,F,z,U,he,be]),Me=j.thumbDiameter/2,De=s?A.colors["surface-disabled"]:N,Re="inset"===l?{backgroundColor:De,borderColor:A.colors.surface,borderWidth:Math.max(2,Math.round(.3*j.thumbDiameter)),...NO_SHADOW}:"minimal"===l?{backgroundColor:De,borderWidth:0}:"bar"===l?{backgroundColor:"transparent",borderWidth:0,...NO_SHADOW}:{backgroundColor:A.colors.surface,borderColor:De},He=useAnimatedStyle(()=>{const e=$.value;if(e<=0)return{opacity:0,transform:[{translateX:0},{scaleX:1}]};const t=s?.55:1;if(W){const a=Math.max(0,G.value-F.value+2*M);return{opacity:t,transform:[{translateX:F.value-M},{scaleX:a/e}]}}return{opacity:t,transform:[{translateX:F.value+M-e},{scaleX:1}]}},[$,s,W,G,F,M]),Ee=useAnimatedStyle(()=>({transform:[{translateX:F.value-Me},{scale:J.value}]}),[F,Me,J]),Oe=useAnimatedStyle(()=>({transform:[{translateX:G.value-Me},{scale:q.value}]}),[G,Me,q]),Te=useAnimatedStyle(()=>({opacity:Q.value}),[Q]),Pe=useAnimatedStyle(()=>({opacity:Y.value}),[Y]),clampDisplay=e=>clamp(e,a,i),Ne=clampDisplay(isPair(X)?Math.min(...X):X),Ie=clampDisplay(isPair(X)?Math.max(...X):X);return _jsx(View,{ref:t,style:[E.container,f,g],testID:x,accessibilityRole:"adjustable",accessibilityLabel:h,accessibilityState:{disabled:s},"aria-disabled":s,accessibilityValue:W?{min:a,max:i,now:Ne,text:`${Ne} to ${Ie}`}:{min:a,max:i,now:Ne},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:je,children:_jsx(Pressable,{onPress:Ve,disabled:s||W,style:E.trackTouch,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:_jsxs(View,{style:E.trackWrap,onLayout:me,children:[_jsxs(View,{style:E.trackClip,pointerEvents:"none",children:[_jsx(View,{style:[E.track,{backgroundColor:s?A.colors["surface-disabled"]:A.colors.border},p]}),_jsx(Animated.View,{style:[E.fill,{backgroundColor:s?A.colors["surface-disabled"]:N},v,He]})]}),_jsx(GestureDetector,{gesture:xe,children:_jsx(Animated.View,{style:[E.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:Me,...smoothCorners,opacity:s?.55:1},Re,w,Ee],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:u?_jsxs(Animated.View,{style:[E.bubbleWrap,Te],pointerEvents:"none",children:[_jsx(View,{style:[E.bubble,{backgroundColor:N}],children:m?m(Ne):_jsx(Text,{variant:"caption",weight:"semibold",style:[{color:I},y],numberOfLines:1,children:d(Ne)})}),_jsx(View,{style:[E.bubbleCaret,{backgroundColor:N}]})]}):null})}),W?_jsx(GestureDetector,{gesture:Ae,children:_jsx(Animated.View,{style:[E.thumb,{width:j.thumbDiameter,height:j.thumbDiameter,borderRadius:Me,...smoothCorners,opacity:s?.55:1},Re,w,Oe],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:u?_jsxs(Animated.View,{style:[E.bubbleWrap,Pe],pointerEvents:"none",children:[_jsx(View,{style:[E.bubble,{backgroundColor:N}],children:m?m(Ie):_jsx(Text,{variant:"caption",weight:"semibold",style:[{color:I},y],numberOfLines:1,children:d(Ie)})}),_jsx(View,{style:[E.bubbleCaret,{backgroundColor:N}]})]}):null})}):null]})})})});Slider.displayName="Slider";const buildStyles=(e,t)=>{const a=e.shadow.elevated,i=Math.max(t.thumbDiameter,t.trackHeight),r=i/2+e.space.xs;return StyleSheet.create({container:{width:"100%",paddingVertical:r,justifyContent:"center"},trackTouch:{width:"100%",justifyContent:"center"},trackWrap:{width:"100%",height:i,justifyContent:"center"},trackClip:{position:"absolute",left:0,right:0,height:t.trackHeight,top:(i-t.trackHeight)/2,borderRadius:t.trackHeight/2,...smoothCorners,overflow:"hidden"},track:{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:t.trackHeight/2,...smoothCorners},fill:{position:"absolute",top:0,left:0,width:"100%",height:t.trackHeight,borderRadius:t.trackHeight/2,...smoothCorners,transformOrigin:"left"},thumb:{position:"absolute",top:(i-t.thumbDiameter)/2,left:0,borderWidth:2,shadowColor:a.shadowColor,shadowOffset:a.shadowOffset,shadowOpacity:a.shadowOpacity,shadowRadius:a.shadowRadius,elevation:a.elevation,alignItems:"center",justifyContent:"center"},bubbleWrap:{position:"absolute",bottom:t.thumbDiameter+2,left:t.thumbDiameter/2-80,width:160,alignItems:"center"},bubbleCaret:{width:8,height:8,marginTop:-5,borderRadius:e.radius.none,...smoothCorners,transform:[{rotate:"45deg"}]},bubble:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xxs,borderRadius:e.radius.md,...smoothCorners,minWidth:36,alignItems:"center",justifyContent:"center",...Platform.select({ios:{shadowColor:e.shadow.card.shadowColor,shadowOffset:e.shadow.card.shadowOffset,shadowOpacity:e.shadow.card.shadowOpacity,shadowRadius:e.shadow.card.shadowRadius},android:{elevation:e.shadow.card.elevation},default:{}})}})};export{Slider};export default Slider;
|
|
1
|
+
"use strict";import{forwardRef,useCallback,useEffect,useMemo,useRef,useState}from"react";import{Platform,Pressable,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,Easing,useAnimatedStyle,useSharedValue,withSpring,withTiming}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useControllableState}from"../../hooks/index.js";import{fillText,useMobileUiText}from"../../text/index.js";import{SLIDER_TEXT}from"../../text/phone/slider.g.js";import{resolveSliderSize,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{Text}from"../Text/index.js";import{sliderToneInk}from"./valueText.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const VARIANT_SIZE_MAP={inset:{sm:{trackHeight:14,thumbDiameter:10},md:{trackHeight:20,thumbDiameter:14},lg:{trackHeight:26,thumbDiameter:18}},minimal:{sm:{trackHeight:2,thumbDiameter:14},md:{trackHeight:3,thumbDiameter:18},lg:{trackHeight:4,thumbDiameter:22}},bar:{sm:{trackHeight:20,thumbDiameter:20},md:{trackHeight:28,thumbDiameter:28},lg:{trackHeight:36,thumbDiameter:36}}},INSET_RING_RATIO=.3,MIN_THUMB_TOUCH=44,clamp=(e,t,a)=>Math.min(Math.max(e,t),a),snapToStep=(e,t,a,i)=>{if(i<=0)return clamp(e,t,a);const r=Math.round((e-t)/i)*i+t,s=String(i).split(".")[1]?.length??0,n=s>0?Number(r.toFixed(s)):r;return clamp(n,t,a)},BUBBLE_GAP=2,BUBBLE_CARET=8,BUBBLE_WRAP_WIDTH=160,NO_SHADOW={shadowOpacity:0,elevation:0},defaultFormatLabel=e=>String(e),isPair=e=>Array.isArray(e),Slider=forwardRef((e,t)=>{const{min:a=0,max:i=100,step:r=1,disabled:s=!1,tone:n="primary",size:o="md",variant:l="default",showLabel:u=!1,snapThumb:c=!1,formatLabel:d=defaultFormatLabel,renderLabel:m,accessibilityLabel:h,haptic:b,style:f,trackStyle:p,fillStyle:g,thumbStyle:v,labelStyle:w,thumbPressScale:y,labelShowDuration:S,labelOpacity:k,testID:x}=e;assertValidValue("Slider","tone",e.tone,["primary","success","warning","danger","info","neutral"]),assertValidValue("Slider","size",e.size,["sm","md","lg"]),assertValidValue("Slider","variant",e.variant,["default","inset","minimal","bar"]);const C=useTheme(),A=useMobileUiText("slider",SLIDER_TEXT),V=useMemo(()=>{const e=resolveSliderSize(C,o);return{trackHeight:e["track-height"],thumbDiameter:e["thumb-diameter"]}},[C,o]),D=useMemo(()=>"default"===l?V:VARIANT_SIZE_MAP[l][o],[V,o,l]),j="inset"===l?D.trackHeight/2:0,M=C.settings.components.slider?.thumbPressAnimation??!1,_=y??1.1,T=S??C.motion.duration.fast,R=k??1,E=useMemo(()=>buildStyles(C,D),[C,D]),H=useMemo(()=>({damping:C.motion.spring.snappy.damping,stiffness:C.motion.spring.snappy.stiffness,mass:C.motion.spring.snappy.mass}),[C.motion.spring.snappy]),[O,I]=useState(0),P=C.colors[n],N=sliderToneInk(C,n),L=!0===e.range,W=useCallback(t=>{if(!0!==e.range){if(Array.isArray(t))throw new Error("Slider received a range value in single mode.");e.onChange?.(t)}else{if(!Array.isArray(t))throw new Error("Slider received a single value in range mode.");e.onChange?.(t)}},[e.onChange,e.range]),[X,B]=useControllableState({value:e.value,defaultValue:e.defaultValue??(L?[a,i]:a),onChange:W}),F=useSharedValue(0),G=useSharedValue(0),U=useSharedValue(isPair(X)?X[0]:X),z=useSharedValue(isPair(X)?X[1]:X),$=useSharedValue(0),Z=useSharedValue(0),J=useSharedValue(1),q=useSharedValue(1),K="always"===u,Q=useSharedValue(K?1:0),Y=useSharedValue(K?1:0),ee=useMemo(()=>10**(String(r).split(".")[1]?.length??0),[r]);useEffect(()=>()=>{cancelAnimation(F),cancelAnimation(G),cancelAnimation(J),cancelAnimation(q),cancelAnimation(Q),cancelAnimation(Y)},[F,G,J,q,Q,Y]);const te=useCallback((e,t)=>{const r=t-2*j;return i===a||r<=0?j:j+(e-a)/(i-a)*r},[a,i,j]),ae=useCallback((e,t)=>{const s=t-2*j;if(s<=0)return a;const n=clamp((e-j)/s,0,1);return snapToStep(a+n*(i-a),a,i,r)},[a,i,r,j]),ie=useRef(!1),re=C.motion.duration.fast,se=useRef(X);se.current=X;const ne=useRef(O);ne.current=O;const oe=useCallback((e=!1)=>{const t=ne.current;if(t<=0)return;const place=t=>e?withTiming(t,{duration:re,easing:Easing.out(Easing.cubic)}):t,a=se.current;if(isPair(a)){const[e,i]=a,r=Math.min(e,i),s=Math.max(e,i);U.value=r,z.value=s,F.value=place(te(r,t)),G.value=place(te(s,t))}else{const e=a;U.value=e,z.value=e,F.value=place(te(e,t))}},[te,U,z,F,G,re]),[le,ue]=useState(0),ce=useRef(!1),de=useCallback(e=>{ie.current=e,e||(ce.current=!0,ue(e=>e+1))},[]);useEffect(()=>{if(ie.current)return;const e=ce.current;ce.current=!1,oe(e)},[JSON.stringify(X),O,le,oe]);const me=useCallback(e=>{const t=e.nativeEvent.layout.width;Z.value=t,I(t)},[Z]),he=useCallback((e,t)=>{B(L?[e,t]:e)},[L,B]),be=useCallback(()=>{const e=resolveHaptic(b,"selection");e&&triggerHaptic(e)},[b]),fe=useRef(he);fe.current=he;const pe=useRef(be);pe.current=be;const ge=useCallback((e,t)=>fe.current(e,t),[]),ve=useCallback(()=>pe.current(),[]),we=Math.max(0,(44-D.thumbDiameter)/2),ye=we>0?we:void 0,Se=useCallback(e=>{const t="low"===e?F:G,n="low"===e?U:z,o="low"===e?z:U,l="low"===e?J:q,d="low"===e?Q:Y,m="low"===e,h=a,b=i,f=r,p=ee,g=L,v=_,w=M,y=!0===u,S=c,k=R,C=T,A=H,V=j,D=m&&x?`${x}-pan`:void 0,follow=e=>{"worklet";const a=Z.value-2*V;if(a<=0||!Number.isFinite(e))return;const i=Math.min(Math.max($.value+e,V),Z.value-V);let r=h+(i-V)/a*(b-h);f>0&&(r=Math.round((r-h)/f)*f+h,r=Math.round(r*p)/p),r=Math.min(Math.max(r,h),b),g&&(m&&r>o.value&&(r=o.value),!m&&r<o.value&&(r=o.value)),t.value=S||b===h?b===h?V:V+(r-h)/(b-h)*a:g?m?Math.min(i,G.value):Math.max(i,F.value):i,r!==n.value&&(n.value=r,r!==h&&r!==b||scheduleOnRN(ve),scheduleOnRN(ge,U.value,z.value))};return{enabled:!s,minDistance:0,testID:D,...void 0===ye?{}:{hitSlop:ye},onActivate:()=>{"worklet";scheduleOnRN(de,!0),$.value=t.value,w&&(l.value=withSpring(v,A)),y&&(d.value=withTiming(k,{duration:C,easing:Easing.out(Easing.cubic)})),scheduleOnRN(ve)},onUpdate:e=>{"worklet";follow(e.translationX)},onDeactivate:e=>{"worklet";follow(e.translationX),w&&(l.value=withSpring(1,A)),y&&(d.value=withTiming(0,{duration:C,easing:Easing.out(Easing.cubic)}))},onFinalize:()=>{"worklet";scheduleOnRN(de,!1)}}},[s,a,i,r,ee,L,_,M,u,c,R,T,H,j,ye,x,ge,ve,de,F,G,U,z,J,q,Q,Y,$,Z]),ke=useMemo(()=>Se("low"),[Se]),xe=useMemo(()=>Se("high"),[Se]),Ce=usePanGesture(ke),Ae=usePanGesture(xe),Ve=useCallback(e=>{if(s||L||O<=0)return;const t=clamp(e.nativeEvent.locationX,0,O),a=ae(t,O);a!==U.value&&(be(),U.value=a,F.value=withTiming(te(a,O),{duration:C.motion.duration.fast,easing:Easing.out(Easing.cubic)}),he(a,a))},[s,L,O,ae,te,he,be,F,U,C.motion.duration.fast]),De=useCallback(e=>{if(s)return;const t="increment"===e.nativeEvent.actionName?r:-r,n=r>0?Math.round(t*ee)/ee:t;if(L){const e=Math.round((U.value+n)*ee)/ee,t=clamp(e,a,z.value);t!==U.value&&(U.value=t,F.value=te(t,O),be(),he(t,z.value))}else{const e=Math.round((U.value+n)*ee)/ee,t=clamp(e,a,i);t!==U.value&&(U.value=t,F.value=te(t,O),be(),he(t,t))}},[s,r,ee,L,a,i,te,O,F,U,z,he,be]),je=D.thumbDiameter/2,Me=s?C.colors["surface-disabled"]:P,Te="inset"===l?{backgroundColor:Me,borderColor:C.colors.surface,borderWidth:Math.max(2,Math.round(.3*D.thumbDiameter)),...NO_SHADOW}:"minimal"===l?{backgroundColor:Me,borderWidth:0}:"bar"===l?{backgroundColor:"transparent",borderWidth:0,...NO_SHADOW}:{backgroundColor:C.colors.surface,borderColor:Me},Re=useAnimatedStyle(()=>{const e=Z.value;if(e<=0)return{opacity:0,transform:[{translateX:0},{scaleX:1}]};const t=s?.55:1;if(L){const a=Math.max(0,G.value-F.value+2*j);return{opacity:t,transform:[{translateX:F.value-j},{scaleX:a/e}]}}return{opacity:t,transform:[{translateX:F.value+j-e},{scaleX:1}]}},[Z,s,L,G,F,j]),Ee=useAnimatedStyle(()=>({transform:[{translateX:F.value-je},{scale:J.value}]}),[F,je,J]),He=useAnimatedStyle(()=>({transform:[{translateX:G.value-je},{scale:q.value}]}),[G,je,q]),Oe=useAnimatedStyle(()=>({opacity:Q.value}),[Q]),Ie=useAnimatedStyle(()=>({opacity:Y.value}),[Y]),clampDisplay=e=>clamp(e,a,i),Pe=clampDisplay(isPair(X)?Math.min(...X):X),Ne=clampDisplay(isPair(X)?Math.max(...X):X);return _jsx(View,{ref:t,style:[E.container,f],testID:x,accessibilityRole:"adjustable",accessibilityLabel:h,accessibilityState:{disabled:s},"aria-disabled":s,accessibilityValue:L?{min:a,max:i,now:Pe,text:fillText(A.text,{start:Pe,end:Ne})}:{min:a,max:i,now:Pe},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:De,children:_jsx(Pressable,{onPress:Ve,disabled:s||L,style:E.trackTouch,testID:x?`${x}-track-press`:void 0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:_jsxs(View,{style:E.trackWrap,onLayout:me,testID:x?`${x}-track`:void 0,children:[_jsxs(View,{style:E.trackClip,pointerEvents:"none",children:[_jsx(View,{style:[E.track,{backgroundColor:s?C.colors["surface-disabled"]:C.colors.border},p]}),_jsx(Animated.View,{style:[E.fill,{backgroundColor:s?C.colors["surface-disabled"]:P},g,Re],testID:x?`${x}-fill`:void 0})]}),_jsx(GestureDetector,{gesture:Ce,children:_jsx(Animated.View,{style:[E.thumb,{width:D.thumbDiameter,height:D.thumbDiameter,borderRadius:je,...smoothCorners,opacity:s?.55:1},Te,v,Ee],testID:x?`${x}-thumb`:void 0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:u?_jsxs(Animated.View,{style:[E.bubbleWrap,Oe],pointerEvents:"none",children:[_jsx(View,{style:[E.bubble,{backgroundColor:P}],children:m?m(Pe):_jsx(Text,{variant:"caption",weight:"semibold",style:[{color:N},w],numberOfLines:1,children:d(Pe)})}),_jsx(View,{style:[E.bubbleCaret,{backgroundColor:P}]})]}):null})}),L?_jsx(GestureDetector,{gesture:Ae,children:_jsx(Animated.View,{style:[E.thumb,{width:D.thumbDiameter,height:D.thumbDiameter,borderRadius:je,...smoothCorners,opacity:s?.55:1},Te,v,He],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:u?_jsxs(Animated.View,{style:[E.bubbleWrap,Ie],pointerEvents:"none",children:[_jsx(View,{style:[E.bubble,{backgroundColor:P}],children:m?m(Ne):_jsx(Text,{variant:"caption",weight:"semibold",style:[{color:N},w],numberOfLines:1,children:d(Ne)})}),_jsx(View,{style:[E.bubbleCaret,{backgroundColor:P}]})]}):null})}):null]})})})});Slider.displayName="Slider";const buildStyles=(e,t)=>{const a=e.shadow.elevated,i=Math.max(t.thumbDiameter,t.trackHeight),r=i/2+e.space.xs;return StyleSheet.create({container:{width:"100%",paddingVertical:r,justifyContent:"center"},trackTouch:{width:"100%",justifyContent:"center"},trackWrap:{width:"100%",height:i,justifyContent:"center"},trackClip:{position:"absolute",left:0,right:0,height:t.trackHeight,top:(i-t.trackHeight)/2,borderRadius:t.trackHeight/2,...smoothCorners,overflow:"hidden"},track:{position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:t.trackHeight/2,...smoothCorners},fill:{position:"absolute",top:0,left:0,width:"100%",height:t.trackHeight,borderRadius:t.trackHeight/2,...smoothCorners,transformOrigin:"left"},thumb:{position:"absolute",top:(i-t.thumbDiameter)/2,left:0,borderWidth:2,shadowColor:a.shadowColor,shadowOffset:a.shadowOffset,shadowOpacity:a.shadowOpacity,shadowRadius:a.shadowRadius,elevation:a.elevation,alignItems:"center",justifyContent:"center"},bubbleWrap:{position:"absolute",bottom:t.thumbDiameter+2,left:t.thumbDiameter/2-80,width:160,alignItems:"center"},bubbleCaret:{width:8,height:8,marginTop:-5,borderRadius:e.radius.none,...smoothCorners,transform:[{rotate:"45deg"}]},bubble:{paddingHorizontal:e.space.sm,paddingVertical:e.space.xxs,borderRadius:e.radius.md,...smoothCorners,minWidth:36,alignItems:"center",justifyContent:"center",...Platform.select({ios:{shadowColor:e.shadow.card.shadowColor,shadowOffset:e.shadow.card.shadowOffset,shadowOpacity:e.shadow.card.shadowOpacity,shadowRadius:e.shadow.card.shadowRadius},android:{elevation:e.shadow.card.elevation},default:{}})}})};export{Slider};export default Slider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useCallback,useMemo,useRef}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{AppIcon,renderSlotIcon}from"../AppIcon/index.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{Slider}from"../Slider/index.js";import{CountingText,clampValue,sliderToneInk,snapValue,useValueDraft}from"../Slider/valueText.js";import{Text}from"../Text/index.js";import{Tooltip}from"../Tooltip/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{forwardRef,useCallback,useMemo,useRef}from"react";import{Pressable,StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{fillText,useMobileUiText}from"../../text/index.js";import{SLIDER_FIELD_TEXT}from"../../text/phone/sliderField.g.js";import{resolveFieldSize,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hitSlopMarker}from"../../utils/hitSlop.js";import{AppIcon,renderSlotIcon}from"../AppIcon/index.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,resolveFieldTextStyle}from"../FieldBase/FieldBase.js";import{IconButton}from"../IconButton/index.js";import{Slider}from"../Slider/index.js";import{CountingText,clampValue,sliderToneInk,snapValue,useValueDraft}from"../Slider/valueText.js";import{Text}from"../Text/index.js";import{Tooltip}from"../Tooltip/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const DEFAULT_INPUT_WIDTH=72,defaultFormatValue=e=>String(e),stepDecimals=e=>String(e).split(".")[1]?.length??0,ValueBox=({draft:e,error:l,disabled:t,width:i,accessibilityLabel:s,styles:a,style:r,testID:o,fieldTestID:n})=>{const d=useTheme(),c=resolveFieldSize(d,"sm"),u=resolveFieldTextStyle(d,{disabled:t}),m=useRef(null),p=useCallback(()=>{t||m.current?.focus()},[t]);return _jsx(FieldBase,{testID:n,size:"sm",focused:e.editing,disabled:t,error:l,filled:!0,width:i,onPress:p,pressFeedback:!1,paddingHorizontal:d.space.sm,gap:d.space.xs,trailing:l?_jsx(AppIcon,{name:"info-circle",size:c.icon,color:d.colors["danger-text"]}):void 0,style:r,children:_jsx(TextInput,{ref:m,style:[a.boxInput,{color:u.color,fontSize:c.text,...u.weightStyle}],value:e.text,onChangeText:e.onChangeText,onFocus:e.onFocus,onBlur:e.onBlur,onSubmitEditing:e.onBlur,editable:!t,keyboardType:"decimal-pad",returnKeyType:"done",textAlign:"center",selectionColor:d.colors.primary,accessibilityLabel:s,accessibilityState:{disabled:t},"aria-disabled":t,testID:o})})},SliderField=forwardRef((e,l)=>{const{label:t,unit:i,info:s,required:a=!1,helperText:r,error:o,min:n=0,max:d=100,step:c=1,disabled:u=!1,tone:m="primary",size:p,variant:x,haptic:b,showBubble:f=!0,showBounds:h=!0,showInput:y=!1,showStepper:g=!1,leftIcon:T,rightIcon:I,startLabel:S,endLabel:j,formatValue:v=defaultFormatValue,parseInput:w,animationDuration:F,inputWidth:V=DEFAULT_INPUT_WIDTH,labels:_,accessibilityLabel:D,style:L,labelStyle:B,boundStyle:z,sliderStyle:C,inputStyle:A,testID:k}=e;assertValidValue("SliderField","tone",e.tone,["primary","success","warning","danger","info","neutral"]),assertValidValue("SliderField","size",e.size,["sm","md","lg"]),assertValidValue("SliderField","variant",e.variant,["default","inset","minimal","bar"]);const M=useMobileUiText("sliderField",SLIDER_FIELD_TEXT),E=useMemo(()=>({...M,..._}),[M,_]),$=useTheme(),R=useMemo(()=>buildStyles($),[$]),P=F??$.motion.duration.fast,W=!0===e.range,N=!0===o||hasFieldText(o),U=stepDecimals(c),H=useCallback(l=>{if(!0!==e.range){if(Array.isArray(l))throw new Error("SliderField received a range value in single mode.");e.onChange?.(l)}else{if(!Array.isArray(l))throw new Error("SliderField received a single value in range mode.");e.onChange?.(l)}},[e.onChange,e.range]),[q,X]=useControllableState({value:e.value,defaultValue:e.defaultValue??(W?[n,d]:n),onChange:H}),[K,G]=Array.isArray(q)?q:[q,d],J=clampValue(Math.min(K,G),n,d),O=clampValue(Math.max(K,G),n,d),Q=useValueDraft({value:J,min:n,max:d,step:c,format:v,parse:w,onChange:e=>X(W?[Math.min(e,O),O]:e)}),Y=useValueDraft({value:O,min:n,max:d,step:c,format:v,parse:w,onChange:e=>X([J,Math.max(e,J)])}),stepBy=e=>{const l=snapValue(J+e*c,n,d,c);l!==J&&X(l)},Z={color:u?$.colors["text-disabled"]:$.colors["text-muted"],size:resolveFieldSize($,"md").icon,disabled:u},ee=[R.bubbleText,{color:sliderToneInk($,m)}],boundText=e=>_jsx(Text,{variant:"bodySmall",style:[R.bound,{color:u?$.colors["text-disabled"]:$.colors["text-muted"]},z],children:e}),le={min:n,max:d,step:c,disabled:u,tone:m,size:p,variant:x,haptic:b,showLabel:!!f&&"always",renderLabel:f?e=>_jsx(CountingText,{value:e,format:v,decimals:U,duration:P,style:ee,testID:k&&!W?`${k}-bubble`:void 0}):void 0,accessibilityLabel:D??t,style:C,testID:k?`${k}-slider`:void 0};return _jsxs(View,{ref:l,style:[R.container,L],testID:k,children:[t?_jsxs(View,{style:R.labelRow,children:[_jsx(FieldLabel,{required:a,style:B,children:t}),i?_jsx(Text,{variant:"caption",style:{color:$.colors["text-subtle"]},children:i}):null,s?_jsx(Tooltip,{content:s,trigger:"press",placement:"top",children:_jsx(Pressable,{accessibilityRole:"button",accessibilityLabel:fillText(E.about,{label:t}),hitSlop:8,...hitSlopMarker(8),style:R.infoButton,children:_jsx(AppIcon,{name:"info-circle",variant:"bold",size:16,color:$.colors["text-subtle"]})})}):null]}):null,_jsxs(View,{style:[R.row,f?R.rowWithBubble:null],children:[T?_jsx(View,{children:renderSlotIcon(T,Z)}):null,g&&!W?_jsx(IconButton,{icon:e=>_jsx(AppIcon,{name:"minus",size:e.size,color:e.color}),onPress:()=>stepBy(-1),accessibilityLabel:E.decrease,variant:"ghost",tone:"neutral",size:"sm",disabled:u||J<=n,haptic:b,testID:k?`${k}-minus`:void 0}):null,W&&y?_jsx(ValueBox,{draft:Q,error:N,disabled:u,width:V,accessibilityLabel:fillText(E.low,{name:t??E.fallbackName}),styles:R,style:A,testID:k?`${k}-input-low`:void 0,fieldTestID:k?`${k}-field-low`:void 0}):h?boundText(S??v(n)):null,_jsx(View,{style:R.sliderWrap,children:_jsx(Slider,W?{...le,range:!0,value:[J,O],onChange:X}:{...le,value:J,onChange:X})}),W&&y?_jsx(ValueBox,{draft:Y,error:N,disabled:u,width:V,accessibilityLabel:fillText(E.high,{name:t??E.fallbackName}),styles:R,style:A,testID:k?`${k}-input-high`:void 0,fieldTestID:k?`${k}-field-high`:void 0}):h?boundText(j??v(d)):null,g&&!W?_jsx(IconButton,{icon:e=>_jsx(AppIcon,{name:"add",size:e.size,color:e.color}),onPress:()=>stepBy(1),accessibilityLabel:E.increase,variant:"ghost",tone:"neutral",size:"sm",disabled:u||J>=d,haptic:b,testID:k?`${k}-plus`:void 0}):null,I?_jsx(View,{children:renderSlotIcon(I,Z)}):null,!W&&y?_jsx(ValueBox,{draft:Q,error:N,disabled:u,width:V,accessibilityLabel:fillText(E.current,{name:t??E.fallbackName}),styles:R,style:A,testID:k?`${k}-input`:void 0,fieldTestID:k?`${k}-field`:void 0}):null]}),_jsx(FieldMessage,{text:N?o:r,error:N})]})});SliderField.displayName="SliderField";const buildStyles=e=>StyleSheet.create({container:{width:"100%"},labelRow:{flexDirection:"row",alignItems:"center",gap:e.space.xs},infoButton:{marginLeft:e.space.xxs},row:{flexDirection:"row",alignItems:"center",gap:e.space.sm},rowWithBubble:{marginTop:e.space.lg},sliderWrap:{flex:1,paddingHorizontal:e.space.sm},bound:{fontVariant:["tabular-nums"]},bubbleText:{fontVariant:["tabular-nums"]},boxInput:{flex:1,padding:e.space.none,margin:e.space.none,includeFontPadding:!1}});export{SliderField};export default SliderField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,SliderField}from"./SliderField.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,measure,scrollTo,useAnimatedRef,useAnimatedScrollHandler,useAnimatedStyle,useFrameCallback,useSharedValue,withSpring}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{useScrollHost}from"../Screen/ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,measure,scrollTo,useAnimatedRef,useAnimatedScrollHandler,useAnimatedStyle,useFrameCallback,useSharedValue,withSpring}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useMobileUiText}from"../../text/index.js";import{SORTABLE_LIST_TEXT}from"../../text/phone/sortableList.g.js";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{useScrollHost}from"../Screen/ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const LONG_PRESS_MS=350,EDGE_PX=48,SCROLL_STEP_PX=12,SCROLL_SLACK_PX=1,SPRING_CONFIG={damping:22,stiffness:260,mass:1},ACTION_STEP={moveUp:-1,moveDown:1},noop=e=>{};export function moveItem(e,t,a){const l=e.slice();if(t<0||t>=l.length)return l;const[s]=l.splice(t,1);return void 0===s||l.splice(a,0,s),l}export function topOf(e,t){"worklet";let a=0;for(let l=0;l<t;l++)a+=e[l]??0;return a}export function slotTop(e,t,a){"worklet";let l=0,s=0;for(let o=0;o<e.length&&s<a;o++)o!==t&&(l+=e[o]??0,s++);return l}export function dropIndex(e,t,a){"worklet";const l=topOf(e,t)+(e[t]??0)/2+a;let s=0,o=0;for(let a=0;a<e.length;a++){const r=e[a]??0;a!==t&&o+r/2<l&&s++,o+=r}return s}export function rowShifts(e,t,a){const l=[];let s=0;for(const t of e)l.push(s),s+=t;const o=e.map(()=>0),r=moveItem(e.map((e,t)=>t),t,a);let n=0;for(const t of r)o[t]=n-(l[t]??0),n+=e[t]??0;return o}const buildStyles=e=>StyleSheet.create({handleRow:{flexDirection:"row",alignItems:"center"},handle:{paddingHorizontal:e.space.sm,paddingVertical:e.space.md,gap:e.space.xxs},bar:{width:e.space.md,height:e.space.xxs,backgroundColor:e.colors["text-muted"]},body:{flex:1}});function SortableRow({rowKey:e,index:t,count:a,shift:l,isActive:s,dragging:o,handle:r,disabled:n,shared:u,callbacks:i,labels:c,children:d}){const m=useTheme(),h=useMemo(()=>buildStyles(m),[m]),v=useSharedValue(0);useEffect(()=>{v.value=o&&!s?withSpring(l,SPRING_CONFIG):l},[o,s,l,v]),useEffect(()=>()=>{cancelAnimation(v)},[v]);const f=useAnimatedStyle(()=>({transform:[{translateY:s?u.dragY.value:v.value}],zIndex:s?1:0}),[s,u,v]),g=useMemo(()=>{const{dragIndex:e,dropTo:a,dragY:l,translation:s,absoluteY:o,scrollY:c,scrollStart:d,hostOffset:m,hostStart:h,hostTarget:v,heights:f}=u,{onLift:g,onDrop:p,onSettled:S}=i;return{enabled:!n,...r?{}:{activateAfterLongPress:350},onActivate:r=>{"worklet";o.value=r.absoluteY,e.value=t,a.value=t,d.value=c.value,h.value=m.value,v.value=m.value,s.value=0,l.value=0,scheduleOnRN(g,t)},onUpdate:a=>{"worklet";e.value===t&&(s.value=a.translationY,o.value=a.absoluteY)},onFinalize:()=>{"worklet";if(e.value!==t)return;const s=a.value,o=f.value;e.value=-1,l.value=topOf(o,t)+l.value-slotTop(o,t,s),l.value=withSpring(0,SPRING_CONFIG,e=>{"worklet";e&&scheduleOnRN(S)}),scheduleOnRN(p,t,s)}}},[n,r,t,i,u]),p=usePanGesture(g),S=n?[]:[...t>0?[{name:"moveUp",label:c.moveUp}]:[],...t<a-1?[{name:"moveDown",label:c.moveDown}]:[]];return _jsx(Animated.View,{style:f,onLayout:t=>i.onHeight(e,t.nativeEvent.layout.height),accessibilityActions:S,onAccessibilityAction:e=>{if(n)return;const l=t+(ACTION_STEP[e.nativeEvent.actionName]??0);l!==t&&l>=0&&l<a&&i.onMove(t,l)},testID:`sortable-row-${e}`,children:r?_jsxs(View,{style:h.handleRow,children:[_jsx(GestureDetector,{gesture:p,children:_jsxs(View,{style:h.handle,children:[_jsx(View,{style:h.bar}),_jsx(View,{style:h.bar}),_jsx(View,{style:h.bar})]})}),_jsx(View,{style:h.body,children:d})]}):_jsx(GestureDetector,{gesture:p,children:_jsx(View,{children:d})})})}export function SortableList(e){const{data:t,keyExtractor:a,renderItem:l,onReorder:s,handle:o=!1,disabled:r=!1,accessibilityLabel:n,labels:u,testID:i}=e,c=useMobileUiText("sortableList",SORTABLE_LIST_TEXT),d=useMemo(()=>({...c,...u}),[c,u]),m=useMemo(()=>t.map((e,t)=>({key:a(e,t),item:e})),[t,a]),h=useMemo(()=>m.map(e=>e.key),[m]),v=useAnimatedRef(),f=useSharedValue(0),g=useSharedValue(0),p=useSharedValue(0),S=useScrollHost(),b=useSharedValue(0),x=null!==S,w=S?.top??b,y=S?.bottom??b,k=S?.offset??b,_=S?.maxOffset??b,T=S?.scrollTo??noop,A=useSharedValue(0),R=useSharedValue(0),V=useSharedValue(0),I=useSharedValue(0),O=useSharedValue(-1),j=useSharedValue(-1),C=useSharedValue(0),L=useSharedValue([]),M=useRef(new Map),E=useRef(h),[N,Y]=useState(null),P=useCallback(()=>{L.value=E.current.map(e=>M.current.get(e)??0)},[L]);useEffect(()=>{E.current=h,P()},[h,P]),useEffect(()=>()=>{cancelAnimation(C)},[C]);const D=useCallback(e=>{Y(t=>t?.dragging?{...t,to:e}:t)},[]),G=useFrameCallback(()=>{"worklet";const e=O.value;if(e<0)return;const t=measure(v);if(t){const e=x?Math.max(t.pageY,w.value):t.pageY,a=x?Math.min(t.pageY+t.height,y.value):t.pageY+t.height,l=Math.max(0,p.value-t.height-1);I.value<e+48?f.value>1?scrollTo(v,0,Math.max(0,f.value-12),!1):x&&R.value>0&&(R.value=Math.max(0,R.value-12),scheduleOnRN(T,R.value)):I.value>a-48&&(f.value<l?scrollTo(v,0,Math.min(l,f.value+12),!1):x&&R.value<_.value&&(R.value=Math.min(_.value,R.value+12),scheduleOnRN(T,R.value)))}C.value=V.value+f.value-g.value+k.value-A.value;const a=dropIndex(L.value,e,C.value);a!==j.value&&(j.value=a,scheduleOnRN(D,a))},!1),H=useCallback(e=>{triggerHaptic("longPress"),G.setActive(!0),Y({key:h[e]??"",from:e,to:e,dragging:!0})},[G,h]),F=useCallback((e,t)=>{G.setActive(!1),Y(e=>e?{...e,to:t,dragging:!1}:e),t!==e&&s(moveItem(h,e,t))},[G,h,s]),U=useCallback(()=>{Y(e=>e&&!e.dragging?null:e)},[]),X=useCallback((e,t)=>{s(moveItem(h,e,t))},[h,s]),z=useCallback((e,t)=>{M.current.set(e,t),P()},[P]),K=useAnimatedScrollHandler({onScroll:e=>{"worklet";f.value=e.contentOffset.y}}),B=useCallback((e,t)=>{p.value=t},[p]),$=useMemo(()=>({scrollRef:v,scrollY:f,scrollStart:g,hostOffset:k,hostStart:A,hostTarget:R,translation:V,absoluteY:I,dragIndex:O,dropTo:j,dragY:C,heights:L}),[v,f,g,k,A,R,V,I,O,j,C,L]),q=useMemo(()=>({onLift:H,onDrop:F,onSettled:U,onMove:X,onHeight:z}),[H,F,U,X,z]),J=!0===N?.dragging,Q=J&&N?rowShifts(h.map(e=>M.current.get(e)??0),N.from,N.to):null;return _jsx(Animated.ScrollView,{ref:v,onScroll:K,onContentSizeChange:B,scrollEventThrottle:16,scrollEnabled:!J,accessibilityLabel:n,testID:i,children:m.map((e,t)=>{const a=N?.key===e.key;return _jsx(SortableRow,{rowKey:e.key,index:t,count:m.length,shift:Q?.[t]??0,isActive:a,dragging:J,handle:o,disabled:r,shared:$,callbacks:q,labels:d,children:l({item:e.item,index:t,isActive:a})},e.key)})})}SortableList.displayName="SortableList";export default SortableList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,SortableList}from"./SortableList.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{formatNumber}from"@webority/mobile-core";import{forwardRef,useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import Svg,{Circle,Path}from"react-native-svg";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{finiteValues,sparklineGeometry}from"./geometry.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{formatNumber}from"@webority/mobile-core";import{forwardRef,useCallback,useMemo,useState}from"react";import{StyleSheet,View}from"react-native";import Svg,{Circle,Path}from"react-native-svg";import{fillText,useMobileUiText}from"../../text/index.js";import{SPARKLINE_TEXT}from"../../text/phone/sparkline.g.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{finiteValues,sparklineGeometry}from"./geometry.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const DOT_RADIUS=3,lineColor=(e,t)=>{if("neutral"===t)return e.colors["text-muted"];const r=`${t}-text`;return e.colors[r]},defaultFormat=e=>formatNumber(e),Sparkline=forwardRef((e,t)=>{const{data:r,tone:i="primary",color:s,fill:o=!1,highlightLast:l=!0,height:a=32,width:n,strokeWidth:m=2,label:u,formatLabel:c=defaultFormat,accessibilityLabel:f,labels:h,style:d,testID:p}=e;assertValidValue("Sparkline","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const x=useMobileUiText("sparkline",SPARKLINE_TEXT),y=useMemo(()=>({...x,...h}),[x,h]),k=useTheme(),[g,S]=useState(0),b=n??g,w=useCallback(e=>{if(void 0===n){const t=Math.round(e.nativeEvent.layout.width);S(e=>e===t?e:t)}},[n]),j=Math.max(3,m/2)+1,v=useMemo(()=>sparklineGeometry(r,b,a,j),[r,b,a,j]),$=s??lineColor(k,i),T=useMemo(()=>{if(void 0!==f)return f;const e=finiteValues(r),t=u?`${u}, `:"",[i]=e;if(void 0===i)return`${t}${y.noData}`;if(1===e.length)return`${t}${c(i)}`;const s=e[e.length-1];if(void 0===s)throw new Error("A sparkline with two or more finite values has a last value.");const o=c(i),l=c(s),a=c(Math.min(...e)),n=c(Math.max(...e));return`${t}${fillText(y.range,{first:o,end:l,low:a,high:n})}`},[f,r,c,u,y]);return _jsx(View,{ref:t,accessible:!0,accessibilityRole:"image",accessibilityLabel:T,testID:p,onLayout:w,style:[styles.root,void 0===n?styles.stretch:{width:n},{height:a},d],children:""===v.line?null:_jsxs(Svg,{width:b,height:a,viewBox:`0 0 ${b} ${a}`,children:[o?_jsx(Path,{d:v.area,fill:$,fillOpacity:.14,stroke:"none"}):null,_jsx(Path,{d:v.line,fill:"none",stroke:$,strokeWidth:m,strokeLinecap:"round",strokeLinejoin:"round",...p?{testID:`${p}-line`}:{}}),l&&v.last?_jsx(Circle,{cx:v.last.x,cy:v.last.y,r:3,fill:$,...p?{testID:`${p}-dot`}:{}}):null]})})});Sparkline.displayName="Sparkline";const styles=StyleSheet.create({root:{overflow:"hidden"},stretch:{alignSelf:"stretch"}});export{Sparkline};export default Sparkline;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,Sparkline}from"./Sparkline.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{forwardRef,useEffect,useMemo,useRef}from"react";import{ActivityIndicator,Animated,Easing,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{blendOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{squircleHostRadius}from"../../utils/squircle.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
"use strict";import{forwardRef,useEffect,useMemo,useRef}from"react";import{ActivityIndicator,Animated,Easing,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{useMobileUiText}from"../../text/index.js";import{SPINNER_TEXT}from"../../text/phone/spinner.g.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{announce}from"../../utils/announce.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{blendOf}from"../../utils/color.js";import{smoothCorners}from"../../utils/corners.js";import{nativeDriver}from"../../utils/nativeDriver.js";import{squircleHostRadius}from"../../utils/squircle.js";import{SquircleFill,useSquircle}from"../SquircleFill/SquircleFill.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const sizeMap={sm:20,md:32,lg:48},CONTAINER_RATIO=1.5,DOT_NAMES=["first","second","third"],DOT_STAGGER_MS=150,DOT_CYCLE_MS=600,DOT_GROW_SCALE=1.4,DOT_PULSE_MIN_OPACITY=.4,Dot=({size:e,color:t,delay:i,duration:r,reduced:n})=>{const s=useTheme(),o=useRef(createAnimatedValue(0)).current;useEffect(()=>{const e=Animated.loop(Animated.sequence([Animated.delay(i),Animated.timing(o,{toValue:1,duration:r/2,easing:Easing.out(Easing.quad),useNativeDriver:nativeDriver}),Animated.timing(o,{toValue:0,duration:r/2,easing:Easing.in(Easing.quad),useNativeDriver:nativeDriver})]));return e.start(),()=>{e.stop()}},[o,i,r]);const a=useMemo(()=>({grow:o.interpolate({inputRange:[0,1],outputRange:[1,1.4]}),fade:o.interpolate({inputRange:[0,1],outputRange:[.4,1]})}),[o]);return _jsx(Animated.View,{style:{width:e,height:e,borderRadius:s.radius.pill,...smoothCorners,backgroundColor:t,...n?{opacity:a.fade}:{transform:[{scale:a.grow}]}}})},Spinner=forwardRef((e,t)=>{const{size:i="md",color:r,message:n,overlay:s=!1,backdropColor:o,variant:a="circular",accessibilityLabel:l,labels:c,style:u,testID:d}=e;assertValidValue("Spinner","size",e.size,["sm","md","lg"]),assertValidValue("Spinner","variant",e.variant,["circular","dots","contained"]);const m=useMobileUiText("spinner",SPINNER_TEXT),g=useMemo(()=>({...m,...c}),[m,c]),p="contained"===a,f=s&&!p,h=useTheme(),y=usePresenceMotion(),b=y.duration("default"),j=useRef(createAnimatedValue(0)).current;useEffect(()=>{Animated.timing(j,{toValue:1,duration:b,easing:Easing.bezier(...h.motion.ease["in-out"]),useNativeDriver:nativeDriver}).start()},[j,h,b]);const x=useMemo(()=>buildStyles(h),[h]),v=sizeMap[i],S=r??h.colors.primary,C=o??h.colors.scrim,R=useMemo(()=>{if("contained"===a){const e=Math.round(1.5*v);return _jsx(View,{style:[x.container,{width:e,height:e,borderRadius:h.radius.pill,backgroundColor:blendOf(S,.14,h.colors.surface,h.colors["bg-subtle"])}],children:_jsx(ActivityIndicator,{color:S,size:"sm"===i?"small":"large",style:{width:v,height:v}})})}if("dots"===a){const e=Math.max(6,Math.round(v/4));return _jsx(View,{style:[x.dotsRow,{gap:Math.round(e/2)}],children:DOT_NAMES.map((t,i)=>_jsx(Dot,{size:e,color:S,delay:150*i,duration:600,reduced:y.reduced},t))})}return _jsx(ActivityIndicator,{color:S,size:"sm"===i?"small":"large",style:{width:v,height:v}})},[a,i,v,S,x.dotsRow,x.container,y.reduced,h.radius.pill,h.colors.surface,h.colors["bg-subtle"]]),_=l??n??g.loading,w=useRef(_);w.current=_,useEffect(()=>{p&&announce(w.current)},[p]);const A=useSquircle(f,h.radius.lg),M=A.active&&A.size?{borderRadius:squircleHostRadius(A.size.width,A.size.height,h.radius.lg)}:null;let T=x.inlineContent;f?T=x.overlayContent:p&&(T=x.containedContent);const E=_jsxs(Animated.View,{ref:t,accessible:!0,accessibilityRole:"progressbar",accessibilityLiveRegion:p?"none":"polite",accessibilityLabel:_,accessibilityState:{busy:!0},"aria-busy":!0,testID:d,onLayout:A.onLayout,style:[T,M,{opacity:j}],children:[A.active&&A.size?_jsx(SquircleFill,{width:A.size.width,height:A.size.height,radius:h.radius.lg,fill:h.colors.surface}):null,R,n?_jsx(Text,{variant:"body",weight:"medium",style:[x.message,{marginTop:h.space.md}],numberOfLines:2,children:n}):null]});return _jsx(View,f?{pointerEvents:"auto",style:[x.overlay,{backgroundColor:C},u],children:E}:{style:[p?x.containedFill:x.inline,u],children:E})});Spinner.displayName="Spinner";const buildStyles=e=>StyleSheet.create({inline:{alignItems:"center",justifyContent:"center"},inlineContent:{alignItems:"center",justifyContent:"center"},containedFill:{flex:1,alignSelf:"stretch",alignItems:"center",justifyContent:"center",minHeight:Math.round(1.5*sizeMap.lg)+2*e.space.xl},containedContent:{alignItems:"center",justifyContent:"center",paddingHorizontal:e.space.lg},container:{alignItems:"center",justifyContent:"center"},overlay:{...StyleSheet.absoluteFill,alignItems:"center",justifyContent:"center",zIndex:1e3},overlayContent:{alignItems:"center",justifyContent:"center",backgroundColor:e.colors.surface,borderRadius:e.radius.lg,...smoothCorners,paddingHorizontal:e.space.xl,paddingVertical:e.space.xl,minWidth:140,...e.shadow.popover},dotsRow:{flexDirection:"row",alignItems:"center",justifyContent:"center"},message:{textAlign:"center"}});export{Spinner};export default Spinner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export{
|
|
1
|
+
"use strict";export{default,Spinner}from"./Spinner.js";
|