@wipco/sdui 1.7.0 → 1.8.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.
Files changed (84) hide show
  1. package/dist/{chunk-FGKBXUUA.js → chunk-37CLBWCE.js} +1 -1
  2. package/dist/{chunk-7EDFYBUA.js → chunk-4PYOXXZJ.js} +4 -4
  3. package/dist/{chunk-A22QR6PM.js → chunk-6AFQPHLW.js} +2 -2
  4. package/dist/{chunk-B5MB64YQ.js → chunk-6TWP3E2L.js} +3 -3
  5. package/dist/{chunk-NJTIJAFU.js → chunk-AMKIMOTU.js} +2 -2
  6. package/dist/{chunk-UBVYPV7H.js → chunk-B6U2YWUP.js} +2 -2
  7. package/dist/{chunk-Q56LZJFX.js → chunk-CUAGMSSG.js} +1 -1
  8. package/dist/{chunk-X7RSKFWF.js → chunk-DDX7KJAW.js} +1 -1
  9. package/dist/{chunk-7YTZB5LQ.js → chunk-DNUO63VZ.js} +2 -2
  10. package/dist/{chunk-JMNUFA5M.js → chunk-FXEKHHEA.js} +1 -1
  11. package/dist/{chunk-Z4LFZWHH.js → chunk-HAK2YXSF.js} +1 -1
  12. package/dist/{chunk-GWT5UF5B.js → chunk-HSS7MTJK.js} +2 -2
  13. package/dist/{chunk-466W3XNK.js → chunk-ITFSPOOB.js} +1 -1
  14. package/dist/{chunk-Z4JZUIKE.js → chunk-IWLLM45X.js} +3 -3
  15. package/dist/{chunk-L6ODTHTX.js → chunk-JDTVNS3H.js} +1 -1
  16. package/dist/{chunk-WTQH2NI2.js → chunk-JRCHWX2B.js} +1 -1
  17. package/dist/{chunk-RA74PUMP.js → chunk-K7K6WOIG.js} +3 -3
  18. package/dist/{chunk-OWM7E55U.js → chunk-KIHN7DGA.js} +37 -0
  19. package/dist/{chunk-MUXGTVEA.js → chunk-KJDHF6VU.js} +46 -5
  20. package/dist/{chunk-27ILQUWE.js → chunk-KVQXQLAP.js} +11 -4
  21. package/dist/{chunk-WPAZBAUW.js → chunk-LGKLA22B.js} +1 -1
  22. package/dist/{chunk-4VQIKSDS.js → chunk-LKSGAILO.js} +11 -5
  23. package/dist/{chunk-P62INTQ5.js → chunk-LONXOEZY.js} +1 -1
  24. package/dist/{chunk-AP33B24H.js → chunk-MSPBNI2M.js} +2 -2
  25. package/dist/{chunk-DCSUBFFG.js → chunk-NLN5SLU7.js} +4 -4
  26. package/dist/{chunk-FUNCQCKN.js → chunk-O3SD2HS6.js} +1 -1
  27. package/dist/{chunk-ENZBX4AR.js → chunk-PGAP2RLS.js} +1 -1
  28. package/dist/{chunk-JCG4575S.js → chunk-PN5IJPA5.js} +1 -1
  29. package/dist/{chunk-H5QRRPBJ.js → chunk-POETCJUR.js} +2 -2
  30. package/dist/{chunk-NQDHGK7C.js → chunk-QP7AQEGZ.js} +3 -3
  31. package/dist/{chunk-DILQ2DJV.js → chunk-SQYLAWQP.js} +5 -5
  32. package/dist/{chunk-LKL3SCBJ.js → chunk-TCHXA35K.js} +2 -2
  33. package/dist/{chunk-7ZCM6XEM.js → chunk-TK3WS7XE.js} +2 -2
  34. package/dist/{chunk-NI3LMETK.js → chunk-TQV4M3SB.js} +2 -2
  35. package/dist/{chunk-MWBCQHKQ.js → chunk-WLHF5MVE.js} +2 -2
  36. package/dist/{chunk-A3SO6H47.js → chunk-WW65XEEE.js} +2 -2
  37. package/dist/{chunk-ZBX2CAOO.js → chunk-XFNHHGFR.js} +1 -1
  38. package/dist/{chunk-5LIFU57A.js → chunk-YJJMK5R5.js} +2 -2
  39. package/dist/{chunk-5FZBH3T5.js → chunk-YK7ZNV2C.js} +1 -1
  40. package/dist/{chunk-63GM4S25.js → chunk-YOLT2TPX.js} +1 -1
  41. package/dist/{chunk-LN4KPZIX.js → chunk-ZOEQL2YL.js} +2 -2
  42. package/dist/{chunk-LKA43GYA.js → chunk-ZW42VDR3.js} +1 -1
  43. package/dist/index.d.ts +2 -2
  44. package/dist/index.js +16 -16
  45. package/dist/meta.d.ts +1 -1
  46. package/dist/meta.js +7 -0
  47. package/dist/rich/ExcelUploadCard.js +3 -3
  48. package/dist/rich.d.ts +9 -1
  49. package/dist/rich.js +35 -27
  50. package/dist/{types-CMikpoN5.d.ts → types-CacjInOz.d.ts} +8 -1
  51. package/dist/widgets/ApprovalLineEditor.js +7 -7
  52. package/dist/widgets/ApprovalOverridesEditor.js +9 -9
  53. package/dist/widgets/ApprovalStepper.js +2 -2
  54. package/dist/widgets/AutocompleteField.js +7 -7
  55. package/dist/widgets/ColumnBoard.js +2 -2
  56. package/dist/widgets/DiffView.js +2 -2
  57. package/dist/widgets/Disclosure.js +2 -2
  58. package/dist/widgets/EventCalendar.js +3 -3
  59. package/dist/widgets/FileDropzone.js +5 -5
  60. package/dist/widgets/ImageLightbox.js +3 -3
  61. package/dist/widgets/InlineEdit.js +2 -2
  62. package/dist/widgets/JsonField.js +2 -2
  63. package/dist/widgets/OptionSchemaEditor.js +3 -3
  64. package/dist/widgets/OptionValueFields.js +3 -3
  65. package/dist/widgets/OrgChart.js +2 -2
  66. package/dist/widgets/OrgChartBoard.js +5 -5
  67. package/dist/widgets/PeriodFilter.js +4 -4
  68. package/dist/widgets/PermissionMatrixEditor.js +3 -3
  69. package/dist/widgets/PositionSelect.js +3 -3
  70. package/dist/widgets/PrintSheet.js +2 -2
  71. package/dist/widgets/ProfileEditDiffCard.js +3 -3
  72. package/dist/widgets/QRDisplay.js +3 -3
  73. package/dist/widgets/RankBoard.js +4 -4
  74. package/dist/widgets/RoleMemberPicker.js +4 -4
  75. package/dist/widgets/SearchableMultiPicker.js +5 -5
  76. package/dist/widgets/SecureScreen.js +2 -2
  77. package/dist/widgets/StagePeriodEditor.js +4 -4
  78. package/dist/widgets/TagInput.js +2 -2
  79. package/dist/widgets/TagMultiSelect.js +3 -3
  80. package/dist/widgets/Timeline.js +3 -3
  81. package/dist/widgets/TreePicker.js +6 -6
  82. package/dist/widgets/TreeView.js +5 -5
  83. package/dist/widgets/index.js +71 -71
  84. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Icon, Badge, Tooltip } from './chunk-OWM7E55U.js';
