@wistia/ui 0.6.20 → 0.6.21-beta.1e901289.c5b3c2b
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 +908 -777
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +49 -20
- package/dist/index.d.ts +49 -20
- package/dist/index.mjs +904 -773
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -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.21-beta.1e901289.c5b3c2b
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2233,6 +2233,7 @@ var ellipsisStyle = import_styled_components14.css`
|
|
|
2233
2233
|
overflow: hidden;
|
|
2234
2234
|
text-overflow: ellipsis;
|
|
2235
2235
|
white-space: nowrap;
|
|
2236
|
+
display: block;
|
|
2236
2237
|
|
|
2237
2238
|
/*
|
|
2238
2239
|
Using feature detection (i.e., -webkit-named-image) we only target Safari browsers
|
|
@@ -2255,7 +2256,7 @@ var ellipsisStyle = import_styled_components14.css`
|
|
|
2255
2256
|
var ellipsisFlexParentStyle = import_styled_components14.css`
|
|
2256
2257
|
min-width: 0;
|
|
2257
2258
|
`;
|
|
2258
|
-
var EllipsisComponent = import_styled_components14.default.
|
|
2259
|
+
var EllipsisComponent = import_styled_components14.default.span`
|
|
2259
2260
|
${ellipsisStyle};
|
|
2260
2261
|
${({ $lines }) => {
|
|
2261
2262
|
if ((0, import_type_guards8.isNotNil)($lines)) {
|
|
@@ -7530,207 +7531,124 @@ var Card = ({
|
|
|
7530
7531
|
Card.displayName = "Card";
|
|
7531
7532
|
|
|
7532
7533
|
// src/components/Checkbox/Checkbox.tsx
|
|
7533
|
-
var
|
|
7534
|
-
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
7534
|
+
var import_react18 = require("react");
|
|
7535
7535
|
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7536
|
-
var
|
|
7536
|
+
var import_type_guards22 = require("@wistia/type-guards");
|
|
7537
7537
|
|
|
7538
|
-
// src/components/
|
|
7539
|
-
var
|
|
7538
|
+
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7539
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7540
|
+
var import_type_guards21 = require("@wistia/type-guards");
|
|
7540
7541
|
|
|
7541
|
-
// src/components/
|
|
7542
|
-
var import_react18 = require("react");
|
|
7542
|
+
// src/private/components/FormControlLabel/FormControlLabelDescription.tsx
|
|
7543
7543
|
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7544
|
+
var import_type_guards19 = require("@wistia/type-guards");
|
|
7544
7545
|
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7545
|
-
var
|
|
7546
|
-
|
|
7547
|
-
--font-size: var(--wui-typography-heading-hero-size);
|
|
7548
|
-
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
7549
|
-
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
7550
|
-
`;
|
|
7551
|
-
var heading1TextStyle = import_styled_components31.css`
|
|
7552
|
-
--font-family: var(--wui-typography-heading-1-family);
|
|
7553
|
-
--font-size: var(--wui-typography-heading-1-size);
|
|
7554
|
-
--font-weight: var(--wui-typography-heading-1-weight);
|
|
7555
|
-
--line-height: var(--wui-typography-heading-1-line-height);
|
|
7556
|
-
`;
|
|
7557
|
-
var heading2TextStyle = import_styled_components31.css`
|
|
7558
|
-
--font-family: var(--wui-typography-heading-2-family);
|
|
7559
|
-
--font-size: var(--wui-typography-heading-2-size);
|
|
7560
|
-
--font-weight: var(--wui-typography-heading-2-weight);
|
|
7561
|
-
--line-height: var(--wui-typography-heading-2-line-height);
|
|
7562
|
-
`;
|
|
7563
|
-
var heading3TextStyle = import_styled_components31.css`
|
|
7564
|
-
--font-family: var(--wui-typography-heading-3-family);
|
|
7565
|
-
--font-size: var(--wui-typography-heading-3-size);
|
|
7566
|
-
--font-weight: var(--wui-typography-heading-3-weight);
|
|
7567
|
-
--line-height: var(--wui-typography-heading-3-line-height);
|
|
7568
|
-
`;
|
|
7569
|
-
var heading4TextStyle = import_styled_components31.css`
|
|
7570
|
-
--font-family: var(--wui-typography-heading-4-family);
|
|
7571
|
-
--font-size: var(--wui-typography-heading-4-size);
|
|
7572
|
-
--font-weight: var(--wui-typography-heading-4-weight);
|
|
7573
|
-
--line-height: var(--wui-typography-heading-4-line-height);
|
|
7574
|
-
`;
|
|
7575
|
-
var heading5TextStyle = import_styled_components31.css`
|
|
7576
|
-
--font-family: var(--wui-typography-heading-5-family);
|
|
7577
|
-
--font-size: var(--wui-typography-heading-5-size);
|
|
7578
|
-
--font-weight: var(--wui-typography-heading-5-weight);
|
|
7579
|
-
--line-height: var(--wui-typography-heading-5-line-height);
|
|
7580
|
-
`;
|
|
7581
|
-
var heading6TextStyle = import_styled_components31.css`
|
|
7582
|
-
--font-family: var(--wui-typography-heading-6-family);
|
|
7583
|
-
--font-size: var(--wui-typography-heading-6-size);
|
|
7584
|
-
--font-weight: var(--wui-typography-heading-6-weight);
|
|
7585
|
-
--line-height: var(--wui-typography-heading-6-line-height);
|
|
7546
|
+
var disabledStyle = import_styled_components31.css`
|
|
7547
|
+
color: var(--wui-color-text-disabled);
|
|
7586
7548
|
`;
|
|
7587
|
-
var
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
}
|
|
7596
|
-
var DEFAULT_ELEMENT2 = "h1";
|
|
7597
|
-
var StyledHeading = import_styled_components31.default.div`
|
|
7598
|
-
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7599
|
-
font-family: var(--font-family);
|
|
7600
|
-
font-size: var(--font-size);
|
|
7601
|
-
font-weight: var(--font-weight);
|
|
7602
|
-
line-height: var(--line-height);
|
|
7603
|
-
color: var(--wui-color-text);
|
|
7604
|
-
${({ $variant }) => variantStyleMap[$variant]}
|
|
7605
|
-
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7606
|
-
${({ $inline }) => $inline && import_styled_components31.css`
|
|
7607
|
-
display: inline-block;
|
|
7608
|
-
`}
|
|
7609
|
-
${({ $disabled }) => $disabled && import_styled_components31.css`
|
|
7610
|
-
color: var(--wui-color-text-disabled);
|
|
7611
|
-
`}
|
|
7612
|
-
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components31.css`
|
|
7613
|
-
user-select: none;
|
|
7614
|
-
`}
|
|
7615
|
-
${({ $align }) => import_styled_components31.css`
|
|
7616
|
-
text-align: ${$align};
|
|
7617
|
-
`}
|
|
7618
|
-
margin: 0;
|
|
7549
|
+
var StyledFormControlLabelDescription = import_styled_components31.default.div`
|
|
7550
|
+
color: var(--wui-color-text-secondary);
|
|
7551
|
+
display: block;
|
|
7552
|
+
font-size: var(--wui-typography-body-4-size);
|
|
7553
|
+
font-weight: var(--wui-typography-body-4-weight);
|
|
7554
|
+
line-height: var(--wui-typography-body-4-line-height);
|
|
7555
|
+
margin-top: var(--wui-space-01);
|
|
7556
|
+
|
|
7557
|
+
${({ $disabled }) => $disabled && disabledStyle}
|
|
7619
7558
|
`;
|
|
7620
|
-
var
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
({
|
|
7631
|
-
align = "left",
|
|
7632
|
-
colorScheme = "inherit",
|
|
7633
|
-
disabled = false,
|
|
7634
|
-
ellipsis = false,
|
|
7635
|
-
inline = false,
|
|
7636
|
-
preventUserSelect = false,
|
|
7637
|
-
variant = "heading1",
|
|
7638
|
-
renderAs,
|
|
7639
|
-
...otherProps
|
|
7640
|
-
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7641
|
-
StyledHeading,
|
|
7559
|
+
var FormControlLabelDescription = ({
|
|
7560
|
+
children,
|
|
7561
|
+
disabled = false,
|
|
7562
|
+
...props
|
|
7563
|
+
}) => {
|
|
7564
|
+
if ((0, import_type_guards19.isNil)(children)) {
|
|
7565
|
+
return null;
|
|
7566
|
+
}
|
|
7567
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(
|
|
7568
|
+
StyledFormControlLabelDescription,
|
|
7642
7569
|
{
|
|
7643
|
-
|
|
7644
|
-
$align: align,
|
|
7645
|
-
$colorScheme: colorScheme,
|
|
7570
|
+
...props,
|
|
7646
7571
|
$disabled: disabled,
|
|
7647
|
-
|
|
7648
|
-
$inline: inline,
|
|
7649
|
-
$preventUserSelect: preventUserSelect,
|
|
7650
|
-
$variant: variant,
|
|
7651
|
-
as: renderAs ?? variantElementMap[variant],
|
|
7652
|
-
...otherProps
|
|
7572
|
+
children
|
|
7653
7573
|
}
|
|
7654
|
-
)
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
var Heading = makePolymorphic(HeadingComponent);
|
|
7574
|
+
);
|
|
7575
|
+
};
|
|
7576
|
+
FormControlLabelDescription.displayName = "FormControlLabelDescription";
|
|
7658
7577
|
|
|
7659
|
-
// src/components/
|
|
7578
|
+
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
7579
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7580
|
+
var import_type_guards20 = require("@wistia/type-guards");
|
|
7660
7581
|
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7661
|
-
var
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7582
|
+
var VisuallyHidden = import_styled_components32.default.div({ ...visuallyHiddenStyle });
|
|
7583
|
+
var VisuallyHiddenButFocusable = import_styled_components32.default.div({
|
|
7584
|
+
"&:not(:focus-within)": visuallyHiddenStyle
|
|
7585
|
+
});
|
|
7586
|
+
var ScreenReaderOnly = ({
|
|
7587
|
+
text,
|
|
7588
|
+
children,
|
|
7589
|
+
focusable = false,
|
|
7590
|
+
...otherProps
|
|
7591
|
+
}) => {
|
|
7592
|
+
const accessibleText = (0, import_type_guards20.isNotNil)(text) ? text : children;
|
|
7593
|
+
if (focusable) {
|
|
7594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
7667
7595
|
}
|
|
7668
|
-
|
|
7669
|
-
|
|
7596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
7597
|
+
};
|
|
7598
|
+
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
7599
|
+
|
|
7600
|
+
// src/private/components/FormControlLabel/FormControlLabel.tsx
|
|
7601
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7602
|
+
var disabledStyle2 = import_styled_components33.css`
|
|
7670
7603
|
color: var(--wui-color-text-disabled);
|
|
7671
7604
|
`;
|
|
7672
|
-
var
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7605
|
+
var StyledLabelWrapper = import_styled_components33.default.div`
|
|
7606
|
+
display: flex;
|
|
7607
|
+
flex-direction: column;
|
|
7608
|
+
`;
|
|
7609
|
+
var StyledFormControlLabel = import_styled_components33.default.label`
|
|
7610
|
+
cursor: pointer;
|
|
7611
|
+
display: flex;
|
|
7612
|
+
align-items: center;
|
|
7613
|
+
gap: var(--wui-space-01);
|
|
7677
7614
|
width: 100%;
|
|
7615
|
+
color: var(--wui-color-tex);
|
|
7616
|
+
font-size: var(--wui-typography-label-3-size);
|
|
7617
|
+
font-weight: var(--wui-typography-label-3-weight);
|
|
7618
|
+
line-height: var(--wui-typography-label-3-line-height);
|
|
7678
7619
|
|
|
7679
|
-
|
|
7680
|
-
> input,
|
|
7681
|
-
> textarea,
|
|
7682
|
-
> select {
|
|
7683
|
-
display: block;
|
|
7684
|
-
}
|
|
7685
|
-
|
|
7686
|
-
> label {
|
|
7687
|
-
font-weight: normal;
|
|
7688
|
-
}
|
|
7689
|
-
|
|
7690
|
-
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
7691
|
-
${({ $disabled }) => $disabled && disabledStyle}
|
|
7692
|
-
${({ $required }) => $required && requiredStyle}
|
|
7620
|
+
${({ $disabled }) => $disabled && disabledStyle2}
|
|
7693
7621
|
`;
|
|
7694
|
-
var
|
|
7695
|
-
|
|
7622
|
+
var FormControlLabel = ({
|
|
7623
|
+
label,
|
|
7624
|
+
description,
|
|
7696
7625
|
disabled = false,
|
|
7626
|
+
controlSlot,
|
|
7697
7627
|
htmlFor,
|
|
7698
|
-
|
|
7699
|
-
screenReaderOnly = false,
|
|
7700
|
-
...otherProps
|
|
7701
|
-
}) => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
7702
|
-
StyledLabel2,
|
|
7703
|
-
{
|
|
7704
|
-
...otherProps,
|
|
7705
|
-
$disabled: disabled,
|
|
7706
|
-
$required: required,
|
|
7707
|
-
$screenReaderOnly: screenReaderOnly,
|
|
7708
|
-
htmlFor,
|
|
7709
|
-
children
|
|
7710
|
-
}
|
|
7711
|
-
);
|
|
7712
|
-
Label.displayName = "Label";
|
|
7713
|
-
|
|
7714
|
-
// src/components/Label/LabelDescription.tsx
|
|
7715
|
-
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7716
|
-
var import_type_guards19 = require("@wistia/type-guards");
|
|
7717
|
-
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7718
|
-
var StyledLabelDescription = import_styled_components33.default.div`
|
|
7719
|
-
color: var(--wui-color-text-secondary);
|
|
7720
|
-
font-size: var(--wui-typography-body-4-size);
|
|
7721
|
-
font-weight: var(--wui-typography-body-4-weight);
|
|
7722
|
-
line-height: var(--wui-typography-body-4-line-height);
|
|
7723
|
-
`;
|
|
7724
|
-
var LabelDescription = ({
|
|
7725
|
-
children,
|
|
7628
|
+
hideLabel = false,
|
|
7726
7629
|
...props
|
|
7727
7630
|
}) => {
|
|
7728
|
-
if ((0,
|
|
7631
|
+
if ((0, import_type_guards21.isNil)(label)) {
|
|
7729
7632
|
return null;
|
|
7730
7633
|
}
|
|
7731
|
-
|
|
7634
|
+
const labelContent = hideLabel ? /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(ScreenReaderOnly, { children: label }) : /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(StyledLabelWrapper, { children: [
|
|
7635
|
+
label,
|
|
7636
|
+
/* @__PURE__ */ (0, import_jsx_runtime201.jsx)(FormControlLabelDescription, { children: description })
|
|
7637
|
+
] });
|
|
7638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsxs)(
|
|
7639
|
+
StyledFormControlLabel,
|
|
7640
|
+
{
|
|
7641
|
+
$disabled: disabled,
|
|
7642
|
+
htmlFor,
|
|
7643
|
+
...props,
|
|
7644
|
+
children: [
|
|
7645
|
+
(0, import_type_guards21.isNotNil)(controlSlot) ? controlSlot : null,
|
|
7646
|
+
labelContent
|
|
7647
|
+
]
|
|
7648
|
+
}
|
|
7649
|
+
);
|
|
7732
7650
|
};
|
|
7733
|
-
|
|
7651
|
+
FormControlLabel.displayName = "FormControlLabel";
|
|
7734
7652
|
|
|
7735
7653
|
// src/components/Checkbox/Checkbox.tsx
|
|
7736
7654
|
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
@@ -7746,133 +7664,145 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
|
7746
7664
|
"path",
|
|
7747
7665
|
{
|
|
7748
7666
|
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",
|
|
7749
|
-
fill: "
|
|
7667
|
+
fill: "currentColor"
|
|
7750
7668
|
}
|
|
7751
7669
|
)
|
|
7752
7670
|
}
|
|
7753
7671
|
);
|
|
7672
|
+
var disabledStyle3 = import_styled_components34.css`
|
|
7673
|
+
cursor: not-allowed;
|
|
7674
|
+
opacity: 0.5;
|
|
7675
|
+
`;
|
|
7676
|
+
var inputSizeSmall = import_styled_components34.css`
|
|
7677
|
+
width: 14px;
|
|
7678
|
+
height: 14px;
|
|
7679
|
+
min-width: 14px;
|
|
7680
|
+
min-height: 14px;
|
|
7681
|
+
`;
|
|
7682
|
+
var inputSizeMedium = import_styled_components34.css`
|
|
7683
|
+
width: 16px;
|
|
7684
|
+
height: 16px;
|
|
7685
|
+
min-width: 16px;
|
|
7686
|
+
min-height: 16px;
|
|
7687
|
+
`;
|
|
7688
|
+
var inputSizeLarge = import_styled_components34.css`
|
|
7689
|
+
width: 20px;
|
|
7690
|
+
height: 20px;
|
|
7691
|
+
min-width: 20px;
|
|
7692
|
+
min-height: 20px;
|
|
7693
|
+
`;
|
|
7754
7694
|
var StyledCheckboxWrapper = import_styled_components34.default.div`
|
|
7755
7695
|
display: flex;
|
|
7756
|
-
|
|
7757
|
-
cursor: pointer;
|
|
7696
|
+
margin: 0;
|
|
7758
7697
|
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
}
|
|
7698
|
+
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
7699
|
+
user-select: none;
|
|
7762
7700
|
|
|
7763
|
-
|
|
7764
|
-
/* TODO Lamp to design focus state */
|
|
7765
|
-
background-color: #efefef;
|
|
7766
|
-
}
|
|
7701
|
+
${({ disabled }) => disabled && disabledStyle3};
|
|
7767
7702
|
`;
|
|
7768
|
-
var
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7703
|
+
var getSizeCss = (size) => {
|
|
7704
|
+
if (size === "sm") return inputSizeSmall;
|
|
7705
|
+
if (size === "lg") return inputSizeLarge;
|
|
7706
|
+
return inputSizeMedium;
|
|
7707
|
+
};
|
|
7708
|
+
var StyledCheckboxInput = import_styled_components34.default.div`
|
|
7709
|
+
${({ $size }) => getSizeCss($size)}
|
|
7710
|
+
line-height: 0;
|
|
7711
|
+
margin: 0;
|
|
7712
|
+
border: 1px solid var(--wui-color-border);
|
|
7773
7713
|
border-radius: var(--wui-border-radius-01);
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
align-items: center;
|
|
7779
|
-
justify-content: center;
|
|
7780
|
-
align-self: start; /* align to the top to handle label descriptions */
|
|
7781
|
-
|
|
7782
|
-
&[data-state='checked'] {
|
|
7783
|
-
background-color: var(--wui-color-bg-fill);
|
|
7784
|
-
}
|
|
7714
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
7715
|
+
display: grid;
|
|
7716
|
+
place-content: center;
|
|
7717
|
+
align-self: flex-start;
|
|
7785
7718
|
|
|
7786
|
-
|
|
7787
|
-
|
|
7719
|
+
svg {
|
|
7720
|
+
display: none;
|
|
7788
7721
|
|
|
7789
|
-
|
|
7790
|
-
fill: var(--wui-color-
|
|
7722
|
+
path {
|
|
7723
|
+
fill: var(--wui-color-bg-fill-white);
|
|
7791
7724
|
}
|
|
7792
7725
|
}
|
|
7726
|
+
`;
|
|
7727
|
+
var StyledHiddenCheckboxInput = import_styled_components34.default.input`
|
|
7728
|
+
${visuallyHiddenStyle}
|
|
7793
7729
|
|
|
7794
|
-
|
|
7795
|
-
|
|
7730
|
+
/* toggles display of faux-input background-color */
|
|
7731
|
+
&:checked + label [data-wui-faux-input='true'] {
|
|
7732
|
+
background-color: var(--wui-color-bg-fill);
|
|
7796
7733
|
}
|
|
7797
7734
|
|
|
7798
|
-
|
|
7799
|
-
|
|
7735
|
+
/* toggles display of CheckIcon */
|
|
7736
|
+
&:checked + label svg {
|
|
7737
|
+
display: block;
|
|
7800
7738
|
}
|
|
7801
7739
|
`;
|
|
7802
|
-
var
|
|
7803
|
-
display: flex;
|
|
7804
|
-
`;
|
|
7805
|
-
var StyledLabelWrapper = import_styled_components34.default.div`
|
|
7806
|
-
display: flex;
|
|
7807
|
-
flex-direction: column;
|
|
7808
|
-
margin-left: var(--wui-space-02);
|
|
7809
|
-
`;
|
|
7810
|
-
var Checkbox = (0, import_react19.forwardRef)(
|
|
7740
|
+
var Checkbox = (0, import_react18.forwardRef)(
|
|
7811
7741
|
({
|
|
7812
7742
|
checked,
|
|
7813
7743
|
disabled = false,
|
|
7814
|
-
forceState,
|
|
7815
7744
|
id,
|
|
7816
7745
|
label,
|
|
7817
7746
|
description,
|
|
7818
7747
|
name,
|
|
7819
7748
|
onChange,
|
|
7749
|
+
size = "md",
|
|
7750
|
+
value,
|
|
7820
7751
|
required = false,
|
|
7821
|
-
|
|
7822
|
-
...
|
|
7752
|
+
hideLabel = false,
|
|
7753
|
+
...props
|
|
7823
7754
|
}, ref) => {
|
|
7824
|
-
const generatedId = (0,
|
|
7825
|
-
const computedId = (0,
|
|
7826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7755
|
+
const generatedId = (0, import_react18.useId)();
|
|
7756
|
+
const computedId = (0, import_type_guards22.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(
|
|
7758
|
+
StyledCheckboxWrapper,
|
|
7759
|
+
{
|
|
7760
|
+
ref,
|
|
7761
|
+
disabled,
|
|
7762
|
+
children: [
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7764
|
+
StyledHiddenCheckboxInput,
|
|
7765
|
+
{
|
|
7766
|
+
...props,
|
|
7767
|
+
ref,
|
|
7768
|
+
checked,
|
|
7769
|
+
disabled,
|
|
7770
|
+
id: computedId,
|
|
7771
|
+
name,
|
|
7772
|
+
onChange,
|
|
7773
|
+
required,
|
|
7774
|
+
type: "checkbox",
|
|
7775
|
+
value
|
|
7776
|
+
}
|
|
7777
|
+
),
|
|
7778
|
+
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7779
|
+
FormControlLabel,
|
|
7780
|
+
{
|
|
7781
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7782
|
+
StyledCheckboxInput,
|
|
7783
|
+
{
|
|
7784
|
+
$size: size,
|
|
7785
|
+
"data-wui-faux-input": "true",
|
|
7786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(CheckIcon, {})
|
|
7844
7787
|
}
|
|
7845
|
-
|
|
7846
|
-
|
|
7788
|
+
),
|
|
7789
|
+
description,
|
|
7790
|
+
hideLabel,
|
|
7791
|
+
htmlFor: computedId,
|
|
7792
|
+
label
|
|
7847
7793
|
}
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(StyledCheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(CheckIcon, {}) })
|
|
7853
|
-
}
|
|
7854
|
-
),
|
|
7855
|
-
/* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(StyledLabelWrapper, { children: [
|
|
7856
|
-
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7857
|
-
Label,
|
|
7858
|
-
{
|
|
7859
|
-
disabled,
|
|
7860
|
-
htmlFor: computedId,
|
|
7861
|
-
required,
|
|
7862
|
-
children: label
|
|
7863
|
-
}
|
|
7864
|
-
),
|
|
7865
|
-
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(LabelDescription, { children: description })
|
|
7866
|
-
] })
|
|
7867
|
-
] });
|
|
7794
|
+
)
|
|
7795
|
+
]
|
|
7796
|
+
}
|
|
7797
|
+
);
|
|
7868
7798
|
}
|
|
7869
7799
|
);
|
|
7870
7800
|
Checkbox.displayName = "Checkbox";
|
|
7871
7801
|
|
|
7872
7802
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
7873
|
-
var
|
|
7803
|
+
var import_react19 = require("react");
|
|
7874
7804
|
var ClickRegion = ({ children, targetRef }) => {
|
|
7875
|
-
(0,
|
|
7805
|
+
(0, import_react19.useEffect)(() => {
|
|
7876
7806
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7877
7807
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7878
7808
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -7880,7 +7810,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7880
7810
|
} else {
|
|
7881
7811
|
}
|
|
7882
7812
|
}, [targetRef]);
|
|
7883
|
-
const handleClick = (0,
|
|
7813
|
+
const handleClick = (0, import_react19.useCallback)(
|
|
7884
7814
|
(event) => {
|
|
7885
7815
|
const node = targetRef.current;
|
|
7886
7816
|
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")) {
|
|
@@ -7897,7 +7827,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7897
7827
|
},
|
|
7898
7828
|
[targetRef]
|
|
7899
7829
|
);
|
|
7900
|
-
return (0,
|
|
7830
|
+
return (0, import_react19.cloneElement)(import_react19.Children.only(children), {
|
|
7901
7831
|
"data-click-region": true,
|
|
7902
7832
|
onClick: handleClick
|
|
7903
7833
|
});
|
|
@@ -7906,7 +7836,7 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
7906
7836
|
|
|
7907
7837
|
// src/components/Collapsible/Collapsible.tsx
|
|
7908
7838
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7909
|
-
var
|
|
7839
|
+
var import_type_guards23 = require("@wistia/type-guards");
|
|
7910
7840
|
var import_styled_components35 = __toESM(require("styled-components"));
|
|
7911
7841
|
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7912
7842
|
var StyledRoot = (0, import_styled_components35.default)(import_react_collapsible.Root)`
|
|
@@ -7923,31 +7853,31 @@ var Collapsible = ({
|
|
|
7923
7853
|
onOpenChange
|
|
7924
7854
|
}) => {
|
|
7925
7855
|
const controlProps = {
|
|
7926
|
-
...(0,
|
|
7856
|
+
...(0, import_type_guards23.isNotNil)(onOpenChange) && (0, import_type_guards23.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
7927
7857
|
};
|
|
7928
7858
|
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(StyledRoot, { ...controlProps, children });
|
|
7929
7859
|
};
|
|
7930
7860
|
Collapsible.displayName = "Collapsible";
|
|
7931
7861
|
|
|
7932
7862
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
7933
|
-
var
|
|
7863
|
+
var import_react20 = require("react");
|
|
7934
7864
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
7935
7865
|
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7936
7866
|
var CollapsibleTrigger = ({ children }) => {
|
|
7937
|
-
|
|
7867
|
+
import_react20.Children.only(children);
|
|
7938
7868
|
return /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
7939
7869
|
};
|
|
7940
7870
|
|
|
7941
7871
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
7942
7872
|
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7943
7873
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
7944
|
-
var
|
|
7874
|
+
var import_type_guards24 = require("@wistia/type-guards");
|
|
7945
7875
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7946
7876
|
var ClampedContent = import_styled_components36.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
7947
7877
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
7948
7878
|
`;
|
|
7949
7879
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
7950
|
-
if ((0,
|
|
7880
|
+
if ((0, import_type_guards24.isNotUndefined)(clamp)) {
|
|
7951
7881
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
7952
7882
|
}
|
|
7953
7883
|
return /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(import_react_collapsible3.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(import_jsx_runtime205.Fragment, { children: [
|
|
@@ -7957,10 +7887,130 @@ var CollapsibleContent = ({ clamp, children }) => {
|
|
|
7957
7887
|
};
|
|
7958
7888
|
|
|
7959
7889
|
// src/components/DataCards/DataCard.tsx
|
|
7890
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
7891
|
+
var import_type_guards25 = require("@wistia/type-guards");
|
|
7892
|
+
|
|
7893
|
+
// src/components/Heading/Heading.tsx
|
|
7894
|
+
var import_react21 = require("react");
|
|
7960
7895
|
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7961
|
-
var import_type_guards23 = require("@wistia/type-guards");
|
|
7962
7896
|
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7963
|
-
var
|
|
7897
|
+
var heroStyle = import_styled_components37.css`
|
|
7898
|
+
--font-family: var(--wui-typography-heading-hero-family);
|
|
7899
|
+
--font-size: var(--wui-typography-heading-hero-size);
|
|
7900
|
+
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
7901
|
+
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
7902
|
+
`;
|
|
7903
|
+
var heading1TextStyle = import_styled_components37.css`
|
|
7904
|
+
--font-family: var(--wui-typography-heading-1-family);
|
|
7905
|
+
--font-size: var(--wui-typography-heading-1-size);
|
|
7906
|
+
--font-weight: var(--wui-typography-heading-1-weight);
|
|
7907
|
+
--line-height: var(--wui-typography-heading-1-line-height);
|
|
7908
|
+
`;
|
|
7909
|
+
var heading2TextStyle = import_styled_components37.css`
|
|
7910
|
+
--font-family: var(--wui-typography-heading-2-family);
|
|
7911
|
+
--font-size: var(--wui-typography-heading-2-size);
|
|
7912
|
+
--font-weight: var(--wui-typography-heading-2-weight);
|
|
7913
|
+
--line-height: var(--wui-typography-heading-2-line-height);
|
|
7914
|
+
`;
|
|
7915
|
+
var heading3TextStyle = import_styled_components37.css`
|
|
7916
|
+
--font-family: var(--wui-typography-heading-3-family);
|
|
7917
|
+
--font-size: var(--wui-typography-heading-3-size);
|
|
7918
|
+
--font-weight: var(--wui-typography-heading-3-weight);
|
|
7919
|
+
--line-height: var(--wui-typography-heading-3-line-height);
|
|
7920
|
+
`;
|
|
7921
|
+
var heading4TextStyle = import_styled_components37.css`
|
|
7922
|
+
--font-family: var(--wui-typography-heading-4-family);
|
|
7923
|
+
--font-size: var(--wui-typography-heading-4-size);
|
|
7924
|
+
--font-weight: var(--wui-typography-heading-4-weight);
|
|
7925
|
+
--line-height: var(--wui-typography-heading-4-line-height);
|
|
7926
|
+
`;
|
|
7927
|
+
var heading5TextStyle = import_styled_components37.css`
|
|
7928
|
+
--font-family: var(--wui-typography-heading-5-family);
|
|
7929
|
+
--font-size: var(--wui-typography-heading-5-size);
|
|
7930
|
+
--font-weight: var(--wui-typography-heading-5-weight);
|
|
7931
|
+
--line-height: var(--wui-typography-heading-5-line-height);
|
|
7932
|
+
`;
|
|
7933
|
+
var heading6TextStyle = import_styled_components37.css`
|
|
7934
|
+
--font-family: var(--wui-typography-heading-6-family);
|
|
7935
|
+
--font-size: var(--wui-typography-heading-6-size);
|
|
7936
|
+
--font-weight: var(--wui-typography-heading-6-weight);
|
|
7937
|
+
--line-height: var(--wui-typography-heading-6-line-height);
|
|
7938
|
+
`;
|
|
7939
|
+
var variantStyleMap = {
|
|
7940
|
+
hero: heroStyle,
|
|
7941
|
+
heading1: heading1TextStyle,
|
|
7942
|
+
heading2: heading2TextStyle,
|
|
7943
|
+
heading3: heading3TextStyle,
|
|
7944
|
+
heading4: heading4TextStyle,
|
|
7945
|
+
heading5: heading5TextStyle,
|
|
7946
|
+
heading6: heading6TextStyle
|
|
7947
|
+
};
|
|
7948
|
+
var DEFAULT_ELEMENT2 = "h1";
|
|
7949
|
+
var StyledHeading = import_styled_components37.default.div`
|
|
7950
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7951
|
+
font-family: var(--font-family);
|
|
7952
|
+
font-size: var(--font-size);
|
|
7953
|
+
font-weight: var(--font-weight);
|
|
7954
|
+
line-height: var(--line-height);
|
|
7955
|
+
color: var(--wui-color-text);
|
|
7956
|
+
${({ $variant }) => variantStyleMap[$variant]}
|
|
7957
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7958
|
+
${({ $inline }) => $inline && import_styled_components37.css`
|
|
7959
|
+
display: inline-block;
|
|
7960
|
+
`}
|
|
7961
|
+
${({ $disabled }) => $disabled && import_styled_components37.css`
|
|
7962
|
+
color: var(--wui-color-text-disabled);
|
|
7963
|
+
`}
|
|
7964
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components37.css`
|
|
7965
|
+
user-select: none;
|
|
7966
|
+
`}
|
|
7967
|
+
${({ $align }) => import_styled_components37.css`
|
|
7968
|
+
text-align: ${$align};
|
|
7969
|
+
`}
|
|
7970
|
+
margin: 0;
|
|
7971
|
+
`;
|
|
7972
|
+
var variantElementMap = {
|
|
7973
|
+
hero: DEFAULT_ELEMENT2,
|
|
7974
|
+
heading1: DEFAULT_ELEMENT2,
|
|
7975
|
+
heading2: "h2",
|
|
7976
|
+
heading3: "h3",
|
|
7977
|
+
heading4: "h4",
|
|
7978
|
+
heading5: "h5",
|
|
7979
|
+
heading6: "h6"
|
|
7980
|
+
};
|
|
7981
|
+
var HeadingComponent = (0, import_react21.forwardRef)(
|
|
7982
|
+
({
|
|
7983
|
+
align = "left",
|
|
7984
|
+
colorScheme = "inherit",
|
|
7985
|
+
disabled = false,
|
|
7986
|
+
ellipsis = false,
|
|
7987
|
+
inline = false,
|
|
7988
|
+
preventUserSelect = false,
|
|
7989
|
+
variant = "heading1",
|
|
7990
|
+
renderAs,
|
|
7991
|
+
...otherProps
|
|
7992
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
7993
|
+
StyledHeading,
|
|
7994
|
+
{
|
|
7995
|
+
ref,
|
|
7996
|
+
$align: align,
|
|
7997
|
+
$colorScheme: colorScheme,
|
|
7998
|
+
$disabled: disabled,
|
|
7999
|
+
$ellipsis: ellipsis,
|
|
8000
|
+
$inline: inline,
|
|
8001
|
+
$preventUserSelect: preventUserSelect,
|
|
8002
|
+
$variant: variant,
|
|
8003
|
+
as: renderAs ?? variantElementMap[variant],
|
|
8004
|
+
...otherProps
|
|
8005
|
+
}
|
|
8006
|
+
)
|
|
8007
|
+
);
|
|
8008
|
+
HeadingComponent.displayName = "Heading";
|
|
8009
|
+
var Heading = makePolymorphic(HeadingComponent);
|
|
8010
|
+
|
|
8011
|
+
// src/components/DataCards/DataCard.tsx
|
|
8012
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8013
|
+
var StyledDataCard = import_styled_components38.default.div`
|
|
7964
8014
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7965
8015
|
display: grid;
|
|
7966
8016
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -7973,7 +8023,7 @@ var StyledDataCard = import_styled_components37.default.div`
|
|
|
7973
8023
|
border-radius: var(--wui-border-radius-02);
|
|
7974
8024
|
position: relative;
|
|
7975
8025
|
`;
|
|
7976
|
-
var shimmer =
|
|
8026
|
+
var shimmer = import_styled_components38.keyframes`
|
|
7977
8027
|
0% {
|
|
7978
8028
|
background-position: 200% 0;
|
|
7979
8029
|
}
|
|
@@ -7981,7 +8031,7 @@ var shimmer = import_styled_components37.keyframes`
|
|
|
7981
8031
|
background-position: -200% 0;
|
|
7982
8032
|
}
|
|
7983
8033
|
`;
|
|
7984
|
-
var LoadingBackground =
|
|
8034
|
+
var LoadingBackground = import_styled_components38.default.div`
|
|
7985
8035
|
background: linear-gradient(
|
|
7986
8036
|
90deg,
|
|
7987
8037
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -7992,27 +8042,27 @@ var LoadingBackground = import_styled_components37.default.div`
|
|
|
7992
8042
|
animation: ${shimmer} 1.5s infinite;
|
|
7993
8043
|
border-radius: var(--wui-border-radius-01);
|
|
7994
8044
|
`;
|
|
7995
|
-
var StyledLoadingLabel = (0,
|
|
8045
|
+
var StyledLoadingLabel = (0, import_styled_components38.default)(LoadingBackground)`
|
|
7996
8046
|
width: 80px;
|
|
7997
8047
|
height: var(--wui-typography-heading-6-line-height);
|
|
7998
8048
|
`;
|
|
7999
|
-
var StyledLoadingValue = (0,
|
|
8049
|
+
var StyledLoadingValue = (0, import_styled_components38.default)(LoadingBackground)`
|
|
8000
8050
|
width: 90%;
|
|
8001
8051
|
height: var(--wui-typography-heading-3-line-height);
|
|
8002
8052
|
`;
|
|
8003
|
-
var
|
|
8053
|
+
var StyledLabel2 = (0, import_styled_components38.default)(Heading)`
|
|
8004
8054
|
grid-area: label;
|
|
8005
8055
|
`;
|
|
8006
|
-
var StyledValue = (0,
|
|
8056
|
+
var StyledValue = (0, import_styled_components38.default)(Heading)`
|
|
8007
8057
|
grid-area: value;
|
|
8008
8058
|
`;
|
|
8009
|
-
var StyledSlot =
|
|
8059
|
+
var StyledSlot = import_styled_components38.default.div`
|
|
8010
8060
|
display: flex;
|
|
8011
8061
|
justify-content: flex-end;
|
|
8012
8062
|
grid-area: slot;
|
|
8013
8063
|
align-self: center;
|
|
8014
8064
|
`;
|
|
8015
|
-
var StyledDataCardTrendContainer =
|
|
8065
|
+
var StyledDataCardTrendContainer = import_styled_components38.default.div`
|
|
8016
8066
|
position: absolute;
|
|
8017
8067
|
bottom: var(--wui-space-01);
|
|
8018
8068
|
right: var(--wui-space-01);
|
|
@@ -8025,39 +8075,39 @@ var DataCard = ({
|
|
|
8025
8075
|
isLoading = false,
|
|
8026
8076
|
trend,
|
|
8027
8077
|
...props
|
|
8028
|
-
}) => /* @__PURE__ */ (0,
|
|
8078
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(
|
|
8029
8079
|
StyledDataCard,
|
|
8030
8080
|
{
|
|
8031
8081
|
$colorScheme: colorScheme,
|
|
8032
8082
|
...props,
|
|
8033
8083
|
children: [
|
|
8034
|
-
/* @__PURE__ */ (0,
|
|
8035
|
-
|
|
8084
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8085
|
+
StyledLabel2,
|
|
8036
8086
|
{
|
|
8037
8087
|
renderAs: "dt",
|
|
8038
8088
|
variant: "heading6",
|
|
8039
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8089
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledLoadingLabel, {}) : label
|
|
8040
8090
|
}
|
|
8041
8091
|
),
|
|
8042
|
-
/* @__PURE__ */ (0,
|
|
8092
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8043
8093
|
StyledValue,
|
|
8044
8094
|
{
|
|
8045
8095
|
renderAs: "dd",
|
|
8046
8096
|
variant: "heading3",
|
|
8047
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
8097
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledLoadingValue, {}) : value
|
|
8048
8098
|
}
|
|
8049
8099
|
),
|
|
8050
|
-
(0,
|
|
8051
|
-
(0,
|
|
8100
|
+
(0, import_type_guards25.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
8101
|
+
(0, import_type_guards25.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8052
8102
|
]
|
|
8053
8103
|
}
|
|
8054
8104
|
);
|
|
8055
8105
|
DataCard.displayName = "DataCard";
|
|
8056
8106
|
|
|
8057
8107
|
// src/components/DataCards/DataCards.tsx
|
|
8058
|
-
var
|
|
8059
|
-
var
|
|
8060
|
-
var StyledDataCards = (0,
|
|
8108
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8109
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8110
|
+
var StyledDataCards = (0, import_styled_components39.default)(Box)`
|
|
8061
8111
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8062
8112
|
margin-top: 0; /* Remove default <dl> style */
|
|
8063
8113
|
> * {
|
|
@@ -8071,7 +8121,7 @@ var DataCards = ({
|
|
|
8071
8121
|
colorScheme = "inherit",
|
|
8072
8122
|
...props
|
|
8073
8123
|
}) => {
|
|
8074
|
-
return /* @__PURE__ */ (0,
|
|
8124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8075
8125
|
StyledDataCards,
|
|
8076
8126
|
{
|
|
8077
8127
|
...props,
|
|
@@ -8089,25 +8139,25 @@ var DataCards = ({
|
|
|
8089
8139
|
DataCards.displayName = "DataCards";
|
|
8090
8140
|
|
|
8091
8141
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8092
|
-
var
|
|
8142
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8093
8143
|
|
|
8094
8144
|
// src/components/Text/Text.tsx
|
|
8095
8145
|
var import_react22 = require("react");
|
|
8096
|
-
var
|
|
8097
|
-
var
|
|
8098
|
-
var bodyBoldStyles =
|
|
8146
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8147
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8148
|
+
var bodyBoldStyles = import_styled_components40.css`
|
|
8099
8149
|
> strong,
|
|
8100
8150
|
b {
|
|
8101
8151
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8102
8152
|
}
|
|
8103
8153
|
`;
|
|
8104
|
-
var labelBoldStyles =
|
|
8154
|
+
var labelBoldStyles = import_styled_components40.css`
|
|
8105
8155
|
> strong,
|
|
8106
8156
|
b {
|
|
8107
8157
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8108
8158
|
}
|
|
8109
8159
|
`;
|
|
8110
|
-
var body1TextStyle =
|
|
8160
|
+
var body1TextStyle = import_styled_components40.css`
|
|
8111
8161
|
--font-family: var(--wui-typography-body-1-family);
|
|
8112
8162
|
--font-size: var(--wui-typography-body-1-size);
|
|
8113
8163
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8115,7 +8165,7 @@ var body1TextStyle = import_styled_components39.css`
|
|
|
8115
8165
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8116
8166
|
${bodyBoldStyles}
|
|
8117
8167
|
`;
|
|
8118
|
-
var body2TextStyle =
|
|
8168
|
+
var body2TextStyle = import_styled_components40.css`
|
|
8119
8169
|
--font-family: var(--wui-typography-body-2-family);
|
|
8120
8170
|
--font-size: var(--wui-typography-body-2-size);
|
|
8121
8171
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8123,7 +8173,7 @@ var body2TextStyle = import_styled_components39.css`
|
|
|
8123
8173
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8124
8174
|
${bodyBoldStyles}
|
|
8125
8175
|
`;
|
|
8126
|
-
var body3TextStyle =
|
|
8176
|
+
var body3TextStyle = import_styled_components40.css`
|
|
8127
8177
|
--font-family: var(--wui-typography-body-3-family);
|
|
8128
8178
|
--font-size: var(--wui-typography-body-3-size);
|
|
8129
8179
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8131,7 +8181,7 @@ var body3TextStyle = import_styled_components39.css`
|
|
|
8131
8181
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8132
8182
|
${bodyBoldStyles}
|
|
8133
8183
|
`;
|
|
8134
|
-
var body4TextStyle =
|
|
8184
|
+
var body4TextStyle = import_styled_components40.css`
|
|
8135
8185
|
--font-family: var(--wui-typography-body-4-family);
|
|
8136
8186
|
--font-size: var(--wui-typography-body-4-size);
|
|
8137
8187
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8139,47 +8189,47 @@ var body4TextStyle = import_styled_components39.css`
|
|
|
8139
8189
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8140
8190
|
${bodyBoldStyles}
|
|
8141
8191
|
`;
|
|
8142
|
-
var label1TextStyle =
|
|
8192
|
+
var label1TextStyle = import_styled_components40.css`
|
|
8143
8193
|
--font-family: var(--wui-typography-label-1-family);
|
|
8144
8194
|
--font-size: var(--wui-typography-label-1-size);
|
|
8145
8195
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8146
8196
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8147
8197
|
${labelBoldStyles}
|
|
8148
8198
|
`;
|
|
8149
|
-
var label2TextStyle =
|
|
8199
|
+
var label2TextStyle = import_styled_components40.css`
|
|
8150
8200
|
--font-family: var(--wui-typography-label-2-family);
|
|
8151
8201
|
--font-size: var(--wui-typography-label-2-size);
|
|
8152
8202
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8153
8203
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8154
8204
|
${labelBoldStyles}
|
|
8155
8205
|
`;
|
|
8156
|
-
var label3TextStyle =
|
|
8206
|
+
var label3TextStyle = import_styled_components40.css`
|
|
8157
8207
|
--font-family: var(--wui-typography-label-3-family);
|
|
8158
8208
|
--font-size: var(--wui-typography-label-3-size);
|
|
8159
8209
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8160
8210
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8161
8211
|
${labelBoldStyles}
|
|
8162
8212
|
`;
|
|
8163
|
-
var label4TextStyle =
|
|
8213
|
+
var label4TextStyle = import_styled_components40.css`
|
|
8164
8214
|
--font-family: var(--wui-typography-label-4-family);
|
|
8165
8215
|
--font-size: var(--wui-typography-label-4-size);
|
|
8166
8216
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8167
8217
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8168
8218
|
${labelBoldStyles}
|
|
8169
8219
|
`;
|
|
8170
|
-
var body1MonoTextStyle =
|
|
8220
|
+
var body1MonoTextStyle = import_styled_components40.css`
|
|
8171
8221
|
${body1TextStyle};
|
|
8172
8222
|
--font-family: var(--wui-typography-family-mono);
|
|
8173
8223
|
`;
|
|
8174
|
-
var body2MonoTextStyle =
|
|
8224
|
+
var body2MonoTextStyle = import_styled_components40.css`
|
|
8175
8225
|
${body2TextStyle};
|
|
8176
8226
|
--font-family: var(--wui-typography-family-mono);
|
|
8177
8227
|
`;
|
|
8178
|
-
var body3MonoTextStyle =
|
|
8228
|
+
var body3MonoTextStyle = import_styled_components40.css`
|
|
8179
8229
|
${body3TextStyle};
|
|
8180
8230
|
--font-family: var(--wui-typography-family-mono);
|
|
8181
8231
|
`;
|
|
8182
|
-
var body4MonoTextStyle =
|
|
8232
|
+
var body4MonoTextStyle = import_styled_components40.css`
|
|
8183
8233
|
${body4TextStyle};
|
|
8184
8234
|
--font-family: var(--wui-typography-family-mono);
|
|
8185
8235
|
`;
|
|
@@ -8214,7 +8264,7 @@ var variantElementMap2 = {
|
|
|
8214
8264
|
label3: labelElement,
|
|
8215
8265
|
label4: labelElement
|
|
8216
8266
|
};
|
|
8217
|
-
var StyledText =
|
|
8267
|
+
var StyledText = import_styled_components40.default.div`
|
|
8218
8268
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8219
8269
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8220
8270
|
if ($disabled) {
|
|
@@ -8238,19 +8288,19 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8238
8288
|
margin: 0;
|
|
8239
8289
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8240
8290
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8241
|
-
${({ $inline }) => $inline &&
|
|
8291
|
+
${({ $inline }) => $inline && import_styled_components40.css`
|
|
8242
8292
|
display: inline-block;
|
|
8243
8293
|
`}
|
|
8244
|
-
${({ $disabled }) => $disabled &&
|
|
8294
|
+
${({ $disabled }) => $disabled && import_styled_components40.css`
|
|
8245
8295
|
--text-color: var(--wui-color-text-disabled);
|
|
8246
8296
|
`}
|
|
8247
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8297
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components40.css`
|
|
8248
8298
|
user-select: none;
|
|
8249
8299
|
`}
|
|
8250
|
-
${({ $align }) =>
|
|
8300
|
+
${({ $align }) => import_styled_components40.css`
|
|
8251
8301
|
text-align: ${$align};
|
|
8252
8302
|
`}
|
|
8253
|
-
${({ as }) => as === "p" &&
|
|
8303
|
+
${({ as }) => as === "p" && import_styled_components40.css`
|
|
8254
8304
|
display: block;
|
|
8255
8305
|
|
|
8256
8306
|
+ p {
|
|
@@ -8271,7 +8321,7 @@ var TextComponent = (0, import_react22.forwardRef)(
|
|
|
8271
8321
|
renderAs,
|
|
8272
8322
|
...otherProps
|
|
8273
8323
|
}, ref) => {
|
|
8274
|
-
return /* @__PURE__ */ (0,
|
|
8324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
8275
8325
|
StyledText,
|
|
8276
8326
|
{
|
|
8277
8327
|
ref,
|
|
@@ -8293,8 +8343,8 @@ TextComponent.displayName = "Text";
|
|
|
8293
8343
|
var Text = makePolymorphic(TextComponent);
|
|
8294
8344
|
|
|
8295
8345
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8296
|
-
var
|
|
8297
|
-
var StyledDataCardTrend =
|
|
8346
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8347
|
+
var StyledDataCardTrend = import_styled_components41.default.div`
|
|
8298
8348
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8299
8349
|
background: var(--wui-color-bg-app);
|
|
8300
8350
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8309,8 +8359,8 @@ var DataCardTrend = ({
|
|
|
8309
8359
|
children,
|
|
8310
8360
|
...props
|
|
8311
8361
|
}) => {
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8313
|
-
/* @__PURE__ */ (0,
|
|
8362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
8363
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
8314
8364
|
Icon,
|
|
8315
8365
|
{
|
|
8316
8366
|
size: "md",
|
|
@@ -8318,7 +8368,7 @@ var DataCardTrend = ({
|
|
|
8318
8368
|
...props
|
|
8319
8369
|
}
|
|
8320
8370
|
),
|
|
8321
|
-
/* @__PURE__ */ (0,
|
|
8371
|
+
/* @__PURE__ */ (0, import_jsx_runtime210.jsx)(
|
|
8322
8372
|
Text,
|
|
8323
8373
|
{
|
|
8324
8374
|
prominence: "secondary",
|
|
@@ -8330,22 +8380,22 @@ var DataCardTrend = ({
|
|
|
8330
8380
|
};
|
|
8331
8381
|
|
|
8332
8382
|
// src/components/Divider/Divider.tsx
|
|
8333
|
-
var
|
|
8334
|
-
var
|
|
8335
|
-
var horizontalBorderCss =
|
|
8383
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8384
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8385
|
+
var horizontalBorderCss = import_styled_components42.css`
|
|
8336
8386
|
border-top-color: var(--wui-color-border);
|
|
8337
8387
|
border-top-style: solid;
|
|
8338
8388
|
border-top-width: 1px;
|
|
8339
8389
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8340
8390
|
height: 0;
|
|
8341
8391
|
`;
|
|
8342
|
-
var verticalBorderCss =
|
|
8392
|
+
var verticalBorderCss = import_styled_components42.css`
|
|
8343
8393
|
background-color: var(--wui-color-border);
|
|
8344
8394
|
max-width: 1px;
|
|
8345
8395
|
min-height: 100%;
|
|
8346
8396
|
width: 1px;
|
|
8347
8397
|
`;
|
|
8348
|
-
var DividerComponent =
|
|
8398
|
+
var DividerComponent = import_styled_components42.default.div`
|
|
8349
8399
|
${({ $orientation }) => {
|
|
8350
8400
|
switch ($orientation) {
|
|
8351
8401
|
case "vertical":
|
|
@@ -8360,7 +8410,7 @@ var Divider = ({
|
|
|
8360
8410
|
orientation = "horizontal",
|
|
8361
8411
|
...otherProps
|
|
8362
8412
|
}) => {
|
|
8363
|
-
return /* @__PURE__ */ (0,
|
|
8413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
8364
8414
|
DividerComponent,
|
|
8365
8415
|
{
|
|
8366
8416
|
$orientation: orientation,
|
|
@@ -8376,28 +8426,6 @@ Divider.displayName = "Divider";
|
|
|
8376
8426
|
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8377
8427
|
var import_react24 = require("react");
|
|
8378
8428
|
|
|
8379
|
-
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8380
|
-
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8381
|
-
var import_type_guards24 = require("@wistia/type-guards");
|
|
8382
|
-
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8383
|
-
var VisuallyHidden = import_styled_components42.default.div({ ...visuallyHiddenStyle });
|
|
8384
|
-
var VisuallyHiddenButFocusable = import_styled_components42.default.div({
|
|
8385
|
-
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8386
|
-
});
|
|
8387
|
-
var ScreenReaderOnly = ({
|
|
8388
|
-
text,
|
|
8389
|
-
children,
|
|
8390
|
-
focusable = false,
|
|
8391
|
-
...otherProps
|
|
8392
|
-
}) => {
|
|
8393
|
-
const accessibleText = (0, import_type_guards24.isNotNil)(text) ? text : children;
|
|
8394
|
-
if (focusable) {
|
|
8395
|
-
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
8396
|
-
}
|
|
8397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
8398
|
-
};
|
|
8399
|
-
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
8400
|
-
|
|
8401
8429
|
// src/components/Tooltip/Tooltip.tsx
|
|
8402
8430
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8403
8431
|
var import_styled_components43 = __toESM(require("styled-components"));
|
|
@@ -8507,7 +8535,7 @@ Tooltip.displayName = "Tooltip";
|
|
|
8507
8535
|
// src/components/Input/Input.tsx
|
|
8508
8536
|
var import_react23 = require("react");
|
|
8509
8537
|
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8510
|
-
var
|
|
8538
|
+
var import_type_guards26 = require("@wistia/type-guards");
|
|
8511
8539
|
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8512
8540
|
var inputStyles = import_styled_components44.css`
|
|
8513
8541
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
@@ -8607,27 +8635,27 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8607
8635
|
const internalRef = (0, import_react23.useRef)();
|
|
8608
8636
|
const ref = (
|
|
8609
8637
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
8610
|
-
(0,
|
|
8638
|
+
(0, import_type_guards26.isNotNil)(externalRef) && (0, import_type_guards26.isRecord)(externalRef) && "current" in externalRef ? externalRef : internalRef
|
|
8611
8639
|
);
|
|
8612
8640
|
let leftIconToDisplay = leftIcon;
|
|
8613
|
-
if ((0,
|
|
8641
|
+
if ((0, import_type_guards26.isNil)(leftIcon) && type === "search") {
|
|
8614
8642
|
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(Icon, { type: "search" });
|
|
8615
8643
|
}
|
|
8616
|
-
if ((0,
|
|
8644
|
+
if ((0, import_type_guards26.isNotNil)(leftIconToDisplay)) {
|
|
8617
8645
|
leftIconToDisplay = (0, import_react23.cloneElement)(leftIconToDisplay, {
|
|
8618
8646
|
size: "md",
|
|
8619
8647
|
className: "wui-input-left-icon"
|
|
8620
8648
|
});
|
|
8621
8649
|
}
|
|
8622
8650
|
let rightIconToDisplay = rightIcon;
|
|
8623
|
-
if ((0,
|
|
8651
|
+
if ((0, import_type_guards26.isNotNil)(rightIconToDisplay)) {
|
|
8624
8652
|
rightIconToDisplay = (0, import_react23.cloneElement)(rightIconToDisplay, {
|
|
8625
8653
|
size: "md",
|
|
8626
8654
|
className: "wui-input-right-icon"
|
|
8627
8655
|
});
|
|
8628
8656
|
}
|
|
8629
8657
|
const handleFocus = (event) => {
|
|
8630
|
-
if ((0,
|
|
8658
|
+
if ((0, import_type_guards26.isNotNil)(props.onFocus)) {
|
|
8631
8659
|
props.onFocus(event);
|
|
8632
8660
|
}
|
|
8633
8661
|
if (autoSelect && isValidRef(ref) && "current" in ref) {
|
|
@@ -8808,7 +8836,7 @@ var EditableHeading = ({
|
|
|
8808
8836
|
// src/components/Form/Form.tsx
|
|
8809
8837
|
var import_react26 = require("react");
|
|
8810
8838
|
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8811
|
-
var
|
|
8839
|
+
var import_type_guards27 = require("@wistia/type-guards");
|
|
8812
8840
|
|
|
8813
8841
|
// src/components/Stack/Stack.tsx
|
|
8814
8842
|
var import_react25 = require("react");
|
|
@@ -8874,7 +8902,7 @@ var FormComponent = ({
|
|
|
8874
8902
|
const id = props.id ?? autoId;
|
|
8875
8903
|
const handleValidate = (nextFormData) => {
|
|
8876
8904
|
const nextData = Object.fromEntries(nextFormData.entries());
|
|
8877
|
-
if ((0,
|
|
8905
|
+
if ((0, import_type_guards27.isUndefined)(validate)) {
|
|
8878
8906
|
return {};
|
|
8879
8907
|
}
|
|
8880
8908
|
return validate(nextData);
|
|
@@ -8884,7 +8912,7 @@ var FormComponent = ({
|
|
|
8884
8912
|
props.onBlur(event);
|
|
8885
8913
|
}
|
|
8886
8914
|
const formData = new FormData(event.currentTarget);
|
|
8887
|
-
if ((0,
|
|
8915
|
+
if ((0, import_type_guards27.isNotUndefined)(validate)) {
|
|
8888
8916
|
handleValidate(formData);
|
|
8889
8917
|
}
|
|
8890
8918
|
};
|
|
@@ -8981,7 +9009,7 @@ var useFormState = (action, initialData = {}) => {
|
|
|
8981
9009
|
|
|
8982
9010
|
// src/components/Form/FormErrorSummary.tsx
|
|
8983
9011
|
var import_react28 = require("react");
|
|
8984
|
-
var
|
|
9012
|
+
var import_type_guards28 = require("@wistia/type-guards");
|
|
8985
9013
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
8986
9014
|
var ErrorItem = ({ name, error, formId }) => {
|
|
8987
9015
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
@@ -8995,8 +9023,8 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8995
9023
|
}
|
|
8996
9024
|
return /* @__PURE__ */ (0, import_jsx_runtime217.jsxs)("div", { ref, children: [
|
|
8997
9025
|
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("p", { children: description }),
|
|
8998
|
-
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0,
|
|
8999
|
-
([name, error]) => (0,
|
|
9026
|
+
/* @__PURE__ */ (0, import_jsx_runtime217.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards28.isNotUndefined)(error)).map(
|
|
9027
|
+
([name, error]) => (0, import_type_guards28.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
9000
9028
|
ErrorItem,
|
|
9001
9029
|
{
|
|
9002
9030
|
error: err,
|
|
@@ -9019,32 +9047,92 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9019
9047
|
|
|
9020
9048
|
// src/components/FormField/FormField.tsx
|
|
9021
9049
|
var import_react31 = require("react");
|
|
9022
|
-
var
|
|
9023
|
-
var
|
|
9050
|
+
var import_styled_components50 = __toESM(require("styled-components"));
|
|
9051
|
+
var import_type_guards29 = require("@wistia/type-guards");
|
|
9052
|
+
|
|
9053
|
+
// src/components/Label/Label.tsx
|
|
9054
|
+
var import_styled_components48 = __toESM(require("styled-components"));
|
|
9055
|
+
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
9056
|
+
var requiredStyle = import_styled_components48.css`
|
|
9057
|
+
&::after {
|
|
9058
|
+
color: var(--wui-color-text-error);
|
|
9059
|
+
display: inline;
|
|
9060
|
+
padding-left: var(--wui-space-01);
|
|
9061
|
+
content: '*';
|
|
9062
|
+
}
|
|
9063
|
+
`;
|
|
9064
|
+
var disabledStyle4 = import_styled_components48.css`
|
|
9065
|
+
color: var(--wui-color-text-disabled);
|
|
9066
|
+
`;
|
|
9067
|
+
var StyledLabel3 = import_styled_components48.default.label`
|
|
9068
|
+
display: block;
|
|
9069
|
+
width: 100%;
|
|
9070
|
+
color: var(--wui-color-text);
|
|
9071
|
+
font-family: var(--wui-typography-heading-6-family);
|
|
9072
|
+
line-height: var(--wui-typography-heading-6-line-height);
|
|
9073
|
+
font-size: var(--wui-typography-heading-6-size);
|
|
9074
|
+
font-weight: var(--wui-typography-heading-6-weight);
|
|
9075
|
+
|
|
9076
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
9077
|
+
> input,
|
|
9078
|
+
> textarea,
|
|
9079
|
+
> select {
|
|
9080
|
+
display: block;
|
|
9081
|
+
}
|
|
9082
|
+
|
|
9083
|
+
> label {
|
|
9084
|
+
font-weight: normal;
|
|
9085
|
+
}
|
|
9086
|
+
|
|
9087
|
+
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
9088
|
+
${({ $disabled }) => $disabled && disabledStyle4}
|
|
9089
|
+
${({ $required }) => $required && requiredStyle}
|
|
9090
|
+
`;
|
|
9091
|
+
var Label = ({
|
|
9092
|
+
children,
|
|
9093
|
+
disabled = false,
|
|
9094
|
+
htmlFor,
|
|
9095
|
+
required = false,
|
|
9096
|
+
screenReaderOnly = false,
|
|
9097
|
+
...otherProps
|
|
9098
|
+
}) => {
|
|
9099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(
|
|
9100
|
+
StyledLabel3,
|
|
9101
|
+
{
|
|
9102
|
+
...otherProps,
|
|
9103
|
+
$disabled: disabled,
|
|
9104
|
+
$required: required,
|
|
9105
|
+
$screenReaderOnly: screenReaderOnly,
|
|
9106
|
+
htmlFor,
|
|
9107
|
+
children
|
|
9108
|
+
}
|
|
9109
|
+
);
|
|
9110
|
+
};
|
|
9111
|
+
Label.displayName = "Label";
|
|
9024
9112
|
|
|
9025
9113
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9026
9114
|
var import_react30 = require("react");
|
|
9027
9115
|
|
|
9028
9116
|
// src/components/FormGroup/FormGroup.tsx
|
|
9029
|
-
var
|
|
9117
|
+
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9030
9118
|
var import_react29 = require("react");
|
|
9031
|
-
var
|
|
9032
|
-
var StyledFieldset =
|
|
9119
|
+
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
9120
|
+
var StyledFieldset = import_styled_components49.default.fieldset`
|
|
9033
9121
|
border: 0;
|
|
9034
9122
|
`;
|
|
9035
|
-
var StyledLegend =
|
|
9123
|
+
var StyledLegend = import_styled_components49.default.legend`
|
|
9036
9124
|
margin-bottom: var(--space-01);
|
|
9037
9125
|
`;
|
|
9038
9126
|
var FormGroup = ({ children, label, ...props }) => {
|
|
9039
9127
|
const ref = (0, import_react29.useRef)();
|
|
9040
|
-
return /* @__PURE__ */ (0,
|
|
9128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsxs)(
|
|
9041
9129
|
Stack,
|
|
9042
9130
|
{
|
|
9043
9131
|
...props,
|
|
9044
9132
|
ref,
|
|
9045
9133
|
renderAs: StyledFieldset,
|
|
9046
9134
|
children: [
|
|
9047
|
-
/* @__PURE__ */ (0,
|
|
9135
|
+
/* @__PURE__ */ (0, import_jsx_runtime219.jsx)(
|
|
9048
9136
|
Heading,
|
|
9049
9137
|
{
|
|
9050
9138
|
renderAs: StyledLegend,
|
|
@@ -9060,7 +9148,7 @@ var FormGroup = ({ children, label, ...props }) => {
|
|
|
9060
9148
|
FormGroup.displayName = "FormGroup";
|
|
9061
9149
|
|
|
9062
9150
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9063
|
-
var
|
|
9151
|
+
var import_jsx_runtime220 = require("react/jsx-runtime");
|
|
9064
9152
|
var CheckboxGroupContext = (0, import_react30.createContext)(null);
|
|
9065
9153
|
var CheckboxGroup = ({
|
|
9066
9154
|
children,
|
|
@@ -9075,13 +9163,13 @@ var CheckboxGroup = ({
|
|
|
9075
9163
|
onChange
|
|
9076
9164
|
};
|
|
9077
9165
|
}, [name, onChange]);
|
|
9078
|
-
return /* @__PURE__ */ (0,
|
|
9166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(FormGroup, { ...props, children }) });
|
|
9079
9167
|
};
|
|
9080
9168
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
9081
9169
|
|
|
9082
9170
|
// src/components/FormField/FormField.tsx
|
|
9083
|
-
var
|
|
9084
|
-
var StyledFormField =
|
|
9171
|
+
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
9172
|
+
var StyledFormField = import_styled_components50.default.div`
|
|
9085
9173
|
--form-field-spacing: var(--wui-space-01);
|
|
9086
9174
|
--form-field-spacing-inline: var(--wui-space-02);
|
|
9087
9175
|
--form-field-error-color: var(--wui-color-text-secondary-error);
|
|
@@ -9105,7 +9193,7 @@ var StyledFormField = import_styled_components49.default.div`
|
|
|
9105
9193
|
grid-template-rows: 1fr;
|
|
9106
9194
|
}
|
|
9107
9195
|
`;
|
|
9108
|
-
var StyledErrorList =
|
|
9196
|
+
var StyledErrorList = import_styled_components50.default.ul`
|
|
9109
9197
|
margin: 0;
|
|
9110
9198
|
padding: 0;
|
|
9111
9199
|
padding-left: var(--wui-space-04);
|
|
@@ -9114,8 +9202,8 @@ var StyledErrorList = import_styled_components49.default.ul`
|
|
|
9114
9202
|
gap: var(--wui-space-01);
|
|
9115
9203
|
`;
|
|
9116
9204
|
var ErrorMessages = ({ errors, id }) => {
|
|
9117
|
-
const isMultipleErrors = (0,
|
|
9118
|
-
return isMultipleErrors ? /* @__PURE__ */ (0,
|
|
9205
|
+
const isMultipleErrors = (0, import_type_guards29.isArray)(errors);
|
|
9206
|
+
return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9119
9207
|
Text,
|
|
9120
9208
|
{
|
|
9121
9209
|
colorScheme: "error",
|
|
@@ -9125,7 +9213,7 @@ var ErrorMessages = ({ errors, id }) => {
|
|
|
9125
9213
|
children: error
|
|
9126
9214
|
},
|
|
9127
9215
|
`${id}-${index}`
|
|
9128
|
-
)) }) : /* @__PURE__ */ (0,
|
|
9216
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9129
9217
|
Text,
|
|
9130
9218
|
{
|
|
9131
9219
|
colorScheme: "error",
|
|
@@ -9159,19 +9247,19 @@ var FormField = ({
|
|
|
9159
9247
|
label: isIntegratedLabel ? label : void 0,
|
|
9160
9248
|
...props
|
|
9161
9249
|
};
|
|
9162
|
-
if ((0,
|
|
9250
|
+
if ((0, import_type_guards29.isUndefined)(value) && (0, import_type_guards29.isNotUndefined)(defaultValue)) {
|
|
9163
9251
|
childProps = {
|
|
9164
9252
|
...childProps,
|
|
9165
9253
|
defaultValue
|
|
9166
9254
|
};
|
|
9167
9255
|
}
|
|
9168
|
-
if ((0,
|
|
9169
|
-
const computedName = (0,
|
|
9256
|
+
if ((0, import_type_guards29.isNotNil)(checkboxGroup)) {
|
|
9257
|
+
const computedName = (0, import_type_guards29.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
|
|
9170
9258
|
const handleChange = (event) => {
|
|
9171
|
-
if ((0,
|
|
9259
|
+
if ((0, import_type_guards29.isNotUndefined)(props.onChange)) {
|
|
9172
9260
|
props.onChange(event);
|
|
9173
9261
|
}
|
|
9174
|
-
if ((0,
|
|
9262
|
+
if ((0, import_type_guards29.isNotUndefined)(checkboxGroup.onChange)) {
|
|
9175
9263
|
checkboxGroup.onChange(event);
|
|
9176
9264
|
}
|
|
9177
9265
|
};
|
|
@@ -9179,22 +9267,22 @@ var FormField = ({
|
|
|
9179
9267
|
...childProps,
|
|
9180
9268
|
name: computedName,
|
|
9181
9269
|
onChange: handleChange,
|
|
9182
|
-
"aria-invalid": (0,
|
|
9183
|
-
"aria-describedby": (0,
|
|
9270
|
+
"aria-invalid": (0, import_type_guards29.isNotNil)(error),
|
|
9271
|
+
"aria-describedby": (0, import_type_guards29.isNotNil)(error) ? `${computedId}-error` : void 0
|
|
9184
9272
|
};
|
|
9185
9273
|
}
|
|
9186
9274
|
import_react31.Children.only(children);
|
|
9187
|
-
return /* @__PURE__ */ (0,
|
|
9275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
9188
9276
|
StyledFormField,
|
|
9189
9277
|
{
|
|
9190
9278
|
...props,
|
|
9191
9279
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
9192
9280
|
children: [
|
|
9193
|
-
!isIntegratedLabel && /* @__PURE__ */ (0,
|
|
9281
|
+
!isIntegratedLabel && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(Label, { htmlFor: computedId, children: label }),
|
|
9194
9282
|
(0, import_react31.cloneElement)(children, childProps),
|
|
9195
|
-
(0,
|
|
9196
|
-
/* @__PURE__ */ (0,
|
|
9197
|
-
/* @__PURE__ */ (0,
|
|
9283
|
+
(0, import_type_guards29.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(import_jsx_runtime221.Fragment, { children: [
|
|
9284
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)("div", {}),
|
|
9285
|
+
/* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
9198
9286
|
ErrorMessages,
|
|
9199
9287
|
{
|
|
9200
9288
|
errors: computedError,
|
|
@@ -9210,7 +9298,7 @@ FormField.displayName = "FormField";
|
|
|
9210
9298
|
|
|
9211
9299
|
// src/components/FormGroup/RadioGroup.tsx
|
|
9212
9300
|
var import_react32 = require("react");
|
|
9213
|
-
var
|
|
9301
|
+
var import_jsx_runtime222 = require("react/jsx-runtime");
|
|
9214
9302
|
var RadioGroupContext = (0, import_react32.createContext)(null);
|
|
9215
9303
|
var RadioGroup = ({
|
|
9216
9304
|
children,
|
|
@@ -9225,15 +9313,15 @@ var RadioGroup = ({
|
|
|
9225
9313
|
onChange
|
|
9226
9314
|
};
|
|
9227
9315
|
}, [name, onChange]);
|
|
9228
|
-
return /* @__PURE__ */ (0,
|
|
9316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(FormGroup, { ...props, children }) });
|
|
9229
9317
|
};
|
|
9230
9318
|
RadioGroup.displayName = "RadioGroup";
|
|
9231
9319
|
|
|
9232
9320
|
// src/components/IconButton/IconButton.tsx
|
|
9233
9321
|
var import_react33 = require("react");
|
|
9234
|
-
var
|
|
9235
|
-
var
|
|
9236
|
-
var StyledButton2 = (0,
|
|
9322
|
+
var import_styled_components51 = __toESM(require("styled-components"));
|
|
9323
|
+
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
9324
|
+
var StyledButton2 = (0, import_styled_components51.default)(Button)`
|
|
9237
9325
|
--icon-button-size-sm: 24px;
|
|
9238
9326
|
--icon-button-size-md: 32px;
|
|
9239
9327
|
--icon-button-size-lg: 40px;
|
|
@@ -9250,7 +9338,7 @@ var StyledButton2 = (0, import_styled_components50.default)(Button)`
|
|
|
9250
9338
|
var IconButton = (0, import_react33.forwardRef)(
|
|
9251
9339
|
({ children, label, size = "md", ...props }, ref) => {
|
|
9252
9340
|
const responsiveSize = useResponsiveProp(size);
|
|
9253
|
-
return /* @__PURE__ */ (0,
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime223.jsx)(
|
|
9254
9342
|
StyledButton2,
|
|
9255
9343
|
{
|
|
9256
9344
|
...props,
|
|
@@ -9268,9 +9356,9 @@ var IconButton = (0, import_react33.forwardRef)(
|
|
|
9268
9356
|
IconButton.displayName = "IconButton";
|
|
9269
9357
|
|
|
9270
9358
|
// src/components/Image/Image.tsx
|
|
9271
|
-
var
|
|
9272
|
-
var
|
|
9273
|
-
var
|
|
9359
|
+
var import_styled_components52 = __toESM(require("styled-components"));
|
|
9360
|
+
var import_type_guards30 = require("@wistia/type-guards");
|
|
9361
|
+
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
9274
9362
|
var getFillStyle2 = (fillContainer) => {
|
|
9275
9363
|
if (fillContainer === "horizontal") {
|
|
9276
9364
|
return "width: 100%;";
|
|
@@ -9286,8 +9374,8 @@ var getFillStyle2 = (fillContainer) => {
|
|
|
9286
9374
|
}
|
|
9287
9375
|
return void 0;
|
|
9288
9376
|
};
|
|
9289
|
-
var StyledImage =
|
|
9290
|
-
border-radius: ${({ $borderRadius }) => (0,
|
|
9377
|
+
var StyledImage = import_styled_components52.default.img`
|
|
9378
|
+
border-radius: ${({ $borderRadius }) => (0, import_type_guards30.isNotNil)($borderRadius) ? `var(--wui-${$borderRadius})` : void 0};
|
|
9291
9379
|
${({ $fillContainer }) => getFillStyle2($fillContainer)};
|
|
9292
9380
|
object-fit: ${({ $objFit }) => $objFit};
|
|
9293
9381
|
object-position: ${({ $objPosition }) => $objPosition};
|
|
@@ -9301,7 +9389,7 @@ var Image = ({
|
|
|
9301
9389
|
loading = "lazy",
|
|
9302
9390
|
position: objPosition,
|
|
9303
9391
|
...otherProps
|
|
9304
|
-
}) => /* @__PURE__ */ (0,
|
|
9392
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime224.jsx)(
|
|
9305
9393
|
StyledImage,
|
|
9306
9394
|
{
|
|
9307
9395
|
$borderRadius: borderRadius,
|
|
@@ -9317,9 +9405,9 @@ var Image = ({
|
|
|
9317
9405
|
Image.displayName = "Image";
|
|
9318
9406
|
|
|
9319
9407
|
// src/components/Menu/Menu.tsx
|
|
9320
|
-
var
|
|
9408
|
+
var import_styled_components53 = __toESM(require("styled-components"));
|
|
9321
9409
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
9322
|
-
var
|
|
9410
|
+
var import_type_guards31 = require("@wistia/type-guards");
|
|
9323
9411
|
var import_react35 = require("react");
|
|
9324
9412
|
|
|
9325
9413
|
// src/components/Menu/MenuContext.tsx
|
|
@@ -9328,8 +9416,8 @@ var MenuContext = (0, import_react34.createContext)({ compact: false });
|
|
|
9328
9416
|
var useMenuContext = () => (0, import_react34.useContext)(MenuContext);
|
|
9329
9417
|
|
|
9330
9418
|
// src/components/Menu/Menu.tsx
|
|
9331
|
-
var
|
|
9332
|
-
var open =
|
|
9419
|
+
var import_jsx_runtime225 = require("react/jsx-runtime");
|
|
9420
|
+
var open = import_styled_components53.keyframes`
|
|
9333
9421
|
from {
|
|
9334
9422
|
opacity: 0;
|
|
9335
9423
|
transform: scale(.97) translateY(-8px);
|
|
@@ -9339,7 +9427,7 @@ var open = import_styled_components52.keyframes`
|
|
|
9339
9427
|
transform: scale(1);
|
|
9340
9428
|
}
|
|
9341
9429
|
`;
|
|
9342
|
-
var close =
|
|
9430
|
+
var close = import_styled_components53.keyframes`
|
|
9343
9431
|
from {
|
|
9344
9432
|
opacity: 1;
|
|
9345
9433
|
transform: scale(1);
|
|
@@ -9349,7 +9437,7 @@ var close = import_styled_components52.keyframes`
|
|
|
9349
9437
|
transform: scale(.97) translateY(-8px);
|
|
9350
9438
|
}
|
|
9351
9439
|
`;
|
|
9352
|
-
var menuItemCss =
|
|
9440
|
+
var menuItemCss = import_styled_components53.css`
|
|
9353
9441
|
--menu-label-description-gap: var(--wui-space-01);
|
|
9354
9442
|
--menu-item-inner-gap: var(--wui-space-03);
|
|
9355
9443
|
--menu-item-left-icon-size: 24px;
|
|
@@ -9360,7 +9448,7 @@ var menuItemCss = import_styled_components52.css`
|
|
|
9360
9448
|
--menu-label-line-height: var(--wui-typography-label-3-line-height);
|
|
9361
9449
|
--menu-divider-margin: var(--wui-space-02);
|
|
9362
9450
|
`;
|
|
9363
|
-
var compactMenuItemCss =
|
|
9451
|
+
var compactMenuItemCss = import_styled_components53.css`
|
|
9364
9452
|
--menu-label-description-gap: 0;
|
|
9365
9453
|
--menu-item-inner-gap: var(--wui-space-02);
|
|
9366
9454
|
--menu-item-left-icon-size: 16px;
|
|
@@ -9371,7 +9459,7 @@ var compactMenuItemCss = import_styled_components52.css`
|
|
|
9371
9459
|
--menu-label-line-height: var(--wui-typography-label-4-line-height);
|
|
9372
9460
|
--menu-divider-margin: var(--wui-space-01);
|
|
9373
9461
|
`;
|
|
9374
|
-
var menuContentCss =
|
|
9462
|
+
var menuContentCss = import_styled_components53.css`
|
|
9375
9463
|
--menu-font-family: var(--wui-typography-family-default);
|
|
9376
9464
|
--menu-bg: var(--wui-color-bg-surface);
|
|
9377
9465
|
--menu-shadow: var(--wui-elevation-01);
|
|
@@ -9413,7 +9501,7 @@ var menuContentCss = import_styled_components52.css`
|
|
|
9413
9501
|
margin: var(--menu-divider-margin) 0;
|
|
9414
9502
|
}
|
|
9415
9503
|
`;
|
|
9416
|
-
var MenuContent = (0,
|
|
9504
|
+
var MenuContent = (0, import_styled_components53.default)(import_react_dropdown_menu.DropdownMenuContent)`
|
|
9417
9505
|
${menuContentCss}
|
|
9418
9506
|
`;
|
|
9419
9507
|
var Menu = ({
|
|
@@ -9431,7 +9519,7 @@ var Menu = ({
|
|
|
9431
9519
|
}) => {
|
|
9432
9520
|
const contextValue = (0, import_react35.useMemo)(() => ({ compact }), [compact]);
|
|
9433
9521
|
let controlProps = {
|
|
9434
|
-
...(0,
|
|
9522
|
+
...(0, import_type_guards31.isNotNil)(onOpenChange) && (0, import_type_guards31.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
9435
9523
|
};
|
|
9436
9524
|
if (disabled) {
|
|
9437
9525
|
controlProps = {
|
|
@@ -9439,24 +9527,24 @@ var Menu = ({
|
|
|
9439
9527
|
onOpenChange: () => null
|
|
9440
9528
|
};
|
|
9441
9529
|
}
|
|
9442
|
-
return /* @__PURE__ */ (0,
|
|
9530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(MenuContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime225.jsxs)(
|
|
9443
9531
|
import_react_dropdown_menu.DropdownMenu,
|
|
9444
9532
|
{
|
|
9445
9533
|
modal: false,
|
|
9446
9534
|
...controlProps,
|
|
9447
9535
|
children: [
|
|
9448
|
-
/* @__PURE__ */ (0,
|
|
9536
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards31.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
9449
9537
|
Button,
|
|
9450
9538
|
{
|
|
9451
9539
|
"aria-expanded": isOpen,
|
|
9452
9540
|
disabled,
|
|
9453
9541
|
forceState: isOpen ? "active" : void 0,
|
|
9454
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9542
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(Icon, { type: "caret-down" }),
|
|
9455
9543
|
...triggerProps,
|
|
9456
9544
|
children: label
|
|
9457
9545
|
}
|
|
9458
9546
|
) }),
|
|
9459
|
-
/* @__PURE__ */ (0,
|
|
9547
|
+
/* @__PURE__ */ (0, import_jsx_runtime225.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime225.jsx)(
|
|
9460
9548
|
MenuContent,
|
|
9461
9549
|
{
|
|
9462
9550
|
...props,
|
|
@@ -9476,19 +9564,19 @@ var Menu = ({
|
|
|
9476
9564
|
Menu.displayName = "Menu";
|
|
9477
9565
|
|
|
9478
9566
|
// src/components/Menu/MenuLabel.tsx
|
|
9479
|
-
var
|
|
9567
|
+
var import_styled_components54 = __toESM(require("styled-components"));
|
|
9480
9568
|
var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
|
|
9481
|
-
var
|
|
9482
|
-
var StyledMenuLabel = (0,
|
|
9569
|
+
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
9570
|
+
var StyledMenuLabel = (0, import_styled_components54.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
|
|
9483
9571
|
padding: var(--wui-space-02);
|
|
9484
9572
|
`;
|
|
9485
9573
|
var MenuLabel = ({ children, ...props }) => {
|
|
9486
|
-
return /* @__PURE__ */ (0,
|
|
9574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9487
9575
|
StyledMenuLabel,
|
|
9488
9576
|
{
|
|
9489
9577
|
asChild: true,
|
|
9490
9578
|
...props,
|
|
9491
|
-
children: /* @__PURE__ */ (0,
|
|
9579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime226.jsx)(
|
|
9492
9580
|
Heading,
|
|
9493
9581
|
{
|
|
9494
9582
|
renderAs: "span",
|
|
@@ -9504,16 +9592,16 @@ MenuLabel.displayName = "MenuLabel";
|
|
|
9504
9592
|
|
|
9505
9593
|
// src/components/Menu/SubMenu.tsx
|
|
9506
9594
|
var import_react37 = require("react");
|
|
9507
|
-
var
|
|
9595
|
+
var import_styled_components57 = __toESM(require("styled-components"));
|
|
9508
9596
|
var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
|
|
9509
|
-
var
|
|
9597
|
+
var import_type_guards33 = require("@wistia/type-guards");
|
|
9510
9598
|
|
|
9511
9599
|
// src/components/Menu/MenuItemButton.tsx
|
|
9512
9600
|
var import_react36 = require("react");
|
|
9513
|
-
var
|
|
9514
|
-
var
|
|
9515
|
-
var
|
|
9516
|
-
var StyledButton3 = (0,
|
|
9601
|
+
var import_styled_components55 = __toESM(require("styled-components"));
|
|
9602
|
+
var import_type_guards32 = require("@wistia/type-guards");
|
|
9603
|
+
var import_jsx_runtime227 = require("react/jsx-runtime");
|
|
9604
|
+
var StyledButton3 = (0, import_styled_components55.default)(Button)`
|
|
9517
9605
|
${({ colorScheme }) => getColorScheme(colorScheme)};
|
|
9518
9606
|
|
|
9519
9607
|
display: flex;
|
|
@@ -9552,7 +9640,7 @@ var StyledButton3 = (0, import_styled_components54.default)(Button)`
|
|
|
9552
9640
|
padding-left: var(--wui-space-04);
|
|
9553
9641
|
}
|
|
9554
9642
|
`;
|
|
9555
|
-
var StyledLeftIconContainer =
|
|
9643
|
+
var StyledLeftIconContainer = import_styled_components55.default.div`
|
|
9556
9644
|
height: var(--menu-item-left-icon-size);
|
|
9557
9645
|
width: var(--menu-item-left-icon-size);
|
|
9558
9646
|
|
|
@@ -9563,7 +9651,7 @@ var StyledLeftIconContainer = import_styled_components54.default.div`
|
|
|
9563
9651
|
}
|
|
9564
9652
|
}
|
|
9565
9653
|
`;
|
|
9566
|
-
var StyledRightIconContainer =
|
|
9654
|
+
var StyledRightIconContainer = import_styled_components55.default.div`
|
|
9567
9655
|
height: var(--menu-item-right-icon-size);
|
|
9568
9656
|
width: var(--menu-item-right-icon-size);
|
|
9569
9657
|
|
|
@@ -9574,13 +9662,13 @@ var StyledRightIconContainer = import_styled_components54.default.div`
|
|
|
9574
9662
|
}
|
|
9575
9663
|
}
|
|
9576
9664
|
`;
|
|
9577
|
-
var StyledLabelAndDescriptionContainer =
|
|
9665
|
+
var StyledLabelAndDescriptionContainer = import_styled_components55.default.div`
|
|
9578
9666
|
display: flex;
|
|
9579
9667
|
flex-direction: column;
|
|
9580
9668
|
gap: var(--menu-label-description-gap);
|
|
9581
9669
|
flex-basis: 100%;
|
|
9582
9670
|
`;
|
|
9583
|
-
var StyledBadgeContainer =
|
|
9671
|
+
var StyledBadgeContainer = import_styled_components55.default.div`
|
|
9584
9672
|
align-self: start;
|
|
9585
9673
|
justify-self: end;
|
|
9586
9674
|
font-size: var(--wui-typography-label-4-size);
|
|
@@ -9589,13 +9677,13 @@ var StyledBadgeContainer = import_styled_components54.default.div`
|
|
|
9589
9677
|
var MenuItemButton = (0, import_react36.forwardRef)(({ children, appearance, command, icon, ...props }, ref) => {
|
|
9590
9678
|
let { colorScheme, badge } = props;
|
|
9591
9679
|
if (appearance === "dangerous") {
|
|
9592
|
-
if ((0,
|
|
9680
|
+
if ((0, import_type_guards32.isNotUndefined)(colorScheme)) {
|
|
9593
9681
|
console.warn("colorScheme prop is ignored when appearance is dangerous");
|
|
9594
9682
|
}
|
|
9595
9683
|
colorScheme = "error";
|
|
9596
9684
|
}
|
|
9597
9685
|
if (appearance === "gated") {
|
|
9598
|
-
badge = /* @__PURE__ */ (0,
|
|
9686
|
+
badge = /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
9599
9687
|
Icon,
|
|
9600
9688
|
{
|
|
9601
9689
|
colorScheme: "purple",
|
|
@@ -9607,7 +9695,7 @@ var MenuItemButton = (0, import_react36.forwardRef)(({ children, appearance, com
|
|
|
9607
9695
|
}
|
|
9608
9696
|
);
|
|
9609
9697
|
}
|
|
9610
|
-
return /* @__PURE__ */ (0,
|
|
9698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(
|
|
9611
9699
|
StyledButton3,
|
|
9612
9700
|
{
|
|
9613
9701
|
...props,
|
|
@@ -9617,10 +9705,10 @@ var MenuItemButton = (0, import_react36.forwardRef)(({ children, appearance, com
|
|
|
9617
9705
|
fullWidth: true,
|
|
9618
9706
|
unstyled: true,
|
|
9619
9707
|
children: [
|
|
9620
|
-
props.leftIcon ? /* @__PURE__ */ (0,
|
|
9621
|
-
/* @__PURE__ */ (0,
|
|
9622
|
-
(0,
|
|
9623
|
-
props.rightIcon ? /* @__PURE__ */ (0,
|
|
9708
|
+
props.leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledLeftIconContainer, { children: props.leftIcon }) : null,
|
|
9709
|
+
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledLabelAndDescriptionContainer, { children }),
|
|
9710
|
+
(0, import_type_guards32.isNotNil)(badge) || (0, import_type_guards32.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null,
|
|
9711
|
+
props.rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(StyledRightIconContainer, { children: props.rightIcon }) : null
|
|
9624
9712
|
]
|
|
9625
9713
|
}
|
|
9626
9714
|
);
|
|
@@ -9628,33 +9716,33 @@ var MenuItemButton = (0, import_react36.forwardRef)(({ children, appearance, com
|
|
|
9628
9716
|
MenuItemButton.displayName = "MenuItemButton";
|
|
9629
9717
|
|
|
9630
9718
|
// src/components/Menu/MenuItemLabelDescription.tsx
|
|
9631
|
-
var
|
|
9632
|
-
var
|
|
9633
|
-
var StyledMenuItemLabel =
|
|
9634
|
-
var StyledMenuItemDescription = (0,
|
|
9719
|
+
var import_styled_components56 = __toESM(require("styled-components"));
|
|
9720
|
+
var import_jsx_runtime228 = require("react/jsx-runtime");
|
|
9721
|
+
var StyledMenuItemLabel = import_styled_components56.default.span``;
|
|
9722
|
+
var StyledMenuItemDescription = (0, import_styled_components56.default)(Text).attrs({
|
|
9635
9723
|
variant: "body4",
|
|
9636
9724
|
prominence: "secondary"
|
|
9637
9725
|
})``;
|
|
9638
9726
|
var MenuItemLabel = ({ children }) => {
|
|
9639
|
-
return /* @__PURE__ */ (0,
|
|
9727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(StyledMenuItemLabel, { children });
|
|
9640
9728
|
};
|
|
9641
9729
|
var MenuItemDescription = ({ children }) => {
|
|
9642
|
-
return /* @__PURE__ */ (0,
|
|
9730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime228.jsx)(StyledMenuItemDescription, { children });
|
|
9643
9731
|
};
|
|
9644
9732
|
|
|
9645
9733
|
// src/components/Menu/SubMenu.tsx
|
|
9646
|
-
var
|
|
9647
|
-
var SubMenuContent = (0,
|
|
9734
|
+
var import_jsx_runtime229 = require("react/jsx-runtime");
|
|
9735
|
+
var SubMenuContent = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
|
|
9648
9736
|
${menuContentCss}
|
|
9649
9737
|
|
|
9650
9738
|
${mq.smAndDown} {
|
|
9651
9739
|
transform: translateX(-100%) !important;
|
|
9652
9740
|
}
|
|
9653
9741
|
`;
|
|
9654
|
-
var StyledMobileSubMenuItems =
|
|
9742
|
+
var StyledMobileSubMenuItems = import_styled_components57.default.div`
|
|
9655
9743
|
margin-left: var(--wui-space-04);
|
|
9656
9744
|
`;
|
|
9657
|
-
var StyledSubTrigger = (0,
|
|
9745
|
+
var StyledSubTrigger = (0, import_styled_components57.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
|
|
9658
9746
|
outline: none;
|
|
9659
9747
|
|
|
9660
9748
|
&[data-state='open'],
|
|
@@ -9665,12 +9753,12 @@ var StyledSubTrigger = (0, import_styled_components56.default)(import_react_drop
|
|
|
9665
9753
|
var SubMenuTrigger = ({ icon, ...props }) => {
|
|
9666
9754
|
const { isSmAndUp } = useMq();
|
|
9667
9755
|
const Trigger4 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
|
|
9668
|
-
return /* @__PURE__ */ (0,
|
|
9756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(Trigger4, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(
|
|
9669
9757
|
MenuItemButton,
|
|
9670
9758
|
{
|
|
9671
9759
|
...props,
|
|
9672
9760
|
leftIcon: icon,
|
|
9673
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9761
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(Icon, { type: "caret-right" })
|
|
9674
9762
|
}
|
|
9675
9763
|
) });
|
|
9676
9764
|
};
|
|
@@ -9684,14 +9772,14 @@ var SubMenu = ({
|
|
|
9684
9772
|
const { isSmAndUp } = useMq();
|
|
9685
9773
|
const [isExpanded, setIsExpanded] = (0, import_react37.useState)(false);
|
|
9686
9774
|
const { compact } = useMenuContext();
|
|
9687
|
-
return isSmAndUp ? /* @__PURE__ */ (0,
|
|
9688
|
-
/* @__PURE__ */ (0,
|
|
9689
|
-
/* @__PURE__ */ (0,
|
|
9690
|
-
(0,
|
|
9775
|
+
return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
|
|
9776
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(SubMenuTrigger, { ...props, children: [
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(MenuItemLabel, { children: label }),
|
|
9778
|
+
(0, import_type_guards33.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(MenuItemDescription, { children: description }) : null
|
|
9691
9779
|
] }),
|
|
9692
|
-
/* @__PURE__ */ (0,
|
|
9693
|
-
] }) : /* @__PURE__ */ (0,
|
|
9694
|
-
/* @__PURE__ */ (0,
|
|
9780
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime229.jsx)(SubMenuContent, { $compact: compact, children }) })
|
|
9781
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
|
|
9782
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsxs)(
|
|
9695
9783
|
SubMenuTrigger,
|
|
9696
9784
|
{
|
|
9697
9785
|
...props,
|
|
@@ -9700,12 +9788,12 @@ var SubMenu = ({
|
|
|
9700
9788
|
setIsExpanded((prev) => !prev);
|
|
9701
9789
|
},
|
|
9702
9790
|
children: [
|
|
9703
|
-
/* @__PURE__ */ (0,
|
|
9704
|
-
/* @__PURE__ */ (0,
|
|
9791
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(MenuItemLabel, { children: label }),
|
|
9792
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(MenuItemDescription, { children: description })
|
|
9705
9793
|
]
|
|
9706
9794
|
}
|
|
9707
9795
|
),
|
|
9708
|
-
/* @__PURE__ */ (0,
|
|
9796
|
+
/* @__PURE__ */ (0, import_jsx_runtime229.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
|
|
9709
9797
|
] });
|
|
9710
9798
|
};
|
|
9711
9799
|
SubMenu.displayName = "SubMenu";
|
|
@@ -9713,15 +9801,15 @@ SubMenu.displayName = "SubMenu";
|
|
|
9713
9801
|
// src/components/Menu/MenuItem.tsx
|
|
9714
9802
|
var import_react38 = require("react");
|
|
9715
9803
|
var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
|
|
9716
|
-
var
|
|
9804
|
+
var import_jsx_runtime230 = require("react/jsx-runtime");
|
|
9717
9805
|
var MenuItem = (0, import_react38.forwardRef)(
|
|
9718
9806
|
({ onSelect = () => null, ...props }, ref) => {
|
|
9719
|
-
return /* @__PURE__ */ (0,
|
|
9807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9720
9808
|
import_react_dropdown_menu4.DropdownMenuItem,
|
|
9721
9809
|
{
|
|
9722
9810
|
asChild: true,
|
|
9723
9811
|
onSelect,
|
|
9724
|
-
children: /* @__PURE__ */ (0,
|
|
9812
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
9725
9813
|
MenuItemButton,
|
|
9726
9814
|
{
|
|
9727
9815
|
...props,
|
|
@@ -9737,10 +9825,10 @@ MenuItem.displayName = "MenuItem";
|
|
|
9737
9825
|
|
|
9738
9826
|
// src/components/Menu/MenuRadioGroup.tsx
|
|
9739
9827
|
var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
|
|
9740
|
-
var
|
|
9828
|
+
var import_jsx_runtime231 = require("react/jsx-runtime");
|
|
9741
9829
|
var MenuRadioGroup = ({ children, label, ...props }) => {
|
|
9742
|
-
return /* @__PURE__ */ (0,
|
|
9743
|
-
/* @__PURE__ */ (0,
|
|
9830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime231.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
|
|
9831
|
+
/* @__PURE__ */ (0, import_jsx_runtime231.jsx)(MenuLabel, { children: label }),
|
|
9744
9832
|
children
|
|
9745
9833
|
] });
|
|
9746
9834
|
};
|
|
@@ -9748,11 +9836,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
|
|
|
9748
9836
|
|
|
9749
9837
|
// src/components/Menu/RadioMenuItem.tsx
|
|
9750
9838
|
var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
|
|
9751
|
-
var
|
|
9839
|
+
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9752
9840
|
var RadioMenuItem = ({
|
|
9753
9841
|
onSelect,
|
|
9754
9842
|
value,
|
|
9755
|
-
indicator = /* @__PURE__ */ (0,
|
|
9843
|
+
indicator = /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9756
9844
|
Icon,
|
|
9757
9845
|
{
|
|
9758
9846
|
size: "sm",
|
|
@@ -9762,17 +9850,17 @@ var RadioMenuItem = ({
|
|
|
9762
9850
|
...props
|
|
9763
9851
|
}) => {
|
|
9764
9852
|
const extraProps = onSelect ? { onSelect } : {};
|
|
9765
|
-
return /* @__PURE__ */ (0,
|
|
9853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9766
9854
|
import_react_dropdown_menu6.DropdownMenuRadioItem,
|
|
9767
9855
|
{
|
|
9768
9856
|
...extraProps,
|
|
9769
9857
|
asChild: true,
|
|
9770
9858
|
value,
|
|
9771
|
-
children: /* @__PURE__ */ (0,
|
|
9859
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9772
9860
|
MenuItemButton,
|
|
9773
9861
|
{
|
|
9774
9862
|
...props,
|
|
9775
|
-
rightIcon: /* @__PURE__ */ (0,
|
|
9863
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
|
|
9776
9864
|
}
|
|
9777
9865
|
)
|
|
9778
9866
|
}
|
|
@@ -9782,9 +9870,9 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
9782
9870
|
|
|
9783
9871
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
9784
9872
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
9785
|
-
var
|
|
9786
|
-
var
|
|
9787
|
-
return checked ? /* @__PURE__ */ (0,
|
|
9873
|
+
var import_jsx_runtime233 = require("react/jsx-runtime");
|
|
9874
|
+
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
9875
|
+
return checked ? /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(
|
|
9788
9876
|
"svg",
|
|
9789
9877
|
{
|
|
9790
9878
|
...props,
|
|
@@ -9794,14 +9882,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9794
9882
|
width: "24",
|
|
9795
9883
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9796
9884
|
children: [
|
|
9797
|
-
/* @__PURE__ */ (0,
|
|
9885
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9798
9886
|
"path",
|
|
9799
9887
|
{
|
|
9800
9888
|
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",
|
|
9801
9889
|
fill: "#2949e5"
|
|
9802
9890
|
}
|
|
9803
9891
|
),
|
|
9804
|
-
/* @__PURE__ */ (0,
|
|
9892
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9805
9893
|
"path",
|
|
9806
9894
|
{
|
|
9807
9895
|
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",
|
|
@@ -9810,7 +9898,7 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9810
9898
|
)
|
|
9811
9899
|
]
|
|
9812
9900
|
}
|
|
9813
|
-
) : /* @__PURE__ */ (0,
|
|
9901
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime233.jsxs)(
|
|
9814
9902
|
"svg",
|
|
9815
9903
|
{
|
|
9816
9904
|
...props,
|
|
@@ -9820,14 +9908,14 @@ var CheckboxIndicator2 = ({ checked, ...props }) => {
|
|
|
9820
9908
|
width: "24",
|
|
9821
9909
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9822
9910
|
children: [
|
|
9823
|
-
/* @__PURE__ */ (0,
|
|
9911
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9824
9912
|
"path",
|
|
9825
9913
|
{
|
|
9826
9914
|
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",
|
|
9827
9915
|
fill: "#fcfcfd"
|
|
9828
9916
|
}
|
|
9829
9917
|
),
|
|
9830
|
-
/* @__PURE__ */ (0,
|
|
9918
|
+
/* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9831
9919
|
"path",
|
|
9832
9920
|
{
|
|
9833
9921
|
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",
|
|
@@ -9844,18 +9932,18 @@ var CheckboxMenuItem = ({
|
|
|
9844
9932
|
onCheckedChange,
|
|
9845
9933
|
...props
|
|
9846
9934
|
}) => {
|
|
9847
|
-
return /* @__PURE__ */ (0,
|
|
9935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9848
9936
|
import_react_dropdown_menu7.DropdownMenuCheckboxItem,
|
|
9849
9937
|
{
|
|
9850
9938
|
asChild: true,
|
|
9851
9939
|
checked,
|
|
9852
9940
|
onCheckedChange,
|
|
9853
9941
|
onSelect,
|
|
9854
|
-
children: /* @__PURE__ */ (0,
|
|
9942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(
|
|
9855
9943
|
MenuItemButton,
|
|
9856
9944
|
{
|
|
9857
9945
|
...props,
|
|
9858
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
9946
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime233.jsx)(CheckboxIndicator, { checked })
|
|
9859
9947
|
}
|
|
9860
9948
|
)
|
|
9861
9949
|
}
|
|
@@ -9865,36 +9953,36 @@ CheckboxMenuItem.displayName = "CheckboxMenuItem";
|
|
|
9865
9953
|
|
|
9866
9954
|
// src/components/Modal/Modal.tsx
|
|
9867
9955
|
var import_react42 = require("react");
|
|
9868
|
-
var
|
|
9956
|
+
var import_styled_components62 = __toESM(require("styled-components"));
|
|
9869
9957
|
var import_react_dialog4 = require("@radix-ui/react-dialog");
|
|
9870
|
-
var
|
|
9958
|
+
var import_type_guards35 = require("@wistia/type-guards");
|
|
9871
9959
|
|
|
9872
9960
|
// src/components/Modal/ModalHeader.tsx
|
|
9873
|
-
var
|
|
9961
|
+
var import_styled_components59 = __toESM(require("styled-components"));
|
|
9874
9962
|
var import_react_dialog2 = require("@radix-ui/react-dialog");
|
|
9875
9963
|
|
|
9876
9964
|
// src/components/Modal/ModalCloseButton.tsx
|
|
9877
|
-
var
|
|
9965
|
+
var import_styled_components58 = __toESM(require("styled-components"));
|
|
9878
9966
|
var import_react_dialog = require("@radix-ui/react-dialog");
|
|
9879
|
-
var
|
|
9880
|
-
var CloseButton = (0,
|
|
9967
|
+
var import_jsx_runtime234 = require("react/jsx-runtime");
|
|
9968
|
+
var CloseButton = (0, import_styled_components58.default)(import_react_dialog.Close)`
|
|
9881
9969
|
align-self: start;
|
|
9882
9970
|
`;
|
|
9883
9971
|
var ModalCloseButton = () => {
|
|
9884
|
-
return /* @__PURE__ */ (0,
|
|
9972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(CloseButton, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(
|
|
9885
9973
|
IconButton,
|
|
9886
9974
|
{
|
|
9887
9975
|
label: "Dismiss modal",
|
|
9888
9976
|
size: "sm",
|
|
9889
9977
|
variant: "ghost",
|
|
9890
|
-
children: /* @__PURE__ */ (0,
|
|
9978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime234.jsx)(Icon, { type: "close" })
|
|
9891
9979
|
}
|
|
9892
9980
|
) });
|
|
9893
9981
|
};
|
|
9894
9982
|
|
|
9895
9983
|
// src/components/Modal/ModalHeader.tsx
|
|
9896
|
-
var
|
|
9897
|
-
var Header =
|
|
9984
|
+
var import_jsx_runtime235 = require("react/jsx-runtime");
|
|
9985
|
+
var Header = import_styled_components59.default.header`
|
|
9898
9986
|
display: flex;
|
|
9899
9987
|
order: 1;
|
|
9900
9988
|
gap: var(--wui-space-01);
|
|
@@ -9905,7 +9993,7 @@ var Header = import_styled_components58.default.header`
|
|
|
9905
9993
|
margin: 0 0 var(--wui-space-03);
|
|
9906
9994
|
}
|
|
9907
9995
|
`;
|
|
9908
|
-
var Title = (0,
|
|
9996
|
+
var Title = (0, import_styled_components59.default)(import_react_dialog2.Title)`
|
|
9909
9997
|
font-family: var(--wui-typography-heading-2-family);
|
|
9910
9998
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
9911
9999
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -9916,21 +10004,21 @@ var ModalHeader = ({
|
|
|
9916
10004
|
hideTitle,
|
|
9917
10005
|
hideCloseButton
|
|
9918
10006
|
}) => {
|
|
9919
|
-
const TitleComponent = hideTitle ? /* @__PURE__ */ (0,
|
|
9920
|
-
return /* @__PURE__ */ (0,
|
|
10007
|
+
const TitleComponent = hideTitle ? /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(Title, { children: title }) }) : /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(Title, { children: title });
|
|
10008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime235.jsxs)(Header, { $hideTitle: hideTitle, children: [
|
|
9921
10009
|
TitleComponent,
|
|
9922
|
-
hideCloseButton ? null : /* @__PURE__ */ (0,
|
|
10010
|
+
hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(ModalCloseButton, {})
|
|
9923
10011
|
] });
|
|
9924
10012
|
};
|
|
9925
10013
|
|
|
9926
10014
|
// src/components/Modal/ModalContent.tsx
|
|
9927
10015
|
var import_react40 = require("react");
|
|
9928
|
-
var
|
|
10016
|
+
var import_styled_components60 = __toESM(require("styled-components"));
|
|
9929
10017
|
var import_react_dialog3 = require("@radix-ui/react-dialog");
|
|
9930
10018
|
|
|
9931
10019
|
// src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
9932
10020
|
var import_react39 = require("react");
|
|
9933
|
-
var
|
|
10021
|
+
var import_type_guards34 = require("@wistia/type-guards");
|
|
9934
10022
|
var useFocusRestore = () => {
|
|
9935
10023
|
const previouslyFocusedRef = (0, import_react39.useRef)(null);
|
|
9936
10024
|
(0, import_react39.useEffect)(() => {
|
|
@@ -9938,7 +10026,7 @@ var useFocusRestore = () => {
|
|
|
9938
10026
|
}, []);
|
|
9939
10027
|
(0, import_react39.useEffect)(() => {
|
|
9940
10028
|
return () => {
|
|
9941
|
-
if ((0,
|
|
10029
|
+
if ((0, import_type_guards34.isNotNil)(previouslyFocusedRef.current)) {
|
|
9942
10030
|
setTimeout(() => {
|
|
9943
10031
|
previouslyFocusedRef.current?.focus();
|
|
9944
10032
|
}, 0);
|
|
@@ -9948,8 +10036,8 @@ var useFocusRestore = () => {
|
|
|
9948
10036
|
};
|
|
9949
10037
|
|
|
9950
10038
|
// src/components/Modal/ModalContent.tsx
|
|
9951
|
-
var
|
|
9952
|
-
var StyledModalContent = (0,
|
|
10039
|
+
var import_jsx_runtime236 = require("react/jsx-runtime");
|
|
10040
|
+
var StyledModalContent = (0, import_styled_components60.default)(import_react_dialog3.Content)`
|
|
9953
10041
|
background-color: var(--wui-color-bg-app);
|
|
9954
10042
|
box-sizing: border-box;
|
|
9955
10043
|
display: flex;
|
|
@@ -9993,7 +10081,7 @@ var StyledModalContent = (0, import_styled_components59.default)(import_react_di
|
|
|
9993
10081
|
var ModalContent = (0, import_react40.forwardRef)(
|
|
9994
10082
|
({ fullHeight, width, children, ...otherProps }, ref) => {
|
|
9995
10083
|
useFocusRestore();
|
|
9996
|
-
return /* @__PURE__ */ (0,
|
|
10084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime236.jsx)(
|
|
9997
10085
|
StyledModalContent,
|
|
9998
10086
|
{
|
|
9999
10087
|
ref,
|
|
@@ -10009,8 +10097,8 @@ var ModalContent = (0, import_react40.forwardRef)(
|
|
|
10009
10097
|
|
|
10010
10098
|
// src/private/components/Backdrop/Backdrop.tsx
|
|
10011
10099
|
var import_react41 = require("react");
|
|
10012
|
-
var
|
|
10013
|
-
var
|
|
10100
|
+
var import_styled_components61 = __toESM(require("styled-components"));
|
|
10101
|
+
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
10014
10102
|
var backdropAnimationDuration = 150;
|
|
10015
10103
|
var alignVerticalMap = {
|
|
10016
10104
|
stretch: "normal",
|
|
@@ -10023,7 +10111,7 @@ var alignHorizontalMap = {
|
|
|
10023
10111
|
center: "center",
|
|
10024
10112
|
right: "end"
|
|
10025
10113
|
};
|
|
10026
|
-
var BackdropComponent =
|
|
10114
|
+
var BackdropComponent = import_styled_components61.default.div`
|
|
10027
10115
|
align-items: ${({ $alignVertical }) => alignVerticalMap[$alignVertical]};
|
|
10028
10116
|
animation-name: backdropShow;
|
|
10029
10117
|
animation-duration: ${() => `${backdropAnimationDuration}ms`};
|
|
@@ -10047,7 +10135,7 @@ var BackdropComponent = import_styled_components60.default.div`
|
|
|
10047
10135
|
}
|
|
10048
10136
|
`;
|
|
10049
10137
|
var Backdrop = (0, import_react41.forwardRef)(
|
|
10050
|
-
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0,
|
|
10138
|
+
({ alignHorizontal = "center", alignVertical = "center", children, ...otherProps }, ref) => /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(
|
|
10051
10139
|
BackdropComponent,
|
|
10052
10140
|
{
|
|
10053
10141
|
ref,
|
|
@@ -10061,9 +10149,9 @@ var Backdrop = (0, import_react41.forwardRef)(
|
|
|
10061
10149
|
Backdrop.displayName = "Backdrop";
|
|
10062
10150
|
|
|
10063
10151
|
// src/components/Modal/Modal.tsx
|
|
10064
|
-
var
|
|
10152
|
+
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
10065
10153
|
var DEFAULT_MODAL_WIDTH = "532px";
|
|
10066
|
-
var ModalBody =
|
|
10154
|
+
var ModalBody = import_styled_components62.default.div`
|
|
10067
10155
|
flex-direction: column;
|
|
10068
10156
|
display: flex;
|
|
10069
10157
|
order: 2;
|
|
@@ -10081,24 +10169,24 @@ var Modal = (0, import_react42.forwardRef)(
|
|
|
10081
10169
|
width = DEFAULT_MODAL_WIDTH,
|
|
10082
10170
|
...props
|
|
10083
10171
|
}, ref) => {
|
|
10084
|
-
return /* @__PURE__ */ (0,
|
|
10172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10085
10173
|
import_react_dialog4.Root,
|
|
10086
10174
|
{
|
|
10087
10175
|
onOpenChange: (open2) => {
|
|
10088
|
-
if (!open2 && (0,
|
|
10176
|
+
if (!open2 && (0, import_type_guards35.isNotNil)(onRequestClose)) {
|
|
10089
10177
|
onRequestClose();
|
|
10090
10178
|
}
|
|
10091
10179
|
},
|
|
10092
10180
|
open: isOpen,
|
|
10093
|
-
children: /* @__PURE__ */ (0,
|
|
10094
|
-
/* @__PURE__ */ (0,
|
|
10095
|
-
/* @__PURE__ */ (0,
|
|
10181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(import_react_dialog4.Portal, { children: [
|
|
10182
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(Backdrop, {}),
|
|
10183
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
10096
10184
|
ModalContent,
|
|
10097
10185
|
{
|
|
10098
10186
|
ref,
|
|
10099
10187
|
fullHeight,
|
|
10100
10188
|
onOpenAutoFocus: (event) => {
|
|
10101
|
-
if ((0,
|
|
10189
|
+
if ((0, import_type_guards35.isNotNil)(initialFocusRef) && initialFocusRef.current) {
|
|
10102
10190
|
event.preventDefault();
|
|
10103
10191
|
requestAnimationFrame(() => {
|
|
10104
10192
|
initialFocusRef.current?.focus();
|
|
@@ -10108,8 +10196,8 @@ var Modal = (0, import_react42.forwardRef)(
|
|
|
10108
10196
|
width,
|
|
10109
10197
|
...props,
|
|
10110
10198
|
children: [
|
|
10111
|
-
/* @__PURE__ */ (0,
|
|
10112
|
-
/* @__PURE__ */ (0,
|
|
10199
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(ModalBody, { children }),
|
|
10200
|
+
/* @__PURE__ */ (0, import_jsx_runtime238.jsx)(
|
|
10113
10201
|
ModalHeader,
|
|
10114
10202
|
{
|
|
10115
10203
|
hideCloseButton,
|
|
@@ -10129,18 +10217,18 @@ Modal.displayName = "Modal";
|
|
|
10129
10217
|
|
|
10130
10218
|
// src/components/Popover/Popover.tsx
|
|
10131
10219
|
var import_react_popover = require("@radix-ui/react-popover");
|
|
10132
|
-
var
|
|
10220
|
+
var import_styled_components63 = __toESM(require("styled-components"));
|
|
10133
10221
|
|
|
10134
10222
|
// src/private/helpers/getControls/getControlProps.tsx
|
|
10135
|
-
var
|
|
10223
|
+
var import_type_guards36 = require("@wistia/type-guards");
|
|
10136
10224
|
var getControlProps = (isOpen, onOpenChange) => {
|
|
10137
|
-
return (0,
|
|
10225
|
+
return (0, import_type_guards36.isNotNil)(onOpenChange) && (0, import_type_guards36.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {};
|
|
10138
10226
|
};
|
|
10139
10227
|
|
|
10140
10228
|
// src/components/Popover/Popover.tsx
|
|
10141
|
-
var
|
|
10142
|
-
var StyledContent2 = (0,
|
|
10143
|
-
${({ $unstyled }) => !$unstyled &&
|
|
10229
|
+
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
10230
|
+
var StyledContent2 = (0, import_styled_components63.default)(import_react_popover.Content)`
|
|
10231
|
+
${({ $unstyled }) => !$unstyled && import_styled_components63.css`
|
|
10144
10232
|
border-radius: var(--wui-border-radius-02);
|
|
10145
10233
|
padding: var(--wui-space-04);
|
|
10146
10234
|
max-width: 320px;
|
|
@@ -10164,25 +10252,25 @@ var Popover = ({
|
|
|
10164
10252
|
unstyled = false,
|
|
10165
10253
|
...props
|
|
10166
10254
|
}) => {
|
|
10167
|
-
return /* @__PURE__ */ (0,
|
|
10168
|
-
/* @__PURE__ */ (0,
|
|
10169
|
-
/* @__PURE__ */ (0,
|
|
10255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(import_react_popover.Root, { ...getControlProps(isOpen, onOpenChange), children: [
|
|
10256
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_react_popover.Trigger, { asChild: true, children: trigger }),
|
|
10257
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_react_popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime239.jsxs)(
|
|
10170
10258
|
StyledContent2,
|
|
10171
10259
|
{
|
|
10172
10260
|
sideOffset: 8,
|
|
10173
10261
|
...props,
|
|
10174
10262
|
$unstyled: unstyled,
|
|
10175
10263
|
children: [
|
|
10176
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
10264
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(import_react_popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(
|
|
10177
10265
|
IconButton,
|
|
10178
10266
|
{
|
|
10179
10267
|
"data-wui-popover-close": true,
|
|
10180
10268
|
label: "Close",
|
|
10181
10269
|
variant: "ghost",
|
|
10182
|
-
children: /* @__PURE__ */ (0,
|
|
10270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime239.jsx)(Icon, { type: "close" })
|
|
10183
10271
|
}
|
|
10184
10272
|
) }),
|
|
10185
|
-
/* @__PURE__ */ (0,
|
|
10273
|
+
/* @__PURE__ */ (0, import_jsx_runtime239.jsx)("div", { children })
|
|
10186
10274
|
]
|
|
10187
10275
|
}
|
|
10188
10276
|
) })
|
|
@@ -10191,11 +10279,11 @@ var Popover = ({
|
|
|
10191
10279
|
Popover.displayName = "Popover";
|
|
10192
10280
|
|
|
10193
10281
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
10194
|
-
var
|
|
10282
|
+
var import_styled_components64 = __toESM(require("styled-components"));
|
|
10195
10283
|
var import_react_progress = require("@radix-ui/react-progress");
|
|
10196
|
-
var
|
|
10197
|
-
var
|
|
10198
|
-
var ProgressBarWrapper =
|
|
10284
|
+
var import_type_guards37 = require("@wistia/type-guards");
|
|
10285
|
+
var import_jsx_runtime240 = require("react/jsx-runtime");
|
|
10286
|
+
var ProgressBarWrapper = import_styled_components64.default.div`
|
|
10199
10287
|
--progress-bar-height: 8px;
|
|
10200
10288
|
--progress-bar-indicator-color: var(--wui-color-bg-fill);
|
|
10201
10289
|
--progress-bar-background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -10211,7 +10299,7 @@ var getTranslateValue = (progress, max) => {
|
|
|
10211
10299
|
const progressPercentage = progress / max * 100;
|
|
10212
10300
|
return `translateX(-${100 - progressPercentage}%)`;
|
|
10213
10301
|
};
|
|
10214
|
-
var ProgressBarLabel =
|
|
10302
|
+
var ProgressBarLabel = import_styled_components64.default.div`
|
|
10215
10303
|
display: flex;
|
|
10216
10304
|
line-height: var(--wui-typography-label-3-line-height);
|
|
10217
10305
|
font-size: var(--wui-typography-label-3-size);
|
|
@@ -10219,7 +10307,7 @@ var ProgressBarLabel = import_styled_components63.default.div`
|
|
|
10219
10307
|
color: var(--wui-color-text-secondary);
|
|
10220
10308
|
flex-shrink: 0;
|
|
10221
10309
|
`;
|
|
10222
|
-
var StyledProgressIndicator = (0,
|
|
10310
|
+
var StyledProgressIndicator = (0, import_styled_components64.default)(import_react_progress.Indicator)`
|
|
10223
10311
|
background-color: var(--progress-bar-indicator-color);
|
|
10224
10312
|
width: 100%;
|
|
10225
10313
|
height: 100%;
|
|
@@ -10228,7 +10316,7 @@ var StyledProgressIndicator = (0, import_styled_components63.default)(import_rea
|
|
|
10228
10316
|
transition: transform 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
10229
10317
|
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
10230
10318
|
`;
|
|
10231
|
-
var StyledProgressBar = (0,
|
|
10319
|
+
var StyledProgressBar = (0, import_styled_components64.default)(import_react_progress.Root)`
|
|
10232
10320
|
position: relative;
|
|
10233
10321
|
overflow: hidden;
|
|
10234
10322
|
background: var(--progress-bar-background-color);
|
|
@@ -10247,15 +10335,15 @@ var ProgressBar = ({
|
|
|
10247
10335
|
labelRight,
|
|
10248
10336
|
...props
|
|
10249
10337
|
}) => {
|
|
10250
|
-
return /* @__PURE__ */ (0,
|
|
10251
|
-
(0,
|
|
10252
|
-
/* @__PURE__ */ (0,
|
|
10338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime240.jsxs)(ProgressBarWrapper, { children: [
|
|
10339
|
+
(0, import_type_guards37.isNotNil)(labelLeft) ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ProgressBarLabel, { children: labelLeft }) : null,
|
|
10340
|
+
/* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
10253
10341
|
StyledProgressBar,
|
|
10254
10342
|
{
|
|
10255
10343
|
max,
|
|
10256
10344
|
value: progress,
|
|
10257
10345
|
...props,
|
|
10258
|
-
children: /* @__PURE__ */ (0,
|
|
10346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
10259
10347
|
StyledProgressIndicator,
|
|
10260
10348
|
{
|
|
10261
10349
|
$max: max,
|
|
@@ -10264,85 +10352,102 @@ var ProgressBar = ({
|
|
|
10264
10352
|
)
|
|
10265
10353
|
}
|
|
10266
10354
|
),
|
|
10267
|
-
(0,
|
|
10355
|
+
(0, import_type_guards37.isNotNil)(labelRight) ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ProgressBarLabel, { children: labelRight }) : null
|
|
10268
10356
|
] });
|
|
10269
10357
|
};
|
|
10270
10358
|
ProgressBar.displayName = "ProgressBar";
|
|
10271
10359
|
|
|
10272
10360
|
// src/components/Radio/Radio.tsx
|
|
10273
10361
|
var import_react43 = require("react");
|
|
10274
|
-
var
|
|
10275
|
-
var
|
|
10276
|
-
var
|
|
10277
|
-
var
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10362
|
+
var import_styled_components65 = __toESM(require("styled-components"));
|
|
10363
|
+
var import_type_guards38 = require("@wistia/type-guards");
|
|
10364
|
+
var import_jsx_runtime241 = require("react/jsx-runtime");
|
|
10365
|
+
var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10366
|
+
"svg",
|
|
10367
|
+
{
|
|
10368
|
+
fill: "inherit",
|
|
10369
|
+
height: "12",
|
|
10370
|
+
viewBox: "0 0 12 12",
|
|
10371
|
+
width: "12",
|
|
10372
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10374
|
+
"circle",
|
|
10375
|
+
{
|
|
10376
|
+
cx: "6",
|
|
10377
|
+
cy: "6",
|
|
10378
|
+
fill: "currentColor",
|
|
10379
|
+
r: "4"
|
|
10380
|
+
}
|
|
10381
|
+
)
|
|
10382
|
+
}
|
|
10383
|
+
);
|
|
10384
|
+
var StyledHiddenRadioInput = import_styled_components65.default.input`
|
|
10385
|
+
${visuallyHiddenStyle}
|
|
10386
|
+
|
|
10387
|
+
/* toggles display of faux-input background-color */
|
|
10388
|
+
&:checked + label [data-wui-faux-input='true'] {
|
|
10389
|
+
border-color: var(--wui-color-bg-fill);
|
|
10390
|
+
}
|
|
10391
|
+
|
|
10392
|
+
/* toggles display of RadioIcon */
|
|
10393
|
+
&:checked + label svg {
|
|
10394
|
+
display: block;
|
|
10395
|
+
}
|
|
10281
10396
|
`;
|
|
10282
|
-
var
|
|
10283
|
-
box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
|
|
10284
|
-
appearance: none;
|
|
10285
|
-
margin: 0;
|
|
10286
|
-
color: currentcolor;
|
|
10397
|
+
var inputSizeSmall2 = import_styled_components65.css`
|
|
10287
10398
|
width: 14px;
|
|
10288
|
-
min-width: 14px;
|
|
10289
10399
|
height: 14px;
|
|
10400
|
+
min-width: 14px;
|
|
10401
|
+
min-height: 14px;
|
|
10402
|
+
`;
|
|
10403
|
+
var inputSizeMedium2 = import_styled_components65.css`
|
|
10404
|
+
width: 16px;
|
|
10405
|
+
height: 16px;
|
|
10406
|
+
min-width: 16px;
|
|
10407
|
+
min-height: 16px;
|
|
10408
|
+
`;
|
|
10409
|
+
var inputSizeLarge2 = import_styled_components65.css`
|
|
10410
|
+
width: 20px;
|
|
10411
|
+
height: 20px;
|
|
10412
|
+
min-width: 20px;
|
|
10413
|
+
min-height: 20px;
|
|
10414
|
+
`;
|
|
10415
|
+
var getSizeCss2 = (size) => {
|
|
10416
|
+
if (size === "sm") return inputSizeSmall2;
|
|
10417
|
+
if (size === "lg") return inputSizeLarge2;
|
|
10418
|
+
return inputSizeMedium2;
|
|
10419
|
+
};
|
|
10420
|
+
var StyledRadioInput = import_styled_components65.default.div`
|
|
10421
|
+
${({ $size }) => getSizeCss2($size)}
|
|
10422
|
+
line-height: 0;
|
|
10423
|
+
margin: 0;
|
|
10290
10424
|
border: 1px solid var(--wui-color-border);
|
|
10291
|
-
border-radius: 50%;
|
|
10425
|
+
border-radius: 50%; /* TODO --wui-border-radius-rounded */
|
|
10426
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
10292
10427
|
display: grid;
|
|
10293
10428
|
place-content: center;
|
|
10429
|
+
align-self: flex-start;
|
|
10294
10430
|
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
width: 10px;
|
|
10298
|
-
height: 10px;
|
|
10299
|
-
border-radius: 50%;
|
|
10300
|
-
transform: scale(0);
|
|
10301
|
-
box-shadow: inset 1em 1em var(--wui-color-bg-fill);
|
|
10302
|
-
}
|
|
10431
|
+
svg {
|
|
10432
|
+
display: none;
|
|
10303
10433
|
|
|
10304
|
-
|
|
10305
|
-
|
|
10434
|
+
circle {
|
|
10435
|
+
fill: var(--wui-color-bg-fill);
|
|
10436
|
+
}
|
|
10306
10437
|
}
|
|
10307
10438
|
`;
|
|
10308
|
-
var
|
|
10439
|
+
var disabledStyle5 = import_styled_components65.css`
|
|
10309
10440
|
cursor: not-allowed;
|
|
10310
10441
|
opacity: 0.5;
|
|
10311
10442
|
`;
|
|
10312
|
-
var
|
|
10313
|
-
/* TODO Lamp to design error state */
|
|
10314
|
-
&:hover,
|
|
10315
|
-
&:focus,
|
|
10316
|
-
&:active {
|
|
10317
|
-
border-color: transparent !important;
|
|
10318
|
-
}
|
|
10319
|
-
`;
|
|
10320
|
-
var defaultHoverStyle = import_styled_components64.css`
|
|
10321
|
-
/* TODO Lamp to design hover state */
|
|
10322
|
-
cursor: pointer;
|
|
10323
|
-
`;
|
|
10324
|
-
var StyledRadioWrapper = import_styled_components64.default.div`
|
|
10325
|
-
align-items: baseline;
|
|
10326
|
-
border: 1px solid transparent;
|
|
10327
|
-
border-radius: 4px;
|
|
10443
|
+
var StyledRadioWrapper = import_styled_components65.default.div`
|
|
10328
10444
|
display: flex;
|
|
10329
|
-
|
|
10330
|
-
padding: var(--wui-space-02);
|
|
10331
|
-
|
|
10332
|
-
&:hover {
|
|
10333
|
-
${defaultHoverStyle}
|
|
10334
|
-
}
|
|
10335
|
-
|
|
10336
|
-
&:focus-within {
|
|
10337
|
-
/* TODO Lamp to design focus state */
|
|
10338
|
-
background-color: #efefef;
|
|
10339
|
-
}
|
|
10445
|
+
margin: 0;
|
|
10340
10446
|
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
}
|
|
10447
|
+
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
10448
|
+
user-select: none;
|
|
10344
10449
|
|
|
10345
|
-
${({ disabled }) => disabled &&
|
|
10450
|
+
${({ $disabled }) => $disabled && disabledStyle5};
|
|
10346
10451
|
`;
|
|
10347
10452
|
var Radio = (0, import_react43.forwardRef)(
|
|
10348
10453
|
({
|
|
@@ -10353,45 +10458,52 @@ var Radio = (0, import_react43.forwardRef)(
|
|
|
10353
10458
|
description,
|
|
10354
10459
|
name,
|
|
10355
10460
|
onChange,
|
|
10356
|
-
|
|
10461
|
+
size = "md",
|
|
10357
10462
|
value = "false",
|
|
10358
|
-
|
|
10463
|
+
required = false,
|
|
10464
|
+
hideLabel = false,
|
|
10465
|
+
...props
|
|
10359
10466
|
}, ref) => {
|
|
10360
10467
|
const generatedId = (0, import_react43.useId)();
|
|
10361
|
-
const computedId = (0,
|
|
10362
|
-
return /* @__PURE__ */ (0,
|
|
10468
|
+
const computedId = (0, import_type_guards38.isNonEmptyString)(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
10469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime241.jsxs)(
|
|
10363
10470
|
StyledRadioWrapper,
|
|
10364
10471
|
{
|
|
10365
|
-
|
|
10366
|
-
|
|
10472
|
+
$disabled: disabled,
|
|
10473
|
+
"aria-invalid": props["aria-invalid"],
|
|
10367
10474
|
children: [
|
|
10368
|
-
/* @__PURE__ */ (0,
|
|
10369
|
-
|
|
10475
|
+
/* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10476
|
+
StyledHiddenRadioInput,
|
|
10370
10477
|
{
|
|
10478
|
+
...props,
|
|
10371
10479
|
ref,
|
|
10372
|
-
"aria-checked": checked,
|
|
10373
10480
|
checked,
|
|
10374
10481
|
disabled,
|
|
10375
10482
|
id: computedId,
|
|
10376
10483
|
name,
|
|
10377
10484
|
onChange,
|
|
10485
|
+
required,
|
|
10378
10486
|
type: "radio",
|
|
10379
|
-
value
|
|
10380
|
-
...otherProps
|
|
10487
|
+
value
|
|
10381
10488
|
}
|
|
10382
10489
|
),
|
|
10383
|
-
/* @__PURE__ */ (0,
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10490
|
+
/* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10491
|
+
FormControlLabel,
|
|
10492
|
+
{
|
|
10493
|
+
controlSlot: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
10494
|
+
StyledRadioInput,
|
|
10495
|
+
{
|
|
10496
|
+
$size: size,
|
|
10497
|
+
"data-wui-faux-input": "true",
|
|
10498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(RadioIcon, {})
|
|
10499
|
+
}
|
|
10500
|
+
),
|
|
10501
|
+
description,
|
|
10502
|
+
hideLabel,
|
|
10503
|
+
htmlFor: computedId,
|
|
10504
|
+
label
|
|
10505
|
+
}
|
|
10506
|
+
)
|
|
10395
10507
|
]
|
|
10396
10508
|
}
|
|
10397
10509
|
);
|
|
@@ -10401,13 +10513,13 @@ Radio.displayName = "Radio";
|
|
|
10401
10513
|
|
|
10402
10514
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10403
10515
|
var import_react47 = require("react");
|
|
10404
|
-
var
|
|
10516
|
+
var import_styled_components67 = __toESM(require("styled-components"));
|
|
10405
10517
|
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
10406
|
-
var
|
|
10518
|
+
var import_type_guards39 = require("@wistia/type-guards");
|
|
10407
10519
|
|
|
10408
10520
|
// src/components/SegmentedControl/useSelectedItemMeasurements.tsx
|
|
10409
10521
|
var import_react44 = require("react");
|
|
10410
|
-
var
|
|
10522
|
+
var import_jsx_runtime242 = require("react/jsx-runtime");
|
|
10411
10523
|
var SelectedItemMeasurementsContext = (0, import_react44.createContext)(
|
|
10412
10524
|
null
|
|
10413
10525
|
);
|
|
@@ -10422,7 +10534,7 @@ var SelectedItemMeasurementsProvider = ({
|
|
|
10422
10534
|
}),
|
|
10423
10535
|
[selectedItemMeasurements]
|
|
10424
10536
|
);
|
|
10425
|
-
return /* @__PURE__ */ (0,
|
|
10537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(SelectedItemMeasurementsContext.Provider, { value: contextValue, children });
|
|
10426
10538
|
};
|
|
10427
10539
|
var useSelectedItemMeasurements = () => {
|
|
10428
10540
|
const context = (0, import_react44.useContext)(SelectedItemMeasurementsContext);
|
|
@@ -10436,7 +10548,7 @@ var useSelectedItemMeasurements = () => {
|
|
|
10436
10548
|
|
|
10437
10549
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10438
10550
|
var import_react46 = require("react");
|
|
10439
|
-
var
|
|
10551
|
+
var import_styled_components66 = __toESM(require("styled-components"));
|
|
10440
10552
|
|
|
10441
10553
|
// src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
10442
10554
|
var import_react45 = require("react");
|
|
@@ -10451,8 +10563,8 @@ var useSegmentedControlValue = () => {
|
|
|
10451
10563
|
};
|
|
10452
10564
|
|
|
10453
10565
|
// src/components/SegmentedControl/SelectedItemIndicator.tsx
|
|
10454
|
-
var
|
|
10455
|
-
var SelectedItemIndicatorDiv =
|
|
10566
|
+
var import_jsx_runtime243 = require("react/jsx-runtime");
|
|
10567
|
+
var SelectedItemIndicatorDiv = import_styled_components66.default.div`
|
|
10456
10568
|
background-color: var(--wui-color-bg-fill-white);
|
|
10457
10569
|
border-radius: var(--wui-border-radius-rounded);
|
|
10458
10570
|
left: 0;
|
|
@@ -10478,7 +10590,7 @@ var SelectedItemIndicator = () => {
|
|
|
10478
10590
|
if (!selectedValue) {
|
|
10479
10591
|
return null;
|
|
10480
10592
|
}
|
|
10481
|
-
return /* @__PURE__ */ (0,
|
|
10593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
|
|
10482
10594
|
SelectedItemIndicatorDiv,
|
|
10483
10595
|
{
|
|
10484
10596
|
style: {
|
|
@@ -10491,8 +10603,8 @@ var SelectedItemIndicator = () => {
|
|
|
10491
10603
|
};
|
|
10492
10604
|
|
|
10493
10605
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
10494
|
-
var
|
|
10495
|
-
var segmentedControlStyles =
|
|
10606
|
+
var import_jsx_runtime244 = require("react/jsx-runtime");
|
|
10607
|
+
var segmentedControlStyles = import_styled_components67.css`
|
|
10496
10608
|
display: inline-flex;
|
|
10497
10609
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10498
10610
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10502,7 +10614,7 @@ var segmentedControlStyles = import_styled_components66.css`
|
|
|
10502
10614
|
position: relative;
|
|
10503
10615
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
10504
10616
|
`;
|
|
10505
|
-
var StyledSegmentedControl = (0,
|
|
10617
|
+
var StyledSegmentedControl = (0, import_styled_components67.default)(import_react_toggle_group.Root)`
|
|
10506
10618
|
${segmentedControlStyles}
|
|
10507
10619
|
`;
|
|
10508
10620
|
var SegmentedControl = (0, import_react47.forwardRef)(
|
|
@@ -10514,10 +10626,10 @@ var SegmentedControl = (0, import_react47.forwardRef)(
|
|
|
10514
10626
|
onSelectedValueChange,
|
|
10515
10627
|
...props
|
|
10516
10628
|
}, ref) => {
|
|
10517
|
-
if ((0,
|
|
10629
|
+
if ((0, import_type_guards39.isNil)(children)) {
|
|
10518
10630
|
return null;
|
|
10519
10631
|
}
|
|
10520
|
-
return /* @__PURE__ */ (0,
|
|
10632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
10521
10633
|
StyledSegmentedControl,
|
|
10522
10634
|
{
|
|
10523
10635
|
ref,
|
|
@@ -10529,8 +10641,8 @@ var SegmentedControl = (0, import_react47.forwardRef)(
|
|
|
10529
10641
|
type: "single",
|
|
10530
10642
|
value: selectedValue,
|
|
10531
10643
|
...props,
|
|
10532
|
-
children: /* @__PURE__ */ (0,
|
|
10533
|
-
/* @__PURE__ */ (0,
|
|
10644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime244.jsx)(SegmentedControlValueProvider, { value: selectedValue, children: /* @__PURE__ */ (0, import_jsx_runtime244.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
10645
|
+
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(SelectedItemIndicator, {}),
|
|
10534
10646
|
children
|
|
10535
10647
|
] }) })
|
|
10536
10648
|
}
|
|
@@ -10541,27 +10653,27 @@ SegmentedControl.displayName = "SegmentedControl";
|
|
|
10541
10653
|
|
|
10542
10654
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10543
10655
|
var import_react48 = require("react");
|
|
10544
|
-
var
|
|
10656
|
+
var import_styled_components68 = __toESM(require("styled-components"));
|
|
10545
10657
|
var import_react_toggle_group2 = require("@radix-ui/react-toggle-group");
|
|
10546
|
-
var
|
|
10658
|
+
var import_type_guards41 = require("@wistia/type-guards");
|
|
10547
10659
|
|
|
10548
10660
|
// src/private/helpers/mergeRefs/mergeRefs.ts
|
|
10549
|
-
var
|
|
10661
|
+
var import_type_guards40 = require("@wistia/type-guards");
|
|
10550
10662
|
var mergeRefs = (refs) => (value) => {
|
|
10551
10663
|
refs.forEach((ref) => {
|
|
10552
|
-
if ((0,
|
|
10664
|
+
if ((0, import_type_guards40.isFunction)(ref)) {
|
|
10553
10665
|
ref(value);
|
|
10554
10666
|
return;
|
|
10555
10667
|
}
|
|
10556
|
-
if ((0,
|
|
10668
|
+
if ((0, import_type_guards40.isNotNil)(ref)) {
|
|
10557
10669
|
ref.current = value;
|
|
10558
10670
|
}
|
|
10559
10671
|
});
|
|
10560
10672
|
};
|
|
10561
10673
|
|
|
10562
10674
|
// src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
10563
|
-
var
|
|
10564
|
-
var segmentedControlItemStyles =
|
|
10675
|
+
var import_jsx_runtime245 = require("react/jsx-runtime");
|
|
10676
|
+
var segmentedControlItemStyles = import_styled_components68.css`
|
|
10565
10677
|
all: unset; /* ToggleGroupItem is a button element */
|
|
10566
10678
|
align-items: center;
|
|
10567
10679
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -10620,7 +10732,7 @@ var segmentedControlItemStyles = import_styled_components67.css`
|
|
|
10620
10732
|
}
|
|
10621
10733
|
}
|
|
10622
10734
|
`;
|
|
10623
|
-
var StyledSegmentedControlItem = (0,
|
|
10735
|
+
var StyledSegmentedControlItem = (0, import_styled_components68.default)(import_react_toggle_group2.Item)`
|
|
10624
10736
|
${segmentedControlItemStyles}
|
|
10625
10737
|
`;
|
|
10626
10738
|
var SegmentedControlItem = (0, import_react48.forwardRef)(
|
|
@@ -10661,12 +10773,12 @@ var SegmentedControlItem = (0, import_react48.forwardRef)(
|
|
|
10661
10773
|
resizeObserver.disconnect();
|
|
10662
10774
|
};
|
|
10663
10775
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
10664
|
-
return /* @__PURE__ */ (0,
|
|
10776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(
|
|
10665
10777
|
StyledSegmentedControlItem,
|
|
10666
10778
|
{
|
|
10667
10779
|
ref: combinedRef,
|
|
10668
|
-
$hasLabel: (0,
|
|
10669
|
-
"aria-label": (0,
|
|
10780
|
+
$hasLabel: (0, import_type_guards41.isNotNil)(label),
|
|
10781
|
+
"aria-label": (0, import_type_guards41.isNotNil)(label) ? void 0 : ariaLabel,
|
|
10670
10782
|
disabled,
|
|
10671
10783
|
onClick: handleClick,
|
|
10672
10784
|
value,
|
|
@@ -10683,9 +10795,9 @@ SegmentedControlItem.displayName = "SegmentedControlItem";
|
|
|
10683
10795
|
// src/components/Select/Select.tsx
|
|
10684
10796
|
var import_react_select = require("@radix-ui/react-select");
|
|
10685
10797
|
var import_react49 = require("react");
|
|
10686
|
-
var
|
|
10687
|
-
var
|
|
10688
|
-
var StyledTrigger = (0,
|
|
10798
|
+
var import_styled_components69 = __toESM(require("styled-components"));
|
|
10799
|
+
var import_jsx_runtime246 = require("react/jsx-runtime");
|
|
10800
|
+
var StyledTrigger = (0, import_styled_components69.default)(import_react_select.Trigger)`
|
|
10689
10801
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
10690
10802
|
--wui-select-color-bg: var(--wui-color-bg-surface);
|
|
10691
10803
|
--wui-select-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
@@ -10733,7 +10845,7 @@ var StyledTrigger = (0, import_styled_components68.default)(import_react_select.
|
|
|
10733
10845
|
background-color: var(--wui-color-bg-surface-disabled);
|
|
10734
10846
|
}
|
|
10735
10847
|
`;
|
|
10736
|
-
var StyledContent3 = (0,
|
|
10848
|
+
var StyledContent3 = (0, import_styled_components69.default)(import_react_select.Content)`
|
|
10737
10849
|
--wui-select-content-border: var(--wui-color-border);
|
|
10738
10850
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
10739
10851
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -10761,13 +10873,13 @@ var Select = (0, import_react49.forwardRef)(
|
|
|
10761
10873
|
...props
|
|
10762
10874
|
}, forwardedRef) => {
|
|
10763
10875
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
10764
|
-
return /* @__PURE__ */ (0,
|
|
10876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10765
10877
|
import_react_select.Root,
|
|
10766
10878
|
{
|
|
10767
10879
|
...props,
|
|
10768
10880
|
onValueChange: onChange,
|
|
10769
10881
|
children: [
|
|
10770
|
-
/* @__PURE__ */ (0,
|
|
10882
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(
|
|
10771
10883
|
StyledTrigger,
|
|
10772
10884
|
{
|
|
10773
10885
|
ref: forwardedRef,
|
|
@@ -10775,8 +10887,8 @@ var Select = (0, import_react49.forwardRef)(
|
|
|
10775
10887
|
$fullWidth: responsiveFullWidth,
|
|
10776
10888
|
...props,
|
|
10777
10889
|
children: [
|
|
10778
|
-
/* @__PURE__ */ (0,
|
|
10779
|
-
/* @__PURE__ */ (0,
|
|
10890
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_select.Value, { placeholder }),
|
|
10891
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(
|
|
10780
10892
|
Icon,
|
|
10781
10893
|
{
|
|
10782
10894
|
size: "md",
|
|
@@ -10786,10 +10898,10 @@ var Select = (0, import_react49.forwardRef)(
|
|
|
10786
10898
|
]
|
|
10787
10899
|
}
|
|
10788
10900
|
),
|
|
10789
|
-
/* @__PURE__ */ (0,
|
|
10790
|
-
/* @__PURE__ */ (0,
|
|
10791
|
-
/* @__PURE__ */ (0,
|
|
10792
|
-
/* @__PURE__ */ (0,
|
|
10901
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime246.jsxs)(StyledContent3, { position: "popper", children: [
|
|
10902
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_select.ScrollUpButton, { children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Icon, { type: "caret-up" }) }),
|
|
10903
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_select.Viewport, { children }),
|
|
10904
|
+
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(import_react_select.ScrollDownButton, { children: /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Icon, { type: "caret-down" }) })
|
|
10793
10905
|
] }) })
|
|
10794
10906
|
]
|
|
10795
10907
|
}
|
|
@@ -10801,9 +10913,9 @@ Select.displayName = "Select";
|
|
|
10801
10913
|
// src/components/Select/SelectOption.tsx
|
|
10802
10914
|
var import_react_select2 = require("@radix-ui/react-select");
|
|
10803
10915
|
var import_react50 = require("react");
|
|
10804
|
-
var
|
|
10805
|
-
var
|
|
10806
|
-
var StyledItem = (0,
|
|
10916
|
+
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10917
|
+
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10918
|
+
var StyledItem = (0, import_styled_components70.default)(import_react_select2.Item)`
|
|
10807
10919
|
${variantStyleMap2.body3};
|
|
10808
10920
|
display: flex;
|
|
10809
10921
|
padding: var(--wui-select-option-padding);
|
|
@@ -10826,25 +10938,25 @@ var StyledItem = (0, import_styled_components69.default)(import_react_select2.It
|
|
|
10826
10938
|
background-color: transparent;
|
|
10827
10939
|
}
|
|
10828
10940
|
`;
|
|
10829
|
-
var StyledIconContainer =
|
|
10941
|
+
var StyledIconContainer = import_styled_components70.default.span`
|
|
10830
10942
|
width: 12px;
|
|
10831
10943
|
`;
|
|
10832
10944
|
var SelectOption = (0, import_react50.forwardRef)(
|
|
10833
10945
|
({ children, ...props }, forwardedRef) => {
|
|
10834
|
-
return /* @__PURE__ */ (0,
|
|
10946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
|
|
10835
10947
|
StyledItem,
|
|
10836
10948
|
{
|
|
10837
10949
|
...props,
|
|
10838
10950
|
ref: forwardedRef,
|
|
10839
10951
|
children: [
|
|
10840
|
-
/* @__PURE__ */ (0,
|
|
10952
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(StyledIconContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_select2.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10841
10953
|
Icon,
|
|
10842
10954
|
{
|
|
10843
10955
|
size: "sm",
|
|
10844
10956
|
type: "checkmark"
|
|
10845
10957
|
}
|
|
10846
10958
|
) }) }),
|
|
10847
|
-
/* @__PURE__ */ (0,
|
|
10959
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(import_react_select2.ItemText, { children })
|
|
10848
10960
|
]
|
|
10849
10961
|
}
|
|
10850
10962
|
);
|
|
@@ -10854,14 +10966,14 @@ SelectOption.displayName = "Option";
|
|
|
10854
10966
|
|
|
10855
10967
|
// src/components/Select/SelectOptionGroup.tsx
|
|
10856
10968
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
10857
|
-
var
|
|
10858
|
-
var
|
|
10859
|
-
var StyledLabel4 = (0,
|
|
10969
|
+
var import_styled_components71 = __toESM(require("styled-components"));
|
|
10970
|
+
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
10971
|
+
var StyledLabel4 = (0, import_styled_components71.default)(import_react_select3.Label)`
|
|
10860
10972
|
padding: var(--wui-select-option-padding);
|
|
10861
10973
|
`;
|
|
10862
10974
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10863
|
-
return /* @__PURE__ */ (0,
|
|
10864
|
-
/* @__PURE__ */ (0,
|
|
10975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
10976
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(StyledLabel4, { children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
10865
10977
|
Text,
|
|
10866
10978
|
{
|
|
10867
10979
|
prominence: "secondary",
|
|
@@ -10874,19 +10986,19 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
|
10874
10986
|
};
|
|
10875
10987
|
|
|
10876
10988
|
// src/components/Table/Table.tsx
|
|
10877
|
-
var
|
|
10878
|
-
var
|
|
10879
|
-
var StyledTable =
|
|
10989
|
+
var import_styled_components72 = __toESM(require("styled-components"));
|
|
10990
|
+
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
10991
|
+
var StyledTable = import_styled_components72.default.table`
|
|
10880
10992
|
width: 100%;
|
|
10881
10993
|
border-collapse: collapse;
|
|
10882
10994
|
|
|
10883
|
-
${({ $striped }) => $striped &&
|
|
10995
|
+
${({ $striped }) => $striped && import_styled_components72.css`
|
|
10884
10996
|
tbody tr:nth-child(even) {
|
|
10885
10997
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
10886
10998
|
}
|
|
10887
10999
|
`}
|
|
10888
11000
|
|
|
10889
|
-
${({ $divided }) => $divided &&
|
|
11001
|
+
${({ $divided }) => $divided && import_styled_components72.css`
|
|
10890
11002
|
tr {
|
|
10891
11003
|
border-bottom: 1px solid var(--wui-color-border);
|
|
10892
11004
|
}
|
|
@@ -10898,7 +11010,7 @@ var Table = ({
|
|
|
10898
11010
|
divided = false,
|
|
10899
11011
|
...props
|
|
10900
11012
|
}) => {
|
|
10901
|
-
return /* @__PURE__ */ (0,
|
|
11013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
10902
11014
|
StyledTable,
|
|
10903
11015
|
{
|
|
10904
11016
|
$divided: divided,
|
|
@@ -10910,35 +11022,35 @@ var Table = ({
|
|
|
10910
11022
|
};
|
|
10911
11023
|
|
|
10912
11024
|
// src/components/Table/TableBody.tsx
|
|
10913
|
-
var
|
|
11025
|
+
var import_styled_components73 = __toESM(require("styled-components"));
|
|
10914
11026
|
|
|
10915
11027
|
// src/components/Table/TableSectionContext.ts
|
|
10916
11028
|
var import_react51 = require("react");
|
|
10917
11029
|
var TableSectionContext = (0, import_react51.createContext)(null);
|
|
10918
11030
|
|
|
10919
11031
|
// src/components/Table/TableBody.tsx
|
|
10920
|
-
var
|
|
10921
|
-
var StyledTbody =
|
|
11032
|
+
var import_jsx_runtime250 = require("react/jsx-runtime");
|
|
11033
|
+
var StyledTbody = import_styled_components73.default.tbody``;
|
|
10922
11034
|
var TableBody = ({ children, ...props }) => {
|
|
10923
|
-
return /* @__PURE__ */ (0,
|
|
11035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(StyledTbody, { ...props, children }) });
|
|
10924
11036
|
};
|
|
10925
11037
|
|
|
10926
11038
|
// src/components/Table/TableCell.tsx
|
|
10927
11039
|
var import_react52 = require("react");
|
|
10928
|
-
var
|
|
10929
|
-
var
|
|
10930
|
-
var sharedStyles =
|
|
11040
|
+
var import_styled_components74 = __toESM(require("styled-components"));
|
|
11041
|
+
var import_jsx_runtime251 = require("react/jsx-runtime");
|
|
11042
|
+
var sharedStyles = import_styled_components74.css`
|
|
10931
11043
|
color: var(--wui-color-text);
|
|
10932
11044
|
padding: var(--wui-space-02);
|
|
10933
11045
|
text-align: left;
|
|
10934
11046
|
`;
|
|
10935
|
-
var StyledTh =
|
|
11047
|
+
var StyledTh = import_styled_components74.default.th`
|
|
10936
11048
|
${sharedStyles}
|
|
10937
11049
|
font-size: var(--wui-typography-body-4-size);
|
|
10938
11050
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
10939
11051
|
line-height: var(--wui-typography-body-4-line-height);
|
|
10940
11052
|
`;
|
|
10941
|
-
var StyledTd =
|
|
11053
|
+
var StyledTd = import_styled_components74.default.td`
|
|
10942
11054
|
${sharedStyles}
|
|
10943
11055
|
font-size: var(--wui-typography-body-2-size);
|
|
10944
11056
|
font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -10947,51 +11059,51 @@ var StyledTd = import_styled_components73.default.td`
|
|
|
10947
11059
|
var TableCell = ({ children, ...props }) => {
|
|
10948
11060
|
const section = (0, import_react52.useContext)(TableSectionContext);
|
|
10949
11061
|
if (section === "head") {
|
|
10950
|
-
return /* @__PURE__ */ (0,
|
|
11062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTh, { ...props, children });
|
|
10951
11063
|
}
|
|
10952
|
-
return /* @__PURE__ */ (0,
|
|
11064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTd, { ...props, children });
|
|
10953
11065
|
};
|
|
10954
11066
|
|
|
10955
11067
|
// src/components/Table/TableFooter.tsx
|
|
10956
|
-
var
|
|
10957
|
-
var
|
|
10958
|
-
var StyledTfoot =
|
|
11068
|
+
var import_styled_components75 = __toESM(require("styled-components"));
|
|
11069
|
+
var import_jsx_runtime252 = require("react/jsx-runtime");
|
|
11070
|
+
var StyledTfoot = import_styled_components75.default.tfoot``;
|
|
10959
11071
|
var TableFooter = ({ children, ...props }) => {
|
|
10960
|
-
return /* @__PURE__ */ (0,
|
|
11072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTfoot, { ...props, children }) });
|
|
10961
11073
|
};
|
|
10962
11074
|
|
|
10963
11075
|
// src/components/Table/TableHead.tsx
|
|
10964
|
-
var
|
|
10965
|
-
var
|
|
10966
|
-
var StyledThead =
|
|
11076
|
+
var import_styled_components76 = __toESM(require("styled-components"));
|
|
11077
|
+
var import_jsx_runtime253 = require("react/jsx-runtime");
|
|
11078
|
+
var StyledThead = import_styled_components76.default.thead``;
|
|
10967
11079
|
var TableHead = ({ children, ...props }) => {
|
|
10968
|
-
return /* @__PURE__ */ (0,
|
|
11080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledThead, { ...props, children }) });
|
|
10969
11081
|
};
|
|
10970
11082
|
|
|
10971
11083
|
// src/components/Table/TableRow.tsx
|
|
10972
|
-
var
|
|
10973
|
-
var
|
|
10974
|
-
var StyledTr =
|
|
11084
|
+
var import_styled_components77 = __toESM(require("styled-components"));
|
|
11085
|
+
var import_jsx_runtime254 = require("react/jsx-runtime");
|
|
11086
|
+
var StyledTr = import_styled_components77.default.tr``;
|
|
10975
11087
|
var TableRow = ({ children, ...props }) => {
|
|
10976
|
-
return /* @__PURE__ */ (0,
|
|
11088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(StyledTr, { ...props, children });
|
|
10977
11089
|
};
|
|
10978
11090
|
|
|
10979
11091
|
// src/components/Tabs/Tabs.tsx
|
|
10980
11092
|
var import_react57 = require("react");
|
|
10981
11093
|
var import_react_tabs4 = require("@radix-ui/react-tabs");
|
|
10982
|
-
var
|
|
10983
|
-
var
|
|
11094
|
+
var import_type_guards43 = require("@wistia/type-guards");
|
|
11095
|
+
var import_styled_components82 = __toESM(require("styled-components"));
|
|
10984
11096
|
|
|
10985
11097
|
// src/components/Tabs/TabPanel.tsx
|
|
10986
|
-
var
|
|
11098
|
+
var import_styled_components78 = __toESM(require("styled-components"));
|
|
10987
11099
|
var import_react_tabs = require("@radix-ui/react-tabs");
|
|
10988
|
-
var
|
|
10989
|
-
var StyledTabPanel = (0,
|
|
11100
|
+
var import_jsx_runtime255 = require("react/jsx-runtime");
|
|
11101
|
+
var StyledTabPanel = (0, import_styled_components78.default)(import_react_tabs.Content)`
|
|
10990
11102
|
display: flex;
|
|
10991
11103
|
flex-direction: column;
|
|
10992
11104
|
`;
|
|
10993
11105
|
var TabPanel = ({ children, value, ...props }) => {
|
|
10994
|
-
return /* @__PURE__ */ (0,
|
|
11106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
|
|
10995
11107
|
StyledTabPanel,
|
|
10996
11108
|
{
|
|
10997
11109
|
value,
|
|
@@ -11003,10 +11115,10 @@ var TabPanel = ({ children, value, ...props }) => {
|
|
|
11003
11115
|
TabPanel.displayName = "TabPanel";
|
|
11004
11116
|
|
|
11005
11117
|
// src/components/Tabs/TabList.tsx
|
|
11006
|
-
var
|
|
11118
|
+
var import_styled_components79 = __toESM(require("styled-components"));
|
|
11007
11119
|
var import_react_tabs2 = require("@radix-ui/react-tabs");
|
|
11008
|
-
var
|
|
11009
|
-
var StyledTabList = (0,
|
|
11120
|
+
var import_jsx_runtime256 = require("react/jsx-runtime");
|
|
11121
|
+
var StyledTabList = (0, import_styled_components79.default)(import_react_tabs2.List)`
|
|
11010
11122
|
${segmentedControlStyles}
|
|
11011
11123
|
|
|
11012
11124
|
margin-bottom: var(--wui-space-04);
|
|
@@ -11019,7 +11131,7 @@ var TabList = ({
|
|
|
11019
11131
|
ariaLabel,
|
|
11020
11132
|
...props
|
|
11021
11133
|
}) => {
|
|
11022
|
-
return /* @__PURE__ */ (0,
|
|
11134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
|
|
11023
11135
|
StyledTabList,
|
|
11024
11136
|
{
|
|
11025
11137
|
$fullWidth: fullWidth,
|
|
@@ -11033,9 +11145,9 @@ TabList.displayName = "TabList";
|
|
|
11033
11145
|
|
|
11034
11146
|
// src/components/Tabs/TabItem.tsx
|
|
11035
11147
|
var import_react54 = require("react");
|
|
11036
|
-
var
|
|
11148
|
+
var import_styled_components80 = __toESM(require("styled-components"));
|
|
11037
11149
|
var import_react_tabs3 = require("@radix-ui/react-tabs");
|
|
11038
|
-
var
|
|
11150
|
+
var import_type_guards42 = require("@wistia/type-guards");
|
|
11039
11151
|
|
|
11040
11152
|
// src/components/Tabs/useTabsValue.tsx
|
|
11041
11153
|
var import_react53 = require("react");
|
|
@@ -11050,8 +11162,8 @@ var useTabsValue = () => {
|
|
|
11050
11162
|
};
|
|
11051
11163
|
|
|
11052
11164
|
// src/components/Tabs/TabItem.tsx
|
|
11053
|
-
var
|
|
11054
|
-
var StyledTabItem = (0,
|
|
11165
|
+
var import_jsx_runtime257 = require("react/jsx-runtime");
|
|
11166
|
+
var StyledTabItem = (0, import_styled_components80.default)(import_react_tabs3.Trigger)`
|
|
11055
11167
|
${segmentedControlItemStyles}
|
|
11056
11168
|
|
|
11057
11169
|
&:focus-visible {
|
|
@@ -11089,12 +11201,12 @@ var TabItem = (0, import_react54.forwardRef)(
|
|
|
11089
11201
|
resizeObserver.disconnect();
|
|
11090
11202
|
};
|
|
11091
11203
|
}, [selectedValue, setSelectedItemMeasurements, value]);
|
|
11092
|
-
return /* @__PURE__ */ (0,
|
|
11204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
|
|
11093
11205
|
StyledTabItem,
|
|
11094
11206
|
{
|
|
11095
11207
|
ref: combinedRef,
|
|
11096
|
-
$hasLabel: (0,
|
|
11097
|
-
"aria-label": (0,
|
|
11208
|
+
$hasLabel: (0, import_type_guards42.isNotNil)(label),
|
|
11209
|
+
"aria-label": (0, import_type_guards42.isNotNil)(label) ? void 0 : ariaLabel,
|
|
11098
11210
|
disabled,
|
|
11099
11211
|
value,
|
|
11100
11212
|
children: [
|
|
@@ -11131,9 +11243,9 @@ var extractTabItems = (children) => {
|
|
|
11131
11243
|
|
|
11132
11244
|
// src/components/Tabs/SelectedItemIndicator.tsx
|
|
11133
11245
|
var import_react56 = require("react");
|
|
11134
|
-
var
|
|
11135
|
-
var
|
|
11136
|
-
var TabsSelectedItemIndicatorDiv = (0,
|
|
11246
|
+
var import_styled_components81 = __toESM(require("styled-components"));
|
|
11247
|
+
var import_jsx_runtime258 = require("react/jsx-runtime");
|
|
11248
|
+
var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(SelectedItemIndicatorDiv)`
|
|
11137
11249
|
&:has(~ ${StyledTabItem}:focus-visible) {
|
|
11138
11250
|
outline: 2px solid var(--wui-color-focus-ring);
|
|
11139
11251
|
}
|
|
@@ -11152,7 +11264,7 @@ var SelectedItemIndicator2 = () => {
|
|
|
11152
11264
|
if (selectedValue == null) {
|
|
11153
11265
|
return null;
|
|
11154
11266
|
}
|
|
11155
|
-
return /* @__PURE__ */ (0,
|
|
11267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
|
|
11156
11268
|
TabsSelectedItemIndicatorDiv,
|
|
11157
11269
|
{
|
|
11158
11270
|
style: {
|
|
@@ -11165,19 +11277,19 @@ var SelectedItemIndicator2 = () => {
|
|
|
11165
11277
|
};
|
|
11166
11278
|
|
|
11167
11279
|
// src/components/Tabs/Tabs.tsx
|
|
11168
|
-
var
|
|
11169
|
-
var TabsContainer =
|
|
11280
|
+
var import_jsx_runtime259 = require("react/jsx-runtime");
|
|
11281
|
+
var TabsContainer = import_styled_components82.default.div`
|
|
11170
11282
|
display: flex;
|
|
11171
11283
|
flex-direction: column;
|
|
11172
11284
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
11173
11285
|
overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11174
11286
|
`;
|
|
11175
|
-
var StickyTabContent =
|
|
11287
|
+
var StickyTabContent = import_styled_components82.default.div`
|
|
11176
11288
|
flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
|
|
11177
11289
|
overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
|
|
11178
11290
|
overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
|
|
11179
11291
|
`;
|
|
11180
|
-
var StyledTabsRoot = (0,
|
|
11292
|
+
var StyledTabsRoot = (0, import_styled_components82.default)(import_react_tabs4.Root)`
|
|
11181
11293
|
display: flex;
|
|
11182
11294
|
flex-direction: column;
|
|
11183
11295
|
height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
|
|
@@ -11200,7 +11312,7 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11200
11312
|
onValueChange: setInternalSelectedValue
|
|
11201
11313
|
} : { value: selectedValue, onValueChange: onSelectedValueChange };
|
|
11202
11314
|
const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
|
|
11203
|
-
return /* @__PURE__ */ (0,
|
|
11315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11204
11316
|
StyledTabsRoot,
|
|
11205
11317
|
{
|
|
11206
11318
|
ref,
|
|
@@ -11208,14 +11320,14 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11208
11320
|
activationMode: "automatic",
|
|
11209
11321
|
...otherProps,
|
|
11210
11322
|
...modeProps,
|
|
11211
|
-
children: /* @__PURE__ */ (0,
|
|
11212
|
-
/* @__PURE__ */ (0,
|
|
11323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(SelectedItemMeasurementsProvider, { children: [
|
|
11324
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
|
|
11213
11325
|
TabList,
|
|
11214
11326
|
{
|
|
11215
11327
|
ariaLabel,
|
|
11216
11328
|
fullWidth,
|
|
11217
11329
|
children: [
|
|
11218
|
-
/* @__PURE__ */ (0,
|
|
11330
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SelectedItemIndicator2, {}),
|
|
11219
11331
|
tabItems.map((tab) => {
|
|
11220
11332
|
const {
|
|
11221
11333
|
value,
|
|
@@ -11224,8 +11336,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11224
11336
|
label,
|
|
11225
11337
|
"aria-label": ariaLabelForTab
|
|
11226
11338
|
} = tab.props;
|
|
11227
|
-
if ((0,
|
|
11228
|
-
return /* @__PURE__ */ (0,
|
|
11339
|
+
if ((0, import_type_guards43.isNil)(icon)) {
|
|
11340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11229
11341
|
TabItem,
|
|
11230
11342
|
{
|
|
11231
11343
|
disabled,
|
|
@@ -11235,8 +11347,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11235
11347
|
value
|
|
11236
11348
|
);
|
|
11237
11349
|
}
|
|
11238
|
-
if ((0,
|
|
11239
|
-
return /* @__PURE__ */ (0,
|
|
11350
|
+
if ((0, import_type_guards43.isNotNil)(label)) {
|
|
11351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11240
11352
|
TabItem,
|
|
11241
11353
|
{
|
|
11242
11354
|
disabled,
|
|
@@ -11247,8 +11359,8 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11247
11359
|
value
|
|
11248
11360
|
);
|
|
11249
11361
|
}
|
|
11250
|
-
if ((0,
|
|
11251
|
-
return /* @__PURE__ */ (0,
|
|
11362
|
+
if ((0, import_type_guards43.isNotNil)(ariaLabelForTab)) {
|
|
11363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11252
11364
|
TabItem,
|
|
11253
11365
|
{
|
|
11254
11366
|
"aria-label": ariaLabelForTab,
|
|
@@ -11264,7 +11376,7 @@ var Tabs = (0, import_react57.forwardRef)(
|
|
|
11264
11376
|
]
|
|
11265
11377
|
}
|
|
11266
11378
|
),
|
|
11267
|
-
/* @__PURE__ */ (0,
|
|
11379
|
+
/* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
|
|
11268
11380
|
TabPanel,
|
|
11269
11381
|
{
|
|
11270
11382
|
value: tab.props.value,
|
|
@@ -11281,27 +11393,34 @@ Tabs.displayName = "Tabs";
|
|
|
11281
11393
|
|
|
11282
11394
|
// src/components/Tabs/Tab.tsx
|
|
11283
11395
|
var import_react58 = require("react");
|
|
11284
|
-
var
|
|
11396
|
+
var import_jsx_runtime260 = require("react/jsx-runtime");
|
|
11285
11397
|
var Tab = (0, import_react58.forwardRef)(({ children }, ref) => {
|
|
11286
|
-
return /* @__PURE__ */ (0,
|
|
11398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("div", { ref, children });
|
|
11287
11399
|
});
|
|
11288
11400
|
Tab.displayName = "Tab";
|
|
11289
11401
|
|
|
11290
11402
|
// src/components/Tag/Tag.tsx
|
|
11291
11403
|
var import_react59 = require("react");
|
|
11292
|
-
var
|
|
11293
|
-
var
|
|
11294
|
-
var
|
|
11295
|
-
var TagLabel =
|
|
11404
|
+
var import_styled_components83 = __toESM(require("styled-components"));
|
|
11405
|
+
var import_type_guards44 = require("@wistia/type-guards");
|
|
11406
|
+
var import_jsx_runtime261 = require("react/jsx-runtime");
|
|
11407
|
+
var TagLabel = import_styled_components83.default.a`
|
|
11296
11408
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11297
11409
|
font-size: var(--wui-typography-label-4-size);
|
|
11298
11410
|
font-weight: var(--wui-typography-label-4-weight);
|
|
11299
11411
|
line-height: var(--wui-typography-label-4-line-height);
|
|
11300
11412
|
border-radius: var(--wui-border-radius-01);
|
|
11413
|
+
display: flex;
|
|
11301
11414
|
align-items: center;
|
|
11302
11415
|
color: var(--wui-color-text);
|
|
11303
11416
|
text-decoration: none;
|
|
11304
11417
|
padding: var(--wui-space-01);
|
|
11418
|
+
gap: var(--wui-space-01);
|
|
11419
|
+
|
|
11420
|
+
svg {
|
|
11421
|
+
height: 12px;
|
|
11422
|
+
width: 12px;
|
|
11423
|
+
}
|
|
11305
11424
|
|
|
11306
11425
|
:not(:only-child) {
|
|
11307
11426
|
padding-right: var(--wui-space-01);
|
|
@@ -11320,14 +11439,14 @@ var TagLabel = import_styled_components82.default.a`
|
|
|
11320
11439
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11321
11440
|
}
|
|
11322
11441
|
`;
|
|
11323
|
-
var TagDivider =
|
|
11442
|
+
var TagDivider = import_styled_components83.default.div`
|
|
11324
11443
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11325
11444
|
border-left: 1px solid var(--wui-color-border);
|
|
11326
11445
|
display: flex;
|
|
11327
11446
|
height: 14px;
|
|
11328
11447
|
width: 1px;
|
|
11329
11448
|
`;
|
|
11330
|
-
var StyledRemoveButton =
|
|
11449
|
+
var StyledRemoveButton = import_styled_components83.default.button`
|
|
11331
11450
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11332
11451
|
all: unset;
|
|
11333
11452
|
cursor: pointer;
|
|
@@ -11355,7 +11474,7 @@ var StyledRemoveButton = import_styled_components82.default.button`
|
|
|
11355
11474
|
box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
|
|
11356
11475
|
}
|
|
11357
11476
|
`;
|
|
11358
|
-
var StyledTag =
|
|
11477
|
+
var StyledTag = import_styled_components83.default.div`
|
|
11359
11478
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
11360
11479
|
align-items: center;
|
|
11361
11480
|
background-color: var(--wui-color-bg-surface-secondary);
|
|
@@ -11368,55 +11487,67 @@ var StyledTag = import_styled_components82.default.div`
|
|
|
11368
11487
|
}
|
|
11369
11488
|
`;
|
|
11370
11489
|
var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
|
|
11371
|
-
if ((0,
|
|
11490
|
+
if ((0, import_type_guards44.isNil)(onClickRemove)) {
|
|
11372
11491
|
return null;
|
|
11373
11492
|
}
|
|
11374
|
-
if ((0,
|
|
11493
|
+
if ((0, import_type_guards44.isNil)(onClickRemoveLabel)) {
|
|
11375
11494
|
throw new Error(
|
|
11376
11495
|
"for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
|
|
11377
11496
|
);
|
|
11378
11497
|
}
|
|
11379
|
-
return /* @__PURE__ */ (0,
|
|
11380
|
-
/* @__PURE__ */ (0,
|
|
11381
|
-
/* @__PURE__ */ (0,
|
|
11498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
|
|
11499
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TagDivider, { $colorScheme: colorScheme }),
|
|
11500
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
11382
11501
|
StyledRemoveButton,
|
|
11383
11502
|
{
|
|
11384
11503
|
$colorScheme: colorScheme,
|
|
11385
11504
|
onClick: onClickRemove,
|
|
11386
11505
|
type: "button",
|
|
11387
11506
|
children: [
|
|
11388
|
-
/* @__PURE__ */ (0,
|
|
11507
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
11389
11508
|
Icon,
|
|
11390
11509
|
{
|
|
11391
11510
|
size: "sm",
|
|
11392
11511
|
type: "close"
|
|
11393
11512
|
}
|
|
11394
11513
|
),
|
|
11395
|
-
/* @__PURE__ */ (0,
|
|
11514
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
|
|
11396
11515
|
]
|
|
11397
11516
|
}
|
|
11398
11517
|
)
|
|
11399
11518
|
] });
|
|
11400
11519
|
};
|
|
11401
11520
|
var Tag = (0, import_react59.forwardRef)(
|
|
11402
|
-
({
|
|
11403
|
-
|
|
11404
|
-
|
|
11521
|
+
({
|
|
11522
|
+
onClickRemove,
|
|
11523
|
+
colorScheme = "inherit",
|
|
11524
|
+
href,
|
|
11525
|
+
icon,
|
|
11526
|
+
label,
|
|
11527
|
+
onClickRemoveLabel,
|
|
11528
|
+
...otherProps
|
|
11529
|
+
}, ref) => {
|
|
11530
|
+
const hasIcon = (0, import_type_guards44.isNotNil)(icon);
|
|
11531
|
+
const labelProps = (0, import_type_guards44.isNotNil)(href) && (0, import_type_guards44.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
|
|
11532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
11405
11533
|
StyledTag,
|
|
11406
11534
|
{
|
|
11407
11535
|
ref,
|
|
11408
11536
|
$colorScheme: colorScheme,
|
|
11409
11537
|
...otherProps,
|
|
11410
11538
|
children: [
|
|
11411
|
-
/* @__PURE__ */ (0,
|
|
11539
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
|
|
11412
11540
|
TagLabel,
|
|
11413
11541
|
{
|
|
11414
11542
|
...labelProps,
|
|
11415
11543
|
$colorScheme: colorScheme,
|
|
11416
|
-
children:
|
|
11544
|
+
children: [
|
|
11545
|
+
hasIcon ? icon : null,
|
|
11546
|
+
label
|
|
11547
|
+
]
|
|
11417
11548
|
}
|
|
11418
11549
|
),
|
|
11419
|
-
/* @__PURE__ */ (0,
|
|
11550
|
+
/* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
|
|
11420
11551
|
RemoveButton,
|
|
11421
11552
|
{
|
|
11422
11553
|
colorScheme,
|
|
@@ -11432,26 +11563,26 @@ var Tag = (0, import_react59.forwardRef)(
|
|
|
11432
11563
|
Tag.displayName = "Tag";
|
|
11433
11564
|
|
|
11434
11565
|
// src/components/WistiaLogo/WistiaLogo.tsx
|
|
11435
|
-
var
|
|
11436
|
-
var
|
|
11437
|
-
var
|
|
11566
|
+
var import_styled_components84 = __toESM(require("styled-components"));
|
|
11567
|
+
var import_type_guards45 = require("@wistia/type-guards");
|
|
11568
|
+
var import_jsx_runtime262 = require("react/jsx-runtime");
|
|
11438
11569
|
var renderBrandmark = (brandmarkColor, iconOnly) => {
|
|
11439
11570
|
if (iconOnly) {
|
|
11440
|
-
return /* @__PURE__ */ (0,
|
|
11571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11441
11572
|
"g",
|
|
11442
11573
|
{
|
|
11443
11574
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11444
11575
|
fill: brandmarkColor,
|
|
11445
|
-
children: /* @__PURE__ */ (0,
|
|
11576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime262.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" })
|
|
11446
11577
|
}
|
|
11447
11578
|
);
|
|
11448
11579
|
}
|
|
11449
|
-
return /* @__PURE__ */ (0,
|
|
11580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11450
11581
|
"g",
|
|
11451
11582
|
{
|
|
11452
11583
|
"data-testid": "ui-wistia-logo-brandmark",
|
|
11453
11584
|
fill: brandmarkColor,
|
|
11454
|
-
children: /* @__PURE__ */ (0,
|
|
11585
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime262.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" })
|
|
11455
11586
|
}
|
|
11456
11587
|
);
|
|
11457
11588
|
};
|
|
@@ -11459,12 +11590,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
|
|
|
11459
11590
|
if (iconOnly) {
|
|
11460
11591
|
return null;
|
|
11461
11592
|
}
|
|
11462
|
-
return /* @__PURE__ */ (0,
|
|
11593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
|
|
11463
11594
|
"g",
|
|
11464
11595
|
{
|
|
11465
11596
|
"data-testid": "ui-wistia-logo-logotype",
|
|
11466
11597
|
fill: logotypeColor,
|
|
11467
|
-
children: /* @__PURE__ */ (0,
|
|
11598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime262.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" })
|
|
11468
11599
|
}
|
|
11469
11600
|
);
|
|
11470
11601
|
};
|
|
@@ -11474,7 +11605,7 @@ var computedViewBox = (iconOnly) => {
|
|
|
11474
11605
|
}
|
|
11475
11606
|
return "0 0 144 31.47";
|
|
11476
11607
|
};
|
|
11477
|
-
var WistiaLogoComponent =
|
|
11608
|
+
var WistiaLogoComponent = import_styled_components84.default.svg`
|
|
11478
11609
|
height: ${({ height }) => `${height}px`};
|
|
11479
11610
|
|
|
11480
11611
|
/* ensure it will always fit on mobile */
|
|
@@ -11490,12 +11621,12 @@ var WistiaLogoComponent = import_styled_components83.default.svg`
|
|
|
11490
11621
|
${({ $opticallyCentered, $iconOnly }) => {
|
|
11491
11622
|
if ($opticallyCentered) {
|
|
11492
11623
|
if ($iconOnly) {
|
|
11493
|
-
return
|
|
11624
|
+
return import_styled_components84.css`
|
|
11494
11625
|
aspect-ratio: 1;
|
|
11495
11626
|
padding: 11.85% 3.12% 13.91%;
|
|
11496
11627
|
`;
|
|
11497
11628
|
}
|
|
11498
|
-
return
|
|
11629
|
+
return import_styled_components84.css`
|
|
11499
11630
|
aspect-ratio: 127 / 32;
|
|
11500
11631
|
`;
|
|
11501
11632
|
}
|
|
@@ -11532,7 +11663,7 @@ var WistiaLogo = ({
|
|
|
11532
11663
|
};
|
|
11533
11664
|
const brandmarkColor = VARIANT_COLORS[variant].brandmark;
|
|
11534
11665
|
const logotypeColor = VARIANT_COLORS[variant].logotype;
|
|
11535
|
-
const Logo = /* @__PURE__ */ (0,
|
|
11666
|
+
const Logo = /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
|
|
11536
11667
|
WistiaLogoComponent,
|
|
11537
11668
|
{
|
|
11538
11669
|
$hoverColor: hoverColor,
|
|
@@ -11545,14 +11676,14 @@ var WistiaLogo = ({
|
|
|
11545
11676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11546
11677
|
...otherProps,
|
|
11547
11678
|
children: [
|
|
11548
|
-
/* @__PURE__ */ (0,
|
|
11549
|
-
(0,
|
|
11679
|
+
/* @__PURE__ */ (0, import_jsx_runtime262.jsx)("title", { children: title }),
|
|
11680
|
+
(0, import_type_guards45.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("desc", { children: description }) : null,
|
|
11550
11681
|
renderBrandmark(brandmarkColor, iconOnly),
|
|
11551
11682
|
renderLogotype(logotypeColor, iconOnly)
|
|
11552
11683
|
]
|
|
11553
11684
|
}
|
|
11554
11685
|
);
|
|
11555
|
-
return href !== void 0 ? /* @__PURE__ */ (0,
|
|
11686
|
+
return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("a", { href, children: Logo }) : Logo;
|
|
11556
11687
|
};
|
|
11557
11688
|
WistiaLogo.displayName = "WistiaLogo";
|
|
11558
11689
|
// Annotate the CommonJS export names for ESM import in node:
|