@wistia/ui 0.14.13 → 0.14.15-beta.1fe398e6.acad392

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.14.13
3
+ * @license @wistia/ui v0.14.15-beta.1fe398e6.acad392
4
4
  *
5
5
  * Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
6
6
  *
@@ -76,6 +76,10 @@ __export(index_exports, {
76
76
  DataCardHoverArrow: () => DataCardHoverArrow,
77
77
  DataCardTrend: () => DataCardTrend,
78
78
  DataCards: () => DataCards,
79
+ DataList: () => DataList,
80
+ DataListItem: () => DataListItem,
81
+ DataListItemLabel: () => DataListItemLabel,
82
+ DataListItemValue: () => DataListItemValue,
79
83
  Divider: () => Divider,
80
84
  EditableHeading: () => EditableHeading,
81
85
  Ellipsis: () => Ellipsis,
@@ -7294,7 +7298,7 @@ var StyledLink = import_styled_components20.default.a`
7294
7298
  ${({ href }) => (0, import_type_guards14.isNil)(href) && buttonResetCss};
7295
7299
  ${({ $colorScheme }) => getColorScheme($colorScheme)}
7296
7300
  cursor: ${({ $disabled }) => $disabled ? "not-allowed" : "pointer"};
7297
- font-family: var(--wui-typography-family-default);
7301
+ font-family: inherit;
7298
7302
  color: ${({ $disabled }) => $disabled ? "var(--wui-color-text-disabled)" : "var(--wui-color-text-link)"};
7299
7303
  text-decoration: ${({ $underline }) => $underline === "always" ? "underline" : "none"};
7300
7304
  display: inline-flex;
@@ -9013,7 +9017,6 @@ var StyledFormControlLabelDescription = import_styled_components37.default.div`
9013
9017
  font-size: var(--wui-typography-body-4-size);
9014
9018
  font-weight: var(--wui-typography-body-4-weight);
9015
9019
  line-height: var(--wui-typography-body-4-line-height);
9016
- margin-top: var(--wui-space-01);
9017
9020
 
9018
9021
  ${({ $disabled }) => $disabled && disabledStyle}
9019
9022
  `;
@@ -9072,12 +9075,12 @@ var StyledFormControlLabel = import_styled_components39.default.label`
9072
9075
  cursor: pointer;
9073
9076
  display: flex;
9074
9077
  align-items: center;
9075
- gap: var(--wui-space-01);
9078
+ gap: var(--wui-space-02);
9076
9079
  width: 100%;
9077
9080
  color: var(--wui-color-tex);
9078
9081
  font-size: var(--wui-typography-label-3-size);
9079
9082
  font-weight: var(--wui-typography-label-3-weight);
9080
- line-height: var(--wui-typography-label-3-line-height);
9083
+ line-height: var(--wui-typography-body-3-line-height);
9081
9084
  justify-content: ${({ $align }) => $align === "left" ? "flex-start" : "space-between"};
9082
9085
 
9083
9086
  ${({ $disabled }) => $disabled && disabledStyle2}
@@ -9160,11 +9163,9 @@ var Stack = makePolymorphic(StackComponent);
9160
9163
  // src/components/FormGroup/FormGroup.tsx
9161
9164
  var import_jsx_runtime218 = require("react/jsx-runtime");
9162
9165
  var StyledFieldset = import_styled_components41.default.fieldset`
9166
+ padding: 0;
9167
+ margin: 0;
9163
9168
  border: 0;
9164
-
9165
- /* * {
9166
- outline: 1px solid red;
9167
- } */
9168
9169
  `;
9169
9170
  var StyledLegend = import_styled_components41.default.legend`
9170
9171
  padding-inline: 0;
@@ -9172,10 +9173,6 @@ var StyledLegend = import_styled_components41.default.legend`
9172
9173
  flex-direction: column;
9173
9174
  gap: var(--wui-space-01);
9174
9175
  margin-bottom: var(--wui-space-02);
9175
-
9176
- &:has([data-wui-form-group-description]) {
9177
- margin-bottom: var(--wui-space-01);
9178
- }
9179
9176
  `;
9180
9177
  var FormGroup = ({
9181
9178
  children,
@@ -9381,43 +9378,22 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9381
9378
  "path",
9382
9379
  {
9383
9380
  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",
9384
- fill: "currentColor"
9381
+ fill: "var(--wui-checkbox-icon-color)"
9385
9382
  }
9386
9383
  )
9387
9384
  }
9388
9385
  );
9389
9386
  var sizeSmall = import_styled_components43.css`
9390
- width: 14px;
9391
- height: 14px;
9392
- min-width: 14px;
9393
- min-height: 14px;
9394
-
9395
- svg {
9396
- width: 7px;
9397
- height: 7px;
9398
- }
9387
+ --wui-checkbox-size: 14px;
9388
+ --wui-checkbox-icon-size: 7px;
9399
9389
  `;
9400
9390
  var sizeMedium = import_styled_components43.css`
9401
- width: 16px;
9402
- height: 16px;
9403
- min-width: 16px;
9404
- min-height: 16px;
9405
-
9406
- svg {
9407
- width: 9px;
9408
- height: 9px;
9409
- }
9391
+ --wui-checkbox-size: 16px;
9392
+ --wui-checkbox-icon-size: 9px;
9410
9393
  `;
9411
9394
  var sizeLarge = import_styled_components43.css`
9412
- width: 20px;
9413
- height: 20px;
9414
- min-width: 20px;
9415
- min-height: 20px;
9416
-
9417
- svg {
9418
- width: 11px;
9419
- height: 11px;
9420
- }
9395
+ --wui-checkbox-size: 20px;
9396
+ --wui-checkbox-icon-size: 11px;
9421
9397
  `;
9422
9398
  var getSizeCss = (size) => {
9423
9399
  if (size === "sm") return sizeSmall;
@@ -9425,6 +9401,36 @@ var getSizeCss = (size) => {
9425
9401
  return sizeMedium;
9426
9402
  };
9427
9403
  var StyledCheckboxWrapper = import_styled_components43.default.div`
9404
+ --wui-checkbox-background-color: var(--wui-color-bg-surface);
9405
+ --wui-checkbox-border-color: var(--wui-color-border-secondary);
9406
+ --wui-checkbox-icon-color: transparent;
9407
+ --wui-checkbox-outline-color: transparent;
9408
+
9409
+ &:hover {
9410
+ --wui-checkbox-border-color: var(--wui-color-border-secondary-hover);
9411
+ }
9412
+
9413
+ &:has(input:checked) {
9414
+ --wui-checkbox-background-color: var(--wui-color-bg-fill);
9415
+ --wui-checkbox-border-color: transparent;
9416
+ --wui-checkbox-icon-color: var(--wui-color-bg-fill-white);
9417
+ }
9418
+
9419
+ &:has(input:disabled) {
9420
+ --wui-checkbox-background-color: var(--wui-color-bg-surface-disabled);
9421
+ --wui-checkbox-border-color: var(--wui-color-border-secondary);
9422
+
9423
+ &:has(input:checked) {
9424
+ --wui-checkbox-icon-color: var(--wui-color-icon-disabled);
9425
+ }
9426
+ }
9427
+
9428
+ &:has(input:focus-visible) {
9429
+ [data-wui-faux-input='true'] {
9430
+ --wui-checkbox-outline-color: var(--wui-color-focus-ring);
9431
+ }
9432
+ }
9433
+
9428
9434
  display: flex;
9429
9435
  margin: 0;
9430
9436
 
@@ -9433,7 +9439,6 @@ var StyledCheckboxWrapper = import_styled_components43.default.div`
9433
9439
  `;
9434
9440
  var StyledCheckboxInput = import_styled_components43.default.div`
9435
9441
  ${({ $size }) => getSizeCss($size)}
9436
- line-height: 0;
9437
9442
  margin: 0;
9438
9443
  border-radius: var(--wui-border-radius-01);
9439
9444
  display: grid;
@@ -9441,31 +9446,27 @@ var StyledCheckboxInput = import_styled_components43.default.div`
9441
9446
  align-self: flex-start;
9442
9447
  border-width: 1px;
9443
9448
  border-style: solid;
9444
- border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-border-disabled)" : "var(--wui-color-border)"};
9445
- background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface)"};
9449
+ border-color: var(--wui-checkbox-border-color);
9450
+ background-color: var(--wui-checkbox-background-color);
9451
+ outline-color: var(--wui-checkbox-outline-color);
9452
+ outline-width: 2px;
9453
+ outline-style: solid;
9454
+ outline-offset: 1px;
9455
+ transition: all var(--wui-motion-duration-01) var(--wui-motion-ease);
9456
+ margin-top: calc(calc(1lh - var(--wui-checkbox-size)) / 2);
9457
+ width: var(--wui-checkbox-size);
9458
+ height: var(--wui-checkbox-size);
9459
+ min-width: var(--wui-checkbox-size);
9460
+ min-height: var(--wui-checkbox-size);
9446
9461
 
