@widgetic/design-system 0.3.68

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 (492) hide show
  1. package/README.md +730 -0
  2. package/dist/components/CopyableHeader.svelte +456 -0
  3. package/dist/components/CopyableHeader.svelte.d.ts +40 -0
  4. package/dist/components/EmptyState.svelte +145 -0
  5. package/dist/components/EmptyState.svelte.d.ts +36 -0
  6. package/dist/components/PasswordInput.svelte +46 -0
  7. package/dist/components/PasswordInput.svelte.d.ts +26 -0
  8. package/dist/components/ThumbHashImage.svelte +124 -0
  9. package/dist/components/ThumbHashImage.svelte.d.ts +26 -0
  10. package/dist/components/WScrollArea.svelte +47 -0
  11. package/dist/components/WScrollArea.svelte.d.ts +38 -0
  12. package/dist/components/debug-grid/DebugGrid.svelte +207 -0
  13. package/dist/components/debug-grid/DebugGrid.svelte.d.ts +32 -0
  14. package/dist/components/ic/browser/BrowserInputController.svelte +481 -0
  15. package/dist/components/ic/browser/BrowserInputController.svelte.d.ts +34 -0
  16. package/dist/components/ic/browser/icons/audio.svg +7 -0
  17. package/dist/components/ic/browser/icons/document.svg +11 -0
  18. package/dist/components/ic/browser/icons/error.svg +5 -0
  19. package/dist/components/ic/browser/icons/folder.svg +28 -0
  20. package/dist/components/ic/browser/icons/info-icon.svg +3 -0
  21. package/dist/components/ic/browser/icons/player-pause.svg +12 -0
  22. package/dist/components/ic/browser/icons/player-play.svg +1 -0
  23. package/dist/components/ic/types.d.ts +14 -0
  24. package/dist/components/ic/types.js +18 -0
  25. package/dist/components/index.d.ts +51 -0
  26. package/dist/components/index.js +52 -0
  27. package/dist/components/modals/ActionModal.svelte +189 -0
  28. package/dist/components/modals/ActionModal.svelte.d.ts +49 -0
  29. package/dist/components/modals/BaseModal.svelte +409 -0
  30. package/dist/components/modals/BaseModal.svelte.d.ts +38 -0
  31. package/dist/components/modals/NewItemDialog.svelte +189 -0
  32. package/dist/components/modals/NewItemDialog.svelte.d.ts +39 -0
  33. package/dist/components/modals/Portal.svelte +104 -0
  34. package/dist/components/modals/Portal.svelte.d.ts +34 -0
  35. package/dist/components/modals/README.md +99 -0
  36. package/dist/components/modals/RenameDialog.svelte +316 -0
  37. package/dist/components/modals/RenameDialog.svelte.d.ts +39 -0
  38. package/dist/components/modals/modalStore.d.ts +10 -0
  39. package/dist/components/modals/modalStore.js +45 -0
  40. package/dist/components/navigation/Breadcrumbs.svelte +348 -0
  41. package/dist/components/navigation/Breadcrumbs.svelte.d.ts +35 -0
  42. package/dist/components/navigation/index.d.ts +2 -0
  43. package/dist/components/navigation/index.js +2 -0
  44. package/dist/components/navigation/types.d.ts +12 -0
  45. package/dist/components/navigation/types.js +1 -0
  46. package/dist/components/pdf/PDFViewer.svelte +608 -0
  47. package/dist/components/pdf/PDFViewer.svelte.d.ts +32 -0
  48. package/dist/components/search-input/SearchInput.svelte +115 -0
  49. package/dist/components/search-input/SearchInput.svelte.d.ts +46 -0
  50. package/dist/components/search-input/index.d.ts +14 -0
  51. package/dist/components/search-input/index.js +4 -0
  52. package/dist/components/shad-editor/colorpicker.svelte +17 -0
  53. package/dist/components/shad-editor/colorpicker.svelte.d.ts +6 -0
  54. package/dist/components/shad-editor/custom/Extentions/ColorHighlighter.d.ts +2 -0
  55. package/dist/components/shad-editor/custom/Extentions/ColorHighlighter.js +25 -0
  56. package/dist/components/shad-editor/custom/Extentions/ImageExtention.d.ts +1 -0
  57. package/dist/components/shad-editor/custom/Extentions/ImageExtention.js +30 -0
  58. package/dist/components/shad-editor/custom/Extentions/SearchAndReplace.d.ts +57 -0
  59. package/dist/components/shad-editor/custom/Extentions/SearchAndReplace.js +232 -0
  60. package/dist/components/shad-editor/custom/Extentions/SmilieReplacer.d.ts +2 -0
  61. package/dist/components/shad-editor/custom/Extentions/SmilieReplacer.js +131 -0
  62. package/dist/components/shad-editor/custom/code-extended.svelte +78 -0
  63. package/dist/components/shad-editor/custom/code-extended.svelte.d.ts +4 -0
  64. package/dist/components/shad-editor/custom/image-extended-component.svelte +251 -0
  65. package/dist/components/shad-editor/custom/image-extended-component.svelte.d.ts +4 -0
  66. package/dist/components/shad-editor/custom/utils.d.ts +5 -0
  67. package/dist/components/shad-editor/custom/utils.js +35 -0
  68. package/dist/components/shad-editor/editor-toolbar.svelte +59 -0
  69. package/dist/components/shad-editor/editor-toolbar.svelte.d.ts +8 -0
  70. package/dist/components/shad-editor/editor.css +179 -0
  71. package/dist/components/shad-editor/icons/block-quote.svelte +26 -0
  72. package/dist/components/shad-editor/icons/block-quote.svelte.d.ts +7 -0
  73. package/dist/components/shad-editor/icons/bold.svelte +26 -0
  74. package/dist/components/shad-editor/icons/bold.svelte.d.ts +8 -0
  75. package/dist/components/shad-editor/icons/buttle-list.svelte +27 -0
  76. package/dist/components/shad-editor/icons/buttle-list.svelte.d.ts +7 -0
  77. package/dist/components/shad-editor/icons/code.svelte +27 -0
  78. package/dist/components/shad-editor/icons/code.svelte.d.ts +8 -0
  79. package/dist/components/shad-editor/icons/highlighter.svelte +75 -0
  80. package/dist/components/shad-editor/icons/highlighter.svelte.d.ts +9 -0
  81. package/dist/components/shad-editor/icons/image.svelte +73 -0
  82. package/dist/components/shad-editor/icons/image.svelte.d.ts +8 -0
  83. package/dist/components/shad-editor/icons/index.d.ts +22 -0
  84. package/dist/components/shad-editor/icons/index.js +24 -0
  85. package/dist/components/shad-editor/icons/italic.svelte +26 -0
  86. package/dist/components/shad-editor/icons/italic.svelte.d.ts +8 -0
  87. package/dist/components/shad-editor/icons/link.svelte +72 -0
  88. package/dist/components/shad-editor/icons/link.svelte.d.ts +8 -0
  89. package/dist/components/shad-editor/icons/ordered-list.svelte +26 -0
  90. package/dist/components/shad-editor/icons/ordered-list.svelte.d.ts +7 -0
  91. package/dist/components/shad-editor/icons/quickcolor.svelte +95 -0
  92. package/dist/components/shad-editor/icons/quickcolor.svelte.d.ts +7 -0
  93. package/dist/components/shad-editor/icons/redo.svelte +26 -0
  94. package/dist/components/shad-editor/icons/redo.svelte.d.ts +8 -0
  95. package/dist/components/shad-editor/icons/search-replace.svelte +146 -0
  96. package/dist/components/shad-editor/icons/search-replace.svelte.d.ts +7 -0
  97. package/dist/components/shad-editor/icons/strikethrough.svelte +26 -0
  98. package/dist/components/shad-editor/icons/strikethrough.svelte.d.ts +8 -0
  99. package/dist/components/shad-editor/icons/subscript.svelte +26 -0
  100. package/dist/components/shad-editor/icons/subscript.svelte.d.ts +8 -0
  101. package/dist/components/shad-editor/icons/superscript.svelte +26 -0
  102. package/dist/components/shad-editor/icons/superscript.svelte.d.ts +8 -0
  103. package/dist/components/shad-editor/icons/table.svelte +111 -0
  104. package/dist/components/shad-editor/icons/table.svelte.d.ts +8 -0
  105. package/dist/components/shad-editor/icons/task-list.svelte +26 -0
  106. package/dist/components/shad-editor/icons/task-list.svelte.d.ts +7 -0
  107. package/dist/components/shad-editor/icons/text.svelte +95 -0
  108. package/dist/components/shad-editor/icons/text.svelte.d.ts +7 -0
  109. package/dist/components/shad-editor/icons/textalign.svelte +82 -0
  110. package/dist/components/shad-editor/icons/textalign.svelte.d.ts +7 -0
  111. package/dist/components/shad-editor/icons/textcolor.svelte +75 -0
  112. package/dist/components/shad-editor/icons/textcolor.svelte.d.ts +8 -0
  113. package/dist/components/shad-editor/icons/underline.svelte +26 -0
  114. package/dist/components/shad-editor/icons/underline.svelte.d.ts +8 -0
  115. package/dist/components/shad-editor/icons/undo.svelte +26 -0
  116. package/dist/components/shad-editor/icons/undo.svelte.d.ts +8 -0
  117. package/dist/components/shad-editor/index.d.ts +4 -0
  118. package/dist/components/shad-editor/index.js +5 -0
  119. package/dist/components/shad-editor/onedark.css +87 -0
  120. package/dist/components/shad-editor/shad-editor.svelte +153 -0
  121. package/dist/components/shad-editor/shad-editor.svelte.d.ts +34 -0
  122. package/dist/components/toast/ToasterModal.svelte +128 -0
  123. package/dist/components/toast/ToasterModal.svelte.d.ts +30 -0
  124. package/dist/components/toast/index.d.ts +2 -0
  125. package/dist/components/toast/index.js +2 -0
  126. package/dist/components/ui/accordion/accordion-content.svelte +24 -0
  127. package/dist/components/ui/accordion/accordion-content.svelte.d.ts +4 -0
  128. package/dist/components/ui/accordion/accordion-item.svelte +12 -0
  129. package/dist/components/ui/accordion/accordion-item.svelte.d.ts +4 -0
  130. package/dist/components/ui/accordion/accordion-trigger.svelte +29 -0
  131. package/dist/components/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
  132. package/dist/components/ui/accordion/index.d.ts +6 -0
  133. package/dist/components/ui/accordion/index.js +6 -0
  134. package/dist/components/ui/alert/alert-description.svelte +13 -0
  135. package/dist/components/ui/alert/alert-description.svelte.d.ts +28 -0
  136. package/dist/components/ui/alert/alert-title.svelte +21 -0
  137. package/dist/components/ui/alert/alert-title.svelte.d.ts +31 -0
  138. package/dist/components/ui/alert/alert.svelte +17 -0
  139. package/dist/components/ui/alert/alert.svelte.d.ts +31 -0
  140. package/dist/components/ui/alert/index.d.ts +43 -0
  141. package/dist/components/ui/alert/index.js +19 -0
  142. package/dist/components/ui/badge/badge.svelte +50 -0
  143. package/dist/components/ui/badge/badge.svelte.d.ts +60 -0
  144. package/dist/components/ui/badge/index.d.ts +2 -0
  145. package/dist/components/ui/badge/index.js +2 -0
  146. package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +23 -0
  147. package/dist/components/ui/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
  148. package/dist/components/ui/breadcrumb/breadcrumb-item.svelte +16 -0
  149. package/dist/components/ui/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
  150. package/dist/components/ui/breadcrumb/breadcrumb-link.svelte +31 -0
  151. package/dist/components/ui/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
  152. package/dist/components/ui/breadcrumb/breadcrumb-list.svelte +23 -0
  153. package/dist/components/ui/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
  154. package/dist/components/ui/breadcrumb/breadcrumb-page.svelte +23 -0
  155. package/dist/components/ui/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
  156. package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte +27 -0
  157. package/dist/components/ui/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
  158. package/dist/components/ui/breadcrumb/breadcrumb.svelte +15 -0
  159. package/dist/components/ui/breadcrumb/breadcrumb.svelte.d.ts +5 -0
  160. package/dist/components/ui/breadcrumb/index.d.ts +8 -0
  161. package/dist/components/ui/breadcrumb/index.js +10 -0
  162. package/dist/components/ui/button/button.svelte +74 -0
  163. package/dist/components/ui/button/button.svelte.d.ts +118 -0
  164. package/dist/components/ui/button/index.d.ts +2 -0
  165. package/dist/components/ui/button/index.js +4 -0
  166. package/dist/components/ui/calendar/calendar-cell.svelte +19 -0
  167. package/dist/components/ui/calendar/calendar-cell.svelte.d.ts +4 -0
  168. package/dist/components/ui/calendar/calendar-day.svelte +30 -0
  169. package/dist/components/ui/calendar/calendar-day.svelte.d.ts +4 -0
  170. package/dist/components/ui/calendar/calendar-grid-body.svelte +12 -0
  171. package/dist/components/ui/calendar/calendar-grid-body.svelte.d.ts +4 -0
  172. package/dist/components/ui/calendar/calendar-grid-head.svelte +12 -0
  173. package/dist/components/ui/calendar/calendar-grid-head.svelte.d.ts +4 -0
  174. package/dist/components/ui/calendar/calendar-grid-row.svelte +12 -0
  175. package/dist/components/ui/calendar/calendar-grid-row.svelte.d.ts +4 -0
  176. package/dist/components/ui/calendar/calendar-grid.svelte +16 -0
  177. package/dist/components/ui/calendar/calendar-grid.svelte.d.ts +4 -0
  178. package/dist/components/ui/calendar/calendar-head-cell.svelte +16 -0
  179. package/dist/components/ui/calendar/calendar-head-cell.svelte.d.ts +4 -0
  180. package/dist/components/ui/calendar/calendar-header.svelte +16 -0
  181. package/dist/components/ui/calendar/calendar-header.svelte.d.ts +4 -0
  182. package/dist/components/ui/calendar/calendar-heading.svelte +12 -0
  183. package/dist/components/ui/calendar/calendar-heading.svelte.d.ts +4 -0
  184. package/dist/components/ui/calendar/calendar-months.svelte +20 -0
  185. package/dist/components/ui/calendar/calendar-months.svelte.d.ts +5 -0
  186. package/dist/components/ui/calendar/calendar-next-button.svelte +28 -0
  187. package/dist/components/ui/calendar/calendar-next-button.svelte.d.ts +4 -0
  188. package/dist/components/ui/calendar/calendar-prev-button.svelte +28 -0
  189. package/dist/components/ui/calendar/calendar-prev-button.svelte.d.ts +4 -0
  190. package/dist/components/ui/calendar/calendar.svelte +61 -0
  191. package/dist/components/ui/calendar/calendar.svelte.d.ts +5 -0
  192. package/dist/components/ui/calendar/index.d.ts +14 -0
  193. package/dist/components/ui/calendar/index.js +16 -0
  194. package/dist/components/ui/card/card-content.svelte +16 -0
  195. package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
  196. package/dist/components/ui/card/card-description.svelte +16 -0
  197. package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
  198. package/dist/components/ui/card/card-footer.svelte +16 -0
  199. package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
  200. package/dist/components/ui/card/card-header.svelte +16 -0
  201. package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
  202. package/dist/components/ui/card/card-title.svelte +25 -0
  203. package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
  204. package/dist/components/ui/card/card.svelte +20 -0
  205. package/dist/components/ui/card/card.svelte.d.ts +5 -0
  206. package/dist/components/ui/card/index.d.ts +7 -0
  207. package/dist/components/ui/card/index.js +7 -0
  208. package/dist/components/ui/checkbox/checkbox.svelte +35 -0
  209. package/dist/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
  210. package/dist/components/ui/checkbox/index.d.ts +2 -0
  211. package/dist/components/ui/checkbox/index.js +4 -0
  212. package/dist/components/ui/collapsible/index.d.ts +16 -0
  213. package/dist/components/ui/collapsible/index.js +7 -0
  214. package/dist/components/ui/command/command-dialog.svelte +35 -0
  215. package/dist/components/ui/command/command-dialog.svelte.d.ts +9 -0
  216. package/dist/components/ui/command/command-empty.svelte +12 -0
  217. package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
  218. package/dist/components/ui/command/command-group.svelte +29 -0
  219. package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
  220. package/dist/components/ui/command/command-input.svelte +25 -0
  221. package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
  222. package/dist/components/ui/command/command-item.svelte +19 -0
  223. package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
  224. package/dist/components/ui/command/command-link-item.svelte +19 -0
  225. package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
  226. package/dist/components/ui/command/command-list.svelte +16 -0
  227. package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
  228. package/dist/components/ui/command/command-separator.svelte +12 -0
  229. package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
  230. package/dist/components/ui/command/command-shortcut.svelte +20 -0
  231. package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
  232. package/dist/components/ui/command/command.svelte +21 -0
  233. package/dist/components/ui/command/command.svelte.d.ts +4 -0
  234. package/dist/components/ui/command/index.d.ts +13 -0
  235. package/dist/components/ui/command/index.js +15 -0
  236. package/dist/components/ui/dialog/dialog-content.svelte +38 -0
  237. package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
  238. package/dist/components/ui/dialog/dialog-description.svelte +16 -0
  239. package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
  240. package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
  241. package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
  242. package/dist/components/ui/dialog/dialog-header.svelte +20 -0
  243. package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
  244. package/dist/components/ui/dialog/dialog-overlay.svelte +19 -0
  245. package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
  246. package/dist/components/ui/dialog/dialog-title.svelte +16 -0
  247. package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
  248. package/dist/components/ui/dialog/index.d.ts +12 -0
  249. package/dist/components/ui/dialog/index.js +14 -0
  250. package/dist/components/ui/drawer/drawer-content.svelte +30 -0
  251. package/dist/components/ui/drawer/drawer-content.svelte.d.ts +7 -0
  252. package/dist/components/ui/drawer/drawer-description.svelte +16 -0
  253. package/dist/components/ui/drawer/drawer-description.svelte.d.ts +4 -0
  254. package/dist/components/ui/drawer/drawer-footer.svelte +16 -0
  255. package/dist/components/ui/drawer/drawer-footer.svelte.d.ts +5 -0
  256. package/dist/components/ui/drawer/drawer-header.svelte +20 -0
  257. package/dist/components/ui/drawer/drawer-header.svelte.d.ts +5 -0
  258. package/dist/components/ui/drawer/drawer-nested.svelte +12 -0
  259. package/dist/components/ui/drawer/drawer-nested.svelte.d.ts +3 -0
  260. package/dist/components/ui/drawer/drawer-overlay.svelte +16 -0
  261. package/dist/components/ui/drawer/drawer-overlay.svelte.d.ts +4 -0
  262. package/dist/components/ui/drawer/drawer-title.svelte +16 -0
  263. package/dist/components/ui/drawer/drawer-title.svelte.d.ts +4 -0
  264. package/dist/components/ui/drawer/drawer.svelte +12 -0
  265. package/dist/components/ui/drawer/drawer.svelte.d.ts +3 -0
  266. package/dist/components/ui/drawer/index.d.ts +13 -0
  267. package/dist/components/ui/drawer/index.js +15 -0
  268. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +40 -0
  269. package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +8 -0
  270. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +26 -0
  271. package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +7 -0
  272. package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +19 -0
  273. package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +7 -0
  274. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +23 -0
  275. package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +7 -0
  276. package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +23 -0
  277. package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
  278. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +30 -0
  279. package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
  280. package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +16 -0
  281. package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
  282. package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
  283. package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
  284. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +19 -0
  285. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
  286. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +28 -0
  287. package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
  288. package/dist/components/ui/dropdown-menu/index.d.ts +25 -0
  289. package/dist/components/ui/dropdown-menu/index.js +17 -0
  290. package/dist/components/ui/hover-card/hover-card-content.svelte +28 -0
  291. package/dist/components/ui/hover-card/hover-card-content.svelte.d.ts +7 -0
  292. package/dist/components/ui/hover-card/index.d.ts +5 -0
  293. package/dist/components/ui/hover-card/index.js +5 -0
  294. package/dist/components/ui/input/index.d.ts +2 -0
  295. package/dist/components/ui/input/index.js +4 -0
  296. package/dist/components/ui/input/input.svelte +22 -0
  297. package/dist/components/ui/input/input.svelte.d.ts +5 -0
  298. package/dist/components/ui/input-otp/index.d.ts +5 -0
  299. package/dist/components/ui/input-otp/index.js +7 -0
  300. package/dist/components/ui/input-otp/input-otp-group.svelte +16 -0
  301. package/dist/components/ui/input-otp/input-otp-group.svelte.d.ts +5 -0
  302. package/dist/components/ui/input-otp/input-otp-separator.svelte +19 -0
  303. package/dist/components/ui/input-otp/input-otp-separator.svelte.d.ts +5 -0
  304. package/dist/components/ui/input-otp/input-otp-slot.svelte +30 -0
  305. package/dist/components/ui/input-otp/input-otp-slot.svelte.d.ts +12 -0
  306. package/dist/components/ui/input-otp/input-otp.svelte +22 -0
  307. package/dist/components/ui/input-otp/input-otp.svelte.d.ts +3 -0
  308. package/dist/components/ui/label/index.d.ts +2 -0
  309. package/dist/components/ui/label/index.js +4 -0
  310. package/dist/components/ui/label/label.svelte +19 -0
  311. package/dist/components/ui/label/label.svelte.d.ts +4 -0
  312. package/dist/components/ui/popover/index.d.ts +6 -0
  313. package/dist/components/ui/popover/index.js +6 -0
  314. package/dist/components/ui/popover/popover-content.svelte +28 -0
  315. package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
  316. package/dist/components/ui/progress/index.d.ts +2 -0
  317. package/dist/components/ui/progress/index.js +4 -0
  318. package/dist/components/ui/progress/progress.svelte +25 -0
  319. package/dist/components/ui/progress/progress.svelte.d.ts +4 -0
  320. package/dist/components/ui/radio-group/index.d.ts +3 -0
  321. package/dist/components/ui/radio-group/index.js +5 -0
  322. package/dist/components/ui/radio-group/radio-group-item.svelte +28 -0
  323. package/dist/components/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
  324. package/dist/components/ui/radio-group/radio-group.svelte +13 -0
  325. package/dist/components/ui/radio-group/radio-group.svelte.d.ts +4 -0
  326. package/dist/components/ui/range-calendar/index.d.ts +15 -0
  327. package/dist/components/ui/range-calendar/index.js +17 -0
  328. package/dist/components/ui/range-calendar/range-calendar-cell.svelte +19 -0
  329. package/dist/components/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
  330. package/dist/components/ui/range-calendar/range-calendar-day.svelte +34 -0
  331. package/dist/components/ui/range-calendar/range-calendar-day.svelte.d.ts +4 -0
  332. package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte +12 -0
  333. package/dist/components/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
  334. package/dist/components/ui/range-calendar/range-calendar-grid.svelte +16 -0
  335. package/dist/components/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
  336. package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte +16 -0
  337. package/dist/components/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
  338. package/dist/components/ui/range-calendar/range-calendar-header.svelte +16 -0
  339. package/dist/components/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
  340. package/dist/components/ui/range-calendar/range-calendar-heading.svelte +16 -0
  341. package/dist/components/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
  342. package/dist/components/ui/range-calendar/range-calendar-months.svelte +20 -0
  343. package/dist/components/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
  344. package/dist/components/ui/range-calendar/range-calendar-next-button.svelte +28 -0
  345. package/dist/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +4 -0
  346. package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte +28 -0
  347. package/dist/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +4 -0
  348. package/dist/components/ui/range-calendar/range-calendar.svelte +57 -0
  349. package/dist/components/ui/range-calendar/range-calendar.svelte.d.ts +5 -0
  350. package/dist/components/ui/scroll-area/index.d.ts +3 -0
  351. package/dist/components/ui/scroll-area/index.js +6 -0
  352. package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte +29 -0
  353. package/dist/components/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
  354. package/dist/components/ui/scroll-area/scroll-area.svelte +32 -0
  355. package/dist/components/ui/scroll-area/scroll-area.svelte.d.ts +9 -0
  356. package/dist/components/ui/select/index.d.ts +11 -0
  357. package/dist/components/ui/select/index.js +13 -0
  358. package/dist/components/ui/select/select-content.svelte +39 -0
  359. package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
  360. package/dist/components/ui/select/select-group-heading.svelte +16 -0
  361. package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
  362. package/dist/components/ui/select/select-item.svelte +37 -0
  363. package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
  364. package/dist/components/ui/select/select-scroll-down-button.svelte +19 -0
  365. package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
  366. package/dist/components/ui/select/select-scroll-up-button.svelte +19 -0
  367. package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
  368. package/dist/components/ui/select/select-separator.svelte +13 -0
  369. package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
  370. package/dist/components/ui/select/select-trigger.svelte +24 -0
  371. package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
  372. package/dist/components/ui/separator/index.d.ts +2 -0
  373. package/dist/components/ui/separator/index.js +4 -0
  374. package/dist/components/ui/separator/separator.svelte +22 -0
  375. package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
  376. package/dist/components/ui/slider/index.d.ts +3 -0
  377. package/dist/components/ui/slider/index.js +5 -0
  378. package/dist/components/ui/slider/slider.svelte +34 -0
  379. package/dist/components/ui/slider/slider.svelte.d.ts +4 -0
  380. package/dist/components/ui/sonner/index.d.ts +2 -0
  381. package/dist/components/ui/sonner/index.js +2 -0
  382. package/dist/components/ui/sonner/sonner.svelte +20 -0
  383. package/dist/components/ui/sonner/sonner.svelte.d.ts +4 -0
  384. package/dist/components/ui/switch/index.d.ts +2 -0
  385. package/dist/components/ui/switch/index.js +4 -0
  386. package/dist/components/ui/switch/switch.svelte +27 -0
  387. package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
  388. package/dist/components/ui/table/index.d.ts +9 -0
  389. package/dist/components/ui/table/index.js +11 -0
  390. package/dist/components/ui/table/table-body.svelte +16 -0
  391. package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
  392. package/dist/components/ui/table/table-caption.svelte +16 -0
  393. package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
  394. package/dist/components/ui/table/table-cell.svelte +20 -0
  395. package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
  396. package/dist/components/ui/table/table-footer.svelte +16 -0
  397. package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
  398. package/dist/components/ui/table/table-head.svelte +23 -0
  399. package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
  400. package/dist/components/ui/table/table-header.svelte +16 -0
  401. package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
  402. package/dist/components/ui/table/table-row.svelte +23 -0
  403. package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
  404. package/dist/components/ui/table/table.svelte +18 -0
  405. package/dist/components/ui/table/table.svelte.d.ts +5 -0
  406. package/dist/components/ui/tabs/index.d.ts +6 -0
  407. package/dist/components/ui/tabs/index.js +8 -0
  408. package/dist/components/ui/tabs/tabs-content.svelte +19 -0
  409. package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
  410. package/dist/components/ui/tabs/tabs-list.svelte +19 -0
  411. package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
  412. package/dist/components/ui/tabs/tabs-trigger.svelte +19 -0
  413. package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
  414. package/dist/components/ui/textarea/index.d.ts +19 -0
  415. package/dist/components/ui/textarea/index.js +4 -0
  416. package/dist/components/ui/textarea/textarea.svelte +22 -0
  417. package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
  418. package/dist/components/ui/toggle/index.d.ts +3 -0
  419. package/dist/components/ui/toggle/index.js +5 -0
  420. package/dist/components/ui/toggle/toggle.svelte +51 -0
  421. package/dist/components/ui/toggle/toggle.svelte.d.ts +83 -0
  422. package/dist/components/ui/toggle-group/index.d.ts +3 -0
  423. package/dist/components/ui/toggle-group/index.js +5 -0
  424. package/dist/components/ui/toggle-group/toggle-group-item.svelte +30 -0
  425. package/dist/components/ui/toggle-group/toggle-group-item.svelte.d.ts +6 -0
  426. package/dist/components/ui/toggle-group/toggle-group.svelte +41 -0
  427. package/dist/components/ui/toggle-group/toggle-group.svelte.d.ts +8 -0
  428. package/dist/components/ui/tooltip/index.d.ts +6 -0
  429. package/dist/components/ui/tooltip/index.js +8 -0
  430. package/dist/components/ui/tooltip/tooltip-content.svelte +21 -0
  431. package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
  432. package/dist/components/widget-system/EditableWidget.svelte +106 -0
  433. package/dist/components/widget-system/EditableWidget.svelte.d.ts +44 -0
  434. package/dist/components/widget-system/Moveable.svelte +661 -0
  435. package/dist/components/widget-system/Moveable.svelte.d.ts +56 -0
  436. package/dist/components/widget-system/index.d.ts +2 -0
  437. package/dist/components/widget-system/index.js +3 -0
  438. package/dist/fonts/BLMelody/BLMelody-Bold.woff2 +0 -0
  439. package/dist/fonts/BLMelody/BLMelody-Medium.woff2 +0 -0
  440. package/dist/fonts/BLMelody/BLMelody-SemiBold.woff2 +0 -0
  441. package/dist/fonts/Riegla/Riegla-Bold Italic.otf +0 -0
  442. package/dist/fonts/Riegla/Riegla-Bold.otf +0 -0
  443. package/dist/fonts/Riegla/Riegla-Italic.otf +0 -0
  444. package/dist/fonts/Riegla/Riegla-Regular.otf +0 -0
  445. package/dist/fonts/Riegla/RieglaMedium-Regular.otf +0 -0
  446. package/dist/fonts/index.d.ts +0 -0
  447. package/dist/fonts/index.js +1 -0
  448. package/dist/hooks/is-mobile.svelte.d.ts +5 -0
  449. package/dist/hooks/is-mobile.svelte.js +23 -0
  450. package/dist/icons/Checked.svelte +19 -0
  451. package/dist/icons/Checked.svelte.d.ts +20 -0
  452. package/dist/icons/CheckerBoardBackground.svelte +16 -0
  453. package/dist/icons/CheckerBoardBackground.svelte.d.ts +3 -0
  454. package/dist/icons/Close.svelte +22 -0
  455. package/dist/icons/Close.svelte.d.ts +20 -0
  456. package/dist/icons/Close.svg +8 -0
  457. package/dist/icons/Error.svg +5 -0
  458. package/dist/icons/Exclamation.svelte +5 -0
  459. package/dist/icons/Exclamation.svelte.d.ts +26 -0
  460. package/dist/icons/FileBrowser.svelte +38 -0
  461. package/dist/icons/FileBrowser.svelte.d.ts +20 -0
  462. package/dist/icons/FileBrowser.svg +28 -0
  463. package/dist/icons/LogoWidgetic.svelte +24 -0
  464. package/dist/icons/LogoWidgetic.svelte.d.ts +20 -0
  465. package/dist/icons/LogoWidgeticType.svelte +12 -0
  466. package/dist/icons/LogoWidgeticType.svelte.d.ts +20 -0
  467. package/dist/icons/LogoWidgeticType.svg +4 -0
  468. package/dist/icons/OpacitySliderArrows.svelte +46 -0
  469. package/dist/icons/OpacitySliderArrows.svelte.d.ts +3 -0
  470. package/dist/icons/TestIcon.svelte +1 -0
  471. package/dist/icons/TestIcon.svelte.d.ts +26 -0
  472. package/dist/icons/checked.svg +4 -0
  473. package/dist/icons/index.d.ts +11 -0
  474. package/dist/icons/index.js +15 -0
  475. package/dist/icons/lucide.d.ts +1 -0
  476. package/dist/icons/lucide.js +1 -0
  477. package/dist/icons/tabler.d.ts +1 -0
  478. package/dist/icons/tabler.js +1 -0
  479. package/dist/index.d.ts +3 -0
  480. package/dist/index.js +9 -0
  481. package/dist/stores/index.d.ts +1 -0
  482. package/dist/stores/index.js +1 -0
  483. package/dist/stores/pdfCache.d.ts +16 -0
  484. package/dist/stores/pdfCache.js +101 -0
  485. package/dist/styles/fonts.css +172 -0
  486. package/dist/styles/global.css +893 -0
  487. package/dist/utils/MediaManager.d.ts +35 -0
  488. package/dist/utils/MediaManager.js +59 -0
  489. package/dist/utils.d.ts +2 -0
  490. package/dist/utils.js +5 -0
  491. package/package.json +183 -0
  492. package/tailwind.config.ts +97 -0
