@witchcraft/ui 0.3.26 → 0.4.0-beta.2

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 (287) hide show
  1. package/README.md +54 -61
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/assets/animations.css +1 -1
  5. package/dist/runtime/assets/locales/en.json +2 -0
  6. package/dist/runtime/build/WitchcraftUiResolver.js +1 -1
  7. package/dist/runtime/components/TestControls/TestControls.vue +3 -3
  8. package/dist/runtime/components/WButton/WButton.d.vue.ts +34 -0
  9. package/dist/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +26 -38
  10. package/dist/runtime/components/WButton/WButton.vue.d.ts +34 -0
  11. package/dist/runtime/components/WCheckbox/WCheckbox.d.vue.ts +33 -0
  12. package/dist/runtime/components/WCheckbox/WCheckbox.vue +109 -0
  13. package/dist/runtime/components/WCheckbox/WCheckbox.vue.d.ts +33 -0
  14. package/dist/runtime/components/WColorInput/WColorInput.d.vue.ts +45 -0
  15. package/dist/runtime/components/WColorInput/WColorInput.vue +85 -0
  16. package/dist/runtime/components/WColorInput/WColorInput.vue.d.ts +45 -0
  17. package/dist/runtime/components/WColorInput/WColorSwatchButton.d.vue.ts +28 -0
  18. package/dist/runtime/components/WColorInput/WColorSwatchButton.vue +86 -0
  19. package/dist/runtime/components/WColorInput/WColorSwatchButton.vue.d.ts +28 -0
  20. package/dist/runtime/components/{LibColorPicker/LibColorPicker.d.vue.ts → WColorPicker/WColorPicker.d.vue.ts} +7 -6
  21. package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +40 -29
  22. package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue.d.ts → WColorPicker/WColorPicker.vue.d.ts} +7 -6
  23. package/dist/runtime/components/WCombobox/WCombobox.d.vue.ts +109 -0
  24. package/dist/runtime/components/WCombobox/WCombobox.vue +402 -0
  25. package/dist/runtime/components/WCombobox/WCombobox.vue.d.ts +109 -0
  26. package/dist/runtime/components/WCombobox/storyPlays.d.ts +18 -0
  27. package/dist/runtime/components/WCombobox/storyPlays.js +68 -0
  28. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.d.vue.ts → WDarkModeSwitcher/WDarkModeSwitcher.d.vue.ts} +8 -13
  29. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +11 -14
  30. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts → WDarkModeSwitcher/WDarkModeSwitcher.vue.d.ts} +8 -13
  31. package/dist/runtime/components/WDatePicker/WDatePicker.d.vue.ts +40 -0
  32. package/dist/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
  33. package/dist/runtime/components/WDatePicker/WDatePicker.vue.d.ts +40 -0
  34. package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +16 -21
  35. package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +16 -21
  36. package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.d.vue.ts → WDatePicker/WTimeZonePicker.d.vue.ts} +1 -11
  37. package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
  38. package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.vue.d.ts → WDatePicker/WTimeZonePicker.vue.d.ts} +1 -11
  39. package/dist/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +9 -12
  40. package/dist/runtime/components/{LibDevOnly/LibDevOnly.d.vue.ts → WDevOnly/WDevOnly.d.vue.ts} +0 -3
  41. package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue.d.ts → WDevOnly/WDevOnly.vue.d.ts} +0 -3
  42. package/dist/runtime/components/WFileInput/WFileInput.d.vue.ts +58 -0
  43. package/dist/runtime/components/{LibFileInput/LibFileInput.vue → WFileInput/WFileInput.vue} +71 -57
  44. package/dist/runtime/components/WFileInput/WFileInput.vue.d.ts +58 -0
  45. package/dist/runtime/components/{Icon/Icon.vue.d.ts → WIcon/WIcon.d.vue.ts} +2 -6
  46. package/dist/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +1 -1
  47. package/dist/runtime/components/{Icon/Icon.d.vue.ts → WIcon/WIcon.vue.d.ts} +2 -6
  48. package/dist/runtime/components/{LibMultiValues/LibMultiValues.d.vue.ts → WMultiValues/WMultiValues.d.vue.ts} +8 -14
  49. package/dist/runtime/components/WMultiValues/WMultiValues.vue +149 -0
  50. package/dist/runtime/components/{LibMultiValues/LibMultiValues.vue.d.ts → WMultiValues/WMultiValues.vue.d.ts} +8 -14
  51. package/dist/runtime/components/WNotifications/WNotification.d.vue.ts +37 -0
  52. package/dist/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +32 -47
  53. package/dist/runtime/components/WNotifications/WNotification.vue.d.ts +37 -0
  54. package/dist/runtime/components/WNotifications/WNotifications.d.vue.ts +11 -0
  55. package/dist/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +35 -17
  56. package/dist/runtime/components/WNotifications/WNotifications.vue.d.ts +11 -0
  57. package/dist/runtime/components/WNumberInput/WNumberInput.d.vue.ts +27 -0
  58. package/dist/runtime/components/WNumberInput/WNumberInput.vue +96 -0
  59. package/dist/runtime/components/WNumberInput/WNumberInput.vue.d.ts +27 -0
  60. package/dist/runtime/components/WPagination/WPagination.d.vue.ts +59 -0
  61. package/dist/runtime/components/WPagination/WPagination.vue +182 -0
  62. package/dist/runtime/components/WPagination/WPagination.vue.d.ts +59 -0
  63. package/dist/runtime/components/WPalette/WPalette.d.vue.ts +11 -0
  64. package/dist/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
  65. package/dist/runtime/components/WPalette/WPalette.vue.d.ts +11 -0
  66. package/dist/runtime/components/WPopover/WPopover.d.vue.ts +43 -0
  67. package/dist/runtime/components/WPopover/WPopover.vue +138 -0
  68. package/dist/runtime/components/WPopover/WPopover.vue.d.ts +43 -0
  69. package/dist/runtime/components/WPopup/WPopup.d.vue.ts +41 -0
  70. package/dist/runtime/components/WPopup/WPopup.vue +74 -0
  71. package/dist/runtime/components/WPopup/WPopup.vue.d.ts +41 -0
  72. package/dist/runtime/components/{LibProgressBar/LibProgressBar.d.vue.ts → WProgressBar/WProgressBar.d.vue.ts} +14 -18
  73. package/dist/runtime/components/WProgressBar/WProgressBar.vue +150 -0
  74. package/dist/runtime/components/{LibProgressBar/LibProgressBar.vue.d.ts → WProgressBar/WProgressBar.vue.d.ts} +14 -18
  75. package/dist/runtime/components/{LibRecorder/LibRecorder.d.vue.ts → WRecorder/WRecorder.d.vue.ts} +14 -29
  76. package/dist/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +37 -36
  77. package/dist/runtime/components/{LibRecorder/LibRecorder.vue.d.ts → WRecorder/WRecorder.vue.d.ts} +14 -29
  78. package/dist/runtime/components/{LibRoot/LibRoot.d.vue.ts → WRoot/WRoot.d.vue.ts} +6 -5
  79. package/dist/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +17 -15
  80. package/dist/runtime/components/{LibRoot/LibRoot.vue.d.ts → WRoot/WRoot.vue.d.ts} +6 -5
  81. package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.d.vue.ts → WSimpleInput/WSimpleInput.d.vue.ts} +9 -16
  82. package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +12 -23
  83. package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.vue.d.ts → WSimpleInput/WSimpleInput.vue.d.ts} +9 -16
  84. package/dist/runtime/components/WTable/WTable.d.vue.ts +102 -0
  85. package/dist/runtime/components/{LibTable/LibTable.vue → WTable/WTable.vue} +13 -14
  86. package/dist/runtime/components/WTable/WTable.vue.d.ts +102 -0
  87. package/dist/runtime/components/WTooltip/WTooltip.d.vue.ts +40 -0
  88. package/dist/runtime/components/WTooltip/WTooltip.vue +111 -0
  89. package/dist/runtime/components/WTooltip/WTooltip.vue.d.ts +40 -0
  90. package/dist/runtime/components/index.d.ts +20 -20
  91. package/dist/runtime/components/index.js +20 -20
  92. package/dist/runtime/composables/index.d.ts +4 -4
  93. package/dist/runtime/composables/index.js +4 -4
  94. package/dist/runtime/composables/useDelayedLoadingIndicator.d.ts +9 -0
  95. package/dist/runtime/composables/useDelayedLoadingIndicator.js +18 -0
  96. package/dist/runtime/composables/useDisplayForReka.d.ts +25 -0
  97. package/dist/runtime/composables/useDisplayForReka.js +16 -0
  98. package/dist/runtime/composables/useFallbackId.d.ts +3 -0
  99. package/dist/runtime/composables/useFallbackId.js +5 -0
  100. package/dist/runtime/composables/useInjectedDarkMode.d.ts +1 -1
  101. package/dist/runtime/composables/usePopupConstrainToStyle.d.ts +8 -0
  102. package/dist/runtime/composables/usePopupConstrainToStyle.js +8 -0
  103. package/dist/runtime/composables/useSetupDarkMode.d.ts +2 -3
  104. package/dist/runtime/composables/useSetupDarkMode.js +90 -4
  105. package/dist/runtime/helpers/NotificationHandler.d.ts +2 -2
  106. package/dist/runtime/injectionKeys.d.ts +1 -5
  107. package/dist/runtime/injectionKeys.js +0 -2
  108. package/dist/runtime/types/index.d.ts +85 -27
  109. package/dist/runtime/types/index.js +1 -0
  110. package/package.json +1 -1
  111. package/src/module.ts +1 -1
  112. package/src/runtime/assets/animations.css +3 -3
  113. package/src/runtime/assets/locales/en.json +2 -0
  114. package/src/runtime/build/WitchcraftUiResolver.ts +1 -1
  115. package/src/runtime/components/TestControls/TestControls.vue +3 -3
  116. package/src/runtime/components/WButton/WButton.stories.ts +112 -0
  117. package/src/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +34 -50
  118. package/src/runtime/components/{LibCheckbox/LibCheckbox.stories.ts → WCheckbox/WCheckbox.stories.ts} +5 -5
  119. package/src/runtime/components/WCheckbox/WCheckbox.vue +123 -0
  120. package/src/runtime/components/{LibColorInput/LibColorInput.stories.ts → WColorInput/WColorInput.stories.ts} +8 -8
  121. package/src/runtime/components/WColorInput/WColorInput.vue +112 -0
  122. package/src/runtime/components/WColorInput/WColorSwatchButton.vue +102 -0
  123. package/src/runtime/components/{LibColorPicker/LibColorPicker.stories.ts → WColorPicker/WColorPicker.stories.ts} +12 -12
  124. package/src/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +43 -32
  125. package/src/runtime/components/WCombobox/WCombobox.stories.ts +209 -0
  126. package/src/runtime/components/WCombobox/WCombobox.vue +446 -0
  127. package/src/runtime/components/WCombobox/storyPlays.ts +92 -0
  128. package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.stories.ts → WDarkModeSwitcher/WDarkModeSwitcher.stories.ts} +6 -6
  129. package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +19 -30
  130. package/src/runtime/components/{LibDatePicker/LibDatePicker.stories.ts → WDatePicker/WDatePicker.stories.ts} +42 -34
  131. package/src/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
  132. package/src/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +16 -22
  133. package/src/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +16 -22
  134. package/src/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
  135. package/src/runtime/components/{LibDebug/LibDebug.stories.ts → WDebug/WDebug.stories.ts} +5 -5
  136. package/src/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +8 -11
  137. package/src/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -4
  138. package/src/runtime/components/{LibFileInput/LibFileInput.stories.ts → WFileInput/WFileInput.stories.ts} +7 -7
  139. package/src/runtime/components/{LibFileInput/LibFileInput.vue → WFileInput/WFileInput.vue} +95 -98
  140. package/src/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +5 -8
  141. package/src/runtime/components/{LibMultiValues/LibMultiValues.stories.ts → WMultiValues/WMultiValues.stories.ts} +9 -9
  142. package/src/runtime/components/WMultiValues/WMultiValues.vue +161 -0
  143. package/src/runtime/components/{LibNotifications/LibNotification.stories.ts → WNotifications/WNotification.stories.ts} +9 -9
  144. package/src/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +43 -66
  145. package/src/runtime/components/WNotifications/WNotifications.stories.ts +139 -0
  146. package/src/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +51 -29
  147. package/src/runtime/components/WNumberInput/WNumberInput.vue +109 -0
  148. package/src/runtime/components/WPagination/WPagination.stories.ts +51 -0
  149. package/src/runtime/components/WPagination/WPagination.vue +207 -0
  150. package/src/runtime/components/{LibPalette/LibPalette.stories.ts → WPalette/WPalette.stories.ts} +6 -6
  151. package/src/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
  152. package/src/runtime/components/WPopover/WPopover.stories.ts +218 -0
  153. package/src/runtime/components/WPopover/WPopover.vue +161 -0
  154. package/src/runtime/components/WPopup/WPopup.stories.ts +60 -0
  155. package/src/runtime/components/WPopup/WPopup.vue +93 -0
  156. package/src/runtime/components/WProgressBar/WProgressBar.stories.ts +119 -0
  157. package/src/runtime/components/WProgressBar/WProgressBar.vue +185 -0
  158. package/src/runtime/components/{LibRecorder/LibRecorder.stories.ts → WRecorder/WRecorder.stories.ts} +9 -6
  159. package/src/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +69 -68
  160. package/src/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +18 -15
  161. package/src/runtime/components/{LibSimpleInput/LibSimpleInput.stories.ts → WSimpleInput/WSimpleInput.stories.ts} +11 -12
  162. package/src/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +27 -44
  163. package/src/runtime/components/{LibTable/LibTable.stories.ts → WTable/WTable.stories.ts} +60 -52
  164. package/src/runtime/components/{LibTable/LibTable.vue → WTable/WTable.vue} +85 -87
  165. package/src/runtime/components/WTooltip/WTooltip.stories.ts +82 -0
  166. package/src/runtime/components/WTooltip/WTooltip.vue +126 -0
  167. package/src/runtime/components/index.ts +20 -20
  168. package/src/runtime/composables/index.ts +4 -4
  169. package/src/runtime/composables/useDelayedLoadingIndicator.ts +30 -0
  170. package/src/runtime/composables/useDisplayForReka.ts +37 -0
  171. package/src/runtime/composables/useFallbackId.ts +6 -0
  172. package/src/runtime/composables/useInjectedDarkMode.ts +1 -2
  173. package/src/runtime/composables/usePopupConstrainToStyle.ts +29 -0
  174. package/src/runtime/composables/useSetupDarkMode.ts +122 -4
  175. package/src/runtime/helpers/NotificationHandler.ts +2 -2
  176. package/src/runtime/injectionKeys.ts +1 -7
  177. package/src/runtime/types/index.ts +105 -32
  178. package/types/components.d.ts +13 -15
  179. package/dist/runtime/components/Aria/Aria.d.vue.ts +0 -6
  180. package/dist/runtime/components/Aria/Aria.vue +0 -16
  181. package/dist/runtime/components/Aria/Aria.vue.d.ts +0 -6
  182. package/dist/runtime/components/LibButton/LibButton.d.vue.ts +0 -37
  183. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +0 -37
  184. package/dist/runtime/components/LibCheckbox/LibCheckbox.d.vue.ts +0 -41
  185. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +0 -103
  186. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +0 -41
  187. package/dist/runtime/components/LibColorInput/LibColorInput.d.vue.ts +0 -64
  188. package/dist/runtime/components/LibColorInput/LibColorInput.vue +0 -162
  189. package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +0 -64
  190. package/dist/runtime/components/LibDatePicker/LibDatePicker.d.vue.ts +0 -191
  191. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +0 -191
  192. package/dist/runtime/components/LibFileInput/LibFileInput.d.vue.ts +0 -46
  193. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +0 -46
  194. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +0 -256
  195. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -387
  196. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +0 -256
  197. package/dist/runtime/components/LibLabel/LibLabel.d.vue.ts +0 -27
  198. package/dist/runtime/components/LibLabel/LibLabel.vue +0 -45
  199. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +0 -27
  200. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +0 -109
  201. package/dist/runtime/components/LibNotifications/LibNotification.d.vue.ts +0 -45
  202. package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +0 -45
  203. package/dist/runtime/components/LibNotifications/LibNotifications.d.vue.ts +0 -15
  204. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +0 -15
  205. package/dist/runtime/components/LibPagination/LibPagination.d.vue.ts +0 -105
  206. package/dist/runtime/components/LibPagination/LibPagination.vue +0 -229
  207. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +0 -105
  208. package/dist/runtime/components/LibPalette/LibPalette.d.vue.ts +0 -15
  209. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +0 -15
  210. package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +0 -52
  211. package/dist/runtime/components/LibPopup/LibPopup.vue +0 -365
  212. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +0 -52
  213. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +0 -169
  214. package/dist/runtime/components/LibSuggestions/LibSuggestions.d.vue.ts +0 -99
  215. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +0 -178
  216. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +0 -99
  217. package/dist/runtime/components/LibTable/LibTable.d.vue.ts +0 -125
  218. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +0 -125
  219. package/dist/runtime/components/Template/NAME.d.vue.ts +0 -18
  220. package/dist/runtime/components/Template/NAME.vue +0 -27
  221. package/dist/runtime/components/Template/NAME.vue.d.ts +0 -18
  222. package/dist/runtime/components/Template/TemplateStory.d.ts +0 -7
  223. package/dist/runtime/components/Template/TemplateStory.js +0 -22
  224. package/dist/runtime/components/shared/props.d.ts +0 -171
  225. package/dist/runtime/components/shared/props.js +0 -2
  226. package/dist/runtime/composables/useAriaLabel.d.ts +0 -6
  227. package/dist/runtime/composables/useAriaLabel.js +0 -15
  228. package/dist/runtime/composables/useDarkMode.d.ts +0 -77
  229. package/dist/runtime/composables/useDarkMode.js +0 -89
  230. package/dist/runtime/composables/useDivideAttrs.d.ts +0 -27
  231. package/dist/runtime/composables/useDivideAttrs.js +0 -27
  232. package/dist/runtime/composables/useSuggestions.d.ts +0 -40
  233. package/dist/runtime/composables/useSuggestions.js +0 -263
  234. package/src/runtime/components/Aria/Aria.vue +0 -26
  235. package/src/runtime/components/LibButton/LibButton.stories.ts +0 -106
  236. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +0 -131
  237. package/src/runtime/components/LibColorInput/LibColorInput.vue +0 -203
  238. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.ts +0 -405
  239. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -419
  240. package/src/runtime/components/LibLabel/LibLabel.stories.ts +0 -33
  241. package/src/runtime/components/LibLabel/LibLabel.vue +0 -65
  242. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +0 -123
  243. package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +0 -131
  244. package/src/runtime/components/LibPagination/LibPagination.stories.ts +0 -49
  245. package/src/runtime/components/LibPagination/LibPagination.vue +0 -274
  246. package/src/runtime/components/LibPopup/LibPopup.stories.ts +0 -153
  247. package/src/runtime/components/LibPopup/LibPopup.vue +0 -396
  248. package/src/runtime/components/LibProgressBar/LibProgressBar.stories.ts +0 -90
  249. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +0 -197
  250. package/src/runtime/components/LibSuggestions/LibSuggestions.stories.ts +0 -134
  251. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +0 -212
  252. package/src/runtime/components/Template/NAME.vue +0 -49
  253. package/src/runtime/components/Template/TemplateStory.ts +0 -37
  254. package/src/runtime/components/shared/props.ts +0 -199
  255. package/src/runtime/composables/useAriaLabel.ts +0 -23
  256. package/src/runtime/composables/useDarkMode.ts +0 -199
  257. package/src/runtime/composables/useDivideAttrs.ts +0 -53
  258. package/src/runtime/composables/useSuggestions.ts +0 -339
  259. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.d.ts +0 -0
  260. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.js +0 -0
  261. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.d.ts +0 -0
  262. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.js +0 -0
  263. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.d.ts +0 -0
  264. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.js +0 -0
  265. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.d.ts +0 -0
  266. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.js +0 -0
  267. /package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.d.vue.ts → WDatePicker/WRangeDatePicker.d.vue.ts} +0 -0
  268. /package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.vue.d.ts → WDatePicker/WRangeDatePicker.vue.d.ts} +0 -0
  269. /package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.d.vue.ts → WDatePicker/WSingleDatePicker.d.vue.ts} +0 -0
  270. /package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue.d.ts → WDatePicker/WSingleDatePicker.vue.d.ts} +0 -0
  271. /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.d.ts +0 -0
  272. /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.js +0 -0
  273. /package/dist/runtime/components/{LibDebug/LibDebug.d.vue.ts → WDebug/WDebug.d.vue.ts} +0 -0
  274. /package/dist/runtime/components/{LibDebug/LibDebug.vue.d.ts → WDebug/WDebug.vue.d.ts} +0 -0
  275. /package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -0
  276. /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.d.vue.ts → WNotifications/WNotificationTestMessageComponent.d.vue.ts} +0 -0
  277. /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue → WNotifications/WNotificationTestMessageComponent.vue} +0 -0
  278. /package/dist/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue.d.ts → WNotifications/WNotificationTestMessageComponent.vue.d.ts} +0 -0
  279. /package/dist/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.d.ts +0 -0
  280. /package/dist/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.js +0 -0
  281. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.ts +0 -0
  282. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.ts +0 -0
  283. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.ts +0 -0
  284. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.ts +0 -0
  285. /package/src/runtime/components/{LibDatePicker → WDatePicker}/helpers.ts +0 -0
  286. /package/src/runtime/components/{LibNotifications/LibNotificationTestMessageComponent.vue → WNotifications/WNotificationTestMessageComponent.vue} +0 -0
  287. /package/src/runtime/components/{LibNotifications → WNotifications}/calculateNotificationProgress.ts +0 -0
