@wistia/ui 0.18.0-beta.978703a9.78cdfd1 → 0.18.0-beta.9dd31b7e.fa98d59
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 +9 -32
- 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 +9 -32
- 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.9dd31b7e.fa98d59
|
|
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
|
},
|
|
@@ -15013,6 +14990,7 @@ var FormField = ({
|
|
|
15013
14990
|
id: computedId,
|
|
15014
14991
|
label: isIntegratedLabel ? label : void 0,
|
|
15015
14992
|
"aria-describedby": ariaDescribedby,
|
|
14993
|
+
"aria-invalid": (0, import_type_guards49.isNotNil)(computedError),
|
|
15016
14994
|
...props
|
|
15017
14995
|
};
|
|
15018
14996
|
if ((0, import_type_guards49.isUndefined)(value) && (0, import_type_guards49.isNotUndefined)(defaultValue)) {
|
|
@@ -15034,8 +15012,7 @@ var FormField = ({
|
|
|
15034
15012
|
childProps = {
|
|
15035
15013
|
...childProps,
|
|
15036
15014
|
name: computedName,
|
|
15037
|
-
onChange: handleChange
|
|
15038
|
-
"aria-invalid": (0, import_type_guards49.isNotNil)(error)
|
|
15015
|
+
onChange: handleChange
|
|
15039
15016
|
};
|
|
15040
15017
|
}
|
|
15041
15018
|
import_react73.Children.only(children);
|