ropav 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/README.md +32 -9
  2. package/dist/components/accordion/index.d.ts +2 -190
  3. package/dist/components/accordion/index.js +1 -12
  4. package/dist/components/alert/alert-indicator.js +1 -1
  5. package/dist/components/alert/index.d.ts +2 -131
  6. package/dist/components/alert/index.js +1 -10
  7. package/dist/components/alert-dialog/alert-dialog-close.js +1 -1
  8. package/dist/components/alert-dialog/alert-dialog-heading.js +2 -2
  9. package/dist/components/alert-dialog/alert-dialog.types.d.ts +1 -1
  10. package/dist/components/alert-dialog/index.d.ts +2 -296
  11. package/dist/components/alert-dialog/index.js +1 -17
  12. package/dist/components/autocomplete/autocomplete-popover.js +2 -2
  13. package/dist/components/autocomplete/autocomplete-root.js +1 -1
  14. package/dist/components/autocomplete/index.d.ts +2 -250
  15. package/dist/components/autocomplete/index.js +1 -12
  16. package/dist/components/avatar/avatar.context.d.ts +1 -1
  17. package/dist/components/avatar/index.d.ts +2 -101
  18. package/dist/components/avatar/index.js +1 -8
  19. package/dist/components/badge/badge-anchor.js +5 -4
  20. package/dist/components/badge/badge-auto-label.d.ts +4 -4
  21. package/dist/components/badge/badge-auto-label.js +2 -2
  22. package/dist/components/badge/badge-root.js +2 -2
  23. package/dist/components/badge/index.d.ts +2 -95
  24. package/dist/components/badge/index.js +1 -8
  25. package/dist/components/breadcrumbs/breadcrumbs-item.js +2 -2
  26. package/dist/components/breadcrumbs/breadcrumbs.types.d.ts +2 -2
  27. package/dist/components/breadcrumbs/index.d.ts +2 -90
  28. package/dist/components/breadcrumbs/index.js +1 -7
  29. package/dist/components/button/index.d.ts +2 -61
  30. package/dist/components/button/index.js +1 -4
  31. package/dist/components/button-group/index.d.ts +2 -72
  32. package/dist/components/button-group/index.js +1 -7
  33. package/dist/components/calendar/calendar-grid-body.js +2 -2
  34. package/dist/components/calendar/calendar-grid-header.js +1 -1
  35. package/dist/components/calendar/calendar-grid.js +2 -1
  36. package/dist/components/calendar/calendar-root.d.ts +1 -1
  37. package/dist/components/calendar/calendar-root.js +13 -13
  38. package/dist/components/calendar/calendar.context.js +1 -1
  39. package/dist/components/calendar/calendar.types.d.ts +3 -1
  40. package/dist/components/calendar/index.d.ts +2 -422
  41. package/dist/components/calendar/index.js +1 -27
  42. package/dist/components/calendar-year-picker/calendar-year-picker-cell.js +15 -11
  43. package/dist/components/calendar-year-picker/calendar-year-picker-grid-body.js +9 -10
  44. package/dist/components/calendar-year-picker/calendar-year-picker-grid.js +36 -32
  45. package/dist/components/calendar-year-picker/calendar-year-picker-trigger-heading.js +1 -1
  46. package/dist/components/calendar-year-picker/calendar-year-picker-trigger.js +1 -1
  47. package/dist/components/calendar-year-picker/calendar-year-picker.context.d.ts +26 -8
  48. package/dist/components/calendar-year-picker/calendar-year-picker.context.js +2 -2
  49. package/dist/components/calendar-year-picker/calendar-year-picker.types.d.ts +8 -1
  50. package/dist/components/calendar-year-picker/index.d.ts +0 -134
  51. package/dist/components/calendar-year-picker/index.js +1 -11
  52. package/dist/components/card/index.d.ts +2 -152
  53. package/dist/components/card/index.js +1 -11
  54. package/dist/components/checkbox/index.d.ts +2 -146
  55. package/dist/components/checkbox/index.js +1 -9
  56. package/dist/components/checkbox-group/index.d.ts +2 -77
  57. package/dist/components/checkbox-group/index.js +1 -4
  58. package/dist/components/chip/chip-auto-label.d.ts +4 -4
  59. package/dist/components/chip/chip-auto-label.js +2 -2
  60. package/dist/components/chip/chip-root.js +2 -2
  61. package/dist/components/chip/index.d.ts +2 -72
  62. package/dist/components/chip/index.js +1 -7
  63. package/dist/components/close-button/index.d.ts +2 -55
  64. package/dist/components/close-button/index.js +1 -4
  65. package/dist/components/color-area/index.d.ts +2 -100
  66. package/dist/components/color-area/index.js +1 -7
  67. package/dist/components/color-field/color-field-root.js +1 -1
  68. package/dist/components/color-field/index.d.ts +2 -175
  69. package/dist/components/color-field/index.js +1 -14
  70. package/dist/components/color-input-group/index.d.ts +2 -115
  71. package/dist/components/color-input-group/index.js +1 -9
  72. package/dist/components/color-picker/color-picker-popover.js +2 -2
  73. package/dist/components/color-picker/index.d.ts +2 -110
  74. package/dist/components/color-picker/index.js +1 -8
  75. package/dist/components/color-slider/index.d.ts +2 -138
  76. package/dist/components/color-slider/index.js +1 -9
  77. package/dist/components/color-swatch/index.d.ts +2 -59
  78. package/dist/components/color-swatch/index.js +1 -4
  79. package/dist/components/color-swatch-picker/color-swatch-picker-item.js +1 -1
  80. package/dist/components/color-swatch-picker/index.d.ts +2 -129
  81. package/dist/components/color-swatch-picker/index.js +1 -9
  82. package/dist/components/combo-box/combo-box-popover.js +2 -2
  83. package/dist/components/combo-box/combo-box.types.d.ts +1 -1
  84. package/dist/components/combo-box/index.d.ts +2 -229
  85. package/dist/components/combo-box/index.js +1 -10
  86. package/dist/components/date-field/date-field-root.js +2 -2
  87. package/dist/components/date-field/index.d.ts +2 -241
  88. package/dist/components/date-field/index.js +1 -12
  89. package/dist/components/date-input-group/use-date-segment.js +1 -1
  90. package/dist/components/date-picker/date-picker-popover.js +2 -2
  91. package/dist/components/date-picker/date-picker-root.js +6 -3
  92. package/dist/components/date-picker/index.d.ts +2 -186
  93. package/dist/components/date-picker/index.js +1 -9
  94. package/dist/components/date-range-picker/date-range-picker-popover.js +2 -2
  95. package/dist/components/date-range-picker/date-range-picker-root.js +6 -3
  96. package/dist/components/date-range-picker/index.d.ts +2 -209
  97. package/dist/components/date-range-picker/index.js +1 -10
  98. package/dist/components/description/index.d.ts +2 -45
  99. package/dist/components/description/index.js +1 -4
  100. package/dist/components/disclosure/disclosure-root.js +3 -3
  101. package/dist/components/disclosure/index.d.ts +2 -163
  102. package/dist/components/disclosure/index.js +1 -11
  103. package/dist/components/disclosure-group/index.d.ts +2 -57
  104. package/dist/components/disclosure-group/index.js +1 -4
  105. package/dist/components/drawer/drawer-close.js +1 -1
  106. package/dist/components/drawer/drawer-dialog.js +1 -1
  107. package/dist/components/drawer/drawer-heading.js +2 -2
  108. package/dist/components/drawer/drawer.types.d.ts +1 -1
  109. package/dist/components/drawer/index.d.ts +2 -291
  110. package/dist/components/drawer/index.js +1 -17
  111. package/dist/components/drop-zone/index.d.ts +2 -80
  112. package/dist/components/drop-zone/index.js +1 -7
  113. package/dist/components/dropdown/dropdown-popover.js +2 -2
  114. package/dist/components/dropdown/index.d.ts +2 -265
  115. package/dist/components/dropdown/index.js +1 -23
  116. package/dist/components/empty-state/index.d.ts +2 -45
  117. package/dist/components/empty-state/index.js +1 -4
  118. package/dist/components/error-message/index.d.ts +2 -45
  119. package/dist/components/error-message/index.js +1 -4
  120. package/dist/components/field-error/field-error-root.js +2 -2
  121. package/dist/components/field-error/index.d.ts +2 -66
  122. package/dist/components/field-error/index.js +1 -7
  123. package/dist/components/fieldset/index.d.ts +2 -110
  124. package/dist/components/fieldset/index.js +1 -9
  125. package/dist/components/form/index.d.ts +2 -49
  126. package/dist/components/form/index.js +1 -4
  127. package/dist/components/header/index.d.ts +2 -45
  128. package/dist/components/header/index.js +1 -4
  129. package/dist/components/i18n-provider/index.d.ts +2 -2
  130. package/dist/components/i18n-provider/index.js +1 -1
  131. package/dist/components/input/index.d.ts +2 -51
  132. package/dist/components/input/index.js +1 -4
  133. package/dist/components/input-group/index.d.ts +2 -141
  134. package/dist/components/input-group/index.js +1 -10
  135. package/dist/components/input-otp/index.d.ts +2 -151
  136. package/dist/components/input-otp/index.js +1 -9
  137. package/dist/components/kbd/index.d.ts +2 -86
  138. package/dist/components/kbd/index.js +1 -8
  139. package/dist/components/label/index.d.ts +2 -51
  140. package/dist/components/label/index.js +1 -4
  141. package/dist/components/link/index.d.ts +2 -94
  142. package/dist/components/link/index.js +1 -7
  143. package/dist/components/list-box/index.d.ts +2 -191
  144. package/dist/components/list-box/index.js +1 -14
  145. package/dist/components/list-box/list-box-drop-indicator.js +2 -2
  146. package/dist/components/list-box/list-box-root.js +4 -4
  147. package/dist/components/list-box-item/index.d.ts +2 -74
  148. package/dist/components/list-box-item/index.js +1 -7
  149. package/dist/components/list-box-item/list-box-item-root.js +2 -2
  150. package/dist/components/list-box-section/index.d.ts +2 -47
  151. package/dist/components/list-box-section/index.js +1 -4
  152. package/dist/components/menu/index.d.ts +2 -83
  153. package/dist/components/menu/index.js +1 -4
  154. package/dist/components/menu-item/index.d.ts +2 -96
  155. package/dist/components/menu-item/index.js +1 -8
  156. package/dist/components/menu-item/menu-item-root.js +2 -2
  157. package/dist/components/menu-section/index.d.ts +2 -63
  158. package/dist/components/menu-section/index.js +1 -4
  159. package/dist/components/meter/index.d.ts +2 -127
  160. package/dist/components/meter/index.js +1 -9
  161. package/dist/components/modal/index.d.ts +2 -296
  162. package/dist/components/modal/index.js +1 -17
  163. package/dist/components/modal/modal-close.js +1 -1
  164. package/dist/components/modal/modal-heading.js +2 -2
  165. package/dist/components/modal/modal.context.d.ts +2 -2
  166. package/dist/components/modal/modal.types.d.ts +1 -1
  167. package/dist/components/number-field/index.d.ts +2 -186
  168. package/dist/components/number-field/index.js +1 -10
  169. package/dist/components/number-field/number-field-decrement-button.js +1 -1
  170. package/dist/components/number-field/number-field-increment-button.js +1 -1
  171. package/dist/components/overlay/overlay-slots.d.ts +1 -1
  172. package/dist/components/pagination/index.d.ts +2 -244
  173. package/dist/components/pagination/index.js +1 -15
  174. package/dist/components/pagination/pagination-next.js +4 -1
  175. package/dist/components/pagination/pagination-previous.js +4 -1
  176. package/dist/components/popover/index.d.ts +2 -172
  177. package/dist/components/popover/index.js +1 -11
  178. package/dist/components/popover/popover-arrow.js +2 -2
  179. package/dist/components/popover/popover-content.js +2 -2
  180. package/dist/components/popover/popover-heading.js +2 -2
  181. package/dist/components/popover/popover.types.d.ts +1 -1
  182. package/dist/components/progress-bar/index.d.ts +2 -133
  183. package/dist/components/progress-bar/index.js +1 -9
  184. package/dist/components/progress-circle/index.d.ts +2 -124
  185. package/dist/components/progress-circle/index.js +1 -9
  186. package/dist/components/radio/index.d.ts +2 -120
  187. package/dist/components/radio/index.js +1 -9
  188. package/dist/components/radio-group/index.d.ts +2 -79
  189. package/dist/components/radio-group/index.js +1 -4
  190. package/dist/components/range-calendar/index.d.ts +2 -424
  191. package/dist/components/range-calendar/index.js +1 -27
  192. package/dist/components/range-calendar/range-calendar-cell.js +4 -2
  193. package/dist/components/range-calendar/range-calendar-grid-body.js +2 -2
  194. package/dist/components/range-calendar/range-calendar-grid-header.js +1 -1
  195. package/dist/components/range-calendar/range-calendar-grid.js +2 -1
  196. package/dist/components/range-calendar/range-calendar-root.d.ts +3 -3
  197. package/dist/components/range-calendar/range-calendar-root.js +13 -13
  198. package/dist/components/range-calendar/range-calendar.context.d.ts +1 -1
  199. package/dist/components/range-calendar/range-calendar.context.js +1 -1
  200. package/dist/components/range-calendar/range-calendar.types.d.ts +3 -1
  201. package/dist/components/router-provider/index.d.ts +2 -2
  202. package/dist/components/router-provider/index.js +1 -1
  203. package/dist/components/scroll-shadow/index.d.ts +2 -69
  204. package/dist/components/scroll-shadow/index.js +1 -4
  205. package/dist/components/search-field/index.d.ts +2 -195
  206. package/dist/components/search-field/index.js +1 -10
  207. package/dist/components/search-field/search-field-clear-button.js +5 -5
  208. package/dist/components/segmented-control/index.d.ts +2 -126
  209. package/dist/components/segmented-control/index.js +1 -9
  210. package/dist/components/select/index.d.ts +2 -202
  211. package/dist/components/select/index.js +1 -10
  212. package/dist/components/select/select-popover.js +2 -2
  213. package/dist/components/select/select-value.js +1 -1
  214. package/dist/components/separator/index.d.ts +2 -41
  215. package/dist/components/separator/index.js +1 -4
  216. package/dist/components/sidebar/index.d.ts +2 -520
  217. package/dist/components/sidebar/index.js +1 -25
  218. package/dist/components/sidebar/sidebar-content.js +2 -2
  219. package/dist/components/sidebar/sidebar-item-tooltip.js +2 -2
  220. package/dist/components/sidebar/sidebar-panel.js +1 -0
  221. package/dist/components/sidebar/sidebar-rail.js +1 -0
  222. package/dist/components/sidebar/sidebar-root.js +23 -5
  223. package/dist/components/sidebar/sidebar.state.d.ts +3 -0
  224. package/dist/components/sidebar/sidebar.state.js +5 -0
  225. package/dist/components/sidebar/sidebar.types.d.ts +2 -2
  226. package/dist/components/skeleton/index.d.ts +2 -47
  227. package/dist/components/skeleton/index.js +1 -4
  228. package/dist/components/slider/index.d.ts +2 -180
  229. package/dist/components/slider/index.js +1 -11
  230. package/dist/components/spinner/index.d.ts +2 -41
  231. package/dist/components/spinner/index.js +1 -4
  232. package/dist/components/splitter/index.d.ts +2 -134
  233. package/dist/components/splitter/index.js +1 -8
  234. package/dist/components/surface/index.d.ts +2 -47
  235. package/dist/components/surface/index.js +1 -4
  236. package/dist/components/switch/index.d.ts +2 -165
  237. package/dist/components/switch/index.js +1 -10
  238. package/dist/components/switch-group/index.d.ts +2 -47
  239. package/dist/components/switch-group/index.js +1 -4
  240. package/dist/components/table/index.d.ts +2 -442
  241. package/dist/components/table/index.js +1 -23
  242. package/dist/components/table/table-body.js +9 -9
  243. package/dist/components/table/table-cell.js +3 -3
  244. package/dist/components/table/table-column.js +4 -4
  245. package/dist/components/table/table-content.js +3 -3
  246. package/dist/components/table/table-drag-handle.js +1 -1
  247. package/dist/components/table/table-drop-indicator.js +9 -7
  248. package/dist/components/table/table-header.js +4 -4
  249. package/dist/components/table/table-load-more.js +5 -5
  250. package/dist/components/table/table-row.js +4 -4
  251. package/dist/components/table/table.context.d.ts +2 -2
  252. package/dist/components/table/table.types.d.ts +3 -3
  253. package/dist/components/tabs/index.d.ts +2 -189
  254. package/dist/components/tabs/index.js +1 -12
  255. package/dist/components/tabs/tabs-list-container.js +2 -2
  256. package/dist/components/tag/index.d.ts +2 -76
  257. package/dist/components/tag/index.js +1 -7
  258. package/dist/components/tag/tag-remove-button.js +2 -2
  259. package/dist/components/tag-group/index.d.ts +2 -93
  260. package/dist/components/tag-group/index.js +1 -7
  261. package/dist/components/textarea/index.d.ts +2 -51
  262. package/dist/components/textarea/index.js +1 -4
  263. package/dist/components/textfield/index.d.ts +2 -109
  264. package/dist/components/textfield/index.js +1 -4
  265. package/dist/components/time-field/index.d.ts +2 -233
  266. package/dist/components/time-field/index.js +1 -12
  267. package/dist/components/toast/index.d.ts +2 -216
  268. package/dist/components/toast/index.js +1 -15
  269. package/dist/components/toast/toast-action-button.js +2 -2
  270. package/dist/components/toast/toast-default-content.js +1 -1
  271. package/dist/components/toast/toast-queue.d.ts +1 -1
  272. package/dist/components/toast/toast-queue.js +1 -1
  273. package/dist/components/toast/toast-root.js +1 -1
  274. package/dist/components/toast/toast.types.d.ts +3 -3
  275. package/dist/components/toggle-button/index.d.ts +2 -65
  276. package/dist/components/toggle-button/index.js +1 -4
  277. package/dist/components/toggle-button-group/index.d.ts +2 -82
  278. package/dist/components/toggle-button-group/index.js +1 -7
  279. package/dist/components/toolbar/index.d.ts +2 -49
  280. package/dist/components/toolbar/index.js +1 -4
  281. package/dist/components/tooltip/index.d.ts +2 -136
  282. package/dist/components/tooltip/index.js +1 -9
  283. package/dist/components/tooltip/tooltip-arrow.js +2 -2
  284. package/dist/components/tooltip/tooltip-root.js +1 -1
  285. package/dist/components/tooltip/tooltip.types.d.ts +1 -1
  286. package/dist/components/typography/code.js +2 -2
  287. package/dist/components/typography/heading.js +2 -2
  288. package/dist/components/typography/index.d.ts +2 -1269
  289. package/dist/components/typography/index.js +1 -10
  290. package/dist/components/typography/paragraph.js +2 -2
  291. package/dist/components/typography/typography-root.js +2 -2
  292. package/dist/composables/use-calendar-grid.js +2 -1
  293. package/dist/composables/use-calendar-year-picker.js +12 -3
  294. package/dist/composables/use-color-slider.d.ts +1 -1
  295. package/dist/composables/use-color-slider.js +1 -1
  296. package/dist/composables/use-press.d.ts +10 -0
  297. package/dist/composables/use-press.js +27 -2
  298. package/dist/composables/use-prevent-scroll.d.ts +11 -5
  299. package/dist/composables/use-prevent-scroll.js +11 -5
  300. package/dist/composables/use-range-calendar.js +2 -1
  301. package/dist/composables/use-text-field.js +1 -1
  302. package/dist/index.d.ts +1 -1
  303. package/dist/index.js +110 -111
  304. package/dist/styles-no-preflight.css +3 -0
  305. package/dist/styles-overrides.css +15 -0
  306. package/dist/styles.css +1 -16
  307. package/dist/utils/calendar-systems.d.ts +14 -0
  308. package/dist/utils/calendar-systems.js +2 -0
  309. package/dist/utils/calendar.d.ts +14 -5
  310. package/dist/utils/calendar.js +18 -21
  311. package/dist/utils/compose.d.ts +4 -6
  312. package/dist/utils/compose.js +4 -6
  313. package/dist/utils/dnd-list-drop-target-delegate.d.ts +19 -1
  314. package/dist/utils/dnd-list-drop-target-delegate.js +37 -6
  315. package/dist/utils/index.d.ts +1 -0
  316. package/dist/utils/virtualizer-list-layout.d.ts +8 -0
  317. package/dist/utils/virtualizer-list-layout.js +12 -2
  318. package/dist/utils/virtualizer-table-layout.d.ts +1 -0
  319. package/dist/utils/virtualizer-table-layout.js +3 -0
  320. package/package.json +7 -4
