@webority-technologies/mobile 0.0.15 → 0.0.21

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 (202) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.js +60 -19
  2. package/lib/commonjs/components/AppBar/AppBar.js +29 -20
  3. package/lib/commonjs/components/Avatar/Avatar.js +38 -8
  4. package/lib/commonjs/components/Badge/Badge.js +66 -4
  5. package/lib/commonjs/components/Banner/Banner.js +146 -66
  6. package/lib/commonjs/components/BottomNavigation/BottomNavigation.js +37 -15
  7. package/lib/commonjs/components/BottomSheet/BottomSheet.js +78 -53
  8. package/lib/commonjs/components/Button/Button.js +12 -5
  9. package/lib/commonjs/components/Card/Card.js +106 -16
  10. package/lib/commonjs/components/Carousel/Carousel.js +66 -12
  11. package/lib/commonjs/components/Checkbox/Checkbox.js +11 -7
  12. package/lib/commonjs/components/Chip/Chip.js +44 -12
  13. package/lib/commonjs/components/DatePicker/DatePicker.js +185 -76
  14. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +133 -59
  15. package/lib/commonjs/components/Dialog/Dialog.js +16 -10
  16. package/lib/commonjs/components/Drawer/Drawer.js +13 -10
  17. package/lib/commonjs/components/FieldBase/FieldBase.js +494 -0
  18. package/lib/commonjs/components/FieldBase/index.js +32 -0
  19. package/lib/commonjs/components/FloatingActionButton/FloatingActionButton.js +69 -44
  20. package/lib/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
  21. package/lib/commonjs/components/FormField/FormField.js +3 -2
  22. package/lib/commonjs/components/ImageGallery/ImageGallery.js +132 -44
  23. package/lib/commonjs/components/Input/Input.js +144 -181
  24. package/lib/commonjs/components/ListItem/ListItem.js +90 -11
  25. package/lib/commonjs/components/Modal/Modal.js +55 -27
  26. package/lib/commonjs/components/NumberInput/NumberInput.js +60 -106
  27. package/lib/commonjs/components/OTPInput/OTPInput.js +65 -58
  28. package/lib/commonjs/components/PickerTrigger/PickerTrigger.js +185 -0
  29. package/lib/commonjs/components/{AppIcon → PickerTrigger}/index.js +4 -4
  30. package/lib/commonjs/components/ProgressBar/ProgressBar.js +19 -11
  31. package/lib/commonjs/components/Radio/Radio.js +11 -6
  32. package/lib/commonjs/components/Rating/Rating.js +85 -19
  33. package/lib/commonjs/components/SearchBar/SearchBar.js +90 -107
  34. package/lib/commonjs/components/SegmentedControl/SegmentedControl.js +22 -11
  35. package/lib/commonjs/components/Select/Select.js +62 -91
  36. package/lib/commonjs/components/Skeleton/Skeleton.js +131 -174
  37. package/lib/commonjs/components/Skeleton/SkeletonClock.js +117 -0
  38. package/lib/commonjs/components/Skeleton/SkeletonContent.js +164 -81
  39. package/lib/commonjs/components/Skeleton/SkeletonProvider.js +72 -10
  40. package/lib/commonjs/components/Skeleton/index.js +17 -16
  41. package/lib/commonjs/components/Slider/Slider.js +44 -25
  42. package/lib/commonjs/components/Stepper/Stepper.js +199 -29
  43. package/lib/commonjs/components/Swipeable/Swipeable.js +36 -19
  44. package/lib/commonjs/components/Switch/Switch.js +9 -2
  45. package/lib/commonjs/components/Tabs/Tabs.js +84 -21
  46. package/lib/commonjs/components/TimePicker/TimePicker.js +123 -45
  47. package/lib/commonjs/components/Toast/Toast.js +27 -16
  48. package/lib/commonjs/components/Tooltip/Tooltip.js +56 -32
  49. package/lib/commonjs/components/index.js +37 -37
  50. package/lib/commonjs/theme/tokens.js +55 -7
  51. package/lib/module/components/Accordion/Accordion.js +61 -20
  52. package/lib/module/components/AppBar/AppBar.js +29 -20
  53. package/lib/module/components/Avatar/Avatar.js +39 -9
  54. package/lib/module/components/Badge/Badge.js +67 -5
  55. package/lib/module/components/Banner/Banner.js +147 -67
  56. package/lib/module/components/BottomNavigation/BottomNavigation.js +37 -15
  57. package/lib/module/components/BottomSheet/BottomSheet.js +80 -55
  58. package/lib/module/components/Button/Button.js +12 -5
  59. package/lib/module/components/Card/Card.js +107 -17
  60. package/lib/module/components/Carousel/Carousel.js +67 -13
  61. package/lib/module/components/Checkbox/Checkbox.js +11 -7
  62. package/lib/module/components/Chip/Chip.js +45 -13
  63. package/lib/module/components/DatePicker/DatePicker.js +185 -76
  64. package/lib/module/components/DateRangePicker/DateRangePicker.js +134 -60
  65. package/lib/module/components/Dialog/Dialog.js +16 -10
  66. package/lib/module/components/Drawer/Drawer.js +13 -10
  67. package/lib/module/components/FieldBase/FieldBase.js +485 -0
  68. package/lib/module/components/FieldBase/index.js +4 -0
  69. package/lib/module/components/FloatingActionButton/FloatingActionButton.js +69 -44
  70. package/lib/module/components/ForceUpdateDialog/ForceUpdateDialog.js +8 -2
  71. package/lib/module/components/FormField/FormField.js +3 -2
  72. package/lib/module/components/ImageGallery/ImageGallery.js +128 -40
  73. package/lib/module/components/Input/Input.js +144 -179
  74. package/lib/module/components/ListItem/ListItem.js +91 -12
  75. package/lib/module/components/Modal/Modal.js +55 -27
  76. package/lib/module/components/NumberInput/NumberInput.js +60 -106
  77. package/lib/module/components/OTPInput/OTPInput.js +65 -58
  78. package/lib/module/components/PickerTrigger/PickerTrigger.js +181 -0
  79. package/lib/module/components/PickerTrigger/index.js +4 -0
  80. package/lib/module/components/ProgressBar/ProgressBar.js +19 -11
  81. package/lib/module/components/Radio/Radio.js +11 -6
  82. package/lib/module/components/Rating/Rating.js +86 -20
  83. package/lib/module/components/SearchBar/SearchBar.js +90 -107
  84. package/lib/module/components/SegmentedControl/SegmentedControl.js +22 -11
  85. package/lib/module/components/Select/Select.js +62 -91
  86. package/lib/module/components/Skeleton/Skeleton.js +135 -175
  87. package/lib/module/components/Skeleton/SkeletonClock.js +110 -0
  88. package/lib/module/components/Skeleton/SkeletonContent.js +167 -84
  89. package/lib/module/components/Skeleton/SkeletonProvider.js +71 -10
  90. package/lib/module/components/Skeleton/index.js +3 -2
  91. package/lib/module/components/Slider/Slider.js +44 -25
  92. package/lib/module/components/Stepper/Stepper.js +201 -31
  93. package/lib/module/components/Swipeable/Swipeable.js +36 -19
  94. package/lib/module/components/Switch/Switch.js +9 -2
  95. package/lib/module/components/Tabs/Tabs.js +84 -21
  96. package/lib/module/components/TimePicker/TimePicker.js +123 -45
  97. package/lib/module/components/Toast/Toast.js +27 -16
  98. package/lib/module/components/Tooltip/Tooltip.js +56 -32
  99. package/lib/module/components/index.js +2 -2
  100. package/lib/module/theme/tokens.js +55 -7
  101. package/lib/typescript/commonjs/components/Accordion/Accordion.d.ts +10 -5
  102. package/lib/typescript/commonjs/components/AppBar/AppBar.d.ts +8 -0
  103. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +12 -6
  104. package/lib/typescript/commonjs/components/Badge/Badge.d.ts +7 -6
  105. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +17 -6
  106. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +7 -0
  107. package/lib/typescript/commonjs/components/Card/Card.d.ts +17 -6
  108. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +7 -6
  109. package/lib/typescript/commonjs/components/Checkbox/Checkbox.d.ts +9 -1
  110. package/lib/typescript/commonjs/components/Chip/Chip.d.ts +13 -6
  111. package/lib/typescript/commonjs/components/DatePicker/DatePicker.d.ts +38 -3
  112. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +36 -3
  113. package/lib/typescript/commonjs/components/Dialog/Dialog.d.ts +13 -1
  114. package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +172 -0
  115. package/lib/typescript/commonjs/components/FieldBase/index.d.ts +3 -0
  116. package/lib/typescript/commonjs/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
  117. package/lib/typescript/commonjs/components/FloatingActionButton/index.d.ts +1 -1
  118. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
  119. package/lib/typescript/commonjs/components/FormField/FormField.d.ts +7 -0
  120. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +6 -4
  121. package/lib/typescript/commonjs/components/Input/Input.d.ts +7 -1
  122. package/lib/typescript/commonjs/components/ListItem/ListItem.d.ts +13 -6
  123. package/lib/typescript/commonjs/components/NumberInput/NumberInput.d.ts +3 -0
  124. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +57 -0
  125. package/lib/typescript/commonjs/components/PickerTrigger/index.d.ts +3 -0
  126. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +2 -0
  127. package/lib/typescript/commonjs/components/Radio/Radio.d.ts +3 -0
  128. package/lib/typescript/commonjs/components/Rating/Rating.d.ts +9 -6
  129. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +3 -0
  130. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +49 -20
  131. package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +60 -0
  132. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +80 -19
  133. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +39 -5
  134. package/lib/typescript/commonjs/components/Skeleton/index.d.ts +6 -4
  135. package/lib/typescript/commonjs/components/Slider/Slider.d.ts +12 -1
  136. package/lib/typescript/commonjs/components/Stepper/Stepper.d.ts +18 -6
  137. package/lib/typescript/commonjs/components/Swipeable/Swipeable.d.ts +2 -0
  138. package/lib/typescript/commonjs/components/Switch/Switch.d.ts +1 -0
  139. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +26 -2
  140. package/lib/typescript/commonjs/components/TimePicker/TimePicker.d.ts +36 -3
  141. package/lib/typescript/commonjs/components/Toast/Toast.d.ts +8 -0
  142. package/lib/typescript/commonjs/components/Tooltip/Tooltip.d.ts +7 -1
  143. package/lib/typescript/commonjs/components/index.d.ts +5 -5
  144. package/lib/typescript/commonjs/index.d.ts +1 -1
  145. package/lib/typescript/commonjs/theme/index.d.ts +1 -1
  146. package/lib/typescript/commonjs/theme/types.d.ts +578 -12
  147. package/lib/typescript/module/components/Accordion/Accordion.d.ts +10 -5
  148. package/lib/typescript/module/components/AppBar/AppBar.d.ts +8 -0
  149. package/lib/typescript/module/components/Avatar/Avatar.d.ts +12 -6
  150. package/lib/typescript/module/components/Badge/Badge.d.ts +7 -6
  151. package/lib/typescript/module/components/Banner/Banner.d.ts +17 -6
  152. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +7 -0
  153. package/lib/typescript/module/components/Card/Card.d.ts +17 -6
  154. package/lib/typescript/module/components/Carousel/Carousel.d.ts +7 -6
  155. package/lib/typescript/module/components/Checkbox/Checkbox.d.ts +9 -1
  156. package/lib/typescript/module/components/Chip/Chip.d.ts +13 -6
  157. package/lib/typescript/module/components/DatePicker/DatePicker.d.ts +38 -3
  158. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +36 -3
  159. package/lib/typescript/module/components/Dialog/Dialog.d.ts +13 -1
  160. package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +172 -0
  161. package/lib/typescript/module/components/FieldBase/index.d.ts +3 -0
  162. package/lib/typescript/module/components/FloatingActionButton/FloatingActionButton.d.ts +8 -6
  163. package/lib/typescript/module/components/FloatingActionButton/index.d.ts +1 -1
  164. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +7 -0
  165. package/lib/typescript/module/components/FormField/FormField.d.ts +7 -0
  166. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +6 -4
  167. package/lib/typescript/module/components/Input/Input.d.ts +7 -1
  168. package/lib/typescript/module/components/ListItem/ListItem.d.ts +13 -6
  169. package/lib/typescript/module/components/NumberInput/NumberInput.d.ts +3 -0
  170. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +57 -0
  171. package/lib/typescript/module/components/PickerTrigger/index.d.ts +3 -0
  172. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +2 -0
  173. package/lib/typescript/module/components/Radio/Radio.d.ts +3 -0
  174. package/lib/typescript/module/components/Rating/Rating.d.ts +9 -6
  175. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +3 -0
  176. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +49 -20
  177. package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +60 -0
  178. package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +80 -19
  179. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +39 -5
  180. package/lib/typescript/module/components/Skeleton/index.d.ts +6 -4
  181. package/lib/typescript/module/components/Slider/Slider.d.ts +12 -1
  182. package/lib/typescript/module/components/Stepper/Stepper.d.ts +18 -6
  183. package/lib/typescript/module/components/Swipeable/Swipeable.d.ts +2 -0
  184. package/lib/typescript/module/components/Switch/Switch.d.ts +1 -0
  185. package/lib/typescript/module/components/Tabs/Tabs.d.ts +26 -2
  186. package/lib/typescript/module/components/TimePicker/TimePicker.d.ts +36 -3
  187. package/lib/typescript/module/components/Toast/Toast.d.ts +8 -0
  188. package/lib/typescript/module/components/Tooltip/Tooltip.d.ts +7 -1
  189. package/lib/typescript/module/components/index.d.ts +5 -5
  190. package/lib/typescript/module/index.d.ts +1 -1
  191. package/lib/typescript/module/theme/index.d.ts +1 -1
  192. package/lib/typescript/module/theme/types.d.ts +578 -12
  193. package/package.json +2 -6
  194. package/lib/commonjs/components/AppIcon/AppIcon.js +0 -120
  195. package/lib/commonjs/types/vector-icons.d.js +0 -2
  196. package/lib/module/components/AppIcon/AppIcon.js +0 -111
  197. package/lib/module/components/AppIcon/index.js +0 -4
  198. package/lib/module/types/vector-icons.d.js +0 -2
  199. package/lib/typescript/commonjs/components/AppIcon/AppIcon.d.ts +0 -20
  200. package/lib/typescript/commonjs/components/AppIcon/index.d.ts +0 -3
  201. package/lib/typescript/module/components/AppIcon/AppIcon.d.ts +0 -20
  202. package/lib/typescript/module/components/AppIcon/index.d.ts +0 -3
