prime-ui-kit 0.9.3 → 0.10.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 (567) hide show
  1. package/README.md +9 -4
  2. package/THIRD_PARTY_NOTICES +76 -0
  3. package/dist/chunks/{chunk-6JTZOA5I.js → chunk-4TRNUP45.js} +534 -522
  4. package/dist/chunks/chunk-EJ2ZVQYL.js +5805 -0
  5. package/dist/chunks/chunk-GFKDZFQR.js +1208 -0
  6. package/dist/chunks/{chunk-OAE4IQX2.js → chunk-K4FACFQ2.js} +8 -6
  7. package/dist/chunks/{chunk-U5SR2LZR.js → chunk-T7CLQXGB.js} +4 -2
  8. package/dist/color-picker.js +3 -2
  9. package/dist/components/button/Button.d.ts +5 -2
  10. package/dist/icon-set.d.ts +501 -0
  11. package/dist/icons/Icon.d.ts +10 -18
  12. package/dist/icons/glyph.d.ts +40 -0
  13. package/dist/icons/glyphs/a-arrow-down.d.ts +2 -0
  14. package/dist/icons/glyphs/a-arrow-up.d.ts +2 -0
  15. package/dist/icons/glyphs/accessibility.d.ts +2 -0
  16. package/dist/icons/glyphs/activity.d.ts +2 -0
  17. package/dist/icons/glyphs/air-vent.d.ts +2 -0
  18. package/dist/icons/glyphs/airplay.d.ts +2 -0
  19. package/dist/icons/glyphs/alarm-clock-check.d.ts +2 -0
  20. package/dist/icons/glyphs/alarm-clock-minus.d.ts +2 -0
  21. package/dist/icons/glyphs/alarm-clock-plus.d.ts +2 -0
  22. package/dist/icons/glyphs/alarm-clock.d.ts +2 -0
  23. package/dist/icons/glyphs/alarm-smoke.d.ts +2 -0
  24. package/dist/icons/glyphs/align-horizontal-space-around.d.ts +2 -0
  25. package/dist/icons/glyphs/align-vertical-space-around.d.ts +2 -0
  26. package/dist/icons/glyphs/ambulance.d.ts +2 -0
  27. package/dist/icons/glyphs/angry.d.ts +2 -0
  28. package/dist/icons/glyphs/annoyed.d.ts +2 -0
  29. package/dist/icons/glyphs/archive.d.ts +2 -0
  30. package/dist/icons/glyphs/arrow-big-down-dash.d.ts +2 -0
  31. package/dist/icons/glyphs/arrow-big-down.d.ts +2 -0
  32. package/dist/icons/glyphs/arrow-big-left-dash.d.ts +2 -0
  33. package/dist/icons/glyphs/arrow-big-left.d.ts +2 -0
  34. package/dist/icons/glyphs/arrow-big-right-dash.d.ts +2 -0
  35. package/dist/icons/glyphs/arrow-big-right.d.ts +2 -0
  36. package/dist/icons/glyphs/arrow-big-up-dash.d.ts +2 -0
  37. package/dist/icons/glyphs/arrow-big-up.d.ts +2 -0
  38. package/dist/icons/glyphs/arrow-down-0-1.d.ts +2 -0
  39. package/dist/icons/glyphs/arrow-down-1-0.d.ts +2 -0
  40. package/dist/icons/glyphs/arrow-down-a-z.d.ts +2 -0
  41. package/dist/icons/glyphs/arrow-down-left.d.ts +2 -0
  42. package/dist/icons/glyphs/arrow-down-right.d.ts +2 -0
  43. package/dist/icons/glyphs/arrow-down-z-a.d.ts +2 -0
  44. package/dist/icons/glyphs/arrow-down.d.ts +2 -0
  45. package/dist/icons/glyphs/arrow-left.d.ts +2 -0
  46. package/dist/icons/glyphs/arrow-right.d.ts +2 -0
  47. package/dist/icons/glyphs/arrow-up-down.d.ts +2 -0
  48. package/dist/icons/glyphs/arrow-up-left.d.ts +2 -0
  49. package/dist/icons/glyphs/arrow-up-right.d.ts +2 -0
  50. package/dist/icons/glyphs/arrow-up.d.ts +2 -0
  51. package/dist/icons/glyphs/at-sign.d.ts +2 -0
  52. package/dist/icons/glyphs/atom.d.ts +2 -0
  53. package/dist/icons/glyphs/audio-lines.d.ts +2 -0
  54. package/dist/icons/glyphs/axe.d.ts +2 -0
  55. package/dist/icons/glyphs/badge-alert.d.ts +2 -0
  56. package/dist/icons/glyphs/badge-percent.d.ts +2 -0
  57. package/dist/icons/glyphs/ban.d.ts +2 -0
  58. package/dist/icons/glyphs/banana.d.ts +2 -0
  59. package/dist/icons/glyphs/battery-charging.d.ts +2 -0
  60. package/dist/icons/glyphs/battery-full.d.ts +2 -0
  61. package/dist/icons/glyphs/battery-low.d.ts +2 -0
  62. package/dist/icons/glyphs/battery-medium.d.ts +2 -0
  63. package/dist/icons/glyphs/battery-plus.d.ts +2 -0
  64. package/dist/icons/glyphs/battery-warning.d.ts +2 -0
  65. package/dist/icons/glyphs/battery.d.ts +2 -0
  66. package/dist/icons/glyphs/bell-electric.d.ts +2 -0
  67. package/dist/icons/glyphs/bell.d.ts +2 -0
  68. package/dist/icons/glyphs/biceps-flexed.d.ts +2 -0
  69. package/dist/icons/glyphs/binary.d.ts +2 -0
  70. package/dist/icons/glyphs/blocks.d.ts +2 -0
  71. package/dist/icons/glyphs/bluetooth-connected.d.ts +2 -0
  72. package/dist/icons/glyphs/bluetooth-off.d.ts +2 -0
  73. package/dist/icons/glyphs/bluetooth-searching.d.ts +2 -0
  74. package/dist/icons/glyphs/bluetooth.d.ts +2 -0
  75. package/dist/icons/glyphs/bold.d.ts +2 -0
  76. package/dist/icons/glyphs/bone.d.ts +2 -0
  77. package/dist/icons/glyphs/book-open.d.ts +2 -0
  78. package/dist/icons/glyphs/book-text.d.ts +2 -0
  79. package/dist/icons/glyphs/bookmark-check.d.ts +2 -0
  80. package/dist/icons/glyphs/bookmark-minus.d.ts +2 -0
  81. package/dist/icons/glyphs/bookmark-plus.d.ts +2 -0
  82. package/dist/icons/glyphs/bookmark-x.d.ts +2 -0
  83. package/dist/icons/glyphs/bookmark.d.ts +2 -0
  84. package/dist/icons/glyphs/bot-message-square.d.ts +2 -0
  85. package/dist/icons/glyphs/bot.d.ts +2 -0
  86. package/dist/icons/glyphs/box.d.ts +2 -0
  87. package/dist/icons/glyphs/boxes.d.ts +2 -0
  88. package/dist/icons/glyphs/brain.d.ts +2 -0
  89. package/dist/icons/glyphs/briefcase-business.d.ts +2 -0
  90. package/dist/icons/glyphs/calendar-check-2.d.ts +2 -0
  91. package/dist/icons/glyphs/calendar-check.d.ts +2 -0
  92. package/dist/icons/glyphs/calendar-cog.d.ts +2 -0
  93. package/dist/icons/glyphs/calendar-days.d.ts +2 -0
  94. package/dist/icons/glyphs/calendar.d.ts +2 -0
  95. package/dist/icons/glyphs/car.d.ts +2 -0
  96. package/dist/icons/glyphs/cast.d.ts +2 -0
  97. package/dist/icons/glyphs/cctv.d.ts +2 -0
  98. package/dist/icons/glyphs/chart-bar-decreasing.d.ts +2 -0
  99. package/dist/icons/glyphs/chart-bar-increasing.d.ts +2 -0
  100. package/dist/icons/glyphs/chart-column-decreasing.d.ts +2 -0
  101. package/dist/icons/glyphs/chart-column-increasing.d.ts +2 -0
  102. package/dist/icons/glyphs/chart-column.d.ts +2 -0
  103. package/dist/icons/glyphs/chart-line.d.ts +2 -0
  104. package/dist/icons/glyphs/chart-no-axes-column-decreasing.d.ts +2 -0
  105. package/dist/icons/glyphs/chart-no-axes-column-increasing.d.ts +2 -0
  106. package/dist/icons/glyphs/chart-pie.d.ts +2 -0
  107. package/dist/icons/glyphs/chart-scatter.d.ts +2 -0
  108. package/dist/icons/glyphs/chart-spline.d.ts +2 -0
  109. package/dist/icons/glyphs/check-check.d.ts +2 -0
  110. package/dist/icons/glyphs/check.d.ts +2 -0
  111. package/dist/icons/glyphs/chess-bishop.d.ts +2 -0
  112. package/dist/icons/glyphs/chess-king.d.ts +2 -0
  113. package/dist/icons/glyphs/chess-knight.d.ts +2 -0
  114. package/dist/icons/glyphs/chess-pawn.d.ts +2 -0
  115. package/dist/icons/glyphs/chevron-down.d.ts +2 -0
  116. package/dist/icons/glyphs/chevron-first.d.ts +2 -0
  117. package/dist/icons/glyphs/chevron-left.d.ts +2 -0
  118. package/dist/icons/glyphs/chevron-right.d.ts +2 -0
  119. package/dist/icons/glyphs/chevron-up.d.ts +2 -0
  120. package/dist/icons/glyphs/chevrons-down-up.d.ts +2 -0
  121. package/dist/icons/glyphs/chevrons-left-right.d.ts +2 -0
  122. package/dist/icons/glyphs/chevrons-left.d.ts +2 -0
  123. package/dist/icons/glyphs/chevrons-right-left.d.ts +2 -0
  124. package/dist/icons/glyphs/chevrons-up-down.d.ts +2 -0
  125. package/dist/icons/glyphs/chromium.d.ts +2 -0
  126. package/dist/icons/glyphs/cigarette-off.d.ts +2 -0
  127. package/dist/icons/glyphs/cigarette.d.ts +2 -0
  128. package/dist/icons/glyphs/circle-check.d.ts +2 -0
  129. package/dist/icons/glyphs/circle-chevron-down.d.ts +2 -0
  130. package/dist/icons/glyphs/circle-chevron-left.d.ts +2 -0
  131. package/dist/icons/glyphs/circle-chevron-right.d.ts +2 -0
  132. package/dist/icons/glyphs/circle-chevron-up.d.ts +2 -0
  133. package/dist/icons/glyphs/circle-dashed.d.ts +2 -0
  134. package/dist/icons/glyphs/circle-dollar-sign.d.ts +2 -0
  135. package/dist/icons/glyphs/circle-gauge.d.ts +2 -0
  136. package/dist/icons/glyphs/circle-question-mark.d.ts +2 -0
  137. package/dist/icons/glyphs/circle-x.d.ts +2 -0
  138. package/dist/icons/glyphs/circle.d.ts +2 -0
  139. package/dist/icons/glyphs/clapperboard.d.ts +2 -0
  140. package/dist/icons/glyphs/clipboard-check.d.ts +2 -0
  141. package/dist/icons/glyphs/clock.d.ts +2 -0
  142. package/dist/icons/glyphs/cloud-backup.d.ts +2 -0
  143. package/dist/icons/glyphs/cloud-cog.d.ts +2 -0
  144. package/dist/icons/glyphs/cloud-download.d.ts +2 -0
  145. package/dist/icons/glyphs/cloud-lightning.d.ts +2 -0
  146. package/dist/icons/glyphs/cloud-off.d.ts +2 -0
  147. package/dist/icons/glyphs/cloud-rain-wind.d.ts +2 -0
  148. package/dist/icons/glyphs/cloud-rain.d.ts +2 -0
  149. package/dist/icons/glyphs/cloud-snow.d.ts +2 -0
  150. package/dist/icons/glyphs/cloud-sun.d.ts +2 -0
  151. package/dist/icons/glyphs/cloud-sync.d.ts +2 -0
  152. package/dist/icons/glyphs/cloud-upload.d.ts +2 -0
  153. package/dist/icons/glyphs/code-xml.d.ts +2 -0
  154. package/dist/icons/glyphs/coffee.d.ts +2 -0
  155. package/dist/icons/glyphs/cog.d.ts +2 -0
  156. package/dist/icons/glyphs/compass.d.ts +2 -0
  157. package/dist/icons/glyphs/concierge-bell.d.ts +2 -0
  158. package/dist/icons/glyphs/construction.d.ts +2 -0
  159. package/dist/icons/glyphs/contrast.d.ts +2 -0
  160. package/dist/icons/glyphs/cooking-pot.d.ts +2 -0
  161. package/dist/icons/glyphs/copy.d.ts +2 -0
  162. package/dist/icons/glyphs/corner-down-left.d.ts +2 -0
  163. package/dist/icons/glyphs/corner-down-right.d.ts +2 -0
  164. package/dist/icons/glyphs/corner-left-down.d.ts +2 -0
  165. package/dist/icons/glyphs/corner-left-up.d.ts +2 -0
  166. package/dist/icons/glyphs/corner-right-down.d.ts +2 -0
  167. package/dist/icons/glyphs/corner-right-up.d.ts +2 -0
  168. package/dist/icons/glyphs/corner-up-left.d.ts +2 -0
  169. package/dist/icons/glyphs/corner-up-right.d.ts +2 -0
  170. package/dist/icons/glyphs/cpu.d.ts +2 -0
  171. package/dist/icons/glyphs/credit-card.d.ts +2 -0
  172. package/dist/icons/glyphs/cup-soda.d.ts +2 -0
  173. package/dist/icons/glyphs/database-backup.d.ts +2 -0
  174. package/dist/icons/glyphs/delete.d.ts +2 -0
  175. package/dist/icons/glyphs/disc-3.d.ts +2 -0
  176. package/dist/icons/glyphs/dollar-sign.d.ts +2 -0
  177. package/dist/icons/glyphs/download.d.ts +2 -0
  178. package/dist/icons/glyphs/dribbble.d.ts +2 -0
  179. package/dist/icons/glyphs/droplet.d.ts +2 -0
  180. package/dist/icons/glyphs/drum.d.ts +2 -0
  181. package/dist/icons/glyphs/earth.d.ts +2 -0
  182. package/dist/icons/glyphs/ellipsis.d.ts +2 -0
  183. package/dist/icons/glyphs/euro.d.ts +2 -0
  184. package/dist/icons/glyphs/ev-charger.d.ts +2 -0
  185. package/dist/icons/glyphs/expand.d.ts +2 -0
  186. package/dist/icons/glyphs/external-link.d.ts +2 -0
  187. package/dist/icons/glyphs/eye-off.d.ts +2 -0
  188. package/dist/icons/glyphs/eye.d.ts +2 -0
  189. package/dist/icons/glyphs/facebook.d.ts +2 -0
  190. package/dist/icons/glyphs/fan.d.ts +2 -0
  191. package/dist/icons/glyphs/feather.d.ts +2 -0
  192. package/dist/icons/glyphs/figma.d.ts +2 -0
  193. package/dist/icons/glyphs/file-chart-line.d.ts +2 -0
  194. package/dist/icons/glyphs/file-check-corner.d.ts +2 -0
  195. package/dist/icons/glyphs/file-check.d.ts +2 -0
  196. package/dist/icons/glyphs/file-cog.d.ts +2 -0
  197. package/dist/icons/glyphs/file-pen-line.d.ts +2 -0
  198. package/dist/icons/glyphs/file-stack.d.ts +2 -0
  199. package/dist/icons/glyphs/file-text.d.ts +2 -0
  200. package/dist/icons/glyphs/fingerprint-pattern.d.ts +2 -0
  201. package/dist/icons/glyphs/fish-symbol.d.ts +2 -0
  202. package/dist/icons/glyphs/flame.d.ts +2 -0
  203. package/dist/icons/glyphs/flask-conical.d.ts +2 -0
  204. package/dist/icons/glyphs/folder-archive.d.ts +2 -0
  205. package/dist/icons/glyphs/folder-check.d.ts +2 -0
  206. package/dist/icons/glyphs/folder-clock.d.ts +2 -0
  207. package/dist/icons/glyphs/folder-code.d.ts +2 -0
  208. package/dist/icons/glyphs/folder-cog.d.ts +2 -0
  209. package/dist/icons/glyphs/folder-dot.d.ts +2 -0
  210. package/dist/icons/glyphs/folder-down.d.ts +2 -0
  211. package/dist/icons/glyphs/folder-git-2.d.ts +2 -0
  212. package/dist/icons/glyphs/folder-git.d.ts +2 -0
  213. package/dist/icons/glyphs/folder-heart.d.ts +2 -0
  214. package/dist/icons/glyphs/folder-input.d.ts +2 -0
  215. package/dist/icons/glyphs/folder-kanban.d.ts +2 -0
  216. package/dist/icons/glyphs/folder-key.d.ts +2 -0
  217. package/dist/icons/glyphs/folder-lock.d.ts +2 -0
  218. package/dist/icons/glyphs/folder-minus.d.ts +2 -0
  219. package/dist/icons/glyphs/folder-open.d.ts +2 -0
  220. package/dist/icons/glyphs/folder-output.d.ts +2 -0
  221. package/dist/icons/glyphs/folder-plus.d.ts +2 -0
  222. package/dist/icons/glyphs/folder-root.d.ts +2 -0
  223. package/dist/icons/glyphs/folder-sync.d.ts +2 -0
  224. package/dist/icons/glyphs/folder-tree.d.ts +2 -0
  225. package/dist/icons/glyphs/folder-up.d.ts +2 -0
  226. package/dist/icons/glyphs/folder-x.d.ts +2 -0
  227. package/dist/icons/glyphs/folders.d.ts +2 -0
  228. package/dist/icons/glyphs/frame.d.ts +2 -0
  229. package/dist/icons/glyphs/frown.d.ts +2 -0
  230. package/dist/icons/glyphs/gallery-horizontal-end.d.ts +2 -0
  231. package/dist/icons/glyphs/gallery-thumbnails.d.ts +2 -0
  232. package/dist/icons/glyphs/gallery-vertical-end.d.ts +2 -0
  233. package/dist/icons/glyphs/gauge.d.ts +2 -0
  234. package/dist/icons/glyphs/gavel.d.ts +2 -0
  235. package/dist/icons/glyphs/georgian-lari.d.ts +2 -0
  236. package/dist/icons/glyphs/git-branch.d.ts +2 -0
  237. package/dist/icons/glyphs/git-commit-horizontal.d.ts +2 -0
  238. package/dist/icons/glyphs/git-commit-vertical.d.ts +2 -0
  239. package/dist/icons/glyphs/git-compare-arrows.d.ts +2 -0
  240. package/dist/icons/glyphs/git-compare.d.ts +2 -0
  241. package/dist/icons/glyphs/git-fork.d.ts +2 -0
  242. package/dist/icons/glyphs/git-graph.d.ts +2 -0
  243. package/dist/icons/glyphs/git-merge.d.ts +2 -0
  244. package/dist/icons/glyphs/git-pull-request-closed.d.ts +2 -0
  245. package/dist/icons/glyphs/git-pull-request-create.d.ts +2 -0
  246. package/dist/icons/glyphs/git-pull-request.d.ts +2 -0
  247. package/dist/icons/glyphs/github.d.ts +2 -0
  248. package/dist/icons/glyphs/gitlab.d.ts +2 -0
  249. package/dist/icons/glyphs/graduation-cap.d.ts +2 -0
  250. package/dist/icons/glyphs/grip-horizontal.d.ts +2 -0
  251. package/dist/icons/glyphs/grip-vertical.d.ts +2 -0
  252. package/dist/icons/glyphs/grip.d.ts +2 -0
  253. package/dist/icons/glyphs/hammer.d.ts +2 -0
  254. package/dist/icons/glyphs/hand-coins.d.ts +2 -0
  255. package/dist/icons/glyphs/hand-fist.d.ts +2 -0
  256. package/dist/icons/glyphs/hand-grab.d.ts +2 -0
  257. package/dist/icons/glyphs/hand-heart.d.ts +2 -0
  258. package/dist/icons/glyphs/hand-helping.d.ts +2 -0
  259. package/dist/icons/glyphs/hand-metal.d.ts +2 -0
  260. package/dist/icons/glyphs/hand.d.ts +2 -0
  261. package/dist/icons/glyphs/hard-drive-download.d.ts +2 -0
  262. package/dist/icons/glyphs/hard-drive-upload.d.ts +2 -0
  263. package/dist/icons/glyphs/hard-drive.d.ts +2 -0
  264. package/dist/icons/glyphs/hat-glasses.d.ts +2 -0
  265. package/dist/icons/glyphs/heart-handshake.d.ts +2 -0
  266. package/dist/icons/glyphs/heart-pulse.d.ts +2 -0
  267. package/dist/icons/glyphs/heart.d.ts +2 -0
  268. package/dist/icons/glyphs/history.d.ts +2 -0
  269. package/dist/icons/glyphs/hourglass.d.ts +2 -0
  270. package/dist/icons/glyphs/house.d.ts +2 -0
  271. package/dist/icons/glyphs/id-card.d.ts +2 -0
  272. package/dist/icons/glyphs/image.d.ts +2 -0
  273. package/dist/icons/glyphs/inbox.d.ts +2 -0
  274. package/dist/icons/glyphs/indian-rupee.d.ts +2 -0
  275. package/dist/icons/glyphs/info.d.ts +2 -0
  276. package/dist/icons/glyphs/instagram.d.ts +2 -0
  277. package/dist/icons/glyphs/italic.d.ts +2 -0
  278. package/dist/icons/glyphs/japanese-yen.d.ts +2 -0
  279. package/dist/icons/glyphs/key-round.d.ts +2 -0
  280. package/dist/icons/glyphs/key-square.d.ts +2 -0
  281. package/dist/icons/glyphs/key.d.ts +2 -0
  282. package/dist/icons/glyphs/keyboard.d.ts +2 -0
  283. package/dist/icons/glyphs/languages.d.ts +2 -0
  284. package/dist/icons/glyphs/laptop-minimal-check.d.ts +2 -0
  285. package/dist/icons/glyphs/laugh.d.ts +2 -0
  286. package/dist/icons/glyphs/layers.d.ts +2 -0
  287. package/dist/icons/glyphs/layout-dashboard.d.ts +2 -0
  288. package/dist/icons/glyphs/layout-grid.d.ts +2 -0
  289. package/dist/icons/glyphs/layout-panel-top.d.ts +2 -0
  290. package/dist/icons/glyphs/leaf.d.ts +2 -0
  291. package/dist/icons/glyphs/leafy-green.d.ts +2 -0
  292. package/dist/icons/glyphs/link-2.d.ts +2 -0
  293. package/dist/icons/glyphs/link.d.ts +2 -0
  294. package/dist/icons/glyphs/linkedin.d.ts +2 -0
  295. package/dist/icons/glyphs/list-filter.d.ts +2 -0
  296. package/dist/icons/glyphs/list-todo.d.ts +2 -0
  297. package/dist/icons/glyphs/list.d.ts +2 -0
  298. package/dist/icons/glyphs/loader-circle.d.ts +2 -0
  299. package/dist/icons/glyphs/loader-pinwheel.d.ts +2 -0
  300. package/dist/icons/glyphs/loader.d.ts +2 -0
  301. package/dist/icons/glyphs/lock-keyhole-open.d.ts +2 -0
  302. package/dist/icons/glyphs/lock-keyhole.d.ts +2 -0
  303. package/dist/icons/glyphs/lock-open.d.ts +2 -0
  304. package/dist/icons/glyphs/lock.d.ts +2 -0
  305. package/dist/icons/glyphs/log-in.d.ts +2 -0
  306. package/dist/icons/glyphs/log-out.d.ts +2 -0
  307. package/dist/icons/glyphs/mail-check.d.ts +2 -0
  308. package/dist/icons/glyphs/mail.d.ts +2 -0
  309. package/dist/icons/glyphs/mailbox.d.ts +2 -0
  310. package/dist/icons/glyphs/map-pin-check-inside.d.ts +2 -0
  311. package/dist/icons/glyphs/map-pin-check.d.ts +2 -0
  312. package/dist/icons/glyphs/map-pin-house.d.ts +2 -0
  313. package/dist/icons/glyphs/map-pin-minus-inside.d.ts +2 -0
  314. package/dist/icons/glyphs/map-pin-minus.d.ts +2 -0
  315. package/dist/icons/glyphs/map-pin-off.d.ts +2 -0
  316. package/dist/icons/glyphs/map-pin-plus-inside.d.ts +2 -0
  317. package/dist/icons/glyphs/map-pin-plus.d.ts +2 -0
  318. package/dist/icons/glyphs/map-pin-x-inside.d.ts +2 -0
  319. package/dist/icons/glyphs/map-pin.d.ts +2 -0
  320. package/dist/icons/glyphs/maximize-2.d.ts +2 -0
  321. package/dist/icons/glyphs/maximize.d.ts +2 -0
  322. package/dist/icons/glyphs/meh.d.ts +2 -0
  323. package/dist/icons/glyphs/menu.d.ts +2 -0
  324. package/dist/icons/glyphs/message-circle-check.d.ts +2 -0
  325. package/dist/icons/glyphs/message-circle-dashed.d.ts +2 -0
  326. package/dist/icons/glyphs/message-circle-more.d.ts +2 -0
  327. package/dist/icons/glyphs/message-circle-plus.d.ts +2 -0
  328. package/dist/icons/glyphs/message-circle-x.d.ts +2 -0
  329. package/dist/icons/glyphs/message-circle.d.ts +2 -0
  330. package/dist/icons/glyphs/message-square-check.d.ts +2 -0
  331. package/dist/icons/glyphs/message-square-dashed.d.ts +2 -0
  332. package/dist/icons/glyphs/message-square-more.d.ts +2 -0
  333. package/dist/icons/glyphs/message-square-plus.d.ts +2 -0
  334. package/dist/icons/glyphs/message-square-x.d.ts +2 -0
  335. package/dist/icons/glyphs/message-square.d.ts +2 -0
  336. package/dist/icons/glyphs/mic-off.d.ts +2 -0
  337. package/dist/icons/glyphs/mic.d.ts +2 -0
  338. package/dist/icons/glyphs/minimize.d.ts +2 -0
  339. package/dist/icons/glyphs/minus.d.ts +2 -0
  340. package/dist/icons/glyphs/monitor-check.d.ts +2 -0
  341. package/dist/icons/glyphs/monitor-cog.d.ts +2 -0
  342. package/dist/icons/glyphs/monitor.d.ts +2 -0
  343. package/dist/icons/glyphs/moon.d.ts +2 -0
  344. package/dist/icons/glyphs/mouse-pointer-click.d.ts +2 -0
  345. package/dist/icons/glyphs/nfc.d.ts +2 -0
  346. package/dist/icons/glyphs/package.d.ts +2 -0
  347. package/dist/icons/glyphs/palette.d.ts +2 -0
  348. package/dist/icons/glyphs/panel-left-close.d.ts +2 -0
  349. package/dist/icons/glyphs/panel-left-open.d.ts +2 -0
  350. package/dist/icons/glyphs/panel-right-open.d.ts +2 -0
  351. package/dist/icons/glyphs/paperclip.d.ts +2 -0
  352. package/dist/icons/glyphs/party-popper.d.ts +2 -0
  353. package/dist/icons/glyphs/pause.d.ts +2 -0
  354. package/dist/icons/glyphs/pen-tool.d.ts +2 -0
  355. package/dist/icons/glyphs/philippine-peso.d.ts +2 -0
  356. package/dist/icons/glyphs/phone-call.d.ts +2 -0
  357. package/dist/icons/glyphs/phone-forwarded.d.ts +2 -0
  358. package/dist/icons/glyphs/phone-incoming.d.ts +2 -0
  359. package/dist/icons/glyphs/phone-missed.d.ts +2 -0
  360. package/dist/icons/glyphs/phone-off.d.ts +2 -0
  361. package/dist/icons/glyphs/phone.d.ts +2 -0
  362. package/dist/icons/glyphs/pickaxe.d.ts +2 -0
  363. package/dist/icons/glyphs/pipette.d.ts +2 -0
  364. package/dist/icons/glyphs/plane-landing.d.ts +2 -0
  365. package/dist/icons/glyphs/plane-takeoff.d.ts +2 -0
  366. package/dist/icons/glyphs/plane.d.ts +2 -0
  367. package/dist/icons/glyphs/play.d.ts +2 -0
  368. package/dist/icons/glyphs/plug-zap.d.ts +2 -0
  369. package/dist/icons/glyphs/plus.d.ts +2 -0
  370. package/dist/icons/glyphs/pound-sterling.d.ts +2 -0
  371. package/dist/icons/glyphs/projector.d.ts +2 -0
  372. package/dist/icons/glyphs/rabbit.d.ts +2 -0
  373. package/dist/icons/glyphs/radio-tower.d.ts +2 -0
  374. package/dist/icons/glyphs/radio.d.ts +2 -0
  375. package/dist/icons/glyphs/receipt-cent.d.ts +2 -0
  376. package/dist/icons/glyphs/receipt-euro.d.ts +2 -0
  377. package/dist/icons/glyphs/receipt-indian-rupee.d.ts +2 -0
  378. package/dist/icons/glyphs/receipt-japanese-yen.d.ts +2 -0
  379. package/dist/icons/glyphs/receipt-pound-sterling.d.ts +2 -0
  380. package/dist/icons/glyphs/receipt-russian-ruble.d.ts +2 -0
  381. package/dist/icons/glyphs/receipt-swiss-franc.d.ts +2 -0
  382. package/dist/icons/glyphs/receipt-text.d.ts +2 -0
  383. package/dist/icons/glyphs/receipt-turkish-lira.d.ts +2 -0
  384. package/dist/icons/glyphs/receipt.d.ts +2 -0
  385. package/dist/icons/glyphs/redo-dot.d.ts +2 -0
  386. package/dist/icons/glyphs/redo.d.ts +2 -0
  387. package/dist/icons/glyphs/refresh-ccw-dot.d.ts +2 -0
  388. package/dist/icons/glyphs/refresh-ccw.d.ts +2 -0
  389. package/dist/icons/glyphs/refresh-cw-off.d.ts +2 -0
  390. package/dist/icons/glyphs/refresh-cw.d.ts +2 -0
  391. package/dist/icons/glyphs/rocket.d.ts +2 -0
  392. package/dist/icons/glyphs/rocking-chair.d.ts +2 -0
  393. package/dist/icons/glyphs/roller-coaster.d.ts +2 -0
  394. package/dist/icons/glyphs/rotate-ccw.d.ts +2 -0
  395. package/dist/icons/glyphs/rotate-cw.d.ts +2 -0
  396. package/dist/icons/glyphs/route.d.ts +2 -0
  397. package/dist/icons/glyphs/router.d.ts +2 -0
  398. package/dist/icons/glyphs/russian-ruble.d.ts +2 -0
  399. package/dist/icons/glyphs/satellite-dish.d.ts +2 -0
  400. package/dist/icons/glyphs/saudi-riyal.d.ts +2 -0
  401. package/dist/icons/glyphs/scan-face.d.ts +2 -0
  402. package/dist/icons/glyphs/scan-text.d.ts +2 -0
  403. package/dist/icons/glyphs/search.d.ts +2 -0
  404. package/dist/icons/glyphs/send.d.ts +2 -0
  405. package/dist/icons/glyphs/server-cog.d.ts +2 -0
  406. package/dist/icons/glyphs/server-crash.d.ts +2 -0
  407. package/dist/icons/glyphs/server.d.ts +2 -0
  408. package/dist/icons/glyphs/settings.d.ts +2 -0
  409. package/dist/icons/glyphs/shield-check.d.ts +2 -0
  410. package/dist/icons/glyphs/ship-wheel.d.ts +2 -0
  411. package/dist/icons/glyphs/ship.d.ts +2 -0
  412. package/dist/icons/glyphs/shopping-cart.d.ts +2 -0
  413. package/dist/icons/glyphs/shower-head.d.ts +2 -0
  414. package/dist/icons/glyphs/shredder.d.ts +2 -0
  415. package/dist/icons/glyphs/shrink.d.ts +2 -0
  416. package/dist/icons/glyphs/sliders-horizontal.d.ts +2 -0
  417. package/dist/icons/glyphs/smartphone-charging.d.ts +2 -0
  418. package/dist/icons/glyphs/smartphone-nfc.d.ts +2 -0
  419. package/dist/icons/glyphs/smartphone.d.ts +2 -0
  420. package/dist/icons/glyphs/smile-plus.d.ts +2 -0
  421. package/dist/icons/glyphs/smile.d.ts +2 -0
  422. package/dist/icons/glyphs/snowflake.d.ts +2 -0
  423. package/dist/icons/glyphs/soup.d.ts +2 -0
  424. package/dist/icons/glyphs/sparkles.d.ts +2 -0
  425. package/dist/icons/glyphs/spray-can.d.ts +2 -0
  426. package/dist/icons/glyphs/square-activity.d.ts +2 -0
  427. package/dist/icons/glyphs/square-arrow-down.d.ts +2 -0
  428. package/dist/icons/glyphs/square-arrow-left.d.ts +2 -0
  429. package/dist/icons/glyphs/square-arrow-right.d.ts +2 -0
  430. package/dist/icons/glyphs/square-arrow-up.d.ts +2 -0
  431. package/dist/icons/glyphs/square-chevron-down.d.ts +2 -0
  432. package/dist/icons/glyphs/square-chevron-left.d.ts +2 -0
  433. package/dist/icons/glyphs/square-chevron-right.d.ts +2 -0
  434. package/dist/icons/glyphs/square-chevron-up.d.ts +2 -0
  435. package/dist/icons/glyphs/square-pen.d.ts +2 -0
  436. package/dist/icons/glyphs/square-stack.d.ts +2 -0
  437. package/dist/icons/glyphs/stamp.d.ts +2 -0
  438. package/dist/icons/glyphs/stethoscope.d.ts +2 -0
  439. package/dist/icons/glyphs/sun-dim.d.ts +2 -0
  440. package/dist/icons/glyphs/sun-medium.d.ts +2 -0
  441. package/dist/icons/glyphs/sun-moon.d.ts +2 -0
  442. package/dist/icons/glyphs/sun.d.ts +2 -0
  443. package/dist/icons/glyphs/sunset.d.ts +2 -0
  444. package/dist/icons/glyphs/swiss-franc.d.ts +2 -0
  445. package/dist/icons/glyphs/switch-camera.d.ts +2 -0
  446. package/dist/icons/glyphs/syringe.d.ts +2 -0
  447. package/dist/icons/glyphs/tablet.d.ts +2 -0
  448. package/dist/icons/glyphs/telescope.d.ts +2 -0
  449. package/dist/icons/glyphs/terminal.d.ts +2 -0
  450. package/dist/icons/glyphs/text-align-center.d.ts +2 -0
  451. package/dist/icons/glyphs/text-align-end.d.ts +2 -0
  452. package/dist/icons/glyphs/text-align-start.d.ts +2 -0
  453. package/dist/icons/glyphs/thermometer.d.ts +2 -0
  454. package/dist/icons/glyphs/thumbs-down.d.ts +2 -0
  455. package/dist/icons/glyphs/thumbs-up.d.ts +2 -0
  456. package/dist/icons/glyphs/ticket.d.ts +2 -0
  457. package/dist/icons/glyphs/timer.d.ts +2 -0
  458. package/dist/icons/glyphs/tornado.d.ts +2 -0
  459. package/dist/icons/glyphs/train-track.d.ts +2 -0
  460. package/dist/icons/glyphs/trash-2.d.ts +2 -0
  461. package/dist/icons/glyphs/tree-deciduous.d.ts +2 -0
  462. package/dist/icons/glyphs/tree-pine.d.ts +2 -0
  463. package/dist/icons/glyphs/trending-down.d.ts +2 -0
  464. package/dist/icons/glyphs/trending-up-down.d.ts +2 -0
  465. package/dist/icons/glyphs/trending-up.d.ts +2 -0
  466. package/dist/icons/glyphs/triangle-alert.d.ts +2 -0
  467. package/dist/icons/glyphs/truck.d.ts +2 -0
  468. package/dist/icons/glyphs/turkish-lira.d.ts +2 -0
  469. package/dist/icons/glyphs/twitch.d.ts +2 -0
  470. package/dist/icons/glyphs/twitter.d.ts +2 -0
  471. package/dist/icons/glyphs/underline.d.ts +2 -0
  472. package/dist/icons/glyphs/undo-dot.d.ts +2 -0
  473. package/dist/icons/glyphs/undo.d.ts +2 -0
  474. package/dist/icons/glyphs/unplug.d.ts +2 -0
  475. package/dist/icons/glyphs/upload.d.ts +2 -0
  476. package/dist/icons/glyphs/user-check.d.ts +2 -0
  477. package/dist/icons/glyphs/user-plus.d.ts +2 -0
  478. package/dist/icons/glyphs/user-round-check.d.ts +2 -0
  479. package/dist/icons/glyphs/user-round-cog.d.ts +2 -0
  480. package/dist/icons/glyphs/user-round-plus.d.ts +2 -0
  481. package/dist/icons/glyphs/user-round.d.ts +2 -0
  482. package/dist/icons/glyphs/user.d.ts +2 -0
  483. package/dist/icons/glyphs/users-round.d.ts +2 -0
  484. package/dist/icons/glyphs/users.d.ts +2 -0
  485. package/dist/icons/glyphs/vibrate.d.ts +2 -0
  486. package/dist/icons/glyphs/volume.d.ts +2 -0
  487. package/dist/icons/glyphs/wallet.d.ts +2 -0
  488. package/dist/icons/glyphs/washing-machine.d.ts +2 -0
  489. package/dist/icons/glyphs/waves-arrow-down.d.ts +2 -0
  490. package/dist/icons/glyphs/waves-arrow-up.d.ts +2 -0
  491. package/dist/icons/glyphs/waves-ladder.d.ts +2 -0
  492. package/dist/icons/glyphs/waves.d.ts +2 -0
  493. package/dist/icons/glyphs/waypoints.d.ts +2 -0
  494. package/dist/icons/glyphs/webhook.d.ts +2 -0
  495. package/dist/icons/glyphs/wifi-cog.d.ts +2 -0
  496. package/dist/icons/glyphs/wifi-low.d.ts +2 -0
  497. package/dist/icons/glyphs/wifi-pen.d.ts +2 -0
  498. package/dist/icons/glyphs/wifi-sync.d.ts +2 -0
  499. package/dist/icons/glyphs/wifi.d.ts +2 -0
  500. package/dist/icons/glyphs/wind-arrow-down.d.ts +2 -0
  501. package/dist/icons/glyphs/wind.d.ts +2 -0
  502. package/dist/icons/glyphs/workflow.d.ts +2 -0
  503. package/dist/icons/glyphs/wrench.d.ts +2 -0
  504. package/dist/icons/glyphs/x.d.ts +2 -0
  505. package/dist/icons/glyphs/youtube.d.ts +2 -0
  506. package/dist/icons/glyphs/zap-off.d.ts +2 -0
  507. package/dist/icons/glyphs/zap.d.ts +2 -0
  508. package/dist/icons/iconPlay.d.ts +2 -0
  509. package/dist/icons/registry.d.ts +80 -79
  510. package/dist/icons.js +996 -0
  511. package/dist/index.css +427 -132
  512. package/dist/index.js +6 -4
  513. package/dist/internal/ChoiceField.d.ts +1 -1
  514. package/dist/internal/FieldFrame.d.ts +17 -0
  515. package/dist/tokens/primitives.d.ts +1 -0
  516. package/dist/tokens/semantic.d.ts +1 -0
  517. package/dist/tokens/themes/dark.d.ts +1 -0
  518. package/package.json +11 -4
  519. package/src/components/button/COMPONENT.md +5 -3
  520. package/src/components/button/examples/in-form.tsx +15 -3
  521. package/src/components/button/examples/label-morph.tsx +7 -2
  522. package/src/components/button/examples/variants.tsx +1 -0
  523. package/src/components/checkbox/COMPONENT.md +1 -1
  524. package/src/components/color-picker/COMPONENT.md +2 -2
  525. package/src/components/color-picker/examples/in-form.tsx +13 -5
  526. package/src/components/color-picker/examples/validation.tsx +10 -4
  527. package/src/components/color-swatches/COMPONENT.md +2 -2
  528. package/src/components/color-swatches/examples/in-form.tsx +11 -5
  529. package/src/components/datepicker/COMPONENT.md +3 -3
  530. package/src/components/datepicker/examples/in-form.tsx +30 -9
  531. package/src/components/datepicker/examples/validation.tsx +20 -10
  532. package/src/components/digit-input/COMPONENT.md +3 -3
  533. package/src/components/digit-input/examples/in-form.tsx +22 -4
  534. package/src/components/digit-input/examples/validation.tsx +12 -5
  535. package/src/components/drawer/COMPONENT.md +1 -1
  536. package/src/components/drawer/examples/in-form.tsx +7 -2
  537. package/src/components/file-upload/COMPONENT.md +3 -3
  538. package/src/components/file-upload/examples/in-form.tsx +28 -4
  539. package/src/components/file-upload/examples/validation.tsx +37 -6
  540. package/src/components/input/COMPONENT.md +3 -3
  541. package/src/components/input/examples/in-form.tsx +42 -7
  542. package/src/components/input/examples/validation.tsx +38 -13
  543. package/src/components/modal/COMPONENT.md +1 -1
  544. package/src/components/modal/examples/in-form.tsx +7 -2
  545. package/src/components/native-select/COMPONENT.md +3 -3
  546. package/src/components/native-select/examples/examples.module.css +2 -0
  547. package/src/components/native-select/examples/in-form.tsx +18 -3
  548. package/src/components/native-select/examples/validation.tsx +8 -3
  549. package/src/components/popover/COMPONENT.md +1 -1
  550. package/src/components/popover/examples/in-form.tsx +27 -5
  551. package/src/components/radio/COMPONENT.md +1 -1
  552. package/src/components/select/COMPONENT.md +3 -3
  553. package/src/components/select/examples/examples.module.css +1 -0
  554. package/src/components/select/examples/in-form.tsx +25 -3
  555. package/src/components/select/examples/validation.tsx +8 -3
  556. package/src/components/slider/COMPONENT.md +1 -1
  557. package/src/components/switch/COMPONENT.md +1 -1
  558. package/src/components/tag-select/COMPONENT.md +3 -3
  559. package/src/components/tag-select/examples/examples.module.css +1 -0
  560. package/src/components/tag-select/examples/in-form.tsx +19 -2
  561. package/src/components/tag-select/examples/validation.tsx +7 -2
  562. package/src/components/textarea/COMPONENT.md +3 -3
  563. package/src/components/textarea/examples/in-form.tsx +20 -8
  564. package/src/components/textarea/examples/validation.tsx +24 -8
  565. package/src/styles/theme-dark.css +1 -0
  566. package/src/styles/theme-light.css +1 -0
  567. package/src/styles/tokens.css +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prime-ui-kit",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "packageManager": "bun@1.3.13",
