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,648 @@
1
+ # Button Component
2
+
3
+ The button component provides an interactive element for user actions. It supports multiple variants, sizes, states (loading, disabled), styles (outline, pill, circle), icons, and can function as both a button and link.
4
+
5
+ ## Table of Contents
6
+ - [Basic Usage](#basic-usage)
7
+ - [Properties](#properties)
8
+ - [Methods](#methods)
9
+ - [Examples](#examples)
10
+
11
+ ## Basic Usage
12
+
13
+ ```html
14
+ <snice-button>Click me</snice-button>
15
+ ```
16
+
17
+ ```typescript
18
+ import 'snice/components/button/snice-button';
19
+ ```
20
+
21
+ ## Properties
22
+
23
+ | Property | Type | Default | Description |
24
+ |----------|------|---------|-------------|
25
+ | `variant` | `'default' \| 'primary' \| 'success' \| 'warning' \| 'danger' \| 'text'` | `'default'` | Visual style variant |
26
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
27
+ | `disabled` | `boolean` | `false` | Disable the button |
28
+ | `loading` | `boolean` | `false` | Show loading spinner |
29
+ | `outline` | `boolean` | `false` | Use outline style |
30
+ | `pill` | `boolean` | `false` | Use pill (fully rounded) shape |
31
+ | `circle` | `boolean` | `false` | Use circle shape (icon only) |
32
+ | `href` | `string` | `''` | URL to navigate to (renders as link) |
33
+ | `target` | `string` | `''` | Link target attribute |
34
+ | `download` | `string` | `''` | Download attribute for file downloads |
35
+ | `icon` | `string` | `''` | Icon image URL |
36
+ | `iconPlacement` | `'start' \| 'end'` | `'start'` | Icon position relative to label |
37
+
38
+ ## Methods
39
+
40
+ #### `focus(options?: FocusOptions): void`
41
+ Focus the button programmatically.
42
+
43
+ ```typescript
44
+ button.focus();
45
+ button.focus({ preventScroll: true });
46
+ ```
47
+
48
+ #### `blur(): void`
49
+ Remove focus from the button.
50
+
51
+ ```typescript
52
+ button.blur();
53
+ ```
54
+
55
+ #### `click(): void`
56
+ Programmatically click the button.
57
+
58
+ ```typescript
59
+ button.click();
60
+ ```
61
+
62
+ ## Examples
63
+
64
+ ### Basic Buttons
65
+
66
+ ```html
67
+ <!-- Default button -->
68
+ <snice-button>Default</snice-button>
69
+
70
+ <!-- Primary button -->
71
+ <snice-button variant="primary">Primary</snice-button>
72
+
73
+ <!-- Success button -->
74
+ <snice-button variant="success">Success</snice-button>
75
+
76
+ <!-- Warning button -->
77
+ <snice-button variant="warning">Warning</snice-button>
78
+
79
+ <!-- Danger button -->
80
+ <snice-button variant="danger">Danger</snice-button>
81
+
82
+ <!-- Text button -->
83
+ <snice-button variant="text">Text Only</snice-button>
84
+ ```
85
+
86
+ ### Button Sizes
87
+
88
+ ```html
89
+ <snice-button size="small">Small</snice-button>
90
+ <snice-button size="medium">Medium</snice-button>
91
+ <snice-button size="large">Large</snice-button>
92
+ ```
93
+
94
+ ### Outline Buttons
95
+
96
+ ```html
97
+ <snice-button outline>Default Outline</snice-button>
98
+ <snice-button variant="primary" outline>Primary Outline</snice-button>
99
+ <snice-button variant="success" outline>Success Outline</snice-button>
100
+ <snice-button variant="warning" outline>Warning Outline</snice-button>
101
+ <snice-button variant="danger" outline>Danger Outline</snice-button>
102
+ ```
103
+
104
+ ### Pill Buttons
105
+
106
+ ```html
107
+ <snice-button pill>Default Pill</snice-button>
108
+ <snice-button variant="primary" pill>Primary Pill</snice-button>
109
+ <snice-button variant="success" pill>Success Pill</snice-button>
110
+ ```
111
+
112
+ ### Circle Buttons
113
+
114
+ ```html
115
+ <snice-button circle icon="/icons/plus.svg"></snice-button>
116
+ <snice-button variant="primary" circle icon="/icons/edit.svg"></snice-button>
117
+ <snice-button variant="danger" circle icon="/icons/delete.svg"></snice-button>
118
+ ```
119
+
120
+ ### Button States
121
+
122
+ ```html
123
+ <!-- Disabled -->
124
+ <snice-button disabled>Disabled</snice-button>
125
+ <snice-button variant="primary" disabled>Primary Disabled</snice-button>
126
+
127
+ <!-- Loading -->
128
+ <snice-button loading>Loading...</snice-button>
129
+ <snice-button variant="primary" loading>Saving...</snice-button>
130
+
131
+ <!-- Disabled and loading cannot be clicked -->
132
+ <snice-button disabled loading>Processing...</snice-button>
133
+ ```
134
+
135
+ ### Buttons with Icons
136
+
137
+ ```html
138
+ <!-- Icon at start (default) -->
139
+ <snice-button icon="/icons/arrow-right.svg">Next</snice-button>
140
+
141
+ <!-- Icon at end -->
142
+ <snice-button icon="/icons/external-link.svg" icon-placement="end">
143
+ Open Link
144
+ </snice-button>
145
+
146
+ <!-- Icon only -->
147
+ <snice-button circle icon="/icons/settings.svg"></snice-button>
148
+
149
+ <!-- With variants -->
150
+ <snice-button variant="primary" icon="/icons/save.svg">
151
+ Save
152
+ </snice-button>
153
+
154
+ <snice-button variant="danger" icon="/icons/trash.svg" outline>
155
+ Delete
156
+ </snice-button>
157
+ ```
158
+
159
+ ### Link Buttons
160
+
161
+ ```html
162
+ <!-- Basic link -->
163
+ <snice-button href="/page">Go to Page</snice-button>
164
+
165
+ <!-- External link -->
166
+ <snice-button href="https://example.com" target="_blank">
167
+ Visit Site
168
+ </snice-button>
169
+
170
+ <!-- Download link -->
171
+ <snice-button href="/files/document.pdf" download="document.pdf">
172
+ Download PDF
173
+ </snice-button>
174
+
175
+ <!-- Link with icon -->
176
+ <snice-button
177
+ href="/docs"
178
+ icon="/icons/book.svg"
179
+ variant="primary">
180
+ View Docs
181
+ </snice-button>
182
+ ```
183
+
184
+ ### Button Groups
185
+
186
+ ```html
187
+ <style>
188
+ .button-group {
189
+ display: inline-flex;
190
+ gap: 0.5rem;
191
+ }
192
+
193
+ .button-group--attached {
194
+ display: inline-flex;
195
+ gap: 0;
196
+ }
197
+
198
+ .button-group--attached snice-button:not(:first-child):not(:last-child) {
199
+ border-radius: 0;
200
+ }
201
+
202
+ .button-group--attached snice-button:first-child {
203
+ border-top-right-radius: 0;
204
+ border-bottom-right-radius: 0;
205
+ }
206
+
207
+ .button-group--attached snice-button:last-child {
208
+ border-top-left-radius: 0;
209
+ border-bottom-left-radius: 0;
210
+ }
211
+ </style>
212
+
213
+ <!-- Spaced group -->
214
+ <div class="button-group">
215
+ <snice-button>Cancel</snice-button>
216
+ <snice-button variant="primary">Save</snice-button>
217
+ </div>
218
+
219
+ <!-- Attached group -->
220
+ <div class="button-group--attached">
221
+ <snice-button outline>Left</snice-button>
222
+ <snice-button outline>Center</snice-button>
223
+ <snice-button outline>Right</snice-button>
224
+ </div>
225
+ ```
226
+
227
+ ### Form Buttons
228
+
229
+ ```html
230
+ <form id="user-form">
231
+ <label>
232
+ Name:
233
+ <input type="text" name="name" required>
234
+ </label>
235
+
236
+ <label>
237
+ Email:
238
+ <input type="email" name="email" required>
239
+ </label>
240
+
241
+ <div class="button-group">
242
+ <snice-button type="reset">Reset</snice-button>
243
+ <snice-button variant="primary" type="submit">Submit</snice-button>
244
+ </div>
245
+ </form>
246
+
247
+ <script type="module">
248
+ import 'snice/components/button/snice-button';
249
+
250
+ const form = document.getElementById('user-form');
251
+ const submitButton = form.querySelector('snice-button[type="submit"]');
252
+
253
+ form.addEventListener('submit', async (e) => {
254
+ e.preventDefault();
255
+
256
+ // Show loading state
257
+ submitButton.loading = true;
258
+ submitButton.textContent = 'Submitting...';
259
+
260
+ try {
261
+ const formData = new FormData(form);
262
+ const response = await fetch('/api/users', {
263
+ method: 'POST',
264
+ body: formData
265
+ });
266
+
267
+ if (!response.ok) throw new Error('Submission failed');
268
+
269
+ alert('Form submitted successfully!');
270
+ } catch (error) {
271
+ alert('Error: ' + error.message);
272
+ } finally {
273
+ // Reset loading state
274
+ submitButton.loading = false;
275
+ submitButton.textContent = 'Submit';
276
+ }
277
+ });
278
+ </script>
279
+ ```
280
+
281
+ ### Async Action Handling
282
+
283
+ ```html
284
+ <snice-button
285
+ id="save-btn"
286
+ variant="primary"
287
+ icon="/icons/save.svg">
288
+ Save Changes
289
+ </snice-button>
290
+
291
+ <script type="module">
292
+ import type { SniceButtonElement } from 'snice/components/button/snice-button.types';
293
+
294
+ const button = document.getElementById('save-btn') as SniceButtonElement;
295
+
296
+ button.addEventListener('click', async () => {
297
+ // Show loading state
298
+ button.loading = true;
299
+ const originalText = button.textContent;
300
+ button.textContent = 'Saving...';
301
+
302
+ try {
303
+ // Simulate API call
304
+ await new Promise(resolve => setTimeout(resolve, 2000));
305
+
306
+ // Success feedback
307
+ button.variant = 'success';
308
+ button.textContent = 'Saved!';
309
+
310
+ setTimeout(() => {
311
+ button.variant = 'primary';
312
+ button.textContent = originalText;
313
+ button.loading = false;
314
+ }, 1500);
315
+
316
+ } catch (error) {
317
+ // Error feedback
318
+ button.variant = 'danger';
319
+ button.textContent = 'Save Failed';
320
+ button.loading = false;
321
+
322
+ setTimeout(() => {
323
+ button.variant = 'primary';
324
+ button.textContent = originalText;
325
+ }, 2000);
326
+ }
327
+ });
328
+ </script>
329
+ ```
330
+
331
+ ### Confirmation Dialog
332
+
333
+ ```html
334
+ <snice-button
335
+ id="delete-btn"
336
+ variant="danger"
337
+ outline
338
+ icon="/icons/trash.svg">
339
+ Delete Account
340
+ </snice-button>
341
+
342
+ <script type="module">
343
+ import type { SniceButtonElement } from 'snice/components/button/snice-button.types';
344
+
345
+ const button = document.getElementById('delete-btn') as SniceButtonElement;
346
+
347
+ button.addEventListener('click', async () => {
348
+ const confirmed = confirm('Are you sure you want to delete your account? This action cannot be undone.');
349
+
350
+ if (!confirmed) return;
351
+
352
+ button.loading = true;
353
+ button.disabled = true;
354
+
355
+ try {
356
+ await fetch('/api/account', { method: 'DELETE' });
357
+ alert('Account deleted successfully');
358
+ window.location.href = '/goodbye';
359
+ } catch (error) {
360
+ alert('Failed to delete account');
361
+ button.loading = false;
362
+ button.disabled = false;
363
+ }
364
+ });
365
+ </script>
366
+ ```
367
+
368
+ ### Icon Buttons with Tooltips
369
+
370
+ ```html
371
+ <style>
372
+ .icon-button-group {
373
+ display: inline-flex;
374
+ gap: 0.5rem;
375
+ }
376
+ </style>
377
+
378
+ <div class="icon-button-group">
379
+ <snice-button
380
+ circle
381
+ icon="/icons/bold.svg"
382
+ variant="default"
383
+ outline
384
+ title="Bold">
385
+ </snice-button>
386
+
387
+ <snice-button
388
+ circle
389
+ icon="/icons/italic.svg"
390
+ variant="default"
391
+ outline
392
+ title="Italic">
393
+ </snice-button>
394
+
395
+ <snice-button
396
+ circle
397
+ icon="/icons/underline.svg"
398
+ variant="default"
399
+ outline
400
+ title="Underline">
401
+ </snice-button>
402
+ </div>
403
+ ```
404
+
405
+ ### Call-to-Action Buttons
406
+
407
+ ```html
408
+ <style>
409
+ .cta-section {
410
+ text-align: center;
411
+ padding: 3rem;
412
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
413
+ color: white;
414
+ border-radius: 0.5rem;
415
+ }
416
+
417
+ .cta-buttons {
418
+ display: flex;
419
+ gap: 1rem;
420
+ justify-content: center;
421
+ margin-top: 2rem;
422
+ }
423
+ </style>
424
+
425
+ <div class="cta-section">
426
+ <h2>Ready to get started?</h2>
427
+ <p>Join thousands of users already using our platform.</p>
428
+
429
+ <div class="cta-buttons">
430
+ <snice-button size="large" variant="default">
431
+ Learn More
432
+ </snice-button>
433
+ <snice-button size="large" variant="primary">
434
+ Get Started Free
435
+ </snice-button>
436
+ </div>
437
+ </div>
438
+ ```
439
+
440
+ ### Toolbar Buttons
441
+
442
+ ```html
443
+ <style>
444
+ .toolbar {
445
+ display: flex;
446
+ gap: 0.25rem;
447
+ padding: 0.5rem;
448
+ background: #f3f4f6;
449
+ border-radius: 0.375rem;
450
+ width: fit-content;
451
+ }
452
+ </style>
453
+
454
+ <div class="toolbar">
455
+ <snice-button circle icon="/icons/undo.svg" size="small" outline title="Undo"></snice-button>
456
+ <snice-button circle icon="/icons/redo.svg" size="small" outline title="Redo"></snice-button>
457
+ <div style="width: 1px; background: #d1d5db; margin: 0 0.25rem;"></div>
458
+ <snice-button circle icon="/icons/copy.svg" size="small" outline title="Copy"></snice-button>
459
+ <snice-button circle icon="/icons/paste.svg" size="small" outline title="Paste"></snice-button>
460
+ <snice-button circle icon="/icons/cut.svg" size="small" outline title="Cut"></snice-button>
461
+ <div style="width: 1px; background: #d1d5db; margin: 0 0.25rem;"></div>
462
+ <snice-button circle icon="/icons/align-left.svg" size="small" outline title="Align Left"></snice-button>
463
+ <snice-button circle icon="/icons/align-center.svg" size="small" outline title="Align Center"></snice-button>
464
+ <snice-button circle icon="/icons/align-right.svg" size="small" outline title="Align Right"></snice-button>
465
+ </div>
466
+ ```
467
+
468
+ ### Social Login Buttons
469
+
470
+ ```html
471
+ <style>
472
+ .social-buttons {
473
+ display: flex;
474
+ flex-direction: column;
475
+ gap: 0.75rem;
476
+ max-width: 20rem;
477
+ }
478
+ </style>
479
+
480
+ <div class="social-buttons">
481
+ <snice-button
482
+ variant="default"
483
+ icon="/icons/google.svg"
484
+ style="width: 100%;">
485
+ Continue with Google
486
+ </snice-button>
487
+
488
+ <snice-button
489
+ variant="default"
490
+ icon="/icons/github.svg"
491
+ style="width: 100%;">
492
+ Continue with GitHub
493
+ </snice-button>
494
+
495
+ <snice-button
496
+ variant="default"
497
+ icon="/icons/twitter.svg"
498
+ style="width: 100%;">
499
+ Continue with Twitter
500
+ </snice-button>
501
+ </div>
502
+ ```
503
+
504
+ ### Pagination Buttons
505
+
506
+ ```html
507
+ <style>
508
+ .pagination {
509
+ display: flex;
510
+ gap: 0.25rem;
511
+ align-items: center;
512
+ }
513
+ </style>
514
+
515
+ <div class="pagination">
516
+ <snice-button icon="/icons/chevron-left.svg" outline disabled>Previous</snice-button>
517
+
518
+ <snice-button outline>1</snice-button>
519
+ <snice-button variant="primary">2</snice-button>
520
+ <snice-button outline>3</snice-button>
521
+ <snice-button outline>4</snice-button>
522
+ <snice-button outline>5</snice-button>
523
+
524
+ <snice-button icon="/icons/chevron-right.svg" icon-placement="end" outline>Next</snice-button>
525
+ </div>
526
+ ```
527
+
528
+ ### Upload Button
529
+
530
+ ```html
531
+ <input type="file" id="file-input" style="display: none;" accept="image/*">
532
+
533
+ <snice-button
534
+ id="upload-btn"
535
+ variant="primary"
536
+ icon="/icons/upload.svg">
537
+ Upload Image
538
+ </snice-button>
539
+
540
+ <script type="module">
541
+ import type { SniceButtonElement } from 'snice/components/button/snice-button.types';
542
+
543
+ const button = document.getElementById('upload-btn') as SniceButtonElement;
544
+ const input = document.getElementById('file-input');
545
+
546
+ button.addEventListener('click', () => {
547
+ input.click();
548
+ });
549
+
550
+ input.addEventListener('change', async (e) => {
551
+ const file = e.target.files[0];
552
+ if (!file) return;
553
+
554
+ button.loading = true;
555
+ button.textContent = 'Uploading...';
556
+
557
+ try {
558
+ const formData = new FormData();
559
+ formData.append('file', file);
560
+
561
+ const response = await fetch('/api/upload', {
562
+ method: 'POST',
563
+ body: formData
564
+ });
565
+
566
+ if (!response.ok) throw new Error('Upload failed');
567
+
568
+ button.variant = 'success';
569
+ button.textContent = 'Uploaded!';
570
+
571
+ setTimeout(() => {
572
+ button.variant = 'primary';
573
+ button.textContent = 'Upload Image';
574
+ button.loading = false;
575
+ }, 2000);
576
+
577
+ } catch (error) {
578
+ alert('Upload failed: ' + error.message);
579
+ button.textContent = 'Upload Image';
580
+ button.loading = false;
581
+ }
582
+ });
583
+ </script>
584
+ ```
585
+
586
+ ## Accessibility
587
+
588
+ - **Keyboard support**: Fully keyboard accessible with Enter and Space
589
+ - **Focus indicators**: Clear focus states for keyboard navigation
590
+ - **ARIA attributes**: Proper roles and states for screen readers
591
+ - **Disabled state**: Properly disabled buttons cannot be focused or activated
592
+ - **Link semantics**: When using href, renders as accessible link
593
+
594
+ ## Browser Support
595
+
596
+ - Modern browsers (Chrome, Firefox, Safari, Edge)
597
+ - Requires Custom Elements v1 and Shadow DOM support
598
+
599
+ ## Best Practices
600
+
601
+ 1. **Use appropriate variants**: Choose colors that match the action's importance
602
+ 2. **Provide clear labels**: Button text should describe the action
603
+ 3. **Show loading states**: Indicate async operations with loading prop
604
+ 4. **Disable during actions**: Prevent double-clicks during processing
605
+ 5. **Use icons wisely**: Icons should enhance, not replace text (except circle buttons)
606
+ 6. **Group related buttons**: Use button groups for related actions
607
+ 7. **Make primary actions prominent**: Use primary variant for main actions
608
+ 8. **Avoid too many buttons**: Limit choices to prevent decision fatigue
609
+ 9. **Test keyboard navigation**: Ensure all buttons work without a mouse
610
+ 10. **Provide feedback**: Show success/error states after actions
611
+
612
+ ## Common Patterns
613
+
614
+ ### Primary Action
615
+ ```html
616
+ <snice-button variant="primary">Save Changes</snice-button>
617
+ ```
618
+
619
+ ### Secondary Action
620
+ ```html
621
+ <snice-button variant="default">Cancel</snice-button>
622
+ ```
623
+
624
+ ### Destructive Action
625
+ ```html
626
+ <snice-button variant="danger" outline>Delete</snice-button>
627
+ ```
628
+
629
+ ### Icon-Only Action
630
+ ```html
631
+ <snice-button circle icon="/icons/edit.svg"></snice-button>
632
+ ```
633
+
634
+ ### Form Submit
635
+ ```html
636
+ <snice-button variant="primary" type="submit">Submit</snice-button>
637
+ ```
638
+
639
+ ## Variant Colors
640
+
641
+ | Variant | Color Scheme | Use Case |
642
+ |---------|-------------|----------|
643
+ | `default` | Gray | Secondary actions, cancel |
644
+ | `primary` | Blue | Primary actions, submit |
645
+ | `success` | Green | Confirmations, positive actions |
646
+ | `warning` | Orange | Caution actions, important notices |
647
+ | `danger` | Red | Destructive actions, delete |
648
+ | `text` | Transparent | Tertiary actions, links |