@thewhatmatters/wmds 0.4.3 → 0.4.4

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.
Files changed (153) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/CONSUMING.md +1 -1
  3. package/dist/components/organisms/ChatDock/ChatDock.d.ts +25 -10
  4. package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
  5. package/dist/components/organisms/ChatDock/ChatDock.js +423 -428
  6. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +11 -10
  7. package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -1
  8. package/dist/components/organisms/ChatDock/ChatDockGate.js +130 -153
  9. package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts +7 -6
  10. package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts.map +1 -1
  11. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +18 -11
  12. package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -1
  13. package/dist/components/organisms/ChatDock/chatDockGateStyles.js +2 -3
  14. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +6 -12
  15. package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
  16. package/dist/components/organisms/ChatDock/chatDockStyles.js +6 -9
  17. package/dist/components/organisms/Dialog/Dialog.js +34 -34
  18. package/dist/components/organisms/Sheet/Sheet.js +38 -38
  19. package/dist/lib/dialogOverlay.d.ts +0 -5
  20. package/dist/lib/dialogOverlay.d.ts.map +1 -1
  21. package/dist/lib/dialogOverlay.js +1 -12
  22. package/dist/styles.css +1 -1
  23. package/docs/component-contracts.md +2 -2
  24. package/docs/components.md +2 -2
  25. package/docs/exports.json +1 -1
  26. package/docs/patterns/components-accordion--flush.tsx +1 -1
  27. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  28. package/docs/patterns/components-badge--outline-tags.tsx +1 -1
  29. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  30. package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
  31. package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
  32. package/docs/patterns/components-breadcrumb--path.tsx +1 -1
  33. package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
  34. package/docs/patterns/components-button-button--copy-button.tsx +1 -1
  35. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  36. package/docs/patterns/components-button-button--external-link.tsx +1 -1
  37. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  38. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  39. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  40. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  41. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  42. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  43. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  44. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  45. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  46. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  47. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  48. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  49. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  50. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  51. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  52. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  53. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  54. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  55. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  56. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  57. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  58. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  59. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  60. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  61. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  62. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  63. package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +3 -2
  64. package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +2 -2
  65. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  66. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  67. package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
  68. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  69. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  70. package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
  71. package/docs/patterns/components-descriptionlist--details.tsx +1 -1
  72. package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
  73. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  74. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  75. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  76. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  77. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  78. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  79. package/docs/patterns/components-field--multi-control.tsx +1 -1
  80. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  81. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  82. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  83. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  84. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  85. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  86. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  87. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  88. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  89. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  90. package/docs/patterns/components-indexlist--post-index.tsx +1 -1
  91. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  92. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  93. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  94. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  95. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  96. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  97. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  98. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  99. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  100. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  101. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  102. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  103. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  104. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  105. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  106. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  107. package/docs/patterns/components-prose--article-body.tsx +1 -1
  108. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  109. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  110. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  111. package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
  112. package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
  113. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  114. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  115. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  116. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  117. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  118. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  119. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  120. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  121. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  122. package/docs/patterns/components-switch--default.tsx +1 -1
  123. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  124. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  125. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  126. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  127. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  128. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  129. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  130. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  131. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  132. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  133. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  134. package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
  135. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  136. package/docs/patterns/components-textsequence--default.tsx +1 -1
  137. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  138. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  139. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  140. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  141. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  142. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  143. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  144. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  145. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  146. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  147. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  148. package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
  149. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  150. package/docs/patterns/guides-post-page--post-page.tsx +1 -1
  151. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  152. package/docs/patterns/index.json +1 -1
  153. package/package.json +1 -1
@@ -2,34 +2,34 @@
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { motionTransitionProp as t } from "../../../lib/motion.js";
4
4
  import { Card as n } from "../../molecules/Card/Card.js";
5
- import { focusInitialElement as r, lockBodyScroll as i, trapFocus as a } from "../../../lib/dialogOverlay.js";
6
- import { dialogBackdropClasses as o, dialogOverlayRootClasses as s, dialogPanelShellClasses as c, dialogPanelSizeClasses as l, dialogSizes as u, overlayPanelChromeClasses as d, overlayPanelDialogBodyScrollClasses as f, overlayPanelDialogFooterClasses as p, overlayPanelMaxHeightClasses as m } from "./dialogStyles.js";
7
- import { OverlayPanelHeader as h } from "./OverlayPanelHeader.js";
5
+ import { dialogBackdropClasses as r, dialogOverlayRootClasses as i, dialogPanelShellClasses as a, dialogPanelSizeClasses as o, dialogSizes as s, overlayPanelChromeClasses as c, overlayPanelDialogBodyScrollClasses as l, overlayPanelDialogFooterClasses as u, overlayPanelMaxHeightClasses as d } from "./dialogStyles.js";
6
+ import { OverlayPanelHeader as f } from "./OverlayPanelHeader.js";
7
+ import { focusInitialElement as p, lockBodyScroll as m, trapFocus as h } from "../../../lib/dialogOverlay.js";
8
8
  import { DialogProvider as g, useDialogContext as _, useDialogLabelIds as v } from "./DialogContext.js";