@@ -52,10 +52,27 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
52
52
  formatLabel = defaultFormatLabel,
53
53
  accessibilityLabel,
54
54
  style,
55
+ containerStyle,
56
+ trackStyle,
57
+ fillStyle,
58
+ thumbStyle,
59
+ labelStyle,
60
+ thumbPressScale,
61
+ labelShowDuration,
62
+ labelOpacity: labelOpacityProp,
55
63
  testID
56
64
  } = props;
57
65
  const theme = (0, _index.useTheme)();
58
- const sizeCfg = SIZE_MAP[size];
66
+ const sliderTheme = theme.components.slider;
67
+ const sliderSizeTheme = sliderTheme?.[size];
68
+ const sizeCfg = {
69
+ trackHeight: sliderSizeTheme?.trackHeight ?? SIZE_MAP[size].trackHeight,
70
+ thumbDiameter: sliderSizeTheme?.thumbDiameter ?? SIZE_MAP[size].thumbDiameter
71
+ };
72
+ const thumbPressAnimationEnabled = sliderTheme?.thumbPressAnimation ?? false;
73
+ const resolvedPressScale = thumbPressScale ?? sliderTheme?.thumbPressScale ?? 1.1;
74
+ const resolvedLabelDuration = labelShowDuration ?? sliderTheme?.labelShowDuration ?? theme.motion.duration.fast;
75
+ const resolvedLabelOpacity = labelOpacityProp ?? sliderTheme?.labelOpacity ?? 1;
59
76
  const styles = (0, _react.useMemo)(() => buildStyles(theme, sizeCfg), [theme, sizeCfg]);
