@edsis/ui 0.0.2

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 (265) hide show
  1. package/README.md +40 -0
  2. package/accordion/README.md +195 -0
  3. package/alert/README.md +177 -0
  4. package/alert-dialog/README.md +239 -0
  5. package/aspect-ratio/README.md +112 -0
  6. package/avatar/README.md +176 -0
  7. package/badge/README.md +133 -0
  8. package/breadcrumb/README.md +216 -0
  9. package/button/README.md +139 -0
  10. package/button-group/README.md +204 -0
  11. package/calendar/README.md +132 -0
  12. package/card/README.md +220 -0
  13. package/carousel/README.md +276 -0
  14. package/chart/README.md +249 -0
  15. package/checkbox/README.md +149 -0
  16. package/collapsible/README.md +191 -0
  17. package/combobox/README.md +198 -0
  18. package/command/README.md +275 -0
  19. package/composer/README.md +235 -0
  20. package/context-menu/README.md +267 -0
  21. package/date-picker/README.md +177 -0
  22. package/dialog/README.md +237 -0
  23. package/drawer/README.md +145 -0
  24. package/dropdown-menu/README.md +311 -0
  25. package/editor/README.md +136 -0
  26. package/empty/README.md +183 -0
  27. package/fesm2022/edsis-ui-accordion.mjs +174 -0
  28. package/fesm2022/edsis-ui-accordion.mjs.map +1 -0
  29. package/fesm2022/edsis-ui-alert-dialog.mjs +242 -0
  30. package/fesm2022/edsis-ui-alert-dialog.mjs.map +1 -0
  31. package/fesm2022/edsis-ui-alert.mjs +90 -0
  32. package/fesm2022/edsis-ui-alert.mjs.map +1 -0
  33. package/fesm2022/edsis-ui-aspect-ratio.mjs +33 -0
  34. package/fesm2022/edsis-ui-aspect-ratio.mjs.map +1 -0
  35. package/fesm2022/edsis-ui-avatar.mjs +123 -0
  36. package/fesm2022/edsis-ui-avatar.mjs.map +1 -0
  37. package/fesm2022/edsis-ui-badge.mjs +47 -0
  38. package/fesm2022/edsis-ui-badge.mjs.map +1 -0
  39. package/fesm2022/edsis-ui-breadcrumb.mjs +186 -0
  40. package/fesm2022/edsis-ui-breadcrumb.mjs.map +1 -0
  41. package/fesm2022/edsis-ui-button-group.mjs +95 -0
  42. package/fesm2022/edsis-ui-button-group.mjs.map +1 -0
  43. package/fesm2022/edsis-ui-button.mjs +64 -0
  44. package/fesm2022/edsis-ui-button.mjs.map +1 -0
  45. package/fesm2022/edsis-ui-calendar.mjs +78 -0
  46. package/fesm2022/edsis-ui-calendar.mjs.map +1 -0
  47. package/fesm2022/edsis-ui-card.mjs +137 -0
  48. package/fesm2022/edsis-ui-card.mjs.map +1 -0
  49. package/fesm2022/edsis-ui-carousel.mjs +310 -0
  50. package/fesm2022/edsis-ui-carousel.mjs.map +1 -0
  51. package/fesm2022/edsis-ui-chart-area.mjs +6 -0
  52. package/fesm2022/edsis-ui-chart-area.mjs.map +1 -0
  53. package/fesm2022/edsis-ui-chart-bar.mjs +6 -0
  54. package/fesm2022/edsis-ui-chart-bar.mjs.map +1 -0
  55. package/fesm2022/edsis-ui-chart-line.mjs +6 -0
  56. package/fesm2022/edsis-ui-chart-line.mjs.map +1 -0
  57. package/fesm2022/edsis-ui-chart-pie.mjs +6 -0
  58. package/fesm2022/edsis-ui-chart-pie.mjs.map +1 -0
  59. package/fesm2022/edsis-ui-chart-radar.mjs +6 -0
  60. package/fesm2022/edsis-ui-chart-radar.mjs.map +1 -0
  61. package/fesm2022/edsis-ui-chart-radial.mjs +6 -0
  62. package/fesm2022/edsis-ui-chart-radial.mjs.map +1 -0
  63. package/fesm2022/edsis-ui-chart-scatter.mjs +6 -0
  64. package/fesm2022/edsis-ui-chart-scatter.mjs.map +1 -0
  65. package/fesm2022/edsis-ui-chart.mjs +3714 -0
  66. package/fesm2022/edsis-ui-chart.mjs.map +1 -0
  67. package/fesm2022/edsis-ui-checkbox.mjs +104 -0
  68. package/fesm2022/edsis-ui-checkbox.mjs.map +1 -0
  69. package/fesm2022/edsis-ui-collapsible.mjs +116 -0
  70. package/fesm2022/edsis-ui-collapsible.mjs.map +1 -0
  71. package/fesm2022/edsis-ui-combobox.mjs +263 -0
  72. package/fesm2022/edsis-ui-combobox.mjs.map +1 -0
  73. package/fesm2022/edsis-ui-command.mjs +268 -0
  74. package/fesm2022/edsis-ui-command.mjs.map +1 -0
  75. package/fesm2022/edsis-ui-composer.mjs +329 -0
  76. package/fesm2022/edsis-ui-composer.mjs.map +1 -0
  77. package/fesm2022/edsis-ui-context-menu.mjs +100 -0
  78. package/fesm2022/edsis-ui-context-menu.mjs.map +1 -0
  79. package/fesm2022/edsis-ui-date-picker.mjs +155 -0
  80. package/fesm2022/edsis-ui-date-picker.mjs.map +1 -0
  81. package/fesm2022/edsis-ui-dialog.mjs +262 -0
  82. package/fesm2022/edsis-ui-dialog.mjs.map +1 -0
  83. package/fesm2022/edsis-ui-drawer.mjs +6 -0
  84. package/fesm2022/edsis-ui-drawer.mjs.map +1 -0
  85. package/fesm2022/edsis-ui-dropdown-menu.mjs +466 -0
  86. package/fesm2022/edsis-ui-dropdown-menu.mjs.map +1 -0
  87. package/fesm2022/edsis-ui-editor.mjs +692 -0
  88. package/fesm2022/edsis-ui-editor.mjs.map +1 -0
  89. package/fesm2022/edsis-ui-empty.mjs +132 -0
  90. package/fesm2022/edsis-ui-empty.mjs.map +1 -0
  91. package/fesm2022/edsis-ui-form.mjs +334 -0
  92. package/fesm2022/edsis-ui-form.mjs.map +1 -0
  93. package/fesm2022/edsis-ui-hover-card.mjs +284 -0
  94. package/fesm2022/edsis-ui-hover-card.mjs.map +1 -0
  95. package/fesm2022/edsis-ui-input-group.mjs +164 -0
  96. package/fesm2022/edsis-ui-input-group.mjs.map +1 -0
  97. package/fesm2022/edsis-ui-input-otp.mjs +485 -0
  98. package/fesm2022/edsis-ui-input-otp.mjs.map +1 -0
  99. package/fesm2022/edsis-ui-input.mjs +43 -0
  100. package/fesm2022/edsis-ui-input.mjs.map +1 -0
  101. package/fesm2022/edsis-ui-item.mjs +241 -0
  102. package/fesm2022/edsis-ui-item.mjs.map +1 -0
  103. package/fesm2022/edsis-ui-kanban.mjs +289 -0
  104. package/fesm2022/edsis-ui-kanban.mjs.map +1 -0
  105. package/fesm2022/edsis-ui-kbd.mjs +51 -0
  106. package/fesm2022/edsis-ui-kbd.mjs.map +1 -0
  107. package/fesm2022/edsis-ui-label.mjs +30 -0
  108. package/fesm2022/edsis-ui-label.mjs.map +1 -0
  109. package/fesm2022/edsis-ui-menubar.mjs +302 -0
  110. package/fesm2022/edsis-ui-menubar.mjs.map +1 -0
  111. package/fesm2022/edsis-ui-native-select.mjs +61 -0
  112. package/fesm2022/edsis-ui-native-select.mjs.map +1 -0
  113. package/fesm2022/edsis-ui-navigation-menu.mjs +399 -0
  114. package/fesm2022/edsis-ui-navigation-menu.mjs.map +1 -0
  115. package/fesm2022/edsis-ui-pagination.mjs +216 -0
  116. package/fesm2022/edsis-ui-pagination.mjs.map +1 -0
  117. package/fesm2022/edsis-ui-pillbox.mjs +777 -0
  118. package/fesm2022/edsis-ui-pillbox.mjs.map +1 -0
  119. package/fesm2022/edsis-ui-popover.mjs +163 -0
  120. package/fesm2022/edsis-ui-popover.mjs.map +1 -0
  121. package/fesm2022/edsis-ui-progress.mjs +53 -0
  122. package/fesm2022/edsis-ui-progress.mjs.map +1 -0
  123. package/fesm2022/edsis-ui-radio.mjs +111 -0
  124. package/fesm2022/edsis-ui-radio.mjs.map +1 -0
  125. package/fesm2022/edsis-ui-resizable.mjs +454 -0
  126. package/fesm2022/edsis-ui-resizable.mjs.map +1 -0
  127. package/fesm2022/edsis-ui-scroll-area.mjs +48 -0
  128. package/fesm2022/edsis-ui-scroll-area.mjs.map +1 -0
  129. package/fesm2022/edsis-ui-select.mjs +164 -0
  130. package/fesm2022/edsis-ui-select.mjs.map +1 -0
  131. package/fesm2022/edsis-ui-separator.mjs +33 -0
  132. package/fesm2022/edsis-ui-separator.mjs.map +1 -0
  133. package/fesm2022/edsis-ui-sheet.mjs +264 -0
  134. package/fesm2022/edsis-ui-sheet.mjs.map +1 -0
  135. package/fesm2022/edsis-ui-skeleton.mjs +29 -0
  136. package/fesm2022/edsis-ui-skeleton.mjs.map +1 -0
  137. package/fesm2022/edsis-ui-slider.mjs +405 -0
  138. package/fesm2022/edsis-ui-slider.mjs.map +1 -0
  139. package/fesm2022/edsis-ui-spinner.mjs +58 -0
  140. package/fesm2022/edsis-ui-spinner.mjs.map +1 -0
  141. package/fesm2022/edsis-ui-switch.mjs +107 -0
  142. package/fesm2022/edsis-ui-switch.mjs.map +1 -0
  143. package/fesm2022/edsis-ui-table.mjs +139 -0
  144. package/fesm2022/edsis-ui-table.mjs.map +1 -0
  145. package/fesm2022/edsis-ui-tabs.mjs +252 -0
  146. package/fesm2022/edsis-ui-tabs.mjs.map +1 -0
  147. package/fesm2022/edsis-ui-textarea.mjs +37 -0
  148. package/fesm2022/edsis-ui-textarea.mjs.map +1 -0
  149. package/fesm2022/edsis-ui-timeline.mjs +213 -0
  150. package/fesm2022/edsis-ui-timeline.mjs.map +1 -0
  151. package/fesm2022/edsis-ui-toast.mjs +71 -0
  152. package/fesm2022/edsis-ui-toast.mjs.map +1 -0
  153. package/fesm2022/edsis-ui-toggle-group.mjs +269 -0
  154. package/fesm2022/edsis-ui-toggle-group.mjs.map +1 -0
  155. package/fesm2022/edsis-ui-toggle.mjs +76 -0
  156. package/fesm2022/edsis-ui-toggle.mjs.map +1 -0
  157. package/fesm2022/edsis-ui-tooltip.mjs +339 -0
  158. package/fesm2022/edsis-ui-tooltip.mjs.map +1 -0
  159. package/fesm2022/edsis-ui-utils.mjs +13 -0
  160. package/fesm2022/edsis-ui-utils.mjs.map +1 -0
  161. package/fesm2022/edsis-ui.mjs +11 -0
  162. package/fesm2022/edsis-ui.mjs.map +1 -0
  163. package/form/README.md +210 -0
  164. package/hover-card/README.md +146 -0
  165. package/input/README.md +159 -0
  166. package/input-group/README.md +234 -0
  167. package/input-otp/README.md +273 -0
  168. package/item/README.md +247 -0
  169. package/kanban/README.md +81 -0
  170. package/kbd/README.md +139 -0
  171. package/label/README.md +136 -0
  172. package/menubar/README.md +269 -0
  173. package/native-select/README.md +176 -0
  174. package/navigation-menu/README.md +160 -0
  175. package/package.json +310 -0
  176. package/pagination/README.md +144 -0
  177. package/pillbox/README.md +67 -0
  178. package/popover/README.md +43 -0
  179. package/progress/README.md +160 -0
  180. package/radio/README.md +209 -0
  181. package/resizable/README.md +164 -0
  182. package/scroll-area/README.md +143 -0
  183. package/select/README.md +174 -0
  184. package/separator/README.md +170 -0
  185. package/sheet/README.md +183 -0
  186. package/skeleton/README.md +158 -0
  187. package/slider/README.md +207 -0
  188. package/spinner/README.md +160 -0
  189. package/switch/README.md +166 -0
  190. package/table/README.md +291 -0
  191. package/tabs/README.md +214 -0
  192. package/textarea/README.md +154 -0
  193. package/timeline/README.md +94 -0
  194. package/toast/README.md +321 -0
  195. package/toggle/README.md +131 -0
  196. package/toggle-group/README.md +206 -0
  197. package/tooltip/README.md +211 -0
  198. package/types/edsis-ui-accordion.d.ts +51 -0
  199. package/types/edsis-ui-alert-dialog.d.ts +93 -0
  200. package/types/edsis-ui-alert.d.ts +37 -0
  201. package/types/edsis-ui-aspect-ratio.d.ts +12 -0
  202. package/types/edsis-ui-avatar.d.ts +51 -0
  203. package/types/edsis-ui-badge.d.ts +19 -0
  204. package/types/edsis-ui-breadcrumb.d.ts +46 -0
  205. package/types/edsis-ui-button-group.d.ts +26 -0
  206. package/types/edsis-ui-button.d.ts +22 -0
  207. package/types/edsis-ui-calendar.d.ts +33 -0
  208. package/types/edsis-ui-card.d.ts +60 -0
  209. package/types/edsis-ui-carousel.d.ts +86 -0
  210. package/types/edsis-ui-chart-area.d.ts +1 -0
  211. package/types/edsis-ui-chart-bar.d.ts +1 -0
  212. package/types/edsis-ui-chart-line.d.ts +1 -0
  213. package/types/edsis-ui-chart-pie.d.ts +1 -0
  214. package/types/edsis-ui-chart-radar.d.ts +1 -0
  215. package/types/edsis-ui-chart-radial.d.ts +1 -0
  216. package/types/edsis-ui-chart-scatter.d.ts +1 -0
  217. package/types/edsis-ui-chart.d.ts +1094 -0
  218. package/types/edsis-ui-checkbox.d.ts +35 -0
  219. package/types/edsis-ui-collapsible.d.ts +42 -0
  220. package/types/edsis-ui-combobox.d.ts +51 -0
  221. package/types/edsis-ui-command.d.ts +99 -0
  222. package/types/edsis-ui-composer.d.ts +90 -0
  223. package/types/edsis-ui-context-menu.d.ts +35 -0
  224. package/types/edsis-ui-date-picker.d.ts +41 -0
  225. package/types/edsis-ui-dialog.d.ts +87 -0
  226. package/types/edsis-ui-drawer.d.ts +1 -0
  227. package/types/edsis-ui-dropdown-menu.d.ts +136 -0
  228. package/types/edsis-ui-editor.d.ts +123 -0
  229. package/types/edsis-ui-empty.d.ts +50 -0
  230. package/types/edsis-ui-form.d.ts +141 -0
  231. package/types/edsis-ui-hover-card.d.ts +74 -0
  232. package/types/edsis-ui-input-group.d.ts +51 -0
  233. package/types/edsis-ui-input-otp.d.ts +136 -0
  234. package/types/edsis-ui-input.d.ts +16 -0
  235. package/types/edsis-ui-item.d.ts +88 -0
  236. package/types/edsis-ui-kanban.d.ts +70 -0
  237. package/types/edsis-ui-kbd.d.ts +16 -0
  238. package/types/edsis-ui-label.d.ts +11 -0
  239. package/types/edsis-ui-menubar.d.ts +67 -0
  240. package/types/edsis-ui-native-select.d.ts +26 -0
  241. package/types/edsis-ui-navigation-menu.d.ts +96 -0
  242. package/types/edsis-ui-pagination.d.ts +34 -0
  243. package/types/edsis-ui-pillbox.d.ts +157 -0
  244. package/types/edsis-ui-popover.d.ts +43 -0
  245. package/types/edsis-ui-progress.d.ts +17 -0
  246. package/types/edsis-ui-radio.d.ts +40 -0
  247. package/types/edsis-ui-resizable.d.ts +99 -0
  248. package/types/edsis-ui-scroll-area.d.ts +19 -0
  249. package/types/edsis-ui-select.d.ts +57 -0
  250. package/types/edsis-ui-separator.d.ts +14 -0
  251. package/types/edsis-ui-sheet.d.ts +76 -0
  252. package/types/edsis-ui-skeleton.d.ts +10 -0
  253. package/types/edsis-ui-slider.d.ts +74 -0
  254. package/types/edsis-ui-spinner.d.ts +13 -0
  255. package/types/edsis-ui-switch.d.ts +40 -0
  256. package/types/edsis-ui-table.d.ts +52 -0
  257. package/types/edsis-ui-tabs.d.ts +92 -0
  258. package/types/edsis-ui-textarea.d.ts +12 -0
  259. package/types/edsis-ui-timeline.d.ts +63 -0
  260. package/types/edsis-ui-toast.d.ts +38 -0
  261. package/types/edsis-ui-toggle-group.d.ts +89 -0
  262. package/types/edsis-ui-toggle.d.ts +25 -0
  263. package/types/edsis-ui-tooltip.d.ts +89 -0
  264. package/types/edsis-ui-utils.d.ts +5 -0
  265. package/types/edsis-ui.d.ts +2 -0
