@witchcraft/ui 0.4.0 → 0.4.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 (316) hide show
  1. package/README.md +56 -61
  2. package/dist/module.d.mts +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +13 -9
  5. package/dist/runtime/assets/animations.css +1 -1
  6. package/dist/runtime/assets/locales/en.json +2 -0
  7. package/dist/runtime/assets/utils.css +1 -1
  8. package/dist/runtime/build/WitchcraftUiResolver.js +1 -2
  9. package/dist/runtime/components/TestControls/TestControls.d.vue.ts +2 -1
  10. package/dist/runtime/components/TestControls/TestControls.vue +3 -3
  11. package/dist/runtime/components/TestControls/TestControls.vue.d.ts +2 -1
  12. package/dist/runtime/components/WButton/WButton.d.vue.ts +34 -0
  13. package/dist/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +26 -38
  14. package/dist/runtime/components/WButton/WButton.vue.d.ts +34 -0
  15. package/dist/runtime/components/WCheckbox/WCheckbox.d.vue.ts +33 -0
  16. package/dist/runtime/components/WCheckbox/WCheckbox.vue +110 -0
  17. package/dist/runtime/components/WCheckbox/WCheckbox.vue.d.ts +33 -0
  18. package/dist/runtime/components/{LibColorInput/LibColorInput.d.vue.ts → WColorInput/WColorInput.d.vue.ts} +18 -36
  19. package/dist/runtime/components/WColorInput/WColorInput.vue +85 -0
  20. package/dist/runtime/components/{LibColorInput/LibColorInput.vue.d.ts → WColorInput/WColorInput.vue.d.ts} +18 -36
  21. package/dist/runtime/components/WColorInput/WColorSwatchButton.d.vue.ts +28 -0
  22. package/dist/runtime/components/WColorInput/WColorSwatchButton.vue +86 -0
  23. package/dist/runtime/components/WColorInput/WColorSwatchButton.vue.d.ts +28 -0
  24. package/dist/runtime/components/{LibColorPicker/LibColorPicker.d.vue.ts → WColorPicker/WColorPicker.d.vue.ts} +12 -9
  25. package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +41 -29
  26. package/dist/runtime/components/{LibColorPicker/LibColorPicker.vue.d.ts → WColorPicker/WColorPicker.vue.d.ts} +12 -9
  27. package/dist/runtime/components/WCombobox/WCombobox.d.vue.ts +111 -0
  28. package/dist/runtime/components/WCombobox/WCombobox.vue +405 -0
  29. package/dist/runtime/components/WCombobox/WCombobox.vue.d.ts +111 -0
  30. package/dist/runtime/components/WCombobox/storyPlays.d.ts +18 -0
  31. package/dist/runtime/components/WCombobox/storyPlays.js +68 -0
  32. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.d.vue.ts → WDarkModeSwitcher/WDarkModeSwitcher.d.vue.ts} +9 -13
  33. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +11 -14
  34. package/dist/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts → WDarkModeSwitcher/WDarkModeSwitcher.vue.d.ts} +9 -13
  35. package/dist/runtime/components/{LibDatePicker/LibDatePicker.d.vue.ts → WDatePicker/WDatePicker.d.vue.ts} +7 -7
  36. package/dist/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
  37. package/dist/runtime/components/{LibDatePicker/LibDatePicker.vue.d.ts → WDatePicker/WDatePicker.vue.d.ts} +7 -7
  38. package/dist/runtime/components/WDatePicker/WRangeDatePicker.d.vue.ts +182 -0
  39. package/dist/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +29 -25
  40. package/dist/runtime/components/WDatePicker/WRangeDatePicker.vue.d.ts +182 -0
  41. package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.d.vue.ts → WDatePicker/WSingleDatePicker.d.vue.ts} +7 -5
  42. package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +21 -21
  43. package/dist/runtime/components/{LibDatePicker/LibSingleDatePicker.vue.d.ts → WDatePicker/WSingleDatePicker.vue.d.ts} +7 -5
  44. package/dist/runtime/components/WDatePicker/WTimeZonePicker.d.vue.ts +13 -0
  45. package/dist/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
  46. package/dist/runtime/components/WDatePicker/WTimeZonePicker.vue.d.ts +13 -0
  47. package/dist/runtime/components/{LibDebug/LibDebug.d.vue.ts → WDebug/WDebug.d.vue.ts} +3 -2
  48. package/dist/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +10 -12
  49. package/dist/runtime/components/{LibDebug/LibDebug.vue.d.ts → WDebug/WDebug.vue.d.ts} +3 -2
  50. package/dist/runtime/components/{LibDevOnly/LibDevOnly.d.vue.ts → WDevOnly/WDevOnly.d.vue.ts} +3 -5
  51. package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue.d.ts → WDevOnly/WDevOnly.vue.d.ts} +3 -5
  52. package/dist/runtime/components/WFileInput/WFileInput.d.vue.ts +58 -0
  53. package/dist/runtime/components/WFileInput/WFileInput.vue +348 -0
  54. package/dist/runtime/components/WFileInput/WFileInput.vue.d.ts +58 -0
  55. package/dist/runtime/components/WIcon/WIcon.d.vue.ts +18 -0
  56. package/dist/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +1 -1
  57. package/dist/runtime/components/WIcon/WIcon.vue.d.ts +18 -0
  58. package/dist/runtime/components/WMultiValues/WMultiValues.d.vue.ts +28 -0
  59. package/dist/runtime/components/WMultiValues/WMultiValues.vue +150 -0
  60. package/dist/runtime/components/WMultiValues/WMultiValues.vue.d.ts +28 -0
  61. package/dist/runtime/components/WNotifications/WNotification.d.vue.ts +37 -0
  62. package/dist/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +61 -35
  63. package/dist/runtime/components/WNotifications/WNotification.vue.d.ts +37 -0
  64. package/dist/runtime/components/WNotifications/WNotificationTestMessageComponent.d.vue.ts +7 -0
  65. package/dist/runtime/components/WNotifications/WNotificationTestMessageComponent.vue +29 -0
  66. package/dist/runtime/components/WNotifications/WNotificationTestMessageComponent.vue.d.ts +7 -0
  67. package/dist/runtime/components/WNotifications/WNotifications.d.vue.ts +11 -0
  68. package/dist/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +72 -36
  69. package/dist/runtime/components/WNotifications/WNotifications.vue.d.ts +11 -0
  70. package/dist/runtime/components/WNotifications/calculateNotificationProgress.d.ts +2 -0
  71. package/dist/runtime/components/WNotifications/calculateNotificationProgress.js +4 -0
  72. package/dist/runtime/components/WNumberInput/WNumberInput.d.vue.ts +27 -0
  73. package/dist/runtime/components/WNumberInput/WNumberInput.vue +96 -0
  74. package/dist/runtime/components/WNumberInput/WNumberInput.vue.d.ts +27 -0
  75. package/dist/runtime/components/WPagination/WPagination.d.vue.ts +59 -0
  76. package/dist/runtime/components/WPagination/WPagination.vue +182 -0
  77. package/dist/runtime/components/WPagination/WPagination.vue.d.ts +59 -0
  78. package/dist/runtime/components/WPalette/WPalette.d.vue.ts +11 -0
  79. package/dist/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
  80. package/dist/runtime/components/WPalette/WPalette.vue.d.ts +11 -0
  81. package/dist/runtime/components/WPopover/WPopover.d.vue.ts +45 -0
  82. package/dist/runtime/components/WPopover/WPopover.vue +144 -0
  83. package/dist/runtime/components/WPopover/WPopover.vue.d.ts +45 -0
  84. package/dist/runtime/components/WPopup/WPopup.d.vue.ts +51 -0
  85. package/dist/runtime/components/WPopup/WPopup.vue +115 -0
  86. package/dist/runtime/components/WPopup/WPopup.vue.d.ts +51 -0
  87. package/dist/runtime/components/{LibProgressBar/LibProgressBar.d.vue.ts → WProgressBar/WProgressBar.d.vue.ts} +13 -16
  88. package/dist/runtime/components/WProgressBar/WProgressBar.vue +150 -0
  89. package/dist/runtime/components/{LibProgressBar/LibProgressBar.vue.d.ts → WProgressBar/WProgressBar.vue.d.ts} +13 -16
  90. package/dist/runtime/components/{LibRecorder/LibRecorder.d.vue.ts → WRecorder/WRecorder.d.vue.ts} +13 -27
  91. package/dist/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +37 -36
  92. package/dist/runtime/components/{LibRecorder/LibRecorder.vue.d.ts → WRecorder/WRecorder.vue.d.ts} +13 -27
  93. package/dist/runtime/components/{LibRoot/LibRoot.d.vue.ts → WRoot/WRoot.d.vue.ts} +11 -9
  94. package/dist/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +17 -15
  95. package/dist/runtime/components/{LibRoot/LibRoot.vue.d.ts → WRoot/WRoot.vue.d.ts} +11 -9
  96. package/dist/runtime/components/WSimpleInput/WSimpleInput.d.vue.ts +34 -0
  97. package/dist/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +14 -24
  98. package/dist/runtime/components/WSimpleInput/WSimpleInput.vue.d.ts +34 -0
  99. package/dist/runtime/components/WTable/WTable.d.vue.ts +102 -0
  100. package/dist/runtime/components/WTable/WTable.vue +370 -0
  101. package/dist/runtime/components/WTable/WTable.vue.d.ts +102 -0
  102. package/dist/runtime/components/WTooltip/WTooltip.d.vue.ts +40 -0
  103. package/dist/runtime/components/WTooltip/WTooltip.vue +112 -0
  104. package/dist/runtime/components/WTooltip/WTooltip.vue.d.ts +40 -0
  105. package/dist/runtime/components/index.d.ts +20 -20
  106. package/dist/runtime/components/index.js +20 -20
  107. package/dist/runtime/composables/index.d.ts +4 -4
  108. package/dist/runtime/composables/index.js +4 -4
  109. package/dist/runtime/composables/useDelayedLoadingIndicator.d.ts +9 -0
  110. package/dist/runtime/composables/useDelayedLoadingIndicator.js +18 -0
  111. package/dist/runtime/composables/useDisplayForReka.d.ts +25 -0
  112. package/dist/runtime/composables/useDisplayForReka.js +16 -0
  113. package/dist/runtime/composables/useFallbackId.d.ts +3 -0
  114. package/dist/runtime/composables/useFallbackId.js +5 -0
  115. package/dist/runtime/composables/useInjectedDarkMode.d.ts +1 -1
  116. package/dist/runtime/composables/usePopupConstrainToStyle.d.ts +8 -0
  117. package/dist/runtime/composables/usePopupConstrainToStyle.js +8 -0
  118. package/dist/runtime/composables/useSetupDarkMode.d.ts +2 -3
  119. package/dist/runtime/composables/useSetupDarkMode.js +90 -4
  120. package/dist/runtime/composables/useTimeConditionally.d.ts +16 -0
  121. package/dist/runtime/composables/useTimeConditionally.js +27 -0
  122. package/dist/runtime/directives/vResizableCols.js +101 -34
  123. package/dist/runtime/helpers/NotificationHandler.d.ts +28 -3
  124. package/dist/runtime/helpers/NotificationHandler.js +7 -10
  125. package/dist/runtime/injectionKeys.d.ts +1 -5
  126. package/dist/runtime/injectionKeys.js +0 -2
  127. package/dist/runtime/types/index.d.ts +97 -31
  128. package/dist/runtime/types/index.js +1 -0
  129. package/dist/runtime/utils/notifyIfError.d.ts +3 -1
  130. package/dist/runtime/utils/notifyIfError.js +4 -2
  131. package/dist/runtime/utils/twMerge.d.ts +1 -0
  132. package/dist/runtime/utils/twMerge.js +2 -1
  133. package/package.json +59 -56
  134. package/src/module.ts +16 -8
  135. package/src/runtime/assets/animations.css +53 -6
  136. package/src/runtime/assets/locales/en.json +2 -0
  137. package/src/runtime/assets/tailwind.css +1 -1
  138. package/src/runtime/assets/utils.css +52 -4
  139. package/src/runtime/build/WitchcraftUiResolver.ts +1 -2
  140. package/src/runtime/components/TestControls/TestControls.vue +3 -3
  141. package/src/runtime/components/WButton/WButton.stories.ts +112 -0
  142. package/src/runtime/components/{LibButton/LibButton.vue → WButton/WButton.vue} +34 -50
  143. package/src/runtime/components/{LibCheckbox/LibCheckbox.stories.ts → WCheckbox/WCheckbox.stories.ts} +5 -5
  144. package/src/runtime/components/WCheckbox/WCheckbox.vue +125 -0
  145. package/src/runtime/components/{LibColorInput/LibColorInput.stories.ts → WColorInput/WColorInput.stories.ts} +8 -8
  146. package/src/runtime/components/WColorInput/WColorInput.vue +112 -0
  147. package/src/runtime/components/WColorInput/WColorSwatchButton.vue +102 -0
  148. package/src/runtime/components/{LibColorPicker/LibColorPicker.stories.ts → WColorPicker/WColorPicker.stories.ts} +12 -12
  149. package/src/runtime/components/{LibColorPicker/LibColorPicker.vue → WColorPicker/WColorPicker.vue} +44 -31
  150. package/src/runtime/components/WCombobox/WCombobox.stories.ts +209 -0
  151. package/src/runtime/components/WCombobox/WCombobox.vue +450 -0
  152. package/src/runtime/components/WCombobox/storyPlays.ts +92 -0
  153. package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.stories.ts → WDarkModeSwitcher/WDarkModeSwitcher.stories.ts} +6 -6
  154. package/src/runtime/components/{LibDarkModeSwitcher/LibDarkModeSwitcher.vue → WDarkModeSwitcher/WDarkModeSwitcher.vue} +19 -30
  155. package/src/runtime/components/{LibDatePicker/LibDatePicker.stories.ts → WDatePicker/WDatePicker.stories.ts} +42 -34
  156. package/src/runtime/components/{LibDatePicker/LibDatePicker.vue → WDatePicker/WDatePicker.vue} +3 -7
  157. package/src/runtime/components/{LibDatePicker/LibRangeDatePicker.vue → WDatePicker/WRangeDatePicker.vue} +29 -25
  158. package/src/runtime/components/{LibDatePicker/LibSingleDatePicker.vue → WDatePicker/WSingleDatePicker.vue} +21 -21
  159. package/src/runtime/components/{LibDatePicker/LibTimeZonePicker.vue → WDatePicker/WTimeZonePicker.vue} +5 -12
  160. package/src/runtime/components/{LibDebug/LibDebug.stories.ts → WDebug/WDebug.stories.ts} +5 -5
  161. package/src/runtime/components/{LibDebug/LibDebug.vue → WDebug/WDebug.vue} +9 -10
  162. package/src/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -4
  163. package/src/runtime/components/{LibFileInput/LibFileInput.stories.ts → WFileInput/WFileInput.stories.ts} +20 -10
  164. package/src/runtime/components/WFileInput/WFileInput.vue +392 -0
  165. package/src/runtime/components/{Icon/Icon.vue → WIcon/WIcon.vue} +5 -8
  166. package/src/runtime/components/{LibMultiValues/LibMultiValues.stories.ts → WMultiValues/WMultiValues.stories.ts} +9 -9
  167. package/src/runtime/components/WMultiValues/WMultiValues.vue +163 -0
  168. package/src/runtime/components/{LibNotifications/LibNotification.stories.ts → WNotifications/WNotification.stories.ts} +42 -6
  169. package/src/runtime/components/{LibNotifications/LibNotification.vue → WNotifications/WNotification.vue} +72 -45
  170. package/src/runtime/components/WNotifications/WNotificationTestMessageComponent.vue +27 -0
  171. package/src/runtime/components/WNotifications/WNotifications.stories.ts +139 -0
  172. package/src/runtime/components/{LibNotifications/LibNotifications.vue → WNotifications/WNotifications.vue} +87 -47
  173. package/src/runtime/components/WNotifications/calculateNotificationProgress.ts +8 -0
  174. package/src/runtime/components/WNumberInput/WNumberInput.vue +109 -0
  175. package/src/runtime/components/WPagination/WPagination.stories.ts +51 -0
  176. package/src/runtime/components/WPagination/WPagination.vue +207 -0
  177. package/src/runtime/components/{LibPalette/LibPalette.stories.ts → WPalette/WPalette.stories.ts} +6 -6
  178. package/src/runtime/components/{LibPalette/LibPalette.vue → WPalette/WPalette.vue} +3 -8
  179. package/src/runtime/components/WPopover/WPopover.stories.ts +218 -0
  180. package/src/runtime/components/WPopover/WPopover.vue +168 -0
  181. package/src/runtime/components/WPopup/WPopup.stories.ts +104 -0
  182. package/src/runtime/components/WPopup/WPopup.vue +134 -0
  183. package/src/runtime/components/WProgressBar/WProgressBar.stories.ts +119 -0
  184. package/src/runtime/components/WProgressBar/WProgressBar.vue +185 -0
  185. package/src/runtime/components/{LibRecorder/LibRecorder.stories.ts → WRecorder/WRecorder.stories.ts} +9 -6
  186. package/src/runtime/components/{LibRecorder/LibRecorder.vue → WRecorder/WRecorder.vue} +69 -68
  187. package/src/runtime/components/{LibRoot/LibRoot.vue → WRoot/WRoot.vue} +18 -15
  188. package/src/runtime/components/{LibSimpleInput/LibSimpleInput.stories.ts → WSimpleInput/WSimpleInput.stories.ts} +11 -12
  189. package/src/runtime/components/{LibSimpleInput/LibSimpleInput.vue → WSimpleInput/WSimpleInput.vue} +28 -42
  190. package/src/runtime/components/WTable/WTable.stories.ts +334 -0
  191. package/src/runtime/components/WTable/WTable.vue +471 -0
  192. package/src/runtime/components/WTooltip/WTooltip.stories.ts +82 -0
  193. package/src/runtime/components/WTooltip/WTooltip.vue +128 -0
  194. package/src/runtime/components/index.ts +20 -20
  195. package/src/runtime/composables/index.ts +4 -4
  196. package/src/runtime/composables/useDelayedLoadingIndicator.ts +30 -0
  197. package/src/runtime/composables/useDisplayForReka.ts +37 -0
  198. package/src/runtime/composables/useFallbackId.ts +6 -0
  199. package/src/runtime/composables/useInjectedDarkMode.ts +1 -2
  200. package/src/runtime/composables/usePopupConstrainToStyle.ts +29 -0
  201. package/src/runtime/composables/useSetupDarkMode.ts +122 -4
  202. package/src/runtime/composables/useTimeConditionally.ts +51 -0
  203. package/src/runtime/directives/vResizableCols.ts +121 -38
  204. package/src/runtime/helpers/NotificationHandler.ts +30 -11
  205. package/src/runtime/injectionKeys.ts +1 -7
  206. package/src/runtime/types/index.ts +118 -36
  207. package/src/runtime/utils/notifyIfError.ts +6 -2
  208. package/src/runtime/utils/twMerge.ts +2 -1
  209. package/types/components.d.ts +14 -15
  210. package/dist/runtime/components/Aria/Aria.d.vue.ts +0 -5
  211. package/dist/runtime/components/Aria/Aria.vue +0 -16
  212. package/dist/runtime/components/Aria/Aria.vue.d.ts +0 -5
  213. package/dist/runtime/components/Icon/Icon.d.vue.ts +0 -21
  214. package/dist/runtime/components/Icon/Icon.vue.d.ts +0 -21
  215. package/dist/runtime/components/LibButton/LibButton.d.vue.ts +0 -36
  216. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +0 -36
  217. package/dist/runtime/components/LibCheckbox/LibCheckbox.d.vue.ts +0 -42
  218. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +0 -103
  219. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +0 -42
  220. package/dist/runtime/components/LibColorInput/LibColorInput.vue +0 -162
  221. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.d.vue.ts +0 -34
  222. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +0 -34
  223. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.d.vue.ts +0 -22
  224. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +0 -22
  225. package/dist/runtime/components/LibFileInput/LibFileInput.d.vue.ts +0 -43
  226. package/dist/runtime/components/LibFileInput/LibFileInput.vue +0 -274
  227. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +0 -43
  228. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.d.vue.ts +0 -165
  229. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -387
  230. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +0 -165
  231. package/dist/runtime/components/LibLabel/LibLabel.d.vue.ts +0 -26
  232. package/dist/runtime/components/LibLabel/LibLabel.vue +0 -45
  233. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +0 -26
  234. package/dist/runtime/components/LibMultiValues/LibMultiValues.d.vue.ts +0 -29
  235. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +0 -109
  236. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +0 -29
  237. package/dist/runtime/components/LibNotifications/LibNotification.d.vue.ts +0 -30
  238. package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +0 -30
  239. package/dist/runtime/components/LibNotifications/LibNotifications.d.vue.ts +0 -13
  240. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +0 -13
  241. package/dist/runtime/components/LibPagination/LibPagination.d.vue.ts +0 -104
  242. package/dist/runtime/components/LibPagination/LibPagination.vue +0 -229
  243. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +0 -104
  244. package/dist/runtime/components/LibPalette/LibPalette.d.vue.ts +0 -14
  245. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +0 -14
  246. package/dist/runtime/components/LibPopup/LibPopup.d.vue.ts +0 -46
  247. package/dist/runtime/components/LibPopup/LibPopup.vue +0 -365
  248. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +0 -46
  249. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +0 -169
  250. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.d.vue.ts +0 -35
  251. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +0 -35
  252. package/dist/runtime/components/LibSuggestions/LibSuggestions.d.vue.ts +0 -94
  253. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +0 -178
  254. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +0 -94
  255. package/dist/runtime/components/LibTable/LibTable.d.vue.ts +0 -45
  256. package/dist/runtime/components/LibTable/LibTable.vue +0 -155
  257. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +0 -45
  258. package/dist/runtime/components/Template/NAME.d.vue.ts +0 -17
  259. package/dist/runtime/components/Template/NAME.vue +0 -27
  260. package/dist/runtime/components/Template/NAME.vue.d.ts +0 -17
  261. package/dist/runtime/components/Template/TemplateStory.d.ts +0 -7
  262. package/dist/runtime/components/Template/TemplateStory.js +0 -22
  263. package/dist/runtime/components/shared/props.d.ts +0 -171
  264. package/dist/runtime/components/shared/props.js +0 -2
  265. package/dist/runtime/composables/useAriaLabel.d.ts +0 -6
  266. package/dist/runtime/composables/useAriaLabel.js +0 -15
  267. package/dist/runtime/composables/useDarkMode.d.ts +0 -77
  268. package/dist/runtime/composables/useDarkMode.js +0 -89
  269. package/dist/runtime/composables/useDivideAttrs.d.ts +0 -27
  270. package/dist/runtime/composables/useDivideAttrs.js +0 -27
  271. package/dist/runtime/composables/useSuggestions.d.ts +0 -40
  272. package/dist/runtime/composables/useSuggestions.js +0 -263
  273. package/src/runtime/components/Aria/Aria.vue +0 -26
  274. package/src/runtime/components/LibButton/LibButton.stories.ts +0 -106
  275. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +0 -129
  276. package/src/runtime/components/LibColorInput/LibColorInput.vue +0 -203
  277. package/src/runtime/components/LibFileInput/LibFileInput.vue +0 -320
  278. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.ts +0 -405
  279. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +0 -414
  280. package/src/runtime/components/LibLabel/LibLabel.stories.ts +0 -33
  281. package/src/runtime/components/LibLabel/LibLabel.vue +0 -65
  282. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +0 -123
  283. package/src/runtime/components/LibNotifications/LibNotifications.stories.ts +0 -120
  284. package/src/runtime/components/LibPagination/LibPagination.stories.ts +0 -49
  285. package/src/runtime/components/LibPagination/LibPagination.vue +0 -274
  286. package/src/runtime/components/LibPopup/LibPopup.stories.ts +0 -153
  287. package/src/runtime/components/LibPopup/LibPopup.vue +0 -396
  288. package/src/runtime/components/LibProgressBar/LibProgressBar.stories.ts +0 -90
  289. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +0 -197
  290. package/src/runtime/components/LibSuggestions/LibSuggestions.stories.ts +0 -134
  291. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +0 -212
  292. package/src/runtime/components/LibTable/LibTable.stories.ts +0 -167
  293. package/src/runtime/components/LibTable/LibTable.vue +0 -190
  294. package/src/runtime/components/Template/NAME.vue +0 -49
  295. package/src/runtime/components/Template/TemplateStory.ts +0 -37
  296. package/src/runtime/components/shared/props.ts +0 -199
  297. package/src/runtime/composables/useAriaLabel.ts +0 -23
  298. package/src/runtime/composables/useDarkMode.ts +0 -199
  299. package/src/runtime/composables/useDivideAttrs.ts +0 -53
  300. package/src/runtime/composables/useSuggestions.ts +0 -339
  301. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.d.ts +0 -0
  302. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.js +0 -0
  303. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.d.ts +0 -0
  304. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.js +0 -0
  305. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.d.ts +0 -0
  306. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.js +0 -0
  307. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.d.ts +0 -0
  308. /package/dist/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.js +0 -0
  309. /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.d.ts +0 -0
  310. /package/dist/runtime/components/{LibDatePicker → WDatePicker}/helpers.js +0 -0
  311. /package/dist/runtime/components/{LibDevOnly/LibDevOnly.vue → WDevOnly/WDevOnly.vue} +0 -0
  312. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToHsva.ts +0 -0
  313. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/safeConvertToRgba.ts +0 -0
  314. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/toLowPrecisionRgbaString.ts +0 -0
  315. /package/src/runtime/components/{LibColorPicker → WColorPicker}/utils/truncate.ts +0 -0
  316. /package/src/runtime/components/{LibDatePicker → WDatePicker}/helpers.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { AnyFunction, MakeRequired } from "@alanscodelog/utils";
