@auronui/vue 1.1.1 → 1.2.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 (100) hide show
  1. package/dist/cjs/index.cjs +772 -741
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/components/alert-dialog/AlertDialogBody.vue_vue_type_script_setup_true_lang.js +1 -1
  4. package/dist/components/alert-dialog/AlertDialogContent.vue_vue_type_script_setup_true_lang.js +1 -1
  5. package/dist/components/alert-dialog/AlertDialogFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  6. package/dist/components/alert-dialog/AlertDialogHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  7. package/dist/components/alert-dialog/AlertDialogIcon.vue_vue_type_script_setup_true_lang.js +1 -1
  8. package/dist/components/alert-dialog/AlertDialogOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/components/alert-dialog/AlertDialogTitle.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/dist/components/calendar/Calendar.vue_vue_type_script_setup_true_lang.js +2 -2
  11. package/dist/components/calendar/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +6 -8
  13. package/dist/components/date-time-picker/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/components/date-time-picker/DateTimePickerTimeScroller.vue_vue_type_script_setup_true_lang.js +1 -0
  15. package/dist/components/date-time-picker/DateTimePickerTimeScroller.vue_vue_type_script_setup_true_lang.js.map +1 -1
  16. package/dist/components/drawer/Drawer.vue_vue_type_script_lang.js +1 -1
  17. package/dist/components/drawer/DrawerBody.vue_vue_type_script_setup_true_lang.js +1 -1
  18. package/dist/components/drawer/DrawerClose.vue_vue_type_script_setup_true_lang.js +1 -1
  19. package/dist/components/drawer/DrawerContent.vue_vue_type_script_setup_true_lang.js +1 -1
  20. package/dist/components/drawer/DrawerFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  21. package/dist/components/drawer/DrawerHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  22. package/dist/components/drawer/DrawerMain.vue_vue_type_script_setup_true_lang.js +1 -1
  23. package/dist/components/drawer/DrawerOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  24. package/dist/components/drawer/DrawerTitle.vue_vue_type_script_setup_true_lang.js +1 -1
  25. package/dist/components/modal/ModalBody.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/components/modal/ModalClose.vue_vue_type_script_setup_true_lang.js +1 -1
  27. package/dist/components/modal/ModalContent.vue_vue_type_script_setup_true_lang.js +1 -1
  28. package/dist/components/modal/ModalFooter.vue_vue_type_script_setup_true_lang.js +1 -1
  29. package/dist/components/modal/ModalHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  30. package/dist/components/modal/ModalOverlay.vue_vue_type_script_setup_true_lang.js +1 -1
  31. package/dist/components/modal/ModalTitle.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/dist/components/popover/PopoverContent.vue_vue_type_script_setup_true_lang.js +1 -1
  33. package/dist/components/range-calendar/RangeCalendar.vue_vue_type_script_setup_true_lang.js +2 -2
  34. package/dist/components/range-calendar/RangeCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/components/tooltip/TooltipArrow.vue_vue_type_script_setup_true_lang.js +1 -1
  36. package/dist/components/tooltip/TooltipContent.vue_vue_type_script_setup_true_lang.js +1 -1
  37. package/dist/composables/useAccordion.js +58 -0
  38. package/dist/composables/useAccordion.js.map +1 -0
  39. package/dist/composables/useCalendar.js +47 -0
  40. package/dist/composables/useCalendar.js.map +1 -0
  41. package/dist/composables/useCheckboxGroup.js +64 -0
  42. package/dist/composables/useCheckboxGroup.js.map +1 -0
  43. package/dist/composables/useColorPicker.js +68 -0
  44. package/dist/composables/useColorPicker.js.map +1 -0
  45. package/dist/composables/useDisclosure.js +43 -0
  46. package/dist/composables/useDisclosure.js.map +1 -0
  47. package/dist/composables/useListBox.js +61 -0
  48. package/dist/composables/useListBox.js.map +1 -0
  49. package/dist/composables/useOTP.js +29 -0
  50. package/dist/composables/useOTP.js.map +1 -0
  51. package/dist/composables/usePagination.js +54 -0
  52. package/dist/composables/usePagination.js.map +1 -0
  53. package/dist/composables/useRadioGroup.js +38 -0
  54. package/dist/composables/useRadioGroup.js.map +1 -0
  55. package/dist/composables/useRangeCalendar.js +51 -0
  56. package/dist/composables/useRangeCalendar.js.map +1 -0
  57. package/dist/composables/useSlider.js +46 -0
  58. package/dist/composables/useSlider.js.map +1 -0
  59. package/dist/composables/useSplitter.js +39 -0
  60. package/dist/composables/useSplitter.js.map +1 -0
  61. package/dist/composables/useStepper.js +58 -0
  62. package/dist/composables/useStepper.js.map +1 -0
  63. package/dist/composables/useSwatchPicker.js +31 -0
  64. package/dist/composables/useSwatchPicker.js.map +1 -0
  65. package/dist/composables/useTabs.js +34 -0
  66. package/dist/composables/useTabs.js.map +1 -0
  67. package/dist/composables/useTree.js +88 -0
  68. package/dist/composables/useTree.js.map +1 -0
  69. package/dist/index.d.ts +939 -217
  70. package/dist/index.js +17 -1
  71. package/dist/packages/styles/{src → dist}/components/alert-dialog/alert-dialog.styles.js +1 -1
  72. package/dist/packages/styles/dist/components/alert-dialog/alert-dialog.styles.js.map +1 -0
  73. package/dist/packages/styles/{src → dist}/components/drawer/drawer.styles.js +1 -1
  74. package/dist/packages/styles/dist/components/drawer/drawer.styles.js.map +1 -0
  75. package/dist/packages/styles/{src → dist}/components/modal/modal.styles.js +1 -1
  76. package/dist/packages/styles/dist/components/modal/modal.styles.js.map +1 -0
  77. package/dist/packages/styles/{src → dist}/components/popover/popover.styles.js +1 -1
  78. package/dist/packages/styles/dist/components/popover/popover.styles.js.map +1 -0
  79. package/dist/packages/styles/{src → dist}/components/tooltip/tooltip.styles.js +1 -1
  80. package/dist/packages/styles/dist/components/tooltip/tooltip.styles.js.map +1 -0
  81. package/package.json +5 -4
  82. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -172
  83. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +0 -1
  84. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -116
  85. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +0 -1
  86. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/conversion.js +0 -142
  87. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/conversion.js.map +0 -1
  88. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/manipulation.js +0 -264
  89. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/manipulation.js.map +0 -1
  90. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/queries.js +0 -33
  91. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/queries.js.map +0 -1
  92. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/string.js +0 -32
  93. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/string.js.map +0 -1
  94. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/utils.js +0 -8
  95. package/dist/node_modules/.pnpm/@internationalized_date@3.12.1/node_modules/@internationalized/date/dist/private/utils.js.map +0 -1
  96. package/dist/packages/styles/src/components/alert-dialog/alert-dialog.styles.js.map +0 -1
  97. package/dist/packages/styles/src/components/drawer/drawer.styles.js.map +0 -1
  98. package/dist/packages/styles/src/components/modal/modal.styles.js.map +0 -1
  99. package/dist/packages/styles/src/components/popover/popover.styles.js.map +0 -1
  100. package/dist/packages/styles/src/components/tooltip/tooltip.styles.js.map +0 -1
@@ -5,6 +5,7 @@ let tailwind_variants = require("tailwind-variants");
5
5
  let tailwind_merge = require("tailwind-merge");
6
6
  let _auronui_styles = require("@auronui/styles");
7
7
  let reka_ui = require("reka-ui");
8
+ let _internationalized_date = require("@internationalized/date");
8
9
  //#region src/composables/useIsMounted.ts
