@firstnoodle-ui/bui 0.0.28 → 0.0.29

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 (318) hide show
  1. package/dist/bui.css +1 -1
  2. package/dist/components/horizontal-layout/Aside.vue.d.ts +2 -6
  3. package/dist/components/index.d.ts +1 -0
  4. package/dist/components/modal/Modal.vue.d.ts +9 -3
  5. package/dist/components/tree-list/InputNode.vue.d.ts +90 -0
  6. package/dist/components/tree-list/TreeList.vue.d.ts +27 -0
  7. package/dist/components/tree-list/index.d.ts +2 -0
  8. package/dist/components/tree-list/types.d.ts +14 -0
  9. package/dist/index.mjs +6595 -6371
  10. package/package.json +22 -11
  11. package/src/components/application-wrapper/ApplicationWrapper.vue +0 -8
  12. package/src/components/application-wrapper/index.ts +0 -1
  13. package/src/components/aside-section-label/AsideSectionLabel.vue +0 -16
  14. package/src/components/aside-section-label/index.ts +0 -1
  15. package/src/components/button/Button.vue +0 -246
  16. package/src/components/button/NotificationBadge.vue +0 -15
  17. package/src/components/button/components/button-label/ButtonLabel.vue +0 -9
  18. package/src/components/button/components/button-label/index.ts +0 -1
  19. package/src/components/button/components/index.ts +0 -3
  20. package/src/components/button/components/left-group/LeftGroup.vue +0 -5
  21. package/src/components/button/components/left-group/index.ts +0 -1
  22. package/src/components/button/components/notification-badge/NotificationBadge.vue +0 -17
  23. package/src/components/button/components/notification-badge/index.ts +0 -1
  24. package/src/components/button/index.ts +0 -1
  25. package/src/components/button-group/ButtonGroup.vue +0 -97
  26. package/src/components/button-group/index.ts +0 -1
  27. package/src/components/calendar-view/CalendarView.vue +0 -106
  28. package/src/components/calendar-view/components/DateButton.vue +0 -23
  29. package/src/components/calendar-view/components/DecadeView.vue +0 -50
  30. package/src/components/calendar-view/components/MonthView.vue +0 -72
  31. package/src/components/calendar-view/components/NavButton.vue +0 -16
  32. package/src/components/calendar-view/components/YearView.vue +0 -52
  33. package/src/components/calendar-view/composables/useCalendar.ts +0 -138
  34. package/src/components/calendar-view/index.ts +0 -1
  35. package/src/components/calendar-view/utils/enums.ts +0 -31
  36. package/src/components/calendar-view/utils/index.ts +0 -240
  37. package/src/components/calendar-view/utils/types.ts +0 -13
  38. package/src/components/calendar-view/utils/utils/calendar.ts +0 -70
  39. package/src/components/calendar-view/utils/utils/date.ts +0 -130
  40. package/src/components/calendar-view/utils/utils/format.ts +0 -61
  41. package/src/components/calendar-view/utils/utils/time.ts +0 -70
  42. package/src/components/checkbox/Checkbox.vue +0 -51
  43. package/src/components/checkbox/CircleIndicator.vue +0 -26
  44. package/src/components/checkbox/DefaultIndicator.vue +0 -19
  45. package/src/components/checkbox/index.ts +0 -1
  46. package/src/components/collapse/Collapse.vue +0 -114
  47. package/src/components/collapse/index.ts +0 -1
  48. package/src/components/confirm-cancel/ConfirmCancel.vue +0 -66
  49. package/src/components/confirm-cancel/index.ts +0 -1
  50. package/src/components/confirm-cancel/types.ts +0 -18
  51. package/src/components/content-slider/ContentSlider.vue +0 -79
  52. package/src/components/content-slider/index.ts +0 -1
  53. package/src/components/data-point/DataPoint.vue +0 -5
  54. package/src/components/data-point/index.ts +0 -1
  55. package/src/components/delete-button/DeleteButton.vue +0 -19
  56. package/src/components/delete-button/index.ts +0 -1
  57. package/src/components/dialog/Dialog.vue +0 -70
  58. package/src/components/dialog/index.ts +0 -1
  59. package/src/components/fade-in-up/FadeInUp.vue +0 -17
  60. package/src/components/fade-in-up/index.ts +0 -1
  61. package/src/components/filter-chip/FilterChip.vue +0 -28
  62. package/src/components/filter-chip/index.ts +0 -1
  63. package/src/components/first-paint/FirstPaint.vue +0 -21
  64. package/src/components/first-paint/index.ts +0 -1
  65. package/src/components/first-paint/style.scss +0 -23
  66. package/src/components/flexbox/Flexbox.vue +0 -51
  67. package/src/components/flexbox/index.ts +0 -1
  68. package/src/components/horizontal-layout/Aside.vue +0 -114
  69. package/src/components/horizontal-layout/HorizontalLayout.vue +0 -118
  70. package/src/components/horizontal-layout/index.ts +0 -2
  71. package/src/components/icon/Icon.vue +0 -1263
  72. package/src/components/icon/index.ts +0 -1
  73. package/src/components/icon/utils/combine-svgs.cjs +0 -55
  74. package/src/components/icon/utils/combined-svgs.txt +0 -1150
  75. package/src/components/icon/utils/svgs/admin.svg +0 -16
  76. package/src/components/icon/utils/svgs/arrow-deviate.svg +0 -3
  77. package/src/components/icon/utils/svgs/arrow-down-plus.svg +0 -4
  78. package/src/components/icon/utils/svgs/arrow-down.svg +0 -3
  79. package/src/components/icon/utils/svgs/arrow-from.svg +0 -3
  80. package/src/components/icon/utils/svgs/arrow-left.svg +0 -3
  81. package/src/components/icon/utils/svgs/arrow-move.svg +0 -15
  82. package/src/components/icon/utils/svgs/arrow-right.svg +0 -3
  83. package/src/components/icon/utils/svgs/arrow-sub.svg +0 -3
  84. package/src/components/icon/utils/svgs/arrow-trend.svg +0 -15
  85. package/src/components/icon/utils/svgs/arrow-up-plus.svg +0 -4
  86. package/src/components/icon/utils/svgs/arrow-up.svg +0 -3
  87. package/src/components/icon/utils/svgs/authority.svg +0 -5
  88. package/src/components/icon/utils/svgs/beams.svg +0 -5
  89. package/src/components/icon/utils/svgs/bell.svg +0 -15
  90. package/src/components/icon/utils/svgs/bold.svg +0 -3
  91. package/src/components/icon/utils/svgs/box.svg +0 -5
  92. package/src/components/icon/utils/svgs/building.svg +0 -15
  93. package/src/components/icon/utils/svgs/bullet-list.svg +0 -8
  94. package/src/components/icon/utils/svgs/calendar.svg +0 -21
  95. package/src/components/icon/utils/svgs/camera.svg +0 -5
  96. package/src/components/icon/utils/svgs/categories.svg +0 -3
  97. package/src/components/icon/utils/svgs/check-circled.svg +0 -16
  98. package/src/components/icon/utils/svgs/check-outline.svg +0 -15
  99. package/src/components/icon/utils/svgs/check.svg +0 -3
  100. package/src/components/icon/utils/svgs/chevron-down.svg +0 -3
  101. package/src/components/icon/utils/svgs/chevron-left-double.svg +0 -4
  102. package/src/components/icon/utils/svgs/chevron-left.svg +0 -3
  103. package/src/components/icon/utils/svgs/chevron-right-double.svg +0 -4
  104. package/src/components/icon/utils/svgs/chevron-right.svg +0 -3
  105. package/src/components/icon/utils/svgs/chevron-up.svg +0 -3
  106. package/src/components/icon/utils/svgs/clock.svg +0 -4
  107. package/src/components/icon/utils/svgs/close-outline.svg +0 -3
  108. package/src/components/icon/utils/svgs/close.svg +0 -3
  109. package/src/components/icon/utils/svgs/columns.svg +0 -3
  110. package/src/components/icon/utils/svgs/conclusion.svg +0 -17
  111. package/src/components/icon/utils/svgs/copy.svg +0 -16
  112. package/src/components/icon/utils/svgs/crosshair.svg +0 -15
  113. package/src/components/icon/utils/svgs/dash.svg +0 -3
  114. package/src/components/icon/utils/svgs/dashboard.svg +0 -3
  115. package/src/components/icon/utils/svgs/delete.svg +0 -4
  116. package/src/components/icon/utils/svgs/delta.svg +0 -3
  117. package/src/components/icon/utils/svgs/download.svg +0 -3
  118. package/src/components/icon/utils/svgs/drag.svg +0 -8
  119. package/src/components/icon/utils/svgs/drilldown.svg +0 -8
  120. package/src/components/icon/utils/svgs/edit.svg +0 -16
  121. package/src/components/icon/utils/svgs/envelope.svg +0 -3
  122. package/src/components/icon/utils/svgs/error.svg +0 -3
  123. package/src/components/icon/utils/svgs/export-document.svg +0 -16
  124. package/src/components/icon/utils/svgs/filter.svg +0 -6
  125. package/src/components/icon/utils/svgs/filters.svg +0 -4
  126. package/src/components/icon/utils/svgs/flag.svg +0 -3
  127. package/src/components/icon/utils/svgs/folder.svg +0 -15
  128. package/src/components/icon/utils/svgs/frequency.svg +0 -3
  129. package/src/components/icon/utils/svgs/fullscreen-off.svg +0 -3
  130. package/src/components/icon/utils/svgs/fullscreen-on.svg +0 -3
  131. package/src/components/icon/utils/svgs/graduate.svg +0 -3
  132. package/src/components/icon/utils/svgs/hamburger.svg +0 -5
  133. package/src/components/icon/utils/svgs/handshake.svg +0 -15
  134. package/src/components/icon/utils/svgs/heading-1.svg +0 -4
  135. package/src/components/icon/utils/svgs/heading-2.svg +0 -4
  136. package/src/components/icon/utils/svgs/heading.svg +0 -3
  137. package/src/components/icon/utils/svgs/home.svg +0 -3
  138. package/src/components/icon/utils/svgs/id-card.svg +0 -6
  139. package/src/components/icon/utils/svgs/id.svg +0 -4
  140. package/src/components/icon/utils/svgs/indent-left.svg +0 -7
  141. package/src/components/icon/utils/svgs/indent-right.svg +0 -7
  142. package/src/components/icon/utils/svgs/information.svg +0 -17
  143. package/src/components/icon/utils/svgs/italics.svg +0 -3
  144. package/src/components/icon/utils/svgs/itenary.svg +0 -11
  145. package/src/components/icon/utils/svgs/keyboard.svg +0 -11
  146. package/src/components/icon/utils/svgs/lightning.svg +0 -15
  147. package/src/components/icon/utils/svgs/link.svg +0 -4
  148. package/src/components/icon/utils/svgs/list-collapse.svg +0 -6
  149. package/src/components/icon/utils/svgs/list-expand.svg +0 -6
  150. package/src/components/icon/utils/svgs/location.svg +0 -4
  151. package/src/components/icon/utils/svgs/lock-locked.svg +0 -4
  152. package/src/components/icon/utils/svgs/lock-unlocked.svg +0 -4
  153. package/src/components/icon/utils/svgs/magnifying-glass.svg +0 -15
  154. package/src/components/icon/utils/svgs/map.svg +0 -3
  155. package/src/components/icon/utils/svgs/megaphone.svg +0 -3
  156. package/src/components/icon/utils/svgs/message.svg +0 -15
  157. package/src/components/icon/utils/svgs/microscope.svg +0 -3
  158. package/src/components/icon/utils/svgs/moon.svg +0 -3
  159. package/src/components/icon/utils/svgs/new-document.svg +0 -4
  160. package/src/components/icon/utils/svgs/news.svg +0 -15
  161. package/src/components/icon/utils/svgs/numbered-list.svg +0 -7
  162. package/src/components/icon/utils/svgs/open-link.svg +0 -16
  163. package/src/components/icon/utils/svgs/options.svg +0 -5
  164. package/src/components/icon/utils/svgs/page.svg +0 -7
  165. package/src/components/icon/utils/svgs/paper-plane.svg +0 -15
  166. package/src/components/icon/utils/svgs/paper.svg +0 -3
  167. package/src/components/icon/utils/svgs/pen-and-paper.svg +0 -4
  168. package/src/components/icon/utils/svgs/phase.svg +0 -15
  169. package/src/components/icon/utils/svgs/photo.svg +0 -4
  170. package/src/components/icon/utils/svgs/pie-chart.svg +0 -3
  171. package/src/components/icon/utils/svgs/plus.svg +0 -3
  172. package/src/components/icon/utils/svgs/point-left.svg +0 -3
  173. package/src/components/icon/utils/svgs/point-up.svg +0 -3
  174. package/src/components/icon/utils/svgs/popup.svg +0 -16
  175. package/src/components/icon/utils/svgs/question.svg +0 -17
  176. package/src/components/icon/utils/svgs/radio-tower.svg +0 -3
  177. package/src/components/icon/utils/svgs/recycle.svg +0 -3
  178. package/src/components/icon/utils/svgs/redo.svg +0 -3
  179. package/src/components/icon/utils/svgs/refresh.svg +0 -3
  180. package/src/components/icon/utils/svgs/route.svg +0 -3
  181. package/src/components/icon/utils/svgs/rows.svg +0 -3
  182. package/src/components/icon/utils/svgs/scope.svg +0 -7
  183. package/src/components/icon/utils/svgs/settings.svg +0 -16
  184. package/src/components/icon/utils/svgs/share.svg +0 -11
  185. package/src/components/icon/utils/svgs/sign-in.svg +0 -4
  186. package/src/components/icon/utils/svgs/sign-up.svg +0 -3
  187. package/src/components/icon/utils/svgs/sort-down.svg +0 -20
  188. package/src/components/icon/utils/svgs/sort-up.svg +0 -20
  189. package/src/components/icon/utils/svgs/sort.svg +0 -7
  190. package/src/components/icon/utils/svgs/square-solid.svg +0 -3
  191. package/src/components/icon/utils/svgs/star-solid.svg +0 -15
  192. package/src/components/icon/utils/svgs/star.svg +0 -15
  193. package/src/components/icon/utils/svgs/stop-watch.svg +0 -5
  194. package/src/components/icon/utils/svgs/structure.svg +0 -3
  195. package/src/components/icon/utils/svgs/sun.svg +0 -23
  196. package/src/components/icon/utils/svgs/table.svg +0 -3
  197. package/src/components/icon/utils/svgs/tag.svg +0 -15
  198. package/src/components/icon/utils/svgs/team.svg +0 -15
  199. package/src/components/icon/utils/svgs/telescope.svg +0 -15
  200. package/src/components/icon/utils/svgs/trash.svg +0 -6
  201. package/src/components/icon/utils/svgs/triangle-angle.svg +0 -3
  202. package/src/components/icon/utils/svgs/triangle-side.svg +0 -3
  203. package/src/components/icon/utils/svgs/underline.svg +0 -4
  204. package/src/components/icon/utils/svgs/undo.svg +0 -3
  205. package/src/components/icon/utils/svgs/user.svg +0 -16
  206. package/src/components/icon/utils/svgs/venn.svg +0 -3
  207. package/src/components/icon/utils/svgs/video.svg +0 -3
  208. package/src/components/icon/utils/svgs/visibility-off-alt.svg +0 -19
  209. package/src/components/icon/utils/svgs/visibility-off.svg +0 -3
  210. package/src/components/icon/utils/svgs/visibility-on.svg +0 -16
  211. package/src/components/icon/utils/svgs/warning.svg +0 -5
  212. package/src/components/index.ts +0 -45
  213. package/src/components/input/Input.vue +0 -118
  214. package/src/components/input/index.ts +0 -1
  215. package/src/components/input-number/InputNumber.vue +0 -112
  216. package/src/components/input-number/StepButton.vue +0 -23
  217. package/src/components/input-number/index.ts +0 -1
  218. package/src/components/load-spinner/LoadSpinner.vue +0 -13
  219. package/src/components/load-spinner/index.ts +0 -1
  220. package/src/components/modal/Modal.vue +0 -111
  221. package/src/components/modal/index.ts +0 -1
  222. package/src/components/nav-item/NavItem.vue +0 -62
  223. package/src/components/nav-item/index.ts +0 -1
  224. package/src/components/notification/Notification.vue +0 -53
  225. package/src/components/notification/index.ts +0 -1
  226. package/src/components/notification-badge/NotificationBadge.vue +0 -7
  227. package/src/components/notification-badge/index.ts +0 -1
  228. package/src/components/pagination/Pagination.vue +0 -65
  229. package/src/components/pagination/index.ts +0 -1
  230. package/src/components/pop-confirm/PopConfirm.vue +0 -90
  231. package/src/components/pop-confirm/index.ts +0 -1
  232. package/src/components/pop-select/FooterButton.vue +0 -5
  233. package/src/components/pop-select/PopSelect.vue +0 -346
  234. package/src/components/pop-select/ResultFilters.vue +0 -28
  235. package/src/components/pop-select/enums.ts +0 -7
  236. package/src/components/pop-select/index.ts +0 -2
  237. package/src/components/pop-select/option.vue +0 -51
  238. package/src/components/popper/Popper.vue +0 -239
  239. package/src/components/popper/PopperContent.vue +0 -5
  240. package/src/components/popper/index.ts +0 -2
  241. package/src/components/popper/middleware.ts +0 -19
  242. package/src/components/screen-overlay/ScreenOverlay.vue +0 -53
  243. package/src/components/screen-overlay/index.ts +0 -1
  244. package/src/components/scrollbar/Bar.vue +0 -106
  245. package/src/components/scrollbar/ScrollBottomLoader.vue +0 -25
  246. package/src/components/scrollbar/Scrollbar.vue +0 -219
  247. package/src/components/scrollbar/enums.ts +0 -23
  248. package/src/components/scrollbar/index.ts +0 -3
  249. package/src/components/scrollbar/style.scss +0 -77
  250. package/src/components/scrollbar/types.ts +0 -32
  251. package/src/components/select-list/SelectList.vue +0 -476
  252. package/src/components/select-list/components/SelectListFilterChip.vue +0 -34
  253. package/src/components/select-list/components/index.ts +0 -3
  254. package/src/components/select-list/components/option-group/OptionGroup.vue +0 -20
  255. package/src/components/select-list/components/option-group/index.ts +0 -1
  256. package/src/components/select-list/components/select-list-option/SelectListOption.vue +0 -83
  257. package/src/components/select-list/components/select-list-option/index.ts +0 -1
  258. package/src/components/select-list/components/status-cards/error-card/ErrorCard.vue +0 -17
  259. package/src/components/select-list/components/status-cards/error-card/index.ts +0 -1
  260. package/src/components/select-list/components/status-cards/idle-card/IdleCard.vue +0 -11
  261. package/src/components/select-list/components/status-cards/idle-card/index.ts +0 -1
  262. package/src/components/select-list/components/status-cards/index.ts +0 -4
  263. package/src/components/select-list/components/status-cards/loading-card/LoadingCard.vue +0 -10
  264. package/src/components/select-list/components/status-cards/loading-card/index.ts +0 -1
  265. package/src/components/select-list/components/status-cards/no-match-card/NoMatchCard.vue +0 -15
  266. package/src/components/select-list/components/status-cards/no-match-card/index.ts +0 -1
  267. package/src/components/select-list/components/status-cards/status-card/StatusCard.vue +0 -25
  268. package/src/components/select-list/components/status-cards/status-card/index.ts +0 -1
  269. package/src/components/select-list/index.ts +0 -5
  270. package/src/components/select-list/types.ts +0 -49
  271. package/src/components/side-over/SideOver.vue +0 -87
  272. package/src/components/side-over/index.ts +0 -1
  273. package/src/components/status-select/StatusIndicator.vue +0 -78
  274. package/src/components/status-select/StatusSelect.vue +0 -62
  275. package/src/components/status-select/index.ts +0 -1
  276. package/src/components/switch/Switch.vue +0 -52
  277. package/src/components/switch/index.ts +0 -1
  278. package/src/components/tab/Tab.vue +0 -65
  279. package/src/components/tab/index.ts +0 -1
  280. package/src/components/tag/Tag.vue +0 -34
  281. package/src/components/tag/index.ts +0 -1
  282. package/src/components/text-editor/TextEditor.vue +0 -399
  283. package/src/components/text-editor/components/Dialog.vue +0 -11
  284. package/src/components/text-editor/components/FormattingButton.vue +0 -46
  285. package/src/components/text-editor/components/InsertLinkDialog.vue +0 -81
  286. package/src/components/text-editor/components/InsertTextDialog.vue +0 -36
  287. package/src/components/text-editor/components/index.ts +0 -3
  288. package/src/components/text-editor/index.ts +0 -1
  289. package/src/components/text-highlight/TextHighlight.vue +0 -113
  290. package/src/components/text-highlight/index.ts +0 -1
  291. package/src/components/text-viewer/TextViewer.vue +0 -5
  292. package/src/components/text-viewer/index.ts +0 -1
  293. package/src/components/toggle-button/ToggleButton.vue +0 -105
  294. package/src/components/toggle-button/index.ts +0 -1
  295. package/src/components/tooltip/Tooltip.vue +0 -54
  296. package/src/components/tooltip/index.ts +0 -1
  297. package/src/components/types.ts +0 -232
  298. package/src/components/vertical-layout/RunningSection.vue +0 -54
  299. package/src/components/vertical-layout/VerticalLayout.vue +0 -37
  300. package/src/components/vertical-layout/index.ts +0 -3
  301. package/src/components/vertical-layout/types.ts +0 -2
  302. package/src/components/window-frame/WindowFrame.vue +0 -20
  303. package/src/components/window-frame/index.ts +0 -1
  304. package/src/composables/index.ts +0 -5
  305. package/src/composables/useClickOutside.ts +0 -48
  306. package/src/composables/useEscapeKey.ts +0 -12
  307. package/src/composables/useMounted.ts +0 -7
  308. package/src/composables/useNextFrame.ts +0 -10
  309. package/src/composables/useTrapFocus.ts +0 -61
  310. package/src/index.ts +0 -5
  311. package/src/main.css +0 -140
  312. package/src/utils/array.ts +0 -11
  313. package/src/utils/capitalizeFirstLetter.ts +0 -4
  314. package/src/utils/clamp.ts +0 -9
  315. package/src/utils/debounce.ts +0 -8
  316. package/src/utils/index.ts +0 -5
  317. package/src/utils/scrollIntoView.ts +0 -25
  318. package/src/utils/scrollbarWidth.ts +0 -27
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firstnoodle-ui/bui",
3
3
  "type": "module",
