@nepdatejs/react 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/date-text-BT82cZ7i.cjs +84 -0
  4. package/dist/date-text-BT82cZ7i.cjs.map +1 -0
  5. package/dist/date-text-Df1gFksR.js +61 -0
  6. package/dist/date-text-Df1gFksR.js.map +1 -0
  7. package/dist/date-text-Dipetpbp.d.cts +37 -0
  8. package/dist/date-text-Dipetpbp.d.ts +37 -0
  9. package/dist/headless-6BuUOtOR.d.cts +194 -0
  10. package/dist/headless-BK0XRHKb.js +513 -0
  11. package/dist/headless-BK0XRHKb.js.map +1 -0
  12. package/dist/headless-CFZ06zLn.d.ts +194 -0
  13. package/dist/headless-HxTkvgbz.cjs +572 -0
  14. package/dist/headless-HxTkvgbz.cjs.map +1 -0
  15. package/dist/headless.cjs +11 -0
  16. package/dist/headless.d.cts +2 -0
  17. package/dist/headless.d.ts +2 -0
  18. package/dist/headless.js +2 -0
  19. package/dist/index.cjs +891 -0
  20. package/dist/index.cjs.map +1 -0
  21. package/dist/index.d.cts +245 -0
  22. package/dist/index.d.ts +245 -0
  23. package/dist/index.js +871 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/server.cjs +6 -0
  26. package/dist/server.d.cts +2 -0
  27. package/dist/server.d.ts +2 -0
  28. package/dist/server.js +1 -0
  29. package/package.json +110 -3
  30. package/src/bindings.ts +247 -0
  31. package/src/calendar-body.tsx +133 -0
  32. package/src/calendar.tsx +34 -0
  33. package/src/date-picker.tsx +350 -0
  34. package/src/date-range-picker.tsx +223 -0
  35. package/src/date-text.tsx +110 -0
  36. package/src/date-time-picker.tsx +287 -0
  37. package/src/headless.ts +21 -0
  38. package/src/hooks.ts +474 -0
  39. package/src/icons.tsx +35 -0
  40. package/src/index.ts +21 -0
  41. package/src/multi-date-picker.tsx +243 -0
  42. package/src/panel.ts +67 -0
  43. package/src/presets.tsx +44 -0
  44. package/src/server.ts +8 -0
  45. package/src/time-columns.tsx +60 -0
  46. package/src/use-store.ts +113 -0
