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
@@ -1 +1 @@
1
- {"version":3,"file":"semantic.js","names":[],"sources":["../../src/tokens/semantic.ts"],"sourcesContent":["/**\n * The tokens that name a ROLE rather than a value: the page's background, the colour of\n * ordinary text, the accent an application is built around, the pause before a tooltip\n * appears.\n *\n * These are the ONLY tokens a component ever mentions, and that is the whole point. A\n * component asks for the accent colour and never for a particular indigo, so an\n * application can change what the accent IS without a single component knowing.\n *\n * Almost every entry points at a step of a palette rather than stating a value, by naming\n * it in braces. The values written out here are the LIGHT theme; the dark theme restates\n * the same roles, pointing them elsewhere.\n */\nimport { color, dimension, duration, fontFamily, fontWeight, type TokenGroup } from './types'\n\nexport const semantic = {\n color: {\n surface: color('{color.white}', 'The default page background'),\n 'surface-muted': color('{color.gray.100}', 'A muted background (secondary areas)'),\n 'surface-raised': color('{color.white}', 'Raised surfaces: cards'),\n 'surface-overlay': color('{color.white}', 'Floating surfaces: dialogs, popovers, menus'),\n 'surface-sunken': color('{color.gray.50}', 'Sunken surfaces: wells, code areas'),\n 'surface-inverse': color('{color.gray.900}', 'Inverted-contrast surfaces: tooltips'),\n 'surface-skeleton': color(\n '{color.gray.200}',\n 'The background of the loading silhouettes (VSkeletonLoader); the highlight derives from it in CSS',\n ),\n\n 'text-on-inverse': color('{color.white}', 'Text set on an inverted surface'),\n\n text: color('{color.gray.900}'),\n 'text-muted': color('{color.gray.600}'),\n 'text-subtle': color('{color.gray.500}', 'Placeholders, disabled text'),\n 'text-on-accent': color('{color.white}', 'Text set on an accent/danger/success background'),\n 'text-on-warning': color(\n '{color.gray.950}',\n 'Text set on a solid warning background (amber too light for white)',\n ),\n\n border: color('{color.gray.200}'),\n 'border-strong': color('{color.gray.300}', 'The borders of form controls'),\n\n accent: color('{color.indigo.600}'),\n 'accent-hover': color('{color.indigo.700}'),\n 'accent-active': color('{color.indigo.800}'),\n 'accent-surface': color('{color.indigo.50}', 'A tinted accent background (badges, selections)'),\n 'accent-border': color('{color.indigo.200}'),\n 'accent-text': color('{color.indigo.700}', 'Accent text on a neutral or tinted background'),\n\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.50}'),\n 'danger-border': color('{color.red.200}'),\n 'danger-text': color('{color.red.700}'),\n\n /*\n * Green starts one step darker than the other colours. White text on a filled button\n * only becomes readable enough from green 700 onwards — green 600 falls well short of\n * the threshold. Darkening the colour rather than darkening the text is what keeps one\n * simple rule true: a filled control carries white text.\n *\n * The one exception is the warning colour, since no step of an amber is ever dark\n * enough for white, which is why it alone declares a text colour of its own.\n */\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.50}'),\n 'success-border': color('{color.green.200}'),\n 'success-text': color('{color.green.800}'),\n\n warning: color('{color.amber.600}'),\n 'warning-hover': color('{color.amber.700}'),\n 'warning-active': color('{color.amber.800}'),\n 'warning-surface': color('{color.amber.50}'),\n 'warning-border': color('{color.amber.200}'),\n 'warning-text': color('{color.amber.900}'),\n\n backdrop: color('oklch(0% 0 0 / 0.45)', 'The veil behind modal dialogs'),\n\n /*\n * The four colours of a calendar event that names none of its own.\n *\n * These are the one place in the design system where a colour is DATA rather than a\n * role: which hue an event takes is derived from its id (see `VCalendar/color.ts`),\n * and it arrives here through `--vectis-calendar-event-hue`, a per-instance input the\n * component sets on each card. That is why they are written out rather than aliased to\n * a palette — there is no palette to point at, only a wheel.\n *\n * WHAT MAKES THEM READABLE, and what must not be changed casually. Only the HUE\n * varies; the lightness and the chroma below are fixed, and in OKLCH lightness is\n * perceptual — so the distance between the text at L 0.40 and the card at L 0.95 is\n * the same perceived distance at every hue, which is what turns \"an arbitrary colour\"\n * into a contrast ratio that can be relied on. Moving either number moves the contrast\n * of every event in the calendar at once. The same pair is restated in `themes/dark.ts`\n * with the roles swapped end for end.\n *\n * A custom property substitutes at the point it is USED, not where it is declared, so\n * the hue each card sets is what these resolve against — the trick `VSkeletonLoader`\n * uses for its highlight.\n */\n 'event-surface': color(\n 'oklch(0.95 0.045 var(--vectis-calendar-event-hue, 265))',\n 'The face of a calendar event that carries no colour of its own',\n ),\n 'event-border': color(\n 'oklch(0.85 0.08 var(--vectis-calendar-event-hue, 265))',\n 'The edge of that event, and the bar marking its leading side',\n ),\n 'event-text': color(\n 'oklch(0.4 0.11 var(--vectis-calendar-event-hue, 265))',\n 'The title written on that face',\n ),\n },\n /**\n * The typography, described by role rather than by measurement: a heading, a subtitle,\n * a caption, a piece of code.\n *\n * Each role is a COMPLETE recipe — a size, a weight, the space between lines, and where\n * it matters the space between letters. Asking for a role therefore settles every one of\n * those at once, and two pieces of text in the same role cannot drift apart. It is what\n * the typography component renders, and what the components' own stylesheets ask for.\n */\n text: {\n family: fontFamily('{font.family.sans}', 'The font of all the design system text'),\n 'family-heading': fontFamily(\n '{font.family.display}',\n 'The font of the display and heading roles; identical to the running font until it is overridden',\n ),\n 'family-code': fontFamily(\n '{font.family.mono}',\n 'The font of code content (the code variant, VInputOTP)',\n ),\n display: {\n size: dimension('{font.size.5xl}'),\n weight: fontWeight('{font.weight.bold}'),\n leading: dimension('{font.leading.none}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-1': {\n size: dimension('{font.size.4xl}'),\n weight: fontWeight('{font.weight.bold}'),\n leading: dimension('{font.leading.tight}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-2': {\n size: dimension('{font.size.2xl}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.tight}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-3': {\n size: dimension('{font.size.lg}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.snug}'),\n },\n 'heading-4': {\n size: dimension('{font.size.md}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.snug}'),\n },\n subtitle: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n /**\n * The introduction that opens a page or a section, one step above the running text.\n *\n * It shares `body-lg`'s generous leading rather than taking a tighter one: a lead is read\n * as prose, not as a heading, and the two therefore sit in the same column without the\n * rhythm changing under the reader between the first paragraph and the second.\n */\n 'body-xl': {\n size: dimension('{font.size.lg}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.relaxed}'),\n },\n 'body-lg': {\n size: dimension('{font.size.md}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.relaxed}'),\n },\n 'body-md': {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n 'body-sm': {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n label: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.snug}'),\n },\n caption: {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.snug}'),\n },\n overline: {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.snug}'),\n tracking: dimension('{font.tracking.wide}'),\n },\n code: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n /*\n * A role of a different sort: the label of a control — a button, a chip, a badge. It\n * deliberately carries no SIZE, because a control's text size comes from the size it\n * was given, and this recipe only settles the weight and the space between lines.\n */\n control: {\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.none}'),\n },\n },\n radius: {\n interactive: dimension('{radius.md}', 'Buttons, inputs, controls'),\n surface: dimension('{radius.lg}', 'Cards, alerts'),\n overlay: dimension('{radius.xl}', 'Dialogs, popovers, menus'),\n pill: dimension('{radius.full}'),\n },\n /**\n * How long a change takes, described by what it is: the immediate feedback of a control\n * under the pointer, the ordinary pace of the design system, a deliberately slower move.\n *\n * These three are what a `transition` reaches for. Motion does not vary from one theme to\n * the next, so unlike the colours they are stated once and never restated.\n */\n duration: {\n fast: duration('{duration.150}', 'Colour and border changes on hover, focus, press'),\n base: duration('{duration.200}', 'The default: a panel opening, a value moving'),\n slow: duration('{duration.300}', 'Movements large enough to be followed by the eye'),\n },\n focus: {\n 'ring-color': color('{color.indigo.500}'),\n 'ring-width': dimension('2px'),\n 'ring-offset': dimension('2px'),\n },\n control: {\n 'height-xs': dimension('1.5rem'),\n 'height-sm': dimension('2rem'),\n 'height-md': dimension('2.5rem'),\n 'height-lg': dimension('3rem'),\n 'height-xl': dimension('3.5rem'),\n 'border-width': dimension('2px', 'The border of checkable controls (VCheckbox, VRadio)'),\n 'size-check': dimension('1.25rem', 'The box of checkable controls (VCheckbox, VRadio)'),\n 'size-check-mark': dimension('0.875rem', \"VCheckbox's SVG tick\"),\n 'size-check-dot': dimension('0.5rem', \"VRadio's inner dot\"),\n 'size-switch-w': dimension('2.5rem', \"The width of VSwitch's track\"),\n 'size-switch-h': dimension('1.25rem', \"The height of VSwitch's track\"),\n 'action-size-sm': dimension(\n '1.25rem',\n 'The inner buttons of sm input fields (clear, a clickable icon)',\n ),\n 'action-size-md': dimension(\n '1.5rem',\n 'The inner buttons of md input fields (clear, a clickable icon)',\n ),\n 'action-size-lg': dimension(\n '1.75rem',\n 'The inner buttons of lg input fields (clear, a clickable icon)',\n ),\n 'size-slider-track': dimension('0.375rem', \"The thickness of VSlider's track\"),\n 'size-slider-thumb': dimension('1.25rem', \"The diameter of VSlider's thumb\"),\n 'size-slider-length': dimension('10rem', 'The default length of a vertical VSlider'),\n 'size-slider-field': dimension('5rem', \"The width of VSlider's number fields\"),\n 'size-carousel-block': dimension(\n '24rem',\n \"The default block size of VCarousel's viewport. Load-bearing in the vertical orientation: a percentage flex-basis has no definite reference on the block axis, and every slide would collapse onto its content without it\",\n ),\n 'size-carousel-indicator': dimension(\n '0.625rem',\n 'The diameter of a VCarousel indicator dot (its hit area comes from --vectis-control-height-xs)',\n ),\n 'size-carousel-indicator-active': dimension(\n '1.25rem',\n 'The main-axis size of the ACTIVE VCarousel indicator, which stretches from a dot into a pill',\n ),\n 'size-combobox-list-max-block': dimension(\n '18rem',\n \"The maximum height of VCombobox's list panel (the scrolling area)\",\n ),\n 'size-menu-min': dimension('11rem', \"The minimum width of VMenu's panel\"),\n 'size-menu-max': dimension('20rem', \"The maximum width of VMenu's panel\"),\n 'size-progress-linear-thickness': dimension(\n '0.25rem',\n \"The default thickness of VProgressLinear's bar (4px)\",\n ),\n 'size-progress-linear-length': dimension(\n '10rem',\n 'The default length of a vertical VProgressLinear (overridable through `height`)',\n ),\n 'size-progress-circular-diameter': dimension(\n '3rem',\n 'The default diameter of VProgressCircular',\n ),\n 'size-progress-circular-thickness': dimension(\n '0.25rem',\n 'The default stroke thickness of VProgressCircular (4px)',\n ),\n 'size-skeleton-surface': dimension(\n '6rem',\n 'The default height of a surface-shaped VSkeletonLoader — a card, an image (96px)',\n ),\n 'size-toast-width': dimension('22rem', 'The default width of a toast'),\n 'size-snackbar-min': dimension('18rem', 'The minimum width of a snackbar (288px)'),\n 'size-snackbar-max': dimension('36rem', 'The maximum width of a snackbar (576px)'),\n 'size-badge-h': dimension('1.25rem', 'The height of VBadge (the pill)'),\n 'size-badge-dot': dimension('0.625rem', 'The diameter of VBadge in dot mode'),\n 'size-avatar-ring': dimension('2px', 'The separating ring of stacked Avatars (VAvatarGroup)'),\n 'size-date-picker-cell': dimension(\n '2.5rem',\n 'The side (height/width) of a VDatePicker day cell',\n ),\n 'size-date-picker-dot': dimension('0.25rem', 'The diameter of a VDatePicker event dot'),\n 'size-date-picker-nav-min': dimension(\n '5.375rem',\n \"The minimum width of VDatePicker's month/year picker buttons (≈86px)\",\n ),\n 'size-tab-indicator': dimension(\n '2px',\n 'The thickness of the active tab indicator (VTabs, flat/outlined)',\n ),\n 'size-table-search': dimension('16rem', \"The width of VDataTable's search field\"),\n 'size-time-picker-dial': dimension(\n '16rem',\n \"The diameter of VTimePicker's clock face (the M3 spec)\",\n ),\n 'size-time-picker-number': dimension(\n '3rem',\n \"A numeral cell on VTimePicker's face, and the hand's dot on a marker\",\n ),\n 'size-time-picker-center': dimension('0.5rem', \"The centre dot of VTimePicker's face\"),\n 'size-time-picker-hand': dimension('2px', \"The thickness of the hand on VTimePicker's face\"),\n 'size-time-picker-hand-minor': dimension(\n '1rem',\n \"The dot of VTimePicker's hand on a minute off the 5-minute markers\",\n ),\n 'size-time-input-list-max-block': dimension(\n '18rem',\n \"The maximum height of VTimeInput's list panel (the scrolling area)\",\n ),\n 'size-file-picker-min-block': dimension(\n '10rem',\n \"The minimum height of VFilePicker's drop zone — icon, two lines, separator and button\",\n ),\n 'size-file-picker-icon': dimension(\n '2.5rem',\n \"The large icon at the top of VFilePicker's drop zone\",\n ),\n 'size-file-picker-thumb': dimension(\n '2.5rem',\n 'The thumbnail square of a VFilePicker preview row (an image, or its type icon)',\n ),\n /*\n * A card is exactly as tall as its event is long — there is deliberately no floor — so\n * this value alone decides how much room the shortest event gets. At 4rem an hour, a\n * quarter of one is 16px, which holds a line of the title once its leading is tightened;\n * VCalendarEvent does that by measuring the card rather than by counting minutes. Lower\n * it much and the shortest events stop being readable at all.\n */\n 'size-calendar-hour': dimension('4rem', \"The height of one hour in VCalendar's time grid\"),\n 'size-calendar-gutter': dimension(\n '4.5rem',\n \"The column of hour labels beside VCalendar's time grid, wide enough for a 12-hour clock's '12:00 AM' on one line\",\n ),\n 'size-calendar-tick': dimension(\n '0.375rem',\n \"How far an hour's rule runs back into VCalendar's gutter, tying the label to its line\",\n ),\n /*\n * TRAP — the twin of `EDGE_BAND` in `VCalendar/edgeStep.ts`, which is the same strip\n * measured in JavaScript. This value is what the reader SEES light up; that one is where\n * the calendar actually starts counting down to turn the page. Move one alone and the\n * calendar pages from somewhere other than where it said it would, with nothing to point\n * at it.\n */\n 'size-calendar-edge': dimension(\n '3rem',\n 'The strip at the side of VCalendar that pages the view when a dragged event rests on it',\n ),\n 'size-calendar-day-min': dimension(\n '5rem',\n 'The width a VCalendar day column may not go below, past which the grid scrolls',\n ),\n 'size-calendar-handle': dimension(\n '0.5rem',\n \"The strip along a VCalendar card's bottom edge that its end is dragged by\",\n ),\n 'size-calendar-allday-lane': dimension('1.5rem', \"One lane of VCalendar's all-day band\"),\n 'size-calendar-allday-max': dimension(\n '7rem',\n 'The height past which that band scrolls instead of growing',\n ),\n 'size-calendar-now-dot': dimension('0.625rem', \"The dot on VCalendar's current-time line\"),\n /*\n * Sized so the default `monthEventLimit` of three chips AND the \"+N more\" line beneath\n * them fit without being clipped: 136px, less the padding, the border and the 32px day\n * button, leaves 85px against 76px of chips and a 14px more-line. Shrinking it silently\n * costs the third chip, since the cell clips rather than scrolls.\n */\n 'size-calendar-month-cell': dimension(\n '8.5rem',\n \"The minimum height of a day in VCalendar's month view\",\n ),\n 'size-calendar-year-cell': dimension(\n '1.5rem',\n \"The side of a day square in the mini-months of VCalendar's year view\",\n ),\n },\n icon: {\n 'size-sm': dimension('1rem', '16px icons'),\n 'size-md': dimension('1.25rem', '20px icons'),\n 'size-lg': dimension('1.5rem', '24px icons'),\n },\n} satisfies TokenGroup\n"],"mappings":";;AAeA,IAAa,IAAW;CACtB,OAAO;EACL,SAAS,EAAM,iBAAiB,6BAA6B;EAC7D,iBAAiB,EAAM,oBAAoB,sCAAsC;EACjF,kBAAkB,EAAM,iBAAiB,wBAAwB;EACjE,mBAAmB,EAAM,iBAAiB,6CAA6C;EACvF,kBAAkB,EAAM,mBAAmB,oCAAoC;EAC/E,mBAAmB,EAAM,oBAAoB,sCAAsC;EACnF,oBAAoB,EAClB,oBACA,mGACF;EAEA,mBAAmB,EAAM,iBAAiB,iCAAiC;EAE3E,MAAM,EAAM,kBAAkB;EAC9B,cAAc,EAAM,kBAAkB;EACtC,eAAe,EAAM,oBAAoB,6BAA6B;EACtE,kBAAkB,EAAM,iBAAiB,iDAAiD;EAC1F,mBAAmB,EACjB,oBACA,oEACF;EAEA,QAAQ,EAAM,kBAAkB;EAChC,iBAAiB,EAAM,oBAAoB,8BAA8B;EAEzE,QAAQ,EAAM,oBAAoB;EAClC,gBAAgB,EAAM,oBAAoB;EAC1C,iBAAiB,EAAM,oBAAoB;EAC3C,kBAAkB,EAAM,qBAAqB,iDAAiD;EAC9F,iBAAiB,EAAM,oBAAoB;EAC3C,eAAe,EAAM,sBAAsB,+CAA+C;EAE1F,QAAQ,EAAM,iBAAiB;EAC/B,gBAAgB,EA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iC;EACtE,kBAAkB,EAAU,YAAY,oCAAoC;EAC5E,oBAAoB,EAAU,OAAO,uDAAuD;EAC5F,yBAAyB,EACvB,UACA,mDACF;EACA,wBAAwB,EAAU,WAAW,yCAAyC;EACtF,4BAA4B,EAC1B,YACA,sEACF;EACA,sBAAsB,EACpB,OACA,kEACF;EACA,qBAAqB,EAAU,SAAS,wCAAwC;EAChF,yBAAyB,EACvB,SACA,wDACF;EACA,2BAA2B,EACzB,QACA,sEACF;EACA,2BAA2B,EAAU,UAAU,sCAAsC;EACrF,yBAAyB,EAAU,OAAO,iDAAiD;EAC3F,+BAA+B,EAC7B,QACA,oEACF;EACA,kCAAkC,EAChC,SACA,oEACF;EACA,8BAA8B,EAC5B,SACA,uFACF;EACA,yBAAyB,EACvB,UACA,sDACF;EACA,0BAA0B,EACxB,UACA,gFACF;EAQA,sBAAsB,EAAU,QAAQ,iDAAiD;EACzF,wBAAwB,EACtB,UACA,kHACF;EACA,sBAAsB,EACpB,YACA,uFACF;EAQA,sBAAsB,EACpB,QACA,yFACF;EACA,yBAAyB,EACvB,QACA,gFACF;EACA,wBAAwB,EACtB,UACA,2EACF;EACA,6BAA6B,EAAU,UAAU,sCAAsC;EACvF,4BAA4B,EAC1B,QACA,4DACF;EACA,yBAAyB,EAAU,YAAY,0CAA0C;EAOzF,4BAA4B,EAC1B,UACA,uDACF;EACA,2BAA2B,EACzB,UACA,sEACF;CACF;CACA,MAAM;EACJ,WAAW,EAAU,QAAQ,YAAY;EACzC,WAAW,EAAU,WAAW,YAAY;EAC5C,WAAW,EAAU,UAAU,YAAY;CAC7C;AACF"}
1
+ {"version":3,"file":"semantic.js","names":[],"sources":["../../src/tokens/semantic.ts"],"sourcesContent":["/**\n * The tokens naming a ROLE rather than a value: the page background, ordinary text, the\n * accent an application is built around, the pause before a tooltip.\n *\n * These are the ONLY tokens a component mentions, and that is the whole point — a component\n * asks for the accent and never for a particular indigo, so an application can change what\n * the accent IS without any component knowing.\n *\n * Almost every entry ALIASES a palette step in braces rather than stating a value. What is\n * written here is the LIGHT theme; `themes/dark.ts` repoints the same roles.\n */\nimport { color, dimension, duration, fontFamily, fontWeight, type TokenGroup } from './types'\n\nexport const semantic = {\n color: {\n surface: color('{color.white}', 'The default page background'),\n 'surface-muted': color('{color.gray.100}', 'A muted background (secondary areas)'),\n 'surface-raised': color('{color.white}', 'Raised surfaces: cards'),\n 'surface-overlay': color('{color.white}', 'Floating surfaces: dialogs, popovers, menus'),\n 'surface-sunken': color('{color.gray.50}', 'Sunken surfaces: wells, code areas'),\n 'surface-inverse': color('{color.gray.900}', 'Inverted-contrast surfaces: tooltips'),\n 'surface-skeleton': color(\n '{color.gray.200}',\n 'The background of the loading silhouettes (VSkeletonLoader); the highlight derives from it in CSS',\n ),\n\n 'text-on-inverse': color('{color.white}', 'Text set on an inverted surface'),\n\n text: color('{color.gray.900}'),\n 'text-muted': color('{color.gray.600}'),\n 'text-subtle': color('{color.gray.500}', 'Placeholders, disabled text'),\n 'text-on-accent': color('{color.white}', 'Text set on an accent/danger/success background'),\n 'text-on-warning': color(\n '{color.gray.950}',\n 'Text set on a solid warning background (amber too light for white)',\n ),\n\n border: color('{color.gray.200}'),\n 'border-strong': color('{color.gray.300}', 'The borders of form controls'),\n\n accent: color('{color.indigo.600}'),\n 'accent-hover': color('{color.indigo.700}'),\n 'accent-active': color('{color.indigo.800}'),\n 'accent-surface': color('{color.indigo.50}', 'A tinted accent background (badges, selections)'),\n 'accent-border': color('{color.indigo.200}'),\n 'accent-text': color('{color.indigo.700}', 'Accent text on a neutral or tinted background'),\n\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.50}'),\n 'danger-border': color('{color.red.200}'),\n 'danger-text': color('{color.red.700}'),\n\n /*\n * Green starts one step darker than the other colours. White text on a filled button\n * only becomes readable enough from green 700 onwards — green 600 falls well short of\n * the threshold. Darkening the colour rather than darkening the text is what keeps one\n * simple rule true: a filled control carries white text.\n *\n * The one exception is the warning colour, since no step of an amber is ever dark\n * enough for white, which is why it alone declares a text colour of its own.\n */\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.50}'),\n 'success-border': color('{color.green.200}'),\n 'success-text': color('{color.green.800}'),\n\n warning: color('{color.amber.600}'),\n 'warning-hover': color('{color.amber.700}'),\n 'warning-active': color('{color.amber.800}'),\n 'warning-surface': color('{color.amber.50}'),\n 'warning-border': color('{color.amber.200}'),\n 'warning-text': color('{color.amber.900}'),\n\n backdrop: color('oklch(0% 0 0 / 0.45)', 'The veil behind modal dialogs'),\n\n /*\n * The four colours of a calendar event that names none of its own.\n *\n * These are the one place in the design system where a colour is DATA rather than a\n * role: which hue an event takes is derived from its id (see `VCalendar/color.ts`),\n * and it arrives here through `--vectis-calendar-event-hue`, a per-instance input the\n * component sets on each card. That is why they are written out rather than aliased to\n * a palette — there is no palette to point at, only a wheel.\n *\n * WHAT MAKES THEM READABLE, and what must not be changed casually. Only the HUE\n * varies; the lightness and the chroma below are fixed, and in OKLCH lightness is\n * perceptual — so the distance between the text at L 0.40 and the card at L 0.95 is\n * the same perceived distance at every hue, which is what turns \"an arbitrary colour\"\n * into a contrast ratio that can be relied on. Moving either number moves the contrast\n * of every event in the calendar at once. The same pair is restated in `themes/dark.ts`\n * with the roles swapped end for end.\n *\n * A custom property substitutes at the point it is USED, not where it is declared, so\n * the hue each card sets is what these resolve against — the trick `VSkeletonLoader`\n * uses for its highlight.\n */\n 'event-surface': color(\n 'oklch(0.95 0.045 var(--vectis-calendar-event-hue, 265))',\n 'The face of a calendar event that carries no colour of its own',\n ),\n 'event-border': color(\n 'oklch(0.85 0.08 var(--vectis-calendar-event-hue, 265))',\n 'The edge of that event, and the bar marking its leading side',\n ),\n 'event-text': color(\n 'oklch(0.4 0.11 var(--vectis-calendar-event-hue, 265))',\n 'The title written on that face',\n ),\n },\n /**\n * The typography, described by role rather than by measurement: a heading, a subtitle,\n * a caption, a piece of code.\n *\n * Each role is a COMPLETE recipe — a size, a weight, the space between lines, and where\n * it matters the space between letters. Asking for a role therefore settles every one of\n * those at once, and two pieces of text in the same role cannot drift apart. It is what\n * the typography component renders, and what the components' own stylesheets ask for.\n */\n text: {\n family: fontFamily('{font.family.sans}', 'The font of all the design system text'),\n 'family-heading': fontFamily(\n '{font.family.display}',\n 'The font of the display and heading roles; identical to the running font until it is overridden',\n ),\n 'family-code': fontFamily(\n '{font.family.mono}',\n 'The font of code content (the code variant, VInputOTP)',\n ),\n display: {\n size: dimension('{font.size.5xl}'),\n weight: fontWeight('{font.weight.bold}'),\n leading: dimension('{font.leading.none}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-1': {\n size: dimension('{font.size.4xl}'),\n weight: fontWeight('{font.weight.bold}'),\n leading: dimension('{font.leading.tight}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-2': {\n size: dimension('{font.size.2xl}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.tight}'),\n tracking: dimension('{font.tracking.tight}'),\n },\n 'heading-3': {\n size: dimension('{font.size.lg}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.snug}'),\n },\n 'heading-4': {\n size: dimension('{font.size.md}'),\n weight: fontWeight('{font.weight.semibold}'),\n leading: dimension('{font.leading.snug}'),\n },\n subtitle: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n /**\n * The introduction that opens a page or a section, one step above the running text.\n *\n * It shares `body-lg`'s generous leading rather than taking a tighter one: a lead is read\n * as prose, not as a heading, and the two therefore sit in the same column without the\n * rhythm changing under the reader between the first paragraph and the second.\n */\n 'body-xl': {\n size: dimension('{font.size.lg}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.relaxed}'),\n },\n 'body-lg': {\n size: dimension('{font.size.md}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.relaxed}'),\n },\n 'body-md': {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n 'body-sm': {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n label: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.snug}'),\n },\n caption: {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.snug}'),\n },\n overline: {\n size: dimension('{font.size.xs}'),\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.snug}'),\n tracking: dimension('{font.tracking.wide}'),\n },\n code: {\n size: dimension('{font.size.sm}'),\n weight: fontWeight('{font.weight.regular}'),\n leading: dimension('{font.leading.normal}'),\n },\n /*\n * A role of a different sort: the label of a control — a button, a chip, a badge. It\n * deliberately carries no SIZE, because a control's text size comes from the size it\n * was given, and this recipe only settles the weight and the space between lines.\n */\n control: {\n weight: fontWeight('{font.weight.medium}'),\n leading: dimension('{font.leading.none}'),\n },\n },\n radius: {\n interactive: dimension('{radius.md}', 'Buttons, inputs, controls'),\n surface: dimension('{radius.lg}', 'Cards, alerts'),\n overlay: dimension('{radius.xl}', 'Dialogs, popovers, menus'),\n pill: dimension('{radius.full}'),\n chip: dimension('{radius.interactive}', 'Chips (shape=\"chip\"), follows interactive by default'),\n },\n /**\n * How long a change takes, described by what it is: the immediate feedback of a control\n * under the pointer, the ordinary pace of the design system, a deliberately slower move.\n *\n * These three are what a `transition` reaches for. Motion does not vary from one theme to\n * the next, so unlike the colours they are stated once and never restated.\n */\n duration: {\n fast: duration('{duration.150}', 'Colour and border changes on hover, focus, press'),\n base: duration('{duration.200}', 'The default: a panel opening, a value moving'),\n slow: duration('{duration.300}', 'Movements large enough to be followed by the eye'),\n },\n focus: {\n 'ring-color': color('{color.indigo.500}'),\n 'ring-width': dimension('2px'),\n 'ring-offset': dimension('2px'),\n },\n control: {\n 'height-xs': dimension('1.5rem'),\n 'height-sm': dimension('2rem'),\n 'height-md': dimension('2.5rem'),\n 'height-lg': dimension('3rem'),\n 'height-xl': dimension('3.5rem'),\n 'border-width': dimension('2px', 'The border of checkable controls (VCheckbox, VRadio)'),\n 'size-check': dimension('1.25rem', 'The box of checkable controls (VCheckbox, VRadio)'),\n 'size-check-mark': dimension('0.875rem', \"VCheckbox's SVG tick\"),\n 'size-check-dot': dimension('0.5rem', \"VRadio's inner dot\"),\n 'size-switch-w': dimension('2.5rem', \"The width of VSwitch's track\"),\n 'size-switch-h': dimension('1.25rem', \"The height of VSwitch's track\"),\n 'size-switch-pad': dimension(\n '0.125rem',\n \"The gap between VSwitch's thumb and the edge of its track\",\n ),\n 'action-size-sm': dimension(\n '1.25rem',\n 'The inner buttons of sm input fields (clear, a clickable icon)',\n ),\n 'action-size-md': dimension(\n '1.5rem',\n 'The inner buttons of md input fields (clear, a clickable icon)',\n ),\n 'action-size-lg': dimension(\n '1.75rem',\n 'The inner buttons of lg input fields (clear, a clickable icon)',\n ),\n 'size-slider-track': dimension('0.375rem', \"The thickness of VSlider's track\"),\n 'size-slider-thumb': dimension('1.25rem', \"The diameter of VSlider's thumb\"),\n 'size-slider-length': dimension('10rem', 'The default length of a vertical VSlider'),\n 'size-slider-field': dimension('5rem', \"The width of VSlider's number fields\"),\n 'size-carousel-block': dimension(\n '24rem',\n \"The default block size of VCarousel's viewport. Load-bearing in the vertical orientation: a percentage flex-basis has no definite reference on the block axis, and every slide would collapse onto its content without it\",\n ),\n 'size-carousel-indicator': dimension(\n '0.625rem',\n 'The diameter of a VCarousel indicator dot (its hit area comes from --vectis-control-height-xs)',\n ),\n 'size-carousel-indicator-active': dimension(\n '1.25rem',\n 'The main-axis size of the ACTIVE VCarousel indicator, which stretches from a dot into a pill',\n ),\n 'size-combobox-list-max-block': dimension(\n '18rem',\n \"The maximum height of VCombobox's list panel (the scrolling area)\",\n ),\n 'size-menu-min': dimension('11rem', \"The minimum width of VMenu's panel\"),\n 'size-menu-max': dimension('20rem', \"The maximum width of VMenu's panel\"),\n 'size-progress-linear-thickness': dimension(\n '0.25rem',\n \"The default thickness of VProgressLinear's bar (4px)\",\n ),\n 'size-progress-linear-length': dimension(\n '10rem',\n 'The default length of a vertical VProgressLinear (overridable through `height`)',\n ),\n 'size-progress-circular-diameter': dimension(\n '3rem',\n 'The default diameter of VProgressCircular',\n ),\n 'size-progress-circular-thickness': dimension(\n '0.25rem',\n 'The default stroke thickness of VProgressCircular (4px)',\n ),\n 'size-skeleton-surface': dimension(\n '6rem',\n 'The default height of a surface-shaped VSkeletonLoader — a card, an image (96px)',\n ),\n 'size-toast-width': dimension('22rem', 'The default width of a toast'),\n 'size-dialog-width': dimension(\n '25rem',\n 'The default width of VDialog and VDialogAlert (400px), when no `width` is given',\n ),\n 'size-snackbar-min': dimension('18rem', 'The minimum width of a snackbar (288px)'),\n 'size-snackbar-max': dimension('36rem', 'The maximum width of a snackbar (576px)'),\n 'size-badge-h': dimension('1.25rem', 'The height of VBadge (the pill)'),\n 'size-badge-dot': dimension('0.625rem', 'The diameter of VBadge in dot mode'),\n 'size-badge-ring': dimension('2px', 'The detaching ring of a bordered VBadge'),\n 'size-avatar-ring': dimension('2px', 'The separating ring of stacked Avatars (VAvatarGroup)'),\n 'size-date-picker-cell': dimension(\n '2.5rem',\n 'The side (height/width) of a VDatePicker day cell',\n ),\n 'size-date-picker-day': dimension(\n '{control.height.md}',\n 'The diameter of the disc a VDatePicker day is drawn on; the cell grows to hold it',\n ),\n 'size-date-picker-dot': dimension('0.25rem', 'The diameter of a VDatePicker event dot'),\n 'size-date-picker-nav-min': dimension(\n '5.375rem',\n \"The minimum width of VDatePicker's month/year picker buttons (≈86px)\",\n ),\n 'size-tab-indicator': dimension(\n '2px',\n 'The thickness of the active tab indicator (VTabs, flat/outlined)',\n ),\n 'size-table-search': dimension('16rem', \"The width of VDataTable's search field\"),\n 'size-time-picker-dial': dimension(\n '16rem',\n \"The diameter of VTimePicker's clock face (the M3 spec)\",\n ),\n 'size-time-picker-number': dimension(\n '3rem',\n \"A numeral cell on VTimePicker's face, and the hand's dot on a marker\",\n ),\n 'size-time-picker-center': dimension('0.5rem', \"The centre dot of VTimePicker's face\"),\n 'size-time-picker-hand': dimension('2px', \"The thickness of the hand on VTimePicker's face\"),\n 'size-time-picker-hand-minor': dimension(\n '1rem',\n \"The dot of VTimePicker's hand on a minute off the 5-minute markers\",\n ),\n 'size-file-picker-min-block': dimension(\n '10rem',\n \"The minimum height of VFilePicker's drop zone — icon, two lines, separator and button\",\n ),\n 'size-file-picker-icon': dimension(\n '2.5rem',\n \"The large icon at the top of VFilePicker's drop zone\",\n ),\n 'size-file-picker-thumb': dimension(\n '2.5rem',\n 'The thumbnail square of a VFilePicker preview row (an image, or its type icon)',\n ),\n /*\n * A card is exactly as tall as its event is long — there is deliberately no floor — so\n * this value alone decides how much room the shortest event gets. At 4rem an hour, a\n * quarter of one is 16px, which holds a line of the title once its leading is tightened;\n * VCalendarEvent does that by measuring the card rather than by counting minutes. Lower\n * it much and the shortest events stop being readable at all.\n */\n 'size-calendar-hour': dimension('4rem', \"The height of one hour in VCalendar's time grid\"),\n 'size-calendar-gutter': dimension(\n '4.5rem',\n \"The column of hour labels beside VCalendar's time grid, wide enough for a 12-hour clock's '12:00 AM' on one line\",\n ),\n 'size-calendar-tick': dimension(\n '0.375rem',\n \"How far an hour's rule runs back into VCalendar's gutter, tying the label to its line\",\n ),\n /*\n * TRAP — the twin of `EDGE_BAND` in `VCalendar/edgeStep.ts`, which is the same strip\n * measured in JavaScript. This value is what the reader SEES light up; that one is where\n * the calendar actually starts counting down to turn the page. Move one alone and the\n * calendar pages from somewhere other than where it said it would, with nothing to point\n * at it.\n */\n 'size-calendar-edge': dimension(\n '3rem',\n 'The strip at the side of VCalendar that pages the view when a dragged event rests on it',\n ),\n 'size-calendar-day-min': dimension(\n '5rem',\n 'The width a VCalendar day column may not go below, past which the grid scrolls',\n ),\n 'size-calendar-handle': dimension(\n '0.5rem',\n \"The strip along a VCalendar card's bottom edge that its end is dragged by\",\n ),\n 'size-calendar-allday-lane': dimension('1.5rem', \"One lane of VCalendar's all-day band\"),\n 'size-calendar-allday-max': dimension(\n '7rem',\n 'The height past which that band scrolls instead of growing',\n ),\n 'size-calendar-now-dot': dimension('0.625rem', \"The dot on VCalendar's current-time line\"),\n /*\n * Sized so the default `monthEventLimit` of three chips AND the \"+N more\" line beneath\n * them fit without being clipped: 136px, less the padding, the border and the 32px day\n * button, leaves 85px against 76px of chips and a 14px more-line. Shrinking it silently\n * costs the third chip, since the cell clips rather than scrolls.\n */\n 'size-calendar-month-cell': dimension(\n '8.5rem',\n \"The minimum height of a day in VCalendar's month view\",\n ),\n 'size-calendar-year-cell': dimension(\n '1.5rem',\n \"The side of a day square in the mini-months of VCalendar's year view\",\n ),\n },\n icon: {\n 'size-sm': dimension('1rem', '16px icons'),\n 'size-md': dimension('1.25rem', '20px icons'),\n 'size-lg': dimension('1.5rem', '24px icons'),\n },\n} satisfies TokenGroup\n"],"mappings":";;AAaA,IAAa,IAAW;CACtB,OAAO;EACL,SAAS,EAAM,iBAAiB,6BAA6B;EAC7D,iBAAiB,EAAM,oBAAoB,sCAAsC;EACjF,kBAAkB,EAAM,iBAAiB,wBAAwB;EACjE,mBAAmB,EAAM,iBAAiB,6CAA6C;EACvF,kBAAkB,EAAM,mBAAmB,oCAAoC;EAC/E,mBAAmB,EAAM,oBAAoB,sCAAsC;EACnF,oBAAoB,EAClB,oBACA,mGACF;EAEA,mBAAmB,EAAM,iBAAiB,iCAAiC;EAE3E,MAAM,EAAM,kBAAkB;EAC9B,cAAc,EAAM,kBAAkB;EACtC,eAAe,EAAM,oBAAoB,6BAA6B;EACtE,kBAAkB,EAAM,iBAAiB,iDAAiD;EAC1F,mBAAmB,EACjB,oBACA,oEACF;EAEA,QAAQ,EAAM,kBAAkB;EACh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,EAC1B,UACA,uDACF;EACA,2BAA2B,EACzB,UACA,sEACF;CACF;CACA,MAAM;EACJ,WAAW,EAAU,QAAQ,YAAY;EACzC,WAAW,EAAU,WAAW,YAAY;EAC5C,WAAW,EAAU,UAAU,YAAY;CAC7C;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"dark.js","names":[],"sources":["../../../src/tokens/themes/dark.ts"],"sourcesContent":["/**\n * The dark theme.\n *\n * It restates the tokens that describe a ROLE — the page's background, the colour of\n * ordinary text, the accent — and never the palette those roles draw from. The palette is\n * the same in both themes; what changes is which step of it each role points at.\n *\n * Every entry here must correspond to a role that already exists, and the build checks\n * it. A theme is allowed to reassign a role, never to invent one: a token existing in\n * only one theme would leave a component unstyled in the other.\n */\nimport { color, type TokenGroup } from '../types'\n\nexport const dark = {\n color: {\n surface: color('{color.gray.950}'),\n 'surface-muted': color('{color.gray.800}'),\n 'surface-raised': color('{color.gray.900}'),\n 'surface-overlay': color('{color.gray.900}'),\n 'surface-sunken': color('oklch(11% 0.006 260)'),\n 'surface-inverse': color('{color.gray.800}'),\n 'surface-skeleton': color('{color.gray.800}'),\n\n 'text-on-inverse': color('{color.gray.50}'),\n\n text: color('{color.gray.50}'),\n 'text-muted': color('{color.gray.300}'),\n 'text-subtle': color('{color.gray.400}'),\n 'text-on-accent': color('{color.white}'),\n\n border: color('{color.gray.800}'),\n 'border-strong': color('{color.gray.700}'),\n\n accent: color('{color.indigo.500}'),\n 'accent-hover': color('{color.indigo.400}'),\n 'accent-active': color('{color.indigo.300}'),\n 'accent-surface': color('{color.indigo.950}'),\n 'accent-border': color('{color.indigo.900}'),\n 'accent-text': color('{color.indigo.300}'),\n\n /*\n * Danger and success keep exactly the steps the light theme gives them, brightness\n * included. A filled button in either colour carries white text, and white only\n * reaches the required contrast from red 600 and green 700 onwards — so there is no\n * lighter step for the dark theme to move to. They therefore go DARKER on hover here,\n * the opposite direction from the accent and the warning.\n *\n * These entries are deliberately identical to the light ones. Deleting them as\n * redundant would let a later change to the roles quietly drag the dark theme back\n * into the range where the text cannot be read.\n */\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.950}'),\n 'danger-border': color('{color.red.900}'),\n 'danger-text': color('{color.red.300}'),\n\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.950}'),\n 'success-border': color('{color.green.900}'),\n 'success-text': color('{color.green.300}'),\n\n warning: color('{color.amber.500}'),\n 'warning-hover': color('{color.amber.400}'),\n 'warning-active': color('{color.amber.300}'),\n 'warning-surface': color('{color.amber.950}'),\n 'warning-border': color('{color.amber.900}'),\n 'warning-text': color('{color.amber.300}'),\n\n backdrop: color('oklch(0% 0 0 / 0.6)'),\n\n /*\n * The calendar event colours, with the two roles swapped end for end: the card becomes\n * the dark value and the title the light one. The hue still arrives from the card\n * itself, so only the lightness and the chroma are restated here — which is the whole\n * point of splitting them that way, since the contrast between a fixed 0.90 and a fixed\n * 0.30 holds at every hue exactly as its light counterpart does. See `semantic.ts` for\n * the full reasoning; the two blocks have to be read together.\n *\n * The chroma is lower than in light on purpose: a saturated colour reads as brighter\n * against a dark ground, and matching the light values would make a wall of events\n * glare.\n */\n 'event-surface': color('oklch(0.3 0.05 var(--vectis-calendar-event-hue, 265))'),\n 'event-border': color('oklch(0.42 0.08 var(--vectis-calendar-event-hue, 265))'),\n 'event-text': color('oklch(0.9 0.06 var(--vectis-calendar-event-hue, 265))'),\n },\n focus: {\n 'ring-color': color('{color.indigo.400}'),\n },\n} satisfies TokenGroup\n"],"mappings":";;AAaA,IAAa,IAAO;CAClB,OAAO;EACL,SAAS,EAAM,kBAAkB;EACjC,iBAAiB,EAAM,kBAAkB;EACzC,kBAAkB,EAAM,kBAAkB;EAC1C,mBAAmB,EAAM,kBAAkB;EAC3C,kBAAkB,EAAM,sBAAsB;EAC9C,mBAAmB,EAAM,kBAAkB;EAC3C,oBAAoB,EAAM,kBAAkB;EAE5C,mBAAmB,EAAM,iBAAiB;EAE1C,MAAM,EAAM,iBAAiB;EAC7B,cAAc,EAAM,kBAAkB;EACtC,eAAe,EAAM,kBAAkB;EACvC,kBAAkB,EAAM,eAAe;EAEvC,QAAQ,EAAM,kBAAkB;EAChC,iBAAiB,EAAM,kBAAkB;EAEzC,QAAQ,EAAM,oBAAoB;EAClC,gBAAgB,EAAM,oBAAoB;EAC1C,iBAAiB,EAAM,oBAAoB;EAC3C,kBAAkB,EAAM,oBAAoB;EAC5C,iBAAiB,EAAM,oBAAoB;EAC3C,eAAe,EAAM,oBAAoB;EAazC,QAAQ,EAAM,iBAAiB;EAC/B,gBAAgB,EAAM,iBAAiB;EACvC,iBAAiB,EAAM,iBAAiB;EACxC,kBAAkB,EAAM,iBAAiB;EACzC,iBAAiB,EAAM,iBAAiB;EACxC,eAAe,EAAM,iBAAiB;EAEtC,SAAS,EAAM,mBAAmB;EAClC,iBAAiB,EAAM,mBAAmB;EAC1C,kBAAkB,EAAM,mBAAmB;EAC3C,mBAAmB,EAAM,mBAAmB;EAC5C,kBAAkB,EAAM,mBAAmB;EAC3C,gBAAgB,EAAM,mBAAmB;EAEzC,SAAS,EAAM,mBAAmB;EAClC,iBAAiB,EAAM,mBAAmB;EAC1C,kBAAkB,EAAM,mBAAmB;EAC3C,mBAAmB,EAAM,mBAAmB;EAC5C,kBAAkB,EAAM,mBAAmB;EAC3C,gBAAgB,EAAM,mBAAmB;EAEzC,UAAU,EAAM,qBAAqB;EAcrC,iBAAiB,EAAM,uDAAuD;EAC9E,gBAAgB,EAAM,wDAAwD;EAC9E,cAAc,EAAM,uDAAuD;CAC7E;CACA,OAAO,EACL,cAAc,EAAM,oBAAoB,EAC1C;AACF"}
1
+ {"version":3,"file":"dark.js","names":[],"sources":["../../../src/tokens/themes/dark.ts"],"sourcesContent":["/**\n * The dark theme: ROLES repointed, never the palette they draw from. The palette is the same\n * in both themes; what changes is which step each role names.\n *\n * Every key here must already exist in `semantic.ts`, and the build fails otherwise. A theme\n * may reassign a role, never invent one — a token existing in only one theme leaves a\n * component unstyled in the other.\n */\nimport { color, type TokenGroup } from '../types'\n\nexport const dark = {\n color: {\n surface: color('{color.gray.950}'),\n 'surface-muted': color('{color.gray.800}'),\n 'surface-raised': color('{color.gray.900}'),\n 'surface-overlay': color('{color.gray.900}'),\n 'surface-sunken': color('oklch(11% 0.006 260)'),\n 'surface-inverse': color('{color.gray.800}'),\n 'surface-skeleton': color('{color.gray.800}'),\n\n 'text-on-inverse': color('{color.gray.50}'),\n\n text: color('{color.gray.50}'),\n 'text-muted': color('{color.gray.300}'),\n 'text-subtle': color('{color.gray.400}'),\n 'text-on-accent': color('{color.white}'),\n\n border: color('{color.gray.800}'),\n 'border-strong': color('{color.gray.700}'),\n\n accent: color('{color.indigo.500}'),\n 'accent-hover': color('{color.indigo.400}'),\n 'accent-active': color('{color.indigo.300}'),\n 'accent-surface': color('{color.indigo.950}'),\n 'accent-border': color('{color.indigo.900}'),\n 'accent-text': color('{color.indigo.300}'),\n\n /*\n * Danger and success keep exactly the steps the light theme gives them, brightness\n * included. A filled button in either colour carries white text, and white only\n * reaches the required contrast from red 600 and green 700 onwards — so there is no\n * lighter step for the dark theme to move to. They therefore go DARKER on hover here,\n * the opposite direction from the accent and the warning.\n *\n * These entries are deliberately identical to the light ones. Deleting them as\n * redundant would let a later change to the roles quietly drag the dark theme back\n * into the range where the text cannot be read.\n */\n danger: color('{color.red.600}'),\n 'danger-hover': color('{color.red.700}'),\n 'danger-active': color('{color.red.800}'),\n 'danger-surface': color('{color.red.950}'),\n 'danger-border': color('{color.red.900}'),\n 'danger-text': color('{color.red.300}'),\n\n success: color('{color.green.700}'),\n 'success-hover': color('{color.green.800}'),\n 'success-active': color('{color.green.900}'),\n 'success-surface': color('{color.green.950}'),\n 'success-border': color('{color.green.900}'),\n 'success-text': color('{color.green.300}'),\n\n warning: color('{color.amber.500}'),\n 'warning-hover': color('{color.amber.400}'),\n 'warning-active': color('{color.amber.300}'),\n 'warning-surface': color('{color.amber.950}'),\n 'warning-border': color('{color.amber.900}'),\n 'warning-text': color('{color.amber.300}'),\n\n backdrop: color('oklch(0% 0 0 / 0.6)'),\n\n /*\n * The calendar event colours, with the two roles swapped end for end: the card becomes\n * the dark value and the title the light one. The hue still arrives from the card\n * itself, so only the lightness and the chroma are restated here — which is the whole\n * point of splitting them that way, since the contrast between a fixed 0.90 and a fixed\n * 0.30 holds at every hue exactly as its light counterpart does. See `semantic.ts` for\n * the full reasoning; the two blocks have to be read together.\n *\n * The chroma is lower than in light on purpose: a saturated colour reads as brighter\n * against a dark ground, and matching the light values would make a wall of events\n * glare.\n */\n 'event-surface': color('oklch(0.3 0.05 var(--vectis-calendar-event-hue, 265))'),\n 'event-border': color('oklch(0.42 0.08 var(--vectis-calendar-event-hue, 265))'),\n 'event-text': color('oklch(0.9 0.06 var(--vectis-calendar-event-hue, 265))'),\n },\n focus: {\n 'ring-color': color('{color.indigo.400}'),\n },\n} satisfies TokenGroup\n"],"mappings":";;AAUA,IAAa,IAAO;CAClB,OAAO;EACL,SAAS,EAAM,kBAAkB;EACjC,iBAAiB,EAAM,kBAAkB;EACzC,kBAAkB,EAAM,kBAAkB;EAC1C,mBAAmB,EAAM,kBAAkB;EAC3C,kBAAkB,EAAM,sBAAsB;EAC9C,mBAAmB,EAAM,kBAAkB;EAC3C,oBAAoB,EAAM,kBAAkB;EAE5C,mBAAmB,EAAM,iBAAiB;EAE1C,MAAM,EAAM,iBAAiB;EAC7B,cAAc,EAAM,kBAAkB;EACtC,eAAe,EAAM,kBAAkB;EACvC,kBAAkB,EAAM,eAAe;EAEvC,QAAQ,EAAM,kBAAkB;EAChC,iBAAiB,EAAM,kBAAkB;EAEzC,QAAQ,EAAM,oBAAoB;EAClC,gBAAgB,EAAM,oBAAoB;EAC1C,iBAAiB,EAAM,oBAAoB;EAC3C,kBAAkB,EAAM,oBAAoB;EAC5C,iBAAiB,EAAM,oBAAoB;EAC3C,eAAe,EAAM,oBAAoB;EAazC,QAAQ,EAAM,iBAAiB;EAC/B,gBAAgB,EAAM,iBAAiB;EACvC,iBAAiB,EAAM,iBAAiB;EACxC,kBAAkB,EAAM,iBAAiB;EACzC,iBAAiB,EAAM,iBAAiB;EACxC,eAAe,EAAM,iBAAiB;EAEtC,SAAS,EAAM,mBAAmB;EAClC,iBAAiB,EAAM,mBAAmB;EAC1C,kBAAkB,EAAM,mBAAmB;EAC3C,mBAAmB,EAAM,mBAAmB;EAC5C,kBAAkB,EAAM,mBAAmB;EAC3C,gBAAgB,EAAM,mBAAmB;EAEzC,SAAS,EAAM,mBAAmB;EAClC,iBAAiB,EAAM,mBAAmB;EAC1C,kBAAkB,EAAM,mBAAmB;EAC3C,mBAAmB,EAAM,mBAAmB;EAC5C,kBAAkB,EAAM,mBAAmB;EAC3C,gBAAgB,EAAM,mBAAmB;EAEzC,UAAU,EAAM,qBAAqB;EAcrC,iBAAiB,EAAM,uDAAuD;EAC9E,gBAAgB,EAAM,wDAAwD;EAC9E,cAAc,EAAM,uDAAuD;CAC7E;CACA,OAAO,EACL,cAAc,EAAM,oBAAoB,EAC1C;AACF"}
@@ -1,21 +1,13 @@
1
1
  /**
2
- * The shape a design token takes in this repository.
2
+ * The shape of a design token here: `{ $value, $type, $description? }`, gathered in nested
3
+ * groups that give each one its full name. The DTCG format, which is what keeps these files
4
+ * legible to tools other than ours.
3
5
  *
4
- * A token is a named decision — this blue, this corner radius, this pause before a
5
- * tooltip appears — and it is written as a small object holding its value, what KIND of
6
- * thing it is, and optionally a sentence explaining it. Tokens are gathered in nested
7
- * groups, which is what gives each of them its full name.
6
+ * A token may ALIAS another by naming it in braces instead of stating a value, which is what
7
+ * lets the accent be "indigo at step 600" rather than a colour repeated in twenty places.
8
8
  *
9
- * A token may point at another instead of stating a value, by naming it in braces. That
10
- * is what lets "the colour of a primary button" be defined as "the indigo at step 600"
11
- * rather than as a colour repeated in twenty places.
12
- *
13
- * The format follows the one the W3C's design tokens group has been settling on, which is
14
- * what makes these files legible to tools other than ours.
15
- *
16
- * This is THE source of truth for every visual decision in the library. The stylesheet is
17
- * generated from it, and the live theming application to come will read and rewrite it
18
- * directly.
9
+ * This is THE source of truth for every visual decision in the library: `tokens.css` is
10
+ * generated from it, and the theming app to come will read and rewrite it directly.
19
11
  */