4
- "version": "0.0.28",
4
+ "version": "0.0.29",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
@@ -10,18 +10,29 @@
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./dist/index.d.ts",
13
- "import": "./dist/index.mjs"
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.mjs"
14
15
  },
15
- "./bui.css": {
16
- "default": "./dist/bui.css"
17
- }
16
+ "./components/*": {
17
+ "types": "./dist/components/*/index.d.ts",
18
+ "import": "./dist/components/*/index.d.ts"
19
+ },
20
+ "./composables/*": {
21
+ "types": "./dist/composables/*.d.ts",
22
+ "import": "./dist/composables/*.d.ts"
23
+ },
24
+ "./utils/*": {
25
+ "types": "./dist/utils/*.d.ts",
26
+ "import": "./dist/utils/*.d.ts"
27
+ },
28
+ "./bui.css": "./dist/bui.css",
29
+ "./package.json": "./package.json"
18
30
  },
19
31
  "main": "./dist/index.mjs",
32
+ "module": "dist/index.mjs",
20
33
  "types": "dist/index.d.ts",
21
34
  "files": [
22
- "dist",
23
- "dist/bui.css",
24
- "src"
35
+ "dist"
25
36
  ],
26
37
  "peerDependencies": {
27
38
  "tailwindcss": "^4.1.1",
@@ -60,14 +71,14 @@
60
71
  "tailwindcss": "^4.1.1",
61
72
  "typescript": "^5.8.2",
62
73
  "vite": "^6.2.4",
63
- "vite-plugin-dts": "^4.5.3",
74
+ "vite-plugin-dts": "^4.5.4",
64
75
  "vue": "^3.5.13",
65
76
  "vue-tsc": "^2.2.8"
66
77
  },
