@wistia/ui 0.6.19 → 0.6.20-beta.018053dc.9bb5958
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 +394 -417
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +29 -16
- package/dist/index.d.ts +29 -16
- package/dist/index.mjs +377 -400
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
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.20-beta.018053dc.9bb5958
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -7530,192 +7530,15 @@ var Card = ({
|
|
|
7530
7530
|
Card.displayName = "Card";
|
|
7531
7531
|
|
|
7532
7532
|
// src/components/Checkbox/Checkbox.tsx
|
|
7533
|
-
var import_react19 = require("react");
|
|
7534
|
-
var import_react_checkbox = require("@radix-ui/react-checkbox");
|
|
7535
|
-
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7536
|
-
var import_type_guards20 = require("@wistia/type-guards");
|
|
7537
|
-
|
|
7538
|
-
// src/components/Label/Label.tsx
|
|
7539
|
-
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7540
|
-
|
|
7541
|
-
// src/components/Heading/Heading.tsx
|
|
7542
7533
|
var import_react18 = require("react");
|
|
7543
|
-
var
|
|
7544
|
-
var
|
|
7545
|
-
var heroStyle = import_styled_components31.css`
|
|
7546
|
-
--font-family: var(--wui-typography-heading-hero-family);
|
|
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);
|
|
7586
|
-
`;
|
|
7587
|
-
var variantStyleMap = {
|
|
7588
|
-
hero: heroStyle,
|
|
7589
|
-
heading1: heading1TextStyle,
|
|
7590
|
-
heading2: heading2TextStyle,
|
|
7591
|
-
heading3: heading3TextStyle,
|
|
7592
|
-
heading4: heading4TextStyle,
|
|
7593
|
-
heading5: heading5TextStyle,
|
|
7594
|
-
heading6: heading6TextStyle
|
|
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;
|
|
7619
|
-
`;
|
|
7620
|
-
var variantElementMap = {
|
|
7621
|
-
hero: DEFAULT_ELEMENT2,
|
|
7622
|
-
heading1: DEFAULT_ELEMENT2,
|
|
7623
|
-
heading2: "h2",
|
|
7624
|
-
heading3: "h3",
|
|
7625
|
-
heading4: "h4",
|
|
7626
|
-
heading5: "h5",
|
|
7627
|
-
heading6: "h6"
|
|
7628
|
-
};
|
|
7629
|
-
var HeadingComponent = (0, import_react18.forwardRef)(
|
|
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,
|
|
7642
|
-
{
|
|
7643
|
-
ref,
|
|
7644
|
-
$align: align,
|
|
7645
|
-
$colorScheme: colorScheme,
|
|
7646
|
-
$disabled: disabled,
|
|
7647
|
-
$ellipsis: ellipsis,
|
|
7648
|
-
$inline: inline,
|
|
7649
|
-
$preventUserSelect: preventUserSelect,
|
|
7650
|
-
$variant: variant,
|
|
7651
|
-
as: renderAs ?? variantElementMap[variant],
|
|
7652
|
-
...otherProps
|
|
7653
|
-
}
|
|
7654
|
-
)
|
|
7655
|
-
);
|
|
7656
|
-
HeadingComponent.displayName = "Heading";
|
|
7657
|
-
var Heading = makePolymorphic(HeadingComponent);
|
|
7658
|
-
|
|
7659
|
-
// src/components/Label/Label.tsx
|
|
7660
|
-
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7661
|
-
var requiredStyle = import_styled_components32.css`
|
|
7662
|
-
&::after {
|
|
7663
|
-
color: var(--wui-color-text-error);
|
|
7664
|
-
display: inline;
|
|
7665
|
-
padding-left: var(--wui-space-01);
|
|
7666
|
-
content: '*';
|
|
7667
|
-
}
|
|
7668
|
-
`;
|
|
7669
|
-
var disabledStyle = import_styled_components32.css`
|
|
7670
|
-
color: var(--wui-color-text-disabled);
|
|
7671
|
-
`;
|
|
7672
|
-
var StyledLabel2 = (0, import_styled_components32.default)(Heading).attrs({
|
|
7673
|
-
variant: "heading6",
|
|
7674
|
-
renderAs: "label"
|
|
7675
|
-
})`
|
|
7676
|
-
display: block;
|
|
7677
|
-
width: 100%;
|
|
7678
|
-
|
|
7679
|
-
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
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}
|
|
7693
|
-
`;
|
|
7694
|
-
var Label = ({
|
|
7695
|
-
children,
|
|
7696
|
-
disabled = false,
|
|
7697
|
-
htmlFor,
|
|
7698
|
-
required = false,
|
|
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";
|
|
7534
|
+
var import_styled_components32 = __toESM(require("styled-components"));
|
|
7535
|
+
var import_type_guards20 = require("@wistia/type-guards");
|
|
7713
7536
|
|
|
7714
7537
|
// src/components/Label/LabelDescription.tsx
|
|
7715
|
-
var
|
|
7538
|
+
var import_styled_components31 = __toESM(require("styled-components"));
|
|
7716
7539
|
var import_type_guards19 = require("@wistia/type-guards");
|
|
7717
|
-
var
|
|
7718
|
-
var StyledLabelDescription =
|
|
7540
|
+
var import_jsx_runtime199 = require("react/jsx-runtime");
|
|
7541
|
+
var StyledLabelDescription = import_styled_components31.default.div`
|
|
7719
7542
|
color: var(--wui-color-text-secondary);
|
|
7720
7543
|
font-size: var(--wui-typography-body-4-size);
|
|
7721
7544
|
font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -7728,13 +7551,13 @@ var LabelDescription = ({
|
|
|
7728
7551
|
if ((0, import_type_guards19.isNil)(children)) {
|
|
7729
7552
|
return null;
|
|
7730
7553
|
}
|
|
7731
|
-
return /* @__PURE__ */ (0,
|
|
7554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime199.jsx)(StyledLabelDescription, { ...props, children });
|
|
7732
7555
|
};
|
|
7733
7556
|
LabelDescription.displayName = "LabelDescription";
|
|
7734
7557
|
|
|
7735
7558
|
// src/components/Checkbox/Checkbox.tsx
|
|
7736
|
-
var
|
|
7737
|
-
var CheckIcon = () => /* @__PURE__ */ (0,
|
|
7559
|
+
var import_jsx_runtime200 = require("react/jsx-runtime");
|
|
7560
|
+
var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
7738
7561
|
"svg",
|
|
7739
7562
|
{
|
|
7740
7563
|
fill: "inherit",
|
|
@@ -7742,137 +7565,112 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
|
7742
7565
|
viewBox: "0 0 10 8",
|
|
7743
7566
|
width: "10",
|
|
7744
7567
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7745
|
-
children: /* @__PURE__ */ (0,
|
|
7568
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
7746
7569
|
"path",
|
|
7747
7570
|
{
|
|
7748
7571
|
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: "
|
|
7572
|
+
fill: "currentColor"
|
|
7750
7573
|
}
|
|
7751
7574
|
)
|
|
7752
7575
|
}
|
|
7753
7576
|
);
|
|
7754
|
-
var
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
cursor: pointer;
|
|
7758
|
-
|
|
7759
|
-
&:hover {
|
|
7760
|
-
/* TODO Lamp to design hover state */
|
|
7761
|
-
}
|
|
7762
|
-
|
|
7763
|
-
&:focus-within {
|
|
7764
|
-
/* TODO Lamp to design focus state */
|
|
7765
|
-
background-color: #efefef;
|
|
7766
|
-
}
|
|
7577
|
+
var disabledStyle = import_styled_components32.css`
|
|
7578
|
+
cursor: not-allowed;
|
|
7579
|
+
opacity: 0.5;
|
|
7767
7580
|
`;
|
|
7768
|
-
var
|
|
7769
|
-
|
|
7770
|
-
|
|
7581
|
+
var inputSizeMedium = import_styled_components32.css`
|
|
7582
|
+
width: 16px;
|
|
7583
|
+
height: 16px;
|
|
7771
7584
|
min-width: 16px;
|
|
7772
7585
|
min-height: 16px;
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
border-style: solid;
|
|
7776
|
-
border-color: var(--wui-color-border);
|
|
7586
|
+
`;
|
|
7587
|
+
var StyledLabelWrapper = import_styled_components32.default.div`
|
|
7777
7588
|
display: flex;
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7589
|
+
flex-direction: column;
|
|
7590
|
+
`;
|
|
7591
|
+
var StyledCheckboxWrapper = import_styled_components32.default.div`
|
|
7592
|
+
display: flex;
|
|
7593
|
+
margin: 0;
|
|
7781
7594
|
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
}
|
|
7595
|
+
/* TODO this solves a problem but potentially causes and a11y issue */
|
|
7596
|
+
user-select: none;
|
|
7785
7597
|
|
|
7786
|
-
|
|
7787
|
-
|
|
7598
|
+
${({ disabled }) => disabled && disabledStyle};
|
|
7599
|
+
`;
|
|
7600
|
+
var StyledCheckboxInput = import_styled_components32.default.div`
|
|
7601
|
+
/* TODO prop-ify sizes */
|
|
7602
|
+
${inputSizeMedium}
|
|
7603
|
+
line-height: 0;
|
|
7604
|
+
margin: 0;
|
|
7605
|
+
border: 1px solid var(--wui-color-border);
|
|
7606
|
+
border-radius: var(--wui-border-radius-01);
|
|
7607
|
+
background-color: var(--wui-color-bg-fill-white);
|
|
7608
|
+
display: grid;
|
|
7609
|
+
place-content: center;
|
|
7610
|
+
align-self: flex-start;
|
|
7788
7611
|
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
}
|
|
7612
|
+
path {
|
|
7613
|
+
fill: var(--wui-color-bg-fill-white);
|
|
7792
7614
|
}
|
|
7615
|
+
`;
|
|
7616
|
+
var StyledLabel2 = import_styled_components32.default.label`
|
|
7617
|
+
cursor: pointer;
|
|
7618
|
+
display: flex;
|
|
7619
|
+
align-items: center;
|
|
7620
|
+
gap: var(--wui-space-01);
|
|
7621
|
+
`;
|
|
7622
|
+
var StyledHiddenCheckboxInput = import_styled_components32.default.input`
|
|
7623
|
+
${visuallyHiddenStyle}
|
|
7793
7624
|
|
|
7794
|
-
|
|
7795
|
-
|
|
7625
|
+
/* toggles display of faux-input background-color */
|
|
7626
|
+
&:checked + label [data-wui-faux-input='true'] {
|
|
7627
|
+
background-color: var(--wui-color-bg-fill);
|
|
7796
7628
|
}
|
|
7797
7629
|
|
|
7798
|
-
|
|
7799
|
-
|
|
7630
|
+
/* toggles display of CheckIcon */
|
|
7631
|
+
&:not(:checked) + label svg {
|
|
7632
|
+
display: none;
|
|
7800
7633
|
}
|
|
7801
7634
|
`;
|
|
7802
|
-
var
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
value = "false",
|
|
7822
|
-
...otherProps
|
|
7823
|
-
}, ref) => {
|
|
7824
|
-
const generatedId = (0, import_react19.useId)();
|
|
7825
|
-
const computedId = (0, import_type_guards20.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-group-${generatedId}`;
|
|
7826
|
-
return /* @__PURE__ */ (0, import_jsx_runtime202.jsxs)(StyledCheckboxWrapper, { children: [
|
|
7827
|
-
/* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
|
|
7828
|
-
StyledCheckboxRoot,
|
|
7829
|
-
{
|
|
7830
|
-
ref,
|
|
7831
|
-
"aria-label": label,
|
|
7832
|
-
checked: checked ?? void 0,
|
|
7833
|
-
defaultChecked: checked === void 0 ? false : void 0,
|
|
7834
|
-
disabled,
|
|
7835
|
-
id: computedId,
|
|
7836
|
-
name,
|
|
7837
|
-
onCheckedChange: (state) => {
|
|
7838
|
-
if (onChange) {
|
|
7839
|
-
const syntheticEvent = {
|
|
7840
|
-
target: {
|
|
7841
|
-
name,
|
|
7842
|
-
id: computedId,
|
|
7843
|
-
checked: state === true
|
|
7844
|
-
}
|
|
7845
|
-
};
|
|
7846
|
-
onChange(syntheticEvent);
|
|
7635
|
+
var Checkbox = (0, import_react18.forwardRef)(
|
|
7636
|
+
({ checked, disabled = false, id, label, description, name, onChange, value, ...otherProps }, ref) => {
|
|
7637
|
+
const generatedId = (0, import_react18.useId)();
|
|
7638
|
+
const computedId = (0, import_type_guards20.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-${generatedId}`;
|
|
7639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(
|
|
7640
|
+
StyledCheckboxWrapper,
|
|
7641
|
+
{
|
|
7642
|
+
ref,
|
|
7643
|
+
disabled,
|
|
7644
|
+
children: [
|
|
7645
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(
|
|
7646
|
+
StyledHiddenCheckboxInput,
|
|
7647
|
+
{
|
|
7648
|
+
...otherProps,
|
|
7649
|
+
disabled,
|
|
7650
|
+
id: computedId,
|
|
7651
|
+
name,
|
|
7652
|
+
type: "checkbox",
|
|
7653
|
+
value
|
|
7847
7654
|
}
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
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
|
-
] });
|
|
7655
|
+
),
|
|
7656
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(StyledLabel2, { htmlFor: computedId, children: [
|
|
7657
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(StyledCheckboxInput, { "data-wui-faux-input": "true", children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(CheckIcon, {}) }),
|
|
7658
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(StyledLabelWrapper, { children: [
|
|
7659
|
+
label,
|
|
7660
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(LabelDescription, { children: description })
|
|
7661
|
+
] })
|
|
7662
|
+
] })
|
|
7663
|
+
]
|
|
7664
|
+
}
|
|
7665
|
+
);
|
|
7868
7666
|
}
|
|
7869
7667
|
);
|
|
7870
7668
|
Checkbox.displayName = "Checkbox";
|
|
7871
7669
|
|
|
7872
7670
|
// src/components/ClickRegion/ClickRegion.tsx
|
|
7873
|
-
var
|
|
7671
|
+
var import_react19 = require("react");
|
|
7874
7672
|
var ClickRegion = ({ children, targetRef }) => {
|
|
7875
|
-
(0,
|
|
7673
|
+
(0, import_react19.useEffect)(() => {
|
|
7876
7674
|
if (targetRef.current && targetRef.current.tagName === "A") {
|
|
7877
7675
|
targetRef.current.setAttribute("data-click-region-target-link", "");
|
|
7878
7676
|
} else if (targetRef.current && targetRef.current.tagName === "BUTTON") {
|
|
@@ -7880,7 +7678,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7880
7678
|
} else {
|
|
7881
7679
|
}
|
|
7882
7680
|
}, [targetRef]);
|
|
7883
|
-
const handleClick = (0,
|
|
7681
|
+
const handleClick = (0, import_react19.useCallback)(
|
|
7884
7682
|
(event) => {
|
|
7885
7683
|
const node = targetRef.current;
|
|
7886
7684
|
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 +7695,7 @@ var ClickRegion = ({ children, targetRef }) => {
|
|
|
7897
7695
|
},
|
|
7898
7696
|
[targetRef]
|
|
7899
7697
|
);
|
|
7900
|
-
return (0,
|
|
7698
|
+
return (0, import_react19.cloneElement)(import_react19.Children.only(children), {
|
|
7901
7699
|
"data-click-region": true,
|
|
7902
7700
|
onClick: handleClick
|
|
7903
7701
|
});
|
|
@@ -7907,9 +7705,9 @@ ClickRegion.displayName = "ClickRegion";
|
|
|
7907
7705
|
// src/components/Collapsible/Collapsible.tsx
|
|
7908
7706
|
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
|
7909
7707
|
var import_type_guards21 = require("@wistia/type-guards");
|
|
7910
|
-
var
|
|
7911
|
-
var
|
|
7912
|
-
var StyledRoot = (0,
|
|
7708
|
+
var import_styled_components33 = __toESM(require("styled-components"));
|
|
7709
|
+
var import_jsx_runtime201 = require("react/jsx-runtime");
|
|
7710
|
+
var StyledRoot = (0, import_styled_components33.default)(import_react_collapsible.Root)`
|
|
7913
7711
|
&[data-state='closed'] [data-wui-collapsible-content] {
|
|
7914
7712
|
display: -webkit-box;
|
|
7915
7713
|
-webkit-box-orient: vertical;
|
|
@@ -7925,42 +7723,162 @@ var Collapsible = ({
|
|
|
7925
7723
|
const controlProps = {
|
|
7926
7724
|
...(0, import_type_guards21.isNotNil)(onOpenChange) && (0, import_type_guards21.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {}
|
|
7927
7725
|
};
|
|
7928
|
-
return /* @__PURE__ */ (0,
|
|
7726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(StyledRoot, { ...controlProps, children });
|
|
7929
7727
|
};
|
|
7930
7728
|
Collapsible.displayName = "Collapsible";
|
|
7931
7729
|
|
|
7932
7730
|
// src/components/Collapsible/CollapsibleTrigger.tsx
|
|
7933
|
-
var
|
|
7731
|
+
var import_react20 = require("react");
|
|
7934
7732
|
var import_react_collapsible2 = require("@radix-ui/react-collapsible");
|
|
7935
|
-
var
|
|
7733
|
+
var import_jsx_runtime202 = require("react/jsx-runtime");
|
|
7936
7734
|
var CollapsibleTrigger = ({ children }) => {
|
|
7937
|
-
|
|
7938
|
-
return /* @__PURE__ */ (0,
|
|
7735
|
+
import_react20.Children.only(children);
|
|
7736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(import_react_collapsible2.Trigger, { asChild: true, children });
|
|
7939
7737
|
};
|
|
7940
7738
|
|
|
7941
7739
|
// src/components/Collapsible/CollapsibleContent.tsx
|
|
7942
|
-
var
|
|
7740
|
+
var import_styled_components34 = __toESM(require("styled-components"));
|
|
7943
7741
|
var import_react_collapsible3 = require("@radix-ui/react-collapsible");
|
|
7944
7742
|
var import_type_guards22 = require("@wistia/type-guards");
|
|
7945
|
-
var
|
|
7946
|
-
var ClampedContent =
|
|
7743
|
+
var import_jsx_runtime203 = require("react/jsx-runtime");
|
|
7744
|
+
var ClampedContent = import_styled_components34.default.div.attrs({ "data-wui-collapsible-content": true })`
|
|
7947
7745
|
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
7948
7746
|
`;
|
|
7949
7747
|
var CollapsibleContent = ({ clamp, children }) => {
|
|
7950
7748
|
if ((0, import_type_guards22.isNotUndefined)(clamp)) {
|
|
7951
|
-
return /* @__PURE__ */ (0,
|
|
7749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(ClampedContent, { $clamp: clamp, children });
|
|
7952
7750
|
}
|
|
7953
|
-
return /* @__PURE__ */ (0,
|
|
7751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime203.jsx)(import_react_collapsible3.Content, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime203.jsxs)(import_jsx_runtime203.Fragment, { children: [
|
|
7954
7752
|
children,
|
|
7955
7753
|
" "
|
|
7956
7754
|
] }) });
|
|
7957
7755
|
};
|
|
7958
7756
|
|
|
7959
7757
|
// src/components/DataCards/DataCard.tsx
|
|
7960
|
-
var
|
|
7758
|
+
var import_styled_components36 = __toESM(require("styled-components"));
|
|
7961
7759
|
var import_type_guards23 = require("@wistia/type-guards");
|
|
7962
|
-
|
|
7963
|
-
|
|
7760
|
+
|
|
7761
|
+
// src/components/Heading/Heading.tsx
|
|
7762
|
+
var import_react21 = require("react");
|
|
7763
|
+
var import_styled_components35 = __toESM(require("styled-components"));
|
|
7764
|
+
var import_jsx_runtime204 = require("react/jsx-runtime");
|
|
7765
|
+
var heroStyle = import_styled_components35.css`
|
|
7766
|
+
--font-family: var(--wui-typography-heading-hero-family);
|
|
7767
|
+
--font-size: var(--wui-typography-heading-hero-size);
|
|
7768
|
+
--font-weight: var(--wui-typography-heading-hero-weight);
|
|
7769
|
+
--line-height: var(--wui-typography-heading-hero-line-height);
|
|
7770
|
+
`;
|
|
7771
|
+
var heading1TextStyle = import_styled_components35.css`
|
|
7772
|
+
--font-family: var(--wui-typography-heading-1-family);
|
|
7773
|
+
--font-size: var(--wui-typography-heading-1-size);
|
|
7774
|
+
--font-weight: var(--wui-typography-heading-1-weight);
|
|
7775
|
+
--line-height: var(--wui-typography-heading-1-line-height);
|
|
7776
|
+
`;
|
|
7777
|
+
var heading2TextStyle = import_styled_components35.css`
|
|
7778
|
+
--font-family: var(--wui-typography-heading-2-family);
|
|
7779
|
+
--font-size: var(--wui-typography-heading-2-size);
|
|
7780
|
+
--font-weight: var(--wui-typography-heading-2-weight);
|
|
7781
|
+
--line-height: var(--wui-typography-heading-2-line-height);
|
|
7782
|
+
`;
|
|
7783
|
+
var heading3TextStyle = import_styled_components35.css`
|
|
7784
|
+
--font-family: var(--wui-typography-heading-3-family);
|
|
7785
|
+
--font-size: var(--wui-typography-heading-3-size);
|
|
7786
|
+
--font-weight: var(--wui-typography-heading-3-weight);
|
|
7787
|
+
--line-height: var(--wui-typography-heading-3-line-height);
|
|
7788
|
+
`;
|
|
7789
|
+
var heading4TextStyle = import_styled_components35.css`
|
|
7790
|
+
--font-family: var(--wui-typography-heading-4-family);
|
|
7791
|
+
--font-size: var(--wui-typography-heading-4-size);
|
|
7792
|
+
--font-weight: var(--wui-typography-heading-4-weight);
|
|
7793
|
+
--line-height: var(--wui-typography-heading-4-line-height);
|
|
7794
|
+
`;
|
|
7795
|
+
var heading5TextStyle = import_styled_components35.css`
|
|
7796
|
+
--font-family: var(--wui-typography-heading-5-family);
|
|
7797
|
+
--font-size: var(--wui-typography-heading-5-size);
|
|
7798
|
+
--font-weight: var(--wui-typography-heading-5-weight);
|
|
7799
|
+
--line-height: var(--wui-typography-heading-5-line-height);
|
|
7800
|
+
`;
|
|
7801
|
+
var heading6TextStyle = import_styled_components35.css`
|
|
7802
|
+
--font-family: var(--wui-typography-heading-6-family);
|
|
7803
|
+
--font-size: var(--wui-typography-heading-6-size);
|
|
7804
|
+
--font-weight: var(--wui-typography-heading-6-weight);
|
|
7805
|
+
--line-height: var(--wui-typography-heading-6-line-height);
|
|
7806
|
+
`;
|
|
7807
|
+
var variantStyleMap = {
|
|
7808
|
+
hero: heroStyle,
|
|
7809
|
+
heading1: heading1TextStyle,
|
|
7810
|
+
heading2: heading2TextStyle,
|
|
7811
|
+
heading3: heading3TextStyle,
|
|
7812
|
+
heading4: heading4TextStyle,
|
|
7813
|
+
heading5: heading5TextStyle,
|
|
7814
|
+
heading6: heading6TextStyle
|
|
7815
|
+
};
|
|
7816
|
+
var DEFAULT_ELEMENT2 = "h1";
|
|
7817
|
+
var StyledHeading = import_styled_components35.default.div`
|
|
7818
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
7819
|
+
font-family: var(--font-family);
|
|
7820
|
+
font-size: var(--font-size);
|
|
7821
|
+
font-weight: var(--font-weight);
|
|
7822
|
+
line-height: var(--line-height);
|
|
7823
|
+
color: var(--wui-color-text);
|
|
7824
|
+
${({ $variant }) => variantStyleMap[$variant]}
|
|
7825
|
+
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
7826
|
+
${({ $inline }) => $inline && import_styled_components35.css`
|
|
7827
|
+
display: inline-block;
|
|
7828
|
+
`}
|
|
7829
|
+
${({ $disabled }) => $disabled && import_styled_components35.css`
|
|
7830
|
+
color: var(--wui-color-text-disabled);
|
|
7831
|
+
`}
|
|
7832
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components35.css`
|
|
7833
|
+
user-select: none;
|
|
7834
|
+
`}
|
|
7835
|
+
${({ $align }) => import_styled_components35.css`
|
|
7836
|
+
text-align: ${$align};
|
|
7837
|
+
`}
|
|
7838
|
+
margin: 0;
|
|
7839
|
+
`;
|
|
7840
|
+
var variantElementMap = {
|
|
7841
|
+
hero: DEFAULT_ELEMENT2,
|
|
7842
|
+
heading1: DEFAULT_ELEMENT2,
|
|
7843
|
+
heading2: "h2",
|
|
7844
|
+
heading3: "h3",
|
|
7845
|
+
heading4: "h4",
|
|
7846
|
+
heading5: "h5",
|
|
7847
|
+
heading6: "h6"
|
|
7848
|
+
};
|
|
7849
|
+
var HeadingComponent = (0, import_react21.forwardRef)(
|
|
7850
|
+
({
|
|
7851
|
+
align = "left",
|
|
7852
|
+
colorScheme = "inherit",
|
|
7853
|
+
disabled = false,
|
|
7854
|
+
ellipsis = false,
|
|
7855
|
+
inline = false,
|
|
7856
|
+
preventUserSelect = false,
|
|
7857
|
+
variant = "heading1",
|
|
7858
|
+
renderAs,
|
|
7859
|
+
...otherProps
|
|
7860
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime204.jsx)(
|
|
7861
|
+
StyledHeading,
|
|
7862
|
+
{
|
|
7863
|
+
ref,
|
|
7864
|
+
$align: align,
|
|
7865
|
+
$colorScheme: colorScheme,
|
|
7866
|
+
$disabled: disabled,
|
|
7867
|
+
$ellipsis: ellipsis,
|
|
7868
|
+
$inline: inline,
|
|
7869
|
+
$preventUserSelect: preventUserSelect,
|
|
7870
|
+
$variant: variant,
|
|
7871
|
+
as: renderAs ?? variantElementMap[variant],
|
|
7872
|
+
...otherProps
|
|
7873
|
+
}
|
|
7874
|
+
)
|
|
7875
|
+
);
|
|
7876
|
+
HeadingComponent.displayName = "Heading";
|
|
7877
|
+
var Heading = makePolymorphic(HeadingComponent);
|
|
7878
|
+
|
|
7879
|
+
// src/components/DataCards/DataCard.tsx
|
|
7880
|
+
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
7881
|
+
var StyledDataCard = import_styled_components36.default.div`
|
|
7964
7882
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
7965
7883
|
display: grid;
|
|
7966
7884
|
grid-template-areas: 'label slot' 'value value';
|
|
@@ -7973,7 +7891,7 @@ var StyledDataCard = import_styled_components37.default.div`
|
|
|
7973
7891
|
border-radius: var(--wui-border-radius-02);
|
|
7974
7892
|
position: relative;
|
|
7975
7893
|
`;
|
|
7976
|
-
var shimmer =
|
|
7894
|
+
var shimmer = import_styled_components36.keyframes`
|
|
7977
7895
|
0% {
|
|
7978
7896
|
background-position: 200% 0;
|
|
7979
7897
|
}
|
|
@@ -7981,7 +7899,7 @@ var shimmer = import_styled_components37.keyframes`
|
|
|
7981
7899
|
background-position: -200% 0;
|
|
7982
7900
|
}
|
|
7983
7901
|
`;
|
|
7984
|
-
var LoadingBackground =
|
|
7902
|
+
var LoadingBackground = import_styled_components36.default.div`
|
|
7985
7903
|
background: linear-gradient(
|
|
7986
7904
|
90deg,
|
|
7987
7905
|
var(--wui-color-bg-surface-tertiary) 25%,
|
|
@@ -7992,27 +7910,27 @@ var LoadingBackground = import_styled_components37.default.div`
|
|
|
7992
7910
|
animation: ${shimmer} 1.5s infinite;
|
|
7993
7911
|
border-radius: var(--wui-border-radius-01);
|
|
7994
7912
|
`;
|
|
7995
|
-
var StyledLoadingLabel = (0,
|
|
7913
|
+
var StyledLoadingLabel = (0, import_styled_components36.default)(LoadingBackground)`
|
|
7996
7914
|
width: 80px;
|
|
7997
7915
|
height: var(--wui-typography-heading-6-line-height);
|
|
7998
7916
|
`;
|
|
7999
|
-
var StyledLoadingValue = (0,
|
|
7917
|
+
var StyledLoadingValue = (0, import_styled_components36.default)(LoadingBackground)`
|
|
8000
7918
|
width: 90%;
|
|
8001
7919
|
height: var(--wui-typography-heading-3-line-height);
|
|
8002
7920
|
`;
|
|
8003
|
-
var StyledLabel3 = (0,
|
|
7921
|
+
var StyledLabel3 = (0, import_styled_components36.default)(Heading)`
|
|
8004
7922
|
grid-area: label;
|
|
8005
7923
|
`;
|
|
8006
|
-
var StyledValue = (0,
|
|
7924
|
+
var StyledValue = (0, import_styled_components36.default)(Heading)`
|
|
8007
7925
|
grid-area: value;
|
|
8008
7926
|
`;
|
|
8009
|
-
var StyledSlot =
|
|
7927
|
+
var StyledSlot = import_styled_components36.default.div`
|
|
8010
7928
|
display: flex;
|
|
8011
7929
|
justify-content: flex-end;
|
|
8012
7930
|
grid-area: slot;
|
|
8013
7931
|
align-self: center;
|
|
8014
7932
|
`;
|
|
8015
|
-
var StyledDataCardTrendContainer =
|
|
7933
|
+
var StyledDataCardTrendContainer = import_styled_components36.default.div`
|
|
8016
7934
|
position: absolute;
|
|
8017
7935
|
bottom: var(--wui-space-01);
|
|
8018
7936
|
right: var(--wui-space-01);
|
|
@@ -8025,39 +7943,39 @@ var DataCard = ({
|
|
|
8025
7943
|
isLoading = false,
|
|
8026
7944
|
trend,
|
|
8027
7945
|
...props
|
|
8028
|
-
}) => /* @__PURE__ */ (0,
|
|
7946
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime205.jsxs)(
|
|
8029
7947
|
StyledDataCard,
|
|
8030
7948
|
{
|
|
8031
7949
|
$colorScheme: colorScheme,
|
|
8032
7950
|
...props,
|
|
8033
7951
|
children: [
|
|
8034
|
-
/* @__PURE__ */ (0,
|
|
7952
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8035
7953
|
StyledLabel3,
|
|
8036
7954
|
{
|
|
8037
7955
|
renderAs: "dt",
|
|
8038
7956
|
variant: "heading6",
|
|
8039
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7957
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(StyledLoadingLabel, {}) : label
|
|
8040
7958
|
}
|
|
8041
7959
|
),
|
|
8042
|
-
/* @__PURE__ */ (0,
|
|
7960
|
+
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
8043
7961
|
StyledValue,
|
|
8044
7962
|
{
|
|
8045
7963
|
renderAs: "dd",
|
|
8046
7964
|
variant: "heading3",
|
|
8047
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
7965
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(StyledLoadingValue, {}) : value
|
|
8048
7966
|
}
|
|
8049
7967
|
),
|
|
8050
|
-
(0, import_type_guards23.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0,
|
|
8051
|
-
(0, import_type_guards23.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0,
|
|
7968
|
+
(0, import_type_guards23.isNotNull)(upperRightSlot) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(StyledSlot, { children: upperRightSlot }),
|
|
7969
|
+
(0, import_type_guards23.isNotNull)(trend) && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime205.jsx)(StyledDataCardTrendContainer, { children: trend })
|
|
8052
7970
|
]
|
|
8053
7971
|
}
|
|
8054
7972
|
);
|
|
8055
7973
|
DataCard.displayName = "DataCard";
|
|
8056
7974
|
|
|
8057
7975
|
// src/components/DataCards/DataCards.tsx
|
|
8058
|
-
var
|
|
8059
|
-
var
|
|
8060
|
-
var StyledDataCards = (0,
|
|
7976
|
+
var import_styled_components37 = __toESM(require("styled-components"));
|
|
7977
|
+
var import_jsx_runtime206 = require("react/jsx-runtime");
|
|
7978
|
+
var StyledDataCards = (0, import_styled_components37.default)(Box)`
|
|
8061
7979
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8062
7980
|
margin-top: 0; /* Remove default <dl> style */
|
|
8063
7981
|
> * {
|
|
@@ -8071,7 +7989,7 @@ var DataCards = ({
|
|
|
8071
7989
|
colorScheme = "inherit",
|
|
8072
7990
|
...props
|
|
8073
7991
|
}) => {
|
|
8074
|
-
return /* @__PURE__ */ (0,
|
|
7992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
|
|
8075
7993
|
StyledDataCards,
|
|
8076
7994
|
{
|
|
8077
7995
|
...props,
|
|
@@ -8089,25 +8007,25 @@ var DataCards = ({
|
|
|
8089
8007
|
DataCards.displayName = "DataCards";
|
|
8090
8008
|
|
|
8091
8009
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8092
|
-
var
|
|
8010
|
+
var import_styled_components39 = __toESM(require("styled-components"));
|
|
8093
8011
|
|
|
8094
8012
|
// src/components/Text/Text.tsx
|
|
8095
8013
|
var import_react22 = require("react");
|
|
8096
|
-
var
|
|
8097
|
-
var
|
|
8098
|
-
var bodyBoldStyles =
|
|
8014
|
+
var import_styled_components38 = __toESM(require("styled-components"));
|
|
8015
|
+
var import_jsx_runtime207 = require("react/jsx-runtime");
|
|
8016
|
+
var bodyBoldStyles = import_styled_components38.css`
|
|
8099
8017
|
> strong,
|
|
8100
8018
|
b {
|
|
8101
8019
|
font-weight: var(--wui-typography-weight-body-bold);
|
|
8102
8020
|
}
|
|
8103
8021
|
`;
|
|
8104
|
-
var labelBoldStyles =
|
|
8022
|
+
var labelBoldStyles = import_styled_components38.css`
|
|
8105
8023
|
> strong,
|
|
8106
8024
|
b {
|
|
8107
8025
|
font-weight: var(--wui-typography-weight-label-bold);
|
|
8108
8026
|
}
|
|
8109
8027
|
`;
|
|
8110
|
-
var body1TextStyle =
|
|
8028
|
+
var body1TextStyle = import_styled_components38.css`
|
|
8111
8029
|
--font-family: var(--wui-typography-body-1-family);
|
|
8112
8030
|
--font-size: var(--wui-typography-body-1-size);
|
|
8113
8031
|
--font-weight: var(--wui-typography-body-1-weight);
|
|
@@ -8115,7 +8033,7 @@ var body1TextStyle = import_styled_components39.css`
|
|
|
8115
8033
|
--paragraph-spacing: var(--wui-typography-body-1-paragraph-spacing);
|
|
8116
8034
|
${bodyBoldStyles}
|
|
8117
8035
|
`;
|
|
8118
|
-
var body2TextStyle =
|
|
8036
|
+
var body2TextStyle = import_styled_components38.css`
|
|
8119
8037
|
--font-family: var(--wui-typography-body-2-family);
|
|
8120
8038
|
--font-size: var(--wui-typography-body-2-size);
|
|
8121
8039
|
--font-weight: var(--wui-typography-body-2-weight);
|
|
@@ -8123,7 +8041,7 @@ var body2TextStyle = import_styled_components39.css`
|
|
|
8123
8041
|
--paragraph-spacing: var(--wui-typography-body-2-paragraph-spacing);
|
|
8124
8042
|
${bodyBoldStyles}
|
|
8125
8043
|
`;
|
|
8126
|
-
var body3TextStyle =
|
|
8044
|
+
var body3TextStyle = import_styled_components38.css`
|
|
8127
8045
|
--font-family: var(--wui-typography-body-3-family);
|
|
8128
8046
|
--font-size: var(--wui-typography-body-3-size);
|
|
8129
8047
|
--font-weight: var(--wui-typography-body-3-weight);
|
|
@@ -8131,7 +8049,7 @@ var body3TextStyle = import_styled_components39.css`
|
|
|
8131
8049
|
--paragraph-spacing: var(--wui-typography-body-3-paragraph-spacing);
|
|
8132
8050
|
${bodyBoldStyles}
|
|
8133
8051
|
`;
|
|
8134
|
-
var body4TextStyle =
|
|
8052
|
+
var body4TextStyle = import_styled_components38.css`
|
|
8135
8053
|
--font-family: var(--wui-typography-body-4-family);
|
|
8136
8054
|
--font-size: var(--wui-typography-body-4-size);
|
|
8137
8055
|
--font-weight: var(--wui-typography-body-4-weight);
|
|
@@ -8139,47 +8057,47 @@ var body4TextStyle = import_styled_components39.css`
|
|
|
8139
8057
|
--paragraph-spacing: var(--wui-typography-body-4-paragraph-spacing);
|
|
8140
8058
|
${bodyBoldStyles}
|
|
8141
8059
|
`;
|
|
8142
|
-
var label1TextStyle =
|
|
8060
|
+
var label1TextStyle = import_styled_components38.css`
|
|
8143
8061
|
--font-family: var(--wui-typography-label-1-family);
|
|
8144
8062
|
--font-size: var(--wui-typography-label-1-size);
|
|
8145
8063
|
--font-weight: var(--wui-typography-label-1-weight);
|
|
8146
8064
|
--line-height: var(--wui-typography-label-1-line-height);
|
|
8147
8065
|
${labelBoldStyles}
|
|
8148
8066
|
`;
|
|
8149
|
-
var label2TextStyle =
|
|
8067
|
+
var label2TextStyle = import_styled_components38.css`
|
|
8150
8068
|
--font-family: var(--wui-typography-label-2-family);
|
|
8151
8069
|
--font-size: var(--wui-typography-label-2-size);
|
|
8152
8070
|
--font-weight: var(--wui-typography-label-2-weight);
|
|
8153
8071
|
--line-height: var(--wui-typography-label-2-line-height);
|
|
8154
8072
|
${labelBoldStyles}
|
|
8155
8073
|
`;
|
|
8156
|
-
var label3TextStyle =
|
|
8074
|
+
var label3TextStyle = import_styled_components38.css`
|
|
8157
8075
|
--font-family: var(--wui-typography-label-3-family);
|
|
8158
8076
|
--font-size: var(--wui-typography-label-3-size);
|
|
8159
8077
|
--font-weight: var(--wui-typography-label-3-weight);
|
|
8160
8078
|
--line-height: var(--wui-typography-label-3-line-height);
|
|
8161
8079
|
${labelBoldStyles}
|
|
8162
8080
|
`;
|
|
8163
|
-
var label4TextStyle =
|
|
8081
|
+
var label4TextStyle = import_styled_components38.css`
|
|
8164
8082
|
--font-family: var(--wui-typography-label-4-family);
|
|
8165
8083
|
--font-size: var(--wui-typography-label-4-size);
|
|
8166
8084
|
--font-weight: var(--wui-typography-label-4-weight);
|
|
8167
8085
|
--line-height: var(--wui-typography-label-4-line-height);
|
|
8168
8086
|
${labelBoldStyles}
|
|
8169
8087
|
`;
|
|
8170
|
-
var body1MonoTextStyle =
|
|
8088
|
+
var body1MonoTextStyle = import_styled_components38.css`
|
|
8171
8089
|
${body1TextStyle};
|
|
8172
8090
|
--font-family: var(--wui-typography-family-mono);
|
|
8173
8091
|
`;
|
|
8174
|
-
var body2MonoTextStyle =
|
|
8092
|
+
var body2MonoTextStyle = import_styled_components38.css`
|
|
8175
8093
|
${body2TextStyle};
|
|
8176
8094
|
--font-family: var(--wui-typography-family-mono);
|
|
8177
8095
|
`;
|
|
8178
|
-
var body3MonoTextStyle =
|
|
8096
|
+
var body3MonoTextStyle = import_styled_components38.css`
|
|
8179
8097
|
${body3TextStyle};
|
|
8180
8098
|
--font-family: var(--wui-typography-family-mono);
|
|
8181
8099
|
`;
|
|
8182
|
-
var body4MonoTextStyle =
|
|
8100
|
+
var body4MonoTextStyle = import_styled_components38.css`
|
|
8183
8101
|
${body4TextStyle};
|
|
8184
8102
|
--font-family: var(--wui-typography-family-mono);
|
|
8185
8103
|
`;
|
|
@@ -8214,7 +8132,7 @@ var variantElementMap2 = {
|
|
|
8214
8132
|
label3: labelElement,
|
|
8215
8133
|
label4: labelElement
|
|
8216
8134
|
};
|
|
8217
|
-
var StyledText =
|
|
8135
|
+
var StyledText = import_styled_components38.default.div`
|
|
8218
8136
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
8219
8137
|
--text-color: ${({ $prominence, $disabled }) => {
|
|
8220
8138
|
if ($disabled) {
|
|
@@ -8238,19 +8156,19 @@ var StyledText = import_styled_components39.default.div`
|
|
|
8238
8156
|
margin: 0;
|
|
8239
8157
|
${({ $variant }) => variantStyleMap2[$variant]}
|
|
8240
8158
|
${({ $ellipsis }) => $ellipsis && ellipsisStyle};
|
|
8241
|
-
${({ $inline }) => $inline &&
|
|
8159
|
+
${({ $inline }) => $inline && import_styled_components38.css`
|
|
8242
8160
|
display: inline-block;
|
|
8243
8161
|
`}
|
|
8244
|
-
${({ $disabled }) => $disabled &&
|
|
8162
|
+
${({ $disabled }) => $disabled && import_styled_components38.css`
|
|
8245
8163
|
--text-color: var(--wui-color-text-disabled);
|
|
8246
8164
|
`}
|
|
8247
|
-
${({ $preventUserSelect }) => $preventUserSelect &&
|
|
8165
|
+
${({ $preventUserSelect }) => $preventUserSelect && import_styled_components38.css`
|
|
8248
8166
|
user-select: none;
|
|
8249
8167
|
`}
|
|
8250
|
-
${({ $align }) =>
|
|
8168
|
+
${({ $align }) => import_styled_components38.css`
|
|
8251
8169
|
text-align: ${$align};
|
|
8252
8170
|
`}
|
|
8253
|
-
${({ as }) => as === "p" &&
|
|
8171
|
+
${({ as }) => as === "p" && import_styled_components38.css`
|
|
8254
8172
|
display: block;
|
|
8255
8173
|
|
|
8256
8174
|
+ p {
|
|
@@ -8271,7 +8189,7 @@ var TextComponent = (0, import_react22.forwardRef)(
|
|
|
8271
8189
|
renderAs,
|
|
8272
8190
|
...otherProps
|
|
8273
8191
|
}, ref) => {
|
|
8274
|
-
return /* @__PURE__ */ (0,
|
|
8192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
8275
8193
|
StyledText,
|
|
8276
8194
|
{
|
|
8277
8195
|
ref,
|
|
@@ -8293,8 +8211,8 @@ TextComponent.displayName = "Text";
|
|
|
8293
8211
|
var Text = makePolymorphic(TextComponent);
|
|
8294
8212
|
|
|
8295
8213
|
// src/components/DataCards/DataCardTrend.tsx
|
|
8296
|
-
var
|
|
8297
|
-
var StyledDataCardTrend =
|
|
8214
|
+
var import_jsx_runtime208 = require("react/jsx-runtime");
|
|
8215
|
+
var StyledDataCardTrend = import_styled_components39.default.div`
|
|
8298
8216
|
${({ $outlook }) => getColorScheme($outlook === "positive" ? "success" : "error")};
|
|
8299
8217
|
background: var(--wui-color-bg-app);
|
|
8300
8218
|
border-radius: var(--wui-border-radius-rounded);
|
|
@@ -8309,8 +8227,8 @@ var DataCardTrend = ({
|
|
|
8309
8227
|
children,
|
|
8310
8228
|
...props
|
|
8311
8229
|
}) => {
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8313
|
-
/* @__PURE__ */ (0,
|
|
8230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime208.jsxs)(StyledDataCardTrend, { $outlook: outlook, children: [
|
|
8231
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8314
8232
|
Icon,
|
|
8315
8233
|
{
|
|
8316
8234
|
size: "md",
|
|
@@ -8318,7 +8236,7 @@ var DataCardTrend = ({
|
|
|
8318
8236
|
...props
|
|
8319
8237
|
}
|
|
8320
8238
|
),
|
|
8321
|
-
/* @__PURE__ */ (0,
|
|
8239
|
+
/* @__PURE__ */ (0, import_jsx_runtime208.jsx)(
|
|
8322
8240
|
Text,
|
|
8323
8241
|
{
|
|
8324
8242
|
prominence: "secondary",
|
|
@@ -8330,22 +8248,22 @@ var DataCardTrend = ({
|
|
|
8330
8248
|
};
|
|
8331
8249
|
|
|
8332
8250
|
// src/components/Divider/Divider.tsx
|
|
8333
|
-
var
|
|
8334
|
-
var
|
|
8335
|
-
var horizontalBorderCss =
|
|
8251
|
+
var import_styled_components40 = __toESM(require("styled-components"));
|
|
8252
|
+
var import_jsx_runtime209 = require("react/jsx-runtime");
|
|
8253
|
+
var horizontalBorderCss = import_styled_components40.css`
|
|
8336
8254
|
border-top-color: var(--wui-color-border);
|
|
8337
8255
|
border-top-style: solid;
|
|
8338
8256
|
border-top-width: 1px;
|
|
8339
8257
|
clear: both; /* for horizontal dividers, ensure it clears any floats */
|
|
8340
8258
|
height: 0;
|
|
8341
8259
|
`;
|
|
8342
|
-
var verticalBorderCss =
|
|
8260
|
+
var verticalBorderCss = import_styled_components40.css`
|
|
8343
8261
|
background-color: var(--wui-color-border);
|
|
8344
8262
|
max-width: 1px;
|
|
8345
8263
|
min-height: 100%;
|
|
8346
8264
|
width: 1px;
|
|
8347
8265
|
`;
|
|
8348
|
-
var DividerComponent =
|
|
8266
|
+
var DividerComponent = import_styled_components40.default.div`
|
|
8349
8267
|
${({ $orientation }) => {
|
|
8350
8268
|
switch ($orientation) {
|
|
8351
8269
|
case "vertical":
|
|
@@ -8360,7 +8278,7 @@ var Divider = ({
|
|
|
8360
8278
|
orientation = "horizontal",
|
|
8361
8279
|
...otherProps
|
|
8362
8280
|
}) => {
|
|
8363
|
-
return /* @__PURE__ */ (0,
|
|
8281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(
|
|
8364
8282
|
DividerComponent,
|
|
8365
8283
|
{
|
|
8366
8284
|
$orientation: orientation,
|
|
@@ -8373,15 +8291,15 @@ var Divider = ({
|
|
|
8373
8291
|
Divider.displayName = "Divider";
|
|
8374
8292
|
|
|
8375
8293
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8376
|
-
var
|
|
8294
|
+
var import_styled_components44 = __toESM(require("styled-components"));
|
|
8377
8295
|
var import_react24 = require("react");
|
|
8378
8296
|
|
|
8379
8297
|
// src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
|
|
8380
|
-
var
|
|
8298
|
+
var import_styled_components41 = __toESM(require("styled-components"));
|
|
8381
8299
|
var import_type_guards24 = require("@wistia/type-guards");
|
|
8382
|
-
var
|
|
8383
|
-
var VisuallyHidden =
|
|
8384
|
-
var VisuallyHiddenButFocusable =
|
|
8300
|
+
var import_jsx_runtime210 = require("react/jsx-runtime");
|
|
8301
|
+
var VisuallyHidden = import_styled_components41.default.div({ ...visuallyHiddenStyle });
|
|
8302
|
+
var VisuallyHiddenButFocusable = import_styled_components41.default.div({
|
|
8385
8303
|
"&:not(:focus-within)": visuallyHiddenStyle
|
|
8386
8304
|
});
|
|
8387
8305
|
var ScreenReaderOnly = ({
|
|
@@ -8392,24 +8310,24 @@ var ScreenReaderOnly = ({
|
|
|
8392
8310
|
}) => {
|
|
8393
8311
|
const accessibleText = (0, import_type_guards24.isNotNil)(text) ? text : children;
|
|
8394
8312
|
if (focusable) {
|
|
8395
|
-
return /* @__PURE__ */ (0,
|
|
8313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
|
|
8396
8314
|
}
|
|
8397
|
-
return /* @__PURE__ */ (0,
|
|
8315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime210.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
|
|
8398
8316
|
};
|
|
8399
8317
|
ScreenReaderOnly.displayName = "ScreenReaderOnly";
|
|
8400
8318
|
|
|
8401
8319
|
// src/components/Tooltip/Tooltip.tsx
|
|
8402
8320
|
var import_react_tooltip2 = require("@radix-ui/react-tooltip");
|
|
8403
|
-
var
|
|
8404
|
-
var
|
|
8405
|
-
var CompactTooltipStyles =
|
|
8321
|
+
var import_styled_components42 = __toESM(require("styled-components"));
|
|
8322
|
+
var import_jsx_runtime211 = require("react/jsx-runtime");
|
|
8323
|
+
var CompactTooltipStyles = import_styled_components42.css`
|
|
8406
8324
|
--tooltip-font-size: var(--wui-typography-label-4-size);
|
|
8407
8325
|
--tooltip-line-height: var(--wui-typography-label-4-line-height);
|
|
8408
8326
|
--tooltip-font-weight: var(--wui-typography-label-4-weight);
|
|
8409
8327
|
--tooltip-horizontal-padding: var(--wui-space-02);
|
|
8410
8328
|
--tooltip-vertical-padding: var(--wui-space-03);
|
|
8411
8329
|
`;
|
|
8412
|
-
var StyledContent = (0,
|
|
8330
|
+
var StyledContent = (0, import_styled_components42.default)(import_react_tooltip2.Content)`
|
|
8413
8331
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
8414
8332
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
8415
8333
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -8468,14 +8386,14 @@ var Tooltip = ({
|
|
|
8468
8386
|
if (forceOpen === true) {
|
|
8469
8387
|
rootProps.open = true;
|
|
8470
8388
|
}
|
|
8471
|
-
return /* @__PURE__ */ (0,
|
|
8389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
8472
8390
|
import_react_tooltip2.Root,
|
|
8473
8391
|
{
|
|
8474
8392
|
delayDuration: delay,
|
|
8475
8393
|
...rootProps,
|
|
8476
8394
|
children: [
|
|
8477
|
-
/* @__PURE__ */ (0,
|
|
8478
|
-
/* @__PURE__ */ (0,
|
|
8395
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
|
|
8396
|
+
/* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
8479
8397
|
StyledContent,
|
|
8480
8398
|
{
|
|
8481
8399
|
$compact: compact,
|
|
@@ -8483,7 +8401,7 @@ var Tooltip = ({
|
|
|
8483
8401
|
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
|
|
8484
8402
|
children: [
|
|
8485
8403
|
content,
|
|
8486
|
-
!hideArrow ? /* @__PURE__ */ (0,
|
|
8404
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)(
|
|
8487
8405
|
"svg",
|
|
8488
8406
|
{
|
|
8489
8407
|
fill: "var(--tooltip-bg)",
|
|
@@ -8492,7 +8410,7 @@ var Tooltip = ({
|
|
|
8492
8410
|
viewBox: "0 0 12 8",
|
|
8493
8411
|
width: "12",
|
|
8494
8412
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8495
|
-
children: /* @__PURE__ */ (0,
|
|
8413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime211.jsx)("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
8496
8414
|
}
|
|
8497
8415
|
) }) : null
|
|
8498
8416
|
]
|
|
@@ -8506,10 +8424,10 @@ Tooltip.displayName = "Tooltip";
|
|
|
8506
8424
|
|
|
8507
8425
|
// src/components/Input/Input.tsx
|
|
8508
8426
|
var import_react23 = require("react");
|
|
8509
|
-
var
|
|
8427
|
+
var import_styled_components43 = __toESM(require("styled-components"));
|
|
8510
8428
|
var import_type_guards25 = require("@wistia/type-guards");
|
|
8511
|
-
var
|
|
8512
|
-
var inputStyles =
|
|
8429
|
+
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
8430
|
+
var inputStyles = import_styled_components43.css`
|
|
8513
8431
|
--wui-input-color-bg: var(--wui-color-bg-surface);
|
|
8514
8432
|
--wui-input-color-bg-disabled: var(--wui-color-bg-surface-disabled);
|
|
8515
8433
|
--wui-input-color-border: var(--wui-color-border);
|
|
@@ -8550,7 +8468,7 @@ var inputStyles = import_styled_components44.css`
|
|
|
8550
8468
|
}
|
|
8551
8469
|
}
|
|
8552
8470
|
`;
|
|
8553
|
-
var StyledInputContainer =
|
|
8471
|
+
var StyledInputContainer = import_styled_components43.default.div`
|
|
8554
8472
|
display: inline-flex;
|
|
8555
8473
|
position: relative;
|
|
8556
8474
|
${inputStyles};
|
|
@@ -8611,7 +8529,7 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8611
8529
|
);
|
|
8612
8530
|
let leftIconToDisplay = leftIcon;
|
|
8613
8531
|
if ((0, import_type_guards25.isNil)(leftIcon) && type === "search") {
|
|
8614
|
-
leftIconToDisplay = /* @__PURE__ */ (0,
|
|
8532
|
+
leftIconToDisplay = /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(Icon, { type: "search" });
|
|
8615
8533
|
}
|
|
8616
8534
|
if ((0, import_type_guards25.isNotNil)(leftIconToDisplay)) {
|
|
8617
8535
|
leftIconToDisplay = (0, import_react23.cloneElement)(leftIconToDisplay, {
|
|
@@ -8636,21 +8554,21 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8636
8554
|
});
|
|
8637
8555
|
}
|
|
8638
8556
|
};
|
|
8639
|
-
return /* @__PURE__ */ (0,
|
|
8557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime212.jsxs)(
|
|
8640
8558
|
StyledInputContainer,
|
|
8641
8559
|
{
|
|
8642
8560
|
$fullWidth: fullWidth,
|
|
8643
8561
|
$monospace: monospace,
|
|
8644
8562
|
children: [
|
|
8645
8563
|
leftIconToDisplay ?? null,
|
|
8646
|
-
type === "multiline" ? /* @__PURE__ */ (0,
|
|
8564
|
+
type === "multiline" ? /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8647
8565
|
"textarea",
|
|
8648
8566
|
{
|
|
8649
8567
|
...props,
|
|
8650
8568
|
ref,
|
|
8651
8569
|
onFocus: handleFocus
|
|
8652
8570
|
}
|
|
8653
|
-
) : /* @__PURE__ */ (0,
|
|
8571
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
8654
8572
|
"input",
|
|
8655
8573
|
{
|
|
8656
8574
|
...props,
|
|
@@ -8668,8 +8586,8 @@ var Input = (0, import_react23.forwardRef)(
|
|
|
8668
8586
|
Input.displayName = "Input";
|
|
8669
8587
|
|
|
8670
8588
|
// src/components/EditableHeading/EditableHeading.tsx
|
|
8671
|
-
var
|
|
8672
|
-
var StyledInput = (0,
|
|
8589
|
+
var import_jsx_runtime213 = require("react/jsx-runtime");
|
|
8590
|
+
var StyledInput = (0, import_styled_components44.default)(Input)`
|
|
8673
8591
|
:not([rows]) {
|
|
8674
8592
|
min-height: unset;
|
|
8675
8593
|
}
|
|
@@ -8689,7 +8607,7 @@ var StyledInput = (0, import_styled_components45.default)(Input)`
|
|
|
8689
8607
|
height: ${({ $height }) => `${$height}px`};
|
|
8690
8608
|
}
|
|
8691
8609
|
`;
|
|
8692
|
-
var editableStyles =
|
|
8610
|
+
var editableStyles = import_styled_components44.css`
|
|
8693
8611
|
&:has(+ :focus-within) {
|
|
8694
8612
|
background: var(--wui-color-bg-surface-hover);
|
|
8695
8613
|
}
|
|
@@ -8699,7 +8617,7 @@ var editableStyles = import_styled_components45.css`
|
|
|
8699
8617
|
cursor: pointer;
|
|
8700
8618
|
}
|
|
8701
8619
|
`;
|
|
8702
|
-
var StyledHeading2 = (0,
|
|
8620
|
+
var StyledHeading2 = (0, import_styled_components44.default)(Heading)`
|
|
8703
8621
|
width: 100%;
|
|
8704
8622
|
border-radius: var(--wui-border-radius-02);
|
|
8705
8623
|
padding: var(--wui-space-02);
|
|
@@ -8753,7 +8671,7 @@ var EditableHeading = ({
|
|
|
8753
8671
|
handleSetEditing(false);
|
|
8754
8672
|
}
|
|
8755
8673
|
};
|
|
8756
|
-
const HeadingComponent2 = /* @__PURE__ */ (0,
|
|
8674
|
+
const HeadingComponent2 = /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8757
8675
|
StyledHeading2,
|
|
8758
8676
|
{
|
|
8759
8677
|
ref: headingRef,
|
|
@@ -8767,7 +8685,7 @@ var EditableHeading = ({
|
|
|
8767
8685
|
return HeadingComponent2;
|
|
8768
8686
|
}
|
|
8769
8687
|
if (isEditing || forceEditing) {
|
|
8770
|
-
return /* @__PURE__ */ (0,
|
|
8688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8771
8689
|
StyledInput,
|
|
8772
8690
|
{
|
|
8773
8691
|
$height: headingHeight,
|
|
@@ -8785,8 +8703,8 @@ var EditableHeading = ({
|
|
|
8785
8703
|
}
|
|
8786
8704
|
);
|
|
8787
8705
|
}
|
|
8788
|
-
return /* @__PURE__ */ (0,
|
|
8789
|
-
/* @__PURE__ */ (0,
|
|
8706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime213.jsxs)(import_jsx_runtime213.Fragment, { children: [
|
|
8707
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8790
8708
|
Tooltip,
|
|
8791
8709
|
{
|
|
8792
8710
|
compact: true,
|
|
@@ -8794,7 +8712,7 @@ var EditableHeading = ({
|
|
|
8794
8712
|
children: HeadingComponent2
|
|
8795
8713
|
}
|
|
8796
8714
|
),
|
|
8797
|
-
/* @__PURE__ */ (0,
|
|
8715
|
+
/* @__PURE__ */ (0, import_jsx_runtime213.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime213.jsx)(
|
|
8798
8716
|
"button",
|
|
8799
8717
|
{
|
|
8800
8718
|
"aria-label": ariaLabel,
|
|
@@ -8807,27 +8725,30 @@ var EditableHeading = ({
|
|
|
8807
8725
|
|
|
8808
8726
|
// src/components/Form/Form.tsx
|
|
8809
8727
|
var import_react26 = require("react");
|
|
8810
|
-
var
|
|
8728
|
+
var import_styled_components46 = __toESM(require("styled-components"));
|
|
8811
8729
|
var import_type_guards26 = require("@wistia/type-guards");
|
|
8812
8730
|
|
|
8813
8731
|
// src/components/Stack/Stack.tsx
|
|
8814
8732
|
var import_react25 = require("react");
|
|
8815
|
-
var
|
|
8816
|
-
var
|
|
8733
|
+
var import_styled_components45 = __toESM(require("styled-components"));
|
|
8734
|
+
var import_jsx_runtime214 = require("react/jsx-runtime");
|
|
8817
8735
|
var DEFAULT_ELEMENT4 = "div";
|
|
8818
|
-
var StyledStack =
|
|
8736
|
+
var StyledStack = import_styled_components45.default.div`
|
|
8819
8737
|
display: flex;
|
|
8820
8738
|
flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
|
|
8821
8739
|
gap: ${({ $gap }) => `var(--wui-${$gap})`};
|
|
8740
|
+
align-items: ${({ $alignItems }) => $alignItems};
|
|
8822
8741
|
`;
|
|
8823
8742
|
var StackComponent = (0, import_react25.forwardRef)(
|
|
8824
|
-
({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
|
|
8743
|
+
({ renderAs, direction = "vertical", gap = "space-02", alignItems = "stretch", ...props }, ref) => {
|
|
8825
8744
|
const responsiveGap = useResponsiveProp(gap);
|
|
8826
8745
|
const responsiveDirection = useResponsiveProp(direction);
|
|
8827
|
-
|
|
8746
|
+
const responsiveAlignItems = useResponsiveProp(alignItems);
|
|
8747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
|
|
8828
8748
|
StyledStack,
|
|
8829
8749
|
{
|
|
8830
8750
|
ref,
|
|
8751
|
+
$alignItems: responsiveAlignItems,
|
|
8831
8752
|
$direction: responsiveDirection,
|
|
8832
8753
|
$gap: responsiveGap,
|
|
8833
8754
|
as: renderAs ?? DEFAULT_ELEMENT4,
|
|
@@ -8840,8 +8761,8 @@ StackComponent.displayName = "Stack";
|
|
|
8840
8761
|
var Stack = makePolymorphic(StackComponent);
|
|
8841
8762
|
|
|
8842
8763
|
// src/components/Form/Form.tsx
|
|
8843
|
-
var
|
|
8844
|
-
var StyledForm =
|
|
8764
|
+
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
8765
|
+
var StyledForm = import_styled_components46.default.form`
|
|
8845
8766
|
--form-default-width: 690px;
|
|
8846
8767
|
|
|
8847
8768
|
max-width: ${({ $fullWidth }) => $fullWidth ? "auto" : "var(--form-default-width)"};
|
|
@@ -8920,7 +8841,7 @@ var FormComponent = ({
|
|
|
8920
8841
|
}, [labelPosition, values, errors, id, hasSubmitted]);
|
|
8921
8842
|
return (
|
|
8922
8843
|
// @ts-expect-error - generic context providers are a giant pain
|
|
8923
|
-
/* @__PURE__ */ (0,
|
|
8844
|
+
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime215.jsx)(
|
|
8924
8845
|
Stack,
|
|
8925
8846
|
{
|
|
8926
8847
|
...props,
|
|
@@ -8979,9 +8900,9 @@ var useFormState = (action, initialData = {}) => {
|
|
|
8979
8900
|
// src/components/Form/FormErrorSummary.tsx
|
|
8980
8901
|
var import_react28 = require("react");
|
|
8981
8902
|
var import_type_guards27 = require("@wistia/type-guards");
|
|
8982
|
-
var
|
|
8903
|
+
var import_jsx_runtime216 = require("react/jsx-runtime");
|
|
8983
8904
|
var ErrorItem = ({ name, error, formId }) => {
|
|
8984
|
-
return /* @__PURE__ */ (0,
|
|
8905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(Link, { href: `#${formId}-${name}`, children: error }) }, name);
|
|
8985
8906
|
};
|
|
8986
8907
|
var FormErrorSummary = ({ description }) => {
|
|
8987
8908
|
const ref = (0, import_react28.useRef)(null);
|
|
@@ -8990,10 +8911,10 @@ var FormErrorSummary = ({ description }) => {
|
|
|
8990
8911
|
if (isValid || !hasSubmitted) {
|
|
8991
8912
|
return null;
|
|
8992
8913
|
}
|
|
8993
|
-
return /* @__PURE__ */ (0,
|
|
8994
|
-
/* @__PURE__ */ (0,
|
|
8995
|
-
/* @__PURE__ */ (0,
|
|
8996
|
-
([name, error]) => (0, import_type_guards27.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0,
|
|
8914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime216.jsxs)("div", { ref, children: [
|
|
8915
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)("p", { children: description }),
|
|
8916
|
+
/* @__PURE__ */ (0, import_jsx_runtime216.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards27.isNotUndefined)(error)).map(
|
|
8917
|
+
([name, error]) => (0, import_type_guards27.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
8997
8918
|
ErrorItem,
|
|
8998
8919
|
{
|
|
8999
8920
|
error: err,
|
|
@@ -9001,7 +8922,7 @@ var FormErrorSummary = ({ description }) => {
|
|
|
9001
8922
|
name
|
|
9002
8923
|
},
|
|
9003
8924
|
err
|
|
9004
|
-
)) : /* @__PURE__ */ (0,
|
|
8925
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime216.jsx)(
|
|
9005
8926
|
ErrorItem,
|
|
9006
8927
|
{
|
|
9007
8928
|
error: error ?? "",
|
|
@@ -9019,6 +8940,62 @@ var import_react31 = require("react");
|
|
|
9019
8940
|
var import_styled_components49 = __toESM(require("styled-components"));
|
|
9020
8941
|
var import_type_guards28 = require("@wistia/type-guards");
|
|
9021
8942
|
|
|
8943
|
+
// src/components/Label/Label.tsx
|
|
8944
|
+
var import_styled_components47 = __toESM(require("styled-components"));
|
|
8945
|
+
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
8946
|
+
var requiredStyle = import_styled_components47.css`
|
|
8947
|
+
&::after {
|
|
8948
|
+
color: var(--wui-color-text-error);
|
|
8949
|
+
display: inline;
|
|
8950
|
+
padding-left: var(--wui-space-01);
|
|
8951
|
+
content: '*';
|
|
8952
|
+
}
|
|
8953
|
+
`;
|
|
8954
|
+
var disabledStyle2 = import_styled_components47.css`
|
|
8955
|
+
color: var(--wui-color-text-disabled);
|
|
8956
|
+
`;
|
|
8957
|
+
var StyledLabel4 = (0, import_styled_components47.default)(Heading).attrs({
|
|
8958
|
+
variant: "heading6",
|
|
8959
|
+
renderAs: "label"
|
|
8960
|
+
})`
|
|
8961
|
+
display: block;
|
|
8962
|
+
width: 100%;
|
|
8963
|
+
|
|
8964
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
8965
|
+
> input,
|
|
8966
|
+
> textarea,
|
|
8967
|
+
> select {
|
|
8968
|
+
display: block;
|
|
8969
|
+
}
|
|
8970
|
+
|
|
8971
|
+
> label {
|
|
8972
|
+
font-weight: normal;
|
|
8973
|
+
}
|
|
8974
|
+
|
|
8975
|
+
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
8976
|
+
${({ $disabled }) => $disabled && disabledStyle2}
|
|
8977
|
+
${({ $required }) => $required && requiredStyle}
|
|
8978
|
+
`;
|
|
8979
|
+
var Label = ({
|
|
8980
|
+
children,
|
|
8981
|
+
disabled = false,
|
|
8982
|
+
htmlFor,
|
|
8983
|
+
required = false,
|
|
8984
|
+
screenReaderOnly = false,
|
|
8985
|
+
...otherProps
|
|
8986
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(
|
|
8987
|
+
StyledLabel4,
|
|
8988
|
+
{
|
|
8989
|
+
...otherProps,
|
|
8990
|
+
$disabled: disabled,
|
|
8991
|
+
$required: required,
|
|
8992
|
+
$screenReaderOnly: screenReaderOnly,
|
|
8993
|
+
htmlFor,
|
|
8994
|
+
children
|
|
8995
|
+
}
|
|
8996
|
+
);
|
|
8997
|
+
Label.displayName = "Label";
|
|
8998
|
+
|
|
9022
8999
|
// src/components/FormGroup/CheckboxGroup.tsx
|
|
9023
9000
|
var import_react30 = require("react");
|
|
9024
9001
|
|
|
@@ -9780,7 +9757,7 @@ RadioMenuItem.displayName = "RadioMenuItem";
|
|
|
9780
9757
|
// src/components/Menu/CheckboxMenuItem.tsx
|
|
9781
9758
|
var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
|
|
9782
9759
|
var import_jsx_runtime232 = require("react/jsx-runtime");
|
|
9783
|
-
var
|
|
9760
|
+
var CheckboxIndicator = ({ checked, ...props }) => {
|
|
9784
9761
|
return checked ? /* @__PURE__ */ (0, import_jsx_runtime232.jsxs)(
|
|
9785
9762
|
"svg",
|
|
9786
9763
|
{
|
|
@@ -9852,7 +9829,7 @@ var CheckboxMenuItem = ({
|
|
|
9852
9829
|
MenuItemButton,
|
|
9853
9830
|
{
|
|
9854
9831
|
...props,
|
|
9855
|
-
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(
|
|
9832
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(CheckboxIndicator, { checked })
|
|
9856
9833
|
}
|
|
9857
9834
|
)
|
|
9858
9835
|
}
|
|
@@ -10302,7 +10279,7 @@ var StyledRadio = import_styled_components64.default.input`
|
|
|
10302
10279
|
transform: scale(1);
|
|
10303
10280
|
}
|
|
10304
10281
|
`;
|
|
10305
|
-
var
|
|
10282
|
+
var disabledStyle3 = import_styled_components64.css`
|
|
10306
10283
|
cursor: not-allowed;
|
|
10307
10284
|
opacity: 0.5;
|
|
10308
10285
|
`;
|
|
@@ -10339,7 +10316,7 @@ var StyledRadioWrapper = import_styled_components64.default.div`
|
|
|
10339
10316
|
${errorStyle};
|
|
10340
10317
|
}
|
|
10341
10318
|
|
|
10342
|
-
${({ disabled }) => disabled &&
|
|
10319
|
+
${({ disabled }) => disabled && disabledStyle3};
|
|
10343
10320
|
`;
|
|
10344
10321
|
var Radio = (0, import_react43.forwardRef)(
|
|
10345
10322
|
({
|
|
@@ -10853,12 +10830,12 @@ SelectOption.displayName = "Option";
|
|
|
10853
10830
|
var import_react_select3 = require("@radix-ui/react-select");
|
|
10854
10831
|
var import_styled_components70 = __toESM(require("styled-components"));
|
|
10855
10832
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
10856
|
-
var
|
|
10833
|
+
var StyledLabel5 = (0, import_styled_components70.default)(import_react_select3.Label)`
|
|
10857
10834
|
padding: var(--wui-select-option-padding);
|
|
10858
10835
|
`;
|
|
10859
10836
|
var SelectOptionGroup = ({ children, label, ...props }) => {
|
|
10860
10837
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(import_react_select3.Group, { ...props, children: [
|
|
10861
|
-
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10838
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(StyledLabel5, { children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
10862
10839
|
Text,
|
|
10863
10840
|
{
|
|
10864
10841
|
prominence: "secondary",
|