@aveonline/ui-react 2.19.4 → 2.19.5

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.
@@ -32,5 +32,6 @@ interface IPropsModal extends IChildren, IClassName {
32
32
  * Event for close modal
33
33
  */
34
34
  onClose?: (value: boolean) => void;
35
+ disableOverlayClick?: boolean;
35
36
  }
36
37
  export type { IPropsModal };
@@ -1,7 +1,3 @@
1
1
  import type { IPropsModal } from './IModal';
2
- /**
3
- * Molecule: Modal
4
- * Modals are overlays that require merchants to take an action before they can continue interacting with the rest of Shopify. They can be disruptive and should be used thoughtfully and sparingly.
5
- */
6
- declare function Modal({ title, iconTitle, subtitle, footer, isOpen, hasBorder, showClose, onClose, className, children }: IPropsModal): JSX.Element;
2
+ declare function Modal({ title, iconTitle, subtitle, footer, isOpen, hasBorder, showClose, onClose, className, disableOverlayClick, children }: IPropsModal): JSX.Element;
7
3
  export default Modal;
package/dist/ui-react.mjs CHANGED
@@ -11205,9 +11205,10 @@ function Oue({
11205
11205
  showClose: o = !0,
11206
11206
  onClose: s,
11207
11207
  className: l,
11208
- children: u
11208
+ disableOverlayClick: u = !1,
11209
+ children: c
11209
11210
  }) {
11210
- const c = () => /* @__PURE__ */ m.jsxs("header", { className: "mb-xl flex items-center justify-between", children: [
11211
+ const f = () => /* @__PURE__ */ m.jsxs("header", { className: "mb-xl flex items-center justify-between", children: [
11211
11212
  /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-x-2", children: [
11212
11213
  t && t,
11213
11214
  /* @__PURE__ */ m.jsx(_r, { variant: "heading", color: "default", children: e })
@@ -11221,19 +11222,28 @@ function Oue({
11221
11222
  onClick: () => s == null ? void 0 : s(!i)
11222
11223
  }
11223
11224
  )
11224
- ] }), f = () => /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
11225
+ ] }), d = () => /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
11225
11226
  a.includes("top") && /* @__PURE__ */ m.jsx("div", { className: "mb-xs border-b border-border-disabled" }),
11226
- u,
11227
+ c,
11227
11228
  a.includes("bottom") && /* @__PURE__ */ m.jsx("div", { className: "mt-xs border-t border-border-disabled" })
11228
- ] });
11229
+ ] }), p = () => {
11230
+ u || s == null || s(!1);
11231
+ };
11229
11232
  return /* @__PURE__ */ m.jsxs(
11230
11233
  l1,
11231
11234
  {
11232
11235
  open: i,
11233
- onClose: (d) => s == null ? void 0 : s(d),
11236
+ onClose: u ? () => null : (v) => s == null ? void 0 : s(v),
11234
11237
  className: ee("relative z-50", l),
11235
11238
  children: [
11236
- /* @__PURE__ */ m.jsx("div", { className: "fixed inset-0 bg-background-modal", "aria-hidden": "true" }),
11239
+ /* @__PURE__ */ m.jsx(
11240
+ "div",
11241
+ {
11242
+ className: "fixed inset-0 bg-background-modal",
11243
+ "aria-hidden": "true",
11244
+ onClick: p
11245
+ }
11246
+ ),
11237
11247
  /* @__PURE__ */ m.jsx("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ m.jsx("div", { className: "flex min-h-full items-center justify-center", children: /* @__PURE__ */ m.jsxs(
11238
11248
  l1.Panel,
11239
11249
  {
@@ -11242,9 +11252,9 @@ function Oue({
11242
11252
  l
11243
11253
  ),
11244
11254
  children: [
11245
- c(),
11255
+ f(),
11246
11256
  n && /* @__PURE__ */ m.jsx(Ie, { variant: "caption", color: "subdued", className: "mb-sm", children: n }),
11247
- /* @__PURE__ */ m.jsx("main", { className: "mb-xl", children: f() }),
11257
+ /* @__PURE__ */ m.jsx("main", { className: "mb-xl", children: d() }),
11248
11258
  /* @__PURE__ */ m.jsx("footer", { className: "flex w-full items-center justify-end gap-x-2", children: r && r })
11249
11259
  ]
11250
11260
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aveonline/ui-react",
3
3
  "description": "Home base for Aveonline design system - ecosystem react",
4
4
  "private": false,
5
- "version": "2.19.4",
5
+ "version": "2.19.5",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"