@shoplflow/base 0.46.16 → 0.46.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 +302 -196
- package/dist/index.d.cts +34 -93
- package/dist/index.d.ts +34 -93
- package/dist/index.js +304 -198
- package/package.json +23 -6
package/dist/index.cjs
CHANGED
|
@@ -328,9 +328,6 @@ exports.AvatarSizeVariants = {
|
|
|
328
328
|
XL: "XL"
|
|
329
329
|
};
|
|
330
330
|
|
|
331
|
-
// src/components/Avatar/version.ts
|
|
332
|
-
exports.AVATAR_VERSION = "2.1.2";
|
|
333
|
-
|
|
334
331
|
// src/styles/tokens.ts
|
|
335
332
|
var fontWeightRegular = "var(--font-weight-regular)";
|
|
336
333
|
var fontWeightMedium = "var(--font-weight-medium)";
|
|
@@ -606,9 +603,6 @@ exports.MotionStack = framerMotion.motion(Stack);
|
|
|
606
603
|
exports.MotionStack.Vertical = framerMotion.motion(Stack.Vertical);
|
|
607
604
|
exports.MotionStack.Horizontal = framerMotion.motion(Stack.Horizontal);
|
|
608
605
|
exports.Stack = Stack;
|
|
609
|
-
|
|
610
|
-
// src/components/Stack/version.ts
|
|
611
|
-
exports.STACK_VERSION = "2.0.1";
|
|
612
606
|
exports.StyledStackContainer = styled6__default.default.div`
|
|
613
607
|
display: flex;
|
|
614
608
|
width: ${({ width }) => width};
|
|
@@ -689,9 +683,6 @@ exports.MotionStackContainer = framerMotion.motion(StackContainer);
|
|
|
689
683
|
exports.MotionStackContainer.Vertical = framerMotion.motion(StackContainer.Vertical);
|
|
690
684
|
exports.MotionStackContainer.Horizontal = framerMotion.motion(StackContainer.Horizontal);
|
|
691
685
|
exports.StackContainer = StackContainer;
|
|
692
|
-
|
|
693
|
-
// src/components/StackContainer/version.ts
|
|
694
|
-
exports.STACK_CONTAINER_VERSION = "2.0.1";
|
|
695
686
|
var setEllipsis = (maxLines) => {
|
|
696
687
|
return react$1.css`
|
|
697
688
|
display: -webkit-box;
|
|
@@ -732,7 +723,8 @@ var Text = React.forwardRef(
|
|
|
732
723
|
textAlign = "start",
|
|
733
724
|
textOverflow,
|
|
734
725
|
className,
|
|
735
|
-
as
|
|
726
|
+
as,
|
|
727
|
+
wordBreak = "keep-all"
|
|
736
728
|
} = _b, rest = __objRest(_b, [
|
|
737
729
|
"children",
|
|
738
730
|
"typography",
|
|
@@ -742,7 +734,8 @@ var Text = React.forwardRef(
|
|
|
742
734
|
"textAlign",
|
|
743
735
|
"textOverflow",
|
|
744
736
|
"className",
|
|
745
|
-
"as"
|
|
737
|
+
"as",
|
|
738
|
+
"wordBreak"
|
|
746
739
|
]);
|
|
747
740
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
748
741
|
StyledText,
|
|
@@ -754,6 +747,7 @@ var Text = React.forwardRef(
|
|
|
754
747
|
display,
|
|
755
748
|
textAlign,
|
|
756
749
|
textOverflow,
|
|
750
|
+
wordBreak,
|
|
757
751
|
as
|
|
758
752
|
}, rest), {
|
|
759
753
|
"data-shoplflow": "Text",
|
|
@@ -763,9 +757,6 @@ var Text = React.forwardRef(
|
|
|
763
757
|
}
|
|
764
758
|
);
|
|
765
759
|
exports.Text = Text;
|
|
766
|
-
|
|
767
|
-
// src/components/Text/version.ts
|
|
768
|
-
exports.TEXT_VERSION = "2.0.2";
|
|
769
760
|
var MODAL_SIZE_XXS = 400;
|
|
770
761
|
var MODAL_SIZE_XS = 500;
|
|
771
762
|
var MODAL_SIZE_S = 560;
|
|
@@ -909,7 +900,7 @@ var FooterContainer = styled6__default.default.div`
|
|
|
909
900
|
flex-direction: row;
|
|
910
901
|
align-items: center;
|
|
911
902
|
justify-content: flex-end;
|
|
912
|
-
padding: 16px 24px;
|
|
903
|
+
padding: ${({ padding }) => padding || "16px 24px"};
|
|
913
904
|
gap: 12px;
|
|
914
905
|
border-top: 1px solid ${exports.colorTokens.neutral300};
|
|
915
906
|
background: ${exports.colorTokens.neutral0};
|
|
@@ -1012,8 +1003,8 @@ var ModalContainer = (_a) => {
|
|
|
1012
1003
|
return /* @__PURE__ */ jsxRuntime.jsx(Container, __spreadProps(__spreadValues({ ref }, rest), { height: heightWidthMargin, viewport: windowHeight, "data-shoplflow": "Modal", children: /* @__PURE__ */ jsxRuntime.jsx(ModalOptionContextProvider, { children: addPropInChildren }) }));
|
|
1013
1004
|
};
|
|
1014
1005
|
var ModalContainer_default = ModalContainer;
|
|
1015
|
-
var ModalFooter = ({ children }) => {
|
|
1016
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FooterContainer, { children });
|
|
1006
|
+
var ModalFooter = ({ children, padding }) => {
|
|
1007
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FooterContainer, { padding, children });
|
|
1017
1008
|
};
|
|
1018
1009
|
ModalFooter[exports.MODAL_FOOTER_KEY] = true;
|
|
1019
1010
|
var ModalFooter_default = ModalFooter;
|
|
@@ -1046,9 +1037,6 @@ var ScrollArea = React.forwardRef((_a, ref) => {
|
|
|
1046
1037
|
) });
|
|
1047
1038
|
});
|
|
1048
1039
|
exports.ScrollArea = ScrollArea;
|
|
1049
|
-
|
|
1050
|
-
// src/components/ScrollArea/version.ts
|
|
1051
|
-
exports.SCROLL_AREA_VERSION = "2.0.1";
|
|
1052
1040
|
var useModalOption = () => {
|
|
1053
1041
|
const context = React.useContext(ModalOptionContext);
|
|
1054
1042
|
if (!context) {
|
|
@@ -1295,9 +1283,6 @@ var ModalProvider = ({ children }) => {
|
|
|
1295
1283
|
};
|
|
1296
1284
|
var ModalProvider_default = ModalProvider;
|
|
1297
1285
|
|
|
1298
|
-
// src/components/Modal/version.ts
|
|
1299
|
-
exports.MODAL_VERSION = "2.0.1";
|
|
1300
|
-
|
|
1301
1286
|
// src/components/Modal/index.ts
|
|
1302
1287
|
exports.Modal = {
|
|
1303
1288
|
Container: ModalContainer_default,
|
|
@@ -1307,9 +1292,6 @@ exports.Modal = {
|
|
|
1307
1292
|
Bottom: ModalBottom,
|
|
1308
1293
|
Footer: ModalFooter_default
|
|
1309
1294
|
};
|
|
1310
|
-
|
|
1311
|
-
// src/components/BackDrop/version.ts
|
|
1312
|
-
exports.BACK_DROP_VERSION = "2.0.1";
|
|
1313
1295
|
var getContainerStylesBySizeVar = (sizeVar) => {
|
|
1314
1296
|
switch (sizeVar) {
|
|
1315
1297
|
case "S":
|
|
@@ -1469,9 +1451,6 @@ exports.SwitchSizeVariants = {
|
|
|
1469
1451
|
M: "M"
|
|
1470
1452
|
};
|
|
1471
1453
|
|
|
1472
|
-
// src/components/Switch/version.ts
|
|
1473
|
-
exports.SWITCH_VERSION = "2.0.1";
|
|
1474
|
-
|
|
1475
1454
|
// src/components/Chips/ChipToggle/ChipToggle.types.ts
|
|
1476
1455
|
exports.ChipToggleStyleVariants = {
|
|
1477
1456
|
SOLID: "SOLID"
|
|
@@ -1593,70 +1572,63 @@ var ChipToggle = (_a) => {
|
|
|
1593
1572
|
);
|
|
1594
1573
|
};
|
|
1595
1574
|
exports.ChipToggle = ChipToggle;
|
|
1596
|
-
|
|
1597
|
-
// src/utils/getNextColor.ts
|
|
1598
|
-
var getNextColor = (color, step = 1) => {
|
|
1599
|
-
const colorName = color.replace(/[0-9]|_/g, "");
|
|
1600
|
-
const colorTokenKeys = Object.keys(exports.colorTokens);
|
|
1601
|
-
const findColorToken = colorTokenKeys.filter((colorToken) => colorToken.includes(colorName));
|
|
1602
|
-
const extractNumbers = (str) => {
|
|
1603
|
-
const formattedStr = str.replace(/_/g, ".");
|
|
1604
|
-
const regex = /\d+(\.\d+)?/g;
|
|
1605
|
-
const match = formattedStr.match(regex);
|
|
1606
|
-
return match ? parseFloat(match[0]) : 0;
|
|
1607
|
-
};
|
|
1608
|
-
const sortColorToken = findColorToken.sort((a, b) => extractNumbers(a) - extractNumbers(b));
|
|
1609
|
-
const currentIndex = sortColorToken.indexOf(color);
|
|
1610
|
-
let newIndex = currentIndex;
|
|
1611
|
-
let stepCount = 0;
|
|
1612
|
-
while (stepCount < Math.abs(step)) {
|
|
1613
|
-
newIndex += Math.sign(step);
|
|
1614
|
-
if (newIndex < 0 || newIndex >= sortColorToken.length) {
|
|
1615
|
-
break;
|
|
1616
|
-
}
|
|
1617
|
-
if (!sortColorToken[newIndex].endsWith("_5") && !sortColorToken[newIndex].endsWith("50")) {
|
|
1618
|
-
stepCount++;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
newIndex = Math.max(0, Math.min(newIndex, sortColorToken.length - 1));
|
|
1622
|
-
return sortColorToken[newIndex];
|
|
1623
|
-
};
|
|
1624
|
-
|
|
1625
|
-
// src/components/Chips/ChipButton/ChipButton.styled.ts
|
|
1626
1575
|
var getLineTypographyBySizeVar2 = (sizeVar) => {
|
|
1627
1576
|
switch (sizeVar) {
|
|
1628
1577
|
case "XS":
|
|
1629
1578
|
return "caption_400";
|
|
1630
1579
|
case "S":
|
|
1631
|
-
return "
|
|
1580
|
+
return "body2_400";
|
|
1632
1581
|
default:
|
|
1633
|
-
return "
|
|
1582
|
+
return "body2_400";
|
|
1634
1583
|
}
|
|
1635
1584
|
};
|
|
1636
|
-
var
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
border: 1px solid ${exports.colorTokens
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1585
|
+
var defaultSelectedBackground = (sizeVar) => sizeVar === "XS" ? exports.colorTokens.neutral400_5 : exports.colorTokens.neutral150;
|
|
1586
|
+
var lineStyle = ({ sizeVar, $isSelected, $selectedBackground, $selectedBorderColor }) => {
|
|
1587
|
+
const selectedBg = $selectedBackground ? exports.colorTokens[$selectedBackground] : defaultSelectedBackground(sizeVar);
|
|
1588
|
+
const selectedBorder = $selectedBorderColor ? exports.colorTokens[$selectedBorderColor] : exports.colorTokens.neutral300;
|
|
1589
|
+
return react$1.css`
|
|
1590
|
+
border: 1px solid ${exports.colorTokens.neutral300};
|
|
1591
|
+
border-radius: 999px;
|
|
1592
|
+
background: ${exports.colorTokens.neutral0};
|
|
1593
|
+
|
|
1594
|
+
& > span {
|
|
1595
|
+
color: ${exports.colorTokens.neutral400};
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
&:hover {
|
|
1599
|
+
background: ${exports.colorTokens.neutral400_5};
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
${$isSelected && react$1.css`
|
|
1603
|
+
background: ${selectedBg};
|
|
1604
|
+
border-color: ${selectedBorder};
|
|
1605
|
+
|
|
1606
|
+
& > span {
|
|
1607
|
+
color: ${exports.colorTokens.neutral700};
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
&:hover {
|
|
1611
|
+
background: ${selectedBg};
|
|
1612
|
+
border-color: ${selectedBorder};
|
|
1613
|
+
}
|
|
1614
|
+
`}
|
|
1615
|
+
`;
|
|
1616
|
+
};
|
|
1647
1617
|
var getStyleBySizeVar = (sizeVar) => {
|
|
1648
1618
|
switch (sizeVar) {
|
|
1649
1619
|
case "XS":
|
|
1650
1620
|
return react$1.css`
|
|
1651
|
-
padding: 4px
|
|
1621
|
+
padding: 4px 6px;
|
|
1652
1622
|
`;
|
|
1653
1623
|
case "S":
|
|
1654
1624
|
return react$1.css`
|
|
1655
|
-
|
|
1625
|
+
min-height: 32px;
|
|
1626
|
+
padding: 6px 10px;
|
|
1656
1627
|
`;
|
|
1657
1628
|
default:
|
|
1658
1629
|
return react$1.css`
|
|
1659
|
-
|
|
1630
|
+
min-height: 32px;
|
|
1631
|
+
padding: 6px 10px;
|
|
1660
1632
|
`;
|
|
1661
1633
|
}
|
|
1662
1634
|
};
|
|
@@ -1667,12 +1639,16 @@ var StyledChipButton = styled6__default.default.button`
|
|
|
1667
1639
|
border: none;
|
|
1668
1640
|
height: fit-content;
|
|
1669
1641
|
width: fit-content;
|
|
1670
|
-
gap:
|
|
1642
|
+
gap: 2px;
|
|
1643
|
+
box-sizing: border-box;
|
|
1644
|
+
overflow: hidden;
|
|
1671
1645
|
cursor: pointer;
|
|
1672
1646
|
${({ sizeVar }) => getStyleBySizeVar(sizeVar)};
|
|
1673
1647
|
${(props) => props.styleVar === "LINE" && lineStyle(props)};
|
|
1674
1648
|
${({ disabled }) => getDisabledStyle(disabled)};
|
|
1675
|
-
|
|
1649
|
+
${({ background: background2 }) => background2 && react$1.css`
|
|
1650
|
+
background: ${exports.colorTokens[background2]};
|
|
1651
|
+
`}
|
|
1676
1652
|
`;
|
|
1677
1653
|
|
|
1678
1654
|
// src/components/Chips/ChipButton/ChipButton.types.ts
|
|
@@ -1689,36 +1665,85 @@ var ChipButton = (_a) => {
|
|
|
1689
1665
|
color = "neutral200",
|
|
1690
1666
|
sizeVar = exports.ChipButtonSizeVariants.S,
|
|
1691
1667
|
text,
|
|
1668
|
+
children,
|
|
1669
|
+
leftSource,
|
|
1670
|
+
rightSource,
|
|
1692
1671
|
onClick = utils.noop,
|
|
1693
|
-
disabled = false
|
|
1672
|
+
disabled = false,
|
|
1673
|
+
isSelected = false,
|
|
1674
|
+
selectedBackground,
|
|
1675
|
+
selectedBorderColor,
|
|
1676
|
+
count
|
|
1694
1677
|
} = _b, rest = __objRest(_b, [
|
|
1695
1678
|
"styleVar",
|
|
1696
1679
|
"color",
|
|
1697
1680
|
"sizeVar",
|
|
1698
1681
|
"text",
|
|
1682
|
+
"children",
|
|
1683
|
+
"leftSource",
|
|
1684
|
+
"rightSource",
|
|
1699
1685
|
"onClick",
|
|
1700
|
-
"disabled"
|
|
1686
|
+
"disabled",
|
|
1687
|
+
"isSelected",
|
|
1688
|
+
"selectedBackground",
|
|
1689
|
+
"selectedBorderColor",
|
|
1690
|
+
"count"
|
|
1701
1691
|
]);
|
|
1702
1692
|
const handleOnClick = (e) => {
|
|
1703
1693
|
!disabled && onClick(e);
|
|
1704
1694
|
};
|
|
1705
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
1695
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1706
1696
|
StyledChipButton,
|
|
1707
1697
|
__spreadProps(__spreadValues({
|
|
1708
1698
|
styleVar,
|
|
1709
1699
|
color
|
|
1710
1700
|
}, rest), {
|
|
1701
|
+
$isSelected: isSelected,
|
|
1702
|
+
$selectedBackground: selectedBackground,
|
|
1703
|
+
$selectedBorderColor: selectedBorderColor,
|
|
1711
1704
|
onClick: handleOnClick,
|
|
1712
1705
|
disabled,
|
|
1713
1706
|
"data-shoplflow": "ChipButton",
|
|
1714
|
-
children:
|
|
1707
|
+
children: [
|
|
1708
|
+
leftSource,
|
|
1709
|
+
children || /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: getLineTypographyBySizeVar2(sizeVar), children: text }),
|
|
1710
|
+
!children && count && /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: getLineTypographyBySizeVar2(sizeVar), children: count }),
|
|
1711
|
+
rightSource
|
|
1712
|
+
]
|
|
1715
1713
|
})
|
|
1716
1714
|
);
|
|
1717
1715
|
};
|
|
1718
1716
|
exports.ChipButton = ChipButton;
|
|
1719
1717
|
|
|
1720
|
-
// src/
|
|
1721
|
-
|
|
1718
|
+
// src/utils/getNextColor.ts
|
|
1719
|
+
var getNextColor = (color, step = 1) => {
|
|
1720
|
+
const colorName = color.replace(/[0-9]|_/g, "");
|
|
1721
|
+
const colorTokenKeys = Object.keys(exports.colorTokens);
|
|
1722
|
+
const findColorToken = colorTokenKeys.filter((colorToken) => colorToken.includes(colorName));
|
|
1723
|
+
const extractNumbers = (str) => {
|
|
1724
|
+
const formattedStr = str.replace(/_/g, ".");
|
|
1725
|
+
const regex = /\d+(\.\d+)?/g;
|
|
1726
|
+
const match = formattedStr.match(regex);
|
|
1727
|
+
return match ? parseFloat(match[0]) : 0;
|
|
1728
|
+
};
|
|
1729
|
+
const sortColorToken = findColorToken.sort((a, b) => extractNumbers(a) - extractNumbers(b));
|
|
1730
|
+
const currentIndex = sortColorToken.indexOf(color);
|
|
1731
|
+
let newIndex = currentIndex;
|
|
1732
|
+
let stepCount = 0;
|
|
1733
|
+
while (stepCount < Math.abs(step)) {
|
|
1734
|
+
newIndex += Math.sign(step);
|
|
1735
|
+
if (newIndex < 0 || newIndex >= sortColorToken.length) {
|
|
1736
|
+
break;
|
|
1737
|
+
}
|
|
1738
|
+
if (!sortColorToken[newIndex].endsWith("_5") && !sortColorToken[newIndex].endsWith("50")) {
|
|
1739
|
+
stepCount++;
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
newIndex = Math.max(0, Math.min(newIndex, sortColorToken.length - 1));
|
|
1743
|
+
return sortColorToken[newIndex];
|
|
1744
|
+
};
|
|
1745
|
+
|
|
1746
|
+
// src/components/Buttons/Button/Button.styled.tsx
|
|
1722
1747
|
var getStyleByStyleVar = (styleVar, color, disabled) => {
|
|
1723
1748
|
const domain = exports.getDomain();
|
|
1724
1749
|
const secondaryBorderColor = domain === "hada" ? exports.colorTokens.hada150 : exports.colorTokens.neutral350;
|
|
@@ -2210,9 +2235,6 @@ exports.PopperPortal = React.forwardRef(
|
|
|
2210
2235
|
Popper.Trigger = exports.PopperTrigger;
|
|
2211
2236
|
Popper.Portal = exports.PopperPortal;
|
|
2212
2237
|
exports.Popper = Popper;
|
|
2213
|
-
|
|
2214
|
-
// src/components/Popper/version.ts
|
|
2215
|
-
exports.POPPER_VERSION = "2.0.1";
|
|
2216
2238
|
var Container2 = styled6__default.default.div`
|
|
2217
2239
|
display: flex;
|
|
2218
2240
|
align-items: center;
|
|
@@ -2526,9 +2548,6 @@ var Radio = (_a) => {
|
|
|
2526
2548
|
Radio[exports.RADIO_SYMBOL_KEY] = true;
|
|
2527
2549
|
exports.Radio = Radio;
|
|
2528
2550
|
|
|
2529
|
-
// src/components/ControlButtons/version.ts
|
|
2530
|
-
exports.CONTROL_BUTTONS_VERSION = "2.0.3";
|
|
2531
|
-
|
|
2532
2551
|
// src/components/Menu/Menu.styled.ts
|
|
2533
2552
|
var getStylesBySizeVar = (sizeVar) => {
|
|
2534
2553
|
switch (sizeVar) {
|
|
@@ -2637,9 +2656,6 @@ exports.MenuSizeVariants = {
|
|
|
2637
2656
|
S: "S",
|
|
2638
2657
|
M: "M"
|
|
2639
2658
|
};
|
|
2640
|
-
|
|
2641
|
-
// src/components/Menu/version.ts
|
|
2642
|
-
exports.MENU_VERSION = "2.0.1";
|
|
2643
2659
|
exports.DropdownButtonContext = React.createContext(null);
|
|
2644
2660
|
exports.useDropdownButtonContext = () => {
|
|
2645
2661
|
const context = React.useContext(exports.DropdownButtonContext);
|
|
@@ -2689,9 +2705,6 @@ var Icon = React.forwardRef((_a, ref) => {
|
|
|
2689
2705
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.StyledIcon, __spreadProps(__spreadValues({ as: iconSource, ref }, rest), { "data-shoplflow": "Icon" }));
|
|
2690
2706
|
});
|
|
2691
2707
|
exports.Icon = Icon;
|
|
2692
|
-
|
|
2693
|
-
// src/components/Icon/version.ts
|
|
2694
|
-
exports.ICON_VERSION = "2.0.1";
|
|
2695
2708
|
var DropdownButtonMenu = (_a) => {
|
|
2696
2709
|
var _b = _a, { onClick, children } = _b, rest = __objRest(_b, ["onClick", "children"]);
|
|
2697
2710
|
const { setIsOpen } = exports.useDropdownButtonContext();
|
|
@@ -3009,9 +3022,6 @@ exports.SplitButtonStyleVariants = {
|
|
|
3009
3022
|
PRIMARY: "PRIMARY",
|
|
3010
3023
|
SECONDARY: "SECONDARY"
|
|
3011
3024
|
};
|
|
3012
|
-
|
|
3013
|
-
// src/components/Buttons/version.ts
|
|
3014
|
-
exports.BUTTONS_VERSION = "2.0.4";
|
|
3015
3025
|
var informationStyle = react$1.css`
|
|
3016
3026
|
background: ${exports.colorTokens.neutral400_5};
|
|
3017
3027
|
& > svg > circle {
|
|
@@ -3143,9 +3153,6 @@ exports.CalloutTypes = {
|
|
|
3143
3153
|
CAUTION: "CAUTION",
|
|
3144
3154
|
ALERT: "ALERT"
|
|
3145
3155
|
};
|
|
3146
|
-
|
|
3147
|
-
// src/components/Callout/version.ts
|
|
3148
|
-
exports.CALLOUT_VERSION = "2.1.5";
|
|
3149
3156
|
var StyledDropdown = styled6__default.default.div`
|
|
3150
3157
|
width: ${({ width }) => width};
|
|
3151
3158
|
`;
|
|
@@ -3168,6 +3175,8 @@ var useDropdown = () => {
|
|
|
3168
3175
|
};
|
|
3169
3176
|
var getDropdownHeightBySizeVar = (size2) => {
|
|
3170
3177
|
switch (size2) {
|
|
3178
|
+
case "XS":
|
|
3179
|
+
return "24px";
|
|
3171
3180
|
case "M":
|
|
3172
3181
|
case "L":
|
|
3173
3182
|
return "40px";
|
|
@@ -3179,6 +3188,8 @@ var getDropdownHeightBySizeVar = (size2) => {
|
|
|
3179
3188
|
};
|
|
3180
3189
|
var getDropdownFontSizeBySizeVar = (size2) => {
|
|
3181
3190
|
switch (size2) {
|
|
3191
|
+
case "XS":
|
|
3192
|
+
return "caption_400";
|
|
3182
3193
|
case "L":
|
|
3183
3194
|
return "body2_700";
|
|
3184
3195
|
case "M":
|
|
@@ -3189,8 +3200,18 @@ var getDropdownFontSizeBySizeVar = (size2) => {
|
|
|
3189
3200
|
return "body1_400";
|
|
3190
3201
|
}
|
|
3191
3202
|
};
|
|
3192
|
-
var getDropdownStyleBySizeVar = (size2) => {
|
|
3203
|
+
var getDropdownStyleBySizeVar = (size2, styleVar) => {
|
|
3204
|
+
if (styleVar === "GHOST" && size2 === "S") {
|
|
3205
|
+
return react$1.css`
|
|
3206
|
+
padding-left: 8px;
|
|
3207
|
+
padding-right: 4px;
|
|
3208
|
+
`;
|
|
3209
|
+
}
|
|
3193
3210
|
switch (size2) {
|
|
3211
|
+
case "XS":
|
|
3212
|
+
return react$1.css`
|
|
3213
|
+
padding: 0 2px 0 6px;
|
|
3214
|
+
`;
|
|
3194
3215
|
case "S":
|
|
3195
3216
|
return react$1.css`
|
|
3196
3217
|
padding: 0 8px;
|
|
@@ -3212,18 +3233,24 @@ var getDropdownStyleBySizeVar = (size2) => {
|
|
|
3212
3233
|
`;
|
|
3213
3234
|
}
|
|
3214
3235
|
};
|
|
3215
|
-
var getDisabledStyle2 = (
|
|
3236
|
+
var getDisabledStyle2 = ({
|
|
3237
|
+
disabled,
|
|
3238
|
+
styleVar
|
|
3239
|
+
}) => {
|
|
3216
3240
|
if (disabled) {
|
|
3217
3241
|
return react$1.css`
|
|
3218
3242
|
cursor: not-allowed;
|
|
3219
|
-
background: ${exports.colorTokens.neutral100};
|
|
3243
|
+
background: ${styleVar === "GHOST" ? "transparent" : exports.colorTokens.neutral100};
|
|
3220
3244
|
svg > path {
|
|
3221
|
-
fill: ${exports.colorTokens.
|
|
3245
|
+
fill: ${exports.colorTokens.neutral350} !important;
|
|
3222
3246
|
}
|
|
3223
3247
|
`;
|
|
3224
3248
|
}
|
|
3225
3249
|
};
|
|
3226
|
-
var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled, sizeVar }) => {
|
|
3250
|
+
var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled, sizeVar, styleVar }) => {
|
|
3251
|
+
if (styleVar === "GHOST") {
|
|
3252
|
+
return "transparent";
|
|
3253
|
+
}
|
|
3227
3254
|
if (!disabled) {
|
|
3228
3255
|
if (isError) {
|
|
3229
3256
|
return exports.colorTokens.red300;
|
|
@@ -3240,7 +3267,14 @@ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled, sizeVar
|
|
|
3240
3267
|
}
|
|
3241
3268
|
return exports.colorTokens.neutral300;
|
|
3242
3269
|
};
|
|
3243
|
-
var getButtonWrapperStyleBySizeVar = ({ sizeVar, isFocused }) => {
|
|
3270
|
+
var getButtonWrapperStyleBySizeVar = ({ sizeVar, isFocused, isHovered, styleVar }) => {
|
|
3271
|
+
if (styleVar === "GHOST") {
|
|
3272
|
+
return react$1.css`
|
|
3273
|
+
background-color: ${isHovered || isFocused ? exports.colorTokens.neutral400_5 : "transparent"};
|
|
3274
|
+
border-width: 0;
|
|
3275
|
+
border-radius: 6px;
|
|
3276
|
+
`;
|
|
3277
|
+
}
|
|
3244
3278
|
switch (sizeVar) {
|
|
3245
3279
|
case "L":
|
|
3246
3280
|
return react$1.css`
|
|
@@ -3295,7 +3329,7 @@ var StyledDropdownButtonWrapper = styled6__default.default.div`
|
|
|
3295
3329
|
width
|
|
3296
3330
|
})};
|
|
3297
3331
|
${(props) => getButtonWrapperStyleBySizeVar(props)};
|
|
3298
|
-
${({ disabled }) => getDisabledStyle2(disabled)};
|
|
3332
|
+
${({ disabled, styleVar }) => getDisabledStyle2({ disabled, styleVar })};
|
|
3299
3333
|
|
|
3300
3334
|
${({ hasValue }) => getClearIconHoverStyle(hasValue)}
|
|
3301
3335
|
`;
|
|
@@ -3309,8 +3343,8 @@ var StyledDropdownButton = styled6__default.default.button`
|
|
|
3309
3343
|
height: 100%;
|
|
3310
3344
|
cursor: pointer;
|
|
3311
3345
|
|
|
3312
|
-
${({ sizeVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar)};
|
|
3313
|
-
${({ disabled }) => getDisabledStyle2(disabled)};
|
|
3346
|
+
${({ sizeVar, styleVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar, styleVar)};
|
|
3347
|
+
${({ disabled, styleVar }) => getDisabledStyle2({ disabled, styleVar })};
|
|
3314
3348
|
|
|
3315
3349
|
.dropdown-clear-icon {
|
|
3316
3350
|
display: none;
|
|
@@ -3322,10 +3356,15 @@ var DropdownButtonIcon = styled6__default.default.div`
|
|
|
3322
3356
|
display: flex;
|
|
3323
3357
|
align-items: center;
|
|
3324
3358
|
flex-shrink: 0;
|
|
3325
|
-
|
|
3359
|
+
${({ sizeVar, styleVar }) => styleVar === "GHOST" ? react$1.css`
|
|
3360
|
+
width: 18px;
|
|
3361
|
+
min-width: 18px;
|
|
3362
|
+
` : react$1.css`
|
|
3363
|
+
min-width: ${sizeVar === "XS" ? "18px" : "22px"};
|
|
3364
|
+
`}
|
|
3326
3365
|
height: 100%;
|
|
3327
3366
|
|
|
3328
|
-
${({ disabled }) => getDisabledStyle2(disabled)};
|
|
3367
|
+
${({ disabled, styleVar }) => getDisabledStyle2({ disabled, styleVar })};
|
|
3329
3368
|
`;
|
|
3330
3369
|
var DropdownTriggerButton = React.forwardRef(
|
|
3331
3370
|
(_a, ref) => {
|
|
@@ -3333,6 +3372,7 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3333
3372
|
width = "100%",
|
|
3334
3373
|
onClick,
|
|
3335
3374
|
sizeVar = "M",
|
|
3375
|
+
styleVar = "NORMAL",
|
|
3336
3376
|
isError,
|
|
3337
3377
|
placeholder,
|
|
3338
3378
|
value,
|
|
@@ -3344,6 +3384,7 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3344
3384
|
"width",
|
|
3345
3385
|
"onClick",
|
|
3346
3386
|
"sizeVar",
|
|
3387
|
+
"styleVar",
|
|
3347
3388
|
"isError",
|
|
3348
3389
|
"placeholder",
|
|
3349
3390
|
"value",
|
|
@@ -3356,7 +3397,7 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3356
3397
|
const [isHovered, setIsHovered] = React.useState(false);
|
|
3357
3398
|
const handleOnClick = (e) => {
|
|
3358
3399
|
if (!disabled) {
|
|
3359
|
-
onClick
|
|
3400
|
+
onClick == null ? void 0 : onClick(e);
|
|
3360
3401
|
setIsOpen(!isOpen);
|
|
3361
3402
|
}
|
|
3362
3403
|
};
|
|
@@ -3370,15 +3411,20 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3370
3411
|
e.stopPropagation();
|
|
3371
3412
|
onClear && onClear();
|
|
3372
3413
|
};
|
|
3373
|
-
const getTextColor = (
|
|
3374
|
-
if (
|
|
3414
|
+
const getTextColor = () => {
|
|
3415
|
+
if (disabled)
|
|
3375
3416
|
return "neutral350";
|
|
3376
|
-
|
|
3377
|
-
if (!value2) {
|
|
3417
|
+
if (!value)
|
|
3378
3418
|
return "neutral400";
|
|
3379
|
-
}
|
|
3380
3419
|
return "neutral700";
|
|
3381
3420
|
};
|
|
3421
|
+
const getChevronColor = () => {
|
|
3422
|
+
if (styleVar === "GHOST")
|
|
3423
|
+
return disabled ? "neutral350" : "neutral600";
|
|
3424
|
+
if (sizeVar === "L")
|
|
3425
|
+
return "neutral700";
|
|
3426
|
+
return "neutral350";
|
|
3427
|
+
};
|
|
3382
3428
|
const LeftSourceClone = leftSource ? React.cloneElement(leftSource, __spreadProps(__spreadValues({}, leftSource.props), { disabled })) : leftSource;
|
|
3383
3429
|
const RightSourceClone = rightSource ? React.cloneElement(rightSource, __spreadProps(__spreadValues({}, rightSource.props), { disabled })) : rightSource;
|
|
3384
3430
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3392,17 +3438,19 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3392
3438
|
width,
|
|
3393
3439
|
isError,
|
|
3394
3440
|
sizeVar,
|
|
3441
|
+
styleVar,
|
|
3395
3442
|
height: getDropdownHeightBySizeVar(sizeVar),
|
|
3396
3443
|
hasValue: Boolean(value),
|
|
3444
|
+
onClick: handleOnClick,
|
|
3397
3445
|
children: [
|
|
3398
3446
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3399
3447
|
StyledDropdownButton,
|
|
3400
3448
|
__spreadProps(__spreadValues({
|
|
3401
3449
|
ref,
|
|
3402
|
-
onClick: handleOnClick,
|
|
3403
3450
|
disabled
|
|
3404
3451
|
}, rest), {
|
|
3405
3452
|
sizeVar,
|
|
3453
|
+
styleVar,
|
|
3406
3454
|
"data-shoplflow": "Dropdown-Content-Area",
|
|
3407
3455
|
children: [
|
|
3408
3456
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Stack.Horizontal, { width: "100%", spacing: "spacing04", align: "center", children: [
|
|
@@ -3411,19 +3459,19 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3411
3459
|
exports.Text,
|
|
3412
3460
|
{
|
|
3413
3461
|
typography: getDropdownFontSizeBySizeVar(sizeVar),
|
|
3414
|
-
color: getTextColor(
|
|
3462
|
+
color: getTextColor(),
|
|
3415
3463
|
textOverflow: "ellipsis",
|
|
3416
3464
|
lineClamp: 1,
|
|
3417
3465
|
children: placeholder
|
|
3418
3466
|
}
|
|
3419
3467
|
)
|
|
3420
3468
|
] }),
|
|
3421
|
-
onClear && sizeVar !== "L" && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: handleOnClear, className: "dropdown-clear-icon", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DeleteIcon, color: "neutral350", sizeVar: "S" }) })
|
|
3469
|
+
onClear && sizeVar !== "L" && sizeVar !== "XS" && /* @__PURE__ */ jsxRuntime.jsx(exports.IconButton, { sizeVar, styleVar: "GHOST", onClick: handleOnClear, className: "dropdown-clear-icon", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DeleteIcon, color: "neutral350", sizeVar: "S" }) })
|
|
3422
3470
|
]
|
|
3423
3471
|
})
|
|
3424
3472
|
),
|
|
3425
3473
|
RightSourceClone && /* @__PURE__ */ jsxRuntime.jsx(exports.StackContainer, { padding: "0 6px 0 0", children: RightSourceClone }),
|
|
3426
|
-
/* @__PURE__ */ jsxRuntime.jsx(DropdownButtonIcon, { sizeVar, "data-shoplflow": "Dropdown-Button-Icon-Area", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3474
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownButtonIcon, { sizeVar, styleVar, "data-shoplflow": "Dropdown-Button-Icon-Area", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3427
3475
|
framerMotion.motion.div,
|
|
3428
3476
|
{
|
|
3429
3477
|
animate: {
|
|
@@ -3432,14 +3480,8 @@ var DropdownTriggerButton = React.forwardRef(
|
|
|
3432
3480
|
transition: {
|
|
3433
3481
|
duration: 0.2
|
|
3434
3482
|
},
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
{
|
|
3438
|
-
iconSource: ShoplAssets.DownArrowSolidXsmallIcon,
|
|
3439
|
-
color: sizeVar === "L" ? "neutral700" : "neutral400",
|
|
3440
|
-
sizeVar: "XS"
|
|
3441
|
-
}
|
|
3442
|
-
)
|
|
3483
|
+
style: { cursor: disabled ? "not-allowed" : "pointer" },
|
|
3484
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DownArrowSolidXsmallIcon, color: getChevronColor(), sizeVar: "XS" })
|
|
3443
3485
|
}
|
|
3444
3486
|
) })
|
|
3445
3487
|
]
|
|
@@ -3520,9 +3562,6 @@ exports.DropdownOptionVariants = {
|
|
|
3520
3562
|
OUTSIDE_CLICK: "OUTSIDE_CLICK",
|
|
3521
3563
|
NONE: "NONE"
|
|
3522
3564
|
};
|
|
3523
|
-
|
|
3524
|
-
// src/components/Dropdown/version.ts
|
|
3525
|
-
exports.DROPDOWN_VERSION = "2.0.1";
|
|
3526
3565
|
var StyledList = styled6__default.default.li`
|
|
3527
3566
|
display: flex;
|
|
3528
3567
|
flex-direction: row;
|
|
@@ -3564,9 +3603,6 @@ exports.Text2Rows = ({ title, subTitle }) => {
|
|
|
3564
3603
|
};
|
|
3565
3604
|
List.Text2Rows = exports.Text2Rows;
|
|
3566
3605
|
exports.List = List;
|
|
3567
|
-
|
|
3568
|
-
// src/components/List/version.ts
|
|
3569
|
-
exports.LIST_VERSION = "2.0.2";
|
|
3570
3606
|
var getTypographyBySize = (size2) => {
|
|
3571
3607
|
switch (size2) {
|
|
3572
3608
|
case "XS":
|
|
@@ -3694,9 +3730,6 @@ exports.TagSizeVariants = {
|
|
|
3694
3730
|
S: "S",
|
|
3695
3731
|
M: "M"
|
|
3696
3732
|
};
|
|
3697
|
-
|
|
3698
|
-
// src/components/Tag/version.ts
|
|
3699
|
-
exports.TAG_VERSION = "2.0.1";
|
|
3700
3733
|
var StyledTree = styled6__default.default(framerMotion.motion.ul)`
|
|
3701
3734
|
display: flex;
|
|
3702
3735
|
flex-direction: column;
|
|
@@ -3854,9 +3887,6 @@ exports.TreeItem = (_a) => {
|
|
|
3854
3887
|
exports.TreeItem[exports.TREE_SYMBOL_KEY] = true;
|
|
3855
3888
|
Tree.Item = exports.TreeItem;
|
|
3856
3889
|
exports.Tree = Tree;
|
|
3857
|
-
|
|
3858
|
-
// src/components/Tree/version.ts
|
|
3859
|
-
exports.TREE_VERSION = "2.0.1";
|
|
3860
3890
|
var StyledInput = styled6__default.default.input`
|
|
3861
3891
|
padding: ${({ sizeVar }) => sizeVar === "S" ? "0 8px" : "4px 12px"};
|
|
3862
3892
|
background-color: transparent;
|
|
@@ -4641,9 +4671,6 @@ var SelectInputButton = (_a) => {
|
|
|
4641
4671
|
);
|
|
4642
4672
|
};
|
|
4643
4673
|
exports.SelectInputButton = SelectInputButton;
|
|
4644
|
-
|
|
4645
|
-
// src/components/Inputs/version.ts
|
|
4646
|
-
exports.INPUTS_VERSION = "2.0.1";
|
|
4647
4674
|
var StyledTooltipContent = styled6__default.default.div`
|
|
4648
4675
|
background-color: ${exports.colorTokens.neutral700};
|
|
4649
4676
|
padding: 4px 8px;
|
|
@@ -4719,9 +4746,6 @@ var Tooltip = (_a) => {
|
|
|
4719
4746
|
};
|
|
4720
4747
|
Tooltip.Content = TooltipContent;
|
|
4721
4748
|
exports.Tooltip = Tooltip;
|
|
4722
|
-
|
|
4723
|
-
// src/components/Tooltip/version.ts
|
|
4724
|
-
exports.TOOLTIP_VERSION = "2.0.1";
|
|
4725
4749
|
exports.TabsContext = React.createContext(null);
|
|
4726
4750
|
exports.useTabs = () => {
|
|
4727
4751
|
const context = React.useContext(exports.TabsContext);
|
|
@@ -4986,15 +5010,45 @@ exports.TabSizeVariants = {
|
|
|
4986
5010
|
M: "M",
|
|
4987
5011
|
L: "L"
|
|
4988
5012
|
};
|
|
4989
|
-
|
|
4990
|
-
// src/components/Tabs/version.ts
|
|
4991
|
-
exports.TABS_VERSION = "2.0.1";
|
|
4992
5013
|
var PaginationWrapper = styled6__default.default.div`
|
|
4993
5014
|
display: flex;
|
|
4994
5015
|
align-items: center;
|
|
4995
5016
|
width: 100%;
|
|
4996
5017
|
justify-content: space-between;
|
|
4997
5018
|
|
|
5019
|
+
/* Shopl: Figma pagenation bar — 양끝은 흐름 배치, 네비는 바 전체 기준 absolute 중앙 (node 13760:25910) */
|
|
5020
|
+
${({ $centerNav }) => $centerNav && react$1.css`
|
|
5021
|
+
position: relative;
|
|
5022
|
+
justify-content: space-between;
|
|
5023
|
+
|
|
5024
|
+
/* div → nav → div 이므로 nth-of-type(2)는 두 번째 div(우측)만 잡힘 → 반드시 nth-child */
|
|
5025
|
+
& > *:nth-child(1) {
|
|
5026
|
+
position: relative;
|
|
5027
|
+
z-index: 2;
|
|
5028
|
+
flex-shrink: 0;
|
|
5029
|
+
display: flex;
|
|
5030
|
+
align-items: center;
|
|
5031
|
+
justify-content: flex-start;
|
|
5032
|
+
}
|
|
5033
|
+
& > *:nth-child(2) {
|
|
5034
|
+
position: absolute;
|
|
5035
|
+
left: 50%;
|
|
5036
|
+
top: 50%;
|
|
5037
|
+
z-index: 1;
|
|
5038
|
+
transform: translate(-50%, -50%);
|
|
5039
|
+
width: max-content;
|
|
5040
|
+
max-width: 100%;
|
|
5041
|
+
}
|
|
5042
|
+
& > *:nth-child(3) {
|
|
5043
|
+
position: relative;
|
|
5044
|
+
z-index: 2;
|
|
5045
|
+
flex-shrink: 0;
|
|
5046
|
+
display: flex;
|
|
5047
|
+
align-items: center;
|
|
5048
|
+
justify-content: flex-end;
|
|
5049
|
+
}
|
|
5050
|
+
`}
|
|
5051
|
+
|
|
4998
5052
|
&.hada-responsive {
|
|
4999
5053
|
@media (max-width: 720px) {
|
|
5000
5054
|
justify-content: space-between;
|
|
@@ -5118,7 +5172,7 @@ var Pagination = (_a) => {
|
|
|
5118
5172
|
const showRightEllipsis = currentPage < pageTotalCount && Math.ceil((currentPage + 1) / pageCount) < Math.ceil(pageTotalCount / pageCount);
|
|
5119
5173
|
const canPreviousPage = currentPage > 0;
|
|
5120
5174
|
const canNextPage = currentPage < pageTotalCount - 1;
|
|
5121
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(PaginationWrapper, __spreadProps(__spreadValues({ className: responsiveClassName }, rest), { children: [
|
|
5175
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(PaginationWrapper, __spreadProps(__spreadValues({ $centerNav: !isHadaDomain, className: responsiveClassName }, rest), { children: [
|
|
5122
5176
|
leftSource ? leftSource : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
|
|
5123
5177
|
/* @__PURE__ */ jsxRuntime.jsxs(StyledPagination, { className: responsiveClassName, "data-shoplflow": "Pagination", children: [
|
|
5124
5178
|
!isXSSize && /* @__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" }) }),
|
|
@@ -5146,9 +5200,6 @@ var Pagination = (_a) => {
|
|
|
5146
5200
|
};
|
|
5147
5201
|
Pagination.SizeSelector = PaginationSizeSelector_default;
|
|
5148
5202
|
exports.Pagination = Pagination;
|
|
5149
|
-
|
|
5150
|
-
// src/components/Pagination/version.ts
|
|
5151
|
-
exports.PAGINATION_VERSION = "2.0.1";
|
|
5152
5203
|
var getLabelStyleBySizeVar = (sizeVar) => {
|
|
5153
5204
|
switch (sizeVar) {
|
|
5154
5205
|
case "S": {
|
|
@@ -5317,9 +5368,6 @@ exports.ToggleButtonSizeVariants = {
|
|
|
5317
5368
|
S: "S",
|
|
5318
5369
|
M: "M"
|
|
5319
5370
|
};
|
|
5320
|
-
|
|
5321
|
-
// src/components/ToggleButton/version.ts
|
|
5322
|
-
exports.TOGGLE_BUTTON_VERSION = "2.0.2";
|
|
5323
5371
|
var SmallStyledDayDatepickerWrapper = styled6__default.default.div`
|
|
5324
5372
|
display: flex;
|
|
5325
5373
|
width: 280px;
|
|
@@ -5411,7 +5459,7 @@ var SmallStyledDayDatepickerWrapper = styled6__default.default.div`
|
|
|
5411
5459
|
&__day-names {
|
|
5412
5460
|
width: 100%;
|
|
5413
5461
|
height: 18px;
|
|
5414
|
-
margin: 8px 0 0;
|
|
5462
|
+
margin: 8px 0 8px 0;
|
|
5415
5463
|
display: flex;
|
|
5416
5464
|
justify-content: space-between;
|
|
5417
5465
|
align-items: center;
|
|
@@ -5812,8 +5860,7 @@ var Header = styled6__default.default.div`
|
|
|
5812
5860
|
gap: 8px;
|
|
5813
5861
|
`;
|
|
5814
5862
|
var Month = styled6__default.default.p`
|
|
5815
|
-
|
|
5816
|
-
color: ${exports.colorTokens.neutral700};
|
|
5863
|
+
display: flex;
|
|
5817
5864
|
cursor: pointer;
|
|
5818
5865
|
`;
|
|
5819
5866
|
var DatePickerWrapper = styled6__default.default.div`
|
|
@@ -5965,6 +6012,7 @@ var YearStepper = ({
|
|
|
5965
6012
|
changeYear,
|
|
5966
6013
|
minDate,
|
|
5967
6014
|
maxDate,
|
|
6015
|
+
sizeVar = "M",
|
|
5968
6016
|
className
|
|
5969
6017
|
}) => {
|
|
5970
6018
|
const [isOpen, setIsOpen] = utils.useOutsideClick({
|
|
@@ -5981,10 +6029,17 @@ var YearStepper = ({
|
|
|
5981
6029
|
exports.IconButton,
|
|
5982
6030
|
{
|
|
5983
6031
|
styleVar: "GHOST",
|
|
5984
|
-
sizeVar: "S",
|
|
6032
|
+
sizeVar: sizeVar === "S" ? "XS" : "S",
|
|
5985
6033
|
onClick: decreaseYear,
|
|
5986
6034
|
disabled: prevYearButtonDisabled || date.getFullYear() === startYear,
|
|
5987
|
-
|
|
6035
|
+
iconSizeVar: sizeVar === "S" ? "XS" : "S",
|
|
6036
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6037
|
+
exports.Icon,
|
|
6038
|
+
{
|
|
6039
|
+
iconSource: sizeVar === "S" ? ShoplAssets.LeftArrowXsmallIcon : ShoplAssets.LeftArrowIcon,
|
|
6040
|
+
color: prevYearButtonDisabled ? "neutral200" : "neutral700"
|
|
6041
|
+
}
|
|
6042
|
+
)
|
|
5988
6043
|
}
|
|
5989
6044
|
),
|
|
5990
6045
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.Popper, { placement: "bottom", middlewares: [core.flip(), core.shift({ padding: 5 })], children: [
|
|
@@ -5996,7 +6051,7 @@ var YearStepper = ({
|
|
|
5996
6051
|
event.stopPropagation();
|
|
5997
6052
|
setIsOpen((prev) => !prev);
|
|
5998
6053
|
},
|
|
5999
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "title1_700", children: `${date.getFullYear()}` })
|
|
6054
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: sizeVar === "M" ? "title1_700" : "body1_700", children: `${date.getFullYear()}` })
|
|
6000
6055
|
}
|
|
6001
6056
|
) }),
|
|
6002
6057
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6018,10 +6073,17 @@ var YearStepper = ({
|
|
|
6018
6073
|
exports.IconButton,
|
|
6019
6074
|
{
|
|
6020
6075
|
styleVar: "GHOST",
|
|
6021
|
-
sizeVar: "S",
|
|
6076
|
+
sizeVar: sizeVar === "S" ? "XS" : "S",
|
|
6022
6077
|
onClick: increaseYear,
|
|
6023
6078
|
disabled: nextYearButtonDisabled || date.getFullYear() === endYear,
|
|
6024
|
-
|
|
6079
|
+
iconSizeVar: sizeVar === "S" ? "XS" : "S",
|
|
6080
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6081
|
+
exports.Icon,
|
|
6082
|
+
{
|
|
6083
|
+
iconSource: sizeVar === "S" ? ShoplAssets.RightArrowXsmallIcon : ShoplAssets.RightArrowIcon,
|
|
6084
|
+
color: nextYearButtonDisabled ? "neutral200" : "neutral700"
|
|
6085
|
+
}
|
|
6086
|
+
)
|
|
6025
6087
|
}
|
|
6026
6088
|
)
|
|
6027
6089
|
] });
|
|
@@ -6649,42 +6711,98 @@ var getEachWeekAreaStyle = (props) => {
|
|
|
6649
6711
|
`;
|
|
6650
6712
|
}
|
|
6651
6713
|
};
|
|
6714
|
+
var getWeekContainerStyleBySizeVar = (sizeVar) => {
|
|
6715
|
+
if (sizeVar === "S") {
|
|
6716
|
+
return react$1.css`
|
|
6717
|
+
width: 280px;
|
|
6718
|
+
max-width: 280px;
|
|
6719
|
+
gap: 8px;
|
|
6720
|
+
padding: 16px;
|
|
6721
|
+
`;
|
|
6722
|
+
}
|
|
6723
|
+
return react$1.css`
|
|
6724
|
+
width: 400px;
|
|
6725
|
+
max-width: 400px;
|
|
6726
|
+
gap: 16px;
|
|
6727
|
+
padding: 16px 24px 24px;
|
|
6728
|
+
`;
|
|
6729
|
+
};
|
|
6730
|
+
var getWeekAreaStyleBySizeVar = (sizeVar) => {
|
|
6731
|
+
if (sizeVar === "S") {
|
|
6732
|
+
return react$1.css`
|
|
6733
|
+
grid-row-gap: 0;
|
|
6734
|
+
background-color: ${exports.colorTokens.neutral100};
|
|
6735
|
+
`;
|
|
6736
|
+
}
|
|
6737
|
+
return react$1.css`
|
|
6738
|
+
grid-row-gap: 8px;
|
|
6739
|
+
background-color: ${exports.colorTokens.neutral0};
|
|
6740
|
+
`;
|
|
6741
|
+
};
|
|
6742
|
+
var getEachWeekAreaStyleBySizeVar = (sizeVar) => {
|
|
6743
|
+
if (sizeVar === "S") {
|
|
6744
|
+
return react$1.css`
|
|
6745
|
+
height: 32px;
|
|
6746
|
+
`;
|
|
6747
|
+
}
|
|
6748
|
+
return react$1.css`
|
|
6749
|
+
height: 48px;
|
|
6750
|
+
`;
|
|
6751
|
+
};
|
|
6752
|
+
var getEachWeekDateStyleBySizeVar = (sizeVar) => {
|
|
6753
|
+
if (sizeVar === "S") {
|
|
6754
|
+
return react$1.css`
|
|
6755
|
+
width: 100%;
|
|
6756
|
+
height: 32px;
|
|
6757
|
+
font-size: 12px;
|
|
6758
|
+
line-height: 16px;
|
|
6759
|
+
border-radius: 0;
|
|
6760
|
+
`;
|
|
6761
|
+
}
|
|
6762
|
+
return react$1.css`
|
|
6763
|
+
width: 48px;
|
|
6764
|
+
height: 48px;
|
|
6765
|
+
font-size: 14px;
|
|
6766
|
+
line-height: 48px;
|
|
6767
|
+
border-radius: 50%;
|
|
6768
|
+
`;
|
|
6769
|
+
};
|
|
6652
6770
|
var WeekContainer = styled6__default.default.div`
|
|
6653
6771
|
display: flex;
|
|
6654
6772
|
flex-direction: column;
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
gap: 16px;
|
|
6658
|
-
padding: 16px 24px 24px;
|
|
6773
|
+
|
|
6774
|
+
${({ sizeVar }) => getWeekContainerStyleBySizeVar(sizeVar)}
|
|
6659
6775
|
`;
|
|
6660
6776
|
var WeekArea = styled6__default.default.div`
|
|
6661
6777
|
width: 100%;
|
|
6662
6778
|
display: grid;
|
|
6663
6779
|
grid-template-columns: repeat(7, 1fr);
|
|
6664
|
-
|
|
6780
|
+
border-radius: 4px;
|
|
6781
|
+
overflow: hidden;
|
|
6782
|
+
|
|
6783
|
+
${({ sizeVar }) => getWeekAreaStyleBySizeVar(sizeVar)}
|
|
6665
6784
|
`;
|
|
6666
6785
|
var EachWeekArea = styled6__default.default.div`
|
|
6667
6786
|
width: 100%;
|
|
6668
|
-
height: 48px;
|
|
6669
6787
|
display: flex;
|
|
6670
6788
|
justify-content: center;
|
|
6671
6789
|
align-items: center;
|
|
6672
6790
|
position: relative;
|
|
6673
6791
|
|
|
6792
|
+
${({ sizeVar }) => getEachWeekAreaStyleBySizeVar(sizeVar)}
|
|
6674
6793
|
${(props) => getEachWeekAreaStyle(props)}
|
|
6675
6794
|
`;
|
|
6676
6795
|
var EachWeekDate = styled6__default.default.div`
|
|
6677
|
-
|
|
6678
|
-
|
|
6796
|
+
display: flex;
|
|
6797
|
+
justify-content: center;
|
|
6798
|
+
align-items: center;
|
|
6679
6799
|
text-align: center;
|
|
6680
|
-
font-size: 14px;
|
|
6681
|
-
line-height: 48px;
|
|
6682
6800
|
padding: 0;
|
|
6683
|
-
border-radius: 50%;
|
|
6684
6801
|
cursor: pointer;
|
|
6685
6802
|
position: absolute;
|
|
6686
6803
|
z-index: 10;
|
|
6687
6804
|
|
|
6805
|
+
${({ sizeVar }) => getEachWeekDateStyleBySizeVar(sizeVar)}
|
|
6688
6806
|
${(props) => getEachDateStyle3(props)}
|
|
6689
6807
|
`;
|
|
6690
6808
|
function getWeeksInYear(year) {
|
|
@@ -6709,7 +6827,8 @@ var WeekDatepicker = ({
|
|
|
6709
6827
|
initEndDate,
|
|
6710
6828
|
minDate,
|
|
6711
6829
|
maxDate,
|
|
6712
|
-
onlySingleWeek
|
|
6830
|
+
onlySingleWeek,
|
|
6831
|
+
sizeVar = "M"
|
|
6713
6832
|
}) => {
|
|
6714
6833
|
const year = initStartDate ? dateFns.getISOWeekYear(initStartDate) : dateFns.getISOWeekYear(/* @__PURE__ */ new Date());
|
|
6715
6834
|
const [currentDate, setCurrentDate] = React.useState(new Date(year, 5, 5));
|
|
@@ -6776,10 +6895,11 @@ var WeekDatepicker = ({
|
|
|
6776
6895
|
});
|
|
6777
6896
|
}
|
|
6778
6897
|
};
|
|
6779
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(WeekContainer, { children: [
|
|
6898
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(WeekContainer, { sizeVar, children: [
|
|
6780
6899
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6781
6900
|
YearStepper_default,
|
|
6782
6901
|
{
|
|
6902
|
+
sizeVar,
|
|
6783
6903
|
date: currentDate,
|
|
6784
6904
|
decreaseYear: () => {
|
|
6785
6905
|
setCurrentDate(new Date(currentDate.getFullYear() - 1, currentDate.getMonth(), currentDate.getDate()));
|
|
@@ -6796,7 +6916,7 @@ var WeekDatepicker = ({
|
|
|
6796
6916
|
}
|
|
6797
6917
|
}
|
|
6798
6918
|
),
|
|
6799
|
-
/* @__PURE__ */ jsxRuntime.jsx(WeekArea, { children: Years.map((each, index) => {
|
|
6919
|
+
/* @__PURE__ */ jsxRuntime.jsx(WeekArea, { sizeVar, children: Years.map((each, index) => {
|
|
6800
6920
|
const currentYear = currentDate.getFullYear();
|
|
6801
6921
|
const currentWeek = Number(each);
|
|
6802
6922
|
const isStart = currentYear === (selectedStartWeekAndYear == null ? void 0 : selectedStartWeekAndYear[1]) && currentWeek === (selectedStartWeekAndYear == null ? void 0 : selectedStartWeekAndYear[0]);
|
|
@@ -6853,6 +6973,7 @@ var WeekDatepicker = ({
|
|
|
6853
6973
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6854
6974
|
EachWeekArea,
|
|
6855
6975
|
{
|
|
6976
|
+
sizeVar,
|
|
6856
6977
|
inRange,
|
|
6857
6978
|
isStart,
|
|
6858
6979
|
isReady,
|
|
@@ -6864,7 +6985,7 @@ var WeekDatepicker = ({
|
|
|
6864
6985
|
}
|
|
6865
6986
|
clickWeek(Number(each), currentDate.getFullYear());
|
|
6866
6987
|
},
|
|
6867
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(EachWeekDate, { inRange, isStart, isEnd, disabled, children: [
|
|
6988
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(EachWeekDate, { sizeVar, inRange, isStart, isEnd, disabled, children: [
|
|
6868
6989
|
"W",
|
|
6869
6990
|
each
|
|
6870
6991
|
] })
|
|
@@ -6875,9 +6996,6 @@ var WeekDatepicker = ({
|
|
|
6875
6996
|
] });
|
|
6876
6997
|
};
|
|
6877
6998
|
exports.WeekDatepicker = WeekDatepicker;
|
|
6878
|
-
|
|
6879
|
-
// src/components/Datepickers/version.ts
|
|
6880
|
-
exports.DATEPICKERS_VERSION = "2.0.3";
|
|
6881
6999
|
var StyledNumberCombobox = styled6__default.default.div``;
|
|
6882
7000
|
var IconWrapper2 = styled6__default.default(framerMotion.motion.div)`
|
|
6883
7001
|
display: flex;
|
|
@@ -7069,9 +7187,6 @@ exports.NumberComboboxSizeVariants = {
|
|
|
7069
7187
|
S: "S",
|
|
7070
7188
|
M: "M"
|
|
7071
7189
|
};
|
|
7072
|
-
|
|
7073
|
-
// src/components/Comboboxs/version.ts
|
|
7074
|
-
exports.COMBOBOXS_VERSION = "2.0.1";
|
|
7075
7190
|
var animation = react$1.keyframes`
|
|
7076
7191
|
0% {
|
|
7077
7192
|
transform: translateX(-100%);
|
|
@@ -7121,9 +7236,6 @@ var Skeleton = ({ styleVar = "rectangle", width = "50px", height = "20px" }) =>
|
|
|
7121
7236
|
};
|
|
7122
7237
|
exports.Skeleton = Skeleton;
|
|
7123
7238
|
|
|
7124
|
-
// src/components/Skeleton/version.ts
|
|
7125
|
-
exports.SKELETON_VERSION = "2.0.1";
|
|
7126
|
-
|
|
7127
7239
|
// src/components/Slider/Slider.types.ts
|
|
7128
7240
|
exports.SLIDER_Z_INDEX = {
|
|
7129
7241
|
THUMB_BUTTON: 10
|
|
@@ -7412,9 +7524,6 @@ var Slider = ({
|
|
|
7412
7524
|
] }) });
|
|
7413
7525
|
};
|
|
7414
7526
|
exports.Slider = Slider;
|
|
7415
|
-
|
|
7416
|
-
// src/components/Slider/version.ts
|
|
7417
|
-
exports.SLIDER_VERSION = "2.0.1";
|
|
7418
7527
|
var SearchBarContext = React.createContext({});
|
|
7419
7528
|
var useSearchBarContext = () => React.useContext(SearchBarContext);
|
|
7420
7529
|
var SearchBarProvider = ({
|
|
@@ -7639,9 +7748,6 @@ var SearchBar = (_a) => {
|
|
|
7639
7748
|
SearchBar.Category = SearchBarCategory;
|
|
7640
7749
|
SearchBar.Input = SearchBarInput;
|
|
7641
7750
|
|
|
7642
|
-
// src/components/SearchBar/version.ts
|
|
7643
|
-
exports.SEARCH_BAR_VERSION = "2.0.1";
|
|
7644
|
-
|
|
7645
7751
|
// src/components/SearchBar/index.ts
|
|
7646
7752
|
exports.SearchBar = SearchBar;
|
|
7647
7753
|
exports.SearchBar.Category = SearchBarCategory;
|