60
77
 
61
78
  // Track layout (width + x offset within container)
@@ -146,22 +163,24 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
146
163
  }
147
164
  }, [isRange, props]);
148
165
  const animateThumbPress = (0, _react.useCallback)((target, opacity, pressed) => {
149
- _reactNative.Animated.spring(target, {
150
- toValue: pressed ? 1.1 : 1,
151
- damping: theme.motion.spring.snappy.damping,
152
- stiffness: theme.motion.spring.snappy.stiffness,
153
- mass: theme.motion.spring.snappy.mass,
154
- useNativeDriver: true
155
- }).start();
166
+ if (thumbPressAnimationEnabled) {
167
+ _reactNative.Animated.spring(target, {
168
+ toValue: pressed ? resolvedPressScale : 1,
169
+ damping: theme.motion.spring.snappy.damping,
170
+ stiffness: theme.motion.spring.snappy.stiffness,
171
+ mass: theme.motion.spring.snappy.mass,
172
+ useNativeDriver: true
173
+ }).start();
174
+ }
156
175
  if (showLabel) {
157
176
  _reactNative.Animated.timing(opacity, {
158
- toValue: pressed ? 1 : 0,
159
- duration: theme.motion.duration.fast,
177
+ toValue: pressed ? resolvedLabelOpacity : 0,
178
+ duration: resolvedLabelDuration,
160
179
  easing: _reactNative.Easing.out(_reactNative.Easing.cubic),
161
180
  useNativeDriver: true
162
181
  }).start();
163
182
  }
164
- }, [showLabel, theme.motion]);
183
+ }, [showLabel, theme.motion, thumbPressAnimationEnabled, resolvedPressScale, resolvedLabelDuration, resolvedLabelOpacity]);
165
184
 
