vectis-ui 0.1.0 → 0.8.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 (475) hide show
  1. package/README.md +40 -6
  2. package/dist/components/VAccordion/VAccordion.css +1 -1
  3. package/dist/components/VAccordion/VAccordion.d.ts +9 -16
  4. package/dist/components/VAccordion/VAccordion.js.map +1 -1
  5. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js +3 -3
  6. package/dist/components/VAccordion/VAccordion.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/components/VAccordion/VAccordionItem.css +1 -1
  8. package/dist/components/VAccordion/VAccordionItem.d.ts +33 -19
  9. package/dist/components/VAccordion/VAccordionItem.js.map +1 -1
  10. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js +50 -38
  11. package/dist/components/VAccordion/VAccordionItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/components/VAccordion/context.d.ts +1 -8
  13. package/dist/components/VAccordion/context.js.map +1 -1
  14. package/dist/components/VAvatar/VAvatar.css +1 -1
  15. package/dist/components/VAvatar/VAvatar.d.ts +44 -29
  16. package/dist/components/VAvatar/VAvatar.js.map +1 -1
  17. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js +38 -35
  18. package/dist/components/VAvatar/VAvatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/components/VAvatar/VAvatarGroup.d.ts +5 -16
  20. package/dist/components/VAvatar/VAvatarGroup.js.map +1 -1
  21. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js +7 -7
  22. package/dist/components/VAvatar/VAvatarGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/components/VAvatar/context.d.ts +6 -10
  24. package/dist/components/VAvatar/context.js.map +1 -1
  25. package/dist/components/VBadge/VBadge.css +1 -1
  26. package/dist/components/VBadge/VBadge.d.ts +31 -10
  27. package/dist/components/VBadge/VBadge.js.map +1 -1
  28. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js +39 -24
  29. package/dist/components/VBadge/VBadge.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/components/VBreadcrumb/VBreadcrumb.css +1 -1
  31. package/dist/components/VBreadcrumb/VBreadcrumb.d.ts +4 -17
  32. package/dist/components/VBreadcrumb/VBreadcrumb.js.map +1 -1
  33. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js +23 -25
  34. package/dist/components/VBreadcrumb/VBreadcrumb.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/components/VButton/VButton.css +1 -1
  36. package/dist/components/VButton/VButton.d.ts +30 -10
  37. package/dist/components/VButton/VButton.js.map +1 -1
  38. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js +39 -30
  39. package/dist/components/VButton/VButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/components/VButton/VButtonGroup.css +1 -1
  41. package/dist/components/VButton/VButtonGroup.d.ts +76 -13
  42. package/dist/components/VButton/VButtonGroup.js.map +1 -1
  43. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js +74 -8
  44. package/dist/components/VButton/VButtonGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  45. package/dist/components/VButton/context.d.ts +30 -0
  46. package/dist/components/VButton/context.js +6 -0
  47. package/dist/components/VButton/context.js.map +1 -0
  48. package/dist/components/VCalendar/VCalendar.css +1 -1
  49. package/dist/components/VCalendar/VCalendar.d.ts +50 -36
  50. package/dist/components/VCalendar/VCalendar.js.map +1 -1
  51. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js +99 -85
  52. package/dist/components/VCalendar/VCalendar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/components/VCalendar/VCalendarEvent.css +1 -1
  54. package/dist/components/VCalendar/VCalendarEvent.d.ts +5 -11
  55. package/dist/components/VCalendar/VCalendarEvent.js.map +1 -1
  56. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js +7 -1
  57. package/dist/components/VCalendar/VCalendarEvent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  58. package/dist/components/VCalendar/VCalendarMonth.css +1 -1
  59. package/dist/components/VCalendar/VCalendarMonth.d.ts +10 -13
  60. package/dist/components/VCalendar/VCalendarMonth.js.map +1 -1
  61. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js +183 -244
  62. package/dist/components/VCalendar/VCalendarMonth.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/components/VCalendar/VCalendarTimeGrid.css +1 -1
  64. package/dist/components/VCalendar/VCalendarTimeGrid.d.ts +15 -20
  65. package/dist/components/VCalendar/VCalendarTimeGrid.js.map +1 -1
  66. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js +385 -448
  67. package/dist/components/VCalendar/VCalendarTimeGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
  68. package/dist/components/VCalendar/VCalendarYear.css +1 -1
  69. package/dist/components/VCalendar/VCalendarYear.js.map +1 -1
  70. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js +53 -49
  71. package/dist/components/VCalendar/VCalendarYear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/components/VCalendar/gesture.d.ts +158 -0
  73. package/dist/components/VCalendar/gesture.js +170 -0
  74. package/dist/components/VCalendar/gesture.js.map +1 -0
  75. package/dist/components/VCalendar/keyboard.d.ts +9 -3
  76. package/dist/components/VCalendar/keyboard.js +2 -6
  77. package/dist/components/VCalendar/keyboard.js.map +1 -1
  78. package/dist/components/VCalendar/layout.d.ts +67 -54
  79. package/dist/components/VCalendar/layout.js +77 -69
  80. package/dist/components/VCalendar/layout.js.map +1 -1
  81. package/dist/components/VCalendar/timeGrid.d.ts +55 -0
  82. package/dist/components/VCalendar/timeGrid.js +71 -0
  83. package/dist/components/VCalendar/timeGrid.js.map +1 -0
  84. package/dist/components/VCalendar/types.d.ts +41 -16
  85. package/dist/components/VCarousel/VCarousel.css +1 -1
  86. package/dist/components/VCarousel/VCarousel.d.ts +21 -41
  87. package/dist/components/VCarousel/VCarousel.js.map +1 -1
  88. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js +157 -129
  89. package/dist/components/VCarousel/VCarousel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  90. package/dist/components/VCarousel/VCarouselItem.d.ts +0 -17
  91. package/dist/components/VCarousel/VCarouselItem.js.map +1 -1
  92. package/dist/components/VCarousel/VCarouselItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/components/VCarousel/context.d.ts +0 -12
  94. package/dist/components/VCarousel/context.js.map +1 -1
  95. package/dist/components/VCheckbox/VCheckbox.css +1 -1
  96. package/dist/components/VCheckbox/VCheckbox.d.ts +31 -16
  97. package/dist/components/VCheckbox/VCheckbox.js.map +1 -1
  98. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js +62 -29
  99. package/dist/components/VCheckbox/VCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  100. package/dist/components/VChip/VChip.css +1 -1
  101. package/dist/components/VChip/VChip.d.ts +36 -26
  102. package/dist/components/VChip/VChip.js.map +1 -1
  103. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js +57 -48
  104. package/dist/components/VChip/VChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  105. package/dist/components/VCombobox/VCombobox.css +1 -1
  106. package/dist/components/VCombobox/VCombobox.d.ts +127 -31
  107. package/dist/components/VCombobox/VCombobox.js.map +1 -1
  108. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js +336 -247
  109. package/dist/components/VCombobox/VCombobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/components/VCombobox/VComboboxGroup.css +1 -1
  111. package/dist/components/VCombobox/VComboboxGroup.d.ts +0 -9
  112. package/dist/components/VCombobox/VComboboxGroup.js.map +1 -1
  113. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js +1 -1
  114. package/dist/components/VCombobox/VComboboxGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  115. package/dist/components/VCombobox/VComboboxOption.css +1 -1
  116. package/dist/components/VCombobox/VComboboxOption.d.ts +0 -15
  117. package/dist/components/VCombobox/VComboboxOption.js.map +1 -1
  118. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js +4 -4
  119. package/dist/components/VCombobox/VComboboxOption.vue_vue_type_script_setup_true_lang.js.map +1 -1
  120. package/dist/components/VCombobox/VComboboxSeparator.js.map +1 -1
  121. package/dist/components/VCombobox/VComboboxSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/components/VCombobox/infiniteScroll.js.map +1 -1
  123. package/dist/components/VDataTable/VDataTable.css +1 -1
  124. package/dist/components/VDataTable/VDataTable.d.ts +50 -28
  125. package/dist/components/VDataTable/VDataTable.js.map +1 -1
  126. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js +183 -194
  127. package/dist/components/VDataTable/VDataTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  128. package/dist/components/VDateInput/VDateInput.css +1 -1
  129. package/dist/components/VDateInput/VDateInput.d.ts +90 -42
  130. package/dist/components/VDateInput/VDateInput.js.map +1 -1
  131. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js +159 -191
  132. package/dist/components/VDateInput/VDateInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/components/VDatePicker/VDatePicker.css +1 -1
  134. package/dist/components/VDatePicker/VDatePicker.d.ts +61 -30
  135. package/dist/components/VDatePicker/VDatePicker.js.map +1 -1
  136. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js +243 -221
  137. package/dist/components/VDatePicker/VDatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  138. package/dist/components/VDialog/VDialog.css +1 -1
  139. package/dist/components/VDialog/VDialog.d.ts +45 -33
  140. package/dist/components/VDialog/VDialog.js.map +1 -1
  141. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js +65 -64
  142. package/dist/components/VDialog/VDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/components/VDialog/VDialogAlert.d.ts +24 -20
  144. package/dist/components/VDialog/VDialogAlert.js.map +1 -1
  145. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js +36 -25
  146. package/dist/components/VDialog/VDialogAlert.vue_vue_type_script_setup_true_lang.js.map +1 -1
  147. package/dist/components/VFileInput/VFileInput.css +1 -1
  148. package/dist/components/VFileInput/VFileInput.d.ts +78 -26
  149. package/dist/components/VFileInput/VFileInput.js.map +1 -1
  150. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js +144 -132
  151. package/dist/components/VFileInput/VFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  152. package/dist/components/VFilePicker/VFilePicker.css +1 -1
  153. package/dist/components/VFilePicker/VFilePicker.d.ts +47 -30
  154. package/dist/components/VFilePicker/VFilePicker.js.map +1 -1
  155. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js +166 -163
  156. package/dist/components/VFilePicker/VFilePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  157. package/dist/components/VFilePicker/fileKind.d.ts +2 -27
  158. package/dist/components/VFilePicker/fileKind.js +9 -8
  159. package/dist/components/VFilePicker/fileKind.js.map +1 -1
  160. package/dist/components/VHotkeys/VHotkeys.css +1 -1
  161. package/dist/components/VHotkeys/VHotkeys.d.ts +8 -30
  162. package/dist/components/VHotkeys/VHotkeys.js.map +1 -1
  163. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js +4 -4
  164. package/dist/components/VHotkeys/VHotkeys.vue_vue_type_script_setup_true_lang.js.map +1 -1
  165. package/dist/components/VHotkeys/platform.js.map +1 -1
  166. package/dist/components/VIcon/VIcon.css +1 -1
  167. package/dist/components/VIcon/VIcon.d.ts +15 -6
  168. package/dist/components/VIcon/VIcon.js.map +1 -1
  169. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js +45 -37
  170. package/dist/components/VIcon/VIcon.vue_vue_type_script_setup_true_lang.js.map +1 -1
  171. package/dist/components/VIcon/iconProps.js.map +1 -1
  172. package/dist/components/VIcon/icons/index.d.ts +1 -1
  173. package/dist/components/VIcon/icons/index.js.map +1 -1
  174. package/dist/components/VIcon/icons/names.d.ts +1 -1
  175. package/dist/components/VIcon/icons/names.js.map +1 -1
  176. package/dist/components/VIcon/resolver.d.ts +3 -3
  177. package/dist/components/VIcon/resolver.js.map +1 -1
  178. package/dist/components/VIcon/types.d.ts +12 -12
  179. package/dist/components/VIconButton/VIconButton.css +1 -1
  180. package/dist/components/VIconButton/VIconButton.d.ts +28 -11
  181. package/dist/components/VIconButton/VIconButton.js.map +1 -1
  182. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js +26 -20
  183. package/dist/components/VIconButton/VIconButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  184. package/dist/components/VInput/VInput.css +1 -1
  185. package/dist/components/VInput/VInput.d.ts +26 -7
  186. package/dist/components/VInput/VInput.js.map +1 -1
  187. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js +86 -75
  188. package/dist/components/VInput/VInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  189. package/dist/components/VInput/VInputGroup.css +2 -0
  190. package/dist/components/VInput/VInputGroup.d.ts +47 -0
  191. package/dist/components/VInput/VInputGroup.js +9 -0
  192. package/dist/components/VInput/VInputGroup.js.map +1 -0
  193. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js +80 -0
  194. package/dist/components/VInput/VInputGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
  195. package/dist/components/VInput/context.d.ts +11 -0
  196. package/dist/components/VInput/context.js +6 -0
  197. package/dist/components/VInput/context.js.map +1 -0
  198. package/dist/components/VInputOTP/VInputOTP.css +1 -1
  199. package/dist/components/VInputOTP/VInputOTP.d.ts +37 -22
  200. package/dist/components/VInputOTP/VInputOTP.js.map +1 -1
  201. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js +98 -61
  202. package/dist/components/VInputOTP/VInputOTP.vue_vue_type_script_setup_true_lang.js.map +1 -1
  203. package/dist/components/VMenu/VMenu.d.ts +23 -30
  204. package/dist/components/VMenu/VMenu.js.map +1 -1
  205. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js +31 -27
  206. package/dist/components/VMenu/VMenu.vue_vue_type_script_setup_true_lang.js.map +1 -1
  207. package/dist/components/VMenu/VMenuGroup.css +1 -1
  208. package/dist/components/VMenu/VMenuGroup.d.ts +12 -8
  209. package/dist/components/VMenu/VMenuGroup.js.map +1 -1
  210. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js +11 -11
  211. package/dist/components/VMenu/VMenuGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  212. package/dist/components/VMenu/VMenuItem.css +1 -1
  213. package/dist/components/VMenu/VMenuItem.d.ts +11 -19
  214. package/dist/components/VMenu/VMenuItem.js.map +1 -1
  215. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js +65 -57
  216. package/dist/components/VMenu/VMenuItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  217. package/dist/components/VMenu/VMenuPanel.d.ts +14 -30
  218. package/dist/components/VMenu/VMenuPanel.js.map +1 -1
  219. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js +43 -44
  220. package/dist/components/VMenu/VMenuPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  221. package/dist/components/VMenu/context.d.ts +2 -6
  222. package/dist/components/VMenu/context.js.map +1 -1
  223. package/dist/components/VPagination/VPagination.css +1 -1
  224. package/dist/components/VPagination/VPagination.d.ts +60 -22
  225. package/dist/components/VPagination/VPagination.js.map +1 -1
  226. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js +113 -161
  227. package/dist/components/VPagination/VPagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  228. package/dist/components/VPopover/VPopover.css +1 -1
  229. package/dist/components/VPopover/VPopover.d.ts +26 -7
  230. package/dist/components/VPopover/VPopover.js.map +1 -1
  231. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js +43 -37
  232. package/dist/components/VPopover/VPopover.vue_vue_type_script_setup_true_lang.js.map +1 -1
  233. package/dist/components/VProgressCircular/VProgressCircular.css +1 -1
  234. package/dist/components/VProgressCircular/VProgressCircular.d.ts +15 -4
  235. package/dist/components/VProgressCircular/VProgressCircular.js.map +1 -1
  236. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js +32 -30
  237. package/dist/components/VProgressCircular/VProgressCircular.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/components/VProgressLinear/VProgressLinear.css +1 -1
  239. package/dist/components/VProgressLinear/VProgressLinear.d.ts +23 -8
  240. package/dist/components/VProgressLinear/VProgressLinear.js.map +1 -1
  241. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js +34 -32
  242. package/dist/components/VProgressLinear/VProgressLinear.vue_vue_type_script_setup_true_lang.js.map +1 -1
  243. package/dist/components/VRadio/VRadio.css +1 -1
  244. package/dist/components/VRadio/VRadio.d.ts +36 -18
  245. package/dist/components/VRadio/VRadio.js.map +1 -1
  246. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js +55 -26
  247. package/dist/components/VRadio/VRadio.vue_vue_type_script_setup_true_lang.js.map +1 -1
  248. package/dist/components/VSeparator/VSeparator.d.ts +4 -2
  249. package/dist/components/VSeparator/VSeparator.js.map +1 -1
  250. package/dist/components/VSeparator/VSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  251. package/dist/components/VSideNavigation/VSideNavigation.css +1 -1
  252. package/dist/components/VSideNavigation/VSideNavigation.d.ts +5 -19
  253. package/dist/components/VSideNavigation/VSideNavigation.js.map +1 -1
  254. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js +5 -5
  255. package/dist/components/VSideNavigation/VSideNavigation.vue_vue_type_script_setup_true_lang.js.map +1 -1
  256. package/dist/components/VSideNavigation/VSideNavigationGroup.css +1 -1
  257. package/dist/components/VSideNavigation/VSideNavigationGroup.d.ts +9 -17
  258. package/dist/components/VSideNavigation/VSideNavigationGroup.js.map +1 -1
  259. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js +2 -2
  260. package/dist/components/VSideNavigation/VSideNavigationGroup.vue_vue_type_script_setup_true_lang.js.map +1 -1
  261. package/dist/components/VSideNavigation/VSideNavigationItem.css +1 -1
  262. package/dist/components/VSideNavigation/VSideNavigationItem.d.ts +22 -30
  263. package/dist/components/VSideNavigation/VSideNavigationItem.js.map +1 -1
  264. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js +77 -87
  265. package/dist/components/VSideNavigation/VSideNavigationItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  266. package/dist/components/VSideNavigation/context.d.ts +0 -14
  267. package/dist/components/VSideNavigation/context.js.map +1 -1
  268. package/dist/components/VSkeletonLoader/VSkeletonLoader.css +1 -1
  269. package/dist/components/VSkeletonLoader/VSkeletonLoader.d.ts +9 -9
  270. package/dist/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
  271. package/dist/components/VSkeletonLoader/VSkeletonLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/components/VSlider/VSlider.css +1 -1
  273. package/dist/components/VSlider/VSlider.d.ts +52 -27
  274. package/dist/components/VSlider/VSlider.js.map +1 -1
  275. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js +202 -118
  276. package/dist/components/VSlider/VSlider.vue_vue_type_script_setup_true_lang.js.map +1 -1
  277. package/dist/components/VSnackbar/VSnackbar.css +1 -1
  278. package/dist/components/VSnackbar/VSnackbar.d.ts +0 -23
  279. package/dist/components/VSnackbar/VSnackbar.js.map +1 -1
  280. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js +38 -38
  281. package/dist/components/VSnackbar/VSnackbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  282. package/dist/components/VSnackbar/state.d.ts +0 -27
  283. package/dist/components/VSnackbar/state.js.map +1 -1
  284. package/dist/components/VSpinner/VSpinner.css +1 -1
  285. package/dist/components/VSpinner/VSpinner.d.ts +6 -6
  286. package/dist/components/VSpinner/VSpinner.js.map +1 -1
  287. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js +10 -9
  288. package/dist/components/VSpinner/VSpinner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  289. package/dist/components/VSwitch/VSwitch.css +1 -1
  290. package/dist/components/VSwitch/VSwitch.d.ts +35 -13
  291. package/dist/components/VSwitch/VSwitch.js.map +1 -1
  292. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js +62 -21
  293. package/dist/components/VSwitch/VSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  294. package/dist/components/VTabs/VTab.css +1 -1
  295. package/dist/components/VTabs/VTab.d.ts +12 -12
  296. package/dist/components/VTabs/VTab.js.map +1 -1
  297. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js +36 -24
  298. package/dist/components/VTabs/VTab.vue_vue_type_script_setup_true_lang.js.map +1 -1
  299. package/dist/components/VTabs/VTabPanel.d.ts +2 -10
  300. package/dist/components/VTabs/VTabPanel.js.map +1 -1
  301. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js +4 -4
  302. package/dist/components/VTabs/VTabPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  303. package/dist/components/VTabs/VTabs.css +1 -1
  304. package/dist/components/VTabs/VTabs.d.ts +27 -18
  305. package/dist/components/VTabs/VTabs.js.map +1 -1
  306. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js +92 -81
  307. package/dist/components/VTabs/VTabs.vue_vue_type_script_setup_true_lang.js.map +1 -1
  308. package/dist/components/VTabs/context.d.ts +9 -19
  309. package/dist/components/VTabs/context.js +1 -1
  310. package/dist/components/VTabs/context.js.map +1 -1
  311. package/dist/components/VTextarea/VTextarea.css +1 -1
  312. package/dist/components/VTextarea/VTextarea.d.ts +34 -6
  313. package/dist/components/VTextarea/VTextarea.js.map +1 -1
  314. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js +91 -74
  315. package/dist/components/VTextarea/VTextarea.vue_vue_type_script_setup_true_lang.js.map +1 -1
  316. package/dist/components/VTimeInput/VTimeInput.css +1 -1
  317. package/dist/components/VTimeInput/VTimeInput.d.ts +123 -33
  318. package/dist/components/VTimeInput/VTimeInput.js.map +1 -1
  319. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js +294 -291
  320. package/dist/components/VTimeInput/VTimeInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  321. package/dist/components/VTimeInput/search.d.ts +24 -0
  322. package/dist/components/VTimeInput/search.js +22 -0
  323. package/dist/components/VTimeInput/search.js.map +1 -0
  324. package/dist/components/VTimePicker/VTimePicker.css +1 -1
  325. package/dist/components/VTimePicker/VTimePicker.d.ts +51 -30
  326. package/dist/components/VTimePicker/VTimePicker.js.map +1 -1
  327. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js +216 -151
  328. package/dist/components/VTimePicker/VTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  329. package/dist/components/VTimePicker/limits.d.ts +88 -0
  330. package/dist/components/VTimePicker/limits.js +70 -0
  331. package/dist/components/VTimePicker/limits.js.map +1 -0
  332. package/dist/components/VToast/VToast.css +1 -1
  333. package/dist/components/VToast/VToast.d.ts +0 -10
  334. package/dist/components/VToast/VToast.js.map +1 -1
  335. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js +10 -10
  336. package/dist/components/VToast/VToast.vue_vue_type_script_setup_true_lang.js.map +1 -1
  337. package/dist/components/VToast/VToaster.css +1 -1
  338. package/dist/components/VToast/VToaster.d.ts +0 -17
  339. package/dist/components/VToast/VToaster.js.map +1 -1
  340. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js +29 -28
  341. package/dist/components/VToast/VToaster.vue_vue_type_script_setup_true_lang.js.map +1 -1
  342. package/dist/components/VToast/state.d.ts +10 -19
  343. package/dist/components/VToast/state.js +1 -1
  344. package/dist/components/VToast/state.js.map +1 -1
  345. package/dist/components/VToggle/VToggle.css +1 -1
  346. package/dist/components/VToggle/VToggle.d.ts +56 -11
  347. package/dist/components/VToggle/VToggle.js.map +1 -1
  348. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js +80 -46
  349. package/dist/components/VToggle/VToggle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  350. package/dist/components/VToggle/VToggleItem.d.ts +16 -2
  351. package/dist/components/VToggle/VToggleItem.js +0 -2
  352. package/dist/components/VToggle/VToggleItem.js.map +1 -1
  353. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js +23 -15
  354. package/dist/components/VToggle/VToggleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  355. package/dist/components/VToggle/context.d.ts +4 -24
  356. package/dist/components/VToggle/context.js.map +1 -1
  357. package/dist/components/VTooltip/VTooltip.css +1 -1
  358. package/dist/components/VTooltip/VTooltip.d.ts +9 -33
  359. package/dist/components/VTooltip/VTooltip.js.map +1 -1
  360. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js +28 -24
  361. package/dist/components/VTooltip/VTooltip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  362. package/dist/components/VTypography/VTypography.js.map +1 -1
  363. package/dist/components/VTypography/VTypography.vue_vue_type_script_setup_true_lang.js.map +1 -1
  364. package/dist/composables/useAriaLabel.d.ts +0 -17
  365. package/dist/composables/useAriaLabel.js.map +1 -1
  366. package/dist/composables/useClearable.d.ts +42 -0
  367. package/dist/composables/useClearable.js +19 -0
  368. package/dist/composables/useClearable.js.map +1 -0
  369. package/dist/composables/useControlShape.d.ts +22 -0
  370. package/dist/composables/useControlShape.js +13 -0
  371. package/dist/composables/useControlShape.js.map +1 -0
  372. package/dist/composables/useDetailsOpen.d.ts +22 -0
  373. package/dist/composables/useDetailsOpen.js +21 -0
  374. package/dist/composables/useDetailsOpen.js.map +1 -0
  375. package/dist/composables/useFieldIds.d.ts +0 -15
  376. package/dist/composables/useFieldIds.js +8 -7
  377. package/dist/composables/useFieldIds.js.map +1 -1
  378. package/dist/composables/useFieldPanel.d.ts +21 -18
  379. package/dist/composables/useFieldPanel.js +43 -23
  380. package/dist/composables/useFieldPanel.js.map +1 -1
  381. package/dist/composables/useFileDrop.d.ts +0 -22
  382. package/dist/composables/useFileDrop.js.map +1 -1
  383. package/dist/composables/useFileField.d.ts +45 -17
  384. package/dist/composables/useFileField.js +40 -20
  385. package/dist/composables/useFileField.js.map +1 -1
  386. package/dist/composables/useFocusoutDismiss.d.ts +0 -15
  387. package/dist/composables/useFocusoutDismiss.js.map +1 -1
  388. package/dist/composables/useIconClickHandlers.d.ts +29 -14
  389. package/dist/composables/useIconClickHandlers.js +15 -5
  390. package/dist/composables/useIconClickHandlers.js.map +1 -1
  391. package/dist/composables/useInertLink.d.ts +20 -0
  392. package/dist/composables/useInertLink.js +23 -0
  393. package/dist/composables/useInertLink.js.map +1 -0
  394. package/dist/composables/useMaskedField.d.ts +33 -10
  395. package/dist/composables/useMaskedField.js +45 -1
  396. package/dist/composables/useMaskedField.js.map +1 -1
  397. package/dist/composables/usePopover.d.ts +15 -1
  398. package/dist/composables/usePopover.js +23 -8
  399. package/dist/composables/usePopover.js.map +1 -1
  400. package/dist/composables/useProgressValue.d.ts +5 -8
  401. package/dist/composables/useProgressValue.js +6 -3
  402. package/dist/composables/useProgressValue.js.map +1 -1
  403. package/dist/composables/useRootAttrs.d.ts +12 -19
  404. package/dist/composables/useRootAttrs.js.map +1 -1
  405. package/dist/composables/useTimer.d.ts +8 -10
  406. package/dist/composables/useTimer.js.map +1 -1
  407. package/dist/i18n/en.d.ts +2 -10
  408. package/dist/i18n/en.js +18 -19
  409. package/dist/i18n/en.js.map +1 -1
  410. package/dist/i18n/fr.d.ts +2 -18
  411. package/dist/i18n/fr.js +18 -19
  412. package/dist/i18n/fr.js.map +1 -1
  413. package/dist/i18n/state.d.ts +44 -47
  414. package/dist/i18n/state.js +20 -17
  415. package/dist/i18n/state.js.map +1 -1
  416. package/dist/i18n/types.d.ts +53 -44
  417. package/dist/icons.d.ts +3 -3
  418. package/dist/index.d.ts +43 -17
  419. package/dist/index.js +45 -44
  420. package/dist/styles.css +1 -1
  421. package/dist/tokens/css.js.map +1 -1
  422. package/dist/tokens/index.d.ts +5 -1
  423. package/dist/tokens/primitives.js.map +1 -1
  424. package/dist/tokens/semantic.d.ts +5 -1
  425. package/dist/tokens/semantic.js +6 -2
  426. package/dist/tokens/semantic.js.map +1 -1
  427. package/dist/tokens/themes/dark.js.map +1 -1
  428. package/dist/tokens/types.d.ts +7 -15
  429. package/dist/tokens/types.js.map +1 -1
  430. package/dist/tokens.json +25 -5
  431. package/dist/types.d.ts +24 -0
  432. package/dist/utils/array.d.ts +3 -6
  433. package/dist/utils/array.js.map +1 -1
  434. package/dist/utils/arrowNav.d.ts +17 -17
  435. package/dist/utils/arrowNav.js +5 -3
  436. package/dist/utils/arrowNav.js.map +1 -1
  437. package/dist/utils/chip.d.ts +11 -15
  438. package/dist/utils/chip.js.map +1 -1
  439. package/dist/utils/css.d.ts +22 -11
  440. package/dist/utils/css.js +5 -2
  441. package/dist/utils/css.js.map +1 -1
  442. package/dist/utils/date.d.ts +42 -19
  443. package/dist/utils/date.js +97 -98
  444. package/dist/utils/date.js.map +1 -1
  445. package/dist/utils/direction.d.ts +6 -12
  446. package/dist/utils/direction.js.map +1 -1
  447. package/dist/utils/env.d.ts +5 -6
  448. package/dist/utils/file.d.ts +46 -58
  449. package/dist/utils/file.js +43 -36
  450. package/dist/utils/file.js.map +1 -1
  451. package/dist/utils/focus.d.ts +8 -17
  452. package/dist/utils/focus.js.map +1 -1
  453. package/dist/utils/hostWarns.d.ts +12 -0
  454. package/dist/utils/hostWarns.js +6 -0
  455. package/dist/utils/hostWarns.js.map +1 -0
  456. package/dist/utils/ids.d.ts +10 -0
  457. package/dist/utils/ids.js +8 -0
  458. package/dist/utils/ids.js.map +1 -0
  459. package/dist/utils/matcher.d.ts +5 -9
  460. package/dist/utils/matcher.js.map +1 -1
  461. package/dist/utils/memo.d.ts +12 -0
  462. package/dist/utils/memo.js +9 -0
  463. package/dist/utils/memo.js.map +1 -0
  464. package/dist/utils/number.d.ts +3 -4
  465. package/dist/utils/number.js.map +1 -1
  466. package/dist/utils/text.d.ts +20 -9
  467. package/dist/utils/text.js +17 -3
  468. package/dist/utils/text.js.map +1 -1
  469. package/dist/utils/time.d.ts +53 -61
  470. package/dist/utils/time.js +49 -45
  471. package/dist/utils/time.js.map +1 -1
  472. package/dist/utils/vnode.d.ts +8 -15
  473. package/dist/utils/vnode.js.map +1 -1
  474. package/package.json +6 -6
  475. package/dist/components/VToggle/VToggleItem.css +0 -2
