snice 3.1.0 → 3.3.0

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 (464) hide show
  1. package/README.md +90 -41
  2. package/dist/components/accordion/snice-accordion-item.d.ts +2 -2
  3. package/dist/components/accordion/snice-accordion-item.js +9 -9
  4. package/dist/components/accordion/snice-accordion-item.js.map +1 -1
  5. package/dist/components/accordion/snice-accordion.d.ts +2 -2
  6. package/dist/components/accordion/snice-accordion.js +9 -9
  7. package/dist/components/accordion/snice-accordion.js.map +1 -1
  8. package/dist/components/actions/snice-actions.d.ts +28 -0
  9. package/dist/components/actions/snice-actions.js +220 -0
  10. package/dist/components/actions/snice-actions.js.map +1 -0
  11. package/dist/components/actions/snice-actions.types.d.ts +27 -0
  12. package/dist/components/alert/snice-alert.d.ts +2 -2
  13. package/dist/components/alert/snice-alert.js +9 -9
  14. package/dist/components/alert/snice-alert.js.map +1 -1
  15. package/dist/components/audio-recorder/snice-audio-recorder.d.ts +58 -0
  16. package/dist/components/audio-recorder/snice-audio-recorder.js +413 -0
  17. package/dist/components/audio-recorder/snice-audio-recorder.js.map +1 -0
  18. package/dist/components/audio-recorder/snice-audio-recorder.types.d.ts +28 -0
  19. package/dist/components/avatar/snice-avatar.d.ts +2 -2
  20. package/dist/components/avatar/snice-avatar.js +9 -9
  21. package/dist/components/avatar/snice-avatar.js.map +1 -1
  22. package/dist/components/badge/snice-badge.d.ts +2 -2
  23. package/dist/components/badge/snice-badge.js +10 -10
  24. package/dist/components/badge/snice-badge.js.map +1 -1
  25. package/dist/components/banner/snice-banner.d.ts +22 -0
  26. package/dist/components/banner/snice-banner.js +180 -0
  27. package/dist/components/banner/snice-banner.js.map +1 -0
  28. package/dist/components/banner/snice-banner.types.d.ts +14 -0
  29. package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +2 -2
  30. package/dist/components/breadcrumbs/snice-breadcrumbs.js +9 -9
  31. package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
  32. package/dist/components/button/snice-button.d.ts +2 -2
  33. package/dist/components/button/snice-button.js +9 -9
  34. package/dist/components/button/snice-button.js.map +1 -1
  35. package/dist/components/calendar/snice-calendar.d.ts +46 -0
  36. package/dist/components/calendar/snice-calendar.js +294 -0
  37. package/dist/components/calendar/snice-calendar.js.map +1 -0
  38. package/dist/components/calendar/snice-calendar.types.d.ts +34 -0
  39. package/dist/components/camera/snice-camera.d.ts +39 -0
  40. package/dist/components/camera/snice-camera.js +286 -0
  41. package/dist/components/camera/snice-camera.js.map +1 -0
  42. package/dist/components/camera/snice-camera.types.d.ts +28 -0
  43. package/dist/components/card/snice-card.d.ts +2 -2
  44. package/dist/components/card/snice-card.js +9 -9
  45. package/dist/components/card/snice-card.js.map +1 -1
  46. package/dist/components/carousel/snice-carousel.d.ts +32 -0
  47. package/dist/components/carousel/snice-carousel.js +279 -0
  48. package/dist/components/carousel/snice-carousel.js.map +1 -0
  49. package/dist/components/carousel/snice-carousel.types.d.ts +22 -0
  50. package/dist/components/chart/snice-chart.d.ts +73 -0
  51. package/dist/components/chart/snice-chart.js +940 -0
  52. package/dist/components/chart/snice-chart.js.map +1 -0
  53. package/dist/components/chart/snice-chart.types.d.ts +71 -0
  54. package/dist/components/chat/snice-chat.d.ts +98 -0
  55. package/dist/components/chat/snice-chat.js +589 -0
  56. package/dist/components/chat/snice-chat.js.map +1 -0
  57. package/dist/components/chat/snice-chat.types.d.ts +141 -0
  58. package/dist/components/checkbox/snice-checkbox.d.ts +2 -2
  59. package/dist/components/checkbox/snice-checkbox.js +9 -9
  60. package/dist/components/checkbox/snice-checkbox.js.map +1 -1
  61. package/dist/components/chip/snice-chip.d.ts +2 -2
  62. package/dist/components/chip/snice-chip.js +9 -9
  63. package/dist/components/chip/snice-chip.js.map +1 -1
  64. package/dist/components/code-block/snice-code-block.d.ts +15 -0
  65. package/dist/components/code-block/snice-code-block.js +141 -0
  66. package/dist/components/code-block/snice-code-block.js.map +1 -0
  67. package/dist/components/code-block/snice-code-block.types.d.ts +15 -0
  68. package/dist/components/color-display/snice-color-display.d.ts +14 -0
  69. package/dist/components/color-display/snice-color-display.js +151 -0
  70. package/dist/components/color-display/snice-color-display.js.map +1 -0
  71. package/dist/components/color-display/snice-color-display.types.d.ts +10 -0
  72. package/dist/components/color-picker/snice-color-picker.d.ts +50 -0
  73. package/dist/components/color-picker/snice-color-picker.js +489 -0
  74. package/dist/components/color-picker/snice-color-picker.js.map +1 -0
  75. package/dist/components/color-picker/snice-color-picker.types.d.ts +19 -0
  76. package/dist/components/command-palette/snice-command-palette.d.ts +47 -0
  77. package/dist/components/command-palette/snice-command-palette.js +428 -0
  78. package/dist/components/command-palette/snice-command-palette.js.map +1 -0
  79. package/dist/components/command-palette/snice-command-palette.types.d.ts +49 -0
  80. package/dist/components/date-picker/snice-date-picker.d.ts +2 -2
  81. package/dist/components/date-picker/snice-date-picker.js +10 -10
  82. package/dist/components/date-picker/snice-date-picker.js.map +1 -1
  83. package/dist/components/divider/snice-divider.d.ts +2 -2
  84. package/dist/components/divider/snice-divider.js +9 -9
  85. package/dist/components/divider/snice-divider.js.map +1 -1
  86. package/dist/components/doc/snice-doc.d.ts +93 -0
  87. package/dist/components/doc/snice-doc.js +626 -0
  88. package/dist/components/doc/snice-doc.js.map +1 -0
  89. package/dist/components/doc/snice-doc.types.d.ts +118 -0
  90. package/dist/components/draw/snice-draw.d.ts +71 -0
  91. package/dist/components/draw/snice-draw.js +709 -0
  92. package/dist/components/draw/snice-draw.js.map +1 -0
  93. package/dist/components/draw/snice-draw.types.d.ts +41 -0
  94. package/dist/components/drawer/snice-drawer.d.ts +2 -2
  95. package/dist/components/drawer/snice-drawer.js +9 -9
  96. package/dist/components/drawer/snice-drawer.js.map +1 -1
  97. package/dist/components/empty-state/snice-empty-state.d.ts +13 -0
  98. package/dist/components/empty-state/snice-empty-state.js +121 -0
  99. package/dist/components/empty-state/snice-empty-state.js.map +1 -0
  100. package/dist/components/empty-state/snice-empty-state.types.d.ts +9 -0
  101. package/dist/components/file-upload/snice-file-upload.d.ts +44 -0
  102. package/dist/components/file-upload/snice-file-upload.js +387 -0
  103. package/dist/components/file-upload/snice-file-upload.js.map +1 -0
  104. package/dist/components/file-upload/snice-file-upload.types.d.ts +22 -0
  105. package/dist/components/gantt/snice-gantt.d.ts +29 -0
  106. package/dist/components/gantt/snice-gantt.js +268 -0
  107. package/dist/components/gantt/snice-gantt.js.map +1 -0
  108. package/dist/components/gantt/snice-gantt.types.d.ts +23 -0
  109. package/dist/components/image/snice-image.d.ts +22 -0
  110. package/dist/components/image/snice-image.js +201 -0
  111. package/dist/components/image/snice-image.js.map +1 -0
  112. package/dist/components/image/snice-image.types.d.ts +17 -0
  113. package/dist/components/input/snice-input.d.ts +2 -2
  114. package/dist/components/input/snice-input.js +9 -9
  115. package/dist/components/input/snice-input.js.map +1 -1
  116. package/dist/components/kanban/snice-kanban.d.ts +31 -0
  117. package/dist/components/kanban/snice-kanban.js +243 -0
  118. package/dist/components/kanban/snice-kanban.js.map +1 -0
  119. package/dist/components/kanban/snice-kanban.types.d.ts +29 -0
  120. package/dist/components/kpi/snice-kpi.d.ts +16 -0
  121. package/dist/components/kpi/snice-kpi.js +162 -0
  122. package/dist/components/kpi/snice-kpi.js.map +1 -0
  123. package/dist/components/kpi/snice-kpi.types.d.ts +12 -0
  124. package/dist/components/layout/snice-layout-blog.d.ts +2 -2
  125. package/dist/components/layout/snice-layout-blog.js +9 -9
  126. package/dist/components/layout/snice-layout-blog.js.map +1 -1
  127. package/dist/components/layout/snice-layout-card.d.ts +2 -2
  128. package/dist/components/layout/snice-layout-card.js +9 -9
  129. package/dist/components/layout/snice-layout-card.js.map +1 -1
  130. package/dist/components/layout/snice-layout-centered.d.ts +2 -2
  131. package/dist/components/layout/snice-layout-centered.js +9 -9
  132. package/dist/components/layout/snice-layout-centered.js.map +1 -1
  133. package/dist/components/layout/snice-layout-dashboard.d.ts +2 -2
  134. package/dist/components/layout/snice-layout-dashboard.js +9 -9
  135. package/dist/components/layout/snice-layout-dashboard.js.map +1 -1
  136. package/dist/components/layout/snice-layout-fullscreen.d.ts +2 -2
  137. package/dist/components/layout/snice-layout-fullscreen.js +9 -9
  138. package/dist/components/layout/snice-layout-fullscreen.js.map +1 -1
  139. package/dist/components/layout/snice-layout-landing.d.ts +2 -2
  140. package/dist/components/layout/snice-layout-landing.js +9 -9
  141. package/dist/components/layout/snice-layout-landing.js.map +1 -1
  142. package/dist/components/layout/snice-layout-minimal.d.ts +2 -2
  143. package/dist/components/layout/snice-layout-minimal.js +9 -9
  144. package/dist/components/layout/snice-layout-minimal.js.map +1 -1
  145. package/dist/components/layout/snice-layout-sidebar.d.ts +2 -2
  146. package/dist/components/layout/snice-layout-sidebar.js +9 -9
  147. package/dist/components/layout/snice-layout-sidebar.js.map +1 -1
  148. package/dist/components/layout/snice-layout-split.d.ts +2 -2
  149. package/dist/components/layout/snice-layout-split.js +9 -9
  150. package/dist/components/layout/snice-layout-split.js.map +1 -1
  151. package/dist/components/layout/snice-layout.d.ts +2 -2
  152. package/dist/components/layout/snice-layout.js +9 -9
  153. package/dist/components/layout/snice-layout.js.map +1 -1
  154. package/dist/components/link/snice-link.d.ts +13 -0
  155. package/dist/components/link/snice-link.js +137 -0
  156. package/dist/components/link/snice-link.js.map +1 -0
  157. package/dist/components/link/snice-link.types.d.ts +11 -0
  158. package/dist/components/list/snice-list-item.d.ts +6 -0
  159. package/dist/components/list/snice-list-item.js +68 -0
  160. package/dist/components/list/snice-list-item.js.map +1 -0
  161. package/dist/components/list/snice-list.d.ts +23 -0
  162. package/dist/components/list/snice-list.js +270 -0
  163. package/dist/components/list/snice-list.js.map +1 -0
  164. package/dist/components/list/snice-list.types.d.ts +28 -0
  165. package/dist/components/location/snice-location.d.ts +35 -0
  166. package/dist/components/location/snice-location.js +238 -0
  167. package/dist/components/location/snice-location.js.map +1 -0
  168. package/dist/components/location/snice-location.types.d.ts +35 -0
  169. package/dist/components/login/snice-login.d.ts +2 -2
  170. package/dist/components/login/snice-login.js +9 -9
  171. package/dist/components/login/snice-login.js.map +1 -1
  172. package/dist/components/menu/snice-menu-divider.d.ts +4 -0
  173. package/dist/components/menu/snice-menu-divider.js +53 -0
  174. package/dist/components/menu/snice-menu-divider.js.map +1 -0
  175. package/dist/components/menu/snice-menu-item.d.ts +10 -0
  176. package/dist/components/menu/snice-menu-item.js +99 -0
  177. package/dist/components/menu/snice-menu-item.js.map +1 -0
  178. package/dist/components/menu/snice-menu-item.types.d.ts +9 -0
  179. package/dist/components/menu/snice-menu.d.ts +27 -0
  180. package/dist/components/menu/snice-menu.js +199 -0
  181. package/dist/components/menu/snice-menu.js.map +1 -0
  182. package/dist/components/menu/snice-menu.types.d.ts +18 -0
  183. package/dist/components/modal/snice-modal.d.ts +2 -2
  184. package/dist/components/modal/snice-modal.js +9 -9
  185. package/dist/components/modal/snice-modal.js.map +1 -1
  186. package/dist/components/nav/snice-nav.js +1 -1
  187. package/dist/components/nav/snice-nav.js.map +1 -1
  188. package/dist/components/pagination/snice-pagination.d.ts +2 -2
  189. package/dist/components/pagination/snice-pagination.js +8 -8
  190. package/dist/components/pagination/snice-pagination.js.map +1 -1
  191. package/dist/components/progress/snice-progress.d.ts +2 -2
  192. package/dist/components/progress/snice-progress.js +9 -9
  193. package/dist/components/progress/snice-progress.js.map +1 -1
  194. package/dist/components/qr-code/qrcode.d.ts +28 -0
  195. package/dist/components/qr-code/qrcode.js +906 -0
  196. package/dist/components/qr-code/qrcode.js.map +1 -0
  197. package/dist/components/qr-code/snice-qr-code.d.ts +35 -0
  198. package/dist/components/qr-code/snice-qr-code.js +256 -0
  199. package/dist/components/qr-code/snice-qr-code.js.map +1 -0
  200. package/dist/components/qr-code/snice-qr-code.types.d.ts +33 -0
  201. package/dist/components/radio/snice-radio.d.ts +2 -2
  202. package/dist/components/radio/snice-radio.js +9 -9
  203. package/dist/components/radio/snice-radio.js.map +1 -1
  204. package/dist/components/select/snice-option.d.ts +2 -2
  205. package/dist/components/select/snice-option.js +8 -8
  206. package/dist/components/select/snice-option.js.map +1 -1
  207. package/dist/components/select/snice-select.d.ts +2 -2
  208. package/dist/components/select/snice-select.js +9 -9
  209. package/dist/components/select/snice-select.js.map +1 -1
  210. package/dist/components/skeleton/snice-skeleton.d.ts +2 -2
  211. package/dist/components/skeleton/snice-skeleton.js +9 -9
  212. package/dist/components/skeleton/snice-skeleton.js.map +1 -1
  213. package/dist/components/slider/snice-slider.d.ts +53 -0
  214. package/dist/components/slider/snice-slider.js +479 -0
  215. package/dist/components/slider/snice-slider.js.map +1 -0
  216. package/dist/components/slider/snice-slider.types.d.ts +26 -0
  217. package/dist/components/snice-cell-C0slgOpe.js +4 -0
  218. package/dist/components/snice-cell-C0slgOpe.js.map +1 -0
  219. package/dist/components/sparkline/snice-sparkline.d.ts +21 -0
  220. package/dist/components/sparkline/snice-sparkline.js +228 -0
  221. package/dist/components/sparkline/snice-sparkline.js.map +1 -0
  222. package/dist/components/sparkline/snice-sparkline.types.d.ts +16 -0
  223. package/dist/components/spinner/snice-spinner.d.ts +10 -0
  224. package/dist/components/spinner/snice-spinner.js +109 -0
  225. package/dist/components/spinner/snice-spinner.js.map +1 -0
  226. package/dist/components/spinner/snice-spinner.types.d.ts +8 -0
  227. package/dist/components/split-pane/snice-split-pane.d.ts +32 -0
  228. package/dist/components/split-pane/snice-split-pane.js +191 -0
  229. package/dist/components/split-pane/snice-split-pane.js.map +1 -0
  230. package/dist/components/split-pane/snice-split-pane.types.d.ts +19 -0
  231. package/dist/components/stat/snice-stat.d.ts +14 -0
  232. package/dist/components/stat/snice-stat.js +140 -0
  233. package/dist/components/stat/snice-stat.js.map +1 -0
  234. package/dist/components/stat/snice-stat.types.d.ts +12 -0
  235. package/dist/components/stepper/snice-stepper-panel.d.ts +8 -0
  236. package/dist/components/stepper/snice-stepper-panel.js +70 -0
  237. package/dist/components/stepper/snice-stepper-panel.js.map +1 -0
  238. package/dist/components/stepper/snice-stepper-panel.types.d.ts +4 -0
  239. package/dist/components/stepper/snice-stepper.d.ts +15 -0
  240. package/dist/components/stepper/snice-stepper.js +163 -0
  241. package/dist/components/stepper/snice-stepper.js.map +1 -0
  242. package/dist/components/stepper/snice-stepper.types.d.ts +13 -0
  243. package/dist/components/switch/snice-switch.d.ts +2 -2
  244. package/dist/components/switch/snice-switch.js +9 -9
  245. package/dist/components/switch/snice-switch.js.map +1 -1
  246. package/dist/components/table/snice-cell-actions.d.ts +2 -2
  247. package/dist/components/table/snice-cell-actions.js +9 -9
  248. package/dist/components/table/snice-cell-actions.js.map +1 -1
  249. package/dist/components/table/snice-cell-boolean.d.ts +2 -2
  250. package/dist/components/table/snice-cell-boolean.js +9 -9
  251. package/dist/components/table/snice-cell-boolean.js.map +1 -1
  252. package/dist/components/table/snice-cell-color.d.ts +2 -2
  253. package/dist/components/table/snice-cell-color.js +9 -9
  254. package/dist/components/table/snice-cell-color.js.map +1 -1
  255. package/dist/components/table/snice-cell-currency.d.ts +2 -2
  256. package/dist/components/table/snice-cell-currency.js +9 -9
  257. package/dist/components/table/snice-cell-currency.js.map +1 -1
  258. package/dist/components/table/snice-cell-date.d.ts +2 -2
  259. package/dist/components/table/snice-cell-date.js +9 -9
  260. package/dist/components/table/snice-cell-date.js.map +1 -1
  261. package/dist/components/table/snice-cell-duration.d.ts +2 -2
  262. package/dist/components/table/snice-cell-duration.js +9 -9
  263. package/dist/components/table/snice-cell-duration.js.map +1 -1
  264. package/dist/components/table/snice-cell-email.d.ts +2 -2
  265. package/dist/components/table/snice-cell-email.js +9 -9
  266. package/dist/components/table/snice-cell-email.js.map +1 -1
  267. package/dist/components/table/snice-cell-filesize.d.ts +2 -2
  268. package/dist/components/table/snice-cell-filesize.js +9 -9
  269. package/dist/components/table/snice-cell-filesize.js.map +1 -1
  270. package/dist/components/table/snice-cell-image.d.ts +2 -2
  271. package/dist/components/table/snice-cell-image.js +9 -9
  272. package/dist/components/table/snice-cell-image.js.map +1 -1
  273. package/dist/components/table/snice-cell-json.d.ts +2 -2
  274. package/dist/components/table/snice-cell-json.js +9 -9
  275. package/dist/components/table/snice-cell-json.js.map +1 -1
  276. package/dist/components/table/snice-cell-link.d.ts +2 -2
  277. package/dist/components/table/snice-cell-link.js +9 -9
  278. package/dist/components/table/snice-cell-link.js.map +1 -1
  279. package/dist/components/table/snice-cell-location.d.ts +2 -2
  280. package/dist/components/table/snice-cell-location.js +9 -9
  281. package/dist/components/table/snice-cell-location.js.map +1 -1
  282. package/dist/components/table/snice-cell-number.d.ts +2 -2
  283. package/dist/components/table/snice-cell-number.js +9 -9
  284. package/dist/components/table/snice-cell-number.js.map +1 -1
  285. package/dist/components/table/snice-cell-percentage.d.ts +2 -2
  286. package/dist/components/table/snice-cell-percentage.js +9 -9
  287. package/dist/components/table/snice-cell-percentage.js.map +1 -1
  288. package/dist/components/table/snice-cell-phone.d.ts +2 -2
  289. package/dist/components/table/snice-cell-phone.js +9 -9
  290. package/dist/components/table/snice-cell-phone.js.map +1 -1
  291. package/dist/components/table/snice-cell-progress.d.ts +2 -2
  292. package/dist/components/table/snice-cell-progress.js +9 -9
  293. package/dist/components/table/snice-cell-progress.js.map +1 -1
  294. package/dist/components/table/snice-cell-rating.d.ts +2 -2
  295. package/dist/components/table/snice-cell-rating.js +9 -9
  296. package/dist/components/table/snice-cell-rating.js.map +1 -1
  297. package/dist/components/table/snice-cell-sparkline.d.ts +2 -2
  298. package/dist/components/table/snice-cell-sparkline.js +9 -9
  299. package/dist/components/table/snice-cell-sparkline.js.map +1 -1
  300. package/dist/components/table/snice-cell-status.d.ts +2 -2
  301. package/dist/components/table/snice-cell-status.js +9 -9
  302. package/dist/components/table/snice-cell-status.js.map +1 -1
  303. package/dist/components/table/snice-cell-tag.d.ts +2 -2
  304. package/dist/components/table/snice-cell-tag.js +9 -9
  305. package/dist/components/table/snice-cell-tag.js.map +1 -1
  306. package/dist/components/table/snice-cell-text.d.ts +2 -2
  307. package/dist/components/table/snice-cell-text.js +9 -9
  308. package/dist/components/table/snice-cell-text.js.map +1 -1
  309. package/dist/components/table/snice-cell.d.ts +2 -2
  310. package/dist/components/table/snice-cell.js +9 -9
  311. package/dist/components/table/snice-cell.js.map +1 -1
  312. package/dist/components/table/snice-column.d.ts +1 -1
  313. package/dist/components/table/snice-column.js +4 -4
  314. package/dist/components/table/snice-column.js.map +1 -1
  315. package/dist/components/table/snice-header.d.ts +2 -2
  316. package/dist/components/table/snice-header.js +9 -9
  317. package/dist/components/table/snice-header.js.map +1 -1
  318. package/dist/components/table/snice-progress.d.ts +2 -2
  319. package/dist/components/table/snice-progress.js +8 -8
  320. package/dist/components/table/snice-progress.js.map +1 -1
  321. package/dist/components/table/snice-rating.d.ts +2 -2
  322. package/dist/components/table/snice-rating.js +8 -8
  323. package/dist/components/table/snice-rating.js.map +1 -1
  324. package/dist/components/table/snice-row.d.ts +2 -2
  325. package/dist/components/table/snice-row.js +10 -10
  326. package/dist/components/table/snice-row.js.map +1 -1
  327. package/dist/components/table/snice-table.d.ts +2 -3
  328. package/dist/components/table/snice-table.js +9 -14
  329. package/dist/components/table/snice-table.js.map +1 -1
  330. package/dist/components/tabs/snice-tab-panel.d.ts +2 -2
  331. package/dist/components/tabs/snice-tab-panel.js +9 -9
  332. package/dist/components/tabs/snice-tab-panel.js.map +1 -1
  333. package/dist/components/tabs/snice-tab.d.ts +2 -2
  334. package/dist/components/tabs/snice-tab.js +9 -9
  335. package/dist/components/tabs/snice-tab.js.map +1 -1
  336. package/dist/components/tabs/snice-tabs.d.ts +2 -2
  337. package/dist/components/tabs/snice-tabs.js +9 -9
  338. package/dist/components/tabs/snice-tabs.js.map +1 -1
  339. package/dist/components/terminal/snice-terminal.types.d.ts +133 -0
  340. package/dist/components/textarea/snice-textarea.d.ts +52 -0
  341. package/dist/components/textarea/snice-textarea.js +407 -0
  342. package/dist/components/textarea/snice-textarea.js.map +1 -0
  343. package/dist/components/textarea/snice-textarea.types.d.ts +30 -0
  344. package/dist/components/timeline/snice-timeline.d.ts +11 -0
  345. package/dist/components/timeline/snice-timeline.js +112 -0
  346. package/dist/components/timeline/snice-timeline.js.map +1 -0
  347. package/dist/components/timeline/snice-timeline.types.d.ts +16 -0
  348. package/dist/components/toast/snice-toast-container.d.ts +2 -2
  349. package/dist/components/toast/snice-toast-container.js +8 -8
  350. package/dist/components/toast/snice-toast-container.js.map +1 -1
  351. package/dist/components/toast/snice-toast.d.ts +2 -2
  352. package/dist/components/toast/snice-toast.js +8 -8
  353. package/dist/components/toast/snice-toast.js.map +1 -1
  354. package/dist/components/tooltip/snice-tooltip.d.ts +2 -2
  355. package/dist/components/tooltip/snice-tooltip.js +10 -10
  356. package/dist/components/tooltip/snice-tooltip.js.map +1 -1
  357. package/dist/components/tree/snice-tree-item.d.ts +35 -0
  358. package/dist/components/tree/snice-tree-item.js +301 -0
  359. package/dist/components/tree/snice-tree-item.js.map +1 -0
  360. package/dist/components/tree/snice-tree-item.types.d.ts +30 -0
  361. package/dist/components/tree/snice-tree.d.ts +45 -0
  362. package/dist/components/tree/snice-tree.js +390 -0
  363. package/dist/components/tree/snice-tree.js.map +1 -0
  364. package/dist/components/tree/snice-tree.types.d.ts +65 -0
  365. package/dist/components/virtual-scroller/snice-virtual-scroller.d.ts +31 -0
  366. package/dist/components/virtual-scroller/snice-virtual-scroller.js +160 -0
  367. package/dist/components/virtual-scroller/snice-virtual-scroller.js.map +1 -0
  368. package/dist/components/virtual-scroller/snice-virtual-scroller.types.d.ts +19 -0
  369. package/dist/index.cjs +125 -158
  370. package/dist/index.cjs.map +1 -1
  371. package/dist/index.esm.js +125 -158
  372. package/dist/index.esm.js.map +1 -1
  373. package/dist/index.iife.js +125 -158
  374. package/dist/index.iife.js.map +1 -1
  375. package/dist/parts.d.ts +13 -16
  376. package/dist/symbols.cjs +1 -1
  377. package/dist/symbols.esm.js +1 -1
  378. package/dist/template.d.ts +0 -1
  379. package/dist/transitions.cjs +1 -1
  380. package/dist/transitions.esm.js +1 -1
  381. package/docs/ai/README.md +10 -1
  382. package/docs/ai/components/actions.md +81 -0
  383. package/docs/ai/components/audio-recorder.md +97 -0
  384. package/docs/ai/components/banner.md +84 -0
  385. package/docs/ai/components/calendar.md +95 -0
  386. package/docs/ai/components/camera.md +130 -0
  387. package/docs/ai/components/carousel.md +49 -0
  388. package/docs/ai/components/chart.md +160 -0
  389. package/docs/ai/components/chat.md +189 -0
  390. package/docs/ai/components/code-block.md +32 -0
  391. package/docs/ai/components/color-display.md +48 -0
  392. package/docs/ai/components/color-picker.md +75 -0
  393. package/docs/ai/components/command-palette.md +117 -0
  394. package/docs/ai/components/doc.md +154 -0
  395. package/docs/ai/components/draw.md +140 -0
  396. package/docs/ai/components/empty-state.md +72 -0
  397. package/docs/ai/components/file-upload.md +93 -0
  398. package/docs/ai/components/gantt.md +95 -0
  399. package/docs/ai/components/image.md +60 -0
  400. package/docs/ai/components/kanban.md +102 -0
  401. package/docs/ai/components/kpi.md +158 -0
  402. package/docs/ai/components/layout.md +261 -0
  403. package/docs/ai/components/link.md +77 -0
  404. package/docs/ai/components/list.md +50 -0
  405. package/docs/ai/components/location.md +75 -0
  406. package/docs/ai/components/menu.md +114 -0
  407. package/docs/ai/components/popover.md +70 -0
  408. package/docs/ai/components/qr-code.md +106 -0
  409. package/docs/ai/components/slider.md +87 -0
  410. package/docs/ai/components/sparkline.md +168 -0
  411. package/docs/ai/components/spinner.md +47 -0
  412. package/docs/ai/components/split-pane.md +71 -0
  413. package/docs/ai/components/stat.md +29 -0
  414. package/docs/ai/components/stepper.md +216 -0
  415. package/docs/ai/components/textarea.md +87 -0
  416. package/docs/ai/components/timeline.md +77 -0
  417. package/docs/ai/components/tree.md +191 -0
  418. package/docs/ai/components/virtual-scroller.md +71 -0
  419. package/docs/components/actions.md +317 -0
  420. package/docs/components/alert.md +540 -0
  421. package/docs/components/audio-recorder.md +152 -0
  422. package/docs/components/badge.md +593 -0
  423. package/docs/components/banner.md +106 -0
  424. package/docs/components/breadcrumbs.md +568 -0
  425. package/docs/components/button.md +648 -0
  426. package/docs/components/calendar.md +397 -0
  427. package/docs/components/camera.md +383 -0
  428. package/docs/components/card.md +778 -0
  429. package/docs/components/carousel.md +63 -0
  430. package/docs/components/chart.md +526 -0
  431. package/docs/components/chat.md +482 -0
  432. package/docs/components/checkbox.md +714 -0
  433. package/docs/components/chip.md +670 -0
  434. package/docs/components/code-block.md +49 -0
  435. package/docs/components/color-display.md +96 -0
  436. package/docs/components/color-picker.md +81 -0
  437. package/docs/components/command-palette.md +159 -0
  438. package/docs/components/doc.md +357 -0
  439. package/docs/components/draw.md +307 -0
  440. package/docs/components/empty-state.md +79 -0
  441. package/docs/components/file-upload.md +263 -0
  442. package/docs/components/gantt.md +347 -0
  443. package/docs/components/image.md +110 -0
  444. package/docs/components/kanban.md +410 -0
  445. package/docs/components/kpi.md +251 -0
  446. package/docs/components/link.md +229 -0
  447. package/docs/components/list.md +65 -0
  448. package/docs/components/location.md +369 -0
  449. package/docs/components/menu.md +633 -0
  450. package/docs/components/popover.md +333 -0
  451. package/docs/components/qr-code.md +464 -0
  452. package/docs/components/slider.md +297 -0
  453. package/docs/components/sparkline.md +293 -0
  454. package/docs/components/spinner.md +63 -0
  455. package/docs/components/split-pane.md +315 -0
  456. package/docs/components/stat.md +45 -0
  457. package/docs/components/stepper.md +410 -0
  458. package/docs/components/textarea.md +235 -0
  459. package/docs/components/timeline.md +192 -0
  460. package/docs/components/tree.md +536 -0
  461. package/docs/components/virtual-scroller.md +298 -0
  462. package/package.json +2 -1
  463. package/dist/components/snice-cell-BLFVdxPp.js +0 -4
  464. package/dist/components/snice-cell-BLFVdxPp.js.map +0 -1