1
+ import { Icon, Badge, Tooltip } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import React from 'react';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { ellipsisStyle, unwrapRows } from './chunk-63GM4S25.js';
2
- import { includesLooseSearch } from './chunk-LN4KPZIX.js';
3
- import { useSduiAdapter, hostFetchOf } from './chunk-ZBX2CAOO.js';
4
- import { Icon, Button, Input, Spinner } from './chunk-OWM7E55U.js';
1
+ import { ellipsisStyle, unwrapRows } from './chunk-YOLT2TPX.js';
2
+ import { includesLooseSearch } from './chunk-ZOEQL2YL.js';
3
+ import { useSduiAdapter, hostFetchOf } from './chunk-XFNHHGFR.js';
4
+ import { Icon, Button, Input, Spinner } from './chunk-KIHN7DGA.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useId, useRef, useMemo, useState, useEffect } from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { DateRangePicker } from './chunk-4VQIKSDS.js';
2
- import { SegmentedControl, Select } from './chunk-OWM7E55U.js';
1
+ import { DateRangePicker } from './chunk-LKSGAILO.js';
2
+ import { SegmentedControl, Select } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,9 +1,9 @@
1
1
  import { parseJobPositionRow } from './chunk-XRHR452N.js';
2
2
  import { MIN_ZOOM, usePanZoomCanvas } from './chunk-XDR6HC4U.js';
3
- import { ImageLightbox } from './chunk-L6ODTHTX.js';
4
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
3
+ import { ImageLightbox } from './chunk-JDTVNS3H.js';
4
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
5
5
  import { useIsTabletDown } from './chunk-TAVKGYH5.js';
6
- import { warnOnce, Badge, Button, IconButton, Icon } from './chunk-OWM7E55U.js';
6
+ import { warnOnce, Badge, Button, IconButton, Icon } from './chunk-KIHN7DGA.js';
7
7
  import { boxed } from './chunk-3JTBOABA.js';