2
- import { type Reactive } from "vue";
2
+ import { type Component, type Reactive } from "vue";
3
3
  export declare class NotificationHandler<TRawEntry extends RawNotificationEntry<any, any> = RawNotificationEntry<any, any>, TEntry extends NotificationEntry<TRawEntry> = NotificationEntry<TRawEntry>> {
4
4
  timeout: number;
5
5
  debug: boolean;
@@ -26,21 +26,46 @@ export declare class NotificationHandler<TRawEntry extends RawNotificationEntry<
26
26
  }
27
27
  export type NotificationPromise<TOption extends string = string> = Promise<TOption>;
28
28
  export type RawNotificationEntry<TOptions extends string[] = ["Ok", "Cancel"], TCancellable extends boolean | TOptions[number] = "Cancel"> = {
29
- message: string;
30
29
  title?: string;
31
30
  code?: string;
32
31
  /** @default ["Ok", "Cancel"] */
33
32
  options?: TOptions;
34
33
  /** @default false */
35
34
  requiresAction?: boolean;
35
+ /**
36
+ * If true or a string (the cancel option) ensures the option exists and that is the "default" cancel action when a notification is dismissed in some manner that is not clicking one of the options (escaped, background click, etc.).
37
+ *
38
+ * This also enables cancelling via those secondary methods, otherwise the notification won't allow itself to be dismissed.
39
+ *
40
+ * @default undefined / false
41
+ */
36
42
  cancellable?: TCancellable;
37
43
  /** @default "Ok" */
38
44
  default?: TOptions[number];
39
45
  /** @default [] */
40
46
  dangerous?: TOptions[number][];
41
- /** @default false if cancellable, otherwise the default timeout */
47
+ /**
48
+ * Overrides the default timeout, can be set to true to just enable it. An entry must be cancellable to have a timeout.
49
+ *
50
+ * @default global timeout / false if cancellable is false
51
+ */
42
52
  timeout?: number | boolean;
43
53
  icon?: string;
54
+ message: string;
55
+ component?: string | Component;
56
+ /** 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. */
57
+ componentProps?: Record<string, any> & {
58
+ notification: NotificationEntry;
59
+ message: string;
60
+ messageClasses: string;
61
+ };
62
+ /**
63
+ * Attributes for the notification component itself. They are bound to the root of the element and the class property is merged with twMerge.
64
+ *
65
+ * 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.
66
+ *
67
+ */
68
+ notificationAttrs?: Record<string, any>;
44
69
  };
