@wistia/ui 0.6.32 → 0.6.33-beta.b2bac018.87d0c22
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 +38 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +30 -7
- package/dist/index.d.ts +30 -7
- package/dist/index.mjs +117 -82
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.6.
|
|
3
|
+
* @license @wistia/ui v0.6.33-beta.b2bac018.87d0c22
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7357,6 +7357,38 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
7357
7357
|
}
|
|
7358
7358
|
return void 0;
|
|
7359
7359
|
};
|
|
7360
|
+
var getFlexStyle = (flexMode) => {
|
|
7361
|
+
if (!flexMode) return null;
|
|
7362
|
+
switch (flexMode) {
|
|
7363
|
+
// grows to fill space, won't shrink, starts at 0
|
|
7364
|
+
case "grow":
|
|
7365
|
+
return import_styled_components25.css`
|
|
7366
|
+
flex: 1 0 0;
|
|
7367
|
+
`;
|
|
7368
|
+
// default behavior, can shrink but won't grow
|
|
7369
|
+
case "initial":
|
|
7370
|
+
return import_styled_components25.css`
|
|
7371
|
+
flex: 0 1 auto;
|
|
7372
|
+
`;
|
|
7373
|
+
// equal distribution of space
|
|
7374
|
+
case "equal":
|
|
7375
|
+
return import_styled_components25.css`
|
|
7376
|
+
flex: 1;
|
|
7377
|
+
`;
|
|
7378
|
+
// won't grow or shrink
|
|
7379
|
+
case "rigid":
|
|
7380
|
+
return import_styled_components25.css`
|
|
7381
|
+
flex: 0 0 auto;
|
|
7382
|
+
`;
|
|
7383
|
+
// can grow and shrink from content size
|
|
7384
|
+
case "fluid":
|
|
7385
|
+
return import_styled_components25.css`
|
|
7386
|
+
flex: 1 1 auto;
|
|
7387
|
+
`;
|
|
7388
|
+
default:
|
|
7389
|
+
return null;
|
|
7390
|
+
}
|
|
7391
|
+
};
|
|
7360
7392
|
var StyledBoxComponent = import_styled_components25.default.div`
|
|
7361
7393
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7362
7394
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
@@ -7366,6 +7398,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7366
7398
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7367
7399
|
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
7368
7400
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
7401
|
+
${({ $flexMode }) => getFlexStyle($flexMode)};
|
|
7402
|
+
${({ $gap }) => getGapStyle($gap)};
|
|
7369
7403
|
height: ${({ $height }) => $height ?? null};
|
|
7370
7404
|
width: ${({ $width }) => $width ?? null};
|
|
7371
7405
|
|
|
@@ -7373,7 +7407,6 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7373
7407
|
flex-grow: ${({ $grow }) => (0, import_type_guards17.isNotNil)($grow) ? $grow : null};
|
|
7374
7408
|
flex-shrink: ${({ $shrink }) => (0, import_type_guards17.isNotNil)($shrink) ? $shrink : null};
|
|
7375
7409
|
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
7376
|
-
${({ $gap }) => getGapStyle($gap)};
|
|
7377
7410
|
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
7378
7411
|
order: ${({ $order }) => (0, import_type_guards17.isNotNil)($order) ? $order : null};
|
|
7379
7412
|
`;
|
|
@@ -7416,6 +7449,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7416
7449
|
shrink,
|
|
7417
7450
|
width,
|
|
7418
7451
|
wrapItems = false,
|
|
7452
|
+
flexMode,
|
|
7419
7453
|
...otherProps
|
|
7420
7454
|
}, ref) => {
|
|
7421
7455
|
if ((0, import_type_guards17.isNotUndefined)(height)) {
|
|
@@ -7449,6 +7483,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7449
7483
|
$fillBox: fill,
|
|
7450
7484
|
$fillViewport: fillViewport,
|
|
7451
7485
|
$flexDirection: direction,
|
|
7486
|
+
$flexMode: flexMode,
|
|
7452
7487
|
$gap: gap,
|
|
7453
7488
|
$grow: grow,
|
|
7454
7489
|
$height: height,
|
|
@@ -8030,7 +8065,7 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
8030
8065
|
if ((0, import_type_guards24.isNotUndefined)(clamp)) {
|
|
8031
8066
|
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8032
8067
|
}
|
|
8033
|
-
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible3.Content, {
|
|
8068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime209.jsxs)(import_jsx_runtime209.Fragment, { children: [
|
|
8034
8069
|
children,
|
|
8035
8070
|
" "
|
|
8036
8071
|
] }) });
|