@butternutbox/pawprint-native 0.10.7 → 0.10.9
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 +5 -5
- package/CHANGELOG.md +29 -0
- package/dist/index.cjs +82 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +82 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/DatePicker/DatePicker.tsx +31 -26
- package/src/components/molecules/Drawer/Drawer.stories.tsx +49 -0
- package/src/components/molecules/Drawer/DrawerContent.tsx +20 -38
- package/src/components/molecules/Radio/Radio.tsx +3 -0
package/dist/index.js
CHANGED
|
@@ -4735,54 +4735,57 @@ ForwardRef472.category = "core";
|
|
|
4735
4735
|
var PlayArrow = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 0 0 0-1.69L9.54 5.98A.998.998 0 0 0 8 6.82" }) }));
|
|
4736
4736
|
var ForwardRef482 = forwardRef(PlayArrow);
|
|
4737
4737
|
ForwardRef482.category = "core";
|
|
4738
|
-
var
|
|
4739
|
-
var ForwardRef492 = forwardRef(
|
|
4738
|
+
var Range = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "m5.83 12 2.46-2.46a.996.996 0 1 0-1.41-1.41L3.7 11.3a.996.996 0 0 0 0 1.41l3.18 3.17a.996.996 0 1 0 1.41-1.41zm12.34 0-2.46 2.46a.996.996 0 1 0 1.41 1.41l3.18-3.17a.996.996 0 0 0 0-1.41l-3.17-3.17a.996.996 0 1 0-1.41 1.41z" }) }));
|
|
4739
|
+
var ForwardRef492 = forwardRef(Range);
|
|
4740
4740
|
ForwardRef492.category = "core";
|
|
4741
|
-
var
|
|
4742
|
-
var ForwardRef502 = forwardRef(
|
|
4741
|
+
var Refresh = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M17.65 6.35a7.95 7.95 0 0 0-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 0 0 7.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 0 1-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0 1 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71z" }) }));
|
|
4742
|
+
var ForwardRef502 = forwardRef(Refresh);
|
|
4743
4743
|
ForwardRef502.category = "core";
|
|
4744
|
-
var
|
|
4745
|
-
var
|
|
4746
|
-
var ForwardRef512 = forwardRef(RemoveCircle);
|
|
4744
|
+
var Remove = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1" }) }));
|
|
4745
|
+
var ForwardRef512 = forwardRef(Remove);
|
|
4747
4746
|
ForwardRef512.category = "core";
|
|
4748
|
-
var
|
|
4749
|
-
var
|
|
4750
|
-
var ForwardRef522 = forwardRef(
|
|
4747
|
+
var Remove_default = ForwardRef512;
|
|
4748
|
+
var RemoveCircle = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m4 11H8c-.55 0-1-.45-1-1s.45-1 1-1h8c.55 0 1 .45 1 1s-.45 1-1 1" }) }));
|
|
4749
|
+
var ForwardRef522 = forwardRef(RemoveCircle);
|
|
4751
4750
|
ForwardRef522.category = "core";
|
|
4752
|
-
var
|
|
4753
|
-
var
|
|
4754
|
-
var ForwardRef532 = forwardRef(
|
|
4751
|
+
var RemoveCircle_default = ForwardRef522;
|
|
4752
|
+
var RemoveCircleOutline = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M7 12c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1m5-10C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }) }));
|
|
4753
|
+
var ForwardRef532 = forwardRef(RemoveCircleOutline);
|
|
4755
4754
|
ForwardRef532.category = "core";
|
|
4756
|
-
var
|
|
4757
|
-
var
|
|
4758
|
-
var ForwardRef542 = forwardRef(
|
|
4755
|
+
var RemoveCircleOutline_default = ForwardRef532;
|
|
4756
|
+
var Search = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M15.5 14h-.79l-.28-.27a6.5 6.5 0 0 0 1.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 0 0-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 0 0 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0s.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14" }) }));
|
|
4757
|
+
var ForwardRef542 = forwardRef(Search);
|
|
4759
4758
|
ForwardRef542.category = "core";
|
|
4760
|
-
var
|
|
4761
|
-
var
|
|
4759
|
+
var Search_default = ForwardRef542;
|
|
4760
|
+
var Settings = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M19.5 12c0-.23-.01-.45-.03-.68l1.86-1.41c.4-.3.51-.86.26-1.3l-1.87-3.23a.987.987 0 0 0-1.25-.42l-2.15.91c-.37-.26-.76-.49-1.17-.68l-.29-2.31c-.06-.5-.49-.88-.99-.88h-3.73c-.51 0-.94.38-1 .88l-.29 2.31c-.41.19-.8.42-1.17.68l-2.15-.91c-.46-.2-1-.02-1.25.42L2.41 8.62c-.25.44-.14.99.26 1.3l1.86 1.41a7.3 7.3 0 0 0 0 1.35l-1.86 1.41c-.4.3-.51.86-.26 1.3l1.87 3.23c.25.44.79.62 1.25.42l2.15-.91c.37.26.76.49 1.17.68l.29 2.31c.06.5.49.88.99.88h3.73c.5 0 .93-.38.99-.88l.29-2.31c.41-.19.8-.42 1.17-.68l2.15.91c.46.2 1 .02 1.25-.42l1.87-3.23c.25-.44.14-.99-.26-1.3l-1.86-1.41c.03-.23.04-.45.04-.68m-7.46 3.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5" }) }));
|
|
4761
|
+
var ForwardRef552 = forwardRef(Settings);
|
|
4762
4762
|
ForwardRef552.category = "core";
|
|
4763
|
-
var
|
|
4764
|
-
var ForwardRef562 = forwardRef(
|
|
4763
|
+
var StarBorder = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "m19.65 9.04-4.84-.42-1.89-4.45c-.34-.81-1.5-.81-1.84 0L9.19 8.63l-4.83.41c-.88.07-1.24 1.17-.57 1.75l3.67 3.18-1.1 4.72c-.2.86.73 1.54 1.49 1.08l4.15-2.5 4.15 2.51c.76.46 1.69-.22 1.49-1.08l-1.1-4.73 3.67-3.18c.67-.58.32-1.68-.56-1.75M12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z" }) }));
|
|
4764
|
+
var ForwardRef562 = forwardRef(StarBorder);
|
|
4765
4765
|
ForwardRef562.category = "core";
|
|
4766
|
-
var
|
|
4767
|
-
var ForwardRef572 = forwardRef(
|
|
4766
|
+
var StarHalf = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "m19.65 9.04-4.84-.42-1.89-4.45c-.34-.81-1.5-.81-1.84 0L9.19 8.63l-4.83.41c-.88.07-1.24 1.17-.57 1.75l3.67 3.18-1.1 4.72c-.2.86.73 1.54 1.49 1.08l4.15-2.5 4.15 2.51c.76.46 1.69-.22 1.49-1.08l-1.1-4.73 3.67-3.18c.67-.58.32-1.68-.56-1.75M12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z" }) }));
|
|
4767
|
+
var ForwardRef572 = forwardRef(StarHalf);
|
|
4768
4768
|
ForwardRef572.category = "core";
|
|
4769
|
-
var
|
|
4770
|
-
var ForwardRef582 = forwardRef(
|
|
4769
|
+
var StarRate = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "m11.957 17.498 4.15 2.51c.76.46 1.69-.22 1.49-1.08l-1.1-4.72 3.67-3.18c.67-.58.31-1.68-.57-1.75l-4.83-.41-1.89-4.46c-.34-.81-1.5-.81-1.84 0l-1.89 4.45-4.83.41c-.88.07-1.24 1.17-.57 1.75l3.67 3.18-1.1 4.72c-.2.86.73 1.54 1.49 1.08z" }) }));
|
|
4770
|
+
var ForwardRef582 = forwardRef(StarRate);
|
|
4771
4771
|
ForwardRef582.category = "core";
|
|
4772
|
-
var
|
|
4773
|
-
var ForwardRef592 = forwardRef(
|
|
4772
|
+
var User = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M12 12a4.665 4.665 0 0 0 4.667-4.667A4.665 4.665 0 0 0 12 2.667a4.665 4.665 0 0 0-4.667 4.666A4.665 4.665 0 0 0 12 12m0-7a2.34 2.34 0 0 1 2.333 2.333A2.34 2.34 0 0 1 12 9.667a2.34 2.34 0 0 1-2.333-2.334A2.34 2.34 0 0 1 12 5m0 8.167c-3.115 0-9.333 1.563-9.333 4.666v2.334a1.17 1.17 0 0 0 1.166 1.166h16.334a1.17 1.17 0 0 0 1.166-1.166v-2.334c0-3.103-6.218-4.666-9.333-4.666M19 19H5v-1.155c.233-.84 3.85-2.345 7-2.345s6.767 1.505 7 2.333z" }) }));
|
|
4773
|
+
var ForwardRef592 = forwardRef(User);
|
|
4774
4774
|
ForwardRef592.category = "core";
|
|
4775
|
-
var
|
|
4776
|
-
var
|
|
4777
|
-
var ForwardRef602 = forwardRef(VisibilityOff);
|
|
4775
|
+
var Visibility = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }) }));
|
|
4776
|
+
var ForwardRef602 = forwardRef(Visibility);
|
|
4778
4777
|
ForwardRef602.category = "core";
|
|
4779
|
-
var
|
|
4780
|
-
var
|
|
4781
|
-
var ForwardRef612 = forwardRef(
|
|
4778
|
+
var Visibility_default = ForwardRef602;
|
|
4779
|
+
var VisibilityOff = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16a.996.996 0 0 0 0 1.41l1.97 1.97A11.9 11.9 0 0 0 1 11.5C2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72a.996.996 0 1 0 1.41-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33a2.97 2.97 0 0 0-2.64-2.64z" }) }));
|
|
4780
|
+
var ForwardRef612 = forwardRef(VisibilityOff);
|
|
4782
4781
|
ForwardRef612.category = "core";
|
|
4783
|
-
var
|
|
4784
|
-
var
|
|
4782
|
+
var VisibilityOff_default = ForwardRef612;
|
|
4783
|
+
var VolumeOff = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M3.63 3.63a.996.996 0 0 0 0 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 1 0 1.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0M19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12m-8.71-6.29-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7M16.5 12A4.5 4.5 0 0 0 14 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24" }) }));
|
|
4784
|
+
var ForwardRef622 = forwardRef(VolumeOff);
|
|
4785
4785
|
ForwardRef622.category = "core";
|
|
4786
|
+
var VolumeUp = (props, ref) => /* @__PURE__ */ jsx(Svg, __spreadProps2(__spreadValues2(__spreadProps2(__spreadValues2({ xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24 }, { fill: props.color || "currentColor" }), { viewBox: "0 0 24 24", ref }), props), { children: /* @__PURE__ */ jsx(Path, { d: "M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1m13.5 2A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 4.45v.2c0 .38.25.71.6.85A7 7 0 0 1 19 12c0 2.94-1.82 5.47-4.4 6.5-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85A8.98 8.98 0 0 0 21 12c0-3.84-2.4-7.11-5.79-8.4-.58-.23-1.21.22-1.21.85" }) }));
|
|
4787
|
+
var ForwardRef632 = forwardRef(VolumeUp);
|
|
4788
|
+
ForwardRef632.category = "core";
|
|
4786
4789
|
var parseTokenValue12 = (value) => parseFloat(value);
|
|
4787
4790
|
var StyledInputWrapper = styled50(Animated.View)(({ theme: theme2, isDisabled, containerWidth, containerHeight }) => {
|
|
4788
4791
|
const { spacing, colour, borderRadius, size } = theme2.tokens.components.inputs;
|
|
@@ -8853,12 +8856,17 @@ var StyledPanel2 = styled50(View)(
|
|
|
8853
8856
|
panelShadowColor,
|
|
8854
8857
|
panelShadowOffsetY,
|
|
8855
8858
|
panelShadowBlur,
|
|
8856
|
-
|
|
8857
|
-
}) =>
|
|
8859
|
+
panelMaxHeight
|
|
8860
|
+
}) => ({
|
|
8858
8861
|
width: "100%",
|
|
8859
8862
|
maxWidth: panelMaxWidth,
|
|
8860
|
-
|
|
8861
|
-
|
|
8863
|
+
// The panel wraps its content and caps at maxHeight. It is intentionally
|
|
8864
|
+
// NOT given a fixed height: letting it size to content means it re-fits
|
|
8865
|
+
// automatically whenever the body grows or shrinks (async load, expanding
|
|
8866
|
+
// sections). The body's own maxHeight (see DrawerBody) bounds scrolling and
|
|
8867
|
+
// keeps the ScrollView from collapsing, so no fixed panel height is needed.
|
|
8868
|
+
maxHeight: panelMaxHeight,
|
|
8869
|
+
alignSelf: "center",
|
|
8862
8870
|
borderTopLeftRadius: panelBorderRadius,
|
|
8863
8871
|
borderTopRightRadius: panelBorderRadius,
|
|
8864
8872
|
borderTopWidth: panelBorderWidth,
|
|
@@ -8894,19 +8902,12 @@ var DrawerContent = React65.forwardRef(
|
|
|
8894
8902
|
const entryRanRef = useRef(false);
|
|
8895
8903
|
const isOpenRef = useRef(isOpen);
|
|
8896
8904
|
const activeAnim = useRef(null);
|
|
8897
|
-
const [panelHeight, setPanelHeight] = useState(0);
|
|
8898
8905
|
useEffect(() => {
|
|
8899
8906
|
const id = translateY.addListener(({ value }) => {
|
|
8900
8907
|
translateYValue.current = value;
|
|
8901
8908
|
});
|
|
8902
8909
|
return () => translateY.removeListener(id);
|
|
8903
8910
|
}, [translateY]);
|
|
8904
|
-
useEffect(() => {
|
|
8905
|
-
if (panelHeightRef.current > 0 && panelHeightRef.current > maxHeight) {
|
|
8906
|
-
setPanelHeight(maxHeight);
|
|
8907
|
-
panelHeightRef.current = maxHeight;
|
|
8908
|
-
}
|
|
8909
|
-
}, [maxHeight]);
|
|
8910
8911
|
const runEntry = useCallback(() => {
|
|
8911
8912
|
var _a3;
|
|
8912
8913
|
if (panelHeightRef.current === 0) return;
|
|
@@ -8957,12 +8958,9 @@ var DrawerContent = React65.forwardRef(
|
|
|
8957
8958
|
({ nativeEvent }) => {
|
|
8958
8959
|
const h = nativeEvent.layout.height;
|
|
8959
8960
|
const capped = Math.min(h, maxHeight);
|
|
8960
|
-
if (capped
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
}
|
|
8964
|
-
if (isOpenRef.current && !entryRanRef.current && capped > 0) {
|
|
8965
|
-
panelHeightRef.current = capped;
|
|
8961
|
+
if (capped <= 0) return;
|
|
8962
|
+
panelHeightRef.current = capped;
|
|
8963
|
+
if (isOpenRef.current && !entryRanRef.current) {
|
|
8966
8964
|
runEntry();
|
|
8967
8965
|
}
|
|
8968
8966
|
},
|
|
@@ -9038,11 +9036,7 @@ var DrawerContent = React65.forwardRef(
|
|
|
9038
9036
|
return /* @__PURE__ */ jsx(DrawerHeaderContext.Provider, { value: headerContextValue, children: /* @__PURE__ */ jsx(DrawerFooterContext.Provider, { value: hasFooter, children: /* @__PURE__ */ jsx(DrawerDragContext.Provider, { value: dragContextValue, children: /* @__PURE__ */ jsx(
|
|
9039
9037
|
Animated.View,
|
|
9040
9038
|
{
|
|
9041
|
-
style: [
|
|
9042
|
-
styles.animatedWrapper,
|
|
9043
|
-
panelHeight > 0 ? { height: panelHeight } : void 0,
|
|
9044
|
-
{ transform: [{ translateY }] }
|
|
9045
|
-
],
|
|
9039
|
+
style: [styles.animatedWrapper, { transform: [{ translateY }] }],
|
|
9046
9040
|
children: /* @__PURE__ */ jsx(
|
|
9047
9041
|
StyledPanel2,
|
|
9048
9042
|
__spreadProps(__spreadValues({
|
|
@@ -9051,7 +9045,7 @@ var DrawerContent = React65.forwardRef(
|
|
|
9051
9045
|
panelBorderRadius: parseTokenValue22(drawer.borderRadius.top),
|
|
9052
9046
|
panelBgColor: colour.background.container.default,
|
|
9053
9047
|
panelMaxWidth: parseTokenValue22(drawer.size.maxWidth),
|
|
9054
|
-
|
|
9048
|
+
panelMaxHeight: maxHeight,
|
|
9055
9049
|
panelBorderWidth: parseTokenValue22(dimensions3.borderWidth.sm),
|
|
9056
9050
|
panelBorderColor: colour.border.default,
|
|
9057
9051
|
panelShadowColor: modal.shadow.color,
|
|
@@ -11002,6 +10996,9 @@ var StyledIndicator2 = styled50(View)(({ indicatorSize, indicatorBgColor }) => (
|
|
|
11002
10996
|
backgroundColor: indicatorBgColor
|
|
11003
10997
|
}));
|
|
11004
10998
|
var StyledTextContent = styled50(View)(({ textContentGap }) => ({
|
|
10999
|
+
// Take the row's remaining width so long label/subText wraps within the tile
|
|
11000
|
+
// instead of pushing the trailing asset past the tile's edge.
|
|
11001
|
+
flex: 1,
|
|
11005
11002
|
flexDirection: "column",
|
|
11006
11003
|
gap: textContentGap
|
|
11007
11004
|
}));
|
|
@@ -13652,29 +13649,32 @@ function defaultGetDateState(date) {
|
|
|
13652
13649
|
function getDefaultMonthLabel(year, month, locale) {
|
|
13653
13650
|
return format(new Date(year, month, 1), "MMMM yyyy", { locale });
|
|
13654
13651
|
}
|
|
13655
|
-
var StyledContainer3 = styled50(View)(({
|
|
13652
|
+
var StyledContainer3 = styled50(View)(({ containerMaxWidth }) => ({
|
|
13656
13653
|
flexDirection: "column",
|
|
13657
|
-
|
|
13654
|
+
// Fill the parent by default (capped by maxWidth) so consumers don't need a
|
|
13655
|
+
// wrapper. Overridable via the `style` prop.
|
|
13656
|
+
width: "100%",
|
|
13658
13657
|
maxWidth: containerMaxWidth
|
|
13659
13658
|
}));
|
|
13660
13659
|
var StyledMonthHeader = styled50(View)(
|
|
13661
|
-
({ headerGap }) => ({
|
|
13660
|
+
({ headerGap, datesGap }) => ({
|
|
13662
13661
|
flexDirection: "row",
|
|
13663
13662
|
alignItems: "center",
|
|
13664
|
-
gap: headerGap
|
|
13663
|
+
gap: headerGap,
|
|
13664
|
+
// Gap between the month header and the dates grid.
|
|
13665
|
+
marginBottom: datesGap
|
|
13665
13666
|
})
|
|
13666
13667
|
);
|
|
13667
|
-
var StyledWeekRow = styled50(View)({
|
|
13668
|
-
flexDirection: "row"
|
|
13668
|
+
var StyledWeekRow = styled50(View)(({ weekGap }) => ({
|
|
13669
|
+
flexDirection: "row",
|
|
13670
|
+
// Gap between the week-day header and the month header.
|
|
13671
|
+
marginBottom: weekGap
|
|
13672
|
+
}));
|
|
13673
|
+
var StyledWeekCell = styled50(View)({
|
|
13674
|
+
flex: 1,
|
|
13675
|
+
alignItems: "center",
|
|
13676
|
+
justifyContent: "center"
|
|
13669
13677
|
});
|
|
13670
|
-
var StyledWeekCell = styled50(View)(
|
|
13671
|
-
({ cellHeight }) => ({
|
|
13672
|
-
flex: 1,
|
|
13673
|
-
alignItems: "center",
|
|
13674
|
-
justifyContent: "center",
|
|
13675
|
-
height: cellHeight
|
|
13676
|
-
})
|
|
13677
|
-
);
|
|
13678
13678
|
var StyledDatesGrid = styled50(View)(({ rowGap }) => ({
|
|
13679
13679
|
flexDirection: "column",
|
|
13680
13680
|
gap: rowGap
|
|
@@ -13756,7 +13756,8 @@ var DatePicker = React65.forwardRef(
|
|
|
13756
13756
|
const dt = datePicker.dateItem;
|
|
13757
13757
|
const [slideDir, setSlideDir] = useState("forward");
|
|
13758
13758
|
const {
|
|
13759
|
-
|
|
13759
|
+
weekGap,
|
|
13760
|
+
datesGap,
|
|
13760
13761
|
containerMaxWidth,
|
|
13761
13762
|
headerGap,
|
|
13762
13763
|
cellHeight,
|
|
@@ -13767,7 +13768,10 @@ var DatePicker = React65.forwardRef(
|
|
|
13767
13768
|
rowGap
|
|
13768
13769
|
} = useMemo(
|
|
13769
13770
|
() => ({
|
|
13770
|
-
|
|
13771
|
+
// Gap between the week-day header and the month header.
|
|
13772
|
+
weekGap: parseTokenValue52(datePicker.spacing.gap),
|
|
13773
|
+
// Gap between the month header and the dates grid.
|
|
13774
|
+
datesGap: parseTokenValue52(theme2.tokens.semantics.dimensions.spacing.md),
|
|
13771
13775
|
containerMaxWidth: parseTokenValue52(dt.size.width) * 7,
|
|
13772
13776
|
headerGap: parseTokenValue52(datePicker.month.spacing.gap),
|
|
13773
13777
|
cellHeight: parseTokenValue52(dt.size.height),
|
|
@@ -13777,7 +13781,7 @@ var DatePicker = React65.forwardRef(
|
|
|
13777
13781
|
disabledOpacity: parseTokenValue52(dt.opacity.disabled),
|
|
13778
13782
|
rowGap: parseTokenValue52(datePicker.dates.spacing.gap)
|
|
13779
13783
|
}),
|
|
13780
|
-
[datePicker, dt]
|
|
13784
|
+
[datePicker, dt, theme2]
|
|
13781
13785
|
);
|
|
13782
13786
|
const resolvedGetDateState = useCallback(
|
|
13783
13787
|
(date) => {
|
|
@@ -13887,11 +13891,10 @@ var DatePicker = React65.forwardRef(
|
|
|
13887
13891
|
StyledContainer3,
|
|
13888
13892
|
__spreadProps(__spreadValues({
|
|
13889
13893
|
ref,
|
|
13890
|
-
containerGap,
|
|
13891
13894
|
containerMaxWidth
|
|
13892
13895
|
}, rest), {
|
|
13893
13896
|
children: [
|
|
13894
|
-
showWeekHeader && /* @__PURE__ */ jsx(StyledWeekRow, { accessibilityElementsHidden: true, children: weekDayLabels.map((label) => /* @__PURE__ */ jsx(StyledWeekCell, {
|
|
13897
|
+
showWeekHeader && /* @__PURE__ */ jsx(StyledWeekRow, { weekGap, accessibilityElementsHidden: true, children: weekDayLabels.map((label) => /* @__PURE__ */ jsx(StyledWeekCell, { children: /* @__PURE__ */ jsx(
|
|
13895
13898
|
Typography,
|
|
13896
13899
|
{
|
|
13897
13900
|
token: datePicker.week.typography,
|
|
@@ -13900,13 +13903,13 @@ var DatePicker = React65.forwardRef(
|
|
|
13900
13903
|
children: label
|
|
13901
13904
|
}
|
|
13902
13905
|
) }, label)) }),
|
|
13903
|
-
/* @__PURE__ */ jsxs(StyledMonthHeader, { headerGap, children: [
|
|
13906
|
+
/* @__PURE__ */ jsxs(StyledMonthHeader, { headerGap, datesGap, children: [
|
|
13904
13907
|
/* @__PURE__ */ jsx(View, { style: { opacity: showPrevControl ? 1 : 0 }, children: /* @__PURE__ */ jsx(
|
|
13905
13908
|
IconButton,
|
|
13906
13909
|
{
|
|
13907
13910
|
icon: KeyboardArrowLeft_default,
|
|
13908
13911
|
variant: "filled",
|
|
13909
|
-
size: "
|
|
13912
|
+
size: "md",
|
|
13910
13913
|
colour: "primary",
|
|
13911
13914
|
"aria-label": "Previous month",
|
|
13912
13915
|
onPress: showPrevControl ? handlePrevMonth : void 0,
|
|
@@ -13927,7 +13930,7 @@ var DatePicker = React65.forwardRef(
|
|
|
13927
13930
|
{
|
|
13928
13931
|
icon: KeyboardArrowRight_default,
|
|
13929
13932
|
variant: "filled",
|
|
13930
|
-
size: "
|
|
13933
|
+
size: "md",
|
|
13931
13934
|
colour: "primary",
|
|
13932
13935
|
"aria-label": "Next month",
|
|
13933
13936
|
onPress: showNextControl ? handleNextMonth : void 0,
|