@quidgest/ui 0.31.2 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (507) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/json/api.json +1278 -324
  3. package/dist/manifest/components.json +1 -0
  4. package/dist/ui.css +1183 -428
  5. package/dist/ui.esm.js +1640 -1393
  6. package/dist/ui.min.css +1 -1
  7. package/dist/ui.scss +1354 -386
  8. package/lib/components/QAccordion/QAccordion.d.ts +1 -1
  9. package/lib/components/QAccordion/QAccordion.d.ts.map +1 -1
  10. package/lib/components/QAccordion/QAccordionItem.d.ts.map +1 -1
  11. package/lib/components/QAccordion/QAccordionItem.vue.js +5 -5
  12. package/lib/components/QAccordion/index.d.ts +6 -6
  13. package/lib/components/QAccordion/types.d.ts +2 -2
  14. package/lib/components/QAccordion/types.d.ts.map +1 -1
  15. package/lib/components/QAlert/QAlert.d.ts +1 -1
  16. package/lib/components/QAlert/QAlert.d.ts.map +1 -1
  17. package/lib/components/QAlert/QAlert.vue.js +87 -73
  18. package/lib/components/QAlert/index.d.ts +3 -3
  19. package/lib/components/QAlert/types.d.ts +32 -2
  20. package/lib/components/QAlert/types.d.ts.map +1 -1
  21. package/lib/components/QAvatar/QAvatar.d.ts +1 -1
  22. package/lib/components/QAvatar/index.d.ts +3 -3
  23. package/lib/components/QBadge/QBadge.d.ts +1 -1
  24. package/lib/components/QBadge/QBadge.d.ts.map +1 -1
  25. package/lib/components/QBadge/QBadge.vue.js +72 -55
  26. package/lib/components/QBadge/index.d.ts +3 -3
  27. package/lib/components/QBadge/types.d.ts +13 -2
  28. package/lib/components/QBadge/types.d.ts.map +1 -1
  29. package/lib/components/QBadgeIndicator/QBadgeIndicator.vue.js +2 -3
  30. package/lib/components/QBreadcrumbs/QBreadcrumb.d.ts +6 -6
  31. package/lib/components/QBreadcrumbs/QBreadcrumb.vue.js +3 -3
  32. package/lib/components/QBreadcrumbs/QBreadcrumbs.d.ts +1 -1
  33. package/lib/components/QBreadcrumbs/QBreadcrumbs.d.ts.map +1 -1
  34. package/lib/components/QBreadcrumbs/QBreadcrumbs.vue.js +31 -31
  35. package/lib/components/QBreadcrumbs/context.d.ts +2 -1
  36. package/lib/components/QBreadcrumbs/context.d.ts.map +1 -1
  37. package/lib/components/QBreadcrumbs/index.d.ts +9 -9
  38. package/lib/components/QBreadcrumbs/types.d.ts +2 -2
  39. package/lib/components/QBreadcrumbs/types.d.ts.map +1 -1
  40. package/lib/components/QButton/QButton.d.ts +2 -2
  41. package/lib/components/QButton/QButton.d.ts.map +1 -1
  42. package/lib/components/QButton/QButton.vue.js +53 -49
  43. package/lib/components/QButton/index.d.ts +6 -6
  44. package/lib/components/QButton/types.d.ts +2 -2
  45. package/lib/components/QButton/types.d.ts.map +1 -1
  46. package/lib/components/QCard/QCard.vue.js +9 -20
  47. package/lib/components/QCarousel/QCarousel.d.ts +4 -4
  48. package/lib/components/QCarousel/QCarousel.d.ts.map +1 -1
  49. package/lib/components/QCarousel/QCarousel.vue.js +10 -16
  50. package/lib/components/QCarousel/index.d.ts +14 -14
  51. package/lib/components/QCarousel/types.d.ts +2 -2
  52. package/lib/components/QCarousel/types.d.ts.map +1 -1
  53. package/lib/components/QCheckbox/QCheckbox.d.ts +3 -22
  54. package/lib/components/QCheckbox/QCheckbox.d.ts.map +1 -1
  55. package/lib/components/QCheckbox/QCheckbox.vue.js +98 -100
  56. package/lib/components/QCheckbox/constants.d.ts +9 -0
  57. package/lib/components/QCheckbox/constants.d.ts.map +1 -1
  58. package/lib/components/QCheckbox/constants.js +4 -4
  59. package/lib/components/QCheckbox/index.d.ts +10 -72
  60. package/lib/components/QCheckbox/index.d.ts.map +1 -1
  61. package/lib/components/QCheckbox/types.d.ts +2 -8
  62. package/lib/components/QCheckbox/types.d.ts.map +1 -1
  63. package/lib/components/QCollapsible/QCollapsible.d.ts +1 -1
  64. package/lib/components/QCollapsible/QCollapsible.d.ts.map +1 -1
  65. package/lib/components/QCollapsible/QCollapsible.vue.js +20 -27
  66. package/lib/components/QCollapsible/index.d.ts +6 -6
  67. package/lib/components/QCollapsible/types.d.ts +2 -2
  68. package/lib/components/QCollapsible/types.d.ts.map +1 -1
  69. package/lib/components/QColorPicker/QColorPicker.d.ts +4 -18
  70. package/lib/components/QColorPicker/QColorPicker.d.ts.map +1 -1
  71. package/lib/components/QColorPicker/QColorPicker.vue.js +52 -35
  72. package/lib/components/QColorPicker/constants.d.ts +4 -0
  73. package/lib/components/QColorPicker/constants.d.ts.map +1 -1
  74. package/lib/components/QColorPicker/index.d.ts +13 -57
  75. package/lib/components/QColorPicker/index.d.ts.map +1 -1
  76. package/lib/components/QColorPicker/types.d.ts +2 -2
  77. package/lib/components/QColorPicker/types.d.ts.map +1 -1
  78. package/lib/components/QCombobox/QCombobox.d.ts +355 -299
  79. package/lib/components/QCombobox/QCombobox.d.ts.map +1 -1
  80. package/lib/components/QCombobox/QCombobox.vue.js +236 -190
  81. package/lib/components/QCombobox/constants.d.ts +5 -0
  82. package/lib/components/QCombobox/constants.d.ts.map +1 -1
  83. package/lib/components/QCombobox/constants.js +1 -0
  84. package/lib/components/QCombobox/index.d.ts +265 -424
  85. package/lib/components/QCombobox/index.d.ts.map +1 -1
  86. package/lib/components/QCombobox/types.d.ts +2 -2
  87. package/lib/components/QCombobox/types.d.ts.map +1 -1
  88. package/lib/components/QDateTimePicker/QDateTimePicker.d.ts +106 -229
  89. package/lib/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
  90. package/lib/components/QDateTimePicker/QDateTimePicker.vue.js +894 -765
  91. package/lib/components/QDateTimePicker/constants.d.ts +6 -1
  92. package/lib/components/QDateTimePicker/constants.d.ts.map +1 -1
  93. package/lib/components/QDateTimePicker/constants.js +2 -1
  94. package/lib/components/QDateTimePicker/index.d.ts +73 -229
  95. package/lib/components/QDateTimePicker/index.d.ts.map +1 -1
  96. package/lib/components/QDateTimePicker/types.d.ts +2 -1
  97. package/lib/components/QDateTimePicker/types.d.ts.map +1 -1
  98. package/lib/components/QDefaultsProvider/QDefaultsProvider.vue.js +4 -2
  99. package/lib/components/QDefaultsProvider/types.d.ts +10 -0
  100. package/lib/components/QDefaultsProvider/types.d.ts.map +1 -1
  101. package/lib/components/QDialog/QDialog.d.ts +22 -10
  102. package/lib/components/QDialog/QDialog.d.ts.map +1 -1
  103. package/lib/components/QDialog/QDialog.vue.js +143 -108
  104. package/lib/components/QDialog/QDialogProvider.d.ts.map +1 -1
  105. package/lib/components/QDialog/QDialogProvider.vue.js +8 -3
  106. package/lib/components/QDialog/constants.d.ts +19 -1
  107. package/lib/components/QDialog/constants.d.ts.map +1 -1
  108. package/lib/components/QDialog/constants.js +16 -11
  109. package/lib/components/QDialog/index.d.ts +39 -23
  110. package/lib/components/QDialog/index.d.ts.map +1 -1
  111. package/lib/components/QDialog/types.d.ts +24 -13
  112. package/lib/components/QDialog/types.d.ts.map +1 -1
  113. package/lib/components/QDivider/QDivider.d.ts.map +1 -1
  114. package/lib/components/QDivider/QDivider.vue.js +23 -13
  115. package/lib/components/QDivider/types.d.ts +9 -0
  116. package/lib/components/QDivider/types.d.ts.map +1 -1
  117. package/lib/components/QDrawer/QDrawer.d.ts +71 -0
  118. package/lib/components/QDrawer/QDrawer.d.ts.map +1 -0
  119. package/lib/components/QDrawer/QDrawer.vue.js +461 -0
  120. package/lib/components/QDrawer/QDrawer2.vue.js +5 -0
  121. package/lib/components/QDrawer/constants.d.ts +22 -0
  122. package/lib/components/QDrawer/constants.d.ts.map +1 -0
  123. package/lib/components/QDrawer/constants.js +14 -0
  124. package/lib/components/QDrawer/index.d.ts +214 -0
  125. package/lib/components/QDrawer/index.d.ts.map +1 -0
  126. package/lib/components/QDrawer/index.js +6 -0
  127. package/lib/components/QDrawer/types.d.ts +221 -0
  128. package/lib/components/QDrawer/types.d.ts.map +1 -0
  129. package/lib/components/QDropdownMenu/QDropdownMenu.d.ts +1 -1
  130. package/lib/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
  131. package/lib/components/QDropdownMenu/QDropdownMenu.vue.js +59 -52
  132. package/lib/components/QDropdownMenu/QDropdownMenuContent.d.ts +118 -42
  133. package/lib/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  134. package/lib/components/QDropdownMenu/QDropdownMenuContent.vue.js +235 -195
  135. package/lib/components/QDropdownMenu/ids.d.ts +6 -0
  136. package/lib/components/QDropdownMenu/ids.d.ts.map +1 -1
  137. package/lib/components/QDropdownMenu/ids.js +4 -1
  138. package/lib/components/QDropdownMenu/index.d.ts +6 -6
  139. package/lib/components/QDropdownMenu/types.d.ts +6 -4
  140. package/lib/components/QDropdownMenu/types.d.ts.map +1 -1
  141. package/lib/components/QField/QField.d.ts +18 -17
  142. package/lib/components/QField/QField.d.ts.map +1 -1
  143. package/lib/components/QField/QField.vue.js +65 -50
  144. package/lib/components/QField/constants.d.ts +10 -3
  145. package/lib/components/QField/constants.d.ts.map +1 -1
  146. package/lib/components/QField/constants.js +4 -2
  147. package/lib/components/QField/index.d.ts +12 -11
  148. package/lib/components/QField/index.d.ts.map +1 -1
  149. package/lib/components/QField/types.d.ts +10 -9
  150. package/lib/components/QField/types.d.ts.map +1 -1
  151. package/lib/components/QFileUpload/QFileUpload.d.ts +28 -54
  152. package/lib/components/QFileUpload/QFileUpload.d.ts.map +1 -1
  153. package/lib/components/QFileUpload/QFileUpload.vue.js +43 -39
  154. package/lib/components/QFileUpload/constants.d.ts +4 -0
  155. package/lib/components/QFileUpload/constants.d.ts.map +1 -1
  156. package/lib/components/QFileUpload/index.d.ts +25 -105
  157. package/lib/components/QFileUpload/index.d.ts.map +1 -1
  158. package/lib/components/QFileUpload/types.d.ts +2 -1
  159. package/lib/components/QFileUpload/types.d.ts.map +1 -1
  160. package/lib/components/QFocusWrap/QFocusWrap.d.ts +1 -0
  161. package/lib/components/QFocusWrap/QFocusWrap.d.ts.map +1 -1
  162. package/lib/components/QFocusWrap/QFocusWrap.vue.js +60 -41
  163. package/lib/components/QFocusWrap/index.d.ts +3 -0
  164. package/lib/components/QFocusWrap/index.d.ts.map +1 -1
  165. package/lib/components/QFocusWrap/stack.d.ts +15 -0
  166. package/lib/components/QFocusWrap/stack.d.ts.map +1 -0
  167. package/lib/components/QFocusWrap/stack.js +11 -0
  168. package/lib/components/QFocusWrap/types.d.ts +8 -0
  169. package/lib/components/QFocusWrap/types.d.ts.map +1 -1
  170. package/lib/components/QGauge/QGauge.d.ts.map +1 -1
  171. package/lib/components/QGauge/QGauge.vue.js +153 -124
  172. package/lib/components/QGauge/types.d.ts +16 -1
  173. package/lib/components/QGauge/types.d.ts.map +1 -1
  174. package/lib/components/QGrid/QRow.d.ts +1 -1
  175. package/lib/components/QGrid/index.d.ts +3 -3
  176. package/lib/components/QIcon/QSvgSymbol.d.ts +1 -1
  177. package/lib/components/QIcon/QSvgSymbol.d.ts.map +1 -1
  178. package/lib/components/QIcon/QSvgSymbol.vue.js +31 -31
  179. package/lib/components/QIcon/utils/svgSource.d.ts +2 -2
  180. package/lib/components/QIcon/utils/svgSource.d.ts.map +1 -1
  181. package/lib/components/QInputGroup/QInputGroup.d.ts +35 -31
  182. package/lib/components/QInputGroup/QInputGroup.d.ts.map +1 -1
  183. package/lib/components/QInputGroup/QInputGroup.vue.js +96 -49
  184. package/lib/components/QInputGroup/index.d.ts +14 -12
  185. package/lib/components/QInputGroup/index.d.ts.map +1 -1
  186. package/lib/components/QLabel/QLabel.d.ts.map +1 -1
  187. package/lib/components/QLabel/QLabel.vue.js +2 -2
  188. package/lib/components/QList/QList.d.ts +46 -17
  189. package/lib/components/QList/QList.d.ts.map +1 -1
  190. package/lib/components/QList/QList.vue.js +470 -195
  191. package/lib/components/QList/QListItem.d.ts +1 -1
  192. package/lib/components/QList/QListItem.d.ts.map +1 -1
  193. package/lib/components/QList/QListItem.vue.js +51 -43
  194. package/lib/components/QList/QListItemGroup.vue.js +1 -1
  195. package/lib/components/QList/constants.d.ts +26 -0
  196. package/lib/components/QList/constants.d.ts.map +1 -1
  197. package/lib/components/QList/context.d.ts +12 -1
  198. package/lib/components/QList/context.d.ts.map +1 -1
  199. package/lib/components/QList/context.js +2 -2
  200. package/lib/components/QList/index.d.ts +79 -22
  201. package/lib/components/QList/index.d.ts.map +1 -1
  202. package/lib/components/QList/types.d.ts +11 -9
  203. package/lib/components/QList/types.d.ts.map +1 -1
  204. package/lib/components/QMeter/QMeter.d.ts.map +1 -1
  205. package/lib/components/QMeter/QMeter.vue.js +27 -26
  206. package/lib/components/QMeter/types.d.ts +3 -0
  207. package/lib/components/QMeter/types.d.ts.map +1 -1
  208. package/lib/components/QObfuscation/QObfuscation.d.ts +8 -26
  209. package/lib/components/QObfuscation/QObfuscation.d.ts.map +1 -1
  210. package/lib/components/QObfuscation/QObfuscation.vue.js +137 -113
  211. package/lib/components/QObfuscation/constants.d.ts +4 -0
  212. package/lib/components/QObfuscation/constants.d.ts.map +1 -1
  213. package/lib/components/QObfuscation/index.d.ts +26 -81
  214. package/lib/components/QObfuscation/index.d.ts.map +1 -1
  215. package/lib/components/QObfuscation/types.d.ts +10 -1
  216. package/lib/components/QObfuscation/types.d.ts.map +1 -1
  217. package/lib/components/QOverflow/QOverflow.d.ts +7 -3
  218. package/lib/components/QOverflow/QOverflow.d.ts.map +1 -1
  219. package/lib/components/QOverflow/QOverflow.vue.js +131 -108
  220. package/lib/components/QOverflow/constants.d.ts +4 -1
  221. package/lib/components/QOverflow/constants.d.ts.map +1 -1
  222. package/lib/components/QOverflow/index.d.ts +3 -3
  223. package/lib/components/QOverflow/types.d.ts +7 -4
  224. package/lib/components/QOverflow/types.d.ts.map +1 -1
  225. package/lib/components/QOverlay/QOverlay.d.ts +14 -5
  226. package/lib/components/QOverlay/QOverlay.d.ts.map +1 -1
  227. package/lib/components/QOverlay/QOverlay.vue.js +194 -166
  228. package/lib/components/QOverlay/index.d.ts +105 -13
  229. package/lib/components/QOverlay/index.d.ts.map +1 -1
  230. package/lib/components/QOverlay/layers.d.ts +21 -0
  231. package/lib/components/QOverlay/layers.d.ts.map +1 -0
  232. package/lib/components/QOverlay/layers.js +11 -0
  233. package/lib/components/QOverlay/types.d.ts +0 -6
  234. package/lib/components/QOverlay/types.d.ts.map +1 -1
  235. package/lib/components/QPasswordField/QPasswordField.d.ts +52 -170
  236. package/lib/components/QPasswordField/QPasswordField.d.ts.map +1 -1
  237. package/lib/components/QPasswordField/QPasswordField.vue.js +8 -3
  238. package/lib/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +2 -3
  239. package/lib/components/QPasswordField/constants.d.ts +4 -0
  240. package/lib/components/QPasswordField/constants.d.ts.map +1 -1
  241. package/lib/components/QPasswordField/index.d.ts +29 -170
  242. package/lib/components/QPasswordField/index.d.ts.map +1 -1
  243. package/lib/components/QPasswordField/types.d.ts +2 -1
  244. package/lib/components/QPasswordField/types.d.ts.map +1 -1
  245. package/lib/components/QPhoneField/QPhoneField.d.ts +491 -622
  246. package/lib/components/QPhoneField/QPhoneField.d.ts.map +1 -1
  247. package/lib/components/QPhoneField/QPhoneField.vue.js +21 -14
  248. package/lib/components/QPhoneField/constants.d.ts +4 -0
  249. package/lib/components/QPhoneField/constants.d.ts.map +1 -1
  250. package/lib/components/QPhoneField/index.d.ts +260 -393
  251. package/lib/components/QPhoneField/index.d.ts.map +1 -1
  252. package/lib/components/QPhoneField/types.d.ts +5 -2
  253. package/lib/components/QPhoneField/types.d.ts.map +1 -1
  254. package/lib/components/QPopover/QPopover.d.ts +1 -1
  255. package/lib/components/QPopover/QPopover.d.ts.map +1 -1
  256. package/lib/components/QPopover/QPopover.vue.js +64 -42
  257. package/lib/components/QPopover/index.d.ts +3 -3
  258. package/lib/components/QPopover/types.d.ts +7 -2
  259. package/lib/components/QPopover/types.d.ts.map +1 -1
  260. package/lib/components/QProgress/QProgress.d.ts.map +1 -1
  261. package/lib/components/QProgress/QProgress.vue.js +66 -46
  262. package/lib/components/QProgress/types.d.ts +3 -0
  263. package/lib/components/QProgress/types.d.ts.map +1 -1
  264. package/lib/components/QPropertyList/QPropertyList.d.ts +1 -1
  265. package/lib/components/QPropertyList/QPropertyList.d.ts.map +1 -1
  266. package/lib/components/QPropertyList/QPropertyList.vue.js +3 -3
  267. package/lib/components/QPropertyList/QPropertyListGroup.d.ts +1 -1
  268. package/lib/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -1
  269. package/lib/components/QPropertyList/QPropertyListRow.d.ts +1 -1
  270. package/lib/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
  271. package/lib/components/QPropertyList/QPropertyListRow.vue.js +59 -44
  272. package/lib/components/QPropertyList/index.d.ts +8 -8
  273. package/lib/components/QPropertyList/index.d.ts.map +1 -1
  274. package/lib/components/QPropertyList/types.d.ts +3 -3
  275. package/lib/components/QPropertyList/types.d.ts.map +1 -1
  276. package/lib/components/QRadioGroup/QRadioButton.d.ts.map +1 -1
  277. package/lib/components/QRadioGroup/QRadioButton.vue.js +5 -2
  278. package/lib/components/QRadioGroup/QRadioGroup.d.ts +2 -2
  279. package/lib/components/QRadioGroup/QRadioGroup.d.ts.map +1 -1
  280. package/lib/components/QRadioGroup/QRadioGroup.vue.js +19 -18
  281. package/lib/components/QRadioGroup/index.d.ts +4 -9
  282. package/lib/components/QRadioGroup/index.d.ts.map +1 -1
  283. package/lib/components/QRadioGroup/types.d.ts +0 -6
  284. package/lib/components/QRadioGroup/types.d.ts.map +1 -1
  285. package/lib/components/QSection/QSection.d.ts +3 -3
  286. package/lib/components/QSection/QSection.d.ts.map +1 -1
  287. package/lib/components/QSection/QSection.vue.js +52 -45
  288. package/lib/components/QSection/index.d.ts +4 -4
  289. package/lib/components/QSection/types.d.ts +10 -2
  290. package/lib/components/QSection/types.d.ts.map +1 -1
  291. package/lib/components/QSelect/QSelect.d.ts +312 -114
  292. package/lib/components/QSelect/QSelect.d.ts.map +1 -1
  293. package/lib/components/QSelect/QSelect.vue.js +274 -250
  294. package/lib/components/QSelect/constants.d.ts +4 -0
  295. package/lib/components/QSelect/constants.d.ts.map +1 -1
  296. package/lib/components/QSelect/index.d.ts +176 -144
  297. package/lib/components/QSelect/index.d.ts.map +1 -1
  298. package/lib/components/QSelect/types.d.ts +4 -2
  299. package/lib/components/QSelect/types.d.ts.map +1 -1
  300. package/lib/components/QSidebar/QSidebar.d.ts +9 -9
  301. package/lib/components/QSidebar/QSidebar.d.ts.map +1 -1
  302. package/lib/components/QSidebar/QSidebar.vue.js +2 -2
  303. package/lib/components/QSidebar/QSidebarAnchor.d.ts +1 -1
  304. package/lib/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
  305. package/lib/components/QSidebar/QSidebarAnchor.vue.js +4 -4
  306. package/lib/components/QSidebar/QSidebarItem.d.ts +7 -7
  307. package/lib/components/QSidebar/QSidebarItem.vue.js +3 -3
  308. package/lib/components/QSidebar/QSidebarPanel.d.ts +3 -3
  309. package/lib/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
  310. package/lib/components/QSidebar/QSidebarPanel.vue.js +81 -140
  311. package/lib/components/QSidebar/constants.d.ts.map +1 -1
  312. package/lib/components/QSidebar/constants.js +4 -5
  313. package/lib/components/QSidebar/index.d.ts +24 -24
  314. package/lib/components/QSidebar/types.d.ts +7 -6
  315. package/lib/components/QSidebar/types.d.ts.map +1 -1
  316. package/lib/components/QSteps/QStepHeader.d.ts +2 -1
  317. package/lib/components/QSteps/QStepHeader.d.ts.map +1 -1
  318. package/lib/components/QSteps/QStepHeader.vue.js +3 -4
  319. package/lib/components/QSteps/QSteps.d.ts +8 -8
  320. package/lib/components/QSteps/QSteps.d.ts.map +1 -1
  321. package/lib/components/QSteps/QSteps.vue.js +9 -6
  322. package/lib/components/QSteps/QStepsNav.d.ts +2 -1
  323. package/lib/components/QSteps/QStepsNav.d.ts.map +1 -1
  324. package/lib/components/QSteps/index.d.ts +12 -12
  325. package/lib/components/QSteps/types.d.ts +2 -2
  326. package/lib/components/QSteps/types.d.ts.map +1 -1
  327. package/lib/components/QSwitch/QSwitch.d.ts +39 -26
  328. package/lib/components/QSwitch/QSwitch.d.ts.map +1 -1
  329. package/lib/components/QSwitch/QSwitch.vue.js +64 -58
  330. package/lib/components/QSwitch/constants.d.ts +20 -0
  331. package/lib/components/QSwitch/constants.d.ts.map +1 -0
  332. package/lib/components/QSwitch/constants.js +9 -0
  333. package/lib/components/QSwitch/index.d.ts +56 -18
  334. package/lib/components/QSwitch/index.d.ts.map +1 -1
  335. package/lib/components/QSwitch/types.d.ts +21 -3
  336. package/lib/components/QSwitch/types.d.ts.map +1 -1
  337. package/lib/components/QTabs/QTab.d.ts +12 -12
  338. package/lib/components/QTabs/QTab.vue.js +3 -3
  339. package/lib/components/QTabs/QTabs.d.ts +9 -9
  340. package/lib/components/QTabs/QTabs.d.ts.map +1 -1
  341. package/lib/components/QTabs/QTabs.vue.js +92 -80
  342. package/lib/components/QTabs/index.d.ts +16 -16
  343. package/lib/components/QTabs/types.d.ts +2 -2
  344. package/lib/components/QTabs/types.d.ts.map +1 -1
  345. package/lib/components/QTextArea/QTextArea.d.ts +1 -0
  346. package/lib/components/QTextArea/QTextArea.d.ts.map +1 -1
  347. package/lib/components/QTextArea/QTextArea.vue.js +6 -1
  348. package/lib/components/QTextArea/index.d.ts +1 -0
  349. package/lib/components/QTextArea/index.d.ts.map +1 -1
  350. package/lib/components/QTextField/QTextField.d.ts +30 -42
  351. package/lib/components/QTextField/QTextField.d.ts.map +1 -1
  352. package/lib/components/QTextField/QTextField.vue.js +7 -2
  353. package/lib/components/QTextField/constants.d.ts +4 -0
  354. package/lib/components/QTextField/constants.d.ts.map +1 -1
  355. package/lib/components/QTextField/index.d.ts +26 -69
  356. package/lib/components/QTextField/index.d.ts.map +1 -1
  357. package/lib/components/QTextField/types.d.ts +2 -1
  358. package/lib/components/QTextField/types.d.ts.map +1 -1
  359. package/lib/components/QToast/QToast.d.ts +1 -1
  360. package/lib/components/QToast/QToast.d.ts.map +1 -1
  361. package/lib/components/QToast/QToast.vue.js +148 -134
  362. package/lib/components/QToast/QToaster.d.ts +3 -1
  363. package/lib/components/QToast/QToaster.d.ts.map +1 -1
  364. package/lib/components/QToast/QToaster.vue.js +78 -47
  365. package/lib/components/QToast/index.d.ts +9 -7
  366. package/lib/components/QToast/index.d.ts.map +1 -1
  367. package/lib/components/QToast/types.d.ts +2 -2
  368. package/lib/components/QToast/types.d.ts.map +1 -1
  369. package/lib/components/QToggle/QToggle.d.ts.map +1 -1
  370. package/lib/components/QToggle/QToggle.vue.js +2 -0
  371. package/lib/components/QToggle/index.d.ts +3 -3
  372. package/lib/components/QToggleGroup/QToggleGroupItem.d.ts +8 -1
  373. package/lib/components/QToggleGroup/QToggleGroupItem.d.ts.map +1 -1
  374. package/lib/components/QToggleGroup/QToggleGroupItem.vue.js +67 -16
  375. package/lib/components/QToggleGroup/index.d.ts +24 -3
  376. package/lib/components/QToggleGroup/index.d.ts.map +1 -1
  377. package/lib/components/QTooltip/QTooltip.d.ts +1 -1
  378. package/lib/components/QTooltip/QTooltip.vue.js +1 -1
  379. package/lib/components/QTooltip/index.d.ts +3 -3
  380. package/lib/components/__internal__/QChevron/QChevron.d.ts +1 -1
  381. package/lib/components/__internal__/QChevron/QChevron.d.ts.map +1 -1
  382. package/lib/components/__internal__/QChevron/index.d.ts +3 -3
  383. package/lib/components/__internal__/QChevron/types.d.ts +2 -2
  384. package/lib/components/__internal__/QChevron/types.d.ts.map +1 -1
  385. package/lib/components/__internal__/QClearButton/QClearButton.d.ts +1 -1
  386. package/lib/components/__internal__/QClearButton/QClearButton.d.ts.map +1 -1
  387. package/lib/components/__internal__/QClearButton/index.d.ts +1 -1
  388. package/lib/components/__internal__/QClearButton/types.d.ts +2 -2
  389. package/lib/components/__internal__/QClearButton/types.d.ts.map +1 -1
  390. package/lib/components/__internal__/QHelpPopover/QHelpPopover.d.ts +7 -7
  391. package/lib/components/__internal__/QHelpPopover/QHelpPopover.d.ts.map +1 -1
  392. package/lib/components/__internal__/QHelpPopover/QHelpPopover.vue.js +3 -6
  393. package/lib/components/__internal__/QHelpPopover/index.d.ts +7 -7
  394. package/lib/components/__internal__/QHelpPopover/types.d.ts +2 -2
  395. package/lib/components/__internal__/QHelpPopover/types.d.ts.map +1 -1
  396. package/lib/components/__internal__/QListboxPanel/QListboxPanel.d.ts +34 -0
  397. package/lib/components/__internal__/QListboxPanel/QListboxPanel.d.ts.map +1 -0
  398. package/lib/components/__internal__/QListboxPanel/QListboxPanel.vue.js +76 -0
  399. package/lib/components/__internal__/QListboxPanel/QListboxPanel2.vue.js +5 -0
  400. package/lib/components/__internal__/QListboxPanel/constants.d.ts +17 -0
  401. package/lib/components/__internal__/QListboxPanel/constants.d.ts.map +1 -0
  402. package/lib/components/__internal__/QListboxPanel/constants.js +4 -0
  403. package/lib/components/__internal__/QListboxPanel/index.d.ts +52 -0
  404. package/lib/components/__internal__/QListboxPanel/index.d.ts.map +1 -0
  405. package/lib/components/__internal__/QListboxPanel/index.js +7 -0
  406. package/lib/components/__internal__/QListboxPanel/types.d.ts +50 -0
  407. package/lib/components/__internal__/QListboxPanel/types.d.ts.map +1 -0
  408. package/lib/components/__internal__/QListboxPanel/utils.d.ts +4 -0
  409. package/lib/components/__internal__/QListboxPanel/utils.d.ts.map +1 -0
  410. package/lib/components/__internal__/QListboxPanel/utils.js +6 -0
  411. package/lib/components/__internal__/QRequiredIndicator/QRequiredIndicator.vue.js +1 -1
  412. package/lib/components/__internal__/QResizeHandle/QResizeButtons.d.ts +16 -0
  413. package/lib/components/__internal__/QResizeHandle/QResizeButtons.d.ts.map +1 -0
  414. package/lib/components/__internal__/QResizeHandle/QResizeButtons.vue.js +72 -0
  415. package/lib/components/__internal__/QResizeHandle/QResizeButtons2.vue.js +5 -0
  416. package/lib/components/__internal__/QResizeHandle/QResizeHandle.d.ts +15 -0
  417. package/lib/components/__internal__/QResizeHandle/QResizeHandle.d.ts.map +1 -0
  418. package/lib/components/__internal__/QResizeHandle/QResizeHandle.vue.js +74 -0
  419. package/lib/components/__internal__/QResizeHandle/QResizeHandle2.vue.js +5 -0
  420. package/lib/components/__internal__/QResizeHandle/constants.d.ts +22 -0
  421. package/lib/components/__internal__/QResizeHandle/constants.d.ts.map +1 -0
  422. package/lib/components/__internal__/QResizeHandle/constants.js +10 -0
  423. package/lib/components/__internal__/QResizeHandle/index.d.ts +28 -0
  424. package/lib/components/__internal__/QResizeHandle/index.d.ts.map +1 -0
  425. package/lib/components/__internal__/QResizeHandle/index.js +7 -0
  426. package/lib/components/__internal__/QResizeHandle/types.d.ts +107 -0
  427. package/lib/components/__internal__/QResizeHandle/types.d.ts.map +1 -0
  428. package/lib/components/__internal__/QResizeHandle/useEdgeResize.d.ts +42 -0
  429. package/lib/components/__internal__/QResizeHandle/useEdgeResize.d.ts.map +1 -0
  430. package/lib/components/__internal__/QResizeHandle/useEdgeResize.js +36 -0
  431. package/lib/components/__internal__/QResizeHandle/useResizePane.d.ts +39 -0
  432. package/lib/components/__internal__/QResizeHandle/useResizePane.d.ts.map +1 -0
  433. package/lib/components/__internal__/QResizeHandle/useResizePane.js +22 -0
  434. package/lib/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +2 -2
  435. package/lib/components/__internal__/QSafeTriangle/QSafeTriangle.vue.js +1 -1
  436. package/lib/components/__internal__/QSafeTriangle/index.d.ts +2 -2
  437. package/lib/components/__internal__/QSeverityContent/QSeverityContent.d.ts +24 -0
  438. package/lib/components/__internal__/QSeverityContent/QSeverityContent.d.ts.map +1 -0
  439. package/lib/components/__internal__/QSeverityContent/QSeverityContent.vue.js +58 -0
  440. package/lib/components/__internal__/QSeverityContent/QSeverityContent2.vue.js +5 -0
  441. package/lib/components/__internal__/QSeverityContent/index.d.ts +31 -0
  442. package/lib/components/__internal__/QSeverityContent/index.d.ts.map +1 -0
  443. package/lib/components/__internal__/QSeverityContent/index.js +6 -0
  444. package/lib/components/__internal__/QSeverityContent/types.d.ts +67 -0
  445. package/lib/components/__internal__/QSeverityContent/types.d.ts.map +1 -0
  446. package/lib/components/index.d.ts +1 -0
  447. package/lib/components/index.d.ts.map +1 -1
  448. package/lib/components/index.js +72 -70
  449. package/lib/composables/defaults.d.ts +25 -1
  450. package/lib/composables/defaults.d.ts.map +1 -1
  451. package/lib/composables/defaults.js +15 -7
  452. package/lib/composables/useColor/index.d.ts +9 -3
  453. package/lib/composables/useColor/index.d.ts.map +1 -1
  454. package/lib/composables/useColor/index.js +50 -42
  455. package/lib/composables/useColor/types.d.ts +17 -4
  456. package/lib/composables/useColor/types.d.ts.map +1 -1
  457. package/lib/composables/useDialog/_internal.js +1 -1
  458. package/lib/composables/useDialog/types.d.ts +6 -2
  459. package/lib/composables/useDialog/types.d.ts.map +1 -1
  460. package/lib/composables/useScrollTabStop/index.d.ts +17 -0
  461. package/lib/composables/useScrollTabStop/index.d.ts.map +1 -0
  462. package/lib/composables/useScrollTabStop/index.js +45 -0
  463. package/lib/composables/useVirtualList/index.d.ts +73 -0
  464. package/lib/composables/useVirtualList/index.d.ts.map +1 -0
  465. package/lib/composables/useVirtualList/index.js +83 -0
  466. package/lib/index.d.ts +2 -1
  467. package/lib/index.d.ts.map +1 -1
  468. package/lib/types/component.d.ts +12 -5
  469. package/lib/types/component.d.ts.map +1 -1
  470. package/lib/types/index.d.ts +1 -1
  471. package/lib/types/index.d.ts.map +1 -1
  472. package/lib/utils/bidi.d.ts +27 -0
  473. package/lib/utils/bidi.d.ts.map +1 -0
  474. package/lib/utils/bidi.js +15 -0
  475. package/lib/utils/boundedValue.d.ts +20 -0
  476. package/lib/utils/boundedValue.d.ts.map +1 -0
  477. package/lib/utils/boundedValue.js +9 -0
  478. package/lib/utils/color/blend.d.ts +13 -0
  479. package/lib/utils/color/blend.d.ts.map +1 -1
  480. package/lib/utils/color/blend.js +6 -3
  481. package/lib/utils/color/contrast.d.ts +19 -0
  482. package/lib/utils/color/contrast.d.ts.map +1 -1
  483. package/lib/utils/color/contrast.js +26 -11
  484. package/lib/utils/color/index.d.ts +1 -1
  485. package/lib/utils/color/index.d.ts.map +1 -1
  486. package/lib/utils/date.d.ts +18 -8
  487. package/lib/utils/date.d.ts.map +1 -1
  488. package/lib/utils/date.js +26 -14
  489. package/lib/utils/index.js +14 -13
  490. package/lib/utils/overlay.d.ts +6 -0
  491. package/lib/utils/overlay.d.ts.map +1 -1
  492. package/lib/utils/overlay.js +10 -10
  493. package/lib/utils/popupLabel.d.ts +15 -0
  494. package/lib/utils/popupLabel.d.ts.map +1 -0
  495. package/lib/utils/popupLabel.js +6 -0
  496. package/lib/utils/railWidth.d.ts +15 -0
  497. package/lib/utils/railWidth.d.ts.map +1 -0
  498. package/lib/utils/railWidth.js +4 -0
  499. package/lib/utils/safeTriangle.d.ts +4 -4
  500. package/lib/utils/safeTriangle.d.ts.map +1 -1
  501. package/lib/utils/slots.d.ts +11 -2
  502. package/lib/utils/slots.d.ts.map +1 -1
  503. package/lib/utils/slots.js +7 -4
  504. package/lib/utils/theme.d.ts +3 -3
  505. package/lib/utils/theme.d.ts.map +1 -1
  506. package/lib/utils/theme.js +31 -31
  507. package/package.json +1 -1