8
8
  import { useState, useMemo, useRef, useCallback, useEffect, useLayoutEffect } from 'react';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Text } from './chunk-5FZBH3T5.js';
2
- import { Field, Input, Select, IconButton, Button } from './chunk-OWM7E55U.js';
1
+ import { Text } from './chunk-YK7ZNV2C.js';
2
+ import { Field, Input, Select, IconButton, Button } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useMemo } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  import { fetchAllJobPositions } from './chunk-XRHR452N.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
3
- import { Select, Button } from './chunk-OWM7E55U.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
3
+ import { Select, Button } from './chunk-KIHN7DGA.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useRef, useState, useEffect, useMemo } from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Badge, Checkbox, IconButton, Icon } from './chunk-OWM7E55U.js';
1
+ import { Badge, Checkbox, IconButton, Icon } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState, useEffect } from 'react';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Icon, Badge } from './chunk-OWM7E55U.js';
1
+ import { Icon, Badge } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import React from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
3
3
  import { MOBILE_MEDIA_QUERY } from './chunk-TAVKGYH5.js';
4
- import { Icon, Badge, Checkbox, Select, Button } from './chunk-OWM7E55U.js';
4
+ import { Icon, Badge, Checkbox, Select, Button } from './chunk-KIHN7DGA.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useRef, useEffect, useState, useMemo } from 'react';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { IconButton, Input } from './chunk-OWM7E55U.js';
1
+ import { IconButton, Input } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState, useRef, useEffect, useCallback } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { usePanZoomCanvas, MIN_ZOOM, MAX_ZOOM } from './chunk-XDR6HC4U.js';
2
- import { IconButton, Badge } from './chunk-OWM7E55U.js';
2
+ import { IconButton, Badge } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo, useCallback, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { DatePicker, TimePicker } from './chunk-4VQIKSDS.js';
2
- import { Field } from './chunk-OWM7E55U.js';
1
+ import { DatePicker, TimePicker } from './chunk-LKSGAILO.js';
2
+ import { Field } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useRef, useEffect, useMemo } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Icon } from './chunk-OWM7E55U.js';
1
+ import { Icon } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useRef, useState, useEffect } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { ImageLightbox } from './chunk-L6ODTHTX.js';
2
- import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-ZBX2CAOO.js';
3
- import { Spinner, Icon, IconButton } from './chunk-OWM7E55U.js';
1
+ import { ImageLightbox } from './chunk-JDTVNS3H.js';
2
+ import { useSduiSandbox, useSduiAdapter, hostRawFetchOf, defaultAdapter, useSduiAssetResolver } from './chunk-XFNHHGFR.js';
3
+ import { Spinner, Icon, IconButton } from './chunk-KIHN7DGA.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useState, useRef, useEffect, useCallback } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { ImageViewer } from './chunk-JCG4575S.js';
1
+ import { ImageViewer } from './chunk-PN5IJPA5.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState } from 'react';
4
4
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { Spinner, EmptyState } from './chunk-OWM7E55U.js';
1
+ import { Spinner, EmptyState } from './chunk-KIHN7DGA.js';
2
2
  import { useState, useEffect } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { fetchAllJobPositions } from './chunk-XRHR452N.js';
2
- import { useSduiDispatch, useSduiCan, SduiDialog } from './chunk-FUNCQCKN.js';
3
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
4
- import { Card, Input, Button, Icon, Badge, IconButton } from './chunk-OWM7E55U.js';
2
+ import { useSduiDispatch, useSduiCan, SduiDialog } from './chunk-O3SD2HS6.js';
3
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
4
+ import { Card, Input, Button, Icon, Badge, IconButton } from './chunk-KIHN7DGA.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import React, { useState, useEffect, useCallback, useMemo } from 'react';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -149,6 +149,11 @@ var CALC_OPS = /* @__PURE__ */ new Set([
149
149
  "div",
150
150
  "percent",
151
151
  "count",
152
+ // 자리 맞춤 (신규) — 억원 소수 둘째 자리, 부가세 자동 분할(세액 = round(공급가액/10),
153
+ // 공급가액 = floor(합계×10/11)). 예전에는 반올림하는 연산이 percent(소수 한 자리) 하나뿐이었다
154
+ "round",
155
+ "floor",
156
+ "ceil",
152
157
  // 문자 (기존)
153
158
  "concat",
154
159
  "encode",
@@ -294,6 +299,33 @@ function formatNumberValue(value, digits) {
294
299
  maximumFractionDigits: fixed
295
300
  }).format(numeric);
296
301
  }
