@wistia/ui 0.0.20 → 0.0.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.0.20
3
+ * @license @wistia/ui v0.0.22
4
4
  *
5
5
  * Copyright (c) 2024-2024, Wistia, Inc. and its affiliates.
6
6
  *
@@ -45,10 +45,15 @@ __export(src_exports, {
45
45
  Button: () => Button,
46
46
  ButtonGroup: () => ButtonGroup,
47
47
  Checkbox: () => Checkbox,
48
+ CheckboxGroup: () => CheckboxGroup,
48
49
  CheckboxMenuItem: () => CheckboxMenuItem,
49
50
  ColorSchemeWrapper: () => ColorSchemeWrapper,
50
51
  Divider: () => Divider,
51
52
  Ellipsis: () => Ellipsis,
53
+ Form: () => Form,
54
+ FormErrorSummary: () => FormErrorSummary,
55
+ FormField: () => FormField,
56
+ FormGroup: () => FormGroup,
52
57
  Heading: () => Heading,
53
58
  Icon: () => Icon,
54
59
  IconButton: () => IconButton,
@@ -61,6 +66,7 @@ __export(src_exports, {
61
66
  MenuLabel: () => MenuLabel,
62
67
  MenuRadioGroup: () => MenuRadioGroup,
63
68
  Radio: () => Radio,
69
+ RadioGroup: () => RadioGroup,
64
70
  RadioMenuItem: () => RadioMenuItem,
65
71
  ScreenReaderOnly: () => ScreenReaderOnly,
66
72
  Stack: () => Stack,
@@ -78,6 +84,7 @@ __export(src_exports, {
78
84
  mq: () => mq,
79
85
  useActiveMq: () => useActiveMq,
80
86
  useAriaLive: () => useAriaLive,
87
+ useFormState: () => useFormState,
81
88
  useMq: () => useMq,
82
89
  useWindowSize: () => useWindowSize
83
90
  });
@@ -1187,7 +1194,7 @@ var colorAliasTokens = import_styled_components4.css`
1187
1194
 
1188
1195
  /* --- Misc --- */
1189
1196
  --wui-color-bg-fill-white: #ffffff;
1190
- --wui-color-bg-nav: var(--wui-blue-600);
1197
+ --wui-color-bg-nav: #1f3399;
1191
1198
  --wui-color-focus-color: var(--wui-blue-9);
1192
1199
  --wui-color-notification-pill-color: var(--wui-pink-9);
1193
1200
  --wui-color-overlay: var(--wui-gray-alpha-9);
@@ -3359,11 +3366,8 @@ var FavoriteOutlineIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime66.js
3359
3366
  children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3360
3367
  "path",
3361
3368
  {
3362
- d: "M12 2.33321L14.9866 8.38519L21.6666 9.35586L16.8333 14.0678L17.9746 20.7198L12 17.5798L6.02532 20.7198L7.16665 14.0678L2.33333 9.35586L9.01331 8.38519L12 2.33321Z",
3363
- stroke: "#64646A",
3364
- strokeLinecap: "round",
3365
- strokeLinejoin: "round",
3366
- strokeWidth: "1.99999"
3369
+ d: "M12 1.33321C12.3806 1.33321 12.7283 1.54931 12.8967 1.89066L15.6507 7.47119L21.8104 8.36625C22.1871 8.42098 22.5 8.68481 22.6177 9.0468C22.7353 9.4088 22.6372 9.80619 22.3647 10.0719L17.9078 14.4169L18.9602 20.5507C19.0246 20.9259 18.8704 21.305 18.5625 21.5288C18.2546 21.7525 17.8463 21.7821 17.5094 21.605L12 18.7095L6.49053 21.605C6.1536 21.7821 5.74536 21.7525 5.43745 21.5288C5.12954 21.305 4.97535 20.9259 5.03972 20.5507L6.09215 14.4169L1.63526 10.0719C1.36272 9.80619 1.26465 9.4088 1.38228 9.0468C1.49991 8.68481 1.81285 8.42098 2.18953 8.36625L8.34923 7.47119L11.1032 1.89066C11.2717 1.54931 11.6193 1.33321 12 1.33321ZM12 4.59286L9.91005 8.82773C9.76439 9.12289 9.48282 9.32746 9.15711 9.37479L4.4821 10.0541L7.86471 13.3518C8.10037 13.5816 8.2079 13.9126 8.15224 14.2369L7.35352 18.8921L11.5348 16.6946C11.826 16.5416 12.1739 16.5416 12.4652 16.6946L16.6464 18.8921L15.8477 14.2369C15.792 13.9126 15.8996 13.5816 16.1352 13.3518L19.5178 10.0541L14.8428 9.37479C14.5171 9.32746 14.2355 9.12289 14.0899 8.82773L12 4.59286Z",
3370
+ fill: "currentColor"
3367
3371
  }
3368
3372
  )
3369
3373
  }
@@ -5749,15 +5753,196 @@ var ButtonGroup = ({
5749
5753
  ButtonGroup.displayName = "ButtonGroup";
5750
5754
 
5751
5755
  // src/components/Checkbox/Checkbox.tsx
5752
- var import_react11 = require("react");
5756
+ var import_react12 = require("react");
5753
5757
  var import_react_checkbox = require("@radix-ui/react-checkbox");
5754
- var import_styled_components23 = __toESM(require("styled-components"));
5755
- var import_type_guards15 = require("@wistia/type-guards");
5758
+ var import_styled_components25 = __toESM(require("styled-components"));
5759
+ var import_type_guards16 = require("@wistia/type-guards");
5756
5760
 
5757
5761
  // src/components/Label/Label.tsx
5762
+ var import_styled_components23 = __toESM(require("styled-components"));
5763
+
5764
+ // src/components/Heading/Heading.tsx
5765
+ var import_react11 = require("react");
5766
+ var import_styled_components22 = __toESM(require("styled-components"));
5767
+
5768
+ // src/components/Ellipsis/Ellipsis.tsx
5769
+ var import_type_guards14 = require("@wistia/type-guards");
5758
5770
  var import_styled_components21 = __toESM(require("styled-components"));
5759
5771
  var import_jsx_runtime164 = require("react/jsx-runtime");
5760
- var requiredStyle = import_styled_components21.css`
5772
+ var ellipsisStyle = import_styled_components21.css`
5773
+ overflow: hidden;
5774
+ text-overflow: ellipsis;
5775
+ white-space: nowrap;
5776
+
5777
+ /*
5778
+ Using feature detection (i.e., -webkit-named-image) we only target Safari browsers
5779
+ with this additional styling to prevent a bug that's exclusive to Safari.
5780
+
5781
+ Note that Safari does not properly hide the truncated text for non-inline/inline-block
5782
+ elements so we need to apply display: inline to all the paragraphs in the description.
5783
+ see https://stackoverflow.com/a/70683084
5784
+ */
5785
+ @supports (background: - webkit-named-image(i)) {
5786
+ & > div > div:has(p) {
5787
+ margin-top: 16px;
5788
+ }
5789
+
5790
+ & > div > div > p {
5791
+ display: inline;
5792
+ }
5793
+ }
5794
+ `;
5795
+ var ellipsisFlexParentStyle = import_styled_components21.css`
5796
+ min-width: 0;
5797
+ `;
5798
+ var EllipsisComponent = import_styled_components21.default.div`
5799
+ ${ellipsisStyle};
5800
+ ${({ $lines }) => {
5801
+ if ((0, import_type_guards14.isNotNil)($lines)) {
5802
+ return import_styled_components21.css`
5803
+ -webkit-box-orient: vertical;
5804
+ -webkit-line-clamp: ${$lines};
5805
+ display: -webkit-box;
5806
+ white-space: initial;
5807
+ `;
5808
+ }
5809
+ return void 0;
5810
+ }}
5811
+ `;
5812
+ var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
5813
+ EllipsisComponent,
5814
+ {
5815
+ $lines: lines,
5816
+ ...otherProps,
5817
+ children
5818
+ }
5819
+ );
5820
+ Ellipsis.displayName = "Ellipsis";
5821
+
5822
+ // src/private/helpers/makePolymorphic/makePolymorphic.tsx
5823
+ var makePolymorphic = (component) => {
5824
+ return component;
5825
+ };
5826
+
5827
+ // src/components/Heading/Heading.tsx
5828
+ var import_jsx_runtime165 = require("react/jsx-runtime");
5829
+ var heroStyle = import_styled_components22.css`
5830
+ --font-family: var(--wui-typography-heading-hero-family);
5831
+ --font-size: var(--wui-typography-heading-hero-size);
5832
+ --font-weight: var(--wui-typography-heading-hero-weight);
5833
+ --line-height: var(--wui-typography-heading-hero-line-height);
5834
+ `;
5835
+ var heading1TextStyle = import_styled_components22.css`
5836
+ --font-family: var(--wui-typography-heading-1-family);
5837
+ --font-size: var(--wui-typography-heading-1-size);
5838
+ --font-weight: var(--wui-typography-heading-1-weight);
5839
+ --line-height: var(--wui-typography-heading-1-line-height);
5840
+ `;
5841
+ var heading2TextStyle = import_styled_components22.css`
5842
+ --font-family: var(--wui-typography-heading-2-family);
5843
+ --font-size: var(--wui-typography-heading-2-size);
5844
+ --font-weight: var(--wui-typography-heading-2-weight);
5845
+ --line-height: var(--wui-typography-heading-2-line-height);
5846
+ `;
5847
+ var heading3TextStyle = import_styled_components22.css`
5848
+ --font-family: var(--wui-typography-heading-3-family);
5849
+ --font-size: var(--wui-typography-heading-3-size);
5850
+ --font-weight: var(--wui-typography-heading-3-weight);
5851
+ --line-height: var(--wui-typography-heading-3-line-height);
5852
+ `;
5853
+ var heading4TextStyle = import_styled_components22.css`
5854
+ --font-family: var(--wui-typography-heading-4-family);
5855
+ --font-size: var(--wui-typography-heading-4-size);
5856
+ --font-weight: var(--wui-typography-heading-4-weight);
5857
+ --line-height: var(--wui-typography-heading-4-line-height);
5858
+ `;
5859
+ var heading5TextStyle = import_styled_components22.css`
5860
+ --font-family: var(--wui-typography-heading-5-family);
5861
+ --font-size: var(--wui-typography-heading-5-size);
5862
+ --font-weight: var(--wui-typography-heading-5-weight);
5863
+ --line-height: var(--wui-typography-heading-5-line-height);
5864
+ `;
5865
+ var heading6TextStyle = import_styled_components22.css`
5866
+ --font-family: var(--wui-typography-heading-6-family);
5867
+ --font-size: var(--wui-typography-heading-6-size);
5868
+ --font-weight: var(--wui-typography-heading-6-weight);
5869
+ --line-height: var(--wui-typography-heading-6-line-height);
5870
+ `;
5871
+ var variantStyleMap = {
5872
+ hero: heroStyle,
5873
+ heading1: heading1TextStyle,
5874
+ heading2: heading2TextStyle,
5875
+ heading3: heading3TextStyle,
5876
+ heading4: heading4TextStyle,
5877
+ heading5: heading5TextStyle,
5878
+ heading6: heading6TextStyle
5879
+ };
5880
+ var DEFAULT_ELEMENT = "h1";
5881
+ var StyledHeading = import_styled_components22.default.div`
5882
+ ${({ $colorScheme }) => getColorScheme($colorScheme)};
5883
+ font-family: var(--font-family);
5884
+ font-size: var(--font-size);
5885
+ font-weight: var(--font-weight);
5886
+ line-height: var(--line-height);
5887
+ color: var(--wui-color-text);
5888
+ ${({ $variant }) => variantStyleMap[$variant]}
5889
+ ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
5890
+ ${({ $inline }) => $inline && import_styled_components22.css`
5891
+ display: inline-block;
5892
+ `}
5893
+ ${({ $disabled }) => $disabled && import_styled_components22.css`
5894
+ color: var(--wui-color-text-disabled);
5895
+ `}
5896
+ ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components22.css`
5897
+ user-select: none;
5898
+ `}
5899
+ ${({ $align }) => import_styled_components22.css`
5900
+ text-align: ${$align};
5901
+ `}
5902
+ margin: 0;
5903
+ `;
5904
+ var variantElementMap = {
5905
+ hero: DEFAULT_ELEMENT,
5906
+ heading1: DEFAULT_ELEMENT,
5907
+ heading2: "h2",
5908
+ heading3: "h3",
5909
+ heading4: "h4",
5910
+ heading5: "h5",
5911
+ heading6: "h6"
5912
+ };
5913
+ var HeadingComponent = (0, import_react11.forwardRef)(
5914
+ ({
5915
+ align = "left",
5916
+ colorScheme = "inherit",
5917
+ disabled = false,
5918
+ ellipsis = false,
5919
+ inline = false,
5920
+ preventUserSelect = false,
5921
+ variant = "heading1",
5922
+ renderAs,
5923
+ ...otherProps
5924
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
5925
+ StyledHeading,
5926
+ {
5927
+ ref,
5928
+ $align: align,
5929
+ $colorScheme: colorScheme,
5930
+ $disabled: disabled,
5931
+ $ellipsis: ellipsis,
5932
+ $inline: inline,
5933
+ $preventUserSelect: preventUserSelect,
5934
+ $variant: variant,
5935
+ as: renderAs ?? variantElementMap[variant],
5936
+ ...otherProps
5937
+ }
5938
+ )
5939
+ );
5940
+ HeadingComponent.displayName = "Heading";
5941
+ var Heading = makePolymorphic(HeadingComponent);
5942
+
5943
+ // src/components/Label/Label.tsx
5944
+ var import_jsx_runtime166 = require("react/jsx-runtime");
5945
+ var requiredStyle = import_styled_components23.css`
5761
5946
  &::after {
5762
5947
  color: var(--wui-color-text-error);
5763
5948
  display: inline;
@@ -5765,16 +5950,14 @@ var requiredStyle = import_styled_components21.css`
5765
5950
  content: '*';
5766
5951
  }
5767
5952
  `;
5768
- var disabledStyle = import_styled_components21.css`
5953
+ var disabledStyle = import_styled_components23.css`
5769
5954
  color: var(--wui-color-text-disabled);
5770
5955
  `;
5771
- var SPACE_BETWEEN_LABEL_AND_INPUT = "var(--wui-space-02)";
5772
- var StyledLabel = import_styled_components21.default.label`
5773
- display: inline-block;
5774
- font-size: var(--wui-typography-label-1-size);
5775
- font-weight: var(--wui-typography-label-1-weight);
5776
- line-height: var(--wui-typography-label-1-line-height);
5777
- cursor: inherit;
5956
+ var StyledLabel = (0, import_styled_components23.default)(Heading).attrs({
5957
+ variant: "heading6",
5958
+ renderAs: "label"
5959
+ })`
5960
+ display: block;
5778
5961
  width: 100%;
5779
5962
 
5780
5963
  /* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
@@ -5782,7 +5965,6 @@ var StyledLabel = import_styled_components21.default.label`
5782
5965
  > textarea,
5783
5966
  > select {
5784
5967
  display: block;
5785
- margin-top: ${SPACE_BETWEEN_LABEL_AND_INPUT};
5786
5968
  }
5787
5969
 
5788
5970
  > label {
@@ -5790,8 +5972,8 @@ var StyledLabel = import_styled_components21.default.label`
5790
5972
  }
5791
5973
 
5792
5974
  ${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
5793
- ${({ disabled }) => disabled && disabledStyle}
5794
- ${({ required }) => required && requiredStyle}
5975
+ ${({ $disabled }) => $disabled && disabledStyle}
5976
+ ${({ $required }) => $required && requiredStyle}
5795
5977
  `;
5796
5978
  var Label = ({
5797
5979
  children,
@@ -5800,24 +5982,24 @@ var Label = ({
5800
5982
  required = false,
5801
5983
  screenReaderOnly = false,
5802
5984
  ...otherProps
5803
- }) => /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
5985
+ }) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
5804
5986
  StyledLabel,
5805
5987
  {
5988
+ ...otherProps,
5989
+ $disabled: disabled,
5990
+ $required: required,
5806
5991
  $screenReaderOnly: screenReaderOnly,
5807
- disabled,
5808
5992
  htmlFor,
5809
- required,
5810
- ...otherProps,
5811
5993
  children
5812
5994
  }
5813
5995
  );
5814
5996
  Label.displayName = "Label";
5815
5997
 
5816
5998
  // src/components/Label/LabelDescription.tsx
5817
- var import_styled_components22 = __toESM(require("styled-components"));
5818
- var import_type_guards14 = require("@wistia/type-guards");
5819
- var import_jsx_runtime165 = require("react/jsx-runtime");
5820
- var StyledLabelDescription = import_styled_components22.default.div`
5999
+ var import_styled_components24 = __toESM(require("styled-components"));
6000
+ var import_type_guards15 = require("@wistia/type-guards");
6001
+ var import_jsx_runtime167 = require("react/jsx-runtime");
6002
+ var StyledLabelDescription = import_styled_components24.default.div`
5821
6003
  color: var(--wui-color-text-secondary);
5822
6004
  font-size: var(--wui-typography-body-4-size);
5823
6005
  font-weight: var(--wui-typography-body-4-weight);
@@ -5827,16 +6009,16 @@ var LabelDescription = ({
5827
6009
  children,
5828
6010
  ...props
5829
6011
  }) => {
5830
- if ((0, import_type_guards14.isNil)(children)) {
6012
+ if ((0, import_type_guards15.isNil)(children)) {
5831
6013
  return null;
5832
6014
  }
5833
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(StyledLabelDescription, { ...props, children });
6015
+ return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(StyledLabelDescription, { ...props, children });
5834
6016
  };
5835
6017
  LabelDescription.displayName = "LabelDescription";
5836
6018
 
5837
6019
  // src/components/Checkbox/Checkbox.tsx
5838
- var import_jsx_runtime166 = require("react/jsx-runtime");
5839
- var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
6020
+ var import_jsx_runtime168 = require("react/jsx-runtime");
6021
+ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
5840
6022
  "svg",
5841
6023
  {
5842
6024
  fill: "inherit",
@@ -5844,7 +6026,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
5844
6026
  viewBox: "0 0 10 8",
5845
6027
  width: "10",
5846
6028
  xmlns: "http://www.w3.org/2000/svg",
5847
- children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
6029
+ children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
5848
6030
  "path",
5849
6031
  {
5850
6032
  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",
@@ -5853,11 +6035,10 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
5853
6035
  )
5854
6036
  }
5855
6037
  );
5856
- var StyledCheckboxWrapper = import_styled_components23.default.div`
6038
+ var StyledCheckboxWrapper = import_styled_components25.default.div`
5857
6039
  display: flex;
5858
6040
  align-items: center;
5859
6041
  cursor: pointer;
5860
- padding: var(--wui-space-02);
5861
6042
 
5862
6043
  &:hover {
5863
6044
  /* TODO Lamp to design hover state */
@@ -5868,7 +6049,7 @@ var StyledCheckboxWrapper = import_styled_components23.default.div`
5868
6049
  background-color: #efefef;
5869
6050
  }
5870
6051
  `;
5871
- var StyledCheckboxRoot = (0, import_styled_components23.default)(import_react_checkbox.Root)`
6052
+ var StyledCheckboxRoot = (0, import_styled_components25.default)(import_react_checkbox.Root)`
5872
6053
  all: unset; /* CheckboxRoot renders as a button element, so we need to reset all styles */
5873
6054
  background-color: var(--wui-color-bg-fill-white);
5874
6055
  min-width: 16px;
@@ -5881,7 +6062,6 @@ var StyledCheckboxRoot = (0, import_styled_components23.default)(import_react_ch
5881
6062
  align-items: center;
5882
6063
  justify-content: center;
5883
6064
  align-self: start; /* align to the top to handle label descriptions */
5884
- margin-top: 3px; /* bump down slightly to mimic "align-self: center" */
5885
6065
 
5886
6066
  &[data-state='checked'] {
5887
6067
  background-color: var(--wui-color-bg-fill);
@@ -5903,21 +6083,21 @@ var StyledCheckboxRoot = (0, import_styled_components23.default)(import_react_ch
5903
6083
  /* TODO Lamp to design focus state */
5904
6084
  }
5905
6085
  `;
5906
- var StyledCheckboxIndicator = (0, import_styled_components23.default)(import_react_checkbox.Indicator)`
6086
+ var StyledCheckboxIndicator = (0, import_styled_components25.default)(import_react_checkbox.Indicator)`
5907
6087
  display: flex;
5908
6088
  `;
5909
- var StyledLabelWrapper = import_styled_components23.default.div`
6089
+ var StyledLabelWrapper = import_styled_components25.default.div`
5910
6090
  display: flex;
5911
6091
  flex-direction: column;
5912
- padding-left: var(--wui-space-02);
6092
+ margin-left: var(--wui-space-02);
5913
6093
  `;
5914
- var Checkbox = (0, import_react11.forwardRef)(
6094
+ var Checkbox = (0, import_react12.forwardRef)(
5915
6095
  ({
5916
6096
  checked,
5917
6097
  disabled = false,
5918
6098
  forceState,
5919
6099
  id,
5920
- label = "default",
6100
+ label,
5921
6101
  description,
5922
6102
  name,
5923
6103
  onChange,
@@ -5925,13 +6105,14 @@ var Checkbox = (0, import_react11.forwardRef)(
5925
6105
  value = "false",
5926
6106
  ...otherProps
5927
6107
  }, ref) => {
5928
- const generatedId = (0, import_react11.useId)();
5929
- const computedId = (0, import_type_guards15.isNonEmptyString)(id) ? id : `vhs-checkbox-${generatedId}`;
5930
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(StyledCheckboxWrapper, { children: [
5931
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
6108
+ const generatedId = (0, import_react12.useId)();
6109
+ const computedId = (0, import_type_guards16.isNonEmptyString)(id) ? id : `wistia-ui-checkbox-group-${generatedId}`;
6110
+ return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(StyledCheckboxWrapper, { children: [
6111
+ /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
5932
6112
  StyledCheckboxRoot,
5933
6113
  {
5934
6114
  ref,
6115
+ "aria-label": label,
5935
6116
  checked: checked ?? void 0,
5936
6117
  defaultChecked: checked === void 0 ? false : void 0,
5937
6118
  disabled,
@@ -5941,6 +6122,7 @@ var Checkbox = (0, import_react11.forwardRef)(
5941
6122
  if (onChange) {
5942
6123
  const syntheticEvent = {
5943
6124
  target: {
6125
+ name,
5944
6126
  id: computedId,
5945
6127
  checked: state === true
5946
6128
  }
@@ -5951,11 +6133,11 @@ var Checkbox = (0, import_react11.forwardRef)(
5951
6133
  required,
5952
6134
  value,
5953
6135
  ...otherProps,
5954
- children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(StyledCheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(CheckIcon, {}) })
6136
+ children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(StyledCheckboxIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(CheckIcon, {}) })
5955
6137
  }
5956
6138
  ),
5957
- /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(StyledLabelWrapper, { children: [
5958
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
6139
+ /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(StyledLabelWrapper, { children: [
6140
+ /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
5959
6141
  Label,
5960
6142
  {
5961
6143
  disabled,
@@ -5964,7 +6146,7 @@ var Checkbox = (0, import_react11.forwardRef)(
5964
6146
  children: label
5965
6147
  }
5966
6148
  ),
5967
- /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(LabelDescription, { children: description })
6149
+ /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(LabelDescription, { children: description })
5968
6150
  ] })
5969
6151
  ] });
5970
6152
  }
@@ -5972,13 +6154,13 @@ var Checkbox = (0, import_react11.forwardRef)(
5972
6154
  Checkbox.displayName = "Checkbox";
5973
6155
 
5974
6156
  // src/components/Divider/Divider.tsx
5975
- var import_styled_components24 = __toESM(require("styled-components"));
5976
- var import_jsx_runtime167 = require("react/jsx-runtime");
6157
+ var import_styled_components26 = __toESM(require("styled-components"));
6158
+ var import_jsx_runtime169 = require("react/jsx-runtime");
5977
6159
  var sizeToPixelMap = {
5978
6160
  lg: 4,
5979
6161
  sm: 1
5980
6162
  };
5981
- var DividerComponent = import_styled_components24.default.hr`
6163
+ var DividerComponent = import_styled_components26.default.hr`
5982
6164
  background: none;
5983
6165
  border-bottom: none;
5984
6166
  border-left: none;
@@ -5993,7 +6175,7 @@ var DividerComponent = import_styled_components24.default.hr`
5993
6175
  `;
5994
6176
  var Divider = ({ size = "sm", ...otherProps }) => {
5995
6177
  const responsiveSize = useResponsiveProp(size);
5996
- return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
6178
+ return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
5997
6179
  DividerComponent,
5998
6180
  {
5999
6181
  $borderHeight: sizeToPixelMap[responsiveSize],
@@ -6003,535 +6185,299 @@ var Divider = ({ size = "sm", ...otherProps }) => {
6003
6185
  };
6004
6186
  Divider.displayName = "Divider";
6005
6187
 
6006
- // src/components/Ellipsis/Ellipsis.tsx
6007
- var import_type_guards16 = require("@wistia/type-guards");
6008
- var import_styled_components25 = __toESM(require("styled-components"));
6009
- var import_jsx_runtime168 = require("react/jsx-runtime");
6010
- var ellipsisStyle = import_styled_components25.css`
6011
- overflow: hidden;
6012
- text-overflow: ellipsis;
6013
- white-space: nowrap;
6014
-
6015
- /*
6016
- Using feature detection (i.e., -webkit-named-image) we only target Safari browsers
6017
- with this additional styling to prevent a bug that's exclusive to Safari.
6188
+ // src/components/Form/Form.tsx
6189
+ var import_react14 = require("react");
6190
+ var import_styled_components28 = __toESM(require("styled-components"));
6191
+ var import_type_guards17 = require("@wistia/type-guards");
6018
6192
 
6019
- Note that Safari does not properly hide the truncated text for non-inline/inline-block
6020
- elements so we need to apply display: inline to all the paragraphs in the description.
6021
- see https://stackoverflow.com/a/70683084
6022
- */
6023
- @supports (background: - webkit-named-image(i)) {
6024
- & > div > div:has(p) {
6025
- margin-top: 16px;
6026
- }
6193
+ // src/components/Stack/Stack.tsx
6194
+ var import_react13 = require("react");
6195
+ var import_styled_components27 = __toESM(require("styled-components"));
6196
+ var import_jsx_runtime170 = require("react/jsx-runtime");
6197
+ var DEFAULT_ELEMENT2 = "div";
6198
+ var StyledStack = import_styled_components27.default.div`
6199
+ display: flex;
6200
+ flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
6201
+ gap: ${({ $gap }) => `var(--wui-${$gap})`};
6027
6202
 
6028
- & > div > div > p {
6029
- display: inline;
6030
- }
6031
- }
6032
- `;
6033
- var ellipsisFlexParentStyle = import_styled_components25.css`
6034
- min-width: 0;
6035
- `;
6036
- var EllipsisComponent = import_styled_components25.default.div`
6037
- ${ellipsisStyle};
6038
- ${({ $lines }) => {
6039
- if ((0, import_type_guards16.isNotNil)($lines)) {
6040
- return import_styled_components25.css`
6041
- -webkit-box-orient: vertical;
6042
- -webkit-line-clamp: ${$lines};
6043
- display: -webkit-box;
6044
- white-space: initial;
6045
- `;
6203
+ > * {
6204
+ flex: 1;
6046
6205
  }
6047
- return void 0;
6048
- }}
6049
6206
  `;
6050
- var Ellipsis = ({ children, lines, ...otherProps }) => /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
6051
- EllipsisComponent,
6052
- {
6053
- $lines: lines,
6054
- ...otherProps,
6055
- children
6207
+ var StackComponent = (0, import_react13.forwardRef)(
6208
+ ({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
6209
+ const responsiveGap = useResponsiveProp(gap);
6210
+ const responsiveDirection = useResponsiveProp(direction);
6211
+ return /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
6212
+ StyledStack,
6213
+ {
6214
+ ref,
6215
+ $direction: responsiveDirection,
6216
+ $gap: responsiveGap,
6217
+ as: renderAs ?? DEFAULT_ELEMENT2,
6218
+ ...props
6219
+ }
6220
+ );
6056
6221
  }
6057
6222
  );
6058
- Ellipsis.displayName = "Ellipsis";
6223
+ StackComponent.displayName = "Stack";
6224
+ var Stack = makePolymorphic(StackComponent);
6059
6225
 
6060
- // src/components/Heading/Heading.tsx
6061
- var import_react12 = require("react");
6062
- var import_styled_components26 = __toESM(require("styled-components"));
6063
-
6064
- // src/private/helpers/makePolymorphic/makePolymorphic.tsx
6065
- var makePolymorphic = (component) => {
6066
- return component;
6067
- };
6068
-
6069
- // src/components/Heading/Heading.tsx
6070
- var import_jsx_runtime169 = require("react/jsx-runtime");
6071
- var heroStyle = import_styled_components26.css`
6072
- --font-family: var(--wui-typography-heading-hero-family);
6073
- --font-size: var(--wui-typography-heading-hero-size);
6074
- --font-weight: var(--wui-typography-heading-hero-weight);
6075
- --line-height: var(--wui-typography-heading-hero-line-height);
6076
- `;
6077
- var heading1TextStyle = import_styled_components26.css`
6078
- --font-family: var(--wui-typography-heading-1-family);
6079
- --font-size: var(--wui-typography-heading-1-size);
6080
- --font-weight: var(--wui-typography-heading-1-weight);
6081
- --line-height: var(--wui-typography-heading-1-line-height);
6082
- `;
6083
- var heading2TextStyle = import_styled_components26.css`
6084
- --font-family: var(--wui-typography-heading-2-family);
6085
- --font-size: var(--wui-typography-heading-2-size);
6086
- --font-weight: var(--wui-typography-heading-2-weight);
6087
- --line-height: var(--wui-typography-heading-2-line-height);
6088
- `;
6089
- var heading3TextStyle = import_styled_components26.css`
6090
- --font-family: var(--wui-typography-heading-3-family);
6091
- --font-size: var(--wui-typography-heading-3-size);
6092
- --font-weight: var(--wui-typography-heading-3-weight);
6093
- --line-height: var(--wui-typography-heading-3-line-height);
6094
- `;
6095
- var heading4TextStyle = import_styled_components26.css`
6096
- --font-family: var(--wui-typography-heading-4-family);
6097
- --font-size: var(--wui-typography-heading-4-size);
6098
- --font-weight: var(--wui-typography-heading-4-weight);
6099
- --line-height: var(--wui-typography-heading-4-line-height);
6100
- `;
6101
- var heading5TextStyle = import_styled_components26.css`
6102
- --font-family: var(--wui-typography-heading-5-family);
6103
- --font-size: var(--wui-typography-heading-5-size);
6104
- --font-weight: var(--wui-typography-heading-5-weight);
6105
- --line-height: var(--wui-typography-heading-5-line-height);
6106
- `;
6107
- var heading6TextStyle = import_styled_components26.css`
6108
- --font-family: var(--wui-typography-heading-6-family);
6109
- --font-size: var(--wui-typography-heading-6-size);
6110
- --font-weight: var(--wui-typography-heading-6-weight);
6111
- --line-height: var(--wui-typography-heading-6-line-height);
6112
- `;
6113
- var variantStyleMap = {
6114
- hero: heroStyle,
6115
- heading1: heading1TextStyle,
6116
- heading2: heading2TextStyle,
6117
- heading3: heading3TextStyle,
6118
- heading4: heading4TextStyle,
6119
- heading5: heading5TextStyle,
6120
- heading6: heading6TextStyle
6121
- };
6122
- var DEFAULT_ELEMENT = "h1";
6123
- var StyledHeading = import_styled_components26.default.div`
6124
- ${({ $colorScheme }) => getColorScheme($colorScheme)};
6125
- font-family: var(--font-family);
6126
- font-size: var(--font-size);
6127
- font-weight: var(--font-weight);
6128
- line-height: var(--line-height);
6129
- color: var(--wui-color-text);
6130
- ${({ $variant }) => variantStyleMap[$variant]}
6131
- ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
6132
- ${({ $inline }) => $inline && import_styled_components26.css`
6133
- display: inline-block;
6134
- `}
6135
- ${({ $disabled }) => $disabled && import_styled_components26.css`
6136
- color: var(--wui-color-text-disabled);
6137
- `}
6138
- ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components26.css`
6139
- user-select: none;
6140
- `}
6141
- ${({ $align }) => import_styled_components26.css`
6142
- text-align: ${$align};
6143
- `}
6144
- margin: 0;
6145
- `;
6146
- var variantElementMap = {
6147
- hero: DEFAULT_ELEMENT,
6148
- heading1: DEFAULT_ELEMENT,
6149
- heading2: "h2",
6150
- heading3: "h3",
6151
- heading4: "h4",
6152
- heading5: "h5",
6153
- heading6: "h6"
6154
- };
6155
- var HeadingComponent = (0, import_react12.forwardRef)(
6156
- ({
6157
- align = "left",
6158
- colorScheme = "inherit",
6159
- disabled = false,
6160
- ellipsis = false,
6161
- inline = false,
6162
- preventUserSelect = false,
6163
- variant = "heading1",
6164
- renderAs,
6165
- ...otherProps
6166
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
6167
- StyledHeading,
6168
- {
6169
- ref,
6170
- $align: align,
6171
- $colorScheme: colorScheme,
6172
- $disabled: disabled,
6173
- $ellipsis: ellipsis,
6174
- $inline: inline,
6175
- $preventUserSelect: preventUserSelect,
6176
- $variant: variant,
6177
- as: renderAs ?? variantElementMap[variant],
6178
- ...otherProps
6179
- }
6180
- )
6181
- );
6182
- HeadingComponent.displayName = "Heading";
6183
- var Heading = makePolymorphic(HeadingComponent);
6184
-
6185
- // src/components/IconButton/IconButton.tsx
6186
- var import_react13 = require("react");
6187
- var import_styled_components28 = __toESM(require("styled-components"));
6188
-
6189
- // src/components/Tooltip/Tooltip.tsx
6190
- var import_react_tooltip2 = require("@radix-ui/react-tooltip");
6191
- var import_styled_components27 = __toESM(require("styled-components"));
6192
- var import_jsx_runtime170 = require("react/jsx-runtime");
6193
- var CompactTooltipStyles = import_styled_components27.css`
6194
- --tooltip-font-size: var(--wui-typography-label-4-size);
6195
- --tooltip-line-height: var(--wui-typography-label-4-line-height);
6196
- --tooltip-font-weight: var(--wui-typography-label-4-weight);
6197
- --tooltip-horizontal-padding: var(--wui-space-02);
6198
- --tooltip-vertical-padding: var(--wui-space-03);
6199
- `;
6200
- var StyledContent = (0, import_styled_components27.default)(import_react_tooltip2.Content)`
6201
- --tooltip-font-family: var(--wui-typography-family-default);
6202
- --tooltip-border-radius: var(--wui-border-radius-05);
6203
- --tooltip-bg: var(--wui-color-bg-tooltip);
6204
- --tooltip-color: var(--wui-color-text-on-fill);
6205
- --tooltip-font-size: var(--wui-typography-label-3-size);
6206
- --tooltip-line-height: var(--wui-typography-label-3-line-height);
6207
- --tooltip-font-weight: var(--wui-typography-label-3-weight);
6208
- --tooltip-horizontal-padding: var(--wui-space-03);
6209
- --tooltip-vertical-padding: var(--wui-space-03);
6210
-
6211
- ${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
6212
-
6213
- font-family: var(--tooltip-font-family);
6214
- font-size: var(--tooltip-font-size);
6215
- border-radius: var(--tooltip-border-radius);
6216
- padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
6217
- background-color: var(--tooltip-bg);
6218
- color: var(--tooltip-color);
6219
- user-select: none;
6220
- animation-duration: 400ms;
6221
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
6222
- will-change: transform, opacity;
6223
- max-width: 30em;
6224
-
6225
- &[data-state='delayed-open'][data-side='top'] {
6226
- animation-name: slideDownAndFade;
6227
- }
6228
-
6229
- &[data-state='delayed-open'][data-side='right'] {
6230
- animation-name: slideLeftAndFade;
6231
- }
6232
-
6233
- &[data-state='delayed-open'][data-side='bottom'] {
6234
- animation-name: slideUpAndFade;
6235
- }
6236
-
6237
- &[data-state='delayed-open'][data-side='left'] {
6238
- animation-name: slideRightAndFade;
6239
- }
6240
- `;
6241
- var VISUAL_OFFSET = 6;
6242
- var Tooltip = ({
6243
- delay = 700,
6244
- direction = "top",
6245
- content,
6246
- children,
6247
- forceOpen,
6248
- compact = false,
6249
- hideArrow = false
6250
- }) => {
6251
- const rootProps = {};
6252
- if (content === "" || content === null) {
6253
- rootProps.open = false;
6254
- }
6255
- if (forceOpen === true) {
6256
- rootProps.open = true;
6257
- }
6258
- return /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
6259
- import_react_tooltip2.Root,
6260
- {
6261
- delayDuration: delay,
6262
- ...rootProps,
6263
- children: [
6264
- /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
6265
- /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)(
6266
- StyledContent,
6267
- {
6268
- $compact: compact,
6269
- side: direction,
6270
- sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
6271
- children: [
6272
- content,
6273
- !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
6274
- "svg",
6275
- {
6276
- fill: "var(--tooltip-bg)",
6277
- height: "8",
6278
- style: { transform: "translateY(-2px)" },
6279
- viewBox: "0 0 12 8",
6280
- width: "12",
6281
- xmlns: "http://www.w3.org/2000/svg",
6282
- children: /* @__PURE__ */ (0, import_jsx_runtime170.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" })
6283
- }
6284
- ) }) : null
6285
- ]
6286
- }
6287
- ) })
6288
- ]
6289
- }
6290
- );
6291
- };
6292
- Tooltip.displayName = "Tooltip";
6293
-
6294
- // src/components/IconButton/IconButton.tsx
6295
- var import_jsx_runtime171 = require("react/jsx-runtime");
6296
- var StyledButton2 = (0, import_styled_components28.default)(Button)`
6297
- --icon-button-size-sm: 24px;
6298
- --icon-button-size-md: 32px;
6299
- --icon-button-size-lg: 40px;
6300
- --icon-button-size-xl: 48px;
6301
-
6302
- border-radius: 50%;
6303
- height: ${({ size }) => `var(--icon-button-size-${size})`};
6304
- width: ${({ size }) => `var(--icon-button-size-${size})`};
6305
- display: flex;
6306
- justify-content: center;
6307
- align-items: center;
6308
- line-height: 1;
6309
- `;
6310
- var IconButton = (0, import_react13.forwardRef)(
6311
- ({ children, label, disableTooltip = false, size = "md", ...props }, ref) => {
6312
- const responsiveSize = useResponsiveProp(size);
6313
- const button = /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
6314
- StyledButton2,
6315
- {
6316
- ...props,
6317
- ref,
6318
- "aria-label": label,
6319
- "data-wistia-ui-icon-button": true,
6320
- size: responsiveSize,
6321
- children: (0, import_react13.cloneElement)(import_react13.Children.only(children), {
6322
- size: responsiveSize
6323
- })
6324
- }
6325
- );
6326
- if (disableTooltip) {
6327
- return button;
6328
- }
6329
- return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(Tooltip, { content: label, children: button });
6330
- }
6331
- );
6332
- IconButton.displayName = "IconButton";
6333
-
6334
- // src/components/Menu/Menu.tsx
6335
- var import_styled_components29 = __toESM(require("styled-components"));
6336
- var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
6337
- var import_type_guards17 = require("@wistia/type-guards");
6338
- var import_jsx_runtime172 = require("react/jsx-runtime");
6339
- var open = import_styled_components29.keyframes`
6340
- from {
6341
- opacity: 0;
6342
- transform: scale(.97) translateY(-8px);
6343
- }
6344
- to {
6345
- opacity: 1;
6346
- transform: scale(1);
6347
- }
6348
- `;
6349
- var close = import_styled_components29.keyframes`
6350
- from {
6351
- opacity: 1;
6352
- transform: scale(1);
6353
- }
6354
- to {
6355
- opacity: 0;
6356
- transform: scale(.97) translateY(-8px);
6357
- }
6358
- `;
6359
- var menuContentCss = import_styled_components29.css`
6360
- --menu-font-family: var(--wui-typography-family-default);
6361
- --menu-bg: var(--wui-color-bg-fill-white); /* TODO - Not sure what token to use for this */
6362
- --menu-shadow: 0 0 64px 0 rgba(0 0 0 / 8%); /* TODO - Need a box-shadow token */
6363
- --menu-border-radius: var(--wui-border-radius-01);
6364
- --menu-padding: var(--wui-space-03);
6365
- --menu-min-width: 120px;
6366
- --menu-max-width: 284px;
6367
- --menu-zindex: 500; /* TODO - need z-index token */
6368
-
6369
- animation: ${open}; /* TODO - need easing tokens */
6370
- font-family: var(--menu-font-family);
6371
- background: var(--menu-bg);
6372
- border-radius: var(--menu-border-radius);
6373
- box-shadow: var(--menu-shadow); /* TODO - Need a box-shadow token */
6374
- max-height: var(--radix-dropdown-menu-content-available-height);
6375
- min-width: var(--menu-min-width);
6376
- max-width: var(--menu-max-width);
6377
- overflow: auto;
6378
- padding: var(--menu-padding);
6379
- transform-origin: var(--radix-dropdown-menu-content-transform-origin);
6380
- z-index: var(--menu-zindex);
6381
-
6382
- &[data-state='closed'] {
6383
- animation: ${close}; /* TODO - need easing tokens */
6384
- }
6385
-
6386
- ${mq.smAndUp} {
6387
- bottom: 0;
6388
- padding: var(--menu-padding);
6389
- right: 0;
6390
- top: 0;
6391
- transform: initial;
6392
- }
6393
-
6394
- hr {
6395
- margin: var(--wui-space-02) 0;
6396
- }
6397
- `;
6398
- var MenuContent = (0, import_styled_components29.default)(import_react_dropdown_menu.DropdownMenuContent)`
6399
- ${menuContentCss}
6400
- `;
6401
- var Menu = ({
6402
- align = "start",
6403
- children,
6404
- trigger,
6405
- label,
6406
- isOpen,
6407
- triggerProps = {},
6408
- onOpenChange,
6409
- onInteractOutside,
6410
- ...props
6411
- }) => {
6412
- return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
6413
- import_react_dropdown_menu.DropdownMenu,
6414
- {
6415
- modal: false,
6416
- ...(0, import_type_guards17.isNotNil)(onOpenChange) && (0, import_type_guards17.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {},
6417
- children: [
6418
- /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards17.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
6419
- Button,
6420
- {
6421
- "aria-expanded": isOpen,
6422
- forceState: isOpen ? "active" : void 0,
6423
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Icon, { type: "caret-down" }),
6424
- ...triggerProps,
6425
- children: label
6426
- }
6427
- ) }),
6428
- /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
6429
- MenuContent,
6430
- {
6431
- ...props,
6432
- align,
6433
- onFocusOutside: (event) => {
6434
- event.preventDefault();
6435
- },
6436
- sideOffset: 6,
6437
- children
6438
- }
6439
- ) })
6440
- ]
6226
+ // src/components/Form/Form.tsx
6227
+ var import_jsx_runtime171 = require("react/jsx-runtime");
6228
+ var StyledForm = import_styled_components28.default.form`
6229
+ --form-default-width: 690px;
6230
+
6231
+ max-width: ${({ fullWidth }) => fullWidth ? "auto" : "var(--form-default-width)"};
6232
+ align-items: ${({ fullWidth }) => fullWidth ? "stretch" : "flex-start"};
6233
+ `;
6234
+ var FormContext = (0, import_react14.createContext)({
6235
+ values: {},
6236
+ errors: {},
6237
+ hasSubmitted: false,
6238
+ formId: ""
6239
+ });
6240
+ var FormComponent = ({ children, action, values = {}, validate, fullWidth = false, ...props }, forwardedRef) => {
6241
+ const [errors, setErrors] = (0, import_react14.useState)({});
6242
+ const [hasSubmitted, setHasSubmitted] = (0, import_react14.useState)(false);
6243
+ const innerRef = (0, import_react14.useRef)();
6244
+ const ref = forwardedRef ?? innerRef;
6245
+ const autoId = (0, import_react14.useId)();
6246
+ const id = props.id ?? autoId;
6247
+ const handleValidate = (nextFormData) => {
6248
+ const nextData = Object.fromEntries(nextFormData.entries());
6249
+ if ((0, import_type_guards17.isUndefined)(validate)) {
6250
+ return {};
6251
+ }
6252
+ return validate(nextData);
6253
+ };
6254
+ const handleBlur = (event) => {
6255
+ if (props.onBlur) {
6256
+ props.onBlur(event);
6257
+ }
6258
+ const formData = new FormData(event.currentTarget);
6259
+ if ((0, import_type_guards17.isNotUndefined)(validate)) {
6260
+ handleValidate(formData);
6261
+ }
6262
+ };
6263
+ const handleSubmit = (event) => {
6264
+ event.preventDefault();
6265
+ const formData = new FormData(event.currentTarget);
6266
+ const nextErrors = handleValidate(formData);
6267
+ const isValid = Object.keys(nextErrors).length === 0;
6268
+ setErrors(nextErrors);
6269
+ setHasSubmitted(true);
6270
+ if (isValid && props.onSubmit) {
6271
+ props.onSubmit(event);
6272
+ }
6273
+ if (isValid && action) {
6274
+ void action(formData);
6275
+ }
6276
+ };
6277
+ const handleReset = (event) => {
6278
+ setErrors({});
6279
+ setHasSubmitted(false);
6280
+ if (props.onReset) {
6281
+ props.onReset(event);
6441
6282
  }
6283
+ if (action) {
6284
+ void action(null);
6285
+ }
6286
+ };
6287
+ const context = (0, import_react14.useMemo)(() => {
6288
+ return {
6289
+ values,
6290
+ errors,
6291
+ hasSubmitted,
6292
+ formId: id
6293
+ };
6294
+ }, [values, errors, id, hasSubmitted]);
6295
+ return (
6296
+ // @ts-expect-error - generic context providers are a giant pain
6297
+ /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(FormContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
6298
+ Stack,
6299
+ {
6300
+ gap: "space-05",
6301
+ ...props,
6302
+ ref,
6303
+ as: StyledForm,
6304
+ fullWidth,
6305
+ id,
6306
+ onBlur: handleBlur,
6307
+ onReset: handleReset,
6308
+ onSubmit: handleSubmit,
6309
+ children
6310
+ }
6311
+ ) })
6442
6312
  );
