@konce-pt/react 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +122 -64
  2. package/dist/accordion/accordion.d.ts +14 -6
  3. package/dist/accordion/accordion.js +14 -7
  4. package/dist/accordion/llms.txt +22 -10
  5. package/dist/alert/alert.d.ts +2 -2
  6. package/dist/alert/alert.js +2 -2
  7. package/dist/alert/llms.txt +10 -10
  8. package/dist/app-shell/app-shell.d.ts +14 -14
  9. package/dist/app-shell/app-shell.js +11 -11
  10. package/dist/app-shell/llms.txt +13 -13
  11. package/dist/auth/auth-types.d.ts +6 -6
  12. package/dist/auth/auth.d.ts +2 -2
  13. package/dist/auth/auth.js +7 -7
  14. package/dist/auth/llms.txt +9 -9
  15. package/dist/autocomplete/autocomplete.d.ts +19 -6
  16. package/dist/autocomplete/autocomplete.js +23 -10
  17. package/dist/autocomplete/llms.txt +16 -5
  18. package/dist/avatar/avatar.d.ts +6 -6
  19. package/dist/avatar/avatar.js +5 -5
  20. package/dist/avatar/llms.txt +10 -10
  21. package/dist/avatar-group/avatar-group.d.ts +4 -4
  22. package/dist/avatar-group/avatar-group.js +3 -3
  23. package/dist/avatar-group/llms.txt +8 -8
  24. package/dist/backdrop/backdrop.d.ts +7 -7
  25. package/dist/backdrop/backdrop.js +16 -16
  26. package/dist/backdrop/llms.txt +27 -27
  27. package/dist/badge/badge.d.ts +3 -3
  28. package/dist/badge/badge.js +1 -1
  29. package/dist/badge/llms.txt +11 -11
  30. package/dist/bottom-sheet/bottom-sheet.d.ts +4 -4
  31. package/dist/bottom-sheet/bottom-sheet.js +2 -2
  32. package/dist/bottom-sheet/llms.txt +9 -9
  33. package/dist/breadcrumb/breadcrumb.d.ts +2 -2
  34. package/dist/breadcrumb/breadcrumb.js +3 -3
  35. package/dist/breadcrumb/llms.txt +3 -3
  36. package/dist/button/button.d.ts +3 -3
  37. package/dist/button/button.js +8 -8
  38. package/dist/button/llms.txt +27 -19
  39. package/dist/button-group/button-group.d.ts +9 -9
  40. package/dist/button-group/button-group.js +30 -8
  41. package/dist/button-group/llms.txt +20 -14
  42. package/dist/card/card.d.ts +8 -8
  43. package/dist/card/card.js +6 -6
  44. package/dist/card/llms.txt +20 -20
  45. package/dist/carousel/carousel.d.ts +6 -6
  46. package/dist/carousel/carousel.js +4 -4
  47. package/dist/carousel/llms.txt +10 -10
  48. package/dist/charts/chart-legend.d.ts +3 -3
  49. package/dist/charts/chart-legend.js +1 -1
  50. package/dist/charts/chart-tooltip.d.ts +3 -3
  51. package/dist/charts/chart-tooltip.js +1 -1
  52. package/dist/charts/chart.d.ts +1 -1
  53. package/dist/charts/chart.js +8 -8
  54. package/dist/charts/llms.txt +6 -6
  55. package/dist/charts-entry/public-api.js +2 -2
  56. package/dist/chat/chat.d.ts +17 -10
  57. package/dist/chat/chat.js +42 -18
  58. package/dist/chat/llms.txt +32 -17
  59. package/dist/chat-composer/chat-composer.d.ts +17 -7
  60. package/dist/chat-composer/chat-composer.js +21 -8
  61. package/dist/chat-composer/llms.txt +20 -11
  62. package/dist/chat-dock/chat-dock.d.ts +11 -4
  63. package/dist/chat-dock/chat-dock.js +9 -6
  64. package/dist/chat-dock/llms.txt +15 -14
  65. package/dist/chat-entry/public-api.js +1 -1
  66. package/dist/chat-message/chat-message.d.ts +12 -5
  67. package/dist/chat-message/chat-message.js +17 -7
  68. package/dist/chat-message/llms.txt +16 -15
  69. package/dist/chat-typing/chat-typing.d.ts +2 -2
  70. package/dist/chat-typing/chat-typing.js +3 -3
  71. package/dist/chat-typing/llms.txt +6 -6
  72. package/dist/checkbox/checkbox.d.ts +13 -6
  73. package/dist/checkbox/checkbox.js +26 -7
  74. package/dist/checkbox/llms.txt +24 -12
  75. package/dist/chip/chip.d.ts +4 -4
  76. package/dist/chip/chip.js +2 -2
  77. package/dist/chip/llms.txt +11 -11
  78. package/dist/chips-input/chips-input.d.ts +4 -4
  79. package/dist/chips-input/chips-input.js +35 -9
  80. package/dist/chips-input/llms.txt +15 -8
  81. package/dist/clock/clock.d.ts +4 -4
  82. package/dist/clock/clock.js +7 -7
  83. package/dist/clock/llms.txt +8 -8
  84. package/dist/color-picker/color-picker.d.ts +6 -6
  85. package/dist/color-picker/color-picker.js +3 -3
  86. package/dist/color-picker/llms.txt +5 -5
  87. package/dist/confirm/confirm-container.d.ts +3 -3
  88. package/dist/confirm/confirm-container.js +5 -5
  89. package/dist/confirm/confirm-store.d.ts +4 -4
  90. package/dist/confirm/confirm-store.js +7 -7
  91. package/dist/confirm/llms.txt +6 -6
  92. package/dist/context-menu/context-menu.d.ts +1 -1
  93. package/dist/context-menu/context-menu.js +5 -5
  94. package/dist/context-menu/llms.txt +7 -7
  95. package/dist/data-table/data-table-types.d.ts +5 -5
  96. package/dist/data-table/data-table.d.ts +29 -8
  97. package/dist/data-table/data-table.js +340 -95
  98. package/dist/data-table/export-csv.d.ts +3 -3
  99. package/dist/data-table/export-csv.js +4 -4
  100. package/dist/data-table/llms.txt +127 -94
  101. package/dist/data-view/data-view.d.ts +13 -5
  102. package/dist/data-view/data-view.js +67 -6
  103. package/dist/data-view/llms.txt +29 -10
  104. package/dist/date-range/date-range.d.ts +9 -9
  105. package/dist/date-range/date-range.js +24 -24
  106. package/dist/date-range/llms.txt +20 -20
  107. package/dist/datepicker/datepicker.d.ts +10 -10
  108. package/dist/datepicker/datepicker.js +29 -29
  109. package/dist/datepicker/llms.txt +24 -24
  110. package/dist/dialog/dialog.d.ts +4 -4
  111. package/dist/dialog/dialog.js +4 -4
  112. package/dist/dialog/llms.txt +11 -11
  113. package/dist/divider/divider.d.ts +1 -1
  114. package/dist/divider/llms.txt +4 -4
  115. package/dist/drawer/drawer.d.ts +5 -5
  116. package/dist/drawer/drawer.js +2 -2
  117. package/dist/drawer/llms.txt +11 -11
  118. package/dist/empty/empty.d.ts +2 -2
  119. package/dist/empty/empty.js +1 -1
  120. package/dist/empty/llms.txt +9 -9
  121. package/dist/fab/fab.d.ts +1 -1
  122. package/dist/fab/fab.js +1 -1
  123. package/dist/fab/llms.txt +10 -6
  124. package/dist/fieldset/fieldset.d.ts +18 -4
  125. package/dist/fieldset/fieldset.js +9 -6
  126. package/dist/fieldset/llms.txt +26 -9
  127. package/dist/file-upload/file-upload.d.ts +3 -3
  128. package/dist/file-upload/file-upload.js +7 -7
  129. package/dist/file-upload/llms.txt +7 -7
  130. package/dist/form-field/form-field-context.d.ts +4 -4
  131. package/dist/form-field/form-field.d.ts +12 -4
  132. package/dist/form-field/form-field.js +26 -6
  133. package/dist/form-field/llms.txt +25 -11
  134. package/dist/galleria/galleria.d.ts +3 -3
  135. package/dist/galleria/galleria.js +5 -5
  136. package/dist/galleria/llms.txt +7 -7
  137. package/dist/grid/col.d.ts +4 -4
  138. package/dist/grid/col.js +2 -2
  139. package/dist/grid/flex.d.ts +3 -3
  140. package/dist/grid/flex.js +1 -1
  141. package/dist/grid/grid.d.ts +7 -7
  142. package/dist/grid/grid.js +3 -3
  143. package/dist/grid/layout.d.ts +2 -2
  144. package/dist/grid/layout.js +2 -2
  145. package/dist/grid/llms.txt +15 -15
  146. package/dist/grid-entry/public-api.js +1 -1
  147. package/dist/i18n/i18n-context.d.ts +3 -3
  148. package/dist/i18n/i18n-context.js +7 -7
  149. package/dist/icon/icon-registry.d.ts +3 -3
  150. package/dist/icon/icon-registry.js +3 -3
  151. package/dist/icon/icon.d.ts +4 -4
  152. package/dist/icon/icon.js +6 -6
  153. package/dist/icon/llms.txt +13 -13
  154. package/dist/icon-button/icon-button.d.ts +2 -2
  155. package/dist/icon-button/icon-button.js +1 -1
  156. package/dist/icon-button/llms.txt +9 -5
  157. package/dist/icons-entry/public-api.d.ts +2 -2
  158. package/dist/icons-entry/public-api.js +3 -3
  159. package/dist/image/image.js +1 -1
  160. package/dist/image/llms.txt +13 -13
  161. package/dist/input/input.d.ts +18 -5
  162. package/dist/input/input.js +21 -6
  163. package/dist/input/llms.txt +25 -11
  164. package/dist/input-mask/input-mask.d.ts +1 -1
  165. package/dist/input-mask/input-mask.js +2 -2
  166. package/dist/input-mask/llms.txt +5 -5
  167. package/dist/input-number/input-number.d.ts +9 -9
  168. package/dist/input-number/input-number.js +11 -11
  169. package/dist/input-number/llms.txt +14 -14
  170. package/dist/input-otp/input-otp.d.ts +6 -6
  171. package/dist/input-otp/input-otp.js +10 -10
  172. package/dist/input-otp/llms.txt +9 -9
  173. package/dist/internal/calendar-focus.d.ts +1 -1
  174. package/dist/internal/calendar-focus.js +3 -3
  175. package/dist/internal/cn.d.ts +1 -1
  176. package/dist/internal/mask.d.ts +2 -2
  177. package/dist/internal/mask.js +4 -4
  178. package/dist/internal/option-key.d.ts +2 -2
  179. package/dist/internal/option-key.js +2 -2
  180. package/dist/internal/option-nav.d.ts +4 -4
  181. package/dist/internal/option-nav.js +5 -5
  182. package/dist/internal/overlay-container.js +1 -1
  183. package/dist/internal/overlay.d.ts +3 -3
  184. package/dist/internal/overlay.js +8 -8
  185. package/dist/internal/password-strength.d.ts +2 -2
  186. package/dist/internal/password-strength.js +6 -6
  187. package/dist/internal/roving.d.ts +2 -2
  188. package/dist/internal/roving.js +3 -3
  189. package/dist/internal/scroll-lock.d.ts +1 -1
  190. package/dist/internal/scroll-lock.js +2 -2
  191. package/dist/internal/slot-children.d.ts +3 -3
  192. package/dist/internal/slot-children.js +4 -4
  193. package/dist/internal/slot.d.ts +3 -3
  194. package/dist/internal/slot.js +2 -2
  195. package/dist/internal/step.d.ts +3 -3
  196. package/dist/internal/step.js +4 -4
  197. package/dist/internal/tween.d.ts +5 -5
  198. package/dist/internal/tween.js +5 -5
  199. package/dist/internal/types.d.ts +2 -2
  200. package/dist/internal/use-breakpoint.d.ts +2 -2
  201. package/dist/internal/use-breakpoint.js +4 -4
  202. package/dist/internal/use-controllable-state.d.ts +1 -1
  203. package/dist/internal/use-controllable-state.js +3 -3
  204. package/dist/internal/use-id.d.ts +2 -2
  205. package/dist/internal/use-id.js +2 -2
  206. package/dist/internal/use-modal-focus.d.ts +1 -1
  207. package/dist/internal/use-modal-focus.js +3 -3
  208. package/dist/knob/knob.d.ts +4 -4
  209. package/dist/knob/knob.js +14 -10
  210. package/dist/knob/llms.txt +17 -12
  211. package/dist/listbox/listbox.d.ts +6 -6
  212. package/dist/listbox/listbox.js +9 -9
  213. package/dist/listbox/llms.txt +10 -10
  214. package/dist/loader/llms.txt +56 -0
  215. package/dist/loader/loader.d.ts +49 -0
  216. package/dist/loader/loader.js +68 -0
  217. package/dist/map/llms.txt +25 -22
  218. package/dist/map/map-create-dialog.d.ts +4 -4
  219. package/dist/map/map-create-dialog.js +10 -10
  220. package/dist/map/map-hours-field.d.ts +4 -4
  221. package/dist/map/map-hours-field.js +7 -7
  222. package/dist/map/map-image-field.d.ts +2 -2
  223. package/dist/map/map-image-field.js +4 -4
  224. package/dist/map/map-legend.d.ts +4 -4
  225. package/dist/map/map-legend.js +2 -2
  226. package/dist/map/map-poi-card.d.ts +3 -3
  227. package/dist/map/map-poi-card.js +9 -9
  228. package/dist/map/map-search.d.ts +17 -6
  229. package/dist/map/map-search.js +21 -18
  230. package/dist/map/map.d.ts +21 -14
  231. package/dist/map/map.js +30 -29
  232. package/dist/map/ports.d.ts +9 -9
  233. package/dist/map/ports.js +6 -6
  234. package/dist/map-entry/public-api.js +2 -2
  235. package/dist/megamenu/llms.txt +9 -9
  236. package/dist/megamenu/megamenu.d.ts +6 -6
  237. package/dist/megamenu/megamenu.js +10 -10
  238. package/dist/mention/llms.txt +15 -15
  239. package/dist/mention/mention.d.ts +5 -5
  240. package/dist/mention/mention.js +2 -2
  241. package/dist/mention/mentions.d.ts +1 -1
  242. package/dist/mention/mentions.js +1 -1
  243. package/dist/menu/llms.txt +12 -12
  244. package/dist/menu/menu-item.d.ts +4 -4
  245. package/dist/menu/menu-keys.d.ts +2 -2
  246. package/dist/menu/menu-keys.js +5 -5
  247. package/dist/menu/menu.d.ts +2 -2
  248. package/dist/menu/menu.js +6 -6
  249. package/dist/menubar/llms.txt +10 -10
  250. package/dist/menubar/menubar.d.ts +5 -5
  251. package/dist/menubar/menubar.js +10 -10
  252. package/dist/meter-group/llms.txt +12 -12
  253. package/dist/meter-group/meter-group.d.ts +2 -2
  254. package/dist/meter-group/meter-group.js +1 -1
  255. package/dist/motion/motion-context.d.ts +22 -0
  256. package/dist/motion/motion-context.js +28 -0
  257. package/dist/order-list/llms.txt +22 -10
  258. package/dist/order-list/order-list.d.ts +12 -4
  259. package/dist/order-list/order-list.js +104 -21
  260. package/dist/paginator/llms.txt +8 -8
  261. package/dist/paginator/paginator.js +1 -1
  262. package/dist/panel/llms.txt +25 -13
  263. package/dist/panel/panel.d.ts +11 -3
  264. package/dist/panel/panel.js +7 -4
  265. package/dist/password/llms.txt +16 -8
  266. package/dist/password/password.d.ts +2 -2
  267. package/dist/password/password.js +24 -3
  268. package/dist/peek/llms.txt +10 -10
  269. package/dist/peek/peek.d.ts +6 -6
  270. package/dist/peek/peek.js +7 -7
  271. package/dist/pick-list/llms.txt +33 -13
  272. package/dist/pick-list/pick-list.d.ts +12 -4
  273. package/dist/pick-list/pick-list.js +111 -23
  274. package/dist/popover/llms.txt +11 -11
  275. package/dist/popover/popover.d.ts +4 -4
  276. package/dist/popover/popover.js +5 -5
  277. package/dist/progress/llms.txt +17 -17
  278. package/dist/progress/progress.d.ts +7 -7
  279. package/dist/progress/progress.js +6 -6
  280. package/dist/public-api.d.ts +15 -3
  281. package/dist/public-api.js +13 -7
  282. package/dist/radio-group/llms.txt +13 -6
  283. package/dist/radio-group/radio-group.d.ts +11 -4
  284. package/dist/radio-group/radio-group.js +15 -7
  285. package/dist/rating/llms.txt +20 -13
  286. package/dist/rating/rating-pointer.d.ts +16 -0
  287. package/dist/rating/rating-pointer.js +26 -0
  288. package/dist/rating/rating.d.ts +6 -6
  289. package/dist/rating/rating.js +76 -12
  290. package/dist/rich-text/lists.d.ts +2 -2
  291. package/dist/rich-text/lists.js +7 -7
  292. package/dist/rich-text/llms.txt +26 -17
  293. package/dist/rich-text/rich-text.d.ts +12 -7
  294. package/dist/rich-text/rich-text.js +78 -54
  295. package/dist/rich-text/sanitize.d.ts +3 -3
  296. package/dist/rich-text/sanitize.js +12 -12
  297. package/dist/rich-text/tables.d.ts +3 -3
  298. package/dist/rich-text/tables.js +3 -3
  299. package/dist/roadmap/llms.txt +15 -15
  300. package/dist/roadmap/roadmap.d.ts +6 -6
  301. package/dist/roadmap/roadmap.js +19 -19
  302. package/dist/roadmap-entry/public-api.js +2 -2
  303. package/dist/scroll-top/llms.txt +6 -6
  304. package/dist/scroll-top/scroll-top.d.ts +1 -1
  305. package/dist/scroll-top/scroll-top.js +1 -1
  306. package/dist/select/llms.txt +19 -12
  307. package/dist/select/select.d.ts +8 -8
  308. package/dist/select/select.js +47 -21
  309. package/dist/shared/types.d.ts +5 -5
  310. package/dist/shared/types.js +1 -1
  311. package/dist/sidenav/llms.txt +9 -9
  312. package/dist/sidenav/sidenav.d.ts +1 -1
  313. package/dist/sidenav/sidenav.js +1 -1
  314. package/dist/skeleton/llms.txt +3 -3
  315. package/dist/skeleton/skeleton.d.ts +1 -1
  316. package/dist/skeleton/skeleton.js +1 -1
  317. package/dist/slider/llms.txt +32 -13
  318. package/dist/slider/slider-drag.d.ts +26 -0
  319. package/dist/slider/slider-drag.js +79 -0
  320. package/dist/slider/slider.d.ts +6 -5
  321. package/dist/slider/slider.js +27 -8
  322. package/dist/speech/llms.txt +97 -0
  323. package/dist/speech/speech-button.d.ts +44 -0
  324. package/dist/speech/speech-button.js +86 -0
  325. package/dist/speech/speech-wave.d.ts +19 -0
  326. package/dist/speech/speech-wave.js +16 -0
  327. package/dist/speech/use-speech-recognition.d.ts +81 -0
  328. package/dist/speech/use-speech-recognition.js +179 -0
  329. package/dist/speed-dial/llms.txt +14 -8
  330. package/dist/speed-dial/speed-dial.d.ts +1 -1
  331. package/dist/speed-dial/speed-dial.js +1 -1
  332. package/dist/spinner/llms.txt +7 -7
  333. package/dist/spinner/spinner.d.ts +1 -1
  334. package/dist/spinner/spinner.js +1 -1
  335. package/dist/split-button/llms.txt +21 -15
  336. package/dist/split-button/split-button.d.ts +2 -2
  337. package/dist/split-button/split-button.js +4 -4
  338. package/dist/splitter/llms.txt +11 -11
  339. package/dist/splitter/splitter.d.ts +3 -3
  340. package/dist/splitter/splitter.js +5 -5
  341. package/dist/stepper/llms.txt +33 -14
  342. package/dist/stepper/stepper.d.ts +6 -6
  343. package/dist/stepper/stepper.js +53 -10
  344. package/dist/switch/llms.txt +12 -5
  345. package/dist/switch/switch.d.ts +10 -3
  346. package/dist/switch/switch.js +12 -5
  347. package/dist/switch-group/llms.txt +9 -9
  348. package/dist/switch-group/switch-group.d.ts +4 -4
  349. package/dist/switch-group/switch-group.js +4 -4
  350. package/dist/tabs/llms.txt +10 -10
  351. package/dist/tabs/tabs.d.ts +5 -5
  352. package/dist/tabs/tabs.js +8 -8
  353. package/dist/textarea/llms.txt +23 -12
  354. package/dist/textarea/textarea.d.ts +19 -6
  355. package/dist/textarea/textarea.js +21 -7
  356. package/dist/timeline/llms.txt +4 -4
  357. package/dist/timeline/timeline.d.ts +1 -1
  358. package/dist/timeline/timeline.js +1 -1
  359. package/dist/toast/llms.txt +47 -17
  360. package/dist/toast/toast-container.d.ts +9 -3
  361. package/dist/toast/toast-container.js +17 -9
  362. package/dist/toast/toast-store.d.ts +40 -4
  363. package/dist/toast/toast-store.js +36 -1
  364. package/dist/toolbar/llms.txt +7 -7
  365. package/dist/toolbar/toolbar.d.ts +3 -3
  366. package/dist/toolbar/toolbar.js +2 -2
  367. package/dist/tooltip/llms.txt +10 -10
  368. package/dist/tooltip/tooltip.d.ts +3 -3
  369. package/dist/tooltip/tooltip.js +18 -18
  370. package/dist/tree/llms.txt +25 -12
  371. package/dist/tree/tree-keys.d.ts +5 -5
  372. package/dist/tree/tree-keys.js +7 -7
  373. package/dist/tree/tree.d.ts +14 -7
  374. package/dist/tree/tree.js +53 -18
  375. package/dist/update/llms.txt +54 -0
  376. package/dist/update/update.d.ts +49 -0
  377. package/dist/update/update.js +82 -0
  378. package/package.json +15 -13
