@uniformdev/design-system 19.79.1-alpha.11 → 19.81.1

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/esm/index.js CHANGED
@@ -16144,7 +16144,7 @@ var MediaCard = ({
16144
16144
  e.stopPropagation();
16145
16145
  }, []);
16146
16146
  const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
16147
- return /* @__PURE__ */ jsxs58(Card, { css: cardBase, ...cardProps, onClick, "data-testId": "card-item", children: [
16147
+ return /* @__PURE__ */ jsxs58(Card, { css: cardBase, ...cardProps, onClick, "data-testid": "card-item", children: [
16148
16148
  /* @__PURE__ */ jsx88("button", { tabIndex: -1, css: coverWrapper, children: cover }),
16149
16149
  /* @__PURE__ */ jsx88("div", { css: contentWrapper, children: /* @__PURE__ */ jsxs58(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
16150
16150
  /* @__PURE__ */ jsxs58(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
@@ -16182,7 +16182,7 @@ var MediaCard = ({
16182
16182
  type: "button",
16183
16183
  "aria-label": "More options",
16184
16184
  css: menuButton,
16185
- "data-testId": "button-more",
16185
+ "data-testid": "button-more",
16186
16186
  children: /* @__PURE__ */ jsx88(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
16187
16187
  }
16188
16188
  ),
@@ -16286,6 +16286,12 @@ var Modal = React19.forwardRef(
16286
16286
  });
16287
16287
  useEffect10(() => {
16288
16288
  var _a;
16289
+ if (!document.contains(dialogRef.current)) {
16290
+ console.warn(
16291
+ "The Modal component could not be rendered because it's not attached to the current Document."
16292
+ );
16293
+ return;
16294
+ }
16289
16295
  (_a = dialogRef.current) == null ? void 0 : _a.showModal();
16290
16296
  return () => {
16291
16297
  var _a2;
package/dist/index.d.mts CHANGED
@@ -22243,29 +22243,12 @@ type ModalProps = {
22243
22243
  withoutContentPadding?: boolean;
22244
22244
  /** Places buttons at the bottom of the modal */
22245
22245
  buttonGroup?: ReactNode;
22246
- } & React__default.HTMLAttributes<HTMLDialogElement>;
22246
+ } & React__default.HTMLProps<HTMLDialogElement>;
22247
22247
  /**
22248
22248
  * A modal component to open a dialog with a backdrop that covers the whole page.
22249
22249
  * @example <Modal>Hello World</Modal>
22250
22250
  */
22251
- declare const Modal: React__default.ForwardRefExoticComponent<{
22252
- header?: React__default.ReactNode;
22253
- children?: React__default.ReactNode;
22254
- /** Called when the close button is clicked, the Escape button is pressed, or when the modal's backdrop is clicked */
22255
- onRequestClose: () => void;
22256
- /** A valid CSS width */
22257
- width?: string | undefined;
22258
- /** A valid CSS height */
22259
- height?: string | undefined;
22260
- /** The classname to set on the wrapper of the modal.
22261
- * @deprecated the dialog is not rendered inside a wrapper anymore.
22262
- */
22263
- wrapperClassName?: string | undefined;
22264
- /** Removes the default padding on the content wrapper */
22265
- withoutContentPadding?: boolean | undefined;
22266
- /** Places buttons at the bottom of the modal */
22267
- buttonGroup?: ReactNode;
22268
- } & React__default.HTMLAttributes<HTMLDialogElement> & React__default.RefAttributes<HTMLDialogElement>>;
22251
+ declare const Modal: React__default.ForwardRefExoticComponent<Omit<ModalProps, "ref"> & React__default.RefAttributes<HTMLDialogElement>>;
22269
22252
 
22270
22253
  declare function Pagination({ limit, offset, total, onPageChange, }: {
22271
22254
  limit: number;
package/dist/index.d.ts CHANGED
@@ -22243,29 +22243,12 @@ type ModalProps = {
22243
22243
  withoutContentPadding?: boolean;
22244
22244
  /** Places buttons at the bottom of the modal */
22245
22245
  buttonGroup?: ReactNode;
22246
- } & React__default.HTMLAttributes<HTMLDialogElement>;
22246
+ } & React__default.HTMLProps<HTMLDialogElement>;
22247
22247
  /**
22248
22248
  * A modal component to open a dialog with a backdrop that covers the whole page.
22249
22249
  * @example <Modal>Hello World</Modal>
22250
22250
  */
22251
- declare const Modal: React__default.ForwardRefExoticComponent<{
22252
- header?: React__default.ReactNode;
22253
- children?: React__default.ReactNode;
22254
- /** Called when the close button is clicked, the Escape button is pressed, or when the modal's backdrop is clicked */
22255
- onRequestClose: () => void;
22256
- /** A valid CSS width */
22257
- width?: string | undefined;
22258
- /** A valid CSS height */
22259
- height?: string | undefined;
22260
- /** The classname to set on the wrapper of the modal.
22261
- * @deprecated the dialog is not rendered inside a wrapper anymore.
22262
- */
22263
- wrapperClassName?: string | undefined;
22264
- /** Removes the default padding on the content wrapper */
22265
- withoutContentPadding?: boolean | undefined;
22266
- /** Places buttons at the bottom of the modal */
22267
- buttonGroup?: ReactNode;
22268
- } & React__default.HTMLAttributes<HTMLDialogElement> & React__default.RefAttributes<HTMLDialogElement>>;
22251
+ declare const Modal: React__default.ForwardRefExoticComponent<Omit<ModalProps, "ref"> & React__default.RefAttributes<HTMLDialogElement>>;
22269
22252
 
22270
22253
  declare function Pagination({ limit, offset, total, onPageChange, }: {
22271
22254
  limit: number;
package/dist/index.js CHANGED
@@ -17936,7 +17936,7 @@ var MediaCard = ({
17936
17936
  e.stopPropagation();
17937
17937
  }, []);
17938
17938
  const hasMenuItems = Array.isArray(menuItems) ? menuItems.length > 0 : Boolean(menuItems);
17939
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Card, { css: cardBase, ...cardProps, onClick, "data-testId": "card-item", children: [
17939
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Card, { css: cardBase, ...cardProps, onClick, "data-testid": "card-item", children: [
17940
17940
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("button", { tabIndex: -1, css: coverWrapper, children: cover }),
17941
17941
  /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { css: contentWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(HorizontalRhythm, { gap: "sm", justify: "space-between", align: "center", css: { width: "100%" }, children: [
17942
17942
  /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(VerticalRhythm, { gap: "0", align: "flex-start", css: { flex: 1, minWidth: 0 }, children: [
@@ -17974,7 +17974,7 @@ var MediaCard = ({
17974
17974
  type: "button",
17975
17975
  "aria-label": "More options",
17976
17976
  css: menuButton,
17977
- "data-testId": "button-more",
17977
+ "data-testid": "button-more",
17978
17978
  children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { icon: "more-alt", iconColor: "gray", size: 16 })
17979
17979
  }
17980
17980
  ),
@@ -18080,6 +18080,12 @@ var Modal = import_react99.default.forwardRef(
18080
18080
  });
18081
18081
  (0, import_react99.useEffect)(() => {
18082
18082
  var _a;
18083
+ if (!document.contains(dialogRef.current)) {
18084
+ console.warn(
18085
+ "The Modal component could not be rendered because it's not attached to the current Document."
18086
+ );
18087
+ return;
18088
+ }
18083
18089
  (_a = dialogRef.current) == null ? void 0 : _a.showModal();
18084
18090
  return () => {
18085
18091
  var _a2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.79.1-alpha.11+4547ef846",
3
+ "version": "19.81.1",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "@storybook/react": "6.5.16",
24
24
  "@types/react": "18.2.21",
25
25
  "@types/react-dom": "18.2.7",
26
- "@uniformdev/canvas": "^19.79.1-alpha.11+4547ef846",
27
- "@uniformdev/richtext": "^19.79.1-alpha.11+4547ef846",
26
+ "@uniformdev/canvas": "^19.81.1",
27
+ "@uniformdev/richtext": "^19.81.1",
28
28
  "autoprefixer": "10.4.16",
29
29
  "hygen": "6.2.11",
30
30
  "postcss": "8.4.31",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "4547ef8469f21f7f2341bcd87203372c4646bc08"
70
+ "gitHead": "e72e4f188122bfe8b9944515be927d1f3febf257"
71
71
  }