glacia-native 0.5.2 → 0.6.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 +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 +154 -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 +4 -2
- 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 +211 -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
package/lib/module/Feedback.js
DELETED
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Accordion = exports.ListSection = exports.List = exports.ListItem = exports.Banner = exports.ToastViewport = exports.Toast = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const Glass_1 = require("./Glass");
|
|
7
|
-
const Display_1 = require("./Display");
|
|
8
|
-
const tokens_1 = require("./internal/tokens");
|
|
9
|
-
const primitives_1 = require("./internal/primitives");
|
|
10
|
-
const motion_1 = require("./internal/motion");
|
|
11
|
-
const lens_1 = require("./internal/lens");
|
|
12
|
-
const haptics_1 = require("./internal/haptics");
|
|
13
|
-
/**
|
|
14
|
-
* A transient message on a glass pill.
|
|
15
|
-
*
|
|
16
|
-
* A toast is not a dialog: it never blocks the screen, so it renders in place
|
|
17
|
-
* and lets touches through to what is underneath. It dismisses itself after
|
|
18
|
-
* `duration` unless it is controlled or `duration` is 0.
|
|
19
|
-
*/
|
|
20
|
-
exports.Toast = (0, react_1.forwardRef)(function Toast({ visible: visibleProp, defaultVisible = false, onDismiss, message, action, icon, duration = 4000, tone = "neutral", style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
21
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
22
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
23
|
-
const { View, Text: RNText, Pressable } = (0, primitives_1.primitives)();
|
|
24
|
-
const [internalVisible, setInternalVisible] = (0, react_1.useState)(defaultVisible);
|
|
25
|
-
const visible = visibleProp !== undefined ? visibleProp : internalVisible;
|
|
26
|
-
const dismiss = () => {
|
|
27
|
-
if (visibleProp === undefined)
|
|
28
|
-
setInternalVisible(false);
|
|
29
|
-
onDismiss?.();
|
|
30
|
-
};
|
|
31
|
-
// The timer lives and dies with the toast. A ref keeps the latest dismiss
|
|
32
|
-
// closure out of the effect's dependencies, so a parent re-render does not
|
|
33
|
-
// restart the countdown.
|
|
34
|
-
const dismissRef = (0, react_1.useRef)(dismiss);
|
|
35
|
-
dismissRef.current = dismiss;
|
|
36
|
-
(0, react_1.useEffect)(() => {
|
|
37
|
-
if (!visible || duration <= 0)
|
|
38
|
-
return;
|
|
39
|
-
const timer = setTimeout(() => dismissRef.current(), duration);
|
|
40
|
-
return () => clearTimeout(timer);
|
|
41
|
-
}, [visible, duration]);
|
|
42
|
-
const { value: enter, animated } = (0, motion_1.useSpring)(visible ? 1 : 0, "snappy");
|
|
43
|
-
const rise = animated ? enter.interpolate({ inputRange: [0, 1], outputRange: [12, 0] }) : 0;
|
|
44
|
-
const fade = animated ? enter.interpolate({ inputRange: [0, 1], outputRange: [0, 1] }) : 1;
|
|
45
|
-
if (!visible)
|
|
46
|
-
return null;
|
|
47
|
-
const accent = tone === "neutral" ? theme.foreground : (0, tokens_1.toneColor)(theme, tone);
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(View, { ref: ref, testID: testID, pointerEvents: "box-none", style: { alignItems: "center", ...style }, ...props, children: (0, jsx_runtime_1.jsx)(Entrance, { animated: animated, rise: rise, fade: fade, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, style: {
|
|
49
|
-
flexDirection: "row",
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
gap: 10,
|
|
52
|
-
paddingVertical: 12,
|
|
53
|
-
paddingHorizontal: 16,
|
|
54
|
-
borderRadius: tokens_1.radii.lg,
|
|
55
|
-
maxWidth: 400,
|
|
56
|
-
minWidth: 280,
|
|
57
|
-
// A toast floats above everything; without a shadow it is a label.
|
|
58
|
-
shadowOpacity: 0.12,
|
|
59
|
-
shadowRadius: 30,
|
|
60
|
-
shadowOffset: { width: 0, height: 10 },
|
|
61
|
-
borderColor: tone === "neutral" ? theme.edge : accent,
|
|
62
|
-
}, children: [icon ? (0, jsx_runtime_1.jsx)(View, { children: icon }) : null, (0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "alert", accessibilityLiveRegion: "polite", style: { fontSize: 13, color: theme.foreground, flexShrink: 1 }, children: message }), action && ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: action.label, onPress: action.onPress, style: { paddingHorizontal: 4 }, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 14, fontWeight: "600", color: theme.fill }, children: action.label }) }))] }) }) }));
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* Applies the toast's entrance motion around the pill.
|
|
66
|
-
*
|
|
67
|
-
* A thin wrapper because animated styles must land on an Animated.View, while
|
|
68
|
-
* the pill itself is a Glass — wrapping keeps both honest.
|
|
69
|
-
*/
|
|
70
|
-
function Entrance({ animated, rise, fade, children, }) {
|
|
71
|
-
const { Animated } = (0, primitives_1.primitives)();
|
|
72
|
-
if (!animated)
|
|
73
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)(Animated.View, { style: { transform: [{ translateY: rise }], opacity: fade }, children: children }));
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* A queue of toasts, stacked the way Sonner stacks them.
|
|
78
|
-
*
|
|
79
|
-
* Three at a time is the practical limit: beyond that the messages stop being
|
|
80
|
-
* read and start covering the screen. Extras wait in the order they arrived, so
|
|
81
|
-
* no message is lost and the newest is never hidden behind a backlog.
|
|
82
|
-
*
|
|
83
|
-
* Each toast is independently dismissible — its own timer, its own action, and
|
|
84
|
-
* a swipe up. Swiping one up removes only that one.
|
|
85
|
-
*
|
|
86
|
-
* The single `Toast` keeps working unchanged: this is the host for when an app
|
|
87
|
-
* has several messages at once, not a replacement. A caller that shows one
|
|
88
|
-
* message continues to use `Toast` directly.
|
|
89
|
-
*/
|
|
90
|
-
exports.ToastViewport = (0, react_1.forwardRef)(function ToastViewport({ toasts, onDismiss, max = 3, position = "bottom", style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
91
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
92
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
93
|
-
const { View, PanResponder } = (0, primitives_1.primitives)();
|
|
94
|
-
// The visible window is the newest `max`, so a burst shows the latest
|
|
95
|
-
// messages rather than a stale backlog. Earlier ones remain queued in the
|
|
96
|
-
// caller's array and appear as the visible ones leave.
|
|
97
|
-
//
|
|
98
|
-
// A host is often rendered for the whole life of a screen and simply has no
|
|
99
|
-
// messages yet, so an absent queue means empty rather than a crash.
|
|
100
|
-
const visible = (toasts ?? []).slice(0, Math.max(0, max));
|
|
101
|
-
return ((0, jsx_runtime_1.jsx)(View, { ref: ref, testID: testID, pointerEvents: "box-none", style: {
|
|
102
|
-
position: "absolute",
|
|
103
|
-
left: 0,
|
|
104
|
-
right: 0,
|
|
105
|
-
alignItems: "center",
|
|
106
|
-
gap: 8,
|
|
107
|
-
...(position === "top" ? { top: 16 } : { bottom: 16 }),
|
|
108
|
-
...style,
|
|
109
|
-
}, ...props, children: visible.map((toast) => ((0, jsx_runtime_1.jsx)(SwipeableToast, { toast: toast, isDark: isDark, onDismiss: () => onDismiss(toast.id), theme: theme }, toast.id))) }));
|
|
110
|
-
});
|
|
111
|
-
/**
|
|
112
|
-
* One toast inside the viewport, with the swipe-up dismissal.
|
|
113
|
-
*
|
|
114
|
-
* Wrapping the existing Toast would have meant threading the gesture through
|
|
115
|
-
* its props, so the viewport renders the same pill with the gesture attached —
|
|
116
|
-
* the styling lives in one place (`Toast`), and this adds only the drag.
|
|
117
|
-
*/
|
|
118
|
-
function SwipeableToast({ toast, isDark, onDismiss, theme, }) {
|
|
119
|
-
const { View, Text: RNText, Pressable, PanResponder, Animated } = (0, primitives_1.primitives)();
|
|
120
|
-
const [lift, setLift] = (0, react_1.useState)(0);
|
|
121
|
-
const dismissRef = (0, react_1.useRef)(onDismiss);
|
|
122
|
-
dismissRef.current = onDismiss;
|
|
123
|
-
const duration = toast.duration ?? 4000;
|
|
124
|
-
(0, react_1.useEffect)(() => {
|
|
125
|
-
if (duration <= 0)
|
|
126
|
-
return;
|
|
127
|
-
const timer = setTimeout(() => dismissRef.current(), duration);
|
|
128
|
-
return () => clearTimeout(timer);
|
|
129
|
-
}, [duration]);
|
|
130
|
-
const panResponder = (0, react_1.useMemo)(() => {
|
|
131
|
-
if (!PanResponder?.create)
|
|
132
|
-
return null;
|
|
133
|
-
return PanResponder.create({
|
|
134
|
-
onMoveShouldSetPanResponder: (_event, gesture) =>
|
|
135
|
-
// Only an upward swipe removes a toast; downward drags are ignored.
|
|
136
|
-
gesture.dy < -8 && Math.abs(gesture.dy) > Math.abs(gesture.dx),
|
|
137
|
-
onPanResponderMove: (_event, gesture) => setLift(Math.min(0, gesture.dy)),
|
|
138
|
-
onPanResponderRelease: (_event, gesture) => {
|
|
139
|
-
// A quick flick or a long drag removes it; anything less springs back.
|
|
140
|
-
if (gesture.dy < -40 || gesture.vy < -0.5) {
|
|
141
|
-
dismissRef.current();
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
setLift(0);
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
onPanResponderTerminate: () => setLift(0),
|
|
148
|
-
});
|
|
149
|
-
}, [PanResponder]);
|
|
150
|
-
const tone = toast.tone ?? "neutral";
|
|
151
|
-
const accent = tone === "neutral" ? theme.foreground : (0, tokens_1.toneColor)(theme, tone);
|
|
152
|
-
const pill = ((0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", isDark: isDark, style: {
|
|
153
|
-
flexDirection: "row",
|
|
154
|
-
alignItems: "center",
|
|
155
|
-
gap: 10,
|
|
156
|
-
paddingVertical: 10,
|
|
157
|
-
paddingHorizontal: 14,
|
|
158
|
-
borderRadius: tokens_1.radii.pill,
|
|
159
|
-
maxWidth: 420,
|
|
160
|
-
borderColor: tone === "neutral" ? theme.edge : accent,
|
|
161
|
-
}, children: [toast.icon ? (0, jsx_runtime_1.jsx)(View, { children: toast.icon }) : null, (0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "alert", accessibilityLiveRegion: "polite", style: { fontSize: 14, color: theme.foreground, flexShrink: 1 }, children: toast.message }), toast.action ? ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: toast.action.label, onPress: () => {
|
|
162
|
-
toast.action?.onPress();
|
|
163
|
-
onDismiss();
|
|
164
|
-
}, style: { paddingHorizontal: 4 }, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 14, fontWeight: "600", color: theme.fill }, children: toast.action.label }) })) : null] }));
|
|
165
|
-
return ((0, jsx_runtime_1.jsx)(View, { style: { transform: [{ translateY: lift }], opacity: lift === 0 ? 1 : Math.max(0.4, 1 + lift / 120) }, ...(panResponder ? panResponder.panHandlers : {}), children: pill }));
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* An inline alert.
|
|
169
|
-
*
|
|
170
|
-
* Unlike AlertDialog it is not modal and not an overlay: it sits in the layout
|
|
171
|
-
* and pushes the content below it down. The surface is glass with the tone's
|
|
172
|
-
* colour as its edge, so the tone reads at a glance without turning the whole
|
|
173
|
-
* panel into a solid block of colour.
|
|
174
|
-
*/
|
|
175
|
-
exports.Banner = (0, react_1.forwardRef)(function Banner({ title, message, tone = "info", icon, onDismiss, action, style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
176
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
177
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
178
|
-
const { View, Text: RNText, Pressable } = (0, primitives_1.primitives)();
|
|
179
|
-
const accent = (0, tokens_1.toneColor)(theme, tone);
|
|
180
|
-
return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { ref: ref, effect: "regular", surface: "overlay", isDark: isDark, testID: testID, style: { borderRadius: tokens_1.radii.md, borderColor: accent, ...style }, ...props, children: (0, jsx_runtime_1.jsxs)(View, { style: { flexDirection: "row", alignItems: "flex-start", gap: 10, padding: 12 }, children: [icon ? (0, jsx_runtime_1.jsx)(View, { style: { paddingTop: 1 }, children: icon }) : null, (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, gap: 2 }, children: [title && ((0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "heading", style: { fontSize: 14, fontWeight: "600", color: theme.foreground }, children: title })), (0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "alert", style: { fontSize: 13, color: theme.muted, lineHeight: 18 }, children: message }), action && ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: action.label, onPress: action.onPress, style: { alignSelf: "flex-start", paddingTop: 6 }, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 13, fontWeight: "600", color: accent }, children: action.label }) }))] }), onDismiss && ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Dismiss", onPress: onDismiss, hitSlop: 8, style: { padding: 2 }, children: (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 15, color: theme.muted }, children: "\u00D7" }) }))] }) }));
|
|
181
|
-
});
|
|
182
|
-
/**
|
|
183
|
-
* Tracks which row of a List is open, so opening one closes the rest.
|
|
184
|
-
*
|
|
185
|
-
* A list with two open rows looks broken; iOS Mail and every kit that copied
|
|
186
|
-
* it keep at most one. The List provides the registry and each swipeable row
|
|
187
|
-
* registers its own close function.
|
|
188
|
-
*/
|
|
189
|
-
const OpenRowContext = (0, react_1.createContext)(null);
|
|
190
|
-
/**
|
|
191
|
-
* One row of a List.
|
|
192
|
-
*
|
|
193
|
-
* The row is a Pressable when it has an `onPress`, and inert otherwise, which
|
|
194
|
-
* is what the platform expects: a row that does nothing should not announce
|
|
195
|
-
* itself as a button. The chevron is decoration and is hidden from screen
|
|
196
|
-
* readers, since the row's own role already says it is tappable.
|
|
197
|
-
*/
|
|
198
|
-
exports.ListItem = (0, react_1.forwardRef)(function ListItem({ leading, title, description, trailing, chevron, onPress, disabled = false, selected = false, swipeActions, leadingSwipeActions, swipeActionWidth = 78, swipeable = true, haptics = true, style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
199
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
200
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
201
|
-
const { View, Text: RNText, Pressable, PanResponder } = (0, primitives_1.primitives)();
|
|
202
|
-
const rowGroup = (0, react_1.useContext)(OpenRowContext);
|
|
203
|
-
const interactive = Boolean(onPress) && !disabled;
|
|
204
|
-
const showChevron = interactive && chevron !== false && trailing === undefined;
|
|
205
|
-
const trailActions = swipeActions?.filter(Boolean) ?? [];
|
|
206
|
-
const leadActions = leadingSwipeActions?.filter(Boolean) ?? [];
|
|
207
|
-
const canSwipe = swipeable && !disabled && (trailActions.length > 0 || leadActions.length > 0);
|
|
208
|
-
// The row's own identity, so a List can close its siblings.
|
|
209
|
-
const rowId = (0, react_1.useRef)(`row-${Math.random().toString(36).slice(2)}`);
|
|
210
|
-
// 0 is closed; a positive offset reveals trailing actions, negative leading.
|
|
211
|
-
const [offset, setOffset] = (0, react_1.useState)(0);
|
|
212
|
-
const offsetRef = (0, react_1.useRef)(0);
|
|
213
|
-
offsetRef.current = offset;
|
|
214
|
-
// A gesture that moved is a swipe, not a tap: the press that follows the
|
|
215
|
-
// release must not fire the row's onPress.
|
|
216
|
-
const swipedRef = (0, react_1.useRef)(false);
|
|
217
|
-
const trailingWidth = trailActions.length * swipeActionWidth;
|
|
218
|
-
const leadingWidth = leadActions.length * swipeActionWidth;
|
|
219
|
-
const close = () => setOffset(0);
|
|
220
|
-
// When another row opens, this one closes.
|
|
221
|
-
(0, react_1.useEffect)(() => {
|
|
222
|
-
if (rowGroup && rowGroup.openId !== rowId.current && offsetRef.current !== 0) {
|
|
223
|
-
setOffset(0);
|
|
224
|
-
}
|
|
225
|
-
}, [rowGroup?.openId]);
|
|
226
|
-
const settle = (next) => {
|
|
227
|
-
setOffset(next);
|
|
228
|
-
if (rowGroup) {
|
|
229
|
-
rowGroup.setOpenId(next !== 0 ? rowId.current : null);
|
|
230
|
-
}
|
|
231
|
-
if (next !== 0 && haptics && offsetRef.current === 0)
|
|
232
|
-
(0, haptics_1.hapticSelection)();
|
|
233
|
-
};
|
|
234
|
-
const panResponder = (0, react_1.useMemo)(() => {
|
|
235
|
-
if (!canSwipe || !PanResponder?.create)
|
|
236
|
-
return null;
|
|
237
|
-
return PanResponder.create({
|
|
238
|
-
// A horizontal drag claims the gesture; a vertical one stays with the
|
|
239
|
-
// surrounding scroll view.
|
|
240
|
-
onMoveShouldSetPanResponder: (_event, gesture) => Math.abs(gesture.dx) > Math.abs(gesture.dy) && Math.abs(gesture.dx) > 8,
|
|
241
|
-
onPanResponderGrant: () => {
|
|
242
|
-
swipedRef.current = false;
|
|
243
|
-
},
|
|
244
|
-
onPanResponderMove: (_event, gesture) => {
|
|
245
|
-
if (Math.abs(gesture.dx) > 4)
|
|
246
|
-
swipedRef.current = true;
|
|
247
|
-
const from = offsetRef.current;
|
|
248
|
-
let next = from + gesture.dx;
|
|
249
|
-
// Do not drag past what the actions actually occupy; a small
|
|
250
|
-
// overshoot makes the edge feel elastic rather than hard.
|
|
251
|
-
next = Math.min(next, trailingWidth + 24);
|
|
252
|
-
next = Math.max(next, -(leadingWidth + 24));
|
|
253
|
-
setOffset(next);
|
|
254
|
-
},
|
|
255
|
-
onPanResponderRelease: (_event, gesture) => {
|
|
256
|
-
const released = offsetRef.current;
|
|
257
|
-
// Beyond half an action, or with a decisive flick, it stays open;
|
|
258
|
-
// otherwise it falls back closed.
|
|
259
|
-
if (gesture.dx > 0 && trailActions.length > 0) {
|
|
260
|
-
settle(released > trailingWidth / 2 || gesture.vx > 0.5 ? trailingWidth : 0);
|
|
261
|
-
}
|
|
262
|
-
else if (gesture.dx < 0 && leadActions.length > 0) {
|
|
263
|
-
settle(released < -leadingWidth / 2 || gesture.vx < -0.5 ? -leadingWidth : 0);
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
settle(offsetRef.current > 0 ? Math.min(offsetRef.current, trailingWidth) : Math.max(offsetRef.current, -leadingWidth));
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
onPanResponderTerminate: () => settle(0),
|
|
270
|
-
onPanResponderTerminationRequest: () => false,
|
|
271
|
-
});
|
|
272
|
-
// The responder reads from refs, so it never acts on a stale offset.
|
|
273
|
-
}, [canSwipe, PanResponder, trailingWidth, leadingWidth, trailActions.length, leadActions.length]);
|
|
274
|
-
/**
|
|
275
|
-
* Runs an action and closes the row.
|
|
276
|
-
*
|
|
277
|
-
* The action is dispatched first so its own feedback is not delayed by the
|
|
278
|
-
* close, then the row resets — the reveal should not outlive the press.
|
|
279
|
-
*/
|
|
280
|
-
const runAction = (action) => {
|
|
281
|
-
action.onPress();
|
|
282
|
-
settle(0);
|
|
283
|
-
if (rowGroup)
|
|
284
|
-
rowGroup.setOpenId(null);
|
|
285
|
-
};
|
|
286
|
-
const guardPress = (handler) => () => {
|
|
287
|
-
// Swallow the press that ends a swipe.
|
|
288
|
-
if (swipedRef.current) {
|
|
289
|
-
swipedRef.current = false;
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
handler?.();
|
|
293
|
-
};
|
|
294
|
-
const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leading ? (0, jsx_runtime_1.jsx)(View, { style: { marginRight: 12 }, children: leading }) : null, (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, gap: 2 }, children: [(0, jsx_runtime_1.jsx)(RNText, { numberOfLines: 1, style: { fontSize: 16, color: theme.foreground, fontWeight: "400" }, children: title }), description ? ((0, jsx_runtime_1.jsx)(RNText, { numberOfLines: 2, style: { fontSize: 13, color: theme.muted, lineHeight: 17 }, children: description })) : null] }), trailing ? (0, jsx_runtime_1.jsx)(View, { style: { marginLeft: 8 }, children: trailing }) : null, showChevron ? ((0, jsx_runtime_1.jsx)(RNText, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { marginLeft: 6, fontSize: 17, color: theme.muted }, children: "\u203A" })) : null] }));
|
|
295
|
-
const rowStyle = {
|
|
296
|
-
flexDirection: "row",
|
|
297
|
-
alignItems: "center",
|
|
298
|
-
minHeight: 44,
|
|
299
|
-
paddingVertical: 10,
|
|
300
|
-
paddingHorizontal: 16,
|
|
301
|
-
// The selected row is a lens painted behind the content, not a flat wash.
|
|
302
|
-
backgroundColor: "transparent",
|
|
303
|
-
opacity: disabled ? 0.38 : 1,
|
|
304
|
-
...style,
|
|
305
|
-
};
|
|
306
|
-
const lens = selected ? ((0, jsx_runtime_1.jsx)(lens_1.SelectedLens, { radius: 8, isDark: isDark, style: (0, lens_1.rowLensStyle)(8), testID: testID ? `${testID}-lens` : undefined })) : null;
|
|
307
|
-
const rowInner = !interactive ? ((0, jsx_runtime_1.jsxs)(View, { accessibilityRole: "text", accessibilityState: { disabled }, style: rowStyle, children: [lens, content] })) : ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityLabel: description ? `${title}, ${description}` : title, accessibilityState: { selected, disabled }, disabled: disabled, onPress: guardPress(onPress), style: ({ pressed }) => ({ ...rowStyle, opacity: pressed ? 0.7 : rowStyle.opacity }), children: [lens, content] }));
|
|
308
|
-
if (!canSwipe) {
|
|
309
|
-
return ((0, jsx_runtime_1.jsx)(View, { ref: ref, testID: testID, style: { overflow: "hidden" }, ...props, children: rowInner }));
|
|
310
|
-
}
|
|
311
|
-
/** The tinted tray behind the row: glass-tinted actions, flat not glass. */
|
|
312
|
-
const tray = (actions, edge) => ((0, jsx_runtime_1.jsx)(View, { style: {
|
|
313
|
-
position: "absolute",
|
|
314
|
-
top: 0,
|
|
315
|
-
bottom: 0,
|
|
316
|
-
[edge]: 0,
|
|
317
|
-
flexDirection: "row",
|
|
318
|
-
}, children: actions.map((action, index) => ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityLabel: action.label, onPress: () => runAction(action), style: {
|
|
319
|
-
width: swipeActionWidth,
|
|
320
|
-
alignItems: "center",
|
|
321
|
-
justifyContent: "center",
|
|
322
|
-
gap: 3,
|
|
323
|
-
backgroundColor: action.color ?? theme.glassActive,
|
|
324
|
-
}, children: [action.icon, (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 12, color: theme.foreground }, numberOfLines: 1, children: action.label })] }, `${action.label}-${index}`))) }));
|
|
325
|
-
return ((0, jsx_runtime_1.jsxs)(View, { ref: ref, testID: testID, accessibilityRole: "none", style: { overflow: "hidden" }, ...props, children: [leadActions.length > 0 ? tray(leadActions, "right") : null, trailActions.length > 0 ? tray(trailActions, "left") : null, (0, jsx_runtime_1.jsx)(View, { style: {
|
|
326
|
-
transform: [{ translateX: offset }],
|
|
327
|
-
// The row rides over its tray while it is open, so the actions are
|
|
328
|
-
// uncovered rather than shown alongside.
|
|
329
|
-
backgroundColor: "transparent",
|
|
330
|
-
}, ...(panResponder ? panResponder.panHandlers : {}), children: rowInner })] }));
|
|
331
|
-
});
|
|
332
|
-
/**
|
|
333
|
-
* A grouped list of rows — the backbone of settings and profile screens.
|
|
334
|
-
*
|
|
335
|
-
* With `inset`, the rows sit on one glass panel with hairline separators, which
|
|
336
|
-
* is the shape iOS settings screens use. The separators are drawn by the
|
|
337
|
-
* caller's ListItem spacing rather than by nesting glass inside glass.
|
|
338
|
-
*/
|
|
339
|
-
exports.List = (0, react_1.forwardRef)(function List({ children, inset = false, style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
340
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
341
|
-
const { View } = (0, primitives_1.primitives)();
|
|
342
|
-
const rows = Array.isArray(children) ? children.filter(Boolean) : children == null ? [] : [children];
|
|
343
|
-
// At most one swipeable row is open at a time, so a list never shows two
|
|
344
|
-
// trays at once.
|
|
345
|
-
const [openId, setOpenId] = (0, react_1.useState)(null);
|
|
346
|
-
const group = (0, react_1.useMemo)(() => ({ openId, setOpenId }), [openId]);
|
|
347
|
-
const body = ((0, jsx_runtime_1.jsx)(OpenRowContext.Provider, { value: group, children: (0, jsx_runtime_1.jsx)(View, { style: { gap: 2 }, children: rows.map((row, index) => ((0, jsx_runtime_1.jsxs)(View, { children: [index > 0 ? (0, jsx_runtime_1.jsx)(Display_1.Separator, { isDark: isDark, inset: inset ? 14 : 0 }) : null, row] }, index))) }) }));
|
|
348
|
-
if (!inset) {
|
|
349
|
-
return ((0, jsx_runtime_1.jsx)(View, { ref: ref, testID: testID, style: style, ...props, children: body }));
|
|
350
|
-
}
|
|
351
|
-
return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { ref: ref, effect: "regular", surface: "panel", isDark: isDark, testID: testID, style: { borderRadius: tokens_1.radii.lg, ...style }, ...props, children: body }));
|
|
352
|
-
});
|
|
353
|
-
exports.ListSection = (0, react_1.forwardRef)(function ListSection({ header, children, style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
354
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
355
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
356
|
-
const { View, Text: RNText } = (0, primitives_1.primitives)();
|
|
357
|
-
return ((0, jsx_runtime_1.jsxs)(View, { ref: ref, testID: testID, style: [{ gap: 6 }, style], ...props, children: [header ? ((0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "heading", style: {
|
|
358
|
-
fontSize: 12,
|
|
359
|
-
fontWeight: "600",
|
|
360
|
-
letterSpacing: 0.4,
|
|
361
|
-
textTransform: "uppercase",
|
|
362
|
-
color: theme.muted,
|
|
363
|
-
paddingHorizontal: 16,
|
|
364
|
-
paddingVertical: 5,
|
|
365
|
-
}, children: header })) : null, (0, jsx_runtime_1.jsx)(exports.List, { inset: true, isDark: isDark, children: children })] }));
|
|
366
|
-
});
|
|
367
|
-
/**
|
|
368
|
-
* Expandable sections.
|
|
369
|
-
*
|
|
370
|
-
* The header is a Pressable reporting `expanded`; the panel is measured with
|
|
371
|
-
* the height the content reports and animated on the springs token, so the
|
|
372
|
-
* reveal is a real transition rather than an instant jump.
|
|
373
|
-
*/
|
|
374
|
-
exports.Accordion = (0, react_1.forwardRef)(function Accordion({ sections, multiple = false, openSections: openProp, defaultOpenSections = [], onOpenSectionsChange, style, isDark: isDarkProp, testID, ...props }, ref) {
|
|
375
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
376
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
377
|
-
const { View, Text: RNText, Pressable } = (0, primitives_1.primitives)();
|
|
378
|
-
const [internalOpen, setInternalOpen] = (0, react_1.useState)(defaultOpenSections);
|
|
379
|
-
const open = openProp !== undefined ? openProp : internalOpen;
|
|
380
|
-
const toggle = (value) => {
|
|
381
|
-
const isOpen = open.includes(value);
|
|
382
|
-
let next;
|
|
383
|
-
if (isOpen)
|
|
384
|
-
next = open.filter((item) => item !== value);
|
|
385
|
-
else
|
|
386
|
-
next = multiple ? [...open, value] : [value];
|
|
387
|
-
if (openProp === undefined)
|
|
388
|
-
setInternalOpen(next);
|
|
389
|
-
onOpenSectionsChange?.(next);
|
|
390
|
-
};
|
|
391
|
-
return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { ref: ref, effect: "regular", surface: "panel", isDark: isDark, testID: testID, style: { borderRadius: tokens_1.radii.stack, ...style }, ...props, children: sections.map((section, index) => {
|
|
392
|
-
const expanded = open.includes(section.value);
|
|
393
|
-
return ((0, jsx_runtime_1.jsxs)(View, { children: [index > 0 ? (0, jsx_runtime_1.jsx)(Display_1.Separator, { isDark: isDark }) : null, (0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityLabel: section.title, accessibilityState: { expanded }, onPress: () => toggle(section.value), style: { paddingVertical: 16, paddingHorizontal: 20, flexDirection: "row", alignItems: "center" }, children: [(0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, gap: 2 }, children: [(0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 15, fontWeight: "500", color: theme.foreground }, children: section.title }), section.description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 13, color: theme.muted }, children: section.description })) : null] }), (0, jsx_runtime_1.jsx)(RNText, { accessibilityElementsHidden: true, importantForAccessibility: "no", style: { fontSize: 13, color: theme.muted, marginLeft: 8 }, children: expanded ? "\u2303" : "\u2304" })] }), expanded ? ((0, jsx_runtime_1.jsx)(View, { style: { paddingHorizontal: 20, paddingBottom: 16 }, children: section.content })) : null] }, section.value));
|
|
394
|
-
}) }));
|
|
395
|
-
});
|
package/lib/module/Form.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Label = void 0;
|
|
4
|
-
exports.Field = Field;
|
|
5
|
-
exports.Checkbox = Checkbox;
|
|
6
|
-
exports.RadioGroup = RadioGroup;
|
|
7
|
-
exports.Select = Select;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const Glass_1 = require("./Glass");
|
|
11
|
-
const tokens_1 = require("./internal/tokens");
|
|
12
|
-
const primitives_1 = require("./internal/primitives");
|
|
13
|
-
const motion_1 = require("./internal/motion");
|
|
14
|
-
const lens_1 = require("./internal/lens");
|
|
15
|
-
/** The text above a control. */
|
|
16
|
-
exports.Label = (0, react_1.forwardRef)(function Label({ children, required = false, disabled = false, nativeID, isDark: isDarkProp, style }, ref) {
|
|
17
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
18
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
19
|
-
const { Text } = (0, primitives_1.primitives)();
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(Text, { ref: ref, nativeID: nativeID, accessibilityRole: "text", style: {
|
|
21
|
-
fontSize: 13,
|
|
22
|
-
fontWeight: "500",
|
|
23
|
-
color: disabled ? theme.muted : theme.foreground,
|
|
24
|
-
opacity: disabled ? 0.6 : 1,
|
|
25
|
-
...style,
|
|
26
|
-
}, children: [children, required && (0, jsx_runtime_1.jsx)(Text, { style: { color: theme.destructive }, children: " *" })] }));
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* Label, control and message stacked in the order assistive tech announces
|
|
30
|
-
* them, so a caller never has to place these three by hand.
|
|
31
|
-
*/
|
|
32
|
-
function Field({ label, description, error, required = false, disabled = false, isDark: isDarkProp, children, style, }) {
|
|
33
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
34
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
35
|
-
const { View, Text } = (0, primitives_1.primitives)();
|
|
36
|
-
const message = error ?? description;
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(View, { style: { gap: 7, ...style }, children: [label && ((0, jsx_runtime_1.jsx)(exports.Label, { required: required, disabled: disabled, isDark: isDark, children: label })), children, message && ((0, jsx_runtime_1.jsx)(Text, { accessibilityRole: error ? "alert" : "text", style: {
|
|
38
|
-
fontSize: 12,
|
|
39
|
-
color: error ? theme.destructive : theme.muted,
|
|
40
|
-
}, children: message }))] }));
|
|
41
|
-
}
|
|
42
|
-
/** A tick box for a single boolean, with an optional label and description. */
|
|
43
|
-
function Checkbox({ checked: checkedProp, defaultChecked = false, onCheckedChange, label, description, indeterminate = false, disabled = false, isDark: isDarkProp, style, testID, }) {
|
|
44
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
45
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
46
|
-
const { View, Text, Pressable } = (0, primitives_1.primitives)();
|
|
47
|
-
// Controlled when `checked` is given, otherwise the box owns its state.
|
|
48
|
-
const [internalChecked, setInternalChecked] = (0, react_1.useState)(defaultChecked);
|
|
49
|
-
const checked = checkedProp !== undefined ? checkedProp : internalChecked;
|
|
50
|
-
const toggle = () => {
|
|
51
|
-
if (disabled)
|
|
52
|
-
return;
|
|
53
|
-
const next = !checked;
|
|
54
|
-
if (checkedProp === undefined)
|
|
55
|
-
setInternalChecked(next);
|
|
56
|
-
onCheckedChange?.(next);
|
|
57
|
-
};
|
|
58
|
-
const filled = checked || indeterminate;
|
|
59
|
-
return ((0, jsx_runtime_1.jsxs)(Pressable, { testID: testID, accessibilityRole: "checkbox", accessibilityState: { checked, disabled }, accessibilityLabel: label, disabled: disabled, onPress: toggle, style: {
|
|
60
|
-
flexDirection: "row",
|
|
61
|
-
alignItems: "flex-start",
|
|
62
|
-
gap: 10,
|
|
63
|
-
opacity: disabled ? 0.45 : 1,
|
|
64
|
-
...style,
|
|
65
|
-
}, children: [(0, jsx_runtime_1.jsx)(Glass_1.Glass, { surface: "control", isDark: isDark, style: {
|
|
66
|
-
width: 20,
|
|
67
|
-
height: 20,
|
|
68
|
-
borderRadius: 6,
|
|
69
|
-
backgroundColor: filled ? theme.fill : undefined,
|
|
70
|
-
alignItems: "center",
|
|
71
|
-
justifyContent: "center",
|
|
72
|
-
marginTop: 1,
|
|
73
|
-
}, children: indeterminate ? ((0, jsx_runtime_1.jsx)(View, { style: { width: 10, height: 2, borderRadius: 1, backgroundColor: theme.onTint } })) : checked ? (
|
|
74
|
-
// A glyph rather than an icon dependency: one text node, no package.
|
|
75
|
-
(0, jsx_runtime_1.jsx)(Text, { style: { color: theme.onTint, fontSize: 12, fontWeight: "700", lineHeight: 14 }, children: "\u2713" })) : null }), (label || description) && ((0, jsx_runtime_1.jsxs)(View, { style: { flex: 1 }, children: [label && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 14, color: theme.foreground, fontWeight: "500" }, children: label })), description && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 12, color: theme.muted, marginTop: 2 }, children: description }))] }))] }));
|
|
76
|
-
}
|
|
77
|
-
/** One choice from a small, always-visible set. */
|
|
78
|
-
function RadioGroup({ value: valueProp, defaultValue, onValueChange, options, horizontal = false, disabled = false, isDark: isDarkProp, style, testID, }) {
|
|
79
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
80
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
81
|
-
const { View, Text, Pressable } = (0, primitives_1.primitives)();
|
|
82
|
-
// Controlled when `value` is given, otherwise the group owns its selection.
|
|
83
|
-
const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue);
|
|
84
|
-
const value = valueProp !== undefined ? valueProp : internalValue;
|
|
85
|
-
const select = (next, isDisabled) => {
|
|
86
|
-
if (isDisabled)
|
|
87
|
-
return;
|
|
88
|
-
if (valueProp === undefined)
|
|
89
|
-
setInternalValue(next);
|
|
90
|
-
onValueChange?.(next);
|
|
91
|
-
};
|
|
92
|
-
return ((0, jsx_runtime_1.jsx)(View, { testID: testID, accessibilityRole: "radiogroup", style: {
|
|
93
|
-
gap: horizontal ? 14 : 10,
|
|
94
|
-
flexDirection: horizontal ? "row" : "column",
|
|
95
|
-
...style,
|
|
96
|
-
}, children: options.map((option) => {
|
|
97
|
-
const isSelected = option.value === value;
|
|
98
|
-
const isDisabled = disabled || option.disabled;
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "radio", accessibilityState: { checked: isSelected, disabled: isDisabled }, accessibilityLabel: option.label, disabled: isDisabled, onPress: () => select(option.value, isDisabled), style: {
|
|
100
|
-
flexDirection: "row",
|
|
101
|
-
alignItems: "flex-start",
|
|
102
|
-
gap: 9,
|
|
103
|
-
opacity: isDisabled ? 0.45 : 1,
|
|
104
|
-
}, children: [(0, jsx_runtime_1.jsx)(Glass_1.Glass, { surface: "control", isDark: isDark, style: {
|
|
105
|
-
width: 20,
|
|
106
|
-
height: 20,
|
|
107
|
-
borderRadius: 10,
|
|
108
|
-
backgroundColor: isSelected ? theme.fill : undefined,
|
|
109
|
-
alignItems: "center",
|
|
110
|
-
justifyContent: "center",
|
|
111
|
-
marginTop: 1,
|
|
112
|
-
}, children: isSelected ? ((0, jsx_runtime_1.jsx)(View, { style: { width: 8, height: 8, borderRadius: 4, backgroundColor: theme.onTint } })) : null }), (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 14, color: theme.foreground }, children: option.label }), option.description && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 12, color: theme.muted, marginTop: 2 }, children: option.description }))] })] }, option.value));
|
|
113
|
-
}) }));
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* A dropdown of mutually exclusive options.
|
|
117
|
-
*
|
|
118
|
-
* Native has no built-in picker that looks the same on iOS and Android, so the
|
|
119
|
-
* list opens inline: predictable across platforms and reachable without a
|
|
120
|
-
* modal. A long list scrolls naturally with the page.
|
|
121
|
-
*/
|
|
122
|
-
function Select({ value: valueProp, defaultValue, onValueChange, options, placeholder = "Select an option", disabled = false, isDark: isDarkProp, style, testID, }) {
|
|
123
|
-
const isDark = (0, motion_1.useIsDark)(isDarkProp);
|
|
124
|
-
const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
|
|
125
|
-
const { View, Text, Pressable } = (0, primitives_1.primitives)();
|
|
126
|
-
const [open, setOpen] = (0, react_1.useState)(false);
|
|
127
|
-
// Controlled when `value` is given, otherwise the select owns its choice.
|
|
128
|
-
const [internalValue, setInternalValue] = (0, react_1.useState)(defaultValue);
|
|
129
|
-
const value = valueProp !== undefined ? valueProp : internalValue;
|
|
130
|
-
const choose = (next) => {
|
|
131
|
-
if (valueProp === undefined)
|
|
132
|
-
setInternalValue(next);
|
|
133
|
-
onValueChange?.(next);
|
|
134
|
-
};
|
|
135
|
-
const selected = options.find((option) => option.value === value);
|
|
136
|
-
return ((0, jsx_runtime_1.jsxs)(View, { style: style, children: [(0, jsx_runtime_1.jsx)(Pressable, { testID: testID, accessibilityRole: "button", accessibilityState: { expanded: open, disabled }, accessibilityLabel: selected?.label ?? placeholder, disabled: disabled, onPress: () => setOpen(!open), style: { opacity: disabled ? 0.5 : 1 }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { surface: "field", isDark: isDark, style: {
|
|
137
|
-
minHeight: 34,
|
|
138
|
-
flexDirection: "row",
|
|
139
|
-
alignItems: "center",
|
|
140
|
-
justifyContent: "space-between",
|
|
141
|
-
paddingHorizontal: 14,
|
|
142
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 15, color: selected ? theme.foreground : theme.muted }, children: selected?.label ?? placeholder }), (0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 10, color: theme.muted }, children: open ? "▲" : "▼" })] }) }), open && ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { surface: "overlay", isDark: isDark, style: {
|
|
143
|
-
marginTop: 6,
|
|
144
|
-
borderRadius: tokens_1.radii.md,
|
|
145
|
-
shadowOpacity: 0.12,
|
|
146
|
-
shadowRadius: 30,
|
|
147
|
-
shadowOffset: { width: 0, height: 10 },
|
|
148
|
-
}, children: options.map((option) => {
|
|
149
|
-
const isSelected = option.value === value;
|
|
150
|
-
return ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityState: { selected: isSelected }, accessibilityLabel: option.label, onPress: () => {
|
|
151
|
-
choose(option.value);
|
|
152
|
-
setOpen(false);
|
|
153
|
-
}, style: {
|
|
154
|
-
minHeight: 32,
|
|
155
|
-
paddingHorizontal: 12,
|
|
156
|
-
borderRadius: 10,
|
|
157
|
-
backgroundColor: "transparent",
|
|
158
|
-
}, children: [isSelected ? ((0, jsx_runtime_1.jsx)(lens_1.SelectedLens, { radius: 10, isDark: isDark, style: lens_1.lensFill })) : null, (0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 14, color: theme.foreground }, children: option.label })] }, option.value));
|
|
159
|
-
}) }))] }));
|
|
160
|
-
}
|