@shoplflow/base 0.31.21 → 0.32.0

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
 
@@ -3926,9 +3926,6 @@ var PageItem = styled6.button`
3926
3926
  height: 32px;
3927
3927
  border-radius: ${borderRadiusTokens.borderRadius08};
3928
3928
  background-color: ${({ isActive }) => isActive ? colorTokens.neutral300 : colorTokens.neutral0};
3929
- font-size: 13px;
3930
- font-weight: ${({ isActive }) => isActive && "600"};
3931
- line-height: 2;
3932
3929
  cursor: pointer;
3933
3930
 
3934
3931
  &:hover {
@@ -4005,19 +4002,19 @@ var Pagination = (_a) => {
4005
4002
  /* @__PURE__ */ jsxs(StyledPagination, { "data-shoplflow": "Pagination", children: [
4006
4003
  /* @__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
4004
  /* @__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: "..." }) }),
4005
+ showLeftEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
4009
4006
  [...Array(pageTotalCount)].splice(0, pageCount).map(
4010
4007
  (_, idx) => idx + Math.floor(currentPage / pageCount) * pageCount < pageTotalCount && /* @__PURE__ */ jsx(
4011
4008
  PageItem,
4012
4009
  {
4013
4010
  isActive: currentPage === idx + Math.floor(currentPage / pageCount) * pageCount,
4014
4011
  onClick: () => gotoPage(idx + Math.floor(currentPage / pageCount) * pageCount),
4015
- children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount
4012
+ children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: idx + 1 + Math.floor(currentPage / pageCount) * pageCount })
4016
4013
  },
4017
4014
  idx
4018
4015
  )
4019
4016
  ),
4020
- showRightEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { children: "..." }) }),
4017
+ showRightEllipsis && /* @__PURE__ */ jsx(Ellipsis, { children: /* @__PURE__ */ jsx(Text_default, { typography: "body2_700", children: "..." }) }),
4021
4018
  /* @__PURE__ */ jsx(IconButton_default, { sizeVar: "S", styleVar: "GHOST", onClick: nextPage, disabled: !canNextPage, children: /* @__PURE__ */ jsx(Icon_default, { iconSource: RightArrowIcon, color: "neutral400", sizeVar: "S" }) }),
4022
4019
  /* @__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
4020
  ] }),