wssf-kage-ui 0.1.0 → 0.1.1
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/README.md +4 -4
- package/dist/cjs/Anchor/index.d.ts +56 -0
- package/dist/cjs/Anchor/index.js +307 -0
- package/dist/cjs/Anchor/style.less +183 -0
- package/dist/cjs/AutoComplete/index.d.ts +54 -0
- package/dist/cjs/AutoComplete/index.js +273 -0
- package/dist/cjs/AutoComplete/style.less +325 -0
- package/dist/cjs/Breadcrumb/index.d.ts +51 -0
- package/dist/cjs/Breadcrumb/index.js +129 -0
- package/dist/cjs/Breadcrumb/style.less +96 -0
- package/dist/cjs/Cascader/index.d.ts +53 -0
- package/dist/cjs/Cascader/index.js +338 -0
- package/dist/cjs/Cascader/style.less +457 -0
- package/dist/cjs/Checkbox/index.d.ts +52 -0
- package/dist/cjs/Checkbox/index.js +158 -0
- package/dist/cjs/Checkbox/style.less +211 -0
- package/dist/cjs/ColorPicker/index.d.ts +28 -0
- package/dist/cjs/ColorPicker/index.js +381 -0
- package/dist/cjs/ColorPicker/style.less +276 -0
- package/dist/cjs/DatePicker/index.d.ts +32 -0
- package/dist/cjs/DatePicker/index.js +377 -0
- package/dist/cjs/DatePicker/style.less +498 -0
- package/dist/cjs/Divider/index.d.ts +24 -0
- package/dist/cjs/Divider/index.js +75 -0
- package/dist/cjs/Divider/style.less +144 -0
- package/dist/cjs/Dropdown/index.d.ts +88 -0
- package/dist/cjs/Dropdown/index.js +253 -0
- package/dist/cjs/Dropdown/style.less +430 -0
- package/dist/cjs/Flex/index.d.ts +37 -0
- package/dist/cjs/Flex/index.js +76 -0
- package/dist/cjs/Flex/style.less +13 -0
- package/dist/cjs/Form/index.d.ts +89 -0
- package/dist/cjs/Form/index.js +421 -0
- package/dist/cjs/Form/style.less +203 -0
- package/dist/cjs/Grid/index.d.ts +69 -0
- package/dist/cjs/Grid/index.js +171 -0
- package/dist/cjs/Grid/style.less +273 -0
- package/dist/cjs/Layout/index.d.ts +74 -0
- package/dist/cjs/Layout/index.js +166 -0
- package/dist/cjs/Layout/style.less +145 -0
- package/dist/cjs/Masonry/index.d.ts +18 -0
- package/dist/cjs/Masonry/index.js +146 -0
- package/dist/cjs/Masonry/style.less +15 -0
- package/dist/cjs/Menu/index.d.ts +87 -0
- package/dist/cjs/Menu/index.js +306 -0
- package/dist/cjs/Menu/style.less +363 -0
- package/dist/cjs/Pagination/index.d.ts +38 -0
- package/dist/cjs/Pagination/index.js +255 -0
- package/dist/cjs/Pagination/style.less +353 -0
- package/dist/cjs/Space/index.d.ts +41 -0
- package/dist/cjs/Space/index.js +137 -0
- package/dist/cjs/Space/style.less +116 -0
- package/dist/cjs/Splitter/index.d.ts +43 -0
- package/dist/cjs/Splitter/index.js +219 -0
- package/dist/cjs/Splitter/style.less +99 -0
- package/dist/cjs/Steps/index.d.ts +58 -0
- package/dist/cjs/Steps/index.js +180 -0
- package/dist/cjs/Steps/style.less +507 -0
- package/dist/cjs/Tabs/index.d.ts +58 -0
- package/dist/cjs/Tabs/index.js +196 -0
- package/dist/cjs/Tabs/style.less +423 -0
- package/dist/cjs/Typography/index.d.ts +102 -0
- package/dist/cjs/Typography/index.js +168 -0
- package/dist/cjs/Typography/style.less +246 -0
- package/dist/cjs/index.d.ts +42 -0
- package/dist/cjs/index.js +260 -1
- package/dist/esm/Anchor/index.d.ts +56 -0
- package/dist/esm/Anchor/index.js +302 -0
- package/dist/esm/Anchor/style.less +183 -0
- package/dist/esm/AutoComplete/index.d.ts +54 -0
- package/dist/esm/AutoComplete/index.js +268 -0
- package/dist/esm/AutoComplete/style.less +325 -0
- package/dist/esm/Breadcrumb/index.d.ts +51 -0
- package/dist/esm/Breadcrumb/index.js +124 -0
- package/dist/esm/Breadcrumb/style.less +96 -0
- package/dist/esm/Cascader/index.d.ts +53 -0
- package/dist/esm/Cascader/index.js +333 -0
- package/dist/esm/Cascader/style.less +457 -0
- package/dist/esm/Checkbox/index.d.ts +52 -0
- package/dist/esm/Checkbox/index.js +152 -0
- package/dist/esm/Checkbox/style.less +211 -0
- package/dist/esm/ColorPicker/index.d.ts +28 -0
- package/dist/esm/ColorPicker/index.js +375 -0
- package/dist/esm/ColorPicker/style.less +276 -0
- package/dist/esm/DatePicker/index.d.ts +32 -0
- package/dist/esm/DatePicker/index.js +371 -0
- package/dist/esm/DatePicker/style.less +498 -0
- package/dist/esm/Divider/index.d.ts +24 -0
- package/dist/esm/Divider/index.js +68 -0
- package/dist/esm/Divider/style.less +144 -0
- package/dist/esm/Dropdown/index.d.ts +88 -0
- package/dist/esm/Dropdown/index.js +249 -0
- package/dist/esm/Dropdown/style.less +430 -0
- package/dist/esm/Flex/index.d.ts +37 -0
- package/dist/esm/Flex/index.js +69 -0
- package/dist/esm/Flex/style.less +13 -0
- package/dist/esm/Form/index.d.ts +89 -0
- package/dist/esm/Form/index.js +416 -0
- package/dist/esm/Form/style.less +203 -0
- package/dist/esm/Grid/index.d.ts +69 -0
- package/dist/esm/Grid/index.js +165 -0
- package/dist/esm/Grid/style.less +273 -0
- package/dist/esm/Layout/index.d.ts +74 -0
- package/dist/esm/Layout/index.js +161 -0
- package/dist/esm/Layout/style.less +145 -0
- package/dist/esm/Masonry/index.d.ts +18 -0
- package/dist/esm/Masonry/index.js +138 -0
- package/dist/esm/Masonry/style.less +15 -0
- package/dist/esm/Menu/index.d.ts +87 -0
- package/dist/esm/Menu/index.js +301 -0
- package/dist/esm/Menu/style.less +363 -0
- package/dist/esm/Pagination/index.d.ts +38 -0
- package/dist/esm/Pagination/index.js +247 -0
- package/dist/esm/Pagination/style.less +353 -0
- package/dist/esm/Space/index.d.ts +41 -0
- package/dist/esm/Space/index.js +131 -0
- package/dist/esm/Space/style.less +116 -0
- package/dist/esm/Splitter/index.d.ts +43 -0
- package/dist/esm/Splitter/index.js +214 -0
- package/dist/esm/Splitter/style.less +99 -0
- package/dist/esm/Steps/index.d.ts +58 -0
- package/dist/esm/Steps/index.js +174 -0
- package/dist/esm/Steps/style.less +507 -0
- package/dist/esm/Tabs/index.d.ts +58 -0
- package/dist/esm/Tabs/index.js +193 -0
- package/dist/esm/Tabs/style.less +423 -0
- package/dist/esm/Typography/index.d.ts +102 -0
- package/dist/esm/Typography/index.js +161 -0
- package/dist/esm/Typography/style.less +246 -0
- package/dist/esm/index.d.ts +42 -0
- package/dist/esm/index.js +22 -1
- package/package.json +13 -10
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
export interface TitleProps {
|
|
4
|
+
/** 标题级别 h1-h5 */
|
|
5
|
+
level?: 1 | 2 | 3 | 4 | 5;
|
|
6
|
+
/** 是否可复制 */
|
|
7
|
+
copyable?: boolean;
|
|
8
|
+
/** 是否添加删除线 */
|
|
9
|
+
delete?: boolean;
|
|
10
|
+
/** 是否禁用 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 是否添加标记样式(高亮) */
|
|
13
|
+
mark?: boolean;
|
|
14
|
+
/** 是否添加下划线 */
|
|
15
|
+
underline?: boolean;
|
|
16
|
+
/** 文本类型 */
|
|
17
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger';
|
|
18
|
+
/** 子元素 */
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
/** 自定义类名 */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** 自定义样式 */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
export declare const Title: React.FC<TitleProps>;
|
|
26
|
+
export interface TextProps {
|
|
27
|
+
/** 文本类型 */
|
|
28
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger';
|
|
29
|
+
/** 是否禁用 */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** 是否添加标记样式(高亮) */
|
|
32
|
+
mark?: boolean;
|
|
33
|
+
/** 是否添加代码样式 */
|
|
34
|
+
code?: boolean;
|
|
35
|
+
/** 是否使用键盘样式 */
|
|
36
|
+
keyboard?: boolean;
|
|
37
|
+
/** 是否添加下划线 */
|
|
38
|
+
underline?: boolean;
|
|
39
|
+
/** 是否添加删除线 */
|
|
40
|
+
delete?: boolean;
|
|
41
|
+
/** 是否加粗 */
|
|
42
|
+
strong?: boolean;
|
|
43
|
+
/** 是否斜体 */
|
|
44
|
+
italic?: boolean;
|
|
45
|
+
/** 子元素 */
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
/** 自定义类名 */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** 自定义样式 */
|
|
50
|
+
style?: React.CSSProperties;
|
|
51
|
+
}
|
|
52
|
+
export declare const Text: React.FC<TextProps>;
|
|
53
|
+
export interface ParagraphProps {
|
|
54
|
+
/** 文本类型 */
|
|
55
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger';
|
|
56
|
+
/** 是否禁用 */
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** 是否添加删除线 */
|
|
59
|
+
delete?: boolean;
|
|
60
|
+
/** 是否添加下划线 */
|
|
61
|
+
underline?: boolean;
|
|
62
|
+
/** 是否加粗 */
|
|
63
|
+
strong?: boolean;
|
|
64
|
+
/** 是否斜体 */
|
|
65
|
+
italic?: boolean;
|
|
66
|
+
/** 子元素 */
|
|
67
|
+
children?: React.ReactNode;
|
|
68
|
+
/** 自定义类名 */
|
|
69
|
+
className?: string;
|
|
70
|
+
/** 自定义样式 */
|
|
71
|
+
style?: React.CSSProperties;
|
|
72
|
+
}
|
|
73
|
+
export declare const Paragraph: React.FC<ParagraphProps>;
|
|
74
|
+
export interface LinkProps {
|
|
75
|
+
/** 链接地址 */
|
|
76
|
+
href?: string;
|
|
77
|
+
/** 打开方式 */
|
|
78
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
79
|
+
/** 文本类型 */
|
|
80
|
+
type?: 'secondary' | 'success' | 'warning' | 'danger';
|
|
81
|
+
/** 是否禁用 */
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
/** 是否添加下划线 */
|
|
84
|
+
underline?: boolean;
|
|
85
|
+
/** 子元素 */
|
|
86
|
+
children?: React.ReactNode;
|
|
87
|
+
/** 自定义类名 */
|
|
88
|
+
className?: string;
|
|
89
|
+
/** 自定义样式 */
|
|
90
|
+
style?: React.CSSProperties;
|
|
91
|
+
/** 点击事件 */
|
|
92
|
+
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
93
|
+
}
|
|
94
|
+
export declare const Link: React.FC<LinkProps>;
|
|
95
|
+
interface TypographyType {
|
|
96
|
+
Title: typeof Title;
|
|
97
|
+
Text: typeof Text;
|
|
98
|
+
Paragraph: typeof Paragraph;
|
|
99
|
+
Link: typeof Link;
|
|
100
|
+
}
|
|
101
|
+
declare const Typography: TypographyType;
|
|
102
|
+
export default Typography;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Title = exports.Text = exports.Paragraph = exports.Link = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
require("./style.less");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
// ============ Title 标题组件 ============
|
|
12
|
+
|
|
13
|
+
var Title = exports.Title = function Title(_ref) {
|
|
14
|
+
var _ref$level = _ref.level,
|
|
15
|
+
level = _ref$level === void 0 ? 1 : _ref$level,
|
|
16
|
+
del = _ref.delete,
|
|
17
|
+
disabled = _ref.disabled,
|
|
18
|
+
mark = _ref.mark,
|
|
19
|
+
underline = _ref.underline,
|
|
20
|
+
type = _ref.type,
|
|
21
|
+
children = _ref.children,
|
|
22
|
+
_ref$className = _ref.className,
|
|
23
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24
|
+
style = _ref.style;
|
|
25
|
+
var Tag = "h".concat(level);
|
|
26
|
+
var classNames = ['kage-typography', 'kage-typography-title', "kage-typography-title-".concat(level), type && "kage-typography-".concat(type), disabled && 'kage-typography-disabled', className].filter(Boolean).join(' ');
|
|
27
|
+
var content = children;
|
|
28
|
+
if (del) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("del", {
|
|
29
|
+
children: content
|
|
30
|
+
});
|
|
31
|
+
if (underline) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("u", {
|
|
32
|
+
children: content
|
|
33
|
+
});
|
|
34
|
+
if (mark) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("mark", {
|
|
35
|
+
children: content
|
|
36
|
+
});
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, {
|
|
38
|
+
className: classNames,
|
|
39
|
+
style: style,
|
|
40
|
+
children: content
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// ============ Text 文本组件 ============
|
|
45
|
+
|
|
46
|
+
var Text = exports.Text = function Text(_ref2) {
|
|
47
|
+
var type = _ref2.type,
|
|
48
|
+
disabled = _ref2.disabled,
|
|
49
|
+
mark = _ref2.mark,
|
|
50
|
+
code = _ref2.code,
|
|
51
|
+
keyboard = _ref2.keyboard,
|
|
52
|
+
underline = _ref2.underline,
|
|
53
|
+
del = _ref2.delete,
|
|
54
|
+
strong = _ref2.strong,
|
|
55
|
+
italic = _ref2.italic,
|
|
56
|
+
children = _ref2.children,
|
|
57
|
+
_ref2$className = _ref2.className,
|
|
58
|
+
className = _ref2$className === void 0 ? '' : _ref2$className,
|
|
59
|
+
style = _ref2.style;
|
|
60
|
+
var classNames = ['kage-typography', 'kage-typography-text', type && "kage-typography-".concat(type), disabled && 'kage-typography-disabled', className].filter(Boolean).join(' ');
|
|
61
|
+
var content = children;
|
|
62
|
+
if (strong) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
63
|
+
children: content
|
|
64
|
+
});
|
|
65
|
+
if (italic) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("em", {
|
|
66
|
+
children: content
|
|
67
|
+
});
|
|
68
|
+
if (del) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("del", {
|
|
69
|
+
children: content
|
|
70
|
+
});
|
|
71
|
+
if (underline) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("u", {
|
|
72
|
+
children: content
|
|
73
|
+
});
|
|
74
|
+
if (code) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("code", {
|
|
75
|
+
className: "kage-typography-code",
|
|
76
|
+
children: content
|
|
77
|
+
});
|
|
78
|
+
if (keyboard) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("kbd", {
|
|
79
|
+
className: "kage-typography-keyboard",
|
|
80
|
+
children: content
|
|
81
|
+
});
|
|
82
|
+
if (mark) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("mark", {
|
|
83
|
+
className: "kage-typography-mark",
|
|
84
|
+
children: content
|
|
85
|
+
});
|
|
86
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
87
|
+
className: classNames,
|
|
88
|
+
style: style,
|
|
89
|
+
children: content
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// ============ Paragraph 段落组件 ============
|
|
94
|
+
|
|
95
|
+
var Paragraph = exports.Paragraph = function Paragraph(_ref3) {
|
|
96
|
+
var type = _ref3.type,
|
|
97
|
+
disabled = _ref3.disabled,
|
|
98
|
+
del = _ref3.delete,
|
|
99
|
+
underline = _ref3.underline,
|
|
100
|
+
strong = _ref3.strong,
|
|
101
|
+
italic = _ref3.italic,
|
|
102
|
+
children = _ref3.children,
|
|
103
|
+
_ref3$className = _ref3.className,
|
|
104
|
+
className = _ref3$className === void 0 ? '' : _ref3$className,
|
|
105
|
+
style = _ref3.style;
|
|
106
|
+
var classNames = ['kage-typography', 'kage-typography-paragraph', type && "kage-typography-".concat(type), disabled && 'kage-typography-disabled', className].filter(Boolean).join(' ');
|
|
107
|
+
var content = children;
|
|
108
|
+
if (strong) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
109
|
+
children: content
|
|
110
|
+
});
|
|
111
|
+
if (italic) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("em", {
|
|
112
|
+
children: content
|
|
113
|
+
});
|
|
114
|
+
if (del) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("del", {
|
|
115
|
+
children: content
|
|
116
|
+
});
|
|
117
|
+
if (underline) content = /*#__PURE__*/(0, _jsxRuntime.jsx)("u", {
|
|
118
|
+
children: content
|
|
119
|
+
});
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
121
|
+
className: classNames,
|
|
122
|
+
style: style,
|
|
123
|
+
children: content
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// ============ Link 链接组件 ============
|
|
128
|
+
|
|
129
|
+
var Link = exports.Link = function Link(_ref4) {
|
|
130
|
+
var href = _ref4.href,
|
|
131
|
+
target = _ref4.target,
|
|
132
|
+
type = _ref4.type,
|
|
133
|
+
disabled = _ref4.disabled,
|
|
134
|
+
_ref4$underline = _ref4.underline,
|
|
135
|
+
underline = _ref4$underline === void 0 ? true : _ref4$underline,
|
|
136
|
+
children = _ref4.children,
|
|
137
|
+
_ref4$className = _ref4.className,
|
|
138
|
+
className = _ref4$className === void 0 ? '' : _ref4$className,
|
|
139
|
+
style = _ref4.style,
|
|
140
|
+
onClick = _ref4.onClick;
|
|
141
|
+
var classNames = ['kage-typography', 'kage-typography-link', type && "kage-typography-".concat(type), disabled && 'kage-typography-disabled', !underline && 'kage-typography-link-no-underline', className].filter(Boolean).join(' ');
|
|
142
|
+
var handleClick = function handleClick(e) {
|
|
143
|
+
if (disabled) {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
148
|
+
};
|
|
149
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
150
|
+
href: disabled ? undefined : href,
|
|
151
|
+
target: target,
|
|
152
|
+
rel: target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
153
|
+
className: classNames,
|
|
154
|
+
style: style,
|
|
155
|
+
onClick: handleClick,
|
|
156
|
+
children: children
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// ============ Typography 命名空间导出 ============
|
|
161
|
+
|
|
162
|
+
var Typography = {
|
|
163
|
+
Title: Title,
|
|
164
|
+
Text: Text,
|
|
165
|
+
Paragraph: Paragraph,
|
|
166
|
+
Link: Link
|
|
167
|
+
};
|
|
168
|
+
var _default = exports.default = Typography;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// Typography 排版组件样式
|
|
2
|
+
|
|
3
|
+
@prefix: kage-typography;
|
|
4
|
+
|
|
5
|
+
// 基础变量
|
|
6
|
+
@font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
7
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
8
|
+
'Noto Color Emoji';
|
|
9
|
+
@color-text: #1f1f1f;
|
|
10
|
+
@color-secondary: #666666;
|
|
11
|
+
@color-success: #52c41a;
|
|
12
|
+
@color-warning: #faad14;
|
|
13
|
+
@color-danger: #ff4d4f;
|
|
14
|
+
@color-link: #6366f1;
|
|
15
|
+
@color-link-hover: #4f46e5;
|
|
16
|
+
@color-disabled: #00000040;
|
|
17
|
+
@color-mark-bg: #ffe58f;
|
|
18
|
+
|
|
19
|
+
.@{prefix} {
|
|
20
|
+
font-family: @font-family;
|
|
21
|
+
color: @color-text;
|
|
22
|
+
line-height: 1.6;
|
|
23
|
+
word-break: break-word;
|
|
24
|
+
|
|
25
|
+
// ============ 文本类型 ============
|
|
26
|
+
&-secondary {
|
|
27
|
+
color: @color-secondary;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-success {
|
|
31
|
+
color: @color-success;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-warning {
|
|
35
|
+
color: @color-warning;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-danger {
|
|
39
|
+
color: @color-danger;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-disabled {
|
|
43
|
+
color: @color-disabled;
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
user-select: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ============ 标题样式 ============
|
|
49
|
+
&-title {
|
|
50
|
+
margin-bottom: 0.5em;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
|
|
53
|
+
&-1 {
|
|
54
|
+
font-size: 38px;
|
|
55
|
+
line-height: 1.23;
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&-2 {
|
|
60
|
+
font-size: 30px;
|
|
61
|
+
line-height: 1.35;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-3 {
|
|
65
|
+
font-size: 24px;
|
|
66
|
+
line-height: 1.35;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&-4 {
|
|
70
|
+
font-size: 20px;
|
|
71
|
+
line-height: 1.4;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&-5 {
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
line-height: 1.5;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ============ 文本样式 ============
|
|
81
|
+
&-text {
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ============ 段落样式 ============
|
|
86
|
+
&-paragraph {
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
margin-bottom: 1em;
|
|
89
|
+
|
|
90
|
+
&:last-child {
|
|
91
|
+
margin-bottom: 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ============ 链接样式 ============
|
|
96
|
+
&-link {
|
|
97
|
+
color: @color-link;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
transition: color 0.2s ease;
|
|
101
|
+
outline: none;
|
|
102
|
+
|
|
103
|
+
&:hover {
|
|
104
|
+
color: @color-link-hover;
|
|
105
|
+
text-decoration: underline;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:active {
|
|
109
|
+
color: darken(@color-link, 10%);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-no-underline:hover {
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.@{prefix}-disabled {
|
|
117
|
+
color: @color-disabled;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
|
|
120
|
+
&:hover {
|
|
121
|
+
color: @color-disabled;
|
|
122
|
+
text-decoration: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 不同类型的链接颜色
|
|
127
|
+
&.@{prefix}-success {
|
|
128
|
+
color: @color-success;
|
|
129
|
+
&:hover { color: darken(@color-success, 10%); }
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.@{prefix}-warning {
|
|
133
|
+
color: @color-warning;
|
|
134
|
+
&:hover { color: darken(@color-warning, 10%); }
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&.@{prefix}-danger {
|
|
138
|
+
color: @color-danger;
|
|
139
|
+
&:hover { color: darken(@color-danger, 10%); }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ============ 代码样式 ============
|
|
144
|
+
&-code {
|
|
145
|
+
margin: 0 0.2em;
|
|
146
|
+
padding: 0.2em 0.4em 0.1em;
|
|
147
|
+
font-size: 85%;
|
|
148
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
149
|
+
background: rgba(150, 150, 150, 0.1);
|
|
150
|
+
border: 1px solid rgba(100, 100, 100, 0.2);
|
|
151
|
+
border-radius: 4px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// ============ 键盘样式 ============
|
|
155
|
+
&-keyboard {
|
|
156
|
+
margin: 0 0.2em;
|
|
157
|
+
padding: 0.15em 0.4em 0.1em;
|
|
158
|
+
font-size: 90%;
|
|
159
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
160
|
+
background: #fafafa;
|
|
161
|
+
border: 1px solid #d9d9d9;
|
|
162
|
+
border-bottom-width: 2px;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ============ 标记样式 ============
|
|
167
|
+
&-mark,
|
|
168
|
+
mark {
|
|
169
|
+
padding: 0 0.2em;
|
|
170
|
+
background-color: @color-mark-bg;
|
|
171
|
+
border-radius: 2px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ============ 删除线 ============
|
|
175
|
+
del {
|
|
176
|
+
text-decoration: line-through;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// ============ 下划线 ============
|
|
180
|
+
u {
|
|
181
|
+
text-decoration: underline;
|
|
182
|
+
text-underline-offset: 2px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// ============ 加粗 ============
|
|
186
|
+
strong {
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ============ 斜体 ============
|
|
191
|
+
em {
|
|
192
|
+
font-style: italic;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// ============ 暗色模式适配 ============
|
|
197
|
+
// 仅通过 dumi 主题选择器,不使用 prefers-color-scheme
|
|
198
|
+
// 避免系统暗色+dumi浅色主题时的冲突
|
|
199
|
+
|
|
200
|
+
[data-theme='dark'],
|
|
201
|
+
[data-prefers-color-scheme='dark'],
|
|
202
|
+
[data-prefers-color='dark'] {
|
|
203
|
+
.@{prefix} {
|
|
204
|
+
color: rgba(255, 255, 255, 0.85);
|
|
205
|
+
|
|
206
|
+
&-secondary {
|
|
207
|
+
color: rgba(255, 255, 255, 0.45);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&-disabled {
|
|
211
|
+
color: rgba(255, 255, 255, 0.25);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&-link {
|
|
215
|
+
color: #818cf8;
|
|
216
|
+
|
|
217
|
+
&:hover {
|
|
218
|
+
color: #a5b4fc;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&-code {
|
|
223
|
+
background: rgba(255, 255, 255, 0.1);
|
|
224
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
225
|
+
color: #e879f9;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&-keyboard {
|
|
229
|
+
background: #2d2d2d;
|
|
230
|
+
border-color: #404040;
|
|
231
|
+
color: rgba(255, 255, 255, 0.85);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&-mark,
|
|
235
|
+
mark {
|
|
236
|
+
background-color: #854d0e;
|
|
237
|
+
color: #fef08a;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 标题颜色
|
|
242
|
+
.@{prefix}-title {
|
|
243
|
+
color: rgba(255, 255, 255, 0.85);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,2 +1,44 @@
|
|
|
1
1
|
export { Button } from './Button';
|
|
2
2
|
export type { ButtonProps } from './Button';
|
|
3
|
+
export { default as Typography, Title, Text, Paragraph, Link } from './Typography';
|
|
4
|
+
export type { TitleProps, TextProps, ParagraphProps, LinkProps } from './Typography';
|
|
5
|
+
export { Divider } from './Divider';
|
|
6
|
+
export type { DividerProps } from './Divider';
|
|
7
|
+
export { Flex } from './Flex';
|
|
8
|
+
export type { FlexProps } from './Flex';
|
|
9
|
+
export { default as Grid, Row, Col } from './Grid';
|
|
10
|
+
export type { RowProps, ColProps } from './Grid';
|
|
11
|
+
export { default as Layout, Header, Sider, Content, Footer } from './Layout';
|
|
12
|
+
export type { LayoutProps, HeaderProps, SiderProps, ContentProps, FooterProps } from './Layout';
|
|
13
|
+
export { Masonry } from './Masonry';
|
|
14
|
+
export type { MasonryProps } from './Masonry';
|
|
15
|
+
export { default as Space, Compact } from './Space';
|
|
16
|
+
export type { SpaceProps, CompactProps } from './Space';
|
|
17
|
+
export { default as Splitter, Panel } from './Splitter';
|
|
18
|
+
export type { SplitterProps, PanelProps } from './Splitter';
|
|
19
|
+
export { default as Anchor, AnchorLink } from './Anchor';
|
|
20
|
+
export type { AnchorProps, AnchorLinkProps, AnchorItem } from './Anchor';
|
|
21
|
+
export { default as Breadcrumb, BreadcrumbItem, BreadcrumbSeparator } from './Breadcrumb';
|
|
22
|
+
export type { BreadcrumbProps, BreadcrumbItemProps, BreadcrumbItemType } from './Breadcrumb';
|
|
23
|
+
export { default as Dropdown, DropdownButton } from './Dropdown';
|
|
24
|
+
export type { DropdownProps, DropdownButtonProps, DropdownMenuItem, DropdownMenuProps } from './Dropdown';
|
|
25
|
+
export { default as Menu } from './Menu';
|
|
26
|
+
export type { MenuProps, MenuItemType } from './Menu';
|
|
27
|
+
export { default as Pagination } from './Pagination';
|
|
28
|
+
export type { PaginationProps } from './Pagination';
|
|
29
|
+
export { default as Steps } from './Steps';
|
|
30
|
+
export type { StepsProps, StepItem, StepStatus } from './Steps';
|
|
31
|
+
export { default as Tabs } from './Tabs';
|
|
32
|
+
export type { TabsProps, TabItem } from './Tabs';
|
|
33
|
+
export { default as AutoComplete } from './AutoComplete';
|
|
34
|
+
export type { AutoCompleteProps, AutoCompleteOption } from './AutoComplete';
|
|
35
|
+
export { default as Cascader } from './Cascader';
|
|
36
|
+
export type { CascaderProps, CascaderOption, CascaderValueType } from './Cascader';
|
|
37
|
+
export { default as Checkbox, CheckboxGroup } from './Checkbox';
|
|
38
|
+
export type { CheckboxProps, CheckboxGroupProps, CheckboxOptionType } from './Checkbox';
|
|
39
|
+
export { default as ColorPicker } from './ColorPicker';
|
|
40
|
+
export type { ColorPickerProps } from './ColorPicker';
|
|
41
|
+
export { default as DatePicker } from './DatePicker';
|
|
42
|
+
export type { DatePickerProps } from './DatePicker';
|
|
43
|
+
export { default as Form, FormItem } from './Form';
|
|
44
|
+
export type { FormProps, FormItemProps, Rule, FormInstance } from './Form';
|