package/dist/i18n/fr.d.ts CHANGED
@@ -1,18 +1,2 @@
1
- import { VectisMessages } from './types.js';
2
- /**
3
- * French. Nothing reaches this file unless it is asked for, so a project that does not
4
- * use it never carries it: the library is packaged one module at a time, and a module
5
- * nobody imports is left out.
6
- *
7
- * Turning it on and adding a language the library does not ship at all are the SAME
8
- * gesture. There are deliberately not two kinds of dictionary, one blessed and one added
9
- * by hand:
10
- *
11
- * import { fr, registerMessages, setLocale } from 'vectis-ui'
12
- * registerMessages('fr', fr)
13
- * setLocale('fr-FR')
14
- *
15
- * The curly apostrophes below are deliberate and are part of the text: some tests check
16
- * these words letter for letter, and a straight apostrophe is a different letter.
17
- */
18
- export declare const fr: VectisMessages;
1
+ import { Messages } from './types.js';
2
+ export declare const fr: Messages;
package/dist/i18n/fr.js CHANGED
@@ -5,6 +5,7 @@ var e = {
5
5
  clear: "Effacer",
6
6
  close: "Fermer",
7
7
  dismiss: "Retirer",
8
+ remove: (e) => `Retirer ${e}`,
8
9
  cancel: "Annuler",
9
10
  confirm: "OK"
10
11
  },