6443
6313
  };
6444
- Menu.displayName = "Menu";
6314
+ FormComponent.displayName = "Form";
6315
+ var Form = (0, import_react14.forwardRef)(FormComponent);
6445
6316
 
6446
- // src/components/Menu/MenuLabel.tsx
6317
+ // src/components/Form/useFormState.tsx
6318
+ var import_react15 = require("react");
6319
+ var useFormState = (action, initialData = {}) => {
6320
+ const [data, setData] = (0, import_react15.useState)(initialData);
6321
+ const [isPending, setIsPending] = (0, import_react15.useState)(false);
6322
+ const [error, setError] = (0, import_react15.useState)(null);
6323
+ const formAction = (0, import_react15.useCallback)(
6324
+ async (nextFormData) => {
6325
+ if (nextFormData === null) {
6326
+ setData(initialData);
6327
+ setError(null);
6328
+ return;
6329
+ }
6330
+ const nextData = Object.fromEntries(nextFormData.entries());
6331
+ setIsPending(true);
6332
+ try {
6333
+ const result = await action(data, nextData);
6334
+ setData(result);
6335
+ } catch (err) {
6336
+ setError(err);
6337
+ } finally {
6338
+ setIsPending(false);
6339
+ }
6340
+ },
6341
+ [action, initialData, data]
6342
+ );
6343
+ return [
6344
+ {
6345
+ data,
6346
+ error
6347
+ },
6348
+ formAction,
6349
+ isPending
6350
+ ];
6351
+ };
6352
+
6353
+ // src/components/Form/FormErrorSummary.tsx
6354
+ var import_react16 = require("react");
6355
+ var import_type_guards18 = require("@wistia/type-guards");
6356
+ var import_jsx_runtime172 = require("react/jsx-runtime");
6357
+ var ErrorItem = ({ name, error, formId }) => {
6358
+ return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Link, { href: `${formId}-${name}`, children: error }) }, name);
6359
+ };
6360
+ var FormErrorSummary = ({ description }) => {
6361
+ const ref = (0, import_react16.useRef)(null);
6362
+ const { formId, errors, hasSubmitted } = (0, import_react16.useContext)(FormContext);
6363
+ const isValid = Object.keys(errors).length === 0;
6364
+ if (isValid || !hasSubmitted) {
6365
+ return null;
6366
+ }
6367
+ return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { ref, children: [
6368
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("p", { children: description }),
6369
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("ul", { children: Object.entries(errors).filter(([, error]) => (0, import_type_guards18.isNotUndefined)(error)).map(
6370
+ ([name, error]) => (0, import_type_guards18.isArray)(error) ? error.map((err) => /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
6371
+ ErrorItem,
6372
+ {
6373
+ error: err,
6374
+ formId,
6375
+ name
6376
+ },
6377
+ err
6378
+ )) : /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
6379
+ ErrorItem,
6380
+ {
6381
+ error: error ?? "",
6382
+ formId,
6383
+ name
6384
+ },
6385
+ error
6386
+ )
6387
+ ) })
6388
+ ] });
6389
+ };
6390
+
6391
+ // src/components/FormField/FormField.tsx
6392
+ var import_react20 = require("react");
6447
6393
  var import_styled_components31 = __toESM(require("styled-components"));