20
12
  export type TokenType = 'color' | 'dimension' | 'fontFamily' | 'fontWeight' | 'number' | 'duration' | 'cubicBezier' | 'shadow';
21
13
  export interface DesignToken {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/tokens/types.ts"],"sourcesContent":["/**\n * The shape a design token takes in this repository.\n *\n * A token is a named decision — this blue, this corner radius, this pause before a\n * tooltip appears — and it is written as a small object holding its value, what KIND of\n * thing it is, and optionally a sentence explaining it. Tokens are gathered in nested\n * groups, which is what gives each of them its full name.\n *\n * A token may point at another instead of stating a value, by naming it in braces. That\n * is what lets \"the colour of a primary button\" be defined as \"the indigo at step 600\"\n * rather than as a colour repeated in twenty places.\n *\n * The format follows the one the W3C's design tokens group has been settling on, which is\n * what makes these files legible to tools other than ours.\n *\n * This is THE source of truth for every visual decision in the library. The stylesheet is\n * generated from it, and the live theming application to come will read and rewrite it\n * directly.\n */\nexport type TokenType =\n | 'color'\n | 'dimension'\n | 'fontFamily'\n | 'fontWeight'\n | 'number'\n | 'duration'\n | 'cubicBezier'\n | 'shadow'\n\nexport interface DesignToken {\n $value: string\n $type: TokenType\n $description?: string\n}\n\nexport interface TokenGroup {\n [key: string]: DesignToken | TokenGroup\n}\n\n/** Tells a token apart from a group of them, which is what walking the tree rests on. */\nexport function isToken(node: DesignToken | TokenGroup): node is DesignToken {\n return typeof (node as DesignToken).$value === 'string'\n}\n\n/**\n * Builds the small helper used to declare a token of one kind, so that the token files\n * below read as `color('#fff')` rather than repeating the shape of the object each time.\n */\nconst make =\n ($type: TokenType) =>\n ($value: string, $description?: string): DesignToken =>\n $description === undefined ? { $type, $value } : { $type, $value, $description }\n\nexport const color = make('color')\nexport const dimension = make('dimension')\nexport const fontFamily = make('fontFamily')\nexport const fontWeight = make('fontWeight')\nexport const number = make('number')\nexport const duration = make('duration')\nexport const cubicBezier = make('cubicBezier')\nexport const shadow = make('shadow')\n"],"mappings":";AAwCA,SAAgB,EAAQ,GAAqD;CAC3E,OAAO,OAAQ,EAAqB,UAAW;AACjD;AAMA,IAAM,KACH,OACA,GAAgB,MACf,MAAiB,KAAA,IAAY;CAAE;CAAO;AAAO,IAAI;CAAE;CAAO;CAAQ;AAAa,GAEtE,IAAQ,EAAK,OAAO,GACpB,IAAY,EAAK,WAAW,GAC5B,IAAa,EAAK,YAAY,GAC9B,IAAa,EAAK,YAAY,GAE9B,IAAW,EAAK,UAAU,GAC1B,IAAc,EAAK,aAAa,GAChC,IAAS,EAAK,QAAQ"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/tokens/types.ts"],"sourcesContent":["/**\n * The shape of a design token here: `{ $value, $type, $description? }`, gathered in nested\n * groups that give each one its full name. The DTCG format, which is what keeps these files\n * legible to tools other than ours.\n *\n * A token may ALIAS another by naming it in braces instead of stating a value, which is what\n * lets the accent be \"indigo at step 600\" rather than a colour repeated in twenty places.\n *\n * This is THE source of truth for every visual decision in the library: `tokens.css` is\n * generated from it, and the theming app to come will read and rewrite it directly.\n */\nexport type TokenType =\n | 'color'\n | 'dimension'\n | 'fontFamily'\n | 'fontWeight'\n | 'number'\n | 'duration'\n | 'cubicBezier'\n | 'shadow'\n\nexport interface DesignToken {\n $value: string\n $type: TokenType\n $description?: string\n}\n\nexport interface TokenGroup {\n [key: string]: DesignToken | TokenGroup\n}\n\n/** Tells a token apart from a group of them, which is what walking the tree rests on. */\nexport function isToken(node: DesignToken | TokenGroup): node is DesignToken {\n return typeof (node as DesignToken).$value === 'string'\n}\n\n/**\n * Builds the small helper used to declare a token of one kind, so that the token files\n * below read as `color('#fff')` rather than repeating the shape of the object each time.\n */\nconst make =\n ($type: TokenType) =>\n ($value: string, $description?: string): DesignToken =>\n $description === undefined ? { $type, $value } : { $type, $value, $description }\n\nexport const color = make('color')\nexport const dimension = make('dimension')\nexport const fontFamily = make('fontFamily')\nexport const fontWeight = make('fontWeight')\nexport const number = make('number')\nexport const duration = make('duration')\nexport const cubicBezier = make('cubicBezier')\nexport const shadow = make('shadow')\n"],"mappings":";AAgCA,SAAgB,EAAQ,GAAqD;CAC3E,OAAO,OAAQ,EAAqB,UAAW;AACjD;AAMA,IAAM,KACH,OACA,GAAgB,MACf,MAAiB,KAAA,IAAY;CAAE;CAAO;AAAO,IAAI;CAAE;CAAO;CAAQ;AAAa,GAEtE,IAAQ,EAAK,OAAO,GACpB,IAAY,EAAK,WAAW,GAC5B,IAAa,EAAK,YAAY,GAC9B,IAAa,EAAK,YAAY,GAE9B,IAAW,EAAK,UAAU,GAC1B,IAAc,EAAK,aAAa,GAChC,IAAS,EAAK,QAAQ"}
