@lobehub/ui 2.0.5 → 2.0.7
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/es/Button/Button.js +2 -12
- package/es/Button/style.d.ts +0 -2
- package/es/Button/style.js +3 -5
- package/es/Drawer/Drawer.js +0 -2
- package/es/styles/theme/antdTheme.js +1 -4
- package/package.json +1 -1
package/es/Button/Button.js
CHANGED
|
@@ -34,7 +34,7 @@ var Button = /*#__PURE__*/memo(function (_ref) {
|
|
|
34
34
|
styles = _useStyles.styles,
|
|
35
35
|
cx = _useStyles.cx,
|
|
36
36
|
theme = _useStyles.theme;
|
|
37
|
-
var defaultVariant = type
|
|
37
|
+
var defaultVariant = type ? undefined : variant || (theme.isDarkMode ? 'filled' : 'outlined');
|
|
38
38
|
var variants = useMemo(function () {
|
|
39
39
|
return cva(styles.root, {
|
|
40
40
|
defaultVariants: {
|
|
@@ -43,15 +43,6 @@ var Button = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
43
|
},
|
|
44
44
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
45
45
|
variants: {
|
|
46
|
-
variant: {
|
|
47
|
-
filled: styles.filled,
|
|
48
|
-
outlined: styles.outlined,
|
|
49
|
-
dashed: null,
|
|
50
|
-
text: null,
|
|
51
|
-
link: null,
|
|
52
|
-
normal: null,
|
|
53
|
-
solid: null
|
|
54
|
-
},
|
|
55
46
|
glass: {
|
|
56
47
|
false: null,
|
|
57
48
|
true: styles.glass
|
|
@@ -67,8 +58,7 @@ var Button = /*#__PURE__*/memo(function (_ref) {
|
|
|
67
58
|
return /*#__PURE__*/_jsx(AntdButton, _objectSpread(_objectSpread({
|
|
68
59
|
className: cx(variants({
|
|
69
60
|
glass: glass,
|
|
70
|
-
shadow: shadow
|
|
71
|
-
variant: defaultVariant
|
|
61
|
+
shadow: shadow
|
|
72
62
|
}), className),
|
|
73
63
|
color: color || (defaultVariant === 'filled' ? 'default' : undefined),
|
|
74
64
|
danger: danger,
|
package/es/Button/style.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
2
|
-
filled: import("antd-style").SerializedStyles;
|
|
3
2
|
glass: string;
|
|
4
|
-
outlined: import("antd-style").SerializedStyles;
|
|
5
3
|
root: import("antd-style").SerializedStyles;
|
|
6
4
|
shadow: import("antd-style").SerializedStyles;
|
|
7
5
|
}>;
|
package/es/Button/style.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _templateObject, _templateObject2
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref) {
|
|
@@ -7,10 +7,8 @@ export var useStyles = createStyles(function (_ref) {
|
|
|
7
7
|
stylish = _ref.stylish,
|
|
8
8
|
prefixCls = _ref.prefixCls;
|
|
9
9
|
return {
|
|
10
|
-
filled: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", "-btn.", "-btn-variant-filled {\n ", ";\n }\n "])), prefixCls, prefixCls, stylish.variantFilled),
|
|
11
10
|
glass: stylish.blur,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
shadow: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n box-shadow: ", " !important;\n "])), token.boxShadowTertiary)
|
|
11
|
+
root: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", "-btn {\n > .", "-btn-icon {\n display: flex;\n }\n }\n "])), prefixCls, prefixCls),
|
|
12
|
+
shadow: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-shadow: ", " !important;\n "])), token.boxShadowTertiary)
|
|
15
13
|
};
|
|
16
14
|
});
|
package/es/Drawer/Drawer.js
CHANGED
|
@@ -96,7 +96,6 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
|
|
|
96
96
|
style: _objectSpread({
|
|
97
97
|
background: theme.colorBgLayout,
|
|
98
98
|
borderRight: "1px solid ".concat(theme.colorBorderSecondary),
|
|
99
|
-
height: '100%',
|
|
100
99
|
overflowX: 'hidden',
|
|
101
100
|
overflowY: 'auto'
|
|
102
101
|
}, styles === null || styles === void 0 ? void 0 : styles.sidebar),
|
|
@@ -109,7 +108,6 @@ var Drawer = /*#__PURE__*/memo(function (_ref) {
|
|
|
109
108
|
paddingInline: 16,
|
|
110
109
|
style: _objectSpread({
|
|
111
110
|
background: theme.colorBgContainer,
|
|
112
|
-
height: '100%',
|
|
113
111
|
overflowX: 'hidden',
|
|
114
112
|
overflowY: 'auto'
|
|
115
113
|
}, styles === null || styles === void 0 ? void 0 : styles.sidebarContent),
|
|
@@ -22,10 +22,7 @@ export var createLobeAntdTheme = function createLobeAntdTheme(_ref) {
|
|
|
22
22
|
algorithm: isDark ? darkAlgorithm : lightAlgorithm,
|
|
23
23
|
components: {
|
|
24
24
|
Button: {
|
|
25
|
-
contentFontSizeSM: 12
|
|
26
|
-
defaultActiveBorderColor: baseToken.colorBorder,
|
|
27
|
-
defaultActiveColor: baseToken.colorText,
|
|
28
|
-
groupBorderColor: baseToken.colorBorder
|
|
25
|
+
contentFontSizeSM: 12
|
|
29
26
|
},
|
|
30
27
|
DatePicker: {
|
|
31
28
|
activeBorderColor: baseToken.colorBorder,
|