@konce-pt/react 0.12.0 → 0.14.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 (378) hide show
  1. package/README.md +122 -64
  2. package/dist/accordion/accordion.d.ts +14 -6
  3. package/dist/accordion/accordion.js +14 -7
  4. package/dist/accordion/llms.txt +22 -10
  5. package/dist/alert/alert.d.ts +2 -2
  6. package/dist/alert/alert.js +2 -2
  7. package/dist/alert/llms.txt +10 -10
  8. package/dist/app-shell/app-shell.d.ts +14 -14
  9. package/dist/app-shell/app-shell.js +11 -11
  10. package/dist/app-shell/llms.txt +13 -13
  11. package/dist/auth/auth-types.d.ts +6 -6
  12. package/dist/auth/auth.d.ts +2 -2
  13. package/dist/auth/auth.js +7 -7
  14. package/dist/auth/llms.txt +9 -9
  15. package/dist/autocomplete/autocomplete.d.ts +19 -6
  16. package/dist/autocomplete/autocomplete.js +23 -10
  17. package/dist/autocomplete/llms.txt +16 -5
  18. package/dist/avatar/avatar.d.ts +6 -6
  19. package/dist/avatar/avatar.js +5 -5
  20. package/dist/avatar/llms.txt +10 -10
  21. package/dist/avatar-group/avatar-group.d.ts +4 -4
  22. package/dist/avatar-group/avatar-group.js +3 -3
  23. package/dist/avatar-group/llms.txt +8 -8
  24. package/dist/backdrop/backdrop.d.ts +7 -7
  25. package/dist/backdrop/backdrop.js +16 -16
  26. package/dist/backdrop/llms.txt +27 -27
  27. package/dist/badge/badge.d.ts +3 -3
  28. package/dist/badge/badge.js +1 -1
  29. package/dist/badge/llms.txt +11 -11
  30. package/dist/bottom-sheet/bottom-sheet.d.ts +4 -4
  31. package/dist/bottom-sheet/bottom-sheet.js +2 -2
  32. package/dist/bottom-sheet/llms.txt +9 -9
  33. package/dist/breadcrumb/breadcrumb.d.ts +2 -2
  34. package/dist/breadcrumb/breadcrumb.js +3 -3
  35. package/dist/breadcrumb/llms.txt +3 -3
  36. package/dist/button/button.d.ts +3 -3
  37. package/dist/button/button.js +8 -8
  38. package/dist/button/llms.txt +27 -19
  39. package/dist/button-group/button-group.d.ts +9 -9
  40. package/dist/button-group/button-group.js +30 -8
  41. package/dist/button-group/llms.txt +20 -14
  42. package/dist/card/card.d.ts +8 -8
  43. package/dist/card/card.js +6 -6
  44. package/dist/card/llms.txt +20 -20
  45. package/dist/carousel/carousel.d.ts +6 -6
  46. package/dist/carousel/carousel.js +4 -4
  47. package/dist/carousel/llms.txt +10 -10
  48. package/dist/charts/chart-legend.d.ts +3 -3
  49. package/dist/charts/chart-legend.js +1 -1
  50. package/dist/charts/chart-tooltip.d.ts +3 -3
  51. package/dist/charts/chart-tooltip.js +1 -1
  52. package/dist/charts/chart.d.ts +1 -1
  53. package/dist/charts/chart.js +8 -8
  54. package/dist/charts/llms.txt +6 -6
  55. package/dist/charts-entry/public-api.js +2 -2
  56. package/dist/chat/chat.d.ts +17 -10
  57. package/dist/chat/chat.js +42 -18
  58. package/dist/chat/llms.txt +32 -17
  59. package/dist/chat-composer/chat-composer.d.ts +17 -7
  60. package/dist/chat-composer/chat-composer.js +21 -8
  61. package/dist/chat-composer/llms.txt +20 -11
  62. package/dist/chat-dock/chat-dock.d.ts +11 -4
  63. package/dist/chat-dock/chat-dock.js +9 -6
  64. package/dist/chat-dock/llms.txt +15 -14
  65. package/dist/chat-entry/public-api.js +1 -1
  66. package/dist/chat-message/chat-message.d.ts +12 -5
  67. package/dist/chat-message/chat-message.js +17 -7
  68. package/dist/chat-message/llms.txt +16 -15
  69. package/dist/chat-typing/chat-typing.d.ts +2 -2
  70. package/dist/chat-typing/chat-typing.js +3 -3
  71. package/dist/chat-typing/llms.txt +6 -6
  72. package/dist/checkbox/checkbox.d.ts +13 -6
  73. package/dist/checkbox/checkbox.js +26 -7
  74. package/dist/checkbox/llms.txt +24 -12
  75. package/dist/chip/chip.d.ts +4 -4
  76. package/dist/chip/chip.js +2 -2
  77. package/dist/chip/llms.txt +11 -11
  78. package/dist/chips-input/chips-input.d.ts +4 -4
  79. package/dist/chips-input/chips-input.js +35 -9
  80. package/dist/chips-input/llms.txt +15 -8
  81. package/dist/clock/clock.d.ts +4 -4
  82. package/dist/clock/clock.js +7 -7
  83. package/dist/clock/llms.txt +8 -8
  84. package/dist/color-picker/color-picker.d.ts +6 -6
  85. package/dist/color-picker/color-picker.js +3 -3
  86. package/dist/color-picker/llms.txt +5 -5
  87. package/dist/confirm/confirm-container.d.ts +3 -3
  88. package/dist/confirm/confirm-container.js +5 -5
  89. package/dist/confirm/confirm-store.d.ts +4 -4
  90. package/dist/confirm/confirm-store.js +7 -7
  91. package/dist/confirm/llms.txt +6 -6
  92. package/dist/context-menu/context-menu.d.ts +1 -1
  93. package/dist/context-menu/context-menu.js +5 -5
  94. package/dist/context-menu/llms.txt +7 -7
  95. package/dist/data-table/data-table-types.d.ts +5 -5
  96. package/dist/data-table/data-table.d.ts +29 -8
  97. package/dist/data-table/data-table.js +340 -95
  98. package/dist/data-table/export-csv.d.ts +3 -3
  99. package/dist/data-table/export-csv.js +4 -4
  100. package/dist/data-table/llms.txt +127 -94
  101. package/dist/data-view/data-view.d.ts +13 -5
  102. package/dist/data-view/data-view.js +67 -6
  103. package/dist/data-view/llms.txt +29 -10
  104. package/dist/date-range/date-range.d.ts +9 -9
  105. package/dist/date-range/date-range.js +24 -24
  106. package/dist/date-range/llms.txt +20 -20
  107. package/dist/datepicker/datepicker.d.ts +10 -10
  108. package/dist/datepicker/datepicker.js +29 -29
  109. package/dist/datepicker/llms.txt +24 -24
  110. package/dist/dialog/dialog.d.ts +4 -4
  111. package/dist/dialog/dialog.js +4 -4
  112. package/dist/dialog/llms.txt +11 -11
  113. package/dist/divider/divider.d.ts +1 -1
  114. package/dist/divider/llms.txt +4 -4
  115. package/dist/drawer/drawer.d.ts +5 -5
  116. package/dist/drawer/drawer.js +2 -2
  117. package/dist/drawer/llms.txt +11 -11
  118. package/dist/empty/empty.d.ts +2 -2
  119. package/dist/empty/empty.js +1 -1
  120. package/dist/empty/llms.txt +9 -9
  121. package/dist/fab/fab.d.ts +1 -1
  122. package/dist/fab/fab.js +1 -1
  123. package/dist/fab/llms.txt +10 -6
  124. package/dist/fieldset/fieldset.d.ts +18 -4
  125. package/dist/fieldset/fieldset.js +9 -6
  126. package/dist/fieldset/llms.txt +26 -9
  127. package/dist/file-upload/file-upload.d.ts +3 -3
  128. package/dist/file-upload/file-upload.js +7 -7
  129. package/dist/file-upload/llms.txt +7 -7
  130. package/dist/form-field/form-field-context.d.ts +4 -4
  131. package/dist/form-field/form-field.d.ts +12 -4
  132. package/dist/form-field/form-field.js +26 -6
  133. package/dist/form-field/llms.txt +25 -11
  134. package/dist/galleria/galleria.d.ts +3 -3
  135. package/dist/galleria/galleria.js +5 -5
  136. package/dist/galleria/llms.txt +7 -7
  137. package/dist/grid/col.d.ts +4 -4
  138. package/dist/grid/col.js +2 -2
  139. package/dist/grid/flex.d.ts +3 -3
  140. package/dist/grid/flex.js +1 -1
  141. package/dist/grid/grid.d.ts +7 -7
  142. package/dist/grid/grid.js +3 -3
  143. package/dist/grid/layout.d.ts +2 -2
  144. package/dist/grid/layout.js +2 -2
  145. package/dist/grid/llms.txt +15 -15
  146. package/dist/grid-entry/public-api.js +1 -1
  147. package/dist/i18n/i18n-context.d.ts +3 -3
  148. package/dist/i18n/i18n-context.js +7 -7
  149. package/dist/icon/icon-registry.d.ts +3 -3
  150. package/dist/icon/icon-registry.js +3 -3
  151. package/dist/icon/icon.d.ts +4 -4
  152. package/dist/icon/icon.js +6 -6
  153. package/dist/icon/llms.txt +13 -13
  154. package/dist/icon-button/icon-button.d.ts +2 -2
  155. package/dist/icon-button/icon-button.js +1 -1
  156. package/dist/icon-button/llms.txt +9 -5
  157. package/dist/icons-entry/public-api.d.ts +2 -2
  158. package/dist/icons-entry/public-api.js +3 -3
  159. package/dist/image/image.js +1 -1
  160. package/dist/image/llms.txt +13 -13
  161. package/dist/input/input.d.ts +18 -5
  162. package/dist/input/input.js +21 -6
  163. package/dist/input/llms.txt +25 -11
  164. package/dist/input-mask/input-mask.d.ts +1 -1
  165. package/dist/input-mask/input-mask.js +2 -2
  166. package/dist/input-mask/llms.txt +5 -5
  167. package/dist/input-number/input-number.d.ts +9 -9
  168. package/dist/input-number/input-number.js +11 -11
  169. package/dist/input-number/llms.txt +14 -14
  170. package/dist/input-otp/input-otp.d.ts +6 -6
  171. package/dist/input-otp/input-otp.js +10 -10
  172. package/dist/input-otp/llms.txt +9 -9
  173. package/dist/internal/calendar-focus.d.ts +1 -1
  174. package/dist/internal/calendar-focus.js +3 -3
  175. package/dist/internal/cn.d.ts +1 -1
  176. package/dist/internal/mask.d.ts +2 -2
  177. package/dist/internal/mask.js +4 -4
  178. package/dist/internal/option-key.d.ts +2 -2
  179. package/dist/internal/option-key.js +2 -2
  180. package/dist/internal/option-nav.d.ts +4 -4
  181. package/dist/internal/option-nav.js +5 -5
  182. package/dist/internal/overlay-container.js +1 -1
  183. package/dist/internal/overlay.d.ts +3 -3
  184. package/dist/internal/overlay.js +8 -8
  185. package/dist/internal/password-strength.d.ts +2 -2
  186. package/dist/internal/password-strength.js +6 -6
  187. package/dist/internal/roving.d.ts +2 -2
  188. package/dist/internal/roving.js +3 -3
  189. package/dist/internal/scroll-lock.d.ts +1 -1
  190. package/dist/internal/scroll-lock.js +2 -2
  191. package/dist/internal/slot-children.d.ts +3 -3
  192. package/dist/internal/slot-children.js +4 -4
  193. package/dist/internal/slot.d.ts +3 -3
  194. package/dist/internal/slot.js +2 -2
  195. package/dist/internal/step.d.ts +3 -3
  196. package/dist/internal/step.js +4 -4
  197. package/dist/internal/tween.d.ts +5 -5
  198. package/dist/internal/tween.js +5 -5
  199. package/dist/internal/types.d.ts +2 -2
  200. package/dist/internal/use-breakpoint.d.ts +2 -2
  201. package/dist/internal/use-breakpoint.js +4 -4
  202. package/dist/internal/use-controllable-state.d.ts +1 -1
  203. package/dist/internal/use-controllable-state.js +3 -3
  204. package/dist/internal/use-id.d.ts +2 -2
  205. package/dist/internal/use-id.js +2 -2
  206. package/dist/internal/use-modal-focus.d.ts +1 -1
  207. package/dist/internal/use-modal-focus.js +3 -3
  208. package/dist/knob/knob.d.ts +4 -4
  209. package/dist/knob/knob.js +14 -10
  210. package/dist/knob/llms.txt +17 -12
  211. package/dist/listbox/listbox.d.ts +6 -6
  212. package/dist/listbox/listbox.js +9 -9
  213. package/dist/listbox/llms.txt +10 -10
  214. package/dist/loader/llms.txt +56 -0
  215. package/dist/loader/loader.d.ts +49 -0
  216. package/dist/loader/loader.js +68 -0
  217. package/dist/map/llms.txt +25 -22
  218. package/dist/map/map-create-dialog.d.ts +4 -4
  219. package/dist/map/map-create-dialog.js +10 -10
  220. package/dist/map/map-hours-field.d.ts +4 -4
  221. package/dist/map/map-hours-field.js +7 -7
  222. package/dist/map/map-image-field.d.ts +2 -2
  223. package/dist/map/map-image-field.js +4 -4
  224. package/dist/map/map-legend.d.ts +4 -4
  225. package/dist/map/map-legend.js +2 -2
  226. package/dist/map/map-poi-card.d.ts +3 -3
  227. package/dist/map/map-poi-card.js +9 -9
  228. package/dist/map/map-search.d.ts +17 -6
  229. package/dist/map/map-search.js +21 -18
  230. package/dist/map/map.d.ts +21 -14
  231. package/dist/map/map.js +30 -29
  232. package/dist/map/ports.d.ts +9 -9
  233. package/dist/map/ports.js +6 -6
  234. package/dist/map-entry/public-api.js +2 -2
  235. package/dist/megamenu/llms.txt +9 -9
  236. package/dist/megamenu/megamenu.d.ts +6 -6
  237. package/dist/megamenu/megamenu.js +10 -10
  238. package/dist/mention/llms.txt +15 -15
  239. package/dist/mention/mention.d.ts +5 -5
  240. package/dist/mention/mention.js +2 -2
  241. package/dist/mention/mentions.d.ts +1 -1
  242. package/dist/mention/mentions.js +1 -1
  243. package/dist/menu/llms.txt +12 -12
  244. package/dist/menu/menu-item.d.ts +4 -4
  245. package/dist/menu/menu-keys.d.ts +2 -2
  246. package/dist/menu/menu-keys.js +5 -5
  247. package/dist/menu/menu.d.ts +2 -2
  248. package/dist/menu/menu.js +6 -6
  249. package/dist/menubar/llms.txt +10 -10
  250. package/dist/menubar/menubar.d.ts +5 -5
  251. package/dist/menubar/menubar.js +10 -10
  252. package/dist/meter-group/llms.txt +12 -12
  253. package/dist/meter-group/meter-group.d.ts +2 -2
  254. package/dist/meter-group/meter-group.js +1 -1
  255. package/dist/motion/motion-context.d.ts +22 -0
  256. package/dist/motion/motion-context.js +28 -0
  257. package/dist/order-list/llms.txt +22 -10
  258. package/dist/order-list/order-list.d.ts +12 -4
  259. package/dist/order-list/order-list.js +104 -21
  260. package/dist/paginator/llms.txt +8 -8
  261. package/dist/paginator/paginator.js +1 -1
  262. package/dist/panel/llms.txt +25 -13
  263. package/dist/panel/panel.d.ts +11 -3
  264. package/dist/panel/panel.js +7 -4
  265. package/dist/password/llms.txt +16 -8
  266. package/dist/password/password.d.ts +2 -2
  267. package/dist/password/password.js +24 -3
  268. package/dist/peek/llms.txt +10 -10
  269. package/dist/peek/peek.d.ts +6 -6
  270. package/dist/peek/peek.js +7 -7
  271. package/dist/pick-list/llms.txt +33 -13
  272. package/dist/pick-list/pick-list.d.ts +12 -4
  273. package/dist/pick-list/pick-list.js +111 -23
  274. package/dist/popover/llms.txt +11 -11
  275. package/dist/popover/popover.d.ts +4 -4
  276. package/dist/popover/popover.js +5 -5
  277. package/dist/progress/llms.txt +17 -17
  278. package/dist/progress/progress.d.ts +7 -7
  279. package/dist/progress/progress.js +6 -6
  280. package/dist/public-api.d.ts +15 -3
  281. package/dist/public-api.js +13 -7
  282. package/dist/radio-group/llms.txt +13 -6
  283. package/dist/radio-group/radio-group.d.ts +11 -4
  284. package/dist/radio-group/radio-group.js +15 -7
  285. package/dist/rating/llms.txt +20 -13
  286. package/dist/rating/rating-pointer.d.ts +16 -0
  287. package/dist/rating/rating-pointer.js +26 -0
  288. package/dist/rating/rating.d.ts +6 -6
  289. package/dist/rating/rating.js +76 -12
  290. package/dist/rich-text/lists.d.ts +2 -2
  291. package/dist/rich-text/lists.js +7 -7
  292. package/dist/rich-text/llms.txt +26 -17
  293. package/dist/rich-text/rich-text.d.ts +12 -7
  294. package/dist/rich-text/rich-text.js +78 -54
  295. package/dist/rich-text/sanitize.d.ts +3 -3
  296. package/dist/rich-text/sanitize.js +12 -12
  297. package/dist/rich-text/tables.d.ts +3 -3
  298. package/dist/rich-text/tables.js +3 -3
  299. package/dist/roadmap/llms.txt +15 -15
  300. package/dist/roadmap/roadmap.d.ts +6 -6
  301. package/dist/roadmap/roadmap.js +19 -19
  302. package/dist/roadmap-entry/public-api.js +2 -2
  303. package/dist/scroll-top/llms.txt +6 -6
  304. package/dist/scroll-top/scroll-top.d.ts +1 -1
  305. package/dist/scroll-top/scroll-top.js +1 -1
  306. package/dist/select/llms.txt +19 -12
  307. package/dist/select/select.d.ts +8 -8
  308. package/dist/select/select.js +47 -21
  309. package/dist/shared/types.d.ts +5 -5
  310. package/dist/shared/types.js +1 -1
  311. package/dist/sidenav/llms.txt +9 -9
  312. package/dist/sidenav/sidenav.d.ts +1 -1
  313. package/dist/sidenav/sidenav.js +1 -1
  314. package/dist/skeleton/llms.txt +3 -3
  315. package/dist/skeleton/skeleton.d.ts +1 -1
  316. package/dist/skeleton/skeleton.js +1 -1
  317. package/dist/slider/llms.txt +32 -13
  318. package/dist/slider/slider-drag.d.ts +26 -0
  319. package/dist/slider/slider-drag.js +79 -0
  320. package/dist/slider/slider.d.ts +6 -5
  321. package/dist/slider/slider.js +27 -8
  322. package/dist/speech/llms.txt +97 -0
  323. package/dist/speech/speech-button.d.ts +44 -0
  324. package/dist/speech/speech-button.js +86 -0
  325. package/dist/speech/speech-wave.d.ts +19 -0
  326. package/dist/speech/speech-wave.js +16 -0
  327. package/dist/speech/use-speech-recognition.d.ts +81 -0
  328. package/dist/speech/use-speech-recognition.js +179 -0
  329. package/dist/speed-dial/llms.txt +14 -8
  330. package/dist/speed-dial/speed-dial.d.ts +1 -1
  331. package/dist/speed-dial/speed-dial.js +1 -1
  332. package/dist/spinner/llms.txt +7 -7
  333. package/dist/spinner/spinner.d.ts +1 -1
  334. package/dist/spinner/spinner.js +1 -1
  335. package/dist/split-button/llms.txt +21 -15
  336. package/dist/split-button/split-button.d.ts +2 -2
  337. package/dist/split-button/split-button.js +4 -4
  338. package/dist/splitter/llms.txt +11 -11
  339. package/dist/splitter/splitter.d.ts +3 -3
  340. package/dist/splitter/splitter.js +5 -5
  341. package/dist/stepper/llms.txt +33 -14
  342. package/dist/stepper/stepper.d.ts +6 -6
  343. package/dist/stepper/stepper.js +53 -10
  344. package/dist/switch/llms.txt +12 -5
  345. package/dist/switch/switch.d.ts +10 -3
  346. package/dist/switch/switch.js +12 -5
  347. package/dist/switch-group/llms.txt +9 -9
  348. package/dist/switch-group/switch-group.d.ts +4 -4
  349. package/dist/switch-group/switch-group.js +4 -4
  350. package/dist/tabs/llms.txt +10 -10
  351. package/dist/tabs/tabs.d.ts +5 -5
  352. package/dist/tabs/tabs.js +8 -8
  353. package/dist/textarea/llms.txt +23 -12
  354. package/dist/textarea/textarea.d.ts +19 -6
  355. package/dist/textarea/textarea.js +21 -7
  356. package/dist/timeline/llms.txt +4 -4
  357. package/dist/timeline/timeline.d.ts +1 -1
  358. package/dist/timeline/timeline.js +1 -1
  359. package/dist/toast/llms.txt +47 -17
  360. package/dist/toast/toast-container.d.ts +9 -3
  361. package/dist/toast/toast-container.js +17 -9
  362. package/dist/toast/toast-store.d.ts +40 -4
  363. package/dist/toast/toast-store.js +36 -1
  364. package/dist/toolbar/llms.txt +7 -7
  365. package/dist/toolbar/toolbar.d.ts +3 -3
  366. package/dist/toolbar/toolbar.js +2 -2
  367. package/dist/tooltip/llms.txt +10 -10
  368. package/dist/tooltip/tooltip.d.ts +3 -3
  369. package/dist/tooltip/tooltip.js +18 -18
  370. package/dist/tree/llms.txt +25 -12
  371. package/dist/tree/tree-keys.d.ts +5 -5
  372. package/dist/tree/tree-keys.js +7 -7
  373. package/dist/tree/tree.d.ts +14 -7
  374. package/dist/tree/tree.js +53 -18
  375. package/dist/update/llms.txt +54 -0
  376. package/dist/update/update.d.ts +49 -0
  377. package/dist/update/update.js +82 -0
  378. package/package.json +15 -13