package/README.md ADDED
@@ -0,0 +1,730 @@
1
+ # Widgetic Design System
2
+
3
+ This is the design system package for the Widgetic platform.
4
+
5
+ It is built with SvelteKit and TailwindCSS and exports styles(with tailwind), ui components(with shadcn), icons and fonts for the entire platform.
6
+
7
+ 0. Styles: it uses tailwindcss and exports global styles and design tokens that are imported in the project where the design system is imported:
8
+
9
+ ```svelte
10
+ <script>
11
+ import '@widgetic/design-system/styles';
12
+ </script>
13
+ ```
14
+
15
+ 0.1. To add new fonts:
16
+ - Add the font in the fonts folder.
17
+ - Add the font-face rule and the class in the fonts.css file and then the class can be used anywhere in the projects that import the design system's styles:
18
+ ```css
19
+ /* First font-face rule */
20
+ @font-face {
21
+ font-family: 'BL Melody';
22
+ src: url('@widgetic/design-system/fonts/BLMelody/BLMelody-ExtraLight.woff2') format('woff2');
23
+ font-weight: 200;
24
+ font-style: normal;
25
+ font-display: swap;
26
+ }
27
+
28
+ /* Second fonte class(can be any custom name) */
29
+ .font-bl-melody-extra-light {
30
+ font-family: 'BL Melody';
31
+ font-weight: 200;
32
+ }
33
+ ```
34
+
35
+ - Use the font-family in any class in the global.css file if needed like this:
36
+ ```css
37
+ .my-button-class {
38
+ /* other CSS properties */
39
+ background-color: red;
40
+
41
+ /* font-family properties here */
42
+ font-family: 'BL Melody', sans-serif;
43
+ font-weight: 200;
44
+ font-style: normal;
45
+ }
46
+ ```
47
+
48
+ 1.1. Components: It uses the SHADCN UI components for basic ui components and custom components for the Widgetic platform.
49
+
50
+ a. (Re)Install latest all shadcn components:
51
+
52
+ ```bash
53
+ npm run i-shadcn
54
+ ```
55
+
56
+ At prompt answer like this:
57
+ ```bash
58
+ Which style would you like to use?
59
+ │ Default
60
+ │
61
+ ◇ Which base color would you like to use?
62
+ │ Slate
63
+ │
64
+ ◇ Where is your global CSS file? (this file will be overwritten)
65
+ │ src/app.css (!!! add local project's css file as we don't want to overwrite our project's global styles)
66
+ │
67
+ ◇ Where is your Tailwind config located? (this file will be overwritten)
68
+ │ tailwind.config.ts
69
+ │
70
+ ◇ Configure the import alias for components:
71
+ │ $lib/components
72
+ │
73
+ ◆ Configure the import alias for utils:
74
+ │ $lib/utils
75
+ │
76
+ ◆ Configure the import alias for hooks:
77
+ │ $lib/hooks
78
+ │
79
+ ◆ Configure the import alias for ui:
80
+ │ $lib/components/ui
81
+
82
+
83
+ Components to install:
84
+ │ accordion, badge, button, calendar, range-calendar, card, checkbox, collapsible, dialog,
85
+ │ drawer, dropdown-menu, input, input-otp, label, popover, progress, radio-group, scroll-area,
86
+ │ select, separator, slider, switch, table, tabs, textarea, tooltip
87
+ │
88
+ ◆ Ready to install components and dependencies?
89
+ │ ● Yes / ○ No
90
+ ...
91
+ tooltip installed at src/lib/components/ui/tooltip
92
+ │
93
+ ◇ Dependencies installed with npm
94
+ │
95
+ ◇ Config file components.json updated
96
+ │
97
+ └ Success! Component installation completed.
98
+
99
+ !!! On commit the change uncheck the grouped components(Table, Select, etc.) baerel file.
100
+ ```
101
+
102
+ b. Installing the shadcn-svelte package:
103
+
104
+ ```bash
105
+ npx shadcn-svelte@next init
106
+ ```
107
+
108
+ c. Add one or more SHADCN UI components:
109
+
110
+ ```bash
111
+ npx shadcn-svelte@next add <component-name component-name2>
112
+ ```
113
+
114
+ d. Check tailwind.config.ts file to see if you didn't lose any of the project's config.
115
+
116
+ e. Check /src/lib/utils/utils.ts file to see if you didn't lose any of the project's utils.
117
+
118
+ f. Check /src/lib/hooks/hooks.ts file to see if you didn't lose any of the project's hooks.
119
+
120
+ g. Check SHADCN UI Grouped components(eg. Table or Select) barel file to export a constant with the subcomponents.
121
+ We do that just be wrapping the first part of the export statement with a constant named as the component ("Table" here) and replace the exported subcomponent: "Table" in this case with "TableRoot".
122
+ ```ts
123
+ // src/lib/components/ui/table/index.ts
124
+ const Table = {
125
+ Root,
126
+ Body,
127
+ Caption,
128
+ Cell,
129
+ Footer,
130
+ Head,
131
+ Header,
132
+ Row
133
+ };
134
+
135
+ export {
136
+ Table, // add the constant name "Table" that will be the namespace for the grouped components
137
+ Root as TableRoot, // Change the name of the Root component from "Table" to "TableRoot"
138
+ Body as TableBody,
139
+ Caption as TableCaption,
140
+ Cell as TableCell,
141
+ Footer as TableFooter,
142
+ Head as TableHead,
143
+ Header as TableHeader,
144
+ Row as TableRow,
145
+ };
146
+ ```
147
+ Then you can import and use the namespace in the project:
148
+ ```svelte
149
+ import { Table } from '@widgetic/design-system';
150
+ ```
151
+
152
+ h. If there is a component that looks compound but is not, add the @notCompound marker in the file:
153
+ ```ts
154
+ // @notCompound
155
+ export {
156
+ Root,
157
+ Scrollbar,
158
+ //,
159
+ Root as ScrollArea,
160
+ Scrollbar as ScrollAreaScrollbar,
161
+ };
162
+ ```
163
+ ScrollArea is not a compound component but it looks like one.
164
+
165
+ h. If you want to export only the main component and not the subcomponents, add the @noSubcomponents marker in the file:
166
+ ```ts
167
+ // @noSubcomponents
168
+ export {
169
+ Day,
170
+ Cell,
171
+ Grid,
172
+ Header,
173
+ Months,
174
+ GridRow,
175
+ Heading,
176
+ GridBody,
177
+ GridHead,
178
+ HeadCell,
179
+ NextButton,
180
+ PrevButton,
181
+ //
182
+ Root as RangeCalendar,
183
+ };
184
+ ```
185
+ RangeCalendar share the same subcomponents with Calendar so we don't want to export them.
186
+
187
+ 1.2. In general we should follow the shadcn-svelte approach to export the components with more subcomponents or compound components.
188
+
189
+ 2. Icons: It also uses the Lucide and Tabler icons or custom icons for the platform.
190
+
191
+ ```svelte
192
+ import { IconName } from '@widgetic/design-system/icons';
193
+ ```
194
+
195
+
196
+ 3. Fonts: The design system uses Google Fonts that we need to import in the project where the design system is imported.
197
+
198
+ ```svelte
199
+ import { FontName } from '@widgetic/design-system/fonts';
200
+ ```
201
+
202
+
203
+ ## Performance Optimization for Linked Design System
204
+
205
+ When using the linked design system in development mode, you may experience slow initial load times and delayed navigation. This is because Vite's default file watching behavior can create performance issues when working with linked packages.
206
+
207
+ ### Common Issues:
208
+ - Long initial loading time (>1 minute)
209
+ - "Pending" status on network requests when navigating between pages
210
+ - High CPU usage during development
211
+
212
+ ### Solution:
213
+
214
+ #### 1. For consuming projects (like site, context-chat, etc.):
215
+
216
+ Optimize your `vite.config.ts` with these settings:
217
+
218
+ ```ts
219
+ server: {
220
+ watch: {
221
+ // Don't use polling (which causes high CPU usage)
222
+ // Remove the following if present:
223
+ // usePolling: true,
224
+ // interval: 2000,
225
+ // binaryInterval: 2000,
226
+
227
+ // Ignore all node_modules EXCEPT the design system dist folder if needed
228
+ ignored: [
229
+ '**/node_modules/**',
230
+ '**/*.map',
231
+ '**/*.d.ts',
232
+ '**/*.log'
233
+ ]
234
+ },
235
+ hmr: {
236
+ // Reduce timeout for faster updates
237
+ timeout: 2000
238
+ }
239
+ },
240
+ optimizeDeps: {
241
+ // Don't include the design system in optimizeDeps
242
+ // Remove this if present:
243
+ // include: ['@widgetic/design-system']
244
+
245
+ // Keep other settings
246
+ exclude: ['@sveltejs/kit']
247
+ },
248
+ build: {
249
+ // Add these for faster builds
250
+ sourcemap: false,
251
+ reportCompressedSize: false
252
+ }
253
+ ```
254
+
255
+ #### 2. For production deployments:
256
+
257
+ When deploying to production, you'll use the published npm package instead of the linked development version. No special configuration is needed beyond the optimizations above.
258
+
259
+ #### 3. Development vs. Production Mode:
260
+
261
+ The design system's `vite.config.ts` already includes development-specific optimizations. When publishing the package to npm, the built version will be used, and these configurations won't affect end users.
262
+
263
+ **Note:** These optimizations are only needed during development with linked packages and won't affect the published npm package performance.
264
+
265
+
266
+ ## How to link DS into another project and develop it(first time)
267
+
268
+ 0. Go into the DS project and link it in the system and start it with: `cd Frontend/design-system && npm link && npm run dev`
269
+
270
+ 1. Go into the consuming project and make sure you have installed tailwindcss and postcss by checking in package.json if it has these dependencies:
271
+
272
+ ```json
273
+ "dependencies": {
274
+ "tailwindcss": "^3.4.16",
275
+ "@tailwindcss/postcss": "^4.1.2",
276
+ }
277
+ ```
278
+
279
+ Also make sure you have a 'tailwind.config.ts'(if there is a '.js' version rename it to '.ts') and a 'postcss.config.js' file.
280
+ (optional)If not already in the project follow the install guide at: https://tailwindcss.com/docs/installation/using-postcss.
281
+
282
+
283
+ 2. Also add these dependencies and overrides(that are needed for DS) with these exact versions into the package.json file of the consuming project:
284
+ ```json package.json
285
+ "dependencies": {
286
+ "@sveltejs/kit": "^2.20.2",
287
+ "svelte": "^5.25.6",
288
+ "@tabler/icons-svelte": "^3.24.0",
289
+ "lucide-svelte": "^0.468.0",
290
+ "bits-ui": "^1.3.0",
291
+ "svelte-sonner": "^0.3.28",
292
+
293
+ "tailwind-merge": "^2.5.2",
294
+ "tailwind-variants": "^0.2.1",
295
+ "tailwindcss-animate": "^1.0.7",
296
+ }
297
+
298
+ "overrides": {
299
+ "bits-ui": {
300
+ "@melt-ui/svelte": "^0.86.3"
301
+ },
302
+ "vaul-svelte": {
303
+ "bits-ui": {
304
+ "@melt-ui/svelte": "^0.86.3"
305
+ }
306
+ },
307
+ "svelte": "^5.25.6"
308
+ },
309
+ ```
310
+
311
+ Also keep the exact versions mentioned above and check and remove these dependencies from devDependencies or peerDependencies in the package.json of the consuming project.
312
+
313
+ 3. Also add this "i"(install) and "lds"(link) scripts into the package.json file exactly as following:
314
+ "i": "rm -rf node_modules && npm i && npm run lds",
315
+ "lds": "volta run npm link @widgetic/design-system",
316
+ Then run it with: `npm run i`
317
+
318
+ 4. Also add these "dev" scripts into the package.json file for usual start of the consuming project:
319
+ "dev": "npm run dev-sv -- --open",
320
+ "dev-sv": "NODE_ENV=development vite dev",
321
+
322
+ 5. Import DS config into the tailwind.config.ts file(of consuming project) and add it in the presets array:
323
+ ```ts
324
+ // tailwind.config.ts
325
+
326
+ import designSystemPreset from '@widgetic/design-system/tailwind.config';
327
+
328
+ const config = {
329
+ // add here the DS preset
330
+ presets: [
331
+ designSystemPreset
332
+ ],
333
+ // add here the '@widgetic/*/dist/...' to scan also the DS package files
334
+ content: [
335
+ "./src/**/*.{html,js,svelte,ts}",
336
+ // Include all @widgetic packages from node_modules(for development only) to be sure Tailwind scans all the files
337
+ "./node_modules/@widgetic/*/dist/**/*.{html,js,svelte,ts}"
338
+ ],
339
+ // the rest of the config properties
340
+ theme: {
341
+ extend: {
342
+ // current extend config...
343
+ }
344
+ }
345
+ };
346
+
347
+ export default config;
348
+ ```
349
+ Also make sure you remove the type of the config to avoid conflicts with the DS config.
350
+ Then leave the rest of the config as it is.
351
+
352
+ 6. Import styles and a test component from DS in the consuming project:
353
+ a. In the root layout of the project import the global styles:
354
+ ```svelte
355
+ <!-- +layout.svelte -->
356
+ <script>
357
+ import '@widgetic/design-system/styles';
358
+ </script>
359
+ ```
360
+ b. In the root page of the consuming project import any component(e.g. Button) and use it:
361
+ ```svelte
362
+ <!-- +page.svelte -->
363
+ <script>
364
+ import { Button } from '@widgetic/design-system/';
365
+ </script>
366
+
367
+ <!-- HTML zone -->
368
+ <Button>Click me</Button>
369
+ ```
370
+
371
+ 7. Finally: go into the in the consuming project's folder and start the development server with:
372
+ ```bash
373
+ npm run dev
374
+ ```
375
+
376
+ This automatically opens the http://localhost:5173 (default port) for the consuming project and you can see how DS components work in it.
377
+
378
+
379
+
380
+ ## Developing inside this project:
381
+
382
+ 1. Install dependencies with `npm install`
383
+
384
+ 2. Link the package in the system with npm:
385
+ ```bash
386
+ npm link
387
+ ```
388
+
389
+ 3. Start the development server with:
390
+ ```bash
391
+ npm run dev
392
+ ```
393
+
394
+ 3. Test the design system in action:
395
+ - In the root layout of the DS project there is a global styles import to test the design system's global styles.
396
+ - In the root page of the project there is a button component import to test the design system's components.
397
+
398
+ Open in new tab in browser with address: http://localhost:5173/ to see the design system in action.
399
+
400
+
401
+
402
+ ### Global Tailwind CSS and Design Tokens:
403
+
404
+ ```css
405
+ /* src/lib/styles/global.css */
406
+ @tailwind base;
407
+ @tailwind components;
408
+ @tailwind utilities;
409
+
410
+ /* CUSTOM GLOBAL STYLES */
411
+ /* ADD HERE CLASSES AND CSS VARIABLES that are used in the projects where the design system is imported */
412
+
413
+ /* Base styles */
414
+ @layer base {
415
+ :root {
416
+ /* Design tokens */
417
+ --color-primary: 30 158 210; /* RGB values for easier theming */
418
+ --color-secondary: 46 204 113;
419
+ --radius: 0.5rem;
420
+ }
421
+
422
+ /* Dark mode tokens */
423
+ .dark {
424
+ --color-primary: 100 200 255;
425
+ --color-secondary: 100 255 150;
426
+ }
427
+ }
428
+
429
+ /* Reusable component classes */
430
+ @layer components {
431
+ .btn-primary {
432
+ @apply bg-[rgb(var(--color-primary))] text-white rounded-[var(--radius)];
433
+ }
434
+
435
+ .card {
436
+ @apply shadow-md rounded-lg p-4 bg-white dark:bg-gray-800;
437
+ }
438
+ }
439
+
440
+ /* Custom utility classes */
441
+ @layer utilities {
442
+ .text-balance {
443
+ text-wrap: balance;
444
+ }
445
+ }
446
+ ```
447
+
448
+ 2. In the project where the design system is imported:
449
+ - Import the global styles in the +layout.svelte file:
450
+ ```svelte
451
+ <script>
452
+ import '@widgetic/design-system/styles';
453
+ </script>
454
+ ```
455
+
456
+
457
+ ### Create a Custom Shared Component in the Design System project using a SHADCN UI component and classes from the global styles:
458
+
459
+ src/lib/components/MyButton.svelte:
460
+ ```svelte
461
+ <script>
462
+ <!-- Import Button from the SHADCN UI components -->
463
+ import { Button } from './components/ui';
464
+ </script>
465
+
466
+ <MyButton
467
+ {type}
468
+ class="btn-primary"
469
+ on:click
470
+ >
471
+ <slot />
472
+ </MyButton>
473
+ ```
474
+ Then export the component in the "src/lib/components/index.ts" file:
475
+ ```ts
476
+ export {default as MyButton } from './components/MyButton.svelte';
477
+ ```
478
+
479
+
480
+ ## Deployment of Design System
481
+
482
+ To deploy the design system, run the following command:
483
+ ```bash
484
+ npm run prepublishOnly
485
+ ```
486
+ This will create a `dist` folder with the production build of the design system.
487
+
488
+ To publish the design system to the npm registry, run the following command:
489
+ ```bash
490
+ npm run publish-package
491
+ ```
492
+
493
+ ## Grid System
494
+
495
+ The design system implements three distinct responsive grid layouts:
496
+
497
+ 1. Site Grid
498
+ 2. Dashboard Grid
499
+ 3. App Grid
500
+
501
+ ### Grid Breakpoints
502
+ - Desktop: > 744px
503
+ - Tablet: 393px - 744px
504
+ - Mobile: ≤ 393px
505
+
506
+ ### 1. Site Grid
507
+
508
+ **Desktop (>744px)**
509
+ - 12 columns
510
+ - 144px margins
511
+ - 24px gutters
512
+ - Stretching columns with auto width
513
+
514
+ **Tablet (≤744px)**
515
+ - 8 columns
516
+ - 32px margins
517
+ - 16px gutters
518
+ - Stretching columns with auto width
519
+
520
+ **Mobile (≤393px)**
521
+ - 4 columns
522
+ - 16px margins
523
+ - 16px gutters
524
+ - Stretching columns with auto width
525
+
526
+ ### 2. Dashboard Grid
527
+
528
+ **Desktop (>744px)**
529
+ - Header: 12 columns, 24px margins, 20px gutters
530
+ - Sidebar: 240px fixed width
531
+ - Main Content: 12 columns, 24px margins, 20px gutters
532
+ - 56px header height
533
+
534
+ **Tablet (≤744px)**
535
+ - Header: 8 columns
536
+ - Sidebar: 200px fixed width
537
+ - Main Content: 8 columns
538
+ - 16px margins and gutters
539
+
540
+ **Mobile (≤393px)**
541
+ - Header: 4 columns
542
+ - Sidebar replaced with menu component
543
+ - Main Content: 4 columns
544
+ - 16px margins and gutters
545
+
546
+ ### 3. App Grid
547
+
548
+ **Desktop (>744px)**
549
+ - Header: 12 columns, 24px margins, 20px gutters
550
+ - Main Content: 12 columns, 144px margins, 20px gutters
551
+ - 56px header height
552
+
553
+ **Tablet (≤744px)**
554
+ - Header: 8 columns
555
+ - Main Content: 8 columns, 32px margins
556
+ - 16px gutters
557
+
558
+ **Mobile (≤393px)**
559
+ - Header: 4 columns
560
+ - Menu component added below header
561
+ - Main Content: 4 columns
562
+ - 16px margins and gutters
563
+
564
+ ### Usage Example
565
+
566
+ ```svelte
567
+ <!-- Site Grid -->
568
+ <div class="site-grid">
569
+ <div class="grid-margin-left"></div>
570
+ <header class="grid-header">Header Content</header>
571
+ <main class="grid-main">Main Content</main>
572
+ <footer class="grid-footer">Footer Content</footer>
573
+ <div class="grid-margin-right"></div>
574
+ </div>
575
+
576
+ <!-- Dashboard Grid -->
577
+ <div class="dashboard-grid">
578
+ <div class="grid-margin-left"></div>
579
+ <header class="dashboard-header-grid">
580
+ <!-- Header content with 12/8/4 columns based on viewport -->
581
+ </header>
582
+ <nav class="grid-sidebar">
583
+ <!-- Sidebar content (hidden on mobile) -->
584
+ </nav>
585
+ <main class="dashboard-main-grid">
586
+ <!-- Main content with 12/8/4 columns based on viewport -->
587
+ </main>
588
+ <div class="grid-margin-right"></div>
589
+ <!-- Mobile menu appears automatically on small screens -->
590
+ <div class="grid-menu">
591
+ <!-- Mobile menu content -->
592
+ </div>
593
+ </div>
594
+
595
+ <!-- App Grid -->
596
+ <div class="app-grid">
597
+ <div class="grid-margin-left"></div>
598
+ <header class="app-header-grid">
599
+ <!-- Header content with 12/8/4 columns based on viewport -->
600
+ </header>
601
+ <main class="app-main-grid">
602
+ <!-- Main content with 12/8/4 columns based on viewport -->
603
+ </main>
604
+ <div class="grid-margin-right"></div>
605
+ <!-- Mobile menu appears automatically on small screens -->
606
+ <div class="grid-menu">
607
+ <!-- Mobile menu content -->
608
+ </div>
609
+ </div>
610
+ ```
611
+
612
+ ### Grid Area Classes
613
+ The following classes are available to position elements within the grid:
614
+ ```css
615
+ .grid-header /* Header area */
616
+ .grid-main /* Main content area */
617
+ .grid-sidebar /* Sidebar area (dashboard only) */
618
+ .grid-footer /* Footer area (site only) */
619
+ .grid-toolbar /* Toolbar area (app only) */
620
+ .grid-margin-left /* Left margin area */
621
+ .grid-margin-right/* Right margin area */
622
+ .grid-menu /* Mobile menu area */
623
+ .grid-gap /* Gap area (dashboard only) */
624
+ ```
625
+
626
+ The grid system is designed to maintain consistent spacing and layout across different viewport sizes while adapting to the specific needs of each layout type (site, dashboard, and app).
627
+
628
+ ## DeleteConfirmation Component
629
+
630
+ The `DeleteConfirmation` component is a reusable confirmation dialog that can be used across different parts of the project for confirming deletion actions.
631
+
632
+ ### Features
633
+
634
+ - Independent of any specific store or state management system
635
+ - Customizable title, message, and button labels
636
+ - Works with any type of items to be deleted
637
+ - Dispatches events for both confirmation and cancellation
638
+
639
+ ### Usage
640
+
641
+ ```svelte
642
+ <script>
643
+ import { DeleteConfirmation } from '@widgetic/design-system/components';
644
+
645
+ let showDeleteConfirmation = false;
646
+ let itemsToDelete = [
647
+ { id: '1', name: 'Document.pdf', type: 'file' },
648
+ { id: '2', name: 'Images', type: 'folder' }
649
+ ];
650
+
651
+ function handleDelete(event) {
652
+ const deletedItems = event.detail.items;
653
+ console.log('Items to delete:', deletedItems);
654
+ // Perform deletion logic here
655
+ }
656
+
657
+ function handleCancel() {
658
+ showDeleteConfirmation = false;
659
+ console.log('Deletion cancelled');
660
+ }
661
+ </script>
662
+
663
+ <button on:click={() => showDeleteConfirmation = true}>
664
+ Delete Items
665
+ </button>
666
+
667
+ <DeleteConfirmation
668
+ bind:isOpen={showDeleteConfirmation}
669
+ items={itemsToDelete}
670
+ modalId="my-delete-confirmation"
671
+ on:delete={handleDelete}
672
+ on:cancel={handleCancel}
673
+ />
674
+ ```
675
+
676
+ ### Props
677
+
678
+ | Prop | Type | Default | Description |
679
+ |------|------|---------|-------------|
680
+ | `isOpen` | boolean | `false` | Controls the visibility of the modal |
681
+ | `items` | array | `[]` | Array of items to be deleted |
682
+ | `title` | string | `''` | Custom title for the modal (autogenerated if empty) |
683
+ | `message` | string | `''` | Custom message for the modal (autogenerated if empty) |
684
+ | `confirmLabel` | string | `'Confirm'` | Label for the confirm button |
685
+ | `cancelLabel` | string | `'Cancel'` | Label for the cancel button |
686
+ | `width` | string | `'410px'` | Width of the modal |
687
+ | `height` | string | `'168px'` | Height of the modal |
688
+ | `modalId` | string | `'delete-confirmation-modal'` | ID for targeting the modal |
689
+
690
+ ### Events
691
+
692
+ - `delete` - Dispatched when the user confirms deletion, with `items` in the event detail
693
+ - `cancel` - Dispatched when the user cancels deletion
694
+
695
+ ### Custom Title and Message Example
696
+
697
+ You can provide custom title and message for specific contexts:
698
+
699
+ ```svelte
700
+ <script>
701
+ import { DeleteConfirmation } from '@widgetic/design-system/components';
702
+
703
+ let showDeleteConfirmation = false;
704
+ let selectedItems = [
705
+ { id: '1', name: 'Document.pdf', type: 'file' },
706
+ { id: '2', name: 'Images', type: 'folder' }
707
+ ];
708
+
709
+ function handleDelete(event) {
710
+ const deletedItems = event.detail.items;
711
+ console.log('Items to delete:', deletedItems);
712
+ // Perform deletion logic here
713
+ }
714
+
715
+ function handleCancel() {
716
+ showDeleteConfirmation = false;
717
+ console.log('Deletion cancelled');
718
+ }
719
+ </script>
720
+
721
+ <DeleteConfirmation
722
+ bind:isOpen={showDeleteConfirmation}
723
+ items={selectedItems}
724
+ title="Delete Assets"
725
+ message="These assets will be permanently deleted. This action cannot be undone."
726
+ confirmLabel="Delete Permanently"
727
+ on:delete={handleDelete}
728
+ on:cancel={handleCancel}
729
+ />
730
+ ```