@@ -8,33 +8,33 @@ Import: `import { KptDatepicker } from '@konce-pt/react';`
8
8
  <div class="kpt-datepicker" role="combobox" tabindex="0" aria-haspopup="dialog">
9
9
  <span class="kpt-datepicker__value">06.09.2026</span>
10
10
  <span class="kpt-datepicker__spacer"></span>
11
- <button class="kpt-datepicker__clear">…</button>
12
- <span class="kpt-icon-host kpt-datepicker__icon">…</span>
11
+ <button class="kpt-datepicker__clear">...</button>
12
+ <span class="kpt-icon-host kpt-datepicker__icon">...</span>
13
13
  </div>
14
14
  </div>
15
- <!-- in a portal: <div class="kpt-calendar">…</div> -->
15
+ <!-- in a portal: <div class="kpt-calendar">...</div> -->
16
16
 
17
17
  ## Props
18
- - `value` / `defaultValue` / `onValueChange` — the value as a string; its format follows the mode:
18
+ - `value` / `defaultValue` / `onValueChange` - the value as a string; its format follows the mode:
19
19
  'YYYY-MM-DD' / 'YYYY-MM' / 'YYYY' / 'MM' / 'YYYY-MM-DDTHH:mm' / 'HH:mm'
20
20
  - `selectionMode`: `'date'` (default) | `'monthYear'` | `'year'` | `'month'` | `'datetime'` | `'time'`
