@wistia/ui 0.19.0 → 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
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
  }