@shoplflow/base 0.42.5 → 0.42.6
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/index.cjs +3 -2
- package/dist/index.js +3 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4800,6 +4800,7 @@ var Pagination = (_a) => {
|
|
|
4800
4800
|
const isHadaDomain = domain === "hada";
|
|
4801
4801
|
const responsiveClassName = isHadaDomain ? "hada-responsive" : "";
|
|
4802
4802
|
const isXSSize = sizeVar === "XS";
|
|
4803
|
+
const iconStyle = isXSSize ? { width: "12px", height: "12px" } : void 0;
|
|
4803
4804
|
const pageTotalCount = totalCount != null ? totalCount : Math.ceil(itemsTotalCount / Number(pageSize));
|
|
4804
4805
|
const showLeftEllipsis = currentPage > pageCount - 1;
|
|
4805
4806
|
const showRightEllipsis = currentPage < pageTotalCount && Math.ceil((currentPage + 1) / pageCount) < Math.ceil(pageTotalCount / pageCount);
|
|
@@ -4809,7 +4810,7 @@ var Pagination = (_a) => {
|
|
|
4809
4810
|
leftSource ? leftSource : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
4810
4811
|
/* @__PURE__ */ jsxRuntime.jsxs(StyledPagination, { className: responsiveClassName, "data-shoplflow": "Pagination", children: [
|
|
4811
4812
|
!isXSSize && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", styleVar: "GHOST", disabled: !canPreviousPage, onClick: () => gotoPage(0), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.FirstPageIcon, color: "neutral400", sizeVar: "S" }) }),
|
|
4812
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.LeftArrowIcon, color: "neutral400", sizeVar:
|
|
4813
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.LeftArrowIcon, color: "neutral400", sizeVar, style: iconStyle }) }),
|
|
4813
4814
|
showLeftEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { className: responsiveClassName, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_700", children: "..." }) }),
|
|
4814
4815
|
[...Array(pageTotalCount)].splice(0, pageCount).map(
|
|
4815
4816
|
(_, idx) => idx + Math.floor(currentPage / pageCount) * pageCount < pageTotalCount && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4825,7 +4826,7 @@ var Pagination = (_a) => {
|
|
|
4825
4826
|
)
|
|
4826
4827
|
),
|
|
4827
4828
|
showRightEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { className: responsiveClassName, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_700", children: "..." }) }),
|
|
4828
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.RightArrowIcon, color: "neutral400", sizeVar:
|
|
4829
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.RightArrowIcon, color: "neutral400", sizeVar, style: iconStyle }) }),
|
|
4829
4830
|
!isXSSize && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", styleVar: "GHOST", disabled: !canNextPage, onClick: () => gotoPage(pageTotalCount - 1), children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.EndPageIcon, color: "neutral400", sizeVar: "S" }) })
|
|
4830
4831
|
] }),
|
|
4831
4832
|
rightSource ? /* @__PURE__ */ jsxRuntime.jsx(RightSourceWrapper, { className: responsiveClassName, children: rightSource }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})
|
package/dist/index.js
CHANGED
|
@@ -4773,6 +4773,7 @@ var Pagination = (_a) => {
|
|
|
4773
4773
|
const isHadaDomain = domain === "hada";
|
|
4774
4774
|
const responsiveClassName = isHadaDomain ? "hada-responsive" : "";
|
|
4775
4775
|
const isXSSize = sizeVar === "XS";
|
|
4776
|
+
const iconStyle = isXSSize ? { width: "12px", height: "12px" } : void 0;
|
|
4776
4777
|
const pageTotalCount = totalCount != null ? totalCount : Math.ceil(itemsTotalCount / Number(pageSize));
|
|
4777
4778
|
const showLeftEllipsis = currentPage > pageCount - 1;
|
|
4778
4779
|
const showRightEllipsis = currentPage < pageTotalCount && Math.ceil((currentPage + 1) / pageCount) < Math.ceil(pageTotalCount / pageCount);
|
|
@@ -4782,7 +4783,7 @@ var Pagination = (_a) => {
|
|
|
4782
4783
|
leftSource ? leftSource : /* @__PURE__ */ jsx("div", {}),
|
|
4783
4784
|
/* @__PURE__ */ jsxs(StyledPagination, { className: responsiveClassName, "data-shoplflow": "Pagination", children: [
|
|
4784
4785
|
!isXSSize && /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", disabled: !canPreviousPage, onClick: () => gotoPage(0), children: /* @__PURE__ */ jsx(Icon_default, { iconSource: FirstPageIcon, color: "neutral400", sizeVar: "S" }) }),
|
|
4785
|
-
/* @__PURE__ */ jsx(IconButton_default, { sizeVar, styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: LeftArrowIcon, color: "neutral400", sizeVar:
|
|
4786
|
+
/* @__PURE__ */ jsx(IconButton_default, { sizeVar, styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: LeftArrowIcon, color: "neutral400", sizeVar, style: iconStyle }) }),
|
|
4786
4787
|
showLeftEllipsis && /* @__PURE__ */ jsx(Ellipsis, { className: responsiveClassName, children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
|
|
4787
4788
|
[...Array(pageTotalCount)].splice(0, pageCount).map(
|
|
4788
4789
|
(_, idx) => idx + Math.floor(currentPage / pageCount) * pageCount < pageTotalCount && /* @__PURE__ */ jsx(
|
|
@@ -4798,7 +4799,7 @@ var Pagination = (_a) => {
|
|
|
4798
4799
|
)
|
|
4799
4800
|
),
|
|
4800
4801
|
showRightEllipsis && /* @__PURE__ */ jsx(Ellipsis, { className: responsiveClassName, children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
|
|
4801
|
-
/* @__PURE__ */ jsx(IconButton_default, { sizeVar, styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: RightArrowIcon, color: "neutral400", sizeVar:
|
|
4802
|
+
/* @__PURE__ */ jsx(IconButton_default, { sizeVar, styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: RightArrowIcon, color: "neutral400", sizeVar, style: iconStyle }) }),
|
|
4802
4803
|
!isXSSize && /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", disabled: !canNextPage, onClick: () => gotoPage(pageTotalCount - 1), children: /* @__PURE__ */ jsx(Icon_default, { iconSource: EndPageIcon, color: "neutral400", sizeVar: "S" }) })
|
|
4803
4804
|
] }),
|
|
4804
4805
|
rightSource ? /* @__PURE__ */ jsx(RightSourceWrapper, { className: responsiveClassName, children: rightSource }) : /* @__PURE__ */ jsx("div", {})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplflow/base",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"react-dom": "^18.2.0",
|
|
92
92
|
"simplebar-react": "^3.2.6",
|
|
93
93
|
"@shoplflow/hada-assets": "^0.1.7",
|
|
94
|
-
"@shoplflow/
|
|
95
|
-
"@shoplflow/
|
|
94
|
+
"@shoplflow/shopl-assets": "^0.12.22",
|
|
95
|
+
"@shoplflow/utils": "^0.7.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"type-check": "tsc --noEmit",
|