9447
- /* checkmark icon */
9462
+ /* checkbox icon */
9448
9463
  svg {
9449
- display: none;
9450
-
9451
- path {
9452
- fill: ${({ $disabled }) => $disabled ? "var(--wui-color-icon-disabled)" : "var(--wui-color-bg-fill-white)"};
9453
- }
9464
+ width: var(--wui-checkbox-icon-size);
9465
+ height: var(--wui-checkbox-icon-size);
9454
9466
  }
9455
9467
  `;
9456
9468
  var StyledHiddenCheckboxInput = import_styled_components43.default.input`
9457
9469
  ${visuallyHiddenStyle}
9458
-
9459
- /* toggles display of faux-input background-color */
9460
- &:checked + label [data-wui-faux-input='true'] {
9461
- border-color: ${({ disabled }) => disabled ? void 0 : "var(--wui-color-bg-fill)"};
9462
- background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill)"};
9463
- }
9464
-
9465
- /* toggles display of CheckIcon */
9466
- &:checked + label svg {
9467
- display: block;
9468
- }
9469
9470
  `;
9470
9471
  var Checkbox = (0, import_react38.forwardRef)(
9471
9472
  ({
@@ -9491,42 +9492,49 @@ var Checkbox = (0, import_react38.forwardRef)(
9491
9492
  const checkboxName = name ?? contextName;
9492
9493
  const handleOnChange = onChange ?? contextOnChange;
9493
9494
  const isChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : checked;
9494
- return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(StyledCheckboxWrapper, { disabled, children: [
9495
- /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9496
- StyledHiddenCheckboxInput,
9497
- {
9498
- ...props,
9499
- ref,
9500
- checked: isChecked,
9501
- disabled,
9502
- id: computedId,
9503
- name: checkboxName,
9504
- onChange: handleOnChange,
9505
- required,
9506
- type: "checkbox",
9507
- value
9508
- }
9509
- ),
9510
- /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9511
- FormControlLabel,
9512
- {
9513
- controlSlot: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9514
- StyledCheckboxInput,
9495
+ return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
9496
+ StyledCheckboxWrapper,
9497
+ {
9498
+ $hideLabel: hideLabel,
9499
+ disabled,
9500
+ children: [
9501
+ /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9502
+ StyledHiddenCheckboxInput,
9515
9503
  {
9516
- $disabled: disabled,
9517
- $size: size,
9518
- "data-wui-faux-input": "true",
9519
- children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(CheckIcon, {})
9504
+ ...props,
9505
+ ref,
9506
+ checked: isChecked,
9507
+ disabled,
9508
+ id: computedId,
9509
+ name: checkboxName,
9510
+ onChange: handleOnChange,
9511
+ required,
9512
+ type: "checkbox",
9513
+ value
9520
9514
  }
9521
9515
  ),
9522
- description,
9523
- disabled,
9524
- hideLabel,
9525
- htmlFor: computedId,
9526
- label
9527
- }
9528
- )
9529
- ] });
9516
+ /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9517
+ FormControlLabel,
9518
+ {
9519
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9520
+ StyledCheckboxInput,
9521
+ {
9522
+ $disabled: disabled,
9523
+ $size: size,
9524
+ "data-wui-faux-input": "true",
9525
+ children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(CheckIcon, {})
9526
+ }
9527
+ ),
9528
+ description,
9529
+ disabled,
9530
+ hideLabel,
9531
+ htmlFor: computedId,
9532
+ label
9533
+ }
9534
+ )
9535
+ ]
9536
+ }
9537
+ );
9530
9538
  }
9531
9539
  );
9532
9540
  Checkbox.displayName = "Checkbox_UI";
@@ -10931,106 +10939,79 @@ var import_react45 = require("react");
10931
10939
  var import_styled_components59 = __toESM(require("styled-components"));
10932
10940
  var import_type_guards34 = require("@wistia/type-guards");
10933
10941
  var import_jsx_runtime243 = require("react/jsx-runtime");
10934
- var sizeSmall2 = import_styled_components59.css`
10935
- --wui-size-small-width: 24px;
10936
- --wui-size-small-height: 14px;
10937
-
10938
- width: var(--wui-size-small-width);
10939
- height: var(--wui-size-small-height);
10940
- min-width: var(--wui-size-small-width);
10941
- min-height: var(--wui-size-small-height);
10942
- border-radius: calc(var(--wui-size-small-height) / 2);
10943
-
10944
- &::after {
10945
- width: calc(var(--wui-size-small-width) / 2);
10946
- height: calc(var(--wui-size-small-width) / 2);
10947
- }
10942
+ var switchHeightMap = {
10943
+ sm: 16,
10944
+ md: 20,
10945
+ lg: 24
10946
+ };
10947
+ var getSizeCss2 = (size) => import_styled_components59.css`
10948
+ --wui-switch-height: ${switchHeightMap[size]}px;
10948
10949
  `;