9
10
  /**
10
11
  * Returns a reactive boolean ref that is `false` during SSR and before mount,
@@ -249,6 +250,635 @@ function useListData(options) {
249
250
  };
250
251
  }
251
252
  //#endregion
253
+ //#region src/composables/useDisclosure.ts
254
+ /**
255
+ * Manages programmatic open/close state for overlay components.
256
+ *
257
+ * Wire the returned refs and handlers directly into the component:
258
+ *
259
+ * @example
260
+ * ```ts
261
+ * const modal = useDisclosure()
262
+ * await saveData()
263
+ * modal.open()
264
+ * ```
265
+ * ```html
266
+ * <Modal :open="modal.isOpen" @update:open="modal.onOpenChange">...</Modal>
267
+ * ```
268
+ */
269
+ function useDisclosure(defaultOpen = false) {
270
+ const _isOpen = (0, vue.ref)(defaultOpen);
271
+ function open() {
272
+ _isOpen.value = true;
273
+ }
274
+ function close() {
275
+ _isOpen.value = false;
276
+ }
277
+ function toggle() {
278
+ _isOpen.value = !_isOpen.value;
279
+ }
280
+ function onOpenChange(value) {
281
+ _isOpen.value = value;
282
+ }
283
+ return {
284
+ isOpen: (0, vue.readonly)(_isOpen),
285
+ open,
286
+ close,
287
+ toggle,
288
+ onOpenChange
289
+ };
290
+ }
291
+ //#endregion
292
+ //#region src/composables/usePagination.ts
293
+ /**
294
+ * Manages pagination state for the Pagination component.
295
+ *
296
+ * @example
297
+ * ```ts
298
+ * const pagination = usePagination({ totalItems: 200, pageSize: 20 })
299
+ * ```
300
+ * ```html
301
+ * <Pagination
302
+ * :page="pagination.page"
303
+ * :total-items="pagination.totalItems"
304
+ * :items-per-page="pagination.pageSize"
305
+ * @update:page="pagination.onPageChange"
306
+ * />
307
+ * ```
308
+ */
309
+ function usePagination(options = {}) {
310
+ const page = (0, vue.ref)(options.defaultPage ?? 1);
311
+ const pageSize = (0, vue.ref)(options.pageSize ?? 10);
312
+ const totalItems = (0, vue.ref)(options.totalItems ?? 0);
313
+ const totalPages = (0, vue.computed)(() => Math.max(1, Math.ceil(totalItems.value / pageSize.value)));
314
+ const isFirst = (0, vue.computed)(() => page.value <= 1);
315
+ const isLast = (0, vue.computed)(() => page.value >= totalPages.value);
316
+ function goToPage(p) {
317
+ page.value = Math.max(1, Math.min(p, totalPages.value));
318
+ }
319
+ function nextPage() {
320
+ if (!isLast.value) goToPage(page.value + 1);
321
+ }
322
+ function prevPage() {
323
+ if (!isFirst.value) goToPage(page.value - 1);
324
+ }
325
+ function onPageChange(p) {
326
+ goToPage(p);
327
+ }
328
+ return {
329
+ page,
330
+ pageSize,
331
+ totalItems,
332
+ totalPages,
333
+ isFirst,
334
+ isLast,
335
+ goToPage,
336
+ nextPage,
337
+ prevPage,
338
+ onPageChange
339
+ };
340
+ }
341
+ //#endregion
342
+ //#region src/composables/useStepper.ts
343
+ /**
344
+ * Manages step navigation state for the Stepper component.
345
+ *
346
+ * @example
347
+ * ```ts
348
+ * const stepper = useStepper({ totalSteps: 4 })
349
+ * ```
350
+ * ```html
351
+ * <Stepper :model-value="stepper.step" :total-steps="stepper.totalSteps" @update:model-value="stepper.onStepChange">
352
+ * ...
353
+ * </Stepper>
354
+ * ```
355
+ */
356
+ function useStepper(options = {}) {
357
+ const step = (0, vue.ref)(options.defaultStep ?? 1);
358
+ const totalSteps = (0, vue.computed)(() => options.steps ? options.steps.length : options.totalSteps ?? 0);
359
+ const isFirst = (0, vue.computed)(() => step.value <= 1);
360
+ const isLast = (0, vue.computed)(() => totalSteps.value > 0 && step.value >= totalSteps.value);
361
+ function goToStep(n) {
362
+ const max = totalSteps.value || Infinity;
363
+ step.value = Math.max(1, Math.min(n, max));
364
+ }
365
+ function nextStep() {
366
+ if (!isLast.value) goToStep(step.value + 1);
367
+ }
368
+ function prevStep() {
369
+ if (!isFirst.value) goToStep(step.value - 1);
370
+ }
371
+ function reset() {
372
+ goToStep(1);
373
+ }
374
+ function getStepStatus(n) {
375
+ if (n < step.value) return "completed";
376
+ if (n === step.value) return "current";
377
+ return "pending";
378
+ }
379
+ function onStepChange(n) {
380
+ goToStep(n);
381
+ }
382
+ return {
383
+ step,
384
+ totalSteps,
385
+ isFirst,
386
+ isLast,
387
+ goToStep,
388
+ nextStep,
389
+ prevStep,
390
+ reset,
391
+ getStepStatus,
392
+ onStepChange
393
+ };
394
+ }
395
+ //#endregion
396
+ //#region src/composables/useTabs.ts
397
+ /**
398
+ * Manages active tab state for the Tabs component.
399
+ *
400
+ * @example
401
+ * ```ts
402
+ * const tabs = useTabs({ defaultTab: 'overview' })
403
+ * ```
404
+ * ```html
405
+ * <Tabs :model-value="tabs.activeTab" @update:model-value="tabs.onTabChange">
406
+ * <Tab value="overview">Overview</Tab>
407
+ * <Tab value="settings">Settings</Tab>
408
+ * </Tabs>
409
+ * ```
410
+ */
411
+ function useTabs(options = {}) {
412
+ const activeTab = (0, vue.ref)(options.defaultTab);
413
+ function setTab(value) {
414
+ activeTab.value = value;
415
+ }
416
+ function onTabChange(value) {
417
+ activeTab.value = value;
418
+ }
419
+ return {
420
+ activeTab,
421
+ setTab,
422
+ onTabChange
423
+ };
424
+ }
425
+ //#endregion
426
+ //#region src/composables/useAccordion.ts
427
+ /**
428
+ * Manages expanded item state for the Accordion component.
429
+ *
430
+ * @example
431
+ * ```ts
432
+ * const accordion = useAccordion({ type: 'single', collapsible: true })
433
+ * ```
434
+ * ```html
435
+ * <Accordion :type="'single'" :model-value="accordion.expanded" @update:model-value="accordion.onValueChange">
436
+ * ...
437
+ * </Accordion>
438
+ * ```
439
+ */
440
+ function useAccordion(options = {}) {
441
+ const type = options.type ?? "single";
442
+ const collapsible = options.collapsible ?? false;
443
+ const expanded = (0, vue.ref)(options.defaultExpanded ?? (type === "multiple" ? [] : void 0));
444
+ function isExpanded(key) {
445
+ if (type === "multiple") return expanded.value.includes(key);
446
+ return expanded.value === key;
447
+ }
448
+ function expand(key) {
449
+ if (type === "multiple") {
450
+ const current = expanded.value;
451
+ if (!current.includes(key)) expanded.value = [...current, key];
452
+ } else expanded.value = key;
453
+ }
454
+ function collapse(key) {
455
+ if (type === "multiple") expanded.value = expanded.value.filter((k) => k !== key);
456
+ else if (collapsible && expanded.value === key) expanded.value = void 0;
457
+ }
458
+ function toggle(key) {
459
+ if (isExpanded(key)) collapse(key);
460
+ else expand(key);
461
+ }
462
+ function collapseAll() {
463
+ if (type === "multiple") expanded.value = [];
464
+ else if (collapsible) expanded.value = void 0;
465
+ }
466
+ function onValueChange(value) {
467
+ expanded.value = value;
468
+ }
469
+ return {
470
+ expanded,
471
+ isExpanded,
472
+ expand,
473
+ collapse,
474
+ toggle,
475
+ collapseAll,
476
+ onValueChange
477
+ };
478
+ }
479
+ //#endregion
480
+ //#region src/composables/useSlider.ts
481
+ /**
482
+ * Manages value state for the Slider component.
483
+ *
484
+ * @example
485
+ * ```ts
486
+ * // Single thumb
487
+ * const slider = useSlider({ defaultValue: 40, min: 0, max: 100 })
488
+ *
489
+ * // Range (two thumbs)
490
+ * const range = useSlider({ defaultValue: [20, 80], min: 0, max: 100 })
491
+ * ```
492
+ * ```html
493
+ * <Slider :model-value="slider.value" :min="slider.min" :max="slider.max" @update:model-value="slider.onValueChange" />
494
+ * ```
495
+ */
496
+ function useSlider(options = {}) {
497
+ const min = options.min ?? 0;
498
+ const max = options.max ?? 100;
499
+ const step = options.step ?? 1;
500
+ const value = (0, vue.ref)(options.defaultValue ?? min);
501
+ function clamp(v) {
502
+ if (Array.isArray(v)) return v.map((n) => Math.min(Math.max(n, min), max));
503
+ return Math.min(Math.max(v, min), max);
504
+ }
505
+ function setValue(v) {
506
+ value.value = v;
507
+ }
508
+ function onValueChange(v) {
509
+ value.value = v;
510
+ }
511
+ return {
512
+ value,
513
+ min,
514
+ max,
515
+ step,
516
+ setValue,
517
+ clamp,
518
+ onValueChange
519
+ };
520
+ }
521
+ //#endregion
522
+ //#region src/composables/useListBox.ts
523
+ /**
524
+ * Manages selection state for the ListBox component.
525
+ *
526
+ * @example
527
+ * ```ts
528
+ * const listBox = useListBox({ multiple: true, defaultSelected: ['apple'] })
529
+ * ```
530
+ * ```html
531
+ * <ListBox :model-value="listBox.selected" @update:model-value="listBox.onSelectionChange">
532
+ * <ListBoxItem value="apple">Apple</ListBoxItem>
533
+ * <ListBoxItem value="banana">Banana</ListBoxItem>
534
+ * </ListBox>
535
+ * ```
536
+ */
537
+ function useListBox(options = {}) {
538
+ const multiple = options.multiple ?? false;
539
+ const selected = (0, vue.ref)(options.defaultSelected ?? (multiple ? [] : void 0));
540
+ function isSelected(key) {
541
+ if (Array.isArray(selected.value)) return selected.value.includes(key);
542
+ return selected.value === key;
543
+ }
544
+ function select(key) {
545
+ if (multiple) {
546
+ const current = selected.value ?? [];
547
+ if (!current.includes(key)) selected.value = [...current, key];
548
+ } else selected.value = key;
549
+ }
550
+ function deselect(key) {
551
+ if (multiple) selected.value = (selected.value ?? []).filter((k) => k !== key);
552
+ else if (selected.value === key) selected.value = void 0;
553
+ }
554
+ function toggle(key) {
555
+ if (isSelected(key)) deselect(key);
556
+ else select(key);
557
+ }
558
+ function selectAll(keys) {
559
+ if (multiple) selected.value = [...new Set(keys)];
560
+ }
561
+ function deselectAll() {
562
+ selected.value = multiple ? [] : void 0;
563
+ }
564
+ function onSelectionChange(value) {
565
+ selected.value = value;
566
+ }
567
+ return {
568
+ selected,
569
+ isSelected,
570
+ select,
571
+ deselect,
572
+ toggle,
573
+ selectAll,
574
+ deselectAll,
575
+ onSelectionChange
576
+ };
577
+ }
578
+ //#endregion
579
+ //#region src/composables/useCheckboxGroup.ts
580
+ /**
581
+ * Manages checked state for a CheckboxGroup.
582
+ *
583
+ * @example
584
+ * ```ts
585
+ * const group = useCheckboxGroup({
586
+ * options: ['apple', 'banana', 'cherry'],
587
+ * defaultValues: ['apple'],
588
+ * })
589
+ * ```
590
+ * ```html
591
+ * <CheckboxGroup :model-value="group.values" @update:model-value="group.onValueChange">
592
+ * <Checkbox value="apple">Apple</Checkbox>
593
+ * <Checkbox value="banana">Banana</Checkbox>
594
+ * <Checkbox value="cherry">Cherry</Checkbox>
595
+ * </CheckboxGroup>
596
+ * ```
597
+ */
598
+ function useCheckboxGroup(options = {}) {
599
+ const values = (0, vue.ref)(options.defaultValues ? [...options.defaultValues] : []);
600
+ function isChecked(value) {
601
+ return values.value.includes(value);
602
+ }
603
+ function toggle(value) {
604
+ if (isChecked(value)) values.value = values.value.filter((v) => v !== value);
605
+ else values.value = [...values.value, value];
606
+ }
607
+ function checkAll(keys) {
608
+ values.value = [...new Set([...values.value, ...keys])];
609
+ }
610
+ function uncheckAll() {
611
+ values.value = [];
612
+ }
613
+ function setValues(next) {
614
+ values.value = [...next];
615
+ }
616
+ function onValueChange(next) {
617
+ values.value = [...next];
618
+ }
619
+ return {
620
+ values,
621
+ isChecked,
622
+ toggle,
623
+ checkAll,
624
+ uncheckAll,
625
+ setValues,
626
+ isIndeterminate: (0, vue.computed)(() => {
627
+ if (!options.options || options.options.length === 0) return false;
628
+ const count = values.value.filter((v) => options.options.includes(v)).length;
629
+ return count > 0 && count < options.options.length;
630
+ }),
631
+ isAllChecked: (0, vue.computed)(() => {
632
+ if (!options.options || options.options.length === 0) return false;
633
+ return options.options.every((k) => values.value.includes(k));
634
+ }),
635
+ onValueChange
636
+ };
637
+ }
638
+ //#endregion
639
+ //#region src/composables/useRadioGroup.ts
640
+ /**
641
+ * Manages selection state for the RadioGroup component.
642
+ *
643
+ * @example
644
+ * ```ts
645
+ * const radio = useRadioGroup({ defaultValue: 'option-a' })
646
+ * ```
647
+ * ```html
648
+ * <RadioGroup :model-value="radio.value" @update:model-value="radio.onValueChange">
649
+ * <Radio value="option-a">Option A</Radio>
650
+ * <Radio value="option-b">Option B</Radio>
651
+ * </RadioGroup>
652
+ * ```
653
+ */
654
+ function useRadioGroup(options = {}) {
655
+ const value = (0, vue.ref)(options.defaultValue);
656
+ function setValue(v) {
657
+ value.value = v;
658
+ }
659
+ function clear() {
660
+ value.value = void 0;
661
+ }
662
+ function onValueChange(v) {
663
+ value.value = v;
664
+ }
665
+ return {
666
+ value,
667
+ setValue,
668
+ clear,
669
+ onValueChange
670
+ };
671
+ }
672
+ //#endregion
673
+ //#region src/composables/useCalendar.ts
674
+ /**
675
+ * Manages selected date state for the Calendar component.
676
+ *
677
+ * @example
678
+ * ```ts
679
+ * const calendar = useCalendar()
680
+ * ```
681
+ * ```html
682
+ * <Calendar v-model="calendar.value" />
683
+ * ```
684
+ */
685
+ function useCalendar(options = {}) {
686
+ const value = (0, vue.shallowRef)(options.defaultValue);
687
+ const hasValue = (0, vue.computed)(() => value.value !== void 0);
688
+ function setValue(date) {
689
+ value.value = date;
690
+ }
691
+ function clear() {
692
+ value.value = void 0;
693
+ }
694
+ function isDisabled(date) {
695
+ if (options.minValue && date.compare(options.minValue) < 0) return true;
696
+ if (options.maxValue && date.compare(options.maxValue) > 0) return true;
697
+ return options.isDateDisabled?.(date) ?? false;
698
+ }
699
+ function isUnavailable(date) {
700
+ return options.isDateUnavailable?.(date) ?? false;
701
+ }
702
+ function onValueChange(date) {
703
+ value.value = date;
704
+ }
705
+ return {
706
+ value,
707
+ hasValue,
708
+ setValue,
709
+ clear,
710
+ isDisabled,
711
+ isUnavailable,
712
+ onValueChange
713
+ };
714
+ }
715
+ //#endregion
716
+ //#region src/composables/useRangeCalendar.ts
717
+ /**
718
+ * Manages selected date range state for the RangeCalendar component.
719
+ *
720
+ * @example
721
+ * ```ts
722
+ * const range = useRangeCalendar()
723
+ * ```
724
+ * ```html
725
+ * <RangeCalendar v-model="range.value" />
726
+ * ```
727
+ */
728
+ function useRangeCalendar(options = {}) {
729
+ const value = (0, vue.shallowRef)(options.defaultValue ?? null);
730
+ const start = (0, vue.computed)(() => value.value?.start ?? null);
731
+ const end = (0, vue.computed)(() => value.value?.end ?? null);
732
+ const isComplete = (0, vue.computed)(() => value.value !== null && !!value.value?.start && !!value.value?.end);
733
+ function setRange(range) {
734
+ value.value = range;
735
+ }
736
+ function clearRange() {
737
+ value.value = null;
738
+ }
739
+ function isDisabled(date) {
740
+ if (options.minValue && date.compare(options.minValue) < 0) return true;
741
+ if (options.maxValue && date.compare(options.maxValue) > 0) return true;
742
+ return options.isDateDisabled?.(date) ?? false;
743
+ }
744
+ function isUnavailable(date) {
745
+ return options.isDateUnavailable?.(date) ?? false;
746
+ }
747
+ function onValueChange(range) {
748
+ value.value = range;
749
+ }
750
+ return {
751
+ value,
752
+ start,
753
+ end,
754
+ isComplete,
755
+ setRange,
756
+ clearRange,
757
+ isDisabled,
758
+ isUnavailable,
759
+ onValueChange
760
+ };
761
+ }
762
+ //#endregion
763
+ //#region src/composables/useTree.ts
764
+ /**
765
+ * Manages selection and expansion state for the Tree component.
766
+ *
767
+ * @example
768
+ * ```ts
769
+ * const tree = useTree({ multiple: false, defaultExpanded: ['root'] })
770
+ * ```
771
+ * ```html
772
+ * <Tree
773
+ * :model-value="tree.selected"
774
+ * :expanded="tree.expanded"
775
+ * @update:model-value="tree.onSelectionChange"
776
+ * @update:expanded="tree.onExpandedChange"
777
+ * >
778
+ * ...
779
+ * </Tree>
780
+ * ```
781
+ */
782
+ function useTree(options = {}) {
783
+ const multiple = options.multiple ?? false;
784
+ const selected = (0, vue.ref)(options.defaultSelected ?? (multiple ? [] : void 0));
785
+ const expanded = (0, vue.ref)(options.defaultExpanded ? [...options.defaultExpanded] : []);
786
+ function isSelected(key) {
787
+ if (Array.isArray(selected.value)) return selected.value.includes(key);
788
+ return selected.value === key;
789
+ }
790
+ function select(key) {
791
+ if (multiple) {
792
+ const current = selected.value ?? [];
793
+ if (!current.includes(key)) selected.value = [...current, key];
794
+ } else selected.value = key;
795
+ }
796
+ function deselect(key) {
797
+ if (multiple) selected.value = (selected.value ?? []).filter((k) => k !== key);
798
+ else if (selected.value === key) selected.value = void 0;
799
+ }
800
+ function toggle(key) {
801
+ if (isSelected(key)) deselect(key);
802
+ else select(key);
803
+ }
804
+ function isExpanded(key) {
805
+ return expanded.value.includes(key);
806
+ }
807
+ function expand(key) {
808
+ if (!isExpanded(key)) expanded.value = [...expanded.value, key];
809
+ }
810
+ function collapse(key) {
811
+ expanded.value = expanded.value.filter((k) => k !== key);
812
+ }
813
+ function toggleExpand(key) {
814
+ if (isExpanded(key)) collapse(key);
815
+ else expand(key);
816
+ }
817
+ function expandAll(keys) {
818
+ expanded.value = [...new Set([...expanded.value, ...keys])];
819
+ }
820
+ function collapseAll() {
821
+ expanded.value = [];
822
+ }
823
+ function onSelectionChange(value) {
824
+ selected.value = value;
825
+ }
826
+ function onExpandedChange(keys) {
827
+ expanded.value = keys;
828
+ }
829
+ return {
830
+ selected,
831
+ expanded,
832
+ isSelected,
833
+ select,
834
+ deselect,
835
+ toggle,
836
+ isExpanded,
837
+ expand,
838
+ collapse,
839
+ toggleExpand,
840
+ expandAll,
841
+ collapseAll,
842
+ onSelectionChange,
843
+ onExpandedChange
844
+ };
845
+ }
846
+ //#endregion
847
+ //#region src/composables/useSplitter.ts
848
+ /**
849
+ * Tracks panel layout state for the SplitterGroup component.
850
+ *
851
+ * @example
852
+ * ```ts
853
+ * const splitter = useSplitter({ defaultSizes: [30, 70] })
854
+ * ```
855
+ * ```html
856
+ * <SplitterGroup @layout="splitter.onLayout">
857
+ * <SplitterPanel :default-size="splitter.sizes[0] ?? 30" />
858
+ * <SplitterResizeHandle />
859
+ * <SplitterPanel :default-size="splitter.sizes[1] ?? 70" />
860
+ * </SplitterGroup>
861
+ * ```
862
+ */
863
+ function useSplitter(options = {}) {
864
+ const sizes = (0, vue.ref)(options.defaultSizes ? [...options.defaultSizes] : []);
865
+ function setSizes(next) {
866
+ sizes.value = [...next];
867
+ }
868
+ function resetSizes() {
869
+ sizes.value = options.defaultSizes ? [...options.defaultSizes] : [];
870
+ }
871
+ function onLayout(next) {
872
+ sizes.value = next;
873
+ }
874
+ return {
875
+ sizes,
876
+ setSizes,
877
+ resetSizes,
878
+ onLayout
879
+ };
880
+ }
881
+ //#endregion
252
882
  //#region src/utils/composeClassName.ts
