widenarrow-ui 1.0.50 → 1.0.52
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/lib/components/Pagination/Pagination.types.d.ts +1 -3
- package/lib/index.d.ts +1 -3
- package/lib/index.esm.js +7 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +7 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/svg/dynamicDate.tsx +0 -5
- package/src/components/Pagination/Pagination.stories.tsx +2 -2
- package/src/components/Pagination/Pagination.tsx +3 -3
- package/src/components/Pagination/Pagination.types.ts +1 -1
- package/src/components/Typography/Typography.tsx +4 -0
|
@@ -14,9 +14,7 @@ export interface PaginationProps {
|
|
|
14
14
|
previousPageTitle?: string;
|
|
15
15
|
firstPageTitle?: string;
|
|
16
16
|
lastPageTitle?: string;
|
|
17
|
-
|
|
18
|
-
pageSize: number;
|
|
19
|
-
}) => string;
|
|
17
|
+
pageSizeTitle?: string;
|
|
20
18
|
tableIntervalTitleCallback?: (args: {
|
|
21
19
|
start: number;
|
|
22
20
|
end: number;
|
package/lib/index.d.ts
CHANGED
|
@@ -519,9 +519,7 @@ interface PaginationProps {
|
|
|
519
519
|
previousPageTitle?: string;
|
|
520
520
|
firstPageTitle?: string;
|
|
521
521
|
lastPageTitle?: string;
|
|
522
|
-
|
|
523
|
-
pageSize: number;
|
|
524
|
-
}) => string;
|
|
522
|
+
pageSizeTitle?: string;
|
|
525
523
|
tableIntervalTitleCallback?: (args: {
|
|
526
524
|
start: number;
|
|
527
525
|
end: number;
|
package/lib/index.esm.js
CHANGED
|
@@ -934,7 +934,7 @@ var Icon$21 = function (_a) {
|
|
|
934
934
|
|
|
935
935
|
var Icon$20 = function (_a) {
|
|
936
936
|
var className = _a.className;
|
|
937
|
-
return (jsxs("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.4545 4.08696H18.3636V3.04348C18.3636 2.46957 17.8727 2 17.2727 2C16.6727 2 16.1818 2.46957 16.1818 3.04348V4.08696H7.45455V3.04348C7.45455 2.46957 6.96364 2 6.36364 2C5.76364 2 5.27273 2.46957 5.27273 3.04348V4.08696H4.18182C2.97091 4.08696 2.01091 5.02609 2.01091 6.17391L2 20.7826C2 21.9304 2.97091 22.8696 4.18182 22.8696H19.4545C20.6545 22.8696 21.6364 21.9304 21.6364 20.7826V6.17391C21.6364 5.02609 20.6545 4.08696 19.4545 4.08696ZM19.4545 19.7391C19.4545 20.313 18.9636 20.7826 18.3636 20.7826H5.27273C4.67273 20.7826 4.18182 20.313 4.18182 19.7391V9.30435H19.4545V19.7391Z" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.5834 15C16.5834 17.5313 14.5314 19.5834 12.0001 19.5834C9.46878 19.5834 7.41675 17.5313 7.41675 15C7.41675 12.4687 9.46878 10.4167 12.0001 10.4167C14.5314 10.4167 16.5834 12.4687 16.5834 15ZM12.0001 12.5C12.2302 12.5 12.4167 12.6866 12.4167 12.9167V14.5834H14.0834C14.3135 14.5834 14.5001 14.7699 14.5001 15C14.5001 15.2301 14.3135 15.4167 14.0834 15.4167H12.4167V17.0834C12.4167 17.3135 12.2302 17.5 12.0001 17.5C11.77 17.5 11.5834 17.3135 11.5834 17.0834V15.4167H9.91675C9.68663 15.4167 9.50008 15.2301 9.50008 15C9.50008 14.7699 9.68663 14.5834 9.91675 14.5834H11.5834V12.9167C11.5834 12.6866 11.77 12.5 12.0001 12.5Z" })
|
|
937
|
+
return (jsxs("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.4545 4.08696H18.3636V3.04348C18.3636 2.46957 17.8727 2 17.2727 2C16.6727 2 16.1818 2.46957 16.1818 3.04348V4.08696H7.45455V3.04348C7.45455 2.46957 6.96364 2 6.36364 2C5.76364 2 5.27273 2.46957 5.27273 3.04348V4.08696H4.18182C2.97091 4.08696 2.01091 5.02609 2.01091 6.17391L2 20.7826C2 21.9304 2.97091 22.8696 4.18182 22.8696H19.4545C20.6545 22.8696 21.6364 21.9304 21.6364 20.7826V6.17391C21.6364 5.02609 20.6545 4.08696 19.4545 4.08696ZM19.4545 19.7391C19.4545 20.313 18.9636 20.7826 18.3636 20.7826H5.27273C4.67273 20.7826 4.18182 20.313 4.18182 19.7391V9.30435H19.4545V19.7391Z" }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.5834 15C16.5834 17.5313 14.5314 19.5834 12.0001 19.5834C9.46878 19.5834 7.41675 17.5313 7.41675 15C7.41675 12.4687 9.46878 10.4167 12.0001 10.4167C14.5314 10.4167 16.5834 12.4687 16.5834 15ZM12.0001 12.5C12.2302 12.5 12.4167 12.6866 12.4167 12.9167V14.5834H14.0834C14.3135 14.5834 14.5001 14.7699 14.5001 15C14.5001 15.2301 14.3135 15.4167 14.0834 15.4167H12.4167V17.0834C12.4167 17.3135 12.2302 17.5 12.0001 17.5C11.77 17.5 11.5834 17.3135 11.5834 17.0834V15.4167H9.91675C9.68663 15.4167 9.50008 15.2301 9.50008 15C9.50008 14.7699 9.68663 14.5834 9.91675 14.5834H11.5834V12.9167C11.5834 12.6866 11.77 12.5 12.0001 12.5Z" })] }));
|
|
938
938
|
};
|
|
939
939
|
|
|
940
940
|
var Icon$1$ = function (_a) {
|
|
@@ -2001,15 +2001,17 @@ var s$n = classNames.bind(styles$n);
|
|
|
2001
2001
|
*/
|
|
2002
2002
|
var mergeClassNames = function (_a) {
|
|
2003
2003
|
var _b;
|
|
2004
|
-
var mainClassName = _a.mainClassName, withEllipsis = _a.withEllipsis, className = _a.className, textAlign = _a.textAlign, marginX = _a.marginX, marginTop = _a.marginTop, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, marginRight = _a.marginRight, paddingX = _a.paddingX, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, withNoWordBreak = _a.withNoWordBreak, withWordBreak = _a.withWordBreak, withAnimation = _a.withAnimation, withBorderBottom = _a.withBorderBottom, color = _a.color, disabled = _a.disabled, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontStyle = _a.fontStyle, meta = _a.meta, error = _a.error;
|
|
2004
|
+
var mainClassName = _a.mainClassName, withEllipsis = _a.withEllipsis, className = _a.className, textAlign = _a.textAlign, margin = _a.margin, marginX = _a.marginX, marginTop = _a.marginTop, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, marginRight = _a.marginRight, padding = _a.padding, paddingX = _a.paddingX, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, withNoWordBreak = _a.withNoWordBreak, withWordBreak = _a.withWordBreak, withAnimation = _a.withAnimation, withBorderBottom = _a.withBorderBottom, color = _a.color, disabled = _a.disabled, fontWeight = _a.fontWeight, fontSize = _a.fontSize, fontStyle = _a.fontStyle, meta = _a.meta, error = _a.error;
|
|
2005
2005
|
return s$n((_b = {},
|
|
2006
2006
|
_b[mainClassName] = mainClassName,
|
|
2007
2007
|
_b[className] = className,
|
|
2008
|
+
_b["margin_".concat(margin)] = is(String, margin),
|
|
2008
2009
|
_b["marginX_".concat(marginX)] = is(String, marginX),
|
|
2009
2010
|
_b["marginTop_".concat(marginTop)] = is(String, marginTop),
|
|
2010
2011
|
_b["marginBottom_".concat(marginBottom)] = is(String, marginBottom),
|
|
2011
2012
|
_b["marginRight_".concat(marginRight)] = is(String, marginRight),
|
|
2012
2013
|
_b["marginLeft_".concat(marginLeft)] = is(String, marginLeft),
|
|
2014
|
+
_b["padding_".concat(padding)] = is(String, padding),
|
|
2013
2015
|
_b["paddingX_".concat(paddingX)] = is(String, paddingX),
|
|
2014
2016
|
_b["paddingTop_".concat(paddingTop)] = is(String, paddingTop),
|
|
2015
2017
|
_b["paddingBottom_".concat(paddingBottom)] = is(String, paddingBottom),
|
|
@@ -2608,7 +2610,7 @@ var styles$b = {"body":"Pagination-module_WRLv5h","container":"Pagination-module
|
|
|
2608
2610
|
var s$b = classNames.bind(styles$b);
|
|
2609
2611
|
var Pagination = function (_a) {
|
|
2610
2612
|
var _b;
|
|
2611
|
-
var className = _a.className, pagination = _a.pagination, slim = _a.slim, onChange = _a.onChange, _c = _a.buttonType, buttonType = _c === void 0 ? HierarchyTypes.SECONDARY : _c, _d = _a.pageSizeOptions, pageSizeOptions = _d === void 0 ? [10, 20, 30, 40, 50, 80, 100] : _d, firstPageTitle = _a.firstPageTitle, previousPageTitle = _a.previousPageTitle, nextPageTitle = _a.nextPageTitle, lastPageTitle = _a.lastPageTitle,
|
|
2613
|
+
var className = _a.className, pagination = _a.pagination, slim = _a.slim, onChange = _a.onChange, _c = _a.buttonType, buttonType = _c === void 0 ? HierarchyTypes.SECONDARY : _c, _d = _a.pageSizeOptions, pageSizeOptions = _d === void 0 ? [10, 20, 30, 40, 50, 80, 100] : _d, firstPageTitle = _a.firstPageTitle, previousPageTitle = _a.previousPageTitle, nextPageTitle = _a.nextPageTitle, lastPageTitle = _a.lastPageTitle, pageSizeTitle = _a.pageSizeTitle, tableIntervalTitleCallback = _a.tableIntervalTitleCallback, withTablePagination = _a.withTablePagination, withFastForwardButtons = _a.withFastForwardButtons, withPageSizeChange = _a.withPageSizeChange;
|
|
2612
2614
|
if (!pagination) {
|
|
2613
2615
|
return null;
|
|
2614
2616
|
}
|
|
@@ -2663,10 +2665,10 @@ var Pagination = function (_a) {
|
|
|
2663
2665
|
}, children: pageObject.page }) }, "".concat(pageObject.type, "-").concat(index)));
|
|
2664
2666
|
}), nextPageButton, lastPageButton] }));
|
|
2665
2667
|
};
|
|
2666
|
-
var sizeTitle =
|
|
2668
|
+
var sizeTitle = pageSizeTitle ? pageSizeTitle : "Page size: ".concat(pagination.pageSize);
|
|
2667
2669
|
var pageSizeMarkup = function () {
|
|
2668
2670
|
return withPageSizeChange ? (jsxs(Fragment, { children: [jsx(Separator, { marginX: '15' }), jsx(DropDown, { buttonComponent: jsx(InlineButton, { type: buttonType, text: sizeTitle }), title: sizeTitle, children: pageSizeOptions
|
|
2669
|
-
.filter(
|
|
2671
|
+
// .filter((pageSize) => pageSize < pagination.numberOfHits)
|
|
2670
2672
|
.map(function (pageSize) { return (jsx(DropDownItem, { text: pageSize.toString(), onClickCallback: function () { return onChange(__assign(__assign({}, pagination), { pageSize: pageSize })); }, active: pagination.pageSize === pageSize, closeDropDownOnClick: true, withEllipsis: true })); }) })] })) : null;
|
|
2671
2673
|
};
|
|
2672
2674
|
return (jsxs(Box, { alignItems: 'center', children: [paginationMarkup(), pageSizeMarkup()] }));
|