@@ -1,4 +1,5 @@
1
1
  import { provideCalendarContext, provideCalendarGridContext, useCalendarContext, useCalendarStateContext } from "./calendar.context.js";
2
+ import { DEFAULT_WEEKDAY_STYLE } from "../../utils/calendar.js";
2
3
  import { useCalendarGrid } from "../../composables/use-calendar-grid.js";
3
4
  import { computed, createSlot, defineVaporComponent, on, renderEffect, setDynamicProps, setInsertionState, template, unref } from "vue";
4
5
  import { endOfMonth } from "@internationalized/date";
@@ -8,7 +9,7 @@ var calendar_grid_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__
8
9
  __name: "calendar-grid",
9
10
  props: {
10
11
  class: {},
11
- weekdayStyle: { default: "short" },
12
+ weekdayStyle: { default: DEFAULT_WEEKDAY_STYLE },
12
13
  offset: {}
13
14
  },
14
15
  setup(__props) {
@@ -1,6 +1,6 @@
1
1
  import type { CalendarValue } from "../../composables/use-calendar-state.js";
2
2
  import type { CalendarRootProps, CalendarRootSlotProps } from "./calendar.types.js";
3
- import { CalendarDate } from "@internationalized/date";
3
+ import type { CalendarDate } from "@internationalized/date";
4
4
  declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, 'attrs' | 'emit' | 'slots'>>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
5
5
  props: import('vue').PublicProps & __VLS_PrettifyLocal<CalendarRootProps & {
6
6
  "onUpdate:focusedValue"?: ((value: CalendarDate) => any) | undefined;
@@ -2,14 +2,14 @@ import { dataAttr } from "../../utils/assertion.js";
2
2
  import { useControllableState } from "../../composables/use-controllable-state.js";
3
3
  import { useLocale } from "../../composables/use-locale.js";
4
4
  import { visuallyHiddenStyle } from "../../utils/visually-hidden.js";
5
- import { provideYearPickerContext } from "../calendar-year-picker/calendar-year-picker.context.js";
6
- import { getGregorianYearOffset } from "../../utils/calendar.js";
7
5
  import { provideCalendarContext, provideCalendarStateContext, useCalendarOwnerContext } from "./calendar.context.js";
8
6
  import { useCalendar } from "../../composables/use-calendar.js";
7
+ import { getDefaultYearBounds } from "../../utils/calendar.js";
9
8
  import { useCalendarState } from "../../composables/use-calendar-state.js";
9
+ import { provideYearPickerContext } from "../calendar-year-picker/calendar-year-picker.context.js";
10
10
  import { child, computed, createSlot, defineVaporComponent, next, on, renderEffect, setAttr, setDynamicProps, setInsertionState, setProp, setStaticTemplateRef, setStyle, setText, shallowRef, template, toDisplayString, txt, unref } from "vue";
11
11
  import { calendarVariants } from "@ropav/styles";
12
- import { CalendarDate, DateFormatter, createCalendar } from "@internationalized/date";
12
+ import { DateFormatter, GregorianCalendar } from "@internationalized/date";
13
13
  //#region src/components/calendar/calendar-root.vue?vue&type=script&setup=true&vapor=true&lang.ts
14
14
  var t0 = template("<div><div><h2> </div><!><div><button tabindex=-1 type=button>", 1);
15
15
  var calendar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__PURE__*/ defineVaporComponent({
@@ -57,7 +57,8 @@ var calendar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__
57
57
  defaultYearPickerOpen: {
58
58
  type: Boolean,
59
59
  default: false
60
- }
60
+ },
61
+ createCalendar: {}
61
62
  },
62
63
  emits: [
63
64
  "update:value",
@@ -79,17 +80,16 @@ var calendar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__
79
80
  const owner = useCalendarOwnerContext();
80
81
  const owned = computed(() => owner?.props.value ?? {});
81
82
  const isDateUnavailable = Boolean(props.isDateUnavailable ?? owned.value.isDateUnavailable) ? (date) => Boolean((props.isDateUnavailable ?? owned.value.isDateUnavailable)?.(date)) : void 0;
83
+ const createCalendar = (identifier) => props.createCalendar?.(identifier) ?? new GregorianCalendar();
84
+ const calendarSystem = computed(() => createCalendar(new DateFormatter(locale.value.locale).resolvedOptions().calendar));
82
85
  /**
83
86
  * Default bounds spanning 1900 to 2099, expressed in the locale's own calendar system.
84
87
  *
85
- * Without them the year picker would have nothing to size itself against. The offset is what keeps
86
- * "1900" the same stretch of real time in a Buddhist or Hebrew calendar rather than a year nobody
87
- * recognises.
88
+ * Without them the year picker would have nothing to size itself against.
88
89
  */
89
- const calendarSystem = computed(() => createCalendar(new DateFormatter(locale.value.locale).resolvedOptions().calendar));
90
- const yearOffset = computed(() => getGregorianYearOffset(calendarSystem.value.identifier));
91
- const minValue = computed(() => props.minValue ?? owned.value.minValue ?? new CalendarDate(calendarSystem.value, 1900 + yearOffset.value, 1, 1));
92
- const maxValue = computed(() => props.maxValue ?? owned.value.maxValue ?? new CalendarDate(calendarSystem.value, 2099 + yearOffset.value, 12, 31));
90
+ const defaultBounds = computed(() => getDefaultYearBounds(calendarSystem.value));
91
+ const minValue = computed(() => props.minValue ?? owned.value.minValue ?? defaultBounds.value.minValue);
92
+ const maxValue = computed(() => props.maxValue ?? owned.value.maxValue ?? defaultBounds.value.maxValue);
93
93
  const state = useCalendarState({
94
94
  autoFocus: () => props.autoFocus ?? owned.value.autoFocus,
95
95
  createCalendar,
@@ -146,8 +146,8 @@ var calendar_root_vue_vue_type_script_setup_true_vapor_true_lang_default = /*@__
146
146
  * lays its single row out differently from a month grid, and a day view differently again.
147
147
  */
148
148
  const styles = computed(() => slots.value.base({ class: [
149
- props.visibleDuration?.weeks != null && "calendar--week-view",
150
- props.visibleDuration?.days != null && "calendar--day-view",
149
+ props.visibleDuration?.weeks != null && "rp-calendar--week-view",
150
+ props.visibleDuration?.days != null && "rp-calendar--day-view",
151
151
  props.class
152
152
  ].filter(Boolean).join(" ") }));
153
153
  const slotProps = computed(() => ({
@@ -21,7 +21,7 @@ var [useCalendarStateContext, provideCalendarStateContext] = createContext({ nam
21
21
  * state, and each row of cells has to know which month it belongs to.
22
22
  */
23
23
  var [useCalendarGridContext, provideCalendarGridContext] = createContext({
24
- errorMessage: "Calendar grid parts must be used inside <Calendar.Grid>.",
24
+ errorMessage: "Calendar grid parts must be used inside <CalendarGrid>.",
25
25
  name: "CalendarGridContext"
26
26
  });
27
27
  /**
@@ -2,7 +2,7 @@ import type { AnyCalendarState } from "../../composables/use-calendar.js";
2
2
  import type { CalendarHeadingFormatOptions } from "../../composables/use-calendar-heading.js";
3
3
  import type { CalendarSelectionMode, CalendarValue, PageBehavior, SelectionAlignment } from "../../composables/use-calendar-state.js";
4
4
  import type { DayOfWeek, WeekdayStyle } from "../../utils/calendar.js";
5
- import type { CalendarDate, DateDuration, DateValue } from "@internationalized/date";
5
+ import type { Calendar, CalendarDate, CalendarIdentifier, DateDuration, DateValue } from "@internationalized/date";
6
6
  export interface CalendarRootProps {
7
7
  class?: string;
8
8
  id?: string;
@@ -38,6 +38,8 @@ export interface CalendarRootProps {
38
38
  /** Whether the year picker is open. */
39
39
  isYearPickerOpen?: boolean;
40
40
  defaultYearPickerOpen?: boolean;
41
+ /** Builds the calendar system for an identifier. Injectable so a build can ship fewer of them. */
42
+ createCalendar?: (identifier: CalendarIdentifier) => Calendar;
41
43
  }
42
44
  /** State the calendar hands its slot, matching React's render props. */
43
45
  export interface CalendarRootSlotProps {
@@ -8,428 +8,8 @@ import CalendarHeader from "./calendar-header.js";
8
8
  import CalendarHeading from "./calendar-heading.js";
9
9
  import CalendarNavButton from "./calendar-nav-button.js";
10
10
  import CalendarRoot from "./calendar-root.js";
11
- export declare const Calendar: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
12
- attrs: any;
13
- slots: {
14
- default?: (props: import("./calendar.types.js").CalendarRootSlotProps) => unknown;
15
- };
16
- emit: ((evt: "update:focusedValue", value: import("@internationalized/date").CalendarDate) => void) & ((evt: "update:value", value: import("../../index.js").CalendarValue) => void) & ((evt: "update:yearPickerOpen", isOpen: boolean) => void);
17
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
18
- props: import('vue').PublicProps & {
19
- class?: string;
20
- id?: string;
21
- ariaLabel?: string;
22
- ariaLabelledby?: string;
23
- ariaDescribedby?: string;
24
- ariaDetails?: string;
25
- value?: import("../../index.js").CalendarValue;
26
- defaultValue?: import("../../index.js").CalendarValue;
27
- focusedValue?: import("@internationalized/date").DateValue | null;
28
- defaultFocusedValue?: import("@internationalized/date").DateValue | null;
29
- minValue?: import("@internationalized/date").DateValue | null;
30
- maxValue?: import("@internationalized/date").DateValue | null;
31
- selectionMode?: import("../../index.js").CalendarSelectionMode;
32
- isDateUnavailable?: (date: import("@internationalized/date").DateValue) => boolean;
33
- isDisabled?: boolean;
34
- isReadOnly?: boolean;
35
- isInvalid?: boolean;
36
- autoFocus?: boolean;
37
- visibleDuration?: import("@internationalized/date").DateDuration;
38
- pageBehavior?: import("../../index.js").PageBehavior;
39
- selectionAlignment?: import("../../index.js").SelectionAlignment;
40
- firstDayOfWeek?: import("../../index.js").DayOfWeek;
41
- weeksInMonth?: number;
42
- isYearPickerOpen?: boolean;
43
- defaultYearPickerOpen?: boolean;
44
- "onUpdate:focusedValue"?: ((value: import("@internationalized/date").CalendarDate) => any) | undefined;
45
- "onUpdate:value"?: ((value: import("../../index.js").CalendarValue) => any) | undefined;
46
- "onUpdate:yearPickerOpen"?: ((isOpen: boolean) => any) | undefined;
47
- } & (typeof globalThis extends {
48
- __VLS_PROPS_FALLBACK: infer P;
49
- } ? P : {});
50
- expose: (exposed: {}) => void;
51
- attrs: any;
52
- slots: {
53
- default?: (props: import("./calendar.types.js").CalendarRootSlotProps) => unknown;
54
- };
55
- emit: ((evt: "update:focusedValue", value: import("@internationalized/date").CalendarDate) => void) & ((evt: "update:value", value: import("../../index.js").CalendarValue) => void) & ((evt: "update:yearPickerOpen", isOpen: boolean) => void);
56
- }>) => import('vue').VNode & {
57
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
58
- }) & {
59
- Cell: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
60
- attrs: any;
61
- slots: {
62
- default?: (props: import("./calendar.types.js").CalendarCellSlotProps) => unknown;
63
- };
64
- emit: {};
65
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
66
- props: import('vue').PublicProps & {
67
- class?: string;
68
- date: import("@internationalized/date").CalendarDate;
69
- } & (typeof globalThis extends {
70
- __VLS_PROPS_FALLBACK: infer P;
71
- } ? P : {});
72
- expose: (exposed: {}) => void;
73
- attrs: any;
74
- slots: {
75
- default?: (props: import("./calendar.types.js").CalendarCellSlotProps) => unknown;
76
- };
77
- emit: {};
78
- }>) => import('vue').VNode & {
79
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
80
- };
81
- CellIndicator: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
82
- attrs: any;
83
- slots: {
84
- default?: () => unknown;
85
- };
86
- emit: {};
87
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
88
- props: import('vue').PublicProps & {
89
- class?: string;
90
- } & (typeof globalThis extends {
91
- __VLS_PROPS_FALLBACK: infer P;
92
- } ? P : {});
93
- expose: (exposed: {}) => void;
94
- attrs: any;
95
- slots: {
96
- default?: () => unknown;
97
- };
98
- emit: {};
99
- }>) => import('vue').VNode & {
100
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
101
- };
102
- Grid: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
103
- attrs: any;
104
- slots: {
105
- default?: () => unknown;
106
- };
107
- emit: {};
108
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
109
- props: import('vue').PublicProps & {
110
- class?: string;
111
- weekdayStyle?: import("../../index.js").WeekdayStyle;
112
- offset?: import("@internationalized/date").DateDuration;
113
- } & (typeof globalThis extends {
114
- __VLS_PROPS_FALLBACK: infer P;
115
- } ? P : {});
116
- expose: (exposed: {}) => void;
117
- attrs: any;
118
- slots: {
119
- default?: () => unknown;
120
- };
121
- emit: {};
122
- }>) => import('vue').VNode & {
123
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
124
- };
125
- GridBody: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
126
- attrs: any;
127
- slots: {
128
- default?: (props: import("./calendar.types.js").CalendarGridBodySlotProps) => unknown;
129
- };
130
- emit: {};
131
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
132
- props: import('vue').PublicProps & {
133
- class?: string;
134
- } & (typeof globalThis extends {
135
- __VLS_PROPS_FALLBACK: infer P;
136
- } ? P : {});
137
- expose: (exposed: {}) => void;
138
- attrs: any;
139
- slots: {
140
- default?: (props: import("./calendar.types.js").CalendarGridBodySlotProps) => unknown;
141
- };
142
- emit: {};
143
- }>) => import('vue').VNode & {
144
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
145
- };
146
- GridHeader: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
147
- attrs: any;
148
- slots: {
149
- default?: (props: import("./calendar.types.js").CalendarGridHeaderSlotProps) => unknown;
150
- };
151
- emit: {};
152
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
153
- props: import('vue').PublicProps & {
154
- class?: string;
155
- } & (typeof globalThis extends {
156
- __VLS_PROPS_FALLBACK: infer P;
157
- } ? P : {});
158
- expose: (exposed: {}) => void;
159
- attrs: any;
160
- slots: {
161
- default?: (props: import("./calendar.types.js").CalendarGridHeaderSlotProps) => unknown;
162
- };
163
- emit: {};
164
- }>) => import('vue').VNode & {
165
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
166
- };
167
- Header: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
168
- attrs: any;
169
- slots: {
170
- default?: () => unknown;
171
- };
172
- emit: {};
173
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
174
- props: import('vue').PublicProps & {
175
- class?: string;
176
- } & (typeof globalThis extends {
177
- __VLS_PROPS_FALLBACK: infer P;
178
- } ? P : {});
179
- expose: (exposed: {}) => void;
180
- attrs: any;
181
- slots: {
182
- default?: () => unknown;
183
- };
184
- emit: {};
185
- }>) => import('vue').VNode & {
186
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
187
- };
188
- HeaderCell: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
189
- attrs: any;
190
- slots: {
191
- default?: () => unknown;
192
- };
193
- emit: {};
194
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
195
- props: import('vue').PublicProps & {
196
- class?: string;
197
- } & (typeof globalThis extends {
198
- __VLS_PROPS_FALLBACK: infer P;
199
- } ? P : {});
200
- expose: (exposed: {}) => void;
201
- attrs: any;
202
- slots: {
203
- default?: () => unknown;
204
- };
205
- emit: {};
206
- }>) => import('vue').VNode & {
207
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
208
- };
209
- Heading: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
210
- attrs: any;
211
- slots: {};
212
- emit: {};
213
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
214
- props: import('vue').PublicProps & {
215
- class?: string;
216
- offset?: import("@internationalized/date").DateDuration;
217
- format?: import("./index.js").CalendarHeadingFormatOptions;
218
- } & (typeof globalThis extends {
219
- __VLS_PROPS_FALLBACK: infer P;
220
- } ? P : {});
221
- expose: (exposed: {}) => void;
222
- attrs: any;
223
- slots: {};
224
- emit: {};
225
- }>) => import('vue').VNode & {
226
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
227
- };
228
- NavButton: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
229
- attrs: any;
230
- slots: {
231
- default?: () => unknown;
232
- };
233
- emit: {};
234
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
235
- props: import('vue').PublicProps & {
236
- class?: string;
237
- slot?: "previous" | "next";
238
- } & (typeof globalThis extends {
239
- __VLS_PROPS_FALLBACK: infer P;
240
- } ? P : {});
241
- expose: (exposed: {}) => void;
242
- attrs: any;
243
- slots: {
244
- default?: () => unknown;
245
- };
246
- emit: {};
247
- }>) => import('vue').VNode & {
248
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
249
- };
250
- Root: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
251
- attrs: any;
252
- slots: {
253
- default?: (props: import("./calendar.types.js").CalendarRootSlotProps) => unknown;
254
- };
255
- emit: ((evt: "update:focusedValue", value: import("@internationalized/date").CalendarDate) => void) & ((evt: "update:value", value: import("../../index.js").CalendarValue) => void) & ((evt: "update:yearPickerOpen", isOpen: boolean) => void);
256
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
257
- props: import('vue').PublicProps & {
258
- class?: string;
259
- id?: string;
260
- ariaLabel?: string;
261
- ariaLabelledby?: string;
262
- ariaDescribedby?: string;
263
- ariaDetails?: string;
264
- value?: import("../../index.js").CalendarValue;
265
- defaultValue?: import("../../index.js").CalendarValue;
266
- focusedValue?: import("@internationalized/date").DateValue | null;
267
- defaultFocusedValue?: import("@internationalized/date").DateValue | null;
268
- minValue?: import("@internationalized/date").DateValue | null;
269
- maxValue?: import("@internationalized/date").DateValue | null;
270
- selectionMode?: import("../../index.js").CalendarSelectionMode;
271
- isDateUnavailable?: (date: import("@internationalized/date").DateValue) => boolean;
272
- isDisabled?: boolean;
273
- isReadOnly?: boolean;
274
- isInvalid?: boolean;
275
- autoFocus?: boolean;
276
- visibleDuration?: import("@internationalized/date").DateDuration;
277
- pageBehavior?: import("../../index.js").PageBehavior;
278
- selectionAlignment?: import("../../index.js").SelectionAlignment;
279
- firstDayOfWeek?: import("../../index.js").DayOfWeek;
280
- weeksInMonth?: number;
281
- isYearPickerOpen?: boolean;
282
- defaultYearPickerOpen?: boolean;
283
- "onUpdate:focusedValue"?: ((value: import("@internationalized/date").CalendarDate) => any) | undefined;
284
- "onUpdate:value"?: ((value: import("../../index.js").CalendarValue) => any) | undefined;
285
- "onUpdate:yearPickerOpen"?: ((isOpen: boolean) => any) | undefined;
286
- } & (typeof globalThis extends {
287
- __VLS_PROPS_FALLBACK: infer P;
288
- } ? P : {});
289
- expose: (exposed: {}) => void;
290
- attrs: any;
291
- slots: {
292
- default?: (props: import("./calendar.types.js").CalendarRootSlotProps) => unknown;
293
- };
294
- emit: ((evt: "update:focusedValue", value: import("@internationalized/date").CalendarDate) => void) & ((evt: "update:value", value: import("../../index.js").CalendarValue) => void) & ((evt: "update:yearPickerOpen", isOpen: boolean) => void);
295
- }>) => import('vue').VNode & {
296
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
297
- };
298
- YearPickerCell: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
299
- attrs: any;
300
- slots: {
301
- default?: (props: import("../index.js").CalendarYearPickerCellSlotProps) => unknown;
302
- };
303
- emit: {};
304
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
305
- props: import('vue').PublicProps & {
306
- class?: string;
307
- year: number;
308
- excludeFromTabOrder?: boolean;
309
- } & (typeof globalThis extends {
310
- __VLS_PROPS_FALLBACK: infer P;
311
- } ? P : {});
312
- expose: (exposed: {}) => void;
313
- attrs: any;
314
- slots: {
315
- default?: (props: import("../index.js").CalendarYearPickerCellSlotProps) => unknown;
316
- };
317
- emit: {};
318
- }>) => import('vue').VNode & {
319
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
320
- };
321
- YearPickerGrid: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
322
- attrs: any;
323
- slots: {
324
- default?: () => unknown;
325
- };
326
- emit: {};
327
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
328
- props: import('vue').PublicProps & {
329
- class?: string;
330
- visibleYears?: number;
331
- format?: import("../index.js").CalendarYearPickerFormatOptions;
332
- } & (typeof globalThis extends {
333
- __VLS_PROPS_FALLBACK: infer P;
334
- } ? P : {});
335
- expose: (exposed: {}) => void;
336
- attrs: any;
337
- slots: {
338
- default?: () => unknown;
339
- };
340
- emit: {};
341
- }>) => import('vue').VNode & {
342
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
343
- };
344
- YearPickerGridBody: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
345
- attrs: any;
346
- slots: {
347
- default?: (props: import("../index.js").CalendarYearPickerCellSlotProps) => unknown;
348
- };
349
- emit: {};
350
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
351
- props: import('vue').PublicProps & {
352
- class?: string;
353
- } & (typeof globalThis extends {
354
- __VLS_PROPS_FALLBACK: infer P;
355
- } ? P : {});
356
- expose: (exposed: {}) => void;
357
- attrs: any;
358
- slots: {
359
- default?: (props: import("../index.js").CalendarYearPickerCellSlotProps) => unknown;
360
- };
361
- emit: {};
362
- }>) => import('vue').VNode & {
363
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
364
- };
365
- YearPickerTrigger: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
366
- attrs: any;
367
- slots: {
368
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
369
- };
370
- emit: {};
371
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
372
- props: import('vue').PublicProps & {
373
- class?: string;
374
- } & (typeof globalThis extends {
375
- __VLS_PROPS_FALLBACK: infer P;
376
- } ? P : {});
377
- expose: (exposed: {}) => void;
378
- attrs: any;
379
- slots: {
380
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
381
- };
382
- emit: {};
383
- }>) => import('vue').VNode & {
384
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
385
- };
386
- YearPickerTriggerHeading: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
387
- attrs: any;
388
- slots: {
389
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
390
- };
391
- emit: {};
392
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
393
- props: import('vue').PublicProps & {
394
- class?: string;
395
- offset?: import("@internationalized/date").DateDuration;
396
- format?: import("./index.js").CalendarHeadingFormatOptions;
397
- } & (typeof globalThis extends {
398
- __VLS_PROPS_FALLBACK: infer P;
399
- } ? P : {});
400
- expose: (exposed: {}) => void;
401
- attrs: any;
402
- slots: {
403
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
404
- };
405
- emit: {};
406
- }>) => import('vue').VNode & {
407
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
408
- };
409
- YearPickerTriggerIndicator: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: {
410
- attrs: any;
411
- slots: {
412
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
413
- };
414
- emit: {};
415
- }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
416
- props: import('vue').PublicProps & {
417
- class?: string;
418
- } & (typeof globalThis extends {
419
- __VLS_PROPS_FALLBACK: infer P;
420
- } ? P : {});
421
- expose: (exposed: {}) => void;
422
- attrs: any;
423
- slots: {
424
- default?: (props: import("../index.js").CalendarYearPickerTriggerSlotProps) => unknown;
425
- };
426
- emit: {};
427
- }>) => import('vue').VNode & {
428
- __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
429
- };
430
- };
431
- export { CalendarCell, CalendarCellIndicator, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeader, CalendarHeaderCell, CalendarHeading, CalendarNavButton, CalendarRoot, };
432
- export type { CalendarCellIndicatorProps, CalendarCellProps, CalendarCellSlotProps, CalendarGridBodyProps, CalendarGridBodySlotProps, CalendarGridHeaderProps, CalendarGridHeaderSlotProps, CalendarGridProps, CalendarHeaderCellProps, CalendarHeaderProps, CalendarHeadingProps, CalendarNavButtonProps, CalendarRootProps, CalendarRootProps as CalendarProps, CalendarRootSlotProps, } from "./calendar.types.js";
11
+ export { CalendarCell, CalendarCellIndicator, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeader, CalendarHeaderCell, CalendarHeading, CalendarNavButton, CalendarRoot as Calendar, };
12
+ export type { CalendarCellIndicatorProps, CalendarCellProps, CalendarCellSlotProps, CalendarGridBodyProps, CalendarGridBodySlotProps, CalendarGridHeaderProps, CalendarGridHeaderSlotProps, CalendarGridProps, CalendarHeaderCellProps, CalendarHeaderProps, CalendarHeadingProps, CalendarNavButtonProps, CalendarRootProps as CalendarProps, CalendarRootSlotProps as CalendarSlotProps, } from "./calendar.types.js";
433
13
  export { provideCalendarOwnerContext, provideCalendarStateContext, useCalendarOwnerContext, useCalendarStateContext, } from "./calendar.context.js";