@@ -1,25 +1,25 @@
1
1
  # KptSpeedDial (@konce-pt/react)
2
2
 
3
- A speed dial — a FAB that fans out a set of actions. Built on `KptFab`.
3
+ A speed dial - a FAB that fans out a set of actions. Built on `KptFab`.
4
4
  Import: `import { KptSpeedDial } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <div class="kpt-speed-dial-host">
8
8
  <div class="kpt-speed-dial is-open" data-direction="up">
9
9
  <div class="kpt-speed-dial__actions">
10
- <button class="kpt-speed-dial__action" aria-label="Upload file">…</button>…
10
+ <button class="kpt-speed-dial__action" aria-label="Upload file">...</button>...
11
11
  </div>
12
- <span class="kpt-fab-host"><button class="kpt-fab">…</button></span>
12
+ <span class="kpt-fab-host"><button class="kpt-fab">...</button></span>
13
13
  </div>
14
14
  <div class="kpt-speed-dial__backdrop"></div>
15
15
  </div>
16
16
 
17
17
  ## Props
18
- - `items`: `KptMenuItem<T>[]` — the actions (`label`, `icon`, `disabled`)
18
+ - `items`: `KptMenuItem<T>[]` - the actions (`label`, `icon`, `disabled`)
19
19
  - `direction`: `'up'` (default) | `'down'` | `'left'` | `'right'`
20
- - `icon`: string (default `'plus'`) — the SCSS rotates it 45° when open
21
- - `ariaLabel`: string — the closed-state label; without it `speedDial.actions`
22
- - `onSelect(item)` — fired on pick; a disabled item fires nothing
20
+ - `icon`: string (default `'plus'`) - the SCSS rotates it 45° when open
21
+ - `ariaLabel`: string - the closed-state label; without it `speedDial.actions`
22
+ - `onSelect(item)` - fired on pick; a disabled item fires nothing
23
23
  - `className`, `ref` and every other `<div>` prop go to the host
24
24
 
25
25
  ## The label follows the state
@@ -37,6 +37,12 @@ present would swallow clicks meant for the page underneath.
37
37
  ## i18n
38
38
  `speedDial.actions` and `common.close`; `locale` and `dictionary` override them per instance.
39
39
 
40
+ ## Motion
41
+ The actions fan out from the button in a cascade - the nearest first, on a spring, from the side of the
42
+ button - and fold back in reverse order; the trigger icon turns on a spring. The container hides
43
+ (`visibility`) only after the last action, so the closing cascade is not cut off. Pressed, it squeezes slightly and springs back on release (shared mixin `styles/_press.scss`). Pure CSS; durations follow `--kpt-motion-scale`, so `enabled: false` turns it off, and it drops out
44
+ under "reduce motion".
45
+
40
46
  ## Tokens
41
47
  The main button comes from `KptFab`; the actions use `--kpt-color-surface-raised` and
42
48
  `--kpt-elevation-2`.
@@ -44,7 +50,7 @@ The main button comes from `KptFab`; the actions use `--kpt-color-surface-raised
44
50
  ## Accessibility