@@ -0,0 +1,73 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ export type QVirtualListOptions = {
3
+ /** How many rows the list has. */
4
+ count: Ref<number>;
5
+ /** Whether the list renders only the rows in view. */
6
+ enabled: Ref<boolean>;
7
+ /** The element that scrolls the rows. */
8
+ scroller: Ref<HTMLElement | null>;
9
+ /** Rows rendered wherever the list is scrolled, such as the focused or highlighted option. */
10
+ keep: Ref<number[]>;
11
+ /** How many rows to render before and after those in view, so a scroll shows no blank. */
12
+ overscan: number;
13
+ /** The height of a row before any is measured, in pixels. */
14
+ estimate: number;
15
+ /** How many rows to render while the scroller has no height yet, such as before it opens. */
16
+ initialRows: number;
17
+ };
18
+ export type QVirtualList = {
19
+ /**
20
+ * The rows to render, in order: those in view, those around them, and the kept ones. Empty
21
+ * while the list is not virtualized, since it renders every row then.
22
+ */
23
+ rows: ComputedRef<number[]>;
24
+ /**
25
+ * The height of the space before a rendered row, in pixels, where the rows that are not
26
+ * rendered would be: the rows since the previous rendered one, or since the start.
27
+ */
28
+ gapBefore: (row: number) => number;
29
+ /** The height of the space after the last rendered row, in pixels. */
30
+ gapAfter: ComputedRef<number>;
31
+ /**
32
+ * Records the height of a row as laid out, in pixels, from the top of the row to the top of
33
+ * the next one. Heights of 0 or less (nothing laid out yet) are left out.
34
+ */
35
+ measure: (row: number, height: number) => void;
36
+ /**
37
+ * Scrolls as little as it takes to bring a row into view, by where the offsets put it, so the
38
+ * row renders there: a row out of view has no element to scroll to. The rows in view follow at
39
+ * once, not on the next frame.
40
+ */
41
+ scrollTo: (row: number) => void;
42
+ };
43
+ /**
44
+ * Finds the row at a distance from the top of the list: the last row that starts at or before it.
45
+ *
46
+ * @param offsets - The top of each row, and the bottom of the last one, in increasing order.
47
+ * @param position - The distance from the top, in pixels.
48
+ * @returns The row, from 0 to `offsets.length - 2`.
49
+ */
50
+ export declare function rowAt(offsets: number[], position: number): number;
51
+ /**
52
+ * The top of each row and the bottom of the last one, from the measured heights, with the
53
+ * average measured height (or the estimate, before any) for rows not measured yet.
54
+ *
55
+ * @param heights - The measured height of each row, `undefined` where not measured.
56
+ * @param estimate - The height of a row before any is measured.
57
+ * @returns `count + 1` offsets, in pixels.
58
+ */
59
+ export declare function rowOffsets(heights: (number | undefined)[], estimate: number): number[];
60
+ /**
61
+ * Renders only the rows of a long list that are in view, and a few around them, with spacers
62
+ * where the others would be, so the scroll range and the scrollbar stay those of the whole list.
63
+ *
64
+ * Rows can differ in height (a description, a group title, the text spacing a user sets), so each
65
+ * rendered row is measured, and rows not measured yet take the average. Kept rows (the focused or
66
+ * highlighted option) are rendered wherever the list is scrolled, so focus and
67
+ * `aria-activedescendant` always have an element to be on.
68
+ *
69
+ * @param options - The list to render.
70
+ * @returns The rows to render, the spacers between them, and how to record a row's height.
71
+ */
72
+ export declare function useVirtualList(options: QVirtualListOptions): QVirtualList;
73
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/compos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;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAqKzE"}
@@ -0,0 +1,83 @@
1
+ import { computed as e, nextTick as t, onBeforeUnmount as n, ref as r, watch as i } from "vue";
2
+ //#region src/composables/useVirtualList/index.ts
3
+ function a(e, t) {
4
+ let n = 0, r = e.length - 2;
5
+ for (; n < r;) {
6
+ let i = Math.ceil((n + r) / 2);
7
+ e[i] <= t ? n = i : r = i - 1;
8
+ }
9
+ return Math.max(0, n);
10
+ }
11
+ function o(e, t) {
12
+ let n = e.filter((e) => e !== void 0), r = n.length ? n.reduce((e, t) => e + t, 0) / n.length : t, i = Array(e.length + 1);
13
+ i[0] = 0;
14
+ for (let t = 0; t < e.length; t++) i[t + 1] = i[t] + (e[t] ?? r);
15
+ return i;
16
+ }
17
+ function s(s) {
18
+ let c = r([]), l = r(0), u = r(0), d = /* @__PURE__ */ new Map(), f = 0;
19
+ i(s.count, (e) => {
20
+ d.clear(), cancelAnimationFrame(f), c.value = Array(e).fill(void 0);
21
+ }, { immediate: !0 });
22
+ let p = e(() => o(c.value, s.estimate)), m = e(() => {
23
+ let e = s.count.value;
24
+ if (!e || !s.enabled.value) return [];
25
+ let t = 0, n = Math.min(e, s.initialRows) - 1;
26
+ u.value > 0 && (t = Math.max(0, a(p.value, l.value) - s.overscan), n = Math.min(e - 1, a(p.value, l.value + u.value) + s.overscan));
27
+ let r = /* @__PURE__ */ new Set();
28
+ for (let e = t; e <= n; e++) r.add(e);
29
+ for (let t of s.keep.value) t >= 0 && t < e && r.add(t);
30
+ return [...r].sort((e, t) => e - t);
31
+ }), h = e(() => {
32
+ let e = /* @__PURE__ */ new Map();
33
+ return m.value.forEach((t, n) => e.set(t, n ? m.value[n - 1] : -1)), e;
34
+ });
35
+ function g(e) {
36
+ let t = h.value.get(e) ?? -1;
37
+ return p.value[e] - p.value[t + 1];
38
+ }
39
+ let _ = e(() => {
40
+ let e = m.value.at(-1);
41
+ return e === void 0 ? 0 : p.value[s.count.value] - p.value[e + 1];
42
+ });
43
+ function v(e, t) {
44
+ t <= 0 || e < 0 || e >= s.count.value || c.value[e] !== t && (d.set(e, t), cancelAnimationFrame(f), f = requestAnimationFrame(y));
45
+ }
46
+ function y() {
47
+ let e = s.scroller.value, n = e?.scrollTop ?? l.value, r = n + (e?.clientHeight ?? u.value), i = p.value, o = s.keep.value.find((e) => i[e + 1] > n && i[e] < r) ?? a(i, n), f = [...c.value];
48
+ for (let [e, t] of d) f[e] = t;
49
+ d.clear(), c.value = f;
50
+ let m = p.value[o] - i[o];
51
+ l.value = n, !(!e || !s.enabled.value || m === 0) && t(() => {
52
+ !s.enabled.value || e.scrollTop !== n || (e.scrollTop = n + m, l.value = e.scrollTop);
53
+ });
54
+ }
55
+ function b(e) {
56
+ let t = s.scroller.value;
57
+ if (!t || !s.enabled.value || e < 0 || e >= s.count.value) return;
58
+ let n = t.clientHeight, r = p.value[e], i = p.value[e + 1];
59
+ r < t.scrollTop ? t.scrollTop = r : i > t.scrollTop + n && (t.scrollTop = i - n), l.value = t.scrollTop, u.value = n;
60
+ }
61
+ let x = 0;
62
+ function S() {
63
+ cancelAnimationFrame(x), x = requestAnimationFrame(() => {
64
+ l.value = s.scroller.value?.scrollTop ?? 0;
65
+ });
66
+ }
67
+ let C;
68
+ return i([s.scroller, s.enabled], ([e, t], n) => {
69
+ n?.[0]?.removeEventListener("scroll", S), C?.disconnect(), !(!e || !t) && (e.addEventListener("scroll", S, { passive: !0 }), C ??= new ResizeObserver(() => {
70
+ u.value = s.scroller.value?.clientHeight ?? 0;
71
+ }), C.observe(e), l.value = e.scrollTop, u.value = e.clientHeight);
72
+ }, { immediate: !0 }), n(() => {
73
+ s.scroller.value?.removeEventListener("scroll", S), C?.disconnect(), cancelAnimationFrame(x), cancelAnimationFrame(f);
74
+ }), {
75
+ rows: m,
76
+ gapBefore: g,
77
+ gapAfter: _,
78
+ measure: v,
79
+ scrollTo: b
80
+ };
81
+ }
82
+ //#endregion
83
+ export { a as rowAt, o as rowOffsets, s as useVirtualList };
package/lib/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import * as utils from './utils';
5
5
  export declare const createFramework: (options?: QFrameworkConfig) => import('vue').Plugin;