166
185
  // Build PanResponder for a thumb.
167
186
  const buildResponder = (0, _react.useCallback)(which => {
@@ -171,7 +190,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
171
190
  onPanResponderGrant: () => {
172
191
  dragOffsetRef.current = which === 'low' ? valueToPx(lowRef.current, trackWidth) : valueToPx(highRef.current, trackWidth);
173
192
  animateThumbPress(which === 'low' ? lowScale : highScale, which === 'low' ? lowLabelOpacity : highLabelOpacity, true);
174
- (0, _index2.triggerHaptic)('selection');
193
+ if (sliderTheme?.dragHaptic ?? false) (0, _index2.triggerHaptic)('selection');
175
194
  },
176
195
  onPanResponderMove: (_evt, gesture) => {
177
196
  if (trackWidth <= 0) return;
@@ -180,7 +199,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
180
199
  if (which === 'low') {
181
200
  if (isRange && nextValue > highRef.current) nextValue = highRef.current;
182
201
  if (nextValue !== lastReportedLow.current) {
183
- (0, _index2.triggerHaptic)('selection');
202
+ if (sliderTheme?.stepHaptic ?? false) (0, _index2.triggerHaptic)('selection');
184
203
  lastReportedLow.current = nextValue;
185
204
  }
186
205
  lowRef.current = nextValue;
@@ -189,7 +208,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
189
208
  } else {
190
209
  if (isRange && nextValue < lowRef.current) nextValue = lowRef.current;
191
210
  if (nextValue !== lastReportedHigh.current) {
192
- (0, _index2.triggerHaptic)('selection');
211
+ if (sliderTheme?.stepHaptic ?? false) (0, _index2.triggerHaptic)('selection');
193
212
  lastReportedHigh.current = nextValue;
194
213
  }
195
214
  highRef.current = nextValue;
@@ -216,7 +235,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
216
235
  const px = clamp(e.nativeEvent.locationX, 0, trackWidth);
217
236
  const next = pxToValue(px, trackWidth);
218
237
  if (next !== lowRef.current) {
219
- (0, _index2.triggerHaptic)('selection');
238
+ if (sliderTheme?.tapHaptic ?? false) (0, _index2.triggerHaptic)('selection');
220
239
  lowRef.current = next;
221
240
  lastReportedLow.current = next;
222
241
  _reactNative.Animated.timing(lowX, {
@@ -239,7 +258,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
239
258
  lowRef.current = nextLow;
240
259
  lastReportedLow.current = nextLow;
241
260
  (0, _index.setNativeValue)(lowX, valueToPx(nextLow, trackWidth));
242
- (0, _index2.triggerHaptic)('selection');
261
+ if (sliderTheme?.a11yHaptic ?? false) (0, _index2.triggerHaptic)('selection');
243
262
  fireChange(nextLow, highRef.current);
244
263
  }
245
264
  } else {
@@ -248,11 +267,11 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
248
267
  lowRef.current = next;
249
268
  lastReportedLow.current = next;
250
269
  (0, _index.setNativeValue)(lowX, valueToPx(next, trackWidth));
251
- (0, _index2.triggerHaptic)('selection');
270
+ if (sliderTheme?.a11yHaptic ?? false) (0, _index2.triggerHaptic)('selection');
252
271
  fireChange(next, next);
253
272
  }
254
273
  }
255
- }, [disabled, step, isRange, min, max, valueToPx, trackWidth, lowX, fireChange]);
274
+ }, [disabled, step, isRange, min, max, valueToPx, trackWidth, lowX, fireChange, sliderTheme]);
256
275
 
