@astral/ui 0.48.2 → 1.1.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/Chevron/styles.js +3 -1
- package/DataGridPagination/DataGridPagination.js +2 -2
- package/DataGridPagination/{styled.d.ts → styles.d.ts} +0 -0
- package/DataGridPagination/{styled.js → styles.js} +0 -0
- package/esm/Chevron/styles.js +3 -1
- package/esm/DataGridPagination/DataGridPagination.js +2 -2
- package/esm/DataGridPagination/{styled.d.ts → styles.d.ts} +0 -0
- package/esm/DataGridPagination/{styled.js → styles.js} +0 -0
- package/package.json +2 -2
package/Chevron/styles.js
CHANGED
|
@@ -7,7 +7,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
exports.ChevronWrapper = void 0;
|
|
8
8
|
var icons_1 = require("@astral/icons");
|
|
9
9
|
var styles_1 = require("../styles");
|
|
10
|
-
exports.ChevronWrapper = (0, styles_1.styled)(icons_1.ChevronDOutlineMd
|
|
10
|
+
exports.ChevronWrapper = (0, styles_1.styled)(icons_1.ChevronDOutlineMd, {
|
|
11
|
+
shouldForwardProp: function (prop) { return prop !== 'isActive'; },
|
|
12
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotateZ(", "deg);\n\n transition: ", ";\n"], ["\n transform: rotateZ(", "deg);\n\n transition: ", ";\n"])), function (_a) {
|
|
11
13
|
var isActive = _a.isActive;
|
|
12
14
|
return (isActive ? 180 : 0);
|
|
13
15
|
}, function (_a) {
|
|
@@ -26,13 +26,13 @@ exports.DataGridPagination = void 0;
|
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var react_1 = require("react");
|
|
28
28
|
var Pagination_1 = require("../Pagination");
|
|
29
|
-
var
|
|
29
|
+
var styles_1 = require("./styles");
|
|
30
30
|
var DataGridPagination = function (_a) {
|
|
31
31
|
var page = _a.page, _b = _a.rowsPerPage, rowsPerPage = _b === void 0 ? 10 : _b, totalCount = _a.totalCount, className = _a.className, props = __rest(_a, ["page", "rowsPerPage", "totalCount", "className"]);
|
|
32
32
|
var count = Math.ceil(totalCount / rowsPerPage);
|
|
33
33
|
var rangeStart = (0, react_1.useMemo)(function () { return (page - 1) * rowsPerPage + 1; }, [page, rowsPerPage]);
|
|
34
34
|
var rangeEnd = (0, react_1.useMemo)(function () { return (page - 1) * rowsPerPage + rowsPerPage; }, [page, rowsPerPage]);
|
|
35
35
|
var formattedRange = "".concat(rangeStart, " \u2014 ").concat(rangeEnd, " \u0438\u0437 ").concat(totalCount, " \u0437\u0430\u043F\u0438\u0441\u0435\u0439");
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.PaginationWrapper, __assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(styles_1.Range, __assign({ variant: "h6" }, { children: formattedRange })), (0, jsx_runtime_1.jsx)(Pagination_1.Pagination, __assign({ count: count, page: page }, props))] })));
|
|
37
37
|
};
|
|
38
38
|
exports.DataGridPagination = DataGridPagination;
|
|
File without changes
|
|
File without changes
|
package/esm/Chevron/styles.js
CHANGED
|
@@ -4,7 +4,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { ChevronDOutlineMd } from '@astral/icons';
|
|
6
6
|
import { styled } from '../styles';
|
|
7
|
-
export var ChevronWrapper = styled(ChevronDOutlineMd
|
|
7
|
+
export var ChevronWrapper = styled(ChevronDOutlineMd, {
|
|
8
|
+
shouldForwardProp: function (prop) { return prop !== 'isActive'; },
|
|
9
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotateZ(", "deg);\n\n transition: ", ";\n"], ["\n transform: rotateZ(", "deg);\n\n transition: ", ";\n"])), function (_a) {
|
|
8
10
|
var isActive = _a.isActive;
|
|
9
11
|
return (isActive ? 180 : 0);
|
|
10
12
|
}, function (_a) {
|
|
@@ -23,12 +23,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { useMemo } from 'react';
|
|
25
25
|
import { Pagination } from '../Pagination';
|
|
26
|
-
import { PaginationWrapper, Range } from './
|
|
26
|
+
import { PaginationWrapper, Range } from './styles';
|
|
27
27
|
export var DataGridPagination = function (_a) {
|
|
28
28
|
var page = _a.page, _b = _a.rowsPerPage, rowsPerPage = _b === void 0 ? 10 : _b, totalCount = _a.totalCount, className = _a.className, props = __rest(_a, ["page", "rowsPerPage", "totalCount", "className"]);
|
|
29
29
|
var count = Math.ceil(totalCount / rowsPerPage);
|
|
30
30
|
var rangeStart = useMemo(function () { return (page - 1) * rowsPerPage + 1; }, [page, rowsPerPage]);
|
|
31
31
|
var rangeEnd = useMemo(function () { return (page - 1) * rowsPerPage + rowsPerPage; }, [page, rowsPerPage]);
|
|
32
32
|
var formattedRange = "".concat(rangeStart, " \u2014 ").concat(rangeEnd, " \u0438\u0437 ").concat(totalCount, " \u0437\u0430\u043F\u0438\u0441\u0435\u0439");
|
|
33
|
-
return (_jsxs(PaginationWrapper, __assign({ className: className }, { children: [_jsx(Range, __assign({ variant: "h6" }, { children: formattedRange })), _jsx(Pagination, __assign({ count: count }, props))] })));
|
|
33
|
+
return (_jsxs(PaginationWrapper, __assign({ className: className }, { children: [_jsx(Range, __assign({ variant: "h6" }, { children: formattedRange })), _jsx(Pagination, __assign({ count: count, page: page }, props))] })));
|
|
34
34
|
};
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "v1.1.1",
|
|
4
4
|
"browser": "./src/index.ts",
|
|
5
5
|
"jest": {
|
|
6
6
|
"moduleNameMapper": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@astral/icons": "^
|
|
11
|
+
"@astral/icons": "^v1.1.1",
|
|
12
12
|
"@emotion/cache": "11.7.1",
|
|
13
13
|
"@emotion/react": "11.9.0",
|
|
14
14
|
"@emotion/server": "11.4.0",
|