@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
package/dist/grid/grid.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { cn } from "../internal/cn.js";
2
2
  import { layoutStyle, renderLayout } from "./layout.js";
3
3
  /**
4
- * Siatka Koncept UI — CSS Grid sterowany custom properties z `@konce-pt/grid`.
4
+ * Siatka Koncept UI - CSS Grid sterowany custom properties z `@konce-pt/grid`.
5
5
  *
6
6
  * Odpowiednik dyrektywy `kptGrid` z portu Angulara. Dyrektyw w Reakcie nie ma, więc siatka jest
7
- * komponentem — ale takim, który w trybie `asChild` niczego nie dokłada do DOM: przejmuje element,
7
+ * komponentem - ale takim, który w trybie `asChild` niczego nie dokłada do DOM: przejmuje element,
8
8
  * który i tak renderujesz (`<section>`, `<ul>`, `<main>`).
9
9
  *
10
- * Zmiana `columns` nie manipuluje klasami — ustawia zmienną inline, a układ przelicza
10
+ * Zmiana `columns` nie manipuluje klasami - ustawia zmienną inline, a układ przelicza
11
11
  * natywny silnik CSS.
12
12
  *
13
13
  * Wymaga arkusza `@konce-pt/grid` (`import '@konce-pt/grid';`).
@@ -10,9 +10,9 @@ export type KptLayoutValue = number | string | undefined;
10
10
  */
11
11
  export declare function layoutStyle(vars: Readonly<Record<string, KptLayoutValue>>, style: CSSProperties | undefined): CSSProperties;
12
12
  /**
13
- * Renderuje element układu albo — w trybie `asChild` — oddaje propsy jedynemu dziecku.
13
+ * Renderuje element układu albo - w trybie `asChild` - oddaje propsy jedynemu dziecku.
14
14
  *
15
- * To reactowy odpowiednik dyrektywy: `<KptCol asChild><li>…</li></KptCol>` nie dokłada żadnego
15
+ * To reactowy odpowiednik dyrektywy: `<KptCol asChild><li>...</li></KptCol>` nie dokłada żadnego
16
16
  * elementu do DOM, dokładnie jak `<li kptCol="6">` w Angularze.
17
17
  */
18
18
  export declare function renderLayout(asChild: boolean, children: ReactNode, props: Record<string, unknown>, element: 'div' | 'span'): ReactElement;
@@ -17,9 +17,9 @@ export function layoutStyle(vars, style) {
17
17
  return { ...result, ...style };
18
18
  }
19
19
  /**
20
- * Renderuje element układu albo — w trybie `asChild` — oddaje propsy jedynemu dziecku.
20
+ * Renderuje element układu albo - w trybie `asChild` - oddaje propsy jedynemu dziecku.
21
21
  *
22
- * To reactowy odpowiednik dyrektywy: `<KptCol asChild><li>…</li></KptCol>` nie dokłada żadnego
22
+ * To reactowy odpowiednik dyrektywy: `<KptCol asChild><li>...</li></KptCol>` nie dokłada żadnego
23
23
  * elementu do DOM, dokładnie jak `<li kptCol="6">` w Angularze.
24
24
  */
