@wistia/ui 0.19.0-beta.e04d42c5.ec25c59 → 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 +58 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.mjs +64 -42
- 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
|
}
|
|
@@ -18587,7 +18623,7 @@ var Thumbnail = (0, import_react97.forwardRef)(
|
|
|
18587
18623
|
Thumbnail.displayName = "Thumbnail_UI";
|
|
18588
18624
|
|
|
18589
18625
|
// src/components/ThumbnailCollage/ThumbnailCollage.tsx
|
|
18590
|
-
var import_react98 =
|
|
18626
|
+
var import_react98 = require("react");
|
|
18591
18627
|
var import_styled_components129 = require("styled-components");
|
|
18592
18628
|
var import_type_guards75 = require("@wistia/type-guards");
|
|
18593
18629
|
var import_jsx_runtime338 = (
|
|
@@ -18601,20 +18637,12 @@ var ThumbnailCollageContainer = import_styled_components129.styled.div`
|
|
|
18601
18637
|
display: flex;
|
|
18602
18638
|
`;
|
|
18603
18639
|
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
18640
|
display: grid;
|
|
18607
|
-
gap: var(--wui-
|
|
18641
|
+
gap: var(--wui-space-01);
|
|
18608
18642
|
width: 100%;
|
|
18609
18643
|
grid-template-columns: 3fr 2fr;
|
|
18610
18644
|
grid-template-rows: 1fr 1fr;
|
|
18611
18645
|
|
|
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
18646
|
&:has(:nth-child(1)) {
|
|
18619
18647
|
grid-template-areas:
|
|
18620
18648
|
'a a'
|
|
@@ -18651,21 +18679,16 @@ var StyledThumbnailCollage = import_styled_components129.styled.div`
|
|
|
18651
18679
|
height: 100%;
|
|
18652
18680
|
width: 100%;
|
|
18653
18681
|
}
|
|
18654
|
-
|
|
18655
|
-
@container (min-width: 200px) {
|
|
18656
|
-
--wui-thumbnail-collage-spacing: var(--wui-space-02);
|
|
18657
|
-
}
|
|
18658
18682
|
`;
|
|
18659
18683
|
var ThumbnailCollage = ({
|
|
18660
18684
|
children = [],
|
|
18661
18685
|
gradientBackground = "defaultMidOne",
|
|
18662
|
-
hasBackground = false,
|
|
18663
18686
|
...props
|
|
18664
18687
|
}) => {
|
|
18665
|
-
const thumbnailArray = import_react98.
|
|
18688
|
+
const thumbnailArray = import_react98.Children.toArray(children);
|
|
18666
18689
|
const truncatedThumbnails = thumbnailArray.slice(0, 3);
|
|
18667
18690
|
const thumbnails = (0, import_type_guards75.isNonEmptyArray)(thumbnailArray) ? truncatedThumbnails.map((child) => {
|
|
18668
|
-
return import_react98.
|
|
18691
|
+
return (0, import_react98.cloneElement)(child, {
|
|
18669
18692
|
...child.props,
|
|
18670
18693
|
children: void 0
|
|
18671
18694
|
});
|
|
@@ -18683,7 +18706,6 @@ var ThumbnailCollage = ({
|
|
|
18683
18706
|
StyledThumbnailCollage,
|
|
18684
18707
|
{
|
|
18685
18708
|
$gradientBackground: gradientBackground,
|
|
18686
|
-
$hasBackground: hasBackground,
|
|
18687
18709
|
"data-wui-thumbnail-collage": true,
|
|
18688
18710
|
...props,
|
|
18689
18711
|
children: thumbnails
|