@widgetic/design-system 0.3.89 → 0.5.8

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