6448
- var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
6394
+ var import_type_guards19 = require("@wistia/type-guards");
6449
6395
 
6450
6396
  // src/components/Text/Text.tsx
6451
- var import_react14 = require("react");
6452
- var import_styled_components30 = __toESM(require("styled-components"));
6397
+ var import_react17 = require("react");
6398
+ var import_styled_components29 = __toESM(require("styled-components"));
6453
6399
  var import_jsx_runtime173 = require("react/jsx-runtime");
6454
- var bodyBoldStyles = import_styled_components30.css`
6400
+ var bodyBoldStyles = import_styled_components29.css`
6455
6401
  > strong,
6456
6402
  b {
6457
6403
  font-weight: var(--wui-typography-weight-body-bold);
6458
6404
  }
6459
6405
  `;
6460
- var labelBoldStyles = import_styled_components30.css`
6406
+ var labelBoldStyles = import_styled_components29.css`
6461
6407
  > strong,
6462
6408
  b {
6463
6409
  font-weight: var(--wui-typography-weight-label-bold);
6464
6410
  }
6465
6411
  `;
6466
- var body1TextStyle = import_styled_components30.css`
6412
+ var body1TextStyle = import_styled_components29.css`
6467
6413
  --font-family: var(--wui-typography-body-1-family);
6468
6414
  --font-size: var(--wui-typography-body-1-size);
