@shoplflow/base 0.41.7 → 0.41.9

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 CHANGED
@@ -1562,6 +1562,10 @@ var ChipButton = (_a) => {
1562
1562
  };
1563
1563
  exports.ChipButton = ChipButton;
1564
1564
  var getStyleByStyleVar = (styleVar, color, disabled) => {
1565
+ const domain = exports.getDomain();
1566
+ const secondaryBorderColor = domain === "hada" ? exports.colorTokens.hada150 : exports.colorTokens.neutral350;
1567
+ const secondaryBackgroundColor = domain === "hada" ? exports.colorTokens.hada100 : exports.colorTokens.neutral0;
1568
+ const secondaryHoverBackgroundColor = domain === "hada" ? exports.colorTokens.hada150 : exports.colorTokens.neutral100;
1565
1569
  switch (styleVar) {
1566
1570
  case "PRIMARY":
1567
1571
  return react$1.css`
@@ -1573,10 +1577,10 @@ var getStyleByStyleVar = (styleVar, color, disabled) => {
1573
1577
  `;
1574
1578
  case "SECONDARY":
1575
1579
  return react$1.css`
1576
- border: 1px solid ${exports.colorTokens.neutral350};
1577
- background-color: ${exports.colorTokens.neutral0};
1580
+ border: 1px solid ${secondaryBorderColor};
1581
+ background-color: ${secondaryBackgroundColor};
1578
1582
  :hover {
1579
- background-color: ${!disabled && exports.colorTokens.neutral100};
1583
+ background-color: ${!disabled && secondaryHoverBackgroundColor};
1580
1584
  }
1581
1585
  `;
1582
1586
  case "SOLID":
@@ -2086,18 +2090,21 @@ var MinusButton = React3.forwardRef((_a, ref) => {
2086
2090
  MinusButton[MUNUS_BUTTON_SYMBOL_KEY] = true;
2087
2091
  exports.MinusButton = MinusButton;
2088
2092
  var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
2093
+ const domain = exports.getDomain();
2094
+ const primaryColor = domain === "hada" ? exports.colorTokens.neutral700 : exports.colorTokens.primary300;
2095
+ const primaryHoverColor = domain === "hada" ? exports.colorTokens.neutral700 : exports.colorTokens.primary400;
2089
2096
  switch (styleVariant) {
2090
2097
  case "PRIMARY":
2091
2098
  if (isSelected) {
2092
2099
  return react$1.css`
2093
- background: ${exports.colorTokens.primary300};
2094
- border: 1.5px solid ${exports.colorTokens.primary300};
2100
+ background: ${primaryColor};
2101
+ border: 1.5px solid ${primaryColor};
2095
2102
  & > svg > path {
2096
2103
  fill: ${exports.colorTokens.neutral0};
2097
2104
  }
2098
2105
  ${isHovered && react$1.css`
2099
- border: 1.5px solid ${exports.colorTokens.primary400};
2100
- background: ${exports.colorTokens.primary400};
2106
+ border: 1.5px solid ${primaryHoverColor};
2107
+ background: ${primaryHoverColor};
2101
2108
  `}
2102
2109
  `;
2103
2110
  }
@@ -2818,6 +2825,9 @@ var StyledCallout = styled6__default.default.div`
2818
2825
  border-radius: ${exports.borderRadiusTokens.borderRadius08};
2819
2826
  ${({ styleVar }) => styleVar === "INFORMATION" && informationStyle}
2820
2827
  ${({ styleVar }) => styleVar === "ALERT" && alertStyle}
2828
+ ${({ fillWidth }) => fillWidth && react$1.css`
2829
+ width: 100%;
2830
+ `}
2821
2831
  `;
2822
2832
  var StyledCalloutIcon = styled6__default.default.svg`
2823
2833
  display: flex;
@@ -2830,8 +2840,8 @@ styled6__default.default.div`
2830
2840
  padding: 2px 0;
2831
2841
  `;
2832
2842
  var Callout = (_a) => {
2833
- var _b = _a, { children, styleVar = "INFORMATION" } = _b, rest = __objRest(_b, ["children", "styleVar"]);
2834
- return /* @__PURE__ */ jsxRuntime.jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", children }));
2843
+ var _b = _a, { children, styleVar = "INFORMATION", fillWidth } = _b, rest = __objRest(_b, ["children", "styleVar", "fillWidth"]);
2844
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", fillWidth, children }));
2835
2845
  };
2836
2846
  var CalloutText = (_a) => {
2837
2847
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
package/dist/index.d.cts CHANGED
@@ -730,13 +730,17 @@ declare const CalloutTypes: {
730
730
  readonly ALERT: "ALERT";
731
731
  };
732
732
  declare type CalloutType = $Values<typeof CalloutTypes>;
733
- interface CalloutProps extends CalloutOptionProps, ChildrenProps, StyleVariantProps<CalloutType> {
733
+ interface CalloutProps extends CalloutOptionProps, ChildrenProps, StyleVariantProps<CalloutType>, HTMLAttributes<HTMLDivElement> {
734
734
  }
735
735
  interface CalloutOptionProps {
736
+ /**
737
+ * Callout 컴포넌트의 너비를 100%로 설정합니다.
738
+ */
739
+ fillWidth?: boolean;
736
740
  }
737
741
 
738
742
  declare const Callout: {
739
- ({ children, styleVar, ...rest }: CalloutProps): react_jsx_runtime.JSX.Element;
743
+ ({ children, styleVar, fillWidth, ...rest }: CalloutProps): react_jsx_runtime.JSX.Element;
740
744
  Text: ({ children, ...rest }: TextProps) => react_jsx_runtime.JSX.Element;
741
745
  Icon: ({ iconSource }: IconSourceProps) => react_jsx_runtime.JSX.Element;
742
746
  };
package/dist/index.d.ts CHANGED
@@ -730,13 +730,17 @@ declare const CalloutTypes: {
730
730
  readonly ALERT: "ALERT";
731
731
  };
732
732
  declare type CalloutType = $Values<typeof CalloutTypes>;
733
- interface CalloutProps extends CalloutOptionProps, ChildrenProps, StyleVariantProps<CalloutType> {
733
+ interface CalloutProps extends CalloutOptionProps, ChildrenProps, StyleVariantProps<CalloutType>, HTMLAttributes<HTMLDivElement> {
734
734
  }
735
735
  interface CalloutOptionProps {
736
+ /**
737
+ * Callout 컴포넌트의 너비를 100%로 설정합니다.
738
+ */
739
+ fillWidth?: boolean;
736
740
  }
737
741
 
738
742
  declare const Callout: {
739
- ({ children, styleVar, ...rest }: CalloutProps): react_jsx_runtime.JSX.Element;
743
+ ({ children, styleVar, fillWidth, ...rest }: CalloutProps): react_jsx_runtime.JSX.Element;
740
744
  Text: ({ children, ...rest }: TextProps) => react_jsx_runtime.JSX.Element;
741
745
  Icon: ({ iconSource }: IconSourceProps) => react_jsx_runtime.JSX.Element;
742
746
  };
package/dist/index.js CHANGED
@@ -1535,6 +1535,10 @@ var ChipButton = (_a) => {
1535
1535
  };
1536
1536
  var ChipButton_default = ChipButton;
1537
1537
  var getStyleByStyleVar = (styleVar, color, disabled) => {
1538
+ const domain = getDomain();
1539
+ const secondaryBorderColor = domain === "hada" ? colorTokens.hada150 : colorTokens.neutral350;
1540
+ const secondaryBackgroundColor = domain === "hada" ? colorTokens.hada100 : colorTokens.neutral0;
1541
+ const secondaryHoverBackgroundColor = domain === "hada" ? colorTokens.hada150 : colorTokens.neutral100;
1538
1542
  switch (styleVar) {
1539
1543
  case "PRIMARY":
1540
1544
  return css`
@@ -1546,10 +1550,10 @@ var getStyleByStyleVar = (styleVar, color, disabled) => {
1546
1550
  `;
1547
1551
  case "SECONDARY":
1548
1552
  return css`
1549
- border: 1px solid ${colorTokens.neutral350};
1550
- background-color: ${colorTokens.neutral0};
1553
+ border: 1px solid ${secondaryBorderColor};
1554
+ background-color: ${secondaryBackgroundColor};
1551
1555
  :hover {
1552
- background-color: ${!disabled && colorTokens.neutral100};
1556
+ background-color: ${!disabled && secondaryHoverBackgroundColor};
1553
1557
  }
1554
1558
  `;
1555
1559
  case "SOLID":
@@ -2059,18 +2063,21 @@ var MinusButton = forwardRef((_a, ref) => {
2059
2063
  MinusButton[MUNUS_BUTTON_SYMBOL_KEY] = true;
2060
2064
  var MinusButton_default = MinusButton;
2061
2065
  var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
2066
+ const domain = getDomain();
2067
+ const primaryColor = domain === "hada" ? colorTokens.neutral700 : colorTokens.primary300;
2068
+ const primaryHoverColor = domain === "hada" ? colorTokens.neutral700 : colorTokens.primary400;
2062
2069
  switch (styleVariant) {
2063
2070
  case "PRIMARY":
2064
2071
  if (isSelected) {
2065
2072
  return css`
2066
- background: ${colorTokens.primary300};
2067
- border: 1.5px solid ${colorTokens.primary300};
2073
+ background: ${primaryColor};
2074
+ border: 1.5px solid ${primaryColor};
2068
2075
  & > svg > path {
2069
2076
  fill: ${colorTokens.neutral0};
2070
2077
  }
2071
2078
  ${isHovered && css`
2072
- border: 1.5px solid ${colorTokens.primary400};
2073
- background: ${colorTokens.primary400};
2079
+ border: 1.5px solid ${primaryHoverColor};
2080
+ background: ${primaryHoverColor};
2074
2081
  `}
2075
2082
  `;
2076
2083
  }
@@ -2791,6 +2798,9 @@ var StyledCallout = styled6.div`
2791
2798
  border-radius: ${borderRadiusTokens.borderRadius08};
2792
2799
  ${({ styleVar }) => styleVar === "INFORMATION" && informationStyle}
2793
2800
  ${({ styleVar }) => styleVar === "ALERT" && alertStyle}
2801
+ ${({ fillWidth }) => fillWidth && css`
2802
+ width: 100%;
2803
+ `}
2794
2804
  `;
2795
2805
  var StyledCalloutIcon = styled6.svg`
2796
2806
  display: flex;
@@ -2803,8 +2813,8 @@ styled6.div`
2803
2813
  padding: 2px 0;
2804
2814
  `;
2805
2815
  var Callout = (_a) => {
2806
- var _b = _a, { children, styleVar = "INFORMATION" } = _b, rest = __objRest(_b, ["children", "styleVar"]);
2807
- return /* @__PURE__ */ jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", children }));
2816
+ var _b = _a, { children, styleVar = "INFORMATION", fillWidth } = _b, rest = __objRest(_b, ["children", "styleVar", "fillWidth"]);
2817
+ return /* @__PURE__ */ jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", fillWidth, children }));
2808
2818
  };
2809
2819
  var CalloutText = (_a) => {
2810
2820
  var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoplflow/base",
3
- "version": "0.41.7",
3
+ "version": "0.41.9",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",