6
6
  export { templates, components, utils };
7
7
  export * from './composables';
8
- export type { QBaseComponentProps, QComponentSize, QHelpDisplay, QLive, QOptionOverflow, QSelectionLabelPlacement } from './types';
8
+ export type { QBaseComponentProps, QComponentSize, QHelpDisplay, QIcons, QLive, QOptionOverflow, QSelectionLabelPlacement } from './types';
9
9
  //# sourceMappingURL=index.d.ts.map
10
10
  declare module '@vue/runtime-core' {
11
11
  export interface GlobalComponents {
@@ -31,6 +31,7 @@ declare module '@vue/runtime-core' {
31
31
  QDialogProvider: typeof import('@quidgest/ui/components')['QDialogProvider']
32
32
  QDismissibleLayer: typeof import('@quidgest/ui/components')['QDismissibleLayer']
33
33
  QDivider: typeof import('@quidgest/ui/components')['QDivider']
34
+ QDrawer: typeof import('@quidgest/ui/components')['QDrawer']
34
35
  QDropdownMenu: typeof import('@quidgest/ui/components')['QDropdownMenu']
35
36
  QField: typeof import('@quidgest/ui/components')['QField']
36
37
  QFileUpload: typeof import('@quidgest/ui/components')['QFileUpload']
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAIhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,eAAO,MAAM,eAAe,GAAI,UAAS,gBAAqB,yBAE7D,CAAA;AAED,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,YAAY,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAIhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,eAAO,MAAM,eAAe,GAAI,UAAS,gBAAqB,yBAE7D,CAAA;AAED,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,YAAY,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,MAAM,SAAS,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { QIconProps } from '../components/QIcon';
1
2
  /**
2
3
  * Base type for Quidgest UI components.
3
4
  *
@@ -52,11 +53,17 @@ export type QLive = 'assertive' | 'polite' | 'off';
52
53
  /**
53
54
  * How long option labels overflow in a dropdown relative to the field width.
54
55
  * - `wrap`: menu matches the field; labels wrap onto multiple lines.
55
- * - `truncate`: menu matches the field; labels ellipsize. A cut-off label shows its full text in a native `title` on hover (accessible name unchanged).
56
- * - `fit-content`: menu grows to the longest option, even when wider than the field.
57
- * - `wrap-on-focus`: like `truncate` until the option is focused (or highlighted, while focus stays in a combobox field); that option then wraps like `wrap`.
58
- * - `scroll-on-focus`: like `truncate` until the option is focused or highlighted; that option then scrolls its label to the end and back. The trip stays under five seconds. With reduced motion, that option wraps instead.
56
+ * - `fit-content`: menu grows to the longest option, even when wider than the field, up to the width of the screen, where the labels wrap.
57
+ * - `wrap-on-focus`: menu matches the field; labels ellipsize until the option is focused (or highlighted, while focus stays in a combobox field), and that option then wraps like `wrap`. A cut-off label also shows its full text in a native `title` on hover.
58
+ * - `scroll-on-focus`: like `wrap-on-focus` until the option is focused or highlighted; that option then scrolls its label to the end and back instead of wrapping. The trip stays under five seconds. With reduced motion, that option wraps instead.
59
59
  * Shared by `QSelect` and `QCombobox`.
60
60
  */
61
- export type QOptionOverflow = 'truncate' | 'wrap' | 'fit-content' | 'wrap-on-focus' | 'scroll-on-focus';
61
+ export type QOptionOverflow = 'wrap' | 'fit-content' | 'wrap-on-focus' | 'scroll-on-focus';
62
+ /**
63
+ * The type of a component's `icons` prop: one entry per icon it renders, named by `K`, each taking
64
+ * every `QIcon` prop, such as a `size` or a `color`. Use it as
65
+ * `icons?: QIcons<keyof typeof DEFAULT_ICONS>`: `typeof DEFAULT_ICONS` alone would type each icon
66
+ * as `{ icon: string }`, the type of its default, which takes no other prop.
67
+ */
68
+ export type QIcons<K extends PropertyKey> = Record<K, QIconProps>;
62
69
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/types/component.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;CAC1B,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,KAAK,CAAA;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAA;AAElD;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GACxB,UAAU,GACV,MAAM,GACN,aAAa,GACb,eAAe,GACf,iBAAiB,CAAA"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/types/component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;CAC1B,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEzD;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,KAAK,CAAA;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAA;AAElD;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,aAAa,GAAG,eAAe,GAAG,iBAAiB,CAAA;AAE1F;;;;;GAKG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,WAAW,IAAI,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAA"}
@@ -14,5 +14,5 @@
14
14
  * Add new exports here **only if** the type is meant to be
15
15
  * consumed by applications or other packages.
16
16
  */
17
- export type { QBaseComponentProps, QComponentSize, QHelpDisplay, QLive, QOptionOverflow, QSelectionLabelPlacement } from './component';
17
+ export type { QBaseComponentProps, QComponentSize, QHelpDisplay, QIcons, QLive, QOptionOverflow, QSelectionLabelPlacement } from './component';
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,YAAY,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,MAAM,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,YAAY,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,KAAK,EACL,eAAe,EACf,wBAAwB,EACxB,MAAM,aAAa,CAAA"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Isolates a number left to right, as the `q-number` mixin does: in a right-to-left text, a plain
3
+ * `-10` shows as `10-`.
4
+ *
5
+ * @param text - The number, as text.
6
+ * @returns The number between LRI and PDI.
7
+ */
8
+ export declare function isolateLeftToRight(text: string): string;
9
+ /**
10
+ * Isolates a text in the direction of its first letter, as the `q-own-direction` mixin does:
11
+ * Arabic or Hebrew reads right to left, and a text with no letter, such as `-20%`, left to right.
12
+ *
13
+ * @param text - The text.
14
+ * @returns The text between FSI and PDI.
15
+ */
16
+ export declare function isolateFirstStrong(text: string): string;
17
+ /**
18
+ * The direction of a text from its first strong character, as `unicode-bidi: plaintext` and FSI
19
+ * find it: for SVG text, where WebKit honors neither, but does honor `direction`. Arabic or Hebrew
20
+ * reads right to left, and so does a text that starts with a right-to-left mark (RLM, ALM); a text
21
+ * with no letter or mark, such as `-20%`, reads left to right.
22
+ *
23
+ * @param text - The text.
24
+ * @returns `rtl` when its first letter or mark is right to left, else `ltr`.
25
+ */
26
+ export declare function firstStrongDirection(text: string): 'ltr' | 'rtl';
27
+ //# sourceMappingURL=bidi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../src/utils/bidi.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAGhE"}
@@ -0,0 +1,15 @@
1
+ //#region src/utils/bidi.ts
2
+ var e = String.fromCodePoint(8294), t = String.fromCodePoint(8296), n = String.fromCodePoint(8297);
3
+ function r(t) {
4
+ return `${e}${t}${n}`;
5
+ }
6
+ function i(e) {
7
+ return `${t}${e}${n}`;
8
+ }
9
+ var a = /[\p{L}\u200E\u200F\u061C]/u, o = /[\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Mandaic}\p{Script=Adlam}\p{Script=Hanifi_Rohingya}\u200F\u061C]/u;
10
+ function s(e) {
11
+ let t = a.exec(e)?.[0];
12
+ return t && o.test(t) ? "rtl" : "ltr";
13
+ }
14
+ //#endregion
15
+ export { s as firstStrongDirection, i as isolateFirstStrong, r as isolateLeftToRight };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Clamps a number to an inclusive range.
3
+ *
4
+ * @param value - The number to clamp.
5
+ * @param min - The lower bound.
6
+ * @param max - The upper bound.
7
+ * @returns The value limited to `min` and `max`.
8
+ */
9
+ export declare function clamp(value: number, min: number, max: number): number;
10
+ /**
11
+ * Maps a value to a percentage of a range. Does not clamp the result; callers that need a
12
+ * 0–100 fill clamp afterward. `min` and `max` equal returns 0 so the caller does not divide by zero.
13
+ *
14
+ * @param value - The value inside the range.
15
+ * @param min - The start of the range.
16
+ * @param max - The end of the range.
17
+ * @returns The percentage, not rounded and not clamped.
18
+ */
19
+ export declare function percentOfRange(value: number, min: number, max: number): number;
20
+ //# sourceMappingURL=boundedValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundedValue.d.ts","sourceRoot":"","sources":["../../src/utils/boundedValue.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9E"}
@@ -0,0 +1,9 @@
1
+ //#region src/utils/boundedValue.ts
2
+ function e(e, t, n) {
3
+ return Math.min(Math.max(e, t), n);
4
+ }
5
+ function t(e, t, n) {
6
+ return n === t ? 0 : (e - t) / (n - t) * 100;
7
+ }
8
+ //#endregion
9
+ export { e as clamp, t as percentOfRange };
@@ -4,6 +4,19 @@ import { RGB } from './types';
4
4
  * surface underneath.
5
5
  */
6
6
  export declare const TONAL_SURFACE_ALPHA = 0.12;
7
+ /**
8
+ * Ghost hover fills, such as a hovered ghost `QButton`, blend the hover color 6% over the
9
+ * surface underneath. `useColor` measures `hoverTextColor` on that fill.
10
+ */
11
+ export declare const GHOST_HOVER_ALPHA = 0.06;
12
+ /**
13
+ * An alpha as the browser paints it: stored in 8 bits, so a 12% tint paints at 31/255, a
14
+ * little stronger than 12%. Text measured on the exact alpha can land just under 4.5:1 on the
15
+ * painted one.
16
+ *
17
+ * @param alpha - Opacity (0–1) a style sets.
18
+ */
19
+ export declare function paintedAlpha(alpha: number): number;
7
20
  /**
8
21
  * Blends `color` over `background` at `alpha` (0–1).
9
22
  *
@@ -1 +1 @@
1
- {"version":3,"file":"blend.d.ts","sourceRoot":"","sources":["../../../src/utils/color/blend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAKlC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAEvC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAMzE"}
1
+ {"version":3,"file":"blend.d.ts","sourceRoot":"","sources":["../../../src/utils/color/blend.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAKlC;;;GAGG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAA;AAEvC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAA;AAErC;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAMzE"}
@@ -1,6 +1,9 @@
1
1
  //#region src/utils/color/blend.ts
2
- var e = .12;
3
- function t(e, t, n) {
2
+ var e = .12, t = .06;
3
+ function n(e) {
4
+ return Math.round(e * 255) / 255;
5
+ }
6
+ function r(e, t, n) {
4
7
  return {
5
8
  r: Math.round(e.r * n + t.r * (1 - n)),
6
9
  g: Math.round(e.g * n + t.g * (1 - n)),
@@ -8,4 +11,4 @@ function t(e, t, n) {
8
11
  };
9
12
  }
10
13
  //#endregion
11
- export { e as TONAL_SURFACE_ALPHA, t as blendOver };
14
+ export { t as GHOST_HOVER_ALPHA, e as TONAL_SURFACE_ALPHA, r as blendOver, n as paintedAlpha };
@@ -26,6 +26,25 @@ export declare function getContrastRatio(luminanceA: number, luminanceB: number)
26
26
  * @returns The original color when it already passes, otherwise an adjusted hex color.
27
27
  */
28
28
  export declare function ensureContrast(color: string, background: string, minimumRatio?: number): string;
29
+ /**
30
+ * Darkens or lightens `color` on the same hue, by the smallest amount the search finds, until it
31
+ * clears `minimumRatio` on every background. A color that already passes is returned unchanged.
32
+ *
33
+ * One direction serves them all: the one in which black or white, the farthest the color can go,
34
+ * clears them best. With one background, that is darken on a light one and lighten on a dark one.
35
+ * Picked per background instead, a mid-tone surface such as success (black and white both about
36
+ * 4.6:1) darkened the text for the surface and lightened it for a dark tint over it, and the
37
+ * second pass undid the first.
38
+ *
39
+ * Not in the `utils/color` barrel: `useColor` uses it, and `ensureContrast` is its public form.
40
+ *
41
+ * @param color - Foreground color (hex, rgb, or hsl).
42
+ * @param backgrounds - Parsed RGB of everything the color can sit on.
43
+ * @param minimumRatio - WCAG contrast ratio to reach. Defaults to 4.5:1.
44
+ * @returns The original color when it already passes, otherwise an adjusted hex color: black or
45
+ * white at most.
46
+ */
47
+ export declare function ensureContrastOnAll(color: string, backgrounds: RGB[], minimumRatio?: number): string;
29
48
  /**
30
49
  * Determines a contrasting color (black or white) based on WCAG relative luminance.
31
50
  *
@@ -1 +1 @@
1
- {"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../src/utils/color/contrast.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAkBlC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAMrD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAK/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAAM,GAAG,MAAM,CA8B5F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,MAAM,CAM7D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ3D"}
1
+ {"version":3,"file":"contrast.d.ts","sourceRoot":"","sources":["../../../src/utils/color/contrast.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAkBlC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAMrD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAK/E;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAAM,GAAG,MAAM,CAE5F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,EAAE,YAAY,SAAM,GAAG,MAAM,CA+BjG;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,MAAM,CAM7D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ3D"}
@@ -14,23 +14,38 @@ function o(e, t) {
14
14
  let n = Math.max(e, t), r = Math.min(e, t);
15
15
  return (n + .05) / (r + .05);
16
16
  }
17
- function s(i, s, l = 4.5) {
18
- let u = r(i), d = r(s), f = a(d), p = (e) => o(a(e), f);
19
- if (p(u) >= l) return i;
20
- let m = c(d) === "#000", h = (e) => m ? t(u, e) : n(u, e), g = 0, _ = 100, v = h(100);
21
- for (let e = 0; e < 16; e++) {
22
- let e = (g + _) / 2, t = h(e);
23
- p(t) >= l ? (v = t, _ = e) : g = e;
17
+ var s = 16, c = {
18
+ r: 0,
19
+ g: 0,
20
+ b: 0
21
+ }, l = {
22
+ r: 255,
23
+ g: 255,
24
+ b: 255
25
+ };
26
+ function u(e, t, n = 4.5) {
27
+ return d(e, [r(t)], n);
28
+ }
29
+ function d(i, u, d = 4.5) {
30
+ let f = u.map(a), p = (e) => {
31
+ let t = a(e);
32
+ return Math.min(...f.map((e) => o(t, e)));
33
+ }, m = r(i);
34
+ if (p(m) >= d) return i;
35
+ let h = p(c) > p(l), g = (e) => h ? t(m, e) : n(m, e), _ = 0, v = 100, y = g(100);
36
+ for (let e = 0; e < s; e++) {
37
+ let e = (_ + v) / 2, t = g(e);
38
+ p(t) >= d ? (y = t, v = e) : _ = e;
24
39
  }
25
- return e(v);
40
+ return e(y);
26
41
  }
27
- function c(e) {
42
+ function f(e) {
28
43
  let t = a(e), n = o(t, 0);
29
44
  return o(t, 1) >= n ? "#fff" : "#000";
30
45
  }
31
- function l(t) {
46
+ function p(t) {
32
47
  let n = r(t);
33
48
  return n.r = 255 - n.r, n.g = 255 - n.g, n.b = 255 - n.b, e(n);
34
49
  }
35
50
  //#endregion
36
- export { s as ensureContrast, l as getComplementaryColor, o as getContrastRatio, c as getContrastingColor, a as getRelativeLuminance };
51
+ export { u as ensureContrast, d as ensureContrastOnAll, p as getComplementaryColor, o as getContrastRatio, f as getContrastingColor, a as getRelativeLuminance };
@@ -1,4 +1,4 @@
1
- export * from './contrast';
1
+ export { getRelativeLuminance, getContrastRatio, ensureContrast, getContrastingColor, getComplementaryColor } from './contrast';
2
2
  export * from './conversion';
3
3
  export * from './manipulate';
4
4
  export * from './merge';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/color/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/color/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,MAAM,YAAY,CAAA;AACnB,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
@@ -55,7 +55,7 @@ export declare function parseIsoDate(dateStr: string): Date | null;
55
55
  * @example
56
56
  * completePartialDateInput('11/11/1987 1', 'dd/MM/yyyy HH:mm:ss') => '11/11/1987 10:00:00'
57
57
  */
58
- export declare function completePartialDateInput(dateStr: string, format: string, labels?: DateParserLabels): string | null;
58
+ export declare function completePartialDateInput(dateStr: string, format: string, labels?: QDateParserLabels): string | null;
59
59
  /**
60
60
  * Whether user input includes digits in the time portion of the format.
61
61
  * @param dateStr Raw user input.
@@ -70,7 +70,7 @@ export declare function inputIncludesTimePortion(dateStr: string, format: string
70
70
  * @param options Passed to `parseDate`.
71
71
  * @returns Parsed `Date` instance or `null` when parsing fails.
72
72
  */
73
- export declare function parseDateWithCompletion(dateStr: string, format: string, labels?: DateParserLabels, options?: {
73
+ export declare function parseDateWithCompletion(dateStr: string, format: string, labels?: QDateParserLabels, options?: {
74
74
  ignoreWeekday?: boolean;
75
75
  }): Date | null;
76
76
  /**
@@ -110,7 +110,7 @@ export declare function isBetween(date: Date, startDate: Date, endDate: Date): b
110
110
  /**
111
111
  * Formats a date according to a format string.
112
112
  */
113
- export type DateFormatterLabels = {
113
+ export type QDateFormatterLabels = {
114
114
  /**
115
115
  * Returns month label for zero-based month index.
116
116
  * @param month Zero-based month index (`0` = January).
@@ -129,15 +129,15 @@ export type DateFormatterLabels = {
129
129
  /**
130
130
  * Optional parsing label resolvers used by `parseDate`. English names are always read too.
131
131
  */
132
- export type DateParserLabels = {
132
+ export type QDateParserLabels = {
133
133
  /**
134
- * Returns the localized month name to read, as `DateFormatterLabels` does.
134
+ * Returns the localized month name to read, as `QDateFormatterLabels` does.
135
135
  * @param month Zero-based month index (`0` = January).
136
136
  * @param short Whether the short name (`MMM`) is wanted.
137
137
  */
138
138
  getMonthName?: (month: number, short: boolean) => string;
139
139
  /**
140
- * Returns the localized weekday name to read, as `DateFormatterLabels` does.
140
+ * Returns the localized weekday name to read, as `QDateFormatterLabels` does.
141
141
  * @param weekday Sunday-based weekday index (`0` = Sunday).
142
142
  * @param short Whether the short name (`EEE`) is wanted.
143
143
  */
@@ -161,7 +161,7 @@ export type DateParserLabels = {
161
161
  * @param labels Optional localized text resolvers for month/weekday names.
162
162
  * @returns Formatted date string.
163
163
  */
164
- export declare function formatDate(date: Date, format: string, labels?: DateFormatterLabels): string;
164
+ export declare function formatDate(date: Date, format: string, labels?: QDateFormatterLabels): string;
165
165
  /**
166
166
  * Parses a date string according to a format string.
167
167
  * Supports quoted literals, milliseconds, meridiem, and textual month/weekday tokens. A weekday
@@ -173,7 +173,7 @@ export declare function formatDate(date: Date, format: string, labels?: DateForm
173
173
  * text a user edits: changing the day leaves the old weekday in place until it is written again.
174
174
  * @returns Parsed `Date` instance or `null` when parsing fails.
175
175
  */
176
- export declare function parseDate(dateStr: string, format: string, labels?: DateParserLabels, options?: {
176
+ export declare function parseDate(dateStr: string, format: string, labels?: QDateParserLabels, options?: {
177
177
  ignoreWeekday?: boolean;
178
178
  }): Date | null;
179
179
  /**
@@ -250,4 +250,14 @@ export declare function clampDayByMonthYear(value: string, tokens: string[]): st
250
250
  export declare function clampNumericSegments(value: string, format: string, options?: {
251
251
  padMaxDigits: boolean;
252
252
  }): string;
253
+ /**
254
+ * Pads fully-typed numeric segments to their width for the provided format, such as
255
+ * `5/4/2026 9:05` to `05/04/2026 09:05` in `dd/MM/yyyy HH:mm`. Unlike
256
+ * {@link clampNumericSegments}, it never changes a value: a date or time that does not exist,
257
+ * such as `31/02/2026`, stays as it is, for a parser to reject.
258
+ * @param value Masked user input.
259
+ * @param format Date/time format pattern.
260
+ * @returns Input with its numeric segments padded.
261
+ */
262
+ export declare function padNumericSegments(value: string, format: string): string;
253
263
  //# sourceMappingURL=date.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot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AAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAwE3E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,GACjC,MAAM,CAKR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExE"}
package/lib/utils/date.js CHANGED
@@ -588,12 +588,24 @@ function I(e, t) {
588
588
  return i;
589
589
  }
590
590
  function L(e, t, n) {
591
- let r = t.match(d) ?? [], i = e, a = 0;
592
- for (let e of r) {
591
+ return z(e, t, {
592
+ padMaxDigits: n?.padMaxDigits ?? !1,
593
+ clamp: !0
594
+ });
595
+ }
596
+ function R(e, t) {
597
+ return z(e, t, {
598
+ padMaxDigits: !0,
599
+ clamp: !1
600
+ });
601
+ }
602
+ function z(e, t, n) {
603
+ let { clamp: r } = n, i = t.match(d) ?? [], a = e, s = 0;
604
+ for (let e of i) {
593
605
  if (e.startsWith("'")) {
594
- let t = P(i, a, e);
606
+ let t = P(a, s, e);
595
607
  if (t === null) break;
596
- a = t;
608
+ s = t;
597
609
  continue;
598
610
  }
599
611
  let t = e === "yyyy" ? 4 : e === "yy" ? 2 : e === "SSS" ? 3 : e === "S" ? 1 : [
@@ -611,19 +623,19 @@ function L(e, t, n) {
611
623
  "s"
612
624
  ].includes(e) ? 2 : 0;
613
625
  if (t === 0) {
614
- let t = P(i, a, e);
626
+ let t = P(a, s, e);
615
627
  if (t === null) break;
616
- a = t;
628
+ s = t;
617
629
  continue;
618
630
  }
619
- let r = i.slice(a).match(/^\d+/)?.[0]?.slice(0, t) ?? "";
620
- if (!r) continue;
621
- let s = a + r.length;
622
- if (!(r.length === t || s < i.length && !/\d/.test(i[s]))) continue;
623
- let c = Number.parseInt(r, 10), l = F(e, n?.padMaxDigits ? o(r, t) : r, c);
624
- i = `${i.slice(0, a)}${l}${i.slice(s)}`, a += l.length;
631
+ let i = a.slice(s).match(/^\d+/)?.[0]?.slice(0, t) ?? "";
632
+ if (!i) continue;
633
+ let c = s + i.length;
634
+ if (!(i.length === t || c < a.length && !/\d/.test(a[c]))) continue;
635
+ let l = Number.parseInt(i, 10), u = n.padMaxDigits ? o(i, t) : i, d = r ? F(e, u, l) : u;
636
+ a = `${a.slice(0, s)}${d}${a.slice(c)}`, s += d.length;
625
637
  }
626
- return I(i, r);
638
+ return r ? I(a, i) : a;
627
639
  }
628
640
  //#endregion
629
- export { A as addDays, j as addMonths, P as advancePastFormatLiteral, I as clampDayByMonthYear, L as clampNumericSegments, v as completePartialDateInput, e as convertDatePatternToMask, E as formatDate, r as formatUsesSeconds, n as formatUsesTime, S as getDaysInMonth, k as getEndOfDay, M as getFirstDayOfMonth, C as getFirstDayOfWeek, N as getLastDayOfMonth, O as getStartOfDay, y as inputIncludesTimePortion, T as isBetween, x as isLeapYear, w as isSameDay, a as isTimeOnlyFormat, F as normalizeNumericToken, o as padNumber, D as parseDate, b as parseDateWithCompletion, c as parseIsoDate, i as uses12HourFormat };
641
+ export { A as addDays, j as addMonths, P as advancePastFormatLiteral, I as clampDayByMonthYear, L as clampNumericSegments, v as completePartialDateInput, e as convertDatePatternToMask, E as formatDate, r as formatUsesSeconds, n as formatUsesTime, S as getDaysInMonth, k as getEndOfDay, M as getFirstDayOfMonth, C as getFirstDayOfWeek, N as getLastDayOfMonth, O as getStartOfDay, y as inputIncludesTimePortion, T as isBetween, x as isLeapYear, w as isSameDay, a as isTimeOnlyFormat, F as normalizeNumericToken, o as padNumber, R as padNumericSegments, D as parseDate, b as parseDateWithCompletion, c as parseIsoDate, i as uses12HourFormat };