5
5
  "description": "React 19 UI kit for product interfaces: 61 composable components on one design contract — forms, selects, tables, overlays, navigation, app shell. CSS Modules, --prime-* tokens, light and dark themes, TypeScript, a11y. Ships COMPONENT.md docs and copyable examples.",
6
6
  "main": "./dist/index.js",
@@ -60,7 +60,8 @@
60
60
  "src/layout/**/COMPONENT.md",
61
61
  "src/components/**/examples/**",
62
62
  "src/layout/**/examples/**",
63
- "LICENSE"
63
+ "LICENSE",
64
+ "THIRD_PARTY_NOTICES"
64
65
  ],
65
66
  "publishConfig": {
66
67
  "access": "public"
@@ -105,6 +106,10 @@
105
106
  "types": "./dist/color-picker.d.ts",
106
107
  "default": "./dist/color-picker.js"
107
108
  },
109
+ "./icons": {
110
+ "types": "./dist/icon-set.d.ts",
111
+ "default": "./dist/icons.js"
112
+ },
108
113
  "./bundle.css": "./dist/index.css",
109
114
  "./fonts.css": "./src/styles/fonts.css",
110
115
  "./reset.css": "./src/styles/reset.css",
@@ -113,9 +118,11 @@
113
118
  "./theme-dark.css": "./src/styles/theme-dark.css"