@@ -1,22 +1,22 @@
1
1
  /* Manually Generated Index */
2
2
 
3
- export { default as aria } from "./Aria/Aria.vue"
4
- export { default as LibButton } from "./LibButton/LibButton.vue"
5
- export { default as LibCheckbox } from "./LibCheckbox/LibCheckbox.vue"
6
- export { default as LibColorInput } from "./LibColorInput/LibColorInput.vue"
7
- export { default as LibColorPicker } from "./LibColorPicker/LibColorPicker.vue"
8
- export { default as LibDarkModeSwitcher } from "./LibDarkModeSwitcher/LibDarkModeSwitcher.vue"
9
- export { default as LibDatePicker } from "./LibDatePicker/LibDatePicker.vue"
10
- export { default as LibDebug } from "./LibDebug/LibDebug.vue"
11
- export { default as LibFileInput } from "./LibFileInput/LibFileInput.vue"
12
- export { default as LibInputDeprecated } from "./LibInputDeprecated/LibInputDeprecated.vue"
13
- export { default as LibLabel } from "./LibLabel/LibLabel.vue"
14
- export { default as LibNotifications } from "./LibNotifications/LibNotifications.vue"
15
- export { default as LibPagination } from "./LibPagination/LibPagination.vue"
16
- export { default as LibPopup } from "./LibPopup/LibPopup.vue"
17
- export { default as LibProgressBar } from "./LibProgressBar/LibProgressBar.vue"
18
- export { default as LibRecorder } from "./LibRecorder/LibRecorder.vue"
19
- export { default as LibRoot } from "./LibRoot/LibRoot.vue"
20
- export { default as LibSimpleInput } from "./LibSimpleInput/LibSimpleInput.vue"
21
- export { default as LibTable } from "./LibTable/LibTable.vue"
22
- export { default as LibTimeZonePicker } from "./LibDatePicker/LibTimeZonePicker.vue"
3
+ export { default as WButton } from "./WButton/WButton.vue"
4
+ export { default as WCheckbox } from "./WCheckbox/WCheckbox.vue"
5
+ export { default as WColorInput } from "./WColorInput/WColorInput.vue"
6
+ export { default as WColorPicker } from "./WColorPicker/WColorPicker.vue"
7
+ export { default as WCombobox } from "./WCombobox/WCombobox.vue"
8
+ export { default as WDarkModeSwitcher } from "./WDarkModeSwitcher/WDarkModeSwitcher.vue"
9
+ export { default as WDatePicker } from "./WDatePicker/WDatePicker.vue"
10
+ export { default as WDebug } from "./WDebug/WDebug.vue"
11
+ export { default as WFileInput } from "./WFileInput/WFileInput.vue"
12
+ export { default as WNotifications } from "./WNotifications/WNotifications.vue"
13
+ export { default as WPagination } from "./WPagination/WPagination.vue"
14
+ export { default as WPopup } from "./WPopup/WPopup.vue"
15
+ export { default as WPopover } from "./WPopover/WPopover.vue"
16
+ export { default as WProgressBar } from "./WProgressBar/WProgressBar.vue"
17
+ export { default as WRecorder } from "./WRecorder/WRecorder.vue"
18
+ export { default as WRoot } from "./WRoot/WRoot.vue"
19
+ export { default as WSimpleInput } from "./WSimpleInput/WSimpleInput.vue"
20
+ export { default as WTable } from "./WTable/WTable.vue"
21
+ export { default as WTimeZonePicker } from "./WDatePicker/WTimeZonePicker.vue"
22
+ export { default as WTooltip } from "./WTooltip/WTooltip.vue"
@@ -1,19 +1,19 @@
1
1
  /* Autogenerated Index */
