@wistia/ui 0.19.0 → 0.19.1-beta.e1daf5c3.ed1b2c2

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