@tamagui/slider 2.7.7 → 3.0.0-beta.643.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.
Files changed (96) hide show
  1. package/dist/cjs/Slider.cjs +455 -512
  2. package/dist/cjs/Slider.native.cjs +469 -0
  3. package/dist/cjs/Slider.native.js +424 -498
  4. package/dist/cjs/Slider.native.js.map +1 -1
  5. package/dist/cjs/SliderImpl.cjs +111 -128
  6. package/dist/cjs/SliderImpl.native.cjs +154 -0
  7. package/dist/cjs/SliderImpl.native.js +127 -143
  8. package/dist/cjs/SliderImpl.native.js.map +1 -1
  9. package/dist/cjs/constants.cjs +59 -45
  10. package/dist/cjs/constants.native.cjs +79 -0
  11. package/dist/cjs/constants.native.js +59 -44
  12. package/dist/cjs/constants.native.js.map +1 -1
  13. package/dist/cjs/helpers.cjs +59 -60
  14. package/dist/cjs/helpers.native.cjs +99 -0
  15. package/dist/cjs/helpers.native.js +66 -68
  16. package/dist/cjs/helpers.native.js.map +1 -1
  17. package/dist/cjs/index.cjs +16 -17
  18. package/dist/cjs/index.native.cjs +33 -0
  19. package/dist/cjs/index.native.js +16 -16
  20. package/dist/cjs/index.native.js.map +1 -1
  21. package/dist/cjs/types.cjs +10 -11
  22. package/dist/cjs/types.native.cjs +19 -0
  23. package/dist/cjs/types.native.js +10 -10
  24. package/dist/cjs/types.native.js.map +1 -1
  25. package/dist/esm/Slider.mjs +427 -474
  26. package/dist/esm/Slider.mjs.map +1 -1
  27. package/dist/esm/Slider.native.js +396 -463
  28. package/dist/esm/Slider.native.js.map +1 -1
  29. package/dist/esm/SliderImpl.mjs +92 -102
  30. package/dist/esm/SliderImpl.mjs.map +1 -1
  31. package/dist/esm/SliderImpl.native.js +109 -119
  32. package/dist/esm/SliderImpl.native.js.map +1 -1
  33. package/dist/esm/constants.mjs +38 -21
  34. package/dist/esm/constants.mjs.map +1 -1
  35. package/dist/esm/constants.native.js +38 -21
  36. package/dist/esm/constants.native.js.map +1 -1
  37. package/dist/esm/helpers.mjs +37 -36
  38. package/dist/esm/helpers.mjs.map +1 -1
  39. package/dist/esm/helpers.native.js +44 -45
  40. package/dist/esm/helpers.native.js.map +1 -1
  41. package/dist/esm/index.js +4 -3
  42. package/dist/esm/index.mjs +4 -3
  43. package/dist/esm/index.native.js +4 -3
  44. package/dist/esm/types.mjs +0 -2
  45. package/dist/esm/types.native.js +0 -2
  46. package/dist/jsx/Slider.mjs +427 -474
  47. package/dist/jsx/Slider.mjs.map +1 -1
  48. package/dist/jsx/Slider.native.cjs +469 -0
  49. package/dist/jsx/Slider.native.js +424 -498
  50. package/dist/jsx/Slider.native.js.map +1 -1
  51. package/dist/jsx/SliderImpl.mjs +92 -102
  52. package/dist/jsx/SliderImpl.mjs.map +1 -1
  53. package/dist/jsx/SliderImpl.native.cjs +154 -0
  54. package/dist/jsx/SliderImpl.native.js +127 -143
  55. package/dist/jsx/SliderImpl.native.js.map +1 -1
  56. package/dist/jsx/constants.mjs +38 -21
  57. package/dist/jsx/constants.mjs.map +1 -1
  58. package/dist/jsx/constants.native.cjs +79 -0
  59. package/dist/jsx/constants.native.js +59 -44
  60. package/dist/jsx/constants.native.js.map +1 -1
  61. package/dist/jsx/helpers.mjs +37 -36
  62. package/dist/jsx/helpers.mjs.map +1 -1
  63. package/dist/jsx/helpers.native.cjs +99 -0
  64. package/dist/jsx/helpers.native.js +66 -68
  65. package/dist/jsx/helpers.native.js.map +1 -1
  66. package/dist/jsx/index.js +4 -3
  67. package/dist/jsx/index.mjs +4 -3
  68. package/dist/jsx/index.native.cjs +33 -0
  69. package/dist/jsx/index.native.js +16 -16
  70. package/dist/jsx/index.native.js.map +1 -1
  71. package/dist/jsx/types.mjs +0 -2
  72. package/dist/jsx/types.native.cjs +19 -0
  73. package/dist/jsx/types.native.js +10 -10
  74. package/dist/jsx/types.native.js.map +1 -1
  75. package/package.json +15 -14
  76. package/src/Slider.tsx +126 -171
  77. package/src/SliderImpl.tsx +3 -2
  78. package/src/constants.tsx +16 -6
  79. package/src/types.ts +6 -4
  80. package/types/Slider.d.ts +218 -200
  81. package/types/Slider.d.ts.map +1 -1
  82. package/types/SliderImpl.d.ts +16 -5
  83. package/types/SliderImpl.d.ts.map +1 -1
  84. package/types/constants.d.ts +10 -10
  85. package/types/constants.d.ts.map +1 -1
  86. package/types/helpers.d.ts.map +1 -1
  87. package/types/types.d.ts +6 -4
  88. package/types/types.d.ts.map +1 -1
  89. package/dist/esm/index.js.map +0 -1
  90. package/dist/esm/index.mjs.map +0 -1
  91. package/dist/esm/index.native.js.map +0 -1
  92. package/dist/esm/types.mjs.map +0 -1
  93. package/dist/esm/types.native.js.map +0 -1
  94. package/dist/jsx/index.js.map +0 -1
  95. package/dist/jsx/index.mjs.map +0 -1
  96. package/dist/jsx/types.mjs.map +0 -1
