@shoplflow/base 0.32.17 → 0.32.19

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
@@ -1811,65 +1811,19 @@ exports.IconButtonStyleVariants = {
1811
1811
  SOLID: "SOLID",
1812
1812
  GHOST: "GHOST"
1813
1813
  };
1814
- var informationStyle = react$1.css`
1815
- background: ${exports.colorTokens.neutral100};
1816
- & > span {
1817
- color: ${exports.colorTokens.neutral600};
1818
- }
1819
- & > svg > path {
1820
- fill: ${exports.colorTokens.neutral600};
1821
- }
1822
- `;
1823
- var alertStyle = react$1.css`
1824
- background: ${exports.colorTokens.red100};
1825
- & > span {
1826
- align-self: center;
1827
- color: ${exports.colorTokens.red300};
1828
- }
1829
- & > svg > path {
1830
- fill: ${exports.colorTokens.red300};
1831
- }
1832
- `;
1833
- var StyledCallout = styled6__default.default.div`
1834
- display: flex;
1835
- justify-content: flex-start;
1836
- align-items: start;
1837
- padding: 6px 8px;
1838
- gap: 4px;
1839
- border-radius: ${exports.borderRadiusTokens.borderRadius08};
1840
- ${({ styleVar }) => styleVar === "INFORMATION" && informationStyle}
1841
- ${({ styleVar }) => styleVar === "ALERT" && alertStyle}
1814
+ var StyledPopoverContentWrapper = styled6__default.default.div`
1815
+ min-width: 112px;
1816
+ padding: 4px;
1817
+ box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.12);
1818
+ border-radius: 8px;
1819
+ background-color: ${exports.colorTokens.neutral0};
1842
1820
  `;
1843
- var StyledCalloutIcon = styled6__default.default.svg`
1821
+ var StyledArrowIcon = styled6__default.default(framerMotion.motion.div)`
1844
1822
  display: flex;
1845
- height: 20px;
1846
- min-height: 20px;
1847
- width: 20px;
1848
- min-width: 20px;
1849
- `;
1850
- styled6__default.default.div`
1851
- padding: 2px 0;
1823
+ justify-content: center;
1824
+ align-items: center;
1825
+ flex-shrink: 0;
1852
1826
  `;
1853
- var Callout = (_a) => {
1854
- var _b = _a, { children, styleVar = "INFORMATION" } = _b, rest = __objRest(_b, ["children", "styleVar"]);
1855
- return /* @__PURE__ */ jsxRuntime.jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", children }));
1856
- };
1857
- var CalloutText = (_a) => {
1858
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
1859
- return /* @__PURE__ */ jsxRuntime.jsx(exports.Text, __spreadProps(__spreadValues({}, rest), { typography: "paragraph2", children }));
1860
- };
1861
- var CalloutIcon = ({ iconSource }) => {
1862
- return /* @__PURE__ */ jsxRuntime.jsx(StyledCalloutIcon, { as: iconSource });
1863
- };
1864
- Callout.Text = CalloutText;
1865
- Callout.Icon = CalloutIcon;
1866
- exports.Callout = Callout;
1867
-
1868
- // src/components/Callout/Callout.types.ts
1869
- exports.CalloutTypes = {
1870
- INFORMATION: "INFORMATION",
1871
- ALERT: "ALERT"
1872
- };
1873
1827
  var StyledPopper = styled6__default.default.div`
1874
1828
  width: ${({ width }) => width != null ? width : "fit-content"};
1875
1829
  height: ${({ height }) => height && height};
@@ -1947,10 +1901,14 @@ exports.PopperTrigger = React3.forwardRef(
1947
1901
  }
1948
1902
  );
1949
1903
  exports.PopperPortal = React3.forwardRef(
1950
- ({ children, animation: initialAnimation }, ref) => {
1904
+ ({ children, animation: initialAnimation, zIndex }, ref) => {
1951
1905
  const { floatingStyles, setFloating, isOpen } = usePopper();
1952
1906
  const animation = initialAnimation != null ? initialAnimation : fadeInOut;
1953
1907
  const refs = useMergeRefs2(ref, setFloating);
1908
+ let _floatingStyles = __spreadValues({}, floatingStyles);
1909
+ if (zIndex) {
1910
+ _floatingStyles = __spreadProps(__spreadValues({}, floatingStyles), { zIndex });
1911
+ }
1954
1912
  if (!isOpen) {
1955
1913
  return null;
1956
1914
  }
@@ -1961,7 +1919,7 @@ exports.PopperPortal = React3.forwardRef(
1961
1919
  animate: animation.animate,
1962
1920
  exit: animation.exit,
1963
1921
  ref: refs,
1964
- style: floatingStyles,
1922
+ style: _floatingStyles,
1965
1923
  children
1966
1924
  }
1967
1925
  ) }) });
@@ -1970,747 +1928,920 @@ exports.PopperPortal = React3.forwardRef(
1970
1928
  Popper.Trigger = exports.PopperTrigger;
1971
1929
  Popper.Portal = exports.PopperPortal;
1972
1930
  exports.Popper = Popper;
1973
- var getDropdownHeightBySizeVar = (size2) => {
1974
- switch (size2) {
1975
- case "M":
1976
- return "40px";
1977
- case "S":
1978
- return "32px";
1979
- default:
1980
- return "40px";
1981
- }
1982
- };
1983
- var getDropdownFontSizeBySizeVar = (size2) => {
1984
- switch (size2) {
1985
- case "M":
1986
- return "body1_400";
1987
- case "S":
1988
- return "body2_400";
1989
- default:
1990
- return "body1_400";
1991
- }
1992
- };
1993
- var getDropdownStyleBySizeVar = (size2) => {
1994
- switch (size2) {
1995
- case "M":
1996
- return react$1.css`
1997
- padding: 4px 4px 4px 12px;
1998
- `;
1999
- case "S":
2000
- return react$1.css`
2001
- padding: 4px 4px 4px 8px;
2002
- gap: 4px;
2003
- `;
2004
- default:
2005
- return react$1.css`
2006
- padding: 4px 4px 4px 12px;
2007
- `;
1931
+ var Container2 = styled6__default.default.div`
1932
+ display: flex;
1933
+ align-items: center;
1934
+ justify-content: center;
1935
+ width: 24px;
1936
+ height: 24px;
1937
+ padding: 4px;
1938
+ `;
1939
+ var IconButton2 = styled6__default.default.button`
1940
+ display: flex;
1941
+ width: 16px;
1942
+ height: 16px;
1943
+ flex-direction: column;
1944
+ justify-content: center;
1945
+ align-items: center;
1946
+ border-radius: ${exports.borderRadiusTokens.borderRadius04};
1947
+ border: none;
1948
+ background: ${({ color }) => exports.colorTokens[color]};
1949
+ cursor: pointer;
1950
+ transition:
1951
+ transform 0.1s ease-out,
1952
+ background 0.1s ease;
1953
+
1954
+ &:hover {
1955
+ background: ${({ color }) => exports.colorTokens[getNextColor(color, 1)]};
2008
1956
  }
