myshell-react-lib 0.2.45 → 0.3.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 +114 -87
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +115 -88
- package/dist/index.js.map +1 -1
- package/dist/styles/components-dark-v2.scss +220 -0
- package/dist/styles/components-light-v2.scss +220 -0
- package/dist/styles/design2-dark-v2.scss +443 -0
- package/dist/styles/design2-light-v2.scss +443 -0
- package/dist/styles/global.scss +5 -5
- package/dist/styles/new-tokens-v2.scss +518 -0
- package/package.json +2 -2
- package/dist/styles/components-dark.scss +0 -210
- package/dist/styles/components-light.scss +0 -208
- package/dist/styles/design2-dark.scss +0 -332
- package/dist/styles/design2-light.scss +0 -366
- package/dist/styles/new-tokens.scss +0 -264
package/dist/index.d.cts
CHANGED
|
@@ -709,7 +709,7 @@ declare const modalVariants: (props?: ({
|
|
|
709
709
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
710
710
|
zIndex?: 99 | 9 | 999 | 9999 | null | undefined;
|
|
711
711
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
712
|
-
type TModalState =
|
|
712
|
+
type TModalState = "basic" | "info" | "success" | "warning" | "error";
|
|
713
713
|
declare const Modal: React$1.FC<React$1.ComponentPropsWithoutRef<typeof ModalRoot> & {
|
|
714
714
|
/**
|
|
715
715
|
* 模态框标题文本
|
|
@@ -767,6 +767,10 @@ declare const Modal: React$1.FC<React$1.ComponentPropsWithoutRef<typeof ModalRoo
|
|
|
767
767
|
* 模态框的状态(信息、成功、警告、错误)
|
|
768
768
|
*/
|
|
769
769
|
state?: TModalState;
|
|
770
|
+
/**
|
|
771
|
+
* 自定义图标节点,传入后将替代 state 对应的默认图标
|
|
772
|
+
*/
|
|
773
|
+
icon?: React$1.ReactNode;
|
|
770
774
|
/**
|
|
771
775
|
* isNotification 的情况下可能会需要
|
|
772
776
|
*/
|
|
@@ -971,7 +975,7 @@ type SearchBarProps = {
|
|
|
971
975
|
*
|
|
972
976
|
* @default xs
|
|
973
977
|
*/
|
|
974
|
-
size?:
|
|
978
|
+
size?: "md" | "sm" | "xs";
|
|
975
979
|
/**
|
|
976
980
|
* 是否圆角
|
|
977
981
|
*/
|
|
@@ -984,7 +988,7 @@ type SearchBarProps = {
|
|
|
984
988
|
* 默认搜索时是否触发回调
|
|
985
989
|
*/
|
|
986
990
|
defaultSearchByChange?: boolean;
|
|
987
|
-
} & Omit<SearchInputProps,
|
|
991
|
+
} & Omit<SearchInputProps, "size">;
|
|
988
992
|
declare function SearchBar({ className, inputClassName, placeholder, type, size, readOnly, searchValue, roundedFill, onSearchChange, onValueChange, defaultSearchByChange, ...props }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
989
993
|
declare namespace SearchBar {
|
|
990
994
|
var displayName: string;
|
|
@@ -1439,7 +1443,8 @@ declare const Heading: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<
|
|
|
1439
1443
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1440
1444
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1441
1445
|
declare const Display: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1442
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
1446
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
1447
|
+
weight?: "medium" | "semibold" | null | undefined;
|
|
1443
1448
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1444
1449
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1445
1450
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
@@ -1460,19 +1465,19 @@ declare const SubTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes
|
|
|
1460
1465
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1461
1466
|
declare const Text: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1462
1467
|
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1463
|
-
weight?: "
|
|
1468
|
+
weight?: "medium" | "semibold" | "regular" | null | undefined;
|
|
1464
1469
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1465
1470
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1466
1471
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1467
1472
|
declare const Paragraph: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1468
1473
|
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1469
|
-
weight?: "
|
|
1474
|
+
weight?: "medium" | "semibold" | "regular" | null | undefined;
|
|
1470
1475
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1471
1476
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1472
1477
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1473
1478
|
declare const Description: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1474
1479
|
size?: "sm" | "lg" | null | undefined;
|
|
1475
|
-
weight?: "
|
|
1480
|
+
weight?: "medium" | "regular" | null | undefined;
|
|
1476
1481
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1477
1482
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1478
1483
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1545,7 +1550,7 @@ type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast$1>;
|
|
|
1545
1550
|
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
1546
1551
|
|
|
1547
1552
|
interface ToasterProps {
|
|
1548
|
-
position?:
|
|
1553
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-center" | "right-center";
|
|
1549
1554
|
}
|
|
1550
1555
|
declare function Toaster({ position }?: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
1551
1556
|
|
|
@@ -1554,6 +1559,7 @@ type ToasterToast = ToastProps & {
|
|
|
1554
1559
|
title?: React$1.ReactNode;
|
|
1555
1560
|
description?: React$1.ReactNode;
|
|
1556
1561
|
action?: ToastActionElement;
|
|
1562
|
+
icon?: React$1.ReactNode;
|
|
1557
1563
|
};
|
|
1558
1564
|
declare const actionTypes: {
|
|
1559
1565
|
readonly ADD_TOAST: "ADD_TOAST";
|
package/dist/index.d.ts
CHANGED
|
@@ -709,7 +709,7 @@ declare const modalVariants: (props?: ({
|
|
|
709
709
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
710
710
|
zIndex?: 99 | 9 | 999 | 9999 | null | undefined;
|
|
711
711
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
712
|
-
type TModalState =
|
|
712
|
+
type TModalState = "basic" | "info" | "success" | "warning" | "error";
|
|
713
713
|
declare const Modal: React$1.FC<React$1.ComponentPropsWithoutRef<typeof ModalRoot> & {
|
|
714
714
|
/**
|
|
715
715
|
* 模态框标题文本
|
|
@@ -767,6 +767,10 @@ declare const Modal: React$1.FC<React$1.ComponentPropsWithoutRef<typeof ModalRoo
|
|
|
767
767
|
* 模态框的状态(信息、成功、警告、错误)
|
|
768
768
|
*/
|
|
769
769
|
state?: TModalState;
|
|
770
|
+
/**
|
|
771
|
+
* 自定义图标节点,传入后将替代 state 对应的默认图标
|
|
772
|
+
*/
|
|
773
|
+
icon?: React$1.ReactNode;
|
|
770
774
|
/**
|
|
771
775
|
* isNotification 的情况下可能会需要
|
|
772
776
|
*/
|
|
@@ -971,7 +975,7 @@ type SearchBarProps = {
|
|
|
971
975
|
*
|
|
972
976
|
* @default xs
|
|
973
977
|
*/
|
|
974
|
-
size?:
|
|
978
|
+
size?: "md" | "sm" | "xs";
|
|
975
979
|
/**
|
|
976
980
|
* 是否圆角
|
|
977
981
|
*/
|
|
@@ -984,7 +988,7 @@ type SearchBarProps = {
|
|
|
984
988
|
* 默认搜索时是否触发回调
|
|
985
989
|
*/
|
|
986
990
|
defaultSearchByChange?: boolean;
|
|
987
|
-
} & Omit<SearchInputProps,
|
|
991
|
+
} & Omit<SearchInputProps, "size">;
|
|
988
992
|
declare function SearchBar({ className, inputClassName, placeholder, type, size, readOnly, searchValue, roundedFill, onSearchChange, onValueChange, defaultSearchByChange, ...props }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
989
993
|
declare namespace SearchBar {
|
|
990
994
|
var displayName: string;
|
|
@@ -1439,7 +1443,8 @@ declare const Heading: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<
|
|
|
1439
1443
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1440
1444
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1441
1445
|
declare const Display: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1442
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
|
|
1446
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
|
|
1447
|
+
weight?: "medium" | "semibold" | null | undefined;
|
|
1443
1448
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1444
1449
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1445
1450
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
@@ -1460,19 +1465,19 @@ declare const SubTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes
|
|
|
1460
1465
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1461
1466
|
declare const Text: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1462
1467
|
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1463
|
-
weight?: "
|
|
1468
|
+
weight?: "medium" | "semibold" | "regular" | null | undefined;
|
|
1464
1469
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1465
1470
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1466
1471
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1467
1472
|
declare const Paragraph: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1468
1473
|
size?: "xs" | "sm" | "lg" | null | undefined;
|
|
1469
|
-
weight?: "
|
|
1474
|
+
weight?: "medium" | "semibold" | "regular" | null | undefined;
|
|
1470
1475
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1471
1476
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1472
1477
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLElement & HTMLParagraphElement>>;
|
|
1473
1478
|
declare const Description: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
1474
1479
|
size?: "sm" | "lg" | null | undefined;
|
|
1475
|
-
weight?: "
|
|
1480
|
+
weight?: "medium" | "regular" | null | undefined;
|
|
1476
1481
|
color?: "default" | "subtle" | "subtler" | "subtlest" | "disabled" | "inverse" | "critical" | "brand" | "critical-bolder" | "warning" | "warning-bolder" | "success" | "success-bolder" | "static" | "static-black" | null | undefined;
|
|
1477
1482
|
lineClamp?: 1 | 2 | 3 | 4 | 5 | 6 | null | undefined;
|
|
1478
1483
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string> & BlockProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1545,7 +1550,7 @@ type ToastProps = React$1.ComponentPropsWithoutRef<typeof Toast$1>;
|
|
|
1545
1550
|
type ToastActionElement = React$1.ReactElement<typeof ToastAction>;
|
|
1546
1551
|
|
|
1547
1552
|
interface ToasterProps {
|
|
1548
|
-
position?:
|
|
1553
|
+
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | "left-center" | "right-center";
|
|
1549
1554
|
}
|
|
1550
1555
|
declare function Toaster({ position }?: ToasterProps): react_jsx_runtime.JSX.Element;
|
|
1551
1556
|
|
|
@@ -1554,6 +1559,7 @@ type ToasterToast = ToastProps & {
|
|
|
1554
1559
|
title?: React$1.ReactNode;
|
|
1555
1560
|
description?: React$1.ReactNode;
|
|
1556
1561
|
action?: ToastActionElement;
|
|
1562
|
+
icon?: React$1.ReactNode;
|
|
1557
1563
|
};
|
|
1558
1564
|
declare const actionTypes: {
|
|
1559
1565
|
readonly ADD_TOAST: "ADD_TOAST";
|