@wistia/ui 0.19.0-beta.e04d42c5.ec25c59 → 0.19.1-beta.0651b8af.4b05dbd

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.19.0-beta.e04d42c5.ec25c59
3
+ * @license @wistia/ui v0.19.1-beta.0651b8af.4b05dbd
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -3545,8 +3545,8 @@ var buttonExtraLargeStyles = import_styled_components19.css`
3545
3545
  `;
3546
3546
  var ghostButtonVariant = import_styled_components19.css`
3547
3547
  --button-color-bg-override: transparent;
3548
- --button-color-bg-hover: var(--wui-color-bg-surface-hover);
3549
- --button-color-bg-active: var(--wui-color-bg-surface-active);
3548
+ --button-color-bg-hover: var(--wui-color-bg-surface-secondary-hover);
3549
+ --button-color-bg-active: var(--wui-color-bg-surface-secondary-active);
3550
3550
  --button-color-text: var(--wui-color-text-button);
3551
3551
  --button-color-icon: var(--wui-color-icon);
3552
3552
  `;
@@ -3623,12 +3623,15 @@ var buttonBaseStyles = import_styled_components19.css`
3623
3623
 
3624
3624
  &:focus-visible,
3625
3625
  &.force-state-focus {
3626
- outline: 2px solid var(--wui-color-focus-ring);
3627
- outline-offset: 2px;
3626
+ --wui-button-focus-color: var(--wui-color-focus-ring);
3627
+
3628
3628
  background: var(--button-color-bg-hover);
3629
+ box-shadow:
3630
+ inset 0 0 0 2px var(--wui-button-focus-color),
3631
+ inset 0 0 0 3px var(--wui-color-bg-app);
3629
3632
 
3630
3633
  &[aria-disabled='true'] {
3631
- outline-color: var(--wui-color-border-disabled);
3634
+ --wui-button-focus-color: var(--wui-color-focus-ring-disabled);
3632
3635
  }
3633
3636
  }
3634
3637
 
@@ -8262,22 +8265,28 @@ var StyledActionButton = (0, import_styled_components24.styled)(Button)`
8262
8265
  }
8263
8266
 
8264
8267
  &:hover,
