@webority/mobile-ui 0.88.1 → 0.90.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/README.md +2 -0
- package/lib/commonjs/canvasKit/index.js +1 -1
- package/lib/commonjs/components/Accordion/Accordion.js +1 -1
- package/lib/commonjs/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/commonjs/components/AnimatePresence/AnimatePresence.js +1 -1
- package/lib/commonjs/components/AppBar/AppBar.js +1 -1
- package/lib/commonjs/components/AppIcon/AppIcon.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/Autocomplete/Autocomplete.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/Button/Button.js +1 -1
- package/lib/commonjs/components/Calendar/Calendar.js +1 -1
- package/lib/commonjs/components/Calendar/CalendarDay.js +1 -1
- package/lib/commonjs/components/Calendar/calendarStyles.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/Checkbox/Checkbox.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/Composer/Composer.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/DateSeparator/DateSeparator.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/Divider/Divider.js +1 -1
- package/lib/commonjs/components/Drawer/Drawer.js +1 -1
- package/lib/commonjs/components/EmptyState/EmptyState.js +1 -1
- package/lib/commonjs/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/commonjs/components/FieldBase/Chevron.js +1 -1
- package/lib/commonjs/components/FieldBase/ChoiceText.js +1 -1
- package/lib/commonjs/components/FieldBase/FieldBase.js +1 -1
- package/lib/commonjs/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/commonjs/components/FilePicker/FilePicker.js +1 -1
- package/lib/commonjs/components/FileViewer/FileViewer.js +1 -1
- package/lib/commonjs/components/FilterChipRow/FilterChipRow.js +1 -1
- package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/commonjs/components/FormField/FormField.js +1 -1
- package/lib/commonjs/components/IconBadge/IconBadge.js +1 -1
- package/lib/commonjs/components/IconButton/IconButton.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/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/components/KeyboardToolbar/KeyboardToolbar.js +1 -1
- package/lib/commonjs/components/ListItem/ListItem.js +1 -1
- package/lib/commonjs/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/commonjs/components/Markdown/Markdown.js +1 -1
- package/lib/commonjs/components/Menu/MenuSurface.js +1 -1
- package/lib/commonjs/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +1 -1
- package/lib/commonjs/components/Modal/Modal.js +1 -1
- package/lib/commonjs/components/Notation/Notation.js +1 -1
- package/lib/commonjs/components/NumberInput/NumberInput.js +1 -1
- package/lib/commonjs/components/OTPInput/OTPInput.js +1 -1
- package/lib/commonjs/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/commonjs/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/commonjs/components/PaymentResult/PaymentResult.js +1 -1
- package/lib/commonjs/components/PermissionPrompt/PermissionPrompt.js +1 -1
- package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/commonjs/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/commonjs/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/commonjs/components/ProgressRing/ProgressRing.js +1 -1
- package/lib/commonjs/components/Radio/Radio.js +1 -1
- package/lib/commonjs/components/Radio/RadioDot.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/RichTextEditor/RichTextEditor.js +1 -1
- package/lib/commonjs/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/commonjs/components/Screen/Screen.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchBar.js +1 -1
- package/lib/commonjs/components/SearchBar/SearchPanel.js +1 -1
- package/lib/commonjs/components/SectionHeader/SectionHeader.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/Skeleton.js +1 -1
- package/lib/commonjs/components/Skeleton/SkeletonContent.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/Slider/valueText.js +1 -1
- package/lib/commonjs/components/SliderField/SliderField.js +1 -1
- package/lib/commonjs/components/Sparkline/Sparkline.js +1 -1
- package/lib/commonjs/components/Spinner/Spinner.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/Stepper/Stepper.js +1 -1
- package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
- package/lib/commonjs/components/Switch/Switch.js +1 -1
- package/lib/commonjs/components/Tabs/Tabs.js +1 -1
- package/lib/commonjs/components/TagInput/TagInput.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/Timeline/Timeline.js +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -1
- package/lib/commonjs/components/Toast/ToastProvider.js +1 -1
- package/lib/commonjs/components/Tooltip/RichTooltipBody.js +1 -1
- package/lib/commonjs/components/Tooltip/Tooltip.js +1 -1
- package/lib/commonjs/components/Tour/Tour.js +1 -1
- package/lib/commonjs/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/commonjs/components/WheelPicker/Wheel.js +1 -1
- package/lib/commonjs/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/commonjs/hooks/useDragToDismiss.js +1 -1
- package/lib/commonjs/hooks/usePressAnimation.js +1 -1
- package/lib/commonjs/hooks/useRefreshControl.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/initUI.js +1 -1
- package/lib/commonjs/network/NetworkStatusBanner.js +1 -1
- package/lib/commonjs/theme/ThemeContext.js +1 -1
- package/lib/commonjs/theme/componentSizes.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/theme/merge.js +1 -1
- package/lib/commonjs/theme/scale.js +1 -1
- package/lib/commonjs/theme/textStyle.js +1 -1
- package/lib/commonjs/theme/tokens.generated.js +1 -1
- package/lib/commonjs/theme/tokens.js +1 -1
- package/lib/commonjs/utils/color.js +1 -1
- package/lib/module/canvasKit/index.js +1 -1
- package/lib/module/components/Accordion/Accordion.js +1 -1
- package/lib/module/components/AmountSlider/AmountSlider.js +1 -1
- package/lib/module/components/AnimatePresence/AnimatePresence.js +1 -1
- package/lib/module/components/AppBar/AppBar.js +1 -1
- package/lib/module/components/AppIcon/AppIcon.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/Autocomplete/Autocomplete.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/Button/Button.js +1 -1
- package/lib/module/components/Calendar/Calendar.js +1 -1
- package/lib/module/components/Calendar/CalendarDay.js +1 -1
- package/lib/module/components/Calendar/calendarStyles.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/Checkbox/Checkbox.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/Composer/Composer.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/DateSeparator/DateSeparator.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/Divider/Divider.js +1 -1
- package/lib/module/components/Drawer/Drawer.js +1 -1
- package/lib/module/components/EmptyState/EmptyState.js +1 -1
- package/lib/module/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/module/components/FieldBase/Chevron.js +1 -1
- package/lib/module/components/FieldBase/ChoiceText.js +1 -1
- package/lib/module/components/FieldBase/FieldBase.js +1 -1
- package/lib/module/components/FieldBase/useFloatingLabel.js +1 -1
- package/lib/module/components/FilePicker/FilePicker.js +1 -1
- package/lib/module/components/FileViewer/FileViewer.js +1 -1
- package/lib/module/components/FilterChipRow/FilterChipRow.js +1 -1
- package/lib/module/components/FloatingActionButton/FloatingActionButton.js +1 -1
- package/lib/module/components/FormField/FormField.js +1 -1
- package/lib/module/components/IconBadge/IconBadge.js +1 -1
- package/lib/module/components/IconButton/IconButton.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/KeyboardAwareScrollView/KeyboardAwareScrollView.js +1 -1
- package/lib/module/components/KeyboardToolbar/KeyboardToolbar.js +1 -1
- package/lib/module/components/ListItem/ListItem.js +1 -1
- package/lib/module/components/LoaderOverlay/LoaderOverlay.js +1 -1
- package/lib/module/components/Markdown/Markdown.js +1 -1
- package/lib/module/components/Menu/MenuSurface.js +1 -1
- package/lib/module/components/MessageBubble/MessageBubble.js +1 -1
- package/lib/module/components/MessageList/MessageList.js +1 -1
- package/lib/module/components/Modal/Modal.js +1 -1
- package/lib/module/components/Notation/Notation.js +1 -1
- package/lib/module/components/NumberInput/NumberInput.js +1 -1
- package/lib/module/components/OTPInput/OTPInput.js +1 -1
- package/lib/module/components/OnboardingPager/OnboardingPager.js +1 -1
- package/lib/module/components/OptionSheet/OptionSheet.js +1 -1
- package/lib/module/components/PaymentResult/PaymentResult.js +1 -1
- package/lib/module/components/PermissionPrompt/PermissionPrompt.js +1 -1
- package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/lib/module/components/PickerTrigger/PickerTrigger.js +1 -1
- package/lib/module/components/ProfileCompletion/ProfileCompletion.js +1 -1
- package/lib/module/components/ProfilePicker/ProfilePicker.js +1 -1
- package/lib/module/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/module/components/ProgressRing/ProgressRing.js +1 -1
- package/lib/module/components/Radio/Radio.js +1 -1
- package/lib/module/components/Radio/RadioDot.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/RichTextEditor/RichTextEditor.js +1 -1
- package/lib/module/components/ScannerOverlay/ScannerOverlay.js +1 -1
- package/lib/module/components/Screen/Screen.js +1 -1
- package/lib/module/components/SearchBar/SearchBar.js +1 -1
- package/lib/module/components/SearchBar/SearchPanel.js +1 -1
- package/lib/module/components/SectionHeader/SectionHeader.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/Skeleton.js +1 -1
- package/lib/module/components/Skeleton/SkeletonContent.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/Slider/valueText.js +1 -1
- package/lib/module/components/SliderField/SliderField.js +1 -1
- package/lib/module/components/Sparkline/Sparkline.js +1 -1
- package/lib/module/components/Spinner/Spinner.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/Stepper/Stepper.js +1 -1
- package/lib/module/components/Swipeable/Swipeable.js +1 -1
- package/lib/module/components/Switch/Switch.js +1 -1
- package/lib/module/components/Tabs/Tabs.js +1 -1
- package/lib/module/components/TagInput/TagInput.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/Timeline/Timeline.js +1 -1
- package/lib/module/components/Toast/Toast.js +1 -1
- package/lib/module/components/Toast/ToastProvider.js +1 -1
- package/lib/module/components/Tooltip/RichTooltipBody.js +1 -1
- package/lib/module/components/Tooltip/Tooltip.js +1 -1
- package/lib/module/components/Tour/Tour.js +1 -1
- package/lib/module/components/TypingIndicator/TypingIndicator.js +1 -1
- package/lib/module/components/WheelPicker/Wheel.js +1 -1
- package/lib/module/components/WheelPicker/WheelPicker.js +1 -1
- package/lib/module/hooks/useDragToDismiss.js +1 -1
- package/lib/module/hooks/usePressAnimation.js +1 -1
- package/lib/module/hooks/useRefreshControl.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/initUI.js +1 -1
- package/lib/module/network/NetworkStatusBanner.js +1 -1
- package/lib/module/theme/ThemeContext.js +1 -1
- package/lib/module/theme/componentSizes.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/theme/merge.js +1 -1
- package/lib/module/theme/scale.js +1 -1
- package/lib/module/theme/textStyle.js +1 -1
- package/lib/module/theme/tokens.generated.js +1 -1
- package/lib/module/theme/tokens.js +1 -1
- package/lib/module/utils/color.js +1 -1
- package/lib/typescript/commonjs/components/AmountSlider/AmountSlider.d.ts +1 -1
- package/lib/typescript/commonjs/components/AnimatePresence/AnimatePresence.d.ts +1 -1
- package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +4 -4
- package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +1 -1
- package/lib/typescript/commonjs/components/AppIcon/defaultIcons.d.ts +1 -1
- package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +4 -4
- package/lib/typescript/commonjs/components/Badge/Badge.d.ts +1 -1
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +1 -1
- package/lib/typescript/commonjs/components/BarChart/BarChart.d.ts +1 -1
- package/lib/typescript/commonjs/components/BottomNavigation/BottomNavigation.d.ts +8 -10
- package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +2 -2
- package/lib/typescript/commonjs/components/Box/Box.d.ts +21 -21
- package/lib/typescript/commonjs/components/Button/Button.d.ts +3 -3
- package/lib/typescript/commonjs/components/Calendar/Calendar.d.ts +1 -1
- package/lib/typescript/commonjs/components/Calendar/calendarStyles.d.ts +9 -9
- package/lib/typescript/commonjs/components/Card/Card.d.ts +7 -6
- package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +1 -1
- package/lib/typescript/commonjs/components/Chip/Chip.d.ts +1 -1
- package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +1 -1
- package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +2 -2
- package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +1 -1
- package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +32 -33
- package/lib/typescript/commonjs/components/FieldBase/useFloatingLabel.d.ts +2 -3
- package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +2 -2
- package/lib/typescript/commonjs/components/FormField/FormField.d.ts +2 -3
- package/lib/typescript/commonjs/components/IconBadge/IconBadge.d.ts +1 -1
- package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +2 -3
- package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
- package/lib/typescript/commonjs/components/Notation/Notation.d.ts +1 -1
- package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +2 -2
- package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +2 -3
- package/lib/typescript/commonjs/components/ProfileCompletion/ProfileCompletion.d.ts +3 -4
- package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +5 -6
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/typescript/commonjs/components/ProgressRing/ProgressRing.d.ts +6 -7
- package/lib/typescript/commonjs/components/Radio/Radio.d.ts +1 -1
- package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -4
- package/lib/typescript/commonjs/components/Select/Select.d.ts +5 -5
- package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +2 -2
- package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
- package/lib/typescript/commonjs/components/Slider/Slider.d.ts +6 -7
- package/lib/typescript/commonjs/components/Slider/valueText.d.ts +1 -1
- package/lib/typescript/commonjs/components/Sparkline/Sparkline.d.ts +1 -1
- package/lib/typescript/commonjs/components/StatusBadge/StatusBadge.d.ts +2 -3
- package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +2 -2
- package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -1
- package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +6 -7
- package/lib/typescript/commonjs/components/Text/Text.d.ts +6 -7
- package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +1 -1
- package/lib/typescript/commonjs/components/Toast/Toast.d.ts +1 -1
- package/lib/typescript/commonjs/components/Toast/ToastProvider.d.ts +2 -2
- package/lib/typescript/commonjs/components/Tour/Tour.d.ts +2 -2
- package/lib/typescript/commonjs/hooks/usePresenceMotion.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/initUI.d.ts +3 -3
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts +5 -3
- package/lib/typescript/commonjs/theme/componentSizes.d.ts +40 -18
- package/lib/typescript/commonjs/theme/index.d.ts +15 -17
- package/lib/typescript/commonjs/theme/merge.d.ts +15 -2
- package/lib/typescript/commonjs/theme/scale.d.ts +6 -4
- package/lib/typescript/commonjs/theme/textStyle.d.ts +4 -17
- package/lib/typescript/commonjs/theme/tokens.generated.d.ts +239 -92
- package/lib/typescript/commonjs/theme/types.d.ts +104 -347
- package/lib/typescript/commonjs/utils/color.d.ts +6 -2
- package/lib/typescript/commonjs/utils/shadows.d.ts +2 -2
- package/lib/typescript/module/components/AmountSlider/AmountSlider.d.ts +1 -1
- package/lib/typescript/module/components/AnimatePresence/AnimatePresence.d.ts +1 -1
- package/lib/typescript/module/components/AppBar/AppBar.d.ts +4 -4
- package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +1 -1
- package/lib/typescript/module/components/AppIcon/defaultIcons.d.ts +1 -1
- package/lib/typescript/module/components/Avatar/Avatar.d.ts +4 -4
- package/lib/typescript/module/components/Badge/Badge.d.ts +1 -1
- package/lib/typescript/module/components/Banner/Banner.d.ts +1 -1
- package/lib/typescript/module/components/BarChart/BarChart.d.ts +1 -1
- package/lib/typescript/module/components/BottomNavigation/BottomNavigation.d.ts +8 -10
- package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +2 -2
- package/lib/typescript/module/components/Box/Box.d.ts +21 -21
- package/lib/typescript/module/components/Button/Button.d.ts +3 -3
- package/lib/typescript/module/components/Calendar/Calendar.d.ts +1 -1
- package/lib/typescript/module/components/Calendar/calendarStyles.d.ts +9 -9
- package/lib/typescript/module/components/Card/Card.d.ts +7 -6
- package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +1 -1
- package/lib/typescript/module/components/Chip/Chip.d.ts +1 -1
- package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +1 -1
- package/lib/typescript/module/components/Dialog/Dialog.d.ts +2 -2
- package/lib/typescript/module/components/FieldBase/Chevron.d.ts +1 -1
- package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +32 -33
- package/lib/typescript/module/components/FieldBase/useFloatingLabel.d.ts +2 -3
- package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +2 -2
- package/lib/typescript/module/components/FormField/FormField.d.ts +2 -3
- package/lib/typescript/module/components/IconBadge/IconBadge.d.ts +1 -1
- package/lib/typescript/module/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +2 -3
- package/lib/typescript/module/components/Input/Input.d.ts +2 -2
- package/lib/typescript/module/components/Notation/Notation.d.ts +1 -1
- package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +2 -2
- package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +2 -3
- package/lib/typescript/module/components/ProfileCompletion/ProfileCompletion.d.ts +3 -4
- package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +5 -6
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/typescript/module/components/ProgressRing/ProgressRing.d.ts +6 -7
- package/lib/typescript/module/components/Radio/Radio.d.ts +1 -1
- package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +1 -1
- package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -4
- package/lib/typescript/module/components/Select/Select.d.ts +5 -5
- package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +2 -2
- package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
- package/lib/typescript/module/components/Slider/Slider.d.ts +6 -7
- package/lib/typescript/module/components/Slider/valueText.d.ts +1 -1
- package/lib/typescript/module/components/Sparkline/Sparkline.d.ts +1 -1
- package/lib/typescript/module/components/StatusBadge/StatusBadge.d.ts +2 -3
- package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +2 -2
- package/lib/typescript/module/components/Switch/Switch.d.ts +1 -1
- package/lib/typescript/module/components/Tabs/Tabs.d.ts +6 -7
- package/lib/typescript/module/components/Text/Text.d.ts +6 -7
- package/lib/typescript/module/components/Timeline/Timeline.d.ts +1 -1
- package/lib/typescript/module/components/Toast/Toast.d.ts +1 -1
- package/lib/typescript/module/components/Toast/ToastProvider.d.ts +2 -2
- package/lib/typescript/module/components/Tour/Tour.d.ts +2 -2
- package/lib/typescript/module/hooks/usePresenceMotion.d.ts +2 -2
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/initUI.d.ts +3 -3
- package/lib/typescript/module/theme/ThemeContext.d.ts +5 -3
- package/lib/typescript/module/theme/componentSizes.d.ts +40 -18
- package/lib/typescript/module/theme/index.d.ts +15 -17
- package/lib/typescript/module/theme/merge.d.ts +15 -2
- package/lib/typescript/module/theme/scale.d.ts +6 -4
- package/lib/typescript/module/theme/textStyle.d.ts +4 -17
- package/lib/typescript/module/theme/tokens.generated.d.ts +239 -92
- package/lib/typescript/module/theme/types.d.ts +104 -347
- package/lib/typescript/module/utils/color.d.ts +6 -2
- package/lib/typescript/module/utils/shadows.d.ts +2 -2
- package/package.json +8 -15
- package/lib/commonjs/theme/componentTokens.js +0 -1
- package/lib/commonjs/theme/retiredThemeKeys.js +0 -1
- package/lib/module/theme/componentTokens.js +0 -1
- package/lib/module/theme/retiredThemeKeys.js +0 -1
- package/lib/typescript/commonjs/theme/componentTokens.d.ts +0 -762
- package/lib/typescript/commonjs/theme/retiredThemeKeys.d.ts +0 -22
- package/lib/typescript/module/theme/componentTokens.d.ts +0 -762
- package/lib/typescript/module/theme/retiredThemeKeys.d.ts +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,Text,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{Chip}from"../Chip/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,range=(e,t,i=1)=>{const
|
|
1
|
+
"use strict";import{Fragment,useCallback,useMemo}from"react";import{StyleSheet,Text,useWindowDimensions,View}from"react-native";import{useReducedMotion}from"../../hooks/useReducedMotion.js";import{useTheme}from"../../theme/index.js";import{Chip}from"../Chip/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,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}=e,n=useTheme(),r=useReducedMotion(),{fontScale:a}=useWindowDimensions(),l=Math.min(Math.max(a,1),1.5),u=Math.round(40*l),m=useMemo(()=>buildStyles(n,u),[n,u]),d="list"===e.mode?e.items:void 0,h=useMemo(()=>d?.map(toItem),[d]),c="duration"===e.mode?e.minuteStep??1:1,p="duration"===e.mode?Math.max(0,Math.min(1439,Math.floor(e.maxMinutes??1/0))):0,b=Math.floor(p/60),f="duration"===e.mode?e.labels:void 0,x=f?.hours??"Hours",M=f?.minutes??"Minutes",y=f?.hourUnit??"hr",g=f?.minuteUnit??"min",_="duration"===e.mode?e.presets:void 0;for(const e of _??[])if(!Number.isInteger(e)||e<0||e>p||e%c!==0)throw new Error(`WheelPicker preset ${e} must be a whole number of minutes from 0 to ${p} in steps of ${c}.`);const S=useCallback(e=>{const t=e===b?p%60:59;return Math.floor(t/c)*c},[b,p,c]),w="duration"===e.mode?e.value:0,E=useMemo(()=>{const e=Number.isFinite(w)?w:0,t=Math.max(0,Math.min(p,e)),i=Math.floor(t/60),s=Math.round(t%60/c)*c;return{hour:i,minute:Math.min(S(i),s)}},[w,p,c,S]),j=useMemo(()=>"duration"===e.mode?range(0,b).map(e=>({value:e,label:String(e),accessibilityLabel:plural(e,"hour","hours")})):[],[e.mode,b]),I=S(E.hour),v=useMemo(()=>"duration"===e.mode?range(0,I,c).map(e=>({value:e,label:String(e).padStart(2,"0"),accessibilityLabel:plural(e,"minute","minutes")})):[],[e.mode,I,c]),T=useMemo(()=>"list"===e.mode?[{key:"list",label:e.label??"Value",items:h??[],value:e.value??"",width:e.width}]:"duration"===e.mode?[{key:"hours",label:x,items:j,value:E.hour,unit:y,gapAfter:n.space.md},{key:"minutes",label:M,items:v,value:E.minute,unit:g}]:e.columns,[e,h,j,v,E,x,M,y,g,n.space.md]),{onChange:W}=e,C=useCallback((t,i)=>{const s=t.items[i];if(s&&W)if("list"===e.mode)W(s.value);else if("duration"===e.mode){const e=Number(s.value),i=W;"hours"===t.key?i(60*e+Math.min(E.minute,S(e))):i(60*E.hour+e)}else W(t.key,s.value)},[W,e.mode,E,S]),k=useCallback(e=>{W?.(e)},[W]),L=60*E.hour+E.minute,F=_jsxs(View,{style:[m.wheels,o],testID:s,children:[_jsxs(View,{pointerEvents:"none",style:m.selectionBand,children:[_jsx(View,{style:m.bandLine}),_jsx(View,{style:m.bandLine})]}),T.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=>C(s,e),itemHeight:u,width:s.width??("list"===e.mode?void 0:64),theme:n,haptic:t,disabled:i,reducedMotion:r,typeable:"duration"===e.mode,testID:s.testID}),s.unit?_jsx(Text,{style:m.unit,maxFontSizeMultiplier:1.5,numberOfLines:1,accessible:!1,importantForAccessibility:"no","aria-hidden":!0,children:s.unit}):null,s.separator?_jsx(Text,{style:m.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 _&&0!==_.length?_jsxs(View,{children:[F,_jsx(View,{style:m.presets,children:_.map(e=>_jsx(Chip,{label:formatPreset(e,y,g),size:"sm",selected:e===L,disabled:i,onPress:()=>k(e)},e))})]}):F},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:{fontSize:e.text["2xl"].size,fontWeight:e.weight.bold,color:e.colors["text-body"],paddingHorizontal:e.space.xs},unit:{fontSize:e.text.base.size,fontWeight:e.weight.semibold,color:e.colors["text-muted"],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{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{Gesture}from"react-native-gesture-handler";import{createAnimatedValue,setNativeValue,useTheme}from"../theme/index.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:
|
|
1
|
+
"use strict";import{useMemo,useRef}from"react";import{Animated,Easing}from"react-native";import{Gesture}from"react-native-gesture-handler";import{createAnimatedValue,setNativeValue,useTheme}from"../theme/index.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:s},n,r)=>{const{snappy:i}=n.spring,springBack=()=>Animated.spring(e,{toValue:0,damping:i.damping,stiffness:i.stiffness,mass:i.mass,useNativeDriver:!0}).start(),o=!0===r?.reduced?s:void 0,u=r?.duration("default")??n.duration.default;return{move:t=>{setNativeValue(e,Math.max(0,t))},release:(s,r)=>{if(s>100||r>.5){if(o)return void Animated.timing(o,{toValue:0,duration:u,easing:Easing.bezier(...n.ease.accelerate),useNativeDriver:!0}).start(()=>a());Animated.timing(e,{toValue:"function"==typeof t?t():t,duration:n.duration.fast,easing:Easing.bezier(...n.ease.accelerate),useNativeDriver:!0}).start(()=>a())}else springBack()},cancel:springBack}};export const useDragToDismiss=e=>{const{drag:t,travel:a,onDismiss:s,contentAtTop:n,scrollGesture:r}=e,{motion:i}=useTheme(),o=usePresenceMotion(),u=useRef(createAnimatedValue(1)).current;return useMemo(()=>{const e=createDragToDismissController({drag:t,travel:a,onDismiss:s,opacity:u},i,o),l=Gesture.Pan().runOnJS(!0).activeOffsetY(6).failOffsetX([-12,12]).onUpdate(t=>e.move(t.translationY)).onEnd(t=>e.release(t.translationY,t.velocityY/1e3)).onFinalize((_e,t)=>{t||e.cancel()});let c=0,m=!1;const f=Gesture.Pan().runOnJS(!0).activeOffsetY(8).failOffsetX([-12,12]).onBegin(()=>{c=0,m=!1}).onUpdate(t=>{if(!m){if(n&&!n())return;m=!0,c=t.translationY}e.move(t.translationY-c)}).onEnd(t=>{m&&e.release(t.translationY-c,t.velocityY/1e3)}).onFinalize((_e,t)=>{!t&&m&&e.cancel()});return r&&f.simultaneousWithExternalGesture(r),{handleGesture:l,sheetGesture:f,opacity:u}},[t,a,s,n,r,i,o,u])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useCallback,useMemo,useRef}from"react";import{Easing,Animated as RNAnimated}from"react-native";import{useTheme}from"../theme/index.js";import{createAnimatedValue}from"../theme/animatedValue.js";import{usePresenceMotion}from"./usePresenceMotion.js";export const PRESS_ANIMATION_PRESETS=["scale","bounce","fade","sink","pulse"];const FADE_TO=.6,SINK_BY=2,PULSE_TO=1.05,DEFAULT_SCALE_TO={scale:.97,bounce:.92,fade:1,sink:1,pulse:1};export const usePressAnimation=({preset:e="scale",scaleTo:a,pressDuration:s,enabled:t=!0}={})=>{const n=useTheme(),i=usePresenceMotion(),r=useRef(createAnimatedValue(1)).current,o=useRef(createAnimatedValue(1)).current,c=useRef(createAnimatedValue(0)).current,u=i.reduced?"fade":e,m=a??DEFAULT_SCALE_TO[u],l=s??i.duration("fast"),
|
|
1
|
+
"use strict";import{useCallback,useMemo,useRef}from"react";import{Easing,Animated as RNAnimated}from"react-native";import{useTheme}from"../theme/index.js";import{createAnimatedValue}from"../theme/animatedValue.js";import{usePresenceMotion}from"./usePresenceMotion.js";export const PRESS_ANIMATION_PRESETS=["scale","bounce","fade","sink","pulse"];const FADE_TO=.6,SINK_BY=2,PULSE_TO=1.05,DEFAULT_SCALE_TO={scale:.97,bounce:.92,fade:1,sink:1,pulse:1};export const usePressAnimation=({preset:e="scale",scaleTo:a,pressDuration:s,enabled:t=!0}={})=>{const n=useTheme(),i=usePresenceMotion(),r=useRef(createAnimatedValue(1)).current,o=useRef(createAnimatedValue(1)).current,c=useRef(createAnimatedValue(0)).current,u=i.reduced?"fade":e,m=a??DEFAULT_SCALE_TO[u],l=s??i.duration("fast"),p=useCallback((e,a,s)=>RNAnimated.timing(e,{toValue:a,duration:l,easing:Easing.bezier(...s),useNativeDriver:!0}),[l]),d=useCallback((e,a,s)=>RNAnimated.spring(e,{toValue:a,damping:n.motion.spring[s].damping,stiffness:n.motion.spring[s].stiffness,mass:n.motion.spring[s].mass,useNativeDriver:!0}),[n]),f=useCallback(()=>{if(t)switch(u){case"scale":case"bounce":p(r,m,n.motion.ease["in-out"]).start();break;case"fade":p(o,.6,n.motion.ease["in-out"]).start();break;case"sink":p(c,2,n.motion.ease["in-out"]).start()}},[t,u,m,r,o,c,n,p]),b=useCallback(()=>{if(t)switch(u){case"scale":d(r,1,"snappy").start();break;case"bounce":d(r,1,"bouncy").start();break;case"fade":p(o,1,n.motion.ease.decelerate).start();break;case"sink":d(c,0,"snappy").start()}},[t,u,r,o,c,n,p,d]),A=useCallback(()=>{t&&"pulse"===u&&RNAnimated.sequence([RNAnimated.timing(r,{toValue:1.05,duration:n.motion.duration.instant,easing:Easing.bezier(...n.motion.ease.accelerate),useNativeDriver:!0}),d(r,1,"snappy")]).start()},[t,u,r,n,d]),k=useMemo(()=>({transform:[{scale:r},{translateY:c}],opacity:o}),[r,c,o]);return{scale:r,opacity:o,translateY:c,style:k,pressIn:f,pressOut:b,press:A}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Logger}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Platform,RefreshControl}from"react-native";import{useTheme}from"../theme/index.js";import{announce}from"../utils/announce.js";import{resolveHaptic,triggerHaptic}from"../utils/hapticUtils.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MIN_VISIBLE_MS=400;export const useRefreshControl=e=>{const{onRefresh:r,refreshing:t=!1,haptic:
|
|
1
|
+
"use strict";import{Logger}from"@webority/mobile-core";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{Platform,RefreshControl}from"react-native";import{useTheme}from"../theme/index.js";import{announce}from"../utils/announce.js";import{resolveHaptic,triggerHaptic}from"../utils/hapticUtils.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MIN_VISIBLE_MS=400;export const useRefreshControl=e=>{const{onRefresh:r,refreshing:t=!1,haptic:s,title:o,minVisibleMs:n=DEFAULT_MIN_VISIBLE_MS,labels:c}=e,u=useTheme(),[i,a]=useState(!1),l=useRef(!1),f=useRef(!0),m=useRef(null),h=useRef(r);h.current=r;const p=useRef(c);p.current=c;const g=useRef(n);g.current=n,useEffect(()=>(f.current=!0,()=>{f.current=!1,m.current?.release()}),[]);const R=useCallback(e=>new Promise(r=>{if(e<=0)return void r();const t=setTimeout(()=>{m.current=null,r()},e);m.current={release:()=>{clearTimeout(t),m.current=null,r()}}}),[]),b=useCallback(async e=>{if(l.current)return;l.current=!0,a(!0);const r=Date.now();e&&announce(p.current?.refreshing??"Refreshing");let t=!1;try{await h.current()}catch(e){t=!0,Logger.error("[@webority/mobile-ui] useRefreshControl: onRefresh failed.",e)}f.current&&await R(g.current-(Date.now()-r)),l.current=!1,f.current&&(a(!1),e&&!t&&announce(p.current?.refreshed??"Updated"))},[R]),C="android"===Platform.OS?"gestureStart":null,d=void 0===s?C:resolveHaptic(s,"gestureStart"),y=useCallback(()=>{l.current||(d&&triggerHaptic(d),b(!1))},[d,b]),S=useCallback(()=>b(!0),[b]),x=useMemo(()=>({accessibilityActions:[{name:"refresh",label:c?.refresh??"Refresh"}],onAccessibilityAction:e=>{"refresh"===e.nativeEvent.actionName&&b(!0)}}),[c?.refresh,b]),M=i||t;return{refreshControl:useMemo(()=>_jsx(RefreshControl,{refreshing:M,onRefresh:y,tintColor:u.colors.primary,colors:[u.colors.primary],progressBackgroundColor:u.colors.surface,title:o,titleColor:u.colors["text-muted"]}),[M,y,o,u.colors.primary,u.colors.surface,u.colors["text-muted"]]),refreshing:M,refresh:S,accessibilityProps:x}};
|
package/lib/module/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESENCE_REDUCE_MOTION,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFieldChain,useFlickGuard,usePresenceMotion,usePressAnimation,useReducedMotion,useRefreshControl,useScrollDirection,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{darkTheme,
|
|
1
|
+
"use strict";export*from"./components/index.js";export{APP_ICON_SIZES,AppIcon,CURATED_ICON_NAMES,defaultIcons,ICON_NAMES,ICONSAX_SUFFIX,renderSlotIcon}from"./components/AppIcon/index.js";export{deletePath,Form,getPath,HookFormField,isFieldFilled,rules,setPath,useField,useFieldArray,useForm,useFormCompletion,useFormContext,useHookFormField,useOptionalFormContext}from"./form/index.js";export{FLICK_TOLERANCE,PRESENCE_REDUCE_MOTION,PRESS_ANIMATION_PRESETS,useControllableState,useDebounce,useFieldChain,useFlickGuard,usePresenceMotion,usePressAnimation,useReducedMotion,useRefreshControl,useScrollDirection,useToggle}from"./hooks/index.js";export{initUI}from"./initUI.js";export{NetworkStatusBanner}from"./network/index.js";export{COLOR_NAMES,DURATION_NAMES,darkTheme,EASE_NAMES,FONT_NAMES,getColorMode,getTheme,LEADING_NAMES,LETTER_SPACING_NAMES,lightTheme,mergeBrand,RADIUS_NAMES,radiusOf,resetTheme,resolveBadgeSize,resolveButtonSize,resolveCheckboxSize,resolveChipSize,resolveEmptyStateSize,resolveFieldSize,resolveFloatingActionButtonSize,resolveListItemSize,resolveOtpInputSize,resolveRadioSize,resolveSegmentedControlSize,resolveSliderSize,resolveSwitchSize,resolveTabsSize,SHADOW_NAMES,SIZE_NAMES,SPACE_NAMES,setColorMode,setTheme,spaceOf,subscribeTheme,TEXT_NAMES,ThemeProvider,textOf,useTheme,useThemeMode,WEIGHT_NAMES}from"./theme/index.js";export{announce,Breakpoints,configureFeedback,feedback,hapticForIntent,isFeedbackEnabled,isScreenSize,isTablet,Responsive,ScreenDimensions,SQUIRCLE_MIN_RADIUS,SQUIRCLE_SMOOTHING,setHapticImplementation,shadowStyle,smoothCorners,squircleApplies,squircleHostRadius,squirclePath,triggerHaptic,useScreenDimensions,warnUnknownProps}from"./utils/index.js";
|
package/lib/module/initUI.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{setColorMode,setTheme}from"./theme/index.js";export const initUI=(e={})=>{e.defaultMode&&setColorMode(e.defaultMode),e.
|
|
1
|
+
"use strict";import{setColorMode,setTheme}from"./theme/index.js";export const initUI=(e={})=>{e.defaultMode&&setColorMode(e.defaultMode),(e.brand||e.settings)&&setTheme(e.brand,e.settings)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{useNetworkStatus}from"@webority/mobile-core";import{useEffect,useMemo,useRef,useState}from"react";import{Animated,StyleSheet,Text}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePresenceMotion}from"../hooks/usePresenceMotion.js";import{fontFor,useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const NetworkStatusBanner=({message:e="You are offline. Some features may be unavailable.",position:t="top",style:o,disabled:
|
|
1
|
+
"use strict";import{useNetworkStatus}from"@webority/mobile-core";import{useEffect,useMemo,useRef,useState}from"react";import{Animated,StyleSheet,Text}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import{usePresenceMotion}from"../hooks/usePresenceMotion.js";import{fontFor,useTheme}from"../theme/index.js";import{jsx as _jsx}from"react/jsx-runtime";export const NetworkStatusBanner=({message:e="You are offline. Some features may be unavailable.",position:t="top",style:o,disabled:a=!1,safeArea:n=!0})=>{const i=useTheme(),r=usePresenceMotion(),s=useSafeAreaInsets(),u=n?"top"===t?s.top:s.bottom:0,[l,m]=useState(0),c=l>0?l:56+u,{isConnected:d,isInternetReachable:p}=useNetworkStatus(),f=!(a||d&&!1!==p),b=useRef(new Animated.Value(0)).current,g=useRef(new Animated.Value(0)).current,S=r.duration("default");useEffect(()=>{Animated.parallel([Animated.timing(b,{toValue:f?1:0,duration:i.motion.duration.default,useNativeDriver:!0}),Animated.timing(g,{toValue:f?1:0,duration:S,useNativeDriver:!0})]).start()},[f,b,g,i.motion.duration.default,S]);const x=useMemo(()=>buildStyles(i),[i]),y=b.interpolate({inputRange:[0,1],outputRange:r.range("top"===t?-c:c,0)});return _jsx(Animated.View,{pointerEvents:f?"auto":"none",accessibilityRole:"alert",accessibilityLiveRegion:f?"polite":"none",onLayout:e=>m(e.nativeEvent.layout.height),style:[x.container,"top"===t?x.top:x.bottom,"top"===t?{paddingTop:i.space.sm+u}:{paddingBottom:i.space.sm+u},{backgroundColor:i.colors.danger,opacity:g,transform:[{translateY:y}]},o],children:_jsx(Text,{style:{color:i.colors["on-danger"],fontSize:i.text.sm.size,...fontFor(i,"semibold"),textAlign:"center"},numberOfLines:2,children:e})})};const buildStyles=e=>StyleSheet.create({container:{position:"absolute",left:0,right:0,paddingVertical:e.space.sm,paddingHorizontal:e.space.lg,zIndex:1e3,elevation:8},top:{top:0},bottom:{bottom:0}});export default NetworkStatusBanner;
|
|
@@ -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{
|
|
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:s,settings:n,...m}=e;if(Object.keys(m).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[a,i]=useState(r),c=useRef(!1);useEffect(()=>{if(!o)return;let e=!0;return Storage.getItem(o).then(t=>{e&&!c.current&&isPreference(t)&&i(t)}),()=>{e=!1}},[o]);const u=useCallback(e=>{c.current=!0,i(e)},[]);useEffect(()=>{o&&c.current&&Storage.setItem(o,a)},[o,a]);const[l,d]=useState(()=>Appearance.getColorScheme()??"light");useEffect(()=>{const e=Appearance.addChangeListener(({colorScheme:e})=>{d(e??"light")});return()=>e.remove()},[]);const f="system"===a?l:a,h=useReducedMotion(),g=useMemo(()=>{const e="dark"===f?darkTheme:lightTheme,t=s||n?mergeBrand(e,s,n):e;return h?{...t,motion:collapseMotion(t.motion)}:t},[f,s,n,h]),p=useMemo(()=>({theme:g,mode:f,preference:a,setPreference:u,toggleColorMode:()=>u(e=>"system"===e?"dark"===l?"light":"dark":"dark"===e?"light":"dark")}),[g,f,a,l,u]);return _jsx(ThemeContext.Provider,{value:p,children:t})};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{
|
|
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,o,t)=>{const s=COMPONENT_KINDS[e][o];if(!s)throw new Error(`components.${e}${t?`.${t}`:""}.${o} has no kind in COMPONENT_KINDS.`);return s},pixelsOf=(e,o,t,s)=>{if("space"===o||"text"===o||"radius"===o)return scaleStep(e,o,String(t),s);if("number"!=typeof t)throw new Error(`${s} is ${JSON.stringify(t)}; it takes a number.`);return t},resolveSize=(e,o,t)=>{const s=e.components[o][t],r={};for(const i of Object.keys(s))r[i]=pixelsOf(e,kindOf(o,i,t),s[i],`components.${o}.${t}.${i}`);return r};export const resolveButtonSize=(e,o)=>resolveSize(e,"button",o);export const resolveFieldSize=(e,o)=>resolveSize(e,"field",o);export const resolveEmptyStateSize=(e,o)=>resolveSize(e,"empty-state",o);export const resolveListItemSize=(e,o)=>resolveSize(e,"list-item",o);export const resolveBadgeSize=(e,o)=>resolveSize(e,"badge",o);export const resolveChipSize=(e,o)=>resolveSize(e,"chip",o);export const resolveCheckboxSize=(e,o)=>resolveSize(e,"checkbox",o);export const resolveRadioSize=(e,o)=>resolveSize(e,"radio",o);export const resolveSwitchSize=(e,o)=>resolveSize(e,"switch",o);export const resolveOtpInputSize=(e,o)=>resolveSize(e,"otp-input",o);export const resolveSegmentedControlSize=(e,o)=>resolveSize(e,"segmented-control",o);export const resolveTabsSize=(e,o)=>resolveSize(e,"tabs",o);export const resolveSliderSize=(e,o)=>resolveSize(e,"slider",o);export const resolveFloatingActionButtonSize=(e,o)=>resolveSize(e,"floating-action-button",o);export const validateComponentTokens=e=>{for(const o of Object.keys(COMPONENT_KINDS)){const t=e.components[o];for(const s of Object.keys(t))SIZE_KEYS.includes(s)?resolveSize(e,o,s):pixelsOf(e,kindOf(o,s),t[s],`components.${o}.${s}`)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{
|
|
1
|
+
"use strict";import{mergeBrand}from"./merge.js";import{darkTheme,lightTheme}from"./tokens.js";let brandGlobal,settingsGlobal,currentMode="light",currentTheme=lightTheme;const subscribers=new Set,recompute=()=>{const e="dark"===currentMode?darkTheme:lightTheme;currentTheme=brandGlobal||settingsGlobal?mergeBrand(e,brandGlobal,settingsGlobal):e,subscribers.forEach(e=>e())};export const setTheme=(e,r)=>{brandGlobal=e,settingsGlobal=r,recompute()};export const setColorMode=e=>{currentMode=e,recompute()};export const getColorMode=()=>currentMode;export const getTheme=()=>currentTheme;export const resetTheme=()=>{currentMode="light",brandGlobal=void 0,settingsGlobal=void 0,recompute()};export const subscribeTheme=e=>(subscribers.add(e),()=>{subscribers.delete(e)});export{createAnimatedValue,setNativeValue}from"./animatedValue.js";export{resolveBadgeSize,resolveButtonSize,resolveCheckboxSize,resolveChipSize,resolveEmptyStateSize,resolveFieldSize,resolveFloatingActionButtonSize,resolveListItemSize,resolveOtpInputSize,resolveRadioSize,resolveSegmentedControlSize,resolveSliderSize,resolveSwitchSize,resolveTabsSize,validateComponentTokens}from"./componentSizes.js";export{Gradient,gradientAngle,toBackgroundImage}from"./Gradient.js";export{mergeBrand}from"./merge.js";export{radiusOf,spaceOf,textOf}from"./scale.js";export{ThemeProvider,useTheme,useThemeMode}from"./ThemeContext.js";export{fontFor}from"./textStyle.js";export{darkTheme,lightTheme}from"./tokens.js";export{COLOR_NAMES,DURATION_NAMES,EASE_NAMES,FONT_NAMES,LEADING_NAMES,LETTER_SPACING_NAMES,RADIUS_NAMES,SHADOW_NAMES,SIZE_NAMES,SPACE_NAMES,TEXT_NAMES,WEIGHT_NAMES}from"./tokens.generated.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{validateComponentTokens}from"./componentSizes.js";import{
|
|
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}},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}`);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];for(const o of Object.keys(t)){if(!COLOR_NAMES.includes(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&&!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(!RADIUS_NAMES.includes(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&&!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(!FONT_NAMES.includes(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(!WEIGHT_NAMES.includes(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(!SETTINGS_KEYS.includes(e))throw new Error(`Theme settings take ${SETTINGS_KEYS.join(", ")} only; ${e} is not allowed. ${HINT}`);const e=o.components;if(void 0===e)return;if(!isPlainObject(e))throw new Error(`Theme settings components is an object of component names; got ${typeof e}. ${HINT}`);const t=COMPONENT_SETTING_KEYS;for(const o of Object.keys(e)){if(!Object.keys(t).includes(o))throw new Error(`unknown component ${o} in theme settings; allowed: ${Object.keys(COMPONENT_SETTING_KEYS).join(", ")}. ${HINT}`);const n=e[o];if(void 0===n)continue;if(!isPlainObject(n))throw new Error(`theme settings for ${o} is an object; got ${typeof n}. ${HINT}`);const r=t[o];for(const e of Object.keys(n))if(!(e in r))throw new Error(`unknown setting ${e} for ${o}; allowed: ${Object.keys(r).join(", ")}. ${HINT}`)}},TONES=["primary","success","warning","danger","info"];export const mergeBrand=(o,e,t)=>{validateBrand(e),validateSettings(t);const n=Object.fromEntries(Object.entries(e?.colors?.[o.mode]??{}).filter(([,o])=>void 0!==o)),r={...o.colors,...n},i={...o.radius,...e?.radius},s={...o.font};for(const t of Object.keys(e?.font??{}))s[t]={...o.font[t],...e?.font?.[t]};const a=[r.bg,r["bg-subtle"],r["bg-muted"]],l={};for(const e of TONES){const t="string"==typeof n[e];let i=r[e];if(t||"string"==typeof n[`on-${e}`]){const o=deriveSolidFill(i,r[`on-${e}`]);o!==i&&(l[e]=o,i=o)}if(t&&"string"!=typeof n[`${e}-text`]&&(l[`${e}-text`]=deriveToneInk(i,a,o.mode)),"primary"===e&&(t||void 0!==l.primary)){const e=deriveStateFills(i,r["on-primary"],{fill:o.colors.primary,hover:o.colors["primary-hover"],pressed:o.colors["primary-pressed"]});"string"!=typeof n["primary-hover"]&&(l["primary-hover"]=e.hover),"string"!=typeof n["primary-pressed"]&&(l["primary-pressed"]=e.pressed)}}const c={},f=new Set([...Object.keys(o.settings.components),...Object.keys(t?.components??{})]);for(const e of f)c[e]={...o.settings.components[e],...t?.components?.[e]};const d=t?.maxFontSizeMultiplier??o.settings.maxFontSizeMultiplier,u={icons:{...o.settings.icons,...t?.icons},gradients:{...o.settings.gradients,...t?.gradients},textVariants:{...o.settings.textVariants,...t?.textVariants},components:c,...void 0===d?{}:{maxFontSizeMultiplier:d}},p={...o,colors:{...r,...l},radius:i,font:s,settings:u};return validateComponentTokens(p),p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";export const scaleStep=(e,t,s,r)=>{const c="space"===t?e.space:"radius"===t?e.radius:e.text,o=c[s],a="text"===t?o?.size:o;if("number"!=typeof a){const e=Object.keys(c).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 a};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);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export const fontFor=(t,o,i)=>{const n=t.font["display"===i?"display":"ui"][o];return n?{fontFamily:n}:{fontWeight:t.weight[o]}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const COLOR_NAMES=["bg","bg-subtle","bg-muted","surface","surface-inverse","text","text-body","text-muted","text-subtle","text-inverse","link","border","border-subtle","field-bg","field-border","field-border-focus","focus-ring","scrim","on-scrim","primary","primary-hover","primary-soft","primary-text","on-primary","neutral","neutral-hover","on-neutral","success","success-text","on-success","warning","warning-text","on-warning","danger","danger-border","danger-text","on-danger","info","info-text","on-info","primary-pressed","on-neutral-strong","text-disabled","surface-pressed","surface-hover","surface-selected","surface-disabled","skeleton","skeleton-highlight","glass-fill","glass-border","on-glass","glass-badge","field-bg-focus","field-bg-disabled","field-border-error","field-label","field-text","field-text-disabled","field-placeholder","field-placeholder-disabled","field-icon","field-icon-focus","field-icon-disabled","field-caret","field-message","avatar-1","avatar-2","avatar-3","avatar-4","avatar-5","avatar-6","avatar-7","avatar-8","thumb","success-soft","warning-soft","danger-soft","info-soft","neutral-text","primary-wash","primary-wash-strong"];export const SPACE_NAMES=["none","xxs","xs","sm","md","lg","xl","2xl","3xl","4xl"];export const RADIUS_NAMES=["none","sm","md","lg","xl","pill"];export const TEXT_NAMES=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl"];export const WEIGHT_NAMES=["normal","medium","semibold","bold"];export const LEADING_NAMES=["tight","normal","relaxed"];export const LETTER_SPACING_NAMES=["tight","normal","wide"];export const FONT_NAMES=["ui","display","mono"];export const SHADOW_NAMES=["card","elevated","popover","modal","drawer"];export const DURATION_NAMES=["instant","fast","default","slow","slower"];export const EASE_NAMES=["in-out","accelerate","decelerate","sharp"];export const SIZE_NAMES=["border"];
|
|
1
|
+
"use strict";export const COLOR_NAMES=["bg","bg-subtle","bg-muted","surface","surface-inverse","text","text-body","text-muted","text-subtle","text-inverse","link","border","border-subtle","field-bg","field-border","field-border-focus","focus-ring","scrim","on-scrim","thumb","primary","primary-hover","primary-soft","primary-text","on-primary","primary-wash","primary-wash-strong","neutral","neutral-hover","neutral-text","on-neutral","success","success-soft","success-text","on-success","warning","warning-soft","warning-text","on-warning","danger","danger-soft","danger-border","danger-text","on-danger","info","info-soft","info-text","on-info","primary-pressed","on-neutral-strong","text-disabled","surface-pressed","surface-hover","surface-selected","surface-disabled","skeleton","skeleton-highlight","glass-fill","glass-border","on-glass","glass-badge","field-bg-focus","field-bg-disabled","field-border-error","field-label","field-text","field-text-disabled","field-placeholder","field-placeholder-disabled","field-icon","field-icon-focus","field-icon-disabled","field-caret","field-message","avatar-1","avatar-2","avatar-3","avatar-4","avatar-5","avatar-6","avatar-7","avatar-8"];export const SPACE_NAMES=["none","xxs","xs","sm","md","lg","xl","2xl","3xl","4xl"];export const RADIUS_NAMES=["none","sm","md","lg","xl","pill"];export const TEXT_NAMES=["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl","8xl"];export const WEIGHT_NAMES=["normal","medium","semibold","bold"];export const LEADING_NAMES=["tight","normal","relaxed"];export const LETTER_SPACING_NAMES=["tight","normal","wide"];export const FONT_NAMES=["ui","display","mono"];export const SHADOW_NAMES=["card","elevated","popover","modal","drawer"];export const DURATION_NAMES=["instant","fast","default","slow","slower"];export const EASE_NAMES=["in-out","accelerate","decelerate","sharp"];export const SIZE_NAMES=["border"];export const COMPONENT_KINDS={field:{radius:"radius","padding-x":"space","padding-y":"space","min-height":"px",text:"text",icon:"px","label-text":"text","label-gap":"space","message-text":"text","message-gap":"space"},press:{opacity:"number"},disabled:{opacity:"number"},button:{"padding-x":"space","padding-y":"space","min-height":"px",text:"text",radius:"radius",icon:"px","badge-icon":"px"},input:{"multiline-min-height":"px"},"search-bar":{radius:"radius"},"empty-state":{icon:"px","title-text":"text","description-text":"text","padding-y":"space","title-gap":"space","description-gap":"space"},"list-item":{"padding-y":"space","title-text":"text","subtitle-text":"text","min-height":"px"},badge:{text:"text","min-width":"px",height:"px","padding-x":"space","dot-size":"px","border-width":"px","anchor-offset":"px"},chip:{"padding-x":"space","padding-y":"space",text:"text","min-height":"px","close-size":"px","close-text":"text",gap:"space",icon:"px"},checkbox:{"box-size":"px","label-gap":"space"},radio:{outer:"px",inner:"px","label-gap":"space"},switch:{"track-width":"px","track-height":"px","thumb-size":"px",padding:"space"},"otp-input":{cell:"px",text:"text",radius:"radius",gap:"space"},"segmented-control":{height:"px",text:"text","padding-x":"space",icon:"px","track-padding":"space","underline-height":"px","pill-inset":"space"},tabs:{text:"text","padding-y":"space","padding-x":"space","scrollable-padding-x":"space",icon:"px","icon-gap":"space","track-padding":"space","underline-height":"px","pill-inset":"space","disabled-opacity":"number","badge-gap":"space"},slider:{"track-height":"px","thumb-diameter":"px"},"floating-action-button":{diameter:"px",icon:"px",text:"text","label-padding-x":"space","edge-offset":"space","bottom-offset":"space","secondary-gap":"space","stagger-ms":"ms"},dialog:{"icon-wrapper-size":"px","action-button-min-height":"px"},toast:{"icon-circle-size":"px","icon-glyph-text":"text","tint-bar-width":"px","action-min-height":"px"},banner:{"tint-bar-width":"px"}};export const lightTokens={mode:"light",colors:{bg:"#ffffff","bg-subtle":"#f8f8fb","bg-muted":"#f1f1f5",surface:"#ffffff","surface-inverse":"#0f0f1a",text:"#252f4a","text-body":"#0f0f1a","text-muted":"#52525b","text-subtle":"#62626b","text-inverse":"#ffffff",link:"#5b5bd6",border:"#e5e5ec","border-subtle":"#efeff3","field-bg":"#f9fbfc","field-border":"#ebedf3","field-border-focus":"#bed2f9","focus-ring":"#5b5bd6",scrim:"#0f0f1a80","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#5b5bd6","primary-hover":"#4f4fbf","primary-soft":"#eeeefc","primary-text":"#4f4fd3","on-primary":"#ffffff","primary-wash":"#5b5bd614","primary-wash-strong":"#5b5bd633",neutral:"#f4f4f8","neutral-hover":"#e9e9f0","neutral-text":"#52525b","on-neutral":"#0f0f1a",success:"#18864f","success-soft":"#e8faee","success-text":"#147042","on-success":"#ffffff",warning:"#f59e0b","warning-soft":"#fff8e6","warning-text":"#8f5c06","on-warning":"#0f0f1a",danger:"#e12c32","danger-soft":"#ffeaef","danger-border":"#e5484d","danger-text":"#bc1b20","on-danger":"#ffffff",info:"#1b6ef5","info-soft":"#e9f3ff","info-text":"#0958d9","on-info":"#ffffff","primary-pressed":"#4040a8","on-neutral-strong":"#ffffff","text-disabled":"#b4b4bb","surface-pressed":"#0f0f1a0f","surface-hover":"#0f0f1a0a","surface-selected":"#5b5bd61a","surface-disabled":"#f1f1f5",skeleton:"#ebedf3","skeleton-highlight":"#f5f6fa","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#ffffff","field-bg-disabled":"#f5f6fa","field-border-error":"#fdbfce","field-label":"#242f4a","field-text":"#252f4a","field-text-disabled":"#c4cada","field-placeholder":"#626d8b","field-placeholder-disabled":"#c4cada","field-icon":"#7a849f","field-icon-focus":"#4b5675","field-icon-disabled":"#c4cada","field-caret":"#5b8dee","field-message":"#d81736","avatar-1":"#5b5bd6","avatar-2":"#0a7979","avatar-3":"#a45a05","avatar-4":"#cd226e","avatar-5":"#2462eb","avatar-6":"#7c3aed","avatar-7":"#047c57","avatar-8":"#d42222"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11,lineHeight:17},sm:{size:13,lineHeight:20},base:{size:15,lineHeight:23},lg:{size:17,lineHeight:24},xl:{size:20,lineHeight:26},"2xl":{size:24,lineHeight:30},"3xl":{size:30,lineHeight:36},"4xl":{size:36,lineHeight:40},"5xl":{size:45,lineHeight:47},"6xl":{size:57,lineHeight:57},"7xl":{size:64,lineHeight:64},"8xl":{size:72,lineHeight:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{tight:1.2,normal:1.4,relaxed:1.6},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.059,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.078,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.102,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.141,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0}}};export const darkTokens={mode:"dark",colors:{bg:"#0b0b12","bg-subtle":"#13131c","bg-muted":"#1c1c26",surface:"#1c1c26","surface-inverse":"#fafafa",text:"#e2e2e2","text-body":"#fafafa","text-muted":"#b4b4bb","text-subtle":"#919199","text-inverse":"#0f0f1a",link:"#9292ee",border:"#27272f","border-subtle":"#1c1c26","field-bg":"#13131c","field-border":"#27272f","field-border-focus":"#3d5fb0","focus-ring":"#7c7ce8",scrim:"#000000a6","on-scrim":"#ffffff",thumb:"#ffffff",primary:"#7c7ce8","primary-hover":"#9292ee","primary-soft":"#1f1f3d","primary-text":"#8989ea","on-primary":"#0f0f1a","primary-wash":"#7c7ce814","primary-wash-strong":"#7c7ce833",neutral:"#1f1f26","neutral-hover":"#2a2a33","neutral-text":"#b4b4bb","on-neutral":"#fafafa",success:"#30c780","success-soft":"#04b4402e","success-text":"#30c780","on-success":"#0f0f1a",warning:"#fbbf24","warning-soft":"#dfa0002e","warning-text":"#fbbf24","on-warning":"#0f0f1a",danger:"#f87171","danger-soft":"#e826462e","danger-border":"#f87171","danger-text":"#f87171","on-danger":"#0f0f1a",info:"#60a5fa","info-soft":"#056ee92e","info-text":"#60a5fa","on-info":"#0f0f1a","primary-pressed":"#a8a8f2","on-neutral-strong":"#0f0f1a","text-disabled":"#52525b","surface-pressed":"#ffffff14","surface-hover":"#ffffff0d","surface-selected":"#7c7ce82e","surface-disabled":"#1c1c26",skeleton:"#1c1c26","skeleton-highlight":"#27272f","glass-fill":"#ffffff47","glass-border":"#ffffff73","on-glass":"#0f0f1a","glass-badge":"#ffffff","field-bg-focus":"#0b0b12","field-bg-disabled":"#1c1c26","field-border-error":"#8a2f42","field-label":"#e4e6ee","field-text":"#fafafa","field-text-disabled":"#52525b","field-placeholder":"#84848d","field-placeholder-disabled":"#52525b","field-icon":"#8b8b95","field-icon-focus":"#d4d4db","field-icon-disabled":"#52525b","field-caret":"#7c9ef0","field-message":"#f87171","avatar-1":"#8b8bee","avatar-2":"#2dd4bf","avatar-3":"#fcd34d","avatar-4":"#f472b6","avatar-5":"#60a5fa","avatar-6":"#a78bfa","avatar-7":"#34d399","avatar-8":"#f87171"},space:{none:0,xxs:2,xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48,"4xl":64},radius:{none:0,sm:6,md:10,lg:14,xl:20,pill:9999},text:{xs:{size:11,lineHeight:17},sm:{size:13,lineHeight:20},base:{size:15,lineHeight:23},lg:{size:17,lineHeight:24},xl:{size:20,lineHeight:26},"2xl":{size:24,lineHeight:30},"3xl":{size:30,lineHeight:36},"4xl":{size:36,lineHeight:40},"5xl":{size:45,lineHeight:47},"6xl":{size:57,lineHeight:57},"7xl":{size:64,lineHeight:64},"8xl":{size:72,lineHeight:72}},weight:{normal:"400",medium:"500",semibold:"600",bold:"700"},leading:{tight:1.2,normal:1.4,relaxed:1.6},"letter-spacing":{tight:-.2,normal:0,wide:.4},font:{ui:{},display:{},mono:{}},shadow:{card:{shadowColor:"#000000",shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:2},elevated:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.502,shadowRadius:8,elevation:4},popover:{shadowColor:"#000000",shadowOffset:{width:0,height:8},shadowOpacity:.549,shadowRadius:16,elevation:8},modal:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12},drawer:{shadowColor:"#000000",shadowOffset:{width:0,height:12},shadowOpacity:.6,shadowRadius:24,elevation:12}},motion:{duration:{instant:80,fast:160,default:240,slow:360,slower:500},ease:{"in-out":[.4,0,.2,1],accelerate:[.4,0,1,1],decelerate:[0,0,.2,1],sharp:[.4,0,.6,1]}},size:{border:1},components:{field:{sm:{radius:"md","padding-x":"sm","padding-y":"sm","min-height":38,text:"sm",icon:14,"label-text":"xs","label-gap":"xs","message-text":"xs","message-gap":"xxs"},md:{radius:"md","padding-x":"md","padding-y":"md","min-height":44,text:"base",icon:16,"label-text":"sm","label-gap":"xs","message-text":"sm","message-gap":"xxs"},lg:{radius:"md","padding-x":"lg","padding-y":"lg","min-height":52,text:"lg",icon:18,"label-text":"base","label-gap":"xs","message-text":"base","message-gap":"xxs"}},press:{opacity:.85},disabled:{opacity:.55},button:{xs:{"padding-x":"sm","padding-y":"xs","min-height":28,text:"xs",radius:"md",icon:14,"badge-icon":11},sm:{"padding-x":"md","padding-y":"xs","min-height":34,text:"sm",radius:"md",icon:16,"badge-icon":16},md:{"padding-x":"lg","padding-y":"sm","min-height":44,text:"base",radius:"md",icon:18,"badge-icon":18},lg:{"padding-x":"xl","padding-y":"md","min-height":50,text:"lg",radius:"lg",icon:20,"badge-icon":20},xl:{"padding-x":"2xl","padding-y":"md","min-height":58,text:"xl",radius:"lg",icon:22,"badge-icon":22}},input:{sm:{"multiline-min-height":72},md:{"multiline-min-height":92},lg:{"multiline-min-height":110}},"search-bar":{sm:{radius:"pill"},md:{radius:"pill"},lg:{radius:"pill"}},"empty-state":{sm:{icon:48,"title-text":"lg","description-text":"sm","padding-y":"lg","title-gap":"md","description-gap":"xs"},md:{icon:64,"title-text":"xl","description-text":"base","padding-y":"xl","title-gap":"md","description-gap":"xs"},lg:{icon:80,"title-text":"2xl","description-text":"lg","padding-y":"2xl","title-gap":"md","description-gap":"xs"}},"list-item":{sm:{"padding-y":"sm","title-text":"sm","subtitle-text":"xs","min-height":44},md:{"padding-y":"md","title-text":"base","subtitle-text":"sm","min-height":56},lg:{"padding-y":"lg","title-text":"lg","subtitle-text":"base","min-height":72}},badge:{sm:{text:"xs","min-width":16,height:16,"padding-x":"xs","dot-size":8},md:{text:"sm","min-width":20,height:20,"padding-x":"sm","dot-size":10},"border-width":1.5,"anchor-offset":4},chip:{sm:{"padding-x":"sm","padding-y":"xs",text:"xs","min-height":26,"close-size":16,"close-text":"xs",gap:"xs",icon:14},md:{"padding-x":"md","padding-y":"xs",text:"sm","min-height":32,"close-size":18,"close-text":"sm",gap:"sm",icon:16}},checkbox:{sm:{"box-size":16},md:{"box-size":20},lg:{"box-size":24},"label-gap":"sm"},radio:{sm:{outer:16,inner:8},md:{outer:20,inner:10},lg:{outer:24,inner:12},"label-gap":"sm"},switch:{sm:{"track-width":42,"track-height":26,"thumb-size":22,padding:"xxs"},md:{"track-width":51,"track-height":31,"thumb-size":27,padding:"xxs"},lg:{"track-width":60,"track-height":36,"thumb-size":32,padding:"xxs"}},"otp-input":{sm:{cell:36,text:"base",radius:"sm",gap:"sm"},md:{cell:48,text:"xl",radius:"md",gap:"sm"},lg:{cell:56,text:"2xl",radius:"lg",gap:"md"}},"segmented-control":{sm:{height:32,text:"sm","padding-x":"sm",icon:14},md:{height:40,text:"base","padding-x":"md",icon:16},lg:{height:48,text:"lg","padding-x":"lg",icon:18},"track-padding":"xs","underline-height":2,"pill-inset":"xs"},tabs:{sm:{text:"sm","padding-y":"sm","padding-x":"xs","scrollable-padding-x":"md",icon:16},md:{text:"base","padding-y":"md","padding-x":"sm","scrollable-padding-x":"lg",icon:18},lg:{text:"lg","padding-y":"lg","padding-x":"md","scrollable-padding-x":"xl",icon:20},"icon-gap":"xs","track-padding":"xs","underline-height":2,"pill-inset":"xs","disabled-opacity":.45,"badge-gap":"xs"},slider:{sm:{"track-height":4,"thumb-diameter":24},md:{"track-height":6,"thumb-diameter":28},lg:{"track-height":8,"thumb-diameter":32}},"floating-action-button":{sm:{diameter:40,icon:18,text:"sm","label-padding-x":"md"},md:{diameter:56,icon:22,text:"base","label-padding-x":"lg"},lg:{diameter:72,icon:28,text:"lg","label-padding-x":"xl"},"edge-offset":"xl","bottom-offset":"xl","secondary-gap":"lg","stagger-ms":50},dialog:{"icon-wrapper-size":48,"action-button-min-height":44},toast:{"icon-circle-size":28,"icon-glyph-text":"lg","tint-bar-width":0,"action-min-height":30},banner:{"tint-bar-width":0}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{SQUIRCLE_SMOOTHING}from"../utils/squircle.js";
|
|
1
|
+
"use strict";import{SQUIRCLE_SMOOTHING}from"../utils/squircle.js";import{darkTokens,lightTokens}from"./tokens.generated.js";const SPRINGS={gentle:{damping:26,stiffness:240,mass:.9},bouncy:{damping:16,stiffness:200,mass:.7},snappy:{damping:20,stiffness:300,mass:.7}},compose=s=>({...s,motion:{...s.motion,spring:SPRINGS,fadeDuration:s.motion.duration.fast},cornerSmoothing:SQUIRCLE_SMOOTHING,settings:{icons:{},gradients:{},textVariants:{},components:{}}});export const lightTheme=compose(lightTokens);export const darkTheme=compose(darkTokens);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";export const ACCENT_PRESSED_TINT="rgba(0, 0, 0, 0.12)";export const tintOf=(t,
|
|
1
|
+
"use strict";export const ACCENT_PRESSED_TINT="rgba(0, 0, 0, 0.12)";export const tintOf=(t,r,e)=>{const s=/^#([0-9a-f]{6})$/i.exec(t);if(!s)return e;const a=Math.round(255*r).toString(16).padStart(2,"0");return`#${s[1]}${a}`};const channelsOf=t=>{const r=/^#([0-9a-f]{6})$/i.exec(t);if(!r)return null;const e=Number.parseInt(r[1],16);return[e>>16&255,e>>8&255,255&e]},rgbaOf=t=>{const r=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(t);if(r){const t=3===r[1].length?[...r[1]].map(t=>t+t).join(""):r[1],n=r=>Number.parseInt(t.slice(r,r+2),16);return[n(0),n(2),n(4),8===t.length?n(6)/255:1]}const e=/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+)\s*)?\)$/i.exec(t);return e?[Number(e[1]),Number(e[2]),Number(e[3]),void 0===e[4]?1:Number(e[4])]:null};export const withAlpha=(t,r)=>{const e=rgbaOf(t);return e?`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${r})`:null};export const transparentOf=t=>withAlpha(t,0)??"transparent";export const blendOf=(t,r,e,s)=>{const a=channelsOf(t),o=channelsOf(e);if(!a||!o)return s;return`#${a.map((t,e)=>Math.round(t*r+o[e]*(1-r))).map(t=>t.toString(16).padStart(2,"0")).join("")}`.toUpperCase()};
|
|
@@ -30,7 +30,7 @@ export interface AmountSliderProps {
|
|
|
30
30
|
*/
|
|
31
31
|
formatInput?: (value: number) => string;
|
|
32
32
|
/**
|
|
33
|
-
* Duration in ms of one digit roll. Default `theme.motion.duration.
|
|
33
|
+
* Duration in ms of one digit roll. Default `theme.motion.duration.default`,
|
|
34
34
|
* which the ThemeProvider collapses to 0 when the OS asks for reduced
|
|
35
35
|
* motion.
|
|
36
36
|
*/
|
|
@@ -10,7 +10,7 @@ export interface AnimatePresenceProps {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/** Enter/exit preset. Default `'fade'`. */
|
|
12
12
|
preset?: PresencePreset;
|
|
13
|
-
/** Animation duration (ms). Defaults to `theme.motion.duration.
|
|
13
|
+
/** Animation duration (ms). Defaults to `theme.motion.duration.default`. */
|
|
14
14
|
duration?: number;
|
|
15
15
|
style?: StyleProp<ViewStyle>;
|
|
16
16
|
testID?: string;
|
|
@@ -39,14 +39,14 @@ export interface AppBarProps {
|
|
|
39
39
|
onBack?: () => void;
|
|
40
40
|
/**
|
|
41
41
|
* The page gutter: the distance from the screen edge to the VISIBLE edge of the outermost
|
|
42
|
-
* glyph. The bar subtracts the empty space inside an action button (button
|
|
43
|
-
*
|
|
42
|
+
* glyph. The bar subtracts the empty space inside an action button (the 44 pt button minus
|
|
43
|
+
* the 24 pt icon, halved; the text padding for a text action). A
|
|
44
44
|
* `leading` or `trailing` node is taken to draw to its own edge. Default: the bar's own
|
|
45
|
-
* `
|
|
45
|
+
* `space.xs` padding.
|
|
46
46
|
*/
|
|
47
47
|
gutter?: number;
|
|
48
48
|
/**
|
|
49
|
-
* Title typography: a `Text` variant, or one registered in `theme.textVariants`.
|
|
49
|
+
* Title typography: a `Text` variant, or one registered in `theme.settings.textVariants`.
|
|
50
50
|
* Replaces the bar variant's size and weight. Default: the bar variant's own title style.
|
|
51
51
|
*/
|
|
52
52
|
titleVariant?: TextVariant | (string & {});
|
|
@@ -50,7 +50,7 @@ export interface AppIconProps {
|
|
|
50
50
|
name: AppIconName;
|
|
51
51
|
/** Size token or a pixel number. Default `'md'` (22). */
|
|
52
52
|
size?: AppIconSize | number;
|
|
53
|
-
/** Any colour string. Default `theme.colors
|
|
53
|
+
/** Any colour string. Default `theme.colors["text-body"]`. */
|
|
54
54
|
color?: string;
|
|
55
55
|
/** Iconsax style. Default `'linear'`. Names missing in a style fall back to linear. */
|
|
56
56
|
variant?: IconVariant;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* themselves: the password eye, the error glyph, SearchBar's magnifier and
|
|
4
4
|
* clear button, FilePicker's attachment, OptionSheet's selected tick. Every
|
|
5
5
|
* one is an AppIcon, so an app gets the design system's glyphs with zero
|
|
6
|
-
* setup; `theme.icons` still wins when an app registers its own.
|
|
6
|
+
* setup; `theme.settings.icons` still wins when an app registers its own.
|
|
7
7
|
*/
|
|
8
8
|
import type { IconRegistry } from "../../theme/types";
|
|
9
9
|
export declare const defaultIcons: Required<IconRegistry>;
|
|
@@ -33,8 +33,9 @@ export type AvatarStatusPosition = "topRight" | "bottomRight";
|
|
|
33
33
|
* in the tone, the soft Button's recipe. `neutral` is the quiet grey on
|
|
34
34
|
* primary text; `secondary` is the theme's secondary surface and its ink.
|
|
35
35
|
*/
|
|
36
|
-
export type AvatarTone = "neutral" | "primary" | "secondary" | "success" | "warning" | "
|
|
37
|
-
|
|
36
|
+
export type AvatarTone = "neutral" | "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
37
|
+
export declare const AVATAR_COLORS: readonly ["avatar-1", "avatar-2", "avatar-3", "avatar-4", "avatar-5", "avatar-6", "avatar-7", "avatar-8"];
|
|
38
|
+
/** The fill and the ink (the tone as text, the `<tone>-text` colour names) of an initials disc in a tone. Shared with ProfilePicker's placeholder. */
|
|
38
39
|
export declare const avatarToneColors: (theme: Theme, tone: AvatarTone) => {
|
|
39
40
|
background: string;
|
|
40
41
|
color: string;
|
|
@@ -63,8 +64,7 @@ export interface AvatarProps {
|
|
|
63
64
|
backgroundColor?: string;
|
|
64
65
|
color?: string;
|
|
65
66
|
/**
|
|
66
|
-
* Per-instance initials font size in pixels. Wins over
|
|
67
|
-
* (`avatar.fontSize` and `avatar.fontSizeRatio`) and the size-derived default.
|
|
67
|
+
* Per-instance initials font size in pixels. Wins over the size-derived default.
|
|
68
68
|
*/
|
|
69
69
|
fontSize?: number;
|
|
70
70
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import type { View as RNView, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
3
|
export type BadgeVariant = "standard" | "dot";
|
|
4
|
-
export type BadgeTone = "primary" | "success" | "warning" | "
|
|
4
|
+
export type BadgeTone = "primary" | "success" | "warning" | "danger" | "neutral" | "info";
|
|
5
5
|
export type BadgeSize = "sm" | "md";
|
|
6
6
|
export type BadgeAnchor = "topRight" | "topLeft" | "bottomRight" | "bottomLeft";
|
|
7
7
|
export interface BadgeProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import type { View as RNView, StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import type { HapticType } from "../../utils/hapticUtils";
|
|
4
|
-
export type BannerVariant = "info" | "success" | "warning" | "
|
|
4
|
+
export type BannerVariant = "info" | "success" | "warning" | "danger" | "neutral";
|
|
5
5
|
/**
|
|
6
6
|
* How assistive tech treats the banner. `'alert'` announces it as it appears
|
|
7
7
|
* (an error, a lost connection); `'summary'` and `'none'` are for a calm
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { View as RNView, StyleProp, ViewStyle } from "react-native";
|
|
18
18
|
import type { HapticType } from "../../utils";
|
|
19
|
-
export type BarChartTone = "primary" | "success" | "warning" | "
|
|
19
|
+
export type BarChartTone = "primary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
20
20
|
export interface BarChartDatum {
|
|
21
21
|
/** The full name of the bar, read aloud and written in the callout: "Mon 06-Oct-2026". */
|
|
22
22
|
label: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { View as RNView, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
3
|
import type { ScrollDirection } from "../../hooks/useScrollDirection";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ShadowName } from "../../theme/types";
|
|
5
5
|
import type { HapticType } from "../../utils";
|
|
6
6
|
import type { SlotIcon, SlotIconState } from "../AppIcon";
|
|
7
7
|
/**
|
|
@@ -35,7 +35,7 @@ export type BottomNavigationRadius = number | "pill";
|
|
|
35
35
|
*/
|
|
36
36
|
export type BottomNavigationIndicatorRadius = number | "auto";
|
|
37
37
|
/** Shadow under the bar surface: a theme shadow level, or `none`. */
|
|
38
|
-
export type BottomNavigationElevation =
|
|
38
|
+
export type BottomNavigationElevation = "none" | ShadowName;
|
|
39
39
|
export type TabBadge = number | string | boolean | null;
|
|
40
40
|
/** What a tab knows about itself when it draws its icon. */
|
|
41
41
|
export interface TabIconProps extends SlotIconState {
|
|
@@ -92,7 +92,7 @@ export interface BottomNavigationCenterAction {
|
|
|
92
92
|
size?: number;
|
|
93
93
|
/** Fill of the circle. Default the theme's `primary`. */
|
|
94
94
|
color?: string;
|
|
95
|
-
/** Ink of the icon in the circle. Default the theme's `
|
|
95
|
+
/** Ink of the icon in the circle. Default the theme's `on-primary`. */
|
|
96
96
|
iconColor?: string;
|
|
97
97
|
/** Pixel size of the icon in the circle. Default 24. */
|
|
98
98
|
iconSize?: number;
|
|
@@ -157,8 +157,8 @@ export interface BottomNavigationProps {
|
|
|
157
157
|
/**
|
|
158
158
|
* Corner radius of the active tab's background on the `pill`, `floating`,
|
|
159
159
|
* `solid`, `tile` and `expand` variants. `auto` (default) takes the bar's
|
|
160
|
-
* radius once one is set through `radius
|
|
161
|
-
*
|
|
160
|
+
* radius once one is set through `radius`, and stays fully round while
|
|
161
|
+
* none is. A number sets the background's own
|
|
162
162
|
* radius whatever the bar's. Capped at half the background's height, since
|
|
163
163
|
* Android squares off a larger radius, so a large number is fully round.
|
|
164
164
|
*/
|
|
@@ -170,14 +170,12 @@ export interface BottomNavigationProps {
|
|
|
170
170
|
*/
|
|
171
171
|
elevation?: BottomNavigationElevation;
|
|
172
172
|
/**
|
|
173
|
-
* Size of every tab icon in pixels. Default 18
|
|
174
|
-
* `components.bottomNavigation.iconSize`. The active pill follows it.
|
|
173
|
+
* Size of every tab icon in pixels. Default 18. The active pill follows it.
|
|
175
174
|
*/
|
|
176
175
|
iconSize?: number;
|
|
177
176
|
/**
|
|
178
177
|
* Air between the bar surface and the screen's left and right edges, in
|
|
179
|
-
* pixels, on every variant. Default 16
|
|
180
|
-
* `components.bottomNavigation.floatingMargin`.
|
|
178
|
+
* pixels, on every variant. Default 16.
|
|
181
179
|
*/
|
|
182
180
|
marginHorizontal?: number;
|
|
183
181
|
/**
|
|
@@ -185,7 +183,7 @@ export interface BottomNavigationProps {
|
|
|
185
183
|
* `floating` and `tile` capsules and 0 for a docked bar. Above zero it
|
|
186
184
|
* lifts any variant off the screen edge. Over a safe-area inset (a home
|
|
187
185
|
* indicator or Android's system buttons) the lift is the inset plus
|
|
188
|
-
* `theme.
|
|
186
|
+
* `theme.space.sm`, never less than this margin.
|
|
189
187
|
*/
|
|
190
188
|
marginVertical?: number;
|
|
191
189
|
/**
|
|
@@ -92,10 +92,10 @@ export interface BottomSheetProps {
|
|
|
92
92
|
scrollEventThrottle?: number;
|
|
93
93
|
/**
|
|
94
94
|
* @deprecated Backdrop opacity is now controlled by the theme token
|
|
95
|
-
* `colors.
|
|
95
|
+
* `colors.scrim` (alpha baked into the rgba value). Animated
|
|
96
96
|
* opacity on the backdrop was unreliable under Fabric view-flattening, so
|
|
97
97
|
* the scrim is now a static plain View. To tune dim level, override
|
|
98
|
-
* `theme.colors.
|
|
98
|
+
* `theme.colors.scrim` in your theme bridge.
|
|
99
99
|
*/
|
|
100
100
|
backdropOpacity?: number;
|
|
101
101
|
/**
|