snice 2.5.4 → 3.1.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 (323) hide show
  1. package/README.md +501 -882
  2. package/bin/templates/base/src/components/counter-button.ts +13 -26
  3. package/bin/templates/base/src/controllers/counter-controller.ts +3 -3
  4. package/dist/components/accordion/snice-accordion-item.d.ts +4 -5
  5. package/dist/components/accordion/snice-accordion-item.js +37 -39
  6. package/dist/components/accordion/snice-accordion-item.js.map +1 -1
  7. package/dist/components/accordion/snice-accordion.d.ts +5 -11
  8. package/dist/components/accordion/snice-accordion.js +51 -52
  9. package/dist/components/accordion/snice-accordion.js.map +1 -1
  10. package/dist/components/alert/snice-alert.d.ts +2 -6
  11. package/dist/components/alert/snice-alert.js +41 -56
  12. package/dist/components/alert/snice-alert.js.map +1 -1
  13. package/dist/components/avatar/snice-avatar.d.ts +2 -6
  14. package/dist/components/avatar/snice-avatar.js +64 -71
  15. package/dist/components/avatar/snice-avatar.js.map +1 -1
  16. package/dist/components/badge/snice-badge.d.ts +2 -3
  17. package/dist/components/badge/snice-badge.js +22 -23
  18. package/dist/components/badge/snice-badge.js.map +1 -1
  19. package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +5 -12
  20. package/dist/components/breadcrumbs/snice-breadcrumbs.js +88 -89
  21. package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
  22. package/dist/components/button/snice-button.d.ts +3 -7
  23. package/dist/components/button/snice-button.js +37 -58
  24. package/dist/components/button/snice-button.js.map +1 -1
  25. package/dist/components/card/snice-card.d.ts +5 -8
  26. package/dist/components/card/snice-card.js +71 -56
  27. package/dist/components/card/snice-card.js.map +1 -1
  28. package/dist/components/checkbox/snice-checkbox.d.ts +4 -13
  29. package/dist/components/checkbox/snice-checkbox.js +66 -137
  30. package/dist/components/checkbox/snice-checkbox.js.map +1 -1
  31. package/dist/components/chip/snice-chip.d.ts +5 -11
  32. package/dist/components/chip/snice-chip.js +44 -47
  33. package/dist/components/chip/snice-chip.js.map +1 -1
  34. package/dist/components/date-picker/snice-date-picker.d.ts +11 -11
  35. package/dist/components/date-picker/snice-date-picker.js +134 -133
  36. package/dist/components/date-picker/snice-date-picker.js.map +1 -1
  37. package/dist/components/divider/snice-divider.d.ts +2 -4
  38. package/dist/components/divider/snice-divider.js +14 -22
  39. package/dist/components/divider/snice-divider.js.map +1 -1
  40. package/dist/components/drawer/snice-drawer.d.ts +4 -4
  41. package/dist/components/drawer/snice-drawer.js +25 -19
  42. package/dist/components/drawer/snice-drawer.js.map +1 -1
  43. package/dist/components/input/snice-input.d.ts +8 -6
  44. package/dist/components/input/snice-input.js +122 -105
  45. package/dist/components/input/snice-input.js.map +1 -1
  46. package/dist/components/layout/snice-layout-blog.d.ts +4 -4
  47. package/dist/components/layout/snice-layout-blog.js +21 -19
  48. package/dist/components/layout/snice-layout-blog.js.map +1 -1
  49. package/dist/components/layout/snice-layout-card.d.ts +2 -2
  50. package/dist/components/layout/snice-layout-card.js +16 -9
  51. package/dist/components/layout/snice-layout-card.js.map +1 -1
  52. package/dist/components/layout/snice-layout-centered.d.ts +2 -2
  53. package/dist/components/layout/snice-layout-centered.js +14 -7
  54. package/dist/components/layout/snice-layout-centered.js.map +1 -1
  55. package/dist/components/layout/snice-layout-dashboard.d.ts +5 -5
  56. package/dist/components/layout/snice-layout-dashboard.js +38 -30
  57. package/dist/components/layout/snice-layout-dashboard.js.map +1 -1
  58. package/dist/components/layout/snice-layout-fullscreen.d.ts +2 -2
  59. package/dist/components/layout/snice-layout-fullscreen.js +17 -10
  60. package/dist/components/layout/snice-layout-fullscreen.js.map +1 -1
  61. package/dist/components/layout/snice-layout-landing.d.ts +4 -4
  62. package/dist/components/layout/snice-layout-landing.js +21 -19
  63. package/dist/components/layout/snice-layout-landing.js.map +1 -1
  64. package/dist/components/layout/snice-layout-minimal.d.ts +2 -2
  65. package/dist/components/layout/snice-layout-minimal.js +17 -6
  66. package/dist/components/layout/snice-layout-minimal.js.map +1 -1
  67. package/dist/components/layout/snice-layout-sidebar.d.ts +5 -4
  68. package/dist/components/layout/snice-layout-sidebar.js +42 -20
  69. package/dist/components/layout/snice-layout-sidebar.js.map +1 -1
  70. package/dist/components/layout/snice-layout-split.d.ts +2 -2
  71. package/dist/components/layout/snice-layout-split.js +14 -7
  72. package/dist/components/layout/snice-layout-split.js.map +1 -1
  73. package/dist/components/layout/snice-layout.d.ts +4 -4
  74. package/dist/components/layout/snice-layout.js +16 -10
  75. package/dist/components/layout/snice-layout.js.map +1 -1
  76. package/dist/components/login/snice-login.d.ts +6 -11
  77. package/dist/components/login/snice-login.js +97 -71
  78. package/dist/components/login/snice-login.js.map +1 -1
  79. package/dist/components/modal/snice-modal.d.ts +5 -9
  80. package/dist/components/modal/snice-modal.js +47 -78
  81. package/dist/components/modal/snice-modal.js.map +1 -1
  82. package/dist/components/nav/snice-nav.d.ts +13 -7
  83. package/dist/components/nav/snice-nav.js +191 -100
  84. package/dist/components/nav/snice-nav.js.map +1 -1
  85. package/dist/components/nav/snice-nav.types.d.ts +3 -3
  86. package/dist/components/pagination/snice-pagination.d.ts +6 -7
  87. package/dist/components/pagination/snice-pagination.js +94 -81
  88. package/dist/components/pagination/snice-pagination.js.map +1 -1
  89. package/dist/components/progress/snice-progress.d.ts +2 -7
  90. package/dist/components/progress/snice-progress.js +41 -98
  91. package/dist/components/progress/snice-progress.js.map +1 -1
  92. package/dist/components/radio/snice-radio.d.ts +4 -4
  93. package/dist/components/radio/snice-radio.js +52 -44
  94. package/dist/components/radio/snice-radio.js.map +1 -1
  95. package/dist/components/select/snice-option.d.ts +2 -1
  96. package/dist/components/select/snice-option.js +12 -5
  97. package/dist/components/select/snice-option.js.map +1 -1
  98. package/dist/components/select/snice-select.d.ts +9 -21
  99. package/dist/components/select/snice-select.js +98 -170
  100. package/dist/components/select/snice-select.js.map +1 -1
  101. package/dist/components/skeleton/snice-skeleton.d.ts +2 -6
  102. package/dist/components/skeleton/snice-skeleton.js +18 -49
  103. package/dist/components/skeleton/snice-skeleton.js.map +1 -1
  104. package/dist/components/snice-cell-BLFVdxPp.js +4 -0
  105. package/dist/components/snice-cell-BLFVdxPp.js.map +1 -0
  106. package/dist/components/switch/snice-switch.d.ts +2 -2
  107. package/dist/components/switch/snice-switch.js +38 -26
  108. package/dist/components/switch/snice-switch.js.map +1 -1
  109. package/dist/components/table/snice-cell-actions.d.ts +24 -0
  110. package/dist/components/table/snice-cell-actions.js +149 -0
  111. package/dist/components/table/snice-cell-actions.js.map +1 -0
  112. package/dist/components/table/snice-cell-boolean.d.ts +2 -2
  113. package/dist/components/table/snice-cell-boolean.js +13 -7
  114. package/dist/components/table/snice-cell-boolean.js.map +1 -1
  115. package/dist/components/table/snice-cell-color.d.ts +18 -0
  116. package/dist/components/table/snice-cell-color.js +149 -0
  117. package/dist/components/table/snice-cell-color.js.map +1 -0
  118. package/dist/components/table/snice-cell-currency.d.ts +24 -0
  119. package/dist/components/table/snice-cell-currency.js +235 -0
  120. package/dist/components/table/snice-cell-currency.js.map +1 -0
  121. package/dist/components/table/snice-cell-date.d.ts +2 -2
  122. package/dist/components/table/snice-cell-date.js +14 -8
  123. package/dist/components/table/snice-cell-date.js.map +1 -1
  124. package/dist/components/table/snice-cell-duration.d.ts +2 -2
  125. package/dist/components/table/snice-cell-duration.js +12 -6
  126. package/dist/components/table/snice-cell-duration.js.map +1 -1
  127. package/dist/components/table/snice-cell-email.d.ts +15 -0
  128. package/dist/components/table/snice-cell-email.js +125 -0
  129. package/dist/components/table/snice-cell-email.js.map +1 -0
  130. package/dist/components/table/snice-cell-filesize.d.ts +2 -2
  131. package/dist/components/table/snice-cell-filesize.js +12 -6
  132. package/dist/components/table/snice-cell-filesize.js.map +1 -1
  133. package/dist/components/table/snice-cell-image.d.ts +20 -0
  134. package/dist/components/table/snice-cell-image.js +162 -0
  135. package/dist/components/table/snice-cell-image.js.map +1 -0
  136. package/dist/components/table/snice-cell-json.d.ts +20 -0
  137. package/dist/components/table/snice-cell-json.js +186 -0
  138. package/dist/components/table/snice-cell-json.js.map +1 -0
  139. package/dist/components/table/snice-cell-link.d.ts +17 -0
  140. package/dist/components/table/snice-cell-link.js +142 -0
  141. package/dist/components/table/snice-cell-link.js.map +1 -0
  142. package/dist/components/table/snice-cell-location.d.ts +19 -0
  143. package/dist/components/table/snice-cell-location.js +185 -0
  144. package/dist/components/table/snice-cell-location.js.map +1 -0
  145. package/dist/components/table/snice-cell-number.d.ts +2 -2
  146. package/dist/components/table/snice-cell-number.js +12 -6
  147. package/dist/components/table/snice-cell-number.js.map +1 -1
  148. package/dist/components/table/snice-cell-percentage.d.ts +22 -0
  149. package/dist/components/table/snice-cell-percentage.js +208 -0
  150. package/dist/components/table/snice-cell-percentage.js.map +1 -0
  151. package/dist/components/table/snice-cell-phone.d.ts +18 -0
  152. package/dist/components/table/snice-cell-phone.js +153 -0
  153. package/dist/components/table/snice-cell-phone.js.map +1 -0
  154. package/dist/components/table/snice-cell-progress.d.ts +2 -2
  155. package/dist/components/table/snice-cell-progress.js +12 -6
  156. package/dist/components/table/snice-cell-progress.js.map +1 -1
  157. package/dist/components/table/snice-cell-rating.d.ts +2 -2
  158. package/dist/components/table/snice-cell-rating.js +12 -6
  159. package/dist/components/table/snice-cell-rating.js.map +1 -1
  160. package/dist/components/table/snice-cell-sparkline.d.ts +2 -2
  161. package/dist/components/table/snice-cell-sparkline.js +13 -7
  162. package/dist/components/table/snice-cell-sparkline.js.map +1 -1
  163. package/dist/components/table/snice-cell-status.d.ts +17 -0
  164. package/dist/components/table/snice-cell-status.js +144 -0
  165. package/dist/components/table/snice-cell-status.js.map +1 -0
  166. package/dist/components/table/snice-cell-tag.d.ts +16 -0
  167. package/dist/components/table/snice-cell-tag.js +131 -0
  168. package/dist/components/table/snice-cell-tag.js.map +1 -0
  169. package/dist/components/table/snice-cell-text.d.ts +2 -2
  170. package/dist/components/table/snice-cell-text.js +14 -8
  171. package/dist/components/table/snice-cell-text.js.map +1 -1
  172. package/dist/components/table/snice-cell.d.ts +2 -2
  173. package/dist/components/table/snice-cell.js +12 -6
  174. package/dist/components/table/snice-cell.js.map +1 -1
  175. package/dist/components/table/snice-column.d.ts +1 -1
  176. package/dist/components/table/snice-column.js +6 -3
  177. package/dist/components/table/snice-column.js.map +1 -1
  178. package/dist/components/table/snice-header.d.ts +5 -5
  179. package/dist/components/table/snice-header.js +60 -50
  180. package/dist/components/table/snice-header.js.map +1 -1
  181. package/dist/components/table/snice-progress.d.ts +2 -2
  182. package/dist/components/table/snice-progress.js +18 -11
  183. package/dist/components/table/snice-progress.js.map +1 -1
  184. package/dist/components/table/snice-rating.d.ts +2 -2
  185. package/dist/components/table/snice-rating.js +15 -8
  186. package/dist/components/table/snice-rating.js.map +1 -1
  187. package/dist/components/table/snice-row.d.ts +17 -6
  188. package/dist/components/table/snice-row.js +95 -44
  189. package/dist/components/table/snice-row.js.map +1 -1
  190. package/dist/components/table/snice-table.d.ts +18 -10
  191. package/dist/components/table/snice-table.js +355 -173
  192. package/dist/components/table/snice-table.js.map +1 -1
  193. package/dist/components/table/snice-table.types.d.ts +101 -2
  194. package/dist/components/tabs/snice-tab-panel.d.ts +2 -2
  195. package/dist/components/tabs/snice-tab-panel.js +12 -6
  196. package/dist/components/tabs/snice-tab-panel.js.map +1 -1
  197. package/dist/components/tabs/snice-tab.d.ts +6 -5
  198. package/dist/components/tabs/snice-tab.js +36 -19
  199. package/dist/components/tabs/snice-tab.js.map +1 -1
  200. package/dist/components/tabs/snice-tabs.d.ts +5 -5
  201. package/dist/components/tabs/snice-tabs.js +38 -28
  202. package/dist/components/tabs/snice-tabs.js.map +1 -1
  203. package/dist/components/toast/snice-toast-container.d.ts +7 -7
  204. package/dist/components/toast/snice-toast-container.js +19 -12
  205. package/dist/components/toast/snice-toast-container.js.map +1 -1
  206. package/dist/components/toast/snice-toast.d.ts +3 -15
  207. package/dist/components/toast/snice-toast.js +49 -108
  208. package/dist/components/toast/snice-toast.js.map +1 -1
  209. package/dist/components/tooltip/snice-tooltip.d.ts +2 -2
  210. package/dist/components/tooltip/snice-tooltip.js +14 -7
  211. package/dist/components/tooltip/snice-tooltip.js.map +1 -1
  212. package/dist/context.d.ts +44 -0
  213. package/dist/element-ready.d.ts +40 -0
  214. package/dist/{types/element.d.ts → element.d.ts} +2 -8
  215. package/dist/{types/events.d.ts → events.d.ts} +0 -4
  216. package/dist/index.cjs +2589 -605
  217. package/dist/index.cjs.map +1 -1
  218. package/dist/index.d.ts +21 -0
  219. package/dist/index.esm.js +2568 -604
  220. package/dist/index.esm.js.map +1 -1
  221. package/dist/index.iife.js +2589 -605
  222. package/dist/index.iife.js.map +1 -1
  223. package/dist/method-decorators.d.ts +121 -0
  224. package/dist/on.d.ts +59 -0
  225. package/dist/parts.d.ts +159 -0
  226. package/dist/render-debug.d.ts +27 -0
  227. package/dist/render-tracker.d.ts +14 -0
  228. package/dist/render.d.ts +96 -0
  229. package/dist/symbols.cjs +163 -0
  230. package/dist/symbols.cjs.map +1 -1
  231. package/dist/{types/symbols.d.ts → symbols.d.ts} +22 -0
  232. package/dist/symbols.esm.js +27 -3
  233. package/dist/symbols.esm.js.map +1 -1
  234. package/dist/template.d.ts +100 -0
  235. package/dist/transitions.cjs +219 -0
  236. package/dist/transitions.esm.js +2 -2
  237. package/dist/types/context.d.ts +48 -0
  238. package/dist/types/element-options.d.ts +26 -0
  239. package/dist/types/index.d.ts +25 -9
  240. package/dist/types/nav-context.d.ts +19 -0
  241. package/dist/types/{types/on-options.d.ts → on-options.d.ts} +2 -0
  242. package/dist/types/{types/placard.d.ts → placard.d.ts} +0 -1
  243. package/docs/ai/README.md +17 -0
  244. package/docs/ai/api.md +175 -0
  245. package/docs/ai/architecture.md +160 -0
  246. package/docs/ai/components/accordion.md +174 -0
  247. package/docs/ai/components/alert.md +77 -0
  248. package/docs/ai/components/avatar.md +61 -0
  249. package/docs/ai/components/badge.md +69 -0
  250. package/docs/ai/components/breadcrumbs.md +74 -0
  251. package/docs/ai/components/button.md +75 -0
  252. package/docs/ai/components/card.md +61 -0
  253. package/docs/ai/components/checkbox.md +74 -0
  254. package/docs/ai/components/chip.md +73 -0
  255. package/docs/ai/components/date-picker.md +75 -0
  256. package/docs/ai/components/divider.md +66 -0
  257. package/docs/ai/components/drawer.md +80 -0
  258. package/docs/ai/components/input.md +111 -0
  259. package/docs/ai/components/login.md +109 -0
  260. package/docs/ai/components/modal.md +67 -0
  261. package/docs/ai/components/nav.md +76 -0
  262. package/docs/ai/components/pagination.md +55 -0
  263. package/docs/ai/components/progress.md +72 -0
  264. package/docs/ai/components/radio.md +79 -0
  265. package/docs/ai/components/select.md +92 -0
  266. package/docs/ai/components/skeleton.md +57 -0
  267. package/docs/ai/components/switch.md +53 -0
  268. package/docs/ai/components/table.md +227 -0
  269. package/docs/ai/components/tabs.md +83 -0
  270. package/docs/ai/components/toast.md +140 -0
  271. package/docs/ai/components/tooltip.md +146 -0
  272. package/docs/ai/patterns.md +244 -0
  273. package/docs/components/accordion.md +558 -0
  274. package/docs/components/drawer.md +602 -0
  275. package/docs/components/modal.md +558 -0
  276. package/docs/components/nav.md +239 -0
  277. package/docs/components/pagination.md +289 -0
  278. package/docs/components/select.md +599 -0
  279. package/docs/components/switch.md +354 -0
  280. package/docs/components/tabs.md +546 -0
  281. package/docs/components/toast.md +506 -0
  282. package/docs/components/tooltip.md +523 -0
  283. package/docs/controllers.md +744 -0
  284. package/docs/elements.md +855 -0
  285. package/docs/events.md +807 -0
  286. package/docs/migration-v2-to-v3.md +569 -0
  287. package/docs/observe.md +588 -0
  288. package/docs/placards.md +401 -0
  289. package/docs/request-response.md +852 -0
  290. package/docs/routing.md +1186 -0
  291. package/package.json +10 -11
  292. package/dist/components/snice-cell-C9N6yGxQ.js +0 -4
  293. package/dist/components/snice-cell-C9N6yGxQ.js.map +0 -1
  294. package/dist/types/types/index.d.ts +0 -23
  295. /package/dist/{types/controller.d.ts → controller.d.ts} +0 -0
  296. /package/dist/{types/global.d.ts → global.d.ts} +0 -0
  297. /package/dist/{types/observe.d.ts → observe.d.ts} +0 -0
  298. /package/dist/{types/request-response.d.ts → request-response.d.ts} +0 -0
  299. /package/dist/{types/router.d.ts → router.d.ts} +0 -0
  300. /package/dist/{types/testing.d.ts → testing.d.ts} +0 -0
  301. /package/dist/{types/transitions.d.ts → transitions.d.ts} +0 -0
  302. /package/dist/types/{types/adopted-options.d.ts → adopted-options.d.ts} +0 -0
  303. /package/dist/types/{types/app-context.d.ts → app-context.d.ts} +0 -0
  304. /package/dist/types/{types/dispatch-options.d.ts → dispatch-options.d.ts} +0 -0
  305. /package/dist/types/{types/guard.d.ts → guard.d.ts} +0 -0
  306. /package/dist/types/{types/i-controller.d.ts → i-controller.d.ts} +0 -0
  307. /package/dist/types/{types/moved-options.d.ts → moved-options.d.ts} +0 -0
  308. /package/dist/types/{types/observe-options.d.ts → observe-options.d.ts} +0 -0
  309. /package/dist/types/{types/page-options.d.ts → page-options.d.ts} +0 -0
  310. /package/dist/types/{types/part-options.d.ts → part-options.d.ts} +0 -0
  311. /package/dist/types/{types/property-converter.d.ts → property-converter.d.ts} +0 -0
  312. /package/dist/types/{types/property-options.d.ts → property-options.d.ts} +0 -0
  313. /package/dist/types/{types/query-options.d.ts → query-options.d.ts} +0 -0
  314. /package/dist/types/{types/request-options.d.ts → request-options.d.ts} +0 -0
  315. /package/dist/types/{types/respond-options.d.ts → respond-options.d.ts} +0 -0
  316. /package/dist/types/{types/route-params.d.ts → route-params.d.ts} +0 -0
  317. /package/dist/types/{types/router-instance.d.ts → router-instance.d.ts} +0 -0
  318. /package/dist/types/{types/router-options.d.ts → router-options.d.ts} +0 -0
  319. /package/dist/types/{types/simple-array.d.ts → simple-array.d.ts} +0 -0
  320. /package/dist/types/{types/snice-element.d.ts → snice-element.d.ts} +0 -0
  321. /package/dist/types/{types/snice-global.d.ts → snice-global.d.ts} +0 -0
  322. /package/dist/types/{types/transition.d.ts → transition.d.ts} +0 -0
  323. /package/dist/{types/utils.d.ts → utils.d.ts} +0 -0