21
- - `startView`: `'day' | 'month' | 'year' | 'decade' | null` — the level the panel opens at; `null`
21
+ - `startView`: `'day' | 'month' | 'year' | 'decade' | null` - the level the panel opens at; `null`
22
22
  means the level where the mode commits. It is never lowered below that level, so
23
23
  `startView="day"` in 'year' mode is raised to 'year'.
24
24
  - `minDate`, `maxDate`: 'YYYY-MM-DD' strings
25
25
  - `monthDisplay`: `'long'` (default) | `'number'`; `displayFormat`: `'pl'` (default) | `'iso'` | `'locale'`
26
- - `hourFormat`: 12 | 24 (default 24) — the dial; the stored value is always 24h
27
- - `minuteStep`: number (default 1) — minute snapping on the dial
28
- - `open` / `onOpenChange` — the panel state, so it can be opened from outside
26
+ - `hourFormat`: 12 | 24 (default 24) - the dial; the stored value is always 24h
27
+ - `minuteStep`: number (default 1) - minute snapping on the dial
28
+ - `open` / `onOpenChange` - the panel state, so it can be opened from outside
29
29
  - `placeholder`, `ariaLabel`, `disabled`, `invalid`, `touched`
30
- - `onTouch()` — fires when the panel closes or focus leaves the closed trigger
30
+ - `onTouch()` - fires when the panel closes or focus leaves the closed trigger
31
31
  - `className`, `ref` and every other `<div>` prop go to the host
