@shoplflow/base 0.26.7 → 0.26.8
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 +263 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +265 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.d.cts
CHANGED
|
@@ -914,6 +914,13 @@ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVari
|
|
|
914
914
|
|
|
915
915
|
declare const Tag: ({ sizeVar, children, rightSource, leftSource, className, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
916
916
|
|
|
917
|
+
interface TreeProps extends TreeOptionProps {
|
|
918
|
+
}
|
|
919
|
+
interface TreeOptionProps {
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
declare const Tree: ({ ...rest }: TreeProps) => react_jsx_runtime.JSX.Element;
|
|
923
|
+
|
|
917
924
|
declare const IconSizeVariants: {
|
|
918
925
|
readonly XS: "XS";
|
|
919
926
|
readonly S: "S";
|
|
@@ -1076,6 +1083,56 @@ declare const Tooltip: {
|
|
|
1076
1083
|
Content: ({ content, ...args }: TooltipContentProps) => react_jsx_runtime.JSX.Element;
|
|
1077
1084
|
};
|
|
1078
1085
|
|
|
1086
|
+
declare const TabStyleVariants: {
|
|
1087
|
+
readonly NORMAL: "NORMAL";
|
|
1088
|
+
readonly INFO: "INFO";
|
|
1089
|
+
};
|
|
1090
|
+
declare const TabSizeVariants: {
|
|
1091
|
+
readonly M: "M";
|
|
1092
|
+
readonly L: "L";
|
|
1093
|
+
};
|
|
1094
|
+
declare type TabStyleVariantType = $Values<typeof TabStyleVariants>;
|
|
1095
|
+
declare type TabSizeVariantType = $Values<typeof TabSizeVariants>;
|
|
1096
|
+
interface TabsProps extends TabsOptionProps {
|
|
1097
|
+
/**
|
|
1098
|
+
* Tab은 Controlled Component입니다. onChange를 꼭 넘겨주세요
|
|
1099
|
+
* @param tab
|
|
1100
|
+
* @returns
|
|
1101
|
+
*/
|
|
1102
|
+
onChange: (tab: string) => void;
|
|
1103
|
+
}
|
|
1104
|
+
interface TabsOptionProps extends ChildrenProps {
|
|
1105
|
+
initialTab: string;
|
|
1106
|
+
}
|
|
1107
|
+
interface TabProps extends TabOptionProps {
|
|
1108
|
+
value: string;
|
|
1109
|
+
label: string;
|
|
1110
|
+
}
|
|
1111
|
+
interface TabOptionProps extends LeftAndRightNodeProps, StyleVariantProps<TabStyleVariantType>, SizeVariantProps<TabSizeVariantType>, Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
1112
|
+
as?: React.ElementType;
|
|
1113
|
+
activeColor?: ColorTokens;
|
|
1114
|
+
}
|
|
1115
|
+
interface TabStyledProps extends StyleVariantProps<TabStyleVariantType> {
|
|
1116
|
+
as?: React.ElementType;
|
|
1117
|
+
isActive: boolean;
|
|
1118
|
+
isHover: boolean;
|
|
1119
|
+
}
|
|
1120
|
+
interface TabTextStyledProps extends TabStyledProps {
|
|
1121
|
+
activeColor?: ColorTokens;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
declare const Tabs: {
|
|
1125
|
+
({ children, initialTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1126
|
+
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
declare type TabsContextType = {
|
|
1130
|
+
activeTab: string | null;
|
|
1131
|
+
setActiveTab: (tab: string) => void;
|
|
1132
|
+
};
|
|
1133
|
+
declare const TabsContext: React$1.Context<TabsContextType | null>;
|
|
1134
|
+
declare const useTabs: () => TabsContextType;
|
|
1135
|
+
|
|
1079
1136
|
interface PaginationProps extends PaginationOptionProps, HTMLAttributes<HTMLDivElement> {
|
|
1080
1137
|
}
|
|
1081
1138
|
interface PaginationOptionProps extends LeftAndRightNodeProps {
|
|
@@ -1122,4 +1179,4 @@ declare const Pagination: {
|
|
|
1122
1179
|
SizeSelector: ({ data, pageSize, setPageSize }: PaginationSizeSelectorProps) => react_jsx_runtime.JSX.Element;
|
|
1123
1180
|
};
|
|
1124
1181
|
|
|
1125
|
-
export { Avatar, AvatarOptionProps, AvatarProps, AvatarSizeVariantType, AvatarSizeVariants, BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, DangerouslySetInnerHTML, Dropdown, 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, ModalContext, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHandlerContext, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, ModalStateType, MotionStack, MotionStackComponentType, MotionStackContainer, MotionStackContainerComponentType, Pagination, PaginationOptionProps, PaginationProps, PaginationSizeSelectorProps, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, RADIO_SYMBOL_KEY, Radio, RadioOptionProps, RadioProps, RemoveModalProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ScrollbarRefType, SelectInputButton, SelectInputButtonOptionProps, SelectInputButtonProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackContainer, StackContainerComponentType, StackContainerGenericProps, StackContainerOptionProps, StackContainerProps, StackGenericProps, StackOptionProps, StackProps, StyledIcon, StyledStack, StyledStackContainer, Switch, SwitchOptionProps, SwitchProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, Tooltip, TooltipContentProps, TooltipOptionProps, TooltipProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
|
1182
|
+
export { Avatar, AvatarOptionProps, AvatarProps, AvatarSizeVariantType, AvatarSizeVariants, BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, DangerouslySetInnerHTML, Dropdown, 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, ModalContext, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHandlerContext, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, ModalStateType, MotionStack, MotionStackComponentType, MotionStackContainer, MotionStackContainerComponentType, Pagination, PaginationOptionProps, PaginationProps, PaginationSizeSelectorProps, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, RADIO_SYMBOL_KEY, Radio, RadioOptionProps, RadioProps, RemoveModalProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ScrollbarRefType, SelectInputButton, SelectInputButtonOptionProps, SelectInputButtonProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackContainer, StackContainerComponentType, StackContainerGenericProps, StackContainerOptionProps, StackContainerProps, StackGenericProps, StackOptionProps, StackProps, StyledIcon, StyledStack, StyledStackContainer, Switch, SwitchOptionProps, SwitchProps, TabOptionProps, TabProps, TabSizeVariantType, TabSizeVariants, TabStyleVariantType, TabStyleVariants, TabStyledProps, TabTextStyledProps, Tabs, TabsContext, TabsContextType, TabsOptionProps, TabsProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, Tooltip, TooltipContentProps, TooltipOptionProps, TooltipProps, Tree, TreeOptionProps, TreeProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue, useTabs };
|
package/dist/index.d.ts
CHANGED
|
@@ -914,6 +914,13 @@ interface TagOptionProps extends SizeVariantProps<TagSizeVariantType>, StyleVari
|
|
|
914
914
|
|
|
915
915
|
declare const Tag: ({ sizeVar, children, rightSource, leftSource, className, ...rest }: TagProps) => react_jsx_runtime.JSX.Element;
|
|
916
916
|
|
|
917
|
+
interface TreeProps extends TreeOptionProps {
|
|
918
|
+
}
|
|
919
|
+
interface TreeOptionProps {
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
declare const Tree: ({ ...rest }: TreeProps) => react_jsx_runtime.JSX.Element;
|
|
923
|
+
|
|
917
924
|
declare const IconSizeVariants: {
|
|
918
925
|
readonly XS: "XS";
|
|
919
926
|
readonly S: "S";
|
|
@@ -1076,6 +1083,56 @@ declare const Tooltip: {
|
|
|
1076
1083
|
Content: ({ content, ...args }: TooltipContentProps) => react_jsx_runtime.JSX.Element;
|
|
1077
1084
|
};
|
|
1078
1085
|
|
|
1086
|
+
declare const TabStyleVariants: {
|
|
1087
|
+
readonly NORMAL: "NORMAL";
|
|
1088
|
+
readonly INFO: "INFO";
|
|
1089
|
+
};
|
|
1090
|
+
declare const TabSizeVariants: {
|
|
1091
|
+
readonly M: "M";
|
|
1092
|
+
readonly L: "L";
|
|
1093
|
+
};
|
|
1094
|
+
declare type TabStyleVariantType = $Values<typeof TabStyleVariants>;
|
|
1095
|
+
declare type TabSizeVariantType = $Values<typeof TabSizeVariants>;
|
|
1096
|
+
interface TabsProps extends TabsOptionProps {
|
|
1097
|
+
/**
|
|
1098
|
+
* Tab은 Controlled Component입니다. onChange를 꼭 넘겨주세요
|
|
1099
|
+
* @param tab
|
|
1100
|
+
* @returns
|
|
1101
|
+
*/
|
|
1102
|
+
onChange: (tab: string) => void;
|
|
1103
|
+
}
|
|
1104
|
+
interface TabsOptionProps extends ChildrenProps {
|
|
1105
|
+
initialTab: string;
|
|
1106
|
+
}
|
|
1107
|
+
interface TabProps extends TabOptionProps {
|
|
1108
|
+
value: string;
|
|
1109
|
+
label: string;
|
|
1110
|
+
}
|
|
1111
|
+
interface TabOptionProps extends LeftAndRightNodeProps, StyleVariantProps<TabStyleVariantType>, SizeVariantProps<TabSizeVariantType>, Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
1112
|
+
as?: React.ElementType;
|
|
1113
|
+
activeColor?: ColorTokens;
|
|
1114
|
+
}
|
|
1115
|
+
interface TabStyledProps extends StyleVariantProps<TabStyleVariantType> {
|
|
1116
|
+
as?: React.ElementType;
|
|
1117
|
+
isActive: boolean;
|
|
1118
|
+
isHover: boolean;
|
|
1119
|
+
}
|
|
1120
|
+
interface TabTextStyledProps extends TabStyledProps {
|
|
1121
|
+
activeColor?: ColorTokens;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
declare const Tabs: {
|
|
1125
|
+
({ children, initialTab, onChange }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1126
|
+
Tab: ({ value, label, leftSource, rightSource, as, styleVar, sizeVar, onClick, activeColor, ...args }: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
declare type TabsContextType = {
|
|
1130
|
+
activeTab: string | null;
|
|
1131
|
+
setActiveTab: (tab: string) => void;
|
|
1132
|
+
};
|
|
1133
|
+
declare const TabsContext: React$1.Context<TabsContextType | null>;
|
|
1134
|
+
declare const useTabs: () => TabsContextType;
|
|
1135
|
+
|
|
1079
1136
|
interface PaginationProps extends PaginationOptionProps, HTMLAttributes<HTMLDivElement> {
|
|
1080
1137
|
}
|
|
1081
1138
|
interface PaginationOptionProps extends LeftAndRightNodeProps {
|
|
@@ -1122,4 +1179,4 @@ declare const Pagination: {
|
|
|
1122
1179
|
SizeSelector: ({ data, pageSize, setPageSize }: PaginationSizeSelectorProps) => react_jsx_runtime.JSX.Element;
|
|
1123
1180
|
};
|
|
1124
1181
|
|
|
1125
|
-
export { Avatar, AvatarOptionProps, AvatarProps, AvatarSizeVariantType, AvatarSizeVariants, BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, DangerouslySetInnerHTML, Dropdown, 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, ModalContext, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHandlerContext, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, ModalStateType, MotionStack, MotionStackComponentType, MotionStackContainer, MotionStackContainerComponentType, Pagination, PaginationOptionProps, PaginationProps, PaginationSizeSelectorProps, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, RADIO_SYMBOL_KEY, Radio, RadioOptionProps, RadioProps, RemoveModalProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ScrollbarRefType, SelectInputButton, SelectInputButtonOptionProps, SelectInputButtonProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackContainer, StackContainerComponentType, StackContainerGenericProps, StackContainerOptionProps, StackContainerProps, StackGenericProps, StackOptionProps, StackProps, StyledIcon, StyledStack, StyledStackContainer, Switch, SwitchOptionProps, SwitchProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, Tooltip, TooltipContentProps, TooltipOptionProps, TooltipProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
|
1182
|
+
export { Avatar, AvatarOptionProps, AvatarProps, AvatarSizeVariantType, AvatarSizeVariants, BackDropOptionProps, BackDropProps, BorderRadiusTokens, BoxShadowTokens, Button, ButtonComponent, ButtonOptionProps, ButtonProps, ButtonSizeVariantType, ButtonSizeVariants, ButtonStyleVariantType, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, DangerouslySetInnerHTML, Dropdown, 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, ModalContext, ModalFooterOptionProps, ModalFooterProps, ModalFooterType, ModalHandlerContext, ModalHeaderOptionProps, ModalHeaderProps, ModalHeaderType, ModalPortal as ModalProvider, ModalSize, ModalSizeType, ModalStateType, MotionStack, MotionStackComponentType, MotionStackContainer, MotionStackContainerComponentType, Pagination, PaginationOptionProps, PaginationProps, PaginationSizeSelectorProps, Popper, PopperOptionProps, PopperPortal, PopperPortalProps, PopperProps, PopperTrigger, PopperTriggerProps, RADIO_SYMBOL_KEY, Radio, RadioOptionProps, RadioProps, RemoveModalProps, ScrollArea, ScrollAreaOptionProps, ScrollAreaProps, ScrollbarRefType, SelectInputButton, SelectInputButtonOptionProps, SelectInputButtonProps, ShoplflowProvider, ShoplflowProviderProps, SpacingTokens, Stack, StackComponentType, StackContainer, StackContainerComponentType, StackContainerGenericProps, StackContainerOptionProps, StackContainerProps, StackGenericProps, StackOptionProps, StackProps, StyledIcon, StyledStack, StyledStackContainer, Switch, SwitchOptionProps, SwitchProps, TabOptionProps, TabProps, TabSizeVariantType, TabSizeVariants, TabStyleVariantType, TabStyleVariants, TabStyledProps, TabTextStyledProps, Tabs, TabsContext, TabsContextType, TabsOptionProps, TabsProps, Tag, TagOptionProps, TagProps, TagSizeVariantType, TagSizeVariants, TagStyleVariantType, TagStyleVariants, Text, Text2Rows, TextArea, TextAreaOptionProps, TextAreaProps, TextOptionProps, TextProps, Tooltip, TooltipContentProps, TooltipOptionProps, TooltipProps, Tree, TreeOptionProps, TreeProps, TypographyTokens, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue, useTabs };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React3 from 'react';
|
|
2
2
|
import React3__default, { forwardRef, useRef, useState, useCallback, useEffect, createContext, useId, useContext, useMemo } from 'react';
|
|
3
3
|
import styled6 from '@emotion/styled';
|
|
4
|
-
import { motion, AnimatePresence } from 'framer-motion';
|
|
4
|
+
import { motion, AnimatePresence, LayoutGroup } from 'framer-motion';
|
|
5
5
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { css } from '@emotion/react';
|
|
@@ -2769,6 +2769,12 @@ var TagSizeVariants = {
|
|
|
2769
2769
|
S: "S",
|
|
2770
2770
|
M: "M"
|
|
2771
2771
|
};
|
|
2772
|
+
var StyledTree = styled6.div``;
|
|
2773
|
+
var Tree = (_a) => {
|
|
2774
|
+
var rest = __objRest(_a, []);
|
|
2775
|
+
return /* @__PURE__ */ jsx(StyledTree, __spreadProps(__spreadValues({}, rest), { "data-shoplflow": "Tree", children: "Tree" }));
|
|
2776
|
+
};
|
|
2777
|
+
var Tree_default = Tree;
|
|
2772
2778
|
var StyledInput = styled6.input`
|
|
2773
2779
|
padding: 4px 0 4px 12px;
|
|
2774
2780
|
background-color: transparent;
|
|
@@ -3411,6 +3417,263 @@ var Tooltip = (_a) => {
|
|
|
3411
3417
|
};
|
|
3412
3418
|
Tooltip.Content = TooltipContent;
|
|
3413
3419
|
var Tooltip_default = Tooltip;
|
|
3420
|
+
var TabsContext = createContext(null);
|
|
3421
|
+
var useTabs = () => {
|
|
3422
|
+
const context = useContext(TabsContext);
|
|
3423
|
+
if (context === null) {
|
|
3424
|
+
throw new Error("useTabs should be used in Tabs");
|
|
3425
|
+
}
|
|
3426
|
+
return context;
|
|
3427
|
+
};
|
|
3428
|
+
var getHoverTabStyleByStyleVar = (styleVar) => {
|
|
3429
|
+
switch (styleVar) {
|
|
3430
|
+
case "INFO": {
|
|
3431
|
+
return css`
|
|
3432
|
+
::after {
|
|
3433
|
+
content: '';
|
|
3434
|
+
position: absolute;
|
|
3435
|
+
left: 0;
|
|
3436
|
+
right: 0;
|
|
3437
|
+
bottom: -2px;
|
|
3438
|
+
height: 2px;
|
|
3439
|
+
background: ${colorTokens.neutral500};
|
|
3440
|
+
}
|
|
3441
|
+
`;
|
|
3442
|
+
}
|
|
3443
|
+
default: {
|
|
3444
|
+
return null;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
};
|
|
3448
|
+
var getWrapperStyleByStyleVar = (styleVar) => {
|
|
3449
|
+
switch (styleVar) {
|
|
3450
|
+
case "INFO": {
|
|
3451
|
+
return css`
|
|
3452
|
+
padding-inline: 16px;
|
|
3453
|
+
`;
|
|
3454
|
+
}
|
|
3455
|
+
default: {
|
|
3456
|
+
return null;
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
};
|
|
3460
|
+
var getActiveTriggerStyleByStyleVar = (styleVar) => {
|
|
3461
|
+
switch (styleVar) {
|
|
3462
|
+
case "INFO": {
|
|
3463
|
+
return css`
|
|
3464
|
+
::after {
|
|
3465
|
+
content: '';
|
|
3466
|
+
position: absolute;
|
|
3467
|
+
left: 0;
|
|
3468
|
+
right: 0;
|
|
3469
|
+
bottom: -2px;
|
|
3470
|
+
height: 2px;
|
|
3471
|
+
background: #000;
|
|
3472
|
+
}
|
|
3473
|
+
`;
|
|
3474
|
+
}
|
|
3475
|
+
default: {
|
|
3476
|
+
return null;
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
};
|
|
3480
|
+
var StyledTab = styled6.div`
|
|
3481
|
+
display: flex;
|
|
3482
|
+
flex-direction: row;
|
|
3483
|
+
align-items: center;
|
|
3484
|
+
padding: 12px 16px;
|
|
3485
|
+
width: fit-content;
|
|
3486
|
+
cursor: pointer;
|
|
3487
|
+
position: relative;
|
|
3488
|
+
user-select: none;
|
|
3489
|
+
|
|
3490
|
+
${({ styleVar }) => styleVar && getWrapperStyleByStyleVar(styleVar)};
|
|
3491
|
+
|
|
3492
|
+
/* hover style */
|
|
3493
|
+
${({ isActive, isHover, styleVar }) => !isActive && isHover && styleVar && getHoverTabStyleByStyleVar(styleVar)}
|
|
3494
|
+
|
|
3495
|
+
/* active style */
|
|
3496
|
+
${({ isActive, styleVar }) => isActive && styleVar && getActiveTriggerStyleByStyleVar(styleVar)}
|
|
3497
|
+
`;
|
|
3498
|
+
var getTextStyleByStyleVar = (styleVar) => {
|
|
3499
|
+
switch (styleVar) {
|
|
3500
|
+
case "NORMAL": {
|
|
3501
|
+
return css`
|
|
3502
|
+
color: ${colorTokens.neutral400};
|
|
3503
|
+
`;
|
|
3504
|
+
}
|
|
3505
|
+
case "INFO": {
|
|
3506
|
+
return css`
|
|
3507
|
+
color: ${colorTokens.neutral500};
|
|
3508
|
+
`;
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
};
|
|
3512
|
+
var getHoverTextStyleByStyleVar = (styleVar) => {
|
|
3513
|
+
switch (styleVar) {
|
|
3514
|
+
case "NORMAL": {
|
|
3515
|
+
return css`
|
|
3516
|
+
color: ${colorTokens.neutral500};
|
|
3517
|
+
`;
|
|
3518
|
+
}
|
|
3519
|
+
case "INFO": {
|
|
3520
|
+
return css`
|
|
3521
|
+
color: ${colorTokens.neutral700};
|
|
3522
|
+
`;
|
|
3523
|
+
}
|
|
3524
|
+
default: {
|
|
3525
|
+
return null;
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
};
|
|
3529
|
+
var getActiveTextStyleByStyleVar = (styleVar, activeColor) => {
|
|
3530
|
+
switch (styleVar) {
|
|
3531
|
+
case "NORMAL": {
|
|
3532
|
+
return css`
|
|
3533
|
+
color: ${activeColor ? colorTokens[activeColor] : colorTokens.neutral700};
|
|
3534
|
+
`;
|
|
3535
|
+
}
|
|
3536
|
+
case "INFO": {
|
|
3537
|
+
return css`
|
|
3538
|
+
color: ${colorTokens.neutral700};
|
|
3539
|
+
`;
|
|
3540
|
+
}
|
|
3541
|
+
default: {
|
|
3542
|
+
return css`
|
|
3543
|
+
color: ${colorTokens.primary300};
|
|
3544
|
+
`;
|
|
3545
|
+
}
|
|
3546
|
+
}
|
|
3547
|
+
};
|
|
3548
|
+
var StyledTabText = styled6(Text_default)`
|
|
3549
|
+
cursor: pointer;
|
|
3550
|
+
|
|
3551
|
+
${({ styleVar }) => styleVar && getTextStyleByStyleVar(styleVar)};
|
|
3552
|
+
|
|
3553
|
+
/* hover style */
|
|
3554
|
+
${({ isHover, styleVar, isActive }) => !isActive && isHover && styleVar && getHoverTextStyleByStyleVar(styleVar)}
|
|
3555
|
+
|
|
3556
|
+
/* active style */
|
|
3557
|
+
${({ isActive, styleVar, activeColor }) => isActive && styleVar && getActiveTextStyleByStyleVar(styleVar, activeColor)}
|
|
3558
|
+
`;
|
|
3559
|
+
var StyledIndicator = styled6(motion.div)`
|
|
3560
|
+
position: absolute;
|
|
3561
|
+
bottom: -2px;
|
|
3562
|
+
left: 0px;
|
|
3563
|
+
right: 0px;
|
|
3564
|
+
height: 2px;
|
|
3565
|
+
background-color: black;
|
|
3566
|
+
width: 100%;
|
|
3567
|
+
`;
|
|
3568
|
+
var Indicator = ({ layoutId }) => {
|
|
3569
|
+
return /* @__PURE__ */ jsx(StyledIndicator, { layoutId, transition: { duration: 0.2 } });
|
|
3570
|
+
};
|
|
3571
|
+
var Tab = (_a) => {
|
|
3572
|
+
var _b = _a, {
|
|
3573
|
+
value,
|
|
3574
|
+
label,
|
|
3575
|
+
leftSource,
|
|
3576
|
+
rightSource,
|
|
3577
|
+
as,
|
|
3578
|
+
styleVar = "NORMAL",
|
|
3579
|
+
sizeVar = "L",
|
|
3580
|
+
onClick,
|
|
3581
|
+
activeColor
|
|
3582
|
+
} = _b, args = __objRest(_b, [
|
|
3583
|
+
"value",
|
|
3584
|
+
"label",
|
|
3585
|
+
"leftSource",
|
|
3586
|
+
"rightSource",
|
|
3587
|
+
"as",
|
|
3588
|
+
"styleVar",
|
|
3589
|
+
"sizeVar",
|
|
3590
|
+
"onClick",
|
|
3591
|
+
"activeColor"
|
|
3592
|
+
]);
|
|
3593
|
+
const { activeTab, setActiveTab } = useTabs();
|
|
3594
|
+
const [isHover, setIsHover] = useState(false);
|
|
3595
|
+
const isActive = value === activeTab;
|
|
3596
|
+
const hoverHandler = useCallback(() => {
|
|
3597
|
+
setIsHover(true);
|
|
3598
|
+
}, []);
|
|
3599
|
+
const unhoverHandler = useCallback(() => {
|
|
3600
|
+
setIsHover(false);
|
|
3601
|
+
}, []);
|
|
3602
|
+
const clickHandler = (event) => {
|
|
3603
|
+
onClick == null ? void 0 : onClick(event);
|
|
3604
|
+
setActiveTab(value);
|
|
3605
|
+
};
|
|
3606
|
+
let typography = "title1_700";
|
|
3607
|
+
if (styleVar === "INFO") {
|
|
3608
|
+
typography = "body1_700";
|
|
3609
|
+
}
|
|
3610
|
+
if (styleVar === "NORMAL" && sizeVar === "M") {
|
|
3611
|
+
typography = "title2_700";
|
|
3612
|
+
}
|
|
3613
|
+
return /* @__PURE__ */ jsxs(
|
|
3614
|
+
StyledTab,
|
|
3615
|
+
__spreadProps(__spreadValues({
|
|
3616
|
+
isActive,
|
|
3617
|
+
as,
|
|
3618
|
+
onClick: clickHandler,
|
|
3619
|
+
onMouseOver: hoverHandler,
|
|
3620
|
+
onMouseLeave: unhoverHandler,
|
|
3621
|
+
onFocus: hoverHandler,
|
|
3622
|
+
onBlur: unhoverHandler,
|
|
3623
|
+
isHover,
|
|
3624
|
+
styleVar
|
|
3625
|
+
}, args), {
|
|
3626
|
+
children: [
|
|
3627
|
+
leftSource,
|
|
3628
|
+
/* @__PURE__ */ jsx(
|
|
3629
|
+
StyledTabText,
|
|
3630
|
+
{
|
|
3631
|
+
isHover,
|
|
3632
|
+
lineClamp: 2,
|
|
3633
|
+
typography: `${typography}`,
|
|
3634
|
+
isActive,
|
|
3635
|
+
activeColor,
|
|
3636
|
+
styleVar,
|
|
3637
|
+
children: label
|
|
3638
|
+
}
|
|
3639
|
+
),
|
|
3640
|
+
rightSource,
|
|
3641
|
+
styleVar === "INFO" && isActive && /* @__PURE__ */ jsx(Indicator, { layoutId: "underline" })
|
|
3642
|
+
]
|
|
3643
|
+
})
|
|
3644
|
+
);
|
|
3645
|
+
};
|
|
3646
|
+
var Tabs = ({ children, initialTab, onChange }) => {
|
|
3647
|
+
const [activeTab, setActiveTab] = useState(initialTab);
|
|
3648
|
+
useEffect(() => {
|
|
3649
|
+
if (!onChange || !activeTab) {
|
|
3650
|
+
return;
|
|
3651
|
+
}
|
|
3652
|
+
onChange(activeTab);
|
|
3653
|
+
}, [activeTab]);
|
|
3654
|
+
return /* @__PURE__ */ jsx(
|
|
3655
|
+
TabsContext.Provider,
|
|
3656
|
+
{
|
|
3657
|
+
value: {
|
|
3658
|
+
activeTab,
|
|
3659
|
+
setActiveTab
|
|
3660
|
+
},
|
|
3661
|
+
children: /* @__PURE__ */ jsx(LayoutGroup, { children: /* @__PURE__ */ jsx(AnimatePresence, { children }) })
|
|
3662
|
+
}
|
|
3663
|
+
);
|
|
3664
|
+
};
|
|
3665
|
+
Tabs.Tab = Tab;
|
|
3666
|
+
var Tabs_default = Tabs;
|
|
3667
|
+
|
|
3668
|
+
// src/components/Tabs/Tabs.types.ts
|
|
3669
|
+
var TabStyleVariants = {
|
|
3670
|
+
NORMAL: "NORMAL",
|
|
3671
|
+
INFO: "INFO"
|
|
3672
|
+
};
|
|
3673
|
+
var TabSizeVariants = {
|
|
3674
|
+
M: "M",
|
|
3675
|
+
L: "L"
|
|
3676
|
+
};
|
|
3414
3677
|
var PaginationWrapper = styled6.div`
|
|
3415
3678
|
display: flex;
|
|
3416
3679
|
align-items: center;
|
|
@@ -3581,6 +3844,6 @@ classnames/index.js:
|
|
|
3581
3844
|
*)
|
|
3582
3845
|
*/
|
|
3583
3846
|
|
|
3584
|
-
export { Avatar_default as Avatar, AvatarSizeVariants, Button_default as Button, ButtonSizeVariants, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, 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, ModalContext, ModalHandlerContext, ModalPortal_default as ModalProvider, ModalSize, MotionStack, MotionStackContainer, Pagination_default as Pagination, Popper_default as Popper, PopperPortal, PopperTrigger, RADIO_SYMBOL_KEY, Radio_default as Radio, ScrollArea_default as ScrollArea, SelectInputButton_default as SelectInputButton, ShoplflowProvider_default as ShoplflowProvider, Stack_default as Stack, StackContainer_default as StackContainer, StyledIcon, StyledStack, StyledStackContainer, Switch_default as Switch, Tag_default as Tag, TagSizeVariants, TagStyleVariants, Text_default as Text, Text2Rows, TextArea_default as TextArea, Tooltip_default as Tooltip, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue };
|
|
3847
|
+
export { Avatar_default as Avatar, AvatarSizeVariants, Button_default as Button, ButtonSizeVariants, ButtonStyleVariants, CHECKBOX_SYMBOL_KEY, 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, 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, ModalContext, ModalHandlerContext, ModalPortal_default as ModalProvider, ModalSize, MotionStack, MotionStackContainer, Pagination_default as Pagination, Popper_default as Popper, PopperPortal, PopperTrigger, RADIO_SYMBOL_KEY, Radio_default as Radio, ScrollArea_default as ScrollArea, SelectInputButton_default as SelectInputButton, ShoplflowProvider_default as ShoplflowProvider, Stack_default as Stack, StackContainer_default as StackContainer, StyledIcon, StyledStack, StyledStackContainer, Switch_default as Switch, TabSizeVariants, TabStyleVariants, Tabs_default as Tabs, TabsContext, Tag_default as Tag, TagSizeVariants, TagStyleVariants, Text_default as Text, Text2Rows, TextArea_default as TextArea, Tooltip_default as Tooltip, Tree_default as Tree, borderRadiusTokens, boxShadowTokens, colorTokens, fontWeightTokens, getDomain, spacingTokens, typographyTokens, useDomain, useHandleModal, useModalValue, useTabs };
|
|
3585
3848
|
//# sourceMappingURL=out.js.map
|
|
3586
3849
|
//# sourceMappingURL=index.js.map
|