@shoplflow/base 0.42.16 → 0.42.18
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 +14 -9
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +14 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3354,7 +3354,7 @@ var getTagStyleBySize = (size2) => {
|
|
|
3354
3354
|
case "XS":
|
|
3355
3355
|
return react$1.css`
|
|
3356
3356
|
height: 20px;
|
|
3357
|
-
padding: 0
|
|
3357
|
+
padding: 0 6px;
|
|
3358
3358
|
border-radius: 4px;
|
|
3359
3359
|
`;
|
|
3360
3360
|
case "S":
|
|
@@ -4531,7 +4531,7 @@ var StyledTab = styled6__default.default.div`
|
|
|
4531
4531
|
flex-direction: row;
|
|
4532
4532
|
align-items: center;
|
|
4533
4533
|
width: fit-content;
|
|
4534
|
-
cursor: pointer;
|
|
4534
|
+
cursor: ${({ clickable }) => clickable ? "pointer" : "default"};
|
|
4535
4535
|
position: relative;
|
|
4536
4536
|
gap: 4px;
|
|
4537
4537
|
user-select: none;
|
|
@@ -4596,7 +4596,7 @@ var getActiveTextStyleByStyleVar = (styleVar, activeColor) => {
|
|
|
4596
4596
|
}
|
|
4597
4597
|
};
|
|
4598
4598
|
var StyledTabText = styled6__default.default(exports.Text)`
|
|
4599
|
-
cursor: pointer;
|
|
4599
|
+
cursor: ${({ clickable }) => clickable ? "pointer" : "default"};
|
|
4600
4600
|
|
|
4601
4601
|
${({ styleVar }) => styleVar && getTextStyleByStyleVar(styleVar)};
|
|
4602
4602
|
|
|
@@ -4615,6 +4615,7 @@ var Tab = (_a) => {
|
|
|
4615
4615
|
as,
|
|
4616
4616
|
styleVar = "NORMAL",
|
|
4617
4617
|
sizeVar = "L",
|
|
4618
|
+
clickable = true,
|
|
4618
4619
|
onClick,
|
|
4619
4620
|
activeColor
|
|
4620
4621
|
} = _b, args = __objRest(_b, [
|
|
@@ -4625,6 +4626,7 @@ var Tab = (_a) => {
|
|
|
4625
4626
|
"as",
|
|
4626
4627
|
"styleVar",
|
|
4627
4628
|
"sizeVar",
|
|
4629
|
+
"clickable",
|
|
4628
4630
|
"onClick",
|
|
4629
4631
|
"activeColor"
|
|
4630
4632
|
]);
|
|
@@ -4638,8 +4640,10 @@ var Tab = (_a) => {
|
|
|
4638
4640
|
setIsHover(false);
|
|
4639
4641
|
}, []);
|
|
4640
4642
|
const clickHandler = (event) => {
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
+
if (clickable) {
|
|
4644
|
+
onClick == null ? void 0 : onClick(event);
|
|
4645
|
+
setActiveTab(value);
|
|
4646
|
+
}
|
|
4643
4647
|
};
|
|
4644
4648
|
let typography = "title1_700";
|
|
4645
4649
|
if (styleVar === "INFO") {
|
|
@@ -4654,10 +4658,10 @@ var Tab = (_a) => {
|
|
|
4654
4658
|
isActive,
|
|
4655
4659
|
as,
|
|
4656
4660
|
onClick: clickHandler,
|
|
4657
|
-
onMouseOver: hoverHandler,
|
|
4658
|
-
onMouseLeave: unhoverHandler,
|
|
4659
|
-
onFocus: hoverHandler,
|
|
4660
|
-
onBlur: unhoverHandler,
|
|
4661
|
+
onMouseOver: clickable ? hoverHandler : void 0,
|
|
4662
|
+
onMouseLeave: clickable ? unhoverHandler : void 0,
|
|
4663
|
+
onFocus: clickable ? hoverHandler : void 0,
|
|
4664
|
+
onBlur: clickable ? unhoverHandler : void 0,
|
|
4661
4665
|
isHover,
|
|
4662
4666
|
styleVar
|
|
4663
4667
|
}, args), {
|
|
@@ -4672,6 +4676,7 @@ var Tab = (_a) => {
|
|
|
4672
4676
|
isActive,
|
|
4673
4677
|
activeColor,
|
|
4674
4678
|
styleVar,
|
|
4679
|
+
clickable,
|
|
4675
4680
|
children: label
|
|
4676
4681
|
}
|
|
4677
4682
|
),
|
package/dist/index.d.cts
CHANGED
|
@@ -1294,11 +1294,13 @@ interface TabProps extends TabOptionProps {
|
|
|
1294
1294
|
interface TabOptionProps extends LeftAndRightNodeProps, StyleVariantProps<TabStyleVariantType>, SizeVariantProps<TabSizeVariantType>, Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
1295
1295
|
as?: React.ElementType;
|
|
1296
1296
|
activeColor?: ColorTokens;
|
|
1297
|
+
clickable?: boolean;
|
|
1297
1298
|
}
|
|
1298
1299
|
interface TabStyledProps extends StyleVariantProps<TabStyleVariantType> {
|
|
1299
1300
|
as?: React.ElementType;
|
|
1300
1301
|
isActive: boolean;
|
|
1301
1302
|
isHover: boolean;
|
|
1303
|
+
clickable?: boolean;
|
|
1302
1304
|
}
|
|
1303
1305
|
interface TabTextStyledProps extends TabStyledProps {
|
|
1304
1306
|
activeColor?: ColorTokens;
|
|
@@ -1306,7 +1308,7 @@ interface TabTextStyledProps extends TabStyledProps {
|
|
|
1306
1308
|
|
|
1307
1309
|
declare const Tabs: {
|
|
1308
1310
|
({ children, initialTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1309
|
-
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1311
|
+
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, clickable, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1310
1312
|
};
|
|
1311
1313
|
|
|
1312
1314
|
declare type TabsContextType = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1294,11 +1294,13 @@ interface TabProps extends TabOptionProps {
|
|
|
1294
1294
|
interface TabOptionProps extends LeftAndRightNodeProps, StyleVariantProps<TabStyleVariantType>, SizeVariantProps<TabSizeVariantType>, Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
1295
1295
|
as?: React.ElementType;
|
|
1296
1296
|
activeColor?: ColorTokens;
|
|
1297
|
+
clickable?: boolean;
|
|
1297
1298
|
}
|
|
1298
1299
|
interface TabStyledProps extends StyleVariantProps<TabStyleVariantType> {
|
|
1299
1300
|
as?: React.ElementType;
|
|
1300
1301
|
isActive: boolean;
|
|
1301
1302
|
isHover: boolean;
|
|
1303
|
+
clickable?: boolean;
|
|
1302
1304
|
}
|
|
1303
1305
|
interface TabTextStyledProps extends TabStyledProps {
|
|
1304
1306
|
activeColor?: ColorTokens;
|
|
@@ -1306,7 +1308,7 @@ interface TabTextStyledProps extends TabStyledProps {
|
|
|
1306
1308
|
|
|
1307
1309
|
declare const Tabs: {
|
|
1308
1310
|
({ children, initialTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1309
|
-
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1311
|
+
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, clickable, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1310
1312
|
};
|
|
1311
1313
|
|
|
1312
1314
|
declare type TabsContextType = {
|
package/dist/index.js
CHANGED
|
@@ -3327,7 +3327,7 @@ var getTagStyleBySize = (size2) => {
|
|
|
3327
3327
|
case "XS":
|
|
3328
3328
|
return css`
|
|
3329
3329
|
height: 20px;
|
|
3330
|
-
padding: 0
|
|
3330
|
+
padding: 0 6px;
|
|
3331
3331
|
border-radius: 4px;
|
|
3332
3332
|
`;
|
|
3333
3333
|
case "S":
|
|
@@ -4504,7 +4504,7 @@ var StyledTab = styled6.div`
|
|
|
4504
4504
|
flex-direction: row;
|
|
4505
4505
|
align-items: center;
|
|
4506
4506
|
width: fit-content;
|
|
4507
|
-
cursor: pointer;
|
|
4507
|
+
cursor: ${({ clickable }) => clickable ? "pointer" : "default"};
|
|
4508
4508
|
position: relative;
|
|
4509
4509
|
gap: 4px;
|
|
4510
4510
|
user-select: none;
|
|
@@ -4569,7 +4569,7 @@ var getActiveTextStyleByStyleVar = (styleVar, activeColor) => {
|
|
|
4569
4569
|
}
|
|
4570
4570
|
};
|
|
4571
4571
|
var StyledTabText = styled6(Text_default)`
|
|
4572
|
-
cursor: pointer;
|
|
4572
|
+
cursor: ${({ clickable }) => clickable ? "pointer" : "default"};
|
|
4573
4573
|
|
|
4574
4574
|
${({ styleVar }) => styleVar && getTextStyleByStyleVar(styleVar)};
|
|
4575
4575
|
|
|
@@ -4588,6 +4588,7 @@ var Tab = (_a) => {
|
|
|
4588
4588
|
as,
|
|
4589
4589
|
styleVar = "NORMAL",
|
|
4590
4590
|
sizeVar = "L",
|
|
4591
|
+
clickable = true,
|
|
4591
4592
|
onClick,
|
|
4592
4593
|
activeColor
|
|
4593
4594
|
} = _b, args = __objRest(_b, [
|
|
@@ -4598,6 +4599,7 @@ var Tab = (_a) => {
|
|
|
4598
4599
|
"as",
|
|
4599
4600
|
"styleVar",
|
|
4600
4601
|
"sizeVar",
|
|
4602
|
+
"clickable",
|
|
4601
4603
|
"onClick",
|
|
4602
4604
|
"activeColor"
|
|
4603
4605
|
]);
|
|
@@ -4611,8 +4613,10 @@ var Tab = (_a) => {
|
|
|
4611
4613
|
setIsHover(false);
|
|
4612
4614
|
}, []);
|
|
4613
4615
|
const clickHandler = (event) => {
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
+
if (clickable) {
|
|
4617
|
+
onClick == null ? void 0 : onClick(event);
|
|
4618
|
+
setActiveTab(value);
|
|
4619
|
+
}
|
|
4616
4620
|
};
|
|
4617
4621
|
let typography = "title1_700";
|
|
4618
4622
|
if (styleVar === "INFO") {
|
|
@@ -4627,10 +4631,10 @@ var Tab = (_a) => {
|
|
|
4627
4631
|
isActive,
|
|
4628
4632
|
as,
|
|
4629
4633
|
onClick: clickHandler,
|
|
4630
|
-
onMouseOver: hoverHandler,
|
|
4631
|
-
onMouseLeave: unhoverHandler,
|
|
4632
|
-
onFocus: hoverHandler,
|
|
4633
|
-
onBlur: unhoverHandler,
|
|
4634
|
+
onMouseOver: clickable ? hoverHandler : void 0,
|
|
4635
|
+
onMouseLeave: clickable ? unhoverHandler : void 0,
|
|
4636
|
+
onFocus: clickable ? hoverHandler : void 0,
|
|
4637
|
+
onBlur: clickable ? unhoverHandler : void 0,
|
|
4634
4638
|
isHover,
|
|
4635
4639
|
styleVar
|
|
4636
4640
|
}, args), {
|
|
@@ -4645,6 +4649,7 @@ var Tab = (_a) => {
|
|
|
4645
4649
|
isActive,
|
|
4646
4650
|
activeColor,
|
|
4647
4651
|
styleVar,
|
|
4652
|
+
clickable,
|
|
4648
4653
|
children: label
|
|
4649
4654
|
}
|
|
4650
4655
|
),
|