2
2
 
3
3
  export { useAccesibilityOutline } from "./useAccesibilityOutline.js"
4
- export { useAriaLabel } from "./useAriaLabel.js"
5
- export { useDarkMode } from "./useDarkMode.js"
6
- export { useDivideAttrs } from "./useDivideAttrs.js"
4
+ export { useDelayedLoadingIndicator } from "./useDelayedLoadingIndicator.js"
7
5
  export { useDragWithThreshold } from "./useDragWithThreshold.js"
6
+ export { useFallbackId } from "./useFallbackId.js"
8
7
  export { useGlobalResizeObserver } from "./useGlobalResizeObserver.js"
9
8
  export { useInjectedDarkMode } from "./useInjectedDarkMode.js"
10
9
  export { useInjectedI18n } from "./useInjectedI18n.js"
11
10
  export { useInjectedLocale } from "./useInjectedLocale.js"
12
11
  export { useNotificationHandler } from "./useNotificationHandler.js"
12
+ export { usePopupConstrainToStyle } from "./usePopupConstrainToStyle.js"
13
13
  export { usePreHydrationValue } from "./usePreHydrationValue.js"
14
14
  export { useScrollNearContainerEdges } from "./useScrollNearContainerEdges.js"
15
15
  export { useSetupDarkMode } from "./useSetupDarkMode.js"