253
883
  /**
254
884
  * Merges Tailwind CSS classes, resolving conflicts via tailwind-merge.
@@ -3636,7 +4266,7 @@ var PopoverTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
3636
4266
  }
3637
4267
  });
3638
4268
  //#endregion
3639
- //#region ../styles/src/components/popover/popover.styles.ts
4269
+ //#region ../styles/dist/components/popover/popover.styles.js
3640
4270
  var popoverVariants = (0, tailwind_variants.tv)({ slots: {
3641
4271
  base: "popover",
3642
4272
  dialog: "popover__dialog",
@@ -3947,7 +4577,7 @@ var TooltipTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
3947
4577
  }
3948
4578
  });
3949
4579
  //#endregion
3950
- //#region ../styles/src/components/tooltip/tooltip.styles.ts
4580
+ //#region ../styles/dist/components/tooltip/tooltip.styles.js
3951
4581
  var tooltipVariants = (0, tailwind_variants.tv)({ slots: {
3952
4582
  base: "tooltip",
3953
4583
  trigger: "tooltip__trigger"
@@ -13005,7 +13635,7 @@ var AnimatePresence_default = /* @__PURE__ */ (0, vue.defineComponent)({
13005
13635
  }
13006
13636
  });
13007
13637
  //#endregion
13008
- //#region ../styles/src/components/modal/modal.styles.ts
13638
+ //#region ../styles/dist/components/modal/modal.styles.js
13009
13639
  var modalVariants = (0, tailwind_variants.tv)({
13010
13640
  defaultVariants: {
13011
13641
  scroll: "inside",
@@ -13442,7 +14072,7 @@ var AlertDialogTrigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
13442
14072
  }
13443
14073
  });
