@wipco/sdui 1.6.1 → 1.7.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 (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-O4EMQWCV.js → chunk-27ILQUWE.js} +113 -26
  4. package/dist/{chunk-AJ3KDBEE.js → chunk-466W3XNK.js} +1 -1
  5. package/dist/{chunk-FP32LNFK.js → chunk-4VQIKSDS.js} +157 -190
  6. package/dist/{chunk-UC725BGW.js → chunk-5FZBH3T5.js} +1 -1
  7. package/dist/{chunk-XUVWIRZJ.js → chunk-5LIFU57A.js} +2 -2
  8. package/dist/{chunk-VAXRTBJH.js → chunk-63GM4S25.js} +1 -1
  9. package/dist/{chunk-J7BZF4T4.js → chunk-7EDFYBUA.js} +4 -4
  10. package/dist/{chunk-KO3EUNWB.js → chunk-7YTZB5LQ.js} +3 -3
  11. package/dist/{chunk-SGGIWPP6.js → chunk-7ZCM6XEM.js} +2 -2
  12. package/dist/{chunk-GKYUDTMI.js → chunk-A22QR6PM.js} +2 -2
  13. package/dist/{chunk-IIRVHSNK.js → chunk-A3SO6H47.js} +2 -2
  14. package/dist/{chunk-TWUKNUUQ.js → chunk-AP33B24H.js} +2 -2
  15. package/dist/{chunk-VSNHDHGS.js → chunk-B5MB64YQ.js} +209 -25
  16. package/dist/{chunk-USNPJEXH.js → chunk-DCSUBFFG.js} +4 -4
  17. package/dist/{chunk-KDKRFWIF.js → chunk-DILQ2DJV.js} +5 -5
  18. package/dist/{chunk-US3K6Q5T.js → chunk-ENZBX4AR.js} +1 -1
  19. package/dist/{chunk-CUFGH3LB.js → chunk-FGKBXUUA.js} +1 -1
  20. package/dist/{chunk-VR5MFUD2.js → chunk-FUNCQCKN.js} +2 -2
  21. package/dist/{chunk-TB7G5DXQ.js → chunk-GWT5UF5B.js} +2 -2
  22. package/dist/{chunk-OKNF2SBB.js → chunk-H5QRRPBJ.js} +3 -3
  23. package/dist/{chunk-UZZLMPRW.js → chunk-JCG4575S.js} +2 -2
  24. package/dist/{chunk-34BABTH4.js → chunk-JMNUFA5M.js} +1 -1
  25. package/dist/{chunk-3PT5OBOU.js → chunk-L6ODTHTX.js} +1 -1
  26. package/dist/{chunk-OQ7A3SFM.js → chunk-LKA43GYA.js} +1 -1
  27. package/dist/{chunk-GSXD52XG.js → chunk-LKL3SCBJ.js} +2 -2
  28. package/dist/{chunk-A57GKV5F.js → chunk-LN4KPZIX.js} +3 -3
  29. package/dist/chunk-MUXGTVEA.js +421 -0
  30. package/dist/{chunk-3PCR73OC.js → chunk-MWBCQHKQ.js} +3 -3
  31. package/dist/{chunk-XFKNU6QN.js → chunk-NI3LMETK.js} +2 -2
  32. package/dist/{chunk-ESAFQXEU.js → chunk-NJTIJAFU.js} +2 -2
  33. package/dist/{chunk-PCFH74RD.js → chunk-NQDHGK7C.js} +3 -3
  34. package/dist/{chunk-YYAGE733.js → chunk-OWM7E55U.js} +8 -0
  35. package/dist/{chunk-OCYJ2ZOV.js → chunk-P62INTQ5.js} +1 -1
  36. package/dist/{chunk-7G6J6QFC.js → chunk-Q56LZJFX.js} +1 -1
  37. package/dist/{chunk-BITS7UJY.js → chunk-R2ORCOTG.js} +2 -2
  38. package/dist/{chunk-VQKX5PJ4.js → chunk-RA74PUMP.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, AnchoredPopoverStyles, anchorStyle, focusStaysInside, resolveCalendarNavLocale, CalendarZoom, CalendarNav, clampIndex } from './chunk-MUXGTVEA.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;
@@ -413,22 +321,18 @@ function toFieldValue(text, withTime) {
413
321
  return `${date}T${time}`;
414
322
  }