@@ -0,0 +1,572 @@
1
+ let react = require("react");
2
+ let _nepdatejs_core = require("@nepdatejs/core");
3
+ let _nepdatejs_calendar = require("@nepdatejs/calendar");
4
+ let _nepdatejs_datepicker = require("@nepdatejs/datepicker");
5
+ //#region src/bindings.ts
6
+ const FOCUS_KEYS = /* @__PURE__ */ new Set([
7
+ "ArrowLeft",
8
+ "ArrowRight",
9
+ "ArrowUp",
10
+ "ArrowDown",
11
+ "Home",
12
+ "End",
13
+ "PageUp",
14
+ "PageDown"
15
+ ]);
16
+ function useCalendarBindings(state, actions, locale, options) {
17
+ const { getSnapshot, onDayActivate } = options;
18
+ const grid = (0, react.useRef)(null);
19
+ const root = (0, react.useRef)(null);
20
+ const focusRequested = (0, react.useRef)(false);
21
+ const labels = (0, _nepdatejs_core.getLocale)(locale).labels;
22
+ const focusGrid = (0, react.useCallback)(() => {
23
+ (grid.current?.closest(".ndp-calendar") ?? grid.current ?? root.current)?.querySelector(".ndp-day[tabindex=\"0\"], .ndp-option[tabindex=\"0\"]")?.focus();
24
+ }, []);
25
+ (0, react.useEffect)(() => {
26
+ if (focusRequested.current) {
27
+ focusRequested.current = false;
28
+ focusGrid();
29
+ }
30
+ });
31
+ const requestFocus = () => {
32
+ focusRequested.current = true;
33
+ };
34
+ const activate = onDayActivate ?? ((date) => actions.select(date));
35
+ const [monthName, yearText] = splitTitle(state.title);
36
+ const focusIndex = (tiles) => {
37
+ const selected = tiles.findIndex((tile) => tile.isSelected);
38
+ const current = tiles.findIndex((tile) => tile.isCurrent);
39
+ return Math.max(0, selected === -1 ? current : selected);
40
+ };
41
+ return {
42
+ state,
43
+ actions,
44
+ focusGrid,
45
+ getGridProps: () => ({
46
+ role: "grid",
47
+ "aria-label": state.title,
48
+ ref: (node) => {
49
+ grid.current = node;
50
+ },
51
+ onKeyDown: (event) => {
52
+ if (!FOCUS_KEYS.has(event.key)) return;
53
+ event.preventDefault();
54
+ requestFocus();
55
+ actions.moveFocus(event.key, { shift: event.shiftKey });
56
+ if (getSnapshot() === state) {
57
+ focusRequested.current = false;
58
+ focusGrid();
59
+ }
60
+ },
61
+ onMouseLeave: () => {
62
+ if (state.selectionMode === "range") actions.hover(null);
63
+ }
64
+ }),
65
+ getDayProps: (cell) => ({
66
+ type: "button",
67
+ tabIndex: cell.isFocusTarget ? 0 : -1,
68
+ disabled: cell.isDisabled,
69
+ "aria-pressed": cell.isSelected,
70
+ ...cell.isToday ? { "aria-current": "date" } : {},
71
+ "data-state": cell.state,
72
+ "data-weekend": cell.isWeekend || void 0,
73
+ "data-preview": cell.isInRangePreview && !cell.isSelected || void 0,
74
+ "data-outside": cell.isOutside || void 0,
75
+ onClick: () => {
76
+ if (!cell.isDisabled) activate(cell.date);
77
+ },
78
+ onFocus: () => {
79
+ if (!cell.isFocusTarget) actions.focus(cell.date);
80
+ },
81
+ onMouseEnter: () => {
82
+ if (state.selectionMode === "range") actions.hover(cell.isDisabled ? null : cell.date);
83
+ }
84
+ }),
85
+ getPrevProps: () => ({
86
+ type: "button",
87
+ disabled: !state.canPrev,
88
+ "aria-label": state.view === "day" ? labels.previousMonth : labels.previousYear,
89
+ onClick: () => {
90
+ actions.prev();
91
+ }
92
+ }),
93
+ getNextProps: () => ({
94
+ type: "button",
95
+ disabled: !state.canNext,
96
+ "aria-label": state.view === "day" ? labels.nextMonth : labels.nextYear,
97
+ onClick: () => {
98
+ actions.next();
99
+ }
100
+ }),
101
+ getTitleButtons: () => state.view === "day" ? [{
102
+ key: "month",
103
+ label: monthName,
104
+ props: {
105
+ type: "button",
106
+ "aria-label": `${labels.month}: ${monthName}`,
107
+ onClick: () => {
108
+ requestFocus();
109
+ actions.setView("month");
110
+ }
111
+ }
112
+ }, {
113
+ key: "year",
114
+ label: yearText,
115
+ props: {
116
+ type: "button",
117
+ "aria-label": `${labels.year}: ${yearText}`,
118
+ onClick: () => {
119
+ requestFocus();
120
+ actions.setView("year");
121
+ }
122
+ }
123
+ }] : [{
124
+ key: "up",
125
+ label: state.title,
126
+ props: {
127
+ type: "button",
128
+ "aria-label": state.view === "fiscal" ? state.title : `${labels.year}: ${state.title}`,
129
+ onClick: () => {
130
+ requestFocus();
131
+ actions.setView(state.view === "month" ? "year" : "day");
132
+ }
133
+ }
134
+ }],
135
+ getOptionProps: (tile, index, tiles) => ({
136
+ type: "button",
137
+ tabIndex: index === focusIndex(tiles) ? 0 : -1,
138
+ disabled: tile.isDisabled,
139
+ "aria-pressed": tile.isSelected,
140
+ "data-state": tile.isSelected ? "selected" : tile.isCurrent ? "current" : "default",
141
+ onClick: () => {
142
+ requestFocus();
143
+ if (state.view === "month") actions.chooseMonth(tile.value);
144
+ else if (state.view === "year") actions.chooseYear(tile.value);
145
+ else actions.chooseFiscalYear(tile.value);
146
+ }
147
+ })
148
+ };
149
+ }
150
+ /** "Kartik 2083" → ["Kartik", "2083"]. */
151
+ function splitTitle(title) {
152
+ const space = title.lastIndexOf(" ");
153
+ return space === -1 ? [title, ""] : [title.slice(0, space), title.slice(space + 1)];
154
+ }
155
+ //#endregion
156
+ //#region src/use-store.ts
157
+ /** useLayoutEffect in the browser, useEffect on the server (no warning). */
158
+ const useIsomorphicLayoutEffect = typeof window === "undefined" ? react.useEffect : react.useLayoutEffect;
159
+ /**
160
+ * Create a store once and keep its options in step with props, without
161
+ * loops: functions are wrapped once so their identity never changes, and data
162
+ * options are compared by value, so inline objects and arrays are fine.
163
+ */
164
+ function useStore(create, options) {
165
+ const latest = (0, react.useRef)(options);
166
+ latest.current = options;
167
+ const wrappers = (0, react.useRef)(/* @__PURE__ */ new Map());
168
+ const prepare = (input) => {
169
+ const out = {};
170
+ for (const [key, value] of Object.entries(input)) if (typeof value === "function") {
171
+ let wrapper = wrappers.current.get(key);
172
+ if (!wrapper) {
173
+ wrapper = (...args) => latest.current[key]?.(...args);
174
+ wrappers.current.set(key, wrapper);
175
+ }
176
+ out[key] = wrapper;
177
+ } else out[key] = value;
178
+ return out;
179
+ };
180
+ const [store] = (0, react.useState)(() => create(prepare(options)));
181
+ const previous = (0, react.useRef)(prepare(options));
182
+ useIsomorphicLayoutEffect(() => {
183
+ const next = prepare(options);
184
+ const before = previous.current;
185
+ const changes = {};
186
+ for (const key of /* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(next)])) if (!deepEqual(before[key], next[key])) changes[key] = next[key];
187
+ previous.current = next;
188
+ if (Object.keys(changes).length > 0) store.setOptions(changes);
189
+ });
190
+ return {
191
+ store,
192
+ state: (0, react.useSyncExternalStore)((listener) => store.subscribe(listener), () => store.getState(), () => store.getState())
193
+ };
194
+ }
195
+ /** Structural equality for plain data (dates, ranges, lists); identity for everything else. */
196
+ function deepEqual(a, b) {
197
+ if (Object.is(a, b)) return true;
198
+ if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
199
+ if (Array.isArray(a) || Array.isArray(b)) return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((item, index) => deepEqual(item, b[index]));
200
+ if (Object.getPrototypeOf(a) !== Object.prototype || Object.getPrototypeOf(b) !== Object.prototype) return false;
201
+ const keysA = Object.keys(a);
202
+ const keysB = Object.keys(b);
203
+ return keysA.length === keysB.length && keysA.every((key) => deepEqual(a[key], b[key]));
204
+ }
205
+ //#endregion
206
+ //#region src/hooks.ts
207
+ /** A standalone calendar: state, actions and prop getters. */
208
+ function useCalendar(options = {}) {
209
+ const { store, state } = useStore(_nepdatejs_calendar.createCalendar, options);
210
+ return {
211
+ ...useCalendarBindings(state, store.actions, options.locale, { getSnapshot: () => store.getState() }),
212
+ store
213
+ };
214
+ }
215
+ /** A BS/AD date picker without markup: wire the getters to your own elements. */
216
+ function useDatePicker(options = {}) {
217
+ const { id: givenId, ...storeOptions } = options;
218
+ const { store, state } = useStore(_nepdatejs_datepicker.createDatePicker, storeOptions);
219
+ const generated = (0, react.useId)();
220
+ const input = givenId ?? `ndp${generated.replace(/:/g, "")}`;
221
+ const ids = {
222
+ input,
223
+ panel: `${input}-panel`,
224
+ hint: `${input}-hint`
225
+ };
226
+ const labels = (0, _nepdatejs_core.getLocale)(options.locale);
227
+ const calendar = useCalendarBindings(state.calendarState, store.calendar.actions, options.locale, {
228
+ getSnapshot: () => store.calendar.getState(),
229
+ onDayActivate: (date) => {
230
+ store.actions.select(date);
231
+ }
232
+ });
233
+ const hasHint = state.error !== null || state.equivalentText !== null;
234
+ return {
235
+ state,
236
+ actions: store.actions,
237
+ store,
238
+ calendar,
239
+ ids,
240
+ getInputProps: () => ({
241
+ id: ids.input,
242
+ ...popupProps(state),
243
+ type: "text",
244
+ inputMode: "numeric",
245
+ autoComplete: "off",
246
+ value: state.text,
247
+ placeholder: state.placeholder,
248
+ "aria-controls": ids.panel,
249
+ ...state.error ? { "aria-invalid": true } : {},
250
+ ...hasHint ? { "aria-describedby": ids.hint } : {},
251
+ onChange: (event) => {
252
+ store.actions.type(event.target.value);
253
+ },
254
+ onBlur: () => {
255
+ store.actions.blur();
256
+ },
257
+ onKeyDown: (event) => {
258
+ if (event.key === "ArrowDown" && (event.altKey || state.text === "")) {
259
+ event.preventDefault();
260
+ store.actions.open();
261
+ }
262
+ }
263
+ }),
264
+ getToggleProps: () => ({
265
+ type: "button",
266
+ "aria-label": labels.labels.openCalendar,
267
+ "aria-expanded": state.open,
268
+ "aria-controls": ids.panel,
269
+ onClick: () => {
270
+ store.actions.toggle();
271
+ }
272
+ }),
273
+ getClearProps: () => ({
274
+ type: "button",
275
+ "aria-label": labels.labels.clear,
276
+ onClick: () => {
277
+ store.actions.clear();
278
+ }
279
+ }),
280
+ getSwitchProps: () => {
281
+ const other = state.calendar === "BS" ? "AD" : "BS";
282
+ return {
283
+ type: "button",
284
+ "aria-label": `${labels.labels.calendar}: ${labels.calendarNames[state.calendar]} → ${labels.calendarNames[other]}`,
285
+ onClick: () => {
286
+ store.actions.switchCalendar(other);
287
+ }
288
+ };
289
+ },
290
+ getCalendarOptionProps: (option) => ({
291
+ type: "button",
292
+ "aria-pressed": state.calendar === option,
293
+ onClick: () => {
294
+ store.actions.switchCalendar(option);
295
+ }
296
+ }),
297
+ getTodayProps: () => ({
298
+ type: "button",
299
+ onClick: () => {
300
+ store.actions.selectToday();
301
+ }
302
+ }),
303
+ getPanelProps: () => ({
304
+ id: ids.panel,
305
+ role: state.inline ? "group" : "dialog",
306
+ "aria-label": labels.labels.chooseDate
307
+ }),
308
+ getPresetProps: (preset) => presetProps(preset, (id) => store.actions.applyPreset(id))
309
+ };
310
+ }
311
+ /** Combobox ARIA for a popup picker; an inline picker's input is a plain text field. */
312
+ function popupProps(state) {
313
+ return state.inline ? {} : {
314
+ role: "combobox",
315
+ "aria-haspopup": "dialog",
316
+ "aria-expanded": state.open
317
+ };
318
+ }
319
+ function presetProps(preset, apply) {
320
+ return {
321
+ type: "button",
322
+ "aria-pressed": preset.isActive,
323
+ disabled: preset.isDisabled,
324
+ onClick: () => {
325
+ apply(preset.id);
326
+ }
327
+ };
328
+ }
329
+ /** A BS/AD date range picker without markup. */
330
+ function useDateRangePicker(options = {}) {
331
+ const { store, state } = useStore(_nepdatejs_datepicker.createDateRangePicker, options);
332
+ const base = `ndp${(0, react.useId)().replace(/:/g, "")}`;
333
+ const ids = {
334
+ start: `${base}-start`,
335
+ end: `${base}-end`,
336
+ panel: `${base}-panel`,
337
+ hint: `${base}-hint`
338
+ };
339
+ const labels = (0, _nepdatejs_core.getLocale)(options.locale);
340
+ const calendar = useCalendarBindings(state.calendarState, store.calendar.actions, options.locale, {
341
+ getSnapshot: () => store.calendar.getState(),
342
+ onDayActivate: (date) => {
343
+ store.actions.select(date);
344
+ }
345
+ });
346
+ const texts = {
347
+ start: state.startText,
348
+ end: state.endText
349
+ };
350
+ return {
351
+ state,
352
+ actions: store.actions,
353
+ store,
354
+ calendar,
355
+ ids,
356
+ getInputProps: (field) => {
357
+ const invalid = state.error !== null && (state.error.field === field || state.error.field === "range");
358
+ return {
359
+ id: ids[field],
360
+ ...popupProps(state),
361
+ type: "text",
362
+ inputMode: "numeric",
363
+ autoComplete: "off",
364
+ value: texts[field],
365
+ placeholder: state.placeholder,
366
+ "aria-controls": ids.panel,
367
+ ...invalid ? { "aria-invalid": true } : {},
368
+ ...state.error ? { "aria-describedby": ids.hint } : {},
369
+ onChange: (event) => {
370
+ store.actions.type(field, event.target.value);
371
+ },
372
+ onBlur: () => {
373
+ store.actions.blur(field);
374
+ },
375
+ onKeyDown: (event) => {
376
+ if (event.key === "ArrowDown" && (event.altKey || texts[field] === "")) {
377
+ event.preventDefault();
378
+ store.actions.open();
379
+ }
380
+ }
381
+ };
382
+ },
383
+ getToggleProps: () => ({
384
+ type: "button",
385
+ "aria-label": labels.labels.openCalendar,
386
+ "aria-expanded": state.open,
387
+ "aria-controls": ids.panel,
388
+ onClick: () => {
389
+ store.actions.toggle();
390
+ }
391
+ }),
392
+ getCalendarOptionProps: (option) => ({
393
+ type: "button",
394
+ "aria-pressed": state.calendar === option,
395
+ onClick: () => {
396
+ store.actions.switchCalendar(option);
397
+ }
398
+ }),
399
+ getPanelProps: () => ({
400
+ id: ids.panel,
401
+ role: state.inline ? "group" : "dialog",
402
+ "aria-label": labels.labels.chooseDate
403
+ }),
404
+ getPresetProps: (preset) => presetProps(preset, (id) => store.actions.applyPreset(id))
405
+ };
406
+ }
407
+ /** A BS/AD date + time picker without markup. The value is a zoned ISO timestamp. */
408
+ function useDateTimePicker(options = {}) {
409
+ const { id: givenId, ...storeOptions } = options;
410
+ const { store, state } = useStore(_nepdatejs_datepicker.createDateTimePicker, storeOptions);
411
+ const base = givenId ?? `ndp${(0, react.useId)().replace(/:/g, "")}`;
412
+ const calendar = useCalendarBindings(state.calendarState, store.calendar.actions, options.locale, {
413
+ getSnapshot: () => store.calendar.getState(),
414
+ onDayActivate: (date) => {
415
+ store.actions.selectDate(date);
416
+ }
417
+ });
418
+ return {
419
+ state,
420
+ actions: store.actions,
421
+ store,
422
+ calendar,
423
+ ids: {
424
+ date: base,
425
+ time: `${base}-time`,
426
+ panel: `${base}-panel`,
427
+ hint: `${base}-hint`
428
+ }
429
+ };
430
+ }
431
+ /** A picker for several separate BS/AD days, without markup (PICK-001). */
432
+ function useMultiDatePicker(options = {}) {
433
+ const { id: givenId, ...storeOptions } = options;
434
+ const { store, state } = useStore(_nepdatejs_datepicker.createMultiDatePicker, storeOptions);
435
+ const input = givenId ?? `ndp${(0, react.useId)().replace(/:/g, "")}`;
436
+ const ids = {
437
+ input,
438
+ panel: `${input}-panel`,
439
+ hint: `${input}-hint`
440
+ };
441
+ const labels = (0, _nepdatejs_core.getLocale)(options.locale);
442
+ const calendar = useCalendarBindings(state.calendarState, store.calendar.actions, options.locale, {
443
+ getSnapshot: () => store.calendar.getState(),
444
+ onDayActivate: (date) => {
445
+ store.actions.select(date);
446
+ }
447
+ });
448
+ return {
449
+ state,
450
+ actions: store.actions,
451
+ store,
452
+ calendar,
453
+ ids,
454
+ getInputProps: () => ({
455
+ id: ids.input,
456
+ ...popupProps(state),
457
+ type: "text",
458
+ inputMode: "numeric",
459
+ autoComplete: "off",
460
+ value: state.text,
461
+ placeholder: state.placeholder,
462
+ "aria-controls": ids.panel,
463
+ ...state.error ? {
464
+ "aria-invalid": true,
465
+ "aria-describedby": ids.hint
466
+ } : {},
467
+ onChange: (event) => {
468
+ store.actions.type(event.target.value);
469
+ },
470
+ onBlur: () => {
471
+ store.actions.blur();
472
+ },
473
+ onKeyDown: (event) => {
474
+ if (event.key === "ArrowDown" && (event.altKey || state.text === "")) {
475
+ event.preventDefault();
476
+ store.actions.open();
477
+ }
478
+ }
479
+ }),
480
+ getToggleProps: () => ({
481
+ type: "button",
482
+ "aria-label": labels.labels.openCalendar,
483
+ "aria-expanded": state.open,
484
+ "aria-controls": ids.panel,
485
+ onClick: () => {
486
+ store.actions.toggle();
487
+ }
488
+ }),
489
+ getClearProps: () => ({
490
+ type: "button",
491
+ "aria-label": labels.labels.clear,
492
+ onClick: () => {
493
+ store.actions.clear();
494
+ }
495
+ }),
496
+ getCalendarOptionProps: (option) => ({
497
+ type: "button",
498
+ "aria-pressed": state.calendar === option,
499
+ onClick: () => {
500
+ store.actions.switchCalendar(option);
501
+ }
502
+ }),
503
+ getPanelProps: () => ({
504
+ id: ids.panel,
505
+ role: state.inline ? "group" : "dialog",
506
+ "aria-label": labels.labels.chooseDate
507
+ })
508
+ };
509
+ }
510
+ //#endregion
511
+ Object.defineProperty(exports, "deepEqual", {
512
+ enumerable: true,
513
+ get: function() {
514
+ return deepEqual;
515
+ }
516
+ });
517
+ Object.defineProperty(exports, "popupProps", {
518
+ enumerable: true,
519
+ get: function() {
520
+ return popupProps;
521
+ }
522
+ });
523
+ Object.defineProperty(exports, "useCalendar", {
524
+ enumerable: true,
525
+ get: function() {
526
+ return useCalendar;
527
+ }
528
+ });
529
+ Object.defineProperty(exports, "useCalendarBindings", {
530
+ enumerable: true,
531
+ get: function() {
532
+ return useCalendarBindings;
533
+ }
534
+ });
535
+ Object.defineProperty(exports, "useDatePicker", {
536
+ enumerable: true,
537
+ get: function() {
538
+ return useDatePicker;
539
+ }
540
+ });
541
+ Object.defineProperty(exports, "useDateRangePicker", {
542
+ enumerable: true,
543
+ get: function() {
544
+ return useDateRangePicker;
545
+ }
546
+ });
547
+ Object.defineProperty(exports, "useDateTimePicker", {
548
+ enumerable: true,
549
+ get: function() {
550
+ return useDateTimePicker;
551
+ }
552
+ });
553
+ Object.defineProperty(exports, "useIsomorphicLayoutEffect", {
554
+ enumerable: true,
555
+ get: function() {
556
+ return useIsomorphicLayoutEffect;
557
+ }
558
+ });
559
+ Object.defineProperty(exports, "useMultiDatePicker", {
560
+ enumerable: true,
561
+ get: function() {
562
+ return useMultiDatePicker;
563
+ }
564
+ });
565
+ Object.defineProperty(exports, "useStore", {
566
+ enumerable: true,
567
+ get: function() {
568
+ return useStore;
569
+ }
570
+ });
571
+
572
+ //# sourceMappingURL=headless-HxTkvgbz.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-HxTkvgbz.cjs","names":["useRef","getLocale","useCallback","useEffect","useLayoutEffect","useRef","useState","useSyncExternalStore","createCalendar","createDatePicker","useId","getLocale","createDateRangePicker","createDateTimePicker","createMultiDatePicker"],"sources":["../src/bindings.ts","../src/use-store.ts","../src/hooks.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, type KeyboardEvent, type Ref } from 'react';\nimport { getLocale, type CalendarDate, type LocaleCode } from '@nepdatejs/core';\nimport type {\n CalendarActions,\n CalendarState,\n DayCell,\n FocusKey,\n PickerCell,\n} from '@nepdatejs/calendar';\n\nconst FOCUS_KEYS: ReadonlySet<string> = new Set([\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n 'PageUp',\n 'PageDown',\n]);\n\ntype DataAttrs = Record<`data-${string}`, string | boolean | undefined>;\n\nexport interface ButtonProps extends DataAttrs {\n type: 'button';\n tabIndex?: number;\n disabled?: boolean;\n 'aria-label'?: string;\n 'aria-pressed'?: boolean;\n 'aria-current'?: 'date';\n onClick: () => void;\n onFocus?: () => void;\n onMouseEnter?: () => void;\n}\n\nexport interface GridProps {\n role: 'grid';\n 'aria-label': string;\n ref: Ref<HTMLTableElement>;\n onKeyDown: (event: KeyboardEvent) => void;\n onMouseLeave: () => void;\n}\n\n/** Prop getters that turn a calendar store into accessible markup. */\nexport interface CalendarBindings {\n readonly state: CalendarState;\n readonly actions: CalendarActions;\n readonly getGridProps: () => GridProps;\n readonly getDayProps: (cell: DayCell) => ButtonProps;\n readonly getPrevProps: () => ButtonProps;\n readonly getNextProps: () => ButtonProps;\n /** The title buttons: month and year in the day view, the year (or page) otherwise. */\n readonly getTitleButtons: () => { key: string; label: string; props: ButtonProps }[];\n readonly getOptionProps: (\n tile: PickerCell,\n index: number,\n tiles: readonly PickerCell[],\n ) => ButtonProps;\n /** Move focus into the grid (e.g. when a panel opens). */\n readonly focusGrid: () => void;\n}\n\nexport function useCalendarBindings(\n state: CalendarState,\n actions: CalendarActions,\n locale: LocaleCode | undefined,\n options: {\n /** The store's latest snapshot, to tell whether a key press changed anything. */\n readonly getSnapshot: () => CalendarState;\n readonly onDayActivate?: ((date: CalendarDate) => void) | undefined;\n },\n): CalendarBindings {\n const { getSnapshot, onDayActivate } = options;\n const grid = useRef<HTMLTableElement | null>(null);\n const root = useRef<HTMLElement | null>(null);\n const focusRequested = useRef(false);\n const labels = getLocale(locale).labels;\n\n const focusGrid = useCallback((): void => {\n const scope = grid.current?.closest('.ndp-calendar') ?? grid.current ?? root.current;\n scope\n ?.querySelector<HTMLElement>('.ndp-day[tabindex=\"0\"], .ndp-option[tabindex=\"0\"]')\n ?.focus();\n }, []);\n\n useEffect(() => {\n if (focusRequested.current) {\n focusRequested.current = false;\n focusGrid();\n }\n });\n\n const requestFocus = (): void => {\n focusRequested.current = true;\n };\n\n const activate = onDayActivate ?? ((date: CalendarDate) => actions.select(date));\n const [monthName, yearText] = splitTitle(state.title);\n const focusIndex = (tiles: readonly PickerCell[]): number => {\n const selected = tiles.findIndex((tile) => tile.isSelected);\n const current = tiles.findIndex((tile) => tile.isCurrent);\n\n return Math.max(0, selected === -1 ? current : selected);\n };\n\n return {\n state,\n actions,\n focusGrid,\n getGridProps: () => ({\n role: 'grid',\n 'aria-label': state.title,\n ref: (node: HTMLTableElement | null) => {\n grid.current = node;\n },\n onKeyDown: (event) => {\n if (!FOCUS_KEYS.has(event.key)) {\n return;\n }\n event.preventDefault();\n requestFocus();\n actions.moveFocus(event.key as FocusKey, { shift: event.shiftKey });\n // Nothing moved (at a limit): keep focus here. Otherwise the effect focuses after React renders.\n if (getSnapshot() === state) {\n focusRequested.current = false;\n focusGrid();\n }\n },\n onMouseLeave: () => {\n if (state.selectionMode === 'range') {\n actions.hover(null);\n }\n },\n }),\n getDayProps: (cell) => ({\n type: 'button',\n tabIndex: cell.isFocusTarget ? 0 : -1,\n disabled: cell.isDisabled,\n 'aria-pressed': cell.isSelected,\n ...(cell.isToday ? { 'aria-current': 'date' as const } : {}),\n 'data-state': cell.state,\n 'data-weekend': cell.isWeekend || undefined,\n 'data-preview': (cell.isInRangePreview && !cell.isSelected) || undefined,\n 'data-outside': cell.isOutside || undefined,\n onClick: () => {\n if (!cell.isDisabled) {\n activate(cell.date);\n }\n },\n onFocus: () => {\n if (!cell.isFocusTarget) {\n actions.focus(cell.date);\n }\n },\n onMouseEnter: () => {\n if (state.selectionMode === 'range') {\n actions.hover(cell.isDisabled ? null : cell.date);\n }\n },\n }),\n getPrevProps: () => ({\n type: 'button',\n disabled: !state.canPrev,\n 'aria-label': state.view === 'day' ? labels.previousMonth : labels.previousYear,\n onClick: () => {\n actions.prev();\n },\n }),\n getNextProps: () => ({\n type: 'button',\n disabled: !state.canNext,\n 'aria-label': state.view === 'day' ? labels.nextMonth : labels.nextYear,\n onClick: () => {\n actions.next();\n },\n }),\n getTitleButtons: () =>\n state.view === 'day'\n ? [\n {\n key: 'month',\n label: monthName,\n props: {\n type: 'button',\n 'aria-label': `${labels.month}: ${monthName}`,\n onClick: () => {\n requestFocus();\n actions.setView('month');\n },\n },\n },\n {\n key: 'year',\n label: yearText,\n props: {\n type: 'button',\n 'aria-label': `${labels.year}: ${yearText}`,\n onClick: () => {\n requestFocus();\n actions.setView('year');\n },\n },\n },\n ]\n : [\n {\n key: 'up',\n label: state.title,\n props: {\n type: 'button',\n 'aria-label':\n state.view === 'fiscal'\n ? state.title\n : `${labels.year}: ${state.title}`,\n onClick: () => {\n requestFocus();\n actions.setView(state.view === 'month' ? 'year' : 'day');\n },\n },\n },\n ],\n getOptionProps: (tile, index, tiles) => ({\n type: 'button',\n tabIndex: index === focusIndex(tiles) ? 0 : -1,\n disabled: tile.isDisabled,\n 'aria-pressed': tile.isSelected,\n 'data-state': tile.isSelected ? 'selected' : tile.isCurrent ? 'current' : 'default',\n onClick: () => {\n requestFocus();\n if (state.view === 'month') {\n actions.chooseMonth(tile.value as 1);\n } else if (state.view === 'year') {\n actions.chooseYear(tile.value);\n } else {\n actions.chooseFiscalYear(tile.value);\n }\n },\n }),\n };\n}\n\n/** \"Kartik 2083\" → [\"Kartik\", \"2083\"]. */\nfunction splitTitle(title: string): [string, string] {\n const space = title.lastIndexOf(' ');\n\n return space === -1 ? [title, ''] : [title.slice(0, space), title.slice(space + 1)];\n}\n","import {\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n useSyncExternalStore,\n} from 'react';\n\ninterface StoreLike<O, S> {\n getState(): S;\n subscribe(listener: () => void): () => void;\n setOptions(changes: Partial<O>): void;\n}\n\n/** useLayoutEffect in the browser, useEffect on the server (no warning). */\nexport const useIsomorphicLayoutEffect: typeof useEffect =\n typeof window === 'undefined' ? useEffect : useLayoutEffect;\n\ntype Fn = (...args: never[]) => unknown;\n\n/**\n * Create a store once and keep its options in step with props, without\n * loops: functions are wrapped once so their identity never changes, and data\n * options are compared by value, so inline objects and arrays are fine.\n */\nexport function useStore<O extends object, S, T extends StoreLike<O, S>>(\n create: (options: O) => T,\n options: O,\n): { store: T; state: S } {\n const latest = useRef(options);\n latest.current = options;\n const wrappers = useRef(new Map<string, Fn>());\n\n const prepare = (input: O): O => {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(input)) {\n if (typeof value === 'function') {\n let wrapper = wrappers.current.get(key);\n if (!wrapper) {\n wrapper = (...args: never[]) =>\n ((latest.current as Record<string, unknown>)[key] as Fn | undefined)?.(\n ...args,\n );\n wrappers.current.set(key, wrapper);\n }\n out[key] = wrapper;\n } else {\n out[key] = value;\n }\n }\n\n return out as O;\n };\n\n const [store] = useState(() => create(prepare(options)));\n const previous = useRef<O>(prepare(options));\n\n useIsomorphicLayoutEffect(() => {\n const next = prepare(options) as Record<string, unknown>;\n const before = previous.current as Record<string, unknown>;\n const changes: Record<string, unknown> = {};\n for (const key of new Set([...Object.keys(before), ...Object.keys(next)])) {\n if (!deepEqual(before[key], next[key])) {\n changes[key] = next[key];\n }\n }\n previous.current = next as O;\n if (Object.keys(changes).length > 0) {\n store.setOptions(changes as Partial<O>);\n }\n });\n\n const state = useSyncExternalStore(\n (listener) => store.subscribe(listener),\n () => store.getState(),\n () => store.getState(),\n );\n\n return { store, state };\n}\n\n/** Structural equality for plain data (dates, ranges, lists); identity for everything else. */\nexport function deepEqual(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) {\n return true;\n }\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) {\n return false;\n }\n if (Array.isArray(a) || Array.isArray(b)) {\n return (\n Array.isArray(a) &&\n Array.isArray(b) &&\n a.length === b.length &&\n a.every((item, index) => deepEqual(item, b[index]))\n );\n }\n if (\n Object.getPrototypeOf(a) !== Object.prototype ||\n Object.getPrototypeOf(b) !== Object.prototype\n ) {\n return false;\n }\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n\n return (\n keysA.length === keysB.length &&\n keysA.every((key) =>\n deepEqual((a as Record<string, unknown>)[key], (b as Record<string, unknown>)[key]),\n )\n );\n}\n","import { useId, type ChangeEvent, type KeyboardEvent } from 'react';\nimport { getLocale, type CalendarSystem } from '@nepdatejs/core';\nimport {\n createCalendar,\n type CalendarOptions,\n type CalendarState,\n type CalendarStore,\n} from '@nepdatejs/calendar';\nimport type { PresetState } from '@nepdatejs/datepicker';\nimport {\n createDatePicker,\n createDateRangePicker,\n createDateTimePicker,\n createMultiDatePicker,\n type DateTimePickerOptions,\n type DateTimePickerState,\n type DateTimePickerStore,\n type DatePickerOptions,\n type DatePickerState,\n type DatePickerStore,\n type DateRangePickerOptions,\n type DateRangePickerState,\n type DateRangePickerStore,\n type MultiDatePickerOptions,\n type MultiDatePickerState,\n type MultiDatePickerStore,\n type RangeField,\n} from '@nepdatejs/datepicker';\nimport { useCalendarBindings, type ButtonProps, type CalendarBindings } from './bindings';\nimport { useStore } from './use-store';\n\n/** A standalone calendar: state, actions and prop getters. */\nexport function useCalendar(\n options: CalendarOptions = {},\n): CalendarBindings & { store: CalendarStore } {\n const { store, state } = useStore<CalendarOptions, CalendarState, CalendarStore>(\n createCalendar,\n options,\n );\n const bindings = useCalendarBindings(state, store.actions, options.locale, {\n getSnapshot: () => store.getState(),\n });\n\n return { ...bindings, store };\n}\n\nexport interface InputProps {\n id: string;\n /** Left out for an inline picker, whose calendar is always in the page. */\n role?: 'combobox';\n type: 'text';\n inputMode: 'numeric';\n autoComplete: 'off';\n value: string;\n placeholder: string;\n 'aria-haspopup'?: 'dialog';\n 'aria-expanded'?: boolean;\n 'aria-controls': string;\n 'aria-invalid'?: true;\n 'aria-describedby'?: string;\n onChange: (event: ChangeEvent<HTMLInputElement>) => void;\n onBlur: () => void;\n onKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;\n}\n\nexport interface PanelProps {\n id: string;\n /** 'group' for an inline picker. */\n role: 'dialog' | 'group';\n 'aria-label': string;\n}\n\nexport interface DatePickerBindings {\n readonly state: DatePickerState;\n readonly actions: DatePickerStore['actions'];\n readonly store: DatePickerStore;\n /** Prop getters for the panel's calendar. */\n readonly calendar: CalendarBindings;\n readonly ids: { input: string; panel: string; hint: string };\n getInputProps(extra?: { id?: string | undefined }): InputProps;\n getToggleProps(): ButtonProps & { 'aria-expanded': boolean; 'aria-controls': string };\n getClearProps(): ButtonProps;\n /** The BS/AD switch inside the input. */\n getSwitchProps(): ButtonProps;\n /** One button of the BS/AD segment in the panel footer. */\n getCalendarOptionProps(calendar: CalendarSystem): ButtonProps;\n getTodayProps(): ButtonProps;\n getPanelProps(): PanelProps;\n /** A shortcut button (see state.presets). */\n getPresetProps(preset: PresetState): ButtonProps;\n}\n\n/** A BS/AD date picker without markup: wire the getters to your own elements. */\nexport function useDatePicker(\n options: DatePickerOptions & { id?: string | undefined } = {},\n): DatePickerBindings {\n const { id: givenId, ...storeOptions } = options;\n const { store, state } = useStore<DatePickerOptions, DatePickerState, DatePickerStore>(\n createDatePicker,\n storeOptions,\n );\n const generated = useId();\n const input = givenId ?? `ndp${generated.replace(/:/g, '')}`;\n const ids = { input, panel: `${input}-panel`, hint: `${input}-hint` };\n const labels = getLocale(options.locale);\n const calendar = useCalendarBindings(\n state.calendarState,\n store.calendar.actions,\n options.locale,\n {\n getSnapshot: () => store.calendar.getState(),\n onDayActivate: (date) => {\n store.actions.select(date);\n },\n },\n );\n const hasHint = state.error !== null || state.equivalentText !== null;\n\n return {\n state,\n actions: store.actions,\n store,\n calendar,\n ids,\n getInputProps: () => ({\n id: ids.input,\n ...popupProps(state),\n type: 'text',\n inputMode: 'numeric',\n autoComplete: 'off',\n value: state.text,\n placeholder: state.placeholder,\n 'aria-controls': ids.panel,\n ...(state.error ? { 'aria-invalid': true as const } : {}),\n ...(hasHint ? { 'aria-describedby': ids.hint } : {}),\n onChange: (event) => {\n store.actions.type(event.target.value);\n },\n onBlur: () => {\n store.actions.blur();\n },\n onKeyDown: (event) => {\n if (event.key === 'ArrowDown' && (event.altKey || state.text === '')) {\n event.preventDefault();\n store.actions.open();\n }\n },\n }),\n getToggleProps: () => ({\n type: 'button',\n 'aria-label': labels.labels.openCalendar,\n 'aria-expanded': state.open,\n 'aria-controls': ids.panel,\n onClick: () => {\n store.actions.toggle();\n },\n }),\n getClearProps: () => ({\n type: 'button',\n 'aria-label': labels.labels.clear,\n onClick: () => {\n store.actions.clear();\n },\n }),\n getSwitchProps: () => {\n const other: CalendarSystem = state.calendar === 'BS' ? 'AD' : 'BS';\n\n return {\n type: 'button',\n 'aria-label': `${labels.labels.calendar}: ${labels.calendarNames[state.calendar]} → ${labels.calendarNames[other]}`,\n onClick: () => {\n store.actions.switchCalendar(other);\n },\n };\n },\n getCalendarOptionProps: (option) => ({\n type: 'button',\n 'aria-pressed': state.calendar === option,\n onClick: () => {\n store.actions.switchCalendar(option);\n },\n }),\n getTodayProps: () => ({\n type: 'button',\n onClick: () => {\n store.actions.selectToday();\n },\n }),\n getPanelProps: () => ({\n id: ids.panel,\n role: state.inline ? 'group' : 'dialog',\n 'aria-label': labels.labels.chooseDate,\n }),\n getPresetProps: (preset) =>\n presetProps(preset, (id) => store.actions.applyPreset(id)),\n };\n}\n\n/** Combobox ARIA for a popup picker; an inline picker's input is a plain text field. */\nexport function popupProps(state: {\n readonly open: boolean;\n readonly inline: boolean;\n}): Pick<InputProps, 'role' | 'aria-haspopup' | 'aria-expanded'> {\n return state.inline\n ? {}\n : { role: 'combobox', 'aria-haspopup': 'dialog', 'aria-expanded': state.open };\n}\n\nfunction presetProps(preset: PresetState, apply: (id: string) => boolean): ButtonProps {\n return {\n type: 'button',\n 'aria-pressed': preset.isActive,\n disabled: preset.isDisabled,\n onClick: () => {\n apply(preset.id);\n },\n };\n}\n\nexport interface DateRangePickerBindings {\n readonly state: DateRangePickerState;\n readonly actions: DateRangePickerStore['actions'];\n readonly store: DateRangePickerStore;\n readonly calendar: CalendarBindings;\n readonly ids: { start: string; end: string; panel: string; hint: string };\n getInputProps(field: RangeField): Omit<InputProps, 'onChange' | 'onBlur'> & {\n onChange: (event: ChangeEvent<HTMLInputElement>) => void;\n onBlur: () => void;\n };\n getToggleProps(): ButtonProps & { 'aria-expanded': boolean; 'aria-controls': string };\n getCalendarOptionProps(calendar: CalendarSystem): ButtonProps;\n getPanelProps(): PanelProps;\n getPresetProps(preset: PresetState): ButtonProps;\n}\n\n/** A BS/AD date range picker without markup. */\nexport function useDateRangePicker(\n options: DateRangePickerOptions = {},\n): DateRangePickerBindings {\n const { store, state } = useStore<\n DateRangePickerOptions,\n DateRangePickerState,\n DateRangePickerStore\n >(createDateRangePicker, options);\n const base = `ndp${useId().replace(/:/g, '')}`;\n const ids = {\n start: `${base}-start`,\n end: `${base}-end`,\n panel: `${base}-panel`,\n hint: `${base}-hint`,\n };\n const labels = getLocale(options.locale);\n const calendar = useCalendarBindings(\n state.calendarState,\n store.calendar.actions,\n options.locale,\n {\n getSnapshot: () => store.calendar.getState(),\n onDayActivate: (date) => {\n store.actions.select(date);\n },\n },\n );\n const texts: Record<RangeField, string> = {\n start: state.startText,\n end: state.endText,\n };\n\n return {\n state,\n actions: store.actions,\n store,\n calendar,\n ids,\n getInputProps: (field) => {\n const invalid =\n state.error !== null &&\n (state.error.field === field || state.error.field === 'range');\n\n return {\n id: ids[field],\n ...popupProps(state),\n type: 'text',\n inputMode: 'numeric',\n autoComplete: 'off',\n value: texts[field],\n placeholder: state.placeholder,\n 'aria-controls': ids.panel,\n ...(invalid ? { 'aria-invalid': true as const } : {}),\n ...(state.error ? { 'aria-describedby': ids.hint } : {}),\n onChange: (event) => {\n store.actions.type(field, event.target.value);\n },\n onBlur: () => {\n store.actions.blur(field);\n },\n onKeyDown: (event) => {\n if (event.key === 'ArrowDown' && (event.altKey || texts[field] === '')) {\n event.preventDefault();\n store.actions.open();\n }\n },\n };\n },\n getToggleProps: () => ({\n type: 'button',\n 'aria-label': labels.labels.openCalendar,\n 'aria-expanded': state.open,\n 'aria-controls': ids.panel,\n onClick: () => {\n store.actions.toggle();\n },\n }),\n getCalendarOptionProps: (option) => ({\n type: 'button',\n 'aria-pressed': state.calendar === option,\n onClick: () => {\n store.actions.switchCalendar(option);\n },\n }),\n getPanelProps: () => ({\n id: ids.panel,\n role: state.inline ? 'group' : 'dialog',\n 'aria-label': labels.labels.chooseDate,\n }),\n getPresetProps: (preset) =>\n presetProps(preset, (id) => store.actions.applyPreset(id)),\n };\n}\n\nexport interface DateTimePickerBindings {\n readonly state: DateTimePickerState;\n readonly actions: DateTimePickerStore['actions'];\n readonly store: DateTimePickerStore;\n readonly calendar: CalendarBindings;\n readonly ids: { date: string; time: string; panel: string; hint: string };\n}\n\n/** A BS/AD date + time picker without markup. The value is a zoned ISO timestamp. */\nexport function useDateTimePicker(\n options: DateTimePickerOptions & { id?: string | undefined } = {},\n): DateTimePickerBindings {\n const { id: givenId, ...storeOptions } = options;\n const { store, state } = useStore<\n DateTimePickerOptions,\n DateTimePickerState,\n DateTimePickerStore\n >(createDateTimePicker, storeOptions);\n const base = givenId ?? `ndp${useId().replace(/:/g, '')}`;\n const calendar = useCalendarBindings(\n state.calendarState,\n store.calendar.actions,\n options.locale,\n {\n getSnapshot: () => store.calendar.getState(),\n onDayActivate: (date) => {\n store.actions.selectDate(date);\n },\n },\n );\n\n return {\n state,\n actions: store.actions,\n store,\n calendar,\n ids: {\n date: base,\n time: `${base}-time`,\n panel: `${base}-panel`,\n hint: `${base}-hint`,\n },\n };\n}\n\nexport interface MultiDatePickerBindings {\n readonly state: MultiDatePickerState;\n readonly actions: MultiDatePickerStore['actions'];\n readonly store: MultiDatePickerStore;\n readonly calendar: CalendarBindings;\n readonly ids: { input: string; panel: string; hint: string };\n getInputProps(): InputProps;\n getToggleProps(): ButtonProps & { 'aria-expanded': boolean; 'aria-controls': string };\n getClearProps(): ButtonProps;\n getCalendarOptionProps(calendar: CalendarSystem): ButtonProps;\n getPanelProps(): PanelProps;\n}\n\n/** A picker for several separate BS/AD days, without markup (PICK-001). */\nexport function useMultiDatePicker(\n options: MultiDatePickerOptions & { id?: string | undefined } = {},\n): MultiDatePickerBindings {\n const { id: givenId, ...storeOptions } = options;\n const { store, state } = useStore<\n MultiDatePickerOptions,\n MultiDatePickerState,\n MultiDatePickerStore\n >(createMultiDatePicker, storeOptions);\n const input = givenId ?? `ndp${useId().replace(/:/g, '')}`;\n const ids = { input, panel: `${input}-panel`, hint: `${input}-hint` };\n const labels = getLocale(options.locale);\n const calendar = useCalendarBindings(\n state.calendarState,\n store.calendar.actions,\n options.locale,\n {\n getSnapshot: () => store.calendar.getState(),\n onDayActivate: (date) => {\n store.actions.select(date);\n },\n },\n );\n\n return {\n state,\n actions: store.actions,\n store,\n calendar,\n ids,\n getInputProps: () => ({\n id: ids.input,\n ...popupProps(state),\n type: 'text',\n inputMode: 'numeric',\n autoComplete: 'off',\n value: state.text,\n placeholder: state.placeholder,\n 'aria-controls': ids.panel,\n ...(state.error\n ? { 'aria-invalid': true as const, 'aria-describedby': ids.hint }\n : {}),\n onChange: (event) => {\n store.actions.type(event.target.value);\n },\n onBlur: () => {\n store.actions.blur();\n },\n onKeyDown: (event) => {\n if (event.key === 'ArrowDown' && (event.altKey || state.text === '')) {\n event.preventDefault();\n store.actions.open();\n }\n },\n }),\n getToggleProps: () => ({\n type: 'button',\n 'aria-label': labels.labels.openCalendar,\n 'aria-expanded': state.open,\n 'aria-controls': ids.panel,\n onClick: () => {\n store.actions.toggle();\n },\n }),\n getClearProps: () => ({\n type: 'button',\n 'aria-label': labels.labels.clear,\n onClick: () => {\n store.actions.clear();\n },\n }),\n getCalendarOptionProps: (option) => ({\n type: 'button',\n 'aria-pressed': state.calendar === option,\n onClick: () => {\n store.actions.switchCalendar(option);\n },\n }),\n getPanelProps: () => ({\n id: ids.panel,\n role: state.inline ? 'group' : 'dialog',\n 'aria-label': labels.labels.chooseDate,\n }),\n };\n}\n"],"mappings":";;;;;AAUA,MAAM,6BAAkC,IAAI,IAAI;CAC9C;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AA2CD,SAAgB,oBACd,OACA,SACA,QACA,SAKkB;CAClB,MAAM,EAAE,aAAa,kBAAkB;CACvC,MAAM,QAAA,GAAOA,MAAAA,OAAAA,CAAgC,IAAI;CACjD,MAAM,QAAA,GAAOA,MAAAA,OAAAA,CAA2B,IAAI;CAC5C,MAAM,kBAAA,GAAiBA,MAAAA,OAAAA,CAAO,KAAK;CACnC,MAAM,UAAA,GAASC,gBAAAA,UAAAA,CAAU,MAAM,CAAC,CAAC;CAEjC,MAAM,aAAA,GAAYC,MAAAA,YAAAA,OAAwB;EAExC,CADc,KAAK,SAAS,QAAQ,eAAe,KAAK,KAAK,WAAW,KAAK,QAAA,EAEzE,cAA2B,uDAAmD,CAAC,EAC/E,MAAM;CACZ,GAAG,CAAC,CAAC;CAEL,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,eAAe,SAAS;GAC1B,eAAe,UAAU;GACzB,UAAU;EACZ;CACF,CAAC;CAED,MAAM,qBAA2B;EAC/B,eAAe,UAAU;CAC3B;CAEA,MAAM,WAAW,mBAAmB,SAAuB,QAAQ,OAAO,IAAI;CAC9E,MAAM,CAAC,W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IAAe,oBAAoB,IAAI;GAAK,IAC9D,CAAC;GACL,WAAW,UAAU;IACnB,MAAM,QAAQ,KAAK,MAAM,OAAO,KAAK;GACvC;GACA,cAAc;IACZ,MAAM,QAAQ,KAAK;GACrB;GACA,YAAY,UAAU;IACpB,IAAI,MAAM,QAAQ,gBAAgB,MAAM,UAAU,MAAM,SAAS,KAAK;KACpE,MAAM,eAAe;KACrB,MAAM,QAAQ,KAAK;IACrB;GACF;EACF;EACA,uBAAuB;GACrB,MAAM;GACN,cAAc,OAAO,OAAO;GAC5B,iBAAiB,MAAM;GACvB,iBAAiB,IAAI;GACrB,eAAe;IACb,MAAM,QAAQ,OAAO;GACvB;EACF;EACA,sBAAsB;GACpB,MAAM;GACN,cAAc,OAAO,OAAO;GAC5B,eAAe;IACb,MAAM,QAAQ,MAAM;GACtB;EACF;EACA,yBAAyB,YAAY;GACnC,MAAM;GACN,gBAAgB,MAAM,aAAa;GACnC,eAAe;IACb,MAAM,QAAQ,eAAe,MAAM;GACrC;EACF;EACA,sBAAsB;GACpB,IAAI,IAAI;GACR,MAAM,MAAM,SAAS,UAAU;GAC/B,cAAc,OAAO,OAAO;EAC9B;CACF;AACF"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_headless = require("./headless-HxTkvgbz.cjs");
4
+ exports.deepEqual = require_headless.deepEqual;
5
+ exports.useCalendar = require_headless.useCalendar;
6
+ exports.useCalendarBindings = require_headless.useCalendarBindings;
7
+ exports.useDatePicker = require_headless.useDatePicker;
8
+ exports.useDateRangePicker = require_headless.useDateRangePicker;
9
+ exports.useDateTimePicker = require_headless.useDateTimePicker;
10
+ exports.useMultiDatePicker = require_headless.useMultiDatePicker;
11
+ exports.useStore = require_headless.useStore;
@@ -0,0 +1,2 @@
1
+ import { _ as useCalendarBindings, a as DateTimePickerBindings, c as PanelProps, d as useDateRangePicker, f as useDateTimePicker, g as GridProps, h as CalendarBindings, i as DateRangePickerBindings, l as useCalendar, m as ButtonProps, n as useStore, o as InputProps, p as useMultiDatePicker, r as DatePickerBindings, s as MultiDatePickerBindings, t as deepEqual, u as useDatePicker } from "./headless-6BuUOtOR.cjs";
2
+ export { type ButtonProps, type CalendarBindings, type DatePickerBindings, type DateRangePickerBindings, type DateTimePickerBindings, type GridProps, type InputProps, type MultiDatePickerBindings, type PanelProps, deepEqual, useCalendar, useCalendarBindings, useDatePicker, useDateRangePicker, useDateTimePicker, useMultiDatePicker, useStore };
@@ -0,0 +1,2 @@
1
+ import { _ as useCalendarBindings, a as DateTimePickerBindings, c as PanelProps, d as useDateRangePicker, f as useDateTimePicker, g as GridProps, h as CalendarBindings, i as DateRangePickerBindings, l as useCalendar, m as ButtonProps, n as useStore, o as InputProps, p as useMultiDatePicker, r as DatePickerBindings, s as MultiDatePickerBindings, t as deepEqual, u as useDatePicker } from "./headless-CFZ06zLn.js";
2
+ export { type ButtonProps, type CalendarBindings, type DatePickerBindings, type DateRangePickerBindings, type DateTimePickerBindings, type GridProps, type InputProps, type MultiDatePickerBindings, type PanelProps, deepEqual, useCalendar, useCalendarBindings, useDatePicker, useDateRangePicker, useDateTimePicker, useMultiDatePicker, useStore };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { s as deepEqual, n as useCalendar, u as useCalendarBindings, r as useDatePicker, i as useDateRangePicker, a as useDateTimePicker, o as useMultiDatePicker, l as useStore } from "./headless-BK0XRHKb.js";