@wistia/ui 0.18.0-beta.978703a9.78cdfd1 → 0.18.0-beta.aa424735.cbb1970
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 +62 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -7
- package/dist/index.d.ts +2 -7
- package/dist/index.mjs +62 -79
- 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.18.0-beta.
|
|
3
|
+
* @license @wistia/ui v0.18.0-beta.aa424735.cbb1970
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -3370,7 +3370,7 @@ var StyledToast = import_styled_components17.styled.div`
|
|
|
3370
3370
|
justify-content: space-between;
|
|
3371
3371
|
min-height: 56px;
|
|
3372
3372
|
width: 356px;
|
|
3373
|
-
border-radius: var(--wui-border-radius-
|
|
3373
|
+
border-radius: var(--wui-border-radius-01);
|
|
3374
3374
|
background-color: var(--wui-color-bg-surface);
|
|
3375
3375
|
border: 1px solid var(--wui-color-border);
|
|
3376
3376
|
color: var(--wui-color-text);
|
|
@@ -3386,28 +3386,13 @@ var StyledToast = import_styled_components17.styled.div`
|
|
|
3386
3386
|
flex: 0 0 16px;
|
|
3387
3387
|
}
|
|
3388
3388
|
`;
|
|
3389
|
-
var Action = ({
|
|
3390
|
-
actionButton,
|
|
3391
|
-
toastId
|
|
3392
|
-
}) => {
|
|
3389
|
+
var Action = ({ actionButton }) => {
|
|
3393
3390
|
if ((0, import_type_guards11.isNotNil)(actionButton) && (0, import_react19.isValidElement)(actionButton)) {
|
|
3394
|
-
const { onClick, ...restProps } = actionButton.props;
|
|
3395
|
-
const handleClick = (event) => {
|
|
3396
|
-
if (onClick) {
|
|
3397
|
-
onClick(
|
|
3398
|
-
event,
|
|
3399
|
-
toastId ?? ""
|
|
3400
|
-
);
|
|
3401
|
-
}
|
|
3402
|
-
};
|
|
3403
3391
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ActionWrapper, { children: (0, import_react19.cloneElement)(actionButton, {
|
|
3404
|
-
...restProps,
|
|
3405
3392
|
variant: "soft",
|
|
3406
3393
|
// force Button variant
|
|
3407
|
-
size: "sm"
|
|
3394
|
+
size: "sm"
|
|
3408
3395
|
// force Button size
|
|
3409
|
-
onClick: handleClick
|
|
3410
|
-
// decorate onClick function with new args
|
|
3411
3396
|
}) });
|
|
3412
3397
|
}
|
|
3413
3398
|
return null;
|
|
@@ -3417,7 +3402,6 @@ var Toast = ({
|
|
|
3417
3402
|
message,
|
|
3418
3403
|
colorScheme = "inherit",
|
|
3419
3404
|
icon,
|
|
3420
|
-
toastId,
|
|
3421
3405
|
...props
|
|
3422
3406
|
}) => {
|
|
3423
3407
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
@@ -3430,13 +3414,7 @@ var Toast = ({
|
|
|
3430
3414
|
(0, import_type_guards11.isNotNil)(icon) ? icon : null,
|
|
3431
3415
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Message, { lines: 3, children: message })
|
|
3432
3416
|
] }),
|
|
3433
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3434
|
-
Action,
|
|
3435
|
-
{
|
|
3436
|
-
actionButton: action,
|
|
3437
|
-
toastId
|
|
3438
|
-
}
|
|
3439
|
-
)
|
|
3417
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Action, { actionButton: action })
|
|
3440
3418
|
]
|
|
3441
3419
|
}
|
|
3442
3420
|
);
|
|
@@ -3449,15 +3427,14 @@ var useToast = () => {
|
|
|
3449
3427
|
return (0, import_react20.useCallback)(
|
|
3450
3428
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
3451
3429
|
import_sonner2.toast.custom(
|
|
3452
|
-
(
|
|
3430
|
+
() => {
|
|
3453
3431
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3454
3432
|
Toast,
|
|
3455
3433
|
{
|
|
3456
3434
|
action,
|
|
3457
3435
|
colorScheme,
|
|
3458
3436
|
icon,
|
|
3459
|
-
message
|
|
3460
|
-
toastId: String(toastId)
|
|
3437
|
+
message
|
|
3461
3438
|
}
|
|
3462
3439
|
);
|
|
3463
3440
|
},
|
|
@@ -17701,7 +17678,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
|
|
|
17701
17678
|
align-items: center;
|
|
17702
17679
|
background-color: rgb(0 0 0 / 50%);
|
|
17703
17680
|
border-radius: var(--wui-border-radius-01);
|
|
17704
|
-
bottom: var(--wui-
|
|
17681
|
+
bottom: var(--wui-thumbnail-badge-offset);
|
|
17705
17682
|
color: var(--wui-color-text-on-fill);
|
|
17706
17683
|
display: flex;
|
|
17707
17684
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -17709,7 +17686,7 @@ var StyledThumbnailBadge = import_styled_components123.styled.div`
|
|
|
17709
17686
|
gap: var(--wui-space-01);
|
|
17710
17687
|
padding: 0 var(--wui-space-01);
|
|
17711
17688
|
position: absolute;
|
|
17712
|
-
right: var(--wui-
|
|
17689
|
+
right: var(--wui-thumbnail-badge-offset);
|
|
17713
17690
|
z-index: 1;
|
|
17714
17691
|
|
|
17715
17692
|
svg {
|
|
@@ -18034,7 +18011,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
18034
18011
|
}
|
|
18035
18012
|
);
|
|
18036
18013
|
};
|
|
18014
|
+
var StyledThumbnailContainer = import_styled_components126.styled.div`
|
|
18015
|
+
container-type: size;
|
|
18016
|
+
aspect-ratio: 16 / 9;
|
|
18017
|
+
width: ${({ $width }) => $width};
|
|
18018
|
+
display: flex;
|
|
18019
|
+
clip-path: inset(0 0 0 0 round var(--wui-collage-border-radius));
|
|
18020
|
+
`;
|
|
18037
18021
|
var StyledThumbnail = import_styled_components126.styled.div`
|
|
18022
|
+
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
18038
18023
|
background-image: ${({ $backgroundUrl }) => (0, import_type_guards74.isNotNil)($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
18039
18024
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
18040
18025
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -18042,17 +18027,20 @@ var StyledThumbnail = import_styled_components126.styled.div`
|
|
|
18042
18027
|
)};
|
|
18043
18028
|
background-position: center center;
|
|
18044
18029
|
background-size: cover;
|
|
18030
|
+
width: 100%;
|
|
18045
18031
|
aspect-ratio: 16 / 9;
|
|
18046
|
-
display: flex;
|
|
18047
18032
|
overflow: hidden;
|
|
18048
18033
|
position: relative;
|
|
18049
|
-
|
|
18050
|
-
|
|
18034
|
+
display: flex;
|
|
18035
|
+
clip-path: inset(
|
|
18036
|
+
0 0 0 0 round clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05))
|
|
18037
|
+
);
|
|
18051
18038
|
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18039
|
+
@container (min-width: 200px) {
|
|
18040
|
+
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
18055
18041
|
}
|
|
18042
|
+
|
|
18043
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
18056
18044
|
`;
|
|
18057
18045
|
var StoryboardRenderer = ({
|
|
18058
18046
|
storyboard,
|
|
@@ -18175,23 +18163,30 @@ var Thumbnail = (0, import_react100.forwardRef)(
|
|
|
18175
18163
|
} else {
|
|
18176
18164
|
thumbnailContent = null;
|
|
18177
18165
|
}
|
|
18178
|
-
return /* @__PURE__ */ (0, import_jsx_runtime327.
|
|
18179
|
-
|
|
18166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime327.jsx)(
|
|
18167
|
+
StyledThumbnailContainer,
|
|
18180
18168
|
{
|
|
18181
|
-
ref,
|
|
18182
|
-
...props,
|
|
18183
|
-
$backgroundUrl: backgroundUrl,
|
|
18184
|
-
$gradientBackground: gradientBackground,
|
|
18185
|
-
$isScrubbable: isScrubbable,
|
|
18186
18169
|
$width: width,
|
|
18187
|
-
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18170
|
+
"data-thumbnail-container": true,
|
|
18171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime327.jsxs)(
|
|
18172
|
+
StyledThumbnail,
|
|
18173
|
+
{
|
|
18174
|
+
ref,
|
|
18175
|
+
...props,
|
|
18176
|
+
$backgroundUrl: backgroundUrl,
|
|
18177
|
+
$gradientBackground: gradientBackground,
|
|
18178
|
+
$isScrubbable: isScrubbable,
|
|
18179
|
+
$width: width,
|
|
18180
|
+
onBlur: handleMouseOut,
|
|
18181
|
+
onMouseMove: handleMouseMove,
|
|
18182
|
+
onMouseOut: handleMouseOut,
|
|
18183
|
+
role: "presentation",
|
|
18184
|
+
children: [
|
|
18185
|
+
(0, import_type_guards74.isNotNil)(children) ? children : null,
|
|
18186
|
+
thumbnailContent
|
|
18187
|
+
]
|
|
18188
|
+
}
|
|
18189
|
+
)
|
|
18195
18190
|
}
|
|
18196
18191
|
);
|
|
18197
18192
|
}
|
|
@@ -18206,6 +18201,13 @@ var import_jsx_runtime328 = (
|
|
|
18206
18201
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
18207
18202
|
require("react/jsx-runtime")
|
|
18208
18203
|
);
|
|
18204
|
+
var ThumbnailCollageContainer = import_styled_components127.styled.div`
|
|
18205
|
+
container-type: size;
|
|
18206
|
+
container-name: thumbnail-collage;
|
|
18207
|
+
width: 100%;
|
|
18208
|
+
aspect-ratio: 16 / 9;
|
|
18209
|
+
display: flex;
|
|
18210
|
+
`;
|
|
18209
18211
|
var StyledThumbnailCollage = import_styled_components127.styled.div`
|
|
18210
18212
|
display: grid;
|
|
18211
18213
|
gap: var(--wui-space-01);
|
|
@@ -18213,49 +18215,39 @@ var StyledThumbnailCollage = import_styled_components127.styled.div`
|
|
|
18213
18215
|
grid-template-columns: 3fr 2fr;
|
|
18214
18216
|
grid-template-rows: 1fr 1fr;
|
|
18215
18217
|
aspect-ratio: 16 / 9;
|
|
18218
|
+
--wui-collage-border-radius: clamp(
|
|
18219
|
+
var(--wui-border-radius-01),
|
|
18220
|
+
8cqh,
|
|
18221
|
+
var(--wui-border-radius-05)
|
|
18222
|
+
);
|
|
18216
18223
|
|
|
18217
18224
|
&:has(:nth-child(1)) {
|
|
18218
|
-
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18219
|
-
|
|
18220
18225
|
grid-template-areas:
|
|
18221
18226
|
'a a'
|
|
18222
18227
|
'a a';
|
|
18223
18228
|
}
|
|
18224
18229
|
|
|
18225
18230
|
&:has(:nth-child(2)) {
|
|
18226
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18227
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
18228
|
-
|
|
18229
18231
|
grid-template-areas:
|
|
18230
18232
|
'a b'
|
|
18231
18233
|
'a b';
|
|
18232
18234
|
}
|
|
18233
18235
|
|
|
18234
18236
|
&:has(:nth-child(3)) {
|
|
18235
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18236
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
18237
|
-
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
18238
|
-
|
|
18239
18237
|
grid-template-areas:
|
|
18240
18238
|
'a b'
|
|
18241
18239
|
'a c';
|
|
18242
18240
|
}
|
|
18243
18241
|
|
|
18244
18242
|
> :nth-child(1) {
|
|
18245
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
18246
|
-
|
|
18247
18243
|
grid-area: a;
|
|
18248
18244
|
}
|
|
18249
18245
|
|
|
18250
18246
|
> :nth-child(2) {
|
|
18251
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
18252
|
-
|
|
18253
18247
|
grid-area: b;
|
|
18254
18248
|
}
|
|
18255
18249
|
|
|
18256
18250
|
> :nth-child(3) {
|
|
18257
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
18258
|
-
|
|
18259
18251
|
grid-area: c;
|
|
18260
18252
|
}
|
|
18261
18253
|
|
|
@@ -18263,15 +18255,6 @@ var StyledThumbnailCollage = import_styled_components127.styled.div`
|
|
|
18263
18255
|
aspect-ratio: unset;
|
|
18264
18256
|
height: 100%;
|
|
18265
18257
|
width: 100%;
|
|
18266
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18267
|
-
|
|
18268
|
-
img {
|
|
18269
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18270
|
-
}
|
|
18271
|
-
|
|
18272
|
-
> :not(img) {
|
|
18273
|
-
display: none;
|
|
18274
|
-
}
|
|
18275
18258
|
}
|
|
18276
18259
|
`;
|
|
18277
18260
|
var ThumbnailCollage = ({
|
|
@@ -18296,7 +18279,7 @@ var ThumbnailCollage = ({
|
|
|
18296
18279
|
"fallback"
|
|
18297
18280
|
)
|
|
18298
18281
|
];
|
|
18299
|
-
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(ThumbnailCollageContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime328.jsx)(
|
|
18300
18283
|
StyledThumbnailCollage,
|
|
18301
18284
|
{
|
|
18302
18285
|
$gradientBackground: gradientBackground,
|
|
@@ -18304,7 +18287,7 @@ var ThumbnailCollage = ({
|
|
|
18304
18287
|
...props,
|
|
18305
18288
|
children: thumbnails
|
|
18306
18289
|
}
|
|
18307
|
-
);
|
|
18290
|
+
) });
|
|
18308
18291
|
};
|
|
18309
18292
|
|
|
18310
18293
|
// src/components/WistiaLogo/WistiaLogo.tsx
|