package/dist/tokens.json CHANGED
@@ -985,6 +985,11 @@
985
985
  "pill": {
986
986
  "$type": "dimension",
987
987
  "$value": "{radius.full}"
988
+ },
989
+ "chip": {
990
+ "$type": "dimension",
991
+ "$value": "{radius.interactive}",
992
+ "$description": "Chips (shape=\"chip\"), follows interactive by default"
988
993
  }
989
994
  },
990
995
  "duration": {
@@ -1069,6 +1074,11 @@
1069
1074
  "$value": "1.25rem",
1070
1075
  "$description": "The height of VSwitch's track"
1071
1076
  },
1077
+ "size-switch-pad": {
1078
+ "$type": "dimension",
1079
+ "$value": "0.125rem",
1080
+ "$description": "The gap between VSwitch's thumb and the edge of its track"
1081
+ },
1072
1082
  "action-size-sm": {
1073
1083
  "$type": "dimension",
1074
1084
  "$value": "1.25rem",
@@ -1164,6 +1174,11 @@
1164
1174
  "$value": "22rem",
1165
1175
  "$description": "The default width of a toast"
1166
1176
  },
1177
+ "size-dialog-width": {
1178
+ "$type": "dimension",
1179
+ "$value": "25rem",
1180
+ "$description": "The default width of VDialog and VDialogAlert (400px), when no `width` is given"
1181
+ },
1167
1182
  "size-snackbar-min": {
1168
1183
  "$type": "dimension",
1169
1184
  "$value": "18rem",
@@ -1184,6 +1199,11 @@
1184
1199
  "$value": "0.625rem",
1185
1200
  "$description": "The diameter of VBadge in dot mode"
1186
1201
  },