257
276
  // Computed values for fill bar.
258
277
  const fillLeft = isRange ? lowX : new _reactNative.Animated.Value(0);
@@ -264,7 +283,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
264
283
  const highDisplayValue = highRef.current;
265
284
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
266
285
  ref: ref,
267
- style: [styles.container, style],
286
+ style: [styles.container, containerStyle, style],
268
287
  testID: testID,
269
288
  accessibilityRole: "adjustable",
270
289
  accessibilityLabel: accessibilityLabel,
@@ -294,14 +313,14 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
294
313
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
295
314
  style: [styles.track, {
296
315
  backgroundColor: disabled ? theme.colors.surface.disabled : theme.colors.border.primary
297
- }]
316
+ }, trackStyle]
298
317
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
299
318
  style: [styles.fill, {
300
319
  left: fillLeft,
301
320
  width: fillWidth,
302
321
  backgroundColor: disabled ? theme.colors.surface.disabled : fillColor,
303
322
  opacity: disabled ? 0.6 : 1
304
- }]
323
+ }, fillStyle]
305
324
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
306
325
  ...lowResponder.panHandlers,
307
326
  style: [styles.thumb, {
@@ -316,7 +335,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
316
335
  scale: lowScale
317
336
  }],
318
337
  opacity: disabled ? 0.6 : 1
319
- }],
338
+ }, thumbStyle],
320
339
  accessibilityElementsHidden: true,
321
340
  importantForAccessibility: "no-hide-descendants",
322
341
  children: showLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
@@ -326,7 +345,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
326
345
  }],
327
346
  pointerEvents: "none",
328
347
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
329
- style: styles.bubbleText,
348
+ style: [styles.bubbleText, labelStyle],
330
349
  children: formatLabel(lowDisplayValue)
331
350
  })
332
351
  }) : null
@@ -344,7 +363,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
344
363
  scale: highScale
345
364
  }],
346
365
  opacity: disabled ? 0.6 : 1
347
- }],
366
+ }, thumbStyle],
348
367
  accessibilityElementsHidden: true,
349
368
  importantForAccessibility: "no-hide-descendants",
350
369
  children: showLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
@@ -354,7 +373,7 @@ const Slider = exports.Slider = /*#__PURE__*/(0, _react.forwardRef)((props, ref)
354
373
  }],
355
374
  pointerEvents: "none",
356
375
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
357
- style: styles.bubbleText,
376
+ style: [styles.bubbleText, labelStyle],
358
377
  children: formatLabel(highDisplayValue)
359
378
  })
360
379
  }) : null
@@ -13,6 +13,7 @@ var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
14
  const CIRCLE_SIZE = 24;
15
15
  const PULSE_SIZE = 32;