6469
6415
  --font-weight: var(--wui-typography-body-1-weight);
6470
6416
  --line-height: var(--wui-typography-body-1-line-height);
6471
6417
  ${bodyBoldStyles}
6472
6418
  `;
6473
- var body2TextStyle = import_styled_components30.css`
6419
+ var body2TextStyle = import_styled_components29.css`
6474
6420
  --font-family: var(--wui-typography-body-2-family);
6475
6421
  --font-size: var(--wui-typography-body-2-size);
6476
6422
  --font-weight: var(--wui-typography-body-2-weight);
6477
6423
  --line-height: var(--wui-typography-body-2-line-height);
6478
6424
  ${bodyBoldStyles}
6479
6425
  `;
6480
- var body3TextStyle = import_styled_components30.css`
6426
+ var body3TextStyle = import_styled_components29.css`
6481
6427
  --font-family: var(--wui-typography-body-3-family);
6482
6428
  --font-size: var(--wui-typography-body-3-size);
6483
6429
  --font-weight: var(--wui-typography-body-3-weight);
6484
6430
  --line-height: var(--wui-typography-body-3-line-height);
6485
6431
  ${bodyBoldStyles}
6486
6432
  `;
6487
- var body4TextStyle = import_styled_components30.css`
6433
+ var body4TextStyle = import_styled_components29.css`
6488
6434
  --font-family: var(--wui-typography-body-4-family);
6489
6435
  --font-size: var(--wui-typography-body-4-size);
6490
6436
  --font-weight: var(--wui-typography-body-4-weight);
6491
6437
  --line-height: var(--wui-typography-body-4-line-height);
6492
6438
  ${bodyBoldStyles}
6493
6439
  `;
6494
- var label1TextStyle = import_styled_components30.css`
6440
+ var label1TextStyle = import_styled_components29.css`
6495
6441
  --font-family: var(--wui-typography-label-1-family);
6496
6442
  --font-size: var(--wui-typography-label-1-size);
6497
6443
  --font-weight: var(--wui-typography-label-1-weight);
6498
6444
  --line-height: var(--wui-typography-label-1-line-height);
6499
6445
  ${labelBoldStyles}
6500
6446
  `;
6501
- var label2TextStyle = import_styled_components30.css`
6447
+ var label2TextStyle = import_styled_components29.css`
6502
6448
  --font-family: var(--wui-typography-label-2-family);
6503
6449
  --font-size: var(--wui-typography-label-2-size);
6504
6450
  --font-weight: var(--wui-typography-label-2-weight);
6505
6451
  --line-height: var(--wui-typography-label-2-line-height);
6506
6452
  ${labelBoldStyles}
6507
6453
  `;
6508
- var label3TextStyle = import_styled_components30.css`
6454
+ var label3TextStyle = import_styled_components29.css`
6509
6455
  --font-family: var(--wui-typography-label-3-family);
6510
6456
  --font-size: var(--wui-typography-label-3-size);
6511
6457
  --font-weight: var(--wui-typography-label-3-weight);
6512
6458
  --line-height: var(--wui-typography-label-3-line-height);
6513
6459
  ${labelBoldStyles}
6514
6460
  `;
6515
- var label4TextStyle = import_styled_components30.css`
6461
+ var label4TextStyle = import_styled_components29.css`
6516
6462
  --font-family: var(--wui-typography-label-4-family);
6517
6463
  --font-size: var(--wui-typography-label-4-size);
6518
6464
  --font-weight: var(--wui-typography-label-4-weight);
6519
6465
  --line-height: var(--wui-typography-label-4-line-height);
6520
6466
  ${labelBoldStyles}
6521
6467
  `;
6522
- var body1MonoTextStyle = import_styled_components30.css`
6468
+ var body1MonoTextStyle = import_styled_components29.css`
6523
6469
  ${body1TextStyle};
6524
6470
  --font-family: var(--wui-typography-family-mono);
6525
6471
  `;
6526
- var body2MonoTextStyle = import_styled_components30.css`
6472
+ var body2MonoTextStyle = import_styled_components29.css`
6527
6473
  ${body2TextStyle};
6528
6474
  --font-family: var(--wui-typography-family-mono);
6529
6475
  `;
6530
- var body3MonoTextStyle = import_styled_components30.css`
6476
+ var body3MonoTextStyle = import_styled_components29.css`
6531
6477
  ${body3TextStyle};
6532
6478
  --font-family: var(--wui-typography-family-mono);
6533
6479
  `;
6534
- var body4MonoTextStyle = import_styled_components30.css`
6480
+ var body4MonoTextStyle = import_styled_components29.css`
6535
6481
  ${body4TextStyle};
6536
6482
  --font-family: var(--wui-typography-family-mono);
6537
6483
  `;
@@ -6549,13 +6495,13 @@ var variantStyleMap2 = {
6549
6495
  label3: label3TextStyle,
6550
6496
  label4: label4TextStyle
6551
6497
  };
6552
- var highContrastProminenceStyle = import_styled_components30.css`
6498
+ var highContrastProminenceStyle = import_styled_components29.css`
6553
6499
  --text-color: var(--wui-color-text-high-contrast);
6554
6500
  `;
6555
- var vibrantProminenceStyle = import_styled_components30.css`
6501
+ var vibrantProminenceStyle = import_styled_components29.css`
6556
6502
  --text-color: var(--wui-color-text);
6557
6503
  `;
6558
- var secondaryProminenceStyle = import_styled_components30.css`
6504
+ var secondaryProminenceStyle = import_styled_components29.css`
6559
6505
  --text-color: var(--wui-color-text-secondary);
6560
6506
  `;
6561
6507
  var prominenceMap = {
@@ -6563,7 +6509,7 @@ var prominenceMap = {
6563
6509
  vibrant: vibrantProminenceStyle,
6564
6510
  secondary: secondaryProminenceStyle
6565
6511
  };
6566
- var StyledText = import_styled_components30.default.div`
6512
+ var StyledText = import_styled_components29.default.div`
6567
6513
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
6568
6514
  font-family: var(--font-family);
6569
6515
  font-size: var(--font-size);
@@ -6575,24 +6521,24 @@ var StyledText = import_styled_components30.default.div`
6575
6521
  ${({ $variant }) => variantStyleMap2[$variant]}
6576
6522
  ${({ $prominence }) => prominenceMap[$prominence]}
6577
6523
  ${({ $ellipsis }) => $ellipsis && ellipsisStyle};