2009
- };
2010
- var getDropdownIconSizeBySizeVar = (size2) => {
2011
- switch (size2) {
2012
- case "S":
1957
+ `;
1958
+ var MUNUS_BUTTON_SYMBOL_KEY = Symbol("SHOPLFLOW_MUNUS_BUTTON");
1959
+ var MinusButton = React3.forwardRef((_a, ref) => {
1960
+ var _b = _a, { onClick, color = "neutral300" } = _b, rest = __objRest(_b, ["onClick", "color"]);
1961
+ return /* @__PURE__ */ jsxRuntime.jsx(Container2, { "data-shoplflow": "minusButton", children: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({ color, onClick, ref }, rest), { children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1962
+ /* @__PURE__ */ jsxRuntime.jsx(
1963
+ "path",
1964
+ {
1965
+ d: "M0 4C0 1.79086 1.79086 0 4 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H4C1.79086 16 0 14.2091 0 12V4Z",
1966
+ fill: "none"
1967
+ }
1968
+ ),
1969
+ /* @__PURE__ */ jsxRuntime.jsx(
1970
+ "path",
1971
+ {
1972
+ fillRule: "evenodd",
1973
+ clipRule: "evenodd",
1974
+ d: "M3 8C3 7.44772 3.44772 7 4 7H12C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9H4C3.44772 9 3 8.55228 3 8Z",
1975
+ fill: "white"
1976
+ }
1977
+ )
1978
+ ] }) })) });
1979
+ });
1980
+ MinusButton[MUNUS_BUTTON_SYMBOL_KEY] = true;
1981
+ exports.MinusButton = MinusButton;
1982
+ var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
1983
+ switch (styleVariant) {
1984
+ case "PRIMARY":
1985
+ if (isSelected) {
1986
+ return react$1.css`
1987
+ background: ${exports.colorTokens.primary300};
1988
+ border: 1.5px solid ${exports.colorTokens.primary300};
1989
+ & > svg > path {
1990
+ fill: ${exports.colorTokens.neutral0};
1991
+ }
1992
+ ${isHovered && react$1.css`
1993
+ border: 1.5px solid ${exports.colorTokens.primary400};
1994
+ background: ${exports.colorTokens.primary400};
1995
+ `}
1996
+ `;
1997
+ }
2013
1998
  return react$1.css`
2014
- height: 24px;
2015
- width: 24px;
2016
- min-width: 24px;
2017
- min-height: 24px;
1999
+ background: ${exports.colorTokens.neutral200};
2000
+ border: 1.5px solid ${exports.colorTokens.neutral200};
2001
+ border-radius: 4px;
2002
+ ${isHovered && react$1.css`
2003
+ border: 1.5px solid ${exports.colorTokens.neutral300};
2004
+ background: ${exports.colorTokens.neutral300};
2005
+ `}
2006
+
2007
+ & > svg > path {
2008
+ fill: ${exports.colorTokens.neutral0};
2009
+ }
2018
2010
  `;
2019
- case "M":
2011
+ case "LINE":
2012
+ if (isSelected) {
2013
+ return react$1.css`
2014
+ border: 1.5px solid ${exports.colorTokens.primary300};
2015
+ background: transparent;
2016
+ border-radius: 4px;
2017
+ & > svg > path {
2018
+ fill: ${exports.colorTokens.primary300};
2019
+ }
2020
+ ${isHovered && react$1.css`
2021
+ border: 1.5px solid ${exports.colorTokens.primary400};
2022
+ & > svg > path {
2023
+ fill: ${exports.colorTokens.primary400};
2024
+ }
2025
+ `}
2026
+ `;
2027
+ }
2020
2028
  return react$1.css`
2021
- height: 32px;
2022
- width: 32px;
2023
- min-width: 32px;
2024
- min-height: 32px;
2029
+ background: transparent;
2030
+ border: 1.5px solid ${exports.colorTokens.neutral200};
2031
+ border-radius: 4px;
2032
+ & > svg > path {
2033
+ fill: ${exports.colorTokens.neutral200};
2034
+ }
2035
+ ${isHovered && react$1.css`
2036
+ border: 1.5px solid ${exports.colorTokens.neutral300};
2037
+ & > svg > path {
2038
+ fill: ${exports.colorTokens.neutral300};
2039
+ }
2040
+ `}
2025
2041
  `;
2026
2042
  default:
2027
- return react$1.css`
2028
- height: 32px;
2029
- width: 32px;
2030
- min-width: 32px;
2031
- min-height: 32px;
2032
- `;
2043
+ return "";
2033
2044
  }
2034
2045
  };
2035
- var StyledDropdown = styled6__default.default.div`
2036
- width: ${({ width }) => width};
2046
+ var StyledCheckHiddenInput = styled6__default.default.input`
2047
+ position: absolute;
2048
+ width: 0;
2049
+ height: 0;
2050
+ opacity: 0;
2051
+ visibility: hidden;
2037
2052
  `;
2038
- var StyledDropdownContent = styled6__default.default.div`
2053
+ var StyledCheckbox = styled6__default.default.label`
2039
2054
  display: flex;
2040
- flex-direction: column;
2041
- background: ${exports.colorTokens.neutral0};
2042
- width: ${({ width }) => width != null ? width : "240px"};
2043
- padding: 4px;
2044
- border-radius: 6px;
2045
- box-shadow: ${exports.boxShadowTokens.dropShadow};
2055
+ align-items: center;
2056
+ justify-content: center;
2057
+ min-width: 16px;
2058
+ min-height: 16px;
2059
+ width: 16px;
2060
+ height: 16px;
2061
+ background: ${exports.colorTokens.neutral200};
2062
+ border-radius: 4px;
2063
+ box-sizing: border-box;
2064
+ cursor: pointer;
2065
+ ${({ styleVar, isSelected, isHovered }) => getStylesByStyleVariant(styleVar, isSelected, isHovered)};
2066
+ ${({ disabled }) => getDisabledStyle(disabled)}
2046
2067
  `;
2047
- var StyledDropdownButton = styled6__default.default.button`
2048
- display: flex;
2049
- flex-direction: row;
2050
- align-items: center;
2051
- justify-content: space-between;
2052
- width: 100%;
2053
- height: 100%;
2054
- gap: 8px;
2055
- cursor: pointer;
2056
- background-color: ${exports.colorTokens.neutral0};
2057
- ${({ sizeVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar)};
2058
- ${({ disabled }) => disabled && react$1.css`
2059
- background-color: ${exports.colorTokens.neutral100};
2060
- cursor: not-allowed;
2061
- `}
2062
- `;
2063
- var DropdownButtonIcon = styled6__default.default(framerMotion.motion.div)`
2068
+ var Container3 = styled6__default.default.button`
2064
2069
  display: flex;
2065
2070
  align-items: center;
2066
2071
  justify-content: center;
2067
-
2068
- ${({ sizeVar }) => sizeVar && getDropdownIconSizeBySizeVar(sizeVar)};
2069
- `;
2070
- var DropdownContext = React3.createContext(null);
2071
- var useDropdown = () => {
2072
- const context = React3.useContext(DropdownContext);
2073
- if (context === null) {
2074
- throw new Error("useDropdown must be used within a DropdownProvider");
2075
- }
2076
- return context;
2077
- };
2078
- var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
2079
- if (!disabled) {
2080
- if (isError) {
2081
- return exports.colorTokens.red300;
2082
- }
2083
- if (isFocused) {
2084
- return exports.colorTokens.primary300;
2085
- }
2086
- if (isHovered) {
2087
- return exports.colorTokens.neutral700;
2088
- }
2089
- }
2090
- return exports.colorTokens.neutral300;
2091
- };
2092
- var getStyleByType = ({
2093
- type,
2094
- height,
2095
- minHeight,
2096
- maxHeight,
2097
- width,
2098
- minWidth,
2099
- maxWidth,
2100
- borderRadius,
2101
- customNumberInputHeight
2102
- }) => {
2103
- if (type === "number") {
2104
- return react$1.css`
2105
- width: ${width || "64px"};
2106
- height: ${customNumberInputHeight || "32px"};
2107
- border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
2108
- `;
2109
- }
2110
- return react$1.css`
2111
- width: ${width || "100%"};
2112
- min-width: ${minWidth || "initial"};
2113
- max-width: ${maxWidth || "initial"};
2114
- height: ${height || "initial"};
2115
- min-height: ${minHeight || "initial"};
2116
- max-height: ${maxHeight || "initial"};
2117
- border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
2118
- `;
2119
- };
2120
- var InputWrapper = styled6__default.default.label`
2121
- position: relative;
2122
- display: flex;
2123
- align-items: center;
2124
- border-radius: 6px;
2125
- flex-direction: ${({ direction }) => direction || "row"};
2126
- ${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius, customNumberInputHeight }) => getStyleByType({
2127
- customNumberInputHeight,
2128
- type,
2129
- height,
2130
- minHeight,
2131
- maxHeight,
2132
- width,
2133
- maxWidth,
2134
- minWidth,
2135
- borderRadius
2136
- })};
2137
- justify-content: space-between;
2138
- gap: ${({ gap }) => gap || "8px"};
2139
- border: 1px solid ${(props) => getBorderColorByStatus(props)};
2140
- background-color: ${exports.colorTokens.neutral0};
2141
- overflow: hidden;
2142
- ${({ disabled }) => disabled && react$1.css`
2143
- background-color: ${exports.colorTokens.neutral100};
2144
- cursor: not-allowed;
2145
- `};
2146
- `;
2147
-
2148
- // src/components/Icon/Icon.types.ts
2149
- exports.IconSizeVariants = {
2150
- XS: "XS",
2151
- S: "S",
2152
- M: "M",
2153
- L: "L",
2154
- XL: "XL"
2155
- };
2156
-
2157
- // src/components/Icon/Icon.styled.ts
2158
- var getIconSize = (size2) => {
2159
- switch (size2) {
2160
- case exports.IconSizeVariants.XS:
2161
- return "12px";
2162
- case exports.IconSizeVariants.S:
2163
- return "20px";
2164
- case exports.IconSizeVariants.M:
2165
- return "24px";
2166
- case exports.IconSizeVariants.L:
2167
- return "30px";
2168
- case exports.IconSizeVariants.XL:
2169
- return "36px";
2170
- default:
2171
- return "fit-content";
2172
- }
2173
- };
2174
- exports.StyledIcon = styled6__default.default.svg`
2175
- width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2176
- min-width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2177
- height: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2178
- min-height: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2179
- & > path {
2180
- fill: ${({ color }) => color && exports.colorTokens[color]};
2181
- }
2072
+ padding: 4px;
2073
+ width: fit-content;
2074
+ height: fit-content;
2075
+ background-color: transparent;
2182
2076
  `;
2183
- var Icon = React3.forwardRef((_a, ref) => {
2184
- var _b = _a, { iconSource } = _b, rest = __objRest(_b, ["iconSource"]);
2185
- return /* @__PURE__ */ jsxRuntime.jsx(exports.StyledIcon, __spreadProps(__spreadValues({ as: iconSource, ref }, rest), { "data-shoplflow": "Icon" }));
2186
- });
2187
- exports.Icon = Icon;
2188
- var DropdownButton = React3.forwardRef(
2077
+ exports.CHECKBOX_SYMBOL_KEY = Symbol("SHOPLFLOW_CHECKBOX");
2078
+ var Checkbox = React3.forwardRef(
2189
2079
  (_a, ref) => {
2190
- var _b = _a, { width = "100%", onClick, sizeVar = "M", isError, placeholder, value, disabled, leftSource } = _b, rest = __objRest(_b, ["width", "onClick", "sizeVar", "isError", "placeholder", "value", "disabled", "leftSource"]);
2191
- const { isOpen, setIsOpen } = useDropdown();
2192
- const [isHovered, setIsHovered] = React3.useState(false);
2193
- const handleOnClick = (e) => {
2194
- if (!disabled) {
2195
- onClick && onClick(e);
2196
- setIsOpen(!isOpen);
2197
- }
2198
- };
2199
- const handleOnMouseEnter = () => {
2200
- setIsHovered(true);
2080
+ var _b = _a, { defaultSelected, isSelected, disabled, onMouseEnter, onClick, onMouseLeave, styleVar = "PRIMARY", id } = _b, rest = __objRest(_b, ["defaultSelected", "isSelected", "disabled", "onMouseEnter", "onClick", "onMouseLeave", "styleVar", "id"]);
2081
+ const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2082
+ const [isHovered, toggleHovered] = React3.useState(false);
2083
+ const handleMouseLeave = (e) => {
2084
+ toggleHovered(false);
2085
+ onMouseLeave && onMouseLeave(e);
2201
2086
  };
2202
- const handleOnMouseLeave = () => {
2203
- setIsHovered(false);
2087
+ const handleMouseEnter = (e) => {
2088
+ toggleHovered(true);
2089
+ onMouseEnter && onMouseEnter(e);
2204
2090
  };
2205
- const getTextColor = ({ value: value2, disabled: disabled2 }) => {
2206
- if (disabled2) {
2207
- return "neutral350";
2208
- }
2209
- if (!value2) {
2210
- return "neutral400";
2091
+ const handleClick = (e) => {
2092
+ if (disabled) {
2093
+ return;
2211
2094
  }
2212
- return "neutral700";
2095
+ onClick && onClick(e);
2096
+ toggleSelected();
2213
2097
  };
2214
- return /* @__PURE__ */ jsxRuntime.jsx(
2215
- InputWrapper,
2098
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2099
+ Container3,
2216
2100
  {
2217
- onMouseEnter: handleOnMouseEnter,
2218
- onMouseLeave: handleOnMouseLeave,
2219
- isFocused: isOpen,
2220
- isHovered,
2101
+ onClick: handleClick,
2102
+ onMouseLeave: handleMouseLeave,
2103
+ onMouseEnter: handleMouseEnter,
2221
2104
  disabled,
2222
- width,
2223
- isError,
2224
- height: getDropdownHeightBySizeVar(sizeVar),
2225
- children: /* @__PURE__ */ jsxRuntime.jsxs(StyledDropdownButton, __spreadProps(__spreadValues({ ref, onClick: handleOnClick, disabled }, rest), { sizeVar, children: [
2226
- leftSource && leftSource,
2227
- value || /* @__PURE__ */ jsxRuntime.jsx(
2228
- exports.Text,
2229
- {
2230
- typography: getDropdownFontSizeBySizeVar(sizeVar),
2231
- color: getTextColor({ value, disabled }),
2232
- textOverflow: "ellipsis",
2233
- lineClamp: 1,
2234
- children: placeholder
2235
- }
2236
- ),
2105
+ type: "button",
2106
+ "data-shoplflow": "Checkbox",
2107
+ children: [
2108
+ /* @__PURE__ */ jsxRuntime.jsx(StyledCheckHiddenInput, __spreadProps(__spreadValues({ type: "checkbox", disabled, id }, rest), { ref })),
2237
2109
  /* @__PURE__ */ jsxRuntime.jsx(
2238
- DropdownButtonIcon,
2110
+ StyledCheckbox,
2239
2111
  {
2240
- sizeVar,
2241
- animate: {
2242
- rotate: isOpen ? 180 : 0
2243
- },
2244
- transition: {
2245
- duration: 0.2
2246
- },
2247
- children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DownArrowSolidXsmallIcon, color: "neutral400", sizeVar: "XS" })
2112
+ styleVar,
2113
+ htmlFor: id,
2114
+ isHovered,
2115
+ isSelected: selected,
2116
+ disabled,
2117
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
2118
+ "path",
2119
+ {
2120
+ fillRule: "evenodd",
2121
+ clipRule: "evenodd",
2122
+ d: "M9.78822 0.297596C10.1761 -0.0955083 10.8093 -0.0997053 11.2024 0.288222C11.5653 0.646308 11.5968 1.21334 11.2943 1.60765L11.2118 1.7024L5.31714 7.7024C4.95248 8.07193 4.37282 8.09687 3.97909 7.77976L3.88476 7.69335L0.779404 4.42669C0.396475 4.02871 0.408672 3.39567 0.806647 3.01274C1.17401 2.65926 1.74167 2.64247 2.12801 2.95499L2.2206 3.03998L4.614 5.567L9.78822 0.297596Z",
2123
+ fill: "white"
2124
+ }
2125
+ ) })
2248
2126
  }
2249
2127
  )
2250
- ] }))
2128
+ ]
2251
2129
  }
2252
2130
  );
2253
2131
  }
2254
2132
  );
2255
- var DropdownContent = (_a) => {
2256
- var _b = _a, { children, width: initialWidth, type, onClick } = _b, rest = __objRest(_b, ["children", "width", "type", "onClick"]);
2257
- const { width, setIsOpen, option } = useDropdown();
2258
- const isFillType = type === "FILL";
2259
- const contentWidth = isFillType ? `${width}px` : initialWidth;
2260
- const returnCallbackByOption = () => {
2261
- if (option === "OUTSIDE_CLICK") {
2262
- return () => setIsOpen(false);
2263
- }
2264
- if (option === "CLICK") {
2265
- return () => setIsOpen(false);
2133
+ Checkbox[exports.CHECKBOX_SYMBOL_KEY] = true;
2134
+ exports.Checkbox = Checkbox;
2135
+
2136
+ // src/components/ControlButtons/Checkbox/Checkbox.types.ts
2137
+ exports.CheckboxStyleVariants = {
2138
+ PRIMARY: "PRIMARY",
2139
+ LINE: "LINE"
2140
+ };
2141
+ var getSelectedStyle = (isHovered) => {
2142
+ return react$1.css`
2143
+ & > svg > circle {
2144
+ stroke: ${exports.colorTokens.primary300};
2266
2145
  }
2267
- return utils.noop;
2268
- };
2269
- const handleClick = (e) => {
2270
- onClick && onClick(e);
2271
- if (option === "CLICK") {
2272
- setIsOpen(false);
2273
- }
2274
- };
2275
- return /* @__PURE__ */ jsxRuntime.jsx(utils.OutSideClick, { outsideClick: returnCallbackByOption(), children: /* @__PURE__ */ jsxRuntime.jsx(StyledDropdownContent, __spreadProps(__spreadValues({ width: contentWidth, onClick: handleClick }, rest), { children })) });
2146
+ ${isHovered && react$1.css`
2147
+ & > svg > circle {
2148
+ stroke: ${exports.colorTokens.primary400};
2149
+ }
2150
+ `}
2151
+ `;
2276
2152
  };
2277
- var Dropdown = ({
2278
- isOpen: initialIsOpen = false,
2279
- trigger,
2280
- popper,
2281
- option = "CLICK",
2282
- width = "100%"
2283
- }) => {
2284
- const [triggerRef, setTriggerRef] = React3.useState(null);
2285
- const [size2, setSize] = React3.useState({ width: 0, height: 0 });
2286
- const [isOpen, setIsOpen] = React3.useState(false);
2287
- React3.useEffect(() => {
2288
- if (triggerRef) {
2289
- setSize({
2290
- width: triggerRef.offsetWidth,
2291
- height: triggerRef.offsetHeight
2292
- });
2293
- }
2294
- }, [triggerRef]);
2295
- React3.useEffect(() => {
2296
- if (initialIsOpen === void 0) {
2297
- return;
2298
- }
2299
- setIsOpen(initialIsOpen);
2300
- }, [initialIsOpen]);
2301
- return /* @__PURE__ */ jsxRuntime.jsx(StyledDropdown, { "data-shoplflow": "Dropdown", width, children: /* @__PURE__ */ jsxRuntime.jsx(DropdownContext.Provider, { value: __spreadProps(__spreadValues({}, size2), { isOpen, setIsOpen, option }), children: /* @__PURE__ */ jsxRuntime.jsxs(
2302
- exports.Popper,
2303
- {
2304
- offset: 4,
2305
- autoPlacement: {
2306
- allowedPlacements: ["bottom-start", "top-start"]
2307
- },
2308
- children: [
2309
- /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Trigger, { ref: setTriggerRef, isOpen, width, children: trigger }),
2310
- /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { children: popper })
2311
- ]
2153
+ var StyledRadio = styled6__default.default.div`
2154
+ display: flex;
2155
+ align-items: center;
2156
+ justify-content: center;
2157
+ min-width: 16px;
2158
+ min-height: 16px;
2159
+ width: 16px;
2160
+ height: 16px;
2161
+ ${({ isHovered }) => react$1.css`
2162
+ & > svg > circle {
2163
+ stroke: ${exports.colorTokens.neutral200};
2312
2164
  }
2313
- ) }) });
2314
- };
2315
- Dropdown.Button = DropdownButton;
2316
- Dropdown.Content = DropdownContent;
2317
- exports.Dropdown = Dropdown;
2318
- var Container2 = styled6__default.default.div`
2165
+ ${isHovered && react$1.css`
2166
+ & > svg > circle {
2167
+ stroke: ${exports.colorTokens.neutral300};
2168
+ }
2169
+ `}
2170
+ `}
2171
+ cursor: pointer;
2172
+ ${({ isSelected, isHovered }) => isSelected && getSelectedStyle(isHovered)}
2173
+ ${({ disabled }) => getDisabledStyle(disabled)}
2174
+ `;
2175
+ var Container4 = styled6__default.default.button`
2319
2176
  display: flex;
2320
2177
  align-items: center;
2321
2178
  justify-content: center;
2322
- width: 24px;
2323
- height: 24px;
2179
+ background: transparent;
2324
2180
  padding: 4px;
2181
+ width: fit-content;
2182
+ height: fit-content;
2325
2183
  `;
2326
- var IconButton2 = styled6__default.default.button`
2184
+ exports.RADIO_SYMBOL_KEY = Symbol("SHOPLFLOW_RADIO");
2185
+ var Radio = (_a) => {
2186
+ var _b = _a, { isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave } = _b, rest = __objRest(_b, ["isSelected", "defaultSelected", "disabled", "onClick", "onMouseEnter", "onMouseLeave"]);
2187
+ const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2188
+ const [isHovered, toggleHovered] = React3.useState(false);
2189
+ const handleMouseLeave = (e) => {
2190
+ toggleHovered(false);
2191
+ onMouseLeave && onMouseLeave(e);
2192
+ };
2193
+ const handleMouseEnter = (e) => {
2194
+ toggleHovered(true);
2195
+ onMouseEnter && onMouseEnter(e);
2196
+ };
2197
+ const handleClick = (e) => {
2198
+ if (disabled) {
2199
+ return;
2200
+ }
2201
+ onClick && onClick(e);
2202
+ toggleSelected();
2203
+ };
2204
+ return /* @__PURE__ */ jsxRuntime.jsx(
2205
+ Container4,
2206
+ __spreadProps(__spreadValues({
2207
+ onClick: handleClick,
2208
+ onMouseEnter: handleMouseEnter,
2209
+ onMouseLeave: handleMouseLeave
2210
+ }, rest), {
2211
+ "data-shoplflow": "Radio",
2212
+ children: /* @__PURE__ */ jsxRuntime.jsx(StyledRadio, { isSelected: selected, isHovered, disabled, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "5.5", fill: "white", stroke: "#3299FE", strokeWidth: "5" }) }) })
2213
+ })
2214
+ );
2215
+ };
2216
+ Radio[exports.RADIO_SYMBOL_KEY] = true;
2217
+ exports.Radio = Radio;
2218
+
2219
+ // src/components/Menu/Menu.styled.ts
2220
+ var getStylesBySizeVar = (sizeVar) => {
2221
+ switch (sizeVar) {
2222
+ case "XS":
2223
+ return react$1.css`
2224
+ min-height: 28px;
2225
+ `;
2226
+ case "S":
2227
+ return react$1.css`
2228
+ min-height: 36px;
2229
+ `;
2230
+ case "M":
2231
+ return react$1.css`
2232
+ height: 48px;
2233
+ `;
2234
+ default:
2235
+ return react$1.css`
2236
+ height: 48px;
2237
+ `;
2238
+ }
2239
+ };
2240
+ var getFontStylesBySizeVar = (sizeVar) => {
2241
+ switch (sizeVar) {
2242
+ case "XS":
2243
+ return "body2_400";
2244
+ case "S":
2245
+ return "body1_400";
2246
+ case "M":
2247
+ return "body1_400";
2248
+ default:
2249
+ return "body1_400";
2250
+ }
2251
+ };
2252
+ var StyledMenu = styled6__default.default.li`
2327
2253
  display: flex;
2328
- width: 16px;
2329
- height: 16px;
2330
- flex-direction: column;
2331
- justify-content: center;
2254
+ width: 100%;
2255
+ flex-direction: row;
2332
2256
  align-items: center;
2333
- border-radius: ${exports.borderRadiusTokens.borderRadius04};
2334
- border: none;
2335
- background: ${({ color }) => exports.colorTokens[color]};
2257
+ padding: 6px;
2258
+ gap: 4px;
2259
+ border-radius: 4px;
2336
2260
  cursor: pointer;
2337
- transition:
2338
- transform 0.1s ease-out,
2339
- background 0.1s ease;
2340
-
2261
+ background: transparent;
2262
+ ${({ sizeVar }) => getStylesBySizeVar(sizeVar)};
2341
2263
  &:hover {
2342
- background: ${({ color }) => exports.colorTokens[getNextColor(color, 1)]};
2264
+ background: ${exports.colorTokens.neutral400_5};
2343
2265
  }
2344
- `;
2345
- var MUNUS_BUTTON_SYMBOL_KEY = Symbol("SHOPLFLOW_MUNUS_BUTTON");
2346
- var MinusButton = React3.forwardRef((_a, ref) => {
2347
- var _b = _a, { onClick, color = "neutral300" } = _b, rest = __objRest(_b, ["onClick", "color"]);
2348
- return /* @__PURE__ */ jsxRuntime.jsx(Container2, { "data-shoplflow": "minusButton", children: /* @__PURE__ */ jsxRuntime.jsx(IconButton2, __spreadProps(__spreadValues({ color, onClick, ref }, rest), { children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
2349
- /* @__PURE__ */ jsxRuntime.jsx(
2350
- "path",
2351
- {
2352
- d: "M0 4C0 1.79086 1.79086 0 4 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H4C1.79086 16 0 14.2091 0 12V4Z",
2353
- fill: "none"
2354
- }
2355
- ),
2356
- /* @__PURE__ */ jsxRuntime.jsx(
2357
- "path",
2358
- {
2359
- fillRule: "evenodd",
2360
- clipRule: "evenodd",
2361
- d: "M3 8C3 7.44772 3.44772 7 4 7H12C12.5523 7 13 7.44772 13 8C13 8.55228 12.5523 9 12 9H4C3.44772 9 3 8.55228 3 8Z",
2362
- fill: "white"
2266
+ ${({ disabled }) => disabled && getDisabledStyle(disabled)}
2267
+ ${({ isSelected, leftSource }) => isSelected === true && (!leftSource || leftSource && !leftSource.type[exports.RADIO_SYMBOL_KEY] && !leftSource.type[exports.CHECKBOX_SYMBOL_KEY] && !leftSource.type[MUNUS_BUTTON_SYMBOL_KEY]) && react$1.css`
2268
+ background: ${exports.colorTokens.neutral200};
2269
+ &:hover {
2270
+ background: ${exports.colorTokens.neutral200};
2363
2271
  }
2364
- )
2365
- ] }) })) });
2272
+ `}
2273
+ `;
2274
+ var Menu = (_a) => {
2275
+ var _b = _a, {
2276
+ leftSource,
2277
+ rightSource,
2278
+ children,
2279
+ isSelected,
2280
+ defaultSelected = false,
2281
+ onClick,
2282
+ sizeVar = "XS",
2283
+ disabled = false
2284
+ } = _b, rest = __objRest(_b, [
2285
+ "leftSource",
2286
+ "rightSource",
2287
+ "children",
2288
+ "isSelected",
2289
+ "defaultSelected",
2290
+ "onClick",
2291
+ "sizeVar",
2292
+ "disabled"
2293
+ ]);
2294
+ const [selected, handleToggle] = useOnToggle(isSelected, defaultSelected);
2295
+ const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2296
+ isSelected
2297
+ })) : leftSource;
2298
+ const handleOnClick = (e) => {
2299
+ !disabled && handleToggle();
2300
+ !disabled && onClick && onClick(e);
2301
+ };
2302
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2303
+ StyledMenu,
2304
+ __spreadProps(__spreadValues({
2305
+ sizeVar,
2306
+ isSelected: selected,
2307
+ leftSource,
2308
+ onClick: handleOnClick
2309
+ }, rest), {
2310
+ "data-shoplflow": "Menu",
2311
+ children: [
2312
+ leftSource && LeftSourceClone,
2313
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Stack.Horizontal, { width: "100%", height: "100%", align: "center", className: getFontStylesBySizeVar(sizeVar), children }),
2314
+ rightSource && rightSource
2315
+ ]
2316
+ })
2317
+ );
2318
+ };
2319
+ exports.Menu = Menu;
2320
+
2321
+ // src/components/Menu/Menu.types.ts
2322
+ exports.MenuSizeVariants = {
2323
+ XS: "XS",
2324
+ S: "S",
2325
+ M: "M"
2326
+ };
2327
+ exports.DropdownButtonContext = React3.createContext(null);
2328
+ exports.useDropdownButtonContext = () => {
2329
+ const context = React3.useContext(exports.DropdownButtonContext);
2330
+ if (!context) {
2331
+ throw new Error("DropdownButtonContext must be used within a DropdownButton component");
2332
+ }
2333
+ return context;
2334
+ };
2335
+
2336
+ // src/components/Icon/Icon.types.ts
2337
+ exports.IconSizeVariants = {
2338
+ XS: "XS",
2339
+ S: "S",
2340
+ M: "M",
2341
+ L: "L",
2342
+ XL: "XL"
2343
+ };
2344
+
2345
+ // src/components/Icon/Icon.styled.ts
2346
+ var getIconSize = (size2) => {
2347
+ switch (size2) {
2348
+ case exports.IconSizeVariants.XS:
2349
+ return "12px";
2350
+ case exports.IconSizeVariants.S:
2351
+ return "20px";
2352
+ case exports.IconSizeVariants.M:
2353
+ return "24px";
2354
+ case exports.IconSizeVariants.L:
2355
+ return "30px";
2356
+ case exports.IconSizeVariants.XL:
2357
+ return "36px";
2358
+ default:
2359
+ return "fit-content";
2360
+ }
2361
+ };
2362
+ exports.StyledIcon = styled6__default.default.svg`
2363
+ width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2364
+ min-width: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2365
+ height: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2366
+ min-height: ${({ sizeVar }) => sizeVar && getIconSize(sizeVar)};
2367
+ & > path {
2368
+ fill: ${({ color }) => color && exports.colorTokens[color]};
2369
+ }
2370
+ `;
2371
+ var Icon = React3.forwardRef((_a, ref) => {
2372
+ var _b = _a, { iconSource } = _b, rest = __objRest(_b, ["iconSource"]);
2373
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.StyledIcon, __spreadProps(__spreadValues({ as: iconSource, ref }, rest), { "data-shoplflow": "Icon" }));
2366
2374
  });
2367
- MinusButton[MUNUS_BUTTON_SYMBOL_KEY] = true;
2368
- exports.MinusButton = MinusButton;
2369
- var getStylesByStyleVariant = (styleVariant, isSelected, isHovered) => {
2370
- switch (styleVariant) {
2371
- case "PRIMARY":
2372
- if (isSelected) {
2373
- return react$1.css`
2374
- background: ${exports.colorTokens.primary300};
2375
- border: 1.5px solid ${exports.colorTokens.primary300};
2376
- & > svg > path {
2377
- fill: ${exports.colorTokens.neutral0};
2378
- }
2379
- ${isHovered && react$1.css`
2380
- border: 1.5px solid ${exports.colorTokens.primary400};
2381
- background: ${exports.colorTokens.primary400};
2382
- `}
2383
- `;
2375
+ exports.Icon = Icon;
2376
+ var DropdownButtonMenu = (_a) => {
2377
+ var _b = _a, { onClick, children } = _b, rest = __objRest(_b, ["onClick", "children"]);
2378
+ const { setIsOpen } = exports.useDropdownButtonContext();
2379
+ return /* @__PURE__ */ jsxRuntime.jsx(
2380
+ exports.Menu,
2381
+ __spreadProps(__spreadValues({
2382
+ onClick: (event) => {
2383
+ event.stopPropagation();
2384
+ event.preventDefault();
2385
+ onClick == null ? void 0 : onClick(event);
2386
+ setIsOpen(false);
2384
2387
  }
2385
- return react$1.css`
2386
- background: ${exports.colorTokens.neutral200};
2387
- border: 1.5px solid ${exports.colorTokens.neutral200};
2388
- border-radius: 4px;
2389
- ${isHovered && react$1.css`
2390
- border: 1.5px solid ${exports.colorTokens.neutral300};
2391
- background: ${exports.colorTokens.neutral300};
2392
- `}
2393
-
2394
- & > svg > path {
2395
- fill: ${exports.colorTokens.neutral0};
2388
+ }, rest), {
2389
+ children
2390
+ })
2391
+ );
2392
+ };
2393
+ var DropdownButton = (_a) => {
2394
+ var _b = _a, {
2395
+ text,
2396
+ sizeVar,
2397
+ className,
2398
+ disabled,
2399
+ children,
2400
+ placement = "bottom-end",
2401
+ styleVar = "PRIMARY",
2402
+ floatingZIndex
2403
+ } = _b, rest = __objRest(_b, [
2404
+ "text",
2405
+ "sizeVar",
2406
+ "className",
2407
+ "disabled",
2408
+ "children",
2409
+ "placement",
2410
+ "styleVar",
2411
+ "floatingZIndex"
2412
+ ]);
2413
+ const selector = React3.useRef(`shoplflow-${crypto.randomUUID()}-dropdown-button`).current;
2414
+ const [isOpen, setIsOpen] = utils.useOutsideClick({
2415
+ selector: `.${selector}`,
2416
+ useOutsideScroll: true
2417
+ });
2418
+ let _className = `${selector}`;
2419
+ if (className) {
2420
+ _className += ` ${className}`;
2421
+ }
2422
+ let _styleVar = styleVar;
2423
+ let color = void 0;
2424
+ if (styleVar === "PRIMARY") {
2425
+ _styleVar = "SOLID";
2426
+ color = "coolgray50";
2427
+ }
2428
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.DropdownButtonContext.Provider, { value: { isOpen, setIsOpen }, children: /* @__PURE__ */ jsxRuntime.jsxs(exports.Popper, { placement, offset: 4, children: [
2429
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Trigger, { isOpen, className: _className, children: /* @__PURE__ */ jsxRuntime.jsx(
2430
+ exports.Button,
2431
+ __spreadProps(__spreadValues({
2432
+ "data-shoplflow": "DropdownButton",
2433
+ className: _className,
2434
+ sizeVar,
2435
+ styleVar: _styleVar,
2436
+ disabled,
2437
+ color,
2438
+ rightSource: /* @__PURE__ */ jsxRuntime.jsx(
2439
+ StyledArrowIcon,
2440
+ {
2441
+ animate: {
2442
+ rotate: isOpen ? 180 : 0
2443
+ },
2444
+ transition: {
2445
+ duration: 0.2
2446
+ },
2447
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2448
+ exports.Icon,
2449
+ {
2450
+ iconSource: ShoplAssets.DownArrowSolidXsmallIcon,
2451
+ color: styleVar === "PRIMARY" ? "coolgray300" : "neutral400",
2452
+ sizeVar: "XS"
2453
+ }
2454
+ )
2455
+ }
2456
+ ),
2457
+ onClick: () => {
2458
+ if (disabled) {
2459
+ return;
2460
+ }
2461
+ setIsOpen((prev) => !prev);
2396
2462
  }
2463
+ }, rest), {
2464
+ children: /* @__PURE__ */ jsxRuntime.jsx(exports.Text, { typography: "body2_400", color: "neutral700", children: text })
2465
+ })
2466
+ ) }),
2467
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { zIndex: floatingZIndex, children: /* @__PURE__ */ jsxRuntime.jsx(StyledPopoverContentWrapper, { className: _className, children }) })
2468
+ ] }) });
2469
+ };
2470
+ DropdownButton.Menu = DropdownButtonMenu;
2471
+ exports.DropdownButton = DropdownButton;
2472
+
2473
+ // src/components/Buttons/DropdownButton/DropdownButton.types.ts
2474
+ exports.DropdownButtonSizeVariants = {
2475
+ S: "S",
2476
+ M: "M"
2477
+ };
2478
+ exports.DropdownButtonStyleVariants = {
2479
+ PRIMARY: "PRIMARY",
2480
+ SECONDARY: "SECONDARY"
2481
+ };
2482
+ var informationStyle = react$1.css`
2483
+ background: ${exports.colorTokens.neutral100};
2484
+ & > span {
2485
+ color: ${exports.colorTokens.neutral600};
2486
+ }
2487
+ & > svg > path {
2488
+ fill: ${exports.colorTokens.neutral600};
2489
+ }
2490
+ `;
2491
+ var alertStyle = react$1.css`
2492
+ background: ${exports.colorTokens.red100};
2493
+ & > span {
2494
+ align-self: center;
2495
+ color: ${exports.colorTokens.red300};
2496
+ }
2497
+ & > svg > path {
2498
+ fill: ${exports.colorTokens.red300};
2499
+ }
2500
+ `;
2501
+ var StyledCallout = styled6__default.default.div`
2502
+ display: flex;
2503
+ justify-content: flex-start;
2504
+ align-items: start;
2505
+ padding: 6px 8px;
2506
+ gap: 4px;
2507
+ border-radius: ${exports.borderRadiusTokens.borderRadius08};
2508
+ ${({ styleVar }) => styleVar === "INFORMATION" && informationStyle}
2509
+ ${({ styleVar }) => styleVar === "ALERT" && alertStyle}
2510
+ `;
2511
+ var StyledCalloutIcon = styled6__default.default.svg`
2512
+ display: flex;
2513
+ height: 20px;
2514
+ min-height: 20px;
2515
+ width: 20px;
2516
+ min-width: 20px;
2517
+ `;
2518
+ styled6__default.default.div`
2519
+ padding: 2px 0;
2520
+ `;
2521
+ var Callout = (_a) => {
2522
+ var _b = _a, { children, styleVar = "INFORMATION" } = _b, rest = __objRest(_b, ["children", "styleVar"]);
2523
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledCallout, __spreadProps(__spreadValues({}, rest), { styleVar, "data-shoplflow": "Callout", children }));
2524
+ };
2525
+ var CalloutText = (_a) => {
2526
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
2527
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.Text, __spreadProps(__spreadValues({}, rest), { typography: "paragraph2", children }));
2528
+ };
2529
+ var CalloutIcon = ({ iconSource }) => {
2530
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledCalloutIcon, { as: iconSource });
2531
+ };
2532
+ Callout.Text = CalloutText;
2533
+ Callout.Icon = CalloutIcon;
2534
+ exports.Callout = Callout;
2535
+
2536
+ // src/components/Callout/Callout.types.ts
2537
+ exports.CalloutTypes = {
2538
+ INFORMATION: "INFORMATION",
2539
+ ALERT: "ALERT"
2540
+ };
2541
+ var getDropdownHeightBySizeVar = (size2) => {
2542
+ switch (size2) {
2543
+ case "M":
2544
+ return "40px";
2545
+ case "S":
2546
+ return "32px";
2547
+ default:
2548
+ return "40px";
2549
+ }
2550
+ };
2551
+ var getDropdownFontSizeBySizeVar = (size2) => {
2552
+ switch (size2) {
2553
+ case "M":
2554
+ return "body1_400";
2555
+ case "S":
2556
+ return "body2_400";
2557
+ default:
2558
+ return "body1_400";
2559
+ }
2560
+ };
2561
+ var getDropdownStyleBySizeVar = (size2) => {
2562
+ switch (size2) {
2563
+ case "M":
2564
+ return react$1.css`
2565
+ padding: 4px 4px 4px 12px;
2566
+ `;
2567
+ case "S":
2568
+ return react$1.css`
2569
+ padding: 4px 4px 4px 8px;
2570
+ gap: 4px;
2571
+ `;
2572
+ default:
2573
+ return react$1.css`
2574
+ padding: 4px 4px 4px 12px;
2397
2575
  `;
2398
- case "LINE":
2399
- if (isSelected) {
2400
- return react$1.css`
2401
- border: 1.5px solid ${exports.colorTokens.primary300};
2402
- background: transparent;
2403
- border-radius: 4px;
2404
- & > svg > path {
2405
- fill: ${exports.colorTokens.primary300};
2406
- }
2407
- ${isHovered && react$1.css`
2408
- border: 1.5px solid ${exports.colorTokens.primary400};
2409
- & > svg > path {
2410
- fill: ${exports.colorTokens.primary400};
2411
- }
2412
- `}
2413
- `;
2414
- }
2576
+ }
2577
+ };
2578
+ var getDropdownIconSizeBySizeVar = (size2) => {
2579
+ switch (size2) {
2580
+ case "S":
2415
2581
  return react$1.css`
2416
- background: transparent;
2417
- border: 1.5px solid ${exports.colorTokens.neutral200};
2418
- border-radius: 4px;
2419
- & > svg > path {
2420
- fill: ${exports.colorTokens.neutral200};
2421
- }
2422
- ${isHovered && react$1.css`
2423
- border: 1.5px solid ${exports.colorTokens.neutral300};
2424
- & > svg > path {
2425
- fill: ${exports.colorTokens.neutral300};
2426
- }
2427
- `}
2582
+ height: 24px;
2583
+ width: 24px;
2584
+ min-width: 24px;
2585
+ min-height: 24px;
2586
+ `;
2587
+ case "M":
2588
+ return react$1.css`
2589
+ height: 32px;
2590
+ width: 32px;
2591
+ min-width: 32px;
2592
+ min-height: 32px;
2428
2593
  `;
2429
2594
  default:
2430
- return "";
2595
+ return react$1.css`
2596
+ height: 32px;
2597
+ width: 32px;
2598
+ min-width: 32px;
2599
+ min-height: 32px;
2600
+ `;
2431
2601
  }
2432
2602
  };