16
+ const PULSE_DURATION = 1100;
16
17
  const toneColorFor = (theme, tone) => {
17
18
  switch (tone) {
18
19
  case 'success':
@@ -33,13 +34,19 @@ const StepCircle = ({
33
34
  upcomingTextColor,
34
35
  interactive,
35
36
  totalSteps,
36
- onPress
37
+ onPress,
38
+ circleSize,
39
+ pulseSize,
40
+ pulseEnabled,
41
+ pulseDuration,
42
+ pressHapticEnabled,
43
+ circleSlotStyle
37
44
  }) => {
38
45
  const isActive = status === 'active';
39
46
  const pulseScale = (0, _react.useRef)((0, _index.createAnimatedValue)(1)).current;
40
47
  const pulseOpacity = (0, _react.useRef)((0, _index.createAnimatedValue)(0.5)).current;
41
48
  (0, _react.useEffect)(() => {
42
- if (!isActive) {
49
+ if (!isActive || !pulseEnabled) {
43
50
  pulseScale.setValue(1);
44
51
  pulseOpacity.setValue(0);
45
52
  return;
@@ -51,7 +58,7 @@ const StepCircle = ({
51
58
  // positioned view is negligible.
52
59
  const loop = _reactNative.Animated.loop(_reactNative.Animated.parallel([_reactNative.Animated.sequence([_reactNative.Animated.timing(pulseScale, {
53
60
  toValue: 1.4,
54
- duration: 1100,
61
+ duration: pulseDuration,
55
62
  easing: _reactNative.Easing.out(_reactNative.Easing.ease),
56
63
  useNativeDriver: false
57
64
  }), _reactNative.Animated.timing(pulseScale, {
@@ -60,7 +67,7 @@ const StepCircle = ({
60
67
  useNativeDriver: false
61
68
  })]), _reactNative.Animated.sequence([_reactNative.Animated.timing(pulseOpacity, {
62
69
  toValue: 0,
63
- duration: 1100,
70
+ duration: pulseDuration,
64
71
  easing: _reactNative.Easing.out(_reactNative.Easing.ease),
65
72
  useNativeDriver: false
66
73
  }), _reactNative.Animated.timing(pulseOpacity, {
@@ -70,7 +77,7 @@ const StepCircle = ({
70
77
  })])]));
71
78
  loop.start();
72
79
  return () => loop.stop();
73
- }, [isActive, pulseScale, pulseOpacity]);
80
+ }, [isActive, pulseScale, pulseOpacity, pulseEnabled, pulseDuration]);
74
81
  const bgColor = status === 'upcoming' ? upcomingFillColor : toneColor;
75
82
  const borderColor = status === 'upcoming' ? upcomingColor : toneColor;
76
83
  const textColor = status === 'upcoming' ? upcomingTextColor : textOnColor;
@@ -79,17 +86,17 @@ const StepCircle = ({
79
86
  const canPress = interactive && status === 'complete';
80
87
  const handlePress = () => {
81
88
  if (!canPress) return;
82
- (0, _hapticUtils.triggerHaptic)('selection');
89
+ if (pressHapticEnabled) (0, _hapticUtils.triggerHaptic)('selection');
83
90
  onPress?.(index);
84
91
  };
85
92
  const inner = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
86
93
  style: circleStyles.relative,
87
- children: [isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
94
+ children: [isActive && pulseEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
88
95
  pointerEvents: "none",
89
96
  style: [circleStyles.pulse, {
90
- width: PULSE_SIZE,
91
- height: PULSE_SIZE,
92
- borderRadius: PULSE_SIZE / 2,
97
+ width: pulseSize,
98
+ height: pulseSize,
99
+ borderRadius: pulseSize / 2,
93
100
  backgroundColor: toneColor,
94
101
  opacity: pulseOpacity,
95
102
  transform: [{
@@ -98,12 +105,12 @@ const StepCircle = ({
98
105
  }]
99
106
  }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
100
107
  style: [circleStyles.circle, {
101
- width: CIRCLE_SIZE,
102
- height: CIRCLE_SIZE,
103
- borderRadius: CIRCLE_SIZE / 2,
108
+ width: circleSize,
109
+ height: circleSize,
110
+ borderRadius: circleSize / 2,
104
111
  backgroundColor: bgColor,
105
112
  borderColor
106
- }],
113
+ }, circleSlotStyle],
107
114
  children: step.icon ? step.icon : isComplete ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
108
115
  style: [circleStyles.glyph, {
109
116
  color: textColor
@@ -164,21 +171,32 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
164
171
  steps,
165
172
  activeStep,
166
173
  onStepPress,
174
+ allowStepPress = false,
167
175
  variant = 'horizontal',
168
176
  tone = 'primary',
169
177
  loading = false,
170
178
  accessibilityLabel,
171
179
  style,
180
+ containerStyle,
181
+ circleStyle,
182
+ labelStyle,
183
+ connectorStyle,
172
184
  testID
173
185
  } = props;
174
186
  const theme = (0, _index.useTheme)();
187
+ const stepperTheme = theme.components.stepper;
188
+ const circleSize = stepperTheme?.circleSize ?? CIRCLE_SIZE;
189
+ const pulseSize = stepperTheme?.pulseSize ?? PULSE_SIZE;
190
+ const pulseEnabled = stepperTheme?.pulseAnimation ?? false;
191
+ const pulseDuration = stepperTheme?.pulseDuration ?? PULSE_DURATION;
192
+ const pressHapticEnabled = stepperTheme?.pressHaptic ?? false;
175
193
  const styles = (0, _react.useMemo)(() => buildStyles(theme), [theme]);
176
194
  const toneColor = toneColorFor(theme, tone);
177
195
  const upcomingColor = theme.colors.border.primary;
178
196
  const upcomingFillColor = theme.colors.background.primary;
179
197
  const upcomingTextColor = theme.colors.text.secondary;
180
198
  const textOnColor = theme.colors.text.inverse;
181
- const interactive = typeof onStepPress === 'function';
199
+ const interactive = allowStepPress && typeof onStepPress === 'function';
182
200
  const total = steps.length;
183
201
 
184
202
  // Connector progress: animates as activeStep changes.
@@ -205,15 +223,22 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
205
223
  outputRange: ['0%', '100%']
206
224
  });
207
225
  const a11yLabel = accessibilityLabel ?? `Progress: step ${activeStep + 1} of ${total}`;
208
- const halfStepPct = total > 0 ? `${50 / total}%` : `0%`;
226
+
227
+ // Measure row width and inset the connector in pixels so it lines up
228
+ // with the flex-computed circle centres. Percentage insets (50/total%)
229
+ // round independently from flex layout on fractional-density screens
230
+ // and can leave the line poking past the first/last node by a pixel.
231
+ const [hRowWidth, setHRowWidth] = (0, _react.useState)(0);
232
+ const connectorInset = total > 0 && hRowWidth > 0 ? hRowWidth / (2 * total) : 0;
209
233
  const renderHorizontal = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
210
234
  style: styles.hRow,
235
+ onLayout: e => setHRowWidth(e.nativeEvent.layout.width),
211
236
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
212
237
  pointerEvents: "none",
213
238
  style: [styles.hConnectorContainer, {
214
- left: halfStepPct,
215
- right: halfStepPct
216
- }],
239
+ left: connectorInset,
240
+ right: connectorInset
241
+ }, connectorStyle],
217
242
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
218
243
  style: [styles.hConnectorTrack, {
219
244
  backgroundColor: upcomingColor
@@ -240,12 +265,18 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
240
265
  upcomingTextColor: upcomingTextColor,
241
266
  interactive: interactive,
242
267
  totalSteps: total,
243
- onPress: onStepPress
268
+ onPress: onStepPress,
269
+ circleSize: circleSize,
270
+ pulseSize: pulseSize,
271
+ pulseEnabled: pulseEnabled,
272
+ pulseDuration: pulseDuration,
273
+ pressHapticEnabled: pressHapticEnabled,
274
+ circleSlotStyle: circleStyle
244
275
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
245
276
  style: [styles.hLabel, {
246
277
  color: status === 'upcoming' ? theme.colors.text.tertiary : theme.colors.text.primary,
247
278
  fontSize: theme.typography.fontSize.xs
248
- }],
279
+ }, labelStyle],
249
280
  numberOfLines: 1,
250
281
  children: step?.label ?? ' '
251
282
  })]
@@ -273,9 +304,15 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
273
304
  upcomingTextColor: upcomingTextColor,
274
305
  interactive: interactive,
275
306
  totalSteps: total,
276
- onPress: onStepPress
307
+ onPress: onStepPress,
308
+ circleSize: circleSize,
309
+ pulseSize: pulseSize,
310
+ pulseEnabled: pulseEnabled,
311
+ pulseDuration: pulseDuration,
312
+ pressHapticEnabled: pressHapticEnabled,
313
+ circleSlotStyle: circleStyle
277
314
  }), !isLast ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
278
- style: styles.vConnectorContainer,
315
+ style: [styles.vConnectorContainer, connectorStyle],
279
316
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
280
317
  style: [styles.vConnectorTrack, {
281
318
  backgroundColor: upcomingColor
@@ -294,7 +331,7 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
294
331
  color: status === 'upcoming' ? theme.colors.text.tertiary : theme.colors.text.primary,
295
332
  fontSize: theme.typography.fontSize.base,
296
333
  fontWeight: theme.typography.fontWeight.semibold
297
- }],
334
+ }, labelStyle],
298
335
  numberOfLines: 1,
299
336
  children: step?.label ?? ' '
300
337
  }), step.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
@@ -311,7 +348,7 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
311
348
  });