@@ -0,0 +1,307 @@
1
+ # Draw Component
2
+
3
+ Canvas drawing with smooth lazy-brush technology.
4
+
5
+ ## Basic Usage
6
+
7
+ ```html
8
+ <snice-draw id="draw" width="800" height="600"></snice-draw>
9
+
10
+ <script>
11
+ const draw = document.getElementById('draw');
12
+
13
+ // Clear canvas
14
+ draw.clear();
15
+
16
+ // Undo/redo
17
+ draw.undo();
18
+ draw.redo();
19
+
20
+ // Download
21
+ draw.download('my-drawing.png');
22
+ </script>
23
+ ```
24
+
25
+ ## Properties
26
+
27
+ | Property | Type | Default | Description |
28
+ |----------|------|---------|-------------|
29
+ | `width` | `number` | `800` | Canvas width |
30
+ | `height` | `number` | `600` | Canvas height |
31
+ | `tool` | `DrawTool` | `'pen'` | Drawing tool |
32
+ | `color` | `string` | `'#000000'` | Brush color |
33
+ | `strokeWidth` | `number` | `2` | Brush width |
34
+ | `backgroundColor` | `string` | `'#ffffff'` | Canvas background |
35
+ | `lazy` | `boolean` | `false` | Enable lazy brush |
36
+ | `lazyRadius` | `number` | `60` | Lazy brush radius |
37
+ | `friction` | `number` | `0.1` | Lazy brush friction |
38
+ | `smoothing` | `number` | `0.5` | Line smoothing (0-1) |
39
+ | `autoPolygon` | `boolean` | `false` | Enable auto-polygon |
40
+ | `polygonCurvePoints` | `number` | `10` | Polygon curve smoothness (2-30) |
41
+ | `disabled` | `boolean` | `false` | Disable drawing |
42
+
43
+ ## Tools
44
+
45
+ - `'pen'` - Draw with brush
46
+ - `'eraser'` - Erase strokes
47
+ - `'line'` - Draw straight lines
48
+ - `'rectangle'` - Draw rectangles
49
+ - `'circle'` - Draw circles
50
+ - `'text'` - Add text
51
+
52
+ ## Methods
53
+
54
+ ### `clear(): void`
55
+ Clear the entire canvas.
56
+
57
+ ### `undo(): void`
58
+ Undo last stroke.
59
+
60
+ ### `redo(): void`
61
+ Redo previously undone stroke.
62
+
63
+ ### `toDataURL(type?, quality?): string`
64
+ Export as data URL.
65
+
66
+ ### `toBlob(type?, quality?): Promise<Blob>`
67
+ Export as Blob.
68
+
69
+ ### `download(filename?): void`
70
+ Download drawing.
71
+
72
+ ### `loadImage(url): Promise<void>`
73
+ Load image onto canvas.
74
+
75
+ ### `getStrokes(): DrawStroke[]`
76
+ Get all strokes.
77
+
78
+ ### `setStrokes(strokes): void`
79
+ Set strokes (for loading saved drawings).
80
+
81
+ ## Events
82
+
83
+ - `@snice/draw-start` - Drawing started
84
+ - `@snice/draw-end` - Drawing ended (stroke complete)
85
+ - `@snice/draw-clear` - Canvas cleared
86
+ - `@snice/draw-undo` - Undo performed
87
+ - `@snice/draw-redo` - Redo performed
88
+
89
+ ## Examples
90
+
91
+ ### Basic Drawing
92
+
93
+ ```html
94
+ <snice-draw width="800" height="600"></snice-draw>
95
+ ```
96
+
97
+ ### Custom Colors
98
+
99
+ ```javascript
100
+ const draw = document.querySelector('snice-draw');
101
+ draw.color = '#ff0000';
102
+ draw.strokeWidth = 5;
103
+ ```
104
+
105
+ ### Toolbar Integration
106
+
107
+ ```html
108
+ <div>
109
+ <button onclick="draw.tool = 'pen'">Pen</button>
110
+ <button onclick="draw.tool = 'eraser'">Eraser</button>
111
+ <input type="color" oninput="draw.color = this.value">
112
+ <button onclick="draw.clear()">Clear</button>
113
+ <button onclick="draw.undo()">Undo</button>
114
+ <button onclick="draw.redo()">Redo</button>
115
+ </div>
116
+
117
+ <snice-draw id="draw"></snice-draw>
118
+ ```
119
+
120
+ ### Lazy Brush Settings
121
+
122
+ ```javascript
123
+ // More responsive (smaller radius)
124
+ draw.lazyRadius = 10;
125
+
126
+ // Very smooth (larger radius)
127
+ draw.lazyRadius = 60;
128
+
129
+ // Disable lazy brush
130
+ draw.lazy = false;
131
+ ```
132
+
133
+ ### Export Drawing
134
+
135
+ ```javascript
136
+ // As data URL
137
+ const dataURL = draw.toDataURL('image/png');
138
+
139
+ // As blob
140
+ const blob = await draw.toBlob('image/png', 0.9);
141
+
142
+ // Download
143
+ draw.download('my-artwork.png');
144
+ ```
145
+
146
+ ### Save and Load
147
+
148
+ Each stroke has a unique ID for tracking and manipulation:
149
+
150
+ ```javascript
151
+ // Save drawing
152
+ const strokes = draw.getStrokes();
153
+ localStorage.setItem('drawing', JSON.stringify(strokes));
154
+
155
+ // Load drawing
156
+ const saved = JSON.parse(localStorage.getItem('drawing'));
157
+ draw.setStrokes(saved);
158
+
159
+ // Access individual strokes by ID
160
+ const strokes = draw.getStrokes();
161
+ console.log(strokes[0].id); // e.g., "stroke-1735216842123-x7k9m2p"
162
+
163
+ // Filter strokes
164
+ const penStrokes = strokes.filter(s => s.tool === 'pen');
165
+
166
+ // Remove specific stroke
167
+ const filtered = strokes.filter(s => s.id !== 'stroke-id-to-remove');
168
+ draw.setStrokes(filtered);
169
+ ```
170
+
171
+ **Stroke Structure:**
172
+
173
+ ```typescript
174
+ interface DrawStroke {
175
+ id: string; // Unique identifier
176
+ tool: DrawTool; // 'pen' | 'eraser' | etc
177
+ color: string; // Hex color
178
+ width: number; // Stroke width
179
+ points: Point[]; // Array of {x, y, pressure?}
180
+ timestamp: number; // Creation time (ms)
181
+ }
182
+ ```
183
+
184
+ ### Load Background Image
185
+
186
+ ```javascript
187
+ await draw.loadImage('background.jpg');
188
+ ```
189
+
190
+ ### Event Handling
191
+
192
+ ```javascript
193
+ draw.addEventListener('@snice/draw-end', (e) => {
194
+ const stroke = e.detail.stroke;
195
+ console.log(`Drew ${stroke.points.length} points`);
196
+
197
+ // Auto-save
198
+ saveDrawing();
199
+ });
200
+ ```
201
+
202
+ ### Keyboard Shortcuts
203
+
204
+ ```javascript
205
+ document.addEventListener('keydown', (e) => {
206
+ if (e.ctrlKey || e.metaKey) {
207
+ if (e.key === 'z') {
208
+ e.preventDefault();
209
+ if (e.shiftKey) {
210
+ draw.redo();
211
+ } else {
212
+ draw.undo();
213
+ }
214
+ }
215
+ }
216
+ });
217
+ ```
218
+
219
+ ## Lazy Brush
220
+
221
+ The lazy brush creates smooth, organic lines by making the brush lag behind your cursor within a configurable radius. This eliminates jitter and produces professional-looking strokes.
222
+
223
+ **How it works:**
224
+ 1. Cursor moves freely
225
+ 2. Brush follows within `lazyRadius`
226
+ 3. Creates smooth curves
227
+ 4. Reduces hand tremor effects
228
+
229
+ **Tips:**
230
+ - Larger radius = smoother, slower response
231
+ - Smaller radius = more control, less smoothing
232
+ - Disable for pixel-perfect control
233
+
234
+ ## Auto-Polygon
235
+
236
+ Auto-polygon automatically processes completed strokes into closed shapes. When you finish drawing (release the mouse/pointer), it analyzes the stroke and applies smart shape completion.
237
+
238
+ **Features:**
239
+
240
+ 1. **Self-Intersection Detection**
241
+ - Detects when your stroke crosses itself
242
+ - Automatically trims at the first intersection point
243
+ - Creates a clean closed shape without excess
244
+
245
+ 2. **Auto-Close Open Shapes**
246
+ - If start and end points are far apart (>20px)
247
+ - Connects them with a smooth quadratic curve
248
+ - Curve adapts to the gap distance
249
+
250
+ **Properties:**
251
+
252
+ - `autoPolygon` - Enable/disable the feature (default: `false`)
253
+ - `polygonCurvePoints` - Curve smoothness, 2-30 (default: `10`)
254
+ - Lower values (2-5): Sharp, direct connection
255
+ - Medium values (10-15): Balanced smooth curve
256
+ - Higher values (20-30): Very smooth, organic curve
257
+
258
+ **Example:**
259
+
260
+ ```javascript
261
+ const draw = document.querySelector('snice-draw');
262
+
263
+ // Enable auto-polygon
264
+ draw.autoPolygon = true;
265
+
266
+ // Adjust curve smoothness
267
+ draw.polygonCurvePoints = 15; // Smoother curves
268
+ ```
269
+
270
+ ```html
271
+ <snice-draw
272
+ auto-polygon
273
+ polygon-curve-points="15">
274
+ </snice-draw>
275
+ ```
276
+
277
+ **Use Cases:**
278
+
279
+ - Sketching closed shapes quickly
280
+ - Drawing polygons without precision
281
+ - Creating organic forms that auto-complete
282
+ - UI wireframing and mockups
283
+ - Diagram creation
284
+
285
+ **How It Works:**
286
+
287
+ The algorithm processes strokes on `pointerup`:
288
+
289
+ 1. Simplify points (sample every 5th point for performance)
290
+ 2. Check for self-intersections using line-line intersection
291
+ 3. If intersection found: trim and close at that point
292
+ 4. If no intersection and gap >20px: generate curve points
293
+ 5. Use quadratic Bezier with perpendicular control point
294
+ 6. Insert interpolated points for smooth rendering
295
+
296
+ ## Browser Support
297
+
298
+ - Modern browsers with Canvas API
299
+ - Pointer Events API for touch support
300
+ - Works on desktop and mobile
301
+
302
+ ## Performance
303
+
304
+ - Optimized canvas rendering
305
+ - Efficient stroke storage
306
+ - Smooth 60fps drawing
307
+ - Touch and stylus pressure support
@@ -0,0 +1,79 @@
1
+ # Empty State Component
2
+
3
+ The `<snice-empty-state>` component provides a consistent way to display empty or no-data states.
4
+
5
+ ## Basic Usage
6
+
7
+ ```html
8
+ <snice-empty-state
9
+ icon="📭"
10
+ title="No data"
11
+ description="There's nothing here yet"
12
+ ></snice-empty-state>
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Default | Description |
18
+ |----------|------|---------|-------------|
19
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size variant |
20
+ | `icon` | `string` | `'📭'` | Icon (emoji or text) |
21
+ | `title` | `string` | `'No data'` | Title text |
22
+ | `description` | `string` | `''` | Description text |
23
+ | `actionText` | `string` | `''` | Action button text |
24
+ | `actionHref` | `string` | `''` | Action link URL |
25
+
26
+ ## Events
27
+
28
+ ### `@snice/empty-state-action`
29
+ Fired when action button/link is clicked.
30
+
31
+ ## Examples
32
+
33
+ ### No Search Results
34
+
35
+ ```html
36
+ <snice-empty-state
37
+ icon="🔍"
38
+ title="No results found"
39
+ description="Try adjusting your search criteria"
40
+ action-text="Clear Search"
41
+ ></snice-empty-state>
42
+ ```
43
+
44
+ ### Empty List
45
+
46
+ ```html
47
+ <snice-empty-state
48
+ icon="📦"
49
+ title="No items yet"
50
+ description="Get started by creating your first item"
51
+ action-text="Create Item"
52
+ ></snice-empty-state>
53
+ ```
54
+
55
+ ### 404 Page
56
+
57
+ ```html
58
+ <snice-empty-state
59
+ icon="🤷"
60
+ title="Page not found"
61
+ description="The page you're looking for doesn't exist"
62
+ action-text="Go Home"
63
+ action-href="/"
64
+ ></snice-empty-state>
65
+ ```
66
+
67
+ ### With Custom Content
68
+
69
+ ```html
70
+ <snice-empty-state
71
+ icon="🎨"
72
+ title="No projects"
73
+ >
74
+ <div slot="">
75
+ <button>Create Project</button>
76
+ <button>Import Project</button>
77
+ </div>
78
+ </snice-empty-state>
79
+ ```
@@ -0,0 +1,263 @@
1
+ # File Upload Component
2
+
3
+ The `<snice-file-upload>` component provides a file upload interface with drag-and-drop support, file previews, and validation.
4
+
5
+ ## Table of Contents
6
+ - [Basic Usage](#basic-usage)
7
+ - [Properties](#properties)
8
+ - [Methods](#methods)
9
+ - [Events](#events)
10
+ - [Features](#features)
11
+ - [Examples](#examples)
12
+
13
+ ## Basic Usage
14
+
15
+ ```html
16
+ <snice-file-upload
17
+ label="Upload Documents"
18
+ accept=".pdf,.doc,.docx"
19
+ max-size="5242880"
20
+ ></snice-file-upload>
21
+ ```
22
+
23
+ ```typescript
24
+ import 'snice/components/file-upload/snice-file-upload';
25
+
26
+ const upload = document.querySelector('snice-file-upload');
27
+ upload.addEventListener('@snice/file-upload-change', (e) => {
28
+ console.log('Files:', e.detail.files);
29
+ });
30
+ ```
31
+
32
+ ## Properties
33
+
34
+ | Property | Type | Default | Description |
35
+ |----------|------|---------|-------------|
36
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size variant |
37
+ | `variant` | `'outlined' \| 'filled'` | `'outlined'` | Visual style variant |
38
+ | `accept` | `string` | `''` | Allowed file types (same as input accept) |
39
+ | `multiple` | `boolean` | `false` | Allow multiple file selection |
40
+ | `label` | `string` | `''` | Label text |
41
+ | `helperText` | `string` | `''` | Helper text below upload area |
42
+ | `errorText` | `string` | `''` | Error message (shown when invalid) |
43
+ | `disabled` | `boolean` | `false` | Whether upload is disabled |
44
+ | `required` | `boolean` | `false` | Whether upload is required |
45
+ | `invalid` | `boolean` | `false` | Whether to show invalid state |
46
+ | `maxSize` | `number` | `-1` | Maximum file size in bytes (-1 = no limit) |
47
+ | `maxFiles` | `number` | `-1` | Maximum number of files (-1 = no limit) |
48
+ | `name` | `string` | `''` | Form field name |
49
+ | `dragDrop` | `boolean` | `true` | Enable drag-and-drop |
50
+ | `showPreview` | `boolean` | `true` | Show image previews |
51
+ | `files` | `FileList \| null` | `null` | Selected files (read-only) |
52
+
53
+ ## Methods
54
+
55
+ ### `clear(): void`
56
+ Remove all selected files.
57
+
58
+ ```typescript
59
+ upload.clear();
60
+ ```
61
+
62
+ ### `removeFile(index: number): void`
63
+ Remove a specific file by index.
64
+
65
+ ```typescript
66
+ upload.removeFile(0); // Remove first file
67
+ ```
68
+
69
+ ## Events
70
+
71
+ ### `@snice/file-upload-change`
72
+ Fired when files are added or removed.
73
+
74
+ **Detail**: `{ files: File[], fileUpload: SniceFileUploadElement }`
75
+
76
+ ```typescript
77
+ upload.addEventListener('@snice/file-upload-change', (e) => {
78
+ console.log('Selected files:', e.detail.files);
79
+ e.detail.files.forEach(file => {
80
+ console.log(`- ${file.name} (${file.size} bytes)`);
81
+ });
82
+ });
83
+ ```
84
+
85
+ ### `@snice/file-upload-error`
86
+ Fired when file validation fails.
87
+
88
+ **Detail**: `{ message: string, fileUpload: SniceFileUploadElement }`
89
+
90
+ ```typescript
91
+ upload.addEventListener('@snice/file-upload-error', (e) => {
92
+ console.error('Upload error:', e.detail.message);
93
+ });
94
+ ```
95
+
96
+ ## Features
97
+
98
+ - **Drag and Drop**: Native drag-and-drop support with visual feedback
99
+ - **Image Preview**: Automatic thumbnail generation for image files
100
+ - **File Validation**: Size and type validation with error messaging
101
+ - **Multiple Files**: Support for single or multiple file selection
102
+ - **File Management**: Add and remove files before upload
103
+ - **Form Integration**: Form-associated custom element
104
+ - **Accessibility**: Full keyboard support and ARIA attributes
105
+
106
+ ## Examples
107
+
108
+ ### Basic Upload
109
+
110
+ ```html
111
+ <snice-file-upload
112
+ label="Upload File"
113
+ helper-text="Choose a file to upload"
114
+ ></snice-file-upload>
115
+ ```
116
+
117
+ ### Image Upload with Preview
118
+
119
+ ```html
120
+ <snice-file-upload
121
+ label="Upload Image"
122
+ accept="image/*"
123
+ max-size="2097152"
124
+ helper-text="Maximum 2MB, images only"
125
+ ></snice-file-upload>
126
+ ```
127
+
128
+ ### Multiple Files
129
+
130
+ ```html
131
+ <snice-file-upload
132
+ label="Upload Documents"
133
+ accept=".pdf,.doc,.docx"
134
+ multiple
135
+ max-files="5"
136
+ helper-text="Select up to 5 documents"
137
+ ></snice-file-upload>
138
+ ```
139
+
140
+ ### Without Drag-and-Drop
141
+
142
+ ```html
143
+ <snice-file-upload
144
+ label="Upload File"
145
+ drag-drop="false"
146
+ ></snice-file-upload>
147
+ ```
148
+
149
+ ### Different Sizes
150
+
151
+ ```html
152
+ <snice-file-upload size="small" label="Small"></snice-file-upload>
153
+ <snice-file-upload size="medium" label="Medium"></snice-file-upload>
154
+ <snice-file-upload size="large" label="Large"></snice-file-upload>
155
+ ```
156
+
157
+ ### Different Variants
158
+
159
+ ```html
160
+ <snice-file-upload variant="outlined" label="Outlined"></snice-file-upload>
161
+ <snice-file-upload variant="filled" label="Filled"></snice-file-upload>
162
+ ```
163
+
164
+ ### Error State
165
+
166
+ ```html
167
+ <snice-file-upload
168
+ label="Resume"
169
+ invalid
170
+ error-text="Please upload your resume"
171
+ required
172
+ ></snice-file-upload>
173
+ ```
174
+
175
+ ### File Type Restrictions
176
+
177
+ ```html
178
+ <!-- Images only -->
179
+ <snice-file-upload accept="image/*" label="Images"></snice-file-upload>
180
+
181
+ <!-- Specific formats -->
182
+ <snice-file-upload accept=".pdf,.doc,.docx" label="Documents"></snice-file-upload>
183
+
184
+ <!-- Multiple types -->
185
+ <snice-file-upload accept="image/*,.pdf" label="Images and PDFs"></snice-file-upload>
186
+ ```
187
+
188
+ ### With Size Validation
189
+
190
+ ```html
191
+ <snice-file-upload
192
+ label="Upload Photo"
193
+ accept="image/*"
194
+ max-size="5242880"
195
+ helper-text="Maximum 5MB"
196
+ ></snice-file-upload>
197
+
198
+ <script>
199
+ const upload = document.querySelector('snice-file-upload');
200
+ upload.addEventListener('@snice/file-upload-error', (e) => {
201
+ alert(e.detail.message);
202
+ });
203
+ </script>
204
+ ```
205
+
206
+ ### Form Integration
207
+
208
+ ```html
209
+ <form id="upload-form">
210
+ <snice-file-upload
211
+ name="documents"
212
+ label="Upload Documents"
213
+ accept=".pdf,.doc,.docx"
214
+ multiple
215
+ required
216
+ ></snice-file-upload>
217
+
218
+ <button type="submit">Submit</button>
219
+ </form>
220
+
221
+ <script>
222
+ document.getElementById('upload-form').addEventListener('submit', async (e) => {
223
+ e.preventDefault();
224
+
225
+ const formData = new FormData(e.target);
226
+ const files = formData.getAll('documents');
227
+
228
+ console.log(`Uploading ${files.length} file(s)...`);
229
+
230
+ // Upload to server
231
+ const response = await fetch('/api/upload', {
232
+ method: 'POST',
233
+ body: formData
234
+ });
235
+
236
+ console.log('Upload complete!');
237
+ });
238
+ </script>
239
+ ```
240
+
241
+ ### Managing Files Programmatically
242
+
243
+ ```html
244
+ <snice-file-upload id="file-upload" multiple></snice-file-upload>
245
+ <button onclick="clearFiles()">Clear All</button>
246
+ <button onclick="removeFirst()">Remove First</button>
247
+
248
+ <script>
249
+ const upload = document.getElementById('file-upload');
250
+
251
+ function clearFiles() {
252
+ upload.clear();
253
+ }
254
+
255
+ function removeFirst() {
256
+ upload.removeFile(0);
257
+ }
258
+
259
+ upload.addEventListener('@snice/file-upload-change', (e) => {
260
+ console.log(`${e.detail.files.length} file(s) selected`);
261
+ });
262
+ </script>
263
+ ```