@coldsmirk/ledger-mantine 0.4.0 → 0.5.1
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.
- package/dist/index.cjs +146 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -44
- package/dist/index.d.ts +44 -44
- package/dist/index.js +146 -54
- package/dist/index.js.map +1 -1
- package/dist/{labels-ChBqD1II.d.ts → labels-D-6FCakH.d.cts} +16 -2
- package/dist/{labels-ChBqD1II.d.cts → labels-D-6FCakH.d.ts} +16 -2
- package/dist/locales.cjs +10 -0
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.d.cts +2 -3
- package/dist/locales.d.ts +2 -3
- package/dist/locales.js +10 -0
- package/dist/locales.js.map +1 -1
- package/dist/styles.css +26 -5
- package/package.json +10 -10
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
interface DataTableLabels {
|
|
9
9
|
paginationSummary: (from: number, to: number, total: number) => string;
|
|
10
10
|
rowsPerPage: string;
|
|
11
|
+
firstPage: string;
|
|
12
|
+
previousPage: string;
|
|
13
|
+
nextPage: string;
|
|
14
|
+
lastPage: string;
|
|
11
15
|
selectAllRows: string;
|
|
12
16
|
selectRow: string;
|
|
13
17
|
selectedCount: (count: number) => string;
|
|
@@ -19,7 +23,7 @@ interface DataTableLabels {
|
|
|
19
23
|
/**
|
|
20
24
|
* Describes the body viewport — the keyboard focus stop — while `enableActiveRow` is on. It
|
|
21
25
|
* is the only place the arrow-key row model is announced, so say what the keys do. A
|
|
22
|
-
* description,
|
|
26
|
+
* description, not a name: it says how to work the rows, not what they are.
|
|
23
27
|
*/
|
|
24
28
|
rowNavigation: string;
|
|
25
29
|
/**
|
|
@@ -61,6 +65,16 @@ interface DataTableLabels {
|
|
|
61
65
|
filterPlaceholder: string;
|
|
62
66
|
filterRangeMin: string;
|
|
63
67
|
filterRangeMax: string;
|
|
68
|
+
/**
|
|
69
|
+
* The date-range calendar's arrows, one pair per calendar level (Mantine's `ariaLabels`):
|
|
70
|
+
* glyph-only buttons, so each needs a name.
|
|
71
|
+
*/
|
|
72
|
+
previousMonth: string;
|
|
73
|
+
nextMonth: string;
|
|
74
|
+
previousYear: string;
|
|
75
|
+
nextYear: string;
|
|
76
|
+
previousDecade: string;
|
|
77
|
+
nextDecade: string;
|
|
64
78
|
searchPlaceholder: string;
|
|
65
79
|
loading: string;
|
|
66
80
|
empty: string;
|
|
@@ -104,4 +118,4 @@ interface DataTableLabels {
|
|
|
104
118
|
declare const defaultLabels: DataTableLabels;
|
|
105
119
|
//#endregion
|
|
106
120
|
export { defaultLabels as n, DataTableLabels as t };
|
|
107
|
-
//# sourceMappingURL=labels-
|
|
121
|
+
//# sourceMappingURL=labels-D-6FCakH.d.cts.map
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
interface DataTableLabels {
|
|
9
9
|
paginationSummary: (from: number, to: number, total: number) => string;
|
|
10
10
|
rowsPerPage: string;
|
|
11
|
+
firstPage: string;
|
|
12
|
+
previousPage: string;
|
|
13
|
+
nextPage: string;
|
|
14
|
+
lastPage: string;
|
|
11
15
|
selectAllRows: string;
|
|
12
16
|
selectRow: string;
|
|
13
17
|
selectedCount: (count: number) => string;
|
|
@@ -19,7 +23,7 @@ interface DataTableLabels {
|
|
|
19
23
|
/**
|
|
20
24
|
* Describes the body viewport — the keyboard focus stop — while `enableActiveRow` is on. It
|
|
21
25
|
* is the only place the arrow-key row model is announced, so say what the keys do. A
|
|
22
|
-
* description,
|
|
26
|
+
* description, not a name: it says how to work the rows, not what they are.
|
|
23
27
|
*/
|
|
24
28
|
rowNavigation: string;
|
|
25
29
|
/**
|
|
@@ -61,6 +65,16 @@ interface DataTableLabels {
|
|
|
61
65
|
filterPlaceholder: string;
|
|
62
66
|
filterRangeMin: string;
|
|
63
67
|
filterRangeMax: string;
|
|
68
|
+
/**
|
|
69
|
+
* The date-range calendar's arrows, one pair per calendar level (Mantine's `ariaLabels`):
|
|
70
|
+
* glyph-only buttons, so each needs a name.
|
|
71
|
+
*/
|
|
72
|
+
previousMonth: string;
|
|
73
|
+
nextMonth: string;
|
|
74
|
+
previousYear: string;
|
|
75
|
+
nextYear: string;
|
|
76
|
+
previousDecade: string;
|
|
77
|
+
nextDecade: string;
|
|
64
78
|
searchPlaceholder: string;
|
|
65
79
|
loading: string;
|
|
66
80
|
empty: string;
|
|
@@ -104,4 +118,4 @@ interface DataTableLabels {
|
|
|
104
118
|
declare const defaultLabels: DataTableLabels;
|
|
105
119
|
//#endregion
|
|
106
120
|
export { defaultLabels as n, DataTableLabels as t };
|
|
107
|
-
//# sourceMappingURL=labels-
|
|
121
|
+
//# sourceMappingURL=labels-D-6FCakH.d.ts.map
|
package/dist/locales.cjs
CHANGED
|
@@ -4,6 +4,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
const zhCN = {
|
|
5
5
|
paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,
|
|
6
6
|
rowsPerPage: "每页行数",
|
|
7
|
+
firstPage: "第一页",
|
|
8
|
+
previousPage: "上一页",
|
|
9
|
+
nextPage: "下一页",
|
|
10
|
+
lastPage: "最后一页",
|
|
7
11
|
selectAllRows: "全选",
|
|
8
12
|
selectRow: "选择行",
|
|
9
13
|
selectedCount: (count) => `已选 ${count} 项`,
|
|
@@ -32,6 +36,12 @@ const zhCN = {
|
|
|
32
36
|
filterPlaceholder: "筛选…",
|
|
33
37
|
filterRangeMin: "最小值",
|
|
34
38
|
filterRangeMax: "最大值",
|
|
39
|
+
previousMonth: "上个月",
|
|
40
|
+
nextMonth: "下个月",
|
|
41
|
+
previousYear: "上一年",
|
|
42
|
+
nextYear: "下一年",
|
|
43
|
+
previousDecade: "上一个十年",
|
|
44
|
+
nextDecade: "下一个十年",
|
|
35
45
|
searchPlaceholder: "搜索…",
|
|
36
46
|
loading: "加载中",
|
|
37
47
|
empty: "暂无数据",
|
package/dist/locales.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.cjs","names":[],"sources":["../src/locales.ts"],"sourcesContent":["/**\n * Locale presets for `DataTableLabels`. This module is also published as the \"./locales\"\n * subpath so applications can import a preset without touching the main entry:\n *\n * ```ts\n * import { zhCN } from \"@coldsmirk/ledger-mantine/locales\";\n * theme.components.DataTable = DataTable.extend({ defaultProps: { labels: zhCN } });\n * ```\n */\nimport type { DataTableLabels } from \"./labels\";\n\nexport const zhCN: DataTableLabels = {\n paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,\n rowsPerPage: \"每页行数\",\n\n selectAllRows: \"全选\",\n selectRow: \"选择行\",\n selectedCount: count => `已选 ${count} 项`,\n clearSelection: \"清除选择\",\n\n rowNavigation: \"表格行 —— 使用方向键在行间移动\",\n currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,\n\n expandRow: \"展开行\",\n collapseRow: \"收起行\",\n expandAll: \"展开全部\",\n collapseAll: \"收起全部\",\n\n columnsPanel: \"列设置\",\n resetColumns: \"重置\",\n pinStart: \"固定到左侧\",\n pinEnd: \"固定到右侧\",\n unpin: \"取消固定\",\n pinnedStart: \"左侧固定\",\n pinnedEnd: \"右侧固定\",\n groupByColumn: \"按此列分组\",\n ungroupColumn: \"取消分组\",\n columnWidth: \"宽度\",\n columnWidthAuto: \"自适应\",\n\n resizeColumn: \"拖动调整列宽;双击自适应内容\",\n reorderColumn: \"拖拽调整列顺序\",\n\n filterColumn: column => `筛选${column}`,\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n filterRangeMin: \"最小值\",\n filterRangeMax: \"最大值\",\n\n searchPlaceholder: \"搜索…\",\n\n loading: \"加载中\",\n empty: \"暂无数据\",\n noResults: \"没有匹配的记录\",\n loadingMore: \"加载更多\",\n error: \"数据加载失败\",\n retry: \"重试\",\n loadMoreError: \"加载更多失败\",\n\n editColumn: column => `编辑${column}`,\n editPending: \"保存中\",\n\n reorderRow: \"拖拽调整行顺序\",\n rowOrderingUnavailable: \"清除排序、筛选和分组后才能调整行顺序\",\n rowReorderLifted: row => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,\n rowReorderTarget: (row, side) => side === \"before\" ? `${row} 之前` : `${row} 之后`,\n rowReorderDropped: row => `已放下 ${row}`,\n rowReorderCanceled: \"已取消调整\"\n};\n"],"mappings":";;;AAWA,MAAa,OAAwB;CACnC,oBAAoB,MAAM,IAAI,UAAU,KAAK,KAAK,GAAG,GAAG,OAAO,MAAM;CACrE,aAAa;
|
|
1
|
+
{"version":3,"file":"locales.cjs","names":[],"sources":["../src/locales.ts"],"sourcesContent":["/**\n * Locale presets for `DataTableLabels`. This module is also published as the \"./locales\"\n * subpath so applications can import a preset without touching the main entry:\n *\n * ```ts\n * import { zhCN } from \"@coldsmirk/ledger-mantine/locales\";\n * theme.components.DataTable = DataTable.extend({ defaultProps: { labels: zhCN } });\n * ```\n */\nimport type { DataTableLabels } from \"./labels\";\n\nexport const zhCN: DataTableLabels = {\n paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,\n rowsPerPage: \"每页行数\",\n firstPage: \"第一页\",\n previousPage: \"上一页\",\n nextPage: \"下一页\",\n lastPage: \"最后一页\",\n\n selectAllRows: \"全选\",\n selectRow: \"选择行\",\n selectedCount: count => `已选 ${count} 项`,\n clearSelection: \"清除选择\",\n\n rowNavigation: \"表格行 —— 使用方向键在行间移动\",\n currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,\n\n expandRow: \"展开行\",\n collapseRow: \"收起行\",\n expandAll: \"展开全部\",\n collapseAll: \"收起全部\",\n\n columnsPanel: \"列设置\",\n resetColumns: \"重置\",\n pinStart: \"固定到左侧\",\n pinEnd: \"固定到右侧\",\n unpin: \"取消固定\",\n pinnedStart: \"左侧固定\",\n pinnedEnd: \"右侧固定\",\n groupByColumn: \"按此列分组\",\n ungroupColumn: \"取消分组\",\n columnWidth: \"宽度\",\n columnWidthAuto: \"自适应\",\n\n resizeColumn: \"拖动调整列宽;双击自适应内容\",\n reorderColumn: \"拖拽调整列顺序\",\n\n filterColumn: column => `筛选${column}`,\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n filterRangeMin: \"最小值\",\n filterRangeMax: \"最大值\",\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n previousYear: \"上一年\",\n nextYear: \"下一年\",\n previousDecade: \"上一个十年\",\n nextDecade: \"下一个十年\",\n\n searchPlaceholder: \"搜索…\",\n\n loading: \"加载中\",\n empty: \"暂无数据\",\n noResults: \"没有匹配的记录\",\n loadingMore: \"加载更多\",\n error: \"数据加载失败\",\n retry: \"重试\",\n loadMoreError: \"加载更多失败\",\n\n editColumn: column => `编辑${column}`,\n editPending: \"保存中\",\n\n reorderRow: \"拖拽调整行顺序\",\n rowOrderingUnavailable: \"清除排序、筛选和分组后才能调整行顺序\",\n rowReorderLifted: row => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,\n rowReorderTarget: (row, side) => side === \"before\" ? `${row} 之前` : `${row} 之后`,\n rowReorderDropped: row => `已放下 ${row}`,\n rowReorderCanceled: \"已取消调整\"\n};\n"],"mappings":";;;AAWA,MAAa,OAAwB;CACnC,oBAAoB,MAAM,IAAI,UAAU,KAAK,KAAK,GAAG,GAAG,OAAO,MAAM;CACrE,aAAa;CACb,WAAW;CACX,cAAc;CACd,UAAU;CACV,UAAU;CAEV,eAAe;CACf,WAAW;CACX,gBAAe,UAAS,MAAM,MAAM;CACpC,gBAAgB;CAEhB,eAAe;CACf,aAAa,KAAK,OAAO,UAAU,GAAG,IAAI,KAAK,MAAM,OAAO,MAAM;CAElE,WAAW;CACX,aAAa;CACb,WAAW;CACX,aAAa;CAEb,cAAc;CACd,cAAc;CACd,UAAU;CACV,QAAQ;CACR,OAAO;CACP,aAAa;CACb,WAAW;CACX,eAAe;CACf,eAAe;CACf,aAAa;CACb,iBAAiB;CAEjB,cAAc;CACd,eAAe;CAEf,eAAc,WAAU,KAAK;CAC7B,aAAa;CACb,mBAAmB;CACnB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,WAAW;CACX,cAAc;CACd,UAAU;CACV,gBAAgB;CAChB,YAAY;CAEZ,mBAAmB;CAEnB,SAAS;CACT,OAAO;CACP,WAAW;CACX,aAAa;CACb,OAAO;CACP,OAAO;CACP,eAAe;CAEf,aAAY,WAAU,KAAK;CAC3B,aAAa;CAEb,YAAY;CACZ,wBAAwB;CACxB,mBAAkB,QAAO,OAAO,IAAI;CACpC,mBAAmB,KAAK,SAAS,SAAS,WAAW,GAAG,IAAI,OAAO,GAAG,IAAI;CAC1E,oBAAmB,QAAO,OAAO;CACjC,oBAAoB;AACtB"}
|
package/dist/locales.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { t as DataTableLabels } from "./labels-
|
|
2
|
+
import { t as DataTableLabels } from "./labels-D-6FCakH.cjs";
|
|
3
3
|
//#region src/locales.d.ts
|
|
4
|
-
declare const zhCN: DataTableLabels;
|
|
4
|
+
export declare const zhCN: DataTableLabels;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { zhCN };
|
|
7
6
|
//# sourceMappingURL=locales.d.cts.map
|
package/dist/locales.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { t as DataTableLabels } from "./labels-
|
|
2
|
+
import { t as DataTableLabels } from "./labels-D-6FCakH.js";
|
|
3
3
|
//#region src/locales.d.ts
|
|
4
|
-
declare const zhCN: DataTableLabels;
|
|
4
|
+
export declare const zhCN: DataTableLabels;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { zhCN };
|
|
7
6
|
//# sourceMappingURL=locales.d.ts.map
|
package/dist/locales.js
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
const zhCN = {
|
|
4
4
|
paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,
|
|
5
5
|
rowsPerPage: "每页行数",
|
|
6
|
+
firstPage: "第一页",
|
|
7
|
+
previousPage: "上一页",
|
|
8
|
+
nextPage: "下一页",
|
|
9
|
+
lastPage: "最后一页",
|
|
6
10
|
selectAllRows: "全选",
|
|
7
11
|
selectRow: "选择行",
|
|
8
12
|
selectedCount: (count) => `已选 ${count} 项`,
|
|
@@ -31,6 +35,12 @@ const zhCN = {
|
|
|
31
35
|
filterPlaceholder: "筛选…",
|
|
32
36
|
filterRangeMin: "最小值",
|
|
33
37
|
filterRangeMax: "最大值",
|
|
38
|
+
previousMonth: "上个月",
|
|
39
|
+
nextMonth: "下个月",
|
|
40
|
+
previousYear: "上一年",
|
|
41
|
+
nextYear: "下一年",
|
|
42
|
+
previousDecade: "上一个十年",
|
|
43
|
+
nextDecade: "下一个十年",
|
|
34
44
|
searchPlaceholder: "搜索…",
|
|
35
45
|
loading: "加载中",
|
|
36
46
|
empty: "暂无数据",
|
package/dist/locales.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.js","names":[],"sources":["../src/locales.ts"],"sourcesContent":["/**\n * Locale presets for `DataTableLabels`. This module is also published as the \"./locales\"\n * subpath so applications can import a preset without touching the main entry:\n *\n * ```ts\n * import { zhCN } from \"@coldsmirk/ledger-mantine/locales\";\n * theme.components.DataTable = DataTable.extend({ defaultProps: { labels: zhCN } });\n * ```\n */\nimport type { DataTableLabels } from \"./labels\";\n\nexport const zhCN: DataTableLabels = {\n paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,\n rowsPerPage: \"每页行数\",\n\n selectAllRows: \"全选\",\n selectRow: \"选择行\",\n selectedCount: count => `已选 ${count} 项`,\n clearSelection: \"清除选择\",\n\n rowNavigation: \"表格行 —— 使用方向键在行间移动\",\n currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,\n\n expandRow: \"展开行\",\n collapseRow: \"收起行\",\n expandAll: \"展开全部\",\n collapseAll: \"收起全部\",\n\n columnsPanel: \"列设置\",\n resetColumns: \"重置\",\n pinStart: \"固定到左侧\",\n pinEnd: \"固定到右侧\",\n unpin: \"取消固定\",\n pinnedStart: \"左侧固定\",\n pinnedEnd: \"右侧固定\",\n groupByColumn: \"按此列分组\",\n ungroupColumn: \"取消分组\",\n columnWidth: \"宽度\",\n columnWidthAuto: \"自适应\",\n\n resizeColumn: \"拖动调整列宽;双击自适应内容\",\n reorderColumn: \"拖拽调整列顺序\",\n\n filterColumn: column => `筛选${column}`,\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n filterRangeMin: \"最小值\",\n filterRangeMax: \"最大值\",\n\n searchPlaceholder: \"搜索…\",\n\n loading: \"加载中\",\n empty: \"暂无数据\",\n noResults: \"没有匹配的记录\",\n loadingMore: \"加载更多\",\n error: \"数据加载失败\",\n retry: \"重试\",\n loadMoreError: \"加载更多失败\",\n\n editColumn: column => `编辑${column}`,\n editPending: \"保存中\",\n\n reorderRow: \"拖拽调整行顺序\",\n rowOrderingUnavailable: \"清除排序、筛选和分组后才能调整行顺序\",\n rowReorderLifted: row => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,\n rowReorderTarget: (row, side) => side === \"before\" ? `${row} 之前` : `${row} 之后`,\n rowReorderDropped: row => `已放下 ${row}`,\n rowReorderCanceled: \"已取消调整\"\n};\n"],"mappings":";;AAWA,MAAa,OAAwB;CACnC,oBAAoB,MAAM,IAAI,UAAU,KAAK,KAAK,GAAG,GAAG,OAAO,MAAM;CACrE,aAAa;
|
|
1
|
+
{"version":3,"file":"locales.js","names":[],"sources":["../src/locales.ts"],"sourcesContent":["/**\n * Locale presets for `DataTableLabels`. This module is also published as the \"./locales\"\n * subpath so applications can import a preset without touching the main entry:\n *\n * ```ts\n * import { zhCN } from \"@coldsmirk/ledger-mantine/locales\";\n * theme.components.DataTable = DataTable.extend({ defaultProps: { labels: zhCN } });\n * ```\n */\nimport type { DataTableLabels } from \"./labels\";\n\nexport const zhCN: DataTableLabels = {\n paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,\n rowsPerPage: \"每页行数\",\n firstPage: \"第一页\",\n previousPage: \"上一页\",\n nextPage: \"下一页\",\n lastPage: \"最后一页\",\n\n selectAllRows: \"全选\",\n selectRow: \"选择行\",\n selectedCount: count => `已选 ${count} 项`,\n clearSelection: \"清除选择\",\n\n rowNavigation: \"表格行 —— 使用方向键在行间移动\",\n currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,\n\n expandRow: \"展开行\",\n collapseRow: \"收起行\",\n expandAll: \"展开全部\",\n collapseAll: \"收起全部\",\n\n columnsPanel: \"列设置\",\n resetColumns: \"重置\",\n pinStart: \"固定到左侧\",\n pinEnd: \"固定到右侧\",\n unpin: \"取消固定\",\n pinnedStart: \"左侧固定\",\n pinnedEnd: \"右侧固定\",\n groupByColumn: \"按此列分组\",\n ungroupColumn: \"取消分组\",\n columnWidth: \"宽度\",\n columnWidthAuto: \"自适应\",\n\n resizeColumn: \"拖动调整列宽;双击自适应内容\",\n reorderColumn: \"拖拽调整列顺序\",\n\n filterColumn: column => `筛选${column}`,\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n filterRangeMin: \"最小值\",\n filterRangeMax: \"最大值\",\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n previousYear: \"上一年\",\n nextYear: \"下一年\",\n previousDecade: \"上一个十年\",\n nextDecade: \"下一个十年\",\n\n searchPlaceholder: \"搜索…\",\n\n loading: \"加载中\",\n empty: \"暂无数据\",\n noResults: \"没有匹配的记录\",\n loadingMore: \"加载更多\",\n error: \"数据加载失败\",\n retry: \"重试\",\n loadMoreError: \"加载更多失败\",\n\n editColumn: column => `编辑${column}`,\n editPending: \"保存中\",\n\n reorderRow: \"拖拽调整行顺序\",\n rowOrderingUnavailable: \"清除排序、筛选和分组后才能调整行顺序\",\n rowReorderLifted: row => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,\n rowReorderTarget: (row, side) => side === \"before\" ? `${row} 之前` : `${row} 之后`,\n rowReorderDropped: row => `已放下 ${row}`,\n rowReorderCanceled: \"已取消调整\"\n};\n"],"mappings":";;AAWA,MAAa,OAAwB;CACnC,oBAAoB,MAAM,IAAI,UAAU,KAAK,KAAK,GAAG,GAAG,OAAO,MAAM;CACrE,aAAa;CACb,WAAW;CACX,cAAc;CACd,UAAU;CACV,UAAU;CAEV,eAAe;CACf,WAAW;CACX,gBAAe,UAAS,MAAM,MAAM;CACpC,gBAAgB;CAEhB,eAAe;CACf,aAAa,KAAK,OAAO,UAAU,GAAG,IAAI,KAAK,MAAM,OAAO,MAAM;CAElE,WAAW;CACX,aAAa;CACb,WAAW;CACX,aAAa;CAEb,cAAc;CACd,cAAc;CACd,UAAU;CACV,QAAQ;CACR,OAAO;CACP,aAAa;CACb,WAAW;CACX,eAAe;CACf,eAAe;CACf,aAAa;CACb,iBAAiB;CAEjB,cAAc;CACd,eAAe;CAEf,eAAc,WAAU,KAAK;CAC7B,aAAa;CACb,mBAAmB;CACnB,gBAAgB;CAChB,gBAAgB;CAChB,eAAe;CACf,WAAW;CACX,cAAc;CACd,UAAU;CACV,gBAAgB;CAChB,YAAY;CAEZ,mBAAmB;CAEnB,SAAS;CACT,OAAO;CACP,WAAW;CACX,aAAa;CACb,OAAO;CACP,OAAO;CACP,eAAe;CAEf,aAAY,WAAU,KAAK;CAC3B,aAAa;CAEb,YAAY;CACZ,wBAAwB;CACxB,mBAAkB,QAAO,OAAO,IAAI;CACpC,mBAAmB,KAAK,SAAS,SAAS,WAAW,GAAG,IAAI,OAAO,GAAG,IAAI;CAC1E,oBAAmB,QAAO,OAAO;CACjC,oBAAoB;AACtB"}
|
package/dist/styles.css
CHANGED
|
@@ -38,6 +38,19 @@
|
|
|
38
38
|
border-radius: var(--ledger-radius, 0);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/* Secondary text (captions, counts, the state panels' titles, the pagination words): the text
|
|
42
|
+
color at 78% opacity, so it is defined against whatever it sits on rather than as one fixed
|
|
43
|
+
gray. A fixed tone cannot hold 4.5:1 (WCAG AA) on every background a row takes; text that
|
|
44
|
+
blends with its background keeps a share of the text color's own contrast on each of them —
|
|
45
|
+
at 78%, 4.8:1 on the dark scheme's stripes and hover, its lowest neutral background (Mantine's
|
|
46
|
+
own `dimmed` is 3.3:1 on a light body). Overridable on these elements
|
|
47
|
+
(docs/styling.md#css-custom-properties). */
|
|
48
|
+
.ledger-root,
|
|
49
|
+
.ledger-pagination-bar,
|
|
50
|
+
.ledger-columns-panel {
|
|
51
|
+
--ledger-color-dimmed: color-mix(in srgb, var(--mantine-color-text) 78%, transparent);
|
|
52
|
+
}
|
|
53
|
+
|
|
41
54
|
/* The frame around header + body — the elastic middle; carries the outer table border
|
|
42
55
|
(painted in the Borders section: four real sides). It clips its
|
|
43
56
|
own content so a `radius` rounds the header tint, the rows, and the frame together — every
|
|
@@ -332,6 +345,14 @@
|
|
|
332
345
|
--ledger-row-bg: var(--mantine-primary-color-light-hover);
|
|
333
346
|
}
|
|
334
347
|
|
|
348
|
+
/* A primary tint leaves no room for a second tier of text: on its deepest step in the dark
|
|
349
|
+
scheme even the text color reaches only 5.8:1, so any lighter tone falls under AA. On a
|
|
350
|
+
selected or active row, secondary text takes the text color itself. */
|
|
351
|
+
.ledger-row[data-selected],
|
|
352
|
+
.ledger-row[data-active] {
|
|
353
|
+
--ledger-color-dimmed: var(--mantine-color-text);
|
|
354
|
+
}
|
|
355
|
+
|
|
335
356
|
.ledger-row[data-clickable] {
|
|
336
357
|
cursor: pointer;
|
|
337
358
|
}
|
|
@@ -458,7 +479,7 @@
|
|
|
458
479
|
|
|
459
480
|
[data-group-count] {
|
|
460
481
|
font-size: var(--mantine-font-size-xs);
|
|
461
|
-
color: var(--
|
|
482
|
+
color: var(--ledger-color-dimmed);
|
|
462
483
|
}
|
|
463
484
|
|
|
464
485
|
.ledger-cell[data-editing] {
|
|
@@ -584,7 +605,7 @@
|
|
|
584
605
|
|
|
585
606
|
.ledger-loader-row td {
|
|
586
607
|
padding-block: var(--mantine-spacing-sm);
|
|
587
|
-
color: var(--
|
|
608
|
+
color: var(--ledger-color-dimmed);
|
|
588
609
|
border-bottom: 0;
|
|
589
610
|
}
|
|
590
611
|
|
|
@@ -697,7 +718,7 @@
|
|
|
697
718
|
font-size: var(--mantine-font-size-xs);
|
|
698
719
|
font-weight: 500;
|
|
699
720
|
line-height: 1;
|
|
700
|
-
color: var(--
|
|
721
|
+
color: var(--ledger-color-dimmed);
|
|
701
722
|
}
|
|
702
723
|
|
|
703
724
|
/* Radii across the panel — the tinted shelves, this hover pill, and the toolbar backdrop —
|
|
@@ -758,7 +779,7 @@
|
|
|
758
779
|
a stylesheet the host may load unlayered, where it would beat anything the ledger layer
|
|
759
780
|
says — but inheritance it can only obey. */
|
|
760
781
|
.ledger-columns-panel-item[data-hidden] .ledger-columns-panel-label {
|
|
761
|
-
color: var(--
|
|
782
|
+
color: var(--ledger-color-dimmed);
|
|
762
783
|
}
|
|
763
784
|
|
|
764
785
|
.ledger-columns-panel-indicators {
|
|
@@ -767,7 +788,7 @@
|
|
|
767
788
|
gap: 6px;
|
|
768
789
|
align-items: center;
|
|
769
790
|
font-variant-numeric: tabular-nums;
|
|
770
|
-
color: var(--
|
|
791
|
+
color: var(--ledger-color-dimmed);
|
|
771
792
|
white-space: nowrap;
|
|
772
793
|
}
|
|
773
794
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/ledger-mantine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Mantine-native <DataTable> on TanStack Table and TanStack Virtual: sorting, filtering, pagination, selection, pinning, inline editing, and adaptive row virtualization.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-table",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"@dnd-kit/dom": "^0.5.0",
|
|
61
61
|
"@dnd-kit/helpers": "^0.5.0",
|
|
62
62
|
"@dnd-kit/react": "^0.5.0",
|
|
63
|
-
"@tanstack/react-table": "^9.
|
|
64
|
-
"@tanstack/react-virtual": "^3.14.
|
|
63
|
+
"@tanstack/react-table": "^9.2.6",
|
|
64
|
+
"@tanstack/react-virtual": "^3.14.13",
|
|
65
65
|
"clsx": "^2.1.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@mantine/core": "^9.
|
|
69
|
-
"@mantine/dates": "^9.
|
|
70
|
-
"@mantine/hooks": "^9.
|
|
71
|
-
"@types/react": "^19.
|
|
72
|
-
"@types/react-dom": "^19.
|
|
68
|
+
"@mantine/core": "^9.7.1",
|
|
69
|
+
"@mantine/dates": "^9.7.1",
|
|
70
|
+
"@mantine/hooks": "^9.7.1",
|
|
71
|
+
"@types/react": "^19.3.0",
|
|
72
|
+
"@types/react-dom": "^19.3.0",
|
|
73
73
|
"dayjs": "^1.11.23",
|
|
74
|
-
"react": "^19.
|
|
75
|
-
"react-dom": "^19.
|
|
74
|
+
"react": "^19.3.0",
|
|
75
|
+
"react-dom": "^19.3.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@mantine/core": "^9.0.0",
|