@wistia/ui 0.19.0 → 0.19.1-beta.5b34e7ca.ed12791

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.5b34e7ca.ed12791
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,29 @@ 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);
8288
+
8278
8289
  background: var(--wui-color-bg-surface-disabled);
8279
8290
  color: var(--wui-color-text-disabled);
8280
- outline-color: var(--wui-color-focus-ring-disabled);
8281
8291
  cursor: not-allowed;
8282
8292
 
8283
8293
  && {
@@ -8315,7 +8325,9 @@ var StyledSecondaryIcon = import_styled_components24.styled.div`
8315
8325
  opacity: 0;
8316
8326
  transform: translateX(-16px);
8317
8327
  ${StyledActionButton}:hover:not([aria-disabled="true"]) &,
8318
- ${StyledActionButton}:focus-visible:not([aria-disabled="true"]) & {
8328
+ ${StyledActionButton}:focus-visible:not([aria-disabled="true"]) &,
8329
+ ${StyledActionButton}.force-state-hover:not([aria-disabled="true"]) &,
8330
+ ${StyledActionButton}.force-state-focus:not([aria-disabled="true"]) & {
8319
8331
  transform: translateX(0);
8320
8332
  opacity: 1;
8321
8333
  }
@@ -8344,6 +8356,7 @@ var ActionButton = (0, import_react24.forwardRef)(
8344
8356
  icon,
8345
8357
  colorScheme = "standard",
8346
8358
  disabled = false,
8359
+ forceState,
8347
8360
  hoverColorScheme,
8348
8361
  variant = "default",
8349
8362
  children,
@@ -8364,6 +8377,7 @@ var ActionButton = (0, import_react24.forwardRef)(
8364
8377
  $colorScheme: colorScheme,
8365
8378
  $hoverColorScheme: resolvedHoverColorScheme,
8366
8379
  disabled,
8380
+ forceState,
8367
8381
  unstyled: true,
8368
8382
  children: [
8369
8383
  /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledMainIcon, { children: icon }),
@@ -14211,6 +14225,10 @@ var StyledLabel3 = (0, import_styled_components77.styled)(Heading)`
14211
14225
  &[data-wui-data-card-skeleton='true'] {
14212
14226
  width: 80px;
14213
14227
  }
14228
+
14229
+ button {
14230
+ text-align: left;
14231
+ }
14214
14232
  `;
14215
14233
  var StyledValue = (0, import_styled_components77.styled)(Heading)`
14216
14234
  grid-area: value;
@@ -14252,7 +14270,7 @@ var DataCardInner = ({
14252
14270
  StyledLabel3,
14253
14271
  {
14254
14272
  "data-wui-data-card-skeleton": isLoading,
14255
- renderAs: "dt",
14273
+ renderAs: "div",
14256
14274
  variant: "heading6",
14257
14275
  children: label
14258
14276
  }
@@ -14261,7 +14279,7 @@ var DataCardInner = ({
14261
14279
  StyledValue,
14262
14280
  {
14263
14281
  "data-wui-data-card-skeleton": isLoading,
14264
- renderAs: "dd",
14282
+ renderAs: "div",
14265
14283
  variant: "heading3",
14266
14284
  children: value
14267
14285
  }
@@ -14314,9 +14332,16 @@ var import_styled_components78 = require("styled-components");
14314
14332
  var import_jsx_runtime279 = require("react/jsx-runtime");
14315
14333
  var StyledDataCards = (0, import_styled_components78.styled)(Box)`
14316
14334
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
14335
+ --wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
14336
+ --wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
14337
+ var(--wui-space-02);
14338
+ --wui-data-cards-column-width: calc(
14339
+ (100% - var(--wui-data-cards-total-column-gap-width)) / var(--wui-data-cards-column-count)
14340
+ );
14317
14341
 
14318
14342
  > * {
14319
14343
  min-width: 120px;
14344
+ flex-basis: var(--wui-data-cards-column-width, 0);
14320
14345
  max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
14321
14346
  }
14322
14347
  `;
@@ -14324,19 +14349,22 @@ var DataCards = ({
14324
14349
  children,
14325
14350
  cardMaxWidth = "none",
14326
14351
  colorScheme = "inherit",
14352
+ columns = "auto",
14327
14353
  ...props
14328
14354
  }) => {
14355
+ const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
14356
+ const responsiveColumns = useResponsiveProp(columns);
14329
14357
  return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
14330
14358
  StyledDataCards,
14331
14359
  {
14332
14360
  ...props,
14333
- $cardMaxWidth: cardMaxWidth,
14361
+ $cardMaxWidth: responsiveCardMaxWidth,
14334
14362
  $colorScheme: colorScheme,
14363
+ $columns: responsiveColumns,
14335
14364
  alignItems: "stretch",
14336
14365
  direction: "row",
14337
14366
  fill: "horizontal",
14338
14367
  gap: "space-02",
14339
- renderAs: "dl",
14340
14368
  wrapItems: true,
14341
14369
  children
14342
14370
  }