@@ -1,3 +1,4 @@
1
+
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -5,50 +6,42 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
6
  var __getProtoOf = Object.getPrototypeOf;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: true
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
30
26
  }) : target, mod));
31
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: true
33
- }), mod);
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
28
  var Slider_exports = {};
35
29
  __export(Slider_exports, {
36
- Range: () => Range,
37
- Slider: () => Slider,
38
- SliderActive: () => SliderActive,
39
- SliderActiveFrame: () => SliderActiveFrame,
40
- SliderThumb: () => SliderThumb,
41
- SliderThumbFrame: () => SliderThumbFrame,
42
- SliderTrack: () => SliderTrack,
43
- SliderTrackFrame: () => SliderTrackFrame,
44
- Thumb: () => Thumb,
45
- Track: () => Track
30
+ Range: () => Range,
31
+ Slider: () => Slider,
32
+ SliderActive: () => SliderActive,
33
+ SliderActiveFrame: () => SliderActiveFrame,
34
+ SliderThumb: () => SliderThumb,
35
+ SliderThumbFrame: () => SliderThumbFrame,
36
+ SliderTrack: () => SliderTrack,
37
+ SliderTrackFrame: () => SliderTrackFrame,
38
+ Thumb: () => Thumb,
39
+ Track: () => Track
46
40
  });
47
41
  module.exports = __toCommonJS(Slider_exports);
48
42
  var import_compose_refs = require("@tamagui/compose-refs");
49
43
  var import_constants = require("@tamagui/constants");
50
44
  var import_core = require("@tamagui/core");
51
- var import_get_token = require("@tamagui/get-token");
52
45
  var import_helpers = require("@tamagui/helpers");
53
46
  var import_stacks = require("@tamagui/stacks");
54
47
  var import_use_controllable_state = require("@tamagui/use-controllable-state");
@@ -58,502 +51,452 @@ var import_constants2 = require("./constants.cjs");
58
51
  var import_helpers2 = require("./helpers.cjs");
59
52
  var import_SliderImpl = require("./SliderImpl.cjs");
60
53
  var import_jsx_runtime = require("react/jsx-runtime");