45
51
  - The main button carries `aria-expanded` and `aria-controls` pointing at the actions container.
46
52
  - Closed actions are `visibility: hidden` (switched after the fade-out), so they are out of the Tab
47
- order and the accessibility tree — not just transparent.
53
+ order and the accessibility tree - not just transparent.
48
54
  - `Escape` anywhere in the dial closes it and returns focus to the main button.
49
55
  - Every action is a `<button>` labelled with its own `label`, so the fan works from the keyboard even
50
56
  when the actions show icons only.
@@ -12,7 +12,7 @@ export interface KptSpeedDialProps<T> extends Omit<ComponentPropsWithRef<'div'>,
12
12
  onSelect?: (item: KptMenuItem<T>) => void;
13
13
  }
14
14
  /**
15
- * Speed dial — FAB rozwijający zestaw akcji wachlarzem. Buduje na `KptFab`.
15
+ * Speed dial - FAB rozwijający zestaw akcji wachlarzem. Buduje na `KptFab`.
16
16
  *
17
17
  * @example
18
18
  * <KptSpeedDial items={actions} direction="up" onSelect={onAction} />
@@ -7,7 +7,7 @@ import { useKptMessages } from "../i18n/i18n-context.js";
7
7
  import { KptFab } from "../fab/fab.js";
8
8
  import { KptIcon } from "../icon/icon.js";
9
9
  /**
10
- * Speed dial — FAB rozwijający zestaw akcji wachlarzem. Buduje na `KptFab`.
10
+ * Speed dial - FAB rozwijający zestaw akcji wachlarzem. Buduje na `KptFab`.
11
11
  *
12
12
  * @example
13
13
  * <KptSpeedDial items={actions} direction="up" onSelect={onAction} />
@@ -9,13 +9,13 @@ A loading indicator. Import: `import { KptSpinner } from '@konce-pt/react';`
9
9
  </span>
10
10
 
11
11
  ## Props
12
- - `size`: string (default '1.5rem') — a CSS length, applied to width and height
13
- - `label`: string — the accessibility label; omitted falls back to `spinner.label`
14
- - `locale`, `dictionary` — i18n overrides for this component only
12
+ - `size`: string (default '1.5rem') - a CSS length, applied to width and height
13
+ - `label`: string - the accessibility label; omitted falls back to `spinner.label`
14
+ - `locale`, `dictionary` - i18n overrides for this component only
15
15
  - `className`, `ref` and every other `<span>` prop go to the host
16
16
 
17
17
  ## The colour is inherited
18
- The host sets `color: var(--kpt-color-primary)`, and the ring is drawn in `currentColor` — so the
18
+ The host sets `color: var(--kpt-color-primary)`, and the ring is drawn in `currentColor` - so the
19
19
  spinner is primary by default, and anything that sets `color` on the host changes it. Pass
20
20
  `style={{ color: 'inherit' }}` (or a class) to take the colour of the text around it, e.g. inside a
21
21
  filled chip. There is no colour prop, on purpose.
@@ -23,15 +23,15 @@ filled chip. There is no colour prop, on purpose.
23
23
  ## Examples
24
24
  <KptSpinner />
25
25
  <KptSpinner size="2rem" label="Loading data" />
26
- <KptButton disabled><KptSpinner size="1em" /> Saving…</KptButton>
26
+ <KptButton disabled><KptSpinner size="1em" /> Saving...</KptButton>
27
27
 
28
28
  ## Tokens
29
- None of its own — the colour is `--kpt-color-primary` on the host (drawn in `currentColor`), the
29
+ None of its own - the colour is `--kpt-color-primary` on the host (drawn in `currentColor`), the
30
30
  size comes from the prop, the ring width is 8% of the size (at least 2px), the speed from
31
31
  `--kpt-motion-duration-*`.
32
32
 
33
33
  ## Accessibility
34
34
  The ring is `aria-hidden`; next to it sits a visually hidden `.kpt-spinner__label` with
35
- `role="status"`. Its text — `label`, or `spinner.label` — is written a frame after the spinner
35
+ `role="status"`. Its text - `label`, or `spinner.label` - is written a frame after the spinner
36
36
  appears, because a status region that is born already filled in is skipped by most screen readers.
37
37
  Under `prefers-reduced-motion` the rotation slows down instead of stopping.
@@ -10,7 +10,7 @@ export interface KptSpinnerProps extends Omit<ComponentPropsWithRef<'span'>, 'ch
10
10
  *
11
11
  * Pierścień jest dekoracją (`aria-hidden`); dla czytnika jest osobny, wizualnie ukryty region
12
12
  * `role="status"` z etykietą. Tekst trafia do regionu klatkę po pojawieniu się spinnera: region,
13
- * który powstaje od razu z treścią, większość czytników przemilcza — ogłaszają dopiero zmianę.
13
+ * który powstaje od razu z treścią, większość czytników przemilcza - ogłaszają dopiero zmianę.
14
14
  *
15
15
  * @example
16
16
  * <KptSpinner />
@@ -8,7 +8,7 @@ import { useKptMessages } from "../i18n/i18n-context.js";
8
8
  *
9
9
  * Pierścień jest dekoracją (`aria-hidden`); dla czytnika jest osobny, wizualnie ukryty region
10
10
  * `role="status"` z etykietą. Tekst trafia do regionu klatkę po pojawieniu się spinnera: region,
11
- * który powstaje od razu z treścią, większość czytników przemilcza — ogłaszają dopiero zmianę.
11
+ * który powstaje od razu z treścią, większość czytników przemilcza - ogłaszają dopiero zmianę.
12
12
  *
13
13
  * @example
14
14
  * <KptSpinner />
@@ -1,37 +1,37 @@
1
1
  # KptSplitButton (@konce-pt/react)
2
2
 
3
- A split button — a primary action plus a dropdown of further actions.
3
+ A split button - a primary action plus a dropdown of further actions.
4
4
  Import: `import { KptSplitButton } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <span class="kpt-split-button-host">
8
8
  <div class="kpt-split-button" data-variant="filled">
9
9
  <button class="kpt-split-button__main" type="button">Save</button>
10
- <button class="kpt-split-button__toggle" type="button" aria-label="More actions">…chevron…</button>
10
+ <button class="kpt-split-button__toggle" type="button" aria-label="More actions">...chevron...</button>
11
11
  </div>
12
12
  </span>
13
13
  <!-- while open, in a portal: -->
14
- <div class="kpt-split-button__panel" role="menu">…rows…</div>
14
+ <div class="kpt-split-button__panel" role="menu">...rows...</div>
15
15
 
16
16
  ## Props
17
- - `variant`: `KptSplitButtonVariant` = 'filled' | 'tonal' | 'outline' | 'text' (default 'filled') —
17
+ - `variant`: `KptSplitButtonVariant` = 'filled' | 'tonal' | 'outline' | 'text' (default 'filled') -
18
18
  the subset of `KptButtonVariant` that has a style; `outline` and `text` use the `--kpt-button-outline-*`
19
19
  and `--kpt-button-text-*` tokens, so they match `kpt-button` in the same row
20
- - `items`: `KptMenuItem<T>[]` — the same shape as `KptMenu`
21
- - `disabled`: boolean — disables both buttons
22
- - `onPrimaryClick()` — the main action
23
- - `onSelect(item)` — a pick from the menu
24
- - `open` / `defaultOpen` / `onOpenChange` — the panel state
25
- - `children` — the content of the main action
26
- - `locale`, `dictionary` — i18n overrides for this component only
20
+ - `items`: `KptMenuItem<T>[]` - the same shape as `KptMenu`
21
+ - `disabled`: boolean - disables both buttons
22
+ - `onPrimaryClick()` - the main action
23
+ - `onSelect(item)` - a pick from the menu
24
+ - `open` / `defaultOpen` / `onOpenChange` - the panel state
25
+ - `children` - the content of the main action
26
+ - `locale`, `dictionary` - i18n overrides for this component only
27
27
 
28
28
  ## The panel aligns to the right
29
29
  The toggle sits on the right-hand side of the control, so the panel is anchored by its RIGHT edge
30
30
  (`align="end"` on the overlay). Anchored to the left it would hang off the control instead of under
31
- it — the same reasoning the Angular port encodes in its CDK position list.
31
+ it - the same reasoning the Angular port encodes in its CDK position list.
32
32
 
33
33
  ## Shared rows
34
- The panel renders the same rows as `KptMenu` — icons, descriptions, badges, separators, headers and
34
+ The panel renders the same rows as `KptMenu` - icons, descriptions, badges, separators, headers and
35
35
  the `danger` modifier all behave identically, only the BEM block differs.
36
36
 
37
37
  ## i18n
@@ -39,9 +39,9 @@ The toggle's label comes from `splitButton.more` in the dictionary.
39
39
 
40
40
  ## Keyboard
41
41
  The toggle is a menu button: `aria-haspopup="menu"`, a live `aria-expanded`, `aria-controls` while
42
- open. `↓` / `↑` on it open the menu on the first / last item; inside, `↓` / `↑` wrap, `Home` / `End`
42
+ open. `ArrowDown` / `ArrowUp` on it open the menu on the first / last item; inside, `ArrowDown` / `ArrowUp` wrap, `Home` / `End`
43
43
  jump, `Escape` / `Tab` close, and closing or picking returns focus to the toggle. Same rules as the
44
- menu — see the `KptMenu` docs.
44
+ menu - see the `KptMenu` docs.
45
45
 
46
46
  ## Examples
47
47
  <KptSplitButton items={items} onPrimaryClick={save} onSelect={onItem}>Save</KptSplitButton>
@@ -53,6 +53,12 @@ menu — see the `KptMenu` docs.
53
53
  { label: 'Discard', value: 'discard', danger: true },
54
54
  ];
55
55
 
56
+ ## Motion
57
+ Pressing either part squeezes the whole pill (one part alone would come apart from the other inside
58
+ the clipped container); the arrow turns over when the menu opens and the menu slides out from under the
59
+ button. Pure CSS; durations follow `--kpt-motion-scale`, so `enabled: false` turns it off, and it drops out
60
+ under "reduce motion".
61
+
56
62
  ## Tokens
57
63
  The `--kpt-button-*` tokens of the chosen variant, plus `--kpt-color-surface-raised` and
58
64
  `--kpt-elevation-3` for the panel.
@@ -2,7 +2,7 @@ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
3
3
  import type { KptMenuItem } from '../menu/menu-item.ts';
4
4
  import type { KptButtonVariant } from '../button/button.tsx';
5
- /** Warianty, które mają styl — podzbiór `KptButtonVariant`. */
5
+ /** Warianty, które mają styl - podzbiór `KptButtonVariant`. */
6
6
  export type KptSplitButtonVariant = Extract<KptButtonVariant, 'filled' | 'tonal' | 'outline' | 'text'>;