1202
+ "size-badge-ring": {
1203
+ "$type": "dimension",
1204
+ "$value": "2px",
1205
+ "$description": "The detaching ring of a bordered VBadge"
1206
+ },
1187
1207
  "size-avatar-ring": {
1188
1208
  "$type": "dimension",
1189
1209
  "$value": "2px",
@@ -1194,6 +1214,11 @@
1194
1214
  "$value": "2.5rem",
1195
1215
  "$description": "The side (height/width) of a VDatePicker day cell"
1196
1216
  },
1217
+ "size-date-picker-day": {
1218
+ "$type": "dimension",
1219
+ "$value": "{control.height.md}",
1220
+ "$description": "The diameter of the disc a VDatePicker day is drawn on; the cell grows to hold it"
1221
+ },
1197
1222
  "size-date-picker-dot": {
1198
1223
  "$type": "dimension",
1199
1224
  "$value": "0.25rem",
@@ -1239,11 +1264,6 @@
1239
1264
  "$value": "1rem",
1240
1265
  "$description": "The dot of VTimePicker's hand on a minute off the 5-minute markers"
1241
1266
  },
1242
- "size-time-input-list-max-block": {
1243
- "$type": "dimension",
1244
- "$value": "18rem",
1245
- "$description": "The maximum height of VTimeInput's list panel (the scrolling area)"
1246
- },
1247
1267
  "size-file-picker-min-block": {
1248
1268
  "$type": "dimension",
1249
1269
  "$value": "10rem",
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The types the design system's components pass BETWEEN them and that belong to none of them.
3
+ *
4
+ * A type is normally named after whatever owns it — `ButtonTone` for VButton,
5
+ * `DatePickerRange` for the component that defines its shape, `FileRejection` for the module
6
+ * that produces it. This file is for the case where nothing does: an item's value is shared
7
+ * by a tab, a toggle item, a radio button and a combobox option, and naming it after any one of the three
8
+ * would say something untrue about the other two.
9
+ *
10
+ * It stays small on purpose. A type reaching for it should first be asked whether a component
11
+ * or a module really does own it.
12
+ */
13
+ /**
14
+ * What identifies one item among several: a tab, a toggle item, an option in a list.
15
+ *
16
+ * A number is admitted because that is what a row from a database is keyed by, and a
17
+ * consumer whose options come from an API should not have to convert on the way in and back
18
+ * on the way out. Where the value reaches the DOM the component converts it itself.
19
+ *
20
+ * VRadio takes it too, and needs no conversion for it: the `value` ATTRIBUTE of a native radio
21
+ * is text, but Vue's radio v-model reads back the value exactly as it was bound rather than
22
+ * the attribute, so a number put in is the number handed back.
23
+ */
24
+ export type ItemValue = string | number;
@@ -1,10 +1,7 @@
1
1
  /**
2
- * Adds a value to a selection or takes it out again, depending on whether it is already
3
- * there.
2
+ * Adds a value to a selection, or takes it out again if it is already there.
4
3
  *
5
- * It ALWAYS hands back a new list rather than changing the one it was given. Every
6
- * multiple-choice value in the design system works this way: it is the arrival of a new
7
- * list, not a change made inside the old one, that tells the surrounding application
8
- * something has happened.
4
+ * ALWAYS returns a new list rather than mutating the one it was given: it is the new
5
+ * reference, not a change made inside the old list, that wakes a consumer's v-model.
9
6
  */
10
7
  export declare function toggleValue<T>(list: readonly T[], value: T): T[];
@@ -1 +1 @@
1
- {"version":3,"file":"array.js","names":[],"sources":["../../src/utils/array.ts"],"sourcesContent":["// @core\n/**\n * Adds a value to a selection or takes it out again, depending on whether it is already\n * there.\n *\n * It ALWAYS hands back a new list rather than changing the one it was given. Every\n * multiple-choice value in the design system works this way: it is the arrival of a new\n * list, not a change made inside the old one, that tells the surrounding application\n * something has happened.\n */\nexport function toggleValue<T>(list: readonly T[], value: T): T[] {\n return list.includes(value) ? list.filter((v) => v !== value) : [...list, value]\n}\n"],"mappings":";AAUA,SAAgB,EAAe,GAAoB,GAAe;CAChE,OAAO,EAAK,SAAS,CAAK,IAAI,EAAK,QAAQ,MAAM,MAAM,CAAK,IAAI,CAAC,GAAG,GAAM,CAAK;AACjF"}
1
+ {"version":3,"file":"array.js","names":[],"sources":["../../src/utils/array.ts"],"sourcesContent":["// @core\n/**\n * Adds a value to a selection, or takes it out again if it is already there.\n *\n * ALWAYS returns a new list rather than mutating the one it was given: it is the new\n * reference, not a change made inside the old list, that wakes a consumer's v-model.\n */\nexport function toggleValue<T>(list: readonly T[], value: T): T[] {\n return list.includes(value) ? list.filter((v) => v !== value) : [...list, value]\n}\n"],"mappings":";AAOA,SAAgB,EAAe,GAAoB,GAAe;CAChE,OAAO,EAAK,SAAS,CAAK,IAAI,EAAK,QAAQ,MAAM,MAAM,CAAK,IAAI,CAAC,GAAG,GAAM,CAAK;AACjF"}
@@ -1,27 +1,27 @@
1
1
  /**
2
- * The elements inside a container that the arrows may land on. The selector is the
3
- * caller's, and it is the one that leaves out anything disabled.
2
+ * The elements the arrows may land on, discovered from the DOM rather than a registry. The
3
+ * selector is the caller's, and it is what excludes anything disabled.
4
4
  *
5
- * Anything hidden is dropped here, and it has to be: the pages hide their neighbours as
6
- * the bar gets narrower, and a consumer may hide a tab or a toggle outright. An element
7
- * nobody can see must not be given the focus.
5
+ * `display: none` is filtered here because it has to be: VPagination hides its neighbours
6
+ * through container queries as the bar narrows, and a consumer may hide a tab outright.
7
+ * Focus must not land on an element nobody can see. The read costs a style recalculation
8
+ * per element, which is why `arrowNavigate` asks for the list only once it knows the key is
9
+ * one it handles.
8
10
  */
9
11
  export declare function navigableItems(container: HTMLElement, selector: string): HTMLElement[];
10
12
  /**
11
- * Handles the four arrows and the Home and End keys over a list of elements, and moves
12
- * the focus.
13
+ * Moves focus for the arrows and Home/End, and reports whether it took the key —
14
+ * `preventDefault` is applied only when it did, leaving the caller free otherwise.
13
15
  *
14
- * It reports whether it took the key. When it did, the browser's own reaction has already
15
- * been suppressed; when it did not, the caller is free to do something else with it.
16
+ * The ends wrap. With nothing in the list focused, any arrow starts at the beginning.
17
+ * Left and Right name a physical side, so RTL swaps them: Right must reach the NEXT item,
18
+ * which is then on the left. The block axis needs no such treatment, no language
19
+ * reversing it.
16
20
  *
17
- * The ends WRAP: past the last element the focus comes back to the first. When nothing in
18
- * the list has the focus yet, any arrow starts at the beginning.
19
- *
20
- * The left and right arrows point at a physical side of the screen, so in a language
21
- * written right to left they are swapped: pressing right must move towards the NEXT item,
22
- * which is then to the left. Up and down need no such treatment, since no language
23
- * reverses them.
21
+ * `items` is a FUNCTION, called only once the key is known to be one of the four. A keydown
22
+ * handler on a container sees every key typed inside it (Tab, Enter, letters), and collecting
23
+ * the list costs a query plus, for most callers, one style read per element.
24
24
  */
25
- export declare function arrowNavigate(event: KeyboardEvent, container: HTMLElement, items: HTMLElement[], options?: {
25
+ export declare function arrowNavigate(event: KeyboardEvent, container: HTMLElement, items: () => HTMLElement[], options?: {
26
26
  vertical?: boolean;
27
27
  }): boolean;
@@ -15,10 +15,12 @@ function n(t, n, r, i = {}) {
15
15
  "ArrowLeft",
16
16
  "Home",
17
17
  "End"
18
- ]).includes(t.key) || r.length === 0) return !1;
18
+ ]).includes(t.key)) return !1;
19
+ let o = r();
20
+ if (o.length === 0) return !1;
19
21
  t.preventDefault();
