myshell-react-lib 0.1.23 → 0.1.25
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 +42 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +42 -12
- package/dist/index.js.map +1 -1
- package/dist/styles/components-light.scss +4 -4
- package/dist/styles/new-tokens.scss +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -131,7 +131,7 @@ interface BadgeProps extends VariantProps<typeof badgeVariants> {
|
|
|
131
131
|
declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
132
132
|
|
|
133
133
|
declare const buttonVariants: (props?: ({
|
|
134
|
-
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "
|
|
134
|
+
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "solid" | "plain" | null | undefined;
|
|
135
135
|
color?: "default" | "brand" | "error" | null | undefined;
|
|
136
136
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
137
137
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -167,6 +167,7 @@ interface ButtonComponentProps<V extends VariantType$1 = VariantType$1> extends
|
|
|
167
167
|
isBlock?: boolean;
|
|
168
168
|
asset?: 'energy' | 'coin';
|
|
169
169
|
assetNumber?: number;
|
|
170
|
+
roundedFull?: boolean;
|
|
170
171
|
}
|
|
171
172
|
declare const Button: (<V extends VariantType$1>(props: ButtonComponentProps<V> & {
|
|
172
173
|
ref?: React$1.ForwardedRef<HTMLButtonElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ interface BadgeProps extends VariantProps<typeof badgeVariants> {
|
|
|
131
131
|
declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
132
132
|
|
|
133
133
|
declare const buttonVariants: (props?: ({
|
|
134
|
-
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "
|
|
134
|
+
variant?: "link" | "opacity" | "static" | "primary" | "secondary" | "tertiary" | "solid" | "plain" | null | undefined;
|
|
135
135
|
color?: "default" | "brand" | "error" | null | undefined;
|
|
136
136
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
137
137
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
@@ -167,6 +167,7 @@ interface ButtonComponentProps<V extends VariantType$1 = VariantType$1> extends
|
|
|
167
167
|
isBlock?: boolean;
|
|
168
168
|
asset?: 'energy' | 'coin';
|
|
169
169
|
assetNumber?: number;
|
|
170
|
+
roundedFull?: boolean;
|
|
170
171
|
}
|
|
171
172
|
declare const Button: (<V extends VariantType$1>(props: ButtonComponentProps<V> & {
|
|
172
173
|
ref?: React$1.ForwardedRef<HTMLButtonElement>;
|
package/dist/index.js
CHANGED
|
@@ -4733,7 +4733,7 @@ var VARIANT_BASE = {
|
|
|
4733
4733
|
primary: "",
|
|
4734
4734
|
secondary: "border shadow-none",
|
|
4735
4735
|
tertiary: "",
|
|
4736
|
-
static: "text-cc-Button-Static-fg-default border-cc-Button-Static-border-default bg-cc-Button-Static-bg-default hover:bg-cc-Button-Static-bg-hover active:bg-cc-Button-Static-bg-active disabled:bg-cc-Button-Static-bg-disabled disabled:text-cc-Button-Static-fg-alt",
|
|
4736
|
+
static: "border text-cc-Button-Static-fg-default border-cc-Button-Static-border-default bg-cc-Button-Static-bg-default hover:bg-cc-Button-Static-bg-hover active:bg-cc-Button-Static-bg-active disabled:bg-cc-Button-Static-bg-disabled disabled:text-cc-Button-Static-fg-alt",
|
|
4737
4737
|
link: "",
|
|
4738
4738
|
plain: "",
|
|
4739
4739
|
opacity: "backdrop-blur-2xl text-Colors-Text-Static-White bg-Colors-Beta-White-30 border border-Colors-Beta-White-12 shadow-none hover:bg-Colors-Beta-White-40 focus:shadow-cc-Focus-Rings-Brand-default active:bg-Colors-Beta-White-50 disabled:bg-Colors-Beta-White-60 disabled:text-Colors-Beta-White-80",
|
|
@@ -4819,6 +4819,36 @@ var buttonVariants = cva4(BASE_BUTTON, {
|
|
|
4819
4819
|
size: "sm",
|
|
4820
4820
|
className: SIZE_CLASSES.sm.withPadding
|
|
4821
4821
|
},
|
|
4822
|
+
{
|
|
4823
|
+
variant: "opacity",
|
|
4824
|
+
size: "lg",
|
|
4825
|
+
className: SIZE_CLASSES.lg.withPadding
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
variant: "opacity",
|
|
4829
|
+
size: "md",
|
|
4830
|
+
className: SIZE_CLASSES.md.withPadding
|
|
4831
|
+
},
|
|
4832
|
+
{
|
|
4833
|
+
variant: "opacity",
|
|
4834
|
+
size: "sm",
|
|
4835
|
+
className: SIZE_CLASSES.sm.withPadding
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
variant: "solid",
|
|
4839
|
+
size: "lg",
|
|
4840
|
+
className: SIZE_CLASSES.lg.withPadding
|
|
4841
|
+
},
|
|
4842
|
+
{
|
|
4843
|
+
variant: "solid",
|
|
4844
|
+
size: "md",
|
|
4845
|
+
className: SIZE_CLASSES.md.withPadding
|
|
4846
|
+
},
|
|
4847
|
+
{
|
|
4848
|
+
variant: "solid",
|
|
4849
|
+
size: "sm",
|
|
4850
|
+
className: SIZE_CLASSES.sm.withPadding
|
|
4851
|
+
},
|
|
4822
4852
|
// 颜色主题变体
|
|
4823
4853
|
{
|
|
4824
4854
|
variant: "primary",
|
|
@@ -4959,7 +4989,7 @@ var iconVariants2 = cva4("relative shrink-0 text-inherit inline-flex items-cente
|
|
|
4959
4989
|
import { Fragment, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4960
4990
|
function createButtonWithVariant(props, ref) {
|
|
4961
4991
|
var _props_className = props.className, className = _props_className === void 0 ? "" : _props_className, iconClassName = props.iconClassName, _props_variant = props.variant, variant = _props_variant === void 0 ? "primary" : _props_variant, // 设置默认值为primary
|
|
4962
|
-
userProvidedColor = props.color, icon = props.icon, _props_iconDirection = props.iconDirection, iconDirection = _props_iconDirection === void 0 ? "left" : _props_iconDirection, _props_size = props.size, size = _props_size === void 0 ? "lg" : _props_size, _props_asChild = props.asChild, asChild = _props_asChild === void 0 ? false : _props_asChild, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_noStyle = props.noStyle, noStyle = _props_noStyle === void 0 ? false : _props_noStyle, _props_iconOutBox = props.iconOutBox, iconOutBox = _props_iconOutBox === void 0 ? false : _props_iconOutBox, _props_isBlock = props.isBlock, isBlock = _props_isBlock === void 0 ? false : _props_isBlock, disabled = props.disabled, children = props.children, autoFocus = props.autoFocus, asset = props.asset, _props_assetNumber = props.assetNumber, assetNumber = _props_assetNumber === void 0 ? 0 : _props_assetNumber, passProps = _object_without_properties(props, [
|
|
4992
|
+
userProvidedColor = props.color, icon = props.icon, _props_iconDirection = props.iconDirection, iconDirection = _props_iconDirection === void 0 ? "left" : _props_iconDirection, _props_size = props.size, size = _props_size === void 0 ? "lg" : _props_size, _props_asChild = props.asChild, asChild = _props_asChild === void 0 ? false : _props_asChild, _props_loading = props.loading, loading = _props_loading === void 0 ? false : _props_loading, _props_noStyle = props.noStyle, noStyle = _props_noStyle === void 0 ? false : _props_noStyle, _props_iconOutBox = props.iconOutBox, iconOutBox = _props_iconOutBox === void 0 ? false : _props_iconOutBox, _props_isBlock = props.isBlock, isBlock = _props_isBlock === void 0 ? false : _props_isBlock, disabled = props.disabled, children = props.children, autoFocus = props.autoFocus, asset = props.asset, _props_assetNumber = props.assetNumber, assetNumber = _props_assetNumber === void 0 ? 0 : _props_assetNumber, _props_roundedFull = props.roundedFull, roundedFull = _props_roundedFull === void 0 ? false : _props_roundedFull, passProps = _object_without_properties(props, [
|
|
4963
4993
|
"className",
|
|
4964
4994
|
"iconClassName",
|
|
4965
4995
|
"variant",
|
|
@@ -4976,7 +5006,8 @@ function createButtonWithVariant(props, ref) {
|
|
|
4976
5006
|
"children",
|
|
4977
5007
|
"autoFocus",
|
|
4978
5008
|
"asset",
|
|
4979
|
-
"assetNumber"
|
|
5009
|
+
"assetNumber",
|
|
5010
|
+
"roundedFull"
|
|
4980
5011
|
]);
|
|
4981
5012
|
var color = userProvidedColor || "default";
|
|
4982
5013
|
var Comp = asChild ? Slot : "button";
|
|
@@ -4985,9 +5016,8 @@ function createButtonWithVariant(props, ref) {
|
|
|
4985
5016
|
className: noStyle ? className : cn(buttonVariants({
|
|
4986
5017
|
variant: variant,
|
|
4987
5018
|
color: color,
|
|
4988
|
-
size: size
|
|
4989
|
-
|
|
4990
|
-
}), disable && "!pointer-events-auto cursor-not-allowed", isBlock && "w-full"),
|
|
5019
|
+
size: size
|
|
5020
|
+
}), className, disable && "!pointer-events-auto cursor-not-allowed", isBlock && "w-full", roundedFull && variant !== "plain" && variant !== "link" && "rounded-full"),
|
|
4991
5021
|
ref: ref,
|
|
4992
5022
|
disabled: disable,
|
|
4993
5023
|
autoFocus: autoFocus
|
|
@@ -6180,13 +6210,13 @@ var CheckIcon = function(param) {
|
|
|
6180
6210
|
})
|
|
6181
6211
|
});
|
|
6182
6212
|
};
|
|
6183
|
-
var checkboxVariants = cva8("peer w-5 h-5 shrink-0 border-[1.5px]
|
|
6213
|
+
var checkboxVariants = cva8("peer w-5 h-5 shrink-0 border-[1.5px] overflow-hidden flex items-center justify-center text-current focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cc-Focus-Rings-Brand-default", {
|
|
6184
6214
|
variants: {
|
|
6185
6215
|
variant: {
|
|
6186
|
-
checkbox: "rounded-xxs",
|
|
6187
|
-
circle: "rounded-full",
|
|
6188
|
-
radio: "rounded-full disabled:data-[state=checked]:border-
|
|
6189
|
-
static: "rounded-full
|
|
6216
|
+
checkbox: "rounded-xxs border-cc-Check-Box-border-default hover:border-cc-Check-Box-border-hover data-[state=checked]:border-cc-Check-Box-bg-default hover:disabled:border-cc-Check-Box-border-disabled disabled:data-[state=checked]:border-cc-Check-Box-border-default focus-visible:border-cc-Check-Box-border-default focus-visible:ring-offset-1 disabled:bg-cc-Check-Box-bg-disabled disabled:cursor-not-allowed data-[state=checked]:bg-cc-Check-Box-bg-default data-[state=checked]:text-cc-Check-Box-fg-default hover:data-[state=checked]:bg-cc-Check-Box-bg-hovered disabled:data-[state=checked]:text-cc-Check-Box-fg-alt disabled:data-[state=checked]:bg-cc-Check-Box-bg-disabled",
|
|
6217
|
+
circle: "rounded-full border-cc-Check-Box-border-default hover:border-cc-Check-Box-border-hover hover:disabled:border-cc-Check-Box-border-disabled data-[state=checked]:border-cc-Check-Box-bg-default hover:disabled:border-cc-Check-Box-border-disabled disabled:data-[state=checked]:border-cc-Check-Box-border-default focus-visible:border-cc-Check-Box-border-default focus-visible:ring-offset-1 disabled:bg-cc-Check-Box-bg-disabled disabled:cursor-not-allowed data-[state=checked]:bg-cc-Check-Box-bg-default data-[state=checked]:text-cc-Check-Box-fg-default hover:data-[state=checked]:bg-cc-Check-Box-bg-hovered disabled:data-[state=checked]:text-cc-Check-Box-fg-alt disabled:data-[state=checked]:bg-cc-Check-Box-bg-disabled",
|
|
6218
|
+
radio: "rounded-full border-cc-Check-Box-border-default hover:border-cc-Check-Box-border-hover hover:disabled:border-cc-Check-Box-border-disabled disabled:bg-cc-Check-Box-bg-disabled disabled:data-[state=checked]:border-cc-Check-Box-border-disabled hover:data-[state=checked]:bg-cc-Check-Box-border-hovered data-[state=checked]:bg-cc-Check-Box-bg-default disabled:data-[state=checked]:bg-cc-Check-Box-border-disabled",
|
|
6219
|
+
static: "rounded-full border-Colors-Beta-White-100 bg-Colors-Beta-Black-12 data-[state=checked]:bg-Colors-Beta-Black-100 border-Colors-Beta-White-100 hover:bg-Colors-Beta-Black-20 data-[state=checked]:border-none disabled:border-Colors-Beta-White-80 disabled:data-[state=checked]:text-cc-Colors-Beta-White-80 disabled:data-[state=checked]:backdrop-blur-2xl"
|
|
6190
6220
|
}
|
|
6191
6221
|
},
|
|
6192
6222
|
defaultVariants: {
|
|
@@ -6214,7 +6244,7 @@ var Checkbox = React13.forwardRef(function(_param, ref) {
|
|
|
6214
6244
|
}))
|
|
6215
6245
|
}, props), {
|
|
6216
6246
|
children: /* @__PURE__ */ jsx20(CheckboxPrimitive.Indicator, {
|
|
6217
|
-
className: cn(variant === "radio" && "[&>div]:data-[disabled]:bg-cc-Check-Box-bg-disabled"),
|
|
6247
|
+
className: cn(variant === "radio" && "[&>div]:data-[disabled]:bg-cc-Check-Box-bg-disabled [&>div]:data-[state=checked]:bg-cc-Check-Box-bg-disabled", variant === "static" && "[&>div]:data-[disabled]:bg-cc-Check-Box-bg-disabled text-Colors-Beta-White-100 !border-none"),
|
|
6218
6248
|
children: variant === "radio" ? /* @__PURE__ */ jsx20("div", {
|
|
6219
6249
|
className: cn("w-2 h-2 rounded-full")
|
|
6220
6250
|
}) : /* @__PURE__ */ jsx20(CheckIcon, {
|