434
14
  export type { CalendarOwnedProps, CalendarOwnerContext, CalendarStateContext, } from "./calendar.context.js";
435
15
  export type { AnyCalendarState, UseCalendarReturn } from "../../composables/use-calendar.js";
@@ -1,10 +1,4 @@
1
- import calendar_year_picker_cell_default from "../calendar-year-picker/calendar-year-picker-cell.js";
2
- import calendar_year_picker_grid_body_default from "../calendar-year-picker/calendar-year-picker-grid-body.js";
3
1
  import { provideCalendarOwnerContext, provideCalendarStateContext, useCalendarOwnerContext, useCalendarStateContext } from "./calendar.context.js";
4
- import calendar_year_picker_grid_default from "../calendar-year-picker/calendar-year-picker-grid.js";
5
- import calendar_year_picker_trigger_heading_default from "../calendar-year-picker/calendar-year-picker-trigger-heading.js";
6
- import calendar_year_picker_trigger_indicator_default from "../calendar-year-picker/calendar-year-picker-trigger-indicator.js";
7
- import calendar_year_picker_trigger_default from "../calendar-year-picker/calendar-year-picker-trigger.js";
8
2
  import calendar_cell_indicator_default from "./calendar-cell-indicator.js";
9
3
  import calendar_cell_default from "./calendar-cell.js";