13444
14074
  //#endregion
13445
- //#region ../styles/src/components/alert-dialog/alert-dialog.styles.ts
14075
+ //#region ../styles/dist/components/alert-dialog/alert-dialog.styles.js
13446
14076
  var alertDialogVariants = (0, tailwind_variants.tv)({
13447
14077
  defaultVariants: {
13448
14078
  size: "md",
@@ -14032,7 +14662,7 @@ var AlertDialogCancel_default = /* @__PURE__ */ (0, vue.defineComponent)({
14032
14662
  }
14033
14663
  });
14034
14664
  //#endregion
14035
- //#region ../styles/src/components/drawer/drawer.styles.ts
14665
+ //#region ../styles/dist/components/drawer/drawer.styles.js
14036
14666
  var drawerVariants = (0, tailwind_variants.tv)({
14037
14667
  defaultVariants: {
14038
14668
  placement: "bottom",
@@ -26619,735 +27249,6 @@ var ScrollShadow_default = /* @__PURE__ */ (0, vue.defineComponent)({
26619
27249
  }
26620
27250
  });
26621
27251
  //#endregion
26622
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/utils.mjs
26623
- function $09ec6a572d60460f$export$842a2cf37af977e1(amount, numerator) {
26624
- return amount - numerator * Math.floor(amount / numerator);
26625
- }
26626
- //#endregion
26627
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.mjs
26628
- var $93635573935797de$var$EPOCH = 1721426;
26629
- function $93635573935797de$export$f297eb839006d339(era, year, month, day) {
26630
- year = $93635573935797de$export$c36e0ecb2d4fa69d(era, year);
26631
- let y1 = year - 1;
26632
- let monthOffset = -2;
26633
- if (month <= 2) monthOffset = 0;
26634
- else if ($93635573935797de$export$553d7fa8e3805fc0(year)) monthOffset = -1;
26635
- return $93635573935797de$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);
26636
- }
26637
- function $93635573935797de$export$553d7fa8e3805fc0(year) {
26638
- return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
26639
- }
26640
- function $93635573935797de$export$c36e0ecb2d4fa69d(era, year) {
26641
- return era === "BC" ? 1 - year : year;
26642
- }
26643
- function $93635573935797de$export$4475b7e617eb123c(year) {
26644
- let era = "AD";
26645
- if (year <= 0) {
26646
- era = "BC";
26647
- year = 1 - year;
26648
- }
26649
- return [era, year];
26650
- }
26651
- var $93635573935797de$var$daysInMonth = {
26652
- standard: [
26653
- 31,
26654
- 28,
26655
- 31,
26656
- 30,
26657
- 31,
26658
- 30,
26659
- 31,
26660
- 31,
26661
- 30,
26662
- 31,
26663
- 30,
26664
- 31
26665
- ],
26666
- leapyear: [
26667
- 31,
26668
- 29,
26669
- 31,
26670
- 30,
26671
- 31,
26672
- 30,
26673
- 31,
26674
- 31,
26675
- 30,
26676
- 31,
26677
- 30,
26678
- 31
26679
- ]
26680
- };
26681
- var $93635573935797de$export$80ee6245ec4f29ec = class {
26682
- fromJulianDay(jd) {
26683
- let jd0 = jd;
26684
- let depoch = jd0 - $93635573935797de$var$EPOCH;
26685
- let quadricent = Math.floor(depoch / 146097);
26686
- let dqc = $09ec6a572d60460f$export$842a2cf37af977e1(depoch, 146097);
26687
- let cent = Math.floor(dqc / 36524);
26688
- let dcent = $09ec6a572d60460f$export$842a2cf37af977e1(dqc, 36524);
26689
- let quad = Math.floor(dcent / 1461);
26690
- let dquad = $09ec6a572d60460f$export$842a2cf37af977e1(dcent, 1461);
26691
- let yindex = Math.floor(dquad / 365);
26692
- let [era, year] = $93635573935797de$export$4475b7e617eb123c(quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0));
26693
- let yearDay = jd0 - $93635573935797de$export$f297eb839006d339(era, year, 1, 1);
26694
- let leapAdj = 2;
26695
- if (jd0 < $93635573935797de$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;
26696
- else if ($93635573935797de$export$553d7fa8e3805fc0(year)) leapAdj = 1;
26697
- let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);
26698
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(era, year, month, jd0 - $93635573935797de$export$f297eb839006d339(era, year, month, 1) + 1);
26699
- }
26700
- toJulianDay(date) {
26701
- return $93635573935797de$export$f297eb839006d339(date.era, date.year, date.month, date.day);
26702
- }
26703
- getDaysInMonth(date) {
26704
- return $93635573935797de$var$daysInMonth[$93635573935797de$export$553d7fa8e3805fc0(date.year) ? "leapyear" : "standard"][date.month - 1];
26705
- }
26706
- getMonthsInYear(date) {
26707
- return 12;
26708
- }
26709
- getDaysInYear(date) {
26710
- return $93635573935797de$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
26711
- }
26712
- getMaximumMonthsInYear() {
26713
- return 12;
26714
- }
26715
- getMaximumDaysInMonth() {
26716
- return 31;
26717
- }
26718
- getYearsInEra(date) {
26719
- return 9999;
26720
- }
26721
- getEras() {
26722
- return ["BC", "AD"];
26723
- }
26724
- isInverseEra(date) {
26725
- return date.era === "BC";
26726
- }
26727
- balanceDate(date) {
26728
- if (date.year <= 0) {
26729
- date.era = date.era === "BC" ? "AD" : "BC";
26730
- date.year = 1 - date.year;
26731
- }
26732
- }
26733
- constructor() {
26734
- this.identifier = "gregory";
26735
- }
26736
- };
26737
- //#endregion
26738
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/queries.mjs
26739
- function $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {
26740
- return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;
26741
- }
26742
- function $ad063034c8620db8$export$461939dd4422153(timeZone) {
26743
- return $d07e34cce18680fd$export$1b96692a1ba042ac(Date.now(), timeZone);
26744
- }
26745
- function $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {
26746
- return $d07e34cce18680fd$export$93522d1a439f3617($ad063034c8620db8$export$461939dd4422153(timeZone));
26747
- }
26748
- function $ad063034c8620db8$export$68781ddf31c0090f(a, b) {
26749
- return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
26750
- }
26751
- function $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {
26752
- return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);
26753
- }
26754
- function $ad063034c8620db8$var$timeToMs(a) {
26755
- return a.hour * 36e5 + a.minute * 6e4 + a.second * 1e3 + a.millisecond;
26756
- }
26757
- var $ad063034c8620db8$var$localTimeZone = null;
26758
- var $ad063034c8620db8$var$localTimeZoneOverride = false;
26759
- function $ad063034c8620db8$export$aa8b41735afcabd2() {
26760
- if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
26761
- return $ad063034c8620db8$var$localTimeZone;
26762
- }
26763
- function $ad063034c8620db8$export$6ab69b273755230b() {
26764
- return $ad063034c8620db8$var$localTimeZoneOverride;
26765
- }
26766
- //#endregion
26767
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/conversion.mjs
26768
- function $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) {
26769
- date = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
26770
- return $d07e34cce18680fd$var$epochFromParts($93635573935797de$export$c36e0ecb2d4fa69d(date.era, date.year), date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
26771
- }
26772
- function $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
26773
- let date = /* @__PURE__ */ new Date();
26774
- date.setUTCHours(hour, minute, second, millisecond);
26775
- date.setUTCFullYear(year, month - 1, day);
26776
- return date.getTime();
26777
- }
26778
- function $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone) {
26779
- if (timeZone === "UTC") return 0;
26780
- if (ms > 0 && timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && !$ad063034c8620db8$export$6ab69b273755230b()) return new Date(ms).getTimezoneOffset() * -6e4;
26781
- let { year, month, day, hour, minute, second } = $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone);
26782
- return $d07e34cce18680fd$var$epochFromParts(year, month, day, hour, minute, second, 0) - Math.floor(ms / 1e3) * 1e3;
26783
- }
26784
- var $d07e34cce18680fd$var$formattersByTimeZone = /* @__PURE__ */ new Map();
26785
- function $d07e34cce18680fd$var$getTimeZoneParts(ms, timeZone) {
26786
- let formatter = $d07e34cce18680fd$var$formattersByTimeZone.get(timeZone);
26787
- if (!formatter) {
26788
- formatter = new Intl.DateTimeFormat("en-US", {
26789
- timeZone,
26790
- hour12: false,
26791
- era: "short",
26792
- year: "numeric",
26793
- month: "numeric",
26794
- day: "numeric",
26795
- hour: "numeric",
26796
- minute: "numeric",
26797
- second: "numeric"
26798
- });
26799
- $d07e34cce18680fd$var$formattersByTimeZone.set(timeZone, formatter);
26800
- }
26801
- let parts = formatter.formatToParts(new Date(ms));
26802
- let namedParts = {};
26803
- for (let part of parts) if (part.type !== "literal") namedParts[part.type] = part.value;
26804
- return {
26805
- year: namedParts.era === "BC" || namedParts.era === "B" ? -namedParts.year + 1 : +namedParts.year,
26806
- month: +namedParts.month,
26807
- day: +namedParts.day,
26808
- hour: namedParts.hour === "24" ? 0 : +namedParts.hour,
26809
- minute: +namedParts.minute,
26810
- second: +namedParts.second
26811
- };
26812
- }
26813
- var $d07e34cce18680fd$var$DAYMILLIS = 864e5;
26814
- function $d07e34cce18680fd$var$getValidWallTimes(date, timeZone, earlier, later) {
26815
- return (earlier === later ? [earlier] : [earlier, later]).filter((absolute) => $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute));
26816
- }
26817
- function $d07e34cce18680fd$var$isValidWallTime(date, timeZone, absolute) {
26818
- let parts = $d07e34cce18680fd$var$getTimeZoneParts(absolute, timeZone);
26819
- return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
26820
- }
26821
- function $d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation = "compatible") {
26822
- let dateTime = $d07e34cce18680fd$export$b21e0b124e224484(date);
26823
- if (timeZone === "UTC") return $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
26824
- if (timeZone === $ad063034c8620db8$export$aa8b41735afcabd2() && disambiguation === "compatible" && !$ad063034c8620db8$export$6ab69b273755230b()) {
26825
- dateTime = $d07e34cce18680fd$export$b4a036af3fc0b032(dateTime, new $93635573935797de$export$80ee6245ec4f29ec());
26826
- let date = /* @__PURE__ */ new Date();
26827
- let year = $93635573935797de$export$c36e0ecb2d4fa69d(dateTime.era, dateTime.year);
26828
- date.setFullYear(year, dateTime.month - 1, dateTime.day);
26829
- date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
26830
- return date.getTime();
26831
- }
26832
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime);
26833
- let offsetBefore = $d07e34cce18680fd$export$59c99f3515d3493f(ms - $d07e34cce18680fd$var$DAYMILLIS, timeZone);
26834
- let offsetAfter = $d07e34cce18680fd$export$59c99f3515d3493f(ms + $d07e34cce18680fd$var$DAYMILLIS, timeZone);
26835
- let valid = $d07e34cce18680fd$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
26836
- if (valid.length === 1) return valid[0];
26837
- if (valid.length > 1) switch (disambiguation) {
26838
- case "compatible":
26839
- case "earlier": return valid[0];
26840
- case "later": return valid[valid.length - 1];
26841
- case "reject": throw new RangeError("Multiple possible absolute times found");
26842
- }
26843
- switch (disambiguation) {
26844
- case "earlier": return Math.min(ms - offsetBefore, ms - offsetAfter);
26845
- case "compatible":
26846
- case "later": return Math.max(ms - offsetBefore, ms - offsetAfter);
26847
- case "reject": throw new RangeError("No such absolute time found");
26848
- }
26849
- }
26850
- function $d07e34cce18680fd$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = "compatible") {
26851
- return new Date($d07e34cce18680fd$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
26852
- }
26853
- function $d07e34cce18680fd$export$1b96692a1ba042ac(ms, timeZone) {
26854
- let offset = $d07e34cce18680fd$export$59c99f3515d3493f(ms, timeZone);
26855
- let date = new Date(ms + offset);
26856
- let year = date.getUTCFullYear();
26857
- let month = date.getUTCMonth() + 1;
26858
- let day = date.getUTCDate();
26859
- let hour = date.getUTCHours();
26860
- let minute = date.getUTCMinutes();
26861
- let second = date.getUTCSeconds();
26862
- let millisecond = date.getUTCMilliseconds();
26863
- return new $2aaf608024c21ca1$export$d3b7288e7994edea(year < 1 ? "BC" : "AD", year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
26864
- }
26865
- function $d07e34cce18680fd$export$93522d1a439f3617(dateTime) {
26866
- return new $2aaf608024c21ca1$export$99faa760c7908e4f(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
26867
- }
26868
- function $d07e34cce18680fd$export$b21e0b124e224484(date, time) {
26869
- let hour = 0, minute = 0, second = 0, millisecond = 0;
26870
- if ("timeZone" in date) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = date);
26871
- else if ("hour" in date && !time) return date;
26872
- if (time) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = time);
26873
- return new $2aaf608024c21ca1$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
26874
- }
26875
- function $d07e34cce18680fd$export$b4a036af3fc0b032(date, calendar) {
26876
- if ($ad063034c8620db8$export$dbc69fd56b53d5e(date.calendar, calendar)) return date;
26877
- let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
26878
- let copy = date.copy();
26879
- copy.calendar = calendar;
26880
- copy.era = calendarDate.era;
26881
- copy.year = calendarDate.year;
26882
- copy.month = calendarDate.month;
26883
- copy.day = calendarDate.day;
26884
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(copy);
26885
- return copy;
26886
- }
26887
- function $d07e34cce18680fd$export$84c95a83c799e074(date, timeZone, disambiguation) {
26888
- if (date instanceof $2aaf608024c21ca1$export$d3b7288e7994edea) {
26889
- if (date.timeZone === timeZone) return date;
26890
- return $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone);
26891
- }
26892
- return $d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(date, timeZone, disambiguation), timeZone);
26893
- }
26894
- function $d07e34cce18680fd$export$83aac07b4c37b25(date) {
26895
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset;
26896
- return new Date(ms);
26897
- }
26898
- function $d07e34cce18680fd$export$538b00033cc11c75(date, timeZone) {
26899
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$bd4fb2bc8bb06fb(date) - date.offset, timeZone), date.calendar);
26900
- }
26901
- //#endregion
26902
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/manipulation.mjs
26903
- var $435a2ceaa8778ed8$var$ONE_HOUR = 36e5;
26904
- function $435a2ceaa8778ed8$export$e16d8520af44a096(date, duration) {
26905
- let mutableDate = date.copy();
26906
- let days = "hour" in mutableDate ? $435a2ceaa8778ed8$var$addTimeFields(mutableDate, duration) : 0;
26907
- $435a2ceaa8778ed8$var$addYears(mutableDate, duration.years || 0);
26908
- if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
26909
- mutableDate.month += duration.months || 0;
26910
- $435a2ceaa8778ed8$var$balanceYearMonth(mutableDate);
26911
- $435a2ceaa8778ed8$var$constrainMonthDay(mutableDate);
26912
- mutableDate.day += (duration.weeks || 0) * 7;
26913
- mutableDate.day += duration.days || 0;
26914
- mutableDate.day += days;
26915
- $435a2ceaa8778ed8$var$balanceDay(mutableDate);
26916
- if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
26917
- if (mutableDate.year < 1) {
26918
- mutableDate.year = 1;
26919
- mutableDate.month = 1;
26920
- mutableDate.day = 1;
26921
- }
26922
- let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
26923
- if (mutableDate.year > maxYear) {
26924
- let isInverseEra = mutableDate.calendar.isInverseEra?.(mutableDate);
26925
- mutableDate.year = maxYear;
26926
- mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
26927
- mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
26928
- }
26929
- if (mutableDate.month < 1) {
26930
- mutableDate.month = 1;
26931
- mutableDate.day = 1;
26932
- }
26933
- let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
26934
- if (mutableDate.month > maxMonth) {
26935
- mutableDate.month = maxMonth;
26936
- mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
26937
- }
26938
- mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
26939
- return mutableDate;
26940
- }
26941
- function $435a2ceaa8778ed8$var$addYears(date, years) {
26942
- if (date.calendar.isInverseEra?.(date)) years = -years;
26943
- date.year += years;
26944
- }
26945
- function $435a2ceaa8778ed8$var$balanceYearMonth(date) {
26946
- while (date.month < 1) {
26947
- $435a2ceaa8778ed8$var$addYears(date, -1);
26948
- date.month += date.calendar.getMonthsInYear(date);
26949
- }
26950
- let monthsInYear = 0;
26951
- while (date.month > (monthsInYear = date.calendar.getMonthsInYear(date))) {
26952
- date.month -= monthsInYear;
26953
- $435a2ceaa8778ed8$var$addYears(date, 1);
26954
- }
26955
- }
26956
- function $435a2ceaa8778ed8$var$balanceDay(date) {
26957
- while (date.day < 1) {
26958
- date.month--;
26959
- $435a2ceaa8778ed8$var$balanceYearMonth(date);
26960
- date.day += date.calendar.getDaysInMonth(date);
26961
- }
26962
- while (date.day > date.calendar.getDaysInMonth(date)) {
26963
- date.day -= date.calendar.getDaysInMonth(date);
26964
- date.month++;
26965
- $435a2ceaa8778ed8$var$balanceYearMonth(date);
26966
- }
26967
- }
26968
- function $435a2ceaa8778ed8$var$constrainMonthDay(date) {
26969
- date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
26970
- date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
26971
- }
26972
- function $435a2ceaa8778ed8$export$c4e2ecac49351ef2(date) {
26973
- if (date.calendar.constrainDate) date.calendar.constrainDate(date);
26974
- date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
26975
- $435a2ceaa8778ed8$var$constrainMonthDay(date);
26976
- }
26977
- function $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration) {
26978
- let inverseDuration = {};
26979
- for (let key in duration) if (typeof duration[key] === "number") inverseDuration[key] = -duration[key];
26980
- return inverseDuration;
26981
- }
26982
- function $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(date, duration) {
26983
- return $435a2ceaa8778ed8$export$e16d8520af44a096(date, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
26984
- }
26985
- function $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(date, fields) {
26986
- let mutableDate = date.copy();
26987
- if (fields.era != null) mutableDate.era = fields.era;
26988
- if (fields.year != null) mutableDate.year = fields.year;
26989
- if (fields.month != null) mutableDate.month = fields.month;
26990
- if (fields.day != null) mutableDate.day = fields.day;
26991
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutableDate);
26992
- return mutableDate;
26993
- }
26994
- function $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(value, fields) {
26995
- let mutableValue = value.copy();
26996
- if (fields.hour != null) mutableValue.hour = fields.hour;
26997
- if (fields.minute != null) mutableValue.minute = fields.minute;
26998
- if (fields.second != null) mutableValue.second = fields.second;
26999
- if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
27000
- $435a2ceaa8778ed8$export$7555de1e070510cb(mutableValue);
27001
- return mutableValue;
27002
- }
27003
- function $435a2ceaa8778ed8$var$balanceTime(time) {
27004
- time.second += Math.floor(time.millisecond / 1e3);
27005
- time.millisecond = $435a2ceaa8778ed8$var$nonNegativeMod(time.millisecond, 1e3);
27006
- time.minute += Math.floor(time.second / 60);
27007
- time.second = $435a2ceaa8778ed8$var$nonNegativeMod(time.second, 60);
27008
- time.hour += Math.floor(time.minute / 60);
27009
- time.minute = $435a2ceaa8778ed8$var$nonNegativeMod(time.minute, 60);
27010
- let days = Math.floor(time.hour / 24);
27011
- time.hour = $435a2ceaa8778ed8$var$nonNegativeMod(time.hour, 24);
27012
- return days;
27013
- }
27014
- function $435a2ceaa8778ed8$export$7555de1e070510cb(time) {
27015
- time.millisecond = Math.max(0, Math.min(time.millisecond, 1e3));
27016
- time.second = Math.max(0, Math.min(time.second, 59));
27017
- time.minute = Math.max(0, Math.min(time.minute, 59));
27018
- time.hour = Math.max(0, Math.min(time.hour, 23));
27019
- }
27020
- function $435a2ceaa8778ed8$var$nonNegativeMod(a, b) {
27021
- let result = a % b;
27022
- if (result < 0) result += b;
27023
- return result;
27024
- }
27025
- function $435a2ceaa8778ed8$var$addTimeFields(time, duration) {
27026
- time.hour += duration.hours || 0;
27027
- time.minute += duration.minutes || 0;
27028
- time.second += duration.seconds || 0;
27029
- time.millisecond += duration.milliseconds || 0;
27030
- return $435a2ceaa8778ed8$var$balanceTime(time);
27031
- }
27032
- function $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {
27033
- let mutable = value.copy();
27034
- switch (field) {
27035
- case "era": {
27036
- let eras = value.calendar.getEras();
27037
- let eraIndex = eras.indexOf(value.era);
27038
- if (eraIndex < 0) throw new Error("Invalid era: " + value.era);
27039
- eraIndex = $435a2ceaa8778ed8$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options?.round);
27040
- mutable.era = eras[eraIndex];
27041
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
27042
- break;
27043
- }
27044
- case "year":
27045
- if (mutable.calendar.isInverseEra?.(mutable)) amount = -amount;
27046
- mutable.year = $435a2ceaa8778ed8$var$cycleValue(value.year, amount, -Infinity, 9999, options?.round);
27047
- if (mutable.year === -Infinity) mutable.year = 1;
27048
- if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
27049
- break;
27050
- case "month":
27051
- mutable.month = $435a2ceaa8778ed8$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options?.round);
27052
- break;
27053
- case "day":
27054
- mutable.day = $435a2ceaa8778ed8$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options?.round);
27055
- break;
27056
- default: throw new Error("Unsupported field " + field);
27057
- }
27058
- if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
27059
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(mutable);
27060
- return mutable;
27061
- }
27062
- function $435a2ceaa8778ed8$export$dd02b3e0007dfe28(value, field, amount, options) {
27063
- let mutable = value.copy();
27064
- switch (field) {
27065
- case "hour": {
27066
- let hours = value.hour;
27067
- let min = 0;
27068
- let max = 23;
27069
- if (options?.hourCycle === 12) {
27070
- let isPM = hours >= 12;
27071
- min = isPM ? 12 : 0;
27072
- max = isPM ? 23 : 11;
27073
- }
27074
- mutable.hour = $435a2ceaa8778ed8$var$cycleValue(hours, amount, min, max, options?.round);
27075
- break;
27076
- }
27077
- case "minute":
27078
- mutable.minute = $435a2ceaa8778ed8$var$cycleValue(value.minute, amount, 0, 59, options?.round);
27079
- break;
27080
- case "second":
27081
- mutable.second = $435a2ceaa8778ed8$var$cycleValue(value.second, amount, 0, 59, options?.round);
27082
- break;
27083
- case "millisecond":
27084
- mutable.millisecond = $435a2ceaa8778ed8$var$cycleValue(value.millisecond, amount, 0, 999, options?.round);
27085
- break;
27086
- default: throw new Error("Unsupported field " + field);
27087
- }
27088
- return mutable;
27089
- }
27090
- function $435a2ceaa8778ed8$var$cycleValue(value, amount, min, max, round = false) {
27091
- if (round) {
27092
- value += Math.sign(amount);
27093
- if (value < min) value = max;
27094
- let div = Math.abs(amount);
27095
- if (amount > 0) value = Math.ceil(value / div) * div;
27096
- else value = Math.floor(value / div) * div;
27097
- if (value > max) value = min;
27098
- } else {
27099
- value += amount;
27100
- if (value < min) value = max - (min - value - 1);
27101
- else if (value > max) value = min + (value - max - 1);
27102
- }
27103
- return value;
27104
- }
27105
- function $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, duration) {
27106
- let ms;
27107
- if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) ms = $d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$e16d8520af44a096($d07e34cce18680fd$export$b21e0b124e224484(dateTime), {
27108
- years: duration.years,
27109
- months: duration.months,
27110
- weeks: duration.weeks,
27111
- days: duration.days
27112
- }), dateTime.timeZone);
27113
- else ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
27114
- ms += duration.milliseconds || 0;
27115
- ms += (duration.seconds || 0) * 1e3;
27116
- ms += (duration.minutes || 0) * 6e4;
27117
- ms += (duration.hours || 0) * 36e5;
27118
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
27119
- }
27120
- function $435a2ceaa8778ed8$export$6814caac34ca03c7(dateTime, duration) {
27121
- return $435a2ceaa8778ed8$export$96b1d28349274637(dateTime, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
27122
- }
27123
- function $435a2ceaa8778ed8$export$9a297d111fc86b79(dateTime, field, amount, options) {
27124
- switch (field) {
27125
- case "hour": {
27126
- let min = 0;
27127
- let max = 23;
27128
- if (options?.hourCycle === 12) {
27129
- let isPM = dateTime.hour >= 12;
27130
- min = isPM ? 12 : 0;
27131
- max = isPM ? 23 : 11;
27132
- }
27133
- let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
27134
- let minDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: min }), new $93635573935797de$export$80ee6245ec4f29ec());
27135
- let minAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(minDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === minDate.day)[0];
27136
- let maxDate = $d07e34cce18680fd$export$b4a036af3fc0b032($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(plainDateTime, { hour: max }), new $93635573935797de$export$80ee6245ec4f29ec());
27137
- let maxAbsolute = [$d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "earlier"), $d07e34cce18680fd$export$5107c82f94518f5c(maxDate, dateTime.timeZone, "later")].filter((ms) => $d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone).day === maxDate.day).pop();
27138
- let ms = $d07e34cce18680fd$export$bd4fb2bc8bb06fb(dateTime) - dateTime.offset;
27139
- let hours = Math.floor(ms / $435a2ceaa8778ed8$var$ONE_HOUR);
27140
- let remainder = ms % $435a2ceaa8778ed8$var$ONE_HOUR;
27141
- ms = $435a2ceaa8778ed8$var$cycleValue(hours, amount, Math.floor(minAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), Math.floor(maxAbsolute / $435a2ceaa8778ed8$var$ONE_HOUR), options?.round) * $435a2ceaa8778ed8$var$ONE_HOUR + remainder;
27142
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac(ms, dateTime.timeZone), dateTime.calendar);
27143
- }
27144
- case "minute":
27145
- case "second":
27146
- case "millisecond": return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(dateTime, field, amount, options);
27147
- case "era":
27148
- case "year":
27149
- case "month":
27150
- case "day": return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c($435a2ceaa8778ed8$export$d52ced6badfb9a4c($d07e34cce18680fd$export$b21e0b124e224484(dateTime), field, amount, options), dateTime.timeZone), dateTime.timeZone), dateTime.calendar);
27151
- default: throw new Error("Unsupported field " + field);
27152
- }
27153
- }
27154
- function $435a2ceaa8778ed8$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
27155
- let plainDateTime = $d07e34cce18680fd$export$b21e0b124e224484(dateTime);
27156
- let res = $435a2ceaa8778ed8$export$e5d5e1c1822b6e56($435a2ceaa8778ed8$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
27157
- if (res.compare(plainDateTime) === 0) return dateTime;
27158
- return $d07e34cce18680fd$export$b4a036af3fc0b032($d07e34cce18680fd$export$1b96692a1ba042ac($d07e34cce18680fd$export$5107c82f94518f5c(res, dateTime.timeZone, disambiguation), dateTime.timeZone), dateTime.calendar);
27159
- }
27160
- function $58246871e4652552$export$f59dee82248f5ad4(time) {
27161
- return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}:${String(time.second).padStart(2, "0")}${time.millisecond ? String(time.millisecond / 1e3).slice(1) : ""}`;
27162
- }
27163
- function $58246871e4652552$export$60dfd74aa96791bd(date) {
27164
- let gregorianDate = $d07e34cce18680fd$export$b4a036af3fc0b032(date, new $93635573935797de$export$80ee6245ec4f29ec());
27165
- let year;
27166
- if (gregorianDate.era === "BC") year = gregorianDate.year === 1 ? "0000" : "-" + String(Math.abs(1 - gregorianDate.year)).padStart(6, "00");
27167
- else year = String(gregorianDate.year).padStart(4, "0");
27168
- return `${year}-${String(gregorianDate.month).padStart(2, "0")}-${String(gregorianDate.day).padStart(2, "0")}`;
27169
- }
27170
- function $58246871e4652552$export$4223de14708adc63(date) {
27171
- return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;
27172
- }
27173
- function $58246871e4652552$var$offsetToString(offset) {
27174
- let sign = Math.sign(offset) < 0 ? "-" : "+";
27175
- offset = Math.abs(offset);
27176
- let offsetHours = Math.floor(offset / 36e5);
27177
- let offsetMinutes = Math.floor(offset % 36e5 / 6e4);
27178
- let offsetSeconds = Math.floor(offset % 36e5 % 6e4 / 1e3);
27179
- let stringOffset = `${sign}${String(offsetHours).padStart(2, "0")}:${String(offsetMinutes).padStart(2, "0")}`;
27180
- if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, "0")}`;
27181
- return stringOffset;
27182
- }
27183
- function $58246871e4652552$export$bf79f1ebf4b18792(date) {
27184
- return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;
27185
- }
27186
- //#endregion
27187
- //#region ../../node_modules/.pnpm/@internationalized+date@3.12.1/node_modules/@internationalized/date/dist/private/CalendarDate.mjs
27188
- function $2aaf608024c21ca1$var$shiftArgs(args) {
27189
- let calendar = typeof args[0] === "object" ? args.shift() : new $93635573935797de$export$80ee6245ec4f29ec();
27190
- let era;
27191
- if (typeof args[0] === "string") era = args.shift();
27192
- else {
27193
- let eras = calendar.getEras();
27194
- era = eras[eras.length - 1];
27195
- }
27196
- let year = args.shift();
27197
- let month = args.shift();
27198
- let day = args.shift();
27199
- return [
27200
- calendar,
27201
- era,
27202
- year,
27203
- month,
27204
- day
27205
- ];
27206
- }
27207
- var $2aaf608024c21ca1$export$99faa760c7908e4f = class $2aaf608024c21ca1$export$99faa760c7908e4f {
27208
- #type;
27209
- constructor(...args) {
27210
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
27211
- this.calendar = calendar;
27212
- this.era = era;
27213
- this.year = year;
27214
- this.month = month;
27215
- this.day = day;
27216
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
27217
- }
27218
- /** Returns a copy of this date. */ copy() {
27219
- if (this.era) return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
27220
- else return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
27221
- }
27222
- /** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
27223
- return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
27224
- }
27225
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
27226
- return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
27227
- }
27228
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
27229
- return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be(this, fields);
27230
- }
27231
- /**
27232
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
27233
- * When the resulting value reaches the limits of the field, it wraps around.
27234
- */ cycle(field, amount, options) {
27235
- return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
27236
- }
27237
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
27238
- return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone);
27239
- }
27240
- /** Converts the date to an ISO 8601 formatted string. */ toString() {
27241
- return $58246871e4652552$export$60dfd74aa96791bd(this);
27242
- }
27243
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
27244
- return $ad063034c8620db8$export$68781ddf31c0090f(this, b);
27245
- }
27246
- };
27247
- var $2aaf608024c21ca1$export$ca871e8dbb80966f = class $2aaf608024c21ca1$export$ca871e8dbb80966f {
27248
- #type;
27249
- constructor(...args) {
27250
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
27251
- this.calendar = calendar;
27252
- this.era = era;
27253
- this.year = year;
27254
- this.month = month;
27255
- this.day = day;
27256
- this.hour = args.shift() || 0;
27257
- this.minute = args.shift() || 0;
27258
- this.second = args.shift() || 0;
27259
- this.millisecond = args.shift() || 0;
27260
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
27261
- }
27262
- /** Returns a copy of this date. */ copy() {
27263
- if (this.era) return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
27264
- else return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
27265
- }
27266
- /** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
27267
- return $435a2ceaa8778ed8$export$e16d8520af44a096(this, duration);
27268
- }
27269
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
27270
- return $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3(this, duration);
27271
- }
27272
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
27273
- return $435a2ceaa8778ed8$export$adaa4cf7ef1b65be($435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields), fields);
27274
- }
27275
- /**
27276
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
27277
- * When the resulting value reaches the limits of the field, it wraps around.
27278
- */ cycle(field, amount, options) {
27279
- switch (field) {
27280
- case "era":
27281
- case "year":
27282
- case "month":
27283
- case "day": return $435a2ceaa8778ed8$export$d52ced6badfb9a4c(this, field, amount, options);
27284
- default: return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
27285
- }
27286
- }
27287
- /** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
27288
- return $d07e34cce18680fd$export$e67a095c620b86fe(this, timeZone, disambiguation);
27289
- }
27290
- /** Converts the date to an ISO 8601 formatted string. */ toString() {
27291
- return $58246871e4652552$export$4223de14708adc63(this);
27292
- }
27293
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
27294
- let res = $ad063034c8620db8$export$68781ddf31c0090f(this, b);
27295
- if (res === 0) return $ad063034c8620db8$export$c19a80a9721b80f6(this, $d07e34cce18680fd$export$b21e0b124e224484(b));
27296
- return res;
27297
- }
27298
- };
27299
- var $2aaf608024c21ca1$export$d3b7288e7994edea = class $2aaf608024c21ca1$export$d3b7288e7994edea {
27300
- #type;
27301
- constructor(...args) {
27302
- let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
27303
- let timeZone = args.shift();
27304
- let offset = args.shift();
27305
- this.calendar = calendar;
27306
- this.era = era;
27307
- this.year = year;
27308
- this.month = month;
27309
- this.day = day;
27310
- this.timeZone = timeZone;
27311
- this.offset = offset;
27312
- this.hour = args.shift() || 0;
27313
- this.minute = args.shift() || 0;
27314
- this.second = args.shift() || 0;
27315
- this.millisecond = args.shift() || 0;
27316
- $435a2ceaa8778ed8$export$c4e2ecac49351ef2(this);
27317
- }
27318
- /** Returns a copy of this date. */ copy() {
27319
- if (this.era) return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
27320
- else return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
27321
- }
27322
- /** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
27323
- return $435a2ceaa8778ed8$export$96b1d28349274637(this, duration);
27324
- }
27325
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
27326
- return $435a2ceaa8778ed8$export$6814caac34ca03c7(this, duration);
27327
- }
27328
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields, disambiguation) {
27329
- return $435a2ceaa8778ed8$export$31b5430eb18be4f8(this, fields, disambiguation);
27330
- }
27331
- /**
27332
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
27333
- * When the resulting value reaches the limits of the field, it wraps around.
27334
- */ cycle(field, amount, options) {
27335
- return $435a2ceaa8778ed8$export$9a297d111fc86b79(this, field, amount, options);
27336
- }
27337
- /** Converts the date to a native JavaScript Date object. */ toDate() {
27338
- return $d07e34cce18680fd$export$83aac07b4c37b25(this);
27339
- }
27340
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ toString() {
27341
- return $58246871e4652552$export$bf79f1ebf4b18792(this);
27342
- }
27343
- /** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
27344
- return this.toDate().toISOString();
27345
- }
27346
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
27347
- return this.toDate().getTime() - $d07e34cce18680fd$export$84c95a83c799e074(b, this.timeZone).toDate().getTime();
27348
- }
27349
- };
27350
- //#endregion
27351
27252
  //#region src/components/calendar-year-picker/CalendarYearPicker.vue
27352
27253
  var CalendarYearPicker_default = /* @__PURE__ */ (0, vue.defineComponent)({
27353
27254
  __name: "CalendarYearPicker",
@@ -27597,7 +27498,7 @@ var Calendar_default = /* @__PURE__ */ (0, vue.defineComponent)({
27597
27498
  const modelValue = (0, vue.useModel)(__props, "modelValue");
27598
27499
  const slotFns = (0, vue.computed)(() => (0, _auronui_styles.calendarVariants)());
27599
27500
  const view = (0, vue.ref)("date");
27600
- const placeholder = (0, vue.shallowRef)(props.defaultValue ?? props.defaultPlaceholder ?? $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2()));
27501
+ const placeholder = (0, vue.shallowRef)(props.defaultValue ?? props.defaultPlaceholder ?? (0, _internationalized_date.today)((0, _internationalized_date.getLocalTimeZone)()));
27601
27502
  function cycleView() {
27602
27503
  view.value = view.value === "date" ? "month" : view.value === "month" ? "year" : "date";
27603
27504
  }
@@ -28007,7 +27908,7 @@ var RangeCalendar_default = /* @__PURE__ */ (0, vue.defineComponent)({
28007
27908
  const modelValue = (0, vue.useModel)(__props, "modelValue");
28008
27909
  const slotFns = (0, vue.computed)(() => (0, _auronui_styles.rangeCalendarVariants)());
28009
27910
  const view = (0, vue.ref)("date");
28010
- const placeholder = (0, vue.shallowRef)(props.defaultValue?.start ?? props.defaultPlaceholder ?? $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2()));
27911
+ const placeholder = (0, vue.shallowRef)(props.defaultValue?.start ?? props.defaultPlaceholder ?? (0, _internationalized_date.today)((0, _internationalized_date.getLocalTimeZone)()));
28011
27912
  function cycleView() {
28012
27913
  view.value = view.value === "date" ? "month" : view.value === "month" ? "year" : "date";
28013
27914
  }
@@ -30549,18 +30450,18 @@ var DateTimePicker_default = /* @__PURE__ */ (0, vue.defineComponent)({
30549
30450
  const openModel = (0, vue.useModel)(__props, "open");
30550
30451
  if (props.defaultOpen && openModel.value === void 0) openModel.value = true;
30551
30452
  if (modelValue.value == null && props.defaultValue != null) modelValue.value = props.defaultValue;
30552
- const _today = $ad063034c8620db8$export$d0bdf45af03a6ea3($ad063034c8620db8$export$aa8b41735afcabd2());
30553
- const internalValue = (0, vue.shallowRef)(modelValue.value ?? props.defaultValue ?? new $2aaf608024c21ca1$export$ca871e8dbb80966f(_today.year, _today.month, _today.day, 0, 0));
30453
+ const _today = (0, _internationalized_date.today)((0, _internationalized_date.getLocalTimeZone)());
30454
+ const internalValue = (0, vue.shallowRef)(modelValue.value ?? props.defaultValue ?? new _internationalized_date.CalendarDateTime(_today.year, _today.month, _today.day, 0, 0));
30554
30455
  (0, vue.watch)(modelValue, (v) => {
30555
- if (v instanceof $2aaf608024c21ca1$export$ca871e8dbb80966f) internalValue.value = v;
30456
+ if (v instanceof _internationalized_date.CalendarDateTime) internalValue.value = v;
30556
30457
  });
30557
30458
  function onInputChange(v) {
30558
- if (!(v instanceof $2aaf608024c21ca1$export$ca871e8dbb80966f)) return;
30459
+ if (!(v instanceof _internationalized_date.CalendarDateTime)) return;
30559
30460
  internalValue.value = v;
30560
30461
  modelValue.value = v;
30561
30462
  }
30562
30463
  const calendarValue = (0, vue.computed)({
30563
- get: () => $d07e34cce18680fd$export$93522d1a439f3617(internalValue.value),
30464
+ get: () => (0, _internationalized_date.toCalendarDate)(internalValue.value),
30564
30465
  set: (val) => {
30565
30466
  if (!val) return;
30566
30467
  internalValue.value = internalValue.value.set({
@@ -31694,6 +31595,120 @@ var ColorPicker_default = /* @__PURE__ */ (0, vue.defineComponent)({
31694
31595
  }
31695
31596
  });
31696
31597
  //#endregion
31598
+ //#region src/composables/useColorPicker.ts
31599
+ /**
31600
+ * High-level composable for controlling the ColorPicker component.
31601
+ *
31602
+ * Wraps `useColorState` with computed channel accessors and format conversion helpers.
31603
+ *
31604
+ * @example
31605
+ * ```ts
31606
+ * const picker = useColorPicker({ defaultValue: '#3b82f6' })
31607
+ * console.log(picker.hue.value) // 217
31608
+ * console.log(picker.saturation.value) // 91
31609
+ * console.log(picker.brightness.value) // 96
31610
+ * ```
31611
+ * ```html
31612
+ * <ColorPicker v-model="picker.color" />
31613
+ * ```
31614
+ */
31615
+ function useColorPicker(options = {}) {
31616
+ const state = useColorState({
31617
+ defaultValue: options.defaultValue,
31618
+ format: options.format ?? "hex",
31619
+ onChange: options.onChange
31620
+ });
31621
+ function setColor(value) {
31622
+ const parsed = typeof value === "string" ? (0, reka_ui.parseColor)(value) : value;
31623
+ state.color.value = parsed;
31624
+ options.onChange?.(state.toString(), parsed);
31625
+ }
31626
+ const hue = (0, vue.computed)(() => state.getChannel("hue"));
31627
+ const saturation = (0, vue.computed)(() => state.getChannel("saturation"));
31628
+ const brightness = (0, vue.computed)(() => state.getChannel("brightness"));
31629
+ const alpha = (0, vue.computed)(() => state.getChannel("alpha"));
31630
+ function toHex() {
31631
+ return state.toHex();
31632
+ }
31633
+ function toRgb() {
31634
+ return (0, reka_ui.colorToRgb)(state.color.value).toString();
31635
+ }
31636
+ function toHsl() {
31637
+ return (0, reka_ui.colorToHsl)(state.color.value).toString();
31638
+ }
31639
+ function toHsb() {
31640
+ return (0, reka_ui.colorToHsb)(state.color.value).toString();
31641
+ }
31642
+ function onColorChange(value) {
31643
+ setColor(value);
31644
+ }
31645
+ return {
31646
+ color: state.color,
31647
+ setColor,
31648
+ hue,
31649
+ saturation,
31650
+ brightness,
31651
+ alpha,
31652
+ toHex,
31653
+ toRgb,
31654
+ toHsl,
31655
+ toHsb,
31656
+ onColorChange
31657
+ };
31658
+ }
31659
+ //#endregion
31660
+ //#region src/composables/useOTP.ts
31661
+ function useOTP(options = {}) {
31662
+ const length = options.length ?? 6;
31663
+ const _value = (0, vue.ref)(options.defaultValue ?? "");
31664
+ const isComplete = (0, vue.computed)(() => _value.value.length === length);
31665
+ function reset() {
31666
+ _value.value = "";
31667
+ }
31668
+ function onValueChange(value) {
31669
+ _value.value = value;
31670
+ options.onChange?.(value);
31671
+ }
31672
+ function onOTPComplete(value) {
31673
+ _value.value = value;
31674
+ options.onComplete?.(value);
31675
+ }
31676
+ return {
31677
+ value: (0, vue.readonly)(_value),
31678
+ isComplete,
31679
+ reset,
31680
+ onValueChange,
31681
+ onOTPComplete
31682
+ };
31683
+ }
31684
+ //#endregion
31685
+ //#region src/composables/useSwatchPicker.ts
31686
+ function useSwatchPicker(options = {}) {
31687
+ const _selectedColor = (0, vue.ref)(options.defaultValue ?? "");
31688
+ const hasSelection = (0, vue.computed)(() => _selectedColor.value !== "");
31689
+ function setColor(hex) {
31690
+ _selectedColor.value = hex;
31691
+ options.onChange?.(hex);
31692
+ }
31693
+ function clearSelection() {
31694
+ _selectedColor.value = "";
31695
+ }
31696
+ function isSelected(hex) {
31697
+ return _selectedColor.value === hex;
31698
+ }
31699
+ function onColorChange(hex) {
31700
+ setColor(hex);
31701
+ }
31702
+ return {
31703
+ selectedColor: (0, vue.readonly)(_selectedColor),
31704
+ hasSelection,
31705
+ setColor,
31706
+ clearSelection,
31707
+ isSelected,
31708
+ onColorChange
31709
+ };
31710
+ }
31711
+ //#endregion
31697
31712
  exports.Accordion = Accordion_default;
31698
31713
  exports.AccordionContent = AccordionContent_default;
31699
31714
  exports.AccordionHeader = AccordionHeader_default;
@@ -31908,32 +31923,48 @@ exports.surfaceContextKey = surfaceContextKey;
31908
31923
  exports.switchGroupContextKey = switchGroupContextKey;
31909
31924
  exports.tableContextKey = tableContextKey;
31910
31925
  exports.treeContextKey = treeContextKey;
31926
+ exports.useAccordion = useAccordion;
31911
31927
  exports.useAutocompleteInject = useAutocompleteInject;
31912
31928
  exports.useAutocompleteProvide = useAutocompleteProvide;
31913
31929
  exports.useCSSVariable = useCSSVariable;
31930
+ exports.useCalendar = useCalendar;
31931
+ exports.useCheckboxGroup = useCheckboxGroup;
31914
31932
  exports.useCheckboxGroupInject = useCheckboxGroupInject;
31915
31933
  exports.useCheckboxGroupProvide = useCheckboxGroupProvide;
31934
+ exports.useColorPicker = useColorPicker;
31916
31935
  exports.useColorState = useColorState;
31917
31936
  exports.useComboBoxInject = useComboBoxInject;
31918
31937
  exports.useComboBoxProvide = useComboBoxProvide;
31938
+ exports.useDisclosure = useDisclosure;
31919
31939
  exports.useDropdownInject = useDropdownInject;
31920
31940
  exports.useDropdownProvide = useDropdownProvide;
31921
31941
  exports.useIsHydrated = useIsHydrated;
31922
31942
  exports.useIsMounted = useIsMounted;
31943
+ exports.useListBox = useListBox;
31923
31944
  exports.useListData = useListData;
31924
31945
  exports.useMeasuredHeight = useMeasuredHeight;
31925
31946
  exports.useMediaQuery = useMediaQuery;
31947
+ exports.useOTP = useOTP;
31926
31948
  exports.useOverlayState = useOverlayState;
31949
+ exports.usePagination = usePagination;
31927
31950
  exports.usePaginationInject = usePaginationInject;
31928
31951
  exports.usePaginationProvide = usePaginationProvide;
31952
+ exports.useRadioGroup = useRadioGroup;
31929
31953
  exports.useRadioGroupInject = useRadioGroupInject;
31930
31954
  exports.useRadioGroupProvide = useRadioGroupProvide;
31955
+ exports.useRangeCalendar = useRangeCalendar;
31956
+ exports.useSlider = useSlider;
31957
+ exports.useSplitter = useSplitter;
31958
+ exports.useStepper = useStepper;
31931
31959
  exports.useSurfaceInject = useSurfaceInject;
31960
+ exports.useSwatchPicker = useSwatchPicker;
31932
31961
  exports.useSwitchGroupInject = useSwitchGroupInject;
31933
31962
  exports.useSwitchGroupProvide = useSwitchGroupProvide;
31934
31963
  exports.useTableInject = useTableInject;
31935
31964
  exports.useTableKeyboardNav = useTableKeyboardNav;
31936
31965
  exports.useTableProvide = useTableProvide;
31966
+ exports.useTabs = useTabs;
31937
31967
  exports.useToast = useToast;
31968
+ exports.useTree = useTree;
31938
31969
 
31939
31970
  //# sourceMappingURL=index.cjs.map