@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{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,LayoutAnimation,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Skeleton}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AccordionGroupContext=createContext(null),useAccordionGroup=()=>useContext(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:o,expandedKeys:i,onChange:n,style:r,testID:s})=>{const a=void 0!==i,[l,c]=useState(o??[]),d=
|
|
1
|
+
"use strict";import{createContext,useCallback,useContext,useEffect,useMemo,useRef,useState}from"react";import{Animated,Easing,LayoutAnimation,Pressable,StyleSheet,View}from"react-native";import{usePresenceMotion}from"../../hooks/usePresenceMotion.js";import{createAnimatedValue,useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{smoothCorners}from"../../utils/corners.js";import{resolveHaptic,triggerHaptic}from"../../utils/hapticUtils.js";import{defaultIcons}from"../AppIcon/defaultIcons.js";import{Skeleton}from"../Skeleton/index.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const AccordionGroupContext=createContext(null),useAccordionGroup=()=>useContext(AccordionGroupContext),AccordionGroup=({children:e,allowMultiple:t=!1,defaultExpandedKeys:o,expandedKeys:i,onChange:n,style:r,testID:s})=>{const a=void 0!==i,[l,c]=useState(o??[]),d=i??l,u=useCallback(e=>{a||c(e),n?.(e)},[a,n]),p=useCallback(e=>{let o;o=d.includes(e)?d.filter(t=>t!==e):t?[...d,e]:[e],u(o)},[d,t,u]),m=useCallback(e=>d.includes(e),[d]),h=useMemo(()=>({isExpanded:m,toggle:p,allowMultiple:t}),[m,p,t]);return _jsx(AccordionGroupContext.Provider,{value:h,children:_jsx(View,{style:r,testID:s,children:e})})};AccordionGroup.displayName="AccordionGroup";const Chevron=({rotate:e,color:t})=>{const o=useTheme();return _jsx(Animated.View,{style:[chevronStyles.icon,{transform:[{rotate:e}]}],accessible:!1,children:(o.settings.icons.chevronDown??defaultIcons.chevronDown)({size:16,color:t})})},chevronStyles=StyleSheet.create({icon:{width:16,height:16,alignItems:"center",justifyContent:"center"}}),Accordion=e=>{const{title:t,children:o,id:i,expanded:n,defaultExpanded:r=!1,onChange:s,icon:a,disabled:l=!1,variant:c="plain",accessibilityLabel:d,style:u,headerStyle:p,contentStyle:m,contentWrapperStyle:h,containerStyle:x,testID:y,loading:g=!1,haptic:f}=e;assertValidValue("Accordion","variant",e.variant,["plain","card"]);const b=useTheme(),A=usePresenceMotion(),j=A.duration("default"),v=useMemo(()=>buildStyles(b),[b]),S=useAccordionGroup(),V=void 0!==n,[w,C]=useState(r),k=S&&i?S.isExpanded(i):null,_=null!==k?k:V?!!n:w,[R,I]=useState(null),D=useRef(createAnimatedValue(_?1:0)).current,E=useRef(createAnimatedValue(_?1:0)).current,G=useRef(createAnimatedValue(_?1:0)).current,L=useRef(_);useEffect(()=>{if(L.current===_)return;L.current=_;const e=_?1:0,t=Easing.bezier(...b.motion.ease["in-out"]),o=Animated.timing(D,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),i=Animated.timing(E,{toValue:e,duration:j,easing:t,useNativeDriver:!1}),n=Animated.timing(G,{toValue:e,duration:b.motion.duration.default,easing:t,useNativeDriver:!1}),r=A.reduced&&!_?Animated.sequence([i,Animated.parallel([o,n])]):Animated.parallel([o,i,n]);return r.start(),()=>r.stop()},[_,D,E,G,j,A.reduced,b.motion]);const M=useCallback(e=>{const t=e.nativeEvent.layout.height;t>0&&t!==R&&I(t)},[R]),P=useCallback(()=>{if(l)return;const e=resolveHaptic(f,"selection");if(e&&triggerHaptic(e),S&&i)return S.toggle(i),void s?.(!_);V||C(!_),s?.(!_)},[l,S,i,_,V,s,f]),T=G.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),H=null===R?void 0:D.interpolate({inputRange:[0,1],outputRange:[0,R]}),N="card"===c?[v.card,b.shadow.card,{backgroundColor:b.colors.surface,borderRadius:b.radius.md,...smoothCorners}]:null;return g?_jsx(AccordionSkeleton,{...e}):_jsxs(View,{style:[N,x,u],testID:y,children:[_jsxs(Pressable,{onPress:P,disabled:l,accessibilityRole:"button",accessibilityLabel:d??t,accessibilityState:{expanded:_,disabled:l},"aria-expanded":_,"aria-disabled":l,style:({pressed:e})=>[v.header,p,{opacity:l?.55:e?.85:1}],children:[a?_jsx(View,{style:v.iconLeft,children:a}):null,_jsx(Text,{variant:"body",weight:"semibold",color:l?"disabled":"primary",numberOfLines:2,style:v.title,children:t}),_jsx(Chevron,{rotate:T,color:l?b.colors["text-disabled"]:b.colors["text-muted"]})]}),null===R?_jsx(View,{style:v.measurer,pointerEvents:"none",onLayout:M,children:_jsx(View,{style:[v.content,m],children:o})}):null,_jsx(Animated.View,{style:[v.contentWrapper,null===R?{height:0,opacity:0}:{height:H,opacity:E},h],children:_jsx(View,{onLayout:M,style:[v.content,m],children:o})})]})};Accordion.displayName="Accordion";const AccordionSkeleton=({variant:e="plain",style:t})=>{const o=useTheme();return _jsx(View,{style:["card"===e?{paddingHorizontal:o.space.md,paddingVertical:o.space.sm,backgroundColor:o.colors.surface,borderRadius:o.radius.md,...smoothCorners}:{paddingVertical:o.space.sm},t],accessibilityRole:"progressbar",accessibilityState:{busy:!0},"aria-busy":!0,children:_jsxs(View,{style:{flexDirection:"row",alignItems:"center"},children:[_jsx(Skeleton,{shape:"text",width:"60%",height:18,style:{flex:1}}),_jsx(Skeleton,{width:16,height:16,radius:"sm",style:{marginLeft:o.space.sm}})]})})};AccordionSkeleton.displayName="AccordionSkeleton",Accordion.Skeleton=AccordionSkeleton;const buildStyles=e=>StyleSheet.create({card:{paddingHorizontal:e.space.md,paddingVertical:e.space.xs,marginVertical:e.space.xs},header:{flexDirection:"row",alignItems:"center",paddingVertical:e.space.sm},iconLeft:{marginRight:e.space.sm},title:{flex:1},contentWrapper:{overflow:"hidden"},content:{paddingBottom:e.space.sm},measurer:{position:"absolute",opacity:0,left:0,right:0,top:0,zIndex:-1}});export{Accordion,AccordionGroup};export default Accordion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Logger}from"@webority/mobile-core";import{useMemo}from"react";import{SvgXml}from"react-native-svg";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{resolveColor}from"../Text/Text.js";import{CATALOG_LOADERS,ICON_NAMES}from"./catalog.g.js";import{CURATED_ICON_NAMES,GLYPHS}from"./glyphs.g.js";import{jsx as _jsx}from"react/jsx-runtime";export{CURATED_ICON_NAMES,ICON_NAMES};export const ICONSAX_SUFFIX="-iconsax";export const APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36};const tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",o=`${e}:${t}`,a=shardCache.get(o);if(void 0!==a)return a;const
|
|
1
|
+
"use strict";import{Logger}from"@webority/mobile-core";import{useMemo}from"react";import{SvgXml}from"react-native-svg";import{useTheme}from"../../theme/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{hasKey}from"../../utils/guards.js";import{resolveColor}from"../Text/Text.js";import{CATALOG_LOADERS,ICON_NAMES}from"./catalog.g.js";import{CURATED_ICON_NAMES,GLYPHS}from"./glyphs.g.js";import{jsx as _jsx}from"react/jsx-runtime";export{CURATED_ICON_NAMES,ICON_NAMES};export const ICONSAX_SUFFIX="-iconsax";export const APP_ICON_SIZES={xs:14,sm:18,md:22,lg:28,xl:36};const tryRequire=e=>{try{return e()}catch{return null}};let curatedVariants=null;const loadCuratedVariants=()=>(curatedVariants||(curatedVariants=tryRequire(()=>require("./variants.g").VARIANT_GLYPHS)??{}),curatedVariants),shardCache=new Map,loadShard=(e,r)=>{const t=r[0]?.toLowerCase()??"",o=`${e}:${t}`,a=shardCache.get(o);if(void 0!==a)return a;const s=CATALOG_LOADERS[e]?.[t],n=s?tryRequire(s):null;return shardCache.set(o,n),n},warned=new Set,resolveCatalogue=(e,r)=>{const t=loadShard(r,e)?.[e];return t||("linear"===r?null:loadShard("linear",e)?.[e]??null)};export const resolveGlyph=(e,r="linear")=>{if(e.endsWith("-iconsax")){const t=e.slice(0,-8);return t in GLYPHS?resolveCatalogue(t,r):null}const t=hasKey(GLYPHS,e)?GLYPHS[e]:void 0;return t?"linear"===r?t:loadCuratedVariants()[r]?.[e]??t:resolveCatalogue(e,r)};export const buildIconXml=(e,r,t)=>`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${r}" viewBox="0 0 24 24" fill="none">${e.replace(/currentColor/g,t)}</svg>`;const iconXmlCache=new Map;export const AppIcon=({name:e,size:r="md",color:t,variant:o="linear",style:a,accessibilityLabel:s,testID:n})=>{const l=useTheme();"string"==typeof r&&assertValidValue("AppIcon","size",r,Object.keys(APP_ICON_SIZES)),assertValidValue("AppIcon","variant",o,["linear","bold","bulk","broken","outline","twotone"]);const i="number"==typeof r?r:APP_ICON_SIZES[r]??APP_ICON_SIZES.md,c=void 0===t?l.colors["text-body"]:resolveColor(l,t),u=resolveGlyph(e,o),m=useMemo(()=>{if(!u)return null;const r=`${e}|${o}|${i}|${c}`,t=iconXmlCache.get(r);if(void 0!==t)return t;iconXmlCache.size>=500&&iconXmlCache.clear();const a=buildIconXml(u,i,c);return iconXmlCache.set(r,a),a},[e,o,u,i,c]);if(!m)return __DEV__&&!warned.has(e)&&(warned.add(e),Logger.warn(`[@webority/mobile-ui] AppIcon: Unknown icon "${e}". Names come from webority-ui's icon map and the Iconsax catalogue; run node scripts/gen-icons.mjs after adding one there.`)),null;return _jsx(SvgXml,{xml:m,width:i,height:i,...void 0!==a?{style:a}:{},accessible:null!=s,...null!=s?{accessibilityLabel:s,accessibilityRole:"image"}:{},...void 0!==n?{testID:n}:{}})};AppIcon.displayName="AppIcon";export default AppIcon;
|