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