302
+ function roundingDigits(v) {
303
+ const wanted = toNumber(v);
304
+ if (!Number.isFinite(wanted)) return 0;
305
+ return Math.max(0, Math.min(6, Math.trunc(wanted)));
306
+ }
307
+ function shiftDecimal(value, places) {
308
+ const [mantissa, exponent = "0"] = String(value).split("e");
309
+ return Number(`${mantissa}e${Number(exponent) + places}`);
310
+ }
311
+ function roundToDigits(value, digits, mode = "round") {
312
+ if (!Number.isFinite(value)) return value;
313
+ if (Number.isInteger(value)) return value === 0 ? 0 : value;
314
+ const clean = Math.abs(value) < 1e15 ? Number(value.toPrecision(15)) : value;
315
+ const negative = clean < 0;
316
+ const shifted = shiftDecimal(Math.abs(clean), digits);
317
+ const whole = Math.floor(shifted);
318
+ const fraction = shifted - whole;
319
+ let magnitude;
320
+ if (mode === "round") {
321
+ magnitude = fraction >= 0.5 ? whole + 1 : whole;
322
+ } else {
323
+ const awayFromZero = mode === "floor" ? negative : !negative;
324
+ magnitude = awayFromZero && fraction > 0 ? whole + 1 : whole;
325
+ }
326
+ const result = shiftDecimal(magnitude, -digits);
327
+ return negative && result !== 0 ? -result : result;
328
+ }
297
329
  var DISPLAY_FORMATS = /* @__PURE__ */ new Set(["date", "datetime", "time", "number", "currency"]);
298
330
  function formatDisplayValue(value, format) {
299
331
  if (typeof value !== "string" && typeof value !== "number") return value;
@@ -377,6 +409,11 @@ function evaluateCalc(calc, resolved, resolve) {
377
409
  const [a, b] = resolved.map((v) => toNumber(v));
378
410
  return b === 0 ? 0 : Math.round(a / b * 1e3) / 10;
379
411
  }
412
+ /* ── 자리 맞춤 ── */
413
+ case "round":
414
+ case "floor":
415
+ case "ceil":
416
+ return roundToDigits(toNumber(first), roundingDigits(resolved[1]), op);
380
417
  /* ── 문자 ── */
381
418
  case "concat":
382
419
  return resolved.map((v) => v == null ? "" : String(v)).join("");
@@ -1,7 +1,7 @@
1
1
  import { OverlayContainerContext, getOverlayRoot, useOverlayLayer } from './chunk-R2ORCOTG.js';
2
2
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
3
- import { IconButton } from './chunk-OWM7E55U.js';
4
- import React2, { useState, useRef, useEffect, useLayoutEffect } from 'react';
3
+ import { IconButton } from './chunk-KIHN7DGA.js';
4
+ import React2, { useState, useRef, useEffect, useLayoutEffect, useCallback } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
  import { createPortal } from 'react-dom';
7
7
 
@@ -414,8 +414,49 @@ function useDismiss(open, hostRef, popRef, onDismiss) {
414
414
  }, [open, hostRef, popRef, onDismiss]);
415
415
  useOverlayLayer(open, () => onDismiss("escape"), hostRef);
416
416
  }