415
323
  var KO_LOCALE = {
324
+ ...KO_CALENDAR_NAV_LOCALE,
416
325
  weekdays: ["\uC77C", "\uC6D4", "\uD654", "\uC218", "\uBAA9", "\uAE08", "\uD1A0"],
417
326
  weekStartsOn: 0,
418
- formatCaption: (year, month) => `${year}\uB144 ${month}\uC6D4`,
419
- prevMonthLabel: "\uC774\uC804 \uB2EC",
420
- nextMonthLabel: "\uB2E4\uC74C \uB2EC",
421
327
  calendarLabel: "\uB0A0\uC9DC \uC120\uD0DD \uB2EC\uB825",
422
328
  startLabel: "\uC2DC\uC791\uC77C",
423
329
  endLabel: "\uC885\uB8CC\uC77C"
424
330
  };
425
331
  function resolveLocale(locale, calendarLabel) {
426
332
  return {
333
+ ...resolveCalendarNavLocale(locale),
427
334
  weekdays: locale?.weekdays ?? KO_LOCALE.weekdays,
428
335
  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
336
  calendarLabel: locale?.calendarLabel ?? calendarLabel,
433
337
  startLabel: locale?.startLabel ?? KO_LOCALE.startLabel,
434
338
  endLabel: locale?.endLabel ?? KO_LOCALE.endLabel
@@ -454,6 +358,12 @@ function buildMonthCells(index, min, max, weekStartsOn = 0) {
454
358
  }
455
359
  return weeks;
456
360
  }
361
+ function sameDayInMonth(date, index) {
362
+ const first = monthStart(index);
363
+ const lastDay = new Date(first.getFullYear(), first.getMonth() + 1, 0).getDate();
364
+ first.setDate(Math.min(date.getDate(), lastDay));
365
+ return first;
366
+ }
457
367
  function clampViewToFocus(focusIdx, viewIdx, monthCount) {
458
368
  return focusIdx < viewIdx ? focusIdx : focusIdx > viewIdx + monthCount - 1 ? focusIdx - monthCount + 1 : viewIdx;
459
369
  }
@@ -466,15 +376,20 @@ function Calendar({
466
376
  focusDate,
467
377
  onFocusDateChange,
468
378
  autoFocus = false,
469
- locale
379
+ locale,
380
+ selectedDates = []
470
381
  }) {
471
382
  const focusIdx = monthIndex(focusDate);
472
383
  const [viewIdx, setViewIdx] = useState(focusIdx);
384
+ const [zoom, setZoom] = useState(null);
473
385
  const gridRef = useRef(null);
474
386
  const focusYmd = formatYmd(focusDate);
475
387
  const visibleIdx = clampViewToFocus(focusIdx, viewIdx, monthCount);
476
388
  if (visibleIdx !== viewIdx) setViewIdx(visibleIdx);
477
- const claimFocusRef = useRef(autoFocus);
389
+ const claimFocusRef = useRef(false);
390
+ useEffect(() => {
391
+ if (autoFocus) gridRef.current?.querySelector('[tabindex="0"]')?.focus();
392
+ }, []);
478
393
  useLayoutEffect(() => {
479
394
  const grid = gridRef.current;
480
395
  if (!grid) return;
@@ -489,17 +404,52 @@ function Calendar({
489
404
  const maxIdx = maxDate ? monthIndex(maxDate) : Infinity;
490
405
  const prevDisabled = visibleIdx <= minIdx;
491
406
  const nextDisabled = visibleIdx + monthCount - 1 >= maxIdx;
407
+ const lastViewIdx = Math.max(minIdx, maxIdx - monthCount + 1);
408
+ const clampView = (idx) => clampIndex(idx, minIdx, lastViewIdx);
492
409
  const moveFocus = (next) => {
493
410
  onFocusDateChange(clampDate(next, minDate, maxDate));
494
411
  };
495
412
  const moveView = (delta) => {
496
- setViewIdx(visibleIdx + delta);
497
- moveFocus(addMonths(focusDate, delta));
413
+ const target = clampView(visibleIdx + delta);
414
+ const actual = target - visibleIdx;
415
+ if (actual === 0) return;
416
+ setViewIdx(target);
417
+ moveFocus(addMonths(focusDate, actual));
418
+ };
419
+ const refocusDayRef = useRef(false);
420
+ useLayoutEffect(() => {
421
+ if (zoom !== null || !refocusDayRef.current) return;
422
+ refocusDayRef.current = false;
423
+ gridRef.current?.querySelector('.wp-dp__day-btn[tabindex="0"]')?.focus();
424
+ }, [zoom]);
425
+ const openZoom = (offset) => {
426
+ const months = Array.from(gridRef.current?.querySelectorAll(".wp-dp__month") ?? []);
427
+ let size;
428
+ if (months.length > 0) {
429
+ const rects = months.map((month) => month.getBoundingClientRect());
430
+ const width = rects[rects.length - 1].right - rects[0].left;
431
+ const height = Math.max(...rects.map((rect) => rect.height));
432
+ if (width > 0 && height > 0) size = { width, height };
433
+ }
434
+ setZoom({ offset, openedAt: focusYmd, followed: false, size });
435
+ };
436
+ useEffect(() => {
437
+ if (zoom && !zoom.followed && focusYmd !== zoom.openedAt) setZoom({ ...zoom, followed: true });
438
+ }, [focusYmd, zoom]);
439
+ const leaveZoom = (pickedIdx) => {
440
+ if (pickedIdx !== void 0 && zoom) {
441
+ setViewIdx(clampView(pickedIdx - zoom.offset));
442
+ moveFocus(sameDayInMonth(focusDate, pickedIdx));
443
+ }
444
+ refocusDayRef.current = true;
445
+ setZoom(null);
498
446
  };
499
447
  const handleKeyDown = (event) => {
500
448
  const deltaDays = event.key === "ArrowLeft" ? -1 : event.key === "ArrowRight" ? 1 : event.key === "ArrowUp" ? -7 : event.key === "ArrowDown" ? 7 : 0;
449
+ const fromDay = event.target instanceof HTMLElement && event.target.classList.contains("wp-dp__day-btn");
501
450
  if (deltaDays !== 0) {
502
451
  event.preventDefault();
452
+ if (fromDay) claimFocusRef.current = true;
503
453
  moveFocus(addDays(focusDate, deltaDays));
504
454
  return;
505
455
  }
@@ -512,90 +462,102 @@ function Calendar({
512
462
  }
513
463
  if (event.key === "PageUp" || event.key === "PageDown") {
514
464
  event.preventDefault();
465
+ if (fromDay) claimFocusRef.current = true;
515
466
  moveFocus(addMonths(focusDate, event.key === "PageUp" ? -1 : 1));
516
467
  }
517
468
  };
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: [
469
+ if (zoom) {
470
+ return /* @__PURE__ */ jsx("div", { className: "wp-dp", children: /* @__PURE__ */ jsx("div", { className: "wp-dp__months", ref: gridRef, onKeyDown: handleKeyDown, children: /* @__PURE__ */ jsx(
471
+ CalendarZoom,
472
+ {
473
+ className: "wp-dp__zoom",
474
+ style: zoom.size ? { minWidth: zoom.size.width, minHeight: zoom.size.height } : void 0,
475
+ monthIndex: zoom.followed ? focusIdx : visibleIdx + zoom.offset,
476
+ selectedMonthIndexes: selectedDates.map(monthIndex),
477
+ minMonthIndex: minIdx,
478
+ maxMonthIndex: maxIdx,
479
+ onPick: leaveZoom,
480
+ onExit: () => leaveZoom(),
481
+ autoFocus: true,
482
+ locale
483
+ }
484
+ ) }) });
485
+ }
486
+ const navLabels = {
487
+ prevBig: locale.prevYearLabel,
488
+ prev: locale.prevMonthLabel,
489
+ next: locale.nextMonthLabel,
490
+ nextBig: locale.nextYearLabel
491
+ };
492
+ const navDisabled = { prevBig: prevDisabled, prev: prevDisabled, next: nextDisabled, nextBig: nextDisabled };
493
+ const step = (which) => moveView(which === "prevBig" ? -12 : which === "prev" ? -1 : which === "next" ? 1 : 12);
494
+ 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) => {
495
+ const idx = visibleIdx + offset;
496
+ const first = monthStart(idx);
497
+ const weeks = buildMonthCells(idx, minDate, maxDate, locale.weekStartsOn);
498
+ const caption = locale.formatCaption(first.getFullYear(), first.getMonth() + 1);
499
+ const sides = monthCount === 1 ? "both" : offset === 0 ? "start" : offset === monthCount - 1 ? "end" : "none";
500
+ return /* @__PURE__ */ jsxs("div", { className: "wp-dp__month", children: [
520
501
  /* @__PURE__ */ jsx(
521
- "button",
502
+ CalendarNav,
522
503
  {
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 })
504
+ className: "wp-dp__nav",
505
+ size: "sm",
506
+ title: caption,
507
+ sides,
508
+ labels: navLabels,
509
+ disabled: navDisabled,
510
+ onStep: step,
511
+ onZoomOut: () => openZoom(offset),
512
+ zoomLabel: locale.zoomLabel
530
513
  }
531
514
  ),
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
515
+ /* @__PURE__ */ jsxs("table", { className: "wp-dp__grid", role: "grid", "aria-label": caption, children: [
516
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "wp-dp__weekdays", children: Array.from({ length: 7 }, (_2, col) => {
517
+ const day = (locale.weekStartsOn + col) % 7;
518
+ const name = locale.weekdays[day] ?? "";
519
+ return /* @__PURE__ */ jsx(
520
+ "th",
521
+ {
522
+ scope: "col",
523
+ className: day === 0 ? "wp-dp__weekday wp-dp__weekday--sun" : "wp-dp__weekday",
524
+ abbr: name,
525
+ children: name
526
+ },
527
+ day
528
+ );
529
+ }) }) }),
530
+ /* @__PURE__ */ jsx("tbody", { className: "wp-dp__weeks", children: weeks.map((week, w) => /* @__PURE__ */ jsx("tr", { className: "wp-dp__week", children: week.map((cell) => {
531
+ const state = cell.disabled ? {} : dayState(cell.date);
532
+ const classes = ["wp-dp__day"];
533
+ if (cell.outside) classes.push("wp-dp__day--outside");
534
+ if (cell.disabled) classes.push("wp-dp__day--disabled");
535
+ if (cell.ymd === todayYmd) classes.push("wp-dp__day--today");
536
+ if (state.selected) classes.push("wp-dp__day--selected");
537
+ if (state.rangeStart) classes.push("wp-dp__day--range-start");
538
+ if (state.rangeMiddle) classes.push("wp-dp__day--range-middle");
539
+ if (state.rangeEnd) classes.push("wp-dp__day--range-end");
540
+ return /* @__PURE__ */ jsx("td", { className: classes.join(" "), children: /* @__PURE__ */ jsx(
541
+ "button",
542
+ {
543
+ type: "button",
544
+ className: "wp-dp__day-btn",
545
+ "data-ymd": cell.ymd,
546
+ tabIndex: cell.ymd === focusYmd && !cell.outside ? 0 : -1,
547
+ disabled: cell.disabled,
548
+ "aria-selected": state.selected || state.rangeStart || state.rangeEnd || void 0,
549
+ "aria-label": cell.ymd,
550
+ onClick: () => {
551
+ onFocusDateChange(cell.date);
552
+ onPick(cell.date);
563
553
  },
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
- ] }) });
554
+ children: cell.date.getDate()
555
+ }
556
+ ) }, cell.ymd);
557
+ }) }, w)) })
558
+ ] })
559
+ ] }, offset);
560
+ }) }) });
599
561
  }
