@wistia/ui 0.6.31 → 0.6.32-beta.85ab0df1.349254d
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 +642 -608
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.mjs +454 -421
- 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.32-beta.85ab0df1.349254d
|
|
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,
|
|
@@ -6779,7 +6780,8 @@ var Link = (0, import_react12.forwardRef)(
|
|
|
6779
6780
|
...commonProps,
|
|
6780
6781
|
...externalLinkProps
|
|
6781
6782
|
};
|
|
6782
|
-
|
|
6783
|
+
const shouldUseReactRouterLink = inRouterContext && type !== "external" && !to?.startsWith("http");
|
|
6784
|
+
return shouldUseReactRouterLink ? /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(
|
|
6783
6785
|
StyledLink,
|
|
6784
6786
|
{
|
|
6785
6787
|
as: import_react_router_dom.Link,
|
|
@@ -7670,23 +7672,54 @@ var Card = ({
|
|
|
7670
7672
|
);
|
|
7671
7673
|
Card.displayName = "Card";
|
|
7672
7674
|
|
|
7673
|
-
// src/components/
|
|
7675
|
+
// src/components/Center/Center.tsx
|
|
7674
7676
|
var import_react19 = require("react");
|
|
7675
|
-
var
|
|
7677
|
+
var import_styled_components30 = __toESM(require("styled-components"));
|
|
7678
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7679
|
+
var StyledCenter = import_styled_components30.default.div`
|
|
7680
|
+
box-sizing: border-box;
|
|
7681
|
+
margin-left: auto;
|
|
7682
|
+
margin-right: auto;
|
|
7683
|
+
max-width: ${({ $maxWidth }) => $maxWidth};
|
|
7684
|
+
${({ $gutterWidth }) => $gutterWidth && `padding: 0 var(--wui-${$gutterWidth.toString()});`}
|
|
7685
|
+
${({ $intrinsic }) => $intrinsic && `
|
|
7686
|
+
display: flex;
|
|
7687
|
+
flex-direction: column;
|
|
7688
|
+
align-items: center;
|
|
7689
|
+
`}
|
|
7690
|
+
`;
|
|
7691
|
+
var Center = (0, import_react19.forwardRef)(
|
|
7692
|
+
({ maxWidth = "100%", gutterWidth = "space-00", intrinsic = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(
|
|
7693
|
+
StyledCenter,
|
|
7694
|
+
{
|
|
7695
|
+
ref,
|
|
7696
|
+
$gutterWidth: gutterWidth,
|
|
7697
|
+
$intrinsic: intrinsic,
|
|
7698
|
+
$maxWidth: maxWidth,
|
|
7699
|
+
...props,
|
|
7700
|
+
children
|
|
7701
|
+
}
|
|
7702
|
+
)
|
|
7703
|
+
);
|
|
7704
|
+
Center.displayName = "Center";
|
|
7705
|
+
|
|
7706
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
7707
|
+
var import_react20 = require("react");
|
|
7708
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7676
7709
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7677
7710
|
|
|
7678
7711
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7679
|
-
var
|
|
7712
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7680
7713
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7681
7714
|
|
|
7682
7715
|
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
7683
|
-
var
|
|
7716
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7684
7717
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
7685
|
-
var
|
|
7686
|
-
var disabledStyle =
|
|
7718
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7719
|
+
var disabledStyle = import_styled_components31.css`
|
|
7687
7720
|
color: var(--wui-color-text-disabled);
|
|
7688
7721
|
`;
|
|
7689
|
-
var StyledFormControlLabelDescription =
|
|
7722
|
+
var StyledFormControlLabelDescription = import_styled_components31.default.div`
|
|
7690
7723
|
color: var(--wui-color-text-secondary);
|
|
7691
7724
|
display: block;
|
|
7692
7725
|
font-size: var(--wui-typography-body-4-size);
|
|
@@ -7704,7 +7737,7 @@ var FormControlLabelDescription = ({
|
|
|
7704
7737
|
if ((0, import_type_guards19.isNil)(children)) {
|
|
7705
7738
|
return null;
|
|
7706
7739
|
}
|
|
7707
|
-
return /* @__PURE__ */ (0,
|
|
7740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
7708
7741
|
StyledFormControlLabelDescription,
|
|
7709
7742
|
{
|
|
7710
7743
|
...props,
|
|
@@ -7716,11 +7749,11 @@ var FormControlLabelDescription = ({
|
|
|
7716
7749
|
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
7717
7750
|
|
|
7718
7751
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7719
|
-
var
|
|
7752
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7720
7753
|
var import_type_guards20 = require("@wistia/type-guards");
|
|
7721
|
-
var
|
|
7722
|
-
var VisuallyHidden =
|
|
7723
|
-
var VisuallyHiddenButFocusable =
|
|
7754
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7755
|
+
var VisuallyHidden = import_styled_components32.default.div({ ...visuallyHiddenStyle });
|
|
7756
|
+
var VisuallyHiddenButFocusable = import_styled_components32.default.div({
|
|
7724
7757
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7725
7758
|
});
|
|
7726
7759
|
var ScreenReaderOnly = ({
|
|
@@ -7731,23 +7764,23 @@ var ScreenReaderOnly = ({
|
|
|
7731
7764
|
}) => {
|
|
7732
7765
|
const accessibleText = (0, import_type_guards20.isNotNil)(text) ? text : children;
|
|
7733
7766
|
if (focusable) {
|
|
7734
|
-
return /* @__PURE__ */ (0,
|
|
7767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7735
7768
|
}
|
|
7736
|
-
return /* @__PURE__ */ (0,
|
|
7769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7737
7770
|
};
|
|
7738
7771
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7739
7772
|
|
|
7740
7773
|
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7741
|
-
var
|
|
7742
|
-
var disabledStyle2 =
|
|
7774
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7775
|
+
var disabledStyle2 = import_styled_components33.css`
|
|
7743
7776
|
cursor: not-allowed;
|
|
7744
7777
|
color: var(--wui-color-text-disabled);
|
|
7745
7778
|
`;
|
|
7746
|
-
var StyledLabelWrapper =
|
|
7779
|
+
var StyledLabelWrapper = import_styled_components33.default.div`
|
|
7747
7780
|
display: flex;
|
|
7748
7781
|
flex-direction: column;
|
|
7749
7782
|
`;
|
|
7750
|
-
var StyledFormControlLabel =
|
|
7783
|
+
var StyledFormControlLabel = import_styled_components33.default.label`
|
|
7751
7784
|
cursor: pointer;
|
|
7752
7785
|
display: flex;
|
|
7753
7786
|
align-items: center;
|
|
@@ -7772,11 +7805,11 @@ var FormControlLabel = ({
|
|
|
7772
7805
|
if ((0, import_type_guards21.isNil)(label)) {
|
|
7773
7806
|
return null;
|
|
7774
7807
|
}
|
|
7775
|
-
const labelContent = hideLabel ? /* @__PURE__ */ (0,
|
|
7808
|
+
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(StyledLabelWrapper, { children: [
|
|
7776
7809
|
label,
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
7810
|
+
/* @__PURE__ */ (0, import_jsx_runtime206.jsx)(FormControlLabelDescription, { children: description })
|
|
7778
7811
|
] });
|
|
7779
|
-
return /* @__PURE__ */ (0,
|
|
7812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)(
|
|
7780
7813
|
StyledFormControlLabel,
|
|
7781
7814
|
{
|
|
7782
7815
|
$disabled: disabled,
|
|
@@ -7792,8 +7825,8 @@ var FormControlLabel = ({
|
|
|
7792
7825
|
FormControlLabel.displayName = "FormControlLabel";
|
|
7793
7826
|
|
|
7794
7827
|
// src/components/Checkbox/Checkbox.tsx
|
|
7795
|
-
var
|
|
7796
|
-
var CheckIcon = () => /* @__PURE__ */ (0,
|
|
7828
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
7829
|
+
var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7797
7830
|
"svg",
|
|
7798
7831
|
{
|
|
7799
7832
|
fill: "inherit",
|
|
@@ -7801,7 +7834,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
|
7801
7834
|
viewBox: "0 0 10 8",
|
|
7802
7835
|
width: "10",
|
|
7803
7836
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7804
|
-
children: /* @__PURE__ */ (0,
|
|
7837
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7805
7838
|
"path",
|
|
7806
7839
|
{
|
|
7807
7840
|
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",
|
|
@@ -7810,7 +7843,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
|
7810
7843
|
)
|
|
7811
7844
|
}
|
|
7812
7845
|
);
|
|
7813
|
-
var sizeSmall =
|
|
7846
|
+
var sizeSmall = import_styled_components34.css`
|
|
7814
7847
|
width: 14px;
|
|
7815
7848
|
height: 14px;
|
|
7816
7849
|
min-width: 14px;
|
|
@@ -7821,7 +7854,7 @@ var sizeSmall = import_styled_components33.css`
|
|
|
7821
7854
|
height: 7px;
|
|
7822
7855
|
}
|
|
7823
7856
|
`;
|
|
7824
|
-
var sizeMedium =
|
|
7857
|
+
var sizeMedium = import_styled_components34.css`
|
|
7825
7858
|
width: 16px;
|
|
7826
7859
|
height: 16px;
|
|
7827
7860
|
min-width: 16px;
|
|
@@ -7832,7 +7865,7 @@ var sizeMedium = import_styled_components33.css`
|
|
|
7832
7865
|
height: 9px;
|
|
7833
7866
|
}
|
|
7834
7867
|
`;
|
|
7835
|
-
var sizeLarge =
|
|
7868
|
+
var sizeLarge = import_styled_components34.css`
|
|
7836
7869
|
width: 20px;
|
|
7837
7870
|
height: 20px;
|
|
7838
7871
|
min-width: 20px;
|
|
@@ -7848,14 +7881,14 @@ var getSizeCss = (size) => {
|
|
|
7848
7881
|
if (size === "lg") return sizeLarge;
|
|
7849
7882
|
return sizeMedium;
|
|
7850
7883
|
};
|
|
7851
|
-
var StyledCheckboxWrapper =
|
|
7884
|
+
var StyledCheckboxWrapper = import_styled_components34.default.div`
|
|
7852
7885
|
display: flex;
|
|
7853
7886
|
margin: 0;
|
|
7854
7887
|
|
|
7855
7888
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
7856
7889
|
user-select: none;
|
|
7857
7890
|
`;
|
|
7858
|
-
var StyledCheckboxInput =
|
|
7891
|
+
var StyledCheckboxInput = import_styled_components34.default.div`
|
|
7859
7892
|
${({ $size }) => getSizeCss($size)}
|
|
7860
7893
|
line-height: 0;
|
|
7861
7894
|
margin: 0;
|
|
@@ -7877,7 +7910,7 @@ var StyledCheckboxInput = import_styled_components33.default.div`
|
|
|
7877
7910
|
}
|
|
7878
7911
|
}
|
|
7879
7912
|
`;
|
|
7880
|
-
var StyledHiddenCheckboxInput =
|
|
7913
|
+
var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
7881
7914
|
${visuallyHiddenStyle}
|
|
7882
7915
|
|
|
7883
7916
|
/* toggles display of faux-input background-color */
|
|
@@ -7891,7 +7924,7 @@ var StyledHiddenCheckboxInput = import_styled_components33.default.input`
|
|
|
7891
7924
|
display: block;
|
|
7892
7925
|
}
|
|
7893
7926
|
`;
|
|
7894
|
-
var Checkbox = (0,
|
|
7927
|
+
var Checkbox = (0, import_react20.forwardRef)(
|
|
7895
7928
|
({
|
|
7896
7929
|
checked,
|
|
7897
7930
|
disabled = false,
|
|
@@ -7906,10 +7939,10 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7906
7939
|
hideLabel = false,
|
|
7907
7940
|
...props
|
|
7908
7941
|
}, ref) => {
|
|
7909
|
-
const generatedId = (0,
|
|
7942
|
+
const generatedId = (0, import_react20.useId)();
|
|
7910
7943
|
const computedId = (0, import_type_guards22.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7911
|
-
return /* @__PURE__ */ (0,
|
|
7912
|
-
/* @__PURE__ */ (0,
|
|
7944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledCheckboxWrapper, { disabled, children: [
|
|
7945
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7913
7946
|
StyledHiddenCheckboxInput,
|
|
7914
7947
|
{
|
|
7915
7948
|
...props,
|
|
@@ -7924,16 +7957,16 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7924
7957
|
value
|
|
7925
7958
|
}
|
|
7926
7959
|
),
|
|
7927
|
-
/* @__PURE__ */ (0,
|
|
7960
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7928
7961
|
FormControlLabel,
|
|
7929
7962
|
{
|
|
7930
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
7963
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7931
7964
|
StyledCheckboxInput,
|
|
7932
7965
|
{
|
|
7933
7966
|
$disabled: disabled,
|
|
7934
7967
|
$size: size,
|
|
7935
7968
|
"data-wui-faux-input": "true",
|
|
7936
|
-
children: /* @__PURE__ */ (0,
|
|
7969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(CheckIcon, {})
|
|
7937
7970
|
}
|
|
7938
7971
|
),
|
|
7939
7972
|
description,
|
|
@@ -7949,9 +7982,9 @@ var Checkbox = (0, import_react19.forwardRef)(
|
|
|
7949
7982
|
Checkbox.displayName = "Checkbox";
|
|
7950
7983
|
|
|
7951
7984
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
7952
|
-
var
|
|
7985
|
+
var import_react21 = require("react");
|
|
7953
7986
|
var ClickRegion = ({ children, targetRef }) => {
|
|
7954
|
-
(0,
|
|
7987
|
+
(0, import_react21.useEffect)(() => {
|
|
7955
7988
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7956
7989
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7957
7990
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -7959,7 +7992,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7959
7992
|
} else {
|
|
7960
7993
|
}
|
|
7961
7994
|
}, [targetRef]);
|
|
7962
|
-
const handleClick = (0,
|
|
7995
|
+
const handleClick = (0, import_react21.useCallback)(
|
|
7963
7996
|
(event) => {
|
|
7964
7997
|
const node = targetRef.current;
|
|
7965
7998
|
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")) {
|
|
@@ -7976,7 +8009,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7976
8009
|
},
|
|
7977
8010
|
[targetRef]
|
|
7978
8011
|
);
|
|
7979
|
-
return (0,
|
|
8012
|
+
return (0, import_react21.cloneElement)(import_react21.Children.only(children), {
|
|
7980
8013
|
"data-click-region": true,
|
|
7981
8014
|
onClick: handleClick
|
|
7982
8015
|
});
|
|
@@ -7986,9 +8019,9 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
7986
8019
|
// src/components/Collapsible/Collapsible.tsx
|
|
7987
8020
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7988
8021
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7989
|
-
var
|
|
7990
|
-
var
|
|
7991
|
-
var StyledRoot = (0,
|
|
8022
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
8023
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8024
|
+
var StyledRoot = (0, import_styled_components35.default)(import_react_collapsible.Root)`
|
|
7992
8025
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
7993
8026
|
display: -webkit-box;
|
|
7994
8027
|
-webkit-box-orient: vertical;
|
|
@@ -8004,82 +8037,82 @@ var Collapsible = ({
|
|
|
8004
8037
|
const controlProps = {
|
|
8005
8038
|
...(0, import_type_guards23.isNotNil)(onOpenChange) && (0, import_type_guards23.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
8006
8039
|
};
|
|
8007
|
-
return /* @__PURE__ */ (0,
|
|
8040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(StyledRoot, { ...controlProps, children });
|
|
8008
8041
|
};
|
|
8009
8042
|
Collapsible.displayName = "Collapsible";
|
|
8010
8043
|
|
|
8011
8044
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8012
|
-
var
|
|
8045
|
+
var import_react22 = require("react");
|
|
8013
8046
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
8014
|
-
var
|
|
8047
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8015
8048
|
var CollapsibleTrigger = ({ children }) => {
|
|
8016
|
-
|
|
8017
|
-
return /* @__PURE__ */ (0,
|
|
8049
|
+
import_react22.Children.only(children);
|
|
8050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
8018
8051
|
};
|
|
8019
8052
|
|
|
8020
8053
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
8021
|
-
var
|
|
8054
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
8022
8055
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
8023
8056
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
8024
|
-
var
|
|
8025
|
-
var ClampedContent =
|
|
8057
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8058
|
+
var ClampedContent = import_styled_components36.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
8026
8059
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8027
8060
|
`;
|
|
8028
8061
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
8029
8062
|
if ((0, import_type_guards24.isNotUndefined)(clamp)) {
|
|
8030
|
-
return /* @__PURE__ */ (0,
|
|
8063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
8031
8064
|
}
|
|
8032
|
-
return /* @__PURE__ */ (0,
|
|
8065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(import_react_collapsible3.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(import_jsx_runtime210.Fragment, { children: [
|
|
8033
8066
|
children,
|
|
8034
8067
|
" "
|
|
8035
8068
|
] }) });
|
|
8036
8069
|
};
|
|
8037
8070
|
|
|
8038
8071
|
// src/components/DataCards/DataCard.tsx
|
|
8039
|
-
var
|
|
8072
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8040
8073
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
8041
8074
|
|
|
8042
8075
|
// src/components/Heading/Heading.tsx
|
|
8043
|
-
var
|
|
8044
|
-
var
|
|
8045
|
-
var
|
|
8046
|
-
var heroStyle =
|
|
8076
|
+
var import_react23 = require("react");
|
|
8077
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
8078
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8079
|
+
var heroStyle = import_styled_components37.css`
|
|
8047
8080
|
--font-family: var(--wui-typography-heading-hero-family);
|
|
8048
8081
|
--font-size: var(--wui-typography-heading-hero-size);
|
|
8049
8082
|
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
8050
8083
|
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
8051
8084
|
`;
|
|
8052
|
-
var heading1TextStyle =
|
|
8085
|
+
var heading1TextStyle = import_styled_components37.css`
|
|
8053
8086
|
--font-family: var(--wui-typography-heading-1-family);
|
|
8054
8087
|
--font-size: var(--wui-typography-heading-1-size);
|
|
8055
8088
|
--font-weight: var(--wui-typography-heading-1-weight);
|
|
8056
8089
|
--line-height: var(--wui-typography-heading-1-line-height);
|
|
8057
8090
|
`;
|
|
8058
|
-
var heading2TextStyle =
|
|
8091
|
+
var heading2TextStyle = import_styled_components37.css`
|
|
8059
8092
|
--font-family: var(--wui-typography-heading-2-family);
|
|
8060
8093
|
--font-size: var(--wui-typography-heading-2-size);
|
|
8061
8094
|
--font-weight: var(--wui-typography-heading-2-weight);
|
|
8062
8095
|
--line-height: var(--wui-typography-heading-2-line-height);
|
|
8063
8096
|
`;
|
|
8064
|
-
var heading3TextStyle =
|
|
8097
|
+
var heading3TextStyle = import_styled_components37.css`
|
|
8065
8098
|
--font-family: var(--wui-typography-heading-3-family);
|
|
8066
8099
|
--font-size: var(--wui-typography-heading-3-size);
|
|
8067
8100
|
--font-weight: var(--wui-typography-heading-3-weight);
|
|
8068
8101
|
--line-height: var(--wui-typography-heading-3-line-height);
|
|
8069
8102
|
`;
|
|
8070
|
-
var heading4TextStyle =
|
|
8103
|
+
var heading4TextStyle = import_styled_components37.css`
|
|
8071
8104
|
--font-family: var(--wui-typography-heading-4-family);
|
|
8072
8105
|
--font-size: var(--wui-typography-heading-4-size);
|
|
8073
8106
|
--font-weight: var(--wui-typography-heading-4-weight);
|
|
8074
8107
|
--line-height: var(--wui-typography-heading-4-line-height);
|
|
8075
8108
|
`;
|
|
8076
|
-
var heading5TextStyle =
|
|
8109
|
+
var heading5TextStyle = import_styled_components37.css`
|
|
8077
8110
|
--font-family: var(--wui-typography-heading-5-family);
|
|
8078
8111
|
--font-size: var(--wui-typography-heading-5-size);
|
|
8079
8112
|
--font-weight: var(--wui-typography-heading-5-weight);
|
|
8080
8113
|
--line-height: var(--wui-typography-heading-5-line-height);
|
|
8081
8114
|
`;
|
|
8082
|
-
var heading6TextStyle =
|
|
8115
|
+
var heading6TextStyle = import_styled_components37.css`
|
|
8083
8116
|
--font-family: var(--wui-typography-heading-6-family);
|
|
8084
8117
|
--font-size: var(--wui-typography-heading-6-size);
|
|
8085
8118
|
--font-weight: var(--wui-typography-heading-6-weight);
|
|
@@ -8095,7 +8128,7 @@ var variantStyleMap = {
|
|
|
8095
8128
|
heading6: heading6TextStyle
|
|
8096
8129
|
};
|
|
8097
8130
|
var DEFAULT_ELEMENT2 = "h1";
|
|
8098
|
-
var StyledHeading =
|
|
8131
|
+
var StyledHeading = import_styled_components37.default.div`
|
|
8099
8132
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8100
8133
|
font-family: var(--font-family);
|
|
8101
8134
|
font-size: var(--font-size);
|
|
@@ -8104,16 +8137,16 @@ var StyledHeading = import_styled_components36.default.div`
|
|
|
8104
8137
|
color: var(--wui-color-text);
|
|
8105
8138
|
${({ $variant }) => variantStyleMap[$variant]}
|
|
8106
8139
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8107
|
-
${({ $inline }) => $inline &&
|
|
8140
|
+
${({ $inline }) => $inline && import_styled_components37.css`
|
|
8108
8141
|
display: inline-block;
|
|
8109
8142
|
`}
|
|
8110
|
-
${({ $disabled }) => $disabled &&
|
|
8143
|
+
${({ $disabled }) => $disabled && import_styled_components37.css`
|
|
8111
8144
|
color: var(--wui-color-text-disabled);
|
|
8112
8145
|
`}
|
|
8113
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8146
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components37.css`
|
|
8114
8147
|
user-select: none;
|
|
8115
8148
|
`}
|
|
8116
|
-
${({ $align }) =>
|
|
8149
|
+
${({ $align }) => import_styled_components37.css`
|
|
8117
8150
|
text-align: ${$align};
|
|
8118
8151
|
`}
|
|
8119
8152
|
margin: 0;
|
|
@@ -8127,7 +8160,7 @@ var variantElementMap = {
|
|
|
8127
8160
|
heading5: "h5",
|
|
8128
8161
|
heading6: "h6"
|
|
8129
8162
|
};
|
|
8130
|
-
var HeadingComponent = (0,
|
|
8163
|
+
var HeadingComponent = (0, import_react23.forwardRef)(
|
|
8131
8164
|
({
|
|
8132
8165
|
align = "left",
|
|
8133
8166
|
colorScheme = "inherit",
|
|
@@ -8138,7 +8171,7 @@ var HeadingComponent = (0, import_react22.forwardRef)(
|
|
|
8138
8171
|
variant = "heading1",
|
|
8139
8172
|
renderAs,
|
|
8140
8173
|
...otherProps
|
|
8141
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
8174
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
8142
8175
|
StyledHeading,
|
|
8143
8176
|
{
|
|
8144
8177
|
ref,
|
|
@@ -8158,8 +8191,8 @@ HeadingComponent.displayName = "Heading";
|
|
|
8158
8191
|
var Heading = makePolymorphic(HeadingComponent);
|
|
8159
8192
|
|
|
8160
8193
|
// src/components/DataCards/DataCard.tsx
|
|
8161
|
-
var
|
|
8162
|
-
var StyledDataCard =
|
|
8194
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8195
|
+
var StyledDataCard = import_styled_components38.default.div`
|
|
8163
8196
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
8164
8197
|
display: grid;
|
|
8165
8198
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -8172,7 +8205,7 @@ var StyledDataCard = import_styled_components37.default.div`
|
|
|
8172
8205
|
border-radius: var(--wui-border-radius-02);
|
|
8173
8206
|
position: relative;
|
|
8174
8207
|
`;
|
|
8175
|
-
var shimmer =
|
|
8208
|
+
var shimmer = import_styled_components38.keyframes`
|
|
8176
8209
|
0% {
|
|
8177
8210
|
background-position: 200% 0;
|
|
8178
8211
|
}
|
|
@@ -8180,7 +8213,7 @@ var shimmer = import_styled_components37.keyframes`
|
|
|
8180
8213
|
background-position: -200% 0;
|
|
8181
8214
|
}
|
|
8182
8215
|
`;
|
|
8183
|
-
var LoadingBackground =
|
|
8216
|
+
var LoadingBackground = import_styled_components38.default.div`
|
|
8184
8217
|
background: linear-gradient(
|
|
8185
8218
|
90deg,
|
|
8186
8219
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -8191,27 +8224,27 @@ var LoadingBackground = import_styled_components37.default.div`
|
|
|
8191
8224
|
animation: ${shimmer} 1.5s infinite;
|
|
8192
8225
|
border-radius: var(--wui-border-radius-01);
|
|
8193
8226
|
`;
|
|
8194
|
-
var StyledLoadingLabel = (0,
|
|
8227
|
+
var StyledLoadingLabel = (0, import_styled_components38.default)(LoadingBackground)`
|
|
8195
8228
|
width: 80px;
|
|
8196
8229
|
height: var(--wui-typography-heading-6-line-height);
|
|
8197
8230
|
`;
|
|
8198
|
-
var StyledLoadingValue = (0,
|
|
8231
|
+
var StyledLoadingValue = (0, import_styled_components38.default)(LoadingBackground)`
|
|
8199
8232
|
width: 90%;
|
|
8200
8233
|
height: var(--wui-typography-heading-3-line-height);
|
|
8201
8234
|
`;
|
|
8202
|
-
var StyledLabel2 = (0,
|
|
8235
|
+
var StyledLabel2 = (0, import_styled_components38.default)(Heading)`
|
|
8203
8236
|
grid-area: label;
|
|
8204
8237
|
`;
|
|
8205
|
-
var StyledValue = (0,
|
|
8238
|
+
var StyledValue = (0, import_styled_components38.default)(Heading)`
|
|
8206
8239
|
grid-area: value;
|
|
8207
8240
|
`;
|
|
8208
|
-
var StyledSlot =
|
|
8241
|
+
var StyledSlot = import_styled_components38.default.div`
|
|
8209
8242
|
display: flex;
|
|
8210
8243
|
justify-content: flex-end;
|
|
8211
8244
|
grid-area: slot;
|
|
8212
8245
|
align-self: center;
|
|
8213
8246
|
`;
|
|
8214
|
-
var StyledDataCardTrendContainer =
|
|
8247
|
+
var StyledDataCardTrendContainer = import_styled_components38.default.div`
|
|
8215
8248
|
position: absolute;
|
|
8216
8249
|
bottom: var(--wui-space-01);
|
|
8217
8250
|
right: var(--wui-space-01);
|
|
@@ -8224,39 +8257,39 @@ var DataCard = ({
|
|
|
8224
8257
|
isLoading = false,
|
|
8225
8258
|
trend,
|
|
8226
8259
|
...props
|
|
8227
|
-
}) => /* @__PURE__ */ (0,
|
|
8260
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
|
|
8228
8261
|
StyledDataCard,
|
|
8229
8262
|
{
|
|
8230
8263
|
$colorScheme: colorScheme,
|
|
8231
8264
|
...props,
|
|
8232
8265
|
children: [
|
|
8233
|
-
/* @__PURE__ */ (0,
|
|
8266
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8234
8267
|
StyledLabel2,
|
|
8235
8268
|
{
|
|
8236
8269
|
renderAs: "dt",
|
|
8237
8270
|
variant: "heading6",
|
|
8238
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8271
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingLabel, {}) : label
|
|
8239
8272
|
}
|
|
8240
8273
|
),
|
|
8241
|
-
/* @__PURE__ */ (0,
|
|
8274
|
+
/* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8242
8275
|
StyledValue,
|
|
8243
8276
|
{
|
|
8244
8277
|
renderAs: "dd",
|
|
8245
8278
|
variant: "heading3",
|
|
8246
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8279
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledLoadingValue, {}) : value
|
|
8247
8280
|
}
|
|
8248
8281
|
),
|
|
8249
|
-
(0, import_type_guards25.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0,
|
|
8250
|
-
(0, import_type_guards25.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0,
|
|
8282
|
+
(0, import_type_guards25.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8283
|
+
(0, import_type_guards25.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8251
8284
|
]
|
|
8252
8285
|
}
|
|
8253
8286
|
);
|
|
8254
8287
|
DataCard.displayName = "DataCard";
|
|
8255
8288
|
|
|
8256
8289
|
// src/components/DataCards/DataCards.tsx
|
|
8257
|
-
var
|
|
8258
|
-
var
|
|
8259
|
-
var StyledDataCards = (0,
|
|
8290
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8291
|
+
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8292
|
+
var StyledDataCards = (0, import_styled_components39.default)(Box)`
|
|
8260
8293
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8261
8294
|
margin-top: 0; /* Remove default <dl> style */
|
|
8262
8295
|
> * {
|
|
@@ -8270,7 +8303,7 @@ var DataCards = ({
|
|
|
8270
8303
|
colorScheme = "inherit",
|
|
8271
8304
|
...props
|
|
8272
8305
|
}) => {
|
|
8273
|
-
return /* @__PURE__ */ (0,
|
|
8306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8274
8307
|
StyledDataCards,
|
|
8275
8308
|
{
|
|
8276
8309
|
...props,
|
|
@@ -8288,25 +8321,25 @@ var DataCards = ({
|
|
|
8288
8321
|
DataCards.displayName = "DataCards";
|
|
8289
8322
|
|
|
8290
8323
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8291
|
-
var
|
|
8324
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8292
8325
|
|
|
8293
8326
|
// src/components/Text/Text.tsx
|
|
8294
|
-
var
|
|
8295
|
-
var
|
|
8296
|
-
var
|
|
8297
|
-
var bodyBoldStyles =
|
|
8327
|
+
var import_react24 = require("react");
|
|
8328
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8329
|
+
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8330
|
+
var bodyBoldStyles = import_styled_components40.css`
|
|
8298
8331
|
> strong,
|
|
8299
8332
|
b {
|
|
8300
8333
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8301
8334
|
}
|
|
8302
8335
|
`;
|
|
8303
|
-
var labelBoldStyles =
|
|
8336
|
+
var labelBoldStyles = import_styled_components40.css`
|
|
8304
8337
|
> strong,
|
|
8305
8338
|
b {
|
|
8306
8339
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8307
8340
|
}
|
|
8308
8341
|
`;
|
|
8309
|
-
var body1TextStyle =
|
|
8342
|
+
var body1TextStyle = import_styled_components40.css`
|
|
8310
8343
|
--font-family: var(--wui-typography-body-1-family);
|
|
8311
8344
|
--font-size: var(--wui-typography-body-1-size);
|
|
8312
8345
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8314,7 +8347,7 @@ var body1TextStyle = import_styled_components39.css`
|
|
|
8314
8347
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8315
8348
|
${bodyBoldStyles}
|
|
8316
8349
|
`;
|
|
8317
|
-
var body2TextStyle =
|
|
8350
|
+
var body2TextStyle = import_styled_components40.css`
|
|
8318
8351
|
--font-family: var(--wui-typography-body-2-family);
|
|
8319
8352
|
--font-size: var(--wui-typography-body-2-size);
|
|
8320
8353
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8322,7 +8355,7 @@ var body2TextStyle = import_styled_components39.css`
|
|
|
8322
8355
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8323
8356
|
${bodyBoldStyles}
|
|
8324
8357
|
`;
|
|
8325
|
-
var body3TextStyle =
|
|
8358
|
+
var body3TextStyle = import_styled_components40.css`
|
|
8326
8359
|
--font-family: var(--wui-typography-body-3-family);
|
|
8327
8360
|
--font-size: var(--wui-typography-body-3-size);
|
|
8328
8361
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8330,7 +8363,7 @@ var body3TextStyle = import_styled_components39.css`
|
|
|
8330
8363
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8331
8364
|
${bodyBoldStyles}
|
|
8332
8365
|
`;
|
|
8333
|
-
var body4TextStyle =
|
|
8366
|
+
var body4TextStyle = import_styled_components40.css`
|
|
8334
8367
|
--font-family: var(--wui-typography-body-4-family);
|
|
8335
8368
|
--font-size: var(--wui-typography-body-4-size);
|
|
8336
8369
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8338,47 +8371,47 @@ var body4TextStyle = import_styled_components39.css`
|
|
|
8338
8371
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8339
8372
|
${bodyBoldStyles}
|
|
8340
8373
|
`;
|
|
8341
|
-
var label1TextStyle =
|
|
8374
|
+
var label1TextStyle = import_styled_components40.css`
|
|
8342
8375
|
--font-family: var(--wui-typography-label-1-family);
|
|
8343
8376
|
--font-size: var(--wui-typography-label-1-size);
|
|
8344
8377
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8345
8378
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8346
8379
|
${labelBoldStyles}
|
|
8347
8380
|
`;
|
|
8348
|
-
var label2TextStyle =
|
|
8381
|
+
var label2TextStyle = import_styled_components40.css`
|
|
8349
8382
|
--font-family: var(--wui-typography-label-2-family);
|
|
8350
8383
|
--font-size: var(--wui-typography-label-2-size);
|
|
8351
8384
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8352
8385
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8353
8386
|
${labelBoldStyles}
|
|
8354
8387
|
`;
|
|
8355
|
-
var label3TextStyle =
|
|
8388
|
+
var label3TextStyle = import_styled_components40.css`
|
|
8356
8389
|
--font-family: var(--wui-typography-label-3-family);
|
|
8357
8390
|
--font-size: var(--wui-typography-label-3-size);
|
|
8358
8391
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8359
8392
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8360
8393
|
${labelBoldStyles}
|
|
8361
8394
|
`;
|
|
8362
|
-
var label4TextStyle =
|
|
8395
|
+
var label4TextStyle = import_styled_components40.css`
|
|
8363
8396
|
--font-family: var(--wui-typography-label-4-family);
|
|
8364
8397
|
--font-size: var(--wui-typography-label-4-size);
|
|
8365
8398
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8366
8399
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8367
8400
|
${labelBoldStyles}
|
|
8368
8401
|
`;
|
|
8369
|
-
var body1MonoTextStyle =
|
|
8402
|
+
var body1MonoTextStyle = import_styled_components40.css`
|
|
8370
8403
|
${body1TextStyle};
|
|
8371
8404
|
--font-family: var(--wui-typography-family-mono);
|
|
8372
8405
|
`;
|
|
8373
|
-
var body2MonoTextStyle =
|
|
8406
|
+
var body2MonoTextStyle = import_styled_components40.css`
|
|
8374
8407
|
${body2TextStyle};
|
|
8375
8408
|
--font-family: var(--wui-typography-family-mono);
|
|
8376
8409
|
`;
|
|
8377
|
-
var body3MonoTextStyle =
|
|
8410
|
+
var body3MonoTextStyle = import_styled_components40.css`
|
|
8378
8411
|
${body3TextStyle};
|
|
8379
8412
|
--font-family: var(--wui-typography-family-mono);
|
|
8380
8413
|
`;
|
|
8381
|
-
var body4MonoTextStyle =
|
|
8414
|
+
var body4MonoTextStyle = import_styled_components40.css`
|
|
8382
8415
|
${body4TextStyle};
|
|
8383
8416
|
--font-family: var(--wui-typography-family-mono);
|
|
8384
8417
|
`;
|
|
@@ -8413,7 +8446,7 @@ var variantElementMap2 = {
|
|
|
8413
8446
|
label3: labelElement,
|
|
8414
8447
|
label4: labelElement
|
|
8415
8448
|
};
|
|
8416
|
-
var StyledText =
|
|
8449
|
+
var StyledText = import_styled_components40.default.div`
|
|
8417
8450
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8418
8451
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8419
8452
|
if ($disabled) {
|
|
@@ -8437,19 +8470,19 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8437
8470
|
margin: 0;
|
|
8438
8471
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8439
8472
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8440
|
-
${({ $inline }) => $inline &&
|
|
8473
|
+
${({ $inline }) => $inline && import_styled_components40.css`
|
|
8441
8474
|
display: inline-block;
|
|
8442
8475
|
`}
|
|
8443
|
-
${({ $disabled }) => $disabled &&
|
|
8476
|
+
${({ $disabled }) => $disabled && import_styled_components40.css`
|
|
8444
8477
|
--text-color: var(--wui-color-text-disabled);
|
|
8445
8478
|
`}
|
|
8446
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8479
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components40.css`
|
|
8447
8480
|
user-select: none;
|
|
8448
8481
|
`}
|
|
8449
|
-
${({ $align }) =>
|
|
8482
|
+
${({ $align }) => import_styled_components40.css`
|
|
8450
8483
|
text-align: ${$align};
|
|
8451
8484
|
`}
|
|
8452
|
-
${({ as }) => as === "p" &&
|
|
8485
|
+
${({ as }) => as === "p" && import_styled_components40.css`
|
|
8453
8486
|
display: block;
|
|
8454
8487
|
|
|
8455
8488
|
+ p {
|
|
@@ -8457,7 +8490,7 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8457
8490
|
}
|
|
8458
8491
|
`}
|
|
8459
8492
|
`;
|
|
8460
|
-
var TextComponent = (0,
|
|
8493
|
+
var TextComponent = (0, import_react24.forwardRef)(
|
|
8461
8494
|
({
|
|
8462
8495
|
align = "left",
|
|
8463
8496
|
colorScheme = "inherit",
|
|
@@ -8470,7 +8503,7 @@ var TextComponent = (0, import_react23.forwardRef)(
|
|
|
8470
8503
|
renderAs,
|
|
8471
8504
|
...otherProps
|
|
8472
8505
|
}, ref) => {
|
|
8473
|
-
return /* @__PURE__ */ (0,
|
|
8506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
8474
8507
|
StyledText,
|
|
8475
8508
|
{
|
|
8476
8509
|
ref,
|
|
@@ -8492,8 +8525,8 @@ TextComponent.displayName = "Text";
|
|
|
8492
8525
|
var Text = makePolymorphic(TextComponent);
|
|
8493
8526
|
|
|
8494
8527
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8495
|
-
var
|
|
8496
|
-
var StyledDataCardTrend =
|
|
8528
|
+
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8529
|
+
var StyledDataCardTrend = import_styled_components41.default.div`
|
|
8497
8530
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8498
8531
|
background: var(--wui-color-bg-app);
|
|
8499
8532
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8508,8 +8541,8 @@ var DataCardTrend = ({
|
|
|
8508
8541
|
children,
|
|
8509
8542
|
...props
|
|
8510
8543
|
}) => {
|
|
8511
|
-
return /* @__PURE__ */ (0,
|
|
8512
|
-
/* @__PURE__ */ (0,
|
|
8544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
8545
|
+
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8513
8546
|
Icon,
|
|
8514
8547
|
{
|
|
8515
8548
|
size: "md",
|
|
@@ -8517,7 +8550,7 @@ var DataCardTrend = ({
|
|
|
8517
8550
|
...props
|
|
8518
8551
|
}
|
|
8519
8552
|
),
|
|
8520
|
-
/* @__PURE__ */ (0,
|
|
8553
|
+
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8521
8554
|
Text,
|
|
8522
8555
|
{
|
|
8523
8556
|
prominence: "secondary",
|
|
@@ -8529,22 +8562,22 @@ var DataCardTrend = ({
|
|
|
8529
8562
|
};
|
|
8530
8563
|
|
|
8531
8564
|
// src/components/Divider/Divider.tsx
|
|
8532
|
-
var
|
|
8533
|
-
var
|
|
8534
|
-
var horizontalBorderCss =
|
|
8565
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8566
|
+
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8567
|
+
var horizontalBorderCss = import_styled_components42.css`
|
|
8535
8568
|
border-top-color: var(--wui-color-border);
|
|
8536
8569
|
border-top-style: solid;
|
|
8537
8570
|
border-top-width: 1px;
|
|
8538
8571
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8539
8572
|
height: 0;
|
|
8540
8573
|
`;
|
|
8541
|
-
var verticalBorderCss =
|
|
8574
|
+
var verticalBorderCss = import_styled_components42.css`
|
|
8542
8575
|
background-color: var(--wui-color-border);
|
|
8543
8576
|
max-width: 1px;
|
|
8544
8577
|
min-height: 100%;
|
|
8545
8578
|
width: 1px;
|
|
8546
8579
|
`;
|
|
8547
|
-
var DividerComponent =
|
|
8580
|
+
var DividerComponent = import_styled_components42.default.div`
|
|
8548
8581
|
${({ $orientation }) => {
|
|
8549
8582
|
switch ($orientation) {
|
|
8550
8583
|
case "vertical":
|
|
@@ -8559,7 +8592,7 @@ var Divider = ({
|
|
|
8559
8592
|
orientation = "horizontal",
|
|
8560
8593
|
...otherProps
|
|
8561
8594
|
}) => {
|
|
8562
|
-
return /* @__PURE__ */ (0,
|
|
8595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8563
8596
|
DividerComponent,
|
|
8564
8597
|
{
|
|
8565
8598
|
$orientation: orientation,
|
|
@@ -8572,21 +8605,21 @@ var Divider = ({
|
|
|
8572
8605
|
Divider.displayName = "Divider";
|
|
8573
8606
|
|
|
8574
8607
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8575
|
-
var
|
|
8576
|
-
var
|
|
8608
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8609
|
+
var import_react26 = require("react");
|
|
8577
8610
|
|
|
8578
8611
|
// src/components/Tooltip/Tooltip.tsx
|
|
8579
8612
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8580
|
-
var
|
|
8581
|
-
var
|
|
8582
|
-
var CompactTooltipStyles =
|
|
8613
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8614
|
+
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
8615
|
+
var CompactTooltipStyles = import_styled_components43.css`
|
|
8583
8616
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8584
8617
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8585
8618
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8586
8619
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8587
8620
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8588
8621
|
`;
|
|
8589
|
-
var StyledContent = (0,
|
|
8622
|
+
var StyledContent = (0, import_styled_components43.default)(import_react_tooltip2.Content)`
|
|
8590
8623
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8591
8624
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8592
8625
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8645,14 +8678,14 @@ var Tooltip = ({
|
|
|
8645
8678
|
if (forceOpen === true) {
|
|
8646
8679
|
rootProps.open = true;
|
|
8647
8680
|
}
|
|
8648
|
-
return /* @__PURE__ */ (0,
|
|
8681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
8649
8682
|
import_react_tooltip2.Root,
|
|
8650
8683
|
{
|
|
8651
8684
|
delayDuration: delay,
|
|
8652
8685
|
...rootProps,
|
|
8653
8686
|
children: [
|
|
8654
|
-
/* @__PURE__ */ (0,
|
|
8655
|
-
/* @__PURE__ */ (0,
|
|
8687
|
+
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8688
|
+
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)(
|
|
8656
8689
|
StyledContent,
|
|
8657
8690
|
{
|
|
8658
8691
|
$compact: compact,
|
|
@@ -8660,7 +8693,7 @@ var Tooltip = ({
|
|
|
8660
8693
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8661
8694
|
children: [
|
|
8662
8695
|
content,
|
|
8663
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8696
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
8664
8697
|
"svg",
|
|
8665
8698
|
{
|
|
8666
8699
|
fill: "var(--tooltip-bg)",
|
|
@@ -8669,7 +8702,7 @@ var Tooltip = ({
|
|
|
8669
8702
|
viewBox: "0 0 12 8",
|
|
8670
8703
|
width: "12",
|
|
8671
8704
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8672
|
-
children: /* @__PURE__ */ (0,
|
|
8705
|
+
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" })
|
|
8673
8706
|
}
|
|
8674
8707
|
) }) : null
|
|
8675
8708
|
]
|
|
@@ -8682,11 +8715,11 @@ var Tooltip = ({
|
|
|
8682
8715
|
Tooltip.displayName = "Tooltip";
|
|
8683
8716
|
|
|
8684
8717
|
// src/components/Input/Input.tsx
|
|
8685
|
-
var
|
|
8686
|
-
var
|
|
8718
|
+
var import_react25 = require("react");
|
|
8719
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8687
8720
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8688
|
-
var
|
|
8689
|
-
var inputStyles =
|
|
8721
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
8722
|
+
var inputStyles = import_styled_components44.css`
|
|
8690
8723
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8691
8724
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8692
8725
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -8727,7 +8760,7 @@ var inputStyles = import_styled_components43.css`
|
|
|
8727
8760
|
}
|
|
8728
8761
|
}
|
|
8729
8762
|
`;
|
|
8730
|
-
var StyledInputContainer =
|
|
8763
|
+
var StyledInputContainer = import_styled_components44.default.div`
|
|
8731
8764
|
display: inline-flex;
|
|
8732
8765
|
position: relative;
|
|
8733
8766
|
${inputStyles};
|
|
@@ -8771,7 +8804,7 @@ var StyledInputContainer = import_styled_components43.default.div`
|
|
|
8771
8804
|
padding-right: 32px;
|
|
8772
8805
|
}
|
|
8773
8806
|
`;
|
|
8774
|
-
var Input = (0,
|
|
8807
|
+
var Input = (0, import_react25.forwardRef)(
|
|
8775
8808
|
({
|
|
8776
8809
|
fullWidth = true,
|
|
8777
8810
|
monospace = false,
|
|
@@ -8781,24 +8814,24 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8781
8814
|
rightIcon,
|
|
8782
8815
|
...props
|
|
8783
8816
|
}, externalRef) => {
|
|
8784
|
-
const internalRef = (0,
|
|
8817
|
+
const internalRef = (0, import_react25.useRef)();
|
|
8785
8818
|
const ref = (
|
|
8786
8819
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8787
8820
|
(0, import_type_guards26.isNotNil)(externalRef) && (0, import_type_guards26.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
8788
8821
|
);
|
|
8789
8822
|
let leftIconToDisplay = leftIcon;
|
|
8790
8823
|
if ((0, import_type_guards26.isNil)(leftIcon) && type === "search") {
|
|
8791
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
8824
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(Icon, { type: "search" });
|
|
8792
8825
|
}
|
|
8793
8826
|
if ((0, import_type_guards26.isNotNil)(leftIconToDisplay)) {
|
|
8794
|
-
leftIconToDisplay = (0,
|
|
8827
|
+
leftIconToDisplay = (0, import_react25.cloneElement)(leftIconToDisplay, {
|
|
8795
8828
|
size: "md",
|
|
8796
8829
|
className: "wui-input-left-icon"
|
|
8797
8830
|
});
|
|
8798
8831
|
}
|
|
8799
8832
|
let rightIconToDisplay = rightIcon;
|
|
8800
8833
|
if ((0, import_type_guards26.isNotNil)(rightIconToDisplay)) {
|
|
8801
|
-
rightIconToDisplay = (0,
|
|
8834
|
+
rightIconToDisplay = (0, import_react25.cloneElement)(rightIconToDisplay, {
|
|
8802
8835
|
size: "md",
|
|
8803
8836
|
className: "wui-input-right-icon"
|
|
8804
8837
|
});
|
|
@@ -8813,21 +8846,21 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8813
8846
|
});
|
|
8814
8847
|
}
|
|
8815
8848
|
};
|
|
8816
|
-
return /* @__PURE__ */ (0,
|
|
8849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsxs)(
|
|
8817
8850
|
StyledInputContainer,
|
|
8818
8851
|
{
|
|
8819
8852
|
$fullWidth: fullWidth,
|
|
8820
8853
|
$monospace: monospace,
|
|
8821
8854
|
children: [
|
|
8822
8855
|
leftIconToDisplay ?? null,
|
|
8823
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
8856
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
8824
8857
|
"textarea",
|
|
8825
8858
|
{
|
|
8826
8859
|
...props,
|
|
8827
8860
|
ref,
|
|
8828
8861
|
onFocus: handleFocus
|
|
8829
8862
|
}
|
|
8830
|
-
) : /* @__PURE__ */ (0,
|
|
8863
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
8831
8864
|
"input",
|
|
8832
8865
|
{
|
|
8833
8866
|
...props,
|
|
@@ -8845,8 +8878,8 @@ var Input = (0, import_react24.forwardRef)(
|
|
|
8845
8878
|
Input.displayName = "Input";
|
|
8846
8879
|
|
|
8847
8880
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8848
|
-
var
|
|
8849
|
-
var StyledInput = (0,
|
|
8881
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
8882
|
+
var StyledInput = (0, import_styled_components45.default)(Input)`
|
|
8850
8883
|
:not([rows]) {
|
|
8851
8884
|
min-height: unset;
|
|
8852
8885
|
}
|
|
@@ -8866,7 +8899,7 @@ var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
|
8866
8899
|
height: ${({ $height }) => `${$height}px`};
|
|
8867
8900
|
}
|
|
8868
8901
|
`;
|
|
8869
|
-
var editableStyles =
|
|
8902
|
+
var editableStyles = import_styled_components45.css`
|
|
8870
8903
|
&:has(+ :focus-within) {
|
|
8871
8904
|
background: var(--wui-color-bg-surface-hover);
|
|
8872
8905
|
}
|
|
@@ -8876,7 +8909,7 @@ var editableStyles = import_styled_components44.css`
|
|
|
8876
8909
|
cursor: pointer;
|
|
8877
8910
|
}
|
|
8878
8911
|
`;
|
|
8879
|
-
var StyledHeading2 = (0,
|
|
8912
|
+
var StyledHeading2 = (0, import_styled_components45.default)(Heading)`
|
|
8880
8913
|
width: 100%;
|
|
8881
8914
|
border-radius: var(--wui-border-radius-02);
|
|
8882
8915
|
padding: var(--wui-space-02);
|
|
@@ -8893,11 +8926,11 @@ var EditableHeading = ({
|
|
|
8893
8926
|
forceEditing = false,
|
|
8894
8927
|
editingDisabled = false
|
|
8895
8928
|
}) => {
|
|
8896
|
-
const [isEditing, setIsEditing] = (0,
|
|
8897
|
-
const [value, setValue] = (0,
|
|
8898
|
-
const [previousValue, setPreviousValue] = (0,
|
|
8899
|
-
const [headingHeight, setHeadingHeight] = (0,
|
|
8900
|
-
const headingRef = (0,
|
|
8929
|
+
const [isEditing, setIsEditing] = (0, import_react26.useState)(false);
|
|
8930
|
+
const [value, setValue] = (0, import_react26.useState)(children);
|
|
8931
|
+
const [previousValue, setPreviousValue] = (0, import_react26.useState)(children);
|
|
8932
|
+
const [headingHeight, setHeadingHeight] = (0, import_react26.useState)("60");
|
|
8933
|
+
const headingRef = (0, import_react26.useRef)(null);
|
|
8901
8934
|
const handleSetEditing = (editing) => {
|
|
8902
8935
|
if (editingDisabled) return;
|
|
8903
8936
|
if (editing && headingRef.current) {
|
|
@@ -8930,7 +8963,7 @@ var EditableHeading = ({
|
|
|
8930
8963
|
handleSetEditing(false);
|
|
8931
8964
|
}
|
|
8932
8965
|
};
|
|
8933
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
8966
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8934
8967
|
StyledHeading2,
|
|
8935
8968
|
{
|
|
8936
8969
|
ref: headingRef,
|
|
@@ -8944,7 +8977,7 @@ var EditableHeading = ({
|
|
|
8944
8977
|
return HeadingComponent2;
|
|
8945
8978
|
}
|
|
8946
8979
|
if (isEditing || forceEditing) {
|
|
8947
|
-
return /* @__PURE__ */ (0,
|
|
8980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8948
8981
|
StyledInput,
|
|
8949
8982
|
{
|
|
8950
8983
|
$height: headingHeight,
|
|
@@ -8962,8 +8995,8 @@ var EditableHeading = ({
|
|
|
8962
8995
|
}
|
|
8963
8996
|
);
|
|
8964
8997
|
}
|
|
8965
|
-
return /* @__PURE__ */ (0,
|
|
8966
|
-
/* @__PURE__ */ (0,
|
|
8998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(import_jsx_runtime219.Fragment, { children: [
|
|
8999
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8967
9000
|
Tooltip,
|
|
8968
9001
|
{
|
|
8969
9002
|
compact: true,
|
|
@@ -8971,7 +9004,7 @@ var EditableHeading = ({
|
|
|
8971
9004
|
children: HeadingComponent2
|
|
8972
9005
|
}
|
|
8973
9006
|
),
|
|
8974
|
-
/* @__PURE__ */ (0,
|
|
9007
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
8975
9008
|
"button",
|
|
8976
9009
|
{
|
|
8977
9010
|
"aria-label": ariaLabel,
|
|
@@ -8983,27 +9016,27 @@ var EditableHeading = ({
|
|
|
8983
9016
|
};
|
|
8984
9017
|
|
|
8985
9018
|
// src/components/Form/Form.tsx
|
|
8986
|
-
var
|
|
8987
|
-
var
|
|
9019
|
+
var import_react28 = require("react");
|
|
9020
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8988
9021
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8989
9022
|
|
|
8990
9023
|
// src/components/Stack/Stack.tsx
|
|
8991
|
-
var
|
|
8992
|
-
var
|
|
8993
|
-
var
|
|
9024
|
+
var import_react27 = require("react");
|
|
9025
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
9026
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
8994
9027
|
var DEFAULT_ELEMENT4 = "div";
|
|
8995
|
-
var StyledStack =
|
|
9028
|
+
var StyledStack = import_styled_components46.default.div`
|
|
8996
9029
|
display: flex;
|
|
8997
9030
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8998
9031
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
8999
9032
|
align-items: ${({ $alignItems }) => $alignItems};
|
|
9000
9033
|
`;
|
|
9001
|
-
var StackComponent = (0,
|
|
9034
|
+
var StackComponent = (0, import_react27.forwardRef)(
|
|
9002
9035
|
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
9003
9036
|
const responsiveGap = useResponsiveProp(gap);
|
|
9004
9037
|
const responsiveDirection = useResponsiveProp(direction);
|
|
9005
9038
|
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
9006
|
-
return /* @__PURE__ */ (0,
|
|
9039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
|
|
9007
9040
|
StyledStack,
|
|
9008
9041
|
{
|
|
9009
9042
|
ref,
|
|
@@ -9020,14 +9053,14 @@ StackComponent.displayName = "Stack";
|
|
|
9020
9053
|
var Stack = makePolymorphic(StackComponent);
|
|
9021
9054
|
|
|
9022
9055
|
// src/components/Form/Form.tsx
|
|
9023
|
-
var
|
|
9024
|
-
var StyledForm =
|
|
9056
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
9057
|
+
var StyledForm = import_styled_components47.default.form`
|
|
9025
9058
|
--form-default-width: 690px;
|
|
9026
9059
|
|
|
9027
9060
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
9028
9061
|
align-items: ${({ $fullWidth }) => $fullWidth ? "stretch" : "flex-start"};
|
|
9029
9062
|
`;
|
|
9030
|
-
var FormContext = (0,
|
|
9063
|
+
var FormContext = (0, import_react28.createContext)({
|
|
9031
9064
|
values: {},
|
|
9032
9065
|
errors: {},
|
|
9033
9066
|
hasSubmitted: false,
|
|
@@ -9043,11 +9076,11 @@ var FormComponent = ({
|
|
|
9043
9076
|
fullWidth = false,
|
|
9044
9077
|
...props
|
|
9045
9078
|
}, forwardedRef) => {
|
|
9046
|
-
const [errors, setErrors] = (0,
|
|
9047
|
-
const [hasSubmitted, setHasSubmitted] = (0,
|
|
9048
|
-
const innerRef = (0,
|
|
9079
|
+
const [errors, setErrors] = (0, import_react28.useState)({});
|
|
9080
|
+
const [hasSubmitted, setHasSubmitted] = (0, import_react28.useState)(false);
|
|
9081
|
+
const innerRef = (0, import_react28.useRef)();
|
|
9049
9082
|
const ref = forwardedRef ?? innerRef;
|
|
9050
|
-
const autoId = (0,
|
|
9083
|
+
const autoId = (0, import_react28.useId)();
|
|
9051
9084
|
const id = props.id ?? autoId;
|
|
9052
9085
|
const handleValidate = (nextFormData) => {
|
|
9053
9086
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
@@ -9089,7 +9122,7 @@ var FormComponent = ({
|
|
|
9089
9122
|
void action(null);
|
|
9090
9123
|
}
|
|
9091
9124
|
};
|
|
9092
|
-
const context = (0,
|
|
9125
|
+
const context = (0, import_react28.useMemo)(() => {
|
|
9093
9126
|
return {
|
|
9094
9127
|
values,
|
|
9095
9128
|
errors,
|
|
@@ -9100,7 +9133,7 @@ var FormComponent = ({
|
|
|
9100
9133
|
}, [labelPosition, values, errors, id, hasSubmitted]);
|
|
9101
9134
|
return (
|
|
9102
9135
|
// @ts-expect-error - generic context providers are a giant pain
|
|
9103
|
-
/* @__PURE__ */ (0,
|
|
9136
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9104
9137
|
Stack,
|
|
9105
9138
|
{
|
|
9106
9139
|
...props,
|
|
@@ -9118,15 +9151,15 @@ var FormComponent = ({
|
|
|
9118
9151
|
);
|
|
9119
9152
|
};
|
|
9120
9153
|
FormComponent.displayName = "Form";
|
|
9121
|
-
var Form = (0,
|
|
9154
|
+
var Form = (0, import_react28.forwardRef)(FormComponent);
|
|
9122
9155
|
|
|
9123
9156
|
// src/components/Form/useFormState.tsx
|
|
9124
|
-
var
|
|
9157
|
+
var import_react29 = require("react");
|
|
9125
9158
|
var useFormState = (action, initialData = {}) => {
|
|
9126
|
-
const [data, setData] = (0,
|
|
9127
|
-
const [isPending, setIsPending] = (0,
|
|
9128
|
-
const [error, setError] = (0,
|
|
9129
|
-
const formAction = (0,
|
|
9159
|
+
const [data, setData] = (0, import_react29.useState)(initialData);
|
|
9160
|
+
const [isPending, setIsPending] = (0, import_react29.useState)(false);
|
|
9161
|
+
const [error, setError] = (0, import_react29.useState)(null);
|
|
9162
|
+
const formAction = (0, import_react29.useCallback)(
|
|
9130
9163
|
async (nextFormData) => {
|
|
9131
9164
|
if (nextFormData === null) {
|
|
9132
9165
|
setData(initialData);
|
|
@@ -9157,23 +9190,23 @@ var useFormState = (action, initialData = {}) => {
|
|
|
9157
9190
|
};
|
|
9158
9191
|
|
|
9159
9192
|
// src/components/Form/FormErrorSummary.tsx
|
|
9160
|
-
var
|
|
9193
|
+
var import_react30 = require("react");
|
|
9161
9194
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
9162
|
-
var
|
|
9195
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9163
9196
|
var ErrorItem = ({ name, error, formId }) => {
|
|
9164
|
-
return /* @__PURE__ */ (0,
|
|
9197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
9165
9198
|
};
|
|
9166
9199
|
var FormErrorSummary = ({ description }) => {
|
|
9167
|
-
const ref = (0,
|
|
9168
|
-
const { formId, errors, hasSubmitted } = (0,
|
|
9200
|
+
const ref = (0, import_react30.useRef)(null);
|
|
9201
|
+
const { formId, errors, hasSubmitted } = (0, import_react30.useContext)(FormContext);
|
|
9169
9202
|
const isValid = Object.keys(errors).length === 0;
|
|
9170
9203
|
if (isValid || !hasSubmitted) {
|
|
9171
9204
|
return null;
|
|
9172
9205
|
}
|
|
9173
|
-
return /* @__PURE__ */ (0,
|
|
9174
|
-
/* @__PURE__ */ (0,
|
|
9175
|
-
/* @__PURE__ */ (0,
|
|
9176
|
-
([name, error]) => (0, import_type_guards28.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0,
|
|
9206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ref, children: [
|
|
9207
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("p", { children: description }),
|
|
9208
|
+
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards28.isNotUndefined)(error)).map(
|
|
9209
|
+
([name, error]) => (0, import_type_guards28.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9177
9210
|
ErrorItem,
|
|
9178
9211
|
{
|
|
9179
9212
|
error: err,
|
|
@@ -9181,7 +9214,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9181
9214
|
name
|
|
9182
9215
|
},
|
|
9183
9216
|
err
|
|
9184
|
-
)) : /* @__PURE__ */ (0,
|
|
9217
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
|
|
9185
9218
|
ErrorItem,
|
|
9186
9219
|
{
|
|
9187
9220
|
error: error ?? "",
|
|
@@ -9195,14 +9228,14 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9195
9228
|
};
|
|
9196
9229
|
|
|
9197
9230
|
// src/components/FormField/FormField.tsx
|
|
9198
|
-
var
|
|
9199
|
-
var
|
|
9231
|
+
var import_react33 = require("react");
|
|
9232
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9200
9233
|
var import_type_guards29 = require("@wistia/type-guards");
|
|
9201
9234
|
|
|
9202
9235
|
// src/components/Label/Label.tsx
|
|
9203
|
-
var
|
|
9204
|
-
var
|
|
9205
|
-
var requiredStyle =
|
|
9236
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
9237
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9238
|
+
var requiredStyle = import_styled_components48.css`
|
|
9206
9239
|
&::after {
|
|
9207
9240
|
color: var(--wui-color-text-error);
|
|
9208
9241
|
display: inline;
|
|
@@ -9210,10 +9243,10 @@ var requiredStyle = import_styled_components47.css`
|
|
|
9210
9243
|
content: '*';
|
|
9211
9244
|
}
|
|
9212
9245
|
`;
|
|
9213
|
-
var disabledStyle3 =
|
|
9246
|
+
var disabledStyle3 = import_styled_components48.css`
|
|
9214
9247
|
color: var(--wui-color-text-disabled);
|
|
9215
9248
|
`;
|
|
9216
|
-
var StyledLabel3 =
|
|
9249
|
+
var StyledLabel3 = import_styled_components48.default.label`
|
|
9217
9250
|
display: block;
|
|
9218
9251
|
width: 100%;
|
|
9219
9252
|
color: var(--wui-color-text);
|
|
@@ -9245,7 +9278,7 @@ var Label = ({
|
|
|
9245
9278
|
screenReaderOnly = false,
|
|
9246
9279
|
...otherProps
|
|
9247
9280
|
}) => {
|
|
9248
|
-
return /* @__PURE__ */ (0,
|
|
9281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9249
9282
|
StyledLabel3,
|
|
9250
9283
|
{
|
|
9251
9284
|
...otherProps,
|
|
@@ -9260,28 +9293,28 @@ var Label = ({
|
|
|
9260
9293
|
Label.displayName = "Label";
|
|
9261
9294
|
|
|
9262
9295
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9263
|
-
var
|
|
9296
|
+
var import_react32 = require("react");
|
|
9264
9297
|
|
|
9265
9298
|
// src/components/FormGroup/FormGroup.tsx
|
|
9266
|
-
var
|
|
9267
|
-
var
|
|
9268
|
-
var
|
|
9269
|
-
var StyledFieldset =
|
|
9299
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9300
|
+
var import_react31 = require("react");
|
|
9301
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9302
|
+
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9270
9303
|
border: 0;
|
|
9271
9304
|
`;
|
|
9272
|
-
var StyledLegend =
|
|
9305
|
+
var StyledLegend = import_styled_components49.default.legend`
|
|
9273
9306
|
margin-bottom: var(--space-01);
|
|
9274
9307
|
`;
|
|
9275
9308
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9276
|
-
const ref = (0,
|
|
9277
|
-
return /* @__PURE__ */ (0,
|
|
9309
|
+
const ref = (0, import_react31.useRef)();
|
|
9310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime224.jsxs)(
|
|
9278
9311
|
Stack,
|
|
9279
9312
|
{
|
|
9280
9313
|
...props,
|
|
9281
9314
|
ref,
|
|
9282
9315
|
renderAs: StyledFieldset,
|
|
9283
9316
|
children: [
|
|
9284
|
-
/* @__PURE__ */ (0,
|
|
9317
|
+
/* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9285
9318
|
Heading,
|
|
9286
9319
|
{
|
|
9287
9320
|
renderAs: StyledLegend,
|
|
@@ -9297,8 +9330,8 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
9297
9330
|
FormGroup.displayName = "FormGroup";
|
|
9298
9331
|
|
|
9299
9332
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9300
|
-
var
|
|
9301
|
-
var CheckboxGroupContext = (0,
|
|
9333
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9334
|
+
var CheckboxGroupContext = (0, import_react32.createContext)(null);
|
|
9302
9335
|
var CheckboxGroup = ({
|
|
9303
9336
|
children,
|
|
9304
9337
|
name,
|
|
@@ -9306,19 +9339,19 @@ var CheckboxGroup = ({
|
|
|
9306
9339
|
value,
|
|
9307
9340
|
...props
|
|
9308
9341
|
}) => {
|
|
9309
|
-
const context = (0,
|
|
9342
|
+
const context = (0, import_react32.useMemo)(() => {
|
|
9310
9343
|
return {
|
|
9311
9344
|
name,
|
|
9312
9345
|
onChange
|
|
9313
9346
|
};
|
|
9314
9347
|
}, [name, onChange]);
|
|
9315
|
-
return /* @__PURE__ */ (0,
|
|
9348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(FormGroup, { ...props, children }) });
|
|
9316
9349
|
};
|
|
9317
9350
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9318
9351
|
|
|
9319
9352
|
// src/components/FormField/FormField.tsx
|
|
9320
|
-
var
|
|
9321
|
-
var StyledFormField =
|
|
9353
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9354
|
+
var StyledFormField = import_styled_components50.default.div`
|
|
9322
9355
|
--form-field-spacing: var(--wui-space-01);
|
|
9323
9356
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9324
9357
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9348,7 +9381,7 @@ var StyledFormField = import_styled_components49.default.div`
|
|
|
9348
9381
|
grid-template-rows: 1fr;
|
|
9349
9382
|
}
|
|
9350
9383
|
`;
|
|
9351
|
-
var StyledErrorList =
|
|
9384
|
+
var StyledErrorList = import_styled_components50.default.ul`
|
|
9352
9385
|
margin: 0;
|
|
9353
9386
|
padding: 0;
|
|
9354
9387
|
padding-left: var(--wui-space-04);
|
|
@@ -9358,7 +9391,7 @@ var StyledErrorList = import_styled_components49.default.ul`
|
|
|
9358
9391
|
`;
|
|
9359
9392
|
var ErrorMessages = ({ errors, id }) => {
|
|
9360
9393
|
const isMultipleErrors = (0, import_type_guards29.isArray)(errors);
|
|
9361
|
-
return isMultipleErrors ? /* @__PURE__ */ (0,
|
|
9394
|
+
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9362
9395
|
Text,
|
|
9363
9396
|
{
|
|
9364
9397
|
colorScheme: "error",
|
|
@@ -9368,7 +9401,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
9368
9401
|
children: error
|
|
9369
9402
|
},
|
|
9370
9403
|
`${id}-${index}`
|
|
9371
|
-
)) }) : /* @__PURE__ */ (0,
|
|
9404
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9372
9405
|
Text,
|
|
9373
9406
|
{
|
|
9374
9407
|
colorScheme: "error",
|
|
@@ -9391,8 +9424,8 @@ var FormField = ({
|
|
|
9391
9424
|
value,
|
|
9392
9425
|
...props
|
|
9393
9426
|
}) => {
|
|
9394
|
-
const formState = (0,
|
|
9395
|
-
const checkboxGroup = (0,
|
|
9427
|
+
const formState = (0, import_react33.useContext)(FormContext);
|
|
9428
|
+
const checkboxGroup = (0, import_react33.useContext)(CheckboxGroupContext);
|
|
9396
9429
|
const defaultValue = formState.values[name];
|
|
9397
9430
|
const isIntegratedLabel = children.type === Checkbox;
|
|
9398
9431
|
const computedId = id ?? `${formState.formId}-${name}`;
|
|
@@ -9430,19 +9463,19 @@ var FormField = ({
|
|
|
9430
9463
|
"aria-invalid": (0, import_type_guards29.isNotNil)(error)
|
|
9431
9464
|
};
|
|
9432
9465
|
}
|
|
9433
|
-
|
|
9434
|
-
return /* @__PURE__ */ (0,
|
|
9466
|
+
import_react33.Children.only(children);
|
|
9467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(
|
|
9435
9468
|
StyledFormField,
|
|
9436
9469
|
{
|
|
9437
9470
|
...props,
|
|
9438
9471
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9439
9472
|
children: [
|
|
9440
|
-
!isIntegratedLabel && /* @__PURE__ */ (0,
|
|
9441
|
-
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
9442
|
-
(0,
|
|
9443
|
-
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0,
|
|
9444
|
-
/* @__PURE__ */ (0,
|
|
9445
|
-
/* @__PURE__ */ (0,
|
|
9473
|
+
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9474
|
+
(0, import_type_guards29.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
9475
|
+
(0, import_react33.cloneElement)(children, childProps),
|
|
9476
|
+
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime226.jsxs)(import_jsx_runtime226.Fragment, { children: [
|
|
9477
|
+
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)("div", {}),
|
|
9478
|
+
/* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9446
9479
|
ErrorMessages,
|
|
9447
9480
|
{
|
|
9448
9481
|
errors: computedError,
|
|
@@ -9457,9 +9490,9 @@ var FormField = ({
|
|
|
9457
9490
|
FormField.displayName = "FormField";
|
|
9458
9491
|
|
|
9459
9492
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9460
|
-
var
|
|
9461
|
-
var
|
|
9462
|
-
var RadioGroupContext = (0,
|
|
9493
|
+
var import_react34 = require("react");
|
|
9494
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9495
|
+
var RadioGroupContext = (0, import_react34.createContext)(null);
|
|
9463
9496
|
var RadioGroup = ({
|
|
9464
9497
|
children,
|
|
9465
9498
|
name,
|
|
@@ -9467,21 +9500,21 @@ var RadioGroup = ({
|
|
|
9467
9500
|
value,
|
|
9468
9501
|
...props
|
|
9469
9502
|
}) => {
|
|
9470
|
-
const context = (0,
|
|
9503
|
+
const context = (0, import_react34.useMemo)(() => {
|
|
9471
9504
|
return {
|
|
9472
9505
|
name,
|
|
9473
9506
|
onChange
|
|
9474
9507
|
};
|
|
9475
9508
|
}, [name, onChange]);
|
|
9476
|
-
return /* @__PURE__ */ (0,
|
|
9509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(FormGroup, { ...props, children }) });
|
|
9477
9510
|
};
|
|
9478
9511
|
RadioGroup.displayName = "RadioGroup";
|
|
9479
9512
|
|
|
9480
9513
|
// src/components/IconButton/IconButton.tsx
|
|
9481
|
-
var
|
|
9482
|
-
var
|
|
9483
|
-
var
|
|
9484
|
-
var StyledButton2 = (0,
|
|
9514
|
+
var import_react35 = require("react");
|
|
9515
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9516
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9517
|
+
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
9485
9518
|
--icon-button-size-sm: 24px;
|
|
9486
9519
|
--icon-button-size-md: 32px;
|
|
9487
9520
|
--icon-button-size-lg: 40px;
|
|
@@ -9495,10 +9528,10 @@ var StyledButton2 = (0, import_styled_components50.default)(Button)`
|
|
|
9495
9528
|
align-items: center;
|
|
9496
9529
|
line-height: 1;
|
|
9497
9530
|
`;
|
|
9498
|
-
var IconButton = (0,
|
|
9531
|
+
var IconButton = (0, import_react35.forwardRef)(
|
|
9499
9532
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9500
9533
|
const responsiveSize = useResponsiveProp(size);
|
|
9501
|
-
return /* @__PURE__ */ (0,
|
|
9534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(
|
|
9502
9535
|
StyledButton2,
|
|
9503
9536
|
{
|
|
9504
9537
|
...props,
|
|
@@ -9506,7 +9539,7 @@ var IconButton = (0, import_react34.forwardRef)(
|
|
|
9506
9539
|
"aria-label": label,
|
|
9507
9540
|
"data-wistia-ui-icon-button": true,
|
|
9508
9541
|
size: responsiveSize,
|
|
9509
|
-
children: (0,
|
|
9542
|
+
children: (0, import_react35.cloneElement)(import_react35.Children.only(children), {
|
|
9510
9543
|
size: responsiveSize
|
|
9511
9544
|
})
|
|
9512
9545
|
}
|
|
@@ -9516,9 +9549,9 @@ var IconButton = (0, import_react34.forwardRef)(
|
|
|
9516
9549
|
IconButton.displayName = "IconButton";
|
|
9517
9550
|
|
|
9518
9551
|
// src/components/Image/Image.tsx
|
|
9519
|
-
var
|
|
9552
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9520
9553
|
var import_type_guards30 = require("@wistia/type-guards");
|
|
9521
|
-
var
|
|
9554
|
+
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9522
9555
|
var getFillStyle2 = (fillContainer) => {
|
|
9523
9556
|
if (fillContainer === "horizontal") {
|
|
9524
9557
|
return "width: 100%;";
|
|
@@ -9534,7 +9567,7 @@ var getFillStyle2 = (fillContainer) => {
|
|
|
9534
9567
|
}
|
|
9535
9568
|
return void 0;
|
|
9536
9569
|
};
|
|
9537
|
-
var StyledImage =
|
|
9570
|
+
var StyledImage = import_styled_components52.default.img`
|
|
9538
9571
|
border-radius: ${({ $borderRadius }) => (0, import_type_guards30.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9539
9572
|
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9540
9573
|
object-fit: ${({ $objFit }) => $objFit};
|
|
@@ -9549,7 +9582,7 @@ var Image = ({
|
|
|
9549
9582
|
loading = "lazy",
|
|
9550
9583
|
position: objPosition,
|
|
9551
9584
|
...otherProps
|
|
9552
|
-
}) => /* @__PURE__ */ (0,
|
|
9585
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9553
9586
|
StyledImage,
|
|
9554
9587
|
{
|
|
9555
9588
|
$borderRadius: borderRadius,
|
|
@@ -9565,19 +9598,19 @@ var Image = ({
|
|
|
9565
9598
|
Image.displayName = "Image";
|
|
9566
9599
|
|
|
9567
9600
|
// src/components/Menu/Menu.tsx
|
|
9568
|
-
var
|
|
9601
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9569
9602
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9570
9603
|
var import_type_guards31 = require("@wistia/type-guards");
|
|
9571
|
-
var
|
|
9604
|
+
var import_react37 = require("react");
|
|
9572
9605
|
|
|
9573
9606
|
// src/components/Menu/MenuContext.tsx
|
|
9574
|
-
var
|
|
9575
|
-
var MenuContext = (0,
|
|
9576
|
-
var useMenuContext = () => (0,
|
|
9607
|
+
var import_react36 = require("react");
|
|
9608
|
+
var MenuContext = (0, import_react36.createContext)({ compact: false });
|
|
9609
|
+
var useMenuContext = () => (0, import_react36.useContext)(MenuContext);
|
|
9577
9610
|
|
|
9578
9611
|
// src/components/Menu/Menu.tsx
|
|
9579
|
-
var
|
|
9580
|
-
var open =
|
|
9612
|
+
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
9613
|
+
var open = import_styled_components53.keyframes`
|
|
9581
9614
|
from {
|
|
9582
9615
|
opacity: 0;
|
|
9583
9616
|
transform: scale(.97) translateY(-8px);
|
|
@@ -9587,7 +9620,7 @@ var open = import_styled_components52.keyframes`
|
|
|
9587
9620
|
transform: scale(1);
|
|
9588
9621
|
}
|
|
9589
9622
|
`;
|
|
9590
|
-
var close =
|
|
9623
|
+
var close = import_styled_components53.keyframes`
|
|
9591
9624
|
from {
|
|
9592
9625
|
opacity: 1;
|
|
9593
9626
|
transform: scale(1);
|
|
@@ -9597,7 +9630,7 @@ var close = import_styled_components52.keyframes`
|
|
|
9597
9630
|
transform: scale(.97) translateY(-8px);
|
|
9598
9631
|
}
|
|
9599
9632
|
`;
|
|
9600
|
-
var menuItemCss =
|
|
9633
|
+
var menuItemCss = import_styled_components53.css`
|
|
9601
9634
|
--menu-label-description-gap: var(--wui-space-01);
|
|
9602
9635
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
9603
9636
|
--menu-item-left-icon-size: 24px;
|
|
@@ -9608,7 +9641,7 @@ var menuItemCss = import_styled_components52.css`
|
|
|
9608
9641
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
9609
9642
|
--menu-divider-margin: var(--wui-space-02);
|
|
9610
9643
|
`;
|
|
9611
|
-
var compactMenuItemCss =
|
|
9644
|
+
var compactMenuItemCss = import_styled_components53.css`
|
|
9612
9645
|
--menu-label-description-gap: 0;
|
|
9613
9646
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
9614
9647
|
--menu-item-left-icon-size: 16px;
|
|
@@ -9619,7 +9652,7 @@ var compactMenuItemCss = import_styled_components52.css`
|
|
|
9619
9652
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
9620
9653
|
--menu-divider-margin: var(--wui-space-01);
|
|
9621
9654
|
`;
|
|
9622
|
-
var menuContentCss =
|
|
9655
|
+
var menuContentCss = import_styled_components53.css`
|
|
9623
9656
|
--menu-font-family: var(--wui-typography-family-default);
|
|
9624
9657
|
--menu-bg: var(--wui-color-bg-surface);
|
|
9625
9658
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -9661,7 +9694,7 @@ var menuContentCss = import_styled_components52.css`
|
|
|
9661
9694
|
margin: var(--menu-divider-margin) 0;
|
|
9662
9695
|
}
|
|
9663
9696
|
`;
|
|
9664
|
-
var MenuContent = (0,
|
|
9697
|
+
var MenuContent = (0, import_styled_components53.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
9665
9698
|
${menuContentCss}
|
|
9666
9699
|
`;
|
|
9667
9700
|
var Menu = ({
|
|
@@ -9677,7 +9710,7 @@ var Menu = ({
|
|
|
9677
9710
|
onInteractOutside,
|
|
9678
9711
|
...props
|
|
9679
9712
|
}) => {
|
|
9680
|
-
const contextValue = (0,
|
|
9713
|
+
const contextValue = (0, import_react37.useMemo)(() => ({ compact }), [compact]);
|
|
9681
9714
|
let controlProps = {
|
|
9682
9715
|
...(0, import_type_guards31.isNotNil)(onOpenChange) && (0, import_type_guards31.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9683
9716
|
};
|
|
@@ -9687,24 +9720,24 @@ var Menu = ({
|
|
|
9687
9720
|
onOpenChange: () => null
|
|
9688
9721
|
};
|
|
9689
9722
|
}
|
|
9690
|
-
return /* @__PURE__ */ (0,
|
|
9723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime230.jsxs)(
|
|
9691
9724
|
import_react_dropdown_menu.DropdownMenu,
|
|
9692
9725
|
{
|
|
9693
9726
|
modal: false,
|
|
9694
9727
|
...controlProps,
|
|
9695
9728
|
children: [
|
|
9696
|
-
/* @__PURE__ */ (0,
|
|
9729
|
+
/* @__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)(
|
|
9697
9730
|
Button,
|
|
9698
9731
|
{
|
|
9699
9732
|
"aria-expanded": isOpen,
|
|
9700
9733
|
disabled,
|
|
9701
9734
|
forceState: isOpen ? "active" : void 0,
|
|
9702
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9735
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(Icon, { type: "caret-down" }),
|
|
9703
9736
|
...triggerProps,
|
|
9704
9737
|
children: label
|
|
9705
9738
|
}
|
|
9706
9739
|
) }),
|
|
9707
|
-
/* @__PURE__ */ (0,
|
|
9740
|
+
/* @__PURE__ */ (0, import_jsx_runtime230.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9708
9741
|
MenuContent,
|
|
9709
9742
|
{
|
|
9710
9743
|
...props,
|
|
@@ -9724,19 +9757,19 @@ var Menu = ({
|
|
|
9724
9757
|
Menu.displayName = "Menu";
|
|
9725
9758
|
|
|
9726
9759
|
// src/components/Menu/MenuLabel.tsx
|
|
9727
|
-
var
|
|
9760
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9728
9761
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
9729
|
-
var
|
|
9730
|
-
var StyledMenuLabel = (0,
|
|
9762
|
+
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
9763
|
+
var StyledMenuLabel = (0, import_styled_components54.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
9731
9764
|
padding: var(--wui-space-02);
|
|
9732
9765
|
`;
|
|
9733
9766
|
var MenuLabel = ({ children, ...props }) => {
|
|
9734
|
-
return /* @__PURE__ */ (0,
|
|
9767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9735
9768
|
StyledMenuLabel,
|
|
9736
9769
|
{
|
|
9737
9770
|
asChild: true,
|
|
9738
9771
|
...props,
|
|
9739
|
-
children: /* @__PURE__ */ (0,
|
|
9772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime231.jsx)(
|
|
9740
9773
|
Heading,
|
|
9741
9774
|
{
|
|
9742
9775
|
renderAs: "span",
|
|
@@ -9751,17 +9784,17 @@ var MenuLabel = ({ children, ...props }) => {
|
|
|
9751
9784
|
MenuLabel.displayName = "MenuLabel";
|
|
9752
9785
|
|
|
9753
9786
|
// src/components/Menu/SubMenu.tsx
|
|
9754
|
-
var
|
|
9755
|
-
var
|
|
9787
|
+
var import_react39 = require("react");
|
|
9788
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9756
9789
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9757
9790
|
var import_type_guards33 = require("@wistia/type-guards");
|
|
9758
9791
|
|
|
9759
9792
|
// src/components/Menu/MenuItemButton.tsx
|
|
9760
|
-
var
|
|
9761
|
-
var
|
|
9793
|
+
var import_react38 = require("react");
|
|
9794
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9762
9795
|
var import_type_guards32 = require("@wistia/type-guards");
|
|
9763
|
-
var
|
|
9764
|
-
var StyledButton3 = (0,
|
|
9796
|
+
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9797
|
+
var StyledButton3 = (0, import_styled_components55.default)(Button)`
|
|
9765
9798
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
9766
9799
|
|
|
9767
9800
|
display: flex;
|
|
@@ -9800,7 +9833,7 @@ var StyledButton3 = (0, import_styled_components54.default)(Button)`
|
|
|
9800
9833
|
padding-left: var(--wui-space-04);
|
|
9801
9834
|
}
|
|
9802
9835
|
`;
|
|
9803
|
-
var StyledLeftIconContainer =
|
|
9836
|
+
var StyledLeftIconContainer = import_styled_components55.default.div`
|
|
9804
9837
|
height: var(--menu-item-left-icon-size);
|
|
9805
9838
|
width: var(--menu-item-left-icon-size);
|
|
9806
9839
|
|
|
@@ -9811,7 +9844,7 @@ var StyledLeftIconContainer = import_styled_components54.default.div`
|
|
|
9811
9844
|
}
|
|
9812
9845
|
}
|
|
9813
9846
|
`;
|
|
9814
|
-
var StyledRightIconContainer =
|
|
9847
|
+
var StyledRightIconContainer = import_styled_components55.default.div`
|
|
9815
9848
|
height: var(--menu-item-right-icon-size);
|
|
9816
9849
|
width: var(--menu-item-right-icon-size);
|
|
9817
9850
|
|
|
@@ -9822,19 +9855,19 @@ var StyledRightIconContainer = import_styled_components54.default.div`
|
|
|
9822
9855
|
}
|
|
9823
9856
|
}
|
|
9824
9857
|
`;
|
|
9825
|
-
var StyledLabelAndDescriptionContainer =
|
|
9858
|
+
var StyledLabelAndDescriptionContainer = import_styled_components55.default.div`
|
|
9826
9859
|
display: flex;
|
|
9827
9860
|
flex-direction: column;
|
|
9828
9861
|
gap: var(--menu-label-description-gap);
|
|
9829
9862
|
flex-basis: 100%;
|
|
9830
9863
|
`;
|
|
9831
|
-
var StyledBadgeContainer =
|
|
9864
|
+
var StyledBadgeContainer = import_styled_components55.default.div`
|
|
9832
9865
|
align-self: start;
|
|
9833
9866
|
justify-self: end;
|
|
9834
9867
|
font-size: var(--wui-typography-label-4-size);
|
|
9835
9868
|
color: var(--wui-color-text-secondary);
|
|
9836
9869
|
`;
|
|
9837
|
-
var MenuItemButton = (0,
|
|
9870
|
+
var MenuItemButton = (0, import_react38.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9838
9871
|
let { colorScheme, badge } = props;
|
|
9839
9872
|
if (appearance === "dangerous") {
|
|
9840
9873
|
if ((0, import_type_guards32.isNotUndefined)(colorScheme)) {
|
|
@@ -9843,7 +9876,7 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9843
9876
|
colorScheme = "error";
|
|
9844
9877
|
}
|
|
9845
9878
|
if (appearance === "gated") {
|
|
9846
|
-
badge = /* @__PURE__ */ (0,
|
|
9879
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9847
9880
|
Icon,
|
|
9848
9881
|
{
|
|
9849
9882
|
colorScheme: "purple",
|
|
@@ -9855,7 +9888,7 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9855
9888
|
}
|
|
9856
9889
|
);
|
|
9857
9890
|
}
|
|
9858
|
-
return /* @__PURE__ */ (0,
|
|
9891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
|
|
9859
9892
|
StyledButton3,
|
|
9860
9893
|
{
|
|
9861
9894
|
...props,
|
|
@@ -9865,10 +9898,10 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9865
9898
|
fullWidth: true,
|
|
9866
9899
|
unstyled: true,
|
|
9867
9900
|
children: [
|
|
9868
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
9869
|
-
/* @__PURE__ */ (0,
|
|
9870
|
-
(0, import_type_guards32.isNotNil)(badge) || (0, import_type_guards32.isNotNil)(command) ? /* @__PURE__ */ (0,
|
|
9871
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
9901
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9902
|
+
/* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9903
|
+
(0, import_type_guards32.isNotNil)(badge) || (0, import_type_guards32.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9904
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9872
9905
|
]
|
|
9873
9906
|
}
|
|
9874
9907
|
);
|
|
@@ -9876,33 +9909,33 @@ var MenuItemButton = (0, import_react37.forwardRef)(({ children, appearance, com
|
|
|
9876
9909
|
MenuItemButton.displayName = "MenuItemButton";
|
|
9877
9910
|
|
|
9878
9911
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
9879
|
-
var
|
|
9880
|
-
var
|
|
9881
|
-
var StyledMenuItemLabel =
|
|
9882
|
-
var StyledMenuItemDescription = (0,
|
|
9912
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9913
|
+
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
9914
|
+
var StyledMenuItemLabel = import_styled_components56.default.span``;
|
|
9915
|
+
var StyledMenuItemDescription = (0, import_styled_components56.default)(Text).attrs({
|
|
9883
9916
|
variant: "body4",
|
|
9884
9917
|
prominence: "secondary"
|
|
9885
9918
|
})``;
|
|
9886
9919
|
var MenuItemLabel = ({ children }) => {
|
|
9887
|
-
return /* @__PURE__ */ (0,
|
|
9920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledMenuItemLabel, { children });
|
|
9888
9921
|
};
|
|
9889
9922
|
var MenuItemDescription = ({ children }) => {
|
|
9890
|
-
return /* @__PURE__ */ (0,
|
|
9923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(StyledMenuItemDescription, { children });
|
|
9891
9924
|
};
|
|
9892
9925
|
|
|
9893
9926
|
// src/components/Menu/SubMenu.tsx
|
|
9894
|
-
var
|
|
9895
|
-
var SubMenuContent = (0,
|
|
9927
|
+
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
9928
|
+
var SubMenuContent = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
9896
9929
|
${menuContentCss}
|
|
9897
9930
|
|
|
9898
9931
|
${mq.smAndDown} {
|
|
9899
9932
|
transform: translateX(-100%) !important;
|
|
9900
9933
|
}
|
|
9901
9934
|
`;
|
|
9902
|
-
var StyledMobileSubMenuItems =
|
|
9935
|
+
var StyledMobileSubMenuItems = import_styled_components57.default.div`
|
|
9903
9936
|
margin-left: var(--wui-space-04);
|
|
9904
9937
|
`;
|
|
9905
|
-
var StyledSubTrigger = (0,
|
|
9938
|
+
var StyledSubTrigger = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
9906
9939
|
outline: none;
|
|
9907
9940
|
|
|
9908
9941
|
&[data-state='open'],
|
|
@@ -9913,12 +9946,12 @@ var StyledSubTrigger = (0, import_styled_components56.default)(import_react_drop
|
|
|
9913
9946
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
9914
9947
|
const { isSmAndUp } = useMq();
|
|
9915
9948
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
9916
|
-
return /* @__PURE__ */ (0,
|
|
9949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
|
|
9917
9950
|
MenuItemButton,
|
|
9918
9951
|
{
|
|
9919
9952
|
...props,
|
|
9920
9953
|
leftIcon: icon,
|
|
9921
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9954
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Icon, { type: "caret-right" })
|
|
9922
9955
|
}
|
|
9923
9956
|
) });
|
|
9924
9957
|
};
|
|
@@ -9930,16 +9963,16 @@ var SubMenu = ({
|
|
|
9930
9963
|
...props
|
|
9931
9964
|
}) => {
|
|
9932
9965
|
const { isSmAndUp } = useMq();
|
|
9933
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
9966
|
+
const [isExpanded, setIsExpanded] = (0, import_react39.useState)(false);
|
|
9934
9967
|
const { compact } = useMenuContext();
|
|
9935
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
9936
|
-
/* @__PURE__ */ (0,
|
|
9937
|
-
/* @__PURE__ */ (0,
|
|
9938
|
-
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
9968
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
9969
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
9970
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
9971
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description }) : null
|
|
9939
9972
|
] }),
|
|
9940
|
-
/* @__PURE__ */ (0,
|
|
9941
|
-
] }) : /* @__PURE__ */ (0,
|
|
9942
|
-
/* @__PURE__ */ (0,
|
|
9973
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
9974
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
9975
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsxs)(
|
|
9943
9976
|
SubMenuTrigger,
|
|
9944
9977
|
{
|
|
9945
9978
|
...props,
|
|
@@ -9948,28 +9981,28 @@ var SubMenu = ({
|
|
|
9948
9981
|
setIsExpanded((prev) => !prev);
|
|
9949
9982
|
},
|
|
9950
9983
|
children: [
|
|
9951
|
-
/* @__PURE__ */ (0,
|
|
9952
|
-
/* @__PURE__ */ (0,
|
|
9984
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemLabel, { children: label }),
|
|
9985
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(MenuItemDescription, { children: description })
|
|
9953
9986
|
]
|
|
9954
9987
|
}
|
|
9955
9988
|
),
|
|
9956
|
-
/* @__PURE__ */ (0,
|
|
9989
|
+
/* @__PURE__ */ (0, import_jsx_runtime234.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
9957
9990
|
] });
|
|
9958
9991
|
};
|
|
9959
9992
|
SubMenu.displayName = "SubMenu";
|
|
9960
9993
|
|
|
9961
9994
|
// src/components/Menu/MenuItem.tsx
|
|
9962
|
-
var
|
|
9995
|
+
var import_react40 = require("react");
|
|
9963
9996
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
9964
|
-
var
|
|
9965
|
-
var MenuItem = (0,
|
|
9997
|
+
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
9998
|
+
var MenuItem = (0, import_react40.forwardRef)(
|
|
9966
9999
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9967
|
-
return /* @__PURE__ */ (0,
|
|
10000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
9968
10001
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
9969
10002
|
{
|
|
9970
10003
|
asChild: true,
|
|
9971
10004
|
onSelect,
|
|
9972
|
-
children: /* @__PURE__ */ (0,
|
|
10005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(
|
|
9973
10006
|
MenuItemButton,
|
|
9974
10007
|
{
|
|
9975
10008
|
...props,
|
|
@@ -9985,10 +10018,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
9985
10018
|
|
|
9986
10019
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
9987
10020
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
9988
|
-
var
|
|
10021
|
+
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
9989
10022
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
9990
|
-
return /* @__PURE__ */ (0,
|
|
9991
|
-
/* @__PURE__ */ (0,
|
|
10023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime236.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
10024
|
+
/* @__PURE__ */ (0, import_jsx_runtime236.jsx)(MenuLabel, { children: label }),
|
|
9992
10025
|
children
|
|
9993
10026
|
] });
|
|
9994
10027
|
};
|
|
@@ -9996,11 +10029,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
9996
10029
|
|
|
9997
10030
|
// src/components/Menu/RadioMenuItem.tsx
|
|
9998
10031
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
9999
|
-
var
|
|
10032
|
+
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
10000
10033
|
var RadioMenuItem = ({
|
|
10001
10034
|
onSelect,
|
|
10002
10035
|
value,
|
|
10003
|
-
indicator = /* @__PURE__ */ (0,
|
|
10036
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10004
10037
|
Icon,
|
|
10005
10038
|
{
|
|
10006
10039
|
size: "sm",
|
|
@@ -10010,17 +10043,17 @@ var RadioMenuItem = ({
|
|
|
10010
10043
|
...props
|
|
10011
10044
|
}) => {
|
|
10012
10045
|
const extraProps = onSelect ? { onSelect } : {};
|
|
10013
|
-
return /* @__PURE__ */ (0,
|
|
10046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10014
10047
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
10015
10048
|
{
|
|
10016
10049
|
...extraProps,
|
|
10017
10050
|
asChild: true,
|
|
10018
10051
|
value,
|
|
10019
|
-
children: /* @__PURE__ */ (0,
|
|
10052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10020
10053
|
MenuItemButton,
|
|
10021
10054
|
{
|
|
10022
10055
|
...props,
|
|
10023
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
10056
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
10024
10057
|
}
|
|
10025
10058
|
)
|
|
10026
10059
|
}
|
|
@@ -10030,9 +10063,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
10030
10063
|
|
|
10031
10064
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
10032
10065
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
10033
|
-
var
|
|
10066
|
+
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10034
10067
|
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
10035
|
-
return checked ? /* @__PURE__ */ (0,
|
|
10068
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10036
10069
|
"svg",
|
|
10037
10070
|
{
|
|
10038
10071
|
...props,
|
|
@@ -10042,14 +10075,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10042
10075
|
width: "24",
|
|
10043
10076
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10044
10077
|
children: [
|
|
10045
|
-
/* @__PURE__ */ (0,
|
|
10078
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10046
10079
|
"path",
|
|
10047
10080
|
{
|
|
10048
10081
|
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",
|
|
10049
10082
|
fill: "#2949e5"
|
|
10050
10083
|
}
|
|
10051
10084
|
),
|
|
10052
|
-
/* @__PURE__ */ (0,
|
|
10085
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10053
10086
|
"path",
|
|
10054
10087
|
{
|
|
10055
10088
|
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",
|
|
@@ -10058,7 +10091,7 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10058
10091
|
)
|
|
10059
10092
|
]
|
|
10060
10093
|
}
|
|
10061
|
-
) : /* @__PURE__ */ (0,
|
|
10094
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10062
10095
|
"svg",
|
|
10063
10096
|
{
|
|
10064
10097
|
...props,
|
|
@@ -10068,14 +10101,14 @@ var CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
10068
10101
|
width: "24",
|
|
10069
10102
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10070
10103
|
children: [
|
|
10071
|
-
/* @__PURE__ */ (0,
|
|
10104
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10072
10105
|
"path",
|
|
10073
10106
|
{
|
|
10074
10107
|
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",
|
|
10075
10108
|
fill: "#fcfcfd"
|
|
10076
10109
|
}
|
|
10077
10110
|
),
|
|
10078
|
-
/* @__PURE__ */ (0,
|
|
10111
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10079
10112
|
"path",
|
|
10080
10113
|
{
|
|
10081
10114
|
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",
|
|
@@ -10092,18 +10125,18 @@ var CheckboxMenuItem = ({
|
|
|
10092
10125
|
onCheckedChange,
|
|
10093
10126
|
...props
|
|
10094
10127
|
}) => {
|
|
10095
|
-
return /* @__PURE__ */ (0,
|
|
10128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10096
10129
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
10097
10130
|
{
|
|
10098
10131
|
asChild: true,
|
|
10099
10132
|
checked,
|
|
10100
10133
|
onCheckedChange,
|
|
10101
10134
|
onSelect,
|
|
10102
|
-
children: /* @__PURE__ */ (0,
|
|
10135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10103
10136
|
MenuItemButton,
|
|
10104
10137
|
{
|
|
10105
10138
|
...props,
|
|
10106
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
10139
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(CheckboxIndicator, { checked })
|
|
10107
10140
|
}
|
|
10108
10141
|
)
|
|
10109
10142
|
}
|
|
@@ -10112,37 +10145,37 @@ var CheckboxMenuItem = ({
|
|
|
10112
10145
|
CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
10113
10146
|
|
|
10114
10147
|
// src/components/Modal/Modal.tsx
|
|
10115
|
-
var
|
|
10116
|
-
var
|
|
10148
|
+
var import_react44 = require("react");
|
|
10149
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
10117
10150
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
10118
10151
|
var import_type_guards35 = require("@wistia/type-guards");
|
|
10119
10152
|
|
|
10120
10153
|
// src/components/Modal/ModalHeader.tsx
|
|
10121
|
-
var
|
|
10154
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
10122
10155
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
10123
10156
|
|
|
10124
10157
|
// src/components/Modal/ModalCloseButton.tsx
|
|
10125
|
-
var
|
|
10158
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
10126
10159
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
10127
|
-
var
|
|
10128
|
-
var CloseButton = (0,
|
|
10160
|
+
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
10161
|
+
var CloseButton = (0, import_styled_components58.default)(import_react_dialog.Close)`
|
|
10129
10162
|
align-self: start;
|
|
10130
10163
|
`;
|
|
10131
10164
|
var ModalCloseButton = () => {
|
|
10132
|
-
return /* @__PURE__ */ (0,
|
|
10165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10133
10166
|
IconButton,
|
|
10134
10167
|
{
|
|
10135
10168
|
label: "Dismiss modal",
|
|
10136
10169
|
size: "sm",
|
|
10137
10170
|
variant: "ghost",
|
|
10138
|
-
children: /* @__PURE__ */ (0,
|
|
10171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Icon, { type: "close" })
|
|
10139
10172
|
}
|
|
10140
10173
|
) });
|
|
10141
10174
|
};
|
|
10142
10175
|
|
|
10143
10176
|
// src/components/Modal/ModalHeader.tsx
|
|
10144
|
-
var
|
|
10145
|
-
var Header =
|
|
10177
|
+
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
10178
|
+
var Header = import_styled_components59.default.header`
|
|
10146
10179
|
display: flex;
|
|
10147
10180
|
order: 1;
|
|
10148
10181
|
gap: var(--wui-space-01);
|
|
@@ -10153,7 +10186,7 @@ var Header = import_styled_components58.default.header`
|
|
|
10153
10186
|
margin: 0 0 var(--wui-space-03);
|
|
10154
10187
|
}
|
|
10155
10188
|
`;
|
|
10156
|
-
var Title = (0,
|
|
10189
|
+
var Title = (0, import_styled_components59.default)(import_react_dialog2.Title)`
|
|
10157
10190
|
font-family: var(--wui-typography-heading-2-family);
|
|
10158
10191
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
10159
10192
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -10164,27 +10197,27 @@ var ModalHeader = ({
|
|
|
10164
10197
|
hideTitle,
|
|
10165
10198
|
hideCloseButton
|
|
10166
10199
|
}) => {
|
|
10167
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */ (0,
|
|
10168
|
-
return /* @__PURE__ */ (0,
|
|
10200
|
+
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 });
|
|
10201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(Header, { $hideTitle: hideTitle, children: [
|
|
10169
10202
|
TitleComponent,
|
|
10170
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
10203
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ModalCloseButton, {})
|
|
10171
10204
|
] });
|
|
10172
10205
|
};
|
|
10173
10206
|
|
|
10174
10207
|
// src/components/Modal/ModalContent.tsx
|
|
10175
|
-
var
|
|
10176
|
-
var
|
|
10208
|
+
var import_react42 = require("react");
|
|
10209
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
10177
10210
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
10178
10211
|
|
|
10179
10212
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
10180
|
-
var
|
|
10213
|
+
var import_react41 = require("react");
|
|
10181
10214
|
var import_type_guards34 = require("@wistia/type-guards");
|
|
10182
10215
|
var useFocusRestore = () => {
|
|
10183
|
-
const previouslyFocusedRef = (0,
|
|
10184
|
-
(0,
|
|
10216
|
+
const previouslyFocusedRef = (0, import_react41.useRef)(null);
|
|
10217
|
+
(0, import_react41.useEffect)(() => {
|
|
10185
10218
|
previouslyFocusedRef.current = document.activeElement;
|
|
10186
10219
|
}, []);
|
|
10187
|
-
(0,
|
|
10220
|
+
(0, import_react41.useEffect)(() => {
|
|
10188
10221
|
return () => {
|
|
10189
10222
|
if ((0, import_type_guards34.isNotNil)(previouslyFocusedRef.current)) {
|
|
10190
10223
|
setTimeout(() => {
|
|
@@ -10196,8 +10229,8 @@ var useFocusRestore = () => {
|
|
|
10196
10229
|
};
|
|
10197
10230
|
|
|
10198
10231
|
// src/components/Modal/ModalContent.tsx
|
|
10199
|
-
var
|
|
10200
|
-
var StyledModalContent = (0,
|
|
10232
|
+
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
10233
|
+
var StyledModalContent = (0, import_styled_components60.default)(import_react_dialog3.Content)`
|
|
10201
10234
|
background-color: var(--wui-color-bg-app);
|
|
10202
10235
|
box-sizing: border-box;
|
|
10203
10236
|
display: flex;
|
|
@@ -10238,10 +10271,10 @@ var StyledModalContent = (0, import_styled_components59.default)(import_react_di
|
|
|
10238
10271
|
}
|
|
10239
10272
|
}
|
|
10240
10273
|
`;
|
|
10241
|
-
var ModalContent = (0,
|
|
10274
|
+
var ModalContent = (0, import_react42.forwardRef)(
|
|
10242
10275
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
10243
10276
|
useFocusRestore();
|
|
10244
|
-
return /* @__PURE__ */ (0,
|
|
10277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10245
10278
|
StyledModalContent,
|
|
10246
10279
|
{
|
|
10247
10280
|
ref,
|
|
@@ -10256,9 +10289,9 @@ var ModalContent = (0, import_react41.forwardRef)(
|
|
|
10256
10289
|
);
|
|
10257
10290
|
|
|
10258
10291
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10259
|
-
var
|
|
10260
|
-
var
|
|
10261
|
-
var
|
|
10292
|
+
var import_react43 = require("react");
|
|
10293
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10294
|
+
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10262
10295
|
var backdropAnimationDuration = 150;
|
|
10263
10296
|
var alignVerticalMap = {
|
|
10264
10297
|
stretch: "normal",
|
|
@@ -10271,7 +10304,7 @@ var alignHorizontalMap = {
|
|
|
10271
10304
|
center: "center",
|
|
10272
10305
|
right: "end"
|
|
10273
10306
|
};
|
|
10274
|
-
var BackdropComponent =
|
|
10307
|
+
var BackdropComponent = import_styled_components61.default.div`
|
|
10275
10308
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10276
10309
|
animation-name: backdropShow;
|
|
10277
10310
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10294,8 +10327,8 @@ var BackdropComponent = import_styled_components60.default.div`
|
|
|
10294
10327
|
}
|
|
10295
10328
|
}
|
|
10296
10329
|
`;
|
|
10297
|
-
var Backdrop = (0,
|
|
10298
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
10330
|
+
var Backdrop = (0, import_react43.forwardRef)(
|
|
10331
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(
|
|
10299
10332
|
BackdropComponent,
|
|
10300
10333
|
{
|
|
10301
10334
|
ref,
|
|
@@ -10309,14 +10342,14 @@ var Backdrop = (0, import_react42.forwardRef)(
|
|
|
10309
10342
|
Backdrop.displayName = "Backdrop";
|
|
10310
10343
|
|
|
10311
10344
|
// src/components/Modal/Modal.tsx
|
|
10312
|
-
var
|
|
10345
|
+
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10313
10346
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10314
|
-
var ModalBody =
|
|
10347
|
+
var ModalBody = import_styled_components62.default.div`
|
|
10315
10348
|
flex-direction: column;
|
|
10316
10349
|
display: flex;
|
|
10317
10350
|
order: 2;
|
|
10318
10351
|
`;
|
|
10319
|
-
var Modal = (0,
|
|
10352
|
+
var Modal = (0, import_react44.forwardRef)(
|
|
10320
10353
|
({
|
|
10321
10354
|
children,
|
|
10322
10355
|
fullHeight = false,
|
|
@@ -10329,7 +10362,7 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10329
10362
|
width = DEFAULT_MODAL_WIDTH,
|
|
10330
10363
|
...props
|
|
10331
10364
|
}, ref) => {
|
|
10332
|
-
return /* @__PURE__ */ (0,
|
|
10365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10333
10366
|
import_react_dialog4.Root,
|
|
10334
10367
|
{
|
|
10335
10368
|
onOpenChange: (open2) => {
|
|
@@ -10338,9 +10371,9 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10338
10371
|
}
|
|
10339
10372
|
},
|
|
10340
10373
|
open: isOpen,
|
|
10341
|
-
children: /* @__PURE__ */ (0,
|
|
10342
|
-
/* @__PURE__ */ (0,
|
|
10343
|
-
/* @__PURE__ */ (0,
|
|
10374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(import_react_dialog4.Portal, { children: [
|
|
10375
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(Backdrop, {}),
|
|
10376
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(
|
|
10344
10377
|
ModalContent,
|
|
10345
10378
|
{
|
|
10346
10379
|
ref,
|
|
@@ -10356,8 +10389,8 @@ var Modal = (0, import_react43.forwardRef)(
|
|
|
10356
10389
|
width,
|
|
10357
10390
|
...props,
|
|
10358
10391
|
children: [
|
|
10359
|
-
/* @__PURE__ */ (0,
|
|
10360
|
-
/* @__PURE__ */ (0,
|
|
10392
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ModalBody, { children }),
|
|
10393
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10361
10394
|
ModalHeader,
|
|
10362
10395
|
{
|
|
10363
10396
|
hideCloseButton,
|
|
@@ -10377,7 +10410,7 @@ Modal.displayName = "Modal";
|
|
|
10377
10410
|
|
|
10378
10411
|
// src/components/Popover/Popover.tsx
|
|
10379
10412
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10380
|
-
var
|
|
10413
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10381
10414
|
|
|
10382
10415
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10383
10416
|
var import_type_guards36 = require("@wistia/type-guards");
|
|
@@ -10386,9 +10419,9 @@ var getControlProps = (isOpen, onOpenChange) => {
|
|
|
10386
10419
|
};
|
|
10387
10420
|
|
|
10388
10421
|
// src/components/Popover/Popover.tsx
|
|
10389
|
-
var
|
|
10390
|
-
var StyledContent2 = (0,
|
|
10391
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10422
|
+
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
10423
|
+
var StyledContent2 = (0, import_styled_components63.default)(import_react_popover.Content)`
|
|
10424
|
+
${({ $unstyled }) => !$unstyled && import_styled_components63.css`
|
|
10392
10425
|
border-radius: var(--wui-border-radius-02);
|
|
10393
10426
|
padding: var(--wui-space-04);
|
|
10394
10427
|
max-width: 320px;
|
|
@@ -10412,25 +10445,25 @@ var Popover = ({
|
|
|
10412
10445
|
unstyled = false,
|
|
10413
10446
|
...props
|
|
10414
10447
|
}) => {
|
|
10415
|
-
return /* @__PURE__ */ (0,
|
|
10416
|
-
/* @__PURE__ */ (0,
|
|
10417
|
-
/* @__PURE__ */ (0,
|
|
10448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10449
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10450
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(
|
|
10418
10451
|
StyledContent2,
|
|
10419
10452
|
{
|
|
10420
10453
|
sideOffset: 8,
|
|
10421
10454
|
...props,
|
|
10422
10455
|
$unstyled: unstyled,
|
|
10423
10456
|
children: [
|
|
10424
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
10457
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10425
10458
|
IconButton,
|
|
10426
10459
|
{
|
|
10427
10460
|
"data-wui-popover-close": true,
|
|
10428
10461
|
label: "Close",
|
|
10429
10462
|
variant: "ghost",
|
|
10430
|
-
children: /* @__PURE__ */ (0,
|
|
10463
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(Icon, { type: "close" })
|
|
10431
10464
|
}
|
|
10432
10465
|
) }),
|
|
10433
|
-
/* @__PURE__ */ (0,
|
|
10466
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)("div", { children })
|
|
10434
10467
|
]
|
|
10435
10468
|
}
|
|
10436
10469
|
) })
|
|
@@ -10439,11 +10472,11 @@ var Popover = ({
|
|
|
10439
10472
|
Popover.displayName = "Popover";
|
|
10440
10473
|
|
|
10441
10474
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10442
|
-
var
|
|
10475
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10443
10476
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10444
10477
|
var import_type_guards37 = require("@wistia/type-guards");
|
|
10445
|
-
var
|
|
10446
|
-
var ProgressBarWrapper =
|
|
10478
|
+
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10479
|
+
var ProgressBarWrapper = import_styled_components64.default.div`
|
|
10447
10480
|
--progress-bar-height: 8px;
|
|
10448
10481
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
10449
10482
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10459,7 +10492,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
10459
10492
|
const progressPercentage = progress / max * 100;
|
|
10460
10493
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
10461
10494
|
};
|
|
10462
|
-
var ProgressBarLabel =
|
|
10495
|
+
var ProgressBarLabel = import_styled_components64.default.div`
|
|
10463
10496
|
display: flex;
|
|
10464
10497
|
line-height: var(--wui-typography-label-3-line-height);
|
|
10465
10498
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -10467,7 +10500,7 @@ var ProgressBarLabel = import_styled_components63.default.div`
|
|
|
10467
10500
|
color: var(--wui-color-text-secondary);
|
|
10468
10501
|
flex-shrink: 0;
|
|
10469
10502
|
`;
|
|
10470
|
-
var StyledProgressIndicator = (0,
|
|
10503
|
+
var StyledProgressIndicator = (0, import_styled_components64.default)(import_react_progress.Indicator)`
|
|
10471
10504
|
background-color: var(--progress-bar-indicator-color);
|
|
10472
10505
|
width: 100%;
|
|
10473
10506
|
height: 100%;
|
|
@@ -10476,7 +10509,7 @@ var StyledProgressIndicator = (0, import_styled_components63.default)(import_rea
|
|
|
10476
10509
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10477
10510
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10478
10511
|
`;
|
|
10479
|
-
var StyledProgressBar = (0,
|
|
10512
|
+
var StyledProgressBar = (0, import_styled_components64.default)(import_react_progress.Root)`
|
|
10480
10513
|
position: relative;
|
|
10481
10514
|
overflow: hidden;
|
|
10482
10515
|
background: var(--progress-bar-background-color);
|
|
@@ -10495,15 +10528,15 @@ var ProgressBar = ({
|
|
|
10495
10528
|
labelRight,
|
|
10496
10529
|
...props
|
|
10497
10530
|
}) => {
|
|
10498
|
-
return /* @__PURE__ */ (0,
|
|
10499
|
-
(0, import_type_guards37.isNotNil)(labelLeft) ? /* @__PURE__ */ (0,
|
|
10500
|
-
/* @__PURE__ */ (0,
|
|
10531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(ProgressBarWrapper, { children: [
|
|
10532
|
+
(0, import_type_guards37.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10533
|
+
/* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10501
10534
|
StyledProgressBar,
|
|
10502
10535
|
{
|
|
10503
10536
|
max,
|
|
10504
10537
|
value: progress,
|
|
10505
10538
|
...props,
|
|
10506
|
-
children: /* @__PURE__ */ (0,
|
|
10539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
10507
10540
|
StyledProgressIndicator,
|
|
10508
10541
|
{
|
|
10509
10542
|
$max: max,
|
|
@@ -10512,17 +10545,17 @@ var ProgressBar = ({
|
|
|
10512
10545
|
)
|
|
10513
10546
|
}
|
|
10514
10547
|
),
|
|
10515
|
-
(0, import_type_guards37.isNotNil)(labelRight) ? /* @__PURE__ */ (0,
|
|
10548
|
+
(0, import_type_guards37.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10516
10549
|
] });
|
|
10517
10550
|
};
|
|
10518
10551
|
ProgressBar.displayName = "ProgressBar";
|
|
10519
10552
|
|
|
10520
10553
|
// src/components/Radio/Radio.tsx
|
|
10521
|
-
var
|
|
10522
|
-
var
|
|
10554
|
+
var import_react45 = require("react");
|
|
10555
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10523
10556
|
var import_type_guards38 = require("@wistia/type-guards");
|
|
10524
|
-
var
|
|
10525
|
-
var RadioIcon = () => /* @__PURE__ */ (0,
|
|
10557
|
+
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10558
|
+
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10526
10559
|
"svg",
|
|
10527
10560
|
{
|
|
10528
10561
|
fill: "inherit",
|
|
@@ -10530,7 +10563,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
|
10530
10563
|
viewBox: "0 0 1 1",
|
|
10531
10564
|
width: "1",
|
|
10532
10565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10533
|
-
children: /* @__PURE__ */ (0,
|
|
10566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10534
10567
|
"circle",
|
|
10535
10568
|
{
|
|
10536
10569
|
cx: "0.5",
|
|
@@ -10541,7 +10574,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
|
|
|
10541
10574
|
)
|
|
10542
10575
|
}
|
|
10543
10576
|
);
|
|
10544
|
-
var sizeSmall2 =
|
|
10577
|
+
var sizeSmall2 = import_styled_components65.css`
|
|
10545
10578
|
width: 14px;
|
|
10546
10579
|
height: 14px;
|
|
10547
10580
|
min-width: 14px;
|
|
@@ -10552,7 +10585,7 @@ var sizeSmall2 = import_styled_components64.css`
|
|
|
10552
10585
|
height: 7px;
|
|
10553
10586
|
}
|
|
10554
10587
|
`;
|
|
10555
|
-
var sizeMedium2 =
|
|
10588
|
+
var sizeMedium2 = import_styled_components65.css`
|
|
10556
10589
|
width: 16px;
|
|
10557
10590
|
height: 16px;
|
|
10558
10591
|
min-width: 16px;
|
|
@@ -10563,7 +10596,7 @@ var sizeMedium2 = import_styled_components64.css`
|
|
|
10563
10596
|
height: 8px;
|
|
10564
10597
|
}
|
|
10565
10598
|
`;
|
|
10566
|
-
var sizeLarge2 =
|
|
10599
|
+
var sizeLarge2 = import_styled_components65.css`
|
|
10567
10600
|
width: 20px;
|
|
10568
10601
|
height: 20px;
|
|
10569
10602
|
min-width: 20px;
|
|
@@ -10579,14 +10612,14 @@ var getSizeCss2 = (size) => {
|
|
|
10579
10612
|
if (size === "lg") return sizeLarge2;
|
|
10580
10613
|
return sizeMedium2;
|
|
10581
10614
|
};
|
|
10582
|
-
var StyledRadioWrapper =
|
|
10615
|
+
var StyledRadioWrapper = import_styled_components65.default.div`
|
|
10583
10616
|
display: flex;
|
|
10584
10617
|
margin: 0;
|
|
10585
10618
|
|
|
10586
10619
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
10587
10620
|
user-select: none;
|
|
10588
10621
|
`;
|
|
10589
|
-
var StyledRadioInput =
|
|
10622
|
+
var StyledRadioInput = import_styled_components65.default.div`
|
|
10590
10623
|
${({ $size }) => getSizeCss2($size)}
|
|
10591
10624
|
line-height: 0;
|
|
10592
10625
|
margin: 0;
|
|
@@ -10608,7 +10641,7 @@ var StyledRadioInput = import_styled_components64.default.div`
|
|
|
10608
10641
|
}
|
|
10609
10642
|
}
|
|
10610
10643
|
`;
|
|
10611
|
-
var StyledHiddenRadioInput =
|
|
10644
|
+
var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
10612
10645
|
${visuallyHiddenStyle}
|
|
10613
10646
|
|
|
10614
10647
|
/* toggles display of faux-input border-color */
|
|
@@ -10621,7 +10654,7 @@ var StyledHiddenRadioInput = import_styled_components64.default.input`
|
|
|
10621
10654
|
display: block;
|
|
10622
10655
|
}
|
|
10623
10656
|
`;
|
|
10624
|
-
var Radio = (0,
|
|
10657
|
+
var Radio = (0, import_react45.forwardRef)(
|
|
10625
10658
|
({
|
|
10626
10659
|
checked,
|
|
10627
10660
|
disabled = false,
|
|
@@ -10636,15 +10669,15 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10636
10669
|
hideLabel = false,
|
|
10637
10670
|
...props
|
|
10638
10671
|
}, ref) => {
|
|
10639
|
-
const generatedId = (0,
|
|
10672
|
+
const generatedId = (0, import_react45.useId)();
|
|
10640
10673
|
const computedId = (0, import_type_guards38.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10641
|
-
return /* @__PURE__ */ (0,
|
|
10674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10642
10675
|
StyledRadioWrapper,
|
|
10643
10676
|
{
|
|
10644
10677
|
$disabled: disabled,
|
|
10645
10678
|
"aria-invalid": props["aria-invalid"],
|
|
10646
10679
|
children: [
|
|
10647
|
-
/* @__PURE__ */ (0,
|
|
10680
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10648
10681
|
StyledHiddenRadioInput,
|
|
10649
10682
|
{
|
|
10650
10683
|
...props,
|
|
@@ -10659,16 +10692,16 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10659
10692
|
value
|
|
10660
10693
|
}
|
|
10661
10694
|
),
|
|
10662
|
-
/* @__PURE__ */ (0,
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10663
10696
|
FormControlLabel,
|
|
10664
10697
|
{
|
|
10665
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
10698
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10666
10699
|
StyledRadioInput,
|
|
10667
10700
|
{
|
|
10668
10701
|
$disabled: disabled,
|
|
10669
10702
|
$size: size,
|
|
10670
10703
|
"data-wui-faux-input": "true",
|
|
10671
|
-
children: /* @__PURE__ */ (0,
|
|
10704
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(RadioIcon, {})
|
|
10672
10705
|
}
|
|
10673
10706
|
),
|
|
10674
10707
|
description,
|
|
@@ -10686,32 +10719,32 @@ var Radio = (0, import_react44.forwardRef)(
|
|
|
10686
10719
|
Radio.displayName = "Radio";
|
|
10687
10720
|
|
|
10688
10721
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10689
|
-
var
|
|
10690
|
-
var
|
|
10722
|
+
var import_react49 = require("react");
|
|
10723
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10691
10724
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10692
10725
|
var import_type_guards39 = require("@wistia/type-guards");
|
|
10693
10726
|
|
|
10694
10727
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10695
|
-
var
|
|
10696
|
-
var
|
|
10697
|
-
var SelectedItemMeasurementsContext = (0,
|
|
10728
|
+
var import_react46 = require("react");
|
|
10729
|
+
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10730
|
+
var SelectedItemMeasurementsContext = (0, import_react46.createContext)(
|
|
10698
10731
|
null
|
|
10699
10732
|
);
|
|
10700
10733
|
var SelectedItemMeasurementsProvider = ({
|
|
10701
10734
|
children
|
|
10702
10735
|
}) => {
|
|
10703
|
-
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0,
|
|
10704
|
-
const contextValue = (0,
|
|
10736
|
+
const [selectedItemMeasurements, setSelectedItemMeasurements] = (0, import_react46.useState)(null);
|
|
10737
|
+
const contextValue = (0, import_react46.useMemo)(
|
|
10705
10738
|
() => ({
|
|
10706
10739
|
setSelectedItemMeasurements,
|
|
10707
10740
|
selectedItemMeasurements
|
|
10708
10741
|
}),
|
|
10709
10742
|
[selectedItemMeasurements]
|
|
10710
10743
|
);
|
|
10711
|
-
return /* @__PURE__ */ (0,
|
|
10744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10712
10745
|
};
|
|
10713
10746
|
var useSelectedItemMeasurements = () => {
|
|
10714
|
-
const context = (0,
|
|
10747
|
+
const context = (0, import_react46.useContext)(SelectedItemMeasurementsContext);
|
|
10715
10748
|
if (context === null) {
|
|
10716
10749
|
throw new Error(
|
|
10717
10750
|
"useSelectedItemMeasurements must be used within a SelectedItemMeasurementsProvider"
|
|
@@ -10721,15 +10754,15 @@ var useSelectedItemMeasurements = () => {
|
|
|
10721
10754
|
};
|
|
10722
10755
|
|
|
10723
10756
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10724
|
-
var
|
|
10725
|
-
var
|
|
10757
|
+
var import_react48 = require("react");
|
|
10758
|
+
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10726
10759
|
|
|
10727
10760
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10728
|
-
var
|
|
10729
|
-
var SegmentedControlValueContext = (0,
|
|
10761
|
+
var import_react47 = require("react");
|
|
10762
|
+
var SegmentedControlValueContext = (0, import_react47.createContext)(null);
|
|
10730
10763
|
var SegmentedControlValueProvider = SegmentedControlValueContext.Provider;
|
|
10731
10764
|
var useSegmentedControlValue = () => {
|
|
10732
|
-
const context = (0,
|
|
10765
|
+
const context = (0, import_react47.useContext)(SegmentedControlValueContext);
|
|
10733
10766
|
if (context === null) {
|
|
10734
10767
|
throw new Error("useSegmentedControlValue must be used within a SegmentedControlValueProvider");
|
|
10735
10768
|
}
|
|
@@ -10737,8 +10770,8 @@ var useSegmentedControlValue = () => {
|
|
|
10737
10770
|
};
|
|
10738
10771
|
|
|
10739
10772
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10740
|
-
var
|
|
10741
|
-
var SelectedItemIndicatorDiv =
|
|
10773
|
+
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
10774
|
+
var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
10742
10775
|
background-color: var(--wui-color-bg-fill-white);
|
|
10743
10776
|
border-radius: var(--wui-border-radius-rounded);
|
|
10744
10777
|
left: 0;
|
|
@@ -10753,7 +10786,7 @@ var SelectedItemIndicatorDiv = import_styled_components65.default.div`
|
|
|
10753
10786
|
var SelectedItemIndicator = () => {
|
|
10754
10787
|
const selectedValue = useSegmentedControlValue();
|
|
10755
10788
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10756
|
-
const selectedItemIndicatorStyle = (0,
|
|
10789
|
+
const selectedItemIndicatorStyle = (0, import_react48.useMemo)(
|
|
10757
10790
|
() => selectedItemMeasurements != null ? {
|
|
10758
10791
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
10759
10792
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -10764,7 +10797,7 @@ var SelectedItemIndicator = () => {
|
|
|
10764
10797
|
if (!selectedValue) {
|
|
10765
10798
|
return null;
|
|
10766
10799
|
}
|
|
10767
|
-
return /* @__PURE__ */ (0,
|
|
10800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
10768
10801
|
SelectedItemIndicatorDiv,
|
|
10769
10802
|
{
|
|
10770
10803
|
style: {
|
|
@@ -10777,8 +10810,8 @@ var SelectedItemIndicator = () => {
|
|
|
10777
10810
|
};
|
|
10778
10811
|
|
|
10779
10812
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10780
|
-
var
|
|
10781
|
-
var segmentedControlStyles =
|
|
10813
|
+
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
10814
|
+
var segmentedControlStyles = import_styled_components67.css`
|
|
10782
10815
|
display: inline-flex;
|
|
10783
10816
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10784
10817
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10788,10 +10821,10 @@ var segmentedControlStyles = import_styled_components66.css`
|
|
|
10788
10821
|
position: relative;
|
|
10789
10822
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10790
10823
|
`;
|
|
10791
|
-
var StyledSegmentedControl = (0,
|
|
10824
|
+
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10792
10825
|
${segmentedControlStyles}
|
|
10793
10826
|
`;
|
|
10794
|
-
var SegmentedControl = (0,
|
|
10827
|
+
var SegmentedControl = (0, import_react49.forwardRef)(
|
|
10795
10828
|
({
|
|
10796
10829
|
children,
|
|
10797
10830
|
disabled = false,
|
|
@@ -10803,7 +10836,7 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10803
10836
|
if ((0, import_type_guards39.isNil)(children)) {
|
|
10804
10837
|
return null;
|
|
10805
10838
|
}
|
|
10806
|
-
return /* @__PURE__ */ (0,
|
|
10839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
10807
10840
|
StyledSegmentedControl,
|
|
10808
10841
|
{
|
|
10809
10842
|
ref,
|
|
@@ -10815,8 +10848,8 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10815
10848
|
type: "single",
|
|
10816
10849
|
value: selectedValue,
|
|
10817
10850
|
...props,
|
|
10818
|
-
children: /* @__PURE__ */ (0,
|
|
10819
|
-
/* @__PURE__ */ (0,
|
|
10851
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
10852
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SelectedItemIndicator, {}),
|
|
10820
10853
|
children
|
|
10821
10854
|
] }) })
|
|
10822
10855
|
}
|
|
@@ -10826,8 +10859,8 @@ var SegmentedControl = (0, import_react48.forwardRef)(
|
|
|
10826
10859
|
SegmentedControl.displayName = "SegmentedControl";
|
|
10827
10860
|
|
|
10828
10861
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10829
|
-
var
|
|
10830
|
-
var
|
|
10862
|
+
var import_react50 = require("react");
|
|
10863
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10831
10864
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10832
10865
|
var import_type_guards41 = require("@wistia/type-guards");
|
|
10833
10866
|
|
|
@@ -10846,8 +10879,8 @@ var mergeRefs = (refs) => (value) => {
|
|
|
10846
10879
|
};
|
|
10847
10880
|
|
|
10848
10881
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10849
|
-
var
|
|
10850
|
-
var segmentedControlItemStyles =
|
|
10882
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
10883
|
+
var segmentedControlItemStyles = import_styled_components68.css`
|
|
10851
10884
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10852
10885
|
align-items: center;
|
|
10853
10886
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10906,14 +10939,14 @@ var segmentedControlItemStyles = import_styled_components67.css`
|
|
|
10906
10939
|
}
|
|
10907
10940
|
}
|
|
10908
10941
|
`;
|
|
10909
|
-
var StyledSegmentedControlItem = (0,
|
|
10942
|
+
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10910
10943
|
${segmentedControlItemStyles}
|
|
10911
10944
|
`;
|
|
10912
|
-
var SegmentedControlItem = (0,
|
|
10945
|
+
var SegmentedControlItem = (0, import_react50.forwardRef)(
|
|
10913
10946
|
({ disabled, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
10914
10947
|
const selectedValue = useSegmentedControlValue();
|
|
10915
10948
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
10916
|
-
const buttonRef = (0,
|
|
10949
|
+
const buttonRef = (0, import_react50.useRef)(null);
|
|
10917
10950
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
10918
10951
|
const handleClick = (event) => {
|
|
10919
10952
|
const target = event.target;
|
|
@@ -10922,7 +10955,7 @@ var SegmentedControlItem = (0, import_react49.forwardRef)(
|
|
|
10922
10955
|
event.preventDefault();
|
|
10923
10956
|
}
|
|
10924
10957
|
};
|
|
10925
|
-
(0,
|
|
10958
|
+
(0, import_react50.useEffect)(() => {
|
|
10926
10959
|
const buttonElem = buttonRef.current;
|
|
10927
10960
|
if (!buttonElem) {
|
|
10928
10961
|
return void 0;
|
|
@@ -10947,7 +10980,7 @@ var SegmentedControlItem = (0, import_react49.forwardRef)(
|
|
|
10947
10980
|
resizeObserver.disconnect();
|
|
10948
10981
|
};
|
|
10949
10982
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10950
|
-
return /* @__PURE__ */ (0,
|
|
10983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsxs)(
|
|
10951
10984
|
StyledSegmentedControlItem,
|
|
10952
10985
|
{
|
|
10953
10986
|
ref: combinedRef,
|
|
@@ -10968,10 +11001,10 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
10968
11001
|
|
|
10969
11002
|
// src/components/Select/Select.tsx
|
|
10970
11003
|
var import_react_select = require("@radix-ui/react-select");
|
|
10971
|
-
var
|
|
10972
|
-
var
|
|
10973
|
-
var
|
|
10974
|
-
var StyledTrigger = (0,
|
|
11004
|
+
var import_react51 = require("react");
|
|
11005
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
11006
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11007
|
+
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
10975
11008
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10976
11009
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10977
11010
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -11019,7 +11052,7 @@ var StyledTrigger = (0, import_styled_components68.default)(import_react_select.
|
|
|
11019
11052
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
11020
11053
|
}
|
|
11021
11054
|
`;
|
|
11022
|
-
var StyledContent3 = (0,
|
|
11055
|
+
var StyledContent3 = (0, import_styled_components69.default)(import_react_select.Content)`
|
|
11023
11056
|
--wui-select-content-border: var(--wui-color-border);
|
|
11024
11057
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
11025
11058
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -11037,7 +11070,7 @@ var StyledContent3 = (0, import_styled_components68.default)(import_react_select
|
|
|
11037
11070
|
max-height: var(--radix-select-content-available-height);
|
|
11038
11071
|
z-index: var(--wui-zindex-select);
|
|
11039
11072
|
`;
|
|
11040
|
-
var Select = (0,
|
|
11073
|
+
var Select = (0, import_react51.forwardRef)(
|
|
11041
11074
|
({
|
|
11042
11075
|
colorScheme = "inherit",
|
|
11043
11076
|
children,
|
|
@@ -11047,13 +11080,13 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11047
11080
|
...props
|
|
11048
11081
|
}, forwardedRef) => {
|
|
11049
11082
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
11050
|
-
return /* @__PURE__ */ (0,
|
|
11083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11051
11084
|
import_react_select.Root,
|
|
11052
11085
|
{
|
|
11053
11086
|
...props,
|
|
11054
11087
|
onValueChange: onChange,
|
|
11055
11088
|
children: [
|
|
11056
|
-
/* @__PURE__ */ (0,
|
|
11089
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(
|
|
11057
11090
|
StyledTrigger,
|
|
11058
11091
|
{
|
|
11059
11092
|
ref: forwardedRef,
|
|
@@ -11061,8 +11094,8 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11061
11094
|
$fullWidth: responsiveFullWidth,
|
|
11062
11095
|
...props,
|
|
11063
11096
|
children: [
|
|
11064
|
-
/* @__PURE__ */ (0,
|
|
11065
|
-
/* @__PURE__ */ (0,
|
|
11097
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Value, { placeholder }),
|
|
11098
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(
|
|
11066
11099
|
Icon,
|
|
11067
11100
|
{
|
|
11068
11101
|
size: "md",
|
|
@@ -11072,10 +11105,10 @@ var Select = (0, import_react50.forwardRef)(
|
|
|
11072
11105
|
]
|
|
11073
11106
|
}
|
|
11074
11107
|
),
|
|
11075
|
-
/* @__PURE__ */ (0,
|
|
11076
|
-
/* @__PURE__ */ (0,
|
|
11077
|
-
/* @__PURE__ */ (0,
|
|
11078
|
-
/* @__PURE__ */ (0,
|
|
11108
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsxs)(StyledContent3, { position: "popper", children: [
|
|
11109
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-up" }) }),
|
|
11110
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.Viewport, { children }),
|
|
11111
|
+
/* @__PURE__ */ (0, import_jsx_runtime251.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(Icon, { type: "caret-down" }) })
|
|
11079
11112
|
] }) })
|
|
11080
11113
|
]
|
|
11081
11114
|
}
|
|
@@ -11086,10 +11119,10 @@ Select.displayName = "Select";
|
|
|
11086
11119
|
|
|
11087
11120
|
// src/components/Select/SelectOption.tsx
|
|
11088
11121
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
11089
|
-
var
|
|
11090
|
-
var
|
|
11091
|
-
var
|
|
11092
|
-
var StyledItem = (0,
|
|
11122
|
+
var import_react52 = require("react");
|
|
11123
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
11124
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11125
|
+
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
11093
11126
|
${variantStyleMap2.body3};
|
|
11094
11127
|
display: flex;
|
|
11095
11128
|
padding: var(--wui-select-option-padding);
|
|
@@ -11112,25 +11145,25 @@ var StyledItem = (0, import_styled_components69.default)(import_react_select2.It
|
|
|
11112
11145
|
background-color: transparent;
|
|
11113
11146
|
}
|
|
11114
11147
|
`;
|
|
11115
|
-
var StyledIconContainer =
|
|
11148
|
+
var StyledIconContainer = import_styled_components70.default.span`
|
|
11116
11149
|
width: 12px;
|
|
11117
11150
|
`;
|
|
11118
|
-
var SelectOption = (0,
|
|
11151
|
+
var SelectOption = (0, import_react52.forwardRef)(
|
|
11119
11152
|
({ children, ...props }, forwardedRef) => {
|
|
11120
|
-
return /* @__PURE__ */ (0,
|
|
11153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsxs)(
|
|
11121
11154
|
StyledItem,
|
|
11122
11155
|
{
|
|
11123
11156
|
...props,
|
|
11124
11157
|
ref: forwardedRef,
|
|
11125
11158
|
children: [
|
|
11126
|
-
/* @__PURE__ */ (0,
|
|
11159
|
+
/* @__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)(
|
|
11127
11160
|
Icon,
|
|
11128
11161
|
{
|
|
11129
11162
|
size: "sm",
|
|
11130
11163
|
type: "checkmark"
|
|
11131
11164
|
}
|
|
11132
11165
|
) }) }),
|
|
11133
|
-
/* @__PURE__ */ (0,
|
|
11166
|
+
/* @__PURE__ */ (0, import_jsx_runtime252.jsx)(import_react_select2.ItemText, { children })
|
|
11134
11167
|
]
|
|
11135
11168
|
}
|
|
11136
11169
|
);
|
|
@@ -11140,14 +11173,14 @@ SelectOption.displayName = "Option";
|
|
|
11140
11173
|
|
|
11141
11174
|
// src/components/Select/SelectOptionGroup.tsx
|
|
11142
11175
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
11143
|
-
var
|
|
11144
|
-
var
|
|
11145
|
-
var StyledLabel4 = (0,
|
|
11176
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
11177
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11178
|
+
var StyledLabel4 = (0, import_styled_components71.default)(import_react_select3.Label)`
|
|
11146
11179
|
padding: var(--wui-select-option-padding);
|
|
11147
11180
|
`;
|
|
11148
11181
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
11149
|
-
return /* @__PURE__ */ (0,
|
|
11150
|
-
/* @__PURE__ */ (0,
|
|
11182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
11183
|
+
/* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(
|
|
11151
11184
|
Text,
|
|
11152
11185
|
{
|
|
11153
11186
|
prominence: "secondary",
|
|
@@ -11160,11 +11193,11 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
11160
11193
|
};
|
|
11161
11194
|
|
|
11162
11195
|
// src/components/Switch/Switch.tsx
|
|
11163
|
-
var
|
|
11164
|
-
var
|
|
11196
|
+
var import_react53 = require("react");
|
|
11197
|
+
var import_styled_components72 = __toESM(require("styled-components"));
|
|
11165
11198
|
var import_type_guards42 = require("@wistia/type-guards");
|
|
11166
|
-
var
|
|
11167
|
-
var sizeSmall3 =
|
|
11199
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11200
|
+
var sizeSmall3 = import_styled_components72.css`
|
|
11168
11201
|
--wui-size-small-width: 24px;
|
|
11169
11202
|
--wui-size-small-height: 14px;
|
|
11170
11203
|
|
|
@@ -11179,7 +11212,7 @@ var sizeSmall3 = import_styled_components71.css`
|
|
|
11179
11212
|
height: calc(var(--wui-size-small-width) / 2);
|
|
11180
11213
|
}
|
|
11181
11214
|
`;
|
|
11182
|
-
var sizeMedium3 =
|
|
11215
|
+
var sizeMedium3 = import_styled_components72.css`
|
|
11183
11216
|
--wui-size-medium-width: 32px;
|
|
11184
11217
|
--wui-size-medium-height: 18px;
|
|
11185
11218
|
|
|
@@ -11194,7 +11227,7 @@ var sizeMedium3 = import_styled_components71.css`
|
|
|
11194
11227
|
height: calc(var(--wui-size-medium-width) / 2);
|
|
11195
11228
|
}
|
|
11196
11229
|
`;
|
|
11197
|
-
var sizeLarge3 =
|
|
11230
|
+
var sizeLarge3 = import_styled_components72.css`
|
|
11198
11231
|
--wui-size-large-width: 40px;
|
|
11199
11232
|
--wui-size-large-height: 22px;
|
|
11200
11233
|
|
|
@@ -11214,14 +11247,14 @@ var getSizeCss3 = (size) => {
|
|
|
11214
11247
|
if (size === "lg") return sizeLarge3;
|
|
11215
11248
|
return sizeMedium3;
|
|
11216
11249
|
};
|
|
11217
|
-
var StyledSwitchWrapper =
|
|
11250
|
+
var StyledSwitchWrapper = import_styled_components72.default.div`
|
|
11218
11251
|
display: flex;
|
|
11219
11252
|
margin: 0;
|
|
11220
11253
|
|
|
11221
11254
|
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
11222
11255
|
user-select: none;
|
|
11223
11256
|
`;
|
|
11224
|
-
var StyledSwitchInput =
|
|
11257
|
+
var StyledSwitchInput = import_styled_components72.default.div`
|
|
11225
11258
|
${({ $size }) => getSizeCss3($size)}
|
|
11226
11259
|
line-height: 0;
|
|
11227
11260
|
margin: 0;
|
|
@@ -11249,7 +11282,7 @@ var StyledSwitchInput = import_styled_components71.default.div`
|
|
|
11249
11282
|
transition: all 0.2s ease-in-out;
|
|
11250
11283
|
}
|
|
11251
11284
|
`;
|
|
11252
|
-
var StyledHiddenSwitchInput =
|
|
11285
|
+
var StyledHiddenSwitchInput = import_styled_components72.default.input`
|
|
11253
11286
|
${visuallyHiddenStyle}
|
|
11254
11287
|
|
|
11255
11288
|
/* toggles display of faux-input background-color and toggle position */
|
|
@@ -11265,7 +11298,7 @@ var StyledHiddenSwitchInput = import_styled_components71.default.input`
|
|
|
11265
11298
|
}
|
|
11266
11299
|
}
|
|
11267
11300
|
`;
|
|
11268
|
-
var Switch = (0,
|
|
11301
|
+
var Switch = (0, import_react53.forwardRef)(
|
|
11269
11302
|
({
|
|
11270
11303
|
checked,
|
|
11271
11304
|
disabled = false,
|
|
@@ -11280,10 +11313,10 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11280
11313
|
hideLabel = false,
|
|
11281
11314
|
...props
|
|
11282
11315
|
}, ref) => {
|
|
11283
|
-
const generatedId = (0,
|
|
11316
|
+
const generatedId = (0, import_react53.useId)();
|
|
11284
11317
|
const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
|
|
11285
|
-
return /* @__PURE__ */ (0,
|
|
11286
|
-
/* @__PURE__ */ (0,
|
|
11318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
|
|
11319
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11287
11320
|
StyledHiddenSwitchInput,
|
|
11288
11321
|
{
|
|
11289
11322
|
...props,
|
|
@@ -11298,10 +11331,10 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11298
11331
|
value
|
|
11299
11332
|
}
|
|
11300
11333
|
),
|
|
11301
|
-
/* @__PURE__ */ (0,
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11302
11335
|
FormControlLabel,
|
|
11303
11336
|
{
|
|
11304
|
-
controlSlot: /* @__PURE__ */ (0,
|
|
11337
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(
|
|
11305
11338
|
StyledSwitchInput,
|
|
11306
11339
|
{
|
|
11307
11340
|
$disabled: disabled,
|
|
@@ -11323,19 +11356,19 @@ var Switch = (0, import_react52.forwardRef)(
|
|
|
11323
11356
|
Switch.displayName = "Switch";
|
|
11324
11357
|
|
|
11325
11358
|
// src/components/Table/Table.tsx
|
|
11326
|
-
var
|
|
11327
|
-
var
|
|
11328
|
-
var StyledTable =
|
|
11359
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
11360
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
11361
|
+
var StyledTable = import_styled_components73.default.table`
|
|
11329
11362
|
width: 100%;
|
|
11330
11363
|
border-collapse: collapse;
|
|
11331
11364
|
|
|
11332
|
-
${({ $striped }) => $striped &&
|
|
11365
|
+
${({ $striped }) => $striped && import_styled_components73.css`
|
|
11333
11366
|
tbody tr:nth-child(even) {
|
|
11334
11367
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
11335
11368
|
}
|
|
11336
11369
|
`}
|
|
11337
11370
|
|
|
11338
|
-
${({ $divided }) => $divided &&
|
|
11371
|
+
${({ $divided }) => $divided && import_styled_components73.css`
|
|
11339
11372
|
tr {
|
|
11340
11373
|
border-bottom: 1px solid var(--wui-color-border);
|
|
11341
11374
|
}
|
|
@@ -11347,7 +11380,7 @@ var Table = ({
|
|
|
11347
11380
|
divided = false,
|
|
11348
11381
|
...props
|
|
11349
11382
|
}) => {
|
|
11350
|
-
return /* @__PURE__ */ (0,
|
|
11383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
11351
11384
|
StyledTable,
|
|
11352
11385
|
{
|
|
11353
11386
|
$divided: divided,
|
|
@@ -11359,88 +11392,88 @@ var Table = ({
|
|
|
11359
11392
|
};
|
|
11360
11393
|
|
|
11361
11394
|
// src/components/Table/TableBody.tsx
|
|
11362
|
-
var
|
|
11395
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11363
11396
|
|
|
11364
11397
|
// src/components/Table/TableSectionContext.ts
|
|
11365
|
-
var
|
|
11366
|
-
var TableSectionContext = (0,
|
|
11398
|
+
var import_react54 = require("react");
|
|
11399
|
+
var TableSectionContext = (0, import_react54.createContext)(null);
|
|
11367
11400
|
|
|
11368
11401
|
// src/components/Table/TableBody.tsx
|
|
11369
|
-
var
|
|
11370
|
-
var StyledTbody =
|
|
11402
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
11403
|
+
var StyledTbody = import_styled_components74.default.tbody``;
|
|
11371
11404
|
var TableBody = ({ children, ...props }) => {
|
|
11372
|
-
return /* @__PURE__ */ (0,
|
|
11405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(StyledTbody, { ...props, children }) });
|
|
11373
11406
|
};
|
|
11374
11407
|
|
|
11375
11408
|
// src/components/Table/TableCell.tsx
|
|
11376
|
-
var
|
|
11377
|
-
var
|
|
11378
|
-
var
|
|
11379
|
-
var sharedStyles =
|
|
11409
|
+
var import_react55 = require("react");
|
|
11410
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11411
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11412
|
+
var sharedStyles = import_styled_components75.css`
|
|
11380
11413
|
color: var(--wui-color-text);
|
|
11381
11414
|
padding: var(--wui-space-02);
|
|
11382
11415
|
text-align: left;
|
|
11383
11416
|
`;
|
|
11384
|
-
var StyledTh =
|
|
11417
|
+
var StyledTh = import_styled_components75.default.th`
|
|
11385
11418
|
${sharedStyles}
|
|
11386
11419
|
font-size: var(--wui-typography-body-4-size);
|
|
11387
11420
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
11388
11421
|
line-height: var(--wui-typography-body-4-line-height);
|
|
11389
11422
|
`;
|
|
11390
|
-
var StyledTd =
|
|
11423
|
+
var StyledTd = import_styled_components75.default.td`
|
|
11391
11424
|
${sharedStyles}
|
|
11392
11425
|
font-size: var(--wui-typography-body-2-size);
|
|
11393
11426
|
font-weight: var(--wui-typography-body-2-weight);
|
|
11394
11427
|
line-height: var(--wui-typography-body-2-line-height);
|
|
11395
11428
|
`;
|
|
11396
11429
|
var TableCell = ({ children, ...props }) => {
|
|
11397
|
-
const section = (0,
|
|
11430
|
+
const section = (0, import_react55.useContext)(TableSectionContext);
|
|
11398
11431
|
if (section === "head") {
|
|
11399
|
-
return /* @__PURE__ */ (0,
|
|
11432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTh, { ...props, children });
|
|
11400
11433
|
}
|
|
11401
|
-
return /* @__PURE__ */ (0,
|
|
11434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(StyledTd, { ...props, children });
|
|
11402
11435
|
};
|
|
11403
11436
|
|
|
11404
11437
|
// src/components/Table/TableFooter.tsx
|
|
11405
|
-
var
|
|
11406
|
-
var
|
|
11407
|
-
var StyledTfoot =
|
|
11438
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
11439
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11440
|
+
var StyledTfoot = import_styled_components76.default.tfoot``;
|
|
11408
11441
|
var TableFooter = ({ children, ...props }) => {
|
|
11409
|
-
return /* @__PURE__ */ (0,
|
|
11442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(StyledTfoot, { ...props, children }) });
|
|
11410
11443
|
};
|
|
11411
11444
|
|
|
11412
11445
|
// src/components/Table/TableHead.tsx
|
|
11413
|
-
var
|
|
11414
|
-
var
|
|
11415
|
-
var StyledThead =
|
|
11446
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
11447
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11448
|
+
var StyledThead = import_styled_components77.default.thead``;
|
|
11416
11449
|
var TableHead = ({ children, ...props }) => {
|
|
11417
|
-
return /* @__PURE__ */ (0,
|
|
11450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StyledThead, { ...props, children }) });
|
|
11418
11451
|
};
|
|
11419
11452
|
|
|
11420
11453
|
// src/components/Table/TableRow.tsx
|
|
11421
|
-
var
|
|
11422
|
-
var
|
|
11423
|
-
var StyledTr =
|
|
11454
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
11455
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11456
|
+
var StyledTr = import_styled_components78.default.tr``;
|
|
11424
11457
|
var TableRow = ({ children, ...props }) => {
|
|
11425
|
-
return /* @__PURE__ */ (0,
|
|
11458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StyledTr, { ...props, children });
|
|
11426
11459
|
};
|
|
11427
11460
|
|
|
11428
11461
|
// src/components/Tabs/Tabs.tsx
|
|
11429
|
-
var
|
|
11462
|
+
var import_react60 = require("react");
|
|
11430
11463
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
11431
11464
|
var import_type_guards44 = require("@wistia/type-guards");
|
|
11432
|
-
var
|
|
11465
|
+
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11433
11466
|
|
|
11434
11467
|
// src/components/Tabs/TabPanel.tsx
|
|
11435
|
-
var
|
|
11468
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11436
11469
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
11437
|
-
var
|
|
11438
|
-
var StyledTabPanel = (0,
|
|
11470
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
11471
|
+
var StyledTabPanel = (0, import_styled_components79.default)(import_react_tabs.Content)`
|
|
11439
11472
|
display: flex;
|
|
11440
11473
|
flex-direction: column;
|
|
11441
11474
|
`;
|
|
11442
11475
|
var TabPanel = ({ children, value, ...props }) => {
|
|
11443
|
-
return /* @__PURE__ */ (0,
|
|
11476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
11444
11477
|
StyledTabPanel,
|
|
11445
11478
|
{
|
|
11446
11479
|
value,
|
|
@@ -11452,10 +11485,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11452
11485
|
TabPanel.displayName = "TabPanel";
|
|
11453
11486
|
|
|
11454
11487
|
// src/components/Tabs/TabList.tsx
|
|
11455
|
-
var
|
|
11488
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11456
11489
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
11457
|
-
var
|
|
11458
|
-
var StyledTabList = (0,
|
|
11490
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
11491
|
+
var StyledTabList = (0, import_styled_components80.default)(import_react_tabs2.List)`
|
|
11459
11492
|
${segmentedControlStyles}
|
|
11460
11493
|
|
|
11461
11494
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11468,7 +11501,7 @@ var TabList = ({
|
|
|
11468
11501
|
ariaLabel,
|
|
11469
11502
|
...props
|
|
11470
11503
|
}) => {
|
|
11471
|
-
return /* @__PURE__ */ (0,
|
|
11504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11472
11505
|
StyledTabList,
|
|
11473
11506
|
{
|
|
11474
11507
|
$fullWidth: fullWidth,
|
|
@@ -11481,17 +11514,17 @@ var TabList = ({
|
|
|
11481
11514
|
TabList.displayName = "TabList";
|
|
11482
11515
|
|
|
11483
11516
|
// src/components/Tabs/TabItem.tsx
|
|
11484
|
-
var
|
|
11485
|
-
var
|
|
11517
|
+
var import_react57 = require("react");
|
|
11518
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11486
11519
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11487
11520
|
var import_type_guards43 = require("@wistia/type-guards");
|
|
11488
11521
|
|
|
11489
11522
|
// src/components/Tabs/useTabsValue.tsx
|
|
11490
|
-
var
|
|
11491
|
-
var TabsValueContext = (0,
|
|
11523
|
+
var import_react56 = require("react");
|
|
11524
|
+
var TabsValueContext = (0, import_react56.createContext)(null);
|
|
11492
11525
|
var TabsValueProvider = TabsValueContext.Provider;
|
|
11493
11526
|
var useTabsValue = () => {
|
|
11494
|
-
const context = (0,
|
|
11527
|
+
const context = (0, import_react56.useContext)(TabsValueContext);
|
|
11495
11528
|
if (context === null) {
|
|
11496
11529
|
throw new Error("useTabsValue must be used within a TabsValueProvider");
|
|
11497
11530
|
}
|
|
@@ -11499,21 +11532,21 @@ var useTabsValue = () => {
|
|
|
11499
11532
|
};
|
|
11500
11533
|
|
|
11501
11534
|
// src/components/Tabs/TabItem.tsx
|
|
11502
|
-
var
|
|
11503
|
-
var StyledTabItem = (0,
|
|
11535
|
+
var import_jsx_runtime263 = require("react/jsx-runtime");
|
|
11536
|
+
var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.Trigger)`
|
|
11504
11537
|
${segmentedControlItemStyles}
|
|
11505
11538
|
|
|
11506
11539
|
&:focus-visible {
|
|
11507
11540
|
outline: none;
|
|
11508
11541
|
}
|
|
11509
11542
|
`;
|
|
11510
|
-
var TabItem = (0,
|
|
11543
|
+
var TabItem = (0, import_react57.forwardRef)(
|
|
11511
11544
|
({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
|
|
11512
11545
|
const selectedValue = useTabsValue();
|
|
11513
11546
|
const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11514
|
-
const buttonRef = (0,
|
|
11547
|
+
const buttonRef = (0, import_react57.useRef)(null);
|
|
11515
11548
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
11516
|
-
(0,
|
|
11549
|
+
(0, import_react57.useEffect)(() => {
|
|
11517
11550
|
const buttonElem = buttonRef.current;
|
|
11518
11551
|
if (!buttonElem) {
|
|
11519
11552
|
return void 0;
|
|
@@ -11538,7 +11571,7 @@ var TabItem = (0, import_react56.forwardRef)(
|
|
|
11538
11571
|
resizeObserver.disconnect();
|
|
11539
11572
|
};
|
|
11540
11573
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11541
|
-
return /* @__PURE__ */ (0,
|
|
11574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
|
|
11542
11575
|
StyledTabItem,
|
|
11543
11576
|
{
|
|
11544
11577
|
ref: combinedRef,
|
|
@@ -11557,16 +11590,16 @@ var TabItem = (0, import_react56.forwardRef)(
|
|
|
11557
11590
|
TabItem.displayName = "TabItem";
|
|
11558
11591
|
|
|
11559
11592
|
// src/components/Tabs/extractTabItems.ts
|
|
11560
|
-
var
|
|
11593
|
+
var import_react58 = require("react");
|
|
11561
11594
|
var extractTabItems = (children) => {
|
|
11562
11595
|
const tabItems = [];
|
|
11563
|
-
|
|
11564
|
-
if (!(0,
|
|
11596
|
+
import_react58.Children.forEach(children, (child) => {
|
|
11597
|
+
if (!(0, import_react58.isValidElement)(child)) {
|
|
11565
11598
|
return;
|
|
11566
11599
|
}
|
|
11567
11600
|
if (typeof child.type !== "string" && child.type.displayName === "Tab") {
|
|
11568
11601
|
tabItems.push(child);
|
|
11569
|
-
} else if (child.type ===
|
|
11602
|
+
} else if (child.type === import_react58.Fragment) {
|
|
11570
11603
|
const fragmentElement = child;
|
|
11571
11604
|
tabItems.push(...extractTabItems(fragmentElement.props.children));
|
|
11572
11605
|
} else if ((child.props.children ?? null) != null) {
|
|
@@ -11579,10 +11612,10 @@ var extractTabItems = (children) => {
|
|
|
11579
11612
|
};
|
|
11580
11613
|
|
|
11581
11614
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11582
|
-
var
|
|
11583
|
-
var
|
|
11584
|
-
var
|
|
11585
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
11615
|
+
var import_react59 = require("react");
|
|
11616
|
+
var import_styled_components82 = __toESM(require("styled-components"));
|
|
11617
|
+
var import_jsx_runtime264 = require("react/jsx-runtime");
|
|
11618
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
|
|
11586
11619
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
11587
11620
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11588
11621
|
}
|
|
@@ -11590,7 +11623,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(Selec
|
|
|
11590
11623
|
var SelectedItemIndicator2 = () => {
|
|
11591
11624
|
const { selectedItemMeasurements } = useSelectedItemMeasurements();
|
|
11592
11625
|
const selectedValue = useTabsValue();
|
|
11593
|
-
const selectedItemIndicatorStyle = (0,
|
|
11626
|
+
const selectedItemIndicatorStyle = (0, import_react59.useMemo)(
|
|
11594
11627
|
() => selectedItemMeasurements != null ? {
|
|
11595
11628
|
height: `${selectedItemMeasurements.offsetHeight}px`,
|
|
11596
11629
|
transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
|
|
@@ -11601,7 +11634,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
11601
11634
|
if (selectedValue == null) {
|
|
11602
11635
|
return null;
|
|
11603
11636
|
}
|
|
11604
|
-
return /* @__PURE__ */ (0,
|
|
11637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(
|
|
11605
11638
|
TabsSelectedItemIndicatorDiv,
|
|
11606
11639
|
{
|
|
11607
11640
|
style: {
|
|
@@ -11614,24 +11647,24 @@ var SelectedItemIndicator2 = () => {
|
|
|
11614
11647
|
};
|
|
11615
11648
|
|
|
11616
11649
|
// src/components/Tabs/Tabs.tsx
|
|
11617
|
-
var
|
|
11618
|
-
var TabsContainer =
|
|
11650
|
+
var import_jsx_runtime265 = require("react/jsx-runtime");
|
|
11651
|
+
var TabsContainer = import_styled_components83.default.div`
|
|
11619
11652
|
display: flex;
|
|
11620
11653
|
flex-direction: column;
|
|
11621
11654
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11622
11655
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11623
11656
|
`;
|
|
11624
|
-
var StickyTabContent =
|
|
11657
|
+
var StickyTabContent = import_styled_components83.default.div`
|
|
11625
11658
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11626
11659
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11627
11660
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11628
11661
|
`;
|
|
11629
|
-
var StyledTabsRoot = (0,
|
|
11662
|
+
var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.Root)`
|
|
11630
11663
|
display: flex;
|
|
11631
11664
|
flex-direction: column;
|
|
11632
11665
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11633
11666
|
`;
|
|
11634
|
-
var Tabs = (0,
|
|
11667
|
+
var Tabs = (0, import_react60.forwardRef)(
|
|
11635
11668
|
({
|
|
11636
11669
|
children,
|
|
11637
11670
|
fullWidth = true,
|
|
@@ -11643,13 +11676,13 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11643
11676
|
...otherProps
|
|
11644
11677
|
}, ref) => {
|
|
11645
11678
|
const tabItems = extractTabItems(children);
|
|
11646
|
-
const [internalSelectedValue, setInternalSelectedValue] = (0,
|
|
11679
|
+
const [internalSelectedValue, setInternalSelectedValue] = (0, import_react60.useState)(defaultSelectedValue);
|
|
11647
11680
|
const modeProps = defaultSelectedValue !== void 0 ? {
|
|
11648
11681
|
defaultValue: defaultSelectedValue,
|
|
11649
11682
|
onValueChange: setInternalSelectedValue
|
|
11650
11683
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11651
11684
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11652
|
-
return /* @__PURE__ */ (0,
|
|
11685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11653
11686
|
StyledTabsRoot,
|
|
11654
11687
|
{
|
|
11655
11688
|
ref,
|
|
@@ -11657,14 +11690,14 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11657
11690
|
activationMode: "automatic",
|
|
11658
11691
|
...otherProps,
|
|
11659
11692
|
...modeProps,
|
|
11660
|
-
children: /* @__PURE__ */ (0,
|
|
11661
|
-
/* @__PURE__ */ (0,
|
|
11693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11694
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(
|
|
11662
11695
|
TabList,
|
|
11663
11696
|
{
|
|
11664
11697
|
ariaLabel,
|
|
11665
11698
|
fullWidth,
|
|
11666
11699
|
children: [
|
|
11667
|
-
/* @__PURE__ */ (0,
|
|
11700
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsx)(SelectedItemIndicator2, {}),
|
|
11668
11701
|
tabItems.map((tab) => {
|
|
11669
11702
|
const {
|
|
11670
11703
|
value,
|
|
@@ -11674,7 +11707,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11674
11707
|
"aria-label": ariaLabelForTab
|
|
11675
11708
|
} = tab.props;
|
|
11676
11709
|
if ((0, import_type_guards44.isNil)(icon)) {
|
|
11677
|
-
return /* @__PURE__ */ (0,
|
|
11710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11678
11711
|
TabItem,
|
|
11679
11712
|
{
|
|
11680
11713
|
disabled,
|
|
@@ -11685,7 +11718,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11685
11718
|
);
|
|
11686
11719
|
}
|
|
11687
11720
|
if ((0, import_type_guards44.isNotNil)(label)) {
|
|
11688
|
-
return /* @__PURE__ */ (0,
|
|
11721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11689
11722
|
TabItem,
|
|
11690
11723
|
{
|
|
11691
11724
|
disabled,
|
|
@@ -11697,7 +11730,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11697
11730
|
);
|
|
11698
11731
|
}
|
|
11699
11732
|
if ((0, import_type_guards44.isNotNil)(ariaLabelForTab)) {
|
|
11700
|
-
return /* @__PURE__ */ (0,
|
|
11733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11701
11734
|
TabItem,
|
|
11702
11735
|
{
|
|
11703
11736
|
"aria-label": ariaLabelForTab,
|
|
@@ -11713,7 +11746,7 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11713
11746
|
]
|
|
11714
11747
|
}
|
|
11715
11748
|
),
|
|
11716
|
-
/* @__PURE__ */ (0,
|
|
11749
|
+
/* @__PURE__ */ (0, import_jsx_runtime265.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(
|
|
11717
11750
|
TabPanel,
|
|
11718
11751
|
{
|
|
11719
11752
|
value: tab.props.value,
|
|
@@ -11729,19 +11762,19 @@ var Tabs = (0, import_react59.forwardRef)(
|
|
|
11729
11762
|
Tabs.displayName = "Tabs";
|
|
11730
11763
|
|
|
11731
11764
|
// src/components/Tabs/Tab.tsx
|
|
11732
|
-
var
|
|
11733
|
-
var
|
|
11734
|
-
var Tab = (0,
|
|
11735
|
-
return /* @__PURE__ */ (0,
|
|
11765
|
+
var import_react61 = require("react");
|
|
11766
|
+
var import_jsx_runtime266 = require("react/jsx-runtime");
|
|
11767
|
+
var Tab = (0, import_react61.forwardRef)(({ children }, ref) => {
|
|
11768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime266.jsx)("div", { ref, children });
|
|
11736
11769
|
});
|
|
11737
11770
|
Tab.displayName = "Tab";
|
|
11738
11771
|
|
|
11739
11772
|
// src/components/Tag/Tag.tsx
|
|
11740
|
-
var
|
|
11741
|
-
var
|
|
11773
|
+
var import_react62 = require("react");
|
|
11774
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11742
11775
|
var import_type_guards45 = require("@wistia/type-guards");
|
|
11743
|
-
var
|
|
11744
|
-
var TagLabel =
|
|
11776
|
+
var import_jsx_runtime267 = require("react/jsx-runtime");
|
|
11777
|
+
var TagLabel = import_styled_components84.default.a`
|
|
11745
11778
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11746
11779
|
font-size: var(--wui-typography-label-4-size);
|
|
11747
11780
|
font-weight: var(--wui-typography-label-4-weight);
|
|
@@ -11776,14 +11809,14 @@ var TagLabel = import_styled_components83.default.a`
|
|
|
11776
11809
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11777
11810
|
}
|
|
11778
11811
|
`;
|
|
11779
|
-
var TagDivider =
|
|
11812
|
+
var TagDivider = import_styled_components84.default.div`
|
|
11780
11813
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11781
11814
|
border-left: 1px solid var(--wui-color-border);
|
|
11782
11815
|
display: flex;
|
|
11783
11816
|
height: 14px;
|
|
11784
11817
|
width: 1px;
|
|
11785
11818
|
`;
|
|
11786
|
-
var StyledRemoveButton =
|
|
11819
|
+
var StyledRemoveButton = import_styled_components84.default.button`
|
|
11787
11820
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11788
11821
|
all: unset;
|
|
11789
11822
|
cursor: pointer;
|
|
@@ -11811,7 +11844,7 @@ var StyledRemoveButton = import_styled_components83.default.button`
|
|
|
11811
11844
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11812
11845
|
}
|
|
11813
11846
|
`;
|
|
11814
|
-
var StyledTag =
|
|
11847
|
+
var StyledTag = import_styled_components84.default.div`
|
|
11815
11848
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11816
11849
|
align-items: center;
|
|
11817
11850
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11832,29 +11865,29 @@ var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
|
11832
11865
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11833
11866
|
);
|
|
11834
11867
|
}
|
|
11835
|
-
return /* @__PURE__ */ (0,
|
|
11836
|
-
/* @__PURE__ */ (0,
|
|
11837
|
-
/* @__PURE__ */ (0,
|
|
11868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(import_jsx_runtime267.Fragment, { children: [
|
|
11869
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
11870
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11838
11871
|
StyledRemoveButton,
|
|
11839
11872
|
{
|
|
11840
11873
|
$colorScheme: colorScheme,
|
|
11841
11874
|
onClick: onClickRemove,
|
|
11842
11875
|
type: "button",
|
|
11843
11876
|
children: [
|
|
11844
|
-
/* @__PURE__ */ (0,
|
|
11877
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
11845
11878
|
Icon,
|
|
11846
11879
|
{
|
|
11847
11880
|
size: "sm",
|
|
11848
11881
|
type: "close"
|
|
11849
11882
|
}
|
|
11850
11883
|
),
|
|
11851
|
-
/* @__PURE__ */ (0,
|
|
11884
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11852
11885
|
]
|
|
11853
11886
|
}
|
|
11854
11887
|
)
|
|
11855
11888
|
] });
|
|
11856
11889
|
};
|
|
11857
|
-
var Tag = (0,
|
|
11890
|
+
var Tag = (0, import_react62.forwardRef)(
|
|
11858
11891
|
({
|
|
11859
11892
|
onClickRemove,
|
|
11860
11893
|
colorScheme = "inherit",
|
|
@@ -11866,14 +11899,14 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11866
11899
|
}, ref) => {
|
|
11867
11900
|
const hasIcon = (0, import_type_guards45.isNotNil)(icon);
|
|
11868
11901
|
const labelProps = (0, import_type_guards45.isNotNil)(href) && (0, import_type_guards45.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11869
|
-
return /* @__PURE__ */ (0,
|
|
11902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11870
11903
|
StyledTag,
|
|
11871
11904
|
{
|
|
11872
11905
|
ref,
|
|
11873
11906
|
$colorScheme: colorScheme,
|
|
11874
11907
|
...otherProps,
|
|
11875
11908
|
children: [
|
|
11876
|
-
/* @__PURE__ */ (0,
|
|
11909
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsxs)(
|
|
11877
11910
|
TagLabel,
|
|
11878
11911
|
{
|
|
11879
11912
|
...labelProps,
|
|
@@ -11884,7 +11917,7 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11884
11917
|
]
|
|
11885
11918
|
}
|
|
11886
11919
|
),
|
|
11887
|
-
/* @__PURE__ */ (0,
|
|
11920
|
+
/* @__PURE__ */ (0, import_jsx_runtime267.jsx)(
|
|
11888
11921
|
RemoveButton,
|
|
11889
11922
|
{
|
|
11890
11923
|
colorScheme,
|
|
@@ -11900,26 +11933,26 @@ var Tag = (0, import_react61.forwardRef)(
|
|
|
11900
11933
|
Tag.displayName = "Tag";
|
|
11901
11934
|
|
|
11902
11935
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11903
|
-
var
|
|
11936
|
+
var import_styled_components85 = __toESM(require("styled-components"));
|
|
11904
11937
|
var import_type_guards46 = require("@wistia/type-guards");
|
|
11905
|
-
var
|
|
11938
|
+
var import_jsx_runtime268 = require("react/jsx-runtime");
|
|
11906
11939
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
11907
11940
|
if (iconOnly) {
|
|
11908
|
-
return /* @__PURE__ */ (0,
|
|
11941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11909
11942
|
"g",
|
|
11910
11943
|
{
|
|
11911
11944
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11912
11945
|
fill: brandmarkColor,
|
|
11913
|
-
children: /* @__PURE__ */ (0,
|
|
11946
|
+
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" })
|
|
11914
11947
|
}
|
|
11915
11948
|
);
|
|
11916
11949
|
}
|
|
11917
|
-
return /* @__PURE__ */ (0,
|
|
11950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11918
11951
|
"g",
|
|
11919
11952
|
{
|
|
11920
11953
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11921
11954
|
fill: brandmarkColor,
|
|
11922
|
-
children: /* @__PURE__ */ (0,
|
|
11955
|
+
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" })
|
|
11923
11956
|
}
|
|
11924
11957
|
);
|
|
11925
11958
|
};
|
|
@@ -11927,12 +11960,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
11927
11960
|
if (iconOnly) {
|
|
11928
11961
|
return null;
|
|
11929
11962
|
}
|
|
11930
|
-
return /* @__PURE__ */ (0,
|
|
11963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime268.jsx)(
|
|
11931
11964
|
"g",
|
|
11932
11965
|
{
|
|
11933
11966
|
"data-testid": "ui-wistia-logo-logotype",
|
|
11934
11967
|
fill: logotypeColor,
|
|
11935
|
-
children: /* @__PURE__ */ (0,
|
|
11968
|
+
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" })
|
|
11936
11969
|
}
|
|
11937
11970
|
);
|
|
11938
11971
|
};
|
|
@@ -11942,7 +11975,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11942
11975
|
}
|
|
11943
11976
|
return "0 0 144 31.47";
|
|
11944
11977
|
};
|
|
11945
|
-
var WistiaLogoComponent =
|
|
11978
|
+
var WistiaLogoComponent = import_styled_components85.default.svg`
|
|
11946
11979
|
height: ${({ height }) => `${height}px`};
|
|
11947
11980
|
|
|
11948
11981
|
/* ensure it will always fit on mobile */
|
|
@@ -11958,12 +11991,12 @@ var WistiaLogoComponent = import_styled_components84.default.svg`
|
|
|
11958
11991
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11959
11992
|
if ($opticallyCentered) {
|
|
11960
11993
|
if ($iconOnly) {
|
|
11961
|
-
return
|
|
11994
|
+
return import_styled_components85.css`
|
|
11962
11995
|
aspect-ratio: 1;
|
|
11963
11996
|
padding: 11.85% 3.12% 13.91%;
|
|
11964
11997
|
`;
|
|
11965
11998
|
}
|
|
11966
|
-
return
|
|
11999
|
+
return import_styled_components85.css`
|
|
11967
12000
|
aspect-ratio: 127 / 32;
|
|
11968
12001
|
`;
|
|
11969
12002
|
}
|
|
@@ -12000,7 +12033,7 @@ var WistiaLogo = ({
|
|
|
12000
12033
|
};
|
|
12001
12034
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
12002
12035
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
12003
|
-
const Logo = /* @__PURE__ */ (0,
|
|
12036
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime268.jsxs)(
|
|
12004
12037
|
WistiaLogoComponent,
|
|
12005
12038
|
{
|
|
12006
12039
|
$hoverColor: hoverColor,
|
|
@@ -12013,14 +12046,14 @@ var WistiaLogo = ({
|
|
|
12013
12046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12014
12047
|
...otherProps,
|
|
12015
12048
|
children: [
|
|
12016
|
-
/* @__PURE__ */ (0,
|
|
12017
|
-
(0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0,
|
|
12049
|
+
/* @__PURE__ */ (0, import_jsx_runtime268.jsx)("title", { children: title }),
|
|
12050
|
+
(0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("desc", { children: description }) : null,
|
|
12018
12051
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
12019
12052
|
renderLogotype(logotypeColor, iconOnly)
|
|
12020
12053
|
]
|
|
12021
12054
|
}
|
|
12022
12055
|
);
|
|
12023
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
12056
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime268.jsx)("a", { href, children: Logo }) : Logo;
|
|
12024
12057
|
};
|
|
12025
12058
|
WistiaLogo.displayName = "WistiaLogo";
|
|
12026
12059
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -12034,6 +12067,7 @@ WistiaLogo.displayName = "WistiaLogo";
|
|
|
12034
12067
|
Button,
|
|
12035
12068
|
ButtonGroup,
|
|
12036
12069
|
Card,
|
|
12070
|
+
Center,
|
|
12037
12071
|
Checkbox,
|
|
12038
12072
|
CheckboxGroup,
|
|
12039
12073
|
CheckboxMenuItem,
|