@yqg/slimfit 0.0.4 → 1.0.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/lib/esm/breadcrumb/breadcrumb.js +7 -2
- package/lib/esm/hooks/index.d.ts +1 -1
- package/lib/esm/hooks/index.js +1 -1
- package/lib/esm/menu/hooks/use-inline-items.js +1 -0
- package/lib/esm/menu/hooks/use-inline.js +1 -0
- package/lib/esm/popconfirm/style.less +6 -4
- package/lib/esm/style/index.css +2 -3
- package/lib/esm/switch/switch.js +4 -2
- package/lib/esm/themes/components/tooltip.js +4 -7
- package/lib/esm/tooltip/style.less +9 -1
- package/package.json +1 -1
|
@@ -17,7 +17,11 @@ var Breadcrumb = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
17
17
|
_ref$maxItems = _ref.maxItems,
|
|
18
18
|
maxItems = _ref$maxItems === void 0 ? 4 : _ref$maxItems,
|
|
19
19
|
_ref$separator = _ref.separator,
|
|
20
|
-
separator = _ref$separator === void 0 ? /*#__PURE__*/_jsx(IconChevronRight, {
|
|
20
|
+
separator = _ref$separator === void 0 ? /*#__PURE__*/_jsx(IconChevronRight, {
|
|
21
|
+
style: {
|
|
22
|
+
fontSize: '12px'
|
|
23
|
+
}
|
|
24
|
+
}) : _ref$separator,
|
|
21
25
|
className = _ref.className,
|
|
22
26
|
style = _ref.style,
|
|
23
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -91,7 +95,8 @@ var Breadcrumb = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
91
95
|
}, [processedItems]);
|
|
92
96
|
return /*#__PURE__*/_jsx(AntdBreadcrumb, _objectSpread({
|
|
93
97
|
className: classNames('slimfit-breadcrumb', className),
|
|
94
|
-
items: antdItems
|
|
98
|
+
items: antdItems,
|
|
99
|
+
separator: separator
|
|
95
100
|
}, props));
|
|
96
101
|
});
|
|
97
102
|
Breadcrumb.displayName = 'Breadcrumb';
|
package/lib/esm/hooks/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export type { CopyResult } from './useCopyToClipboard';
|
|
|
3
3
|
export { useLocale } from './useLocale';
|
|
4
4
|
export { default as withCustomClassName } from './withCustomClassName';
|
|
5
5
|
export { customClearIcon, processAllowClear, withCustomClearIcon, } from './withCustomClearIcon';
|
|
6
|
-
export { withCustomSelect } from './withCustomSelect';
|
|
7
6
|
export { default as withCustomerLoading } from './withCustomerLoading';
|
|
8
7
|
export type { CustomerLoadingOptions, LoadingPosition, WithCustomerLoadingProps, } from './withCustomerLoading';
|
|
8
|
+
export { withCustomSelect } from './withCustomSelect';
|
|
9
9
|
export { default as withDisabledClass } from './withDisabledClass';
|
|
10
10
|
export type { DisabledClassOptions } from './withDisabledClass';
|
package/lib/esm/hooks/index.js
CHANGED
|
@@ -2,6 +2,6 @@ export { useCopyToClipboard } from "./useCopyToClipboard";
|
|
|
2
2
|
export { useLocale } from "./useLocale";
|
|
3
3
|
export { default as withCustomClassName } from "./withCustomClassName";
|
|
4
4
|
export { customClearIcon, processAllowClear, withCustomClearIcon } from "./withCustomClearIcon";
|
|
5
|
-
export { withCustomSelect } from "./withCustomSelect";
|
|
6
5
|
export { default as withCustomerLoading } from "./withCustomerLoading";
|
|
6
|
+
export { withCustomSelect } from "./withCustomSelect";
|
|
7
7
|
export { default as withDisabledClass } from "./withDisabledClass";
|
|
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
var _excluded = ["label", "children", "extra", "icon", "title"];
|
|
6
|
+
/* @refresh reset */
|
|
6
7
|
import { Dropdown } from 'antd';
|
|
7
8
|
import classnames from 'classnames';
|
|
8
9
|
import React, { useMemo, useState } from 'react';
|
|
@@ -12,11 +12,13 @@
|
|
|
12
12
|
margin-top: 8px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
// title 样式 - 无论是否有 description,title 都在 .ant-popconfirm-title 中
|
|
16
|
+
// 但需要确保样式优先级足够高,避免被 Ant Design 默认样式覆盖
|
|
15
17
|
.ant-popconfirm-title {
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
margin-top: 8px;
|
|
18
|
-
margin-bottom: 4px;
|
|
19
|
-
font-weight: 600;
|
|
18
|
+
font-size: 14px !important;
|
|
19
|
+
margin-top: 8px !important;
|
|
20
|
+
margin-bottom: 4px !important;
|
|
21
|
+
font-weight: 600 !important;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.ant-popover-inner-content {
|
package/lib/esm/style/index.css
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/* 导入自动生成的主题变量 */
|
|
2
2
|
@import './theme-vars.css';
|
|
3
|
+
/* 导入禁用样式 */
|
|
4
|
+
@import './disabled.less';
|
|
3
5
|
|
|
4
6
|
/* 默认变量(当自动生成失败时的备用值) */
|
|
5
7
|
:root {
|
|
@@ -66,6 +68,3 @@ body {
|
|
|
66
68
|
:where([class*='ant-'], [class*='slimfit-']) * {
|
|
67
69
|
scrollbar-color: #1415351a transparent;
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
/* 导入禁用样式 */
|
|
71
|
-
@import './disabled.less';
|
package/lib/esm/switch/switch.js
CHANGED
|
@@ -38,7 +38,7 @@ var Switch = function Switch(_ref) {
|
|
|
38
38
|
spin: true,
|
|
39
39
|
style: {
|
|
40
40
|
fontSize: loadingIconSize,
|
|
41
|
-
color: 'var(--color-neutral-
|
|
41
|
+
color: 'var(--color-neutral-0)'
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -56,7 +56,9 @@ var Switch = function Switch(_ref) {
|
|
|
56
56
|
,
|
|
57
57
|
checkedChildren: finalCheckedChildren,
|
|
58
58
|
unCheckedChildren: finalUnCheckedChildren,
|
|
59
|
-
className: classNames('slimfit-switch',
|
|
59
|
+
className: classNames('slimfit-switch', {
|
|
60
|
+
'ant-switch-loading': loading // 添加 loading 类名以应用样式
|
|
61
|
+
}, className)
|
|
60
62
|
}));
|
|
61
63
|
};
|
|
62
64
|
export default Switch;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { colors } from "../../constant/colors";
|
|
2
2
|
export default {
|
|
3
|
-
// 提示框背景色
|
|
4
|
-
colorBgSpotlight: colors.neutral[
|
|
5
|
-
// 提示框文字颜色
|
|
6
|
-
colorTextLightSolid: colors.neutral[
|
|
3
|
+
// 提示框背景色 - 与 Popover 保持一致,使用白色背景
|
|
4
|
+
colorBgSpotlight: colors.neutral[0],
|
|
5
|
+
// 提示框文字颜色 - 与 Popover 保持一致,使用深色文字
|
|
6
|
+
colorTextLightSolid: colors.neutral[950],
|
|
7
7
|
// 圆角 - 与样式和文档保持一致,设置为 0(无圆角)
|
|
8
8
|
borderRadius: 0,
|
|
9
|
-
// 内边距 - 与样式和文档保持一致:上下 8px,左右 16px
|
|
10
|
-
paddingBlock: 8,
|
|
11
|
-
paddingInline: 16,
|
|
12
9
|
// 字体大小
|
|
13
10
|
fontSize: 12,
|
|
14
11
|
// 行高
|
|
@@ -6,16 +6,24 @@
|
|
|
6
6
|
0px -1px 3px 0px var(--color-line-300);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
// 基础 Tooltip 样式
|
|
9
|
+
// 基础 Tooltip 样式 - 与 Popover 保持一致
|
|
10
10
|
.slimfit-tooltip {
|
|
11
11
|
.ant-tooltip-inner {
|
|
12
|
+
background: var(--color-neutral-0); // 白色背景,与 Popover 一致
|
|
13
|
+
color: var(--color-neutral-950); // 深色文字,与 Popover 一致
|
|
14
|
+
padding: 8px 16px; // 内边距:上下 8px,左右 16px
|
|
12
15
|
.tooltip-shadow();
|
|
13
16
|
min-height: auto !important;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
.ant-tooltip-arrow {
|
|
17
20
|
&::before {
|
|
21
|
+
background: var(--color-neutral-0); // 箭头背景色,与 Popover 一致
|
|
18
22
|
.tooltip-shadow();
|
|
19
23
|
}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
background: var(--color-neutral-0); // 箭头背景色,与 Popover 一致
|
|
27
|
+
}
|
|
20
28
|
}
|
|
21
29
|
}
|