16
16
  export { useSetupLocale } from "./useSetupLocale.js"
17
17
  export { useShowDevOnlyKey } from "./useShowDevOnlyKey.js"
18
18
  export { useSlotVars } from "./useSlotVars.js"
19
- export { useSuggestions } from "./useSuggestions.js"
19
+ export { useTimeConditionally } from "./useTimeConditionally.js"
@@ -0,0 +1,30 @@
1
+ import type { Ref } from "vue"
2
+ import { ref, watch } from "vue"
3
+ /**
4
+ * For async operations sometimes it actually loads so fast the loading indicator is not visible but we still want it to be briefly visible. This delays the setting of the returned ref to false by the given timeout so it at least flashes onscreen.
5
+ *
6
+ * Setting to true is not delayed.
7
+ *
8
+ * If the indicator is set to true while the timeout is still running, it's canceled.
9
+ */
10
+
11
+ export function useDelayedLoadingIndicator(
12
+ loading: Ref<boolean>,
13
+ timeout: number = 200
14
+ ) {
15
+ const showLoadingIndicator = ref(false)
16
+ let loadingTimeout: number | NodeJS.Timeout | undefined
17
+ watch(loading, newVal => {
18
+ clearTimeout(loadingTimeout)
19
+ if (newVal === true) {
20
+ showLoadingIndicator.value = true
21
+ } else {
22
+ loadingTimeout = setTimeout(() => {
23
+ if (loading.value === false) {
24
+ showLoadingIndicator.value = false
25
+ }
26
+ }, timeout)
27
+ }
28
+ })
29
+ return showLoadingIndicator
30
+ }
@@ -0,0 +1,37 @@
1
+ import type { AcceptableValue, ComboboxRootProps } from "reka-ui"
2
+
3
+ export type SuggestionsDisplayProps<T extends NonNullable<AcceptableValue>> = {
4
+ displayKey?: string
5
+ /**
6
+ * Override's reka-ui's displayValue.
7
+ *
8
+ * Prefer displayKey or displayEntry if possible as it's easier to type and requires less code.
9
+ *
10
+ * It's passed a special options object with a `isForEmit` boolean that tells you whether the value will be used for emits or just visually/search. This is useful to v-model an id when suggestions are objects.
11
+ */
12
+ displayValue?: (value: T | T[], options?: { isForEmit?: boolean }) => string
13
+ /**
14
+ * When displayKey is not enough, prefer this over displayValue as it takes care of extracting the entry (from the array/object/value).
15
+ *
16
+ * The component uses this to filter out the suggestions. In some rare cases you might want to display a different label than the one filtered on (e.g. for example, to indicate some suggestion is active), in these cases, the function will be called with the visualOnly option set to true. This applies only to the visual suggestion in the suggestion list.
17
+ */
18
+ displayEntry?: (value: T, options: { isForEmit?: boolean }) => string
19
+ }
20
+
21
+ export function useDisplayForReka<T extends NonNullable<ComboboxRootProps["modelValue"]>>(props: SuggestionsDisplayProps<T>) {
22
+ const display = props.displayValue ?? function (value: T, options: { isForEmit?: boolean } = {}): string {
23
+ if (Array.isArray(value)) {
24
+ return value.map(v => {
25
+ const val = v[props.displayKey as keyof typeof v]
26
+ return props.displayEntry?.(val, options) ?? val
27
+ }).filter(v => v !== "").join(", ")
28
+ } else if (typeof value === "object") {
29
+ return props.displayEntry?.(value as any, options) ?? value[props.displayKey as keyof typeof value] as any
30
+ } else {
31
+ // special case when reka resets
32
+ if (value === "" && !options.isForEmit) return ""
33
+ return props.displayEntry?.(value as any, options) ?? value as any
34
+ }
35
+ }
36
+ return display
37
+ }
@@ -0,0 +1,6 @@
1
+ import { useId } from "vue"
2
+
3
+ export function useFallbackId(props: { id?: string }) {
4
+ const fallbackId = props.id ?? useId()
5
+ return fallbackId
6
+ }
@@ -1,8 +1,7 @@
1
1
  import { inject } from "vue"
