@butternutbox/pawprint-native 2.1.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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +44 -0
- package/COMPONENT_GUIDELINES.md +12 -8
- package/dist/index.cjs +302 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +231 -116
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/react-native.tsx +10 -1
- package/src/components/atoms/IconButton/IconButton.tsx +1 -0
- package/src/components/molecules/DatePicker/DatePicker.tsx +49 -8
- package/src/components/molecules/Drawer/Drawer.test.tsx +63 -0
- package/src/components/molecules/Drawer/DrawerBody.tsx +131 -25
- package/src/components/molecules/Drawer/DrawerContent.tsx +10 -8
- package/src/components/molecules/Drawer/DrawerKeyboardInsetContext.ts +9 -0
- package/src/components/molecules/SelectField/SelectField.tsx +13 -3
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
|
|
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
|
|
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
|
|
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:
|
|
5577
|
+
var fadeAnimation = { entering: Animated10.FadeIn, exiting: Animated10.FadeOut };
|
|
5577
5578
|
var fadeUpAnimation = {
|
|
5578
|
-
entering:
|
|
5579
|
-
exiting:
|
|
5579
|
+
entering: Animated10.FadeInDown,
|
|
5580
|
+
exiting: Animated10.FadeOutDown
|
|
5580
5581
|
};
|
|
5581
5582
|
var fadeDownAnimation = {
|
|
5582
|
-
entering:
|
|
5583
|
-
exiting:
|
|
5583
|
+
entering: Animated10.FadeInUp,
|
|
5584
|
+
exiting: Animated10.FadeOutUp
|
|
5584
5585
|
};
|
|
5585
5586
|
var slideInAnimation = {
|
|
5586
|
-
entering:
|
|
5587
|
-
exiting:
|
|
5587
|
+
entering: Animated10.FadeInRight,
|
|
5588
|
+
exiting: Animated10.FadeOutRight
|
|
5588
5589
|
};
|
|
5589
5590
|
var slideOutAnimation = {
|
|
5590
|
-
entering:
|
|
5591
|
-
exiting:
|
|
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
|
|
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:
|
|
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:
|
|
5618
|
+
fade: Animated10.FadeIn,
|
|
5618
5619
|
scale: SubtleScaleIn,
|
|
5619
|
-
fadeUp:
|
|
5620
|
-
fadeDown:
|
|
5621
|
-
slideIn:
|
|
5622
|
-
slideOut:
|
|
5620
|
+
fadeUp: Animated10.FadeInDown,
|
|
5621
|
+
fadeDown: Animated10.FadeInUp,
|
|
5622
|
+
slideIn: Animated10.FadeInRight,
|
|
5623
|
+
slideOut: Animated10.FadeInLeft
|
|
5623
5624
|
};
|
|
5624
|
-
var easeOut =
|
|
5625
|
-
var easeInOut =
|
|
5625
|
+
var easeOut = Animated10.Easing.out(Animated10.Easing.quad);
|
|
5626
|
+
var easeInOut = Animated10.Easing.inOut(Animated10.Easing.quad);
|
|
5626
5627
|
var ENTERING = {
|
|
5627
|
-
fade:
|
|
5628
|
+
fade: Animated10.FadeIn.duration(DURATIONS.fade),
|
|
5628
5629
|
scale: SubtleScaleIn.duration(DURATIONS.scale).easing(easeOut),
|
|
5629
|
-
fadeUp:
|
|
5630
|
-
fadeDown:
|
|
5631
|
-
slideIn:
|
|
5632
|
-
slideOut:
|
|
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:
|
|
5636
|
+
fade: Animated10.FadeOut.duration(DURATIONS.fade),
|
|
5636
5637
|
scale: subtleScaleOut,
|
|
5637
|
-
fadeUp:
|
|
5638
|
-
fadeDown:
|
|
5639
|
-
slideIn:
|
|
5640
|
-
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
|
-
|
|
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 =
|
|
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,18 +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
|
|
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
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
+
accessibilityViewIsModal: true,
|
|
6040
|
+
onAccessibilityEscape: closeDrawer,
|
|
6041
|
+
onStartShouldSetResponder: claimTouch
|
|
6039
6042
|
}, props), {
|
|
6040
6043
|
children: [
|
|
6041
|
-
/* @__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 }) }),
|
|
6042
6045
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: { height: keyboardSpacer } })
|
|
6043
6046
|
]
|
|
6044
6047
|
})
|
|
@@ -6351,27 +6354,36 @@ var DrawerDescription = React65__default.default.forwardRef(
|
|
|
6351
6354
|
);
|
|
6352
6355
|
DrawerDescription.displayName = "Drawer.Description";
|
|
6353
6356
|
var parseTokenValue27 = (value) => parseFloat(value);
|
|
6354
|
-
var StyledScrollView = styled52__default.default(reactNative.ScrollView)(
|
|
6355
|
-
(
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
flexGrow: 0,
|
|
6365
|
-
flexShrink: 1,
|
|
6366
|
-
paddingLeft: bodyPaddingHorizontal,
|
|
6367
|
-
paddingRight: bodyPaddingRight,
|
|
6368
|
-
maxHeight: bodyMaxHeight,
|
|
6369
|
-
paddingBottom: bodyPaddingBottom
|
|
6370
|
-
})
|
|
6371
|
-
);
|
|
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
|
+
}));
|
|
6372
6367
|
var DrawerBody = React65__default.default.forwardRef(
|
|
6373
6368
|
(_a, ref) => {
|
|
6374
|
-
var _b = _a, {
|
|
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;
|
|
6375
6387
|
const theme2 = react.useTheme();
|
|
6376
6388
|
const { spacing } = theme2.tokens.components.drawer;
|
|
6377
6389
|
const { buttons } = theme2.tokens.components;
|
|
@@ -6379,12 +6391,83 @@ var DrawerBody = React65__default.default.forwardRef(
|
|
|
6379
6391
|
const headerContext = useDrawerHeaderContext();
|
|
6380
6392
|
const footerContext = useDrawerFooterContext();
|
|
6381
6393
|
const providedMaxHeight = useDrawerBodyMax();
|
|
6394
|
+
const keyboardInset = useDrawerKeyboardInset();
|
|
6382
6395
|
const { height: windowHeight } = reactNative.useWindowDimensions();
|
|
6383
6396
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
6384
6397
|
const gap = parseTokenValue27(content.slot.gap);
|
|
6385
6398
|
const horizontalPadding = parseTokenValue27(content.slot.horizontalPadding);
|
|
6386
6399
|
const topPadding = parseTokenValue27(content.slot.verticalPadding);
|
|
6387
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]);
|
|
6388
6471
|
const paddingRight = headerContext === null ? parseTokenValue27(spacing.close.right.md) + parseTokenValue27(buttons.size.sm.minHeight) : horizontalPadding;
|
|
6389
6472
|
const bodyPaddingBottom = !footerContext ? Math.max(
|
|
6390
6473
|
parseTokenValue27(theme2.tokens.semantics.dimensions.spacing["2xl"]),
|
|
@@ -6393,11 +6476,12 @@ var DrawerBody = React65__default.default.forwardRef(
|
|
|
6393
6476
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6394
6477
|
StyledScrollView,
|
|
6395
6478
|
__spreadProps(__spreadValues({
|
|
6396
|
-
ref,
|
|
6479
|
+
ref: combinedRef,
|
|
6480
|
+
innerViewRef: contentRef,
|
|
6397
6481
|
bodyPaddingHorizontal: horizontalPadding,
|
|
6398
6482
|
bodyPaddingRight: paddingRight,
|
|
6399
|
-
bodyMaxHeight,
|
|
6400
6483
|
bodyPaddingBottom,
|
|
6484
|
+
style: [restStyle, { maxHeight }],
|
|
6401
6485
|
contentContainerStyle: [
|
|
6402
6486
|
{
|
|
6403
6487
|
gap,
|
|
@@ -6405,7 +6489,11 @@ var DrawerBody = React65__default.default.forwardRef(
|
|
|
6405
6489
|
paddingBottom: 0
|
|
6406
6490
|
},
|
|
6407
6491
|
contentContainerStyle
|
|
6408
|
-
]
|
|
6492
|
+
],
|
|
6493
|
+
keyboardShouldPersistTaps,
|
|
6494
|
+
scrollEventThrottle,
|
|
6495
|
+
onScroll: handleScroll,
|
|
6496
|
+
onLayout: handleLayout
|
|
6409
6497
|
}, props), {
|
|
6410
6498
|
children
|
|
6411
6499
|
})
|
|
@@ -7927,7 +8015,7 @@ function usePasswordField({
|
|
|
7927
8015
|
}
|
|
7928
8016
|
var PROGRESS_ANIMATION = {
|
|
7929
8017
|
duration: 450,
|
|
7930
|
-
easing:
|
|
8018
|
+
easing: Animated10.Easing.inOut(Animated10.Easing.cubic)
|
|
7931
8019
|
};
|
|
7932
8020
|
var parseTokenValue40 = (value) => parseFloat(value);
|
|
7933
8021
|
var StyledRoot12 = styled52__default.default(reactNative.View)(({ rootGap }) => ({
|
|
@@ -7951,7 +8039,7 @@ var StyledTrack = styled52__default.default(reactNative.View)(({ trackHeight, tr
|
|
|
7951
8039
|
backgroundColor: trackBgColor,
|
|
7952
8040
|
overflow: "hidden"
|
|
7953
8041
|
}));
|
|
7954
|
-
var StyledIndicator = styled52__default.default(
|
|
8042
|
+
var StyledIndicator = styled52__default.default(Animated10__default.default.View)(({ indicatorBorderRadius, indicatorBgColor }) => ({
|
|
7955
8043
|
height: "100%",
|
|
7956
8044
|
borderRadius: indicatorBorderRadius,
|
|
7957
8045
|
backgroundColor: indicatorBgColor
|
|
@@ -7992,13 +8080,13 @@ var Progress = React65__default.default.forwardRef(
|
|
|
7992
8080
|
const percent = clampedValue / safeMax * 100;
|
|
7993
8081
|
const showHeader = Boolean(label) || Boolean(description);
|
|
7994
8082
|
const typographyForSize = size === "lg" ? typography.large : typography.small;
|
|
7995
|
-
const reducedMotion =
|
|
8083
|
+
const reducedMotion = Animated10.useReducedMotion();
|
|
7996
8084
|
const shouldAnimate = animate && !reducedMotion;
|
|
7997
|
-
const fill =
|
|
8085
|
+
const fill = Animated10.useSharedValue(percent);
|
|
7998
8086
|
React65__default.default.useEffect(() => {
|
|
7999
|
-
fill.value = shouldAnimate ?
|
|
8087
|
+
fill.value = shouldAnimate ? Animated10.withTiming(percent, PROGRESS_ANIMATION) : percent;
|
|
8000
8088
|
}, [fill, percent, shouldAnimate]);
|
|
8001
|
-
const indicatorStyle =
|
|
8089
|
+
const indicatorStyle = Animated10.useAnimatedStyle(() => ({
|
|
8002
8090
|
width: `${fill.value}%`
|
|
8003
8091
|
}));
|
|
8004
8092
|
const trackSize = { lg: track.size.large, sm: track.size.small }[size];
|
|
@@ -9161,9 +9249,17 @@ var SelectField = React65__default.default.forwardRef(
|
|
|
9161
9249
|
}
|
|
9162
9250
|
);
|
|
9163
9251
|
}, [windowHeight, keyboardHeight, maxDropdownHeight]);
|
|
9252
|
+
const isOpen = isFocused && !disabled;
|
|
9164
9253
|
React65__default.default.useEffect(() => {
|
|
9165
|
-
if (
|
|
9166
|
-
|
|
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]);
|
|
9167
9263
|
React65__default.default.useEffect(() => {
|
|
9168
9264
|
if (!isControlled || isFocused) return;
|
|
9169
9265
|
if (value === null || value === void 0) {
|
|
@@ -9222,7 +9318,6 @@ var SelectField = React65__default.default.forwardRef(
|
|
|
9222
9318
|
if (searchable) (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
|
|
9223
9319
|
};
|
|
9224
9320
|
const fieldState = error ? "error" : state;
|
|
9225
|
-
const isOpen = isFocused && !disabled;
|
|
9226
9321
|
const clearAction = !disabled && inputText.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9227
9322
|
reactNative.Pressable,
|
|
9228
9323
|
{
|
|
@@ -9534,7 +9629,7 @@ var Wrapper = styled52__default.default(reactNative.View)({
|
|
|
9534
9629
|
alignItems: "center",
|
|
9535
9630
|
justifyContent: "space-between"
|
|
9536
9631
|
});
|
|
9537
|
-
var SelectIcon = styled52__default.default(
|
|
9632
|
+
var SelectIcon = styled52__default.default(Animated10__default.default.View)({
|
|
9538
9633
|
position: "absolute",
|
|
9539
9634
|
right: 0,
|
|
9540
9635
|
marginRight: 0
|
|
@@ -9609,8 +9704,8 @@ var parseSize2 = (value) => {
|
|
|
9609
9704
|
return parseInt(value.replace("px", ""), 10);
|
|
9610
9705
|
};
|
|
9611
9706
|
var useIconAnimation = () => {
|
|
9612
|
-
const iconRotation =
|
|
9613
|
-
const iconAnimationStyles =
|
|
9707
|
+
const iconRotation = Animated10.useSharedValue(0);
|
|
9708
|
+
const iconAnimationStyles = Animated10.useAnimatedStyle(() => {
|
|
9614
9709
|
"worklet";
|
|
9615
9710
|
return {
|
|
9616
9711
|
transform: [{ rotate: `${iconRotation.value}deg` }]
|
|
@@ -9827,10 +9922,10 @@ var Slider = React65__default.default.forwardRef(
|
|
|
9827
9922
|
const isWeb = reactNative.Platform.OS === "web";
|
|
9828
9923
|
const [trackLayoutWidth, setTrackLayoutWidth] = React65.useState(0);
|
|
9829
9924
|
const webFraction = max > min ? (currentValue - min) / (max - min) : 0;
|
|
9830
|
-
const trackWidth =
|
|
9831
|
-
const thumbLeft =
|
|
9832
|
-
const indicatorWidth =
|
|
9833
|
-
const lastReported =
|
|
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);
|
|
9834
9929
|
const handleJSUpdate = (v) => {
|
|
9835
9930
|
if (!isControlled) setInternalValue(v);
|
|
9836
9931
|
onValueChange == null ? void 0 : onValueChange(v);
|
|
@@ -9900,10 +9995,10 @@ var Slider = React65__default.default.forwardRef(
|
|
|
9900
9995
|
"worklet";
|
|
9901
9996
|
reactNativeWorklets.scheduleOnRN(handleCommit, lastReported.value);
|
|
9902
9997
|
});
|
|
9903
|
-
const thumbAnimStyle =
|
|
9998
|
+
const thumbAnimStyle = Animated10.useAnimatedStyle(() => ({
|
|
9904
9999
|
transform: [{ translateX: thumbLeft.value }]
|
|
9905
10000
|
}));
|
|
9906
|
-
const indicatorAnimStyle =
|
|
10001
|
+
const indicatorAnimStyle = Animated10.useAnimatedStyle(() => ({
|
|
9907
10002
|
width: indicatorWidth.value
|
|
9908
10003
|
}));
|
|
9909
10004
|
const handleWebValueChange = (values) => {
|
|
@@ -10085,9 +10180,9 @@ var Slider = React65__default.default.forwardRef(
|
|
|
10085
10180
|
onLayout: handleNativeLayout,
|
|
10086
10181
|
children: [
|
|
10087
10182
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: trackBackgroundStyle }),
|
|
10088
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10183
|
+
/* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: [indicatorBaseStyle, indicatorAnimStyle] }),
|
|
10089
10184
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10090
|
-
|
|
10185
|
+
Animated10__default.default.View,
|
|
10091
10186
|
{
|
|
10092
10187
|
style: [
|
|
10093
10188
|
__spreadProps(__spreadValues({}, thumbStyle), { position: "absolute", left: 0 }),
|
|
@@ -10442,8 +10537,8 @@ Notification.displayName = "Notification";
|
|
|
10442
10537
|
var parseTokenValue47 = (value) => parseFloat(value);
|
|
10443
10538
|
var SCALE_STEP = 0.06;
|
|
10444
10539
|
var SPRING_CONFIG = { damping: 20, stiffness: 260, mass: 0.5 };
|
|
10445
|
-
var CARD_ENTERING =
|
|
10446
|
-
var CARD_EXITING =
|
|
10540
|
+
var CARD_ENTERING = Animated10.FadeInDown.duration(200).easing(Animated10.Easing.inOut(Animated10.Easing.quad));
|
|
10541
|
+
var CARD_EXITING = Animated10.FadeOutDown.duration(200);
|
|
10447
10542
|
var CARD_BASE_STYLE = {
|
|
10448
10543
|
position: "absolute",
|
|
10449
10544
|
bottom: 0,
|
|
@@ -10484,15 +10579,15 @@ var StackedCard = ({
|
|
|
10484
10579
|
}) => {
|
|
10485
10580
|
const isBackfillRef = React65__default.default.useRef(isBackfill);
|
|
10486
10581
|
const wasBackfill = isBackfillRef.current;
|
|
10487
|
-
const depthSV =
|
|
10488
|
-
const opacitySV =
|
|
10582
|
+
const depthSV = Animated10.useSharedValue(wasBackfill ? depth + 1 : depth);
|
|
10583
|
+
const opacitySV = Animated10.useSharedValue(wasBackfill ? 0 : 1);
|
|
10489
10584
|
React65__default.default.useEffect(() => {
|
|
10490
|
-
depthSV.value =
|
|
10585
|
+
depthSV.value = Animated10.withSpring(depth, SPRING_CONFIG);
|
|
10491
10586
|
}, [depth, depthSV]);
|
|
10492
10587
|
React65__default.default.useEffect(() => {
|
|
10493
|
-
if (wasBackfill) opacitySV.value =
|
|
10588
|
+
if (wasBackfill) opacitySV.value = Animated10.withSpring(1, SPRING_CONFIG);
|
|
10494
10589
|
}, []);
|
|
10495
|
-
const depthStyle =
|
|
10590
|
+
const depthStyle = Animated10.useAnimatedStyle(() => ({
|
|
10496
10591
|
opacity: opacitySV.value,
|
|
10497
10592
|
transform: [
|
|
10498
10593
|
{ translateY: depthSV.value * revealStep },
|
|
@@ -10501,7 +10596,7 @@ var StackedCard = ({
|
|
|
10501
10596
|
}));
|
|
10502
10597
|
const isFront = depth === 0;
|
|
10503
10598
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10504
|
-
|
|
10599
|
+
Animated10__default.default.View,
|
|
10505
10600
|
{
|
|
10506
10601
|
entering: wasBackfill ? void 0 : CARD_ENTERING,
|
|
10507
10602
|
exiting: CARD_EXITING,
|
|
@@ -10509,7 +10604,7 @@ var StackedCard = ({
|
|
|
10509
10604
|
accessibilityElementsHidden: !isFront,
|
|
10510
10605
|
importantForAccessibility: isFront ? "auto" : "no-hide-descendants",
|
|
10511
10606
|
style: [CARD_BASE_STYLE, { zIndex: -depth }],
|
|
10512
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10607
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: [DEPTH_LAYER_STYLE, depthStyle], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10513
10608
|
Notification,
|
|
10514
10609
|
{
|
|
10515
10610
|
variant: "toast",
|
|
@@ -11214,15 +11309,16 @@ var MessageCard = {
|
|
|
11214
11309
|
Banner: MessageCardBanner
|
|
11215
11310
|
};
|
|
11216
11311
|
var parseTokenValue52 = (value) => parseFloat(value);
|
|
11217
|
-
var slideEaseOut =
|
|
11312
|
+
var slideEaseOut = Animated10.Easing.out(Animated10.Easing.quad);
|
|
11218
11313
|
var MONTH_SLIDE_ENTERING = {
|
|
11219
|
-
forward:
|
|
11220
|
-
backward:
|
|
11314
|
+
forward: Animated10.FadeInRight.duration(250).easing(slideEaseOut),
|
|
11315
|
+
backward: Animated10.FadeInLeft.duration(250).easing(slideEaseOut)
|
|
11221
11316
|
};
|
|
11222
11317
|
var MONTH_SLIDE_EXITING = {
|
|
11223
|
-
forward:
|
|
11224
|
-
backward:
|
|
11318
|
+
forward: Animated10.FadeOutLeft.duration(200),
|
|
11319
|
+
backward: Animated10.FadeOutRight.duration(200)
|
|
11225
11320
|
};
|
|
11321
|
+
var FOCUS_DELAY_MS = 150;
|
|
11226
11322
|
var DEFAULT_WEEK_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
11227
11323
|
function buildCalendarGrid(year, month) {
|
|
11228
11324
|
const firstDay = new Date(year, month, 1);
|
|
@@ -11334,7 +11430,9 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11334
11430
|
getMonthLabel,
|
|
11335
11431
|
weekDayLabels = DEFAULT_WEEK_LABELS,
|
|
11336
11432
|
getDateState,
|
|
11433
|
+
getDateAccessibilityLabel,
|
|
11337
11434
|
isDateDisabled,
|
|
11435
|
+
focusDate,
|
|
11338
11436
|
minDate,
|
|
11339
11437
|
maxDate
|
|
11340
11438
|
} = _b, rest = __objRest(_b, [
|
|
@@ -11354,7 +11452,9 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11354
11452
|
"getMonthLabel",
|
|
11355
11453
|
"weekDayLabels",
|
|
11356
11454
|
"getDateState",
|
|
11455
|
+
"getDateAccessibilityLabel",
|
|
11357
11456
|
"isDateDisabled",
|
|
11457
|
+
"focusDate",
|
|
11358
11458
|
"minDate",
|
|
11359
11459
|
"maxDate"
|
|
11360
11460
|
]);
|
|
@@ -11391,6 +11491,18 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11391
11491
|
}),
|
|
11392
11492
|
[datePicker, dt, theme2]
|
|
11393
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]);
|
|
11394
11506
|
const resolvedGetDateState = React65.useCallback(
|
|
11395
11507
|
(date) => {
|
|
11396
11508
|
var _a3;
|
|
@@ -11530,6 +11642,7 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11530
11642
|
token: datePicker.month.typography,
|
|
11531
11643
|
align: "center",
|
|
11532
11644
|
color: datePicker.month.colour.text.default,
|
|
11645
|
+
accessibilityRole: "header",
|
|
11533
11646
|
children: resolvedMonthLabel
|
|
11534
11647
|
}
|
|
11535
11648
|
) }),
|
|
@@ -11547,86 +11660,88 @@ var DatePicker = React65__default.default.forwardRef(
|
|
|
11547
11660
|
) })
|
|
11548
11661
|
] }),
|
|
11549
11662
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11550
|
-
|
|
11663
|
+
Animated10__default.default.View,
|
|
11551
11664
|
{
|
|
11552
11665
|
entering: MONTH_SLIDE_ENTERING[slideDir],
|
|
11553
11666
|
exiting: MONTH_SLIDE_EXITING[slideDir],
|
|
11554
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11667
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(StyledDatesGrid, { rowGap, children: calendarRows.map((row, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(StyledDateRow, { children: row.map(
|
|
11668
|
+
(date, colIdx) => !date ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11669
|
+
StyledDateCell,
|
|
11670
|
+
{
|
|
11671
|
+
cellHeight,
|
|
11672
|
+
accessibilityElementsHidden: true
|
|
11673
|
+
},
|
|
11674
|
+
`empty-${rowIdx}-${colIdx}`
|
|
11675
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
11676
|
+
StyledDateCell,
|
|
11677
|
+
{
|
|
11678
|
+
cellHeight,
|
|
11679
|
+
children: (() => {
|
|
11680
|
+
var _a3;
|
|
11681
|
+
const isDisabled = resolvedIsDateDisabled(date);
|
|
11682
|
+
const {
|
|
11683
|
+
state,
|
|
11684
|
+
indicatorBg,
|
|
11685
|
+
indicatorBorderColor,
|
|
11686
|
+
textColor,
|
|
11687
|
+
typography,
|
|
11688
|
+
textDecoration,
|
|
11689
|
+
isSelected
|
|
11690
|
+
} = resolveDateCellConfig(date);
|
|
11691
|
+
const isUndeliverable = isDisabled && state === "default";
|
|
11692
|
+
const cellOpacity = isDisabled && !isUndeliverable ? disabledOpacity : 1;
|
|
11693
|
+
const cellTextDecoration = isUndeliverable ? "line-through" : textDecoration;
|
|
11694
|
+
const cellTextColor = isUndeliverable ? dt.colour.text.previous : textColor;
|
|
11695
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11696
|
+
reactNative.Pressable,
|
|
11697
|
+
{
|
|
11698
|
+
ref: (node) => {
|
|
11699
|
+
const key = toDateKey(date);
|
|
11700
|
+
if (node) cellRefs.current.set(key, node);
|
|
11701
|
+
else cellRefs.current.delete(key);
|
|
11702
|
+
},
|
|
11703
|
+
onPress: !isDisabled ? () => onDateSelect == null ? void 0 : onDateSelect(date) : void 0,
|
|
11704
|
+
disabled: isDisabled,
|
|
11705
|
+
accessible: true,
|
|
11706
|
+
accessibilityRole: "button",
|
|
11707
|
+
accessibilityLabel: (_a3 = getDateAccessibilityLabel == null ? void 0 : getDateAccessibilityLabel(
|
|
11708
|
+
date,
|
|
11575
11709
|
state,
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
const cellTextColor = isUndeliverable ? dt.colour.text.previous : textColor;
|
|
11587
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11588
|
-
reactNative.Pressable,
|
|
11710
|
+
resolvedMonthLabel
|
|
11711
|
+
)) != null ? _a3 : `${date.getDate()} ${resolvedMonthLabel}`,
|
|
11712
|
+
accessibilityState: {
|
|
11713
|
+
selected: isSelected,
|
|
11714
|
+
disabled: isDisabled
|
|
11715
|
+
},
|
|
11716
|
+
accessibilityHint: state === "current" ? "Today" : void 0,
|
|
11717
|
+
style: { opacity: cellOpacity },
|
|
11718
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11719
|
+
StyledIndicator3,
|
|
11589
11720
|
{
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
selected: isSelected,
|
|
11597
|
-
disabled: isDisabled
|
|
11598
|
-
},
|
|
11599
|
-
accessibilityHint: state === "current" ? "Today" : void 0,
|
|
11600
|
-
style: { opacity: cellOpacity },
|
|
11721
|
+
indicatorSize,
|
|
11722
|
+
indicatorBorderRadius,
|
|
11723
|
+
indicatorBg,
|
|
11724
|
+
indicatorBorderWidth: indicatorBorderColor !== "transparent" ? selectedBorderWidth : 0,
|
|
11725
|
+
indicatorBorderColor,
|
|
11726
|
+
indicatorBorderStyle: indicatorBorderColor !== "transparent" ? "dashed" : "solid",
|
|
11601
11727
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11602
|
-
|
|
11728
|
+
Typography,
|
|
11603
11729
|
{
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
indicatorBorderColor,
|
|
11609
|
-
indicatorBorderStyle: indicatorBorderColor !== "transparent" ? "dashed" : "solid",
|
|
11610
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11611
|
-
Typography,
|
|
11612
|
-
{
|
|
11613
|
-
color: cellTextColor,
|
|
11614
|
-
token: typography,
|
|
11615
|
-
textDecoration: cellTextDecoration,
|
|
11616
|
-
children: date.getDate().toString()
|
|
11617
|
-
}
|
|
11618
|
-
)
|
|
11730
|
+
color: cellTextColor,
|
|
11731
|
+
token: typography,
|
|
11732
|
+
textDecoration: cellTextDecoration,
|
|
11733
|
+
children: date.getDate().toString()
|
|
11619
11734
|
}
|
|
11620
11735
|
)
|
|
11621
11736
|
}
|
|
11622
|
-
)
|
|
11623
|
-
}
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
)
|
|
11628
|
-
|
|
11629
|
-
)
|
|
11737
|
+
)
|
|
11738
|
+
}
|
|
11739
|
+
);
|
|
11740
|
+
})()
|
|
11741
|
+
},
|
|
11742
|
+
toDateKey(date)
|
|
11743
|
+
)
|
|
11744
|
+
) }, rowIdx)) })
|
|
11630
11745
|
},
|
|
11631
11746
|
`${year}-${month}`
|
|
11632
11747
|
)
|
|
@@ -12781,27 +12896,27 @@ var ShineOverlay = ({
|
|
|
12781
12896
|
radius,
|
|
12782
12897
|
highlight
|
|
12783
12898
|
}) => {
|
|
12784
|
-
const reducedMotion =
|
|
12899
|
+
const reducedMotion = Animated10.useReducedMotion();
|
|
12785
12900
|
const [width, setWidth] = React65__default.default.useState(0);
|
|
12786
|
-
const progress =
|
|
12901
|
+
const progress = Animated10.useSharedValue(0);
|
|
12787
12902
|
const bandWidth = width * SHINE_BAND_RATIO;
|
|
12788
12903
|
React65__default.default.useEffect(() => {
|
|
12789
12904
|
if (reducedMotion || !width) return;
|
|
12790
|
-
progress.value =
|
|
12905
|
+
progress.value = Animated10.withDelay(
|
|
12791
12906
|
ANIMATION_DELAY,
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12907
|
+
Animated10.withRepeat(
|
|
12908
|
+
Animated10.withSequence(
|
|
12909
|
+
Animated10.withTiming(1, {
|
|
12795
12910
|
duration: SHINE_SWEEP,
|
|
12796
|
-
easing:
|
|
12911
|
+
easing: Animated10.Easing.inOut(Animated10.Easing.ease)
|
|
12797
12912
|
}),
|
|
12798
|
-
|
|
12913
|
+
Animated10.withDelay(SHINE_REST, Animated10.withTiming(0, { duration: 0 }))
|
|
12799
12914
|
),
|
|
12800
12915
|
ANIMATION_ITERATIONS
|
|
12801
12916
|
)
|
|
12802
12917
|
);
|
|
12803
12918
|
}, [progress, reducedMotion, width]);
|
|
12804
|
-
const bandStyle =
|
|
12919
|
+
const bandStyle = Animated10.useAnimatedStyle(() => ({
|
|
12805
12920
|
transform: [
|
|
12806
12921
|
{
|
|
12807
12922
|
translateX: -bandWidth * 1.5 + progress.value * (width + bandWidth * 2.5)
|
|
@@ -12822,7 +12937,7 @@ var ShineOverlay = ({
|
|
|
12822
12937
|
{ borderRadius: radius, overflow: "hidden" }
|
|
12823
12938
|
],
|
|
12824
12939
|
children: width > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12825
|
-
|
|
12940
|
+
Animated10__default.default.View,
|
|
12826
12941
|
{
|
|
12827
12942
|
style: [
|
|
12828
12943
|
{ position: "absolute", top: 0, bottom: 0, width: bandWidth },
|
|
@@ -12851,33 +12966,33 @@ var ShineOverlay = ({
|
|
|
12851
12966
|
var createNudgingIcon = (IconComponent, axis, direction) => {
|
|
12852
12967
|
var _a;
|
|
12853
12968
|
const NudgingIcon = (props) => {
|
|
12854
|
-
const reducedMotion =
|
|
12855
|
-
const offset =
|
|
12969
|
+
const reducedMotion = Animated10.useReducedMotion();
|
|
12970
|
+
const offset = Animated10.useSharedValue(0);
|
|
12856
12971
|
React65__default.default.useEffect(() => {
|
|
12857
12972
|
if (reducedMotion) return;
|
|
12858
|
-
const step = (to) =>
|
|
12973
|
+
const step = (to) => Animated10.withTiming(to, {
|
|
12859
12974
|
duration: NUDGE_STEP,
|
|
12860
|
-
easing:
|
|
12975
|
+
easing: Animated10.Easing.inOut(Animated10.Easing.ease)
|
|
12861
12976
|
});
|
|
12862
12977
|
const distance = NUDGE_DISTANCE * direction;
|
|
12863
|
-
offset.value =
|
|
12978
|
+
offset.value = Animated10.withDelay(
|
|
12864
12979
|
ANIMATION_DELAY,
|
|
12865
|
-
|
|
12866
|
-
|
|
12980
|
+
Animated10.withRepeat(
|
|
12981
|
+
Animated10.withSequence(
|
|
12867
12982
|
step(distance),
|
|
12868
12983
|
step(0),
|
|
12869
12984
|
step(distance),
|
|
12870
12985
|
step(0),
|
|
12871
|
-
|
|
12986
|
+
Animated10.withDelay(NUDGE_REST, Animated10.withTiming(0, { duration: 0 }))
|
|
12872
12987
|
),
|
|
12873
12988
|
ANIMATION_ITERATIONS
|
|
12874
12989
|
)
|
|
12875
12990
|
);
|
|
12876
12991
|
}, [offset, reducedMotion]);
|
|
12877
|
-
const nudgeStyle =
|
|
12992
|
+
const nudgeStyle = Animated10.useAnimatedStyle(
|
|
12878
12993
|
() => axis === "translateX" ? { transform: [{ translateX: offset.value }] } : { transform: [{ translateY: offset.value }] }
|
|
12879
12994
|
);
|
|
12880
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12995
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Animated10__default.default.View, { style: nudgeStyle, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, __spreadValues({}, props)) });
|
|
12881
12996
|
};
|
|
12882
12997
|
NudgingIcon.displayName = `Nudging(${(_a = IconComponent.displayName) != null ? _a : "Icon"})`;
|
|
12883
12998
|
return NudgingIcon;
|