@proyecto-viviana/solidaria-components 0.4.0 → 0.4.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 (192) hide show
  1. package/dist/ActionBar.d.ts.map +1 -1
  2. package/dist/ActionBar.js +2 -11
  3. package/dist/ActionBar.js.map +1 -1
  4. package/dist/ActionBar.jsx +2 -11
  5. package/dist/ActionBar.jsx.map +1 -1
  6. package/dist/ActionGroup.d.ts.map +1 -1
  7. package/dist/ActionGroup.js +1 -1
  8. package/dist/ActionGroup.js.map +1 -1
  9. package/dist/ActionGroup.jsx +1 -1
  10. package/dist/ActionGroup.jsx.map +1 -1
  11. package/dist/Autocomplete.d.ts +2 -2
  12. package/dist/Autocomplete.d.ts.map +1 -1
  13. package/dist/Autocomplete.js +7 -7
  14. package/dist/Autocomplete.js.map +1 -1
  15. package/dist/Autocomplete.jsx +7 -7
  16. package/dist/Autocomplete.jsx.map +1 -1
  17. package/dist/Breadcrumbs.d.ts.map +1 -1
  18. package/dist/Breadcrumbs.js +15 -16
  19. package/dist/Breadcrumbs.js.map +1 -1
  20. package/dist/Breadcrumbs.jsx +19 -24
  21. package/dist/Breadcrumbs.jsx.map +1 -1
  22. package/dist/Calendar.d.ts.map +1 -1
  23. package/dist/Calendar.js +100 -65
  24. package/dist/Calendar.js.map +1 -1
  25. package/dist/Calendar.jsx +10 -1
  26. package/dist/Calendar.jsx.map +1 -1
  27. package/dist/Color.d.ts.map +1 -1
  28. package/dist/Color.js +15 -18
  29. package/dist/Color.js.map +1 -1
  30. package/dist/Color.jsx +15 -19
  31. package/dist/Color.jsx.map +1 -1
  32. package/dist/ComboBox.d.ts +4 -0
  33. package/dist/ComboBox.d.ts.map +1 -1
  34. package/dist/ComboBox.js +21 -13
  35. package/dist/ComboBox.js.map +1 -1
  36. package/dist/ComboBox.jsx +23 -13
  37. package/dist/ComboBox.jsx.map +1 -1
  38. package/dist/DateField.d.ts +11 -2
  39. package/dist/DateField.d.ts.map +1 -1
  40. package/dist/DateField2.js +237 -234
  41. package/dist/DateField2.js.map +1 -1
  42. package/dist/DateField2.jsx +134 -97
  43. package/dist/DateField2.jsx.map +1 -1
  44. package/dist/DatePicker.d.ts +42 -3
  45. package/dist/DatePicker.d.ts.map +1 -1
  46. package/dist/DatePicker.js +6 -990
  47. package/dist/DatePicker.jsx +6 -681
  48. package/dist/DatePicker2.js +1171 -0
  49. package/dist/DatePicker2.js.map +1 -0
  50. package/dist/DatePicker2.jsx +820 -0
  51. package/dist/DatePicker2.jsx.map +1 -0
  52. package/dist/DateRangePickerContext.d.ts +2 -0
  53. package/dist/DateRangePickerContext.d.ts.map +1 -1
  54. package/dist/Disclosure.d.ts.map +1 -1
  55. package/dist/Disclosure.js +3 -0
  56. package/dist/Disclosure.js.map +1 -1
  57. package/dist/Disclosure.jsx +1 -1
  58. package/dist/Disclosure.jsx.map +1 -1
  59. package/dist/GridList.d.ts.map +1 -1
  60. package/dist/GridList.js +2 -2
  61. package/dist/GridList.js.map +1 -1
  62. package/dist/GridList.jsx +2 -2
  63. package/dist/GridList.jsx.map +1 -1
  64. package/dist/ListBox.d.ts +2 -2
  65. package/dist/ListBox.d.ts.map +1 -1
  66. package/dist/ListBox.js +327 -166
  67. package/dist/ListBox.js.map +1 -1
  68. package/dist/ListBox.jsx +161 -25
  69. package/dist/ListBox.jsx.map +1 -1
  70. package/dist/Modal.d.ts.map +1 -1
  71. package/dist/Modal.js +7 -5
  72. package/dist/Modal.js.map +1 -1
  73. package/dist/Modal.jsx +5 -5
  74. package/dist/Modal.jsx.map +1 -1
  75. package/dist/Popover.d.ts.map +1 -1
  76. package/dist/Popover.js +16 -9
  77. package/dist/Popover.js.map +1 -1
  78. package/dist/Popover.jsx +25 -4
  79. package/dist/Popover.jsx.map +1 -1
  80. package/dist/RangeCalendar.d.ts.map +1 -1
  81. package/dist/RangeCalendar.js +182 -46
  82. package/dist/RangeCalendar.js.map +1 -1
  83. package/dist/RangeCalendar.jsx +72 -2
  84. package/dist/RangeCalendar.jsx.map +1 -1
  85. package/dist/SearchField.d.ts.map +1 -1
  86. package/dist/SearchField.js +26 -2
  87. package/dist/SearchField.js.map +1 -1
  88. package/dist/SearchField.jsx +26 -2
  89. package/dist/SearchField.jsx.map +1 -1
  90. package/dist/Select.d.ts +7 -0
  91. package/dist/Select.d.ts.map +1 -1
  92. package/dist/Select.js +62 -49
  93. package/dist/Select.js.map +1 -1
  94. package/dist/Select.jsx +33 -18
  95. package/dist/Select.jsx.map +1 -1
  96. package/dist/SharedElementTransition.d.ts.map +1 -1
  97. package/dist/SharedElementTransition.js +35 -33
  98. package/dist/SharedElementTransition.js.map +1 -1
  99. package/dist/SharedElementTransition.jsx +35 -33
  100. package/dist/SharedElementTransition.jsx.map +1 -1
  101. package/dist/StepList.d.ts.map +1 -1
  102. package/dist/StepList.js +2 -9
  103. package/dist/StepList.js.map +1 -1
  104. package/dist/StepList.jsx +1 -6
  105. package/dist/StepList.jsx.map +1 -1
  106. package/dist/Table.d.ts +2 -0
  107. package/dist/Table.d.ts.map +1 -1
  108. package/dist/Table.js +10 -3
  109. package/dist/Table.js.map +1 -1
  110. package/dist/Table.jsx +10 -3
  111. package/dist/Table.jsx.map +1 -1
  112. package/dist/Tabs.d.ts.map +1 -1
  113. package/dist/Tabs.js +3 -0
  114. package/dist/Tabs.js.map +1 -1
  115. package/dist/Tabs.jsx +1 -1
  116. package/dist/Tabs.jsx.map +1 -1
  117. package/dist/TagGroup.d.ts +3 -1
  118. package/dist/TagGroup.d.ts.map +1 -1
  119. package/dist/TagGroup.js +12 -8
  120. package/dist/TagGroup.js.map +1 -1
  121. package/dist/TagGroup.jsx +11 -8
  122. package/dist/TagGroup.jsx.map +1 -1
  123. package/dist/TextField.js +4 -1
  124. package/dist/TextField.js.map +1 -1
  125. package/dist/TextField.jsx +4 -1
  126. package/dist/TextField.jsx.map +1 -1
  127. package/dist/TimeField.d.ts +14 -50
  128. package/dist/TimeField.d.ts.map +1 -1
  129. package/dist/TimeField.js +111 -205
  130. package/dist/TimeField.js.map +1 -1
  131. package/dist/TimeField.jsx +76 -82
  132. package/dist/TimeField.jsx.map +1 -1
  133. package/dist/Tree.d.ts.map +1 -1
  134. package/dist/Tree.js +3 -3
  135. package/dist/Tree.js.map +1 -1
  136. package/dist/Tree.jsx +3 -3
  137. package/dist/Tree.jsx.map +1 -1
  138. package/dist/index.d.ts +2 -3
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +5 -6
  141. package/dist/index.jsx +5 -6
  142. package/dist/useDragAndDrop.d.ts +0 -8
  143. package/dist/useDragAndDrop.d.ts.map +1 -1
  144. package/dist/useDragAndDrop2.js +6 -2
  145. package/dist/useDragAndDrop2.js.map +1 -1
  146. package/dist/useDragAndDrop2.jsx +6 -2
  147. package/dist/useDragAndDrop2.jsx.map +1 -1
  148. package/dist/utils.d.ts +1 -0
  149. package/dist/utils.d.ts.map +1 -1
  150. package/dist/utils.js +2 -2
  151. package/dist/utils.js.map +1 -1
  152. package/dist/utils.jsx +2 -2
  153. package/dist/utils.jsx.map +1 -1
  154. package/package.json +3 -9
  155. package/src/ActionBar.tsx +10 -12
  156. package/src/ActionGroup.tsx +5 -3
  157. package/src/Autocomplete.tsx +14 -9
  158. package/src/Breadcrumbs.tsx +55 -38
  159. package/src/Calendar.tsx +30 -1
  160. package/src/Color.tsx +42 -27
  161. package/src/ComboBox.tsx +49 -17
  162. package/src/DateField.tsx +285 -52
  163. package/src/DatePicker.tsx +345 -57
  164. package/src/DateRangePickerContext.tsx +2 -0
  165. package/src/Disclosure.tsx +4 -0
  166. package/src/GridList.tsx +8 -2
  167. package/src/ListBox.tsx +323 -21
  168. package/src/Modal.tsx +21 -5
  169. package/src/Popover.tsx +28 -7
  170. package/src/RangeCalendar.tsx +120 -1
  171. package/src/SearchField.tsx +53 -1
  172. package/src/Select.tsx +101 -20
  173. package/src/SharedElementTransition.tsx +92 -36
  174. package/src/StepList.tsx +0 -7
  175. package/src/Table.tsx +19 -4
  176. package/src/Tabs.tsx +1 -0
  177. package/src/TagGroup.tsx +26 -6
  178. package/src/TextField.tsx +1 -1
  179. package/src/TimeField.tsx +113 -196
  180. package/src/Tree.tsx +14 -4
  181. package/src/index.ts +1 -8
  182. package/src/useDragAndDrop.ts +8 -10
  183. package/src/utils.tsx +3 -3
  184. package/dist/DatePicker.js.map +0 -1
  185. package/dist/DatePicker.jsx.map +0 -1
  186. package/dist/HiddenTimeInput.d.ts +0 -25
  187. package/dist/HiddenTimeInput.d.ts.map +0 -1
  188. package/dist/HiddenTimeInput.js +0 -104
  189. package/dist/HiddenTimeInput.js.map +0 -1
  190. package/dist/HiddenTimeInput.jsx +0 -69
  191. package/dist/HiddenTimeInput.jsx.map +0 -1
  192. package/src/HiddenTimeInput.tsx +0 -133
