@wipco/sdui 1.6.1 → 1.7.1

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 (95) hide show
  1. package/dist/{DatePicker-DX9juElE.d.ts → DatePicker-BOOKdd5x.d.ts} +6 -6
  2. package/dist/calendar-nav-BSGsgJc4.d.ts +54 -0
  3. package/dist/{chunk-OKNF2SBB.js → chunk-2FHNGMBT.js} +3 -3
  4. package/dist/{chunk-AJ3KDBEE.js → chunk-466W3XNK.js} +1 -1
  5. package/dist/{chunk-UC725BGW.js → chunk-5FZBH3T5.js} +1 -1
  6. package/dist/{chunk-XUVWIRZJ.js → chunk-5LIFU57A.js} +2 -2
  7. package/dist/{chunk-VAXRTBJH.js → chunk-63GM4S25.js} +1 -1
  8. package/dist/{chunk-KO3EUNWB.js → chunk-7YTZB5LQ.js} +3 -3
  9. package/dist/{chunk-SGGIWPP6.js → chunk-7ZCM6XEM.js} +2 -2
  10. package/dist/{chunk-IIRVHSNK.js → chunk-A3SO6H47.js} +2 -2
  11. package/dist/{chunk-VSNHDHGS.js → chunk-B5MB64YQ.js} +209 -25
  12. package/dist/{chunk-US3K6Q5T.js → chunk-ENZBX4AR.js} +1 -1
  13. package/dist/{chunk-CUFGH3LB.js → chunk-FGKBXUUA.js} +1 -1
  14. package/dist/{chunk-VR5MFUD2.js → chunk-FUNCQCKN.js} +2 -2
  15. package/dist/{chunk-O4EMQWCV.js → chunk-FYVDPEJU.js} +120 -26
  16. package/dist/{chunk-GKYUDTMI.js → chunk-J6YDTBKY.js} +2 -2
  17. package/dist/{chunk-UZZLMPRW.js → chunk-JCG4575S.js} +2 -2
  18. package/dist/{chunk-34BABTH4.js → chunk-JMNUFA5M.js} +1 -1
  19. package/dist/{chunk-FP32LNFK.js → chunk-KAQ2VZBM.js} +166 -193
  20. package/dist/{chunk-A57GKV5F.js → chunk-KXTQOP3E.js} +3 -3
  21. package/dist/{chunk-3PT5OBOU.js → chunk-L6ODTHTX.js} +1 -1
  22. package/dist/{chunk-OQ7A3SFM.js → chunk-LKA43GYA.js} +1 -1
  23. package/dist/{chunk-GSXD52XG.js → chunk-LKL3SCBJ.js} +2 -2
  24. package/dist/{chunk-J7BZF4T4.js → chunk-MANONABB.js} +4 -4
  25. package/dist/{chunk-XFKNU6QN.js → chunk-NI3LMETK.js} +2 -2
  26. package/dist/{chunk-ESAFQXEU.js → chunk-NJTIJAFU.js} +2 -2
  27. package/dist/{chunk-PCFH74RD.js → chunk-NQDHGK7C.js} +3 -3
  28. package/dist/{chunk-YYAGE733.js → chunk-OWM7E55U.js} +8 -0
  29. package/dist/{chunk-OCYJ2ZOV.js → chunk-P62INTQ5.js} +1 -1
  30. package/dist/{chunk-7G6J6QFC.js → chunk-Q56LZJFX.js} +1 -1
  31. package/dist/{chunk-KDKRFWIF.js → chunk-QAGJ6FRE.js} +5 -5
  32. package/dist/chunk-QVNJMZUF.js +462 -0
  33. package/dist/{chunk-BITS7UJY.js → chunk-R2ORCOTG.js} +2 -2
  34. package/dist/{chunk-VQKX5PJ4.js → chunk-RA74PUMP.js} +3 -3
  35. package/dist/{chunk-USNPJEXH.js → chunk-RJYPRWWS.js} +4 -4
  36. package/dist/{chunk-TB7G5DXQ.js → chunk-S6GJRP5T.js} +2 -2
  37. package/dist/{chunk-TWUKNUUQ.js → chunk-SGR2QDEG.js} +2 -2
  38. package/dist/{chunk-3PCR73OC.js → chunk-T5LLOSHE.js} +3 -3
  39. package/dist/{chunk-GSM664TX.js → chunk-TAVKGYH5.js} +24 -1
  40. package/dist/{chunk-BV37UCDF.js → chunk-UBVYPV7H.js} +2 -2
  41. package/dist/chunk-VR4DQTWR.js +391 -0
  42. package/dist/{chunk-6YBSBC77.js → chunk-WPAZBAUW.js} +1 -1
  43. package/dist/{chunk-4YPPL7JK.js → chunk-WTQH2NI2.js} +1 -1
  44. package/dist/{chunk-NLSR3JYU.js → chunk-X7RSKFWF.js} +1 -1
  45. package/dist/{chunk-CSZCWBOE.js → chunk-XDR6HC4U.js} +14 -7
  46. package/dist/{chunk-EUSC5NMZ.js → chunk-Z4JZUIKE.js} +3 -3
  47. package/dist/{chunk-EGFDELSF.js → chunk-Z4LFZWHH.js} +2 -2
  48. package/dist/{chunk-JHFA5RDN.js → chunk-ZBX2CAOO.js} +2 -2
  49. package/dist/index.d.ts +22 -2
  50. package/dist/index.js +27 -19
  51. package/dist/meta.js +14 -1
  52. package/dist/rich/ExcelUploadCard.js +4 -4
  53. package/dist/rich.d.ts +2 -1
  54. package/dist/rich.js +7 -6
  55. package/dist/styles.css +10 -0
  56. package/dist/widgets/ApprovalLineEditor.js +9 -8
  57. package/dist/widgets/ApprovalOverridesEditor.js +11 -10
  58. package/dist/widgets/ApprovalStepper.js +2 -2
  59. package/dist/widgets/AutocompleteField.js +9 -8
  60. package/dist/widgets/ColumnBoard.js +2 -2
  61. package/dist/widgets/DiffView.js +2 -2
  62. package/dist/widgets/Disclosure.js +2 -2
  63. package/dist/widgets/EventCalendar.d.ts +14 -10
  64. package/dist/widgets/EventCalendar.js +5 -3
  65. package/dist/widgets/FileDropzone.js +7 -7
  66. package/dist/widgets/ImageLightbox.js +5 -5
  67. package/dist/widgets/InlineEdit.js +2 -2
  68. package/dist/widgets/JsonField.js +2 -2
  69. package/dist/widgets/OptionSchemaEditor.js +3 -3
  70. package/dist/widgets/OptionValueFields.js +3 -3
  71. package/dist/widgets/OrgChart.js +3 -3
  72. package/dist/widgets/OrgChartBoard.d.ts +57 -4
  73. package/dist/widgets/OrgChartBoard.js +8 -8
  74. package/dist/widgets/PeriodFilter.js +6 -5
  75. package/dist/widgets/PermissionMatrixEditor.js +4 -4
  76. package/dist/widgets/PositionSelect.js +4 -4
  77. package/dist/widgets/PrintSheet.js +2 -2
  78. package/dist/widgets/ProfileEditDiffCard.js +4 -4
  79. package/dist/widgets/QRDisplay.js +4 -4
  80. package/dist/widgets/RankBoard.js +6 -6
  81. package/dist/widgets/RecordSheet.d.ts +48 -1
  82. package/dist/widgets/RecordSheet.js +2 -1
  83. package/dist/widgets/RoleMemberPicker.js +5 -5
  84. package/dist/widgets/SearchableMultiPicker.js +7 -6
  85. package/dist/widgets/SecureScreen.js +2 -2
  86. package/dist/widgets/StagePeriodEditor.js +6 -5
  87. package/dist/widgets/TagInput.js +2 -2
  88. package/dist/widgets/TagMultiSelect.js +4 -4
  89. package/dist/widgets/Timeline.js +3 -3
  90. package/dist/widgets/TreePicker.js +8 -7
  91. package/dist/widgets/TreeView.js +7 -6
  92. package/dist/widgets/index.d.ts +1 -0
  93. package/dist/widgets/index.js +76 -75
  94. package/package.json +1 -1
  95. package/dist/chunk-IB2ZPUTF.js +0 -172
