@wistia/ui 0.6.24 → 0.6.25

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.6.24
3
+ * @license @wistia/ui v0.6.25
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -98,6 +98,7 @@ __export(index_exports, {
98
98
  SelectOptionGroup: () => SelectOptionGroup,
99
99
  Stack: () => Stack,
100
100
  SubMenu: () => SubMenu,
101
+ Switch: () => Switch,
101
102
  Tab: () => Tab,
102
103
  Table: () => Table,
103
104
  TableBody: () => TableBody,
@@ -7671,7 +7672,7 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime202.jsx)(
7671
7672
  )
7672
7673
  }
7673
7674
  );
7674
- var inputSizeSmall = import_styled_components34.css`
7675
+ var sizeSmall = import_styled_components34.css`
7675
7676
  width: 14px;
7676
7677
  height: 14px;
7677
7678
  min-width: 14px;
@@ -7682,7 +7683,7 @@ var inputSizeSmall = import_styled_components34.css`
7682
7683
  height: 7px;
7683
7684
  }
7684
7685
  `;
7685
- var inputSizeMedium = import_styled_components34.css`
7686
+ var sizeMedium = import_styled_components34.css`
7686
7687
  width: 16px;
7687
7688
  height: 16px;
7688
7689
  min-width: 16px;
@@ -7693,7 +7694,7 @@ var inputSizeMedium = import_styled_components34.css`
7693
7694
  height: 9px;
7694
7695
  }
7695
7696
  `;
7696
- var inputSizeLarge = import_styled_components34.css`
7697
+ var sizeLarge = import_styled_components34.css`
7697
7698
  width: 20px;
7698
7699
  height: 20px;
7699
7700
  min-width: 20px;
@@ -7705,9 +7706,9 @@ var inputSizeLarge = import_styled_components34.css`
7705
7706
  }
7706
7707
  `;
7707
7708
  var getSizeCss = (size) => {
7708
- if (size === "sm") return inputSizeSmall;
7709
- if (size === "lg") return inputSizeLarge;
7710
- return inputSizeMedium;
7709
+ if (size === "sm") return sizeSmall;
7710
+ if (size === "lg") return sizeLarge;
7711
+ return sizeMedium;
7711
7712
  };
7712
7713
  var StyledCheckboxWrapper = import_styled_components34.default.div`
7713
7714
  display: flex;
@@ -10391,7 +10392,7 @@ var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
10391
10392
  )
10392
10393
  }
10393
10394
  );
10394
- var inputSizeSmall2 = import_styled_components65.css`
10395
+ var sizeSmall2 = import_styled_components65.css`
10395
10396
  width: 14px;
10396
10397
  height: 14px;
10397
10398
  min-width: 14px;
@@ -10402,7 +10403,7 @@ var inputSizeSmall2 = import_styled_components65.css`
10402
10403
  height: 7px;
10403
10404
  }
10404
10405
  `;
10405
- var inputSizeMedium2 = import_styled_components65.css`
10406
+ var sizeMedium2 = import_styled_components65.css`
10406
10407
  width: 16px;
10407
10408
  height: 16px;
10408
10409
  min-width: 16px;
@@ -10413,7 +10414,7 @@ var inputSizeMedium2 = import_styled_components65.css`
10413
10414
  height: 8px;
10414
10415
  }
10415
10416
  `;
10416
- var inputSizeLarge2 = import_styled_components65.css`
10417
+ var sizeLarge2 = import_styled_components65.css`
10417
10418
  width: 20px;
10418
10419
  height: 20px;
10419
10420
  min-width: 20px;
@@ -10425,9 +10426,9 @@ var inputSizeLarge2 = import_styled_components65.css`
10425
10426
  }
10426
10427
  `;
10427
10428
  var getSizeCss2 = (size) => {
10428
- if (size === "sm") return inputSizeSmall2;
10429
- if (size === "lg") return inputSizeLarge2;
10430
- return inputSizeMedium2;
10429
+ if (size === "sm") return sizeSmall2;
10430
+ if (size === "lg") return sizeLarge2;
10431
+ return sizeMedium2;
10431
10432
  };
10432
10433
  var StyledRadioWrapper = import_styled_components65.default.div`
10433
10434
  display: flex;
@@ -11009,20 +11010,183 @@ var SelectOptionGroup = ({ children, label, ...props }) => {
11009
11010
  ] });
11010
11011
  };
11011
11012
 
11012
- // src/components/Table/Table.tsx
11013
+ // src/components/Switch/Switch.tsx
11014
+ var import_react51 = require("react");
11013
11015
  var import_styled_components72 = __toESM(require("styled-components"));
11016
+ var import_type_guards42 = require("@wistia/type-guards");
11014
11017
  var import_jsx_runtime249 = require("react/jsx-runtime");