2433
- var StyledCheckHiddenInput = styled6__default.default.input`
2434
- position: absolute;
2435
- width: 0;
2436
- height: 0;
2437
- opacity: 0;
2438
- visibility: hidden;
2603
+ var StyledDropdown = styled6__default.default.div`
2604
+ width: ${({ width }) => width};
2439
2605
  `;
2440
- var StyledCheckbox = styled6__default.default.label`
2606
+ var StyledDropdownContent = styled6__default.default.div`
2607
+ display: flex;
2608
+ flex-direction: column;
2609
+ background: ${exports.colorTokens.neutral0};
2610
+ width: ${({ width }) => width != null ? width : "240px"};
2611
+ padding: 4px;
2612
+ border-radius: 6px;
2613
+ box-shadow: ${exports.boxShadowTokens.dropShadow};
2614
+ `;
2615
+ var StyledDropdownButton = styled6__default.default.button`
2441
2616
  display: flex;
2617
+ flex-direction: row;
2442
2618
  align-items: center;
2443
- justify-content: center;
2444
- min-width: 16px;
2445
- min-height: 16px;
2446
- width: 16px;
2447
- height: 16px;
2448
- background: ${exports.colorTokens.neutral200};
2449
- border-radius: 4px;
2450
- box-sizing: border-box;
2619
+ justify-content: space-between;
2620
+ width: 100%;
2621
+ height: 100%;
2622
+ gap: 8px;
2451
2623
  cursor: pointer;
2452
- ${({ styleVar, isSelected, isHovered }) => getStylesByStyleVariant(styleVar, isSelected, isHovered)};
2453
- ${({ disabled }) => getDisabledStyle(disabled)}
2624
+ background-color: ${exports.colorTokens.neutral0};
2625
+ ${({ sizeVar }) => sizeVar && getDropdownStyleBySizeVar(sizeVar)};
2626
+ ${({ disabled }) => disabled && react$1.css`
2627
+ background-color: ${exports.colorTokens.neutral100};
2628
+ cursor: not-allowed;
2629
+ `}
2454
2630
  `;