417
- function focusStaysInside(next, hostRef, popRef) {
418
- return next instanceof Node && Boolean(hostRef.current?.contains(next) || popRef.current?.contains(next));
417
+ var POINTER_SEQUENCE_MS = 1e3;
418
+ function usePanelPointer(popRef) {
419
+ const downRef = useRef(false);
420
+ const timerRef = useRef(void 0);
421
+ const clearRef = useRef(() => void 0);
422
+ const clear = useCallback(() => {
423
+ downRef.current = false;
424
+ if (typeof document !== "undefined") {
425
+ document.removeEventListener("click", clearRef.current, true);
426
+ document.removeEventListener("pointercancel", clearRef.current, true);
427
+ }
428
+ if (timerRef.current !== void 0) clearTimeout(timerRef.current);
429
+ timerRef.current = void 0;
430
+ }, []);
431
+ clearRef.current = clear;
432
+ const onPointerDownCapture = useCallback(() => {
433
+ downRef.current = true;
434
+ document.addEventListener("click", clearRef.current, true);
435
+ document.addEventListener("pointercancel", clearRef.current, true);
436
+ if (timerRef.current !== void 0) clearTimeout(timerRef.current);
437
+ timerRef.current = setTimeout(clearRef.current, POINTER_SEQUENCE_MS);
438
+ }, []);
439
+ const onClick = useCallback(
440
+ (event) => {
441
+ const target = event.target instanceof Element ? event.target.closest("button") : null;
442
+ if (!(target instanceof HTMLElement) || !target.isConnected || !popRef.current?.contains(target)) return;
443
+ const active = document.activeElement;
444
+ if (active && active !== document.body && !active.contains(target)) return;
445
+ if (active === target) return;
446
+ target.focus({ preventScroll: true });
447
+ },
448
+ [popRef]
449
+ );
450
+ useEffect(() => clear, [clear]);
451
+ return { interacting: () => downRef.current, panelProps: { onPointerDownCapture, onClick } };
452
+ }
453
+ function focusStaysInside(next, hostRef, popRef, pointer) {
454
+ const pointerInside = pointer !== void 0 && pointer.interacting();
455
+ if (next instanceof Node) {
456
+ if (hostRef.current?.contains(next) || popRef.current?.contains(next)) return true;
457
+ return pointerInside && popRef.current != null && next.contains(popRef.current);
458
+ }
459
+ return next === null && pointerInside;
419
460
  }
420
461
 
421
- export { AnchoredPopoverStyles, CalendarNav, CalendarZoom, KO_CALENDAR_NAV_LOCALE, anchorStyle, clampIndex, focusStaysInside, resolveCalendarNavLocale, useDismiss, usePopoverAnchor, usePortalTo };
462
+ export { AnchoredPopoverStyles, CalendarNav, CalendarZoom, KO_CALENDAR_NAV_LOCALE, anchorStyle, clampIndex, focusStaysInside, resolveCalendarNavLocale, useDismiss, usePanelPointer, usePopoverAnchor, usePortalTo };
@@ -1,8 +1,8 @@
1
- import { useDismiss, usePopoverAnchor, usePortalTo, CalendarNav, KO_CALENDAR_NAV_LOCALE, CalendarZoom, anchorStyle, AnchoredPopoverStyles } from './chunk-MUXGTVEA.js';
1
+ import { useDismiss, usePopoverAnchor, usePanelPointer, usePortalTo, CalendarNav, KO_CALENDAR_NAV_LOCALE, CalendarZoom, anchorStyle, AnchoredPopoverStyles } from './chunk-KJDHF6VU.js';
2
2
  import { tabbablesIn } from './chunk-R2ORCOTG.js';
3
3
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
4
4
  import { useIsMobile } from './chunk-TAVKGYH5.js';
5
- import { SegmentedControl, Button, Tag, EmptyState, Icon, Badge } from './chunk-OWM7E55U.js';
5
+ import { SegmentedControl, Button, Tag, EmptyState, Icon, Badge } from './chunk-KIHN7DGA.js';
6
6
  import { boxed } from './chunk-3JTBOABA.js';
7
7
  import { useState, useMemo, useRef, useCallback } from 'react';
8
8
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -322,6 +322,9 @@ var EventCalendarImpl = ({
322
322
  const dismissZoom = useCallback((reason) => closeZoom(reason === "escape"), [closeZoom]);
323
323
  useDismiss(zoomOpen, titleRef, zoomPopRef, dismissZoom);
324
324
  const zoomAnchor = usePopoverAnchor(zoomOpen, titleRef, zoomPopRef, ZOOM_HEIGHT);
325
+ const zoomPointer = usePanelPointer(zoomPopRef);
326
+ const navRef = useRef(null);
327
+ const navPointer = usePanelPointer(navRef);
325
328
  const portal = usePortalTo();
326
329
  const anchorDate = new Date(anchor);
327
330
  const anchorMonthIdx = anchorDate.getFullYear() * 12 + anchorDate.getMonth();
@@ -484,7 +487,7 @@ var EventCalendarImpl = ({
484
487
  ),
485
488
  /* @__PURE__ */ jsx(Button, { size: "sm", variant: "secondary", onClick: () => setDate(today), children: "\uC624\uB298" })
486
489
  ] }),
487
- /* @__PURE__ */ jsx("div", { className: "wp-evcal__nav", children: /* @__PURE__ */ jsx(
490
+ /* @__PURE__ */ jsx("div", { className: "wp-evcal__nav", ref: navRef, onClick: navPointer.panelProps.onClick, children: /* @__PURE__ */ jsx(
488
491
  CalendarNav,
489
492
  {
490
493
  size: "md",
@@ -791,9 +794,13 @@ var EventCalendarImpl = ({
791
794
  style: anchorStyle(zoomAnchor),
792
795
  role: "dialog",
793
796
  "aria-label": KO_CALENDAR_NAV_LOCALE.monthGridLabel,
797
+ ...zoomPointer.panelProps,
794
798
  onBlur: (event) => {
795
799
  const next = event.relatedTarget;
796
- if (next instanceof Node && !zoomPopRef.current?.contains(next) && next !== titleRef.current) closeZoom(false);
800
+ if (!(next instanceof Node) || zoomPopRef.current?.contains(next) || next === titleRef.current) return;
801
+ if (zoomPointer.interacting() && zoomPopRef.current && next.contains(zoomPopRef.current)) return;
802
+ if (titleRef.current && next.contains(titleRef.current)) return;
803
+ closeZoom(false);
797
804
  },
798
805
  onKeyDown: (event) => {
799
806
  if (event.key !== "Tab" || !zoomPopRef.current) return;
@@ -1,4 +1,4 @@
1
- import { Button } from './chunk-OWM7E55U.js';
1
+ import { Button } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useEffect, useState } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { KO_CALENDAR_NAV_LOCALE, useDismiss, usePopoverAnchor, usePortalTo, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-MUXGTVEA.js';
1
+ import { KO_CALENDAR_NAV_LOCALE, useDismiss, usePopoverAnchor, usePortalTo, usePanelPointer, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-KJDHF6VU.js';
2
2
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
3
3
  import { useIsMobile } from './chunk-TAVKGYH5.js';
4
- import { Icon } from './chunk-OWM7E55U.js';
4
+ import { Icon } from './chunk-KIHN7DGA.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import { useState, useRef, useEffect, useMemo, useCallback, useLayoutEffect } from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -68,6 +68,7 @@ function TimePickerImpl({
68
68
  useDismiss(open, hostRef, popRef, dismiss);
69
69
  const anchor = usePopoverAnchor(open, hostRef, popRef, LIST_HEIGHT);
70
70
  const portal = usePortalTo();
71
+ const pointer = usePanelPointer(popRef);
71
72
  const isInvalid = Boolean(invalid);
72
73
  const commit = (next) => {
73
74
  if (!isControlled) setInnerValue(next);
@@ -133,7 +134,7 @@ function TimePickerImpl({
133
134
  inputRef.current?.focus();
134
135
  };
135
136
  const handleBlur = (event) => {
136
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
137
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
137
138
  if (text !== currentValue) setText(currentValue);
138
139
  setOpen(false);
139
140
  };
@@ -179,6 +180,7 @@ function TimePickerImpl({
179
180
  style: anchorStyle(anchor),
180
181
  role: "listbox",
181
182
  "aria-label": listLabel,
183
+ ...pointer.panelProps,
182
184
  children: options.map((option, index) => /* @__PURE__ */ jsx(
183
185
  "button",
184
186
  {
@@ -650,6 +652,7 @@ function DatePickerImpl({
650
652
  useDismiss(open, hostRef, popRef, dismiss);
651
653
  const anchor = usePopoverAnchor(open, hostRef, popRef, CALENDAR_HEIGHT);
652
654
  const portal = usePortalTo();
655
+ const pointer = usePanelPointer(popRef);
653
656
  const isInvalid = Boolean(invalid);
654
657
  const commit = (wall) => {
655
658
  const emitZone = withTime && wall !== "" && (zoned ?? sawZone.current);
@@ -689,7 +692,7 @@ function DatePickerImpl({
689
692
  }
690
693
  };
691
694
  const handleBlur = (event) => {
692
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
695
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
693
696
  if (text !== fieldText) setText(fieldText);
694
697
  setOpen(false);
695
698
  };
@@ -725,6 +728,7 @@ function DatePickerImpl({
725
728
  style: anchorStyle(anchor),
726
729
  role: "dialog",
727
730
  "aria-label": loc.calendarLabel,
731
+ ...pointer.panelProps,
728
732
  children: /* @__PURE__ */ jsx("div", { className: "wp-dp-pop__body", children: /* @__PURE__ */ jsx(
729
733
  Calendar,
730
734
  {
@@ -802,6 +806,7 @@ function DateRangePickerImpl({
802
806
  useDismiss(open, hostRef, popRef, dismiss);
803
807
  const anchor = usePopoverAnchor(open, hostRef, popRef, CALENDAR_HEIGHT);
804
808
  const portal = usePortalTo();
809
+ const pointer = usePanelPointer(popRef);
805
810
  const isInvalid = Boolean(invalid);
806
811
  const commit = (nextFrom, nextTo) => {
807
812
  const next = { from: nextFrom || void 0, to: nextTo || void 0 };
@@ -852,7 +857,7 @@ function DateRangePickerImpl({
852
857
  }
853
858
  };
854
859
  const handleBlur = (event) => {
855
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
860
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
856
861
  if (fromText !== fromValue) setFromText(fromValue);
857
862
  if (toText !== toValue) setToText(toValue);
858
863
  setOpen(false);
@@ -934,6 +939,7 @@ function DateRangePickerImpl({
934
939
  style: anchorStyle(anchor),
935
940
  role: "dialog",
936
941
  "aria-label": loc.calendarLabel,
942
+ ...pointer.panelProps,
937
943
  children: /* @__PURE__ */ jsx("div", { className: "wp-dp-pop__body", children: /* @__PURE__ */ jsx(
938
944
  Calendar,
939
945
  {
@@ -1,4 +1,4 @@
1
- import { Icon } from './chunk-OWM7E55U.js';
1
+ import { Icon } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState, useId, useCallback } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { buildCascadingTree } from './chunk-LN4KPZIX.js';
2
- import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-OWM7E55U.js';
1
+ import { buildCascadingTree } from './chunk-ZOEQL2YL.js';
2
+ import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import React, { useMemo, useState, useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
- import { orderCircleStyle, ellipsisStyle, unwrapRows, uid } from './chunk-63GM4S25.js';
2
- import { includesLooseSearch } from './chunk-LN4KPZIX.js';
3
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
4
- import { Icon, Badge, IconButton, Field, Select, Input, Tag, Spinner, Button, isPlainObject } from './chunk-OWM7E55U.js';
1
+ import { orderCircleStyle, ellipsisStyle, unwrapRows, uid } from './chunk-YOLT2TPX.js';
2
+ import { includesLooseSearch } from './chunk-ZOEQL2YL.js';
3
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
4
+ import { Icon, Badge, IconButton, Field, Select, Input, Tag, Spinner, Button, isPlainObject } from './chunk-KIHN7DGA.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
6
  import React, { useState, useId, useRef, useEffect } from 'react';
7
7
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { OverlayLayer } from './chunk-R2ORCOTG.js';
2
- import { Dialog, Button, warnOnce } from './chunk-OWM7E55U.js';
2
+ import { Dialog, Button, warnOnce } from './chunk-KIHN7DGA.js';
3
3
  import { createContext, useContext, useMemo, useRef, useCallback, useState } from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -1,4 +1,4 @@
1
- import { Textarea, Icon } from './chunk-OWM7E55U.js';
1
+ import { Textarea, Icon } from './chunk-KIHN7DGA.js';
2
2
  import { boxed } from './chunk-3JTBOABA.js';
3
3
  import { useState, useRef, useId, useEffect, useCallback } from 'react';
4
4
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { useOverlayLayer, OverlayContainerContext, getOverlayRoot } from './chunk-R2ORCOTG.js';
2
- import { IconButton } from './chunk-OWM7E55U.js';
2
+ import { IconButton } from './chunk-KIHN7DGA.js';
3
3
  import { useState, useRef, useCallback, useEffect, useContext } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { resolveTreeNodes, TreeView } from './chunk-AP33B24H.js';
1
+ import { resolveTreeNodes, TreeView } from './chunk-MSPBNI2M.js';
2
2
  import { OverlayLayer } from './chunk-R2ORCOTG.js';
3
- import { Field, Dialog, Icon, Button, Input } from './chunk-OWM7E55U.js';
3
+ import { Field, Dialog, Icon, Button, Input } from './chunk-KIHN7DGA.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useState, useMemo } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { fetchAllPages } from './chunk-63GM4S25.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
3
- import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-OWM7E55U.js';
1
+ import { fetchAllPages } from './chunk-YOLT2TPX.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
3
+ import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-KIHN7DGA.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import { useRef, useMemo, useState, useCallback, useEffect } from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,8 +1,8 @@
1
- import { TagMultiSelect } from './chunk-LKL3SCBJ.js';
2
- import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-DCSUBFFG.js';
3
- import { orderCircleStyle, unwrapRows, uid } from './chunk-63GM4S25.js';
4
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
5
- import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-OWM7E55U.js';
1
+ import { TagMultiSelect } from './chunk-TCHXA35K.js';
2
+ import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-NLN5SLU7.js';
3
+ import { orderCircleStyle, unwrapRows, uid } from './chunk-YOLT2TPX.js';
4
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
5
+ import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-KIHN7DGA.js';
6
6
  import { boxed } from './chunk-3JTBOABA.js';
7
7
  import React, { useRef, useState, useEffect } from 'react';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { useSduiAdapter, hostFetchOf } from './chunk-ZBX2CAOO.js';
2
- import { Badge, Tag } from './chunk-OWM7E55U.js';
1
+ import { useSduiAdapter, hostFetchOf } from './chunk-XFNHHGFR.js';
2
+ import { Badge, Tag } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useRef, useEffect, useMemo, useState } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Text } from './chunk-5FZBH3T5.js';
2
- import { Switch, Field, Select, Input } from './chunk-OWM7E55U.js';
1
+ import { Text } from './chunk-YK7ZNV2C.js';
2
+ import { Switch, Field, Select, Input } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import React, { useMemo } from 'react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { useSduiAssetResolver } from './chunk-ZBX2CAOO.js';
2
- import { Spinner, Icon } from './chunk-OWM7E55U.js';
1
+ import { useSduiAssetResolver } from './chunk-XFNHHGFR.js';
2
+ import { Spinner, Icon } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
- import { includesLooseSearch } from './chunk-LN4KPZIX.js';
1
+ import { includesLooseSearch } from './chunk-ZOEQL2YL.js';
2
2
  import { OverlayLayer } from './chunk-R2ORCOTG.js';
3
- import { Button, Dialog, Input, Tag, Checkbox } from './chunk-OWM7E55U.js';
3
+ import { Button, Dialog, Input, Tag, Checkbox } from './chunk-KIHN7DGA.js';
4
4
  import { boxed } from './chunk-3JTBOABA.js';
5
5
  import React, { useMemo, useState } from 'react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
2
- import { Spinner, Badge, Icon } from './chunk-OWM7E55U.js';
1
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-XFNHHGFR.js';
2
+ import { Spinner, Badge, Icon } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
1
  import { DEV } from './chunk-TAVKGYH5.js';
2
- import { warnOnce } from './chunk-OWM7E55U.js';
2
+ import { warnOnce } from './chunk-KIHN7DGA.js';
3
3
  import { createContext, useContext } from 'react';
4
4
 
5
5
  function isSafeNavigationTarget(to) {
@@ -1,5 +1,5 @@
1
- import { Disclosure } from './chunk-P62INTQ5.js';
2
- import { Icon } from './chunk-OWM7E55U.js';
1
+ import { Disclosure } from './chunk-LONXOEZY.js';
2
+ import { Icon } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
 
@@ -1,4 +1,4 @@
1
- import { formatDisplayValue } from './chunk-OWM7E55U.js';
1
+ import { formatDisplayValue } from './chunk-KIHN7DGA.js';
2
2
  import { mergeStyle, containerLayoutStyle, joinClass, columnsClass, typographyStyle, GAP_CSS } from './chunk-3JTBOABA.js';
3
3
  import React from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { isPlainObject } from './chunk-OWM7E55U.js';
1
+ import { isPlainObject } from './chunk-KIHN7DGA.js';
2
2
 
3
3
  // src/widgets/shared.ts
4
4
  function unwrapRows(payload) {
@@ -1,7 +1,7 @@
1
- import { DateRangePicker } from './chunk-4VQIKSDS.js';
1
+ import { DateRangePicker } from './chunk-LKSGAILO.js';
2
2
  import { useOverlayLayer } from './chunk-R2ORCOTG.js';
3
3
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
4
- import { Input, Button, IconButton, Tag, Field, Checkbox } from './chunk-OWM7E55U.js';
4
+ import { Input, Button, IconButton, Tag, Field, Checkbox } from './chunk-KIHN7DGA.js';
5
5
  import { useRef, useEffect, useState, useMemo } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { Tag } from './chunk-OWM7E55U.js';
2
+ import { Tag } from './chunk-KIHN7DGA.js';
3
3
  import { boxed } from './chunk-3JTBOABA.js';
4
4
  import { useState, useMemo, useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { CSSProperties, ReactNode, ComponentType } from 'react';
3
- import { S as SduiPage, a as SduiAction, b as SduiPropValue, c as SduiRule } from './types-CMikpoN5.js';
4
- export { d as SduiArgRef, e as SduiCalcRef, f as SduiChild, g as SduiIndexRef, h as SduiItemRef, i as SduiNode, j as SduiPageQuery, k as SduiScalar, l as SduiStateRef } from './types-CMikpoN5.js';
3
+ import { S as SduiPage, a as SduiAction, b as SduiPropValue, c as SduiRule } from './types-CacjInOz.js';
4
+ export { d as SduiArgRef, e as SduiCalcRef, f as SduiChild, g as SduiIndexRef, h as SduiItemRef, i as SduiNode, j as SduiPageQuery, k as SduiScalar, l as SduiStateRef } from './types-CacjInOz.js';
5
5
  import { S as SduiBoxProps, a as SduiContainerLayoutProps, b as SduiColumnsScale, c as SduiGapScale, d as SduiWeightScale, e as SduiTextAlignScale } from './layout-DmRikwZb.js';
6
6
  export { C as CHILD_LAYOUT_PROPS, L as LAYOUT_CSS, f as SduiAlignScale, g as SduiChildLayoutProps, h as SduiSizeScale, i as SduiSpanScale, j as childLayoutFrom, k as columnsClass, l as containerLayoutStyle, m as joinClass, n as mergeStyle, t as typographyStyle } from './layout-DmRikwZb.js';
7
7
  import { D as DatePickerProps, a as DateRangePickerProps, T as TimePickerProps } from './DatePicker-BOOKdd5x.js';