61
- const activeSliderMeasureListeners = /* @__PURE__ */new Set();
62
- if (!process.env.TAMAGUI_DISABLE_SLIDER_INTERVAL) setInterval?.(() => {
63
- activeSliderMeasureListeners.forEach(cb => cb());
64
- },
65
- // really doesn't need to be super often
66
- 1e3);
67
- const SliderHorizontal = React.forwardRef((props, forwardedRef) => {
68
- const {
69
- min,
70
- max,
71
- dir,
72
- onSlideStart,
73
- onSlideMove,
74
- onStepKeyDown,
75
- onSlideEnd,
76
- ...sliderProps
77
- } = props;
78
- const direction = (0, import_use_direction.useDirection)(dir);
79
- const isDirectionLTR = direction === "ltr";
80
- const sliderRef = React.useRef(null);
81
- const [state, setState_] = React.useState(() => ({
82
- size: 0,
83
- offset: 0
84
- }));
85
- const setState = (0, import_core.useCreateShallowSetState)(setState_);
86
- function getValueFromPointer(pointerPosition) {
87
- const input = [0, state.size];
88
- const output = isDirectionLTR ? [min, max] : [max, min];
89
- return (0, import_helpers2.linearScale)(input, output)(pointerPosition);
90
- }
91
- const measure = () => {
92
- sliderRef.current?.measure((_x, _y, width, _height, pageX, _pageY) => {
93
- setState({
94
- size: width,
95
- offset: pageX
96
- });
97
- });
98
- };
99
- useSliderMeasure(sliderRef, measure);
100
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_constants2.SliderOrientationProvider, {
101
- scope: props.__scopeSlider,
102
- startEdge: isDirectionLTR ? "left" : "right",
103
- endEdge: isDirectionLTR ? "right" : "left",
104
- direction: isDirectionLTR ? 1 : -1,
105
- sizeProp: "width",
106
- size: state.size,
107
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_SliderImpl.SliderImpl, {
108
- ref: (0, import_compose_refs.composeRefs)(forwardedRef, sliderRef),
109
- dir: direction,
110
- ...sliderProps,
111
- orientation: "horizontal",
112
- onLayout: measure,
113
- onSlideStart: (event, target) => {
114
- const value = getValueFromPointer(event.nativeEvent.locationX);
115
- if (value) onSlideStart?.(value, target, event);
116
- },
117
- onSlideMove: event => {
118
- const value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
119
- if (value) onSlideMove?.(value, event);
120
- },
121
- onSlideEnd: event => {
122
- const value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
123
- if (value) onSlideEnd?.(event, value);
124
- },
125
- onStepKeyDown: event => {
126
- const isBackKey = import_constants2.BACK_KEYS[direction].includes(event.key);
127
- onStepKeyDown?.({
128
- event,
129
- direction: isBackKey ? -1 : 1
130
- });
131
- }
132
- })
133
- });
54
+ const activeSliderMeasureListeners = /* @__PURE__ */ new Set();
55
+ let activeSliderMeasureInterval;
56
+ function startSliderMeasureInterval() {
57
+ if (activeSliderMeasureInterval !== void 0 || process.env.TAMAGUI_DISABLE_SLIDER_INTERVAL) return;
58
+ activeSliderMeasureInterval = setInterval(() => {
59
+ activeSliderMeasureListeners.forEach((cb) => cb());
60
+ }, 1e3);
61
+ }
62
+ function addActiveSliderMeasureListener(listener) {
63
+ activeSliderMeasureListeners.add(listener);
64
+ startSliderMeasureInterval();
65
+ }
66
+ function removeActiveSliderMeasureListener(listener) {
67
+ activeSliderMeasureListeners.delete(listener);
68
+ if (!activeSliderMeasureListeners.size && activeSliderMeasureInterval !== void 0) {
69
+ clearInterval(activeSliderMeasureInterval);
70
+ activeSliderMeasureInterval = void 0;
71
+ }
72
+ }
73
+ const SliderHorizontal = (0, import_core.createRefComponent)((props, forwardedRef) => {
74
+ const { min, max, dir, onSlideStart, onSlideMove, onStepKeyDown, onSlideEnd, ...sliderProps } = props;
75
+ const direction = (0, import_use_direction.useDirection)(dir);
76
+ const isDirectionLTR = direction === "ltr";
77
+ const sliderRef = React.useRef(null);
78
+ const [state, setState_] = React.useState(() => ({
79
+ size: 0,
80
+ offset: 0
81
+ }));
82
+ const setState = (0, import_core.useCreateShallowSetState)(setState_);
83
+ function getValueFromPointer(pointerPosition) {
84
+ const input = [0, state.size];
85
+ const output = isDirectionLTR ? [min, max] : [max, min];
86
+ return (0, import_helpers2.linearScale)(input, output)(pointerPosition);
87
+ }
88
+ const measure = () => {
89
+ sliderRef.current?.measure((_x, _y, width, _height, pageX, _pageY) => {
90
+ setState({
91
+ size: width,
92
+ offset: pageX
93
+ });
94
+ });
95
+ };
96
+ useSliderMeasure(sliderRef, measure);
97
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_constants2.SliderOrientationProvider, {
98
+ scope: props.__scopeSlider,
99
+ startEdge: isDirectionLTR ? "left" : "right",
100
+ endEdge: isDirectionLTR ? "right" : "left",
101
+ direction: isDirectionLTR ? 1 : -1,
102
+ sizeProp: "width",
103
+ size: state.size,
104
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SliderImpl.SliderImpl, {
105
+ ref: (0, import_compose_refs.composeRefs)(forwardedRef, sliderRef),
106
+ dir: direction,
107
+ ...sliderProps,
108
+ orientation: "horizontal",
109
+ onLayout: measure,
110
+ onSlideStart: (event, target) => {
111
+ const value = getValueFromPointer(event.nativeEvent.locationX);
112
+ if (value) onSlideStart?.(value, target, event);
113
+ },
114
+ onSlideMove: (event) => {
115
+ const value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
116
+ if (value) onSlideMove?.(value, event);
117
+ },
118
+ onSlideEnd: (event) => {
119
+ const value = getValueFromPointer(event.nativeEvent.pageX - state.offset);
120
+ if (value) onSlideEnd?.(event, value);
121
+ },
122
+ onStepKeyDown: (event) => {
123
+ const isBackKey = import_constants2.BACK_KEYS[direction].includes(event.key);
124
+ onStepKeyDown?.({
125
+ event,
126
+ direction: isBackKey ? -1 : 1
127
+ });
128
+ }
129
+ })
130
+ });
134
131
  });
135
132
  function useOnDebouncedWindowResize(callback, amt = 200) {
136
- React.useEffect(() => {
137
- let last;
138
- const onResize = () => {
139
- clearTimeout(last);
140
- last = setTimeout(callback, amt);
141
- };
142
- window.addEventListener("resize", onResize);
143
- return () => {
144
- clearTimeout(last);
145
- window.removeEventListener("resize", onResize);
146
- };
147
- }, []);
133
+ React.useEffect(() => {
134
+ let last;
135
+ const onResize = () => {
136
+ clearTimeout(last);
137
+ last = setTimeout(callback, amt);
138
+ };
139
+ window.addEventListener("resize", onResize);
140
+ return () => {
141
+ clearTimeout(last);
142
+ window.removeEventListener("resize", onResize);
143
+ };
144
+ }, []);
148
145
  }
149
146
  function useSliderMeasure(sliderRef, measure) {
150
- useOnDebouncedWindowResize(measure);
151
- React.useEffect(() => {
152
- const node = sliderRef.current;
153
- if (!node) return;
154
- let measureTm;
155
- const debouncedMeasure = () => {
156
- clearTimeout(measureTm);
157
- measureTm = setTimeout(() => {
158
- measure();
159
- }, 200);
160
- };
161
- const io = new IntersectionObserver(entries => {
162
- debouncedMeasure();
163
- if (entries?.[0].isIntersecting) activeSliderMeasureListeners.add(debouncedMeasure);else activeSliderMeasureListeners.delete(debouncedMeasure);
164
- }, {
165
- root: null,
166
- rootMargin: "0px",
167
- threshold: [0, .5, 1]
168
- });
169
- io.observe(node);
170
- return () => {
171
- activeSliderMeasureListeners.delete(debouncedMeasure);
172
- io.disconnect();
173
- };
174
- }, []);
147
+ useOnDebouncedWindowResize(measure);
148
+ React.useEffect(() => {
149
+ const node = sliderRef.current;
150
+ if (!node) return;
151
+ let measureTm;
152
+ const debouncedMeasure = () => {
153
+ clearTimeout(measureTm);
154
+ measureTm = setTimeout(() => {
155
+ measure();
156
+ }, 200);
157
+ };
158
+ const io = new IntersectionObserver((entries) => {
159
+ debouncedMeasure();
160
+ if (entries?.[0].isIntersecting) addActiveSliderMeasureListener(debouncedMeasure);
161
+ else removeActiveSliderMeasureListener(debouncedMeasure);
162
+ }, {
163
+ root: null,
164
+ rootMargin: "0px",
165
+ threshold: [
166
+ 0,
167
+ .5,
168
+ 1
169
+ ]
170
+ });
171
+ io.observe(node);
172
+ return () => {
173
+ removeActiveSliderMeasureListener(debouncedMeasure);
174
+ io.disconnect();
175
+ };
176
+ }, []);
175
177
  }
