@kjun-ui/react 0.20.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 (327) hide show
  1. package/README.md +19 -5
  2. package/dist/index.cjs +11354 -4458
  3. package/dist/index.js +10951 -4033
  4. package/dist/styles.css +3948 -738
  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 +14 -5
  8. package/dist/types/packages/react/src/app-navigation.d.ts +14 -5
  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-actions-context.d.cts +2 -0
  16. package/dist/types/packages/react/src/card-actions-context.d.ts +2 -0
  17. package/dist/types/packages/react/src/card.d.cts +23 -6
  18. package/dist/types/packages/react/src/card.d.ts +23 -6
  19. package/dist/types/packages/react/src/carousel.d.cts +8 -1
  20. package/dist/types/packages/react/src/carousel.d.ts +8 -1
  21. package/dist/types/packages/react/src/chip.d.cts +4 -2
  22. package/dist/types/packages/react/src/chip.d.ts +4 -2
  23. package/dist/types/packages/react/src/choice-controls.d.cts +99 -0
  24. package/dist/types/packages/react/src/choice-controls.d.ts +99 -0
  25. package/dist/types/packages/react/src/collapse.d.cts +4 -1
  26. package/dist/types/packages/react/src/collapse.d.ts +4 -1
  27. package/dist/types/packages/react/src/color-picker-parts.d.cts +58 -0
  28. package/dist/types/packages/react/src/color-picker-parts.d.ts +58 -0
  29. package/dist/types/packages/react/src/color-picker.d.cts +58 -0
  30. package/dist/types/packages/react/src/color-picker.d.ts +58 -0
  31. package/dist/types/packages/react/src/combobox.d.cts +18 -5
  32. package/dist/types/packages/react/src/combobox.d.ts +18 -5
  33. package/dist/types/packages/react/src/controls.d.cts +7 -74
  34. package/dist/types/packages/react/src/controls.d.ts +7 -74
  35. package/dist/types/packages/react/src/data-state.d.cts +22 -9
  36. package/dist/types/packages/react/src/data-state.d.ts +22 -9
  37. package/dist/types/packages/react/src/date-picker.d.cts +8 -2
  38. package/dist/types/packages/react/src/date-picker.d.ts +8 -2
  39. package/dist/types/packages/react/src/display.d.cts +40 -11
  40. package/dist/types/packages/react/src/display.d.ts +40 -11
  41. package/dist/types/packages/react/src/drawer.d.cts +11 -2
  42. package/dist/types/packages/react/src/drawer.d.ts +11 -2
  43. package/dist/types/packages/react/src/dropdown.d.cts +19 -5
  44. package/dist/types/packages/react/src/dropdown.d.ts +19 -5
  45. package/dist/types/packages/react/src/event-calendar.d.cts +47 -0
  46. package/dist/types/packages/react/src/event-calendar.d.ts +47 -0
  47. package/dist/types/packages/react/src/fab.d.cts +18 -7
  48. package/dist/types/packages/react/src/fab.d.ts +18 -7
  49. package/dist/types/packages/react/src/file-upload-row.d.cts +23 -0
  50. package/dist/types/packages/react/src/file-upload-row.d.ts +23 -0
  51. package/dist/types/packages/react/src/file-upload.d.cts +38 -0
  52. package/dist/types/packages/react/src/file-upload.d.ts +38 -0
  53. package/dist/types/packages/react/src/financial-display.d.cts +32 -11
  54. package/dist/types/packages/react/src/financial-display.d.ts +32 -11
  55. package/dist/types/packages/react/src/floating-panel.d.cts +6 -2
  56. package/dist/types/packages/react/src/floating-panel.d.ts +6 -2
  57. package/dist/types/packages/react/src/index.d.cts +16 -1
  58. package/dist/types/packages/react/src/index.d.ts +16 -1
  59. package/dist/types/packages/react/src/input.d.cts +14 -1
  60. package/dist/types/packages/react/src/input.d.ts +14 -1
  61. package/dist/types/packages/react/src/kpi-hero.d.cts +55 -0
  62. package/dist/types/packages/react/src/kpi-hero.d.ts +55 -0
  63. package/dist/types/packages/react/src/kpi-row.d.cts +46 -0
  64. package/dist/types/packages/react/src/kpi-row.d.ts +46 -0
  65. package/dist/types/packages/react/src/kpi.d.cts +2 -72
  66. package/dist/types/packages/react/src/kpi.d.ts +2 -72
  67. package/dist/types/packages/react/src/layout-primitives.d.cts +71 -139
  68. package/dist/types/packages/react/src/layout-primitives.d.ts +71 -139
  69. package/dist/types/packages/react/src/list-context.d.cts +9 -0
  70. package/dist/types/packages/react/src/list-context.d.ts +9 -0
  71. package/dist/types/packages/react/src/list.d.cts +84 -11
  72. package/dist/types/packages/react/src/list.d.ts +84 -11
  73. package/dist/types/packages/react/src/market-model.d.cts +13 -1
  74. package/dist/types/packages/react/src/market-model.d.ts +13 -1
  75. package/dist/types/packages/react/src/market-parts.d.cts +9 -0
  76. package/dist/types/packages/react/src/market-parts.d.ts +9 -0
  77. package/dist/types/packages/react/src/market-skeleton.d.cts +7 -1
  78. package/dist/types/packages/react/src/market-skeleton.d.ts +7 -1
  79. package/dist/types/packages/react/src/media.d.cts +6 -2
  80. package/dist/types/packages/react/src/media.d.ts +6 -2
  81. package/dist/types/packages/react/src/modal.d.cts +14 -2
  82. package/dist/types/packages/react/src/modal.d.ts +14 -2
  83. package/dist/types/packages/react/src/navigation.d.cts +36 -6
  84. package/dist/types/packages/react/src/navigation.d.ts +36 -6
  85. package/dist/types/packages/react/src/number-display.d.cts +10 -5
  86. package/dist/types/packages/react/src/number-display.d.ts +10 -5
  87. package/dist/types/packages/react/src/number-input.d.cts +28 -0
  88. package/dist/types/packages/react/src/number-input.d.ts +28 -0
  89. package/dist/types/packages/react/src/popover.d.cts +5 -2
  90. package/dist/types/packages/react/src/popover.d.ts +5 -2
  91. package/dist/types/packages/react/src/pressable.d.cts +17 -0
  92. package/dist/types/packages/react/src/pressable.d.ts +17 -0
  93. package/dist/types/packages/react/src/quantity-stepper.d.cts +3 -1
  94. package/dist/types/packages/react/src/quantity-stepper.d.ts +3 -1
  95. package/dist/types/packages/react/src/range-input.d.cts +15 -3
  96. package/dist/types/packages/react/src/range-input.d.ts +15 -3
  97. package/dist/types/packages/react/src/reorder-controls.d.cts +43 -0
  98. package/dist/types/packages/react/src/reorder-controls.d.ts +43 -0
  99. package/dist/types/packages/react/src/search-input.d.cts +6 -3
  100. package/dist/types/packages/react/src/search-input.d.ts +6 -3
  101. package/dist/types/packages/react/src/select-control.d.cts +7 -2
  102. package/dist/types/packages/react/src/select-control.d.ts +7 -2
  103. package/dist/types/packages/react/src/side-navigation-layout.d.cts +47 -0
  104. package/dist/types/packages/react/src/side-navigation-layout.d.ts +47 -0
  105. package/dist/types/packages/react/src/side-navigation.d.cts +74 -0
  106. package/dist/types/packages/react/src/side-navigation.d.ts +74 -0
  107. package/dist/types/packages/react/src/skeletons.d.cts +19 -3
  108. package/dist/types/packages/react/src/skeletons.d.ts +19 -3
  109. package/dist/types/packages/react/src/spinner-glyph.d.cts +8 -0
  110. package/dist/types/packages/react/src/spinner-glyph.d.ts +8 -0
  111. package/dist/types/packages/react/src/split-pane.d.cts +43 -0
  112. package/dist/types/packages/react/src/split-pane.d.ts +43 -0
  113. package/dist/types/packages/react/src/stacked-bar.d.cts +24 -0
  114. package/dist/types/packages/react/src/stacked-bar.d.ts +24 -0
  115. package/dist/types/packages/react/src/steps.d.cts +26 -0
  116. package/dist/types/packages/react/src/steps.d.ts +26 -0
  117. package/dist/types/packages/react/src/table-cards.d.cts +4 -12
  118. package/dist/types/packages/react/src/table-cards.d.ts +4 -12
  119. package/dist/types/packages/react/src/table-grid.d.cts +3 -7
  120. package/dist/types/packages/react/src/table-grid.d.ts +3 -7
  121. package/dist/types/packages/react/src/table-groups.d.cts +5 -0
  122. package/dist/types/packages/react/src/table-groups.d.ts +5 -0
  123. package/dist/types/packages/react/src/table-list.d.cts +2 -9
  124. package/dist/types/packages/react/src/table-list.d.ts +2 -9
  125. package/dist/types/packages/react/src/table-model.d.cts +6 -2
  126. package/dist/types/packages/react/src/table-model.d.ts +6 -2
  127. package/dist/types/packages/react/src/tabs.d.cts +3 -1
  128. package/dist/types/packages/react/src/tabs.d.ts +3 -1
  129. package/dist/types/packages/react/src/textarea.d.cts +6 -3
  130. package/dist/types/packages/react/src/textarea.d.ts +6 -3
  131. package/dist/types/packages/react/src/tiles.d.cts +18 -0
  132. package/dist/types/packages/react/src/tiles.d.ts +18 -0
  133. package/dist/types/packages/react/src/time-picker.d.cts +12 -2
  134. package/dist/types/packages/react/src/time-picker.d.ts +12 -2
  135. package/dist/types/packages/react/src/time-wheel.d.cts +18 -0
  136. package/dist/types/packages/react/src/time-wheel.d.ts +18 -0
  137. package/dist/types/packages/react/src/use-filter-scroll.d.cts +5 -0
  138. package/dist/types/packages/react/src/use-filter-scroll.d.ts +5 -0
  139. package/dist/types/packages/react/src/zone-gauge.d.cts +28 -0
  140. package/dist/types/packages/react/src/zone-gauge.d.ts +28 -0
  141. package/dist/types/shared/package-runtime/accordion-state.d.cts +2 -0
  142. package/dist/types/shared/package-runtime/accordion-state.d.ts +2 -0
  143. package/dist/types/shared/package-runtime/action-size.d.cts +4 -0
  144. package/dist/types/shared/package-runtime/action-size.d.ts +4 -0
  145. package/dist/types/shared/package-runtime/alert-action-size.d.cts +1 -0
  146. package/dist/types/shared/package-runtime/alert-action-size.d.ts +1 -0
  147. package/dist/types/shared/package-runtime/alert-actions.d.cts +7 -0
  148. package/dist/types/shared/package-runtime/alert-actions.d.ts +7 -0
  149. package/dist/types/shared/package-runtime/alert-exit.d.cts +6 -0
  150. package/dist/types/shared/package-runtime/alert-exit.d.ts +6 -0
  151. package/dist/types/shared/package-runtime/alert-live.d.cts +2 -0
  152. package/dist/types/shared/package-runtime/alert-live.d.ts +2 -0
  153. package/dist/types/shared/package-runtime/avatar-group.d.cts +18 -0
  154. package/dist/types/shared/package-runtime/avatar-group.d.ts +18 -0
  155. package/dist/types/shared/package-runtime/badge-tone.d.cts +8 -2
  156. package/dist/types/shared/package-runtime/badge-tone.d.ts +8 -2
  157. package/dist/types/shared/package-runtime/bottom-bar.d.cts +15 -0
  158. package/dist/types/shared/package-runtime/bottom-bar.d.ts +15 -0
  159. package/dist/types/shared/package-runtime/bottom-navigation.d.cts +30 -0
  160. package/dist/types/shared/package-runtime/bottom-navigation.d.ts +30 -0
  161. package/dist/types/shared/package-runtime/calendar.d.cts +21 -7
  162. package/dist/types/shared/package-runtime/calendar.d.ts +21 -7
  163. package/dist/types/shared/package-runtime/card-layout.d.cts +42 -0
  164. package/dist/types/shared/package-runtime/card-layout.d.ts +42 -0
  165. package/dist/types/shared/package-runtime/carousel-scroll.d.cts +2 -0
  166. package/dist/types/shared/package-runtime/carousel-scroll.d.ts +2 -0
  167. package/dist/types/shared/package-runtime/carousel.d.cts +12 -2
  168. package/dist/types/shared/package-runtime/carousel.d.ts +12 -2
  169. package/dist/types/shared/package-runtime/chart-skeleton.d.cts +2 -2
  170. package/dist/types/shared/package-runtime/chart-skeleton.d.ts +2 -2
  171. package/dist/types/shared/package-runtime/chip-size.d.cts +4 -0
  172. package/dist/types/shared/package-runtime/chip-size.d.ts +4 -0
  173. package/dist/types/shared/package-runtime/clipboard.d.cts +6 -0
  174. package/dist/types/shared/package-runtime/clipboard.d.ts +6 -0
  175. package/dist/types/shared/package-runtime/color-picker-model.d.cts +51 -0
  176. package/dist/types/shared/package-runtime/color-picker-model.d.ts +51 -0
  177. package/dist/types/shared/package-runtime/color-picker.d.cts +92 -0
  178. package/dist/types/shared/package-runtime/color-picker.d.ts +92 -0
  179. package/dist/types/shared/package-runtime/color.d.cts +22 -0
  180. package/dist/types/shared/package-runtime/color.d.ts +22 -0
  181. package/dist/types/shared/package-runtime/combobox-options.d.cts +13 -0
  182. package/dist/types/shared/package-runtime/combobox-options.d.ts +13 -0
  183. package/dist/types/shared/package-runtime/combobox.d.cts +3 -1
  184. package/dist/types/shared/package-runtime/combobox.d.ts +3 -1
  185. package/dist/types/shared/package-runtime/copy-button.d.cts +11 -0
  186. package/dist/types/shared/package-runtime/copy-button.d.ts +11 -0
  187. package/dist/types/shared/package-runtime/data-cells.d.cts +36 -0
  188. package/dist/types/shared/package-runtime/data-cells.d.ts +36 -0
  189. package/dist/types/shared/package-runtime/development.d.cts +4 -0
  190. package/dist/types/shared/package-runtime/development.d.ts +4 -0
  191. package/dist/types/shared/package-runtime/distribution.d.cts +168 -0
  192. package/dist/types/shared/package-runtime/distribution.d.ts +168 -0
  193. package/dist/types/shared/package-runtime/drawer-geometry.d.cts +7 -0
  194. package/dist/types/shared/package-runtime/drawer-geometry.d.ts +7 -0
  195. package/dist/types/shared/package-runtime/empty-geometry.d.cts +19 -0
  196. package/dist/types/shared/package-runtime/empty-geometry.d.ts +19 -0
  197. package/dist/types/shared/package-runtime/event-calendar.d.cts +81 -0
  198. package/dist/types/shared/package-runtime/event-calendar.d.ts +81 -0
  199. package/dist/types/shared/package-runtime/external-link.d.cts +4 -0
  200. package/dist/types/shared/package-runtime/external-link.d.ts +4 -0
  201. package/dist/types/shared/package-runtime/file-upload.d.cts +128 -0
  202. package/dist/types/shared/package-runtime/file-upload.d.ts +128 -0
  203. package/dist/types/shared/package-runtime/filter-scroll.d.cts +5 -0
  204. package/dist/types/shared/package-runtime/filter-scroll.d.ts +5 -0
  205. package/dist/types/shared/package-runtime/filter-value.d.cts +2 -0
  206. package/dist/types/shared/package-runtime/filter-value.d.ts +2 -0
  207. package/dist/types/shared/package-runtime/input-field.d.cts +23 -0
  208. package/dist/types/shared/package-runtime/input-field.d.ts +23 -0
  209. package/dist/types/shared/package-runtime/input-variant.d.cts +7 -0
  210. package/dist/types/shared/package-runtime/input-variant.d.ts +7 -0
  211. package/dist/types/shared/package-runtime/kpi.d.cts +102 -0
  212. package/dist/types/shared/package-runtime/kpi.d.ts +102 -0
  213. package/dist/types/shared/package-runtime/layer-state.d.cts +2 -1
  214. package/dist/types/shared/package-runtime/layer-state.d.ts +2 -1
  215. package/dist/types/shared/package-runtime/layout-primitives.d.cts +115 -6
  216. package/dist/types/shared/package-runtime/layout-primitives.d.ts +115 -6
  217. package/dist/types/shared/package-runtime/list-leading.d.cts +38 -0
  218. package/dist/types/shared/package-runtime/list-leading.d.ts +38 -0
  219. package/dist/types/shared/package-runtime/list-row.d.cts +152 -4
  220. package/dist/types/shared/package-runtime/list-row.d.ts +152 -4
  221. package/dist/types/shared/package-runtime/market-layout.d.cts +6 -2
  222. package/dist/types/shared/package-runtime/market-layout.d.ts +6 -2
  223. package/dist/types/shared/package-runtime/market-query.d.cts +21 -0
  224. package/dist/types/shared/package-runtime/market-query.d.ts +21 -0
  225. package/dist/types/shared/package-runtime/market-table.d.cts +32 -0
  226. package/dist/types/shared/package-runtime/market-table.d.ts +32 -0
  227. package/dist/types/shared/package-runtime/menu-button.d.cts +4 -0
  228. package/dist/types/shared/package-runtime/menu-button.d.ts +4 -0
  229. package/dist/types/shared/package-runtime/messages/ko.d.cts +101 -1
  230. package/dist/types/shared/package-runtime/messages/ko.d.ts +101 -1
  231. package/dist/types/shared/package-runtime/messages-context.d.cts +93 -1
  232. package/dist/types/shared/package-runtime/messages-context.d.ts +93 -1
  233. package/dist/types/shared/package-runtime/minimum-loading.d.cts +3 -0
  234. package/dist/types/shared/package-runtime/minimum-loading.d.ts +3 -0
  235. package/dist/types/shared/package-runtime/modal-geometry.d.cts +15 -0
  236. package/dist/types/shared/package-runtime/modal-geometry.d.ts +15 -0
  237. package/dist/types/shared/package-runtime/navigation.d.cts +9 -2
  238. package/dist/types/shared/package-runtime/navigation.d.ts +9 -2
  239. package/dist/types/shared/package-runtime/nested-controls.d.cts +7 -0
  240. package/dist/types/shared/package-runtime/nested-controls.d.ts +7 -0
  241. package/dist/types/shared/package-runtime/number-input.d.cts +63 -0
  242. package/dist/types/shared/package-runtime/number-input.d.ts +63 -0
  243. package/dist/types/shared/package-runtime/number-sign.d.cts +9 -0
  244. package/dist/types/shared/package-runtime/number-sign.d.ts +9 -0
  245. package/dist/types/shared/package-runtime/options.d.cts +25 -5
  246. package/dist/types/shared/package-runtime/options.d.ts +25 -5
  247. package/dist/types/shared/package-runtime/pagination.d.cts +12 -0
  248. package/dist/types/shared/package-runtime/pagination.d.ts +12 -0
  249. package/dist/types/shared/package-runtime/popover-scroll.d.cts +3 -0
  250. package/dist/types/shared/package-runtime/popover-scroll.d.ts +3 -0
  251. package/dist/types/shared/package-runtime/press-repeat.d.cts +13 -0
  252. package/dist/types/shared/package-runtime/press-repeat.d.ts +13 -0
  253. package/dist/types/shared/package-runtime/progress-circle.d.cts +5 -0
  254. package/dist/types/shared/package-runtime/progress-circle.d.ts +5 -0
  255. package/dist/types/shared/package-runtime/progress-marker.d.cts +7 -0
  256. package/dist/types/shared/package-runtime/progress-marker.d.ts +7 -0
  257. package/dist/types/shared/package-runtime/radio-keyboard.d.cts +2 -0
  258. package/dist/types/shared/package-runtime/radio-keyboard.d.ts +2 -0
  259. package/dist/types/shared/package-runtime/reorder-session.d.cts +62 -0
  260. package/dist/types/shared/package-runtime/reorder-session.d.ts +62 -0
  261. package/dist/types/shared/package-runtime/reorder.d.cts +81 -0
  262. package/dist/types/shared/package-runtime/reorder.d.ts +81 -0
  263. package/dist/types/shared/package-runtime/select-trigger.d.cts +23 -0
  264. package/dist/types/shared/package-runtime/select-trigger.d.ts +23 -0
  265. package/dist/types/shared/package-runtime/sheet-drag.d.cts +24 -0
  266. package/dist/types/shared/package-runtime/sheet-drag.d.ts +24 -0
  267. package/dist/types/shared/package-runtime/side-navigation-keys.d.cts +23 -0
  268. package/dist/types/shared/package-runtime/side-navigation-keys.d.ts +23 -0
  269. package/dist/types/shared/package-runtime/side-navigation-scroll.d.cts +7 -0
  270. package/dist/types/shared/package-runtime/side-navigation-scroll.d.ts +7 -0
  271. package/dist/types/shared/package-runtime/side-navigation.d.cts +277 -0
  272. package/dist/types/shared/package-runtime/side-navigation.d.ts +277 -0
  273. package/dist/types/shared/package-runtime/signed-number.d.cts +33 -0
  274. package/dist/types/shared/package-runtime/signed-number.d.ts +33 -0
  275. package/dist/types/shared/package-runtime/skeleton-text.d.cts +18 -0
  276. package/dist/types/shared/package-runtime/skeleton-text.d.ts +18 -0
  277. package/dist/types/shared/package-runtime/slider-view.d.cts +17 -2
  278. package/dist/types/shared/package-runtime/slider-view.d.ts +17 -2
  279. package/dist/types/shared/package-runtime/sparkline.d.cts +8 -4
  280. package/dist/types/shared/package-runtime/sparkline.d.ts +8 -4
  281. package/dist/types/shared/package-runtime/spinner-geometry.d.cts +14 -0
  282. package/dist/types/shared/package-runtime/spinner-geometry.d.ts +14 -0
  283. package/dist/types/shared/package-runtime/split-pane.d.cts +85 -0
  284. package/dist/types/shared/package-runtime/split-pane.d.ts +85 -0
  285. package/dist/types/shared/package-runtime/steps.d.cts +37 -0
  286. package/dist/types/shared/package-runtime/steps.d.ts +37 -0
  287. package/dist/types/shared/package-runtime/tab-keyboard.d.cts +6 -0
  288. package/dist/types/shared/package-runtime/tab-keyboard.d.ts +6 -0
  289. package/dist/types/shared/package-runtime/table-columns.d.cts +36 -0
  290. package/dist/types/shared/package-runtime/table-columns.d.ts +36 -0
  291. package/dist/types/shared/package-runtime/table-model.d.cts +23 -3
  292. package/dist/types/shared/package-runtime/table-model.d.ts +23 -3
  293. package/dist/types/shared/package-runtime/table-presentation.d.cts +33 -4
  294. package/dist/types/shared/package-runtime/table-presentation.d.ts +33 -4
  295. package/dist/types/shared/package-runtime/table.d.cts +44 -2
  296. package/dist/types/shared/package-runtime/table.d.ts +44 -2
  297. package/dist/types/shared/package-runtime/textarea.d.cts +6 -4
  298. package/dist/types/shared/package-runtime/textarea.d.ts +6 -4
  299. package/dist/types/shared/package-runtime/tiles-children.d.cts +7 -0
  300. package/dist/types/shared/package-runtime/tiles-children.d.ts +7 -0
  301. package/dist/types/shared/package-runtime/tiles.d.cts +18 -0
  302. package/dist/types/shared/package-runtime/tiles.d.ts +18 -0
  303. package/dist/types/shared/package-runtime/time-segments.d.cts +24 -0
  304. package/dist/types/shared/package-runtime/time-segments.d.ts +24 -0
  305. package/dist/types/shared/package-runtime/time-wheel.d.cts +54 -0
  306. package/dist/types/shared/package-runtime/time-wheel.d.ts +54 -0
  307. package/dist/types/shared/package-runtime/trailing-overflow.d.cts +1 -0
  308. package/dist/types/shared/package-runtime/trailing-overflow.d.ts +1 -0
  309. package/dist/types/shared/package-runtime/use-color-picker.d.cts +54 -0
  310. package/dist/types/shared/package-runtime/use-color-picker.d.ts +54 -0
  311. package/dist/types/shared/package-runtime/use-copy-feedback.d.cts +10 -0
  312. package/dist/types/shared/package-runtime/use-copy-feedback.d.ts +10 -0
  313. package/dist/types/shared/package-runtime/use-layer.d.cts +4 -2
  314. package/dist/types/shared/package-runtime/use-layer.d.ts +4 -2
  315. package/dist/types/shared/package-runtime/use-open-state.d.cts +5 -0
  316. package/dist/types/shared/package-runtime/use-open-state.d.ts +5 -0
  317. package/dist/types/shared/package-runtime/use-pending-action.d.cts +6 -0
  318. package/dist/types/shared/package-runtime/use-pending-action.d.ts +6 -0
  319. package/dist/types/shared/package-runtime/use-side-navigation-state.d.cts +25 -0
  320. package/dist/types/shared/package-runtime/use-side-navigation-state.d.ts +25 -0
  321. package/dist/types/shared/package-runtime/use-slide.d.cts +3 -0
  322. package/dist/types/shared/package-runtime/use-slide.d.ts +3 -0
  323. package/package.json +3 -3
  324. package/dist/types/packages/react/src/compound-control.d.cts +0 -1
  325. package/dist/types/packages/react/src/compound-control.d.ts +0 -1
  326. package/dist/types/shared/package-runtime/center-option.d.cts +0 -1
  327. package/dist/types/shared/package-runtime/center-option.d.ts +0 -1
