@shoplflow/base 0.31.21 → 0.32.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/dist/index.cjs +7 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2799,7 +2799,7 @@ var getRadiusBySize = (size2) => {
|
|
|
2799
2799
|
`;
|
|
2800
2800
|
}
|
|
2801
2801
|
};
|
|
2802
|
-
var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
|
|
2802
|
+
var getColorsByStyleVariant = (styleVariant, color = "neutral700", background2) => {
|
|
2803
2803
|
switch (styleVariant) {
|
|
2804
2804
|
case "SOLID":
|
|
2805
2805
|
return react$1.css`
|
|
@@ -2808,7 +2808,7 @@ var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
|
|
|
2808
2808
|
`;
|
|
2809
2809
|
case "TINT":
|
|
2810
2810
|
return react$1.css`
|
|
2811
|
-
background: ${exports.colorTokens[getNextColor(color, -2)]};
|
|
2811
|
+
background: ${background2 ? exports.colorTokens[background2] : exports.colorTokens[getNextColor(color, -2)]};
|
|
2812
2812
|
color: ${exports.colorTokens[color]};
|
|
2813
2813
|
`;
|
|
2814
2814
|
case "LINE":
|
|
@@ -2831,7 +2831,7 @@ var StyledTag = styled6__default.default.div`
|
|
|
2831
2831
|
cursor: default;
|
|
2832
2832
|
gap: 2px;
|
|
2833
2833
|
${({ sizeVar }) => getTagStyleBySize(sizeVar)};
|
|
2834
|
-
${({ color, styleVar }) => getColorsByStyleVariant(styleVar, color)};
|
|
2834
|
+
${({ color, styleVar, background: background2 }) => getColorsByStyleVariant(styleVar, color, background2)};
|
|
2835
2835
|
${({ radius, sizeVar }) => radius && getRadiusBySize(sizeVar)};
|
|
2836
2836
|
`;
|
|
2837
2837
|
|
|
@@ -3170,6 +3170,7 @@ var Input = React3.forwardRef(
|
|
|
3170
3170
|
};
|
|
3171
3171
|
const handleOnBlur = (event) => {
|
|
3172
3172
|
onBlur && onBlur(event);
|
|
3173
|
+
!isHovered && setIsFocused(false);
|
|
3173
3174
|
};
|
|
3174
3175
|
const handleOnKeyDown = (event) => {
|
|
3175
3176
|
if (event.code === "Tab") {
|
|
@@ -3953,9 +3954,6 @@ var PageItem = styled6__default.default.button`
|
|
|
3953
3954
|
height: 32px;
|
|
3954
3955
|
border-radius: ${exports.borderRadiusTokens.borderRadius08};
|
|
3955
3956
|
background-color: ${({ isActive }) => isActive ? exports.colorTokens.neutral300 : exports.colorTokens.neutral0};
|
|
3956
|
-
font-size: 13px;
|
|
3957
|
-
font-weight: ${({ isActive }) => isActive && "600"};
|
|
3958
|
-
line-height: 2;
|
|
3959
3957
|
cursor: pointer;
|
|
3960
3958
|
|
|
3961
3959
|
&:hover {
|
|
@@ -4032,19 +4030,19 @@ var Pagination = (_a) => {
|
|
|
4032
4030
|
/* @__PURE__ */ jsxRuntime.jsxs(StyledPagination, { "data-shoplflow": "Pagination", children: [
|
|
4033
4031
|
/* @__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" }) }),
|
|
4034
4032
|
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.LeftArrowIcon, color: "neutral400", sizeVar: "S" }) }),
|
|
4035
|
-
showLeftEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { children: "..." }) }),
|
|
4033
|
+
showLeftEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_700", children: "..." }) }),
|
|
4036
4034
|
[...Array(pageTotalCount)].splice(0, pageCount).map(
|
|
4037
4035
|
(_, idx) => idx + Math.floor(currentPage / pageCount) * pageCount < pageTotalCount && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4038
4036
|
PageItem,
|
|
4039
4037
|
{
|
|
4040
4038
|
isActive: currentPage === idx + Math.floor(currentPage / pageCount) * pageCount,
|
|
4041
4039
|
onClick: () => gotoPage(idx + Math.floor(currentPage / pageCount) * pageCount),
|
|
4042
|
-
children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount
|
|
4040
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_700", children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount })
|
|
4043
4041
|
},
|
|
4044
4042
|
idx
|
|
4045
4043
|
)
|
|
4046
4044
|
),
|
|
4047
|
-
showRightEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { children: "..." }) }),
|
|
4045
|
+
showRightEllipsis && /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, { children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_700", children: "..." }) }),
|
|
4048
4046
|
/* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar: "S", styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.RightArrowIcon, color: "neutral400", sizeVar: "S" }) }),
|
|
4049
4047
|
/* @__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" }) })
|
|
4050
4048
|
] }),
|