7
7
  export interface KptSplitButtonProps<T> extends Omit<ComponentPropsWithRef<'span'>, 'onSelect'>, KptI18nOverrides {
8
8
  variant?: KptSplitButtonVariant;
@@ -19,7 +19,7 @@ export interface KptSplitButtonProps<T> extends Omit<ComponentPropsWithRef<'span
19
19
  children?: ReactNode;
20
20
  }
21
21
  /**
22
- * Przycisk dzielony — akcja główna plus rozwijane menu dodatkowych akcji.
22
+ * Przycisk dzielony - akcja główna plus rozwijane menu dodatkowych akcji.
23
23
  *
24
24
  * Panel wyrównuje się do PRAWEJ krawędzi przycisku, nie do lewej: rozwijacz siedzi po prawej
25
25
  * stronie kontrolki, więc menu otwierające się w lewo nie wychodzi poza nią.
@@ -10,7 +10,7 @@ import { KptIcon } from "../icon/icon.js";
10
10
  import { MenuRows } from "../menu/menu-rows.js";
11
11
  import { focusMenuEdge, handleMenuKeydown } from "../menu/menu-keys.js";
12
12
  /**
13
- * Przycisk dzielony — akcja główna plus rozwijane menu dodatkowych akcji.
13
+ * Przycisk dzielony - akcja główna plus rozwijane menu dodatkowych akcji.
14
14
  *
15
15
  * Panel wyrównuje się do PRAWEJ krawędzi przycisku, nie do lewej: rozwijacz siedzi po prawej
16
16
  * stronie kontrolki, więc menu otwierające się w lewo nie wychodzi poza nią.
@@ -21,14 +21,14 @@ import { focusMenuEdge, handleMenuKeydown } from "../menu/menu-keys.js";
21
21
  export function KptSplitButton({ variant = 'filled', items = [], disabled = false, onPrimaryClick, onSelect, open, defaultOpen = false, onOpenChange, locale, dictionary, className, children, ...rest }) {
22
22
  const { t } = useKptMessages({ locale, dictionary });
23
23
  const toggleRef = useRef(null);
24
- /** Kotwica panelu — w stanie, bo czyta ją render; ref zostaje dla przywracania fokusu. */
24
+ /** Kotwica panelu - w stanie, bo czyta ją render; ref zostaje dla przywracania fokusu. */
25
25
  const [toggleEl, setToggleEl] = useState(null);