8265
- &:focus-visible {
8268
+ &:focus-visible,
8269
+ &.force-state-hover,
8270
+ &.force-state-focus {
8266
8271
  --wui-color-text: var(--wui-color-text-button);
8267
8272
 
8268
8273
  ${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
8269
8274
  background: var(--wui-color-bg-surface-tertiary);
8270
8275
  }
8271
8276
 
8272
- &:focus-visible {
8273
- outline: 2px solid var(--wui-color-focus-ring);
8274
- outline-offset: 2px;
8277
+ &:focus-visible,
8278
+ &.force-state-focus {
8279
+ --wui-action-button-focus-color: var(--wui-color-focus-ring);
8280
+
8281
+ box-shadow:
8282
+ inset 0 0 0 2px var(--wui-action-button-focus-color),
8283
+ inset 0 0 0 3px var(--wui-color-bg-app);
8275
8284
  }
8276
8285
 
8277
8286
  &[aria-disabled='true'] {
8287
+ --wui-action-button-focus-color: var(--wui-color-focus-ring-disabled);
8278
8288
  background: var(--wui-color-bg-surface-disabled);
8279
8289
  color: var(--wui-color-text-disabled);
8280
- outline-color: var(--wui-color-focus-ring-disabled);
8281
8290
  cursor: not-allowed;
8282
8291
 
8283
8292
  && {
@@ -8315,7 +8324,9 @@ var StyledSecondaryIcon = import_styled_components24.styled.div`
8315
8324
  opacity: 0;
8316
8325
  transform: translateX(-16px);
8317
8326
  ${StyledActionButton}:hover:not([aria-disabled="true"]) &,
8318
- ${StyledActionButton}:focus-visible:not([aria-disabled="true"]) & {
8327
+ ${StyledActionButton}:focus-visible:not([aria-disabled="true"]) &,
8328
+ ${StyledActionButton}.force-state-hover:not([aria-disabled="true"]) &,
8329
+ ${StyledActionButton}.force-state-focus:not([aria-disabled="true"]) & {
8319
8330
  transform: translateX(0);
8320
8331
  opacity: 1;
8321
8332
  }
@@ -8344,6 +8355,7 @@ var ActionButton = (0, import_react24.forwardRef)(
8344
8355
  icon,
8345
8356
  colorScheme = "standard",
8346
8357
  disabled = false,
8358
+ forceState,
8347
8359
  hoverColorScheme,
8348
8360
  variant = "default",
8349
8361
  children,
@@ -8364,6 +8376,7 @@ var ActionButton = (0, import_react24.forwardRef)(
8364
8376
  $colorScheme: colorScheme,
8365
8377
  $hoverColorScheme: resolvedHoverColorScheme,
8366
8378
  disabled,
8379
+ forceState,
8367
8380
  unstyled: true,
8368
8381
  children: [
8369
8382
  /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledMainIcon, { children: icon }),
@@ -14211,6 +14224,10 @@ var StyledLabel3 = (0, import_styled_components77.styled)(Heading)`
14211
14224
  &[data-wui-data-card-skeleton='true'] {
14212
14225
  width: 80px;
14213
14226
  }
14227
+
14228
+ button {
14229
+ text-align: left;
14230
+ }
14214
14231
  `;
14215
14232
  var StyledValue = (0, import_styled_components77.styled)(Heading)`
14216
14233
  grid-area: value;
@@ -14252,7 +14269,7 @@ var DataCardInner = ({
14252
14269
  StyledLabel3,
14253
14270
  {
14254
14271
  "data-wui-data-card-skeleton": isLoading,
14255
- renderAs: "dt",
14272
+ renderAs: "div",
14256
14273
  variant: "heading6",
14257
14274
  children: label
14258
14275
  }
@@ -14261,7 +14278,7 @@ var DataCardInner = ({
14261
14278
  StyledValue,
14262
14279
  {
14263
14280
  "data-wui-data-card-skeleton": isLoading,
14264
- renderAs: "dd",
14281
+ renderAs: "div",
14265
14282
  variant: "heading3",
14266
14283
  children: value
14267
14284
  }
@@ -14314,9 +14331,16 @@ var import_styled_components78 = require("styled-components");
14314
14331
  var import_jsx_runtime279 = require("react/jsx-runtime");
14315
14332
  var StyledDataCards = (0, import_styled_components78.styled)(Box)`
14316
14333
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
14334
+ --wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
14335
+ --wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
14336
+ var(--wui-space-02);
14337
+ --wui-data-cards-column-width: calc(
14338
+ (100% - var(--wui-data-cards-total-column-gap-width)) / var(--wui-data-cards-column-count)
14339
+ );
14317
14340
 
14318
14341
  > * {
14319
14342
  min-width: 120px;
14343
+ flex-basis: var(--wui-data-cards-column-width, 0);
14320
14344
  max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
14321
14345
  }
14322
14346
  `;
@@ -14324,19 +14348,22 @@ var DataCards = ({
14324
14348
  children,
14325
14349
  cardMaxWidth = "none",
14326
14350
  colorScheme = "inherit",
14351
+ columns = "auto",
14327
14352
  ...props
14328
14353
  }) => {
14354
+ const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
14355
+ const responsiveColumns = useResponsiveProp(columns);
14329
14356
  return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
14330
14357
  StyledDataCards,
14331
14358
  {
14332
14359
  ...props,
14333
- $cardMaxWidth: cardMaxWidth,
14360
+ $cardMaxWidth: responsiveCardMaxWidth,
14334
14361
  $colorScheme: colorScheme,
14362
+ $columns: responsiveColumns,
14335
14363
  alignItems: "stretch",
14336
14364
  direction: "row",
14337
14365
  fill: "horizontal",
14338
14366
  gap: "space-02",
14339
- renderAs: "dl",
14340
14367
  wrapItems: true,
14341
14368
  children
14342
14369
  }
@@ -18587,7 +18614,7 @@ var Thumbnail = (0, import_react97.forwardRef)(
18587
18614
  Thumbnail.displayName = "Thumbnail_UI";
18588
18615
 
18589
18616
  // src/components/ThumbnailCollage/ThumbnailCollage.tsx
18590
- var import_react98 = __toESM(require("react"));
18617
+ var import_react98 = require("react");
18591
18618
  var import_styled_components129 = require("styled-components");
18592
18619
  var import_type_guards75 = require("@wistia/type-guards");
18593
18620
  var import_jsx_runtime338 = (
@@ -18601,20 +18628,12 @@ var ThumbnailCollageContainer = import_styled_components129.styled.div`
18601
18628
  display: flex;
18602
18629
  `;
18603
18630
  var StyledThumbnailCollage = import_styled_components129.styled.div`
18604
- --wui-thumbnail-collage-spacing: var(--wui-space-01);
18605
- border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
18606
18631
  display: grid;
18607
- gap: var(--wui-thumbnail-collage-spacing);
18632
+ gap: var(--wui-space-01);
18608
18633
  width: 100%;
18609
18634
  grid-template-columns: 3fr 2fr;
18610
18635
  grid-template-rows: 1fr 1fr;
18611
18636
 
18612
- ${({ $hasBackground }) => $hasBackground && import_styled_components129.css`
18613
- background-color: var(--wui-color-bg-surface-secondary);
18614
- border: 1px solid rgba(0, 0, 0, 0.05);
18615
- padding: var(--wui-thumbnail-collage-spacing);
18616
- `}
18617
-
18618
18637
  &:has(:nth-child(1)) {
18619
18638
  grid-template-areas:
18620
18639
  'a a'
@@ -18651,21 +18670,16 @@ var StyledThumbnailCollage = import_styled_components129.styled.div`
18651
18670
  height: 100%;
18652
18671
  width: 100%;
18653
18672
  }
18654
-
18655
- @container (min-width: 200px) {
18656
- --wui-thumbnail-collage-spacing: var(--wui-space-02);
18657
- }
18658
18673
  `;
18659
18674
  var ThumbnailCollage = ({
18660
18675
  children = [],
18661
18676
  gradientBackground = "defaultMidOne",
18662
- hasBackground = false,
18663
18677
  ...props
18664
18678
  }) => {
18665
- const thumbnailArray = import_react98.default.Children.toArray(children);
18679
+ const thumbnailArray = import_react98.Children.toArray(children);
18666
18680
  const truncatedThumbnails = thumbnailArray.slice(0, 3);
18667
18681
  const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
18668
- return import_react98.default.cloneElement(child, {
18682
+ return (0, import_react98.cloneElement)(child, {
18669
18683
  ...child.props,
18670
18684
  children: void 0
18671
18685
  });
@@ -18683,7 +18697,6 @@ var ThumbnailCollage = ({
18683
18697
  StyledThumbnailCollage,
18684
18698
  {
18685
18699
  $gradientBackground: gradientBackground,
18686
- $hasBackground: hasBackground,
18687
18700
  "data-wui-thumbnail-collage": true,
18688
18701
  ...props,
18689
18702
  children: thumbnails