@@ -0,0 +1,63 @@
1
+ import type { KjunMessageScope } from "./messages/index.js";
2
+ export type NumberInputFormat = "number" | "amount" | "percent";
3
+ export interface NumberInputOptions {
4
+ format?: NumberInputFormat;
5
+ decimals?: number;
6
+ grouping?: boolean;
7
+ allowNegative?: boolean;
8
+ min?: number;
9
+ max?: number;
10
+ suffix?: unknown;
11
+ }
12
+ export interface ResolvedNumberInput {
13
+ format: NumberInputFormat;
14
+ decimals: number;
15
+ grouping: boolean;
16
+ allowNegative: boolean;
17
+ min?: number;
18
+ max?: number;
19
+ suffix?: string;
20
+ maxIntegerDigits: number;
21
+ }
22
+ /** Preset plus the caller's overrides; decimals are cut to a whole 0-6 so the scaled value stays a safe integer. */
23
+ export declare function resolveNumberInput(options: NumberInputOptions): ResolvedNumberInput;
24
+ export interface SanitizeOptions {
25
+ /** Pasted or dropped text: with no decimals allowed, the fraction is dropped at the first "." ("1,234,000.00" → "1234000") instead of the dots being ignored. */
26
+ pasted?: boolean;
27
+ }
28
+ /** Keeps digits, one ".", and "-" when allowed; any "-" in the text makes the value negative. Returns the draft ("-12.5", "12.", "").
29
+ * A dot with no digits becomes "0." (or "-0.") when decimals are allowed, so ".5" can be typed. Integer digits past the limit are cut. */
30
+ export declare function sanitizeNumber(text: string, o: ResolvedNumberInput, options?: SanitizeOptions): string;
31
+ /** True when `next` holds more integer digits than the field keeps and more than `previous` did: a typed edit like that is refused, not cut. */
32
+ export declare function addsTooManyDigits(previous: string, next: string, o: ResolvedNumberInput): boolean;
33
+ /** An edit that inserted more than one character at once, or that the browser reports as a paste or drop. */
34
+ export declare function isPasteEdit(before: string, after: string, inputType?: string): boolean;
35
+ /** Whether two values name the same number: "12." and "12" do, "", "-" and "." are all empty, "" and "0" are not. */
36
+ export declare function sameNumber(a: string, b: string): boolean;
37
+ /** Display text: thousands commas only, nothing padded. */
38
+ export declare function formatNumber(raw: string, o: ResolvedNumberInput): string;
39
+ /** The value kept on blur/Enter: "" and "-" become "", a bare dot ("0.") is zero, "-0" becomes "0", the fraction is padded to decimals. */
40
+ export declare function commitNumber(raw: string, o: ResolvedNumberInput): string;
41
+ /** How many digits, "." and "-" sit before the caret. */
42
+ export declare function significantCount(text: string, caret: number): number;
43
+ /** The caret position right after that many digits, "." and "-". */
44
+ export declare function caretForCount(display: string, count: number): number;
45
+ /** Where the caret sits after an edit that turned `before` into `after`, from the text alone: right after the changed part.
46
+ * Platforms that report the selection separately from the text (React Native) can send the two in either order. */
47
+ export declare function caretAfterEdit(before: string, after: string): number;
48
+ /** Backspace right after a comma deletes the digit before it, Delete right before one deletes the digit after it. Returns the text without commas and the caret in it; null when the browser's default is right. */
49
+ export declare function deleteAcrossSeparator(display: string, start: number, end: number, key: "Backspace" | "Delete"): {
50
+ text: string;
51
+ caret: number;
52
+ } | null;
53
+ export declare function rangeIssue(raw: string, o: ResolvedNumberInput): "min" | "max" | null;
54
+ /** "100% 이하로 입력해 주세요": the limit is formatted like the value, with the suffix attached without a space. */
55
+ export declare function rangeMessage(kind: "min" | "max", o: ResolvedNumberInput, scope?: KjunMessageScope): string;
56
+ /** "1억 2,003만 5,000 원" for an integer part of 10,000 or more; empty for percent and for languages other than Korean. */
57
+ export declare function readingAid(raw: string, o: ResolvedNumberInput, scope?: KjunMessageScope): string;
58
+ /** Keyboard for a number field. A negative value needs a minus key, which the numeric pads lack (iOS shows none at all). */
59
+ export declare function numberKeyboard(o: Pick<ResolvedNumberInput, "allowNegative" | "decimals">): {
60
+ inputMode: "numeric" | "decimal" | "text";
61
+ ios: string;
62
+ android: string;
63
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tabular figures give a leading + or - a whole figure's width (Inter's tnum does), so the sign floats apart
3
+ * from the digits ("- 1.25%"). The sign is split off and drawn with proportional figures, tight to the number,
4
+ * while the digits keep their tabular widths. The text itself is unchanged.
5
+ */
6
+ export declare function splitNumberSign(value: unknown): [
7
+ sign: string,
8
+ rest: string
9
+ ] | null;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tabular figures give a leading + or - a whole figure's width (Inter's tnum does), so the sign floats apart
3
+ * from the digits ("- 1.25%"). The sign is split off and drawn with proportional figures, tight to the number,
4
+ * while the digits keep their tabular widths. The text itself is unchanged.
5
+ */
6
+ export declare function splitNumberSign(value: unknown): [
7
+ sign: string,
8
+ rest: string
9
+ ] | null;
@@ -10,7 +10,23 @@ export declare function optionSelected(value: OptionValue | OptionValue[] | null
10
10
  export declare function nextOptionValue(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string, multiple: boolean): OptionValue | OptionValue[];
11
11
  /** 0 label starts with the query, 1 label contains it, 2 a searchKeys field contains it, -1 no match; an empty query matches as 0. */
12
12
  export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]): 0 | 1 | 2 | -1;