25
25
  export function renderLayout(asChild, children, props, element) {
@@ -1,7 +1,7 @@
1
1
  # KptGrid / KptCol / KptFlex (@konce-pt/react/grid)
2
2
 
3
3
  React ergonomics over the `@konce-pt/grid` stylesheet. The components set nothing but inline custom
4
- properties — they neither add nor remove classes, and the layout is computed by the native CSS
4
+ properties - they neither add nor remove classes, and the layout is computed by the native CSS
5
5
  engine.
6
6
 
7
7
  Import: `import { KptGrid, KptCol, KptFlex } from '@konce-pt/react/grid';`
@@ -11,7 +11,7 @@ Requires the stylesheet: `import '@konce-pt/grid';`
11
11
  The Angular port ships `kptGrid` / `kptCol` / `kptFlex` as attribute directives, which add nothing
12
12
  to the DOM. Here they are components, and `asChild` gives back the missing half: the props land on
13
13
  the element you were rendering anyway, so a column can be an `<li>`, an `<article>` or another
14
- component — no wrapper `<div>` in the middle of a grid.
14
+ component - no wrapper `<div>` in the middle of a grid.
15
15
 
16
16
  ## Breakpoints (mobile-first)
17
17
  `sm` >= 640px, `md` >= 768px, `lg` >= 1024px, `xl` >= 1280px, `2xl` >= 1536px.
@@ -20,22 +20,22 @@ gives 12 on mobile, `sm` and `md`, and 5 only from `lg` up.
20
20
 
21
21
  ## KptGrid
22
22
  Class `kpt-grid`. Renders a `<div>`, or the child with `asChild`.
23
- - `columns`: number — the column count (12 by default, from CSS). Variants: `columnsSm`,
23
+ - `columns`: number - the column count (12 by default, from CSS). Variants: `columnsSm`,
24
24
  `columnsMd`, `columnsLg`, `columnsXl`, `columns2xl`
25
- - `gap`: string — the gap on both axes, e.g. `'1.5rem'`, `'var(--kpt-space-6)'`
26
- - `gapX`, `gapY`: string — the gap on one axis, overriding `gap`
27
- - `container`: boolean — container query mode (see below)
25
+ - `gap`: string - the gap on both axes, e.g. `'1.5rem'`, `'var(--kpt-space-6)'`
26
+ - `gapX`, `gapY`: string - the gap on one axis, overriding `gap`
27
+ - `container`: boolean - container query mode (see below)
28
28
  - `className`, `style`, `ref` and every other `<div>` prop pass through; your `style` wins over the
29
29
  generated variables
30
30
 
31
31
  ## KptCol
32
- No class of its own — only the variables.
33
- - `span`: number | string — the span, the mobile-first base; `'full'` means the whole width
34
- - `spanSm`, `spanMd`, `spanLg`, `spanXl`, `span2xl` — per-breakpoint overrides
35
- - `start`: number — the grid line the column starts at (1-based); this is how offsets are done
36
- - `order`: number — the visual order. It does not change the DOM: screen readers and keyboard
32
+ No class of its own - only the variables.
33
+ - `span`: number | string - the span, the mobile-first base; `'full'` means the whole width
34
+ - `spanSm`, `spanMd`, `spanLg`, `spanXl`, `span2xl` - per-breakpoint overrides
35
+ - `start`: number - the grid line the column starts at (1-based); this is how offsets are done
36
+ - `order`: number - the visual order. It does not change the DOM: screen readers and keyboard
37
37
  navigation follow the DOM, so do not use it to move interactive content around
38
- - `self`: string — `align-self` (`start`, `end`, `center`, `stretch`, `baseline`)
38
+ - `self`: string - `align-self` (`start`, `end`, `center`, `stretch`, `baseline`)
39
39
 
40
40
  ## KptFlex
41
41
  Class `kpt-flex`. The same variables and breakpoints as the grid, in one dimension.
@@ -51,11 +51,11 @@ Values with no matching prop are supplied with utility classes from `@konce-pt/g
51
51
 
52
52
  ## An undefined prop sets nothing
53
53
  A variable is written only when its prop has a value. Writing `--kpt-col: undefined` would override
54
- what a utility class or the stylesheet already provides, so the components skip it entirely — the
54
+ what a utility class or the stylesheet already provides, so the components skip it entirely - the
55
55
  same rule as the `?? null` in the Angular directives.
56
56
 
57
57
  ## Container mode (`container`)
58
- The children's spans react to the width of THIS grid instead of the window — a card in a narrow
58
+ The children's spans react to the width of THIS grid instead of the window - a card in a narrow
59
59
  sidebar lays itself out in a single column even though the viewport is wide.
60
60
 
61
61
  A CSS limitation, not a package one: `@container` queries the nearest ancestor container, so an
@@ -107,4 +107,4 @@ The grid: `--kpt-grid-columns`, `--kpt-gap`, `--kpt-gap-x`, `--kpt-gap-y`, `--kp
107
107
  `--kpt-align`, `--kpt-content`, `--kpt-flex-direction`, `--kpt-flex-wrap`.
108
108
  The child: `--kpt-col`, `--kpt-col-start`, `--kpt-order`, `--kpt-self`, `--kpt-flex`, `--kpt-grow`,
109
109
  `--kpt-shrink`.
110
- Each one has per-breakpoint variants: `--kpt-col` → `--kpt-col-md`.
110
+ Each one has per-breakpoint variants: `--kpt-col` -> `--kpt-col-md`.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @konce-pt/react/grid — ergonomia Reacta nad arkuszem `@konce-pt/grid`.
2
+ * @konce-pt/react/grid - ergonomia Reacta nad arkuszem `@konce-pt/grid`.
3
3
  * Komponenty ustawiają wyłącznie custom properties inline; układ liczy natywny CSS.
4
4
  * Osobny subpath, bo arkusz układu jest opcjonalny i nie każda aplikacja go ładuje.
5
5
  */
@@ -3,7 +3,7 @@ import { type DeepPartial, type KptLocale, type KptMessageKey, type KptMessages
3
3
  export interface KptI18nContextValue {
4
4
  /** Bieżący język. */
5
5
  locale: KptLocale;
6
- /** Zmiana języka w runtime — działa tylko w obrębie `KptI18nProvider`. */
6
+ /** Zmiana języka w runtime - działa tylko w obrębie `KptI18nProvider`. */
7
7
  setLocale: (locale: KptLocale) => void;
8
8
  /** Aktywny słownik. */
9
9
  messages: KptMessages;
@@ -25,7 +25,7 @@ export interface KptI18nProviderProps {
25
25
  children?: ReactNode;
26
26
  }
27
27
  /**
28
- * Dostarcza tłumaczenia poddrzewu. Bez providera komponenty działają na EN —
28
+ * Dostarcza tłumaczenia poddrzewu. Bez providera komponenty działają na EN -
29
29
  * brak konfiguracji nigdy nie jest błędem.
30
30
  */
31
31
  export declare function KptI18nProvider({ locale, messages, children }: Readonly<KptI18nProviderProps>): import("react").JSX.Element;
@@ -40,6 +40,6 @@ export interface KptI18nOverrides {
40
40
  }
41
41
  /**
42
42
  * Tłumaczenia dla pojedynczego komponentu. `locale` i `dictionary` z propsów mają
43
- * priorytet nad kontekstem — tak samo jak inputy etykiet biją słownik w Angularze.
43
+ * priorytet nad kontekstem - tak samo jak inputy etykiet biją słownik w Angularze.
44
44
  */
45
45
  export declare function useKptMessages(overrides?: KptI18nOverrides): KptI18nContextValue;
@@ -5,21 +5,21 @@ import { KPT_MESSAGES_EN, KPT_MESSAGES_PL, deepMerge, translate, } from '@konce-
5
5
  import { isDevBuild } from "../internal/dev.js";
6
6
  /*
7
7
  * Wiązanie i18n dla Reacta. Odpowiednik `provideKptI18n` + `KptI18n` z Angulara,
8
- * na tym samym rdzeniu z `@konce-pt/i18n` — te same klucze, ten sam fallback
9
- * (słownik → EN → sam klucz) i ta sama interpolacja `{name}`.
8
+ * na tym samym rdzeniu z `@konce-pt/i18n` - te same klucze, ten sam fallback
9
+ * (słownik -> EN -> sam klucz) i ta sama interpolacja `{name}`.
10
10
  */
11
11
  /** Kontrakt zwracany przez `useKptI18n()`. */
12
- /** Klucze, o których brak już ostrzegaliśmy — jedno ostrzeżenie na klucz. */
12
+ /** Klucze, o których brak już ostrzegaliśmy - jedno ostrzeżenie na klucz. */
13
13
  const warnedKeys = new Set();
14
14
  /**
15
- * `translate` z ostrzeżeniem w buildzie deweloperskim, gdy klucza nie ma w żadnym słowniku —
15
+ * `translate` z ostrzeżeniem w buildzie deweloperskim, gdy klucza nie ma w żadnym słowniku -
16
16
  * inaczej literówka daje po cichu sam klucz zamiast tekstu.
17
17
  */
18
18
  function translateChecked(dict, key, params) {
19
19
  const text = translate(dict, key, params);
20
20
  if (text === key && isDevBuild() && !warnedKeys.has(key)) {
21
21
  warnedKeys.add(key);
22
- console.warn(`KptI18n: brak tłumaczenia dla klucza „${key}”.`);
22
+ console.warn(`KptI18n: brak tłumaczenia dla klucza "${key}".`);
23
23
  }
24
24
  return text;
25
25
  }
@@ -32,7 +32,7 @@ const FALLBACK = {
32
32
  };
33
33
  const KptI18nContext = createContext(null);
34
34
  /**
35
- * Dostarcza tłumaczenia poddrzewu. Bez providera komponenty działają na EN —
35
+ * Dostarcza tłumaczenia poddrzewu. Bez providera komponenty działają na EN -
36
36
  * brak konfiguracji nigdy nie jest błędem.
37
37
  */
38
38
  export function KptI18nProvider({ locale = 'en', messages, children }) {
@@ -66,7 +66,7 @@ export function useKptI18n() {
66
66
  }
67
67
  /**
68
68
  * Tłumaczenia dla pojedynczego komponentu. `locale` i `dictionary` z propsów mają
69
- * priorytet nad kontekstem — tak samo jak inputy etykiet biją słownik w Angularze.
69
+ * priorytet nad kontekstem - tak samo jak inputy etykiet biją słownik w Angularze.
70
70
  */
71
71
  export function useKptMessages(overrides) {
72
72
  const context = useKptI18n();
@@ -2,9 +2,9 @@ import { type KptIconInput } from '@konce-pt/icons';
2
2
  /**
3
3
  * Rejestruje (lub nadpisuje) ikony. Przyjmuje listę definicji z subpathu Tablera
4
4
  * (`[Rocket, LayoutDashboard]`), obiekt definicji (np. `import * as tabler`) albo
5
- * mapę `{ nazwa: 'inner svg' }` — patrz [[KptIconInput]].
5
+ * mapę `{ nazwa: 'inner svg' }` - patrz [[KptIconInput]].
6
6
  *
7
- * Treść jest sanityzowana do allowlisty geometrii SVG — mimo to `registerKptIcons()` wolno
7
+ * Treść jest sanityzowana do allowlisty geometrii SVG - mimo to `registerKptIcons()` wolno
8
8
  * wołać wyłącznie z treścią kontrolowaną przez developera (build-time), nigdy bezpośrednio
9
9
  * z danych runtime/CMS/uploadu bez własnej walidacji domenowej wyżej w stosie.
10
10
  */
@@ -13,7 +13,7 @@ export declare function registerKptIcons(next: KptIconInput): void;
13
13
  export declare function getKptIcon(name: string): string | undefined;
14
14
  /** Czy ikona o tej nazwie jest w rejestrze. */
15
15
  export declare function hasKptIcon(name: string): boolean;
16
- /** Subskrypcja zmian rejestru — używana przez `KptIcon` przez `useSyncExternalStore`. */
16
+ /** Subskrypcja zmian rejestru - używana przez `KptIcon` przez `useSyncExternalStore`. */
17
17
  export declare function subscribeKptIcons(listener: () => void): () => void;
18
18
  /** Licznik rejestracji; rośnie po każdym `registerKptIcons`. */
19
19
  export declare function getKptIconsVersion(): number;
@@ -10,9 +10,9 @@ let version = 0;
10
10
  /**
11
11
  * Rejestruje (lub nadpisuje) ikony. Przyjmuje listę definicji z subpathu Tablera
12
12
  * (`[Rocket, LayoutDashboard]`), obiekt definicji (np. `import * as tabler`) albo
13
- * mapę `{ nazwa: 'inner svg' }` — patrz [[KptIconInput]].
13
+ * mapę `{ nazwa: 'inner svg' }` - patrz [[KptIconInput]].
14
14
  *
15
- * Treść jest sanityzowana do allowlisty geometrii SVG — mimo to `registerKptIcons()` wolno
15
+ * Treść jest sanityzowana do allowlisty geometrii SVG - mimo to `registerKptIcons()` wolno
16
16
  * wołać wyłącznie z treścią kontrolowaną przez developera (build-time), nigdy bezpośrednio
17
17
  * z danych runtime/CMS/uploadu bez własnej walidacji domenowej wyżej w stosie.
18
18
  */
@@ -32,7 +32,7 @@ export function getKptIcon(name) {
32
32
  export function hasKptIcon(name) {
33
33
  return icons.has(name);
34
34
  }
35
- /** Subskrypcja zmian rejestru — używana przez `KptIcon` przez `useSyncExternalStore`. */
35
+ /** Subskrypcja zmian rejestru - używana przez `KptIcon` przez `useSyncExternalStore`. */
36
36
  export function subscribeKptIcons(listener) {
37
37
  listeners.add(listener);
38
38
  return () => {
@@ -4,16 +4,16 @@ export interface KptIconProps extends ComponentPropsWithRef<'span'> {
4
4
  name: string;
5
5
  /** Rozmiar jako długość CSS (np. '1.25rem'); domyślnie dziedziczy z `font-size`. */
6
6
  size?: string;
7
- /** Nazwa dla czytnika ekranu — tylko gdy ikona niesie znaczenie bez tekstu obok. */
7
+ /** Nazwa dla czytnika ekranu - tylko gdy ikona niesie znaczenie bez tekstu obok. */
8
8
  label?: string;
9
9
  }
10
10
  /**
11
- * Ikona Koncept UI (inline SVG, zestaw Tabler Icons — MIT). Rozmiar dziedziczy z `font-size`
12
- * (1em) lub ustaw `size`; kolor z `currentColor`. Ikona musi być w rejestrze — wbudowany
11
+ * Ikona Koncept UI (inline SVG, zestaw Tabler Icons - MIT). Rozmiar dziedziczy z `font-size`
12
+ * (1em) lub ustaw `size`; kolor z `currentColor`. Ikona musi być w rejestrze - wbudowany
13
13
  * zestaw działa od razu, pełny dodaje `registerKptTablerIcons()` z `@konce-pt/react/icons`.
14
14
  *
15
15
  * Domyślnie ikona jest dekoracją (`aria-hidden`). Ikona niosąca znaczenie sama, bez tekstu obok,
16
- * dostaje `label` — wtedy jest `role="img"` z tą nazwą. W buildzie deweloperskim nieznana nazwa
16
+ * dostaje `label` - wtedy jest `role="img"` z tą nazwą. W buildzie deweloperskim nieznana nazwa
17
17
  * daje jedno ostrzeżenie w konsoli zamiast cichej pustki.
18
18
  *
19
19
  * @example
package/dist/icon/icon.js CHANGED
@@ -5,15 +5,15 @@ import { useEffect, useSyncExternalStore } from 'react';
5
5
  import { cn } from "../internal/cn.js";
6
6
  import { isDevBuild } from "../internal/dev.js";
7
7
  import { getKptIcon, getKptIconsVersion, subscribeKptIcons } from "./icon-registry.js";
8
- /** Nazwy, o których już ostrzegliśmy — jedno ostrzeżenie na nazwę, nie na każdą instancję. */
8
+ /** Nazwy, o których już ostrzegliśmy - jedno ostrzeżenie na nazwę, nie na każdą instancję. */
9
9
  const warned = new Set();
10
10
  /**
11
- * Ikona Koncept UI (inline SVG, zestaw Tabler Icons — MIT). Rozmiar dziedziczy z `font-size`
12
- * (1em) lub ustaw `size`; kolor z `currentColor`. Ikona musi być w rejestrze — wbudowany
11
+ * Ikona Koncept UI (inline SVG, zestaw Tabler Icons - MIT). Rozmiar dziedziczy z `font-size`
12
+ * (1em) lub ustaw `size`; kolor z `currentColor`. Ikona musi być w rejestrze - wbudowany
13
13
  * zestaw działa od razu, pełny dodaje `registerKptTablerIcons()` z `@konce-pt/react/icons`.
14
14
  *
15
15
  * Domyślnie ikona jest dekoracją (`aria-hidden`). Ikona niosąca znaczenie sama, bez tekstu obok,
16
- * dostaje `label` — wtedy jest `role="img"` z tą nazwą. W buildzie deweloperskim nieznana nazwa
16
+ * dostaje `label` - wtedy jest `role="img"` z tą nazwą. W buildzie deweloperskim nieznana nazwa
17
17
  * daje jedno ostrzeżenie w konsoli zamiast cichej pustki.
18
18
  *
19
19
  * @example
@@ -24,7 +24,7 @@ export function KptIcon({ name, size = '', label = '', className, style, ...rest
24
24
  // Rejestr bywa uzupełniany po pierwszym renderze (leniwy import zestawu Tabler),
25
25
  // więc komponent słucha jego wersji zamiast czytać go raz.
26
26
  useSyncExternalStore(subscribeKptIcons, getKptIconsVersion, getKptIconsVersion);
27
- // Treść pochodzi z zaufanego rejestru i przeszła sanitizację przy rejestracji —
27
+ // Treść pochodzi z zaufanego rejestru i przeszła sanitizację przy rejestracji -
28
28
  // to ten sam kontrakt, co `innerHTML` w porcie Angulara.
29
29
  const svg = getKptIcon(name);
30
30
  const html = renderKptIconSvg(svg);
@@ -32,7 +32,7 @@ export function KptIcon({ name, size = '', label = '', className, style, ...rest
32
32
  if (svg || !isDevBuild() || warned.has(name))
33
33
  return;
34
34
  warned.add(name);
35
- console.warn(`KptIcon: ikony „${name}” nie ma (jeszcze) w rejestrze — sprawdź nazwę albo zarejestruj ją (registerKptIcons / registerKptTablerIcons).`);
35
+ console.warn(`KptIcon: ikony "${name}" nie ma (jeszcze) w rejestrze - sprawdź nazwę albo zarejestruj ją (registerKptIcons / registerKptTablerIcons).`);
36
36
  }, [svg, name]);
37
37
  return (_jsx("span", { className: cn('kpt-icon-host', className), "aria-hidden": label ? undefined : true, role: label ? 'img' : undefined, "aria-label": label || undefined, style: size ? { fontSize: size, ...style } : style,
38
38
  // eslint-disable-next-line react/no-danger -- treść z rejestru, zsanityzowana przy `register()` (sanitizeSvgFragment)
@@ -1,44 +1,44 @@
1
1
  # KptIcon (@konce-pt/react)
2
2
 
3
- An inline SVG icon (Tabler Icons — MIT). The size follows `font-size` (1em) or the `size` prop;
3
+ An inline SVG icon (Tabler Icons - MIT). The size follows `font-size` (1em) or the `size` prop;
4
4
  the colour comes from `currentColor`.
5
5
  Import: `import { KptIcon } from '@konce-pt/react';`
6
6
 
7
7
  ## DOM
8
8
  <span class="kpt-icon-host" aria-hidden="true">
9
- <svg class="kpt-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">…</svg>
9
+ <svg class="kpt-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">...</svg>
10
10
  </span>
11
11
 
12
12
  ## Props
13
- - `name`: string — the icon name from the registry (required)
14
- - `size`: string — a CSS length (e.g. '1.25rem'); by default inherited from `font-size`
15
- - `label`: string — a name for screen readers; with it the icon is `role="img"`, without it `aria-hidden`
13
+ - `name`: string - the icon name from the registry (required)
14
+ - `size`: string - a CSS length (e.g. '1.25rem'); by default inherited from `font-size`
15
+ - `label`: string - a name for screen readers; with it the icon is `role="img"`, without it `aria-hidden`
16
16
  - `className`, `ref` and every other `<span>` prop go to the host
17
17
 
18
18
  ## The registry
19
19
  The built-in set (84 icons) works with no setup. It covers both what the library's own components
20
- draw and the staples of an application shell — sun, moon, bell, settings, users, user-circle,
21
- logout, layout-dashboard, home, activity, chart-bar, arrow-up-right, brand-github and the like —
20
+ draw and the staples of an application shell - sun, moon, bell, settings, users, user-circle,
21
+ logout, layout-dashboard, home, activity, chart-bar, arrow-up-right, brand-github and the like -
22
22
  so a typical admin panel never needs the full set.
23
23
 
24
24
  The full Tabler set (5130 icons) is opt-in, and there are two paths. `@konce-pt/react/icons`
25
25
  exposes every icon as its own export, so importing by name lets the bundler keep only what you
26
26
  used:
27
27
 
28
- // main.tsx — production: two icons reach the bundle.
28
+ // main.tsx - production: two icons reach the bundle.
29
29
  import { LayoutDashboard, Rocket } from '@konce-pt/react/icons';
30
30
  import { registerKptIcons } from '@konce-pt/react';
31
31
 
32
32
  registerKptIcons([LayoutDashboard, Rocket]);
33
33
 
34
- // main.tsx — prototype: every icon, about 1.2 MB.
34
+ // main.tsx - prototype: every icon, about 1.2 MB.
35
35
  import { registerKptTablerIcons } from '@konce-pt/react/icons';
36
36
 
37
37
  registerKptTablerIcons();
38
38
 
39
39
  `registerKptIcons` is the one that shrinks: it takes the data as an argument and imports nothing
40
40
  from the Tabler subpath, so the bundle follows your imports. Passing the namespace object
41
- (`import * as tabler`) registers everything — a namespace handed to a function blocks static
41
+ (`import * as tabler`) registers everything - a namespace handed to a function blocks static
42
42
  analysis, so it is the explicit form of the prototype path, not a smaller one.
43
43
 
44
44
  Export names are PascalCase because `kebab-case` is not a legal identifier and camelCase would
@@ -47,9 +47,9 @@ so `BrandHtml5` registers as `brand-html5`.
47
47
 
48
48
  The registry is a module singleton, not a context: icons are global to the application, so there is
49
49
  nothing to provide. `KptIcon` subscribes to it, so icons registered after the first render appear
50
- without a manual refresh. Register your own with `registerKptIcons({ name: '<path … />' })`.
50
+ without a manual refresh. Register your own with `registerKptIcons({ name: '<path ... />' })`.
51
51
 
52
- An unknown name renders an empty host rather than throwing — a missing icon never takes the page
52
+ An unknown name renders an empty host rather than throwing - a missing icon never takes the page
53
53
  down with it.
54
54
 
55
55
  ## Security
@@ -63,7 +63,7 @@ CMS, an API or an upload.
63
63
  <KptButton><KptIcon name="phone" /> Call</KptButton>
64
64
 
65
65
  ## Accessibility
66
- By default an icon is `aria-hidden` — decorative, which is right next to a text label or inside
66
+ By default an icon is `aria-hidden` - decorative, which is right next to a text label or inside
67
67
  an icon button with its own name. An icon that carries meaning on its own gets `label`: it becomes
68
68
  `role="img"` with that `aria-label`. In development builds an unknown name logs one console
69
69
  warning per name instead of rendering silently empty.
@@ -7,13 +7,13 @@ export interface KptIconButtonProps extends ComponentPropsWithRef<'button'> {
7
7
  shape?: 'round' | 'square';
8
8
  /** Spinner zamiast ikony + zablokowana interakcja; ustawia `aria-busy`. */
9
9
  loading?: boolean;
10
- /** Etykieta dostępności — wymagana, bo przycisk nie ma tekstu. */
10
+ /** Etykieta dostępności - wymagana, bo przycisk nie ma tekstu. */
11
11
  'aria-label': string;
12
12
  /** Propsy wrappera hosta (`.kpt-icon-button-host`). */
13
13
  hostProps?: KptHostProps<'span'>;
14
14
  }
15
15
  /**
16
- * Przycisk ikonowy (tylko ikona). `aria-label` jest wymagany typem — bez tekstu przycisk nie ma
16
+ * Przycisk ikonowy (tylko ikona). `aria-label` jest wymagany typem - bez tekstu przycisk nie ma
17
17
  * dostępnej nazwy, a to najczęstszy błąd dostępności w tej rodzinie komponentów.
18
18
  *
19
19
  * @example
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../internal/cn.js";
3
3
  /**
4
- * Przycisk ikonowy (tylko ikona). `aria-label` jest wymagany typem — bez tekstu przycisk nie ma
4
+ * Przycisk ikonowy (tylko ikona). `aria-label` jest wymagany typem - bez tekstu przycisk nie ma
5
5
  * dostępnej nazwy, a to najczęstszy błąd dostępności w tej rodzinie komponentów.
6
6
  *
7
7
  * @example
@@ -5,18 +5,18 @@ An icon-only button. Import: `import { KptIconButton } from '@konce-pt/react';`
5
5
  ## DOM
6
6
  <span class="kpt-icon-button-host">
7
7
  <button class="kpt-icon-button" type="button" data-variant="text" data-size="md" data-shape="round" aria-label="Settings">
8
- …icon…
8
+ ...icon...
9
9
  </button>
10
10
  </span>
11
11
 
12
12
  ## Props
13
- - `variant`: the same union as `KptButton` — 'filled' | 'tonal' | 'outline' | 'text' | 'danger'
13
+ - `variant`: the same union as `KptButton` - 'filled' | 'tonal' | 'outline' | 'text' | 'danger'
14
14
  (default 'text')
15
15
  - `size`: 'sm' | 'md' | 'lg' (default 'md')
16
16
  - `shape`: 'round' | 'square' (default 'round')
17
- - `loading`: boolean — a spinner instead of the icon, sets `aria-busy` and disables the button
18
- - `aria-label`: string — REQUIRED by the type
19
- - `hostProps` — props for the `.kpt-icon-button-host` wrapper
17
+ - `loading`: boolean - a spinner instead of the icon, sets `aria-busy` and disables the button
18
+ - `aria-label`: string - REQUIRED by the type
19
+ - `hostProps` - props for the `.kpt-icon-button-host` wrapper
20
20
  - `className`, `ref` and every other `<button>` prop go to the inner `<button>`
21
21
 
22
22
  ## The label is required by the type
@@ -29,6 +29,10 @@ without it, so the mistake cannot reach the browser.
29
29
  <KptIconButton variant="filled" shape="square" aria-label="Delete"><KptIcon name="x" /></KptIconButton>
30
30
  <KptIconButton loading aria-label="Saving" />
31
31
 
32
+ ## Motion
33
+ Pressed, it squeezes slightly and springs back on release (shared mixin `styles/_press.scss`). The `loading` spinner pops in. Pure CSS; durations follow `--kpt-motion-scale`, so `enabled: false` turns it off, and it drops out
34
+ under "reduce motion".
35
+
32
36
  ## Tokens
33
37
  The same button tokens as `KptButton` (`--kpt-button-*` for each variant), plus the size and shape
34
38
  geometry from the shared stylesheet.
@@ -1,11 +1,11 @@
1
1
  export * from '@konce-pt/icons/tabler';
2
2
  /**
3
3
  * Rejestruje pełny zestaw Tabler Icons (5130), dzięki czemu `KptIcon` może użyć dowolnej
4
- * ikony po nazwie. Wywołaj raz, w wejściu aplikacji — rejestr jest globalny, więc nie ma
4
+ * ikony po nazwie. Wywołaj raz, w wejściu aplikacji - rejestr jest globalny, więc nie ma
5
5
  * potrzeby owijać drzewa żadnym providerem.
6
6
  *
7
7
  * Wciąga komplet (~1,2 MB), więc to ścieżka prototypowa. W produkcji zaimportuj ikony
8
- * po nazwie i podaj je do `registerKptIcons([...])` z rdzenia `@konce-pt/react` — ta funkcja
8
+ * po nazwie i podaj je do `registerKptIcons([...])` z rdzenia `@konce-pt/react` - ta funkcja
9
9
  * nie importuje pełnego zestawu, więc bundler zostawia wyłącznie użyte ikony.
10
10
  *
11
11
  * @example
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @konce-pt/react/icons — pełny zestaw Tabler Icons (MIT) dla `KptIcon`.
2
+ * @konce-pt/react/icons - pełny zestaw Tabler Icons (MIT) dla `KptIcon`.
3
3
  * Opcjonalny (pobierany tylko przy imporcie), by nie powiększać rdzenia biblioteki.
4
4
  */
5
5
  import { KPT_TABLER_ICONS } from '@konce-pt/icons/tabler';
@@ -9,11 +9,11 @@ import { registerKptIcons } from "../icon/icon-registry.js";
9
9
  export * from '@konce-pt/icons/tabler';
10
10
  /**
11
11
  * Rejestruje pełny zestaw Tabler Icons (5130), dzięki czemu `KptIcon` może użyć dowolnej
12
- * ikony po nazwie. Wywołaj raz, w wejściu aplikacji — rejestr jest globalny, więc nie ma
12
+ * ikony po nazwie. Wywołaj raz, w wejściu aplikacji - rejestr jest globalny, więc nie ma
13
13
  * potrzeby owijać drzewa żadnym providerem.
14
14
  *
15
15
  * Wciąga komplet (~1,2 MB), więc to ścieżka prototypowa. W produkcji zaimportuj ikony
16
- * po nazwie i podaj je do `registerKptIcons([...])` z rdzenia `@konce-pt/react` — ta funkcja
16
+ * po nazwie i podaj je do `registerKptIcons([...])` z rdzenia `@konce-pt/react` - ta funkcja
17
17
  * nie importuje pełnego zestawu, więc bundler zostawia wyłącznie użyte ikony.
18
18
  *
19
19
  * @example
@@ -38,7 +38,7 @@ export function KptImage({ src, alt = '', width = null, preview = false, locale,
38
38
  if (!preview) {
39
39
  return (_jsx("div", { className: cn('kpt-image-host', className), ...rest, children: _jsx("div", { className: "kpt-image", style: style, children: _jsx("img", { className: "kpt-image__img", src: src, alt: alt }) }) }));
40
40
  }
41
- // `close` przychodzi z każdej drogi: `×`, `Escape`, tło.
41
+ // `close` przychodzi z każdej drogi: `x`, `Escape`, tło.
42
42
  const onClosed = () => {
43
43
  setOpen(false);
44
44
  triggerRef.current?.focus();
@@ -8,26 +8,26 @@ Import: `import { KptImage } from '@konce-pt/react';`
8
8
  <!-- with preview: -->
9
9
  <button class="kpt-image kpt-image--preview" type="button" aria-haspopup="dialog"
10
10
  aria-label="Show full size: Photo" style="width:240px">
11
- <img class="kpt-image__img" src="…" alt="">
12
- <span class="kpt-image__mask" aria-hidden="true">…zoom-in…</span>
11
+ <img class="kpt-image__img" src="..." alt="">
12
+ <span class="kpt-image__mask" aria-hidden="true">...zoom-in...</span>
13
13
  </button>
14
14
  <dialog class="kpt-image__overlay" aria-label="Photo">
15
- <button class="kpt-image__close" type="button" aria-label="Close">…</button>
16
- <img class="kpt-image__full" src="…" alt="Photo" loading="lazy">
15
+ <button class="kpt-image__close" type="button" aria-label="Close">...</button>
16
+ <img class="kpt-image__full" src="..." alt="Photo" loading="lazy">
17
17
  </dialog>
18
- <!-- without preview: <div class="kpt-image"><img class="kpt-image__img" …></div> -->
18
+ <!-- without preview: <div class="kpt-image"><img class="kpt-image__img" ...></div> -->
19
19
  </div>
20
20
 
21
21
  ## Props
22
22
  - `src`: string (required); `alt`: string
23
- - `width`: string | null — a CSS length, e.g. `'240px'`
24
- - `preview`: boolean — the thumbnail becomes a button opening a modal preview
23
+ - `width`: string | null - a CSS length, e.g. `'240px'`
24
+ - `preview`: boolean - the thumbnail becomes a button opening a modal preview
25
25
  - `className`, `ref` and every other `<div>` prop go to the host
26
26
 
27
27
  ## The overlay closes around the photo, not on it
28
- The dialog fills the viewport, so a click on the dialog element itself — not on the photo or the
29
- × — is a click on the backdrop and closes the preview. Clicking the photo (to look closer, to drag
30
- it) does not dismiss it; Escape and × are the explicit ways out.
28
+ The dialog fills the viewport, so a click on the dialog element itself - not on the photo or the
29
+ x - is a click on the backdrop and closes the preview. Clicking the photo (to look closer, to drag
30
+ it) does not dismiss it; Escape and x are the explicit ways out.
31
31
 
32
32
  ## The mask is decorative
33
33
  The zoom-in overlay is `aria-hidden`: it repeats what the cursor (`zoom-in`) already says and would
@@ -41,13 +41,13 @@ only add noise for a screen reader.
41
41
  The thumbnail is named from `image.previewOf` (`{alt}`) or `image.preview`; the close button from `common.close`.
42
42
 
43
43
  ## Tokens
44
- The radius `--kpt-radius-md`; the backdrop and the hover mask `--kpt-color-overlay-scrim`; the × button and the magnifier disc `--kpt-color-surface` / `--kpt-color-on-surface` with `--kpt-elevation-2`.
44
+ The radius `--kpt-radius-md`; the backdrop and the hover mask `--kpt-color-overlay-scrim`; the x button and the magnifier disc `--kpt-color-surface` / `--kpt-color-on-surface` with `--kpt-elevation-2`.
45
45
 
46
46
  ## Accessibility
47
- With `preview`, the thumbnail is a `<button aria-haspopup="dialog">` named “Show full size: <alt>”
47
+ With `preview`, the thumbnail is a `<button aria-haspopup="dialog">` named "Show full size: <alt>"
48
48
  (`image.previewOf`, or `image.preview` without `alt`), so it is reached with Tab and opened with
49
49
  Enter or Space; the magnifier shows on hover and on `:focus-visible`. The preview is a native modal
50
- `<dialog>` opened with `showModal()` and named by `alt`: focus moves to its × button and stays inside,
50
+ `<dialog>` opened with `showModal()` and named by `alt`: focus moves to its x button and stays inside,
51
51
  Escape closes it, the page behind is inert, document scrolling is locked while it is open, and focus
52
52
  returns to the thumbnail. It sits in the top layer, so no ancestor with `transform` or
53
53
  `overflow: hidden` can clip it.
@@ -1,4 +1,6 @@
1
1
  import { type ComponentPropsWithRef } from 'react';
2
+ import type { KptSpeechMode } from '@konce-pt/speech';
3
+ import { type KptSpeechColor } from '../speech/speech-button.tsx';
2
4
  import type { KptHostProps } from '../internal/types.ts';
3
5
  export type KptInputType = 'text' | 'email' | 'password' | 'number' | 'search' | 'tel' | 'url' | 'time';
4
6
  export interface KptInputProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'required'> {
@@ -14,20 +16,31 @@ export interface KptInputProps extends Omit<ComponentPropsWithRef<'input'>, 'typ
14
16
  /**
15
17
  * Czy pole było dotknięte. Pominięty = stan błędu pokazuje się od razu po `invalid`,
16
18
  * bo w Reakcie to zwykle biblioteka formularza decyduje, kiedy błąd jest gotowy.
17
- * Podaj go, gdy chcesz bramkę „dopiero po dotknięciu" znaną z portu Angulara.
19
+ * Podaj go, gdy chcesz bramkę "dopiero po dotknięciu" znaną z portu Angulara.
18
20
  */
19
21
  touched?: boolean;
20
- /** Wygodniejszy odpowiednik `onChange` — dostaje samą wartość. */
22
+ /** Wygodniejszy odpowiednik `onChange` - dostaje samą wartość. */
21
23
  onValueChange?: (value: string) => void;
22
- /** Wywoływane na `blur` — moment, w którym pole staje się dotknięte. */
24
+ /** Wywoływane na `blur` - moment, w którym pole staje się dotknięte. */
23
25
  onTouch?: () => void;
24
26
  /** Propsy wrappera hosta (`.kpt-input-host`). `className` i `ref` idą na `<input>`. */
25
27
  hostProps?: KptHostProps<'span'>;
28
+ /** Mikrofon na końcu pola (Web Speech API). Bez wsparcia przeglądarki się nie pokazuje. */
29
+ speech?: boolean;
30
+ /** Język dyktowania (BCP 47); bez niego z `KptI18nProvider`. */
31
+ speechLang?: string;
32
+ /** Kolor "stop" i fali w trakcie nasłuchu; domyślnie kolor motywu. */
33
+ speechColor?: KptSpeechColor;
34
+ /**
35
+ * `insert` (domyślnie, w kursor), `append` albo `replace` - pole czyści się w chwili kliknięcia
36
+ * mikrofonu, a dyktowanie kończy się po jednej wypowiedzi (wzorzec wyszukiwarki).
37
+ */
38
+ speechMode?: KptSpeechMode;
26
39
  }
27
40
  /**
28
41
  * Pole tekstowe Koncept UI. Renderuje natywny `<input>` w hoście `.kpt-input-host`.
29
42
  *
30
- * Działa kontrolowane (`value` + `onValueChange`) i niekontrolowane (`defaultValue`) —
43
+ * Działa kontrolowane (`value` + `onValueChange`) i niekontrolowane (`defaultValue`) -
31
44
  * w drugim trybie wartość należy do DOM, więc natywny `<form>`, `<form action>`, reset
32
45
  * formularza i React Hook Form (`register`) działają bez adaptera.
33
46
  *
@@ -38,4 +51,4 @@ export interface KptInputProps extends Omit<ComponentPropsWithRef<'input'>, 'typ
38
51
  * <KptInput name="email" type="email" defaultValue="" />
39
52
  * <KptInput value={email} onValueChange={setEmail} invalid={!ok} touched={blurred} />
40
53
  */
41
- export declare function KptInput({ type, required, invalid, touched, onValueChange, onTouch, hostProps, className, id, onChange, onBlur, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...rest }: Readonly<KptInputProps>): import("react").JSX.Element;
54
+ export declare function KptInput({ type, required, invalid, touched, onValueChange, onTouch, hostProps, className, id, onChange, onBlur, ref, speech, speechLang, speechColor, speechMode, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, ...rest }: Readonly<KptInputProps>): import("react").JSX.Element;