@mshuja288/aksuicore 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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ Versioning follows [VERSIONING.md](./VERSIONING.md).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.4] — 2026-10-29
11
+
12
+ ### Fixed
13
+
14
+ - `Dialog` no longer closes immediately when opened from a View/Update click (backdrop ignored the opening gesture; close on backdrop `mousedown` only when the target is the backdrop)
15
+
10
16
  ## [0.4.3] — 2026-10-13
11
17
 
12
18
  ### Added
package/dist/index.cjs CHANGED
@@ -414,17 +414,35 @@ function Dialog({
414
414
  children,
415
415
  wide = true
416
416
  }) {
417
+ const allowBackdropClose = react.useRef(false);
418
+ react.useEffect(() => {
419
+ if (!open) {
420
+ allowBackdropClose.current = false;
421
+ return;
422
+ }
423
+ allowBackdropClose.current = false;
424
+ const timer = window.setTimeout(() => {
425
+ allowBackdropClose.current = true;
426
+ }, 0);
427
+ return () => window.clearTimeout(timer);
428
+ }, [open]);
417
429
  if (!open) {
418
430
  return null;
419
431
  }
420
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dialog-backdrop", onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
432
+ function onBackdropMouseDown(event) {
433
+ if (event.target !== event.currentTarget || !allowBackdropClose.current) {
434
+ return;
435
+ }
436
+ onClose();
437
+ }
438
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "dialog-backdrop", onMouseDown: onBackdropMouseDown, children: /* @__PURE__ */ jsxRuntime.jsxs(
421
439
  "div",
422
440
  {
423
441
  className: wide ? "dialog form-dialog" : "dialog",
424
442
  role: "dialog",
425
443
  "aria-modal": "true",
426
444
  "aria-label": title,
427
- onClick: (event) => event.stopPropagation(),
445
+ onMouseDown: (event) => event.stopPropagation(),
428
446
  children: [
429
447
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "dialog-head", children: [
430
448
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }),
@@ -1430,7 +1448,7 @@ function RecordWorkspace({
1430
1448
  className: "ghost side-rail-icon",
1431
1449
  title: "Show filters",
1432
1450
  "aria-label": "Show filters",
1433
- onClick: () => setSideOpen(true),
1451
+ onClick: () => setSideOpenValue(true),
1434
1452
  children: [
1435
1453
  /* @__PURE__ */ jsxRuntime.jsx(FilterIcon, {}),
1436
1454
  activeFilterCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "filter-badge", children: activeFilterCount }) : null