10949
- var sizeMedium2 = import_styled_components59.css`
10950
- --wui-size-medium-width: 32px;
10951
- --wui-size-medium-height: 18px;
10952
-
10953
- width: var(--wui-size-medium-width);
10954
- height: var(--wui-size-medium-height);
10955
- min-width: var(--wui-size-medium-width);
10956
- min-height: var(--wui-size-medium-height);
10957
- border-radius: calc(var(--wui-size-medium-height) / 2);
10950
+ var StyledSwitchWrapper = import_styled_components59.default.div`
10951
+ ${({ $size }) => getSizeCss2($size)}
10952
+ --wui-switch-border-offset: 4px;
10953
+ --wui-switch-background-color: var(--wui-color-bg-surface-tertiary);
10954
+ --wui-switch-border-color: transparent;
10955
+ --wui-switch-thumb-color: var(--wui-color-icon-on-fill);
10956
+ --wui-switch-thumb-margin-left: 0px;
10957
+ --wui-switch-thumb-size: calc(var(--wui-switch-height) - var(--wui-switch-border-offset));
10958
+ --wui-switch-width: calc(var(--wui-switch-thumb-size) * 2 + var(--wui-switch-border-offset));
10959
+ --wui-switch-thumb-position: 0px;
10960
+ --wui-switch-outline-color: transparent;
10958
10961
 