600
562
  var CALENDAR_HEIGHT = 340;
601
563
  function DateInput({
@@ -773,6 +735,7 @@ function DatePickerImpl({
773
735
  onFocusDateChange: setFocusDate,
774
736
  autoFocus: grabFocus,
775
737
  locale: loc,
738
+ selectedDates: selectedDate ? [selectedDate] : [],
776
739
  dayState: (date) => ({ selected: isSameDay(date, selectedDate) }),
777
740
  onPick: (date) => {
778
741
  const ymd = formatYmd(date);
@@ -981,6 +944,7 @@ function DateRangePickerImpl({
981
944
  onFocusDateChange: setFocusDate,
982
945
  autoFocus: grabFocus,
983
946
  locale: loc,
947
+ selectedDates: [fromDate, toDate].filter((d) => d !== void 0),
984
948
  dayState: (date) => {
985
949
  const t = date.getTime();
986
950
  const start = fromDate?.getTime();
@@ -1003,7 +967,10 @@ function DateRangePickerImpl({
1003
967
  }
1004
968
  var DP_CSS = `
1005
969
  .wp-dp-host{position:relative}
1006
- .wp-dp-pop--wide{max-width:min(92vw,720px)}
970
+ /* \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
971
+ \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
972
+ \uB458 \uACB9\uCCD0 \uC21C\uC11C\uC640 \uBB34\uAD00\uD558\uAC8C \uC774\uAE34\uB2E4. */
973
+ .wp-anchored-pop.wp-dp-pop--wide{max-width:min(92vw,720px)}
1007
974
  /* \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
975
  \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
976
  .wp-dp-pop__body{padding:var(--wp-space-4);max-height:min(60vh,calc(var(--wp-pop-avail,100vh) - 2px));overflow:auto}
@@ -1018,13 +985,13 @@ var DP_CSS = `
1018
985
  .wp-inputwrap--lead .wp-dp-input--time.wp-dp-input--time{min-width:calc(16ch + 36px)}
1019
986
  .wp-dp{font-family:inherit;font-size:13px;color:var(--wp-text-default)}
1020
987
  .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)}
988
+ /* \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. */
989
+ .wp-dp__nav{margin-bottom:var(--wp-space-2)}
990
+ /* \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
991
+ (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
992
+ \uB4E4\uC369\uC784 0) \uC774 \uAC12\uC740 \uB808\uC774\uC544\uC6C3\uC774 \uC5C6\uB294 \uD658\uACBD\uC758 \uD3F4\uBC31\uC774\uB2E4. */
993
+ .wp-dp__zoom{min-height:244px}
994
+ .wp-anchored-pop.wp-dp-pop--wide .wp-dp__zoom{width:calc(448px + var(--wp-space-5))}
1028
995
  .wp-dp__grid{border-collapse:collapse}
1029
996
  .wp-dp__weekday{width:32px;height:28px;padding:0;font-size:12px;font-weight:500;color:var(--wp-text-muted);text-align:center}
1030
997
  .wp-dp__weekday--sun{color:var(--wp-text-danger)}
@@ -1,4 +1,4 @@
1
- import { formatDisplayValue } from './chunk-YYAGE733.js';
1
+ import { formatDisplayValue } from './chunk-OWM7E55U.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,5 +1,5 @@
1
- import { Disclosure } from './chunk-OCYJ2ZOV.js';
2
- import { Icon } from './chunk-YYAGE733.js';
1
+ import { Disclosure } from './chunk-P62INTQ5.js';
2
+ import { Icon } from './chunk-OWM7E55U.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 { isPlainObject } from './chunk-YYAGE733.js';
1
+ import { isPlainObject } from './chunk-OWM7E55U.js';
2
2
 
3
3
  // src/widgets/shared.ts
4
4
  function unwrapRows(payload) {
@@ -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-LN4KPZIX.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,7 +1,7 @@
1
1
  import { HoistedStyle } from './chunk-RIZRM7OO.js';
2
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-JHFA5RDN.js';
3
- import { MOBILE_MEDIA_QUERY } from './chunk-GSM664TX.js';
4
- import { Icon, Badge, Checkbox, Select, Button } from './chunk-YYAGE733.js';
2
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
3
+ import { MOBILE_MEDIA_QUERY } from './chunk-TAVKGYH5.js';
4
+ import { Icon, Badge, Checkbox, Select, Button } from './chunk-OWM7E55U.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,5 +1,5 @@
1
- import { Text } from './chunk-UC725BGW.js';
2
- import { Switch, Field, Select, Input } from './chunk-YYAGE733.js';
1
+ import { Text } from './chunk-5FZBH3T5.js';
2
+ import { Switch, Field, Select, Input } from './chunk-OWM7E55U.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 { DateRangePicker } from './chunk-FP32LNFK.js';
2
- import { SegmentedControl, Select } from './chunk-YYAGE733.js';
1
+ import { DateRangePicker } from './chunk-4VQIKSDS.js';
2
+ import { SegmentedControl, Select } from './chunk-OWM7E55U.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,5 +1,5 @@
1
- import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-JHFA5RDN.js';
2
- import { Spinner, Badge, Icon } from './chunk-YYAGE733.js';
1
+ import { useSduiAdapter, hostFetchOf, defaultAdapter } from './chunk-ZBX2CAOO.js';
2
+ import { Spinner, Badge, Icon } from './chunk-OWM7E55U.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
- import { buildCascadingTree } from './chunk-A57GKV5F.js';
2
- import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-YYAGE733.js';
1
+ import { buildCascadingTree } from './chunk-LN4KPZIX.js';
2
+ import { Input, IconButton, EmptyState, Icon, Badge } from './chunk-OWM7E55U.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';