@qualcomm-ui/core 1.0.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 (582) hide show
  1. package/LICENSE.txt +31 -0
  2. package/dist/accordion/accordion.api.d.ts +4 -0
  3. package/dist/accordion/accordion.api.d.ts.map +1 -0
  4. package/dist/accordion/accordion.machine.d.ts +4 -0
  5. package/dist/accordion/accordion.machine.d.ts.map +1 -0
  6. package/dist/accordion/accordion.props.d.ts +3 -0
  7. package/dist/accordion/accordion.props.d.ts.map +1 -0
  8. package/dist/accordion/accordion.types.d.ts +155 -0
  9. package/dist/accordion/accordion.types.d.ts.map +1 -0
  10. package/dist/accordion/index.cjs +2 -0
  11. package/dist/accordion/index.cjs.map +7 -0
  12. package/dist/accordion/index.d.ts +5 -0
  13. package/dist/accordion/index.d.ts.map +1 -0
  14. package/dist/accordion/index.js +2 -0
  15. package/dist/accordion/index.js.map +7 -0
  16. package/dist/accordion/internal/accordion.dom.d.ts +10 -0
  17. package/dist/accordion/internal/accordion.dom.d.ts.map +1 -0
  18. package/dist/accordion/internal/index.d.ts +2 -0
  19. package/dist/accordion/internal/index.d.ts.map +1 -0
  20. package/dist/action-group/action-group.d.ts +6 -0
  21. package/dist/action-group/action-group.d.ts.map +1 -0
  22. package/dist/action-group/index.cjs +2 -0
  23. package/dist/action-group/index.cjs.map +7 -0
  24. package/dist/action-group/index.d.ts +2 -0
  25. package/dist/action-group/index.d.ts.map +1 -0
  26. package/dist/action-group/index.js +2 -0
  27. package/dist/action-group/index.js.map +7 -0
  28. package/dist/avatar/avatar.api.d.ts +4 -0
  29. package/dist/avatar/avatar.api.d.ts.map +1 -0
  30. package/dist/avatar/avatar.machine.d.ts +4 -0
  31. package/dist/avatar/avatar.machine.d.ts.map +1 -0
  32. package/dist/avatar/avatar.props.d.ts +3 -0
  33. package/dist/avatar/avatar.props.d.ts.map +1 -0
  34. package/dist/avatar/avatar.types.d.ts +55 -0
  35. package/dist/avatar/avatar.types.d.ts.map +1 -0
  36. package/dist/avatar/index.cjs +2 -0
  37. package/dist/avatar/index.cjs.map +7 -0
  38. package/dist/avatar/index.d.ts +5 -0
  39. package/dist/avatar/index.d.ts.map +1 -0
  40. package/dist/avatar/index.js +2 -0
  41. package/dist/avatar/index.js.map +7 -0
  42. package/dist/avatar/internal/avatar.dom.d.ts +12 -0
  43. package/dist/avatar/internal/avatar.dom.d.ts.map +1 -0
  44. package/dist/avatar/internal/index.d.ts +2 -0
  45. package/dist/avatar/internal/index.d.ts.map +1 -0
  46. package/dist/checkbox/checkbox.api.d.ts +4 -0
  47. package/dist/checkbox/checkbox.api.d.ts.map +1 -0
  48. package/dist/checkbox/checkbox.machine.d.ts +4 -0
  49. package/dist/checkbox/checkbox.machine.d.ts.map +1 -0
  50. package/dist/checkbox/checkbox.props.d.ts +3 -0
  51. package/dist/checkbox/checkbox.props.d.ts.map +1 -0
  52. package/dist/checkbox/checkbox.types.d.ts +165 -0
  53. package/dist/checkbox/checkbox.types.d.ts.map +1 -0
  54. package/dist/checkbox/index.cjs +2 -0
  55. package/dist/checkbox/index.cjs.map +7 -0
  56. package/dist/checkbox/index.d.ts +5 -0
  57. package/dist/checkbox/index.d.ts.map +1 -0
  58. package/dist/checkbox/index.js +2 -0
  59. package/dist/checkbox/index.js.map +7 -0
  60. package/dist/checkbox/internal/checkbox.dom.d.ts +7 -0
  61. package/dist/checkbox/internal/checkbox.dom.d.ts.map +1 -0
  62. package/dist/checkbox/internal/index.d.ts +2 -0
  63. package/dist/checkbox/internal/index.d.ts.map +1 -0
  64. package/dist/collapsible/collapsible.api.d.ts +4 -0
  65. package/dist/collapsible/collapsible.api.d.ts.map +1 -0
  66. package/dist/collapsible/collapsible.machine.d.ts +4 -0
  67. package/dist/collapsible/collapsible.machine.d.ts.map +1 -0
  68. package/dist/collapsible/collapsible.props.d.ts +4 -0
  69. package/dist/collapsible/collapsible.props.d.ts.map +1 -0
  70. package/dist/collapsible/collapsible.types.d.ts +129 -0
  71. package/dist/collapsible/collapsible.types.d.ts.map +1 -0
  72. package/dist/collapsible/index.cjs +2 -0
  73. package/dist/collapsible/index.cjs.map +7 -0
  74. package/dist/collapsible/index.d.ts +5 -0
  75. package/dist/collapsible/index.d.ts.map +1 -0
  76. package/dist/collapsible/index.js +2 -0
  77. package/dist/collapsible/index.js.map +7 -0
  78. package/dist/collapsible/internal/collapsible.dom.d.ts +5 -0
  79. package/dist/collapsible/internal/collapsible.dom.d.ts.map +1 -0
  80. package/dist/collapsible/internal/index.d.ts +2 -0
  81. package/dist/collapsible/internal/index.d.ts.map +1 -0
  82. package/dist/combobox/combobox.api.d.ts +4 -0
  83. package/dist/combobox/combobox.api.d.ts.map +1 -0
  84. package/dist/combobox/combobox.collection.d.ts +4 -0
  85. package/dist/combobox/combobox.collection.d.ts.map +1 -0
  86. package/dist/combobox/combobox.machine.d.ts +4 -0
  87. package/dist/combobox/combobox.machine.d.ts.map +1 -0
  88. package/dist/combobox/combobox.props.d.ts +4 -0
  89. package/dist/combobox/combobox.props.d.ts.map +1 -0
  90. package/dist/combobox/combobox.types.d.ts +631 -0
  91. package/dist/combobox/combobox.types.d.ts.map +1 -0
  92. package/dist/combobox/index.cjs +2 -0
  93. package/dist/combobox/index.cjs.map +7 -0
  94. package/dist/combobox/index.d.ts +6 -0
  95. package/dist/combobox/index.d.ts.map +1 -0
  96. package/dist/combobox/index.js +2 -0
  97. package/dist/combobox/index.js.map +7 -0
  98. package/dist/combobox/internal/combobox.dom.d.ts +13 -0
  99. package/dist/combobox/internal/combobox.dom.d.ts.map +1 -0
  100. package/dist/combobox/internal/index.d.ts +2 -0
  101. package/dist/combobox/internal/index.d.ts.map +1 -0
  102. package/dist/dialog/dialog.api.d.ts +4 -0
  103. package/dist/dialog/dialog.api.d.ts.map +1 -0
  104. package/dist/dialog/dialog.machine.d.ts +4 -0
  105. package/dist/dialog/dialog.machine.d.ts.map +1 -0
  106. package/dist/dialog/dialog.props.d.ts +4 -0
  107. package/dist/dialog/dialog.props.d.ts.map +1 -0
  108. package/dist/dialog/dialog.types.d.ts +184 -0
  109. package/dist/dialog/dialog.types.d.ts.map +1 -0
  110. package/dist/dialog/index.cjs +2 -0
  111. package/dist/dialog/index.cjs.map +7 -0
  112. package/dist/dialog/index.d.ts +5 -0
  113. package/dist/dialog/index.d.ts.map +1 -0
  114. package/dist/dialog/index.js +2 -0
  115. package/dist/dialog/index.js.map +7 -0
  116. package/dist/dialog/internal/dialog.dom.d.ts +5 -0
  117. package/dist/dialog/internal/dialog.dom.d.ts.map +1 -0
  118. package/dist/dialog/internal/index.d.ts +2 -0
  119. package/dist/dialog/internal/index.d.ts.map +1 -0
  120. package/dist/dnd/dnd.types.d.ts +13 -0
  121. package/dist/dnd/dnd.types.d.ts.map +1 -0
  122. package/dist/dnd/index.cjs +2 -0
  123. package/dist/dnd/index.cjs.map +7 -0
  124. package/dist/dnd/index.d.ts +2 -0
  125. package/dist/dnd/index.d.ts.map +1 -0
  126. package/dist/dnd/index.js +1 -0
  127. package/dist/dnd/index.js.map +7 -0
  128. package/dist/field/field.types.d.ts +87 -0
  129. package/dist/field/field.types.d.ts.map +1 -0
  130. package/dist/field/index.cjs +2 -0
  131. package/dist/field/index.cjs.map +7 -0
  132. package/dist/field/index.d.ts +2 -0
  133. package/dist/field/index.d.ts.map +1 -0
  134. package/dist/field/index.js +1 -0
  135. package/dist/field/index.js.map +7 -0
  136. package/dist/fieldset/fieldset.types.d.ts +49 -0
  137. package/dist/fieldset/fieldset.types.d.ts.map +1 -0
  138. package/dist/fieldset/index.cjs +2 -0
  139. package/dist/fieldset/index.cjs.map +7 -0
  140. package/dist/fieldset/index.d.ts +2 -0
  141. package/dist/fieldset/index.d.ts.map +1 -0
  142. package/dist/fieldset/index.js +1 -0
  143. package/dist/fieldset/index.js.map +7 -0
  144. package/dist/inline-notification/index.cjs +2 -0
  145. package/dist/inline-notification/index.cjs.map +7 -0
  146. package/dist/inline-notification/index.d.ts +5 -0
  147. package/dist/inline-notification/index.d.ts.map +1 -0
  148. package/dist/inline-notification/index.js +2 -0
  149. package/dist/inline-notification/index.js.map +7 -0
  150. package/dist/inline-notification/inline-notification.api.d.ts +4 -0
  151. package/dist/inline-notification/inline-notification.api.d.ts.map +1 -0
  152. package/dist/inline-notification/inline-notification.machine.d.ts +4 -0
  153. package/dist/inline-notification/inline-notification.machine.d.ts.map +1 -0
  154. package/dist/inline-notification/inline-notification.props.d.ts +7 -0
  155. package/dist/inline-notification/inline-notification.props.d.ts.map +1 -0
  156. package/dist/inline-notification/inline-notification.types.d.ts +76 -0
  157. package/dist/inline-notification/inline-notification.types.d.ts.map +1 -0
  158. package/dist/inline-notification/internal/index.d.ts +2 -0
  159. package/dist/inline-notification/internal/index.d.ts.map +1 -0
  160. package/dist/inline-notification/internal/inline-notification.dom.d.ts +4 -0
  161. package/dist/inline-notification/internal/inline-notification.dom.d.ts.map +1 -0
  162. package/dist/input/index.cjs +2 -0
  163. package/dist/input/index.cjs.map +7 -0
  164. package/dist/input/index.d.ts +2 -0
  165. package/dist/input/index.d.ts.map +1 -0
  166. package/dist/input/index.js +1 -0
  167. package/dist/input/index.js.map +7 -0
  168. package/dist/input/input.types.d.ts +66 -0
  169. package/dist/input/input.types.d.ts.map +1 -0
  170. package/dist/menu/index.cjs +2 -0
  171. package/dist/menu/index.cjs.map +7 -0
  172. package/dist/menu/index.d.ts +5 -0
  173. package/dist/menu/index.d.ts.map +1 -0
  174. package/dist/menu/index.js +2 -0
  175. package/dist/menu/index.js.map +7 -0
  176. package/dist/menu/internal/index.d.ts +2 -0
  177. package/dist/menu/internal/index.d.ts.map +1 -0
  178. package/dist/menu/internal/menu.dom.d.ts +33 -0
  179. package/dist/menu/internal/menu.dom.d.ts.map +1 -0
  180. package/dist/menu/menu.api.d.ts +4 -0
  181. package/dist/menu/menu.api.d.ts.map +1 -0
  182. package/dist/menu/menu.machine.d.ts +4 -0
  183. package/dist/menu/menu.machine.d.ts.map +1 -0
  184. package/dist/menu/menu.props.d.ts +8 -0
  185. package/dist/menu/menu.props.d.ts.map +1 -0
  186. package/dist/menu/menu.types.d.ts +482 -0
  187. package/dist/menu/menu.types.d.ts.map +1 -0
  188. package/dist/number-input/index.cjs +2 -0
  189. package/dist/number-input/index.cjs.map +7 -0
  190. package/dist/number-input/index.d.ts +6 -0
  191. package/dist/number-input/index.d.ts.map +1 -0
  192. package/dist/number-input/index.js +2 -0
  193. package/dist/number-input/index.js.map +7 -0
  194. package/dist/number-input/internal/index.d.ts +2 -0
  195. package/dist/number-input/internal/index.d.ts.map +1 -0
  196. package/dist/number-input/internal/number-input.dom.d.ts +10 -0
  197. package/dist/number-input/internal/number-input.dom.d.ts.map +1 -0
  198. package/dist/number-input/number-input.api.d.ts +4 -0
  199. package/dist/number-input/number-input.api.d.ts.map +1 -0
  200. package/dist/number-input/number-input.machine.d.ts +4 -0
  201. package/dist/number-input/number-input.machine.d.ts.map +1 -0
  202. package/dist/number-input/number-input.props.d.ts +4 -0
  203. package/dist/number-input/number-input.props.d.ts.map +1 -0
  204. package/dist/number-input/number-input.types.d.ts +395 -0
  205. package/dist/number-input/number-input.types.d.ts.map +1 -0
  206. package/dist/number-input/number-input.utils.d.ts +11 -0
  207. package/dist/number-input/number-input.utils.d.ts.map +1 -0
  208. package/dist/overlay-panel/index.cjs.map +7 -0
  209. package/dist/overlay-panel/index.d.ts +2 -0
  210. package/dist/overlay-panel/index.d.ts.map +1 -0
  211. package/dist/overlay-panel/overlay-panel.types.d.ts +2 -0
  212. package/dist/overlay-panel/overlay-panel.types.d.ts.map +1 -0
  213. package/dist/pagination/index.cjs +2 -0
  214. package/dist/pagination/index.cjs.map +7 -0
  215. package/dist/pagination/index.d.ts +5 -0
  216. package/dist/pagination/index.d.ts.map +1 -0
  217. package/dist/pagination/index.js +2 -0
  218. package/dist/pagination/index.js.map +7 -0
  219. package/dist/pagination/pagination.api.d.ts +4 -0
  220. package/dist/pagination/pagination.api.d.ts.map +1 -0
  221. package/dist/pagination/pagination.machine.d.ts +4 -0
  222. package/dist/pagination/pagination.machine.d.ts.map +1 -0
  223. package/dist/pagination/pagination.props.d.ts +3 -0
  224. package/dist/pagination/pagination.props.d.ts.map +1 -0
  225. package/dist/pagination/pagination.types.d.ts +214 -0
  226. package/dist/pagination/pagination.types.d.ts.map +1 -0
  227. package/dist/password-input/index.cjs +2 -0
  228. package/dist/password-input/index.cjs.map +7 -0
  229. package/dist/password-input/index.d.ts +5 -0
  230. package/dist/password-input/index.d.ts.map +1 -0
  231. package/dist/password-input/index.js +2 -0
  232. package/dist/password-input/index.js.map +7 -0
  233. package/dist/password-input/internal/index.d.ts +2 -0
  234. package/dist/password-input/internal/index.d.ts.map +1 -0
  235. package/dist/password-input/internal/password.dom.d.ts +7 -0
  236. package/dist/password-input/internal/password.dom.d.ts.map +1 -0
  237. package/dist/password-input/password-input.api.d.ts +4 -0
  238. package/dist/password-input/password-input.api.d.ts.map +1 -0
  239. package/dist/password-input/password-input.machine.d.ts +4 -0
  240. package/dist/password-input/password-input.machine.d.ts.map +1 -0
  241. package/dist/password-input/password-input.props.d.ts +3 -0
  242. package/dist/password-input/password-input.props.d.ts.map +1 -0
  243. package/dist/password-input/password-input.types.d.ts +172 -0
  244. package/dist/password-input/password-input.types.d.ts.map +1 -0
  245. package/dist/popover/index.cjs +2 -0
  246. package/dist/popover/index.cjs.map +7 -0
  247. package/dist/popover/index.d.ts +5 -0
  248. package/dist/popover/index.d.ts.map +1 -0
  249. package/dist/popover/index.js +2 -0
  250. package/dist/popover/index.js.map +7 -0
  251. package/dist/popover/internal/index.d.ts +2 -0
  252. package/dist/popover/internal/index.d.ts.map +1 -0
  253. package/dist/popover/internal/popover.dom.d.ts +8 -0
  254. package/dist/popover/internal/popover.dom.d.ts.map +1 -0
  255. package/dist/popover/popover.api.d.ts +4 -0
  256. package/dist/popover/popover.api.d.ts.map +1 -0
  257. package/dist/popover/popover.machine.d.ts +4 -0
  258. package/dist/popover/popover.machine.d.ts.map +1 -0
  259. package/dist/popover/popover.props.d.ts +3 -0
  260. package/dist/popover/popover.props.d.ts.map +1 -0
  261. package/dist/popover/popover.types.d.ts +233 -0
  262. package/dist/popover/popover.types.d.ts.map +1 -0
  263. package/dist/presence/index.cjs +2 -0
  264. package/dist/presence/index.cjs.map +7 -0
  265. package/dist/presence/index.d.ts +5 -0
  266. package/dist/presence/index.d.ts.map +1 -0
  267. package/dist/presence/index.js +2 -0
  268. package/dist/presence/index.js.map +7 -0
  269. package/dist/presence/presence.api.d.ts +4 -0
  270. package/dist/presence/presence.api.d.ts.map +1 -0
  271. package/dist/presence/presence.machine.d.ts +4 -0
  272. package/dist/presence/presence.machine.d.ts.map +1 -0
  273. package/dist/presence/presence.props.d.ts +6 -0
  274. package/dist/presence/presence.props.d.ts.map +1 -0
  275. package/dist/presence/presence.types.d.ts +94 -0
  276. package/dist/presence/presence.types.d.ts.map +1 -0
  277. package/dist/progress/index.cjs +2 -0
  278. package/dist/progress/index.cjs.map +7 -0
  279. package/dist/progress/index.d.ts +5 -0
  280. package/dist/progress/index.d.ts.map +1 -0
  281. package/dist/progress/index.js +2 -0
  282. package/dist/progress/index.js.map +7 -0
  283. package/dist/progress/internal/index.d.ts +2 -0
  284. package/dist/progress/internal/index.d.ts.map +1 -0
  285. package/dist/progress/internal/progress.dom.d.ts +4 -0
  286. package/dist/progress/internal/progress.dom.d.ts.map +1 -0
  287. package/dist/progress/progress.api.d.ts +4 -0
  288. package/dist/progress/progress.api.d.ts.map +1 -0
  289. package/dist/progress/progress.machine.d.ts +4 -0
  290. package/dist/progress/progress.machine.d.ts.map +1 -0
  291. package/dist/progress/progress.props.d.ts +4 -0
  292. package/dist/progress/progress.props.d.ts.map +1 -0
  293. package/dist/progress/progress.types.d.ts +182 -0
  294. package/dist/progress/progress.types.d.ts.map +1 -0
  295. package/dist/radio/index.cjs +2 -0
  296. package/dist/radio/index.cjs.map +7 -0
  297. package/dist/radio/index.d.ts +5 -0
  298. package/dist/radio/index.d.ts.map +1 -0
  299. package/dist/radio/index.js +2 -0
  300. package/dist/radio/index.js.map +7 -0
  301. package/dist/radio/internal/index.d.ts +2 -0
  302. package/dist/radio/internal/index.d.ts.map +1 -0
  303. package/dist/radio/internal/radio.dom.d.ts +10 -0
  304. package/dist/radio/internal/radio.dom.d.ts.map +1 -0
  305. package/dist/radio/radio.api.d.ts +4 -0
  306. package/dist/radio/radio.api.d.ts.map +1 -0
  307. package/dist/radio/radio.machine.d.ts +4 -0
  308. package/dist/radio/radio.machine.d.ts.map +1 -0
  309. package/dist/radio/radio.props.d.ts +4 -0
  310. package/dist/radio/radio.props.d.ts.map +1 -0
  311. package/dist/radio/radio.types.d.ts +233 -0
  312. package/dist/radio/radio.types.d.ts.map +1 -0
  313. package/dist/segmented-control/index.cjs +2 -0
  314. package/dist/segmented-control/index.cjs.map +7 -0
  315. package/dist/segmented-control/index.d.ts +5 -0
  316. package/dist/segmented-control/index.d.ts.map +1 -0
  317. package/dist/segmented-control/index.js +2 -0
  318. package/dist/segmented-control/index.js.map +7 -0
  319. package/dist/segmented-control/internal/index.d.ts +2 -0
  320. package/dist/segmented-control/internal/index.d.ts.map +1 -0
  321. package/dist/segmented-control/internal/segmented-control.dom.d.ts +7 -0
  322. package/dist/segmented-control/internal/segmented-control.dom.d.ts.map +1 -0
  323. package/dist/segmented-control/segmented-control.api.d.ts +4 -0
  324. package/dist/segmented-control/segmented-control.api.d.ts.map +1 -0
  325. package/dist/segmented-control/segmented-control.machine.d.ts +4 -0
  326. package/dist/segmented-control/segmented-control.machine.d.ts.map +1 -0
  327. package/dist/segmented-control/segmented-control.props.d.ts +4 -0
  328. package/dist/segmented-control/segmented-control.props.d.ts.map +1 -0
  329. package/dist/segmented-control/segmented-control.types.d.ts +103 -0
  330. package/dist/segmented-control/segmented-control.types.d.ts.map +1 -0
  331. package/dist/select/index.cjs +2 -0
  332. package/dist/select/index.cjs.map +7 -0
  333. package/dist/select/index.d.ts +6 -0
  334. package/dist/select/index.d.ts.map +1 -0
  335. package/dist/select/index.js +2 -0
  336. package/dist/select/index.js.map +7 -0
  337. package/dist/select/internal/index.d.ts +2 -0
  338. package/dist/select/internal/index.d.ts.map +1 -0
  339. package/dist/select/internal/select.dom.d.ts +9 -0
  340. package/dist/select/internal/select.dom.d.ts.map +1 -0
  341. package/dist/select/select.api.d.ts +4 -0
  342. package/dist/select/select.api.d.ts.map +1 -0
  343. package/dist/select/select.collection.d.ts +4 -0
  344. package/dist/select/select.collection.d.ts.map +1 -0
  345. package/dist/select/select.machine.d.ts +4 -0
  346. package/dist/select/select.machine.d.ts.map +1 -0
  347. package/dist/select/select.props.d.ts +3 -0
  348. package/dist/select/select.props.d.ts.map +1 -0
  349. package/dist/select/select.types.d.ts +582 -0
  350. package/dist/select/select.types.d.ts.map +1 -0
  351. package/dist/side-nav/index.cjs +2 -0
  352. package/dist/side-nav/index.cjs.map +7 -0
  353. package/dist/side-nav/index.d.ts +5 -0
  354. package/dist/side-nav/index.d.ts.map +1 -0
  355. package/dist/side-nav/index.js +2 -0
  356. package/dist/side-nav/index.js.map +7 -0
  357. package/dist/side-nav/internal/index.d.ts +2 -0
  358. package/dist/side-nav/internal/index.d.ts.map +1 -0
  359. package/dist/side-nav/internal/side-nav.dom.d.ts +5 -0
  360. package/dist/side-nav/internal/side-nav.dom.d.ts.map +1 -0
  361. package/dist/side-nav/side-nav.api.d.ts +4 -0
  362. package/dist/side-nav/side-nav.api.d.ts.map +1 -0
  363. package/dist/side-nav/side-nav.machine.d.ts +4 -0
  364. package/dist/side-nav/side-nav.machine.d.ts.map +1 -0
  365. package/dist/side-nav/side-nav.props.d.ts +4 -0
  366. package/dist/side-nav/side-nav.props.d.ts.map +1 -0
  367. package/dist/side-nav/side-nav.types.d.ts +108 -0
  368. package/dist/side-nav/side-nav.types.d.ts.map +1 -0
  369. package/dist/slider/index.cjs +2 -0
  370. package/dist/slider/index.cjs.map +7 -0
  371. package/dist/slider/index.d.ts +5 -0
  372. package/dist/slider/index.d.ts.map +1 -0
  373. package/dist/slider/index.js +2 -0
  374. package/dist/slider/index.js.map +7 -0
  375. package/dist/slider/slider.api.d.ts +4 -0
  376. package/dist/slider/slider.api.d.ts.map +1 -0
  377. package/dist/slider/slider.dom.d.ts +18 -0
  378. package/dist/slider/slider.dom.d.ts.map +1 -0
  379. package/dist/slider/slider.machine.d.ts +4 -0
  380. package/dist/slider/slider.machine.d.ts.map +1 -0
  381. package/dist/slider/slider.props.d.ts +4 -0
  382. package/dist/slider/slider.props.d.ts.map +1 -0
  383. package/dist/slider/slider.style.d.ts +21 -0
  384. package/dist/slider/slider.style.d.ts.map +1 -0
  385. package/dist/slider/slider.types.d.ts +449 -0
  386. package/dist/slider/slider.types.d.ts.map +1 -0
  387. package/dist/slider/slider.utils.d.ts +17 -0
  388. package/dist/slider/slider.utils.d.ts.map +1 -0
  389. package/dist/switch/index.cjs +2 -0
  390. package/dist/switch/index.cjs.map +7 -0
  391. package/dist/switch/index.d.ts +5 -0
  392. package/dist/switch/index.d.ts.map +1 -0
  393. package/dist/switch/index.js +2 -0
  394. package/dist/switch/index.js.map +7 -0
  395. package/dist/switch/internal/index.d.ts +2 -0
  396. package/dist/switch/internal/index.d.ts.map +1 -0
  397. package/dist/switch/internal/switch.dom.d.ts +7 -0
  398. package/dist/switch/internal/switch.dom.d.ts.map +1 -0
  399. package/dist/switch/switch.api.d.ts +4 -0
  400. package/dist/switch/switch.api.d.ts.map +1 -0
  401. package/dist/switch/switch.machine.d.ts +4 -0
  402. package/dist/switch/switch.machine.d.ts.map +1 -0
  403. package/dist/switch/switch.props.d.ts +4 -0
  404. package/dist/switch/switch.props.d.ts.map +1 -0
  405. package/dist/switch/switch.types.d.ts +157 -0
  406. package/dist/switch/switch.types.d.ts.map +1 -0
  407. package/dist/table/aggregation-fns.d.ts +14 -0
  408. package/dist/table/aggregation-fns.d.ts.map +1 -0
  409. package/dist/table/column-helper.d.ts +9 -0
  410. package/dist/table/column-helper.d.ts.map +1 -0
  411. package/dist/table/core/cell.d.ts +46 -0
  412. package/dist/table/core/cell.d.ts.map +1 -0
  413. package/dist/table/core/column.d.ts +55 -0
  414. package/dist/table/core/column.d.ts.map +1 -0
  415. package/dist/table/core/headers.d.ts +196 -0
  416. package/dist/table/core/headers.d.ts.map +1 -0
  417. package/dist/table/core/row.d.ts +76 -0
  418. package/dist/table/core/row.d.ts.map +1 -0
  419. package/dist/table/core/table.d.ts +244 -0
  420. package/dist/table/core/table.d.ts.map +1 -0
  421. package/dist/table/dom.d.ts +3 -0
  422. package/dist/table/dom.d.ts.map +1 -0
  423. package/dist/table/features/column-sizing.d.ts +168 -0
  424. package/dist/table/features/column-sizing.d.ts.map +1 -0
  425. package/dist/table/features/expanding.d.ts +138 -0
  426. package/dist/table/features/expanding.d.ts.map +1 -0
  427. package/dist/table/features/filters.d.ts +309 -0
  428. package/dist/table/features/filters.d.ts.map +1 -0
  429. package/dist/table/features/grouping.d.ts +182 -0
  430. package/dist/table/features/grouping.d.ts.map +1 -0
  431. package/dist/table/features/ordering.d.ts +33 -0
  432. package/dist/table/features/ordering.d.ts.map +1 -0
  433. package/dist/table/features/pagination.d.ts +127 -0
  434. package/dist/table/features/pagination.d.ts.map +1 -0
  435. package/dist/table/features/pinning.d.ts +227 -0
  436. package/dist/table/features/pinning.d.ts.map +1 -0
  437. package/dist/table/features/row-selection.d.ts +148 -0
  438. package/dist/table/features/row-selection.d.ts.map +1 -0
  439. package/dist/table/features/sorting.d.ts +194 -0
  440. package/dist/table/features/sorting.d.ts.map +1 -0
  441. package/dist/table/features/visibility.d.ts +119 -0
  442. package/dist/table/features/visibility.d.ts.map +1 -0
  443. package/dist/table/filter-fns.d.ts +4 -0
  444. package/dist/table/filter-fns.d.ts.map +1 -0
  445. package/dist/table/index.cjs +5 -0
  446. package/dist/table/index.cjs.map +7 -0
  447. package/dist/table/index.d.ts +32 -0
  448. package/dist/table/index.d.ts.map +1 -0
  449. package/dist/table/index.js +5 -0
  450. package/dist/table/index.js.map +7 -0
  451. package/dist/table/sorting-fns.d.ts +5 -0
  452. package/dist/table/sorting-fns.d.ts.map +1 -0
  453. package/dist/table/types.d.ts +142 -0
  454. package/dist/table/types.d.ts.map +1 -0
  455. package/dist/table/utils/filter-rows-utils.d.ts +5 -0
  456. package/dist/table/utils/filter-rows-utils.d.ts.map +1 -0
  457. package/dist/table/utils/get-core-row-model.d.ts +3 -0
  458. package/dist/table/utils/get-core-row-model.d.ts.map +1 -0
  459. package/dist/table/utils/get-expanded-row-model.d.ts +8 -0
  460. package/dist/table/utils/get-expanded-row-model.d.ts.map +1 -0
  461. package/dist/table/utils/get-faceted-min-max-values.d.ts +3 -0
  462. package/dist/table/utils/get-faceted-min-max-values.d.ts.map +1 -0
  463. package/dist/table/utils/get-faceted-row-model.d.ts +3 -0
  464. package/dist/table/utils/get-faceted-row-model.d.ts.map +1 -0
  465. package/dist/table/utils/get-faceted-unique-values.d.ts +3 -0
  466. package/dist/table/utils/get-faceted-unique-values.d.ts.map +1 -0
  467. package/dist/table/utils/get-filtered-row-model.d.ts +3 -0
  468. package/dist/table/utils/get-filtered-row-model.d.ts.map +1 -0
  469. package/dist/table/utils/get-grouped-row-model.d.ts +3 -0
  470. package/dist/table/utils/get-grouped-row-model.d.ts.map +1 -0
  471. package/dist/table/utils/get-pagination-row-model.d.ts +3 -0
  472. package/dist/table/utils/get-pagination-row-model.d.ts.map +1 -0
  473. package/dist/table/utils/get-sorted-row-model.d.ts +3 -0
  474. package/dist/table/utils/get-sorted-row-model.d.ts.map +1 -0
  475. package/dist/table/utils.d.ts +39 -0
  476. package/dist/table/utils.d.ts.map +1 -0
  477. package/dist/tabs/index.cjs +2 -0
  478. package/dist/tabs/index.cjs.map +7 -0
  479. package/dist/tabs/index.d.ts +5 -0
  480. package/dist/tabs/index.d.ts.map +1 -0
  481. package/dist/tabs/index.js +2 -0
  482. package/dist/tabs/index.js.map +7 -0
  483. package/dist/tabs/internal/index.d.ts +2 -0
  484. package/dist/tabs/internal/index.d.ts.map +1 -0
  485. package/dist/tabs/internal/tabs.dom.d.ts +42 -0
  486. package/dist/tabs/internal/tabs.dom.d.ts.map +1 -0
  487. package/dist/tabs/tabs.api.d.ts +4 -0
  488. package/dist/tabs/tabs.api.d.ts.map +1 -0
  489. package/dist/tabs/tabs.machine.d.ts +4 -0
  490. package/dist/tabs/tabs.machine.d.ts.map +1 -0
  491. package/dist/tabs/tabs.props.d.ts +4 -0
  492. package/dist/tabs/tabs.props.d.ts.map +1 -0
  493. package/dist/tabs/tabs.types.d.ts +256 -0
  494. package/dist/tabs/tabs.types.d.ts.map +1 -0
  495. package/dist/text-area/index.cjs +2 -0
  496. package/dist/text-area/index.cjs.map +7 -0
  497. package/dist/text-area/index.d.ts +2 -0
  498. package/dist/text-area/index.d.ts.map +1 -0
  499. package/dist/text-area/index.js +1 -0
  500. package/dist/text-area/index.js.map +7 -0
  501. package/dist/text-input/index.cjs +2 -0
  502. package/dist/text-input/index.cjs.map +7 -0
  503. package/dist/text-input/index.d.ts +5 -0
  504. package/dist/text-input/index.d.ts.map +1 -0
  505. package/dist/text-input/index.js +2 -0
  506. package/dist/text-input/index.js.map +7 -0
  507. package/dist/text-input/internal/index.d.ts +2 -0
  508. package/dist/text-input/internal/index.d.ts.map +1 -0
  509. package/dist/text-input/internal/text-input.dom.d.ts +7 -0
  510. package/dist/text-input/internal/text-input.dom.d.ts.map +1 -0
  511. package/dist/text-input/text-input.api.d.ts +4 -0
  512. package/dist/text-input/text-input.api.d.ts.map +1 -0
  513. package/dist/text-input/text-input.machine.d.ts +4 -0
  514. package/dist/text-input/text-input.machine.d.ts.map +1 -0
  515. package/dist/text-input/text-input.props.d.ts +3 -0
  516. package/dist/text-input/text-input.props.d.ts.map +1 -0
  517. package/dist/text-input/text-input.types.d.ts +118 -0
  518. package/dist/text-input/text-input.types.d.ts.map +1 -0
  519. package/dist/toast/index.cjs +2 -0
  520. package/dist/toast/index.cjs.map +7 -0
  521. package/dist/toast/index.d.ts +8 -0
  522. package/dist/toast/index.d.ts.map +1 -0
  523. package/dist/toast/index.js +2 -0
  524. package/dist/toast/index.js.map +7 -0
  525. package/dist/toast/internal/index.d.ts +2 -0
  526. package/dist/toast/internal/index.d.ts.map +1 -0
  527. package/dist/toast/internal/toast.dom.d.ts +10 -0
  528. package/dist/toast/internal/toast.dom.d.ts.map +1 -0
  529. package/dist/toast/toast-group.api.d.ts +4 -0
  530. package/dist/toast/toast-group.api.d.ts.map +1 -0
  531. package/dist/toast/toast-group.machine.d.ts +4 -0
  532. package/dist/toast/toast-group.machine.d.ts.map +1 -0
  533. package/dist/toast/toast.api.d.ts +4 -0
  534. package/dist/toast/toast.api.d.ts.map +1 -0
  535. package/dist/toast/toast.machine.d.ts +4 -0
  536. package/dist/toast/toast.machine.d.ts.map +1 -0
  537. package/dist/toast/toast.store.d.ts +4 -0
  538. package/dist/toast/toast.store.d.ts.map +1 -0
  539. package/dist/toast/toast.types.d.ts +463 -0
  540. package/dist/toast/toast.types.d.ts.map +1 -0
  541. package/dist/toast/toast.utils.d.ts +9 -0
  542. package/dist/toast/toast.utils.d.ts.map +1 -0
  543. package/dist/tooltip/index.cjs +2 -0
  544. package/dist/tooltip/index.cjs.map +7 -0
  545. package/dist/tooltip/index.d.ts +5 -0
  546. package/dist/tooltip/index.d.ts.map +1 -0
  547. package/dist/tooltip/index.js +2 -0
  548. package/dist/tooltip/index.js.map +7 -0
  549. package/dist/tooltip/tooltip.api.d.ts +4 -0
  550. package/dist/tooltip/tooltip.api.d.ts.map +1 -0
  551. package/dist/tooltip/tooltip.machine.d.ts +4 -0
  552. package/dist/tooltip/tooltip.machine.d.ts.map +1 -0
  553. package/dist/tooltip/tooltip.props.d.ts +4 -0
  554. package/dist/tooltip/tooltip.props.d.ts.map +1 -0
  555. package/dist/tooltip/tooltip.store.d.ts +5 -0
  556. package/dist/tooltip/tooltip.store.d.ts.map +1 -0
  557. package/dist/tooltip/tooltip.types.d.ts +122 -0
  558. package/dist/tooltip/tooltip.types.d.ts.map +1 -0
  559. package/dist/tree/index.cjs +2 -0
  560. package/dist/tree/index.cjs.map +7 -0
  561. package/dist/tree/index.d.ts +6 -0
  562. package/dist/tree/index.d.ts.map +1 -0
  563. package/dist/tree/index.js +2 -0
  564. package/dist/tree/index.js.map +7 -0
  565. package/dist/tree/internal/index.d.ts +3 -0
  566. package/dist/tree/internal/index.d.ts.map +1 -0
  567. package/dist/tree/internal/tree.dom.d.ts +8 -0
  568. package/dist/tree/internal/tree.dom.d.ts.map +1 -0
  569. package/dist/tree/internal/tree.utils.d.ts +12 -0
  570. package/dist/tree/internal/tree.utils.d.ts.map +1 -0
  571. package/dist/tree/tree.api.d.ts +5 -0
  572. package/dist/tree/tree.api.d.ts.map +1 -0
  573. package/dist/tree/tree.collection.d.ts +4 -0
  574. package/dist/tree/tree.collection.d.ts.map +1 -0
  575. package/dist/tree/tree.machine.d.ts +4 -0
  576. package/dist/tree/tree.machine.d.ts.map +1 -0
  577. package/dist/tree/tree.props.d.ts +7 -0
  578. package/dist/tree/tree.props.d.ts.map +1 -0
  579. package/dist/tree/tree.types.d.ts +579 -0
  580. package/dist/tree/tree.types.d.ts.map +1 -0
  581. package/dist/tsbuildinfo +1 -0
  582. package/package.json +29 -0