312
349
  const rendered = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
313
350
  ref: ref,
314
- style: [styles.container, style],
351
+ style: [styles.container, containerStyle, style],
315
352
  testID: testID,
316
353
  accessibilityRole: "progressbar",
317
354
  accessibilityLabel: a11yLabel,
@@ -323,15 +360,148 @@ const Stepper = exports.Stepper = /*#__PURE__*/(0, _react.forwardRef)((props, re
323
360
  children: variant === 'horizontal' ? renderHorizontal() : renderVertical()
324
361
  });
325
362
  if (loading) {
326
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.SkeletonContent, {
327
- loading: true,
328
- mode: "auto",
329
- children: rendered
363
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StepperSkeleton, {
364
+ ...props
330
365
  });
331
366
  }
332
367
  return rendered;
333
368
  });
334
369
  Stepper.displayName = 'Stepper';
370
+
371
+ /**
372
+ * Authored placeholder shape for `<Stepper>`. Mirrors the real horizontal
373
+ * layout — a row of circles spaced evenly with a flat connector bar passing
374
+ * through their centers — so the on-screen footprint doesn't reflow when
375
+ * data loads. Vertical variant gets a stacked column with the same circle +
376
+ * label + description pattern.
377
+ *
378
+ * Attached as the `Skeleton` static so `<SkeletonContent>` and any consumer
379
+ * of the auto-walker substitutes this shape automatically. Also rendered
380
+ * directly when `loading` is true on the live `<Stepper>`.
381
+ */
382
+ const StepperSkeleton = ({
383
+ steps,
384
+ variant = 'horizontal',
385
+ containerStyle,
386
+ style,
387
+ testID
388
+ }) => {
389
+ const theme = (0, _index.useTheme)();
390
+ const stepperTheme = theme.components.stepper;
391
+ const circleSize = stepperTheme?.circleSize ?? CIRCLE_SIZE;
392
+ const styles = (0, _react.useMemo)(() => buildStyles(theme), [theme]);
393
+ const total = steps.length || 3;
394
+ if (variant === 'vertical') {
395
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
396
+ style: [styles.container, containerStyle, style],
397
+ testID: testID,
398
+ accessibilityRole: "progressbar",
399
+ accessibilityState: {
400
+ busy: true
401
+ },
402
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
403
+ style: skeletonStyles.vCol,
404
+ children: Array.from({
405
+ length: total
406
+ }).map((_, i) => {
407
+ const isLast = i === total - 1;
408
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
409
+ style: skeletonStyles.vRow,
410
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
411
+ style: [skeletonStyles.vLeft, {
412
+ width: circleSize + 8
413
+ }],
414
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
415
+ shape: "circle",
416
+ width: circleSize,
417
+ height: circleSize
418
+ }), !isLast ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
419
+ width: 2,
420
+ height: 28,
421
+ style: {
422
+ marginTop: 4,
423
+ marginBottom: 4
424
+ }
425
+ }) : null]
426
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
427
+ style: skeletonStyles.vBody,
428
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
429
+ shape: "text",
430
+ width: "55%",
431
+ height: 16,
432
+ style: {
433
+ marginBottom: 4
434
+ }
435
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
436
+ shape: "text",
437
+ width: "80%",
438
+ height: 12
439
+ })]
440
+ })]
441
+ }, `sk-step-${i}`);
442
+ })
443
+ })
444
+ });
445
+ }
446
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
447
+ style: [styles.container, containerStyle, style],
448
+ testID: testID,
449
+ accessibilityRole: "progressbar",
450
+ accessibilityState: {
451
+ busy: true
452
+ },
453
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
454
+ style: styles.hRow,
455
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
456
+ pointerEvents: "none",
457
+ style: [styles.hConnectorContainer, {
458
+ left: `${50 / total}%`,
459
+ right: `${50 / total}%`
460
+ }],
461
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
462
+ width: "100%",
463
+ height: 2,
464
+ radius: 1
465
+ })
466
+ }), Array.from({
467
+ length: total
468
+ }).map((_, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
469
+ style: styles.hStepItem,
470
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
471
+ shape: "circle",
472
+ width: circleSize,
473
+ height: circleSize
474
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Skeleton, {
475
+ shape: "text",
476
+ width: "80%",
477
+ height: 12,
478
+ style: {
479
+ marginTop: theme.spacing.xs
480
+ }
481
+ })]
482
+ }, `sk-step-${i}`))]
483
+ })
484
+ });
485
+ };
486
+ StepperSkeleton.displayName = 'StepperSkeleton';
487
+ Stepper.Skeleton = StepperSkeleton;
488
+ const skeletonStyles = _reactNative.StyleSheet.create({
489
+ vCol: {
490
+ flexDirection: 'column'
491
+ },
492
+ vRow: {
493
+ flexDirection: 'row',
494
+ alignItems: 'flex-start'
495
+ },
496
+ vLeft: {
497
+ alignItems: 'center'
498
+ },
499
+ vBody: {
500
+ flex: 1,
501
+ paddingLeft: 12,
502
+ paddingBottom: 16
503
+ }
504
+ });
335
505
  const buildStyles = theme => _reactNative.StyleSheet.create({
336
506
  container: {
337
507
  width: '100%'