@coldsmirk/ledger-mantine 0.1.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.
@@ -0,0 +1,107 @@
1
+
2
+ //#region src/labels.d.ts
3
+ /**
4
+ * Every user-visible string in the library flows through this object — components never hardcode
5
+ * a locale. App-wide configuration is the Mantine-native mechanism (theme defaultProps, see
6
+ * docs/i18n.md); a complete zh-CN preset ships from "./locales".
7
+ */
8
+ interface DataTableLabels {
9
+ paginationSummary: (from: number, to: number, total: number) => string;
10
+ rowsPerPage: string;
11
+ selectAllRows: string;
12
+ selectRow: string;
13
+ selectedCount: (count: number) => string;
14
+ clearSelection: string;
15
+ expandRow: string;
16
+ collapseRow: string;
17
+ expandAll: string;
18
+ collapseAll: string;
19
+ /**
20
+ * Describes the body viewport — the keyboard focus stop — while `enableActiveRow` is on. It
21
+ * is the only place the arrow-key row model is announced, so say what the keys do. A
22
+ * description, never a name: that div is roleless, and `generic` prohibits a name.
23
+ */
24
+ rowNavigation: string;
25
+ /**
26
+ * Announced politely whenever the current row changes: focus stays on the viewport, so without
27
+ * this the move is visual only.
28
+ */
29
+ currentRow: (row: string, index: number, count: number) => string;
30
+ columnsPanel: string;
31
+ resetColumns: string;
32
+ /**
33
+ * Logical positions (TanStack v9 vocabulary): start/end map to left/right in LTR layouts and
34
+ * mirror under RTL.
35
+ */
36
+ pinStart: string;
37
+ pinEnd: string;
38
+ unpin: string;
39
+ /**
40
+ * Zone captions the columns panel shows above its pinned columns; nouns for the state, where
41
+ * `pinStart` / `pinEnd` name the action.
42
+ */
43
+ pinnedStart: string;
44
+ pinnedEnd: string;
45
+ groupByColumn: string;
46
+ ungroupColumn: string;
47
+ columnWidth: string;
48
+ /**
49
+ * Width placeholder for a column whose definition declares no `size` — it grows to share the
50
+ * leftover viewport. A column that declares one shows that number instead.
51
+ */
52
+ columnWidthAuto: string;
53
+ resizeColumn: string;
54
+ reorderColumn: string;
55
+ /**
56
+ * Names the funnel trigger and the control inside it — an unnamed control in a table of them
57
+ * is unusable, so the column title is interpolated rather than left generic.
58
+ */
59
+ filterColumn: (column: string) => string;
60
+ clearFilter: string;
61
+ filterPlaceholder: string;
62
+ filterRangeMin: string;
63
+ filterRangeMax: string;
64
+ searchPlaceholder: string;
65
+ loading: string;
66
+ empty: string;
67
+ /**
68
+ * Zero rows while a column filter or the global search is active — a different situation
69
+ * than an empty data set, so it gets its own message.
70
+ */
71
+ noResults: string;
72
+ loadingMore: string;
73
+ error: string;
74
+ retry: string;
75
+ loadMoreError: string;
76
+ /**
77
+ * Names an inline editor by the column it edits.
78
+ */
79
+ editColumn: (column: string) => string;
80
+ editPending: string;
81
+ /**
82
+ * Names every drag handle; the row a handle belongs to is evident from its position, so the
83
+ * label states the action, matching `selectRow` / `expandRow`.
84
+ */
85
+ reorderRow: string;
86
+ /**
87
+ * Why the handles are disabled — shown as their tooltip while sorting, a filter, a search or
88
+ * grouping controls the visible order.
89
+ */
90
+ rowOrderingUnavailable: string;
91
+ /**
92
+ * Announced when a drag lifts a row. The one place the keyboard drag model is spoken, so say
93
+ * what the keys do.
94
+ */
95
+ rowReorderLifted: (row: string) => string;
96
+ /**
97
+ * Announced as the drop target changes; `row` names the target the same way `currentRow`
98
+ * names rows (leading visible cell).
99
+ */
100
+ rowReorderTarget: (row: string, side: "before" | "after") => string;
101
+ rowReorderDropped: (row: string) => string;
102
+ rowReorderCanceled: string;
103
+ }
104
+ declare const defaultLabels: DataTableLabels;
105
+ //#endregion
106
+ export { defaultLabels as n, DataTableLabels as t };
107
+ //# sourceMappingURL=labels-ChBqD1II.d.cts.map
@@ -0,0 +1,107 @@
1
+
2
+ //#region src/labels.d.ts
3
+ /**
4
+ * Every user-visible string in the library flows through this object — components never hardcode
5
+ * a locale. App-wide configuration is the Mantine-native mechanism (theme defaultProps, see
6
+ * docs/i18n.md); a complete zh-CN preset ships from "./locales".
7
+ */
8
+ interface DataTableLabels {
9
+ paginationSummary: (from: number, to: number, total: number) => string;
10
+ rowsPerPage: string;
11
+ selectAllRows: string;
12
+ selectRow: string;
13
+ selectedCount: (count: number) => string;
14
+ clearSelection: string;
15
+ expandRow: string;
16
+ collapseRow: string;
17
+ expandAll: string;
18
+ collapseAll: string;
19
+ /**
20
+ * Describes the body viewport — the keyboard focus stop — while `enableActiveRow` is on. It
21
+ * is the only place the arrow-key row model is announced, so say what the keys do. A
22
+ * description, never a name: that div is roleless, and `generic` prohibits a name.
23
+ */
24
+ rowNavigation: string;
25
+ /**
26
+ * Announced politely whenever the current row changes: focus stays on the viewport, so without
27
+ * this the move is visual only.
28
+ */
29
+ currentRow: (row: string, index: number, count: number) => string;
30
+ columnsPanel: string;
31
+ resetColumns: string;
32
+ /**
33
+ * Logical positions (TanStack v9 vocabulary): start/end map to left/right in LTR layouts and
34
+ * mirror under RTL.
35
+ */
36
+ pinStart: string;
37
+ pinEnd: string;
38
+ unpin: string;
39
+ /**
40
+ * Zone captions the columns panel shows above its pinned columns; nouns for the state, where
41
+ * `pinStart` / `pinEnd` name the action.
42
+ */
43
+ pinnedStart: string;
44
+ pinnedEnd: string;
45
+ groupByColumn: string;
46
+ ungroupColumn: string;
47
+ columnWidth: string;
48
+ /**
49
+ * Width placeholder for a column whose definition declares no `size` — it grows to share the
50
+ * leftover viewport. A column that declares one shows that number instead.
51
+ */
52
+ columnWidthAuto: string;
53
+ resizeColumn: string;
54
+ reorderColumn: string;
55
+ /**
56
+ * Names the funnel trigger and the control inside it — an unnamed control in a table of them
57
+ * is unusable, so the column title is interpolated rather than left generic.
58
+ */
59
+ filterColumn: (column: string) => string;
60
+ clearFilter: string;
61
+ filterPlaceholder: string;
62
+ filterRangeMin: string;
63
+ filterRangeMax: string;
64
+ searchPlaceholder: string;
65
+ loading: string;
66
+ empty: string;
67
+ /**
68
+ * Zero rows while a column filter or the global search is active — a different situation
69
+ * than an empty data set, so it gets its own message.
70
+ */
71
+ noResults: string;
72
+ loadingMore: string;
73
+ error: string;
74
+ retry: string;
75
+ loadMoreError: string;
76
+ /**
77
+ * Names an inline editor by the column it edits.
78
+ */
79
+ editColumn: (column: string) => string;
80
+ editPending: string;
81
+ /**
82
+ * Names every drag handle; the row a handle belongs to is evident from its position, so the
83
+ * label states the action, matching `selectRow` / `expandRow`.
84
+ */
85
+ reorderRow: string;
86
+ /**
87
+ * Why the handles are disabled — shown as their tooltip while sorting, a filter, a search or
88
+ * grouping controls the visible order.
89
+ */
90
+ rowOrderingUnavailable: string;
91
+ /**
92
+ * Announced when a drag lifts a row. The one place the keyboard drag model is spoken, so say
93
+ * what the keys do.
94
+ */
95
+ rowReorderLifted: (row: string) => string;
96
+ /**
97
+ * Announced as the drop target changes; `row` names the target the same way `currentRow`
98
+ * names rows (leading visible cell).
99
+ */
100
+ rowReorderTarget: (row: string, side: "before" | "after") => string;
101
+ rowReorderDropped: (row: string) => string;
102
+ rowReorderCanceled: string;
103
+ }
104
+ declare const defaultLabels: DataTableLabels;
105
+ //#endregion
106
+ export { defaultLabels as n, DataTableLabels as t };
107
+ //# sourceMappingURL=labels-ChBqD1II.d.ts.map
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ //#region src/locales.ts
4
+ const zhCN = {
5
+ paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,
6
+ rowsPerPage: "每页行数",
7
+ selectAllRows: "全选",
8
+ selectRow: "选择行",
9
+ selectedCount: (count) => `已选 ${count} 项`,
10
+ clearSelection: "清除选择",
11
+ rowNavigation: "表格行 —— 使用方向键在行间移动",
12
+ currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,
13
+ expandRow: "展开行",
14
+ collapseRow: "收起行",
15
+ expandAll: "展开全部",
16
+ collapseAll: "收起全部",
17
+ columnsPanel: "列设置",
18
+ resetColumns: "重置",
19
+ pinStart: "固定到左侧",
20
+ pinEnd: "固定到右侧",
21
+ unpin: "取消固定",
22
+ pinnedStart: "左侧固定",
23
+ pinnedEnd: "右侧固定",
24
+ groupByColumn: "按此列分组",
25
+ ungroupColumn: "取消分组",
26
+ columnWidth: "宽度",
27
+ columnWidthAuto: "自适应",
28
+ resizeColumn: "拖动调整列宽;双击自适应内容",
29
+ reorderColumn: "拖拽调整列顺序",
30
+ filterColumn: (column) => `筛选${column}`,
31
+ clearFilter: "清除筛选",
32
+ filterPlaceholder: "筛选…",
33
+ filterRangeMin: "最小值",
34
+ filterRangeMax: "最大值",
35
+ searchPlaceholder: "搜索…",
36
+ loading: "加载中",
37
+ empty: "暂无数据",
38
+ noResults: "没有匹配的记录",
39
+ loadingMore: "加载更多",
40
+ error: "数据加载失败",
41
+ retry: "重试",
42
+ loadMoreError: "加载更多失败",
43
+ editColumn: (column) => `编辑${column}`,
44
+ editPending: "保存中",
45
+ reorderRow: "拖拽调整行顺序",
46
+ rowOrderingUnavailable: "清除排序、筛选和分组后才能调整行顺序",
47
+ rowReorderLifted: (row) => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,
48
+ rowReorderTarget: (row, side) => side === "before" ? `${row} 之前` : `${row} 之后`,
49
+ rowReorderDropped: (row) => `已放下 ${row}`,
50
+ rowReorderCanceled: "已取消调整"
51
+ };
52
+ //#endregion
53
+ exports.zhCN = zhCN;
54
+
55
+ //# sourceMappingURL=locales.cjs.map
@@ -0,0 +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;CAEb,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;CAEhB,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"}
@@ -0,0 +1,7 @@
1
+
2
+ import { t as DataTableLabels } from "./labels-ChBqD1II.cjs";
3
+ //#region src/locales.d.ts
4
+ declare const zhCN: DataTableLabels;
5
+ //#endregion
6
+ export { zhCN };
7
+ //# sourceMappingURL=locales.d.cts.map
@@ -0,0 +1,7 @@
1
+
2
+ import { t as DataTableLabels } from "./labels-ChBqD1II.js";
3
+ //#region src/locales.d.ts
4
+ declare const zhCN: DataTableLabels;
5
+ //#endregion
6
+ export { zhCN };
7
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ //#region src/locales.ts
3
+ const zhCN = {
4
+ paginationSummary: (from, to, total) => `第 ${from}–${to} 条,共 ${total} 条`,
5
+ rowsPerPage: "每页行数",
6
+ selectAllRows: "全选",
7
+ selectRow: "选择行",
8
+ selectedCount: (count) => `已选 ${count} 项`,
9
+ clearSelection: "清除选择",
10
+ rowNavigation: "表格行 —— 使用方向键在行间移动",
11
+ currentRow: (row, index, count) => `${row},第 ${index} 行,共 ${count} 行`,
12
+ expandRow: "展开行",
13
+ collapseRow: "收起行",
14
+ expandAll: "展开全部",
15
+ collapseAll: "收起全部",
16
+ columnsPanel: "列设置",
17
+ resetColumns: "重置",
18
+ pinStart: "固定到左侧",
19
+ pinEnd: "固定到右侧",
20
+ unpin: "取消固定",
21
+ pinnedStart: "左侧固定",
22
+ pinnedEnd: "右侧固定",
23
+ groupByColumn: "按此列分组",
24
+ ungroupColumn: "取消分组",
25
+ columnWidth: "宽度",
26
+ columnWidthAuto: "自适应",
27
+ resizeColumn: "拖动调整列宽;双击自适应内容",
28
+ reorderColumn: "拖拽调整列顺序",
29
+ filterColumn: (column) => `筛选${column}`,
30
+ clearFilter: "清除筛选",
31
+ filterPlaceholder: "筛选…",
32
+ filterRangeMin: "最小值",
33
+ filterRangeMax: "最大值",
34
+ searchPlaceholder: "搜索…",
35
+ loading: "加载中",
36
+ empty: "暂无数据",
37
+ noResults: "没有匹配的记录",
38
+ loadingMore: "加载更多",
39
+ error: "数据加载失败",
40
+ retry: "重试",
41
+ loadMoreError: "加载更多失败",
42
+ editColumn: (column) => `编辑${column}`,
43
+ editPending: "保存中",
44
+ reorderRow: "拖拽调整行顺序",
45
+ rowOrderingUnavailable: "清除排序、筛选和分组后才能调整行顺序",
46
+ rowReorderLifted: (row) => `已拿起 ${row} —— 方向键移动,空格放下,Esc 取消`,
47
+ rowReorderTarget: (row, side) => side === "before" ? `${row} 之前` : `${row} 之后`,
48
+ rowReorderDropped: (row) => `已放下 ${row}`,
49
+ rowReorderCanceled: "已取消调整"
50
+ };
51
+ //#endregion
52
+ export { zhCN };
53
+
54
+ //# sourceMappingURL=locales.js.map
@@ -0,0 +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;CAEb,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;CAEhB,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"}