@shoplflow/base 0.19.0 → 0.20.0

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.d.cts CHANGED
@@ -1057,6 +1057,7 @@ declare const List: {
1057
1057
  ({ children, leftSource, rightSource, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
1058
1058
  Text2Rows: ({ title, subTitle }: ListText2RowsProps) => react_jsx_runtime.JSX.Element;
1059
1059
  };
1060
+ declare const Text2Rows: ({ title, subTitle }: ListText2RowsProps) => react_jsx_runtime.JSX.Element;
1060
1061
 
1061
1062
  declare const StyledList: _emotion_styled.StyledComponent<{
1062
1063
  theme?: _emotion_react.Theme | undefined;
@@ -1067,6 +1068,26 @@ declare const StyledText2Rows: _emotion_styled.StyledComponent<{
1067
1068
  as?: React$1.ElementType<any> | undefined;
1068
1069
  }, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1069
1070
 
1071
+ declare const TagStyleVariants: {
1072
+ readonly SOLID: "SOLID";
1073
+ readonly TINT: "TINT";
1074
+ readonly LINE: "LINE";
1075
+ };
1076
+ declare const TagSizeVariants: {
1077
+ readonly XS: "XS";
1078
+ readonly S: "S";
1079
+ readonly M: "M";
1080
+ };
1081
+ declare type TagStyleVariantType = $Values<typeof TagStyleVariants>;
1082
+ declare type TagSizeVariantType = $Values<typeof TagSizeVariants>;
1083
+ interface TagProps extends TagOptionProps {
1084
+ }
1085
+ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
1086
+ radius?: boolean;
1087
+ }
1088
+
1089
+ declare const Tag: ({ sizeVar, children, rightSource, leftSource, className, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
1090
+
1070
1091
  declare const IconSizeVariants: {
1071
1092
  readonly XS: "XS";
1072
1093
  readonly S: "S";
@@ -1188,4 +1209,4 @@ interface RadioOptionProps extends SelectedProps, DefaultSelectedProps, DisableP
1188
1209
 
1189
1210
  declare const Radio: ({ isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
1190
1211
 
1191
- export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVar, ButtonStyleVar, Callout, CalloutOptionProps, CalloutProps, CalloutType, CalloutTypes, Checkbox, CheckboxOptionProps, CheckboxProps, CheckboxStyleVariantType, CheckboxStyleVariants, ChipButton, ChipButtonOptionProps, ChipButtonProps, ChipButtonSizeVariantType, ChipButtonSizeVariants, ChipButtonStyleVariantType, ChipButtonStyleVariants, ChipToggle, ChipToggleOptionProps, ChipToggleProps, ChipToggleSizeVariantType, ChipToggleSizeVariants, ChipToggleStyleVariantType, ChipToggleStyleVariants, ColorTokens, Dropdown, DropdownButtonIcon, DropdownButtonProps, DropdownContentProps, DropdownOptionProps, DropdownOptionVar, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVar, IconButtonStyleVar, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MinusBoxOptionProps, MinusBoxProps, MinusButton, Modal, ModalBodyOptionProps, ModalBodyProps, ModalContainerOptionProps, ModalContainerProps, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, MotionStack, MotionStackComponentType, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, Radio, RadioOptionProps, RadioProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackGenericProps, StackOptionProps, StackProps, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch, SwitchOptionProps, SwitchProps, Text, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
1212
+ export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVar, ButtonStyleVar, Callout, CalloutOptionProps, CalloutProps, CalloutType, CalloutTypes, Checkbox, CheckboxOptionProps, CheckboxProps, CheckboxStyleVariantType, CheckboxStyleVariants, ChipButton, ChipButtonOptionProps, ChipButtonProps, ChipButtonSizeVariantType, ChipButtonSizeVariants, ChipButtonStyleVariantType, ChipButtonStyleVariants, ChipToggle, ChipToggleOptionProps, ChipToggleProps, ChipToggleSizeVariantType, ChipToggleSizeVariants, ChipToggleStyleVariantType, ChipToggleStyleVariants, ColorTokens, Dropdown, DropdownButtonIcon, DropdownButtonProps, DropdownContentProps, DropdownOptionProps, DropdownOptionVar, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVar, IconButtonStyleVar, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MinusBoxOptionProps, MinusBoxProps, MinusButton, Modal, ModalBodyOptionProps, ModalBodyProps, ModalContainerOptionProps, ModalContainerProps, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, MotionStack, MotionStackComponentType, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, Radio, RadioOptionProps, RadioProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackGenericProps, StackOptionProps, StackProps, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch, SwitchOptionProps, SwitchProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
package/dist/index.d.ts CHANGED
@@ -1057,6 +1057,7 @@ declare const List: {
1057
1057
  ({ children, leftSource, rightSource, ...rest }: ListProps): react_jsx_runtime.JSX.Element;
1058
1058
  Text2Rows: ({ title, subTitle }: ListText2RowsProps) => react_jsx_runtime.JSX.Element;
1059
1059
  };
1060
+ declare const Text2Rows: ({ title, subTitle }: ListText2RowsProps) => react_jsx_runtime.JSX.Element;
1060
1061
 
1061
1062
  declare const StyledList: _emotion_styled.StyledComponent<{
1062
1063
  theme?: _emotion_react.Theme | undefined;
@@ -1067,6 +1068,26 @@ declare const StyledText2Rows: _emotion_styled.StyledComponent<{
1067
1068
  as?: React$1.ElementType<any> | undefined;
1068
1069
  }, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1069
1070
 
1071
+ declare const TagStyleVariants: {
1072
+ readonly SOLID: "SOLID";
1073
+ readonly TINT: "TINT";
1074
+ readonly LINE: "LINE";
1075
+ };
1076
+ declare const TagSizeVariants: {
1077
+ readonly XS: "XS";
1078
+ readonly S: "S";
1079
+ readonly M: "M";
1080
+ };
1081
+ declare type TagStyleVariantType = $Values<typeof TagStyleVariants>;
1082
+ declare type TagSizeVariantType = $Values<typeof TagSizeVariants>;
1083
+ interface TagProps extends TagOptionProps {
1084
+ }
1085
+ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVariantProps<TagStyleVariantType>, ColorTokenProps, LeftAndRightElementProps, ChildrenProps, Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
1086
+ radius?: boolean;
1087
+ }
1088
+
1089
+ declare const Tag: ({ sizeVar, children, rightSource, leftSource, className, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
1090
+
1070
1091
  declare const IconSizeVariants: {
1071
1092
  readonly XS: "XS";
1072
1093
  readonly S: "S";
@@ -1188,4 +1209,4 @@ interface RadioOptionProps extends SelectedProps, DefaultSelectedProps, DisableP
1188
1209
 
1189
1210
  declare const Radio: ({ isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
1190
1211
 
1191
- export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVar, ButtonStyleVar, Callout, CalloutOptionProps, CalloutProps, CalloutType, CalloutTypes, Checkbox, CheckboxOptionProps, CheckboxProps, CheckboxStyleVariantType, CheckboxStyleVariants, ChipButton, ChipButtonOptionProps, ChipButtonProps, ChipButtonSizeVariantType, ChipButtonSizeVariants, ChipButtonStyleVariantType, ChipButtonStyleVariants, ChipToggle, ChipToggleOptionProps, ChipToggleProps, ChipToggleSizeVariantType, ChipToggleSizeVariants, ChipToggleStyleVariantType, ChipToggleStyleVariants, ColorTokens, Dropdown, DropdownButtonIcon, DropdownButtonProps, DropdownContentProps, DropdownOptionProps, DropdownOptionVar, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVar, IconButtonStyleVar, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MinusBoxOptionProps, MinusBoxProps, MinusButton, Modal, ModalBodyOptionProps, ModalBodyProps, ModalContainerOptionProps, ModalContainerProps, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, MotionStack, MotionStackComponentType, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, Radio, RadioOptionProps, RadioProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackGenericProps, StackOptionProps, StackProps, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch, SwitchOptionProps, SwitchProps, Text, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
1212
+ export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVar, ButtonStyleVar, Callout, CalloutOptionProps, CalloutProps, CalloutType, CalloutTypes, Checkbox, CheckboxOptionProps, CheckboxProps, CheckboxStyleVariantType, CheckboxStyleVariants, ChipButton, ChipButtonOptionProps, ChipButtonProps, ChipButtonSizeVariantType, ChipButtonSizeVariants, ChipButtonStyleVariantType, ChipButtonStyleVariants, ChipToggle, ChipToggleOptionProps, ChipToggleProps, ChipToggleSizeVariantType, ChipToggleSizeVariants, ChipToggleStyleVariantType, ChipToggleStyleVariants, ColorTokens, Dropdown, DropdownButtonIcon, DropdownButtonProps, DropdownContentProps, DropdownOptionProps, DropdownOptionVar, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVar, IconButtonStyleVar, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MinusBoxOptionProps, MinusBoxProps, MinusButton, Modal, ModalBodyOptionProps, ModalBodyProps, ModalContainerOptionProps, ModalContainerProps, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, MotionStack, MotionStackComponentType, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, Radio, RadioOptionProps, RadioProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackGenericProps, StackOptionProps, StackProps, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch, SwitchOptionProps, SwitchProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
package/dist/index.js CHANGED
@@ -14,10 +14,14 @@ import * as ShoplAssets from '@shoplflow/shopl-assets';
14
14
  import { DownArrowSolidXsmallIcon } from '@shoplflow/shopl-assets';
15
15
  import * as HadaAssets from '@shoplflow/hada-assets';
16
16
 
17
+ var __create = Object.create;
17
18
  var __defProp = Object.defineProperty;
18
19
  var __defProps = Object.defineProperties;
20
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
19
21
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
22
+ var __getOwnPropNames = Object.getOwnPropertyNames;
20
23
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
24
+ var __getProtoOf = Object.getPrototypeOf;
21
25
  var __hasOwnProp = Object.prototype.hasOwnProperty;
22
26
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
23
27
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -45,6 +49,74 @@ var __objRest = (source, exclude) => {
45
49
  }
46
50
  return target;
47
51
  };
52
+ var __commonJS = (cb, mod) => function __require() {
53
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
54
+ };
55
+ var __copyProps = (to, from, except, desc) => {
56
+ if (from && typeof from === "object" || typeof from === "function") {
57
+ for (let key of __getOwnPropNames(from))
58
+ if (!__hasOwnProp.call(to, key) && key !== except)
59
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
60
+ }
61
+ return to;
62
+ };
63
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
64
+ // If the importer is in node compatibility mode or this is not an ESM
65
+ // file that has been converted to a CommonJS file using a Babel-
66
+ // compatible transform (i.e. "__esModule" has not been set), then set
67
+ // "default" to the CommonJS "module.exports" for node compatibility.
68
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
69
+ mod
70
+ ));
71
+
72
+ // ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
73
+ var require_classnames = __commonJS({
74
+ "../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js"(exports, module) {
75
+ (function() {
76
+ var hasOwn = {}.hasOwnProperty;
77
+ function classNames2() {
78
+ var classes = [];
79
+ for (var i = 0; i < arguments.length; i++) {
80
+ var arg = arguments[i];
81
+ if (!arg)
82
+ continue;
83
+ var argType = typeof arg;
84
+ if (argType === "string" || argType === "number") {
85
+ classes.push(arg);
86
+ } else if (Array.isArray(arg)) {
87
+ if (arg.length) {
88
+ var inner = classNames2.apply(null, arg);
89
+ if (inner) {
90
+ classes.push(inner);
91
+ }
92
+ }
93
+ } else if (argType === "object") {
94
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
95
+ classes.push(arg.toString());
96
+ continue;
97
+ }
98
+ for (var key in arg) {
99
+ if (hasOwn.call(arg, key) && arg[key]) {
100
+ classes.push(key);
101
+ }
102
+ }
103
+ }
104
+ }
105
+ return classes.join(" ");
106
+ }
107
+ if (typeof module !== "undefined" && module.exports) {
108
+ classNames2.default = classNames2;
109
+ module.exports = classNames2;
110
+ } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
111
+ define("classnames", [], function() {
112
+ return classNames2;
113
+ });
114
+ } else {
115
+ window.classNames = classNames2;
116
+ }
117
+ })();
118
+ }
119
+ });
48
120
  var useDomain = (domain = "SHOPL") => {
49
121
  const [domainType, setDomainType] = useState(void 0);
50
122
  useEffect(() => {
@@ -991,15 +1063,29 @@ var ChipToggle_default = ChipToggle;
991
1063
  // src/utils/getNextColor.ts
992
1064
  var getNextColor = (color, step = 1) => {
993
1065
  const colorName = color.replace(/[0-9]|_/g, "");
994
- const colorNumberString = color.replace(/[a-z]|_/g, "");
995
- const decimalColorNumber = Number(colorNumberString) * 0.01;
996
- const nextColorNumber = Math.floor(decimalColorNumber) + 100 * step;
997
- const nextColorToken = `${colorName}${nextColorNumber}`;
998
- const colorKeysOfColorName = Object.keys(colorTokens).filter((colorToken) => colorToken.includes(colorName)).sort((a, b) => Number(a.replace(/[a-z]|_/g, "")) - Number(b.replace(/[a-z]|_/g, "")));
999
1066
  const colorTokenKeys = Object.keys(colorTokens);
1000
- const findColorToken = colorTokenKeys.find((colorToken) => colorToken === nextColorToken);
1001
- const lastColorToken = colorKeysOfColorName[colorKeysOfColorName.length - 1];
1002
- return findColorToken ? findColorToken : lastColorToken;
1067
+ const findColorToken = colorTokenKeys.filter((colorToken) => colorToken.includes(colorName));
1068
+ const extractNumbers = (str) => {
1069
+ const formattedStr = str.replace(/_/g, ".");
1070
+ const regex = /\d+(\.\d+)?/g;
1071
+ const match = formattedStr.match(regex);
1072
+ return match ? parseFloat(match[0]) : 0;
1073
+ };
1074
+ const sortColorToken = findColorToken.sort((a, b) => extractNumbers(a) - extractNumbers(b));
1075
+ const currentIndex = sortColorToken.indexOf(color);
1076
+ let newIndex = currentIndex + step;
1077
+ let potentialToken = sortColorToken[newIndex];
1078
+ while (potentialToken.endsWith("_5") || potentialToken.includes("50")) {
1079
+ newIndex += Math.sign(step);
1080
+ if (newIndex < 0) {
1081
+ potentialToken = sortColorToken[0];
1082
+ }
1083
+ if (newIndex >= sortColorToken.length) {
1084
+ potentialToken = sortColorToken[sortColorToken.length - 1];
1085
+ }
1086
+ potentialToken = sortColorToken[newIndex];
1087
+ }
1088
+ return potentialToken;
1003
1089
  };
1004
1090
 
1005
1091
  // src/components/Chips/ChipButton/ChipButton.styled.ts
@@ -1904,6 +1990,133 @@ var Text2Rows = ({ title, subTitle }) => {
1904
1990
  };
1905
1991
  List.Text2Rows = Text2Rows;
1906
1992
  var List_default = List;
1993
+ var getTypographyBySize = (size2) => {
1994
+ switch (size2) {
1995
+ case "XS":
1996
+ return "caption_400";
1997
+ case "S":
1998
+ return "caption_400";
1999
+ case "M":
2000
+ return "body2_400";
2001
+ default:
2002
+ return "body2_400";
2003
+ }
2004
+ };
2005
+ var getTagStyleBySize = (size2) => {
2006
+ switch (size2) {
2007
+ case "XS":
2008
+ return css`
2009
+ height: 20px;
2010
+ padding: 0 4px;
2011
+ border-radius: 4px;
2012
+ `;
2013
+ case "S":
2014
+ return css`
2015
+ height: 24px;
2016
+ padding: 0 8px;
2017
+ border-radius: 4px;
2018
+ `;
2019
+ case "M":
2020
+ return css`
2021
+ padding: 4px 8px;
2022
+ height: 32px;
2023
+ border-radius: 6px;
2024
+ `;
2025
+ default:
2026
+ return css`
2027
+ padding: 4px 8px;
2028
+ height: 32px;
2029
+ `;
2030
+ }
2031
+ };
2032
+ var getRadiusBySize = (size2) => {
2033
+ switch (size2) {
2034
+ case "XS":
2035
+ return css`
2036
+ border-radius: 12px;
2037
+ `;
2038
+ case "S":
2039
+ return css`
2040
+ border-radius: 16px;
2041
+ `;
2042
+ case "M":
2043
+ return css`
2044
+ border-radius: 16px;
2045
+ `;
2046
+ default:
2047
+ return css`
2048
+ border-radius: 16px;
2049
+ `;
2050
+ }
2051
+ };
2052
+ var getColorsByStyleVariant = (styleVariant, color = "neutral700") => {
2053
+ switch (styleVariant) {
2054
+ case "SOLID":
2055
+ return css`
2056
+ background: ${colorTokens[color]};
2057
+ color: ${colorTokens.neutral0};
2058
+ `;
2059
+ case "TINT":
2060
+ return css`
2061
+ background: ${colorTokens[getNextColor(color, -2)]};
2062
+ color: ${colorTokens[color]};
2063
+ `;
2064
+ case "LINE":
2065
+ return css`
2066
+ background: transparent;
2067
+ color: ${colorTokens[color]};
2068
+ border: 1px solid ${colorTokens[color]};
2069
+ `;
2070
+ default:
2071
+ return css`
2072
+ background: ${colorTokens[color]};
2073
+ color: ${colorTokens.neutral0};
2074
+ `;
2075
+ }
2076
+ };
2077
+ var StyledTag = styled5.div`
2078
+ display: flex;
2079
+ align-items: center;
2080
+ flex-direction: row;
2081
+ cursor: default;
2082
+ gap: 2px;
2083
+ ${({ sizeVar }) => getTagStyleBySize(sizeVar)};
2084
+ ${({ color, styleVar }) => getColorsByStyleVariant(styleVar, color)};
2085
+ ${({ radius, sizeVar }) => radius && getRadiusBySize(sizeVar)};
2086
+ `;
2087
+
2088
+ // src/components/Tag/Tag.tsx
2089
+ var import_classnames = __toESM(require_classnames(), 1);
2090
+ var Tag = (_a) => {
2091
+ var _b = _a, { sizeVar, children, rightSource, leftSource, className } = _b, rest = __objRest(_b, ["sizeVar", "children", "rightSource", "leftSource", "className"]);
2092
+ return /* @__PURE__ */ jsxs(
2093
+ StyledTag,
2094
+ __spreadProps(__spreadValues({
2095
+ sizeVar,
2096
+ className: (0, import_classnames.default)(getTypographyBySize(sizeVar), className)
2097
+ }, rest), {
2098
+ "data-shoplflow": "Tag",
2099
+ children: [
2100
+ leftSource && leftSource,
2101
+ children,
2102
+ rightSource && rightSource
2103
+ ]
2104
+ })
2105
+ );
2106
+ };
2107
+ var Tag_default = Tag;
2108
+
2109
+ // src/components/Tag/Tag.types.ts
2110
+ var TagStyleVariants = {
2111
+ SOLID: "SOLID",
2112
+ TINT: "TINT",
2113
+ LINE: "LINE"
2114
+ };
2115
+ var TagSizeVariants = {
2116
+ XS: "XS",
2117
+ S: "S",
2118
+ M: "M"
2119
+ };
1907
2120
  var StyledInput = styled5.input`
1908
2121
  padding: 4px 0 4px 12px;
1909
2122
  background-color: transparent;
@@ -2633,7 +2846,16 @@ var Radio = (_a) => {
2633
2846
  );
2634
2847
  };
2635
2848
  var Radio_default = Radio;
2849
+ /*! Bundled license information:
2850
+
2851
+ classnames/index.js:
2852
+ (*!
2853
+ Copyright (c) 2018 Jed Watson.
2854
+ Licensed under the MIT License (MIT), see
2855
+ http://jedwatson.github.io/classnames
2856
+ *)
2857
+ */
2636
2858
 
2637
- export { Button_default as Button, Callout_default as Callout, CalloutTypes, Checkbox_default as Checkbox, CheckboxStyleVariants, ChipButton_default as ChipButton, ChipButtonSizeVariants, ChipButtonStyleVariants, ChipToggle_default as ChipToggle, ChipToggleSizeVariants, ChipToggleStyleVariants, Dropdown_default as Dropdown, DropdownButtonIcon, Icon_default as Icon, IconButton_default as IconButton, IconSizeVariants, Input_default as Input, InputButton_default as InputButton, List_default as List, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu_default as Menu, MinusButton_default as MinusButton, Modal, ModalPortal_default as ModalProvider, ModalSize, MotionStack, Popper_default as Popper, PopperPortal2 as PopperPortal, PopperTrigger, Radio_default as Radio, ScrollArea_default as ScrollArea, ShoplflowProvider_default as ShoplflowProvider, Stack_default as Stack, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch_default as Switch, Text_default as Text, TextArea_default as TextArea, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
2859
+ export { Button_default as Button, Callout_default as Callout, CalloutTypes, Checkbox_default as Checkbox, CheckboxStyleVariants, ChipButton_default as ChipButton, ChipButtonSizeVariants, ChipButtonStyleVariants, ChipToggle_default as ChipToggle, ChipToggleSizeVariants, ChipToggleStyleVariants, Dropdown_default as Dropdown, DropdownButtonIcon, Icon_default as Icon, IconButton_default as IconButton, IconSizeVariants, Input_default as Input, InputButton_default as InputButton, List_default as List, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu_default as Menu, MinusButton_default as MinusButton, Modal, ModalPortal_default as ModalProvider, ModalSize, MotionStack, Popper_default as Popper, PopperPortal2 as PopperPortal, PopperTrigger, Radio_default as Radio, ScrollArea_default as ScrollArea, ShoplflowProvider_default as ShoplflowProvider, Stack_default as Stack, StyledDropdown, StyledDropdownButton, StyledDropdownContent, StyledIcon, StyledInputButton, StyledInputButtonContent, StyledList, StyledMenu, StyledPopper, StyledStack, StyledText2Rows, Switch_default as Switch, Tag_default as Tag, TagSizeVariants, TagStyleVariants, Text_default as Text, Text2Rows, TextArea_default as TextArea, borderRadiusTokens, boxShadowTokens, buttonSizeVar, buttonStyleVar, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, iconButtonSizeVar, iconButtonStyleVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
2638
2860
  //# sourceMappingURL=out.js.map
2639
2861
  //# sourceMappingURL=index.js.map