10
4
  import calendar_grid_body_default from "./calendar-grid-body.js";
@@ -16,24 +10,4 @@ import calendar_heading_default from "./calendar-heading.js";
16
10
  import calendar_nav_button_default from "./calendar-nav-button.js";
17
11
  import calendar_root_default from "./calendar-root.js";
18
12
  import { calendarVariants } from "@ropav/styles";
19
- //#region src/components/calendar/index.ts
20
- var Calendar = Object.assign(calendar_root_default, {
21
- Cell: calendar_cell_default,
22
- CellIndicator: calendar_cell_indicator_default,
23
- Grid: calendar_grid_default,
24
- GridBody: calendar_grid_body_default,
25
- GridHeader: calendar_grid_header_default,
26
- Header: calendar_header_default,
27
- HeaderCell: calendar_header_cell_default,
28
- Heading: calendar_heading_default,
29
- NavButton: calendar_nav_button_default,
30
- Root: calendar_root_default,
31
- YearPickerCell: calendar_year_picker_cell_default,
32
- YearPickerGrid: calendar_year_picker_grid_default,
33
- YearPickerGridBody: calendar_year_picker_grid_body_default,
34
- YearPickerTrigger: calendar_year_picker_trigger_default,
35
- YearPickerTriggerHeading: calendar_year_picker_trigger_heading_default,
36
- YearPickerTriggerIndicator: calendar_year_picker_trigger_indicator_default
37
- });
38
- //#endregion
39
- export { Calendar, calendar_cell_default as CalendarCell, calendar_cell_indicator_default as CalendarCellIndicator, calendar_grid_default as CalendarGrid, calendar_grid_body_default as CalendarGridBody, calendar_grid_header_default as CalendarGridHeader, calendar_header_default as CalendarHeader, calendar_header_cell_default as CalendarHeaderCell, calendar_heading_default as CalendarHeading, calendar_nav_button_default as CalendarNavButton, calendar_root_default as CalendarRoot, calendarVariants, provideCalendarOwnerContext, provideCalendarStateContext, useCalendarOwnerContext, useCalendarStateContext };
13
+ export { calendar_root_default as Calendar, calendar_cell_default as CalendarCell, calendar_cell_indicator_default as CalendarCellIndicator, calendar_grid_default as CalendarGrid, calendar_grid_body_default as CalendarGridBody, calendar_grid_header_default as CalendarGridHeader, calendar_header_default as CalendarHeader, calendar_header_cell_default as CalendarHeaderCell, calendar_heading_default as CalendarHeading, calendar_nav_button_default as CalendarNavButton, calendarVariants, provideCalendarOwnerContext, provideCalendarStateContext, useCalendarOwnerContext, useCalendarStateContext };
@@ -9,7 +9,7 @@ var calendar_year_picker_cell_vue_vue_type_script_setup_true_vapor_true_lang_def
9
9
  __name: "calendar-year-picker-cell",