11015
- var StyledTable = import_styled_components72.default.table`
11018
+ var sizeSmall3 = import_styled_components72.css`
11019
+ --wui-size-small-width: 24px;
11020
+ --wui-size-small-height: 14px;
11021
+
11022
+ width: var(--wui-size-small-width);
11023
+ height: var(--wui-size-small-height);
11024
+ min-width: var(--wui-size-small-width);
11025
+ min-height: var(--wui-size-small-height);
11026
+ border-radius: calc(var(--wui-size-small-height) / 2);
11027
+
11028
+ &::after {
11029
+ width: calc(var(--wui-size-small-width) / 2);
11030
+ height: calc(var(--wui-size-small-width) / 2);
11031
+ }
11032
+ `;
11033
+ var sizeMedium3 = import_styled_components72.css`
11034
+ --wui-size-medium-width: 32px;
11035
+ --wui-size-medium-height: 18px;
11036
+
11037
+ width: var(--wui-size-medium-width);
11038
+ height: var(--wui-size-medium-height);
11039
+ min-width: var(--wui-size-medium-width);
11040
+ min-height: var(--wui-size-medium-height);
11041
+ border-radius: calc(var(--wui-size-medium-height) / 2);
11042
+
11043
+ &::after {
11044
+ width: calc(var(--wui-size-medium-width) / 2);
11045
+ height: calc(var(--wui-size-medium-width) / 2);
11046
+ }
11047
+ `;
11048
+ var sizeLarge3 = import_styled_components72.css`
11049
+ --wui-size-large-width: 40px;
11050
+ --wui-size-large-height: 22px;
11051
+
11052
+ width: var(--wui-size-large-width);
11053
+ height: var(--wui-size-large-height);
11054
+ min-width: var(--wui-size-large-width);
11055
+ min-height: var(--wui-size-large-height);
11056
+ border-radius: calc(var(--wui-size-large-height) / 2);
11057
+
11058
+ &::after {
11059
+ width: calc(var(--wui-size-large-width) / 2);
11060
+ height: calc(var(--wui-size-large-width) / 2);
11061
+ }
11062
+ `;
11063
+ var getSizeCss3 = (size) => {
11064
+ if (size === "sm") return sizeSmall3;
11065
+ if (size === "lg") return sizeLarge3;
11066
+ return sizeMedium3;
11067
+ };
11068
+ var StyledSwitchWrapper = import_styled_components72.default.div`
11069
+ display: flex;
11070
+ margin: 0;
11071
+
11072
+ /* TODO this solves a problem but potentially causes and a11y issue */
11073
+ user-select: none;
11074
+ `;
11075
+ var StyledSwitchInput = import_styled_components72.default.div`
11076
+ ${({ $size }) => getSizeCss3($size)}
11077
+ line-height: 0;
11078
+ margin: 0;
11079
+ display: grid;
11080
+ place-content: center;
11081
+ align-self: flex-start;
11082
+ position: relative;
11083
+ transition: all 0.2s ease-in-out;
11084
+ border-width: 1px;
11085
+ border-style: solid;
11086
+ border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-border-disabled)" : "var(--wui-color-border)"}; /* "off state" border */
11087
+
11088
+ background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface-secondary)"}; /* "off state" background */
11089
+
11090
+ &::after {
11091
+ content: '';
11092
+ position: absolute;
11093
+ left: 0;
11094
+ top: 50%;
11095
+ transform: translateY(-50%);
11096
+ border-radius: 50%;
11097
+ box-shadow: 1px 0 1px rgb(0 0 0 / 10%); /* "off state" shadow - cast horizontally right */
11098
+ background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "off state" dot color */
11099
+
11100
+ transition: all 0.2s ease-in-out;
11101
+ }
11102
+ `;
11103
+ var StyledHiddenSwitchInput = import_styled_components72.default.input`
11104
+ ${visuallyHiddenStyle}
11105
+
11106
+ /* toggles display of faux-input background-color and toggle position */
11107
+ &:checked + label [data-wui-faux-input='true'] {
11108
+ border-color: ${({ disabled }) => disabled ? void 0 : "var(--wui-color-bg-fill)"}; /* "on state" border */
11109
+
11110
+ background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill)"}; /* "on state" background */
11111
+
11112
+ &::after {
11113
+ transform: translate(calc(100% - 2px), -50%); /* 2px is the border width */
11114
+ box-shadow: -1px 0 1px rgb(0 0 0 / 10%); /* "on state" shadow - cast horizontally left */
11115
+ background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "on state" dot color */
11116
+ }
11117
+ }
11118
+ `;
11119
+ var Switch = (0, import_react51.forwardRef)(
11120
+ ({
11121
+ checked,
11122
+ disabled = false,
11123
+ id,
11124
+ label,
11125
+ description,
11126
+ name,
11127
+ onChange,
11128
+ size = "md",
11129
+ value,
11130
+ required = false,
11131
+ hideLabel = false,
11132
+ ...props
11133
+ }, ref) => {
11134
+ const generatedId = (0, import_react51.useId)();
11135
+ const computedId = (0, import_type_guards42.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11136
+ return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11137
+ /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
11138
+ StyledHiddenSwitchInput,
11139
+ {
11140
+ ...props,
11141
+ ref,
11142
+ checked,
11143
+ disabled,
11144
+ id: computedId,
11145
+ name,
11146
+ onChange,
11147
+ required,
11148
+ type: "checkbox",
11149
+ value
11150
+ }
11151
+ ),
11152
+ /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
11153
+ FormControlLabel,
11154
+ {
11155
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
11156
+ StyledSwitchInput,
11157
+ {
11158
+ $disabled: disabled,
11159
+ $size: size,
11160
+ "data-testid": "wui-faux-input",
11161
+ "data-wui-faux-input": "true"
11162
+ }
11163
+ ),
11164
+ description,
11165
+ disabled,
11166
+ hideLabel,
11167
+ htmlFor: computedId,
11168
+ label
11169
+ }
11170
+ )
11171
+ ] });
11172
+ }
11173
+ );
11174
+ Switch.displayName = "Switch";
11175
+
11176
+ // src/components/Table/Table.tsx
11177
+ var import_styled_components73 = __toESM(require("styled-components"));
11178
+ var import_jsx_runtime250 = require("react/jsx-runtime");
11179
+ var StyledTable = import_styled_components73.default.table`
11016
11180
  width: 100%;
11017
11181
  border-collapse: collapse;
11018
11182
 