176
- const SliderVertical = React.forwardRef((props, forwardedRef) => {
177
- const {
178
- min,
179
- max,
180
- onSlideStart,
181
- onSlideMove,
182
- onStepKeyDown,
183
- onSlideEnd,
184
- ...sliderProps
185
- } = props;
186
- const [state, setState_] = React.useState(() => ({
187
- size: 0,
188
- offset: 0
189
- }));
190
- const setState = (0, import_core.useCreateShallowSetState)(setState_);
191
- const sliderRef = React.useRef(null);
192
- const configuration = (0, import_core.useConfiguration)();
193
- const insets = import_constants.isIos && configuration.insets ? configuration.insets : {
194
- top: 0,
195
- bottom: 0
196
- };
197
- function getValueFromPointer(pointerPosition) {
198
- const input = [0, state.size];
199
- const output = [max, min];
200
- return (0, import_helpers2.linearScale)(input, output)(pointerPosition);
201
- }
202
- const measure = () => {
203
- sliderRef.current?.measure((_x, _y, _width, height, _pageX, pageY) => {
204
- setState({
205
- size: height,
206
- offset: pageY + (import_constants.isIos ? insets.top : 0)
207
- });
208
- });
209
- };
210
- useSliderMeasure(sliderRef, measure);
211
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_constants2.SliderOrientationProvider, {
212
- scope: props.__scopeSlider,
213
- startEdge: "bottom",
214
- endEdge: "top",
215
- sizeProp: "height",
216
- size: state.size,
217
- direction: 1,
218
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_SliderImpl.SliderImpl, {
219
- ref: (0, import_compose_refs.composeRefs)(forwardedRef, sliderRef),
220
- ...sliderProps,
221
- orientation: "vertical",
222
- onLayout: measure,
223
- onSlideStart: (event, target) => {
224
- const value = getValueFromPointer(event.nativeEvent.locationY);
225
- if (value) onSlideStart?.(value, target, event);
226
- },
227
- onSlideMove: event => {
228
- const value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
229
- if (value) onSlideMove?.(value, event);
230
- },
231
- onSlideEnd: event => {
232
- const value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
233
- onSlideEnd?.(event, value);
234
- },
235
- onStepKeyDown: event => {
236
- const isBackKey = import_constants2.BACK_KEYS.ltr.includes(event.key);
237
- onStepKeyDown?.({
238
- event,
239
- direction: isBackKey ? -1 : 1
240
- });
241
- }
242
- })
243
- });
178
+ const SliderVertical = (0, import_core.createRefComponent)((props, forwardedRef) => {
179
+ const { min, max, onSlideStart, onSlideMove, onStepKeyDown, onSlideEnd, ...sliderProps } = props;
180
+ const [state, setState_] = React.useState(() => ({
181
+ size: 0,
182
+ offset: 0
183
+ }));
184
+ const setState = (0, import_core.useCreateShallowSetState)(setState_);
185
+ const sliderRef = React.useRef(null);
186
+ const configuration = (0, import_core.useConfiguration)();
187
+ const insets = import_constants.isIos && configuration.insets ? configuration.insets : {
188
+ top: 0,
189
+ bottom: 0
190
+ };
191
+ function getValueFromPointer(pointerPosition) {
192
+ const input = [0, state.size];
193
+ const output = [max, min];
194
+ return (0, import_helpers2.linearScale)(input, output)(pointerPosition);
195
+ }
196
+ const measure = () => {
197
+ sliderRef.current?.measure((_x, _y, _width, height, _pageX, pageY) => {
198
+ setState({
199
+ size: height,
200
+ offset: pageY + (import_constants.isIos ? insets.top : 0)
201
+ });
202
+ });
203
+ };
204
+ useSliderMeasure(sliderRef, measure);
205
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_constants2.SliderOrientationProvider, {
206
+ scope: props.__scopeSlider,
207
+ startEdge: "bottom",
208
+ endEdge: "top",
209
+ sizeProp: "height",
210
+ size: state.size,
211
+ direction: 1,
212
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SliderImpl.SliderImpl, {
213
+ ref: (0, import_compose_refs.composeRefs)(forwardedRef, sliderRef),
214
+ ...sliderProps,
215
+ orientation: "vertical",
216
+ onLayout: measure,
217
+ onSlideStart: (event, target) => {
218
+ const value = getValueFromPointer(event.nativeEvent.locationY);
219
+ if (value) onSlideStart?.(value, target, event);
220
+ },
221
+ onSlideMove: (event) => {
222
+ const value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
223
+ if (value) onSlideMove?.(value, event);
224
+ },
225
+ onSlideEnd: (event) => {
226
+ const value = getValueFromPointer(event.nativeEvent.pageY - state.offset);
227
+ onSlideEnd?.(event, value);
228
+ },
229
+ onStepKeyDown: (event) => {
230
+ const isBackKey = import_constants2.BACK_KEYS.ltr.includes(event.key);
231
+ onStepKeyDown?.({
232
+ event,
233
+ direction: isBackKey ? -1 : 1
234
+ });
235
+ }
236
+ })
237
+ });
244
238
  });