20
- let o = () => a ? t.key === "ArrowDown" : t.key === "ArrowRight" !== e(n), s = r.indexOf(document.activeElement);
21
- return r[t.key === "Home" ? 0 : t.key === "End" ? r.length - 1 : s === -1 ? 0 : (s + (o() ? 1 : -1) + r.length) % r.length]?.focus(), !0;
22
+ let s = () => a ? t.key === "ArrowDown" : t.key === "ArrowRight" !== e(n), c = o.indexOf(document.activeElement);
23
+ return o[t.key === "Home" ? 0 : t.key === "End" ? o.length - 1 : c === -1 ? 0 : (c + (s() ? 1 : -1) + o.length) % o.length]?.focus(), !0;
22
24
  }
23
25
  //#endregion
24
26
  export { n as arrowNavigate, t as navigableItems };
@@ -1 +1 @@
1
- {"version":3,"file":"arrowNav.js","names":[],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["/**\n * Moving through a row or a column of neighbouring controls with the arrow keys.\n *\n * There is code here because the browser offers nothing that walks the focus from one\n * button to the next: the Tab key steps out of the group entirely, and a group of tabs, a\n * set of pages or a menu is expected to be crossed with the arrows.\n *\n * The rule is the same everywhere in the design system, and it is worth stating plainly:\n * the arrow keys and Home and End MOVE the focus and never act on what they land on.\n * Acting on arrival would navigate somewhere the reader did not ask to go, or turn a\n * value on merely because they passed over it. A component that genuinely wants the\n * arrival to select — a row of tabs can be set up that way — arranges that itself.\n *\n * This is the single place that behaviour is written: the pages, the tabs, the toggle\n * group and the menu all use it.\n */\nimport { isRtl } from './direction'\n\n// @keyboard @a11y\n/**\n * The elements inside a container that the arrows may land on. The selector is the\n * caller's, and it is the one that leaves out anything disabled.\n *\n * Anything hidden is dropped here, and it has to be: the pages hide their neighbours as\n * the bar gets narrower, and a consumer may hide a tab or a toggle outright. An element\n * nobody can see must not be given the focus.\n */\nexport function navigableItems(container: HTMLElement, selector: string): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(selector)].filter(\n (el) => getComputedStyle(el).display !== 'none',\n )\n}\n\n// @keyboard @a11y\n/**\n * Handles the four arrows and the Home and End keys over a list of elements, and moves\n * the focus.\n *\n * It reports whether it took the key. When it did, the browser's own reaction has already\n * been suppressed; when it did not, the caller is free to do something else with it.\n *\n * The ends WRAP: past the last element the focus comes back to the first. When nothing in\n * the list has the focus yet, any arrow starts at the beginning.\n *\n * The left and right arrows point at a physical side of the screen, so in a language\n * written right to left they are swapped: pressing right must move towards the NEXT item,\n * which is then to the left. Up and down need no such treatment, since no language\n * reverses them.\n */\nexport function arrowNavigate(\n event: KeyboardEvent,\n container: HTMLElement,\n items: HTMLElement[],\n options: { vertical?: boolean } = {},\n): boolean {\n const vertical = options.vertical ?? false\n const keys = vertical\n ? ['ArrowDown', 'ArrowUp', 'Home', 'End']\n : ['ArrowRight', 'ArrowLeft', 'Home', 'End']\n if (!keys.includes(event.key)) return false\n if (items.length === 0) return false\n event.preventDefault()\n\n // Only the arrow branch asks which way is forward, and only the horizontal axis needs\n // the writing direction to answer. Keeping it a function rather than a value is what\n // spares Home and End the style recalculation that reading the direction forces.\n const forward = () =>\n vertical ? event.key === 'ArrowDown' : (event.key === 'ArrowRight') !== isRtl(container)\n const current = items.indexOf(document.activeElement as HTMLElement)\n const next =\n event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? items.length - 1\n : current === -1\n ? 0\n : (current + (forward() ? 1 : -1) + items.length) % items.length\n items[next]?.focus()\n return true\n}\n"],"mappings":";;AA2BA,SAAgB,EAAe,GAAwB,GAAiC;CACtF,OAAO,CAAC,GAAG,EAAU,iBAA8B,CAAQ,CAAC,CAAC,CAAC,QAC3D,MAAO,iBAAiB,CAAE,CAAC,CAAC,YAAY,MAC3C;AACF;AAkBA,SAAgB,EACd,GACA,GACA,GACA,IAAkC,CAAC,GAC1B;CACT,IAAM,IAAW,EAAQ,YAAY;CAKrC,IADI,EAHS,IACT;EAAC;EAAa;EAAW;EAAQ;CAAK,IACtC;EAAC;EAAc;EAAa;EAAQ;CAAK,EAAA,CACnC,SAAS,EAAM,GAAG,KACxB,EAAM,WAAW,GAAG,OAAO;CAC/B,EAAM,eAAe;CAKrB,IAAM,UACJ,IAAW,EAAM,QAAQ,cAAe,EAAM,QAAQ,iBAAkB,EAAM,CAAS,GACnF,IAAU,EAAM,QAAQ,SAAS,aAA4B;CAUnE,OADA,EAPE,EAAM,QAAQ,SACV,IACA,EAAM,QAAQ,QACZ,EAAM,SAAS,IACf,MAAY,KACV,KACC,KAAW,EAAQ,IAAI,IAAI,MAAM,EAAM,UAAU,EAAM,OACvD,EAAE,MAAM,GACZ;AACT"}
1
+ {"version":3,"file":"arrowNav.js","names":[],"sources":["../../src/utils/arrowNav.ts"],"sourcesContent":["// @keyboard @a11y — module-wide: the browser walks focus out of a group with Tab, never\n// from one control to the next, which is what the arrows are expected to do.\n/**\n * Arrow-key navigation over a row or column of controls, in one place: VPagination, VTabs,\n * VToggle, VMenuPanel and VSideNavigation all use it.\n *\n * CONTRACT — the arrows and Home/End MOVE focus and never activate what they land on.\n * Activating on arrival would navigate somewhere the reader did not ask to go, or select a\n * value merely passed over. A component that wants selection on focus (VTabs'\n * `activation: 'automatic'`) arranges it in its own `@focus`.\n */\nimport { isRtl } from './direction'\n\n/**\n * The elements the arrows may land on, discovered from the DOM rather than a registry. The\n * selector is the caller's, and it is what excludes anything disabled.\n *\n * `display: none` is filtered here because it has to be: VPagination hides its neighbours\n * through container queries as the bar narrows, and a consumer may hide a tab outright.\n * Focus must not land on an element nobody can see. The read costs a style recalculation\n * per element, which is why `arrowNavigate` asks for the list only once it knows the key is\n * one it handles.\n */\nexport function navigableItems(container: HTMLElement, selector: string): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(selector)].filter(\n (el) => getComputedStyle(el).display !== 'none',\n )\n}\n\n/**\n * Moves focus for the arrows and Home/End, and reports whether it took the key —\n * `preventDefault` is applied only when it did, leaving the caller free otherwise.\n *\n * The ends wrap. With nothing in the list focused, any arrow starts at the beginning.\n * Left and Right name a physical side, so RTL swaps them: Right must reach the NEXT item,\n * which is then on the left. The block axis needs no such treatment, no language\n * reversing it.\n *\n * `items` is a FUNCTION, called only once the key is known to be one of the four. A keydown\n * handler on a container sees every key typed inside it (Tab, Enter, letters), and collecting\n * the list costs a query plus, for most callers, one style read per element.\n */\nexport function arrowNavigate(\n event: KeyboardEvent,\n container: HTMLElement,\n items: () => HTMLElement[],\n options: { vertical?: boolean } = {},\n): boolean {\n const vertical = options.vertical ?? false\n const keys = vertical\n ? ['ArrowDown', 'ArrowUp', 'Home', 'End']\n : ['ArrowRight', 'ArrowLeft', 'Home', 'End']\n if (!keys.includes(event.key)) return false\n const list = items()\n if (list.length === 0) return false\n event.preventDefault()\n\n // A function, not a value: only the arrow branch asks, so Home and End are spared the\n // style recalculation that reading the direction forces.\n const forward = () =>\n vertical ? event.key === 'ArrowDown' : (event.key === 'ArrowRight') !== isRtl(container)\n const current = list.indexOf(document.activeElement as HTMLElement)\n const next =\n event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? list.length - 1\n : current === -1\n ? 0\n : (current + (forward() ? 1 : -1) + list.length) % list.length\n list[next]?.focus()\n return true\n}\n"],"mappings":";;AAuBA,SAAgB,EAAe,GAAwB,GAAiC;CACtF,OAAO,CAAC,GAAG,EAAU,iBAA8B,CAAQ,CAAC,CAAC,CAAC,QAC3D,MAAO,iBAAiB,CAAE,CAAC,CAAC,YAAY,MAC3C;AACF;AAeA,SAAgB,EACd,GACA,GACA,GACA,IAAkC,CAAC,GAC1B;CACT,IAAM,IAAW,EAAQ,YAAY;CAIrC,IAAI,EAHS,IACT;EAAC;EAAa;EAAW;EAAQ;CAAK,IACtC;EAAC;EAAc;EAAa;EAAQ;CAAK,EAAA,CACnC,SAAS,EAAM,GAAG,GAAG,OAAO;CACtC,IAAM,IAAO,EAAM;CACnB,IAAI,EAAK,WAAW,GAAG,OAAO;CAC9B,EAAM,eAAe;CAIrB,IAAM,UACJ,IAAW,EAAM,QAAQ,cAAe,EAAM,QAAQ,iBAAkB,EAAM,CAAS,GACnF,IAAU,EAAK,QAAQ,SAAS,aAA4B;CAUlE,OADA,EAPE,EAAM,QAAQ,SACV,IACA,EAAM,QAAQ,QACZ,EAAK,SAAS,IACd,MAAY,KACV,KACC,KAAW,EAAQ,IAAI,IAAI,MAAM,EAAK,UAAU,EAAK,OACtD,EAAE,MAAM,GACX;AACT"}
@@ -1,24 +1,20 @@
1
+ import { ChipSize } from '../components/VChip/VChip.js';
1
2
  /**
2
- * How big a chip should be when it sits INSIDE a text field — the selected values in the
3
- * search field, the chosen files in the file field.
3
+ * The scale of a VChip rendered INSIDE a text field: VCombobox's values, VFileInput's files.
4
4
  *
5
- * A chip is always one step smaller than the field holding it, so that a row of them fits
6
- * without pushing the field taller. There are only three field sizes, and the two
7
- * smallest take the smallest chip while the largest takes the next one up. Below the
8
- * smallest step of each pair there is no smaller size left, so the extra reduction is
9
- * asked for as a "compact" chip instead. A medium field already has room to spare, which
10
- * is why its own compact setting does not reach the chips at all.
5
+ * A chip is one step below its field, so a row of them does not push the field taller. Below
6
+ * the lowest step of each pair there is no smaller size left, and `compact` makes up the
7
+ * difference instead — which is why an `sm` field forces it and an `md` one, already having
8
+ * room, does not pass its own through.
11
9
  *
12
- * The HEIGHT is what earns this module its existence. The field has to force the text
13
- * being typed to the same height as the chips beside it, or the natural height of that
14
- * text exceeds them and the field grows the moment it is focused — but the chips' height
15
- * is decided inside the chip, out of the field's reach. Deriving it here, from the very
16
- * same pair of settings that chooses the chip's size, makes the two incapable of drifting
17
- * apart.
10
+ * The HEIGHT is what earns the module its place. The field must force its `<input>` to the
11
+ * chips' height or it grows on focus, and that height is decided inside the VChip subtree,
12
+ * out of the field's reach. Deriving it from the same pair that picks the size makes the two
13
+ * incapable of drifting.
18
14
  */
