@lobehub/ui 5.60.0 → 5.61.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 (81) hide show
  1. package/es/EmojiPicker/AvatarUploader.mjs +1 -1
  2. package/es/Form/components/FormSubmitFooter.mjs +1 -1
  3. package/es/base-ui/Input/style.d.mts +1 -1
  4. package/es/base-ui/Pagination/Pagination.mjs +158 -41
  5. package/es/base-ui/Pagination/Pagination.mjs.map +1 -1
  6. package/es/base-ui/Pagination/helpers.mjs +3 -3
  7. package/es/base-ui/Pagination/helpers.mjs.map +1 -1
  8. package/es/base-ui/Pagination/index.d.mts +2 -2
  9. package/es/base-ui/Pagination/style.mjs +39 -0
  10. package/es/base-ui/Pagination/style.mjs.map +1 -1
  11. package/es/base-ui/Pagination/type.d.mts +42 -4
  12. package/es/base-ui/QRCode/QRCode.mjs +1 -1
  13. package/es/base-ui/Table/Column.d.mts +9 -0
  14. package/es/base-ui/Table/Column.mjs +7 -0
  15. package/es/base-ui/Table/Column.mjs.map +1 -0
  16. package/es/base-ui/Table/ColumnGroup.d.mts +12 -0
  17. package/es/base-ui/Table/ColumnGroup.mjs +7 -0
  18. package/es/base-ui/Table/ColumnGroup.mjs.map +1 -0
  19. package/es/base-ui/Table/ExpandIcon.mjs +33 -0
  20. package/es/base-ui/Table/ExpandIcon.mjs.map +1 -0
  21. package/es/base-ui/Table/FilterDropdown.mjs +284 -0
  22. package/es/base-ui/Table/FilterDropdown.mjs.map +1 -0
  23. package/es/base-ui/Table/LoadingSkeleton.mjs +83 -0
  24. package/es/base-ui/Table/LoadingSkeleton.mjs.map +1 -0
  25. package/es/base-ui/Table/Table.d.mts +21 -3
  26. package/es/base-ui/Table/Table.mjs +444 -97
  27. package/es/base-ui/Table/Table.mjs.map +1 -1
  28. package/es/base-ui/Table/columnUtils.mjs +56 -0
  29. package/es/base-ui/Table/columnUtils.mjs.map +1 -0
  30. package/es/base-ui/Table/index.d.mts +4 -2
  31. package/es/base-ui/Table/selectionUtils.d.mts +9 -0
  32. package/es/base-ui/Table/selectionUtils.mjs +128 -0
  33. package/es/base-ui/Table/selectionUtils.mjs.map +1 -0
  34. package/es/base-ui/Table/semantic.mjs +55 -0
  35. package/es/base-ui/Table/semantic.mjs.map +1 -0
  36. package/es/base-ui/Table/style.mjs +801 -161
  37. package/es/base-ui/Table/style.mjs.map +1 -1
  38. package/es/base-ui/Table/type.d.mts +471 -37
  39. package/es/base-ui/Table/useBreakpoint.mjs +41 -0
  40. package/es/base-ui/Table/useBreakpoint.mjs.map +1 -0
  41. package/es/base-ui/Table/useFilter.mjs +64 -0
  42. package/es/base-ui/Table/useFilter.mjs.map +1 -0
  43. package/es/base-ui/Table/useSelection.mjs +421 -0
  44. package/es/base-ui/Table/useSelection.mjs.map +1 -0
  45. package/es/base-ui/Table/useSorter.mjs +152 -0
  46. package/es/base-ui/Table/useSorter.mjs.map +1 -0
  47. package/es/base-ui/Table/useTableState.mjs +82 -55
  48. package/es/base-ui/Table/useTableState.mjs.map +1 -1
  49. package/es/base-ui/index.d.mts +6 -4
  50. package/es/base-ui/index.mjs +9 -9
  51. package/es/chat/EditableMessageList/EditableMessageList.mjs +1 -1
  52. package/es/chat/MessageInput/MessageInput.mjs +1 -1
  53. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  54. package/es/chat/TokenTag/TokenTag.mjs +1 -1
  55. package/es/i18n/resources/en/index.d.mts +3 -2
  56. package/es/i18n/resources/en/index.mjs +4 -2
  57. package/es/i18n/resources/en/index.mjs.map +1 -1
  58. package/es/i18n/resources/en/table.d.mts +23 -0
  59. package/es/i18n/resources/en/table.mjs +24 -0
  60. package/es/i18n/resources/en/table.mjs.map +1 -0
  61. package/es/i18n/resources/zhCn/index.d.mts +3 -2
  62. package/es/i18n/resources/zhCn/index.mjs +4 -2
  63. package/es/i18n/resources/zhCn/index.mjs.map +1 -1
  64. package/es/i18n/resources/zhCn/table.d.mts +23 -0
  65. package/es/i18n/resources/zhCn/table.mjs +24 -0
  66. package/es/i18n/resources/zhCn/table.mjs.map +1 -0
  67. package/es/i18n/types.d.mts +2 -1
  68. package/es/index.mjs +2 -2
  69. package/package.json +2 -2
  70. package/es/base-ui/Table/FilterMenu.mjs +0 -45
  71. package/es/base-ui/Table/FilterMenu.mjs.map +0 -1
  72. package/es/base-ui/Table/TableBody.mjs +0 -59
  73. package/es/base-ui/Table/TableBody.mjs.map +0 -1
  74. package/es/base-ui/Table/TableHead.mjs +0 -50
  75. package/es/base-ui/Table/TableHead.mjs.map +0 -1
  76. package/es/base-ui/Table/features.mjs +0 -12
  77. package/es/base-ui/Table/features.mjs.map +0 -1
  78. package/es/base-ui/Table/fixedOffsets.mjs +0 -29
  79. package/es/base-ui/Table/fixedOffsets.mjs.map +0 -1
  80. package/es/base-ui/Table/toColumnDefs.mjs +0 -26
  81. package/es/base-ui/Table/toColumnDefs.mjs.map +0 -1
