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