245
239
  const SliderTrackFrame = (0, import_core.styled)(import_SliderImpl.SliderFrame, {
246
- name: "Slider",
247
- variants: {
248
- unstyled: {
249
- false: {
250
- height: "100%",
251
- width: "100%",
252
- backgroundColor: "$background",
253
- position: "relative",
254
- borderRadius: 1e5,
255
- overflow: "hidden"
256
- }
257
- }
258
- },
259
- defaultVariants: {
260
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
261
- }
240
+ displayName: "Slider",
241
+ height: "100%",
242
+ width: "100%",
243
+ position: "relative",
244
+ overflow: "hidden"
262
245
  });
263
- const SliderTrack = React.forwardRef(function SliderTrack2(props, forwardedRef) {
264
- const {
265
- __scopeSlider,
266
- ...trackProps
267
- } = props;
268
- const context = (0, import_constants2.useSliderContext)(__scopeSlider);
269
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SliderTrackFrame, {
270
- "data-disabled": context.disabled ? "" : void 0,
271
- "data-orientation": context.orientation,
272
- orientation: context.orientation,
273
- size: context.size,
274
- ...trackProps,
275
- ref: forwardedRef
276
- });
246
+ const SliderTrack = (0, import_core.createStyledHOC)(SliderTrackFrame, function SliderTrack2(props, forwardedRef) {
247
+ const { __scopeSlider, ...trackProps } = props;
248
+ const context = (0, import_constants2.useSliderContext)(__scopeSlider);
249
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderTrackFrame, {
250
+ "data-disabled": context.disabled ? "" : void 0,
251
+ "data-orientation": context.orientation,
252
+ orientation: context.orientation,
253
+ size: context.size,
254
+ ...trackProps,
255
+ ref: forwardedRef
256
+ });
277
257
  });
278
258
  const SliderActiveFrame = (0, import_core.styled)(import_SliderImpl.SliderFrame, {
279
- name: "SliderActive",
280
- position: "absolute",
281
- pointerEvents: "box-none",
282
- variants: {
283
- unstyled: {
284
- false: {
285
- backgroundColor: "$background",
286
- borderRadius: 1e5
287
- }
288
- }
289
- },
290
- defaultVariants: {
291
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
292
- }
259
+ displayName: "SliderActive",
260
+ position: "absolute",
261
+ pointerEvents: "box-none"
293
262
  });
294
- const SliderActive = React.forwardRef(function SliderActive2(props, forwardedRef) {
295
- const {
296
- __scopeSlider,
297
- ...rangeProps
298
- } = props;
299
- const context = (0, import_constants2.useSliderContext)(__scopeSlider);
300
- const orientation = (0, import_constants2.useSliderOrientationContext)(__scopeSlider);
301
- const ref = React.useRef(null);
302
- const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
303
- const valuesCount = context.values.length;
304
- const percentages = context.values.map(value => (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max));
305
- const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
306
- const offsetEnd = 100 - Math.max(...percentages);
307
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SliderActiveFrame, {
308
- orientation: context.orientation,
309
- "data-orientation": context.orientation,
310
- "data-disabled": context.disabled ? "" : void 0,
311
- size: context.size,
312
- animateOnly: ["left", "top", "right", "bottom"],
313
- ...rangeProps,
314
- ref: composedRefs,
315
- [orientation.startEdge]: `${offsetStart}%`,
316
- [orientation.endEdge]: `${offsetEnd}%`,
317
- ...(orientation.sizeProp === "width" ? {
318
- height: "100%"
319
- } : {
320
- left: 0,
321
- right: 0
322
- })
323
- });
263
+ const SliderActive = (0, import_core.createStyledHOC)(SliderActiveFrame, function SliderActive2(props, forwardedRef) {
264
+ const { __scopeSlider, ...rangeProps } = props;
265
+ const context = (0, import_constants2.useSliderContext)(__scopeSlider);
266
+ const orientation = (0, import_constants2.useSliderOrientationContext)(__scopeSlider);
267
+ const ref = React.useRef(null);
268
+ const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
269
+ const valuesCount = context.values.length;
270
+ const percentages = context.values.map((value) => (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max));
271
+ const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
272
+ const offsetEnd = 100 - Math.max(...percentages);
273
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderActiveFrame, {
274
+ orientation: context.orientation,
275
+ "data-orientation": context.orientation,
276
+ "data-disabled": context.disabled ? "" : void 0,
277
+ size: context.size,
278
+ animateOnly: [
279
+ "left",
280
+ "top",
281
+ "right",
282
+ "bottom"
283
+ ],
284
+ ...rangeProps,
285
+ ref: composedRefs,
286
+ [orientation.startEdge]: `${offsetStart}%`,
287
+ [orientation.endEdge]: `${offsetEnd}%`,
288
+ ...orientation.sizeProp === "width" ? { height: "100%" } : {
289
+ left: 0,
290
+ right: 0
291
+ }
292
+ });
324
293
  });
325
- const getThumbSize = val => {
326
- const tokens = (0, import_core.getTokens)();
327
- const size = typeof val === "number" ? val : (0, import_get_token.getSize)(tokens.size[val], {
328
- shift: -1
329
- });
330
- return {
331
- width: size,
332
- height: size,
333
- minWidth: size,
334
- minHeight: size
335
- };
294
+ const getThumbSize = (val) => {
295
+ const tokens = (0, import_core.getTokens)();
296
+ const sizeToken = (0, import_core.resolveSizeToken)(val ?? true, "size");
297
+ const resolved = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken];
298
+ const size = typeof val === "number" ? val : (0, import_core.getVariableValue)(resolved) * .86;
299
+ return {
300
+ width: size,
301
+ height: size,
302
+ minWidth: size,
303
+ minHeight: size
304
+ };
336
305
  };