package/dist/Calendar.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { dataAttr, useIsHydrated, useRenderProps } from "./utils.js";
2
2
  import { VisuallyHidden } from "./VisuallyHidden.js";
3
- import { className, createComponent, effect, getNextElement, getNextMarker, insert, memo, mergeProps, runHydrationEvents, spread, style, template, use } from "solid-js/web";
3
+ import { className, createComponent, delegateEvents, effect, getNextElement, getNextMarker, insert, memo, mergeProps, runHydrationEvents, setAttribute, setProperty, spread, style, template, use } from "solid-js/web";
4
4
  import { For, Index, Show, createContext, createMemo, createSignal, splitProps, useContext } from "solid-js";
5
5
  import { createCalendar, createCalendarCell, createCalendarGrid, createHover } from "@proyecto-viviana/solidaria";
6
6
  import { createCalendarState, endOfMonth, isSameMonth } from "@proyecto-viviana/solid-stately";
@@ -11,7 +11,7 @@ import { createCalendarState, endOfMonth, isSameMonth } from "@proyecto-viviana/
11
11
  * Pre-wired headless calendar component that combines aria hooks.
12
12
  * Port of react-aria-components/src/Calendar.tsx
13
13
  */
14
- var _tmpl$ = /*#__PURE__*/ template(`<div class="solidaria-Calendar solidaria-Calendar--placeholder"aria-hidden=true>`), _tmpl$2 = /*#__PURE__*/ template(`<h2>`), _tmpl$3 = /*#__PURE__*/ template(`<div><!$><!/><!$><!/>`), _tmpl$4 = /*#__PURE__*/ template(`<h2 aria-live=polite>`), _tmpl$5 = /*#__PURE__*/ template(`<button>`), _tmpl$6 = /*#__PURE__*/ template(`<table><thead><tr></tr></thead><tbody>`), _tmpl$7 = /*#__PURE__*/ template(`<th scope=col>`), _tmpl$8 = /*#__PURE__*/ template(`<tr>`), _tmpl$9 = /*#__PURE__*/ template(`<td>`), _tmpl$0 = /*#__PURE__*/ template(`<thead>`), _tmpl$1 = /*#__PURE__*/ template(`<tbody>`), _tmpl$10 = /*#__PURE__*/ template(`<td><div>`);
14
+ var _tmpl$ = /*#__PURE__*/ template(`<div class="solidaria-Calendar solidaria-Calendar--placeholder"aria-hidden=true>`), _tmpl$2 = /*#__PURE__*/ template(`<h2>`), _tmpl$3 = /*#__PURE__*/ template(`<button tabindex=-1>`), _tmpl$4 = /*#__PURE__*/ template(`<div><!$><!/><!$><!/><!$><!/>`), _tmpl$5 = /*#__PURE__*/ template(`<h2 aria-live=polite>`), _tmpl$6 = /*#__PURE__*/ template(`<button>`), _tmpl$7 = /*#__PURE__*/ template(`<table><thead><tr></tr></thead><tbody>`), _tmpl$8 = /*#__PURE__*/ template(`<th scope=col>`), _tmpl$9 = /*#__PURE__*/ template(`<tr>`), _tmpl$0 = /*#__PURE__*/ template(`<td>`), _tmpl$1 = /*#__PURE__*/ template(`<thead>`), _tmpl$10 = /*#__PURE__*/ template(`<tbody>`), _tmpl$11 = /*#__PURE__*/ template(`<td><div>`);
15
15
  function assignRef(ref, el) {
16
16
  if (!ref) return;
17
17
  if (typeof ref === "function") ref(el);
@@ -113,7 +113,7 @@ function CalendarWithState(props) {
113
113
  defaultClassName: "solidaria-Calendar"
114
114
  }, renderValues);
115
115
  return (() => {
116
- var _el$2 = getNextElement(_tmpl$3), _el$4 = _el$2.firstChild, [_el$5, _co$] = getNextMarker(_el$4.nextSibling), _el$6 = _el$5.nextSibling, [_el$7, _co$2] = getNextMarker(_el$6.nextSibling);
116
+ var _el$2 = getNextElement(_tmpl$4), _el$5 = _el$2.firstChild, [_el$6, _co$] = getNextMarker(_el$5.nextSibling), _el$7 = _el$6.nextSibling, [_el$8, _co$2] = getNextMarker(_el$7.nextSibling), _el$9 = _el$8.nextSibling, [_el$0, _co$3] = getNextMarker(_el$9.nextSibling);
117
117
  use((el) => assignRef(local.ref, el), _el$2);
118
118
  spread(_el$2, mergeProps(() => calendarAria.calendarProps, {
119
119
  get ["class"]() {
@@ -136,8 +136,23 @@ function CalendarWithState(props) {
136
136
  var _el$3 = getNextElement(_tmpl$2);
137
137
  insert(_el$3, () => String(calendarAria.calendarProps["aria-label"] ?? ""));
138
138
  return _el$3;
139
- } }), _el$5, _co$);
140
- insert(_el$2, () => props.children, _el$7, _co$2);
139
+ } }), _el$6, _co$);
140
+ insert(_el$2, () => props.children, _el$8, _co$2);
141
+ insert(_el$2, createComponent(VisuallyHidden, { get children() {
142
+ var _el$4 = getNextElement(_tmpl$3);
143
+ _el$4.$$click = () => state().focusNextPage();
144
+ effect((_p$) => {
145
+ var _v$ = String(calendarAria.nextButtonProps["aria-label"] ?? ""), _v$2 = Boolean(calendarAria.nextButtonProps.disabled);
146
+ _v$ !== _p$.e && setAttribute(_el$4, "aria-label", _p$.e = _v$);
147
+ _v$2 !== _p$.t && setProperty(_el$4, "disabled", _p$.t = _v$2);
148
+ return _p$;
149
+ }, {
150
+ e: void 0,
151
+ t: void 0
152
+ });
153
+ runHydrationEvents();
154
+ return _el$4;
155
+ } }), _el$0, _co$3);
141
156
  runHydrationEvents();
142
157
  return _el$2;
143
158
  })();
