@konce-pt/react 0.12.0 → 0.15.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 +12 -7
  111. package/dist/dialog/dialog.js +4 -4
  112. package/dist/dialog/llms.txt +14 -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,6 +1,6 @@
1
1
  /*
2
- * Sanityzacja treści edytora. Kod nie zna frameworka — operuje wyłącznie na DOM. Bliźniak
3
- * w porcie Angulara: `rich-text/sanitize.ts` — zmiana w obu (docelowo wspólna paczka pure-TS).
2
+ * Sanityzacja treści edytora. Kod nie zna frameworka - operuje wyłącznie na DOM. Bliźniak
3
+ * w porcie Angulara: `rich-text/sanitize.ts` - zmiana w obu (docelowo wspólna paczka pure-TS).
4
4
  */
5
5
  /** Znaczniki dopuszczone w treści; pozostałe rozwijamy do dzieci, nie usuwając tekstu. */
6
6
  const ALLOWED_TAGS = new Set([
@@ -15,7 +15,7 @@ const ALLOWED_STYLES = new Set([
15
15
  /*
16
16
  * `data-mention` i `contenteditable` są tu dla wzmianek: identyfikator musi przeżyć zapis treści,
17
17
  * a `contenteditable="false"` trzyma wzmiankę jako jeden kawałek, w którego środku nie da się
18
- * pisać. Oba atrybuty są bierne — nie wykonują niczego i nie wskazują zasobów, więc wpuszczenie
18
+ * pisać. Oba atrybuty są bierne - nie wykonują niczego i nie wskazują zasobów, więc wpuszczenie
19
19
  * ich nie otwiera nowej furtki. `class` przechodzi osobno, tylko z klasami samego edytora.
20
20
  */
21
21
  const ALLOWED_ATTRS = new Set([
@@ -23,12 +23,12 @@ const ALLOWED_ATTRS = new Set([
23
23
  'data-mention', 'contenteditable',
24
24
  ]);
25
25
  /**
26
- * Klasy, które zostawia sam edytor (`kpt-rt-table`, `kpt-mention`). Obce klasy z wklejki — aplikacji,
27
- * biblioteki (`kpt-dialog`, `kpt-visually-hidden`) czy Tailwinda — przejęłyby ich wygląd tam,
26
+ * Klasy, które zostawia sam edytor (`kpt-rt-table`, `kpt-mention`). Obce klasy z wklejki - aplikacji,
27
+ * biblioteki (`kpt-dialog`, `kpt-visually-hidden`) czy Tailwinda - przejęłyby ich wygląd tam,
28
28
  * gdzie aplikacja wyświetla treść.
29
29
  */
30
30
  const EDITOR_CLASS = /^kpt-(rt-[a-z0-9-]+|mention)$/;
31
- // Schematy dopuszczone w `href` — ta sama allowlista dla narzędzia „link” i dla wklejonego HTML.
31
+ // Schematy dopuszczone w `href` - ta sama allowlista dla narzędzia "link" i dla wklejonego HTML.
32
32
  const SAFE_URL_SCHEME = /^(https?:|mailto:|tel:)/i;
33
33
  const HAS_URL_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
34
34
  /** Znaki sterujące, które przeglądarka pomija przy parsowaniu URL-a (`jav\tascript:`). */
@@ -63,7 +63,7 @@ function sanitizeAttribute(el, attr, report) {
63
63
  if (kept === null)
64
64
  remove();
65
65
  else if (kept.split('; ').length !== declared) {
66
- // Zmiana tylko wtedy, gdy wypadła deklaracja — samo przeformatowanie zapisu się nie liczy.
66
+ // Zmiana tylko wtedy, gdy wypadła deklaracja - samo przeformatowanie zapisu się nie liczy.
67
67
  el.setAttribute('style', kept);
68
68
  report.changed = true;
69
69
  }
@@ -79,11 +79,11 @@ function sanitizeAttribute(el, attr, report) {
79
79
  }
80
80
  }
81
81
  else if (!ALLOWED_ATTRS.has(name)) {
82
- // Także `on*` i `src` — żaden dopuszczony znacznik nie ładuje zasobów.
82
+ // Także `on*` i `src` - żaden dopuszczony znacznik nie ładuje zasobów.
83
83
  remove();
84
84
  }
85
85
  }
86
- /** Link otwierany w nowej karcie dostaje `noopener noreferrer` — bez tego karta sięga do `opener`. */
86
+ /** Link otwierany w nowej karcie dostaje `noopener noreferrer` - bez tego karta sięga do `opener`. */
87
87
  function secureTarget(el, report) {
88
88
  if (el.tagName !== 'A' || !el.hasAttribute('target'))
89
89
  return;
@@ -107,7 +107,7 @@ function sanitizeElement(el, report) {
107
107
  secureTarget(el, report);
108
108
  }
109
109
  /**
110
- * Czyści HTML i mówi, czy coś usunął. `changed: false` znaczy, że treść była czysta — wtedy
110
+ * Czyści HTML i mówi, czy coś usunął. `changed: false` znaczy, że treść była czysta - wtedy
111
111
  * wołający nie musi nadpisywać wartości modelu (serializacja DOM potrafi zmienić zapis, np.
112
112
  * cudzysłowy, bez zmiany treści, a taka różnica nie może brudzić formularza).
113
113
  */
@@ -127,8 +127,8 @@ export function sanitizeHtml(html) {
127
127
  return sanitizeHtmlReport(html).html;
128
128
  }
129
129
  /**
130
- * Waliduje URL z narzędzia „link". Brak schematu → dopisujemy `https://`; `#` i `/` przechodzą
131
- * bez zmian; schemat spoza allowlisty → `null`, czyli link nie zostaje wstawiony.
130
+ * Waliduje URL z narzędzia "link". Brak schematu -> dopisujemy `https://`; `#` i `/` przechodzą
131
+ * bez zmian; schemat spoza allowlisty -> `null`, czyli link nie zostaje wstawiony.
132
132
  */
133
133
  export function sanitizeUrl(url) {
134
134
  const trimmed = url.trim().replace(URL_CONTROL, '');
@@ -14,7 +14,7 @@ export interface Bounds {
14
14
  }
15
15
  /** Klasa znacząca komórki objęte zaznaczeniem prostokątnym. */
16
16
  export declare const CELL_SELECTED = "kpt-rt-cell-sel";
17
- /** Macierz komórek: pozycja w siatce, a nie w DOM — scalona komórka zajmuje kilka pól. */
17
+ /** Macierz komórek: pozycja w siatce, a nie w DOM - scalona komórka zajmuje kilka pól. */
18
18
  export declare function buildGrid(table: HTMLTableElement): {
19
19
  grid: HTMLTableCellElement[][];
20
20
  pos: GridPos;
@@ -23,7 +23,7 @@ export declare function buildGrid(table: HTMLTableElement): {
23
23
  export declare function cellsInRegion(grid: HTMLTableCellElement[][], b: Bounds): Set<HTMLTableCellElement>;
24
24
  /**
25
25
  * Prostokątne zaznaczenie od komórki-kotwicy do komórki pod kursorem. Granice rosną, aż region
26
- * w pełni obejmie scalone komórki na brzegach — inaczej scalanie działałoby na pół komórki.
26
+ * w pełni obejmie scalone komórki na brzegach - inaczej scalanie działałoby na pół komórki.
27
27
  */
28
28
  export declare function regionBetween(anchor: HTMLTableCellElement, focus: HTMLTableCellElement): Set<HTMLTableCellElement>;
29
29
  /** Równe szerokości kolumn po wstawieniu albo usunięciu kolumny. */
@@ -34,7 +34,7 @@ export declare function insertColumn(cell: HTMLTableCellElement, dir: 'left' | '
34
34
  export declare function deleteColumn(cell: HTMLTableCellElement): void;
35
35
  export declare function insertRow(cell: HTMLTableCellElement, dir: 'above' | 'below'): void;
36
36
  export declare function deleteRow(cell: HTMLTableCellElement): void;
37
- /** Podmienia znacznik komórki `td` ↔ `th`, zachowując atrybuty i treść. */
37
+ /** Podmienia znacznik komórki `td` <-> `th`, zachowując atrybuty i treść. */
38
38
  export declare function swapCellTag(cell: HTMLTableCellElement, tag: 'td' | 'th'): void;
39
39
  export declare function toggleHeaderRow(cell: HTMLTableCellElement): void;
40
40
  export declare function toggleHeaderColumn(cell: HTMLTableCellElement): void;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /** Klasa znacząca komórki objęte zaznaczeniem prostokątnym. */
6
6
  export const CELL_SELECTED = 'kpt-rt-cell-sel';
7
- /** Macierz komórek: pozycja w siatce, a nie w DOM — scalona komórka zajmuje kilka pól. */
7
+ /** Macierz komórek: pozycja w siatce, a nie w DOM - scalona komórka zajmuje kilka pól. */
8
8
  export function buildGrid(table) {
9
9
  const grid = [];
10
10
  const pos = new Map();
@@ -65,7 +65,7 @@ function growBounds(grid, pos, b) {
65
65
  }
66
66
  /**
67
67
  * Prostokątne zaznaczenie od komórki-kotwicy do komórki pod kursorem. Granice rosną, aż region
68
- * w pełni obejmie scalone komórki na brzegach — inaczej scalanie działałoby na pół komórki.
68
+ * w pełni obejmie scalone komórki na brzegach - inaczej scalanie działałoby na pół komórki.
69
69
  */
70
70
  export function regionBetween(anchor, focus) {
71
71
  const table = anchor.closest('table');
@@ -153,7 +153,7 @@ export function deleteRow(cell) {
153
153
  }
154
154
  tr.remove();
155
155
  }
156
- /** Podmienia znacznik komórki `td` ↔ `th`, zachowując atrybuty i treść. */
156
+ /** Podmienia znacznik komórki `td` <-> `th`, zachowując atrybuty i treść. */
157
157
  export function swapCellTag(cell, tag) {
158
158
  if (cell.tagName.toLowerCase() === tag)
159
159
  return;
@@ -9,40 +9,40 @@ A separate subpath, because the geometry, the styles and the data model are heav
9
9
  library core and not every app needs them.
10
10
 
11
11
  ## Props
12
- - `config`: `KptRoadmapConfig` (required) — the data and every option
13
- - `scrollHeight`: string | null — a fixed height, e.g. '420px'; enables the sticky header
14
- - `labelWidth`: string — the width of the label column (default '14rem')
15
- - `cellWidthPx`: number | null — the width of an axis column; without it the value depends on the zoom
16
- - `showToday`: boolean — the "today" marker (default true)
17
- - `virtual`: boolean — renders only the visible rows; worth it from roughly 100 rows up
18
- - `collapsedGroups` / `defaultCollapsedGroups` / `onCollapsedGroupsChange` — the ids of collapsed
12
+ - `config`: `KptRoadmapConfig` (required) - the data and every option
13
+ - `scrollHeight`: string | null - a fixed height, e.g. '420px'; enables the sticky header
14
+ - `labelWidth`: string - the width of the label column (default '14rem')
15
+ - `cellWidthPx`: number | null - the width of an axis column; without it the value depends on the zoom
16
+ - `showToday`: boolean - the "today" marker (default true)
17
+ - `virtual`: boolean - renders only the visible rows; worth it from roughly 100 rows up
18
+ - `collapsedGroups` / `defaultCollapsedGroups` / `onCollapsedGroupsChange` - the ids of collapsed
19
19
  groups, controlled or uncontrolled
20
- - `onItemClick(item)`, `onRangeChange(range)` — the click on a bar and the computed axis range
20
+ - `onItemClick(item)`, `onRangeChange(range)` - the click on a bar and the computed axis range
21
21
  - `className`, `ref` and every other `<div>` prop go to the host
22
- - `locale`, `dictionary` — the per-component i18n overrides
22
+ - `locale`, `dictionary` - the per-component i18n overrides
23
23
 
24
24
  ## The config is the API
25
25
  `{ items, groups?, links?, zoom?, range?, locale?, today?, timeline?, rows?, dependencies?,
26
- interaction? }` — the same shape the Angular port takes, because both read it from
26
+ interaction? }` - the same shape the Angular port takes, because both read it from
27
27
  `@konce-pt/roadmap`. An item is `{ id, label, start, end?, sublabel?, variant?, color?, progress?,
28
28
  groupId?, dependsOn?, milestone?, meta? }`; no `end` means a milestone diamond, and a bare string in
29
29
  `dependsOn` is an 'FS' dependency.
30
30
 
31
31
  ## The geometry lives in a package
32
32
  The calendar arithmetic, the timeline bands and cells, the row layout, lane packing and the
33
- dependency polylines come from `@konce-pt/roadmap` — pure functions with `node --test` coverage,
33
+ dependency polylines come from `@konce-pt/roadmap` - pure functions with `node --test` coverage,
34
34
  shared with the Angular port. The component only turns them into DOM and SVG.
35
35
 
36
36
  ## Collapsing has two sources
37
37
  `group.collapsed` in the data and the `collapsedGroups` prop are kept apart, so an app that controls
38
38
  the state keeps control while a group collapsed declaratively still works. Expanding removes the
39
- group from both — otherwise `group.collapsed` would immediately collapse it again. The declarative
39
+ group from both - otherwise `group.collapsed` would immediately collapse it again. The declarative
40
40
  set is recomputed during render whenever the `groups` array identity changes; an effect would do it
41
41
  one render too late, that is after the group flashed open.
42
42
 
43
43
  ## Measuring, not guessing
44
44
  The SVG dependency layer works in pixels, so the lane width and the scroll viewport are measured
45
- with a `ResizeObserver` in a layout effect. Before the first measurement no link is drawn — half a
45
+ with a `ResizeObserver` in a layout effect. Before the first measurement no link is drawn - half a
46
46
  frame without arrows beats arrows in the wrong place.
47
47
 
48
48
  ## Examples
@@ -63,7 +63,7 @@ frame without arrows beats arrows in the wrong place.
63
63
  different lengths; inside a column the position is interpolated linearly.
64
64
  - An item extending past the axis range is cut off on the side where it is clipped.
65
65
  - Tooltips use `KptTooltip`, mostly with `onlyWhenTruncated`: a tooltip shows what cannot be seen.
66
- Milestones and header cells carry one unconditionally — a diamond shows no text at all.
66
+ Milestones and header cells carry one unconditionally - a diamond shows no text at all.
67
67
  - Dependencies: 'FS' (the default), 'SS', 'FF', 'SF'; violated ones are drawn as a dashed line in
68
68
  the danger color.
69
69
  - Entries with an invalid date or a duplicate `id` are skipped, with a warning in a development build.
@@ -79,7 +79,7 @@ Sizes: `--kpt-roadmap-label-w`, `--kpt-roadmap-cell-w` (both can be overridden f
79
79
 
80
80
  ## Accessibility
81
81
  Bars and milestones are `role="button"` with an accessible name built from the label, sublabel, date range
82
- and progress (`Design, 3–14 Mar 2026, 40% complete`) — the end is exclusive, so the last occupied day is
82
+ and progress (`Design, 3-14 Mar 2026, 40% complete`) - the end is exclusive, so the last occupied day is
83
83
  announced. The whole bar grid is one Tab stop (roving tabindex): Left/Right move within a row, Up/Down go to
84
84
  the bar with the nearest start in the neighbouring row, Home/End jump to the row's edge, Ctrl+Home/End to the
85
85
  first/last bar; Enter and Space act like a click. With `virtual` on, moving to a row outside the window
@@ -8,15 +8,15 @@ export interface KptRoadmapProps<TItem = unknown, TGroup = unknown> extends Omit
8
8
  scrollHeight?: string | null;
9
9
  /** Szerokość kolumny etykiet. */
10
10
  labelWidth?: string;
11
- /** Szerokość kolumny osi czasu; brak ⇒ wartość zależna od zoomu. */
11
+ /** Szerokość kolumny osi czasu; brak => wartość zależna od zoomu. */
12
12
  cellWidthPx?: number | null;
13
- /** Znacznik „dziś". */
13
+ /** Znacznik "dziś". */
14
14
  showToday?: boolean;
15
15
  /** Renderowanie tylko widocznych wierszy. Warto włączyć od ~100 wierszy. */
16
16
  virtual?: boolean;
17
- /** Zwinięte grupy — tryb kontrolowany. */
17
+ /** Zwinięte grupy - tryb kontrolowany. */
18
18
  collapsedGroups?: string[];
19
- /** Zwinięte grupy na starcie — tryb niekontrolowany. */
19
+ /** Zwinięte grupy na starcie - tryb niekontrolowany. */
20
20
  defaultCollapsedGroups?: string[];
21
21
  onCollapsedGroupsChange?: (ids: string[]) => void;
22
22
  onItemClick?: (item: KptRoadmapItem<TItem>) => void;
@@ -24,11 +24,11 @@ export interface KptRoadmapProps<TItem = unknown, TGroup = unknown> extends Omit
24
24
  onRangeChange?: (range: KptTimeRange) => void;
25
25
  }
26
26
  /**
27
- * Roadmapa — wiersze zadań na poziomej osi czasu (widok typu Gantt).
27
+ * Roadmapa - wiersze zadań na poziomej osi czasu (widok typu Gantt).
28
28
  *
29
29
  * Układ opiera się na DOM i `position: sticky` (kolumna etykiet oraz nagłówek),
30
30
  * paski są pozycjonowane procentowo w torze, a zależności rysuje warstwa SVG
31
- * rozpięta nad torami. Cała geometria pochodzi z `@konce-pt/roadmap` — tej samej
31
+ * rozpięta nad torami. Cała geometria pochodzi z `@konce-pt/roadmap` - tej samej
32
32
  * paczki, z której korzysta port Angulara.
33
33
  *
34
34
  * @example
@@ -16,16 +16,16 @@ const CELL_WIDTH = {
16
16
  day: 44,
17
17
  hour: 46,
18
18
  };
19
- /** Wysokość paska w trybie „jeden item na wiersz" (px). */
19
+ /** Wysokość paska w trybie "jeden item na wiersz" (px). */
20
20
  const BAR_HEIGHT = 22;
21
- /** Odstęp między pasami w trybie „pack" (px). */
21
+ /** Odstęp między pasami w trybie "pack" (px). */
22
22
  const LANE_GAP = 4;
23
23
  /**
24
- * Roadmapa — wiersze zadań na poziomej osi czasu (widok typu Gantt).
24
+ * Roadmapa - wiersze zadań na poziomej osi czasu (widok typu Gantt).
25
25
  *
26
26
  * Układ opiera się na DOM i `position: sticky` (kolumna etykiet oraz nagłówek),
27
27
  * paski są pozycjonowane procentowo w torze, a zależności rysuje warstwa SVG
28
- * rozpięta nad torami. Cała geometria pochodzi z `@konce-pt/roadmap` — tej samej
28
+ * rozpięta nad torami. Cała geometria pochodzi z `@konce-pt/roadmap` - tej samej
29
29
  * paczki, z której korzysta port Angulara.
30
30
  *
31
31
  * @example
@@ -41,7 +41,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
41
41
  /**
42
42
  * Grupy zwinięte na starcie przez `group.collapsed`. Trzymamy je osobno od stanu aplikacji,
43
43
  * żeby sterowanie z zewnątrz pozostało w jej rękach, a zwinięcie zadeklarowane w danych
44
- * nadal działało. Wyliczamy w trakcie renderu i resetujemy, gdy zmieni się lista grup —
44
+ * nadal działało. Wyliczamy w trakcie renderu i resetujemy, gdy zmieni się lista grup -
45
45
  * efekt zrobiłby to samo o jeden render za późno, czyli po mignięciu rozwiniętej grupy.
46
46
  */
47
47
  const [fromConfig, setFromConfig] = useState(() => declaredCollapsed(config.groups));
@@ -50,13 +50,13 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
50
50
  setPrevGroups(config.groups);
51
51
  setFromConfig(declaredCollapsed(config.groups));
52
52
  }
53
- /** Suma obu źródeł — stan faktycznie użyty do budowy wierszy. */
53
+ /** Suma obu źródeł - stan faktycznie użyty do budowy wierszy. */
54
54
  const collapsedIds = useMemo(() => new Set([...fromConfig, ...collapsed]), [fromConfig, collapsed]);
55
55
  const scrollRef = useRef(null);
56
56
  const laneRef = useRef(null);
57
57
  const [scrollTop, setScrollTop] = useState(0);
58
58
  const [viewportHeight, setViewportHeight] = useState(0);
59
- /** Szerokość toru w px — potrzebna warstwie SVG, która pracuje w pikselach. */
59
+ /** Szerokość toru w px - potrzebna warstwie SVG, która pracuje w pikselach. */
60
60
  const [laneWidth, setLaneWidth] = useState(0);
61
61
  const zoom = config.zoom ?? 'week';
62
62
  const cellWidth = cellWidthPx ?? CELL_WIDTH[zoom];
@@ -71,7 +71,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
71
71
  const layout = useMemo(() => buildRows(config.items, config.groups, collapsedIds, config.rows), [config.items, config.groups, config.rows, collapsedIds]);
72
72
  const itemLocale = config.locale ?? config.timeline?.locale ?? locale;
73
73
  /**
74
- * Paski widoczne na osi, wiersz po wierszu — mapa dla nawigacji strzałkami. Liczona ze wszystkich
74
+ * Paski widoczne na osi, wiersz po wierszu - mapa dla nawigacji strzałkami. Liczona ze wszystkich
75
75
  * wierszy, nie z okna wirtualizacji: strzałka w dół z ostatniego wyrenderowanego wiersza ma dokąd iść.
76
76
  */
77
77
  const navGrid = useMemo(() => layout.rows.map((row) => row.kind === 'group'
@@ -83,7 +83,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
83
83
  /** Pasek, na którym ostatnio był fokus. */
84
84
  const [activeId, setActiveId] = useState(null);
85
85
  /**
86
- * Jedyny przystanek Tab w siatce pasków (roving tabindex) — ostatnio aktywny pasek, a gdy zniknął
86
+ * Jedyny przystanek Tab w siatce pasków (roving tabindex) - ostatnio aktywny pasek, a gdy zniknął
87
87
  * (zwinięta grupa, inne dane), pierwszy. Bez tego roadmapa ze stu zadaniami to sto przystanków Tab.
88
88
  */
89
89
  const tabStopId = useMemo(() => {
@@ -91,13 +91,13 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
91
91
  return activeId;
92
92
  return navGrid.find((row) => row.length > 0)?.[0].id ?? null;
93
93
  }, [navGrid, activeId]);
94
- /** Wiersze faktycznie renderowane — całość albo okno wirtualizacji. */
94
+ /** Wiersze faktycznie renderowane - całość albo okno wirtualizacji. */
95
95
  const visibleRows = useMemo(() => {
96
96
  if (!virtual || viewportHeight <= 0)
97
97
  return layout.rows;
98
98
  return sliceRows(layout, scrollTop, viewportHeight).rows;
99
99
  }, [virtual, viewportHeight, layout, scrollTop]);
100
- // Zakres jest wielkością wyliczaną — informujemy o nim po każdym przeliczeniu.
100
+ // Zakres jest wielkością wyliczaną - informujemy o nim po każdym przeliczeniu.
101
101
  useEffect(() => {
102
102
  onRangeChange?.(range);
103
103
  }, [range, onRangeChange]);
@@ -126,14 +126,14 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
126
126
  console.warn('[kpt-roadmap] Pominięto elementy:', invalid.map((entry) => `${entry.id} (${entry.reason})`).join(', '));
127
127
  }
128
128
  }, [layout]);
129
- /** Wysokość paska wraz z odstępem — wspólna dla widoku i geometrii zależności. */
129
+ /** Wysokość paska wraz z odstępem - wspólna dla widoku i geometrii zależności. */
130
130
  const laneStep = barHeight + LANE_GAP;
131
131
  /** Offset pionowy paska wewnątrz wiersza (px). */
132
132
  const barTop = useCallback((row, lane) => {
133
133
  const total = row.laneCount * barHeight + (row.laneCount - 1) * LANE_GAP;
134
134
  return Math.max(0, (row.height - total) / 2) + lane * laneStep;
135
135
  }, [barHeight, laneStep]);
136
- /** Nazwa dostępna paska: „Etykieta, 3–14 mar 2026, ukończono 40%". */
136
+ /** Nazwa dostępna paska: "Etykieta, 3-14 mar 2026, ukończono 40%". */
137
137
  const itemAriaLabel = useCallback((item) => {
138
138
  const source = item.source;
139
139
  const dates = roadmapItemDates(item.start, item.end, itemLocale, {
@@ -163,7 +163,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
163
163
  top: barTop(row, item.lane),
164
164
  height: barHeight,
165
165
  label: source.label,
166
- title: source.sublabel ? `${source.label} — ${source.sublabel}` : source.label,
166
+ title: source.sublabel ? `${source.label} - ${source.sublabel}` : source.label,
167
167
  variant: source.variant ?? 'primary',
168
168
  color: source.color,
169
169
  progress: source.progress ?? null,
@@ -268,7 +268,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
268
268
  };
269
269
  /**
270
270
  * Klawiatura na pasku: Enter/Spacja działają jak kliknięcie, strzałki przenoszą fokus po siatce
271
- * (w poziomie po wierszu, w pionie między wierszami), Home/End na skraj wiersza, z Ctrl — roadmapy.
271
+ * (w poziomie po wierszu, w pionie między wierszami), Home/End na skraj wiersza, z Ctrl - roadmapy.
272
272
  */
273
273
  const handleItemKeydown = (event, item) => {
274
274
  if (event.key === 'Enter' || event.key === ' ') {
@@ -293,17 +293,17 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
293
293
  };
294
294
  /**
295
295
  * Treść dymka dla kolumny etykiet. Pusta tam, gdzie dymek nie miałby czego
296
- * uzupełnić — komponent pomija wtedy podpowiedź.
296
+ * uzupełnić - komponent pomija wtedy podpowiedź.
297
297
  */
298
298
  const labelTooltip = (row) => {
299
299
  // Wiersz grupy ma własny dymek, osadzony głębiej (na stosie etykiet).
300
300
  if (row.kind === 'group')
301
301
  return '';
302
- // Tryb 'pack' mieści wiele zadań w jednym wierszu — nie ma jednej etykiety.
302
+ // Tryb 'pack' mieści wiele zadań w jednym wierszu - nie ma jednej etykiety.
303
303
  if (row.items.length !== 1)
304
304
  return '';
305
305
  const source = row.items[0].source;
306
- return source.sublabel ? `${source.label} — ${source.sublabel}` : source.label;
306
+ return source.sublabel ? `${source.label} - ${source.sublabel}` : source.label;
307
307
  };
308
308
  const onScroll = (event) => {
309
309
  setScrollTop(event.currentTarget.scrollTop);
@@ -319,7 +319,7 @@ export function KptRoadmap({ config, scrollHeight = null, labelWidth = '14rem',
319
319
  const group = row.group;
320
320
  const first = row.items[0];
321
321
  const sum = row.kind === 'group' ? summary(row) : null;
322
- return (_jsxs("div", { className: cn('kpt-roadmap__row', row.kind === 'group' && 'kpt-roadmap__row--group'), style: { insetBlockStart: `${row.top}px`, blockSize: `${row.height}px` }, children: [_jsx(KptTooltip, { text: labelTooltip(row), onlyWhenTruncated: true, children: _jsx("div", { className: cn('kpt-roadmap__label', row.kind === 'group' && 'kpt-roadmap__label--group'), style: { paddingInlineStart: `${0.75 + row.depth * 1}rem` }, children: group ? (_jsxs(_Fragment, { children: [_jsx(KptTooltip, { text: isCollapsed(group) ? t('roadmap.expandGroup') : t('roadmap.collapseGroup'), children: _jsx("button", { type: "button", className: "kpt-roadmap__toggle", "aria-expanded": !isCollapsed(group), "aria-label": group.label, onClick: () => toggleGroup(group), children: _jsx("span", { className: cn('kpt-roadmap__toggle-icon', !isCollapsed(group) && 'kpt-roadmap__toggle-icon--open') }) }) }), _jsx(KptTooltip, { text: group.sublabel ? `${group.label} — ${group.sublabel}` : group.label, onlyWhenTruncated: true, children: _jsxs("span", { className: "kpt-roadmap__label-stack", children: [_jsx("span", { className: "kpt-roadmap__label-text kpt-roadmap__label-text--group", children: group.label }), group.sublabel && _jsx("span", { className: "kpt-roadmap__label-sub", children: group.sublabel })] }) }), row.groupState?.itemCount ? (_jsx("span", { className: "kpt-roadmap__label-count", children: row.groupState.itemCount })) : null] })) : (first && (_jsxs(_Fragment, { children: [_jsx("span", { className: "kpt-roadmap__label-text", children: first.source.label }), row.items.length === 1 && first.source.sublabel && (_jsx("span", { className: "kpt-roadmap__label-sub", children: first.source.sublabel }))] }))) }) }), _jsx("div", { className: "kpt-roadmap__lane", children: row.kind === 'group'
322
+ return (_jsxs("div", { className: cn('kpt-roadmap__row', row.kind === 'group' && 'kpt-roadmap__row--group'), style: { insetBlockStart: `${row.top}px`, blockSize: `${row.height}px` }, children: [_jsx(KptTooltip, { text: labelTooltip(row), onlyWhenTruncated: true, children: _jsx("div", { className: cn('kpt-roadmap__label', row.kind === 'group' && 'kpt-roadmap__label--group'), style: { paddingInlineStart: `${0.75 + row.depth * 1}rem` }, children: group ? (_jsxs(_Fragment, { children: [_jsx(KptTooltip, { text: isCollapsed(group) ? t('roadmap.expandGroup') : t('roadmap.collapseGroup'), children: _jsx("button", { type: "button", className: "kpt-roadmap__toggle", "aria-expanded": !isCollapsed(group), "aria-label": group.label, onClick: () => toggleGroup(group), children: _jsx("span", { className: cn('kpt-roadmap__toggle-icon', !isCollapsed(group) && 'kpt-roadmap__toggle-icon--open') }) }) }), _jsx(KptTooltip, { text: group.sublabel ? `${group.label} - ${group.sublabel}` : group.label, onlyWhenTruncated: true, children: _jsxs("span", { className: "kpt-roadmap__label-stack", children: [_jsx("span", { className: "kpt-roadmap__label-text kpt-roadmap__label-text--group", children: group.label }), group.sublabel && _jsx("span", { className: "kpt-roadmap__label-sub", children: group.sublabel })] }) }), row.groupState?.itemCount ? (_jsx("span", { className: "kpt-roadmap__label-count", children: row.groupState.itemCount })) : null] })) : (first && (_jsxs(_Fragment, { children: [_jsx("span", { className: "kpt-roadmap__label-text", children: first.source.label }), row.items.length === 1 && first.source.sublabel && (_jsx("span", { className: "kpt-roadmap__label-sub", children: first.source.sublabel }))] }))) }) }), _jsx("div", { className: "kpt-roadmap__lane", children: row.kind === 'group'
323
323
  ? sum && (_jsx("div", { className: "kpt-roadmap__summary", "data-variant": sum.variant, style: {
324
324
  insetInlineStart: `${sum.left}%`,
325
325
  inlineSize: `${sum.width}%`,
@@ -1,7 +1,7 @@
1
1
  /*
2
- * @konce-pt/react/roadmap — oś czasu typu Gantt. Osobny subpath, bo geometria, style i dane
2
+ * @konce-pt/react/roadmap - oś czasu typu Gantt. Osobny subpath, bo geometria, style i dane
3
3
  * roadmapy są ciężkie względem rdzenia biblioteki i nie każda aplikacja ich potrzebuje.
4
4
  */
5
5
  export { KptRoadmap } from "../roadmap/roadmap.js";
6
- // Rdzeń obliczeniowy (pure TS) — przydatny do własnych rozszerzeń, SSR i testów.
6
+ // Rdzeń obliczeniowy (pure TS) - przydatny do własnych rozszerzeń, SSR i testów.
7
7
  export { buildTimeline, buildRows, normalizeItems, packLanes, sliceRows, spanOf, rollupProgress, resolveLinks, linkGeometry, roundedPolyline, arrowHead, autoRange, resolveRange, isoWeekNumber, isoWeekYear, isoWeekday, isoWeeksInYear, startOfIsoWeek, startOfDay, addDays, addHours, addMonths, addUnits, floorToUnit, ceilToUnit, countUnits, diffDays, daysInMonth, isSameDay, toTimestamp, } from '@konce-pt/roadmap';
@@ -1,20 +1,20 @@
1
1
  # KptScrollTop (@konce-pt/react)
2
2
 
3
- A "back to top" button — appears once the scroll passes `threshold` px.
3
+ A "back to top" button - appears once the scroll passes `threshold` px.
4
4
  Import: `import { KptScrollTop } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <div class="kpt-scroll-top-host">
8
- <button class="kpt-scroll-top is-visible" tabindex="0" aria-label="Scroll to top">…</button>
8
+ <button class="kpt-scroll-top is-visible" tabindex="0" aria-label="Scroll to top">...</button>
9
9
  </div>
10
10
 
11
11
  ## Props
12
12
  - `threshold`: number (px, default 300)
13
- - `target`: string | null — a selector for the scrolled element; the window by default
13
+ - `target`: string | null - a selector for the scrolled element; the window by default
14
14
  - `className`, `ref` and every other `<div>` prop go to the host
15
15
 
16
16
  ## `target` is not optional in a shell
17
- Whenever the app scrolls a container rather than the page — an `KptAppShell` layout, for instance —
17
+ Whenever the app scrolls a container rather than the page - an `KptAppShell` layout, for instance -
18
18
  the window never scrolls and the button would never appear. Point it at the container:
19
19
  `target=".kpt-app-shell__content"`.
20
20
 
@@ -24,7 +24,7 @@ component, and on the server it does not exist at all. The listener is removed o
24
24
  position is read once on mount, because the page may already be scrolled (arriving at an anchor).
25
25
 
26
26
  ## The hidden button stays in the DOM
27
- It fades in and out, so hiding it is `tabindex="-1"` plus the CSS class, not a conditional render —
27
+ It fades in and out, so hiding it is `tabindex="-1"` plus the CSS class, not a conditional render -
28
28
  otherwise the animation would have nothing to run on.
29
29
 
30
30
  ## Examples
@@ -42,4 +42,4 @@ A real `<button>` labelled from `scrollTop.label`; while hidden it is `visibilit
42
42
  out of the tab order and the accessibility tree. It sits in the bottom-end corner
43
43
  (`inset-inline-end`), so it moves to the left in RTL. With `prefers-reduced-motion` the scroll is a
44
44
  jump instead of smooth and the button appears without a transition. Focus stays on the button after
45
- the jump — move it to your page heading if that matters.
45
+ the jump - move it to your page heading if that matters.
@@ -7,7 +7,7 @@ export interface KptScrollTopProps extends ComponentPropsWithRef<'div'>, KptI18n
7
7
  target?: string | null;
8
8
  }
9
9
  /**
10
- * Przycisk „do góry" — pojawia się po przewinięciu ponad `threshold` px.
10
+ * Przycisk "do góry" - pojawia się po przewinięciu ponad `threshold` px.
11
11
  *
12
12
  * @example
13
13
  * <KptScrollTop threshold={300} />
@@ -5,7 +5,7 @@ import { cn } from "../internal/cn.js";
5
5
  import { useKptMessages } from "../i18n/i18n-context.js";
6
6
  import { KptIcon } from "../icon/icon.js";
7
7
  /**
8
- * Przycisk „do góry" — pojawia się po przewinięciu ponad `threshold` px.
8
+ * Przycisk "do góry" - pojawia się po przewinięciu ponad `threshold` px.
9
9
  *
10
10
  * @example
11
11
  * <KptScrollTop threshold={300} />
@@ -6,21 +6,21 @@ A select on its own panel. Variants: single, with a search box (`filter`) and mu
6
6
  ## DOM
7
7
  <span class="kpt-select-host">
8
8
  <div class="kpt-select" role="combobox" tabindex="0" aria-expanded="false">
9
- <div class="kpt-select__value"><span class="kpt-select__placeholder">Choose…</span></div>
10
- <span class="kpt-icon-host kpt-select__chevron">…</span>
9
+ <div class="kpt-select__value"><span class="kpt-select__placeholder">Choose...</span></div>
10
+ <span class="kpt-icon-host kpt-select__chevron">...</span>
11
11
  </div>
12
12
  </span>
13
13
  <!-- while open, in a portal on document.body: -->
14
- <div class="kpt-select__panel"><ul class="kpt-select__list" role="listbox">…</ul></div>
14
+ <div class="kpt-select__panel"><ul class="kpt-select__list" role="listbox">...</ul></div>
15
15
 
16
16
  ## Props
17
- - `options`: `KptOption<T>[]` — `{ label, value, disabled? }`
18
- - `value` / `defaultValue` / `onValueChange` — a single `T`, or `T[]` in `multiple` mode
19
- - `open` / `defaultOpen` / `onOpenChange` — the panel state, so the list can be opened from outside
17
+ - `options`: `KptOption<T>[]` - `{ label, value, disabled? }`
18
+ - `value` / `defaultValue` / `onValueChange` - a single `T`, or `T[]` in `multiple` mode
19
+ - `open` / `defaultOpen` / `onOpenChange` - the panel state, so the list can be opened from outside
20
20
  - `placeholder`, `multiple`, `filter`, `disabled`, `invalid`, `touched`
21
- - `onTouch()` — fires when the panel closes or focus leaves the closed trigger
21
+ - `onTouch()` - fires when the panel closes or focus leaves the closed trigger
22
22
  - `aria-label` (through the rest props) names the trigger when no `<label for>` describes it
23
- - `locale`, `dictionary` — i18n overrides for this component only
23
+ - `locale`, `dictionary` - i18n overrides for this component only
24
24
  - `className`, `ref` and every other `<div>` prop go to the trigger
25
25
 
26
26
  ## The panel is a portal
@@ -35,20 +35,20 @@ through `aria-activedescendant` (with `filter`, focus moves to the search field)
35
35
  ArrowUp, Enter, Space, Home and End open the list, typing letters opens it on the first match, and
36
36
  in `multiple` mode Backspace/Delete removes the last chip. Open: ArrowUp/ArrowDown move by one,
37
37
  Home/End to the ends, PageUp/PageDown by ten, skipping disabled options without wrapping; Enter (and
38
- Space on the trigger) picks — a single select closes and returns focus to the trigger; typing jumps
38
+ Space on the trigger) picks - a single select closes and returns focus to the trigger; typing jumps
39
39
  to the next match, diacritics ignored; Escape and Tab close. Hovering an option makes it active, so
40
40
  the mouse and the keyboard share one highlight, and clicking it does not take focus from the trigger.
41
41
 
42
42
  ## Inside KptFormField
43
43
  There is no native field for the wrapper to read, so the select reports its filled state with
44
- `useKptFormFieldFilled` — the float label then floats over the chosen value.
44
+ `useKptFormFieldFilled` - the float label then floats over the chosen value.
45
45
 
46
46
  ## i18n
47
47
  `select.search` (the search placeholder), `select.noResults` (the empty list),
48
48
  `select.removeChip` (the chip's remove button).
49
49
 
50
50
  ## Examples
51
- <KptSelect options={roles} value={role} onValueChange={setRole} placeholder="Choose…" />
51
+ <KptSelect options={roles} value={role} onValueChange={setRole} placeholder="Choose..." />
52
52
  <KptSelect options={roles} value={role} onValueChange={setRole} filter />
53
53
  <KptSelect options={tags} value={tags} onValueChange={setTags} multiple filter />
54
54
 
@@ -56,9 +56,16 @@ There is no native field for the wrapper to read, so the select reports its fill
56
56
  `id` goes to the focusable element, not the host; without one it comes from `KptFormField` or is
57
57
  generated. A `div` with a role is not named by `label[for]`, so inside `KptFormField` it gets
58
58
  `aria-labelledby` pointing at the wrapper's label (unless `aria-label` is set), and the hint or
59
- error is added to `aria-describedby`. New: `id` and `required` (→ `aria-required`); the list gets
59
+ error is added to `aria-describedby`. New: `id` and `required` (-> `aria-required`); the list gets
60
60
  the same name as the trigger.
61
61
 
62
+ ## Motion
63
+ With `multiple`, a chip of a newly picked option pops in at its place (chips follow the order of
64
+ `options`), a removed one - by its "x", by unpicking it in the list or by `Backspace` - fades and shrinks in
65
+ place while the rest slide over on a spring. Several changes at once (e.g. a new value set from code) go
66
+ without motion. Follows `enter` from `KptMotionProvider` (`spring` / `fade` / `none`); `enabled: false` and the
67
+ system "reduce motion" setting always win.
68
+
62
69
  ## Tokens
63
70
  `--kpt-form-field-{bg,text,placeholder,border,border-hover,border-focus,border-error,radius}`,
64
71
  `--kpt-color-surface-raised` and `--kpt-elevation-3` for the panel, `--kpt-z-overlay` for the layer.
@@ -4,16 +4,16 @@ import type { KptOption } from '../shared/types.ts';
4
4
  export interface KptSelectProps<T> extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'onChange' | 'defaultValue'>, KptI18nOverrides {
5
5
  options?: readonly KptOption<T>[];
6
6
  placeholder?: string;
7
- /** Wybór wielokrotny — wartością jest tablica, a wybrane opcje pokazują się jako chipy. */
7
+ /** Wybór wielokrotny - wartością jest tablica, a wybrane opcje pokazują się jako chipy. */
8
8
  multiple?: boolean;
9
9
  /** Pole wyszukiwania nad listą. */
10
10
  filter?: boolean;
11
- /** Id wyzwalacza; bez niego generowane, w `KptFormField` — z wrappera. */
11
+ /** Id wyzwalacza; bez niego generowane, w `KptFormField` - z wrappera. */
12
12
  id?: string;
13
13
  /** Oznacza pole jako wymagane atrybutem `aria-required`. */
14
14
  required?: boolean;
15
15
  disabled?: boolean;
16
- /** Tylko do odczytu — wybór widać, panel się nie otwiera (`aria-readonly`). */
16
+ /** Tylko do odczytu - wybór widać, panel się nie otwiera (`aria-readonly`). */
17
17
  readOnly?: boolean;
18
18
  invalid?: boolean;
19
19
  touched?: boolean;
@@ -21,7 +21,7 @@ export interface KptSelectProps<T> extends Omit<ComponentPropsWithRef<'div'>, 'c
21
21
  value?: T | T[] | null;
22
22
  defaultValue?: T | T[] | null;
23
23
  onValueChange?: (value: T | T[] | null) => void;
24
- /** Stan panelu — pozwala otworzyć listę z zewnątrz i wiedzieć, kiedy user skończył wybierać. */
24
+ /** Stan panelu - pozwala otworzyć listę z zewnątrz i wiedzieć, kiedy user skończył wybierać. */
25
25
  open?: boolean;
26
26
  defaultOpen?: boolean;
27
27
  onOpenChange?: (open: boolean) => void;
@@ -32,19 +32,19 @@ export interface KptSelectProps<T> extends Omit<ComponentPropsWithRef<'div'>, 'c
32
32
  * Lista wyboru (select) na własnym panelu. Warianty: pojedynczy, z wyszukiwarką (`filter`)
33
33
  * i wielokrotny (`multiple`, chipy).
34
34
  *
35
- * Klawiatura według wzorca WAI-ARIA „select-only combobox”: fokus zostaje na polu, a aktywna opcja
36
- * idzie przez `aria-activedescendant`. `↓`/`↑`/`Enter`/`Spacja` otwierają listę na wybranej opcji,
35
+ * Klawiatura według wzorca WAI-ARIA "select-only combobox": fokus zostaje na polu, a aktywna opcja
36
+ * idzie przez `aria-activedescendant`. `ArrowDown`/`ArrowUp`/`Enter`/`Spacja` otwierają listę na wybranej opcji,
37
37
  * strzałki, `Home`/`End`, `PageUp`/`PageDown` chodzą po opcjach (z pominięciem wyłączonych),
38
38
  * wpisywane litery skaczą do pasującej opcji (bez polskich znaków), `Enter` wybiera, `Escape`
39
39
  * zamyka. Z `filter` fokus przechodzi do pola wyszukiwania, które obsługuje te same klawisze.
40
40
  * W trybie `multiple` `Backspace` na zamkniętym polu usuwa ostatni wybór.
41
41
  *
42
42
  * Wewnątrz `KptFormField` zgłasza wypełnienie hookiem `useKptFormFieldFilled`, więc etykieta
43
- * Float Label unosi się nad wybraną wartością — natywnego pola, z którego wrapper mógłby to
43
+ * Float Label unosi się nad wybraną wartością - natywnego pola, z którego wrapper mógłby to
44
44
  * odczytać, tu nie ma.
45
45
  *
46
46
  * @example
47
- * <KptSelect options={roles} value={role} onValueChange={setRole} placeholder="Wybierz…" />
47
+ * <KptSelect options={roles} value={role} onValueChange={setRole} placeholder="Wybierz..." />
48
48
  * <KptSelect options={tags} multiple filter value={tags} onValueChange={setTags} />
49
49
  */
50
50
  export declare function KptSelect<T>({ options, placeholder, multiple, filter, disabled, readOnly, invalid, touched, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, onTouch, locale, dictionary, className, onBlur, id, required, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, ...rest }: Readonly<KptSelectProps<T>>): import("react").JSX.Element;