@aura-react-comp/ui 0.0.0-stage → 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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -2
  3. package/esm/alert/index.d.ts +28 -0
  4. package/esm/alert/index.js +76 -0
  5. package/esm/alert/index.less +172 -0
  6. package/esm/avatar/index.d.ts +41 -0
  7. package/esm/avatar/index.js +117 -0
  8. package/esm/avatar/index.less +163 -0
  9. package/esm/badge/index.d.ts +29 -0
  10. package/esm/badge/index.js +84 -0
  11. package/esm/badge/index.less +215 -0
  12. package/esm/breadcrumb/index.d.ts +31 -0
  13. package/esm/breadcrumb/index.js +91 -0
  14. package/esm/breadcrumb/index.less +107 -0
  15. package/esm/button/index.d.ts +28 -0
  16. package/esm/button/index.js +59 -0
  17. package/esm/button/index.less +191 -0
  18. package/esm/card/index.d.ts +67 -0
  19. package/esm/card/index.js +156 -0
  20. package/esm/card/index.less +231 -0
  21. package/esm/checkbox/index.d.ts +35 -0
  22. package/esm/checkbox/index.js +118 -0
  23. package/esm/checkbox/index.less +175 -0
  24. package/esm/collapse/index.d.ts +45 -0
  25. package/esm/collapse/index.js +157 -0
  26. package/esm/collapse/index.less +144 -0
  27. package/esm/divider/index.d.ts +16 -0
  28. package/esm/divider/index.js +37 -0
  29. package/esm/divider/index.less +115 -0
  30. package/esm/dropdown/index.d.ts +38 -0
  31. package/esm/dropdown/index.js +108 -0
  32. package/esm/dropdown/index.less +247 -0
  33. package/esm/empty/index.d.ts +35 -0
  34. package/esm/empty/index.js +87 -0
  35. package/esm/empty/index.less +67 -0
  36. package/esm/flex/index.d.ts +24 -0
  37. package/esm/flex/index.js +64 -0
  38. package/esm/flex/index.less +9 -0
  39. package/esm/form/index.d.ts +121 -0
  40. package/esm/form/index.js +443 -0
  41. package/esm/form/index.less +258 -0
  42. package/esm/global.d.ts +6 -0
  43. package/esm/index.d.ts +78 -0
  44. package/esm/index.js +41 -0
  45. package/esm/input/index.d.ts +51 -0
  46. package/esm/input/index.js +217 -0
  47. package/esm/input/index.less +369 -0
  48. package/esm/layout/index.d.ts +46 -0
  49. package/esm/layout/index.js +135 -0
  50. package/esm/layout/index.less +132 -0
  51. package/esm/menu/index.d.ts +91 -0
  52. package/esm/menu/index.js +294 -0
  53. package/esm/menu/index.less +340 -0
  54. package/esm/message/index.d.ts +33 -0
  55. package/esm/message/index.js +199 -0
  56. package/esm/message/index.less +118 -0
  57. package/esm/notification/index.d.ts +33 -0
  58. package/esm/notification/index.js +229 -0
  59. package/esm/notification/index.less +175 -0
  60. package/esm/pagination/index.d.ts +38 -0
  61. package/esm/pagination/index.js +182 -0
  62. package/esm/pagination/index.less +230 -0
  63. package/esm/popconfirm/index.d.ts +37 -0
  64. package/esm/popconfirm/index.js +115 -0
  65. package/esm/popconfirm/index.less +229 -0
  66. package/esm/radio/index.d.ts +33 -0
  67. package/esm/radio/index.js +122 -0
  68. package/esm/radio/index.less +155 -0
  69. package/esm/rate/index.d.ts +30 -0
  70. package/esm/rate/index.js +143 -0
  71. package/esm/rate/index.less +87 -0
  72. package/esm/result/index.d.ts +19 -0
  73. package/esm/result/index.js +69 -0
  74. package/esm/result/index.less +104 -0
  75. package/esm/scrollbar/index.d.ts +18 -0
  76. package/esm/scrollbar/index.js +35 -0
  77. package/esm/scrollbar/index.less +67 -0
  78. package/esm/select/index.d.ts +63 -0
  79. package/esm/select/index.js +358 -0
  80. package/esm/select/index.less +471 -0
  81. package/esm/slider/index.d.ts +36 -0
  82. package/esm/slider/index.js +255 -0
  83. package/esm/slider/index.less +154 -0
  84. package/esm/space/index.d.ts +16 -0
  85. package/esm/space/index.js +34 -0
  86. package/esm/space/index.less +34 -0
  87. package/esm/spin/index.d.ts +44 -0
  88. package/esm/spin/index.js +152 -0
  89. package/esm/spin/index.less +179 -0
  90. package/esm/steps/index.d.ts +55 -0
  91. package/esm/steps/index.js +165 -0
  92. package/esm/steps/index.less +394 -0
  93. package/esm/switch/index.d.ts +30 -0
  94. package/esm/switch/index.js +56 -0
  95. package/esm/switch/index.less +160 -0
  96. package/esm/tabs/index.d.ts +45 -0
  97. package/esm/tabs/index.js +170 -0
  98. package/esm/tabs/index.less +228 -0
  99. package/esm/tag/index.d.ts +52 -0
  100. package/esm/tag/index.js +120 -0
  101. package/esm/tag/index.less +227 -0
  102. package/esm/textarea/index.d.ts +27 -0
  103. package/esm/textarea/index.js +84 -0
  104. package/esm/textarea/index.less +226 -0
  105. package/esm/theme/ThemeProvider.d.ts +15 -0
  106. package/esm/theme/ThemeProvider.js +32 -0
  107. package/esm/theme/index.d.ts +2 -0
  108. package/esm/theme/index.js +1 -0
  109. package/esm/theme/tokens.css +183 -0
  110. package/esm/theme/useTheme.d.ts +1 -0
  111. package/esm/theme/useTheme.js +1 -0
  112. package/esm/tooltip/index.d.ts +38 -0
  113. package/esm/tooltip/index.js +149 -0
  114. package/esm/tooltip/index.less +244 -0
  115. package/esm/typography/index.d.ts +26 -0
  116. package/esm/typography/index.js +92 -0
  117. package/esm/typography/index.less +107 -0
  118. package/esm/upload/index.d.ts +68 -0
  119. package/esm/upload/index.js +447 -0
  120. package/esm/upload/index.less +376 -0
  121. package/esm/upload/request.d.ts +26 -0
  122. package/esm/upload/request.js +38 -0
  123. package/package.json +56 -3