26
26
  const setToggle = useCallback((element) => {
27
27
  toggleRef.current = element;
28
28
  setToggleEl(element);
29
29
  }, []);
30
30
  const panelRef = useRef(null);
31
- /** Którą pozycję skupić po otwarciu — strzałka w górę na przycisku otwiera „od końca”. */
31
+ /** Którą pozycję skupić po otwarciu - strzałka w górę na przycisku otwiera "od końca". */
32
32
  const focusEdge = useRef('first');
33
33
  const panelId = useKptId(undefined, 'kpt-split-button-menu');
34
34
  const [isOpen, setOpen] = useControllableState({
@@ -48,7 +48,7 @@ export function KptSplitButton({ variant = 'filled', items = [], disabled = fals
48
48
  });
49
49
  return () => cancelAnimationFrame(frame);
50
50
  }, [isOpen]);
51
- /** Fokus wraca na strzałkę — inaczej po zniknięciu panelu spadłby na `<body>`. */
51
+ /** Fokus wraca na strzałkę - inaczej po zniknięciu panelu spadłby na `<body>`. */
52
52
  const closeAndRestoreFocus = () => {
53
53
  close();
54
54
  toggleRef.current?.focus();
@@ -6,22 +6,22 @@ Import: `import { KptSplitter } from '@konce-pt/react';`
6
6
  ## DOM
7
7
  <div class="kpt-splitter-host">
8
8
  <div class="kpt-splitter" data-orientation="horizontal">
9
- <div class="kpt-splitter__pane" id="kpt-splitter-start-r1" style="flex-basis:40%">…</div>
9
+ <div class="kpt-splitter__pane" id="kpt-splitter-start-r1" style="flex-basis:40%">...</div>
10
10
  <div class="kpt-splitter__gutter" role="separator" tabindex="0" aria-orientation="vertical"
11
11
  aria-valuenow="40" aria-valuemin="10" aria-valuemax="90"
12
12
  aria-controls="kpt-splitter-start-r1" aria-label="Resize panes"></div>
13
- <div class="kpt-splitter__pane" style="flex-basis:60%">…</div>
13
+ <div class="kpt-splitter__pane" style="flex-basis:60%">...</div>
14
14
  </div>
15
15
  </div>
16
16
 
17
17
  ## Props
18
18
  - `orientation`: `'horizontal'` (default) | `'vertical'`
19
- - `startSize` / `defaultStartSize` / `onStartSizeChange` — the first pane's size in percent
20
- - `minSize`: number (percent, default 10) — neither pane goes below it
21
- - `ariaLabel`: string — the handle's name; empty = `splitter.resize` from the dictionary
22
- - `ariaLabel`: string — the handle's name; empty = `splitter.resize` from the dictionary
23
- - `ariaLabel`: string — the handle's name; empty = `splitter.resize` from the dictionary
24
- - `ariaLabel`: string — the handle's name; empty = `splitter.resize` from the dictionary
19
+ - `startSize` / `defaultStartSize` / `onStartSizeChange` - the first pane's size in percent
20
+ - `minSize`: number (percent, default 10) - neither pane goes below it
21
+ - `ariaLabel`: string - the handle's name; empty = `splitter.resize` from the dictionary
22
+ - `ariaLabel`: string - the handle's name; empty = `splitter.resize` from the dictionary
23
+ - `ariaLabel`: string - the handle's name; empty = `splitter.resize` from the dictionary
24
+ - `ariaLabel`: string - the handle's name; empty = `splitter.resize` from the dictionary
25
25
  - `className`, `ref` and every other `<div>` prop go to the host
26
26
 
27
27
  ## Panes
@@ -39,16 +39,16 @@ pointer outruns a 6px strip, and a handle-bound listener would drop the drag aft
39
39
  <KptSplitter.End>Right</KptSplitter.End>
40
40
  </KptSplitter>
41
41
 
42
- <KptSplitter orientation="vertical" defaultStartSize={30} minSize={20}>…</KptSplitter>
42
+ <KptSplitter orientation="vertical" defaultStartSize={30} minSize={20}>...</KptSplitter>
43
43
 
44
44
  ## Tokens
45
- The handle `--kpt-color-border` → `--kpt-color-primary` on hover and focus; the frame
45
+ The handle `--kpt-color-border` -> `--kpt-color-primary` on hover and focus; the frame
46
46
  `--kpt-color-border` with `--kpt-radius-md`.
47
47
 
48
48
  ## Accessibility
49
49
  The handle is a focusable `role="separator"` (the WAI-ARIA window splitter): `aria-valuenow`,
50
50
  `aria-valuemin`/`aria-valuemax` (from `minSize`), `aria-controls` pointing at the first pane, and a
51
51
  name from `ariaLabel` or `splitter.resize` in the dictionary. Arrow keys resize by 2%, `Home`/`End`
52
- jump to the minimum/maximum. `aria-orientation` describes the handle's line, not the layout —
52
+ jump to the minimum/maximum. `aria-orientation` describes the handle's line, not the layout -
53
53
  side-by-side panes have a vertical handle. The host takes `height: 100%`, so a height set on the
54
54
  parent reaches the panes.
@@ -15,7 +15,7 @@ export declare namespace KptSplitterEnd {
15
15
  }
16
16
  export interface KptSplitterProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange'>, KptI18nOverrides {
17
17
  orientation?: KptSplitterOrientation;
18
- /** Rozmiar pierwszego panelu w procentach (0–100). */
18
+ /** Rozmiar pierwszego panelu w procentach (0-100). */
19
19
  startSize?: number;
20
20
  defaultStartSize?: number;
21
21
  onStartSizeChange?: (size: number) => void;
@@ -29,9 +29,9 @@ export interface KptSplitterProps extends Omit<ComponentPropsWithRef<'div'>, 'on
29
29
  * Dwa panele z przeciąganym uchwytem. `horizontal` stawia je obok siebie, `vertical` jeden pod
30
30
  * drugim.
31
31
  *
32
- * Uchwyt to `role="separator"` z wartością (wzorzec WAI-ARIA „window splitter”): strzałki
32
+ * Uchwyt to `role="separator"` z wartością (wzorzec WAI-ARIA "window splitter"): strzałki
33
33
  * przesuwają go o 2%, `Home`/`End` dosuwają do minimum i maksimum. `aria-orientation` opisuje
34
- * linię uchwytu, nie układ — przy panelach obok siebie linia jest pionowa.
34
+ * linię uchwytu, nie układ - przy panelach obok siebie linia jest pionowa.
35
35
  *
36
36
  * @example
37
37
  * <KptSplitter startSize={size} onStartSizeChange={setSize}>
@@ -21,9 +21,9 @@ KptSplitterEnd.kptSplitterSlot = 'end';
21
21
  * Dwa panele z przeciąganym uchwytem. `horizontal` stawia je obok siebie, `vertical` jeden pod
22
22
  * drugim.
23
23
  *
24
- * Uchwyt to `role="separator"` z wartością (wzorzec WAI-ARIA „window splitter”): strzałki
24
+ * Uchwyt to `role="separator"` z wartością (wzorzec WAI-ARIA "window splitter"): strzałki
25
25
  * przesuwają go o 2%, `Home`/`End` dosuwają do minimum i maksimum. `aria-orientation` opisuje
26
- * linię uchwytu, nie układ — przy panelach obok siebie linia jest pionowa.
26
+ * linię uchwytu, nie układ - przy panelach obok siebie linia jest pionowa.
27
27
  *
28
28
  * @example
29
29
  * <KptSplitter startSize={size} onStartSizeChange={setSize}>
@@ -62,7 +62,7 @@ export function KptSplitter({ orientation = 'horizontal', startSize, defaultStar
62
62
  return;
63
63
  // Nasłuch na oknie, nie na uchwycie: przy szybkim ruchu kursor wyprzedza wąski pasek
64
64
  // i bez tego przeciąganie urywałoby się po kilku pikselach.
65
- // W RTL panel „start” stoi po prawej (flex idzie za kierunkiem pisma), więc mierzymy od prawej.
65
+ // W RTL panel "start" stoi po prawej (flex idzie za kierunkiem pisma), więc mierzymy od prawej.
66
66
  const rtl = getComputedStyle(container).direction === 'rtl';
67
67
  const move = (e) => {
68
68
  const rect = container.getBoundingClientRect();
@@ -70,7 +70,7 @@ export function KptSplitter({ orientation = 'horizontal', startSize, defaultStar
70
70
  ? ((rtl ? rect.right - e.clientX : e.clientX - rect.left) / rect.width) * 100
71
71
  : ((e.clientY - rect.top) / rect.height) * 100));
72
72
  };
73
- // `pointercancel`: dotyk przerwany przez system nie wysyła `pointerup` — bez sprzątania
73
+ // `pointercancel`: dotyk przerwany przez system nie wysyła `pointerup` - bez sprzątania
74
74
  // `pointermove` dalej przesuwałby uchwyt.
75
75
  const up = () => {
76
76
  window.removeEventListener('pointermove', move);
@@ -95,7 +95,7 @@ export function KptSplitter({ orientation = 'horizontal', startSize, defaultStar
95
95
  if (!dir)
96
96
  return;
97
97
  event.preventDefault();
98
- // W RTL ← przesuwa uchwyt w lewo, czyli powiększa prawy panel „start” — odwrotnie niż w LTR.
98
+ // W RTL <- przesuwa uchwyt w lewo, czyli powiększa prawy panel "start" - odwrotnie niż w LTR.
99
99
  const horizontal = event.key === 'ArrowLeft' || event.key === 'ArrowRight';
100
100
  const rtl = horizontal && getComputedStyle(event.currentTarget).direction === 'rtl';
101
101
  setSize(clamp(size + (rtl ? -dir : dir)));
@@ -1,38 +1,42 @@
1
1
  # KptStepper + KptStep (@konce-pt/react)
2
2
 
3
- A step wizard — a header of numbered steps plus the active step's content.
3
+ A step wizard - a header of numbered steps plus the active step's content.
4
4
  Import: `import { KptStepper, useKptStepper } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <div class="kpt-stepper-host" style="--kpt-anim-duration:500ms; --kpt-anim-dir:1">
8
8
  <ol class="kpt-stepper__header">
9
9
  <li class="kpt-stepper__step is-done">
10
- <button class="kpt-stepper__marker" aria-label="Step 1: Account, completed">✓</button>
10
+ <button class="kpt-stepper__marker" aria-label="Step 1: Account, completed">
11
+ <span class="kpt-stepper__num">1</span><span class="kpt-icon-host kpt-stepper__check"><!-- check --></span>
12
+ </button>
11
13
  <span class="kpt-stepper__label" aria-hidden="true">Account</span>
12
- <span class="kpt-stepper__connector"></span>
14
+ <span class="kpt-stepper__connector" style="--kpt-stepper-line-delay:60ms; --kpt-stepper-line-dur:420ms"></span>
13
15
  </li>
14
- …
16
+ ...
15
17
  </ol>
16
- <div class="kpt-stepper__body"><div class="kpt-stepper__panel">…</div></div>
18
+ <span class="kpt-stepper__comet" aria-hidden="true"></span>
19
+ <div class="kpt-stepper__body"><div class="kpt-stepper__panel">...</div></div>
17
20
  </div>
18
21
 
19
22
  ## KptStepper props
20
23
  - `activeIndex` / `defaultActiveIndex` / `onActiveIndexChange`
21
- - `animated`: boolean (default true), `animationDuration`: ms (default 500)
24
+ - `animated`: boolean (default true), `animationDuration`: ms (default 500) - the pace of the whole motion:
25
+ the content enter, and the line (a segment takes 0.84x, a multi-step jump fits in 1.8x)
22
26
  - `className`, `ref` and every other `<div>` prop go to the host
23
27
 
24
28
  ## KptStepper.Step props
25
- - `label`: string (required); `children` — the step's content
29
+ - `label`: string (required); `children` - the step's content
26
30
 
27
31
  ## useKptStepper()
28
- `{ activeIndex, count, next, prev, goTo }` — the replacement for Angular's `#s` + `s.next()`.
32
+ `{ activeIndex, count, next, prev, goTo }` - the replacement for Angular's `#s` + `s.next()`.
29
33
  It reads a context the stepper provides around the panel, so it works only in a component
30
34
  rendered inside a step (a hook cannot be called in the parent's body) and throws elsewhere.
31
35
  `count` lets a step hide "Next" on the last one.
32
36
 
33
37
  ## The step is a config carrier
34
38
  `KptStep` renders `null`; `KptStepper` reads its props and decides what to show, so only the
35
- active step's content is ever mounted — the same laziness as the `kpt-step` template in Angular.
39
+ active step's content is ever mounted - the same laziness as the `kpt-step` template in Angular.
36
40
 
37
41
  ## The panel is keyed by index
38
42
  `key={active}` forces a remount on every change, otherwise the enter animation would have nothing
@@ -42,7 +46,7 @@ an earlier step animates from the other side.
42
46
  ## Examples
43
47
  <KptStepper>
44
48
  <KptStepper.Step label="Account"><StepNav /></KptStepper.Step>
45
- <KptStepper.Step label="Profile">…</KptStepper.Step>
49
+ <KptStepper.Step label="Profile">...</KptStepper.Step>
46
50
  </KptStepper>
47
51
 
48
52
  function StepNav() {
@@ -55,17 +59,32 @@ an earlier step animates from the other side.
55
59
  );
56
60
  }
57
61
 
62
+ ## Motion
63
+ Switching steps reads as colour flowing: the state changes at once (classes, `aria-current`,
64
+ the marker names), but the connector fills from grey to `--kpt-color-primary` with a glowing comet
65
+ running along it, and a marker turns "done" (fills from the centre, the check pops in) only when the
66
+ colour reaches it; the new active step sends out a ring and keeps a soft glow. A jump over several
67
+ steps runs the segments one after another within ~0.9 s; going back retracts them from the end.
68
+ The content of the new step slides in from the side of the move and sharpens out of a blur, the old
69
+ one leaves as a ghost the other way, and the body height changes smoothly.
70
+
71
+ The timings come from `stepperSchedule` in `@konce-pt/motion` (CSS variables
72
+ `--kpt-stepper-mark-delay`, `--kpt-stepper-line-delay`, `--kpt-stepper-line-dur` on the steps), the comet
73
+ and the ring from `playStepperLight`, the ghost from `preparePanelSwap`. Follows `animated` and `enter`
74
+ from `KptMotionProvider` (`none` - everything switches at once, `fade` - no comet and ring); `enabled: false` and the
75
+ system "reduce motion" setting always win.
76
+
58
77
  ## Tokens
59
78
  The active and completed step: `--kpt-color-primary` (marker, connector); the rest
60
79
  `--kpt-color-border-strong` and `--kpt-color-on-surface-muted`.
61
80
 
62
81
  ## Accessibility
63
82
  The header is an `<ol>` of real buttons, so every step is reachable with the keyboard and the list
64
- announces how many there are. Each marker is named from the dictionary — `stepper.step`
65
- (“Step 2: Delivery”) or `stepper.stepDone` (“…, completed”) — because the visible marker is only a
83
+ announces how many there are. Each marker is named from the dictionary - `stepper.step`
84
+ ("Step 2: Delivery") or `stepper.stepDone` ("..., completed") - because the visible marker is only a
66
85
  number or a check; the visible label is `aria-hidden` so it is not read twice. The active marker
67
- carries `aria-current="step"`. After `next()` focus stays where it was — move it into the new step
86
+ carries `aria-current="step"`. After `next()` focus stays where it was - move it into the new step
68
87
  yourself when the step is long.
69
88
 
70
89
  ## Inactive content is destroyed
71
- Switching renders the new panel from scratch (that is what the enter animation starts from), so local state inside the previous one — an unsent file upload, expanded sections, scroll position — is lost. Keep such state in your own model, outside the panel.
90
+ Switching renders the new panel from scratch (that is what the enter animation starts from), so local state inside the previous one - an unsent file upload, expanded sections, scroll position - is lost. Keep such state in your own model, outside the panel.
@@ -2,14 +2,14 @@ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
2
  import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
3
3
  export interface KptStepperContextValue {
4
4
  activeIndex: number;
5
- /** Liczba kroków — pozwala treści kroku ukryć „Dalej" na ostatnim. */
5
+ /** Liczba kroków - pozwala treści kroku ukryć "Dalej" na ostatnim. */
6
6
  count: number;
7
7
  next: () => void;
8
8
  prev: () => void;
9
9
  goTo: (index: number) => void;
10
10
  }
11
11
  /**
12
- * Sterowanie kreatorem z wnętrza kroku — odpowiednik `#s` + `s.next()` z portu Angulara.
12
+ * Sterowanie kreatorem z wnętrza kroku - odpowiednik `#s` + `s.next()` z portu Angulara.
13
13
  * Poza `<KptStepper>` rzuca błąd, bo bez kreatora nie ma czym sterować.
14
14
  *
15
15
  * @example
@@ -21,7 +21,7 @@ export interface KptStepProps {
21
21
  children?: ReactNode;
22
22
  }
23
23
  /**
24
- * Pojedynczy krok. Umieszczaj w `<KptStepper>`. Treść renderuje się leniwie — dopiero gdy krok
24
+ * Pojedynczy krok. Umieszczaj w `<KptStepper>`. Treść renderuje się leniwie - dopiero gdy krok
25
25
  * jest aktywny, tak samo jak szablon `kpt-step` w porcie Angulara.
26
26
  */
27
27
  export declare function KptStep(_props: Readonly<KptStepProps>): ReactNode;
@@ -37,13 +37,13 @@ export interface KptStepperProps extends Omit<ComponentPropsWithRef<'div'>, 'onC
37
37
  children?: ReactNode;
38
38
  }
39
39
  /**
40
- * Kreator kroków — nagłówek z numerowanymi krokami i treść aktywnego kroku.
40
+ * Kreator kroków - nagłówek z numerowanymi krokami i treść aktywnego kroku.
41
41
  * Treścią sterują `next()`/`prev()`/`goTo()` z hooka `useKptStepper()`.
42
42
  *
43
43
  * @example
44
44
  * <KptStepper>
45
- * <KptStepper.Step label="Konto">…</KptStepper.Step>
46
- * <KptStepper.Step label="Profil">…</KptStepper.Step>
45
+ * <KptStepper.Step label="Konto">...</KptStepper.Step>
46
+ * <KptStepper.Step label="Profil">...</KptStepper.Step>
47
47
  * </KptStepper>
48
48
  */
49
49
  export declare function KptStepper({ activeIndex, defaultActiveIndex, onActiveIndexChange, animated, animationDuration, locale, dictionary, className, style, children, ...rest }: Readonly<KptStepperProps>): import("react").JSX.Element;