6578
- ${({ $inline }) => $inline && import_styled_components30.css`
6524
+ ${({ $inline }) => $inline && import_styled_components29.css`
6579
6525
  display: inline-block;
6580
6526
  `}
6581
- ${({ $disabled }) => $disabled && import_styled_components30.css`
6527
+ ${({ $disabled }) => $disabled && import_styled_components29.css`
6582
6528
  --text-color: var(--wui-color-text-disabled);
6583
6529
  `}
6584
- ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components30.css`
6530
+ ${({ $preventUserSelect }) => $preventUserSelect && import_styled_components29.css`
6585
6531
  user-select: none;
6586
6532
  `}
6587
- ${({ $align }) => import_styled_components30.css`
6533
+ ${({ $align }) => import_styled_components29.css`
6588
6534
  text-align: ${$align};
6589
6535
  `}
6590
- ${({ as }) => as === "p" && import_styled_components30.css`
6536
+ ${({ as }) => as === "p" && import_styled_components29.css`
6591
6537
  display: block;
6592
6538
  `}
6593
6539
  `;
6594
- var DEFAULT_ELEMENT2 = "div";
6595
- var TextComponent = (0, import_react14.forwardRef)(
6540
+ var DEFAULT_ELEMENT3 = "div";
6541
+ var TextComponent = (0, import_react17.forwardRef)(
6596
6542
  ({
6597
6543
  align = "left",
6598
6544
  colorScheme = "inherit",
@@ -6617,27 +6563,447 @@ var TextComponent = (0, import_react14.forwardRef)(
6617
6563
  $preventUserSelect: preventUserSelect,
6618
6564
  $prominence: prominence,
6619
6565
  $variant: variant,
6620
- as: renderAs ?? DEFAULT_ELEMENT2,
6566
+ as: renderAs ?? DEFAULT_ELEMENT3,
6621
6567
  ...otherProps
6622
6568
  }
6623
6569
  );
6624
6570
  }
6625
6571
  );
6626
- TextComponent.displayName = "Text";
6627
- var Text = makePolymorphic(TextComponent);
6572
+ TextComponent.displayName = "Text";
6573
+ var Text = makePolymorphic(TextComponent);
6574
+
6575
+ // src/components/FormGroup/CheckboxGroup.tsx
6576
+ var import_react19 = require("react");
6577
+
6578
+ // src/components/FormGroup/FormGroup.tsx
6579
+ var import_styled_components30 = __toESM(require("styled-components"));
6580
+ var import_react18 = require("react");
6581
+ var import_jsx_runtime174 = require("react/jsx-runtime");
6582
+ var StyledFieldset = import_styled_components30.default.fieldset`
6583
+ border: 0;
6584
+ `;
6585
+ var StyledLegend = import_styled_components30.default.legend`
6586
+ margin-bottom: var(--space-01);
6587
+ `;
6588
+ var FormGroup = ({ children, label, ...props }) => {
6589
+ const ref = (0, import_react18.useRef)();
6590
+ return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
6591
+ Stack,
6592
+ {
6593
+ ...props,
6594
+ ref,
6595
+ renderAs: StyledFieldset,
6596
+ children: [
6597
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
6598
+ Heading,
6599
+ {
6600
+ renderAs: StyledLegend,
6601
+ variant: "heading5",
6602
+ children: label
6603
+ }
6604
+ ),
6605
+ children
6606
+ ]
6607
+ }
6608
+ );
6609
+ };
6610
+ FormGroup.displayName = "FormGroup";
6611
+
6612
+ // src/components/FormGroup/CheckboxGroup.tsx
6613
+ var import_jsx_runtime175 = require("react/jsx-runtime");
6614
+ var CheckboxGroupContext = (0, import_react19.createContext)(null);
6615
+ var CheckboxGroup = ({
6616
+ children,
6617
+ name,
6618
+ onChange,
6619
+ value,
6620
+ ...props
6621
+ }) => {
6622
+ const context = (0, import_react19.useMemo)(() => {
6623
+ return {
6624
+ name,
6625
+ onChange
6626
+ };
6627
+ }, [name, onChange]);
6628
+ return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(CheckboxGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(FormGroup, { ...props, children }) });
6629
+ };
6630
+ CheckboxGroup.displayName = "CheckboxGroup";
6631
+
6632
+ // src/components/FormField/FormField.tsx
6633
+ var import_jsx_runtime176 = require("react/jsx-runtime");
6634
+ var StyledFormField = import_styled_components31.default.div`
6635
+ --form-field-spacing: var(--wui-space-01);
6636
+ --form-field-error-color: var(--wui-color-text-error);
6637
+
6638
+ display: flex;
6639
+ flex-direction: column;
6640
+ gap: var(--form-field-spacing);
6641
+ `;
6642
+ var StyledErrorList = import_styled_components31.default.ul`
6643
+ margin: 0;
6644
+ padding: 0;
6645
+ padding-left: var(--wui-space-04);
6646
+ display: flex;
6647
+ flex-direction: column;
6648
+ gap: var(--wui-space-01);
6649
+ `;
6650
+ var ErrorMessages = ({ errors, id }) => {
6651
+ const isMultipleErrors = (0, import_type_guards19.isArray)(errors);
6652
+ return isMultipleErrors ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledErrorList, { children: errors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
6653
+ Text,
6654
+ {
6655
+ colorScheme: "error",
6656
+ id: `${id}-${index}`,
6657
+ renderAs: "li",
6658
+ variant: "label4",
6659
+ children: error
6660
+ },
6661
+ `${id}-${index}`
6662
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
6663
+ Text,
6664
+ {
6665
+ colorScheme: "error",
6666
+ id,
6667
+ variant: "label4",
6668
+ children: errors
6669
+ },
6670
+ id
6671
+ );
6672
+ };
6673
+ var FormField = ({
6674
+ children,
6675
+ label,
6676
+ name,
6677
+ error,
6678
+ value,
6679
+ ...props
6680
+ }) => {
6681
+ const formState = (0, import_react20.useContext)(FormContext);
6682
+ const checkboxGroup = (0, import_react20.useContext)(CheckboxGroupContext);
6683
+ const id = props.id ?? `${formState.formId}-${name}`;
6684
+ const isInlineLabel = children.type === Checkbox;
6685
+ const computedError = error ?? formState.errors[name];
6686
+ const defaultValue = formState.values[name];
6687
+ let childProps = {
6688
+ name,
6689
+ id,
6690
+ label: isInlineLabel ? label : void 0,
6691
+ ...props
6692
+ };
6693
+ if ((0, import_type_guards19.isUndefined)(value) && (0, import_type_guards19.isNotUndefined)(defaultValue)) {
6694
+ childProps = {
6695
+ ...childProps,
6696
+ defaultValue
6697
+ };
6698
+ }
6699
+ if ((0, import_type_guards19.isNotNil)(checkboxGroup)) {
6700
+ const computedName = (0, import_type_guards19.isNotNil)(checkboxGroup.name) ? `${checkboxGroup.name}[${name}]` : name;
6701
+ const handleChange = (event) => {
6702
+ if ((0, import_type_guards19.isNotUndefined)(props.onChange)) {
6703
+ props.onChange(event);
6704
+ }
6705
+ if ((0, import_type_guards19.isNotUndefined)(checkboxGroup.onChange)) {
6706
+ checkboxGroup.onChange(event);
6707
+ }
6708
+ };
6709
+ childProps = {
6710
+ ...childProps,
6711
+ name: computedName,
6712
+ onChange: handleChange,
6713
+ "aria-invalid": (0, import_type_guards19.isNotNil)(error),
6714
+ "aria-describedby": (0, import_type_guards19.isNotNil)(error) ? `${id}-error` : void 0
6715
+ };
6716
+ }
6717
+ import_react20.Children.only(children);
6718
+ return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(StyledFormField, { ...props, children: [
6719
+ !isInlineLabel && /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Label, { htmlFor: id, children: label }),
6720
+ (0, import_react20.cloneElement)(children, childProps),
6721
+ (0, import_type_guards19.isNotNil)(computedError) ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
6722
+ ErrorMessages,
6723
+ {
6724
+ errors: computedError,
6725
+ id: `${id}-error`
6726
+ }
6727
+ ) : null
6728
+ ] });
6729
+ };
6730
+ FormField.displayName = "FormField";
6731
+
6732
+ // src/components/IconButton/IconButton.tsx
6733
+ var import_react21 = require("react");
6734
+ var import_styled_components33 = __toESM(require("styled-components"));
6735
+
6736
+ // src/components/Tooltip/Tooltip.tsx
6737
+ var import_react_tooltip2 = require("@radix-ui/react-tooltip");
6738
+ var import_styled_components32 = __toESM(require("styled-components"));
6739
+ var import_jsx_runtime177 = require("react/jsx-runtime");
6740
+ var CompactTooltipStyles = import_styled_components32.css`
6741
+ --tooltip-font-size: var(--wui-typography-label-4-size);
6742
+ --tooltip-line-height: var(--wui-typography-label-4-line-height);
6743
+ --tooltip-font-weight: var(--wui-typography-label-4-weight);
6744
+ --tooltip-horizontal-padding: var(--wui-space-02);
6745
+ --tooltip-vertical-padding: var(--wui-space-03);
6746
+ `;
6747
+ var StyledContent = (0, import_styled_components32.default)(import_react_tooltip2.Content)`
6748
+ --tooltip-font-family: var(--wui-typography-family-default);
6749
+ --tooltip-border-radius: var(--wui-border-radius-05);
6750
+ --tooltip-bg: var(--wui-color-bg-tooltip);
6751
+ --tooltip-color: var(--wui-color-text-on-fill);
6752
+ --tooltip-font-size: var(--wui-typography-label-3-size);
6753
+ --tooltip-line-height: var(--wui-typography-label-3-line-height);
6754
+ --tooltip-font-weight: var(--wui-typography-label-3-weight);
6755
+ --tooltip-horizontal-padding: var(--wui-space-03);
6756
+ --tooltip-vertical-padding: var(--wui-space-03);
6757
+
6758
+ ${({ $compact }) => Boolean($compact) && CompactTooltipStyles};
6759
+
6760
+ font-family: var(--tooltip-font-family);
6761
+ font-size: var(--tooltip-font-size);
6762
+ border-radius: var(--tooltip-border-radius);
6763
+ padding: var(--tooltip-horizontal-padding) var(--tooltip-vertical-padding);
6764
+ background-color: var(--tooltip-bg);
6765
+ color: var(--tooltip-color);
6766
+ user-select: none;
6767
+ animation-duration: 400ms;
6768
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
6769
+ will-change: transform, opacity;
6770
+ max-width: 30em;
6771
+
6772
+ &[data-state='delayed-open'][data-side='top'] {
6773
+ animation-name: slideDownAndFade;
6774
+ }
6775
+
6776
+ &[data-state='delayed-open'][data-side='right'] {
6777
+ animation-name: slideLeftAndFade;
6778
+ }
6779
+
6780
+ &[data-state='delayed-open'][data-side='bottom'] {
6781
+ animation-name: slideUpAndFade;
6782
+ }
6783
+
6784
+ &[data-state='delayed-open'][data-side='left'] {
6785
+ animation-name: slideRightAndFade;
6786
+ }
6787
+ `;
6788
+ var VISUAL_OFFSET = 6;
6789
+ var Tooltip = ({
6790
+ delay = 700,
6791
+ direction = "top",
6792
+ content,
6793
+ children,
6794
+ forceOpen,
6795
+ compact = false,
6796
+ hideArrow = false
6797
+ }) => {
6798
+ const rootProps = {};
6799
+ if (content === "" || content === null) {
6800
+ rootProps.open = false;
6801
+ }
6802
+ if (forceOpen === true) {
6803
+ rootProps.open = true;
6804
+ }
6805
+ return /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
6806
+ import_react_tooltip2.Root,
6807
+ {
6808
+ delayDuration: delay,
6809
+ ...rootProps,
6810
+ children: [
6811
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_react_tooltip2.Trigger, { asChild: true, children }),
6812
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_react_tooltip2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
6813
+ StyledContent,
6814
+ {
6815
+ $compact: compact,
6816
+ side: direction,
6817
+ sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET - 2,
6818
+ children: [
6819
+ content,
6820
+ !hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_react_tooltip2.Arrow, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
6821
+ "svg",
6822
+ {
6823
+ fill: "var(--tooltip-bg)",
6824
+ height: "8",
6825
+ style: { transform: "translateY(-2px)" },
6826
+ viewBox: "0 0 12 8",
6827
+ width: "12",
6828
+ xmlns: "http://www.w3.org/2000/svg",
6829
+ children: /* @__PURE__ */ (0, import_jsx_runtime177.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" })
6830
+ }
6831
+ ) }) : null
6832
+ ]
6833
+ }
6834
+ ) })
6835
+ ]
6836
+ }
6837
+ );
6838
+ };
6839
+ Tooltip.displayName = "Tooltip";
6840
+
6841
+ // src/components/IconButton/IconButton.tsx
6842
+ var import_jsx_runtime178 = require("react/jsx-runtime");
6843
+ var StyledButton2 = (0, import_styled_components33.default)(Button)`
6844
+ --icon-button-size-sm: 24px;
6845
+ --icon-button-size-md: 32px;
6846
+ --icon-button-size-lg: 40px;
6847
+ --icon-button-size-xl: 48px;
6848
+
6849
+ border-radius: 50%;
6850
+ height: ${({ size }) => `var(--icon-button-size-${size})`};
6851
+ width: ${({ size }) => `var(--icon-button-size-${size})`};
6852
+ display: flex;
6853
+ justify-content: center;
6854
+ align-items: center;
6855
+ line-height: 1;
6856
+ `;
6857
+ var IconButton = (0, import_react21.forwardRef)(
6858
+ ({ children, label, disableTooltip = false, size = "md", ...props }, ref) => {
6859
+ const responsiveSize = useResponsiveProp(size);
6860
+ const button = /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
6861
+ StyledButton2,
6862
+ {
6863
+ ...props,
6864
+ ref,
6865
+ "aria-label": label,
6866
+ "data-wistia-ui-icon-button": true,
6867
+ size: responsiveSize,
6868
+ children: (0, import_react21.cloneElement)(import_react21.Children.only(children), {
6869
+ size: responsiveSize
6870
+ })
6871
+ }
6872
+ );
6873
+ if (disableTooltip) {
6874
+ return button;
6875
+ }
6876
+ return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(Tooltip, { content: label, children: button });
6877
+ }
6878
+ );
6879
+ IconButton.displayName = "IconButton";
6880
+
6881
+ // src/components/Menu/Menu.tsx
6882
+ var import_styled_components34 = __toESM(require("styled-components"));
6883
+ var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
6884
+ var import_type_guards20 = require("@wistia/type-guards");
6885
+ var import_jsx_runtime179 = require("react/jsx-runtime");
6886
+ var open = import_styled_components34.keyframes`
6887
+ from {
6888
+ opacity: 0;
6889
+ transform: scale(.97) translateY(-8px);
6890
+ }
6891
+ to {
6892
+ opacity: 1;
6893
+ transform: scale(1);
6894
+ }
6895
+ `;
6896
+ var close = import_styled_components34.keyframes`
6897
+ from {
6898
+ opacity: 1;
6899
+ transform: scale(1);
6900
+ }
6901
+ to {
6902
+ opacity: 0;
6903
+ transform: scale(.97) translateY(-8px);
6904
+ }
6905
+ `;
6906
+ var menuContentCss = import_styled_components34.css`
6907
+ --menu-font-family: var(--wui-typography-family-default);
6908
+ --menu-bg: var(--wui-color-bg-fill-white); /* TODO - Not sure what token to use for this */
6909
+ --menu-shadow: 0 0 64px 0 rgba(0 0 0 / 8%); /* TODO - Need a box-shadow token */
6910
+ --menu-border-radius: var(--wui-border-radius-01);
6911
+ --menu-padding: var(--wui-space-03);
6912
+ --menu-min-width: 120px;
6913
+ --menu-max-width: 284px;
6914
+ --menu-zindex: 500; /* TODO - need z-index token */
6915
+
6916
+ animation: ${open}; /* TODO - need easing tokens */
6917
+ font-family: var(--menu-font-family);
6918
+ background: var(--menu-bg);
6919
+ border-radius: var(--menu-border-radius);
6920
+ box-shadow: var(--menu-shadow); /* TODO - Need a box-shadow token */
6921
+ max-height: var(--radix-dropdown-menu-content-available-height);
6922
+ min-width: var(--menu-min-width);
6923
+ max-width: var(--menu-max-width);
6924
+ overflow: auto;
6925
+ padding: var(--menu-padding);
6926
+ transform-origin: var(--radix-dropdown-menu-content-transform-origin);
6927
+ z-index: var(--menu-zindex);
6928
+
6929
+ &[data-state='closed'] {
6930
+ animation: ${close}; /* TODO - need easing tokens */
6931
+ }
6932
+
6933
+ ${mq.smAndUp} {
6934
+ bottom: 0;
6935
+ padding: var(--menu-padding);
6936
+ right: 0;
6937
+ top: 0;
6938
+ transform: initial;
6939
+ }
6940
+
6941
+ hr {
6942
+ margin: var(--wui-space-02) 0;
6943
+ }
6944
+ `;
6945
+ var MenuContent = (0, import_styled_components34.default)(import_react_dropdown_menu.DropdownMenuContent)`
6946
+ ${menuContentCss}
6947
+ `;
6948
+ var Menu = ({
6949
+ align = "start",
6950
+ children,
6951
+ trigger,
6952
+ label,
6953
+ isOpen,
6954
+ triggerProps = {},
6955
+ onOpenChange,
6956
+ onInteractOutside,
6957
+ ...props
6958
+ }) => {
6959
+ return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(
6960
+ import_react_dropdown_menu.DropdownMenu,
6961
+ {
6962
+ modal: false,
6963
+ ...(0, import_type_guards20.isNotNil)(onOpenChange) && (0, import_type_guards20.isNotNil)(isOpen) ? { open: isOpen, onOpenChange } : {},
6964
+ children: [
6965
+ /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_react_dropdown_menu.DropdownMenuTrigger, { asChild: true, children: (0, import_type_guards20.isNotUndefined)(trigger) ? trigger : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
6966
+ Button,
6967
+ {
6968
+ "aria-expanded": isOpen,
6969
+ forceState: isOpen ? "active" : void 0,
6970
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(Icon, { type: "caret-down" }),
6971
+ ...triggerProps,
6972
+ children: label
6973
+ }
6974
+ ) }),
6975
+ /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(import_react_dropdown_menu.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
6976
+ MenuContent,
6977
+ {
6978
+ ...props,
6979
+ align,
6980
+ onFocusOutside: (event) => {
6981
+ event.preventDefault();
6982
+ },
6983
+ sideOffset: 6,
6984
+ children
6985
+ }
6986
+ ) })
6987
+ ]
6988
+ }
6989
+ );
6990
+ };
6991
+ Menu.displayName = "Menu";
6628
6992
 
