@kjun-ui/react 0.21.0 → 0.22.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 (287) hide show
  1. package/README.md +19 -5
  2. package/dist/index.cjs +8405 -3740
  3. package/dist/index.js +8199 -3512
  4. package/dist/styles.css +2610 -454
  5. package/dist/types/packages/react/src/actions.d.cts +21 -16
  6. package/dist/types/packages/react/src/actions.d.ts +21 -16
  7. package/dist/types/packages/react/src/app-navigation.d.cts +6 -2
  8. package/dist/types/packages/react/src/app-navigation.d.ts +6 -2
  9. package/dist/types/packages/react/src/avatar-group.d.cts +36 -0
  10. package/dist/types/packages/react/src/avatar-group.d.ts +36 -0
  11. package/dist/types/packages/react/src/button.d.cts +14 -6
  12. package/dist/types/packages/react/src/button.d.ts +14 -6
  13. package/dist/types/packages/react/src/calendar.d.cts +6 -2
  14. package/dist/types/packages/react/src/calendar.d.ts +6 -2
  15. package/dist/types/packages/react/src/card.d.cts +10 -3
  16. package/dist/types/packages/react/src/card.d.ts +10 -3
  17. package/dist/types/packages/react/src/carousel.d.cts +8 -1
  18. package/dist/types/packages/react/src/carousel.d.ts +8 -1
  19. package/dist/types/packages/react/src/choice-controls.d.cts +99 -0
  20. package/dist/types/packages/react/src/choice-controls.d.ts +99 -0
  21. package/dist/types/packages/react/src/collapse.d.cts +4 -1
  22. package/dist/types/packages/react/src/collapse.d.ts +4 -1
  23. package/dist/types/packages/react/src/color-picker.d.cts +8 -1
  24. package/dist/types/packages/react/src/color-picker.d.ts +8 -1
  25. package/dist/types/packages/react/src/combobox.d.cts +18 -5
  26. package/dist/types/packages/react/src/combobox.d.ts +18 -5
  27. package/dist/types/packages/react/src/controls.d.cts +7 -74
  28. package/dist/types/packages/react/src/controls.d.ts +7 -74
  29. package/dist/types/packages/react/src/data-state.d.cts +19 -6
  30. package/dist/types/packages/react/src/data-state.d.ts +19 -6
  31. package/dist/types/packages/react/src/date-picker.d.cts +8 -2
  32. package/dist/types/packages/react/src/date-picker.d.ts +8 -2
  33. package/dist/types/packages/react/src/display.d.cts +26 -6
  34. package/dist/types/packages/react/src/display.d.ts +26 -6
  35. package/dist/types/packages/react/src/drawer.d.cts +11 -2
  36. package/dist/types/packages/react/src/drawer.d.ts +11 -2
  37. package/dist/types/packages/react/src/dropdown.d.cts +19 -5
  38. package/dist/types/packages/react/src/dropdown.d.ts +19 -5
  39. package/dist/types/packages/react/src/event-calendar.d.cts +47 -0
  40. package/dist/types/packages/react/src/event-calendar.d.ts +47 -0
  41. package/dist/types/packages/react/src/fab.d.cts +2 -0
  42. package/dist/types/packages/react/src/fab.d.ts +2 -0
  43. package/dist/types/packages/react/src/file-upload-row.d.cts +23 -0
  44. package/dist/types/packages/react/src/file-upload-row.d.ts +23 -0
  45. package/dist/types/packages/react/src/file-upload.d.cts +38 -0
  46. package/dist/types/packages/react/src/file-upload.d.ts +38 -0
  47. package/dist/types/packages/react/src/financial-display.d.cts +32 -11
  48. package/dist/types/packages/react/src/financial-display.d.ts +32 -11
  49. package/dist/types/packages/react/src/floating-panel.d.cts +6 -2
  50. package/dist/types/packages/react/src/floating-panel.d.ts +6 -2
  51. package/dist/types/packages/react/src/index.d.cts +12 -1
  52. package/dist/types/packages/react/src/index.d.ts +12 -1
  53. package/dist/types/packages/react/src/input.d.cts +14 -1
  54. package/dist/types/packages/react/src/input.d.ts +14 -1
  55. package/dist/types/packages/react/src/kpi-hero.d.cts +2 -0
  56. package/dist/types/packages/react/src/kpi-hero.d.ts +2 -0
  57. package/dist/types/packages/react/src/kpi-row.d.cts +5 -0
  58. package/dist/types/packages/react/src/kpi-row.d.ts +5 -0
  59. package/dist/types/packages/react/src/layout-primitives.d.cts +71 -139
  60. package/dist/types/packages/react/src/layout-primitives.d.ts +71 -139
  61. package/dist/types/packages/react/src/list-context.d.cts +2 -1
  62. package/dist/types/packages/react/src/list-context.d.ts +2 -1
  63. package/dist/types/packages/react/src/list.d.cts +39 -8
  64. package/dist/types/packages/react/src/list.d.ts +39 -8
  65. package/dist/types/packages/react/src/market-model.d.cts +13 -1
  66. package/dist/types/packages/react/src/market-model.d.ts +13 -1
  67. package/dist/types/packages/react/src/market-parts.d.cts +9 -0
  68. package/dist/types/packages/react/src/market-parts.d.ts +9 -0
  69. package/dist/types/packages/react/src/market-skeleton.d.cts +7 -1
  70. package/dist/types/packages/react/src/market-skeleton.d.ts +7 -1
  71. package/dist/types/packages/react/src/media.d.cts +6 -2
  72. package/dist/types/packages/react/src/media.d.ts +6 -2
  73. package/dist/types/packages/react/src/modal.d.cts +11 -2
  74. package/dist/types/packages/react/src/modal.d.ts +11 -2
  75. package/dist/types/packages/react/src/navigation.d.cts +34 -5
  76. package/dist/types/packages/react/src/navigation.d.ts +34 -5
  77. package/dist/types/packages/react/src/number-display.d.cts +8 -5
  78. package/dist/types/packages/react/src/number-display.d.ts +8 -5
  79. package/dist/types/packages/react/src/number-input.d.cts +28 -0
  80. package/dist/types/packages/react/src/number-input.d.ts +28 -0
  81. package/dist/types/packages/react/src/popover.d.cts +5 -2
  82. package/dist/types/packages/react/src/popover.d.ts +5 -2
  83. package/dist/types/packages/react/src/pressable.d.cts +17 -0
  84. package/dist/types/packages/react/src/pressable.d.ts +17 -0
  85. package/dist/types/packages/react/src/quantity-stepper.d.cts +3 -1
  86. package/dist/types/packages/react/src/quantity-stepper.d.ts +3 -1
  87. package/dist/types/packages/react/src/range-input.d.cts +15 -3
  88. package/dist/types/packages/react/src/range-input.d.ts +15 -3
  89. package/dist/types/packages/react/src/search-input.d.cts +6 -3
  90. package/dist/types/packages/react/src/search-input.d.ts +6 -3
  91. package/dist/types/packages/react/src/select-control.d.cts +7 -2
  92. package/dist/types/packages/react/src/select-control.d.ts +7 -2
  93. package/dist/types/packages/react/src/side-navigation-layout.d.cts +47 -0
  94. package/dist/types/packages/react/src/side-navigation-layout.d.ts +47 -0
  95. package/dist/types/packages/react/src/side-navigation.d.cts +74 -0
  96. package/dist/types/packages/react/src/side-navigation.d.ts +74 -0
  97. package/dist/types/packages/react/src/skeletons.d.cts +18 -3
  98. package/dist/types/packages/react/src/skeletons.d.ts +18 -3
  99. package/dist/types/packages/react/src/spinner-glyph.d.cts +8 -0
  100. package/dist/types/packages/react/src/spinner-glyph.d.ts +8 -0
  101. package/dist/types/packages/react/src/split-pane.d.cts +18 -5
  102. package/dist/types/packages/react/src/split-pane.d.ts +18 -5
  103. package/dist/types/packages/react/src/stacked-bar.d.cts +3 -1
  104. package/dist/types/packages/react/src/stacked-bar.d.ts +3 -1
  105. package/dist/types/packages/react/src/steps.d.cts +26 -0
  106. package/dist/types/packages/react/src/steps.d.ts +26 -0
  107. package/dist/types/packages/react/src/table-cards.d.cts +4 -12
  108. package/dist/types/packages/react/src/table-cards.d.ts +4 -12
  109. package/dist/types/packages/react/src/table-grid.d.cts +3 -7
  110. package/dist/types/packages/react/src/table-grid.d.ts +3 -7
  111. package/dist/types/packages/react/src/table-groups.d.cts +5 -0
  112. package/dist/types/packages/react/src/table-groups.d.ts +5 -0
  113. package/dist/types/packages/react/src/table-list.d.cts +2 -9
  114. package/dist/types/packages/react/src/table-list.d.ts +2 -9
  115. package/dist/types/packages/react/src/table-model.d.cts +6 -2
  116. package/dist/types/packages/react/src/table-model.d.ts +6 -2
  117. package/dist/types/packages/react/src/tabs.d.cts +3 -1
  118. package/dist/types/packages/react/src/tabs.d.ts +3 -1
  119. package/dist/types/packages/react/src/textarea.d.cts +6 -3
  120. package/dist/types/packages/react/src/textarea.d.ts +6 -3
  121. package/dist/types/packages/react/src/tiles.d.cts +18 -0
  122. package/dist/types/packages/react/src/tiles.d.ts +18 -0
  123. package/dist/types/packages/react/src/time-picker.d.cts +12 -2
  124. package/dist/types/packages/react/src/time-picker.d.ts +12 -2
  125. package/dist/types/packages/react/src/time-wheel.d.cts +18 -0
  126. package/dist/types/packages/react/src/time-wheel.d.ts +18 -0
  127. package/dist/types/packages/react/src/use-filter-scroll.d.cts +5 -0
  128. package/dist/types/packages/react/src/use-filter-scroll.d.ts +5 -0
  129. package/dist/types/shared/package-runtime/accordion-state.d.cts +2 -0
  130. package/dist/types/shared/package-runtime/accordion-state.d.ts +2 -0
  131. package/dist/types/shared/package-runtime/action-size.d.cts +4 -0
  132. package/dist/types/shared/package-runtime/action-size.d.ts +4 -0
  133. package/dist/types/shared/package-runtime/alert-actions.d.cts +7 -0
  134. package/dist/types/shared/package-runtime/alert-actions.d.ts +7 -0
  135. package/dist/types/shared/package-runtime/alert-exit.d.cts +6 -0
  136. package/dist/types/shared/package-runtime/alert-exit.d.ts +6 -0
  137. package/dist/types/shared/package-runtime/alert-live.d.cts +2 -0
  138. package/dist/types/shared/package-runtime/alert-live.d.ts +2 -0
  139. package/dist/types/shared/package-runtime/avatar-group.d.cts +18 -0
  140. package/dist/types/shared/package-runtime/avatar-group.d.ts +18 -0
  141. package/dist/types/shared/package-runtime/badge-tone.d.cts +8 -2
  142. package/dist/types/shared/package-runtime/badge-tone.d.ts +8 -2
  143. package/dist/types/shared/package-runtime/bottom-bar.d.cts +1 -1
  144. package/dist/types/shared/package-runtime/bottom-bar.d.ts +1 -1
  145. package/dist/types/shared/package-runtime/bottom-navigation.d.cts +5 -0
  146. package/dist/types/shared/package-runtime/bottom-navigation.d.ts +5 -0
  147. package/dist/types/shared/package-runtime/calendar.d.cts +21 -7
  148. package/dist/types/shared/package-runtime/calendar.d.ts +21 -7
  149. package/dist/types/shared/package-runtime/card-layout.d.cts +8 -0
  150. package/dist/types/shared/package-runtime/card-layout.d.ts +8 -0
  151. package/dist/types/shared/package-runtime/carousel-scroll.d.cts +2 -0
  152. package/dist/types/shared/package-runtime/carousel-scroll.d.ts +2 -0
  153. package/dist/types/shared/package-runtime/carousel.d.cts +12 -2
  154. package/dist/types/shared/package-runtime/carousel.d.ts +12 -2
  155. package/dist/types/shared/package-runtime/chart-skeleton.d.cts +1 -1
  156. package/dist/types/shared/package-runtime/chart-skeleton.d.ts +1 -1
  157. package/dist/types/shared/package-runtime/clipboard.d.cts +6 -0
  158. package/dist/types/shared/package-runtime/clipboard.d.ts +6 -0
  159. package/dist/types/shared/package-runtime/combobox-options.d.cts +13 -0
  160. package/dist/types/shared/package-runtime/combobox-options.d.ts +13 -0
  161. package/dist/types/shared/package-runtime/combobox.d.cts +3 -1
  162. package/dist/types/shared/package-runtime/combobox.d.ts +3 -1
  163. package/dist/types/shared/package-runtime/copy-button.d.cts +11 -0
  164. package/dist/types/shared/package-runtime/copy-button.d.ts +11 -0
  165. package/dist/types/shared/package-runtime/data-cells.d.cts +36 -0
  166. package/dist/types/shared/package-runtime/data-cells.d.ts +36 -0
  167. package/dist/types/shared/package-runtime/development.d.cts +4 -0
  168. package/dist/types/shared/package-runtime/development.d.ts +4 -0
  169. package/dist/types/shared/package-runtime/distribution.d.cts +36 -1
  170. package/dist/types/shared/package-runtime/distribution.d.ts +36 -1
  171. package/dist/types/shared/package-runtime/drawer-geometry.d.cts +7 -0
  172. package/dist/types/shared/package-runtime/drawer-geometry.d.ts +7 -0
  173. package/dist/types/shared/package-runtime/event-calendar.d.cts +81 -0
  174. package/dist/types/shared/package-runtime/event-calendar.d.ts +81 -0
  175. package/dist/types/shared/package-runtime/external-link.d.cts +4 -0
  176. package/dist/types/shared/package-runtime/external-link.d.ts +4 -0
  177. package/dist/types/shared/package-runtime/file-upload.d.cts +128 -0
  178. package/dist/types/shared/package-runtime/file-upload.d.ts +128 -0
  179. package/dist/types/shared/package-runtime/filter-scroll.d.cts +5 -0
  180. package/dist/types/shared/package-runtime/filter-scroll.d.ts +5 -0
  181. package/dist/types/shared/package-runtime/filter-value.d.cts +2 -0
  182. package/dist/types/shared/package-runtime/filter-value.d.ts +2 -0
  183. package/dist/types/shared/package-runtime/input-field.d.cts +23 -0
  184. package/dist/types/shared/package-runtime/input-field.d.ts +23 -0
  185. package/dist/types/shared/package-runtime/input-variant.d.cts +7 -0
  186. package/dist/types/shared/package-runtime/input-variant.d.ts +7 -0
  187. package/dist/types/shared/package-runtime/kpi.d.cts +13 -0
  188. package/dist/types/shared/package-runtime/kpi.d.ts +13 -0
  189. package/dist/types/shared/package-runtime/layout-primitives.d.cts +115 -6
  190. package/dist/types/shared/package-runtime/layout-primitives.d.ts +115 -6
  191. package/dist/types/shared/package-runtime/list-row.d.cts +43 -6
  192. package/dist/types/shared/package-runtime/list-row.d.ts +43 -6
  193. package/dist/types/shared/package-runtime/market-layout.d.cts +3 -1
  194. package/dist/types/shared/package-runtime/market-layout.d.ts +3 -1
  195. package/dist/types/shared/package-runtime/market-query.d.cts +6 -0
  196. package/dist/types/shared/package-runtime/market-query.d.ts +6 -0
  197. package/dist/types/shared/package-runtime/market-table.d.cts +32 -0
  198. package/dist/types/shared/package-runtime/market-table.d.ts +32 -0
  199. package/dist/types/shared/package-runtime/menu-button.d.cts +4 -0
  200. package/dist/types/shared/package-runtime/menu-button.d.ts +4 -0
  201. package/dist/types/shared/package-runtime/messages/ko.d.cts +74 -1
  202. package/dist/types/shared/package-runtime/messages/ko.d.ts +74 -1
  203. package/dist/types/shared/package-runtime/messages-context.d.cts +66 -1
  204. package/dist/types/shared/package-runtime/messages-context.d.ts +66 -1
  205. package/dist/types/shared/package-runtime/minimum-loading.d.cts +3 -0
  206. package/dist/types/shared/package-runtime/minimum-loading.d.ts +3 -0
  207. package/dist/types/shared/package-runtime/modal-geometry.d.cts +15 -0
  208. package/dist/types/shared/package-runtime/modal-geometry.d.ts +15 -0
  209. package/dist/types/shared/package-runtime/navigation.d.cts +9 -2
  210. package/dist/types/shared/package-runtime/navigation.d.ts +9 -2
  211. package/dist/types/shared/package-runtime/nested-controls.d.cts +7 -0
  212. package/dist/types/shared/package-runtime/nested-controls.d.ts +7 -0
  213. package/dist/types/shared/package-runtime/number-input.d.cts +63 -0
  214. package/dist/types/shared/package-runtime/number-input.d.ts +63 -0
  215. package/dist/types/shared/package-runtime/options.d.cts +25 -5
  216. package/dist/types/shared/package-runtime/options.d.ts +25 -5
  217. package/dist/types/shared/package-runtime/pagination.d.cts +12 -0
  218. package/dist/types/shared/package-runtime/pagination.d.ts +12 -0
  219. package/dist/types/shared/package-runtime/press-repeat.d.cts +13 -0
  220. package/dist/types/shared/package-runtime/press-repeat.d.ts +13 -0
  221. package/dist/types/shared/package-runtime/progress-circle.d.cts +5 -0
  222. package/dist/types/shared/package-runtime/progress-circle.d.ts +5 -0
  223. package/dist/types/shared/package-runtime/progress-marker.d.cts +7 -0
  224. package/dist/types/shared/package-runtime/progress-marker.d.ts +7 -0
  225. package/dist/types/shared/package-runtime/select-trigger.d.cts +23 -0
  226. package/dist/types/shared/package-runtime/select-trigger.d.ts +23 -0
  227. package/dist/types/shared/package-runtime/sheet-drag.d.cts +24 -0
  228. package/dist/types/shared/package-runtime/sheet-drag.d.ts +24 -0
  229. package/dist/types/shared/package-runtime/side-navigation-keys.d.cts +23 -0
  230. package/dist/types/shared/package-runtime/side-navigation-keys.d.ts +23 -0
  231. package/dist/types/shared/package-runtime/side-navigation-scroll.d.cts +7 -0
  232. package/dist/types/shared/package-runtime/side-navigation-scroll.d.ts +7 -0
  233. package/dist/types/shared/package-runtime/side-navigation.d.cts +277 -0
  234. package/dist/types/shared/package-runtime/side-navigation.d.ts +277 -0
  235. package/dist/types/shared/package-runtime/signed-number.d.cts +33 -0
  236. package/dist/types/shared/package-runtime/signed-number.d.ts +33 -0
  237. package/dist/types/shared/package-runtime/skeleton-text.d.cts +4 -0
  238. package/dist/types/shared/package-runtime/skeleton-text.d.ts +4 -0
  239. package/dist/types/shared/package-runtime/slider-view.d.cts +17 -2
  240. package/dist/types/shared/package-runtime/slider-view.d.ts +17 -2
  241. package/dist/types/shared/package-runtime/sparkline.d.cts +8 -4
  242. package/dist/types/shared/package-runtime/sparkline.d.ts +8 -4
  243. package/dist/types/shared/package-runtime/spinner-geometry.d.cts +14 -0
  244. package/dist/types/shared/package-runtime/spinner-geometry.d.ts +14 -0
  245. package/dist/types/shared/package-runtime/split-pane.d.cts +40 -1
  246. package/dist/types/shared/package-runtime/split-pane.d.ts +40 -1
  247. package/dist/types/shared/package-runtime/steps.d.cts +37 -0
  248. package/dist/types/shared/package-runtime/steps.d.ts +37 -0
  249. package/dist/types/shared/package-runtime/tab-keyboard.d.cts +6 -0
  250. package/dist/types/shared/package-runtime/tab-keyboard.d.ts +6 -0
  251. package/dist/types/shared/package-runtime/table-columns.d.cts +8 -0
  252. package/dist/types/shared/package-runtime/table-columns.d.ts +8 -0
  253. package/dist/types/shared/package-runtime/table-model.d.cts +23 -3
  254. package/dist/types/shared/package-runtime/table-model.d.ts +23 -3
  255. package/dist/types/shared/package-runtime/table-presentation.d.cts +11 -2
  256. package/dist/types/shared/package-runtime/table-presentation.d.ts +11 -2
  257. package/dist/types/shared/package-runtime/table.d.cts +15 -2
  258. package/dist/types/shared/package-runtime/table.d.ts +15 -2
  259. package/dist/types/shared/package-runtime/textarea.d.cts +6 -4
  260. package/dist/types/shared/package-runtime/textarea.d.ts +6 -4
  261. package/dist/types/shared/package-runtime/tiles-children.d.cts +7 -0
  262. package/dist/types/shared/package-runtime/tiles-children.d.ts +7 -0
  263. package/dist/types/shared/package-runtime/tiles.d.cts +18 -0
  264. package/dist/types/shared/package-runtime/tiles.d.ts +18 -0
  265. package/dist/types/shared/package-runtime/time-segments.d.cts +24 -0
  266. package/dist/types/shared/package-runtime/time-segments.d.ts +24 -0
  267. package/dist/types/shared/package-runtime/time-wheel.d.cts +54 -0
  268. package/dist/types/shared/package-runtime/time-wheel.d.ts +54 -0
  269. package/dist/types/shared/package-runtime/trailing-overflow.d.cts +1 -0
  270. package/dist/types/shared/package-runtime/trailing-overflow.d.ts +1 -0
  271. package/dist/types/shared/package-runtime/use-color-picker.d.cts +3 -0
  272. package/dist/types/shared/package-runtime/use-color-picker.d.ts +3 -0
  273. package/dist/types/shared/package-runtime/use-copy-feedback.d.cts +10 -0
  274. package/dist/types/shared/package-runtime/use-copy-feedback.d.ts +10 -0
  275. package/dist/types/shared/package-runtime/use-open-state.d.cts +5 -0
  276. package/dist/types/shared/package-runtime/use-open-state.d.ts +5 -0
  277. package/dist/types/shared/package-runtime/use-pending-action.d.cts +6 -0
  278. package/dist/types/shared/package-runtime/use-pending-action.d.ts +6 -0
  279. package/dist/types/shared/package-runtime/use-side-navigation-state.d.cts +25 -0
  280. package/dist/types/shared/package-runtime/use-side-navigation-state.d.ts +25 -0
  281. package/dist/types/shared/package-runtime/use-slide.d.cts +3 -0
  282. package/dist/types/shared/package-runtime/use-slide.d.ts +3 -0
  283. package/package.json +3 -3
  284. package/dist/types/packages/react/src/compound-control.d.cts +0 -1
  285. package/dist/types/packages/react/src/compound-control.d.ts +0 -1
  286. package/dist/types/shared/package-runtime/center-option.d.cts +0 -1
  287. package/dist/types/shared/package-runtime/center-option.d.ts +0 -1