19
15
  export type ChipFieldSize = 'sm' | 'md' | 'lg';
20
16
  export interface ChipScale {
21
- size: 'xs' | 'sm';
17
+ size: ChipSize;
22
18
  compact: boolean;
23
19
  /** The chips' height, ready to be set on the field so it can match its own text to it. */
24
20
  height: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chip.js","names":[],"sources":["../../src/utils/chip.ts"],"sourcesContent":["// @core\n/**\n * How big a chip should be when it sits INSIDE a text field — the selected values in the\n * search field, the chosen files in the file field.\n *\n * A chip is always one step smaller than the field holding it, so that a row of them fits\n * without pushing the field taller. There are only three field sizes, and the two\n * smallest take the smallest chip while the largest takes the next one up. Below the\n * smallest step of each pair there is no smaller size left, so the extra reduction is\n * asked for as a \"compact\" chip instead. A medium field already has room to spare, which\n * is why its own compact setting does not reach the chips at all.\n *\n * The HEIGHT is what earns this module its existence. The field has to force the text\n * being typed to the same height as the chips beside it, or the natural height of that\n * text exceeds them and the field grows the moment it is focused — but the chips' height\n * is decided inside the chip, out of the field's reach. Deriving it here, from the very\n * same pair of settings that chooses the chip's size, makes the two incapable of drifting\n * apart.\n */\nexport type ChipFieldSize = 'sm' | 'md' | 'lg'\n\nexport interface ChipScale {\n size: 'xs' | 'sm'\n compact: boolean\n /** The chips' height, ready to be set on the field so it can match its own text to it. */\n height: string\n}\n\nexport function chipScaleFor(size: ChipFieldSize, compact: boolean): ChipScale {\n const chipSize = size === 'lg' ? 'sm' : 'xs'\n const chipCompact = size === 'lg' ? compact : size === 'sm'\n const base = `var(--vectis-control-height-${chipSize})`\n return {\n size: chipSize,\n compact: chipCompact,\n height: chipCompact ? `calc(${base} - var(--vectis-space-1))` : base,\n }\n}\n"],"mappings":";AA4BA,SAAgB,EAAa,GAAqB,GAA6B;CAC7E,IAAM,IAAW,MAAS,OAAO,OAAO,MAClC,IAAc,MAAS,OAAO,IAAU,MAAS,MACjD,IAAO,+BAA+B,EAAS;CACrD,OAAO;EACL,MAAM;EACN,SAAS;EACT,QAAQ,IAAc,QAAQ,EAAK,6BAA6B;CAClE;AACF"}
1
+ {"version":3,"file":"chip.js","names":[],"sources":["../../src/utils/chip.ts"],"sourcesContent":["import type { ChipSize } from '../components/VChip/VChip.vue'\n\n// @core\n/**\n * The scale of a VChip rendered INSIDE a text field: VCombobox's values, VFileInput's files.\n *\n * A chip is one step below its field, so a row of them does not push the field taller. Below\n * the lowest step of each pair there is no smaller size left, and `compact` makes up the\n * difference instead — which is why an `sm` field forces it and an `md` one, already having\n * room, does not pass its own through.\n *\n * The HEIGHT is what earns the module its place. The field must force its `<input>` to the\n * chips' height or it grows on focus, and that height is decided inside the VChip subtree,\n * out of the field's reach. Deriving it from the same pair that picks the size makes the two\n * incapable of drifting.\n */\nexport type ChipFieldSize = 'sm' | 'md' | 'lg'\n\nexport interface ChipScale {\n size: ChipSize\n compact: boolean\n /** The chips' height, ready to be set on the field so it can match its own text to it. */\n height: string\n}\n\nexport function chipScaleFor(size: ChipFieldSize, compact: boolean): ChipScale {\n const chipSize = size === 'lg' ? 'sm' : 'xs'\n const chipCompact = size === 'lg' ? compact : size === 'sm'\n const base = `var(--vectis-control-height-${chipSize})`\n return {\n size: chipSize,\n compact: chipCompact,\n height: chipCompact ? `calc(${base} - var(--vectis-space-1))` : base,\n }\n}\n"],"mappings":";AAyBA,SAAgB,EAAa,GAAqB,GAA6B;CAC7E,IAAM,IAAW,MAAS,OAAO,OAAO,MAClC,IAAc,MAAS,OAAO,IAAU,MAAS,MACjD,IAAO,+BAA+B,EAAS;CACrD,OAAO;EACL,MAAM;EACN,SAAS;EACT,QAAQ,IAAc,QAAQ,EAAK,6BAA6B;CAClE;AACF"}
@@ -1,19 +1,30 @@
1
1
  /**
2
- * A dimension that is always expressed in pixels: both the number twelve and the text
3
- * "12" come out as "12px".
2
+ * A dimension always in pixels: `12` and `'12'` both give `12px`.
4
3
  *
5
- * Anything that is not a number at all yields nothing rather than a value CSS cannot
6
- * read. That distinction matters: a nonsensical value would break the geometry outright,
7
- * where nothing at all simply lets the component's own default apply.
4
+ * Anything non-numeric yields `undefined` rather than a custom property CSS cannot read —
5
+ * an invalid value breaks the geometry outright, where nothing at all lets the component's
6
+ * own default apply.
7
+ *
8
+ * TRAP — `Number`, never `parseFloat`: the latter reads a numeric PREFIX, so `'12rem'`
9
+ * would come out as `12px`, a wrong size with nothing to say so. `Number('')` being 0, a
10
+ * blank string is refused before it gets there.
8
11
  */
9
12
  export declare function px(v: number | string | undefined): string | undefined;
10
13
  /**
11
- * A dimension in whatever unit the caller likes: a bare number is read as pixels, and any
12
- * text goes through untouched — a percentage, a fraction of the window, "as wide as the
13
- * content".
14
+ * A dimension in any unit: a bare number is read as pixels, a string passes through
15
+ * untouched — `50%`, `20vw`, `max-content`.
14
16
  *
15
- * The text is deliberately not examined, unlike the pixels-only version above. CSS is
16
- * left to judge it, and a value it cannot make sense of falls back to what the component
17
- * declares for itself.
17
+ * Unlike `px` above, the string is deliberately not examined: CSS judges it, and one it
18
+ * cannot parse falls back to whatever the component declares for itself.
18
19
  */
19
20
  export declare function cssSize(v: number | string | undefined): string | undefined;
21
+ /**
22
+ * The inline style carrying a consumer's own colour to a component's sheet, which derives
23
+ * every shade from `--custom-color`: VChip, VAvatar and VBadge.
24
+ *
25
+ * `undefined` when no colour was given, so a style array holding it binds nothing and the
26
+ * tone the sheet already paints stays in force.
27
+ */
28
+ export declare function customColorStyle(color: string | undefined): {
29
+ '--custom-color': string;
30
+ } | undefined;
package/dist/utils/css.js CHANGED
@@ -1,13 +1,16 @@
1
1
  //#region src/utils/css.ts
2
2
  function e(e) {
3
3
  if (e === void 0) return;
4
- let t = typeof e == "number" ? e : Number.parseFloat(e);
4
+ let t = typeof e == "number" ? e : e.trim() === "" ? NaN : Number(e);
5
5
  return Number.isFinite(t) ? `${t}px` : void 0;
6
6
  }
7
7
  function t(e) {
8
8
  if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
9
9
  }
10
+ function n(e) {
11
+ return e === void 0 ? void 0 : { "--custom-color": e };
12
+ }
10
13
  //#endregion
11
- export { t as cssSize, e as px };
14
+ export { t as cssSize, n as customColorStyle, e as px };
12
15
 
13
16
  //# sourceMappingURL=css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"css.js","names":[],"sources":["../../src/utils/css.ts"],"sourcesContent":["// @core\n/**\n * A dimension that is always expressed in pixels: both the number twelve and the text\n * \"12\" come out as \"12px\".\n *\n * Anything that is not a number at all yields nothing rather than a value CSS cannot\n * read. That distinction matters: a nonsensical value would break the geometry outright,\n * where nothing at all simply lets the component's own default apply.\n */\nexport function px(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n const n = typeof v === 'number' ? v : Number.parseFloat(v)\n return Number.isFinite(n) ? `${n}px` : undefined\n}\n\n// @core\n/**\n * A dimension in whatever unit the caller likes: a bare number is read as pixels, and any\n * text goes through untouched — a percentage, a fraction of the window, \"as wide as the\n * content\".\n *\n * The text is deliberately not examined, unlike the pixels-only version above. CSS is\n * left to judge it, and a value it cannot make sense of falls back to what the component\n * declares for itself.\n */\nexport function cssSize(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n return typeof v === 'number' ? `${v}px` : v\n}\n"],"mappings":";AASA,SAAgB,EAAG,GAAoD;CACrE,IAAI,MAAM,KAAA,GAAW;CACrB,IAAM,IAAI,OAAO,KAAM,WAAW,IAAI,OAAO,WAAW,CAAC;CACzD,OAAO,OAAO,SAAS,CAAC,IAAI,GAAG,EAAE,MAAM,KAAA;AACzC;AAYA,SAAgB,EAAQ,GAAoD;CACtE,UAAM,KAAA,GACV,OAAO,OAAO,KAAM,WAAW,GAAG,EAAE,MAAM;AAC5C"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["../../src/utils/css.ts"],"sourcesContent":["// @core\n/**\n * A dimension always in pixels: `12` and `'12'` both give `12px`.\n *\n * Anything non-numeric yields `undefined` rather than a custom property CSS cannot read —\n * an invalid value breaks the geometry outright, where nothing at all lets the component's\n * own default apply.\n *\n * TRAP — `Number`, never `parseFloat`: the latter reads a numeric PREFIX, so `'12rem'`\n * would come out as `12px`, a wrong size with nothing to say so. `Number('')` being 0, a\n * blank string is refused before it gets there.\n */\nexport function px(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n const n = typeof v === 'number' ? v : v.trim() === '' ? Number.NaN : Number(v)\n return Number.isFinite(n) ? `${n}px` : undefined\n}\n\n// @core\n/**\n * A dimension in any unit: a bare number is read as pixels, a string passes through\n * untouched — `50%`, `20vw`, `max-content`.\n *\n * Unlike `px` above, the string is deliberately not examined: CSS judges it, and one it\n * cannot parse falls back to whatever the component declares for itself.\n */\nexport function cssSize(v: number | string | undefined): string | undefined {\n if (v === undefined) return undefined\n return typeof v === 'number' ? `${v}px` : v\n}\n\n// @core\n/**\n * The inline style carrying a consumer's own colour to a component's sheet, which derives\n * every shade from `--custom-color`: VChip, VAvatar and VBadge.\n *\n * `undefined` when no colour was given, so a style array holding it binds nothing and the\n * tone the sheet already paints stays in force.\n */\nexport function customColorStyle(\n color: string | undefined,\n): { '--custom-color': string } | undefined {\n return color === undefined ? undefined : { '--custom-color': color }\n}\n"],"mappings":";AAYA,SAAgB,EAAG,GAAoD;CACrE,IAAI,MAAM,KAAA,GAAW;CACrB,IAAM,IAAI,OAAO,KAAM,WAAW,IAAI,EAAE,KAAK,MAAM,KAAK,MAAa,OAAO,CAAC;CAC7E,OAAO,OAAO,SAAS,CAAC,IAAI,GAAG,EAAE,MAAM,KAAA;AACzC;AAUA,SAAgB,EAAQ,GAAoD;CACtE,UAAM,KAAA,GACV,OAAO,OAAO,KAAM,WAAW,GAAG,EAAE,MAAM;AAC5C;AAUA,SAAgB,EACd,GAC0C;CAC1C,OAAO,MAAU,KAAA,IAAY,KAAA,IAAY,EAAE,kBAAkB,EAAM;AACrE"}