32
32
 
33
33
  ## Keyboard
34
34
  The date picker dialog pattern. The trigger has `aria-haspopup="dialog"` and `aria-expanded`;
35
- `Enter`, `Space` and `↓` open the panel — a `role="dialog"` named "Choose a date" — and move focus to
35
+ `Enter`, `Space` and `ArrowDown` open the panel - a `role="dialog"` named "Choose a date" - and move focus to
36
36
  the selected day, or today, clamped to `minDate`/`maxDate`.
37
- - Day grid: `←`/`→` one day, `↑`/`↓` one week, `Home`/`End` Monday and Sunday of the week,
37
+ - Day grid: `ArrowLeft`/`ArrowRight` one day, `ArrowUp`/`ArrowDown` one week, `Home`/`End` Monday and Sunday of the week,
38
38
  `PageUp`/`PageDown` one month, with `Shift` one year (the day is clamped to the month length).
39
39
  Crossing a month edge turns the page. Each day is named with the full date from `Intl`
40
40
  ("Thursday, October 8, 2026"), today has `aria-current="date"`, and only the focused day is
@@ -42,22 +42,22 @@ the selected day, or today, clamped to `minDate`/`maxDate`.
42
42
  - Month, year and decade grids: the arrows move between cells (three columns), `Home`/`End` to the ends.
43
43
  Clicking a title moves focus to the new grid.
44
44
  - `Tab` cycles inside the panel; `Escape` closes it. Picking a value (or "Done") closes the panel
45
- and returns focus to the trigger. `Delete`/`Backspace` on the trigger clears the value; the "×" button
45
+ and returns focus to the trigger. `Delete`/`Backspace` on the trigger clears the value; the "x" button
46
46
  sits outside the Tab order.
47
47
 
48
48
  ## The view stack
49
- The header is always `‹ title ›`: the arrows page the current level, the title goes one level up.
49
+ The header is always `< title >`: the arrows page the current level, the title goes one level up.
50
50
 
51
- day ‹ [June] [1979] › arrows ±1 month; the chips → months / years
52
- month ‹ [1979] › arrows ±1 year; the chip → years
53
- year ‹ [1970 – 1979] › arrows ±10 years; the chip → decades
54
- decade ‹ 1920 – 2039 › arrows ±120 years; the top of the stack
51
+ day < [June] [1979] > arrows +/-1 month; the chips -> months / years
52
+ month < [1979] > arrows +/-1 year; the chip -> years
53
+ year < [1970 - 1979] > arrows +/-10 years; the chip -> decades
54
+ decade < 1920 - 2039 > arrows +/-120 years; the top of the stack
55
55
 
56
56
  Clicking a cell above the committing level drills down; on that level it sets the value and closes
57
57
  the panel. An arrow dims when the whole neighbouring page falls outside `minDate`/`maxDate`.
58
58
 
59
59
  ## The logic lives in a package, the component only renders
60
- Every grid, bound and format comes from `@konce-pt/datetime` — pure functions with their own tests.
60
+ Every grid, bound and format comes from `@konce-pt/datetime` - pure functions with their own tests.
61
61
  The component holds nothing but React state: the page, the level, the time buffer.
62
62
 
63
63
  ## The panel is set up on open, not on click
@@ -66,7 +66,7 @@ outside through the `open` prop. The effect deliberately depends on `open` alone
66
66
  while the panel is open must not reset the view under the user's fingers.
67
67
 
68
68
  ## Requires
69
- `@konce-pt/styles/components` for the calendar styles. No CDK — the panel rides the internal
69
+ `@konce-pt/styles/components` for the calendar styles. No CDK - the panel rides the internal
70
70
  overlay primitive.
71
71
 
72
72
  ## Examples
@@ -83,16 +83,16 @@ navigation labels and "Done" come from the `datepicker` and `common` namespaces;
83
83
 
84
84
  ## Week start, display format and field state
85
85
  - The week starts by the active language (`Intl.Locale#getWeekInfo`, with a fallback list of regions):
86
- en / en-US on Sunday, pl, de, en-GB on Monday. `firstDayOfWeek` (1 = Monday … 7 = Sunday) overrides it;
86
+ en / en-US on Sunday, pl, de, en-GB on Monday. `firstDayOfWeek` (1 = Monday ... 7 = Sunday) overrides it;
87
87
  the headers, the grid and `Home`/`End` follow it.
88
- - `displayFormat`: `'pl'` (DD.MM.YYYY, default), `'iso'` (YYYY-MM-DD) or `'locale'` — order and separators
88
+ - `displayFormat`: `'pl'` (DD.MM.YYYY, default), `'iso'` (YYYY-MM-DD) or `'locale'` - order and separators
89
89
  from `Intl` (en-US: MM/DD/YYYY). The placeholder follows the format and its letters follow the language
90
90
  (EN `YYYY`, PL `RRRR`, the `datepicker.yearToken`/`monthToken`/`dayToken` keys). AM/PM come from `Intl`.
91
91
  - The field is `role="combobox"` with `aria-haspopup="dialog"` (the APG select-only combobox), so it carries
92
- `aria-required` (`required`), `aria-readonly` (`readOnly` — the value shows, the panel does not open,
92
+ `aria-required` (`required`), `aria-readonly` (`readOnly` - the value shows, the panel does not open,
93
93
  there is no clear button) and `aria-invalid`.
94
- - Turning the page with ‹ › is announced (`aria-live="polite"`); the title buttons are named
95
- "October, Choose month" — the visible text first (WCAG 2.5.3). Clearing the value counts as a touch.
94
+ - Turning the page with < > is announced (`aria-live="polite"`); the title buttons are named
95
+ "October, Choose month" - the visible text first (WCAG 2.5.3). Clearing the value counts as a touch.
96
96
  - "Today" is computed on every open, so a panel opened after midnight marks the right day.
97
97
 
98
98
  ## Label and description
@@ -7,22 +7,22 @@ export interface KptDialogProps extends Omit<ComponentPropsWithRef<'dialog'>, 'o
7
7
  onOpenChange: (open: boolean) => void;
8
8
  header?: string;
9
9
  /**
10
- * Szerokość okna: `sm` 24rem, `md` 32rem (domyślna), `lg` 48rem — zawsze przycięta do szerokości
10
+ * Szerokość okna: `sm` 24rem, `md` 32rem (domyślna), `lg` 48rem - zawsze przycięta do szerokości
11
11
  * okna przeglądarki. `lg` jest dla treści, której nie da się sensownie zwęzić: kodu, tabeli,
12
12
  * porównania dwóch kolumn.
13
13
  */
14
14
  size?: KptDialogSize;
15
- /** Pozwala zamknąć klawiszem Esc i przyciskiem ×. */
15
+ /** Pozwala zamknąć klawiszem Esc i przyciskiem x. */
16
16
  dismissible?: boolean;
17
17
  children?: ReactNode;
18
18
  }
