@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.d.mts
CHANGED
|
@@ -430,7 +430,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
430
430
|
|
|
431
431
|
type ToastProps = ComponentPropsWithoutRef<'div'> & {
|
|
432
432
|
/**
|
|
433
|
-
* Action can be
|
|
433
|
+
* Action can be undefined (default dismiss button), a Button component or false to hide the dismiss button
|
|
434
434
|
*/
|
|
435
435
|
action?: React.ReactElement<typeof Button> | undefined;
|
|
436
436
|
/**
|
|
@@ -445,15 +445,10 @@ type ToastProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
445
445
|
* The message displayed in the toast
|
|
446
446
|
*/
|
|
447
447
|
message: ReactNode;
|
|
448
|
-
/**
|
|
449
|
-
* @ignore
|
|
450
|
-
* The ID given for the Toast by sonner
|
|
451
|
-
*/
|
|
452
|
-
toastId?: string;
|
|
453
448
|
};
|
|
454
449
|
|
|
455
450
|
type Position = 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right';
|
|
456
|
-
type UseToastProps =
|
|
451
|
+
type UseToastProps = ToastProps & {
|
|
457
452
|
position?: Position;
|
|
458
453
|
duration?: number;
|
|
459
454
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -430,7 +430,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<BaseButtonProps & Om
|
|
|
430
430
|
|
|
431
431
|
type ToastProps = ComponentPropsWithoutRef<'div'> & {
|
|
432
432
|
/**
|
|
433
|
-
* Action can be
|
|
433
|
+
* Action can be undefined (default dismiss button), a Button component or false to hide the dismiss button
|
|
434
434
|
*/
|
|
435
435
|
action?: React.ReactElement<typeof Button> | undefined;
|
|
436
436
|
/**
|
|
@@ -445,15 +445,10 @@ type ToastProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
445
445
|
* The message displayed in the toast
|
|
446
446
|
*/
|
|
447
447
|
message: ReactNode;
|
|
448
|
-
/**
|
|
449
|
-
* @ignore
|
|
450
|
-
* The ID given for the Toast by sonner
|
|
451
|
-
*/
|
|
452
|
-
toastId?: string;
|
|
453
448
|
};
|
|
454
449
|
|
|
455
450
|
type Position = 'bottom-center' | 'bottom-left' | 'bottom-right' | 'top-center' | 'top-left' | 'top-right';
|
|
456
|
-
type UseToastProps =
|
|
451
|
+
type UseToastProps = ToastProps & {
|
|
457
452
|
position?: Position;
|
|
458
453
|
duration?: number;
|
|
459
454
|
};
|
package/dist/index.mjs
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
|
*
|
|
@@ -3190,7 +3190,7 @@ var StyledToast = styled2.div`
|
|
|
3190
3190
|
justify-content: space-between;
|
|
3191
3191
|
min-height: 56px;
|
|
3192
3192
|
width: 356px;
|
|
3193
|
-
border-radius: var(--wui-border-radius-
|
|
3193
|
+
border-radius: var(--wui-border-radius-01);
|
|
3194
3194
|
background-color: var(--wui-color-bg-surface);
|
|
3195
3195
|
border: 1px solid var(--wui-color-border);
|
|
3196
3196
|
color: var(--wui-color-text);
|
|
@@ -3206,28 +3206,13 @@ var StyledToast = styled2.div`
|
|
|
3206
3206
|
flex: 0 0 16px;
|
|
3207
3207
|
}
|
|
3208
3208
|
`;
|
|
3209
|
-
var Action = ({
|
|
3210
|
-
actionButton,
|
|
3211
|
-
toastId
|
|
3212
|
-
}) => {
|
|
3209
|
+
var Action = ({ actionButton }) => {
|
|
3213
3210
|
if (isNotNil4(actionButton) && isValidElement(actionButton)) {
|
|
3214
|
-
const { onClick, ...restProps } = actionButton.props;
|
|
3215
|
-
const handleClick = (event) => {
|
|
3216
|
-
if (onClick) {
|
|
3217
|
-
onClick(
|
|
3218
|
-
event,
|
|
3219
|
-
toastId ?? ""
|
|
3220
|
-
);
|
|
3221
|
-
}
|
|
3222
|
-
};
|
|
3223
3211
|
return /* @__PURE__ */ jsx5(ActionWrapper, { children: cloneElement(actionButton, {
|
|
3224
|
-
...restProps,
|
|
3225
3212
|
variant: "soft",
|
|
3226
3213
|
// force Button variant
|
|
3227
|
-
size: "sm"
|
|
3214
|
+
size: "sm"
|
|
3228
3215
|
// force Button size
|
|
3229
|
-
onClick: handleClick
|
|
3230
|
-
// decorate onClick function with new args
|
|
3231
3216
|
}) });
|
|
3232
3217
|
}
|
|
3233
3218
|
return null;
|
|
@@ -3237,7 +3222,6 @@ var Toast = ({
|
|
|
3237
3222
|
message,
|
|
3238
3223
|
colorScheme = "inherit",
|
|
3239
3224
|
icon,
|
|
3240
|
-
toastId,
|
|
3241
3225
|
...props
|
|
3242
3226
|
}) => {
|
|
3243
3227
|
return /* @__PURE__ */ jsxs2(
|
|
@@ -3250,13 +3234,7 @@ var Toast = ({
|
|
|
3250
3234
|
isNotNil4(icon) ? icon : null,
|
|
3251
3235
|
/* @__PURE__ */ jsx5(Message, { lines: 3, children: message })
|
|
3252
3236
|
] }),
|
|
3253
|
-
/* @__PURE__ */ jsx5(
|
|
3254
|
-
Action,
|
|
3255
|
-
{
|
|
3256
|
-
actionButton: action,
|
|
3257
|
-
toastId
|
|
3258
|
-
}
|
|
3259
|
-
)
|
|
3237
|
+
/* @__PURE__ */ jsx5(Action, { actionButton: action })
|
|
3260
3238
|
]
|
|
3261
3239
|
}
|
|
3262
3240
|
);
|
|
@@ -3269,15 +3247,14 @@ var useToast = () => {
|
|
|
3269
3247
|
return useCallback7(
|
|
3270
3248
|
({ message, action, colorScheme, icon, position = "bottom-left", duration = 3e3 }) => {
|
|
3271
3249
|
sonnerToast.custom(
|
|
3272
|
-
(
|
|
3250
|
+
() => {
|
|
3273
3251
|
return /* @__PURE__ */ jsx6(
|
|
3274
3252
|
Toast,
|
|
3275
3253
|
{
|
|
3276
3254
|
action,
|
|
3277
3255
|
colorScheme,
|
|
3278
3256
|
icon,
|
|
3279
|
-
message
|
|
3280
|
-
toastId: String(toastId)
|
|
3257
|
+
message
|
|
3281
3258
|
}
|
|
3282
3259
|
);
|
|
3283
3260
|
},
|
|
@@ -17565,7 +17542,7 @@ var StyledThumbnailBadge = styled104.div`
|
|
|
17565
17542
|
align-items: center;
|
|
17566
17543
|
background-color: rgb(0 0 0 / 50%);
|
|
17567
17544
|
border-radius: var(--wui-border-radius-01);
|
|
17568
|
-
bottom: var(--wui-
|
|
17545
|
+
bottom: var(--wui-thumbnail-badge-offset);
|
|
17569
17546
|
color: var(--wui-color-text-on-fill);
|
|
17570
17547
|
display: flex;
|
|
17571
17548
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -17573,7 +17550,7 @@ var StyledThumbnailBadge = styled104.div`
|
|
|
17573
17550
|
gap: var(--wui-space-01);
|
|
17574
17551
|
padding: 0 var(--wui-space-01);
|
|
17575
17552
|
position: absolute;
|
|
17576
|
-
right: var(--wui-
|
|
17553
|
+
right: var(--wui-thumbnail-badge-offset);
|
|
17577
17554
|
z-index: 1;
|
|
17578
17555
|
|
|
17579
17556
|
svg {
|
|
@@ -17898,7 +17875,15 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
17898
17875
|
}
|
|
17899
17876
|
);
|
|
17900
17877
|
};
|
|
17878
|
+
var StyledThumbnailContainer = styled106.div`
|
|
17879
|
+
container-type: size;
|
|
17880
|
+
aspect-ratio: 16 / 9;
|
|
17881
|
+
width: ${({ $width }) => $width};
|
|
17882
|
+
display: flex;
|
|
17883
|
+
clip-path: inset(0 0 0 0 round var(--wui-collage-border-radius));
|
|
17884
|
+
`;
|
|
17901
17885
|
var StyledThumbnail = styled106.div`
|
|
17886
|
+
--wui-thumbnail-badge-offset: var(--wui-space-01);
|
|
17902
17887
|
background-image: ${({ $backgroundUrl }) => isNotNil43($backgroundUrl) ? `url('${$backgroundUrl}')` : void 0};
|
|
17903
17888
|
${({ $backgroundUrl, $gradientBackground }) => (
|
|
17904
17889
|
// if we don't have $backgroundUrl show a gradient
|
|
@@ -17906,17 +17891,20 @@ var StyledThumbnail = styled106.div`
|
|
|
17906
17891
|
)};
|
|
17907
17892
|
background-position: center center;
|
|
17908
17893
|
background-size: cover;
|
|
17894
|
+
width: 100%;
|
|
17909
17895
|
aspect-ratio: 16 / 9;
|
|
17910
|
-
display: flex;
|
|
17911
17896
|
overflow: hidden;
|
|
17912
17897
|
position: relative;
|
|
17913
|
-
|
|
17914
|
-
|
|
17898
|
+
display: flex;
|
|
17899
|
+
clip-path: inset(
|
|
17900
|
+
0 0 0 0 round clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05))
|
|
17901
|
+
);
|
|
17915
17902
|
|
|
17916
|
-
|
|
17917
|
-
|
|
17918
|
-
border-radius: calc(8% * (9 / 16)) / 8%;
|
|
17903
|
+
@container (min-width: 200px) {
|
|
17904
|
+
--wui-thumbnail-badge-offset: var(--wui-space-02);
|
|
17919
17905
|
}
|
|
17906
|
+
|
|
17907
|
+
${({ $isScrubbable }) => $isScrubbable && "cursor: pointer;"}
|
|
17920
17908
|
`;
|
|
17921
17909
|
var StoryboardRenderer = ({
|
|
17922
17910
|
storyboard,
|
|
@@ -18039,23 +18027,30 @@ var Thumbnail = forwardRef37(
|
|
|
18039
18027
|
} else {
|
|
18040
18028
|
thumbnailContent = null;
|
|
18041
18029
|
}
|
|
18042
|
-
return /* @__PURE__ */
|
|
18043
|
-
|
|
18030
|
+
return /* @__PURE__ */ jsx325(
|
|
18031
|
+
StyledThumbnailContainer,
|
|
18044
18032
|
{
|
|
18045
|
-
ref,
|
|
18046
|
-
...props,
|
|
18047
|
-
$backgroundUrl: backgroundUrl,
|
|
18048
|
-
$gradientBackground: gradientBackground,
|
|
18049
|
-
$isScrubbable: isScrubbable,
|
|
18050
18033
|
$width: width,
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
|
|
18055
|
-
|
|
18056
|
-
|
|
18057
|
-
|
|
18058
|
-
|
|
18034
|
+
"data-thumbnail-container": true,
|
|
18035
|
+
children: /* @__PURE__ */ jsxs69(
|
|
18036
|
+
StyledThumbnail,
|
|
18037
|
+
{
|
|
18038
|
+
ref,
|
|
18039
|
+
...props,
|
|
18040
|
+
$backgroundUrl: backgroundUrl,
|
|
18041
|
+
$gradientBackground: gradientBackground,
|
|
18042
|
+
$isScrubbable: isScrubbable,
|
|
18043
|
+
$width: width,
|
|
18044
|
+
onBlur: handleMouseOut,
|
|
18045
|
+
onMouseMove: handleMouseMove,
|
|
18046
|
+
onMouseOut: handleMouseOut,
|
|
18047
|
+
role: "presentation",
|
|
18048
|
+
children: [
|
|
18049
|
+
isNotNil43(children) ? children : null,
|
|
18050
|
+
thumbnailContent
|
|
18051
|
+
]
|
|
18052
|
+
}
|
|
18053
|
+
)
|
|
18059
18054
|
}
|
|
18060
18055
|
);
|
|
18061
18056
|
}
|
|
@@ -18067,6 +18062,13 @@ import React5 from "react";
|
|
|
18067
18062
|
import { styled as styled107 } from "styled-components";
|
|
18068
18063
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
18069
18064
|
import { jsx as jsx326 } from "react/jsx-runtime";
|
|
18065
|
+
var ThumbnailCollageContainer = styled107.div`
|
|
18066
|
+
container-type: size;
|
|
18067
|
+
container-name: thumbnail-collage;
|
|
18068
|
+
width: 100%;
|
|
18069
|
+
aspect-ratio: 16 / 9;
|
|
18070
|
+
display: flex;
|
|
18071
|
+
`;
|
|
18070
18072
|
var StyledThumbnailCollage = styled107.div`
|
|
18071
18073
|
display: grid;
|
|
18072
18074
|
gap: var(--wui-space-01);
|
|
@@ -18074,49 +18076,39 @@ var StyledThumbnailCollage = styled107.div`
|
|
|
18074
18076
|
grid-template-columns: 3fr 2fr;
|
|
18075
18077
|
grid-template-rows: 1fr 1fr;
|
|
18076
18078
|
aspect-ratio: 16 / 9;
|
|
18079
|
+
--wui-collage-border-radius: clamp(
|
|
18080
|
+
var(--wui-border-radius-01),
|
|
18081
|
+
8cqh,
|
|
18082
|
+
var(--wui-border-radius-05)
|
|
18083
|
+
);
|
|
18077
18084
|
|
|
18078
18085
|
&:has(:nth-child(1)) {
|
|
18079
|
-
--wui-collage-thumbnail-first-border-radius: calc(8% * (9 / 16)) / 8%;
|
|
18080
|
-
|
|
18081
18086
|
grid-template-areas:
|
|
18082
18087
|
'a a'
|
|
18083
18088
|
'a a';
|
|
18084
18089
|
}
|
|
18085
18090
|
|
|
18086
18091
|
&:has(:nth-child(2)) {
|
|
18087
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18088
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 8%;
|
|
18089
|
-
|
|
18090
18092
|
grid-template-areas:
|
|
18091
18093
|
'a b'
|
|
18092
18094
|
'a b';
|
|
18093
18095
|
}
|
|
18094
18096
|
|
|
18095
18097
|
&:has(:nth-child(3)) {
|
|
18096
|
-
--wui-collage-thumbnail-first-border-radius: 7.5% / 8%;
|
|
18097
|
-
--wui-collage-thumbnail-second-border-radius: 11.5% / 16%;
|
|
18098
|
-
--wui-collage-thumbnail-third-border-radius: 11.5% / 16%;
|
|
18099
|
-
|
|
18100
18098
|
grid-template-areas:
|
|
18101
18099
|
'a b'
|
|
18102
18100
|
'a c';
|
|
18103
18101
|
}
|
|
18104
18102
|
|
|
18105
18103
|
> :nth-child(1) {
|
|
18106
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-first-border-radius);
|
|
18107
|
-
|
|
18108
18104
|
grid-area: a;
|
|
18109
18105
|
}
|
|
18110
18106
|
|
|
18111
18107
|
> :nth-child(2) {
|
|
18112
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-second-border-radius);
|
|
18113
|
-
|
|
18114
18108
|
grid-area: b;
|
|
18115
18109
|
}
|
|
18116
18110
|
|
|
18117
18111
|
> :nth-child(3) {
|
|
18118
|
-
--wui-collage-thumbnail-border-radius: var(--wui-collage-thumbnail-third-border-radius);
|
|
18119
|
-
|
|
18120
18112
|
grid-area: c;
|
|
18121
18113
|
}
|
|
18122
18114
|
|
|
@@ -18124,15 +18116,6 @@ var StyledThumbnailCollage = styled107.div`
|
|
|
18124
18116
|
aspect-ratio: unset;
|
|
18125
18117
|
height: 100%;
|
|
18126
18118
|
width: 100%;
|
|
18127
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18128
|
-
|
|
18129
|
-
img {
|
|
18130
|
-
border-radius: var(--wui-collage-thumbnail-border-radius);
|
|
18131
|
-
}
|
|
18132
|
-
|
|
18133
|
-
> :not(img) {
|
|
18134
|
-
display: none;
|
|
18135
|
-
}
|
|
18136
18119
|
}
|
|
18137
18120
|
`;
|
|
18138
18121
|
var ThumbnailCollage = ({
|
|
@@ -18158,7 +18141,7 @@ var ThumbnailCollage = ({
|
|
|
18158
18141
|
"fallback"
|
|
18159
18142
|
)
|
|
18160
18143
|
];
|
|
18161
|
-
return /* @__PURE__ */ jsx326(
|
|
18144
|
+
return /* @__PURE__ */ jsx326(ThumbnailCollageContainer, { children: /* @__PURE__ */ jsx326(
|
|
18162
18145
|
StyledThumbnailCollage,
|
|
18163
18146
|
{
|
|
18164
18147
|
$gradientBackground: gradientBackground,
|
|
@@ -18166,7 +18149,7 @@ var ThumbnailCollage = ({
|
|
|
18166
18149
|
...props,
|
|
18167
18150
|
children: thumbnails
|
|
18168
18151
|
}
|
|
18169
|
-
);
|
|
18152
|
+
) });
|
|
18170
18153
|
};
|
|
18171
18154
|
|
|
18172
18155
|
// src/components/WistiaLogo/WistiaLogo.tsx
|