@shoplflow/base 0.20.1 → 0.22.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.cjs +67 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -16
- package/dist/index.d.ts +23 -16
- package/dist/index.js +68 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -474,19 +474,19 @@ declare type PolymorphicComponentProps<T extends React__default.ElementType, Pro
|
|
|
474
474
|
ref?: PolymorphicRef<T>;
|
|
475
475
|
};
|
|
476
476
|
|
|
477
|
-
declare const
|
|
477
|
+
declare const ButtonSizeVariants: {
|
|
478
478
|
readonly S: "S";
|
|
479
479
|
readonly M: "M";
|
|
480
480
|
};
|
|
481
|
-
declare type
|
|
482
|
-
declare const
|
|
481
|
+
declare type ButtonSizeVariantType = $Values<typeof ButtonSizeVariants>;
|
|
482
|
+
declare const ButtonStyleVariants: {
|
|
483
483
|
readonly PRIMARY: "PRIMARY";
|
|
484
484
|
readonly SECONDARY: "SECONDARY";
|
|
485
485
|
readonly SOLID: "SOLID";
|
|
486
486
|
readonly GHOST: "GHOST";
|
|
487
487
|
};
|
|
488
|
-
declare type
|
|
489
|
-
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<
|
|
488
|
+
declare type ButtonStyleVariantType = $Values<typeof ButtonStyleVariants>;
|
|
489
|
+
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<ButtonSizeVariantType> & StyleVariantProps<ButtonStyleVariantType> & ColorTokenProps & DisableProps & {
|
|
490
490
|
typography?: TypographyTokens;
|
|
491
491
|
};
|
|
492
492
|
declare type ButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, ButtonOptionProps> & LeftAndRightNodeProps;
|
|
@@ -496,19 +496,19 @@ declare type ButtonComponent = <T extends ElementType = 'button'>(props: ButtonP
|
|
|
496
496
|
|
|
497
497
|
declare const Button: ButtonComponent;
|
|
498
498
|
|
|
499
|
-
declare const
|
|
499
|
+
declare const IconButtonSizeVariants: {
|
|
500
500
|
readonly S: "S";
|
|
501
501
|
readonly M: "M";
|
|
502
502
|
};
|
|
503
|
-
declare type
|
|
504
|
-
declare const
|
|
503
|
+
declare type IconButtonSizeVariantType = $Values<typeof IconButtonSizeVariants>;
|
|
504
|
+
declare const IconButtonStyleVariants: {
|
|
505
505
|
readonly PRIMARY: "PRIMARY";
|
|
506
506
|
readonly SECONDARY: "SECONDARY";
|
|
507
507
|
readonly SOLID: "SOLID";
|
|
508
508
|
readonly GHOST: "GHOST";
|
|
509
509
|
};
|
|
510
|
-
declare type
|
|
511
|
-
declare type IconButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & DisableProps & SizeVariantProps<
|
|
510
|
+
declare type IconButtonStyleVariantType = $Values<typeof IconButtonStyleVariants>;
|
|
511
|
+
declare type IconButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & DisableProps & SizeVariantProps<IconButtonSizeVariantType> & StyleVariantProps<IconButtonStyleVariantType> & ChildrenProps & ColorTokenProps;
|
|
512
512
|
declare type IconButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, IconButtonOptionProps>;
|
|
513
513
|
declare type IconButtonComponent = <T extends ElementType = 'button'>(props: IconButtonProps<T> & {
|
|
514
514
|
ref?: ComponentPropsWithRef<T>['ref'];
|
|
@@ -685,12 +685,12 @@ interface ScrollAreaOptionProps {
|
|
|
685
685
|
|
|
686
686
|
declare const ScrollArea: ({ children, ...rest }: ScrollAreaProps) => react_jsx_runtime.JSX.Element;
|
|
687
687
|
|
|
688
|
-
declare const
|
|
688
|
+
declare const DropdownOptionVariants: {
|
|
689
689
|
readonly CLICK: "CLICK";
|
|
690
690
|
readonly OUTSIDE_CLICK: "OUTSIDE_CLICK";
|
|
691
691
|
readonly NONE: "NONE";
|
|
692
692
|
};
|
|
693
|
-
declare type
|
|
693
|
+
declare type DropdownOptionVariantType = $Values<typeof DropdownOptionVariants>;
|
|
694
694
|
interface DropdownProps extends DropdownOptionProps {
|
|
695
695
|
}
|
|
696
696
|
interface DropdownOptionProps {
|
|
@@ -708,7 +708,7 @@ interface DropdownOptionProps {
|
|
|
708
708
|
* OUTSIDE_CLICK: 컨텐츠 영역 외부를 클릭하면 닫힙니다.
|
|
709
709
|
* NONE: 클릭으로 닫히지 않습니다.
|
|
710
710
|
*/
|
|
711
|
-
option?:
|
|
711
|
+
option?: DropdownOptionVariantType;
|
|
712
712
|
width?: CSSProperties['width'];
|
|
713
713
|
}
|
|
714
714
|
interface DropdownContentProps extends HTMLAttributes<HTMLDivElement>, ChildrenProps {
|
|
@@ -1030,13 +1030,20 @@ declare const DropdownButtonIcon: _emotion_styled.StyledComponent<{
|
|
|
1030
1030
|
theme?: _emotion_react.Theme | undefined;
|
|
1031
1031
|
} & DropdownButtonProps, {}, {}>;
|
|
1032
1032
|
|
|
1033
|
+
declare const MenuSizeVariants: {
|
|
1034
|
+
readonly XS: "XS";
|
|
1035
|
+
readonly S: "S";
|
|
1036
|
+
readonly M: "M";
|
|
1037
|
+
};
|
|
1038
|
+
declare type MenuSizeVariantType = $Values<typeof MenuSizeVariants>;
|
|
1033
1039
|
interface MenuProps extends MenuOptionProps, HTMLAttributes<HTMLLIElement> {
|
|
1034
1040
|
}
|
|
1035
|
-
interface MenuOptionProps extends ChildrenProps, DisableProps, RightElementProps, LeftElementProps, SelectedProps, DefaultSelectedProps {
|
|
1041
|
+
interface MenuOptionProps extends ChildrenProps, DisableProps, RightElementProps, LeftElementProps, SelectedProps, DefaultSelectedProps, SizeVariantProps<MenuSizeVariantType> {
|
|
1036
1042
|
}
|
|
1037
1043
|
|
|
1038
|
-
declare const Menu: ({ leftSource, rightSource, children, isSelected, defaultSelected, onClick, disabled, ...rest }: MenuProps) => react_jsx_runtime.JSX.Element;
|
|
1044
|
+
declare const Menu: ({ leftSource, rightSource, children, isSelected, defaultSelected, onClick, sizeVar, disabled, ...rest }: MenuProps) => react_jsx_runtime.JSX.Element;
|
|
1039
1045
|
|
|
1046
|
+
declare const getFontStylesBySizeVar: (sizeVar: MenuOptionProps['sizeVar']) => "body1_400" | "body2_400";
|
|
1040
1047
|
declare const StyledMenu: _emotion_styled.StyledComponent<{
|
|
1041
1048
|
theme?: _emotion_react.Theme | undefined;
|
|
1042
1049
|
as?: React$1.ElementType<any> | undefined;
|
|
@@ -1209,4 +1216,4 @@ interface RadioOptionProps extends SelectedProps, DefaultSelectedProps, DisableP
|
|
|
1209
1216
|
|
|
1210
1217
|
declare const Radio: ({ isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
|
|
1211
1218
|
|
|
1212
|
-
export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps,
|
|
1219
|
+
export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, 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, DropdownOptionVariantType, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVariantType, IconButtonSizeVariants, IconButtonStyleVariantType, IconButtonStyleVariants, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MenuSizeVariantType, MenuSizeVariants, 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, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, getFontStylesBySizeVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -474,19 +474,19 @@ declare type PolymorphicComponentProps<T extends React__default.ElementType, Pro
|
|
|
474
474
|
ref?: PolymorphicRef<T>;
|
|
475
475
|
};
|
|
476
476
|
|
|
477
|
-
declare const
|
|
477
|
+
declare const ButtonSizeVariants: {
|
|
478
478
|
readonly S: "S";
|
|
479
479
|
readonly M: "M";
|
|
480
480
|
};
|
|
481
|
-
declare type
|
|
482
|
-
declare const
|
|
481
|
+
declare type ButtonSizeVariantType = $Values<typeof ButtonSizeVariants>;
|
|
482
|
+
declare const ButtonStyleVariants: {
|
|
483
483
|
readonly PRIMARY: "PRIMARY";
|
|
484
484
|
readonly SECONDARY: "SECONDARY";
|
|
485
485
|
readonly SOLID: "SOLID";
|
|
486
486
|
readonly GHOST: "GHOST";
|
|
487
487
|
};
|
|
488
|
-
declare type
|
|
489
|
-
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<
|
|
488
|
+
declare type ButtonStyleVariantType = $Values<typeof ButtonStyleVariants>;
|
|
489
|
+
declare type ButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & SizeVariantProps<ButtonSizeVariantType> & StyleVariantProps<ButtonStyleVariantType> & ColorTokenProps & DisableProps & {
|
|
490
490
|
typography?: TypographyTokens;
|
|
491
491
|
};
|
|
492
492
|
declare type ButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, ButtonOptionProps> & LeftAndRightNodeProps;
|
|
@@ -496,19 +496,19 @@ declare type ButtonComponent = <T extends ElementType = 'button'>(props: ButtonP
|
|
|
496
496
|
|
|
497
497
|
declare const Button: ButtonComponent;
|
|
498
498
|
|
|
499
|
-
declare const
|
|
499
|
+
declare const IconButtonSizeVariants: {
|
|
500
500
|
readonly S: "S";
|
|
501
501
|
readonly M: "M";
|
|
502
502
|
};
|
|
503
|
-
declare type
|
|
504
|
-
declare const
|
|
503
|
+
declare type IconButtonSizeVariantType = $Values<typeof IconButtonSizeVariants>;
|
|
504
|
+
declare const IconButtonStyleVariants: {
|
|
505
505
|
readonly PRIMARY: "PRIMARY";
|
|
506
506
|
readonly SECONDARY: "SECONDARY";
|
|
507
507
|
readonly SOLID: "SOLID";
|
|
508
508
|
readonly GHOST: "GHOST";
|
|
509
509
|
};
|
|
510
|
-
declare type
|
|
511
|
-
declare type IconButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & DisableProps & SizeVariantProps<
|
|
510
|
+
declare type IconButtonStyleVariantType = $Values<typeof IconButtonStyleVariants>;
|
|
511
|
+
declare type IconButtonOptionProps<T extends ElementType = 'button'> = Omit<ComponentPropsWithoutRef<T>, 'color' | 'disabled'> & DisableProps & SizeVariantProps<IconButtonSizeVariantType> & StyleVariantProps<IconButtonStyleVariantType> & ChildrenProps & ColorTokenProps;
|
|
512
512
|
declare type IconButtonProps<T extends ElementType = 'button'> = PolymorphicComponentProps<T, IconButtonOptionProps>;
|
|
513
513
|
declare type IconButtonComponent = <T extends ElementType = 'button'>(props: IconButtonProps<T> & {
|
|
514
514
|
ref?: ComponentPropsWithRef<T>['ref'];
|
|
@@ -685,12 +685,12 @@ interface ScrollAreaOptionProps {
|
|
|
685
685
|
|
|
686
686
|
declare const ScrollArea: ({ children, ...rest }: ScrollAreaProps) => react_jsx_runtime.JSX.Element;
|
|
687
687
|
|
|
688
|
-
declare const
|
|
688
|
+
declare const DropdownOptionVariants: {
|
|
689
689
|
readonly CLICK: "CLICK";
|
|
690
690
|
readonly OUTSIDE_CLICK: "OUTSIDE_CLICK";
|
|
691
691
|
readonly NONE: "NONE";
|
|
692
692
|
};
|
|
693
|
-
declare type
|
|
693
|
+
declare type DropdownOptionVariantType = $Values<typeof DropdownOptionVariants>;
|
|
694
694
|
interface DropdownProps extends DropdownOptionProps {
|
|
695
695
|
}
|
|
696
696
|
interface DropdownOptionProps {
|
|
@@ -708,7 +708,7 @@ interface DropdownOptionProps {
|
|
|
708
708
|
* OUTSIDE_CLICK: 컨텐츠 영역 외부를 클릭하면 닫힙니다.
|
|
709
709
|
* NONE: 클릭으로 닫히지 않습니다.
|
|
710
710
|
*/
|
|
711
|
-
option?:
|
|
711
|
+
option?: DropdownOptionVariantType;
|
|
712
712
|
width?: CSSProperties['width'];
|
|
713
713
|
}
|
|
714
714
|
interface DropdownContentProps extends HTMLAttributes<HTMLDivElement>, ChildrenProps {
|
|
@@ -1030,13 +1030,20 @@ declare const DropdownButtonIcon: _emotion_styled.StyledComponent<{
|
|
|
1030
1030
|
theme?: _emotion_react.Theme | undefined;
|
|
1031
1031
|
} & DropdownButtonProps, {}, {}>;
|
|
1032
1032
|
|
|
1033
|
+
declare const MenuSizeVariants: {
|
|
1034
|
+
readonly XS: "XS";
|
|
1035
|
+
readonly S: "S";
|
|
1036
|
+
readonly M: "M";
|
|
1037
|
+
};
|
|
1038
|
+
declare type MenuSizeVariantType = $Values<typeof MenuSizeVariants>;
|
|
1033
1039
|
interface MenuProps extends MenuOptionProps, HTMLAttributes<HTMLLIElement> {
|
|
1034
1040
|
}
|
|
1035
|
-
interface MenuOptionProps extends ChildrenProps, DisableProps, RightElementProps, LeftElementProps, SelectedProps, DefaultSelectedProps {
|
|
1041
|
+
interface MenuOptionProps extends ChildrenProps, DisableProps, RightElementProps, LeftElementProps, SelectedProps, DefaultSelectedProps, SizeVariantProps<MenuSizeVariantType> {
|
|
1036
1042
|
}
|
|
1037
1043
|
|
|
1038
|
-
declare const Menu: ({ leftSource, rightSource, children, isSelected, defaultSelected, onClick, disabled, ...rest }: MenuProps) => react_jsx_runtime.JSX.Element;
|
|
1044
|
+
declare const Menu: ({ leftSource, rightSource, children, isSelected, defaultSelected, onClick, sizeVar, disabled, ...rest }: MenuProps) => react_jsx_runtime.JSX.Element;
|
|
1039
1045
|
|
|
1046
|
+
declare const getFontStylesBySizeVar: (sizeVar: MenuOptionProps['sizeVar']) => "body1_400" | "body2_400";
|
|
1040
1047
|
declare const StyledMenu: _emotion_styled.StyledComponent<{
|
|
1041
1048
|
theme?: _emotion_react.Theme | undefined;
|
|
1042
1049
|
as?: React$1.ElementType<any> | undefined;
|
|
@@ -1209,4 +1216,4 @@ interface RadioOptionProps extends SelectedProps, DefaultSelectedProps, DisableP
|
|
|
1209
1216
|
|
|
1210
1217
|
declare const Radio: ({ isSelected, defaultSelected, disabled, onClick, onMouseEnter, onMouseLeave, ...rest }: RadioProps) => react_jsx_runtime.JSX.Element;
|
|
1211
1218
|
|
|
1212
|
-
export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps,
|
|
1219
|
+
export { BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, 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, DropdownOptionVariantType, DropdownProps, DropdownSizeVariantType, FontWeightTokens, Icon, IconButton, IconButtonComponent, IconButtonOptionProps, IconButtonProps, IconButtonSizeVariantType, IconButtonSizeVariants, IconButtonStyleVariantType, IconButtonStyleVariants, IconOptionProps, IconProps, IconSizeVariants, IconSizeVariantsType, Input, InputButton, InputButtonOptionProps, InputButtonProps, InputOptionProps, InputProps, List, ListContent2ColumnsProps, ListOptionProps, ListProps, ListText2RowsProps, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu, MenuOptionProps, MenuProps, MenuSizeVariantType, MenuSizeVariants, 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, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, getFontStylesBySizeVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
package/dist/index.js
CHANGED
|
@@ -1313,11 +1313,11 @@ var Button = forwardRef(
|
|
|
1313
1313
|
var Button_default = Button;
|
|
1314
1314
|
|
|
1315
1315
|
// src/components/Buttons/Button/Button.types.ts
|
|
1316
|
-
var
|
|
1316
|
+
var ButtonSizeVariants = {
|
|
1317
1317
|
S: "S",
|
|
1318
1318
|
M: "M"
|
|
1319
1319
|
};
|
|
1320
|
-
var
|
|
1320
|
+
var ButtonStyleVariants = {
|
|
1321
1321
|
PRIMARY: "PRIMARY",
|
|
1322
1322
|
SECONDARY: "SECONDARY",
|
|
1323
1323
|
SOLID: "SOLID",
|
|
@@ -1431,11 +1431,11 @@ var IconButton = forwardRef(
|
|
|
1431
1431
|
var IconButton_default = IconButton;
|
|
1432
1432
|
|
|
1433
1433
|
// src/components/Buttons/IconButton/IconButton.types.ts
|
|
1434
|
-
var
|
|
1434
|
+
var IconButtonSizeVariants = {
|
|
1435
1435
|
S: "S",
|
|
1436
1436
|
M: "M"
|
|
1437
1437
|
};
|
|
1438
|
-
var
|
|
1438
|
+
var IconButtonStyleVariants = {
|
|
1439
1439
|
PRIMARY: "PRIMARY",
|
|
1440
1440
|
SECONDARY: "SECONDARY",
|
|
1441
1441
|
SOLID: "SOLID",
|
|
@@ -1895,18 +1895,51 @@ var Dropdown = ({
|
|
|
1895
1895
|
Dropdown.Button = DropdownButton;
|
|
1896
1896
|
Dropdown.Content = DropdownContent;
|
|
1897
1897
|
var Dropdown_default = Dropdown;
|
|
1898
|
+
var getStylesBySizeVar = (sizeVar) => {
|
|
1899
|
+
switch (sizeVar) {
|
|
1900
|
+
case "XS":
|
|
1901
|
+
return css`
|
|
1902
|
+
min-height: 28px;
|
|
1903
|
+
`;
|
|
1904
|
+
case "S":
|
|
1905
|
+
return css`
|
|
1906
|
+
min-height: 36px;
|
|
1907
|
+
`;
|
|
1908
|
+
case "M":
|
|
1909
|
+
return css`
|
|
1910
|
+
height: 48px;
|
|
1911
|
+
`;
|
|
1912
|
+
default:
|
|
1913
|
+
return css`
|
|
1914
|
+
height: 48px;
|
|
1915
|
+
`;
|
|
1916
|
+
}
|
|
1917
|
+
};
|
|
1918
|
+
var getFontStylesBySizeVar = (sizeVar) => {
|
|
1919
|
+
switch (sizeVar) {
|
|
1920
|
+
case "XS":
|
|
1921
|
+
return "body2_400";
|
|
1922
|
+
case "S":
|
|
1923
|
+
return "body1_400";
|
|
1924
|
+
case "M":
|
|
1925
|
+
return "body1_400";
|
|
1926
|
+
default:
|
|
1927
|
+
return "body1_400";
|
|
1928
|
+
}
|
|
1929
|
+
};
|
|
1898
1930
|
var StyledMenu = styled5.li`
|
|
1899
1931
|
display: flex;
|
|
1900
|
-
flex-direction: row;
|
|
1901
|
-
padding: 6px;
|
|
1902
1932
|
width: 100%;
|
|
1933
|
+
flex-direction: row;
|
|
1903
1934
|
align-items: center;
|
|
1935
|
+
padding: 6px;
|
|
1904
1936
|
gap: 4px;
|
|
1905
|
-
cursor: pointer;
|
|
1906
1937
|
border-radius: 4px;
|
|
1907
|
-
|
|
1938
|
+
cursor: pointer;
|
|
1939
|
+
background: transparent;
|
|
1940
|
+
${({ sizeVar }) => getStylesBySizeVar(sizeVar)};
|
|
1908
1941
|
&:hover {
|
|
1909
|
-
background: ${colorTokens.
|
|
1942
|
+
background: ${colorTokens.neutral400_5};
|
|
1910
1943
|
}
|
|
1911
1944
|
${({ disabled }) => disabled && getDisabledStyle(disabled)}
|
|
1912
1945
|
${({ isSelected, leftSource }) => isSelected === true && !leftSource && css`
|
|
@@ -1924,6 +1957,7 @@ var Menu = (_a) => {
|
|
|
1924
1957
|
isSelected,
|
|
1925
1958
|
defaultSelected = false,
|
|
1926
1959
|
onClick,
|
|
1960
|
+
sizeVar = "XS",
|
|
1927
1961
|
disabled = false
|
|
1928
1962
|
} = _b, rest = __objRest(_b, [
|
|
1929
1963
|
"leftSource",
|
|
@@ -1932,6 +1966,7 @@ var Menu = (_a) => {
|
|
|
1932
1966
|
"isSelected",
|
|
1933
1967
|
"defaultSelected",
|
|
1934
1968
|
"onClick",
|
|
1969
|
+
"sizeVar",
|
|
1935
1970
|
"disabled"
|
|
1936
1971
|
]);
|
|
1937
1972
|
const [selected, handleToggle] = useOnToggle(isSelected, defaultSelected);
|
|
@@ -1942,13 +1977,31 @@ var Menu = (_a) => {
|
|
|
1942
1977
|
!disabled && handleToggle();
|
|
1943
1978
|
!disabled && onClick && onClick(e);
|
|
1944
1979
|
};
|
|
1945
|
-
return /* @__PURE__ */ jsxs(
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1980
|
+
return /* @__PURE__ */ jsxs(
|
|
1981
|
+
StyledMenu,
|
|
1982
|
+
__spreadProps(__spreadValues({
|
|
1983
|
+
sizeVar,
|
|
1984
|
+
isSelected: selected,
|
|
1985
|
+
leftSource,
|
|
1986
|
+
onClick: handleOnClick
|
|
1987
|
+
}, rest), {
|
|
1988
|
+
"data-shoplflow": "Menu",
|
|
1989
|
+
children: [
|
|
1990
|
+
leftSource && LeftSourceClone,
|
|
1991
|
+
/* @__PURE__ */ jsx(Stack_default.Horizontal, { width: "100%", height: "100%", align: "center", className: getFontStylesBySizeVar(sizeVar), children }),
|
|
1992
|
+
rightSource && rightSource
|
|
1993
|
+
]
|
|
1994
|
+
})
|
|
1995
|
+
);
|
|
1950
1996
|
};
|
|
1951
1997
|
var Menu_default = Menu;
|
|
1998
|
+
|
|
1999
|
+
// src/components/Menu/Menu.types.ts
|
|
2000
|
+
var MenuSizeVariants = {
|
|
2001
|
+
XS: "XS",
|
|
2002
|
+
S: "S",
|
|
2003
|
+
M: "M"
|
|
2004
|
+
};
|
|
1952
2005
|
var StyledList = styled5.li`
|
|
1953
2006
|
display: flex;
|
|
1954
2007
|
flex-direction: row;
|
|
@@ -2856,6 +2909,6 @@ classnames/index.js:
|
|
|
2856
2909
|
*)
|
|
2857
2910
|
*/
|
|
2858
2911
|
|
|
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,
|
|
2912
|
+
export { Button_default as Button, ButtonSizeVariants, ButtonStyleVariants, 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, IconButtonSizeVariants, IconButtonStyleVariants, IconSizeVariants, Input_default as Input, InputButton_default as InputButton, List_default as List, MODAL_FOOTER_KEY, MODAL_HEADER_KEY, Menu_default as Menu, MenuSizeVariants, 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, colorTokens, fontWeightTokens, getDomain, getDropdownFontSizeBySizeVar, getDropdownHeightBySizeVar, getDropdownIconSizeBySizeVar, getDropdownStyleBySizeVar, getFontStylesBySizeVar, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
|
2860
2913
|
//# sourceMappingURL=out.js.map
|
|
2861
2914
|
//# sourceMappingURL=index.js.map
|