19
19
  /**
20
- * Okno modalne na natywnym `<dialog>` — pułapka fokusu, Escape i backdrop pochodzą z platformy,
20
+ * Okno modalne na natywnym `<dialog>` - pułapka fokusu, Escape i backdrop pochodzą z platformy,
21
21
  * nie z naszego kodu. Stopkę wstaw przez `<KptDialog.Footer>`.
22
22
  *
23
23
  * Z `header` okno bierze nazwę z nagłówka (`aria-labelledby`); bez niego podaj `aria-label`.
24
24
  * Okno wymagające odpowiedzi dostaje `role="alertdialog"` i `aria-describedby` wprost z propsów
25
- * `<dialog>` — tak robi `KptConfirmContainer`.
25
+ * `<dialog>` - tak robi `KptConfirmContainer`.
26
26
  *
27
27
  * @example
28
28
  * <KptDialog open={open} onOpenChange={setOpen} header="Usunąć?">
@@ -10,12 +10,12 @@ import { KptOverlayContainerContext } from "../internal/overlay-container.js";
10
10
  import { useKptMessages } from "../i18n/i18n-context.js";
11
11
  import { KptIcon } from "../icon/icon.js";
12
12
  /**
13
- * Okno modalne na natywnym `<dialog>` — pułapka fokusu, Escape i backdrop pochodzą z platformy,
13
+ * Okno modalne na natywnym `<dialog>` - pułapka fokusu, Escape i backdrop pochodzą z platformy,
14
14
  * nie z naszego kodu. Stopkę wstaw przez `<KptDialog.Footer>`.
15
15
  *
16
16
  * Z `header` okno bierze nazwę z nagłówka (`aria-labelledby`); bez niego podaj `aria-label`.
17
17
  * Okno wymagające odpowiedzi dostaje `role="alertdialog"` i `aria-describedby` wprost z propsów
18
- * `<dialog>` — tak robi `KptConfirmContainer`.
18
+ * `<dialog>` - tak robi `KptConfirmContainer`.
19
19
  *
20
20
  * @example
21
21
  * <KptDialog open={open} onOpenChange={setOpen} header="Usunąć?">
@@ -30,7 +30,7 @@ export function KptDialog({ open, onOpenChange, header = '', size = 'md', dismis
30
30
  const { t } = useKptMessages({ locale, dictionary });
31
31
  const dialogRef = useRef(null);
32
32
  const titleId = useKptId(undefined, 'kpt-dialog-title');
33
- // Element trafia do kontekstu, więc musi wywołać render — sam `ref` by nie wystarczył.
33
+ // Element trafia do kontekstu, więc musi wywołać render - sam `ref` by nie wystarczył.
34
34
  const [dialogEl, setDialogEl] = useState(null);
35
35
  useEffect(() => {
36
36
  const el = dialogRef.current;
@@ -49,7 +49,7 @@ export function KptDialog({ open, onOpenChange, header = '', size = 'md', dismis
49
49
  /**
50
50
  * `close` przychodzi z każdej drogi. Przy `dismissible=false` zamknąć wolno tylko z kodu:
51
51
  * Chromium z CloseWatcherem pozwala anulować `cancel` jedynie po aktywacji użytkownika, więc drugi
52
- * Escape z rzędu zamyka okno mimo `preventDefault` — wtedy otwieramy je z powrotem.
52
+ * Escape z rzędu zamyka okno mimo `preventDefault` - wtedy otwieramy je z powrotem.
53
53
  */