9
9
  import { useCallback as y, useEffect as b, useRef as x } from "react";
10
10
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
11
11
  import { AnimatePresence as w, motion as T } from "motion/react";
12
12
  import { createPortal as E } from "react-dom";
13
13
  //#region src/components/organisms/Dialog/Dialog.tsx
14
- function D({ role: e, "aria-labelledby": n, "aria-describedby": c, initialFocusSelector: l, children: u }) {
15
- let { open: d, onOpenChange: f, dismissOnBackdrop: p, dismissOnEscape: m, triggerRef: h } = _("DialogPortal"), g = x(null), v = x(null), D = y(() => {
16
- f(!1);
17
- }, [f]);
14
+ function D({ role: e, "aria-labelledby": n, "aria-describedby": a, initialFocusSelector: o, children: s }) {
15
+ let { open: c, onOpenChange: l, dismissOnBackdrop: u, dismissOnEscape: d, triggerRef: f } = _("DialogPortal"), g = x(null), v = x(null), D = y(() => {
16
+ l(!1);
17
+ }, [l]);
18
18
  b(() => {
19
- if (!d) return;
20
- v.current = h.current ?? document.activeElement;
21
- let e = i(), t = g.current, n = () => {};
22
- return t != null && (n = a(t), window.requestAnimationFrame(() => {
23
- r(t, l);
19
+ if (!c) return;
20
+ v.current = f.current ?? document.activeElement;
21
+ let e = m(), t = g.current, n = () => {};
22
+ return t != null && (n = h(t), window.requestAnimationFrame(() => {
23
+ p(t, o);
24
24
  })), () => {
25
25
  n(), e(), v.current?.focus?.();
26
26
  };
27
27
  }, [
28
- l,
29
- d,
30
- h
28
+ o,
29
+ c,
30
+ f
31
31
  ]), b(() => {
32
- if (!d || !m) return;
32
+ if (!c || !d) return;
33
33
  function e(e) {
34
34
  e.key === "Escape" && (e.preventDefault(), D());
35
35
  }
@@ -38,23 +38,23 @@ function D({ role: e, "aria-labelledby": n, "aria-describedby": c, initialFocusS
38
38
  };
39
39
  }, [
40
40
  D,
41
- m,
42
- d
41
+ d,
42
+ c
43
43
  ]);
44
44
  function O(e) {
45
- if (!p) return;
45
+ if (!u) return;
46
46
  let t = e.target;
47
47
  g.current?.contains(t) || D();
48
48
  }
49
- return typeof document > "u" ? null : E(/* @__PURE__ */ S(w, { children: d ? /* @__PURE__ */ C(T.div, {
50
- className: s,
49
+ return typeof document > "u" ? null : E(/* @__PURE__ */ S(w, { children: c ? /* @__PURE__ */ C(T.div, {
50
+ className: i,
51
51
  initial: { opacity: 0 },
52
52
  animate: { opacity: 1 },
53
53
  exit: { opacity: 0 },
54
54
  transition: t("medium"),
55
55
  onMouseDown: O,
56
56
  children: [/* @__PURE__ */ S("div", {
57
- className: o,
57
+ className: r,
58
58
  "aria-hidden": "true"
59
59
  }), /* @__PURE__ */ S(T.div, {
60
60
  ref: g,
@@ -62,7 +62,7 @@ function D({ role: e, "aria-labelledby": n, "aria-describedby": c, initialFocusS
62
62
  role: e,
63
63
  "aria-modal": "true",
64
64
  "aria-labelledby": n,
65
- "aria-describedby": c,
65
+ "aria-describedby": a,
66
66
  initial: {
67
67
  opacity: 0,
68
68
  scale: .96,
@@ -82,7 +82,7 @@ function D({ role: e, "aria-labelledby": n, "aria-describedby": c, initialFocusS
82
82
  onMouseDown: (e) => {
83
83
  e.stopPropagation();
84
84
  },
85
- children: u
85
+ children: s
86
86
  })]
87
87
  }) : null }), document.body);
88
88
  }
@@ -113,29 +113,29 @@ function k({ children: e, className: t }) {
113
113
  children: e
114
114
  });
115
115
  }
116
- function A({ title: t, description: r, headerStart: i, showClose: a = !0, footer: o, size: s = "md", className: u, children: g }) {
117
- let { titleId: v, descriptionId: y, onOpenChange: b } = _("Dialog.Content"), x = t != null, w = r != null, T = g != null || !x && w, E = o != null, O = T || E;
116
+ function A({ title: t, description: r, headerStart: i, showClose: s = !0, footer: p, size: m = "md", className: h, children: g }) {
117
+ let { titleId: v, descriptionId: y, onOpenChange: b } = _("Dialog.Content"), x = t != null, w = r != null, T = g != null || !x && w, E = p != null, O = T || E;
118
118
  return /* @__PURE__ */ S(D, {
119
119
  role: "dialog",
120
120
  "aria-labelledby": x ? v : void 0,
121
121
  "aria-describedby": w ? y : void 0,
122
122
  children: /* @__PURE__ */ C(n, {
123
123
  padding: "none",
124
- bodyTerminal: o == null,
125
- className: e(l[s], d, m, c, u),
124
+ bodyTerminal: p == null,
125
+ className: e(o[m], c, d, a, h),
126
126
  children: [
127
- /* @__PURE__ */ S(h, {
127
+ /* @__PURE__ */ S(f, {
128
128
  titleId: v,
129
129
  descriptionId: y,
130
130
  title: t,
131
131
  description: r,
132
132
  headerStart: i,
133
- showClose: a,
133
+ showClose: s,
134
134
  closeLabel: "Close dialog",
135
135
  onClose: () => b(!1)
136
136
  }),
137
137
  O ? /* @__PURE__ */ C("div", {
138
- className: f,
138
+ className: l,
139
139
  children: [!x && w ? /* @__PURE__ */ S("p", {
140
140
  id: y,
141
141
  className: "text-muted",
@@ -143,8 +143,8 @@ function A({ title: t, description: r, headerStart: i, showClose: a = !0, footer
143
143
  }) : null, g]
144
144
  }) : null,
145
145
  E ? /* @__PURE__ */ S("footer", {
146
- className: p,
147
- children: o
146
+ className: u,
147
+ children: p
148
148
  }) : null
149
149
  ]
150
150
  })
@@ -155,4 +155,4 @@ var j = Object.assign(O, {
155
155
  Content: A
156
156
  });
157
157
  //#endregion
158
- export { j as Dialog, D as DialogPortal, u as dialogSizes };
158
+ export { j as Dialog, D as DialogPortal, s as dialogSizes };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../../lib/cn.js";
3
3
  import { motionTransitionProp as t } from "../../../lib/motion.js";
4
- import { focusInitialElement as n, lockBodyScroll as r, trapFocus as i } from "../../../lib/dialogOverlay.js";
5
- import { dialogBackdropClasses as a, overlayPanelBodyScrollClasses as o, overlayPanelChromeClasses as s, overlayPanelFooterClasses as c, overlayPanelFooterDelineatedInnerClasses as l, overlayPanelFooterDelineatedShellClasses as u, overlayPanelFooterHairlineClasses as d, overlayPanelSectionStackClasses as f } from "../Dialog/dialogStyles.js";
6
- import { OverlayPanelHeader as p } from "../Dialog/OverlayPanelHeader.js";
4
+ import { dialogBackdropClasses as n, overlayPanelBodyScrollClasses as r, overlayPanelChromeClasses as i, overlayPanelFooterClasses as a, overlayPanelFooterDelineatedInnerClasses as o, overlayPanelFooterDelineatedShellClasses as s, overlayPanelFooterHairlineClasses as c, overlayPanelSectionStackClasses as l } from "../Dialog/dialogStyles.js";
5
+ import { OverlayPanelHeader as u } from "../Dialog/OverlayPanelHeader.js";
6
+ import { focusInitialElement as d, lockBodyScroll as f, trapFocus as p } from "../../../lib/dialogOverlay.js";
7
7
  import { sheetOverlayRootClasses as m, sheetPanelBaseClasses as h, sheetPanelMotionTransition as g, sheetPanelMotionVariants as _, sheetPanelPlacementClasses as v, sheetPanelSizeClasses as y, sheetSides as b, sheetSizes as x } from "./sheetStyles.js";
8
8
  import { SheetProvider as S, useSheetContext as C, useSheetLabelIds as w } from "./SheetContext.js";
9
9
  import { useCallback as T, useEffect as E, useRef as D } from "react";
@@ -11,21 +11,21 @@ import { jsx as O, jsxs as k } from "react/jsx-runtime";
11
11
  import { AnimatePresence as A, motion as j } from "motion/react";
12
12
  import { createPortal as M } from "react-dom";
13
13
  //#region src/components/organisms/Sheet/Sheet.tsx
14
- function N({ side: o, size: c, "aria-labelledby": l, "aria-describedby": u, children: d }) {
15
- let { open: f, onOpenChange: p, dismissOnBackdrop: b, dismissOnEscape: x, triggerRef: S } = C("SheetPortal"), w = D(null), N = D(null), P = T(() => {
16
- p(!1);
17
- }, [p]);
14
+ function N({ side: r, size: a, "aria-labelledby": o, "aria-describedby": s, children: c }) {
15
+ let { open: l, onOpenChange: u, dismissOnBackdrop: b, dismissOnEscape: x, triggerRef: S } = C("SheetPortal"), w = D(null), N = D(null), P = T(() => {
16
+ u(!1);
17
+ }, [u]);
18
18
  E(() => {
19
- if (!f) return;
19
+ if (!l) return;
20
20
  N.current = S.current ?? document.activeElement;
21
- let e = r(), t = w.current, a = () => {};
22
- return t != null && (a = i(t), window.requestAnimationFrame(() => {
23
- n(t);
21
+ let e = f(), t = w.current, n = () => {};
22
+ return t != null && (n = p(t), window.requestAnimationFrame(() => {
23
+ d(t);
24
24
  })), () => {
25
- a(), e(), N.current?.focus?.();
25
+ n(), e(), N.current?.focus?.();
26
26
  };
27
- }, [f, S]), E(() => {
28
- if (!f || !x) return;
27
+ }, [l, S]), E(() => {
28
+ if (!l || !x) return;
29
29
  function e(e) {
30
30
  e.key === "Escape" && (e.preventDefault(), P());
31
31
  }
@@ -35,39 +35,39 @@ function N({ side: o, size: c, "aria-labelledby": l, "aria-describedby": u, chil
35
35
  }, [
36
36
  P,
37
37
  x,
38
- f
38
+ l
39
39
  ]);
40
40
  function F(e) {
41
41
  if (!b) return;
42
42
  let t = e.target;
43
43
  w.current?.contains(t) || P();
44
44
  }
45
- return typeof document > "u" ? null : M(/* @__PURE__ */ O(A, { children: f ? /* @__PURE__ */ k(j.div, {
46
- className: m[o],
45
+ return typeof document > "u" ? null : M(/* @__PURE__ */ O(A, { children: l ? /* @__PURE__ */ k(j.div, {
46
+ className: m[r],
47
47
  initial: { opacity: 0 },
48
48
  animate: { opacity: 1 },
49
49
  exit: { opacity: 0 },
50
50
  transition: t("medium"),
51
51
  onMouseDown: F,
52
52
  children: [/* @__PURE__ */ O("div", {
53
- className: a,
53
+ className: n,
54
54
  "aria-hidden": "true"
55
55
  }), /* @__PURE__ */ O(j.div, {
56
56
  ref: w,
57
- className: e(h, v[o], y[o][c], s, "relative z-[1]"),
57
+ className: e(h, v[r], y[r][a], i, "relative z-[1]"),
58
58
  role: "dialog",
59
59
  "aria-modal": "true",
60
- "aria-labelledby": l,
61
- "aria-describedby": u,
62
- variants: _(o),
60
+ "aria-labelledby": o,
61
+ "aria-describedby": s,
62
+ variants: _(r),
63
63
  initial: "hidden",
64
64
  animate: "visible",
65
65
  exit: "exit",
66
- transition: g(o),
66
+ transition: g(r),
67
67
  onMouseDown: (e) => {
68
68
  e.stopPropagation();
69
69
  },
70
- children: d
70
+ children: c
71
71
  })]
72
72
  }) : null }), document.body);
73
73
  }
@@ -98,46 +98,46 @@ function F({ children: e, className: t }) {
98
98
  children: e
99
99
  });
100
100
  }
101
- function I({ side: t = "bottom", size: n = "md", title: r, description: i, headerStart: a, showClose: s = !0, footer: m, className: h, children: g }) {
102
- let { titleId: _, descriptionId: v, onOpenChange: y } = C("Sheet.Content"), b = r != null, x = i != null, S = g != null || !b && x, w = m != null;
101
+ function I({ side: t = "bottom", size: n = "md", title: i, description: d, headerStart: f, showClose: p = !0, footer: m, className: h, children: g }) {
102
+ let { titleId: _, descriptionId: v, onOpenChange: y } = C("Sheet.Content"), b = i != null, x = d != null, S = g != null || !b && x, w = m != null;
103
103
  return /* @__PURE__ */ O(N, {
104
104
  side: t,
105
105
  size: n,
106
106
  "aria-labelledby": b ? _ : void 0,
107
107
  "aria-describedby": x ? v : void 0,
108
108
  children: /* @__PURE__ */ k("div", {
109
- className: e(f, m == null ? "pb-4" : void 0, h),
109
+ className: e(l, m == null ? "pb-4" : void 0, h),
110
110
  children: [
111
- /* @__PURE__ */ O(p, {
111
+ /* @__PURE__ */ O(u, {
112
112
  titleId: _,
113
113
  descriptionId: v,
114
- title: r,
115
- description: i,
116
- headerStart: a,
117
- showClose: s,
114
+ title: i,
115
+ description: d,
116
+ headerStart: f,
117
+ showClose: p,
118
118
  closeLabel: "Close sheet",
119
119
  onClose: () => y(!1),
120
120
  delineated: S || w
121
121
  }),
122
122
  S ? /* @__PURE__ */ k("div", {
123
- className: o,
123
+ className: r,
124
124
  children: [!b && x ? /* @__PURE__ */ O("p", {
125
125
  id: v,
126
126
  className: "text-muted",
127
- children: i
127
+ children: d
128
128
  }) : null, g]
129
129
  }) : null,
130
130
  w ? S ? /* @__PURE__ */ k("footer", {
131
- className: u,
131
+ className: s,
132
132
  children: [/* @__PURE__ */ O("hr", {
133
- className: d,
133
+ className: c,
134
134
  "aria-hidden": "true"
135
135
  }), /* @__PURE__ */ O("div", {
136
- className: l,
136
+ className: o,
137
137
  children: m
138
138
  })]
139
139
  }) : /* @__PURE__ */ O("footer", {
140
- className: e(c, "pb-4"),
140
+ className: e(a, "pb-4"),
141
141
  children: m
142
142
  }) : null
143
143
  ]
@@ -4,9 +4,4 @@ export declare function trapFocus(container: HTMLElement): () => void;
4
4
  export declare function lockBodyScroll(): () => void;
5
5
  /** Focus the first tabbable control inside the panel — usually the primary action or close. */
6
6
  export declare function focusInitialElement(container: HTMLElement, preferSelector?: string): void;
7
- /**
8
- * Make everything outside `element` inert — every sibling of it and of each ancestor up to `<body>`.
9
- * Elements that were inert already are left alone. Returns cleanup.
10
- */
11
- export declare function inertOutside(element: HTMLElement): () => void;
12
7
  //# sourceMappingURL=dialogOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialogOverlay.d.ts","sourceRoot":"","sources":["../../src/lib/dialogOverlay.ts"],"names":[],"mappings":"AAYA,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,IAAI,CAqC5D;AAED,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAY3C;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAWN;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,CAgB7D"}
1
+ {"version":3,"file":"dialogOverlay.d.ts","sourceRoot":"","sources":["../../src/lib/dialogOverlay.ts"],"names":[],"mappings":"AAYA,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,MAAM,IAAI,CAqC5D;AAED,yEAAyE;AACzE,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAY3C;AAED,+FAA+F;AAC/F,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAWN"}
@@ -40,16 +40,5 @@ function i(t, n) {
40
40
  }
41
41
  t.querySelector(e)?.focus();
42
42
  }
43
- function a(e) {
44
- let t = [], n = e;
45
- for (; n.parentElement != null && n !== document.body;) {
46
- let e = n.parentElement;
47
- for (let r of Array.from(e.children)) r === n || !(r instanceof HTMLElement) || r.inert || r instanceof HTMLScriptElement || r instanceof HTMLStyleElement || (r.inert = !0, t.push(r));
48
- n = e;
49
- }
50
- return () => {
51
- for (let e of t) e.inert = !1;
52
- };
53
- }
54
43
  //#endregion
55
- export { i as focusInitialElement, a as inertOutside, r as lockBodyScroll, n as trapFocus };
44
+ export { i as focusInitialElement, r as lockBodyScroll, n as trapFocus };