@butternutbox/pawprint-native 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@ var AvatarPrimitive = require('@rn-primitives/avatar');
10
10
  var reactNative = require('react-native');
11
11
  var Svg72 = require('react-native-svg');
12
12
  var SwitchPrimitive = require('@rn-primitives/switch');
13
- var Animated9 = require('react-native-reanimated');
13
+ var Animated10 = require('react-native-reanimated');
14
14
  var slot = require('@rn-primitives/slot');
15
15
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
16
16
  var ProgressPrimitive = require('@rn-primitives/progress');
@@ -47,7 +47,7 @@ var React65__default = /*#__PURE__*/_interopDefault(React65);
47
47
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
48
48
  var Svg72__default = /*#__PURE__*/_interopDefault(Svg72);
49
49
  var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
50
- var Animated9__default = /*#__PURE__*/_interopDefault(Animated9);
50
+ var Animated10__default = /*#__PURE__*/_interopDefault(Animated10);
51
51
  var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
52
52
  var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
53
53
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
@@ -1494,6 +1494,7 @@ var IconButton = React65__default.default.forwardRef(
1494
1494
  __spreadProps(__spreadValues({
1495
1495
  ref,
1496
1496
  disabled: isDisabled,
1497
+ accessibilityRole: "button",
1497
1498
  accessibilityLabel: ariaLabel,
1498
1499
  accessibilityState: { disabled: isDisabled, busy: loading },
1499
1500
  onPressIn: () => setPressed(true),
@@ -5540,7 +5541,7 @@ AccordionRoot.displayName = "Accordion";
5540
5541
  var Accordion = Object.assign(AccordionRoot, {
5541
5542
  Item: AccordionItem
5542
5543
  });
5543
- var _SubtleScaleIn = class _SubtleScaleIn extends Animated9.ComplexAnimationBuilder {
5544
+ var _SubtleScaleIn = class _SubtleScaleIn extends Animated10.ComplexAnimationBuilder {
5544
5545
  constructor() {
5545
5546
  super(...arguments);
5546
5547
  this.build = () => {
@@ -5573,22 +5574,22 @@ var _SubtleScaleIn = class _SubtleScaleIn extends Animated9.ComplexAnimationBuil
5573
5574
  // The worklet in build() drives native with scale 0.85→1 + opacity 0→1.
5574
5575
  _SubtleScaleIn.presetName = "ZoomIn";
5575
5576
  var SubtleScaleIn = _SubtleScaleIn;
5576
- var fadeAnimation = { entering: Animated9.FadeIn, exiting: Animated9.FadeOut };
5577
+ var fadeAnimation = { entering: Animated10.FadeIn, exiting: Animated10.FadeOut };
5577
5578
  var fadeUpAnimation = {
5578
- entering: Animated9.FadeInDown,
5579
- exiting: Animated9.FadeOutDown
5579
+ entering: Animated10.FadeInDown,
5580
+ exiting: Animated10.FadeOutDown
5580
5581
  };
5581
5582
  var fadeDownAnimation = {
5582
- entering: Animated9.FadeInUp,
5583
- exiting: Animated9.FadeOutUp
5583
+ entering: Animated10.FadeInUp,
5584
+ exiting: Animated10.FadeOutUp
5584
5585
  };
5585
5586
  var slideInAnimation = {
5586
- entering: Animated9.FadeInRight,
5587
- exiting: Animated9.FadeOutRight
5587
+ entering: Animated10.FadeInRight,
5588
+ exiting: Animated10.FadeOutRight
5588
5589
  };
5589
5590
  var slideOutAnimation = {
5590
- entering: Animated9.FadeInLeft,
5591
- exiting: Animated9.FadeOutLeft
5591
+ entering: Animated10.FadeInLeft,
5592
+ exiting: Animated10.FadeOutLeft
5592
5593
  };
5593
5594
  var DURATIONS = {
5594
5595
  fade: 200,
@@ -5598,7 +5599,7 @@ var DURATIONS = {
5598
5599
  slideIn: 250,
5599
5600
  slideOut: 250
5600
5601
  };
5601
- var subtleScaleOut = new Animated9.Keyframe({
5602
+ var subtleScaleOut = new Animated10.Keyframe({
5602
5603
  0: {
5603
5604
  opacity: 1,
5604
5605
  transform: [{ scale: 1 }]
@@ -5606,7 +5607,7 @@ var subtleScaleOut = new Animated9.Keyframe({
5606
5607
  100: {
5607
5608
  opacity: 0,
5608
5609
  transform: [{ scale: 0.85 }],
5609
- easing: Animated9.Easing.out(Animated9.Easing.quad)
5610
+ easing: Animated10.Easing.out(Animated10.Easing.quad)
5610
5611
  }
5611
5612
  }).duration(DURATIONS.scale);
5612
5613
  var scaleAnimation = {
@@ -5614,30 +5615,30 @@ var scaleAnimation = {
5614
5615
  exiting: subtleScaleOut
5615
5616
  };
5616
5617
  var ENTERING_CLS = {
5617
- fade: Animated9.FadeIn,
5618
+ fade: Animated10.FadeIn,
5618
5619
  scale: SubtleScaleIn,
5619
- fadeUp: Animated9.FadeInDown,
5620
- fadeDown: Animated9.FadeInUp,
5621
- slideIn: Animated9.FadeInRight,
5622
- slideOut: Animated9.FadeInLeft
5620
+ fadeUp: Animated10.FadeInDown,
5621
+ fadeDown: Animated10.FadeInUp,
5622
+ slideIn: Animated10.FadeInRight,
5623
+ slideOut: Animated10.FadeInLeft
5623
5624
  };
5624
- var easeOut = Animated9.Easing.out(Animated9.Easing.quad);
5625
- var easeInOut = Animated9.Easing.inOut(Animated9.Easing.quad);
5625
+ var easeOut = Animated10.Easing.out(Animated10.Easing.quad);
5626
+ var easeInOut = Animated10.Easing.inOut(Animated10.Easing.quad);
5626
5627
  var ENTERING = {
5627
- fade: Animated9.FadeIn.duration(DURATIONS.fade),
5628
+ fade: Animated10.FadeIn.duration(DURATIONS.fade),
5628
5629
  scale: SubtleScaleIn.duration(DURATIONS.scale).easing(easeOut),
5629
- fadeUp: Animated9.FadeInDown.duration(DURATIONS.fadeUp).easing(easeInOut),
5630
- fadeDown: Animated9.FadeInUp.duration(DURATIONS.fadeDown).easing(easeInOut),
5631
- slideIn: Animated9.FadeInRight.duration(DURATIONS.slideIn).easing(easeOut),
5632
- slideOut: Animated9.FadeInLeft.duration(DURATIONS.slideOut).easing(easeOut)
5630
+ fadeUp: Animated10.FadeInDown.duration(DURATIONS.fadeUp).easing(easeInOut),
5631
+ fadeDown: Animated10.FadeInUp.duration(DURATIONS.fadeDown).easing(easeInOut),
5632
+ slideIn: Animated10.FadeInRight.duration(DURATIONS.slideIn).easing(easeOut),
5633
+ slideOut: Animated10.FadeInLeft.duration(DURATIONS.slideOut).easing(easeOut)
5633
5634
  };
5634
5635
  var EXITING = {
5635
- fade: Animated9.FadeOut.duration(DURATIONS.fade),
5636
+ fade: Animated10.FadeOut.duration(DURATIONS.fade),
5636
5637
  scale: subtleScaleOut,
5637
- fadeUp: Animated9.FadeOutDown.duration(DURATIONS.fadeUp),
5638
- fadeDown: Animated9.FadeOutUp.duration(DURATIONS.fadeDown),
5639
- slideIn: Animated9.FadeOutRight.duration(DURATIONS.slideIn),
5640
- slideOut: Animated9.FadeOutLeft.duration(DURATIONS.slideOut)
5638
+ fadeUp: Animated10.FadeOutDown.duration(DURATIONS.fadeUp),
5639
+ fadeDown: Animated10.FadeOutUp.duration(DURATIONS.fadeDown),
5640
+ slideIn: Animated10.FadeOutRight.duration(DURATIONS.slideIn),
5641
+ slideOut: Animated10.FadeOutLeft.duration(DURATIONS.slideOut)
5641
5642
  };
5642
5643
  function buildDelayedEntering(variant, delayMs) {
5643
5644
  const b = ENTERING_CLS[variant].duration(
@@ -5657,7 +5658,7 @@ var Animated5 = React65__default.default.forwardRef(
5657
5658
  const delayMs = delay !== void 0 && delay > 0 ? Math.round(delay * 1e3) : 0;
5658
5659
  const entering = delayMs > 0 ? buildDelayedEntering(variant, delayMs) : ENTERING[variant];
5659
5660
  return /* @__PURE__ */ jsxRuntime.jsx(
5660
- Animated9__default.default.View,
5661
+ Animated10__default.default.View,
5661
5662
  __spreadProps(__spreadValues({
5662
5663
  ref,
5663
5664
  entering,
@@ -5736,6 +5737,10 @@ var DrawerBodyMaxContext = React65.createContext(null);
5736
5737
  var useDrawerBodyMax = () => React65.useContext(DrawerBodyMaxContext);
5737
5738
  var DrawerFooterContext = React65__default.default.createContext(false);
5738
5739
  var useDrawerFooterContext = () => React65__default.default.useContext(DrawerFooterContext);
5740
+ var DrawerKeyboardInsetContext = React65.createContext(
5741
+ null
5742
+ );
5743
+ var useDrawerKeyboardInset = () => React65.useContext(DrawerKeyboardInsetContext);
5739
5744
  var DrawerHeaderContext = React65__default.default.createContext(null);
5740
5745
  var useDrawerHeaderContext = () => React65__default.default.useContext(DrawerHeaderContext);
5741
5746
  var KEYBOARD_DURATION = 250;
@@ -5743,6 +5748,7 @@ var OPEN_DURATION = 320;
5743
5748
  var CLOSE_DURATION = 220;
5744
5749
  var DISMISS_THRESHOLD = 80;
5745
5750
  var parseTokenValue23 = (value) => parseFloat(value);
5751
+ var claimTouch = () => true;
5746
5752
  var StyledPanel2 = styled52__default.default(reactNative.View)(
5747
5753
  ({
5748
5754
  panelBorderRadius,
@@ -5783,9 +5789,8 @@ var DrawerContent = React65__default.default.forwardRef(
5783
5789
  const { colour, dimensions: dimensions3 } = theme2.tokens.semantics;
5784
5790
  const { isOpen, closeDrawer, onExitComplete } = useDrawerContext();
5785
5791
  const { height: windowHeight } = reactNative.useWindowDimensions();
5786
- const [keyboardHeight, setKeyboardHeight] = React65.useState(0);
5787
5792
  const keyboardSpacer = React65.useRef(new reactNative.Animated.Value(0)).current;
5788
- const maxHeight = (windowHeight - keyboardHeight) * 0.9;
5793
+ const maxHeight = windowHeight * 0.9;
5789
5794
  const topBorder = parseTokenValue23(dimensions3.borderWidth.sm);
5790
5795
  const noFooterBodyPadding = parseTokenValue23(dimensions3.spacing["2xl"]);
5791
5796
  const closeDrawerRef = React65.useRef(closeDrawer);
@@ -5823,11 +5828,9 @@ var DrawerContent = React65__default.default.forwardRef(
5823
5828
  }).start();
5824
5829
  };
5825
5830
  const shown = reactNative.Keyboard.addListener(showEvent, (event) => {
5826
- setKeyboardHeight(event.endCoordinates.height);
5827
5831
  lift(event.endCoordinates.height, event.duration);
5828
5832
  });
5829
5833
  const hidden = reactNative.Keyboard.addListener(hideEvent, (event) => {
5830
- setKeyboardHeight(0);
5831
5834
  lift(0, event.duration);
5832
5835
  });
5833
5836
  return () => {
@@ -6027,17 +6030,18 @@ var DrawerContent = React65__default.default.forwardRef(
6027
6030
  panelBorderRadius: parseTokenValue23(drawer.borderRadius.top),
6028
6031
  panelBgColor: colour.background.container.default,
6029
6032
  panelMaxWidth: parseTokenValue23(drawer.size.maxWidth),
6030
- panelMaxHeight: maxHeight + keyboardHeight,
6033
+ panelMaxHeight: maxHeight,
6031
6034
  panelBorderWidth: parseTokenValue23(dimensions3.borderWidth.sm),
6032
6035
  panelBorderColor: colour.border.default,
6033
6036
  panelShadowColor: modal.shadow.color,
6034
6037
  panelShadowOffsetY: parseTokenValue23(modal.shadow.offsetY),
6035
6038
  panelShadowBlur: parseTokenValue23(modal.shadow.blur),
6036
6039
  accessibilityViewIsModal: true,
6037
- onAccessibilityEscape: closeDrawer
6040
+ onAccessibilityEscape: closeDrawer,
6041
+ onStartShouldSetResponder: claimTouch
6038
6042
  }, props), {
6039
6043
  children: [
6040
- /* @__PURE__ */ jsxRuntime.jsx(DrawerBodyMaxContext.Provider, { value: bodyMax, children }),
6044
+ /* @__PURE__ */ jsxRuntime.jsx(DrawerBodyMaxContext.Provider, { value: bodyMax, children: /* @__PURE__ */ jsxRuntime.jsx(DrawerKeyboardInsetContext.Provider, { value: keyboardSpacer, children }) }),
6041
6045
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: { height: keyboardSpacer } })
6042
6046
  ]
6043
6047
  })
@@ -6350,27 +6354,36 @@ var DrawerDescription = React65__default.default.forwardRef(
6350
6354
  );
6351
6355
  DrawerDescription.displayName = "Drawer.Description";
6352
6356
  var parseTokenValue27 = (value) => parseFloat(value);
6353
- var StyledScrollView = styled52__default.default(reactNative.ScrollView)(
6354
- ({
6355
- bodyPaddingHorizontal,
6356
- bodyPaddingRight,
6357
- bodyMaxHeight,
6358
- bodyPaddingBottom
6359
- }) => ({
6360
- // No `flex: 1`: the ScrollView self-sizes to its content (up to
6361
- // `maxHeight`), so the panel wraps tight around short content and scrolls
6362
- // only when content exceeds the chrome-aware cap.
6363
- flexGrow: 0,
6364
- flexShrink: 1,
6365
- paddingLeft: bodyPaddingHorizontal,
6366
- paddingRight: bodyPaddingRight,
6367
- maxHeight: bodyMaxHeight,
6368
- paddingBottom: bodyPaddingBottom
6369
- })
6370
- );
6357
+ var StyledScrollView = styled52__default.default(reactNative.Animated.ScrollView)(({ bodyPaddingHorizontal, bodyPaddingRight, bodyPaddingBottom }) => ({
6358
+ // No `flex: 1`: the ScrollView self-sizes to its content (up to
6359
+ // `maxHeight`), so the panel wraps tight around short content and scrolls
6360
+ // only when content exceeds the chrome-aware cap.
6361
+ flexGrow: 0,
6362
+ flexShrink: 1,
6363
+ paddingLeft: bodyPaddingHorizontal,
6364
+ paddingRight: bodyPaddingRight,
6365
+ paddingBottom: bodyPaddingBottom
6366
+ }));
6371
6367
  var DrawerBody = React65__default.default.forwardRef(
6372
6368
  (_a, ref) => {
6373
- var _b = _a, { children, contentContainerStyle } = _b, props = __objRest(_b, ["children", "contentContainerStyle"]);
6369
+ var _b = _a, {
6370
+ children,
6371
+ contentContainerStyle,
6372
+ keyboardShouldPersistTaps = "handled",
6373
+ scrollEventThrottle = 16,
6374
+ onScroll,
6375
+ onLayout,
6376
+ style
6377
+ } = _b, props = __objRest(_b, [
6378
+ "children",
6379
+ "contentContainerStyle",
6380
+ "keyboardShouldPersistTaps",
6381
+ "scrollEventThrottle",
6382
+ "onScroll",
6383
+ "onLayout",
6384
+ "style"
6385
+ ]);
6386
+ var _a2;
6374
6387
  const theme2 = react.useTheme();
6375
6388
  const { spacing } = theme2.tokens.components.drawer;
6376
6389
  const { buttons } = theme2.tokens.components;
@@ -6378,12 +6391,83 @@ var DrawerBody = React65__default.default.forwardRef(
6378
6391
  const headerContext = useDrawerHeaderContext();
6379
6392
  const footerContext = useDrawerFooterContext();
6380
6393
  const providedMaxHeight = useDrawerBodyMax();
6394
+ const keyboardInset = useDrawerKeyboardInset();
6381
6395
  const { height: windowHeight } = reactNative.useWindowDimensions();
6382
6396
  const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
6383
6397
  const gap = parseTokenValue27(content.slot.gap);
6384
6398
  const horizontalPadding = parseTokenValue27(content.slot.horizontalPadding);
6385
6399
  const topPadding = parseTokenValue27(content.slot.verticalPadding);
6386
6400
  const bodyMaxHeight = providedMaxHeight != null ? providedMaxHeight : windowHeight - 300;
6401
+ const _b2 = (_a2 = reactNative.StyleSheet.flatten(style)) != null ? _a2 : {}, { maxHeight: styleMaxHeight } = _b2, restStyle = __objRest(_b2, ["maxHeight"]);
6402
+ const cap = typeof styleMaxHeight === "number" ? Math.min(styleMaxHeight, bodyMaxHeight) : bodyMaxHeight;
6403
+ const maxHeight = React65.useMemo(() => {
6404
+ if (!keyboardInset || bodyMaxHeight <= 0) return cap;
6405
+ const slack = bodyMaxHeight - cap;
6406
+ return keyboardInset.interpolate({
6407
+ inputRange: slack > 0 ? [0, slack, bodyMaxHeight] : [0, bodyMaxHeight],
6408
+ outputRange: slack > 0 ? [cap, cap, 0] : [cap, 0],
6409
+ extrapolate: "clamp"
6410
+ });
6411
+ }, [keyboardInset, bodyMaxHeight, cap]);
6412
+ const scrollRef = React65.useRef(null);
6413
+ const contentRef = React65.useRef(null);
6414
+ const scrollOffsetRef = React65.useRef(0);
6415
+ const viewportHeightRef = React65.useRef(0);
6416
+ const combinedRef = React65.useCallback(
6417
+ (node) => {
6418
+ scrollRef.current = node;
6419
+ if (typeof ref === "function") {
6420
+ ref(node);
6421
+ } else if (ref) {
6422
+ ref.current = node;
6423
+ }
6424
+ },
6425
+ [ref]
6426
+ );
6427
+ const handleScroll = React65.useCallback(
6428
+ (event) => {
6429
+ scrollOffsetRef.current = event.nativeEvent.contentOffset.y;
6430
+ onScroll == null ? void 0 : onScroll(event);
6431
+ },
6432
+ [onScroll]
6433
+ );
6434
+ const handleLayout = React65.useCallback(
6435
+ (event) => {
6436
+ viewportHeightRef.current = event.nativeEvent.layout.height;
6437
+ onLayout == null ? void 0 : onLayout(event);
6438
+ },
6439
+ [onLayout]
6440
+ );
6441
+ React65.useEffect(() => {
6442
+ const subscription = reactNative.Keyboard.addListener("keyboardDidShow", () => {
6443
+ const scrollView = scrollRef.current;
6444
+ const focusedInput = reactNative.TextInput.State.currentlyFocusedInput();
6445
+ const contentView = contentRef.current;
6446
+ if (!scrollView || !focusedInput || !contentView) return;
6447
+ focusedInput.measureLayout(
6448
+ contentView,
6449
+ (_left, inputTop, _width, inputHeight) => {
6450
+ const viewportHeight = viewportHeightRef.current;
6451
+ if (viewportHeight <= 0) return;
6452
+ const visibleTop = scrollOffsetRef.current;
6453
+ const visibleBottom = visibleTop + viewportHeight;
6454
+ const wantedTop = inputTop - gap;
6455
+ const wantedBottom = inputTop + inputHeight + gap;
6456
+ if (wantedTop < visibleTop) {
6457
+ scrollView.scrollTo({ y: Math.max(0, wantedTop), animated: true });
6458
+ } else if (wantedBottom > visibleBottom) {
6459
+ scrollView.scrollTo({
6460
+ y: Math.min(wantedTop, wantedBottom - viewportHeight),
6461
+ animated: true
6462
+ });
6463
+ }
6464
+ },
6465
+ () => {
6466
+ }
6467
+ );
6468
+ });
6469
+ return () => subscription.remove();
6470
+ }, [gap]);
6387
6471
  const paddingRight = headerContext === null ? parseTokenValue27(spacing.close.right.md) + parseTokenValue27(buttons.size.sm.minHeight) : horizontalPadding;
6388
6472
  const bodyPaddingBottom = !footerContext ? Math.max(
6389
6473
  parseTokenValue27(theme2.tokens.semantics.dimensions.spacing["2xl"]),
@@ -6392,11 +6476,12 @@ var DrawerBody = React65__default.default.forwardRef(
6392
6476
  return /* @__PURE__ */ jsxRuntime.jsx(
6393
6477
  StyledScrollView,
6394
6478
  __spreadProps(__spreadValues({
6395
- ref,
6479
+ ref: combinedRef,
6480
+ innerViewRef: contentRef,
6396
6481
  bodyPaddingHorizontal: horizontalPadding,
6397
6482
  bodyPaddingRight: paddingRight,
6398
- bodyMaxHeight,
6399
6483
  bodyPaddingBottom,
6484
+ style: [restStyle, { maxHeight }],
6400
6485
  contentContainerStyle: [
6401
6486
  {
6402
6487
  gap,
@@ -6404,7 +6489,11 @@ var DrawerBody = React65__default.default.forwardRef(
6404
6489
  paddingBottom: 0
6405
6490
  },
6406
6491
  contentContainerStyle
6407
- ]
6492
+ ],
6493
+ keyboardShouldPersistTaps,
6494
+ scrollEventThrottle,
6495
+ onScroll: handleScroll,
6496
+ onLayout: handleLayout
6408
6497
  }, props), {
6409
6498
  children
6410
6499
  })
@@ -7926,7 +8015,7 @@ function usePasswordField({
7926
8015
  }
7927
8016
  var PROGRESS_ANIMATION = {
7928
8017
  duration: 450,
7929
- easing: Animated9.Easing.inOut(Animated9.Easing.cubic)
8018
+ easing: Animated10.Easing.inOut(Animated10.Easing.cubic)
7930
8019
  };
7931
8020
  var parseTokenValue40 = (value) => parseFloat(value);
7932
8021
  var StyledRoot12 = styled52__default.default(reactNative.View)(({ rootGap }) => ({
@@ -7950,7 +8039,7 @@ var StyledTrack = styled52__default.default(reactNative.View)(({ trackHeight, tr
7950
8039
  backgroundColor: trackBgColor,
7951
8040
  overflow: "hidden"
7952
8041
  }));
7953
- var StyledIndicator = styled52__default.default(Animated9__default.default.View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
8042
+ var StyledIndicator = styled52__default.default(Animated10__default.default.View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
7954
8043
  height: "100%",
7955
8044
  borderRadius: indicatorBorderRadius,
7956
8045
  backgroundColor: indicatorBgColor
@@ -7991,13 +8080,13 @@ var Progress = React65__default.default.forwardRef(
7991
8080
  const percent = clampedValue / safeMax * 100;
7992
8081
  const showHeader = Boolean(label) || Boolean(description);
7993
8082
  const typographyForSize = size === "lg" ? typography.large : typography.small;
7994
- const reducedMotion = Animated9.useReducedMotion();
8083
+ const reducedMotion = Animated10.useReducedMotion();
7995
8084
  const shouldAnimate = animate && !reducedMotion;
7996
- const fill = Animated9.useSharedValue(percent);
8085
+ const fill = Animated10.useSharedValue(percent);
7997
8086
  React65__default.default.useEffect(() => {
7998
- fill.value = shouldAnimate ? Animated9.withTiming(percent, PROGRESS_ANIMATION) : percent;
8087
+ fill.value = shouldAnimate ? Animated10.withTiming(percent, PROGRESS_ANIMATION) : percent;
7999
8088
  }, [fill, percent, shouldAnimate]);
8000
- const indicatorStyle = Animated9.useAnimatedStyle(() => ({
8089
+ const indicatorStyle = Animated10.useAnimatedStyle(() => ({
8001
8090
  width: `${fill.value}%`
8002
8091
  }));
8003
8092
  const trackSize = { lg: track.size.large, sm: track.size.small }[size];
@@ -9160,9 +9249,17 @@ var SelectField = React65__default.default.forwardRef(
9160
9249
  }
9161
9250
  );
9162
9251
  }, [windowHeight, keyboardHeight, maxDropdownHeight]);
9252
+ const isOpen = isFocused && !disabled;
9163
9253
  React65__default.default.useEffect(() => {
9164
- if (isFocused) measurePlacement();
9165
- }, [isFocused, measurePlacement]);
9254
+ if (!isOpen) return;
9255
+ let frame = 0;
9256
+ const track = () => {
9257
+ measurePlacement();
9258
+ frame = requestAnimationFrame(track);
9259
+ };
9260
+ track();
9261
+ return () => cancelAnimationFrame(frame);
9262
+ }, [isOpen, measurePlacement]);
9166
9263
  React65__default.default.useEffect(() => {
9167
9264
  if (!isControlled || isFocused) return;
9168
9265
  if (value === null || value === void 0) {
@@ -9221,7 +9318,6 @@ var SelectField = React65__default.default.forwardRef(
9221
9318
  if (searchable) (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
9222
9319
  };
9223
9320
  const fieldState = error ? "error" : state;
9224
- const isOpen = isFocused && !disabled;
9225
9321
  const clearAction = !disabled && inputText.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
9226
9322
  reactNative.Pressable,
9227
9323
  {
@@ -9533,7 +9629,7 @@ var Wrapper = styled52__default.default(reactNative.View)({
9533
9629
  alignItems: "center",
9534
9630
  justifyContent: "space-between"
9535
9631
  });
9536
- var SelectIcon = styled52__default.default(Animated9__default.default.View)({
9632
+ var SelectIcon = styled52__default.default(Animated10__default.default.View)({
9537
9633
  position: "absolute",
9538
9634
  right: 0,
9539
9635
  marginRight: 0
@@ -9608,8 +9704,8 @@ var parseSize2 = (value) => {
9608
9704
  return parseInt(value.replace("px", ""), 10);
9609
9705
  };
9610
9706
  var useIconAnimation = () => {
9611
- const iconRotation = Animated9.useSharedValue(0);
9612
- const iconAnimationStyles = Animated9.useAnimatedStyle(() => {
9707
+ const iconRotation = Animated10.useSharedValue(0);
9708
+ const iconAnimationStyles = Animated10.useAnimatedStyle(() => {
9613
9709
  "worklet";
9614
9710
  return {
9615
9711
  transform: [{ rotate: `${iconRotation.value}deg` }]
@@ -9826,10 +9922,10 @@ var Slider = React65__default.default.forwardRef(
9826
9922
  const isWeb = reactNative.Platform.OS === "web";
9827
9923
  const [trackLayoutWidth, setTrackLayoutWidth] = React65.useState(0);
9828
9924
  const webFraction = max > min ? (currentValue - min) / (max - min) : 0;
9829
- const trackWidth = Animated9.useSharedValue(0);
9830
- const thumbLeft = Animated9.useSharedValue(0);
9831
- const indicatorWidth = Animated9.useSharedValue(thumbSize / 2);
9832
- const lastReported = Animated9.useSharedValue(currentValue);
9925
+ const trackWidth = Animated10.useSharedValue(0);
9926
+ const thumbLeft = Animated10.useSharedValue(0);
9927
+ const indicatorWidth = Animated10.useSharedValue(thumbSize / 2);
9928
+ const lastReported = Animated10.useSharedValue(currentValue);
9833
9929
  const handleJSUpdate = (v) => {
9834
9930
  if (!isControlled) setInternalValue(v);
9835
9931
  onValueChange == null ? void 0 : onValueChange(v);
@@ -9899,10 +9995,10 @@ var Slider = React65__default.default.forwardRef(
9899
9995
  "worklet";
9900
9996
  reactNativeWorklets.scheduleOnRN(handleCommit, lastReported.value);
9901
9997
  });
9902
- const thumbAnimStyle = Animated9.useAnimatedStyle(() => ({
9998
+ const thumbAnimStyle = Animated10.useAnimatedStyle(() => ({
9903
9999
  transform: [{ translateX: thumbLeft.value }]
9904
10000
  }));
9905
- const indicatorAnimStyle = Animated9.useAnimatedStyle(() => ({
10001
+ const indicatorAnimStyle = Animated10.useAnimatedStyle(() => ({
9906
10002
  width: indicatorWidth.value
9907
10003
  }));
9908
10004
  const handleWebValueChange = (values) => {
@@ -10084,9 +10180,9 @@ var Slider = React65__default.default.forwardRef(
10084
10180
  onLayout: handleNativeLayout,
10085
10181
  children: [
10086
10182
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: trackBackgroundStyle }),
10087
- /* @__PURE__ */ jsxRuntime.jsx(Animated9__default.default.View, { style: [indicatorBaseStyle, indicatorAnimStyle] }),
10183
+ /* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: [indicatorBaseStyle, indicatorAnimStyle] }),
10088
10184
  /* @__PURE__ */ jsxRuntime.jsx(
10089
- Animated9__default.default.View,
10185
+ Animated10__default.default.View,
10090
10186
  {
10091
10187
  style: [
10092
10188
  __spreadProps(__spreadValues({}, thumbStyle), { position: "absolute", left: 0 }),
@@ -10441,8 +10537,8 @@ Notification.displayName = "Notification";
10441
10537
  var parseTokenValue47 = (value) => parseFloat(value);
10442
10538
  var SCALE_STEP = 0.06;
10443
10539
  var SPRING_CONFIG = { damping: 20, stiffness: 260, mass: 0.5 };
10444
- var CARD_ENTERING = Animated9.FadeInDown.duration(200).easing(Animated9.Easing.inOut(Animated9.Easing.quad));
10445
- var CARD_EXITING = Animated9.FadeOutDown.duration(200);
10540
+ var CARD_ENTERING = Animated10.FadeInDown.duration(200).easing(Animated10.Easing.inOut(Animated10.Easing.quad));
10541
+ var CARD_EXITING = Animated10.FadeOutDown.duration(200);
10446
10542
  var CARD_BASE_STYLE = {
10447
10543
  position: "absolute",
10448
10544
  bottom: 0,
@@ -10483,15 +10579,15 @@ var StackedCard = ({
10483
10579
  }) => {
10484
10580
  const isBackfillRef = React65__default.default.useRef(isBackfill);
10485
10581
  const wasBackfill = isBackfillRef.current;
10486
- const depthSV = Animated9.useSharedValue(wasBackfill ? depth + 1 : depth);
10487
- const opacitySV = Animated9.useSharedValue(wasBackfill ? 0 : 1);
10582
+ const depthSV = Animated10.useSharedValue(wasBackfill ? depth + 1 : depth);
10583
+ const opacitySV = Animated10.useSharedValue(wasBackfill ? 0 : 1);
10488
10584
  React65__default.default.useEffect(() => {
10489
- depthSV.value = Animated9.withSpring(depth, SPRING_CONFIG);
10585
+ depthSV.value = Animated10.withSpring(depth, SPRING_CONFIG);
10490
10586
  }, [depth, depthSV]);
10491
10587
  React65__default.default.useEffect(() => {
10492
- if (wasBackfill) opacitySV.value = Animated9.withSpring(1, SPRING_CONFIG);
10588
+ if (wasBackfill) opacitySV.value = Animated10.withSpring(1, SPRING_CONFIG);
10493
10589
  }, []);
10494
- const depthStyle = Animated9.useAnimatedStyle(() => ({
10590
+ const depthStyle = Animated10.useAnimatedStyle(() => ({
10495
10591
  opacity: opacitySV.value,
10496
10592
  transform: [
10497
10593
  { translateY: depthSV.value * revealStep },
@@ -10500,7 +10596,7 @@ var StackedCard = ({
10500
10596
  }));
10501
10597
  const isFront = depth === 0;
10502
10598
  return /* @__PURE__ */ jsxRuntime.jsx(
10503
- Animated9__default.default.View,
10599
+ Animated10__default.default.View,
10504
10600
  {
10505
10601
  entering: wasBackfill ? void 0 : CARD_ENTERING,
10506
10602
  exiting: CARD_EXITING,
@@ -10508,7 +10604,7 @@ var StackedCard = ({
10508
10604
  accessibilityElementsHidden: !isFront,
10509
10605
  importantForAccessibility: isFront ? "auto" : "no-hide-descendants",
10510
10606
  style: [CARD_BASE_STYLE, { zIndex: -depth }],
10511
- children: /* @__PURE__ */ jsxRuntime.jsx(Animated9__default.default.View, { style: [DEPTH_LAYER_STYLE, depthStyle], children: /* @__PURE__ */ jsxRuntime.jsx(
10607
+ children: /* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: [DEPTH_LAYER_STYLE, depthStyle], children: /* @__PURE__ */ jsxRuntime.jsx(
10512
10608
  Notification,
10513
10609
  {
10514
10610
  variant: "toast",
@@ -11213,15 +11309,16 @@ var MessageCard = {
11213
11309
  Banner: MessageCardBanner
11214
11310
  };
11215
11311
  var parseTokenValue52 = (value) => parseFloat(value);
11216
- var slideEaseOut = Animated9.Easing.out(Animated9.Easing.quad);
11312
+ var slideEaseOut = Animated10.Easing.out(Animated10.Easing.quad);
11217
11313
  var MONTH_SLIDE_ENTERING = {
11218
- forward: Animated9.FadeInRight.duration(250).easing(slideEaseOut),
11219
- backward: Animated9.FadeInLeft.duration(250).easing(slideEaseOut)
11314
+ forward: Animated10.FadeInRight.duration(250).easing(slideEaseOut),
11315
+ backward: Animated10.FadeInLeft.duration(250).easing(slideEaseOut)
11220
11316
  };
11221
11317
  var MONTH_SLIDE_EXITING = {
11222
- forward: Animated9.FadeOutLeft.duration(200),
11223
- backward: Animated9.FadeOutRight.duration(200)
11318
+ forward: Animated10.FadeOutLeft.duration(200),
11319
+ backward: Animated10.FadeOutRight.duration(200)
11224
11320
  };
11321
+ var FOCUS_DELAY_MS = 150;
11225
11322
  var DEFAULT_WEEK_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
11226
11323
  function buildCalendarGrid(year, month) {
11227
11324
  const firstDay = new Date(year, month, 1);
@@ -11335,6 +11432,7 @@ var DatePicker = React65__default.default.forwardRef(
11335
11432
  getDateState,
11336
11433
  getDateAccessibilityLabel,
11337
11434
  isDateDisabled,
11435
+ focusDate,
11338
11436
  minDate,
11339
11437
  maxDate
11340
11438
  } = _b, rest = __objRest(_b, [
@@ -11356,6 +11454,7 @@ var DatePicker = React65__default.default.forwardRef(
11356
11454
  "getDateState",
11357
11455
  "getDateAccessibilityLabel",
11358
11456
  "isDateDisabled",
11457
+ "focusDate",
11359
11458
  "minDate",
11360
11459
  "maxDate"
11361
11460
  ]);
@@ -11392,6 +11491,18 @@ var DatePicker = React65__default.default.forwardRef(
11392
11491
  }),
11393
11492
  [datePicker, dt, theme2]
11394
11493
  );
11494
+ const cellRefs = React65.useRef(/* @__PURE__ */ new Map());
11495
+ const focusTime = focusDate == null ? void 0 : focusDate.getTime();
11496
+ React65.useEffect(() => {
11497
+ if (focusTime === void 0) return;
11498
+ const target = new Date(focusTime);
11499
+ if (target.getFullYear() !== year || target.getMonth() !== month) return;
11500
+ const timeout = setTimeout(() => {
11501
+ const cell = cellRefs.current.get(toDateKey(target));
11502
+ if (cell) reactNative.AccessibilityInfo.sendAccessibilityEvent(cell, "focus");
11503
+ }, FOCUS_DELAY_MS);
11504
+ return () => clearTimeout(timeout);
11505
+ }, [focusTime, year, month]);
11395
11506
  const resolvedGetDateState = React65.useCallback(
11396
11507
  (date) => {
11397
11508
  var _a3;
@@ -11549,7 +11660,7 @@ var DatePicker = React65__default.default.forwardRef(
11549
11660
  ) })
11550
11661
  ] }),
11551
11662
  /* @__PURE__ */ jsxRuntime.jsx(
11552
- Animated9__default.default.View,
11663
+ Animated10__default.default.View,
11553
11664
  {
11554
11665
  entering: MONTH_SLIDE_ENTERING[slideDir],
11555
11666
  exiting: MONTH_SLIDE_EXITING[slideDir],
@@ -11584,6 +11695,11 @@ var DatePicker = React65__default.default.forwardRef(
11584
11695
  return /* @__PURE__ */ jsxRuntime.jsx(
11585
11696
  reactNative.Pressable,
11586
11697
  {
11698
+ ref: (node) => {
11699
+ const key = toDateKey(date);
11700
+ if (node) cellRefs.current.set(key, node);
11701
+ else cellRefs.current.delete(key);
11702
+ },
11587
11703
  onPress: !isDisabled ? () => onDateSelect == null ? void 0 : onDateSelect(date) : void 0,
11588
11704
  disabled: isDisabled,
11589
11705
  accessible: true,
@@ -12780,27 +12896,27 @@ var ShineOverlay = ({
12780
12896
  radius,
12781
12897
  highlight
12782
12898
  }) => {
12783
- const reducedMotion = Animated9.useReducedMotion();
12899
+ const reducedMotion = Animated10.useReducedMotion();
12784
12900
  const [width, setWidth] = React65__default.default.useState(0);
12785
- const progress = Animated9.useSharedValue(0);
12901
+ const progress = Animated10.useSharedValue(0);
12786
12902
  const bandWidth = width * SHINE_BAND_RATIO;
12787
12903
  React65__default.default.useEffect(() => {
12788
12904
  if (reducedMotion || !width) return;
12789
- progress.value = Animated9.withDelay(
12905
+ progress.value = Animated10.withDelay(
12790
12906
  ANIMATION_DELAY,
12791
- Animated9.withRepeat(
12792
- Animated9.withSequence(
12793
- Animated9.withTiming(1, {
12907
+ Animated10.withRepeat(
12908
+ Animated10.withSequence(
12909
+ Animated10.withTiming(1, {
12794
12910
  duration: SHINE_SWEEP,
12795
- easing: Animated9.Easing.inOut(Animated9.Easing.ease)
12911
+ easing: Animated10.Easing.inOut(Animated10.Easing.ease)
12796
12912
  }),
12797
- Animated9.withDelay(SHINE_REST, Animated9.withTiming(0, { duration: 0 }))
12913
+ Animated10.withDelay(SHINE_REST, Animated10.withTiming(0, { duration: 0 }))
12798
12914
  ),
12799
12915
  ANIMATION_ITERATIONS
12800
12916
  )
12801
12917
  );
12802
12918
  }, [progress, reducedMotion, width]);
12803
- const bandStyle = Animated9.useAnimatedStyle(() => ({
12919
+ const bandStyle = Animated10.useAnimatedStyle(() => ({
12804
12920
  transform: [
12805
12921
  {
12806
12922
  translateX: -bandWidth * 1.5 + progress.value * (width + bandWidth * 2.5)
@@ -12821,7 +12937,7 @@ var ShineOverlay = ({
12821
12937
  { borderRadius: radius, overflow: "hidden" }
12822
12938
  ],
12823
12939
  children: width > 0 && /* @__PURE__ */ jsxRuntime.jsx(
12824
- Animated9__default.default.View,
12940
+ Animated10__default.default.View,
12825
12941
  {
12826
12942
  style: [
12827
12943
  { position: "absolute", top: 0, bottom: 0, width: bandWidth },
@@ -12850,33 +12966,33 @@ var ShineOverlay = ({
12850
12966
  var createNudgingIcon = (IconComponent, axis, direction) => {
12851
12967
  var _a;
12852
12968
  const NudgingIcon = (props) => {
12853
- const reducedMotion = Animated9.useReducedMotion();
12854
- const offset = Animated9.useSharedValue(0);
12969
+ const reducedMotion = Animated10.useReducedMotion();
12970
+ const offset = Animated10.useSharedValue(0);
12855
12971
  React65__default.default.useEffect(() => {
12856
12972
  if (reducedMotion) return;
12857
- const step = (to) => Animated9.withTiming(to, {
12973
+ const step = (to) => Animated10.withTiming(to, {
12858
12974
  duration: NUDGE_STEP,
12859
- easing: Animated9.Easing.inOut(Animated9.Easing.ease)
12975
+ easing: Animated10.Easing.inOut(Animated10.Easing.ease)
12860
12976
  });
12861
12977
  const distance = NUDGE_DISTANCE * direction;
12862
- offset.value = Animated9.withDelay(
12978
+ offset.value = Animated10.withDelay(
12863
12979
  ANIMATION_DELAY,
12864
- Animated9.withRepeat(
12865
- Animated9.withSequence(
12980
+ Animated10.withRepeat(
12981
+ Animated10.withSequence(
12866
12982
  step(distance),
12867
12983
  step(0),
12868
12984
  step(distance),
12869
12985
  step(0),
12870
- Animated9.withDelay(NUDGE_REST, Animated9.withTiming(0, { duration: 0 }))
12986
+ Animated10.withDelay(NUDGE_REST, Animated10.withTiming(0, { duration: 0 }))
12871
12987
  ),
12872
12988
  ANIMATION_ITERATIONS
12873
12989
  )
12874
12990
  );
12875
12991
  }, [offset, reducedMotion]);
12876
- const nudgeStyle = Animated9.useAnimatedStyle(
12992
+ const nudgeStyle = Animated10.useAnimatedStyle(
12877
12993
  () => axis === "translateX" ? { transform: [{ translateX: offset.value }] } : { transform: [{ translateY: offset.value }] }
12878
12994
  );
12879
- return /* @__PURE__ */ jsxRuntime.jsx(Animated9__default.default.View, { style: nudgeStyle, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, __spreadValues({}, props)) });
12995
+ return /* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: nudgeStyle, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, __spreadValues({}, props)) });
12880
12996
  };
12881
12997
  NudgingIcon.displayName = `Nudging(${(_a = IconComponent.displayName) != null ? _a : "Icon"})`;
12882
12998
  return NudgingIcon;