13
- export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, }: {
13
+ /** A group is an option object whose `options` field holds its options; its label is read with labelKey. */
14
+ export declare const isOptionGroup: (option: SelectOption) => option is {
15
+ options: SelectOption[];
16
+ [key: string]: unknown;
17
+ };
18
+ export type SelectMultipleDisplay = "count" | "labels";
19
+ export interface SelectItem<T> {
20
+ option: T;
21
+ key: string;
22
+ }
23
+ /** Consecutive visible options that share a group; `label` is undefined for options outside any group. */
24
+ export interface SelectSection<T> {
25
+ key: string;
26
+ label?: string;
27
+ items: SelectItem<T>[];
28
+ }
29
+ export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, multipleDisplay, }: {
14
30
  options: T[];
15
31
  value: OptionValue | OptionValue[] | null;
16
32
  labelKey: string;
@@ -24,17 +40,21 @@ export declare function selectOptions<T extends SelectOption>({ options, value,
24
40
  searchKeys?: readonly string[];
25
41
  /** Trigger label for several selected options; platforms pass KjunProvider's messages.selectedCount. */
26
42
  selectedCount?: (count: number) => string;
43
+ /** "labels" names every selected option in the trigger instead of counting them. */
44
+ multipleDisplay?: SelectMultipleDisplay;
27
45
  }): {
28
46
  selected: (option: T) => boolean;
29
47
  matching: {
30
48
  option: T;
49
+ group: number;
31
50
  key: string;
32
51
  }[];
33
- visible: {
34
- option: T;
35
- key: string;
36
- }[];
52
+ visible: SelectItem<T>[];
53
+ sections: SelectSection<T>[];
54
+ grouped: boolean;
37
55
  selectedOption: T | undefined;
38
56
  label: string;
57
+ labels: string[];
58
+ hasValue: boolean;
39
59
  nextValue: (option: T) => OptionValue | OptionValue[];
40
60
  };
@@ -10,7 +10,23 @@ export declare function optionSelected(value: OptionValue | OptionValue[] | null
10
10
  export declare function nextOptionValue(value: OptionValue | OptionValue[] | null, option: SelectOption, key: string, multiple: boolean): OptionValue | OptionValue[];
11
11
  /** 0 label starts with the query, 1 label contains it, 2 a searchKeys field contains it, -1 no match; an empty query matches as 0. */
12
12
  export declare function optionMatchRank(option: SelectOption, query: string, labelKey: string, searchKeys?: readonly string[]): 0 | 1 | 2 | -1;
13
- export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, }: {
13
+ /** A group is an option object whose `options` field holds its options; its label is read with labelKey. */
14
+ export declare const isOptionGroup: (option: SelectOption) => option is {
15
+ options: SelectOption[];
16
+ [key: string]: unknown;
17
+ };
18
+ export type SelectMultipleDisplay = "count" | "labels";
19
+ export interface SelectItem<T> {
20
+ option: T;
21
+ key: string;
22
+ }
23
+ /** Consecutive visible options that share a group; `label` is undefined for options outside any group. */
24
+ export interface SelectSection<T> {
25
+ key: string;
26
+ label?: string;
27
+ items: SelectItem<T>[];
28
+ }
29
+ export declare function selectOptions<T extends SelectOption>({ options, value, labelKey, valueKey, query, pageSize, limit, loading, multiple, filterFn, searchKeys, selectedCount, multipleDisplay, }: {
14
30
  options: T[];
15
31
  value: OptionValue | OptionValue[] | null;
16
32
  labelKey: string;
@@ -24,17 +40,21 @@ export declare function selectOptions<T extends SelectOption>({ options, value,
24
40
  searchKeys?: readonly string[];
25
41
  /** Trigger label for several selected options; platforms pass KjunProvider's messages.selectedCount. */
26
42
  selectedCount?: (count: number) => string;
43
+ /** "labels" names every selected option in the trigger instead of counting them. */
44
+ multipleDisplay?: SelectMultipleDisplay;
27
45
  }): {
28
46
  selected: (option: T) => boolean;
29
47
  matching: {
30
48
  option: T;
49
+ group: number;
31
50
  key: string;
32
51
  }[];
33
- visible: {
34
- option: T;
35
- key: string;
36
- }[];
52
+ visible: SelectItem<T>[];
53
+ sections: SelectSection<T>[];
54
+ grouped: boolean;
37
55
  selectedOption: T | undefined;
38
56
  label: string;
57
+ labels: string[];
58
+ hasValue: boolean;
39
59
  nextValue: (option: T) => OptionValue | OptionValue[];
40
60
  };
@@ -0,0 +1,12 @@
1
+ export type PaginationItem = number | "start-ellipsis" | "end-ellipsis";
2
+ /**
3
+ * The first and last page, the current page with siblingCount pages each side, and an ellipsis for each gap.
4
+ * Once the pages outnumber the slots the list keeps one length on every page, so the arrows never move, and a gap
5
+ * of one page shows that page instead of an ellipsis (no "1 … 3").
6
+ */
7
+ export declare function paginationItems(current: number, total: number, siblingCount?: number): PaginationItem[];
8
+ /** The first and last row on the page, for the "81 - 100 / 195" line. */
9
+ export declare function pageRows(current: number, pageSize: number, totalRows: number): {
10
+ from: number;
11
+ to: number;
12
+ };
@@ -0,0 +1,12 @@
1
+ export type PaginationItem = number | "start-ellipsis" | "end-ellipsis";
2
+ /**
3
+ * The first and last page, the current page with siblingCount pages each side, and an ellipsis for each gap.
4
+ * Once the pages outnumber the slots the list keeps one length on every page, so the arrows never move, and a gap
5
+ * of one page shows that page instead of an ellipsis (no "1 … 3").
6
+ */
7
+ export declare function paginationItems(current: number, total: number, siblingCount?: number): PaginationItem[];
8
+ /** The first and last row on the page, for the "81 - 100 / 195" line. */
9
+ export declare function pageRows(current: number, pageSize: number, totalRows: number): {
10
+ from: number;
11
+ to: number;
12
+ };
@@ -0,0 +1,3 @@
1
+ /** Marks a Popover body with where it can still scroll: `data-scrolled` once it has left the top
2
+ * (the fixed header then draws a divider) and `data-more` while content remains below (the body fades out). */
3
+ export declare function trackPopoverScroll(body: HTMLElement): () => void;
@@ -0,0 +1,3 @@
1
+ /** Marks a Popover body with where it can still scroll: `data-scrolled` once it has left the top
2
+ * (the fixed header then draws a divider) and `data-more` while content remains below (the body fades out). */
3
+ export declare function trackPopoverScroll(body: HTMLElement): () => void;
@@ -0,0 +1,13 @@
1
+ /** Hold-to-repeat for step buttons (QuantityStepper ±). A press still steps once through the button's click; holding it past
2
+ * `delay` steps again every `interval` until release, and the click that ends a repeating hold is then swallowed so the
3
+ * value does not move one extra step. `step` returns false when it can go no further, which ends the repeat. */
4
+ export interface PressRepeat {
5
+ /** Pointer or touch went down on the button. With a window, release anywhere (a disabled button gets no pointerup) ends it. */
6
+ start(view?: Window): void;
7
+ stop(): void;
8
+ /** Pointer or touch came up: ends the hold; the repeated mark lasts only for the click that follows in the same input event. */
9
+ release(): void;
10
+ /** Called from the click: true when this click ends a hold that already repeated, so it must not step again. */
11
+ takeRepeated(): boolean;
12
+ }
13
+ export declare function createPressRepeat(step: () => boolean, delay: number, interval: number): PressRepeat;
@@ -0,0 +1,13 @@
1
+ /** Hold-to-repeat for step buttons (QuantityStepper ±). A press still steps once through the button's click; holding it past
2
+ * `delay` steps again every `interval` until release, and the click that ends a repeating hold is then swallowed so the
3
+ * value does not move one extra step. `step` returns false when it can go no further, which ends the repeat. */
4
+ export interface PressRepeat {
5
+ /** Pointer or touch went down on the button. With a window, release anywhere (a disabled button gets no pointerup) ends it. */
6
+ start(view?: Window): void;
7
+ stop(): void;
8
+ /** Pointer or touch came up: ends the hold; the repeated mark lasts only for the click that follows in the same input event. */
9
+ release(): void;
10
+ /** Called from the click: true when this click ends a hold that already repeated, so it must not step again. */
11
+ takeRepeated(): boolean;
12
+ }
13
+ export declare function createPressRepeat(step: () => boolean, delay: number, interval: number): PressRepeat;
@@ -14,3 +14,8 @@ export declare function progressCircle(size: ProgressCircleSize, percentage: num
14
14
  * missing data (never 0%). An omitted value keeps the 0 default before it reaches here.
15
15
  */
16
16
  export declare function progressState(value: number | null, max: number, indeterminate: boolean): "indeterminate" | "missing" | "determinate";
17
+ /**
18
+ * Whole percent for a known value, clamped to 0–100. Unfinished work never rounds up to 100:
19
+ * 99.6% reads 99%, so "100%" always means done.
20
+ */
21
+ export declare function progressPercent(value: number, max: number): number;
@@ -14,3 +14,8 @@ export declare function progressCircle(size: ProgressCircleSize, percentage: num
14
14
  * missing data (never 0%). An omitted value keeps the 0 default before it reaches here.
15
15
  */
16
16
  export declare function progressState(value: number | null, max: number, indeterminate: boolean): "indeterminate" | "missing" | "determinate";
17
+ /**
18
+ * Whole percent for a known value, clamped to 0–100. Unfinished work never rounds up to 100:
19
+ * 99.6% reads 99%, so "100%" always means done.
20
+ */
21
+ export declare function progressPercent(value: number, max: number): number;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Where a reference marker stands on a bar (such as "today" on a budget), as a percent of the rail.
3
+ * `marker` is on the value's own scale, 0 to `max`; null means there is nothing to draw.
4
+ */
5
+ export declare function progressMarker(marker: number | null | undefined, max: number): number | null;
6
+ /** How far the marker's left edge moves back from its percent, so that at 0 and at max the line stays whole inside the rail. */
7
+ export declare const progressMarkerInset: (percent: number) => number;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Where a reference marker stands on a bar (such as "today" on a budget), as a percent of the rail.
3
+ * `marker` is on the value's own scale, 0 to `max`; null means there is nothing to draw.
4
+ */
5
+ export declare function progressMarker(marker: number | null | undefined, max: number): number | null;
6
+ /** How far the marker's left edge moves back from its percent, so that at 0 and at max the line stays whole inside the rail. */
7
+ export declare const progressMarkerInset: (percent: number) => number;
@@ -0,0 +1,2 @@
1
+ /** Wires the keyboard to a `role="radiogroup"` element; returns the cleanup. */
2
+ export declare function bindRadioKeyboard(group: HTMLElement): () => void;
@@ -0,0 +1,2 @@
1
+ /** Wires the keyboard to a `role="radiogroup"` element; returns the cleanup. */
2
+ export declare function bindRadioKeyboard(group: HTMLElement): () => void;
@@ -0,0 +1,62 @@
1
+ import { type ReorderKey, type ReorderMove } from "./reorder.cjs";
2
+ export interface ReorderHost {
3
+ order: () => readonly ReorderKey[] | undefined;
4
+ disabled: () => boolean;
5
+ /** The section's list element. */
6
+ list: () => HTMLElement | null;
7
+ /** Selects the movable rows' control groups inside list(); a list section's own rows by default. */
8
+ controls?: string;
9
+ /** Selects the root that owns a control group: one whose nearest such root is not list() belongs to a nested table or list. */
10
+ owner?: string;
11
+ text: () => {
12
+ moved: (name: string, position: number, total: number) => string;
13
+ grabbed: (name: string) => string;
14
+ dropped: (name: string, position: number, total: number) => string;
15
+ cancelled: (name: string) => string;
16
+ };
17
+ /** Sets the live region's text. */
18
+ say: (text: string) => void;
19
+ /** The row whose handle holds it (keyboard grab or pointer drag), or null. */
20
+ grabbed: (value: ReorderKey | null) => void;
21
+ /** Asks the app for this order. */
22
+ change: (order: ReorderKey[]) => void;
23
+ /** A finished move: one button press, or a whole grab or drag from where it started to where it ended. */
24
+ moved: (move: ReorderMove) => void;
25
+ }
26
+ interface KeyEvent {
27
+ key: string;
28
+ repeat?: boolean;
29
+ preventDefault: () => void;
30
+ }
31
+ interface PressEvent {
32
+ pointerId: number;
33
+ button: number;
34
+ clientY: number;
35
+ preventDefault: () => void;
36
+ }
37
+ export declare function createReorderSession(host: ReorderHost): {
38
+ /** An up or down button: one step, one finished move. */
39
+ press(value: ReorderKey, direction: -1 | 1, name: string): void;
40
+ /** A key on a row's handle. */
41
+ key(event: KeyEvent, value: ReorderKey, name: string, target?: Element | null): void;
42
+ /** The key press that grabbed or dropped is over; the click a browser may still send for it is ignored. */
43
+ keyUp(): void;
44
+ /** A click without a pointer (a screen reader's press): grabs the row, or drops it when it is held. */
45
+ click(event: {
46
+ detail: number;
47
+ }, value: ReorderKey, name: string, target?: Element | null): void;
48
+ /** A pointer pressing a row's handle starts a drag; the row steps as the pointer passes its neighbours. */
49
+ pointerDown(event: PressEvent, value: ReorderKey, name: string): void;
50
+ /** Called once the DOM shows an order: confirms the pending step, if this order is it. */
51
+ confirm(order: readonly ReorderKey[] | undefined): void;
52
+ /**
53
+ * Moving was turned off. A held row is let go where it is: the app that turned moving off (often to save a step)
54
+ * is not asked for another order. Nothing stays pending.
55
+ */
56
+ reset(): void;
57
+ /** Moving is on again and its controls are drawn: focus goes to the moved row's control if it could not before. */
58
+ resume(): void;
59
+ dispose(): void;
60
+ };
61
+ export type ReorderSession = ReturnType<typeof createReorderSession>;
62
+ export {};
@@ -0,0 +1,62 @@
1
+ import { type ReorderKey, type ReorderMove } from "./reorder.js";
2
+ export interface ReorderHost {
3
+ order: () => readonly ReorderKey[] | undefined;
4
+ disabled: () => boolean;
5
+ /** The section's list element. */
6
+ list: () => HTMLElement | null;
7
+ /** Selects the movable rows' control groups inside list(); a list section's own rows by default. */
8
+ controls?: string;
9
+ /** Selects the root that owns a control group: one whose nearest such root is not list() belongs to a nested table or list. */
10
+ owner?: string;
11
+ text: () => {
12
+ moved: (name: string, position: number, total: number) => string;
13
+ grabbed: (name: string) => string;
14
+ dropped: (name: string, position: number, total: number) => string;
15
+ cancelled: (name: string) => string;
16
+ };
17
+ /** Sets the live region's text. */
18
+ say: (text: string) => void;
19
+ /** The row whose handle holds it (keyboard grab or pointer drag), or null. */
20
+ grabbed: (value: ReorderKey | null) => void;
21
+ /** Asks the app for this order. */
22
+ change: (order: ReorderKey[]) => void;
23
+ /** A finished move: one button press, or a whole grab or drag from where it started to where it ended. */
24
+ moved: (move: ReorderMove) => void;
25
+ }
26
+ interface KeyEvent {
27
+ key: string;
28
+ repeat?: boolean;
29
+ preventDefault: () => void;
30
+ }
31
+ interface PressEvent {
32
+ pointerId: number;
33
+ button: number;
34
+ clientY: number;
35
+ preventDefault: () => void;
36
+ }
37
+ export declare function createReorderSession(host: ReorderHost): {
38
+ /** An up or down button: one step, one finished move. */
39
+ press(value: ReorderKey, direction: -1 | 1, name: string): void;
40
+ /** A key on a row's handle. */
41
+ key(event: KeyEvent, value: ReorderKey, name: string, target?: Element | null): void;
42
+ /** The key press that grabbed or dropped is over; the click a browser may still send for it is ignored. */
43
+ keyUp(): void;
44
+ /** A click without a pointer (a screen reader's press): grabs the row, or drops it when it is held. */
45
+ click(event: {
46
+ detail: number;
47
+ }, value: ReorderKey, name: string, target?: Element | null): void;
48
+ /** A pointer pressing a row's handle starts a drag; the row steps as the pointer passes its neighbours. */
49
+ pointerDown(event: PressEvent, value: ReorderKey, name: string): void;
50
+ /** Called once the DOM shows an order: confirms the pending step, if this order is it. */
51
+ confirm(order: readonly ReorderKey[] | undefined): void;
52
+ /**
53
+ * Moving was turned off. A held row is let go where it is: the app that turned moving off (often to save a step)
54
+ * is not asked for another order. Nothing stays pending.
55
+ */
56
+ reset(): void;
57
+ /** Moving is on again and its controls are drawn: focus goes to the moved row's control if it could not before. */
58
+ resume(): void;
59
+ dispose(): void;
60
+ };
61
+ export type ReorderSession = ReturnType<typeof createReorderSession>;
62
+ export {};
@@ -0,0 +1,81 @@
1
+ export type ReorderKey = string | number;
2
+ export interface ReorderPlace {
3
+ index: number;
4
+ total: number;
5
+ up: boolean;
6
+ down: boolean;
7
+ }
8
+ export interface ReorderMove<T extends ReorderKey = ReorderKey> {
9
+ value: T;
10
+ from: number;
11
+ to: number;
12
+ order: T[];
13
+ }
14
+ /** A copy with the item at `from` moved to `to`; the same array when nothing moves. */
15
+ export declare function reorderMove<T>(order: readonly T[], from: number, to: number): T[];
16
+ /** Where a row sits and which way it can go; null for a row the order does not list. */
17
+ export declare function reorderPlace(order: readonly ReorderKey[] | undefined, value: ReorderKey | undefined): ReorderPlace | null;
18
+ /** One step up (-1) or down (1); null at an end or for an unknown row. */
19
+ export declare function reorderStep<T extends ReorderKey>(order: readonly T[] | undefined, value: T, step: -1 | 1): ReorderMove<T> | null;
20
+ /** The button to focus after a move: the one pressed while it is still usable, else the other; null when neither is. */
21
+ export declare function reorderFocus(order: readonly ReorderKey[] | undefined, value: ReorderKey, step: -1 | 1): "up" | "down" | null;
22
+ /** A move waiting for the app to apply it: the row, where it should land and when it was pressed (ms). */
23
+ export interface ReorderPending {
24
+ value: ReorderKey;
25
+ to: number;
26
+ at: number;
27
+ }
28
+ /** How long a pressed move may wait for its order; after that an order change is someone else's. */
29
+ export declare const REORDER_CONFIRM_MS = 10000;
30
+ /**
31
+ * Whether an order is the pressed move, applied: it shows the row at the place it was sent to, soon enough after the
32
+ * press. An order the app drew again unchanged, or changed for another reason, confirms nothing.
33
+ */
34
+ export declare function reorderConfirmed(order: readonly ReorderKey[] | undefined, pending: ReorderPending | null, now: number): boolean;
35
+ /** True when a value appears twice: such rows would share one place. */
36
+ export declare function reorderDuplicates(order: readonly ReorderKey[] | undefined): boolean;
37
+ /**
38
+ * Which way a dragged row steps for a pointer position: up once the pointer is above the middle of the row before
39
+ * it, down once it is below the middle of the row after it. `rows` are the movable rows' boxes in their current order.
40
+ */
41
+ export declare function reorderDragStep(pointer: number, rows: readonly {
42
+ top: number;
43
+ height: number;
44
+ }[], index: number): -1 | 0 | 1;
45
+ export type ReorderKeyAction = "grab" | "drop" | "cancel" | "up" | "down" | "leave";
46
+ /** Keys on a row's handle. "leave" (Tab) drops the row and must not be prevented. */
47
+ export declare function reorderKeyAction(key: string, grabbed: boolean): ReorderKeyAction | null;
48
+ /**
49
+ * A row's place for its buttons when only some of the order is on screen (a table page, a filtered list): a step
50
+ * that would pass a row that is not shown is off, so a move never takes the row out of sight.
51
+ */
52
+ export declare function reorderPlaceAmong(order: readonly ReorderKey[] | undefined, value: ReorderKey | undefined, shown?: ReadonlySet<ReorderKey> | null): ReorderPlace | null;
53
+ /** What is wrong with a reorderable section's `order`, for the console; `model` names the platform's way to receive it. */
54
+ export declare function reorderWarning(order: readonly ReorderKey[] | undefined, model: string): string | null;
55
+ /** A requested step: `focus` is where focus goes once it is applied, and `quiet` skips the sentence. */
56
+ export interface ReorderRequest extends ReorderPending {
57
+ name: string;
58
+ focus: -1 | 1 | "handle";
59
+ quiet: boolean;
60
+ }
61
+ export interface ReorderMovesHost {
62
+ order: () => readonly ReorderKey[] | undefined;
63
+ disabled: () => boolean;
64
+ /** Says a sentence to screen readers; an empty one clears the last. */
65
+ say: (text: string) => void;
66
+ moved: (name: string, position: number, total: number) => string;
67
+ /** Asks the app for this order. */
68
+ change: (order: ReorderKey[]) => void;
69
+ }
70
+ /**
71
+ * The part of reordering every platform shares. The app owns the order, so a step is a request: it waits until an
72
+ * order shows the row at its new place, and only then is it announced. A request the app never applies stops waiting.
73
+ */
74
+ export declare function createReorderMoves(host: ReorderMovesHost): {
75
+ waiting: () => ReorderRequest | null;
76
+ /** Waits for this request (an order the caller asked for itself), or for nothing. */
77
+ expect(request: ReorderRequest | null): void;
78
+ step(value: ReorderKey, direction: -1 | 1, name: string, focus?: -1 | 1 | "handle", quiet?: boolean): ReorderMove<ReorderKey> | null;
79
+ /** The request this order confirms, announced unless it is quiet or `announce` is off; null when it confirms none. */
80
+ confirm(order: readonly ReorderKey[] | undefined, announce?: boolean): ReorderRequest | null;
81
+ };
@@ -0,0 +1,81 @@
1
+ export type ReorderKey = string | number;
2
+ export interface ReorderPlace {
3
+ index: number;
4
+ total: number;
5
+ up: boolean;
6
+ down: boolean;
7
+ }
8
+ export interface ReorderMove<T extends ReorderKey = ReorderKey> {
9
+ value: T;
10
+ from: number;
11
+ to: number;
12
+ order: T[];
13
+ }
14
+ /** A copy with the item at `from` moved to `to`; the same array when nothing moves. */
15
+ export declare function reorderMove<T>(order: readonly T[], from: number, to: number): T[];
16
+ /** Where a row sits and which way it can go; null for a row the order does not list. */
17
+ export declare function reorderPlace(order: readonly ReorderKey[] | undefined, value: ReorderKey | undefined): ReorderPlace | null;
18
+ /** One step up (-1) or down (1); null at an end or for an unknown row. */
19
+ export declare function reorderStep<T extends ReorderKey>(order: readonly T[] | undefined, value: T, step: -1 | 1): ReorderMove<T> | null;
20
+ /** The button to focus after a move: the one pressed while it is still usable, else the other; null when neither is. */
21
+ export declare function reorderFocus(order: readonly ReorderKey[] | undefined, value: ReorderKey, step: -1 | 1): "up" | "down" | null;
22
+ /** A move waiting for the app to apply it: the row, where it should land and when it was pressed (ms). */
23
+ export interface ReorderPending {
24
+ value: ReorderKey;
25
+ to: number;
26
+ at: number;
27
+ }
28
+ /** How long a pressed move may wait for its order; after that an order change is someone else's. */
29
+ export declare const REORDER_CONFIRM_MS = 10000;
30
+ /**
31
+ * Whether an order is the pressed move, applied: it shows the row at the place it was sent to, soon enough after the
32
+ * press. An order the app drew again unchanged, or changed for another reason, confirms nothing.
33
+ */
34
+ export declare function reorderConfirmed(order: readonly ReorderKey[] | undefined, pending: ReorderPending | null, now: number): boolean;
35
+ /** True when a value appears twice: such rows would share one place. */
36
+ export declare function reorderDuplicates(order: readonly ReorderKey[] | undefined): boolean;
37
+ /**
38
+ * Which way a dragged row steps for a pointer position: up once the pointer is above the middle of the row before
39
+ * it, down once it is below the middle of the row after it. `rows` are the movable rows' boxes in their current order.
40
+ */
41
+ export declare function reorderDragStep(pointer: number, rows: readonly {
42
+ top: number;
43
+ height: number;
44
+ }[], index: number): -1 | 0 | 1;
45
+ export type ReorderKeyAction = "grab" | "drop" | "cancel" | "up" | "down" | "leave";
46
+ /** Keys on a row's handle. "leave" (Tab) drops the row and must not be prevented. */
47
+ export declare function reorderKeyAction(key: string, grabbed: boolean): ReorderKeyAction | null;
48
+ /**
49
+ * A row's place for its buttons when only some of the order is on screen (a table page, a filtered list): a step
50
+ * that would pass a row that is not shown is off, so a move never takes the row out of sight.
51
+ */
52
+ export declare function reorderPlaceAmong(order: readonly ReorderKey[] | undefined, value: ReorderKey | undefined, shown?: ReadonlySet<ReorderKey> | null): ReorderPlace | null;
53
+ /** What is wrong with a reorderable section's `order`, for the console; `model` names the platform's way to receive it. */
54
+ export declare function reorderWarning(order: readonly ReorderKey[] | undefined, model: string): string | null;
55
+ /** A requested step: `focus` is where focus goes once it is applied, and `quiet` skips the sentence. */
56
+ export interface ReorderRequest extends ReorderPending {
57
+ name: string;
58
+ focus: -1 | 1 | "handle";
59
+ quiet: boolean;
60
+ }
61
+ export interface ReorderMovesHost {
62
+ order: () => readonly ReorderKey[] | undefined;
63
+ disabled: () => boolean;
64
+ /** Says a sentence to screen readers; an empty one clears the last. */
65
+ say: (text: string) => void;
66
+ moved: (name: string, position: number, total: number) => string;
67
+ /** Asks the app for this order. */
68
+ change: (order: ReorderKey[]) => void;
69
+ }
70
+ /**
71
+ * The part of reordering every platform shares. The app owns the order, so a step is a request: it waits until an
72
+ * order shows the row at its new place, and only then is it announced. A request the app never applies stops waiting.
73
+ */
74
+ export declare function createReorderMoves(host: ReorderMovesHost): {
75
+ waiting: () => ReorderRequest | null;
76
+ /** Waits for this request (an order the caller asked for itself), or for nothing. */
77
+ expect(request: ReorderRequest | null): void;
78
+ step(value: ReorderKey, direction: -1 | 1, name: string, focus?: -1 | 1 | "handle", quiet?: boolean): ReorderMove<ReorderKey> | null;
79
+ /** The request this order confirms, announced unless it is quiet or `announce` is off; null when it confirms none. */
80
+ confirm(order: readonly ReorderKey[] | undefined, announce?: boolean): ReorderRequest | null;
81
+ };
@@ -0,0 +1,23 @@
1
+ /** How many labels end past the room left for them, given each label's right edge. */
2
+ export declare function hiddenLabelCount(rights: readonly number[], available: number): number;
3
+ /** Size and place of the clear button that sits over a select-like trigger, before its indicator. */
4
+ export declare function selectClearStyle(spec: {
5
+ padding: number;
6
+ iconSize: number;
7
+ affixGap: number;
8
+ clearSize: number;
9
+ }): {
10
+ right: number;
11
+ width: number;
12
+ height: number;
13
+ minHeight: number;
14
+ };
15
+ /** The filled circle drawn inside the clear button; the button keeps the larger target. */
16
+ export declare function selectClearMarkStyle(spec: {
17
+ clearMarkSize: number;
18
+ }): {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ /** Web: how many of the label spans inside `text` end past its visible width. */
23
+ export declare function measureHiddenLabels(text: HTMLElement | null | undefined): number;
@@ -0,0 +1,23 @@
1
+ /** How many labels end past the room left for them, given each label's right edge. */
2
+ export declare function hiddenLabelCount(rights: readonly number[], available: number): number;
3
+ /** Size and place of the clear button that sits over a select-like trigger, before its indicator. */
4
+ export declare function selectClearStyle(spec: {
5
+ padding: number;
6
+ iconSize: number;
7
+ affixGap: number;
8
+ clearSize: number;
9
+ }): {
10
+ right: number;
11
+ width: number;
12
+ height: number;
13
+ minHeight: number;
14
+ };
15
+ /** The filled circle drawn inside the clear button; the button keeps the larger target. */
16
+ export declare function selectClearMarkStyle(spec: {
17
+ clearMarkSize: number;
18
+ }): {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ /** Web: how many of the label spans inside `text` end past its visible width. */
23
+ export declare function measureHiddenLabels(text: HTMLElement | null | undefined): number;