phx-react 1.3.365 → 1.3.367
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/cjs/components/EmptyRecord/EmptyRecord.d.ts +1 -1
- package/dist/cjs/components/EmptyRecord/EmptyRecord.js +11 -21
- package/dist/cjs/components/EmptyRecord/EmptyRecord.js.map +1 -1
- package/dist/esm/components/EmptyRecord/EmptyRecord.d.ts +1 -1
- package/dist/esm/components/EmptyRecord/EmptyRecord.js +11 -21
- package/dist/esm/components/EmptyRecord/EmptyRecord.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,4 +7,4 @@ export interface PHXEmptyRecordProps {
|
|
|
7
7
|
secondaryAction?: ComplexAction;
|
|
8
8
|
type?: 'default' | 'small' | 'micro';
|
|
9
9
|
}
|
|
10
|
-
export declare function PHXEmptyRecord({ className, border,
|
|
10
|
+
export declare function PHXEmptyRecord({ className, border, type }: PHXEmptyRecordProps): React.JSX.Element;
|
|
@@ -3,42 +3,32 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.PHXEmptyRecord = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
var Button_1 = require("../Button");
|
|
7
6
|
function PHXEmptyRecord(_a) {
|
|
8
|
-
var className = _a.className, border = _a.border,
|
|
7
|
+
var className = _a.className, border = _a.border, _b = _a.type, type = _b === void 0 ? 'default' : _b;
|
|
8
|
+
var emptyTitle = 'Dữ liệu đang trống';
|
|
9
|
+
var emptyImage = 'https://static-data-sisv2.phx-smartschool.com/common/prod/empty-state2.png';
|
|
9
10
|
return (react_1["default"].createElement("div", { className: className },
|
|
10
11
|
type === 'default' && (react_1["default"].createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
11
12
|
react_1["default"].createElement("div", { className: 'flex flex-col' },
|
|
12
13
|
react_1["default"].createElement("div", { className: 'min-w-full px-6 py-2 pb-16 pt-16 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
13
14
|
react_1["default"].createElement("div", { className: 'px-4 pb-14' },
|
|
14
15
|
react_1["default"].createElement("div", { className: 'text-center' },
|
|
15
|
-
react_1["default"].createElement("img", { src: '
|
|
16
|
-
react_1["default"].createElement("
|
|
17
|
-
react_1["default"].createElement("p", { className: 'text-xs text-gray-800 pt-1' }, "Vui l\u00F2ng th\u00EAm m\u1EDBi d\u1EEF li\u1EC7u \u0111\u1EC3 theo d\u00F5i danh s\u00E1ch."),
|
|
18
|
-
primaryAction || secondaryAction ? (react_1["default"].createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
19
|
-
secondaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
20
|
-
primaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null)))))),
|
|
16
|
+
react_1["default"].createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
17
|
+
react_1["default"].createElement("span", { className: 'text-sm font-medium mt-4 text-gray-500' }, emptyTitle))))))),
|
|
21
18
|
type === 'small' && (react_1["default"].createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
22
19
|
react_1["default"].createElement("div", { className: 'flex flex-col' },
|
|
23
|
-
react_1["default"].createElement("div", { className: 'min-w-full px-6 py-2 pb-
|
|
24
|
-
react_1["default"].createElement("div", { className: 'px-4
|
|
20
|
+
react_1["default"].createElement("div", { className: 'min-w-full px-6 py-2 pb-10 pt-10 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
21
|
+
react_1["default"].createElement("div", { className: 'px-4' },
|
|
25
22
|
react_1["default"].createElement("div", { className: 'text-center' },
|
|
26
|
-
react_1["default"].createElement("img", { src: '
|
|
27
|
-
react_1["default"].createElement("
|
|
28
|
-
react_1["default"].createElement("p", { className: 'text-xs text-gray-800 pt-1' }, "Vui l\u00F2ng th\u00EAm m\u1EDBi d\u1EEF li\u1EC7u \u0111\u1EC3 theo d\u00F5i danh s\u00E1ch."),
|
|
29
|
-
primaryAction || secondaryAction ? (react_1["default"].createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
30
|
-
secondaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
31
|
-
primaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null)))))),
|
|
23
|
+
react_1["default"].createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
24
|
+
react_1["default"].createElement("span", { className: 'text-xs font-medium text-gray-500' }, emptyTitle))))))),
|
|
32
25
|
type === 'micro' && (react_1["default"].createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
33
26
|
react_1["default"].createElement("div", { className: 'flex flex-col' },
|
|
34
27
|
react_1["default"].createElement("div", { className: 'min-w-full px-6 py-2 pb-8 pt-8 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
35
28
|
react_1["default"].createElement("div", { className: 'px-4 pb-5' },
|
|
36
29
|
react_1["default"].createElement("div", { className: 'text-center' },
|
|
37
|
-
react_1["default"].createElement("img", { src: '
|
|
38
|
-
react_1["default"].createElement("
|
|
39
|
-
primaryAction || secondaryAction ? (react_1["default"].createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
40
|
-
secondaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
41
|
-
primaryAction ? (react_1["default"].createElement(Button_1.PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null))))))));
|
|
30
|
+
react_1["default"].createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
31
|
+
react_1["default"].createElement("span", { className: 'text-xs font-medium text-gray-500' }, emptyTitle)))))))));
|
|
42
32
|
}
|
|
43
33
|
exports.PHXEmptyRecord = PHXEmptyRecord;
|
|
44
34
|
//# sourceMappingURL=EmptyRecord.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyRecord.js","sourceRoot":"","sources":["../../../../src/components/EmptyRecord/EmptyRecord.tsx"],"names":[],"mappings":";;;;AAAA,wDAAyB;
|
|
1
|
+
{"version":3,"file":"EmptyRecord.js","sourceRoot":"","sources":["../../../../src/components/EmptyRecord/EmptyRecord.tsx"],"names":[],"mappings":";;;;AAAA,wDAAyB;AAWzB,SAAgB,cAAc,CAAC,EAA4D;QAA1D,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA;IAClE,IAAM,UAAU,GAAG,oBAAoB,CAAA;IACvC,IAAM,UAAU,GAAG,4EAA4E,CAAA;IAC/F,OAAO,CACL,0CAAK,SAAS,EAAE,SAAS;QACtB,IAAI,KAAK,SAAS,IAAI,CACrB,0CAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,0CAAK,SAAS,EAAC,eAAe;gBAC5B,0CAAK,SAAS,EAAC,uEAAuE;oBACpF,0CAAK,SAAS,EAAC,YAAY;wBACzB,0CAAK,SAAS,EAAC,aAAa;4BAC1B,0CAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,2CAAM,SAAS,EAAC,wCAAwC,IAAE,UAAU,CAAQ,CACxE,CACF,CACF,CACF,CACF,CACP;QACA,IAAI,KAAK,OAAO,IAAI,CACnB,0CAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,0CAAK,SAAS,EAAC,eAAe;gBAC5B,0CAAK,SAAS,EAAC,uEAAuE;oBACpF,0CAAK,SAAS,EAAC,MAAM;wBACnB,0CAAK,SAAS,EAAC,aAAa;4BAC1B,0CAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,2CAAM,SAAS,EAAC,mCAAmC,IAAE,UAAU,CAAQ,CACnE,CACF,CACF,CACF,CACF,CACP;QACA,IAAI,KAAK,OAAO,IAAI,CACnB,0CAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,0CAAK,SAAS,EAAC,eAAe;gBAC5B,0CAAK,SAAS,EAAC,qEAAqE;oBAClF,0CAAK,SAAS,EAAC,WAAW;wBACxB,0CAAK,SAAS,EAAC,aAAa;4BAC1B,0CAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,2CAAM,SAAS,EAAC,mCAAmC,IAAE,UAAU,CAAQ,CACnE,CACF,CACF,CACF,CACF,CACP,CACG,CACP,CAAA;AACH,CAAC;AAjDD,wCAiDC"}
|
|
@@ -7,4 +7,4 @@ export interface PHXEmptyRecordProps {
|
|
|
7
7
|
secondaryAction?: ComplexAction;
|
|
8
8
|
type?: 'default' | 'small' | 'micro';
|
|
9
9
|
}
|
|
10
|
-
export declare function PHXEmptyRecord({ className, border,
|
|
10
|
+
export declare function PHXEmptyRecord({ className, border, type }: PHXEmptyRecordProps): React.JSX.Element;
|
|
@@ -1,39 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PHXButton } from '../Button';
|
|
3
2
|
export function PHXEmptyRecord(_a) {
|
|
4
|
-
var className = _a.className, border = _a.border,
|
|
3
|
+
var className = _a.className, border = _a.border, _b = _a.type, type = _b === void 0 ? 'default' : _b;
|
|
4
|
+
var emptyTitle = 'Dữ liệu đang trống';
|
|
5
|
+
var emptyImage = 'https://static-data-sisv2.phx-smartschool.com/common/prod/empty-state2.png';
|
|
5
6
|
return (React.createElement("div", { className: className },
|
|
6
7
|
type === 'default' && (React.createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
7
8
|
React.createElement("div", { className: 'flex flex-col' },
|
|
8
9
|
React.createElement("div", { className: 'min-w-full px-6 py-2 pb-16 pt-16 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
9
10
|
React.createElement("div", { className: 'px-4 pb-14' },
|
|
10
11
|
React.createElement("div", { className: 'text-center' },
|
|
11
|
-
React.createElement("img", { src: '
|
|
12
|
-
React.createElement("
|
|
13
|
-
React.createElement("p", { className: 'text-xs text-gray-800 pt-1' }, "Vui l\u00F2ng th\u00EAm m\u1EDBi d\u1EEF li\u1EC7u \u0111\u1EC3 theo d\u00F5i danh s\u00E1ch."),
|
|
14
|
-
primaryAction || secondaryAction ? (React.createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
15
|
-
secondaryAction ? (React.createElement(PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
16
|
-
primaryAction ? (React.createElement(PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null)))))),
|
|
12
|
+
React.createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
13
|
+
React.createElement("span", { className: 'text-sm font-medium mt-4 text-gray-500' }, emptyTitle))))))),
|
|
17
14
|
type === 'small' && (React.createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
18
15
|
React.createElement("div", { className: 'flex flex-col' },
|
|
19
|
-
React.createElement("div", { className: 'min-w-full px-6 py-2 pb-
|
|
20
|
-
React.createElement("div", { className: 'px-4
|
|
16
|
+
React.createElement("div", { className: 'min-w-full px-6 py-2 pb-10 pt-10 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
17
|
+
React.createElement("div", { className: 'px-4' },
|
|
21
18
|
React.createElement("div", { className: 'text-center' },
|
|
22
|
-
React.createElement("img", { src: '
|
|
23
|
-
React.createElement("
|
|
24
|
-
React.createElement("p", { className: 'text-xs text-gray-800 pt-1' }, "Vui l\u00F2ng th\u00EAm m\u1EDBi d\u1EEF li\u1EC7u \u0111\u1EC3 theo d\u00F5i danh s\u00E1ch."),
|
|
25
|
-
primaryAction || secondaryAction ? (React.createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
26
|
-
secondaryAction ? (React.createElement(PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
27
|
-
primaryAction ? (React.createElement(PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null)))))),
|
|
19
|
+
React.createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
20
|
+
React.createElement("span", { className: 'text-xs font-medium text-gray-500' }, emptyTitle))))))),
|
|
28
21
|
type === 'micro' && (React.createElement("div", { className: "bg-white shadow sm:rounded-lg ".concat(border ? 'border' : '') },
|
|
29
22
|
React.createElement("div", { className: 'flex flex-col' },
|
|
30
23
|
React.createElement("div", { className: 'min-w-full px-6 py-2 pb-8 pt-8 align-middle md:px-6 md:pr-0 lg:px-8' },
|
|
31
24
|
React.createElement("div", { className: 'px-4 pb-5' },
|
|
32
25
|
React.createElement("div", { className: 'text-center' },
|
|
33
|
-
React.createElement("img", { src: '
|
|
34
|
-
React.createElement("
|
|
35
|
-
primaryAction || secondaryAction ? (React.createElement("div", { className: 'mt-3.5 flex justify-center gap-x-2' },
|
|
36
|
-
secondaryAction ? (React.createElement(PHXButton, { secondary: true, size: 'micro', onClick: secondaryAction.onClick }, secondaryAction.content)) : null,
|
|
37
|
-
primaryAction ? (React.createElement(PHXButton, { primary: true, size: 'micro', onClick: primaryAction.onClick }, primaryAction.content)) : null)) : null))))))));
|
|
26
|
+
React.createElement("img", { src: emptyImage, className: 'md:w-2/3 lg:w-1/4 sm:w-2/5 mx-auto', alt: 'empty state' }),
|
|
27
|
+
React.createElement("span", { className: 'text-xs font-medium text-gray-500' }, emptyTitle)))))))));
|
|
38
28
|
}
|
|
39
29
|
//# sourceMappingURL=EmptyRecord.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyRecord.js","sourceRoot":"","sources":["../../../../src/components/EmptyRecord/EmptyRecord.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"EmptyRecord.js","sourceRoot":"","sources":["../../../../src/components/EmptyRecord/EmptyRecord.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAWzB,MAAM,UAAU,cAAc,CAAC,EAA4D;QAA1D,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,YAAgB,EAAhB,IAAI,mBAAG,SAAS,KAAA;IAClE,IAAM,UAAU,GAAG,oBAAoB,CAAA;IACvC,IAAM,UAAU,GAAG,4EAA4E,CAAA;IAC/F,OAAO,CACL,6BAAK,SAAS,EAAE,SAAS;QACtB,IAAI,KAAK,SAAS,IAAI,CACrB,6BAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,6BAAK,SAAS,EAAC,eAAe;gBAC5B,6BAAK,SAAS,EAAC,uEAAuE;oBACpF,6BAAK,SAAS,EAAC,YAAY;wBACzB,6BAAK,SAAS,EAAC,aAAa;4BAC1B,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,8BAAM,SAAS,EAAC,wCAAwC,IAAE,UAAU,CAAQ,CACxE,CACF,CACF,CACF,CACF,CACP;QACA,IAAI,KAAK,OAAO,IAAI,CACnB,6BAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,6BAAK,SAAS,EAAC,eAAe;gBAC5B,6BAAK,SAAS,EAAC,uEAAuE;oBACpF,6BAAK,SAAS,EAAC,MAAM;wBACnB,6BAAK,SAAS,EAAC,aAAa;4BAC1B,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,8BAAM,SAAS,EAAC,mCAAmC,IAAE,UAAU,CAAQ,CACnE,CACF,CACF,CACF,CACF,CACP;QACA,IAAI,KAAK,OAAO,IAAI,CACnB,6BAAK,SAAS,EAAE,wCAAiC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAE;YACvE,6BAAK,SAAS,EAAC,eAAe;gBAC5B,6BAAK,SAAS,EAAC,qEAAqE;oBAClF,6BAAK,SAAS,EAAC,WAAW;wBACxB,6BAAK,SAAS,EAAC,aAAa;4BAC1B,6BAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,oCAAoC,EAAC,GAAG,EAAC,aAAa,GAAG;4BACzF,8BAAM,SAAS,EAAC,mCAAmC,IAAE,UAAU,CAAQ,CACnE,CACF,CACF,CACF,CACF,CACP,CACG,CACP,CAAA;AACH,CAAC"}
|