@tipp/ui 1.0.48 → 1.0.49
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/atoms/drawer.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +54 -54
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-MDBFTLD7.js +72 -0
- package/dist/chunk-MDBFTLD7.js.map +1 -0
- package/dist/chunk-N4GN6CKE.js +123 -0
- package/dist/chunk-N4GN6CKE.js.map +1 -0
- package/dist/chunk-PL37KFRJ.js +1 -0
- package/dist/chunk-PL37KFRJ.js.map +1 -0
- package/dist/chunk-T6KADTJZ.js +18 -0
- package/dist/chunk-T6KADTJZ.js.map +1 -0
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -70
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +25 -25
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +24 -24
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +29 -29
- package/dist/molecules/navigation.js +24 -24
- package/dist/utils/get-cell-align.cjs +42 -0
- package/dist/utils/get-cell-align.cjs.map +1 -0
- package/dist/utils/get-cell-align.js +8 -0
- package/dist/utils/get-cell-align.js.map +1 -0
- package/dist/utils/index.cjs +44 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/molecules/expand-table/row.tsx +2 -1
- package/src/utils/get-cell-align.ts +18 -0
- package/src/utils/index.ts +1 -0
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Navigation
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RKLEKAON.js";
|
|
4
4
|
import "../chunk-2ANGYYEV.js";
|
|
5
|
-
import "../chunk-JPIZP2PZ.js";
|
|
6
|
-
import "../chunk-HYITAA4J.js";
|
|
7
|
-
import "../chunk-5H3YPCZK.js";
|
|
8
|
-
import "../chunk-FR2GDOU2.js";
|
|
9
5
|
import "../chunk-74DX4CU7.js";
|
|
10
6
|
import "../chunk-OYM4XCHQ.js";
|
|
11
7
|
import "../chunk-YJ7ZFOYL.js";
|
|
12
8
|
import "../chunk-5ZITU5L7.js";
|
|
13
9
|
import "../chunk-ILRUXI2E.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-6IVCARWS.js";
|
|
16
|
-
import "../chunk-6DJOIRMF.js";
|
|
10
|
+
import "../chunk-JPIZP2PZ.js";
|
|
17
11
|
import "../chunk-FPD73OHW.js";
|
|
18
12
|
import "../chunk-ZKZDVS7G.js";
|
|
19
13
|
import "../chunk-MUNMDHRF.js";
|
|
20
14
|
import "../chunk-TVDKGMBI.js";
|
|
21
15
|
import "../chunk-3JRNKBMN.js";
|
|
22
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-HYITAA4J.js";
|
|
17
|
+
import "../chunk-5H3YPCZK.js";
|
|
18
|
+
import "../chunk-FR2GDOU2.js";
|
|
23
19
|
import "../chunk-TULWX7D6.js";
|
|
24
20
|
import "../chunk-XQOZWYUA.js";
|
|
25
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-FQYPUIFX.js";
|
|
26
22
|
import "../chunk-5AVBYDPB.js";
|
|
27
23
|
import "../chunk-365QMK4D.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-CNQ7RNNY.js";
|
|
32
|
-
import "../chunk-O3XTRD7R.js";
|
|
33
|
-
import "../chunk-25HMMI7R.js";
|
|
24
|
+
import "../chunk-YO3BQW6S.js";
|
|
25
|
+
import "../chunk-6IVCARWS.js";
|
|
26
|
+
import "../chunk-6DJOIRMF.js";
|
|
34
27
|
import "../chunk-2CVXGGI5.js";
|
|
35
28
|
import "../chunk-EGEQY3KT.js";
|
|
36
29
|
import "../chunk-HLOY6BIP.js";
|
|
37
30
|
import "../chunk-O3T3TM3V.js";
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-OHMOP5PV.js";
|
|
40
|
-
import "../chunk-KGLIAFTI.js";
|
|
31
|
+
import "../chunk-XQOL7UBI.js";
|
|
41
32
|
import "../chunk-Q37G2GS6.js";
|
|
42
33
|
import "../chunk-VTJZMOSP.js";
|
|
43
34
|
import "../chunk-P6B2PNYI.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-NJ2U2TVS.js";
|
|
35
|
+
import "../chunk-NBJOYJAF.js";
|
|
46
36
|
import "../chunk-BVBX6IJ3.js";
|
|
37
|
+
import "../chunk-NJ2U2TVS.js";
|
|
47
38
|
import "../chunk-O3DNDMV3.js";
|
|
48
39
|
import "../chunk-4WFMOFN2.js";
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-4IKPNQV5.js";
|
|
41
|
+
import "../chunk-ACVANQJ4.js";
|
|
42
|
+
import "../chunk-2DZ2Y3JI.js";
|
|
43
|
+
import "../chunk-CHHLIPDN.js";
|
|
44
|
+
import "../chunk-25HMMI7R.js";
|
|
45
|
+
import "../chunk-O3XTRD7R.js";
|
|
52
46
|
import "../chunk-AQX7DQLI.js";
|
|
53
47
|
import "../chunk-B6XJN6EC.js";
|
|
54
48
|
import "../chunk-UVKNLJDZ.js";
|
|
55
49
|
import "../chunk-MIMJ7LON.js";
|
|
56
50
|
import "../chunk-IQEEPHOY.js";
|
|
51
|
+
import "../chunk-JEHDCZQU.js";
|
|
52
|
+
import "../chunk-OHMOP5PV.js";
|
|
53
|
+
import "../chunk-KGLIAFTI.js";
|
|
57
54
|
import "../chunk-TSVWEPRP.js";
|
|
58
55
|
import "../chunk-J242TTFH.js";
|
|
59
56
|
import "../chunk-EAXUQEO5.js";
|
|
60
57
|
import "../chunk-CZEGRZBK.js";
|
|
58
|
+
import "../chunk-ALOPZ54P.js";
|
|
59
|
+
import "../chunk-YGL6SWKN.js";
|
|
60
|
+
import "../chunk-4Y5BEXVN.js";
|
|
61
61
|
import "../chunk-N552FDTV.js";
|
|
62
62
|
export {
|
|
63
63
|
Navigation
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/get-cell-align.ts
|
|
21
|
+
var get_cell_align_exports = {};
|
|
22
|
+
__export(get_cell_align_exports, {
|
|
23
|
+
getCellAlign: () => getCellAlign
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(get_cell_align_exports);
|
|
26
|
+
var getCellAlign = (arg) => {
|
|
27
|
+
const { dataType } = arg;
|
|
28
|
+
switch (dataType) {
|
|
29
|
+
case "number":
|
|
30
|
+
case "date":
|
|
31
|
+
case "time":
|
|
32
|
+
return "right";
|
|
33
|
+
case "string":
|
|
34
|
+
default:
|
|
35
|
+
return "left";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
getCellAlign
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=get-cell-align.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-cell-align.ts"],"sourcesContent":["import type { ColumnMeta } from '@tanstack/react-table';\n\nexport type CellDataType = 'number' | 'date' | 'time' | 'string' | 'button';\nexport type CellAlign = NonNullable<ColumnMeta<unknown, unknown>['align']>;\n\nexport const getCellAlign = (arg: { dataType: CellDataType }): CellAlign => {\n const { dataType } = arg;\n\n switch (dataType) {\n case 'number':\n case 'date':\n case 'time':\n return 'right';\n case 'string':\n default:\n return 'left';\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,eAAe,CAAC,QAA+C;AAC1E,QAAM,EAAE,SAAS,IAAI;AAErB,UAAQ,UAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/utils/index.ts
|
|
21
|
+
var utils_exports = {};
|
|
22
|
+
__export(utils_exports, {
|
|
23
|
+
getCellAlign: () => getCellAlign
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
|
|
27
|
+
// src/utils/get-cell-align.ts
|
|
28
|
+
var getCellAlign = (arg) => {
|
|
29
|
+
const { dataType } = arg;
|
|
30
|
+
switch (dataType) {
|
|
31
|
+
case "number":
|
|
32
|
+
case "date":
|
|
33
|
+
case "time":
|
|
34
|
+
return "right";
|
|
35
|
+
case "string":
|
|
36
|
+
default:
|
|
37
|
+
return "left";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
getCellAlign
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/utils/get-cell-align.ts"],"sourcesContent":["export * from './get-cell-align';\n","import type { ColumnMeta } from '@tanstack/react-table';\n\nexport type CellDataType = 'number' | 'date' | 'time' | 'string' | 'button';\nexport type CellAlign = NonNullable<ColumnMeta<unknown, unknown>['align']>;\n\nexport const getCellAlign = (arg: { dataType: CellDataType }): CellAlign => {\n const { dataType } = arg;\n\n switch (dataType) {\n case 'number':\n case 'date':\n case 'time':\n return 'right';\n case 'string':\n default:\n return 'left';\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,eAAe,CAAC,QAA+C;AAC1E,QAAM,EAAE,SAAS,IAAI;AAErB,UAAQ,UAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL;AACE,aAAO;AAAA,EACX;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipp/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"postcss-nesting": "12.0.2",
|
|
54
54
|
"tsup": "^8.0.2",
|
|
55
55
|
"typescript": "^5.3.3",
|
|
56
|
-
"@tipp/
|
|
57
|
-
"@tipp/
|
|
56
|
+
"@tipp/typescript-config": "0.0.4",
|
|
57
|
+
"@tipp/eslint-config": "0.2.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "pnpm run build:js & pnpm run build:css",
|
package/src/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
} from '@tanstack/react-table';
|
|
6
6
|
import React, { useCallback, useState } from 'react';
|
|
7
7
|
import { Collapse } from '../../atoms';
|
|
8
|
+
import type { CellAlign } from '../../utils/get-cell-align';
|
|
8
9
|
|
|
9
10
|
export type ExpandComp<Datum> = React.FC<{ row: TanstackRow<Datum> }>;
|
|
10
11
|
export type OnRowClick<Datum> = (data: Datum) => void;
|
|
@@ -14,7 +15,7 @@ interface RowProps<Datum extends RowData> {
|
|
|
14
15
|
ExpandComp?: ExpandComp<Datum>;
|
|
15
16
|
onRowClick?: OnRowClick<Datum>;
|
|
16
17
|
gridColTemp: string;
|
|
17
|
-
defaultAlign:
|
|
18
|
+
defaultAlign: CellAlign;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export function Row<Datum extends RowData>(
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ColumnMeta } from '@tanstack/react-table';
|
|
2
|
+
|
|
3
|
+
export type CellDataType = 'number' | 'date' | 'time' | 'string' | 'button';
|
|
4
|
+
export type CellAlign = NonNullable<ColumnMeta<unknown, unknown>['align']>;
|
|
5
|
+
|
|
6
|
+
export const getCellAlign = (arg: { dataType: CellDataType }): CellAlign => {
|
|
7
|
+
const { dataType } = arg;
|
|
8
|
+
|
|
9
|
+
switch (dataType) {
|
|
10
|
+
case 'number':
|
|
11
|
+
case 'date':
|
|
12
|
+
case 'time':
|
|
13
|
+
return 'right';
|
|
14
|
+
case 'string':
|
|
15
|
+
default:
|
|
16
|
+
return 'left';
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-cell-align';
|