11019
- ${({ $striped }) => $striped && import_styled_components72.css`
11183
+ ${({ $striped }) => $striped && import_styled_components73.css`
11020
11184
  tbody tr:nth-child(even) {
11021
11185
  background-color: var(--wui-color-bg-surface-secondary);
11022
11186
  }
11023
11187
  `}
11024
11188
 
11025
- ${({ $divided }) => $divided && import_styled_components72.css`
11189
+ ${({ $divided }) => $divided && import_styled_components73.css`
11026
11190
  tr {
11027
11191
  border-bottom: 1px solid var(--wui-color-border);
11028
11192
  }
@@ -11034,7 +11198,7 @@ var Table = ({
11034
11198
  divided = false,
11035
11199
  ...props
11036
11200
  }) => {
11037
- return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
11201
+ return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(
11038
11202
  StyledTable,
11039
11203
  {
11040
11204
  $divided: divided,
@@ -11046,88 +11210,88 @@ var Table = ({
11046
11210
  };
11047
11211
 
11048
11212
  // src/components/Table/TableBody.tsx
11049
- var import_styled_components73 = __toESM(require("styled-components"));
11213
+ var import_styled_components74 = __toESM(require("styled-components"));
11050
11214
 
11051
11215
  // src/components/Table/TableSectionContext.ts
11052
- var import_react51 = require("react");
11053
- var TableSectionContext = (0, import_react51.createContext)(null);
11216
+ var import_react52 = require("react");
11217
+ var TableSectionContext = (0, import_react52.createContext)(null);
11054
11218
 
11055
11219
  // src/components/Table/TableBody.tsx
11056
- var import_jsx_runtime250 = require("react/jsx-runtime");
11057
- var StyledTbody = import_styled_components73.default.tbody``;
11220
+ var import_jsx_runtime251 = require("react/jsx-runtime");
11221
+ var StyledTbody = import_styled_components74.default.tbody``;
11058
11222
  var TableBody = ({ children, ...props }) => {
11059
- return /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime250.jsx)(StyledTbody, { ...props, children }) });
11223
+ return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTbody, { ...props, children }) });
11060
11224
  };
11061
11225
 
11062
11226
  // src/components/Table/TableCell.tsx
11063
- var import_react52 = require("react");
11064
- var import_styled_components74 = __toESM(require("styled-components"));
11065
- var import_jsx_runtime251 = require("react/jsx-runtime");
11066
- var sharedStyles = import_styled_components74.css`
11227
+ var import_react53 = require("react");
11228
+ var import_styled_components75 = __toESM(require("styled-components"));
11229
+ var import_jsx_runtime252 = require("react/jsx-runtime");
11230
+ var sharedStyles = import_styled_components75.css`
11067
11231
  color: var(--wui-color-text);
11068
11232
  padding: var(--wui-space-02);
11069
11233
  text-align: left;
11070
11234
  `;
11071
- var StyledTh = import_styled_components74.default.th`
11235
+ var StyledTh = import_styled_components75.default.th`
11072
11236
  ${sharedStyles}
11073
11237
  font-size: var(--wui-typography-body-4-size);
11074
11238
  font-weight: var(--wui-typography-weight-label-bold);
11075
11239
  line-height: var(--wui-typography-body-4-line-height);
11076
11240
  `;
11077
- var StyledTd = import_styled_components74.default.td`
11241
+ var StyledTd = import_styled_components75.default.td`
11078
11242
  ${sharedStyles}
11079
11243
  font-size: var(--wui-typography-body-2-size);
11080
11244
  font-weight: var(--wui-typography-body-2-weight);
11081
11245
  line-height: var(--wui-typography-body-2-line-height);
11082
11246
  `;
11083
11247
  var TableCell = ({ children, ...props }) => {
11084
- const section = (0, import_react52.useContext)(TableSectionContext);
11248
+ const section = (0, import_react53.useContext)(TableSectionContext);
11085
11249
  if (section === "head") {
11086
- return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTh, { ...props, children });
11250
+ return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTh, { ...props, children });
11087
11251
  }
11088
- return /* @__PURE__ */ (0, import_jsx_runtime251.jsx)(StyledTd, { ...props, children });
11252
+ return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTd, { ...props, children });
11089
11253
  };
11090
11254
 
11091
11255
  // src/components/Table/TableFooter.tsx
11092
- var import_styled_components75 = __toESM(require("styled-components"));
11093
- var import_jsx_runtime252 = require("react/jsx-runtime");
11094
- var StyledTfoot = import_styled_components75.default.tfoot``;
11256
+ var import_styled_components76 = __toESM(require("styled-components"));
11257
+ var import_jsx_runtime253 = require("react/jsx-runtime");
11258
+ var StyledTfoot = import_styled_components76.default.tfoot``;
11095
11259
  var TableFooter = ({ children, ...props }) => {
11096
- return /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime252.jsx)(StyledTfoot, { ...props, children }) });
11260
+ return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledTfoot, { ...props, children }) });
11097
11261
  };
11098
11262
 
11099
11263
  // src/components/Table/TableHead.tsx
11100
- var import_styled_components76 = __toESM(require("styled-components"));
11101
- var import_jsx_runtime253 = require("react/jsx-runtime");
11102
- var StyledThead = import_styled_components76.default.thead``;
11264
+ var import_styled_components77 = __toESM(require("styled-components"));
11265
+ var import_jsx_runtime254 = require("react/jsx-runtime");
11266
+ var StyledThead = import_styled_components77.default.thead``;
11103
11267
  var TableHead = ({ children, ...props }) => {
11104
- return /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime253.jsx)(StyledThead, { ...props, children }) });
11268
+ return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(TableSectionContext.Provider, { value: "head", children: /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(StyledThead, { ...props, children }) });
11105
11269
  };
11106
11270
 
11107
11271
  // src/components/Table/TableRow.tsx
11108
- var import_styled_components77 = __toESM(require("styled-components"));
11109
- var import_jsx_runtime254 = require("react/jsx-runtime");
11110
- var StyledTr = import_styled_components77.default.tr``;
11272
+ var import_styled_components78 = __toESM(require("styled-components"));
11273
+ var import_jsx_runtime255 = require("react/jsx-runtime");
11274
+ var StyledTr = import_styled_components78.default.tr``;
11111
11275
  var TableRow = ({ children, ...props }) => {
11112
- return /* @__PURE__ */ (0, import_jsx_runtime254.jsx)(StyledTr, { ...props, children });
11276
+ return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(StyledTr, { ...props, children });
11113
11277
  };
11114
11278
 
11115
11279
  // src/components/Tabs/Tabs.tsx
11116
- var import_react57 = require("react");
11280
+ var import_react58 = require("react");
11117
11281
  var import_react_tabs4 = require("@radix-ui/react-tabs");
11118
- var import_type_guards43 = require("@wistia/type-guards");
11119
- var import_styled_components82 = __toESM(require("styled-components"));
11282
+ var import_type_guards44 = require("@wistia/type-guards");
11283
+ var import_styled_components83 = __toESM(require("styled-components"));
11120
11284
 
11121
11285
  // src/components/Tabs/TabPanel.tsx
11122
- var import_styled_components78 = __toESM(require("styled-components"));
11286
+ var import_styled_components79 = __toESM(require("styled-components"));
11123
11287
  var import_react_tabs = require("@radix-ui/react-tabs");
11124
- var import_jsx_runtime255 = require("react/jsx-runtime");
11125
- var StyledTabPanel = (0, import_styled_components78.default)(import_react_tabs.Content)`
11288
+ var import_jsx_runtime256 = require("react/jsx-runtime");
11289
+ var StyledTabPanel = (0, import_styled_components79.default)(import_react_tabs.Content)`
11126
11290
  display: flex;
11127
11291
  flex-direction: column;
