@xleddyl/443-components-native 0.0.0-stage → 0.1.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 +454 -2
- package/assets/fonts/funnel-display/FunnelDisplay-Bold.ttf +0 -0
- package/assets/fonts/funnel-display/OFL.txt +93 -0
- package/assets/fonts/funnel-sans/FunnelSans-Bold.ttf +0 -0
- package/assets/fonts/funnel-sans/FunnelSans-Medium.ttf +0 -0
- package/assets/fonts/funnel-sans/FunnelSans-Regular.ttf +0 -0
- package/assets/fonts/funnel-sans/FunnelSans-SemiBold.ttf +0 -0
- package/assets/fonts/funnel-sans/OFL.txt +93 -0
- package/assets/fonts/index.d.ts +16 -0
- package/assets/fonts/index.js +18 -0
- package/assets/fonts/unbounded/OFL.txt +93 -0
- package/assets/fonts/unbounded/Unbounded-SemiBold.ttf +0 -0
- package/lib/module/components/core/Button.js +124 -0
- package/lib/module/components/core/Button.js.map +1 -0
- package/lib/module/components/core/DefaultIcon.js +541 -0
- package/lib/module/components/core/DefaultIcon.js.map +1 -0
- package/lib/module/components/core/FieldLabel.js +52 -0
- package/lib/module/components/core/FieldLabel.js.map +1 -0
- package/lib/module/components/core/Icon.js +67 -0
- package/lib/module/components/core/Icon.js.map +1 -0
- package/lib/module/components/core/IconButton.js +63 -0
- package/lib/module/components/core/IconButton.js.map +1 -0
- package/lib/module/components/core/Screen.js +140 -0
- package/lib/module/components/core/Screen.js.map +1 -0
- package/lib/module/components/core/Spinner.js +60 -0
- package/lib/module/components/core/Spinner.js.map +1 -0
- package/lib/module/components/core/Stack.js +60 -0
- package/lib/module/components/core/Stack.js.map +1 -0
- package/lib/module/components/core/Text.js +69 -0
- package/lib/module/components/core/Text.js.map +1 -0
- package/lib/module/components/core/TextField.js +191 -0
- package/lib/module/components/core/TextField.js.map +1 -0
- package/lib/module/components/core/Touchable.js +51 -0
- package/lib/module/components/core/Touchable.js.map +1 -0
- package/lib/module/components/core/buttonColors.js +33 -0
- package/lib/module/components/core/buttonColors.js.map +1 -0
- package/lib/module/components/core/field.js +41 -0
- package/lib/module/components/core/field.js.map +1 -0
- package/lib/module/components/core/index.js +14 -0
- package/lib/module/components/core/index.js.map +1 -0
- package/lib/module/components/display/Avatar.js +78 -0
- package/lib/module/components/display/Avatar.js.map +1 -0
- package/lib/module/components/display/AvatarGroup.js +55 -0
- package/lib/module/components/display/AvatarGroup.js.map +1 -0
- package/lib/module/components/display/Badge.js +77 -0
- package/lib/module/components/display/Badge.js.map +1 -0
- package/lib/module/components/display/Banner.js +91 -0
- package/lib/module/components/display/Banner.js.map +1 -0
- package/lib/module/components/display/Card.js +84 -0
- package/lib/module/components/display/Card.js.map +1 -0
- package/lib/module/components/display/Chip.js +122 -0
- package/lib/module/components/display/Chip.js.map +1 -0
- package/lib/module/components/display/DescriptionList.js +40 -0
- package/lib/module/components/display/DescriptionList.js.map +1 -0
- package/lib/module/components/display/Divider.js +65 -0
- package/lib/module/components/display/Divider.js.map +1 -0
- package/lib/module/components/display/EmptyState.js +69 -0
- package/lib/module/components/display/EmptyState.js.map +1 -0
- package/lib/module/components/display/KeyValue.js +53 -0
- package/lib/module/components/display/KeyValue.js.map +1 -0
- package/lib/module/components/display/List.js +156 -0
- package/lib/module/components/display/List.js.map +1 -0
- package/lib/module/components/display/ListItem.js +106 -0
- package/lib/module/components/display/ListItem.js.map +1 -0
- package/lib/module/components/display/ProgressBar.js +121 -0
- package/lib/module/components/display/ProgressBar.js.map +1 -0
- package/lib/module/components/display/ProgressRing.js +104 -0
- package/lib/module/components/display/ProgressRing.js.map +1 -0
- package/lib/module/components/display/Skeleton.js +146 -0
- package/lib/module/components/display/Skeleton.js.map +1 -0
- package/lib/module/components/display/Stat.js +112 -0
- package/lib/module/components/display/Stat.js.map +1 -0
- package/lib/module/components/display/Tag.js +14 -0
- package/lib/module/components/display/Tag.js.map +1 -0
- package/lib/module/components/display/index.js +20 -0
- package/lib/module/components/display/index.js.map +1 -0
- package/lib/module/components/forms/Calendar.js +162 -0
- package/lib/module/components/forms/Calendar.js.map +1 -0
- package/lib/module/components/forms/Checkbox.js +131 -0
- package/lib/module/components/forms/Checkbox.js.map +1 -0
- package/lib/module/components/forms/CheckboxGroup.js +59 -0
- package/lib/module/components/forms/CheckboxGroup.js.map +1 -0
- package/lib/module/components/forms/ChipInput.js +167 -0
- package/lib/module/components/forms/ChipInput.js.map +1 -0
- package/lib/module/components/forms/ControlLabel.js +37 -0
- package/lib/module/components/forms/ControlLabel.js.map +1 -0
- package/lib/module/components/forms/DateField.js +138 -0
- package/lib/module/components/forms/DateField.js.map +1 -0
- package/lib/module/components/forms/Field.js +61 -0
- package/lib/module/components/forms/Field.js.map +1 -0
- package/lib/module/components/forms/MonthPicker.js +124 -0
- package/lib/module/components/forms/MonthPicker.js.map +1 -0
- package/lib/module/components/forms/PeriodHeader.js +53 -0
- package/lib/module/components/forms/PeriodHeader.js.map +1 -0
- package/lib/module/components/forms/PinInput.js +167 -0
- package/lib/module/components/forms/PinInput.js.map +1 -0
- package/lib/module/components/forms/PinPad.js +147 -0
- package/lib/module/components/forms/PinPad.js.map +1 -0
- package/lib/module/components/forms/Radio.js +95 -0
- package/lib/module/components/forms/Radio.js.map +1 -0
- package/lib/module/components/forms/RadioGroup.js +59 -0
- package/lib/module/components/forms/RadioGroup.js.map +1 -0
- package/lib/module/components/forms/SegmentedControl.js +124 -0
- package/lib/module/components/forms/SegmentedControl.js.map +1 -0
- package/lib/module/components/forms/Slider.js +188 -0
- package/lib/module/components/forms/Slider.js.map +1 -0
- package/lib/module/components/forms/Stepper.js +103 -0
- package/lib/module/components/forms/Stepper.js.map +1 -0
- package/lib/module/components/forms/Switch.js +117 -0
- package/lib/module/components/forms/Switch.js.map +1 -0
- package/lib/module/components/forms/checkboxGroupContext.js +6 -0
- package/lib/module/components/forms/checkboxGroupContext.js.map +1 -0
- package/lib/module/components/forms/dateUtils.js +37 -0
- package/lib/module/components/forms/dateUtils.js.map +1 -0
- package/lib/module/components/forms/fieldContext.js +24 -0
- package/lib/module/components/forms/fieldContext.js.map +1 -0
- package/lib/module/components/forms/groupLayout.js +8 -0
- package/lib/module/components/forms/groupLayout.js.map +1 -0
- package/lib/module/components/forms/index.js +19 -0
- package/lib/module/components/forms/index.js.map +1 -0
- package/lib/module/components/forms/radioGroupContext.js +6 -0
- package/lib/module/components/forms/radioGroupContext.js.map +1 -0
- package/lib/module/components/navigation/BackButton.js +70 -0
- package/lib/module/components/navigation/BackButton.js.map +1 -0
- package/lib/module/components/navigation/Header.js +216 -0
- package/lib/module/components/navigation/Header.js.map +1 -0
- package/lib/module/components/navigation/TabBar.js +165 -0
- package/lib/module/components/navigation/TabBar.js.map +1 -0
- package/lib/module/components/navigation/TabBarItem.js +96 -0
- package/lib/module/components/navigation/TabBarItem.js.map +1 -0
- package/lib/module/components/navigation/Tabs.js +276 -0
- package/lib/module/components/navigation/Tabs.js.map +1 -0
- package/lib/module/components/navigation/index.js +9 -0
- package/lib/module/components/navigation/index.js.map +1 -0
- package/lib/module/components/navigation/tabBarStore.js +11 -0
- package/lib/module/components/navigation/tabBarStore.js.map +1 -0
- package/lib/module/components/navigation/tabBarUtils.js +19 -0
- package/lib/module/components/navigation/tabBarUtils.js.map +1 -0
- package/lib/module/components/navigation/useScrollOffset.js +14 -0
- package/lib/module/components/navigation/useScrollOffset.js.map +1 -0
- package/lib/module/components/overlays/ActionSheet.js +134 -0
- package/lib/module/components/overlays/ActionSheet.js.map +1 -0
- package/lib/module/components/overlays/ActionSheetHost.js +41 -0
- package/lib/module/components/overlays/ActionSheetHost.js.map +1 -0
- package/lib/module/components/overlays/Backdrop.js +53 -0
- package/lib/module/components/overlays/Backdrop.js.map +1 -0
- package/lib/module/components/overlays/Dialog.js +140 -0
- package/lib/module/components/overlays/Dialog.js.map +1 -0
- package/lib/module/components/overlays/DialogHost.js +116 -0
- package/lib/module/components/overlays/DialogHost.js.map +1 -0
- package/lib/module/components/overlays/LoadingHost.js +13 -0
- package/lib/module/components/overlays/LoadingHost.js.map +1 -0
- package/lib/module/components/overlays/LoadingOverlay.js +74 -0
- package/lib/module/components/overlays/LoadingOverlay.js.map +1 -0
- package/lib/module/components/overlays/Menu.js +40 -0
- package/lib/module/components/overlays/Menu.js.map +1 -0
- package/lib/module/components/overlays/MenuItem.js +89 -0
- package/lib/module/components/overlays/MenuItem.js.map +1 -0
- package/lib/module/components/overlays/Overlay.js +160 -0
- package/lib/module/components/overlays/Overlay.js.map +1 -0
- package/lib/module/components/overlays/OverlayHeader.js +55 -0
- package/lib/module/components/overlays/OverlayHeader.js.map +1 -0
- package/lib/module/components/overlays/OverlayHost.js +69 -0
- package/lib/module/components/overlays/OverlayHost.js.map +1 -0
- package/lib/module/components/overlays/Popover.js +149 -0
- package/lib/module/components/overlays/Popover.js.map +1 -0
- package/lib/module/components/overlays/Portal.js +101 -0
- package/lib/module/components/overlays/Portal.js.map +1 -0
- package/lib/module/components/overlays/Select.js +241 -0
- package/lib/module/components/overlays/Select.js.map +1 -0
- package/lib/module/components/overlays/SelectOptionRow.js +91 -0
- package/lib/module/components/overlays/SelectOptionRow.js.map +1 -0
- package/lib/module/components/overlays/Sheet.js +371 -0
- package/lib/module/components/overlays/Sheet.js.map +1 -0
- package/lib/module/components/overlays/Toast.js +311 -0
- package/lib/module/components/overlays/Toast.js.map +1 -0
- package/lib/module/components/overlays/ToastHost.js +94 -0
- package/lib/module/components/overlays/ToastHost.js.map +1 -0
- package/lib/module/components/overlays/UiProvider.js +68 -0
- package/lib/module/components/overlays/UiProvider.js.map +1 -0
- package/lib/module/components/overlays/actionColor.js +5 -0
- package/lib/module/components/overlays/actionColor.js.map +1 -0
- package/lib/module/components/overlays/actionSheetStore.js +21 -0
- package/lib/module/components/overlays/actionSheetStore.js.map +1 -0
- package/lib/module/components/overlays/anchorPosition.js +42 -0
- package/lib/module/components/overlays/anchorPosition.js.map +1 -0
- package/lib/module/components/overlays/dialogStore.js +27 -0
- package/lib/module/components/overlays/dialogStore.js.map +1 -0
- package/lib/module/components/overlays/index.js +24 -0
- package/lib/module/components/overlays/index.js.map +1 -0
- package/lib/module/components/overlays/loadingStore.js +61 -0
- package/lib/module/components/overlays/loadingStore.js.map +1 -0
- package/lib/module/components/overlays/overlayA11y.js +203 -0
- package/lib/module/components/overlays/overlayA11y.js.map +1 -0
- package/lib/module/components/overlays/overlayStore.js +48 -0
- package/lib/module/components/overlays/overlayStore.js.map +1 -0
- package/lib/module/components/overlays/portalStore.js +25 -0
- package/lib/module/components/overlays/portalStore.js.map +1 -0
- package/lib/module/components/overlays/sheetRegistry.js +15 -0
- package/lib/module/components/overlays/sheetRegistry.js.map +1 -0
- package/lib/module/components/overlays/sheetSnaps.js +27 -0
- package/lib/module/components/overlays/sheetSnaps.js.map +1 -0
- package/lib/module/components/overlays/toastStore.js +120 -0
- package/lib/module/components/overlays/toastStore.js.map +1 -0
- package/lib/module/components/overlays/useKeyboardOffset.js +29 -0
- package/lib/module/components/overlays/useKeyboardOffset.js.map +1 -0
- package/lib/module/hooks/index.js +7 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useControllableState.js +25 -0
- package/lib/module/hooks/useControllableState.js.map +1 -0
- package/lib/module/hooks/useLoop.js +31 -0
- package/lib/module/hooks/useLoop.js.map +1 -0
- package/lib/module/hooks/usePressFeedback.js +46 -0
- package/lib/module/hooks/usePressFeedback.js.map +1 -0
- package/lib/module/hooks/useSafeSpacing.js +13 -0
- package/lib/module/hooks/useSafeSpacing.js.map +1 -0
- package/lib/module/hooks/useSlidingIndicator.js +61 -0
- package/lib/module/hooks/useSlidingIndicator.js.map +1 -0
- package/lib/module/hooks/useToggleProgress.js +28 -0
- package/lib/module/hooks/useToggleProgress.js.map +1 -0
- package/lib/module/hooks/useWebThemeName.js +8 -0
- package/lib/module/hooks/useWebThemeName.js.map +1 -0
- package/lib/module/icons/SvgIcon.js +24 -0
- package/lib/module/icons/SvgIcon.js.map +1 -0
- package/lib/module/icons/createSvgIconRenderer.js +33 -0
- package/lib/module/icons/createSvgIconRenderer.js.map +1 -0
- package/lib/module/icons/heroicons.js +70 -0
- package/lib/module/icons/heroicons.js.map +1 -0
- package/lib/module/icons/index.js +6 -0
- package/lib/module/icons/index.js.map +1 -0
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/native/GlassGroup.js +33 -0
- package/lib/module/native/GlassGroup.js.map +1 -0
- package/lib/module/native/GlassSurface.js +64 -0
- package/lib/module/native/GlassSurface.js.map +1 -0
- package/lib/module/native/NativeBottomSheet.js +103 -0
- package/lib/module/native/NativeBottomSheet.js.map +1 -0
- package/lib/module/native/NativeButton.js +49 -0
- package/lib/module/native/NativeButton.js.map +1 -0
- package/lib/module/native/NativeContextMenu.js +99 -0
- package/lib/module/native/NativeContextMenu.js.map +1 -0
- package/lib/module/native/NativeDatePicker.js +184 -0
- package/lib/module/native/NativeDatePicker.js.map +1 -0
- package/lib/module/native/NativeForm.js +90 -0
- package/lib/module/native/NativeForm.js.map +1 -0
- package/lib/module/native/NativePicker.js +180 -0
- package/lib/module/native/NativePicker.js.map +1 -0
- package/lib/module/native/NativeProgress.android.js +45 -0
- package/lib/module/native/NativeProgress.android.js.map +1 -0
- package/lib/module/native/NativeProgress.ios.js +41 -0
- package/lib/module/native/NativeProgress.ios.js.map +1 -0
- package/lib/module/native/NativeProgress.js +8 -0
- package/lib/module/native/NativeProgress.js.map +1 -0
- package/lib/module/native/NativeProgress.types.js +4 -0
- package/lib/module/native/NativeProgress.types.js.map +1 -0
- package/lib/module/native/NativeSlider.js +98 -0
- package/lib/module/native/NativeSlider.js.map +1 -0
- package/lib/module/native/NativeSwitch.js +53 -0
- package/lib/module/native/NativeSwitch.js.map +1 -0
- package/lib/module/native/NativeTextField.js +124 -0
- package/lib/module/native/NativeTextField.js.map +1 -0
- package/lib/module/native/fallbacks/FallbackDatePicker.js +126 -0
- package/lib/module/native/fallbacks/FallbackDatePicker.js.map +1 -0
- package/lib/module/native/fallbacks/FallbackForm.js +85 -0
- package/lib/module/native/fallbacks/FallbackForm.js.map +1 -0
- package/lib/module/native/fallbacks/dateFormat.js +63 -0
- package/lib/module/native/fallbacks/dateFormat.js.map +1 -0
- package/lib/module/native/fromMaterialColors.js +42 -0
- package/lib/module/native/fromMaterialColors.js.map +1 -0
- package/lib/module/native/index.js +19 -0
- package/lib/module/native/index.js.map +1 -0
- package/lib/module/native/internal/BaseProgress.js +35 -0
- package/lib/module/native/internal/BaseProgress.js.map +1 -0
- package/lib/module/native/internal/ControlHost.js +62 -0
- package/lib/module/native/internal/ControlHost.js.map +1 -0
- package/lib/module/native/internal/IosDatePicker.ios.js +50 -0
- package/lib/module/native/internal/IosDatePicker.ios.js.map +1 -0
- package/lib/module/native/internal/IosDatePicker.js +4 -0
- package/lib/module/native/internal/IosDatePicker.js.map +1 -0
- package/lib/module/native/internal/IosDatePicker.types.js +4 -0
- package/lib/module/native/internal/IosDatePicker.types.js.map +1 -0
- package/lib/module/native/internal/LabeledControl.js +42 -0
- package/lib/module/native/internal/LabeledControl.js.map +1 -0
- package/lib/module/native/internal/NativeHostContext.js +6 -0
- package/lib/module/native/internal/NativeHostContext.js.map +1 -0
- package/lib/module/native/internal/availability.js +12 -0
- package/lib/module/native/internal/availability.js.map +1 -0
- package/lib/module/native/internal/hostTheme.js +6 -0
- package/lib/module/native/internal/hostTheme.js.map +1 -0
- package/lib/module/native/internal/platformModifiers.android.js +8 -0
- package/lib/module/native/internal/platformModifiers.android.js.map +1 -0
- package/lib/module/native/internal/platformModifiers.ios.js +6 -0
- package/lib/module/native/internal/platformModifiers.ios.js.map +1 -0
- package/lib/module/native/internal/platformModifiers.js +5 -0
- package/lib/module/native/internal/platformModifiers.js.map +1 -0
- package/lib/module/native/internal/platformModifiers.types.js +4 -0
- package/lib/module/native/internal/platformModifiers.types.js.map +1 -0
- package/lib/module/native/internal/withNativeFallback.js +13 -0
- package/lib/module/native/internal/withNativeFallback.js.map +1 -0
- package/lib/module/native/materialColors.types.js +4 -0
- package/lib/module/native/materialColors.types.js.map +1 -0
- package/lib/module/native/menuTypes.js +2 -0
- package/lib/module/native/menuTypes.js.map +1 -0
- package/lib/module/native/tabs/index.js +5 -0
- package/lib/module/native/tabs/index.js.map +1 -0
- package/lib/module/native/tabs/useNativeTabsTheme.js +41 -0
- package/lib/module/native/tabs/useNativeTabsTheme.js.map +1 -0
- package/lib/module/native/useLiquidGlass.js +42 -0
- package/lib/module/native/useLiquidGlass.js.map +1 -0
- package/lib/module/native/useNativeColors.android.js +9 -0
- package/lib/module/native/useNativeColors.android.js.map +1 -0
- package/lib/module/native/useNativeColors.js +5 -0
- package/lib/module/native/useNativeColors.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/presets/controller.js +52 -0
- package/lib/module/presets/controller.js.map +1 -0
- package/lib/module/presets/default.js +174 -0
- package/lib/module/presets/default.js.map +1 -0
- package/lib/module/presets/definePreset.js +39 -0
- package/lib/module/presets/definePreset.js.map +1 -0
- package/lib/module/presets/funnel.js +83 -0
- package/lib/module/presets/funnel.js.map +1 -0
- package/lib/module/presets/index.js +8 -0
- package/lib/module/presets/index.js.map +1 -0
- package/lib/module/presets/presets.js +31 -0
- package/lib/module/presets/presets.js.map +1 -0
- package/lib/module/presets/spotfish.js +103 -0
- package/lib/module/presets/spotfish.js.map +1 -0
- package/lib/module/presets/suedtirol.js +101 -0
- package/lib/module/presets/suedtirol.js.map +1 -0
- package/lib/module/presets/types.js +4 -0
- package/lib/module/presets/types.js.map +1 -0
- package/lib/module/presets/usePreset.js +38 -0
- package/lib/module/presets/usePreset.js.map +1 -0
- package/lib/module/theme/configureUi.js +35 -0
- package/lib/module/theme/configureUi.js.map +1 -0
- package/lib/module/theme/createTheme.js +21 -0
- package/lib/module/theme/createTheme.js.map +1 -0
- package/lib/module/theme/defaults.js +184 -0
- package/lib/module/theme/defaults.js.map +1 -0
- package/lib/module/theme/index.js +8 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/settings.js +40 -0
- package/lib/module/theme/settings.js.map +1 -0
- package/lib/module/theme/tones.js +24 -0
- package/lib/module/theme/tones.js.map +1 -0
- package/lib/module/theme/types.js +4 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/utils/a11y.js +25 -0
- package/lib/module/utils/a11y.js.map +1 -0
- package/lib/module/utils/createStore.js +27 -0
- package/lib/module/utils/createStore.js.map +1 -0
- package/lib/module/utils/fonts.js +39 -0
- package/lib/module/utils/fonts.js.map +1 -0
- package/lib/module/utils/hitSlop.js +13 -0
- package/lib/module/utils/hitSlop.js.map +1 -0
- package/lib/module/utils/index.js +4 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/math.js +20 -0
- package/lib/module/utils/math.js.map +1 -0
- package/lib/module/utils/refs.js +14 -0
- package/lib/module/utils/refs.js.map +1 -0
- package/lib/module/utils/statusIcon.js +10 -0
- package/lib/module/utils/statusIcon.js.map +1 -0
- package/lib/module/utils/styles.js +50 -0
- package/lib/module/utils/styles.js.map +1 -0
- package/lib/module/utils/types.js +4 -0
- package/lib/module/utils/types.js.map +1 -0
- package/lib/typescript/components/core/Button.d.ts +30 -0
- package/lib/typescript/components/core/Button.d.ts.map +1 -0
- package/lib/typescript/components/core/DefaultIcon.d.ts +11 -0
- package/lib/typescript/components/core/DefaultIcon.d.ts.map +1 -0
- package/lib/typescript/components/core/FieldLabel.d.ts +19 -0
- package/lib/typescript/components/core/FieldLabel.d.ts.map +1 -0
- package/lib/typescript/components/core/Icon.d.ts +21 -0
- package/lib/typescript/components/core/Icon.d.ts.map +1 -0
- package/lib/typescript/components/core/IconButton.d.ts +19 -0
- package/lib/typescript/components/core/IconButton.d.ts.map +1 -0
- package/lib/typescript/components/core/Screen.d.ts +36 -0
- package/lib/typescript/components/core/Screen.d.ts.map +1 -0
- package/lib/typescript/components/core/Spinner.d.ts +11 -0
- package/lib/typescript/components/core/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/core/Stack.d.ts +22 -0
- package/lib/typescript/components/core/Stack.d.ts.map +1 -0
- package/lib/typescript/components/core/Text.d.ts +16 -0
- package/lib/typescript/components/core/Text.d.ts.map +1 -0
- package/lib/typescript/components/core/TextField.d.ts +34 -0
- package/lib/typescript/components/core/TextField.d.ts.map +1 -0
- package/lib/typescript/components/core/Touchable.d.ts +15 -0
- package/lib/typescript/components/core/Touchable.d.ts.map +1 -0
- package/lib/typescript/components/core/buttonColors.d.ts +9 -0
- package/lib/typescript/components/core/buttonColors.d.ts.map +1 -0
- package/lib/typescript/components/core/field.d.ts +23 -0
- package/lib/typescript/components/core/field.d.ts.map +1 -0
- package/lib/typescript/components/core/index.d.ts +22 -0
- package/lib/typescript/components/core/index.d.ts.map +1 -0
- package/lib/typescript/components/display/Avatar.d.ts +33 -0
- package/lib/typescript/components/display/Avatar.d.ts.map +1 -0
- package/lib/typescript/components/display/AvatarGroup.d.ts +14 -0
- package/lib/typescript/components/display/AvatarGroup.d.ts.map +1 -0
- package/lib/typescript/components/display/Badge.d.ts +34 -0
- package/lib/typescript/components/display/Badge.d.ts.map +1 -0
- package/lib/typescript/components/display/Banner.d.ts +29 -0
- package/lib/typescript/components/display/Banner.d.ts.map +1 -0
- package/lib/typescript/components/display/Card.d.ts +35 -0
- package/lib/typescript/components/display/Card.d.ts.map +1 -0
- package/lib/typescript/components/display/Chip.d.ts +39 -0
- package/lib/typescript/components/display/Chip.d.ts.map +1 -0
- package/lib/typescript/components/display/DescriptionList.d.ts +23 -0
- package/lib/typescript/components/display/DescriptionList.d.ts.map +1 -0
- package/lib/typescript/components/display/Divider.d.ts +19 -0
- package/lib/typescript/components/display/Divider.d.ts.map +1 -0
- package/lib/typescript/components/display/EmptyState.d.ts +23 -0
- package/lib/typescript/components/display/EmptyState.d.ts.map +1 -0
- package/lib/typescript/components/display/KeyValue.d.ts +19 -0
- package/lib/typescript/components/display/KeyValue.d.ts.map +1 -0
- package/lib/typescript/components/display/List.d.ts +47 -0
- package/lib/typescript/components/display/List.d.ts.map +1 -0
- package/lib/typescript/components/display/ListItem.d.ts +38 -0
- package/lib/typescript/components/display/ListItem.d.ts.map +1 -0
- package/lib/typescript/components/display/ProgressBar.d.ts +27 -0
- package/lib/typescript/components/display/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/components/display/ProgressRing.d.ts +24 -0
- package/lib/typescript/components/display/ProgressRing.d.ts.map +1 -0
- package/lib/typescript/components/display/Skeleton.d.ts +18 -0
- package/lib/typescript/components/display/Skeleton.d.ts.map +1 -0
- package/lib/typescript/components/display/Stat.d.ts +29 -0
- package/lib/typescript/components/display/Stat.d.ts.map +1 -0
- package/lib/typescript/components/display/Tag.d.ts +4 -0
- package/lib/typescript/components/display/Tag.d.ts.map +1 -0
- package/lib/typescript/components/display/index.d.ts +35 -0
- package/lib/typescript/components/display/index.d.ts.map +1 -0
- package/lib/typescript/components/forms/Calendar.d.ts +45 -0
- package/lib/typescript/components/forms/Calendar.d.ts.map +1 -0
- package/lib/typescript/components/forms/Checkbox.d.ts +40 -0
- package/lib/typescript/components/forms/Checkbox.d.ts.map +1 -0
- package/lib/typescript/components/forms/CheckboxGroup.d.ts +27 -0
- package/lib/typescript/components/forms/CheckboxGroup.d.ts.map +1 -0
- package/lib/typescript/components/forms/ChipInput.d.ts +33 -0
- package/lib/typescript/components/forms/ChipInput.d.ts.map +1 -0
- package/lib/typescript/components/forms/ControlLabel.d.ts +11 -0
- package/lib/typescript/components/forms/ControlLabel.d.ts.map +1 -0
- package/lib/typescript/components/forms/DateField.d.ts +34 -0
- package/lib/typescript/components/forms/DateField.d.ts.map +1 -0
- package/lib/typescript/components/forms/Field.d.ts +24 -0
- package/lib/typescript/components/forms/Field.d.ts.map +1 -0
- package/lib/typescript/components/forms/MonthPicker.d.ts +32 -0
- package/lib/typescript/components/forms/MonthPicker.d.ts.map +1 -0
- package/lib/typescript/components/forms/PeriodHeader.d.ts +15 -0
- package/lib/typescript/components/forms/PeriodHeader.d.ts.map +1 -0
- package/lib/typescript/components/forms/PinInput.d.ts +38 -0
- package/lib/typescript/components/forms/PinInput.d.ts.map +1 -0
- package/lib/typescript/components/forms/PinPad.d.ts +45 -0
- package/lib/typescript/components/forms/PinPad.d.ts.map +1 -0
- package/lib/typescript/components/forms/Radio.d.ts +27 -0
- package/lib/typescript/components/forms/Radio.d.ts.map +1 -0
- package/lib/typescript/components/forms/RadioGroup.d.ts +27 -0
- package/lib/typescript/components/forms/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/components/forms/SegmentedControl.d.ts +32 -0
- package/lib/typescript/components/forms/SegmentedControl.d.ts.map +1 -0
- package/lib/typescript/components/forms/Slider.d.ts +29 -0
- package/lib/typescript/components/forms/Slider.d.ts.map +1 -0
- package/lib/typescript/components/forms/Stepper.d.ts +29 -0
- package/lib/typescript/components/forms/Stepper.d.ts.map +1 -0
- package/lib/typescript/components/forms/Switch.d.ts +37 -0
- package/lib/typescript/components/forms/Switch.d.ts.map +1 -0
- package/lib/typescript/components/forms/checkboxGroupContext.d.ts +8 -0
- package/lib/typescript/components/forms/checkboxGroupContext.d.ts.map +1 -0
- package/lib/typescript/components/forms/dateUtils.d.ts +14 -0
- package/lib/typescript/components/forms/dateUtils.d.ts.map +1 -0
- package/lib/typescript/components/forms/fieldContext.d.ts +32 -0
- package/lib/typescript/components/forms/fieldContext.d.ts.map +1 -0
- package/lib/typescript/components/forms/groupLayout.d.ts +8 -0
- package/lib/typescript/components/forms/groupLayout.d.ts.map +1 -0
- package/lib/typescript/components/forms/index.d.ts +33 -0
- package/lib/typescript/components/forms/index.d.ts.map +1 -0
- package/lib/typescript/components/forms/radioGroupContext.d.ts +11 -0
- package/lib/typescript/components/forms/radioGroupContext.d.ts.map +1 -0
- package/lib/typescript/components/navigation/BackButton.d.ts +24 -0
- package/lib/typescript/components/navigation/BackButton.d.ts.map +1 -0
- package/lib/typescript/components/navigation/Header.d.ts +48 -0
- package/lib/typescript/components/navigation/Header.d.ts.map +1 -0
- package/lib/typescript/components/navigation/TabBar.d.ts +93 -0
- package/lib/typescript/components/navigation/TabBar.d.ts.map +1 -0
- package/lib/typescript/components/navigation/TabBarItem.d.ts +40 -0
- package/lib/typescript/components/navigation/TabBarItem.d.ts.map +1 -0
- package/lib/typescript/components/navigation/Tabs.d.ts +48 -0
- package/lib/typescript/components/navigation/Tabs.d.ts.map +1 -0
- package/lib/typescript/components/navigation/index.d.ts +11 -0
- package/lib/typescript/components/navigation/index.d.ts.map +1 -0
- package/lib/typescript/components/navigation/tabBarStore.d.ts +3 -0
- package/lib/typescript/components/navigation/tabBarStore.d.ts.map +1 -0
- package/lib/typescript/components/navigation/tabBarUtils.d.ts +16 -0
- package/lib/typescript/components/navigation/tabBarUtils.d.ts.map +1 -0
- package/lib/typescript/components/navigation/useScrollOffset.d.ts +5 -0
- package/lib/typescript/components/navigation/useScrollOffset.d.ts.map +1 -0
- package/lib/typescript/components/overlays/ActionSheet.d.ts +28 -0
- package/lib/typescript/components/overlays/ActionSheet.d.ts.map +1 -0
- package/lib/typescript/components/overlays/ActionSheetHost.d.ts +2 -0
- package/lib/typescript/components/overlays/ActionSheetHost.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Backdrop.d.ts +12 -0
- package/lib/typescript/components/overlays/Backdrop.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Dialog.d.ts +38 -0
- package/lib/typescript/components/overlays/Dialog.d.ts.map +1 -0
- package/lib/typescript/components/overlays/DialogHost.d.ts +2 -0
- package/lib/typescript/components/overlays/DialogHost.d.ts.map +1 -0
- package/lib/typescript/components/overlays/LoadingHost.d.ts +2 -0
- package/lib/typescript/components/overlays/LoadingHost.d.ts.map +1 -0
- package/lib/typescript/components/overlays/LoadingOverlay.d.ts +16 -0
- package/lib/typescript/components/overlays/LoadingOverlay.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Menu.d.ts +20 -0
- package/lib/typescript/components/overlays/Menu.d.ts.map +1 -0
- package/lib/typescript/components/overlays/MenuItem.d.ts +24 -0
- package/lib/typescript/components/overlays/MenuItem.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Overlay.d.ts +34 -0
- package/lib/typescript/components/overlays/Overlay.d.ts.map +1 -0
- package/lib/typescript/components/overlays/OverlayHeader.d.ts +18 -0
- package/lib/typescript/components/overlays/OverlayHeader.d.ts.map +1 -0
- package/lib/typescript/components/overlays/OverlayHost.d.ts +2 -0
- package/lib/typescript/components/overlays/OverlayHost.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Popover.d.ts +47 -0
- package/lib/typescript/components/overlays/Popover.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Portal.d.ts +13 -0
- package/lib/typescript/components/overlays/Portal.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Select.d.ts +72 -0
- package/lib/typescript/components/overlays/Select.d.ts.map +1 -0
- package/lib/typescript/components/overlays/SelectOptionRow.d.ts +17 -0
- package/lib/typescript/components/overlays/SelectOptionRow.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Sheet.d.ts +64 -0
- package/lib/typescript/components/overlays/Sheet.d.ts.map +1 -0
- package/lib/typescript/components/overlays/Toast.d.ts +57 -0
- package/lib/typescript/components/overlays/Toast.d.ts.map +1 -0
- package/lib/typescript/components/overlays/ToastHost.d.ts +13 -0
- package/lib/typescript/components/overlays/ToastHost.d.ts.map +1 -0
- package/lib/typescript/components/overlays/UiProvider.d.ts +14 -0
- package/lib/typescript/components/overlays/UiProvider.d.ts.map +1 -0
- package/lib/typescript/components/overlays/actionColor.d.ts +3 -0
- package/lib/typescript/components/overlays/actionColor.d.ts.map +1 -0
- package/lib/typescript/components/overlays/actionSheetStore.d.ts +25 -0
- package/lib/typescript/components/overlays/actionSheetStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/anchorPosition.d.ts +36 -0
- package/lib/typescript/components/overlays/anchorPosition.d.ts.map +1 -0
- package/lib/typescript/components/overlays/dialogStore.d.ts +48 -0
- package/lib/typescript/components/overlays/dialogStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/index.d.ts +40 -0
- package/lib/typescript/components/overlays/index.d.ts.map +1 -0
- package/lib/typescript/components/overlays/loadingStore.d.ts +27 -0
- package/lib/typescript/components/overlays/loadingStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/overlayA11y.d.ts +18 -0
- package/lib/typescript/components/overlays/overlayA11y.d.ts.map +1 -0
- package/lib/typescript/components/overlays/overlayStore.d.ts +50 -0
- package/lib/typescript/components/overlays/overlayStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/portalStore.d.ts +17 -0
- package/lib/typescript/components/overlays/portalStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/sheetRegistry.d.ts +5 -0
- package/lib/typescript/components/overlays/sheetRegistry.d.ts.map +1 -0
- package/lib/typescript/components/overlays/sheetSnaps.d.ts +4 -0
- package/lib/typescript/components/overlays/sheetSnaps.d.ts.map +1 -0
- package/lib/typescript/components/overlays/toastStore.d.ts +63 -0
- package/lib/typescript/components/overlays/toastStore.d.ts.map +1 -0
- package/lib/typescript/components/overlays/useKeyboardOffset.d.ts +2 -0
- package/lib/typescript/components/overlays/useKeyboardOffset.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +6 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useControllableState.d.ts +9 -0
- package/lib/typescript/hooks/useControllableState.d.ts.map +1 -0
- package/lib/typescript/hooks/useLoop.d.ts +15 -0
- package/lib/typescript/hooks/useLoop.d.ts.map +1 -0
- package/lib/typescript/hooks/usePressFeedback.d.ts +18 -0
- package/lib/typescript/hooks/usePressFeedback.d.ts.map +1 -0
- package/lib/typescript/hooks/useSafeSpacing.d.ts +7 -0
- package/lib/typescript/hooks/useSafeSpacing.d.ts.map +1 -0
- package/lib/typescript/hooks/useSlidingIndicator.d.ts +14 -0
- package/lib/typescript/hooks/useSlidingIndicator.d.ts.map +1 -0
- package/lib/typescript/hooks/useToggleProgress.d.ts +3 -0
- package/lib/typescript/hooks/useToggleProgress.d.ts.map +1 -0
- package/lib/typescript/hooks/useWebThemeName.d.ts +2 -0
- package/lib/typescript/hooks/useWebThemeName.d.ts.map +1 -0
- package/lib/typescript/icons/SvgIcon.d.ts +9 -0
- package/lib/typescript/icons/SvgIcon.d.ts.map +1 -0
- package/lib/typescript/icons/createSvgIconRenderer.d.ts +10 -0
- package/lib/typescript/icons/createSvgIconRenderer.d.ts.map +1 -0
- package/lib/typescript/icons/heroicons.d.ts +3 -0
- package/lib/typescript/icons/heroicons.d.ts.map +1 -0
- package/lib/typescript/icons/index.d.ts +6 -0
- package/lib/typescript/icons/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native/GlassGroup.d.ts +11 -0
- package/lib/typescript/native/GlassGroup.d.ts.map +1 -0
- package/lib/typescript/native/GlassSurface.d.ts +18 -0
- package/lib/typescript/native/GlassSurface.d.ts.map +1 -0
- package/lib/typescript/native/NativeBottomSheet.d.ts +16 -0
- package/lib/typescript/native/NativeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/native/NativeButton.d.ts +17 -0
- package/lib/typescript/native/NativeButton.d.ts.map +1 -0
- package/lib/typescript/native/NativeContextMenu.d.ts +17 -0
- package/lib/typescript/native/NativeContextMenu.d.ts.map +1 -0
- package/lib/typescript/native/NativeDatePicker.d.ts +23 -0
- package/lib/typescript/native/NativeDatePicker.d.ts.map +1 -0
- package/lib/typescript/native/NativeForm.d.ts +21 -0
- package/lib/typescript/native/NativeForm.d.ts.map +1 -0
- package/lib/typescript/native/NativePicker.d.ts +22 -0
- package/lib/typescript/native/NativePicker.d.ts.map +1 -0
- package/lib/typescript/native/NativeProgress.android.d.ts +4 -0
- package/lib/typescript/native/NativeProgress.android.d.ts.map +1 -0
- package/lib/typescript/native/NativeProgress.d.ts +4 -0
- package/lib/typescript/native/NativeProgress.d.ts.map +1 -0
- package/lib/typescript/native/NativeProgress.ios.d.ts +4 -0
- package/lib/typescript/native/NativeProgress.ios.d.ts.map +1 -0
- package/lib/typescript/native/NativeProgress.types.d.ts +11 -0
- package/lib/typescript/native/NativeProgress.types.d.ts.map +1 -0
- package/lib/typescript/native/NativeSlider.d.ts +18 -0
- package/lib/typescript/native/NativeSlider.d.ts.map +1 -0
- package/lib/typescript/native/NativeSwitch.d.ts +15 -0
- package/lib/typescript/native/NativeSwitch.d.ts.map +1 -0
- package/lib/typescript/native/NativeTextField.d.ts +21 -0
- package/lib/typescript/native/NativeTextField.d.ts.map +1 -0
- package/lib/typescript/native/fallbacks/FallbackDatePicker.d.ts +14 -0
- package/lib/typescript/native/fallbacks/FallbackDatePicker.d.ts.map +1 -0
- package/lib/typescript/native/fallbacks/FallbackForm.d.ts +17 -0
- package/lib/typescript/native/fallbacks/FallbackForm.d.ts.map +1 -0
- package/lib/typescript/native/fallbacks/dateFormat.d.ts +7 -0
- package/lib/typescript/native/fallbacks/dateFormat.d.ts.map +1 -0
- package/lib/typescript/native/fromMaterialColors.d.ts +8 -0
- package/lib/typescript/native/fromMaterialColors.d.ts.map +1 -0
- package/lib/typescript/native/index.d.ts +32 -0
- package/lib/typescript/native/index.d.ts.map +1 -0
- package/lib/typescript/native/internal/BaseProgress.d.ts +3 -0
- package/lib/typescript/native/internal/BaseProgress.d.ts.map +1 -0
- package/lib/typescript/native/internal/ControlHost.d.ts +17 -0
- package/lib/typescript/native/internal/ControlHost.d.ts.map +1 -0
- package/lib/typescript/native/internal/IosDatePicker.d.ts +3 -0
- package/lib/typescript/native/internal/IosDatePicker.d.ts.map +1 -0
- package/lib/typescript/native/internal/IosDatePicker.ios.d.ts +3 -0
- package/lib/typescript/native/internal/IosDatePicker.ios.d.ts.map +1 -0
- package/lib/typescript/native/internal/IosDatePicker.types.d.ts +15 -0
- package/lib/typescript/native/internal/IosDatePicker.types.d.ts.map +1 -0
- package/lib/typescript/native/internal/LabeledControl.d.ts +14 -0
- package/lib/typescript/native/internal/LabeledControl.d.ts.map +1 -0
- package/lib/typescript/native/internal/NativeHostContext.d.ts +3 -0
- package/lib/typescript/native/internal/NativeHostContext.d.ts.map +1 -0
- package/lib/typescript/native/internal/availability.d.ts +2 -0
- package/lib/typescript/native/internal/availability.d.ts.map +1 -0
- package/lib/typescript/native/internal/hostTheme.d.ts +4 -0
- package/lib/typescript/native/internal/hostTheme.d.ts.map +1 -0
- package/lib/typescript/native/internal/platformModifiers.android.d.ts +4 -0
- package/lib/typescript/native/internal/platformModifiers.android.d.ts.map +1 -0
- package/lib/typescript/native/internal/platformModifiers.d.ts +4 -0
- package/lib/typescript/native/internal/platformModifiers.d.ts.map +1 -0
- package/lib/typescript/native/internal/platformModifiers.ios.d.ts +4 -0
- package/lib/typescript/native/internal/platformModifiers.ios.d.ts.map +1 -0
- package/lib/typescript/native/internal/platformModifiers.types.d.ts +3 -0
- package/lib/typescript/native/internal/platformModifiers.types.d.ts.map +1 -0
- package/lib/typescript/native/internal/withNativeFallback.d.ts +3 -0
- package/lib/typescript/native/internal/withNativeFallback.d.ts.map +1 -0
- package/lib/typescript/native/materialColors.types.d.ts +4 -0
- package/lib/typescript/native/materialColors.types.d.ts.map +1 -0
- package/lib/typescript/native/menuTypes.d.ts +9 -0
- package/lib/typescript/native/menuTypes.d.ts.map +1 -0
- package/lib/typescript/native/tabs/index.d.ts +5 -0
- package/lib/typescript/native/tabs/index.d.ts.map +1 -0
- package/lib/typescript/native/tabs/useNativeTabsTheme.d.ts +10 -0
- package/lib/typescript/native/tabs/useNativeTabsTheme.d.ts.map +1 -0
- package/lib/typescript/native/useLiquidGlass.d.ts +8 -0
- package/lib/typescript/native/useLiquidGlass.d.ts.map +1 -0
- package/lib/typescript/native/useNativeColors.android.d.ts +4 -0
- package/lib/typescript/native/useNativeColors.android.d.ts.map +1 -0
- package/lib/typescript/native/useNativeColors.d.ts +4 -0
- package/lib/typescript/native/useNativeColors.d.ts.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/presets/controller.d.ts +10 -0
- package/lib/typescript/presets/controller.d.ts.map +1 -0
- package/lib/typescript/presets/default.d.ts +2 -0
- package/lib/typescript/presets/default.d.ts.map +1 -0
- package/lib/typescript/presets/definePreset.d.ts +16 -0
- package/lib/typescript/presets/definePreset.d.ts.map +1 -0
- package/lib/typescript/presets/funnel.d.ts +11 -0
- package/lib/typescript/presets/funnel.d.ts.map +1 -0
- package/lib/typescript/presets/index.d.ts +7 -0
- package/lib/typescript/presets/index.d.ts.map +1 -0
- package/lib/typescript/presets/presets.d.ts +11 -0
- package/lib/typescript/presets/presets.d.ts.map +1 -0
- package/lib/typescript/presets/spotfish.d.ts +2 -0
- package/lib/typescript/presets/spotfish.d.ts.map +1 -0
- package/lib/typescript/presets/suedtirol.d.ts +2 -0
- package/lib/typescript/presets/suedtirol.d.ts.map +1 -0
- package/lib/typescript/presets/types.d.ts +22 -0
- package/lib/typescript/presets/types.d.ts.map +1 -0
- package/lib/typescript/presets/usePreset.d.ts +16 -0
- package/lib/typescript/presets/usePreset.d.ts.map +1 -0
- package/lib/typescript/theme/configureUi.d.ts +27 -0
- package/lib/typescript/theme/configureUi.d.ts.map +1 -0
- package/lib/typescript/theme/createTheme.d.ts +5 -0
- package/lib/typescript/theme/createTheme.d.ts.map +1 -0
- package/lib/typescript/theme/defaults.d.ts +4 -0
- package/lib/typescript/theme/defaults.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +11 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/settings.d.ts +19 -0
- package/lib/typescript/theme/settings.d.ts.map +1 -0
- package/lib/typescript/theme/tones.d.ts +9 -0
- package/lib/typescript/theme/tones.d.ts.map +1 -0
- package/lib/typescript/theme/types.d.ts +147 -0
- package/lib/typescript/theme/types.d.ts.map +1 -0
- package/lib/typescript/utils/a11y.d.ts +20 -0
- package/lib/typescript/utils/a11y.d.ts.map +1 -0
- package/lib/typescript/utils/createStore.d.ts +8 -0
- package/lib/typescript/utils/createStore.d.ts.map +1 -0
- package/lib/typescript/utils/fonts.d.ts +13 -0
- package/lib/typescript/utils/fonts.d.ts.map +1 -0
- package/lib/typescript/utils/hitSlop.d.ts +3 -0
- package/lib/typescript/utils/hitSlop.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/math.d.ts +6 -0
- package/lib/typescript/utils/math.d.ts.map +1 -0
- package/lib/typescript/utils/refs.d.ts +4 -0
- package/lib/typescript/utils/refs.d.ts.map +1 -0
- package/lib/typescript/utils/statusIcon.d.ts +3 -0
- package/lib/typescript/utils/statusIcon.d.ts.map +1 -0
- package/lib/typescript/utils/styles.d.ts +34 -0
- package/lib/typescript/utils/styles.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +11 -0
- package/lib/typescript/utils/types.d.ts.map +1 -0
- package/package.json +155 -3
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { StyleSheet, useUnistyles } from 'react-native-unistyles';
|
|
5
|
+
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
6
|
+
import { disabledOpacity } from "../../utils/styles.js";
|
|
7
|
+
import { renderIcon } from "../core/Icon.js";
|
|
8
|
+
import { Text } from "../core/Text.js";
|
|
9
|
+
import { Touchable } from "../core/Touchable.js";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const keyOffset = {
|
|
12
|
+
sm: 4,
|
|
13
|
+
md: 20,
|
|
14
|
+
lg: 32
|
|
15
|
+
};
|
|
16
|
+
const keySize = (theme, size) => theme.components.pinPad?.keySize?.[size] ?? theme.sizes.control.lg + keyOffset[size];
|
|
17
|
+
const keyIconSize = (theme, size) => Math.round(keySize(theme, size) * 0.36);
|
|
18
|
+
const DIGIT_ROWS = [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9']];
|
|
19
|
+
export const PinPadKey = ({
|
|
20
|
+
children,
|
|
21
|
+
icon,
|
|
22
|
+
size = 'md',
|
|
23
|
+
disabled,
|
|
24
|
+
style,
|
|
25
|
+
labelStyle,
|
|
26
|
+
accessibilityRole = 'button',
|
|
27
|
+
...props
|
|
28
|
+
}) => {
|
|
29
|
+
const {
|
|
30
|
+
theme
|
|
31
|
+
} = useUnistyles();
|
|
32
|
+
return /*#__PURE__*/_jsxs(Touchable, {
|
|
33
|
+
haptic: "light",
|
|
34
|
+
accessibilityRole: accessibilityRole,
|
|
35
|
+
disabled: disabled,
|
|
36
|
+
...props,
|
|
37
|
+
style: [stylesheet.key(size, !!disabled), style],
|
|
38
|
+
children: [icon ? renderIcon(icon, {
|
|
39
|
+
size: keyIconSize(theme, size),
|
|
40
|
+
color: theme.colors.text
|
|
41
|
+
}) : null, typeof children === 'string' || typeof children === 'number' ? /*#__PURE__*/_jsx(Text, {
|
|
42
|
+
variant: size === 'sm' ? 'heading' : 'title',
|
|
43
|
+
style: labelStyle,
|
|
44
|
+
children: children
|
|
45
|
+
}) : children]
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export const PinPad = ({
|
|
49
|
+
ref,
|
|
50
|
+
value,
|
|
51
|
+
defaultValue = '',
|
|
52
|
+
onValueChange,
|
|
53
|
+
onComplete,
|
|
54
|
+
maxLength,
|
|
55
|
+
size = 'md',
|
|
56
|
+
disabled = false,
|
|
57
|
+
leftKey,
|
|
58
|
+
rightKey,
|
|
59
|
+
deleteLabel = 'Delete',
|
|
60
|
+
style,
|
|
61
|
+
styles
|
|
62
|
+
}) => {
|
|
63
|
+
const [entered, setEntered] = useControllableState({
|
|
64
|
+
value,
|
|
65
|
+
defaultValue,
|
|
66
|
+
onChange: onValueChange
|
|
67
|
+
});
|
|
68
|
+
const append = digit => {
|
|
69
|
+
if (maxLength !== undefined && entered.length >= maxLength) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const next = entered + digit;
|
|
73
|
+
setEntered(next);
|
|
74
|
+
if (maxLength !== undefined && next.length === maxLength) {
|
|
75
|
+
onComplete?.(next);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const removeLast = () => {
|
|
79
|
+
if (entered.length > 0) {
|
|
80
|
+
setEntered(entered.slice(0, -1));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
84
|
+
ref: ref,
|
|
85
|
+
style: [stylesheet.container, style, styles?.container],
|
|
86
|
+
children: [DIGIT_ROWS.map(row => /*#__PURE__*/_jsx(View, {
|
|
87
|
+
style: [stylesheet.row, styles?.row],
|
|
88
|
+
children: row.map(digit => /*#__PURE__*/_jsx(PinPadKey, {
|
|
89
|
+
size: size,
|
|
90
|
+
disabled: disabled,
|
|
91
|
+
accessibilityLabel: digit,
|
|
92
|
+
onPress: () => append(digit),
|
|
93
|
+
style: styles?.key,
|
|
94
|
+
labelStyle: styles?.keyLabel,
|
|
95
|
+
children: digit
|
|
96
|
+
}, digit))
|
|
97
|
+
}, row.join(''))), /*#__PURE__*/_jsxs(View, {
|
|
98
|
+
style: [stylesheet.row, styles?.row],
|
|
99
|
+
children: [leftKey ?? /*#__PURE__*/_jsx(View, {
|
|
100
|
+
style: stylesheet.spacer(size)
|
|
101
|
+
}), /*#__PURE__*/_jsx(PinPadKey, {
|
|
102
|
+
size: size,
|
|
103
|
+
disabled: disabled,
|
|
104
|
+
accessibilityLabel: "0",
|
|
105
|
+
onPress: () => append('0'),
|
|
106
|
+
style: styles?.key,
|
|
107
|
+
labelStyle: styles?.keyLabel,
|
|
108
|
+
children: "0"
|
|
109
|
+
}), rightKey ?? /*#__PURE__*/_jsx(PinPadKey, {
|
|
110
|
+
size: size,
|
|
111
|
+
disabled: disabled || entered.length === 0,
|
|
112
|
+
accessibilityLabel: deleteLabel,
|
|
113
|
+
onPress: removeLast,
|
|
114
|
+
icon: "backspace",
|
|
115
|
+
style: [stylesheet.ghostKey, styles?.key]
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const stylesheet = StyleSheet.create(theme => ({
|
|
121
|
+
container: {
|
|
122
|
+
alignSelf: 'center',
|
|
123
|
+
gap: theme.space(1.5)
|
|
124
|
+
},
|
|
125
|
+
row: {
|
|
126
|
+
flexDirection: 'row',
|
|
127
|
+
justifyContent: 'center',
|
|
128
|
+
gap: theme.space(2)
|
|
129
|
+
},
|
|
130
|
+
key: (size, disabled) => ({
|
|
131
|
+
width: keySize(theme, size),
|
|
132
|
+
height: keySize(theme, size),
|
|
133
|
+
borderRadius: theme.radius.full,
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
backgroundColor: theme.colors.surfaceSunken,
|
|
137
|
+
opacity: disabledOpacity(theme, disabled)
|
|
138
|
+
}),
|
|
139
|
+
ghostKey: {
|
|
140
|
+
backgroundColor: 'transparent'
|
|
141
|
+
},
|
|
142
|
+
spacer: size => ({
|
|
143
|
+
width: keySize(theme, size),
|
|
144
|
+
height: keySize(theme, size)
|
|
145
|
+
})
|
|
146
|
+
}));
|
|
147
|
+
//# sourceMappingURL=PinPad.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","StyleSheet","useUnistyles","useControllableState","disabledOpacity","renderIcon","Text","Touchable","jsx","_jsx","jsxs","_jsxs","keyOffset","sm","md","lg","keySize","theme","size","components","pinPad","sizes","control","keyIconSize","Math","round","DIGIT_ROWS","PinPadKey","children","icon","disabled","style","labelStyle","accessibilityRole","props","haptic","stylesheet","key","color","colors","text","variant","PinPad","ref","value","defaultValue","onValueChange","onComplete","maxLength","leftKey","rightKey","deleteLabel","styles","entered","setEntered","onChange","append","digit","undefined","length","next","removeLast","slice","container","map","row","accessibilityLabel","onPress","keyLabel","join","spacer","ghostKey","create","alignSelf","gap","space","flexDirection","justifyContent","width","height","borderRadius","radius","full","alignItems","backgroundColor","surfaceSunken","opacity"],"sourceRoot":"../../../../src","sources":["components/forms/PinPad.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAQ,cAAc;AAE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AU,EAAE,QAAQ;IACpBN,cAAc,EAAE,QAAQ;IACxBO,eAAe,EAAEnE,KAAK,CAACsB,MAAM,CAAC8C,aAAa;IAC3CC,OAAO,EAAElF,eAAe,CAACa,KAAK,EAAEa,QAAQ;EAC3C,CAAC,CAAC;EACFyC,QAAQ,EAAE;IACPa,eAAe,EAAE;EACpB,CAAC;EACDd,MAAM,EAAGpD,IAAgB,KAAM;IAC5B4D,KAAK,EAAE9D,OAAO,CAACC,KAAK,EAAEC,IAAI,CAAC;IAC3B6D,MAAM,EAAE/D,OAAO,CAACC,KAAK,EAAEC,IAAI;EAC9B,CAAC;AACJ,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import Animated, { useAnimatedStyle } from 'react-native-reanimated';
|
|
5
|
+
import { StyleSheet, useUnistyles } from 'react-native-unistyles';
|
|
6
|
+
import { useToggleProgress } from "../../hooks/useToggleProgress.js";
|
|
7
|
+
import { toneColors } from "../../theme/tones.js";
|
|
8
|
+
import { textLabel } from "../../utils/a11y.js";
|
|
9
|
+
import { hitSlopFor } from "../../utils/hitSlop.js";
|
|
10
|
+
import { Touchable } from "../core/Touchable.js";
|
|
11
|
+
import { ControlLabel } from "./ControlLabel.js";
|
|
12
|
+
import { useRadioGroup } from "./radioGroupContext.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const circleSize = (theme, size) => theme.sizes.icon[size] + 2;
|
|
15
|
+
export const Radio = ({
|
|
16
|
+
ref,
|
|
17
|
+
value,
|
|
18
|
+
label,
|
|
19
|
+
description,
|
|
20
|
+
accessibilityLabel,
|
|
21
|
+
disabled = false,
|
|
22
|
+
size: sizeProp,
|
|
23
|
+
tone: toneProp,
|
|
24
|
+
style,
|
|
25
|
+
styles
|
|
26
|
+
}) => {
|
|
27
|
+
const {
|
|
28
|
+
theme
|
|
29
|
+
} = useUnistyles();
|
|
30
|
+
const group = useRadioGroup();
|
|
31
|
+
const size = sizeProp ?? group?.size ?? 'md';
|
|
32
|
+
const tone = toneProp ?? group?.tone ?? 'primary';
|
|
33
|
+
const selected = group?.value === value;
|
|
34
|
+
const isDisabled = disabled || !!group?.disabled;
|
|
35
|
+
const progress = useToggleProgress(selected);
|
|
36
|
+
const dimension = circleSize(theme, size);
|
|
37
|
+
const dotStyle = useAnimatedStyle(() => ({
|
|
38
|
+
opacity: Math.min(1, progress.value),
|
|
39
|
+
transform: [{
|
|
40
|
+
scale: Math.max(0, progress.value)
|
|
41
|
+
}]
|
|
42
|
+
}));
|
|
43
|
+
return /*#__PURE__*/_jsxs(Touchable, {
|
|
44
|
+
ref: ref,
|
|
45
|
+
feedback: "opacity",
|
|
46
|
+
haptic: "selection",
|
|
47
|
+
accessibilityRole: "radio",
|
|
48
|
+
accessibilityLabel: accessibilityLabel ?? textLabel(label),
|
|
49
|
+
accessibilityState: {
|
|
50
|
+
disabled: isDisabled,
|
|
51
|
+
checked: selected,
|
|
52
|
+
selected
|
|
53
|
+
},
|
|
54
|
+
disabled: isDisabled,
|
|
55
|
+
onPress: () => group?.select(value),
|
|
56
|
+
hitSlop: hitSlopFor(dimension, dimension, theme.sizes.minTouchTarget),
|
|
57
|
+
style: [stylesheet.container, style, styles?.container],
|
|
58
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
59
|
+
style: [stylesheet.circle(size, selected, tone), styles?.circle],
|
|
60
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
61
|
+
style: [stylesheet.dot(size, tone), dotStyle, styles?.dot]
|
|
62
|
+
})
|
|
63
|
+
}), /*#__PURE__*/_jsx(ControlLabel, {
|
|
64
|
+
label: label,
|
|
65
|
+
description: description,
|
|
66
|
+
style: styles?.content,
|
|
67
|
+
labelStyle: styles?.label,
|
|
68
|
+
descriptionStyle: styles?.description
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const stylesheet = StyleSheet.create(theme => ({
|
|
73
|
+
container: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
alignItems: 'flex-start',
|
|
76
|
+
gap: theme.space(1.25)
|
|
77
|
+
},
|
|
78
|
+
circle: (size, selected, tone) => ({
|
|
79
|
+
width: circleSize(theme, size),
|
|
80
|
+
height: circleSize(theme, size),
|
|
81
|
+
borderRadius: theme.radius.full,
|
|
82
|
+
borderWidth: theme.sizes.borderWidth * 1.5,
|
|
83
|
+
borderColor: selected ? toneColors(theme, tone).solid : theme.colors.borderStrong,
|
|
84
|
+
backgroundColor: theme.colors.surface,
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
justifyContent: 'center'
|
|
87
|
+
}),
|
|
88
|
+
dot: (size, tone) => ({
|
|
89
|
+
width: circleSize(theme, size) / 2,
|
|
90
|
+
height: circleSize(theme, size) / 2,
|
|
91
|
+
borderRadius: theme.radius.full,
|
|
92
|
+
backgroundColor: toneColors(theme, tone).solid
|
|
93
|
+
})
|
|
94
|
+
}));
|
|
95
|
+
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Animated","useAnimatedStyle","StyleSheet","useUnistyles","useToggleProgress","toneColors","textLabel","hitSlopFor","Touchable","ControlLabel","useRadioGroup","jsx","_jsx","jsxs","_jsxs","circleSize","theme","size","sizes","icon","Radio","ref","value","label","description","accessibilityLabel","disabled","sizeProp","tone","toneProp","style","styles","group","selected","isDisabled","progress","dimension","dotStyle","opacity","Math","min","transform","scale","max","feedback","haptic","accessibilityRole","accessibilityState","checked","onPress","select","hitSlop","minTouchTarget","stylesheet","container","children","circle","dot","content","labelStyle","descriptionStyle","create","flexDirection","alignItems","gap","space","width","height","borderRadius","radius","full","borderWidth","borderColor","solid","colors","borderStrong","backgroundColor","surface","justifyContent"],"sourceRoot":"../../../../src","sources":["components/forms/Radio.tsx"],"mappings":";;AACA,SAASA,IAAI,QA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EC,IAAI,CAAC,GAAG,CAAC;IACnCmD,YAAY,EAAEpD,KAAK,CAACqD,MAAM,CAACC,IAAI;IAC/BM,eAAe,EAAEvE,UAAU,CAACW,KAAK,EAAEY,IAAI,CAAC,CAAC6C;EAC5C,CAAC;AACJ,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import { useControllableState, whenPresent } from "../../hooks/useControllableState.js";
|
|
6
|
+
import { groupLayout } from "./groupLayout.js";
|
|
7
|
+
import { fieldAccessibility, useFieldContext } from "./fieldContext.js";
|
|
8
|
+
import { Radio } from "./Radio.js";
|
|
9
|
+
import { RadioGroupContext } from "./radioGroupContext.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export const RadioGroup = ({
|
|
12
|
+
ref,
|
|
13
|
+
value,
|
|
14
|
+
defaultValue,
|
|
15
|
+
onValueChange,
|
|
16
|
+
options,
|
|
17
|
+
children,
|
|
18
|
+
orientation = 'vertical',
|
|
19
|
+
disabled = false,
|
|
20
|
+
size,
|
|
21
|
+
tone,
|
|
22
|
+
accessibilityLabel,
|
|
23
|
+
style
|
|
24
|
+
}) => {
|
|
25
|
+
const field = useFieldContext();
|
|
26
|
+
const [selected, setSelected] = useControllableState({
|
|
27
|
+
value,
|
|
28
|
+
defaultValue,
|
|
29
|
+
onChange: whenPresent(onValueChange)
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/_jsx(RadioGroupContext, {
|
|
32
|
+
value: {
|
|
33
|
+
value: selected,
|
|
34
|
+
select: setSelected,
|
|
35
|
+
disabled: disabled || !!field?.disabled,
|
|
36
|
+
size,
|
|
37
|
+
tone
|
|
38
|
+
},
|
|
39
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
40
|
+
ref: ref,
|
|
41
|
+
accessibilityRole: "radiogroup",
|
|
42
|
+
accessibilityLabel: accessibilityLabel,
|
|
43
|
+
...fieldAccessibility(field),
|
|
44
|
+
style: [stylesheet.container(orientation), style],
|
|
45
|
+
children: options ? options.map(option => /*#__PURE__*/_jsx(Radio, {
|
|
46
|
+
value: option.value,
|
|
47
|
+
label: option.label,
|
|
48
|
+
description: option.description,
|
|
49
|
+
disabled: option.disabled
|
|
50
|
+
}, option.value)) : children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const stylesheet = StyleSheet.create(theme => ({
|
|
55
|
+
container: orientation => ({
|
|
56
|
+
...groupLayout(theme, orientation)
|
|
57
|
+
})
|
|
58
|
+
}));
|
|
59
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","StyleSheet","useControllableState","whenPresent","groupLayout","fieldAccessibility","useFieldContext","Radio","RadioGroupContext","jsx","_jsx","RadioGroup","ref","value","defaultValue","onValueChange","options","children","orientation","disabled","size","tone","accessibilityLabel","style","field","selected","setSelected","onChange","select","accessibilityRole","stylesheet","container","map","option","label","description","create","theme"],"sourceRoot":"../../../../src","sources":["components/forms/RadioGroup.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,oBAAoB,EAAEC,WAAW,QAAQ,qCAAkC;AAEpF,SAASC,WAAW,QAAQ,kBAAe;AAE3C,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,mBAAgB;AACpE,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,iBAAiB,QAAQ,wBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAwBvD,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACxBC,GAAG;EACHC,KAAK;EACLC,YAAY;EACZC,aAAa;EACbC,OAAO;EACPC,QAAQ;EACRC,WAAW,GAAG,UAAU;EACxBC,QAAQ,GAAG,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C,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import Animated from 'react-native-reanimated';
|
|
5
|
+
import { StyleSheet, useUnistyles } from 'react-native-unistyles';
|
|
6
|
+
import { useControllableState, whenPresent } from "../../hooks/useControllableState.js";
|
|
7
|
+
import { useItemLayouts, useSlidingIndicator } from "../../hooks/useSlidingIndicator.js";
|
|
8
|
+
import { disabledOpacity, nativeShadow } from "../../utils/styles.js";
|
|
9
|
+
import { renderIcon } from "../core/Icon.js";
|
|
10
|
+
import { Text } from "../core/Text.js";
|
|
11
|
+
import { Touchable } from "../core/Touchable.js";
|
|
12
|
+
import { fieldAccessibility, useFieldControl } from "./fieldContext.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const PADDING = 3;
|
|
15
|
+
const segmentHeight = (theme, size) => theme.sizes.control[size] - PADDING * 2;
|
|
16
|
+
export const SegmentedControl = ({
|
|
17
|
+
ref,
|
|
18
|
+
options,
|
|
19
|
+
value,
|
|
20
|
+
defaultValue,
|
|
21
|
+
onValueChange,
|
|
22
|
+
size = 'md',
|
|
23
|
+
fullWidth = true,
|
|
24
|
+
disabled = false,
|
|
25
|
+
accessibilityLabel,
|
|
26
|
+
style,
|
|
27
|
+
styles
|
|
28
|
+
}) => {
|
|
29
|
+
const {
|
|
30
|
+
theme
|
|
31
|
+
} = useUnistyles();
|
|
32
|
+
const control = useFieldControl({
|
|
33
|
+
disabled
|
|
34
|
+
});
|
|
35
|
+
const [selected, setSelected] = useControllableState({
|
|
36
|
+
value,
|
|
37
|
+
defaultValue: defaultValue ?? options[0]?.value,
|
|
38
|
+
onChange: whenPresent(onValueChange)
|
|
39
|
+
});
|
|
40
|
+
const [segments, handleSegmentLayout] = useItemLayouts();
|
|
41
|
+
const selectedOption = options.find(option => option.value === selected) ?? options[0];
|
|
42
|
+
const selectedLayout = selectedOption ? segments[selectedOption.value] : undefined;
|
|
43
|
+
const indicatorStyle = useSlidingIndicator(selectedLayout, -PADDING);
|
|
44
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
45
|
+
ref: ref,
|
|
46
|
+
accessibilityRole: "radiogroup",
|
|
47
|
+
accessibilityLabel: accessibilityLabel,
|
|
48
|
+
...fieldAccessibility(control.field),
|
|
49
|
+
style: [stylesheet.container(size, fullWidth, control.disabled), style, styles?.container],
|
|
50
|
+
children: [selectedLayout ? /*#__PURE__*/_jsx(Animated.View, {
|
|
51
|
+
pointerEvents: "none",
|
|
52
|
+
style: [stylesheet.indicator(size), indicatorStyle, styles?.indicator]
|
|
53
|
+
}) : null, options.map(option => {
|
|
54
|
+
const active = option.value === selected;
|
|
55
|
+
const optionDisabled = control.disabled || !!option.disabled;
|
|
56
|
+
const color = active ? theme.colors.text : theme.colors.textMuted;
|
|
57
|
+
return /*#__PURE__*/_jsxs(Touchable, {
|
|
58
|
+
feedback: control.disabled ? 'none' : 'opacity',
|
|
59
|
+
haptic: "selection",
|
|
60
|
+
accessibilityRole: "radio",
|
|
61
|
+
accessibilityLabel: option.label,
|
|
62
|
+
accessibilityState: {
|
|
63
|
+
checked: active,
|
|
64
|
+
selected: active,
|
|
65
|
+
disabled: optionDisabled
|
|
66
|
+
},
|
|
67
|
+
disabled: optionDisabled,
|
|
68
|
+
onPress: () => setSelected(option.value),
|
|
69
|
+
onLayout: event => handleSegmentLayout(option.value, event),
|
|
70
|
+
style: [stylesheet.segment(size, fullWidth), styles?.segment],
|
|
71
|
+
children: [renderIcon(option.icon, {
|
|
72
|
+
size: size === 'lg' ? 'md' : 'sm',
|
|
73
|
+
color
|
|
74
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
75
|
+
variant: "label",
|
|
76
|
+
weight: active ? 'semibold' : 'medium',
|
|
77
|
+
numberOfLines: 1,
|
|
78
|
+
style: [stylesheet.label(color), styles?.label],
|
|
79
|
+
children: option.label
|
|
80
|
+
})]
|
|
81
|
+
}, option.value);
|
|
82
|
+
})]
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const stylesheet = StyleSheet.create(theme => ({
|
|
86
|
+
container: (size, fullWidth, disabled) => ({
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
alignSelf: fullWidth ? 'stretch' : 'flex-start',
|
|
89
|
+
height: theme.sizes.control[size],
|
|
90
|
+
padding: PADDING,
|
|
91
|
+
borderRadius: theme.radius.md,
|
|
92
|
+
backgroundColor: theme.colors.surfaceSunken,
|
|
93
|
+
opacity: disabledOpacity(theme, disabled)
|
|
94
|
+
}),
|
|
95
|
+
indicator: size => ({
|
|
96
|
+
position: 'absolute',
|
|
97
|
+
top: PADDING,
|
|
98
|
+
left: PADDING,
|
|
99
|
+
height: segmentHeight(theme, size),
|
|
100
|
+
borderRadius: theme.radius.md - PADDING,
|
|
101
|
+
backgroundColor: theme.colors.surfaceRaised,
|
|
102
|
+
borderWidth: theme.sizes.borderWidth,
|
|
103
|
+
borderColor: theme.colors.border,
|
|
104
|
+
...nativeShadow(theme, {
|
|
105
|
+
opacity: 0.12,
|
|
106
|
+
elevation: 1
|
|
107
|
+
})
|
|
108
|
+
}),
|
|
109
|
+
segment: (size, fullWidth) => ({
|
|
110
|
+
flexGrow: fullWidth ? 1 : 0,
|
|
111
|
+
flexShrink: fullWidth ? 1 : 0,
|
|
112
|
+
flexBasis: fullWidth ? 0 : 'auto',
|
|
113
|
+
flexDirection: 'row',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
justifyContent: 'center',
|
|
116
|
+
gap: theme.space(0.75),
|
|
117
|
+
height: segmentHeight(theme, size),
|
|
118
|
+
paddingHorizontal: theme.space(1)
|
|
119
|
+
}),
|
|
120
|
+
label: color => ({
|
|
121
|
+
color
|
|
122
|
+
})
|
|
123
|
+
}));
|
|
124
|
+
//# sourceMappingURL=SegmentedControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","Animated","StyleSheet","useUnistyles","useControllableState","whenPresent","useItemLayouts","useSlidingIndicator","disabledOpacity","nativeShadow","renderIcon","Text","Touchable","fieldAccessibility","useFieldControl","jsx","_jsx","jsxs","_jsxs","PADDING","segmentHeight","theme","size","sizes","control","SegmentedControl","ref","options","value","defaultValue","onValueChange","fullWidth","disabled","accessibilityLabel","style","styles","selected","setSelected","onChange","segments","handleSegmentLayout","selectedOption","find","option","selectedLayout","undefined","indicatorStyle","accessibilityRole","field","stylesheet","container","children","pointerEvents","indicator","map","active","optionDisabled","color","colors","text","textMuted","feedback","haptic","label","accessibilityState","checked","onPress","onLayout","event","segment","icon","variant","weight","numberOfLines","create","flexDirection","alignSelf","height","padding","borderRadius","radius","md","backgroundColor","surfaceSunken","opacity","position","top","left","surfaceRaised","borderWidth","borderColor","border","elevation","flexGrow","flexShrink","flexBasis","alignItems","justifyContent","gap","space","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["components/forms/SegmentedControl.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAQ,cAAc;AAEnC,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,UAAU,EAAEC,YAAY,QAAQ,wBAAwB;AACjE,SAASC,oBAAoB,EAAEC,WAAW,QAAQ,qCAAkC;AACpF,SAASC,cAAc,EAAEC,mBAAmB,QAAQ,oCAAiC;AAErF,SAASC,eAAe,EAAEC,YAAY,QAAQ,uBAAoB;AAElE,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,IAAI,QAAQ,iBAAc;AACnC,SAASC,SAAS,QAAQ,sBAAmB;AAC7C,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,mBAAgB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA8BpE,MAAMC,OAAO,GAAG,CAAC;AAEjB,MAAMC,aAAa,GAAGA,CAACC,KAAgB,EAAEC,IAAiB,KACvDD,KAAK,CAACE,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,GAA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EAAE,GAAG9D,OAAO;IACvC+D,eAAe,EAAE7D,KAAK,CAACqC,MAAM,CAAC8B,aAAa;IAC3CC,WAAW,EAAEpE,KAAK,CAACE,KAAK,CAACkE,WAAW;IACpCC,WAAW,EAAErE,KAAK,CAACqC,MAAM,CAACiC,MAAM;IAChC,GAAGlF,YAAY,CAACY,KAAK,EAAE;MAAE+D,OAAO,EAAE,IAAI;MAAEQ,SAAS,EAAE;IAAE,CAAC;EACzD,CAAC,CAAC;EACFvB,OAAO,EAAEA,CAAC/C,IAAiB,EAAES,SAAkB,MAAM;IAClD8D,QAAQ,EAAE9D,SAAS,GAAG,CAAC,GAAG,CAAC;IAC3B+D,UAAU,EAAE/D,SAAS,GAAG,CAAC,GAAG,CAAC;IAC7BgE,SAAS,EAAEhE,SAAS,GAAG,CAAC,GAAG,MAAM;IACjC4C,aAAa,EAAE,KAAK;IACpBqB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,GAAG,EAAE7E,KAAK,CAAC8E,KAAK,CAAC,IAAI,CAAC;IACtBtB,MAAM,EAAEzD,aAAa,CAACC,KAAK,EAAEC,IAAI,CAAC;IAClC8E,iBAAiB,EAAE/E,KAAK,CAAC8E,KAAK,CAAC,CAAC;EACnC,CAAC,CAAC;EACFpC,KAAK,EAAGN,KAAa,KAAM;IACxBA;EACH,CAAC;AACJ,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
6
|
+
import Animated, { useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
8
|
+
import { StyleSheet, useUnistyles } from 'react-native-unistyles';
|
|
9
|
+
import { useControllableState } from "../../hooks/useControllableState.js";
|
|
10
|
+
import { toneColors } from "../../theme/tones.js";
|
|
11
|
+
import { adjustableActions } from "../../utils/a11y.js";
|
|
12
|
+
import { clamp, clampRatio, snapToStep } from "../../utils/math.js";
|
|
13
|
+
import { disabledOpacity, nativeShadow } from "../../utils/styles.js";
|
|
14
|
+
import { fieldAccessibility, useFieldControl } from "./fieldContext.js";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const thumbDiameter = (theme, size) => theme.sizes.icon[size] + 6;
|
|
17
|
+
const trackThickness = (theme, size) => Math.round(theme.sizes.icon[size] / 3);
|
|
18
|
+
export const Slider = ({
|
|
19
|
+
ref,
|
|
20
|
+
value,
|
|
21
|
+
defaultValue,
|
|
22
|
+
onValueChange,
|
|
23
|
+
onSlidingComplete,
|
|
24
|
+
min = 0,
|
|
25
|
+
max = 100,
|
|
26
|
+
step = 1,
|
|
27
|
+
size = 'md',
|
|
28
|
+
tone = 'primary',
|
|
29
|
+
disabled = false,
|
|
30
|
+
accessibilityLabel,
|
|
31
|
+
style,
|
|
32
|
+
styles
|
|
33
|
+
}) => {
|
|
34
|
+
const {
|
|
35
|
+
theme
|
|
36
|
+
} = useUnistyles();
|
|
37
|
+
const reducedMotion = useReducedMotion();
|
|
38
|
+
const control = useFieldControl({
|
|
39
|
+
disabled
|
|
40
|
+
});
|
|
41
|
+
const [current, setCurrent] = useControllableState({
|
|
42
|
+
value,
|
|
43
|
+
defaultValue: defaultValue ?? min,
|
|
44
|
+
onChange: onValueChange
|
|
45
|
+
});
|
|
46
|
+
const thumb = thumbDiameter(theme, size);
|
|
47
|
+
const range = max - min;
|
|
48
|
+
const ratioOf = next => {
|
|
49
|
+
'worklet';
|
|
50
|
+
|
|
51
|
+
return range === 0 ? 0 : (next - min) / range;
|
|
52
|
+
};
|
|
53
|
+
const progress = useSharedValue(ratioOf(current));
|
|
54
|
+
const innerWidth = useSharedValue(0);
|
|
55
|
+
const dragging = useSharedValue(false);
|
|
56
|
+
const lastCommitted = useSharedValue(current);
|
|
57
|
+
const settleDuration = reducedMotion ? 0 : theme.motion.duration.fast;
|
|
58
|
+
const commit = next => {
|
|
59
|
+
setCurrent(next);
|
|
60
|
+
};
|
|
61
|
+
const complete = next => {
|
|
62
|
+
onSlidingComplete?.(next);
|
|
63
|
+
};
|
|
64
|
+
const ratioAt = x => {
|
|
65
|
+
'worklet';
|
|
66
|
+
|
|
67
|
+
return clampRatio((x - thumb / 2) / innerWidth.value);
|
|
68
|
+
};
|
|
69
|
+
const valueAt = ratio => {
|
|
70
|
+
'worklet';
|
|
71
|
+
|
|
72
|
+
return snapToStep(min + ratio * range, min, max, step);
|
|
73
|
+
};
|
|
74
|
+
const gesture = Gesture.Race(Gesture.Pan().enabled(!control.disabled).activeOffsetX([-6, 6]).failOffsetY([-14, 14]).onBegin(event => {
|
|
75
|
+
dragging.value = true;
|
|
76
|
+
progress.value = ratioAt(event.x);
|
|
77
|
+
}).onUpdate(event => {
|
|
78
|
+
const ratio = ratioAt(event.x);
|
|
79
|
+
progress.value = ratio;
|
|
80
|
+
const stepped = valueAt(ratio);
|
|
81
|
+
if (stepped !== lastCommitted.value) {
|
|
82
|
+
lastCommitted.value = stepped;
|
|
83
|
+
scheduleOnRN(commit, stepped);
|
|
84
|
+
}
|
|
85
|
+
}).onFinalize(() => {
|
|
86
|
+
dragging.value = false;
|
|
87
|
+
const stepped = valueAt(progress.value);
|
|
88
|
+
progress.value = withTiming(ratioOf(stepped), {
|
|
89
|
+
duration: settleDuration
|
|
90
|
+
});
|
|
91
|
+
scheduleOnRN(complete, stepped);
|
|
92
|
+
}), Gesture.Tap().enabled(!control.disabled).onEnd(event => {
|
|
93
|
+
const stepped = valueAt(ratioAt(event.x));
|
|
94
|
+
progress.value = withTiming(ratioOf(stepped), {
|
|
95
|
+
duration: settleDuration
|
|
96
|
+
});
|
|
97
|
+
lastCommitted.value = stepped;
|
|
98
|
+
scheduleOnRN(commit, stepped);
|
|
99
|
+
scheduleOnRN(complete, stepped);
|
|
100
|
+
}));
|
|
101
|
+
const handleLayout = event => {
|
|
102
|
+
innerWidth.value = Math.max(1, event.nativeEvent.layout.width - thumb);
|
|
103
|
+
};
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
lastCommitted.value = current;
|
|
106
|
+
if (!dragging.value) {
|
|
107
|
+
progress.value = withTiming(ratioOf(current), {
|
|
108
|
+
duration: settleDuration
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}, [current, min, range, progress, dragging, lastCommitted, settleDuration]);
|
|
112
|
+
const fillStyle = useAnimatedStyle(() => ({
|
|
113
|
+
width: progress.value * innerWidth.value + thumb / 2
|
|
114
|
+
}));
|
|
115
|
+
const thumbStyle = useAnimatedStyle(() => ({
|
|
116
|
+
transform: [{
|
|
117
|
+
translateX: progress.value * innerWidth.value
|
|
118
|
+
}]
|
|
119
|
+
}));
|
|
120
|
+
const adjust = direction => {
|
|
121
|
+
const next = clamp(current + direction * step, min, max);
|
|
122
|
+
setCurrent(next);
|
|
123
|
+
onSlidingComplete?.(next);
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
126
|
+
gesture: gesture,
|
|
127
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
128
|
+
ref: ref,
|
|
129
|
+
onLayout: handleLayout,
|
|
130
|
+
accessible: true,
|
|
131
|
+
accessibilityRole: "adjustable",
|
|
132
|
+
accessibilityLabel: accessibilityLabel,
|
|
133
|
+
accessibilityValue: {
|
|
134
|
+
min,
|
|
135
|
+
max,
|
|
136
|
+
now: current
|
|
137
|
+
},
|
|
138
|
+
...adjustableActions(adjust),
|
|
139
|
+
accessibilityState: {
|
|
140
|
+
disabled: control.disabled
|
|
141
|
+
},
|
|
142
|
+
...fieldAccessibility(control.field),
|
|
143
|
+
style: [stylesheet.container(thumb, control.disabled), style, styles?.container],
|
|
144
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
145
|
+
style: [stylesheet.track(size), styles?.track],
|
|
146
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
147
|
+
style: [stylesheet.fill(size, tone), fillStyle, styles?.fill]
|
|
148
|
+
})
|
|
149
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
150
|
+
style: [stylesheet.thumb(thumb, tone), thumbStyle, styles?.thumb]
|
|
151
|
+
})]
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
const stylesheet = StyleSheet.create(theme => ({
|
|
156
|
+
container: (thumb, disabled) => ({
|
|
157
|
+
height: Math.max(theme.sizes.minTouchTarget, thumb),
|
|
158
|
+
justifyContent: 'center',
|
|
159
|
+
alignSelf: 'stretch',
|
|
160
|
+
opacity: disabledOpacity(theme, disabled)
|
|
161
|
+
}),
|
|
162
|
+
track: size => ({
|
|
163
|
+
height: trackThickness(theme, size),
|
|
164
|
+
borderRadius: theme.radius.full,
|
|
165
|
+
backgroundColor: theme.colors.surfaceSunken,
|
|
166
|
+
borderWidth: theme.sizes.borderWidth,
|
|
167
|
+
borderColor: theme.colors.border,
|
|
168
|
+
overflow: 'hidden'
|
|
169
|
+
}),
|
|
170
|
+
fill: (size, tone) => ({
|
|
171
|
+
height: trackThickness(theme, size),
|
|
172
|
+
backgroundColor: toneColors(theme, tone).solid
|
|
173
|
+
}),
|
|
174
|
+
thumb: (thumb, tone) => ({
|
|
175
|
+
position: 'absolute',
|
|
176
|
+
left: 0,
|
|
177
|
+
width: thumb,
|
|
178
|
+
height: thumb,
|
|
179
|
+
borderRadius: theme.radius.full,
|
|
180
|
+
backgroundColor: theme.colors.surface,
|
|
181
|
+
borderWidth: theme.sizes.borderWidth * 2,
|
|
182
|
+
borderColor: toneColors(theme, tone).solid,
|
|
183
|
+
...nativeShadow(theme, {
|
|
184
|
+
opacity: 0.2
|
|
185
|
+
})
|
|
186
|
+
})
|
|
187
|
+
}));
|
|
188
|
+
//# sourceMappingURL=Slider.js.map
|