6629
6993
  // src/components/Menu/MenuLabel.tsx
6630
- var import_jsx_runtime174 = require("react/jsx-runtime");
6631
- var StyledMenuLabel = (0, import_styled_components31.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
6994
+ var import_styled_components35 = __toESM(require("styled-components"));
6995
+ var import_react_dropdown_menu2 = require("@radix-ui/react-dropdown-menu");
6996
+ var import_jsx_runtime180 = require("react/jsx-runtime");
6997
+ var StyledMenuLabel = (0, import_styled_components35.default)(import_react_dropdown_menu2.DropdownMenuLabel)`
6632
6998
  padding: var(--wui-space-02);
6633
6999
  `;
6634
7000
  var MenuLabel = ({ children, ...props }) => {
6635
- return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
7001
+ return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
6636
7002
  StyledMenuLabel,
6637
7003
  {
6638
7004
  asChild: true,
6639
7005
  ...props,
6640
- children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
7006
+ children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
6641
7007
  Text,
6642
7008
  {
6643
7009
  variant: "label3",
@@ -6651,16 +7017,16 @@ var MenuLabel = ({ children, ...props }) => {
6651
7017
  MenuLabel.displayName = "MenuLabel";
6652
7018
 
6653
7019
  // src/components/Menu/SubMenu.tsx
6654
- var import_react16 = require("react");
6655
- var import_styled_components34 = __toESM(require("styled-components"));
7020
+ var import_react23 = require("react");
7021
+ var import_styled_components38 = __toESM(require("styled-components"));
6656
7022
  var import_react_dropdown_menu3 = require("@radix-ui/react-dropdown-menu");
6657
7023
 
6658
7024
  // src/components/Menu/MenuItemButton.tsx
6659
- var import_react15 = require("react");
6660
- var import_styled_components32 = __toESM(require("styled-components"));
6661
- var import_type_guards18 = require("@wistia/type-guards");
6662
- var import_jsx_runtime175 = require("react/jsx-runtime");
6663
- var StyledButton3 = (0, import_styled_components32.default)(Button)`
7025
+ var import_react22 = require("react");
7026
+ var import_styled_components36 = __toESM(require("styled-components"));
7027
+ var import_type_guards21 = require("@wistia/type-guards");
7028
+ var import_jsx_runtime181 = require("react/jsx-runtime");
7029
+ var StyledButton3 = (0, import_styled_components36.default)(Button)`
6664
7030
  --menu-item-border-radius: var(--wui-border-radius-01);
6665
7031
  --menu-item-gap: var(--wui-space-01);
6666
7032
  --menu-item-inner-gap: var(--wui-space-04);
@@ -6675,9 +7041,9 @@ var StyledButton3 = (0, import_styled_components32.default)(Button)`
6675
7041
  background-color: var(--menu-item-disabled-bg);
6676
7042
  }
6677
7043
 
6678
- ${({ $isGated }) => (0, import_type_guards18.isNotUndefined)($isGated) && $isGated ? `color: var(--wui-color-text);` : ""}
7044
+ ${({ $isGated }) => (0, import_type_guards21.isNotUndefined)($isGated) && $isGated ? `color: var(--wui-color-text);` : ""}
6679
7045
  `;
6680
- var StyledMenuContent = import_styled_components32.default.div`
7046
+ var StyledMenuContent = import_styled_components36.default.div`
6681
7047
  display: grid;
6682
7048
  grid-template-areas:
6683
7049
  'label badge'
@@ -6686,28 +7052,28 @@ var StyledMenuContent = import_styled_components32.default.div`
6686
7052
  position: relative;
6687
7053
  align-content: center;
6688
7054
  `;
6689
- var StyledBadgeContainer = import_styled_components32.default.div`
7055
+ var StyledBadgeContainer = import_styled_components36.default.div`
6690
7056
  grid-area: badge;
6691
7057
  align-self: start;
6692
7058
  justify-self: end;
6693
7059
  margin-left: var(--menu-item-inner-gap);
6694
7060
  `;
6695
- var MenuItemButton = (0, import_react15.forwardRef)(({ children, appearance, command, ...props }, ref) => {
7061
+ var MenuItemButton = (0, import_react22.forwardRef)(({ children, appearance, command, ...props }, ref) => {
6696
7062
  let { colorScheme, badge } = props;
6697
7063
  if (appearance === "dangerous") {
6698
- if ((0, import_type_guards18.isNotUndefined)(colorScheme)) {
7064
+ if ((0, import_type_guards21.isNotUndefined)(colorScheme)) {
6699
7065
  console.warn("colorScheme prop is ignored when appearance is dangerous");
6700
7066
  }
6701
7067
  colorScheme = "error";
6702
7068
  }
6703
7069
  if (appearance === "gated") {
6704
- if ((0, import_type_guards18.isNotUndefined)(colorScheme)) {
7070
+ if ((0, import_type_guards21.isNotUndefined)(colorScheme)) {
6705
7071
  console.warn("colorScheme prop is ignored when appearance is gated");
6706
7072
  }
6707
7073
  colorScheme = "purple";
6708
- badge = /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Icon, { type: "sparkle" });
7074
+ badge = /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(Icon, { type: "sparkle" });
6709
7075
  }
6710
- return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
7076
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
6711
7077
  StyledButton3,
6712
7078
  {
6713
7079
  ...props,
@@ -6716,9 +7082,9 @@ var MenuItemButton = (0, import_react15.forwardRef)(({ children, appearance, com
6716
7082
  colorScheme: colorScheme ?? "default",
6717
7083
  fullWidth: true,
6718
7084
  variant: "ghost",
6719
- children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(StyledMenuContent, { children: [
7085
+ children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(StyledMenuContent, { children: [
6720
7086
  children,
6721
- (0, import_type_guards18.isNotNil)(badge) || (0, import_type_guards18.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null
7087
+ (0, import_type_guards21.isNotNil)(badge) || (0, import_type_guards21.isNotNil)(command) ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(StyledBadgeContainer, { children: badge ?? command }) : null
6722
7088
  ] })
6723
7089
  }
6724
7090
  );
@@ -6726,12 +7092,12 @@ var MenuItemButton = (0, import_react15.forwardRef)(({ children, appearance, com
6726
7092
  MenuItemButton.displayName = "MenuItemButton";
6727
7093
 
6728
7094
  // src/components/Menu/MenuItemLabelDescription.tsx
6729
- var import_styled_components33 = __toESM(require("styled-components"));
6730
- var import_jsx_runtime176 = require("react/jsx-runtime");
6731
- var StyledMenuItemLabel = (0, import_styled_components33.default)(Text).attrs({ variant: "label3" })`
7095
+ var import_styled_components37 = __toESM(require("styled-components"));
7096
+ var import_jsx_runtime182 = require("react/jsx-runtime");
7097
+ var StyledMenuItemLabel = (0, import_styled_components37.default)(Text).attrs({ variant: "label3" })`
6732
7098
  grid-area: label;
6733
7099
  `;
6734
- var StyledMenuItemDescription = (0, import_styled_components33.default)(Text).attrs({
7100
+ var StyledMenuItemDescription = (0, import_styled_components37.default)(Text).attrs({
6735
7101
  variant: "label4",
6736
7102
  prominence: "secondary"
6737
7103
  })`
@@ -6739,15 +7105,15 @@ var StyledMenuItemDescription = (0, import_styled_components33.default)(Text).at
6739
7105
  grid-area: description;
6740
7106
  `;
6741
7107
  var MenuItemLabel = ({ children }) => {
6742
- return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledMenuItemLabel, { children });
7108
+ return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(StyledMenuItemLabel, { children });
6743
7109
  };
6744
7110
  var MenuItemDescription = ({ children }) => {
6745
- return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(StyledMenuItemDescription, { children });
7111
+ return /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(StyledMenuItemDescription, { children });
6746
7112
  };
6747
7113
 
6748
7114
  // src/components/Menu/SubMenu.tsx
6749
- var import_jsx_runtime177 = require("react/jsx-runtime");
6750
- var SubMenuContent = (0, import_styled_components34.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
7115
+ var import_jsx_runtime183 = require("react/jsx-runtime");
7116
+ var SubMenuContent = (0, import_styled_components38.default)(import_react_dropdown_menu3.DropdownMenuSubContent)`
6751
7117
  ${menuContentCss}
6752
7118
  width: 298px;
6753
7119
 
@@ -6755,10 +7121,10 @@ var SubMenuContent = (0, import_styled_components34.default)(import_react_dropdo
6755
7121
  transform: translateX(-100%) !important;
6756
7122
  }
6757
7123
  `;
6758
- var StyledMobileSubMenuItems = import_styled_components34.default.div`
7124
+ var StyledMobileSubMenuItems = import_styled_components38.default.div`
6759
7125
  margin-left: var(--wui-space-04);
6760
7126
  `;
6761
- var StyledSubTrigger = (0, import_styled_components34.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
7127
+ var StyledSubTrigger = (0, import_styled_components38.default)(import_react_dropdown_menu3.DropdownMenuSubTrigger)`
6762
7128
  outline: none;
6763
7129
 
6764
7130
  &[data-state='open'],
@@ -6769,11 +7135,11 @@ var StyledSubTrigger = (0, import_styled_components34.default)(import_react_drop
6769
7135
  var SubMenuTrigger = (props) => {
6770
7136
  const { isSmAndUp } = useMq();
6771
7137
  const Trigger2 = isSmAndUp ? StyledSubTrigger : import_react_dropdown_menu3.DropdownMenuItem;
6772
- return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Trigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
7138
+ return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Trigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(
6773
7139
  MenuItemButton,
6774
7140
  {
6775
7141
  ...props,
6776
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Icon, { type: "caret-right" })
7142
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(Icon, { type: "caret-right" })
6777
7143
  }
6778
7144
  ) });
6779
7145
  };
@@ -6785,15 +7151,15 @@ var SubMenu = ({
6785
7151
  ...props
6786
7152
  }) => {
6787
7153
  const { isSmAndUp } = useMq();
6788
- const [isExpanded, setIsExpanded] = (0, import_react16.useState)(false);
6789
- return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
6790
- /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(SubMenuTrigger, { ...props, children: [
6791
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(MenuItemLabel, { children: label }),
6792
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(MenuItemDescription, { children: description })
7154
+ const [isExpanded, setIsExpanded] = (0, import_react23.useState)(false);
7155
+ return isSmAndUp ? /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(import_react_dropdown_menu3.DropdownMenuSub, { onOpenChange, children: [
7156
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(SubMenuTrigger, { ...props, children: [
7157
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(MenuItemLabel, { children: label }),
7158
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(MenuItemDescription, { children: description })
6793
7159
  ] }),
6794
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(SubMenuContent, { children }) })
6795
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
6796
- /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
7160
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(import_react_dropdown_menu3.DropdownMenuPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(SubMenuContent, { children }) })
7161
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(import_react_dropdown_menu3.DropdownMenuGroup, { children: [
7162
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsxs)(
6797
7163
  SubMenuTrigger,
6798
7164
  {
6799
7165
  ...props,
@@ -6802,28 +7168,28 @@ var SubMenu = ({
6802
7168
  setIsExpanded((prev) => !prev);
6803
7169
  },
6804
7170
  children: [
6805
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(MenuItemLabel, { children: label }),
6806
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(MenuItemDescription, { children: description })
7171
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(MenuItemLabel, { children: label }),
7172
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(MenuItemDescription, { children: description })
6807
7173
  ]
6808
7174
  }
6809
7175
  ),
6810
- /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
7176
+ /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(StyledMobileSubMenuItems, { children: isExpanded ? children : null })
6811
7177
  ] });
6812
7178
  };
6813
7179
  SubMenu.displayName = "SubMenu";
6814
7180
 
6815
7181
  // src/components/Menu/MenuItem.tsx
6816
- var import_react17 = require("react");
7182
+ var import_react24 = require("react");
6817
7183
  var import_react_dropdown_menu4 = require("@radix-ui/react-dropdown-menu");
6818
- var import_jsx_runtime178 = require("react/jsx-runtime");
6819
- var MenuItem = (0, import_react17.forwardRef)(
7184
+ var import_jsx_runtime184 = require("react/jsx-runtime");
7185
+ var MenuItem = (0, import_react24.forwardRef)(
6820
7186
  ({ onSelect = () => null, ...props }, ref) => {
6821
- return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
7187
+ return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
6822
7188
  import_react_dropdown_menu4.DropdownMenuItem,
6823
7189
  {
6824
7190
  asChild: true,
6825
7191
  onSelect,
6826
- children: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
7192
+ children: /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
6827
7193
  MenuItemButton,
6828
7194
  {
6829
7195
  ...props,
@@ -6839,10 +7205,10 @@ MenuItem.displayName = "MenuItem";
6839
7205
 
6840
7206
  // src/components/Menu/MenuRadioGroup.tsx
6841
7207
  var import_react_dropdown_menu5 = require("@radix-ui/react-dropdown-menu");
6842
- var import_jsx_runtime179 = require("react/jsx-runtime");
7208
+ var import_jsx_runtime185 = require("react/jsx-runtime");
6843
7209
  var MenuRadioGroup = ({ children, label, ...props }) => {
6844
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
6845
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(MenuLabel, { children: label }),
7210
+ return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_react_dropdown_menu5.DropdownMenuRadioGroup, { ...props, children: [
7211
+ /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(MenuLabel, { children: label }),
6846
7212
  children
6847
7213
  ] });
6848
7214
  };
@@ -6850,11 +7216,11 @@ MenuRadioGroup.displayName = "MenuRadioGroup";
6850
7216
 
6851
7217
  // src/components/Menu/RadioMenuItem.tsx
6852
7218
  var import_react_dropdown_menu6 = require("@radix-ui/react-dropdown-menu");
6853
- var import_jsx_runtime180 = require("react/jsx-runtime");
7219
+ var import_jsx_runtime186 = require("react/jsx-runtime");
6854
7220
  var RadioMenuItem = ({
6855
7221
  onSelect,
6856
7222
  value,
6857
- indicator = /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
7223
+ indicator = /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
6858
7224
  Icon,
6859
7225
  {
6860
7226
  size: "sm",
@@ -6864,16 +7230,16 @@ var RadioMenuItem = ({
6864
7230
  ...props
6865
7231
  }) => {
6866
7232
  const extraProps = onSelect ? { onSelect } : {};
6867
- return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
7233
+ return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
6868
7234
  import_react_dropdown_menu6.DropdownMenuRadioItem,
6869
7235
  {
6870
7236
  ...extraProps,
6871
7237
  value,
6872
- children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
7238
+ children: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
6873
7239
  MenuItemButton,
6874
7240
  {
6875
7241
  ...props,
6876
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
7242
+ rightIcon: /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(import_react_dropdown_menu6.DropdownMenuItemIndicator, { children: indicator })
6877
7243
  }
6878
7244
  )
6879
7245
  }
@@ -6883,38 +7249,86 @@ RadioMenuItem.displayName = "RadioMenuItem";
6883
7249
 
6884
7250
  // src/components/Menu/CheckboxMenuItem.tsx
6885
7251
  var import_react_dropdown_menu7 = require("@radix-ui/react-dropdown-menu");
6886
- var import_jsx_runtime181 = require("react/jsx-runtime");
7252
+ var import_jsx_runtime187 = require("react/jsx-runtime");
7253
+ var CheckboxIndicator2 = ({ checked, ...props }) => {
7254
+ return checked ? /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
7255
+ "svg",
7256
+ {
7257
+ ...props,
7258
+ fill: "none",
7259
+ height: "16",
7260
+ viewBox: "0 0 16 16",
7261
+ width: "16",
7262
+ xmlns: "http://www.w3.org/2000/svg",
7263
+ children: [
7264
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7265
+ "path",
7266
+ {
7267
+ d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
7268
+ fill: "#2949E5"
7269
+ }
7270
+ ),
7271
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7272
+ "path",
7273
+ {
7274
+ d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
7275
+ stroke: "#D9D9DE"
7276
+ }
7277
+ ),
7278
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7279
+ "path",
7280
+ {
7281
+ d: "M6.47275 11.1931L3.3775 8.08009C3.19155 7.89306 3.19155 7.58982 3.3775 7.40278L4.05092 6.72547C4.23688 6.53842 4.53841 6.53842 4.72436 6.72547L6.80947 8.82254L11.2755 4.33082C11.4615 4.1438 11.763 4.1438 11.949 4.33082L12.6224 5.00813C12.8083 5.19516 12.8083 5.4984 12.6224 5.68544L7.14618 11.1931C6.96021 11.3802 6.6587 11.3802 6.47275 11.1931Z",
7282
+ fill: "white"
7283
+ }
7284
+ )
7285
+ ]
7286
+ }
7287
+ ) : /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(
7288
+ "svg",
7289
+ {
7290
+ ...props,
7291
+ fill: "none",
7292
+ height: "16",
7293
+ viewBox: "0 0 16 16",
7294
+ width: "16",
7295
+ xmlns: "http://www.w3.org/2000/svg",
7296
+ children: [
7297
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7298
+ "path",
7299
+ {
7300
+ d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
7301
+ fill: "#FCFCFD"
7302
+ }
7303
+ ),
7304
+ /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
7305
+ "path",
7306
+ {
7307
+ d: "M4 0.5H12C13.933 0.5 15.5 2.067 15.5 4V12C15.5 13.933 13.933 15.5 12 15.5H4C2.067 15.5 0.5 13.933 0.5 12V4C0.5 2.067 2.067 0.5 4 0.5Z",
7308
+ stroke: "#D9D9DE"
7309
+ }
7310
+ )
7311
+ ]
7312
+ }
7313
+ );
7314
+ };
6887
7315
  var CheckboxMenuItem = ({
6888
- onSelect,
7316
+ onSelect = () => null,
6889
7317
  checked,
6890
7318
  onCheckedChange,
6891
- indicator = /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
6892
- Icon,
6893
- {
6894
- size: "sm",
6895
- type: "checkmark"
6896
- }
6897
- ),
6898
7319
  ...props
6899
7320
  }) => {
6900
- let extraProps = {};
6901
- if (onSelect) {
6902
- extraProps = {
6903
- ...extraProps,
6904
- onCheckedChange,
6905
- onSelect
6906
- };
6907
- }
6908
- return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
7321
+ return /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
6909
7322
  import_react_dropdown_menu7.DropdownMenuCheckboxItem,
6910
7323
  {
6911
- ...extraProps,
6912
7324
  checked,
6913
- children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
7325
+ onCheckedChange,
7326
+ onSelect,
7327
+ children: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(
6914
7328
  MenuItemButton,
6915
7329
  {
6916
7330
  ...props,
6917
- rightIcon: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(import_react_dropdown_menu7.DropdownMenuItemIndicator, { children: indicator })
7331
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime187.jsx)(CheckboxIndicator2, { checked })
6918
7332
  }
6919
7333
  )
6920
7334
  }
@@ -6923,17 +7337,16 @@ var CheckboxMenuItem = ({
6923
7337
  CheckboxMenuItem.displayName = "CheckboxMenuItem";
6924
7338
 
6925
7339
  // src/components/Radio/Radio.tsx
6926
- var import_react18 = require("react");
6927
- var import_styled_components35 = __toESM(require("styled-components"));
6928
- var import_type_guards19 = require("@wistia/type-guards");
6929
- var import_jsx_runtime182 = require("react/jsx-runtime");
6930
- var StyledLabelWrapper2 = import_styled_components35.default.div`
7340
+ var import_react25 = require("react");
7341
+ var import_styled_components39 = __toESM(require("styled-components"));
7342
+ var import_type_guards22 = require("@wistia/type-guards");
7343
+ var import_jsx_runtime188 = require("react/jsx-runtime");
7344
+ var StyledLabelWrapper2 = import_styled_components39.default.div`
6931
7345
  display: flex;
6932
7346
  flex-direction: column;
6933
7347
  padding-left: var(--wui-space-02);
6934
7348
  `;
6935
- var StyledRadio = import_styled_components35.default.input`
6936
- align-self: flex-start;
7349
+ var StyledRadio = import_styled_components39.default.input`
6937
7350
  box-shadow: ${({ type }) => type === "checkbox" ? "inset 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.38)" : "none"};
6938
7351
  appearance: none;
6939
7352
  margin: 0;
@@ -6943,7 +7356,6 @@ var StyledRadio = import_styled_components35.default.input`
6943
7356
  height: 14px;
6944
7357
  border: 1px solid var(--wui-color-border);
6945
7358
  border-radius: 50%;
6946
- transform: translateY(5px); /* visually center the radio button */
6947
7359
  display: grid;
6948
7360
  place-content: center;
6949
7361
 
@@ -6960,11 +7372,11 @@ var StyledRadio = import_styled_components35.default.input`
6960
7372
  transform: scale(1);
6961
7373
  }
6962
7374
  `;
6963
- var disabledStyle2 = import_styled_components35.css`
7375
+ var disabledStyle2 = import_styled_components39.css`
6964
7376
  cursor: not-allowed;
6965
7377
  opacity: 0.5;
6966
7378
  `;
6967
- var errorStyle = import_styled_components35.css`
7379
+ var errorStyle = import_styled_components39.css`
6968
7380
  /* TODO Lamp to design error state */
6969
7381
  &:hover,
6970
7382
  &:focus,
@@ -6972,12 +7384,12 @@ var errorStyle = import_styled_components35.css`
6972
7384
  border-color: transparent !important;
6973
7385
  }
6974
7386
  `;
6975
- var defaultHoverStyle = import_styled_components35.css`
7387
+ var defaultHoverStyle = import_styled_components39.css`
6976
7388
  /* TODO Lamp to design hover state */
6977
7389
  cursor: pointer;
6978
7390
  `;
6979
- var StyledRadioWrapper = import_styled_components35.default.div`
6980
- align-items: center;
7391
+ var StyledRadioWrapper = import_styled_components39.default.div`
7392
+ align-items: baseline;
6981
7393
  border: 1px solid transparent;
6982
7394
  border-radius: 4px;
6983
7395
  display: flex;
@@ -6993,14 +7405,16 @@ var StyledRadioWrapper = import_styled_components35.default.div`
6993
7405
  background-color: #efefef;
6994
7406
  }
6995
7407
 
6996
- ${({ hasError }) => hasError && errorStyle};
7408
+ &[aria-invalid='true'] {
7409
+ ${errorStyle};
7410
+ }
7411
+
6997
7412
  ${({ disabled }) => disabled && disabledStyle2};
6998
7413
  `;
6999
- var Radio = (0, import_react18.forwardRef)(
7414
+ var Radio = (0, import_react25.forwardRef)(
7000
7415
  ({
7001
7416
  checked,
7002
7417
  disabled = false,
7003
- hasError = false,
7004
7418
  id,
7005
7419
  label,
7006
7420
  description,
@@ -7010,22 +7424,22 @@ var Radio = (0, import_react18.forwardRef)(
7010
7424
  value = "false",
7011
7425
  ...otherProps
7012
7426
  }, ref) => {
7013
- const generatedId = (0, import_react18.useId)();
7014
- const computedId = (0, import_type_guards19.isNonEmptyString)(id) ? id : `vhs-radio-${generatedId}`;
7015
- return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
7427
+ const generatedId = (0, import_react25.useId)();
7428
+ const computedId = (0, import_type_guards22.isNonEmptyString)(id) ? id : `ui-radio-${generatedId}`;
7429
+ return /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(
7016
7430
  StyledRadioWrapper,
7017
7431
  {
7432
+ "aria-invalid": otherProps["aria-invalid"],
7018
7433
  disabled,
7019
- hasError,
7020
7434
  children: [
7021
- /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
7435
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
7022
7436
  StyledRadio,
7023
7437
  {
7024
7438
  ref,
7025
7439
  "aria-checked": checked,
7026
7440
  checked,
7027
7441
  disabled,
7028
- id,
7442
+ id: computedId,
7029
7443
  name,
7030
7444
  onChange,
7031
7445
  type: "radio",
@@ -7033,8 +7447,8 @@ var Radio = (0, import_react18.forwardRef)(
7033
7447
  ...otherProps
7034
7448
  }
7035
7449
  ),
7036
- /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(StyledLabelWrapper2, { children: [
7037
- /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
7450
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsxs)(StyledLabelWrapper2, { children: [
7451
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
7038
7452
  Label,
7039
7453
  {
7040
7454
  disabled,
@@ -7043,7 +7457,7 @@ var Radio = (0, import_react18.forwardRef)(
7043
7457
  children: label
7044
7458
  }
7045
7459
  ),
7046
- /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(LabelDescription, { children: description })
7460
+ /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(LabelDescription, { children: description })
7047
7461
  ] })
7048
7462
  ]
7049
7463
  }
@@ -7053,11 +7467,11 @@ var Radio = (0, import_react18.forwardRef)(
7053
7467
  Radio.displayName = "Radio";
7054
7468
 
7055
7469
  // src/components/ScreenReaderOnly/ScreenReaderOnly.tsx
7056
- var import_styled_components36 = __toESM(require("styled-components"));
7057
- var import_type_guards20 = require("@wistia/type-guards");
7058
- var import_jsx_runtime183 = require("react/jsx-runtime");
7059
- var VisuallyHidden = import_styled_components36.default.div({ ...visuallyHiddenStyle });
7060
- var VisuallyHiddenButFocusable = import_styled_components36.default.div({
7470
+ var import_styled_components40 = __toESM(require("styled-components"));
7471
+ var import_type_guards23 = require("@wistia/type-guards");
7472
+ var import_jsx_runtime189 = require("react/jsx-runtime");
7473
+ var VisuallyHidden = import_styled_components40.default.div({ ...visuallyHiddenStyle });
7474
+ var VisuallyHiddenButFocusable = import_styled_components40.default.div({
7061
7475
  "&:not(:focus-within)": visuallyHiddenStyle
7062
7476
  });
7063
7477
  var ScreenReaderOnly = ({
@@ -7066,53 +7480,20 @@ var ScreenReaderOnly = ({
7066
7480
  focusable = false,
7067
7481
  ...otherProps
7068
7482
  }) => {
7069
- const accessibleText = (0, import_type_guards20.isNotNil)(text) ? text : children;
7483
+ const accessibleText = (0, import_type_guards23.isNotNil)(text) ? text : children;
7070
7484
  if (focusable) {
7071
- return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
7485
+ return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(VisuallyHiddenButFocusable, { ...otherProps, children: accessibleText });
7072
7486
  }
7073
- return /* @__PURE__ */ (0, import_jsx_runtime183.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
7487
+ return /* @__PURE__ */ (0, import_jsx_runtime189.jsx)(VisuallyHidden, { ...otherProps, children: accessibleText });
7074
7488
  };
7075
7489
  ScreenReaderOnly.displayName = "ScreenReaderOnly";
7076
7490
 
7077
- // src/components/Stack/Stack.tsx
7078
- var import_react19 = require("react");
7079
- var import_styled_components37 = __toESM(require("styled-components"));
7080
- var import_jsx_runtime184 = require("react/jsx-runtime");
7081
- var DEFAULT_ELEMENT3 = "div";
7082
- var StyledStack = import_styled_components37.default.div`
7083
- display: flex;
7084
- flex-direction: ${({ $direction }) => $direction === "horizontal" ? "row" : "column"};
7085
- gap: ${({ $gap }) => `var(--wui-${$gap})`};
7086
-
7087
- > * {
7088
- flex: 1;
7089
- }
7090
- `;
7091
- var StackComponent = (0, import_react19.forwardRef)(
7092
- ({ renderAs, direction = "vertical", gap = "space-02", ...props }, ref) => {
7093
- const responsiveGap = useResponsiveProp(gap);
7094
- const responsiveDirection = useResponsiveProp(direction);
7095
- return /* @__PURE__ */ (0, import_jsx_runtime184.jsx)(
7096
- StyledStack,
7097
- {
7098
- ref,
7099
- $direction: responsiveDirection,
7100
- $gap: responsiveGap,
7101
- as: renderAs ?? DEFAULT_ELEMENT3,
7102
- ...props
7103
- }
7104
- );
7105
- }
7106
- );
7107
- StackComponent.displayName = "Stack";
7108
- var Stack = makePolymorphic(StackComponent);
7109
-
7110
7491
  // src/components/Tag/Tag.tsx
7111
- var import_react20 = require("react");
7112
- var import_styled_components38 = __toESM(require("styled-components"));
7113
- var import_type_guards21 = require("@wistia/type-guards");
7114
- var import_jsx_runtime185 = require("react/jsx-runtime");
7115
- var TagLabel = import_styled_components38.default.a`
7492
+ var import_react26 = require("react");
7493
+ var import_styled_components41 = __toESM(require("styled-components"));
7494
+ var import_type_guards24 = require("@wistia/type-guards");
7495
+ var import_jsx_runtime190 = require("react/jsx-runtime");
7496
+ var TagLabel = import_styled_components41.default.a`
7116
7497
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7117
7498
  font-size: var(--wui-typography-label-4-size);
7118
7499
  font-weight: var(--wui-typography-label-4-weight);
@@ -7140,14 +7521,14 @@ var TagLabel = import_styled_components38.default.a`
7140
7521
  box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
7141
7522
  }
7142
7523
  `;
7143
- var TagDivider = import_styled_components38.default.div`
7524
+ var TagDivider = import_styled_components41.default.div`
7144
7525
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7145
7526
  border-left: 1px solid var(--wui-color-border);
7146
7527
  display: flex;
7147
7528
  height: 14px;
7148
7529
  width: 1px;
7149
7530
  `;
7150
- var StyledRemoveButton = import_styled_components38.default.button`
7531
+ var StyledRemoveButton = import_styled_components41.default.button`
7151
7532
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7152
7533
  all: unset;
7153
7534
  cursor: pointer;
@@ -7175,7 +7556,7 @@ var StyledRemoveButton = import_styled_components38.default.button`
7175
7556
  box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
7176
7557
  }
7177
7558
  `;
7178
- var StyledTag = import_styled_components38.default.div`
7559
+ var StyledTag = import_styled_components41.default.div`
7179
7560
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
7180
7561
  align-items: center;
7181
7562
  background-color: var(--wui-color-bg-surface-secondary);
@@ -7184,47 +7565,47 @@ var StyledTag = import_styled_components38.default.div`
7184
7565
  overflow: hidden;
7185
7566
  `;
7186
7567
  var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
7187
- if ((0, import_type_guards21.isNil)(onClickRemove)) {
7568
+ if ((0, import_type_guards24.isNil)(onClickRemove)) {
7188
7569
  return null;
7189
7570
  }
7190
- if ((0, import_type_guards21.isNil)(onClickRemoveLabel)) {
7571
+ if ((0, import_type_guards24.isNil)(onClickRemoveLabel)) {
7191
7572
  throw new Error(
7192
7573
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
7193
7574
  );
7194
7575
  }
7195
- return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(import_jsx_runtime185.Fragment, { children: [
7196
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(TagDivider, { $colorScheme: colorScheme }),
7197
- /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
7576
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(import_jsx_runtime190.Fragment, { children: [
7577
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(TagDivider, { $colorScheme: colorScheme }),
7578
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
7198
7579
  StyledRemoveButton,
7199
7580
  {
7200
7581
  $colorScheme: colorScheme,
7201
7582
  onClick: onClickRemove,
7202
7583
  type: "button",
7203
7584
  children: [
7204
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
7585
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7205
7586
  Icon,
7206
7587
  {
7207
7588
  size: "sm",
7208
7589
  type: "close"
7209
7590
  }
7210
7591
  ),
7211
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
7592
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
7212
7593
  ]
7213
7594
  }
7214
7595
  )
7215
7596
  ] });
7216
7597
  };
7217
- var Tag = (0, import_react20.forwardRef)(
7598
+ var Tag = (0, import_react26.forwardRef)(
7218
7599
  ({ onClickRemove, colorScheme = "inherit", href, label, onClickRemoveLabel, ...otherProps }, ref) => {
7219
- const labelProps = (0, import_type_guards21.isNotNil)(href) && (0, import_type_guards21.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
7220
- return /* @__PURE__ */ (0, import_jsx_runtime185.jsxs)(
7600
+ const labelProps = (0, import_type_guards24.isNotNil)(href) && (0, import_type_guards24.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
7601
+ return /* @__PURE__ */ (0, import_jsx_runtime190.jsxs)(
7221
7602
  StyledTag,
7222
7603
  {
7223
7604
  ref,
7224
7605
  $colorScheme: colorScheme,
7225
7606
  ...otherProps,
7226
7607
  children: [
7227
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
7608
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7228
7609
  TagLabel,
7229
7610
  {
7230
7611
  ...labelProps,
@@ -7232,7 +7613,7 @@ var Tag = (0, import_react20.forwardRef)(
7232
7613
  children: label
7233
7614
  }
7234
7615
  ),
7235
- /* @__PURE__ */ (0, import_jsx_runtime185.jsx)(
7616
+ /* @__PURE__ */ (0, import_jsx_runtime190.jsx)(
7236
7617
  RemoveButton,
7237
7618
  {
7238
7619
  colorScheme,
@@ -7248,26 +7629,26 @@ var Tag = (0, import_react20.forwardRef)(
7248
7629
  Tag.displayName = "Tag";
7249
7630
 
7250
7631
  // src/components/WistiaLogo/WistiaLogo.tsx
7251
- var import_styled_components39 = __toESM(require("styled-components"));
7252
- var import_type_guards22 = require("@wistia/type-guards");
7253
- var import_jsx_runtime186 = require("react/jsx-runtime");
7632
+ var import_styled_components42 = __toESM(require("styled-components"));
7633
+ var import_type_guards25 = require("@wistia/type-guards");
7634
+ var import_jsx_runtime191 = require("react/jsx-runtime");
7254
7635
  var renderBrandmark = (brandmarkColor, iconOnly) => {
7255
7636
  if (iconOnly) {
7256
- return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7637
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
7257
7638
  "g",
7258
7639
  {
7259
7640
  "data-testid": "ui-wistia-logo-brandmark",
7260
7641
  fill: brandmarkColor,
7261
- children: /* @__PURE__ */ (0, import_jsx_runtime186.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" })
7642
+ children: /* @__PURE__ */ (0, import_jsx_runtime191.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" })
7262
7643
  }
7263
7644
  );
7264
7645
  }
7265
- return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7646
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
7266
7647
  "g",
7267
7648
  {
7268
7649
  "data-testid": "ui-wistia-logo-brandmark",
7269
7650
  fill: brandmarkColor,
7270
- children: /* @__PURE__ */ (0, import_jsx_runtime186.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" })
7651
+ children: /* @__PURE__ */ (0, import_jsx_runtime191.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" })
7271
7652
  }
7272
7653
  );
7273
7654
  };
@@ -7275,12 +7656,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
7275
7656
  if (iconOnly) {
7276
7657
  return null;
7277
7658
  }
7278
- return /* @__PURE__ */ (0, import_jsx_runtime186.jsx)(
7659
+ return /* @__PURE__ */ (0, import_jsx_runtime191.jsx)(
7279
7660
  "g",
7280
7661
  {
7281
7662
  "data-testid": "ui-wistia-logo-logotype",
7282
7663
  fill: logotypeColor,
7283
- children: /* @__PURE__ */ (0, import_jsx_runtime186.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" })
7664
+ children: /* @__PURE__ */ (0, import_jsx_runtime191.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" })
7284
7665
  }
7285
7666
  );
7286
7667
  };
@@ -7290,7 +7671,7 @@ var computedViewBox = (iconOnly) => {
7290
7671
  }
7291
7672
  return "0 0 144 31.47";
7292
7673
  };
7293
- var WistiaLogoComponent = import_styled_components39.default.svg`
7674
+ var WistiaLogoComponent = import_styled_components42.default.svg`
7294
7675
  height: ${({ height }) => `${height}px`};
7295
7676
 
7296
7677
  /* ensure it will always fit on mobile */
@@ -7332,7 +7713,7 @@ var WistiaLogo = ({
7332
7713
  };
7333
7714
  const brandmarkColor = VARIANT_COLORS[variant].brandmark;
7334
7715
  const logotypeColor = VARIANT_COLORS[variant].logotype;
7335
- const Logo = /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
7716
+ const Logo = /* @__PURE__ */ (0, import_jsx_runtime191.jsxs)(
7336
7717
  WistiaLogoComponent,
7337
7718
  {
7338
7719
  $hoverColor: hoverColor,
@@ -7342,16 +7723,37 @@ var WistiaLogo = ({
7342
7723
  xmlns: "http://www.w3.org/2000/svg",
7343
7724
  ...otherProps,
7344
7725
  children: [
7345
- /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("title", { children: title }),
7346
- (0, import_type_guards22.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("desc", { children: description }) : null,
7726
+ /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("title", { children: title }),
7727
+ (0, import_type_guards25.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("desc", { children: description }) : null,
7347
7728
  renderBrandmark(brandmarkColor, iconOnly),
7348
7729
  renderLogotype(logotypeColor, iconOnly)
7349
7730
  ]
7350
7731
  }
7351
7732
  );
7352
- return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime186.jsx)("a", { href, children: Logo }) : Logo;
7733
+ return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime191.jsx)("a", { href, children: Logo }) : Logo;
7353
7734
  };
7354
7735
  WistiaLogo.displayName = "WistiaLogo";
7736
+
7737
+ // src/components/FormGroup/RadioGroup.tsx
7738
+ var import_react27 = require("react");
7739
+ var import_jsx_runtime192 = require("react/jsx-runtime");
7740
+ var RadioGroupContext = (0, import_react27.createContext)(null);
7741
+ var RadioGroup = ({
7742
+ children,
7743
+ name,
7744
+ onChange,
7745
+ value,
7746
+ ...props
7747
+ }) => {
7748
+ const context = (0, import_react27.useMemo)(() => {
7749
+ return {
7750
+ name,
7751
+ onChange
7752
+ };
7753
+ }, [name, onChange]);
7754
+ return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(RadioGroupContext.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime192.jsx)(FormGroup, { ...props, children }) });
7755
+ };
7756
+ RadioGroup.displayName = "RadioGroup";
7355
7757
  // Annotate the CommonJS export names for ESM import in node:
7356
7758
  0 && (module.exports = {
7357
7759
  Avatar,
@@ -7360,10 +7762,15 @@ WistiaLogo.displayName = "WistiaLogo";
7360
7762
  Button,
7361
7763
  ButtonGroup,
7362
7764
  Checkbox,
7765
+ CheckboxGroup,
7363
7766
  CheckboxMenuItem,
7364
7767
  ColorSchemeWrapper,
7365
7768
  Divider,
7366
7769
  Ellipsis,
7770
+ Form,
7771
+ FormErrorSummary,
7772
+ FormField,
7773
+ FormGroup,
7367
7774
  Heading,
7368
7775
  Icon,
7369
7776
  IconButton,
@@ -7376,6 +7783,7 @@ WistiaLogo.displayName = "WistiaLogo";
7376
7783
  MenuLabel,
7377
7784
  MenuRadioGroup,
7378
7785
  Radio,
7786
+ RadioGroup,
7379
7787
  RadioMenuItem,
7380
7788
  ScreenReaderOnly,
7381
7789
  Stack,
@@ -7393,6 +7801,7 @@ WistiaLogo.displayName = "WistiaLogo";
7393
7801
  mq,
7394
7802
  useActiveMq,
7395
7803
  useAriaLive,
7804
+ useFormState,
7396
7805
  useMq,
7397
7806
  useWindowSize
7398
7807
  });