@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,191 @@
1
+ .aura-btn {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: var(--aura-spacing-2);
6
+ padding: 8px 16px;
7
+ font-size: var(--aura-font-size-md);
8
+ font-family: inherit;
9
+ line-height: 1.5;
10
+ border: 1px solid var(--aura-border);
11
+ border-radius: var(--aura-radius-md);
12
+ background: var(--aura-bg);
13
+ color: var(--aura-text);
14
+ cursor: pointer;
15
+ transition: all var(--aura-duration-normal) var(--aura-easing);
16
+ user-select: none;
17
+ white-space: nowrap;
18
+ // 链接按钮(<a>)去除默认下划线
19
+ text-decoration: none;
20
+
21
+ &:hover {
22
+ border-color: var(--aura-primary-700);
23
+ color: var(--aura-primary-700);
24
+ transform: translateY(-1px);
25
+ box-shadow: var(--aura-shadow-sm);
26
+ }
27
+
28
+ &:active {
29
+ transform: translateY(0);
30
+ box-shadow: none;
31
+ }
32
+
33
+ &:focus-visible {
34
+ outline: none;
35
+ box-shadow: 0 0 0 2px var(--aura-primary-200);
36
+ }
37
+
38
+ &:disabled {
39
+ opacity: 0.5;
40
+ cursor: not-allowed;
41
+ transform: none;
42
+ box-shadow: none;
43
+ }
44
+
45
+ // 链接按钮的禁用态(<a> 没有 disabled 属性)
46
+ &&-disabled {
47
+ opacity: 0.5;
48
+ cursor: not-allowed;
49
+
50
+ &:hover {
51
+ transform: none;
52
+ box-shadow: none;
53
+ border-color: var(--aura-border);
54
+ color: var(--aura-text);
55
+ }
56
+ }
57
+
58
+ // 撑满容器
59
+ &&-block {
60
+ display: flex;
61
+ width: 100%;
62
+ }
63
+
64
+ // Variants
65
+ &&-primary {
66
+ background: var(--aura-primary-700);
67
+ border-color: var(--aura-primary-700);
68
+ color: var(--aura-text-inverse);
69
+
70
+ &:hover {
71
+ background: var(--aura-primary-600);
72
+ border-color: var(--aura-primary-600);
73
+ color: var(--aura-text-inverse);
74
+ transform: translateY(-1px);
75
+ box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
76
+ }
77
+
78
+ &:active {
79
+ transform: translateY(0);
80
+ box-shadow: 0 1px 4px rgba(124, 58, 237, 0.2);
81
+ }
82
+
83
+ &:focus-visible {
84
+ box-shadow: 0 0 0 2px var(--aura-primary-200);
85
+ }
86
+ }
87
+
88
+ &&-dashed {
89
+ border-style: dashed;
90
+ }
91
+
92
+ &&-text {
93
+ border: none;
94
+ background: transparent;
95
+
96
+ &:hover {
97
+ background: var(--aura-bg-secondary);
98
+ transform: none;
99
+ box-shadow: none;
100
+ }
101
+ }
102
+
103
+ &&-link {
104
+ border: none;
105
+ background: transparent;
106
+ color: var(--aura-primary-700);
107
+
108
+ &:hover {
109
+ color: var(--aura-primary-600);
110
+ transform: none;
111
+ box-shadow: none;
112
+ }
113
+ }
114
+
115
+ // Sizes
116
+ &&-sm {
117
+ padding: 4px 12px;
118
+ font-size: var(--aura-font-size-sm);
119
+ border-radius: var(--aura-radius-sm);
120
+ }
121
+
122
+ &&-lg {
123
+ padding: 10px 24px;
124
+ font-size: var(--aura-font-size-lg);
125
+ border-radius: var(--aura-radius-lg);
126
+ }
127
+
128
+ // Loading
129
+ &-loading {
130
+ opacity: 0.65;
131
+ cursor: not-allowed;
132
+
133
+ &:hover {
134
+ transform: none;
135
+ box-shadow: none;
136
+ }
137
+ }
138
+
139
+ &-loading-icon {
140
+ display: inline-block;
141
+ width: 14px;
142
+ height: 14px;
143
+ border: 2px solid currentColor;
144
+ border-right-color: transparent;
145
+ border-radius: 50%;
146
+ animation: aura-spin 0.6s linear infinite;
147
+ }
148
+ }
149
+
150
+ @keyframes aura-spin {
151
+ from {
152
+ transform: rotate(0deg);
153
+ }
154
+ to {
155
+ transform: rotate(360deg);
156
+ }
157
+ }
158
+
159
+ @keyframes aura-fade-in {
160
+ from {
161
+ opacity: 0;
162
+ transform: translateY(-4px);
163
+ }
164
+ to {
165
+ opacity: 1;
166
+ transform: translateY(0);
167
+ }
168
+ }
169
+
170
+ // Dark mode glow
171
+ [data-theme='dark'] {
172
+ .aura-btn {
173
+ &:focus-visible {
174
+ box-shadow:
175
+ 0 0 0 2px rgba(124, 58, 237, 0.2),
176
+ 0 0 20px rgba(124, 58, 237, 0.15);
177
+ }
178
+
179
+ &:hover {
180
+ box-shadow: 0 0 15px rgba(124, 58, 237, 0.15);
181
+ }
182
+
183
+ &-primary {
184
+ &:hover {
185
+ box-shadow:
186
+ 0 0 20px rgba(124, 58, 237, 0.3),
187
+ 0 4px 12px rgba(124, 58, 237, 0.2);
188
+ }
189
+ }
190
+ }
191
+ }
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ export interface CardProps {
3
+ /** 卡片变体
4
+ * @default 'default'
5
+ */
6
+ variant?: 'default' | 'elevated' | 'outlined' | 'glass';
7
+ /** 卡片尺寸
8
+ * @default 'md'
9
+ */
10
+ size?: 'sm' | 'md' | 'lg';
11
+ /** 是否可悬浮上浮 */
12
+ hoverable?: boolean;
13
+ /** 是否显示骨架屏加载状态 */
14
+ loading?: boolean;
15
+ /** 自定义类名 */
16
+ className?: string;
17
+ /** 自定义样式 */
18
+ style?: React.CSSProperties;
19
+ /** 卡片内容 */
20
+ children?: React.ReactNode;
21
+ }
22
+ export interface CardHeaderProps {
23
+ className?: string;
24
+ style?: React.CSSProperties;
25
+ children?: React.ReactNode;
26
+ }
27
+ declare const Header: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLDivElement>>;
28
+ export interface CardTitleProps {
29
+ className?: string;
30
+ style?: React.CSSProperties;
31
+ children?: React.ReactNode;
32
+ }
33
+ declare const Title: React.ForwardRefExoticComponent<CardTitleProps & React.RefAttributes<HTMLDivElement>>;
34
+ export interface CardBodyProps {
35
+ className?: string;
36
+ style?: React.CSSProperties;
37
+ children?: React.ReactNode;
38
+ }
39
+ declare const Body: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
40
+ export interface CardActionsProps {
41
+ className?: string;
42
+ style?: React.CSSProperties;
43
+ children?: React.ReactNode;
44
+ }
45
+ declare const Actions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
46
+ export interface CardFooterProps {
47
+ className?: string;
48
+ style?: React.CSSProperties;
49
+ children?: React.ReactNode;
50
+ }
51
+ declare const Footer: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
52
+ export interface CardCoverProps {
53
+ className?: string;
54
+ style?: React.CSSProperties;
55
+ children?: React.ReactNode;
56
+ }
57
+ declare const Cover: React.ForwardRefExoticComponent<CardCoverProps & React.RefAttributes<HTMLDivElement>>;
58
+ interface CardComponent extends React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>> {
59
+ Header: typeof Header;
60
+ Title: typeof Title;
61
+ Body: typeof Body;
62
+ Actions: typeof Actions;
63
+ Footer: typeof Footer;
64
+ Cover: typeof Cover;
65
+ }
66
+ declare const Card: CardComponent;
67
+ export { Card };
@@ -0,0 +1,156 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { classNames, prefixCls } from '@aura-react-comp/shared';
3
+ import "./index.less";
4
+
5
+ /* ===== CardProps ===== */
6
+
7
+ /* ===== Card.Header ===== */
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ const Header = /*#__PURE__*/forwardRef(({
11
+ className,
12
+ style,
13
+ children
14
+ }, ref) => {
15
+ const cls = classNames(prefixCls('card-header'), className);
16
+ return /*#__PURE__*/_jsx("div", {
17
+ ref: ref,
18
+ className: cls,
19
+ style: style,
20
+ children: children
21
+ });
22
+ });
23
+ Header.displayName = 'Card.Header';
24
+
25
+ /* ===== Card.Title ===== */
26
+
27
+ const Title = /*#__PURE__*/forwardRef(({
28
+ className,
29
+ style,
30
+ children
31
+ }, ref) => {
32
+ const cls = classNames(prefixCls('card-title'), className);
33
+ return /*#__PURE__*/_jsx("div", {
34
+ ref: ref,
35
+ className: cls,
36
+ style: style,
37
+ children: children
38
+ });
39
+ });
40
+ Title.displayName = 'Card.Title';
41
+
42
+ /* ===== Card.Body ===== */
43
+
44
+ const Body = /*#__PURE__*/forwardRef(({
45
+ className,
46
+ style,
47
+ children
48
+ }, ref) => {
49
+ const cls = classNames(prefixCls('card-body'), className);
50
+ return /*#__PURE__*/_jsx("div", {
51
+ ref: ref,
52
+ className: cls,
53
+ style: style,
54
+ children: children
55
+ });
56
+ });
57
+ Body.displayName = 'Card.Body';
58
+
59
+ /* ===== Card.Actions ===== */
60
+
61
+ const Actions = /*#__PURE__*/forwardRef(({
62
+ className,
63
+ style,
64
+ children
65
+ }, ref) => {
66
+ const cls = classNames(prefixCls('card-actions'), className);
67
+ return /*#__PURE__*/_jsx("div", {
68
+ ref: ref,
69
+ className: cls,
70
+ style: style,
71
+ children: children
72
+ });
73
+ });
74
+ Actions.displayName = 'Card.Actions';
75
+
76
+ /* ===== Card.Footer ===== */
77
+
78
+ const Footer = /*#__PURE__*/forwardRef(({
79
+ className,
80
+ style,
81
+ children
82
+ }, ref) => {
83
+ const cls = classNames(prefixCls('card-footer'), className);
84
+ return /*#__PURE__*/_jsx("div", {
85
+ ref: ref,
86
+ className: cls,
87
+ style: style,
88
+ children: children
89
+ });
90
+ });
91
+ Footer.displayName = 'Card.Footer';
92
+
93
+ /* ===== Card.Cover ===== */
94
+
95
+ const Cover = /*#__PURE__*/forwardRef(({
96
+ className,
97
+ style,
98
+ children
99
+ }, ref) => {
100
+ const cls = classNames(prefixCls('card-cover'), className);
101
+ return /*#__PURE__*/_jsx("div", {
102
+ ref: ref,
103
+ className: cls,
104
+ style: style,
105
+ children: children
106
+ });
107
+ });
108
+ Cover.displayName = 'Card.Cover';
109
+
110
+ /* ===== Card(主组件) ===== */
111
+
112
+ const CardBase = /*#__PURE__*/forwardRef(({
113
+ variant = 'default',
114
+ size = 'md',
115
+ hoverable = false,
116
+ loading = false,
117
+ className,
118
+ style,
119
+ children
120
+ }, ref) => {
121
+ const cls = classNames(prefixCls('card'), variant !== 'default' && prefixCls(`card-${variant}`), prefixCls(`card-${size}`), hoverable && prefixCls('card-hoverable'), className);
122
+ return /*#__PURE__*/_jsx("div", {
123
+ ref: ref,
124
+ className: cls,
125
+ style: style,
126
+ children: loading ? /*#__PURE__*/_jsxs("div", {
127
+ className: prefixCls('card-skeleton'),
128
+ children: [/*#__PURE__*/_jsxs("div", {
129
+ className: prefixCls('card-skeleton-header'),
130
+ children: [/*#__PURE__*/_jsx("div", {
131
+ className: prefixCls('card-skeleton-avatar')
132
+ }), /*#__PURE__*/_jsx("div", {
133
+ className: prefixCls('card-skeleton-title')
134
+ })]
135
+ }), /*#__PURE__*/_jsx("div", {
136
+ className: prefixCls('card-skeleton-row')
137
+ }), /*#__PURE__*/_jsx("div", {
138
+ className: prefixCls('card-skeleton-row')
139
+ }), /*#__PURE__*/_jsx("div", {
140
+ className: classNames(prefixCls('card-skeleton-row'), prefixCls('card-skeleton-row-short'))
141
+ })]
142
+ }) : children
143
+ });
144
+ });
145
+ CardBase.displayName = 'Card';
146
+
147
+ /* ===== 复合组件导出 ===== */
148
+
149
+ const Card = CardBase;
150
+ Card.Header = Header;
151
+ Card.Title = Title;
152
+ Card.Body = Body;
153
+ Card.Actions = Actions;
154
+ Card.Footer = Footer;
155
+ Card.Cover = Cover;
156
+ export { Card };
@@ -0,0 +1,231 @@
1
+ /* ===== Card 组件样式 ===== */
2
+
3
+ .aura-card {
4
+ position: relative;
5
+ border: 1px solid var(--aura-border);
6
+ border-radius: var(--aura-radius-lg);
7
+ background: var(--aura-bg);
8
+ color: var(--aura-text);
9
+ overflow: hidden;
10
+ transition:
11
+ transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
12
+ box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
13
+ border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
14
+
15
+ // ===== 尺寸 =====
16
+ &&-sm {
17
+ .aura-card-header {
18
+ padding: 8px 12px;
19
+ }
20
+ .aura-card-body {
21
+ padding: 8px 12px;
22
+ }
23
+ .aura-card-footer {
24
+ padding: 6px 12px;
25
+ }
26
+ }
27
+
28
+ &&-md {
29
+ .aura-card-header {
30
+ padding: 14px 16px;
31
+ }
32
+ .aura-card-body {
33
+ padding: 14px 16px;
34
+ }
35
+ .aura-card-footer {
36
+ padding: 10px 16px;
37
+ }
38
+ }
39
+
40
+ &&-lg {
41
+ .aura-card-header {
42
+ padding: 18px 24px;
43
+ }
44
+ .aura-card-body {
45
+ padding: 18px 24px;
46
+ }
47
+ .aura-card-footer {
48
+ padding: 14px 24px;
49
+ }
50
+ }
51
+
52
+ // ===== 变体 =====
53
+
54
+ // elevated:阴影 + 无边框
55
+ &&-elevated {
56
+ border-color: transparent;
57
+ box-shadow: var(--aura-shadow-md);
58
+ }
59
+
60
+ // outlined:加粗边框
61
+ &&-outlined {
62
+ border: 2px solid var(--aura-border);
63
+ }
64
+
65
+ // glass:毛玻璃效果
66
+ &&-glass {
67
+ background: rgba(255, 255, 255, 0.6);
68
+ backdrop-filter: blur(12px);
69
+ -webkit-backdrop-filter: blur(12px);
70
+ border: 1px solid rgba(255, 255, 255, 0.2);
71
+ }
72
+
73
+ // ===== Hoverable =====
74
+ &&-hoverable {
75
+ cursor: pointer;
76
+
77
+ &:hover {
78
+ transform: translateY(-4px);
79
+ box-shadow: var(--aura-shadow-lg);
80
+ border-color: var(--aura-primary-200);
81
+ }
82
+
83
+ &:active {
84
+ transform: translateY(-2px);
85
+ transition-duration: 0.1s;
86
+ }
87
+ }
88
+ }
89
+
90
+ // ===== Header =====
91
+ .aura-card-header {
92
+ display: flex;
93
+ align-items: center;
94
+ border-bottom: 1px solid var(--aura-border);
95
+ }
96
+
97
+ // ===== Title =====
98
+ .aura-card-title {
99
+ font-size: var(--aura-font-size-lg);
100
+ font-weight: 600;
101
+ color: var(--aura-text);
102
+ line-height: 1.5;
103
+ }
104
+
105
+ // ===== Body =====
106
+ .aura-card-body {
107
+ font-size: var(--aura-font-size-md);
108
+ line-height: 1.6;
109
+ color: var(--aura-text-secondary);
110
+ }
111
+
112
+ // ===== Actions =====
113
+ .aura-card-actions {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: var(--aura-spacing-2);
117
+ padding: 10px 16px;
118
+ border-top: 1px solid var(--aura-border);
119
+ }
120
+
121
+ // ===== Footer =====
122
+ .aura-card-footer {
123
+ border-top: 1px solid var(--aura-border);
124
+ color: var(--aura-text-tertiary);
125
+ font-size: var(--aura-font-size-sm);
126
+ }
127
+
128
+ // ===== Cover =====
129
+ .aura-card-cover {
130
+ overflow: hidden;
131
+
132
+ > img {
133
+ display: block;
134
+ width: 100%;
135
+ height: auto;
136
+ object-fit: cover;
137
+ transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
138
+ }
139
+
140
+ .aura-card-hoverable:hover > & > img {
141
+ transform: scale(1.05);
142
+ }
143
+ }
144
+
145
+ // ===== 骨架屏 =====
146
+ .aura-card-skeleton {
147
+ padding: var(--aura-spacing-4);
148
+ }
149
+
150
+ .aura-card-skeleton-header {
151
+ display: flex;
152
+ align-items: center;
153
+ gap: var(--aura-spacing-3);
154
+ margin-bottom: var(--aura-spacing-4);
155
+ }
156
+
157
+ .aura-card-skeleton-avatar {
158
+ width: 40px;
159
+ height: 40px;
160
+ border-radius: 50%;
161
+ background: linear-gradient(
162
+ 90deg,
163
+ var(--aura-bg-tertiary) 25%,
164
+ var(--aura-bg-secondary) 50%,
165
+ var(--aura-bg-tertiary) 75%
166
+ );
167
+ background-size: 200% 100%;
168
+ animation: aura-skeleton-loading 1.5s ease-in-out infinite;
169
+ }
170
+
171
+ .aura-card-skeleton-title {
172
+ flex: 1;
173
+ height: 16px;
174
+ border-radius: var(--aura-radius-sm);
175
+ background: linear-gradient(
176
+ 90deg,
177
+ var(--aura-bg-tertiary) 25%,
178
+ var(--aura-bg-secondary) 50%,
179
+ var(--aura-bg-tertiary) 75%
180
+ );
181
+ background-size: 200% 100%;
182
+ animation: aura-skeleton-loading 1.5s ease-in-out infinite;
183
+ }
184
+
185
+ .aura-card-skeleton-row {
186
+ height: 12px;
187
+ margin-bottom: var(--aura-spacing-2);
188
+ border-radius: var(--aura-radius-sm);
189
+ background: linear-gradient(
190
+ 90deg,
191
+ var(--aura-bg-tertiary) 25%,
192
+ var(--aura-bg-secondary) 50%,
193
+ var(--aura-bg-tertiary) 75%
194
+ );
195
+ background-size: 200% 100%;
196
+ animation: aura-skeleton-loading 1.5s ease-in-out infinite;
197
+
198
+ &&-short {
199
+ width: 60%;
200
+ }
201
+ }
202
+
203
+ @keyframes aura-skeleton-loading {
204
+ 0% {
205
+ background-position: 200% 0;
206
+ }
207
+ 100% {
208
+ background-position: -200% 0;
209
+ }
210
+ }
211
+
212
+ // ===== 暗色模式 =====
213
+ [data-theme='dark'] {
214
+ .aura-card {
215
+ border-color: var(--aura-border);
216
+ }
217
+
218
+ .aura-card-elevated {
219
+ border-color: transparent;
220
+ }
221
+
222
+ .aura-card-glass {
223
+ background: rgba(15, 12, 41, 0.6);
224
+ border-color: rgba(139, 92, 246, 0.15);
225
+ }
226
+
227
+ .aura-card-hoverable:hover {
228
+ border-color: var(--aura-primary-500);
229
+ box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
230
+ }
231
+ }
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ /** 尺寸
4
+ * @default 'md'
5
+ */
6
+ size?: 'sm' | 'md' | 'lg';
7
+ /** 半选状态(不确定状态) */
8
+ indeterminate?: boolean;
9
+ }
10
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
11
+ export interface CheckboxGroupProps {
12
+ /** 当前值(受控) */
13
+ value?: (string | number)[];
14
+ /** 默认值(非受控) */
15
+ defaultValue?: (string | number)[];
16
+ /** 选项列表 */
17
+ options: Array<{
18
+ label: React.ReactNode;
19
+ value: string | number;
20
+ disabled?: boolean;
21
+ }>;
22
+ /** 值变化回调 */
23
+ onChange?: (value: (string | number)[]) => void;
24
+ /** 排列方向
25
+ * @default 'horizontal'
26
+ */
27
+ direction?: 'horizontal' | 'vertical';
28
+ /** 是否禁用整组 */
29
+ disabled?: boolean;
30
+ /** 尺寸 */
31
+ size?: 'sm' | 'md' | 'lg';
32
+ /** 自定义类名 */
33
+ className?: string;
34
+ }
35
+ export declare const CheckboxGroup: React.FC<CheckboxGroupProps>;