glacia-native 0.5.2 → 0.6.1
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 +84 -17
- package/lib/module/Accordion.js +58 -0
- package/lib/module/ActionSheet.js +38 -0
- package/lib/module/Alert.js +23 -0
- package/lib/module/AlertDialog.js +47 -0
- package/lib/module/Avatar.js +48 -0
- package/lib/module/Badge.js +36 -0
- package/lib/module/Bars.js +13 -268
- package/lib/module/Button.js +57 -39
- package/lib/module/Card.js +31 -19
- package/lib/module/Checkbox.js +42 -0
- package/lib/module/Chip.js +80 -0
- package/lib/module/Collapsible.js +26 -0
- package/lib/module/ContextMenu.js +33 -0
- package/lib/module/Dialog.js +39 -123
- package/lib/module/DropdownMenu.js +33 -0
- package/lib/module/Field.js +22 -0
- package/lib/module/Glass.js +10 -3
- package/lib/module/Group.js +36 -0
- package/lib/module/IconButton.js +40 -0
- package/lib/module/Input.js +43 -38
- package/lib/module/Label.js +17 -0
- package/lib/module/MorphGroup.js +47 -0
- package/lib/module/Popover.js +29 -0
- package/lib/module/Progress.js +32 -0
- package/lib/module/RadioGroup.js +51 -0
- package/lib/module/Scrim.js +44 -0
- package/lib/module/SegmentedControl.js +70 -63
- package/lib/module/Select.js +51 -0
- package/lib/module/Separator.js +25 -0
- package/lib/module/Sheet.js +51 -0
- package/lib/module/Skeleton.js +48 -0
- package/lib/module/Slider.js +45 -34
- package/lib/module/Stepper.js +167 -0
- package/lib/module/Switch.js +45 -55
- package/lib/module/TabBar.js +50 -44
- package/lib/module/Textarea.js +18 -0
- package/lib/module/Toast.js +55 -0
- package/lib/module/Toggle.js +47 -0
- package/lib/module/ToggleGroup.js +56 -0
- package/lib/module/Toolbar.js +37 -0
- package/lib/module/Tooltip.js +31 -0
- package/lib/module/glass-provider.js +28 -0
- package/lib/module/glass-stack.js +61 -0
- package/lib/module/index.js +78 -109
- package/lib/module/internal/GlassBackdrop.js +36 -0
- package/lib/module/internal/GlassView.js +43 -11
- package/lib/module/internal/blur-community.js +20 -0
- package/lib/module/internal/blur-community.web.js +9 -0
- package/lib/module/internal/blur.js +6 -9
- package/lib/module/internal/glass-routing.js +156 -30
- package/lib/module/internal/initials.js +12 -0
- package/lib/module/internal/overlay.js +147 -0
- package/lib/module/internal/primitives.js +16 -0
- package/lib/typescript/Accordion.d.ts +22 -0
- package/lib/typescript/ActionSheet.d.ts +24 -0
- package/lib/typescript/Alert.d.ts +15 -0
- package/lib/typescript/AlertDialog.d.ts +17 -0
- package/lib/typescript/Avatar.d.ts +22 -0
- package/lib/typescript/Badge.d.ts +12 -0
- package/lib/typescript/Bars.d.ts +3 -188
- package/lib/typescript/Button.d.ts +44 -10
- package/lib/typescript/Card.d.ts +30 -3
- package/lib/typescript/Checkbox.d.ts +14 -0
- package/lib/typescript/Chip.d.ts +19 -0
- package/lib/typescript/Collapsible.d.ts +17 -0
- package/lib/typescript/ContextMenu.d.ts +23 -0
- package/lib/typescript/Dialog.d.ts +8 -68
- package/lib/typescript/DropdownMenu.d.ts +23 -0
- package/lib/typescript/Field.d.ts +19 -0
- package/lib/typescript/Glass.d.ts +11 -2
- package/lib/typescript/Group.d.ts +35 -0
- package/lib/typescript/IconButton.d.ts +21 -0
- package/lib/typescript/Input.d.ts +17 -18
- package/lib/typescript/Label.d.ts +14 -0
- package/lib/typescript/MorphGroup.d.ts +46 -0
- package/lib/typescript/Popover.d.ts +17 -0
- package/lib/typescript/Progress.d.ts +13 -0
- package/lib/typescript/RadioGroup.d.ts +21 -0
- package/lib/typescript/Scrim.d.ts +33 -0
- package/lib/typescript/SegmentedControl.d.ts +24 -13
- package/lib/typescript/Select.d.ts +19 -0
- package/lib/typescript/Separator.d.ts +10 -0
- package/lib/typescript/Sheet.d.ts +45 -0
- package/lib/typescript/Skeleton.d.ts +10 -0
- package/lib/typescript/Slider.d.ts +15 -7
- package/lib/typescript/Stepper.d.ts +49 -0
- package/lib/typescript/Switch.d.ts +19 -12
- package/lib/typescript/TabBar.d.ts +18 -6
- package/lib/typescript/Textarea.d.ts +6 -0
- package/lib/typescript/Toast.d.ts +40 -0
- package/lib/typescript/Toggle.d.ts +21 -0
- package/lib/typescript/ToggleGroup.d.ts +22 -0
- package/lib/typescript/Toolbar.d.ts +35 -0
- package/lib/typescript/Tooltip.d.ts +16 -0
- package/lib/typescript/glass-provider.d.ts +34 -0
- package/lib/typescript/glass-stack.d.ts +54 -0
- package/lib/typescript/index.d.ts +38 -17
- package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
- package/lib/typescript/internal/GlassView.d.ts +18 -2
- package/lib/typescript/internal/blur-community.d.ts +2 -0
- package/lib/typescript/internal/blur-community.web.d.ts +2 -0
- package/lib/typescript/internal/glass-routing.d.ts +83 -15
- package/lib/typescript/internal/initials.d.ts +2 -0
- package/lib/typescript/internal/overlay.d.ts +74 -0
- package/lib/typescript/internal/primitives.d.ts +11 -0
- package/package.json +12 -10
- package/src/Accordion.tsx +165 -0
- package/src/ActionSheet.tsx +149 -0
- package/src/Alert.tsx +85 -0
- package/src/AlertDialog.tsx +124 -0
- package/src/Avatar.tsx +102 -0
- package/src/Badge.tsx +80 -0
- package/src/Bars.tsx +10 -807
- package/src/Button.tsx +196 -67
- package/src/Card.tsx +105 -32
- package/src/Checkbox.tsx +98 -0
- package/src/Chip.tsx +149 -0
- package/src/Collapsible.tsx +66 -0
- package/src/ContextMenu.tsx +103 -0
- package/src/Dialog.tsx +85 -335
- package/src/DropdownMenu.tsx +103 -0
- package/src/Field.tsx +65 -0
- package/src/Glass.tsx +15 -5
- package/src/Group.tsx +98 -0
- package/src/IconButton.tsx +110 -0
- package/src/Input.tsx +139 -87
- package/src/Label.tsx +56 -0
- package/src/MorphGroup.tsx +134 -0
- package/src/Popover.tsx +81 -0
- package/src/Progress.tsx +83 -0
- package/src/RadioGroup.tsx +122 -0
- package/src/Scrim.tsx +94 -0
- package/src/SegmentedControl.tsx +132 -99
- package/src/Select.tsx +136 -0
- package/src/Separator.tsx +52 -0
- package/src/Sheet.tsx +139 -0
- package/src/Skeleton.tsx +77 -0
- package/src/Slider.tsx +84 -47
- package/src/Stepper.tsx +315 -0
- package/src/Switch.tsx +81 -73
- package/src/TabBar.tsx +106 -93
- package/src/Textarea.tsx +34 -0
- package/src/Toast.tsx +131 -0
- package/src/Toggle.tsx +113 -0
- package/src/ToggleGroup.tsx +129 -0
- package/src/Toolbar.tsx +111 -0
- package/src/Tooltip.tsx +79 -0
- package/src/engine/CHANGELOG.md +430 -0
- package/src/engine/NOTICE +54 -0
- package/src/engine/README.md +975 -0
- package/src/engine/android/build.gradle +18 -0
- package/src/engine/android/src/main/AndroidManifest.xml +2 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
- package/src/engine/index.ts +24 -0
- package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
- package/src/engine/ios/Enums/GlassVariant.swift +86 -0
- package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
- package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
- package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
- package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
- package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
- package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
- package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
- package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
- package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
- package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
- package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
- package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
- package/src/engine/ios/Glass/StripCache.swift +545 -0
- package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
- package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
- package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
- package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
- package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
- package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
- package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
- package/src/engine/package.json +70 -0
- package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
- package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
- package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
- package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
- package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
- package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
- package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
- package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
- package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
- package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
- package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
- package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
- package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
- package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
- package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
- package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
- package/src/engine/src/components/index.ts +16 -0
- package/src/engine/src/constants/index.ts +4 -0
- package/src/engine/src/constants/metal.constants.ts +327 -0
- package/src/engine/src/constants/metrics.constants.ts +325 -0
- package/src/engine/src/constants/springs.constants.ts +107 -0
- package/src/engine/src/constants/styles.constants.ts +12 -0
- package/src/engine/src/context/glass-group.context.ts +65 -0
- package/src/engine/src/context/index.ts +6 -0
- package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
- package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
- package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
- package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
- package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
- package/src/engine/src/core/components/index.ts +4 -0
- package/src/engine/src/core/constants/glass.constants.ts +57 -0
- package/src/engine/src/core/constants/index.ts +20 -0
- package/src/engine/src/core/constants/native.constants.ts +16 -0
- package/src/engine/src/core/context/glass-stack.context.ts +30 -0
- package/src/engine/src/core/context/index.ts +4 -0
- package/src/engine/src/core/enum/index.ts +12 -0
- package/src/engine/src/core/index.ts +1 -0
- package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
- package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
- package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
- package/src/engine/src/core/interfaces/index.ts +31 -0
- package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
- package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
- package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
- package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
- package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
- package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
- package/src/engine/src/core/modules/index.ts +2 -0
- package/src/engine/src/core/root/index.ts +51 -0
- package/src/engine/src/core/types/glass.types.ts +25 -0
- package/src/engine/src/core/types/index.ts +8 -0
- package/src/engine/src/core/utils/debug.utils.ts +17 -0
- package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
- package/src/engine/src/core/utils/hdr.utils.ts +37 -0
- package/src/engine/src/core/utils/index.ts +5 -0
- package/src/engine/src/core/utils/native-view.utils.ts +33 -0
- package/src/engine/src/core/utils/platform.utils.ts +34 -0
- package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
- package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
- package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
- package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
- package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
- package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
- package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
- package/src/engine/src/core/views/index.ts +4 -0
- package/src/engine/src/hooks/index.ts +18 -0
- package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
- package/src/engine/src/hooks/use-damped-drag.ts +332 -0
- package/src/engine/src/hooks/use-echo-filter.ts +55 -0
- package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
- package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
- package/src/engine/src/hooks/use-press-progress.ts +44 -0
- package/src/engine/src/index.ts +120 -0
- package/src/engine/src/interfaces/index.ts +28 -0
- package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
- package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
- package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
- package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
- package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
- package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
- package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
- package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
- package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
- package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
- package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
- package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
- package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
- package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
- package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
- package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
- package/src/engine/src/theme/glass-ui-theme.ts +100 -0
- package/src/engine/src/theme/index.ts +2 -0
- package/src/engine/src/utils/button-press.utils.ts +63 -0
- package/src/engine/src/utils/index.ts +3 -0
- package/src/engine/src/utils/metal.utils.ts +164 -0
- package/src/glass-provider.tsx +60 -0
- package/src/glass-stack.tsx +115 -0
- package/src/index.ts +47 -190
- package/src/internal/GlassBackdrop.tsx +60 -0
- package/src/internal/GlassView.tsx +53 -18
- package/src/internal/blur-community.ts +19 -0
- package/src/internal/blur-community.web.ts +7 -0
- package/src/internal/blur.ts +7 -8
- package/src/internal/glass-routing.ts +212 -34
- package/src/internal/initials.ts +7 -0
- package/src/internal/overlay.tsx +258 -0
- package/src/internal/primitives.ts +23 -0
- package/lib/module/Carousel.js +0 -103
- package/lib/module/Display.js +0 -318
- package/lib/module/Feedback.js +0 -395
- package/lib/module/Form.js +0 -160
- package/lib/module/Forms2.js +0 -471
- package/lib/module/Message.js +0 -84
- package/lib/module/Overlays.js +0 -344
- package/lib/module/Pickers.js +0 -243
- package/lib/module/Table.js +0 -100
- package/lib/module/ai.js +0 -283
- package/lib/module/charts/AreaChart.js +0 -32
- package/lib/module/charts/BarChart.js +0 -75
- package/lib/module/charts/FunnelChart.js +0 -50
- package/lib/module/charts/HeatmapChart.js +0 -71
- package/lib/module/charts/LineChart.js +0 -81
- package/lib/module/charts/PlotChart.js +0 -52
- package/lib/module/charts/RadarChart.js +0 -78
- package/lib/module/charts/RingChart.js +0 -52
- package/lib/module/charts/ScatterChart.js +0 -95
- package/lib/module/charts/WaterfallChart.js +0 -85
- package/lib/module/charts/advanced.js +0 -313
- package/lib/module/charts/extra.js +0 -108
- package/lib/module/charts/index.js +0 -50
- package/lib/module/charts/scales.js +0 -140
- package/lib/typescript/Carousel.d.ts +0 -47
- package/lib/typescript/Display.d.ts +0 -178
- package/lib/typescript/Feedback.d.ts +0 -196
- package/lib/typescript/Form.d.ts +0 -97
- package/lib/typescript/Forms2.d.ts +0 -209
- package/lib/typescript/Message.d.ts +0 -67
- package/lib/typescript/Overlays.d.ts +0 -146
- package/lib/typescript/Pickers.d.ts +0 -105
- package/lib/typescript/Table.d.ts +0 -64
- package/lib/typescript/ai.d.ts +0 -166
- package/lib/typescript/charts/AreaChart.d.ts +0 -44
- package/lib/typescript/charts/BarChart.d.ts +0 -19
- package/lib/typescript/charts/FunnelChart.d.ts +0 -25
- package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
- package/lib/typescript/charts/LineChart.d.ts +0 -30
- package/lib/typescript/charts/PlotChart.d.ts +0 -31
- package/lib/typescript/charts/RadarChart.d.ts +0 -27
- package/lib/typescript/charts/RingChart.d.ts +0 -28
- package/lib/typescript/charts/ScatterChart.d.ts +0 -34
- package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
- package/lib/typescript/charts/advanced.d.ts +0 -107
- package/lib/typescript/charts/extra.d.ts +0 -63
- package/lib/typescript/charts/index.d.ts +0 -13
- package/lib/typescript/charts/scales.d.ts +0 -35
- package/src/Carousel.tsx +0 -233
- package/src/Display.tsx +0 -781
- package/src/Feedback.tsx +0 -992
- package/src/Form.tsx +0 -445
- package/src/Forms2.tsx +0 -1055
- package/src/Message.tsx +0 -218
- package/src/Overlays.tsx +0 -704
- package/src/Pickers.tsx +0 -595
- package/src/Table.tsx +0 -232
- package/src/ai.tsx +0 -715
- package/src/charts/AreaChart.tsx +0 -73
- package/src/charts/BarChart.tsx +0 -221
- package/src/charts/FunnelChart.tsx +0 -125
- package/src/charts/HeatmapChart.tsx +0 -155
- package/src/charts/LineChart.tsx +0 -247
- package/src/charts/PlotChart.tsx +0 -168
- package/src/charts/RadarChart.tsx +0 -208
- package/src/charts/RingChart.tsx +0 -133
- package/src/charts/ScatterChart.tsx +0 -223
- package/src/charts/WaterfallChart.tsx +0 -201
- package/src/charts/advanced.tsx +0 -676
- package/src/charts/extra.tsx +0 -242
- package/src/charts/index.ts +0 -86
- package/src/charts/scales.ts +0 -163
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export type AvatarSize = "sm" | "md" | "lg";
|
|
4
|
-
export interface AvatarProps {
|
|
5
|
-
/** Image to show. When absent, or when it fails to load, initials render. */
|
|
6
|
-
source?: {
|
|
7
|
-
uri: string;
|
|
8
|
-
} | number;
|
|
9
|
-
/** The person's name: initials are derived from it when no image loads. */
|
|
10
|
-
name?: string;
|
|
11
|
-
size?: AvatarSize;
|
|
12
|
-
/** Draws a status dot in the corner. */
|
|
13
|
-
status?: "online" | "offline" | "busy";
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
isDark?: boolean;
|
|
16
|
-
testID?: string;
|
|
17
|
-
}
|
|
18
|
-
/** First letters of the first and last word, as an avatar fallback. */
|
|
19
|
-
export declare function initialsOf(name: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* A person or entity: their picture, or their initials when there is none.
|
|
22
|
-
*
|
|
23
|
-
* The frame is Glacia's glass so it belongs to the same family as the rest of
|
|
24
|
-
* the library; the initials sit on it in the theme's foreground colour.
|
|
25
|
-
*/
|
|
26
|
-
export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<any>>;
|
|
27
|
-
export interface BadgeProps {
|
|
28
|
-
/** The count or short label. Omit to render a plain dot. */
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
/** Draws the badge in the destructive tone (unread, errors). */
|
|
31
|
-
tone?: "fill" | "destructive" | "success" | "muted";
|
|
32
|
-
/** The element to overlay. Supplying it puts the badge in the corner. */
|
|
33
|
-
overlay?: ReactNode;
|
|
34
|
-
style?: StyleProp<ViewStyle>;
|
|
35
|
-
isDark?: boolean;
|
|
36
|
-
testID?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* A small count or dot.
|
|
40
|
-
*
|
|
41
|
-
* Deliberately not glass: a badge is a micro-element, and a translucent 16pt
|
|
42
|
-
* chip loses its contrast against whatever it sits on. It uses the solid theme
|
|
43
|
-
* tint instead, which is what makes it legible in both themes.
|
|
44
|
-
*/
|
|
45
|
-
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<any>>;
|
|
46
|
-
export interface SeparatorProps {
|
|
47
|
-
orientation?: "horizontal" | "vertical";
|
|
48
|
-
/** Inset from the leading edge, matching a list row's leading accessory. */
|
|
49
|
-
inset?: number;
|
|
50
|
-
style?: StyleProp<ViewStyle>;
|
|
51
|
-
isDark?: boolean;
|
|
52
|
-
testID?: string;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* A hairline divider in the theme's separator colour.
|
|
56
|
-
*
|
|
57
|
-
* A plain View rather than a Glass: a 1pt rule is not a surface, and glass on
|
|
58
|
-
* a line has nothing to refract.
|
|
59
|
-
*/
|
|
60
|
-
export declare const Separator: import("react").ForwardRefExoticComponent<SeparatorProps & import("react").RefAttributes<any>>;
|
|
61
|
-
export interface SkeletonProps {
|
|
62
|
-
/** Rectangles for cards and rows, circles for avatars, lines for a run of text. */
|
|
63
|
-
shape?: "rect" | "circle" | "line";
|
|
64
|
-
width?: number | string;
|
|
65
|
-
height?: number;
|
|
66
|
-
style?: StyleProp<ViewStyle>;
|
|
67
|
-
isDark?: boolean;
|
|
68
|
-
testID?: string;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* A loading placeholder.
|
|
72
|
-
*
|
|
73
|
-
* The pulse is opacity only and slow, on the gentle spring, so it reads as
|
|
74
|
-
* "loading" without motion that could bother someone sensitive to movement.
|
|
75
|
-
* Nothing about it is essential to understanding the screen, so it is hidden
|
|
76
|
-
* from screen readers rather than announced.
|
|
77
|
-
*/
|
|
78
|
-
export declare const Skeleton: import("react").ForwardRefExoticComponent<SkeletonProps & import("react").RefAttributes<any>>;
|
|
79
|
-
export type SpinnerSize = "sm" | "md" | "lg";
|
|
80
|
-
export interface SpinnerProps {
|
|
81
|
-
size?: SpinnerSize;
|
|
82
|
-
/** Spinner colour; defaults to the theme's muted foreground. */
|
|
83
|
-
tint?: string;
|
|
84
|
-
/** Announced to screen readers, since a spinner alone has no text. */
|
|
85
|
-
accessibilityLabel?: string;
|
|
86
|
-
style?: StyleProp<ViewStyle>;
|
|
87
|
-
isDark?: boolean;
|
|
88
|
-
testID?: string;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* A loading spinner, drawn by Glacia.
|
|
92
|
-
*
|
|
93
|
-
* An SVG arc that rotates on the gentle spring through Animated — not the
|
|
94
|
-
* platform's ActivityIndicator, so it looks the same on every platform and
|
|
95
|
-
* wears the theme's colour instead of inheriting the system tint.
|
|
96
|
-
*/
|
|
97
|
-
export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<any>>;
|
|
98
|
-
export type ProgressVariant = "bar" | "ring";
|
|
99
|
-
export interface ProgressProps {
|
|
100
|
-
/** 0–100. Values outside the range are clamped rather than drawn wrong. */
|
|
101
|
-
value: number;
|
|
102
|
-
variant?: ProgressVariant;
|
|
103
|
-
/** Overrides the fill colour; defaults to the theme accent. */
|
|
104
|
-
tint?: string;
|
|
105
|
-
/** Announced by screen readers, e.g. "Uploading photo". */
|
|
106
|
-
accessibilityLabel?: string;
|
|
107
|
-
style?: StyleProp<ViewStyle>;
|
|
108
|
-
isDark?: boolean;
|
|
109
|
-
testID?: string;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Progress, linear or circular.
|
|
113
|
-
*
|
|
114
|
-
* The track is a glass surface, so it refracts what it sits on exactly like the
|
|
115
|
-
* rest of the library; the fill is the theme accent. Both forms report
|
|
116
|
-
* `progressbar` with a value, which is the contract NativeTask relies on
|
|
117
|
-
* internally — this component generalises it.
|
|
118
|
-
*/
|
|
119
|
-
export declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<any>>;
|
|
120
|
-
export interface RatingProps {
|
|
121
|
-
/** How many stars are filled. Fractions render a partially filled star. */
|
|
122
|
-
value: number;
|
|
123
|
-
/** The number of stars. Defaults to five. */
|
|
124
|
-
max?: number;
|
|
125
|
-
size?: "sm" | "md" | "lg";
|
|
126
|
-
/** Makes the stars tappable. Omit for a read-only rating. */
|
|
127
|
-
onChange?: (value: number) => void;
|
|
128
|
-
disabled?: boolean;
|
|
129
|
-
/** The accessible name, e.g. "Rating". */
|
|
130
|
-
accessibilityLabel?: string;
|
|
131
|
-
style?: StyleProp<ViewStyle>;
|
|
132
|
-
isDark?: boolean;
|
|
133
|
-
testID?: string;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* A star rating.
|
|
137
|
-
*
|
|
138
|
-
* The stars are drawn as SVG paths from the resolver, so nothing is a
|
|
139
|
-
* platform control. A fractional value fills part of a star: 3.5 draws three
|
|
140
|
-
* full stars and one half, the half produced by clipping the filled star at the
|
|
141
|
-
* fraction's width rather than by rounding — a 4.5-star average must look like
|
|
142
|
-
* a 4.5-star average.
|
|
143
|
-
*
|
|
144
|
-
* Read-only unless `onChange` is given. With it, each star is tappable, the
|
|
145
|
-
* value is exposed as an adjustable control (increment/decrement through
|
|
146
|
-
* accessibility actions), and each star has its own label so a screen reader
|
|
147
|
-
* can name the exact rating it sets.
|
|
148
|
-
*/
|
|
149
|
-
export declare const Rating: import("react").ForwardRefExoticComponent<RatingProps & import("react").RefAttributes<any>>;
|
|
150
|
-
export interface NativeImageProps {
|
|
151
|
-
/** The image to show. */
|
|
152
|
-
source: {
|
|
153
|
-
uri: string;
|
|
154
|
-
} | number;
|
|
155
|
-
/** A description for screen readers. Required: an image with no name is a hole. */
|
|
156
|
-
accessibilityLabel: string;
|
|
157
|
-
/** Shown behind the image while it loads; a Skeleton when omitted. */
|
|
158
|
-
placeholder?: ReactNode;
|
|
159
|
-
/** Shown when the image fails to load. */
|
|
160
|
-
fallback?: ReactNode;
|
|
161
|
-
/** Fades the image in when it loads. Honours Reduce Motion. */
|
|
162
|
-
fadeIn?: boolean;
|
|
163
|
-
style?: StyleProp<ViewStyle>;
|
|
164
|
-
isDark?: boolean;
|
|
165
|
-
testID?: string;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* A plain image, with the loading and error states every app ends up writing.
|
|
169
|
-
*
|
|
170
|
-
* Three states, because an image on a phone is three states: loading (a
|
|
171
|
-
* Skeleton behind it), loaded (a fade in), and failed (the caller's fallback).
|
|
172
|
-
* Aspect ratio comes from `style`, so a caller sets `aspectRatio` and the height
|
|
173
|
-
* follows.
|
|
174
|
-
*
|
|
175
|
-
* This is the plain one; `NativeImageGeneration` is the AI-specific cousin and
|
|
176
|
-
* keeps its own state machine.
|
|
177
|
-
*/
|
|
178
|
-
export declare const NativeImage: import("react").ForwardRefExoticComponent<NativeImageProps & import("react").RefAttributes<any>>;
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import { type Tone } from "./internal/tokens";
|
|
4
|
-
export interface ToastAction {
|
|
5
|
-
label: string;
|
|
6
|
-
onPress: () => void;
|
|
7
|
-
}
|
|
8
|
-
export interface ToastProps {
|
|
9
|
-
/** Controlled visibility. Omit it and the toast keeps its own state. */
|
|
10
|
-
visible?: boolean;
|
|
11
|
-
defaultVisible?: boolean;
|
|
12
|
-
onDismiss?: () => void;
|
|
13
|
-
message: string;
|
|
14
|
-
/** One optional action, e.g. Undo. */
|
|
15
|
-
action?: ToastAction;
|
|
16
|
-
/** A leading icon (an SVG node the caller supplies). */
|
|
17
|
-
icon?: ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Milliseconds before it dismisses itself. 0 keeps it until dismissed.
|
|
20
|
-
* The timer is cleared on unmount as well as on dismiss.
|
|
21
|
-
*/
|
|
22
|
-
duration?: number;
|
|
23
|
-
tone?: Tone | "neutral";
|
|
24
|
-
style?: StyleProp<ViewStyle>;
|
|
25
|
-
isDark?: boolean;
|
|
26
|
-
testID?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A transient message on a glass pill.
|
|
30
|
-
*
|
|
31
|
-
* A toast is not a dialog: it never blocks the screen, so it renders in place
|
|
32
|
-
* and lets touches through to what is underneath. It dismisses itself after
|
|
33
|
-
* `duration` unless it is controlled or `duration` is 0.
|
|
34
|
-
*/
|
|
35
|
-
export declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<any>>;
|
|
36
|
-
/** One message in a ToastViewport's queue. */
|
|
37
|
-
export interface ToastItem {
|
|
38
|
-
/** A stable identity. Required, because the queue reorders and dismisses. */
|
|
39
|
-
id: string;
|
|
40
|
-
message: string;
|
|
41
|
-
action?: ToastAction;
|
|
42
|
-
icon?: ReactNode;
|
|
43
|
-
tone?: Tone | "neutral";
|
|
44
|
-
/** Milliseconds before it dismisses itself. 0 keeps it until dismissed. */
|
|
45
|
-
duration?: number;
|
|
46
|
-
}
|
|
47
|
-
export interface ToastViewportProps {
|
|
48
|
-
/** The messages to show. The oldest are dropped when more than 3 arrive. */
|
|
49
|
-
toasts: ToastItem[];
|
|
50
|
-
/** Called when one leaves, by timer, by swipe or by its action. */
|
|
51
|
-
onDismiss: (id: string) => void;
|
|
52
|
-
/** How many are visible at once. Extras wait in order. Defaults to 3. */
|
|
53
|
-
max?: number;
|
|
54
|
-
/** Where the stack sits. */
|
|
55
|
-
position?: "top" | "bottom";
|
|
56
|
-
style?: StyleProp<ViewStyle>;
|
|
57
|
-
isDark?: boolean;
|
|
58
|
-
testID?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* A queue of toasts, stacked the way Sonner stacks them.
|
|
62
|
-
*
|
|
63
|
-
* Three at a time is the practical limit: beyond that the messages stop being
|
|
64
|
-
* read and start covering the screen. Extras wait in the order they arrived, so
|
|
65
|
-
* no message is lost and the newest is never hidden behind a backlog.
|
|
66
|
-
*
|
|
67
|
-
* Each toast is independently dismissible — its own timer, its own action, and
|
|
68
|
-
* a swipe up. Swiping one up removes only that one.
|
|
69
|
-
*
|
|
70
|
-
* The single `Toast` keeps working unchanged: this is the host for when an app
|
|
71
|
-
* has several messages at once, not a replacement. A caller that shows one
|
|
72
|
-
* message continues to use `Toast` directly.
|
|
73
|
-
*/
|
|
74
|
-
export declare const ToastViewport: import("react").ForwardRefExoticComponent<ToastViewportProps & import("react").RefAttributes<any>>;
|
|
75
|
-
export interface BannerProps {
|
|
76
|
-
title?: string;
|
|
77
|
-
message: string;
|
|
78
|
-
tone?: Tone;
|
|
79
|
-
/** A leading icon node. */
|
|
80
|
-
icon?: ReactNode;
|
|
81
|
-
/** Shows a dismiss button when provided. */
|
|
82
|
-
onDismiss?: () => void;
|
|
83
|
-
/** A single inline action, e.g. Retry. */
|
|
84
|
-
action?: ToastAction;
|
|
85
|
-
style?: StyleProp<ViewStyle>;
|
|
86
|
-
isDark?: boolean;
|
|
87
|
-
testID?: string;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* An inline alert.
|
|
91
|
-
*
|
|
92
|
-
* Unlike AlertDialog it is not modal and not an overlay: it sits in the layout
|
|
93
|
-
* and pushes the content below it down. The surface is glass with the tone's
|
|
94
|
-
* colour as its edge, so the tone reads at a glance without turning the whole
|
|
95
|
-
* panel into a solid block of colour.
|
|
96
|
-
*/
|
|
97
|
-
export declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<any>>;
|
|
98
|
-
/** One action revealed by swiping a row. */
|
|
99
|
-
export interface ListSwipeAction {
|
|
100
|
-
label: string;
|
|
101
|
-
/** A leading node, typically an SVG icon the caller supplies. */
|
|
102
|
-
icon?: ReactNode;
|
|
103
|
-
/** The action's tint. Defaults to the theme's fill. */
|
|
104
|
-
color?: string;
|
|
105
|
-
onPress: () => void;
|
|
106
|
-
}
|
|
107
|
-
export interface ListItemProps {
|
|
108
|
-
/** An avatar, icon or other leading node. */
|
|
109
|
-
leading?: ReactNode;
|
|
110
|
-
/** The row's main text. */
|
|
111
|
-
title: string;
|
|
112
|
-
/** Secondary line under the title. */
|
|
113
|
-
description?: string;
|
|
114
|
-
/** A value text, a control, or any trailing node. */
|
|
115
|
-
trailing?: ReactNode;
|
|
116
|
-
/** Draws a chevron when the row is tappable and nothing else trails it. */
|
|
117
|
-
chevron?: boolean;
|
|
118
|
-
onPress?: () => void;
|
|
119
|
-
disabled?: boolean;
|
|
120
|
-
selected?: boolean;
|
|
121
|
-
/** Actions revealed by swiping right (towards the trailing edge). */
|
|
122
|
-
swipeActions?: ListSwipeAction[];
|
|
123
|
-
/** Actions revealed by swiping left. */
|
|
124
|
-
leadingSwipeActions?: ListSwipeAction[];
|
|
125
|
-
/** Width allotted to each revealed action button. */
|
|
126
|
-
swipeActionWidth?: number;
|
|
127
|
-
/** Turns the swipe gesture off, leaving the row's `onPress` only. */
|
|
128
|
-
swipeable?: boolean;
|
|
129
|
-
/** Opt out of the selection tick when a swipe opens. */
|
|
130
|
-
haptics?: boolean;
|
|
131
|
-
style?: StyleProp<ViewStyle>;
|
|
132
|
-
isDark?: boolean;
|
|
133
|
-
testID?: string;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* One row of a List.
|
|
137
|
-
*
|
|
138
|
-
* The row is a Pressable when it has an `onPress`, and inert otherwise, which
|
|
139
|
-
* is what the platform expects: a row that does nothing should not announce
|
|
140
|
-
* itself as a button. The chevron is decoration and is hidden from screen
|
|
141
|
-
* readers, since the row's own role already says it is tappable.
|
|
142
|
-
*/
|
|
143
|
-
export declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<any>>;
|
|
144
|
-
export interface ListProps {
|
|
145
|
-
children?: ReactNode;
|
|
146
|
-
/** Renders the rows on one glass panel with separators between them. */
|
|
147
|
-
inset?: boolean;
|
|
148
|
-
style?: StyleProp<ViewStyle>;
|
|
149
|
-
isDark?: boolean;
|
|
150
|
-
testID?: string;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* A grouped list of rows — the backbone of settings and profile screens.
|
|
154
|
-
*
|
|
155
|
-
* With `inset`, the rows sit on one glass panel with hairline separators, which
|
|
156
|
-
* is the shape iOS settings screens use. The separators are drawn by the
|
|
157
|
-
* caller's ListItem spacing rather than by nesting glass inside glass.
|
|
158
|
-
*/
|
|
159
|
-
export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<any>>;
|
|
160
|
-
/** A titled group of rows, e.g. "Account" above its settings. */
|
|
161
|
-
export interface ListSectionProps {
|
|
162
|
-
header?: string;
|
|
163
|
-
children?: ReactNode;
|
|
164
|
-
style?: StyleProp<ViewStyle>;
|
|
165
|
-
isDark?: boolean;
|
|
166
|
-
testID?: string;
|
|
167
|
-
}
|
|
168
|
-
export declare const ListSection: import("react").ForwardRefExoticComponent<ListSectionProps & import("react").RefAttributes<any>>;
|
|
169
|
-
export interface AccordionSection {
|
|
170
|
-
/** Stable identity for the section. */
|
|
171
|
-
value: string;
|
|
172
|
-
title: string;
|
|
173
|
-
/** Optional second line in the header. */
|
|
174
|
-
description?: string;
|
|
175
|
-
content: ReactNode;
|
|
176
|
-
}
|
|
177
|
-
export interface AccordionProps {
|
|
178
|
-
sections: AccordionSection[];
|
|
179
|
-
/** Allow several sections open at once. */
|
|
180
|
-
multiple?: boolean;
|
|
181
|
-
/** Controlled open sections. Omit for uncontrolled. */
|
|
182
|
-
openSections?: string[];
|
|
183
|
-
defaultOpenSections?: string[];
|
|
184
|
-
onOpenSectionsChange?: (open: string[]) => void;
|
|
185
|
-
style?: StyleProp<ViewStyle>;
|
|
186
|
-
isDark?: boolean;
|
|
187
|
-
testID?: string;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Expandable sections.
|
|
191
|
-
*
|
|
192
|
-
* The header is a Pressable reporting `expanded`; the panel is measured with
|
|
193
|
-
* the height the content reports and animated on the springs token, so the
|
|
194
|
-
* reveal is a real transition rather than an instant jump.
|
|
195
|
-
*/
|
|
196
|
-
export declare const Accordion: import("react").ForwardRefExoticComponent<AccordionProps & import("react").RefAttributes<any>>;
|
package/lib/typescript/Form.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
-
export interface LabelProps {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
/** Marks the field required with a visible asterisk. */
|
|
6
|
-
required?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The id of the control this label describes. Same meaning and prop name as
|
|
10
|
-
* React Native's `nativeID`.
|
|
11
|
-
*/
|
|
12
|
-
nativeID?: string;
|
|
13
|
-
isDark?: boolean;
|
|
14
|
-
style?: StyleProp<TextStyle>;
|
|
15
|
-
}
|
|
16
|
-
/** The text above a control. */
|
|
17
|
-
export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<any>>;
|
|
18
|
-
export interface FieldProps {
|
|
19
|
-
label?: string;
|
|
20
|
-
/** Helper text shown under the control. */
|
|
21
|
-
description?: string;
|
|
22
|
-
/** Error text. Overrides `description` and tints the label. */
|
|
23
|
-
error?: string;
|
|
24
|
-
required?: boolean;
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
isDark?: boolean;
|
|
27
|
-
children?: ReactNode;
|
|
28
|
-
style?: StyleProp<ViewStyle>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Label, control and message stacked in the order assistive tech announces
|
|
32
|
-
* them, so a caller never has to place these three by hand.
|
|
33
|
-
*/
|
|
34
|
-
export declare function Field({ label, description, error, required, disabled, isDark: isDarkProp, children, style, }: FieldProps): import("react").JSX.Element;
|
|
35
|
-
export interface CheckboxProps {
|
|
36
|
-
checked?: boolean;
|
|
37
|
-
/** Starting state for uncontrolled use. */
|
|
38
|
-
defaultChecked?: boolean;
|
|
39
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
40
|
-
label?: string;
|
|
41
|
-
description?: string;
|
|
42
|
-
indeterminate?: boolean;
|
|
43
|
-
disabled?: boolean;
|
|
44
|
-
isDark?: boolean;
|
|
45
|
-
style?: StyleProp<ViewStyle>;
|
|
46
|
-
/** Passed through to the pressable row so it is testable. */
|
|
47
|
-
testID?: string;
|
|
48
|
-
}
|
|
49
|
-
/** A tick box for a single boolean, with an optional label and description. */
|
|
50
|
-
export declare function Checkbox({ checked: checkedProp, defaultChecked, onCheckedChange, label, description, indeterminate, disabled, isDark: isDarkProp, style, testID, }: CheckboxProps): import("react").JSX.Element;
|
|
51
|
-
export interface RadioOption {
|
|
52
|
-
value: string;
|
|
53
|
-
label: string;
|
|
54
|
-
description?: string;
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface RadioGroupProps {
|
|
58
|
-
value?: string;
|
|
59
|
-
/** Starting selection for uncontrolled use. */
|
|
60
|
-
defaultValue?: string;
|
|
61
|
-
onValueChange?: (value: string) => void;
|
|
62
|
-
options: RadioOption[];
|
|
63
|
-
/** Lay the options out in a row instead of a column. */
|
|
64
|
-
horizontal?: boolean;
|
|
65
|
-
disabled?: boolean;
|
|
66
|
-
isDark?: boolean;
|
|
67
|
-
style?: StyleProp<ViewStyle>;
|
|
68
|
-
/** Passed through to the group so it is testable. */
|
|
69
|
-
testID?: string;
|
|
70
|
-
}
|
|
71
|
-
/** One choice from a small, always-visible set. */
|
|
72
|
-
export declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, options, horizontal, disabled, isDark: isDarkProp, style, testID, }: RadioGroupProps): import("react").JSX.Element;
|
|
73
|
-
export interface SelectOption {
|
|
74
|
-
value: string;
|
|
75
|
-
label: string;
|
|
76
|
-
}
|
|
77
|
-
export interface SelectProps {
|
|
78
|
-
value?: string;
|
|
79
|
-
/** Starting selection for uncontrolled use. */
|
|
80
|
-
defaultValue?: string;
|
|
81
|
-
onValueChange?: (value: string) => void;
|
|
82
|
-
options: SelectOption[];
|
|
83
|
-
placeholder?: string;
|
|
84
|
-
disabled?: boolean;
|
|
85
|
-
isDark?: boolean;
|
|
86
|
-
style?: StyleProp<ViewStyle>;
|
|
87
|
-
/** Passed through to the trigger so it is testable. */
|
|
88
|
-
testID?: string;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* A dropdown of mutually exclusive options.
|
|
92
|
-
*
|
|
93
|
-
* Native has no built-in picker that looks the same on iOS and Android, so the
|
|
94
|
-
* list opens inline: predictable across platforms and reachable without a
|
|
95
|
-
* modal. A long list scrolls naturally with the page.
|
|
96
|
-
*/
|
|
97
|
-
export declare function Select({ value: valueProp, defaultValue, onValueChange, options, placeholder, disabled, isDark: isDarkProp, style, testID, }: SelectProps): import("react").JSX.Element;
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export interface StepperProps {
|
|
4
|
-
/** Controlled value. Omit and the stepper keeps its own. */
|
|
5
|
-
value?: number;
|
|
6
|
-
defaultValue?: number;
|
|
7
|
-
onValueChange?: (value: number) => void;
|
|
8
|
-
min?: number;
|
|
9
|
-
max?: number;
|
|
10
|
-
step?: number;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/** Announced by screen readers, e.g. "Guests". */
|
|
13
|
-
accessibilityLabel: string;
|
|
14
|
-
/** Formats the middle readout; defaults to the plain number. */
|
|
15
|
-
formatValue?: (value: number) => string;
|
|
16
|
-
style?: StyleProp<ViewStyle>;
|
|
17
|
-
isDark?: boolean;
|
|
18
|
-
testID?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Minus / value / plus.
|
|
22
|
-
*
|
|
23
|
-
* The same interaction contract Slider established: `adjustable` with
|
|
24
|
-
* increment and decrement accessibility actions, and clamping at min and max
|
|
25
|
-
* rather than wrapping or drifting past the range.
|
|
26
|
-
*/
|
|
27
|
-
export declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<any>>;
|
|
28
|
-
export interface ToggleProps {
|
|
29
|
-
/** Controlled pressed state. Omit and the toggle keeps its own. */
|
|
30
|
-
pressed?: boolean;
|
|
31
|
-
defaultPressed?: boolean;
|
|
32
|
-
onPressedChange?: (pressed: boolean) => void;
|
|
33
|
-
/** Equivalent to `pressed`, matching web's Toggle naming. */
|
|
34
|
-
selected?: boolean;
|
|
35
|
-
icon?: ReactNode;
|
|
36
|
-
children?: ReactNode;
|
|
37
|
-
variant?: "glass" | "ghost";
|
|
38
|
-
size?: "sm" | "md" | "lg";
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
/** Required when the toggle has no visible text. */
|
|
41
|
-
accessibilityLabel?: string;
|
|
42
|
-
style?: StyleProp<ViewStyle>;
|
|
43
|
-
isDark?: boolean;
|
|
44
|
-
testID?: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A button that stays pressed.
|
|
48
|
-
*
|
|
49
|
-
* Distinct from Switch: this is a button with an on-state (bold, favourite,
|
|
50
|
-
* pinned), not a setting. It reports `selected`, which is what web's Toggle
|
|
51
|
-
* announces.
|
|
52
|
-
*/
|
|
53
|
-
export declare const Toggle: import("react").ForwardRefExoticComponent<ToggleProps & import("react").RefAttributes<any>>;
|
|
54
|
-
export interface ToggleGroupItem {
|
|
55
|
-
value: string;
|
|
56
|
-
label: string;
|
|
57
|
-
icon?: ReactNode;
|
|
58
|
-
}
|
|
59
|
-
export interface ToggleGroupProps {
|
|
60
|
-
items: ToggleGroupItem[];
|
|
61
|
-
/** Allow several items on at once. */
|
|
62
|
-
multiple?: boolean;
|
|
63
|
-
/** Controlled selection. A string for single mode, an array for multiple. */
|
|
64
|
-
value?: string | string[];
|
|
65
|
-
defaultValue?: string | string[];
|
|
66
|
-
onValueChange?: (value: string | string[]) => void;
|
|
67
|
-
size?: "sm" | "md" | "lg";
|
|
68
|
-
disabled?: boolean;
|
|
69
|
-
accessibilityLabel?: string;
|
|
70
|
-
style?: StyleProp<ViewStyle>;
|
|
71
|
-
isDark?: boolean;
|
|
72
|
-
testID?: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* A row of toggles acting as one choice.
|
|
76
|
-
*
|
|
77
|
-
* Built from the same pieces as SegmentedControl — one glass container, toggles
|
|
78
|
-
* inside it, `glassActive` marking the active ones — but each item carries the
|
|
79
|
-
* button styling of Toggle.
|
|
80
|
-
*/
|
|
81
|
-
export declare const ToggleGroup: import("react").ForwardRefExoticComponent<ToggleGroupProps & import("react").RefAttributes<any>>;
|
|
82
|
-
export interface InputOTPProps {
|
|
83
|
-
/** Controlled code. Omit and the field keeps its own. */
|
|
84
|
-
value?: string;
|
|
85
|
-
defaultValue?: string;
|
|
86
|
-
onChange?: (value: string) => void;
|
|
87
|
-
/** Fires once the code reaches `length` characters. */
|
|
88
|
-
onComplete?: (value: string) => void;
|
|
89
|
-
/** How many digits. */
|
|
90
|
-
length?: number;
|
|
91
|
-
disabled?: boolean;
|
|
92
|
-
accessibilityLabel?: string;
|
|
93
|
-
style?: StyleProp<ViewStyle>;
|
|
94
|
-
isDark?: boolean;
|
|
95
|
-
testID?: string;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* A verification-code row.
|
|
99
|
-
*
|
|
100
|
-
* One real text field drives the boxes. Keeping a single field — rather than N
|
|
101
|
-
* inputs — is what makes paste and autofill fill every box in one go, and it is
|
|
102
|
-
* what keeps the caret and keyboard behaviour sane across platforms.
|
|
103
|
-
*/
|
|
104
|
-
export declare const InputOTP: import("react").ForwardRefExoticComponent<InputOTPProps & import("react").RefAttributes<any>>;
|
|
105
|
-
export interface ButtonGroupItem {
|
|
106
|
-
label: string;
|
|
107
|
-
onPress: () => void;
|
|
108
|
-
disabled?: boolean;
|
|
109
|
-
}
|
|
110
|
-
export interface ButtonGroupProps {
|
|
111
|
-
items: ButtonGroupItem[];
|
|
112
|
-
size?: "sm" | "md" | "lg";
|
|
113
|
-
/** `attached` shares edges; `segmented` leaves a gap between buttons. */
|
|
114
|
-
variant?: "attached" | "segmented";
|
|
115
|
-
/** A single handler instead of per-item `onPress`. */
|
|
116
|
-
onItemPress?: (item: ButtonGroupItem, index: number) => void;
|
|
117
|
-
accessibilityLabel?: string;
|
|
118
|
-
style?: StyleProp<ViewStyle>;
|
|
119
|
-
isDark?: boolean;
|
|
120
|
-
testID?: string;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* A connected row of buttons.
|
|
124
|
-
*
|
|
125
|
-
* Stateless by design: it reports presses and holds no selection, which is what
|
|
126
|
-
* separates it from SegmentedControl (a stateful choice) and ToggleGroup.
|
|
127
|
-
*/
|
|
128
|
-
export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<any>>;
|
|
129
|
-
export interface ColorPickerProps {
|
|
130
|
-
/** A palette of hex colours the caller supplies. */
|
|
131
|
-
colors?: string[];
|
|
132
|
-
/** Controlled value. Omit and the picker keeps its own. */
|
|
133
|
-
value?: string;
|
|
134
|
-
defaultValue?: string;
|
|
135
|
-
onChange?: (color: string) => void;
|
|
136
|
-
/** The swatch size. */
|
|
137
|
-
size?: "sm" | "md" | "lg";
|
|
138
|
-
/** Rows in the palette grid. Defaults to a single row. */
|
|
139
|
-
columns?: number;
|
|
140
|
-
/** Whether a custom row (hue + picker) appears below the palette. */
|
|
141
|
-
allowCustom?: boolean;
|
|
142
|
-
disabled?: boolean;
|
|
143
|
-
/** The accessible name. */
|
|
144
|
-
accessibilityLabel?: string;
|
|
145
|
-
style?: StyleProp<ViewStyle>;
|
|
146
|
-
isDark?: boolean;
|
|
147
|
-
testID?: string;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* A colour picker built from Glacia's own parts — no native widget.
|
|
151
|
-
*
|
|
152
|
-
* The palette is a grid of swatches from the caller's colours; the custom row
|
|
153
|
-
* is a hue track drawn as an SVG gradient (the resolver's shapes, so it works
|
|
154
|
-
* wherever the charts work) driven by the same Slider mechanics as the rest of
|
|
155
|
-
* the library: a drag along the track picks a hue, and a second track saturates
|
|
156
|
-
* it. The value is a hex string.
|
|
157
|
-
*
|
|
158
|
-
* The default palette is a small set of iOS-conventional colours, in case a
|
|
159
|
-
* caller wants a picker with no colour knowledge of its own.
|
|
160
|
-
*/
|
|
161
|
-
export declare const DEFAULT_PALETTE: string[];
|
|
162
|
-
/** Parses a hex colour into its red, green and blue channels. */
|
|
163
|
-
export declare function hexToRgb(hex: string): {
|
|
164
|
-
r: number;
|
|
165
|
-
g: number;
|
|
166
|
-
b: number;
|
|
167
|
-
} | null;
|
|
168
|
-
/** Builds a hue gradient's colours, sweeping red → orange → … → red. */
|
|
169
|
-
export declare function hueGradientColors(): string[];
|
|
170
|
-
/** Converts an RGB triple to a hex string. */
|
|
171
|
-
export declare function rgbToHex(r: number, g: number, b: number): string;
|
|
172
|
-
export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<any>>;
|
|
173
|
-
export interface ComboboxOption {
|
|
174
|
-
label: string;
|
|
175
|
-
value: string;
|
|
176
|
-
/** Extra text under the label, if any. */
|
|
177
|
-
description?: string;
|
|
178
|
-
}
|
|
179
|
-
export interface ComboboxProps {
|
|
180
|
-
/** The options the user can choose from. */
|
|
181
|
-
options: ComboboxOption[];
|
|
182
|
-
/** Controlled value. Omit and the combobox keeps its own. */
|
|
183
|
-
value?: string;
|
|
184
|
-
defaultValue?: string;
|
|
185
|
-
onChange?: (value: string) => void;
|
|
186
|
-
/** A description of the underlying field. */
|
|
187
|
-
label?: string;
|
|
188
|
-
placeholder?: string;
|
|
189
|
-
disabled?: boolean;
|
|
190
|
-
/** Called when the dropdown's empty result shows. */
|
|
191
|
-
onEmpty?: () => void;
|
|
192
|
-
style?: StyleProp<ViewStyle>;
|
|
193
|
-
isDark?: boolean;
|
|
194
|
-
testID?: string;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* A type-to-search select.
|
|
198
|
-
*
|
|
199
|
-
* The Input patterns (real TextInput, themed placeholder, `value`/`defaultValue`)
|
|
200
|
-
* open a Menu-style glass dropdown whose list filters as the user types — every
|
|
201
|
-
* keystroke re-filters the options, so the visible set genuinely shrinks, never
|
|
202
|
-
* a list that stays put and pretends to search.
|
|
203
|
-
*
|
|
204
|
-
* The filter is a case-insensitive substring match on label and description. An
|
|
205
|
-
* empty result shows an explicit empty row, so the user sees a search that found
|
|
206
|
-
* nothing rather than a list that silently went blank. The dropdown stays open
|
|
207
|
-
* until an option is picked or the field loses focus.
|
|
208
|
-
*/
|
|
209
|
-
export declare const Combobox: import("react").ForwardRefExoticComponent<ComboboxProps & import("react").RefAttributes<any>>;
|