@slotted/react 0.1.0-beta.15 → 0.1.0-beta.17

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 (162) hide show
  1. package/dist/{action-sheet-Klu-YxIk.js → action-sheet-dNnB26br.js} +20 -20
  2. package/dist/action-sheet.js +1 -1
  3. package/dist/{attachment-DKKiNUKe.js → attachment-C1wBuup6.js} +2 -0
  4. package/dist/attachment.js +1 -1
  5. package/dist/calendar-wqDIW4Z8.js +469 -0
  6. package/dist/calendar.js +1 -1
  7. package/dist/{column-manager-e234Ey_u.js → column-manager-C8fN_mDy.js} +6 -6
  8. package/dist/column-manager.js +1 -1
  9. package/dist/dashboard-grid-z3nKqvN8.js +1149 -0
  10. package/dist/dashboard-grid.js +1 -1
  11. package/dist/{data-grid-B5feiNsE.js → data-grid-aHlR2FHu.js} +4 -4
  12. package/dist/data-grid.js +1 -1
  13. package/dist/{data-list-CUvUS2AX.js → data-list-Cu6LtnDX.js} +1 -1
  14. package/dist/data-list.js +1 -1
  15. package/dist/{date-picker-Dys-z9mZ.js → date-picker-B5V8NZCT.js} +1 -1
  16. package/dist/date-picker.js +1 -1
  17. package/dist/{date-range-picker-Cu95hHyO.js → date-range-picker-B89Q973N.js} +1 -1
  18. package/dist/date-range-picker.js +1 -1
  19. package/dist/{datetime-picker-B7eWKoN3.js → datetime-picker-Cx6Z52Ka.js} +1 -1
  20. package/dist/datetime-picker.js +1 -1
  21. package/dist/{datetime-range-picker-Cm42pY3M.js → datetime-range-picker-DYshAlgq.js} +1 -1
  22. package/dist/datetime-range-picker.js +1 -1
  23. package/dist/{detail-panel-BNfYQJfv.js → detail-panel-DYe_D46K.js} +2 -2
  24. package/dist/detail-panel.js +1 -1
  25. package/dist/docs/calendar.json +19 -1
  26. package/dist/docs/calendar.md +3 -1
  27. package/dist/docs/dashboard-grid.json +30 -8
  28. package/dist/docs/dashboard-grid.md +8 -5
  29. package/dist/docs/drawer.json +13 -4
  30. package/dist/docs/drawer.md +5 -4
  31. package/dist/docs/guidelines/index.md +2 -0
  32. package/dist/docs/guidelines/layout-alignment.md +2 -2
  33. package/dist/docs/guidelines/overviews.md +21 -1
  34. package/dist/docs/link.json +16 -0
  35. package/dist/docs/link.md +3 -1
  36. package/dist/docs/list-item.json +10 -2
  37. package/dist/docs/list-item.md +20 -13
  38. package/dist/docs/markdown.json +7 -0
  39. package/dist/docs/markdown.md +1 -0
  40. package/dist/docs/message-scroller.json +1 -1
  41. package/dist/docs/page.json +2 -2
  42. package/dist/docs/page.md +1 -1
  43. package/dist/docs/prompt-composer.json +9 -2
  44. package/dist/docs/prompt-composer.md +3 -1
  45. package/dist/docs/skills/compose-screen/SKILL.md +10 -1
  46. package/dist/docs/skills/review-screen/SKILL.md +22 -20
  47. package/dist/docs/stat-card.json +7 -4
  48. package/dist/docs/stat-card.md +4 -4
  49. package/dist/{drawer-CFpBsLG6.js → drawer-Du1aC1px.js} +17 -4
  50. package/dist/drawer.js +2 -2
  51. package/dist/{event-calendar-liaKOKOH.js → event-calendar-CEIyV-fW.js} +520 -520
  52. package/dist/event-calendar.js +1 -1
  53. package/dist/{filter-bar-vJzwcDZj.js → filter-bar-BHzy0o7n.js} +8 -8
  54. package/dist/filter-bar.js +1 -1
  55. package/dist/{import-export-center-BIB7sRCl.js → import-export-center-BX1Bhj8c.js} +1 -1
  56. package/dist/import-export-center.js +1 -1
  57. package/dist/index.js +124 -124
  58. package/dist/{link-rGL3Lr2t.js → link-YvD_Wov8.js} +23 -22
  59. package/dist/link.js +1 -1
  60. package/dist/list-item-2z75VYyp.js +160 -0
  61. package/dist/list-item.js +1 -1
  62. package/dist/markdown-gfrgwq6-.js +311 -0
  63. package/dist/markdown.js +1 -1
  64. package/dist/{page-CwYmBoZQ.js → page-CzqbnTnU.js} +56 -56
  65. package/dist/{page-header-BgYXPEbd.js → page-header-TejJ-BTC.js} +1 -1
  66. package/dist/page-header.js +1 -1
  67. package/dist/page.js +2 -2
  68. package/dist/{prompt-composer-BDOi4rVK.js → prompt-composer-C57BzYrn.js} +109 -77
  69. package/dist/prompt-composer.js +2 -2
  70. package/dist/stat-card-Dv9oJAbF.js +252 -0
  71. package/dist/stat-card.js +1 -1
  72. package/dist/styles/action-sheet.css +1 -1
  73. package/dist/styles/calendar.css +3 -1
  74. package/dist/styles/chart.css +1 -1
  75. package/dist/styles/column-manager.css +1 -1
  76. package/dist/styles/command-palette.css +1 -1
  77. package/dist/styles/dashboard-grid.css +3 -1
  78. package/dist/styles/data-grid.css +1 -1
  79. package/dist/styles/date-picker.css +3 -1
  80. package/dist/styles/date-range-picker.css +3 -1
  81. package/dist/styles/datetime-picker.css +3 -1
  82. package/dist/styles/datetime-range-picker.css +3 -1
  83. package/dist/styles/detail-panel.css +1 -1
  84. package/dist/styles/dialog.css +1 -1
  85. package/dist/styles/drawer.css +1 -1
  86. package/dist/styles/event-calendar.css +1 -1
  87. package/dist/styles/filter-bar.css +4 -2
  88. package/dist/styles/import-export-center.css +2 -2
  89. package/dist/styles/index.css +11 -11
  90. package/dist/styles/link.css +1 -1
  91. package/dist/styles/markdown.css +1 -1
  92. package/dist/styles/message.css +1 -1
  93. package/dist/styles/prompt-composer.css +1 -1
  94. package/dist/styles/section.css +1 -1
  95. package/dist/styles/stat-card.css +3 -1
  96. package/dist/styles/table.css +2 -2
  97. package/dist/styles/upload.css +1 -1
  98. package/dist/styles.css +1 -1
  99. package/dist/{table-_xX87qua.js → table-BHuKvsgJ.js} +4 -4
  100. package/dist/table.js +1 -1
  101. package/dist/types/calendar/calendar.d.ts +2 -1
  102. package/dist/types/calendar/calendar.d.ts.map +1 -1
  103. package/dist/types/calendar/calendar.types.d.ts +11 -0
  104. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  105. package/dist/types/calendar/index.d.ts +1 -1
  106. package/dist/types/calendar/index.d.ts.map +1 -1
  107. package/dist/types/chart/chart.d.ts +2 -2
  108. package/dist/types/chart/chart.d.ts.map +1 -1
  109. package/dist/types/chart/chart.types.d.ts +10 -6
  110. package/dist/types/chart/chart.types.d.ts.map +1 -1
  111. package/dist/types/dashboard-grid/dashboard-grid-context.d.ts +14 -1
  112. package/dist/types/dashboard-grid/dashboard-grid-context.d.ts.map +1 -1
  113. package/dist/types/dashboard-grid/dashboard-grid.d.ts +1 -1
  114. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  115. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +27 -3
  116. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
  117. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  118. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  119. package/dist/types/dashboard-grid/index.d.ts +1 -1
  120. package/dist/types/dashboard-grid/index.d.ts.map +1 -1
  121. package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts +2 -1
  122. package/dist/types/dashboard-grid/use-persisted-dashboard-layout.d.ts.map +1 -1
  123. package/dist/types/drawer/drawer-parts.d.ts +3 -1
  124. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  125. package/dist/types/drawer/drawer.types.d.ts +2 -0
  126. package/dist/types/drawer/drawer.types.d.ts.map +1 -1
  127. package/dist/types/drawer/index.d.ts +2 -2
  128. package/dist/types/drawer/index.d.ts.map +1 -1
  129. package/dist/types/link/index.d.ts +1 -1
  130. package/dist/types/link/index.d.ts.map +1 -1
  131. package/dist/types/link/link.d.ts +1 -1
  132. package/dist/types/link/link.d.ts.map +1 -1
  133. package/dist/types/link/link.types.d.ts +7 -0
  134. package/dist/types/link/link.types.d.ts.map +1 -1
  135. package/dist/types/list-item/list-item-content.d.ts +3 -3
  136. package/dist/types/list-item/list-item-content.d.ts.map +1 -1
  137. package/dist/types/list-item/list-item-nesting.d.ts +15 -0
  138. package/dist/types/list-item/list-item-nesting.d.ts.map +1 -0
  139. package/dist/types/list-item/list-item-parts.d.ts +3 -3
  140. package/dist/types/list-item/list-item-parts.d.ts.map +1 -1
  141. package/dist/types/markdown/markdown.d.ts +1 -1
  142. package/dist/types/markdown/markdown.d.ts.map +1 -1
  143. package/dist/types/markdown/markdown.types.d.ts +6 -1
  144. package/dist/types/markdown/markdown.types.d.ts.map +1 -1
  145. package/dist/types/page/index.d.ts +1 -1
  146. package/dist/types/page/index.d.ts.map +1 -1
  147. package/dist/types/page/page.d.ts +6 -0
  148. package/dist/types/page/page.d.ts.map +1 -1
  149. package/dist/types/prompt-composer/index.d.ts +2 -2
  150. package/dist/types/prompt-composer/index.d.ts.map +1 -1
  151. package/dist/types/prompt-composer/prompt-composer.d.ts +8 -1
  152. package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
  153. package/dist/types/prompt-composer/prompt-composer.types.d.ts +7 -1
  154. package/dist/types/prompt-composer/prompt-composer.types.d.ts.map +1 -1
  155. package/dist/types/stat-card/stat-card-parts.d.ts +7 -3
  156. package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
  157. package/package.json +6 -6
  158. package/dist/calendar-DZx00W81.js +0 -457
  159. package/dist/dashboard-grid-B9-_lwn6.js +0 -1048
  160. package/dist/list-item-CHaJYl5r.js +0 -125
  161. package/dist/markdown-B_lMpWz0.js +0 -306
  162. package/dist/stat-card-CUISfM36.js +0 -247