11128
11292
  `;
11129
11293
  var TabPanel = ({ children, value, ...props }) => {
11130
- return /* @__PURE__ */ (0, import_jsx_runtime255.jsx)(
11294
+ return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
11131
11295
  StyledTabPanel,
11132
11296
  {
11133
11297
  value,
@@ -11139,10 +11303,10 @@ var TabPanel = ({ children, value, ...props }) => {
11139
11303
  TabPanel.displayName = "TabPanel";
11140
11304
 
11141
11305
  // src/components/Tabs/TabList.tsx
11142
- var import_styled_components79 = __toESM(require("styled-components"));
11306
+ var import_styled_components80 = __toESM(require("styled-components"));
11143
11307
  var import_react_tabs2 = require("@radix-ui/react-tabs");
11144
- var import_jsx_runtime256 = require("react/jsx-runtime");
11145
- var StyledTabList = (0, import_styled_components79.default)(import_react_tabs2.List)`
11308
+ var import_jsx_runtime257 = require("react/jsx-runtime");
11309
+ var StyledTabList = (0, import_styled_components80.default)(import_react_tabs2.List)`
11146
11310
  ${segmentedControlStyles}
11147
11311
 
11148
11312
  margin-bottom: var(--wui-space-04);
@@ -11155,7 +11319,7 @@ var TabList = ({
11155
11319
  ariaLabel,
11156
11320
  ...props
11157
11321
  }) => {
11158
- return /* @__PURE__ */ (0, import_jsx_runtime256.jsx)(
11322
+ return /* @__PURE__ */ (0, import_jsx_runtime257.jsx)(
11159
11323
  StyledTabList,
11160
11324
  {
11161
11325
  $fullWidth: fullWidth,
@@ -11168,17 +11332,17 @@ var TabList = ({
11168
11332
  TabList.displayName = "TabList";
11169
11333
 
11170
11334
  // src/components/Tabs/TabItem.tsx
11171
- var import_react54 = require("react");
11172
- var import_styled_components80 = __toESM(require("styled-components"));
11335
+ var import_react55 = require("react");
11336
+ var import_styled_components81 = __toESM(require("styled-components"));
11173
11337
  var import_react_tabs3 = require("@radix-ui/react-tabs");
11174
- var import_type_guards42 = require("@wistia/type-guards");
11338
+ var import_type_guards43 = require("@wistia/type-guards");
11175
11339
 
11176
11340
  // src/components/Tabs/useTabsValue.tsx
11177
- var import_react53 = require("react");
11178
- var TabsValueContext = (0, import_react53.createContext)(null);
11341
+ var import_react54 = require("react");
11342
+ var TabsValueContext = (0, import_react54.createContext)(null);
11179
11343
  var TabsValueProvider = TabsValueContext.Provider;
11180
11344
  var useTabsValue = () => {
11181
- const context = (0, import_react53.useContext)(TabsValueContext);
11345
+ const context = (0, import_react54.useContext)(TabsValueContext);
11182
11346
  if (context === null) {
11183
11347
  throw new Error("useTabsValue must be used within a TabsValueProvider");
11184
11348
  }
@@ -11186,21 +11350,21 @@ var useTabsValue = () => {
11186
11350
  };
11187
11351
 
11188
11352
  // src/components/Tabs/TabItem.tsx
11189
- var import_jsx_runtime257 = require("react/jsx-runtime");
11190
- var StyledTabItem = (0, import_styled_components80.default)(import_react_tabs3.Trigger)`
11353
+ var import_jsx_runtime258 = require("react/jsx-runtime");
11354
+ var StyledTabItem = (0, import_styled_components81.default)(import_react_tabs3.Trigger)`
11191
11355
  ${segmentedControlItemStyles}
11192
11356
 
11193
11357
  &:focus-visible {
11194
11358
  outline: none;
11195
11359
  }
11196
11360
  `;
