@butternutbox/pawprint-native 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +23 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/Drawer/DrawerBody.tsx +29 -7
package/dist/index.js
CHANGED
|
@@ -8756,6 +8756,7 @@ DrawerOverlay.displayName = "Drawer.Overlay";
|
|
|
8756
8756
|
var DrawerDragContext = React60.createContext(null);
|
|
8757
8757
|
var useDrawerDragContext = () => React60.useContext(DrawerDragContext);
|
|
8758
8758
|
var DrawerFooterContext = React60.createContext(false);
|
|
8759
|
+
var useDrawerFooterContext = () => React60.useContext(DrawerFooterContext);
|
|
8759
8760
|
var DrawerHeaderContext = React60.createContext(null);
|
|
8760
8761
|
var useDrawerHeaderContext = () => React60.useContext(DrawerHeaderContext);
|
|
8761
8762
|
var OPEN_DURATION = 320;
|
|
@@ -9282,12 +9283,22 @@ var DrawerDescription = React60.forwardRef(
|
|
|
9282
9283
|
);
|
|
9283
9284
|
DrawerDescription.displayName = "Drawer.Description";
|
|
9284
9285
|
var parseTokenValue26 = (value) => parseFloat(value);
|
|
9285
|
-
var StyledScrollView = styled60(ScrollView)(
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9286
|
+
var StyledScrollView = styled60(ScrollView)(
|
|
9287
|
+
({
|
|
9288
|
+
bodyPaddingHorizontal,
|
|
9289
|
+
bodyPaddingRight,
|
|
9290
|
+
bodyGap,
|
|
9291
|
+
bodyMaxHeight,
|
|
9292
|
+
bodyPaddingBottom
|
|
9293
|
+
}) => ({
|
|
9294
|
+
flex: 1,
|
|
9295
|
+
paddingLeft: bodyPaddingHorizontal,
|
|
9296
|
+
paddingRight: bodyPaddingRight,
|
|
9297
|
+
gap: bodyGap,
|
|
9298
|
+
maxHeight: bodyMaxHeight,
|
|
9299
|
+
paddingBottom: bodyPaddingBottom
|
|
9300
|
+
})
|
|
9301
|
+
);
|
|
9291
9302
|
var DrawerBody = React60.forwardRef(
|
|
9292
9303
|
(_a, ref) => {
|
|
9293
9304
|
var _b = _a, { children, contentContainerStyle } = _b, props = __objRest(_b, ["children", "contentContainerStyle"]);
|
|
@@ -9296,10 +9307,14 @@ var DrawerBody = React60.forwardRef(
|
|
|
9296
9307
|
const { buttons } = theme2.tokens.components;
|
|
9297
9308
|
const { content } = spacing;
|
|
9298
9309
|
const headerContext = useDrawerHeaderContext();
|
|
9310
|
+
const footerContext = useDrawerFooterContext();
|
|
9311
|
+
const { height: windowHeight } = useWindowDimensions();
|
|
9299
9312
|
const gap = parseTokenValue26(content.slot.gap);
|
|
9300
9313
|
const horizontalPadding = parseTokenValue26(content.slot.horizontalPadding);
|
|
9301
9314
|
const topPadding = parseTokenValue26(content.slot.verticalPadding);
|
|
9315
|
+
const bodyMaxHeight = windowHeight - 300;
|
|
9302
9316
|
const paddingRight = headerContext === null ? parseTokenValue26(spacing.close.right.md) + parseTokenValue26(buttons.size.sm.height) : horizontalPadding;
|
|
9317
|
+
const bodyPaddingBottom = !footerContext ? parseTokenValue26(theme2.tokens.semantics.dimensions.spacing["2xl"]) : 0;
|
|
9303
9318
|
return /* @__PURE__ */ jsx(
|
|
9304
9319
|
StyledScrollView,
|
|
9305
9320
|
__spreadProps(__spreadValues({
|
|
@@ -9307,6 +9322,8 @@ var DrawerBody = React60.forwardRef(
|
|
|
9307
9322
|
bodyPaddingHorizontal: horizontalPadding,
|
|
9308
9323
|
bodyPaddingRight: paddingRight,
|
|
9309
9324
|
bodyGap: gap,
|
|
9325
|
+
bodyMaxHeight,
|
|
9326
|
+
bodyPaddingBottom,
|
|
9310
9327
|
contentContainerStyle: [
|
|
9311
9328
|
{
|
|
9312
9329
|
gap,
|