@@ -0,0 +1,273 @@
1
+ # Input OTP
2
+
3
+ Accessible one-time password input with grouped slots, copy-paste distribution, roving focus, signal-friendly control, and reactive-form support.
4
+
5
+ Use Input OTP for verification codes, step-up authentication, banking PIN entry, and short recovery codes where each character should be visually separated without losing keyboard or paste ergonomics.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import {
11
+ InputOtpComponent,
12
+ InputOtpGroupComponent,
13
+ InputOtpSeparatorComponent,
14
+ InputOtpSlotComponent,
15
+ REGEXP_ONLY_DIGITS,
16
+ REGEXP_ONLY_DIGITS_AND_CHARS,
17
+ } from '@edsis/ui/input-otp';
18
+ ```
19
+
20
+ When the code input belongs to a richer field layout, pair it with the existing form primitives:
21
+
22
+ ```ts
23
+ import { FormDescriptionComponent, FormFieldComponent, FormLabelComponent, FormMessageComponent } from '@edsis/ui/form';
24
+ ```
25
+
26
+ ## Composition
27
+
28
+ The Angular structure follows the shadcn Input OTP information architecture while translating it to standalone selectors.
29
+
30
+ ```text
31
+ ui-input-otp
32
+ ├── ui-input-otp-group
33
+ │ ├── ui-input-otp-slot
34
+ │ ├── ui-input-otp-slot
35
+ │ └── ui-input-otp-slot
36
+ ├── ui-input-otp-separator
37
+ └── ui-input-otp-group
38
+ ├── ui-input-otp-slot
39
+ ├── ui-input-otp-slot
40
+ └── ui-input-otp-slot
41
+ ```
42
+
43
+ ## Basic Usage
44
+
45
+ Use the root component for value flow and the projected parts for layout.
46
+
47
+ ```ts
48
+ protected readonly code = signal('');
49
+ protected readonly digitsPattern = REGEXP_ONLY_DIGITS;
50
+ ```
51
+
52
+ ```html
53
+ <ui-form-field>
54
+ <ui-form-label>Verification code</ui-form-label>
55
+ <ui-input-otp [maxLength]="6" [pattern]="digitsPattern" [value]="code()" (valueChange)="code.set($event)">
56
+ <ui-input-otp-group>
57
+ <ui-input-otp-slot [index]="0" />
58
+ <ui-input-otp-slot [index]="1" />
59
+ <ui-input-otp-slot [index]="2" />
60
+ <ui-input-otp-slot [index]="3" />
61
+ <ui-input-otp-slot [index]="4" />
62
+ <ui-input-otp-slot [index]="5" />
63
+ </ui-input-otp-group>
64
+ </ui-input-otp>
65
+ <ui-form-description>Paste the code from your email or authenticator app.</ui-form-description>
66
+ </ui-form-field>
67
+ ```
68
+
69
+ ## Common Patterns
70
+
71
+ ### Separator groups
72
+
73
+ Split longer codes into smaller clusters when the verification flow benefits from visual chunking.
74
+
75
+ ```html
76
+ <ui-input-otp [maxLength]="6" [pattern]="digitsPattern" [value]="code()" (valueChange)="code.set($event)">
77
+ <ui-input-otp-group>
78
+ <ui-input-otp-slot [index]="0" />
79
+ <ui-input-otp-slot [index]="1" />
80
+ </ui-input-otp-group>
81
+ <ui-input-otp-separator />
82
+ <ui-input-otp-group>
83
+ <ui-input-otp-slot [index]="2" />
84
+ <ui-input-otp-slot [index]="3" />
85
+ </ui-input-otp-group>
86
+ <ui-input-otp-separator />
87
+ <ui-input-otp-group>
88
+ <ui-input-otp-slot [index]="4" />
89
+ <ui-input-otp-slot [index]="5" />
90
+ </ui-input-otp-group>
91
+ </ui-input-otp>
92
+ ```
93
+
94
+ ### Reactive forms
95
+
96
+ The root component implements `ControlValueAccessor` and also integrates directly with `ui-form-field`, so labels, descriptions, and invalid-state wiring work without `uiFormControl`.
97
+
98
+ ```ts
99
+ readonly verificationForm = new FormGroup({
100
+ code: new FormControl('', {
101
+ nonNullable: true,
102
+ validators: [Validators.required, Validators.minLength(6)],
103
+ }),
104
+ });
105
+ ```
106
+
107
+ ```html
108
+ <ui-form-field>
109
+ <ui-form-label>Verification code</ui-form-label>
110
+ <ui-input-otp formControlName="code" [maxLength]="6" [pattern]="digitsPattern">
111
+ <ui-input-otp-group
112
+ class="*:data-[slot=input-otp-slot]:h-12 *:data-[slot=input-otp-slot]:w-11 *:data-[slot=input-otp-slot]:text-xl">
113
+ <ui-input-otp-slot [index]="0" />
114
+ <ui-input-otp-slot [index]="1" />
115
+ <ui-input-otp-slot [index]="2" />
116
+ </ui-input-otp-group>
117
+ <ui-input-otp-separator class="mx-2" />
118
+ <ui-input-otp-group
119
+ class="*:data-[slot=input-otp-slot]:h-12 *:data-[slot=input-otp-slot]:w-11 *:data-[slot=input-otp-slot]:text-xl">
120
+ <ui-input-otp-slot [index]="3" />
121
+ <ui-input-otp-slot [index]="4" />
122
+ <ui-input-otp-slot [index]="5" />
123
+ </ui-input-otp-group>
124
+ </ui-input-otp>
125
+ <ui-form-description>Enter the 6-digit code sent to m@example.com.</ui-form-description>
126
+ <ui-form-message />
127
+ </ui-form-field>
128
+ ```
129
+
130
+ ### Disabled and invalid states
131
+
132
+ Use the native `disabled` input when the code should remain visible but unavailable, and forward `aria-invalid="true"` when an expired or rejected code needs the destructive treatment.
133
+
134
+ ```html
135
+ <ui-input-otp [maxLength]="6" [pattern]="digitsPattern" value="123456" disabled>
136
+ <ui-input-otp-group>
137
+ <ui-input-otp-slot [index]="0" />
138
+ <ui-input-otp-slot [index]="1" />
139
+ <ui-input-otp-slot [index]="2" />
140
+ </ui-input-otp-group>
141
+ <ui-input-otp-separator />
142
+ <ui-input-otp-group>
143
+ <ui-input-otp-slot [index]="3" />
144
+ <ui-input-otp-slot [index]="4" />
145
+ <ui-input-otp-slot [index]="5" />
146
+ </ui-input-otp-group>
147
+ </ui-input-otp>
148
+ ```
149
+
150
+ ```html
151
+ <ui-input-otp
152
+ aria-invalid="true"
153
+ [maxLength]="6"
154
+ [pattern]="digitsPattern"
155
+ [value]="invalidCode()"
156
+ (valueChange)="invalidCode.set($event)">
157
+ <ui-input-otp-group>
158
+ <ui-input-otp-slot [index]="0" />
159
+ <ui-input-otp-slot [index]="1" />
160
+ <ui-input-otp-slot [index]="2" />
161
+ </ui-input-otp-group>
162
+ <ui-input-otp-separator />
163
+ <ui-input-otp-group>
164
+ <ui-input-otp-slot [index]="3" />
165
+ <ui-input-otp-slot [index]="4" />
166
+ <ui-input-otp-slot [index]="5" />
167
+ </ui-input-otp-group>
168
+ </ui-input-otp>
169
+ ```
170
+
171
+ ### Four digits and alphanumeric codes
172
+
173
+ Use `REGEXP_ONLY_DIGITS` for numeric OTPs and `REGEXP_ONLY_DIGITS_AND_CHARS` for mixed recovery codes.
174
+
175
+ ```html
176
+ <ui-input-otp [maxLength]="4" [pattern]="digitsPattern" [inputmode]="'numeric'">
177
+ <ui-input-otp-group>
178
+ <ui-input-otp-slot [index]="0" />
179
+ <ui-input-otp-slot [index]="1" />
180
+ <ui-input-otp-slot [index]="2" />
181
+ <ui-input-otp-slot [index]="3" />
182
+ </ui-input-otp-group>
183
+ </ui-input-otp>
184
+ ```
185
+
186
+ ```html
187
+ <ui-input-otp [maxLength]="6" [pattern]="digitsAndCharsPattern" [inputmode]="'text'">
188
+ <ui-input-otp-group>
189
+ <ui-input-otp-slot [index]="0" />
190
+ <ui-input-otp-slot [index]="1" />
191
+ <ui-input-otp-slot [index]="2" />
192
+ </ui-input-otp-group>
193
+ <ui-input-otp-separator />
194
+ <ui-input-otp-group>
195
+ <ui-input-otp-slot [index]="3" />
196
+ <ui-input-otp-slot [index]="4" />
197
+ <ui-input-otp-slot [index]="5" />
198
+ </ui-input-otp-group>
199
+ </ui-input-otp>
200
+ ```
201
+
202
+ ## API Reference
203
+
204
+ ### `InputOtpComponent`
205
+
206
+ | Input | Type | Default |
207
+ | ------------------ | -------------------------- | ----------------- |
208
+ | `maxLength` | `number` | `6` |
209
+ | `value` | `string` | `undefined` |
210
+ | `pattern` | `RegExp \| string \| null` | `null` |
211
+ | `required` | `boolean` | `false` |
212
+ | `disabled` | `boolean` | `false` |
213
+ | `inputmode` | `string \| null` | `'numeric'` |
214
+ | `autocomplete` | `string \| null` | `'one-time-code'` |
215
+ | `aria-label` | `string \| null` | `null` |
216
+ | `aria-labelledby` | `string \| null` | `null` |
217
+ | `aria-describedby` | `string \| null` | `null` |
218
+ | `class` | `string` | `''` |
219
+
220
+ ### Output
221
+
222
+ | Output | Type |
223
+ | ------------- | -------- |
224
+ | `valueChange` | `string` |
225
+
226
+ ### Parts
227
+
228
+ | Part | Selector | Notes |
229
+ | ---------------------------- | ------------------------ | ------------------------------------------------------------- |
230
+ | `InputOtpGroupComponent` | `ui-input-otp-group` | Groups adjacent slots into one bordered cluster. |
231
+ | `InputOtpSlotComponent` | `ui-input-otp-slot` | Requires an `index` and renders the focusable character slot. |
232
+ | `InputOtpSeparatorComponent` | `ui-input-otp-separator` | Inserts an optional visual separator between groups. |
233
+
234
+ Convenience exports: `REGEXP_ONLY_DIGITS` and `REGEXP_ONLY_DIGITS_AND_CHARS`.
235
+
236
+ ## Styling and Theming
237
+
238
+ The component exposes shadcn-style `data-slot` hooks on the root, group, separator, and slot hosts. Use `*:data-[slot=input-otp-slot]` utilities on `ui-input-otp-group` when a layout needs taller or wider cells, for example:
239
+
240
+ ```html
241
+ <ui-input-otp-group
242
+ class="*:data-[slot=input-otp-slot]:h-12 *:data-[slot=input-otp-slot]:w-11 *:data-[slot=input-otp-slot]:text-xl">
243
+ ...
244
+ </ui-input-otp-group>
245
+ ```
246
+
247
+ The default styles use the shared border, ring, destructive, foreground, and muted-foreground tokens from the library theme.
248
+
249
+ ## Accessibility
250
+
251
+ - Each slot is a real input with an accessible name that includes its position in the sequence.
252
+ - `ui-form-field` labels and descriptions wire to the component automatically when the OTP lives inside the field wrapper.
253
+ - `aria-invalid="true"` on the root forwards the destructive treatment across the slot set.
254
+ - Keep the surrounding label and helper text descriptive. Users should understand where the code came from and how many characters are expected.
255
+
256
+ ## Keyboard Interactions
257
+
258
+ - Typing a character replaces the current slot and advances focus.
259
+ - Paste distributes accepted characters from the current slot onward.
260
+ - Arrow keys move across slots and flip direction under RTL layouts.
261
+ - `Backspace` removes the current or previous slot and shifts the remaining value left.
262
+ - `Delete` removes the current slot and shifts the remaining value left.
263
+
264
+ ## Angular Notes
265
+
266
+ - Use `[value]` plus `(valueChange)` for signal-backed local state.
267
+ - Use `formControlName`, `[formControl]`, or `[(ngModel)]` for form-driven flows.
268
+ - There is no separate `defaultValue` input; seed the initial code with the bound signal or form control value.
269
+ - Unlike native inputs, this component does not need `uiFormControl`; it integrates with the form-field context directly.
270
+
271
+ ## Source Parity
272
+
273
+ This Angular slice keeps the shadcn composition, grouped separators, pattern filtering, paste handling, and verification-form examples. The deliberate Angular deviation is the runtime implementation: each slot is a visible input coordinated by the root CVA instead of the upstream single hidden-input package. Browser one-time-code autofill works best through the first slot with the default `autocomplete="one-time-code"` behavior.
package/item/README.md ADDED
@@ -0,0 +1,247 @@
1
+ # Item
2
+
3
+ Displays a flexible content row with optional media, title, description, actions, header, and footer.
4
+
5
+ Use Item when you need to present content such as profile summaries, settings rows, list links, media rows, or menu-like entries without introducing form-field semantics.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import {
11
+ ItemActionsComponent,
12
+ ItemComponent,
13
+ ItemContentComponent,
14
+ ItemDescriptionComponent,
15
+ ItemFooterComponent,
16
+ ItemGroupComponent,
17
+ ItemHeaderComponent,
18
+ ItemMediaComponent,
19
+ ItemSeparatorComponent,
20
+ ItemTitleComponent,
21
+ } from '@edsis/ui/item';
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ Use `<ui-item>` for the default host element. When the row should behave like a native link or button, apply `[ui-item]` directly to the semantic host instead of relying on React-style `asChild` composition.
27
+
28
+ ```html
29
+ <ui-item variant="outline">
30
+ <ui-item-media variant="icon">
31
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
32
+ <path d="M12 5v14" />
33
+ <path d="M5 12h14" />
34
+ </svg>
35
+ </ui-item-media>
36
+
37
+ <ui-item-content>
38
+ <ui-item-title>Security alert</ui-item-title>
39
+ <ui-item-description>New login detected from an unknown device.</ui-item-description>
40
+ </ui-item-content>
41
+
42
+ <ui-item-actions>
43
+ <button ui-button variant="outline" size="sm" type="button">Review</button>
44
+ </ui-item-actions>
45
+ </ui-item>
46
+ ```
47
+
48
+ ## Composition
49
+
50
+ The Angular structure follows the shadcn Item information architecture while translating React-specific patterns to Angular selectors and semantic hosts.
51
+
52
+ ```text
53
+ ItemGroup
54
+ └── Item
55
+ ├── ItemHeader
56
+ ├── ItemMedia
57
+ ├── ItemContent
58
+ │ ├── ItemTitle
59
+ │ └── ItemDescription
60
+ ├── ItemActions
61
+ └── ItemFooter
62
+ ```
63
+
64
+ ## Common patterns
65
+
66
+ ### Variants
67
+
68
+ Use `variant="outline"` for bordered rows, `variant="muted"` for low-emphasis containers, and the default variant when the item should blend into the surrounding surface.
69
+
70
+ ```html
71
+ <div class="flex max-w-md flex-col gap-4">
72
+ <ui-item class="px-4 py-3">
73
+ <ui-item-content>
74
+ <ui-item-title>Default item</ui-item-title>
75
+ <ui-item-description>Transparent background with no border.</ui-item-description>
76
+ </ui-item-content>
77
+ </ui-item>
78
+
79
+ <ui-item variant="outline">
80
+ <ui-item-content>
81
+ <ui-item-title>Outline item</ui-item-title>
82
+ <ui-item-description>Bordered treatment for cards and settings rows.</ui-item-description>
83
+ </ui-item-content>
84
+ </ui-item>
85
+
86
+ <ui-item variant="muted">
87
+ <ui-item-content>
88
+ <ui-item-title>Muted item</ui-item-title>
89
+ <ui-item-description>Soft background for secondary content.</ui-item-description>
90
+ </ui-item-content>
91
+ </ui-item>
92
+ </div>
93
+ ```
94
+
95
+ ### Media modes
96
+
97
+ `ui-item-media` supports three common shadcn-style treatments.
98
+
99
+ - Default media for avatars or custom projected content.
100
+ - `variant="icon"` for compact icon chips.
101
+ - `variant="image"` for fixed-size artwork or thumbnails.
102
+
103
+ ```html
104
+ <ui-item variant="outline">
105
+ <ui-item-media>
106
+ <ui-avatar>
107
+ <ui-avatar-image src="https://github.com/shadcn.png" alt="@shadcn" />
108
+ <ui-avatar-fallback>CN</ui-avatar-fallback>
109
+ </ui-avatar>
110
+ </ui-item-media>
111
+
112
+ <ui-item-content>
113
+ <ui-item-title>shadcn</ui-item-title>
114
+ <ui-item-description>Example avatar content</ui-item-description>
115
+ </ui-item-content>
116
+ </ui-item>
117
+ ```
118
+
119
+ ### Size
120
+
121
+ Set `size` on the root item to scale title and description typography plus the icon and image media wrappers.
122
+
123
+ ```html
124
+ <ui-item variant="outline" size="default">...</ui-item>
125
+ <ui-item variant="outline" size="sm">...</ui-item>
126
+ <ui-item variant="outline" size="xs">...</ui-item>
127
+ ```
128
+
129
+ ### Group with separators
130
+
131
+ Use `ui-item-group` with `ui-item-separator` when you need a vertically stacked list of related rows.
132
+
133
+ ```html
134
+ <ui-item-group class="max-w-sm gap-0 rounded-xl border border-border">
135
+ <ui-item class="px-4 py-3">
136
+ <ui-item-content>
137
+ <ui-item-title>shadcn</ui-item-title>
138
+ <ui-item-description>shadcn@vercel.com</ui-item-description>
139
+ </ui-item-content>
140
+ </ui-item>
141
+ <ui-item-separator />
142
+ <ui-item class="px-4 py-3">
143
+ <ui-item-content>
144
+ <ui-item-title>evilrabbit</ui-item-title>
145
+ <ui-item-description>evilrabbit@vercel.com</ui-item-description>
146
+ </ui-item-content>
147
+ </ui-item>
148
+ </ui-item-group>
149
+ ```
150
+
151
+ ### Link host
152
+
153
+ shadcn React uses `asChild` for anchors. In Angular, put `[ui-item]` on the anchor directly.
154
+
155
+ ```html
156
+ <a ui-item href="/dashboard" variant="outline">
157
+ <ui-item-content>
158
+ <ui-item-title>Dashboard</ui-item-title>
159
+ <ui-item-description>Overview of your account and activity.</ui-item-description>
160
+ </ui-item-content>
161
+ <ui-item-actions>
162
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="size-4">
163
+ <path d="m9 18 6-6-6-6" />
164
+ </svg>
165
+ </ui-item-actions>
166
+ </a>
167
+ ```
168
+
169
+ ### Dropdown composition
170
+
171
+ The shadcn Item dropdown example maps cleanly to the local menu primitives. Render `ui-item` inside a `ui-menu-item` when you want denser menu rows.
172
+
173
+ ```html
174
+ <button ui-button variant="outline" [uiMenuTrigger]="peopleMenu">Select person</button>
175
+
176
+ <ng-template uiMenuContent #peopleMenu="uiMenuContent">
177
+ <ui-menu-surface class="w-64">
178
+ <ui-menu-label>People</ui-menu-label>
179
+ <ui-menu-separator />
180
+
181
+ <button ui-menu-item class="p-0">
182
+ <ui-item size="xs" class="w-full p-2">
183
+ <ui-item-content>
184
+ <ui-item-title>shadcn</ui-item-title>
185
+ <ui-item-description>shadcn@vercel.com</ui-item-description>
186
+ </ui-item-content>
187
+ </ui-item>
188
+ </button>
189
+ </ui-menu-surface>
190
+ </ng-template>
191
+ ```
192
+
193
+ ## API reference
194
+
195
+ ### `ItemComponent`
196
+
197
+ | Input | Type | Default |
198
+ | --------- | ----------------------------------- | ----------- |
199
+ | `variant` | `'default' \| 'outline' \| 'muted'` | `'default'` |
200
+ | `size` | `'default' \| 'sm' \| 'xs'` | `'default'` |
201
+ | `class` | `string` | `''` |
202
+
203
+ ### `ItemMediaComponent`
204
+
205
+ | Input | Type | Default |
206
+ | --------- | -------------------------------- | ----------- |
207
+ | `variant` | `'default' \| 'icon' \| 'image'` | `'default'` |
208
+ | `class` | `string` | `''` |
209
+
210
+ ### Parts
211
+
212
+ - `ui-item-group` arranges related items in a vertical stack.
213
+ - `ui-item-separator` renders a full-width divider line between grouped rows.
214
+ - `ui-item-header` and `ui-item-footer` span the full width of the item.
215
+ - `ui-item-actions` stays aligned to the trailing edge with logical spacing, so RTL layouts remain correct.
216
+
217
+ ## Styling and theming
218
+
219
+ The outline variant uses `border-border` instead of inheriting border color from text, which keeps dividers and item shells consistent with the rest of the library theme.
220
+
221
+ Pass `class` to the root or individual parts to tune spacing, borders, width, image treatment, or flex behavior. `ui-item-content` can be reused for secondary metadata by overriding it with classes such as `flex-none basis-auto items-end text-right`.
222
+
223
+ Powered by `class-variance-authority`. Re-exports: `itemVariants`, `itemMediaVariants`, `ItemVariant`, `ItemSize`, `ItemMediaVariant`.
224
+
225
+ ## Accessibility
226
+
227
+ - Use a semantic anchor or button host when the row is interactive.
228
+ - Keep decorative icons and artwork `aria-hidden` or use empty `alt` text when nearby text already names the content.
229
+ - Do not place nested interactive controls inside an interactive anchor host. When the row contains independent actions, keep the host non-interactive and place buttons inside `ui-item-actions`.
230
+
231
+ ## Keyboard interactions
232
+
233
+ - Non-interactive items are not focusable.
234
+ - Anchor and button hosts keep native Tab, Enter, and Space behavior.
235
+ - Embedded controls inside `ui-item-actions` follow the natural DOM tab order.
236
+ - When composed inside `ui-menu-item`, keyboard behavior comes from the menu primitives.
237
+
238
+ ## Angular notes
239
+
240
+ - There is no `asChild` input in Angular. Use semantic hosts such as `<a ui-item>` or `<button ui-item>` directly.
241
+ - `size` and `variant` are Angular `input()` values on the root item.
242
+ - `ui-item-media` reads the parent item size automatically so icon and image wrappers stay in sync.
243
+ - Use `Field` or the local form primitives when the row contains an actual form control such as a checkbox, radio, input, or select.
244
+
245
+ ## Source parity
246
+
247
+ This Angular implementation follows the shadcn Item information architecture and examples while translating React `asChild` composition to semantic hosts and mapping the dropdown example to the existing Angular menu primitives.
@@ -0,0 +1,81 @@
1
+ # Kanban
2
+
3
+ Composable kanban board primitives inspired by Flux Kanban and implemented with local shadcn-style Angular patterns.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import {
9
+ KanbanCardComponent,
10
+ KanbanCardFooterComponent,
11
+ KanbanCardHeaderComponent,
12
+ KanbanColumnActionsComponent,
13
+ KanbanColumnCardsComponent,
14
+ KanbanColumnComponent,
15
+ KanbanColumnFooterComponent,
16
+ KanbanColumnHeaderComponent,
17
+ KanbanComponent,
18
+ } from '@edsis/ui/kanban';
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```html
24
+ <ui-kanban>
25
+ <ui-kanban-column>
26
+ <ui-kanban-column-header heading="Planned" count="4" />
27
+ <ui-kanban-column-cards>
28
+ <ui-kanban-card heading="Update privacy policy in app" />
29
+ <button ui-kanban-card type="button" heading="Search suggestions are broken"></button>
30
+ </ui-kanban-column-cards>
31
+ </ui-kanban-column>
32
+ </ui-kanban>
33
+ ```
34
+
35
+ ## Composition
36
+
37
+ - `ui-kanban` owns horizontal board layout and column width variables.
38
+ - `ui-kanban-column` frames one workflow stage.
39
+ - `ui-kanban-column-header` accepts `heading`, `subheading`, `count`, and `badge` inputs.
40
+ - `ui-kanban-column-actions` projects action buttons into the column header.
41
+ - `ui-kanban-column-cards` contains cards and handles vertical scrolling.
42
+ - `ui-kanban-column-footer` is for add-card forms or secondary actions.
43
+ - `ui-kanban-card` renders a static card; use `button[ui-kanban-card]` or `a[ui-kanban-card]` for clickable cards.
44
+ - `ui-kanban-card-header` and `ui-kanban-card-footer` project tags, metadata, avatars, or actions into a card.
45
+
46
+ ## Inputs
47
+
48
+ ### KanbanComponent
49
+
50
+ | Input | Type | Default | Description |
51
+ | ------------- | --------------------------- | ----------- | ----------------------------------------- |
52
+ | `columnWidth` | `'sm' \| 'default' \| 'lg'` | `'default'` | Sets the board column width CSS variable. |
53
+ | `dense` | `boolean` | `false` | Reduces column and card gaps. |
54
+ | `class` | `string` | `''` | Additional host classes. |
55
+
56
+ ### KanbanColumnHeaderComponent
57
+
58
+ | Input | Type | Default | Description |
59
+ | ------------ | -------------------------- | ------- | --------------------------------------------- |
60
+ | `heading` | `string` | `''` | Primary column title. |
61
+ | `subheading` | `string` | `''` | Secondary column text. |
62
+ | `count` | `string \| number \| null` | `null` | Optional card count shown beside the heading. |
63
+ | `badge` | `string` | `''` | Optional badge text shown beside the heading. |
64
+ | `class` | `string` | `''` | Additional host classes. |
65
+
66
+ ### KanbanCardComponent
67
+
68
+ | Input | Type | Default | Description |
69
+ | ---------- | --------- | ------- | -------------------------------------------------- |
70
+ | `heading` | `string` | `''` | Default card title when no custom body is needed. |
71
+ | `selected` | `boolean` | `false` | Marks a card as selected/current. |
72
+ | `disabled` | `boolean` | `false` | Disables interaction and applies disabled styling. |
73
+ | `class` | `string` | `''` | Additional host classes. |
74
+
75
+ ## Accessibility
76
+
77
+ - Use `button[ui-kanban-card]` for cards that trigger an action.
78
+ - Provide `type="button"` on button cards inside forms.
79
+ - Keep card titles visible and descriptive.
80
+ - Give icon-only column actions an `aria-label`.
81
+ - Preserve DOM order to match the workflow order announced to assistive technology.