54
54
  const onClose = () => {
55
55
  const el = dialogRef.current;
@@ -1,31 +1,31 @@
1
1
  # KptDialog (@konce-pt/react)
2
2
 
3
- A modal window on a native `<dialog>` — the focus trap, Escape and the backdrop come from the
3
+ A modal window on a native `<dialog>` - the focus trap, Escape and the backdrop come from the
4
4
  platform, not from our code. Import: `import { KptDialog } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <dialog class="kpt-dialog">
8
8
  <div class="kpt-dialog__header">
9
9
  <h2 class="kpt-dialog__title">Delete record?</h2>
10
- <button class="kpt-dialog__close" type="button" aria-label="Close">…</button>
10
+ <button class="kpt-dialog__close" type="button" aria-label="Close">...</button>
11
11
  </div>
12
- <div class="kpt-dialog__body">…children…</div>
13
- <div kptdialogfooter="">…footer…</div>
12
+ <div class="kpt-dialog__body">...children...</div>
13
+ <div kptdialogfooter="">...footer...</div>
14
14
  </dialog>
15
15
 
16
16
  ## Props
17
- - `open`: boolean, `onOpenChange(open)` — the dialog is always controlled; the browser can close it
17
+ - `open`: boolean, `onOpenChange(open)` - the dialog is always controlled; the browser can close it
18
18
  on its own (Escape, the `close` event), and the state has to follow
19
- - `header`: string — the title; with no header there is no header row and no × button
20
- - `dismissible`: boolean (default true) — allows Escape and shows ×
19
+ - `header`: string - the title; with no header there is no header row and no x button
20
+ - `dismissible`: boolean (default true) - allows Escape and shows x
21
21
  - `className`, `ref` and every other `<dialog>` prop go to the dialog
22
22
 
23
23
  ## Sub-components
24
- - `KptDialog.Footer` — lifted below the body; carries the `kptdialogfooter` attribute the shared
24
+ - `KptDialog.Footer` - lifted below the body; carries the `kptdialogfooter` attribute the shared
25
25
  SCSS targets.
26
26
 
27
27
  ## An overlay inside a modal
28
- `showModal()` lifts the dialog into the browser's TOP LAYER, which sits above the whole document —
28
+ `showModal()` lifts the dialog into the browser's TOP LAYER, which sits above the whole document -
29
29
  no `z-index` beats it. A `KptSelect` or `KptMenu` panel portalled to `document.body` would open
30
30
  INVISIBLE, hidden behind the modal backdrop. While it is open, `KptDialog` therefore makes itself
31
31
  the overlay container (through `KptOverlayContainerContext`), so those panels portal INSIDE the
@@ -47,10 +47,10 @@ dialog; the mechanism differs, the result does not.
47
47
 
48
48
  ## Accessibility
49
49
  A native `<dialog>` opened with `showModal()`: focus moves inside and is trapped, the rest of the
50
- page becomes inert, and Escape closes it — all from the browser. With `dismissible={false}` the
50
+ page becomes inert, and Escape closes it - all from the browser. With `dismissible={false}` the
51
51
  `cancel` event is prevented, so Escape stops working; give the user another way out.
52
52
  With `header` the dialog is named by its title (`aria-labelledby`); without one pass `aria-label`.
53
53
  `role="alertdialog"` and `aria-describedby` go straight through as `<dialog>` props.
54
54
 
55
55
  ## Scrolling and non-dismissible windows
56
- An open window locks page scrolling underneath (a shared counter with drawers and bottom sheets, so nested windows do not release each other). With `dismissible` off the window gets `closedby="none"`, and if a browser still closes it on a gesture (Chromium lets the second Escape in a row through `cancel`), it is reopened — only code can close it.
56
+ An open window locks page scrolling underneath (a shared counter with drawers and bottom sheets, so nested windows do not release each other). With `dismissible` off the window gets `closedby="none"`, and if a browser still closes it on a gesture (Chromium lets the second Escape in a row through `cancel`), it is reopened - only code can close it.
@@ -5,7 +5,7 @@ export interface KptDividerProps extends Omit<ComponentPropsWithRef<'div'>, 'chi
5
5
  /** Wcięcie (odstęp od krawędzi kontenera). */
6
6
  inset?: boolean;
7
7
  /**
8
- * Linia czysto ozdobna (np. między kartami, które i tak są osobnymi regionami) — bez
8
+ * Linia czysto ozdobna (np. między kartami, które i tak są osobnymi regionami) - bez
9
9
  * `role="separator"`, ukryta przed czytnikiem. Domyślnie separator jest ogłaszany.
10
10
  */
11
11
  decorative?: boolean;
@@ -1,6 +1,6 @@
1
1
  # KptDivider (@konce-pt/react)
2
2
 
3
- A separator — a horizontal or vertical line. Colour from `--kpt-color-border`.
3
+ A separator - a horizontal or vertical line. Colour from `--kpt-color-border`.
4
4
  Import: `import { KptDivider } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
@@ -8,13 +8,13 @@ Import: `import { KptDivider } from '@konce-pt/react';`
8
8
 
9
9
  ## Props
10
10
  - `orientation`: 'horizontal' | 'vertical' (default 'horizontal')
11
- - `inset`: boolean — an indent from the container edges
12
- - `decorative`: boolean — a purely ornamental line: no `role="separator"`, hidden from screen readers
11
+ - `inset`: boolean - an indent from the container edges
12
+ - `decorative`: boolean - a purely ornamental line: no `role="separator"`, hidden from screen readers
13
13
  - `className`, `ref` and every other `<div>` prop go to the divider
14
14
 
15
15
  ## Vertical needs a flex parent
16
16
  The vertical variant stretches to the height of its container, so it only makes sense inside a
17
- flex row — on its own it has nothing to measure against and collapses to nothing.
17
+ flex row - on its own it has nothing to measure against and collapses to nothing.
18
18
 
19
19
  ## Examples
20
20
  <KptDivider />
@@ -7,11 +7,11 @@ export interface KptDrawerProps extends Omit<ComponentPropsWithRef<'div'>, 'onCh
7
7
  position?: KptDrawerPosition;
8
8
  header?: string;
9
9
  /**
10
- * Nazwa panelu bez `header` — okno dialogowe bez nazwy czytnik ogłasza jako samo „okno
11
- * dialogowe” (WCAG 4.1.2). Z nagłówkiem nazwą jest nagłówek (`aria-labelledby`).
10
+ * Nazwa panelu bez `header` - okno dialogowe bez nazwy czytnik ogłasza jako samo "okno
11
+ * dialogowe" (WCAG 4.1.2). Z nagłówkiem nazwą jest nagłówek (`aria-labelledby`).
12
12
  */
13
13
  ariaLabel?: string;
14
- /** Pokazuje przycisk × i pozwala zamknąć klawiszem Escape. */
14
+ /** Pokazuje przycisk x i pozwala zamknąć klawiszem Escape. */
15
15
  dismissible?: boolean;
16
16
  closeOnBackdrop?: boolean;
17
17
  children?: ReactNode;
@@ -19,12 +19,12 @@ export interface KptDrawerProps extends Omit<ComponentPropsWithRef<'div'>, 'onCh
19
19
  /**
20
20
  * Panel wysuwany (drawer / off-canvas), niezależny od app-shell.
21
21
  *
22
- * Panel i backdrop są zawsze w DOM, a o widoczności decyduje klasa `is-open` — dzięki temu
22
+ * Panel i backdrop są zawsze w DOM, a o widoczności decyduje klasa `is-open` - dzięki temu
23
23
  * wysunięcie i schowanie da się animować, tak samo jak w porcie Angulara.
24
24
  *
25
25
  * @example
26
26
  * <KptDrawer open={open} onOpenChange={setOpen} position="right" header="Filtry">
27
- * Treść panelu…
27
+ * Treść panelu...
28
28
  * </KptDrawer>
29
29
  */
30
30
  export declare function KptDrawer({ open, onOpenChange, position, header, ariaLabel, dismissible, closeOnBackdrop, locale, dictionary, className, children, ...rest }: Readonly<KptDrawerProps>): import("react").JSX.Element;
@@ -9,12 +9,12 @@ import { KptIcon } from "../icon/icon.js";
9
9
  /**
10
10
  * Panel wysuwany (drawer / off-canvas), niezależny od app-shell.
11
11
  *
12
- * Panel i backdrop są zawsze w DOM, a o widoczności decyduje klasa `is-open` — dzięki temu
12
+ * Panel i backdrop są zawsze w DOM, a o widoczności decyduje klasa `is-open` - dzięki temu
13
13
  * wysunięcie i schowanie da się animować, tak samo jak w porcie Angulara.
14
14
  *
15
15
  * @example
16
16
  * <KptDrawer open={open} onOpenChange={setOpen} position="right" header="Filtry">
17
- * Treść panelu…
17
+ * Treść panelu...
18
18
  * </KptDrawer>
19
19
  */
20
20
  export function KptDrawer({ open, onOpenChange, position = 'left', header = '', ariaLabel = '', dismissible = true, closeOnBackdrop = true, locale, dictionary, className, children, ...rest }) {
@@ -9,38 +9,38 @@ Import: `import { KptDrawer } from '@konce-pt/react';`
9
9
  <aside class="kpt-drawer__panel is-open" data-position="right" role="dialog" aria-modal="true" tabindex="-1">
10
10
  <div class="kpt-drawer__header">
11
11
  <span class="kpt-drawer__title">Filters</span>
12
- <button class="kpt-drawer__close" type="button" aria-label="Close">…</button>
12
+ <button class="kpt-drawer__close" type="button" aria-label="Close">...</button>
13
13
  </div>
14
- <div class="kpt-drawer__body">…children…</div>
14
+ <div class="kpt-drawer__body">...children...</div>
15
15
  </aside>
16
16
  </div>
17
17
 
18
18
  ## Props
19
- - `open`: boolean, `onOpenChange(open)` — controlled
19
+ - `open`: boolean, `onOpenChange(open)` - controlled
20
20
  - `position`: 'left' | 'right' | 'top' | 'bottom' (default 'left')
21
21
  - `header`: string
22
- - `dismissible`: boolean (default true) — shows × and lets Escape close it
22
+ - `dismissible`: boolean (default true) - shows x and lets Escape close it
23
23
  - `closeOnBackdrop`: boolean (default true)
24
24
  - `className`, `ref` and every other `<div>` prop go to the host
25
25
 
26
26
  ## Always in the DOM
27
27
  The panel and the backdrop are always rendered; only the `is-open` class decides what is visible.
28
- That is what makes the slide animatable — mounting the panel on open would give the transition
28
+ That is what makes the slide animatable - mounting the panel on open would give the transition
29
29
  nothing to animate from.
30
30
 
31
31
  ## Not a native modal
32
32
  Unlike `KptDialog` this is a plain `<aside role="dialog" aria-modal="true">`, not a native
33
- `<dialog>` — the focus handling below is done by the component, not by the browser.
33
+ `<dialog>` - the focus handling below is done by the component, not by the browser.
34
34
 
35
35
  ## Focus and keyboard
36
36
  Opening moves focus into the panel (its first focusable element, else the panel
37
- itself) and traps it there — `Tab` / `Shift+Tab` wrap inside, as `aria-modal="true"` promises.
38
- Closing returns focus to the element that had it before. `Escape` closes the panel — only when `dismissible`, like the `×` button. The panel
37
+ itself) and traps it there - `Tab` / `Shift+Tab` wrap inside, as `aria-modal="true"` promises.
38
+ Closing returns focus to the element that had it before. `Escape` closes the panel - only when `dismissible`, like the `x` button. The panel
39
39
  is named by its `header` through `aria-labelledby`. The shared helper is `internal/use-modal-focus.ts` (the Angular port has a twin on the CDK focus trap).
40
40
 
41
41
  ## Examples
42
42
  <KptDrawer open={open} onOpenChange={setOpen} position="right" header="Filters">
43
- Panel content…
43
+ Panel content...
44
44
  </KptDrawer>
45
45
 
46
46
  ## Tokens
@@ -49,7 +49,7 @@ is named by its `header` through `aria-labelledby`. The shared helper is `intern
49
49
 
50
50
  ## Accessibility
51
51
  `role="dialog"`, `aria-modal="true"` and `aria-labelledby` pointing at the title; the close button gets
52
- its label from `common.close`. Focus handling — see "Focus and keyboard" above.
52
+ its label from `common.close`. Focus handling - see "Focus and keyboard" above.
53
53
 
54
54
  ## Name and scrolling
55
- Without `header` give the panel `ariaLabel` — a `role="dialog"` without a name is announced as a bare "dialog". An open drawer locks page scrolling underneath.
55
+ Without `header` give the panel `ariaLabel` - a `role="dialog"` without a name is announced as a bare "dialog". An open drawer locks page scrolling underneath.
@@ -6,14 +6,14 @@ export interface KptEmptyProps extends Omit<ComponentPropsWithRef<'div'>, 'title
6
6
  description?: string;
7
7
  /**
8
8
  * Robi z tytułu nagłówek strony (`role="heading"` z `aria-level`), żeby pusty stan pojawił się
9
- * w strukturze dokumentu — np. gdy zastępuje całą sekcję. Bez tego tytuł to sam tekst.
9
+ * w strukturze dokumentu - np. gdy zastępuje całą sekcję. Bez tego tytuł to sam tekst.
10
10
  */
11
11
  headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
12
12
  /** Akcje pod opisem. */
13
13
  children?: ReactNode;
14
14
  }
15
15
  /**
16
- * Stan pusty (empty state) — ikona, tytuł, opis i opcjonalne akcje.
16
+ * Stan pusty (empty state) - ikona, tytuł, opis i opcjonalne akcje.
17
17
  *
18
18
  * @example
19
19
  * <KptEmpty icon="search" title="Brak wyników" description="Zmień kryteria wyszukiwania.">
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../internal/cn.js";
3
3
  import { KptIcon } from "../icon/icon.js";
4
4
  /**
5
- * Stan pusty (empty state) — ikona, tytuł, opis i opcjonalne akcje.
5
+ * Stan pusty (empty state) - ikona, tytuł, opis i opcjonalne akcje.
6
6
  *
7
7
  * @example
8
8
  * <KptEmpty icon="search" title="Brak wyników" description="Zmień kryteria wyszukiwania.">
@@ -1,23 +1,23 @@
1
1
  # KptEmpty (@konce-pt/react)
2
2
 
3
- An empty state — an icon, a title, a description and optional actions.
3
+ An empty state - an icon, a title, a description and optional actions.
4
4
  Import: `import { KptEmpty } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <div class="kpt-empty-host">
8
8
  <div class="kpt-empty">
9
- <div class="kpt-empty__icon">…icon…</div>
9
+ <div class="kpt-empty__icon">...icon...</div>
10
10
  <p class="kpt-empty__title">No results</p>
11
11
  <p class="kpt-empty__desc">Adjust your search criteria.</p>
12
- <div class="kpt-empty__actions">…children…</div>
12
+ <div class="kpt-empty__actions">...children...</div>
13
13
  </div>
14
14
  </div>
15
15
 
16
16
  ## Props
17
- - `icon`: string | null (default 'info-circle') — a registry icon name; `null` hides it
18
- - `title`: string, `description`: string — each row disappears when its text is empty
19
- - `headingLevel`: 1–6 | null (default null) — makes the title a heading (`role="heading"` + `aria-level`)
20
- - `children` — the actions under the description
17
+ - `icon`: string | null (default 'info-circle') - a registry icon name; `null` hides it
18
+ - `title`: string, `description`: string - each row disappears when its text is empty
19
+ - `headingLevel`: 1-6 | null (default null) - makes the title a heading (`role="heading"` + `aria-level`)
20
+ - `children` - the actions under the description
21
21
  - `className`, `ref` and every other `<div>` prop go to the host
22
22
 
23
23
  ## Examples
@@ -31,6 +31,6 @@ Import: `import { KptEmpty } from '@konce-pt/react';`
31
31
  `--kpt-color-on-surface-muted` (the description), `--kpt-space-*`.
32
32
 
33
33
  ## Accessibility
34
- The icon is decorative. The title is a styled paragraph unless `headingLevel` makes it a heading —
34
+ The icon is decorative. The title is a styled paragraph unless `headingLevel` makes it a heading -
35
35
  use that when the empty state stands in for a whole section. Replacing results with an empty state
36
- is not announced; report “0 results” in a live region of your own.
36
+ is not announced; report "0 results" in a live region of your own.
package/dist/fab/fab.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface KptFabProps extends ComponentPropsWithRef<'button'> {
9
9
  hostProps?: KptHostProps<'span'>;
10
10
  }
11
11
  /**
12
- * Floating Action Button — okrągły, wyniesiony przycisk akcji. `extended` robi z niego pigułkę
12
+ * Floating Action Button - okrągły, wyniesiony przycisk akcji. `extended` robi z niego pigułkę
13
13
  * z tekstem.
14
14
  *
15
15
  * W wariancie okrągłym `aria-label` jest niezbędny, bo przycisk nie ma tekstu; w `extended`
package/dist/fab/fab.js CHANGED
@@ -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
- * Floating Action Button — okrągły, wyniesiony przycisk akcji. `extended` robi z niego pigułkę
4
+ * Floating Action Button - okrągły, wyniesiony przycisk akcji. `extended` robi z niego pigułkę
5
5
  * z tekstem.
6
6
  *
7
7
  * W wariancie okrągłym `aria-label` jest niezbędny, bo przycisk nie ma tekstu; w `extended`
package/dist/fab/llms.txt CHANGED
@@ -1,27 +1,27 @@
1
1
  # KptFab (@konce-pt/react)
2
2
 
3
- A floating action button — round and raised. `extended` turns it into a pill with text.
3
+ A floating action button - round and raised. `extended` turns it into a pill with text.
4
4
  Import: `import { KptFab } from '@konce-pt/react';`
5
5
 
6
6
  ## DOM
7
7
  <span class="kpt-fab-host">
8
- <button class="kpt-fab" type="button" data-variant="filled" data-size="md" aria-label="Add">…icon…</button>
8
+ <button class="kpt-fab" type="button" data-variant="filled" data-size="md" aria-label="Add">...icon...</button>
9
9
  </span>
10
10
 
11
11
  ## Props
12
12
  - `variant`: 'filled' | 'tonal' (default 'filled')
13
13
  - `size`: 'md' | 'mini' (default 'md')
14
- - `extended`: boolean — a pill with text next to the icon
15
- - `hostProps` — props for the `.kpt-fab-host` wrapper
14
+ - `extended`: boolean - a pill with text next to the icon
15
+ - `hostProps` - props for the `.kpt-fab-host` wrapper
16
16
  - `className`, `ref` and every other `<button>` prop go to the inner `<button>`
17
17
 
18
18
  ## The label depends on the variant
19
- In the round variant `aria-label` is essential — the button has no text. In `extended` the content
19
+ In the round variant `aria-label` is essential - the button has no text. In `extended` the content
20
20
  already is the label, so `aria-label` is dropped there rather than passed through: two names on one
21
21
  control make a screen reader announce the wrong one.
22
22
 
23
23
  ## Placement is yours
24
- The component does not position itself. It is a button, not a layout — put it in a container that
24
+ The component does not position itself. It is a button, not a layout - put it in a container that
25
25
  pins it wherever the design wants (usually `position: fixed` in a corner).
26
26
 
27
27
  ## Examples
@@ -29,6 +29,10 @@ pins it wherever the design wants (usually `position: fixed` in a corner).
29
29
  <KptFab extended><KptIcon name="plus" /> New</KptFab>
30
30
  <KptFab variant="tonal" size="mini" aria-label="Edit"><KptIcon name="copy" /></KptFab>
31
31
 
32
+ ## Motion
33
+ Pressed, it squeezes slightly and springs back on release (shared mixin `styles/_press.scss`). Pure CSS; durations follow `--kpt-motion-scale`, so `enabled: false` turns it off, and it drops out
34
+ under "reduce motion".
35
+
32
36
  ## Tokens
33
37
  `--kpt-color-primary` / `--kpt-color-on-primary` (filled), `--kpt-color-muted` /
34
38
  `--kpt-color-on-muted` (tonal), `--kpt-elevation-3` (`--kpt-elevation-4` on hover); shape
@@ -1,6 +1,13 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { type KptCollapseMotion } from '@konce-pt/motion';
3
+ export type KptFieldsetVariant = 'outlined' | 'filled';
2
4
  export interface KptFieldsetProps extends ComponentPropsWithRef<'div'> {
3
5
  legend?: string;
6
+ /**
7
+ * `outlined` (domyślny) - sama ramka na tle rodzica; `filled` - grupa na kolorze powierzchni,
8
+ * np. sekcje w szarym panelu. Legenda w obu bierze tło grupy, więc nie dzieli się na dwa kolory.
9
+ */
10
+ variant?: KptFieldsetVariant;
4
11
  /** Legenda staje się przyciskiem zwijającym zawartość. */
5
12
  toggleable?: boolean;
6
13
  collapsed?: boolean;
@@ -8,15 +15,22 @@ export interface KptFieldsetProps extends ComponentPropsWithRef<'div'> {
8
15
  onCollapsedChange?: (collapsed: boolean) => void;
9
16
  animated?: boolean;
10
17
  animationDuration?: number;
18
+ /**
19
+ * Ruch zwijania: `spring` - wysokość na sprężynie, treść wjeżdża i wyostrza się, przy zwijaniu
20
+ * najpierw gaśnie; `fade` - treść się przenika; `none` - bez ruchu. Bez wartości bierze `collapse`
21
+ * z `KptMotionProvider` (domyślnie `spring`); `animated={false}`, `enabled={false}` i systemowe
22
+ * "ogranicz ruch" wyłączają go zawsze.
23
+ */
24
+ collapseMotion?: KptCollapseMotion;
11
25
  children?: ReactNode;
12
26
  }
13
27
  /**
14
28
  * Grupa pól z legendą (`<fieldset>` + `<legend>`), opcjonalnie zwijana.
15
29
  *
16
- * Zwijanie idzie przez `grid-template-rows: 0fr → 1fr`, więc animuje się do naturalnej wysokości
17
- * treści — bez mierzenia czegokolwiek w JS.
30
+ * Zwijanie idzie przez `grid-template-rows: 0fr -> 1fr`, więc animuje się do naturalnej wysokości
31
+ * treści - bez mierzenia czegokolwiek w JS.
18
32
  *
19
33
  * @example
20
- * <KptFieldset legend="Dane osobowe" toggleable>…</KptFieldset>
34
+ * <KptFieldset legend="Dane osobowe" toggleable>...</KptFieldset>
21
35
  */
22
- export declare function KptFieldset({ legend, toggleable, collapsed, defaultCollapsed, onCollapsedChange, animated, animationDuration, className, style, children, ...rest }: Readonly<KptFieldsetProps>): import("react").JSX.Element;
36
+ export declare function KptFieldset({ legend, variant, toggleable, collapsed, defaultCollapsed, onCollapsedChange, animated, animationDuration, collapseMotion, className, style, children, ...rest }: Readonly<KptFieldsetProps>): import("react").JSX.Element;
@@ -4,24 +4,27 @@ import { cn } from "../internal/cn.js";
4
4
  import { useControllableState } from "../internal/use-controllable-state.js";
5
5
  import { useKptId } from "../internal/use-id.js";
6
6
  import { KptIcon } from "../icon/icon.js";
7
+ import { resolveCollapseMotion } from '@konce-pt/motion';
8
+ import { useKptMotion } from "../motion/motion-context.js";
7
9
  /**
8
10
  * Grupa pól z legendą (`<fieldset>` + `<legend>`), opcjonalnie zwijana.
9
11
  *
10
- * Zwijanie idzie przez `grid-template-rows: 0fr → 1fr`, więc animuje się do naturalnej wysokości
11
- * treści — bez mierzenia czegokolwiek w JS.
12
+ * Zwijanie idzie przez `grid-template-rows: 0fr -> 1fr`, więc animuje się do naturalnej wysokości
13
+ * treści - bez mierzenia czegokolwiek w JS.
12
14
  *
13
15
  * @example
14
- * <KptFieldset legend="Dane osobowe" toggleable>…</KptFieldset>
16
+ * <KptFieldset legend="Dane osobowe" toggleable>...</KptFieldset>
15
17
  */
16
- export function KptFieldset({ legend = '', toggleable = false, collapsed, defaultCollapsed = false, onCollapsedChange, animated = true, animationDuration = 500, className, style, children, ...rest }) {
18
+ export function KptFieldset({ legend = '', variant = 'outlined', toggleable = false, collapsed, defaultCollapsed = false, onCollapsedChange, animated = true, animationDuration = 500, collapseMotion, className, style, children, ...rest }) {
17
19
  const bodyId = useKptId(undefined, 'kpt-fieldset-body');
20
+ const motion = resolveCollapseMotion(collapseMotion, useKptMotion(), animated);
18
21
  const [isCollapsed, setCollapsed] = useControllableState({
19
22
  value: collapsed,
20
23
  defaultValue: defaultCollapsed,
21
24
  onChange: onCollapsedChange,
22
25
  });
23
- return (_jsx("div", { className: cn('kpt-fieldset-host', className), style: {
26
+ return (_jsx("div", { className: cn('kpt-fieldset-host', className), "data-variant": variant, style: {
24
27
  ['--kpt-anim-duration']: `${animated ? animationDuration : 0}ms`,
25
28
  ...style,
26
- }, ...rest, children: _jsxs("fieldset", { className: "kpt-fieldset", children: [_jsx("legend", { className: "kpt-fieldset__legend", children: toggleable ? (_jsxs("button", { type: "button", className: "kpt-fieldset__toggle", "aria-expanded": !isCollapsed, "aria-controls": bodyId, onClick: () => setCollapsed(!isCollapsed), children: [_jsx(KptIcon, { name: isCollapsed ? 'chevron-down' : 'chevron-up' }), _jsx("span", { children: legend })] })) : (_jsx("span", { children: legend })) }), _jsx("div", { id: bodyId, className: cn('kpt-fieldset__collapse', !isCollapsed && 'is-open'), inert: isCollapsed, children: _jsx("div", { className: "kpt-fieldset__collapse-inner", children: _jsx("div", { className: "kpt-fieldset__body", children: children }) }) })] }) }));
29
+ }, ...rest, children: _jsxs("fieldset", { className: "kpt-fieldset", "data-motion": motion, children: [_jsx("legend", { className: "kpt-fieldset__legend", children: toggleable ? (_jsxs("button", { type: "button", className: "kpt-fieldset__toggle", "aria-expanded": !isCollapsed, "aria-controls": bodyId, onClick: () => setCollapsed(!isCollapsed), children: [_jsx(KptIcon, { name: "chevron-down", className: cn('kpt-fieldset__chevron', !isCollapsed && 'is-open') }), _jsx("span", { children: legend })] })) : (_jsx("span", { children: legend })) }), _jsx("div", { id: bodyId, className: cn('kpt-fieldset__collapse', !isCollapsed && 'is-open'), inert: isCollapsed, children: _jsx("div", { className: "kpt-fieldset__collapse-inner", children: _jsx("div", { className: "kpt-fieldset__body", children: children }) }) })] }) }));
27
30
  }