@shoplflow/base 0.42.0 → 0.42.2
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 +15 -2
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1623,6 +1623,12 @@ var getStyleBySizeVar2 = (sizeVar) => {
|
|
|
1623
1623
|
min-width: 54px;
|
|
1624
1624
|
min-height: 32px;
|
|
1625
1625
|
`;
|
|
1626
|
+
case "XS":
|
|
1627
|
+
return react$1.css`
|
|
1628
|
+
gap: 2px;
|
|
1629
|
+
padding: 4px 6px;
|
|
1630
|
+
min-height: 24px;
|
|
1631
|
+
`;
|
|
1626
1632
|
default:
|
|
1627
1633
|
return react$1.css`
|
|
1628
1634
|
gap: 4px;
|
|
@@ -1695,6 +1701,12 @@ var Button = React3.forwardRef(
|
|
|
1695
1701
|
"isLoading",
|
|
1696
1702
|
"lineClamp"
|
|
1697
1703
|
]);
|
|
1704
|
+
const getTypography = () => {
|
|
1705
|
+
if (sizeVar === "XS") {
|
|
1706
|
+
return "caption_400";
|
|
1707
|
+
}
|
|
1708
|
+
return sizeVar === "M" ? "body1_400" : "body2_400";
|
|
1709
|
+
};
|
|
1698
1710
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1699
1711
|
StyledButton,
|
|
1700
1712
|
__spreadProps(__spreadValues({
|
|
@@ -1716,7 +1728,7 @@ var Button = React3.forwardRef(
|
|
|
1716
1728
|
whiteSpace: "nowrap",
|
|
1717
1729
|
wordBreak: "keep-all",
|
|
1718
1730
|
color: styleVar === "PRIMARY" ? "neutral0" : "neutral700",
|
|
1719
|
-
typography:
|
|
1731
|
+
typography: getTypography(),
|
|
1720
1732
|
children
|
|
1721
1733
|
}
|
|
1722
1734
|
),
|
|
@@ -1731,7 +1743,8 @@ exports.Button = Button;
|
|
|
1731
1743
|
// src/components/Buttons/Button/Button.types.ts
|
|
1732
1744
|
exports.ButtonSizeVariants = {
|
|
1733
1745
|
S: "S",
|
|
1734
|
-
M: "M"
|
|
1746
|
+
M: "M",
|
|
1747
|
+
XS: "XS"
|
|
1735
1748
|
};
|
|
1736
1749
|
exports.ButtonStyleVariants = {
|
|
1737
1750
|
PRIMARY: "PRIMARY",
|
package/dist/index.d.cts
CHANGED
|
@@ -610,6 +610,7 @@ declare type PolymorphicComponentProps<T extends React__default.ElementType, Pro
|
|
|
610
610
|
declare const ButtonSizeVariants: {
|
|
611
611
|
readonly S: "S";
|
|
612
612
|
readonly M: "M";
|
|
613
|
+
readonly XS: "XS";
|
|
613
614
|
};
|
|
614
615
|
declare type ButtonSizeVariantType = $Values<typeof ButtonSizeVariants>;
|
|
615
616
|
declare const ButtonStyleVariants: {
|
package/dist/index.d.ts
CHANGED
|
@@ -610,6 +610,7 @@ declare type PolymorphicComponentProps<T extends React__default.ElementType, Pro
|
|
|
610
610
|
declare const ButtonSizeVariants: {
|
|
611
611
|
readonly S: "S";
|
|
612
612
|
readonly M: "M";
|
|
613
|
+
readonly XS: "XS";
|
|
613
614
|
};
|
|
614
615
|
declare type ButtonSizeVariantType = $Values<typeof ButtonSizeVariants>;
|
|
615
616
|
declare const ButtonStyleVariants: {
|
package/dist/index.js
CHANGED
|
@@ -1596,6 +1596,12 @@ var getStyleBySizeVar2 = (sizeVar) => {
|
|
|
1596
1596
|
min-width: 54px;
|
|
1597
1597
|
min-height: 32px;
|
|
1598
1598
|
`;
|
|
1599
|
+
case "XS":
|
|
1600
|
+
return css`
|
|
1601
|
+
gap: 2px;
|
|
1602
|
+
padding: 4px 6px;
|
|
1603
|
+
min-height: 24px;
|
|
1604
|
+
`;
|
|
1599
1605
|
default:
|
|
1600
1606
|
return css`
|
|
1601
1607
|
gap: 4px;
|
|
@@ -1668,6 +1674,12 @@ var Button = forwardRef(
|
|
|
1668
1674
|
"isLoading",
|
|
1669
1675
|
"lineClamp"
|
|
1670
1676
|
]);
|
|
1677
|
+
const getTypography = () => {
|
|
1678
|
+
if (sizeVar === "XS") {
|
|
1679
|
+
return "caption_400";
|
|
1680
|
+
}
|
|
1681
|
+
return sizeVar === "M" ? "body1_400" : "body2_400";
|
|
1682
|
+
};
|
|
1671
1683
|
return /* @__PURE__ */ jsxs(
|
|
1672
1684
|
StyledButton,
|
|
1673
1685
|
__spreadProps(__spreadValues({
|
|
@@ -1689,7 +1701,7 @@ var Button = forwardRef(
|
|
|
1689
1701
|
whiteSpace: "nowrap",
|
|
1690
1702
|
wordBreak: "keep-all",
|
|
1691
1703
|
color: styleVar === "PRIMARY" ? "neutral0" : "neutral700",
|
|
1692
|
-
typography:
|
|
1704
|
+
typography: getTypography(),
|
|
1693
1705
|
children
|
|
1694
1706
|
}
|
|
1695
1707
|
),
|
|
@@ -1704,7 +1716,8 @@ var Button_default = Button;
|
|
|
1704
1716
|
// src/components/Buttons/Button/Button.types.ts
|
|
1705
1717
|
var ButtonSizeVariants = {
|
|
1706
1718
|
S: "S",
|
|
1707
|
-
M: "M"
|
|
1719
|
+
M: "M",
|
|
1720
|
+
XS: "XS"
|
|
1708
1721
|
};
|
|
1709
1722
|
var ButtonStyleVariants = {
|
|
1710
1723
|
PRIMARY: "PRIMARY",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoplflow/base",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"react-dom": "^18.2.0",
|
|
92
92
|
"simplebar-react": "^3.2.6",
|
|
93
93
|
"@shoplflow/hada-assets": "^0.1.7",
|
|
94
|
-
"@shoplflow/shopl-assets": "^0.12.
|
|
94
|
+
"@shoplflow/shopl-assets": "^0.12.21",
|
|
95
95
|
"@shoplflow/utils": "^0.7.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|