@wistia/ui 0.6.34 → 0.6.35

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.6.34
3
+ * @license @wistia/ui v0.6.35
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -7358,6 +7358,38 @@ var getFillViewportStyle = (fillViewport) => {
7358
7358
  }
7359
7359
  return void 0;
7360
7360
  };
7361
+ var getFlexStyle = (flexMode) => {
7362
+ if (!flexMode) return null;
7363
+ switch (flexMode) {
7364
+ // grows to fill space, won't shrink, starts at 0
7365
+ case "grow":
7366
+ return import_styled_components25.css`
7367
+ flex: 1 0 0;
7368
+ `;
7369
+ // default behavior, can shrink but won't grow
7370
+ case "initial":
7371
+ return import_styled_components25.css`
7372
+ flex: 0 1 auto;
7373
+ `;
7374
+ // equal distribution of space
7375
+ case "equal":
7376
+ return import_styled_components25.css`
7377
+ flex: 1;
7378
+ `;
7379
+ // won't grow or shrink
7380
+ case "rigid":
7381
+ return import_styled_components25.css`
7382
+ flex: 0 0 auto;
7383
+ `;
7384
+ // can grow and shrink from content size
7385
+ case "fluid":
7386
+ return import_styled_components25.css`
7387
+ flex: 1 1 auto;
7388
+ `;
7389
+ default:
7390
+ return null;
7391
+ }
7392
+ };
7361
7393
  var StyledBoxComponent = import_styled_components25.default.div`
7362
7394
  align-content: ${({ $alignContent }) => $alignContent};
7363
7395
  align-items: ${({ $alignItems }) => $alignItems};
@@ -7367,6 +7399,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
7367
7399
  flex-direction: ${({ $flexDirection }) => $flexDirection};
7368
7400
  ${({ $fillBox: fill }) => getFillStyle(fill)};
7369
7401
  ${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
7402
+ ${({ $flexMode }) => getFlexStyle($flexMode)};
7403
+ ${({ $gap }) => getGapStyle($gap)};
7370
7404
  height: ${({ $height }) => $height ?? null};
7371
7405
  width: ${({ $width }) => $width ?? null};
7372
7406
 
@@ -7374,7 +7408,6 @@ var StyledBoxComponent = import_styled_components25.default.div`
7374
7408
  flex-grow: ${({ $grow }) => (0, import_type_guards17.isNotNil)($grow) ? $grow : null};
7375
7409
  flex-shrink: ${({ $shrink }) => (0, import_type_guards17.isNotNil)($shrink) ? $shrink : null};
7376
7410
  flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
7377
- ${({ $gap }) => getGapStyle($gap)};
7378
7411
  justify-content: ${({ $justifyContent }) => $justifyContent};
7379
7412
  order: ${({ $order }) => (0, import_type_guards17.isNotNil)($order) ? $order : null};
7380
7413
  `;
@@ -7417,6 +7450,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
7417
7450
  shrink,
7418
7451
  width,
7419
7452
  wrapItems = false,
7453
+ flexMode,
7420
7454
  ...otherProps
7421
7455
  }, ref) => {
7422
7456
  if ((0, import_type_guards17.isNotUndefined)(height)) {
@@ -7450,6 +7484,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
7450
7484
  $fillBox: fill,
7451
7485
  $fillViewport: fillViewport,
7452
7486
  $flexDirection: direction,
7487
+ $flexMode: flexMode,
7453
7488
  $gap: gap,
7454
7489
  $grow: grow,
7455
7490
  $height: height,