@@ -0,0 +1,152 @@
1
+ import { getColumnId, getColumnPos, isColumnGroup } from "./columnUtils.mjs";
2
+ import { useMemo } from "react";
3
+ //#region src/base-ui/Table/useSorter.ts
4
+ const DEFAULT_SORT_DIRECTIONS = ["ascend", "descend"];
5
+ /** Tooltip copy of the sort trigger (antd `TableLocale` sort fields). */
6
+ const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
7
+ const getMultiplePriority = (column) => {
8
+ const { sorter } = column;
9
+ return isPlainObject(sorter) && typeof sorter.multiple === "number" ? sorter.multiple : false;
10
+ };
11
+ const getSortFunction = (sorter) => {
12
+ if (typeof sorter === "function") return sorter;
13
+ if (isPlainObject(sorter) && typeof sorter.compare === "function") return sorter.compare;
14
+ return false;
15
+ };
16
+ /** Walks `sortDirections` and drops back to unsorted after the last one, like antd. */
17
+ const getNextSortOrder = (sortDirections, current) => {
18
+ if (!current) return sortDirections[0];
19
+ return sortDirections[sortDirections.indexOf(current) + 1];
20
+ };
21
+ /**
22
+ * Controlled `sortOrder` states (any column, groups included) or, with `init`, the
23
+ * `defaultSortOrder` states of sortable columns.
24
+ */
25
+ const collectSortStates = (columns, init, parentPos) => {
26
+ const states = [];
27
+ const push = (column, pos, sortOrder) => states.push({
28
+ column,
29
+ key: getColumnId(column, pos),
30
+ multiplePriority: getMultiplePriority(column),
31
+ sortOrder
32
+ });
33
+ columns.forEach((column, index) => {
34
+ const pos = getColumnPos(index, parentPos);
35
+ if (isColumnGroup(column)) {
36
+ if ("sortOrder" in column) push(column, pos, column.sortOrder);
37
+ states.push(...collectSortStates(column.children, init, pos));
38
+ } else if (column.sorter) {
39
+ if ("sortOrder" in column) push(column, pos, column.sortOrder);
40
+ else if (init && column.defaultSortOrder) push(column, pos, column.defaultSortOrder);
41
+ }
42
+ });
43
+ return states;
44
+ };
45
+ const collectColumnMap = (columns, map = /* @__PURE__ */ new Map(), parentPos) => {
46
+ columns.forEach((column, index) => {
47
+ const pos = getColumnPos(index, parentPos);
48
+ map.set(getColumnId(column, pos), column);
49
+ if (isColumnGroup(column)) collectColumnMap(column.children, map, pos);
50
+ });
51
+ return map;
52
+ };
53
+ /**
54
+ * The effective sort states. Controlled `sortOrder` wins over the inner state; once a
55
+ * single-column sorter is active (or a non-`multiple` sorter follows a `multiple` one) every later
56
+ * state is forced to `null`, exactly like antd.
57
+ */
58
+ const mergeSortStates = (columns, innerStates) => {
59
+ const controlled = collectSortStates(columns, false);
60
+ if (controlled.length === 0) {
61
+ const columnMap = collectColumnMap(columns);
62
+ return innerStates.filter(({ key }) => columnMap.has(key)).map((state) => ({
63
+ ...state,
64
+ column: columnMap.get(state.key)
65
+ }));
66
+ }
67
+ const result = [];
68
+ let valid = true;
69
+ let multipleMode = null;
70
+ const patch = (state) => result.push(valid ? state : {
71
+ ...state,
72
+ sortOrder: null
73
+ });
74
+ for (const state of controlled) if (multipleMode === null) {
75
+ patch(state);
76
+ if (state.sortOrder) {
77
+ if (state.multiplePriority === false) valid = false;
78
+ else multipleMode = true;
79
+ }
80
+ } else if (multipleMode && state.multiplePriority !== false) patch(state);
81
+ else {
82
+ valid = false;
83
+ patch(state);
84
+ }
85
+ return result;
86
+ };
87
+ /** A click replaces the sort, unless both it and the current sort are `multiple` sorters. */
88
+ const getTriggeredSortStates = (current, next) => {
89
+ if (next.multiplePriority === false || !current.length || current[0].multiplePriority === false) return [next];
90
+ return [...current.filter(({ key }) => key !== next.key), next];
91
+ };
92
+ const stateToInfo = ({ column, key, sortOrder }) => ({
93
+ column,
94
+ columnKey: column.key ?? key,
95
+ field: column.dataIndex,
96
+ order: sortOrder
97
+ });
98
+ /** The `sorter` argument of `onChange`: one result, or an array for several active sorters. */
99
+ const getSorterInfo = (states) => {
100
+ const active = states.filter(({ sortOrder }) => sortOrder).map((state) => stateToInfo(state));
101
+ if (active.length === 0 && states.length) return {
102
+ ...stateToInfo(states.at(-1)),
103
+ column: void 0,
104
+ columnKey: void 0,
105
+ field: void 0,
106
+ order: void 0
107
+ };
108
+ if (active.length <= 1) return active[0] ?? {};
109
+ return active;
110
+ };
111
+ /** `sortColumns` and the legacy `sortColumn` / `sortOrder` passed to function titles. */
112
+ const getSortTitleProps = (states) => {
113
+ const sortColumns = states.map(({ column, sortOrder }) => ({
114
+ column,
115
+ order: sortOrder
116
+ }));
117
+ return {
118
+ sortColumn: sortColumns[0]?.column,
119
+ sortColumns,
120
+ sortOrder: sortColumns[0]?.order
121
+ };
122
+ };
123
+ /**
124
+ * Returns a sorted copy. Comparators run by descending `multiple` priority; `sorter: true` leaves
125
+ * the order to the server. Tree children (`childrenColumnName`) are sorted recursively.
126
+ */
127
+ const sortData = (data, states, childrenColumnName = "children") => {
128
+ const running = states.filter(({ column, sortOrder }) => getSortFunction(column.sorter) && sortOrder).sort((a, b) => b.multiplePriority - a.multiplePriority);
129
+ if (running.length === 0) return [...data];
130
+ return [...data].sort((a, b) => {
131
+ for (const { column, sortOrder } of running) {
132
+ const result = getSortFunction(column.sorter)(a, b, sortOrder);
133
+ if (result !== 0) return sortOrder === "ascend" ? result : -result;
134
+ }
135
+ return 0;
136
+ }).map((record) => {
137
+ const children = record[childrenColumnName];
138
+ return Array.isArray(children) ? {
139
+ ...record,
140
+ [childrenColumnName]: sortData(children, states, childrenColumnName)
141
+ } : record;
142
+ });
143
+ };
144
+ const useSorter = ({ childrenColumnName, data, sortStates }) => useMemo(() => sortData(data, sortStates, childrenColumnName), [
145
+ data,
146
+ sortStates,
147
+ childrenColumnName
148
+ ]);
149
+ //#endregion
150
+ export { DEFAULT_SORT_DIRECTIONS, collectSortStates, getMultiplePriority, getNextSortOrder, getSortFunction, getSortTitleProps, getSorterInfo, getTriggeredSortStates, mergeSortStates, sortData, useSorter };
151
+
152
+ //# sourceMappingURL=useSorter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSorter.mjs","names":[],"sources":["../../../src/base-ui/Table/useSorter.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { getColumnId, getColumnPos, isColumnGroup } from './columnUtils';\nimport type {\n SortOrder,\n TableColumn,\n TableColumnTitleProps,\n TableColumnType,\n TableCompareFn,\n TableSorterResult,\n} from './type';\n\n/** One sorted (or explicitly unsorted) column; mirrors antd `SortState`. */\nexport interface SortState<T = any> {\n column: TableColumn<T>;\n /** Column id (`key`, then `dataIndex`, then position). */\n key: string;\n /** `sorter.multiple`, or `false` for a single-column sorter. */\n multiplePriority: number | false;\n sortOrder: SortOrder | undefined;\n}\n\nexport const DEFAULT_SORT_DIRECTIONS: SortOrder[] = ['ascend', 'descend'];\n\n/** Tooltip copy of the sort trigger (antd `TableLocale` sort fields). */\nconst isPlainObject = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\nexport const getMultiplePriority = (column: TableColumn<any>): number | false => {\n const { sorter } = column;\n return isPlainObject(sorter) && typeof sorter.multiple === 'number' ? sorter.multiple : false;\n};\n\nexport const getSortFunction = <T>(sorter: TableColumn<T>['sorter']): TableCompareFn<T> | false => {\n if (typeof sorter === 'function') return sorter;\n if (isPlainObject(sorter) && typeof sorter.compare === 'function') return sorter.compare;\n return false;\n};\n\n/** Walks `sortDirections` and drops back to unsorted after the last one, like antd. */\nexport const getNextSortOrder = (\n sortDirections: readonly SortOrder[],\n current: SortOrder | undefined,\n): SortOrder | undefined => {\n if (!current) return sortDirections[0];\n return sortDirections[sortDirections.indexOf(current) + 1];\n};\n\n/**\n * Controlled `sortOrder` states (any column, groups included) or, with `init`, the\n * `defaultSortOrder` states of sortable columns.\n */\nexport const collectSortStates = <T>(\n columns: readonly TableColumn<T>[],\n init: boolean,\n parentPos?: string,\n): SortState<T>[] => {\n const states: SortState<T>[] = [];\n const push = (column: TableColumn<T>, pos: string, sortOrder: SortOrder | undefined) =>\n states.push({\n column,\n key: getColumnId(column, pos),\n multiplePriority: getMultiplePriority(column),\n sortOrder,\n });\n\n columns.forEach((column, index) => {\n const pos = getColumnPos(index, parentPos);\n if (isColumnGroup(column)) {\n if ('sortOrder' in column) push(column, pos, column.sortOrder);\n states.push(...collectSortStates(column.children, init, pos));\n } else if (column.sorter) {\n if ('sortOrder' in column) push(column, pos, column.sortOrder);\n else if (init && column.defaultSortOrder) push(column, pos, column.defaultSortOrder);\n }\n });\n return states;\n};\n\nconst collectColumnMap = <T>(\n columns: readonly TableColumn<T>[],\n map = new Map<string, TableColumn<T>>(),\n parentPos?: string,\n) => {\n columns.forEach((column, index) => {\n const pos = getColumnPos(index, parentPos);\n map.set(getColumnId(column, pos), column);\n if (isColumnGroup(column)) collectColumnMap(column.children, map, pos);\n });\n return map;\n};\n\n/**\n * The effective sort states. Controlled `sortOrder` wins over the inner state; once a\n * single-column sorter is active (or a non-`multiple` sorter follows a `multiple` one) every later\n * state is forced to `null`, exactly like antd.\n */\nexport const mergeSortStates = <T>(\n columns: readonly TableColumn<T>[],\n innerStates: readonly SortState<T>[],\n): SortState<T>[] => {\n const controlled = collectSortStates(columns, false);\n\n if (controlled.length === 0) {\n // Drop states of removed columns and pick up the latest column objects (fresh comparators).\n const columnMap = collectColumnMap(columns);\n return innerStates\n .filter(({ key }) => columnMap.has(key))\n .map((state) => ({ ...state, column: columnMap.get(state.key)! }));\n }\n\n const result: SortState<T>[] = [];\n let valid = true;\n let multipleMode: boolean | null = null;\n const patch = (state: SortState<T>) => result.push(valid ? state : { ...state, sortOrder: null });\n\n for (const state of controlled) {\n if (multipleMode === null) {\n patch(state);\n if (state.sortOrder) {\n if (state.multiplePriority === false) valid = false;\n else multipleMode = true;\n }\n } else if (multipleMode && state.multiplePriority !== false) {\n patch(state);\n } else {\n valid = false;\n patch(state);\n }\n }\n return result;\n};\n\n/** A click replaces the sort, unless both it and the current sort are `multiple` sorters. */\nexport const getTriggeredSortStates = <T>(\n current: readonly SortState<T>[],\n next: SortState<T>,\n): SortState<T>[] => {\n if (next.multiplePriority === false || !current.length || current[0].multiplePriority === false) {\n return [next];\n }\n return [...current.filter(({ key }) => key !== next.key), next];\n};\n\nconst stateToInfo = <T>({ column, key, sortOrder }: SortState<T>): TableSorterResult<T> => ({\n column,\n // antd reports `column.key`; the id fallback keeps dataIndex-only columns identifiable.\n columnKey: column.key ?? key,\n field: (column as TableColumnType<T>).dataIndex as TableSorterResult<T>['field'],\n order: sortOrder,\n});\n\n/** The `sorter` argument of `onChange`: one result, or an array for several active sorters. */\nexport const getSorterInfo = <T>(\n states: readonly SortState<T>[],\n): TableSorterResult<T> | TableSorterResult<T>[] => {\n const active = states.filter(({ sortOrder }) => sortOrder).map((state) => stateToInfo(state));\n\n // antd keeps the last cleared column's other fields when nothing is sorted.\n if (active.length === 0 && states.length) {\n return {\n ...stateToInfo(states.at(-1)!),\n column: undefined,\n columnKey: undefined,\n field: undefined,\n order: undefined,\n };\n }\n if (active.length <= 1) return active[0] ?? {};\n return active;\n};\n\n/** `sortColumns` and the legacy `sortColumn` / `sortOrder` passed to function titles. */\nexport const getSortTitleProps = <T>(\n states: readonly SortState<T>[],\n): Pick<TableColumnTitleProps<T>, 'sortColumn' | 'sortColumns' | 'sortOrder'> => {\n const sortColumns = states.map(({ column, sortOrder }) => ({ column, order: sortOrder }));\n return {\n sortColumn: sortColumns[0]?.column,\n sortColumns,\n sortOrder: sortColumns[0]?.order,\n };\n};\n\n/**\n * Returns a sorted copy. Comparators run by descending `multiple` priority; `sorter: true` leaves\n * the order to the server. Tree children (`childrenColumnName`) are sorted recursively.\n */\nexport const sortData = <T>(\n data: readonly T[],\n states: readonly SortState<T>[],\n childrenColumnName = 'children',\n): T[] => {\n const running = states\n .filter(({ column, sortOrder }) => getSortFunction(column.sorter) && sortOrder)\n .sort((a, b) => (b.multiplePriority as number) - (a.multiplePriority as number));\n if (running.length === 0) return [...data];\n\n return [...data]\n .sort((a, b) => {\n for (const { column, sortOrder } of running) {\n const result = (getSortFunction(column.sorter) as TableCompareFn<T>)(a, b, sortOrder);\n if (result !== 0) return sortOrder === 'ascend' ? result : -result;\n }\n return 0;\n })\n .map((record) => {\n const children = (record as Record<string, unknown>)[childrenColumnName];\n return Array.isArray(children)\n ? { ...record, [childrenColumnName]: sortData(children as T[], states, childrenColumnName) }\n : record;\n });\n};\n\nexport const useSorter = <T>({\n childrenColumnName,\n data,\n sortStates,\n}: {\n childrenColumnName?: string;\n data: readonly T[];\n sortStates: readonly SortState<T>[];\n}) =>\n useMemo(\n () => sortData(data, sortStates, childrenColumnName),\n [data, sortStates, childrenColumnName],\n );\n"],"mappings":";;;AAsBA,MAAa,0BAAuC,CAAC,UAAU,SAAS;;AAGxE,MAAM,iBAAiB,UACrB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAErE,MAAa,uBAAuB,WAA6C;CAC/E,MAAM,EAAE,WAAW;CACnB,OAAO,cAAc,MAAM,KAAK,OAAO,OAAO,aAAa,WAAW,OAAO,WAAW;AAC1F;AAEA,MAAa,mBAAsB,WAAgE;CACjG,IAAI,OAAO,WAAW,YAAY,OAAO;CACzC,IAAI,cAAc,MAAM,KAAK,OAAO,OAAO,YAAY,YAAY,OAAO,OAAO;CACjF,OAAO;AACT;;AAGA,MAAa,o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AQ,OAAO;CAAU,EAAE;CACxF,OAAO;EACL,YAAY,YAAY,EAAE,EAAE;EAC5B;EACA,WAAW,YAAY,EAAE,EAAE;CAC7B;AACF;;;;;AAMA,MAAa,YACX,MACA,QACA,qBAAqB,eACb;CACR,MAAM,UAAU,OACb,QAAQ,EAAE,QAAQ,gBAAgB,gBAAgB,OAAO,MAAM,KAAK,SAAS,CAAC,CAC9E,MAAM,GAAG,MAAO,EAAE,mBAA+B,EAAE,gBAA2B;CACjF,IAAI,QAAQ,WAAW,GAAG,OAAO,CAAC,GAAG,IAAI;CAEzC,OAAO,CAAC,GAAG,IAAI,CAAC,CACb,MAAM,GAAG,MAAM;EACd,KAAK,MAAM,EAAE,QAAQ,eAAe,SAAS;GAC3C,MAAM,SAAU,gBAAgB,OAAO,MAAM,CAAC,CAAuB,GAAG,GAAG,SAAS;GACpF,IAAI,WAAW,GAAG,OAAO,cAAc,WAAW,SAAS,CAAC;EAC9D;EACA,OAAO;CACT,CAAC,CAAC,CACD,KAAK,WAAW;EACf,MAAM,WAAY,OAAmC;EACrD,OAAO,MAAM,QAAQ,QAAQ,IACzB;GAAE,GAAG;IAAS,qBAAqB,SAAS,UAAiB,QAAQ,kBAAkB;EAAE,IACzF;CACN,CAAC;AACL;AAEA,MAAa,aAAgB,EAC3B,oBACA,MACA,iBAMA,cACQ,SAAS,MAAM,YAAY,kBAAkB,GACnD;CAAC;CAAM;CAAY;AAAkB,CACvC"}
@@ -1,44 +1,60 @@
1
- import { getColumnId } from "./toColumnDefs.mjs";
2
- import { useState } from "react";
3
- //#region src/base-ui/Table/useTableState.ts
4
- const resolve = (updater, previous) => typeof updater === "function" ? updater(previous) : updater;
5
- const initialSorting = (columns) => {
6
- const index = columns.findIndex((column) => column.defaultSortOrder);
7
- if (index === -1) return [];
8
- return [{
9
- desc: columns[index].defaultSortOrder === "descend",
10
- id: getColumnId(columns[index], index)
11
- }];
12
- };
13
- const useTableState = ({ columns, onChange, pagination }) => {
1
+ import { collectFilterStates, filterData, getFilterInfo, mergeFilterStates, useFilter } from "./useFilter.mjs";
2
+ import { collectSortStates, getSortTitleProps, getSorterInfo, getTriggeredSortStates, mergeSortStates, sortData, useSorter } from "./useSorter.mjs";
3
+ import { useMemo, useState } from "react";
4
+ const useTableState = ({ childrenColumnName, columns, dataSource, onChange, onTableChange, pagination }) => {
14
5
  const config = pagination === false ? void 0 : pagination ?? {};
15
- const columnIds = columns.map((column, index) => getColumnId(column, index));
16
- const [sorting, setSorting] = useState(() => initialSorting(columns));
17
- const [columnFilters, setColumnFilters] = useState([]);
6
+ const [innerSortStates, setInnerSortStates] = useState(() => collectSortStates(columns, true));
7
+ const sortStates = useMemo(() => mergeSortStates(columns, innerSortStates), [columns, innerSortStates]);
8
+ const [innerFilterKeys, setInnerFilterKeys] = useState(() => Object.fromEntries(collectFilterStates(columns, true).map(({ filteredKeys, key }) => [key, filteredKeys])));
9
+ const filterStates = useMemo(() => mergeFilterStates(columns, innerFilterKeys), [columns, innerFilterKeys]);
10
+ const filters = useMemo(() => getFilterInfo(filterStates), [filterStates]);
11
+ const filtered = useFilter({
12
+ childrenColumnName,
13
+ data: dataSource,
14
+ states: filterStates
15
+ });
16
+ /** Filtered and sorted records of every page (antd `mergedData`). */
17
+ const data = useSorter({
18
+ childrenColumnName,
19
+ data: filtered,
20
+ sortStates
21
+ });
22
+ const getCurrentDataSource = (nextFilterStates, nextSortStates) => sortData(filterData(dataSource, nextFilterStates, childrenColumnName), nextSortStates, childrenColumnName);
18
23
  const [innerPage, setInnerPage] = useState({
19
24
  pageIndex: (config?.defaultCurrent ?? 1) - 1,
20
25
  pageSize: config?.defaultPageSize ?? 10
21
26
  });
27
+ const pageSize = config?.pageSize ?? innerPage.pageSize;
28
+ const total = config?.total && config.total > 0 ? config.total : data.length;
29
+ const pageCount = Math.max(1, Math.ceil(total / pageSize));
30
+ const rawPageIndex = config?.current === void 0 ? innerPage.pageIndex : config.current - 1;
22
31
  const page = {
23
- pageIndex: config?.current === void 0 ? innerPage.pageIndex : config.current - 1,
24
- pageSize: config?.pageSize ?? innerPage.pageSize
32
+ pageIndex: Math.min(rawPageIndex, pageCount - 1),
33
+ pageSize
25
34
  };
26
- const toFilters = (state) => Object.fromEntries(columns.map((column, index) => [column, columnIds[index]]).filter(([column]) => column.filters?.length).map(([, id]) => [id, state.find((filter) => filter.id === id)?.value ?? null]));
27
- const toSorter = (state) => {
28
- const [active] = state;
29
- if (!active) return {};
30
- return {
31
- column: columns[columnIds.indexOf(active.id)],
32
- columnKey: active.id,
33
- order: active.desc ? "descend" : "ascend"
35
+ /** The `pagination` argument of `onChange` (antd `getPaginationParam`): no callbacks. */
36
+ const toPaginationArg = (next) => {
37
+ if (!config) return {};
38
+ const merged = {
39
+ ...config,
40
+ current: next.pageIndex + 1,
41
+ pageSize: next.pageSize,
42
+ total
34
43
  };
44
+ const arg = {
45
+ current: merged.current,
46
+ pageSize: merged.pageSize
47
+ };
48
+ for (const key of Object.keys(config)) if (typeof merged[key] !== "function") arg[key] = merged[key];
49
+ return arg;
50
+ };
51
+ const report = (action, nextPage, nextFilterStates, nextSortStates) => {
52
+ onTableChange?.();
53
+ onChange?.(toPaginationArg(nextPage), getFilterInfo(nextFilterStates), getSorterInfo(nextSortStates), {
54
+ action,
55
+ currentDataSource: getCurrentDataSource(nextFilterStates, nextSortStates)
56
+ });
35
57
  };
36
- const toPaginationArg = (next) => config ? {
37
- ...config,
38
- current: next.pageIndex + 1,
39
- pageSize: next.pageSize
40
- } : {};
41
- const report = (nextPage, nextFilters, nextSorting) => onChange?.(toPaginationArg(nextPage), toFilters(nextFilters), toSorter(nextSorting));
42
58
  const changePage = (next) => {
43
59
  setInnerPage(next);
44
60
  const sizeChanged = next.pageSize !== page.pageSize;
@@ -55,42 +71,53 @@ const useTableState = ({ columns, onChange, pagination }) => {
55
71
  }
56
72
  config.onChange?.(pageIndex + 1, page.pageSize);
57
73
  };
58
- const onSortingChange = (updater) => {
59
- const next = resolve(updater, sorting);
60
- const firstPage = {
61
- ...page,
62
- pageIndex: 0
63
- };
64
- setSorting(next);
65
- changePage(firstPage);
66
- report(firstPage, columnFilters, next);
74
+ /** Applies a header click (antd `triggerSorter`); like antd, the current page is kept. */
75
+ const triggerSort = (next) => {
76
+ const nextStates = getTriggeredSortStates(sortStates, next);
77
+ setInnerSortStates(nextStates);
78
+ report("sort", page, filterStates, nextStates);
67
79
  };
68
- const onColumnFiltersChange = (updater) => {
69
- const next = resolve(updater, columnFilters);
80
+ /**
81
+ * Applies a column's filter (antd `triggerFilter`); like antd, it returns to the first page and
82
+ * always tells `pagination.onChange`.
83
+ */
84
+ const triggerFilter = (columnKey, filteredKeys) => {
85
+ const nextStates = filterStates.map((item) => item.key === columnKey ? {
86
+ ...item,
87
+ filteredKeys
88
+ } : item);
70
89
  const firstPage = {
71
90
  ...page,
72
91
  pageIndex: 0
73
92
  };
74
- setColumnFilters(next);
75
- changePage(firstPage);
76
- report(firstPage, next, sorting);
93
+ setInnerFilterKeys(Object.fromEntries(nextStates.map(({ filteredKeys, key }) => [key, filteredKeys])));
94
+ setInnerPage(firstPage);
95
+ if (pagination) pagination.onChange?.(1, firstPage.pageSize);
96
+ report("filter", firstPage, nextStates, sortStates);
77
97
  };
78
- const onPaginationChange = (updater) => {
79
- const next = resolve(updater, page);
98
+ /** Argument of function column titles (antd `ColumnTitleProps`). */
99
+ const titleProps = useMemo(() => ({
100
+ filters,
101
+ ...getSortTitleProps(sortStates)
102
+ }), [filters, sortStates]);
103
+ const onPaginationChange = (next) => {
80
104
  changePage(next);
81
- report(next, columnFilters, sorting);
105
+ report("paginate", next, filterStates, sortStates);
82
106
  };
83
107
  return {
84
108
  clampPage,
85
- columnFilters,
86
- columnIds,
87
109
  config,
88
- manualSorting: columns.some((column) => column.sorter === true),
89
- onColumnFiltersChange,
110
+ data,
111
+ filterStates,
112
+ filters,
90
113
  onPaginationChange,
91
- onSortingChange,
92
114
  page,
93
- sorting
115
+ rawPageIndex,
116
+ sortStates,
117
+ titleProps,
118
+ total,
119
+ triggerFilter,
120
+ triggerSort
94
121
  };
95
122
  };
96
123
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useTableState.mjs","names":[],"sources":["../../../src/base-ui/Table/useTableState.ts"],"sourcesContent":["import type {\n ColumnFiltersState,\n PaginationState,\n SortingState,\n Updater,\n} from '@tanstack/react-table';\nimport { useState } from 'react';\n\nimport { getColumnId } from './toColumnDefs';\nimport type {\n TableColumn,\n TableFilters,\n TablePaginationConfig,\n TableProps,\n TableSorterResult,\n} from './type';\n\nconst resolve = <S>(updater: Updater<S>, previous: S): S =>\n typeof updater === 'function' ? (updater as (old: S) => S)(previous) : updater;\n\nconst initialSorting = (columns: TableColumn<any>[]): SortingState => {\n const index = columns.findIndex((column) => column.defaultSortOrder);\n if (index === -1) return [];\n return [\n { desc: columns[index].defaultSortOrder === 'descend', id: getColumnId(columns[index], index) },\n ];\n};\n\nexport const useTableState = <T>({\n columns,\n onChange,\n pagination,\n}: Pick<TableProps<T>, 'columns' | 'onChange' | 'pagination'>) => {\n const config: TablePaginationConfig | undefined =\n pagination === false ? undefined : (pagination ?? {});\n const columnIds = columns.map((column, index) => getColumnId(column, index));\n\n const [sorting, setSorting] = useState<SortingState>(() => initialSorting(columns));\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n const [innerPage, setInnerPage] = useState<PaginationState>({\n pageIndex: (config?.defaultCurrent ?? 1) - 1,\n pageSize: config?.defaultPageSize ?? 10,\n });\n\n const page: PaginationState = {\n pageIndex: config?.current === undefined ? innerPage.pageIndex : config.current - 1,\n pageSize: config?.pageSize ?? innerPage.pageSize,\n };\n\n const toFilters = (state: ColumnFiltersState): TableFilters =>\n Object.fromEntries(\n columns\n .map((column, index) => [column, columnIds[index]] as const)\n .filter(([column]) => column.filters?.length)\n .map(([, id]) => [\n id,\n (state.find((filter) => filter.id === id)?.value as TableFilters[string]) ?? null,\n ]),\n );\n\n const toSorter = (state: SortingState): TableSorterResult<T> => {\n const [active] = state;\n if (!active) return {};\n const index = columnIds.indexOf(active.id);\n return {\n column: columns[index],\n columnKey: active.id,\n order: active.desc ? 'descend' : 'ascend',\n };\n };\n\n const toPaginationArg = (next: PaginationState): TablePaginationConfig =>\n config ? { ...config, current: next.pageIndex + 1, pageSize: next.pageSize } : {};\n\n const report = (\n nextPage: PaginationState,\n nextFilters: ColumnFiltersState,\n nextSorting: SortingState,\n ) => onChange?.(toPaginationArg(nextPage), toFilters(nextFilters), toSorter(nextSorting));\n\n const changePage = (next: PaginationState) => {\n setInnerPage(next);\n const sizeChanged = next.pageSize !== page.pageSize;\n if (sizeChanged) config?.onShowSizeChange?.(next.pageIndex + 1, next.pageSize);\n if (sizeChanged || next.pageIndex !== page.pageIndex) {\n config?.onChange?.(next.pageIndex + 1, next.pageSize);\n }\n };\n\n const clampPage = (pageIndex: number) => {\n if (config?.current === undefined) {\n setInnerPage((previous) => ({ ...previous, pageIndex }));\n return;\n }\n config.onChange?.(pageIndex + 1, page.pageSize);\n };\n\n const onSortingChange = (updater: Updater<SortingState>) => {\n const next = resolve(updater, sorting);\n const firstPage = { ...page, pageIndex: 0 };\n setSorting(next);\n changePage(firstPage);\n report(firstPage, columnFilters, next);\n };\n\n const onColumnFiltersChange = (updater: Updater<ColumnFiltersState>) => {\n const next = resolve(updater, columnFilters);\n const firstPage = { ...page, pageIndex: 0 };\n setColumnFilters(next);\n changePage(firstPage);\n report(firstPage, next, sorting);\n };\n\n const onPaginationChange = (updater: Updater<PaginationState>) => {\n const next = resolve(updater, page);\n changePage(next);\n report(next, columnFilters, sorting);\n };\n\n return {\n clampPage,\n columnFilters,\n columnIds,\n config,\n manualSorting: columns.some((column) => column.sorter === true),\n onColumnFiltersChange,\n onPaginationChange,\n onSortingChange,\n page,\n sorting,\n };\n};\n"],"mappings":";;;AAiBA,MAAM,WAAc,SAAqB,aACvC,OAAO,YAAY,aAAc,QAA0B,QAAQ,IAAI;AAEzE,MAAM,kBAAkB,YAA8C;CACpE,MAAM,QAAQ,Q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AU,KAAK;CAAS,IAAI,CAAC;CAElF,MAAM,UACJ,UACA,aACA,gBACG,WAAW,gBAAgB,QAAQ,GAAG,UAAU,WAAW,GAAG,SAAS,WAAW,CAAC;CAExF,MAAM,cAAc,SAA0B;EAC5C,aAAa,IAAI;EACjB,MAAM,cAAc,KAAK,aAAa,KAAK;EAC3C,IAAI,aAAa,QAAQ,mBAAmB,KAAK,YAAY,GAAG,KAAK,QAAQ;EAC7E,IAAI,eAAe,KAAK,cAAc,KAAK,WACzC,QAAQ,WAAW,KAAK,YAAY,GAAG,KAAK,QAAQ;CAExD;CAEA,MAAM,aAAa,cAAsB;EACvC,IAAI,QAAQ,YAAY,KAAA,GAAW;GACjC,cAAc,cAAc;IAAE,GAAG;IAAU;GAAU,EAAE;GACvD;EACF;EACA,OAAO,WAAW,YAAY,GAAG,KAAK,QAAQ;CAChD;CAEA,MAAM,mBAAmB,YAAmC;EAC1D,MAAM,OAAO,QAAQ,SAAS,OAAO;EACrC,MAAM,YAAY;GAAE,GAAG;GAAM,WAAW;EAAE;EAC1C,WAAW,IAAI;EACf,WAAW,SAAS;EACpB,OAAO,WAAW,eAAe,IAAI;CACvC;CAEA,MAAM,yBAAyB,YAAyC;EACtE,MAAM,OAAO,QAAQ,SAAS,aAAa;EAC3C,MAAM,YAAY;GAAE,GAAG;GAAM,WAAW;EAAE;EAC1C,iBAAiB,IAAI;EACrB,WAAW,SAAS;EACpB,OAAO,WAAW,MAAM,OAAO;CACjC;CAEA,MAAM,sBAAsB,YAAsC;EAChE,MAAM,OAAO,QAAQ,SAAS,IAAI;EAClC,WAAW,IAAI;EACf,OAAO,MAAM,eAAe,OAAO;CACrC;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA,eAAe,QAAQ,MAAM,WAAW,OAAO,WAAW,IAAI;EAC9D;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useTableState.mjs","names":[],"sources":["../../../src/base-ui/Table/useTableState.ts"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport type {\n TableColumn,\n TableColumnTitleProps,\n TableCurrentDataSource,\n TablePaginationConfig,\n TableProps,\n} from './type';\nimport {\n collectFilterStates,\n filterData,\n type FilterKeys,\n type FiltersState,\n type FilterState,\n getFilterInfo,\n mergeFilterStates,\n useFilter,\n} from './useFilter';\nimport {\n collectSortStates,\n getSorterInfo,\n getSortTitleProps,\n getTriggeredSortStates,\n mergeSortStates,\n sortData,\n type SortState,\n useSorter,\n} from './useSorter';\n\nexport interface PaginationState {\n pageIndex: number;\n pageSize: number;\n}\n\nexport const DEFAULT_PAGE_SIZE = 10;\n\ntype ChangeAction = TableCurrentDataSource<unknown>['action'];\n\nexport const useTableState = <T>({\n childrenColumnName,\n columns,\n dataSource,\n onChange,\n onTableChange,\n pagination,\n}: Pick<TableProps<T>, 'onChange' | 'pagination'> & {\n childrenColumnName?: string;\n columns: readonly TableColumn<T>[];\n dataSource: readonly T[];\n /** Runs before `onChange` on every paginate / sort / filter (scroll back to the first row). */\n onTableChange?: () => void;\n}) => {\n const config: TablePaginationConfig | undefined =\n pagination === false ? undefined : (pagination ?? {});\n\n const [innerSortStates, setInnerSortStates] = useState<SortState<T>[]>(() =>\n collectSortStates(columns, true),\n );\n const sortStates = useMemo(\n () => mergeSortStates(columns, innerSortStates),\n [columns, innerSortStates],\n );\n const [innerFilterKeys, setInnerFilterKeys] = useState<FiltersState>(() =>\n Object.fromEntries(\n collectFilterStates(columns, true).map(({ filteredKeys, key }) => [key, filteredKeys]),\n ),\n );\n const filterStates = useMemo(\n () => mergeFilterStates(columns, innerFilterKeys),\n [columns, innerFilterKeys],\n );\n const filters = useMemo(() => getFilterInfo(filterStates), [filterStates]);\n\n // ============================== Data ==============================\n const filtered = useFilter({ childrenColumnName, data: dataSource, states: filterStates });\n /** Filtered and sorted records of every page (antd `mergedData`). */\n const data = useSorter({ childrenColumnName, data: filtered, sortStates });\n const getCurrentDataSource = (\n nextFilterStates: readonly FilterState<T>[],\n nextSortStates: readonly SortState<T>[],\n ) =>\n sortData(\n filterData(dataSource, nextFilterStates, childrenColumnName),\n nextSortStates,\n childrenColumnName,\n );\n\n // =========================== Pagination ===========================\n const [innerPage, setInnerPage] = useState<PaginationState>({\n pageIndex: (config?.defaultCurrent ?? 1) - 1,\n pageSize: config?.defaultPageSize ?? DEFAULT_PAGE_SIZE,\n });\n\n const pageSize = config?.pageSize ?? innerPage.pageSize;\n // Like antd: a positive `pagination.total` wins over the local data length.\n const total = config?.total && config.total > 0 ? config.total : data.length;\n const pageCount = Math.max(1, Math.ceil(total / pageSize));\n const rawPageIndex = config?.current === undefined ? innerPage.pageIndex : config.current - 1;\n const page: PaginationState = { pageIndex: Math.min(rawPageIndex, pageCount - 1), pageSize };\n\n /** The `pagination` argument of `onChange` (antd `getPaginationParam`): no callbacks. */\n const toPaginationArg = (next: PaginationState): TablePaginationConfig => {\n if (!config) return {};\n const merged: Record<string, unknown> = {\n ...config,\n current: next.pageIndex + 1,\n pageSize: next.pageSize,\n total,\n };\n const arg: Record<string, unknown> = { current: merged.current, pageSize: merged.pageSize };\n for (const key of Object.keys(config)) {\n if (typeof merged[key] !== 'function') arg[key] = merged[key];\n }\n return arg as TablePaginationConfig;\n };\n\n const report = (\n action: ChangeAction,\n nextPage: PaginationState,\n nextFilterStates: readonly FilterState<T>[],\n nextSortStates: readonly SortState<T>[],\n ) => {\n onTableChange?.();\n onChange?.(\n toPaginationArg(nextPage),\n getFilterInfo(nextFilterStates),\n getSorterInfo(nextSortStates),\n { action, currentDataSource: getCurrentDataSource(nextFilterStates, nextSortStates) },\n );\n };\n\n const changePage = (next: PaginationState) => {\n setInnerPage(next);\n const sizeChanged = next.pageSize !== page.pageSize;\n if (sizeChanged) config?.onShowSizeChange?.(next.pageIndex + 1, next.pageSize);\n if (sizeChanged || next.pageIndex !== page.pageIndex) {\n config?.onChange?.(next.pageIndex + 1, next.pageSize);\n }\n };\n\n const clampPage = (pageIndex: number) => {\n if (config?.current === undefined) {\n setInnerPage((previous) => ({ ...previous, pageIndex }));\n return;\n }\n config.onChange?.(pageIndex + 1, page.pageSize);\n };\n\n /** Applies a header click (antd `triggerSorter`); like antd, the current page is kept. */\n const triggerSort = (next: SortState<T>) => {\n const nextStates = getTriggeredSortStates(sortStates, next);\n setInnerSortStates(nextStates);\n report('sort', page, filterStates, nextStates);\n };\n\n /**\n * Applies a column's filter (antd `triggerFilter`); like antd, it returns to the first page and\n * always tells `pagination.onChange`.\n */\n const triggerFilter = (columnKey: string, filteredKeys: FilterKeys) => {\n const nextStates = filterStates.map((item) =>\n item.key === columnKey ? { ...item, filteredKeys } : item,\n );\n const firstPage = { ...page, pageIndex: 0 };\n setInnerFilterKeys(\n Object.fromEntries(nextStates.map(({ filteredKeys, key }) => [key, filteredKeys])),\n );\n setInnerPage(firstPage);\n if (pagination) pagination.onChange?.(1, firstPage.pageSize);\n report('filter', firstPage, nextStates, sortStates);\n };\n\n /** Argument of function column titles (antd `ColumnTitleProps`). */\n const titleProps = useMemo(\n (): TableColumnTitleProps<T> => ({\n filters,\n ...getSortTitleProps(sortStates),\n }),\n [filters, sortStates],\n );\n\n const onPaginationChange = (next: PaginationState) => {\n changePage(next);\n report('paginate', next, filterStates, sortStates);\n };\n\n return {\n clampPage,\n config,\n data,\n filterStates,\n filters,\n onPaginationChange,\n page,\n rawPageIndex,\n sortStates,\n titleProps,\n total,\n triggerFilter,\n triggerSort,\n };\n};\n"],"mappings":";;;AAuCA,MAAa,iBAAoB,EAC/B,oBACA,SACA,YACA,UACA,eACA,iBAOI;CACJ,MAAM,SACJ,eAAe,QAAQ,KAAA,IAAa,cAAc,CAAC;CAErD,MAAM,CAAC,iBAAiB,sBAAsB,eAC5C,kBAAkB,SAAS,IAAI,CACjC;CACA,MAAM,aAAa,cACX,gBAAgB,SAAS,eAAe,GAC9C,CAAC,SAAS,eAAe,CAC3B;CACA,MAAM,CAAC,iBAAiB,sBAAsB,eAC5C,OAAO,YACL,oBAAoB,SAAS,IAAI,CAAC,CAAC,KAAK,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O;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -44,7 +44,8 @@ import "./Popover/index.mjs";
44
44
  import { BadgeProps, BadgeSize, BadgeStatus } from "./Badge/type.mjs";
45
45
  import Badge from "./Badge/Badge.mjs";
46
46
  import "./Badge/index.mjs";
47
- import { PaginationProps, PaginationSize } from "./Pagination/type.mjs";
47
+ import { SelectBehaviorVariant, SelectClassNames, SelectIndicatorVariant, SelectOption, SelectOptionGroup, SelectOptions, SelectProps, SelectRootChangeEventDetails, SelectSize, SelectVariant } from "./Select/type.mjs";
48
+ import { PaginationAlign, PaginationItemType, PaginationProps, PaginationSemanticName, PaginationSize, PaginationSizeChangerProps } from "./Pagination/type.mjs";
48
49
  import Pagination from "./Pagination/Pagination.mjs";
49
50
  import "./Pagination/index.mjs";
50
51
  import { ProgressProps, ProgressSize, ProgressStatus, ProgressType, ProgressVariant } from "./Progress/type.mjs";
@@ -186,7 +187,6 @@ import { SegmentedClassNames, SegmentedOption, SegmentedOptions, SegmentedOrient
186
187
  import { SegmentedIndicator, SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedItemProps, SegmentedRoot, SegmentedRootProps } from "./Segmented/atoms.mjs";
187
188
  import Segmented from "./Segmented/Segmented.mjs";
188
189
  import "./Segmented/index.mjs";
189
- import { SelectBehaviorVariant, SelectClassNames, SelectIndicatorVariant, SelectOption, SelectOptionGroup, SelectOptions, SelectProps, SelectRootChangeEventDetails, SelectSize, SelectVariant } from "./Select/type.mjs";
190
190
  import { SelectArrow, SelectArrowProps, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectGroupLabelProps, SelectGroupProps, SelectIcon, SelectIconProps, SelectItem, SelectItemIndicator, SelectItemIndicatorProps, SelectItemProps, SelectItemText, SelectItemTextProps, SelectList, SelectListProps, SelectPopup, SelectPopupProps, SelectPortal, SelectPortalProps, SelectPositioner, SelectPositionerProps, SelectRoot, SelectScrollDownArrow, SelectScrollDownArrowProps, SelectScrollUpArrow, SelectScrollUpArrowProps, SelectSeparator, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps } from "./Select/atoms.mjs";
191
191
  import Select from "./Select/Select.mjs";
192
192
  import "./Select/index.mjs";
@@ -211,7 +211,9 @@ import { styles as styles$10 } from "./Switch/style.mjs";
211
211
  import { SwitchIcon, SwitchRoot, SwitchThumb, useSwitchContext } from "./Switch/atoms.mjs";
212
212
  import Switch from "./Switch/Switch.mjs";
213
213
  import "./Switch/index.mjs";
214
- import { FilterValue, SortOrder, TableColumn, TableFilters, TablePaginationConfig, TableProps, TableSemanticName, TableSorterResult } from "./Table/type.mjs";
214
+ import { FilterValue, SortOrder, TableBreakpoint, TableCellAttributes, TableClassNames, TableColumn, TableColumnEllipsis, TableColumnFilterItem, TableColumnFixed, TableColumnGroupType, TableColumnSorter, TableColumnTitle, TableColumnTitleProps, TableColumnType, TableColumnsType, TableCompareFn, TableComponents, TableComponentsSemanticName, TableCurrentDataSource, TableExpandIconProps, TableExpandableConfig, TableExpandedRowRender, TableFilterDropdownPopupProps, TableFilterDropdownProps, TableFilters, TableHeaderCellAttributes, TableLegacySemanticName, TableLoadingConfig, TableLocale, TablePaginationConfig, TablePaginationPlacement, TablePaginationPosition, TableProps, TableRef, TableRenderedCell, TableRowClassName, TableRowSelectMethod, TableRowSelection, TableRowSelectionCheckboxProps, TableRowSelectionType, TableScrollToConfig, TableSelectionItem, TableSelectionPreset, TableSemanticInfo, TableSemanticName, TableSize, TableSorterResult, TableSorterTooltipProps, TableSticky, TableStyles, TableSummaryCellProps, TableSummaryProps, TableSummaryRowProps, TableVariant } from "./Table/type.mjs";
215
+ import { TableColumnProps } from "./Table/Column.mjs";
216
+ import { TableColumnGroupProps } from "./Table/ColumnGroup.mjs";
215
217
  import Table from "./Table/Table.mjs";
216
218
  import "./Table/index.mjs";
217
219
  import { groupStyles, styles as styles$12, variants } from "./Text/style.mjs";
@@ -228,4 +230,4 @@ import { TreeClassNames, TreeDataNode, TreeFlatRow, TreeProps, TreeStyles } from
228
230
  import Tree from "./Tree/Tree.mjs";
229
231
  import { conductCheck, flattenVisible, getAllKeys } from "./Tree/utils.mjs";
230
232
  import "./Tree/index.mjs";
231
- export { Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseModalProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, Divider, type DividerOrientation, type DividerProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, type FilterValue, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, type IconSpaceMode, type ImperativeModalProps, _default$1 as Input, type InputClassNames, _default$2 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$3 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, Pagination, type PaginationProps, type PaginationSize, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rate, type RateProps, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, type SortOrder, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$4 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, Table, type TableColumn, type TableFilters, type TablePaginationConfig, type TableProps, type TableSemanticName, type TableSorterResult, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$5 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
233
+ export { Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseModalProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, Collapsible, type CollapsibleProps, ColorPicker, type ColorPickerProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, Divider, type DividerOrientation, type DividerProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, type FilterValue, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FocusScope, type FocusScopeProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, type IconSpaceMode, type ImperativeModalProps, _default$1 as Input, type InputClassNames, _default$2 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$3 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemsType, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, Rate, type RateProps, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, type SortOrder, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$4 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, Table, type TableBreakpoint, type TableCellAttributes, type TableClassNames, type TableColumn, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, type TableCurrentDataSource, type TableExpandIconProps, type TableExpandableConfig, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, type TableHeaderCellAttributes, type TableLegacySemanticName, type TableLoadingConfig, type TableLocale, type TablePaginationConfig, type TablePaginationPlacement, type TablePaginationPosition, type TableProps, type TableRef, type TableRenderedCell, type TableRowClassName, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, type TableScrollToConfig, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, type TableSummaryProps, type TableSummaryRowProps, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$5 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, type VirtualListProps, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
@@ -17,6 +17,12 @@ import SplitButton from "./Button/SplitButton.mjs";
17
17
  import { styles as styles$1 } from "./ActionIcon/style.mjs";
18
18
  import ActionIcon from "./ActionIcon/ActionIcon.mjs";
19
19
  import Badge from "./Badge/Badge.mjs";
20
+ import { rootVariants, styles as styles$7 } from "./Input/style.mjs";
21
+ import Input_default from "./Input/Input.mjs";
22
+ import InputNumber_default from "./Input/InputNumber.mjs";
23
+ import InputOTP from "./Input/InputOTP.mjs";
24
+ import InputPassword_default from "./Input/InputPassword.mjs";
25
+ import TextArea_default from "./Input/TextArea.mjs";
20
26
  import { SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue } from "./Select/atoms.mjs";
21
27
  import Select from "./Select/Select.mjs";
22
28
  import Pagination from "./Pagination/Pagination.mjs";
@@ -27,12 +33,6 @@ import Upload from "./Upload/Upload.mjs";
27
33
  import UploadDragger from "./Upload/UploadDragger.mjs";
28
34
  import { colorsPreset, colorsPresetSystem, presetColors, presetSystemColors } from "./Tag/utils.mjs";
29
35
  import Tag from "./Tag/Tag.mjs";
30
- import { rootVariants, styles as styles$7 } from "./Input/style.mjs";
31
- import Input_default from "./Input/Input.mjs";
32
- import InputNumber_default from "./Input/InputNumber.mjs";
33
- import InputOTP from "./Input/InputOTP.mjs";
34
- import InputPassword_default from "./Input/InputPassword.mjs";
35
- import TextArea_default from "./Input/TextArea.mjs";
36
36
  import { PopoverArrowIcon } from "./Popover/ArrowIcon.mjs";
37
37
  import { usePopoverPortalContainer } from "./Popover/PopoverPortal.mjs";
38
38
  import { PopoverArrow, PopoverBackdrop, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTriggerElement, PopoverViewport } from "./Popover/atoms.mjs";
@@ -113,13 +113,13 @@ import Rate from "./Rate/Rate.mjs";
113
113
  import { formatStatisticValue } from "./Statistic/formatValue.mjs";
114
114
  import Statistic from "./Statistic/Statistic.mjs";
115
115
  import Steps from "./Steps/Steps.mjs";
116
+ import { styles as styles$14 } from "./Tree/style.mjs";
117
+ import { conductCheck, flattenVisible, getAllKeys } from "./Tree/utils.mjs";
118
+ import Tree from "./Tree/Tree.mjs";
116
119
  import Table from "./Table/Table.mjs";
117
120
  import { groupStyles, styles as styles$12, variants } from "./Text/style.mjs";
118
121
  import Text from "./Text/Text.mjs";
119
122
  import { styles as styles$13 } from "./ToggleGroup/style.mjs";
120
123
  import { ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot } from "./ToggleGroup/atoms.mjs";
121
124
  import ToggleGroup from "./ToggleGroup/ToggleGroup.mjs";
122
- import { styles as styles$14 } from "./Tree/style.mjs";
123
- import { conductCheck, flattenVisible, getAllKeys } from "./Tree/utils.mjs";
124
- import Tree from "./Tree/Tree.mjs";
125
125
  export { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Breadcrumb, Burger, Button, Carousel, Checkbox_default as Checkbox, CheckboxGroup, Collapsible, ColorPicker, ContextMenuHost, ContextMenuTrigger, DatePicker, DateRangePicker, Descriptions, Divider, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, FloatingPanel, FloatingSheet, FocusScope, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, List, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, Pagination, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, Table, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Upload, UploadDragger, styles as accordionStyles, styles$1 as actionIconStyles, styles$2 as alertStyles, styles$3 as autoCompleteStyles, backdropTransition, buttonPaddingInline, styles$4 as buttonStyles, styles$5 as checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, conductCheck, confirmModal, controlHeight, createModal, createModalSystem, drawerBackdropTransition, flattenVisible, focusScopeItem, styles$6 as focusScopeStyles, formatStatisticValue, getActiveScopeId, getAllKeys, getDrawerMotionConfig, getFloatingCollisionPadding, getLastFocusedItem, styles$7 as inputStyles, rootVariants as inputVariants, modalMotionConfig, notifyScopeItemFocus, parseTrigger, presetColors, presetSystemColors, styles$8 as radioStyles, registerScope, renderDropdownMenuItems, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, showContextMenu, styles$9 as sliderStyles, styles$10 as switchStyles, styles$11 as tabsStyles, groupStyles as textGroupStyles, styles$12 as textStyles, variants as textVariants, toast, styles$13 as toggleGroupStyles, styles$14 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useModalActions, useModalContext, useModalOpen, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useToast };
@@ -2,8 +2,8 @@
2
2
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
3
3
  import Button from "../../base-ui/Button/Button.mjs";
4
4
  import ActionIcon from "../../base-ui/ActionIcon/ActionIcon.mjs";
5
- import Select from "../../base-ui/Select/Select.mjs";
6
5
  import { useTranslation } from "../../i18n/useTranslation.mjs";
6
+ import Select from "../../base-ui/Select/Select.mjs";
7
7
  import ControlInput from "../../EditableText/ControlInput.mjs";
8
8
  import editableMessage_default from "../../i18n/resources/en/editableMessage.mjs";
9
9
  import { messagesReducer } from "./messageReducer.mjs";
@@ -4,8 +4,8 @@ import { KeyMapEnum } from "../../Hotkey/const.mjs";
4
4
  import { combineKeys } from "../../Hotkey/utils.mjs";
5
5
  import { Tooltip } from "../../base-ui/Tooltip/Tooltip.mjs";
6
6
  import Button from "../../base-ui/Button/Button.mjs";
7
- import CodeEditor from "../../CodeEditor/CodeEditor.mjs";
8
7
  import TextArea_default from "../../base-ui/Input/TextArea.mjs";
8
+ import CodeEditor from "../../CodeEditor/CodeEditor.mjs";
9
9
  import { styles } from "./style.mjs";
10
10
  import { memo, useState } from "react";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
3
3
  import Button from "../../base-ui/Button/Button.mjs";
4
- import CodeEditor from "../../CodeEditor/CodeEditor.mjs";
5
4
  import { useTranslation } from "../../i18n/useTranslation.mjs";
6
5
  import TextArea_default from "../../base-ui/Input/TextArea.mjs";
6
+ import CodeEditor from "../../CodeEditor/CodeEditor.mjs";
7
7
  import Markdown from "../../Markdown/Markdown.mjs";
8
8
  import Modal from "../../base-ui/Modal/Modal.mjs";
9
9
  import { styles } from "../MessageInput/style.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import ActionIcon from "../../base-ui/ActionIcon/ActionIcon.mjs";
3
- import Progress from "../../base-ui/Progress/Progress.mjs";
4
3
  import { useTranslation } from "../../i18n/useTranslation.mjs";
4
+ import Progress from "../../base-ui/Progress/Progress.mjs";
5
5
  import chat_default from "../../i18n/resources/en/chat.mjs";
6
6
  import { useMemo } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -11,9 +11,10 @@ import _default$9 from "./image.mjs";
11
11
  import _default$10 from "./messageModal.mjs";
12
12
  import _default$11 from "./qrCode.mjs";
13
13
  import _default$12 from "./sideNav.mjs";
14
+ import _default$13 from "./table.mjs";
14
15
  declare namespace index_d_exports {
15
- export { _default as burger, _default$1 as chat, _default$2 as colorPicker, _default$3 as common, _default$4 as datePicker, _default$5 as editableMessage, _default$6 as emojiPicker, _default$7 as form, _default$8 as hotkey, _default$9 as image, _default$10 as messageModal, _default$11 as qrCode, _default$12 as sideNav };
16
+ export { _default as burger, _default$1 as chat, _default$2 as colorPicker, _default$3 as common, _default$4 as datePicker, _default$5 as editableMessage, _default$6 as emojiPicker, _default$7 as form, _default$8 as hotkey, _default$9 as image, _default$10 as messageModal, _default$11 as qrCode, _default$12 as sideNav, _default$13 as table };
16
17
  }
17
18
  //#endregion
18
- export { _default as burger, _default$1 as chat, _default$2 as colorPicker, _default$3 as common, _default$4 as datePicker, _default$5 as editableMessage, _default$6 as emojiPicker, _default$7 as form, _default$8 as hotkey, _default$9 as image, index_d_exports, _default$10 as messageModal, _default$11 as qrCode, _default$12 as sideNav };
19
+ export { _default as burger, _default$1 as chat, _default$2 as colorPicker, _default$3 as common, _default$4 as datePicker, _default$5 as editableMessage, _default$6 as emojiPicker, _default$7 as form, _default$8 as hotkey, _default$9 as image, index_d_exports, _default$10 as messageModal, _default$11 as qrCode, _default$12 as sideNav, _default$13 as table };
19
20
  //# sourceMappingURL=index.d.mts.map