@@ -0,0 +1,309 @@
1
+ import type { RowModel } from "..";
2
+ import type { TableFeature } from "../core/table";
3
+ import { type BuiltInFilterFn } from "../filter-fns";
4
+ import type { Column, FilterFns, OnChangeFn, Row, RowData, TableInstance, Updater } from "../types";
5
+ export interface FiltersTableState {
6
+ columnFilters: ColumnFiltersState;
7
+ globalFilter: any;
8
+ }
9
+ export type ColumnFiltersState = ColumnFilter[];
10
+ export interface ColumnFilter {
11
+ id: string;
12
+ value: unknown;
13
+ }
14
+ export interface ResolvedColumnFilter<TData extends RowData> {
15
+ filterFn: FilterFn<TData>;
16
+ id: string;
17
+ resolvedValue: unknown;
18
+ }
19
+ export interface FilterFn<TData extends RowData> {
20
+ (row: Row<TData>, columnId: string, filterValue: any, addMeta: (meta: Record<string, any>) => void): boolean;
21
+ autoRemove?: ColumnFilterAutoRemoveTestFn<TData>;
22
+ resolveFilterValue?: TransformFilterValueFn<TData>;
23
+ }
24
+ export type TransformFilterValueFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => unknown;
25
+ export type ColumnFilterAutoRemoveTestFn<TData extends RowData> = (value: any, column?: Column<TData, unknown>) => boolean;
26
+ export type CustomFilterFns<TData extends RowData> = Record<string, FilterFn<TData>>;
27
+ export type FilterFnOption<TData extends RowData> = "auto" | BuiltInFilterFn | FilterFn<TData>;
28
+ export interface FiltersColumnDef<TData extends RowData> {
29
+ /**
30
+ * Enables/disables the `column` filter for this column.
31
+ */
32
+ enableColumnFilter?: boolean;
33
+ /**
34
+ * Enables/disables the global filter for this column.
35
+ */
36
+ enableGlobalFilter?: boolean;
37
+ /**
38
+ * The filter function to use with this column. Can be the name of a built-in
39
+ * filter function or a custom filter function.
40
+ *
41
+ * @inheritDoc
42
+ */
43
+ filterFn?: FilterFnOption<TData>;
44
+ }
45
+ export interface FiltersColumn<TData extends RowData> {
46
+ /** @internal */
47
+ _getFacetedMinMaxValues?: () => undefined | [number, number];
48
+ /** @internal */
49
+ _getFacetedRowModel?: () => RowModel<TData>;
50
+ /** @internal */
51
+ _getFacetedUniqueValues?: () => Map<any, number>;
52
+ /**
53
+ * Returns an automatically calculated filter function for the column based off of
54
+ * the columns first known value.
55
+ *
56
+ * @inheritDoc
57
+ */
58
+ getAutoFilterFn: () => FilterFn<TData> | undefined;
59
+ /**
60
+ * Returns whether the column can be `column` filtered.
61
+ */
62
+ getCanFilter: () => boolean;
63
+ /**
64
+ * Returns whether the column can be globally filtered. Set to `false`
65
+ * to disable a column from being scanned during global filtering.
66
+ */
67
+ getCanGlobalFilter: () => boolean;
68
+ /**
69
+ * A function that computes and returns a min/max tuple derived from
70
+ * {@link getFacetedRowModel}. Useful for displaying faceted result values. > ⚠️
71
+ * Requires that you pass a valid {@link getFacetedMinMaxValues} function to
72
+ * `options.getFacetedMinMaxValues`. A default implementation is provided via the
73
+ * exported {@link getFacetedMinMaxValues} function.
74
+ */
75
+ getFacetedMinMaxValues: () => undefined | [number, number];
76
+ /**
77
+ * Returns the row model with all other column filters applied, excluding its own
78
+ * filter. Useful for displaying faceted result counts.️ Requires that you
79
+ * pass a valid {@link getFacetedRowModel} function to `options.facetedRowModel`. A
80
+ * default implementation is provided via the exported {@link getFacetedRowModel}
81
+ * function.
82
+ *
83
+ * @inheritDoc
84
+ */
85
+ getFacetedRowModel: () => RowModel<TData>;
86
+ /**
87
+ * A function that computes and returns a `Map` of unique values and their
88
+ * occurrences derived from `column.getFacetedRowModel`. Useful for displaying
89
+ * faceted result values. Requires that you pass a valid {@link
90
+ * getFacetedUniqueValues} function to `options.getFacetedUniqueValues`. A default
91
+ * implementation is provided via the exported {@link getFacetedUniqueValues}
92
+ * function.
93
+ */
94
+ getFacetedUniqueValues: () => Map<any, number>;
95
+ /**
96
+ * Returns the filter function (either user-defined or automatic, depending on
97
+ * configuration) for the columnId specified.
98
+ *
99
+ * @inheritDoc
100
+ */
101
+ getFilterFn: () => FilterFn<TData> | undefined;
102
+ /**
103
+ * Returns the index of the column filter in the table's `state.columnFilters`
104
+ * array. Returns `-1` if not found.
105
+ */
106
+ getFilterIndex: () => number;
107
+ /**
108
+ * Returns the current filter value for the column.
109
+ */
110
+ getFilterValue: () => unknown;
111
+ /**
112
+ * Returns whether the column is currently filtered.
113
+ */
114
+ getIsFiltered: () => boolean;
115
+ /**
116
+ * A function that sets the current filter value for the column. You can pass it a
117
+ * value or an updater function for immutability-safe operations on existing
118
+ * values.
119
+ */
120
+ setFilterValue: (updater: Updater<any>) => void;
121
+ }
122
+ export interface FiltersRow<_TData extends RowData> {
123
+ /**
124
+ * The column filters map for the row. This object tracks whether a row is
125
+ * passing/failing specific filters by their column ID.
126
+ */
127
+ columnFilters: Record<string, boolean>;
128
+ /**
129
+ * The column filters meta map for the row. This object tracks any filter meta for
130
+ * a row as optionally provided during the filtering process.
131
+ */
132
+ columnFiltersMeta: Record<string, Record<string, any>>;
133
+ }
134
+ interface FiltersOptionsBase<TData extends RowData> {
135
+ /**
136
+ * Enables/disables `column` filtering for all columns.
137
+ */
138
+ enableColumnFilters?: boolean;
139
+ /**
140
+ * Enables/disables all filtering for the table.
141
+ */
142
+ enableFilters?: boolean;
143
+ /**
144
+ * Enables/disables global filtering for all columns.
145
+ */
146
+ enableGlobalFilter?: boolean;
147
+ /**
148
+ * By default, filtering is done from parent rows down (so if a parent row is
149
+ * filtered out, all of its children will be filtered out as well). Setting this
150
+ * option to `true` will cause filtering to be done from leaf rows up (which means
151
+ * parent rows will be included so long as one of their child or grand-child rows
152
+ * is also included).
153
+ */
154
+ filterFromLeafRows?: boolean;
155
+ /**
156
+ * If provided, this function will be called with the column and should return
157
+ * `true` or `false` to indicate whether this column should be used for global
158
+ * filtering.
159
+ *
160
+ * This is useful if the column can contain data that is not `string` or `number`
161
+ * (i.e. `undefined`).
162
+ */
163
+ getColumnCanGlobalFilter?: (
164
+ /** @inheritDoc */
165
+ column: Column<TData, unknown>) => boolean;
166
+ getFacetedMinMaxValues?: (
167
+ /** @inheritDoc */
168
+ table: TableInstance<TData>, columnId: string) => () => undefined | [number, number];
169
+ getFacetedRowModel?: (
170
+ /** @inheritDoc */
171
+ table: TableInstance<TData>,
172
+ /**
173
+ * The id of the column
174
+ */
175
+ columnId: string) => () => RowModel<TData>;
176
+ getFacetedUniqueValues?: (
177
+ /** @inheritDoc */
178
+ table: TableInstance<TData>, columnId: string) => () => Map<any, number>;
179
+ /**
180
+ * If provided, this function is called once per table and should return a
181
+ * new function which will calculate and return the row model for the table
182
+ * when it's filtered. - For server-side filtering, this function is unnecessary
183
+ * and can be ignored since the server should already return the filtered row
184
+ * model. - For client-side filtering, this function is required. A default
185
+ * implementation is provided via any table adapter's `{ getFilteredRowModel }`
186
+ * export.
187
+ */
188
+ getFilteredRowModel?: (
189
+ /** @inheritDoc */
190
+ table: TableInstance<TData>) => () => RowModel<TData>;
191
+ /**
192
+ * The filter function to use for global filtering.
193
+ * - A `string` referencing a built-in filter function
194
+ * - A `string` that references a custom filter functions provided via the
195
+ * `tableOptions.filterFns` option - A custom filter function
196
+ *
197
+ * @inheritDoc
198
+ */
199
+ globalFilterFn?: FilterFnOption<TData>;
200
+ /**
201
+ * Disables the `getFilteredRowModel` from being used to filter data. This may be
202
+ * useful if your table needs to dynamically support both client-side and
203
+ * server-side filtering.
204
+ */
205
+ manualFiltering?: boolean;
206
+ /**
207
+ * By default, filtering is done for all rows (max depth of 100), no matter if
208
+ * they are root level parent rows or the child leaf rows of a parent row. Setting
209
+ * this option to `0` will cause filtering to only be applied to the root level
210
+ * parent rows, with all sub-rows remaining unfiltered. Similarly, setting this
211
+ * option to `1` will cause filtering to only be applied to child leaf rows 1
212
+ * level deep, and so on.
213
+ *
214
+ * This is useful for situations where you want a row's entire child hierarchy to
215
+ * be visible regardless of the applied filter.
216
+ */
217
+ maxLeafRowFilterDepth?: number;
218
+ /**
219
+ * If provided, this function will be called with an `updaterFn` when
220
+ * `state.columnFilters` changes. This overrides the default internal state
221
+ * management, so you will need to persist the state change either fully or
222
+ * partially outside the table.
223
+ */
224
+ onColumnFiltersChange?: OnChangeFn<ColumnFiltersState>;
225
+ /**
226
+ * If provided, this function will be called with an `updaterFn` when
227
+ * `state.globalFilter` changes. This overrides the default internal state
228
+ * management, so you will need to persist the state change either fully or
229
+ * partially outside the table.
230
+ */
231
+ onGlobalFilterChange?: OnChangeFn<any>;
232
+ }
233
+ type ResolvedFilterFns = keyof FilterFns extends never ? {
234
+ /** @inheritDoc */
235
+ filterFns?: Record<string, FilterFn<any>>;
236
+ } : {
237
+ /** @inheritDoc */
238
+ filterFns: Record<keyof FilterFns, FilterFn<any>>;
239
+ };
240
+ export interface FiltersOptions<TData extends RowData> extends FiltersOptionsBase<TData>, ResolvedFilterFns {
241
+ }
242
+ export interface FiltersInstance<TData extends RowData> {
243
+ /** @internal */
244
+ _getFilteredRowModel?: () => RowModel<TData>;
245
+ /** @internal */
246
+ _getGlobalFacetedMinMaxValues?: () => undefined | [number, number];
247
+ /** @internal */
248
+ _getGlobalFacetedRowModel?: () => RowModel<TData>;
249
+ /** @internal */
250
+ _getGlobalFacetedUniqueValues?: () => Map<any, number>;
251
+ /**
252
+ * Returns the row model for the table after `column` filtering has been applied.
253
+ */
254
+ getFilteredRowModel: () => RowModel<TData>;
255
+ /**
256
+ * Currently, this function returns the built-in `includesString` filter function.
257
+ * In future releases, it may return more dynamic filter functions based on the
258
+ * nature of the data provided.
259
+ *
260
+ * @inheritDoc
261
+ */
262
+ getGlobalAutoFilterFn: () => FilterFn<TData> | undefined;
263
+ /**
264
+ * Returns the faceted min and max values for the global filter.
265
+ */
266
+ getGlobalFacetedMinMaxValues: () => undefined | [number, number];
267
+ /**
268
+ * Returns the row model for the table after global filtering has been applied.
269
+ */
270
+ getGlobalFacetedRowModel: () => RowModel<TData>;
271
+ /**
272
+ * Returns the faceted unique values for the global filter.
273
+ */
274
+ getGlobalFacetedUniqueValues: () => Map<any, number>;
275
+ /**
276
+ * Returns the filter function (either user-defined or automatic, depending on
277
+ * configuration) for the global filter.
278
+ *
279
+ * @inheritDoc
280
+ */
281
+ getGlobalFilterFn: () => FilterFn<TData> | undefined;
282
+ /**
283
+ * Returns the row model for the table before any `column` filtering has been
284
+ * applied.
285
+ */
286
+ getPreFilteredRowModel: () => RowModel<TData>;
287
+ /**
288
+ * Resets the `columnFilters` state to `initialState.columnFilters`, or `true`
289
+ * can be passed to force a default blank state reset to `[]`.
290
+ */
291
+ resetColumnFilters: (defaultState?: boolean) => void;
292
+ /**
293
+ * Resets the `globalFilter` state to `initialState.globalFilter`, or `true` can
294
+ * be passed to force a default blank state reset to `undefined`.
295
+ */
296
+ resetGlobalFilter: (defaultState?: boolean) => void;
297
+ /**
298
+ * Sets or updates the `state.columnFilters` state.
299
+ */
300
+ setColumnFilters: (updater: Updater<ColumnFiltersState>) => void;
301
+ /**
302
+ * Sets or updates the `state.globalFilter` state.
303
+ */
304
+ setGlobalFilter: (updater: Updater<any>) => void;
305
+ }
306
+ export declare const Filters: TableFeature;
307
+ export declare function shouldAutoRemoveFilter<TData extends RowData>(filterFn?: FilterFn<TData>, value?: any, column?: Column<TData, unknown>): boolean;
308
+ export {};
309
+ //# sourceMappingURL=filters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/table/features/filters.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,IAAI,CAAA;AAChC,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAC,KAAK,eAAe,EAAY,MAAM,eAAe,CAAA;AAC7D,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACT,UAAU,EACV,GAAG,EACH,OAAO,EACP,aAAa,EACb,OAAO,EACR,MAAM,UAAU,CAAA;AAGjB,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,kBAAkB,CAAA;IACjC,YAAY,EAAE,GAAG,CAAA;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,EAAE,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,oBAAoB,CAAC,KAAK,SAAS,OAAO;IACzD,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,QAAQ,CAAC,KAAK,SAAS,OAAO;IAC7C,CACE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EACf,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,GAAG,EAChB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAC3C,OAAO,CAAA;IAEV,UAAU,CAAC,EAAE,4BAA4B,CAAC,KAAK,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O,KAAK,IAAI,CAAA;IACpD;;;OAGG;IACH,iBAAiB,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD;;OAEG;IACH,gBAAgB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAA;IAChE;;OAEG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA;CACjD;AAED,eAAO,MAAM,OAAO,EAAE,YA6RrB,CAAA;AAED,wBAAgB,sBAAsB,CAAC,KAAK,SAAS,OAAO,EAC1D,QAAQ,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,EAC1B,KAAK,CAAC,EAAE,GAAG,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,GAC9B,OAAO,CAQT"}
@@ -0,0 +1,182 @@
1
+ import type { CellContext, RowModel } from "..";
2
+ import { type BuiltInAggregationFn } from "../aggregation-fns";
3
+ import type { TableFeature } from "../core/table";
4
+ import type { AggregationFns, Column, ColumnDefTemplate, ColumnMeta, OnChangeFn, Row, RowData, TableInstance, Updater } from "../types";
5
+ export type GroupingState = string[];
6
+ export interface GroupingTableState {
7
+ grouping: GroupingState;
8
+ }
9
+ export type AggregationFn<TData extends RowData> = (
10
+ /**
11
+ * The id of the column.
12
+ */
13
+ columnId: string,
14
+ /** @inheritDoc */
15
+ leafRows: Row<TData>[],
16
+ /** @inheritDoc */
17
+ childRows: Row<TData>[]) => any;
18
+ export type CustomAggregationFns = Record<string, AggregationFn<any>>;
19
+ export type AggregationFnOption<TData extends RowData> = "auto" | keyof AggregationFns | BuiltInAggregationFn | AggregationFn<TData>;
20
+ export interface GroupingColumnDef<TData extends RowData, TValue> {
21
+ /**
22
+ * The cell to display each row for the column if the cell is an aggregate.
23
+ */
24
+ aggregatedCell?: ColumnDefTemplate<CellContext<TData, TValue>>;
25
+ /**
26
+ * The resolved aggregation function for the column.
27
+ *
28
+ * @inheritDoc
29
+ */
30
+ aggregationFn?: AggregationFnOption<TData>;
31
+ /**
32
+ * Enables/disables grouping for this column.
33
+ */
34
+ enableGrouping?: boolean;
35
+ /**
36
+ * Specify a value to be used for grouping rows on this column. If this option is
37
+ * not specified, the value derived from `accessorKey` / `accessorFn` will be used
38
+ * instead.
39
+ */
40
+ getGroupingValue?: (row: TData) => any;
41
+ }
42
+ export interface GroupingColumn<TData extends RowData> {
43
+ /**
44
+ * Returns the aggregation function for the column.
45
+ *
46
+ * @inheritDoc
47
+ */
48
+ getAggregationFn: () => AggregationFn<TData> | undefined;
49
+ /**
50
+ * Returns the automatically inferred aggregation function for the column.
51
+ *
52
+ * @inheritDoc
53
+ */
54
+ getAutoAggregationFn: () => AggregationFn<TData> | undefined;
55
+ /**
56
+ * Returns whether the column can be grouped.
57
+ */
58
+ getCanGroup: () => boolean;
59
+ /**
60
+ * Returns the index of the column in the grouping state.
61
+ */
62
+ getGroupedIndex: () => number;
63
+ /**
64
+ * Returns whether the column is currently grouped.
65
+ */
66
+ getIsGrouped: () => boolean;
67
+ /**
68
+ * Returns a function that toggles the grouping state of the column. This is
69
+ * useful for passing to the `onClick` prop of a button.
70
+ */
71
+ getToggleGroupingHandler: () => () => void;
72
+ /**
73
+ * Toggles the grouping state of the column.
74
+ */
75
+ toggleGrouping: () => void;
76
+ }
77
+ export interface GroupingRow {
78
+ /** @internal */
79
+ _groupingValuesCache: Record<string, any>;
80
+ /**
81
+ * Returns the grouping value for any row and column (including leaf rows).
82
+ */
83
+ getGroupingValue: (columnId: string) => unknown;
84
+ /**
85
+ * Returns whether the row is currently grouped.
86
+ */
87
+ getIsGrouped: () => boolean;
88
+ /**
89
+ * If this row is grouped, this is the id of the column that this row is grouped
90
+ * by.
91
+ */
92
+ groupingColumnId?: string;
93
+ /**
94
+ * If this row is grouped, this is the unique/shared value for the
95
+ * `groupingColumnId` for all of the rows in this group.
96
+ */
97
+ groupingValue?: unknown;
98
+ }
99
+ export interface GroupingCell {
100
+ /**
101
+ * Returns whether the cell is currently aggregated.
102
+ */
103
+ getIsAggregated: () => boolean;
104
+ /**
105
+ * Returns whether the cell is currently grouped.
106
+ */
107
+ getIsGrouped: () => boolean;
108
+ /**
109
+ * Returns whether the cell is currently a placeholder cell.
110
+ */
111
+ getIsPlaceholder: () => boolean;
112
+ }
113
+ export interface ColumnDefaultOptions {
114
+ enableGrouping: boolean;
115
+ onGroupingChange: OnChangeFn<GroupingState>;
116
+ }
117
+ interface GroupingOptionsBase {
118
+ /**
119
+ * Enables/disables grouping for the table.
120
+ */
121
+ enableGrouping?: boolean;
122
+ /**
123
+ * Returns the row model after grouping has taken place, but no further.
124
+ */
125
+ getGroupedRowModel?: (
126
+ /** @inheritDoc */
127
+ table: TableInstance<any>) => () => RowModel<any>;
128
+ /**
129
+ * Grouping columns are automatically reordered by default to the start of the
130
+ * columns list. If you would rather remove them or leave them as-is, set the
131
+ * appropriate mode here.
132
+ */
133
+ groupedColumnMode?: false | "reorder" | "remove";
134
+ /**
135
+ * Enables manual grouping. If this option is set to `true`, the table will not
136
+ * automatically group rows using `getGroupedRowModel()` and instead will expect
137
+ * you to manually group the rows before passing them to the table. This is useful
138
+ * if you are doing server-side grouping and aggregation.
139
+ */
140
+ manualGrouping?: boolean;
141
+ /**
142
+ * If this function is provided, it will be called when the grouping state changes
143
+ * and you will be expected to manage the state yourself. You can pass the managed
144
+ * state back to the table via the `tableOptions.state.grouping` option.
145
+ */
146
+ onGroupingChange?: OnChangeFn<GroupingState>;
147
+ }
148
+ type ResolvedAggregationFns = keyof AggregationFns extends never ? {
149
+ /** @inheritDoc */
150
+ aggregationFns?: Record<string, AggregationFn<any>>;
151
+ } : {
152
+ /** @inheritDoc */
153
+ aggregationFns: Record<keyof AggregationFns, AggregationFn<any>>;
154
+ };
155
+ export interface GroupingOptions extends GroupingOptionsBase, ResolvedAggregationFns {
156
+ }
157
+ export type GroupingColumnMode = false | "reorder" | "remove";
158
+ export interface GroupingInstance<TData extends RowData> {
159
+ /** @internal */
160
+ _getGroupedRowModel?: () => RowModel<TData>;
161
+ /**
162
+ * Returns the row model for the table after grouping has been applied.
163
+ */
164
+ getGroupedRowModel: () => RowModel<TData>;
165
+ /**
166
+ * Returns the row model for the table before any grouping has been applied.
167
+ */
168
+ getPreGroupedRowModel: () => RowModel<TData>;
169
+ /**
170
+ * Resets the `grouping` state to `initialState.grouping`, or `true` can be
171
+ * passed to force a default blank state reset to `[]`.
172
+ */
173
+ resetGrouping: (defaultState?: boolean) => void;
174
+ /**
175
+ * Updates the grouping state of the table via an update function or value.
176
+ */
177
+ setGrouping: (updater: Updater<GroupingState>) => void;
178
+ }
179
+ export declare const Grouping: TableFeature;
180
+ export declare function orderColumns<TData extends RowData>(leafColumns: Column<TData, unknown>[], grouping: string[], groupedColumnMode?: GroupingColumnMode): Column<TData, unknown, ColumnMeta>[];
181
+ export {};
182
+ //# sourceMappingURL=grouping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grouping.d.ts","sourceRoot":"","sources":["../../../src/table/features/grouping.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAE,QAAQ,EAAC,MAAM,IAAI,CAAA;AAC7C,OAAO,EAAiB,KAAK,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAC5E,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EACV,cAAc,EAEd,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,GAAG,EACH,OAAO,EACP,aAAa,EACb,OAAO,EACR,MAAM,UAAU,CAAA;AAGjB,MAAM,MAAM,aAAa,GAAG,MAAM,EAAE,CAAA;AAEpC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,OAAO,IAAI;AACjD;;GAEG;AACH,QAAQ,EAAE,MAAM;AAChB,kBAAkB;AA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E,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;CACjE,CAAA;AAEL,MAAM,WAAW,eACf,SAAQ,mBAAmB,EACzB,sBAAsB;CAAG;AAE7B,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE7D,MAAM,WAAW,gBAAgB,CAAC,KAAK,SAAS,OAAO;IACrD,gBAAgB;IAChB,mBAAmB,CAAC,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC3C;;OAEG;IACH,kBAAkB,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAA;IACzC;;OAEG;IACH,qBAAqB,EAAE,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC5C;;;OAGG;IACH,aAAa,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/C;;OAEG;IACH,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,IAAI,CAAA;CACvD;AAID,eAAO,MAAM,QAAQ,EAAE,YAiKtB,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,SAAS,OAAO,EAChD,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,EACrC,QAAQ,EAAE,MAAM,EAAE,EAClB,iBAAiB,CAAC,EAAE,kBAAkB,GACrC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAkBtC"}
@@ -0,0 +1,33 @@
1
+ import type { TableFeature } from "../core/table";
2
+ import type { Column, OnChangeFn, RowData, Updater } from "../types";
3
+ export interface ColumnOrderTableState {
4
+ columnOrder: ColumnOrderState;
5
+ }
6
+ export type ColumnOrderState = string[];
7
+ export interface ColumnOrderOptions {
8
+ /**
9
+ * If provided, this function will be called with an `updaterFn` when
10
+ * `state.columnOrder` changes. This overrides the default internal state
11
+ * management, so you will need to persist the state change either fully or
12
+ * partially outside the table.
13
+ */
14
+ onColumnOrderChange?: OnChangeFn<ColumnOrderState>;
15
+ }
16
+ export interface ColumnOrderDefaultOptions {
17
+ onColumnOrderChange: OnChangeFn<ColumnOrderState>;
18
+ }
19
+ export interface ColumnOrderInstance<TData extends RowData> {
20
+ /** @internal */
21
+ _getOrderColumnsFn: () => (columns: Column<TData, unknown>[]) => Column<TData, unknown>[];
22
+ /**
23
+ * Resets the `columnOrder` state to `initialState.columnOrder`, or `true` can
24
+ * be passed to force a default blank state reset to `[]`.
25
+ */
26
+ resetColumnOrder: (defaultState?: boolean) => void;
27
+ /**
28
+ * Sets or updates the `state.columnOrder` state.
29
+ */
30
+ setColumnOrder: (updater: Updater<ColumnOrderState>) => void;
31
+ }
32
+ export declare const Ordering: TableFeature;
33
+ //# sourceMappingURL=ordering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ordering.d.ts","sourceRoot":"","sources":["../../../src/table/features/ordering.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EACV,MAAM,EACN,UAAU,EACV,OAAO,EAEP,OAAO,EACR,MAAM,UAAU,CAAA;AAKjB,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,gBAAgB,CAAA;CAC9B;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,EAAE,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;CACnD;AAED,MAAM,WAAW,yBAAyB;IACxC,mBAAmB,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,mBAAmB,CAAC,KAAK,SAAS,OAAO;IACxD,gBAAgB;IAChB,kBAAkB,EAAE,MAAM,CACxB,OAAO,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,KAC9B,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAA;IAC7B;;;OAGG;IACH,gBAAgB,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;IAClD;;OAEG;IACH,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC7D;AAED,eAAO,MAAM,QAAQ,EAAE,YAqEtB,CAAA"}
@@ -0,0 +1,127 @@
1
+ import type { TableFeature } from "../core/table";
2
+ import type { OnChangeFn, RowData, RowModel, TableInstance, Updater } from "../types";
3
+ export interface PaginationState {
4
+ pageIndex: number;
5
+ pageSize: number;
6
+ }
7
+ export interface PaginationTableState {
8
+ pagination: PaginationState;
9
+ }
10
+ export interface PaginationInitialTableState {
11
+ pagination?: Partial<PaginationState>;
12
+ }
13
+ export interface PaginationOptions {
14
+ /**
15
+ * If set to `true`, pagination will be reset to the first page when page-altering
16
+ * state changes e.g.,`data` is updated, filters change, grouping changes, etc.
17
+ */
18
+ autoResetPageIndex?: boolean;
19
+ /**
20
+ * Returns the row model after pagination has taken place, but no further.
21
+ *
22
+ * Pagination columns are automatically reordered by default to the start of the
23
+ * columns list. If you would rather remove them or leave them as-is, set the
24
+ * appropriate mode here.
25
+ */
26
+ getPaginationRowModel?: (
27
+ /** @inheritDoc */
28
+ table: TableInstance<any>) => () => RowModel<any>;
29
+ /**
30
+ * Enables manual pagination. If this option is set to `true`, the table will not
31
+ * automatically paginate rows using `getPaginationRowModel()` and instead will
32
+ * expect you to manually paginate the rows before passing them to the table. This
33
+ * is useful if you are doing server-side pagination and aggregation.
34
+ */
35
+ manualPagination?: boolean;
36
+ /**
37
+ * If this function is provided, it will be called when the pagination state
38
+ * changes and you will be expected to manage the state yourself. You can pass the
39
+ * managed state back to the table via the `tableOptions.state.pagination` option.
40
+ */
41
+ onPaginationChange?: OnChangeFn<PaginationState>;
42
+ /**
43
+ * When manually controlling pagination, you should supply a total `pageCount`
44
+ * value to the table if you know it. If you do not know how many pages there are,
45
+ * you can set this to `-1`.
46
+ */
47
+ pageCount?: number;
48
+ }
49
+ export interface PaginationDefaultOptions {
50
+ onPaginationChange: OnChangeFn<PaginationState>;
51
+ }
52
+ export interface PaginationInstance<TData extends RowData> {
53
+ /** @internal */
54
+ _autoResetPageIndex: () => void;
55
+ /** @internal */
56
+ _getPaginationRowModel?: () => RowModel<TData>;
57
+ /**
58
+ * Returns whether the table can go to the next page.
59
+ */
60
+ getCanNextPage: () => boolean;
61
+ /**
62
+ * Returns whether the table can go to the previous page.
63
+ */
64
+ getCanPreviousPage: () => boolean;
65
+ /**
66
+ * Returns the page count. If manually paginating or controlling the pagination
67
+ * state, this will come directly from the `options.pageCount` table option,
68
+ * otherwise it will be calculated from the table data using the total row count
69
+ * and current page size.
70
+ */
71
+ getPageCount: () => number;
72
+ /**
73
+ * Returns an array of page options (zero-index-based) for the current page size.
74
+ */
75
+ getPageOptions: () => number[];
76
+ /**
77
+ * Returns the row model for the table after pagination has been applied.
78
+ */
79
+ getPaginationRowModel: () => RowModel<TData>;
80
+ /**
81
+ * Returns the row model for the table before any pagination has been applied.
82
+ */
83
+ getPrePaginationRowModel: () => RowModel<TData>;
84
+ /**
85
+ * Increments the page index by one, if possible.
86
+ */
87
+ nextPage: () => void;
88
+ /**
89
+ * Decrements the page index by one, if possible.
90
+ */
91
+ previousPage: () => void;
92
+ /**
93
+ * Resets the page index to its initial state. If `defaultState` is `true`, the
94
+ * page index will be reset to `0` regardless of initial state.
95
+ */
96
+ resetPageIndex: (defaultState?: boolean) => void;
97
+ /**
98
+ * Resets the page size to its initial state. If `defaultState` is `true`, the
99
+ * page size will be reset to `10` regardless of initial state.
100
+ */
101
+ resetPageSize: (defaultState?: boolean) => void;
102
+ /**
103
+ * Resets the `pagination` state to `initialState.pagination`, or `true` can be
104
+ * passed to force a default blank state reset to `[]`.
105
+ */
106
+ resetPagination: (defaultState?: boolean) => void;
107
+ /**
108
+ * Updates the page count using the provided function or value.
109
+ */
110
+ setPageCount: (updater: Updater<number>) => void;
111
+ /**
112
+ * Updates the page index using the provided function or value in the
113
+ * `state.pagination.pageIndex` state.
114
+ */
115
+ setPageIndex: (updater: Updater<number>) => void;
116
+ /**
117
+ * Updates the page size using the provided function or value in the
118
+ * `state.pagination.pageSize` state.
119
+ */
120
+ setPageSize: (updater: Updater<number>) => void;
121
+ /**
122
+ * Sets or updates the `state.pagination` state.
123
+ */
124
+ setPagination: (updater: Updater<PaginationState>) => void;
125
+ }
126
+ export declare const Pagination: TableFeature;
127
+ //# sourceMappingURL=pagination.d.ts.map