@@ -1,103 +1,11 @@
1
- import { useOverlayLayer, OverlayContainerContext, getOverlayRoot } from './chunk-BITS7UJY.js';
1
+ import { KO_CALENDAR_NAV_LOCALE, useDismiss, usePopoverAnchor, usePortalTo, usePanelPointer, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-QVNJMZUF.js';
2
2
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
3
- import { useIsMobile } from './chunk-GSM664TX.js';
4
- import { Icon } from './chunk-YYAGE733.js';
3
+ import { useIsMobile } from './chunk-TAVKGYH5.js';
4
+ import { Icon } from './chunk-OWM7E55U.js';
5
5
  import { boxed } from './chunk-3JTBOABA.js';
6
- import React, { useState, useRef, useEffect, useMemo, useCallback, useLayoutEffect } from 'react';
7
- import { createPortal } from 'react-dom';
6
+ import { useState, useRef, useEffect, useMemo, useCallback, useLayoutEffect } from 'react';
8
7
  import { jsxs, jsx } from 'react/jsx-runtime';
9
8
 
10
- var ANCHOR_GAP = 8;
11
- var VIEWPORT_EDGE = 8;
12
- function anchorTo(rect, viewportHeight, height) {
13
- const below = viewportHeight - rect.bottom;
14
- const up = below < height && rect.top > below;
15
- const room = (up ? rect.top : below) - ANCHOR_GAP - VIEWPORT_EDGE;
16
- return {
17
- left: rect.left,
18
- top: up ? void 0 : rect.bottom + ANCHOR_GAP,
19
- bottom: up ? viewportHeight - rect.top + ANCHOR_GAP : void 0,
20
- minWidth: rect.width,
21
- available: Math.max(MIN_AVAILABLE, Math.floor(room))
22
- };
23
- }
24
- var MIN_AVAILABLE = 120;
25
- function anchorToHost(host, height) {
26
- if (!host || typeof window === "undefined") return null;
27
- return anchorTo(host.getBoundingClientRect(), window.innerHeight, height);
28
- }
29
- function usePopoverAnchor(open, hostRef, popRef, height) {
30
- const [anchor, setAnchor] = useState(null);
31
- useLayoutEffect(() => {
32
- if (!open) {
33
- setAnchor(null);
34
- return;
35
- }
36
- const place = () => setAnchor(anchorToHost(hostRef.current, height));
37
- place();
38
- window.addEventListener("scroll", place, true);
39
- window.addEventListener("resize", place);
40
- return () => {
41
- window.removeEventListener("scroll", place, true);
42
- window.removeEventListener("resize", place);
43
- };
44
- }, [open, hostRef, height]);
45
- useLayoutEffect(() => {
46
- const el = popRef.current;
47
- if (!open || !el || !anchor) return;
48
- const overflow = el.getBoundingClientRect().right - (window.innerWidth - VIEWPORT_EDGE);
49
- if (overflow <= 1) return;
50
- setAnchor((prev) => {
51
- if (!prev) return prev;
52
- const left = Math.max(VIEWPORT_EDGE, prev.left - overflow);
53
- return Math.abs(left - prev.left) < 1 ? prev : { ...prev, left };
54
- });
55
- }, [open, anchor, popRef]);
56
- return anchor;
57
- }
58
- function AnchoredPopoverStyles() {
59
- return /* @__PURE__ */ jsx(HoistedStyle, { id: "wp-anchored-pop", css: ANCHORED_POP_CSS });
60
- }
61
- var ANCHORED_POP_CSS = `
62
- .wp-anchored-pop{position:fixed;width:max-content;max-width:min(92vw,400px);background:var(--wp-surface-card);border:1px solid var(--wp-border-subtle);border-radius:var(--wp-radius-lg);box-shadow:var(--wp-shadow-lg);z-index:var(--wp-z-dialog);pointer-events:auto}
63
- `;
64
- function anchorStyle(anchor) {
65
- if (!anchor) return void 0;
66
- const style = {
67
- left: anchor.left,
68
- top: anchor.top,
69
- bottom: anchor.bottom,
70
- minWidth: anchor.minWidth
71
- };
72
- if (anchor.available !== void 0) style["--wp-pop-avail"] = `${anchor.available}px`;
73
- return style;
74
- }
75
- function usePortalTo() {
76
- const container = React.useContext(OverlayContainerContext);
77
- return (anchor, node) => {
78
- if (!anchor) return null;
79
- const root = container ?? getOverlayRoot();
80
- return root ? createPortal(node, root) : node;
81
- };
82
- }
83
- function useDismiss(open, hostRef, popRef, onDismiss) {
84
- useEffect(() => {
85
- if (!open) return;
86
- const handlePointerDown = (event) => {
87
- const target = event.target;
88
- if (target instanceof Node && (hostRef.current?.contains(target) || popRef.current?.contains(target))) return;
89
- onDismiss("outside");
90
- };
91
- document.addEventListener("pointerdown", handlePointerDown);
92
- return () => {
93
- document.removeEventListener("pointerdown", handlePointerDown);
94
- };
95
- }, [open, hostRef, popRef, onDismiss]);
96
- useOverlayLayer(open, () => onDismiss("escape"), hostRef);
97
- }
98
- function focusStaysInside(next, hostRef, popRef) {
99
- return next instanceof Node && Boolean(hostRef.current?.contains(next) || popRef.current?.contains(next));
100
- }
101
9
  var HM_RE = /^\d{2}:\d{2}$/;
102
10
  var LIST_HEIGHT = 260;
103
11
  var MINUTES_PER_DAY = 24 * 60;
@@ -160,6 +68,7 @@ function TimePickerImpl({
160
68
  useDismiss(open, hostRef, popRef, dismiss);
161
69
  const anchor = usePopoverAnchor(open, hostRef, popRef, LIST_HEIGHT);
162
70
  const portal = usePortalTo();
71
+ const pointer = usePanelPointer(popRef);
163
72
  const isInvalid = Boolean(invalid);
164
73
  const commit = (next) => {
165
74
  if (!isControlled) setInnerValue(next);
@@ -225,7 +134,7 @@ function TimePickerImpl({
225
134
  inputRef.current?.focus();
226
135
  };
227
136
  const handleBlur = (event) => {
228
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
137
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
229
138
  if (text !== currentValue) setText(currentValue);
230
139
  setOpen(false);
231
140
  };
@@ -271,6 +180,7 @@ function TimePickerImpl({
271
180
  style: anchorStyle(anchor),
272
181
  role: "listbox",
273
182
  "aria-label": listLabel,
183
+ ...pointer.panelProps,
274
184
  children: options.map((option, index) => /* @__PURE__ */ jsx(
275
185
  "button",
276
186
  {
@@ -413,22 +323,18 @@ function toFieldValue(text, withTime) {
413
323
  return `${date}T${time}`;
414
324
  }
415
325
  var KO_LOCALE = {
326
+ ...KO_CALENDAR_NAV_LOCALE,
416
327
  weekdays: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
417
328
  weekStartsOn: 0,
418
- formatCaption: (year, month) => `${year}\uB144 ${month}\uC6D4`,
419
- prevMonthLabel: "\uC774\uC804 \uB2EC",
420
- nextMonthLabel: "\uB2E4\uC74C \uB2EC",
421
329
  calendarLabel: "\uB0A0\uC9DC \uC120\uD0DD \uB2EC\uB825",
422
330
  startLabel: "\uC2DC\uC791\uC77C",
423
331
  endLabel: "\uC885\uB8CC\uC77C"
424
332
  };
425
333
  function resolveLocale(locale, calendarLabel) {
426
334
  return {
335
+ ...resolveCalendarNavLocale(locale),
427
336
  weekdays: locale?.weekdays ?? KO_LOCALE.weekdays,
428
337
  weekStartsOn: locale?.weekStartsOn ?? KO_LOCALE.weekStartsOn,
429
- formatCaption: locale?.formatCaption ?? KO_LOCALE.formatCaption,
430
- prevMonthLabel: locale?.prevMonthLabel ?? KO_LOCALE.prevMonthLabel,
431
- nextMonthLabel: locale?.nextMonthLabel ?? KO_LOCALE.nextMonthLabel,
432
338
  calendarLabel: locale?.calendarLabel ?? calendarLabel,
433
339
  startLabel: locale?.startLabel ?? KO_LOCALE.startLabel,
434
340
  endLabel: locale?.endLabel ?? KO_LOCALE.endLabel
@@ -454,6 +360,12 @@ function buildMonthCells(index, min, max, weekStartsOn = 0) {
454
360
  }
455
361
  return weeks;
456
362
  }
363
+ function sameDayInMonth(date, index) {
364
+ const first = monthStart(index);
365
+ const lastDay = new Date(first.getFullYear(), first.getMonth() + 1, 0).getDate();
366
+ first.setDate(Math.min(date.getDate(), lastDay));
367
+ return first;
368
+ }
457
369
  function clampViewToFocus(focusIdx, viewIdx, monthCount) {
458
370
  return focusIdx < viewIdx ? focusIdx : focusIdx > viewIdx + monthCount - 1 ? focusIdx - monthCount + 1 : viewIdx;
459
371
  }
@@ -466,15 +378,20 @@ function Calendar({
466
378
  focusDate,
467
379
  onFocusDateChange,
468
380
  autoFocus = false,
469
- locale
381
+ locale,
382
+ selectedDates = []
470
383
  }) {
471
384
  const focusIdx = monthIndex(focusDate);
472
385
  const [viewIdx, setViewIdx] = useState(focusIdx);
386
+ const [zoom, setZoom] = useState(null);
473
387
  const gridRef = useRef(null);
474
388
  const focusYmd = formatYmd(focusDate);
475
389
  const visibleIdx = clampViewToFocus(focusIdx, viewIdx, monthCount);
476
390
  if (visibleIdx !== viewIdx) setViewIdx(visibleIdx);
477
- const claimFocusRef = useRef(autoFocus);
391
+ const claimFocusRef = useRef(false);
392
+ useEffect(() => {
393
+ if (autoFocus) gridRef.current?.querySelector('[tabindex="0"]')?.focus();
394
+ }, []);
478
395
  useLayoutEffect(() => {
479
396
  const grid = gridRef.current;
480
397
  if (!grid) return;
@@ -489,17 +406,52 @@ function Calendar({
489
406
  const maxIdx = maxDate ? monthIndex(maxDate) : Infinity;
490
407
  const prevDisabled = visibleIdx <= minIdx;
491
408
  const nextDisabled = visibleIdx + monthCount - 1 >= maxIdx;
409
+ const lastViewIdx = Math.max(minIdx, maxIdx - monthCount + 1);
410
+ const clampView = (idx) => clampIndex(idx, minIdx, lastViewIdx);
492
411
  const moveFocus = (next) => {
493
412
  onFocusDateChange(clampDate(next, minDate, maxDate));
494
413
  };
495
414
  const moveView = (delta) => {
496
- setViewIdx(visibleIdx + delta);
497
- moveFocus(addMonths(focusDate, delta));
415
+ const target = clampView(visibleIdx + delta);
416
+ const actual = target - visibleIdx;
417
+ if (actual === 0) return;
418
+ setViewIdx(target);
419
+ moveFocus(addMonths(focusDate, actual));
420
+ };
421
+ const refocusDayRef = useRef(false);
422
+ useLayoutEffect(() => {
423
+ if (zoom !== null || !refocusDayRef.current) return;
424
+ refocusDayRef.current = false;
425
+ gridRef.current?.querySelector('.wp-dp__day-btn[tabindex="0"]')?.focus();
426
+ }, [zoom]);
427
+ const openZoom = (offset) => {
428
+ const months = Array.from(gridRef.current?.querySelectorAll(".wp-dp__month") ?? []);
429
+ let size;
430
+ if (months.length > 0) {
431
+ const rects = months.map((month) => month.getBoundingClientRect());
432
+ const width = rects[rects.length - 1].right - rects[0].left;
433
+ const height = Math.max(...rects.map((rect) => rect.height));
434
+ if (width > 0 && height > 0) size = { width, height };
435
+ }
436
+ setZoom({ offset, openedAt: focusYmd, followed: false, size });
437
+ };
438
+ useEffect(() => {
439
+ if (zoom && !zoom.followed && focusYmd !== zoom.openedAt) setZoom({ ...zoom, followed: true });
440
+ }, [focusYmd, zoom]);
441
+ const leaveZoom = (pickedIdx) => {
442
+ if (pickedIdx !== void 0 && zoom) {
443
+ setViewIdx(clampView(pickedIdx - zoom.offset));
444
+ moveFocus(sameDayInMonth(focusDate, pickedIdx));
445
+ }
446
+ refocusDayRef.current = true;
447
+ setZoom(null);
498
448
  };
499
449
  const handleKeyDown = (event) => {
500
450
  const deltaDays = event.key === "ArrowLeft" ? -1 : event.key === "ArrowRight" ? 1 : event.key === "ArrowUp" ? -7 : event.key === "ArrowDown" ? 7 : 0;
451
+ const fromDay = event.target instanceof HTMLElement && event.target.classList.contains("wp-dp__day-btn");
501
452
  if (deltaDays !== 0) {
502
453
  event.preventDefault();
454
+ if (fromDay) claimFocusRef.current = true;
503
455
  moveFocus(addDays(focusDate, deltaDays));
504
456
  return;
505
457
  }
@@ -512,90 +464,102 @@ function Calendar({
512
464
  }
513
465
  if (event.key === "PageUp" || event.key === "PageDown") {
514
466
  event.preventDefault();
467
+ if (fromDay) claimFocusRef.current = true;
515
468
  moveFocus(addMonths(focusDate, event.key === "PageUp" ? -1 : 1));
516
469
  }
517
470
  };
518
- return /* @__PURE__ */ jsx("div", { className: "wp-dp", children: /* @__PURE__ */ jsxs("div", { className: "wp-dp__months", ref: gridRef, onKeyDown: handleKeyDown, children: [
519
- /* @__PURE__ */ jsxs("div", { className: "wp-dp__nav", children: [
471
+ if (zoom) {
472
+ return /* @__PURE__ */ jsx("div", { className: "wp-dp", children: /* @__PURE__ */ jsx("div", { className: "wp-dp__months", ref: gridRef, onKeyDown: handleKeyDown, children: /* @__PURE__ */ jsx(
473
+ CalendarZoom,
474
+ {
475
+ className: "wp-dp__zoom",
476
+ style: zoom.size ? { minWidth: zoom.size.width, minHeight: zoom.size.height } : void 0,
477
+ monthIndex: zoom.followed ? focusIdx : visibleIdx + zoom.offset,
478
+ selectedMonthIndexes: selectedDates.map(monthIndex),
479
+ minMonthIndex: minIdx,
480
+ maxMonthIndex: maxIdx,
481
+ onPick: leaveZoom,
482
+ onExit: () => leaveZoom(),
483
+ autoFocus: true,
484
+ locale
485
+ }
486
+ ) }) });
487
+ }
488
+ const navLabels = {
489
+ prevBig: locale.prevYearLabel,
490
+ prev: locale.prevMonthLabel,
491
+ next: locale.nextMonthLabel,
492
+ nextBig: locale.nextYearLabel
493
+ };
494
+ const navDisabled = { prevBig: prevDisabled, prev: prevDisabled, next: nextDisabled, nextBig: nextDisabled };
495
+ const step = (which) => moveView(which === "prevBig" ? -12 : which === "prev" ? -1 : which === "next" ? 1 : 12);
496
+ return /* @__PURE__ */ jsx("div", { className: "wp-dp", children: /* @__PURE__ */ jsx("div", { className: "wp-dp__months", ref: gridRef, onKeyDown: handleKeyDown, children: Array.from({ length: monthCount }, (_, offset) => {
497
+ const idx = visibleIdx + offset;
498
+ const first = monthStart(idx);
499
+ const weeks = buildMonthCells(idx, minDate, maxDate, locale.weekStartsOn);
500
+ const caption = locale.formatCaption(first.getFullYear(), first.getMonth() + 1);
501
+ const sides = monthCount === 1 ? "both" : offset === 0 ? "start" : offset === monthCount - 1 ? "end" : "none";
502
+ return /* @__PURE__ */ jsxs("div", { className: "wp-dp__month", children: [
520
503
  /* @__PURE__ */ jsx(
521
- "button",
504
+ CalendarNav,
522
505
  {
523
- type: "button",
524
- className: "wp-dp__navbtn",
525
- "aria-label": locale.prevMonthLabel,
526
- "aria-disabled": prevDisabled || void 0,
527
- disabled: prevDisabled,
528
- onClick: () => moveView(-1),
529
- children: /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: 16 })
506
+ className: "wp-dp__nav",
507
+ size: "sm",
508
+ title: caption,
509
+ sides,
510
+ labels: navLabels,
511
+ disabled: navDisabled,
512
+ onStep: step,
513
+ onZoomOut: () => openZoom(offset),
514
+ zoomLabel: locale.zoomLabel
530
515
  }
531
516
  ),
532
- /* @__PURE__ */ jsx(
533
- "button",
534
- {
535
- type: "button",
536
- className: "wp-dp__navbtn",
537
- "aria-label": locale.nextMonthLabel,
538
- "aria-disabled": nextDisabled || void 0,
539
- disabled: nextDisabled,
540
- onClick: () => moveView(1),
541
- children: /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: 16 })
542
- }
543
- )
544
- ] }),
545
- Array.from({ length: monthCount }, (_, offset) => {
546
- const idx = visibleIdx + offset;
547
- const first = monthStart(idx);
548
- const weeks = buildMonthCells(idx, minDate, maxDate, locale.weekStartsOn);
549
- const caption = locale.formatCaption(first.getFullYear(), first.getMonth() + 1);
550
- return /* @__PURE__ */ jsxs("div", { className: "wp-dp__month", children: [
551
- /* @__PURE__ */ jsx("div", { className: "wp-dp__caption", children: /* @__PURE__ */ jsx("span", { className: "wp-dp__caption-label", children: caption }) }),
552
- /* @__PURE__ */ jsxs("table", { className: "wp-dp__grid", role: "grid", "aria-label": caption, children: [
553
- /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "wp-dp__weekdays", children: Array.from({ length: 7 }, (_2, col) => {
554
- const day = (locale.weekStartsOn + col) % 7;
555
- const name = locale.weekdays[day] ?? "";
556
- return /* @__PURE__ */ jsx(
557
- "th",
558
- {
559
- scope: "col",
560
- className: day === 0 ? "wp-dp__weekday wp-dp__weekday--sun" : "wp-dp__weekday",
561
- abbr: name,
562
- children: name
517
+ /* @__PURE__ */ jsxs("table", { className: "wp-dp__grid", role: "grid", "aria-label": caption, children: [
518
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "wp-dp__weekdays", children: Array.from({ length: 7 }, (_2, col) => {
519
+ const day = (locale.weekStartsOn + col) % 7;
520
+ const name = locale.weekdays[day] ?? "";
521
+ return /* @__PURE__ */ jsx(
522
+ "th",
523
+ {
524
+ scope: "col",
525
+ className: day === 0 ? "wp-dp__weekday wp-dp__weekday--sun" : "wp-dp__weekday",
526
+ abbr: name,
527
+ children: name
528
+ },
529
+ day
530
+ );
531
+ }) }) }),
532
+ /* @__PURE__ */ jsx("tbody", { className: "wp-dp__weeks", children: weeks.map((week, w) => /* @__PURE__ */ jsx("tr", { className: "wp-dp__week", children: week.map((cell) => {
533
+ const state = cell.disabled ? {} : dayState(cell.date);
534
+ const classes = ["wp-dp__day"];
535
+ if (cell.outside) classes.push("wp-dp__day--outside");
536
+ if (cell.disabled) classes.push("wp-dp__day--disabled");
537
+ if (cell.ymd === todayYmd) classes.push("wp-dp__day--today");
538
+ if (state.selected) classes.push("wp-dp__day--selected");
539
+ if (state.rangeStart) classes.push("wp-dp__day--range-start");
540
+ if (state.rangeMiddle) classes.push("wp-dp__day--range-middle");
541
+ if (state.rangeEnd) classes.push("wp-dp__day--range-end");
542
+ return /* @__PURE__ */ jsx("td", { className: classes.join(" "), children: /* @__PURE__ */ jsx(
543
+ "button",
544
+ {
545
+ type: "button",
546
+ className: "wp-dp__day-btn",
547
+ "data-ymd": cell.ymd,
548
+ tabIndex: cell.ymd === focusYmd && !cell.outside ? 0 : -1,
549
+ disabled: cell.disabled,
550
+ "aria-selected": state.selected || state.rangeStart || state.rangeEnd || void 0,
551
+ "aria-label": cell.ymd,
552
+ onClick: () => {
553
+ onFocusDateChange(cell.date);
554
+ onPick(cell.date);
563
555
  },
564
- day
565
- );
566
- }) }) }),
567
- /* @__PURE__ */ jsx("tbody", { className: "wp-dp__weeks", children: weeks.map((week, w) => /* @__PURE__ */ jsx("tr", { className: "wp-dp__week", children: week.map((cell) => {
568
- const state = cell.disabled ? {} : dayState(cell.date);
569
- const classes = ["wp-dp__day"];
570
- if (cell.outside) classes.push("wp-dp__day--outside");
571
- if (cell.disabled) classes.push("wp-dp__day--disabled");
572
- if (cell.ymd === todayYmd) classes.push("wp-dp__day--today");
573
- if (state.selected) classes.push("wp-dp__day--selected");
574
- if (state.rangeStart) classes.push("wp-dp__day--range-start");
575
- if (state.rangeMiddle) classes.push("wp-dp__day--range-middle");
576
- if (state.rangeEnd) classes.push("wp-dp__day--range-end");
577
- return /* @__PURE__ */ jsx("td", { className: classes.join(" "), children: /* @__PURE__ */ jsx(
578
- "button",
579
- {
580
- type: "button",
581
- className: "wp-dp__day-btn",
582
- "data-ymd": cell.ymd,
583
- tabIndex: cell.ymd === focusYmd && !cell.outside ? 0 : -1,
584
- disabled: cell.disabled,
585
- "aria-selected": state.selected || state.rangeStart || state.rangeEnd || void 0,
586
- "aria-label": cell.ymd,
587
- onClick: () => {
588
- onFocusDateChange(cell.date);
589
- onPick(cell.date);
590
- },
591
- children: cell.date.getDate()
592
- }
593
- ) }, cell.ymd);
594
- }) }, w)) })
595
- ] })
596
- ] }, idx);
597
- })
598
- ] }) });
556
+ children: cell.date.getDate()
557
+ }
558
+ ) }, cell.ymd);
559
+ }) }, w)) })
560
+ ] })
561
+ ] }, offset);
562
+ }) }) });
599
563
  }
600
564
  var CALENDAR_HEIGHT = 340;
601
565
  function DateInput({
@@ -688,6 +652,7 @@ function DatePickerImpl({
688
652
  useDismiss(open, hostRef, popRef, dismiss);
689
653
  const anchor = usePopoverAnchor(open, hostRef, popRef, CALENDAR_HEIGHT);
690
654
  const portal = usePortalTo();
655
+ const pointer = usePanelPointer(popRef);
691
656
  const isInvalid = Boolean(invalid);
692
657
  const commit = (wall) => {
693
658
  const emitZone = withTime && wall !== "" && (zoned ?? sawZone.current);
@@ -727,7 +692,7 @@ function DatePickerImpl({
727
692
  }
728
693
  };
729
694
  const handleBlur = (event) => {
730
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
695
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
731
696
  if (text !== fieldText) setText(fieldText);
732
697
  setOpen(false);
733
698
  };
@@ -763,6 +728,7 @@ function DatePickerImpl({
763
728
  style: anchorStyle(anchor),
764
729
  role: "dialog",
765
730
  "aria-label": loc.calendarLabel,
731
+ ...pointer.panelProps,
766
732
  children: /* @__PURE__ */ jsx("div", { className: "wp-dp-pop__body", children: /* @__PURE__ */ jsx(
767
733
  Calendar,
768
734
  {
@@ -773,6 +739,7 @@ function DatePickerImpl({
773
739
  onFocusDateChange: setFocusDate,
774
740
  autoFocus: grabFocus,
775
741
  locale: loc,
742
+ selectedDates: selectedDate ? [selectedDate] : [],
776
743
  dayState: (date) => ({ selected: isSameDay(date, selectedDate) }),
777
744
  onPick: (date) => {
778
745
  const ymd = formatYmd(date);
@@ -839,6 +806,7 @@ function DateRangePickerImpl({
839
806
  useDismiss(open, hostRef, popRef, dismiss);
840
807
  const anchor = usePopoverAnchor(open, hostRef, popRef, CALENDAR_HEIGHT);
841
808
  const portal = usePortalTo();
809
+ const pointer = usePanelPointer(popRef);
842
810
  const isInvalid = Boolean(invalid);
843
811
  const commit = (nextFrom, nextTo) => {
844
812
  const next = { from: nextFrom || void 0, to: nextTo || void 0 };
@@ -889,7 +857,7 @@ function DateRangePickerImpl({
889
857
  }
890
858
  };
891
859
  const handleBlur = (event) => {
892
- if (focusStaysInside(event.relatedTarget, hostRef, popRef)) return;
860
+ if (focusStaysInside(event.relatedTarget, hostRef, popRef, pointer)) return;
893
861
  if (fromText !== fromValue) setFromText(fromValue);
894
862
  if (toText !== toValue) setToText(toValue);
895
863
  setOpen(false);
@@ -971,6 +939,7 @@ function DateRangePickerImpl({
971
939
  style: anchorStyle(anchor),
972
940
  role: "dialog",
973
941
  "aria-label": loc.calendarLabel,
942
+ ...pointer.panelProps,
974
943
  children: /* @__PURE__ */ jsx("div", { className: "wp-dp-pop__body", children: /* @__PURE__ */ jsx(
975
944
  Calendar,
976
945
  {
@@ -981,6 +950,7 @@ function DateRangePickerImpl({
981
950
  onFocusDateChange: setFocusDate,
982
951
  autoFocus: grabFocus,
983
952
  locale: loc,
953
+ selectedDates: [fromDate, toDate].filter((d) => d !== void 0),
984
954
  dayState: (date) => {
985
955
  const t = date.getTime();
986
956
  const start = fromDate?.getTime();
@@ -1003,7 +973,10 @@ function DateRangePickerImpl({
1003
973
  }
1004
974
  var DP_CSS = `
1005
975
  .wp-dp-host{position:relative}
1006
- .wp-dp-pop--wide{max-width:min(92vw,720px)}
976
+ /* \uB450 \uB2EC\uC9DC\uB9AC \uD328\uB110\uC758 \uC0C1\uD55C. \uAECD\uB370\uAE30 \uADDC\uCE59(.wp-anchored-pop, max-width 400px)\uACFC \uAC19\uC740 \uBA85\uC2DC\uB3C4\uB85C \uB450\uBA74 \uC2DC\uD2B8\uAC00 \uC2E4\uB9B0
977
+ \uC21C\uC11C\uC5D0 \uB530\uB77C \uC9C0\uAC70\uB098 \uC774\uACBC\uB2E4 \u2014 \uCE78\uC774 \uC881\uC740 \uC790\uB9AC(\uD1B5\uACC4\uC758 \uAE30\uAC04 \uD544\uD130)\uC5D0\uC11C \uB450 \uB2EC\uC774 \uC138\uB85C\uB85C \uC313\uC600\uB2E4(\uC2E4\uCE21 1440). \uD074\uB798\uC2A4\uB97C
978
+ \uB458 \uACB9\uCCD0 \uC21C\uC11C\uC640 \uBB34\uAD00\uD558\uAC8C \uC774\uAE34\uB2E4. */
979
+ .wp-anchored-pop.wp-dp-pop--wide{max-width:min(92vw,720px)}
1007
980
  /* \uC0C1\uD55C\uC740 \uD654\uBA74 60% \uC640 **\uD3B8 \uCABD\uC5D0 \uB0A8\uC740 \uB192\uC774**(anchored-popover \uAC00 --wp-pop-avail \uB85C \uC2E3\uB294\uB2E4) \uC911
1008
981
  \uC791\uC740 \uCABD \u2014 \uCE78\uC774 \uD654\uBA74 \uC544\uB798\uCABD\uC774\uBA74 \uD328\uB110\uC774 \uBDF0\uD3EC\uD2B8 \uBC16\uC73C\uB85C \uB118\uCE58\uC9C0 \uC54A\uACE0 \uC548\uC5D0\uC11C \uC2A4\uD06C\uB864\uD55C\uB2E4. */
1009
982
  .wp-dp-pop__body{padding:var(--wp-space-4);max-height:min(60vh,calc(var(--wp-pop-avail,100vh) - 2px));overflow:auto}
@@ -1018,13 +991,13 @@ var DP_CSS = `
1018
991
  .wp-inputwrap--lead .wp-dp-input--time.wp-dp-input--time{min-width:calc(16ch + 36px)}
1019
992
  .wp-dp{font-family:inherit;font-size:13px;color:var(--wp-text-default)}
1020
993
  .wp-dp__months{position:relative;display:flex;flex-wrap:wrap;gap:var(--wp-space-5)}
1021
- .wp-dp__nav{position:absolute;top:0;right:0;display:flex;gap:var(--wp-space-1);z-index:1}
1022
- .wp-dp__navbtn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;background:transparent;border-radius:var(--wp-radius-sm);color:var(--wp-text-muted);cursor:pointer;transition:background 0.12s,color 0.12s}
1023
- .wp-dp__navbtn:hover:not(:disabled){background:var(--wp-surface-hover);color:var(--wp-text-strong)}
1024
- .wp-dp__navbtn:focus-visible{outline:2px solid var(--wp-border-focus);outline-offset:1px}
1025
- .wp-dp__navbtn:disabled{color:var(--wp-text-disabled);cursor:default;background:transparent}
1026
- .wp-dp__caption{display:flex;align-items:center;height:28px;margin-bottom:var(--wp-space-2);padding-left:var(--wp-space-1)}
1027
- .wp-dp__caption-label{font-size:13px;font-weight:600;color:var(--wp-text-strong)}
994
+ /* \uBA38\uB9AC\uAE00(<< < \uC81C\uBAA9 > >>)\uC740 calendar-nav \uC758 \uACF5\uC6A9 \uBD80\uD488 \u2014 \uB2EC\uB9C8\uB2E4 \uD558\uB098, \uACA9\uC790\uC640 \uAC19\uC740 \uD3ED. */
995
+ .wp-dp__nav{margin-bottom:var(--wp-space-2)}
996
+ /* \uC6D4\xB7\uC5F0\uB3C4 \uBCF4\uAE30\uC758 **\uAE30\uBCF8** \uD06C\uAE30 \u2014 \uC77C \uBCF4\uAE30(\uBA38\uB9AC\uAE00 28 + 8 + \uC694\uC77C 28 + 6\uC8FC\xD730)\uC640 \uAC19\uC740 \uB192\uC774, \uB450 \uB2EC \uD328\uB110\uC5D0\uC11C\uB294 \uB450 \uB2EC \uD3ED
997
+ (224\xD72 + \uC0AC\uC774 \uAC04\uACA9). \uC2E4\uC81C\uB85C\uB294 \uB4E4\uC5B4\uAC08 \uB54C \uC7B0 \uC77C \uBCF4\uAE30 \uD06C\uAE30\uB97C \uC778\uB77C\uC778 min-width/min-height \uB85C \uC5B9\uC5B4(\uC18C\uBE44 \uC571\uC774 \uCE78\uC744 \uD0A4\uC6CC\uB3C4
998
+ \uB4E4\uC369\uC784 0) \uC774 \uAC12\uC740 \uB808\uC774\uC544\uC6C3\uC774 \uC5C6\uB294 \uD658\uACBD\uC758 \uD3F4\uBC31\uC774\uB2E4. */
999
+ .wp-dp__zoom{min-height:244px}
1000
+ .wp-anchored-pop.wp-dp-pop--wide .wp-dp__zoom{width:calc(448px + var(--wp-space-5))}
1028
1001
  .wp-dp__grid{border-collapse:collapse}
1029
1002
  .wp-dp__weekday{width:32px;height:28px;padding:0;font-size:12px;font-weight:500;color:var(--wp-text-muted);text-align:center}
1030
1003
  .wp-dp__weekday--sun{color:var(--wp-text-danger)}
@@ -1,7 +1,7 @@
1
- import { DateRangePicker } from './chunk-FP32LNFK.js';
2
- import { useOverlayLayer } from './chunk-BITS7UJY.js';
1
+ import { DateRangePicker } from './chunk-KAQ2VZBM.js';
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-YYAGE733.js';
4
+ import { Input, Button, IconButton, Tag, Field, Checkbox } from './chunk-OWM7E55U.js';
5
5
  import { useRef, useEffect, useState, useMemo } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
 
@@ -1,4 +1,4 @@
1
- import { ImageViewer } from './chunk-UZZLMPRW.js';
1
+ import { ImageViewer } from './chunk-JCG4575S.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,5 +1,5 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { Tag } from './chunk-YYAGE733.js';
2
+ import { Tag } from './chunk-OWM7E55U.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';
@@ -1,5 +1,5 @@
1
- import { useSduiAdapter, hostFetchOf } from './chunk-JHFA5RDN.js';
2
- import { Badge, Tag } from './chunk-YYAGE733.js';
1
+ import { useSduiAdapter, hostFetchOf } from './chunk-ZBX2CAOO.js';
2
+ import { Badge, Tag } from './chunk-OWM7E55U.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,7 +1,7 @@
1
- import { ellipsisStyle, unwrapRows } from './chunk-VAXRTBJH.js';
2
- import { includesLooseSearch } from './chunk-A57GKV5F.js';
3
- import { useSduiAdapter, hostFetchOf } from './chunk-JHFA5RDN.js';
4
- import { Icon, Button, Input, Spinner } from './chunk-YYAGE733.js';
1
+ import { ellipsisStyle, unwrapRows } from './chunk-63GM4S25.js';
2
+ import { includesLooseSearch } from './chunk-KXTQOP3E.js';
3
+ import { useSduiAdapter, hostFetchOf } from './chunk-ZBX2CAOO.js';
4
+ import { Icon, Button, Input, Spinner } from './chunk-OWM7E55U.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 { useSduiAssetResolver } from './chunk-JHFA5RDN.js';
2
- import { Spinner, Icon } from './chunk-YYAGE733.js';
1
+ import { useSduiAssetResolver } from './chunk-ZBX2CAOO.js';
2
+ import { Spinner, Icon } from './chunk-OWM7E55U.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,5 +1,5 @@
1
- import { Text } from './chunk-UC725BGW.js';
2
- import { Field, Input, Select, IconButton, Button } from './chunk-YYAGE733.js';
1
+ import { Text } from './chunk-5FZBH3T5.js';
2
+ import { Field, Input, Select, IconButton, Button } from './chunk-OWM7E55U.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
- import { fetchAllPages } from './chunk-VAXRTBJH.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-JHFA5RDN.js';
3
- import { Alert, Badge, Spinner, Button, Input, Checkbox } from './chunk-YYAGE733.js';
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';
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';
@@ -641,6 +641,14 @@ var ICON_NODES = {
641
641
  "chevron-up": [
642
642
  { t: "path", d: "m18 15-6-6-6 6" }
643
643
  ],
644
+ "chevrons-left": [
645
+ { t: "path", d: "m11 17-5-5 5-5" },
646
+ { t: "path", d: "m18 17-5-5 5-5" }
647
+ ],
648
+ "chevrons-right": [
649
+ { t: "path", d: "m6 17 5-5-5-5" },
650
+ { t: "path", d: "m13 17 5-5-5-5" }
651
+ ],
644
652
  "chevrons-up-down": [
645
653
  { t: "path", d: "m7 15 5 5 5-5" },
646
654
  { t: "path", d: "m7 9 5-5 5 5" }
@@ -1,4 +1,4 @@
1
- import { Icon } from './chunk-YYAGE733.js';
1
+ import { Icon } from './chunk-OWM7E55U.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,4 +1,4 @@
1
- import { Badge, Checkbox, IconButton, Icon } from './chunk-YYAGE733.js';
1
+ import { Badge, Checkbox, IconButton, Icon } from './chunk-OWM7E55U.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,8 +1,8 @@
1
- import { TagMultiSelect } from './chunk-GSXD52XG.js';
2
- import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-USNPJEXH.js';
3
- import { orderCircleStyle, unwrapRows, uid } from './chunk-VAXRTBJH.js';
4
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-JHFA5RDN.js';
5
- import { Card, Icon, Input, IconButton, Field, Button, Badge } from './chunk-YYAGE733.js';
1
+ import { TagMultiSelect } from './chunk-LKL3SCBJ.js';
2
+ import { ApprovalLineEditor, stepTypeIcon, stepLabel } from './chunk-RJYPRWWS.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';
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';