@wistia/ui 0.19.0 → 0.19.1-beta.b5f9943f.e933a21
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 +54 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.mjs +54 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.19.
|
|
3
|
+
* @license @wistia/ui v0.19.1-beta.b5f9943f.e933a21
|
|
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
|
`;
|
|
@@ -3586,6 +3586,24 @@ var pressedButtonVariant = import_styled_components19.css`
|
|
|
3586
3586
|
--button-color-icon: var(--wui-color-icon-selected);
|
|
3587
3587
|
--button-color-border: var(--wui-color-border-selected);
|
|
3588
3588
|
`;
|
|
3589
|
+
var buttonFocusStyles = import_styled_components19.css`
|
|
3590
|
+
&:focus {
|
|
3591
|
+
outline: none;
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
&:focus-visible,
|
|
3595
|
+
&.force-state-focus {
|
|
3596
|
+
--wui-button-focus-color: var(--wui-color-focus-ring);
|
|
3597
|
+
|
|
3598
|
+
box-shadow:
|
|
3599
|
+
inset 0 0 0 2px var(--wui-button-focus-color),
|
|
3600
|
+
inset 0 0 0 3px var(--wui-color-bg-app);
|
|
3601
|
+
|
|
3602
|
+
&[aria-disabled='true'] {
|
|
3603
|
+
--wui-button-focus-color: var(--wui-color-focus-ring-disabled);
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
`;
|
|
3589
3607
|
var buttonBaseStyles = import_styled_components19.css`
|
|
3590
3608
|
border-radius: var(--wui-border-radius-rounded);
|
|
3591
3609
|
font-family: var(--button-typography-family);
|
|
@@ -3623,12 +3641,14 @@ var buttonBaseStyles = import_styled_components19.css`
|
|
|
3623
3641
|
|
|
3624
3642
|
&:focus-visible,
|
|
3625
3643
|
&.force-state-focus {
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3644
|
+
--wui-button-focus-color: var(--wui-color-focus-ring);
|
|
3645
|
+
|
|
3646
|
+
box-shadow:
|
|
3647
|
+
inset 0 0 0 2px var(--wui-button-focus-color),
|
|
3648
|
+
inset 0 0 0 3px var(--wui-color-bg-app);
|
|
3629
3649
|
|
|
3630
3650
|
&[aria-disabled='true'] {
|
|
3631
|
-
|
|
3651
|
+
--wui-button-focus-color: var(--wui-color-focus-ring-disabled);
|
|
3632
3652
|
}
|
|
3633
3653
|
}
|
|
3634
3654
|
|
|
@@ -8262,22 +8282,20 @@ var StyledActionButton = (0, import_styled_components24.styled)(Button)`
|
|
|
8262
8282
|
}
|
|
8263
8283
|
|
|
8264
8284
|
&:hover,
|
|
8265
|
-
&:focus-visible
|
|
8285
|
+
&:focus-visible,
|
|
8286
|
+
&.force-state-hover,
|
|
8287
|
+
&.force-state-focus {
|
|
8266
8288
|
--wui-color-text: var(--wui-color-text-button);
|
|
8267
8289
|
|
|
8268
8290
|
${({ $hoverColorScheme }) => getColorScheme($hoverColorScheme)};
|
|
8269
8291
|
background: var(--wui-color-bg-surface-tertiary);
|
|
8270
8292
|
}
|
|
8271
8293
|
|
|
8272
|
-
|
|
8273
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
8274
|
-
outline-offset: 2px;
|
|
8275
|
-
}
|
|
8294
|
+
${buttonFocusStyles}
|
|
8276
8295
|
|
|
8277
8296
|
&[aria-disabled='true'] {
|
|
8278
8297
|
background: var(--wui-color-bg-surface-disabled);
|
|
8279
8298
|
color: var(--wui-color-text-disabled);
|
|
8280
|
-
outline-color: var(--wui-color-focus-ring-disabled);
|
|
8281
8299
|
cursor: not-allowed;
|
|
8282
8300
|
|
|
8283
8301
|
&& {
|
|
@@ -8315,7 +8333,9 @@ var StyledSecondaryIcon = import_styled_components24.styled.div`
|
|
|
8315
8333
|
opacity: 0;
|
|
8316
8334
|
transform: translateX(-16px);
|
|
8317
8335
|
${StyledActionButton}:hover:not([aria-disabled="true"]) &,
|
|
8318
|
-
|
|
8336
|
+
${StyledActionButton}:focus-visible:not([aria-disabled="true"]) &,
|
|
8337
|
+
${StyledActionButton}.force-state-hover:not([aria-disabled="true"]) &,
|
|
8338
|
+
${StyledActionButton}.force-state-focus:not([aria-disabled="true"]) & {
|
|
8319
8339
|
transform: translateX(0);
|
|
8320
8340
|
opacity: 1;
|
|
8321
8341
|
}
|
|
@@ -8344,6 +8364,7 @@ var ActionButton = (0, import_react24.forwardRef)(
|
|
|
8344
8364
|
icon,
|
|
8345
8365
|
colorScheme = "standard",
|
|
8346
8366
|
disabled = false,
|
|
8367
|
+
forceState,
|
|
8347
8368
|
hoverColorScheme,
|
|
8348
8369
|
variant = "default",
|
|
8349
8370
|
children,
|
|
@@ -8364,6 +8385,7 @@ var ActionButton = (0, import_react24.forwardRef)(
|
|
|
8364
8385
|
$colorScheme: colorScheme,
|
|
8365
8386
|
$hoverColorScheme: resolvedHoverColorScheme,
|
|
8366
8387
|
disabled,
|
|
8388
|
+
forceState,
|
|
8367
8389
|
unstyled: true,
|
|
8368
8390
|
children: [
|
|
8369
8391
|
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(StyledMainIcon, { children: icon }),
|
|
@@ -14211,6 +14233,10 @@ var StyledLabel3 = (0, import_styled_components77.styled)(Heading)`
|
|
|
14211
14233
|
&[data-wui-data-card-skeleton='true'] {
|
|
14212
14234
|
width: 80px;
|
|
14213
14235
|
}
|
|
14236
|
+
|
|
14237
|
+
button {
|
|
14238
|
+
text-align: left;
|
|
14239
|
+
}
|
|
14214
14240
|
`;
|
|
14215
14241
|
var StyledValue = (0, import_styled_components77.styled)(Heading)`
|
|
14216
14242
|
grid-area: value;
|
|
@@ -14252,7 +14278,7 @@ var DataCardInner = ({
|
|
|
14252
14278
|
StyledLabel3,
|
|
14253
14279
|
{
|
|
14254
14280
|
"data-wui-data-card-skeleton": isLoading,
|
|
14255
|
-
renderAs: "
|
|
14281
|
+
renderAs: "div",
|
|
14256
14282
|
variant: "heading6",
|
|
14257
14283
|
children: label
|
|
14258
14284
|
}
|
|
@@ -14261,7 +14287,7 @@ var DataCardInner = ({
|
|
|
14261
14287
|
StyledValue,
|
|
14262
14288
|
{
|
|
14263
14289
|
"data-wui-data-card-skeleton": isLoading,
|
|
14264
|
-
renderAs: "
|
|
14290
|
+
renderAs: "div",
|
|
14265
14291
|
variant: "heading3",
|
|
14266
14292
|
children: value
|
|
14267
14293
|
}
|
|
@@ -14314,9 +14340,16 @@ var import_styled_components78 = require("styled-components");
|
|
|
14314
14340
|
var import_jsx_runtime279 = require("react/jsx-runtime");
|
|
14315
14341
|
var StyledDataCards = (0, import_styled_components78.styled)(Box)`
|
|
14316
14342
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
14343
|
+
--wui-data-cards-column-count: ${({ $columns }) => $columns === "auto" ? void 0 : $columns};
|
|
14344
|
+
--wui-data-cards-total-column-gap-width: calc(var(--wui-data-cards-column-count) - 1) *
|
|
14345
|
+
var(--wui-space-02);
|
|
14346
|
+
--wui-data-cards-column-width: calc(
|
|
14347
|
+
(100% - var(--wui-data-cards-total-column-gap-width)) / var(--wui-data-cards-column-count)
|
|
14348
|
+
);
|
|
14317
14349
|
|
|
14318
14350
|
> * {
|
|
14319
14351
|
min-width: 120px;
|
|
14352
|
+
flex-basis: var(--wui-data-cards-column-width, 0);
|
|
14320
14353
|
max-width: ${({ $cardMaxWidth }) => $cardMaxWidth};
|
|
14321
14354
|
}
|
|
14322
14355
|
`;
|
|
@@ -14324,19 +14357,22 @@ var DataCards = ({
|
|
|
14324
14357
|
children,
|
|
14325
14358
|
cardMaxWidth = "none",
|
|
14326
14359
|
colorScheme = "inherit",
|
|
14360
|
+
columns = "auto",
|
|
14327
14361
|
...props
|
|
14328
14362
|
}) => {
|
|
14363
|
+
const responsiveCardMaxWidth = useResponsiveProp(cardMaxWidth);
|
|
14364
|
+
const responsiveColumns = useResponsiveProp(columns);
|
|
14329
14365
|
return /* @__PURE__ */ (0, import_jsx_runtime279.jsx)(
|
|
14330
14366
|
StyledDataCards,
|
|
14331
14367
|
{
|
|
14332
14368
|
...props,
|
|
14333
|
-
$cardMaxWidth:
|
|
14369
|
+
$cardMaxWidth: responsiveCardMaxWidth,
|
|
14334
14370
|
$colorScheme: colorScheme,
|
|
14371
|
+
$columns: responsiveColumns,
|
|
14335
14372
|
alignItems: "stretch",
|
|
14336
14373
|
direction: "row",
|
|
14337
14374
|
fill: "horizontal",
|
|
14338
14375
|
gap: "space-02",
|
|
14339
|
-
renderAs: "dl",
|
|
14340
14376
|
wrapItems: true,
|
|
14341
14377
|
children
|
|
14342
14378
|
}
|