@@ -0,0 +1,230 @@
1
+ /* ===== Pagination 组件样式 ===== */
2
+
3
+ .aura-pagination {
4
+ display: flex;
5
+ align-items: center;
6
+ gap: var(--aura-spacing-1);
7
+ user-select: none;
8
+ font-size: var(--aura-font-size-md);
9
+
10
+ // 总条数展示
11
+ &-total {
12
+ margin-right: var(--aura-spacing-2);
13
+ color: var(--aura-text-secondary);
14
+ font-size: var(--aura-font-size-sm);
15
+ white-space: nowrap;
16
+ }
17
+
18
+ /* ===== 页码容器 ===== */
19
+ &-pages {
20
+ display: flex;
21
+ align-items: center;
22
+ gap: var(--aura-spacing-1);
23
+ }
24
+ }
25
+
26
+ /* ===== 按钮(页码 & 前后翻页) ===== */
27
+ .aura-pagination-btn {
28
+ display: inline-flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+ min-width: 32px;
32
+ height: 32px;
33
+ padding: 0 6px;
34
+ font-size: var(--aura-font-size-sm);
35
+ font-family: inherit;
36
+ line-height: 1;
37
+ color: var(--aura-text);
38
+ background: var(--aura-bg);
39
+ border: 1px solid var(--aura-border);
40
+ border-radius: var(--aura-radius-sm);
41
+ cursor: pointer;
42
+ transition: all var(--aura-duration-normal) cubic-bezier(0.4, 0, 0.2, 1);
43
+
44
+ &:hover:not(:disabled) {
45
+ color: var(--aura-primary-700);
46
+ border-color: var(--aura-primary-300);
47
+ background: var(--aura-primary-50);
48
+ }
49
+
50
+ &:active:not(:disabled) {
51
+ transform: scale(0.95);
52
+ }
53
+
54
+ &:focus-visible {
55
+ outline: 2px solid var(--aura-primary-500);
56
+ outline-offset: 2px;
57
+ }
58
+
59
+ /* 当前页激活 */
60
+ &-active {
61
+ color: var(--aura-text-inverse);
62
+ background: var(--aura-primary-600);
63
+ border-color: var(--aura-primary-600);
64
+ font-weight: 600;
65
+
66
+ &:hover {
67
+ color: var(--aura-text-inverse);
68
+ background: var(--aura-primary-700);
69
+ border-color: var(--aura-primary-700);
70
+ }
71
+ }
72
+
73
+ /* 禁用 */
74
+ &-disabled {
75
+ color: var(--aura-text-tertiary);
76
+ background: var(--aura-bg-secondary);
77
+ border-color: var(--aura-border);
78
+ cursor: not-allowed;
79
+ opacity: 0.6;
80
+
81
+ &:hover {
82
+ color: var(--aura-text-tertiary);
83
+ background: var(--aura-bg-secondary);
84
+ border-color: var(--aura-border);
85
+ }
86
+
87
+ &:active {
88
+ transform: none;
89
+ }
90
+ }
91
+ }
92
+
93
+ /* ===== 省略号 ===== */
94
+ .aura-pagination-ellipsis {
95
+ display: inline-flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ min-width: 32px;
99
+ height: 32px;
100
+ color: var(--aura-text-tertiary);
101
+ font-size: var(--aura-font-size-md);
102
+ letter-spacing: 2px;
103
+ }
104
+
105
+ /* ===== 每页条数选择器 ===== */
106
+ .aura-pagination-size-changer {
107
+ /* 视觉(边框 / 背景 / 字号)由 Select 自身负责,这里只做尺寸与对齐 */
108
+ width: 108px;
109
+ min-width: 108px;
110
+ margin-left: var(--aura-spacing-2);
111
+ vertical-align: middle;
112
+
113
+ .aura-select-selector {
114
+ min-height: 32px;
115
+ padding-top: 4px;
116
+ padding-bottom: 4px;
117
+ }
118
+ }
119
+
120
+ /* ===== 快速跳转 ===== */
121
+ .aura-pagination-jumper {
122
+ display: flex;
123
+ align-items: center;
124
+ gap: var(--aura-spacing-2);
125
+ margin-left: var(--aura-spacing-2);
126
+ }
127
+
128
+ .aura-pagination-jumper-text {
129
+ font-size: var(--aura-font-size-sm);
130
+ color: var(--aura-text-secondary);
131
+ }
132
+
133
+ .aura-pagination-jumper-input {
134
+ width: 50px;
135
+ height: 32px;
136
+ padding: 0 var(--aura-spacing-2);
137
+ font-size: var(--aura-font-size-sm);
138
+ font-family: inherit;
139
+ color: var(--aura-text);
140
+ background: var(--aura-bg);
141
+ border: 1px solid var(--aura-border);
142
+ border-radius: var(--aura-radius-sm);
143
+ text-align: center;
144
+ transition: border-color var(--aura-duration-normal)
145
+ cubic-bezier(0.4, 0, 0.2, 1);
146
+
147
+ &:hover {
148
+ border-color: var(--aura-primary-300);
149
+ }
150
+
151
+ &:focus {
152
+ outline: 2px solid var(--aura-primary-500);
153
+ outline-offset: 2px;
154
+ border-color: var(--aura-primary-500);
155
+ }
156
+ }
157
+
158
+ /* ===== Size 变体 ===== */
159
+ .aura-pagination-sm {
160
+ .aura-pagination-btn {
161
+ min-width: 28px;
162
+ height: 28px;
163
+ font-size: var(--aura-font-size-xs);
164
+ padding: 0 4px;
165
+ }
166
+
167
+ .aura-pagination-ellipsis {
168
+ min-width: 28px;
169
+ height: 28px;
170
+ font-size: var(--aura-font-size-xs);
171
+ }
172
+
173
+ .aura-pagination-size-changer {
174
+ width: 100px;
175
+ min-width: 100px;
176
+
177
+ .aura-select-selector {
178
+ min-height: 28px;
179
+ padding: 2px 22px 2px 8px;
180
+ font-size: var(--aura-font-size-xs);
181
+ }
182
+ }
183
+
184
+ .aura-pagination-jumper-input {
185
+ width: 44px;
186
+ height: 28px;
187
+ font-size: var(--aura-font-size-xs);
188
+ }
189
+ }
190
+
191
+ /* ===== 暗色模式 ===== */
192
+ [data-theme='dark'] {
193
+ .aura-pagination-btn {
194
+ color: var(--aura-text);
195
+ background: var(--aura-bg-secondary);
196
+ border-color: var(--aura-border);
197
+
198
+ &:hover:not(:disabled) {
199
+ color: var(--aura-primary-400);
200
+ border-color: var(--aura-primary-600);
201
+ background: rgba(124, 58, 237, 0.1);
202
+ }
203
+
204
+ &-active {
205
+ color: var(--aura-text-inverse);
206
+ background: var(--aura-primary-600);
207
+ border-color: var(--aura-primary-600);
208
+
209
+ &:hover {
210
+ color: var(--aura-text-inverse);
211
+ background: var(--aura-primary-500);
212
+ border-color: var(--aura-primary-500);
213
+ }
214
+ }
215
+
216
+ &-disabled {
217
+ color: var(--aura-text-tertiary);
218
+ background: var(--aura-bg-tertiary);
219
+ border-color: var(--aura-border);
220
+ }
221
+ }
222
+
223
+ /* 每页条数选择器的暗色配色完全由 Select 自身的暗色令牌负责 */
224
+
225
+ .aura-pagination-jumper-input {
226
+ color: var(--aura-text);
227
+ background: var(--aura-bg-secondary);
228
+ border-color: var(--aura-border);
229
+ }
230
+ }
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ export interface PopconfirmProps {
3
+ /** 确认标题 */
4
+ title: React.ReactNode;
5
+ /** 确认描述 */
6
+ description?: React.ReactNode;
7
+ /** 确认回调 */
8
+ onConfirm?: () => void;
9
+ /** 取消回调 */
10
+ onCancel?: () => void;
11
+ /** 确认按钮文字
12
+ * @default '确定'
13
+ */
14
+ okText?: string;
15
+ /** 取消按钮文字
16
+ * @default '取消'
17
+ */
18
+ cancelText?: string;
19
+ /** 变体样式
20
+ * @default 'default'
21
+ */
22
+ variant?: 'default' | 'warning' | 'error';
23
+ /** 弹出方位
24
+ * @default 'top'
25
+ */
26
+ placement?: 'top' | 'bottom' | 'left' | 'right';
27
+ /** 是否禁用 */
28
+ disabled?: boolean;
29
+ /** 自定义类名 */
30
+ className?: string;
31
+ /** 自定义样式 */
32
+ style?: React.CSSProperties;
33
+ /** 目标元素(仅接受单个 ReactElement) */
34
+ children: React.ReactElement;
35
+ }
36
+ export declare const PopconfirmBase: React.ForwardRefExoticComponent<PopconfirmProps & React.RefAttributes<HTMLDivElement>>;
37
+ export declare const Popconfirm: React.ForwardRefExoticComponent<PopconfirmProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,115 @@
1
+ import React, { forwardRef, useState, useRef, useEffect } from 'react';
2
+ import { classNames, prefixCls } from '@aura-react-comp/shared';
3
+ import "./index.less";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ export const PopconfirmBase = /*#__PURE__*/forwardRef(({
7
+ title,
8
+ description,
9
+ onConfirm,
10
+ onCancel,
11
+ okText = '确定',
12
+ cancelText = '取消',
13
+ variant = 'default',
14
+ placement = 'top',
15
+ disabled = false,
16
+ className,
17
+ style,
18
+ children
19
+ }, ref) => {
20
+ const [visible, setVisible] = useState(false);
21
+ const [animating, setAnimating] = useState(false);
22
+ const wrapperRef = useRef(null);
23
+ const onCancelRef = useRef(onCancel);
24
+ onCancelRef.current = onCancel;
25
+
26
+ // 隐藏气泡
27
+ const hide = () => {
28
+ setAnimating(false);
29
+ setTimeout(() => setVisible(false), 200);
30
+ };
31
+
32
+ // 点击外部关闭
33
+ useEffect(() => {
34
+ if (!visible) return;
35
+ const handleClickOutside = e => {
36
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
37
+ onCancelRef.current?.();
38
+ hide();
39
+ }
40
+ };
41
+ document.addEventListener('mousedown', handleClickOutside);
42
+ return () => {
43
+ document.removeEventListener('mousedown', handleClickOutside);
44
+ };
45
+ }, [visible]);
46
+
47
+ // 显示气泡
48
+ const show = () => {
49
+ if (disabled) return;
50
+ setAnimating(true);
51
+ setVisible(true);
52
+ };
53
+
54
+ // 确认操作
55
+ const handleConfirm = () => {
56
+ onConfirm?.();
57
+ hide();
58
+ };
59
+
60
+ // 取消操作
61
+ const handleCancel = () => {
62
+ onCancel?.();
63
+ hide();
64
+ };
65
+
66
+ // 构建子元素的 props
67
+ const childProps = {};
68
+ const childOwnProps = children.props;
69
+ childProps.onClick = e => {
70
+ if (!disabled) {
71
+ show();
72
+ }
73
+ childOwnProps.onClick?.(e);
74
+ };
75
+ const wrapperCls = classNames(prefixCls('popconfirm-wrapper'), className);
76
+ const popCls = classNames(prefixCls('popconfirm'), prefixCls(`popconfirm-${placement}`), variant !== 'default' && prefixCls(`popconfirm-${variant}`), animating && prefixCls('popconfirm-visible'));
77
+ return /*#__PURE__*/_jsxs("div", {
78
+ ref: node => {
79
+ wrapperRef.current = node;
80
+ if (typeof ref === 'function') ref(node);else if (ref) ref.current = node;
81
+ },
82
+ className: wrapperCls,
83
+ style: style,
84
+ children: [/*#__PURE__*/React.cloneElement(children, childProps), visible && /*#__PURE__*/_jsxs("div", {
85
+ className: popCls,
86
+ role: "dialog",
87
+ "aria-label": typeof title === 'string' ? title : undefined,
88
+ children: [/*#__PURE__*/_jsxs("div", {
89
+ className: prefixCls('popconfirm-content'),
90
+ children: [/*#__PURE__*/_jsx("div", {
91
+ className: prefixCls('popconfirm-title'),
92
+ children: title
93
+ }), description && /*#__PURE__*/_jsx("div", {
94
+ className: prefixCls('popconfirm-description'),
95
+ children: description
96
+ }), /*#__PURE__*/_jsxs("div", {
97
+ className: prefixCls('popconfirm-buttons'),
98
+ children: [/*#__PURE__*/_jsx("button", {
99
+ className: classNames(prefixCls('popconfirm-btn'), prefixCls('popconfirm-btn-cancel')),
100
+ onClick: handleCancel,
101
+ children: cancelText
102
+ }), /*#__PURE__*/_jsx("button", {
103
+ className: classNames(prefixCls('popconfirm-btn'), prefixCls(`popconfirm-btn-${variant === 'default' ? 'primary' : variant}`)),
104
+ onClick: handleConfirm,
105
+ children: okText
106
+ })]
107
+ })]
108
+ }), /*#__PURE__*/_jsx("div", {
109
+ className: prefixCls('popconfirm-arrow')
110
+ })]
111
+ })]
112
+ });
113
+ });
114
+ PopconfirmBase.displayName = 'Popconfirm';
115
+ export const Popconfirm = PopconfirmBase;
@@ -0,0 +1,229 @@
1
+ /* ===== Popconfirm 组件样式 ===== */
2
+
3
+ .aura-popconfirm-wrapper {
4
+ position: relative;
5
+ display: inline-flex;
6
+ }
7
+
8
+ .aura-popconfirm {
9
+ position: absolute;
10
+ z-index: 1070;
11
+ pointer-events: auto;
12
+ opacity: 0;
13
+ width: max-content;
14
+ transform: scale(0.9);
15
+ transition:
16
+ opacity var(--aura-duration-normal) cubic-bezier(0.34, 1.56, 0.64, 1),
17
+ transform var(--aura-duration-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
18
+
19
+ // ===== 出现状态 =====
20
+ &&-visible {
21
+ opacity: 1;
22
+ transform: scale(1);
23
+ }
24
+
25
+ // ===== 方位定位 =====
26
+ &&-top {
27
+ bottom: calc(100% + 8px);
28
+ left: 50%;
29
+ transform-origin: center bottom;
30
+ transform: translateX(-50%) scale(0.9);
31
+
32
+ &.aura-popconfirm-visible {
33
+ transform: translateX(-50%) scale(1);
34
+ }
35
+ }
36
+
37
+ &&-bottom {
38
+ top: calc(100% + 8px);
39
+ left: 50%;
40
+ transform-origin: center top;
41
+ transform: translateX(-50%) scale(0.9);
42
+
43
+ &.aura-popconfirm-visible {
44
+ transform: translateX(-50%) scale(1);
45
+ }
46
+ }
47
+
48
+ &&-left {
49
+ right: calc(100% + 8px);
50
+ top: 50%;
51
+ transform-origin: right center;
52
+ transform: translateY(-50%) scale(0.9);
53
+
54
+ &.aura-popconfirm-visible {
55
+ transform: translateY(-50%) scale(1);
56
+ }
57
+ }
58
+
59
+ &&-right {
60
+ left: calc(100% + 8px);
61
+ top: 50%;
62
+ transform-origin: left center;
63
+ transform: translateY(-50%) scale(0.9);
64
+
65
+ &.aura-popconfirm-visible {
66
+ transform: translateY(-50%) scale(1);
67
+ }
68
+ }
69
+ }
70
+
71
+ // ===== 气泡内容 =====
72
+ .aura-popconfirm-content {
73
+ padding: var(--aura-spacing-4);
74
+ border-radius: var(--aura-radius-md);
75
+ background: var(--aura-bg);
76
+ border: 1px solid var(--aura-border);
77
+ box-shadow: var(--aura-shadow-lg);
78
+ min-width: 240px;
79
+ }
80
+
81
+ .aura-popconfirm-title {
82
+ font-size: var(--aura-font-size-md);
83
+ font-weight: 600;
84
+ color: var(--aura-text);
85
+ line-height: 1.5;
86
+ }
87
+
88
+ .aura-popconfirm-description {
89
+ margin-top: var(--aura-spacing-2);
90
+ font-size: var(--aura-font-size-sm);
91
+ color: var(--aura-text-secondary);
92
+ line-height: 1.5;
93
+ }
94
+
95
+ // ===== 按钮行 =====
96
+ .aura-popconfirm-buttons {
97
+ display: flex;
98
+ justify-content: flex-end;
99
+ gap: var(--aura-spacing-2);
100
+ margin-top: var(--aura-spacing-3);
101
+ }
102
+
103
+ .aura-popconfirm-btn {
104
+ padding: 4px 12px;
105
+ font-size: var(--aura-font-size-sm);
106
+ font-family: inherit;
107
+ line-height: 1.5;
108
+ border-radius: var(--aura-radius-sm);
109
+ border: 1px solid var(--aura-border);
110
+ background: var(--aura-bg);
111
+ color: var(--aura-text);
112
+ cursor: pointer;
113
+ transition: all var(--aura-duration-normal) var(--aura-easing);
114
+
115
+ &:hover {
116
+ border-color: var(--aura-border-hover);
117
+ }
118
+
119
+ // 确认按钮 - primary
120
+ &&-primary {
121
+ background: var(--aura-primary-700);
122
+ border-color: var(--aura-primary-700);
123
+ color: var(--aura-text-inverse);
124
+
125
+ &:hover {
126
+ background: var(--aura-primary-600);
127
+ border-color: var(--aura-primary-600);
128
+ }
129
+ }
130
+
131
+ // 确认按钮 - warning
132
+ &&-warning {
133
+ background: var(--aura-warning);
134
+ border-color: var(--aura-warning);
135
+ color: var(--aura-text-inverse);
136
+
137
+ &:hover {
138
+ opacity: 0.85;
139
+ }
140
+ }
141
+
142
+ // 确认按钮 - error
143
+ &&-error {
144
+ background: var(--aura-error);
145
+ border-color: var(--aura-error);
146
+ color: var(--aura-text-inverse);
147
+
148
+ &:hover {
149
+ opacity: 0.85;
150
+ }
151
+ }
152
+ }
153
+
154
+ // ===== 箭头 =====
155
+ .aura-popconfirm-arrow {
156
+ position: absolute;
157
+ width: 8px;
158
+ height: 8px;
159
+ background: var(--aura-bg);
160
+ border: 1px solid var(--aura-border);
161
+ transform: rotate(45deg);
162
+
163
+ .aura-popconfirm-top & {
164
+ bottom: -5px;
165
+ left: 50%;
166
+ margin-left: -4px;
167
+ border-top: none;
168
+ border-left: none;
169
+ }
170
+
171
+ .aura-popconfirm-bottom & {
172
+ top: -5px;
173
+ left: 50%;
174
+ margin-left: -4px;
175
+ border-bottom: none;
176
+ border-right: none;
177
+ }
178
+
179
+ .aura-popconfirm-left & {
180
+ right: -5px;
181
+ top: 50%;
182
+ margin-top: -4px;
183
+ border-bottom: none;
184
+ border-left: none;
185
+ }
186
+
187
+ .aura-popconfirm-right & {
188
+ left: -5px;
189
+ top: 50%;
190
+ margin-top: -4px;
191
+ border-top: none;
192
+ border-right: none;
193
+ }
194
+ }
195
+
196
+ // ===== 暗色模式 =====
197
+ [data-theme='dark'] {
198
+ .aura-popconfirm-content {
199
+ background: var(--aura-gray-800);
200
+ border-color: var(--aura-gray-700);
201
+ }
202
+
203
+ .aura-popconfirm-title {
204
+ color: var(--aura-gray-100);
205
+ }
206
+
207
+ .aura-popconfirm-description {
208
+ color: var(--aura-gray-400);
209
+ }
210
+
211
+ .aura-popconfirm-arrow {
212
+ background: var(--aura-gray-800);
213
+ border-color: var(--aura-gray-700);
214
+ }
215
+
216
+ .aura-popconfirm-btn {
217
+ background: var(--aura-gray-700);
218
+ border-color: var(--aura-gray-600);
219
+ color: var(--aura-gray-100);
220
+
221
+ &:hover {
222
+ border-color: var(--aura-gray-500);
223
+ }
224
+
225
+ &-cancel {
226
+ background: var(--aura-gray-700);
227
+ }
228
+ }
229
+ }
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ /** 尺寸
4
+ * @default 'md'
5
+ */
6
+ size?: 'sm' | 'md' | 'lg';
7
+ }
8
+ export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
9
+ export interface RadioGroupProps {
10
+ /** 当前值(受控) */
11
+ value?: string | number;
12
+ /** 默认值(非受控) */
13
+ defaultValue?: string | number;
14
+ /** 选项列表 */
15
+ options: Array<{
16
+ label: React.ReactNode;
17
+ value: string | number;
18
+ disabled?: boolean;
19
+ }>;
20
+ /** 值变化回调 */
21
+ onChange?: (value: string | number) => void;
22
+ /** 排列方向
23
+ * @default 'horizontal'
24
+ */
25
+ direction?: 'horizontal' | 'vertical';
26
+ /** 是否禁用整组 */
27
+ disabled?: boolean;
28
+ /** 尺寸 */
29
+ size?: 'sm' | 'md' | 'lg';
30
+ /** 自定义类名 */
31
+ className?: string;
32
+ }
33
+ export declare const RadioGroup: React.FC<RadioGroupProps>;