10959
- &::after {
10960
- width: calc(var(--wui-size-medium-width) / 2);
10961
- height: calc(var(--wui-size-medium-width) / 2);
10962
+ &:has(input:checked) {
10963
+ --wui-switch-background-color: var(--wui-color-bg-fill);
10964
+ --wui-switch-thumb-position: calc(
10965
+ var(--wui-switch-width) - var(--wui-switch-thumb-size) - var(--wui-switch-border-offset)
10966
+ );
10962
10967
  }
10963
- `;
10964
- var sizeLarge2 = import_styled_components59.css`
10965
- --wui-size-large-width: 40px;
10966
- --wui-size-large-height: 22px;
10967
10968
 
10968
- width: var(--wui-size-large-width);
10969
- height: var(--wui-size-large-height);
10970
- min-width: var(--wui-size-large-width);
10971
- min-height: var(--wui-size-large-height);
10972
- border-radius: calc(var(--wui-size-large-height) / 2);
10969
+ &:has(input:disabled) {
10970
+ --wui-switch-background-color: var(--wui-color-bg-surface-tertiary);
10971
+ --wui-switch-thumb-color: var(--wui-color-bg-surface-disabled);
10972
+ }
10973
10973
 
10974
- &::after {
10975
- width: calc(var(--wui-size-large-width) / 2);
10976
- height: calc(var(--wui-size-large-width) / 2);
10974
+ &:has(input:focus-visible) {
10975
+ --wui-switch-outline-color: var(--wui-color-focus-ring);
10977
10976
  }
10978
- `;
10979
- var getSizeCss2 = (size) => {
10980
- if (size === "sm") return sizeSmall2;
10981
- if (size === "lg") return sizeLarge2;
10982
- return sizeMedium2;
10983
- };
10984
- var StyledSwitchWrapper = import_styled_components59.default.div`
10977
+
10985
10978
  display: flex;
10986
10979
  margin: 0;
10987
10980
 
10988
10981
  /* TODO this solves a problem but potentially causes and a11y issue */
10989
10982
  user-select: none;
10990
10983
  `;
10991
- var StyledSwitchInput = import_styled_components59.default.div`
10992
- ${({ $size }) => getSizeCss2($size)}
10993
- line-height: 0;
10994
- margin: 0;
10995
- display: grid;
10996
- place-content: center;
10997
- align-self: flex-start;
10998
- position: relative;
10999
- transition: all 0.2s ease-in-out;
11000
- border-width: 1px;
11001
- border-style: solid;
11002
- border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-border-disabled)" : "var(--wui-color-border)"}; /* "off state" border */
11003
-
11004
- background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface-secondary)"}; /* "off state" background */
11005
-
11006
- &::after {
11007
- content: '';
11008
- position: absolute;
11009
- left: 0;
11010
- top: 50%;
11011
- transform: translateY(-50%);
11012
- border-radius: 50%;
11013
- box-shadow: 1px 0 1px rgb(0 0 0 / 10%); /* "off state" shadow - cast horizontally right */
11014
- background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "off state" dot color */
11015
-
11016
- transition: all 0.2s ease-in-out;
11017
- }
10984
+ var StyledSwitchTrack = import_styled_components59.default.div`
10985
+ width: var(--wui-switch-width);
10986
+ height: var(--wui-switch-height);
10987
+ min-width: var(--wui-switch-width);
10988
+ min-height: var(--wui-switch-height);
10989
+ border-radius: var(--wui-border-radius-rounded);
10990
+ display: flex;
10991
+ align-items: center;
10992
+ outline-width: 2px;
10993
+ outline-offset: 2px;
10994
+ outline-style: solid;
10995
+ outline-color: var(--wui-switch-outline-color);
10996
+ transition:
10997
+ background-color var(--wui-motion-duration-03) var(--wui-motion-ease-out),
10998
+ outline-color var(--wui-motion-duration-03) var(--wui-motion-ease-out);
10999
+ background-color: var(--wui-switch-background-color);
11000
+ padding: calc(var(--wui-switch-border-offset) / 2);
11001
+ margin-top: calc(calc(1lh - var(--wui-switch-height)) / 2);
11002
+ `;
11003
+ var StyledSwitchThumb = import_styled_components59.default.div`
11004
+ border-radius: var(--wui-border-radius-rounded);
11005
+ background-color: var(--wui-switch-thumb-color);
11006
+ transition:
11007
+ margin var(--wui-motion-duration-03) var(--wui-motion-ease-out),
11008
+ background-color var(--wui-motion-duration-03) var(--wui-motion-ease-out);
11009
+ width: var(--wui-switch-thumb-size);
11010
+ height: var(--wui-switch-thumb-size);
11011
+ margin-left: var(--wui-switch-thumb-position);
11018
11012
  `;
