@mx-cartographer/experiences 9.7.85 → 9.7.86

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [9.7.86] - 11-02-2026
2
+
3
+ - **FIXED** - dialogs fit on small mobile screens in single widgets (WELL-51)
4
+
1
5
  ## [9.7.85] - 11-02-2026
2
6
 
3
7
  - **FIXED** - account filter keeps the selection and shows a loading state while it saves (WELL-46)
@@ -2,49 +2,50 @@ import { useScreenSize as H } from "../../hooks/useScreenSize.es.js";
2
2
  import { useFocusReturn as W } from "../../hooks/useFocusReturn.es.js";
3
3
  import j from "react";
4
4
  import { DialogFooter as k, DialogHeader as v } from "@mxenabled/mxui";
5
- import { jsx as o, jsxs as C } from "react/jsx-runtime";
6
- import I from "@mui/material/Dialog";
7
- import _ from "@mui/material/DialogContent";
8
- var G = ({ className: l, copy: i, disablePrimaryButton: n = !1, showActions: c = !0, isOpen: e = !1, onClose: r, onPrimaryAction: m, primaryColor: d = "primary", primaryText: u = "Confirm", returnFocusTo: p, onSecondaryAction: t, secondaryColor: f = "primary", secondaryText: g = "Cancel", children: x, ...h }) => {
9
- const { sx: a, ...D } = h, b = i?.title ?? "", y = i?.close_aria ?? "Close", s = j.useId(), { isSmallMobile: P } = H(), { onExited: S, onFocus: A, rootRef: F } = W(e, p), M = () => {
5
+ import { jsx as o, jsxs as z } from "react/jsx-runtime";
6
+ import C from "@mui/material/Dialog";
7
+ import I from "@mui/material/DialogContent";
8
+ var G = ({ className: l, copy: i, disablePrimaryButton: n = !1, showActions: c = !0, isOpen: e = !1, onClose: r, onPrimaryAction: m, primaryColor: d = "primary", primaryText: u = "Confirm", returnFocusTo: p, onSecondaryAction: t, secondaryColor: f = "primary", secondaryText: x = "Cancel", children: g, ...b }) => {
9
+ const { sx: a, ...h } = b, D = i?.title ?? "", y = i?.close_aria ?? "Close", s = j.useId(), { isSmallMobile: S } = H(), { onExited: P, onFocus: A, rootRef: F } = W(e, p), M = () => {
10
10
  m?.(), r();
11
11
  }, R = () => {
12
12
  t && t(), r();
13
13
  };
14
14
  return /* @__PURE__ */ o("div", {
15
15
  className: `mx-cmn-dialog ${l}`,
16
- children: /* @__PURE__ */ C(I, {
16
+ children: /* @__PURE__ */ z(C, {
17
17
  "aria-labelledby": s,
18
18
  maxWidth: "xs",
19
19
  onClose: r,
20
20
  open: e,
21
21
  sx: [{
22
22
  "& .MuiDialog-paperScrollPaper": { backgroundColor: "background.default" },
23
- ...P && { "& .MuiDialog-paper": { minWidth: "100%" } },
23
+ ...S && { "& .MuiDialog-paper": { minWidth: "100%" } },
24
24
  height: "100%"
25
25
  }, ...a ? [a] : []],
26
- ...D,
26
+ ...h,
27
27
  disableRestoreFocus: !0,
28
28
  onFocus: A,
29
29
  ref: F,
30
- slotProps: { transition: { onExited: S } },
30
+ slotProps: { transition: { onExited: P } },
31
31
  children: [
32
32
  /* @__PURE__ */ o(v, {
33
33
  ariaHidden: !0,
34
34
  copy: {
35
- title: b,
35
+ title: D,
36
36
  close_aria: y
37
37
  },
38
38
  id: s,
39
39
  onClose: r,
40
40
  truncate: !0
41
41
  }),
42
- /* @__PURE__ */ o(_, {
42
+ /* @__PURE__ */ o(I, {
43
43
  sx: {
44
+ boxSizing: "border-box",
44
45
  lineHeight: 1.5,
45
46
  maxWidth: "100%"
46
47
  },
47
- children: x
48
+ children: g
48
49
  }),
49
50
  c && /* @__PURE__ */ o(k, {
50
51
  isPrimaryDisabled: n,
@@ -53,7 +54,7 @@ var G = ({ className: l, copy: i, disablePrimaryButton: n = !1, showActions: c =
53
54
  primaryColor: d,
54
55
  primaryText: u,
55
56
  secondaryColor: f,
56
- secondaryText: g
57
+ secondaryText: x
57
58
  })
58
59
  ]
59
60
  })
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.es.js","names":[],"sources":["../../../../src/common/components/dialog/Dialog.tsx"],"sourcesContent":["import React from 'react'\n\nimport MuiDialog from '@mui/material/Dialog'\nimport { DialogProps as MuiDialogProps } from '@mui/material/Dialog'\nimport DialogContent from '@mui/material/DialogContent'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { DialogFooter, DialogHeader } from '@mxenabled/mxui'\nimport { useScreenSize } from '../../hooks'\nimport { useFocusReturn } from '../../hooks/useFocusReturn'\n\nexport type CopyObject = {\n close_aria?: string\n title: string\n}\n\ntype OwnedMuiProps =\n | 'disableRestoreFocus'\n | 'onFocus'\n | 'open'\n | 'slotProps'\n | 'slots'\n | 'TransitionComponent'\n | 'TransitionProps'\n\nexport interface DialogProps extends Omit<MuiDialogProps, OwnedMuiProps> {\n className?: string\n copy: CopyObject\n disablePrimaryButton?: boolean\n /** Render the footer action buttons. Default true; content-only dialogs (e.g. the insights survey modal) pass false. */\n showActions?: boolean\n isOpen: boolean\n onClose: (event?: unknown, reason?: string) => void\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n primaryText?: string\n /** Where focus goes on close. Takes precedence over the element that opened the dialog. */\n returnFocusTo?: React.RefObject<HTMLElement | null>\n secondaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n secondaryText?: string\n}\n\nconst Dialog: React.FC<React.PropsWithChildren<DialogProps>> = ({\n className,\n copy,\n disablePrimaryButton = false,\n showActions = true,\n isOpen = false,\n onClose,\n onPrimaryAction,\n primaryColor = 'primary',\n primaryText = 'Confirm',\n returnFocusTo,\n onSecondaryAction,\n secondaryColor = 'primary',\n secondaryText = 'Cancel',\n children,\n ...rest\n}) => {\n // Extract sx from rest to merge with Dialog's own styles instead of overwriting\n const { sx: restSx, ...restProps } = rest\n const title = copy?.title ?? ''\n const closeAria = copy?.close_aria ?? 'Close'\n\n // Label the dialog *by* its visible heading (WAI-ARIA APG) instead of a duplicate\n // aria-label, so screen readers announce the title once rather than name + heading.\n const titleId = React.useId()\n\n const { isSmallMobile } = useScreenSize()\n\n const { onExited, onFocus, rootRef } = useFocusReturn(isOpen, returnFocusTo)\n\n const handlePrimaryAction = () => {\n onPrimaryAction?.()\n onClose()\n }\n\n const handleSecondaryAction = () => {\n if (onSecondaryAction) {\n onSecondaryAction()\n }\n onClose()\n }\n\n return (\n <div className={`mx-cmn-dialog ${className}`}>\n <MuiDialog\n aria-labelledby={titleId}\n maxWidth=\"xs\"\n onClose={onClose}\n open={isOpen}\n sx={\n [\n {\n '& .MuiDialog-paperScrollPaper': { backgroundColor: 'background.default' },\n ...(isSmallMobile && { '& .MuiDialog-paper': { minWidth: '100%' } }),\n height: '100%',\n },\n ...(restSx ? [restSx] : []),\n ] as SxProps\n }\n {...restProps}\n disableRestoreFocus={true}\n onFocus={onFocus}\n ref={rootRef}\n slotProps={{ transition: { onExited } }}\n >\n <DialogHeader\n ariaHidden={true}\n copy={{ title, close_aria: closeAria }}\n id={titleId}\n onClose={onClose}\n truncate={true}\n />\n\n <DialogContent sx={{ lineHeight: 1.5, maxWidth: '100%' }}>{children}</DialogContent>\n\n {showActions && (\n <DialogFooter\n isPrimaryDisabled={disablePrimaryButton}\n onPrimaryAction={handlePrimaryAction}\n onSecondaryAction={handleSecondaryAction}\n primaryColor={primaryColor}\n primaryText={primaryText}\n secondaryColor={secondaryColor}\n secondaryText={secondaryText}\n />\n )}\n </MuiDialog>\n </div>\n )\n}\n\nexport default Dialog\n"],"mappings":";;;;;;;AA2CA,IAAM,IAAA,CAA0D,EAC9D,WAAA,GACA,MAAA,GACA,sBAAA,IAAuB,IACvB,aAAA,IAAc,IACd,QAAA,IAAS,IACT,SAAA,GACA,iBAAA,GACA,cAAA,IAAe,WACf,aAAA,IAAc,WACd,eAAA,GACA,mBAAA,GACA,gBAAA,IAAiB,WACjB,eAAA,IAAgB,UAChB,UAAA,GACA,GAAG,EAAA,MACC;AAEJ,QAAM,EAAE,IAAI,GAAQ,GAAG,EAAA,IAAc,GAC/B,IAAQ,GAAM,SAAS,IACvB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ACL,cAAA;AAAA,UACD,aAAA;AAAA,UACG,gBAAA;AAAA,UACD,eAAA;AAAA,QAChB,CAAA;AAAA,MAEM;AAAA;EACR,CAAA;AAET"}
1
+ {"version":3,"file":"Dialog.es.js","names":[],"sources":["../../../../src/common/components/dialog/Dialog.tsx"],"sourcesContent":["import React from 'react'\n\nimport MuiDialog from '@mui/material/Dialog'\nimport { DialogProps as MuiDialogProps } from '@mui/material/Dialog'\nimport DialogContent from '@mui/material/DialogContent'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { DialogFooter, DialogHeader } from '@mxenabled/mxui'\nimport { useScreenSize } from '../../hooks'\nimport { useFocusReturn } from '../../hooks/useFocusReturn'\n\nexport type CopyObject = {\n close_aria?: string\n title: string\n}\n\ntype OwnedMuiProps =\n | 'disableRestoreFocus'\n | 'onFocus'\n | 'open'\n | 'slotProps'\n | 'slots'\n | 'TransitionComponent'\n | 'TransitionProps'\n\nexport interface DialogProps extends Omit<MuiDialogProps, OwnedMuiProps> {\n className?: string\n copy: CopyObject\n disablePrimaryButton?: boolean\n /** Render the footer action buttons. Default true; content-only dialogs (e.g. the insights survey modal) pass false. */\n showActions?: boolean\n isOpen: boolean\n onClose: (event?: unknown, reason?: string) => void\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n primaryText?: string\n /** Where focus goes on close. Takes precedence over the element that opened the dialog. */\n returnFocusTo?: React.RefObject<HTMLElement | null>\n secondaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n secondaryText?: string\n}\n\nconst Dialog: React.FC<React.PropsWithChildren<DialogProps>> = ({\n className,\n copy,\n disablePrimaryButton = false,\n showActions = true,\n isOpen = false,\n onClose,\n onPrimaryAction,\n primaryColor = 'primary',\n primaryText = 'Confirm',\n returnFocusTo,\n onSecondaryAction,\n secondaryColor = 'primary',\n secondaryText = 'Cancel',\n children,\n ...rest\n}) => {\n // Extract sx from rest to merge with Dialog's own styles instead of overwriting\n const { sx: restSx, ...restProps } = rest\n const title = copy?.title ?? ''\n const closeAria = copy?.close_aria ?? 'Close'\n\n // Label the dialog *by* its visible heading (WAI-ARIA APG) instead of a duplicate\n // aria-label, so screen readers announce the title once rather than name + heading.\n const titleId = React.useId()\n\n const { isSmallMobile } = useScreenSize()\n\n const { onExited, onFocus, rootRef } = useFocusReturn(isOpen, returnFocusTo)\n\n const handlePrimaryAction = () => {\n onPrimaryAction?.()\n onClose()\n }\n\n const handleSecondaryAction = () => {\n if (onSecondaryAction) {\n onSecondaryAction()\n }\n onClose()\n }\n\n return (\n <div className={`mx-cmn-dialog ${className}`}>\n <MuiDialog\n aria-labelledby={titleId}\n maxWidth=\"xs\"\n onClose={onClose}\n open={isOpen}\n sx={\n [\n {\n '& .MuiDialog-paperScrollPaper': { backgroundColor: 'background.default' },\n ...(isSmallMobile && { '& .MuiDialog-paper': { minWidth: '100%' } }),\n height: '100%',\n },\n ...(restSx ? [restSx] : []),\n ] as SxProps\n }\n {...restProps}\n disableRestoreFocus={true}\n onFocus={onFocus}\n ref={rootRef}\n slotProps={{ transition: { onExited } }}\n >\n <DialogHeader\n ariaHidden={true}\n copy={{ title, close_aria: closeAria }}\n id={titleId}\n onClose={onClose}\n truncate={true}\n />\n\n <DialogContent sx={{ boxSizing: 'border-box', lineHeight: 1.5, maxWidth: '100%' }}>\n {children}\n </DialogContent>\n\n {showActions && (\n <DialogFooter\n isPrimaryDisabled={disablePrimaryButton}\n onPrimaryAction={handlePrimaryAction}\n onSecondaryAction={handleSecondaryAction}\n primaryColor={primaryColor}\n primaryText={primaryText}\n secondaryColor={secondaryColor}\n secondaryText={secondaryText}\n />\n )}\n </MuiDialog>\n </div>\n )\n}\n\nexport default Dialog\n"],"mappings":";;;;;;;AA2CA,IAAM,IAAA,CAA0D,EAC9D,WAAA,GACA,MAAA,GACA,sBAAA,IAAuB,IACvB,aAAA,IAAc,IACd,QAAA,IAAS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AA,QAED,gBAAA,EAAC,GAAD;AAAA,UAAe,IAAI;AAAA,YAAE,WAAW;AAAA,YAAc,YAAY;AAAA,YAAK,UAAU;AAAA,UAAO;AAAA,UAC7E,UAAA;AAAA,QACY,CAAA;AAAA,QAEd,KACC,gBAAA,EAAC,GAAD;AAAA,UACE,mBAAmB;AAAA,UACnB,iBAAiB;AAAA,UACjB,mBAAmB;AAAA,UACL,cAAA;AAAA,UACD,aAAA;AAAA,UACG,gBAAA;AAAA,UACD,eAAA;AAAA,QAChB,CAAA;AAAA,MAEM;AAAA;EACR,CAAA;AAET"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.85",
3
+ "version": "9.7.86",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",