@wistia/ui 0.14.13 → 0.14.15-beta.6218615.47e3d33

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.6218615.47e3d33
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,13 @@ 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);
9084
+
9081
9085
  justify-content: ${({ $align }) => $align === "left" ? "flex-start" : "space-between"};
9082
9086
 
9083
9087
  ${({ $disabled }) => $disabled && disabledStyle2}
@@ -9381,43 +9385,22 @@ var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9381
9385
  "path",
9382
9386
  {
9383
9387
  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"
9388
+ fill: "var(--wui-checkbox-icon-color)"
9385
9389
  }
9386
9390
  )
9387
9391
  }
9388
9392
  );
9389
9393
  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
- }
9394
+ --wui-checkbox-size: 14px;
9395
+ --wui-checkbox-icon-size: 7px;
9399
9396
  `;
9400
9397
  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
- }
9398
+ --wui-checkbox-size: 16px;
9399
+ --wui-checkbox-icon-size: 9px;
9410
9400
  `;
9411
9401
  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
- }
9402
+ --wui-checkbox-size: 20px;
9403
+ --wui-checkbox-icon-size: 11px;
9421
9404
  `;
9422
9405
  var getSizeCss = (size) => {
9423
9406
  if (size === "sm") return sizeSmall;
@@ -9425,15 +9408,45 @@ var getSizeCss = (size) => {
9425
9408
  return sizeMedium;
9426
9409
  };
9427
9410
  var StyledCheckboxWrapper = import_styled_components43.default.div`
9411
+ --wui-checkbox-background-color: var(--wui-color-bg-surface);
9412
+ --wui-checkbox-border-color: var(--wui-color-border-secondary);
9413
+ --wui-checkbox-icon-color: transparent;
9414
+ --wui-checkbox-outline-color: transparent;
9415
+
9416
+ &:hover {
9417
+ --wui-checkbox-border-color: var(--wui-color-border-secondary-hover);
9418
+ }
9419
+
9420
+ &:has(input:checked) {
9421
+ --wui-checkbox-background-color: var(--wui-color-bg-fill);
9422
+ --wui-checkbox-border-color: transparent;
9423
+ --wui-checkbox-icon-color: var(--wui-color-bg-fill-white);
9424
+ }
9425
+
9426
+ &:has(input:disabled) {
9427
+ --wui-checkbox-background-color: var(--wui-color-bg-surface-disabled);
9428
+ --wui-checkbox-border-color: var(--wui-color-border-disabled);
9429
+ &:has(input:checked) {
9430
+ --wui-checkbox-icon-color: var(--wui-color-icon-disabled);
9431
+ }
9432
+ }
9433
+
9434
+ &:has(input:focus-visible) {
9435
+ [data-wui-faux-input='true'] {
9436
+ --wui-checkbox-outline-color: var(--wui-color-focus-ring);
9437
+ }
9438
+ }
9439
+
9428
9440
  display: flex;
9429
9441
  margin: 0;
9430
9442
 
9443
+ padding: ${({ $hideLabel }) => $hideLabel ? "0" : "var(--wui-space-02)"};
9444
+
9431
9445
  /* TODO this solves a problem but potentially causes and a11y issue */
9432
9446
  user-select: none;
9433
9447
  `;
9434
9448
  var StyledCheckboxInput = import_styled_components43.default.div`
9435
9449
  ${({ $size }) => getSizeCss($size)}
9436
- line-height: 0;
9437
9450
  margin: 0;
9438
9451
  border-radius: var(--wui-border-radius-01);
9439
9452
  display: grid;
@@ -9441,31 +9454,26 @@ var StyledCheckboxInput = import_styled_components43.default.div`
9441
9454
  align-self: flex-start;
9442
9455
  border-width: 1px;
9443
9456
  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)"};
9457
+ border-color: var(--wui-checkbox-border-color);
9458
+ background-color: var(--wui-checkbox-background-color);
9459
+ outline-color: var(--wui-checkbox-outline-color);
9460
+ outline-width: 2px;
9461
+ outline-style: solid;
9462
+ outline-offset: 1px;
9463
+ transition: all var(--wui-motion-duration-01) var(--wui-motion-ease);
9464
+ margin-top: calc(calc(1lh - var(--wui-checkbox-size)) / 2);
9465
+ width: var(--wui-checkbox-size);
9466
+ height: var(--wui-checkbox-size);
9467
+ min-width: var(--wui-checkbox-size);
9468
+ min-height: var(--wui-checkbox-size);
9446
9469
 
9447
- /* checkmark icon */
9448
9470
  svg {
9449
- display: none;
9450
-
9451
- path {
9452
- fill: ${({ $disabled }) => $disabled ? "var(--wui-color-icon-disabled)" : "var(--wui-color-bg-fill-white)"};
9453
- }
9471
+ width: var(--wui-checkbox-icon-size);
9472
+ height: var(--wui-checkbox-icon-size);
9454
9473
  }
9455
9474
  `;
9456
9475
  var StyledHiddenCheckboxInput = import_styled_components43.default.input`
9457
9476
  ${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
9477
  `;
9470
9478
  var Checkbox = (0, import_react38.forwardRef)(
9471
9479
  ({
@@ -9491,42 +9499,49 @@ var Checkbox = (0, import_react38.forwardRef)(
9491
9499
  const checkboxName = name ?? contextName;
9492
9500
  const handleOnChange = onChange ?? contextOnChange;
9493
9501
  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,
9502
+ return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
9503
+ StyledCheckboxWrapper,
9504
+ {
9505
+ $hideLabel: hideLabel,
9506
+ disabled,
9507
+ children: [
9508
+ /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9509
+ StyledHiddenCheckboxInput,
9515
9510
  {
9516
- $disabled: disabled,
9517
- $size: size,
9518
- "data-wui-faux-input": "true",
9519
- children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(CheckIcon, {})
9511
+ ...props,
9512
+ ref,
9513
+ checked: isChecked,
9514
+ disabled,
9515
+ id: computedId,
9516
+ name: checkboxName,
9517
+ onChange: handleOnChange,
9518
+ required,
9519
+ type: "checkbox",
9520
+ value
9520
9521
  }
9521
9522
  ),
9522
- description,
9523
- disabled,
9524
- hideLabel,
9525
- htmlFor: computedId,
9526
- label
9527
- }
9528
- )
9529
- ] });
9523
+ /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9524
+ FormControlLabel,
9525
+ {
9526
+ controlSlot: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9527
+ StyledCheckboxInput,
9528
+ {
9529
+ $disabled: disabled,
9530
+ $size: size,
9531
+ "data-wui-faux-input": "true",
9532
+ children: /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(CheckIcon, {})
9533
+ }
9534
+ ),
9535
+ description,
9536
+ disabled,
9537
+ hideLabel,
9538
+ htmlFor: computedId,
9539
+ label
9540
+ }
9541
+ )
9542
+ ]
9543
+ }
9544
+ );
9530
9545
  }
9531
9546
  );
9532
9547
  Checkbox.displayName = "Checkbox_UI";
@@ -14757,8 +14772,6 @@ var import_type_guards52 = require("@wistia/type-guards");
14757
14772
  var import_jsx_runtime285 = require("react/jsx-runtime");
14758
14773
  var ProgressBarWrapper = import_styled_components92.default.div`
14759
14774
  --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
14775
 
14763
14776
  display: flex;
14764
14777
  align-items: center;
@@ -14780,7 +14793,8 @@ var ProgressBarLabel = import_styled_components92.default.div`
14780
14793
  flex-shrink: 0;
14781
14794
  `;
14782
14795
  var StyledProgressIndicator = (0, import_styled_components92.default)(import_react_progress.Indicator)`
14783
- background-color: var(--progress-bar-indicator-color);
14796
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
14797
+ background-color: var(--wui-color-bg-fill);
14784
14798
  width: 100%;
14785
14799
  height: 100%;
14786
14800
  border-top-right-radius: var(--wui-border-radius-rounded);
