@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.d.cts CHANGED
@@ -921,7 +921,7 @@ declare type TagStyleVariantType = $Values<typeof TagStyleVariants>;
921
921
  declare type TagSizeVariantType = $Values<typeof TagSizeVariants>;
922
922
  interface TagProps extends TagOptionProps {
923
923
  }
924
- interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
924
+ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, BackgroundColorProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
925
925
  radius?: boolean;
926
926
  }
927
927
 
package/dist/index.d.ts CHANGED
@@ -921,7 +921,7 @@ declare type TagStyleVariantType = $Values<typeof TagStyleVariants>;
921
921
  declare type TagSizeVariantType = $Values<typeof TagSizeVariants>;
922
922
  interface TagProps extends TagOptionProps {
923
923
  }
924
- interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
924
+ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, BackgroundColorProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
925
925
  radius?: boolean;
926
926
  }
927
927
 
package/dist/index.js CHANGED
@@ -2772,7 +2772,7 @@ var getRadiusBySize = (size2) => {
2772
2772
  `;
2773
2773
  }
2774
2774
  };
2775
- var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
2775
+ var getColorsByStyleVariant = (styleVariant, color = "neutral700", background2) => {
2776
2776
  switch (styleVariant) {
2777
2777
  case "SOLID":
2778
2778
  return css`
@@ -2781,7 +2781,7 @@ var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
2781
2781
  `;
2782
2782
  case "TINT":
2783
2783
  return css`
2784
- background: ${colorTokens[getNextColor(color, -2)]};
2784
+ background: ${background2 ? colorTokens[background2] : colorTokens[getNextColor(color, -2)]};
2785
2785
  color: ${colorTokens[color]};
2786
2786
  `;
2787
2787
  case "LINE":
@@ -2804,7 +2804,7 @@ var StyledTag = styled6.div`
2804
2804
  cursor: default;
2805
2805
  gap: 2px;
2806
2806
  ${({ sizeVar }) => getTagStyleBySize(sizeVar)};
2807
- ${({ color, styleVar }) => getColorsByStyleVariant(styleVar, color)};
2807
+ ${({ color, styleVar, background: background2 }) => getColorsByStyleVariant(styleVar, color, background2)};
2808
2808
  ${({ radius, sizeVar }) => radius && getRadiusBySize(sizeVar)};
2809
2809
  `;
2810
2810
 
@@ -3143,6 +3143,7 @@ var Input = forwardRef(
3143
3143
  };
3144
3144
  const handleOnBlur = (event) => {
3145
3145
  onBlur && onBlur(event);
3146
+ !isHovered && setIsFocused(false);
3146
3147
  };
3147
3148
  const handleOnKeyDown = (event) => {
3148
3149
  if (event.code === "Tab") {
@@ -3926,9 +3927,6 @@ var PageItem = styled6.button`
3926
3927
  height: 32px;
3927
3928
  border-radius: ${borderRadiusTokens.borderRadius08};
3928
3929
  background-color: ${({ isActive }) => isActive ? colorTokens.neutral300 : colorTokens.neutral0};
3929
- font-size: 13px;
3930
- font-weight: ${({ isActive }) => isActive && "600"};
3931
- line-height: 2;
3932
3930
  cursor: pointer;
3933
3931
 
3934
3932
  &:hover {
@@ -4005,19 +4003,19 @@ var Pagination = (_a) => {
4005
4003
  /* @__PURE__ */ jsxs(StyledPagination, { "data-shoplflow": "Pagination", children: [
4006
4004
  /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", disabled: !canPreviousPage, onClick: () => gotoPage(0), children: /* @__PURE__ */ jsx(Icon_default, { iconSource: FirstPageIcon, color: "neutral400", sizeVar: "S" }) }),
4007
4005
  /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", onClick: previousPage, disabled: !canPreviousPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: LeftArrowIcon, color: "neutral400", sizeVar: "S" }) }),
4008
- showLeftEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { children: "..." }) }),
4006
+ showLeftEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
4009
4007
  [...Array(pageTotalCount)].splice(0, pageCount).map(
4010
4008
  (_, idx) => idx + Math.floor(currentPage / pageCount) * pageCount < pageTotalCount && /* @__PURE__ */ jsx(
4011
4009
  PageItem,
4012
4010
  {
4013
4011
  isActive: currentPage === idx + Math.floor(currentPage / pageCount) * pageCount,
4014
4012
  onClick: () => gotoPage(idx + Math.floor(currentPage / pageCount) * pageCount),
4015
- children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount
4013
+ children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount })
4016
4014
  },
4017
4015
  idx
4018
4016
  )
4019
4017
  ),
4020
- showRightEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { children: "..." }) }),
4018
+ showRightEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
4021
4019
  /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: RightArrowIcon, color: "neutral400", sizeVar: "S" }) }),
4022
4020
  /* @__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" }) })
4023
4021
  ] }),