@wistia/ui 0.14.11 → 0.14.12-beta.60f2930b.c8e9b9c

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.11
3
+ * @license @wistia/ui v0.14.12-beta.60f2930b.c8e9b9c
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,
@@ -9490,14 +9494,14 @@ var Checkbox = (0, import_react38.forwardRef)(
9490
9494
  const contextValue = checkboxGroupContext?.value;
9491
9495
  const checkboxName = name ?? contextName;
9492
9496
  const handleOnChange = onChange ?? contextOnChange;
9493
- const defaultChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : void 0;
9497
+ const isChecked = (0, import_type_guards31.isNotUndefined)(value) && contextValue ? contextValue.includes(value) : checked;
9494
9498
  return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(StyledCheckboxWrapper, { disabled, children: [
9495
9499
  /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
9496
9500
  StyledHiddenCheckboxInput,
9497
9501
  {
9498
9502
  ...props,
9499
9503
  ref,
9500
- ...(0, import_type_guards31.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked },
9504
+ checked: isChecked,
9501
9505
  disabled,
9502
9506
  id: computedId,
9503
9507
  name: checkboxName,
@@ -14945,7 +14949,7 @@ var Radio = (0, import_react72.forwardRef)(
14945
14949
  const contextValue = radioGroupContext?.value;
14946
14950
  const radioName = name ?? contextName;
14947
14951
  const handleOnChange = onChange ?? contextOnChange;
14948
- const defaultChecked = (0, import_type_guards53.isNotUndefined)(value) && (0, import_type_guards53.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
14952
+ const isChecked = (0, import_type_guards53.isNotUndefined)(value) && (0, import_type_guards53.isNotUndefined)(contextValue) ? contextValue === value : checked;
14949
14953
  return /* @__PURE__ */ (0, import_jsx_runtime286.jsxs)(
14950
14954
  StyledRadioWrapper,
14951
14955
  {
@@ -14957,14 +14961,14 @@ var Radio = (0, import_react72.forwardRef)(
14957
14961
  {
14958
14962
  ...props,
14959
14963
  ref,
14964
+ checked: isChecked,
14960
14965
  disabled,
14961
14966
  id: computedId,
14962
14967
  name: radioName,
14963
14968
  onChange: handleOnChange,
14964
14969
  required,
14965
14970
  type: "radio",
14966
- value,
14967
- ...(0, import_type_guards53.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
14971
+ value
14968
14972
  }
14969
14973
  ),
14970
14974
  /* @__PURE__ */ (0, import_jsx_runtime286.jsx)(
@@ -15128,7 +15132,7 @@ var RadioCardRoot = (0, import_react73.forwardRef)(
15128
15132
  const contextValue = radioGroupContext?.value;
15129
15133
  const radioName = name ?? contextName;
15130
15134
  const handleOnChange = onChange ?? contextOnChange;
15131
- const defaultChecked = (0, import_type_guards54.isNotUndefined)(value) && (0, import_type_guards54.isNotUndefined)(contextValue) ? contextValue.includes(value) : void 0;
15135
+ const isChecked = (0, import_type_guards54.isNotUndefined)(value) && (0, import_type_guards54.isNotUndefined)(contextValue) ? contextValue === value : checked;
15132
15136
  return /* @__PURE__ */ (0, import_jsx_runtime287.jsxs)(
15133
15137
  StyledCard2,
15134
15138
  {
@@ -15141,13 +15145,13 @@ var RadioCardRoot = (0, import_react73.forwardRef)(
15141
15145
  {
15142
15146
  ...props,
15143
15147
  ref,
15148
+ checked: isChecked,
15144
15149
  disabled,
15145
15150
  id: computedId,
15146
15151
  name: radioName,
15147
15152
  onChange: handleOnChange,
15148
15153
  type: "radio",
15149
- value,
15150
- ...(0, import_type_guards54.isNotUndefined)(defaultChecked) ? { defaultChecked } : { checked }
15154
+ value
15151
15155
  }
15152
15156
  ),
15153
15157
  children
@@ -17017,6 +17021,86 @@ var ContextMenu = ({
17017
17021
  }
17018
17022
  ) : null;
17019
17023
  };
17024
+
17025
+ // src/components/DataList/DataList.tsx
17026
+ var import_styled_components121 = __toESM(require("styled-components"));
17027
+ var import_jsx_runtime317 = require("react/jsx-runtime");
17028
+ var StyledDataList = import_styled_components121.default.dl`
17029
+ display: grid;
17030
+ grid-template-columns: auto 1fr;
17031
+ column-gap: var(--wui-space-02);
17032
+ row-gap: var(--wui-space-04);
17033
+ align-items: baseline;
17034
+ align-content: start;
17035
+
17036
+ dt {
17037
+ margin: 0;
17038
+ padding: 0;
17039
+ font-weight: var(--wui-datalist-label-prominence);
17040
+ width: var(--wui-datalist-label-max-width, auto);
17041
+ }
17042
+
17043
+ dd {
17044
+ margin: 0;
17045
+ padding: 0;
17046
+ text-align: var(--wui-datalist-value-alignment, start);
17047
+ }
17048
+ `;
17049
+ var DataList = ({
17050
+ children,
17051
+ valueAlignment = "start",
17052
+ labelMaxWith = "auto",
17053
+ labelProminence = "primary",
17054
+ ...props
17055
+ }) => {
17056
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
17057
+ StyledDataList,
17058
+ {
17059
+ style: {
17060
+ "--wui-datalist-label-max-width": labelMaxWith,
17061
+ "--wui-datalist-value-alignment": valueAlignment === "end" ? "right" : "left",
17062
+ "--wui-datalist-label-prominence": labelProminence === "secondary" ? "var(--wui-typography-weight-label)" : "var(--wui-typography-weight-label-bold)"
17063
+ },
17064
+ ...props,
17065
+ children
17066
+ }
17067
+ );
17068
+ };
17069
+ DataList.displayName = "DataList_UI";
17070
+
17071
+ // src/components/DataList/DataListItem.tsx
17072
+ var DataListItem = ({ children }) => {
17073
+ return children;
17074
+ };
17075
+ DataListItem.displayName = "DataListItem_UI";
17076
+
17077
+ // src/components/DataList/DataListItemLabel.tsx
17078
+ var import_jsx_runtime318 = require("react/jsx-runtime");
17079
+ var DataListItemLabel = (props) => {
17080
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
17081
+ Text,
17082
+ {
17083
+ variant: "label4",
17084
+ ...props,
17085
+ renderAs: "dt"
17086
+ }
17087
+ );
17088
+ };
17089
+ DataListItemLabel.displayName = "DataListItemLabel_UI";
17090
+
17091
+ // src/components/DataList/DataListItemValue.tsx
17092
+ var import_jsx_runtime319 = require("react/jsx-runtime");
17093
+ var DataListItemValue = (props) => {
17094
+ return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
17095
+ Text,
17096
+ {
17097
+ variant: "body3",
17098
+ ...props,
17099
+ renderAs: "dd"
17100
+ }
17101
+ );
17102
+ };
17103
+ DataListItemValue.displayName = "DataListItemValue_UI";
17020
17104
  // Annotate the CommonJS export names for ESM import in node:
17021
17105
  0 && (module.exports = {
17022
17106
  ActionButton,
@@ -17056,6 +17140,10 @@ var ContextMenu = ({
17056
17140
  DataCardHoverArrow,
17057
17141
  DataCardTrend,
17058
17142
  DataCards,
17143
+ DataList,
17144
+ DataListItem,
17145
+ DataListItemLabel,
17146
+ DataListItemValue,
17059
17147
  Divider,
17060
17148
  EditableHeading,
17061
17149
  Ellipsis,