2
2
 
3
- import type { DarkModeCommands, DarkModeState } from "./useDarkMode.js"
4
-
5
3
  import { darkModeCommandsInjectionKey, darkModeStateInjectionKey } from "../injectionKeys.js"
4
+ import type { DarkModeCommands, DarkModeState } from "../types/index.js"
6
5
 
7
6
  export function useInjectedDarkMode(): DarkModeState & DarkModeCommands {
8
7
  const darkModeState = inject(darkModeStateInjectionKey)
@@ -0,0 +1,29 @@
1
+ import type { ComputedRef, StyleValue } from "vue"
2
+ import { computed } from "vue"
3
+
4
+ import type { PopupConstrainToProps } from "../types/index.js"
5
+ /**
6
+ * Mostly internal, create the computed style with maxWidth/Height based on the constrain*To props.
7
+ *
8
+ * @internal
9
+ */
10
+ export function usePopupConstrainToStyle(rekaName: string, props: PopupConstrainToProps, attrsStyle?: StyleValue[]): ComputedRef<StyleValue[]> {
11
+ const contentStyle = computed(() => ([{
12
+ maxWidth: props.constrainWidthTo === "trigger"
13
+ ? `var(--reka-${rekaName}-trigger-width)`
14
+ : props.constrainWidthTo === "available"
15
+ ? `var(--reka-${rekaName}-content-available-width)`
16
+ : typeof props.constrainWidthTo === "number"
17
+ ? `${props.constrainWidthTo}px`
18
+ : props.constrainWidthTo ?? undefined,
19
+ maxHeight: props.constrainHeightTo === "trigger"
20
+ ? `var(--reka-${rekaName}-trigger-height)`
21
+ : props.constrainHeightTo === "available"
22
+ ? `var(--reka-${rekaName}-content-available-height)`
23
+ : typeof props.constrainHeightTo === "number"
24
+ ? `${props.constrainHeightTo}px`
25
+ : props.constrainHeightTo ?? undefined
26
+ }, ...(attrsStyle ?? [])] satisfies StyleValue[]))
27
+ return contentStyle
28
+ }
29
+
@@ -1,4 +1,15 @@
1
- import { useDarkMode } from "./useDarkMode.js"
1
+ import type { InjectionKey, Ref } from "vue"
2
+ import { computed, nextTick, onMounted, provide, ref, watch } from "vue"
3
+
4
+ import { darkModeCommandsInjectionKey, darkModeStateInjectionKey } from "../injectionKeys.js"
5
+ import type { DarkModeCommands, DarkModeOptions, DarkModeState } from "../types/index.js"
6
+ import { defaultDarkModeOrder } from "../types/index.js"
7
+
8
+
9
+ const isDarkModeInjectionKey = Symbol("isDarkMode") as InjectionKey<Ref<boolean>>
10
+ const manualDarkModeInjectionKey = Symbol("manualDarkMode") as InjectionKey<Ref<boolean | undefined>>
11
+ const defaultLocalStorageKey = "prefersColorSchemeDark"
12
+
2
13
  /**
3
14
  * A composable for setting up dark mode that automatically takes care of saving the user's preference.
4
15
  *
@@ -7,8 +18,115 @@ import { useDarkMode } from "./useDarkMode.js"
7
18
  * Use it's twin, `useInjectedDarkMode` for accessing the injected state and commands in components
8
19
  *
9
20
  * Note that this should only be called once at the root of the app.
10
- *
11
21
  */
12
- export function useSetupDarkMode(...args: Parameters<typeof useDarkMode>): ReturnType<typeof useDarkMode> {
13
- return useDarkMode(...args)
22
+ export const useSetupDarkMode = ({
23
+ useLocalStorage = true,
24
+ darkModeOrder = defaultDarkModeOrder,
25
+
26
+ isClientSide = true,
27
+ useViewTransition = true
28
+ }: DarkModeOptions = {}): DarkModeState & DarkModeCommands => {
29
+ const systemDarkMode = ref(false)
30
+ const manualDarkMode = ref<boolean | undefined>(undefined)
31
+
32
+ if (useLocalStorage && isClientSide) {
33
+ watch(manualDarkMode, () => {
34
+ localStorage.setItem(defaultLocalStorageKey, manualDarkMode.value ? "true" : "false")
35
+ })
36
+ }
37
+
38
+ const darkMode = computed(() => manualDarkMode.value ?? systemDarkMode.value)
39
+ const darkModeState = computed(() =>
40
+ manualDarkMode.value === undefined
41
+ ? "system"
42
+ : manualDarkMode.value
43
+ ? "dark"
44
+ : "light"
45
+ )
46
+ // todo move to useinjected
47
+ function setDarkMode(value: "dark" | "light" | "system"): void {
48
+ manualDarkMode.value
49
+ = value === "dark"
50
+ ? true
51
+ : value === "light"
52
+ ? false
53
+ : undefined
54
+ }
55
+
56
+ function getNextValue(): "dark" | "light" | "system" {
57
+ const index = darkModeOrder.indexOf(darkModeState.value)
58
+
59
+ return index === 2
60
+ ? darkModeOrder[0]!
61
+ : darkModeOrder[index + 1]!
62
+ }
63
+
64
+ function _cycleDarkMode(): void {
65
+ setDarkMode(getNextValue())
66
+ }
67
+
68
+ function cycleDarkMode(): void {
69
+ if (!useViewTransition) {
70
+ _cycleDarkMode()
71
+ return
72
+ }
73
+ const nextValue = getNextValue()
74
+ const index = darkModeOrder.indexOf(darkModeState.value)
75
+ const systemDarkModeName = systemDarkMode.value ? "dark" : "light"
76
+
77
+ if (nextValue === "system" && systemDarkModeName === darkModeOrder[index]) {
78
+ // don't do view transitions if we're not really transitioning
79
+ _cycleDarkMode()
80
+ return
81
+ }
82
+ if (!document.startViewTransition) _cycleDarkMode()
83
+ document.startViewTransition(async () => {
84
+ _cycleDarkMode()
85
+ await nextTick()
86
+ })
87
+ }
88
+
89
+ onMounted(() => {
90
+ window.matchMedia("(prefers-color-scheme: dark)")
91
+ .addEventListener("change", ({ matches }) => {
92
+ if (matches) {
93
+ systemDarkMode.value = true
94
+ } else {
95
+ systemDarkMode.value = false
96
+ }
97
+ })
98
+ if (useLocalStorage !== false) {
99
+ const key = typeof useLocalStorage === "string" ? useLocalStorage : defaultLocalStorageKey
100
+ const value = localStorage.getItem(key)
101
+
102
+ if (value === "true") {
103
+ manualDarkMode.value = true
104
+ } else if (value === "false") {
105
+ manualDarkMode.value = false
106
+ }
107
+ }
108
+ })
109
+ provide(isDarkModeInjectionKey, darkMode)
110
+ provide(manualDarkModeInjectionKey, manualDarkMode)
111
+
112
+ provide(darkModeStateInjectionKey, {
113
+ darkMode,
114
+ darkModeState,
115
+ manualDarkMode,
116
+ systemDarkMode
117
+ })
118
+ provide(darkModeCommandsInjectionKey, {
119
+ setDarkMode,
120
+ cycleDarkMode
121
+ })
122
+
123
+ return {
124
+ darkMode,
125
+ darkModeState,
126
+ setDarkMode,
127
+ cycleDarkMode,
128
+ manualDarkMode,
129
+ systemDarkMode
130
+ }
14
131
  }
132
+
@@ -239,12 +239,12 @@ export type RawNotificationEntry<
239
239
  /** Props for the custom component. By default the component is passed the message, the messageClasses, and the full notification. Both will be overriden if you set them on componentProps. */
240
240
  componentProps?: Record<string, any> & { notification: NotificationEntry, message: string, messageClasses: string }
241
241
  /**
242
- * Props for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
242
+ * Attributes for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
243
243
  *
244
244
  * The most likely use is needing to adjust the width of fullscreen notifications, but fullscreen notifications have two widths (one for big screens and one for small ones (sm). You will usually want to do something like `{notificationProps: {class: 'sm:max-w-[90dvw]'}}` to change only the large one.
245
245
  *
246
246
  */
247
- notificationProps?: Record<string, any>
247
+ notificationAttrs?: Record<string, any>
248
248
  }
249
249
 
250
250
  export type NotificationEntry<
@@ -1,13 +1,7 @@
1
1
  import type { InjectionKey, Ref } from "vue"
2
2
 
3
- import type { DarkModeCommands, DarkModeState } from "./composables/useDarkMode.js"
4
3
  import type { TranslationFunction } from "./composables/useSetupI18n.js"
5
-
6
- /** @deprecated */
7
- export const isDarkModeInjectionKey = Symbol("isDarkMode") as InjectionKey<Ref<boolean>>
8
-
9
- /** @deprecated */
10
- export const manualDarkModeInjectionKey = Symbol("manualDarkMode") as InjectionKey<Ref<boolean | undefined>>
4
+ import type { DarkModeCommands, DarkModeState } from "./types/index.js"
11
5
 
12
6
  export const darkModeCommandsInjectionKey = Symbol("darkModeCommands") as InjectionKey<DarkModeCommands>
13
7
 
@@ -84,38 +84,6 @@ export type ScrollNearContainerEdgesOptions = {
84
84
  // eslint-disable-next-line @typescript-eslint/naming-convention
85
85
  export type SimpleDOMRect = Omit<DOMRect, "toJSON">
86
86
 
87
- // eslint-disable-next-line @typescript-eslint/naming-convention
88
- export interface IPopupReference { getBoundingClientRect: () => SimpleDOMRect }
89
- export type PopupPosition = { x: number, y: number, maxWidth?: number, maxHeight?: number }
90
- export type PopupSpaceInfo = {
91
- left: number
92
- right: number
93
- leftLeft: number
94
- rightRight: number
95
- leftFromCenter: number
96
- rightFromCenter: number
97
- topFromCenter: number
98
- bottomFromCenter: number
99
- top: number
100
- bottom: number
101
- }
102
- export type PopupPositioner = (
103
- /** Reference is only undefined, if you did not specify a button element or use the exposed setReference. The function is still called, because there are other ways you might want to still position the popup (e.g. center-screen or some similar variation). */
104
- reference: SimpleDOMRect | undefined,
105
- popup: SimpleDOMRect | DOMRect,
106
- bg: SimpleDOMRect | DOMRect,
107
- space: PopupSpaceInfo
108
- ) => number
109
-
110
- export type PopupPositionModifier = (
111
- pos: PopupPosition,
112
- /** This will only be called with the reference element as undefined when one of the preferred positions is center-screen or it's a function. */
113
- reference: SimpleDOMRect | undefined,
114
- popup: SimpleDOMRect | DOMRect,
115
- bg: SimpleDOMRect | DOMRect,
116
- space: PopupSpaceInfo
117
- ) => PopupPosition
118
-
119
87
  export type SingleDate = Date | undefined
120
88
 
121
89
  export type RangeDate = {
@@ -127,3 +95,108 @@ export type CustomNotificationComponentProps = {
127
95
  message: string
128
96
  messageClasses?: string
129
97
  }
98
+
99
+
100
+ export type BaseInteractiveProps = {
101
+ /** Default is false. */
102
+ disabled?: boolean
103
+ /** Default is false. */
104
+ readonly?: boolean
105
+ /** Default is true. */
106
+ border?: boolean
107
+ /** Removes styles from the component. Default is false. */
108
+ unstyle?: boolean
109
+ }
110
+
111
+
112
+ export type TailwindClassProp = {
113
+ /** Tailwind classes. */
114
+ class?: string | false
115
+ }
116
+
117
+
118
+ export const defaultDarkModeOrder = ["system", "dark", "light"] as const
119
+
120
+
121
+ export type DarkModeOptions = {
122
+ /* Whether to save the manual dark mode to local storage. Uses the key "prefersColorSchemeDark" by default. You can pass a key instead of true to use that as the key instead. */
123
+ useLocalStorage?: boolean | string
124
+ /* The order of the string dark modes when using `cycleDarkMode`. Defaults to `["system", "dark", "light"]` */
125
+ darkModeOrder?: readonly ("system" | "dark" | "light")[]
126
+ /** True by default, should be passed import.meta.client if using nuxt, or false when running server side. */
127
+ isClientSide?: boolean
128
+ /**
129
+ * Whether to use the view transition to animate the dark mode switch (you just need to add the css).
130
+ *
131
+ * Note that the transitition is NOT triggered if visually the mode does not change (e.g. system mode is dark and the user switches from system to dark, visually nothing changes so transitioning is skipped).
132
+ *
133
+ * There is an example in storybook. But basically:
134
+ *
135
+ * ```css
136
+ *
137
+ * #root { // the dark mode switcher works on the WRoot component not the html root
138
+ * view-transition-name: wroot;
139
+ * height: 100dvh;
140
+ * padding: 0;
141
+ * }
142
+ *
143
+ * ::view-transition-new(wroot) {
144
+ * animation: grow var(--story-anim-length) ease-in-out;
145
+ * animation-fill-mode: both;
146
+ * z-index: 2;
147
+ * mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="20" fill="white"/></svg>') center / 0 no-repeat;
148
+ * }
149
+ *
150
+ * ::view-transition-old(wroot) {
151
+ * animation: none;
152
+ * animation-fill-mode: both;
153
+ * z-index: 1;
154
+ * }
155
+ *
156
+ * @keyframes grow {
157
+ * from {
158
+ * mask-size: 0dvw;
159
+ * }
160
+ * to {
161
+ * mask-size: 300dvw;
162
+ * }
163
+ * }
164
+ * ```
165
+ *
166
+ * See https://theme-toggle.rdsx.dev/ for more ideas.
167
+ *
168
+ * @default true
169
+ */
170
+ useViewTransition?: boolean
171
+ }
172
+
173
+ export interface DarkModeCommands {
174
+ setDarkMode: (value: "dark" | "light" | "system") => void
175
+ cycleDarkMode: () => void
176
+ }
177
+
178
+ export interface DarkModeState {
179
+ /** Whether the dark mode should be enabled or not */
180
+ darkMode: Ref<boolean>
181
+ /** The current state of the darkMode but as a string (dark, light, system) */
182
+ darkModeState: Ref<"dark" | "light" | "system">
183
+ /** The value of the manuably controllable dark mode. You can set this to true/false or undefined to allow the systemDarkMode to take priority. Alternatively use setDarkMode instead. */
184
+ manualDarkMode: Ref<boolean | undefined>
185
+ /** The value of the system dark mode. This is automatically set depending on the user's `prefer-color-scheme` and should not be set directly. */
186
+ systemDarkMode: Ref<boolean>
187
+
188
+ }
189
+ export type PopupConstrainToProps = {
190
+ constrainWidthTo?: number | "trigger" | "available" | string | null
191
+ constrainHeightTo?: number | "trigger" | "available" | string | null
192
+ }
193
+
194
+
195
+ export type EmitsToProps<T> = {
196
+ [K in keyof T as K extends string ? `on${Capitalize<K>}` : never]?:
197
+ T[K] extends (...args: infer Args) => any
198
+ ? (...args: Args) => void
199
+ : T[K] extends any[]
200
+ ? (...args: T[K]) => void
201
+ : T[K]
202
+ }
@@ -8,20 +8,18 @@ export {}
8
8
  /* prettier-ignore */
9
9
  declare module 'vue' {
10
10
  export interface GlobalComponents {
11
- IFa6RegularCopy: typeof import('~icons/fa6-regular/copy')['default']
12
- IFa6RegularFile: typeof import('~icons/fa6-regular/file')['default']
13
- IFa6SolidArrowUpFromBracket: typeof import('~icons/fa6-solid/arrow-up-from-bracket')['default']
14
- IFa6SolidChevronUp: typeof import('~icons/fa6-solid/chevron-up')['default']
15
- IFa6SolidCircleHalfStroke: typeof import('~icons/fa6-solid/circle-half-stroke')['default']
16
- IFa6SolidXmark: typeof import('~icons/fa6-solid/xmark')['default']
17
- IFaSolidMoon: typeof import('~icons/fa-solid/moon')['default']
18
- IPhSunBold: typeof import('~icons/ph/sun-bold')['default']
19
- IRadixIconsCalendar: typeof import('~icons/radix-icons/calendar')['default']
20
- IRadixIconsChevronLeft: typeof import('~icons/radix-icons/chevron-left')['default']
21
- IRadixIconsChevronRight: typeof import('~icons/radix-icons/chevron-right')['default']
22
- IRadixIconsDoubleArrowLeft: typeof import('~icons/radix-icons/double-arrow-left')['default']
23
- IRadixIconsDoubleArrowRight: typeof import('~icons/radix-icons/double-arrow-right')['default']
24
- RouterLink: typeof import('vue-router')['RouterLink']
25
- RouterView: typeof import('vue-router')['RouterView']
11
+ ILucideCalendarDays: typeof import('~icons/lucide/calendar-days')['default']
12
+ ILucideCalendarRange: typeof import('~icons/lucide/calendar-range')['default']
13
+ ILucideCheck: typeof import('~icons/lucide/check')['default']
14
+ ILucideChevronLeft: typeof import('~icons/lucide/chevron-left')['default']
15
+ ILucideChevronRight: typeof import('~icons/lucide/chevron-right')['default']
16
+ ILucideChevronsLeft: typeof import('~icons/lucide/chevrons-left')['default']
17
+ ILucideChevronsRight: typeof import('~icons/lucide/chevrons-right')['default']
18
+ ILucideCopy: typeof import('~icons/lucide/copy')['default']
19
+ ILucideFile: typeof import('~icons/lucide/file')['default']
20
+ ILucideInfo: typeof import('~icons/lucide/info')['default']
21
+ ILucideLoaderCircle: typeof import('~icons/lucide/loader-circle')['default']
22
+ ILucideUpload: typeof import('~icons/lucide/upload')['default']
23
+ ILucideX: typeof import('~icons/lucide/x')['default']
26
24
  }
27
25
  }
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- value: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,16 +0,0 @@
1
- <template>
2
- <div tabindex="0">
3
- {{ value }}
4
- </div>
5
- </template>
6
-
7
- <script setup>
8
- defineOptions({ name: "Aria" });
9
- defineProps({
10
- value: { type: String, required: true }
11
- });
12
- </script>
13
-
14
- <style scoped>
15
- div{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);white-space:nowrap}
16
- </style>
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- value: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,37 +0,0 @@
1
- import { type ButtonHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type ButtonProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
- type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & ButtonProps;
4
- interface Props extends
5
- /** @vue-ignore */
6
- Partial<Omit<ButtonHTMLAttributes, "class" | "color" | "disabled"> & TailwindClassProp & {
7
- "aria-label": string;
8
- }>, RealProps {
9
- }
10
- declare const _default: typeof __VLS_export;
11
- export default _default;
12
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
- label: string;
14
- color: "warning" | "ok" | "danger" | "primary" | "secondary" | false;
15
- disabled: boolean;
16
- readonly: boolean;
17
- border: boolean;
18
- unstyle: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
- label?: (props: {
21
- id: string;
22
- classes: string;
23
- }) => any;
24
- } & {
25
- icon?: (props: {}) => any;
26
- } & {
27
- default?: (props: {
28
- label: string;
29
- }) => any;
30
- } & {
31
- 'icon-after'?: (props: {}) => any;
32
- }>;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };
@@ -1,37 +0,0 @@
1
- import { type ButtonHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type ButtonProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
- type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & ButtonProps;
4
- interface Props extends
5
- /** @vue-ignore */
6
- Partial<Omit<ButtonHTMLAttributes, "class" | "color" | "disabled"> & TailwindClassProp & {
7
- "aria-label": string;
8
- }>, RealProps {
9
- }
10
- declare const _default: typeof __VLS_export;
11
- export default _default;
12
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
- label: string;
14
- color: "warning" | "ok" | "danger" | "primary" | "secondary" | false;
15
- disabled: boolean;
16
- readonly: boolean;
17
- border: boolean;
18
- unstyle: boolean;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
- label?: (props: {
21
- id: string;
22
- classes: string;
23
- }) => any;
24
- } & {
25
- icon?: (props: {}) => any;
26
- } & {
27
- default?: (props: {
28
- label: string;
29
- }) => any;
30
- } & {
31
- 'icon-after'?: (props: {}) => any;
32
- }>;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };