@webority/mobile-ui 0.148.0 → 0.150.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +13 -56553
- package/dist/canvas-kit/manifest.json +20 -41
- package/dist/canvas-kit/release.json +6 -6
- package/lib/commonjs/components/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/AppIcon/AppIcon.js +1 -1
- package/lib/commonjs/components/AppIcon/glyphs.g.js +1 -1
- package/lib/commonjs/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/commonjs/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/commonjs/components/AuthedImage/authedImageCache.js +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +1 -1
- package/lib/commonjs/components/Badge/Badge.js +1 -1
- package/lib/commonjs/components/Banner/Banner.js +1 -1
- package/lib/commonjs/components/BarChart/BarChart.js +1 -1
- package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Box/Box.js +1 -1
- package/lib/commonjs/components/Card/Card.js +1 -1
- package/lib/commonjs/components/Carousel/Carousel.js +1 -1
- package/lib/commonjs/components/Chip/Chip.js +1 -1
- package/lib/commonjs/components/ChoiceGroup/ChoiceGroup.js +1 -1
- package/lib/commonjs/components/Confetti/Confetti.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/commonjs/components/Descriptions/Descriptions.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/FieldBase/useFloatingLabel.js +1 -1
- package/lib/commonjs/components/FileViewer/fileSource.js +1 -1
- package/lib/commonjs/components/FileViewer/useFileViewerZoom.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/commonjs/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/commonjs/components/Input/Input.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/Markdown/Markdown.js +1 -1
- package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
- package/lib/commonjs/components/Menu/focusHost.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/OptionSheet/optionAccessors.js +1 -0
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/ProgressRing/ProgressRing.js +1 -1
- package/lib/commonjs/components/Radio/RadioGroup.js +1 -1
- package/lib/commonjs/components/Rating/Rating.js +1 -1
- package/lib/commonjs/components/Repeater/Repeater.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/components/SearchBar/useRecentSearches.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/SignaturePad/SignaturePad.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonList.js +1 -1
- package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.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/SortableList/SortableList.js +1 -1
- package/lib/commonjs/components/Sparkline/Sparkline.js +1 -1
- package/lib/commonjs/components/SquircleFill/SquircleFill.js +1 -1
- package/lib/commonjs/components/StatTile/StatTile.js +1 -1
- package/lib/commonjs/components/StatusBadge/StatusBadge.js +1 -1
- package/lib/commonjs/components/StatusBadge/statusMap.js +1 -1
- package/lib/commonjs/components/Stepper/Stepper.js +1 -1
- package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
- package/lib/commonjs/components/Text/Text.js +1 -1
- package/lib/commonjs/components/TimePicker/TimePicker.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/ZoomableImage/ZoomableImage.js +1 -1
- package/lib/commonjs/form/HookFormField.js +1 -1
- package/lib/commonjs/form/path.js +1 -1
- package/lib/commonjs/hooks/useControllableState.js +1 -1
- package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
- package/lib/commonjs/navigation/NavigationScreen.js +1 -1
- package/lib/commonjs/specs/NativePdfRasterizer.js +1 -1
- package/lib/commonjs/theme/ThemeContext.js +1 -1
- package/lib/commonjs/theme/animatedValue.js +1 -1
- package/lib/commonjs/theme/componentSizes.js +1 -1
- package/lib/commonjs/theme/merge.js +1 -1
- package/lib/commonjs/theme/scale.js +1 -1
- package/lib/commonjs/utils/complete.js +1 -0
- package/lib/commonjs/utils/guards.js +1 -0
- package/lib/commonjs/utils/hapticUtils.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +1 -1
- package/lib/module/components/AppIcon/AppIcon.js +1 -1
- package/lib/module/components/AppIcon/glyphs.g.js +1 -1
- package/lib/module/components/AsyncBlock/AsyncBlock.js +1 -1
- package/lib/module/components/AuthedImage/AuthedImage.js +1 -1
- package/lib/module/components/AuthedImage/authedImageCache.js +1 -1
- package/lib/module/components/Avatar/Avatar.js +1 -1
- package/lib/module/components/Badge/Badge.js +1 -1
- package/lib/module/components/Banner/Banner.js +1 -1
- package/lib/module/components/BarChart/BarChart.js +1 -1
- package/lib/module/components/BottomNavigation/BottomNavigation.js +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/module/components/Box/Box.js +1 -1
- package/lib/module/components/Card/Card.js +1 -1
- package/lib/module/components/Carousel/Carousel.js +1 -1
- package/lib/module/components/Chip/Chip.js +1 -1
- package/lib/module/components/ChoiceGroup/ChoiceGroup.js +1 -1
- package/lib/module/components/Confetti/Confetti.js +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +1 -1
- package/lib/module/components/DateRangePicker/DateRangePicker.js +1 -1
- package/lib/module/components/Descriptions/Descriptions.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/FieldBase/useFloatingLabel.js +1 -1
- package/lib/module/components/FileViewer/fileSource.js +1 -1
- package/lib/module/components/FileViewer/useFileViewerZoom.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
- package/lib/module/components/InlineSelect/InlineSelect.js +1 -1
- package/lib/module/components/Input/Input.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/Markdown/Markdown.js +1 -1
- package/lib/module/components/Menu/MenuSurface.js +1 -1
- package/lib/module/components/Menu/focusHost.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/OptionSheet/optionAccessors.js +1 -0
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/ProgressRing/ProgressRing.js +1 -1
- package/lib/module/components/Radio/RadioGroup.js +1 -1
- package/lib/module/components/Rating/Rating.js +1 -1
- package/lib/module/components/Repeater/Repeater.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -1
- package/lib/module/components/SearchBar/useRecentSearches.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/SignaturePad/SignaturePad.js +1 -1
- package/lib/module/components/Skeleton/SkeletonContent.js +1 -1
- package/lib/module/components/Skeleton/SkeletonList.js +1 -1
- package/lib/module/components/SlideToConfirm/SlideToConfirm.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/SortableList/SortableList.js +1 -1
- package/lib/module/components/Sparkline/Sparkline.js +1 -1
- package/lib/module/components/SquircleFill/SquircleFill.js +1 -1
- package/lib/module/components/StatTile/StatTile.js +1 -1
- package/lib/module/components/StatusBadge/StatusBadge.js +1 -1
- package/lib/module/components/StatusBadge/statusMap.js +1 -1
- package/lib/module/components/Stepper/Stepper.js +1 -1
- package/lib/module/components/Swipeable/Swipeable.js +1 -1
- package/lib/module/components/Text/Text.js +1 -1
- package/lib/module/components/TimePicker/TimePicker.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/ZoomableImage/ZoomableImage.js +1 -1
- package/lib/module/form/HookFormField.js +1 -1
- package/lib/module/form/path.js +1 -1
- package/lib/module/hooks/useControllableState.js +1 -1
- package/lib/module/hooks/useDragToDismiss.js +1 -1
- package/lib/module/navigation/NavigationScreen.js +1 -1
- package/lib/module/specs/NativePdfRasterizer.js +1 -1
- package/lib/module/theme/ThemeContext.js +1 -1
- package/lib/module/theme/animatedValue.js +1 -1
- package/lib/module/theme/componentSizes.js +1 -1
- package/lib/module/theme/merge.js +1 -1
- package/lib/module/theme/scale.js +1 -1
- package/lib/module/utils/complete.js +1 -0
- package/lib/module/utils/guards.js +1 -0
- package/lib/module/utils/hapticUtils.js +1 -1
- package/lib/typescript/commonjs/canvasKit/index.d.ts +12 -12
- package/lib/typescript/commonjs/canvasKit/meta.d.ts +5 -7
- package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +22 -22
- package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.d.ts +23 -23
- package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +5 -5
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +39 -39
- package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +7 -7
- package/lib/typescript/commonjs/components/AppIcon/defaultIcons.d.ts +2 -1
- package/lib/typescript/commonjs/components/AppIcon/glyphs.g.d.ts +233 -233
- package/lib/typescript/commonjs/components/AppIcon/slotIcon.d.ts +1 -1
- package/lib/typescript/commonjs/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
- package/lib/typescript/commonjs/components/AsyncBlock/AsyncBlock.d.ts +22 -40
- package/lib/typescript/commonjs/components/AuthedImage/AuthedImage.d.ts +15 -15
- package/lib/typescript/commonjs/components/AuthedImage/authedImageCache.d.ts +2 -2
- package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +24 -24
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +36 -36
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +18 -18
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +25 -25
- package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +21 -21
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +36 -36
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +33 -33
- package/lib/typescript/commonjs/components/Box/Box.d.ts +27 -27
- package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -22
- package/lib/typescript/commonjs/components/Calendar/Calendar.d.ts +20 -20
- package/lib/typescript/commonjs/components/Calendar/CalendarDay.d.ts +4 -2
- package/lib/typescript/commonjs/components/Card/Card.d.ts +41 -41
- package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +21 -21
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +21 -21
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +23 -23
- package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
- package/lib/typescript/commonjs/components/Composer/Composer.d.ts +27 -27
- package/lib/typescript/commonjs/components/Confetti/Confetti.d.ts +22 -21
- package/lib/typescript/commonjs/components/Confirm/confirm.d.ts +4 -4
- package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +20 -20
- package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +22 -22
- package/lib/typescript/commonjs/components/DateSeparator/DateSeparator.d.ts +9 -9
- package/lib/typescript/commonjs/components/DecimalInput/DecimalInput.d.ts +14 -14
- package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +13 -13
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +24 -24
- package/lib/typescript/commonjs/components/Dialog/OverlayActions.d.ts +5 -5
- package/lib/typescript/commonjs/components/Divider/Divider.d.ts +9 -9
- package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +15 -15
- package/lib/typescript/commonjs/components/EmptyState/EmptyState.d.ts +13 -13
- package/lib/typescript/commonjs/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
- package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +2 -2
- package/lib/typescript/commonjs/components/FieldBase/ChoiceText.d.ts +10 -10
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +54 -54
- package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +8 -8
- package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +35 -35
- package/lib/typescript/commonjs/components/FileViewer/FileViewer.d.ts +10 -10
- package/lib/typescript/commonjs/components/FileViewer/fileSource.d.ts +3 -3
- package/lib/typescript/commonjs/components/FileViewer/useFileViewerZoom.d.ts +3 -3
- package/lib/typescript/commonjs/components/FilterChipRow/FilterChipRow.d.ts +12 -12
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
- package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +15 -15
- package/lib/typescript/commonjs/components/IconBadge/IconBadge.d.ts +11 -11
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +14 -14
- package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +14 -14
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +36 -31
- package/lib/typescript/commonjs/components/Input/Input.d.ts +47 -47
- package/lib/typescript/commonjs/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
- package/lib/typescript/commonjs/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
- package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +44 -44
- package/lib/typescript/commonjs/components/ListSection/ListSection.d.ts +6 -6
- package/lib/typescript/commonjs/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
- package/lib/typescript/commonjs/components/Markdown/Markdown.d.ts +15 -15
- package/lib/typescript/commonjs/components/Menu/Menu.d.ts +17 -12
- package/lib/typescript/commonjs/components/Menu/MenuSurface.d.ts +8 -8
- package/lib/typescript/commonjs/components/Menu/menuModel.d.ts +11 -11
- package/lib/typescript/commonjs/components/Menu/useContextMenu.d.ts +13 -13
- package/lib/typescript/commonjs/components/Menu/webOnly.d.ts +3 -3
- package/lib/typescript/commonjs/components/MessageBubble/MessageBubble.d.ts +20 -20
- package/lib/typescript/commonjs/components/MessageList/MessageList.d.ts +14 -14
- package/lib/typescript/commonjs/components/Modal/Modal.d.ts +19 -19
- package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +27 -27
- package/lib/typescript/commonjs/components/OTPInput/OTPInput.d.ts +20 -20
- package/lib/typescript/commonjs/components/OTPInput/OTPResendRow.d.ts +9 -9
- package/lib/typescript/commonjs/components/OnboardingPager/OnboardingPager.d.ts +5 -5
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +33 -33
- package/lib/typescript/commonjs/components/OptionSheet/optionAccessors.d.ts +8 -0
- package/lib/typescript/commonjs/components/PagedListFooter/PagedListFooter.d.ts +2 -2
- package/lib/typescript/commonjs/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
- package/lib/typescript/commonjs/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
- package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +23 -23
- package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
- package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +30 -30
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +21 -21
- package/lib/typescript/commonjs/components/ProgressRing/ProgressRing.d.ts +13 -13
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +18 -18
- package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +5 -5
- package/lib/typescript/commonjs/components/Radio/RadioGroup.d.ts +8 -8
- package/lib/typescript/commonjs/components/Rating/Rating.d.ts +15 -15
- package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +10 -10
- package/lib/typescript/commonjs/components/RichTextEditor/RichTextEditor.d.ts +15 -15
- package/lib/typescript/commonjs/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
- package/lib/typescript/commonjs/components/Screen/Screen.d.ts +43 -44
- package/lib/typescript/commonjs/components/Screen/index.d.ts +1 -1
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +31 -31
- package/lib/typescript/commonjs/components/SearchBar/SearchPanel.d.ts +6 -6
- package/lib/typescript/commonjs/components/SearchBar/useRecentSearches.d.ts +1 -1
- package/lib/typescript/commonjs/components/SectionHeader/SectionHeader.d.ts +10 -10
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +25 -24
- package/lib/typescript/commonjs/components/Select/Select.d.ts +50 -45
- package/lib/typescript/commonjs/components/SignaturePad/SignaturePad.d.ts +20 -20
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +13 -13
- package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +9 -9
- package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +30 -8
- package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +9 -9
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +30 -30
- package/lib/typescript/commonjs/components/Slider/valueText.d.ts +9 -9
- package/lib/typescript/commonjs/components/SliderField/SliderField.d.ts +41 -41
- package/lib/typescript/commonjs/components/SortableList/SortableList.d.ts +5 -5
- package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +13 -13
- package/lib/typescript/commonjs/components/Sparkline/geometry.d.ts +3 -1
- package/lib/typescript/commonjs/components/Spinner/Spinner.d.ts +10 -10
- package/lib/typescript/commonjs/components/SquircleFill/SquircleFill.d.ts +3 -3
- package/lib/typescript/commonjs/components/SquircleImage/SquircleImage.d.ts +5 -12
- package/lib/typescript/commonjs/components/StatTile/StatTile.d.ts +14 -14
- package/lib/typescript/commonjs/components/StatusBadge/StatusBadge.d.ts +13 -13
- package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +21 -21
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +16 -16
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +19 -19
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +20 -20
- package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +19 -19
- package/lib/typescript/commonjs/components/Text/Text.d.ts +10 -10
- package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +14 -14
- package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +12 -12
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +17 -17
- package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +8 -8
- package/lib/typescript/commonjs/components/Tooltip/RichTooltipBody.d.ts +4 -4
- package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +24 -19
- package/lib/typescript/commonjs/components/Tour/Tour.d.ts +7 -7
- package/lib/typescript/commonjs/components/TypingIndicator/TypingIndicator.d.ts +6 -6
- package/lib/typescript/commonjs/components/WheelPicker/Wheel.d.ts +6 -6
- package/lib/typescript/commonjs/components/WheelPicker/WheelPicker.d.ts +20 -20
- package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.d.ts +8 -8
- package/lib/typescript/commonjs/form/HookFormField.d.ts +5 -18
- package/lib/typescript/commonjs/form/path.d.ts +4 -2
- package/lib/typescript/commonjs/form/useFormCompletion.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/useControllableState.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/useDragToDismiss.d.ts +8 -8
- package/lib/typescript/commonjs/hooks/useFieldErrorScroll.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/usePressAnimation.d.ts +4 -4
- package/lib/typescript/commonjs/hooks/useRefreshControl.d.ts +8 -8
- package/lib/typescript/commonjs/hooks/useResendCountdown.d.ts +1 -1
- package/lib/typescript/commonjs/hooks/useScrollDirection.d.ts +1 -1
- package/lib/typescript/commonjs/navigation/DiscardGuard.d.ts +2 -2
- package/lib/typescript/commonjs/navigation/NavigationScreen.d.ts +3 -3
- package/lib/typescript/commonjs/network/NetworkStatusBanner.d.ts +7 -7
- package/lib/typescript/commonjs/theme/Gradient.d.ts +2 -2
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts +5 -5
- package/lib/typescript/commonjs/theme/componentSizes.d.ts +15 -38
- package/lib/typescript/commonjs/theme/types.d.ts +84 -84
- package/lib/typescript/commonjs/utils/announce.d.ts +1 -1
- package/lib/typescript/commonjs/utils/complete.d.ts +5 -0
- package/lib/typescript/commonjs/utils/feedback.d.ts +3 -1
- package/lib/typescript/commonjs/utils/guards.d.ts +9 -0
- package/lib/typescript/commonjs/utils/placement.d.ts +3 -3
- package/lib/typescript/commonjs/utils/squircle.d.ts +2 -2
- package/lib/typescript/module/canvasKit/index.d.ts +12 -12
- package/lib/typescript/module/canvasKit/meta.d.ts +5 -7
- package/lib/typescript/module/components/Accordion/Accordion.d.ts +22 -22
- package/lib/typescript/module/components/AmountSlider/AmountSlider.d.ts +23 -23
- package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +5 -5
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +39 -39
- package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +7 -7
- package/lib/typescript/module/components/AppIcon/defaultIcons.d.ts +2 -1
- package/lib/typescript/module/components/AppIcon/glyphs.g.d.ts +233 -233
- package/lib/typescript/module/components/AppIcon/slotIcon.d.ts +1 -1
- package/lib/typescript/module/components/AppLockOverlay/AppLockOverlay.d.ts +5 -5
- package/lib/typescript/module/components/AsyncBlock/AsyncBlock.d.ts +22 -40
- package/lib/typescript/module/components/AuthedImage/AuthedImage.d.ts +15 -15
- package/lib/typescript/module/components/AuthedImage/authedImageCache.d.ts +2 -2
- package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +24 -24
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +36 -36
- package/lib/typescript/module/components/Badge/Badge.d.ts +18 -18
- package/lib/typescript/module/components/Banner/Banner.d.ts +25 -25
- package/lib/typescript/module/components/BarChart/BarChart.d.ts +21 -21
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +36 -36
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +33 -33
- package/lib/typescript/module/components/Box/Box.d.ts +27 -27
- package/lib/typescript/module/components/Button/Button.d.ts +22 -22
- package/lib/typescript/module/components/Calendar/Calendar.d.ts +20 -20
- package/lib/typescript/module/components/Calendar/CalendarDay.d.ts +4 -2
- package/lib/typescript/module/components/Card/Card.d.ts +41 -41
- package/lib/typescript/module/components/Carousel/Carousel.d.ts +21 -21
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +21 -21
- package/lib/typescript/module/components/Chip/Chip.d.ts +23 -23
- package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +51 -46
- package/lib/typescript/module/components/Composer/Composer.d.ts +27 -27
- package/lib/typescript/module/components/Confetti/Confetti.d.ts +22 -21
- package/lib/typescript/module/components/Confirm/confirm.d.ts +4 -4
- package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +20 -20
- package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +22 -22
- package/lib/typescript/module/components/DateSeparator/DateSeparator.d.ts +9 -9
- package/lib/typescript/module/components/DecimalInput/DecimalInput.d.ts +14 -14
- package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +13 -13
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +24 -24
- package/lib/typescript/module/components/Dialog/OverlayActions.d.ts +5 -5
- package/lib/typescript/module/components/Divider/Divider.d.ts +9 -9
- package/lib/typescript/module/components/Drawer/Drawer.d.ts +15 -15
- package/lib/typescript/module/components/EmptyState/EmptyState.d.ts +13 -13
- package/lib/typescript/module/components/ErrorBoundary/ErrorBoundary.d.ts +8 -8
- package/lib/typescript/module/components/FieldBase/Chevron.d.ts +2 -2
- package/lib/typescript/module/components/FieldBase/ChoiceText.d.ts +10 -10
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +54 -54
- package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +8 -8
- package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +35 -35
- package/lib/typescript/module/components/FileViewer/FileViewer.d.ts +10 -10
- package/lib/typescript/module/components/FileViewer/fileSource.d.ts +3 -3
- package/lib/typescript/module/components/FileViewer/useFileViewerZoom.d.ts +3 -3
- package/lib/typescript/module/components/FilterChipRow/FilterChipRow.d.ts +12 -12
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +35 -35
- package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +11 -11
- package/lib/typescript/module/components/FormField/FormField.d.ts +15 -15
- package/lib/typescript/module/components/IconBadge/IconBadge.d.ts +11 -11
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +14 -14
- package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +14 -14
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +36 -31
- package/lib/typescript/module/components/Input/Input.d.ts +47 -47
- package/lib/typescript/module/components/KeyboardAwareScrollView/KeyboardAwareScrollView.d.ts +7 -7
- package/lib/typescript/module/components/KeyboardToolbar/KeyboardToolbar.d.ts +8 -8
- package/lib/typescript/module/components/ListItem/ListItem.d.ts +44 -44
- package/lib/typescript/module/components/ListSection/ListSection.d.ts +6 -6
- package/lib/typescript/module/components/LoaderOverlay/LoaderOverlay.d.ts +17 -11
- package/lib/typescript/module/components/Markdown/Markdown.d.ts +15 -15
- package/lib/typescript/module/components/Menu/Menu.d.ts +17 -12
- package/lib/typescript/module/components/Menu/MenuSurface.d.ts +8 -8
- package/lib/typescript/module/components/Menu/menuModel.d.ts +11 -11
- package/lib/typescript/module/components/Menu/useContextMenu.d.ts +13 -13
- package/lib/typescript/module/components/Menu/webOnly.d.ts +3 -3
- package/lib/typescript/module/components/MessageBubble/MessageBubble.d.ts +20 -20
- package/lib/typescript/module/components/MessageList/MessageList.d.ts +14 -14
- package/lib/typescript/module/components/Modal/Modal.d.ts +19 -19
- package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +27 -27
- package/lib/typescript/module/components/OTPInput/OTPInput.d.ts +20 -20
- package/lib/typescript/module/components/OTPInput/OTPResendRow.d.ts +9 -9
- package/lib/typescript/module/components/OnboardingPager/OnboardingPager.d.ts +5 -5
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +33 -33
- package/lib/typescript/module/components/OptionSheet/optionAccessors.d.ts +8 -0
- package/lib/typescript/module/components/PagedListFooter/PagedListFooter.d.ts +2 -2
- package/lib/typescript/module/components/PermissionPrompt/PermissionPrompt.d.ts +6 -6
- package/lib/typescript/module/components/PermissionPrompt/usePermissionPrompt.d.ts +1 -1
- package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +43 -43
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +23 -23
- package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.d.ts +23 -23
- package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +30 -30
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +21 -21
- package/lib/typescript/module/components/ProgressRing/ProgressRing.d.ts +13 -13
- package/lib/typescript/module/components/Radio/Radio.d.ts +18 -18
- package/lib/typescript/module/components/Radio/RadioDot.d.ts +5 -5
- package/lib/typescript/module/components/Radio/RadioGroup.d.ts +8 -8
- package/lib/typescript/module/components/Rating/Rating.d.ts +15 -15
- package/lib/typescript/module/components/Repeater/Repeater.d.ts +10 -10
- package/lib/typescript/module/components/RichTextEditor/RichTextEditor.d.ts +15 -15
- package/lib/typescript/module/components/ScannerOverlay/ScannerOverlay.d.ts +13 -13
- package/lib/typescript/module/components/Screen/Screen.d.ts +43 -44
- package/lib/typescript/module/components/Screen/index.d.ts +1 -1
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +31 -31
- package/lib/typescript/module/components/SearchBar/SearchPanel.d.ts +6 -6
- package/lib/typescript/module/components/SearchBar/useRecentSearches.d.ts +1 -1
- package/lib/typescript/module/components/SectionHeader/SectionHeader.d.ts +10 -10
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +25 -24
- package/lib/typescript/module/components/Select/Select.d.ts +50 -45
- package/lib/typescript/module/components/SignaturePad/SignaturePad.d.ts +20 -20
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +13 -13
- package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +9 -9
- package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +30 -8
- package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +9 -9
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +14 -14
- package/lib/typescript/module/components/Slider/Slider.d.ts +30 -30
- package/lib/typescript/module/components/Slider/valueText.d.ts +9 -9
- package/lib/typescript/module/components/SliderField/SliderField.d.ts +41 -41
- package/lib/typescript/module/components/SortableList/SortableList.d.ts +5 -5
- package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +13 -13
- package/lib/typescript/module/components/Sparkline/geometry.d.ts +3 -1
- package/lib/typescript/module/components/Spinner/Spinner.d.ts +10 -10
- package/lib/typescript/module/components/SquircleFill/SquircleFill.d.ts +3 -3
- package/lib/typescript/module/components/SquircleImage/SquircleImage.d.ts +5 -12
- package/lib/typescript/module/components/StatTile/StatTile.d.ts +14 -14
- package/lib/typescript/module/components/StatusBadge/StatusBadge.d.ts +13 -13
- package/lib/typescript/module/components/Stepper/Stepper.d.ts +21 -21
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +16 -16
- package/lib/typescript/module/components/Switch/Switch.d.ts +19 -19
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +20 -20
- package/lib/typescript/module/components/TagInput/TagInput.d.ts +19 -19
- package/lib/typescript/module/components/Text/Text.d.ts +10 -10
- package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +14 -14
- package/lib/typescript/module/components/Timeline/Timeline.d.ts +12 -12
- package/lib/typescript/module/components/Toast/Toast.d.ts +17 -17
- package/lib/typescript/module/components/Toast/ToastProvider.d.ts +8 -8
- package/lib/typescript/module/components/Tooltip/RichTooltipBody.d.ts +4 -4
- package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +24 -19
- package/lib/typescript/module/components/Tour/Tour.d.ts +7 -7
- package/lib/typescript/module/components/TypingIndicator/TypingIndicator.d.ts +6 -6
- package/lib/typescript/module/components/WheelPicker/Wheel.d.ts +6 -6
- package/lib/typescript/module/components/WheelPicker/WheelPicker.d.ts +20 -20
- package/lib/typescript/module/components/ZoomableImage/ZoomableImage.d.ts +8 -8
- package/lib/typescript/module/form/HookFormField.d.ts +5 -18
- package/lib/typescript/module/form/path.d.ts +4 -2
- package/lib/typescript/module/form/useFormCompletion.d.ts +1 -1
- package/lib/typescript/module/hooks/useControllableState.d.ts +2 -2
- package/lib/typescript/module/hooks/useDragToDismiss.d.ts +8 -8
- package/lib/typescript/module/hooks/useFieldErrorScroll.d.ts +1 -1
- package/lib/typescript/module/hooks/usePressAnimation.d.ts +4 -4
- package/lib/typescript/module/hooks/useRefreshControl.d.ts +8 -8
- package/lib/typescript/module/hooks/useResendCountdown.d.ts +1 -1
- package/lib/typescript/module/hooks/useScrollDirection.d.ts +1 -1
- package/lib/typescript/module/navigation/DiscardGuard.d.ts +2 -2
- package/lib/typescript/module/navigation/NavigationScreen.d.ts +3 -3
- package/lib/typescript/module/network/NetworkStatusBanner.d.ts +7 -7
- package/lib/typescript/module/theme/Gradient.d.ts +2 -2
- package/lib/typescript/module/theme/ThemeContext.d.ts +5 -5
- package/lib/typescript/module/theme/componentSizes.d.ts +15 -38
- package/lib/typescript/module/theme/types.d.ts +84 -84
- package/lib/typescript/module/utils/announce.d.ts +1 -1
- package/lib/typescript/module/utils/complete.d.ts +5 -0
- package/lib/typescript/module/utils/feedback.d.ts +3 -1
- package/lib/typescript/module/utils/guards.d.ts +9 -0
- package/lib/typescript/module/utils/placement.d.ts +3 -3
- package/lib/typescript/module/utils/squircle.d.ts +2 -2
- package/package.json +11 -11
- package/src/specs/NativePdfRasterizer.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/index.js";import{WHEEL_CENTER_OFFSET,WHEEL_VISIBLE_ITEMS,Wheel}from"./Wheel.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const BASE_ITEM_HEIGHT=40,MAX_FONT_SCALE=1.5,DEFAULT_COLUMN_WIDTH=64,MAX_DURATION_MINUTES=1439;export const DEFAULT_WHEEL_PICKER_LABELS=Object.freeze({hours:"Hours",minutes:"Minutes",hourUnit:"hr",minuteUnit:"min",hourOne:"hour",hourMany:"hours",minuteOne:"minute",minuteMany:"minutes",value:"Value"});const range=(e,t,i=1)=>{const s=[];for(let o=e;o<=t;o+=i)s.push(o);return s},plural=(e,t,i)=>`${e} ${1===e?t:i}`,formatPreset=(e,t,i)=>{const s=Math.floor(e/60),o=e%60;return 0===s?`${o} ${i}`:0===o?`${s} ${t}`:`${s} ${t} ${o} ${i}`},toItem=e=>"object"==typeof e?e:{value:e,label:String(e)},WheelPicker=e=>{const{haptic:t,disabled:i,testID:s,style:o,labels:n}=e;assertValidValue("WheelPicker","mode",e.mode,["columns","list","duration"]);const
|
|
1
|
+
"use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{Text}from"../Text/index.js";import{WHEEL_CENTER_OFFSET,WHEEL_VISIBLE_ITEMS,Wheel}from"./Wheel.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const BASE_ITEM_HEIGHT=40,MAX_FONT_SCALE=1.5,DEFAULT_COLUMN_WIDTH=64,MAX_DURATION_MINUTES=1439;export const DEFAULT_WHEEL_PICKER_LABELS=Object.freeze({hours:"Hours",minutes:"Minutes",hourUnit:"hr",minuteUnit:"min",hourOne:"hour",hourMany:"hours",minuteOne:"minute",minuteMany:"minutes",value:"Value"});const range=(e,t,i=1)=>{const s=[];for(let o=e;o<=t;o+=i)s.push(o);return s},plural=(e,t,i)=>`${e} ${1===e?t:i}`,formatPreset=(e,t,i)=>{const s=Math.floor(e/60),o=e%60;return 0===s?`${o} ${i}`:0===o?`${s} ${t}`:`${s} ${t} ${o} ${i}`},toItem=e=>"object"==typeof e?e:{value:e,label:String(e)},WheelPicker=e=>{const{haptic:t,disabled:i,testID:s,style:o,labels:n}=e;assertValidValue("WheelPicker","mode",e.mode,["columns","list","duration"]);const a=useTheme(),r=useReducedMotion(),{fontScale:l}=useWindowDimensions(),u=Math.min(Math.max(l,1),1.5),m=Math.round(40*u),d=useMemo(()=>buildStyles(a,m),[a,m]),h="list"===e.mode?e.items:void 0,c=useMemo(()=>h?.map(toItem),[h]),p="duration"===e.mode?e.minuteStep??1:1,b="duration"===e.mode?Math.max(0,Math.min(1439,Math.floor(e.maxMinutes??1/0))):0,f=Math.floor(b/60),x=useMemo(()=>({...DEFAULT_WHEEL_PICKER_LABELS,...n}),[n]),M="duration"===e.mode?e.presets:void 0;for(const e of M??[])if(!Number.isInteger(e)||e<0||e>b||e%p!==0)throw new Error(`WheelPicker preset ${e} must be a whole number of minutes from 0 to ${b} in steps of ${p}.`);const y=useCallback(e=>{const t=e===f?b%60:59;return Math.floor(t/p)*p},[f,b,p]),E="duration"===e.mode?e.value:0,_=useMemo(()=>{const e=Number.isFinite(E)?E:0,t=Math.max(0,Math.min(b,e)),i=Math.floor(t/60),s=Math.round(t%60/p)*p;return{hour:i,minute:Math.min(y(i),s)}},[E,b,p,y]),g=useMemo(()=>"duration"===e.mode?range(0,f).map(e=>({value:e,label:String(e),accessibilityLabel:plural(e,x.hourOne,x.hourMany)})):[],[e.mode,f,x]),j=y(_.hour),S=useMemo(()=>"duration"===e.mode?range(0,j,p).map(e=>({value:e,label:String(e).padStart(2,"0"),accessibilityLabel:plural(e,x.minuteOne,x.minuteMany)})):[],[e.mode,j,p,x]),v=useMemo(()=>"list"===e.mode?[{key:"list",label:e.label??x.value,items:c??[],value:e.value??"",width:e.width}]:"duration"===e.mode?[{key:"hours",label:x.hours,items:g,value:_.hour,unit:x.hourUnit,gapAfter:a.space.md},{key:"minutes",label:x.minutes,items:S,value:_.minute,unit:x.minuteUnit}]:e.columns,[e,c,g,S,_,x,a.space.md]),w="list"===e.mode?e.onChange:void 0,I="duration"===e.mode?e.onChange:void 0,L="list"===e.mode||"duration"===e.mode?void 0:e.onChange,T=useCallback((e,t)=>{const i=e.items[t];if(i)if(w)w(i.value);else if(I){const t=Number(i.value);"hours"===e.key?I(60*t+Math.min(_.minute,y(t))):I(60*_.hour+t)}else L?.(e.key,i.value)},[w,I,L,_,y]),C=useCallback(e=>{I?.(e)},[I]),W=60*_.hour+_.minute,k=_jsxs(View,{style:[d.wheels,o],testID:s,children:[_jsxs(View,{pointerEvents:"none",style:d.selectionBand,children:[_jsx(View,{style:d.bandLine}),_jsx(View,{style:d.bandLine})]}),v.map(s=>{if(0===s.items.length)return null;const o=s.items.findIndex(e=>e.value===s.value);return _jsxs(Fragment,{children:[_jsx(Wheel,{label:s.label,items:s.items,selectedIndex:Math.max(0,o),onIndexChange:e=>T(s,e),itemHeight:m,width:s.width??("list"===e.mode?void 0:64),theme:a,haptic:t,disabled:i,reducedMotion:r,typeable:"duration"===e.mode,testID:s.testID}),s.unit?_jsx(Text,{variant:"body",weight:"semibold",color:"secondary",style:d.unit,maxFontSizeMultiplier:1.5,numberOfLines:1,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.unit}):null,s.separator?_jsx(Text,{variant:"h2",weight:"bold",style:d.separator,maxFontSizeMultiplier:1.5,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.separator}):null,s.gapAfter?_jsx(View,{style:{width:s.gapAfter}}):null]},s.key)})]});return M&&0!==M.length?_jsxs(View,{children:[k,_jsx(View,{style:d.presets,children:M.map(e=>_jsx(Chip,{label:formatPreset(e,x.hourUnit,x.minuteUnit),size:"sm",selected:e===W,disabled:i,onPress:()=>C(e)},e))})]}):k},buildStyles=(e,t)=>StyleSheet.create({wheels:{flexDirection:"row",alignItems:"center",justifyContent:"center",height:t*WHEEL_VISIBLE_ITEMS,position:"relative"},selectionBand:{position:"absolute",left:0,right:0,top:t*WHEEL_CENTER_OFFSET,height:t,justifyContent:"space-between"},bandLine:{height:2*StyleSheet.hairlineWidth,backgroundColor:e.colors.primary,opacity:.85},separator:{paddingHorizontal:e.space.xs},unit:{paddingLeft:e.space.xs},presets:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center",gap:e.space.xs,paddingTop:e.space.sm}});export{WheelPicker};export default WheelPicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{
|
|
1
|
+
"use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{GestureDetector,useCompetingGestures,usePanGesture,usePinchGesture,useTapGesture}from"react-native-gesture-handler";import Animated,{runOnJS,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1};export const ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:l=2,disabled:u=!1,haptic:i,style:s,accessibilityLabel:r,testID:n})=>{const o=useSharedValue(1),v=useSharedValue(1),c=useSharedValue(0),S=useSharedValue(0),m=useSharedValue(0),d=useSharedValue(0),p=useCallback(()=>{o.value=withSpring(1,SPRING_CONFIG),v.value=1,c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),m.value=0,d.value=0},[o,v,c,S,m,d]);useEffect(()=>{u&&p()},[u,p]);const h=useCallback(()=>{const e=resolveHaptic(i,"impactLight");e&&triggerHaptic(e)},[i]),G=useMemo(()=>({enabled:!u,onActivate:()=>{"worklet";v.value=o.value},onUpdate:e=>{"worklet";const l=v.value*e.scale;o.value=l<t?t+.3*(l-t):l>a?a+.2*(l-a):l},onDeactivate:()=>{"worklet";return o.value<t?(o.value=withSpring(t,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=t,m.value=0,void(d.value=0)):o.value>a?(o.value=withSpring(a,SPRING_CONFIG),void(v.value=a)):void(v.value=o.value)}}),[u,o,v,c,S,m,d,t,a]),I=usePinchGesture(G),g=useMemo(()=>({enabled:!u,minPointers:1,maxPointers:1,onActivate:()=>{"worklet";m.value=c.value,d.value=S.value},onUpdate:e=>{"worklet";o.value<=1||(c.value=m.value+e.translationX,S.value=d.value+e.translationY)},onDeactivate:()=>{"worklet";m.value=c.value,d.value=S.value}}),[u,o,c,S,m,d]),N=usePanGesture(g),w=useMemo(()=>({enabled:!u,numberOfTaps:2,onDeactivate:()=>{"worklet";runOnJS(h)(),o.value>1?(o.value=withSpring(1,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=1,m.value=0,d.value=0):(o.value=withSpring(l,SPRING_CONFIG),v.value=l)}}),[u,o,v,c,S,m,d,h,l]),_=useTapGesture(w),C=useCompetingGestures(I,N,_),b=useAnimatedStyle(()=>({transform:[{translateX:c.value},{translateY:S.value},{scale:o.value}]}),[c,S,o]);return _jsx(GestureDetector,{gesture:C,children:_jsx(Animated.View,{style:[styles.container,s],testID:n,accessibilityLabel:r,accessibilityState:{disabled:u},"aria-disabled":u,children:_jsx(Animated.View,{style:[styles.content,b],children:e})})})};ZoomableImage.displayName="ZoomableImage";const styles=StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});export default ZoomableImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import React from"react";import{FormField}from"../components/FormField/FormField.js";import{useHookFormField}from"./useHookFormField.js";import{jsx as _jsx}from"react/jsx-runtime";const assignRef=(e,r)=>{"function"==typeof e?e(r):e&&(e.current=r)};export const HookFormField=e=>{const{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,children:y,hideError:f,...h}=e,b=useHookFormField(h),x="function"==typeof y;let S=null;if(x)S=y(b);else if(React.isValidElement(y)){const e=y.props
|
|
1
|
+
"use strict";import React from"react";import{FormField}from"../components/FormField/FormField.js";import{useHookFormField}from"./useHookFormField.js";import{jsx as _jsx}from"react/jsx-runtime";const assignRef=(e,r)=>{"function"==typeof e?e(r):e&&(e.current=r)};export const HookFormField=e=>{const{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,children:y,hideError:f,...h}=e,b=useHookFormField(h),x="function"==typeof y;let S=null;if(x)S=y(b);else if(React.isValidElement(y)){const e=y.props,r={value:b.value,error:b.error,onChangeText:r=>{b.onChangeText(r),e.onChangeText?.(r)},onBlur:r=>{b.onBlur(),e.onBlur?.(r)},ref:r=>{b.ref(r),assignRef(e.ref,r)}};S=React.cloneElement(y,r)}const j=!x||React.isValidElement(S)&&"error"in S.props;return _jsx(FormField,{label:r,help:o,helperText:l,helperLines:t,labels:i,required:n,layout:s,labelStyle:a,helperStyle:c,errorStyle:m,containerStyle:p,inputContainerStyle:u,accessibilityLabel:F,testID:d,error:f??j?void 0:b.error,children:S})};HookFormField.displayName="HookFormField";
|
package/lib/module/form/path.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const tokenize=t=>{const
|
|
1
|
+
"use strict";const tokenize=t=>{const e=[],o=/[^.[\]]+/g;for(const r of t.matchAll(o)){const t=r[0];e.push(/^\d+$/.test(t)?Number(t):t)}return e},copyOf=t=>Object.assign(Array.isArray(t)?Array.from(t):{},t);export const getPath=(t,e)=>{const o=tokenize(e);let r=t;for(const t of o){if(null==r||"object"!=typeof r)return;r=Reflect.get(r,t)}return r};export const setPath=(t,e,o)=>{const r=tokenize(e),n=r.pop();if(void 0===n)return t;const c={...t};let s=c,f=r.shift();for(const t of[...r,n]){if(void 0===f)break;const e=Reflect.get(s,f),o=null!=e&&"object"==typeof e?copyOf(e):"number"==typeof t?[]:{};Reflect.set(s,f,o),s=o,f=t}return Reflect.set(s,n,o),c};export const deletePath=(t,e)=>{const o=tokenize(e),r=o.pop();if(void 0===r)return t;const n={...t};let c=n;for(const t of o){const e=Reflect.get(c,t);if(null==e||"object"!=typeof e)return n;const o=copyOf(e);Reflect.set(c,t,o),c=o}return Array.isArray(c)&&"number"==typeof r?c.splice(r,1):Reflect.deleteProperty(c,r),n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useRef,useState}from"react";export function useControllableState({value:e,defaultValue:t,onChange:u}){const a=useRef(void 0!==e).current,[l,
|
|
1
|
+
"use strict";import{useCallback,useRef,useState}from"react";export function useControllableState({value:e,defaultValue:t,onChange:u}){const a=useRef(void 0!==e).current,[l,o]=useState(t);return[a&&void 0!==e?e:l,useCallback(e=>{a||o(e),u?.(e)},[a,u])]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{
|
|
1
|
+
"use strict";import{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{usePanGesture}from"react-native-gesture-handler";import{createAnimatedValue,setNativeValue,useTheme}from"../theme/index.js";import{nativeDriver}from"../utils/nativeDriver.js";import{usePresenceMotion}from"./usePresenceMotion.js";export const DRAG_DISMISS_DISTANCE=100;export const DRAG_DISMISS_VELOCITY=.5;export const createDragToDismissController=({drag:e,travel:t,onDismiss:a,opacity:i},r,s)=>{const{snappy:n}=r.spring,springBack=()=>Animated.spring(e,{toValue:0,damping:n.damping,stiffness:n.stiffness,mass:n.mass,useNativeDriver:nativeDriver}).start(),o=!0===s?.reduced?i:void 0,u=s?.duration("default")??r.duration.default;return{move:t=>{setNativeValue(e,Math.max(0,t))},release:(i,s)=>{if(i>100||s>.5){if(o)return void Animated.timing(o,{toValue:0,duration:u,easing:Easing.bezier(...r.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>a());Animated.timing(e,{toValue:"function"==typeof t?t():t,duration:r.duration.fast,easing:Easing.bezier(...r.ease.accelerate),useNativeDriver:nativeDriver}).start(()=>a())}else springBack()},cancel:springBack}};export const useDragToDismiss=e=>{const{drag:t,travel:a,onDismiss:i,contentAtTop:r,scrollGesture:s}=e,{motion:n}=useTheme(),o=usePresenceMotion(),u=useRef(createAnimatedValue(1)).current,c=useMemo(()=>createDragToDismissController({drag:t,travel:a,onDismiss:i,opacity:u},n,o),[t,a,i,u,n,o]),l=useMemo(()=>({runOnJS:!0,activeOffsetY:6,failOffsetX:[-12,12],onUpdate:e=>c.move(e.translationY),onDeactivate:e=>c.release(e.translationY,e.velocityY/1e3),onFinalize:e=>{e.canceled&&c.cancel()}}),[c]),m=usePanGesture(l),v=useMemo(()=>{let e=0,t=!1;return{runOnJS:!0,activeOffsetY:8,failOffsetX:[-12,12],simultaneousWith:s,onBegin:()=>{e=0,t=!1},onUpdate:a=>{if(!t){if(r&&!r())return;t=!0,e=a.translationY}c.move(a.translationY-e)},onDeactivate:a=>{t&&c.release(a.translationY-e,a.velocityY/1e3)},onFinalize:e=>{e.canceled&&t&&c.cancel()}}},[c,r,s]),f=usePanGesture(v);return useMemo(()=>({handleGesture:m,sheetGesture:f,opacity:u}),[m,f,u])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{
|
|
1
|
+
"use strict";import{useNavigation}from"@react-navigation/native";import{createContext,useContext}from"react";import{Screen}from"../components/Screen/index.js";import{useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";const TabBarHeightContext=(()=>{try{return require("@react-navigation/bottom-tabs").BottomTabBarHeightContext}catch{return createContext(void 0)}})(),TAB_EDGES=["top"];export function NavigationScreen({kind:t="pushed",appBar:e=!0,onBack:o,...i}){const r=useNavigation(),n=useContext(TabBarHeightContext),a=!0===useTheme().settings.components.screen?.tabBarFloats,s=e?i:{...i,title:void 0,subtitle:void 0,leading:void 0,trailing:void 0,rightActions:void 0};return _jsx(Screen,"tab"===t?{...s,largeTitle:!1,edges:TAB_EDGES,bottomInset:a?n??0:0}:{...s,largeTitle:!1,onBack:"root"!==t&&e?o??r.goBack:void 0})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{TurboModuleRegistry}from"react-native";export default TurboModuleRegistry.get("PdfRasterizer");
|
|
1
|
+
"use strict";import{TurboModuleRegistry}from"react-native";export default TurboModuleRegistry.get("PdfRasterizer")??null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Storage}from"@webority/mobile-core";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Appearance}from"react-native";import{useReducedMotion}from"../hooks/useReducedMotion.js";import{mergeBrand}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";import{jsx as _jsx}from"react/jsx-runtime";const REDUCED_SPRING={damping:100,stiffness:1e3,mass:1},collapseMotion=e=>({...e,duration:{instant:0,fast:0,default:0,slow:0,slower:0},spring:{gentle:REDUCED_SPRING,bouncy:REDUCED_SPRING,snappy:REDUCED_SPRING}}),isPreference=e=>"light"===e||"dark"===e||"system"===e,defaultValue={theme:lightTheme,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}},ThemeContext=createContext(defaultValue);export const ThemeProvider=e=>{const{children:t,initialPreference:r="system",persistKey:o,brand:
|
|
1
|
+
"use strict";import{Storage}from"@webority/mobile-core";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Appearance}from"react-native";import{useReducedMotion}from"../hooks/useReducedMotion.js";import{isOneOf}from"../utils/guards.js";import{mergeBrand}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";import{jsx as _jsx}from"react/jsx-runtime";const REDUCED_SPRING={damping:100,stiffness:1e3,mass:1},collapseMotion=e=>({...e,duration:{instant:0,fast:0,default:0,slow:0,slower:0},spring:{gentle:REDUCED_SPRING,bouncy:REDUCED_SPRING,snappy:REDUCED_SPRING}}),isPreference=e=>"light"===e||"dark"===e||"system"===e,COLOR_MODES=["light","dark"],colorModeOf=e=>isOneOf(COLOR_MODES,e)?e:"light",defaultValue={theme:lightTheme,mode:"light",preference:"system",setPreference:()=>{},toggleColorMode:()=>{}},ThemeContext=createContext(defaultValue);export const ThemeProvider=e=>{const{children:t,initialPreference:r="system",persistKey:o,brand:s,settings:n,...i}=e;if(Object.keys(i).length>0)throw new Error("ThemeProvider takes only these props: children, initialPreference, persistKey, brand, settings (mobile-ui 0.89.0). Run webority upgrade 0.89.0 to move an app.");const[m,c]=useState(r),a=useRef(!1);useEffect(()=>{if(!o)return;let e=!0;return Storage.getItem(o).then(t=>{e&&!a.current&&isPreference(t)&&c(t)}),()=>{e=!1}},[o]);const d=useCallback(e=>{a.current=!0,c(e)},[]);useEffect(()=>{o&&a.current&&Storage.setItem(o,m)},[o,m]);const[l,u]=useState(()=>colorModeOf(Appearance.getColorScheme()));useEffect(()=>{const e=Appearance.addChangeListener(({colorScheme:e})=>{u(colorModeOf(e))});return()=>e.remove()},[]);const h="system"===m?l:m,f=useReducedMotion(),g=useMemo(()=>{const e="dark"===h?darkTheme:lightTheme,t=s||n?mergeBrand(e,s,n):e;return f?{...t,motion:collapseMotion(t.motion)}:t},[h,s,n,f]),p=useMemo(()=>({theme:g,mode:h,preference:m,setPreference:d,toggleColorMode:()=>d(e=>"system"===e?"dark"===l?"light":"dark":"dark"===e?"light":"dark")}),[g,h,m,l,d]);return _jsx(ThemeContext.Provider,{value:p,children:t})};export const KitThemeBridge=({mode:e,brand:t,children:r})=>{const o=useReducedMotion();if("light"!==e&&"dark"!==e)throw new Error('KitThemeBridge takes mode "light" or "dark".');const s=useMemo(()=>{const r="dark"===e?darkTheme:lightTheme,s=t?mergeBrand(r,t,void 0):r;return o?{...s,motion:collapseMotion(s.motion)}:s},[e,t,o]),n=useMemo(()=>({theme:s,mode:e,preference:e,setPreference:()=>{},toggleColorMode:()=>{}}),[s,e]);return _jsx(ThemeContext.Provider,{value:n,children:r})};export const useTheme=()=>useContext(ThemeContext).theme;export const useThemeMode=()=>{const e=useContext(ThemeContext);return{mode:e.mode,preference:e.preference,setPreference:e.setPreference,toggleColorMode:e.toggleColorMode}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Animated,Platform}from"react-native";import{nativeDriver}from"../utils/nativeDriver.js";export const createAnimatedValue=(t,e)=>{const r=new Animated.Value(t,e);return"web"===Platform.OS?r:(r
|
|
1
|
+
"use strict";import{Animated,Platform}from"react-native";import{nativeDriver}from"../utils/nativeDriver.js";export const createAnimatedValue=(t,e)=>{const r=new Animated.Value(t,e);return"web"===Platform.OS?r:(Object.assign(r,{_tracking:null}),Object.seal(r))};export const setNativeValue=(t,e)=>{Animated.timing(t,{toValue:e,duration:0,useNativeDriver:nativeDriver}).start()};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{scaleStep}from"./scale.js";import{COMPONENT_KINDS}from"./tokens.generated.js";const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,
|
|
1
|
+
"use strict";import{isOneOf,isRecord,keysOf}from"../utils/guards.js";import{scaleStep}from"./scale.js";import{COMPONENT_KINDS}from"./tokens.generated.js";const SIZE_KEYS=["xs","sm","md","lg","xl"],kindOf=(e,t,i)=>{const o=COMPONENT_KINDS[e][t];if(!o)throw new Error(`components.${e}${i?`.${i}`:""}.${t} has no kind in COMPONENT_KINDS.`);return o},pixelsOf=(e,t,i,o)=>{if("space"===t||"text"===t||"radius"===t)return scaleStep(e,t,String(i),o);if("number"!=typeof i)throw new Error(`${o} is ${JSON.stringify(i)}; it takes a number.`);return i},resolveSize=(e,t,i)=>{const o=e.components[t];if(!isRecord(o))throw new Error(`components.${t} is missing in the theme.`);const n=o[i];if(!isRecord(n))throw new Error(`components.${t} has no "${i}" size in the theme.`);const s={};for(const o of Object.keys(n))s[o]=pixelsOf(e,kindOf(t,o,i),n[o],`components.${t}.${i}.${o}`);return s},sizeToken=(e,t,i,o)=>{const n=e[o];if(void 0===n)throw new Error(`components.${t}.${i}.${o} is missing`);return n};export const resolveButtonSize=(e,t)=>{const i=resolveSize(e,"button",t);return{"padding-x":sizeToken(i,"button",t,"padding-x"),"padding-y":sizeToken(i,"button",t,"padding-y"),"min-height":sizeToken(i,"button",t,"min-height"),text:sizeToken(i,"button",t,"text"),radius:sizeToken(i,"button",t,"radius"),icon:sizeToken(i,"button",t,"icon"),"badge-icon":sizeToken(i,"button",t,"badge-icon")}};export const resolveFieldSize=(e,t)=>{const i=resolveSize(e,"field",t);return{radius:sizeToken(i,"field",t,"radius"),"padding-x":sizeToken(i,"field",t,"padding-x"),"padding-y":sizeToken(i,"field",t,"padding-y"),"min-height":sizeToken(i,"field",t,"min-height"),text:sizeToken(i,"field",t,"text"),icon:sizeToken(i,"field",t,"icon"),"label-text":sizeToken(i,"field",t,"label-text"),"label-gap":sizeToken(i,"field",t,"label-gap"),"message-text":sizeToken(i,"field",t,"message-text"),"message-gap":sizeToken(i,"field",t,"message-gap")}};export const resolveEmptyStateSize=(e,t)=>{const i=resolveSize(e,"empty-state",t);return{icon:sizeToken(i,"empty-state",t,"icon"),"illustration-size":sizeToken(i,"empty-state",t,"illustration-size"),"title-text":sizeToken(i,"empty-state",t,"title-text"),"description-text":sizeToken(i,"empty-state",t,"description-text"),"padding-y":sizeToken(i,"empty-state",t,"padding-y"),"title-gap":sizeToken(i,"empty-state",t,"title-gap"),"description-gap":sizeToken(i,"empty-state",t,"description-gap")}};export const resolveListItemSize=(e,t)=>{const i=resolveSize(e,"list-item",t);return{"padding-y":sizeToken(i,"list-item",t,"padding-y"),"title-text":sizeToken(i,"list-item",t,"title-text"),"subtitle-text":sizeToken(i,"list-item",t,"subtitle-text"),"min-height":sizeToken(i,"list-item",t,"min-height")}};export const resolveBadgeSize=(e,t)=>{const i=resolveSize(e,"badge",t);return{text:sizeToken(i,"badge",t,"text"),"min-width":sizeToken(i,"badge",t,"min-width"),height:sizeToken(i,"badge",t,"height"),"padding-x":sizeToken(i,"badge",t,"padding-x"),"dot-size":sizeToken(i,"badge",t,"dot-size")}};export const resolveChipSize=(e,t)=>{const i=resolveSize(e,"chip",t);return{"padding-x":sizeToken(i,"chip",t,"padding-x"),"padding-y":sizeToken(i,"chip",t,"padding-y"),text:sizeToken(i,"chip",t,"text"),"min-height":sizeToken(i,"chip",t,"min-height"),"close-size":sizeToken(i,"chip",t,"close-size"),"close-text":sizeToken(i,"chip",t,"close-text"),gap:sizeToken(i,"chip",t,"gap"),icon:sizeToken(i,"chip",t,"icon")}};export const resolveCheckboxSize=(e,t)=>{const i=resolveSize(e,"checkbox",t);return{"box-size":sizeToken(i,"checkbox",t,"box-size")}};export const resolveRadioSize=(e,t)=>{const i=resolveSize(e,"radio",t);return{outer:sizeToken(i,"radio",t,"outer"),inner:sizeToken(i,"radio",t,"inner")}};export const resolveSwitchSize=(e,t)=>{const i=resolveSize(e,"switch",t);return{"track-width":sizeToken(i,"switch",t,"track-width"),"track-height":sizeToken(i,"switch",t,"track-height"),"thumb-size":sizeToken(i,"switch",t,"thumb-size"),padding:sizeToken(i,"switch",t,"padding")}};export const resolveOtpInputSize=(e,t)=>{const i=resolveSize(e,"otp-input",t);return{cell:sizeToken(i,"otp-input",t,"cell"),text:sizeToken(i,"otp-input",t,"text"),radius:sizeToken(i,"otp-input",t,"radius"),gap:sizeToken(i,"otp-input",t,"gap")}};export const resolveSegmentedControlSize=(e,t)=>{const i=resolveSize(e,"segmented-control",t);return{height:sizeToken(i,"segmented-control",t,"height"),text:sizeToken(i,"segmented-control",t,"text"),"padding-x":sizeToken(i,"segmented-control",t,"padding-x"),icon:sizeToken(i,"segmented-control",t,"icon")}};export const resolveTabsSize=(e,t)=>{const i=resolveSize(e,"tabs",t);return{text:sizeToken(i,"tabs",t,"text"),"padding-y":sizeToken(i,"tabs",t,"padding-y"),"padding-x":sizeToken(i,"tabs",t,"padding-x"),"scrollable-padding-x":sizeToken(i,"tabs",t,"scrollable-padding-x"),icon:sizeToken(i,"tabs",t,"icon")}};export const resolveSliderSize=(e,t)=>{const i=resolveSize(e,"slider",t);return{"track-height":sizeToken(i,"slider",t,"track-height"),"thumb-diameter":sizeToken(i,"slider",t,"thumb-diameter")}};export const resolveFloatingActionButtonSize=(e,t)=>{const i=resolveSize(e,"floating-action-button",t);return{diameter:sizeToken(i,"floating-action-button",t,"diameter"),icon:sizeToken(i,"floating-action-button",t,"icon"),text:sizeToken(i,"floating-action-button",t,"text"),"label-padding-x":sizeToken(i,"floating-action-button",t,"label-padding-x")}};export const validateComponentTokens=e=>{for(const t of keysOf(COMPONENT_KINDS))for(const[i,o]of Object.entries(e.components[t]))isOneOf(SIZE_KEYS,i)?resolveSize(e,t,i):pixelsOf(e,kindOf(t,i),o,`components.${t}.${i}`)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{validateComponentTokens}from"./componentSizes.js";import{COLOR_NAMES,FONT_NAMES,RADIUS_NAMES,WEIGHT_NAMES}from"./tokens.generated.js";import{deriveSolidFill,deriveStateFills,deriveToneInk}from"./toneInk.js";const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},card:{defaultVariant:!0,defaultPadding:!0,defaultRadius:!0,defaultTitleFont:!0},"section-header":{defaultVariant:!0,defaultFlush:!0},"empty-state":{defaultSize:!0,defaultVariant:!0},screen:{tabBarFloats:!0,headerShadowOnScroll:!0}},isPlainObject=
|
|
1
|
+
"use strict";import{hasKey,isOneOf,isRecord,keysOf}from"../utils/guards.js";import{validateComponentTokens}from"./componentSizes.js";import{COLOR_NAMES,FONT_NAMES,RADIUS_NAMES,WEIGHT_NAMES}from"./tokens.generated.js";import{deriveSolidFill,deriveStateFills,deriveToneInk}from"./toneInk.js";const HINT="Run webority upgrade to rename old names.",BRAND_KEYS=["colors","radius","font"],COLOR_MODES=["light","dark"],FIXED_RADII=["none","pill"],RADIUS_ALLOWED="sm, md, lg, xl",SETTINGS_KEYS=["icons","gradients","textVariants","maxFontSizeMultiplier","components"],COMPONENT_SETTING_KEYS={field:{defaultVariant:!0,requiredMarker:!0},input:{defaultVariant:!0,defaultLabelMode:!0,tintLabelOnFocus:!0,shakeOnError:!0},"search-bar":{defaultVariant:!0},select:{defaultVariant:!0},"otp-input":{shakeOnError:!0},"option-sheet":{selectedMarker:!0},"profile-picker":{defaultTone:!0,defaultVariant:!0,defaultAvatarTone:!0},slider:{thumbPressAnimation:!0},rating:{pulseOnPress:!0},stepper:{pulseAnimation:!0},tooltip:{enableScaleAnimation:!0},toast:{enableSwipeDismiss:!0,defaultDurationMs:!0},button:{defaultVariant:!0,defaultSize:!0,defaultPressAnimation:!0},card:{defaultVariant:!0,defaultPadding:!0,defaultRadius:!0,defaultTitleFont:!0},"section-header":{defaultVariant:!0,defaultFlush:!0},"empty-state":{defaultSize:!0,defaultVariant:!0},screen:{tabBarFloats:!0,headerShadowOnScroll:!0}},isPlainObject=o=>"object"==typeof o&&null!==o&&!Array.isArray(o),validateBrand=o=>{if(void 0===o)return;if(!isPlainObject(o))throw new Error(`A brand is an object of colors, radius and font; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o))if(!BRAND_KEYS.includes(e))throw new Error(`A brand sets colors, radius and font only; ${e} is not allowed (allowed: colors, radius, font). ${HINT}`);const e=o.colors;if(void 0!==e&&!isPlainObject(e))throw new Error(`A brand's colors is an object of light and dark; got ${typeof e}. ${HINT}`);if(isRecord(e))for(const o of Object.keys(e)){if(!COLOR_MODES.includes(o))throw new Error(`A brand sets colours under light and dark only; ${o} is not allowed (allowed: light, dark). ${HINT}`);const t=e[o];if(void 0===t)throw new Error(`A brand's ${o} colours are missing. ${HINT}`);if(!isRecord(t))throw new Error(`A brand's ${o} colours is an object of colour names; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){if(!isOneOf(COLOR_NAMES,o))throw new Error(`unknown colour ${o}; allowed: ${COLOR_NAMES.join(", ")}. ${HINT}`);if(void 0!==t[o]&&"string"!=typeof t[o])throw new Error(`colour ${o} must be a string; got ${typeof t[o]}.`)}}const t=o.radius;if(void 0!==t){if(!isPlainObject(t))throw new Error(`A brand's radius is an object of radius names; got ${typeof t}. ${HINT}`);for(const o of Object.keys(t)){const e=t[o];if(!isOneOf(RADIUS_NAMES,o))throw new Error(`unknown radius ${o}; allowed: ${RADIUS_ALLOWED}. ${HINT}`);if(FIXED_RADII.includes(o))throw new Error(`radius ${o} is fixed by the library; allowed: ${RADIUS_ALLOWED}.`);if("number"!=typeof e||!Number.isFinite(e))throw new Error(`radius ${o} must be a number; got ${typeof e}.`)}}const n=o.font;if(void 0!==n){if(!isPlainObject(n))throw new Error(`A brand's font is an object of font names; got ${typeof n}. ${HINT}`);for(const o of Object.keys(n)){if(!isOneOf(FONT_NAMES,o))throw new Error(`unknown font ${o}; allowed: ${FONT_NAMES.join(", ")}. ${HINT}`);const e=n[o];if(!isPlainObject(e))throw new Error(`font ${o} must be an object of weights; got ${typeof e}. ${HINT}`);for(const t of Object.keys(e)){if(!isOneOf(WEIGHT_NAMES,t))throw new Error(`unknown font weight ${t} in font ${o}; allowed: ${WEIGHT_NAMES.join(", ")}. ${HINT}`);const n=e[t];if("string"!=typeof n||0===n.length)throw new Error(`font ${o} weight ${t} must be a non-empty string.`)}}}},validateSettings=o=>{if(void 0===o)return;if(!isPlainObject(o))throw new Error(`Theme settings is an object; got ${typeof o}. ${HINT}`);for(const e of Object.keys(o))if(!isOneOf(SETTINGS_KEYS,e))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${e} is not allowed. ${HINT}`);const e=o.components;if(void 0!==e){if(!isPlainObject(e))throw new Error(`Theme settings components is an object of component names; got ${typeof e}. ${HINT}`);for(const o of Object.keys(e)){if(!hasKey(COMPONENT_SETTING_KEYS,o))throw new Error(`unknown component ${o} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const t=e[o];if(void 0===t)continue;if(!isPlainObject(t))throw new Error(`theme settings for ${o} is an object; got ${typeof t}. ${HINT}`);const n=COMPONENT_SETTING_KEYS[o];for(const e of Object.keys(t))if(!(e in n))throw new Error(`unknown setting ${e} for ${o}; allowed: ${Object.keys(n).join(", ")}. ${HINT}`)}}},TONES=["primary","success","warning","danger","info"],setComponentSettings=(o,e,t)=>{o[e]=t},mergeComponentSettings=(o,e,t)=>({...hasKey(o,t)?o[t]:void 0,...void 0!==e&&hasKey(e,t)?e[t]:void 0});export const mergeBrand=(o,e,t)=>{validateBrand(e),validateSettings(t);const n={};for(const[t,r]of Object.entries(e?.colors?.[o.mode]??{}))void 0!==r&&(n[t]=r);const r={...o.colors,...n},colorOf=o=>{const e=r[o];if(void 0===e)throw new Error(`The theme has no colour ${o}.`);return e},i={...o.radius,...e?.radius},s={...o.font};if(void 0!==e?.font)for(const t of keysOf(e.font))s[t]={...o.font[t],...e.font[t]};const a=[colorOf("bg"),colorOf("bg-subtle"),colorOf("bg-muted")],f={};for(const e of TONES){const t="string"==typeof n[e];let r=colorOf(e);if(t||"string"==typeof n[`on-${e}`]){const o=deriveSolidFill(r,colorOf(`on-${e}`));o!==r&&(f[e]=o,r=o)}if(t&&"string"!=typeof n[`${e}-text`]&&(f[`${e}-text`]=deriveToneInk(r,a,o.mode)),"primary"===e&&(t||void 0!==f.primary)){const e=deriveStateFills(r,colorOf("on-primary"),{fill:o.colors.primary,hover:o.colors["primary-hover"],pressed:o.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(f["primary-hover"]=e.hover),"string"!=typeof n["primary-pressed"]&&(f["primary-pressed"]=e.pressed)}}const l=o.settings.components,d=t?.components,c={},u=new Set([...keysOf(l),...void 0===d?[]:keysOf(d)]);for(const o of u)setComponentSettings(c,o,mergeComponentSettings(l,d,o));const p=t?.maxFontSizeMultiplier??o.settings.maxFontSizeMultiplier,m={icons:{...o.settings.icons,...t?.icons},gradients:{...o.settings.gradients,...t?.gradients},textVariants:{...o.settings.textVariants,...t?.textVariants},components:c,...void 0===p?{}:{maxFontSizeMultiplier:p}},w={...o.colors};for(const o of COLOR_NAMES)w[o]=f[o]??r[o];const O={...o,colors:w,radius:i,font:s,settings:m};return validateComponentTokens(O),O};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const scaleStep=(e,t,s,r)=>{const
|
|
1
|
+
"use strict";import{isRecord}from"../utils/guards.js";export const scaleStep=(e,t,s,r)=>{const o="space"===t?e.space:"radius"===t?e.radius:e.text,c=o[s],i="text"===t?isRecord(c)?c.size:void 0:c;if("number"!=typeof i){const e=Object.keys(o).join(", ");throw new Error(`${r?`${r} is `:""}${JSON.stringify(s)}, which is not a ${"text"===t?"text size":"radius"===t?"corner":"space"} name. Use one of: ${e}.`)}return i};export const spaceOf=(e,t)=>scaleStep(e,"space",t);export const radiusOf=(e,t)=>scaleStep(e,"radius",t);export const textOf=(e,t)=>scaleStep(e,"text",t);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export function isOneOf(e,r){return e.some(e=>e===r)}export function hasKey(e,r){return Object.hasOwn(e,r)}export function isRecord(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}export function keysOf(e){return Object.keys(e).filter(r=>hasKey(e,r))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import*as Haptics from"expo-haptics";import{Platform}from"react-native";let hapticImpl=null;const EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),longPress:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),tick:()=>Haptics.selectionAsync(),denseTick:()=>Haptics.selectionAsync(),confirm:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),reject:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),gestureStart:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)},ANDROID_HAPTICS={longPress:"Long_Press",tick:"Segment_Tick",denseTick:"Segment_Frequent_Tick",confirm:"Confirm",reject:"Reject",gestureStart:"Gesture_Start"},androidHandler=t=>{const c=ANDROID_HAPTICS[t];return"android"===Platform.OS&&c&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[c]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[c]):null};let hapticsEnabled=!0;export const setHapticsEnabled=t=>{hapticsEnabled=t};export const isHapticsEnabled=()=>hapticsEnabled;export const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch{}const c=androidHandler(t)??EXPO_HANDLERS[t];try{c().catch(
|
|
1
|
+
"use strict";import{Logger}from"@webority/mobile-core";import*as Haptics from"expo-haptics";import{Platform}from"react-native";let hapticImpl=null;const EXPO_HANDLERS={selection:()=>Haptics.selectionAsync(),impactLight:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),impactMedium:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),impactHeavy:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Heavy),notificationSuccess:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),notificationWarning:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Warning),notificationError:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),longPress:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium),tick:()=>Haptics.selectionAsync(),denseTick:()=>Haptics.selectionAsync(),confirm:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success),reject:()=>Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error),gestureStart:()=>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light)},ANDROID_HAPTICS={longPress:"Long_Press",tick:"Segment_Tick",denseTick:"Segment_Frequent_Tick",confirm:"Confirm",reject:"Reject",gestureStart:"Gesture_Start"},androidHandler=t=>{const c=ANDROID_HAPTICS[t];return"android"===Platform.OS&&c&&"function"==typeof Haptics.performAndroidHapticsAsync&&Haptics.AndroidHaptics?.[c]?()=>Haptics.performAndroidHapticsAsync(Haptics.AndroidHaptics[c]):null};let hapticsEnabled=!0;export const setHapticsEnabled=t=>{hapticsEnabled=t};export const isHapticsEnabled=()=>hapticsEnabled;export const triggerHaptic=(t="selection")=>{if(!hapticsEnabled)return;if(hapticImpl)try{return void hapticImpl(t)}catch(t){Logger.recordError(t,{op:"triggerHaptic"})}const c=androidHandler(t)??EXPO_HANDLERS[t];try{c().catch(t=>{Logger.recordError(t,{op:"triggerHaptic"})})}catch(t){Logger.recordError(t,{op:"triggerHaptic"})}};export const setHapticImplementation=t=>{hapticImpl=t};export const resolveHaptic=(t,c)=>!1===t?null:t??c;
|
|
@@ -13,43 +13,43 @@ export declare const PHONE_CHROME_INSETS: {
|
|
|
13
13
|
};
|
|
14
14
|
export interface StatusBarProps {
|
|
15
15
|
os: PhoneChromeOs;
|
|
16
|
-
colorMode?: ColorMode;
|
|
16
|
+
colorMode?: ColorMode | undefined;
|
|
17
17
|
/** The clock as shown, such as 9:41. */
|
|
18
|
-
time?: string;
|
|
18
|
+
time?: string | undefined;
|
|
19
19
|
/** Signal strength in bars, 0 to 4. */
|
|
20
|
-
signal?: number;
|
|
20
|
+
signal?: number | undefined;
|
|
21
21
|
/** Battery level in percent, 0 to 100. */
|
|
22
|
-
battery?: number;
|
|
22
|
+
battery?: number | undefined;
|
|
23
23
|
}
|
|
24
24
|
export declare const StatusBar: ({ os, colorMode, time, signal, battery }: StatusBarProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
|
|
25
25
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
export interface HomeIndicatorProps {
|
|
28
28
|
os: PhoneChromeOs;
|
|
29
|
-
colorMode?: ColorMode;
|
|
29
|
+
colorMode?: ColorMode | undefined;
|
|
30
30
|
}
|
|
31
31
|
export declare const HomeIndicator: ({ os, colorMode }: HomeIndicatorProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
|
|
32
32
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export interface NavigationBarProps {
|
|
35
35
|
os: PhoneChromeOs;
|
|
36
|
-
colorMode?: ColorMode;
|
|
36
|
+
colorMode?: ColorMode | undefined;
|
|
37
37
|
}
|
|
38
38
|
export declare const NavigationBar: ({ os, colorMode }: NavigationBarProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
|
|
39
39
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
40
40
|
}> | null;
|
|
41
41
|
export interface SafeAreaProps {
|
|
42
42
|
os: PhoneChromeOs;
|
|
43
|
-
children?: ReactNode;
|
|
43
|
+
children?: ReactNode | undefined;
|
|
44
44
|
}
|
|
45
45
|
export declare const SafeArea: ({ os, children }: SafeAreaProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
|
|
46
46
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
47
47
|
}>;
|
|
48
48
|
export type KeyboardPreviewOs = "ios" | "android";
|
|
49
49
|
export interface KeyboardFrameProps {
|
|
50
|
-
colorMode?: ColorMode;
|
|
51
|
-
previewOs?: KeyboardPreviewOs;
|
|
52
|
-
children?: ReactNode;
|
|
50
|
+
colorMode?: ColorMode | undefined;
|
|
51
|
+
previewOs?: KeyboardPreviewOs | undefined;
|
|
52
|
+
children?: ReactNode | undefined;
|
|
53
53
|
}
|
|
54
54
|
export declare const KeyboardFrame: ({ colorMode, previewOs, children }: KeyboardFrameProps) => import("react").FunctionComponentElement<Omit<import("react-native").ViewProps, "ref"> & {
|
|
55
55
|
ref?: React.Ref<import("react-native").ViewInstance> | undefined;
|
|
@@ -57,9 +57,9 @@ export declare const KeyboardFrame: ({ colorMode, previewOs, children }: Keyboar
|
|
|
57
57
|
export interface PhoneChromeManifestProp {
|
|
58
58
|
name: string;
|
|
59
59
|
type: "enum" | "string" | "number";
|
|
60
|
-
enum?: string[];
|
|
60
|
+
enum?: string[] | undefined;
|
|
61
61
|
required: boolean;
|
|
62
|
-
description?: string;
|
|
62
|
+
description?: string | undefined;
|
|
63
63
|
}
|
|
64
64
|
export interface PhoneChromeManifestComponent {
|
|
65
65
|
name: string;
|
|
@@ -10,7 +10,7 @@ export type KitPropKey<P> = {
|
|
|
10
10
|
type Literal<T> = [NonNullable<T>] extends [string] ? string extends NonNullable<T> ? never : NonNullable<T> : [NonNullable<T>] extends [number] ? number extends NonNullable<T> ? never : NonNullable<T> : never;
|
|
11
11
|
type IsIconName<T> = [NonNullable<T>] extends [AppIconName] ? ([AppIconName] extends [NonNullable<T>] ? true : false) : false;
|
|
12
12
|
type PropFor<T, Optional extends boolean> = MetaProp & (Optional extends true ? {
|
|
13
|
-
required?: false;
|
|
13
|
+
required?: false | undefined;
|
|
14
14
|
} : {
|
|
15
15
|
required: true;
|
|
16
16
|
}) & (IsIconName<T> extends true ? {
|
|
@@ -30,20 +30,18 @@ type ObjectKey<P> = {
|
|
|
30
30
|
}[KitPropKey<P>];
|
|
31
31
|
export interface PhoneMeta<P, O extends KitPropKey<P>, F extends KitPropKey<P> = never> extends Omit<ComponentMeta, "props" | "examples" | "omit" | "component" | "fixedProps" | "actions" | "takesAction" | "itemsTakeAction"> {
|
|
32
32
|
/** The export this description draws, when it is not `name`: one export described once per mode. */
|
|
33
|
-
component?: string;
|
|
33
|
+
component?: string | undefined;
|
|
34
34
|
/** Props the kit sets on every placement; they are neither shown nor set by an example. */
|
|
35
35
|
fixedProps?: {
|
|
36
36
|
readonly [K in F]: ExampleValue<P[K]>;
|
|
37
|
-
};
|
|
37
|
+
} | undefined;
|
|
38
38
|
props: {
|
|
39
39
|
[K in Exclude<KitPropKey<P>, O | F>]: PropFor<P[K], Partial<Pick<P, K>> extends Pick<P, K> ? true : false>;
|
|
40
40
|
};
|
|
41
|
-
/** The part's role in the manifest. */
|
|
42
|
-
role?: "title" | "navigation";
|
|
43
41
|
/** Object props that each carry one action; in play a tap on one runs the stored action. */
|
|
44
|
-
takesAction?: readonly ObjectKey<P>[];
|
|
42
|
+
takesAction?: readonly ObjectKey<P>[] | undefined;
|
|
45
43
|
/** Array props whose items each carry an action. */
|
|
46
|
-
itemsTakeAction?: readonly ListKey<P>[];
|
|
44
|
+
itemsTakeAction?: readonly ListKey<P>[] | undefined;
|
|
47
45
|
/** Kit props deliberately not shown, such as object or render props no kit type fits. */
|
|
48
46
|
omit: readonly O[];
|
|
49
47
|
examples: readonly (Omit<MetaExample, "id" | "props"> & {
|
|
@@ -5,40 +5,40 @@ export type AccordionVariant = "plain" | "card";
|
|
|
5
5
|
export interface AccordionProps {
|
|
6
6
|
title: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
-
id?: string;
|
|
9
|
-
expanded?: boolean;
|
|
10
|
-
defaultExpanded?: boolean;
|
|
11
|
-
onChange?: (expanded: boolean) => void;
|
|
12
|
-
icon?: React.ReactNode;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
variant?: AccordionVariant;
|
|
15
|
-
accessibilityLabel?: string;
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
expanded?: boolean | undefined;
|
|
10
|
+
defaultExpanded?: boolean | undefined;
|
|
11
|
+
onChange?: ((expanded: boolean) => void) | undefined;
|
|
12
|
+
icon?: React.ReactNode | undefined;
|
|
13
|
+
disabled?: boolean | undefined;
|
|
14
|
+
variant?: AccordionVariant | undefined;
|
|
15
|
+
accessibilityLabel?: string | undefined;
|
|
16
16
|
/** The outer box. Applied last on that node, so it wins over containerStyle. */
|
|
17
|
-
style?: StyleProp<ViewStyle
|
|
18
|
-
headerStyle?: StyleProp<ViewStyle
|
|
19
|
-
contentStyle?: StyleProp<ViewStyle
|
|
17
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
18
|
+
headerStyle?: StyleProp<ViewStyle> | undefined;
|
|
19
|
+
contentStyle?: StyleProp<ViewStyle> | undefined;
|
|
20
20
|
/** Style applied to the animated wrapper around the expandable content. */
|
|
21
|
-
contentWrapperStyle?: StyleProp<ViewStyle
|
|
21
|
+
contentWrapperStyle?: StyleProp<ViewStyle> | undefined;
|
|
22
22
|
/** Alias of style, applied before it on the same node. Use style. */
|
|
23
|
-
containerStyle?: StyleProp<ViewStyle
|
|
24
|
-
testID?: string;
|
|
23
|
+
containerStyle?: StyleProp<ViewStyle> | undefined;
|
|
24
|
+
testID?: string | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* When true, renders the accordion as its authored skeleton placeholder
|
|
27
27
|
* shape (header row, collapsed body). Footprint matches the closed live
|
|
28
28
|
* accordion so the layout doesn't shift when data arrives.
|
|
29
29
|
*/
|
|
30
|
-
loading?: boolean;
|
|
30
|
+
loading?: boolean | undefined;
|
|
31
31
|
/** Haptic feedback for interactions. Pass false to disable; pass a HapticType to override the default. */
|
|
32
|
-
haptic?: HapticType | false;
|
|
32
|
+
haptic?: HapticType | false | undefined;
|
|
33
33
|
}
|
|
34
34
|
export interface AccordionGroupProps {
|
|
35
35
|
children: React.ReactNode;
|
|
36
|
-
allowMultiple?: boolean;
|
|
37
|
-
defaultExpandedKeys?: string[];
|
|
38
|
-
expandedKeys?: string[];
|
|
39
|
-
onChange?: (keys: string[]) => void;
|
|
40
|
-
style?: StyleProp<ViewStyle
|
|
41
|
-
testID?: string;
|
|
36
|
+
allowMultiple?: boolean | undefined;
|
|
37
|
+
defaultExpandedKeys?: string[] | undefined;
|
|
38
|
+
expandedKeys?: string[] | undefined;
|
|
39
|
+
onChange?: ((keys: string[]) => void) | undefined;
|
|
40
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
41
|
+
testID?: string | undefined;
|
|
42
42
|
}
|
|
43
43
|
declare const AccordionGroup: React.FC<AccordionGroupProps>;
|
|
44
44
|
declare const Accordion: React.FC<AccordionProps> & {
|
|
@@ -13,47 +13,47 @@ export interface AmountSliderLabels {
|
|
|
13
13
|
}
|
|
14
14
|
export declare const DEFAULT_AMOUNT_SLIDER_LABELS: Readonly<AmountSliderLabels>;
|
|
15
15
|
export interface AmountSliderProps {
|
|
16
|
-
value?: number;
|
|
17
|
-
defaultValue?: number;
|
|
18
|
-
onChange?: (value: number) => void;
|
|
19
|
-
min?: number;
|
|
20
|
-
max?: number;
|
|
21
|
-
step?: number;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
tone?: SliderTone;
|
|
24
|
-
size?: SliderSize;
|
|
16
|
+
value?: number | undefined;
|
|
17
|
+
defaultValue?: number | undefined;
|
|
18
|
+
onChange?: ((value: number) => void) | undefined;
|
|
19
|
+
min?: number | undefined;
|
|
20
|
+
max?: number | undefined;
|
|
21
|
+
step?: number | undefined;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
tone?: SliderTone | undefined;
|
|
24
|
+
size?: SliderSize | undefined;
|
|
25
25
|
/** The slider's look. Default `'inset'`, the design this component comes from. */
|
|
26
|
-
variant?: SliderVariant;
|
|
26
|
+
variant?: SliderVariant | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* Whether the large amount reads in Thousand, Lakh and Crore or in Thousand,
|
|
29
29
|
* Million and Billion. Default: the grouping of the configured locale.
|
|
30
30
|
*/
|
|
31
|
-
units?: ScaleUnits;
|
|
31
|
+
units?: ScaleUnits | undefined;
|
|
32
32
|
/** ISO 4217 code of the amount; the symbol drawn before it comes from this. */
|
|
33
33
|
currency: string;
|
|
34
34
|
/** Unit words and the input box's label. Omitted keys keep the English defaults. */
|
|
35
|
-
labels?: Partial<AmountSliderLabels
|
|
35
|
+
labels?: Partial<AmountSliderLabels> | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Text of the input box when it is not being edited. Default: the currency
|
|
38
38
|
* with no decimals.
|
|
39
39
|
*/
|
|
40
|
-
formatInput?: (value: number) => string;
|
|
40
|
+
formatInput?: ((value: number) => string) | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Duration in ms of one digit roll. Default `theme.motion.duration.default`,
|
|
43
43
|
* which the ThemeProvider collapses to 0 when the OS asks for reduced
|
|
44
44
|
* motion.
|
|
45
45
|
*/
|
|
46
|
-
animationDuration?: number;
|
|
47
|
-
haptic?: HapticType | false;
|
|
46
|
+
animationDuration?: number | undefined;
|
|
47
|
+
haptic?: HapticType | false | undefined;
|
|
48
48
|
/** Read out for the slider. The input box reads `labels.inputLabel`. */
|
|
49
|
-
accessibilityLabel?: string;
|
|
50
|
-
style?: StyleProp<ViewStyle
|
|
51
|
-
headerStyle?: StyleProp<ViewStyle
|
|
52
|
-
valueStyle?: StyleProp<TextStyle
|
|
53
|
-
unitStyle?: StyleProp<TextStyle
|
|
54
|
-
inputStyle?: StyleProp<ViewStyle
|
|
55
|
-
sliderStyle?: StyleProp<ViewStyle
|
|
56
|
-
testID?: string;
|
|
49
|
+
accessibilityLabel?: string | undefined;
|
|
50
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
51
|
+
headerStyle?: StyleProp<ViewStyle> | undefined;
|
|
52
|
+
valueStyle?: StyleProp<TextStyle> | undefined;
|
|
53
|
+
unitStyle?: StyleProp<TextStyle> | undefined;
|
|
54
|
+
inputStyle?: StyleProp<ViewStyle> | undefined;
|
|
55
|
+
sliderStyle?: StyleProp<ViewStyle> | undefined;
|
|
56
|
+
testID?: string | undefined;
|
|
57
57
|
}
|
|
58
58
|
interface Scaled {
|
|
59
59
|
amount: number;
|
|
@@ -7,13 +7,13 @@ export interface AnimatePresenceProps {
|
|
|
7
7
|
* animation plays before the content unmounts; when it returns the enter
|
|
8
8
|
* animation plays. Drive it like `{visible ? <Panel /> : null}`.
|
|
9
9
|
*/
|
|
10
|
-
children?: React.ReactNode;
|
|
10
|
+
children?: React.ReactNode | undefined;
|
|
11
11
|
/** Enter/exit preset. Default `'fade'`. */
|
|
12
|
-
preset?: PresencePreset;
|
|
12
|
+
preset?: PresencePreset | undefined;
|
|
13
13
|
/** Animation duration (ms). Defaults to `theme.motion.duration.default`. */
|
|
14
|
-
duration?: number;
|
|
15
|
-
style?: StyleProp<ViewStyle
|
|
16
|
-
testID?: string;
|
|
14
|
+
duration?: number | undefined;
|
|
15
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
16
|
+
testID?: string | undefined;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Animates a single child in on mount and out on unmount. Thin, theme-aware
|