@youversion/design-system-components 3.4.0 → 3.5.0

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,5 +1,11 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 3.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 43aaf6d: Extend the Dialog component with the prop for flexible disabling the close button.
8
+
3
9
  ## 3.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -5176,19 +5176,20 @@ const He = ({ autoFocus: l = !0, children: r, className: e }) => {
5176
5176
  confirmationButtons: i,
5177
5177
  confirmationContainerClassName: c,
5178
5178
  dialogType: v = "confirmation",
5179
- heading: g,
5180
- headingClassName: p,
5181
- isDismissableOnOutsideClick: b = !0,
5182
- onClose: w,
5183
- ...y
5184
- }, C) => (T2(), /* @__PURE__ */ d("div", { className: "w-full h-screen z-[1400] fixed inset-0", children: [
5179
+ disabledClosing: g = !1,
5180
+ heading: p,
5181
+ headingClassName: b,
5182
+ isDismissableOnOutsideClick: w = !0,
5183
+ onClose: y,
5184
+ ...C
5185
+ }, z) => (T2(), /* @__PURE__ */ d("div", { className: "w-full h-screen z-[1400] fixed inset-0", children: [
5185
5186
  /* @__PURE__ */ n(
5186
5187
  "div",
5187
5188
  {
5188
5189
  className: "absolute inset-0 bg-overlay-light dark:bg-overlay-dark",
5189
5190
  "data-testid": "dialog-overlay",
5190
5191
  id: "overlay",
5191
- onClick: b ? w : void 0
5192
+ onClick: w && !g ? y : void 0
5192
5193
  }
5193
5194
  ),
5194
5195
  /* @__PURE__ */ n(He, { autoFocus: l, className: "w-full h-full flex items-center justify-center", children: /* @__PURE__ */ d(
@@ -5200,8 +5201,8 @@ const He = ({ autoFocus: l = !0, children: r, className: e }) => {
5200
5201
  e
5201
5202
  ),
5202
5203
  open: !0,
5203
- ref: C,
5204
- ...y,
5204
+ ref: z,
5205
+ ...C,
5205
5206
  children: [
5206
5207
  v === "modal" ? /* @__PURE__ */ n(
5207
5208
  V1,
@@ -5209,15 +5210,16 @@ const He = ({ autoFocus: l = !0, children: r, className: e }) => {
5209
5210
  "aria-label": t,
5210
5211
  className: f("absolute inline-end-2 block-start-2", a),
5211
5212
  "data-testid": "close-modal-button",
5212
- onClick: w,
5213
+ disabled: g,
5214
+ onClick: y,
5213
5215
  children: /* @__PURE__ */ n(eo, {})
5214
5216
  }
5215
5217
  ) : null,
5216
- /* @__PURE__ */ n("div", { children: g ? /* @__PURE__ */ n(z1, { className: f("pbe-1", p), size: "md", variant: "headline", children: g }) : null }),
5218
+ /* @__PURE__ */ n("div", { children: p ? /* @__PURE__ */ n(z1, { className: f("pbe-1", b), size: "md", variant: "headline", children: p }) : null }),
5217
5219
  /* @__PURE__ */ n("div", { children: r }),
5218
- /* @__PURE__ */ n("div", { className: f("w-full flex justify-end items-center gap-0.5 pbs-2", c), children: i == null ? void 0 : i.map(({ label: x, ...I }, k) => (
5220
+ /* @__PURE__ */ n("div", { className: f("w-full flex justify-end items-center gap-0.5 pbs-2", c), children: i == null ? void 0 : i.map(({ label: I, ...k }, R) => (
5219
5221
  // eslint-disable-next-line react/jsx-props-no-spreading
5220
- /* @__PURE__ */ n(I1, { "aria-label": x, size: "sm", variant: "borderless", ...I, children: x }, `${x}${k}`)
5222
+ /* @__PURE__ */ n(I1, { "aria-label": I, size: "sm", variant: "borderless", ...k, children: I }, `${I}${R}`)
5221
5223
  )) })
5222
5224
  ]
5223
5225
  }