45
70
  export type NotificationEntry<TRawEntry extends RawNotificationEntry<any, any> = RawNotificationEntry<any, any>> = Omit<MakeRequired<TRawEntry, "options" | "requiresAction" | "default" | "dangerous">, "cancellable"> & {
46
71
  promise: NotificationPromise;
@@ -4,7 +4,7 @@ import { indent } from "@alanscodelog/utils/indent";
4
4
  import { isBlank } from "@alanscodelog/utils/isBlank";
5
5
  import { pretty } from "@alanscodelog/utils/pretty";
6
6
  import { setReadOnly } from "@alanscodelog/utils/setReadOnly";
7
- import { reactive } from "vue";
7
+ import { markRaw, reactive } from "vue";
8
8
  export class NotificationHandler {
9
9
  timeout = 5e3;
10
10
  debug = false;
@@ -57,13 +57,6 @@ export class NotificationHandler {
57
57
  );
58
58
  }
59
59
  }
60
- if (entry.timeout !== void 0 && !entry.cancellable) {
61
- throw new Error(
62
- crop`Cannot timeout notification that is not cancellable:
63
- ${indent(pretty(entry), 5)}
64
- `
65
- );
66
- }
67
60
  if (entry.timeout !== void 0 && entry.requiresAction) {
68
61
  throw new Error(
69
62
  crop`Cannot timeout notification that requires action:
@@ -85,8 +78,8 @@ export class NotificationHandler {
85
78
  requiresAction: false,
86
79
  options: ["Ok", "Cancel"],
87
80
  default: "Ok",
88
- cancellable: rawEntry.cancellable,
89
81
  ...rawEntry,
82
+ component: rawEntry.component && typeof rawEntry.component !== "string" ? markRaw(rawEntry.component) : void 0,
90
83
  dangerous: rawEntry.dangerous ?? [],
91
84
  timeout: rawEntry.timeout === true ? this.timeout : rawEntry.timeout !== void 0 && rawEntry.timeout !== false ? rawEntry.timeout : void 0
92
85
  };
@@ -152,7 +145,11 @@ export class NotificationHandler {
152
145
  const remaining = notification.timeout - notification._timer.elapsedBeforePause;
153
146
  clearTimeout(notification._timer.id);
154
147
  notification._timer.id = setTimeout(() => {
155
- notification.resolve(notification.cancellable);
148
+ if (notification.cancellable) {
149
+ notification.resolve(notification.cancellable);
150
+ } else {
151
+ notification.resolve(notification.default);
152
+ }
156
153
  }, remaining);
157
154
  }
158
155
  static resolveToDefault(notification) {
@@ -1,10 +1,6 @@
1
1
  import type { InjectionKey, Ref } from "vue";
2
- import type { DarkModeCommands, DarkModeState } from "./composables/useDarkMode.js";
3
2
  import type { TranslationFunction } from "./composables/useSetupI18n.js";
4
- /** @deprecated */
5
- export declare const isDarkModeInjectionKey: InjectionKey<Ref<boolean>>;
6
- /** @deprecated */
7
- export declare const manualDarkModeInjectionKey: InjectionKey<Ref<boolean | undefined>>;
3
+ import type { DarkModeCommands, DarkModeState } from "./types/index.js";
8
4
  export declare const darkModeCommandsInjectionKey: InjectionKey<DarkModeCommands>;
9
5
  export declare const darkModeStateInjectionKey: InjectionKey<DarkModeState>;
10
6
  export declare const languageLocaleInjectionKey: InjectionKey<Ref<string>>;
@@ -1,5 +1,3 @@
1
- export const isDarkModeInjectionKey = Symbol("isDarkMode");
2
- export const manualDarkModeInjectionKey = Symbol("manualDarkMode");
3
1
  export const darkModeCommandsInjectionKey = Symbol("darkModeCommands");
4
2
  export const darkModeStateInjectionKey = Symbol("darkModeState");
5
3
  export const languageLocaleInjectionKey = Symbol("witchcraftUiLanguageLocale");
@@ -2,9 +2,7 @@ import type { ErrorW } from "@alanscodelog/utils";
2
2
  import type { Ref } from "vue";
3
3
  export type ResizableOptions = {
4
4
  /**
5
- * Defaults to true.
6
- *
7
- * ### true
5
+ * ### true (default)
8
6
  * The directive will shrink/expand the columns when the table is resized and will use percentage widths on the table cells. This disables resizing of the last column (from the right handle).
9
7
  *
10
8
  * Additionally because of the way `table-layout:fixed` works, a min-width cannot be set on the elements via css, so instead, if the table shrinks past `opts.margin * col #`, `min-width` is set on the table until it's resized larger.
@@ -16,6 +14,8 @@ export type ResizableOptions = {
16
14
  * The table can be resized past it's normal width and uses pixel widths on the table cells. You might want to set `overscroll-x: scroll` on a parent wrapping element.
17
15
  *
18
16
  * This will set the table width to `min-content`, else it doesn't work. Note that it does this after the initial reading/setting of sizes so you can, for example, layout the table with `width: 100%`.
17
+ *
18
+ * @default true
19
19
  */
20
20
  fitWidth: boolean;
21
21
  /**
@@ -40,8 +40,12 @@ export type ResizableOptions = {
40
40
  * It can then be used as needed by the component.
41
41
  */
42
42
  widths: Ref<string[]>;
43
- /** The selector to use for the cells. "tr > td" by default. */
43
+ /** The selector to use for the header cells. "tr > th" by default. */
44
44
  selector: string;
45
+ /** Is called just after the `resizable-cols-setup` class is added. Can be useful for controlling the styling of wrappers or doing additional things post-setup. The default table element uses it to set the class on the wrapper also. */
46
+ onSetup?: (el: Element) => void;
47
+ /** Is called on teardown (after the `resizable-cols-setup` class is removed). */
48
+ onTeardown?: (el: Element) => void;
45
49
  };
46
50
  export type TableColConfig<T = {}> = Record<keyof T, {
47
51
  name?: string;
@@ -91,35 +95,97 @@ export type ScrollNearContainerEdgesOptions = {
91
95
  timerInterval?: number;
92
96
  };
93
97
  export type SimpleDOMRect = Omit<DOMRect, "toJSON">;
94
- export interface IPopupReference {
95
- getBoundingClientRect: () => SimpleDOMRect;
96
- }
97
- export type PopupPosition = {
98
- x: number;
99
- y: number;
100
- maxWidth?: number;
101
- maxHeight?: number;
102
- };
103
- export type PopupSpaceInfo = {
104
- left: number;
105
- right: number;
106
- leftLeft: number;
107
- rightRight: number;
108
- leftFromCenter: number;
109
- rightFromCenter: number;
110
- topFromCenter: number;
111
- bottomFromCenter: number;
112
- top: number;
113
- bottom: number;
114
- };
115
- export type PopupPositioner = (
116
- /** 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). */
117
- reference: SimpleDOMRect | undefined, popup: SimpleDOMRect | DOMRect, bg: SimpleDOMRect | DOMRect, space: PopupSpaceInfo) => number;
118
- export type PopupPositionModifier = (pos: PopupPosition,
119
- /** 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. */
120
- reference: SimpleDOMRect | undefined, popup: SimpleDOMRect | DOMRect, bg: SimpleDOMRect | DOMRect, space: PopupSpaceInfo) => PopupPosition;
121
98
  export type SingleDate = Date | undefined;
122
99
  export type RangeDate = {
123
100
  start?: SingleDate;
124
101
  end?: SingleDate;
125
102
  };
103
+ export type CustomNotificationComponentProps = {
104
+ message: string;
105
+ messageClasses?: string;
106
+ };
107
+ export type BaseInteractiveProps = {
108
+ /** Default is false. */
109
+ disabled?: boolean;
110
+ /** Default is false. */
111
+ readonly?: boolean;
112
+ /** Default is true. */
113
+ border?: boolean;
114
+ /** Removes styles from the component. Default is false. */
115
+ unstyle?: boolean;
116
+ };
117
+ export type TailwindClassProp = {
118
+ /** Tailwind classes. */
119
+ class?: string | false;
120
+ };
121
+ export declare const defaultDarkModeOrder: readonly ["system", "dark", "light"];
122
+ export type DarkModeOptions = {
123
+ useLocalStorage?: boolean | string;
124
+ darkModeOrder?: readonly ("system" | "dark" | "light")[];
125
+ /** True by default, should be passed import.meta.client if using nuxt, or false when running server side. */
126
+ isClientSide?: boolean;
127
+ /**
128
+ * Whether to use the view transition to animate the dark mode switch (you just need to add the css).
129
+ *
130
+ * 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).
131
+ *
132
+ * There is an example in storybook. But basically:
133
+ *
134
+ * ```css
135
+ *
136
+ * #root { // the dark mode switcher works on the WRoot component not the html root
137
+ * view-transition-name: wroot;
138
+ * height: 100dvh;
139
+ * padding: 0;
140
+ * }
141
+ *
142
+ * ::view-transition-new(wroot) {
143
+ * animation: grow var(--story-anim-length) ease-in-out;
144
+ * animation-fill-mode: both;
145
+ * z-index: 2;
146
+ * 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;
147
+ * }
148
+ *
149
+ * ::view-transition-old(wroot) {
150
+ * animation: none;
151
+ * animation-fill-mode: both;
152
+ * z-index: 1;
153
+ * }
154
+ *
155
+ * @keyframes grow {
156
+ * from {
157
+ * mask-size: 0dvw;
158
+ * }
159
+ * to {
160
+ * mask-size: 300dvw;
161
+ * }
162
+ * }
163
+ * ```
164
+ *
165
+ * See https://theme-toggle.rdsx.dev/ for more ideas.
166
+ *
167
+ * @default true
168
+ */
169
+ useViewTransition?: boolean;
170
+ };
171
+ export interface DarkModeCommands {
172
+ setDarkMode: (value: "dark" | "light" | "system") => void;
173
+ cycleDarkMode: () => void;
174
+ }
175
+ export interface DarkModeState {
176
+ /** Whether the dark mode should be enabled or not */
177
+ darkMode: Ref<boolean>;
178
+ /** The current state of the darkMode but as a string (dark, light, system) */
179
+ darkModeState: Ref<"dark" | "light" | "system">;
180
+ /** 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. */
181
+ manualDarkMode: Ref<boolean | undefined>;
182
+ /** 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. */
183
+ systemDarkMode: Ref<boolean>;
184
+ }
185
+ export type PopupConstrainToProps = {
186
+ constrainWidthTo?: number | "trigger" | "available" | string | null;
187
+ constrainHeightTo?: number | "trigger" | "available" | string | null;
188
+ };
189
+ export type EmitsToProps<T> = {
190
+ [K in keyof T as K extends string ? `on${Capitalize<K>}` : never]?: T[K] extends (...args: infer Args) => any ? (...args: Args) => void : T[K] extends any[] ? (...args: T[K]) => void : T[K];
191
+ };
@@ -0,0 +1 @@
1
+ export const defaultDarkModeOrder = ["system", "dark", "light"];
@@ -1,3 +1,4 @@
1
+ import type { NotificationEntry } from "../helpers/NotificationHandler.js";
1
2
  /**
2
3
  * Notifies the user if the given value is an error. Useful for making non-critical errors don't go unnoticed.
3
4
  *
@@ -5,10 +6,11 @@
5
6
  *
6
7
  * If the value is not an error, it is returned.
7
8
  */
8
- export declare function notifyIfError<T>(err: T, { logger, ns, force }?: {
9
+ export declare function notifyIfError<T>(err: T, { logger, ns, force, entry }?: {
9
10
  logger?: {
10
11
  debug: (...args: any[]) => void;
11
12
  };
12
13
  ns?: string;
13
14
  force?: boolean;
15
+ entry?: Partial<NotificationEntry<any>>;
14
16
  }): T;
@@ -3,7 +3,8 @@ import { useNotificationHandler } from "../composables/useNotificationHandler.js
3
3
  export function notifyIfError(err, {
4
4
  logger,
5
5
  ns,
6
- force = false
6
+ force = false,
7
+ entry
7
8
  } = {}) {
8
9
  if (force || err instanceof Error) {
9
10
  const errMessage = {
@@ -22,7 +23,8 @@ export function notifyIfError(err, {
22
23
  ...errMessage,
23
24
  options: ["Ok"],
24
25
  cancellable: "Ok",
25
- timeout: true
26
+ timeout: true,
27
+ ...entry
26
28
  });
27
29
  }
28
30
  return err;
@@ -5,6 +5,7 @@ export declare const twMergeExtend: {
5
5
  "focus-outline": {
6
6
  "focus-outline": string[];
7
7
  }[];
8
+ "no-truncate": string[];
8
9
  };
9
10
  };
10
11
  };
@@ -2,7 +2,8 @@ import { extendTailwindMerge } from "tailwind-merge";
2
2
  const _twMergeExtend = {
3
3
  extend: {
4
4
  classGroups: {
5
- "focus-outline": [{ "focus-outline": ["", "no-offset", "none"] }]
5
+ "focus-outline": [{ "focus-outline": ["", "no-offset", "none"] }],
6
+ "no-truncate": ["truncate", "no-truncate"]
6
7
  }
7
8
  }
8
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@witchcraft/ui",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Vue component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime/main.lib.js",
@@ -32,6 +32,7 @@
32
32
  },
33
33
  "./utils.css": "./src/runtime/assets/utils.css",
34
34
  "./base.css": "./src/runtime/assets/base.css",
35
+ "./animations.css": "./src/runtime/assets/animations.css",
35
36
  "./nuxt": {
36
37
  "types": "./dist/types.d.mts",
37
38
  "import": "./dist/module.mjs"
@@ -49,9 +50,9 @@
49
50
  "failOnWarn": false
50
51
  },
51
52
  "peerDependencies": {
52
- "tailwindcss": "^4.1.12",
53
- "unplugin-icons": "^22.2.0",
54
- "vue": "^3.5.20"
53
+ "tailwindcss": "^4.2.1",
54
+ "unplugin-icons": "^22.5.0",
55
+ "vue": "^3.5.30"
55
56
  },
56
57
  "peerDependenciesMeta": {
57
58
  "tailwindcss": {
@@ -62,80 +63,82 @@
62
63
  }
63
64
  },
64
65
  "dependencies": {
65
- "@alanscodelog/utils": "^6.0.1",
66
- "@iconify/json": "^2.2.379",
67
- "@nuxt/kit": "^4.0.3",
68
- "@nuxt/schema": "^4.0.3",
66
+ "@alanscodelog/utils": "^6.2.0",
67
+ "@iconify/json": "^2.2.450",
68
+ "@nuxt/kit": "^4.4.2",
69
+ "@nuxt/schema": "^4.4.2",
69
70
  "@nuxt/types": "^2.18.1",
70
- "@tailwindcss/vite": "^4.1.12",
71
+ "@tailwindcss/vite": "^4.2.1",
71
72
  "@witchcraft/nuxt-utils": "^0.3.6",
72
73
  "colord": "^2.9.3",
73
74
  "colorjs.io": "0.6.0-alpha.1",
74
75
  "defu": "^6.1.4",
75
76
  "fast-glob": "^3.3.3",
76
77
  "metamorphosis": "^0.6.1",
77
- "reka-ui": "^2.5.0",
78
- "tailwind-merge": "^3.3.1",
79
- "unplugin-icons": "^22.2.0",
78
+ "reka-ui": "^2.9.5",
79
+ "tailwind-merge": "^3.5.0",
80
+ "unplugin-icons": "^22.5.0",
80
81
  "unplugin-vue-components": "^28.8.0",
81
82
  "vue-component-type-helpers": "^2.2.12"
82
83
  },
83
84
  "devDependencies": {
84
85
  "@alanscodelog/commitlint-config": "^3.1.2",
85
- "@alanscodelog/eslint-config": "^6.3.0",
86
- "@alanscodelog/semantic-release-config": "^6.0.0",
87
- "@alanscodelog/tsconfigs": "^6.2.0",
88
- "@alanscodelog/vite-config": "^0.0.6",
86
+ "@alanscodelog/eslint-config": "^6.3.1",
87
+ "@alanscodelog/semantic-release-config": "^6.0.2",
88
+ "@alanscodelog/tsconfigs": "^6.3.0",
89
+ "@alanscodelog/vite-config": "^0.0.7",
89
90
  "@chromatic-com/storybook": "^3.2.7",
90
- "@commitlint/cli": "^19.8.1",
91
- "@internationalized/date": "^3.9.0",
92
- "@nuxt/eslint-config": "^1.9.0",
91
+ "@commitlint/cli": "^20.5.0",
92
+ "@internationalized/date": "^3.12.0",
93
+ "@faker-js/faker": "^10.3.0",
94
+ "@nuxt/eslint-config": "^1.15.2",
93
95
  "@nuxt/module-builder": "^1.0.2",
94
96
  "@nuxtjs/i18n": "^9.5.6",
95
- "@playwright/test": "=1.54.0",
96
- "@rollup/plugin-node-resolve": "^16.0.1",
97
- "@storybook/addon-a11y": "^8.6.14",
98
- "@storybook/addon-actions": "^8.6.14",
99
- "@storybook/addon-essentials": "^8.6.14",
100
- "@storybook/addon-interactions": "^8.6.14",
101
- "@storybook/addon-links": "^8.6.14",
102
- "@storybook/addon-storysource": "^8.6.14",
103
- "@storybook/blocks": "^8.6.14",
104
- "@storybook/manager-api": "^8.6.14",
105
- "@storybook/test": "^8.6.14",
97
+ "@playwright/test": "=1.58.2",
98
+ "@rollup/plugin-node-resolve": "^16.0.3",
99
+ "@storybook/addon-a11y": "^8.6.18",
100
+ "@storybook/addon-actions": "^8.6.18",
101
+ "@storybook/addon-essentials": "^8.6.18",
102
+ "@storybook/addon-interactions": "^8.6.18",
103
+ "@storybook/addon-links": "^8.6.18",
104
+ "@storybook/addon-storysource": "^8.6.18",
105
+ "@storybook/blocks": "^8.6.18",
106
+ "@storybook/manager-api": "^8.6.18",
107
+ "@storybook/test": "^8.6.18",
106
108
  "@storybook/test-runner": "^0.22.1",
107
- "@storybook/vue3": "^8.6.14",
108
- "@storybook/vue3-vite": "^8.6.14",
109
- "@tailwindcss/cli": "^4.1.12",
110
- "@tailwindcss/postcss": "^4.1.12",
111
- "@types/node": "^24.3.0",
112
- "@vitejs/plugin-vue": "^6.0.1",
113
- "@vue/runtime-core": "^3.5.20",
114
- "@vue/runtime-dom": "^3.5.20",
115
- "@vueuse/components": "^13.8.0",
116
- "@vueuse/core": "^13.8.0",
117
- "autoprefixer": "^10.4.21",
109
+ "@storybook/vue3": "^8.6.18",
110
+ "@storybook/vue3-vite": "^8.6.18",
111
+ "@tanstack/vue-virtual": "^3.13.23",
112
+ "@tailwindcss/cli": "^4.2.1",
113
+ "@tailwindcss/postcss": "^4.2.1",
114
+ "@types/node": "^24.12.0",
115
+ "@vitejs/plugin-vue": "^6.0.5",
116
+ "@vue/runtime-core": "^3.5.30",
117
+ "@vue/runtime-dom": "^3.5.30",
118
+ "@vueuse/components": "^13.9.0",
119
+ "@vueuse/core": "^13.9.0",
120
+ "autoprefixer": "^10.4.27",
118
121
  "concurrently": "^9.2.1",
119
- "eslint": "^9.34.0",
122
+ "eslint": "^9.39.4",
120
123
  "http-server": "^14.1.1",
121
124
  "husky": "^9.1.7",
122
125
  "indexit": "2.1.0-beta.3",
123
126
  "madge": "^7.0.0",
124
- "nuxt": "^4.0.3",
125
- "playwright": "=1.54.0",
126
- "playwright-core": "=1.54.0",
127
- "semantic-release": "^24.2.7",
128
- "storybook": "^8.6.14",
127
+ "nuxt": "^4.4.2",
128
+ "playwright": "=1.58.2",
129
+ "playwright-core": "=1.58.2",
130
+ "semantic-release": "^24.2.9",
131
+ "storybook": "^8.6.18",
129
132
  "storybook-dark-mode": "^4.0.2",
130
- "tailwindcss": "^4.1.12",
133
+ "tailwindcss": "^4.2.1",
131
134
  "ts-node": "^10.9.2",
132
- "typescript": "^5.9.2",
135
+ "typescript": "^5.9.3",
133
136
  "unbuild": "^3.6.1",
134
- "vite": "^7.1.3",
135
- "vite-tsconfig-paths": "^5.1.4",
136
- "vue": "^3.5.20",
137
- "vue-tsc": "3.0.6",
138
- "wait-on": "^8.0.4"
137
+ "vite": "^7.3.1",
138
+ "vite-tsconfig-paths": "^6.1.1",
139
+ "vue": "^3.5.30",
140
+ "vue-tsc": "3.2.4",
141
+ "wait-on": "^8.0.5"
139
142
  },
140
143
  "author": "Alan <alanscodelog@gmail.com>",
141
144
  "repository": "https://github.com/witchcraftjs/ui",
@@ -173,10 +176,10 @@
173
176
  "build:only": "nuxt-module-build build",
174
177
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
175
178
  "dev": "nuxi dev playground",
176
- "storybook": "BROWSER=none storybook dev -p 6006",
179
+ "storybook": "BROWSER=none storybook dev -p 6006 --no-open",
177
180
  "storybook:clear-cache": "BROWSER=none storybook dev -p 6006 --no-manager-cache",
178
181
  "storybook:build": "pnpm nuxt prepare && storybook build -o docs/storybook",
179
- "storybook:test": "pnpm storybook:build && pnpm concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm http-server docs/storybook --port 6006 --silent\" \"pnpm wait-on tcp:6006 && pnpm test-storybook\"",
182
+ "storybook:test": "pnpm storybook:build && pnpm concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm http-server docs/storybook --port 6006 --silent\" \"pnpm wait-on tcp:6006 && pnpm test-storybook --excludeTags 'skip-smoke-test'\"",
180
183
  "test": "pnpm storybook:test && pnpm lint:types",
181
184
  "test:dev": "pnpm concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm storybook\" \"pnpm wait-on tcp:6006 && pnpm test-storybook --watch\"",
182
185
  "doc": "pnpm test && pnpm storybook:build",
package/src/module.ts CHANGED
@@ -35,7 +35,7 @@ const componentsInfo: {
35
35
  `!**/Template/**.vue`
36
36
  ], [], (filepath: string, name: string) => ({
37
37
  originalName: name,
38
- name: name.startsWith("Lib") ? name.replace("Lib", "PREFIX") : `PREFIX${name}`,
38
+ name: name.startsWith("W") ? name.replace("W", "PREFIX") : `PREFIX${name}`,
39
39
  filepath
40
40
  }))
41
41
 
@@ -75,7 +75,7 @@ export interface ModuleOptions {
75
75
  */
76
76
  mainCssFile?: string
77
77
  /** @internal */
78
- _playgroundWorkaround?: boolean
78
+ _playgroundWorkaround?: string
79
79
  }
80
80
 
81
81
  export default defineNuxtModule<ModuleOptions>({
@@ -93,7 +93,7 @@ export default defineNuxtModule<ModuleOptions>({
93
93
  componentPrefix: "W",
94
94
  debug: true,
95
95
  mainCssFile: "~/assets/css/tailwind.css",
96
- _playgroundWorkaround: false
96
+ _playgroundWorkaround: undefined
97
97
  },
98
98
  moduleDependencies: {
99
99
  // not working, see note for unpluginOptions
@@ -133,20 +133,25 @@ export default defineNuxtModule<ModuleOptions>({
133
133
  }
134
134
  )
135
135
 
136
+ const assetDir = resolve("runtime/assets")
137
+ const tailwindFiles = globFiles([
138
+ `${assetDir}/**/*.css`,
139
+ `!${assetDir}/**/tailwind.css`,
140
+ `!${assetDir}/**/theme.css`
141
+ ], [])
142
+
136
143
  addTemplate({
137
144
  filename: "witchcraft-ui.css",
138
145
  write: true,
139
- getContents: () => options._playgroundWorkaround
146
+ getContents: () => options._playgroundWorkaround === "@witchcraft/ui"
140
147
  ? crop`
141
148
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
142
- @import "${resolve("runtime/assets/base.css")}";
143
- @import "${resolve("runtime/assets/utils.css")}";
149
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath}";`).join("\n"), 5)}
144
150
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
145
151
  `
146
152
  : crop`
147
153
  ${indent(themeAsTailwindCss(theme, themeConvertionOpts), 5)}
148
- @import "@witchcraft/ui/base.css";
149
- @import "@witchcraft/ui/utils.css";
154
+ ${indent(tailwindFiles.map(_ => `@import "${_.filepath.replace(assetDir, "@witchcraft/ui")}";`).join("\n"), 5)}
150
155
  ${indent(filteredComponentsInfo.map(_ => `@source "${_.filepath}";`).join("\n"), 5)}
151
156
  `
152
157
  })
@@ -177,7 +182,9 @@ export default defineNuxtModule<ModuleOptions>({
177
182
  nuxt.hook("vite:extendConfig", async config => {
178
183
  if (options.includeUnpluginIconsPlugins) {
179
184
  logger.info(`Adding unplugin-icons`)
185
+ // @ts-expect-error .
180
186
  config.plugins ??= []
187
+ // @ts-expect-error .
181
188
  config.plugins = [
182
189
  ...(
183
190
  options.includeUnpluginIconsPlugins
@@ -199,6 +206,7 @@ export default defineNuxtModule<ModuleOptions>({
199
206
  tailwindcss() as any,
200
207
  ...config.plugins
201
208
  ]
209
+ // @ts-expect-error .
202
210
  config.optimizeDeps ??= {}
203
211
  config.optimizeDeps.exclude ??= []
204
212
  config.optimizeDeps.exclude.push("~icons")