@@ -1,6 +1,6 @@
1
1
  import { r as e } from "./i18n-D7xXDd8-.js";
2
2
  /* empty css */
3
- import { c as t, d as n, l as r, o as i, r as a, u as o } from "./drawer-CFpBsLG6.js";
3
+ import { d as t, f as n, i as r, l as i, s as a, u as o } from "./drawer-Du1aC1px.js";
4
4
  import { t as s } from "./spinner-ring-DyfaYloA.js";
5
5
  import { keyedProps as c, withSelectorKey as l } from "@slotted/core/selector-key";
6
6
  import { createRovingTabindex as u } from "@slotted/core/focus";
@@ -53,8 +53,8 @@ function F() {
53
53
  return e;
54
54
  }
55
55
  var I = 2;
56
- function L({ back: t, children: n, closeOnSelect: r, container: i, defaultOpen: a, escape: s, finalFocus: c, initialFocus: l, messages: u, modal: f, mount: m, onOpenChange: h, open: g, outsidePress: x, ref: C }) {
57
- let T = O(), E = e(w, u), [D, k] = b(a ?? !1), A = g ?? D, j = f ?? T.modal, M = y(null), F = y({
56
+ function L({ back: n, children: r, closeOnSelect: i, container: a, defaultOpen: o, escape: s, finalFocus: c, initialFocus: l, messages: u, modal: f, mount: m, onOpenChange: h, open: g, outsidePress: x, ref: C }) {
57
+ let T = O(), E = e(w, u), [D, k] = b(o ?? !1), A = g ?? D, j = f ?? T.modal, M = y(null), F = y({
58
58
  list: null,
59
59
  panel: null
60
60
  }), L = p((e, t, n, r) => {
@@ -96,18 +96,18 @@ function L({ back: t, children: n, closeOnSelect: r, container: i, defaultOpen:
96
96
  }), [L]);
97
97
  let B = v(() => ({
98
98
  close: (e, t, n) => void L(!1, e, t, n),
99
- closeOnSelect: r ?? T.closeOnSelect,
99
+ closeOnSelect: i ?? T.closeOnSelect,
100
100
  nodes: F.current,
101
101
  t: E
102
102
  }), [
103
- r,
103
+ i,
104
104
  T,
105
105
  L,
106
106
  E
107
107
  ]);
108
- return /* @__PURE__ */ S(o, {
109
- back: t ?? T.back,
110
- container: i,
108
+ return /* @__PURE__ */ S(t, {
109
+ back: n ?? T.back,
110
+ container: a,
111
111
  drag: "panel",
112
112
  escape: s ?? T.escape,
113
113
  initialFocus: z,
@@ -124,7 +124,7 @@ function L({ back: t, children: n, closeOnSelect: r, container: i, defaultOpen:
124
124
  ...c === void 0 ? {} : { finalFocus: c },
125
125
  children: /* @__PURE__ */ S(P.Provider, {
126
126
  value: B,
127
- children: n
127
+ children: r
128
128
  })
129
129
  });
130
130
  }
@@ -143,16 +143,16 @@ function B(e) {
143
143
  }
144
144
  var V = (e) => e.dataset.textValue ?? e.querySelector("[data-part='label']")?.textContent?.trim() ?? e.textContent?.trim() ?? "";
145
145
  function H({ render: e, ...t }) {
146
- return /* @__PURE__ */ S(r, {
146
+ return /* @__PURE__ */ S(o, {
147
147
  ...t,
148
148
  ...e === void 0 ? {} : { render: (t) => e(t) }
149
149
  });
150
150
  }
151
151
  var U = { "--slotted-drawer-sheet-inline-size": "var(--slotted-action-sheet-inline-size, 32rem)" };
152
- function W({ children: e, ref: t, render: n, style: r, ...a }) {
152
+ function W({ children: e, ref: t, render: n, style: r, ...i }) {
153
153
  let o = F();
154
- return /* @__PURE__ */ S(i, {
155
- ...a,
154
+ return /* @__PURE__ */ S(a, {
155
+ ...i,
156
156
  ref: (e) => {
157
157
  o.nodes.panel = e, R(e, t);
158
158
  },
@@ -178,20 +178,20 @@ function G(e) {
178
178
  ...e
179
179
  });
180
180
  }
181
- function K({ ref: e, render: n, ...r }) {
182
- return /* @__PURE__ */ S(t, {
183
- ...r,
184
- render: (t) => {
181
+ function K({ ref: e, render: t, ...n }) {
182
+ return /* @__PURE__ */ S(i, {
183
+ ...n,
184
+ render: (n) => {
185
185
  let r = {
186
- ...t,
186
+ ...n,
187
187
  ref: (t) => R(t, e)
188
188
  };
189
- return n === void 0 ? /* @__PURE__ */ S("h2", { ...r }) : n(r);
189
+ return t === void 0 ? /* @__PURE__ */ S("h2", { ...r }) : t(r);
190
190
  }
191
191
  });
192
192
  }
193
193
  function q({ ref: e, render: t, ...n }) {
194
- return /* @__PURE__ */ S(a, {
194
+ return /* @__PURE__ */ S(r, {
195
195
  ...n,
196
196
  render: (n) => {
197
197
  let r = c({
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-Klu-YxIk.js";
1
+ import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./action-sheet-dNnB26br.js";
2
2
  export { r as ActionSheet, p as ActionSheetCancel, c as ActionSheetContent, s as ActionSheetDefaultsProvider, d as ActionSheetGroup, a as ActionSheetGroupLabel, e as ActionSheetHeader, l as ActionSheetItem, f as ActionSheetList, t as ActionSheetMessage, o as ActionSheetSeparator, m as ActionSheetTitle, n as ActionSheetTrigger, u as useActionSheet, i as useActionSheetDefaults };
@@ -163,6 +163,8 @@ function F({ children: e, render: t, src: i, ...o }) {
163
163
  ...o,
164
164
  children: e ?? (u ? /* @__PURE__ */ g("img", {
165
165
  alt: "",
166
+ decoding: "async",
167
+ loading: "lazy",
166
168
  onError: () => l(i),
167
169
  src: i
168
170
  }) : /* @__PURE__ */ g(r, { children: /* @__PURE__ */ g(n, { name: T[s.kind] }) })),
@@ -1,2 +1,2 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./attachment-DKKiNUKe.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./attachment-C1wBuup6.js";
2
2
  export { o as ATTACHMENT_KIND_GLYPH, i as Attachment, h as AttachmentAction, u as AttachmentActions, p as AttachmentBody, a as AttachmentDefaultsProvider, s as AttachmentDetail, t as AttachmentFilename, f as AttachmentGroup, d as AttachmentLink, m as AttachmentMessage, n as AttachmentPreview, c as AttachmentProgress, g as AttachmentRemove, r as AttachmentTrigger, l as useAttachment, e as useAttachmentDefaults };
@@ -0,0 +1,469 @@
1
+ import { n as e, r as t } from "./i18n-D7xXDd8-.js";
2
+ import { n, t as r } from "./icon-D04-_QFA.js";
3
+ /* empty css */
4
+ import { keyedProps as i } from "@slotted/core/selector-key";
5
+ import { createControllable as a } from "@slotted/core/state";
6
+ import { createContext as o, useCallback as s, useContext as c, useEffect as l, useId as ee, useImperativeHandle as u, useMemo as d, useRef as f, useState as p } from "react";
7
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
8
+ import { calendarMessages as _ } from "@slotted/core/i18n";
9
+ import { addDays as v, clampDate as y, compareDate as b, createDateFormat as te, endOfWeek as ne, isDateInRange as re, isSameDate as x, monthGrid as S, plainDate as C, startOfWeek as ie, stepMonth as w, stepYear as T, toISODate as ae, todayIn as oe, visibleMonths as se, yearPage as E } from "@slotted/core/date";
10
+ //#region src/calendar/calendar-defaults.tsx
11
+ var D = o({
12
+ calendar: "gregory",
13
+ firstDayOfWeek: void 0,
14
+ fixedWeeks: !1,
15
+ months: 1,
16
+ outsideDays: void 0,
17
+ timeZone: void 0,
18
+ weekNumbers: !1
19
+ });
20
+ function ce() {
21
+ return c(D);
22
+ }
23
+ function le({ children: e, ...t }) {
24
+ let n = ce();
25
+ return /* @__PURE__ */ h(D.Provider, {
26
+ value: {
27
+ calendar: t.calendar ?? n.calendar,
28
+ firstDayOfWeek: t.firstDayOfWeek ?? n.firstDayOfWeek,
29
+ fixedWeeks: t.fixedWeeks ?? n.fixedWeeks,
30
+ months: t.months ?? n.months,
31
+ outsideDays: t.outsideDays ?? n.outsideDays,
32
+ timeZone: t.timeZone ?? n.timeZone,
33
+ weekNumbers: t.weekNumbers ?? n.weekNumbers
34
+ },
35
+ children: e
36
+ });
37
+ }
38
+ //#endregion
39
+ //#region src/calendar/calendar-selection.ts
40
+ function O(e) {
41
+ return e !== null && !Array.isArray(e) && "start" in e;
42
+ }
43
+ function k(e) {
44
+ return e === null ? [] : Array.isArray(e) ? e : O(e) ? [e.start, e.end].filter((e) => e !== null) : [e];
45
+ }
46
+ function A(e, t) {
47
+ if (!O(t)) return null;
48
+ let { start: n, end: r } = t;
49
+ return n !== null && x(e, n) ? "start" : r !== null && x(e, r) ? "end" : n === null || r === null ? null : b(e, n) > 0 && b(e, r) < 0 ? "inside" : null;
50
+ }
51
+ function j(e, t) {
52
+ if (O(t)) {
53
+ let n = A(e, t);
54
+ return n === "start" || n === "end";
55
+ }
56
+ return k(t).some((t) => x(t, e));
57
+ }
58
+ function ue(e, t, n) {
59
+ if (n === "single") return j(e, t) ? null : e;
60
+ if (n === "multiple") {
61
+ let n = k(t), r = n.filter((t) => !x(t, e));
62
+ return r.length === n.length ? [...n, e].sort(b) : r;
63
+ }
64
+ let r = O(t) ? t : {
65
+ start: null,
66
+ end: null
67
+ };
68
+ return r.start === null || r.end !== null ? {
69
+ start: e,
70
+ end: null
71
+ } : b(e, r.start) < 0 ? {
72
+ start: e,
73
+ end: r.start
74
+ } : {
75
+ start: r.start,
76
+ end: e
77
+ };
78
+ }
79
+ function de(e, t) {
80
+ return t === null || !O(e) || e.start === null || e.end !== null ? null : b(t, e.start) < 0 ? {
81
+ start: t,
82
+ end: e.start
83
+ } : {
84
+ start: e.start,
85
+ end: t
86
+ };
87
+ }
88
+ function fe(e, t) {
89
+ if (O(e) || O(t)) return !O(e) || !O(t) ? !1 : x(e.start, t.start) && x(e.end, t.end);
90
+ let n = k(e), r = k(t);
91
+ return n.length === r.length && n.every((e, t) => x(e, r[t] ?? null));
92
+ }
93
+ //#endregion
94
+ //#region src/calendar/calendar.tsx
95
+ var pe = {
96
+ day: 7,
97
+ month: 4,
98
+ year: 4
99
+ }, M = 12;
100
+ function me({ calendar: o, className: c, defaultFocusedDate: b, defaultValue: S, defaultView: ae, disabled: D, firstDayOfWeek: le, fixedWeeks: k, focusedDate: A, granularity: j, invalid: me, isDateUnavailable: ge, locale: _e, max: N, min: P, messages: ve, months: ye, onFocusedDateChange: be, onKeyDown: xe, onPreviewChange: Se, onValueChange: Ce, onViewChange: we, marks: Te, outsideDays: Ee, readOnly: De, ref: Oe, render: ke, selectionMode: Ae = "single", style: je, timeZone: Me, value: F, view: Ne, weekNumbers: Pe, ...Fe }) {
101
+ let I = ce(), Ie = e(), L = t(_, ve), R = f(null), Le = ee(), Re = _e ?? Ie, ze = le ?? I.firstDayOfWeek, Be = Me ?? I.timeZone, z = Math.max(1, ye ?? I.months), Ve = Pe ?? I.weekNumbers, He = k ?? I.fixedWeeks, Ue = Ee ?? I.outsideDays ?? (z > 1 ? "hidden" : "shown"), We = o ?? I.calendar, B = D !== !0 && De !== !0, V = d(() => te({
102
+ locale: Re,
103
+ firstDayOfWeek: ze
104
+ }), [ze, Re]), [H, Ge] = p(null);
105
+ l(() => Ge(oe(Be)), [Be]);
106
+ let [Ke, qe] = p(S ?? null), U = F ?? Ke, W = S ?? F ?? null, Je = W === null ? null : Array.isArray(W) ? W[0] ?? null : "start" in W ? W.start : W, Ye = b !== void 0 || A !== void 0 || Je !== null, G = b ?? A ?? Je ?? C(2026, 1, 1), [Xe, Ze] = p(G), K = A ?? Xe, q = f(!1), J = j === "month", [Qe, $e] = p(ae ?? (J ? "month" : "day")), et = Ne ?? Qe, Y = J && et === "day" ? "month" : et, [tt, nt] = p(null), X = Ae === "range" && B ? de(U, tt ?? K) : null, Z = X === null ? null : O(U) && U.start !== null && x(X.start, U.start) ? X.end : X.start, rt = f(null);
107
+ l(() => {
108
+ x(rt.current, Z) || (rt.current = Z, Se?.(Z));
109
+ }, [Se, Z]);
110
+ let [it, at] = p(() => ({
111
+ year: G.year,
112
+ month: G.month
113
+ })), ot = s((e, t) => {
114
+ let n = t.year * 12 + (t.month - 1), r = e.year * 12 + (e.month - 1);
115
+ if (r >= n && r < n + z) return t;
116
+ let i = n + Math.floor((r - n) / z) * z;
117
+ return {
118
+ year: Math.floor(i / 12),
119
+ month: i % 12 + 1
120
+ };
121
+ }, [z]);
122
+ l(() => {
123
+ if (H === null || Ye) return;
124
+ let e = y(H, P, N);
125
+ Ze((t) => x(t, G) ? e : t), at((t) => t.year === G.year && t.month === G.month ? {
126
+ year: e.year,
127
+ month: e.month
128
+ } : t);
129
+ }, [H]);
130
+ let st = s((e, t, n) => {
131
+ a({
132
+ controlled: F,
133
+ initial: U,
134
+ equals: fe,
135
+ onRequest: (e) => Ce?.(e.value, e)
136
+ }).request(e, t, n) && qe(e);
137
+ }, [
138
+ U,
139
+ Ce,
140
+ F
141
+ ]), Q = s((e, t, n) => {
142
+ let r = y(e, P, N), i = a({
143
+ controlled: A,
144
+ initial: K,
145
+ equals: (e, t) => x(e, t),
146
+ onRequest: (e) => be?.(e.value, e)
147
+ });
148
+ q.current = t === "keyboard", i.request(r, t, n) && Ze(r);
149
+ }, [
150
+ K,
151
+ A,
152
+ N,
153
+ P,
154
+ be
155
+ ]);
156
+ l(() => {
157
+ at((e) => ot(K, e));
158
+ }, [K, ot]);
159
+ let $ = s((e) => {
160
+ Ne === void 0 && $e(e), we?.(e);
161
+ }, [we, Ne]);
162
+ l(() => {
163
+ if (!q.current) return;
164
+ let e = R.current, t = e?.querySelector("[data-part=\"cell\"]:not([data-outside-month]) [data-part=\"day\"][tabindex=\"0\"], [data-part=\"period\"][tabindex=\"0\"]");
165
+ if (t == null) {
166
+ e?.querySelector("[data-part=\"day\"][tabindex=\"0\"]") ?? (q.current = !1);
167
+ return;
168
+ }
169
+ q.current = !1, t.focus();
170
+ }), u(Oe, () => ({
171
+ focus: () => {
172
+ R.current?.querySelector("[data-part=\"day\"][tabindex=\"0\"], [data-part=\"period\"][tabindex=\"0\"]")?.focus();
173
+ },
174
+ focusDate: (e) => Q(e, "keyboard", void 0)
175
+ }), [Q]);
176
+ let ct = s((e) => !re(e, P, N) || ge?.(e) === !0, [
177
+ ge,
178
+ N,
179
+ P
180
+ ]), lt = (e, t, n) => {
181
+ B && !ct(e) && (st(ue(e, U, Ae), t, n), Q(e, t, n));
182
+ }, ut = (e, t) => P !== void 0 && e * 12 + t < P.year * 12 + P.month || N !== void 0 && e * 12 + t > N.year * 12 + N.month, dt = (e, t, n, r) => {
183
+ if (!B || ut(e, t)) return;
184
+ let i = C(e, t, 1);
185
+ st(i, n, r), Q(i, n, r);
186
+ }, ft = U === null || Array.isArray(U) || O(U) ? null : {
187
+ year: U.year,
188
+ month: U.month
189
+ }, pt = (e) => {
190
+ if (xe?.(e), e.defaultPrevented) return;
191
+ let t = R.current !== null && getComputedStyle(R.current).direction === "rtl", n = t ? "ArrowLeft" : "ArrowRight", r = t ? "ArrowRight" : "ArrowLeft", i = () => {
192
+ e.preventDefault(), e.stopPropagation();
193
+ }, a = (t) => {
194
+ i(), Q(t, "keyboard", e);
195
+ };
196
+ if (J && Y === "month") {
197
+ let t = (e) => {
198
+ let t = K.year * 12 + (K.month - 1) + e;
199
+ return C(Math.floor(t / 12), t % 12 + 1, 1);
200
+ }, o = pe.month;
201
+ switch (e.key) {
202
+ case n: return a(t(1));
203
+ case r: return a(t(-1));
204
+ case "ArrowUp": return a(t(-o));
205
+ case "ArrowDown": return a(t(o));
206
+ case "Home": return a(C(K.year, 1, 1));
207
+ case "End": return a(C(K.year, 12, 1));
208
+ case "PageUp": return a(t(-12));
209
+ case "PageDown": return a(t(12));
210
+ case "Enter":
211
+ case " ":
212
+ i(), dt(K.year, K.month, "keyboard", e);
213
+ return;
214
+ }
215
+ }
216
+ switch (e.key) {
217
+ case n: return a(v(K, 1));
218
+ case r: return a(v(K, -1));
219
+ case "ArrowUp": return a(v(K, -7));
220
+ case "ArrowDown": return a(v(K, 7));
221
+ case "Home": return a(ie(K, V.firstDayOfWeek));
222
+ case "End": return a(ne(K, V.firstDayOfWeek));
223
+ case "PageUp": return a(e.shiftKey ? T(K, -1).date : w(K, -1).date);
224
+ case "PageDown": return a(e.shiftKey ? T(K, 1).date : w(K, 1).date);
225
+ case "Enter":
226
+ case " ":
227
+ i(), lt(K, "keyboard", e);
228
+ return;
229
+ case "Escape":
230
+ if (Y === "day" || J && Y === "month") return;
231
+ i(), $(Y === "year" ? "month" : "day");
232
+ return;
233
+ default: return;
234
+ }
235
+ }, mt = (e) => (t) => {
236
+ if (Y === "day") {
237
+ Q(w(K, e * z).date, "pointer", t);
238
+ return;
239
+ }
240
+ Q(Y === "month" ? T(K, e).date : T(K, e * M).date, "pointer", t);
241
+ }, ht = C(it.year, it.month, 1), gt = Y === "day" ? z === 1 ? V.monthYear(ht) : `${V.monthYear(ht, "short")} – ${V.monthYear(w(ht, z - 1).date, "short")}` : Y === "month" ? String(K.year) : `${String(E(K.year, M)[0] ?? K.year)} – ${String(E(K.year, M).at(-1) ?? K.year)}`, _t = Y === "day" ? /* @__PURE__ */ h("div", {
242
+ "data-part": "grids",
243
+ "data-part-grids": "",
244
+ children: se(it, z).map((e) => /* @__PURE__ */ h(he, {
245
+ editable: B,
246
+ firstDayOfWeek: V.firstDayOfWeek,
247
+ fixedWeeks: He,
248
+ focused: K,
249
+ format: V,
250
+ headingId: Le,
251
+ month: e,
252
+ onHover: nt,
253
+ marks: Te,
254
+ markName: (e) => e.count === void 0 ? L("marked") : L("markCount", { count: e.count }),
255
+ onSelect: lt,
256
+ outsideDays: Ue,
257
+ pending: X,
258
+ today: H,
259
+ unavailable: ct,
260
+ value: U,
261
+ weekNumbers: Ve
262
+ }, `${String(e.year)}-${String(e.month)}`))
263
+ }) : Y === "month" && J ? /* @__PURE__ */ h("div", {
264
+ "data-part": "months",
265
+ "data-part-months": "",
266
+ children: V.monthNames("short").map((e, t) => {
267
+ let n = t + 1, r = ut(K.year, n), i = ft?.year === K.year && ft.month === n;
268
+ return /* @__PURE__ */ h("button", {
269
+ "aria-label": V.monthYear(C(K.year, n, 1)),
270
+ "data-part": "period",
271
+ "data-part-period": "",
272
+ onClick: (e) => dt(K.year, n, "pointer", e),
273
+ tabIndex: K.month === n ? 0 : -1,
274
+ type: "button",
275
+ ...i ? {
276
+ "aria-selected": !0,
277
+ "data-selected": ""
278
+ } : {},
279
+ ...r ? {
280
+ "aria-disabled": !0,
281
+ "data-unavailable": ""
282
+ } : {},
283
+ ...K.month === n ? { "data-focused": "" } : {},
284
+ children: e
285
+ }, e);
286
+ })
287
+ }) : Y === "month" ? /* @__PURE__ */ h("div", {
288
+ "data-part": "months",
289
+ "data-part-months": "",
290
+ children: V.monthNames("short").map((e, t) => /* @__PURE__ */ h("button", {
291
+ "data-part": "period",
292
+ "data-part-period": "",
293
+ onClick: (e) => {
294
+ Q({
295
+ ...K,
296
+ month: t + 1,
297
+ day: 1
298
+ }, "pointer", e), $("day");
299
+ },
300
+ type: "button",
301
+ ...K.month === t + 1 ? {
302
+ "aria-selected": !0,
303
+ "data-selected": ""
304
+ } : {},
305
+ children: e
306
+ }, e))
307
+ }) : /* @__PURE__ */ h("div", {
308
+ "data-part": "years",
309
+ "data-part-years": "",
310
+ children: E(K.year, M).map((e) => /* @__PURE__ */ h("button", {
311
+ "data-part": "period",
312
+ "data-part-period": "",
313
+ onClick: (t) => {
314
+ Q({
315
+ ...K,
316
+ year: e,
317
+ day: 1
318
+ }, "pointer", t), $("month");
319
+ },
320
+ type: "button",
321
+ ...K.year === e ? {
322
+ "aria-selected": !0,
323
+ "data-selected": ""
324
+ } : {},
325
+ children: e
326
+ }, e))
327
+ }), [vt, yt] = Y === "day" ? [L("previousMonth"), L("nextMonth")] : Y === "month" ? [L("previousYear"), L("nextYear")] : [L("previousYears"), L("nextYears")], bt = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
328
+ "data-part": "header",
329
+ "data-part-header": "",
330
+ children: [
331
+ /* @__PURE__ */ h("button", {
332
+ "aria-label": vt,
333
+ "data-part": "previous",
334
+ "data-part-previous": "",
335
+ disabled: !B,
336
+ onClick: mt(-1),
337
+ type: "button",
338
+ children: /* @__PURE__ */ h(r, {
339
+ directional: !0,
340
+ children: /* @__PURE__ */ h(n, { name: "chevron-right" })
341
+ })
342
+ }),
343
+ /* @__PURE__ */ g("button", {
344
+ "aria-live": "polite",
345
+ "data-part": "heading",
346
+ "data-part-heading": "",
347
+ disabled: !B || Y === "year",
348
+ id: Le,
349
+ onClick: () => $(Y === "day" ? "month" : "year"),
350
+ type: "button",
351
+ children: [gt, Y === "year" ? null : /* @__PURE__ */ h(r, { children: /* @__PURE__ */ h(n, { name: "chevron-down" }) })]
352
+ }),
353
+ /* @__PURE__ */ h("button", {
354
+ "aria-label": yt,
355
+ "data-part": "next",
356
+ "data-part-next": "",
357
+ disabled: !B,
358
+ onClick: mt(1),
359
+ type: "button",
360
+ children: /* @__PURE__ */ h(r, {
361
+ directional: !0,
362
+ children: /* @__PURE__ */ h(n, { name: "chevron-right" })
363
+ })
364
+ })
365
+ ]
366
+ }), _t] }), xt = i({
367
+ ...Fe,
368
+ children: bt,
369
+ className: c,
370
+ onKeyDown: pt,
371
+ style: je,
372
+ ...D === !0 ? { "data-disabled": "" } : {},
373
+ ...me === !0 ? { "data-invalid": "" } : {},
374
+ ...De === !0 ? { "data-readonly": "" } : {},
375
+ ...Ve ? { "data-week-numbers": "" } : {},
376
+ ...z > 1 ? { "data-months": String(z) } : {},
377
+ "data-calendar": We,
378
+ "data-columns": String(pe[Y]),
379
+ "data-part": "root",
380
+ "data-ui": "calendar",
381
+ "data-view": Y,
382
+ ref: R
383
+ });
384
+ return ke === void 0 ? /* @__PURE__ */ h("div", { ...xt }) : ke(xt);
385
+ }
386
+ function he({ editable: e, firstDayOfWeek: t, fixedWeeks: n, focused: r, format: i, headingId: a, markName: o, marks: s, month: c, onHover: l, onSelect: ee, outsideDays: u, pending: d, today: f, unavailable: p, value: m, weekNumbers: _ }) {
387
+ let v = S({
388
+ ...c,
389
+ firstDayOfWeek: t,
390
+ fixedWeeks: n
391
+ }), y = i.monthYear(C(c.year, c.month, 1)), b = i.weekdayNames("long"), te = i.weekdayNames("narrow");
392
+ return /* @__PURE__ */ g("table", {
393
+ "aria-labelledby": a,
394
+ "data-part": "grid",
395
+ "data-part-grid": "",
396
+ role: "grid",
397
+ children: [
398
+ /* @__PURE__ */ h("caption", {
399
+ "data-part": "grid-caption",
400
+ "data-part-grid-caption": "",
401
+ children: y
402
+ }),
403
+ /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
404
+ "data-part": "week-headers",
405
+ "data-part-week-headers": "",
406
+ children: [_ ? /* @__PURE__ */ h("th", {
407
+ "aria-hidden": "true",
408
+ "data-part": "week-number",
409
+ "data-part-week-number": ""
410
+ }) : null, te.map((e, t) => /* @__PURE__ */ h("th", {
411
+ abbr: b[t],
412
+ "data-part": "week-header",
413
+ "data-part-week-header": "",
414
+ scope: "col",
415
+ children: e
416
+ }, b[t]))]
417
+ }) }),
418
+ /* @__PURE__ */ h("tbody", { children: v.map((t) => /* @__PURE__ */ g("tr", {
419
+ "data-part": "week",
420
+ "data-part-week": "",
421
+ children: [_ ? /* @__PURE__ */ h("th", {
422
+ "data-part": "week-number",
423
+ "data-part-week-number": "",
424
+ scope: "row",
425
+ children: t.weekNumber
426
+ }) : null, t.days.map((t) => {
427
+ let n = t.outsideMonth, i = n && u === "hidden", a = p(t.date) || n && u === "shown", c = j(t.date, m), _ = A(t.date, d ?? m), v = d !== null && _ !== null && !c, y = x(t.date, r), b = i ? void 0 : s?.get(ae(t.date));
428
+ return /* @__PURE__ */ h("td", {
429
+ "data-part": "cell",
430
+ "data-part-cell": "",
431
+ ...n ? { "data-outside-month": "" } : {},
432
+ ...!i && p(t.date) ? { "data-unavailable": "" } : {},
433
+ ...!i && c ? { "data-selected": "" } : {},
434
+ ...!i && _ === "start" ? { "data-range-start": "" } : {},
435
+ ...!i && _ === "end" ? { "data-range-end": "" } : {},
436
+ ...!i && _ === "inside" ? { "data-in-range": "" } : {},
437
+ ...!i && v ? { "data-preview": "" } : {},
438
+ children: i ? null : /* @__PURE__ */ g("span", {
439
+ "aria-disabled": a ? !0 : void 0,
440
+ "aria-selected": c ? !0 : void 0,
441
+ "data-part": "day",
442
+ "data-part-day": "",
443
+ ...f !== null && x(t.date, f) ? { "data-today": "" } : {},
444
+ onClick: (e) => {
445
+ a || ee(t.date, "pointer", e);
446
+ },
447
+ onPointerEnter: () => l(t.date),
448
+ onPointerLeave: () => l(null),
449
+ role: "button",
450
+ tabIndex: y && e ? 0 : -1,
451
+ children: [t.date.day, b === void 0 ? null : /* @__PURE__ */ h("span", {
452
+ "data-part": "mark",
453
+ "data-part-mark": "",
454
+ ...b.tone === void 0 ? {} : { "data-tone": b.tone },
455
+ children: /* @__PURE__ */ h("span", {
456
+ "data-ui": "visually-hidden",
457
+ "data-ui-visually-hidden": "",
458
+ children: `, ${o(b)}`
459
+ })
460
+ })]
461
+ })
462
+ }, `${String(t.date.month)}-${String(t.date.day)}`);
463
+ })]
464
+ }, t.weekNumber)) })
465
+ ]
466
+ });
467
+ }
468
+ //#endregion
469
+ export { j as a, le as c, fe as i, ce as l, k as n, ue as o, O as r, A as s, me as t };
package/dist/calendar.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-DZx00W81.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-wqDIW4Z8.js";
2
2
  export { c as Calendar, t as CalendarDefaultsProvider, i as asDates, o as isRange, n as isSameValue, e as isSelected, a as nextValue, s as rangeStateOf, r as useCalendarDefaults };
@@ -1,7 +1,7 @@
1
1
  import { r as e } from "./i18n-D7xXDd8-.js";
2
2
  import { n as t, t as n } from "./icon-D04-_QFA.js";
3
3
  import { _ as r, c as i, n as a, t as o } from "./menu-parts-BDdCTmko.js";
4
- import { d as s, o as c, u as l } from "./drawer-CFpBsLG6.js";
4
+ import { d as s, f as c, s as l } from "./drawer-Du1aC1px.js";
5
5
  import { n as u } from "./icon-button-DbSZKGT4.js";
6
6
  import { t as d } from "./checkbox-Hq1PXk04.js";
7
7
  import { t as f } from "./text-field-CHYoral_.js";
@@ -118,7 +118,7 @@ function ke({ trigger: e }) {
118
118
  return S(() => (t(e), () => t(null)), [t, e]), null;
119
119
  }
120
120
  function Ae({ trigger: e }) {
121
- let t = s();
121
+ let t = c();
122
122
  return S(() => {
123
123
  t.nodes.trigger = e;
124
124
  }, [t.nodes, e]), null;
@@ -131,8 +131,8 @@ var je = {
131
131
  function Me(e, t) {
132
132
  typeof e == "function" ? e(t) : e && (e.current = t);
133
133
  }
134
- function Ne({ apply: s, columnState: g, columns: _, defaultColumnState: ee, defaultOpen: te, messages: y, onColumnStateChange: oe, onOpenChange: ge, open: ve, outOfSpace: A, presentation: Me, ref: Ne, ...j }) {
135
- let Pe = _e(), M = Me ?? Pe.presentation, Fe = s ?? Pe.apply, N = e(se, y), P = ie(), Ie = `${P}-panel`, F = `${P}-title`, Le = C(() => fe(ee, _), [ee, _]), [Re, ze] = Oe(C(() => g === void 0 ? void 0 : fe(g, _), [g, _]), Le, oe, Se), I = C(() => fe(Re, _), [Re, _]), [L, Be] = Oe(ve, te ?? !1, ge), [R, z] = T(null), B = Fe === "confirm", V = B && R !== null ? R : I, [Ve, He] = T(""), H = xe(Ve.trim()), U = H !== "", W = C(() => new Map(_.map((e) => [e.id, e])), [_]), G = C(() => be(V), [V]), Ue = C(() => new Set(V.hidden), [V.hidden]), We = C(() => new Set(A?.hidden ?? []), [A]), Ge = C(() => new Set(A?.popin ?? []), [A]), Ke = V.order.length, qe = Ke - V.order.filter((e) => Ue.has(e)).length, Je = b((e) => {
134
+ function Ne({ apply: c, columnState: g, columns: _, defaultColumnState: ee, defaultOpen: te, messages: y, onColumnStateChange: oe, onOpenChange: ge, open: ve, outOfSpace: A, presentation: Me, ref: Ne, ...j }) {
135
+ let Pe = _e(), M = Me ?? Pe.presentation, Fe = c ?? Pe.apply, N = e(se, y), P = ie(), Ie = `${P}-panel`, F = `${P}-title`, Le = C(() => fe(ee, _), [ee, _]), [Re, ze] = Oe(C(() => g === void 0 ? void 0 : fe(g, _), [g, _]), Le, oe, Se), I = C(() => fe(Re, _), [Re, _]), [L, Be] = Oe(ve, te ?? !1, ge), [R, z] = T(null), B = Fe === "confirm", V = B && R !== null ? R : I, [Ve, He] = T(""), H = xe(Ve.trim()), U = H !== "", W = C(() => new Map(_.map((e) => [e.id, e])), [_]), G = C(() => be(V), [V]), Ue = C(() => new Set(V.hidden), [V.hidden]), We = C(() => new Set(A?.hidden ?? []), [A]), Ge = C(() => new Set(A?.popin ?? []), [A]), Ke = V.order.length, qe = Ke - V.order.filter((e) => Ue.has(e)).length, Je = b((e) => {
136
136
  if (!U) return !0;
137
137
  let t = W.get(e);
138
138
  return t ? xe(t.label).includes(H) || xe(t.description ?? "").includes(H) : !1;
@@ -508,13 +508,13 @@ function Ne({ apply: s, columnState: g, columns: _, defaultColumnState: ee, defa
508
508
  }), gt = (e, t) => {
509
509
  q(e, t.reason, t.source);
510
510
  };
511
- return M === "inline" ? ht : M === "drawer" ? /* @__PURE__ */ O(l, {
511
+ return M === "inline" ? ht : M === "drawer" ? /* @__PURE__ */ O(s, {
512
512
  finalFocus: $e ? { current: $e } : void 0,
513
513
  onOpenChange: gt,
514
514
  open: L,
515
515
  side: "end",
516
516
  size: "sm",
517
- children: [/* @__PURE__ */ D(Ae, { trigger: $e }), /* @__PURE__ */ D(c, {
517
+ children: [/* @__PURE__ */ D(Ae, { trigger: $e }), /* @__PURE__ */ D(l, {
518
518
  "aria-labelledby": F,
519
519
  children: ht
520
520
  })]
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "./column-manager-e234Ey_u.js";
1
+ import { a as e, i as t, n, r, t as i } from "./column-manager-C8fN_mDy.js";
2
2
  export { i as ColumnManager, t as ColumnManagerProvider, n as ColumnManagerRoot, r as ColumnManagerTrigger, e as useColumnManagerDefaults };