337
- const SliderThumbFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
338
- name: "SliderThumb",
339
- variants: {
340
- size: {
341
- "...size": getThumbSize,
342
- ":number": getThumbSize
343
- },
344
- unstyled: {
345
- false: {
346
- position: "absolute",
347
- borderWidth: 2,
348
- borderColor: "$borderColor",
349
- backgroundColor: "$background",
350
- pressStyle: {
351
- backgroundColor: "$backgroundPress",
352
- borderColor: "$borderColorPress"
353
- },
354
- hoverStyle: {
355
- backgroundColor: "$backgroundHover",
356
- borderColor: "$borderColorHover"
357
- },
358
- focusVisibleStyle: {
359
- outlineStyle: "solid",
360
- outlineWidth: 2,
361
- outlineColor: "$outlineColor"
362
- }
363
- }
364
- }
365
- },
366
- defaultVariants: {
367
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
368
- }
369
- });
370
- const SliderThumb = SliderThumbFrame.styleable(function SliderThumb2(props, forwardedRef) {
371
- const {
372
- __scopeSlider,
373
- index = 0,
374
- circular,
375
- size: sizeProp,
376
- ...thumbProps
377
- } = props;
378
- const context = (0, import_constants2.useSliderContext)(__scopeSlider);
379
- const orientation = (0, import_constants2.useSliderOrientationContext)(__scopeSlider);
380
- const [thumb, setThumb] = React.useState(null);
381
- const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb);
382
- const value = context.values[index];
383
- const percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max);
384
- const label = (0, import_helpers2.getLabel)(index, context.values.length);
385
- const sizeIn = sizeProp ?? context.size ?? "$true";
386
- const [size, setSize] = React.useState(() => {
387
- return (0, import_core.getVariableValue)(getThumbSize(sizeIn).width);
388
- });
389
- const thumbInBoundsOffset = size ? (0, import_helpers2.getThumbInBoundsOffset)(size, percent, orientation.direction) : 0;
390
- React.useEffect(() => {
391
- if (thumb) {
392
- context.thumbs.set(thumb, index);
393
- return () => {
394
- context.thumbs.delete(thumb);
395
- };
396
- }
397
- }, [thumb, context.thumbs, index]);
398
- const positionalStyles = context.orientation === "horizontal" ? {
399
- x: (thumbInBoundsOffset - size / 2) * orientation.direction,
400
- y: -size / 2,
401
- top: "50%",
402
- ...(size === 0 && {
403
- top: "auto",
404
- bottom: "auto"
405
- })
406
- } : {
407
- x: -size / 2,
408
- y: size / 2,
409
- left: "50%",
410
- ...(size === 0 && {
411
- left: "auto",
412
- right: "auto"
413
- })
414
- };
415
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(SliderThumbFrame, {
416
- ref: composedRefs,
417
- role: "slider",
418
- "aria-label": props["aria-label"] || label,
419
- "aria-valuemin": context.min,
420
- "aria-valuenow": value,
421
- "aria-valuemax": context.max,
422
- "aria-orientation": context.orientation,
423
- "data-orientation": context.orientation,
424
- "data-disabled": context.disabled ? "" : void 0,
425
- tabIndex: context.disabled ? void 0 : 0,
426
- animateOnly: ["transform", "left", "top", "right", "bottom"],
427
- ...positionalStyles,
428
- [orientation.startEdge]: `${percent}%`,
429
- size: sizeIn,
430
- circular,
431
- ...thumbProps,
432
- onLayout: e => {
433
- setSize(e.nativeEvent.layout[orientation.sizeProp]);
434
- },
435
- onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, () => {
436
- context.valueIndexToChangeRef.current = index;
437
- })
438
- });
439
- }, {
440
- staticConfig: {
441
- memo: true
442
- }
306
+ const SliderThumbFrame = (0, import_core.styled)(import_stacks.YStack, {
307
+ displayName: "SliderThumb",
308
+ position: "absolute",
309
+ variants: {
310
+ size: {
311
+ number: getThumbSize,
312
+ Size: getThumbSize
313
+ },
314
+ circular: { true: {
315
+ borderRadius: 1e5,
316
+ padding: 0
317
+ } },
318
+ elevate: { true: {
319
+ shadowColor: "shadow-color",
320
+ shadowRadius: 4,
321
+ shadowOffset: {
322
+ width: 0,
323
+ height: 2
324
+ }
325
+ } }
326
+ }
443
327
  });
444
- const SliderComponent = React.forwardRef((props, forwardedRef) => {
445
- const {
446
- name,
447
- min = 0,
448
- max = 100,
449
- step = 1,
450
- orientation = "horizontal",
451
- disabled = false,
452
- minStepsBetweenThumbs = 0,
453
- defaultValue = [min],
454
- value,
455
- onValueChange = () => {},
456
- size: sizeProp,
457
- onSlideEnd,
458
- onSlideMove,
459
- onSlideStart,
460
- ...sliderProps
461
- } = props;
462
- const sliderRef = React.useRef(null);
463
- const composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef);
464
- const thumbRefs = React.useRef(/* @__PURE__ */new Map());
465
- const valueIndexToChangeRef = React.useRef(0);
466
- const isHorizontal = orientation === "horizontal";
467
- const [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
468
- prop: value,
469
- defaultProp: defaultValue,
470
- transition: true,
471
- onChange: value2 => {
472
- updateThumbFocus(valueIndexToChangeRef.current);
473
- onValueChange(value2);
474
- }
475
- });
476
- if (import_constants.isWeb) React.useEffect(() => {
477
- const node = sliderRef.current;
478
- if (!node) return;
479
- const preventDefault = e => {
480
- e.preventDefault();
481
- };
482
- node.addEventListener("touchstart", preventDefault);
483
- return () => {
484
- node.removeEventListener("touchstart", preventDefault);
485
- };
486
- }, []);
487
- function updateThumbFocus(focusIndex) {
488
- if (!import_constants.isWeb) return;
489
- for (const [node, index] of thumbRefs.current.entries()) if (index === focusIndex) {
490
- node.focus();
491
- return;
492
- }
493
- }
494
- function handleSlideMove(value2, event) {
495
- updateValues(value2, valueIndexToChangeRef.current);
496
- onSlideMove?.(event, value2);
497
- }
498
- function updateValues(value2, atIndex) {
499
- const decimalCount = (0, import_helpers2.getDecimalCount)(step);
500
- const snapToStep = (0, import_helpers2.roundValue)(Math.round((value2 - min) / step) * step + min, decimalCount);
501
- const nextValue = (0, import_helpers.clamp)(snapToStep, [min, max]);
502
- setValues((prevValues = []) => {
503
- const nextValues = (0, import_helpers2.getNextSortedValues)(prevValues, nextValue, atIndex);
504
- if ((0, import_helpers2.hasMinStepsBetweenValues)(nextValues, minStepsBetweenThumbs * step)) {
505
- valueIndexToChangeRef.current = nextValues.indexOf(nextValue);
506
- return String(nextValues) === String(prevValues) ? prevValues : nextValues;
507
- }
508
- return prevValues;
509
- });
510
- }
511
- const SliderOriented = isHorizontal ? SliderHorizontal : SliderVertical;
512
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_constants2.SliderProvider, {
513
- scope: props.__scopeSlider,
514
- disabled,
515
- min,
516
- max,
517
- valueIndexToChangeRef,
518
- thumbs: thumbRefs.current,
519
- values,
520
- orientation,
521
- size: sizeProp,
522
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(SliderOriented, {
523
- "aria-disabled": disabled,
524
- "data-disabled": disabled ? "" : void 0,
525
- ...sliderProps,
526
- ref: composedRefs,
527
- min,
528
- max,
529
- onSlideEnd,
530
- onSlideStart: disabled ? void 0 : (value2, target, event) => {
531
- if (target !== "thumb") updateValues(value2, (0, import_helpers2.getClosestValueIndex)(values, value2));
532
- onSlideStart?.(event, value2, target);
533
- },
534
- onSlideMove: disabled ? void 0 : handleSlideMove,
535
- onHomeKeyDown: () => !disabled && updateValues(min, 0),
536
- onEndKeyDown: () => !disabled && updateValues(max, values.length - 1),
537
- onStepKeyDown: ({
538
- event,
539
- direction: stepDirection
540
- }) => {
541
- if (!disabled) {
542
- const multiplier = import_constants2.PAGE_KEYS.includes(event.key) || event.shiftKey && import_constants2.ARROW_KEYS.includes(event.key) ? 10 : 1;
543
- const atIndex = valueIndexToChangeRef.current;
544
- const value2 = values[atIndex];
545
- updateValues(value2 + step * multiplier * stepDirection, atIndex);
546
- }
547
- }
548
- })
549
- });
328
+ const SliderThumb = (0, import_core.createStyledHOC)(SliderThumbFrame, function SliderThumb2(props, forwardedRef) {
329
+ const { __scopeSlider, index = 0, circular, size: sizeProp, ...thumbProps } = props;
330
+ const context = (0, import_constants2.useSliderContext)(__scopeSlider);
331
+ const orientation = (0, import_constants2.useSliderOrientationContext)(__scopeSlider);
332
+ const [thumb, setThumb] = React.useState(null);
333
+ const composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb);
334
+ const value = context.values[index];
335
+ const percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max);
336
+ const label = (0, import_helpers2.getLabel)(index, context.values.length);
337
+ const sizeIn = sizeProp ?? context.size ?? true;
338
+ const [size, setSize] = React.useState(() => {
339
+ return (0, import_core.getVariableValue)(getThumbSize(sizeIn).width);
340
+ });
341
+ const thumbInBoundsOffset = size ? (0, import_helpers2.getThumbInBoundsOffset)(size, percent, orientation.direction) : 0;
342
+ React.useEffect(() => {
343
+ if (thumb) {
344
+ context.thumbs.set(thumb, index);
345
+ return () => {
346
+ context.thumbs.delete(thumb);
347
+ };
348
+ }
349
+ }, [
350
+ thumb,
351
+ context.thumbs,
352
+ index
353
+ ]);
354
+ const positionalStyles = context.orientation === "horizontal" ? {
355
+ x: (thumbInBoundsOffset - size / 2) * orientation.direction,
356
+ y: -size / 2,
357
+ top: "50%",
358
+ ...size === 0 && {
359
+ top: "auto",
360
+ bottom: "auto"
361
+ }
362
+ } : {
363
+ x: -size / 2,
364
+ y: size / 2,
365
+ left: "50%",
366
+ ...size === 0 && {
367
+ left: "auto",
368
+ right: "auto"
369
+ }
370
+ };
371
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderThumbFrame, {
372
+ ref: composedRefs,
373
+ role: "slider",
374
+ "aria-label": props["aria-label"] || label,
375
+ "aria-valuemin": context.min,
376
+ "aria-valuenow": value,
377
+ "aria-valuemax": context.max,
378
+ "aria-orientation": context.orientation,
379
+ "data-orientation": context.orientation,
380
+ "data-disabled": context.disabled ? "" : void 0,
381
+ tabIndex: context.disabled ? void 0 : 0,
382
+ animateOnly: [
383
+ "transform",
384
+ "left",
385
+ "top",
386
+ "right",
387
+ "bottom"
388
+ ],
389
+ ...positionalStyles,
390
+ [orientation.startEdge]: `${percent}%`,
391
+ size: sizeIn,
392
+ circular,
393
+ ...thumbProps,
394
+ onLayout: (e) => {
395
+ setSize(e.nativeEvent.layout[orientation.sizeProp]);
396
+ },
397
+ onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, () => {
398
+ context.valueIndexToChangeRef.current = index;
399
+ })
400
+ });
401
+ }, { staticConfig: { memo: true } });
402
+ const SliderComponent = (0, import_core.createRefComponent)((props, forwardedRef) => {
403
+ const { name, min = 0, max = 100, step = 1, orientation = "horizontal", disabled = false, minStepsBetweenThumbs = 0, defaultValue = [min], value, onValueChange = () => {}, size: sizeProp, onSlideEnd, onSlideMove, onSlideStart, ...sliderProps } = props;
404
+ const sliderRef = React.useRef(null);
405
+ const composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef);
406
+ const thumbRefs = React.useRef(/* @__PURE__ */ new Map());
407
+ const valueIndexToChangeRef = React.useRef(0);
408
+ const isHorizontal = orientation === "horizontal";
409
+ const [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
410
+ prop: value,
411
+ defaultProp: defaultValue,
412
+ transition: true,
413
+ onChange: (value2) => {
414
+ updateThumbFocus(valueIndexToChangeRef.current);
415
+ onValueChange(value2);
416
+ }
417
+ });
418
+ if (import_constants.isWeb) React.useEffect(() => {
419
+ const node = sliderRef.current;
420
+ if (!node) return;
421
+ const preventDefault = (e) => {
422
+ e.preventDefault();
423
+ };
424
+ node.addEventListener("touchstart", preventDefault);
425
+ return () => {
426
+ node.removeEventListener("touchstart", preventDefault);
427
+ };
428
+ }, []);
429
+ function updateThumbFocus(focusIndex) {
430
+ if (!import_constants.isWeb) return;
431
+ for (const [node, index] of thumbRefs.current.entries()) if (index === focusIndex) {
432
+ node.focus();
433
+ return;
434
+ }
435
+ }
436
+ function handleSlideMove(value2, event) {
437
+ updateValues(value2, valueIndexToChangeRef.current);
438
+ onSlideMove?.(event, value2);
439
+ }
440
+ function updateValues(value2, atIndex) {
441
+ const decimalCount = (0, import_helpers2.getDecimalCount)(step);
442
+ const snapToStep = (0, import_helpers2.roundValue)(Math.round((value2 - min) / step) * step + min, decimalCount);
443
+ const nextValue = (0, import_helpers.clamp)(snapToStep, [min, max]);
444
+ setValues((prevValues = []) => {
445
+ const nextValues = (0, import_helpers2.getNextSortedValues)(prevValues, nextValue, atIndex);
446
+ if ((0, import_helpers2.hasMinStepsBetweenValues)(nextValues, minStepsBetweenThumbs * step)) {
447
+ valueIndexToChangeRef.current = nextValues.indexOf(nextValue);
448
+ return String(nextValues) === String(prevValues) ? prevValues : nextValues;
449
+ }
450
+ return prevValues;
451
+ });
452
+ }
453
+ const SliderOriented = isHorizontal ? SliderHorizontal : SliderVertical;
454
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_constants2.SliderProvider, {
455
+ scope: props.__scopeSlider,
456
+ disabled,
457
+ min,
458
+ max,
459
+ valueIndexToChangeRef,
460
+ thumbs: thumbRefs.current,
461
+ values,
462
+ orientation,
463
+ size: sizeProp,
464
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SliderOriented, {
465
+ "aria-disabled": disabled,
466
+ "data-disabled": disabled ? "" : void 0,
467
+ ...sliderProps,
468
+ ref: composedRefs,
469
+ min,
470
+ max,
471
+ onSlideEnd,
472
+ onSlideStart: disabled ? void 0 : (value2, target, event) => {
473
+ if (target !== "thumb") updateValues(value2, (0, import_helpers2.getClosestValueIndex)(values, value2));
474
+ onSlideStart?.(event, value2, target);
475
+ },
476
+ onSlideMove: disabled ? void 0 : handleSlideMove,
477
+ onHomeKeyDown: () => !disabled && updateValues(min, 0),
478
+ onEndKeyDown: () => !disabled && updateValues(max, values.length - 1),
479
+ onStepKeyDown: ({ event, direction: stepDirection }) => {
480
+ if (!disabled) {
481
+ const multiplier = import_constants2.PAGE_KEYS.includes(event.key) || event.shiftKey && import_constants2.ARROW_KEYS.includes(event.key) ? 10 : 1;
482
+ const atIndex = valueIndexToChangeRef.current;
483
+ const value2 = values[atIndex];
484
+ updateValues(value2 + step * multiplier * stepDirection, atIndex);
485
+ }
486
+ }
487
+ }), import_constants.isWeb && name && values.map((value2, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
488
+ type: "hidden",
489
+ name,
490
+ value: value2
491
+ }, index))]
492
+ });
550
493
  });
551
494
  const Slider = (0, import_helpers.withStaticProperties)(SliderComponent, {
552
- Track: SliderTrack,
553
- TrackActive: SliderActive,
554
- Thumb: SliderThumb
495
+ Track: SliderTrack,
496
+ TrackActive: SliderActive,
497
+ Thumb: SliderThumb
555
498
  });
556
499
  Slider.displayName = import_constants2.SLIDER_NAME;
557
500
  const Track = SliderTrack;
558
501
  const Range = SliderActive;
559
- const Thumb = SliderThumb;
502
+ const Thumb = SliderThumb;