2455
- var Container3 = styled6__default.default.button`
2631
+ var DropdownButtonIcon = styled6__default.default(framerMotion.motion.div)`
2456
2632
  display: flex;
2457
2633
  align-items: center;
2458
2634
  justify-content: center;
2459
- padding: 4px;
2460
- width: fit-content;
2461
- height: fit-content;
2462
- background-color: transparent;
2635
+
2636
+ ${({ sizeVar }) => sizeVar && getDropdownIconSizeBySizeVar(sizeVar)};
2463
2637
  `;
2464
- exports.CHECKBOX_SYMBOL_KEY = Symbol("SHOPLFLOW_CHECKBOX");
2465
- var Checkbox = React3.forwardRef(
2638
+ var DropdownContext = React3.createContext(null);
2639
+ var useDropdown = () => {
2640
+ const context = React3.useContext(DropdownContext);
2641
+ if (context === null) {
2642
+ throw new Error("useDropdown must be used within a DropdownProvider");
2643
+ }
2644
+ return context;
2645
+ };
2646
+ var getBorderColorByStatus = ({ isFocused, isError, isHovered, disabled }) => {
2647
+ if (!disabled) {
2648
+ if (isError) {
2649
+ return exports.colorTokens.red300;
2650
+ }
2651
+ if (isFocused) {
2652
+ return exports.colorTokens.primary300;
2653
+ }
2654
+ if (isHovered) {
2655
+ return exports.colorTokens.neutral700;
2656
+ }
2657
+ }
2658
+ return exports.colorTokens.neutral300;
2659
+ };
2660
+ var getStyleByType = ({
2661
+ type,
2662
+ height,
2663
+ minHeight,
2664
+ maxHeight,
2665
+ width,
2666
+ minWidth,
2667
+ maxWidth,
2668
+ borderRadius,
2669
+ customNumberInputHeight
2670
+ }) => {
2671
+ if (type === "number") {
2672
+ return react$1.css`
2673
+ width: ${width || "64px"};
2674
+ height: ${customNumberInputHeight || "32px"};
2675
+ border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
2676
+ `;
2677
+ }
2678
+ return react$1.css`
2679
+ width: ${width || "100%"};
2680
+ min-width: ${minWidth || "initial"};
2681
+ max-width: ${maxWidth || "initial"};
2682
+ height: ${height || "initial"};
2683
+ min-height: ${minHeight || "initial"};
2684
+ max-height: ${maxHeight || "initial"};
2685
+ border-radius: ${borderRadius ? exports.borderRadiusTokens[borderRadius] : "6px"};
2686
+ `;
2687
+ };
2688
+ var InputWrapper = styled6__default.default.label`
2689
+ position: relative;
2690
+ display: flex;
2691
+ align-items: center;
2692
+ border-radius: 6px;
2693
+ flex-direction: ${({ direction }) => direction || "row"};
2694
+ ${({ type, height, minHeight, maxHeight, width, maxWidth, minWidth, borderRadius, customNumberInputHeight }) => getStyleByType({
2695
+ customNumberInputHeight,
2696
+ type,
2697
+ height,
2698
+ minHeight,
2699
+ maxHeight,
2700
+ width,
2701
+ maxWidth,
2702
+ minWidth,
2703
+ borderRadius
2704
+ })};
2705
+ justify-content: space-between;
2706
+ gap: ${({ gap }) => gap || "8px"};
2707
+ border: 1px solid ${(props) => getBorderColorByStatus(props)};
2708
+ background-color: ${exports.colorTokens.neutral0};
2709
+ overflow: hidden;
2710
+ ${({ disabled }) => disabled && react$1.css`
2711
+ background-color: ${exports.colorTokens.neutral100};
2712
+ cursor: not-allowed;
2713
+ `};
2714
+ `;
2715
+ var DropdownTriggerButton = React3.forwardRef(
2466
2716
  (_a, ref) => {
2467
- var _b = _a, { defaultSelected, isSelected, disabled, onMouseEnter, onClick, onMouseLeave, styleVar = "PRIMARY", id } = _b, rest = __objRest(_b, ["defaultSelected", "isSelected", "disabled", "onMouseEnter", "onClick", "onMouseLeave", "styleVar", "id"]);
2468
- const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2469
- const [isHovered, toggleHovered] = React3.useState(false);
2470
- const handleMouseLeave = (e) => {
2471
- toggleHovered(false);
2472
- onMouseLeave && onMouseLeave(e);
2717
+ var _b = _a, { width = "100%", onClick, sizeVar = "M", isError, placeholder, value, disabled, leftSource } = _b, rest = __objRest(_b, ["width", "onClick", "sizeVar", "isError", "placeholder", "value", "disabled", "leftSource"]);
2718
+ const { isOpen, setIsOpen } = useDropdown();
2719
+ const [isHovered, setIsHovered] = React3.useState(false);
2720
+ const handleOnClick = (e) => {
2721
+ if (!disabled) {
2722
+ onClick && onClick(e);
2723
+ setIsOpen(!isOpen);
2724
+ }
2473
2725
  };
2474
- const handleMouseEnter = (e) => {
2475
- toggleHovered(true);
2476
- onMouseEnter && onMouseEnter(e);
2726
+ const handleOnMouseEnter = () => {
2727
+ setIsHovered(true);
2477
2728
  };
2478
- const handleClick = (e) => {
2479
- if (disabled) {
2480
- return;
2729
+ const handleOnMouseLeave = () => {
2730
+ setIsHovered(false);
2731
+ };
2732
+ const getTextColor = ({ value: value2, disabled: disabled2 }) => {
2733
+ if (disabled2) {
2734
+ return "neutral350";
2481
2735
  }
2482
- onClick && onClick(e);
2483
- toggleSelected();
2736
+ if (!value2) {
2737
+ return "neutral400";
2738
+ }
2739
+ return "neutral700";
2484
2740
  };
2485
- return /* @__PURE__ */ jsxRuntime.jsxs(
2486
- Container3,
2741
+ return /* @__PURE__ */ jsxRuntime.jsx(
2742
+ InputWrapper,
2487
2743
  {
2488
- onClick: handleClick,
2489
- onMouseLeave: handleMouseLeave,
2490
- onMouseEnter: handleMouseEnter,
2744
+ onMouseEnter: handleOnMouseEnter,
2745
+ onMouseLeave: handleOnMouseLeave,
2746
+ isFocused: isOpen,
2747
+ isHovered,
2491
2748
  disabled,
2492
- type: "button",
2493
- "data-shoplflow": "Checkbox",
2494
- children: [
2495
- /* @__PURE__ */ jsxRuntime.jsx(StyledCheckHiddenInput, __spreadProps(__spreadValues({ type: "checkbox", disabled, id }, rest), { ref })),
2496
- /* @__PURE__ */ jsxRuntime.jsx(
2497
- StyledCheckbox,
2749
+ width,
2750
+ isError,
2751
+ height: getDropdownHeightBySizeVar(sizeVar),
2752
+ children: /* @__PURE__ */ jsxRuntime.jsxs(StyledDropdownButton, __spreadProps(__spreadValues({ ref, onClick: handleOnClick, disabled }, rest), { sizeVar, children: [
2753
+ leftSource && leftSource,
2754
+ value || /* @__PURE__ */ jsxRuntime.jsx(
2755
+ exports.Text,
2498
2756
  {
2499
- styleVar,
2500
- htmlFor: id,
2501
- isHovered,
2502
- isSelected: selected,
2503
- disabled,
2504
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
2505
- "path",
2506
- {
2507
- fillRule: "evenodd",
2508
- clipRule: "evenodd",
2509
- d: "M9.78822 0.297596C10.1761 -0.0955083 10.8093 -0.0997053 11.2024 0.288222C11.5653 0.646308 11.5968 1.21334 11.2943 1.60765L11.2118 1.7024L5.31714 7.7024C4.95248 8.07193 4.37282 8.09687 3.97909 7.77976L3.88476 7.69335L0.779404 4.42669C0.396475 4.02871 0.408672 3.39567 0.806647 3.01274C1.17401 2.65926 1.74167 2.64247 2.12801 2.95499L2.2206 3.03998L4.614 5.567L9.78822 0.297596Z",
2510
- fill: "white"
2511
- }
2512
- ) })
2757
+ typography: getDropdownFontSizeBySizeVar(sizeVar),
2758
+ color: getTextColor({ value, disabled }),
2759
+ textOverflow: "ellipsis",
2760
+ lineClamp: 1,
2761
+ children: placeholder
2762
+ }
2763
+ ),
2764
+ /* @__PURE__ */ jsxRuntime.jsx(
2765
+ DropdownButtonIcon,
2766
+ {
2767
+ sizeVar,
2768
+ animate: {
2769
+ rotate: isOpen ? 180 : 0
2770
+ },
2771
+ transition: {
2772
+ duration: 0.2
2773
+ },
2774
+ children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DownArrowSolidXsmallIcon, color: "neutral400", sizeVar: "XS" })
2513
2775
  }
2514
2776
  )
2515
- ]
2777
+ ] }))
2516
2778
  }
2517
2779
  );
2518
2780
  }
2519
2781
  );
2520
- Checkbox[exports.CHECKBOX_SYMBOL_KEY] = true;
2521
- exports.Checkbox = Checkbox;
2522
-
2523
- // src/components/ControlButtons/Checkbox/Checkbox.types.ts
2524
- exports.CheckboxStyleVariants = {
2525
- PRIMARY: "PRIMARY",
2526
- LINE: "LINE"
2527
- };
2528
- var getSelectedStyle = (isHovered) => {
2529
- return react$1.css`
2530
- & > svg > circle {
2531
- stroke: ${exports.colorTokens.primary300};
2782
+ var DropdownContent = (_a) => {
2783
+ var _b = _a, { children, width: initialWidth, type, onClick } = _b, rest = __objRest(_b, ["children", "width", "type", "onClick"]);
2784
+ const { width, setIsOpen, option } = useDropdown();
2785
+ const isFillType = type === "FILL";
2786
+ const contentWidth = isFillType ? `${width}px` : initialWidth;
2787
+ const returnCallbackByOption = () => {
2788
+ if (option === "OUTSIDE_CLICK") {
2789
+ return () => setIsOpen(false);
2532
2790
  }
2533
- ${isHovered && react$1.css`
2534
- & > svg > circle {
2535
- stroke: ${exports.colorTokens.primary400};
2536
- }
2537
- `}
2538
- `;
2539
- };
2540
- var StyledRadio = styled6__default.default.div`
2541
- display: flex;
2542
- align-items: center;
2543
- justify-content: center;
2544
- min-width: 16px;
2545
- min-height: 16px;
2546
- width: 16px;
2547
- height: 16px;
2548
- ${({ isHovered }) => react$1.css`
2549
- & > svg > circle {
2550
- stroke: ${exports.colorTokens.neutral200};
2791
+ if (option === "CLICK") {
2792
+ return () => setIsOpen(false);
2551
2793
  }
2552
- ${isHovered && react$1.css`
2553
- & > svg > circle {
2554
- stroke: ${exports.colorTokens.neutral300};
2555
- }
2556
- `}
2557
- `}
2558
- cursor: pointer;
2559
- ${({ isSelected, isHovered }) => isSelected && getSelectedStyle(isHovered)}
2560
- ${({ disabled }) => getDisabledStyle(disabled)}
2561
- `;
2562
- var Container4 = styled6__default.default.button`
2563
- display: flex;
2564
- align-items: center;
2565
- justify-content: center;
2566
- background: transparent;
2567
- padding: 4px;
2568
- width: fit-content;
2569
- height: fit-content;
2570
- `;
2571
- exports.RADIO_SYMBOL_KEY = Symbol("SHOPLFLOW_RADIO");
2572
- var Radio = (_a) => {
2573
- var _b = _a, { isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave } = _b, rest = __objRest(_b, ["isSelected", "defaultSelected", "disabled", "onClick", "onMouseEnter", "onMouseLeave"]);
2574
- const [selected, toggleSelected] = useOnToggle(isSelected, defaultSelected);
2575
- const [isHovered, toggleHovered] = React3.useState(false);
2576
- const handleMouseLeave = (e) => {
2577
- toggleHovered(false);
2578
- onMouseLeave && onMouseLeave(e);
2579
- };
2580
- const handleMouseEnter = (e) => {
2581
- toggleHovered(true);
2582
- onMouseEnter && onMouseEnter(e);
2794
+ return utils.noop;
2583
2795
  };
2584
2796
  const handleClick = (e) => {
2585
- if (disabled) {
2586
- return;
2587
- }
2588
2797
  onClick && onClick(e);
2589
- toggleSelected();
2798
+ if (option === "CLICK") {
2799
+ setIsOpen(false);
2800
+ }
2590
2801
  };
2591
- return /* @__PURE__ */ jsxRuntime.jsx(
2592
- Container4,
2593
- __spreadProps(__spreadValues({
2594
- onClick: handleClick,
2595
- onMouseEnter: handleMouseEnter,
2596
- onMouseLeave: handleMouseLeave
2597
- }, rest), {
2598
- "data-shoplflow": "Radio",
2599
- children: /* @__PURE__ */ jsxRuntime.jsx(StyledRadio, { isSelected: selected, isHovered, disabled, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "5.5", fill: "white", stroke: "#3299FE", strokeWidth: "5" }) }) })
2600
- })
2601
- );
2602
- };
2603
- Radio[exports.RADIO_SYMBOL_KEY] = true;
2604
- exports.Radio = Radio;
2605
-
2606
- // src/components/Menu/Menu.styled.ts
2607
- var getStylesBySizeVar = (sizeVar) => {
2608
- switch (sizeVar) {
2609
- case "XS":
2610
- return react$1.css`
2611
- min-height: 28px;
2612
- `;
2613
- case "S":
2614
- return react$1.css`
2615
- min-height: 36px;
2616
- `;
2617
- case "M":
2618
- return react$1.css`
2619
- height: 48px;
2620
- `;
2621
- default:
2622
- return react$1.css`
2623
- height: 48px;
2624
- `;
2625
- }
2626
- };
2627
- var getFontStylesBySizeVar = (sizeVar) => {
2628
- switch (sizeVar) {
2629
- case "XS":
2630
- return "body2_400";
2631
- case "S":
2632
- return "body1_400";
2633
- case "M":
2634
- return "body1_400";
2635
- default:
2636
- return "body1_400";
2637
- }
2802
+ return /* @__PURE__ */ jsxRuntime.jsx(utils.OutSideClick, { outsideClick: returnCallbackByOption(), children: /* @__PURE__ */ jsxRuntime.jsx(StyledDropdownContent, __spreadProps(__spreadValues({ width: contentWidth, onClick: handleClick }, rest), { children })) });
2638
2803
  };
2639
- var StyledMenu = styled6__default.default.li`
2640
- display: flex;
2641
- width: 100%;
2642
- flex-direction: row;
2643
- align-items: center;
2644
- padding: 6px;
2645
- gap: 4px;
2646
- border-radius: 4px;
2647
- cursor: pointer;
2648
- background: transparent;
2649
- ${({ sizeVar }) => getStylesBySizeVar(sizeVar)};
2650
- &:hover {
2651
- background: ${exports.colorTokens.neutral400_5};
2652
- }
2653
- ${({ disabled }) => disabled && getDisabledStyle(disabled)}
2654
- ${({ isSelected, leftSource }) => isSelected === true && (!leftSource || leftSource && !leftSource.type[exports.RADIO_SYMBOL_KEY] && !leftSource.type[exports.CHECKBOX_SYMBOL_KEY] && !leftSource.type[MUNUS_BUTTON_SYMBOL_KEY]) && react$1.css`
2655
- background: ${exports.colorTokens.neutral200};
2656
- &:hover {
2657
- background: ${exports.colorTokens.neutral200};
2658
- }
2659
- `}
2660
- `;
2661
- var Menu = (_a) => {
2662
- var _b = _a, {
2663
- leftSource,
2664
- rightSource,
2665
- children,
2666
- isSelected,
2667
- defaultSelected = false,
2668
- onClick,
2669
- sizeVar = "XS",
2670
- disabled = false
2671
- } = _b, rest = __objRest(_b, [
2672
- "leftSource",
2673
- "rightSource",
2674
- "children",
2675
- "isSelected",
2676
- "defaultSelected",
2677
- "onClick",
2678
- "sizeVar",
2679
- "disabled"
2680
- ]);
2681
- const [selected, handleToggle] = useOnToggle(isSelected, defaultSelected);
2682
- const LeftSourceClone = leftSource ? React3__namespace.default.cloneElement(leftSource, __spreadProps(__spreadValues({}, rest), {
2683
- isSelected
2684
- })) : leftSource;
2685
- const handleOnClick = (e) => {
2686
- !disabled && handleToggle();
2687
- !disabled && onClick && onClick(e);
2688
- };
2689
- return /* @__PURE__ */ jsxRuntime.jsxs(
2690
- StyledMenu,
2691
- __spreadProps(__spreadValues({
2692
- sizeVar,
2693
- isSelected: selected,
2694
- leftSource,
2695
- onClick: handleOnClick
2696
- }, rest), {
2697
- "data-shoplflow": "Menu",
2804
+ var Dropdown = ({
2805
+ isOpen: initialIsOpen = false,
2806
+ trigger,
2807
+ popper,
2808
+ option = "CLICK",
2809
+ width = "100%"
2810
+ }) => {
2811
+ const [triggerRef, setTriggerRef] = React3.useState(null);
2812
+ const [size2, setSize] = React3.useState({ width: 0, height: 0 });
2813
+ const [isOpen, setIsOpen] = React3.useState(false);
2814
+ React3.useEffect(() => {
2815
+ if (triggerRef) {
2816
+ setSize({
2817
+ width: triggerRef.offsetWidth,
2818
+ height: triggerRef.offsetHeight
2819
+ });
2820
+ }
2821
+ }, [triggerRef]);
2822
+ React3.useEffect(() => {
2823
+ if (initialIsOpen === void 0) {
2824
+ return;
2825
+ }
2826
+ setIsOpen(initialIsOpen);
2827
+ }, [initialIsOpen]);
2828
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledDropdown, { "data-shoplflow": "Dropdown", width, children: /* @__PURE__ */ jsxRuntime.jsx(DropdownContext.Provider, { value: __spreadProps(__spreadValues({}, size2), { isOpen, setIsOpen, option }), children: /* @__PURE__ */ jsxRuntime.jsxs(
2829
+ exports.Popper,
2830
+ {
2831
+ offset: 4,
2832
+ autoPlacement: {
2833
+ allowedPlacements: ["bottom-start", "top-start"]
2834
+ },
2698
2835
  children: [
2699
- leftSource && LeftSourceClone,
2700
- /* @__PURE__ */ jsxRuntime.jsx(exports.Stack.Horizontal, { width: "100%", height: "100%", align: "center", className: getFontStylesBySizeVar(sizeVar), children }),
2701
- rightSource && rightSource
2836
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Trigger, { ref: setTriggerRef, isOpen, width, children: trigger }),
2837
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { children: popper })
2702
2838
  ]
2703
- })
2704
- );
2705
- };
2706
- exports.Menu = Menu;
2707
-
2708
- // src/components/Menu/Menu.types.ts
2709
- exports.MenuSizeVariants = {
2710
- XS: "XS",
2711
- S: "S",
2712
- M: "M"
2839
+ }
2840
+ ) }) });
2713
2841
  };
2842
+ Dropdown.Button = DropdownTriggerButton;
2843
+ Dropdown.Content = DropdownContent;
2844
+ exports.Dropdown = Dropdown;
2714
2845
  var StyledList = styled6__default.default.li`
2715
2846
  display: flex;
2716
2847
  flex-direction: row;
@@ -5823,7 +5954,8 @@ var NumberCombobox = (_a) => {
5823
5954
  sizeVar = "M",
5824
5955
  placeholder = "Enter",
5825
5956
  maxLength,
5826
- className
5957
+ className,
5958
+ floatingZIndex
5827
5959
  } = _b, rest = __objRest(_b, [
5828
5960
  "disabled",
5829
5961
  "onSelect",
@@ -5836,7 +5968,8 @@ var NumberCombobox = (_a) => {
5836
5968
  "sizeVar",
5837
5969
  "placeholder",
5838
5970
  "maxLength",
5839
- "className"
5971
+ "className",
5972
+ "floatingZIndex"
5840
5973
  ]);
5841
5974
  const selector = React3.useRef(`shoplflow-${crypto.randomUUID()}-number-combobox`).current;
5842
5975
  const inputRef = React3.useRef(null);
@@ -5941,7 +6074,7 @@ var NumberCombobox = (_a) => {
5941
6074
  ) })
5942
6075
  }, rest)
5943
6076
  ) }),
5944
- /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6077
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Popper.Portal, { zIndex: floatingZIndex, children: /* @__PURE__ */ jsxRuntime.jsx(
5945
6078
  SimpleBarReact__default.default,
5946
6079
  {
5947
6080
  className: _className,