@@ -1,8 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
+ import { type PriceFlash } from "../../../shared/package-runtime/data-cells.js";
2
3
  /** A leading sign drawn tight to its digits (see splitNumberSign); other content passes through. */
3
4
  export declare function signedText(value: ReactNode): ReactNode;
4
- export declare const finiteNumber: (value: unknown) => number | null;
5
- export declare const format: (value: number, decimals?: number) => string;
5
+ export { finiteNumber, format } from "../../../shared/package-runtime/signed-number.js";
6
6
  export declare function useCountUp(value: number | string, animated: boolean, fromPrevious: boolean): string | number;
7
7
  export interface KjunAnimatedNumberProps {
8
8
  value: number | string;
@@ -26,14 +26,17 @@ export interface KjunPriceCellProps {
26
26
  /** The app's status after the price, such as a KjunBadge; KJUN owns only its spacing and alignment.
27
27
  * With no price (value null) a status still shows after a dash, for states such as "거래정지"; without one null is loading. */
28
28
  status?: ReactNode;
29
+ /** Flash when the value moves: true or "text" colours the digits up or down, "background" fills the cell's pill.
30
+ * Off under reduced motion. */
31
+ flash?: PriceFlash;
32
+ /** @deprecated Use flash. A class the app adds and removes itself. */
29
33
  flashClass?: string;
30
34
  fromPrevious?: boolean;
31
35
  }
32
- export declare function KjunPriceCell({ value, formatter, stale, status, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function KjunPriceCell({ value, formatter, stale, status, flash, flashClass, fromPrevious, }: KjunPriceCellProps): import("react/jsx-runtime").JSX.Element;
33
37
  export interface KjunSignedValueProps {
34
38
  value?: number | string | null;
35
39
  format?: "number" | "percent";
36
- isRaw?: boolean;
37
40
  decimals?: number;
38
41
  prefix?: string;
39
42
  suffix?: string;
@@ -43,4 +46,4 @@ export interface KjunSignedValueProps {
43
46
  stale?: boolean;
44
47
  formatter?: (value: number) => string;
45
48
  }
46
- export declare function KjunSignedValue({ value, format: kind, isRaw, decimals, prefix, suffix, showSign, tone, loading, stale, formatter, }: KjunSignedValueProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function KjunSignedValue({ value, format: kind, decimals, prefix, suffix, showSign, tone, loading, stale, formatter, }: KjunSignedValueProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ import { type InputSize } from "@kjun-ui/tokens";
3
+ import { type NumberInputOptions } from "../../../shared/package-runtime/number-input.cjs";
4
+ export interface KjunNumberInputProps extends NumberInputOptions {
5
+ /** Normalized value without group separators: "", "1250000", "-3.5", "12.50". */
6
+ value: string;
7
+ prefix?: ReactNode;
8
+ suffix?: ReactNode;
9
+ /** Shows "1억 2,003만 5,000 원" under the field for integers of 10,000 or more. */
10
+ readingAid?: boolean;
11
+ align?: "start" | "end";
12
+ size?: InputSize;
13
+ disabled?: boolean;
14
+ readOnly?: boolean;
15
+ error?: boolean;
16
+ id?: string;
17
+ ariaLabel?: string;
18
+ placeholder?: string;
19
+ /** Submits the normalized value ("1250000", fraction padded) with a surrounding form under this name; not sent while disabled. */
20
+ name?: string;
21
+ /** Every edit, unpadded; also the committed value when committing or cancelling changes it. */
22
+ onValueChange?: (value: string) => void;
23
+ /** Blur or Enter, with the fraction padded to `decimals`. */
24
+ onChangeCommit?: (value: string) => void;
25
+ className?: string;
26
+ style?: CSSProperties;
27
+ }
28
+ export declare function KjunNumberInput({ value, format, decimals, grouping, allowNegative, min, max, prefix, suffix, readingAid, align, size, disabled, readOnly, error, id, ariaLabel, placeholder, name, onValueChange, onChangeCommit, className, style, }: KjunNumberInputProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { type CSSProperties, type ReactNode } from "react";
2
+ import { type InputSize } from "@kjun-ui/tokens";
3
+ import { type NumberInputOptions } from "../../../shared/package-runtime/number-input.js";
4
+ export interface KjunNumberInputProps extends NumberInputOptions {
5
+ /** Normalized value without group separators: "", "1250000", "-3.5", "12.50". */
6
+ value: string;
7
+ prefix?: ReactNode;
8
+ suffix?: ReactNode;
9
+ /** Shows "1억 2,003만 5,000 원" under the field for integers of 10,000 or more. */
10
+ readingAid?: boolean;
11
+ align?: "start" | "end";
12
+ size?: InputSize;
13
+ disabled?: boolean;
14
+ readOnly?: boolean;
15
+ error?: boolean;
16
+ id?: string;
17
+ ariaLabel?: string;
18
+ placeholder?: string;
19
+ /** Submits the normalized value ("1250000", fraction padded) with a surrounding form under this name; not sent while disabled. */
20
+ name?: string;
21
+ /** Every edit, unpadded; also the committed value when committing or cancelling changes it. */
22
+ onValueChange?: (value: string) => void;
23
+ /** Blur or Enter, with the fraction padded to `decimals`. */
24
+ onChangeCommit?: (value: string) => void;
25
+ className?: string;
26
+ style?: CSSProperties;
27
+ }
28
+ export declare function KjunNumberInput({ value, format, decimals, grouping, allowNegative, min, max, prefix, suffix, readingAid, align, size, disabled, readOnly, error, id, ariaLabel, placeholder, name, onValueChange, onChangeCommit, className, style, }: KjunNumberInputProps): import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,9 @@ export interface KjunPopoverProps {
19
19
  /** Fixed header above the body; only the body scrolls and maxHeight covers both. Names the dialog without ariaLabel.
20
20
  * A function receives close, for a close button in the header. */
21
21
  header?: ReactNode | ((close: () => void) => ReactNode);
22
+ /** Fixed footer below the body (actions such as FormActions); only the body scrolls and fades above it.
23
+ * A function receives close. */
24
+ footer?: ReactNode | ((close: () => void) => ReactNode);
22
25
  /** false keeps the page usable: Tab can leave, and an outside press or focus move closes without returning focus. */
23
26
  modal?: boolean;
24
27
  /** Attach to this screen rectangle (or a function read every frame while open) instead of the trigger. Web only.
@@ -27,8 +30,8 @@ export interface KjunPopoverProps {
27
30
  trigger?: ReactNode | ((open: boolean) => ReactNode);
28
31
  children: ReactNode | ((close: () => void) => ReactNode);
29
32
  }
30
- export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
31
- export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
33
+ export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
34
+ export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, footer, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
32
35
  export interface KjunTooltipProps {
33
36
  content?: string;
34
37
  /** A bolder line above content (a file name above its path). Read together with content. */
@@ -19,6 +19,9 @@ export interface KjunPopoverProps {
19
19
  /** Fixed header above the body; only the body scrolls and maxHeight covers both. Names the dialog without ariaLabel.
20
20
  * A function receives close, for a close button in the header. */
21
21
  header?: ReactNode | ((close: () => void) => ReactNode);
22
+ /** Fixed footer below the body (actions such as FormActions); only the body scrolls and fades above it.
23
+ * A function receives close. */
24
+ footer?: ReactNode | ((close: () => void) => ReactNode);
22
25
  /** false keeps the page usable: Tab can leave, and an outside press or focus move closes without returning focus. */
23
26
  modal?: boolean;
24
27
  /** Attach to this screen rectangle (or a function read every frame while open) instead of the trigger. Web only.
@@ -27,8 +30,8 @@ export interface KjunPopoverProps {
27
30
  trigger?: ReactNode | ((open: boolean) => ReactNode);
28
31
  children: ReactNode | ((close: () => void) => ReactNode);
29
32
  }
30
- export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end";
31
- export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
33
+ export type PopoverPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
34
+ export declare function KjunPopover({ noPadding, open: controlled, onOpenChange, manualTrigger, matchTriggerWidth, width, maxHeight, flip, focusOnOpen, ariaLabel, placement, returnFocus, header, footer, modal, anchorRect, trigger, children, }: KjunPopoverProps): import("react/jsx-runtime").JSX.Element;
32
35
  export interface KjunTooltipProps {
33
36
  content?: string;
34
37
  /** A bolder line above content (a file name above its path). Read together with content. */
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes } from "react";
2
+ export interface KjunPressableProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "autoFocus"> {
3
+ /** The name read by screen readers; needed when the content has no text of its own. */
4
+ ariaLabel?: string;
5
+ /** Blocks presses and dims the content. */
6
+ disabled?: boolean;
7
+ /** "overlay" (default) lays a tint over the content on hover and press, which shows on photos as well as on text; "none" leaves the content to show its own. */
8
+ pressEffect?: "overlay" | "none";
9
+ /** Draws the keyboard focus ring inside the area, for one that reaches the screen edge or sits in a clipping parent. */
10
+ focusRingInset?: boolean;
11
+ }
12
+ /**
13
+ * An area that presses, with no shape of its own: for content that is not a button, a card or a list row
14
+ * (a map preview, a photo tile). The app gives the shape through className or style; KJUN supplies the press layer,
15
+ * the focus ring, the button role and the disabled state. Do not put buttons or links inside.
16
+ */
17
+ export declare const KjunPressable: import("react").ForwardRefExoticComponent<KjunPressableProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes } from "react";
2
+ export interface KjunPressableProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "autoFocus"> {
3
+ /** The name read by screen readers; needed when the content has no text of its own. */
4
+ ariaLabel?: string;
5
+ /** Blocks presses and dims the content. */
6
+ disabled?: boolean;
7
+ /** "overlay" (default) lays a tint over the content on hover and press, which shows on photos as well as on text; "none" leaves the content to show its own. */
8
+ pressEffect?: "overlay" | "none";
9
+ /** Draws the keyboard focus ring inside the area, for one that reaches the screen edge or sits in a clipping parent. */
10
+ focusRingInset?: boolean;
11
+ }
12
+ /**
13
+ * An area that presses, with no shape of its own: for content that is not a button, a card or a list row
14
+ * (a map preview, a photo tile). The app gives the shape through className or style; KJUN supplies the press layer,
15
+ * the focus ring, the button role and the disabled state. Do not put buttons or links inside.
16
+ */
17
+ export declare const KjunPressable: import("react").ForwardRefExoticComponent<KjunPressableProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -11,8 +11,10 @@ export interface KjunQuantityStepperProps {
11
11
  block?: boolean;
12
12
  id?: string;
13
13
  ariaLabel?: string;
14
+ /** Submits the value with a surrounding form under this name (a hidden input); not sent while disabled. */
15
+ name?: string;
14
16
  onValueChange?: (value: number) => void;
15
17
  onChangeCommit?: (value: number) => void;
16
18
  onInvalidInput?: (draft: string) => void;
17
19
  }
18
- export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, name, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
@@ -11,8 +11,10 @@ export interface KjunQuantityStepperProps {
11
11
  block?: boolean;
12
12
  id?: string;
13
13
  ariaLabel?: string;
14
+ /** Submits the value with a surrounding form under this name (a hidden input); not sent while disabled. */
15
+ name?: string;
14
16
  onValueChange?: (value: number) => void;
15
17
  onChangeCommit?: (value: number) => void;
16
18
  onInvalidInput?: (draft: string) => void;
17
19
  }
18
- export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function KjunQuantityStepper({ value, min, max, step, precision, disabled, error, size, block, id, ariaLabel, name, onValueChange, onChangeCommit, onInvalidInput }: KjunQuantityStepperProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
- import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.cjs";
2
- export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.cjs";
1
+ import { type SliderMarks, type SliderOrientation, type SliderValueLabel } from "../../../shared/package-runtime/slider-view.cjs";
2
+ export type { KjunSliderMark, SliderValueLabel as KjunSliderValueLabel } from "../../../shared/package-runtime/slider-view.cjs";
3
+ import { type CSSProperties } from "react";
3
4
  export interface KjunSliderProps {
4
5
  value: number;
5
6
  min?: number;
@@ -19,14 +20,25 @@ export interface KjunSliderProps {
19
20
  /** vertical: the rail runs bottom (min) to top (max), `length` px long. */
20
21
  orientation?: SliderOrientation;
21
22
  length?: number;
23
+ /** The value in a bubble on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (default). Follows formatValue. */
24
+ valueLabel?: SliderValueLabel;
25
+ /** The fill grows from this value instead of min, for two-way values such as -50…50; a tick marks it. Single slider only. */
26
+ fillOrigin?: number;
27
+ /** Submitted with a form through a hidden input; a range submits two values under the name. */
28
+ name?: string;
29
+ id?: string;
30
+ className?: string;
31
+ style?: CSSProperties;
22
32
  onValueChange?: (value: number) => void;
23
33
  onChangeCommit?: (value: number) => void;
24
34
  }
25
- export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
35
+ export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "fillOrigin" | "onValueChange" | "onChangeCommit"> {
26
36
  value: [
27
37
  number,
28
38
  number
29
39
  ];
40
+ /** The fewest steps the two thumbs keep between them; 0 (default) lets them meet. */
41
+ minStepsBetweenThumbs?: number;
30
42
  thumbLabels?: [
31
43
  string,
32
44
  string
@@ -1,5 +1,6 @@
1
- import { type SliderMarks, type SliderOrientation } from "../../../shared/package-runtime/slider-view.js";
2
- export type { KjunSliderMark } from "../../../shared/package-runtime/slider-view.js";
1
+ import { type SliderMarks, type SliderOrientation, type SliderValueLabel } from "../../../shared/package-runtime/slider-view.js";
2
+ export type { KjunSliderMark, SliderValueLabel as KjunSliderValueLabel } from "../../../shared/package-runtime/slider-view.js";
3
+ import { type CSSProperties } from "react";
3
4
  export interface KjunSliderProps {
4
5
  value: number;
5
6
  min?: number;
@@ -19,14 +20,25 @@ export interface KjunSliderProps {
19
20
  /** vertical: the rail runs bottom (min) to top (max), `length` px long. */
20
21
  orientation?: SliderOrientation;
21
22
  length?: number;
23
+ /** The value in a bubble on the thumb: "drag" while dragging or keyboard-focused, "always", or "off" (default). Follows formatValue. */
24
+ valueLabel?: SliderValueLabel;
25
+ /** The fill grows from this value instead of min, for two-way values such as -50…50; a tick marks it. Single slider only. */
26
+ fillOrigin?: number;
27
+ /** Submitted with a form through a hidden input; a range submits two values under the name. */
28
+ name?: string;
29
+ id?: string;
30
+ className?: string;
31
+ style?: CSSProperties;
22
32
  onValueChange?: (value: number) => void;
23
33
  onChangeCommit?: (value: number) => void;
24
34
  }
25
- export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "onValueChange" | "onChangeCommit"> {
35
+ export interface KjunRangeSliderProps extends Omit<KjunSliderProps, "value" | "fillOrigin" | "onValueChange" | "onChangeCommit"> {
26
36
  value: [
27
37
  number,
28
38
  number
29
39
  ];
40
+ /** The fewest steps the two thumbs keep between them; 0 (default) lets them meet. */
41
+ minStepsBetweenThumbs?: number;
30
42
  thumbLabels?: [
31
43
  string,
32
44
  string
@@ -1,13 +1,16 @@
1
1
  import { type InputSize } from "@kjun-ui/tokens";
2
- import { type ReactNode } from "react";
2
+ import { type ReactElement, type ReactNode, type RefAttributes } from "react";
3
3
  import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.cjs";
4
+ import { type SearchFieldInputProps } from "./combobox.cjs";
4
5
  import { SelectOption } from "./select-options.cjs";
5
- export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
6
+ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T>, Pick<SearchFieldInputProps, "id" | "name" | "className" | "style" | "autoFocus" | "autoComplete" | "readOnly" | "required" | "inputMode" | "enterKeyHint" | "onFocus" | "onBlur" | "aria-describedby" | "aria-labelledby"> {
6
7
  placeholder?: string;
7
8
  ariaLabel?: string;
8
9
  error?: boolean;
9
10
  clearable?: boolean;
10
11
  size?: InputSize;
12
+ /** Plain mode: the search icon turns into a spinner while results load elsewhere on the page (a table, a grid). */
13
+ loading?: boolean;
11
14
  itemKey?: string;
12
15
  labelField?: string;
13
16
  emptyText?: string;
@@ -18,4 +21,4 @@ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> ext
18
21
  onEnter?: () => void;
19
22
  onClear?: () => void;
20
23
  }
21
- export declare function KjunSearchInput<T extends SelectOption = SelectOption>({ value, placeholder, ariaLabel, disabled, error, clearable, debounce, size, loadOptions, itemKey, labelField, minChars, emptyText, errorText, renderOption, onValueChange, onSelect, onSearchError, onEnter, onClear, }: KjunSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
24
+ export declare const KjunSearchInput: <T extends SelectOption = SelectOption>(props: KjunSearchInputProps<T> & RefAttributes<HTMLInputElement>) => ReactElement;
@@ -1,13 +1,16 @@
1
1
  import { type InputSize } from "@kjun-ui/tokens";
2
- import { type ReactNode } from "react";
2
+ import { type ReactElement, type ReactNode, type RefAttributes } from "react";
3
3
  import { type SearchInputModelProps } from "../../../shared/package-runtime/search-input.js";
4
+ import { type SearchFieldInputProps } from "./combobox.js";
4
5
  import { SelectOption } from "./select-options.js";
5
- export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T> {
6
+ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> extends SearchInputModelProps<T>, Pick<SearchFieldInputProps, "id" | "name" | "className" | "style" | "autoFocus" | "autoComplete" | "readOnly" | "required" | "inputMode" | "enterKeyHint" | "onFocus" | "onBlur" | "aria-describedby" | "aria-labelledby"> {
6
7
  placeholder?: string;
7
8
  ariaLabel?: string;
8
9
  error?: boolean;
9
10
  clearable?: boolean;
10
11
  size?: InputSize;
12
+ /** Plain mode: the search icon turns into a spinner while results load elsewhere on the page (a table, a grid). */
13
+ loading?: boolean;
11
14
  itemKey?: string;
12
15
  labelField?: string;
13
16
  emptyText?: string;
@@ -18,4 +21,4 @@ export interface KjunSearchInputProps<T extends SelectOption = SelectOption> ext
18
21
  onEnter?: () => void;
19
22
  onClear?: () => void;
20
23
  }
21
- export declare function KjunSearchInput<T extends SelectOption = SelectOption>({ value, placeholder, ariaLabel, disabled, error, clearable, debounce, size, loadOptions, itemKey, labelField, minChars, emptyText, errorText, renderOption, onValueChange, onSelect, onSearchError, onEnter, onClear, }: KjunSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
24
+ export declare const KjunSearchInput: <T extends SelectOption = SelectOption>(props: KjunSearchInputProps<T> & RefAttributes<HTMLInputElement>) => ReactElement;
@@ -1,9 +1,11 @@
1
1
  import { type InputSize } from "@kjun-ui/tokens";
2
2
  import { type ReactNode } from "react";
3
+ import type { SelectMultipleDisplay } from "../../../shared/package-runtime/options.cjs";
3
4
  import { type FocusReturn } from "./floating-panel.cjs";
4
5
  import { OptionValue, SelectOption } from "./select-options.cjs";
5
6
  export interface KjunSelectProps<T extends SelectOption = SelectOption> {
6
7
  value: OptionValue | OptionValue[] | null;
8
+ /** Options, or groups `{ label, options }` that put a title over their options. */
7
9
  options?: T[];
8
10
  placeholder?: string;
9
11
  ariaLabel?: string;
@@ -24,10 +26,13 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
24
26
  optionPageSize?: number;
25
27
  clearable?: boolean;
26
28
  multiple?: boolean;
29
+ /** With multiple: "count" shows "N selected" for two or more, "labels" names them and counts the ones that do not fit. */
30
+ multipleDisplay?: SelectMultipleDisplay;
27
31
  error?: boolean;
28
32
  menuHeader?: ReactNode;
29
33
  renderOption?: (option: T, selected: boolean) => ReactNode;
30
- renderSelected?: (option: T | undefined) => ReactNode;
34
+ /** `value` lets a value whose option has not loaded yet still show something. */
35
+ renderSelected?: (option: T | undefined, value: OptionValue | OptionValue[] | null) => ReactNode;
31
36
  onValueChange?: (v: OptionValue | OptionValue[] | null) => void;
32
37
  onChange?: (v: OptionValue | OptionValue[] | null) => void;
33
38
  onOpenChange?: (v: boolean) => void;
@@ -40,4 +45,4 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
40
45
  /** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
41
46
  returnFocus?: FocusReturn;
42
47
  }
43
- export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
48
+ export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, multipleDisplay, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,11 @@
1
1
  import { type InputSize } from "@kjun-ui/tokens";
2
2
  import { type ReactNode } from "react";
3
+ import type { SelectMultipleDisplay } from "../../../shared/package-runtime/options.js";
3
4
  import { type FocusReturn } from "./floating-panel.js";
4
5
  import { OptionValue, SelectOption } from "./select-options.js";
5
6
  export interface KjunSelectProps<T extends SelectOption = SelectOption> {
6
7
  value: OptionValue | OptionValue[] | null;
8
+ /** Options, or groups `{ label, options }` that put a title over their options. */
7
9
  options?: T[];
8
10
  placeholder?: string;
9
11
  ariaLabel?: string;
@@ -24,10 +26,13 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
24
26
  optionPageSize?: number;
25
27
  clearable?: boolean;
26
28
  multiple?: boolean;
29
+ /** With multiple: "count" shows "N selected" for two or more, "labels" names them and counts the ones that do not fit. */
30
+ multipleDisplay?: SelectMultipleDisplay;
27
31
  error?: boolean;
28
32
  menuHeader?: ReactNode;
29
33
  renderOption?: (option: T, selected: boolean) => ReactNode;
30
- renderSelected?: (option: T | undefined) => ReactNode;
34
+ /** `value` lets a value whose option has not loaded yet still show something. */
35
+ renderSelected?: (option: T | undefined, value: OptionValue | OptionValue[] | null) => ReactNode;
31
36
  onValueChange?: (v: OptionValue | OptionValue[] | null) => void;
32
37
  onChange?: (v: OptionValue | OptionValue[] | null) => void;
33
38
  onOpenChange?: (v: boolean) => void;
@@ -40,4 +45,4 @@ export interface KjunSelectProps<T extends SelectOption = SelectOption> {
40
45
  /** Where focus goes when the menu closes by choosing or Escape, instead of the trigger (e.g. an edited cell). Web only. */
41
46
  returnFocus?: FocusReturn;
42
47
  }
43
- export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
48
+ export declare function KjunSelect<T extends SelectOption = SelectOption>({ value, options, placeholder, ariaLabel, labelKey, id: triggerId, ariaDescribedBy, valueKey, size, disabled, readOnly, searchable, open: controlled, loading, searchPlaceholder, optionPageSize, clearable, multiple, multipleDisplay, error, menuHeader, renderOption, renderSelected, onValueChange, onChange, onOpenChange, onSearch, onClear, filterFn, searchKeys, returnFocus, }: KjunSelectProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { type SideNavigationWidth } from "../../../shared/package-runtime/side-navigation.cjs";
2
+ import { type ReactNode } from "react";
3
+ export type { SideNavigationWidth } from "../../../shared/package-runtime/side-navigation.cjs";
4
+ /** Where the menu is drawn: in the column (collapsed or open) or in the drawer of a narrow screen, which is always open.
5
+ * closeDrawer closes that drawer, e.g. in the menu's onNavigate; in the column it does nothing. */
6
+ export type SideNavigationLayoutState = {
7
+ collapsed: boolean;
8
+ drawer: boolean;
9
+ closeDrawer: () => void;
10
+ };
11
+ export interface KjunSideNavigationLayoutProps {
12
+ /** The menu, usually a KjunSideNavigation. A function receives where it is drawn, so it can pass collapsed on, show
13
+ * the full menu in the drawer and close the drawer after navigating. */
14
+ nav: ReactNode | ((state: SideNavigationLayoutState) => ReactNode);
15
+ /** The page beside the menu. */
16
+ children?: ReactNode;
17
+ /** The column shrinks to the rail of icons. Pass the same value to the menu. */
18
+ collapsed?: boolean;
19
+ /** railBreakpoint asks to collapse or widen the column as the viewport crosses it. */
20
+ onCollapsedChange?: (collapsed: boolean) => void;
21
+ /** Below this viewport width the column asks to shrink to the rail (onCollapsedChange(true)), and above it to widen
22
+ * again; between crossings the menu's own toggle stands. Default 0, off. */
23
+ railBreakpoint?: number;
24
+ /** The menu shows names under its icons while collapsed (KjunSideNavigation railLabels), so the rail is wider. */
25
+ railLabels?: boolean;
26
+ /** The open column's width: sm 224, md 256 (default), lg 288. */
27
+ width?: SideNavigationWidth;
28
+ /** The column stays in view as the page scrolls (default), the viewport's height, scrolling on its own. false lets it
29
+ * scroll away with the page. */
30
+ sticky?: boolean;
31
+ /** How far below the viewport's top the sticky column stays, such as the height of a fixed top bar; the column is
32
+ * that much shorter than the viewport. Default 0. */
33
+ stickyOffset?: number;
34
+ /** Below this viewport width the column goes away and the menu opens in a drawer from the start edge (navOpen).
35
+ * Default tokens.responsive.sideNavigationLayout (768); 0 keeps the column at every width. */
36
+ breakpoint?: number;
37
+ /** The drawer of a narrow screen. Open it from the app's own menu button, and close it with the nav state's
38
+ * closeDrawer. Widening past the breakpoint closes it (onNavOpenChange(false)). */
39
+ navOpen?: boolean;
40
+ onNavOpenChange?: (open: boolean) => void;
41
+ /** The drawer's name for assistive technology; the menu's name by default. */
42
+ drawerLabel?: string;
43
+ className?: string;
44
+ }
45
+ /** A page with a side menu: a column that keeps the menu's width tokens (open or collapsed, sticky by default) beside the
46
+ * page, and a drawer for the menu below a breakpoint. The column's width follows collapsed with the collapse motion. */
47
+ export declare function KjunSideNavigationLayout({ nav, children, collapsed, onCollapsedChange, railBreakpoint, railLabels, width, sticky, stickyOffset, breakpoint, navOpen, onNavOpenChange, drawerLabel, className }: KjunSideNavigationLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { type SideNavigationWidth } from "../../../shared/package-runtime/side-navigation.js";
2
+ import { type ReactNode } from "react";
3
+ export type { SideNavigationWidth } from "../../../shared/package-runtime/side-navigation.js";
4
+ /** Where the menu is drawn: in the column (collapsed or open) or in the drawer of a narrow screen, which is always open.
5
+ * closeDrawer closes that drawer, e.g. in the menu's onNavigate; in the column it does nothing. */
6
+ export type SideNavigationLayoutState = {
7
+ collapsed: boolean;
8
+ drawer: boolean;
9
+ closeDrawer: () => void;
10
+ };
11
+ export interface KjunSideNavigationLayoutProps {
12
+ /** The menu, usually a KjunSideNavigation. A function receives where it is drawn, so it can pass collapsed on, show
13
+ * the full menu in the drawer and close the drawer after navigating. */
14
+ nav: ReactNode | ((state: SideNavigationLayoutState) => ReactNode);
15
+ /** The page beside the menu. */
16
+ children?: ReactNode;
17
+ /** The column shrinks to the rail of icons. Pass the same value to the menu. */
18
+ collapsed?: boolean;
19
+ /** railBreakpoint asks to collapse or widen the column as the viewport crosses it. */
20
+ onCollapsedChange?: (collapsed: boolean) => void;
21
+ /** Below this viewport width the column asks to shrink to the rail (onCollapsedChange(true)), and above it to widen
22
+ * again; between crossings the menu's own toggle stands. Default 0, off. */
23
+ railBreakpoint?: number;
24
+ /** The menu shows names under its icons while collapsed (KjunSideNavigation railLabels), so the rail is wider. */
25
+ railLabels?: boolean;
26
+ /** The open column's width: sm 224, md 256 (default), lg 288. */
27
+ width?: SideNavigationWidth;
28
+ /** The column stays in view as the page scrolls (default), the viewport's height, scrolling on its own. false lets it
29
+ * scroll away with the page. */
30
+ sticky?: boolean;
31
+ /** How far below the viewport's top the sticky column stays, such as the height of a fixed top bar; the column is
32
+ * that much shorter than the viewport. Default 0. */
33
+ stickyOffset?: number;
34
+ /** Below this viewport width the column goes away and the menu opens in a drawer from the start edge (navOpen).
35
+ * Default tokens.responsive.sideNavigationLayout (768); 0 keeps the column at every width. */
36
+ breakpoint?: number;
37
+ /** The drawer of a narrow screen. Open it from the app's own menu button, and close it with the nav state's
38
+ * closeDrawer. Widening past the breakpoint closes it (onNavOpenChange(false)). */
39
+ navOpen?: boolean;
40
+ onNavOpenChange?: (open: boolean) => void;
41
+ /** The drawer's name for assistive technology; the menu's name by default. */
42
+ drawerLabel?: string;
43
+ className?: string;
44
+ }
45
+ /** A page with a side menu: a column that keeps the menu's width tokens (open or collapsed, sticky by default) beside the
46
+ * page, and a drawer for the menu below a breakpoint. The column's width follows collapsed with the collapse motion. */
47
+ export declare function KjunSideNavigationLayout({ nav, children, collapsed, onCollapsedChange, railBreakpoint, railLabels, width, sticky, stickyOffset, breakpoint, navOpen, onNavOpenChange, drawerLabel, className }: KjunSideNavigationLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,74 @@
1
+ import { type SideNavigationCollapsedParent, type SideNavigationEntry, type SideNavigationHeadingLevel, type SideNavigationRail } from "../../../shared/package-runtime/side-navigation.cjs";
2
+ import { type ElementType, type MouseEvent, type ReactNode } from "react";
3
+ export type { SideNavigationAction, SideNavigationBadgeTone, SideNavigationCollapsedParent, SideNavigationDestination, SideNavigationHeadingLevel, SideNavigationParent, SideNavigationSubParent, SideNavigationItem, SideNavigationGroup, SideNavigationEntry, SideNavigationRail } from "../../../shared/package-runtime/side-navigation.cjs";
4
+ type Navigate = (key: string, event: MouseEvent<HTMLAnchorElement>) => void;
5
+ /** A header or footer: content, or a function of collapsed so it can swap to an icon-only form. */
6
+ export type SideNavigationSlot = ReactNode | ((collapsed: boolean) => ReactNode);
7
+ export interface KjunSideNavigationProps {
8
+ /** Destinations, parents with up to two levels under them, and titled groups of either. A destination has the bottom
9
+ * navigation's shape. */
10
+ items: SideNavigationEntry[];
11
+ /** The current destination's key (a child's key when the page is under a parent); null for a page outside the menu. */
12
+ value: string | null;
13
+ ariaLabel?: string;
14
+ /** A plain click on a destination of this tab. Modified clicks (new tab) and target links are left to the browser.
15
+ * With linkAs the router link already navigates: use this only for side effects such as closing a drawer. */
16
+ onNavigate?: Navigate;
17
+ /** The current destination was pressed again, e.g. to scroll its page back to the top. */
18
+ onReselect?: Navigate;
19
+ /** The open parents, at both levels. Without it the navigation keeps the list itself, starting with the parents of the
20
+ * current destination open. */
21
+ expanded?: string[];
22
+ /** Also called when moving to a page under a closed parent opens it. */
23
+ onExpandedChange?: (expanded: string[]) => void;
24
+ /** Icons only, for a narrowed column. Names show as tooltips, and children stay hidden behind their parent. */
25
+ collapsed?: boolean;
26
+ /** A parent or group was pressed while collapsed (collapsedParent="widen"), or the collapse toggle was pressed. */
27
+ onCollapsedChange?: (collapsed: boolean) => void;
28
+ /** Group titles become toggles that show or hide their group. A group's own collapsible overrides this. The group of
29
+ * the current destination starts open, and so do groups marked defaultOpen. */
30
+ collapsibleGroups?: boolean;
31
+ /** The open groups by key (a group's key, else its title). Without it the navigation keeps the list itself. */
32
+ expandedGroups?: string[];
33
+ /** Also called when moving to a page in a closed group opens it. */
34
+ onExpandedGroupsChange?: (expandedGroups: string[]) => void;
35
+ /** A group title that opens and closes ends with how many rows its group holds (a dot instead while a closed group has
36
+ * a badge inside). */
37
+ groupCounts?: boolean;
38
+ /** The groups (by key) showing every row past their limit. Without it the navigation keeps the list itself. */
39
+ showAll?: string[];
40
+ onShowAllChange?: (showAll: string[]) => void;
41
+ /** While collapsed: one icon per top-level item ("items"), or one per group ("groups", from the group's icon).
42
+ * Loose items between groups keep their own row. */
43
+ rail?: SideNavigationRail;
44
+ /** While collapsed: a short name (shortLabel, else the label) under each icon, in a 72 wide column. The current page,
45
+ * hover and press fill a 56 by 32 indicator around the icon, a count stays a number, and a tooltip shows only a name
46
+ * that was shortened. */
47
+ railLabels?: boolean;
48
+ /** While collapsed, pressing a parent or a rail group: "widen" asks for the full width with it open (onCollapsedChange);
49
+ * "flyout" shows its rows in a panel beside the icon and keeps the column narrow. */
50
+ collapsedParent?: SideNavigationCollapsedParent;
51
+ /** While collapsed, a hairline the icon's width between groups, on top of the gap that separates them. Off: the gap alone. */
52
+ railDividers?: boolean;
53
+ /** "compact": 32 tall rows and 30 tall children under a mouse, and counts as quiet numbers, for long lists (documentation,
54
+ * settings). A touch pointer keeps the touch heights. */
55
+ density?: "default" | "compact";
56
+ /** The level of the group titles' headings (default 2), to fit the page's outline. */
57
+ headingLevel?: SideNavigationHeadingLevel;
58
+ /** Above the list, such as a logo, a workspace switcher or search. With a header or footer only the list scrolls. */
59
+ header?: SideNavigationSlot;
60
+ /** Below the list, such as the account. */
61
+ footer?: SideNavigationSlot;
62
+ /** A button at the end of the footer that asks to collapse or widen the column (onCollapsedChange). */
63
+ collapseToggle?: boolean;
64
+ /** An action button of a row (the row's key) or a group title (the group's key) was pressed. */
65
+ onAction?: (key: string, action: string, event: MouseEvent<HTMLButtonElement>) => void;
66
+ /** Renders enabled links with the app's router link (Next.js Link, React Router Link) instead of <a>. It receives href,
67
+ * className, the aria-* and data-* attributes, onClick and children, and must render an <a> with them. */
68
+ linkAs?: ElementType;
69
+ /** Brings the current row into the menu's own scrolling column when the menu mounts, when the page changes and when
70
+ * items that hold it arrive. */
71
+ scrollToCurrent?: boolean;
72
+ }
73
+ /** A vertical menu for the side of a wide screen: links aligned to the start, the current one filled, groups with titles and up to two levels of children. */
74
+ export declare function KjunSideNavigation({ items, value, ariaLabel, onNavigate, onReselect, expanded, onExpandedChange, collapsed, onCollapsedChange, collapsibleGroups, expandedGroups, onExpandedGroupsChange, groupCounts, showAll, onShowAllChange, rail, railLabels, collapsedParent, railDividers, density, headingLevel, header, footer, collapseToggle, onAction, linkAs, scrollToCurrent }: KjunSideNavigationProps): import("react/jsx-runtime").JSX.Element;