11197
- var TabItem = (0, import_react54.forwardRef)(
11361
+ var TabItem = (0, import_react55.forwardRef)(
11198
11362
  ({ disabled = false, icon, label, "aria-label": ariaLabel, value }, forwardedRef) => {
11199
11363
  const selectedValue = useTabsValue();
11200
11364
  const { setSelectedItemMeasurements } = useSelectedItemMeasurements();
11201
- const buttonRef = (0, import_react54.useRef)(null);
11365
+ const buttonRef = (0, import_react55.useRef)(null);
11202
11366
  const combinedRef = mergeRefs([buttonRef, forwardedRef]);
11203
- (0, import_react54.useEffect)(() => {
11367
+ (0, import_react55.useEffect)(() => {
11204
11368
  const buttonElem = buttonRef.current;
11205
11369
  if (!buttonElem) {
11206
11370
  return void 0;
@@ -11225,12 +11389,12 @@ var TabItem = (0, import_react54.forwardRef)(
11225
11389
  resizeObserver.disconnect();
11226
11390
  };
11227
11391
  }, [selectedValue, setSelectedItemMeasurements, value]);
11228
- return /* @__PURE__ */ (0, import_jsx_runtime257.jsxs)(
11392
+ return /* @__PURE__ */ (0, import_jsx_runtime258.jsxs)(
11229
11393
  StyledTabItem,
11230
11394
  {
11231
11395
  ref: combinedRef,
11232
- $hasLabel: (0, import_type_guards42.isNotNil)(label),
11233
- "aria-label": (0, import_type_guards42.isNotNil)(label) ? void 0 : ariaLabel,
11396
+ $hasLabel: (0, import_type_guards43.isNotNil)(label),
11397
+ "aria-label": (0, import_type_guards43.isNotNil)(label) ? void 0 : ariaLabel,
11234
11398
  disabled,
11235
11399
  value,
11236
11400
  children: [
@@ -11244,16 +11408,16 @@ var TabItem = (0, import_react54.forwardRef)(
11244
11408
  TabItem.displayName = "TabItem";
11245
11409
 
11246
11410
  // src/components/Tabs/extractTabItems.ts
11247
- var import_react55 = require("react");
11411
+ var import_react56 = require("react");
11248
11412
  var extractTabItems = (children) => {
11249
11413
  const tabItems = [];
11250
- import_react55.Children.forEach(children, (child) => {
11251
- if (!(0, import_react55.isValidElement)(child)) {
11414
+ import_react56.Children.forEach(children, (child) => {
11415
+ if (!(0, import_react56.isValidElement)(child)) {
11252
11416
  return;
11253
11417
  }
11254
11418
  if (typeof child.type !== "string" && child.type.displayName === "Tab") {
11255
11419
  tabItems.push(child);
11256
- } else if (child.type === import_react55.Fragment) {
11420
+ } else if (child.type === import_react56.Fragment) {
11257
11421
  const fragmentElement = child;
11258
11422
  tabItems.push(...extractTabItems(fragmentElement.props.children));
11259
11423
  } else if ((child.props.children ?? null) != null) {
@@ -11266,10 +11430,10 @@ var extractTabItems = (children) => {
11266
11430
  };
11267
11431
 
11268
11432
  // src/components/Tabs/SelectedItemIndicator.tsx
11269
- var import_react56 = require("react");
11270
- var import_styled_components81 = __toESM(require("styled-components"));
11271
- var import_jsx_runtime258 = require("react/jsx-runtime");
11272
- var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(SelectedItemIndicatorDiv)`
11433
+ var import_react57 = require("react");
11434
+ var import_styled_components82 = __toESM(require("styled-components"));
11435
+ var import_jsx_runtime259 = require("react/jsx-runtime");
11436
+ var TabsSelectedItemIndicatorDiv = (0, import_styled_components82.default)(SelectedItemIndicatorDiv)`
11273
11437
  &:has(~ ${StyledTabItem}:focus-visible) {
11274
11438
  outline: 2px solid var(--wui-color-focus-ring);
11275
11439
  }
@@ -11277,7 +11441,7 @@ var TabsSelectedItemIndicatorDiv = (0, import_styled_components81.default)(Selec
11277
11441
  var SelectedItemIndicator2 = () => {
11278
11442
  const { selectedItemMeasurements } = useSelectedItemMeasurements();
11279
11443
  const selectedValue = useTabsValue();
11280
- const selectedItemIndicatorStyle = (0, import_react56.useMemo)(
11444
+ const selectedItemIndicatorStyle = (0, import_react57.useMemo)(
11281
11445
  () => selectedItemMeasurements != null ? {
11282
11446
  height: `${selectedItemMeasurements.offsetHeight}px`,
11283
11447
  transform: `translateX(${selectedItemMeasurements.offsetLeft}px)`,
@@ -11288,7 +11452,7 @@ var SelectedItemIndicator2 = () => {
11288
11452
  if (selectedValue == null) {
11289
11453
  return null;
11290
11454
  }
11291
- return /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(
11455
+ return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11292
11456
  TabsSelectedItemIndicatorDiv,
11293
11457
  {
11294
11458
  style: {
@@ -11301,24 +11465,24 @@ var SelectedItemIndicator2 = () => {
11301
11465
  };
11302
11466
 
11303
11467
  // src/components/Tabs/Tabs.tsx
11304
- var import_jsx_runtime259 = require("react/jsx-runtime");
11305
- var TabsContainer = import_styled_components82.default.div`
11468
+ var import_jsx_runtime260 = require("react/jsx-runtime");
11469
+ var TabsContainer = import_styled_components83.default.div`
11306
11470
  display: flex;
11307
11471
  flex-direction: column;
11308
11472
  height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
11309
11473
  overflow: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
11310
11474
  `;
11311
- var StickyTabContent = import_styled_components82.default.div`
11475
+ var StickyTabContent = import_styled_components83.default.div`
11312
11476
  flex: ${({ $stickyHeaders }) => $stickyHeaders ? "1" : "initial"};
11313
11477
  overflow-y: ${({ $stickyHeaders }) => $stickyHeaders ? "auto" : "visible"};
11314
11478
  overflow-x: ${({ $stickyHeaders }) => $stickyHeaders ? "hidden" : "visible"};
11315
11479
  `;
11316
- var StyledTabsRoot = (0, import_styled_components82.default)(import_react_tabs4.Root)`
11480
+ var StyledTabsRoot = (0, import_styled_components83.default)(import_react_tabs4.Root)`
11317
11481
  display: flex;
11318
11482
  flex-direction: column;
11319
11483
  height: ${({ $stickyHeaders }) => $stickyHeaders ? "100%" : "auto"};
11320
11484
  `;
11321
- var Tabs = (0, import_react57.forwardRef)(
11485
+ var Tabs = (0, import_react58.forwardRef)(
11322
11486
  ({
11323
11487
  children,
11324
11488
  fullWidth = true,
@@ -11330,13 +11494,13 @@ var Tabs = (0, import_react57.forwardRef)(
11330
11494
  ...otherProps
11331
11495
  }, ref) => {
11332
11496
  const tabItems = extractTabItems(children);
11333
- const [internalSelectedValue, setInternalSelectedValue] = (0, import_react57.useState)(defaultSelectedValue);
11497
+ const [internalSelectedValue, setInternalSelectedValue] = (0, import_react58.useState)(defaultSelectedValue);
11334
11498
  const modeProps = defaultSelectedValue !== void 0 ? {
11335
11499
  defaultValue: defaultSelectedValue,
11336
11500
  onValueChange: setInternalSelectedValue
11337
11501
  } : { value: selectedValue, onValueChange: onSelectedValueChange };
11338
11502
  const currentValue = defaultSelectedValue !== void 0 ? internalSelectedValue : selectedValue;
11339
- return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11503
+ return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TabsContainer, { $stickyHeaders: stickyHeaders, children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
11340
11504
  StyledTabsRoot,
11341
11505
  {
11342
11506
  ref,
@@ -11344,14 +11508,14 @@ var Tabs = (0, import_react57.forwardRef)(
11344
11508
  activationMode: "automatic",
11345
11509
  ...otherProps,
11346
11510
  ...modeProps,
11347
- children: /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(SelectedItemMeasurementsProvider, { children: [
11348
- /* @__PURE__ */ (0, import_jsx_runtime259.jsxs)(
11511
+ children: /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(TabsValueProvider, { value: currentValue, children: /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(SelectedItemMeasurementsProvider, { children: [
11512
+ /* @__PURE__ */ (0, import_jsx_runtime260.jsxs)(
11349
11513
  TabList,
11350
11514
  {
11351
11515
  ariaLabel,
11352
11516
  fullWidth,
11353
11517
  children: [
11354
- /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(SelectedItemIndicator2, {}),
11518
+ /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(SelectedItemIndicator2, {}),
11355
11519
  tabItems.map((tab) => {
11356
11520
  const {
11357
11521
  value,
@@ -11360,8 +11524,8 @@ var Tabs = (0, import_react57.forwardRef)(
11360
11524
  label,
11361
11525
  "aria-label": ariaLabelForTab
11362
11526
  } = tab.props;
11363
- if ((0, import_type_guards43.isNil)(icon)) {
11364
- return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11527
+ if ((0, import_type_guards44.isNil)(icon)) {
11528
+ return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
11365
11529
  TabItem,
11366
11530
  {
11367
11531
  disabled,
@@ -11371,8 +11535,8 @@ var Tabs = (0, import_react57.forwardRef)(
11371
11535
  value
11372
11536
  );
11373
11537
  }
11374
- if ((0, import_type_guards43.isNotNil)(label)) {
11375
- return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11538
+ if ((0, import_type_guards44.isNotNil)(label)) {
11539
+ return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
11376
11540
  TabItem,
11377
11541
  {
11378
11542
  disabled,
@@ -11383,8 +11547,8 @@ var Tabs = (0, import_react57.forwardRef)(
11383
11547
  value
11384
11548
  );
11385
11549
  }
11386
- if ((0, import_type_guards43.isNotNil)(ariaLabelForTab)) {
11387
- return /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11550
+ if ((0, import_type_guards44.isNotNil)(ariaLabelForTab)) {
11551
+ return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
11388
11552
  TabItem,
11389
11553
  {
11390
11554
  "aria-label": ariaLabelForTab,
@@ -11400,7 +11564,7 @@ var Tabs = (0, import_react57.forwardRef)(
11400
11564
  ]
11401
11565
  }
11402
11566
  ),
11403
- /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime259.jsx)(
11567
+ /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(StickyTabContent, { $stickyHeaders: stickyHeaders, children: tabItems.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime260.jsx)(
11404
11568
  TabPanel,
11405
11569
  {
11406
11570
  value: tab.props.value,
@@ -11416,19 +11580,19 @@ var Tabs = (0, import_react57.forwardRef)(
11416
11580
  Tabs.displayName = "Tabs";
11417
11581
 
11418
11582
  // src/components/Tabs/Tab.tsx
11419
- var import_react58 = require("react");
11420
- var import_jsx_runtime260 = require("react/jsx-runtime");
11421
- var Tab = (0, import_react58.forwardRef)(({ children }, ref) => {
11422
- return /* @__PURE__ */ (0, import_jsx_runtime260.jsx)("div", { ref, children });
11583
+ var import_react59 = require("react");
11584
+ var import_jsx_runtime261 = require("react/jsx-runtime");
11585
+ var Tab = (0, import_react59.forwardRef)(({ children }, ref) => {
11586
+ return /* @__PURE__ */ (0, import_jsx_runtime261.jsx)("div", { ref, children });
11423
11587
  });
11424
11588
  Tab.displayName = "Tab";
11425
11589
 
11426
11590
  // src/components/Tag/Tag.tsx
11427
- var import_react59 = require("react");
11428
- var import_styled_components83 = __toESM(require("styled-components"));
11429
- var import_type_guards44 = require("@wistia/type-guards");
11430
- var import_jsx_runtime261 = require("react/jsx-runtime");
11431
- var TagLabel = import_styled_components83.default.a`
11591
+ var import_react60 = require("react");
11592
+ var import_styled_components84 = __toESM(require("styled-components"));
11593
+ var import_type_guards45 = require("@wistia/type-guards");
11594
+ var import_jsx_runtime262 = require("react/jsx-runtime");
11595
+ var TagLabel = import_styled_components84.default.a`
11432
11596
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
11433
11597
  font-size: var(--wui-typography-label-4-size);
11434
11598
  font-weight: var(--wui-typography-label-4-weight);
@@ -11463,14 +11627,14 @@ var TagLabel = import_styled_components83.default.a`
11463
11627
  box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
11464
11628
  }
11465
11629
  `;
11466
- var TagDivider = import_styled_components83.default.div`
11630
+ var TagDivider = import_styled_components84.default.div`
11467
11631
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
11468
11632
  border-left: 1px solid var(--wui-color-border);
11469
11633
  display: flex;
11470
11634
  height: 14px;
11471
11635
  width: 1px;
11472
11636
  `;
11473
- var StyledRemoveButton = import_styled_components83.default.button`
11637
+ var StyledRemoveButton = import_styled_components84.default.button`
11474
11638
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
11475
11639
  all: unset;
11476
11640
  cursor: pointer;
@@ -11498,7 +11662,7 @@ var StyledRemoveButton = import_styled_components83.default.button`
11498
11662
  box-shadow: inset 0 0 0 2px var(--wui-color-border-secondary);
11499
11663
  }
11500
11664
  `;
11501
- var StyledTag = import_styled_components83.default.div`
11665
+ var StyledTag = import_styled_components84.default.div`
11502
11666
  ${({ $colorScheme }) => getColorScheme($colorScheme)};
11503
11667
  align-items: center;
11504
11668
  background-color: var(--wui-color-bg-surface-secondary);
@@ -11511,37 +11675,37 @@ var StyledTag = import_styled_components83.default.div`
11511
11675
  }
11512
11676
  `;
11513
11677
  var RemoveButton = ({ onClickRemove, onClickRemoveLabel, colorScheme }) => {
11514
- if ((0, import_type_guards44.isNil)(onClickRemove)) {
11678
+ if ((0, import_type_guards45.isNil)(onClickRemove)) {
11515
11679
  return null;
11516
11680
  }
11517
- if ((0, import_type_guards44.isNil)(onClickRemoveLabel)) {
11681
+ if ((0, import_type_guards45.isNil)(onClickRemoveLabel)) {
11518
11682
  throw new Error(
11519
11683
  "for accessibility, onClickRemoveLabel must be provided if onClickRemove is provided"
11520
11684
  );
11521
11685
  }
11522
- return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(import_jsx_runtime261.Fragment, { children: [
11523
- /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(TagDivider, { $colorScheme: colorScheme }),
11524
- /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
11686
+ return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(import_jsx_runtime262.Fragment, { children: [
11687
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(TagDivider, { $colorScheme: colorScheme }),
11688
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
11525
11689
  StyledRemoveButton,
11526
11690
  {
11527
11691
  $colorScheme: colorScheme,
11528
11692
  onClick: onClickRemove,
11529
11693
  type: "button",
11530
11694
  children: [
11531
- /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
11695
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
11532
11696
  Icon,
11533
11697
  {
11534
11698
  size: "sm",
11535
11699
  type: "close"
11536
11700
  }
11537
11701
  ),
11538
- /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
11702
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(ScreenReaderOnly, { children: onClickRemoveLabel })
11539
11703
  ]
11540
11704
  }
11541
11705
  )
11542
11706
  ] });
11543
11707
  };
11544
- var Tag = (0, import_react59.forwardRef)(
11708
+ var Tag = (0, import_react60.forwardRef)(
11545
11709
  ({
11546
11710
  onClickRemove,
11547
11711
  colorScheme = "inherit",
@@ -11551,16 +11715,16 @@ var Tag = (0, import_react59.forwardRef)(
11551
11715
  onClickRemoveLabel,
11552
11716
  ...otherProps
11553
11717
  }, ref) => {
11554
- const hasIcon = (0, import_type_guards44.isNotNil)(icon);
11555
- const labelProps = (0, import_type_guards44.isNotNil)(href) && (0, import_type_guards44.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
11556
- return /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
11718
+ const hasIcon = (0, import_type_guards45.isNotNil)(icon);
11719
+ const labelProps = (0, import_type_guards45.isNotNil)(href) && (0, import_type_guards45.isNonEmptyString)(href) ? { href, as: "a" } : { as: "span" };
11720
+ return /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
11557
11721
  StyledTag,
11558
11722
  {
11559
11723
  ref,
11560
11724
  $colorScheme: colorScheme,
11561
11725
  ...otherProps,
11562
11726
  children: [
11563
- /* @__PURE__ */ (0, import_jsx_runtime261.jsxs)(
11727
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
11564
11728
  TagLabel,
11565
11729
  {
11566
11730
  ...labelProps,
@@ -11571,7 +11735,7 @@ var Tag = (0, import_react59.forwardRef)(
11571
11735
  ]
11572
11736
  }
11573
11737
  ),
11574
- /* @__PURE__ */ (0, import_jsx_runtime261.jsx)(
11738
+ /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
11575
11739
  RemoveButton,
11576
11740
  {
11577
11741
  colorScheme,
@@ -11587,26 +11751,26 @@ var Tag = (0, import_react59.forwardRef)(
11587
11751
  Tag.displayName = "Tag";
11588
11752
 
11589
11753
  // src/components/WistiaLogo/WistiaLogo.tsx
11590
- var import_styled_components84 = __toESM(require("styled-components"));
11591
- var import_type_guards45 = require("@wistia/type-guards");
11592
- var import_jsx_runtime262 = require("react/jsx-runtime");
11754
+ var import_styled_components85 = __toESM(require("styled-components"));
11755
+ var import_type_guards46 = require("@wistia/type-guards");
11756
+ var import_jsx_runtime263 = require("react/jsx-runtime");
11593
11757
  var renderBrandmark = (brandmarkColor, iconOnly) => {
11594
11758
  if (iconOnly) {
11595
- return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
11759
+ return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
11596
11760
  "g",
11597
11761
  {
11598
11762
  "data-testid": "ui-wistia-logo-brandmark",
11599
11763
  fill: brandmarkColor,
11600
- children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("path", { d: "M16.09 17.1h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 26.53c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87ZM32.14 0c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
11764
+ children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
11601
11765
  }
11602
11766
  );
11603
11767
  }
11604
- return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
11768
+ return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
11605
11769
  "g",
11606
11770
  {
11607
11771
  "data-testid": "ui-wistia-logo-brandmark",
11608
11772
  fill: brandmarkColor,
11609
- children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("path", { d: "M16.09 21.37h-5.2c-1.58 0-3.08.68-4.11 1.87L.21 30.8c4.78.25 9.78.25 13.3.25 18.31 0 20.89-11.27 20.89-16.55-1.59 1.93-6.06 6.87-18.32 6.87Zm16.05-17.1c-.08.92-.59 4.69-11.31 4.69-8.72 0-12.24 0-20.83-.17l6.44 7.4a6.657 6.657 0 0 0 4.96 2.3c2.13.03 5.05.06 5.53.06 11.01 0 17.19-5.05 17.19-9.89 0-2.01-.67-3.44-1.97-4.4Z" })
11773
+ children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
11610
11774
  }
11611
11775
  );
11612
11776
  };
@@ -11614,12 +11778,12 @@ var renderLogotype = (logotypeColor, iconOnly) => {
11614
11778
  if (iconOnly) {
11615
11779
  return null;
11616
11780
  }
11617
- return /* @__PURE__ */ (0, import_jsx_runtime262.jsx)(
11781
+ return /* @__PURE__ */ (0, import_jsx_runtime263.jsx)(
11618
11782
  "g",
11619
11783
  {
11620
11784
  "data-testid": "ui-wistia-logo-logotype",
11621
11785
  fill: logotypeColor,
11622
- children: /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("path", { d: "M70.16 8.66v15.18c0 1.68-.35 3.09-1.05 4.23a6.612 6.612 0 0 1-2.85 2.54c-1.19.55-2.52.82-4.01.82s-2.8-.28-4.01-.85a6.655 6.655 0 0 1-3.11-2.96c-.08.15-.16.29-.24.42a6.552 6.552 0 0 1-2.87 2.54c-1.2.56-2.54.85-4.01.85s-2.8-.27-3.94-.82a6.214 6.214 0 0 1-2.71-2.52c-.67-1.14-1.01-2.56-1.02-4.25l-.22-15.18h7.34V22.3c0 .82.19 1.37.56 1.67.39.28.85.42 1.38.42s1.02-.15 1.45-.45c.43-.3.65-.85.65-1.65V8.65h7.3v13.64c0 .8.22 1.35.65 1.65.43.3.91.45 1.45.45s.99-.14 1.36-.42c.39-.3.58-.85.58-1.67V8.66h7.34Zm2.45 0v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89A3.43 3.43 0 0 0 78.28.44c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.13 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm8.86 1.96c-1.42.4-2.6 1.11-3.54 2.14-.93 1.02-1.4 2.4-1.4 4.12 0 1.11.17 2.09.51 2.94.36.85.82 1.62 1.38 2.34.22.28.55.65.98 1.11.37.4.64.72.8.96.18.24.27.47.27.69 0 .5-.4.87-1.2 1.09-.8.21-1.62.31-2.47.31-.1-.01-.22-.02-.33-.02l1.02 6.94c.42.07.92.11 1.51.11 1.9 0 3.6-.28 5.1-.85 1.5-.56 2.68-1.42 3.54-2.56.88-1.14 1.31-2.55 1.31-4.23 0-.68-.07-1.31-.22-1.87-.13-.58-.32-1.09-.56-1.54a6.64 6.64 0 0 0-.8-1.27c-.3-.37-.74-.82-1.34-1.36-.39-.33-.67-.59-.85-.8-.18-.22-.27-.45-.27-.67 0-.46.26-.79.78-.98.53-.19 1.17-.29 1.91-.29.25 0 .51.01.78.04l-.71-6.88a10.4 10.4 0 0 0-1.56-.11c-1.66 0-3.21.21-4.65.62Zm19.54 15.71c-.99 0-1.71-.23-2.14-.69-.42-.47-.62-1.18-.62-2.11v-6.57h4.21V8.66h-4.21V3.38l-7.34 1.85V24.1c0 2.45.47 4.29 1.4 5.52.95 1.22 2.45 1.83 4.49 1.83.95 0 1.86-.07 2.74-.22.88-.13 1.62-.34 2.25-.62l1.38-6.3c-.55.1-1.27.16-2.16.16Zm4.13-15.8v22.26h7.34V8.66h-7.34Zm5.67-1.87c.61-.3 1.08-.71 1.42-1.25.36-.55.53-1.19.53-1.94s-.18-1.34-.53-1.89a3.43 3.43 0 0 0-1.42-1.27c-.59-.3-1.25-.45-1.98-.45s-1.42.15-2.02.45c-.59.3-1.07.72-1.42 1.27-.36.55-.53 1.18-.53 1.89 0 1.1.38 1.97 1.14 2.63.76.65 1.71.98 2.85.98.73 0 1.39-.14 1.98-.42Zm27.51 1.87v22.26h-7.34v-2.28c-.41.43-.85.83-1.34 1.19-1.44 1.07-3.12 1.6-5.05 1.6s-3.61-.52-5.1-1.56c-1.48-1.05-2.63-2.47-3.45-4.25-.82-1.78-1.22-3.73-1.22-5.85s.41-4.07 1.22-5.83c.82-1.78 1.97-3.19 3.45-4.23 1.48-1.05 3.18-1.58 5.1-1.58s3.61.53 5.05 1.6c.48.36.93.75 1.34 1.19V8.66h7.34Zm-7.1 11.11c0-.8-.19-1.53-.56-2.18-.37-.67-.88-1.19-1.54-1.58-.64-.39-1.34-.58-2.09-.58s-1.45.19-2.09.58c-.64.39-1.15.91-1.54 1.58-.37.67-.56 1.39-.56 2.18s.19 1.51.56 2.18c.39.67.9 1.19 1.54 1.58.64.39 1.34.58 2.09.58s1.45-.19 2.09-.58c.65-.39 1.16-.91 1.54-1.56.37-.67.56-1.4.56-2.2Z" })
11786
+ children: /* @__PURE__ */ (0, import_jsx_runtime263.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" })
11623
11787
  }
11624
11788
  );
11625
11789
  };
@@ -11629,7 +11793,7 @@ var computedViewBox = (iconOnly) => {
11629
11793
  }
11630
11794
  return "0 0 144 31.47";
11631
11795
  };
11632
- var WistiaLogoComponent = import_styled_components84.default.svg`
11796
+ var WistiaLogoComponent = import_styled_components85.default.svg`
11633
11797
  height: ${({ height }) => `${height}px`};
11634
11798
 
11635
11799
  /* ensure it will always fit on mobile */
@@ -11645,12 +11809,12 @@ var WistiaLogoComponent = import_styled_components84.default.svg`
11645
11809
  ${({ $opticallyCentered, $iconOnly }) => {
11646
11810
  if ($opticallyCentered) {
11647
11811
  if ($iconOnly) {
11648
- return import_styled_components84.css`
11812
+ return import_styled_components85.css`
11649
11813
  aspect-ratio: 1;
11650
11814
  padding: 11.85% 3.12% 13.91%;
11651
11815
  `;
11652
11816
  }
11653
- return import_styled_components84.css`
11817
+ return import_styled_components85.css`
11654
11818
  aspect-ratio: 127 / 32;
11655
11819
  `;
11656
11820
  }
@@ -11687,7 +11851,7 @@ var WistiaLogo = ({
11687
11851
  };
11688
11852
  const brandmarkColor = VARIANT_COLORS[variant].brandmark;
11689
11853
  const logotypeColor = VARIANT_COLORS[variant].logotype;
11690
- const Logo = /* @__PURE__ */ (0, import_jsx_runtime262.jsxs)(
11854
+ const Logo = /* @__PURE__ */ (0, import_jsx_runtime263.jsxs)(
11691
11855
  WistiaLogoComponent,
11692
11856
  {
11693
11857
  $hoverColor: hoverColor,
@@ -11700,14 +11864,14 @@ var WistiaLogo = ({
11700
11864
  xmlns: "http://www.w3.org/2000/svg",
11701
11865
  ...otherProps,
11702
11866
  children: [
11703
- /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("title", { children: title }),
11704
- (0, import_type_guards45.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("desc", { children: description }) : null,
11867
+ /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("title", { children: title }),
11868
+ (0, import_type_guards46.isNotNil)(description) ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("desc", { children: description }) : null,
11705
11869
  renderBrandmark(brandmarkColor, iconOnly),
11706
11870
  renderLogotype(logotypeColor, iconOnly)
11707
11871
  ]
11708
11872
  }
11709
11873
  );
11710
- return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime262.jsx)("a", { href, children: Logo }) : Logo;
11874
+ return href !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime263.jsx)("a", { href, children: Logo }) : Logo;
11711
11875
  };
11712
11876
  WistiaLogo.displayName = "WistiaLogo";
11713
11877
  // Annotate the CommonJS export names for ESM import in node:
@@ -11771,6 +11935,7 @@ WistiaLogo.displayName = "WistiaLogo";
11771
11935
  SelectOptionGroup,
11772
11936
  Stack,
11773
11937
  SubMenu,
11938
+ Switch,
11774
11939
  Tab,
11775
11940
  Table,
11776
11941
  TableBody,