@wistia/ui 0.6.31 → 0.6.32-beta.43a316a3.d41100d

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.31
3
+ * @license @wistia/ui v0.6.32-beta.43a316a3.d41100d
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -6779,7 +6779,8 @@ var Link = (0, import_react12.forwardRef)(
6779
6779
  ...commonProps,
6780
6780
  ...externalLinkProps
6781
6781
  };
6782
- return inRouterContext && type !== "external" ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
6782
+ const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
6783
+ return shouldUseReactRouterLink ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
6783
6784
  StyledLink,
6784
6785
  {
6785
6786
  as: import_react_router_dom.Link,
@@ -7356,6 +7357,38 @@ var getFillViewportStyle = (fillViewport) => {
7356
7357
  }
7357
7358
  return void 0;
7358
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
+ };
7359
7392
  var StyledBoxComponent = import_styled_components25.default.div`
7360
7393
  align-content: ${({ $alignContent }) => $alignContent};
7361
7394
  align-items: ${({ $alignItems }) => $alignItems};
@@ -7365,6 +7398,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
7365
7398
  flex-direction: ${({ $flexDirection }) => $flexDirection};
7366
7399
  ${({ $fillBox: fill }) => getFillStyle(fill)};
7367
7400
  ${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
7401
+ ${({ $flexMode }) => getFlexStyle($flexMode)};
7402
+ ${({ $gap }) => getGapStyle($gap)};
7368
7403
  height: ${({ $height }) => $height ?? null};
7369
7404
  width: ${({ $width }) => $width ?? null};
7370
7405
 
@@ -7372,7 +7407,6 @@ var StyledBoxComponent = import_styled_components25.default.div`
7372
7407
  flex-grow: ${({ $grow }) => (0, import_type_guards17.isNotNil)($grow) ? $grow : null};
7373
7408
  flex-shrink: ${({ $shrink }) => (0, import_type_guards17.isNotNil)($shrink) ? $shrink : null};
7374
7409
  flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
7375
- ${({ $gap }) => getGapStyle($gap)};
7376
7410
  justify-content: ${({ $justifyContent }) => $justifyContent};
7377
7411
  order: ${({ $order }) => (0, import_type_guards17.isNotNil)($order) ? $order : null};
7378
7412
  `;
@@ -7415,6 +7449,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
7415
7449
  shrink,
7416
7450
  width,
7417
7451
  wrapItems = false,
7452
+ flexMode,
7418
7453
  ...otherProps
7419
7454
  }, ref) => {
7420
7455
  if ((0, import_type_guards17.isNotUndefined)(height)) {
@@ -7448,6 +7483,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
7448
7483
  $fillBox: fill,
7449
7484
  $fillViewport: fillViewport,
7450
7485
  $flexDirection: direction,
7486
+ $flexMode: flexMode,
7451
7487
  $gap: gap,
7452
7488
  $grow: grow,
7453
7489
  $height: height,