@wistia/ui 0.10.15 → 0.10.16
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 +445 -341
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +37 -12
- package/dist/index.d.ts +37 -12
- package/dist/index.mjs +404 -302
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.10.
|
|
3
|
+
* @license @wistia/ui v0.10.16
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8970,92 +8970,92 @@ var FormContext = createContext3({
|
|
|
8970
8970
|
formId: "NO_FORM",
|
|
8971
8971
|
labelPosition: "block"
|
|
8972
8972
|
});
|
|
8973
|
-
var
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
const
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
const handleBlur2 = (event) => {
|
|
8996
|
-
if (props.onBlur) {
|
|
8997
|
-
props.onBlur(event);
|
|
8998
|
-
}
|
|
8999
|
-
const formData = new FormData(event.currentTarget);
|
|
9000
|
-
if (isNotUndefined6(validate)) {
|
|
9001
|
-
handleValidate(formData);
|
|
9002
|
-
}
|
|
9003
|
-
};
|
|
9004
|
-
const handleSubmit = (event) => {
|
|
9005
|
-
event.preventDefault();
|
|
9006
|
-
const formData = new FormData(event.currentTarget);
|
|
9007
|
-
const nextErrors = handleValidate(formData);
|
|
9008
|
-
const isValid = Object.keys(nextErrors).length === 0;
|
|
9009
|
-
setErrors(nextErrors);
|
|
9010
|
-
setHasSubmitted(true);
|
|
9011
|
-
if (isValid && props.onSubmit) {
|
|
9012
|
-
props.onSubmit(event);
|
|
9013
|
-
}
|
|
9014
|
-
if (isValid && action) {
|
|
9015
|
-
void action(formData);
|
|
9016
|
-
}
|
|
9017
|
-
};
|
|
9018
|
-
const handleReset = (event) => {
|
|
9019
|
-
setErrors({});
|
|
9020
|
-
setHasSubmitted(false);
|
|
9021
|
-
if (props.onReset) {
|
|
9022
|
-
props.onReset(event);
|
|
9023
|
-
}
|
|
9024
|
-
if (action) {
|
|
9025
|
-
void action(null);
|
|
9026
|
-
}
|
|
9027
|
-
};
|
|
9028
|
-
const context = useMemo6(() => {
|
|
9029
|
-
return {
|
|
9030
|
-
values,
|
|
9031
|
-
errors,
|
|
9032
|
-
hasSubmitted,
|
|
9033
|
-
formId: id,
|
|
9034
|
-
labelPosition
|
|
8973
|
+
var Form = forwardRef11(
|
|
8974
|
+
({
|
|
8975
|
+
children,
|
|
8976
|
+
action,
|
|
8977
|
+
values = {},
|
|
8978
|
+
labelPosition = "block",
|
|
8979
|
+
validate,
|
|
8980
|
+
fullWidth = false,
|
|
8981
|
+
...props
|
|
8982
|
+
}, forwardedRef) => {
|
|
8983
|
+
const [errors, setErrors] = useState11({});
|
|
8984
|
+
const [hasSubmitted, setHasSubmitted] = useState11(false);
|
|
8985
|
+
const innerRef = useRef8(null);
|
|
8986
|
+
const ref = forwardedRef ?? innerRef;
|
|
8987
|
+
const autoId = useId();
|
|
8988
|
+
const id = props.id ?? autoId;
|
|
8989
|
+
const handleValidate = (nextFormData) => {
|
|
8990
|
+
const nextData = serializeFormData(nextFormData);
|
|
8991
|
+
if (isUndefined3(validate)) {
|
|
8992
|
+
return {};
|
|
8993
|
+
}
|
|
8994
|
+
return validate(nextData);
|
|
9035
8995
|
};
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
/* @__PURE__ */ jsx216(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx216(
|
|
9040
|
-
Stack,
|
|
9041
|
-
{
|
|
9042
|
-
...props,
|
|
9043
|
-
ref,
|
|
9044
|
-
$fullWidth: fullWidth,
|
|
9045
|
-
alignItems: fullWidth ? "stretch" : "flex-start",
|
|
9046
|
-
as: StyledForm,
|
|
9047
|
-
gap: "space-05",
|
|
9048
|
-
id,
|
|
9049
|
-
onBlur: handleBlur2,
|
|
9050
|
-
onReset: handleReset,
|
|
9051
|
-
onSubmit: handleSubmit,
|
|
9052
|
-
children
|
|
8996
|
+
const handleBlur2 = (event) => {
|
|
8997
|
+
if (props.onBlur) {
|
|
8998
|
+
props.onBlur(event);
|
|
9053
8999
|
}
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9058
|
-
|
|
9000
|
+
const formData = new FormData(event.currentTarget);
|
|
9001
|
+
if (isNotUndefined6(validate)) {
|
|
9002
|
+
handleValidate(formData);
|
|
9003
|
+
}
|
|
9004
|
+
};
|
|
9005
|
+
const handleSubmit = (event) => {
|
|
9006
|
+
event.preventDefault();
|
|
9007
|
+
const formData = new FormData(event.currentTarget);
|
|
9008
|
+
const nextErrors = handleValidate(formData);
|
|
9009
|
+
const isValid = Object.keys(nextErrors).length === 0;
|
|
9010
|
+
setErrors(nextErrors);
|
|
9011
|
+
setHasSubmitted(true);
|
|
9012
|
+
if (isValid && props.onSubmit) {
|
|
9013
|
+
props.onSubmit(event);
|
|
9014
|
+
}
|
|
9015
|
+
if (isValid && action) {
|
|
9016
|
+
void action(formData);
|
|
9017
|
+
}
|
|
9018
|
+
};
|
|
9019
|
+
const handleReset = (event) => {
|
|
9020
|
+
setErrors({});
|
|
9021
|
+
setHasSubmitted(false);
|
|
9022
|
+
if (props.onReset) {
|
|
9023
|
+
props.onReset(event);
|
|
9024
|
+
}
|
|
9025
|
+
if (action) {
|
|
9026
|
+
void action(null);
|
|
9027
|
+
}
|
|
9028
|
+
};
|
|
9029
|
+
const context = useMemo6(() => {
|
|
9030
|
+
return {
|
|
9031
|
+
values,
|
|
9032
|
+
errors,
|
|
9033
|
+
hasSubmitted,
|
|
9034
|
+
formId: id,
|
|
9035
|
+
labelPosition
|
|
9036
|
+
};
|
|
9037
|
+
}, [labelPosition, values, errors, id, hasSubmitted]);
|
|
9038
|
+
return (
|
|
9039
|
+
// @ts-expect-error - generic context providers are a giant pain
|
|
9040
|
+
/* @__PURE__ */ jsx216(FormContext.Provider, { value: context, children: /* @__PURE__ */ jsx216(
|
|
9041
|
+
Stack,
|
|
9042
|
+
{
|
|
9043
|
+
...props,
|
|
9044
|
+
ref,
|
|
9045
|
+
$fullWidth: fullWidth,
|
|
9046
|
+
alignItems: fullWidth ? "stretch" : "flex-start",
|
|
9047
|
+
as: StyledForm,
|
|
9048
|
+
gap: "space-05",
|
|
9049
|
+
id,
|
|
9050
|
+
onBlur: handleBlur2,
|
|
9051
|
+
onReset: handleReset,
|
|
9052
|
+
onSubmit: handleSubmit,
|
|
9053
|
+
children
|
|
9054
|
+
}
|
|
9055
|
+
) })
|
|
9056
|
+
);
|
|
9057
|
+
}
|
|
9058
|
+
);
|
|
9059
9059
|
|
|
9060
9060
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9061
9061
|
import { jsx as jsx217 } from "react/jsx-runtime";
|
|
@@ -11226,6 +11226,7 @@ var List = ({
|
|
|
11226
11226
|
List.displayName = "List";
|
|
11227
11227
|
|
|
11228
11228
|
// src/components/Menu/Menu.tsx
|
|
11229
|
+
import { forwardRef as forwardRef16, useMemo as useMemo10 } from "react";
|
|
11229
11230
|
import styled46, { css as css32, keyframes as keyframes3 } from "styled-components";
|
|
11230
11231
|
import {
|
|
11231
11232
|
DropdownMenu,
|
|
@@ -11234,7 +11235,6 @@ import {
|
|
|
11234
11235
|
DropdownMenuContent
|
|
11235
11236
|
} from "@radix-ui/react-dropdown-menu";
|
|
11236
11237
|
import { isNotNil as isNotNil23, isNotUndefined as isNotUndefined11 } from "@wistia/type-guards";
|
|
11237
|
-
import { useMemo as useMemo10 } from "react";
|
|
11238
11238
|
|
|
11239
11239
|
// src/components/Menu/MenuContext.tsx
|
|
11240
11240
|
import { createContext as createContext6, useContext as useContext7 } from "react";
|
|
@@ -11329,65 +11329,70 @@ var menuContentCss = css32`
|
|
|
11329
11329
|
`;
|
|
11330
11330
|
var MenuContent = styled46(DropdownMenuContent)`
|
|
11331
11331
|
${menuContentCss}
|
|
11332
|
+
min-width: var(--radix-dropdown-menu-trigger-width);
|
|
11332
11333
|
`;
|
|
11333
|
-
var Menu = (
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
if (disabled) {
|
|
11351
|
-
controlProps = {
|
|
11352
|
-
open: false,
|
|
11353
|
-
onOpenChange: () => null
|
|
11334
|
+
var Menu = forwardRef16(
|
|
11335
|
+
({
|
|
11336
|
+
align = "start",
|
|
11337
|
+
children,
|
|
11338
|
+
disabled = false,
|
|
11339
|
+
compact = false,
|
|
11340
|
+
trigger,
|
|
11341
|
+
label,
|
|
11342
|
+
isOpen,
|
|
11343
|
+
triggerProps = {},
|
|
11344
|
+
onOpenChange,
|
|
11345
|
+
onInteractOutside,
|
|
11346
|
+
...props
|
|
11347
|
+
}, ref) => {
|
|
11348
|
+
const contextValue = useMemo10(() => ({ compact }), [compact]);
|
|
11349
|
+
let controlProps = {
|
|
11350
|
+
...isNotNil23(onOpenChange) && isNotNil23(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
11354
11351
|
};
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
...controlProps,
|
|
11361
|
-
children: [
|
|
11362
|
-
/* @__PURE__ */ jsx240(DropdownMenuTrigger, { asChild: true, children: isNotUndefined11(trigger) ? trigger : /* @__PURE__ */ jsx240(
|
|
11363
|
-
Button,
|
|
11364
|
-
{
|
|
11365
|
-
"aria-expanded": isOpen,
|
|
11366
|
-
disabled,
|
|
11367
|
-
forceState: isOpen ? "active" : void 0,
|
|
11368
|
-
rightIcon: /* @__PURE__ */ jsx240(Icon, { type: "caret-down" }),
|
|
11369
|
-
...triggerProps,
|
|
11370
|
-
children: label
|
|
11371
|
-
}
|
|
11372
|
-
) }),
|
|
11373
|
-
/* @__PURE__ */ jsx240(DropdownMenuPortal, { children: /* @__PURE__ */ jsx240(
|
|
11374
|
-
MenuContent,
|
|
11375
|
-
{
|
|
11376
|
-
...props,
|
|
11377
|
-
$compact: compact,
|
|
11378
|
-
align,
|
|
11379
|
-
collisionPadding: 8,
|
|
11380
|
-
sideOffset: 6,
|
|
11381
|
-
onFocusOutside: (event) => {
|
|
11382
|
-
event.preventDefault();
|
|
11383
|
-
},
|
|
11384
|
-
children
|
|
11385
|
-
}
|
|
11386
|
-
) })
|
|
11387
|
-
]
|
|
11352
|
+
if (disabled) {
|
|
11353
|
+
controlProps = {
|
|
11354
|
+
open: false,
|
|
11355
|
+
onOpenChange: () => null
|
|
11356
|
+
};
|
|
11388
11357
|
}
|
|
11389
|
-
|
|
11390
|
-
|
|
11358
|
+
return /* @__PURE__ */ jsx240(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs30(
|
|
11359
|
+
DropdownMenu,
|
|
11360
|
+
{
|
|
11361
|
+
modal: false,
|
|
11362
|
+
...controlProps,
|
|
11363
|
+
children: [
|
|
11364
|
+
/* @__PURE__ */ jsx240(DropdownMenuTrigger, { asChild: true, children: isNotUndefined11(trigger) ? trigger : /* @__PURE__ */ jsx240(
|
|
11365
|
+
Button,
|
|
11366
|
+
{
|
|
11367
|
+
ref,
|
|
11368
|
+
"aria-expanded": isOpen,
|
|
11369
|
+
disabled,
|
|
11370
|
+
forceState: isOpen ? "active" : void 0,
|
|
11371
|
+
rightIcon: /* @__PURE__ */ jsx240(Icon, { type: "caret-down" }),
|
|
11372
|
+
...triggerProps,
|
|
11373
|
+
children: label
|
|
11374
|
+
}
|
|
11375
|
+
) }),
|
|
11376
|
+
/* @__PURE__ */ jsx240(DropdownMenuPortal, { children: /* @__PURE__ */ jsx240(
|
|
11377
|
+
MenuContent,
|
|
11378
|
+
{
|
|
11379
|
+
...props,
|
|
11380
|
+
$compact: compact,
|
|
11381
|
+
align,
|
|
11382
|
+
collisionPadding: 8,
|
|
11383
|
+
sideOffset: 6,
|
|
11384
|
+
onFocusOutside: (event) => {
|
|
11385
|
+
event.preventDefault();
|
|
11386
|
+
},
|
|
11387
|
+
children
|
|
11388
|
+
}
|
|
11389
|
+
) })
|
|
11390
|
+
]
|
|
11391
|
+
}
|
|
11392
|
+
) });
|
|
11393
|
+
}
|
|
11394
|
+
);
|
|
11395
|
+
Menu.displayName = "Menu";
|
|
11391
11396
|
Menu.displayName = "Menu";
|
|
11392
11397
|
|
|
11393
11398
|
// src/components/Menu/MenuLabel.tsx
|
|
@@ -11431,7 +11436,7 @@ import {
|
|
|
11431
11436
|
import { isNotNil as isNotNil25 } from "@wistia/type-guards";
|
|
11432
11437
|
|
|
11433
11438
|
// src/components/Menu/MenuItemButton.tsx
|
|
11434
|
-
import { forwardRef as
|
|
11439
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
11435
11440
|
import styled48 from "styled-components";
|
|
11436
11441
|
import { isNotNil as isNotNil24, isNotUndefined as isNotUndefined12 } from "@wistia/type-guards";
|
|
11437
11442
|
import { jsx as jsx242, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
@@ -11508,7 +11513,7 @@ var StyledBadgeContainer = styled48.div`
|
|
|
11508
11513
|
font-size: var(--wui-typography-label-4-size);
|
|
11509
11514
|
color: var(--wui-color-text-secondary);
|
|
11510
11515
|
`;
|
|
11511
|
-
var MenuItemButton =
|
|
11516
|
+
var MenuItemButton = forwardRef17(({ children, appearance, command, icon, ...props }, ref) => {
|
|
11512
11517
|
let { colorScheme, badge } = props;
|
|
11513
11518
|
if (appearance === "dangerous") {
|
|
11514
11519
|
if (isNotUndefined12(colorScheme)) {
|
|
@@ -11637,10 +11642,10 @@ var SubMenu = ({
|
|
|
11637
11642
|
SubMenu.displayName = "SubMenu";
|
|
11638
11643
|
|
|
11639
11644
|
// src/components/Menu/MenuItem.tsx
|
|
11640
|
-
import { forwardRef as
|
|
11645
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
11641
11646
|
import { DropdownMenuItem as DropdownMenuItem2 } from "@radix-ui/react-dropdown-menu";
|
|
11642
11647
|
import { jsx as jsx245 } from "react/jsx-runtime";
|
|
11643
|
-
var MenuItem =
|
|
11648
|
+
var MenuItem = forwardRef18(
|
|
11644
11649
|
({ onSelect = () => null, ...props }, ref) => {
|
|
11645
11650
|
return /* @__PURE__ */ jsx245(
|
|
11646
11651
|
DropdownMenuItem2,
|
|
@@ -11796,8 +11801,103 @@ var CheckboxMenuItem = ({
|
|
|
11796
11801
|
};
|
|
11797
11802
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
11798
11803
|
|
|
11804
|
+
// src/components/Menu/FilterMenu.tsx
|
|
11805
|
+
import { Children as Children7, forwardRef as forwardRef19 } from "react";
|
|
11806
|
+
import { jsx as jsx249, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
11807
|
+
var FilterMenuItem = CheckboxMenuItem;
|
|
11808
|
+
var FilterMenu = forwardRef19(
|
|
11809
|
+
({ value, onChange, searchValue, onSearchValueChange, children, ...props }, ref) => {
|
|
11810
|
+
return /* @__PURE__ */ jsxs34(
|
|
11811
|
+
Menu,
|
|
11812
|
+
{
|
|
11813
|
+
...props,
|
|
11814
|
+
ref,
|
|
11815
|
+
isOpen: true,
|
|
11816
|
+
children: [
|
|
11817
|
+
/* @__PURE__ */ jsx249(
|
|
11818
|
+
Card,
|
|
11819
|
+
{
|
|
11820
|
+
alignItems: "flex-end",
|
|
11821
|
+
border: false,
|
|
11822
|
+
borderRadius: "border-radius-02",
|
|
11823
|
+
paddingSize: "space-01",
|
|
11824
|
+
prominence: "default",
|
|
11825
|
+
style: {
|
|
11826
|
+
position: "absolute",
|
|
11827
|
+
top: 0,
|
|
11828
|
+
left: 0,
|
|
11829
|
+
right: 0,
|
|
11830
|
+
margin: "1px"
|
|
11831
|
+
},
|
|
11832
|
+
children: /* @__PURE__ */ jsx249(
|
|
11833
|
+
Input,
|
|
11834
|
+
{
|
|
11835
|
+
autoFocus: true,
|
|
11836
|
+
onChange: (event) => {
|
|
11837
|
+
onSearchValueChange(event.target.value);
|
|
11838
|
+
},
|
|
11839
|
+
onClick: (event) => event.preventDefault(),
|
|
11840
|
+
onKeyDown: (event) => {
|
|
11841
|
+
if (event.key === "ArrowDown") {
|
|
11842
|
+
event.preventDefault();
|
|
11843
|
+
const menu = document.querySelector('[role="menu"]');
|
|
11844
|
+
const firstMenuItem = menu?.querySelector('[role="menuitemcheckbox"]');
|
|
11845
|
+
if (firstMenuItem) {
|
|
11846
|
+
firstMenuItem.focus();
|
|
11847
|
+
}
|
|
11848
|
+
}
|
|
11849
|
+
event.stopPropagation();
|
|
11850
|
+
},
|
|
11851
|
+
placeholder: "Search...",
|
|
11852
|
+
tabIndex: 0,
|
|
11853
|
+
type: "search"
|
|
11854
|
+
}
|
|
11855
|
+
)
|
|
11856
|
+
}
|
|
11857
|
+
),
|
|
11858
|
+
/* @__PURE__ */ jsx249(
|
|
11859
|
+
MenuItem,
|
|
11860
|
+
{
|
|
11861
|
+
disabled: true,
|
|
11862
|
+
style: { padding: "16px" },
|
|
11863
|
+
children: " "
|
|
11864
|
+
}
|
|
11865
|
+
),
|
|
11866
|
+
Children7.toArray(children).length > 0 ? children : /* @__PURE__ */ jsx249(MenuItem, { disabled: true, children: "No results found" }),
|
|
11867
|
+
value.length > 0 && /* @__PURE__ */ jsx249(MenuItem, { disabled: true, children: /* @__PURE__ */ jsx249(
|
|
11868
|
+
Card,
|
|
11869
|
+
{
|
|
11870
|
+
alignItems: "flex-end",
|
|
11871
|
+
border: false,
|
|
11872
|
+
borderRadius: "border-radius-02",
|
|
11873
|
+
paddingSize: "space-01",
|
|
11874
|
+
prominence: "default",
|
|
11875
|
+
style: {
|
|
11876
|
+
position: "absolute",
|
|
11877
|
+
bottom: 0,
|
|
11878
|
+
left: 0,
|
|
11879
|
+
right: 0,
|
|
11880
|
+
margin: "1px"
|
|
11881
|
+
},
|
|
11882
|
+
children: /* @__PURE__ */ jsx249(
|
|
11883
|
+
Button,
|
|
11884
|
+
{
|
|
11885
|
+
onClick: () => onChange([]),
|
|
11886
|
+
size: "sm",
|
|
11887
|
+
children: "Clear"
|
|
11888
|
+
}
|
|
11889
|
+
)
|
|
11890
|
+
}
|
|
11891
|
+
) })
|
|
11892
|
+
]
|
|
11893
|
+
}
|
|
11894
|
+
);
|
|
11895
|
+
}
|
|
11896
|
+
);
|
|
11897
|
+
FilterMenu.displayName = "FilterMenu";
|
|
11898
|
+
|
|
11799
11899
|
// src/components/Modal/Modal.tsx
|
|
11800
|
-
import { forwardRef as
|
|
11900
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
11801
11901
|
import styled55 from "styled-components";
|
|
11802
11902
|
import { Root as DialogRoot, Portal as DialogPortal } from "@radix-ui/react-dialog";
|
|
11803
11903
|
import { isNotNil as isNotNil28 } from "@wistia/type-guards";
|
|
@@ -11809,24 +11909,24 @@ import { Title as DialogTitle } from "@radix-ui/react-dialog";
|
|
|
11809
11909
|
// src/components/Modal/ModalCloseButton.tsx
|
|
11810
11910
|
import styled51 from "styled-components";
|
|
11811
11911
|
import { Close as DialogClose } from "@radix-ui/react-dialog";
|
|
11812
|
-
import { jsx as
|
|
11912
|
+
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
11813
11913
|
var CloseButton = styled51(DialogClose)`
|
|
11814
11914
|
align-self: start;
|
|
11815
11915
|
`;
|
|
11816
11916
|
var ModalCloseButton = () => {
|
|
11817
|
-
return /* @__PURE__ */
|
|
11917
|
+
return /* @__PURE__ */ jsx250(CloseButton, { asChild: true, children: /* @__PURE__ */ jsx250(
|
|
11818
11918
|
IconButton,
|
|
11819
11919
|
{
|
|
11820
11920
|
label: "Dismiss modal",
|
|
11821
11921
|
size: "sm",
|
|
11822
11922
|
variant: "ghost",
|
|
11823
|
-
children: /* @__PURE__ */
|
|
11923
|
+
children: /* @__PURE__ */ jsx250(Icon, { type: "close" })
|
|
11824
11924
|
}
|
|
11825
11925
|
) });
|
|
11826
11926
|
};
|
|
11827
11927
|
|
|
11828
11928
|
// src/components/Modal/ModalHeader.tsx
|
|
11829
|
-
import { jsx as
|
|
11929
|
+
import { jsx as jsx251, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
11830
11930
|
var Header = styled52.header`
|
|
11831
11931
|
display: flex;
|
|
11832
11932
|
order: 1;
|
|
@@ -11849,15 +11949,15 @@ var ModalHeader = ({
|
|
|
11849
11949
|
hideTitle,
|
|
11850
11950
|
hideCloseButton
|
|
11851
11951
|
}) => {
|
|
11852
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */
|
|
11853
|
-
return /* @__PURE__ */
|
|
11952
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ jsx251(ScreenReaderOnly, { children: /* @__PURE__ */ jsx251(Title, { children: title }) }) : /* @__PURE__ */ jsx251(Title, { children: title });
|
|
11953
|
+
return /* @__PURE__ */ jsxs35(Header, { $hideTitle: hideTitle, children: [
|
|
11854
11954
|
TitleComponent,
|
|
11855
|
-
hideCloseButton ? null : /* @__PURE__ */
|
|
11955
|
+
hideCloseButton ? null : /* @__PURE__ */ jsx251(ModalCloseButton, {})
|
|
11856
11956
|
] });
|
|
11857
11957
|
};
|
|
11858
11958
|
|
|
11859
11959
|
// src/components/Modal/ModalContent.tsx
|
|
11860
|
-
import { forwardRef as
|
|
11960
|
+
import { forwardRef as forwardRef20 } from "react";
|
|
11861
11961
|
import styled53, { css as css33 } from "styled-components";
|
|
11862
11962
|
import { Content as DialogContent } from "@radix-ui/react-dialog";
|
|
11863
11963
|
|
|
@@ -11881,7 +11981,7 @@ var useFocusRestore = () => {
|
|
|
11881
11981
|
};
|
|
11882
11982
|
|
|
11883
11983
|
// src/components/Modal/ModalContent.tsx
|
|
11884
|
-
import { jsx as
|
|
11984
|
+
import { jsx as jsx252 } from "react/jsx-runtime";
|
|
11885
11985
|
var alignTopStyles = css33`
|
|
11886
11986
|
--wui-modal-translate-y: 0;
|
|
11887
11987
|
|
|
@@ -11960,10 +12060,10 @@ var StyledModalContent = styled53(DialogContent)`
|
|
|
11960
12060
|
}
|
|
11961
12061
|
}
|
|
11962
12062
|
`;
|
|
11963
|
-
var ModalContent =
|
|
12063
|
+
var ModalContent = forwardRef20(
|
|
11964
12064
|
({ fullHeight, width, alignHorizontal, alignVertical, children, ...props }, ref) => {
|
|
11965
12065
|
useFocusRestore();
|
|
11966
|
-
return /* @__PURE__ */
|
|
12066
|
+
return /* @__PURE__ */ jsx252(
|
|
11967
12067
|
StyledModalContent,
|
|
11968
12068
|
{
|
|
11969
12069
|
ref,
|
|
@@ -11980,9 +12080,9 @@ var ModalContent = forwardRef18(
|
|
|
11980
12080
|
);
|
|
11981
12081
|
|
|
11982
12082
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
11983
|
-
import { forwardRef as
|
|
12083
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
11984
12084
|
import styled54 from "styled-components";
|
|
11985
|
-
import { jsx as
|
|
12085
|
+
import { jsx as jsx253 } from "react/jsx-runtime";
|
|
11986
12086
|
var alignVerticalMap = {
|
|
11987
12087
|
stretch: "normal",
|
|
11988
12088
|
top: "start",
|
|
@@ -12020,8 +12120,8 @@ var BackdropComponent = styled54.div`
|
|
|
12020
12120
|
}
|
|
12021
12121
|
}
|
|
12022
12122
|
`;
|
|
12023
|
-
var Backdrop =
|
|
12024
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */
|
|
12123
|
+
var Backdrop = forwardRef21(
|
|
12124
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ jsx253(
|
|
12025
12125
|
BackdropComponent,
|
|
12026
12126
|
{
|
|
12027
12127
|
ref,
|
|
@@ -12035,7 +12135,7 @@ var Backdrop = forwardRef19(
|
|
|
12035
12135
|
Backdrop.displayName = "Backdrop";
|
|
12036
12136
|
|
|
12037
12137
|
// src/components/Modal/Modal.tsx
|
|
12038
|
-
import { jsx as
|
|
12138
|
+
import { jsx as jsx254, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
12039
12139
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
12040
12140
|
var ModalBody = styled55.div`
|
|
12041
12141
|
flex-direction: column;
|
|
@@ -12043,7 +12143,7 @@ var ModalBody = styled55.div`
|
|
|
12043
12143
|
flex: 1 0 0;
|
|
12044
12144
|
order: 2;
|
|
12045
12145
|
`;
|
|
12046
|
-
var Modal =
|
|
12146
|
+
var Modal = forwardRef22(
|
|
12047
12147
|
({
|
|
12048
12148
|
children,
|
|
12049
12149
|
fullHeight = false,
|
|
@@ -12058,7 +12158,7 @@ var Modal = forwardRef20(
|
|
|
12058
12158
|
alignVertical = "center",
|
|
12059
12159
|
...props
|
|
12060
12160
|
}, ref) => {
|
|
12061
|
-
return /* @__PURE__ */
|
|
12161
|
+
return /* @__PURE__ */ jsx254(
|
|
12062
12162
|
DialogRoot,
|
|
12063
12163
|
{
|
|
12064
12164
|
onOpenChange: (open2) => {
|
|
@@ -12067,9 +12167,9 @@ var Modal = forwardRef20(
|
|
|
12067
12167
|
}
|
|
12068
12168
|
},
|
|
12069
12169
|
open: isOpen,
|
|
12070
|
-
children: /* @__PURE__ */
|
|
12071
|
-
/* @__PURE__ */
|
|
12072
|
-
/* @__PURE__ */
|
|
12170
|
+
children: /* @__PURE__ */ jsxs36(DialogPortal, { children: [
|
|
12171
|
+
/* @__PURE__ */ jsx254(Backdrop, {}),
|
|
12172
|
+
/* @__PURE__ */ jsxs36(
|
|
12073
12173
|
ModalContent,
|
|
12074
12174
|
{
|
|
12075
12175
|
ref,
|
|
@@ -12087,8 +12187,8 @@ var Modal = forwardRef20(
|
|
|
12087
12187
|
width,
|
|
12088
12188
|
...props,
|
|
12089
12189
|
children: [
|
|
12090
|
-
/* @__PURE__ */
|
|
12091
|
-
/* @__PURE__ */
|
|
12190
|
+
/* @__PURE__ */ jsx254(ModalBody, { children }),
|
|
12191
|
+
/* @__PURE__ */ jsx254(
|
|
12092
12192
|
ModalHeader,
|
|
12093
12193
|
{
|
|
12094
12194
|
hideCloseButton,
|
|
@@ -12119,7 +12219,7 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
12119
12219
|
// src/components/Popover/PopoverArrow.tsx
|
|
12120
12220
|
import { PopoverArrow as RadixPopoverArrow } from "@radix-ui/react-popover";
|
|
12121
12221
|
import styled56, { css as css34, keyframes as keyframes4 } from "styled-components";
|
|
12122
|
-
import { jsx as
|
|
12222
|
+
import { jsx as jsx255, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12123
12223
|
var StyledPath = styled56.path`
|
|
12124
12224
|
fill: var(--wui-color-border-secondary);
|
|
12125
12225
|
`;
|
|
@@ -12158,7 +12258,7 @@ var StyledCircle = styled56.circle`
|
|
|
12158
12258
|
}
|
|
12159
12259
|
`;
|
|
12160
12260
|
var PopoverArrow = ({ isAnimated }) => {
|
|
12161
|
-
return /* @__PURE__ */
|
|
12261
|
+
return /* @__PURE__ */ jsx255(RadixPopoverArrow, { asChild: true, children: /* @__PURE__ */ jsxs37(
|
|
12162
12262
|
"svg",
|
|
12163
12263
|
{
|
|
12164
12264
|
fill: "none",
|
|
@@ -12167,8 +12267,8 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12167
12267
|
width: "48",
|
|
12168
12268
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12169
12269
|
children: [
|
|
12170
|
-
/* @__PURE__ */
|
|
12171
|
-
/* @__PURE__ */
|
|
12270
|
+
/* @__PURE__ */ jsx255(StyledPath, { d: "M24 26.6667C21.0545 26.6667 18.6667 29.0545 18.6667 32C18.6667 34.9455 21.0545 37.3333 24 37.3333C26.9455 37.3333 29.3333 34.9455 29.3333 32C29.3333 29.0545 26.9455 26.6667 24 26.6667ZM23 0V32H25V0H23Z" }),
|
|
12271
|
+
/* @__PURE__ */ jsx255(
|
|
12172
12272
|
StyledCircle,
|
|
12173
12273
|
{
|
|
12174
12274
|
$isAnimated: isAnimated,
|
|
@@ -12179,7 +12279,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12179
12279
|
strokeWidth: "4"
|
|
12180
12280
|
}
|
|
12181
12281
|
),
|
|
12182
|
-
/* @__PURE__ */
|
|
12282
|
+
/* @__PURE__ */ jsx255(
|
|
12183
12283
|
StyledCircle,
|
|
12184
12284
|
{
|
|
12185
12285
|
$isAnimated: isAnimated,
|
|
@@ -12197,7 +12297,7 @@ var PopoverArrow = ({ isAnimated }) => {
|
|
|
12197
12297
|
PopoverArrow.displayName = "PopoverArrow";
|
|
12198
12298
|
|
|
12199
12299
|
// src/components/Popover/Popover.tsx
|
|
12200
|
-
import { jsx as
|
|
12300
|
+
import { jsx as jsx256, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12201
12301
|
var StyledContent2 = styled57(Content2)`
|
|
12202
12302
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12203
12303
|
${({ $unstyled }) => !$unstyled && css35`
|
|
@@ -12236,9 +12336,9 @@ var Popover2 = ({
|
|
|
12236
12336
|
"--wui-popover-max-width": maxWidth,
|
|
12237
12337
|
"--wui-popover-max-height": maxHeight
|
|
12238
12338
|
};
|
|
12239
|
-
return /* @__PURE__ */
|
|
12240
|
-
/* @__PURE__ */
|
|
12241
|
-
/* @__PURE__ */
|
|
12339
|
+
return /* @__PURE__ */ jsxs38(Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
12340
|
+
/* @__PURE__ */ jsx256(Trigger2, { asChild: true, children: trigger }),
|
|
12341
|
+
/* @__PURE__ */ jsx256(Portal, { children: /* @__PURE__ */ jsxs38(
|
|
12242
12342
|
StyledContent2,
|
|
12243
12343
|
{
|
|
12244
12344
|
$colorScheme: colorScheme,
|
|
@@ -12247,17 +12347,17 @@ var Popover2 = ({
|
|
|
12247
12347
|
$unstyled: unstyled,
|
|
12248
12348
|
style,
|
|
12249
12349
|
children: [
|
|
12250
|
-
!hideCloseButton && /* @__PURE__ */
|
|
12350
|
+
!hideCloseButton && /* @__PURE__ */ jsx256(Close, { asChild: true, children: /* @__PURE__ */ jsx256(
|
|
12251
12351
|
IconButton,
|
|
12252
12352
|
{
|
|
12253
12353
|
"data-wui-popover-close": true,
|
|
12254
12354
|
label: "Close",
|
|
12255
12355
|
variant: "ghost",
|
|
12256
|
-
children: /* @__PURE__ */
|
|
12356
|
+
children: /* @__PURE__ */ jsx256(Icon, { type: "close" })
|
|
12257
12357
|
}
|
|
12258
12358
|
) }),
|
|
12259
|
-
withArrow ? /* @__PURE__ */
|
|
12260
|
-
/* @__PURE__ */
|
|
12359
|
+
withArrow ? /* @__PURE__ */ jsx256(PopoverArrow, { isAnimated }) : null,
|
|
12360
|
+
/* @__PURE__ */ jsx256("div", { children })
|
|
12261
12361
|
]
|
|
12262
12362
|
}
|
|
12263
12363
|
) })
|
|
@@ -12269,7 +12369,7 @@ Popover2.displayName = "Popover";
|
|
|
12269
12369
|
import styled58 from "styled-components";
|
|
12270
12370
|
import { Root as ProgressRoot, Indicator as ProgressIndicator } from "@radix-ui/react-progress";
|
|
12271
12371
|
import { isNotNil as isNotNil30 } from "@wistia/type-guards";
|
|
12272
|
-
import { jsx as
|
|
12372
|
+
import { jsx as jsx257, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
12273
12373
|
var ProgressBarWrapper = styled58.div`
|
|
12274
12374
|
--progress-bar-height: 8px;
|
|
12275
12375
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
@@ -12322,15 +12422,15 @@ var ProgressBar = ({
|
|
|
12322
12422
|
labelRight,
|
|
12323
12423
|
...props
|
|
12324
12424
|
}) => {
|
|
12325
|
-
return /* @__PURE__ */
|
|
12326
|
-
isNotNil30(labelLeft) ? /* @__PURE__ */
|
|
12327
|
-
/* @__PURE__ */
|
|
12425
|
+
return /* @__PURE__ */ jsxs39(ProgressBarWrapper, { children: [
|
|
12426
|
+
isNotNil30(labelLeft) ? /* @__PURE__ */ jsx257(ProgressBarLabel, { children: labelLeft }) : null,
|
|
12427
|
+
/* @__PURE__ */ jsx257(
|
|
12328
12428
|
StyledProgressBar,
|
|
12329
12429
|
{
|
|
12330
12430
|
max,
|
|
12331
12431
|
value: progress,
|
|
12332
12432
|
...props,
|
|
12333
|
-
children: /* @__PURE__ */
|
|
12433
|
+
children: /* @__PURE__ */ jsx257(
|
|
12334
12434
|
StyledProgressIndicator,
|
|
12335
12435
|
{
|
|
12336
12436
|
$max: max,
|
|
@@ -12339,17 +12439,17 @@ var ProgressBar = ({
|
|
|
12339
12439
|
)
|
|
12340
12440
|
}
|
|
12341
12441
|
),
|
|
12342
|
-
isNotNil30(labelRight) ? /* @__PURE__ */
|
|
12442
|
+
isNotNil30(labelRight) ? /* @__PURE__ */ jsx257(ProgressBarLabel, { children: labelRight }) : null
|
|
12343
12443
|
] });
|
|
12344
12444
|
};
|
|
12345
12445
|
ProgressBar.displayName = "ProgressBar";
|
|
12346
12446
|
|
|
12347
12447
|
// src/components/Radio/Radio.tsx
|
|
12348
|
-
import { forwardRef as
|
|
12448
|
+
import { forwardRef as forwardRef23, useId as useId3 } from "react";
|
|
12349
12449
|
import styled59, { css as css36 } from "styled-components";
|
|
12350
12450
|
import { isNonEmptyString as isNonEmptyString4, isNotUndefined as isNotUndefined13 } from "@wistia/type-guards";
|
|
12351
|
-
import { jsx as
|
|
12352
|
-
var RadioIcon = () => /* @__PURE__ */
|
|
12451
|
+
import { jsx as jsx258, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
12452
|
+
var RadioIcon = () => /* @__PURE__ */ jsx258(
|
|
12353
12453
|
"svg",
|
|
12354
12454
|
{
|
|
12355
12455
|
fill: "inherit",
|
|
@@ -12357,7 +12457,7 @@ var RadioIcon = () => /* @__PURE__ */ jsx257(
|
|
|
12357
12457
|
viewBox: "0 0 1 1",
|
|
12358
12458
|
width: "1",
|
|
12359
12459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12360
|
-
children: /* @__PURE__ */
|
|
12460
|
+
children: /* @__PURE__ */ jsx258(
|
|
12361
12461
|
"circle",
|
|
12362
12462
|
{
|
|
12363
12463
|
cx: "0.5",
|
|
@@ -12448,7 +12548,7 @@ var StyledHiddenRadioInput = styled59.input`
|
|
|
12448
12548
|
display: block;
|
|
12449
12549
|
}
|
|
12450
12550
|
`;
|
|
12451
|
-
var Radio =
|
|
12551
|
+
var Radio = forwardRef23(
|
|
12452
12552
|
({
|
|
12453
12553
|
checked,
|
|
12454
12554
|
disabled = false,
|
|
@@ -12472,13 +12572,13 @@ var Radio = forwardRef21(
|
|
|
12472
12572
|
const radioName = name ?? contextName;
|
|
12473
12573
|
const handleOnChange = onChange ?? contextOnChange;
|
|
12474
12574
|
const defaultChecked = isNotUndefined13(value) && isNotUndefined13(contextValue) ? contextValue.includes(value) : void 0;
|
|
12475
|
-
return /* @__PURE__ */
|
|
12575
|
+
return /* @__PURE__ */ jsxs40(
|
|
12476
12576
|
StyledRadioWrapper,
|
|
12477
12577
|
{
|
|
12478
12578
|
$disabled: disabled,
|
|
12479
12579
|
"aria-invalid": props["aria-invalid"],
|
|
12480
12580
|
children: [
|
|
12481
|
-
/* @__PURE__ */
|
|
12581
|
+
/* @__PURE__ */ jsx258(
|
|
12482
12582
|
StyledHiddenRadioInput,
|
|
12483
12583
|
{
|
|
12484
12584
|
...props,
|
|
@@ -12493,16 +12593,16 @@ var Radio = forwardRef21(
|
|
|
12493
12593
|
...isNotUndefined13(defaultChecked) ? { defaultChecked } : { checked }
|
|
12494
12594
|
}
|
|
12495
12595
|
),
|
|
12496
|
-
/* @__PURE__ */
|
|
12596
|
+
/* @__PURE__ */ jsx258(
|
|
12497
12597
|
FormControlLabel,
|
|
12498
12598
|
{
|
|
12499
|
-
controlSlot: /* @__PURE__ */
|
|
12599
|
+
controlSlot: /* @__PURE__ */ jsx258(
|
|
12500
12600
|
StyledRadioInput,
|
|
12501
12601
|
{
|
|
12502
12602
|
$disabled: disabled,
|
|
12503
12603
|
$size: size,
|
|
12504
12604
|
"data-wui-faux-input": "true",
|
|
12505
|
-
children: /* @__PURE__ */
|
|
12605
|
+
children: /* @__PURE__ */ jsx258(RadioIcon, {})
|
|
12506
12606
|
}
|
|
12507
12607
|
),
|
|
12508
12608
|
description,
|
|
@@ -12520,14 +12620,14 @@ var Radio = forwardRef21(
|
|
|
12520
12620
|
Radio.displayName = "Radio";
|
|
12521
12621
|
|
|
12522
12622
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
12523
|
-
import { forwardRef as
|
|
12623
|
+
import { forwardRef as forwardRef24 } from "react";
|
|
12524
12624
|
import styled61, { css as css38 } from "styled-components";
|
|
12525
12625
|
import { Root as ToggleGroupRoot } from "@radix-ui/react-toggle-group";
|
|
12526
12626
|
import { isNil as isNil16 } from "@wistia/type-guards";
|
|
12527
12627
|
|
|
12528
12628
|
// src/components/SegmentedControl/useSelectedItemStyle.tsx
|
|
12529
12629
|
import { createContext as createContext7, useContext as useContext8, useMemo as useMemo11, useState as useState17 } from "react";
|
|
12530
|
-
import { jsx as
|
|
12630
|
+
import { jsx as jsx259 } from "react/jsx-runtime";
|
|
12531
12631
|
var SelectedItemStyleContext = createContext7(null);
|
|
12532
12632
|
var SelectedItemStyleProvider = ({
|
|
12533
12633
|
children
|
|
@@ -12548,7 +12648,7 @@ var SelectedItemStyleProvider = ({
|
|
|
12548
12648
|
}),
|
|
12549
12649
|
[selectedItemIndicatorStyle]
|
|
12550
12650
|
);
|
|
12551
|
-
return /* @__PURE__ */
|
|
12651
|
+
return /* @__PURE__ */ jsx259(SelectedItemStyleContext.Provider, { value: contextValue, children });
|
|
12552
12652
|
};
|
|
12553
12653
|
var useSelectedItemStyle = () => {
|
|
12554
12654
|
const context = useContext8(SelectedItemStyleContext);
|
|
@@ -12575,7 +12675,7 @@ var useSegmentedControlValue = () => {
|
|
|
12575
12675
|
};
|
|
12576
12676
|
|
|
12577
12677
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
12578
|
-
import { jsx as
|
|
12678
|
+
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
12579
12679
|
var selectedItemIndicatorStyles = css37`
|
|
12580
12680
|
background-color: var(--wui-color-bg-fill-white);
|
|
12581
12681
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -12597,7 +12697,7 @@ var SelectedItemIndicator = () => {
|
|
|
12597
12697
|
if (!selectedValue || isUndefined5(selectedItemIndicatorStyle)) {
|
|
12598
12698
|
return null;
|
|
12599
12699
|
}
|
|
12600
|
-
return /* @__PURE__ */
|
|
12700
|
+
return /* @__PURE__ */ jsx260(
|
|
12601
12701
|
SelectedItemIndicatorDiv,
|
|
12602
12702
|
{
|
|
12603
12703
|
"data-wui-selected-item-indicator": true,
|
|
@@ -12607,7 +12707,7 @@ var SelectedItemIndicator = () => {
|
|
|
12607
12707
|
};
|
|
12608
12708
|
|
|
12609
12709
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
12610
|
-
import { jsx as
|
|
12710
|
+
import { jsx as jsx261, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
12611
12711
|
var segmentedControlStyles = css38`
|
|
12612
12712
|
display: inline-flex;
|
|
12613
12713
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -12622,7 +12722,7 @@ var segmentedControlStyles = css38`
|
|
|
12622
12722
|
var StyledSegmentedControl = styled61(ToggleGroupRoot)`
|
|
12623
12723
|
${segmentedControlStyles}
|
|
12624
12724
|
`;
|
|
12625
|
-
var SegmentedControl =
|
|
12725
|
+
var SegmentedControl = forwardRef24(
|
|
12626
12726
|
({
|
|
12627
12727
|
children,
|
|
12628
12728
|
disabled = false,
|
|
@@ -12634,7 +12734,7 @@ var SegmentedControl = forwardRef22(
|
|
|
12634
12734
|
if (isNil16(children)) {
|
|
12635
12735
|
return null;
|
|
12636
12736
|
}
|
|
12637
|
-
return /* @__PURE__ */
|
|
12737
|
+
return /* @__PURE__ */ jsx261(
|
|
12638
12738
|
StyledSegmentedControl,
|
|
12639
12739
|
{
|
|
12640
12740
|
ref,
|
|
@@ -12646,9 +12746,9 @@ var SegmentedControl = forwardRef22(
|
|
|
12646
12746
|
type: "single",
|
|
12647
12747
|
value: selectedValue,
|
|
12648
12748
|
...props,
|
|
12649
|
-
children: /* @__PURE__ */
|
|
12749
|
+
children: /* @__PURE__ */ jsx261(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ jsxs41(SelectedItemStyleProvider, { children: [
|
|
12650
12750
|
children,
|
|
12651
|
-
/* @__PURE__ */
|
|
12751
|
+
/* @__PURE__ */ jsx261(SelectedItemIndicator, {})
|
|
12652
12752
|
] }) })
|
|
12653
12753
|
}
|
|
12654
12754
|
);
|
|
@@ -12657,11 +12757,11 @@ var SegmentedControl = forwardRef22(
|
|
|
12657
12757
|
SegmentedControl.displayName = "SegmentedControl";
|
|
12658
12758
|
|
|
12659
12759
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
12660
|
-
import { forwardRef as
|
|
12760
|
+
import { forwardRef as forwardRef25, useEffect as useEffect13, useRef as useRef15 } from "react";
|
|
12661
12761
|
import styled62, { css as css39 } from "styled-components";
|
|
12662
12762
|
import { Item as ToggleGroupItem } from "@radix-ui/react-toggle-group";
|
|
12663
12763
|
import { isNotNil as isNotNil31 } from "@wistia/type-guards";
|
|
12664
|
-
import { jsxs as
|
|
12764
|
+
import { jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12665
12765
|
var segmentedControlItemStyles = css39`
|
|
12666
12766
|
all: unset; /* ToggleGroupItem is a button element */
|
|
12667
12767
|
align-items: center;
|
|
@@ -12732,7 +12832,7 @@ var segmentedControlItemStyles = css39`
|
|
|
12732
12832
|
var StyledSegmentedControlItem = styled62(ToggleGroupItem)`
|
|
12733
12833
|
${segmentedControlItemStyles}
|
|
12734
12834
|
`;
|
|
12735
|
-
var SegmentedControlItem =
|
|
12835
|
+
var SegmentedControlItem = forwardRef25(
|
|
12736
12836
|
({ disabled, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
12737
12837
|
const selectedValue = useSegmentedControlValue();
|
|
12738
12838
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
@@ -12770,7 +12870,7 @@ var SegmentedControlItem = forwardRef23(
|
|
|
12770
12870
|
resizeObserver.disconnect();
|
|
12771
12871
|
};
|
|
12772
12872
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
12773
|
-
return /* @__PURE__ */
|
|
12873
|
+
return /* @__PURE__ */ jsxs42(
|
|
12774
12874
|
StyledSegmentedControlItem,
|
|
12775
12875
|
{
|
|
12776
12876
|
ref: combinedRef,
|
|
@@ -12801,9 +12901,9 @@ import {
|
|
|
12801
12901
|
Value,
|
|
12802
12902
|
ScrollDownButton
|
|
12803
12903
|
} from "@radix-ui/react-select";
|
|
12804
|
-
import { forwardRef as
|
|
12904
|
+
import { forwardRef as forwardRef26 } from "react";
|
|
12805
12905
|
import styled63 from "styled-components";
|
|
12806
|
-
import { jsx as
|
|
12906
|
+
import { jsx as jsx262, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12807
12907
|
var StyledTrigger2 = styled63(Trigger3)`
|
|
12808
12908
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12809
12909
|
${inputCss};
|
|
@@ -12866,7 +12966,7 @@ var StyledContent3 = styled63(Content3)`
|
|
|
12866
12966
|
max-height: var(--radix-select-content-available-height);
|
|
12867
12967
|
z-index: var(--wui-zindex-select);
|
|
12868
12968
|
`;
|
|
12869
|
-
var Select =
|
|
12969
|
+
var Select = forwardRef26(
|
|
12870
12970
|
({
|
|
12871
12971
|
colorScheme = "inherit",
|
|
12872
12972
|
children,
|
|
@@ -12876,13 +12976,13 @@ var Select = forwardRef24(
|
|
|
12876
12976
|
...props
|
|
12877
12977
|
}, forwardedRef) => {
|
|
12878
12978
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
12879
|
-
return /* @__PURE__ */
|
|
12979
|
+
return /* @__PURE__ */ jsxs43(
|
|
12880
12980
|
Root2,
|
|
12881
12981
|
{
|
|
12882
12982
|
...props,
|
|
12883
12983
|
onValueChange: onChange,
|
|
12884
12984
|
children: [
|
|
12885
|
-
/* @__PURE__ */
|
|
12985
|
+
/* @__PURE__ */ jsxs43(
|
|
12886
12986
|
StyledTrigger2,
|
|
12887
12987
|
{
|
|
12888
12988
|
ref: forwardedRef,
|
|
@@ -12890,8 +12990,8 @@ var Select = forwardRef24(
|
|
|
12890
12990
|
$fullWidth: responsiveFullWidth,
|
|
12891
12991
|
...props,
|
|
12892
12992
|
children: [
|
|
12893
|
-
/* @__PURE__ */
|
|
12894
|
-
/* @__PURE__ */
|
|
12993
|
+
/* @__PURE__ */ jsx262(Value, { placeholder }),
|
|
12994
|
+
/* @__PURE__ */ jsx262(
|
|
12895
12995
|
Icon,
|
|
12896
12996
|
{
|
|
12897
12997
|
size: "md",
|
|
@@ -12901,10 +13001,10 @@ var Select = forwardRef24(
|
|
|
12901
13001
|
]
|
|
12902
13002
|
}
|
|
12903
13003
|
),
|
|
12904
|
-
/* @__PURE__ */
|
|
12905
|
-
/* @__PURE__ */
|
|
12906
|
-
/* @__PURE__ */
|
|
12907
|
-
/* @__PURE__ */
|
|
13004
|
+
/* @__PURE__ */ jsx262(Portal2, { children: /* @__PURE__ */ jsxs43(StyledContent3, { position: "popper", children: [
|
|
13005
|
+
/* @__PURE__ */ jsx262(ScrollUpButton, { children: /* @__PURE__ */ jsx262(Icon, { type: "caret-up" }) }),
|
|
13006
|
+
/* @__PURE__ */ jsx262(Viewport, { children }),
|
|
13007
|
+
/* @__PURE__ */ jsx262(ScrollDownButton, { children: /* @__PURE__ */ jsx262(Icon, { type: "caret-down" }) })
|
|
12908
13008
|
] }) })
|
|
12909
13009
|
]
|
|
12910
13010
|
}
|
|
@@ -12915,10 +13015,10 @@ Select.displayName = "Select";
|
|
|
12915
13015
|
|
|
12916
13016
|
// src/components/Select/SelectOption.tsx
|
|
12917
13017
|
import { Item, ItemText, ItemIndicator } from "@radix-ui/react-select";
|
|
12918
|
-
import { forwardRef as
|
|
13018
|
+
import { forwardRef as forwardRef27 } from "react";
|
|
12919
13019
|
import styled64 from "styled-components";
|
|
12920
13020
|
import { isNotNil as isNotNil32 } from "@wistia/type-guards";
|
|
12921
|
-
import { jsx as
|
|
13021
|
+
import { jsx as jsx263, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12922
13022
|
var StyledItem = styled64(Item)`
|
|
12923
13023
|
${variantStyleMap2.body3};
|
|
12924
13024
|
display: flex;
|
|
@@ -12946,25 +13046,25 @@ var StyledItem = styled64(Item)`
|
|
|
12946
13046
|
var StyledIconContainer = styled64.span`
|
|
12947
13047
|
width: 12px;
|
|
12948
13048
|
`;
|
|
12949
|
-
var SelectOption =
|
|
13049
|
+
var SelectOption = forwardRef27(
|
|
12950
13050
|
({ children, selectedDisplayValue, ...props }, forwardedRef) => {
|
|
12951
|
-
return /* @__PURE__ */
|
|
13051
|
+
return /* @__PURE__ */ jsxs44(
|
|
12952
13052
|
StyledItem,
|
|
12953
13053
|
{
|
|
12954
13054
|
...props,
|
|
12955
13055
|
ref: forwardedRef,
|
|
12956
13056
|
children: [
|
|
12957
|
-
/* @__PURE__ */
|
|
13057
|
+
/* @__PURE__ */ jsx263(StyledIconContainer, { "data-indicator": true, children: /* @__PURE__ */ jsx263(ItemIndicator, { children: /* @__PURE__ */ jsx263(
|
|
12958
13058
|
Icon,
|
|
12959
13059
|
{
|
|
12960
13060
|
size: "sm",
|
|
12961
13061
|
type: "checkmark"
|
|
12962
13062
|
}
|
|
12963
13063
|
) }) }),
|
|
12964
|
-
isNotNil32(selectedDisplayValue) ? /* @__PURE__ */
|
|
13064
|
+
isNotNil32(selectedDisplayValue) ? /* @__PURE__ */ jsxs44("div", { children: [
|
|
12965
13065
|
children,
|
|
12966
|
-
/* @__PURE__ */
|
|
12967
|
-
] }) : /* @__PURE__ */
|
|
13066
|
+
/* @__PURE__ */ jsx263("div", { style: { display: "none" }, children: /* @__PURE__ */ jsx263(ItemText, { children: selectedDisplayValue }) })
|
|
13067
|
+
] }) : /* @__PURE__ */ jsx263(ItemText, { children })
|
|
12968
13068
|
]
|
|
12969
13069
|
}
|
|
12970
13070
|
);
|
|
@@ -12975,13 +13075,13 @@ SelectOption.displayName = "SelectOption";
|
|
|
12975
13075
|
// src/components/Select/SelectOptionGroup.tsx
|
|
12976
13076
|
import { Group, Label as Label3 } from "@radix-ui/react-select";
|
|
12977
13077
|
import styled65 from "styled-components";
|
|
12978
|
-
import { jsx as
|
|
13078
|
+
import { jsx as jsx264, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12979
13079
|
var StyledLabel4 = styled65(Label3)`
|
|
12980
13080
|
padding: var(--wui-select-option-padding);
|
|
12981
13081
|
`;
|
|
12982
13082
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
12983
|
-
return /* @__PURE__ */
|
|
12984
|
-
/* @__PURE__ */
|
|
13083
|
+
return /* @__PURE__ */ jsxs45(Group, { ...props, children: [
|
|
13084
|
+
/* @__PURE__ */ jsx264(StyledLabel4, { children: /* @__PURE__ */ jsx264(
|
|
12985
13085
|
Text,
|
|
12986
13086
|
{
|
|
12987
13087
|
prominence: "secondary",
|
|
@@ -13002,7 +13102,7 @@ import {
|
|
|
13002
13102
|
} from "@radix-ui/react-slider";
|
|
13003
13103
|
import styled66 from "styled-components";
|
|
13004
13104
|
import { isNonEmptyString as isNonEmptyString5 } from "@wistia/type-guards";
|
|
13005
|
-
import { jsx as
|
|
13105
|
+
import { jsx as jsx265, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
13006
13106
|
var SliderContainer = styled66.div`
|
|
13007
13107
|
--wui-slider-track-color: var(--wui-gray-6);
|
|
13008
13108
|
--wui-slider-track-border-radius: var(--wui-border-radius-rounded);
|
|
@@ -13091,12 +13191,12 @@ var Slider = ({
|
|
|
13091
13191
|
onChange(newValue);
|
|
13092
13192
|
}
|
|
13093
13193
|
};
|
|
13094
|
-
return /* @__PURE__ */
|
|
13194
|
+
return /* @__PURE__ */ jsx265(
|
|
13095
13195
|
SliderContainer,
|
|
13096
13196
|
{
|
|
13097
13197
|
...otherProps,
|
|
13098
13198
|
"data-testid": dataTestId,
|
|
13099
|
-
children: /* @__PURE__ */
|
|
13199
|
+
children: /* @__PURE__ */ jsxs46(
|
|
13100
13200
|
StyledSliderRoot,
|
|
13101
13201
|
{
|
|
13102
13202
|
"aria-label": ariaLabel,
|
|
@@ -13109,8 +13209,8 @@ var Slider = ({
|
|
|
13109
13209
|
step,
|
|
13110
13210
|
...value ? { value } : {},
|
|
13111
13211
|
children: [
|
|
13112
|
-
/* @__PURE__ */
|
|
13113
|
-
values.map((_, index) => /* @__PURE__ */
|
|
13212
|
+
/* @__PURE__ */ jsx265(StyledSliderTrack, { "data-testid": `${dataTestId}-track`, children: /* @__PURE__ */ jsx265(StyledSliderRange, { "data-testid": `${dataTestId}-range` }) }),
|
|
13213
|
+
values.map((_, index) => /* @__PURE__ */ jsx265(
|
|
13114
13214
|
StyledSliderThumb,
|
|
13115
13215
|
{
|
|
13116
13216
|
"data-testid": `${dataTestId}-thumb-${index}`
|
|
@@ -13126,10 +13226,10 @@ var Slider = ({
|
|
|
13126
13226
|
Slider.displayName = "Slider";
|
|
13127
13227
|
|
|
13128
13228
|
// src/components/Switch/Switch.tsx
|
|
13129
|
-
import { forwardRef as
|
|
13229
|
+
import { forwardRef as forwardRef28, useId as useId4 } from "react";
|
|
13130
13230
|
import styled67, { css as css40 } from "styled-components";
|
|
13131
13231
|
import { isNonEmptyString as isNonEmptyString6 } from "@wistia/type-guards";
|
|
13132
|
-
import { jsx as
|
|
13232
|
+
import { jsx as jsx266, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
13133
13233
|
var sizeSmall3 = css40`
|
|
13134
13234
|
--wui-size-small-width: 24px;
|
|
13135
13235
|
--wui-size-small-height: 14px;
|
|
@@ -13231,7 +13331,7 @@ var StyledHiddenSwitchInput = styled67.input`
|
|
|
13231
13331
|
}
|
|
13232
13332
|
}
|
|
13233
13333
|
`;
|
|
13234
|
-
var Switch =
|
|
13334
|
+
var Switch = forwardRef28(
|
|
13235
13335
|
({
|
|
13236
13336
|
checked,
|
|
13237
13337
|
disabled = false,
|
|
@@ -13248,8 +13348,8 @@ var Switch = forwardRef26(
|
|
|
13248
13348
|
}, ref) => {
|
|
13249
13349
|
const generatedId = useId4();
|
|
13250
13350
|
const computedId = isNonEmptyString6(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
13251
|
-
return /* @__PURE__ */
|
|
13252
|
-
/* @__PURE__ */
|
|
13351
|
+
return /* @__PURE__ */ jsxs47(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
13352
|
+
/* @__PURE__ */ jsx266(
|
|
13253
13353
|
StyledHiddenSwitchInput,
|
|
13254
13354
|
{
|
|
13255
13355
|
...props,
|
|
@@ -13264,10 +13364,10 @@ var Switch = forwardRef26(
|
|
|
13264
13364
|
value
|
|
13265
13365
|
}
|
|
13266
13366
|
),
|
|
13267
|
-
/* @__PURE__ */
|
|
13367
|
+
/* @__PURE__ */ jsx266(
|
|
13268
13368
|
FormControlLabel,
|
|
13269
13369
|
{
|
|
13270
|
-
controlSlot: /* @__PURE__ */
|
|
13370
|
+
controlSlot: /* @__PURE__ */ jsx266(
|
|
13271
13371
|
StyledSwitchInput,
|
|
13272
13372
|
{
|
|
13273
13373
|
$disabled: disabled,
|
|
@@ -13290,7 +13390,7 @@ Switch.displayName = "Switch";
|
|
|
13290
13390
|
|
|
13291
13391
|
// src/components/Table/Table.tsx
|
|
13292
13392
|
import styled68, { css as css41 } from "styled-components";
|
|
13293
|
-
import { jsx as
|
|
13393
|
+
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
13294
13394
|
var StyledTable = styled68.table`
|
|
13295
13395
|
width: 100%;
|
|
13296
13396
|
border-collapse: collapse;
|
|
@@ -13320,7 +13420,7 @@ var Table = ({
|
|
|
13320
13420
|
visuallyHiddenHeader = false,
|
|
13321
13421
|
...props
|
|
13322
13422
|
}) => {
|
|
13323
|
-
return /* @__PURE__ */
|
|
13423
|
+
return /* @__PURE__ */ jsx267(
|
|
13324
13424
|
StyledTable,
|
|
13325
13425
|
{
|
|
13326
13426
|
$divided: divided,
|
|
@@ -13340,16 +13440,16 @@ import { createContext as createContext9 } from "react";
|
|
|
13340
13440
|
var TableSectionContext = createContext9(null);
|
|
13341
13441
|
|
|
13342
13442
|
// src/components/Table/TableBody.tsx
|
|
13343
|
-
import { jsx as
|
|
13443
|
+
import { jsx as jsx268 } from "react/jsx-runtime";
|
|
13344
13444
|
var StyledTableBody = styled69.tbody``;
|
|
13345
13445
|
var TableBody = ({ children, ...props }) => {
|
|
13346
|
-
return /* @__PURE__ */
|
|
13446
|
+
return /* @__PURE__ */ jsx268(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx268(StyledTableBody, { ...props, children }) });
|
|
13347
13447
|
};
|
|
13348
13448
|
|
|
13349
13449
|
// src/components/Table/TableCell.tsx
|
|
13350
13450
|
import { useContext as useContext10 } from "react";
|
|
13351
13451
|
import styled70, { css as css42 } from "styled-components";
|
|
13352
|
-
import { jsx as
|
|
13452
|
+
import { jsx as jsx269 } from "react/jsx-runtime";
|
|
13353
13453
|
var sharedStyles = css42`
|
|
13354
13454
|
color: var(--wui-color-text);
|
|
13355
13455
|
padding: var(--wui-space-02);
|
|
@@ -13370,33 +13470,33 @@ var StyledTd = styled70.td`
|
|
|
13370
13470
|
var TableCell = ({ children, ...props }) => {
|
|
13371
13471
|
const section = useContext10(TableSectionContext);
|
|
13372
13472
|
if (section === "head") {
|
|
13373
|
-
return /* @__PURE__ */
|
|
13473
|
+
return /* @__PURE__ */ jsx269(StyledTh, { ...props, children });
|
|
13374
13474
|
}
|
|
13375
|
-
return /* @__PURE__ */
|
|
13475
|
+
return /* @__PURE__ */ jsx269(StyledTd, { ...props, children });
|
|
13376
13476
|
};
|
|
13377
13477
|
|
|
13378
13478
|
// src/components/Table/TableFoot.tsx
|
|
13379
13479
|
import styled71 from "styled-components";
|
|
13380
|
-
import { jsx as
|
|
13480
|
+
import { jsx as jsx270 } from "react/jsx-runtime";
|
|
13381
13481
|
var StyledTableFoot = styled71.tfoot``;
|
|
13382
13482
|
var TableFoot = ({ children, ...props }) => {
|
|
13383
|
-
return /* @__PURE__ */
|
|
13483
|
+
return /* @__PURE__ */ jsx270(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx270(StyledTableFoot, { ...props, children }) });
|
|
13384
13484
|
};
|
|
13385
13485
|
|
|
13386
13486
|
// src/components/Table/TableHead.tsx
|
|
13387
13487
|
import styled72 from "styled-components";
|
|
13388
|
-
import { jsx as
|
|
13488
|
+
import { jsx as jsx271 } from "react/jsx-runtime";
|
|
13389
13489
|
var StyledThead = styled72.thead``;
|
|
13390
13490
|
var TableHead = ({ children, ...props }) => {
|
|
13391
|
-
return /* @__PURE__ */
|
|
13491
|
+
return /* @__PURE__ */ jsx271(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ jsx271(StyledThead, { ...props, children }) });
|
|
13392
13492
|
};
|
|
13393
13493
|
|
|
13394
13494
|
// src/components/Table/TableRow.tsx
|
|
13395
13495
|
import styled73 from "styled-components";
|
|
13396
|
-
import { jsx as
|
|
13496
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
13397
13497
|
var StyledTableRow = styled73.tr``;
|
|
13398
13498
|
var TableRow = ({ children, ...props }) => {
|
|
13399
|
-
return /* @__PURE__ */
|
|
13499
|
+
return /* @__PURE__ */ jsx272(StyledTableRow, { ...props, children });
|
|
13400
13500
|
};
|
|
13401
13501
|
|
|
13402
13502
|
// src/components/Tabs/Tabs.tsx
|
|
@@ -13417,7 +13517,7 @@ var useTabsValue = () => {
|
|
|
13417
13517
|
};
|
|
13418
13518
|
|
|
13419
13519
|
// src/components/Tabs/Tabs.tsx
|
|
13420
|
-
import { jsx as
|
|
13520
|
+
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
13421
13521
|
var Tabs = ({
|
|
13422
13522
|
children,
|
|
13423
13523
|
value: valueProp,
|
|
@@ -13445,15 +13545,15 @@ var Tabs = ({
|
|
|
13445
13545
|
if (isNotNil33(defaultValue)) {
|
|
13446
13546
|
rootProps.defaultValue = defaultValue;
|
|
13447
13547
|
}
|
|
13448
|
-
return /* @__PURE__ */
|
|
13548
|
+
return /* @__PURE__ */ jsx273(RadixTabsRoot, { ...rootProps, children: /* @__PURE__ */ jsx273(TabsValueProvider, { value: value ?? defaultValue, children: /* @__PURE__ */ jsx273(SelectedItemStyleProvider, { children }) }) });
|
|
13449
13549
|
};
|
|
13450
13550
|
Tabs.displayName = "Tabs";
|
|
13451
13551
|
|
|
13452
13552
|
// src/components/Tabs/TabsContent.tsx
|
|
13453
13553
|
import { Content as RadixTabsContent } from "@radix-ui/react-tabs";
|
|
13454
|
-
import { jsx as
|
|
13554
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
13455
13555
|
var TabsContent = ({ children, value }) => {
|
|
13456
|
-
return /* @__PURE__ */
|
|
13556
|
+
return /* @__PURE__ */ jsx274(RadixTabsContent, { value, children });
|
|
13457
13557
|
};
|
|
13458
13558
|
TabsContent.displayName = "TabsContent";
|
|
13459
13559
|
|
|
@@ -13473,14 +13573,14 @@ var TabsSelectedItemIndicatorDiv = styled74(SelectedItemIndicatorDiv)`
|
|
|
13473
13573
|
`;
|
|
13474
13574
|
|
|
13475
13575
|
// src/components/Tabs/SelectedTabIndicator.tsx
|
|
13476
|
-
import { jsx as
|
|
13576
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
13477
13577
|
var SelectedTabIndicator = () => {
|
|
13478
13578
|
const { selectedItemIndicatorStyle } = useSelectedItemStyle();
|
|
13479
13579
|
const selectedValue = useTabsValue();
|
|
13480
13580
|
if (selectedValue == null || isUndefined6(selectedItemIndicatorStyle)) {
|
|
13481
13581
|
return null;
|
|
13482
13582
|
}
|
|
13483
|
-
return /* @__PURE__ */
|
|
13583
|
+
return /* @__PURE__ */ jsx275(
|
|
13484
13584
|
TabsSelectedItemIndicatorDiv,
|
|
13485
13585
|
{
|
|
13486
13586
|
"data-wui-selected-item-indicator": true,
|
|
@@ -13490,19 +13590,19 @@ var SelectedTabIndicator = () => {
|
|
|
13490
13590
|
};
|
|
13491
13591
|
|
|
13492
13592
|
// src/components/Tabs/TabsList.tsx
|
|
13493
|
-
import { jsx as
|
|
13593
|
+
import { jsx as jsx276, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
13494
13594
|
var StyledRadixTabsList = styled75(RadixTabList)`
|
|
13495
13595
|
${segmentedControlStyles}
|
|
13496
13596
|
`;
|
|
13497
13597
|
var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
13498
|
-
return /* @__PURE__ */
|
|
13598
|
+
return /* @__PURE__ */ jsxs48(
|
|
13499
13599
|
StyledRadixTabsList,
|
|
13500
13600
|
{
|
|
13501
13601
|
$fullWidth: fullWidth,
|
|
13502
13602
|
"aria-label": props["aria-label"],
|
|
13503
13603
|
children: [
|
|
13504
13604
|
children,
|
|
13505
|
-
/* @__PURE__ */
|
|
13605
|
+
/* @__PURE__ */ jsx276(SelectedTabIndicator, {})
|
|
13506
13606
|
]
|
|
13507
13607
|
}
|
|
13508
13608
|
);
|
|
@@ -13510,7 +13610,7 @@ var TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
13510
13610
|
TabsList.displayName = "TabsList";
|
|
13511
13611
|
|
|
13512
13612
|
// src/components/Tabs/TabsTrigger.tsx
|
|
13513
|
-
import { forwardRef as
|
|
13613
|
+
import { forwardRef as forwardRef29, useEffect as useEffect14, useRef as useRef16 } from "react";
|
|
13514
13614
|
import { isNotNil as isNotNil34 } from "@wistia/type-guards";
|
|
13515
13615
|
|
|
13516
13616
|
// src/components/Tabs/StyledRadixTabsTrigger.tsx
|
|
@@ -13525,8 +13625,8 @@ var StyledRadixTabsTrigger = styled76(RadixTabsTrigger)`
|
|
|
13525
13625
|
`;
|
|
13526
13626
|
|
|
13527
13627
|
// src/components/Tabs/TabsTrigger.tsx
|
|
13528
|
-
import { jsxs as
|
|
13529
|
-
var TabsTrigger =
|
|
13628
|
+
import { jsxs as jsxs49 } from "react/jsx-runtime";
|
|
13629
|
+
var TabsTrigger = forwardRef29(
|
|
13530
13630
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
13531
13631
|
const selectedValue = useTabsValue();
|
|
13532
13632
|
const { setSelectedItemMeasurements } = useSelectedItemStyle();
|
|
@@ -13557,7 +13657,7 @@ var TabsTrigger = forwardRef27(
|
|
|
13557
13657
|
resizeObserver.disconnect();
|
|
13558
13658
|
};
|
|
13559
13659
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
13560
|
-
return /* @__PURE__ */
|
|
13660
|
+
return /* @__PURE__ */ jsxs49(
|
|
13561
13661
|
StyledRadixTabsTrigger,
|
|
13562
13662
|
{
|
|
13563
13663
|
...otherProps,
|
|
@@ -13579,7 +13679,7 @@ TabsTrigger.displayName = "TabsTrigger";
|
|
|
13579
13679
|
// src/components/Thumbnail/ThumbnailBadge.tsx
|
|
13580
13680
|
import styled77 from "styled-components";
|
|
13581
13681
|
import { isNotNil as isNotNil35 } from "@wistia/type-guards";
|
|
13582
|
-
import { jsx as
|
|
13682
|
+
import { jsx as jsx277, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
13583
13683
|
var StyledThumbnailBadge = styled77.div`
|
|
13584
13684
|
align-items: center;
|
|
13585
13685
|
background-color: rgb(0 0 0 / 50%);
|
|
@@ -13605,15 +13705,15 @@ var StyledThumbnailBadge = styled77.div`
|
|
|
13605
13705
|
}
|
|
13606
13706
|
`;
|
|
13607
13707
|
var ThumbnailBadge = ({ icon, label, ...props }) => {
|
|
13608
|
-
return /* @__PURE__ */
|
|
13708
|
+
return /* @__PURE__ */ jsxs50(StyledThumbnailBadge, { ...props, children: [
|
|
13609
13709
|
isNotNil35(icon) && icon,
|
|
13610
|
-
/* @__PURE__ */
|
|
13710
|
+
/* @__PURE__ */ jsx277("span", { children: label })
|
|
13611
13711
|
] });
|
|
13612
13712
|
};
|
|
13613
13713
|
ThumbnailBadge.displayName = "ThumbnailBadge";
|
|
13614
13714
|
|
|
13615
13715
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
13616
|
-
import { forwardRef as
|
|
13716
|
+
import { forwardRef as forwardRef30, useState as useState19, useRef as useRef17, useCallback as useCallback11, useMemo as useMemo12 } from "react";
|
|
13617
13717
|
import styled79 from "styled-components";
|
|
13618
13718
|
import { isNil as isNil17, isNotNil as isNotNil38, isUndefined as isUndefined7, isEmptyString as isEmptyString2, isString as isString2 } from "@wistia/type-guards";
|
|
13619
13719
|
|
|
@@ -13752,7 +13852,7 @@ var getBackgroundGradient = (gradientName = void 0) => {
|
|
|
13752
13852
|
// src/components/Thumbnail/ThumbnailStoryboardViewer.tsx
|
|
13753
13853
|
import styled78 from "styled-components";
|
|
13754
13854
|
import { isNotNil as isNotNil37 } from "@wistia/type-guards";
|
|
13755
|
-
import { jsx as
|
|
13855
|
+
import { jsx as jsx278, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
13756
13856
|
var ScrubLine = styled78.div`
|
|
13757
13857
|
position: absolute;
|
|
13758
13858
|
top: 0;
|
|
@@ -13855,14 +13955,14 @@ var ThumbnailStoryboardViewer = ({
|
|
|
13855
13955
|
backgroundPosition,
|
|
13856
13956
|
backgroundSize
|
|
13857
13957
|
};
|
|
13858
|
-
return /* @__PURE__ */
|
|
13958
|
+
return /* @__PURE__ */ jsxs51(
|
|
13859
13959
|
"div",
|
|
13860
13960
|
{
|
|
13861
13961
|
...props,
|
|
13862
13962
|
style: viewerStyles,
|
|
13863
13963
|
children: [
|
|
13864
|
-
/* @__PURE__ */
|
|
13865
|
-
showScrubLine ? /* @__PURE__ */
|
|
13964
|
+
/* @__PURE__ */ jsx278("div", { style: storyboardStyles }),
|
|
13965
|
+
showScrubLine ? /* @__PURE__ */ jsx278(
|
|
13866
13966
|
ScrubLine,
|
|
13867
13967
|
{
|
|
13868
13968
|
style: {
|
|
@@ -13876,7 +13976,7 @@ var ThumbnailStoryboardViewer = ({
|
|
|
13876
13976
|
};
|
|
13877
13977
|
|
|
13878
13978
|
// src/components/Thumbnail/Thumbnail.tsx
|
|
13879
|
-
import { jsx as
|
|
13979
|
+
import { jsx as jsx279, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
13880
13980
|
var WideThumbnailImage = styled79.img`
|
|
13881
13981
|
height: 100%;
|
|
13882
13982
|
object-fit: cover;
|
|
@@ -13889,7 +13989,7 @@ var SquareThumbnailImage = styled79.img`
|
|
|
13889
13989
|
`;
|
|
13890
13990
|
var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
13891
13991
|
if (thumbnailImageType === "wide") {
|
|
13892
|
-
return /* @__PURE__ */
|
|
13992
|
+
return /* @__PURE__ */ jsx279(
|
|
13893
13993
|
WideThumbnailImage,
|
|
13894
13994
|
{
|
|
13895
13995
|
alt: "",
|
|
@@ -13898,7 +13998,7 @@ var ThumbnailImage = ({ thumbnailImageType, thumbnailUrl }) => {
|
|
|
13898
13998
|
}
|
|
13899
13999
|
);
|
|
13900
14000
|
}
|
|
13901
|
-
return /* @__PURE__ */
|
|
14001
|
+
return /* @__PURE__ */ jsx279(
|
|
13902
14002
|
SquareThumbnailImage,
|
|
13903
14003
|
{
|
|
13904
14004
|
alt: "",
|
|
@@ -13936,7 +14036,7 @@ var getRelativeMousePosition = (elem, mouseEvent) => {
|
|
|
13936
14036
|
left: relativeLeft
|
|
13937
14037
|
};
|
|
13938
14038
|
};
|
|
13939
|
-
var Thumbnail =
|
|
14039
|
+
var Thumbnail = forwardRef30(
|
|
13940
14040
|
({
|
|
13941
14041
|
gradientBackground = "defaultMidOne",
|
|
13942
14042
|
thumbnailImageType = "square",
|
|
@@ -14001,7 +14101,7 @@ var Thumbnail = forwardRef28(
|
|
|
14001
14101
|
} = storyboard;
|
|
14002
14102
|
const targetWidth = isString2(width) ? parseInt(width, 10) : Number(width);
|
|
14003
14103
|
const effectiveCursorPosition = isStoryboardReady ? cursorPosition : null;
|
|
14004
|
-
return /* @__PURE__ */
|
|
14104
|
+
return /* @__PURE__ */ jsx279(
|
|
14005
14105
|
ThumbnailStoryboardViewer,
|
|
14006
14106
|
{
|
|
14007
14107
|
cursorPosition: effectiveCursorPosition,
|
|
@@ -14021,7 +14121,7 @@ var Thumbnail = forwardRef28(
|
|
|
14021
14121
|
if (shouldRenderStoryboard) {
|
|
14022
14122
|
thumbnailContent = renderStoryboard();
|
|
14023
14123
|
} else if (isNotNil38(thumbnailUrl)) {
|
|
14024
|
-
thumbnailContent = /* @__PURE__ */
|
|
14124
|
+
thumbnailContent = /* @__PURE__ */ jsx279(
|
|
14025
14125
|
ThumbnailImage,
|
|
14026
14126
|
{
|
|
14027
14127
|
thumbnailImageType,
|
|
@@ -14031,7 +14131,7 @@ var Thumbnail = forwardRef28(
|
|
|
14031
14131
|
} else {
|
|
14032
14132
|
thumbnailContent = null;
|
|
14033
14133
|
}
|
|
14034
|
-
return /* @__PURE__ */
|
|
14134
|
+
return /* @__PURE__ */ jsxs52(
|
|
14035
14135
|
StyledThumbnail,
|
|
14036
14136
|
{
|
|
14037
14137
|
ref,
|
|
@@ -14058,7 +14158,7 @@ Thumbnail.displayName = "Thumbnail";
|
|
|
14058
14158
|
import React2 from "react";
|
|
14059
14159
|
import styled80 from "styled-components";
|
|
14060
14160
|
import { isNonEmptyArray } from "@wistia/type-guards";
|
|
14061
|
-
import { jsx as
|
|
14161
|
+
import { jsx as jsx280 } from "react/jsx-runtime";
|
|
14062
14162
|
var StyledThumbnailCollage = styled80.div`
|
|
14063
14163
|
display: grid;
|
|
14064
14164
|
gap: var(--wui-space-01);
|
|
@@ -14141,7 +14241,7 @@ var ThumbnailCollage = ({
|
|
|
14141
14241
|
});
|
|
14142
14242
|
}) : [
|
|
14143
14243
|
// ThumbnailCollage will fallback to a Thumbnail with a gradient background if no children are provided
|
|
14144
|
-
/* @__PURE__ */
|
|
14244
|
+
/* @__PURE__ */ jsx280(
|
|
14145
14245
|
Thumbnail,
|
|
14146
14246
|
{
|
|
14147
14247
|
gradientBackground,
|
|
@@ -14150,7 +14250,7 @@ var ThumbnailCollage = ({
|
|
|
14150
14250
|
"fallback"
|
|
14151
14251
|
)
|
|
14152
14252
|
];
|
|
14153
|
-
return /* @__PURE__ */
|
|
14253
|
+
return /* @__PURE__ */ jsx280(
|
|
14154
14254
|
StyledThumbnailCollage,
|
|
14155
14255
|
{
|
|
14156
14256
|
$gradientBackground: gradientBackground,
|
|
@@ -14164,24 +14264,24 @@ var ThumbnailCollage = ({
|
|
|
14164
14264
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
14165
14265
|
import styled81, { css as css44 } from "styled-components";
|
|
14166
14266
|
import { isNotNil as isNotNil39 } from "@wistia/type-guards";
|
|
14167
|
-
import { jsx as
|
|
14267
|
+
import { jsx as jsx281, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
14168
14268
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
14169
14269
|
if (iconOnly) {
|
|
14170
|
-
return /* @__PURE__ */
|
|
14270
|
+
return /* @__PURE__ */ jsx281(
|
|
14171
14271
|
"g",
|
|
14172
14272
|
{
|
|
14173
14273
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
14174
14274
|
fill: brandmarkColor,
|
|
14175
|
-
children: /* @__PURE__ */
|
|
14275
|
+
children: /* @__PURE__ */ jsx281("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
14176
14276
|
}
|
|
14177
14277
|
);
|
|
14178
14278
|
}
|
|
14179
|
-
return /* @__PURE__ */
|
|
14279
|
+
return /* @__PURE__ */ jsx281(
|
|
14180
14280
|
"g",
|
|
14181
14281
|
{
|
|
14182
14282
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
14183
14283
|
fill: brandmarkColor,
|
|
14184
|
-
children: /* @__PURE__ */
|
|
14284
|
+
children: /* @__PURE__ */ jsx281("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
|
|
14185
14285
|
}
|
|
14186
14286
|
);
|
|
14187
14287
|
};
|
|
@@ -14189,12 +14289,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
14189
14289
|
if (iconOnly) {
|
|
14190
14290
|
return null;
|
|
14191
14291
|
}
|
|
14192
|
-
return /* @__PURE__ */
|
|
14292
|
+
return /* @__PURE__ */ jsx281(
|
|
14193
14293
|
"g",
|
|
14194
14294
|
{
|
|
14195
14295
|
"data-testid": "ui-wistia-logo-logotype",
|
|
14196
14296
|
fill: logotypeColor,
|
|
14197
|
-
children: /* @__PURE__ */
|
|
14297
|
+
children: /* @__PURE__ */ jsx281("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
|
|
14198
14298
|
}
|
|
14199
14299
|
);
|
|
14200
14300
|
};
|
|
@@ -14262,7 +14362,7 @@ var WistiaLogo = ({
|
|
|
14262
14362
|
};
|
|
14263
14363
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
14264
14364
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
14265
|
-
const Logo = /* @__PURE__ */
|
|
14365
|
+
const Logo = /* @__PURE__ */ jsxs53(
|
|
14266
14366
|
WistiaLogoComponent,
|
|
14267
14367
|
{
|
|
14268
14368
|
$hoverColor: hoverColor,
|
|
@@ -14275,14 +14375,14 @@ var WistiaLogo = ({
|
|
|
14275
14375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14276
14376
|
...props,
|
|
14277
14377
|
children: [
|
|
14278
|
-
/* @__PURE__ */
|
|
14279
|
-
isNotNil39(description) ? /* @__PURE__ */
|
|
14378
|
+
/* @__PURE__ */ jsx281("title", { children: title }),
|
|
14379
|
+
isNotNil39(description) ? /* @__PURE__ */ jsx281("desc", { children: description }) : null,
|
|
14280
14380
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
14281
14381
|
renderLogotype(logotypeColor, iconOnly)
|
|
14282
14382
|
]
|
|
14283
14383
|
}
|
|
14284
14384
|
);
|
|
14285
|
-
return href !== void 0 ? /* @__PURE__ */
|
|
14385
|
+
return href !== void 0 ? /* @__PURE__ */ jsx281("a", { href, children: Logo }) : Logo;
|
|
14286
14386
|
};
|
|
14287
14387
|
WistiaLogo.displayName = "WistiaLogo";
|
|
14288
14388
|
export {
|
|
@@ -14317,6 +14417,8 @@ export {
|
|
|
14317
14417
|
FileAmountLimitValidator,
|
|
14318
14418
|
FileSizeValidator,
|
|
14319
14419
|
FileTypeValidator,
|
|
14420
|
+
FilterMenu,
|
|
14421
|
+
FilterMenuItem,
|
|
14320
14422
|
Form,
|
|
14321
14423
|
FormErrorSummary,
|
|
14322
14424
|
FormField,
|