11019
11013
  var StyledHiddenSwitchInput = import_styled_components59.default.input`
11020
11014
  ${visuallyHiddenStyle}
11021
-
11022
- /* toggles display of faux-input background-color and toggle position */
11023
- &:checked + label [data-wui-faux-input='true'] {
11024
- border-color: ${({ disabled }) => disabled ? void 0 : "var(--wui-color-bg-fill)"}; /* "on state" border */
11025
-
11026
- background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill)"}; /* "on state" background */
11027
-
11028
- &::after {
11029
- transform: translate(calc(100% - 2px), -50%); /* 2px is the border width */
11030
- box-shadow: -1px 0 1px rgb(0 0 0 / 10%); /* "on state" shadow - cast horizontally left */
11031
- background-color: ${({ disabled }) => disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-fill-white)"}; /* "on state" dot color */
11032
- }
11033
- }
11034
11015
  `;
11035
11016
  var Switch = (0, import_react45.forwardRef)(
11036
11017
  ({
@@ -11050,43 +11031,50 @@ var Switch = (0, import_react45.forwardRef)(
11050
11031
  }, ref) => {
11051
11032
  const generatedId = (0, import_react45.useId)();
11052
11033
  const computedId = (0, import_type_guards34.isNonEmptyString)(id) ? id : `wistia-ui-switch-${generatedId}`;
11053
- return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(StyledSwitchWrapper, { $disabled: disabled, children: [
11054
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11055
- StyledHiddenSwitchInput,
11056
- {
11057
- ...props,
11058
- ref,
11059
- checked,
11060
- disabled,
11061
- id: computedId,
11062
- name,
11063
- onChange,
11064
- required,
11065
- type: "checkbox",
11066
- value
11067
- }
11068
- ),
11069
- /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11070
- FormControlLabel,
11071
- {
11072
- align,
11073
- controlSlot: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11074
- StyledSwitchInput,
11034
+ return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(
11035
+ StyledSwitchWrapper,
11036
+ {
11037
+ $disabled: disabled,
11038
+ $hideLabel: hideLabel,
11039
+ $size: size,
11040
+ children: [
11041
+ /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11042
+ StyledHiddenSwitchInput,
11075
11043
  {
11076
- $disabled: disabled,
11077
- $size: size,
11078
- "data-testid": "wui-faux-input",
11079
- "data-wui-faux-input": "true"
11044
+ ...props,
11045
+ ref,
11046
+ checked,
11047
+ disabled,
11048
+ id: computedId,
11049
+ name,
11050
+ onChange,
11051
+ required,
11052
+ type: "checkbox",
11053
+ value
11080
11054
  }
11081
11055
  ),
11082
- description,
11083
- disabled,
11084
- hideLabel,
11085
- htmlFor: computedId,
11086
- label
11087
- }
11088
- )
11089
- ] });
11056
+ /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11057
+ FormControlLabel,
11058
+ {
11059
+ align,
11060
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(
11061
+ StyledSwitchTrack,
11062
+ {
11063
+ "data-testid": "wui-faux-input",
11064
+ "data-wui-faux-input": "true",
11065
+ children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(StyledSwitchThumb, {})
11066
+ }
11067
+ ),
11068
+ description,
11069
+ disabled,
11070
+ hideLabel,
11071
+ htmlFor: computedId,
11072
+ label
11073
+ }
11074
+ )
11075
+ ]
11076
+ }
11077
+ );
11090
11078
  }
11091
11079
  );
11092
11080
  Switch.displayName = "Switch_UI";
@@ -14757,8 +14745,6 @@ var import_type_guards52 = require("@wistia/type-guards");
14757
14745
  var import_jsx_runtime285 = require("react/jsx-runtime");
