@jamadd/react-native-template-ui 0.8.6 → 0.9.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 +8 -0
- package/lib/module/components/accordion/ThemedAccordion.js +245 -0
- package/lib/module/components/accordion/ThemedAccordion.js.map +1 -0
- package/lib/module/components/accordion/ThemedAccordion.web.js +245 -0
- package/lib/module/components/accordion/ThemedAccordion.web.js.map +1 -0
- package/lib/module/components/button/AnimatedThemedPressable.js +13 -3
- package/lib/module/components/button/AnimatedThemedPressable.js.map +1 -1
- package/lib/module/components/button/ThemedButton.js +84 -23
- package/lib/module/components/button/ThemedButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconButton.js +62 -16
- package/lib/module/components/button/ThemedIconButton.js.map +1 -1
- package/lib/module/components/button/ThemedIconTextButton.js +118 -29
- package/lib/module/components/button/ThemedIconTextButton.js.map +1 -1
- package/lib/module/components/button/ThemedPressable.js +13 -3
- package/lib/module/components/button/ThemedPressable.js.map +1 -1
- package/lib/module/components/icon/ThemedIcon.js +56 -15
- package/lib/module/components/icon/ThemedIcon.js.map +1 -1
- package/lib/module/components/list/List.js +131 -39
- package/lib/module/components/list/List.js.map +1 -1
- package/lib/module/components/loading/ThemedLoading.js +50 -13
- package/lib/module/components/loading/ThemedLoading.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.js +64 -19
- package/lib/module/components/overlay/actionSheet/ActionSheet.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js +64 -19
- package/lib/module/components/overlay/actionSheet/ActionSheet.web.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js +19 -8
- package/lib/module/components/overlay/actionSheet/ActionSheetContentGesture.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js +87 -31
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js +87 -31
- package/lib/module/components/overlay/actionSheet/ActionSheetHeader.web.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js +68 -27
- package/lib/module/components/overlay/actionSheet/ActionSheetListView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js +39 -14
- package/lib/module/components/overlay/actionSheet/ActionSheetListViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js +58 -25
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionList.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js +45 -21
- package/lib/module/components/overlay/actionSheet/ActionSheetOptionListItem.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js +74 -31
- package/lib/module/components/overlay/actionSheet/ActionSheetOptions.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js +71 -29
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollView.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js +45 -18
- package/lib/module/components/overlay/actionSheet/ActionSheetScrollViewContent.js.map +1 -1
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js +152 -36
- package/lib/module/components/overlay/actionSheet/ActionSheetWrap.js.map +1 -1
- package/lib/module/components/overlay/alert/Alert.js +142 -51
- package/lib/module/components/overlay/alert/Alert.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButton.js +62 -26
- package/lib/module/components/overlay/alert/AlertButton.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertButtons.js +58 -23
- package/lib/module/components/overlay/alert/AlertButtons.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertContent.js +76 -17
- package/lib/module/components/overlay/alert/AlertContent.js.map +1 -1
- package/lib/module/components/overlay/alert/AlertWrap.js +125 -43
- package/lib/module/components/overlay/alert/AlertWrap.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js +96 -21
- package/lib/module/components/overlay/modal/ThemedLoadingModal.js.map +1 -1
- package/lib/module/components/overlay/modal/ThemedModal.js +76 -23
- package/lib/module/components/overlay/modal/ThemedModal.js.map +1 -1
- package/lib/module/components/overlay/toast/ThemedToast.js +339 -90
- package/lib/module/components/overlay/toast/ThemedToast.js.map +1 -1
- package/lib/module/components/provider/GestureProvider.js +15 -3
- package/lib/module/components/provider/GestureProvider.js.map +1 -1
- package/lib/module/components/provider/InsetsProvider.js +15 -3
- package/lib/module/components/provider/InsetsProvider.js.map +1 -1
- package/lib/module/components/provider/ReactNativeTemplateProviders.js +23 -11
- package/lib/module/components/provider/ReactNativeTemplateProviders.js.map +1 -1
- package/lib/module/components/provider/ThemeProvider.js +15 -3
- package/lib/module/components/provider/ThemeProvider.js.map +1 -1
- package/lib/module/components/separator/ThemedSeparator.js +53 -14
- package/lib/module/components/separator/ThemedSeparator.js.map +1 -1
- package/lib/module/components/slider/Slider.js +549 -140
- package/lib/module/components/slider/Slider.js.map +1 -1
- package/lib/module/components/slider/Slider.web.js +595 -0
- package/lib/module/components/slider/Slider.web.js.map +1 -0
- package/lib/module/components/slider/ThemedSlider.js +179 -55
- package/lib/module/components/slider/ThemedSlider.js.map +1 -1
- package/lib/module/components/slider/ThemedSlider.web.js +179 -55
- package/lib/module/components/slider/ThemedSlider.web.js.map +1 -1
- package/lib/module/components/slider/ThemedSliderStepIndicator.js +40 -15
- package/lib/module/components/slider/ThemedSliderStepIndicator.js.map +1 -1
- package/lib/module/components/switch/ThemedSwitch.js +81 -21
- package/lib/module/components/switch/ThemedSwitch.js.map +1 -1
- package/lib/module/components/text/ThemedIconText.js +124 -35
- package/lib/module/components/text/ThemedIconText.js.map +1 -1
- package/lib/module/components/text/ThemedText.js +15 -3
- package/lib/module/components/text/ThemedText.js.map +1 -1
- package/lib/module/components/view/AnimatedThemedView.js +42 -11
- package/lib/module/components/view/AnimatedThemedView.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.js +144 -39
- package/lib/module/components/view/ThemedScreenWrap.js.map +1 -1
- package/lib/module/components/view/ThemedScreenWrap.web.js +111 -32
- package/lib/module/components/view/ThemedScreenWrap.web.js.map +1 -1
- package/lib/module/components/view/ThemedScrollView.js +126 -38
- package/lib/module/components/view/ThemedScrollView.js.map +1 -1
- package/lib/module/components/view/ThemedView.js +33 -10
- package/lib/module/components/view/ThemedView.js.map +1 -1
- package/lib/module/hooks/button.js +263 -84
- package/lib/module/hooks/button.js.map +1 -1
- package/lib/module/hooks/list.js +50 -10
- package/lib/module/hooks/list.js.map +1 -1
- package/lib/module/hooks/overlay.js +575 -187
- package/lib/module/hooks/overlay.js.map +1 -1
- package/lib/module/hooks/react.js +90 -27
- package/lib/module/hooks/react.js.map +1 -1
- package/lib/module/hooks/reanimated.js.map +1 -1
- package/lib/module/hooks/style.js +43 -18
- package/lib/module/hooks/style.js.map +1 -1
- package/lib/module/hooks/switch.js +182 -43
- package/lib/module/hooks/switch.js.map +1 -1
- package/lib/module/hooks/theme.js +17 -8
- package/lib/module/hooks/theme.js.map +1 -1
- package/lib/module/hooks/view.js +56 -14
- package/lib/module/hooks/view.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/types/accordion.js +4 -0
- package/lib/module/types/accordion.js.map +1 -0
- package/lib/module/utils/reanimated/func.js +60 -10
- package/lib/module/utils/reanimated/func.js.map +1 -1
- package/lib/typescript/src/components/accordion/ThemedAccordion.d.ts +5 -0
- package/lib/typescript/src/components/accordion/ThemedAccordion.d.ts.map +1 -0
- package/lib/typescript/src/components/accordion/ThemedAccordion.web.d.ts +5 -0
- package/lib/typescript/src/components/accordion/ThemedAccordion.web.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/Slider.d.ts +3 -2
- package/lib/typescript/src/components/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/Slider.web.d.ts +5 -0
- package/lib/typescript/src/components/slider/Slider.web.d.ts.map +1 -0
- package/lib/typescript/src/components/slider/ThemedSlider.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSlider.web.d.ts.map +1 -1
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts +3 -2
- package/lib/typescript/src/components/slider/ThemedSliderStepIndicator.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts +2 -2
- package/lib/typescript/src/components/view/Box.d.ts +18 -18
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/accordion.d.ts +16 -0
- package/lib/typescript/src/types/accordion.d.ts.map +1 -0
- package/lib/typescript/src/utils/theme/restyle.d.ts +385 -385
- package/package.json +14 -14
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { c as _c } from "react/compiler-runtime";
|
|
3
4
|
import { useMappingHelper } from '@shopify/flash-list';
|
|
4
|
-
import {
|
|
5
|
+
import { useLayoutEffect, useMemo, useState } from 'react';
|
|
5
6
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
6
7
|
import { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
8
|
import { scheduleOnRN } from 'react-native-worklets';
|
|
@@ -10,42 +11,108 @@ import { useViewRef } from "../../hooks/view.js";
|
|
|
10
11
|
import { sliderStepIndicatorDefaultWidth, sliderThumbDefaultSize, SliderTrackSize } from "../../utils/slider/const.js";
|
|
11
12
|
import AnimatedThemedView from "../view/AnimatedThemedView.js";
|
|
12
13
|
import ThemedView from "../view/ThemedView.js";
|
|
13
|
-
import ThemedSliderStepIndicator from "./ThemedSliderStepIndicator.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
const ThemedSliderStepIndicator = require('./ThemedSliderStepIndicator').default;
|
|
16
|
+
const _worklet_1107268610089_init_data = {
|
|
17
|
+
code: "function SliderTsx1(){const{xSharedVal}=this.__closure;return{transform:[{translateX:xSharedVal.get()}]};}",
|
|
18
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
19
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx1\",\"xSharedVal\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA6EI,SAAAA,WAAA,QAAAC,UAAA,OAAAC,SAAA,OAAO,CAAAC,SAAA,CAAa,CAAC,CAAAC,UAAA,CAAcH,UAAU,CAAAI,GAAI,CAAC,CAAE,CAAC,CAAE,CAAC\",\"ignoreList\":[]}"
|
|
20
|
+
};
|
|
21
|
+
const _worklet_9813808913419_init_data = {
|
|
22
|
+
code: "function SliderTsx2(){const{xSharedVal,thumbSizeHalf}=this.__closure;return{transform:[{translateX:xSharedVal.get()-thumbSizeHalf}]};}",
|
|
23
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
24
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx2\",\"xSharedVal\",\"thumbSizeHalf\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAiFI,SAAAA,WAAA,QAAAC,UAAA,CAAAC,aAAA,OAAAC,SAAA,OAAO,CAAAC,SAAA,CAAa,CAAC,CAAAC,UAAA,CAAcJ,UAAU,CAAAK,GAAI,CAAC,CAAC,CAAGJ,aAAc,CAAC,CAAE,CAAC\",\"ignoreList\":[]}"
|
|
25
|
+
};
|
|
26
|
+
const _worklet_5842193172883_init_data = {
|
|
27
|
+
code: "function SliderTsx3(x_0,t13){const{trackWidth,xSharedVal,withTiming,scheduleOnRN,updateSelectedVal}=this.__closure;var _trackWidth;const animated=t13===undefined?false:t13;const tempX=Math.min(0,Math.max(x_0,-((_trackWidth=trackWidth)!==null&&_trackWidth!==void 0?_trackWidth:0)));xSharedVal.set(animated?withTiming(tempX):tempX);scheduleOnRN(updateSelectedVal,Math.abs(tempX));}",
|
|
28
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
29
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx3\",\"x_0\",\"t13\",\"trackWidth\",\"xSharedVal\",\"withTiming\",\"scheduleOnRN\",\"updateSelectedVal\",\"__closure\",\"_trackWidth\",\"animated\",\"undefined\",\"tempX\",\"Math\",\"min\",\"max\",\"set\",\"abs\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA0G6B,SAAAA,WAAAC,GAAA,CAAAC,GAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,YAAA,CAAAC,iBAAA,OAAAC,SAAA,KAAAC,WAAA,CAAY,MAAAC,QAAA,CAAAR,GAAgB,GAAhBS,SAAgB,CAAhB,KAAgB,CAAhBT,GAAgB,CAEnD,MAAAU,KAAA,CAAcC,IAAI,CAAAC,GAAI,CAAC,CAAC,CAAED,IAAI,CAAAE,GAAI,CAACd,GAAC,CAAE,GAAAQ,WAAA,CAAEN,UAAe,UAAAM,WAAA,UAAAA,WAAA,CAAf,CAAe,CAAC,CAAC,CAAC,CAC1DL,UAAU,CAAAY,GAAI,CAACN,QAAQ,CAAGL,UAAU,CAACO,KAAa,CAAC,CAApCA,KAAoC,CAAC,CACpDN,YAAY,CAACC,iBAAiB,CAAEM,IAAI,CAAAI,GAAI,CAACL,KAAK,CAAC,CAAC\",\"ignoreList\":[]}"
|
|
30
|
+
};
|
|
31
|
+
const _worklet_15465333809693_init_data = {
|
|
32
|
+
code: "function SliderTsx4(t16){const{sliderWidth,stepWidth,thumbSize,thumbSizeHalf,updateXSharedVal,snapToStepAnimated}=this.__closure;const{x:x_2}=t16;if(sliderWidth&&stepWidth){const nearestStep=Math.round(-(sliderWidth-(x_2+thumbSize+thumbSizeHalf))/stepWidth);updateXSharedVal(nearestStep*stepWidth,snapToStepAnimated);}}",
|
|
33
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
34
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx4\",\"t16\",\"sliderWidth\",\"stepWidth\",\"thumbSize\",\"thumbSizeHalf\",\"updateXSharedVal\",\"snapToStepAnimated\",\"__closure\",\"x\",\"x_2\",\"nearestStep\",\"Math\",\"round\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AA2He,SAAAA,WAAAC,GAAA,QAAAC,WAAA,CAAAC,SAAA,CAAAC,SAAA,CAAAC,aAAA,CAAAC,gBAAA,CAAAC,kBAAA,OAAAC,SAAA,CAAC,MAAAC,CAAA,CAAAC,GAAA,EAAAT,GAAK,CACX,GAAIC,WAAwB,EAAxBC,SAAwB,EAC1B,MAAAQ,WAAA,CAAoBC,IAAI,CAAAC,KAAM,CAC5B,EAAEX,WAAW,EAAIQ,GAAC,CAAGN,SAAS,CAAGC,aAAa,CAAC,CAAC,CAAGF,SACrD,CAAC,CACDG,gBAAgB,CAACK,WAAW,CAAGR,SAAS,CAAEI,kBAAkB,CAAC,EAC9D\",\"ignoreList\":[]}"
|
|
35
|
+
};
|
|
36
|
+
const _worklet_9051416247764_init_data = {
|
|
37
|
+
code: "function SliderTsx5(t15){const{sliderWidth,updateXSharedVal,thumbSize}=this.__closure;const{x:x_1}=t15;if(sliderWidth){updateXSharedVal(-(sliderWidth-(x_1+thumbSize*2)));}}",
|
|
38
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
39
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx5\",\"t15\",\"sliderWidth\",\"updateXSharedVal\",\"thumbSize\",\"__closure\",\"x\",\"x_1\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAsHiB,SAAAA,WAAAC,GAAA,QAAAC,WAAA,CAAAC,gBAAA,CAAAC,SAAA,OAAAC,SAAA,CAAC,MAAAC,CAAA,CAAAC,GAAA,EAAAN,GAAK,CACb,GAAIC,WAAW,EACbC,gBAAgB,CAAC,EAAED,WAAW,EAAIK,GAAC,CAAGH,SAAS,CAAG,CAAC,CAAC,CAAC,CAAC,EACvD\",\"ignoreList\":[]}"
|
|
40
|
+
};
|
|
41
|
+
const _worklet_3836629690946_init_data = {
|
|
42
|
+
code: "function SliderTsx6(){const{stepWidth,xSharedVal,updateXSharedVal,snapToStepAnimated}=this.__closure;if(stepWidth){const nearestStep_0=Math.round(xSharedVal.get()/stepWidth);updateXSharedVal(nearestStep_0*stepWidth,snapToStepAnimated);}}",
|
|
43
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
44
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx6\",\"stepWidth\",\"xSharedVal\",\"updateXSharedVal\",\"snapToStepAnimated\",\"__closure\",\"nearestStep_0\",\"Math\",\"round\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAwIe,SAAAA,WAAA,QAAAC,SAAA,CAAAC,UAAA,CAAAC,gBAAA,CAAAC,kBAAA,OAAAC,SAAA,CACL,GAAIJ,SAAS,EACX,MAAAK,aAAA,CAAoBC,IAAI,CAAAC,KAAM,CAACN,UAAU,CAAAO,GAAI,CAAC,CAAC,CAAGR,SAAS,CAAC,CAC5DE,gBAAgB,CAACG,aAAW,CAAGL,SAAS,CAAEG,kBAAkB,CAAC,EAC9D\",\"ignoreList\":[]}"
|
|
45
|
+
};
|
|
46
|
+
const _worklet_9171995940566_init_data = {
|
|
47
|
+
code: "function SliderTsx7(t17){const{updateXSharedVal,xSharedVal}=this.__closure;const{changeX:changeX}=t17;updateXSharedVal(xSharedVal.get()+changeX);}",
|
|
48
|
+
location: "/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx",
|
|
49
|
+
sourceMap: "{\"version\":3,\"names\":[\"SliderTsx7\",\"t17\",\"updateXSharedVal\",\"xSharedVal\",\"__closure\",\"changeX\",\"get\"],\"sources\":[\"/home/runner/work/react-native-template-ui/react-native-template-ui/src/components/slider/Slider.tsx\"],\"mappings\":\"AAqIkB,SAAAA,WAAAC,GAAA,QAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAAC,MAAAC,OAAA,CAAAA,OAAA,EAAAJ,GAAW,CACpBC,gBAAgB,CAACC,UAAU,CAAAG,GAAI,CAAC,CAAC,CAAGD,OAAO,CAAC\",\"ignoreList\":[]}"
|
|
50
|
+
};
|
|
51
|
+
const Slider = t0 => {
|
|
52
|
+
const $ = _c(97);
|
|
53
|
+
const {
|
|
54
|
+
range,
|
|
55
|
+
steps: t1,
|
|
56
|
+
stepIndicator,
|
|
57
|
+
stepIndicatorProps,
|
|
58
|
+
snapToStepAnimated: t2,
|
|
59
|
+
onValueChange,
|
|
60
|
+
sliderWrapProps,
|
|
61
|
+
trackSize: t3,
|
|
62
|
+
trackActiveColor: t4,
|
|
63
|
+
trackActiveProps,
|
|
64
|
+
trackInactiveColor: t5,
|
|
65
|
+
trackInactiveProps,
|
|
66
|
+
thumbSize: t6,
|
|
67
|
+
thumbColor: t7,
|
|
68
|
+
thumbProps,
|
|
69
|
+
gestureActivateDuration: t8,
|
|
70
|
+
setSelectedVal,
|
|
71
|
+
selectedValSharedVal
|
|
72
|
+
} = t0;
|
|
73
|
+
const steps = t1 === undefined ? 1 : t1;
|
|
74
|
+
const snapToStepAnimated = t2 === undefined ? true : t2;
|
|
75
|
+
const trackSize = t3 === undefined ? SliderTrackSize.M : t3;
|
|
76
|
+
const trackActiveColor = t4 === undefined ? "themePri" : t4;
|
|
77
|
+
const trackInactiveColor = t5 === undefined ? "separator" : t5;
|
|
78
|
+
const thumbSize = t6 === undefined ? sliderThumbDefaultSize : t6;
|
|
79
|
+
const thumbColor = t7 === undefined ? "themePri" : t7;
|
|
80
|
+
const gestureActivateDuration = t8 === undefined ? 50 : t8;
|
|
35
81
|
const windowWidth = useWindowDimensionsWidth();
|
|
36
|
-
const isNumRange = typeof range[0] ===
|
|
37
|
-
|
|
82
|
+
const isNumRange = typeof range[0] === "number";
|
|
83
|
+
let t9;
|
|
84
|
+
if ($[0] !== isNumRange || $[1] !== range) {
|
|
85
|
+
t9 = isNumRange ? range.sort() : range;
|
|
86
|
+
$[0] = isNumRange;
|
|
87
|
+
$[1] = range;
|
|
88
|
+
$[2] = t9;
|
|
89
|
+
} else {
|
|
90
|
+
t9 = $[2];
|
|
91
|
+
}
|
|
92
|
+
const processedRange = t9;
|
|
38
93
|
const totalSteps = isNumRange ? Math.abs(processedRange[1] - processedRange[0]) / steps : processedRange.length - 1;
|
|
39
|
-
|
|
94
|
+
let t10;
|
|
95
|
+
bb0: {
|
|
40
96
|
if (!isNumRange || Number.isInteger(steps)) {
|
|
41
|
-
|
|
97
|
+
t10 = 0;
|
|
98
|
+
break bb0;
|
|
99
|
+
}
|
|
100
|
+
let t11;
|
|
101
|
+
if ($[3] !== steps) {
|
|
102
|
+
t11 = steps.toString().split(".");
|
|
103
|
+
$[3] = steps;
|
|
104
|
+
$[4] = t11;
|
|
105
|
+
} else {
|
|
106
|
+
t11 = $[4];
|
|
42
107
|
}
|
|
43
|
-
const stepsStrSplit =
|
|
108
|
+
const stepsStrSplit = t11;
|
|
44
109
|
if (stepsStrSplit.length < 2) {
|
|
45
|
-
|
|
110
|
+
t10 = 0;
|
|
111
|
+
break bb0;
|
|
46
112
|
}
|
|
47
|
-
|
|
48
|
-
}
|
|
113
|
+
t10 = stepsStrSplit[1]?.length ?? 0;
|
|
114
|
+
}
|
|
115
|
+
const stepsFractionDigits = t10;
|
|
49
116
|
const thumbSizeHalf = thumbSize / 2;
|
|
50
117
|
const {
|
|
51
118
|
getMappingKey
|
|
@@ -55,132 +122,474 @@ const Slider = ({
|
|
|
55
122
|
const [trackWidth, setTrackWidth] = useState();
|
|
56
123
|
const [stepWidth, setStepWidth] = useState();
|
|
57
124
|
const xSharedVal = useSharedValue(-(trackWidth ?? 0));
|
|
58
|
-
const trackAnimatedStyle = useAnimatedStyle(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
125
|
+
const trackAnimatedStyle = useAnimatedStyle(function SliderTsx1Factory({
|
|
126
|
+
_worklet_1107268610089_init_data,
|
|
127
|
+
xSharedVal
|
|
128
|
+
}) {
|
|
129
|
+
const _e = [new global.Error(), -2, -27];
|
|
130
|
+
const SliderTsx1 = () => ({
|
|
131
|
+
transform: [{
|
|
132
|
+
translateX: xSharedVal.get()
|
|
133
|
+
}]
|
|
134
|
+
});
|
|
135
|
+
SliderTsx1.__closure = {
|
|
136
|
+
xSharedVal
|
|
137
|
+
};
|
|
138
|
+
SliderTsx1.__workletHash = 1107268610089;
|
|
139
|
+
SliderTsx1.__pluginVersion = "0.8.3";
|
|
140
|
+
SliderTsx1.__initData = _worklet_1107268610089_init_data;
|
|
141
|
+
SliderTsx1.__stackDetails = _e;
|
|
142
|
+
return SliderTsx1;
|
|
143
|
+
}({
|
|
144
|
+
_worklet_1107268610089_init_data,
|
|
145
|
+
xSharedVal
|
|
62
146
|
}), [trackWidth]);
|
|
63
|
-
const thumbAnimatedStyle = useAnimatedStyle(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
147
|
+
const thumbAnimatedStyle = useAnimatedStyle(function SliderTsx2Factory({
|
|
148
|
+
_worklet_9813808913419_init_data,
|
|
149
|
+
xSharedVal,
|
|
150
|
+
thumbSizeHalf
|
|
151
|
+
}) {
|
|
152
|
+
const _e = [new global.Error(), -3, -27];
|
|
153
|
+
const SliderTsx2 = () => ({
|
|
154
|
+
transform: [{
|
|
155
|
+
translateX: xSharedVal.get() - thumbSizeHalf
|
|
156
|
+
}]
|
|
157
|
+
});
|
|
158
|
+
SliderTsx2.__closure = {
|
|
159
|
+
xSharedVal,
|
|
160
|
+
thumbSizeHalf
|
|
161
|
+
};
|
|
162
|
+
SliderTsx2.__workletHash = 9813808913419;
|
|
163
|
+
SliderTsx2.__pluginVersion = "0.8.3";
|
|
164
|
+
SliderTsx2.__initData = _worklet_9813808913419_init_data;
|
|
165
|
+
SliderTsx2.__stackDetails = _e;
|
|
166
|
+
return SliderTsx2;
|
|
167
|
+
}({
|
|
168
|
+
_worklet_9813808913419_init_data,
|
|
169
|
+
xSharedVal,
|
|
170
|
+
thumbSizeHalf
|
|
67
171
|
}), [thumbSizeHalf]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
setStepWidth(tempStepWidth);
|
|
75
|
-
let index = 0;
|
|
172
|
+
let t11;
|
|
173
|
+
if ($[5] !== isNumRange || $[6] !== onValueChange || $[7] !== processedRange || $[8] !== setSelectedVal || $[9] !== stepWidth || $[10] !== steps || $[11] !== stepsFractionDigits || $[12] !== totalSteps) {
|
|
174
|
+
t11 = x => {
|
|
175
|
+
if (!stepWidth) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
76
178
|
if (isNumRange) {
|
|
77
179
|
const numRange = processedRange;
|
|
78
|
-
const
|
|
79
|
-
|
|
180
|
+
const numIndex = Math.round(x / stepWidth);
|
|
181
|
+
const tempSelectedVal = Number((numRange[1] - numIndex * steps).toFixed(stepsFractionDigits));
|
|
182
|
+
setSelectedVal?.(tempSelectedVal);
|
|
183
|
+
onValueChange(tempSelectedVal);
|
|
80
184
|
} else {
|
|
81
185
|
const strRange = processedRange;
|
|
82
|
-
const
|
|
83
|
-
|
|
186
|
+
const strIndex = Math.round(x / stepWidth);
|
|
187
|
+
const tempSelectedVal_0 = strRange[totalSteps - strIndex];
|
|
188
|
+
setSelectedVal?.(tempSelectedVal_0);
|
|
189
|
+
onValueChange(tempSelectedVal_0);
|
|
84
190
|
}
|
|
85
|
-
|
|
191
|
+
};
|
|
192
|
+
$[5] = isNumRange;
|
|
193
|
+
$[6] = onValueChange;
|
|
194
|
+
$[7] = processedRange;
|
|
195
|
+
$[8] = setSelectedVal;
|
|
196
|
+
$[9] = stepWidth;
|
|
197
|
+
$[10] = steps;
|
|
198
|
+
$[11] = stepsFractionDigits;
|
|
199
|
+
$[12] = totalSteps;
|
|
200
|
+
$[13] = t11;
|
|
201
|
+
} else {
|
|
202
|
+
t11 = $[13];
|
|
203
|
+
}
|
|
204
|
+
const updateSelectedVal = t11;
|
|
205
|
+
let t12;
|
|
206
|
+
if ($[14] !== trackWidth || $[15] !== updateSelectedVal || $[16] !== xSharedVal) {
|
|
207
|
+
t12 = function SliderTsx3Factory({
|
|
208
|
+
_worklet_5842193172883_init_data,
|
|
209
|
+
trackWidth,
|
|
210
|
+
xSharedVal,
|
|
211
|
+
withTiming,
|
|
212
|
+
scheduleOnRN,
|
|
213
|
+
updateSelectedVal
|
|
214
|
+
}) {
|
|
215
|
+
const _e = [new global.Error(), -6, -27];
|
|
216
|
+
const SliderTsx3 = function (x_0, t13) {
|
|
217
|
+
const animated = t13 === undefined ? false : t13;
|
|
218
|
+
const tempX = Math.min(0, Math.max(x_0, -(trackWidth ?? 0)));
|
|
219
|
+
xSharedVal.set(animated ? withTiming(tempX) : tempX);
|
|
220
|
+
scheduleOnRN(updateSelectedVal, Math.abs(tempX));
|
|
221
|
+
};
|
|
222
|
+
SliderTsx3.__closure = {
|
|
223
|
+
trackWidth,
|
|
224
|
+
xSharedVal,
|
|
225
|
+
withTiming,
|
|
226
|
+
scheduleOnRN,
|
|
227
|
+
updateSelectedVal
|
|
228
|
+
};
|
|
229
|
+
SliderTsx3.__workletHash = 5842193172883;
|
|
230
|
+
SliderTsx3.__pluginVersion = "0.8.3";
|
|
231
|
+
SliderTsx3.__initData = _worklet_5842193172883_init_data;
|
|
232
|
+
SliderTsx3.__stackDetails = _e;
|
|
233
|
+
return SliderTsx3;
|
|
234
|
+
}({
|
|
235
|
+
_worklet_5842193172883_init_data,
|
|
236
|
+
trackWidth,
|
|
237
|
+
xSharedVal,
|
|
238
|
+
withTiming,
|
|
239
|
+
scheduleOnRN,
|
|
240
|
+
updateSelectedVal
|
|
86
241
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
242
|
+
$[14] = trackWidth;
|
|
243
|
+
$[15] = updateSelectedVal;
|
|
244
|
+
$[16] = xSharedVal;
|
|
245
|
+
$[17] = t12;
|
|
246
|
+
} else {
|
|
247
|
+
t12 = $[17];
|
|
248
|
+
}
|
|
249
|
+
const updateXSharedVal = t12;
|
|
250
|
+
let t13;
|
|
251
|
+
if ($[18] !== gestureActivateDuration || $[19] !== sliderWidth || $[20] !== snapToStepAnimated || $[21] !== stepWidth || $[22] !== thumbSize || $[23] !== thumbSizeHalf || $[24] !== updateXSharedVal || $[25] !== windowWidth || $[26] !== xSharedVal) {
|
|
252
|
+
let t14;
|
|
253
|
+
if ($[28] !== sliderWidth || $[29] !== thumbSize || $[30] !== updateXSharedVal) {
|
|
254
|
+
t14 = function SliderTsx5Factory({
|
|
255
|
+
_worklet_9051416247764_init_data,
|
|
256
|
+
sliderWidth,
|
|
257
|
+
updateXSharedVal,
|
|
258
|
+
thumbSize
|
|
259
|
+
}) {
|
|
260
|
+
const _e = [new global.Error(), -4, -27];
|
|
261
|
+
const SliderTsx5 = function (t15) {
|
|
262
|
+
const {
|
|
263
|
+
x: x_1
|
|
264
|
+
} = t15;
|
|
265
|
+
if (sliderWidth) {
|
|
266
|
+
updateXSharedVal(-(sliderWidth - (x_1 + thumbSize * 2)));
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
SliderTsx5.__closure = {
|
|
270
|
+
sliderWidth,
|
|
271
|
+
updateXSharedVal,
|
|
272
|
+
thumbSize
|
|
273
|
+
};
|
|
274
|
+
SliderTsx5.__workletHash = 9051416247764;
|
|
275
|
+
SliderTsx5.__pluginVersion = "0.8.3";
|
|
276
|
+
SliderTsx5.__initData = _worklet_9051416247764_init_data;
|
|
277
|
+
SliderTsx5.__stackDetails = _e;
|
|
278
|
+
return SliderTsx5;
|
|
279
|
+
}({
|
|
280
|
+
_worklet_9051416247764_init_data,
|
|
281
|
+
sliderWidth,
|
|
282
|
+
updateXSharedVal,
|
|
283
|
+
thumbSize
|
|
284
|
+
});
|
|
285
|
+
$[28] = sliderWidth;
|
|
286
|
+
$[29] = thumbSize;
|
|
287
|
+
$[30] = updateXSharedVal;
|
|
288
|
+
$[31] = t14;
|
|
98
289
|
} else {
|
|
99
|
-
|
|
100
|
-
const strIndex = Math.round(x / stepWidth);
|
|
101
|
-
const tempSelectedVal = strRange[totalSteps - strIndex];
|
|
102
|
-
setSelectedVal?.(tempSelectedVal);
|
|
103
|
-
onValueChange(tempSelectedVal);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
const updateXSharedVal = (x, animated = false) => {
|
|
107
|
-
'worklet';
|
|
108
|
-
|
|
109
|
-
const tempX = Math.min(0, Math.max(x, -(trackWidth ?? 0)));
|
|
110
|
-
xSharedVal.set(animated ? withTiming(tempX) : tempX);
|
|
111
|
-
scheduleOnRN(updateSelectedVal, Math.abs(tempX));
|
|
112
|
-
};
|
|
113
|
-
const touchStart = useSharedValue(0);
|
|
114
|
-
const gesture = Gesture.Simultaneous(Gesture.LongPress().minDuration(gestureActivateDuration).maxDistance(windowWidth * 10).shouldCancelWhenOutside(false).onStart(({
|
|
115
|
-
x
|
|
116
|
-
}) => {
|
|
117
|
-
if (sliderWidth) {
|
|
118
|
-
updateXSharedVal(-(sliderWidth - (x + thumbSize + thumbSizeHalf)));
|
|
290
|
+
t14 = $[31];
|
|
119
291
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
292
|
+
let t15;
|
|
293
|
+
if ($[32] !== sliderWidth || $[33] !== snapToStepAnimated || $[34] !== stepWidth || $[35] !== thumbSize || $[36] !== thumbSizeHalf || $[37] !== updateXSharedVal) {
|
|
294
|
+
t15 = function SliderTsx4Factory({
|
|
295
|
+
_worklet_15465333809693_init_data,
|
|
296
|
+
sliderWidth,
|
|
297
|
+
stepWidth,
|
|
298
|
+
thumbSize,
|
|
299
|
+
thumbSizeHalf,
|
|
300
|
+
updateXSharedVal,
|
|
301
|
+
snapToStepAnimated
|
|
302
|
+
}) {
|
|
303
|
+
const _e = [new global.Error(), -7, -27];
|
|
304
|
+
const SliderTsx4 = function (t16) {
|
|
305
|
+
const {
|
|
306
|
+
x: x_2
|
|
307
|
+
} = t16;
|
|
308
|
+
if (sliderWidth && stepWidth) {
|
|
309
|
+
const nearestStep = Math.round(-(sliderWidth - (x_2 + thumbSize + thumbSizeHalf)) / stepWidth);
|
|
310
|
+
updateXSharedVal(nearestStep * stepWidth, snapToStepAnimated);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
SliderTsx4.__closure = {
|
|
314
|
+
sliderWidth,
|
|
315
|
+
stepWidth,
|
|
316
|
+
thumbSize,
|
|
317
|
+
thumbSizeHalf,
|
|
318
|
+
updateXSharedVal,
|
|
319
|
+
snapToStepAnimated
|
|
320
|
+
};
|
|
321
|
+
SliderTsx4.__workletHash = 15465333809693;
|
|
322
|
+
SliderTsx4.__pluginVersion = "0.8.3";
|
|
323
|
+
SliderTsx4.__initData = _worklet_15465333809693_init_data;
|
|
324
|
+
SliderTsx4.__stackDetails = _e;
|
|
325
|
+
return SliderTsx4;
|
|
326
|
+
}({
|
|
327
|
+
_worklet_15465333809693_init_data,
|
|
328
|
+
sliderWidth,
|
|
329
|
+
stepWidth,
|
|
330
|
+
thumbSize,
|
|
331
|
+
thumbSizeHalf,
|
|
332
|
+
updateXSharedVal,
|
|
333
|
+
snapToStepAnimated
|
|
334
|
+
});
|
|
335
|
+
$[32] = sliderWidth;
|
|
336
|
+
$[33] = snapToStepAnimated;
|
|
337
|
+
$[34] = stepWidth;
|
|
338
|
+
$[35] = thumbSize;
|
|
339
|
+
$[36] = thumbSizeHalf;
|
|
340
|
+
$[37] = updateXSharedVal;
|
|
341
|
+
$[38] = t15;
|
|
342
|
+
} else {
|
|
343
|
+
t15 = $[38];
|
|
126
344
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
345
|
+
let t16;
|
|
346
|
+
if ($[39] !== updateXSharedVal || $[40] !== xSharedVal) {
|
|
347
|
+
t16 = function SliderTsx7Factory({
|
|
348
|
+
_worklet_9171995940566_init_data,
|
|
349
|
+
updateXSharedVal,
|
|
350
|
+
xSharedVal
|
|
351
|
+
}) {
|
|
352
|
+
const _e = [new global.Error(), -3, -27];
|
|
353
|
+
const SliderTsx7 = function (t17) {
|
|
354
|
+
const {
|
|
355
|
+
changeX
|
|
356
|
+
} = t17;
|
|
357
|
+
updateXSharedVal(xSharedVal.get() + changeX);
|
|
358
|
+
};
|
|
359
|
+
SliderTsx7.__closure = {
|
|
360
|
+
updateXSharedVal,
|
|
361
|
+
xSharedVal
|
|
362
|
+
};
|
|
363
|
+
SliderTsx7.__workletHash = 9171995940566;
|
|
364
|
+
SliderTsx7.__pluginVersion = "0.8.3";
|
|
365
|
+
SliderTsx7.__initData = _worklet_9171995940566_init_data;
|
|
366
|
+
SliderTsx7.__stackDetails = _e;
|
|
367
|
+
return SliderTsx7;
|
|
368
|
+
}({
|
|
369
|
+
_worklet_9171995940566_init_data,
|
|
370
|
+
updateXSharedVal,
|
|
371
|
+
xSharedVal
|
|
372
|
+
});
|
|
373
|
+
$[39] = updateXSharedVal;
|
|
374
|
+
$[40] = xSharedVal;
|
|
375
|
+
$[41] = t16;
|
|
133
376
|
} else {
|
|
134
|
-
|
|
377
|
+
t16 = $[41];
|
|
135
378
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
379
|
+
let t17;
|
|
380
|
+
if ($[42] !== snapToStepAnimated || $[43] !== stepWidth || $[44] !== updateXSharedVal || $[45] !== xSharedVal) {
|
|
381
|
+
t17 = function SliderTsx6Factory({
|
|
382
|
+
_worklet_3836629690946_init_data,
|
|
383
|
+
stepWidth,
|
|
384
|
+
xSharedVal,
|
|
385
|
+
updateXSharedVal,
|
|
386
|
+
snapToStepAnimated
|
|
387
|
+
}) {
|
|
388
|
+
const _e = [new global.Error(), -5, -27];
|
|
389
|
+
const SliderTsx6 = function () {
|
|
390
|
+
if (stepWidth) {
|
|
391
|
+
const nearestStep_0 = Math.round(xSharedVal.get() / stepWidth);
|
|
392
|
+
updateXSharedVal(nearestStep_0 * stepWidth, snapToStepAnimated);
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
SliderTsx6.__closure = {
|
|
396
|
+
stepWidth,
|
|
397
|
+
xSharedVal,
|
|
398
|
+
updateXSharedVal,
|
|
399
|
+
snapToStepAnimated
|
|
400
|
+
};
|
|
401
|
+
SliderTsx6.__workletHash = 3836629690946;
|
|
402
|
+
SliderTsx6.__pluginVersion = "0.8.3";
|
|
403
|
+
SliderTsx6.__initData = _worklet_3836629690946_init_data;
|
|
404
|
+
SliderTsx6.__stackDetails = _e;
|
|
405
|
+
return SliderTsx6;
|
|
406
|
+
}({
|
|
407
|
+
_worklet_3836629690946_init_data,
|
|
408
|
+
stepWidth,
|
|
409
|
+
xSharedVal,
|
|
410
|
+
updateXSharedVal,
|
|
411
|
+
snapToStepAnimated
|
|
412
|
+
});
|
|
413
|
+
$[42] = snapToStepAnimated;
|
|
414
|
+
$[43] = stepWidth;
|
|
415
|
+
$[44] = updateXSharedVal;
|
|
416
|
+
$[45] = xSharedVal;
|
|
417
|
+
$[46] = t17;
|
|
418
|
+
} else {
|
|
419
|
+
t17 = $[46];
|
|
144
420
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
421
|
+
t13 = Gesture.Simultaneous(Gesture.LongPress().minDuration(gestureActivateDuration).maxDistance(windowWidth * 10).shouldCancelWhenOutside(false).onStart(t14).onEnd(t15), Gesture.Pan().activateAfterLongPress(gestureActivateDuration).onChange(t16).onEnd(t17));
|
|
422
|
+
$[18] = gestureActivateDuration;
|
|
423
|
+
$[19] = sliderWidth;
|
|
424
|
+
$[20] = snapToStepAnimated;
|
|
425
|
+
$[21] = stepWidth;
|
|
426
|
+
$[22] = thumbSize;
|
|
427
|
+
$[23] = thumbSizeHalf;
|
|
428
|
+
$[24] = updateXSharedVal;
|
|
429
|
+
$[25] = windowWidth;
|
|
430
|
+
$[26] = xSharedVal;
|
|
431
|
+
$[27] = t13;
|
|
432
|
+
} else {
|
|
433
|
+
t13 = $[27];
|
|
434
|
+
}
|
|
435
|
+
const gesture = t13;
|
|
436
|
+
let t14;
|
|
437
|
+
if ($[47] !== isNumRange || $[48] !== processedRange || $[49] !== selectedValSharedVal || $[50] !== steps || $[51] !== thumbSize || $[52] !== thumbSizeHalf || $[53] !== totalSteps || $[54] !== trackViewRef || $[55] !== xSharedVal) {
|
|
438
|
+
t14 = () => {
|
|
439
|
+
trackViewRef.current?.measure((_x, _y, w) => {
|
|
440
|
+
const tempWidth = w - thumbSize;
|
|
441
|
+
const tempStepWidth = tempWidth / totalSteps;
|
|
442
|
+
setSliderWidth(w + thumbSize + thumbSizeHalf);
|
|
443
|
+
setTrackWidth(tempWidth);
|
|
444
|
+
setStepWidth(tempStepWidth);
|
|
445
|
+
let index;
|
|
446
|
+
if (isNumRange) {
|
|
447
|
+
const numRange_0 = processedRange;
|
|
448
|
+
const numCurrentValue = selectedValSharedVal?.get();
|
|
449
|
+
index = numCurrentValue ? (numCurrentValue - numRange_0[0]) / steps : 0;
|
|
450
|
+
} else {
|
|
451
|
+
const strRange_0 = processedRange;
|
|
452
|
+
const strCurrentValue = selectedValSharedVal?.get();
|
|
453
|
+
index = strCurrentValue ? strRange_0.indexOf(strCurrentValue) : 0;
|
|
454
|
+
}
|
|
455
|
+
xSharedVal.set(-(totalSteps - index) * tempStepWidth);
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
$[47] = isNumRange;
|
|
459
|
+
$[48] = processedRange;
|
|
460
|
+
$[49] = selectedValSharedVal;
|
|
461
|
+
$[50] = steps;
|
|
462
|
+
$[51] = thumbSize;
|
|
463
|
+
$[52] = thumbSizeHalf;
|
|
464
|
+
$[53] = totalSteps;
|
|
465
|
+
$[54] = trackViewRef;
|
|
466
|
+
$[55] = xSharedVal;
|
|
467
|
+
$[56] = t14;
|
|
468
|
+
} else {
|
|
469
|
+
t14 = $[56];
|
|
470
|
+
}
|
|
471
|
+
let t15;
|
|
472
|
+
if ($[57] !== isNumRange || $[58] !== processedRange || $[59] !== thumbSize || $[60] !== totalSteps) {
|
|
473
|
+
t15 = [thumbSize, isNumRange, processedRange, totalSteps];
|
|
474
|
+
$[57] = isNumRange;
|
|
475
|
+
$[58] = processedRange;
|
|
476
|
+
$[59] = thumbSize;
|
|
477
|
+
$[60] = totalSteps;
|
|
478
|
+
$[61] = t15;
|
|
479
|
+
} else {
|
|
480
|
+
t15 = $[61];
|
|
481
|
+
}
|
|
482
|
+
useLayoutEffect(t14, t15);
|
|
483
|
+
let t16;
|
|
484
|
+
if ($[62] !== trackActiveColor || $[63] !== trackAnimatedStyle || $[64] !== trackInactiveProps || $[65] !== trackSize) {
|
|
485
|
+
t16 = /*#__PURE__*/_jsx(AnimatedThemedView, {
|
|
486
|
+
height: trackSize,
|
|
487
|
+
backgroundColor: trackActiveColor,
|
|
488
|
+
animatedStyle: trackAnimatedStyle,
|
|
489
|
+
...trackInactiveProps
|
|
490
|
+
});
|
|
491
|
+
$[62] = trackActiveColor;
|
|
492
|
+
$[63] = trackAnimatedStyle;
|
|
493
|
+
$[64] = trackInactiveProps;
|
|
494
|
+
$[65] = trackSize;
|
|
495
|
+
$[66] = t16;
|
|
496
|
+
} else {
|
|
497
|
+
t16 = $[66];
|
|
498
|
+
}
|
|
499
|
+
let t17;
|
|
500
|
+
if ($[67] !== t16 || $[68] !== trackActiveProps || $[69] !== trackInactiveColor || $[70] !== trackSize || $[71] !== trackWidth) {
|
|
501
|
+
t17 = /*#__PURE__*/_jsx(ThemedView, {
|
|
502
|
+
position: "absolute",
|
|
503
|
+
width: trackWidth,
|
|
504
|
+
height: trackSize,
|
|
505
|
+
overflow: "hidden",
|
|
506
|
+
backgroundColor: trackInactiveColor,
|
|
507
|
+
...trackActiveProps,
|
|
508
|
+
children: t16
|
|
509
|
+
});
|
|
510
|
+
$[67] = t16;
|
|
511
|
+
$[68] = trackActiveProps;
|
|
512
|
+
$[69] = trackInactiveColor;
|
|
513
|
+
$[70] = trackSize;
|
|
514
|
+
$[71] = trackWidth;
|
|
515
|
+
$[72] = t17;
|
|
516
|
+
} else {
|
|
517
|
+
t17 = $[72];
|
|
518
|
+
}
|
|
519
|
+
let t18;
|
|
520
|
+
if ($[73] !== getMappingKey || $[74] !== processedRange || $[75] !== stepIndicator || $[76] !== stepIndicatorProps || $[77] !== stepWidth || $[78] !== thumbSize || $[79] !== thumbSizeHalf) {
|
|
521
|
+
t18 = !!stepIndicator && processedRange.map((value, index_0) => /*#__PURE__*/_jsx(ThemedSliderStepIndicator, {
|
|
522
|
+
left: index_0 * (stepWidth ?? 0) + thumbSizeHalf - sliderStepIndicatorDefaultWidth / 2,
|
|
523
|
+
height: thumbSize,
|
|
524
|
+
...stepIndicatorProps
|
|
525
|
+
}, getMappingKey(value, index_0)));
|
|
526
|
+
$[73] = getMappingKey;
|
|
527
|
+
$[74] = processedRange;
|
|
528
|
+
$[75] = stepIndicator;
|
|
529
|
+
$[76] = stepIndicatorProps;
|
|
530
|
+
$[77] = stepWidth;
|
|
531
|
+
$[78] = thumbSize;
|
|
532
|
+
$[79] = thumbSizeHalf;
|
|
533
|
+
$[80] = t18;
|
|
534
|
+
} else {
|
|
535
|
+
t18 = $[80];
|
|
536
|
+
}
|
|
537
|
+
const t19 = -thumbSizeHalf;
|
|
538
|
+
let t20;
|
|
539
|
+
if ($[81] !== t19 || $[82] !== thumbAnimatedStyle || $[83] !== thumbColor || $[84] !== thumbProps || $[85] !== thumbSize) {
|
|
540
|
+
t20 = /*#__PURE__*/_jsx(AnimatedThemedView, {
|
|
541
|
+
position: "absolute",
|
|
542
|
+
right: t19,
|
|
543
|
+
width: thumbSize,
|
|
544
|
+
aspectRatio: 1,
|
|
545
|
+
opacity: 0.8,
|
|
546
|
+
backgroundColor: thumbColor,
|
|
547
|
+
animatedStyle: thumbAnimatedStyle,
|
|
548
|
+
...thumbProps
|
|
549
|
+
});
|
|
550
|
+
$[81] = t19;
|
|
551
|
+
$[82] = thumbAnimatedStyle;
|
|
552
|
+
$[83] = thumbColor;
|
|
553
|
+
$[84] = thumbProps;
|
|
554
|
+
$[85] = thumbSize;
|
|
555
|
+
$[86] = t20;
|
|
556
|
+
} else {
|
|
557
|
+
t20 = $[86];
|
|
558
|
+
}
|
|
559
|
+
let t21;
|
|
560
|
+
if ($[87] !== sliderWrapProps || $[88] !== t17 || $[89] !== t18 || $[90] !== t20 || $[91] !== thumbSize || $[92] !== trackViewRef) {
|
|
561
|
+
t21 = /*#__PURE__*/_jsxs(ThemedView, {
|
|
149
562
|
ref: trackViewRef,
|
|
150
|
-
alignItems:
|
|
151
|
-
justifyContent:
|
|
152
|
-
alignSelf:
|
|
563
|
+
alignItems: "center",
|
|
564
|
+
justifyContent: "center",
|
|
565
|
+
alignSelf: "stretch",
|
|
153
566
|
height: thumbSize,
|
|
154
567
|
...sliderWrapProps,
|
|
155
|
-
children: [
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
...thumbProps
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
});
|
|
568
|
+
children: [t17, t18, t20]
|
|
569
|
+
});
|
|
570
|
+
$[87] = sliderWrapProps;
|
|
571
|
+
$[88] = t17;
|
|
572
|
+
$[89] = t18;
|
|
573
|
+
$[90] = t20;
|
|
574
|
+
$[91] = thumbSize;
|
|
575
|
+
$[92] = trackViewRef;
|
|
576
|
+
$[93] = t21;
|
|
577
|
+
} else {
|
|
578
|
+
t21 = $[93];
|
|
579
|
+
}
|
|
580
|
+
let t22;
|
|
581
|
+
if ($[94] !== gesture || $[95] !== t21) {
|
|
582
|
+
t22 = /*#__PURE__*/_jsx(GestureDetector, {
|
|
583
|
+
gesture: gesture,
|
|
584
|
+
children: t21
|
|
585
|
+
});
|
|
586
|
+
$[94] = gesture;
|
|
587
|
+
$[95] = t21;
|
|
588
|
+
$[96] = t22;
|
|
589
|
+
} else {
|
|
590
|
+
t22 = $[96];
|
|
591
|
+
}
|
|
592
|
+
return t22;
|
|
184
593
|
};
|
|
185
|
-
export default
|
|
594
|
+
export default Slider;
|
|
186
595
|
//# sourceMappingURL=Slider.js.map
|