114
119
  },
115
120
  "scripts": {
116
- "clean": "rm -rf dist .dts-stage playground/dist",
121
+ "clean": "rm -rf dist dist-skill .dts-stage playground/dist",
117
122
  "tokens:build": "bun run scripts/build-tokens.ts",
118
123
  "docs:build": "bun run scripts/build-docs.ts",
124
+ "icons:add": "bun run scripts/add-glyph.ts",
125
+ "skill:build": "bun run scripts/build-skill.ts",
119
126
  "build": "bun run tokens:build && bun run scripts/bundle-lib.ts",
120
127
  "prepublishOnly": "bun run clean && bun run build",
121
128
  "playground:dev": "vite playground --config playground/vite.config.ts",
@@ -125,7 +132,7 @@
125
132
  "typecheck": "tsc --noEmit",
126
133
  "test": "vitest run",
127
134
  "test:watch": "vitest",
128
- "verify": "bun run check:ci && bun run typecheck && bun run test && bun run verify:tokens && bun run build",
135
+ "verify": "bun run check:ci && bun run typecheck && bun run test && bun run verify:tokens && bun run build && bun run skill:build",
129
136
  "verify:tokens": "bun run tokens:build && git diff --exit-code -- src/styles/tokens.css src/styles/theme-light.css src/styles/theme-dark.css"
130
137
  },