14758
14746
  var ProgressBarWrapper = import_styled_components92.default.div`
14759
14747
  --progress-bar-height: 8px;
14760
- --progress-bar-indicator-color: var(--wui-color-bg-fill);
14761
- --progress-bar-background-color: var(--wui-color-bg-surface-secondary);
14762
14748
 
14763
14749
  display: flex;
14764
14750
  align-items: center;
@@ -14780,7 +14766,8 @@ var ProgressBarLabel = import_styled_components92.default.div`
14780
14766
  flex-shrink: 0;
14781
14767
  `;
14782
14768
  var StyledProgressIndicator = (0, import_styled_components92.default)(import_react_progress.Indicator)`
14783
- background-color: var(--progress-bar-indicator-color);
14769
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
14770
+ background-color: var(--wui-color-bg-fill);
14784
14771
  width: 100%;
14785
14772
  height: 100%;
14786
14773
  border-top-right-radius: var(--wui-border-radius-rounded);
@@ -14789,9 +14776,10 @@ var StyledProgressIndicator = (0, import_styled_components92.default)(import_rea
14789
14776
  transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
14790
14777
  `;
14791
14778
  var StyledProgressBar = (0, import_styled_components92.default)(import_react_progress.Root)`
14779
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
14792
14780
  position: relative;
14793
14781
  overflow: hidden;
14794
- background: var(--progress-bar-background-color);
14782
+ background-color: var(--wui-color-bg-surface-secondary);
14795
14783
  border-radius: var(--wui-border-radius-rounded);
14796
14784
  width: 100%;
14797
14785
  height: var(--progress-bar-height);
@@ -14805,6 +14793,7 @@ var ProgressBar = ({
14805
14793
  children,
14806
14794
  labelLeft,
14807
14795
  labelRight,
14796
+ colorScheme = "inherit",
14808
14797
  ...props
14809
14798
  }) => {
14810
14799
  return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(ProgressBarWrapper, { children: [
@@ -14812,12 +14801,14 @@ var ProgressBar = ({
14812
14801
  /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
14813
14802
  StyledProgressBar,
14814
14803
  {
14804
+ $colorScheme: colorScheme,
14815
14805
  max,
14816
14806
  value: progress,
14817
14807
  ...props,
14818
14808
  children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
14819
14809
  StyledProgressIndicator,
14820
14810
  {
14811
+ $colorScheme: colorScheme,
14821
14812
  $max: max,
14822
14813
  $progress: progress
14823
14814
  }
@@ -14834,64 +14825,51 @@ var import_react72 = require("react");
14834
14825
  var import_styled_components93 = __toESM(require("styled-components"));
14835
14826
  var import_type_guards53 = require("@wistia/type-guards");
14836
14827
  var import_jsx_runtime286 = require("react/jsx-runtime");
14837
- var RadioIcon = () => /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
14838
- "svg",
14839
- {
14840
- fill: "inherit",
14841
- height: "1",
14842
- viewBox: "0 0 1 1",
14843
- width: "1",
14844
- xmlns: "http://www.w3.org/2000/svg",
14845
- children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
14846
- "circle",
14847
- {
14848
- cx: "0.5",
14849
- cy: "0.5",
14850
- fill: "currentColor",
14851
- r: "0.5"
14852
- }
14853
- )
14828
+ var sizeSmall2 = import_styled_components93.css`
14829
+ --wui-radio-size: 14px;
14830
+ --wui-radio-icon-size: 7px;
14831
+ `;
14832
+ var sizeMedium2 = import_styled_components93.css`
14833
+ --wui-radio-size: 16px;
14834
+ --wui-radio-icon-size: 8px;
14835
+ `;
14836
+ var sizeLarge2 = import_styled_components93.css`
14837
+ --wui-radio-size: 20px;
14838
+ --wui-radio-icon-size: 10px;
14839
+ `;
14840
+ var getSizeCss3 = (size) => {
14841
+ if (size === "sm") return sizeSmall2;
14842
+ if (size === "lg") return sizeLarge2;
14843
+ return sizeMedium2;
14844
+ };
14845
+ var StyledRadioWrapper = import_styled_components93.default.div`
14846
+ --wui-radio-background-color: var(--wui-color-bg-surface);
14847
+ --wui-radio-border-color: var(--wui-color-border-secondary);
14848
+ --wui-radio-icon-color: transparent;
14849
+ --wui-radio-outline-color: transparent;
14850
+
14851
+ &:hover {
14852
+ --wui-radio-border-color: var(--wui-color-border-secondary-hover);
14854
14853
  }
14855
- );
14856
- var sizeSmall3 = import_styled_components93.css`
14857
- width: 14px;
14858
- height: 14px;
14859
- min-width: 14px;
14860
- min-height: 14px;
14861
14854
 
14862
- svg {
14863
- width: 7px;
14864
- height: 7px;
14855
+ &:has(input:checked) {
14856
+ --wui-radio-border-color: var(--wui-color-focus-ring);
14857
+ --wui-radio-icon-color: var(--wui-color-focus-ring);
14865
14858
  }
14866
- `;
14867
- var sizeMedium3 = import_styled_components93.css`
14868
- width: 16px;
14869
- height: 16px;
14870
- min-width: 16px;
14871
- min-height: 16px;
14872
14859
 
14873
- svg {
14874
- width: 8px;
14875
- height: 8px;
14860
+ &:has(input:focus-visible) {
14861
+ --wui-radio-outline-color: var(--wui-color-focus-ring);
14876
14862
  }
14877
- `;
14878
- var sizeLarge3 = import_styled_components93.css`
14879
- width: 20px;
14880
- height: 20px;
14881
- min-width: 20px;
14882
- min-height: 20px;
14883
14863
 
14884
- svg {
14885
- width: 10px;
14886
- height: 10px;
14864
+ &:has(input:disabled) {
14865
+ --wui-radio-background-color: var(--wui-color-bg-surface-disabled);
14866
+ --wui-radio-border-color: var(--wui-color-border-secondary);
14867
+
14868
+ &:has(input:checked) {
14869
+ --wui-radio-icon-color: var(--wui-color-icon-disabled);
14870
+ }
14887
14871
  }
14888
- `;
14889
- var getSizeCss3 = (size) => {
14890
- if (size === "sm") return sizeSmall3;
14891
- if (size === "lg") return sizeLarge3;
14892
- return sizeMedium3;
14893
- };
14894
- var StyledRadioWrapper = import_styled_components93.default.div`
14872
+
14895
14873
  display: flex;
14896
14874
  margin: 0;
14897
14875
 
@@ -14900,38 +14878,33 @@ var StyledRadioWrapper = import_styled_components93.default.div`
14900
14878
  `;
14901
14879
  var StyledRadioInput = import_styled_components93.default.div`
14902
14880
  ${({ $size }) => getSizeCss3($size)}
14903
- line-height: 0;
14904
- margin: 0;
14905
- border-radius: 50%; /* TODO --wui-border-radius-rounded */
14906
- display: grid;
14907
- place-content: center;
14908
14881
  align-self: flex-start;
14909
- border-width: 1px;
14910
- border-style: solid;
14911
- border-color: ${({ $disabled }) => $disabled ? "var(--wui-color-border-disabled)" : "var(--wui-color-border)"};
14912
- background-color: ${({ $disabled }) => $disabled ? "var(--wui-color-bg-surface-disabled)" : "var(--wui-color-bg-surface)"};
14913
-
14914
- /* radio button circle icon */
14915
- svg {
14916
- display: none;
14882
+ width: var(--wui-radio-size);
14883
+ height: var(--wui-radio-size);
14884
+ min-width: var(--wui-radio-size);
14885
+ min-height: var(--wui-radio-size);
14886
+ background-color: var(--wui-radio-background-color);
14887
+ box-shadow: inset 0 0 0 1px var(--wui-radio-border-color);
14888
+ border-radius: 100%;
14889
+ position: relative;
14890
+ cursor: pointer;
14891
+ transition: box-shadow var(--wui-motion-duration-03) var(--wui-motion-ease);
14892
+ margin-top: calc(calc(1lh - var(--wui-radio-size)) / 2);
14917
14893
 
14918
- circle {
14919
- fill: ${({ $disabled }) => $disabled ? "var(--wui-color-icon-disabled)" : "var(--wui-color-bg-fill)"};
14920
- }
14894
+ &::after {
14895
+ content: '';
14896
+ position: absolute;
14897
+ top: 50%;
14898
+ left: 50%;
14899
+ width: 50%;
14900
+ height: 50%;
14901
+ background-color: var(--wui-radio-icon-color);
14902
+ border-radius: 100%;
14903
+ transform: translate(-50%, -50%);
14921
14904
  }
14922
14905
  `;
14923
14906
  var StyledHiddenRadioInput = import_styled_components93.default.input`
14924
14907
  ${visuallyHiddenStyle}
14925
-
14926
- /* toggles display of faux-input border-color */
14927
- &:checked + label [data-wui-faux-input='true'] {
14928
- border-color: ${({ disabled }) => disabled ? "var(--wui-color-border-disabled)" : "var(--wui-color-bg-fill)"};
14929
- }
14930
-
14931
- /* toggles display of RadioIcon */
14932
- &:checked + label svg {
14933
- display: block;
14934
- }
14935
14908
  `;
14936
14909
  var Radio = (0, import_react72.forwardRef)(
14937
14910
  ({
@@ -14961,6 +14934,7 @@ var Radio = (0, import_react72.forwardRef)(
14961
14934
  StyledRadioWrapper,
14962
14935
  {
14963
14936
  $disabled: disabled,
14937
+ $hideLabel: hideLabel,
14964
14938
  "aria-invalid": props["aria-invalid"],
14965
14939
  children: [
14966
14940
  /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
@@ -14981,15 +14955,7 @@ var Radio = (0, import_react72.forwardRef)(
14981
14955
  /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
14982
14956
  FormControlLabel,
14983
14957
  {
14984
- controlSlot: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
14985
- StyledRadioInput,
14986
- {
14987
- $disabled: disabled,
14988
- $size: size,
14989
- "data-wui-faux-input": "true",
14990
- children: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(RadioIcon, {})
14991
- }
14992
- ),
14958
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(StyledRadioInput, { $size: size }),
14993
14959
  description,
14994
14960
  disabled,
14995
14961
  hideLabel,
@@ -17028,6 +16994,87 @@ var ContextMenu = ({
17028
16994
  }
17029
16995
  ) : null;
17030
16996
  };
16997
+
16998
+ // src/components/DataList/DataList.tsx
16999
+ var import_styled_components121 = __toESM(require("styled-components"));
17000
+ var import_jsx_runtime317 = require("react/jsx-runtime");
17001
+ var StyledDataList = import_styled_components121.default.dl`
17002
+ display: grid;
17003
+ grid-template-columns: auto 1fr;
17004
+ column-gap: var(--wui-space-02);
17005
+ row-gap: var(--wui-space-04);
17006
+ align-items: baseline;
17007
+ align-content: start;
17008
+
17009
+ dt {
17010
+ margin: 0;
17011
+ padding: 0;
17012
+ font-weight: var(--wui-datalist-label-prominence);
17013
+ width: var(--wui-datalist-label-max-width, auto);
17014
+ }
17015
+
17016
+ dd {
17017
+ margin: 0;
17018
+ padding: 0;
17019
+ text-align: var(--wui-datalist-value-alignment, start);
17020
+ }
17021
+ `;
17022
+ var DataList = ({
17023
+ children,
17024
+ valueAlignment = "start",
17025
+ labelMaxWith = "auto",
17026
+ labelProminence = "primary",
17027
+ ...props
17028
+ }) => {
17029
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
17030
+ StyledDataList,
17031
+ {
17032
+ role: "list",
17033
+ style: {
17034
+ "--wui-datalist-label-max-width": labelMaxWith,
17035
+ "--wui-datalist-value-alignment": valueAlignment === "end" ? "right" : "left",
17036
+ "--wui-datalist-label-prominence": labelProminence === "secondary" ? "var(--wui-typography-weight-label)" : "var(--wui-typography-weight-label-bold)"
17037
+ },
17038
+ ...props,
17039
+ children
17040
+ }
17041
+ );
17042
+ };
17043
+ DataList.displayName = "DataList_UI";
17044
+
17045
+ // src/components/DataList/DataListItem.tsx
17046
+ var DataListItem = ({ children }) => {
17047
+ return children;
17048
+ };
17049
+ DataListItem.displayName = "DataListItem_UI";
17050
+
17051
+ // src/components/DataList/DataListItemLabel.tsx
17052
+ var import_jsx_runtime318 = require("react/jsx-runtime");
17053
+ var DataListItemLabel = (props) => {
17054
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
17055
+ Text,
17056
+ {
17057
+ variant: "label4",
17058
+ ...props,
17059
+ renderAs: "dt"
17060
+ }
17061
+ );
17062
+ };
17063
+ DataListItemLabel.displayName = "DataListItemLabel_UI";
17064
+
17065
+ // src/components/DataList/DataListItemValue.tsx
17066
+ var import_jsx_runtime319 = require("react/jsx-runtime");
17067
+ var DataListItemValue = (props) => {
17068
+ return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
17069
+ Text,
17070
+ {
17071
+ variant: "body3",
17072
+ ...props,
17073
+ renderAs: "dd"
17074
+ }
17075
+ );
17076
+ };
17077
+ DataListItemValue.displayName = "DataListItemValue_UI";
17031
17078
  // Annotate the CommonJS export names for ESM import in node:
17032
17079
  0 && (module.exports = {
17033
17080
  ActionButton,
@@ -17067,6 +17114,10 @@ var ContextMenu = ({
17067
17114
  DataCardHoverArrow,
17068
17115
  DataCardTrend,
17069
17116
  DataCards,
17117
+ DataList,
17118
+ DataListItem,
17119
+ DataListItemLabel,
17120
+ DataListItemValue,
17070
17121
  Divider,
17071
17122
  EditableHeading,
17072
17123
  Ellipsis,