@@ -0,0 +1,111 @@
1
+ # snice-input
2
+
3
+ Text input field with validation and icons.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ value: string = '';
9
+ type: 'text'|'password'|'email'|'number'|'tel'|'url'|'search'|'date'|'time'|'datetime-local' = 'text';
10
+ variant: 'outlined'|'filled'|'underlined' = 'outlined';
11
+ size: 'small'|'medium'|'large' = 'medium';
12
+ placeholder: string = '';
13
+ disabled: boolean = false;
14
+ required: boolean = false;
15
+ invalid: boolean = false;
16
+ readonly: boolean = false;
17
+ clearable: boolean = false;
18
+ label: string = '';
19
+ helperText: string = '';
20
+ errorText: string = '';
21
+ prefix: string = '';
22
+ suffix: string = '';
23
+ prefixIcon: string = '';
24
+ suffixIcon: string = '';
25
+ min: string = '';
26
+ max: string = '';
27
+ minlength: number = 0;
28
+ maxlength: number = 0;
29
+ pattern: string = '';
30
+ autocomplete: string = '';
31
+ name: string = '';
32
+ ```
33
+
34
+ ## Methods
35
+
36
+ - `focus()` - Focus input
37
+ - `blur()` - Blur input
38
+ - `select()` - Select text
39
+ - `clear()` - Clear value
40
+
41
+ ## Events
42
+
43
+ - `input` - {value, input}
44
+ - `change` - {value, input}
45
+ - `focus` - {input}
46
+ - `blur` - {input}
47
+
48
+ ## Usage
49
+
50
+ ```html
51
+ <!-- Basic -->
52
+ <snice-input label="Name" placeholder="Enter name"></snice-input>
53
+
54
+ <!-- Variants -->
55
+ <snice-input variant="outlined"></snice-input>
56
+ <snice-input variant="filled"></snice-input>
57
+ <snice-input variant="underlined"></snice-input>
58
+
59
+ <!-- Input types -->
60
+ <snice-input type="email" label="Email"></snice-input>
61
+ <snice-input type="password" label="Password"></snice-input>
62
+ <snice-input type="number" label="Age"></snice-input>
63
+
64
+ <!-- With icons -->
65
+ <snice-input prefix-icon="🔍" placeholder="Search"></snice-input>
66
+ <snice-input suffix-icon="✉️" type="email"></snice-input>
67
+
68
+ <!-- With prefix/suffix text -->
69
+ <snice-input prefix="$" type="number"></snice-input>
70
+ <snice-input suffix=".com" type="url"></snice-input>
71
+
72
+ <!-- Clearable -->
73
+ <snice-input value="Text" clearable></snice-input>
74
+
75
+ <!-- Helper text -->
76
+ <snice-input label="Username" helper-text="Must be unique"></snice-input>
77
+
78
+ <!-- Error state -->
79
+ <snice-input label="Email" invalid error-text="Invalid email"></snice-input>
80
+
81
+ <!-- Validation -->
82
+ <snice-input type="email" required minlength="5" maxlength="50"></snice-input>
83
+
84
+ <!-- Sizes -->
85
+ <snice-input size="small"></snice-input>
86
+ <snice-input size="medium"></snice-input>
87
+ <snice-input size="large"></snice-input>
88
+
89
+ <!-- Form integration -->
90
+ <snice-input name="username" required></snice-input>
91
+
92
+ <!-- Events -->
93
+ <snice-input id="inp"></snice-input>
94
+ <script>
95
+ const inp = document.querySelector('#inp');
96
+ inp.addEventListener('input', (e) => console.log('Input:', e.detail.value));
97
+ inp.addEventListener('change', (e) => console.log('Change:', e.detail.value));
98
+ </script>
99
+ ```
100
+
101
+ ## Features
102
+
103
+ - Form-associated custom element
104
+ - 10 input types
105
+ - 3 visual variants
106
+ - Prefix/suffix icons or text
107
+ - Clearable with X button
108
+ - Helper and error text
109
+ - Validation (min/max/pattern/length)
110
+ - 3 sizes
111
+ - Keyboard accessible
@@ -0,0 +1,109 @@
1
+ # snice-login
2
+
3
+ Login form component with username, password, and optional features.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ variant: 'default'|'card'|'minimal' = 'default';
9
+ size: 'small'|'medium'|'large' = 'medium';
10
+ title: string = '';
11
+ disabled: boolean = false;
12
+ loading: boolean = false;
13
+ showRememberMe: boolean = false;
14
+ showForgotPassword: boolean = false;
15
+ actionText: string = 'Login';
16
+ ```
17
+
18
+ ## Methods
19
+
20
+ - `login(credentials)` - Programmatic login, returns {success, error?, data?}
21
+ - `reset()` - Clear form
22
+ - `setError(message)` - Display error message
23
+ - `clearError()` - Clear error message
24
+
25
+ ## Events
26
+
27
+ - `submit` - {username, password, remember}
28
+ - `forgot-password` - User clicked forgot password link
29
+
30
+ ## Usage
31
+
32
+ ```html
33
+ <!-- Basic -->
34
+ <snice-login title="Sign In"></snice-login>
35
+
36
+ <!-- Variants -->
37
+ <snice-login variant="card"></snice-login>
38
+ <snice-login variant="minimal"></snice-login>
39
+
40
+ <!-- With remember me and forgot password -->
41
+ <snice-login show-remember-me show-forgot-password></snice-login>
42
+
43
+ <!-- Custom action text -->
44
+ <snice-login action-text="Sign In"></snice-login>
45
+
46
+ <!-- Loading state -->
47
+ <snice-login loading></snice-login>
48
+
49
+ <!-- Disabled -->
50
+ <snice-login disabled></snice-login>
51
+
52
+ <!-- Sizes -->
53
+ <snice-login size="small"></snice-login>
54
+ <snice-login size="medium"></snice-login>
55
+ <snice-login size="large"></snice-login>
56
+
57
+ <!-- Event handling -->
58
+ <snice-login id="login"></snice-login>
59
+ <script>
60
+ const login = document.querySelector('#login');
61
+
62
+ login.addEventListener('submit', async (e) => {
63
+ const {username, password, remember} = e.detail;
64
+
65
+ login.loading = true;
66
+ const result = await fetch('/api/login', {
67
+ method: 'POST',
68
+ body: JSON.stringify({username, password})
69
+ });
70
+
71
+ if (!result.ok) {
72
+ login.setError('Invalid credentials');
73
+ login.loading = false;
74
+ } else {
75
+ window.location = '/dashboard';
76
+ }
77
+ });
78
+
79
+ login.addEventListener('forgot-password', () => {
80
+ window.location = '/forgot-password';
81
+ });
82
+ </script>
83
+
84
+ <!-- Programmatic login -->
85
+ <script>
86
+ const result = await login.login({
87
+ username: 'user@example.com',
88
+ password: 'password123',
89
+ remember: true
90
+ });
91
+
92
+ if (result.success) {
93
+ console.log('Logged in:', result.data);
94
+ } else {
95
+ console.error('Login failed:', result.error);
96
+ }
97
+ </script>
98
+ ```
99
+
100
+ ## Features
101
+
102
+ - 3 visual variants (default/card/minimal)
103
+ - 3 sizes
104
+ - Optional remember me checkbox
105
+ - Optional forgot password link
106
+ - Loading and disabled states
107
+ - Error message display
108
+ - Programmatic and event-based submission
109
+ - Keyboard accessible (Enter to submit)
@@ -0,0 +1,67 @@
1
+ # snice-modal
2
+
3
+ Dialog overlay with focus trap, backdrop dismiss, and accessibility.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ open: boolean = false; // Visibility state
9
+ size: 'small'|'medium'|'large'|'fullscreen' = 'medium';
10
+ noBackdropDismiss: boolean = false; // Prevent backdrop click close
11
+ noEscapeDismiss: boolean = false; // Prevent Escape key close
12
+ noFocusTrap: boolean = false; // Disable focus trapping
13
+ noCloseButton: boolean = false; // Hide close button
14
+ label: string = ''; // Accessible label
15
+ ```
16
+
17
+ ## Methods
18
+
19
+ ```typescript
20
+ show() // Open modal
21
+ close() // Close modal
22
+ ```
23
+
24
+ ## Events
25
+
26
+ ```typescript
27
+ '@snice/modal-open' // { modal }
28
+ '@snice/modal-close' // { modal }
29
+ ```
30
+
31
+ ## Slots
32
+
33
+ ```html
34
+ <snice-modal>
35
+ <div slot="header">Title</div>
36
+ <div>Body content</div>
37
+ <div slot="footer">Actions</div>
38
+ </snice-modal>
39
+ ```
40
+
41
+ ## Usage
42
+
43
+ ```html
44
+ <snice-modal id="myModal" label="Confirm">
45
+ <div slot="header"><h2>Confirm</h2></div>
46
+ <p>Are you sure?</p>
47
+ <div slot="footer">
48
+ <button onclick="this.closest('snice-modal').close()">Cancel</button>
49
+ <button onclick="this.closest('snice-modal').close()">OK</button>
50
+ </div>
51
+ </snice-modal>
52
+ ```
53
+
54
+ ```typescript
55
+ const modal = document.querySelector('snice-modal');
56
+ modal.show();
57
+ modal.close();
58
+ ```
59
+
60
+ ## Features
61
+
62
+ - Body scroll lock when open
63
+ - Focus trap with Tab navigation
64
+ - Focus restoration on close
65
+ - Backdrop click to close
66
+ - Escape key to close
67
+ - ARIA attributes (role, aria-modal, aria-label, aria-hidden)
@@ -0,0 +1,76 @@
1
+ # snice-nav
2
+
3
+ Navigation menu from placard configurations, integrates with Snice routing.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ variant: 'flat'|'hierarchical'|'grouped' = 'flat';
9
+ orientation: 'horizontal'|'vertical' = 'horizontal';
10
+ isTopLevel: boolean = false; // Receive context updates
11
+ ```
12
+
13
+ ## Methods
14
+
15
+ ```typescript
16
+ update(placards, appContext?, currentRoute?, routeParams?) // Update nav with placard data
17
+ ```
18
+
19
+ ## Placard Structure
20
+
21
+ ```typescript
22
+ interface Placard {
23
+ name: string; // Route identifier
24
+ title: string; // Display text
25
+ icon?: string; // Icon character
26
+ order?: number; // Sort order
27
+ parent?: string; // Parent name (hierarchical)
28
+ group?: string; // Group name (grouped)
29
+ show?: boolean; // Visibility
30
+ description?: string; // Accessible label/tooltip
31
+ tooltip?: string; // Hover tooltip
32
+ hotkeys?: string[]; // Keyboard shortcuts
33
+ helpUrl?: string; // Help URL
34
+ searchTerms?: string[]; // Search keywords
35
+ attributes?: Record<string, any>; // Custom data attributes
36
+ visibleOn?: Function | Function[]; // Visibility guards
37
+ }
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ```html
43
+ <snice-nav id="nav" variant="flat" orientation="horizontal"></snice-nav>
44
+ ```
45
+
46
+ ```typescript
47
+ const nav = document.querySelector('snice-nav');
48
+ const placards = [
49
+ { name: 'home', title: 'Home', icon: '🏠', order: 0 },
50
+ { name: 'products', title: 'Products', icon: '📦', order: 1 },
51
+ ];
52
+ nav.update(placards, undefined, 'home');
53
+ ```
54
+
55
+ ## Variants
56
+
57
+ - **flat**: Simple list (default)
58
+ - **hierarchical**: Nested with parent-child relationships
59
+ - **grouped**: Organized into labeled groups
60
+
61
+ ## Context Integration
62
+
63
+ ```html
64
+ <snice-nav is-top-level></snice-nav>
65
+ ```
66
+
67
+ Auto-receives placards, routes, and app context from Snice context system.
68
+
69
+ ## Features
70
+
71
+ - Active route tracking with `.nav__link--active` class
72
+ - `aria-current="page"` on active links
73
+ - `role="navigation"` on container
74
+ - Hotkeys via `data-hotkeys` attribute
75
+ - Custom attributes via placard `attributes` property
76
+ - Conditional visibility via `visibleOn` guards
@@ -0,0 +1,55 @@
1
+ # snice-pagination
2
+
3
+ Pagination navigation component.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ current: number = 1; // Active page
9
+ total: number = 1; // Total pages
10
+ siblings: number = 1; // Pages shown each side of current
11
+ showFirst: boolean = true; // Show first button
12
+ showLast: boolean = true; // Show last button
13
+ showPrev: boolean = true; // Show previous button
14
+ showNext: boolean = true; // Show next button
15
+ size: 'small'|'medium'|'large' = 'medium';
16
+ variant: 'default'|'rounded'|'text' = 'default';
17
+ ```
18
+
19
+ ## Methods
20
+
21
+ ```typescript
22
+ goToPage(page: number) // Navigate to page
23
+ nextPage() // Next page
24
+ previousPage() // Previous page
25
+ firstPage() // First page
26
+ lastPage() // Last page
27
+ ```
28
+
29
+ ## Events
30
+
31
+ ```typescript
32
+ '@snice/pagination-change' // { page, previousPage }
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```html
38
+ <snice-pagination current="1" total="10"></snice-pagination>
39
+ ```
40
+
41
+ ```typescript
42
+ pagination.addEventListener('@snice/pagination-change', (e) => {
43
+ console.log(e.detail.page);
44
+ });
45
+ ```
46
+
47
+ ## CSS Variables
48
+
49
+ ```css
50
+ --pagination-gap: 4px;
51
+ --pagination-button-size: 32px;
52
+ --pagination-button-padding: 8px;
53
+ --pagination-font-size: 14px;
54
+ --pagination-border-radius: 4px;
55
+ ```
@@ -0,0 +1,72 @@
1
+ # snice-progress
2
+
3
+ Progress indicator with linear or circular display.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ value: number = 0;
9
+ max: number = 100;
10
+ variant: 'linear'|'circular' = 'linear';
11
+ indeterminate: boolean = false;
12
+ size: 'small'|'medium'|'large' = 'medium';
13
+ color: string = '';
14
+ showLabel: boolean = false;
15
+ label: string = '';
16
+ striped: boolean = false;
17
+ animated: boolean = false;
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```html
23
+ <!-- Basic linear -->
24
+ <snice-progress value="50"></snice-progress>
25
+
26
+ <!-- Circular -->
27
+ <snice-progress variant="circular" value="75"></snice-progress>
28
+
29
+ <!-- Indeterminate (loading) -->
30
+ <snice-progress indeterminate></snice-progress>
31
+ <snice-progress variant="circular" indeterminate></snice-progress>
32
+
33
+ <!-- With label -->
34
+ <snice-progress value="60" show-label></snice-progress>
35
+ <snice-progress value="60" label="Uploading..."></snice-progress>
36
+
37
+ <!-- Custom max -->
38
+ <snice-progress value="3" max="10"></snice-progress>
39
+
40
+ <!-- Striped and animated -->
41
+ <snice-progress value="70" striped></snice-progress>
42
+ <snice-progress value="70" striped animated></snice-progress>
43
+
44
+ <!-- Custom color -->
45
+ <snice-progress value="80" color="#3b82f6"></snice-progress>
46
+
47
+ <!-- Sizes -->
48
+ <snice-progress value="50" size="small"></snice-progress>
49
+ <snice-progress value="50" size="medium"></snice-progress>
50
+ <snice-progress value="50" size="large"></snice-progress>
51
+
52
+ <!-- Dynamic updates -->
53
+ <snice-progress id="prog" value="0"></snice-progress>
54
+ <script>
55
+ const prog = document.querySelector('#prog');
56
+ let val = 0;
57
+ setInterval(() => {
58
+ val = (val + 10) % 100;
59
+ prog.value = val;
60
+ }, 500);
61
+ </script>
62
+ ```
63
+
64
+ ## Features
65
+
66
+ - Linear or circular variant
67
+ - Indeterminate mode for unknown progress
68
+ - Optional percentage label or custom text
69
+ - Striped and animated styles
70
+ - Custom color
71
+ - 3 sizes
72
+ - Reactive value updates
@@ -0,0 +1,79 @@
1
+ # snice-radio
2
+
3
+ Form radio button input with grouping.
4
+
5
+ ## Properties
6
+
7
+ ```typescript
8
+ checked: boolean = false;
9
+ disabled: boolean = false;
10
+ required: boolean = false;
11
+ invalid: boolean = false;
12
+ size: 'small'|'medium'|'large' = 'medium';
13
+ name: string = '';
14
+ value: string = '';
15
+ label: string = '';
16
+ ```
17
+
18
+ ## Methods
19
+
20
+ - `focus()` - Focus radio
21
+ - `blur()` - Blur radio
22
+ - `click()` - Programmatic click
23
+
24
+ ## Events
25
+
26
+ - `change` - {checked, value, radio}
27
+
28
+ ## Usage
29
+
30
+ ```html
31
+ <!-- Basic radio group -->
32
+ <snice-radio name="color" value="red" label="Red"></snice-radio>
33
+ <snice-radio name="color" value="green" label="Green"></snice-radio>
34
+ <snice-radio name="color" value="blue" label="Blue"></snice-radio>
35
+
36
+ <!-- Pre-selected -->
37
+ <snice-radio name="size" value="s" label="Small"></snice-radio>
38
+ <snice-radio name="size" value="m" label="Medium" checked></snice-radio>
39
+ <snice-radio name="size" value="l" label="Large"></snice-radio>
40
+
41
+ <!-- Disabled -->
42
+ <snice-radio label="Unavailable" disabled></snice-radio>
43
+ <snice-radio label="Selected but disabled" checked disabled></snice-radio>
44
+
45
+ <!-- Required -->
46
+ <snice-radio name="accept" value="yes" label="Accept" required></snice-radio>
47
+
48
+ <!-- Invalid -->
49
+ <snice-radio label="Invalid option" invalid></snice-radio>
50
+
51
+ <!-- Sizes -->
52
+ <snice-radio label="Small" size="small"></snice-radio>
53
+ <snice-radio label="Medium" size="medium"></snice-radio>
54
+ <snice-radio label="Large" size="large"></snice-radio>
55
+
56
+ <!-- Form integration -->
57
+ <form>
58
+ <snice-radio name="plan" value="free" label="Free"></snice-radio>
59
+ <snice-radio name="plan" value="pro" label="Pro"></snice-radio>
60
+ <snice-radio name="plan" value="enterprise" label="Enterprise"></snice-radio>
61
+ </form>
62
+
63
+ <!-- Event handling -->
64
+ <snice-radio id="rb" name="opt" value="a"></snice-radio>
65
+ <script>
66
+ document.querySelector('#rb').addEventListener('change', (e) => {
67
+ console.log('Selected:', e.detail.value);
68
+ });
69
+ </script>
70
+ ```
71
+
72
+ ## Features
73
+
74
+ - Form-associated custom element
75
+ - Automatic radio group management by name
76
+ - 3 sizes
77
+ - Keyboard accessible (arrow keys navigate group)
78
+ - Change events
79
+ - Invalid state styling
@@ -0,0 +1,92 @@
1
+ # snice-select
2
+
3
+ Customizable dropdown selection with single/multiple selection, search, and icons.
4
+
5
+ ## Components
6
+
7
+ ### snice-select (Container)
8
+
9
+ ```typescript
10
+ value: string = ''; // Selected value (comma-separated for multiple)
11
+ disabled: boolean = false; // Disabled state
12
+ required: boolean = false; // Required for form validation
13
+ invalid: boolean = false; // Invalid state styling
14
+ readonly: boolean = false; // Readonly state
15
+ multiple: boolean = false; // Allow multiple selection
16
+ searchable: boolean = false; // Show search input
17
+ clearable: boolean = false; // Show clear button
18
+ open: boolean = false; // Dropdown open state
19
+ size: 'small'|'medium'|'large' = 'medium';
20
+ name: string = ''; // Form field name
21
+ label: string = ''; // Label text
22
+ placeholder: string = 'Select an option';
23
+ maxHeight: string = '200px'; // Max dropdown height
24
+ ```
25
+
26
+ **Methods:**
27
+ ```typescript
28
+ selectOption(value: string) // Select option by value
29
+ clear() // Clear selection
30
+ openDropdown() // Open dropdown
31
+ closeDropdown() // Close dropdown
32
+ toggleDropdown() // Toggle dropdown
33
+ focus() // Focus trigger
34
+ blur() // Blur and close
35
+ ```
36
+
37
+ **Events:**
38
+ ```typescript
39
+ '@snice/select-change' // { value, option, select }
40
+ '@snice/select-open' // { select }
41
+ '@snice/select-close' // { select }
42
+ ```
43
+
44
+ ### snice-option (Option Item)
45
+
46
+ ```typescript
47
+ value: string = ''; // Option value (defaults to label)
48
+ label: string = ''; // Option label (defaults to textContent)
49
+ disabled: boolean = false; // Disabled state
50
+ selected: boolean = false; // Initially selected
51
+ icon: string = ''; // Icon URL
52
+ ```
53
+
54
+ **Getter:**
55
+ ```typescript
56
+ optionData // { value, label, disabled, selected, icon }
57
+ ```
58
+
59
+ ## Usage
60
+
61
+ ```html
62
+ <snice-select label="Choose" name="choice">
63
+ <snice-option value="1">Option 1</snice-option>
64
+ <snice-option value="2">Option 2</snice-option>
65
+ </snice-select>
66
+ ```
67
+
68
+ ```typescript
69
+ select.addEventListener('@snice/select-change', (e) => {
70
+ console.log(e.detail.value);
71
+ });
72
+
73
+ select.selectOption('1');
74
+ ```
75
+
76
+ ## Features
77
+
78
+ - Single and multiple selection
79
+ - Search filtering
80
+ - Keyboard navigation
81
+ - Form integration
82
+ - Icons in options
83
+ - Clearable selection
84
+ - Disabled options
85
+
86
+ ## Notes
87
+
88
+ - Options must be direct children of select
89
+ - Multiple selection values are comma-separated
90
+ - Hidden native select for form submission
91
+ - Dropdown closes outside click
92
+ - Search shows in dropdown when open