131
138
  "sideEffects": [
@@ -45,7 +45,7 @@ Button.Root <button> (or the single child with asChild); variant, tone, s
45
45
  | Prop | Type | Default | Description |
46
46
  |---|---|---|---|
47
47
  | `variant` | `"solid" \| "soft" \| "outline" \| "ghost"` | `"solid"` | Visual treatment. |
48
- | `tone` | `"accent" \| "neutral" \| "danger" \| "inherit"` | `"accent"` | Meaning of the action; `danger` for destructive actions. `inherit` takes the host's text color for an action on a colored host (a solid Banner); it needs `variant` `ghost`, `soft` or `outline`. |
48
+ | `tone` | `"accent" \| "neutral" \| "success" \| "danger" \| "inherit"` | `"accent"` | Meaning of the action; `danger` for destructive actions; `success` for an action that is done (a payment went through). `inherit` takes the host's text color for an action on a colored host (a solid Banner); it needs `variant` `ghost`, `soft` or `outline`. |
49
49
  | `size` | `"xs" \| "s" \| "m" \| "l" \| "xl"` | `host tier, else "m"` | Control tier: height 28 · 32 · 36 · 40 · 48, padding, text, icon, radius. Without it the button takes the tier of its host (LoginForm, Popover, a field, a panel with a size), else `m`. |
50
50
  | `fullWidth` | `boolean` | — | Stretches to the container width. |
51
51
  | `loading` | `boolean` | `false` | Shows a `Spinner` in place of the leading icon or over the label, sets `aria-busy`, blocks clicks; width does not change. With `asChild` no spinner is added — the child owns its content. |
@@ -75,9 +75,11 @@ Button.Root <button> (or the single child with asChild); variant, tone, s
75
75
  | `solid` + `accent` | accent fill, accent-fg text, hover `accent-hover` | the one primary action of an area (Save, Publish) | yes |
76
76
  | `solid` + `neutral` | `fill-muted` fill, primary text | a neutral filled action next to fields | |
77
77
  | `solid` + `danger` | danger fill, danger-fg text | confirming a destructive action in a dialog | |
78
+ | `solid` + `success` | success fill, success-fg text; a button turning success glides its fill over `fast` | an action that is done: «Оплачено», «Отправлено» | |
78
79
  | `soft` + `accent` | `accent-soft` fill, accent text | secondary but highlighted action | |
79
80
  | `soft` + `neutral` | translucent `fill-subtle` wash, primary text | secondary actions (Cancel, Filters) | |
80
81
  | `soft` + `danger` | `danger-soft` fill, danger text | secondary destructive action | |
82
+ | `soft` / `outline` / `ghost` + `success` | `success-soft` fill or wash, success text | a quieter done state next to other actions | |
81
83
  | `outline` + `accent` | transparent, 1px `border-default` inset line, accent text | rare; accent action lighter than solid | |
82
84
  | `outline` + `neutral` | transparent, 1px inset line, primary text | secondary action that needs an edge (Draft, Back) | |
83
85
  | `outline` + `danger` | 1px inset line, danger text, `danger-soft` on hover | destructive trigger that opens a confirm | |
@@ -163,10 +165,10 @@ Other data attributes: `data-variant`, `data-tone`, `data-size`, `data-full-widt
163
165
  | [with-icon.tsx](examples/with-icon.tsx) | An icon before or after the label, and a square icon-only button — `Button.Icon`, `aria-label`. |
164
166
  | [download.tsx](examples/download.tsx) | A long download inside the button: the fill shows how far it got, the label counts and then offers the file — `progress`. |
165
167
  | [hold-to-confirm.tsx](examples/hold-to-confirm.tsx) | A destructive action that needs a held press; letting go early rolls the fill back and does nothing — `holdToConfirm`, `onConfirm`. |
166
- | [label-morph.tsx](examples/label-morph.tsx) | A new label flows into the button letter by letter while the width glides: save, then saved; a step flow — `children`, `loading`. |
168
+ | [label-morph.tsx](examples/label-morph.tsx) | A new label flows into the button letter by letter while the width glides: save, then saved; a step flow that turns green once paid — `children`, `loading`, `tone`. |
167
169
  | [on-colored-host.tsx](examples/on-colored-host.tsx) | Actions on a colored strip take its text color: a ghost icon close and a soft action — `tone="inherit"`. |
168
170
  | [as-child.tsx](examples/as-child.tsx) | The button look on a real link; a disabled link blocks navigation — `asChild`, `disabled`. |
169
- | [in-form.tsx](examples/in-form.tsx) | A full-width submit button that shows the request in progress — `type`, `loading`, `fullWidth`. |
171
+ | [in-form.tsx](examples/in-form.tsx) | A full-width submit button that shows the request in progress after the email passes validation — `type`, `loading`, `fullWidth`. |
170
172
 
171
173
  ## Mistakes
172
174
  - `<Button.Root><Icon name="action.copy" /></Button.Root>` → wrap in `Button.Icon` so the button becomes square and the icon is sized.
@@ -1,27 +1,39 @@
1
- /** A full-width submit button that shows the request in progress — `type`, `loading`, `fullWidth`. */
1
+ /** A full-width submit button that shows the request in progress after the email passes validation — `type`, `loading`, `fullWidth`. */
2
2
  import { Button, Input } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
5
5
  import styles from "./examples.module.css";
6
6
 
7
+ /** The email error, or nothing when the address is valid. */
8
+ function emailError(value: string) {
9
+ if (!value.trim()) return "Введите рабочую почту";
10
+ if (!/^\S+@\S+\.\S+$/.test(value.trim())) return "Проверьте адрес: нужен вид name@company.ru";
11
+ return undefined;
12
+ }
13
+
7
14
  export default function ButtonInFormExample() {
8
15
  const [sending, setSending] = React.useState(false);
16
+ const [error, setError] = React.useState<string>();
9
17
 
10
18
  const submit = (event: React.FormEvent<HTMLFormElement>) => {
11
19
  event.preventDefault();
20
+ const next = emailError(String(new FormData(event.currentTarget).get("email") ?? ""));
21
+ setError(next);
22
+ if (next) return;
12
23
  setSending(true);
13
24
  window.setTimeout(() => setSending(false), 1500);
14
25
  };
15
26
 
16
27
  return (
17
- <form className={styles.form} onSubmit={submit}>
18
- <Input.Root label="Рабочая почта" required>
28
+ <form className={styles.form} noValidate onSubmit={submit}>
29
+ <Input.Root label="Рабочая почта" required error={error} reserveSupportRow>
19
30
  <Input.Wrapper>
20
31
  <Input.Field
21
32
  type="email"
22
33
  name="email"
23
34
  placeholder="name@company.ru"
24
35
  autoComplete="email"
36
+ onValueChange={() => setError(undefined)}
25
37
  />
26
38
  </Input.Wrapper>
27
39
  </Input.Root>
@@ -1,4 +1,4 @@
1
- /** A new label flows into the button letter by letter while the width glides: save, then saved; a step flow — `children`, `loading`. */
1
+ /** A new label flows into the button letter by letter while the width glides: save, then saved; a step flow that turns green once paid — `children`, `loading`, `tone`. */
2
2
  import { Button } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
@@ -27,7 +27,12 @@ export default function ButtonLabelMorphExample() {
27
27
  >
28
28
  {save === "saved" ? "Изменения сохранены" : "Сохранить изменения"}
29
29
  </Button.Root>
30
- <Button.Root onClick={() => setStep((step + 1) % STEPS.length)}>{STEPS[step]}</Button.Root>
30
+ <Button.Root
31
+ tone={step === STEPS.length - 1 ? "success" : "accent"}
32
+ onClick={() => setStep((step + 1) % STEPS.length)}
33
+ >
34
+ {STEPS[step]}
35
+ </Button.Root>
31
36
  </>
32
37
  );
33
38
  }
@@ -4,6 +4,7 @@ import { Button, Typography } from "prime-ui-kit";
4
4
  const TONES = [
5
5
  { tone: "accent", label: "Сохранить" },
6
6
  { tone: "neutral", label: "Отмена" },
7
+ { tone: "success", label: "Оплачено" },
7
8
  { tone: "danger", label: "Удалить" },
8
9
  ] as const;
9
10
 
@@ -103,7 +103,7 @@ Checkbox has no `variant` / `tone` / `color`.
103
103
  | unchecked | `checked={false}` / default | `data-state="unchecked"`; box `fill-strong`, hover `fill-strong-hover` |
104
104
  | checked | `checked` / `defaultChecked` | `data-state="checked"`; accent box, the check draws in |
105
105
  | indeterminate | `indeterminate` | `data-state="indeterminate"`, `input.indeterminate`; accent box with a bar |
106
- | invalid | `invalid` or a non-empty `error` | `data-invalid="true"`, `aria-invalid` on the input; danger ring on the unchecked box and on focus |
106
+ | invalid | `invalid` or a non-empty `error` | `data-invalid="true"`, `aria-invalid` on the input; danger ring on the unchecked box and on focus; the row shakes once when an error arrives (`data-shake`) |
107
107
  | disabled | `disabled` | `data-disabled="true"` on the root; `fill-muted` box, disabled text, `cursor: not-allowed` |
108
108
  | read-only | `readOnly` | `aria-readonly="true"` on the input, `data-readonly="true"` on the root; the state stays, no hover or press, default cursor |
109
109
  | pressed | pointer press | the box scales to the compact press scale |
@@ -307,13 +307,13 @@ There is no `disabled` on `ColorPicker.Root` — disable parts individually. Con
307
307
  | [overview.tsx](examples/overview.tsx) | A color field: a hex value and a swatch button that opens the picker panel — `ColorPicker.HexInput`, `ColorPicker.TriggerSwatch`. |
308
308
  | [sizes.tsx](examples/sizes.tsx) | Every size of the hex field with a swatch button of the same tier — `size`. |
309
309
  | [states.tsx](examples/states.tsx) | A disabled area and hue slider keep showing the color but take no input — `disabled`. |
310
- | [validation.tsx](examples/validation.tsx) | A hint under the hex field and an error that replaces it; invalid text reverts on blur — `hint`, `error`. |
310
+ | [validation.tsx](examples/validation.tsx) | A button color checked live: a too light color shakes in an error that leaves once the color is darker; a hint under the other field, invalid text reverts on blur — `hint`, `error`. |
311
311
  | [panel.tsx](examples/panel.tsx) | The full raised panel and its part order: format, area, hue and alpha sliders, channels, brand swatches — `ColorPicker.Panel`, `surface`, `ColorPicker.Swatches`. |
312
312
  | [formats.tsx](examples/formats.tsx) | The channel strip in each value format; three pickers edit one color — `defaultFormat`, `ColorPicker.ChannelStrip`. |
313
313
  | [presets.tsx](examples/presets.tsx) | A quick color from the palette: a square trigger next to a field and a Button trigger; «no color» allowed — `ColorPresets`, `allowEmpty`, `asChild`. |
314
314
  | [presets-sizes.tsx](examples/presets-sizes.tsx) | The preset trigger in every size, a square of the control height next to an input of the same tier — `ColorPresets`, `size`. |
315
315
  | [controlled.tsx](examples/controlled.tsx) | The parent owns the color: brand swatches and the hex field edit it, a button resets it — `value`, `onValueChange`. |
316
- | [in-form.tsx](examples/in-form.tsx) | Theme settings: the color goes with the form and a too light color fails on save — `value`, `error`. |
316
+ | [in-form.tsx](examples/in-form.tsx) | Theme settings: the color goes with the form, a too light color shakes in an error on save that leaves once the color changes — `value`, `error`. |
317
317
 
318
318
  ## Mistakes
319
319
  - Trigger in one `ColorPicker.Root` and panel in another → they will not share the color; wrap both in one Root.
@@ -1,5 +1,5 @@
1
- /** Theme settings: the color goes with the form and a too light color fails on save — `value`, `error`. */
2
- import { Button, Input } from "prime-ui-kit";
1
+ /** Theme settings: the color goes with the form, a too light color shakes in an error on save that leaves once the color changes — `value`, `error`. */
2
+ import { Button, Input, Typography } from "prime-ui-kit";
3
3
  import { ColorPicker, parseColor } from "prime-ui-kit/color-picker";
4
4
  import * as React from "react";
5
5
 
@@ -10,13 +10,15 @@ const MAX_LIGHTNESS = 80;
10
10
  export default function ColorPickerInFormExample() {
11
11
  const [color, setColor] = React.useState(() => parseColor("#f2f2f2"));
12
12
  const [error, setError] = React.useState<string>();
13
+ const [saved, setSaved] = React.useState(false);
13
14
 
14
15
  const submit = (event: React.FormEvent<HTMLFormElement>) => {
15
16
  event.preventDefault();
16
17
  const lightness = color.toFormat("hsl").getChannelValue("lightness");
17
- setError(
18
- lightness > MAX_LIGHTNESS ? "Слишком светлый: белый текст на нём не читается" : undefined,
19
- );
18
+ const next =
19
+ lightness > MAX_LIGHTNESS ? "Слишком светлый: белый текст на нём не читается" : undefined;
20
+ setError(next);
21
+ setSaved(next === undefined);
20
22
  };
21
23
 
22
24
  return (
@@ -31,11 +33,17 @@ export default function ColorPickerInFormExample() {
31
33
  onValueChange={(next) => {
32
34
  setColor(next);
33
35
  setError(undefined);
36
+ setSaved(false);
34
37
  }}
35
38
  >
36
39
  <ColorPicker.HexInput label="Цвет кнопок" error={error} />
37
40
  </ColorPicker.Root>
38
41
  <input type="hidden" name="buttonColor" value={color.toString("hex")} />
42
+ {saved ? (
43
+ <Typography as="p" variant="body-s" tone="secondary" role="status">
44
+ Тема сохранена.
45
+ </Typography>
46
+ ) : null}
39
47
  <div className={styles.actions}>
40
48
  <Button.Root type="submit">Сохранить тему</Button.Root>
41
49
  </div>
@@ -1,16 +1,22 @@
1
- /** A hint under the hex field and an error that replaces it; invalid text reverts on blur — `hint`, `error`. */
2
- import { ColorPicker } from "prime-ui-kit/color-picker";
1
+ /** A button color checked live: a too light color shakes in an error that leaves once the color is darker; a hint under the other field, invalid text reverts on blur — `hint`, `error`. */
2
+ import { ColorPicker, parseColor } from "prime-ui-kit/color-picker";
3
+ import * as React from "react";
4
+
5
+ const MAX_LIGHTNESS = 80;
3
6
 
4
7
  export default function ColorPickerValidationExample() {
8
+ const [color, setColor] = React.useState(() => parseColor("#f5f5f5"));
9
+ const tooLight = color.toFormat("hsl").getChannelValue("lightness") > MAX_LIGHTNESS;
10
+
5
11
  return (
6
12
  <>
7
13
  <ColorPicker.Root defaultValue="#0090ff">
8
14
  <ColorPicker.HexInput label="Цвет ссылок" hint="Формат #RRGGBB или #RRGGBBAA" />
9
15
  </ColorPicker.Root>
10
- <ColorPicker.Root defaultValue="#f5f5f5">
16
+ <ColorPicker.Root value={color} onValueChange={setColor}>
11
17
  <ColorPicker.HexInput
12
18
  label="Цвет кнопок"
13
- error="Слишком светлый: белый текст на нём не читается"
19
+ error={tooLight ? "Слишком светлый: белый текст на нём не читается" : undefined}
14
20
  />
15
21
  </ColorPicker.Root>
16
22
  </>
@@ -90,7 +90,7 @@ ColorSwatches field frame: label → swatches → hint | error
90
90
  | selected | `value` / `defaultValue` | `aria-checked="true"`, `data-state="checked"` on the radio; the check mark (light or dark by color contrast) scales in from half size (`base` · emphasized) and leaves faster (`fast` · exit); no ring — the check is the selection |
91
91
  | hover | pointer | the swatch scales to 1.08 (fine pointers only) |
92
92
  | focus-visible | keyboard | focus ring outside the swatch |
93
- | invalid | `invalid` / `error` | `aria-invalid`, `data-invalid` on the group; the inner edge of every swatch turns `danger-border` |
93
+ | invalid | `invalid` / `error` | `aria-invalid`, `data-invalid` on the group; the inner edge of every swatch turns `danger-border`; the control shakes once when an error arrives (`data-shake` on the frame) |
94
94
  | disabled | `disabled` | native `disabled` on every radio, `aria-disabled` and `data-disabled` on the group |
95
95
 
96
96
  Controlled with `value` + `onValueChange`; uncontrolled with `defaultValue`.
@@ -132,7 +132,7 @@ Controlled with `value` + `onValueChange`; uncontrolled with `defaultValue`.
132
132
  | [states.tsx](examples/states.tsx) | A default palette next to an invalid and a disabled one — `invalid`, `disabled`. |
133
133
  | [wrapping.tsx](examples/wrapping.tsx) | In a narrow column the swatches wrap by themselves and the arrows move by the visual rows. |
134
134
  | [controlled.tsx](examples/controlled.tsx) | The parent owns the color, «no color» included, and names it in the hint — `value`, `onValueChange`, `allowEmpty`. |
135
- | [in-form.tsx](examples/in-form.tsx) | A calendar event form: the color is submitted by `name` and required on save — `name`, `required`, `error`. |
135
+ | [in-form.tsx](examples/in-form.tsx) | A calendar event form: the color is submitted by `name` and required on save: submitting an empty title or no color shakes the field, picking or typing clears the error — `name`, `required`, `error`. |
136
136
 
137
137
  ## Mistakes
138
138
  - `<ColorSwatches.Root>` → the component is a single export: `<ColorSwatches />`.
@@ -1,23 +1,29 @@
1
- /** A calendar event form: the color is submitted by `name` and required on save — `name`, `required`, `error`. */
1
+ /** A calendar event form: the color is submitted by `name` and required on save: submitting an empty title or no color shakes the field, picking or typing clears the error — `name`, `required`, `error`. */
2
2
  import { Button, ColorSwatches, Input } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
5
5
  import styles from "./examples.module.css";
6
6
 
7
7
  export default function ColorSwatchesInFormExample() {
8
+ const [titleError, setTitleError] = React.useState<string>();
8
9
  const [error, setError] = React.useState<string>();
9
10
 
10
11
  const submit = (event: React.FormEvent<HTMLFormElement>) => {
11
12
  event.preventDefault();
12
- const color = new FormData(event.currentTarget).get("color");
13
- setError(color ? undefined : "Выберите цвет события");
13
+ const data = new FormData(event.currentTarget);
14
+ setTitleError(String(data.get("title") ?? "").trim() ? undefined : "Введите название события");
15
+ setError(data.get("color") ? undefined : "Выберите цвет события");
14
16
  };
15
17
 
16
18
  return (
17
19
  <form className={styles.form} noValidate onSubmit={submit}>
18
- <Input.Root label="Название события" required>
20
+ <Input.Root label="Название события" required error={titleError} reserveSupportRow>
19
21
  <Input.Wrapper>
20
- <Input.Field name="title" defaultValue="Встреча с поставщиком" />
22
+ <Input.Field
23
+ name="title"
24
+ defaultValue="Встреча с поставщиком"
25
+ onValueChange={() => setTitleError(undefined)}
26
+ />
21
27
  </Input.Wrapper>
22
28
  </Input.Root>
23
29
  <ColorSwatches
@@ -140,7 +140,7 @@ Shared by `Datepicker.Root` and `Datepicker.Panel`.
140
140
  | empty | no value | `data-empty="true"`, `labels.placeholder` (or `placeholder`) in placeholder color |
141
141
  | open | click, `open` | `data-state="open"`, `field-bg-focus` fill, the chevron turns |
142
142
  | focus-visible | keyboard | inset focus ring; none with `focusRing={false}` (`data-focus-ring="false"`) |
143
- | invalid | `invalid`, `error` | `data-invalid`, `aria-invalid`, inset `danger-border` ring |
143
+ | invalid | `invalid`, `error` | `data-invalid`, `aria-invalid`, inset `danger-border` ring; the control shakes once when an error arrives (`data-shake` on the frame) |
144
144
  | disabled | `disabled` | native `disabled`, `data-disabled`, `field-bg-disabled`, cannot open |
145
145
  | today | the current day | `data-today`, `aria-current="date"`, accent text |
146
146
  | selected / band | value | day `aria-pressed`, `data-edge`; cell `data-band="selected" \| "preview"`, `data-band-start` / `-end` |
@@ -201,13 +201,13 @@ Panel DOM: `data-size`, `data-embedded`, `data-compact`, `data-layout` (`aside`
201
201
  | [overview.tsx](examples/overview.tsx) | A shipping date field: a click opens one month, a picked day applies at once — `mode`, `label`. |
202
202
  | [sizes.tsx](examples/sizes.tsx) | Every size tier: the field is 28 to 48 px high, the day cell of the panel 24 to 40 px — `size`. |
203
203
  | [states.tsx](examples/states.tsx) | An empty field with the default placeholder, a filled one and a disabled one — `disabled`. |
204
- | [validation.tsx](examples/validation.tsx) | A required leave period with a hint, the same field with an error and an optional return date — `required`, `hint`, `error`, `optional`. |
204
+ | [validation.tsx](examples/validation.tsx) | A leave period checked live: the error shakes in, names the broken rule and leaves once the period fits; an optional return date — `required`, `hint`, `error`, `optional`. |
205
205
  | [range-presets.tsx](examples/range-presets.tsx) | A report period: presets aside, two months, a step prompt, time fields with Reset / Apply, no future days — `presets`, `months`, `prompt`, `footer`, `withTime`, `disableFuture`. |
206
206
  | [inline-panel.tsx](examples/inline-panel.tsx) | A booking calendar embedded in the page: its own card, two months when the parent has room, the range applies at once — `Datepicker.Panel`, `months`, `prompt`. |
207
207
  | [yearless.tsx](examples/yearless.tsx) | An annual price change date: day and month without a year, a value prefix and taken days disabled — `yearless`, `valuePrefix`, `isDayDisabled`. |
208
208
  | [controlled.tsx](examples/controlled.tsx) | A report filter owns the period: quick buttons set it from outside, the field shows it — `value`, `onValueChange`. |
209
209
  | [controlled-open.tsx](examples/controlled-open.tsx) | The parent owns the panel: a reminder button opens the calendar from code, a picked day closes it — `open`, `onOpenChange`. |
210
- | [in-form.tsx](examples/in-form.tsx) | A leave request form: a required period that turns into an error after submit and an optional return date — `required`, `error`, `optional`. |
210
+ | [in-form.tsx](examples/in-form.tsx) | A leave request form: submit checks the required period, the error shakes in and leaves once the period is fixed; an optional return date — `required`, `error`, `optional`. |
211
211
  | [narrow.tsx](examples/narrow.tsx) | An embedded panel in a 320 px column: one compact month instead of two, the footer fields wrap above the buttons — `months`, `footer`. |
212
212
 
213
213
  ## Mistakes
@@ -1,13 +1,15 @@
1
- /** A leave request form: a required period that turns into an error after submit and an optional return date — `required`, `error`, `optional`. */
2
- import { Button, Card, Datepicker, type DatepickerRange } from "prime-ui-kit";
1
+ /** A leave request form: submit checks the required period, the error shakes in and leaves once the period is fixed; an optional return date — `required`, `error`, `optional`. */
2
+ import { Button, Card, Datepicker, type DatepickerRange, Typography } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
5
5
  import styles from "./examples.module.css";
6
6
 
7
+ const EMPTY_PERIOD: DatepickerRange = { from: null, to: null };
8
+
7
9
  export default function DatepickerInFormExample() {
8
- const [period, setPeriod] = React.useState<DatepickerRange>({ from: null, to: null });
9
- const [submitted, setSubmitted] = React.useState(false);
10
- const missing = submitted && (!period.from || !period.to);
10
+ const [period, setPeriod] = React.useState<DatepickerRange>(EMPTY_PERIOD);
11
+ const [error, setError] = React.useState<string>();
12
+ const [sent, setSent] = React.useState(false);
11
13
 
12
14
  return (
13
15
  <Card.Root className={styles.formCard}>
@@ -15,7 +17,9 @@ export default function DatepickerInFormExample() {
15
17
  className={styles.form}
16
18
  onSubmit={(event) => {
17
19
  event.preventDefault();
18
- setSubmitted(true);
20
+ const complete = Boolean(period.from && period.to);
21
+ setError(complete ? undefined : "Укажите начало и конец отпуска");
22
+ setSent(complete);
19
23
  }}
20
24
  >
21
25
  <Datepicker.Root
@@ -23,17 +27,34 @@ export default function DatepickerInFormExample() {
23
27
  label="Период отпуска"
24
28
  required
25
29
  hint="Не больше 28 дней подряд"
26
- error={missing ? "Укажите начало и конец отпуска" : undefined}
30
+ error={error}
27
31
  value={period}
28
- onValueChange={setPeriod}
32
+ onValueChange={(next) => {
33
+ setPeriod(next);
34
+ setError(undefined);
35
+ setSent(false);
36
+ }}
29
37
  months={2}
30
38
  footer
31
39
  placeholder="Выбрать период"
32
40
  fullWidth
33
41
  />
34
42
  <Datepicker.Root mode="single" label="Выход на работу" optional fullWidth />
43
+ {sent ? (
44
+ <Typography as="p" variant="body-s" tone="secondary" role="status">
45
+ Заявка отправлена на согласование.
46
+ </Typography>
47
+ ) : null}
35
48
  <div className={styles.actions}>
36
- <Button.Root variant="ghost" tone="neutral">
49
+ <Button.Root
50
+ variant="ghost"
51
+ tone="neutral"
52
+ onClick={() => {
53
+ setPeriod(EMPTY_PERIOD);
54
+ setError(undefined);
55
+ setSent(false);
56
+ }}
57
+ >
37
58
  Отмена
38
59
  </Button.Root>
39
60
  <Button.Root type="submit">Отправить заявку</Button.Root>
@@ -1,7 +1,22 @@
1
- /** A required leave period with a hint, the same field with an error and an optional return date — `required`, `hint`, `error`, `optional`. */
2
- import { Datepicker } from "prime-ui-kit";
1
+ /** A leave period checked live: the error shakes in, names the broken rule and leaves once the period fits; an optional return date — `required`, `hint`, `error`, `optional`. */
2
+ import { Datepicker, type DatepickerRange } from "prime-ui-kit";
3
+ import * as React from "react";
4
+
5
+ const MAX_DAYS = 28;
6
+ const DAY_MS = 24 * 60 * 60 * 1000;
7
+ const LONG_PERIOD: DatepickerRange = { from: new Date(2026, 6, 1), to: new Date(2026, 7, 4) };
8
+
9
+ /** The period error, or nothing when both ends are set and the period fits the limit. */
10
+ function periodError({ from, to }: DatepickerRange) {
11
+ if (!from || !to) return "Укажите начало и конец отпуска";
12
+ if ((to.getTime() - from.getTime()) / DAY_MS + 1 > MAX_DAYS)
13
+ return "Больше 28 дней подряд нельзя";
14
+ return undefined;
15
+ }
3
16
 
4
17
  export default function DatepickerValidationExample() {
18
+ const [period, setPeriod] = React.useState<DatepickerRange>(LONG_PERIOD);
19
+
5
20
  return (
6
21
  <>
7
22
  <Datepicker.Root
@@ -10,14 +25,9 @@ export default function DatepickerValidationExample() {
10
25
  required
11
26
  hint="Не больше 28 дней подряд"
12
27
  placeholder="Выбрать период"
13
- fullWidth
14
- />
15
- <Datepicker.Root
16
- mode="range"
17
- label="Период отпуска"
18
- required
19
- error="Укажите начало и конец отпуска"
20
- placeholder="Выбрать период"
28
+ value={period}
29
+ onValueChange={setPeriod}
30
+ error={periodError(period)}
21
31
  fullWidth
22
32
  />
23
33
  <Datepicker.Root mode="single" label="Выход на работу" optional fullWidth />
@@ -98,7 +98,7 @@ No `variant` or `tone`.
98
98
  | success | `success` (not while invalid) | `data-success="true"` on the fieldset; the cells turn `success-soft` one after another, half a stagger step apart |
99
99
  | full width | `fullWidth` | `data-full-width="true"` on the fieldset |
100
100
  | group start | `groupSize` | `data-group-start="true"` on the first cell of every group |
101
- | invalid | `invalid` or a non-empty `error` | `data-invalid="true"` on the fieldset and the frame, `aria-invalid="true"` on cells |
101
+ | invalid | `invalid` or a non-empty `error` | `data-invalid="true"` on the fieldset and the frame, `aria-invalid="true"` on cells; the control shakes once when an error arrives (`data-shake` on the frame) |
102
102
  | disabled | `disabled` | `data-disabled="true"` and native `disabled` on the fieldset, every cell disabled, label and hint dimmed |
103
103
  | no focus ring | `focusRing={false}` | `data-focus-ring="false"` on the fieldset |
104
104
 
@@ -141,12 +141,12 @@ No `variant` or `tone`.
141
141
  | [overview.tsx](examples/overview.tsx) | A six-digit code from SMS with its label and a hint — `label`, `hint`, `length`. |
142
142
  | [sizes.tsx](examples/sizes.tsx) | Every size; the cell is a square on its own scale, two steps above the control heights — `size`. |
143
143
  | [states.tsx](examples/states.tsx) | A default code next to a disabled one — `disabled`. |
144
- | [validation.tsx](examples/validation.tsx) | Required and optional markers, a hint and an error that replaces it — `required`, `optional`, `hint`, `error`. |
144
+ | [validation.tsx](examples/validation.tsx) | A confirmation code checked once it is complete: a wrong code shakes in with one message and leaves as soon as you type again; a hint and an optional code — `required`, `optional`, `hint`, `error`. |
145
145
  | [grouped.tsx](examples/grouped.tsx) | A long code read in chunks with a wider gap between groups — `groupSize`. |
146
146
  | [full-width.tsx](examples/full-width.tsx) | Cells that share the container width and keep the tier height, above a full-width button — `fullWidth`. |
147
147
  | [on-complete.tsx](examples/on-complete.tsx) | The code is checked as soon as the last cell is filled: a right one turns the cells success, a wrong one turns the hint into an error — `onComplete`, `success`, `error`. |
148
148
  | [controlled.tsx](examples/controlled.tsx) | The parent owns the code and clears it with a button — `value`, `onValueChange`. |
149
- | [in-form.tsx](examples/in-form.tsx) | A masked card PIN submitted with a form; a short PIN shows an error — `name`, `mask`, `required`, `error`. |
149
+ | [in-form.tsx](examples/in-form.tsx) | A masked card PIN submitted with a form; a short or wrong PIN shakes in an error that leaves when you type again — `name`, `mask`, `required`, `error`. |
150
150
 
151
151
  ## Mistakes
152
152
  - `<DigitInput.Root>` → the component is a single export: `<DigitInput />`.
@@ -1,18 +1,27 @@
1
- /** A masked card PIN submitted with a form; a short PIN shows an error — `name`, `mask`, `required`, `error`. */
2
- import { Button, DigitInput } from "prime-ui-kit";
1
+ /** A masked card PIN submitted with a form; a short or wrong PIN shakes in an error that leaves when you type again — `name`, `mask`, `required`, `error`. */
2
+ import { Button, DigitInput, Typography } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
5
5
  import styles from "./examples.module.css";
6
6
 
7
7
  const PIN_LENGTH = 4;
8
+ const PIN = "4821";
8
9
 
9
10
  export default function DigitInputInFormExample() {
10
11
  const [error, setError] = React.useState<string>();
12
+ const [linked, setLinked] = React.useState(false);
11
13
 
12
14
  const submit = (event: React.FormEvent<HTMLFormElement>) => {
13
15
  event.preventDefault();
14
16
  const pin = String(new FormData(event.currentTarget).get("pin") ?? "");
15
- setError(pin.length === PIN_LENGTH ? undefined : "Введите все четыре цифры");
17
+ const next =
18
+ pin.length !== PIN_LENGTH
19
+ ? "Введите все четыре цифры"
20
+ : pin === PIN
21
+ ? undefined
22
+ : "Неверный PIN-код";
23
+ setError(next);
24
+ setLinked(next === undefined);
16
25
  };
17
26
 
18
27
  return (
@@ -23,9 +32,18 @@ export default function DigitInputInFormExample() {
23
32
  length={PIN_LENGTH}
24
33
  mask
25
34
  required
35
+ hint={`Для примера — ${PIN}`}
26
36
  error={error}
27
- onValueChange={() => setError(undefined)}
37
+ onValueChange={() => {
38
+ setError(undefined);
39
+ setLinked(false);
40
+ }}
28
41
  />
42
+ {linked ? (
43
+ <Typography as="p" variant="body-s" tone="secondary" role="status">
44
+ Карта привязана.
45
+ </Typography>
46
+ ) : null}
29
47
  <Button.Root type="submit">Привязать карту</Button.Root>
30
48
  </form>
31
49
  );
@@ -1,15 +1,22 @@
1
- /** Required and optional markers, a hint and an error that replaces it — `required`, `optional`, `hint`, `error`. */
1
+ /** A confirmation code checked once it is complete: a wrong code shakes in with one message and leaves as soon as you type again; a hint and an optional code — `required`, `optional`, `hint`, `error`. */
2
2
  import { DigitInput } from "prime-ui-kit";
3
+ import * as React from "react";
4
+
5
+ const CODE = "482916";
3
6
 
4
7
  export default function DigitInputValidationExample() {
8
+ const [error, setError] = React.useState<string>();
9
+
5
10
  return (
6
11
  <>
7
- <DigitInput label="Код из письма" required hint="Проверьте папку «Спам»" length={6} />
8
12
  <DigitInput
9
- label="Код подтверждения"
13
+ label="Код из письма"
10
14
  required
11
- defaultValue="1111"
12
- error="Неверный код, осталось 2 попытки"
15
+ hint={`Проверьте папку «Спам». Для примера — ${CODE}`}
16
+ length={6}
17
+ error={error}
18
+ onValueChange={() => setError(undefined)}
19
+ onComplete={(value) => setError(value === CODE ? undefined : "Неверный код")}
13
20
  />
14
21
  <DigitInput label="Код приглашения" optional />
15
22
  </>
@@ -182,7 +182,7 @@ Motion: the scrim fades, the panel slides from its side over `slow` and leaves o
182
182
  | [long-content.tsx](examples/long-content.tsx) | A long body scrolls on its own while the header and the footer stay in place — `Drawer.Body`. |
183
183
  | [dismiss.tsx](examples/dismiss.tsx) | An import closes only from its buttons, and not at all while it runs — `closeOnOutsideClick`, `closeOnEscape`. |
184
184
  | [controlled-open.tsx](examples/controlled-open.tsx) | The parent owns the state and opens the drawer from a link, without a trigger — `open`, `onOpenChange`. |
185
- | [in-form.tsx](examples/in-form.tsx) | A settings form in the panel: the footer button submits the form and an empty name keeps it open — `Drawer.Body`, `Drawer.Footer`, `error`. |
185
+ | [in-form.tsx](examples/in-form.tsx) | A settings form in the panel: the footer button submits the form and an empty name shakes the field and keeps it open until it is filled — `Drawer.Body`, `Drawer.Footer`, `error`. |
186
186
 
187
187
  ## Mistakes
188
188
  - A delete confirmation in a Drawer → use Modal.
@@ -1,4 +1,4 @@
1
- /** A settings form in the panel: the footer button submits the form and an empty name keeps it open — `Drawer.Body`, `Drawer.Footer`, `error`. */
1
+ /** A settings form in the panel: the footer button submits the form and an empty name shakes the field and keeps it open until it is filled — `Drawer.Body`, `Drawer.Footer`, `error`. */
2
2
  import { Button, Drawer, Icon, Input, Select, Switch } from "prime-ui-kit";
3
3
  import * as React from "react";
4
4
 
@@ -44,7 +44,12 @@ export default function DrawerInFormExample() {
44
44
  <form id={formId} className={styles.form} noValidate onSubmit={submit}>
45
45
  <Input.Root label="Название" required error={error} reserveSupportRow>
46
46
  <Input.Wrapper>
47
- <Input.Field name="name" defaultValue="Команда продукта" autoFocus />
47
+ <Input.Field
48
+ name="name"
49
+ defaultValue="Команда продукта"
50
+ autoFocus
51
+ onValueChange={() => setError(undefined)}
52
+ />
48
53
  </Input.Wrapper>
49
54
  </Input.Root>
50
55
  <Input.Root label="Адрес" hint="Только латиница, цифры и дефис">