10
10
  props: {
11
11
  class: {},
12
- year: {},
12
+ id: {},
13
13
  excludeFromTabOrder: {
14
14
  type: Boolean,
15
15
  default: void 0
@@ -17,9 +17,11 @@ var calendar_year_picker_cell_vue_vue_type_script_setup_true_vapor_true_lang_def
17
17
  },
18
18
  setup(__props) {
19
19
  const props = __props;
20
- const { activeYear, focusedYear, getFormattedYear, isYearPickerOpen, selectYear, setActiveYear, slots } = useYearPickerGridContext();
21
- const isSelected = computed(() => props.year === focusedYear.value);
22
- const formattedYear = computed(() => getFormattedYear(props.year));
20
+ const { activeId, focusedId, isYearPickerOpen, selectYear, setActiveId, slots, years } = useYearPickerGridContext();
21
+ const entry = computed(() => years.value[props.id]);
22
+ const year = computed(() => entry.value?.year ?? props.id);
23
+ const isSelected = computed(() => props.id === focusedId.value);
24
+ const formattedYear = computed(() => entry.value?.formatted ?? String(year.value));
23
25
  const styles = computed(() => slots.value.yearCell({ class: props.class }));
24
26
  /**
25
27
  * Only one year is a tab stop, and only while the picker is open.
@@ -27,19 +29,20 @@ var calendar_year_picker_cell_vue_vue_type_script_setup_true_vapor_true_lang_def
27
29
  * The grid moves focus with the arrow keys, so every other cell has to be out of the tab order —
28
30
  * and while the picker is closed the whole list is, or Tab would walk through a hidden grid.
29
31
  */
30
- const isExcludedFromTabOrder = computed(() => props.excludeFromTabOrder ?? !(isYearPickerOpen.value && props.year === activeYear.value));
32
+ const isExcludedFromTabOrder = computed(() => props.excludeFromTabOrder ?? !(isYearPickerOpen.value && props.id === activeId.value));
31
33
  const interaction = useInteractionStates();
32
34
  const slotProps = computed(() => ({
33
35
  formattedYear: formattedYear.value,
34
- isCurrentYear: props.year === (/* @__PURE__ */ new Date()).getFullYear(),
36
+ id: props.id,
37
+ isCurrentYear: entry.value?.isCurrentYear ?? false,
35
38
  isOpen: isYearPickerOpen.value,
36
39
  isSelected: isSelected.value,
37
- selectYear: () => selectYear(props.year),
38
- year: props.year
40
+ selectYear: () => selectYear(props.id),
41
+ year: year.value
39
42
  }));
40
43
  const onFocus = () => {
41
44
  interaction.onFocus();
42
- setActiveYear(props.year);
45
+ setActiveId(props.id);
43
46
  };
44
47
  const n3 = t1();
45
48
  renderEffect(() => {
@@ -49,9 +52,10 @@ var calendar_year_picker_cell_vue_vue_type_script_setup_true_vapor_true_lang_def
49
52
  setClass(n3, styles.value);
50
53
  setAttr(n3, "data-focus-visible", _dataAttr(_interaction.isFocusVisible.value));
51
54
  setAttr(n3, "data-hovered", _dataAttr(_interaction.isHovered.value));
55
+ setAttr(n3, "data-key", props.id);
52
56
  setAttr(n3, "data-pressed", _dataAttr(_interaction.isPressed.value));
53
57
  setAttr(n3, "data-selected", _dataAttr(isSelected.value));
54
- setAttr(n3, "data-year", props.year);
58
+ setAttr(n3, "data-year", year.value);
55
59
  setProp(n3, "tabindex", isExcludedFromTabOrder.value ? -1 : void 0);
56
60
  });
57
61
  setInsertionState(n3);
@@ -61,7 +65,7 @@ var calendar_year_picker_cell_vue_vue_type_script_setup_true_vapor_true_lang_def
61
65
  return n2;
62
66
  });
63
67
  on(n3, "blur", (e) => unref(interaction).onBlur(e));
64
- on(n3, "click", () => unref(selectYear)(props.year));
68
+ on(n3, "click", () => unref(selectYear)(props.id));
65
69
  on(n3, "focus", onFocus);
66
70
  on(n3, "pointercancel", (e) => unref(interaction).onPointerleave(e));
67
71
  on(n3, "pointerdown", (e) => unref(interaction).onPointerdown(e));