@@ -12,8 +13,7 @@ var e = {
12
13
  label: "Pagination",
13
14
  previous: "Page précédente",
14
15
  next: "Page suivante",
15
- page: (e) => `Page ${e}`,
16
- hiddenPages: "Pages masquées"
16
+ page: (e) => `Page ${e}`
17
17
  },
18
18
  tabs: {
19
19
  label: "Onglets",
@@ -27,8 +27,7 @@ var e = {
27
27
  sideNavigation: { label: "Navigation" },
28
28
  combobox: {
29
29
  empty: "Aucun résultat",
30
- clear: "Effacer la sélection",
31
- remove: (e) => `Retirer ${e}`
30
+ clear: "Effacer la sélection"
32
31
  },
33
32
  dataTable: {
34
33
  empty: "Aucune donnée",
@@ -84,6 +83,7 @@ var e = {
84
83
  label: (e) => `Raccourci clavier : ${e}`
85
84
  },
86
85
  datePicker: {
86
+ label: "Sélecteur de date",
87
87
  previousMonth: "Mois précédent",
88
88
  nextMonth: "Mois suivant",
89
89
  previousYear: "Année précédente",
@@ -93,41 +93,40 @@ var e = {
93
93
  },
94
94
  dateInput: {
95
95
  clear: "Effacer la date",
96
- open: "Ouvrir le calendrier",
97
- label: "Choisir une date"
96
+ openPicker: "Ouvrir le calendrier",
97
+ pickerLabel: "Choisir une date"
98
98
  },
99
99
  timePicker: {
100
+ label: "Sélecteur d'heure",
100
101
  meridiem: "AM ou PM",
101
102
  am: "AM",
102
103
  pm: "PM",
103
104
  selectHour: "Sélectionner l’heure",
104
- selectMinute: "Sélectionner les minutes",
105
- hourStep: "Sélection de l’heure",
106
- minuteStep: "Sélection des minutes",
105
+ selectMinutes: "Sélectionner les minutes",
106
+ choosingHour: "Sélection de l’heure",
107
+ choosingMinutes: "Sélection des minutes",
107
108
  hour: "Heure",
108
109
  minutes: "Minutes",
109
- hoursValue: (e) => `${e} heures`,
110
+ hourValue: (e) => `${e} heures`,
110
111
  minutesValue: (e) => `${e} minutes`
111
112
  },
112
113
  timeInput: {
113
114
  clear: "Effacer l'heure",
114
- openList: "Ouvrir la liste des heures",
115
115
  openPicker: "Ouvrir le sélecteur d’heure",
116
- listLabel: "Heures disponibles",
117
116
  pickerLabel: "Choisir une heure",
118
- maskPlaceholder: "hh:mm"
117
+ meridiemValue: (e) => `AM ou PM : ${e}`,
118
+ maskPlaceholder: "hh:mm",
119
+ unavailable: "Cette heure n'est pas disponible."
119
120
  },
120
121
  fileInput: {
121
- attach: "Choisir des fichiers",
122
+ openPicker: "Choisir des fichiers",
122
123
  clear: "Effacer les fichiers",
123
- remove: (e) => `Retirer ${e}`,
124
124
  files: (e) => `${e} fichier${e > 1 ? "s" : ""}`,
125
125
  placeholder: "Aucun fichier sélectionné"
126
126
  },
127
127
  filePicker: {
128
128
  browse: "Parcourir les fichiers",
129
129
  or: "ou",
130
- remove: (e) => `Retirer ${e}`,
131
130
  list: "Fichiers sélectionnés"
132
131
  },
133
132
  carousel: {
@@ -164,10 +163,10 @@ var e = {
164
163
  allDay: "Journée",
165
164
  moreEvents: (e) => `+${e} autre${e > 1 ? "s" : ""}`,
166
165
  openDay: (e) => `Ouvrir le ${e}`,
167
- newEvent: (e) => `Évènement n°${e}`,
166
+ untitled: "(Sans titre)",
168
167
  eventRoleDescription: "évènement",
169
- eventHint: "Appuyez sur Entrée pour saisir cet évènement, puis sur les flèches pour le déplacer et sur Maj avec les flèches pour changer son heure de fin.",
170
- grabbed: "Évènement saisi. Utilisez les flèches pour le déplacer, Entrée pour le poser, Échap pour annuler.",
168
+ eventHint: "Appuyez sur Entrée pour ouvrir cet évènement. Appuyez sur Espace pour le saisir, puis sur les flèches pour le déplacer et sur Maj avec les flèches pour changer son heure de fin.",
169
+ grabbed: "Évènement saisi. Utilisez les flèches pour le déplacer, Entrée ou Espace pour le poser, Échap pour annuler.",
171
170
  dropped: "Évènement posé.",
172
171
  reverted: "Déplacement annulé. L'évènement est revenu à sa place.",
173
172
  movedTo: (e, t) => `${e} déplacé au ${t}.`
@@ -1 +1 @@
1
- {"version":3,"file":"fr.js","names":[],"sources":["../../src/i18n/fr.ts"],"sourcesContent":["import type { VectisMessages } from './types'\n\n/**\n * French. Nothing reaches this file unless it is asked for, so a project that does not\n * use it never carries it: the library is packaged one module at a time, and a module\n * nobody imports is left out.\n *\n * Turning it on and adding a language the library does not ship at all are the SAME\n * gesture. There are deliberately not two kinds of dictionary, one blessed and one added\n * by hand:\n *\n * import { fr, registerMessages, setLocale } from 'vectis-ui'\n * registerMessages('fr', fr)\n * setLocale('fr-FR')\n *\n * The curly apostrophes below are deliberate and are part of the text: some tests check\n * these words letter for letter, and a straight apostrophe is a different letter.\n */\nexport const fr: VectisMessages = {\n common: {\n loading: 'Chargement…',\n clear: 'Effacer',\n close: 'Fermer',\n dismiss: 'Retirer',\n cancel: 'Annuler',\n confirm: 'OK',\n },\n pagination: {\n label: 'Pagination',\n previous: 'Page précédente',\n next: 'Page suivante',\n page: (page) => `Page ${page}`,\n hiddenPages: 'Pages masquées',\n },\n tabs: {\n label: 'Onglets',\n previous: 'Onglets précédents',\n next: 'Onglets suivants',\n },\n breadcrumb: {\n label: \"Fil d'Ariane\",\n ellipsis: 'Afficher les pages intermédiaires',\n },\n sideNavigation: { label: 'Navigation' },\n combobox: {\n empty: 'Aucun résultat',\n clear: 'Effacer la sélection',\n remove: (label) => `Retirer ${label}`,\n },\n dataTable: {\n empty: 'Aucune donnée',\n loading: 'Chargement des données…',\n searchLabel: 'Rechercher dans le tableau',\n searchPlaceholder: 'Rechercher…',\n perPage: 'Lignes par page',\n perPageValue: (label, value) => `${label} : ${value}`,\n selectAll: 'Tout sélectionner',\n selectRow: (index) => `Sélectionner la ligne ${index}`,\n selection: (count) =>\n `${count} élément${count > 1 ? 's' : ''} sélectionné${count > 1 ? 's' : ''}`,\n range: ({ start, end, total }) => `${start}–${end} sur ${total}`,\n pagination: 'Pagination du tableau',\n },\n toaster: { label: 'Notifications' },\n snackbar: { label: 'Confirmation', action: 'Annuler' },\n inputOTP: {\n label: 'Code de vérification',\n slot: (index, total) => `Caractère ${index} sur ${total}`,\n },\n slider: {\n value: 'Valeur',\n start: 'Début',\n end: 'Fin',\n rangeStart: (label) => `${label} (début)`,\n rangeEnd: (label) => `${label} (fin)`,\n },\n field: {\n limitExceeded: (max) => `Dépasse la limite de ${max} caractères`,\n },\n // The space before the sign is a NON-BREAKING one, as French typography requires and\n // English does not. It is written as an escape rather than typed in: the linter refuses\n // the character itself, and it would be indistinguishable from an ordinary space in a\n // review.\n progress: { percent: (percent) => `${percent}\\u00A0%`, label: 'Progression' },\n hotkeys: {\n command: 'Commande',\n ctrl: 'Ctrl',\n alt: 'Alt',\n shift: 'Maj',\n windows: 'Win',\n super: 'Super',\n enter: 'Entrée',\n escape: 'Échap',\n space: 'Espace',\n backspace: 'Retour arrière',\n delete: 'Suppr',\n tab: 'Tab',\n up: 'Flèche haut',\n down: 'Flèche bas',\n left: 'Flèche gauche',\n right: 'Flèche droite',\n label: (keys) => `Raccourci clavier : ${keys}`,\n },\n datePicker: {\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n previousYear: 'Année précédente',\n nextYear: 'Année suivante',\n monthPicker: 'Choix du mois',\n yearPicker: \"Choix de l'année\",\n },\n dateInput: {\n clear: 'Effacer la date',\n open: 'Ouvrir le calendrier',\n label: 'Choisir une date',\n },\n timePicker: {\n meridiem: 'AM ou PM',\n am: 'AM',\n pm: 'PM',\n selectHour: 'Sélectionner l’heure',\n selectMinute: 'Sélectionner les minutes',\n hourStep: 'Sélection de l’heure',\n minuteStep: 'Sélection des minutes',\n hour: 'Heure',\n minutes: 'Minutes',\n hoursValue: (hour) => `${hour} heures`,\n minutesValue: (minute) => `${minute} minutes`,\n },\n timeInput: {\n clear: \"Effacer l'heure\",\n openList: 'Ouvrir la liste des heures',\n openPicker: 'Ouvrir le sélecteur d’heure',\n listLabel: 'Heures disponibles',\n pickerLabel: 'Choisir une heure',\n maskPlaceholder: 'hh:mm',\n },\n fileInput: {\n attach: 'Choisir des fichiers',\n clear: 'Effacer les fichiers',\n remove: (name) => `Retirer ${name}`,\n // The French plural starts at two, the English one at zero — \"0 fichier\" against\n // \"0 files\". Each language therefore makes the choice on its own, and there is no\n // shared rule for either to inherit.\n files: (count) => `${count} fichier${count > 1 ? 's' : ''}`,\n placeholder: 'Aucun fichier sélectionné',\n },\n filePicker: {\n browse: 'Parcourir les fichiers',\n or: 'ou',\n remove: (name) => `Retirer ${name}`,\n list: 'Fichiers sélectionnés',\n },\n carousel: {\n label: 'Carrousel',\n roleDescription: 'carrousel',\n slideRoleDescription: 'diapositive',\n slides: 'Diapositives',\n slide: (index, total) => `${index} sur ${total}`,\n previous: 'Diapositive précédente',\n next: 'Diapositive suivante',\n indicators: 'Choisir la diapositive à afficher',\n },\n calendar: {\n label: 'Calendrier',\n roleDescription: 'calendrier',\n today: \"Aujourd'hui\",\n view: 'Affichage',\n viewDay: 'Jour',\n view4Days: '4 jours',\n viewWeek: 'Semaine',\n viewMonth: 'Mois',\n viewYear: 'Année',\n viewCustom: (days) => `${days} jours`,\n previousDay: 'Jour précédent',\n nextDay: 'Jour suivant',\n previousWeek: 'Semaine précédente',\n nextWeek: 'Semaine suivante',\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n previousYear: 'Année précédente',\n nextYear: 'Année suivante',\n previousPeriod: 'Période précédente',\n nextPeriod: 'Période suivante',\n allDay: 'Journée',\n moreEvents: (count) => `+${count} autre${count > 1 ? 's' : ''}`,\n openDay: (day) => `Ouvrir le ${day}`,\n newEvent: (index) => `Évènement n°${index}`,\n eventRoleDescription: 'évènement',\n eventHint:\n 'Appuyez sur Entrée pour saisir cet évènement, puis sur les flèches pour le déplacer et sur Maj avec les flèches pour changer son heure de fin.',\n grabbed:\n 'Évènement saisi. Utilisez les flèches pour le déplacer, Entrée pour le poser, Échap pour annuler.',\n dropped: 'Évènement posé.',\n reverted: \"Déplacement annulé. L'évènement est revenu à sa place.\",\n movedTo: (title, when) => `${title} déplacé au ${when}.`,\n },\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"fr.js","names":[],"sources":["../../src/i18n/fr.ts"],"sourcesContent":["/**\n * French, opt-in by import: the package ships one module per file, so a project that never\n * imports this one never carries it.\n *\n * Enabling it and adding a language the library does not ship are the SAME gesture — there\n * are deliberately not two kinds of dictionary, one blessed and one hand-added:\n *\n * import { fr, registerMessages, setLocale } from 'vectis-ui'\n * registerMessages('fr', fr)\n * setLocale('fr-FR')\n *\n * TRAP — the curly apostrophes below are part of the text. Some tests assert these strings\n * letter for letter, and a straight apostrophe is a different character.\n */\n\nimport type { Messages } from './types'\n\nexport const fr: Messages = {\n common: {\n loading: 'Chargement…',\n clear: 'Effacer',\n close: 'Fermer',\n dismiss: 'Retirer',\n remove: (name) => `Retirer ${name}`,\n cancel: 'Annuler',\n confirm: 'OK',\n },\n pagination: {\n label: 'Pagination',\n previous: 'Page précédente',\n next: 'Page suivante',\n page: (page) => `Page ${page}`,\n },\n tabs: {\n label: 'Onglets',\n previous: 'Onglets précédents',\n next: 'Onglets suivants',\n },\n breadcrumb: {\n label: \"Fil d'Ariane\",\n ellipsis: 'Afficher les pages intermédiaires',\n },\n sideNavigation: { label: 'Navigation' },\n combobox: {\n empty: 'Aucun résultat',\n clear: 'Effacer la sélection',\n },\n dataTable: {\n empty: 'Aucune donnée',\n loading: 'Chargement des données…',\n searchLabel: 'Rechercher dans le tableau',\n searchPlaceholder: 'Rechercher…',\n perPage: 'Lignes par page',\n perPageValue: (label, value) => `${label} : ${value}`,\n selectAll: 'Tout sélectionner',\n selectRow: (index) => `Sélectionner la ligne ${index}`,\n selection: (count) =>\n `${count} élément${count > 1 ? 's' : ''} sélectionné${count > 1 ? 's' : ''}`,\n range: ({ start, end, total }) => `${start}–${end} sur ${total}`,\n pagination: 'Pagination du tableau',\n },\n toaster: { label: 'Notifications' },\n snackbar: { label: 'Confirmation', action: 'Annuler' },\n inputOTP: {\n label: 'Code de vérification',\n slot: (index, total) => `Caractère ${index} sur ${total}`,\n },\n slider: {\n value: 'Valeur',\n start: 'Début',\n end: 'Fin',\n rangeStart: (label) => `${label} (début)`,\n rangeEnd: (label) => `${label} (fin)`,\n },\n field: {\n limitExceeded: (max) => `Dépasse la limite de ${max} caractères`,\n },\n // The space before the sign is a NON-BREAKING one, as French typography requires and\n // English does not. It is written as an escape rather than typed in: the linter refuses\n // the character itself, and it would be indistinguishable from an ordinary space in a\n // review.\n progress: { percent: (percent) => `${percent}\\u00A0%`, label: 'Progression' },\n hotkeys: {\n command: 'Commande',\n ctrl: 'Ctrl',\n alt: 'Alt',\n shift: 'Maj',\n windows: 'Win',\n super: 'Super',\n enter: 'Entrée',\n escape: 'Échap',\n space: 'Espace',\n backspace: 'Retour arrière',\n delete: 'Suppr',\n tab: 'Tab',\n up: 'Flèche haut',\n down: 'Flèche bas',\n left: 'Flèche gauche',\n right: 'Flèche droite',\n label: (keys) => `Raccourci clavier : ${keys}`,\n },\n datePicker: {\n label: 'Sélecteur de date',\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n previousYear: 'Année précédente',\n nextYear: 'Année suivante',\n monthPicker: 'Choix du mois',\n yearPicker: \"Choix de l'année\",\n },\n dateInput: {\n clear: 'Effacer la date',\n openPicker: 'Ouvrir le calendrier',\n pickerLabel: 'Choisir une date',\n },\n timePicker: {\n label: \"Sélecteur d'heure\",\n meridiem: 'AM ou PM',\n am: 'AM',\n pm: 'PM',\n selectHour: 'Sélectionner l’heure',\n selectMinutes: 'Sélectionner les minutes',\n choosingHour: 'Sélection de l’heure',\n choosingMinutes: 'Sélection des minutes',\n hour: 'Heure',\n minutes: 'Minutes',\n hourValue: (hour) => `${hour} heures`,\n minutesValue: (minute) => `${minute} minutes`,\n },\n timeInput: {\n clear: \"Effacer l'heure\",\n openPicker: 'Ouvrir le sélecteur d’heure',\n pickerLabel: 'Choisir une heure',\n meridiemValue: (value) => `AM ou PM : ${value}`,\n maskPlaceholder: 'hh:mm',\n unavailable: \"Cette heure n'est pas disponible.\",\n },\n fileInput: {\n openPicker: 'Choisir des fichiers',\n clear: 'Effacer les fichiers',\n // The French plural starts at two, the English one at zero — \"0 fichier\" against\n // \"0 files\". Each language therefore makes the choice on its own, and there is no\n // shared rule for either to inherit.\n files: (count) => `${count} fichier${count > 1 ? 's' : ''}`,\n placeholder: 'Aucun fichier sélectionné',\n },\n filePicker: {\n browse: 'Parcourir les fichiers',\n or: 'ou',\n list: 'Fichiers sélectionnés',\n },\n carousel: {\n label: 'Carrousel',\n roleDescription: 'carrousel',\n slideRoleDescription: 'diapositive',\n slides: 'Diapositives',\n slide: (index, total) => `${index} sur ${total}`,\n previous: 'Diapositive précédente',\n next: 'Diapositive suivante',\n indicators: 'Choisir la diapositive à afficher',\n },\n calendar: {\n label: 'Calendrier',\n roleDescription: 'calendrier',\n today: \"Aujourd'hui\",\n view: 'Affichage',\n viewDay: 'Jour',\n view4Days: '4 jours',\n viewWeek: 'Semaine',\n viewMonth: 'Mois',\n viewYear: 'Année',\n viewCustom: (days) => `${days} jours`,\n previousDay: 'Jour précédent',\n nextDay: 'Jour suivant',\n previousWeek: 'Semaine précédente',\n nextWeek: 'Semaine suivante',\n previousMonth: 'Mois précédent',\n nextMonth: 'Mois suivant',\n previousYear: 'Année précédente',\n nextYear: 'Année suivante',\n previousPeriod: 'Période précédente',\n nextPeriod: 'Période suivante',\n allDay: 'Journée',\n moreEvents: (count) => `+${count} autre${count > 1 ? 's' : ''}`,\n openDay: (day) => `Ouvrir le ${day}`,\n untitled: '(Sans titre)',\n eventRoleDescription: 'évènement',\n eventHint:\n 'Appuyez sur Entrée pour ouvrir cet évènement. Appuyez sur Espace pour le saisir, puis sur les flèches pour le déplacer et sur Maj avec les flèches pour changer son heure de fin.',\n grabbed:\n 'Évènement saisi. Utilisez les flèches pour le déplacer, Entrée ou Espace pour le poser, Échap pour annuler.',\n dropped: 'Évènement posé.',\n reverted: \"Déplacement annulé. L'évènement est revenu à sa place.\",\n movedTo: (title, when) => `${title} déplacé au ${when}.`,\n },\n}\n"],"mappings":"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"}
@@ -1,64 +1,61 @@
1
- import { ShallowRef } from 'vue';
2
- import { VectisMessages, VectisMessagesInput } from './types.js';
1
+ import { ComputedRef, ShallowRef } from 'vue';
2
+ import { Messages, MessagesInput } from './types.js';
3
3
  /** The language tag assumed until one is chosen. */
4
4
  export declare const DEFAULT_LOCALE = "en-US";
5
5
  /**
6
- * Chooses the language the design system speaks.
7
- *
8
- * Give it a COMPLETE tag — "fr-FR", "en-GB", "de-DE" — rather than a bare language, since
9
- * it is put to two uses. It picks the dictionary, for which only the language matters;
10
- * and it is what the calendar and the two pickers hand to the browser, for which the
11
- * country matters a great deal. A bare "en" is accepted there but means the conventions
12
- * of no country in particular: hours running to twelve and weeks starting on Sunday,
13
- * which is not British English. Those three components also take a language of their own,
14
- * and it wins over this one.
15
- *
16
- * Call it from an ordinary module — a plugin, the file that starts the application — and
17
- * never from inside a component. On a server this choice lives for as long as the process
18
- * does, which is right for configuration and wrong for anything belonging to one visitor.
19
- * Setting it only in the browser is its own trap: the page the server built would then be
20
- * in another language than the one the browser expects, and the two would visibly fail to
21
- * line up.
6
+ * Chooses the locale the library speaks.
7
+ *
8
+ * Pass a COMPLETE tag — `fr-FR`, `en-GB`, `de-DE` — never a bare language, because it is put
9
+ * to two uses: it picks the dictionary, where only the subtag matters, and it is what the
10
+ * calendar and the pickers hand to `Intl`, where the region matters a great deal. A bare
11
+ * `en` resolves to no region in particular — a 12-hour clock and weeks starting on Sunday,
12
+ * which is not British English. Those components also take their own `locale`, which wins.
13
+ *
14
+ * Call it from a module — a Nuxt plugin, `main.ts` — never inside a `setup()`. On a server
15
+ * the choice lives as long as the process, which is right for configuration and wrong for
16
+ * anything belonging to one visitor; setting it client-only makes the server and the client
17
+ * render different languages, and hydration then visibly fails to line up.
22
18
  */
23
19
  export declare function setLocale(locale: string): void;
24
20
  /**
25
- * Adds the words of a LANGUAGE, or adjusts the ones already there. What it is filed under
26
- * is the language alone — "fr", not "fr-FR".
27
- *
28
- * This is the one way in, and deliberately so: turning on the French the library ships
29
- * with and adding a language it does not ship at all are the very SAME gesture.
21
+ * Adds or adjusts the words of a LANGUAGE, filed under the subtag alone — `fr`, not `fr-FR`.
30
22
  *
31
- * What is given may be a few words rather than a whole dictionary. Anything left out
32
- * falls back to whatever was registered for that language before, and failing that to the
33
- * English the library always carries — never to an empty string. Successive calls for one
34
- * language ADD UP, so registering the French and then correcting a single word keeps the
35
- * rest of the French.
23
+ * The one way in, deliberately: enabling the French the library ships and adding a language
24
+ * it does not ship are the SAME gesture.
36
25
  *
37
- * Passing nothing at all removes what was added, and puts English back as it came.
26
+ * A partial dictionary is fine. What is left out falls back to whatever was registered
27
+ * before, then to the English always carried — never to an empty string. Successive calls
28
+ * for one language ADD UP, so registering `fr` then correcting one word keeps the rest.
29
+ * Passing `undefined` removes the override and puts English back as it came.
38
30
  */
39
- export declare function registerMessages(lang: string, messages: VectisMessagesInput | undefined): void;
31
+ export declare function registerMessages(lang: string, messages: MessagesInput | undefined): void;
40
32
  /**
41
- * The dictionary in force. Internal to the library — the components read it, and it is
42
- * not part of the public surface.
33
+ * The dictionary in force. Internal — components read it, it is not public API.
43
34
  *
44
- * What is handed back is the holder rather than the words inside it, and that is what
45
- * makes components ALREADY on screen redraw themselves when the language is changed
46
- * later: reading through the holder is what ties the component to it.
35
+ * It hands back the `shallowRef` rather than its contents, which is what makes components
36
+ * ALREADY mounted re-render when `setLocale` is called later.
47
37
  *
48
- * TRAP — reading a word out of it once, at the top of a component, FREEZES that word. It
49
- * must be read where the reading is repeated: inside something derived, or in the
50
- * template.
38
+ * TRAP — reading `.value.x` once in a `setup()` body FREEZES that word. Read it where the
39
+ * read repeats: inside a `computed`, or in the template.
51
40
  *
52
- * The shape of a composable is deliberate. The day a language per part of the page, or
53
- * per visitor on a server, becomes necessary, only the BODY of this function changes and
54
- * no component is touched. It also stays callable outside any component, since all it
55
- * does is hand back a holder; a version that looked up the tree would have to check for
56
- * that case.
41
+ * The composable shape is deliberate. The day a locale per subtree or per request is needed,
42
+ * only this BODY becomes `inject(messagesKey, null) ?? currentMessages` and no component is
43
+ * touched. It also stays callable outside a component, since all it does is return a ref;
44
+ * a version that looked up the tree would need a `getCurrentInstance()` guard.
57
45
  */
58
- export declare function useMessages(): ShallowRef<VectisMessages>;
46
+ export declare function useMessages(): ShallowRef<Messages>;
59
47
  /**
60
- * The language tag in force. Internal to the library: it is what the calendar and the two
61
- * pickers fall back on when they are given no language of their own, and what the table
62
- * sorts its rows by.
48
+ * The locale tag in force. Internal: what the calendar and the pickers fall back on with no
49
+ * `locale` of their own, and what VDataTable passes to `localeCompare` when it sorts.
63
50
  */
64
51
  export declare function useLocale(): ShallowRef<string>;
52
+ /**
53
+ * The locale a component with a `locale` prop of its own actually uses: the prop when it is
54
+ * given, the locale in force otherwise. Internal, like the two above.
55
+ *
56
+ * The prop has no literal default in any of the components that read it, and that is what
57
+ * this relies on: `undefined` is the "not given" that lets the global locale have its
58
+ * chance. Every read of the language inside such a component goes through the one computed
59
+ * returned here, so the two sources are never consulted in a different order somewhere else.
60
+ */
61
+ export declare function useResolvedLocale(locale: () => string | undefined): ComputedRef<string>;
@@ -1,40 +1,43 @@
1
1
  import { en as e } from "./en.js";
2
- import { shallowRef as t } from "vue";
2
+ import { computed as t, shallowRef as n } from "vue";
3
3
  //#region src/i18n/state.ts
4
- var n = "en-US", r = "en", i = /* @__PURE__ */ new Map([[r, e]]), a = t(n), o = t(e);
5
- function s(e) {
4
+ var r = "en-US", i = "en", a = /* @__PURE__ */ new Map([[i, e]]), o = n(r), s = n(e);
5
+ function c(e) {
6
6
  return e.toLowerCase().split("-")[0] ?? e;
7
7
  }
8
- function c(t) {
9
- return i.get(s(t)) ?? i.get(r) ?? e;
8
+ function l(t) {
9
+ return a.get(c(t)) ?? a.get(i) ?? e;
10
10
  }
11
- var l = /* @__PURE__ */ new Set([
11
+ var u = /* @__PURE__ */ new Set([
12
12
  "__proto__",
13
13
  "constructor",
14
14
  "prototype"
15
15
  ]);
16
- function u(e, t) {
16
+ function d(e, t) {
17
17
  let n = { ...e };
18
- for (let [e, r] of Object.entries(t)) l.has(e) || r && (n[e] = {
18
+ for (let [e, r] of Object.entries(t)) u.has(e) || r && (n[e] = {
19
19
  ...n[e],
20
20
  ...r
21
21
  });
22
22
  return n;
23
23
  }
24
- function d(e) {
25
- s(e), a.value = e, o.value = c(e);
24
+ function f(e) {
25
+ c(e), o.value = e, s.value = l(e);
26
26
  }
27
- function f(t, n) {
28
- let l = s(t);
29
- n === void 0 ? l === r ? i.set(r, e) : i.delete(l) : i.set(l, u(i.get(l) ?? e, n)), o.value = c(a.value);
27
+ function p(t, n) {
28
+ let r = c(t);
29
+ n === void 0 ? r === i ? a.set(i, e) : a.delete(r) : a.set(r, d(a.get(r) ?? e, n)), s.value = l(o.value);
30
30
  }
31
- function p() {
31
+ function m() {
32
+ return s;
33
+ }
34
+ function h() {
32
35
  return o;
33
36
  }
34
- function m() {
35
- return a;
37
+ function g(e) {
38
+ return t(() => e() ?? o.value);
36
39
  }
37
40
  //#endregion
38
- export { n as DEFAULT_LOCALE, f as registerMessages, d as setLocale, m as useLocale, p as useMessages };
41
+ export { r as DEFAULT_LOCALE, p as registerMessages, f as setLocale, h as useLocale, m as useMessages, g as useResolvedLocale };
39
42
 
40
43
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","names":[],"sources":["../../src/i18n/state.ts"],"sourcesContent":["/**\n * The language the design system speaks, and the words it says. No text a reader will\n * ever see is written inside a component: all of it comes from here.\n *\n * The choice of language is held once for the whole application rather than being handed\n * down through the component tree, because it is CONFIGURATION — the same for everyone\n * looking at the site — and because it must remain settable from an ordinary file, a\n * start-up script or a plugin, without a component being involved.\n *\n * ACCEPTED CONSEQUENCE — one language at a time per running server. A site serving an\n * English page and a French one from the same server cannot let those two pages disagree\n * here; it passes the words to the components explicitly instead, along with the language\n * for the calendar and the two pickers. Lifting that limit would change only the body of\n * the last function in this file, and no component at all.\n */\nimport { shallowRef, type ShallowRef } from 'vue'\n\nimport { isDev } from '../utils/env'\n\nimport { en } from './en'\nimport type { VectisMessages, VectisMessagesInput } from './types'\n\n/** The language tag assumed until one is chosen. */\nexport const DEFAULT_LOCALE = 'en-US'\nconst DEFAULT_LANG = 'en'\n\n/**\n * The dictionaries, filed under the LANGUAGE alone — \"en\", \"fr\", \"de\" — and not under the\n * country as well. British, American and Australian English share every word. What does\n * separate them, the order of the parts of a date, the day a week starts on, whether the\n * hours run to twelve or twenty-four, is worked out by the browser from the complete tag\n * and is never a matter of translation.\n *\n * The collection itself is deliberately inert: what components watch is the current\n * dictionary below, which is recalculated whenever the collection changes.\n */\nconst registry = new Map<string, VectisMessages>([[DEFAULT_LANG, en]])\n\nconst currentLocale = shallowRef<string>(DEFAULT_LOCALE)\nconst currentMessages = shallowRef<VectisMessages>(en)\n\n/**\n * The language part of a tag: British English is filed under English. A tag that makes no\n * sense comes back untouched, and will simply match no dictionary.\n */\nfunction langOf(locale: string): string {\n return locale.toLowerCase().split('-')[0] ?? locale\n}\n\n/**\n * The dictionary a tag resolves to, falling back to the default language.\n *\n * The last `?? en` never fires: `registry` is seeded with `DEFAULT_LANG` and the only path\n * that could remove it — `registerMessages` passing `undefined` — puts `en` straight back\n * instead of deleting. It stays because `Map.get` is typed `T | undefined`, so the compiler\n * demands an exhaustive expression; the alternative is a non-null assertion, which would\n * hide the reasoning rather than record it. Do not read it as a live third case.\n */\nfunction resolve(locale: string): VectisMessages {\n return registry.get(langOf(locale)) ?? registry.get(DEFAULT_LANG) ?? en\n}\n\n/** Names that would reach into an object's own machinery instead of naming a section. */\nconst FORBIDDEN_KEYS = new Set(['__proto__', 'constructor', 'prototype'])\n\n/**\n * Lays a handful of replacement words over a complete dictionary.\n *\n * It descends exactly TWO levels and no further, which the shape of a dictionary\n * guarantees is enough: below a section there are only finished values, a piece of text or\n * a function that builds one. Nothing is walked recursively, so a FUNCTION can never be\n * mistaken for an object and taken apart — which would leave an empty one behind, and a\n * message that renders as nothing.\n */\nfunction mergeMessages(base: VectisMessages, patch: VectisMessagesInput): VectisMessages {\n const out: Record<string, object> = { ...base }\n for (const [namespace, section] of Object.entries(patch)) {\n // A dictionary that came out of a parsed file can carry one of those names as a\n // section of its own, and assigning to it would replace the merged dictionary's\n // machinery rather than adding a section. Nothing outside is affected — the object\n // being built is a fresh copy — but the result is a dictionary in which every single\n // lookup is wrong, and nothing says so.\n if (FORBIDDEN_KEYS.has(namespace)) continue\n if (section) out[namespace] = { ...out[namespace], ...section }\n }\n return out as unknown as VectisMessages\n}\n\n/**\n * Chooses the language the design system speaks.\n *\n * Give it a COMPLETE tag — \"fr-FR\", \"en-GB\", \"de-DE\" — rather than a bare language, since\n * it is put to two uses. It picks the dictionary, for which only the language matters;\n * and it is what the calendar and the two pickers hand to the browser, for which the\n * country matters a great deal. A bare \"en\" is accepted there but means the conventions\n * of no country in particular: hours running to twelve and weeks starting on Sunday,\n * which is not British English. Those three components also take a language of their own,\n * and it wins over this one.\n *\n * Call it from an ordinary module — a plugin, the file that starts the application — and\n * never from inside a component. On a server this choice lives for as long as the process\n * does, which is right for configuration and wrong for anything belonging to one visitor.\n * Setting it only in the browser is its own trap: the page the server built would then be\n * in another language than the one the browser expects, and the two would visibly fail to\n * line up.\n */\nexport function setLocale(locale: string): void {\n const lang = langOf(locale)\n if (isDev && !registry.has(lang)) {\n console.warn(\n `[vectis] No dictionary registered for “${lang}”: the text stays in ` +\n `“${DEFAULT_LANG}”. French is shipped — import { fr } from 'vectis-ui' then ` +\n `registerMessages('fr', fr). For another language: registerMessages('${lang}', { … }).`,\n )\n }\n currentLocale.value = locale\n currentMessages.value = resolve(locale)\n}\n\n/**\n * Adds the words of a LANGUAGE, or adjusts the ones already there. What it is filed under\n * is the language alone — \"fr\", not \"fr-FR\".\n *\n * This is the one way in, and deliberately so: turning on the French the library ships\n * with and adding a language it does not ship at all are the very SAME gesture.\n *\n * What is given may be a few words rather than a whole dictionary. Anything left out\n * falls back to whatever was registered for that language before, and failing that to the\n * English the library always carries — never to an empty string. Successive calls for one\n * language ADD UP, so registering the French and then correcting a single word keeps the\n * rest of the French.\n *\n * Passing nothing at all removes what was added, and puts English back as it came.\n */\nexport function registerMessages(lang: string, messages: VectisMessagesInput | undefined): void {\n const key = langOf(lang)\n if (isDev && key !== lang.toLowerCase()) {\n console.warn(\n `[vectis] registerMessages('${lang}', …): the expected key is a language subtag ` +\n `alone — registered under “${key}”, which covers all its regional variants.`,\n )\n }\n if (messages === undefined) {\n if (key === DEFAULT_LANG) registry.set(DEFAULT_LANG, en)\n else registry.delete(key)\n } else {\n registry.set(key, mergeMessages(registry.get(key) ?? en, messages))\n }\n currentMessages.value = resolve(currentLocale.value)\n}\n\n/**\n * The dictionary in force. Internal to the library — the components read it, and it is\n * not part of the public surface.\n *\n * What is handed back is the holder rather than the words inside it, and that is what\n * makes components ALREADY on screen redraw themselves when the language is changed\n * later: reading through the holder is what ties the component to it.\n *\n * TRAP — reading a word out of it once, at the top of a component, FREEZES that word. It\n * must be read where the reading is repeated: inside something derived, or in the\n * template.\n *\n * The shape of a composable is deliberate. The day a language per part of the page, or\n * per visitor on a server, becomes necessary, only the BODY of this function changes and\n * no component is touched. It also stays callable outside any component, since all it\n * does is hand back a holder; a version that looked up the tree would have to check for\n * that case.\n */\nexport function useMessages(): ShallowRef<VectisMessages> {\n return currentMessages\n}\n\n/**\n * The language tag in force. Internal to the library: it is what the calendar and the two\n * pickers fall back on when they are given no language of their own, and what the table\n * sorts its rows by.\n */\nexport function useLocale(): ShallowRef<string> {\n return currentLocale\n}\n"],"mappings":";;;AAuBA,IAAa,IAAiB,SACxB,IAAe,MAYf,oBAAW,IAAI,IAA4B,CAAC,CAAC,GAAc,CAAE,CAAC,CAAC,GAE/D,IAAgB,EAAmB,CAAc,GACjD,IAAkB,EAA2B,CAAE;AAMrD,SAAS,EAAO,GAAwB;CACtC,OAAO,EAAO,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM;AAC/C;AAWA,SAAS,EAAQ,GAAgC;CAC/C,OAAO,EAAS,IAAI,EAAO,CAAM,CAAC,KAAK,EAAS,IAAI,CAAY,KAAK;AACvE;AAGA,IAAM,oBAAiB,IAAI,IAAI;CAAC;CAAa;CAAe;AAAW,CAAC;AAWxE,SAAS,EAAc,GAAsB,GAA4C;CACvF,IAAM,IAA8B,EAAE,GAAG,EAAK;CAC9C,KAAK,IAAM,CAAC,GAAW,MAAY,OAAO,QAAQ,CAAK,GAMjD,EAAe,IAAI,CAAS,KAC5B,MAAS,EAAI,KAAa;EAAE,GAAG,EAAI;EAAY,GAAG;CAAQ;CAEhE,OAAO;AACT;AAoBA,SAAgB,EAAU,GAAsB;CAU9C,AATa,EAAO,CAAM,GAQ1B,EAAc,QAAQ,GACtB,EAAgB,QAAQ,EAAQ,CAAM;AACxC;AAiBA,SAAgB,EAAiB,GAAc,GAAiD;CAC9F,IAAM,IAAM,EAAO,CAAI;CAavB,AANI,MAAa,KAAA,IACX,MAAQ,IAAc,EAAS,IAAI,GAAc,CAAE,IAClD,EAAS,OAAO,CAAG,IAExB,EAAS,IAAI,GAAK,EAAc,EAAS,IAAI,CAAG,KAAK,GAAI,CAAQ,CAAC,GAEpE,EAAgB,QAAQ,EAAQ,EAAc,KAAK;AACrD;AAoBA,SAAgB,IAA0C;CACxD,OAAO;AACT;AAOA,SAAgB,IAAgC;CAC9C,OAAO;AACT"}
1
+ {"version":3,"file":"state.js","names":[],"sources":["../../src/i18n/state.ts"],"sourcesContent":["/**\n * The locale the library speaks and the words it says. No user-facing text is written in a\n * component; all of it comes from here.\n *\n * Module-level state rather than provide/inject, because this is CONFIGURATION: the same\n * for every visitor, and settable from any `.ts` — a plugin, an entry file — with no\n * component involved.\n *\n * ACCEPTED LIMIT — one locale per process. A single Node process serving /en and /fr cannot\n * let the two disagree here; it passes the text props explicitly instead. Lifting the limit\n * would change only the body of `useMessages` below, and no component at all.\n */\nimport { computed, shallowRef, type ComputedRef, type ShallowRef } from 'vue'\n\nimport { isDev } from '../utils/env'\n\nimport { en } from './en'\nimport type { Messages, MessagesInput } from './types'\n\n/** The language tag assumed until one is chosen. */\nexport const DEFAULT_LOCALE = 'en-US'\nconst DEFAULT_LANG = 'en'\n\n/**\n * The dictionaries, filed under the LANGUAGE subtag alone — `en`, `fr`, `de`. `en-GB` and\n * `en-US` share every word; what separates them (field order, first day of week, hour cycle)\n * comes from `Intl` on the full tag and is never a matter of translation.\n *\n * The Map is deliberately inert: what components track is `currentMessages` below, which is\n * recomputed whenever it changes.\n */\nconst registry = new Map<string, Messages>([[DEFAULT_LANG, en]])\n\nconst currentLocale = shallowRef<string>(DEFAULT_LOCALE)\nconst currentMessages = shallowRef<Messages>(en)\n\n/**\n * The language part of a tag: British English is filed under English. A tag that makes no\n * sense comes back untouched, and will simply match no dictionary.\n */\nfunction langOf(locale: string): string {\n return locale.toLowerCase().split('-')[0] ?? locale\n}\n\n/**\n * The dictionary a tag resolves to, falling back to the default language.\n *\n * The last `?? en` never fires: `registry` is seeded with `DEFAULT_LANG` and the only path\n * that could remove it — `registerMessages` passing `undefined` — puts `en` straight back\n * instead of deleting. It stays because `Map.get` is typed `T | undefined`, so the compiler\n * demands an exhaustive expression; the alternative is a non-null assertion, which would\n * hide the reasoning rather than record it. Do not read it as a live third case.\n */\nfunction resolve(locale: string): Messages {\n return registry.get(langOf(locale)) ?? registry.get(DEFAULT_LANG) ?? en\n}\n\n/** Names that would reach into an object's own machinery instead of naming a section. */\nconst FORBIDDEN_KEYS = new Set(['__proto__', 'constructor', 'prototype'])\n\n/**\n * Lays a partial override over a complete dictionary.\n *\n * Depth EXACTLY 2, which the dictionary's shape guarantees is enough: below a namespace\n * there are only leaves, a string or a function returning one. Nothing recurses, so a\n * FUNCTION can never be mistaken for an object and taken apart — which would leave `{}`\n * behind and a message that renders as nothing.\n */\nfunction mergeMessages(base: Messages, patch: MessagesInput): Messages {\n const out: Record<string, object> = { ...base }\n for (const [namespace, section] of Object.entries(patch)) {\n // A dictionary parsed from a file can carry one of these as a namespace, and assigning\n // to it would replace the copy's own machinery instead of adding a section. Nothing\n // outside is affected, the object being fresh — but every lookup in it is then wrong,\n // and nothing says so.\n if (FORBIDDEN_KEYS.has(namespace)) continue\n if (section) out[namespace] = { ...out[namespace], ...section }\n }\n return out as unknown as Messages\n}\n\n/**\n * Chooses the locale the library speaks.\n *\n * Pass a COMPLETE tag — `fr-FR`, `en-GB`, `de-DE` — never a bare language, because it is put\n * to two uses: it picks the dictionary, where only the subtag matters, and it is what the\n * calendar and the pickers hand to `Intl`, where the region matters a great deal. A bare\n * `en` resolves to no region in particular — a 12-hour clock and weeks starting on Sunday,\n * which is not British English. Those components also take their own `locale`, which wins.\n *\n * Call it from a module — a Nuxt plugin, `main.ts` — never inside a `setup()`. On a server\n * the choice lives as long as the process, which is right for configuration and wrong for\n * anything belonging to one visitor; setting it client-only makes the server and the client\n * render different languages, and hydration then visibly fails to line up.\n */\nexport function setLocale(locale: string): void {\n const lang = langOf(locale)\n if (isDev && !registry.has(lang)) {\n console.warn(\n `[vectis] No dictionary registered for “${lang}”: the text stays in ` +\n `“${DEFAULT_LANG}”. French is shipped — import { fr } from 'vectis-ui' then ` +\n `registerMessages('fr', fr). For another language: registerMessages('${lang}', { … }).`,\n )\n }\n currentLocale.value = locale\n currentMessages.value = resolve(locale)\n}\n\n/**\n * Adds or adjusts the words of a LANGUAGE, filed under the subtag alone — `fr`, not `fr-FR`.\n *\n * The one way in, deliberately: enabling the French the library ships and adding a language\n * it does not ship are the SAME gesture.\n *\n * A partial dictionary is fine. What is left out falls back to whatever was registered\n * before, then to the English always carried — never to an empty string. Successive calls\n * for one language ADD UP, so registering `fr` then correcting one word keeps the rest.\n * Passing `undefined` removes the override and puts English back as it came.\n */\nexport function registerMessages(lang: string, messages: MessagesInput | undefined): void {\n const key = langOf(lang)\n if (isDev && key !== lang.toLowerCase()) {\n console.warn(\n `[vectis] registerMessages('${lang}', …): the expected key is a language subtag ` +\n `alone — registered under “${key}”, which covers all its regional variants.`,\n )\n }\n if (messages === undefined) {\n if (key === DEFAULT_LANG) registry.set(DEFAULT_LANG, en)\n else registry.delete(key)\n } else {\n registry.set(key, mergeMessages(registry.get(key) ?? en, messages))\n }\n currentMessages.value = resolve(currentLocale.value)\n}\n\n/**\n * The dictionary in force. Internal — components read it, it is not public API.\n *\n * It hands back the `shallowRef` rather than its contents, which is what makes components\n * ALREADY mounted re-render when `setLocale` is called later.\n *\n * TRAP — reading `.value.x` once in a `setup()` body FREEZES that word. Read it where the\n * read repeats: inside a `computed`, or in the template.\n *\n * The composable shape is deliberate. The day a locale per subtree or per request is needed,\n * only this BODY becomes `inject(messagesKey, null) ?? currentMessages` and no component is\n * touched. It also stays callable outside a component, since all it does is return a ref;\n * a version that looked up the tree would need a `getCurrentInstance()` guard.\n */\nexport function useMessages(): ShallowRef<Messages> {\n return currentMessages\n}\n\n/**\n * The locale tag in force. Internal: what the calendar and the pickers fall back on with no\n * `locale` of their own, and what VDataTable passes to `localeCompare` when it sorts.\n */\nexport function useLocale(): ShallowRef<string> {\n return currentLocale\n}\n\n/**\n * The locale a component with a `locale` prop of its own actually uses: the prop when it is\n * given, the locale in force otherwise. Internal, like the two above.\n *\n * The prop has no literal default in any of the components that read it, and that is what\n * this relies on: `undefined` is the \"not given\" that lets the global locale have its\n * chance. Every read of the language inside such a component goes through the one computed\n * returned here, so the two sources are never consulted in a different order somewhere else.\n */\nexport function useResolvedLocale(locale: () => string | undefined): ComputedRef<string> {\n return computed(() => locale() ?? currentLocale.value)\n}\n"],"mappings":";;;AAoBA,IAAa,IAAiB,SACxB,IAAe,MAUf,oBAAW,IAAI,IAAsB,CAAC,CAAC,GAAc,CAAE,CAAC,CAAC,GAEzD,IAAgB,EAAmB,CAAc,GACjD,IAAkB,EAAqB,CAAE;AAM/C,SAAS,EAAO,GAAwB;CACtC,OAAO,EAAO,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM;AAC/C;AAWA,SAAS,EAAQ,GAA0B;CACzC,OAAO,EAAS,IAAI,EAAO,CAAM,CAAC,KAAK,EAAS,IAAI,CAAY,KAAK;AACvE;AAGA,IAAM,oBAAiB,IAAI,IAAI;CAAC;CAAa;CAAe;AAAW,CAAC;AAUxE,SAAS,EAAc,GAAgB,GAAgC;CACrE,IAAM,IAA8B,EAAE,GAAG,EAAK;CAC9C,KAAK,IAAM,CAAC,GAAW,MAAY,OAAO,QAAQ,CAAK,GAKjD,EAAe,IAAI,CAAS,KAC5B,MAAS,EAAI,KAAa;EAAE,GAAG,EAAI;EAAY,GAAG;CAAQ;CAEhE,OAAO;AACT;AAgBA,SAAgB,EAAU,GAAsB;CAU9C,AATa,EAAO,CAAM,GAQ1B,EAAc,QAAQ,GACtB,EAAgB,QAAQ,EAAQ,CAAM;AACxC;AAaA,SAAgB,EAAiB,GAAc,GAA2C;CACxF,IAAM,IAAM,EAAO,CAAI;CAavB,AANI,MAAa,KAAA,IACX,MAAQ,IAAc,EAAS,IAAI,GAAc,CAAE,IAClD,EAAS,OAAO,CAAG,IAExB,EAAS,IAAI,GAAK,EAAc,EAAS,IAAI,CAAG,KAAK,GAAI,CAAQ,CAAC,GAEpE,EAAgB,QAAQ,EAAQ,EAAc,KAAK;AACrD;AAgBA,SAAgB,IAAoC;CAClD,OAAO;AACT;AAMA,SAAgB,IAAgC;CAC9C,OAAO;AACT;AAWA,SAAgB,EAAkB,GAAuD;CACvF,OAAO,QAAe,EAAO,KAAK,EAAc,KAAK;AACvD"}
@@ -1,27 +1,23 @@
1
1
  /**
2
- * Every word the design system can say to a reader, gathered in one place. This is what a
3
- * translator works from, and what a consumer overrides to change a turn of phrase.
2
+ * Every user-facing word the library can say, in one place: what a translator works from and
3
+ * what a consumer overrides.
4
4
  *
5
- * It is arranged in exactly TWO levels: a section, then an entry. An entry is finished
6
- * text, or — when something has to be slotted into it — a small function that builds the
7
- * sentence.
5
+ * Depth EXACTLY 2 — namespace, then leaf. A leaf is finished text, or a TS function when
6
+ * something has to be slotted in. There is deliberately no template language and no plural
7
+ * engine: a parameterized message IS a hand-written function whose signature is the
8
+ * contract, so a translation that forgets an argument does not compile, and a plural is a
9
+ * ternary inside it.
8
10
  *
9
- * There is deliberately no template language and no rules engine for plurals. A message
10
- * that takes a value IS a function, written by hand, and its arguments are the contract: a
11
- * translation that forgets one does not compile. A plural is a choice between two forms
12
- * written inside that function.
11
+ * The two levels are structural, not aesthetic: they are what lets a partial override be
12
+ * merged NON-RECURSIVELY, and therefore what makes it impossible to descend into one of
13
+ * those functions and turn it into `{}`.
13
14
  *
14
- * Two levels is not an aesthetic choice. It is what allows a handful of replacement words
15
- * to be laid over a dictionary without descending into it, and therefore what makes it
16
- * impossible to mistake one of those functions for something to be taken apart.
17
- *
18
- * Three kinds of text are deliberately absent. Anything the browser already knows how to
19
- * say in any language: the names of months and days, the order of the parts of a date,
20
- * whether hours run to twelve or twenty-four. Anything made only of digits and
21
- * punctuation everyone shares — "99+", "+3", a "3/8" counter, the colon in a time.
22
- * And the warnings the library prints for the developer, which are not translated at all.
15
+ * Three kinds of text are deliberately absent. Whatever `Intl` derives from the tag (month
16
+ * and day names, field order, hour cycle); whatever is made only of digits and universal
17
+ * punctuation (`99+`, `+N`, an `N/M` counter, a time's colon); and the `[Component] …`
18
+ * warnings, which address the integrator and are never translated.
23
19
  */
24
- export interface VectisMessages {
20
+ export interface Messages {
25
21
  /** Words several components share, so that they are translated once rather than five times. */
26
22
  common: {
27
23
  /** Said by the spinner, and by the fields and the search box while they are loading. */
@@ -32,6 +28,11 @@ export interface VectisMessages {
32
28
  close: string;
33
29
  /** The cross that removes a chip. */
34
30
  dismiss: string;
31
+ /**
32
+ * The same cross when it has to say WHICH thing it removes: a value of a combobox, a
33
+ * file of either file component. The name is the thing's own label.
34
+ */
35
+ remove: (name: string) => string;
35
36
  /** The two buttons under the clock face. */
36
37
  cancel: string;
37
38
  confirm: string;
@@ -41,8 +42,6 @@ export interface VectisMessages {
41
42
  previous: string;
42
43
  next: string;
43
44
  page: (page: number) => string;
44
- /** The ellipsis standing in for the pages that are not shown. It is decorative, and never spoken. */
45
- hiddenPages: string;
46
45
  };
47
46
  tabs: {
48
47
  label: string;
@@ -64,7 +63,6 @@ export interface VectisMessages {
64
63
  combobox: {
65
64
  empty: string;
66
65
  clear: string;
67
- remove: (label: string) => string;
68
66
  };
69
67
  dataTable: {
70
68
  empty: string;
@@ -169,6 +167,8 @@ export interface VectisMessages {
169
167
  label: (keys: string) => string;
170
168
  };
171
169
  datePicker: {
170
+ /** What the whole picker is called, header and grid together. */
171
+ label: string;
172
172
  previousMonth: string;
173
173
  nextMonth: string;
174
174
  previousYear: string;
@@ -178,47 +178,61 @@ export interface VectisMessages {
178
178
  };
179
179
  dateInput: {
180
180
  clear: string;
181
- open: string;
182
- label: string;
181
+ /** What the button at the end of the field is called: the one that opens the calendar. */
182
+ openPicker: string;
183
+ /** What the panel holding the calendar is called. */
184
+ pickerLabel: string;
183
185
  };
184
186
  /** The clock itself. VTimeInput reads the half-day words from here too: there is one
185
187
  vocabulary for choosing a time, wherever the control that does it is rendered. */
186
188
  timePicker: {
189
+ /** What the whole clock is called, the numerals and the face together. */
190
+ label: string;
187
191
  meridiem: string;
188
192
  am: string;
189
193
  pm: string;
190
194
  selectHour: string;
191
- selectMinute: string;
192
- /** Announced when the clock face moves from choosing an hour to choosing a minute. */
193
- hourStep: string;
194
- minuteStep: string;
195
+ selectMinutes: string;
196
+ /** Announced when the clock face moves between choosing the hour and the minutes. */
197
+ choosingHour: string;
198
+ choosingMinutes: string;
195
199
  /** What the clock face itself is called, which changes with the step. */
196
200
  hour: string;
197
201
  minutes: string;
198
202
  /** What the clock face announces as its value, rather than the bare number behind it. */
199
- hoursValue: (hour: number) => string;
203
+ hourValue: (hour: number) => string;
200
204
  minutesValue: (minute: number) => string;
201
205
  };
202
206
  timeInput: {
203
207
  clear: string;
204
- openList: string;
208
+ /** What the button at the end of the field is called: the one that opens the clock. */
205
209
  openPicker: string;
206
- listLabel: string;
207
210
  /** What the panel holding the clock is called. */
208
211
  pickerLabel: string;
212
+ /**
213
+ * What the AM/PM button inside the field is called, the half of the day it currently
214
+ * shows included. The value is what the button reads on screen, so the name repeats
215
+ * it rather than replacing it: a reader arriving on the button is told which half is
216
+ * chosen, and hears the new one as soon as it changes.
217
+ */
218
+ meridiemValue: (value: string) => string;
209
219
  /**
210
220
  * The grey template shown in an empty field, "hh:mm". It is translatable because those
211
221
  * letters are the initials of WORDS — unlike the colon between them, which is the same
212
222
  * everywhere and lives with the time helpers.
213
223
  */
214
224
  maskPlaceholder: string;
225
+ /**
226
+ * What the field says of a time the restrictions do not allow. It is carried by the
227
+ * control's own validity rather than displayed, so a browser is what shows it, and in
228
+ * the language the browser is being told to speak here.
229
+ */
230
+ unavailable: string;
215
231
  };
216
232
  fileInput: {
217
- /** What the button at the end of the field is called — the one that opens the file dialog. */
218
- attach: string;
233
+ /** What the button at the end of the field is called: the one that opens the file dialog. */
234
+ openPicker: string;
219
235
  clear: string;
220
- /** What the cross on a file's chip is called. */
221
- remove: (name: string) => string;
222
236
  /**
223
237
  * The WORD of the counter, and only that. The total size that follows is written out
224
238
  * by the browser, and the brackets around it belong to neither — punctuation everyone
@@ -236,8 +250,6 @@ export interface VectisMessages {
236
250
  * it is translated — unlike the two rules on either side of it, which are drawn.
237
251
  */
238
252
  or: string;
239
- /** What the cross beside a chosen file is called. */
240
- remove: (name: string) => string;
241
253
  /** What the list of chosen files is called. */
242
254
  list: string;
243
255
  };
@@ -314,11 +326,8 @@ export interface VectisMessages {
314
326
  moreEvents: (count: number) => string;
315
327
  /** How a day in the month and year views offers to be opened on its own. */
316
328
  openDay: (day: string) => string;
317
- /**
318
- * The name a newly created event is given. The number is the one a reader counts,
319
- * starting at one — it carries no unit, so a language that writes it differently can.
320
- */
321
- newEvent: (index: number) => string;
329
+ /** What the card of a slot being drawn out is called, before it is anything else. */
330
+ untitled: string;
322
331
  /** What one event IS, said in place of the word "button". */
323
332
  eventRoleDescription: string;
324
333
  /** How a card says it can be moved. It is read once, from a single shared node. */
@@ -340,6 +349,6 @@ export interface VectisMessages {
340
349
  * takes a value stays a whole function. Making it recursive would allow one of those
341
350
  * functions to be described as a partial object, which is to say as nothing at all.
342
351
  */
343
- export type VectisMessagesInput = {
344
- [K in keyof VectisMessages]?: Partial<VectisMessages[K]>;
352
+ export type MessagesInput = {
353
+ [K in keyof Messages]?: Partial<Messages[K]>;
345
354
  };
package/dist/icons.d.ts CHANGED
@@ -4,9 +4,9 @@
4
4
  *
5
5
  * Reach for it when you want to render one of the library's own icons somewhere it
6
6
  * does not already appear: `import { search } from 'vectis-ui/icons'`, then
7
- * `<VIcon :name="search" />`. A bare `<VIcon name="search" />` no longer finds it,
8
- * and that is the point — an icon is shipped to a consumer's bundle because a module
9
- * imported it, never because a string might one day ask for it.
7
+ * `<VIcon :name="search" />`. A bare `<VIcon name="search" />` is a NAME and does
8
+ * not reach it, which is the point — an icon is shipped to a consumer's bundle because
9
+ * a module imported it, never because a string might one day ask for it.
10
10
  *
11
11
  * Each value carries its NAME as well as its drawing, so it still passes through a
12
12
  * resolver installed with `setIconResolver`: wiring your own icon library keeps