wini-web-components 2.2.3 → 2.2.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { CSSProperties } from "react";
|
|
2
|
-
|
|
2
|
+
interface Props {
|
|
3
3
|
id?: string;
|
|
4
4
|
currentPage: number;
|
|
5
5
|
itemPerPage: number;
|
|
@@ -8,4 +8,6 @@ export declare function Pagination({ id, currentPage, itemPerPage, totalItem, on
|
|
|
8
8
|
hideGoToPage?: boolean;
|
|
9
9
|
hidePageSize?: boolean;
|
|
10
10
|
style: CSSProperties;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
|
+
export declare function Pagination({ id, currentPage, itemPerPage, totalItem, onChangePage, hidePageSize, hideGoToPage, style }: Props): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -55,20 +55,18 @@ function Pagination(_a) {
|
|
|
55
55
|
onChangePage(currentPage, isNaN(parseInt(ev.id)) ? itemPerPage : parseInt(ev.id));
|
|
56
56
|
} }),
|
|
57
57
|
react_1.default.createElement(text_1.Text, { className: "body-3" },
|
|
58
|
-
"of ",
|
|
58
|
+
"of $",
|
|
59
59
|
totalItem,
|
|
60
60
|
" items")),
|
|
61
61
|
react_1.default.createElement("div", { style: { flex: 1 } }),
|
|
62
62
|
react_1.default.createElement(react_paginate_1.default, { onPageChange: function (ev) {
|
|
63
63
|
onChangePage(ev.selected + 1, itemPerPage);
|
|
64
|
-
}, forcePage: currentPage - 1,
|
|
65
|
-
// initialPage={currentPage - 1}
|
|
66
|
-
breakClassName: "row button-text-3", breakLabel: "...", pageCount: Math.ceil(totalItem / itemPerPage), previousClassName: "row", previousLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/left-arrow", size: "1.4rem" }), nextClassName: "row", nextLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/right-arrow", size: "1.4rem" }), containerClassName: "".concat(pagination_module_css_1.default['pagination'], " row"), pageClassName: "row button-text-3", activeClassName: pagination_module_css_1.default['active'], hrefBuilder: function (pageIndex) {
|
|
64
|
+
}, forcePage: currentPage - 1, breakClassName: "row button-text-3", breakLabel: "...", pageCount: Math.ceil(totalItem / itemPerPage), previousClassName: "row", previousLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/left-arrow", size: "1.4rem" }), nextClassName: "row", nextLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/right-arrow", size: "1.4rem" }), containerClassName: "".concat(pagination_module_css_1.default['pagination'], " row"), pageClassName: "row button-text-3", activeClassName: pagination_module_css_1.default['active'], hrefBuilder: function (pageIndex) {
|
|
67
65
|
return pageIndex >= 1 && pageIndex <= Math.ceil(totalItem / itemPerPage) ? "/page/".concat(pageIndex) : '#';
|
|
68
66
|
}, renderOnZeroPageCount: null }),
|
|
69
67
|
hideGoToPage ? null : react_1.default.createElement(react_1.default.Fragment, null,
|
|
70
|
-
react_1.default.createElement("div", { style: { height: '1.6rem', backgroundColor: "
|
|
71
|
-
react_1.default.createElement(text_1.Text, { className: "label-3"
|
|
68
|
+
react_1.default.createElement("div", { style: { height: '1.6rem', backgroundColor: "var(--neutral-bolder-border-color)", width: 1 } }),
|
|
69
|
+
react_1.default.createElement(text_1.Text, { className: "label-3" }, "Go to page"),
|
|
72
70
|
react_1.default.createElement(text_field_1.TextField, { ref: goToPageRef, style: { width: '4.8rem', textAlign: "center", padding: 0, height: '2.4rem', borderRadius: '0.4rem' }, className: "body-3", type: "number", onBlur: function (ev) {
|
|
73
71
|
var _tmp = ev.target.value.trim().length ? parseInt(ev.target.value.trim()) : undefined;
|
|
74
72
|
if (_tmp && !isNaN(_tmp) && _tmp > 0 && _tmp <= Math.ceil(totalItem / itemPerPage)) {
|
|
@@ -40,8 +40,8 @@ var RadioButton = /** @class */ (function (_super) {
|
|
|
40
40
|
RadioButton.prototype.render = function () {
|
|
41
41
|
var _a, _b, _c;
|
|
42
42
|
var convertStyle = {
|
|
43
|
-
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : '
|
|
44
|
-
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--
|
|
43
|
+
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : 'var(--neutral-bolder-border-color)',
|
|
44
|
+
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
45
45
|
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '20px'
|
|
46
46
|
};
|
|
47
47
|
if (this.props.style) {
|
|
@@ -53,7 +53,7 @@ var Switch = /** @class */ (function (_super) {
|
|
|
53
53
|
var _a, _b, _c, _d, _e;
|
|
54
54
|
var propStyle = {
|
|
55
55
|
'--off-bg': (_a = this.props.offBackground) !== null && _a !== void 0 ? _a : 'var(--neutral-main-background-color)',
|
|
56
|
-
'--on-bg': (_b = this.props.onBackground) !== null && _b !== void 0 ? _b : 'var(--
|
|
56
|
+
'--on-bg': (_b = this.props.onBackground) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
57
57
|
'--dot-color': (_c = this.props.dotColor) !== null && _c !== void 0 ? _c : '#ffffff',
|
|
58
58
|
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '2rem'
|
|
59
59
|
};
|