@wistia/ui 0.20.11 → 0.20.12-beta.526de0e5.34a21cc
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.d.ts +8 -0
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3877,6 +3877,14 @@ type StackProps = {
|
|
|
3877
3877
|
* @type 'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch' | ResponsiveObject<'baseline' | 'center' | 'flex-end' | 'flex-start' | 'stretch'>
|
|
3878
3878
|
*/
|
|
3879
3879
|
alignItems?: AlignItemsType | ResponsiveObject<AlignItemsType>;
|
|
3880
|
+
/**
|
|
3881
|
+
* Padding to apply to the stack container. Use `x` for horizontal (left/right) padding and `y` for vertical (top/bottom) padding.
|
|
3882
|
+
* Each value can be a [responsive prop](/docs/ui-docs-responsive-props--docs).
|
|
3883
|
+
*/
|
|
3884
|
+
padding?: {
|
|
3885
|
+
x?: ResponsiveObject<Spacings> | Spacings;
|
|
3886
|
+
y?: ResponsiveObject<Spacings> | Spacings;
|
|
3887
|
+
};
|
|
3880
3888
|
renderAs?: ElementType;
|
|
3881
3889
|
};
|
|
3882
3890
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.20.
|
|
3
|
+
* @license @wistia/ui v0.20.12-beta.526de0e5.34a21cc
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -10050,12 +10050,23 @@ var StyledStack = styled26.div`
|
|
|
10050
10050
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
10051
10051
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
10052
10052
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
10053
|
+
${({ $paddingX }) => $paddingX && `padding-left: var(--wui-${$paddingX}); padding-right: var(--wui-${$paddingX});`}
|
|
10054
|
+
${({ $paddingY }) => $paddingY && `padding-top: var(--wui-${$paddingY}); padding-bottom: var(--wui-${$paddingY});`}
|
|
10053
10055
|
`;
|
|
10054
10056
|
var StackComponent = forwardRef10(
|
|
10055
|
-
({
|
|
10057
|
+
({
|
|
10058
|
+
renderAs,
|
|
10059
|
+
direction = "vertical",
|
|
10060
|
+
gap = "space-02",
|
|
10061
|
+
alignItems = "stretch",
|
|
10062
|
+
padding,
|
|
10063
|
+
...props
|
|
10064
|
+
}, ref) => {
|
|
10056
10065
|
const responsiveGap = useResponsiveProp(gap);
|
|
10057
10066
|
const responsiveDirection = useResponsiveProp(direction);
|
|
10058
10067
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
10068
|
+
const responsivePaddingX = useResponsiveProp(padding?.x);
|
|
10069
|
+
const responsivePaddingY = useResponsiveProp(padding?.y);
|
|
10059
10070
|
return /* @__PURE__ */ jsx240(
|
|
10060
10071
|
StyledStack,
|
|
10061
10072
|
{
|
|
@@ -10063,6 +10074,8 @@ var StackComponent = forwardRef10(
|
|
|
10063
10074
|
$alignItems: responsiveAlignItems,
|
|
10064
10075
|
$direction: responsiveDirection,
|
|
10065
10076
|
$gap: responsiveGap,
|
|
10077
|
+
$paddingX: responsivePaddingX,
|
|
10078
|
+
$paddingY: responsivePaddingY,
|
|
10066
10079
|
as: renderAs ?? DEFAULT_ELEMENT4,
|
|
10067
10080
|
...props
|
|
10068
10081
|
}
|