@@ -194,9 +209,9 @@ function CalendarInner(props) {
194
209
  return createComponent(CalendarContext.Provider, {
195
210
  value: state,
196
211
  get children() {
197
- var _el$8 = getNextElement(_tmpl$3), _el$0 = _el$8.firstChild, [_el$1, _co$3] = getNextMarker(_el$0.nextSibling), _el$10 = _el$1.nextSibling, [_el$11, _co$4] = getNextMarker(_el$10.nextSibling);
198
- use((el) => assignRef(local.ref, el), _el$8);
199
- spread(_el$8, mergeProps(() => calendarAria.calendarProps, {
212
+ var _el$1 = getNextElement(_tmpl$4), _el$12 = _el$1.firstChild, [_el$13, _co$4] = getNextMarker(_el$12.nextSibling), _el$14 = _el$13.nextSibling, [_el$15, _co$5] = getNextMarker(_el$14.nextSibling), _el$16 = _el$15.nextSibling, [_el$17, _co$6] = getNextMarker(_el$16.nextSibling);
213
+ use((el) => assignRef(local.ref, el), _el$1);
214
+ spread(_el$1, mergeProps(() => calendarAria.calendarProps, {
200
215
  get ["class"]() {
201
216
  return renderProps.class();
202
217
  },
@@ -213,14 +228,29 @@ function CalendarInner(props) {
213
228
  return dataAttr(state.isValueInvalid());
214
229
  }
215
230
  }), false, true);
216
- insert(_el$8, createComponent(VisuallyHidden, { get children() {
217
- var _el$9 = getNextElement(_tmpl$2);
218
- insert(_el$9, () => String(calendarAria.calendarProps["aria-label"] ?? ""));
219
- return _el$9;
220
- } }), _el$1, _co$3);
221
- insert(_el$8, () => props.children, _el$11, _co$4);
231
+ insert(_el$1, createComponent(VisuallyHidden, { get children() {
232
+ var _el$10 = getNextElement(_tmpl$2);
233
+ insert(_el$10, () => String(calendarAria.calendarProps["aria-label"] ?? ""));
234
+ return _el$10;
235
+ } }), _el$13, _co$4);
236
+ insert(_el$1, () => props.children, _el$15, _co$5);
237
+ insert(_el$1, createComponent(VisuallyHidden, { get children() {
238
+ var _el$11 = getNextElement(_tmpl$3);
239
+ _el$11.$$click = () => state.focusNextPage();
240
+ effect((_p$) => {
241
+ var _v$3 = String(calendarAria.nextButtonProps["aria-label"] ?? ""), _v$4 = Boolean(calendarAria.nextButtonProps.disabled);
242
+ _v$3 !== _p$.e && setAttribute(_el$11, "aria-label", _p$.e = _v$3);
243
+ _v$4 !== _p$.t && setProperty(_el$11, "disabled", _p$.t = _v$4);
244
+ return _p$;
245
+ }, {
246
+ e: void 0,
247
+ t: void 0
248
+ });
249
+ runHydrationEvents();
250
+ return _el$11;
251
+ } }), _el$17, _co$6);
222
252
  runHydrationEvents();
223
- return _el$8;
253
+ return _el$1;
224
254
  }
225
255
  });
226
256
  }
@@ -239,21 +269,21 @@ function CalendarHeading(props) {
239
269
  defaultClassName: "solidaria-CalendarHeading"
240
270
  }, renderValues);
241
271
  return (() => {
242
- var _el$12 = getNextElement(_tmpl$4);
243
- insert(_el$12, (() => {
272
+ var _el$18 = getNextElement(_tmpl$5);
273
+ insert(_el$18, (() => {
244
274
  var _c$ = memo(() => typeof props.children === "function");
245
275
  return () => _c$() ? renderProps.renderChildren() : state.title();
246
276
  })());
247
277
  effect((_p$) => {
248
- var _v$ = renderProps.class(), _v$2 = renderProps.style();
249
- _v$ !== _p$.e && className(_el$12, _p$.e = _v$);
250
- _p$.t = style(_el$12, _v$2, _p$.t);
278
+ var _v$5 = renderProps.class(), _v$6 = renderProps.style();
279
+ _v$5 !== _p$.e && className(_el$18, _p$.e = _v$5);
280
+ _p$.t = style(_el$18, _v$6, _p$.t);
251
281
  return _p$;
252
282
  }, {
253
283
  e: void 0,
254
284
  t: void 0
255
285
  });
256
- return _el$12;
286
+ return _el$18;
257
287
  })();
258
288
  }
259
289
  /**
@@ -266,9 +296,10 @@ function CalendarButton(props) {
266
296
  if (props.slot === "previous") return calendarAria.prevButtonProps;
267
297
  return calendarAria.nextButtonProps;
268
298
  });
299
+ const isDisabled = () => props.isDisabled || state.isDisabled();
269
300
  return (() => {
270
- var _el$13 = getNextElement(_tmpl$5);
271
- spread(_el$13, mergeProps(buttonProps, {
301
+ var _el$19 = getNextElement(_tmpl$6);
302
+ spread(_el$19, mergeProps(buttonProps, {
272
303
  get ["class"]() {
273
304
  return props.class ?? "solidaria-CalendarButton";
274
305
  },
@@ -276,12 +307,15 @@ function CalendarButton(props) {
276
307
  return props.style;
277
308
  },
278
309
  get disabled() {
279
- return props.isDisabled || state.isDisabled();
310
+ return isDisabled();
311
+ },
312
+ get tabindex() {
313
+ return isDisabled() ? void 0 : 0;
280
314
  }
281
315
  }), false, true);
282
- insert(_el$13, () => props.children);
316
+ insert(_el$19, () => props.children);
283
317
  runHydrationEvents();
284
- return _el$13;
318
+ return _el$19;
285
319
  })();
286
320
  }
287
321
  /**
@@ -316,9 +350,9 @@ function CalendarGrid(props) {
316
350
  return createComponent(CalendarGridMonthContext.Provider, {
317
351
  value: startDate,
318
352
  get children() {
319
- var _el$14 = getNextElement(_tmpl$6), _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
320
- use(setGridRef, _el$14);
321
- spread(_el$14, mergeProps(() => gridAria.gridProps, {
353
+ var _el$20 = getNextElement(_tmpl$7), _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$21.nextSibling;
354
+ use(setGridRef, _el$20);
355
+ spread(_el$20, mergeProps(() => gridAria.gridProps, {
322
356
  get ["class"]() {
323
357
  return renderProps.class();
324
358
  },
@@ -326,25 +360,25 @@ function CalendarGrid(props) {
326
360
  return renderProps.style();
327
361
  }
328
362
  }), false, true);
329
- spread(_el$15, mergeProps(() => gridAria.headerProps), false, true);
330
- insert(_el$16, createComponent(For, {
363
+ spread(_el$21, mergeProps(() => gridAria.headerProps), false, true);
364
+ insert(_el$22, createComponent(For, {
331
365
  get each() {
332
366
  return gridAria.weekDays;
333
367
  },
334
368
  children: (day) => (() => {
335
- var _el$18 = getNextElement(_tmpl$7);
336
- insert(_el$18, day);
337
- effect(() => className(_el$18, props.headerCellClass ?? "solidaria-CalendarHeaderCell"));
338
- return _el$18;
369
+ var _el$24 = getNextElement(_tmpl$8);
370
+ insert(_el$24, day);
371
+ effect(() => className(_el$24, props.headerCellClass ?? "solidaria-CalendarHeaderCell"));
372
+ return _el$24;
339
373
  })()
340
374
  }));
341
- insert(_el$17, createComponent(Index, {
375
+ insert(_el$23, createComponent(Index, {
342
376
  get each() {
343
377
  return allDates();
344
378
  },
345
379
  children: (weekDates, weekIndex) => (() => {
346
- var _el$19 = getNextElement(_tmpl$8);
347
- insert(_el$19, createComponent(Index, {
380
+ var _el$25 = getNextElement(_tmpl$9);
381
+ insert(_el$25, createComponent(Index, {
348
382
  get each() {
349
383
  return weekDates();
350
384
  },
@@ -353,7 +387,7 @@ function CalendarGrid(props) {
353
387
  return date();
354
388
  },
355
389
  get fallback() {
356
- return getNextElement(_tmpl$9);
390
+ return getNextElement(_tmpl$0);
357
391
  },
358
392
  get children() {
359
393
  return createComponent(CalendarGridCellPositionContext.Provider, {
@@ -369,60 +403,60 @@ function CalendarGrid(props) {
369
403
  }
370
404
  })
371
405
  }));
372
- return _el$19;
406
+ return _el$25;
373
407
  })()
374
408
  }));
375
409
  runHydrationEvents();
376
- return _el$14;
410
+ return _el$20;
377
411
  }
378
412
  });
379
413
  }
380
414
  function CalendarGridHeader(props) {
381
415
  return (() => {
382
- var _el$21 = getNextElement(_tmpl$0);
383
- insert(_el$21, () => props.children);
416
+ var _el$27 = getNextElement(_tmpl$1);
417
+ insert(_el$27, () => props.children);
384
418
  effect((_p$) => {
385
- var _v$3 = props.class ?? "solidaria-CalendarGridHeader", _v$4 = props.style;
386
- _v$3 !== _p$.e && className(_el$21, _p$.e = _v$3);
387
- _p$.t = style(_el$21, _v$4, _p$.t);
419
+ var _v$7 = props.class ?? "solidaria-CalendarGridHeader", _v$8 = props.style;
420
+ _v$7 !== _p$.e && className(_el$27, _p$.e = _v$7);
421
+ _p$.t = style(_el$27, _v$8, _p$.t);
388
422
  return _p$;
389
423
  }, {
390
424
  e: void 0,
391
425
  t: void 0
392
426
  });
393
- return _el$21;
427
+ return _el$27;
394
428
  })();
395
429
  }
396
430
  function CalendarGridBody(props) {
397
431
  return (() => {
398
- var _el$22 = getNextElement(_tmpl$1);
399
- insert(_el$22, () => props.children);
432
+ var _el$28 = getNextElement(_tmpl$10);
433
+ insert(_el$28, () => props.children);
400
434
  effect((_p$) => {
401
- var _v$5 = props.class ?? "solidaria-CalendarGridBody", _v$6 = props.style;
402
- _v$5 !== _p$.e && className(_el$22, _p$.e = _v$5);
403
- _p$.t = style(_el$22, _v$6, _p$.t);
435
+ var _v$9 = props.class ?? "solidaria-CalendarGridBody", _v$0 = props.style;
436
+ _v$9 !== _p$.e && className(_el$28, _p$.e = _v$9);
437
+ _p$.t = style(_el$28, _v$0, _p$.t);
404
438
  return _p$;
405
439
  }, {
406
440
  e: void 0,
407
441
  t: void 0
408
442
  });
409
- return _el$22;
443
+ return _el$28;
410
444
  })();
411
445
  }
412
446
  function CalendarHeaderCell(props) {
413
447
  return (() => {
414
- var _el$23 = getNextElement(_tmpl$7);
415
- insert(_el$23, () => props.children);
448
+ var _el$29 = getNextElement(_tmpl$8);
449
+ insert(_el$29, () => props.children);
416
450
  effect((_p$) => {
417
- var _v$7 = props.class ?? "solidaria-CalendarHeaderCell", _v$8 = props.style;
418
- _v$7 !== _p$.e && className(_el$23, _p$.e = _v$7);
419
- _p$.t = style(_el$23, _v$8, _p$.t);
451
+ var _v$1 = props.class ?? "solidaria-CalendarHeaderCell", _v$10 = props.style;
452
+ _v$1 !== _p$.e && className(_el$29, _p$.e = _v$1);
453
+ _p$.t = style(_el$29, _v$10, _p$.t);
420
454
  return _p$;
421
455
  }, {
422
456
  e: void 0,
423
457
  t: void 0
424
458
  });
425
- return _el$23;
459
+ return _el$29;
426
460
  })();
427
461
  }
428
462
  /**
@@ -479,8 +513,8 @@ function CalendarCell(props) {
479
513
  return cellAria.formattedDate;
480
514
  };
481
515
  return (() => {
482
- var _el$24 = getNextElement(_tmpl$10), _el$25 = _el$24.firstChild;
483
- spread(_el$24, mergeProps(() => cellAria.cellProps, {
516
+ var _el$30 = getNextElement(_tmpl$11), _el$31 = _el$30.firstChild;
517
+ spread(_el$30, mergeProps(() => cellAria.cellProps, {
484
518
  get ["class"]() {
485
519
  return cellRenderProps.class();
486
520
  },
@@ -488,8 +522,8 @@ function CalendarCell(props) {
488
522
  return cellRenderProps.style();
489
523
  }
490
524
  }), false, true);
491
- use(setCellRef, _el$25);
492
- spread(_el$25, mergeProps(() => cellAria.buttonProps, hoverProps, {
525
+ use(setCellRef, _el$31);
526
+ spread(_el$31, mergeProps(() => cellAria.buttonProps, hoverProps, {
493
527
  get ["class"]() {
494
528
  return renderProps.class();
495
529
  },
@@ -527,11 +561,12 @@ function CalendarCell(props) {
527
561
  return dataAttr(isHovered());
528
562
  }
529
563
  }), false, true);
530
- insert(_el$25, getChildren);
564
+ insert(_el$31, getChildren);
531
565
  runHydrationEvents();
532
- return _el$24;
566
+ return _el$30;
533
567
  })();
534
568
  }
569
+ delegateEvents(["click"]);
535
570
  //#endregion
536
571
  export { Calendar, CalendarButton, CalendarCell, CalendarContext, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, CalendarHeading, useCalendarContext };
537
572
 
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","names":["JSX","Accessor","createContext","createMemo","createSignal","splitProps","useContext","For","Index","Show","createCalendar","createCalendarGrid","createCalendarCell","createHover","AriaCalendarProps","AriaCalendarGridProps","createCalendarState","CalendarState","CalendarStateProps","CalendarSelectionMode","CalendarDate","DateValue","endOfMonth","isSameMonth","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","dataAttr","useIsHydrated","VisuallyHidden","RefLike","el","T","current","assignRef","ref","CalendarRenderProps","isDisabled","isReadOnly","isInvalid","CalendarProps","Omit","M","children","Element","class","style","locale","HTMLDivElement","CalendarGridRenderProps","CalendarGridProps","date","headerCellClass","offset","months","CalendarCellRenderProps","isSelected","isFocused","isFocusVisible","isUnavailable","isOutsideMonth","isToday","isPressed","isHovered","isFirstChild","isLastChild","isFirstWeek","isLastWeek","formattedDate","CalendarCellProps","cellClass","cellStyle","CalendarHeaderCellProps","CSSProperties","CalendarGridHeaderProps","CalendarGridBodyProps","CalendarContext","CalendarGridMonthContext","CalendarGridCellPositionContext","weekIndex","dayIndex","lastWeekIndex","useCalendarContext","context","Error","Calendar","props","inheritedState","isHydrated","_$createComponent","when","fallback","_$getNextElement","_tmpl$","CalendarInner","CalendarWithState","_$mergeProps","state","local","stateProps","rest","calendarAria","errorMessage","renderValues","isValueInvalid","renderProps","defaultClassName","_el$2","_tmpl$3","_el$4","firstChild","_el$5","_co$","_$getNextMarker","nextSibling","_el$6","_el$7","_co$2","_$use","_$spread","calendarProps","data-disabled","data-readonly","data-invalid","_$insert","_el$3","_tmpl$2","String","_$runHydrationEvents","Provider","value","_el$8","_el$0","_el$1","_co$3","_el$10","_el$11","_co$4","_el$9","CalendarHeadingProps","title","CalendarHeading","_el$12","_tmpl$4","_c$","_$memo","renderChildren","_$effect","_p$","_v$","_v$2","e","_$className","t","_$style","undefined","CalendarButtonProps","slot","CalendarButton","buttonProps","prevButtonProps","nextButtonProps","_el$13","_tmpl$5","disabled","CalendarGrid","gridRef","setGridRef","HTMLTableElement","startDate","offsetMonths","baseStart","visibleRange","start","add","gridAria","endDate","weekdayStyle","allDates","monthStart","numWeeks","getWeeksInMonth","weekDates","push","getDatesInWeek","_el$14","_tmpl$6","_el$15","_el$16","_el$17","gridProps","headerProps","each","weekDays","day","_el$18","_tmpl$7","_el$19","_tmpl$8","_tmpl$9","length","CalendarGridHeader","_el$21","_tmpl$0","_v$3","_v$4","CalendarGridBody","_el$22","_tmpl$1","_v$5","_v$6","CalendarHeaderCell","_el$23","_v$7","_v$8","CalendarCell","currentMonthStart","cellPosition","cellRef","setCellRef","position","cellAria","hoverProps","cellRenderProps","getChildren","_el$24","_tmpl$10","_el$25","cellProps","data-selected","data-focused","data-focus-visible","data-unavailable","data-outside-month","data-today","data-pressed","data-hovered"],"sources":["../src/Calendar.tsx"],"sourcesContent":["/**\n * Calendar component for solidaria-components\n *\n * Pre-wired headless calendar component that combines aria hooks.\n * Port of react-aria-components/src/Calendar.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Index,\n Show,\n} from \"solid-js\";\n\nimport {\n createCalendar,\n createCalendarGrid,\n createCalendarCell,\n createHover,\n type AriaCalendarProps,\n type AriaCalendarGridProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createCalendarState,\n type CalendarState,\n type CalendarStateProps,\n type CalendarSelectionMode,\n type CalendarDate,\n type DateValue,\n endOfMonth,\n isSameMonth,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from \"./utils\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface CalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n /** Whether the current selection is invalid. */\n isInvalid: boolean;\n}\n\nexport interface CalendarProps<\n T extends DateValue = DateValue,\n M extends CalendarSelectionMode = \"single\",\n>\n extends\n Omit<AriaCalendarProps, \"id\" | \"isDisabled\" | \"isReadOnly\">,\n Omit<CalendarStateProps<T, M>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n /** Ref for the calendar root element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface CalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface CalendarGridProps\n extends Omit<AriaCalendarGridProps, \"startDate\" | \"endDate\">, SlotProps {\n /** The children of the component (render function receiving weeks). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarGridRenderProps>;\n /** Class name for weekday header cells. */\n headerCellClass?: string;\n /** Number of weeks to offset from the start. */\n offset?: { months?: number };\n}\n\nexport interface CalendarCellRenderProps {\n /** Whether the cell is selected. */\n isSelected: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell should display a keyboard focus ring. */\n isFocusVisible: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is part of an invalid selection. */\n isInvalid: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** Whether the cell is hovered. */\n isHovered: boolean;\n /** Whether the cell is the first day slot in its row. */\n isFirstChild: boolean;\n /** Whether the cell is the last day slot in its row. */\n isLastChild: boolean;\n /** Whether the cell is in the first rendered week row. */\n isFirstWeek: boolean;\n /** Whether the cell is in the last rendered week row. */\n isLastWeek: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface CalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarCellRenderProps>;\n /** Class name for the table cell wrapper. */\n cellClass?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** Inline style for the table cell wrapper. */\n cellStyle?: StyleOrFunction<CalendarCellRenderProps>;\n}\n\nexport interface CalendarHeaderCellProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface CalendarGridHeaderProps extends SlotProps {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\nexport interface CalendarGridBodyProps extends SlotProps {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\nexport const CalendarContext = createContext<CalendarState<DateValue> | null>(null);\nconst CalendarGridMonthContext = createContext<Accessor<CalendarDate> | null>(null);\nconst CalendarGridCellPositionContext = createContext<Accessor<{\n weekIndex: number;\n dayIndex: number;\n lastWeekIndex: number;\n}> | null>(null);\n\nexport function useCalendarContext(): CalendarState<DateValue> {\n const context = useContext(CalendarContext);\n if (!context) {\n throw new Error(\"Calendar components must be used within a Calendar\");\n }\n return context;\n}\n\n/**\n * A calendar displays a grid of days in a month and allows users to select a single date.\n *\n * @example\n * ```tsx\n * <Calendar aria-label=\"Event date\">\n * <header>\n * <CalendarButton slot=\"previous\">◀</CalendarButton>\n * <CalendarHeading />\n * <CalendarButton slot=\"next\">▶</CalendarButton>\n * </header>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * ```\n */\nexport function Calendar<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M>): JSX.Element {\n const inheritedState = useContext(CalendarContext);\n\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-Calendar solidaria-Calendar--placeholder\" aria-hidden=\"true\" />\n }\n >\n <Show when={inheritedState} fallback={<CalendarInner {...props} />}>\n <CalendarWithState state={inheritedState as CalendarState<DateValue>} {...props} />\n </Show>\n </Show>\n );\n}\n\nfunction CalendarWithState<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M> & { state: CalendarState<DateValue> }): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"state\", \"ref\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"selectionMode\",\n \"minValue\",\n \"maxValue\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"focusedValue\",\n \"defaultFocusedValue\",\n \"onFocusChange\",\n \"locale\",\n \"createCalendar\",\n \"isDateUnavailable\",\n \"visibleMonths\",\n \"pageBehavior\",\n \"selectionAlignment\",\n \"isDateDisabled\",\n \"validationState\",\n \"errorMessage\",\n \"firstDayOfWeek\",\n ],\n );\n\n const state = () => props.state;\n const calendarAria = createCalendar(\n () => ({\n ...rest,\n errorMessage: stateProps.errorMessage,\n }),\n state(),\n );\n\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state().isDisabled(),\n isReadOnly: state().isReadOnly(),\n isInvalid: state().isValueInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Calendar\",\n },\n renderValues,\n );\n\n return (\n <div\n {...calendarAria.calendarProps}\n ref={(el) => assignRef(local.ref, el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state().isDisabled())}\n data-readonly={dataAttr(state().isReadOnly())}\n data-invalid={dataAttr(state().isValueInvalid())}\n >\n <VisuallyHidden>\n <h2>{String(calendarAria.calendarProps[\"aria-label\"] ?? \"\")}</h2>\n </VisuallyHidden>\n {props.children}\n </div>\n );\n}\n\n/**\n * Internal Calendar component that renders after client mount.\n */\nfunction CalendarInner<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M>): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"ref\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"selectionMode\",\n \"minValue\",\n \"maxValue\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"focusedValue\",\n \"defaultFocusedValue\",\n \"onFocusChange\",\n \"locale\",\n \"createCalendar\",\n \"isDateUnavailable\",\n \"visibleMonths\",\n \"pageBehavior\",\n \"selectionAlignment\",\n \"isDateDisabled\",\n \"validationState\",\n \"errorMessage\",\n \"firstDayOfWeek\",\n ],\n );\n\n // Create calendar state\n const state = createCalendarState<T, M>(stateProps);\n\n // Create calendar ARIA props\n const calendarAria = createCalendar(\n () => ({\n ...rest,\n errorMessage: stateProps.errorMessage,\n }),\n state as unknown as CalendarState<DateValue>,\n );\n\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isInvalid: state.isValueInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Calendar\",\n },\n renderValues,\n );\n\n return (\n <CalendarContext.Provider value={state as unknown as CalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n ref={(el) => assignRef(local.ref, el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-invalid={dataAttr(state.isValueInvalid())}\n >\n <VisuallyHidden>\n <h2>{String(calendarAria.calendarProps[\"aria-label\"] ?? \"\")}</h2>\n </VisuallyHidden>\n {props.children}\n </div>\n </CalendarContext.Provider>\n );\n}\n\nexport interface CalendarHeadingProps extends SlotProps {\n /** The children of the component. */\n children?: RenderChildren<{ title: string }>;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the calendar.\n */\nexport function CalendarHeading(props: CalendarHeadingProps): JSX.Element {\n const state = useCalendarContext();\n const renderValues = createMemo(() => ({\n title: state.title(),\n }));\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarHeading\",\n },\n renderValues,\n );\n\n return (\n <h2 class={renderProps.class()} style={renderProps.style()} aria-live=\"polite\">\n {typeof props.children === \"function\" ? renderProps.renderChildren() : state.title()}\n </h2>\n );\n}\n\nexport interface CalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: \"previous\" | \"next\";\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the calendar.\n */\nexport function CalendarButton(props: CalendarButtonProps): JSX.Element {\n const state = useCalendarContext();\n const calendarAria = createCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === \"previous\") {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? \"solidaria-CalendarButton\"}\n style={props.style}\n disabled={props.isDisabled || state.isDisabled()}\n >\n {props.children}\n </button>\n );\n}\n\n/**\n * Displays a grid of calendar cells.\n */\nexport function CalendarGrid(props: CalendarGridProps): JSX.Element {\n const state = useCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n const startDate = createMemo(() => {\n const offsetMonths = props.offset?.months ?? 0;\n const baseStart = state.visibleRange().start;\n return offsetMonths ? baseStart.add({ months: offsetMonths }) : baseStart;\n });\n\n const gridAria = createCalendarGrid(\n {\n startDate: startDate(),\n endDate: endOfMonth(startDate()),\n weekdayStyle: props.weekdayStyle,\n },\n state,\n gridRef,\n );\n\n const renderValues = createMemo<CalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarGrid\",\n },\n renderValues,\n );\n\n // Memoize ALL dates for the grid at once to avoid reactive loops.\n // This breaks the cycle where accessing visibleRange() inside For loop\n // would cause infinite re-renders.\n const allDates = createMemo(() => {\n const monthStart = startDate();\n const numWeeks = state.getWeeksInMonth(monthStart);\n const weekDates: (CalendarDate | null)[][] = [];\n\n for (let weekIndex = 0; weekIndex < numWeeks; weekIndex++) {\n weekDates.push(state.getDatesInWeek(weekIndex, monthStart));\n }\n\n return weekDates;\n });\n\n return (\n <CalendarGridMonthContext.Provider value={startDate}>\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class={props.headerCellClass ?? \"solidaria-CalendarHeaderCell\"}>\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <Index each={allDates()}>\n {(weekDates, weekIndex) => (\n <tr>\n <Index each={weekDates()}>\n {(date, dayIndex) => (\n <Show when={date()} fallback={<td />}>\n <CalendarGridCellPositionContext.Provider\n value={() => ({\n weekIndex,\n dayIndex,\n lastWeekIndex: allDates().length - 1,\n })}\n >\n {props.children?.(date()!)}\n </CalendarGridCellPositionContext.Provider>\n </Show>\n )}\n </Index>\n </tr>\n )}\n </Index>\n </tbody>\n </table>\n </CalendarGridMonthContext.Provider>\n );\n}\n\nexport function CalendarGridHeader(props: CalendarGridHeaderProps): JSX.Element {\n return (\n <thead class={props.class ?? \"solidaria-CalendarGridHeader\"} style={props.style}>\n {props.children}\n </thead>\n );\n}\n\nexport function CalendarGridBody(props: CalendarGridBodyProps): JSX.Element {\n return (\n <tbody class={props.class ?? \"solidaria-CalendarGridBody\"} style={props.style}>\n {props.children}\n </tbody>\n );\n}\n\nexport function CalendarHeaderCell(props: CalendarHeaderCellProps): JSX.Element {\n return (\n <th scope=\"col\" class={props.class ?? \"solidaria-CalendarHeaderCell\"} style={props.style}>\n {props.children}\n </th>\n );\n}\n\n/**\n * A cell in the calendar grid representing a single day.\n */\nexport function CalendarCell(props: CalendarCellProps): JSX.Element {\n const state = useCalendarContext();\n const currentMonthStart = useContext(CalendarGridMonthContext);\n const cellPosition = useContext(CalendarGridCellPositionContext);\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n const isOutsideMonth = createMemo(\n () => currentMonthStart != null && !isSameMonth(currentMonthStart(), props.date),\n );\n const position = createMemo(\n () =>\n cellPosition?.() ?? {\n weekIndex: 0,\n dayIndex: 0,\n lastWeekIndex: 0,\n },\n );\n\n const cellAria = createCalendarCell(\n () => ({\n date: props.date,\n isOutsideMonth: isOutsideMonth(),\n }),\n state,\n cellRef,\n );\n const { hoverProps, isHovered } = createHover(() => ({\n isDisabled: cellAria.isDisabled || cellAria.isUnavailable,\n }));\n\n const renderValues = createMemo<CalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isFocused: cellAria.isFocused,\n isFocusVisible: cellAria.isFocusVisible,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isInvalid: cellAria.isInvalid,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n isHovered: isHovered(),\n isFirstChild: position().dayIndex === 0,\n isLastChild: position().dayIndex === 6,\n isFirstWeek: position().weekIndex === 0,\n isLastWeek: position().weekIndex === position().lastWeekIndex,\n formattedDate: cellAria.formattedDate,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarCell\",\n },\n renderValues,\n );\n const cellRenderProps = useRenderProps(\n {\n class: props.cellClass,\n style: props.cellStyle,\n defaultClassName: \"solidaria-CalendarCellWrapper\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <td {...cellAria.cellProps} class={cellRenderProps.class()} style={cellRenderProps.style()}>\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n {...hoverProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-focus-visible={dataAttr(cellAria.isFocusVisible)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-invalid={dataAttr(cellAria.isInvalid)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n data-hovered={dataAttr(isHovered())}\n >\n {getChildren()}\n </div>\n </td>\n );\n}\n\nexport type { CalendarState, CalendarDate, DateValue };\n"],"mappings":";;;;;;;;;;;;;;AAmDA,SAASoC,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KACH;CAGF,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AAuHA,MAAa6C,kBAAkB5E,cAA+C,IAAI;AAClF,MAAM6E,2BAA2B7E,cAA6C,IAAI;AAClF,MAAM8E,kCAAkC9E,cAI7B,IAAI;AAEf,SAAgBkF,qBAA+C;CAC7D,MAAMC,UAAU/E,WAAWwE,eAAe;CAC1C,IAAI,CAACO,SACH,MAAM,IAAIC,MAAM,oDAAoD;CAEtE,OAAOD;AACT;;;;;;;;;;;;;;;;;;AAmBA,SAAgBE,SAGdC,OAAyC;CACzC,MAAMC,iBAAiBnF,WAAWwE,eAAe;CAGjD,MAAMY,aAAa5D,cAAc;CAEjC,OAAA6D,gBACGlF,MAAI;EAAA,IACHmF,OAAI;GAAA,OAAEF,WAAW;EAAC;EAAA,IAClBG,WAAQ;GAAA,OAAAC,eAAAC,MAAA;EAAA;EAAA,IAAAlD,WAAA;GAAA,OAAA8C,gBAIPlF,MAAI;IAACmF,MAAMH;IAAc,IAAEI,WAAQ;KAAA,OAAAF,gBAAGK,eAAkBR,KAAK;IAAA;IAAA,IAAA3C,WAAA;KAAA,OAAA8C,gBAC3DM,mBAAiBC,WAAA,EAACC,OAAOV,eAA0C,GAAMD,KAAK,CAAA;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAIvF;AAEA,SAASS,kBAGPT,OAA+E;CAC/E,MAAM,CAACY,OAAOC,YAAYC,QAAQjG,WAChCmF,OACA;EAAC;EAAY;EAAS;EAAS;EAAQ;EAAS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Accessor","createContext","createMemo","createSignal","splitProps","useContext","For","Index","Show","createCalendar","createCalendarGrid","createCalendarCell","createHover","AriaCalendarProps","AriaCalendarGridProps","createCalendarState","CalendarState","CalendarStateProps","CalendarSelectionMode","CalendarDate","DateValue","endOfMonth","isSameMonth","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","dataAttr","useIsHydrated","VisuallyHidden","RefLike","el","T","current","assignRef","ref","CalendarRenderProps","isDisabled","isReadOnly","isInvalid","CalendarProps","Omit","M","children","Element","class","style","locale","HTMLDivElement","CalendarGridRenderProps","CalendarGridProps","date","headerCellClass","offset","months","CalendarCellRenderProps","isSelected","isFocused","isFocusVisible","isUnavailable","isOutsideMonth","isToday","isPressed","isHovered","isFirstChild","isLastChild","isFirstWeek","isLastWeek","formattedDate","CalendarCellProps","cellClass","cellStyle","CalendarHeaderCellProps","CSSProperties","CalendarGridHeaderProps","CalendarGridBodyProps","CalendarContext","CalendarGridMonthContext","CalendarGridCellPositionContext","weekIndex","dayIndex","lastWeekIndex","useCalendarContext","context","Error","Calendar","props","inheritedState","isHydrated","_$createComponent","when","fallback","_$getNextElement","_tmpl$","CalendarInner","CalendarWithState","_$mergeProps","state","local","stateProps","rest","calendarAria","errorMessage","renderValues","isValueInvalid","renderProps","defaultClassName","_el$2","_tmpl$4","_el$5","firstChild","_el$6","_co$","_$getNextMarker","nextSibling","_el$7","_el$8","_co$2","_el$9","_el$0","_co$3","_$use","_$spread","calendarProps","data-disabled","data-readonly","data-invalid","_$insert","_el$3","_tmpl$2","String","_el$4","_tmpl$3","$$click","focusNextPage","_$effect","_p$","_v$","nextButtonProps","_v$2","Boolean","disabled","e","_$setAttribute","t","_$setProperty","undefined","_$runHydrationEvents","Provider","value","_el$1","_el$12","_el$13","_co$4","_el$14","_el$15","_co$5","_el$16","_el$17","_co$6","_el$10","_el$11","_v$3","_v$4","CalendarHeadingProps","title","CalendarHeading","_el$18","_tmpl$5","_c$","_$memo","renderChildren","_v$5","_v$6","_$className","_$style","CalendarButtonProps","slot","CalendarButton","buttonProps","prevButtonProps","_el$19","_tmpl$6","tabindex","CalendarGrid","gridRef","setGridRef","HTMLTableElement","startDate","offsetMonths","baseStart","visibleRange","start","add","gridAria","endDate","weekdayStyle","allDates","monthStart","numWeeks","getWeeksInMonth","weekDates","push","getDatesInWeek","_el$20","_tmpl$7","_el$21","_el$22","_el$23","gridProps","headerProps","each","weekDays","day","_el$24","_tmpl$8","_el$25","_tmpl$9","_tmpl$0","length","CalendarGridHeader","_el$27","_tmpl$1","_v$7","_v$8","CalendarGridBody","_el$28","_tmpl$10","_v$9","_v$0","CalendarHeaderCell","_el$29","_v$1","_v$10","CalendarCell","currentMonthStart","cellPosition","cellRef","setCellRef","position","cellAria","hoverProps","cellRenderProps","getChildren","_el$30","_tmpl$11","_el$31","cellProps","data-selected","data-focused","data-focus-visible","data-unavailable","data-outside-month","data-today","data-pressed","data-hovered","_$delegateEvents"],"sources":["../src/Calendar.tsx"],"sourcesContent":["/**\n * Calendar component for solidaria-components\n *\n * Pre-wired headless calendar component that combines aria hooks.\n * Port of react-aria-components/src/Calendar.tsx\n */\n\nimport {\n type JSX,\n type Accessor,\n createContext,\n createMemo,\n createSignal,\n splitProps,\n useContext,\n For,\n Index,\n Show,\n} from \"solid-js\";\n\nimport {\n createCalendar,\n createCalendarGrid,\n createCalendarCell,\n createHover,\n type AriaCalendarProps,\n type AriaCalendarGridProps,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n createCalendarState,\n type CalendarState,\n type CalendarStateProps,\n type CalendarSelectionMode,\n type CalendarDate,\n type DateValue,\n endOfMonth,\n isSameMonth,\n} from \"@proyecto-viviana/solid-stately\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n dataAttr,\n useIsHydrated,\n} from \"./utils\";\nimport { VisuallyHidden } from \"./VisuallyHidden\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) {\n return;\n }\n\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface CalendarRenderProps {\n /** Whether the calendar is disabled. */\n isDisabled: boolean;\n /** Whether the calendar is read-only. */\n isReadOnly: boolean;\n /** Whether the current selection is invalid. */\n isInvalid: boolean;\n}\n\nexport interface CalendarProps<\n T extends DateValue = DateValue,\n M extends CalendarSelectionMode = \"single\",\n>\n extends\n Omit<AriaCalendarProps, \"id\" | \"isDisabled\" | \"isReadOnly\">,\n Omit<CalendarStateProps<T, M>, \"locale\">,\n SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarRenderProps>;\n /** The locale to use for formatting. */\n locale?: string;\n /** Ref for the calendar root element. */\n ref?: RefLike<HTMLDivElement>;\n}\n\nexport interface CalendarGridRenderProps {\n /** Whether the grid is disabled. */\n isDisabled: boolean;\n}\n\nexport interface CalendarGridProps\n extends Omit<AriaCalendarGridProps, \"startDate\" | \"endDate\">, SlotProps {\n /** The children of the component (render function receiving weeks). */\n children?: (date: CalendarDate) => JSX.Element;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarGridRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarGridRenderProps>;\n /** Class name for weekday header cells. */\n headerCellClass?: string;\n /** Number of weeks to offset from the start. */\n offset?: { months?: number };\n}\n\nexport interface CalendarCellRenderProps {\n /** Whether the cell is selected. */\n isSelected: boolean;\n /** Whether the cell is focused. */\n isFocused: boolean;\n /** Whether the cell should display a keyboard focus ring. */\n isFocusVisible: boolean;\n /** Whether the cell is disabled. */\n isDisabled: boolean;\n /** Whether the cell is unavailable. */\n isUnavailable: boolean;\n /** Whether the cell is part of an invalid selection. */\n isInvalid: boolean;\n /** Whether the cell is outside the visible month. */\n isOutsideMonth: boolean;\n /** Whether the cell represents today. */\n isToday: boolean;\n /** Whether the cell is pressed. */\n isPressed: boolean;\n /** Whether the cell is hovered. */\n isHovered: boolean;\n /** Whether the cell is the first day slot in its row. */\n isFirstChild: boolean;\n /** Whether the cell is the last day slot in its row. */\n isLastChild: boolean;\n /** Whether the cell is in the first rendered week row. */\n isFirstWeek: boolean;\n /** Whether the cell is in the last rendered week row. */\n isLastWeek: boolean;\n /** The formatted date string. */\n formattedDate: string;\n}\n\nexport interface CalendarCellProps extends SlotProps {\n /** The date for this cell. */\n date: CalendarDate;\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<CalendarCellRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<CalendarCellRenderProps>;\n /** Class name for the table cell wrapper. */\n cellClass?: ClassNameOrFunction<CalendarCellRenderProps>;\n /** Inline style for the table cell wrapper. */\n cellStyle?: StyleOrFunction<CalendarCellRenderProps>;\n}\n\nexport interface CalendarHeaderCellProps extends SlotProps {\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\nexport interface CalendarGridHeaderProps extends SlotProps {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\nexport interface CalendarGridBodyProps extends SlotProps {\n children?: JSX.Element;\n class?: string;\n style?: JSX.CSSProperties;\n}\n\nexport const CalendarContext = createContext<CalendarState<DateValue> | null>(null);\nconst CalendarGridMonthContext = createContext<Accessor<CalendarDate> | null>(null);\nconst CalendarGridCellPositionContext = createContext<Accessor<{\n weekIndex: number;\n dayIndex: number;\n lastWeekIndex: number;\n}> | null>(null);\n\nexport function useCalendarContext(): CalendarState<DateValue> {\n const context = useContext(CalendarContext);\n if (!context) {\n throw new Error(\"Calendar components must be used within a Calendar\");\n }\n return context;\n}\n\n/**\n * A calendar displays a grid of days in a month and allows users to select a single date.\n *\n * @example\n * ```tsx\n * <Calendar aria-label=\"Event date\">\n * <header>\n * <CalendarButton slot=\"previous\">◀</CalendarButton>\n * <CalendarHeading />\n * <CalendarButton slot=\"next\">▶</CalendarButton>\n * </header>\n * <CalendarGrid>\n * {(date) => <CalendarCell date={date} />}\n * </CalendarGrid>\n * </Calendar>\n * ```\n */\nexport function Calendar<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M>): JSX.Element {\n const inheritedState = useContext(CalendarContext);\n\n // Use hydration-safe pattern for client-only rendering\n const isHydrated = useIsHydrated();\n\n return (\n <Show\n when={isHydrated()}\n fallback={\n <div class=\"solidaria-Calendar solidaria-Calendar--placeholder\" aria-hidden=\"true\" />\n }\n >\n <Show when={inheritedState} fallback={<CalendarInner {...props} />}>\n <CalendarWithState state={inheritedState as CalendarState<DateValue>} {...props} />\n </Show>\n </Show>\n );\n}\n\nfunction CalendarWithState<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M> & { state: CalendarState<DateValue> }): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"state\", \"ref\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"selectionMode\",\n \"minValue\",\n \"maxValue\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"focusedValue\",\n \"defaultFocusedValue\",\n \"onFocusChange\",\n \"locale\",\n \"createCalendar\",\n \"isDateUnavailable\",\n \"visibleMonths\",\n \"pageBehavior\",\n \"selectionAlignment\",\n \"isDateDisabled\",\n \"validationState\",\n \"errorMessage\",\n \"firstDayOfWeek\",\n ],\n );\n\n const state = () => props.state;\n const calendarAria = createCalendar(\n () => ({\n ...rest,\n errorMessage: stateProps.errorMessage,\n }),\n state(),\n );\n\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state().isDisabled(),\n isReadOnly: state().isReadOnly(),\n isInvalid: state().isValueInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Calendar\",\n },\n renderValues,\n );\n\n return (\n <div\n {...calendarAria.calendarProps}\n ref={(el) => assignRef(local.ref, el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state().isDisabled())}\n data-readonly={dataAttr(state().isReadOnly())}\n data-invalid={dataAttr(state().isValueInvalid())}\n >\n <VisuallyHidden>\n <h2>{String(calendarAria.calendarProps[\"aria-label\"] ?? \"\")}</h2>\n </VisuallyHidden>\n {props.children}\n {/* For touch screen readers, a visually hidden next button after the month\n * grid so it's easy to navigate after reaching the end without going all\n * the way back to the start. Mirrors react-aria-components Calendar. */}\n <VisuallyHidden>\n <button\n aria-label={String(calendarAria.nextButtonProps[\"aria-label\"] ?? \"\")}\n disabled={Boolean(calendarAria.nextButtonProps.disabled)}\n onClick={() => state().focusNextPage()}\n tabIndex={-1}\n />\n </VisuallyHidden>\n </div>\n );\n}\n\n/**\n * Internal Calendar component that renders after client mount.\n */\nfunction CalendarInner<\n T extends DateValue = CalendarDate,\n M extends CalendarSelectionMode = \"single\",\n>(props: CalendarProps<T, M>): JSX.Element {\n const [local, stateProps, rest] = splitProps(\n props,\n [\"children\", \"class\", \"style\", \"slot\", \"ref\"],\n [\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"selectionMode\",\n \"minValue\",\n \"maxValue\",\n \"isDisabled\",\n \"isReadOnly\",\n \"autoFocus\",\n \"focusedValue\",\n \"defaultFocusedValue\",\n \"onFocusChange\",\n \"locale\",\n \"createCalendar\",\n \"isDateUnavailable\",\n \"visibleMonths\",\n \"pageBehavior\",\n \"selectionAlignment\",\n \"isDateDisabled\",\n \"validationState\",\n \"errorMessage\",\n \"firstDayOfWeek\",\n ],\n );\n\n // Create calendar state\n const state = createCalendarState<T, M>(stateProps);\n\n // Create calendar ARIA props\n const calendarAria = createCalendar(\n () => ({\n ...rest,\n errorMessage: stateProps.errorMessage,\n }),\n state as unknown as CalendarState<DateValue>,\n );\n\n const renderValues = createMemo<CalendarRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n isReadOnly: state.isReadOnly(),\n isInvalid: state.isValueInvalid(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Calendar\",\n },\n renderValues,\n );\n\n return (\n <CalendarContext.Provider value={state as unknown as CalendarState<DateValue>}>\n <div\n {...calendarAria.calendarProps}\n ref={(el) => assignRef(local.ref, el)}\n class={renderProps.class()}\n style={renderProps.style()}\n data-disabled={dataAttr(state.isDisabled())}\n data-readonly={dataAttr(state.isReadOnly())}\n data-invalid={dataAttr(state.isValueInvalid())}\n >\n <VisuallyHidden>\n <h2>{String(calendarAria.calendarProps[\"aria-label\"] ?? \"\")}</h2>\n </VisuallyHidden>\n {props.children}\n {/* For touch screen readers, a visually hidden next button after the\n * month grid so it's easy to navigate after reaching the end without\n * going all the way back to the start. Mirrors react-aria-components\n * Calendar. */}\n <VisuallyHidden>\n <button\n aria-label={String(calendarAria.nextButtonProps[\"aria-label\"] ?? \"\")}\n disabled={Boolean(calendarAria.nextButtonProps.disabled)}\n onClick={() => state.focusNextPage()}\n tabIndex={-1}\n />\n </VisuallyHidden>\n </div>\n </CalendarContext.Provider>\n );\n}\n\nexport interface CalendarHeadingProps extends SlotProps {\n /** The children of the component. */\n children?: RenderChildren<{ title: string }>;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n}\n\n/**\n * Displays the current month and year in the calendar.\n */\nexport function CalendarHeading(props: CalendarHeadingProps): JSX.Element {\n const state = useCalendarContext();\n const renderValues = createMemo(() => ({\n title: state.title(),\n }));\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarHeading\",\n },\n renderValues,\n );\n\n return (\n <h2 class={renderProps.class()} style={renderProps.style()} aria-live=\"polite\">\n {typeof props.children === \"function\" ? renderProps.renderChildren() : state.title()}\n </h2>\n );\n}\n\nexport interface CalendarButtonProps extends SlotProps {\n /** The slot for this button (previous or next). */\n slot?: \"previous\" | \"next\";\n /** The children of the component. */\n children?: JSX.Element;\n /** The CSS className for the element. */\n class?: string;\n /** The inline style for the element. */\n style?: JSX.CSSProperties;\n /** Whether the button is disabled. */\n isDisabled?: boolean;\n}\n\n/**\n * A button for navigating the calendar.\n */\nexport function CalendarButton(props: CalendarButtonProps): JSX.Element {\n const state = useCalendarContext();\n const calendarAria = createCalendar({}, state);\n\n const buttonProps = createMemo(() => {\n if (props.slot === \"previous\") {\n return calendarAria.prevButtonProps;\n }\n return calendarAria.nextButtonProps;\n });\n\n const isDisabled = () => props.isDisabled || state.isDisabled();\n\n return (\n <button\n {...buttonProps()}\n class={props.class ?? \"solidaria-CalendarButton\"}\n style={props.style}\n disabled={isDisabled()}\n // Mirror useFocusable: always set an explicit tabIndex on an enabled\n // focusable button (0), and drop it entirely when disabled — so the\n // nav buttons appear in the roving tab order exactly as upstream does.\n tabindex={isDisabled() ? undefined : 0}\n >\n {props.children}\n </button>\n );\n}\n\n/**\n * Displays a grid of calendar cells.\n */\nexport function CalendarGrid(props: CalendarGridProps): JSX.Element {\n const state = useCalendarContext();\n const [gridRef, setGridRef] = createSignal<HTMLTableElement | null>(null);\n const startDate = createMemo(() => {\n const offsetMonths = props.offset?.months ?? 0;\n const baseStart = state.visibleRange().start;\n return offsetMonths ? baseStart.add({ months: offsetMonths }) : baseStart;\n });\n\n const gridAria = createCalendarGrid(\n {\n startDate: startDate(),\n endDate: endOfMonth(startDate()),\n weekdayStyle: props.weekdayStyle,\n },\n state,\n gridRef,\n );\n\n const renderValues = createMemo<CalendarGridRenderProps>(() => ({\n isDisabled: state.isDisabled(),\n }));\n\n const renderProps = useRenderProps(\n {\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarGrid\",\n },\n renderValues,\n );\n\n // Memoize ALL dates for the grid at once to avoid reactive loops.\n // This breaks the cycle where accessing visibleRange() inside For loop\n // would cause infinite re-renders.\n const allDates = createMemo(() => {\n const monthStart = startDate();\n const numWeeks = state.getWeeksInMonth(monthStart);\n const weekDates: (CalendarDate | null)[][] = [];\n\n for (let weekIndex = 0; weekIndex < numWeeks; weekIndex++) {\n weekDates.push(state.getDatesInWeek(weekIndex, monthStart));\n }\n\n return weekDates;\n });\n\n return (\n <CalendarGridMonthContext.Provider value={startDate}>\n <table\n ref={setGridRef}\n {...gridAria.gridProps}\n class={renderProps.class()}\n style={renderProps.style()}\n >\n <thead {...gridAria.headerProps}>\n <tr>\n <For each={gridAria.weekDays}>\n {(day) => (\n <th scope=\"col\" class={props.headerCellClass ?? \"solidaria-CalendarHeaderCell\"}>\n {day}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody>\n <Index each={allDates()}>\n {(weekDates, weekIndex) => (\n <tr>\n <Index each={weekDates()}>\n {(date, dayIndex) => (\n <Show when={date()} fallback={<td />}>\n <CalendarGridCellPositionContext.Provider\n value={() => ({\n weekIndex,\n dayIndex,\n lastWeekIndex: allDates().length - 1,\n })}\n >\n {props.children?.(date()!)}\n </CalendarGridCellPositionContext.Provider>\n </Show>\n )}\n </Index>\n </tr>\n )}\n </Index>\n </tbody>\n </table>\n </CalendarGridMonthContext.Provider>\n );\n}\n\nexport function CalendarGridHeader(props: CalendarGridHeaderProps): JSX.Element {\n return (\n <thead class={props.class ?? \"solidaria-CalendarGridHeader\"} style={props.style}>\n {props.children}\n </thead>\n );\n}\n\nexport function CalendarGridBody(props: CalendarGridBodyProps): JSX.Element {\n return (\n <tbody class={props.class ?? \"solidaria-CalendarGridBody\"} style={props.style}>\n {props.children}\n </tbody>\n );\n}\n\nexport function CalendarHeaderCell(props: CalendarHeaderCellProps): JSX.Element {\n return (\n <th scope=\"col\" class={props.class ?? \"solidaria-CalendarHeaderCell\"} style={props.style}>\n {props.children}\n </th>\n );\n}\n\n/**\n * A cell in the calendar grid representing a single day.\n */\nexport function CalendarCell(props: CalendarCellProps): JSX.Element {\n const state = useCalendarContext();\n const currentMonthStart = useContext(CalendarGridMonthContext);\n const cellPosition = useContext(CalendarGridCellPositionContext);\n const [cellRef, setCellRef] = createSignal<HTMLDivElement | null>(null);\n const isOutsideMonth = createMemo(\n () => currentMonthStart != null && !isSameMonth(currentMonthStart(), props.date),\n );\n const position = createMemo(\n () =>\n cellPosition?.() ?? {\n weekIndex: 0,\n dayIndex: 0,\n lastWeekIndex: 0,\n },\n );\n\n const cellAria = createCalendarCell(\n () => ({\n date: props.date,\n isOutsideMonth: isOutsideMonth(),\n }),\n state,\n cellRef,\n );\n const { hoverProps, isHovered } = createHover(() => ({\n isDisabled: cellAria.isDisabled || cellAria.isUnavailable,\n }));\n\n const renderValues = createMemo<CalendarCellRenderProps>(() => ({\n isSelected: cellAria.isSelected,\n isFocused: cellAria.isFocused,\n isFocusVisible: cellAria.isFocusVisible,\n isDisabled: cellAria.isDisabled,\n isUnavailable: cellAria.isUnavailable,\n isInvalid: cellAria.isInvalid,\n isOutsideMonth: cellAria.isOutsideMonth,\n isToday: cellAria.isToday,\n isPressed: cellAria.isPressed,\n isHovered: isHovered(),\n isFirstChild: position().dayIndex === 0,\n isLastChild: position().dayIndex === 6,\n isFirstWeek: position().weekIndex === 0,\n isLastWeek: position().weekIndex === position().lastWeekIndex,\n formattedDate: cellAria.formattedDate,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: props.class,\n style: props.style,\n defaultClassName: \"solidaria-CalendarCell\",\n },\n renderValues,\n );\n const cellRenderProps = useRenderProps(\n {\n class: props.cellClass,\n style: props.cellStyle,\n defaultClassName: \"solidaria-CalendarCellWrapper\",\n },\n renderValues,\n );\n\n // Determine children content - avoid Show for SSR hydration compatibility\n const getChildren = () => {\n if (typeof props.children === \"function\") {\n return renderProps.renderChildren();\n }\n return cellAria.formattedDate;\n };\n\n return (\n <td {...cellAria.cellProps} class={cellRenderProps.class()} style={cellRenderProps.style()}>\n <div\n ref={setCellRef}\n {...cellAria.buttonProps}\n {...hoverProps}\n class={renderProps.class()}\n style={renderProps.style()}\n data-selected={dataAttr(cellAria.isSelected)}\n data-focused={dataAttr(cellAria.isFocused)}\n data-focus-visible={dataAttr(cellAria.isFocusVisible)}\n data-disabled={dataAttr(cellAria.isDisabled)}\n data-unavailable={dataAttr(cellAria.isUnavailable)}\n data-invalid={dataAttr(cellAria.isInvalid)}\n data-outside-month={dataAttr(cellAria.isOutsideMonth)}\n data-today={dataAttr(cellAria.isToday)}\n data-pressed={dataAttr(cellAria.isPressed)}\n data-hovered={dataAttr(isHovered())}\n >\n {getChildren()}\n </div>\n </td>\n );\n}\n\nexport type { CalendarState, CalendarDate, DateValue };\n"],"mappings":";;;;;;;;;;;;;;AAmDA,SAASoC,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KACH;CAGF,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AAuHA,MAAa6C,kBAAkB5E,cAA+C,IAAI;AAClF,MAAM6E,2BAA2B7E,cAA6C,IAAI;AAClF,MAAM8E,kCAAkC9E,cAI7B,IAAI;AAEf,SAAgBkF,qBAA+C;CAC7D,MAAMC,UAAU/E,WAAWwE,eAAe;CAC1C,IAAI,CAACO,SACH,MAAM,IAAIC,MAAM,oDAAoD;CAEtE,OAAOD;AACT;;;;;;;;;;;;;;;;;;AAmBA,SAAgBE,SAGdC,OAAyC;CACzC,MAAMC,iBAAiBnF,WAAWwE,eAAe;CAGjD,MAAMY,aAAa5D,cAAc;CAEjC,OAAA6D,gBACGlF,MAAI;EAAA,IACHmF,OAAI;GAAA,OAAEF,WAAW;EAAC;EAAA,IAClBG,WAAQ;GAAA,OAAAC,eAAAC,MAAA;EAAA;EAAA,IAAAlD,WAAA;GAAA,OAAA8C,gBAIPlF,MAAI;IAACmF,MAAMH;IAAc,IAAEI,WAAQ;KAAA,OAAAF,gBAAG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OAC1BV,SAASqN,SAASrL,aAAa;GAAC;GAAA,KAAA,kBAAA;IAAA,OACpChC,SAASqN,SAASzM,SAAS;GAAC;GAAA,KAAA,wBAAA;IAAA,OACtBZ,SAASqN,SAASpL,cAAc;GAAC;GAAA,KAAA,gBAAA;IAAA,OACzCjC,SAASqN,SAASnL,OAAO;GAAC;GAAA,KAAA,kBAAA;IAAA,OACxBlC,SAASqN,SAASlL,SAAS;GAAC;GAAA,KAAA,kBAAA;IAAA,OAC5BnC,SAASoC,UAAU,CAAC;GAAC;EAAA,CAAA,GAAA,OAAA,IAAA;EAAAgE,OAAAuH,QAElCH,WAAW;EAAAhG,mBAAA;EAAA,OAAAiG;CAAA,EAAA,CAAA;AAIpB;AAEuDY,eAAA,CAAA,OAAA,CAAA"}
package/dist/Calendar.jsx CHANGED
@@ -101,6 +101,10 @@ function CalendarWithState(props) {
101
101
  <h2>{String(calendarAria.calendarProps["aria-label"] ?? "")}</h2>
102
102
  </VisuallyHidden>
103
103
  {props.children}
104
+ {}
105
+ <VisuallyHidden>
106
+ <button aria-label={String(calendarAria.nextButtonProps["aria-label"] ?? "")} disabled={Boolean(calendarAria.nextButtonProps.disabled)} onClick={() => state().focusNextPage()} tabIndex={-1} />
107
+ </VisuallyHidden>
104
108
  </div>;
105
109
  }
