@witchcraft/ui 0.4.0 → 0.4.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 (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,365 +0,0 @@
1
- <template>
2
- <slot
3
- name="button"
4
- :extract-el="(_) => buttonEl = _"
5
- />
6
- <!-- <Transition> -->
7
- <component
8
- v-if="modelValue || useDialogForBackdrop"
9
- :id="id ?? fallbackId"
10
- :class="twMerge(
11
- useBackdrop && useDialogForBackdrop && `
12
- popup--backdrop
13
- bg-transparent
14
- p-0
15
- backdrop:bg-transparent
16
- `,
17
- modelValue && useBackdrop && !useDialogForBackdrop && `
18
- popup--backdrop
19
- z-100
20
- fixed
21
- inset-0
22
- `,
23
- $attrs.class
24
- )"
25
- v-bind="{ ...$attrs, class: void 0 }"
26
- :is="useDialogForBackdrop ? 'dialog' : 'div'"
27
- ref="dialogEl"
28
- @mousedown.self="handleMouseup"
29
- >
30
- <div
31
- v-if="modelValue"
32
- :class="`popup z-100 fixed ${props.avoidRepositioning ? 'transition-[top,left]' : ''}`"
33
- :style="`
34
- top:${pos.y}px;
35
- left:${pos.x}px;
36
- ${pos.maxWidth ? `max-width:${pos.maxWidth}px` : ''}
37
- ${pos.maxHeight ? `max-height:${pos.maxHeight}px` : ''}
38
- `"
39
- >
40
- <slot
41
- name="popup"
42
- :position="pos"
43
- :extract-el="(_) => popupEl = _"
44
- />
45
- </div>
46
- </component>
47
- <!-- </Transition> -->
48
- </template>
49
-
50
- <script setup>
51
- import { onMounted, ref, useAttrs, watch } from "vue";
52
- import { getFallbackId } from "../shared/props.js";
53
- import { twMerge } from "../../utils/twMerge.js";
54
- import { castType } from "@alanscodelog/utils/castType";
55
- import { isArray } from "@alanscodelog/utils/isArray";
56
- const fallbackId = getFallbackId();
57
- const props = defineProps({
58
- id: { type: String, required: false },
59
- useDialogForBackdrop: { type: Boolean, required: false, default: false },
60
- useBackdrop: { type: Boolean, required: false, default: true },
61
- preferredHorizontal: { type: [Array, Function], required: false, default: () => ["center-most", "either"] },
62
- preferredVertical: { type: [Array, Function], required: false, default: () => ["top", "bottom", "either"] },
63
- avoidRepositioning: { type: Boolean, required: false, default: false },
64
- modifyPosition: { type: Function, required: false },
65
- canClose: { type: Boolean, required: false, default: true }
66
- });
67
- const $attrs = useAttrs();
68
- defineOptions({
69
- name: "LibPopup",
70
- inheritAttrs: false
71
- });
72
- const emit = defineEmits(["close"]);
73
- const dialogEl = ref(null);
74
- const popupEl = ref(null);
75
- const buttonEl = ref(null);
76
- const backgroundEl = ref(null);
77
- const pos = ref({});
78
- const modelValue = defineModel({ type: Boolean, ...{ default: false } });
79
- let isOpen = modelValue.value;
80
- const getDialogBoundingRect = () => ({
81
- x: 0,
82
- y: 0,
83
- width: window.innerWidth,
84
- height: window.innerHeight,
85
- top: 0,
86
- bottom: 0,
87
- left: 0,
88
- right: 0
89
- });
90
- let lastButtonElPos;
91
- const recompute = (force = false) => {
92
- requestAnimationFrame(() => {
93
- const horzHasCenterScreen = isArray(props.preferredHorizontal) && props.preferredHorizontal[0] === "center-screen";
94
- const vertHasCenterScreen = isArray(props.preferredVertical) && props.preferredVertical[0] === "center-screen";
95
- const canBePositionedWithoutButton = (horzHasCenterScreen || typeof props.preferredHorizontal === "function") && (vertHasCenterScreen || typeof props.preferredVertical === "function");
96
- if (!popupEl.value || !dialogEl.value || !buttonEl.value && !canBePositionedWithoutButton) {
97
- pos.value = {};
98
- return;
99
- }
100
- const el = buttonEl.value?.getBoundingClientRect();
101
- const bg = backgroundEl.value?.getBoundingClientRect() ?? (props.useBackdrop ? getDialogBoundingRect() : document.body.getBoundingClientRect());
102
- const popup = popupEl.value.getBoundingClientRect();
103
- let finalPos = {};
104
- if (!force && modelValue.value && props.avoidRepositioning && buttonEl.value && lastButtonElPos) {
105
- const shiftX = buttonEl.value.getBoundingClientRect().x - lastButtonElPos.x;
106
- const shiftY = buttonEl.value.getBoundingClientRect().y - lastButtonElPos.y;
107
- pos.value.x += shiftX;
108
- pos.value.y += shiftY;
109
- lastButtonElPos = el;
110
- return;
111
- }
112
- const space = {
113
- left: 0,
114
- right: 0,
115
- leftLeft: 0,
116
- rightRight: 0,
117
- leftFromCenter: 0,
118
- rightFromCenter: 0,
119
- topFromCenter: 0,
120
- bottomFromCenter: 0,
121
- top: 0,
122
- bottom: 0
123
- };
124
- if (el) {
125
- space.left = el.x + el.width - bg.x;
126
- space.leftLeft = el.x - bg.x;
127
- space.right = bg.x + bg.width - (el.x + el.width);
128
- space.rightRight = bg.x + bg.width - el.x;
129
- space.leftFromCenter = el.x + el.width / 2 - bg.x;
130
- space.rightFromCenter = bg.x + bg.width - (el.x + el.width / 2);
131
- space.topFromCenter = el.y + el.height / 2 - bg.y;
132
- space.bottomFromCenter = bg.y + bg.height - (el.y + el.height / 2);
133
- space.top = el.y - bg.y;
134
- space.bottom = bg.y + bg.height - (el.y + el.height);
135
- }
136
- const { preferredHorizontal, preferredVertical } = props;
137
- let maxWidth;
138
- let maxHeight;
139
- if (typeof preferredHorizontal === "function") {
140
- finalPos.x = preferredHorizontal(el, popup, bg, space);
141
- } else {
142
- outerloop:
143
- for (const type of preferredHorizontal) {
144
- switch (type) {
145
- case "center-screen":
146
- if (popup.width < bg.width) {
147
- finalPos.x = bg.width / 2 - popup.width / 2;
148
- } else {
149
- finalPos.x = 0;
150
- maxWidth = finalPos.x;
151
- }
152
- break;
153
- case "center-most":
154
- case "center":
155
- castType(el);
156
- if (space.leftFromCenter >= popup.width / 2 && space.rightFromCenter >= popup.width / 2) {
157
- finalPos.x = el.x + el.width / 2 - popup.width / 2;
158
- break outerloop;
159
- }
160
- if (space.rightFromCenter + space.leftFromCenter <= popup.width) {
161
- finalPos.x = 0;
162
- break outerloop;
163
- }
164
- if (type === "center-most") {
165
- if (space.leftFromCenter < space.rightFromCenter) {
166
- finalPos.x = el.x + el.width / 2 - space.leftFromCenter;
167
- break outerloop;
168
- } else {
169
- finalPos.x = el.x + el.width / 2 + space.rightFromCenter - popup.width;
170
- break outerloop;
171
- }
172
- }
173
- break;
174
- case "left-most":
175
- castType(el);
176
- if (space.left >= popup.width) {
177
- finalPos.x = el.x - popup.width;
178
- break outerloop;
179
- } else {
180
- finalPos.x = 0;
181
- break outerloop;
182
- }
183
- case "right-most":
184
- castType(el);
185
- if (space.right >= popup.width) {
186
- finalPos.x = el.x + el.width;
187
- break outerloop;
188
- } else {
189
- finalPos.x = bg.x + bg.width - popup.width;
190
- break outerloop;
191
- }
192
- case "right":
193
- castType(el);
194
- if (space.right >= popup.width) {
195
- finalPos.x = el.x;
196
- break outerloop;
197
- }
198
- break;
199
- case "left":
200
- castType(el);
201
- if (space.left >= popup.width) {
202
- finalPos.x = el.x + el.width - popup.width;
203
- break outerloop;
204
- }
205
- break;
206
- case "either": {
207
- castType(el);
208
- if (space.right >= space.left) {
209
- finalPos.x = el.x;
210
- break outerloop;
211
- } else {
212
- finalPos.x = el.x + el.width - popup.width;
213
- break outerloop;
214
- }
215
- }
216
- }
217
- }
218
- }
219
- if (typeof preferredVertical === "function") {
220
- finalPos.y = preferredVertical(el, popup, bg, space);
221
- } else {
222
- outerloop:
223
- for (const type of preferredVertical) {
224
- switch (type) {
225
- case "center-screen":
226
- if (popup.height < bg.height) {
227
- finalPos.y = bg.height / 2 - popup.height / 2;
228
- } else {
229
- finalPos.y = 0;
230
- maxHeight = finalPos.y;
231
- }
232
- break;
233
- case "top":
234
- castType(el);
235
- if (space.top >= popup.height) {
236
- finalPos.y = el.y - popup.height;
237
- break outerloop;
238
- }
239
- break;
240
- case "bottom":
241
- castType(el);
242
- if (space.bottom >= popup.height) {
243
- finalPos.y = el.y + el.height;
244
- break outerloop;
245
- }
246
- break;
247
- case "top-most":
248
- castType(el);
249
- if (space.top >= popup.height) {
250
- finalPos.y = el.y - popup.height;
251
- break outerloop;
252
- } else {
253
- finalPos.y = 0;
254
- break outerloop;
255
- }
256
- case "bottom-most":
257
- castType(el);
258
- if (space.bottom >= popup.height) {
259
- finalPos.y = el.y + el.height;
260
- break outerloop;
261
- } else {
262
- finalPos.y = bg.y + bg.height - popup.height;
263
- break outerloop;
264
- }
265
- case "center-most":
266
- case "center":
267
- castType(el);
268
- if (space.topFromCenter >= popup.height / 2 && space.bottomFromCenter >= popup.height / 2) {
269
- finalPos.y = el.y + el.height / 2 - popup.height / 2;
270
- break outerloop;
271
- }
272
- if (space.bottomFromCenter + space.topFromCenter <= popup.height) {
273
- finalPos.y = 0;
274
- break outerloop;
275
- }
276
- if (type === "center-most") {
277
- if (space.topFromCenter < space.bottomFromCenter) {
278
- finalPos.y = el.y + el.height / 2 - space.topFromCenter;
279
- break outerloop;
280
- } else {
281
- finalPos.y = el.y + el.height / 2 + space.bottomFromCenter - popup.height;
282
- break outerloop;
283
- }
284
- }
285
- break;
286
- case "either": {
287
- castType(el);
288
- if (space.top >= space.bottom) {
289
- finalPos.y = el.y - popup.height;
290
- break outerloop;
291
- } else {
292
- finalPos.y = el.y + el.height;
293
- break outerloop;
294
- }
295
- }
296
- }
297
- }
298
- }
299
- finalPos.maxWidth = maxWidth ?? void 0;
300
- finalPos.maxHeight = maxHeight ?? void 0;
301
- if (props.modifyPosition) {
302
- finalPos = props.modifyPosition(finalPos, el, popup, bg, space);
303
- }
304
- pos.value = finalPos;
305
- lastButtonElPos = el;
306
- });
307
- };
308
- const show = () => {
309
- if (!isOpen) {
310
- isOpen = true;
311
- modelValue.value = isOpen;
312
- if (props.useBackdrop && props.useDialogForBackdrop) dialogEl.value?.showModal();
313
- recompute(true);
314
- }
315
- };
316
- const close = () => {
317
- if (isOpen) {
318
- const res = props.canClose ?? false;
319
- emit("close");
320
- if (res === false) return;
321
- isOpen = false;
322
- modelValue.value = isOpen;
323
- pos.value.maxWidth = void 0;
324
- if (props.useBackdrop && props.useDialogForBackdrop) dialogEl.value?.close();
325
- }
326
- };
327
- const recomputeListener = () => recompute();
328
- const bindListeners = () => {
329
- window.addEventListener("resize", recomputeListener);
330
- window.addEventListener("scroll", recomputeListener, true);
331
- };
332
- const unbindListeners = () => {
333
- window.removeEventListener("resize", recomputeListener);
334
- window.removeEventListener("scroll", recomputeListener, true);
335
- };
336
- watch([modelValue, popupEl], () => {
337
- if (modelValue.value) {
338
- show();
339
- bindListeners();
340
- } else {
341
- close();
342
- unbindListeners();
343
- }
344
- });
345
- const handleMouseup = ($event) => {
346
- $event.preventDefault();
347
- close();
348
- };
349
- onMounted(() => {
350
- recompute();
351
- });
352
- defineExpose({
353
- recompute,
354
- setReference: (el) => {
355
- buttonEl.value = el;
356
- },
357
- setBackground: (el) => {
358
- backgroundEl.value = el;
359
- }
360
- });
361
- </script>
362
-
363
- <script>
364
-
365
- </script>
@@ -1,46 +0,0 @@
1
- import { type HTMLAttributes } from "vue";
2
- import { type LinkableByIdProps, type TailwindClassProp, type PopupProps } from "../shared/props.js";
3
- import type { IPopupReference } from "../../types/index.js";
4
- type RealProps = LinkableByIdProps & PopupProps;
5
- interface Props extends
6
- /** @vue-ignore */
7
- Partial<Omit<HTMLAttributes, "class"> & TailwindClassProp>, RealProps {
8
- }
9
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
10
- modelValue?: boolean;
11
- }, {
12
- recompute: (force?: boolean) => void;
13
- setReference: (el: IPopupReference | null) => void;
14
- setBackground: (el: IPopupReference | null) => void;
15
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
- "update:modelValue": (value: boolean) => any;
17
- } & {
18
- close: () => any;
19
- }, string, import("vue").PublicProps, Readonly<Props & {
20
- modelValue?: boolean;
21
- }> & Readonly<{
22
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
23
- onClose?: (() => any) | undefined;
24
- }>, {
25
- canClose: boolean;
26
- useDialogForBackdrop: false;
27
- useBackdrop: boolean;
28
- preferredHorizontal: ("center" | "right" | "left" | "either" | "center-screen" | "right-most" | "left-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
29
- preferredVertical: ("top" | "bottom" | "center" | "either" | "center-screen" | "top-most" | "bottom-most" | "center-most")[] | import("../../main.lib.js").PopupPositioner;
30
- avoidRepositioning: boolean;
31
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
32
- button?: (props: {
33
- extractEl: (_: any) => any;
34
- }) => any;
35
- } & {
36
- popup?: (props: {
37
- position: any;
38
- extractEl: (_: any) => any;
39
- }) => any;
40
- }>;
41
- export default _default;
42
- type __VLS_WithSlots<T, S> = T & {
43
- new (): {
44
- $slots: S;
45
- };
46
- };
@@ -1,169 +0,0 @@
1
- <template>
2
- <Transition>
3
- <div
4
- v-if="!hide"
5
- :id="id ?? fallbackId"
6
- :class="twMerge(`
7
- progress-bar
8
- w-[200px]
9
- whitespace-nowrap
10
- overflow-x-scroll
11
- scrollbar-hidden
12
- rounded-sm
13
- flex
14
- text-fg
15
- relative
16
- before:content-['']
17
- text-sm
18
- min-w-[50px]
19
- after:shadow-inner
20
- after:shadow-black/50
21
- after:content-['']
22
- after:absolute
23
- after:inset-0
24
- after:pointer-events-none
25
- after:z-2
26
- after:transition-all
27
- before:shadow-inner
28
- before:shadow-black/50
29
- before:rounded-sm
30
- before:bg-bars-gradient
31
- before:animate-slideBgInf
32
- before:[background-size:15px_15px]
33
- before:absolute
34
- before:w-[var(--progress)]
35
- before:top-0 before:bottom-0 before:left-0
36
- before:transition-all
37
- before:z-1
38
- before:duration-500
39
- `, psuedoHide && `
40
- after:opacity-0
41
- before:opacity-0
42
- `, $attrs.class)"
43
- :data-value="progress"
44
- :title="label"
45
- role="progressbar"
46
- :aria-valuenow="clampVal(progress, clamp[0] ?? 0, clamp[1] ?? 100)"
47
- :aria-valuemin="clamp[0] ?? 0"
48
- :aria-valuemax="clamp[1] ?? 100"
49
- v-bind="{ ...$attrs, class: void 0 }"
50
- :style="`--progress: ${clampVal(progress, clamp[0] ?? 0, clamp[1] ?? 100)}%;`"
51
- >
52
- <div class="procgress-bar--label-wrapper relative flex-1">
53
- <span class="before:content-vertical-holder"/>
54
- <Transition>
55
- <slot>
56
- <label
57
- v-if="!psuedoHide"
58
- :for="id"
59
- class="
60
- text-bg
61
- absolute inset-0 flex
62
- justify-center
63
- "
64
- >
65
- <div class="truncate">
66
- {{ label ?? "" }}
67
- </div>
68
- </label>
69
- </slot>
70
- </Transition>
71
-
72
- <Transition>
73
- <slot>
74
- <label
75
- v-if="!psuedoHide"
76
- class="
77
- progress-bar--label
78
- contrast-label
79
- pointer-events-none
80
- absolute
81
- inset-0
82
- flex justify-center transition-all
83
- duration-500
84
- [clip-path:inset(0_0_0_var(--progress))]
85
- dark:hidden
86
- "
87
- >
88
- <div class="truncate">
89
- {{ label ?? "" }}
90
- </div>
91
- </label>
92
- </slot>
93
- </Transition>
94
- </div>
95
- </div>
96
- </Transition>
97
- </template>
98
-
99
- <script setup>
100
- import { ref, watch } from "vue";
101
- import { twMerge } from "../../utils/twMerge.js";
102
- import { getFallbackId } from "../shared/props.js";
103
- const clampVal = (n, min, max) => Math.min(Math.max(n, min), max);
104
- defineOptions({
105
- name: "LibProgressBar",
106
- inheritAttrs: false
107
- });
108
- const fallbackId = getFallbackId();
109
- const props = defineProps({
110
- id: { type: String, required: false },
111
- disabled: { type: Boolean, required: false, default: false },
112
- readonly: { type: Boolean, required: false, default: false },
113
- border: { type: Boolean, required: false, default: true },
114
- unstyle: { type: Boolean, required: false, default: false },
115
- label: { type: String, required: false },
116
- progress: { type: Number, required: true },
117
- autohideOnComplete: { type: Number, required: false, default: -1 },
118
- keepSpaceWhenHidden: { type: Boolean, required: false, default: false },
119
- clamp: { type: Array, required: false, default: () => [0, 100] }
120
- });
121
- const hide = ref(false);
122
- const psuedoHide = ref(false);
123
- let timeout;
124
- let type;
125
- if (props.autohideOnComplete > -1 && (props.progress >= 100 || props.progress < 0)) {
126
- if (props.keepSpaceWhenHidden) {
127
- hide.value = false;
128
- psuedoHide.value = true;
129
- } else {
130
- hide.value = true;
131
- psuedoHide.value = false;
132
- }
133
- }
134
- watch([
135
- () => props.progress,
136
- () => props.keepSpaceWhenHidden,
137
- () => props.autohideOnComplete
138
- ], () => {
139
- if (props.autohideOnComplete > -1 && (props.progress >= 100 || props.progress < 0)) {
140
- if (props.keepSpaceWhenHidden) {
141
- if (type === 1) return;
142
- clearTimeout(timeout);
143
- type = 1;
144
- timeout = setTimeout(() => {
145
- type = 0;
146
- hide.value = false;
147
- psuedoHide.value = true;
148
- }, props.autohideOnComplete);
149
- } else {
150
- if (type === 2) return;
151
- clearTimeout(timeout);
152
- type = 2;
153
- timeout = setTimeout(() => {
154
- type = 0;
155
- hide.value = true;
156
- psuedoHide.value = false;
157
- }, props.autohideOnComplete);
158
- }
159
- } else {
160
- clearTimeout(timeout);
161
- hide.value = false;
162
- psuedoHide.value = false;
163
- }
164
- }, { immediate: false });
165
- </script>
166
-
167
- <script>
168
-
169
- </script>
@@ -1,35 +0,0 @@
1
- import { type InputHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
- type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
4
- placeholder?: InputHTMLAttributes["placeholder"];
5
- disabled?: InputHTMLAttributes["disabled"];
6
- id?: InputHTMLAttributes["id"];
7
- type?: InputHTMLAttributes["type"];
8
- valid?: boolean;
9
- };
10
- interface Props extends
11
- /** @vue-ignore */
12
- Partial<Omit<InputHTMLAttributes, "class" | "readonly" | "disabled" | "onSubmit" | "onInput"> & TailwindClassProp>, RealProps {
13
- }
14
- declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
15
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
16
- readonly onInput?: ((val: InputEvent) => any) | undefined;
17
- readonly onSubmit?: ((val: T) => any) | undefined;
18
- readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
19
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onInput" | "onSubmit" | "onUpdate:modelValue"> & (Props & {
20
- modelValue: T;
21
- }) & {}> & import("vue").PublicProps;
22
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
23
- attrs: any;
24
- slots: {};
25
- emit: {
26
- (e: "submit", val: T): void;
27
- (e: "input", val: InputEvent): void;
28
- } & ((evt: "update:modelValue", value: T) => void);
29
- }>) => import("vue").VNode & {
30
- __ctx?: Awaited<typeof __VLS_setup>;
31
- };
32
- export default _default;
33
- type __VLS_PrettifyLocal<T> = {
34
- [K in keyof T as K]: T[K];
35
- } & {};
@@ -1,35 +0,0 @@
1
- import { type InputHTMLAttributes } from "vue";
2
- import { type BaseInteractiveProps, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js";
3
- type RealProps = LinkableByIdProps & LabelProps & BaseInteractiveProps & {
4
- placeholder?: InputHTMLAttributes["placeholder"];
5
- disabled?: InputHTMLAttributes["disabled"];
6
- id?: InputHTMLAttributes["id"];
7
- type?: InputHTMLAttributes["type"];
8
- valid?: boolean;
9
- };
10
- interface Props extends
11
- /** @vue-ignore */
12
- Partial<Omit<InputHTMLAttributes, "class" | "readonly" | "disabled" | "onSubmit" | "onInput"> & TailwindClassProp>, RealProps {
13
- }
14
- declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
15
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
16
- readonly onInput?: ((val: InputEvent) => any) | undefined;
17
- readonly onSubmit?: ((val: T) => any) | undefined;
18
- readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
19
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onInput" | "onSubmit" | "onUpdate:modelValue"> & (Props & {
20
- modelValue: T;
21
- }) & {}> & import("vue").PublicProps;
22
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
23
- attrs: any;
24
- slots: {};
25
- emit: {
26
- (e: "submit", val: T): void;
27
- (e: "input", val: InputEvent): void;
28
- } & ((evt: "update:modelValue", value: T) => void);
29
- }>) => import("vue").VNode & {
30
- __ctx?: Awaited<typeof __VLS_setup>;
31
- };
32
- export default _default;
33
- type __VLS_PrettifyLocal<T> = {
34
- [K in keyof T as K]: T[K];
35
- } & {};