@wistia/ui 0.14.8 → 0.14.9-beta.228fbd19.a9151aa

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.8
3
+ * @license @wistia/ui v0.14.9-beta.228fbd19.a9151aa
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,
@@ -14277,6 +14281,13 @@ var Header = import_styled_components86.default.header`
14277
14281
  /* DialogTitle creates an h2 element which inherits some margin */
14278
14282
  h2 {
14279
14283
  margin: 0 0 var(--wui-space-03);
14284
+ padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
14285
+ }
14286
+
14287
+ button {
14288
+ position: absolute;
14289
+ right: var(--wui-space-03);
14290
+ top: var(--wui-space-03);
14280
14291
  }
14281
14292
  `;
14282
14293
  var Title = (0, import_styled_components86.default)(import_react_dialog2.Title)`
@@ -14291,10 +14302,17 @@ var ModalHeader = ({
14291
14302
  hideCloseButton
14292
14303
  }) => {
14293
14304
  const TitleComponent = hideTitle ? /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(ScreenReaderOnly, { children: /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Title, { children: title }) }) : /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(Title, { children: title });
14294
- return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(Header, { $hideTitle: hideTitle, children: [
14295
- TitleComponent,
14296
- hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(ModalCloseButton, {})
14297
- ] });
14305
+ return /* @__PURE__ */ (0, import_jsx_runtime280.jsxs)(
14306
+ Header,
14307
+ {
14308
+ $hideCloseButon: hideCloseButton,
14309
+ $hideTitle: hideTitle,
14310
+ children: [
14311
+ TitleComponent,
14312
+ hideCloseButton ? null : /* @__PURE__ */ (0, import_jsx_runtime280.jsx)(ModalCloseButton, {})
14313
+ ]
14314
+ }
14315
+ );
14298
14316
  };
14299
14317
 
14300
14318
  // src/components/Modal/ModalContent.tsx
@@ -14548,7 +14566,7 @@ var Modal = (0, import_react71.forwardRef)(
14548
14566
  ...props,
14549
14567
  children: [
14550
14568
  /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(ModalBody, { children }),
14551
- /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14569
+ hideCloseButton && hideTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime282.jsx)(
14552
14570
  ModalHeader,
14553
14571
  {
14554
14572
  hideCloseButton,
@@ -16996,6 +17014,86 @@ var ContextMenu = ({
16996
17014
  }
16997
17015
  ) : null;
16998
17016
  };
17017
+
17018
+ // src/components/DataList/DataList.tsx
17019
+ var import_styled_components120 = __toESM(require("styled-components"));
17020
+ var import_jsx_runtime317 = require("react/jsx-runtime");
17021
+ var StyledDataList = import_styled_components120.default.dl`
17022
+ display: grid;
17023
+ grid-template-columns: auto 1fr;
17024
+ column-gap: var(--wui-space-02);
17025
+ row-gap: var(--wui-space-04);
17026
+ align-items: baseline;
17027
+ align-content: start;
17028
+
17029
+ dt {
17030
+ margin: 0;
17031
+ padding: 0;
17032
+ font-weight: var(--wui-datalist-label-prominence);
17033
+ width: var(--wui-datalist-label-max-width, auto);
17034
+ }
17035
+
17036
+ dd {
17037
+ margin: 0;
17038
+ padding: 0;
17039
+ text-align: var(--wui-datalist-value-alignment, start);
17040
+ }
17041
+ `;
17042
+ var DataList = ({
17043
+ children,
17044
+ valueAlignment = "start",
17045
+ labelMaxWith = "auto",
17046
+ labelProminence = "primary",
17047
+ ...props
17048
+ }) => {
17049
+ return /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
17050
+ StyledDataList,
17051
+ {
17052
+ style: {
17053
+ "--wui-datalist-label-max-width": labelMaxWith,
17054
+ "--wui-datalist-value-alignment": valueAlignment === "end" ? "right" : "left",
17055
+ "--wui-datalist-label-prominence": labelProminence === "secondary" ? "var(--wui-typography-weight-label)" : "var(--wui-typography-weight-label-bold)"
17056
+ },
17057
+ ...props,
17058
+ children
17059
+ }
17060
+ );
17061
+ };
17062
+ DataList.displayName = "DataList_UI";
17063
+
17064
+ // src/components/DataList/DataListItem.tsx
17065
+ var DataListItem = ({ children }) => {
17066
+ return children;
17067
+ };
17068
+ DataListItem.displayName = "DataListItem_UI";
17069
+
17070
+ // src/components/DataList/DataListItemLabel.tsx
17071
+ var import_jsx_runtime318 = require("react/jsx-runtime");
17072
+ var DataListItemLabel = (props) => {
17073
+ return /* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
17074
+ Text,
17075
+ {
17076
+ variant: "label4",
17077
+ ...props,
17078
+ renderAs: "dt"
17079
+ }
17080
+ );
17081
+ };
17082
+ DataListItemLabel.displayName = "DataListItemLabel_UI";
17083
+
17084
+ // src/components/DataList/DataListItemValue.tsx
17085
+ var import_jsx_runtime319 = require("react/jsx-runtime");
17086
+ var DataListItemValue = (props) => {
17087
+ return /* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
17088
+ Text,
17089
+ {
17090
+ variant: "body3",
17091
+ ...props,
17092
+ renderAs: "dd"
17093
+ }
17094
+ );
17095
+ };
17096
+ DataListItemValue.displayName = "DataListItemValue_UI";
16999
17097
  // Annotate the CommonJS export names for ESM import in node:
17000
17098
  0 && (module.exports = {
17001
17099
  ActionButton,
@@ -17035,6 +17133,10 @@ var ContextMenu = ({
17035
17133
  DataCardHoverArrow,
17036
17134
  DataCardTrend,
17037
17135
  DataCards,
17136
+ DataList,
17137
+ DataListItem,
17138
+ DataListItemLabel,
17139
+ DataListItemValue,
17038
17140
  Divider,
17039
17141
  EditableHeading,
17040
17142
  Ellipsis,