67
78
  "scripts": {
68
- "build": "vite build",
79
+ "build": "vite build && vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json",
69
80
  "typecheck": "vue-tsc -p tsconfig.app.json --noEmit",
70
81
  "watch": "vite build --watch",
71
- "release:publish": "pnpm publish --access public --otp=753040 --no-git-checks"
82
+ "release:publish": "pnpm publish --access public --otp=277115 --no-git-checks"
72
83
  }
73
84
  }
@@ -1,8 +0,0 @@
1
- <template>
2
- <main class="fixed top-0 left-0 w-screen h-screen overflow-hidden text-primary">
3
- <slot />
4
- <div id="modals" class="z-10 fixed w-screen h-screen top-0 left-0 pointer-events-none" />
5
- <div id="notifications" class="z-10 fixed w-screen h-screen top-0 left-0 pointer-events-none flex items-end justify-center p-12" />
6
- <div id="poppers" class="z-10 fixed w-screen h-screen top-0 left-0 pointer-events-none" />
7
- </main>
8
- </template>
@@ -1 +0,0 @@
1
- export { default as BApplicationWrapper } from "./ApplicationWrapper.vue";
@@ -1,16 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{ label: string }>();
3
- </script>
4
-
5
- <template>
6
- <section class="w-full space-y-4">
7
- <div class="w-full h-12 flex items-center">
8
- <p class="flex-none pr-2 text-xs leading-none font-medium text-secondary">
9
- {{ label }}
10
- </p>
11
- <div class="flex-1 h-full">
12
- <div class="w-full border-b border-default" style="height: 54%" />
13
- </div>
14
- </div>
15
- </section>
16
- </template>
@@ -1 +0,0 @@
1
- export { default as BAsideSectionLabel } from "./AsideSectionLabel.vue";
@@ -1,246 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Placement } from "@floating-ui/dom";
3
- import type { ButtonVariant, TIcon } from "../types";
4
- import { computed, ref } from "vue";
5
- import { BIcon, BLoadSpinner, BTooltip } from "../";
6
- import { ButtonLabel, LeftGroup, NotificationBadge } from "./components";
7
-
8
- const props = withDefaults(
9
- defineProps<{
10
- variant?: ButtonVariant;
11
- classes?: string;
12
- disabled?: boolean;
13
- fullwidth?: boolean;
14
- spaceBetween?: boolean;
15
- href?: string;
16
- icon?: TIcon;
17
- iconAfter?: TIcon;
18
- label?: string;
19
- linkTarget?: string;
20
- loading?: boolean;
21
- mailto?: string;
22
- notification?: boolean;
23
- rounded?: boolean;
24
- routerLinkTo?: string | { path: string } | { name: string };
25
- small?: boolean;
26
- focus?: boolean;
27
- stopPropagation?: boolean;
28
- tooltip?: string;
29
- tooltipDelay?: number;
30
- tooltipPlacement?: Placement;
31
- }>(),
32
- {
33
- variant: "fill",
34
- disabled: false,
35
- focus: false,
36
- fullwidth: false,
37
- spaceBetween: false,
38
- loading: false,
39
- notification: false,
40
- rounded: false,
41
- small: false,
42
- stopPropagation: false,
43
- tooltipDelay: 500,
44
- tooltipPlacement: "top",
45
- },
46
- );
47
-
48
- const emit = defineEmits(["click", "blur"]);
49
-
50
- const component = ref<string>(props.routerLinkTo ? "router-link" : "button");
51
- const buttonRef = ref<HTMLButtonElement>();
52
-
53
- const loadSpinnerClass = computed(() => {
54
- const classes = ["w-4 h-4"];
55
- if (props.variant === "fill" || props.variant === "destructive") {
56
- classes.push("text-light");
57
- }
58
- else if (props.variant === "outline" || props.variant === "text") {
59
- classes.push("text-blue-500");
60
- }
61
- else if (props.variant === "outlineSubtle" || props.variant === "textSubtle") {
62
- classes.push("text-slate-700 dark:text-slate-200");
63
- }
64
- return classes.join(" ");
65
- });
66
-
67
- const buttonClasses = computed(() => {
68
- const result = ["z-0 relative inline-flex items-center gap-1 leading-none border focus:z-10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-black dark:focus-visible:outline-white"];
69
-
70
- // Set padding x.
71
- // Add extra if rounded and there is a label
72
- props.rounded && props.label
73
- ? result.push(props.small ? "px-2" : "px-3")
74
- : result.push((props.loading || props.icon) && !props.label ? "px-0" : "px-2");
75
-
76
- props.small ? result.push("h-6 text-xs") : result.push("h-8 text-sm");
77
-
78
- if (props.icon && !props.label) {
79
- props.small ? result.push("w-6") : result.push("w-8");
80
- }
81
-
82
- props.disabled ? result.push("opacity-75 cursor-not-allowed") : result.push("cursor-pointer");
83
- props.fullwidth && result.push("w-full");
84
- result.push(props.spaceBetween ? "justify-between" : "justify-center");
85
-
86
- if (props.rounded) result.push("rounded-full");
87
- else result.push(props.small ? "rounded" : "rounded-lg");
88
-
89
- switch (props.variant) {
90
- case "fill":
91
- result.push(
92
- ...(props.focus
93
- ? ["text-white bg-blue-700 border-blue-700 dark:bg-blue-500 dark:border-blue-500"]
94
- : [
95
- "bg-blue-500 hover:bg-blue-600 focus-visible:bg-blue-600 active:bg-blue-700",
96
- "border border-blue-500 hover:border-blue-600 focus-visible:border-blue-600 active:border-blue-700",
97
- "text-white focus-visible:outline",
98
- "dark:bg-blue-700 dark:hover:bg-blue-600 focus-visible:bg-blue-600 dark:active:bg-blue-500",
99
- "border dark:border-blue-700 dark:hover:border-blue-600 focus-visible:border-blue-600 dark:active:border-blue-500",
100
- ]
101
- ),
102
- );
103
- break;
104
- case "outline":
105
- result.push(
106
- ...(props.focus
107
- ? ["bg-blue-200 border-blue-700 text-blue-700 dark:bg-blue-700 dark:border-blue-600 dark:text-white"]
108
- : [
109
- "hover:bg-blue-100 focus-visible:bg-blue-100 active:bg-blue-200",
110
- "border border-blue-500 hover:border-blue-600 focus-visible:border-blue-600 active:border-blue-700",
111
- "text-blue-500 hover:text-blue-600 focus-visible:text-blue-600 active:text-blue-700",
112
- "dark:hover:bg-blue-900 dark:focus-visible:bg-blue-900 dark:active:bg-blue-700",
113
- "dark:border-blue-500 dark:hover:border-blue-500 dark:focus-visible:border-blue-500 dark:active:border-blue-600",
114
- "dark:text-blue-500 dark:hover:text-blue-100 focus-visible:text-blue-100 dark:active:text-white",
115
- ]
116
- ),
117
- );
118
- break;
119
- case "outlineSubtle":
120
- result.push(
121
- ...(props.focus
122
- ? ["bg-slate-200 border-stone-500 text-slate-900 dark:bg-neutral-600 dark:border-stone-500 dark:text-white"]
123
- : [
124
- "hover:bg-slate-100 focus-visible:bg-slate-100 active:bg-slate-200",
125
- "border border-stone-300 hover:border-stone-400 focus-visible:border-stone-400 active:border-stone-500",
126
- "text-slate-700 hover:text-slate-800 focus-visible:text-slate-800 active:text-slate-900",
127
- "dark:hover:bg-neutral-700 focus-visible:bg-neutral-700 dark:active:bg-neutral-600",
128
- "dark:border-stone-700 dark:hover:border-stone-600 focus-visible:border-stone-600 dark:active:border-stone-500",
129
- "dark:text-slate-200 dark:hover:text-slate-100 focus-visible:text-slate-100 dark:active:text-white",
130
- ]
131
- ),
132
- );
133
- break;
134
- case "text":
135
- result.push(
136
- ...(props.focus
137
- ? ["border-none bg-blue-200 text-blue-700 dark:bg-blue-700 dark:text-white"]
138
- : [
139
- "hover:bg-blue-100 focus-visible:bg-blue-100 active:bg-blue-200",
140
- "border-none",
141
- "text-blue-500 hover:text-blue-600 focus-visible:text-blue-600 active:text-blue-700",
142
- "dark:hover:bg-blue-900 dark:focus-visible:bg-blue-900 dark:active:bg-blue-700",
143
- "dark:text-blue-500 dark:hover:text-blue-100 focus-visible:text-blue-100 dark:active:text-white",
144
- ]
145
- ),
146
- );
147
- break;
148
- case "textSubtle":
149
- result.push(
150
- ...(props.focus
151
- ? ["border-none bg-slate-200 text-slate-900 dark:bg-neutral-600 dark:text-white"]
152
- : [
153
- "hover:bg-slate-100 focus-visible:bg-slate-100 active:bg-slate-200",
154
- "border-none",
155
- "text-slate-700 hover:text-slate-800 focus-visible:text-slate-800 active:text-slate-900",
156
- "dark:hover:bg-neutral-700 focus-visible:bg-neutral-700 dark:active:bg-neutral-600",
157
- "dark:text-slate-200 dark:hover:text-slate-100 focus-visible:text-slate-100 dark:active:text-white",
158
- ]
159
- ),
160
- );
161
- break;
162
- case "destructive":
163
- result.push(
164
- ...(props.focus
165
- ? ["bg-red-800 border-red-800 text-white"]
166
- : [
167
- "bg-red-600 hover:bg-red-700 focus-visible:bg-red-700 active:bg-red-800",
168
- "border border-red-600 hover:border-red-700 focus-visible:border-red-700 active:border-red-800",
169
- "text-white",
170
- ]
171
- ),
172
- );
173
- break;
174
- }
175
-
176
- if (props.classes) result.push(props.classes);
177
-
178
- return result.filter(i => i).join(" ");
179
- });
180
-
181
- const disabledStyle = computed(() => {
182
- if (props.disabled) {
183
- return props.variant === "fill" || props.variant === "destructive" ? { filter: "grayscale(50%)" } : { background: "hsl(0 0% 90%)" };
184
- }
185
- return {};
186
- });
187
-
188
- const onClick = (event: MouseEvent) => {
189
- props.stopPropagation && event.stopPropagation();
190
-
191
- if (!props.disabled && !props.loading) {
192
- if (props.href) {
193
- window.open(props.href, "_blank");
194
- }
195
- if (props.mailto) window.open(`mailto:${props.mailto}`);
196
- emit("click");
197
- }
198
- };
199
-
200
- const focus = () => buttonRef.value!.focus();
201
-
202
- defineExpose({ focus });
203
- </script>
204
-
205
- <template>
206
- <BTooltip v-if="tooltip" hover :text="tooltip" :delay="tooltipDelay" :placement="tooltipPlacement" :trigger-full-width="fullwidth">
207
- <component
208
- :is="component"
209
- ref="buttonRef"
210
- :to="routerLinkTo"
211
- :class="buttonClasses"
212
- :disabled="disabled || loading"
213
- :style="disabledStyle"
214
- @click="onClick"
215
- @blur="emit('blur')"
216
- >
217
- <LeftGroup>
218
- <BLoadSpinner v-if="loading" :class="loadSpinnerClass" />
219
- <BIcon v-else-if="icon" :name="icon" />
220
- <ButtonLabel v-if="label" :label="label" />
221
- </LeftGroup>
222
- <BIcon v-if="iconAfter" :name="iconAfter" class="opacity-75" />
223
- <NotificationBadge v-if="notification" :inside="variant === 'text' || variant === 'textSubtle'" />
224
- </component>
225
- </BTooltip>
226
- <component
227
- :is="component"
228
- v-else
229
- ref="buttonRef"
230
- :to="routerLinkTo"
231
- :target="props.linkTarget"
232
- :class="buttonClasses"
233
- :disabled="disabled || loading"
234
- :style="disabledStyle"
235
- @click="onClick"
236
- @blur="emit('blur')"
237
- >
238
- <LeftGroup>
239
- <BLoadSpinner v-if="loading" :class="loadSpinnerClass" />
240
- <BIcon v-else-if="icon" :name="icon" />
241
- <ButtonLabel v-if="label" :label="label" />
242
- </LeftGroup>
243
- <BIcon v-if="iconAfter" :name="iconAfter" />
244
- <NotificationBadge v-if="notification" :inside="variant === 'text' || variant === 'textSubtle'" />
245
- </component>
246
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{ inside?: boolean }>();
3
- </script>
4
-
5
- <template>
6
- <div
7
- class="absolute"
8
- :style="{
9
- top: inside ? '0.15em' : '-0.3em',
10
- right: inside ? '0.15em' : '-0.3em',
11
- }"
12
- >
13
- <div class="w-3 h-3 bg-orange-500 rounded-full border border-white dark:border-[var(--color-bg-primary)]" />
14
- </div>
15
- </template>
@@ -1,9 +0,0 @@
1
- <script setup lang="ts">
2
- defineProps<{ label: string }>();
3
- </script>
4
-
5
- <template>
6
- <div class="py-1 min-w-0 leading-none truncate">
7
- {{ label }}
8
- </div>
9
- </template>
@@ -1 +0,0 @@
1
- export { default as ButtonLabel } from "./ButtonLabel.vue";
@@ -1,3 +0,0 @@
1
- export * from "./button-label";
2
- export * from "./left-group";
3
- export * from "./notification-badge";
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="flex items-center gap-1 overflow-hidden">
3
- <slot />
4
- </div>
5
- </template>
@@ -1 +0,0 @@
1
- export { default as LeftGroup } from "./LeftGroup.vue";
@@ -1,17 +0,0 @@
1
- <script setup lang="ts">
2
- import { BNotificationBadge } from "../../../notification-badge";
3
-
4
- defineProps<{ inside?: boolean }>();
5
- </script>
6
-
7
- <template>
8
- <div
9
- class="absolute"
10
- :style="{
11
- top: inside ? '0.15em' : '-0.3em',
12
- right: inside ? '0.15em' : '-0.3em',
13
- }"
14
- >
15
- <BNotificationBadge />
16
- </div>
17
- </template>
@@ -1 +0,0 @@
1
- export { default as NotificationBadge } from "./NotificationBadge.vue";
@@ -1 +0,0 @@
1
- export { default as BButton } from "./Button.vue";
@@ -1,97 +0,0 @@
1
- <script setup lang="ts">
2
- import type { TButtonGroupOrientation } from "../types";
3
- import { onMounted, provide, ref } from "vue";
4
-
5
- const props = withDefaults(
6
- defineProps<{
7
- direction?: TButtonGroupOrientation;
8
- fullwidth?: boolean;
9
- }>(),
10
- {
11
- direction: "horizontal",
12
- fullwidth: false,
13
- },
14
- );
15
-
16
- const classes = ref<string>("");
17
- const buttonGroupRef = ref<HTMLDivElement>();
18
-
19
- provide("childOfButtonGroup", true);
20
-
21
- /**
22
- * We need to update (reapply) the classes whenever a button in the group is clicked,
23
- * as its classes from within the button component might be updated and thus the classes applied here will be overwritten
24
- */
25
- const update = () => {
26
- const result = [];
27
-
28
- props.fullwidth ? result.push("flex w-full") : result.push("inline-flex");
29
-
30
- if (props.direction === "vertical") {
31
- result.push("flex-col items-stretch");
32
- }
33
- else {
34
- result.push("items-center");
35
- }
36
-
37
- classes.value = result.join(" ");
38
-
39
- // add classes to immediate children of button group
40
- // the buttons inside the group might be wrapped in other elements if tooltip or popper is used
41
- if (buttonGroupRef.value) {
42
- Array.from(buttonGroupRef.value.children).forEach((child: Element, index: number) => {
43
- if (props.direction === "vertical") {
44
- child.classList.add("-mt-px");
45
- child.classList.add("first:mt-0");
46
-
47
- if (index === 0) {
48
- if (child.nodeName === "BUTTON") {
49
- child.classList.add("rounded-t-md");
50
- }
51
- else {
52
- child.querySelector("button")?.classList.add("rounded-t-md");
53
- }
54
- }
55
- else if (index === buttonGroupRef.value!.children.length - 1) {
56
- if (child.nodeName === "BUTTON") {
57
- child.classList.add("rounded-b-md");
58
- }
59
- else {
60
- child.querySelector("button")?.classList.add("rounded-b-md");
61
- }
62
- }
63
- }
64
- else {
65
- child.classList.add("-ml-px");
66
- child.classList.add("first:ml-0");
67
-
68
- // TODO: if child is button, do not query for it
69
- if (index === 0) {
70
- if (child.nodeName === "BUTTON") {
71
- child.classList.add("rounded-l-md");
72
- }
73
- else {
74
- child.querySelector("button")?.classList.add("rounded-l-md");
75
- }
76
- }
77
- else if (index === buttonGroupRef.value!.children.length - 1) {
78
- if (child.nodeName === "BUTTON") {
79
- child.classList.add("rounded-r-md");
80
- }
81
- else {
82
- child.querySelector("button")?.classList.add("rounded-r-md");
83
- }
84
- }
85
- }
86
- });
87
- }
88
- };
89
-
90
- onMounted(update);
91
- </script>
92
-
93
- <template>
94
- <div ref="buttonGroupRef" :class="classes" @click.stop.prevent="update">
95
- <slot />
96
- </div>
97
- </template>
@@ -1 +0,0 @@
1
- export { default as BButtonGroup } from "./ButtonGroup.vue";
@@ -1,106 +0,0 @@
1
- <script setup lang="ts">
2
- import type { CalendarGridItem } from "./utils/types.ts";
3
- import type { ReadableDateFormat } from "./utils/utils/format.ts";
4
- import { ref, toRef, watch } from "vue";
5
- import { loopRange } from "../../utils/array.ts";
6
- import { BButton } from "../button/index.ts";
7
- import DecadeView from "./components/DecadeView.vue";
8
- import MonthView from "./components/MonthView.vue";
9
- import YearView from "./components/YearView.vue";
10
- import { useCalendar, ViewType } from "./composables/useCalendar.ts";
11
-
12
- import { Weekday } from "./utils/enums.ts";
13
- import { formatDate } from "./utils/utils/format.ts";
14
-
15
- const props = withDefaults(defineProps<{
16
- value?: string | Date | null;
17
- clearable?: boolean;
18
- type?: "date" | "datetime";
19
- format?: ReadableDateFormat;
20
- weekStart?: number;
21
- disabledDates?: ((date: Date) => boolean)[];
22
- }>(), {
23
- value: null,
24
- clearable: false,
25
- type: "date",
26
- format: "readableDateWithDay",
27
- weekStart: 1,
28
- });
29
-
30
- const emit = defineEmits(["change"]);
31
-
32
- const {
33
- viewData,
34
- viewType,
35
- viewMonth,
36
- viewYear,
37
- changeView,
38
- moveViewDate,
39
- setSelectedDate,
40
- setViewDateAndChangeView,
41
- } = useCalendar(props.value, { weekStart: props.weekStart, disabledDates: props.disabledDates });
42
-
43
- watch(() => props.value, newValue => setSelectedDate(newValue));
44
-
45
- const currentMonth = toRef(viewMonth);
46
-
47
- // 'rotate' the weekdays to start on the weekStart day
48
- const weekdays = ref(Object.values(Weekday).map((_day, index) => {
49
- return Object.values(Weekday)[
50
- loopRange(index + props.weekStart, Object.values(Weekday).length)
51
- ];
52
- }));
53
-
54
- const onDateClick = (date: CalendarGridItem | null) => {
55
- if (!date) {
56
- emit("change", null);
57
- return;
58
- }
59
-
60
- if (date.disabled) return;
61
- if (!date.date) return;
62
-
63
- emit("change", formatDate[props.format](date.date));
64
- };
65
- </script>
66
-
67
- <template>
68
- <section class="flex flex-col">
69
- <main class="p-4">
70
- <MonthView
71
- v-if="viewType === ViewType.MONTH"
72
- :current-month="currentMonth"
73
- :current-year="viewYear"
74
- :view-data="viewData"
75
- :weekdays="weekdays"
76
- @move="moveViewDate"
77
- @change-view="changeView"
78
- @select="onDateClick"
79
- />
80
- <YearView
81
- v-if="viewType === ViewType.YEAR"
82
- :current-year="viewYear"
83
- :view-data="viewData"
84
- @move="moveViewDate"
85
- @select="setViewDateAndChangeView"
86
- />
87
- <DecadeView
88
- v-if="viewType === ViewType.DECADE"
89
- :view-data="viewData"
90
- @move="moveViewDate"
91
- @select="setViewDateAndChangeView"
92
- />
93
- </main>
94
- <footer v-if="clearable" class="flex items-center justify-end p-4 border-t border-default">
95
- <BButton
96
- square
97
- size="tiny"
98
- variant="outlineSubtle"
99
- leading-icon="trash"
100
- label="Clear"
101
- :disabled="!value"
102
- @click="onDateClick(null)"
103
- />
104
- </footer>
105
- </section>
106
- </template>
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- import type { CalendarGridItem } from "../utils/types";
3
-
4
- defineProps<{ date: CalendarGridItem }>();
5
- const emit = defineEmits(["click"]);
6
- </script>
7
-
8
- <template>
9
- <button
10
- class="flex items-center justify-center w-8 h-8 rounded text-sm font-medium cursor-pointer"
11
- :class="{
12
- 'bg-secondary text-tertiary rounded-none cursor-not-allowed': date.disabled,
13
- 'text-muted hover:text-secondary hover:bg-tertiary': date.inactive,
14
- 'bg-action text-white': date.selected,
15
- 'text-primary hover:bg-tertiary active:bg-tertiary focus:outline-none focus:shadow-outline focus:bg-blue-200': !date.selected && !date.disabled && !date.inactive,
16
- 'text-xs text-primary': date.current && !date.selected,
17
- 'text-xs font-bold text-white': date.current && date.selected,
18
- }"
19
- @click.stop="emit('click', date)"
20
- >
21
- {{ date.label }}
22
- </button>
23
- </template>