106
110
  /**
@@ -158,6 +162,10 @@ function CalendarInner(props) {
158
162
  <h2>{String(calendarAria.calendarProps["aria-label"] ?? "")}</h2>
159
163
  </VisuallyHidden>
160
164
  {props.children}
165
+ {}
166
+ <VisuallyHidden>
167
+ <button aria-label={String(calendarAria.nextButtonProps["aria-label"] ?? "")} disabled={Boolean(calendarAria.nextButtonProps.disabled)} onClick={() => state.focusNextPage()} tabIndex={-1} />
168
+ </VisuallyHidden>
161
169
  </div>
162
170
  </CalendarContext.Provider>;
163
171
  }
@@ -189,7 +197,8 @@ function CalendarButton(props) {
189
197
  if (props.slot === "previous") return calendarAria.prevButtonProps;
190
198
  return calendarAria.nextButtonProps;
191
199
  });
192
- return <button {...buttonProps()} class={props.class ?? "solidaria-CalendarButton"} style={props.style} disabled={props.isDisabled || state.isDisabled()}>
200
+ const isDisabled = () => props.isDisabled || state.isDisabled();
201
+ return <button {...buttonProps()} class={props.class ?? "solidaria-CalendarButton"} style={props.style} disabled={isDisabled()} tabindex={isDisabled() ? void 0 : 0}>
193
202
  {props.children}
194
203
  </button>;
195
204
  }