@@ -14789,9 +14803,10 @@ var StyledProgressIndicator = (0, import_styled_components92.default)(import_rea
14789
14803
  transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
14790
14804
  `;
14791
14805
  var StyledProgressBar = (0, import_styled_components92.default)(import_react_progress.Root)`
14806
+ ${({ $colorScheme }) => getColorScheme($colorScheme)}
14792
14807
  position: relative;
14793
14808
  overflow: hidden;
14794
- background: var(--progress-bar-background-color);
14809
+ background-color: var(--wui-color-bg-surface-secondary);
14795
14810
  border-radius: var(--wui-border-radius-rounded);
14796
14811
  width: 100%;
14797
14812
  height: var(--progress-bar-height);
@@ -14805,6 +14820,7 @@ var ProgressBar = ({
14805
14820
  children,
14806
14821
  labelLeft,
14807
14822
  labelRight,
14823
+ colorScheme = "inherit",
14808
14824
  ...props
14809
14825
  }) => {
14810
14826
  return /* @__PURE__ */ (0, import_jsx_runtime285.jsxs)(ProgressBarWrapper, { children: [
@@ -14812,12 +14828,14 @@ var ProgressBar = ({
14812
14828
  /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
14813
14829
  StyledProgressBar,
14814
14830
  {
14831
+ $colorScheme: colorScheme,
14815
14832
  max,
14816
14833
  value: progress,
14817
14834
  ...props,
14818
14835
  children: /* @__PURE__ */ (0, import_jsx_runtime285.jsx)(
14819
14836
  StyledProgressIndicator,
14820
14837
  {
14838
+ $colorScheme: colorScheme,
14821
14839
  $max: max,
14822
14840
  $progress: progress
14823
14841
  }
@@ -17028,6 +17046,87 @@ var ContextMenu = ({
17028
17046
  }
17029
17047
  ) : null;
17030
17048
  };
17049
+
17050
+ // src/components/DataList/DataList.tsx
17051
+ var import_styled_components121 = __toESM(require("styled-components"));
17052
+ var import_jsx_runtime317 = require("react/jsx-runtime");
17053
+ var StyledDataList = import_styled_components121.default.dl`
17054
+ display: grid;
17055
+ grid-template-columns: auto 1fr;
17056
+ column-gap: var(--wui-space-02);
17057
+ row-gap: var(--wui-space-04);
17058
+ align-items: baseline;
17059
+ align-content: start;
17060
+
17061
+ dt {
17062
+ margin: 0;
17063
+ padding: 0;
17064
+ font-weight: var(--wui-datalist-label-prominence);
17065
+ width: var(--wui-datalist-label-max-width, auto);
17066
+ }
17067
+
17068
+ dd {
17069
+ margin: 0;
17070
+ padding: 0;
17071
+ text-align: var(--wui-datalist-value-alignment, start);
17072
+ }
17073
+ `;
17074
+ var DataList = ({
17075
+ children,
17076
+ valueAlignment = "start",
17077
+ labelMaxWith = "auto",
17078
+ labelProminence = "primary",
17079
+ ...props
17080
+ }) => {
17081
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
17082
+ StyledDataList,
17083
+ {
17084
+ role: "list",
17085
+ style: {
17086
+ "--wui-datalist-label-max-width": labelMaxWith,
17087
+ "--wui-datalist-value-alignment": valueAlignment === "end" ? "right" : "left",
17088
+ "--wui-datalist-label-prominence": labelProminence === "secondary" ? "var(--wui-typography-weight-label)" : "var(--wui-typography-weight-label-bold)"
17089
+ },
17090
+ ...props,
17091
+ children
17092
+ }
17093
+ );
17094
+ };
17095
+ DataList.displayName = "DataList_UI";
17096
+
17097
+ // src/components/DataList/DataListItem.tsx
17098
+ var DataListItem = ({ children }) => {
17099
+ return children;
17100
+ };
17101
+ DataListItem.displayName = "DataListItem_UI";
17102
+
17103
+ // src/components/DataList/DataListItemLabel.tsx
17104
+ var import_jsx_runtime318 = require("react/jsx-runtime");
17105
+ var DataListItemLabel = (props) => {
17106
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
17107
+ Text,
17108
+ {
17109
+ variant: "label4",
17110
+ ...props,
17111
+ renderAs: "dt"
17112
+ }
17113
+ );
17114
+ };
17115
+ DataListItemLabel.displayName = "DataListItemLabel_UI";
17116
+
17117
+ // src/components/DataList/DataListItemValue.tsx
17118
+ var import_jsx_runtime319 = require("react/jsx-runtime");
17119
+ var DataListItemValue = (props) => {
17120
+ return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
17121
+ Text,
17122
+ {
17123
+ variant: "body3",
17124
+ ...props,
17125
+ renderAs: "dd"
17126
+ }
17127
+ );
17128
+ };
17129
+ DataListItemValue.displayName = "DataListItemValue_UI";
17031
17130
  // Annotate the CommonJS export names for ESM import in node:
17032
17131
  0 && (module.exports = {
17033
17132
  ActionButton,
@@ -17067,6 +17166,10 @@ var ContextMenu = ({
17067
17166
  DataCardHoverArrow,
17068
17167
  DataCardTrend,
17069
17168
  DataCards,
17169
+ DataList,
17170
+ DataListItem,
17171
+ DataListItemLabel,
17172
+ DataListItemValue,
17070
17173
  Divider,
17071
17174
  EditableHeading,
17072
17175
  Ellipsis,