@wistia/ui 0.6.33 → 0.6.34-beta.102cdb30.1a306e1
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 +676 -608
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +71 -7
- package/dist/index.d.ts +71 -7
- package/dist/index.mjs +548 -481
- 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.6.
|
|
3
|
+
* @license @wistia/ui v0.6.34-beta.102cdb30.1a306e1
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
Button: () => Button,
|
|
49
49
|
ButtonGroup: () => ButtonGroup,
|
|
50
50
|
Card: () => Card,
|
|
51
|
+
Center: () => Center,
|
|
51
52
|
Checkbox: () => Checkbox,
|
|
52
53
|
CheckboxGroup: () => CheckboxGroup,
|
|
53
54
|
CheckboxMenuItem: () => CheckboxMenuItem,
|
|
@@ -7357,6 +7358,38 @@ var getFillViewportStyle = (fillViewport) => {
|
|
|
7357
7358
|
}
|
|
7358
7359
|
return void 0;
|
|
7359
7360
|
};
|
|
7361
|
+
var getFlexStyle = (flexMode) => {
|
|
7362
|
+
if (!flexMode) return null;
|
|
7363
|
+
switch (flexMode) {
|
|
7364
|
+
// grows to fill space, won't shrink, starts at 0
|
|
7365
|
+
case "grow":
|
|
7366
|
+
return import_styled_components25.css`
|
|
7367
|
+
flex: 1 0 0;
|
|
7368
|
+
`;
|
|
7369
|
+
// default behavior, can shrink but won't grow
|
|
7370
|
+
case "initial":
|
|
7371
|
+
return import_styled_components25.css`
|
|
7372
|
+
flex: 0 1 auto;
|
|
7373
|
+
`;
|
|
7374
|
+
// equal distribution of space
|
|
7375
|
+
case "equal":
|
|
7376
|
+
return import_styled_components25.css`
|
|
7377
|
+
flex: 1;
|
|
7378
|
+
`;
|
|
7379
|
+
// won't grow or shrink
|
|
7380
|
+
case "rigid":
|
|
7381
|
+
return import_styled_components25.css`
|
|
7382
|
+
flex: 0 0 auto;
|
|
7383
|
+
`;
|
|
7384
|
+
// can grow and shrink from content size
|
|
7385
|
+
case "fluid":
|
|
7386
|
+
return import_styled_components25.css`
|
|
7387
|
+
flex: 1 1 auto;
|
|
7388
|
+
`;
|
|
7389
|
+
default:
|
|
7390
|
+
return null;
|
|
7391
|
+
}
|
|
7392
|
+
};
|
|
7360
7393
|
var StyledBoxComponent = import_styled_components25.default.div`
|
|
7361
7394
|
align-content: ${({ $alignContent }) => $alignContent};
|
|
7362
7395
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
@@ -7366,6 +7399,8 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7366
7399
|
flex-direction: ${({ $flexDirection }) => $flexDirection};
|
|
7367
7400
|
${({ $fillBox: fill }) => getFillStyle(fill)};
|
|
7368
7401
|
${({ $fillViewport }) => getFillViewportStyle($fillViewport)};
|
|
7402
|
+
${({ $flexMode }) => getFlexStyle($flexMode)};
|
|
7403
|
+
${({ $gap }) => getGapStyle($gap)};
|
|
7369
7404
|
height: ${({ $height }) => $height ?? null};
|
|
7370
7405
|
width: ${({ $width }) => $width ?? null};
|
|
7371
7406
|
|
|
@@ -7373,7 +7408,6 @@ var StyledBoxComponent = import_styled_components25.default.div`
|
|
|
7373
7408
|
flex-grow: ${({ $grow }) => (0, import_type_guards17.isNotNil)($grow) ? $grow : null};
|
|
7374
7409
|
flex-shrink: ${({ $shrink }) => (0, import_type_guards17.isNotNil)($shrink) ? $shrink : null};
|
|
7375
7410
|
flex-wrap: ${({ $wrapItems }) => $wrapItems ? "wrap" : "nowrap"};
|
|
7376
|
-
${({ $gap }) => getGapStyle($gap)};
|
|
7377
7411
|
justify-content: ${({ $justifyContent }) => $justifyContent};
|
|
7378
7412
|
order: ${({ $order }) => (0, import_type_guards17.isNotNil)($order) ? $order : null};
|
|
7379
7413
|
`;
|
|
@@ -7416,6 +7450,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7416
7450
|
shrink,
|
|
7417
7451
|
width,
|
|
7418
7452
|
wrapItems = false,
|
|
7453
|
+
flexMode,
|
|
7419
7454
|
...otherProps
|
|
7420
7455
|
}, ref) => {
|
|
7421
7456
|
if ((0, import_type_guards17.isNotUndefined)(height)) {
|
|
@@ -7449,6 +7484,7 @@ var BoxComponent = (0, import_react17.forwardRef)(
|
|
|
7449
7484
|
$fillBox: fill,
|
|
7450
7485
|
$fillViewport: fillViewport,
|
|
7451
7486
|
$flexDirection: direction,
|
|
7487
|
+
$flexMode: flexMode,
|
|
7452
7488
|
$gap: gap,
|
|
7453
7489
|
$grow: grow,
|
|
7454
7490
|
$height: height,
|
|
@@ -7671,23 +7707,54 @@ var Card = ({
|
|
|
7671
7707
|
);
|
|
7672
7708
|
Card.displayName = "Card";
|
|
7673
7709
|
|
|
7674
|
-
// src/components/
|
|
7710
|
+
// src/components/Center/Center.tsx
|
|
7675
7711
|
var import_react19 = require("react");
|
|
7676
|
-
var
|
|
7712
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7713
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7714
|
+
var StyledCenter = import_styled_components30.default.div`
|
|
7715
|
+
box-sizing: border-box;
|
|
7716
|
+
margin-left: auto;
|
|
7717
|
+
margin-right: auto;
|
|
7718
|
+
max-width: ${({ $maxWidth }) => $maxWidth};
|
|
7719
|
+
${({ $gutterWidth }) => $gutterWidth && `padding: 0 var(--wui-${$gutterWidth.toString()});`}
|
|
7720
|
+
${({ $intrinsic }) => $intrinsic && `
|
|
7721
|
+
display: flex;
|
|
7722
|
+
flex-direction: column;
|
|
7723
|
+
align-items: center;
|
|
7724
|
+
`}
|
|
7725
|
+
`;
|
|
7726
|
+
var Center = (0, import_react19.forwardRef)(
|
|
7727
|
+
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
7728
|
+
StyledCenter,
|
|
7729
|
+
{
|
|
7730
|
+
ref,
|
|
7731
|
+
$gutterWidth: gutterWidth,
|
|
7732
|
+
$intrinsic: intrinsic,
|
|
7733
|
+
$maxWidth: maxWidth,
|
|
7734
|
+
...props,
|
|
7735
|
+
children
|
|
7736
|
+
}
|
|
7737
|
+
)
|
|
7738
|
+
);
|
|
7739
|
+
Center.displayName = "Center";
|
|
7740
|
+
|
|
7741
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
7742
|
+
var import_react20 = require("react");
|
|
7743
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7677
7744
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7678
7745
|
|
|
7679
7746
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7680
|
-
var
|
|
7747
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7681
7748
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7682
7749
|
|
|
7683
7750
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
7684
|
-
var
|
|
7751
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7685
7752
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
7686
|
-
var
|
|
7687
|
-
var disabledStyle =
|
|
7753
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7754
|
+
var disabledStyle = import_styled_components31.css`
|
|
7688
7755
|
color: var(--wui-color-text-disabled);
|
|
7689
7756
|
`;
|
|
7690
|
-
var StyledFormControlLabelDescription =
|
|
7757
|
+
var StyledFormControlLabelDescription = import_styled_components31.default.div`
|
|
7691
7758
|
color: var(--wui-color-text-secondary);
|
|
7692
7759
|
display: block;
|
|
7693
7760
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -7705,7 +7772,7 @@ var FormControlLabelDescription = ({
|
|
|
7705
7772
|
if ((0, import_type_guards19.isNil)(children)) {
|
|
7706
7773
|
return null;
|
|
7707
7774
|
}
|
|
7708
|
-
return /* @__PURE__ */ (0,
|
|
7775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
7709
7776
|
StyledFormControlLabelDescription,
|
|
7710
7777
|
{
|
|
7711
7778
|
...props,
|
|
@@ -7717,11 +7784,11 @@ var FormControlLabelDescription = ({
|
|
|
7717
7784
|
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
7718
7785
|
|
|
7719
7786
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7720
|
-
var
|
|
7787
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7721
7788
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
7722
|
-
var
|
|
7723
|
-
var VisuallyHidden =
|
|
7724
|
-
var VisuallyHiddenButFocusable =
|
|
7789
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7790
|
+
var VisuallyHidden = import_styled_components32.default.div({ ...visuallyHiddenStyle });
|
|
7791
|
+
var VisuallyHiddenButFocusable = import_styled_components32.default.div({
|
|
7725
7792
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7726
7793
|
});
|
|
7727
7794
|
var ScreenReaderOnly = ({
|
|
@@ -7732,23 +7799,23 @@ var ScreenReaderOnly = ({
|
|
|
7732
7799
|
}) => {
|
|
7733
7800
|
const accessibleText = (0, import_type_guards20.isNotNil)(text) ? text : children;
|
|
7734
7801
|
if (focusable) {
|
|
7735
|
-
return /* @__PURE__ */ (0,
|
|
7802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7736
7803
|
}
|
|
7737
|
-
return /* @__PURE__ */ (0,
|
|
7804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7738
7805
|
};
|
|
7739
7806
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7740
7807
|
|
|
7741
7808
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7742
|
-
var
|
|
7743
|
-
var disabledStyle2 =
|
|
7809
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7810
|
+
var disabledStyle2 = import_styled_components33.css`
|
|
7744
7811
|
cursor: not-allowed;
|
|
7745
7812
|
color: var(--wui-color-text-disabled);
|
|
7746
7813
|
`;
|
|
7747
|
-
var StyledLabelWrapper =
|
|
7814
|
+
var StyledLabelWrapper = import_styled_components33.default.div`
|
|
7748
7815
|
display: flex;
|
|
7749
7816
|
flex-direction: column;
|
|
7750
7817
|
`;
|
|
7751
|
-
var StyledFormControlLabel =
|
|
7818
|
+
var StyledFormControlLabel = import_styled_components33.default.label`
|
|
7752
7819
|
cursor: pointer;
|
|
7753
7820
|
display: flex;
|
|
7754
7821
|
align-items: center;
|
|
@@ -7773,11 +7840,11 @@ var FormControlLabel = ({
|
|
|
7773
7840
|
if ((0, import_type_guards21.isNil)(label)) {
|
|
7774
7841
|
return null;
|
|
7775
7842
|
}
|
|
7776
|
-
const labelContent = hideLabel ? /* @__PURE__ */ (0,
|
|
7843
|
+
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(StyledLabelWrapper, { children: [
|
|
7777
7844
|
label,
|
|
7778
|
-
/* @__PURE__ */ (0,
|
|
7845
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(FormControlLabelDescription, { children: description })
|
|
7779
7846
|
] });
|
|
7780
|
-
return /* @__PURE__ */ (0,
|
|
7847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
7781
7848
|
StyledFormControlLabel,
|
|
7782
7849
|
{
|
|
7783
7850
|
$disabled: disabled,
|
|
@@ -7793,8 +7860,8 @@ var FormControlLabel = ({
|
|
|
7793
7860
|
FormControlLabel.displayName = "FormControlLabel";
|
|
7794
7861
|
|
|
7795
7862
|
// src/components/Checkbox/Checkbox.tsx
|
|
7796
|
-
var
|
|
7797
|
-
var CheckIcon = () => /* @__PURE__ */ (0,
|
|
7863
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
7864
|
+
var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7798
7865
|
"svg",
|
|
7799
7866
|
{
|
|
7800
7867
|
fill: "inherit",
|
|
@@ -7802,7 +7869,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
|
7802
7869
|
viewBox: "0 0 10 8",
|
|
7803
7870
|
width: "10",
|
|
7804
7871
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7805
|
-
children: /* @__PURE__ */ (0,
|
|
7872
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7806
7873
|
"path",
|
|
7807
7874
|
{
|
|
7808
7875
|
d: "M3.47281 7.19303L0.377565 4.07999C0.191609 3.89297 0.191609 3.58973 0.377565 3.40268L1.05098 2.72537C1.23694 2.53833 1.53847 2.53833 1.72442 2.72537L3.80953 4.82245L8.27558 0.330729C8.46154 0.143704 8.76306 0.143704 8.94902 0.330729L9.62244 1.00804C9.8084 1.19506 9.8084 1.49831 9.62244 1.68535L4.14624 7.19305C3.96027 7.38008 3.65876 7.38008 3.47281 7.19303Z",
|
|
@@ -7811,7 +7878,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
|
7811
7878
|
)
|
|
7812
7879
|
}
|
|
7813
7880
|
);
|
|
7814
|
-
var sizeSmall =
|
|
7881
|
+
var sizeSmall = import_styled_components34.css`
|
|
7815
7882
|
width: 14px;
|
|
7816
7883
|
height: 14px;
|
|
7817
7884
|
min-width: 14px;
|
|
@@ -7822,7 +7889,7 @@ var sizeSmall = import_styled_components33.css`
|
|
|
7822
7889
|
height: 7px;
|
|
7823
7890
|
}
|
|
7824
7891
|
`;
|
|
7825
|
-
var sizeMedium =
|
|
7892
|
+
var sizeMedium = import_styled_components34.css`
|
|
7826
7893
|
width: 16px;
|
|
7827
7894
|
height: 16px;
|
|
7828
7895
|
min-width: 16px;
|
|
@@ -7833,7 +7900,7 @@ var sizeMedium = import_styled_components33.css`
|
|
|
7833
7900
|
height: 9px;
|
|
7834
7901
|
}
|
|
7835
7902
|
`;
|
|
7836
|
-
var sizeLarge =
|
|
7903
|
+
var sizeLarge = import_styled_components34.css`
|
|
7837
7904
|
width: 20px;
|
|
7838
7905
|
height: 20px;
|
|
7839
7906
|
min-width: 20px;
|
|
@@ -7849,14 +7916,14 @@ var getSizeCss = (size) => {
|
|
|
7849
7916
|
if (size === "lg") return sizeLarge;
|
|
7850
7917
|
return sizeMedium;
|
|
7851
7918
|
};
|
|
7852
|
-
var StyledCheckboxWrapper =
|
|
7919
|
+
var StyledCheckboxWrapper = import_styled_components34.default.div`
|
|
7853
7920
|
display: flex;
|
|
7854
7921
|
margin: 0;
|
|
7855
7922
|
|
|
7856
7923
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
7857
7924
|
user-select: none;
|
|
7858
7925
|
`;
|
|
7859
|
-
var StyledCheckboxInput =
|
|
7926
|
+
var StyledCheckboxInput = import_styled_components34.default.div`
|
|
7860
7927
|
${({ $size }) => getSizeCss($size)}
|
|
7861
7928
|
line-height: 0;
|
|
7862
7929
|
margin: 0;
|
|
@@ -7878,7 +7945,7 @@ var StyledCheckboxInput = import_styled_components33.default.div`
|
|
|
7878
7945
|
}
|
|
7879
7946
|
}
|
|
7880
7947
|
`;
|
|
7881
|
-
var StyledHiddenCheckboxInput =
|
|
7948
|
+
var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
7882
7949
|
${visuallyHiddenStyle}
|
|
7883
7950
|
|
|
7884
7951
|
/* toggles display of faux-input background-color */
|
|
@@ -7892,7 +7959,7 @@ var StyledHiddenCheckboxInput = import_styled_components33.default.input`
|
|
|
7892
7959
|
display: block;
|
|
7893
7960
|
}
|
|
7894
7961
|
`;
|
|
7895
|
-
var Checkbox = (0,
|
|
7962
|
+
var Checkbox = (0, import_react20.forwardRef)(
|
|
7896
7963
|
({
|
|
7897
7964
|
checked,
|
|
7898
7965
|
disabled = false,
|
|
@@ -7907,10 +7974,10 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7907
7974
|
hideLabel = false,
|
|
7908
7975
|
...props
|
|
7909
7976
|
}, ref) => {
|
|
7910
|
-
const generatedId = (0,
|
|
7977
|
+
const generatedId = (0, import_react20.useId)();
|
|
7911
7978
|
const computedId = (0, import_type_guards22.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7912
|
-
return /* @__PURE__ */ (0,
|
|
7913
|
-
/* @__PURE__ */ (0,
|
|
7979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
7980
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7914
7981
|
StyledHiddenCheckboxInput,
|
|
7915
7982
|
{
|
|
7916
7983
|
...props,
|
|
@@ -7925,16 +7992,16 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7925
7992
|
value
|
|
7926
7993
|
}
|
|
7927
7994
|
),
|
|
7928
|
-
/* @__PURE__ */ (0,
|
|
7995
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7929
7996
|
FormControlLabel,
|
|
7930
7997
|
{
|
|
7931
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
7998
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7932
7999
|
StyledCheckboxInput,
|
|
7933
8000
|
{
|
|
7934
8001
|
$disabled: disabled,
|
|
7935
8002
|
$size: size,
|
|
7936
8003
|
"data-wui-faux-input": "true",
|
|
7937
|
-
children: /* @__PURE__ */ (0,
|
|
8004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(CheckIcon, {})
|
|
7938
8005
|
}
|
|
7939
8006
|
),
|
|
7940
8007
|
description,
|
|
@@ -7950,9 +8017,9 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7950
8017
|
Checkbox.displayName = "Checkbox";
|
|
7951
8018
|
|
|
7952
8019
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
7953
|
-
var
|
|
8020
|
+
var import_react21 = require("react");
|
|
7954
8021
|
var ClickRegion = ({ children, targetRef }) => {
|
|
7955
|
-
(0,
|
|
8022
|
+
(0, import_react21.useEffect)(() => {
|
|
7956
8023
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7957
8024
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7958
8025
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -7960,7 +8027,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7960
8027
|
} else {
|
|
7961
8028
|
}
|
|
7962
8029
|
}, [targetRef]);
|
|
7963
|
-
const handleClick = (0,
|
|
8030
|
+
const handleClick = (0, import_react21.useCallback)(
|
|
7964
8031
|
(event) => {
|
|
7965
8032
|
const node = targetRef.current;
|
|
7966
8033
|
if (event.target instanceof HTMLAnchorElement && !event.target.hasAttribute("data-click-region-target-link") || event.target instanceof HTMLButtonElement && !event.target.hasAttribute("data-click-region-target-button")) {
|
|
@@ -7977,7 +8044,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7977
8044
|
},
|
|
7978
8045
|
[targetRef]
|
|
7979
8046
|
);
|
|
7980
|
-
return (0,
|
|
8047
|
+
return (0, import_react21.cloneElement)(import_react21.Children.only(children), {
|
|
7981
8048
|
"data-click-region": true,
|
|
7982
8049
|
onClick: handleClick
|
|
7983
8050
|
});
|
|
@@ -7987,9 +8054,9 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
7987
8054
|
// src/components/Collapsible/Collapsible.tsx
|
|
7988
8055
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7989
8056
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7990
|
-
var
|
|
7991
|
-
var
|
|
7992
|
-
var StyledRoot = (0,
|
|
8057
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8058
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8059
|
+
var StyledRoot = (0, import_styled_components35.default)(import_react_collapsible.Root)`
|
|
7993
8060
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
7994
8061
|
display: -webkit-box;
|
|
7995
8062
|
-webkit-box-orient: vertical;
|
|
@@ -8005,82 +8072,82 @@ var Collapsible = ({
|
|
|
8005
8072
|
const controlProps = {
|
|
8006
8073
|
...(0, import_type_guards23.isNotNil)(onOpenChange) && (0, import_type_guards23.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8007
8074
|
};
|
|
8008
|
-
return /* @__PURE__ */ (0,
|
|
8075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StyledRoot, { ...controlProps, children });
|
|
8009
8076
|
};
|
|
8010
8077
|
Collapsible.displayName = "Collapsible";
|
|
8011
8078
|
|
|
8012
8079
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8013
|
-
var
|
|
8080
|
+
var import_react22 = require("react");
|
|
8014
8081
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8015
|
-
var
|
|
8082
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8016
8083
|
var CollapsibleTrigger = ({ children }) => {
|
|
8017
|
-
|
|
8018
|
-
return /* @__PURE__ */ (0,
|
|
8084
|
+
import_react22.Children.only(children);
|
|
8085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8019
8086
|
};
|
|
8020
8087
|
|
|
8021
8088
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8022
|
-
var
|
|
8089
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8023
8090
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8024
8091
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
8025
|
-
var
|
|
8026
|
-
var ClampedContent =
|
|
8092
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8093
|
+
var ClampedContent = import_styled_components36.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8027
8094
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8028
8095
|
`;
|
|
8029
8096
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8030
8097
|
if ((0, import_type_guards24.isNotUndefined)(clamp)) {
|
|
8031
|
-
return /* @__PURE__ */ (0,
|
|
8098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8032
8099
|
}
|
|
8033
|
-
return /* @__PURE__ */ (0,
|
|
8100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible3.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_jsx_runtime210.Fragment, { children: [
|
|
8034
8101
|
children,
|
|
8035
8102
|
" "
|
|
8036
8103
|
] }) });
|
|
8037
8104
|
};
|
|
8038
8105
|
|
|
8039
8106
|
// src/components/DataCards/DataCard.tsx
|
|
8040
|
-
var
|
|
8107
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8041
8108
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
8042
8109
|
|
|
8043
8110
|
// src/components/Heading/Heading.tsx
|
|
8044
|
-
var
|
|
8045
|
-
var
|
|
8046
|
-
var
|
|
8047
|
-
var heroStyle =
|
|
8111
|
+
var import_react23 = require("react");
|
|
8112
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8113
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8114
|
+
var heroStyle = import_styled_components37.css`
|
|
8048
8115
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
8049
8116
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
8050
8117
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
8051
8118
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
8052
8119
|
`;
|
|
8053
|
-
var heading1TextStyle =
|
|
8120
|
+
var heading1TextStyle = import_styled_components37.css`
|
|
8054
8121
|
--font-family: var(--wui-typography-heading-1-family);
|
|
8055
8122
|
--font-size: var(--wui-typography-heading-1-size);
|
|
8056
8123
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
8057
8124
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
8058
8125
|
`;
|
|
8059
|
-
var heading2TextStyle =
|
|
8126
|
+
var heading2TextStyle = import_styled_components37.css`
|
|
8060
8127
|
--font-family: var(--wui-typography-heading-2-family);
|
|
8061
8128
|
--font-size: var(--wui-typography-heading-2-size);
|
|
8062
8129
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
8063
8130
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
8064
8131
|
`;
|
|
8065
|
-
var heading3TextStyle =
|
|
8132
|
+
var heading3TextStyle = import_styled_components37.css`
|
|
8066
8133
|
--font-family: var(--wui-typography-heading-3-family);
|
|
8067
8134
|
--font-size: var(--wui-typography-heading-3-size);
|
|
8068
8135
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
8069
8136
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
8070
8137
|
`;
|
|
8071
|
-
var heading4TextStyle =
|
|
8138
|
+
var heading4TextStyle = import_styled_components37.css`
|
|
8072
8139
|
--font-family: var(--wui-typography-heading-4-family);
|
|
8073
8140
|
--font-size: var(--wui-typography-heading-4-size);
|
|
8074
8141
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
8075
8142
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
8076
8143
|
`;
|
|
8077
|
-
var heading5TextStyle =
|
|
8144
|
+
var heading5TextStyle = import_styled_components37.css`
|
|
8078
8145
|
--font-family: var(--wui-typography-heading-5-family);
|
|
8079
8146
|
--font-size: var(--wui-typography-heading-5-size);
|
|
8080
8147
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
8081
8148
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
8082
8149
|
`;
|
|
8083
|
-
var heading6TextStyle =
|
|
8150
|
+
var heading6TextStyle = import_styled_components37.css`
|
|
8084
8151
|
--font-family: var(--wui-typography-heading-6-family);
|
|
8085
8152
|
--font-size: var(--wui-typography-heading-6-size);
|
|
8086
8153
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -8096,7 +8163,7 @@ var variantStyleMap = {
|
|
|
8096
8163
|
heading6: heading6TextStyle
|
|
8097
8164
|
};
|
|
8098
8165
|
var DEFAULT_ELEMENT2 = "h1";
|
|
8099
|
-
var StyledHeading =
|
|
8166
|
+
var StyledHeading = import_styled_components37.default.div`
|
|
8100
8167
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8101
8168
|
font-family: var(--font-family);
|
|
8102
8169
|
font-size: var(--font-size);
|
|
@@ -8105,16 +8172,16 @@ var StyledHeading = import_styled_components36.default.div`
|
|
|
8105
8172
|
color: var(--wui-color-text);
|
|
8106
8173
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
8107
8174
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8108
|
-
${({ $inline }) => $inline &&
|
|
8175
|
+
${({ $inline }) => $inline && import_styled_components37.css`
|
|
8109
8176
|
display: inline-block;
|
|
8110
8177
|
`}
|
|
8111
|
-
${({ $disabled }) => $disabled &&
|
|
8178
|
+
${({ $disabled }) => $disabled && import_styled_components37.css`
|
|
8112
8179
|
color: var(--wui-color-text-disabled);
|
|
8113
8180
|
`}
|
|
8114
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8181
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components37.css`
|
|
8115
8182
|
user-select: none;
|
|
8116
8183
|
`}
|
|
8117
|
-
${({ $align }) =>
|
|
8184
|
+
${({ $align }) => import_styled_components37.css`
|
|
8118
8185
|
text-align: ${$align};
|
|
8119
8186
|
`}
|
|
8120
8187
|
margin: 0;
|
|
@@ -8128,7 +8195,7 @@ var variantElementMap = {
|
|
|
8128
8195
|
heading5: "h5",
|
|
8129
8196
|
heading6: "h6"
|
|
8130
8197
|
};
|
|
8131
|
-
var HeadingComponent = (0,
|
|
8198
|
+
var HeadingComponent = (0, import_react23.forwardRef)(
|
|
8132
8199
|
({
|
|
8133
8200
|
align = "left",
|
|
8134
8201
|
colorScheme = "inherit",
|
|
@@ -8139,7 +8206,7 @@ var HeadingComponent = (0, import_react22.forwardRef)(
|
|
|
8139
8206
|
variant = "heading1",
|
|
8140
8207
|
renderAs,
|
|
8141
8208
|
...otherProps
|
|
8142
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8209
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
8143
8210
|
StyledHeading,
|
|
8144
8211
|
{
|
|
8145
8212
|
ref,
|
|
@@ -8159,8 +8226,8 @@ HeadingComponent.displayName = "Heading";
|
|
|
8159
8226
|
var Heading = makePolymorphic(HeadingComponent);
|
|
8160
8227
|
|
|
8161
8228
|
// src/components/DataCards/DataCard.tsx
|
|
8162
|
-
var
|
|
8163
|
-
var StyledDataCard =
|
|
8229
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8230
|
+
var StyledDataCard = import_styled_components38.default.div`
|
|
8164
8231
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8165
8232
|
display: grid;
|
|
8166
8233
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -8173,7 +8240,7 @@ var StyledDataCard = import_styled_components37.default.div`
|
|
|
8173
8240
|
border-radius: var(--wui-border-radius-02);
|
|
8174
8241
|
position: relative;
|
|
8175
8242
|
`;
|
|
8176
|
-
var shimmer =
|
|
8243
|
+
var shimmer = import_styled_components38.keyframes`
|
|
8177
8244
|
0% {
|
|
8178
8245
|
background-position: 200% 0;
|
|
8179
8246
|
}
|
|
@@ -8181,7 +8248,7 @@ var shimmer = import_styled_components37.keyframes`
|
|
|
8181
8248
|
background-position: -200% 0;
|
|
8182
8249
|
}
|
|
8183
8250
|
`;
|
|
8184
|
-
var LoadingBackground =
|
|
8251
|
+
var LoadingBackground = import_styled_components38.default.div`
|
|
8185
8252
|
background: linear-gradient(
|
|
8186
8253
|
90deg,
|
|
8187
8254
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -8192,27 +8259,27 @@ var LoadingBackground = import_styled_components37.default.div`
|
|
|
8192
8259
|
animation: ${shimmer} 1.5s infinite;
|
|
8193
8260
|
border-radius: var(--wui-border-radius-01);
|
|
8194
8261
|
`;
|
|
8195
|
-
var StyledLoadingLabel = (0,
|
|
8262
|
+
var StyledLoadingLabel = (0, import_styled_components38.default)(LoadingBackground)`
|
|
8196
8263
|
width: 80px;
|
|
8197
8264
|
height: var(--wui-typography-heading-6-line-height);
|
|
8198
8265
|
`;
|
|
8199
|
-
var StyledLoadingValue = (0,
|
|
8266
|
+
var StyledLoadingValue = (0, import_styled_components38.default)(LoadingBackground)`
|
|
8200
8267
|
width: 90%;
|
|
8201
8268
|
height: var(--wui-typography-heading-3-line-height);
|
|
8202
8269
|
`;
|
|
8203
|
-
var StyledLabel2 = (0,
|
|
8270
|
+
var StyledLabel2 = (0, import_styled_components38.default)(Heading)`
|
|
8204
8271
|
grid-area: label;
|
|
8205
8272
|
`;
|
|
8206
|
-
var StyledValue = (0,
|
|
8273
|
+
var StyledValue = (0, import_styled_components38.default)(Heading)`
|
|
8207
8274
|
grid-area: value;
|
|
8208
8275
|
`;
|
|
8209
|
-
var StyledSlot =
|
|
8276
|
+
var StyledSlot = import_styled_components38.default.div`
|
|
8210
8277
|
display: flex;
|
|
8211
8278
|
justify-content: flex-end;
|
|
8212
8279
|
grid-area: slot;
|
|
8213
8280
|
align-self: center;
|
|
8214
8281
|
`;
|
|
8215
|
-
var StyledDataCardTrendContainer =
|
|
8282
|
+
var StyledDataCardTrendContainer = import_styled_components38.default.div`
|
|
8216
8283
|
position: absolute;
|
|
8217
8284
|
bottom: var(--wui-space-01);
|
|
8218
8285
|
right: var(--wui-space-01);
|
|
@@ -8225,39 +8292,39 @@ var DataCard = ({
|
|
|
8225
8292
|
isLoading = false,
|
|
8226
8293
|
trend,
|
|
8227
8294
|
...props
|
|
8228
|
-
}) => /* @__PURE__ */ (0,
|
|
8295
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
|
|
8229
8296
|
StyledDataCard,
|
|
8230
8297
|
{
|
|
8231
8298
|
$colorScheme: colorScheme,
|
|
8232
8299
|
...props,
|
|
8233
8300
|
children: [
|
|
8234
|
-
/* @__PURE__ */ (0,
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8235
8302
|
StyledLabel2,
|
|
8236
8303
|
{
|
|
8237
8304
|
renderAs: "dt",
|
|
8238
8305
|
variant: "heading6",
|
|
8239
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8306
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingLabel, {}) : label
|
|
8240
8307
|
}
|
|
8241
8308
|
),
|
|
8242
|
-
/* @__PURE__ */ (0,
|
|
8309
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8243
8310
|
StyledValue,
|
|
8244
8311
|
{
|
|
8245
8312
|
renderAs: "dd",
|
|
8246
8313
|
variant: "heading3",
|
|
8247
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8314
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingValue, {}) : value
|
|
8248
8315
|
}
|
|
8249
8316
|
),
|
|
8250
|
-
(0, import_type_guards25.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0,
|
|
8251
|
-
(0, import_type_guards25.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0,
|
|
8317
|
+
(0, import_type_guards25.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8318
|
+
(0, import_type_guards25.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8252
8319
|
]
|
|
8253
8320
|
}
|
|
8254
8321
|
);
|
|
8255
8322
|
DataCard.displayName = "DataCard";
|
|
8256
8323
|
|
|
8257
8324
|
// src/components/DataCards/DataCards.tsx
|
|
8258
|
-
var
|
|
8259
|
-
var
|
|
8260
|
-
var StyledDataCards = (0,
|
|
8325
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8326
|
+
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8327
|
+
var StyledDataCards = (0, import_styled_components39.default)(Box)`
|
|
8261
8328
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8262
8329
|
margin-top: 0; /* Remove default <dl> style */
|
|
8263
8330
|
> * {
|
|
@@ -8271,7 +8338,7 @@ var DataCards = ({
|
|
|
8271
8338
|
colorScheme = "inherit",
|
|
8272
8339
|
...props
|
|
8273
8340
|
}) => {
|
|
8274
|
-
return /* @__PURE__ */ (0,
|
|
8341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8275
8342
|
StyledDataCards,
|
|
8276
8343
|
{
|
|
8277
8344
|
...props,
|
|
@@ -8289,25 +8356,25 @@ var DataCards = ({
|
|
|
8289
8356
|
DataCards.displayName = "DataCards";
|
|
8290
8357
|
|
|
8291
8358
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8292
|
-
var
|
|
8359
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8293
8360
|
|
|
8294
8361
|
// src/components/Text/Text.tsx
|
|
8295
|
-
var
|
|
8296
|
-
var
|
|
8297
|
-
var
|
|
8298
|
-
var bodyBoldStyles =
|
|
8362
|
+
var import_react24 = require("react");
|
|
8363
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8364
|
+
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8365
|
+
var bodyBoldStyles = import_styled_components40.css`
|
|
8299
8366
|
> strong,
|
|
8300
8367
|
b {
|
|
8301
8368
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8302
8369
|
}
|
|
8303
8370
|
`;
|
|
8304
|
-
var labelBoldStyles =
|
|
8371
|
+
var labelBoldStyles = import_styled_components40.css`
|
|
8305
8372
|
> strong,
|
|
8306
8373
|
b {
|
|
8307
8374
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8308
8375
|
}
|
|
8309
8376
|
`;
|
|
8310
|
-
var body1TextStyle =
|
|
8377
|
+
var body1TextStyle = import_styled_components40.css`
|
|
8311
8378
|
--font-family: var(--wui-typography-body-1-family);
|
|
8312
8379
|
--font-size: var(--wui-typography-body-1-size);
|
|
8313
8380
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8315,7 +8382,7 @@ var body1TextStyle = import_styled_components39.css`
|
|
|
8315
8382
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8316
8383
|
${bodyBoldStyles}
|
|
8317
8384
|
`;
|
|
8318
|
-
var body2TextStyle =
|
|
8385
|
+
var body2TextStyle = import_styled_components40.css`
|
|
8319
8386
|
--font-family: var(--wui-typography-body-2-family);
|
|
8320
8387
|
--font-size: var(--wui-typography-body-2-size);
|
|
8321
8388
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8323,7 +8390,7 @@ var body2TextStyle = import_styled_components39.css`
|
|
|
8323
8390
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8324
8391
|
${bodyBoldStyles}
|
|
8325
8392
|
`;
|
|
8326
|
-
var body3TextStyle =
|
|
8393
|
+
var body3TextStyle = import_styled_components40.css`
|
|
8327
8394
|
--font-family: var(--wui-typography-body-3-family);
|
|
8328
8395
|
--font-size: var(--wui-typography-body-3-size);
|
|
8329
8396
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8331,7 +8398,7 @@ var body3TextStyle = import_styled_components39.css`
|
|
|
8331
8398
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8332
8399
|
${bodyBoldStyles}
|
|
8333
8400
|
`;
|
|
8334
|
-
var body4TextStyle =
|
|
8401
|
+
var body4TextStyle = import_styled_components40.css`
|
|
8335
8402
|
--font-family: var(--wui-typography-body-4-family);
|
|
8336
8403
|
--font-size: var(--wui-typography-body-4-size);
|
|
8337
8404
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8339,47 +8406,47 @@ var body4TextStyle = import_styled_components39.css`
|
|
|
8339
8406
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8340
8407
|
${bodyBoldStyles}
|
|
8341
8408
|
`;
|
|
8342
|
-
var label1TextStyle =
|
|
8409
|
+
var label1TextStyle = import_styled_components40.css`
|
|
8343
8410
|
--font-family: var(--wui-typography-label-1-family);
|
|
8344
8411
|
--font-size: var(--wui-typography-label-1-size);
|
|
8345
8412
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8346
8413
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8347
8414
|
${labelBoldStyles}
|
|
8348
8415
|
`;
|
|
8349
|
-
var label2TextStyle =
|
|
8416
|
+
var label2TextStyle = import_styled_components40.css`
|
|
8350
8417
|
--font-family: var(--wui-typography-label-2-family);
|
|
8351
8418
|
--font-size: var(--wui-typography-label-2-size);
|
|
8352
8419
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8353
8420
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8354
8421
|
${labelBoldStyles}
|
|
8355
8422
|
`;
|
|
8356
|
-
var label3TextStyle =
|
|
8423
|
+
var label3TextStyle = import_styled_components40.css`
|
|
8357
8424
|
--font-family: var(--wui-typography-label-3-family);
|
|
8358
8425
|
--font-size: var(--wui-typography-label-3-size);
|
|
8359
8426
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8360
8427
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8361
8428
|
${labelBoldStyles}
|
|
8362
8429
|
`;
|
|
8363
|
-
var label4TextStyle =
|
|
8430
|
+
var label4TextStyle = import_styled_components40.css`
|
|
8364
8431
|
--font-family: var(--wui-typography-label-4-family);
|
|
8365
8432
|
--font-size: var(--wui-typography-label-4-size);
|
|
8366
8433
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8367
8434
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8368
8435
|
${labelBoldStyles}
|
|
8369
8436
|
`;
|
|
8370
|
-
var body1MonoTextStyle =
|
|
8437
|
+
var body1MonoTextStyle = import_styled_components40.css`
|
|
8371
8438
|
${body1TextStyle};
|
|
8372
8439
|
--font-family: var(--wui-typography-family-mono);
|
|
8373
8440
|
`;
|
|
8374
|
-
var body2MonoTextStyle =
|
|
8441
|
+
var body2MonoTextStyle = import_styled_components40.css`
|
|
8375
8442
|
${body2TextStyle};
|
|
8376
8443
|
--font-family: var(--wui-typography-family-mono);
|
|
8377
8444
|
`;
|
|
8378
|
-
var body3MonoTextStyle =
|
|
8445
|
+
var body3MonoTextStyle = import_styled_components40.css`
|
|
8379
8446
|
${body3TextStyle};
|
|
8380
8447
|
--font-family: var(--wui-typography-family-mono);
|
|
8381
8448
|
`;
|
|
8382
|
-
var body4MonoTextStyle =
|
|
8449
|
+
var body4MonoTextStyle = import_styled_components40.css`
|
|
8383
8450
|
${body4TextStyle};
|
|
8384
8451
|
--font-family: var(--wui-typography-family-mono);
|
|
8385
8452
|
`;
|
|
@@ -8414,7 +8481,7 @@ var variantElementMap2 = {
|
|
|
8414
8481
|
label3: labelElement,
|
|
8415
8482
|
label4: labelElement
|
|
8416
8483
|
};
|
|
8417
|
-
var StyledText =
|
|
8484
|
+
var StyledText = import_styled_components40.default.div`
|
|
8418
8485
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8419
8486
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8420
8487
|
if ($disabled) {
|
|
@@ -8438,19 +8505,19 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8438
8505
|
margin: 0;
|
|
8439
8506
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8440
8507
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8441
|
-
${({ $inline }) => $inline &&
|
|
8508
|
+
${({ $inline }) => $inline && import_styled_components40.css`
|
|
8442
8509
|
display: inline-block;
|
|
8443
8510
|
`}
|
|
8444
|
-
${({ $disabled }) => $disabled &&
|
|
8511
|
+
${({ $disabled }) => $disabled && import_styled_components40.css`
|
|
8445
8512
|
--text-color: var(--wui-color-text-disabled);
|
|
8446
8513
|
`}
|
|
8447
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8514
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components40.css`
|
|
8448
8515
|
user-select: none;
|
|
8449
8516
|
`}
|
|
8450
|
-
${({ $align }) =>
|
|
8517
|
+
${({ $align }) => import_styled_components40.css`
|
|
8451
8518
|
text-align: ${$align};
|
|
8452
8519
|
`}
|
|
8453
|
-
${({ as }) => as === "p" &&
|
|
8520
|
+
${({ as }) => as === "p" && import_styled_components40.css`
|
|
8454
8521
|
display: block;
|
|
8455
8522
|
|
|
8456
8523
|
+ p {
|
|
@@ -8458,7 +8525,7 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8458
8525
|
}
|
|
8459
8526
|
`}
|
|
8460
8527
|
`;
|
|
8461
|
-
var TextComponent = (0,
|
|
8528
|
+
var TextComponent = (0, import_react24.forwardRef)(
|
|
8462
8529
|
({
|
|
8463
8530
|
align = "left",
|
|
8464
8531
|
colorScheme = "inherit",
|
|
@@ -8471,7 +8538,7 @@ var TextComponent = (0, import_react23.forwardRef)(
|
|
|
8471
8538
|
renderAs,
|
|
8472
8539
|
...otherProps
|
|
8473
8540
|
}, ref) => {
|
|
8474
|
-
return /* @__PURE__ */ (0,
|
|
8541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
8475
8542
|
StyledText,
|
|
8476
8543
|
{
|
|
8477
8544
|
ref,
|
|
@@ -8493,8 +8560,8 @@ TextComponent.displayName = "Text";
|
|
|
8493
8560
|
var Text = makePolymorphic(TextComponent);
|
|
8494
8561
|
|
|
8495
8562
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8496
|
-
var
|
|
8497
|
-
var StyledDataCardTrend =
|
|
8563
|
+
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8564
|
+
var StyledDataCardTrend = import_styled_components41.default.div`
|
|
8498
8565
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8499
8566
|
background: var(--wui-color-bg-app);
|
|
8500
8567
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8509,8 +8576,8 @@ var DataCardTrend = ({
|
|
|
8509
8576
|
children,
|
|
8510
8577
|
...props
|
|
8511
8578
|
}) => {
|
|
8512
|
-
return /* @__PURE__ */ (0,
|
|
8513
|
-
/* @__PURE__ */ (0,
|
|
8579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
8580
|
+
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8514
8581
|
Icon,
|
|
8515
8582
|
{
|
|
8516
8583
|
size: "md",
|
|
@@ -8518,7 +8585,7 @@ var DataCardTrend = ({
|
|
|
8518
8585
|
...props
|
|
8519
8586
|
}
|
|
8520
8587
|
),
|
|
8521
|
-
/* @__PURE__ */ (0,
|
|
8588
|
+
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8522
8589
|
Text,
|
|
8523
8590
|
{
|
|
8524
8591
|
prominence: "secondary",
|
|
@@ -8530,22 +8597,22 @@ var DataCardTrend = ({
|
|
|
8530
8597
|
};
|
|
8531
8598
|
|
|
8532
8599
|
// src/components/Divider/Divider.tsx
|
|
8533
|
-
var
|
|
8534
|
-
var
|
|
8535
|
-
var horizontalBorderCss =
|
|
8600
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8601
|
+
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8602
|
+
var horizontalBorderCss = import_styled_components42.css`
|
|
8536
8603
|
border-top-color: var(--wui-color-border);
|
|
8537
8604
|
border-top-style: solid;
|
|
8538
8605
|
border-top-width: 1px;
|
|
8539
8606
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8540
8607
|
height: 0;
|
|
8541
8608
|
`;
|
|
8542
|
-
var verticalBorderCss =
|
|
8609
|
+
var verticalBorderCss = import_styled_components42.css`
|
|
8543
8610
|
background-color: var(--wui-color-border);
|
|
8544
8611
|
max-width: 1px;
|
|
8545
8612
|
min-height: 100%;
|
|
8546
8613
|
width: 1px;
|
|
8547
8614
|
`;
|
|
8548
|
-
var DividerComponent =
|
|
8615
|
+
var DividerComponent = import_styled_components42.default.div`
|
|
8549
8616
|
${({ $orientation }) => {
|
|
8550
8617
|
switch ($orientation) {
|
|
8551
8618
|
case "vertical":
|
|
@@ -8560,7 +8627,7 @@ var Divider = ({
|
|
|
8560
8627
|
orientation = "horizontal",
|
|
8561
8628
|
...otherProps
|
|
8562
8629
|
}) => {
|
|
8563
|
-
return /* @__PURE__ */ (0,
|
|
8630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8564
8631
|
DividerComponent,
|
|
8565
8632
|
{
|
|
8566
8633
|
$orientation: orientation,
|
|
@@ -8573,21 +8640,21 @@ var Divider = ({
|
|
|
8573
8640
|
Divider.displayName = "Divider";
|
|
8574
8641
|
|
|
8575
8642
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8576
|
-
var
|
|
8577
|
-
var
|
|
8643
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8644
|
+
var import_react26 = require("react");
|
|
8578
8645
|
|
|
8579
8646
|
// src/components/Tooltip/Tooltip.tsx
|
|
8580
8647
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8581
|
-
var
|
|
8582
|
-
var
|
|
8583
|
-
var CompactTooltipStyles =
|
|
8648
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8649
|
+
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
8650
|
+
var CompactTooltipStyles = import_styled_components43.css`
|
|
8584
8651
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8585
8652
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8586
8653
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8587
8654
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8588
8655
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8589
8656
|
`;
|
|
8590
|
-
var StyledContent = (0,
|
|
8657
|
+
var StyledContent = (0, import_styled_components43.default)(import_react_tooltip2.Content)`
|
|
8591
8658
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8592
8659
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8593
8660
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8646,14 +8713,14 @@ var Tooltip = ({
|
|
|
8646
8713
|
if (forceOpen === true) {
|
|
8647
8714
|
rootProps.open = true;
|
|
8648
8715
|
}
|
|
8649
|
-
return /* @__PURE__ */ (0,
|
|
8716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
8650
8717
|
import_react_tooltip2.Root,
|
|
8651
8718
|
{
|
|
8652
8719
|
delayDuration: delay,
|
|
8653
8720
|
...rootProps,
|
|
8654
8721
|
children: [
|
|
8655
|
-
/* @__PURE__ */ (0,
|
|
8656
|
-
/* @__PURE__ */ (0,
|
|
8722
|
+
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8723
|
+
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
8657
8724
|
StyledContent,
|
|
8658
8725
|
{
|
|
8659
8726
|
$compact: compact,
|
|
@@ -8661,7 +8728,7 @@ var Tooltip = ({
|
|
|
8661
8728
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8662
8729
|
children: [
|
|
8663
8730
|
content,
|
|
8664
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8731
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
8665
8732
|
"svg",
|
|
8666
8733
|
{
|
|
8667
8734
|
fill: "var(--tooltip-bg)",
|
|
@@ -8670,7 +8737,7 @@ var Tooltip = ({
|
|
|
8670
8737
|
viewBox: "0 0 12 8",
|
|
8671
8738
|
width: "12",
|
|
8672
8739
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8673
|
-
children: /* @__PURE__ */ (0,
|
|
8740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8674
8741
|
}
|
|
8675
8742
|
) }) : null
|
|
8676
8743
|
]
|
|
@@ -8683,11 +8750,11 @@ var Tooltip = ({
|
|
|
8683
8750
|
Tooltip.displayName = "Tooltip";
|
|
8684
8751
|
|
|
8685
8752
|
// src/components/Input/Input.tsx
|
|
8686
|
-
var
|
|
8687
|
-
var
|
|
8753
|
+
var import_react25 = require("react");
|
|
8754
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8688
8755
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8689
|
-
var
|
|
8690
|
-
var inputStyles =
|
|
8756
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
8757
|
+
var inputStyles = import_styled_components44.css`
|
|
8691
8758
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8692
8759
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8693
8760
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -8728,7 +8795,7 @@ var inputStyles = import_styled_components43.css`
|
|
|
8728
8795
|
}
|
|
8729
8796
|
}
|
|
8730
8797
|
`;
|
|
8731
|
-
var StyledInputContainer =
|
|
8798
|
+
var StyledInputContainer = import_styled_components44.default.div`
|
|
8732
8799
|
display: inline-flex;
|
|
8733
8800
|
position: relative;
|
|
8734
8801
|
${inputStyles};
|
|
@@ -8772,7 +8839,7 @@ var StyledInputContainer = import_styled_components43.default.div`
|
|
|
8772
8839
|
padding-right: 32px;
|
|
8773
8840
|
}
|
|
8774
8841
|
`;
|
|
8775
|
-
var Input = (0,
|
|
8842
|
+
var Input = (0, import_react25.forwardRef)(
|
|
8776
8843
|
({
|
|
8777
8844
|
fullWidth = true,
|
|
8778
8845
|
monospace = false,
|
|
@@ -8782,24 +8849,24 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8782
8849
|
rightIcon,
|
|
8783
8850
|
...props
|
|
8784
8851
|
}, externalRef) => {
|
|
8785
|
-
const internalRef = (0,
|
|
8852
|
+
const internalRef = (0, import_react25.useRef)();
|
|
8786
8853
|
const ref = (
|
|
8787
8854
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8788
8855
|
(0, import_type_guards26.isNotNil)(externalRef) && (0, import_type_guards26.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
8789
8856
|
);
|
|
8790
8857
|
let leftIconToDisplay = leftIcon;
|
|
8791
8858
|
if ((0, import_type_guards26.isNil)(leftIcon) && type === "search") {
|
|
8792
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
8859
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Icon, { type: "search" });
|
|
8793
8860
|
}
|
|
8794
8861
|
if ((0, import_type_guards26.isNotNil)(leftIconToDisplay)) {
|
|
8795
|
-
leftIconToDisplay = (0,
|
|
8862
|
+
leftIconToDisplay = (0, import_react25.cloneElement)(leftIconToDisplay, {
|
|
8796
8863
|
size: "md",
|
|
8797
8864
|
className: "wui-input-left-icon"
|
|
8798
8865
|
});
|
|
8799
8866
|
}
|
|
8800
8867
|
let rightIconToDisplay = rightIcon;
|
|
8801
8868
|
if ((0, import_type_guards26.isNotNil)(rightIconToDisplay)) {
|
|
8802
|
-
rightIconToDisplay = (0,
|
|
8869
|
+
rightIconToDisplay = (0, import_react25.cloneElement)(rightIconToDisplay, {
|
|
8803
8870
|
size: "md",
|
|
8804
8871
|
className: "wui-input-right-icon"
|
|
8805
8872
|
});
|
|
@@ -8814,21 +8881,21 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8814
8881
|
});
|
|
8815
8882
|
}
|
|
8816
8883
|
};
|
|
8817
|
-
return /* @__PURE__ */ (0,
|
|
8884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
8818
8885
|
StyledInputContainer,
|
|
8819
8886
|
{
|
|
8820
8887
|
$fullWidth: fullWidth,
|
|
8821
8888
|
$monospace: monospace,
|
|
8822
8889
|
children: [
|
|
8823
8890
|
leftIconToDisplay ?? null,
|
|
8824
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
8891
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
8825
8892
|
"textarea",
|
|
8826
8893
|
{
|
|
8827
8894
|
...props,
|
|
8828
8895
|
ref,
|
|
8829
8896
|
onFocus: handleFocus
|
|
8830
8897
|
}
|
|
8831
|
-
) : /* @__PURE__ */ (0,
|
|
8898
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
8832
8899
|
"input",
|
|
8833
8900
|
{
|
|
8834
8901
|
...props,
|
|
@@ -8846,8 +8913,8 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8846
8913
|
Input.displayName = "Input";
|
|
8847
8914
|
|
|
8848
8915
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8849
|
-
var
|
|
8850
|
-
var StyledInput = (0,
|
|
8916
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
8917
|
+
var StyledInput = (0, import_styled_components45.default)(Input)`
|
|
8851
8918
|
:not([rows]) {
|
|
8852
8919
|
min-height: unset;
|
|
8853
8920
|
}
|
|
@@ -8867,7 +8934,7 @@ var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
|
8867
8934
|
height: ${({ $height }) => `${$height}px`};
|
|
8868
8935
|
}
|
|
8869
8936
|
`;
|
|
8870
|
-
var editableStyles =
|
|
8937
|
+
var editableStyles = import_styled_components45.css`
|
|
8871
8938
|
&:has(+ :focus-within) {
|
|
8872
8939
|
background: var(--wui-color-bg-surface-hover);
|
|
8873
8940
|
}
|
|
@@ -8877,7 +8944,7 @@ var editableStyles = import_styled_components44.css`
|
|
|
8877
8944
|
cursor: pointer;
|
|
8878
8945
|
}
|
|
8879
8946
|
`;
|
|
8880
|
-
var StyledHeading2 = (0,
|
|
8947
|
+
var StyledHeading2 = (0, import_styled_components45.default)(Heading)`
|
|
8881
8948
|
width: 100%;
|
|
8882
8949
|
border-radius: var(--wui-border-radius-02);
|
|
8883
8950
|
padding: var(--wui-space-02);
|
|
@@ -8894,11 +8961,11 @@ var EditableHeading = ({
|
|
|
8894
8961
|
forceEditing = false,
|
|
8895
8962
|
editingDisabled = false
|
|
8896
8963
|
}) => {
|
|
8897
|
-
const [isEditing, setIsEditing] = (0,
|
|
8898
|
-
const [value, setValue] = (0,
|
|
8899
|
-
const [previousValue, setPreviousValue] = (0,
|
|
8900
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
8901
|
-
const headingRef = (0,
|
|
8964
|
+
const [isEditing, setIsEditing] = (0, import_react26.useState)(false);
|
|
8965
|
+
const [value, setValue] = (0, import_react26.useState)(children);
|
|
8966
|
+
const [previousValue, setPreviousValue] = (0, import_react26.useState)(children);
|
|
8967
|
+
const [headingHeight, setHeadingHeight] = (0, import_react26.useState)("60");
|
|
8968
|
+
const headingRef = (0, import_react26.useRef)(null);
|
|
8902
8969
|
const handleSetEditing = (editing) => {
|
|
8903
8970
|
if (editingDisabled) return;
|
|
8904
8971
|
if (editing && headingRef.current) {
|
|
@@ -8931,7 +8998,7 @@ var EditableHeading = ({
|
|
|
8931
8998
|
handleSetEditing(false);
|
|
8932
8999
|
}
|
|
8933
9000
|
};
|
|
8934
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
9001
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8935
9002
|
StyledHeading2,
|
|
8936
9003
|
{
|
|
8937
9004
|
ref: headingRef,
|
|
@@ -8945,7 +9012,7 @@ var EditableHeading = ({
|
|
|
8945
9012
|
return HeadingComponent2;
|
|
8946
9013
|
}
|
|
8947
9014
|
if (isEditing || forceEditing) {
|
|
8948
|
-
return /* @__PURE__ */ (0,
|
|
9015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8949
9016
|
StyledInput,
|
|
8950
9017
|
{
|
|
8951
9018
|
$height: headingHeight,
|
|
@@ -8963,8 +9030,8 @@ var EditableHeading = ({
|
|
|
8963
9030
|
}
|
|
8964
9031
|
);
|
|
8965
9032
|
}
|
|
8966
|
-
return /* @__PURE__ */ (0,
|
|
8967
|
-
/* @__PURE__ */ (0,
|
|
9033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(import_jsx_runtime219.Fragment, { children: [
|
|
9034
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8968
9035
|
Tooltip,
|
|
8969
9036
|
{
|
|
8970
9037
|
compact: true,
|
|
@@ -8972,7 +9039,7 @@ var EditableHeading = ({
|
|
|
8972
9039
|
children: HeadingComponent2
|
|
8973
9040
|
}
|
|
8974
9041
|
),
|
|
8975
|
-
/* @__PURE__ */ (0,
|
|
9042
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8976
9043
|
"button",
|
|
8977
9044
|
{
|
|
8978
9045
|
"aria-label": ariaLabel,
|
|
@@ -8984,27 +9051,27 @@ var EditableHeading = ({
|
|
|
8984
9051
|
};
|
|
8985
9052
|
|
|
8986
9053
|
// src/components/Form/Form.tsx
|
|
8987
|
-
var
|
|
8988
|
-
var
|
|
9054
|
+
var import_react28 = require("react");
|
|
9055
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8989
9056
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8990
9057
|
|
|
8991
9058
|
// src/components/Stack/Stack.tsx
|
|
8992
|
-
var
|
|
8993
|
-
var
|
|
8994
|
-
var
|
|
9059
|
+
var import_react27 = require("react");
|
|
9060
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
9061
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
8995
9062
|
var DEFAULT_ELEMENT4 = "div";
|
|
8996
|
-
var StyledStack =
|
|
9063
|
+
var StyledStack = import_styled_components46.default.div`
|
|
8997
9064
|
display: flex;
|
|
8998
9065
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8999
9066
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
9000
9067
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
9001
9068
|
`;
|
|
9002
|
-
var StackComponent = (0,
|
|
9069
|
+
var StackComponent = (0, import_react27.forwardRef)(
|
|
9003
9070
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
9004
9071
|
const responsiveGap = useResponsiveProp(gap);
|
|
9005
9072
|
const responsiveDirection = useResponsiveProp(direction);
|
|
9006
9073
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
9007
|
-
return /* @__PURE__ */ (0,
|
|
9074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9008
9075
|
StyledStack,
|
|
9009
9076
|
{
|
|
9010
9077
|
ref,
|
|
@@ -9021,14 +9088,14 @@ StackComponent.displayName = "Stack";
|
|
|
9021
9088
|
var Stack = makePolymorphic(StackComponent);
|
|
9022
9089
|
|
|
9023
9090
|
// src/components/Form/Form.tsx
|
|
9024
|
-
var
|
|
9025
|
-
var StyledForm =
|
|
9091
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
9092
|
+
var StyledForm = import_styled_components47.default.form`
|
|
9026
9093
|
--form-default-width: 690px;
|
|
9027
9094
|
|
|
9028
9095
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
9029
9096
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
9030
9097
|
`;
|
|
9031
|
-
var FormContext = (0,
|
|
9098
|
+
var FormContext = (0, import_react28.createContext)({
|
|
9032
9099
|
values: {},
|
|
9033
9100
|
errors: {},
|
|
9034
9101
|
hasSubmitted: false,
|
|
@@ -9044,11 +9111,11 @@ var FormComponent = ({
|
|
|
9044
9111
|
fullWidth = false,
|
|
9045
9112
|
...props
|
|
9046
9113
|
}, forwardedRef) => {
|
|
9047
|
-
const [errors, setErrors] = (0,
|
|
9048
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
9049
|
-
const innerRef = (0,
|
|
9114
|
+
const [errors, setErrors] = (0, import_react28.useState)({});
|
|
9115
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react28.useState)(false);
|
|
9116
|
+
const innerRef = (0, import_react28.useRef)();
|
|
9050
9117
|
const ref = forwardedRef ?? innerRef;
|
|
9051
|
-
const autoId = (0,
|
|
9118
|
+
const autoId = (0, import_react28.useId)();
|
|
9052
9119
|
const id = props.id ?? autoId;
|
|
9053
9120
|
const handleValidate = (nextFormData) => {
|
|
9054
9121
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
@@ -9090,7 +9157,7 @@ var FormComponent = ({
|
|
|
9090
9157
|
void action(null);
|
|
9091
9158
|
}
|
|
9092
9159
|
};
|
|
9093
|
-
const context = (0,
|
|
9160
|
+
const context = (0, import_react28.useMemo)(() => {
|
|
9094
9161
|
return {
|
|
9095
9162
|
values,
|
|
9096
9163
|
errors,
|
|
@@ -9101,7 +9168,7 @@ var FormComponent = ({
|
|
|
9101
9168
|
}, [labelPosition, values, errors, id, hasSubmitted]);
|
|
9102
9169
|
return (
|
|
9103
9170
|
// @ts-expect-error - generic context providers are a giant pain
|
|
9104
|
-
/* @__PURE__ */ (0,
|
|
9171
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9105
9172
|
Stack,
|
|
9106
9173
|
{
|
|
9107
9174
|
...props,
|
|
@@ -9119,15 +9186,15 @@ var FormComponent = ({
|
|
|
9119
9186
|
);
|
|
9120
9187
|
};
|
|
9121
9188
|
FormComponent.displayName = "Form";
|
|
9122
|
-
var Form = (0,
|
|
9189
|
+
var Form = (0, import_react28.forwardRef)(FormComponent);
|
|
9123
9190
|
|
|
9124
9191
|
// src/components/Form/useFormState.tsx
|
|
9125
|
-
var
|
|
9192
|
+
var import_react29 = require("react");
|
|
9126
9193
|
var useFormState = (action, initialData = {}) => {
|
|
9127
|
-
const [data, setData] = (0,
|
|
9128
|
-
const [isPending, setIsPending] = (0,
|
|
9129
|
-
const [error, setError] = (0,
|
|
9130
|
-
const formAction = (0,
|
|
9194
|
+
const [data, setData] = (0, import_react29.useState)(initialData);
|
|
9195
|
+
const [isPending, setIsPending] = (0, import_react29.useState)(false);
|
|
9196
|
+
const [error, setError] = (0, import_react29.useState)(null);
|
|
9197
|
+
const formAction = (0, import_react29.useCallback)(
|
|
9131
9198
|
async (nextFormData) => {
|
|
9132
9199
|
if (nextFormData === null) {
|
|
9133
9200
|
setData(initialData);
|
|
@@ -9158,23 +9225,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9158
9225
|
};
|
|
9159
9226
|
|
|
9160
9227
|
// src/components/Form/FormErrorSummary.tsx
|
|
9161
|
-
var
|
|
9228
|
+
var import_react30 = require("react");
|
|
9162
9229
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
9163
|
-
var
|
|
9230
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9164
9231
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9165
|
-
return /* @__PURE__ */ (0,
|
|
9232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9166
9233
|
};
|
|
9167
9234
|
var FormErrorSummary = ({ description }) => {
|
|
9168
|
-
const ref = (0,
|
|
9169
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9235
|
+
const ref = (0, import_react30.useRef)(null);
|
|
9236
|
+
const { formId, errors, hasSubmitted } = (0, import_react30.useContext)(FormContext);
|
|
9170
9237
|
const isValid = Object.keys(errors).length === 0;
|
|
9171
9238
|
if (isValid || !hasSubmitted) {
|
|
9172
9239
|
return null;
|
|
9173
9240
|
}
|
|
9174
|
-
return /* @__PURE__ */ (0,
|
|
9175
|
-
/* @__PURE__ */ (0,
|
|
9176
|
-
/* @__PURE__ */ (0,
|
|
9177
|
-
([name, error]) => (0, import_type_guards28.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0,
|
|
9241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ref, children: [
|
|
9242
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("p", { children: description }),
|
|
9243
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards28.isNotUndefined)(error)).map(
|
|
9244
|
+
([name, error]) => (0, import_type_guards28.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9178
9245
|
ErrorItem,
|
|
9179
9246
|
{
|
|
9180
9247
|
error: err,
|
|
@@ -9182,7 +9249,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9182
9249
|
name
|
|
9183
9250
|
},
|
|
9184
9251
|
err
|
|
9185
|
-
)) : /* @__PURE__ */ (0,
|
|
9252
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9186
9253
|
ErrorItem,
|
|
9187
9254
|
{
|
|
9188
9255
|
error: error ?? "",
|
|
@@ -9196,14 +9263,14 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9196
9263
|
};
|
|
9197
9264
|
|
|
9198
9265
|
// src/components/FormField/FormField.tsx
|
|
9199
|
-
var
|
|
9200
|
-
var
|
|
9266
|
+
var import_react33 = require("react");
|
|
9267
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9201
9268
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
9202
9269
|
|
|
9203
9270
|
// src/components/Label/Label.tsx
|
|
9204
|
-
var
|
|
9205
|
-
var
|
|
9206
|
-
var requiredStyle =
|
|
9271
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
9272
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9273
|
+
var requiredStyle = import_styled_components48.css`
|
|
9207
9274
|
&::after {
|
|
9208
9275
|
color: var(--wui-color-text-error);
|
|
9209
9276
|
display: inline;
|
|
@@ -9211,10 +9278,10 @@ var requiredStyle = import_styled_components47.css`
|
|
|
9211
9278
|
content: '*';
|
|
9212
9279
|
}
|
|
9213
9280
|
`;
|
|
9214
|
-
var disabledStyle3 =
|
|
9281
|
+
var disabledStyle3 = import_styled_components48.css`
|
|
9215
9282
|
color: var(--wui-color-text-disabled);
|
|
9216
9283
|
`;
|
|
9217
|
-
var StyledLabel3 =
|
|
9284
|
+
var StyledLabel3 = import_styled_components48.default.label`
|
|
9218
9285
|
display: block;
|
|
9219
9286
|
width: 100%;
|
|
9220
9287
|
color: var(--wui-color-text);
|
|
@@ -9246,7 +9313,7 @@ var Label = ({
|
|
|
9246
9313
|
screenReaderOnly = false,
|
|
9247
9314
|
...otherProps
|
|
9248
9315
|
}) => {
|
|
9249
|
-
return /* @__PURE__ */ (0,
|
|
9316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9250
9317
|
StyledLabel3,
|
|
9251
9318
|
{
|
|
9252
9319
|
...otherProps,
|
|
@@ -9261,28 +9328,28 @@ var Label = ({
|
|
|
9261
9328
|
Label.displayName = "Label";
|
|
9262
9329
|
|
|
9263
9330
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9264
|
-
var
|
|
9331
|
+
var import_react32 = require("react");
|
|
9265
9332
|
|
|
9266
9333
|
// src/components/FormGroup/FormGroup.tsx
|
|
9267
|
-
var
|
|
9268
|
-
var
|
|
9269
|
-
var
|
|
9270
|
-
var StyledFieldset =
|
|
9334
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9335
|
+
var import_react31 = require("react");
|
|
9336
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9337
|
+
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9271
9338
|
border: 0;
|
|
9272
9339
|
`;
|
|
9273
|
-
var StyledLegend =
|
|
9340
|
+
var StyledLegend = import_styled_components49.default.legend`
|
|
9274
9341
|
margin-bottom: var(--space-01);
|
|
9275
9342
|
`;
|
|
9276
9343
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9277
|
-
const ref = (0,
|
|
9278
|
-
return /* @__PURE__ */ (0,
|
|
9344
|
+
const ref = (0, import_react31.useRef)();
|
|
9345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
|
|
9279
9346
|
Stack,
|
|
9280
9347
|
{
|
|
9281
9348
|
...props,
|
|
9282
9349
|
ref,
|
|
9283
9350
|
renderAs: StyledFieldset,
|
|
9284
9351
|
children: [
|
|
9285
|
-
/* @__PURE__ */ (0,
|
|
9352
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9286
9353
|
Heading,
|
|
9287
9354
|
{
|
|
9288
9355
|
renderAs: StyledLegend,
|
|
@@ -9298,8 +9365,8 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
9298
9365
|
FormGroup.displayName = "FormGroup";
|
|
9299
9366
|
|
|
9300
9367
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9301
|
-
var
|
|
9302
|
-
var CheckboxGroupContext = (0,
|
|
9368
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9369
|
+
var CheckboxGroupContext = (0, import_react32.createContext)(null);
|
|
9303
9370
|
var CheckboxGroup = ({
|
|
9304
9371
|
children,
|
|
9305
9372
|
name,
|
|
@@ -9307,19 +9374,19 @@ var CheckboxGroup = ({
|
|
|
9307
9374
|
value,
|
|
9308
9375
|
...props
|
|
9309
9376
|
}) => {
|
|
9310
|
-
const context = (0,
|
|
9377
|
+
const context = (0, import_react32.useMemo)(() => {
|
|
9311
9378
|
return {
|
|
9312
9379
|
name,
|
|
9313
9380
|
onChange
|
|
9314
9381
|
};
|
|
9315
9382
|
}, [name, onChange]);
|
|
9316
|
-
return /* @__PURE__ */ (0,
|
|
9383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(FormGroup, { ...props, children }) });
|
|
9317
9384
|
};
|
|
9318
9385
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9319
9386
|
|
|
9320
9387
|
// src/components/FormField/FormField.tsx
|
|
9321
|
-
var
|
|
9322
|
-
var StyledFormField =
|
|
9388
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9389
|
+
var StyledFormField = import_styled_components50.default.div`
|
|
9323
9390
|
--form-field-spacing: var(--wui-space-01);
|
|
9324
9391
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9325
9392
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9349,7 +9416,7 @@ var StyledFormField = import_styled_components49.default.div`
|
|
|
9349
9416
|
grid-template-rows: 1fr;
|
|
9350
9417
|
}
|
|
9351
9418
|
`;
|
|
9352
|
-
var StyledErrorList =
|
|
9419
|
+
var StyledErrorList = import_styled_components50.default.ul`
|
|
9353
9420
|
margin: 0;
|
|
9354
9421
|
padding: 0;
|
|
9355
9422
|
padding-left: var(--wui-space-04);
|
|
@@ -9359,7 +9426,7 @@ var StyledErrorList = import_styled_components49.default.ul`
|
|
|
9359
9426
|
`;
|
|
9360
9427
|
var ErrorMessages = ({ errors, id }) => {
|
|
9361
9428
|
const isMultipleErrors = (0, import_type_guards29.isArray)(errors);
|
|
9362
|
-
return isMultipleErrors ? /* @__PURE__ */ (0,
|
|
9429
|
+
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9363
9430
|
Text,
|
|
9364
9431
|
{
|
|
9365
9432
|
colorScheme: "error",
|
|
@@ -9369,7 +9436,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
9369
9436
|
children: error
|
|
9370
9437
|
},
|
|
9371
9438
|
`${id}-${index}`
|
|
9372
|
-
)) }) : /* @__PURE__ */ (0,
|
|
9439
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9373
9440
|
Text,
|
|
9374
9441
|
{
|
|
9375
9442
|
colorScheme: "error",
|
|
@@ -9392,8 +9459,8 @@ var FormField = ({
|
|
|
9392
9459
|
value,
|
|
9393
9460
|
...props
|
|
9394
9461
|
}) => {
|
|
9395
|
-
const formState = (0,
|
|
9396
|
-
const checkboxGroup = (0,
|
|
9462
|
+
const formState = (0, import_react33.useContext)(FormContext);
|
|
9463
|
+
const checkboxGroup = (0, import_react33.useContext)(CheckboxGroupContext);
|
|
9397
9464
|
const defaultValue = formState.values[name];
|
|
9398
9465
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9399
9466
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
@@ -9431,19 +9498,19 @@ var FormField = ({
|
|
|
9431
9498
|
"aria-invalid": (0, import_type_guards29.isNotNil)(error)
|
|
9432
9499
|
};
|
|
9433
9500
|
}
|
|
9434
|
-
|
|
9435
|
-
return /* @__PURE__ */ (0,
|
|
9501
|
+
import_react33.Children.only(children);
|
|
9502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
|
|
9436
9503
|
StyledFormField,
|
|
9437
9504
|
{
|
|
9438
9505
|
...props,
|
|
9439
9506
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9440
9507
|
children: [
|
|
9441
|
-
!isIntegratedLabel && /* @__PURE__ */ (0,
|
|
9442
|
-
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
9443
|
-
(0,
|
|
9444
|
-
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0,
|
|
9445
|
-
/* @__PURE__ */ (0,
|
|
9446
|
-
/* @__PURE__ */ (0,
|
|
9508
|
+
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9509
|
+
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9510
|
+
(0, import_react33.cloneElement)(children, childProps),
|
|
9511
|
+
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
|
|
9512
|
+
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {}),
|
|
9513
|
+
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9447
9514
|
ErrorMessages,
|
|
9448
9515
|
{
|
|
9449
9516
|
errors: computedError,
|
|
@@ -9458,9 +9525,9 @@ var FormField = ({
|
|
|
9458
9525
|
FormField.displayName = "FormField";
|
|
9459
9526
|
|
|
9460
9527
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9461
|
-
var
|
|
9462
|
-
var
|
|
9463
|
-
var RadioGroupContext = (0,
|
|
9528
|
+
var import_react34 = require("react");
|
|
9529
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9530
|
+
var RadioGroupContext = (0, import_react34.createContext)(null);
|
|
9464
9531
|
var RadioGroup = ({
|
|
9465
9532
|
children,
|
|
9466
9533
|
name,
|
|
@@ -9468,21 +9535,21 @@ var RadioGroup = ({
|
|
|
9468
9535
|
value,
|
|
9469
9536
|
...props
|
|
9470
9537
|
}) => {
|
|
9471
|
-
const context = (0,
|
|
9538
|
+
const context = (0, import_react34.useMemo)(() => {
|
|
9472
9539
|
return {
|
|
9473
9540
|
name,
|
|
9474
9541
|
onChange
|
|
9475
9542
|
};
|
|
9476
9543
|
}, [name, onChange]);
|
|
9477
|
-
return /* @__PURE__ */ (0,
|
|
9544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormGroup, { ...props, children }) });
|
|
9478
9545
|
};
|
|
9479
9546
|
RadioGroup.displayName = "RadioGroup";
|
|
9480
9547
|
|
|
9481
9548
|
// src/components/IconButton/IconButton.tsx
|
|
9482
|
-
var
|
|
9483
|
-
var
|
|
9484
|
-
var
|
|
9485
|
-
var StyledButton2 = (0,
|
|
9549
|
+
var import_react35 = require("react");
|
|
9550
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9551
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9552
|
+
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
9486
9553
|
--icon-button-size-sm: 24px;
|
|
9487
9554
|
--icon-button-size-md: 32px;
|
|
9488
9555
|
--icon-button-size-lg: 40px;
|
|
@@ -9496,10 +9563,10 @@ var StyledButton2 = (0, import_styled_components50.default)(Button)`
|
|
|
9496
9563
|
align-items: center;
|
|
9497
9564
|
line-height: 1;
|
|
9498
9565
|
`;
|
|
9499
|
-
var IconButton = (0,
|
|
9566
|
+
var IconButton = (0, import_react35.forwardRef)(
|
|
9500
9567
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9501
9568
|
const responsiveSize = useResponsiveProp(size);
|
|
9502
|
-
return /* @__PURE__ */ (0,
|
|
9569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
9503
9570
|
StyledButton2,
|
|
9504
9571
|
{
|
|
9505
9572
|
...props,
|
|
@@ -9507,7 +9574,7 @@ var IconButton = (0, import_react34.forwardRef)(
|
|
|
9507
9574
|
"aria-label": label,
|
|
9508
9575
|
"data-wistia-ui-icon-button": true,
|
|
9509
9576
|
size: responsiveSize,
|
|
9510
|
-
children: (0,
|
|
9577
|
+
children: (0, import_react35.cloneElement)(import_react35.Children.only(children), {
|
|
9511
9578
|
size: responsiveSize
|
|
9512
9579
|
})
|
|
9513
9580
|
}
|
|
@@ -9517,9 +9584,9 @@ var IconButton = (0, import_react34.forwardRef)(
|
|
|
9517
9584
|
IconButton.displayName = "IconButton";
|
|
9518
9585
|
|
|
9519
9586
|
// src/components/Image/Image.tsx
|
|
9520
|
-
var
|
|
9587
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9521
9588
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
9522
|
-
var
|
|
9589
|
+
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9523
9590
|
var getFillStyle2 = (fillContainer) => {
|
|
9524
9591
|
if (fillContainer === "horizontal") {
|
|
9525
9592
|
return "width: 100%;";
|
|
@@ -9535,7 +9602,7 @@ var getFillStyle2 = (fillContainer) => {
|
|
|
9535
9602
|
}
|
|
9536
9603
|
return void 0;
|
|
9537
9604
|
};
|
|
9538
|
-
var StyledImage =
|
|
9605
|
+
var StyledImage = import_styled_components52.default.img`
|
|
9539
9606
|
border-radius: ${({ $borderRadius }) => (0, import_type_guards30.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9540
9607
|
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9541
9608
|
object-fit: ${({ $objFit }) => $objFit};
|
|
@@ -9550,7 +9617,7 @@ var Image = ({
|
|
|
9550
9617
|
loading = "lazy",
|
|
9551
9618
|
position: objPosition,
|
|
9552
9619
|
...otherProps
|
|
9553
|
-
}) => /* @__PURE__ */ (0,
|
|
9620
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9554
9621
|
StyledImage,
|
|
9555
9622
|
{
|
|
9556
9623
|
$borderRadius: borderRadius,
|
|
@@ -9566,19 +9633,19 @@ var Image = ({
|
|
|
9566
9633
|
Image.displayName = "Image";
|
|
9567
9634
|
|
|
9568
9635
|
// src/components/Menu/Menu.tsx
|
|
9569
|
-
var
|
|
9636
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9570
9637
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9571
9638
|
var import_type_guards31 = require("@wistia/type-guards");
|
|
9572
|
-
var
|
|
9639
|
+
var import_react37 = require("react");
|
|
9573
9640
|
|
|
9574
9641
|
// src/components/Menu/MenuContext.tsx
|
|
9575
|
-
var
|
|
9576
|
-
var MenuContext = (0,
|
|
9577
|
-
var useMenuContext = () => (0,
|
|
9642
|
+
var import_react36 = require("react");
|
|
9643
|
+
var MenuContext = (0, import_react36.createContext)({ compact: false });
|
|
9644
|
+
var useMenuContext = () => (0, import_react36.useContext)(MenuContext);
|
|
9578
9645
|
|
|
9579
9646
|
// src/components/Menu/Menu.tsx
|
|
9580
|
-
var
|
|
9581
|
-
var open =
|
|
9647
|
+
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
9648
|
+
var open = import_styled_components53.keyframes`
|
|
9582
9649
|
from {
|
|
9583
9650
|
opacity: 0;
|
|
9584
9651
|
transform: scale(.97) translateY(-8px);
|
|
@@ -9588,7 +9655,7 @@ var open = import_styled_components52.keyframes`
|
|
|
9588
9655
|
transform: scale(1);
|
|
9589
9656
|
}
|
|
9590
9657
|
`;
|
|
9591
|
-
var close =
|
|
9658
|
+
var close = import_styled_components53.keyframes`
|
|
9592
9659
|
from {
|
|
9593
9660
|
opacity: 1;
|
|
9594
9661
|
transform: scale(1);
|
|
@@ -9598,7 +9665,7 @@ var close = import_styled_components52.keyframes`
|
|
|
9598
9665
|
transform: scale(.97) translateY(-8px);
|
|
9599
9666
|
}
|
|
9600
9667
|
`;
|
|
9601
|
-
var menuItemCss =
|
|
9668
|
+
var menuItemCss = import_styled_components53.css`
|
|
9602
9669
|
--menu-label-description-gap: var(--wui-space-01);
|
|
9603
9670
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
9604
9671
|
--menu-item-left-icon-size: 24px;
|
|
@@ -9609,7 +9676,7 @@ var menuItemCss = import_styled_components52.css`
|
|
|
9609
9676
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
9610
9677
|
--menu-divider-margin: var(--wui-space-02);
|
|
9611
9678
|
`;
|
|
9612
|
-
var compactMenuItemCss =
|
|
9679
|
+
var compactMenuItemCss = import_styled_components53.css`
|
|
9613
9680
|
--menu-label-description-gap: 0;
|
|
9614
9681
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
9615
9682
|
--menu-item-left-icon-size: 16px;
|
|
@@ -9620,7 +9687,7 @@ var compactMenuItemCss = import_styled_components52.css`
|
|
|
9620
9687
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
9621
9688
|
--menu-divider-margin: var(--wui-space-01);
|
|
9622
9689
|
`;
|
|
9623
|
-
var menuContentCss =
|
|
9690
|
+
var menuContentCss = import_styled_components53.css`
|
|
9624
9691
|
--menu-font-family: var(--wui-typography-family-default);
|
|
9625
9692
|
--menu-bg: var(--wui-color-bg-surface);
|
|
9626
9693
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -9662,7 +9729,7 @@ var menuContentCss = import_styled_components52.css`
|
|
|
9662
9729
|
margin: var(--menu-divider-margin) 0;
|
|
9663
9730
|
}
|
|
9664
9731
|
`;
|
|
9665
|
-
var MenuContent = (0,
|
|
9732
|
+
var MenuContent = (0, import_styled_components53.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
9666
9733
|
${menuContentCss}
|
|
9667
9734
|
`;
|
|
9668
9735
|
var Menu = ({
|
|
@@ -9678,7 +9745,7 @@ var Menu = ({
|
|
|
9678
9745
|
onInteractOutside,
|
|
9679
9746
|
...props
|
|
9680
9747
|
}) => {
|
|
9681
|
-
const contextValue = (0,
|
|
9748
|
+
const contextValue = (0, import_react37.useMemo)(() => ({ compact }), [compact]);
|
|
9682
9749
|
let controlProps = {
|
|
9683
9750
|
...(0, import_type_guards31.isNotNil)(onOpenChange) && (0, import_type_guards31.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9684
9751
|
};
|
|
@@ -9688,24 +9755,24 @@ var Menu = ({
|
|
|
9688
9755
|
onOpenChange: () => null
|
|
9689
9756
|
};
|
|
9690
9757
|
}
|
|
9691
|
-
return /* @__PURE__ */ (0,
|
|
9758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
|
|
9692
9759
|
import_react_dropdown_menu.DropdownMenu,
|
|
9693
9760
|
{
|
|
9694
9761
|
modal: false,
|
|
9695
9762
|
...controlProps,
|
|
9696
9763
|
children: [
|
|
9697
|
-
/* @__PURE__ */ (0,
|
|
9764
|
+
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards31.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9698
9765
|
Button,
|
|
9699
9766
|
{
|
|
9700
9767
|
"aria-expanded": isOpen,
|
|
9701
9768
|
disabled,
|
|
9702
9769
|
forceState: isOpen ? "active" : void 0,
|
|
9703
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9770
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(Icon, { type: "caret-down" }),
|
|
9704
9771
|
...triggerProps,
|
|
9705
9772
|
children: label
|
|
9706
9773
|
}
|
|
9707
9774
|
) }),
|
|
9708
|
-
/* @__PURE__ */ (0,
|
|
9775
|
+
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9709
9776
|
MenuContent,
|
|
9710
9777
|
{
|
|
9711
9778
|
...props,
|
|
@@ -9725,19 +9792,19 @@ var Menu = ({
|
|
|
9725
9792
|
Menu.displayName = "Menu";
|
|
9726
9793
|
|
|
9727
9794
|
// src/components/Menu/MenuLabel.tsx
|
|
9728
|
-
var
|
|
9795
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9729
9796
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
9730
|
-
var
|
|
9731
|
-
var StyledMenuLabel = (0,
|
|
9797
|
+
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
9798
|
+
var StyledMenuLabel = (0, import_styled_components54.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
9732
9799
|
padding: var(--wui-space-02);
|
|
9733
9800
|
`;
|
|
9734
9801
|
var MenuLabel = ({ children, ...props }) => {
|
|
9735
|
-
return /* @__PURE__ */ (0,
|
|
9802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9736
9803
|
StyledMenuLabel,
|
|
9737
9804
|
{
|
|
9738
9805
|
asChild: true,
|
|
9739
9806
|
...props,
|
|
9740
|
-
children: /* @__PURE__ */ (0,
|
|
9807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9741
9808
|
Heading,
|
|
9742
9809
|
{
|
|
9743
9810
|
renderAs: "span",
|
|
@@ -9752,17 +9819,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
9752
9819
|
MenuLabel.displayName = "MenuLabel";
|
|
9753
9820
|
|
|
9754
9821
|
// src/components/Menu/SubMenu.tsx
|
|
9755
|
-
var
|
|
9756
|
-
var
|
|
9822
|
+
var import_react39 = require("react");
|
|
9823
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9757
9824
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9758
9825
|
var import_type_guards33 = require("@wistia/type-guards");
|
|
9759
9826
|
|
|
9760
9827
|
// src/components/Menu/MenuItemButton.tsx
|
|
9761
|
-
var
|
|
9762
|
-
var
|
|
9828
|
+
var import_react38 = require("react");
|
|
9829
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9763
9830
|
var import_type_guards32 = require("@wistia/type-guards");
|
|
9764
|
-
var
|
|
9765
|
-
var StyledButton3 = (0,
|
|
9831
|
+
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9832
|
+
var StyledButton3 = (0, import_styled_components55.default)(Button)`
|
|
9766
9833
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
9767
9834
|
|
|
9768
9835
|
display: flex;
|
|
@@ -9801,7 +9868,7 @@ var StyledButton3 = (0, import_styled_components54.default)(Button)`
|
|
|
9801
9868
|
padding-left: var(--wui-space-04);
|
|
9802
9869
|
}
|
|
9803
9870
|
`;
|
|
9804
|
-
var StyledLeftIconContainer =
|
|
9871
|
+
var StyledLeftIconContainer = import_styled_components55.default.div`
|
|
9805
9872
|
height: var(--menu-item-left-icon-size);
|
|
9806
9873
|
width: var(--menu-item-left-icon-size);
|
|
9807
9874
|
|
|
@@ -9812,7 +9879,7 @@ var StyledLeftIconContainer = import_styled_components54.default.div`
|
|
|
9812
9879
|
}
|
|
9813
9880
|
}
|
|
9814
9881
|
`;
|
|
9815
|
-
var StyledRightIconContainer =
|
|
9882
|
+
var StyledRightIconContainer = import_styled_components55.default.div`
|
|
9816
9883
|
height: var(--menu-item-right-icon-size);
|
|
9817
9884
|
width: var(--menu-item-right-icon-size);
|
|
9818
9885
|
|
|
@@ -9823,19 +9890,19 @@ var StyledRightIconContainer = import_styled_components54.default.div`
|
|
|
9823
9890
|
}
|
|
9824
9891
|
}
|
|
9825
9892
|
`;
|
|
9826
|
-
var StyledLabelAndDescriptionContainer =
|
|
9893
|
+
var StyledLabelAndDescriptionContainer = import_styled_components55.default.div`
|
|
9827
9894
|
display: flex;
|
|
9828
9895
|
flex-direction: column;
|
|
9829
9896
|
gap: var(--menu-label-description-gap);
|
|
9830
9897
|
flex-basis: 100%;
|
|
9831
9898
|
`;
|
|
9832
|
-
var StyledBadgeContainer =
|
|
9899
|
+
var StyledBadgeContainer = import_styled_components55.default.div`
|
|
9833
9900
|
align-self: start;
|
|
9834
9901
|
justify-self: end;
|
|
9835
9902
|
font-size: var(--wui-typography-label-4-size);
|
|
9836
9903
|
color: var(--wui-color-text-secondary);
|
|
9837
9904
|
`;
|
|
9838
|
-
var MenuItemButton = (0,
|
|
9905
|
+
var MenuItemButton = (0, import_react38.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9839
9906
|
let { colorScheme, badge } = props;
|
|
9840
9907
|
if (appearance === "dangerous") {
|
|
9841
9908
|
if ((0, import_type_guards32.isNotUndefined)(colorScheme)) {
|
|
@@ -9844,7 +9911,7 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9844
9911
|
colorScheme = "error";
|
|
9845
9912
|
}
|
|
9846
9913
|
if (appearance === "gated") {
|
|
9847
|
-
badge = /* @__PURE__ */ (0,
|
|
9914
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9848
9915
|
Icon,
|
|
9849
9916
|
{
|
|
9850
9917
|
colorScheme: "purple",
|
|
@@ -9856,7 +9923,7 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9856
9923
|
}
|
|
9857
9924
|
);
|
|
9858
9925
|
}
|
|
9859
|
-
return /* @__PURE__ */ (0,
|
|
9926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
|
|
9860
9927
|
StyledButton3,
|
|
9861
9928
|
{
|
|
9862
9929
|
...props,
|
|
@@ -9866,10 +9933,10 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9866
9933
|
fullWidth: true,
|
|
9867
9934
|
unstyled: true,
|
|
9868
9935
|
children: [
|
|
9869
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
9870
|
-
/* @__PURE__ */ (0,
|
|
9871
|
-
(0, import_type_guards32.isNotNil)(badge) || (0, import_type_guards32.isNotNil)(command) ? /* @__PURE__ */ (0,
|
|
9872
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
9936
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9937
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9938
|
+
(0, import_type_guards32.isNotNil)(badge) || (0, import_type_guards32.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9939
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9873
9940
|
]
|
|
9874
9941
|
}
|
|
9875
9942
|
);
|
|
@@ -9877,33 +9944,33 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9877
9944
|
MenuItemButton.displayName = "MenuItemButton";
|
|
9878
9945
|
|
|
9879
9946
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
9880
|
-
var
|
|
9881
|
-
var
|
|
9882
|
-
var StyledMenuItemLabel =
|
|
9883
|
-
var StyledMenuItemDescription = (0,
|
|
9947
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9948
|
+
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
9949
|
+
var StyledMenuItemLabel = import_styled_components56.default.span``;
|
|
9950
|
+
var StyledMenuItemDescription = (0, import_styled_components56.default)(Text).attrs({
|
|
9884
9951
|
variant: "body4",
|
|
9885
9952
|
prominence: "secondary"
|
|
9886
9953
|
})``;
|
|
9887
9954
|
var MenuItemLabel = ({ children }) => {
|
|
9888
|
-
return /* @__PURE__ */ (0,
|
|
9955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledMenuItemLabel, { children });
|
|
9889
9956
|
};
|
|
9890
9957
|
var MenuItemDescription = ({ children }) => {
|
|
9891
|
-
return /* @__PURE__ */ (0,
|
|
9958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledMenuItemDescription, { children });
|
|
9892
9959
|
};
|
|
9893
9960
|
|
|
9894
9961
|
// src/components/Menu/SubMenu.tsx
|
|
9895
|
-
var
|
|
9896
|
-
var SubMenuContent = (0,
|
|
9962
|
+
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
9963
|
+
var SubMenuContent = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
9897
9964
|
${menuContentCss}
|
|
9898
9965
|
|
|
9899
9966
|
${mq.smAndDown} {
|
|
9900
9967
|
transform: translateX(-100%) !important;
|
|
9901
9968
|
}
|
|
9902
9969
|
`;
|
|
9903
|
-
var StyledMobileSubMenuItems =
|
|
9970
|
+
var StyledMobileSubMenuItems = import_styled_components57.default.div`
|
|
9904
9971
|
margin-left: var(--wui-space-04);
|
|
9905
9972
|
`;
|
|
9906
|
-
var StyledSubTrigger = (0,
|
|
9973
|
+
var StyledSubTrigger = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
9907
9974
|
outline: none;
|
|
9908
9975
|
|
|
9909
9976
|
&[data-state='open'],
|
|
@@ -9914,12 +9981,12 @@ var StyledSubTrigger = (0, import_styled_components56.default)(import_react_drop
|
|
|
9914
9981
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
9915
9982
|
const { isSmAndUp } = useMq();
|
|
9916
9983
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
9917
|
-
return /* @__PURE__ */ (0,
|
|
9984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
|
|
9918
9985
|
MenuItemButton,
|
|
9919
9986
|
{
|
|
9920
9987
|
...props,
|
|
9921
9988
|
leftIcon: icon,
|
|
9922
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9989
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Icon, { type: "caret-right" })
|
|
9923
9990
|
}
|
|
9924
9991
|
) });
|
|
9925
9992
|
};
|
|
@@ -9931,16 +9998,16 @@ var SubMenu = ({
|
|
|
9931
9998
|
...props
|
|
9932
9999
|
}) => {
|
|
9933
10000
|
const { isSmAndUp } = useMq();
|
|
9934
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
10001
|
+
const [isExpanded, setIsExpanded] = (0, import_react39.useState)(false);
|
|
9935
10002
|
const { compact } = useMenuContext();
|
|
9936
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
9937
|
-
/* @__PURE__ */ (0,
|
|
9938
|
-
/* @__PURE__ */ (0,
|
|
9939
|
-
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
10003
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
10004
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
10005
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
10006
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description }) : null
|
|
9940
10007
|
] }),
|
|
9941
|
-
/* @__PURE__ */ (0,
|
|
9942
|
-
] }) : /* @__PURE__ */ (0,
|
|
9943
|
-
/* @__PURE__ */ (0,
|
|
10008
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
10009
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
10010
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(
|
|
9944
10011
|
SubMenuTrigger,
|
|
9945
10012
|
{
|
|
9946
10013
|
...props,
|
|
@@ -9949,28 +10016,28 @@ var SubMenu = ({
|
|
|
9949
10016
|
setIsExpanded((prev) => !prev);
|
|
9950
10017
|
},
|
|
9951
10018
|
children: [
|
|
9952
|
-
/* @__PURE__ */ (0,
|
|
9953
|
-
/* @__PURE__ */ (0,
|
|
10019
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
10020
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description })
|
|
9954
10021
|
]
|
|
9955
10022
|
}
|
|
9956
10023
|
),
|
|
9957
|
-
/* @__PURE__ */ (0,
|
|
10024
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
9958
10025
|
] });
|
|
9959
10026
|
};
|
|
9960
10027
|
SubMenu.displayName = "SubMenu";
|
|
9961
10028
|
|
|
9962
10029
|
// src/components/Menu/MenuItem.tsx
|
|
9963
|
-
var
|
|
10030
|
+
var import_react40 = require("react");
|
|
9964
10031
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
9965
|
-
var
|
|
9966
|
-
var MenuItem = (0,
|
|
10032
|
+
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
10033
|
+
var MenuItem = (0, import_react40.forwardRef)(
|
|
9967
10034
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9968
|
-
return /* @__PURE__ */ (0,
|
|
10035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
9969
10036
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
9970
10037
|
{
|
|
9971
10038
|
asChild: true,
|
|
9972
10039
|
onSelect,
|
|
9973
|
-
children: /* @__PURE__ */ (0,
|
|
10040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
9974
10041
|
MenuItemButton,
|
|
9975
10042
|
{
|
|
9976
10043
|
...props,
|
|
@@ -9986,10 +10053,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
9986
10053
|
|
|
9987
10054
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
9988
10055
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
9989
|
-
var
|
|
10056
|
+
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
9990
10057
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
9991
|
-
return /* @__PURE__ */ (0,
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
10058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
10059
|
+
/* @__PURE__ */ (0, import_jsx_runtime236.jsx)(MenuLabel, { children: label }),
|
|
9993
10060
|
children
|
|
9994
10061
|
] });
|
|
9995
10062
|
};
|
|
@@ -9997,11 +10064,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
9997
10064
|
|
|
9998
10065
|
// src/components/Menu/RadioMenuItem.tsx
|
|
9999
10066
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
10000
|
-
var
|
|
10067
|
+
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
10001
10068
|
var RadioMenuItem = ({
|
|
10002
10069
|
onSelect,
|
|
10003
10070
|
value,
|
|
10004
|
-
indicator = /* @__PURE__ */ (0,
|
|
10071
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10005
10072
|
Icon,
|
|
10006
10073
|
{
|
|
10007
10074
|
size: "sm",
|
|
@@ -10011,17 +10078,17 @@ var RadioMenuItem = ({
|
|
|
10011
10078
|
...props
|
|
10012
10079
|
}) => {
|
|
10013
10080
|
const extraProps = onSelect ? { onSelect } : {};
|
|
10014
|
-
return /* @__PURE__ */ (0,
|
|
10081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10015
10082
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
10016
10083
|
{
|
|
10017
10084
|
...extraProps,
|
|
10018
10085
|
asChild: true,
|
|
10019
10086
|
value,
|
|
10020
|
-
children: /* @__PURE__ */ (0,
|
|
10087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10021
10088
|
MenuItemButton,
|
|
10022
10089
|
{
|
|
10023
10090
|
...props,
|
|
10024
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
10091
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
10025
10092
|
}
|
|
10026
10093
|
)
|
|
10027
10094
|
}
|
|
@@ -10031,9 +10098,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
10031
10098
|
|
|
10032
10099
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
10033
10100
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
10034
|
-
var
|
|
10101
|
+
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10035
10102
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10036
|
-
return checked ? /* @__PURE__ */ (0,
|
|
10103
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10037
10104
|
"svg",
|
|
10038
10105
|
{
|
|
10039
10106
|
...props,
|
|
@@ -10043,14 +10110,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10043
10110
|
width: "24",
|
|
10044
10111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10045
10112
|
children: [
|
|
10046
|
-
/* @__PURE__ */ (0,
|
|
10113
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10047
10114
|
"path",
|
|
10048
10115
|
{
|
|
10049
10116
|
d: "m4 8c0-2.20914 1.79086-4 4-4h8c2.2091 0 4 1.79086 4 4v8c0 2.2091-1.7909 4-4 4h-8c-2.20914 0-4-1.7909-4-4z",
|
|
10050
10117
|
fill: "#2949e5"
|
|
10051
10118
|
}
|
|
10052
10119
|
),
|
|
10053
|
-
/* @__PURE__ */ (0,
|
|
10120
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10054
10121
|
"path",
|
|
10055
10122
|
{
|
|
10056
10123
|
d: "m10.4728 15.1931-3.09523-3.1131c-.18596-.187-.18596-.4902 0-.6773l.67341-.6773c.18596-.187.48749-.187.67344 0l2.08508 2.0971 4.4661-4.49174c.1859-.18703.4875-.18703.6734 0l.6734.67731c.186.18703.186.49027 0 .67731l-5.4762 5.50772c-.1859.187-.4874.187-.6734 0z",
|
|
@@ -10059,7 +10126,7 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10059
10126
|
)
|
|
10060
10127
|
]
|
|
10061
10128
|
}
|
|
10062
|
-
) : /* @__PURE__ */ (0,
|
|
10129
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10063
10130
|
"svg",
|
|
10064
10131
|
{
|
|
10065
10132
|
...props,
|
|
@@ -10069,14 +10136,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10069
10136
|
width: "24",
|
|
10070
10137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10071
10138
|
children: [
|
|
10072
|
-
/* @__PURE__ */ (0,
|
|
10139
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10073
10140
|
"path",
|
|
10074
10141
|
{
|
|
10075
10142
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
10076
10143
|
fill: "#fcfcfd"
|
|
10077
10144
|
}
|
|
10078
10145
|
),
|
|
10079
|
-
/* @__PURE__ */ (0,
|
|
10146
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10080
10147
|
"path",
|
|
10081
10148
|
{
|
|
10082
10149
|
d: "m8 4.5h8c1.933 0 3.5 1.567 3.5 3.5v8c0 1.933-1.567 3.5-3.5 3.5h-8c-1.933 0-3.5-1.567-3.5-3.5v-8c0-1.933 1.567-3.5 3.5-3.5z",
|
|
@@ -10093,18 +10160,18 @@ var CheckboxMenuItem = ({
|
|
|
10093
10160
|
onCheckedChange,
|
|
10094
10161
|
...props
|
|
10095
10162
|
}) => {
|
|
10096
|
-
return /* @__PURE__ */ (0,
|
|
10163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10097
10164
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
10098
10165
|
{
|
|
10099
10166
|
asChild: true,
|
|
10100
10167
|
checked,
|
|
10101
10168
|
onCheckedChange,
|
|
10102
10169
|
onSelect,
|
|
10103
|
-
children: /* @__PURE__ */ (0,
|
|
10170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10104
10171
|
MenuItemButton,
|
|
10105
10172
|
{
|
|
10106
10173
|
...props,
|
|
10107
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10174
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(CheckboxIndicator, { checked })
|
|
10108
10175
|
}
|
|
10109
10176
|
)
|
|
10110
10177
|
}
|
|
@@ -10113,37 +10180,37 @@ var CheckboxMenuItem = ({
|
|
|
10113
10180
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10114
10181
|
|
|
10115
10182
|
// src/components/Modal/Modal.tsx
|
|
10116
|
-
var
|
|
10117
|
-
var
|
|
10183
|
+
var import_react44 = require("react");
|
|
10184
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10118
10185
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
10119
10186
|
var import_type_guards35 = require("@wistia/type-guards");
|
|
10120
10187
|
|
|
10121
10188
|
// src/components/Modal/ModalHeader.tsx
|
|
10122
|
-
var
|
|
10189
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
10123
10190
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
10124
10191
|
|
|
10125
10192
|
// src/components/Modal/ModalCloseButton.tsx
|
|
10126
|
-
var
|
|
10193
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
10127
10194
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
10128
|
-
var
|
|
10129
|
-
var CloseButton = (0,
|
|
10195
|
+
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
10196
|
+
var CloseButton = (0, import_styled_components58.default)(import_react_dialog.Close)`
|
|
10130
10197
|
align-self: start;
|
|
10131
10198
|
`;
|
|
10132
10199
|
var ModalCloseButton = () => {
|
|
10133
|
-
return /* @__PURE__ */ (0,
|
|
10200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10134
10201
|
IconButton,
|
|
10135
10202
|
{
|
|
10136
10203
|
label: "Dismiss modal",
|
|
10137
10204
|
size: "sm",
|
|
10138
10205
|
variant: "ghost",
|
|
10139
|
-
children: /* @__PURE__ */ (0,
|
|
10206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Icon, { type: "close" })
|
|
10140
10207
|
}
|
|
10141
10208
|
) });
|
|
10142
10209
|
};
|
|
10143
10210
|
|
|
10144
10211
|
// src/components/Modal/ModalHeader.tsx
|
|
10145
|
-
var
|
|
10146
|
-
var Header =
|
|
10212
|
+
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
10213
|
+
var Header = import_styled_components59.default.header`
|
|
10147
10214
|
display: flex;
|
|
10148
10215
|
order: 1;
|
|
10149
10216
|
gap: var(--wui-space-01);
|
|
@@ -10154,7 +10221,7 @@ var Header = import_styled_components58.default.header`
|
|
|
10154
10221
|
margin: 0 0 var(--wui-space-03);
|
|
10155
10222
|
}
|
|
10156
10223
|
`;
|
|
10157
|
-
var Title = (0,
|
|
10224
|
+
var Title = (0, import_styled_components59.default)(import_react_dialog2.Title)`
|
|
10158
10225
|
font-family: var(--wui-typography-heading-2-family);
|
|
10159
10226
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
10160
10227
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -10165,27 +10232,27 @@ var ModalHeader = ({
|
|
|
10165
10232
|
hideTitle,
|
|
10166
10233
|
hideCloseButton
|
|
10167
10234
|
}) => {
|
|
10168
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */ (0,
|
|
10169
|
-
return /* @__PURE__ */ (0,
|
|
10235
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(Title, { children: title }) }) : /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(Title, { children: title });
|
|
10236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(Header, { $hideTitle: hideTitle, children: [
|
|
10170
10237
|
TitleComponent,
|
|
10171
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
10238
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ModalCloseButton, {})
|
|
10172
10239
|
] });
|
|
10173
10240
|
};
|
|
10174
10241
|
|
|
10175
10242
|
// src/components/Modal/ModalContent.tsx
|
|
10176
|
-
var
|
|
10177
|
-
var
|
|
10243
|
+
var import_react42 = require("react");
|
|
10244
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10178
10245
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10179
10246
|
|
|
10180
10247
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10181
|
-
var
|
|
10248
|
+
var import_react41 = require("react");
|
|
10182
10249
|
var import_type_guards34 = require("@wistia/type-guards");
|
|
10183
10250
|
var useFocusRestore = () => {
|
|
10184
|
-
const previouslyFocusedRef = (0,
|
|
10185
|
-
(0,
|
|
10251
|
+
const previouslyFocusedRef = (0, import_react41.useRef)(null);
|
|
10252
|
+
(0, import_react41.useEffect)(() => {
|
|
10186
10253
|
previouslyFocusedRef.current = document.activeElement;
|
|
10187
10254
|
}, []);
|
|
10188
|
-
(0,
|
|
10255
|
+
(0, import_react41.useEffect)(() => {
|
|
10189
10256
|
return () => {
|
|
10190
10257
|
if ((0, import_type_guards34.isNotNil)(previouslyFocusedRef.current)) {
|
|
10191
10258
|
setTimeout(() => {
|
|
@@ -10197,8 +10264,8 @@ var useFocusRestore = () => {
|
|
|
10197
10264
|
};
|
|
10198
10265
|
|
|
10199
10266
|
// src/components/Modal/ModalContent.tsx
|
|
10200
|
-
var
|
|
10201
|
-
var StyledModalContent = (0,
|
|
10267
|
+
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
10268
|
+
var StyledModalContent = (0, import_styled_components60.default)(import_react_dialog3.Content)`
|
|
10202
10269
|
background-color: var(--wui-color-bg-app);
|
|
10203
10270
|
box-sizing: border-box;
|
|
10204
10271
|
display: flex;
|
|
@@ -10239,10 +10306,10 @@ var StyledModalContent = (0, import_styled_components59.default)(import_react_di
|
|
|
10239
10306
|
}
|
|
10240
10307
|
}
|
|
10241
10308
|
`;
|
|
10242
|
-
var ModalContent = (0,
|
|
10309
|
+
var ModalContent = (0, import_react42.forwardRef)(
|
|
10243
10310
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
10244
10311
|
useFocusRestore();
|
|
10245
|
-
return /* @__PURE__ */ (0,
|
|
10312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10246
10313
|
StyledModalContent,
|
|
10247
10314
|
{
|
|
10248
10315
|
ref,
|
|
@@ -10257,9 +10324,9 @@ var ModalContent = (0, import_react41.forwardRef)(
|
|
|
10257
10324
|
);
|
|
10258
10325
|
|
|
10259
10326
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10260
|
-
var
|
|
10261
|
-
var
|
|
10262
|
-
var
|
|
10327
|
+
var import_react43 = require("react");
|
|
10328
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10329
|
+
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10263
10330
|
var backdropAnimationDuration = 150;
|
|
10264
10331
|
var alignVerticalMap = {
|
|
10265
10332
|
stretch: "normal",
|
|
@@ -10272,7 +10339,7 @@ var alignHorizontalMap = {
|
|
|
10272
10339
|
center: "center",
|
|
10273
10340
|
right: "end"
|
|
10274
10341
|
};
|
|
10275
|
-
var BackdropComponent =
|
|
10342
|
+
var BackdropComponent = import_styled_components61.default.div`
|
|
10276
10343
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10277
10344
|
animation-name: backdropShow;
|
|
10278
10345
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10295,8 +10362,8 @@ var BackdropComponent = import_styled_components60.default.div`
|
|
|
10295
10362
|
}
|
|
10296
10363
|
}
|
|
10297
10364
|
`;
|
|
10298
|
-
var Backdrop = (0,
|
|
10299
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
10365
|
+
var Backdrop = (0, import_react43.forwardRef)(
|
|
10366
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10300
10367
|
BackdropComponent,
|
|
10301
10368
|
{
|
|
10302
10369
|
ref,
|
|
@@ -10310,14 +10377,14 @@ var Backdrop = (0, import_react42.forwardRef)(
|
|
|
10310
10377
|
Backdrop.displayName = "Backdrop";
|
|
10311
10378
|
|
|
10312
10379
|
// src/components/Modal/Modal.tsx
|
|
10313
|
-
var
|
|
10380
|
+
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10314
10381
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10315
|
-
var ModalBody =
|
|
10382
|
+
var ModalBody = import_styled_components62.default.div`
|
|
10316
10383
|
flex-direction: column;
|
|
10317
10384
|
display: flex;
|
|
10318
10385
|
order: 2;
|
|
10319
10386
|
`;
|
|
10320
|
-
var Modal = (0,
|
|
10387
|
+
var Modal = (0, import_react44.forwardRef)(
|
|
10321
10388
|
({
|
|
10322
10389
|
children,
|
|
10323
10390
|
fullHeight = false,
|
|
@@ -10330,7 +10397,7 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10330
10397
|
width = DEFAULT_MODAL_WIDTH,
|
|
10331
10398
|
...props
|
|
10332
10399
|
}, ref) => {
|
|
10333
|
-
return /* @__PURE__ */ (0,
|
|
10400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10334
10401
|
import_react_dialog4.Root,
|
|
10335
10402
|
{
|
|
10336
10403
|
onOpenChange: (open2) => {
|
|
@@ -10339,9 +10406,9 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10339
10406
|
}
|
|
10340
10407
|
},
|
|
10341
10408
|
open: isOpen,
|
|
10342
|
-
children: /* @__PURE__ */ (0,
|
|
10343
|
-
/* @__PURE__ */ (0,
|
|
10344
|
-
/* @__PURE__ */ (0,
|
|
10409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(import_react_dialog4.Portal, { children: [
|
|
10410
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(Backdrop, {}),
|
|
10411
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(
|
|
10345
10412
|
ModalContent,
|
|
10346
10413
|
{
|
|
10347
10414
|
ref,
|
|
@@ -10357,8 +10424,8 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10357
10424
|
width,
|
|
10358
10425
|
...props,
|
|
10359
10426
|
children: [
|
|
10360
|
-
/* @__PURE__ */ (0,
|
|
10361
|
-
/* @__PURE__ */ (0,
|
|
10427
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ModalBody, { children }),
|
|
10428
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10362
10429
|
ModalHeader,
|
|
10363
10430
|
{
|
|
10364
10431
|
hideCloseButton,
|
|
@@ -10378,7 +10445,7 @@ Modal.displayName = "Modal";
|
|
|
10378
10445
|
|
|
10379
10446
|
// src/components/Popover/Popover.tsx
|
|
10380
10447
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10381
|
-
var
|
|
10448
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10382
10449
|
|
|
10383
10450
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10384
10451
|
var import_type_guards36 = require("@wistia/type-guards");
|
|
@@ -10387,9 +10454,9 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
10387
10454
|
};
|
|
10388
10455
|
|
|
10389
10456
|
// src/components/Popover/Popover.tsx
|
|
10390
|
-
var
|
|
10391
|
-
var StyledContent2 = (0,
|
|
10392
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10457
|
+
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
10458
|
+
var StyledContent2 = (0, import_styled_components63.default)(import_react_popover.Content)`
|
|
10459
|
+
${({ $unstyled }) => !$unstyled && import_styled_components63.css`
|
|
10393
10460
|
border-radius: var(--wui-border-radius-02);
|
|
10394
10461
|
padding: var(--wui-space-04);
|
|
10395
10462
|
max-width: 320px;
|
|
@@ -10413,25 +10480,25 @@ var Popover = ({
|
|
|
10413
10480
|
unstyled = false,
|
|
10414
10481
|
...props
|
|
10415
10482
|
}) => {
|
|
10416
|
-
return /* @__PURE__ */ (0,
|
|
10417
|
-
/* @__PURE__ */ (0,
|
|
10418
|
-
/* @__PURE__ */ (0,
|
|
10483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10485
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
10419
10486
|
StyledContent2,
|
|
10420
10487
|
{
|
|
10421
10488
|
sideOffset: 8,
|
|
10422
10489
|
...props,
|
|
10423
10490
|
$unstyled: unstyled,
|
|
10424
10491
|
children: [
|
|
10425
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
10492
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10426
10493
|
IconButton,
|
|
10427
10494
|
{
|
|
10428
10495
|
"data-wui-popover-close": true,
|
|
10429
10496
|
label: "Close",
|
|
10430
10497
|
variant: "ghost",
|
|
10431
|
-
children: /* @__PURE__ */ (0,
|
|
10498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { type: "close" })
|
|
10432
10499
|
}
|
|
10433
10500
|
) }),
|
|
10434
|
-
/* @__PURE__ */ (0,
|
|
10501
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)("div", { children })
|
|
10435
10502
|
]
|
|
10436
10503
|
}
|
|
10437
10504
|
) })
|
|
@@ -10440,11 +10507,11 @@ var Popover = ({
|
|
|
10440
10507
|
Popover.displayName = "Popover";
|
|
10441
10508
|
|
|
10442
10509
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10443
|
-
var
|
|
10510
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10444
10511
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10445
10512
|
var import_type_guards37 = require("@wistia/type-guards");
|
|
10446
|
-
var
|
|
10447
|
-
var ProgressBarWrapper =
|
|
10513
|
+
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10514
|
+
var ProgressBarWrapper = import_styled_components64.default.div`
|
|
10448
10515
|
--progress-bar-height: 8px;
|
|
10449
10516
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
10450
10517
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10460,7 +10527,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
10460
10527
|
const progressPercentage = progress / max * 100;
|
|
10461
10528
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
10462
10529
|
};
|
|
10463
|
-
var ProgressBarLabel =
|
|
10530
|
+
var ProgressBarLabel = import_styled_components64.default.div`
|
|
10464
10531
|
display: flex;
|
|
10465
10532
|
line-height: var(--wui-typography-label-3-line-height);
|
|
10466
10533
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -10468,7 +10535,7 @@ var ProgressBarLabel = import_styled_components63.default.div`
|
|
|
10468
10535
|
color: var(--wui-color-text-secondary);
|
|
10469
10536
|
flex-shrink: 0;
|
|
10470
10537
|
`;
|
|
10471
|
-
var StyledProgressIndicator = (0,
|
|
10538
|
+
var StyledProgressIndicator = (0, import_styled_components64.default)(import_react_progress.Indicator)`
|
|
10472
10539
|
background-color: var(--progress-bar-indicator-color);
|
|
10473
10540
|
width: 100%;
|
|
10474
10541
|
height: 100%;
|
|
@@ -10477,7 +10544,7 @@ var StyledProgressIndicator = (0, import_styled_components63.default)(import_rea
|
|
|
10477
10544
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10478
10545
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10479
10546
|
`;
|
|
10480
|
-
var StyledProgressBar = (0,
|
|
10547
|
+
var StyledProgressBar = (0, import_styled_components64.default)(import_react_progress.Root)`
|
|
10481
10548
|
position: relative;
|
|
10482
10549
|
overflow: hidden;
|
|
10483
10550
|
background: var(--progress-bar-background-color);
|
|
@@ -10496,15 +10563,15 @@ var ProgressBar = ({
|
|
|
10496
10563
|
labelRight,
|
|
10497
10564
|
...props
|
|
10498
10565
|
}) => {
|
|
10499
|
-
return /* @__PURE__ */ (0,
|
|
10500
|
-
(0, import_type_guards37.isNotNil)(labelLeft) ? /* @__PURE__ */ (0,
|
|
10501
|
-
/* @__PURE__ */ (0,
|
|
10566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(ProgressBarWrapper, { children: [
|
|
10567
|
+
(0, import_type_guards37.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10568
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10502
10569
|
StyledProgressBar,
|
|
10503
10570
|
{
|
|
10504
10571
|
max,
|
|
10505
10572
|
value: progress,
|
|
10506
10573
|
...props,
|
|
10507
|
-
children: /* @__PURE__ */ (0,
|
|
10574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10508
10575
|
StyledProgressIndicator,
|
|
10509
10576
|
{
|
|
10510
10577
|
$max: max,
|
|
@@ -10513,17 +10580,17 @@ var ProgressBar = ({
|
|
|
10513
10580
|
)
|
|
10514
10581
|
}
|
|
10515
10582
|
),
|
|
10516
|
-
(0, import_type_guards37.isNotNil)(labelRight) ? /* @__PURE__ */ (0,
|
|
10583
|
+
(0, import_type_guards37.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10517
10584
|
] });
|
|
10518
10585
|
};
|
|
10519
10586
|
ProgressBar.displayName = "ProgressBar";
|
|
10520
10587
|
|
|
10521
10588
|
// src/components/Radio/Radio.tsx
|
|
10522
|
-
var
|
|
10523
|
-
var
|
|
10589
|
+
var import_react45 = require("react");
|
|
10590
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10524
10591
|
var import_type_guards38 = require("@wistia/type-guards");
|
|
10525
|
-
var
|
|
10526
|
-
var RadioIcon = () => /* @__PURE__ */ (0,
|
|
10592
|
+
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10593
|
+
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10527
10594
|
"svg",
|
|
10528
10595
|
{
|
|
10529
10596
|
fill: "inherit",
|
|
@@ -10531,7 +10598,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
|
10531
10598
|
viewBox: "0 0 1 1",
|
|
10532
10599
|
width: "1",
|
|
10533
10600
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10534
|
-
children: /* @__PURE__ */ (0,
|
|
10601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10535
10602
|
"circle",
|
|
10536
10603
|
{
|
|
10537
10604
|
cx: "0.5",
|
|
@@ -10542,7 +10609,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
|
10542
10609
|
)
|
|
10543
10610
|
}
|
|
10544
10611
|
);
|
|
10545
|
-
var sizeSmall2 =
|
|
10612
|
+
var sizeSmall2 = import_styled_components65.css`
|
|
10546
10613
|
width: 14px;
|
|
10547
10614
|
height: 14px;
|
|
10548
10615
|
min-width: 14px;
|
|
@@ -10553,7 +10620,7 @@ var sizeSmall2 = import_styled_components64.css`
|
|
|
10553
10620
|
height: 7px;
|
|
10554
10621
|
}
|
|
10555
10622
|
`;
|
|
10556
|
-
var sizeMedium2 =
|
|
10623
|
+
var sizeMedium2 = import_styled_components65.css`
|
|
10557
10624
|
width: 16px;
|
|
10558
10625
|
height: 16px;
|
|
10559
10626
|
min-width: 16px;
|
|
@@ -10564,7 +10631,7 @@ var sizeMedium2 = import_styled_components64.css`
|
|
|
10564
10631
|
height: 8px;
|
|
10565
10632
|
}
|
|
10566
10633
|
`;
|
|
10567
|
-
var sizeLarge2 =
|
|
10634
|
+
var sizeLarge2 = import_styled_components65.css`
|
|
10568
10635
|
width: 20px;
|
|
10569
10636
|
height: 20px;
|
|
10570
10637
|
min-width: 20px;
|
|
@@ -10580,14 +10647,14 @@ var getSizeCss2 = (size) => {
|
|
|
10580
10647
|
if (size === "lg") return sizeLarge2;
|
|
10581
10648
|
return sizeMedium2;
|
|
10582
10649
|
};
|
|
10583
|
-
var StyledRadioWrapper =
|
|
10650
|
+
var StyledRadioWrapper = import_styled_components65.default.div`
|
|
10584
10651
|
display: flex;
|
|
10585
10652
|
margin: 0;
|
|
10586
10653
|
|
|
10587
10654
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
10588
10655
|
user-select: none;
|
|
10589
10656
|
`;
|
|
10590
|
-
var StyledRadioInput =
|
|
10657
|
+
var StyledRadioInput = import_styled_components65.default.div`
|
|
10591
10658
|
${({ $size }) => getSizeCss2($size)}
|
|
10592
10659
|
line-height: 0;
|
|
10593
10660
|
margin: 0;
|
|
@@ -10609,7 +10676,7 @@ var StyledRadioInput = import_styled_components64.default.div`
|
|
|
10609
10676
|
}
|
|
10610
10677
|
}
|
|
10611
10678
|
`;
|
|
10612
|
-
var StyledHiddenRadioInput =
|
|
10679
|
+
var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
10613
10680
|
${visuallyHiddenStyle}
|
|
10614
10681
|
|
|
10615
10682
|
/* toggles display of faux-input border-color */
|
|
@@ -10622,7 +10689,7 @@ var StyledHiddenRadioInput = import_styled_components64.default.input`
|
|
|
10622
10689
|
display: block;
|
|
10623
10690
|
}
|
|
10624
10691
|
`;
|
|
10625
|
-
var Radio = (0,
|
|
10692
|
+
var Radio = (0, import_react45.forwardRef)(
|
|
10626
10693
|
({
|
|
10627
10694
|
checked,
|
|
10628
10695
|
disabled = false,
|
|
@@ -10637,15 +10704,15 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10637
10704
|
hideLabel = false,
|
|
10638
10705
|
...props
|
|
10639
10706
|
}, ref) => {
|
|
10640
|
-
const generatedId = (0,
|
|
10707
|
+
const generatedId = (0, import_react45.useId)();
|
|
10641
10708
|
const computedId = (0, import_type_guards38.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10642
|
-
return /* @__PURE__ */ (0,
|
|
10709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10643
10710
|
StyledRadioWrapper,
|
|
10644
10711
|
{
|
|
10645
10712
|
$disabled: disabled,
|
|
10646
10713
|
"aria-invalid": props["aria-invalid"],
|
|
10647
10714
|
children: [
|
|
10648
|
-
/* @__PURE__ */ (0,
|
|
10715
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10649
10716
|
StyledHiddenRadioInput,
|
|
10650
10717
|
{
|
|
10651
10718
|
...props,
|
|
@@ -10660,16 +10727,16 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10660
10727
|
value
|
|
10661
10728
|
}
|
|
10662
10729
|
),
|
|
10663
|
-
/* @__PURE__ */ (0,
|
|
10730
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10664
10731
|
FormControlLabel,
|
|
10665
10732
|
{
|
|
10666
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
10733
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10667
10734
|
StyledRadioInput,
|
|
10668
10735
|
{
|
|
10669
10736
|
$disabled: disabled,
|
|
10670
10737
|
$size: size,
|
|
10671
10738
|
"data-wui-faux-input": "true",
|
|
10672
|
-
children: /* @__PURE__ */ (0,
|
|
10739
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(RadioIcon, {})
|
|
10673
10740
|
}
|
|
10674
10741
|
),
|
|
10675
10742
|
description,
|
|
@@ -10687,32 +10754,32 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10687
10754
|
Radio.displayName = "Radio";
|
|
10688
10755
|
|
|
10689
10756
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10690
|
-
var
|
|
10691
|
-
var
|
|
10757
|
+
var import_react49 = require("react");
|
|
10758
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10692
10759
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10693
10760
|
var import_type_guards39 = require("@wistia/type-guards");
|
|
10694
10761
|
|
|
10695
10762
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10696
|
-
var
|
|
10697
|
-
var
|
|
10698
|
-
var SelectedItemMeasurementsContext = (0,
|
|
10763
|
+
var import_react46 = require("react");
|
|
10764
|
+
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10765
|
+
var SelectedItemMeasurementsContext = (0, import_react46.createContext)(
|
|
10699
10766
|
null
|
|
10700
10767
|
);
|
|
10701
10768
|
var SelectedItemMeasurementsProvider = ({
|
|
10702
10769
|
children
|
|
10703
10770
|
}) => {
|
|
10704
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
10705
|
-
const contextValue = (0,
|
|
10771
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react46.useState)(null);
|
|
10772
|
+
const contextValue = (0, import_react46.useMemo)(
|
|
10706
10773
|
() => ({
|
|
10707
10774
|
setSelectedItemMeasurements,
|
|
10708
10775
|
selectedItemMeasurements
|
|
10709
10776
|
}),
|
|
10710
10777
|
[selectedItemMeasurements]
|
|
10711
10778
|
);
|
|
10712
|
-
return /* @__PURE__ */ (0,
|
|
10779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10713
10780
|
};
|
|
10714
10781
|
var useSelectedItemMeasurements = () => {
|
|
10715
|
-
const context = (0,
|
|
10782
|
+
const context = (0, import_react46.useContext)(SelectedItemMeasurementsContext);
|
|
10716
10783
|
if (context === null) {
|
|
10717
10784
|
throw new Error(
|
|
10718
10785
|
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
@@ -10722,15 +10789,15 @@ var useSelectedItemMeasurements = () => {
|
|
|
10722
10789
|
};
|
|
10723
10790
|
|
|
10724
10791
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10725
|
-
var
|
|
10726
|
-
var
|
|
10792
|
+
var import_react48 = require("react");
|
|
10793
|
+
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10727
10794
|
|
|
10728
10795
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10729
|
-
var
|
|
10730
|
-
var SegmentedControlValueContext = (0,
|
|
10796
|
+
var import_react47 = require("react");
|
|
10797
|
+
var SegmentedControlValueContext = (0, import_react47.createContext)(null);
|
|
10731
10798
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
10732
10799
|
var useSegmentedControlValue = () => {
|
|
10733
|
-
const context = (0,
|
|
10800
|
+
const context = (0, import_react47.useContext)(SegmentedControlValueContext);
|
|
10734
10801
|
if (context === null) {
|
|
10735
10802
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
10736
10803
|
}
|
|
@@ -10738,8 +10805,8 @@ var useSegmentedControlValue = () => {
|
|
|
10738
10805
|
};
|
|
10739
10806
|
|
|
10740
10807
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10741
|
-
var
|
|
10742
|
-
var SelectedItemIndicatorDiv =
|
|
10808
|
+
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
10809
|
+
var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
10743
10810
|
background-color: var(--wui-color-bg-fill-white);
|
|
10744
10811
|
border-radius: var(--wui-border-radius-rounded);
|
|
10745
10812
|
left: 0;
|
|
@@ -10754,7 +10821,7 @@ var SelectedItemIndicatorDiv = import_styled_components65.default.div`
|
|
|
10754
10821
|
var SelectedItemIndicator = () => {
|
|
10755
10822
|
const selectedValue = useSegmentedControlValue();
|
|
10756
10823
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10757
|
-
const selectedItemIndicatorStyle = (0,
|
|
10824
|
+
const selectedItemIndicatorStyle = (0, import_react48.useMemo)(
|
|
10758
10825
|
() => selectedItemMeasurements != null ? {
|
|
10759
10826
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10760
10827
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10765,7 +10832,7 @@ var SelectedItemIndicator = () => {
|
|
|
10765
10832
|
if (!selectedValue) {
|
|
10766
10833
|
return null;
|
|
10767
10834
|
}
|
|
10768
|
-
return /* @__PURE__ */ (0,
|
|
10835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
10769
10836
|
SelectedItemIndicatorDiv,
|
|
10770
10837
|
{
|
|
10771
10838
|
style: {
|
|
@@ -10778,8 +10845,8 @@ var SelectedItemIndicator = () => {
|
|
|
10778
10845
|
};
|
|
10779
10846
|
|
|
10780
10847
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10781
|
-
var
|
|
10782
|
-
var segmentedControlStyles =
|
|
10848
|
+
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
10849
|
+
var segmentedControlStyles = import_styled_components67.css`
|
|
10783
10850
|
display: inline-flex;
|
|
10784
10851
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10785
10852
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10789,10 +10856,10 @@ var segmentedControlStyles = import_styled_components66.css`
|
|
|
10789
10856
|
position: relative;
|
|
10790
10857
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10791
10858
|
`;
|
|
10792
|
-
var StyledSegmentedControl = (0,
|
|
10859
|
+
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10793
10860
|
${segmentedControlStyles}
|
|
10794
10861
|
`;
|
|
10795
|
-
var SegmentedControl = (0,
|
|
10862
|
+
var SegmentedControl = (0, import_react49.forwardRef)(
|
|
10796
10863
|
({
|
|
10797
10864
|
children,
|
|
10798
10865
|
disabled = false,
|
|
@@ -10804,7 +10871,7 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10804
10871
|
if ((0, import_type_guards39.isNil)(children)) {
|
|
10805
10872
|
return null;
|
|
10806
10873
|
}
|
|
10807
|
-
return /* @__PURE__ */ (0,
|
|
10874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
10808
10875
|
StyledSegmentedControl,
|
|
10809
10876
|
{
|
|
10810
10877
|
ref,
|
|
@@ -10816,8 +10883,8 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10816
10883
|
type: "single",
|
|
10817
10884
|
value: selectedValue,
|
|
10818
10885
|
...props,
|
|
10819
|
-
children: /* @__PURE__ */ (0,
|
|
10820
|
-
/* @__PURE__ */ (0,
|
|
10886
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
10887
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SelectedItemIndicator, {}),
|
|
10821
10888
|
children
|
|
10822
10889
|
] }) })
|
|
10823
10890
|
}
|
|
@@ -10827,8 +10894,8 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10827
10894
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10828
10895
|
|
|
10829
10896
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10830
|
-
var
|
|
10831
|
-
var
|
|
10897
|
+
var import_react50 = require("react");
|
|
10898
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10832
10899
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10833
10900
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10834
10901
|
|
|
@@ -10847,8 +10914,8 @@ var mergeRefs = (refs) => (value) => {
|
|
|
10847
10914
|
};
|
|
10848
10915
|
|
|
10849
10916
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10850
|
-
var
|
|
10851
|
-
var segmentedControlItemStyles =
|
|
10917
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
10918
|
+
var segmentedControlItemStyles = import_styled_components68.css`
|
|
10852
10919
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10853
10920
|
align-items: center;
|
|
10854
10921
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10907,14 +10974,14 @@ var segmentedControlItemStyles = import_styled_components67.css`
|
|
|
10907
10974
|
}
|
|
10908
10975
|
}
|
|
10909
10976
|
`;
|
|
10910
|
-
var StyledSegmentedControlItem = (0,
|
|
10977
|
+
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10911
10978
|
${segmentedControlItemStyles}
|
|
10912
10979
|
`;
|
|
10913
|
-
var SegmentedControlItem = (0,
|
|
10980
|
+
var SegmentedControlItem = (0, import_react50.forwardRef)(
|
|
10914
10981
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10915
10982
|
const selectedValue = useSegmentedControlValue();
|
|
10916
10983
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10917
|
-
const buttonRef = (0,
|
|
10984
|
+
const buttonRef = (0, import_react50.useRef)(null);
|
|
10918
10985
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10919
10986
|
const handleClick = (event) => {
|
|
10920
10987
|
const target = event.target;
|
|
@@ -10923,7 +10990,7 @@ var SegmentedControlItem = (0, import_react49.forwardRef)(
|
|
|
10923
10990
|
event.preventDefault();
|
|
10924
10991
|
}
|
|
10925
10992
|
};
|
|
10926
|
-
(0,
|
|
10993
|
+
(0, import_react50.useEffect)(() => {
|
|
10927
10994
|
const buttonElem = buttonRef.current;
|
|
10928
10995
|
if (!buttonElem) {
|
|
10929
10996
|
return void 0;
|
|
@@ -10948,7 +11015,7 @@ var SegmentedControlItem = (0, import_react49.forwardRef)(
|
|
|
10948
11015
|
resizeObserver.disconnect();
|
|
10949
11016
|
};
|
|
10950
11017
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10951
|
-
return /* @__PURE__ */ (0,
|
|
11018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(
|
|
10952
11019
|
StyledSegmentedControlItem,
|
|
10953
11020
|
{
|
|
10954
11021
|
ref: combinedRef,
|
|
@@ -10969,10 +11036,10 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
10969
11036
|
|
|
10970
11037
|
// src/components/Select/Select.tsx
|
|
10971
11038
|
var import_react_select = require("@radix-ui/react-select");
|
|
10972
|
-
var
|
|
10973
|
-
var
|
|
10974
|
-
var
|
|
10975
|
-
var StyledTrigger = (0,
|
|
11039
|
+
var import_react51 = require("react");
|
|
11040
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11041
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11042
|
+
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
10976
11043
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10977
11044
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10978
11045
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -11020,7 +11087,7 @@ var StyledTrigger = (0, import_styled_components68.default)(import_react_select.
|
|
|
11020
11087
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
11021
11088
|
}
|
|
11022
11089
|
`;
|
|
11023
|
-
var StyledContent3 = (0,
|
|
11090
|
+
var StyledContent3 = (0, import_styled_components69.default)(import_react_select.Content)`
|
|
11024
11091
|
--wui-select-content-border: var(--wui-color-border);
|
|
11025
11092
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11026
11093
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -11038,7 +11105,7 @@ var StyledContent3 = (0, import_styled_components68.default)(import_react_select
|
|
|
11038
11105
|
max-height: var(--radix-select-content-available-height);
|
|
11039
11106
|
z-index: var(--wui-zindex-select);
|
|
11040
11107
|
`;
|
|
11041
|
-
var Select = (0,
|
|
11108
|
+
var Select = (0, import_react51.forwardRef)(
|
|
11042
11109
|
({
|
|
11043
11110
|
colorScheme = "inherit",
|
|
11044
11111
|
children,
|
|
@@ -11048,13 +11115,13 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11048
11115
|
...props
|
|
11049
11116
|
}, forwardedRef) => {
|
|
11050
11117
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11051
|
-
return /* @__PURE__ */ (0,
|
|
11118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11052
11119
|
import_react_select.Root,
|
|
11053
11120
|
{
|
|
11054
11121
|
...props,
|
|
11055
11122
|
onValueChange: onChange,
|
|
11056
11123
|
children: [
|
|
11057
|
-
/* @__PURE__ */ (0,
|
|
11124
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11058
11125
|
StyledTrigger,
|
|
11059
11126
|
{
|
|
11060
11127
|
ref: forwardedRef,
|
|
@@ -11062,8 +11129,8 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11062
11129
|
$fullWidth: responsiveFullWidth,
|
|
11063
11130
|
...props,
|
|
11064
11131
|
children: [
|
|
11065
|
-
/* @__PURE__ */ (0,
|
|
11066
|
-
/* @__PURE__ */ (0,
|
|
11132
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Value, { placeholder }),
|
|
11133
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
|
|
11067
11134
|
Icon,
|
|
11068
11135
|
{
|
|
11069
11136
|
size: "md",
|
|
@@ -11073,10 +11140,10 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11073
11140
|
]
|
|
11074
11141
|
}
|
|
11075
11142
|
),
|
|
11076
|
-
/* @__PURE__ */ (0,
|
|
11077
|
-
/* @__PURE__ */ (0,
|
|
11078
|
-
/* @__PURE__ */ (0,
|
|
11079
|
-
/* @__PURE__ */ (0,
|
|
11143
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(StyledContent3, { position: "popper", children: [
|
|
11144
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-up" }) }),
|
|
11145
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Viewport, { children }),
|
|
11146
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-down" }) })
|
|
11080
11147
|
] }) })
|
|
11081
11148
|
]
|
|
11082
11149
|
}
|
|
@@ -11087,10 +11154,10 @@ Select.displayName = "Select";
|
|
|
11087
11154
|
|
|
11088
11155
|
// src/components/Select/SelectOption.tsx
|
|
11089
11156
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11090
|
-
var
|
|
11091
|
-
var
|
|
11092
|
-
var
|
|
11093
|
-
var StyledItem = (0,
|
|
11157
|
+
var import_react52 = require("react");
|
|
11158
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11159
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11160
|
+
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
11094
11161
|
${variantStyleMap2.body3};
|
|
11095
11162
|
display: flex;
|
|
11096
11163
|
padding: var(--wui-select-option-padding);
|
|
@@ -11113,25 +11180,25 @@ var StyledItem = (0, import_styled_components69.default)(import_react_select2.It
|
|
|
11113
11180
|
background-color: transparent;
|
|
11114
11181
|
}
|
|
11115
11182
|
`;
|
|
11116
|
-
var StyledIconContainer =
|
|
11183
|
+
var StyledIconContainer = import_styled_components70.default.span`
|
|
11117
11184
|
width: 12px;
|
|
11118
11185
|
`;
|
|
11119
|
-
var SelectOption = (0,
|
|
11186
|
+
var SelectOption = (0, import_react52.forwardRef)(
|
|
11120
11187
|
({ children, ...props }, forwardedRef) => {
|
|
11121
|
-
return /* @__PURE__ */ (0,
|
|
11188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11122
11189
|
StyledItem,
|
|
11123
11190
|
{
|
|
11124
11191
|
...props,
|
|
11125
11192
|
ref: forwardedRef,
|
|
11126
11193
|
children: [
|
|
11127
|
-
/* @__PURE__ */ (0,
|
|
11194
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(
|
|
11128
11195
|
Icon,
|
|
11129
11196
|
{
|
|
11130
11197
|
size: "sm",
|
|
11131
11198
|
type: "checkmark"
|
|
11132
11199
|
}
|
|
11133
11200
|
) }) }),
|
|
11134
|
-
/* @__PURE__ */ (0,
|
|
11201
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
|
|
11135
11202
|
]
|
|
11136
11203
|
}
|
|
11137
11204
|
);
|
|
@@ -11141,14 +11208,14 @@ SelectOption.displayName = "Option";
|
|
|
11141
11208
|
|
|
11142
11209
|
// src/components/Select/SelectOptionGroup.tsx
|
|
11143
11210
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
11144
|
-
var
|
|
11145
|
-
var
|
|
11146
|
-
var StyledLabel4 = (0,
|
|
11211
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
11212
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11213
|
+
var StyledLabel4 = (0, import_styled_components71.default)(import_react_select3.Label)`
|
|
11147
11214
|
padding: var(--wui-select-option-padding);
|
|
11148
11215
|
`;
|
|
11149
11216
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11150
|
-
return /* @__PURE__ */ (0,
|
|
11151
|
-
/* @__PURE__ */ (0,
|
|
11217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
11152
11219
|
Text,
|
|
11153
11220
|
{
|
|
11154
11221
|
prominence: "secondary",
|
|
@@ -11161,11 +11228,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11161
11228
|
};
|
|
11162
11229
|
|
|
11163
11230
|
// src/components/Switch/Switch.tsx
|
|
11164
|
-
var
|
|
11165
|
-
var
|
|
11231
|
+
var import_react53 = require("react");
|
|
11232
|
+
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11166
11233
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
11167
|
-
var
|
|
11168
|
-
var sizeSmall3 =
|
|
11234
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11235
|
+
var sizeSmall3 = import_styled_components72.css`
|
|
11169
11236
|
--wui-size-small-width: 24px;
|
|
11170
11237
|
--wui-size-small-height: 14px;
|
|
11171
11238
|
|
|
@@ -11180,7 +11247,7 @@ var sizeSmall3 = import_styled_components71.css`
|
|
|
11180
11247
|
height: calc(var(--wui-size-small-width) / 2);
|
|
11181
11248
|
}
|
|
11182
11249
|
`;
|
|
11183
|
-
var sizeMedium3 =
|
|
11250
|
+
var sizeMedium3 = import_styled_components72.css`
|
|
11184
11251
|
--wui-size-medium-width: 32px;
|
|
11185
11252
|
--wui-size-medium-height: 18px;
|
|
11186
11253
|
|
|
@@ -11195,7 +11262,7 @@ var sizeMedium3 = import_styled_components71.css`
|
|
|
11195
11262
|
height: calc(var(--wui-size-medium-width) / 2);
|
|
11196
11263
|
}
|
|
11197
11264
|
`;
|
|
11198
|
-
var sizeLarge3 =
|
|
11265
|
+
var sizeLarge3 = import_styled_components72.css`
|
|
11199
11266
|
--wui-size-large-width: 40px;
|
|
11200
11267
|
--wui-size-large-height: 22px;
|
|
11201
11268
|
|
|
@@ -11215,14 +11282,14 @@ var getSizeCss3 = (size) => {
|
|
|
11215
11282
|
if (size === "lg") return sizeLarge3;
|
|
11216
11283
|
return sizeMedium3;
|
|
11217
11284
|
};
|
|
11218
|
-
var StyledSwitchWrapper =
|
|
11285
|
+
var StyledSwitchWrapper = import_styled_components72.default.div`
|
|
11219
11286
|
display: flex;
|
|
11220
11287
|
margin: 0;
|
|
11221
11288
|
|
|
11222
11289
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11223
11290
|
user-select: none;
|
|
11224
11291
|
`;
|
|
11225
|
-
var StyledSwitchInput =
|
|
11292
|
+
var StyledSwitchInput = import_styled_components72.default.div`
|
|
11226
11293
|
${({ $size }) => getSizeCss3($size)}
|
|
11227
11294
|
line-height: 0;
|
|
11228
11295
|
margin: 0;
|
|
@@ -11250,7 +11317,7 @@ var StyledSwitchInput = import_styled_components71.default.div`
|
|
|
11250
11317
|
transition: all 0.2s ease-in-out;
|
|
11251
11318
|
}
|
|
11252
11319
|
`;
|
|
11253
|
-
var StyledHiddenSwitchInput =
|
|
11320
|
+
var StyledHiddenSwitchInput = import_styled_components72.default.input`
|
|
11254
11321
|
${visuallyHiddenStyle}
|
|
11255
11322
|
|
|
11256
11323
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -11266,7 +11333,7 @@ var StyledHiddenSwitchInput = import_styled_components71.default.input`
|
|
|
11266
11333
|
}
|
|
11267
11334
|
}
|
|
11268
11335
|
`;
|
|
11269
|
-
var Switch = (0,
|
|
11336
|
+
var Switch = (0, import_react53.forwardRef)(
|
|
11270
11337
|
({
|
|
11271
11338
|
checked,
|
|
11272
11339
|
disabled = false,
|
|
@@ -11281,10 +11348,10 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11281
11348
|
hideLabel = false,
|
|
11282
11349
|
...props
|
|
11283
11350
|
}, ref) => {
|
|
11284
|
-
const generatedId = (0,
|
|
11351
|
+
const generatedId = (0, import_react53.useId)();
|
|
11285
11352
|
const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11286
|
-
return /* @__PURE__ */ (0,
|
|
11287
|
-
/* @__PURE__ */ (0,
|
|
11353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11288
11355
|
StyledHiddenSwitchInput,
|
|
11289
11356
|
{
|
|
11290
11357
|
...props,
|
|
@@ -11299,10 +11366,10 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11299
11366
|
value
|
|
11300
11367
|
}
|
|
11301
11368
|
),
|
|
11302
|
-
/* @__PURE__ */ (0,
|
|
11369
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11303
11370
|
FormControlLabel,
|
|
11304
11371
|
{
|
|
11305
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
11372
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11306
11373
|
StyledSwitchInput,
|
|
11307
11374
|
{
|
|
11308
11375
|
$disabled: disabled,
|
|
@@ -11324,19 +11391,19 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11324
11391
|
Switch.displayName = "Switch";
|
|
11325
11392
|
|
|
11326
11393
|
// src/components/Table/Table.tsx
|
|
11327
|
-
var
|
|
11328
|
-
var
|
|
11329
|
-
var StyledTable =
|
|
11394
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11395
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
11396
|
+
var StyledTable = import_styled_components73.default.table`
|
|
11330
11397
|
width: 100%;
|
|
11331
11398
|
border-collapse: collapse;
|
|
11332
11399
|
|
|
11333
|
-
${({ $striped }) => $striped &&
|
|
11400
|
+
${({ $striped }) => $striped && import_styled_components73.css`
|
|
11334
11401
|
tbody tr:nth-child(even) {
|
|
11335
11402
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11336
11403
|
}
|
|
11337
11404
|
`}
|
|
11338
11405
|
|
|
11339
|
-
${({ $divided }) => $divided &&
|
|
11406
|
+
${({ $divided }) => $divided && import_styled_components73.css`
|
|
11340
11407
|
tr {
|
|
11341
11408
|
border-bottom: 1px solid var(--wui-color-border);
|
|
11342
11409
|
}
|
|
@@ -11348,7 +11415,7 @@ var Table = ({
|
|
|
11348
11415
|
divided = false,
|
|
11349
11416
|
...props
|
|
11350
11417
|
}) => {
|
|
11351
|
-
return /* @__PURE__ */ (0,
|
|
11418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
11352
11419
|
StyledTable,
|
|
11353
11420
|
{
|
|
11354
11421
|
$divided: divided,
|
|
@@ -11360,88 +11427,88 @@ var Table = ({
|
|
|
11360
11427
|
};
|
|
11361
11428
|
|
|
11362
11429
|
// src/components/Table/TableBody.tsx
|
|
11363
|
-
var
|
|
11430
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11364
11431
|
|
|
11365
11432
|
// src/components/Table/TableSectionContext.ts
|
|
11366
|
-
var
|
|
11367
|
-
var TableSectionContext = (0,
|
|
11433
|
+
var import_react54 = require("react");
|
|
11434
|
+
var TableSectionContext = (0, import_react54.createContext)(null);
|
|
11368
11435
|
|
|
11369
11436
|
// src/components/Table/TableBody.tsx
|
|
11370
|
-
var
|
|
11371
|
-
var StyledTbody =
|
|
11437
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
11438
|
+
var StyledTbody = import_styled_components74.default.tbody``;
|
|
11372
11439
|
var TableBody = ({ children, ...props }) => {
|
|
11373
|
-
return /* @__PURE__ */ (0,
|
|
11440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(StyledTbody, { ...props, children }) });
|
|
11374
11441
|
};
|
|
11375
11442
|
|
|
11376
11443
|
// src/components/Table/TableCell.tsx
|
|
11377
|
-
var
|
|
11378
|
-
var
|
|
11379
|
-
var
|
|
11380
|
-
var sharedStyles =
|
|
11444
|
+
var import_react55 = require("react");
|
|
11445
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11446
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11447
|
+
var sharedStyles = import_styled_components75.css`
|
|
11381
11448
|
color: var(--wui-color-text);
|
|
11382
11449
|
padding: var(--wui-space-02);
|
|
11383
11450
|
text-align: left;
|
|
11384
11451
|
`;
|
|
11385
|
-
var StyledTh =
|
|
11452
|
+
var StyledTh = import_styled_components75.default.th`
|
|
11386
11453
|
${sharedStyles}
|
|
11387
11454
|
font-size: var(--wui-typography-body-4-size);
|
|
11388
11455
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11389
11456
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11390
11457
|
`;
|
|
11391
|
-
var StyledTd =
|
|
11458
|
+
var StyledTd = import_styled_components75.default.td`
|
|
11392
11459
|
${sharedStyles}
|
|
11393
11460
|
font-size: var(--wui-typography-body-2-size);
|
|
11394
11461
|
font-weight: var(--wui-typography-body-2-weight);
|
|
11395
11462
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11396
11463
|
`;
|
|
11397
11464
|
var TableCell = ({ children, ...props }) => {
|
|
11398
|
-
const section = (0,
|
|
11465
|
+
const section = (0, import_react55.useContext)(TableSectionContext);
|
|
11399
11466
|
if (section === "head") {
|
|
11400
|
-
return /* @__PURE__ */ (0,
|
|
11467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTh, { ...props, children });
|
|
11401
11468
|
}
|
|
11402
|
-
return /* @__PURE__ */ (0,
|
|
11469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTd, { ...props, children });
|
|
11403
11470
|
};
|
|
11404
11471
|
|
|
11405
11472
|
// src/components/Table/TableFooter.tsx
|
|
11406
|
-
var
|
|
11407
|
-
var
|
|
11408
|
-
var StyledTfoot =
|
|
11473
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
11474
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11475
|
+
var StyledTfoot = import_styled_components76.default.tfoot``;
|
|
11409
11476
|
var TableFooter = ({ children, ...props }) => {
|
|
11410
|
-
return /* @__PURE__ */ (0,
|
|
11477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTfoot, { ...props, children }) });
|
|
11411
11478
|
};
|
|
11412
11479
|
|
|
11413
11480
|
// src/components/Table/TableHead.tsx
|
|
11414
|
-
var
|
|
11415
|
-
var
|
|
11416
|
-
var StyledThead =
|
|
11481
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
11482
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11483
|
+
var StyledThead = import_styled_components77.default.thead``;
|
|
11417
11484
|
var TableHead = ({ children, ...props }) => {
|
|
11418
|
-
return /* @__PURE__ */ (0,
|
|
11485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledThead, { ...props, children }) });
|
|
11419
11486
|
};
|
|
11420
11487
|
|
|
11421
11488
|
// src/components/Table/TableRow.tsx
|
|
11422
|
-
var
|
|
11423
|
-
var
|
|
11424
|
-
var StyledTr =
|
|
11489
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
11490
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11491
|
+
var StyledTr = import_styled_components78.default.tr``;
|
|
11425
11492
|
var TableRow = ({ children, ...props }) => {
|
|
11426
|
-
return /* @__PURE__ */ (0,
|
|
11493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StyledTr, { ...props, children });
|
|
11427
11494
|
};
|
|
11428
11495
|
|
|
11429
11496
|
// src/components/Tabs/Tabs.tsx
|
|
11430
|
-
var
|
|
11497
|
+
var import_react60 = require("react");
|
|
11431
11498
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11432
11499
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
11433
|
-
var
|
|
11500
|
+
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11434
11501
|
|
|
11435
11502
|
// src/components/Tabs/TabPanel.tsx
|
|
11436
|
-
var
|
|
11503
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11437
11504
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
11438
|
-
var
|
|
11439
|
-
var StyledTabPanel = (0,
|
|
11505
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
11506
|
+
var StyledTabPanel = (0, import_styled_components79.default)(import_react_tabs.Content)`
|
|
11440
11507
|
display: flex;
|
|
11441
11508
|
flex-direction: column;
|
|
11442
11509
|
`;
|
|
11443
11510
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11444
|
-
return /* @__PURE__ */ (0,
|
|
11511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
11445
11512
|
StyledTabPanel,
|
|
11446
11513
|
{
|
|
11447
11514
|
value,
|
|
@@ -11453,10 +11520,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11453
11520
|
TabPanel.displayName = "TabPanel";
|
|
11454
11521
|
|
|
11455
11522
|
// src/components/Tabs/TabList.tsx
|
|
11456
|
-
var
|
|
11523
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11457
11524
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
11458
|
-
var
|
|
11459
|
-
var StyledTabList = (0,
|
|
11525
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
11526
|
+
var StyledTabList = (0, import_styled_components80.default)(import_react_tabs2.List)`
|
|
11460
11527
|
${segmentedControlStyles}
|
|
11461
11528
|
|
|
11462
11529
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11469,7 +11536,7 @@ var TabList = ({
|
|
|
11469
11536
|
ariaLabel,
|
|
11470
11537
|
...props
|
|
11471
11538
|
}) => {
|
|
11472
|
-
return /* @__PURE__ */ (0,
|
|
11539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11473
11540
|
StyledTabList,
|
|
11474
11541
|
{
|
|
11475
11542
|
$fullWidth: fullWidth,
|
|
@@ -11482,17 +11549,17 @@ var TabList = ({
|
|
|
11482
11549
|
TabList.displayName = "TabList";
|
|
11483
11550
|
|
|
11484
11551
|
// src/components/Tabs/TabItem.tsx
|
|
11485
|
-
var
|
|
11486
|
-
var
|
|
11552
|
+
var import_react57 = require("react");
|
|
11553
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11487
11554
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11488
11555
|
var import_type_guards43 = require("@wistia/type-guards");
|
|
11489
11556
|
|
|
11490
11557
|
// src/components/Tabs/useTabsValue.tsx
|
|
11491
|
-
var
|
|
11492
|
-
var TabsValueContext = (0,
|
|
11558
|
+
var import_react56 = require("react");
|
|
11559
|
+
var TabsValueContext = (0, import_react56.createContext)(null);
|
|
11493
11560
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11494
11561
|
var useTabsValue = () => {
|
|
11495
|
-
const context = (0,
|
|
11562
|
+
const context = (0, import_react56.useContext)(TabsValueContext);
|
|
11496
11563
|
if (context === null) {
|
|
11497
11564
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11498
11565
|
}
|
|
@@ -11500,21 +11567,21 @@ var useTabsValue = () => {
|
|
|
11500
11567
|
};
|
|
11501
11568
|
|
|
11502
11569
|
// src/components/Tabs/TabItem.tsx
|
|
11503
|
-
var
|
|
11504
|
-
var StyledTabItem = (0,
|
|
11570
|
+
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
11571
|
+
var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.Trigger)`
|
|
11505
11572
|
${segmentedControlItemStyles}
|
|
11506
11573
|
|
|
11507
11574
|
&:focus-visible {
|
|
11508
11575
|
outline: none;
|
|
11509
11576
|
}
|
|
11510
11577
|
`;
|
|
11511
|
-
var TabItem = (0,
|
|
11578
|
+
var TabItem = (0, import_react57.forwardRef)(
|
|
11512
11579
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11513
11580
|
const selectedValue = useTabsValue();
|
|
11514
11581
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11515
|
-
const buttonRef = (0,
|
|
11582
|
+
const buttonRef = (0, import_react57.useRef)(null);
|
|
11516
11583
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11517
|
-
(0,
|
|
11584
|
+
(0, import_react57.useEffect)(() => {
|
|
11518
11585
|
const buttonElem = buttonRef.current;
|
|
11519
11586
|
if (!buttonElem) {
|
|
11520
11587
|
return void 0;
|
|
@@ -11539,7 +11606,7 @@ var TabItem = (0, import_react56.forwardRef)(
|
|
|
11539
11606
|
resizeObserver.disconnect();
|
|
11540
11607
|
};
|
|
11541
11608
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11542
|
-
return /* @__PURE__ */ (0,
|
|
11609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
11543
11610
|
StyledTabItem,
|
|
11544
11611
|
{
|
|
11545
11612
|
ref: combinedRef,
|
|
@@ -11558,16 +11625,16 @@ var TabItem = (0, import_react56.forwardRef)(
|
|
|
11558
11625
|
TabItem.displayName = "TabItem";
|
|
11559
11626
|
|
|
11560
11627
|
// src/components/Tabs/extractTabItems.ts
|
|
11561
|
-
var
|
|
11628
|
+
var import_react58 = require("react");
|
|
11562
11629
|
var extractTabItems = (children) => {
|
|
11563
11630
|
const tabItems = [];
|
|
11564
|
-
|
|
11565
|
-
if (!(0,
|
|
11631
|
+
import_react58.Children.forEach(children, (child) => {
|
|
11632
|
+
if (!(0, import_react58.isValidElement)(child)) {
|
|
11566
11633
|
return;
|
|
11567
11634
|
}
|
|
11568
11635
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11569
11636
|
tabItems.push(child);
|
|
11570
|
-
} else if (child.type ===
|
|
11637
|
+
} else if (child.type === import_react58.Fragment) {
|
|
11571
11638
|
const fragmentElement = child;
|
|
11572
11639
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
11573
11640
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -11580,10 +11647,10 @@ var extractTabItems = (children) => {
|
|
|
11580
11647
|
};
|
|
11581
11648
|
|
|
11582
11649
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11583
|
-
var
|
|
11584
|
-
var
|
|
11585
|
-
var
|
|
11586
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
11650
|
+
var import_react59 = require("react");
|
|
11651
|
+
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11652
|
+
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
11653
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
|
|
11587
11654
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
11588
11655
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11589
11656
|
}
|
|
@@ -11591,7 +11658,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(Selec
|
|
|
11591
11658
|
var SelectedItemIndicator2 = () => {
|
|
11592
11659
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11593
11660
|
const selectedValue = useTabsValue();
|
|
11594
|
-
const selectedItemIndicatorStyle = (0,
|
|
11661
|
+
const selectedItemIndicatorStyle = (0, import_react59.useMemo)(
|
|
11595
11662
|
() => selectedItemMeasurements != null ? {
|
|
11596
11663
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11597
11664
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -11602,7 +11669,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
11602
11669
|
if (selectedValue == null) {
|
|
11603
11670
|
return null;
|
|
11604
11671
|
}
|
|
11605
|
-
return /* @__PURE__ */ (0,
|
|
11672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
11606
11673
|
TabsSelectedItemIndicatorDiv,
|
|
11607
11674
|
{
|
|
11608
11675
|
style: {
|
|
@@ -11615,24 +11682,24 @@ var SelectedItemIndicator2 = () => {
|
|
|
11615
11682
|
};
|
|
11616
11683
|
|
|
11617
11684
|
// src/components/Tabs/Tabs.tsx
|
|
11618
|
-
var
|
|
11619
|
-
var TabsContainer =
|
|
11685
|
+
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
11686
|
+
var TabsContainer = import_styled_components83.default.div`
|
|
11620
11687
|
display: flex;
|
|
11621
11688
|
flex-direction: column;
|
|
11622
11689
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11623
11690
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11624
11691
|
`;
|
|
11625
|
-
var StickyTabContent =
|
|
11692
|
+
var StickyTabContent = import_styled_components83.default.div`
|
|
11626
11693
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11627
11694
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11628
11695
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11629
11696
|
`;
|
|
11630
|
-
var StyledTabsRoot = (0,
|
|
11697
|
+
var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.Root)`
|
|
11631
11698
|
display: flex;
|
|
11632
11699
|
flex-direction: column;
|
|
11633
11700
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11634
11701
|
`;
|
|
11635
|
-
var Tabs = (0,
|
|
11702
|
+
var Tabs = (0, import_react60.forwardRef)(
|
|
11636
11703
|
({
|
|
11637
11704
|
children,
|
|
11638
11705
|
fullWidth = true,
|
|
@@ -11644,13 +11711,13 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11644
11711
|
...otherProps
|
|
11645
11712
|
}, ref) => {
|
|
11646
11713
|
const tabItems = extractTabItems(children);
|
|
11647
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11714
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react60.useState)(defaultSelectedValue);
|
|
11648
11715
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11649
11716
|
defaultValue: defaultSelectedValue,
|
|
11650
11717
|
onValueChange: setInternalSelectedValue
|
|
11651
11718
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11652
11719
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11653
|
-
return /* @__PURE__ */ (0,
|
|
11720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11654
11721
|
StyledTabsRoot,
|
|
11655
11722
|
{
|
|
11656
11723
|
ref,
|
|
@@ -11658,14 +11725,14 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11658
11725
|
activationMode: "automatic",
|
|
11659
11726
|
...otherProps,
|
|
11660
11727
|
...modeProps,
|
|
11661
|
-
children: /* @__PURE__ */ (0,
|
|
11662
|
-
/* @__PURE__ */ (0,
|
|
11728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11729
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
|
|
11663
11730
|
TabList,
|
|
11664
11731
|
{
|
|
11665
11732
|
ariaLabel,
|
|
11666
11733
|
fullWidth,
|
|
11667
11734
|
children: [
|
|
11668
|
-
/* @__PURE__ */ (0,
|
|
11735
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsx)(SelectedItemIndicator2, {}),
|
|
11669
11736
|
tabItems.map((tab) => {
|
|
11670
11737
|
const {
|
|
11671
11738
|
value,
|
|
@@ -11675,7 +11742,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11675
11742
|
"aria-label": ariaLabelForTab
|
|
11676
11743
|
} = tab.props;
|
|
11677
11744
|
if ((0, import_type_guards44.isNil)(icon)) {
|
|
11678
|
-
return /* @__PURE__ */ (0,
|
|
11745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11679
11746
|
TabItem,
|
|
11680
11747
|
{
|
|
11681
11748
|
disabled,
|
|
@@ -11686,7 +11753,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11686
11753
|
);
|
|
11687
11754
|
}
|
|
11688
11755
|
if ((0, import_type_guards44.isNotNil)(label)) {
|
|
11689
|
-
return /* @__PURE__ */ (0,
|
|
11756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11690
11757
|
TabItem,
|
|
11691
11758
|
{
|
|
11692
11759
|
disabled,
|
|
@@ -11698,7 +11765,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11698
11765
|
);
|
|
11699
11766
|
}
|
|
11700
11767
|
if ((0, import_type_guards44.isNotNil)(ariaLabelForTab)) {
|
|
11701
|
-
return /* @__PURE__ */ (0,
|
|
11768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11702
11769
|
TabItem,
|
|
11703
11770
|
{
|
|
11704
11771
|
"aria-label": ariaLabelForTab,
|
|
@@ -11714,7 +11781,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11714
11781
|
]
|
|
11715
11782
|
}
|
|
11716
11783
|
),
|
|
11717
|
-
/* @__PURE__ */ (0,
|
|
11784
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11718
11785
|
TabPanel,
|
|
11719
11786
|
{
|
|
11720
11787
|
value: tab.props.value,
|
|
@@ -11730,19 +11797,19 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11730
11797
|
Tabs.displayName = "Tabs";
|
|
11731
11798
|
|
|
11732
11799
|
// src/components/Tabs/Tab.tsx
|
|
11733
|
-
var
|
|
11734
|
-
var
|
|
11735
|
-
var Tab = (0,
|
|
11736
|
-
return /* @__PURE__ */ (0,
|
|
11800
|
+
var import_react61 = require("react");
|
|
11801
|
+
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
11802
|
+
var Tab = (0, import_react61.forwardRef)(({ children }, ref) => {
|
|
11803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ref, children });
|
|
11737
11804
|
});
|
|
11738
11805
|
Tab.displayName = "Tab";
|
|
11739
11806
|
|
|
11740
11807
|
// src/components/Tag/Tag.tsx
|
|
11741
|
-
var
|
|
11742
|
-
var
|
|
11808
|
+
var import_react62 = require("react");
|
|
11809
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11743
11810
|
var import_type_guards45 = require("@wistia/type-guards");
|
|
11744
|
-
var
|
|
11745
|
-
var TagLabel =
|
|
11811
|
+
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
11812
|
+
var TagLabel = import_styled_components84.default.a`
|
|
11746
11813
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11747
11814
|
font-size: var(--wui-typography-label-4-size);
|
|
11748
11815
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11777,14 +11844,14 @@ var TagLabel = import_styled_components83.default.a`
|
|
|
11777
11844
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11778
11845
|
}
|
|
11779
11846
|
`;
|
|
11780
|
-
var TagDivider =
|
|
11847
|
+
var TagDivider = import_styled_components84.default.div`
|
|
11781
11848
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11782
11849
|
border-left: 1px solid var(--wui-color-border);
|
|
11783
11850
|
display: flex;
|
|
11784
11851
|
height: 14px;
|
|
11785
11852
|
width: 1px;
|
|
11786
11853
|
`;
|
|
11787
|
-
var StyledRemoveButton =
|
|
11854
|
+
var StyledRemoveButton = import_styled_components84.default.button`
|
|
11788
11855
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11789
11856
|
all: unset;
|
|
11790
11857
|
cursor: pointer;
|
|
@@ -11812,7 +11879,7 @@ var StyledRemoveButton = import_styled_components83.default.button`
|
|
|
11812
11879
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11813
11880
|
}
|
|
11814
11881
|
`;
|
|
11815
|
-
var StyledTag =
|
|
11882
|
+
var StyledTag = import_styled_components84.default.div`
|
|
11816
11883
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11817
11884
|
align-items: center;
|
|
11818
11885
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11833,29 +11900,29 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11833
11900
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11834
11901
|
);
|
|
11835
11902
|
}
|
|
11836
|
-
return /* @__PURE__ */ (0,
|
|
11837
|
-
/* @__PURE__ */ (0,
|
|
11838
|
-
/* @__PURE__ */ (0,
|
|
11903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(import_jsx_runtime267.Fragment, { children: [
|
|
11904
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
11905
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11839
11906
|
StyledRemoveButton,
|
|
11840
11907
|
{
|
|
11841
11908
|
$colorScheme: colorScheme,
|
|
11842
11909
|
onClick: onClickRemove,
|
|
11843
11910
|
type: "button",
|
|
11844
11911
|
children: [
|
|
11845
|
-
/* @__PURE__ */ (0,
|
|
11912
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
11846
11913
|
Icon,
|
|
11847
11914
|
{
|
|
11848
11915
|
size: "sm",
|
|
11849
11916
|
type: "close"
|
|
11850
11917
|
}
|
|
11851
11918
|
),
|
|
11852
|
-
/* @__PURE__ */ (0,
|
|
11919
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11853
11920
|
]
|
|
11854
11921
|
}
|
|
11855
11922
|
)
|
|
11856
11923
|
] });
|
|
11857
11924
|
};
|
|
11858
|
-
var Tag = (0,
|
|
11925
|
+
var Tag = (0, import_react62.forwardRef)(
|
|
11859
11926
|
({
|
|
11860
11927
|
onClickRemove,
|
|
11861
11928
|
colorScheme = "inherit",
|
|
@@ -11867,14 +11934,14 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11867
11934
|
}, ref) => {
|
|
11868
11935
|
const hasIcon = (0, import_type_guards45.isNotNil)(icon);
|
|
11869
11936
|
const labelProps = (0, import_type_guards45.isNotNil)(href) && (0, import_type_guards45.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11870
|
-
return /* @__PURE__ */ (0,
|
|
11937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11871
11938
|
StyledTag,
|
|
11872
11939
|
{
|
|
11873
11940
|
ref,
|
|
11874
11941
|
$colorScheme: colorScheme,
|
|
11875
11942
|
...otherProps,
|
|
11876
11943
|
children: [
|
|
11877
|
-
/* @__PURE__ */ (0,
|
|
11944
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11878
11945
|
TagLabel,
|
|
11879
11946
|
{
|
|
11880
11947
|
...labelProps,
|
|
@@ -11885,7 +11952,7 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11885
11952
|
]
|
|
11886
11953
|
}
|
|
11887
11954
|
),
|
|
11888
|
-
/* @__PURE__ */ (0,
|
|
11955
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
11889
11956
|
RemoveButton,
|
|
11890
11957
|
{
|
|
11891
11958
|
colorScheme,
|
|
@@ -11901,26 +11968,26 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11901
11968
|
Tag.displayName = "Tag";
|
|
11902
11969
|
|
|
11903
11970
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11904
|
-
var
|
|
11971
|
+
var import_styled_components85 = __toESM(require("styled-components"));
|
|
11905
11972
|
var import_type_guards46 = require("@wistia/type-guards");
|
|
11906
|
-
var
|
|
11973
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
11907
11974
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
11908
11975
|
if (iconOnly) {
|
|
11909
|
-
return /* @__PURE__ */ (0,
|
|
11976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11910
11977
|
"g",
|
|
11911
11978
|
{
|
|
11912
11979
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11913
11980
|
fill: brandmarkColor,
|
|
11914
|
-
children: /* @__PURE__ */ (0,
|
|
11981
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("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" })
|
|
11915
11982
|
}
|
|
11916
11983
|
);
|
|
11917
11984
|
}
|
|
11918
|
-
return /* @__PURE__ */ (0,
|
|
11985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11919
11986
|
"g",
|
|
11920
11987
|
{
|
|
11921
11988
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11922
11989
|
fill: brandmarkColor,
|
|
11923
|
-
children: /* @__PURE__ */ (0,
|
|
11990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("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" })
|
|
11924
11991
|
}
|
|
11925
11992
|
);
|
|
11926
11993
|
};
|
|
@@ -11928,12 +11995,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
11928
11995
|
if (iconOnly) {
|
|
11929
11996
|
return null;
|
|
11930
11997
|
}
|
|
11931
|
-
return /* @__PURE__ */ (0,
|
|
11998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11932
11999
|
"g",
|
|
11933
12000
|
{
|
|
11934
12001
|
"data-testid": "ui-wistia-logo-logotype",
|
|
11935
12002
|
fill: logotypeColor,
|
|
11936
|
-
children: /* @__PURE__ */ (0,
|
|
12003
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("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" })
|
|
11937
12004
|
}
|
|
11938
12005
|
);
|
|
11939
12006
|
};
|
|
@@ -11943,7 +12010,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11943
12010
|
}
|
|
11944
12011
|
return "0 0 144 31.47";
|
|
11945
12012
|
};
|
|
11946
|
-
var WistiaLogoComponent =
|
|
12013
|
+
var WistiaLogoComponent = import_styled_components85.default.svg`
|
|
11947
12014
|
height: ${({ height }) => `${height}px`};
|
|
11948
12015
|
|
|
11949
12016
|
/* ensure it will always fit on mobile */
|
|
@@ -11959,12 +12026,12 @@ var WistiaLogoComponent = import_styled_components84.default.svg`
|
|
|
11959
12026
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11960
12027
|
if ($opticallyCentered) {
|
|
11961
12028
|
if ($iconOnly) {
|
|
11962
|
-
return
|
|
12029
|
+
return import_styled_components85.css`
|
|
11963
12030
|
aspect-ratio: 1;
|
|
11964
12031
|
padding: 11.85% 3.12% 13.91%;
|
|
11965
12032
|
`;
|
|
11966
12033
|
}
|
|
11967
|
-
return
|
|
12034
|
+
return import_styled_components85.css`
|
|
11968
12035
|
aspect-ratio: 127 / 32;
|
|
11969
12036
|
`;
|
|
11970
12037
|
}
|
|
@@ -12001,7 +12068,7 @@ var WistiaLogo = ({
|
|
|
12001
12068
|
};
|
|
12002
12069
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12003
12070
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12004
|
-
const Logo = /* @__PURE__ */ (0,
|
|
12071
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12005
12072
|
WistiaLogoComponent,
|
|
12006
12073
|
{
|
|
12007
12074
|
$hoverColor: hoverColor,
|
|
@@ -12014,14 +12081,14 @@ var WistiaLogo = ({
|
|
|
12014
12081
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12015
12082
|
...otherProps,
|
|
12016
12083
|
children: [
|
|
12017
|
-
/* @__PURE__ */ (0,
|
|
12018
|
-
(0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
12084
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
|
|
12085
|
+
(0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
|
|
12019
12086
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
12020
12087
|
renderLogotype(logotypeColor, iconOnly)
|
|
12021
12088
|
]
|
|
12022
12089
|
}
|
|
12023
12090
|
);
|
|
12024
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
12091
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
|
|
12025
12092
|
};
|
|
12026
12093
|
WistiaLogo.displayName = "WistiaLogo";
|
|
12027
12094
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -12035,6 +12102,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12035
12102
|
Button,
|
|
12036
12103
|
ButtonGroup,
|
|
12037
12104
|
Card,
|
|
12105
|
+
Center,
|
|
12038
12106
|
Checkbox,
|
|
12039
12107
|
CheckboxGroup,
|
|
12040
12108
|
CheckboxMenuItem,
|