@zhang_jifan/fanui 2.1.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.
Files changed (127) hide show
  1. package/ACCESSIBILITY.md +61 -0
  2. package/CHANGELOG.md +112 -0
  3. package/COMMERCIAL-LICENSE.md +71 -0
  4. package/DESIGN-SYSTEM.md +294 -0
  5. package/LICENSE +661 -0
  6. package/README.md +348 -0
  7. package/USAGE.md +1926 -0
  8. package/_index.scss +20 -0
  9. package/dist/fanui.cjs +15 -0
  10. package/dist/fanui.css +28209 -0
  11. package/dist/fanui.d.ts +353 -0
  12. package/dist/fanui.esm.js +71 -0
  13. package/dist/fanui.js +4782 -0
  14. package/dist/fanui.min.css +1 -0
  15. package/dist/fanui.mjs +71 -0
  16. package/dist/modules/fanui-advanced.css +830 -0
  17. package/dist/modules/fanui-advanced.min.css +129 -0
  18. package/dist/modules/fanui-alert.css +575 -0
  19. package/dist/modules/fanui-alert.min.css +122 -0
  20. package/dist/modules/fanui-badge.css +426 -0
  21. package/dist/modules/fanui-badge.min.css +77 -0
  22. package/dist/modules/fanui-base.css +1394 -0
  23. package/dist/modules/fanui-base.min.css +236 -0
  24. package/dist/modules/fanui-blog.css +762 -0
  25. package/dist/modules/fanui-blog.min.css +108 -0
  26. package/dist/modules/fanui-button.css +526 -0
  27. package/dist/modules/fanui-button.min.css +56 -0
  28. package/dist/modules/fanui-card.css +291 -0
  29. package/dist/modules/fanui-card.min.css +52 -0
  30. package/dist/modules/fanui-choice.css +539 -0
  31. package/dist/modules/fanui-choice.min.css +83 -0
  32. package/dist/modules/fanui-dashboard.css +1057 -0
  33. package/dist/modules/fanui-dashboard.min.css +160 -0
  34. package/dist/modules/fanui-data.css +687 -0
  35. package/dist/modules/fanui-data.min.css +125 -0
  36. package/dist/modules/fanui-feedback.css +432 -0
  37. package/dist/modules/fanui-feedback.min.css +79 -0
  38. package/dist/modules/fanui-form.css +779 -0
  39. package/dist/modules/fanui-form.min.css +123 -0
  40. package/dist/modules/fanui-glass.css +497 -0
  41. package/dist/modules/fanui-glass.min.css +46 -0
  42. package/dist/modules/fanui-input-plus.css +799 -0
  43. package/dist/modules/fanui-input-plus.min.css +124 -0
  44. package/dist/modules/fanui-interactive.css +960 -0
  45. package/dist/modules/fanui-interactive.min.css +138 -0
  46. package/dist/modules/fanui-layout.css +4399 -0
  47. package/dist/modules/fanui-layout.min.css +1172 -0
  48. package/dist/modules/fanui-marketing.css +1125 -0
  49. package/dist/modules/fanui-marketing.min.css +144 -0
  50. package/dist/modules/fanui-nav.css +458 -0
  51. package/dist/modules/fanui-nav.min.css +76 -0
  52. package/dist/modules/fanui-overlay.css +547 -0
  53. package/dist/modules/fanui-overlay.min.css +91 -0
  54. package/dist/modules/fanui-table.css +290 -0
  55. package/dist/modules/fanui-table.min.css +62 -0
  56. package/dist/modules/fanui-tabs.css +333 -0
  57. package/dist/modules/fanui-tabs.min.css +58 -0
  58. package/dist/modules/fanui-themes.css +2728 -0
  59. package/dist/modules/fanui-themes.min.css +40 -0
  60. package/dist/modules/fanui-tokens.css +587 -0
  61. package/dist/modules/fanui-tokens.min.css +3 -0
  62. package/dist/modules/fanui-utilities.css +6557 -0
  63. package/dist/modules/fanui-utilities.min.css +1762 -0
  64. package/dist/modules/sizes.json +103 -0
  65. package/docs/MIGRATION-v2.md +179 -0
  66. package/examples/01-script-tag.html +149 -0
  67. package/examples/02-react/README.md +39 -0
  68. package/examples/02-react/index.html +12 -0
  69. package/examples/02-react/package.json +20 -0
  70. package/examples/02-react/src/App.jsx +108 -0
  71. package/examples/02-react/src/main.jsx +13 -0
  72. package/examples/02-react/src/useFanUI.js +87 -0
  73. package/examples/02-react/vite.config.js +6 -0
  74. package/examples/03-vue3/README.md +67 -0
  75. package/examples/03-vue3/index.html +12 -0
  76. package/examples/03-vue3/package.json +19 -0
  77. package/examples/03-vue3/src/App.vue +93 -0
  78. package/examples/03-vue3/src/main.js +8 -0
  79. package/examples/03-vue3/src/useFanUI.js +85 -0
  80. package/examples/03-vue3/vite.config.js +6 -0
  81. package/examples/04-vue2-cdn.html +93 -0
  82. package/examples/README.md +34 -0
  83. package/package.json +127 -0
  84. package/src/_functions.scss +319 -0
  85. package/src/_mixins.scss +1202 -0
  86. package/src/_tokens.scss +180 -0
  87. package/src/_variables.scss +491 -0
  88. package/src/base/_animations.scss +210 -0
  89. package/src/base/_reset.scss +359 -0
  90. package/src/base/_rtl.scss +133 -0
  91. package/src/base/_typography.scss +353 -0
  92. package/src/components/_advanced.scss +763 -0
  93. package/src/components/_alert.scss +322 -0
  94. package/src/components/_badge.scss +279 -0
  95. package/src/components/_blog.scss +693 -0
  96. package/src/components/_button.scss +351 -0
  97. package/src/components/_capabilities.scss +463 -0
  98. package/src/components/_card.scss +281 -0
  99. package/src/components/_choice.scss +444 -0
  100. package/src/components/_dashboard.scss +950 -0
  101. package/src/components/_data.scss +618 -0
  102. package/src/components/_feedback.scss +403 -0
  103. package/src/components/_form.scss +408 -0
  104. package/src/components/_glass.scss +374 -0
  105. package/src/components/_input-plus.scss +730 -0
  106. package/src/components/_interactive.scss +885 -0
  107. package/src/components/_marketing.scss +982 -0
  108. package/src/components/_nav.scss +480 -0
  109. package/src/components/_overlay.scss +517 -0
  110. package/src/components/_table.scss +276 -0
  111. package/src/components/_tabs.scss +338 -0
  112. package/src/fanui.d.ts +353 -0
  113. package/src/fanui.js +4782 -0
  114. package/src/fanui.scss +79 -0
  115. package/src/glass/_switches.scss +36 -0
  116. package/src/glass/_tokens.scss +259 -0
  117. package/src/layout/_container.scss +111 -0
  118. package/src/layout/_flex.scss +164 -0
  119. package/src/layout/_grid.scss +180 -0
  120. package/src/themes/_accents.scss +201 -0
  121. package/src/themes/_palettes.scss +180 -0
  122. package/src/utilities/_borders.scss +104 -0
  123. package/src/utilities/_display.scss +145 -0
  124. package/src/utilities/_effects.scss +210 -0
  125. package/src/utilities/_sizing.scss +123 -0
  126. package/src/utilities/_spacing.scss +118 -0
  127. package/src/utilities/_texture.scss +323 -0
@@ -0,0 +1,276 @@
1
+ // =============================================================================
2
+ // fanUI · 表格 Table
3
+ // -----------------------------------------------------------------------------
4
+ // 结构:
5
+ // <div class="fanui-table-wrap">
6
+ // <table class="fanui-table fanui-table--striped fanui-table--hover">
7
+ // <thead><tr><th>…</th></tr></thead>
8
+ // <tbody><tr><td>…</td></tr></tbody>
9
+ // </table>
10
+ // </div>
11
+ // 变体:--bordered --borderless --striped --hover --compact --roomy
12
+ // --fixed --sticky-head --sticky-col --align-top/--align-middle
13
+ // --primary/success/... (表头着色)
14
+ // 工具:.fanui-table-scroll-x / .fanui-table-caption / .fanui-table__actions
15
+ // =============================================================================
16
+
17
+ @use "sass:map";
18
+ @use "../functions" as fn;
19
+ @use "../variables" as v;
20
+ @use "../mixins" as mx;
21
+
22
+ .fanui-table-wrap {
23
+ position: relative;
24
+ width: 100%;
25
+ overflow-x: auto;
26
+ -webkit-overflow-scrolling: touch;
27
+ border: 1px solid fn.fanui-var("color-border");
28
+ border-radius: fn.fanui-var("radius-lg");
29
+ background-color: fn.fanui-var("color-surface");
30
+ @include mx.fanui-scrollbar(10px);
31
+
32
+ // 无边框包裹(表格自带边框时使用)
33
+ &--plain {
34
+ border: 0;
35
+ border-radius: 0;
36
+ background: transparent;
37
+ }
38
+
39
+ &--flush { border-radius: 0; }
40
+ }
41
+
42
+ .fanui-table {
43
+ --fanui-table-bg: transparent;
44
+ --fanui-table-striped-bg: #{fn.fanui-var("color-surface-sunken")};
45
+ --fanui-table-hover-bg: #{fn.fanui-var("color-hover")};
46
+ --fanui-table-border-color: #{fn.fanui-var("color-border")};
47
+ --fanui-table-caption-color: #{fn.fanui-var("color-text-muted")};
48
+ --fanui-table-head-bg: #{fn.fanui-var("color-surface-sunken")};
49
+ --fanui-table-cell-py: #{v.$fanui-table-cell-padding-y};
50
+ --fanui-table-cell-px: #{v.$fanui-table-cell-padding-x};
51
+
52
+ width: 100%;
53
+ margin-bottom: 0;
54
+ color: fn.fanui-var("color-text");
55
+ font-size: fn.fanui-var("font-size-base");
56
+ line-height: 1.5;
57
+ vertical-align: top;
58
+ border-collapse: separate;
59
+ border-spacing: 0;
60
+ background-color: var(--fanui-table-bg);
61
+
62
+ // ---- 表头 ----
63
+ > thead {
64
+ background-color: var(--fanui-table-head-bg);
65
+
66
+ th {
67
+ font-weight: 600;
68
+ color: fn.fanui-var("color-text-strong");
69
+ white-space: nowrap;
70
+ text-align: start;
71
+ border-bottom: 1px solid var(--fanui-table-border-color);
72
+ }
73
+ }
74
+
75
+ // ---- 单元格 ----
76
+ th,
77
+ td {
78
+ padding: var(--fanui-table-cell-py) var(--fanui-table-cell-px);
79
+ border-bottom: 1px solid var(--fanui-table-border-color);
80
+ box-sizing: border-box;
81
+ }
82
+
83
+ > tbody {
84
+ tr:last-child > td { border-bottom: 0; }
85
+ }
86
+
87
+ // ---- 表标题 ----
88
+ caption {
89
+ padding: fn.fanui-var("space-3") var(--fanui-table-cell-px);
90
+ font-size: fn.fanui-var("font-size-sm");
91
+ color: var(--fanui-table-caption-color);
92
+ text-align: start;
93
+ caption-side: bottom;
94
+ }
95
+
96
+ // ---- 行内交互 ----
97
+ a { color: fn.fanui-var("primary"); }
98
+
99
+ // 单元格内的按钮/标签不换行错位
100
+ .fanui-btn { vertical-align: middle; }
101
+ }
102
+
103
+ // -----------------------------------------------------------------------------
104
+ // 1. 变体
105
+ // -----------------------------------------------------------------------------
106
+
107
+ .fanui-table--bordered {
108
+ > thead th,
109
+ > tbody td,
110
+ > tfoot td {
111
+ border: 1px solid var(--fanui-table-border-color);
112
+ }
113
+
114
+ > thead th { border-bottom-width: 1px; }
115
+ }
116
+
117
+ .fanui-table--borderless {
118
+ --fanui-table-border-color: transparent;
119
+
120
+ > thead th { border-bottom-width: 0; }
121
+ }
122
+
123
+ .fanui-table--striped {
124
+ > tbody > tr:nth-of-type(odd) > td {
125
+ background-color: var(--fanui-table-striped-bg);
126
+ }
127
+ }
128
+
129
+ .fanui-table--hover {
130
+ > tbody > tr {
131
+ @include mx.fanui-transition(background-color, v.$fanui-duration-fast);
132
+
133
+ &:hover > td,
134
+ &:hover > th {
135
+ background-color: var(--fanui-table-hover-bg);
136
+ }
137
+ }
138
+ }
139
+
140
+ .fanui-table--compact {
141
+ --fanui-table-cell-py: 6px;
142
+ --fanui-table-cell-px: 10px;
143
+ font-size: fn.fanui-var("font-size-sm");
144
+ }
145
+
146
+ .fanui-table--roomy {
147
+ --fanui-table-cell-py: 16px;
148
+ --fanui-table-cell-px: 20px;
149
+ font-size: fn.fanui-var("font-size-md");
150
+ }
151
+
152
+ .fanui-table--fixed {
153
+ table-layout: fixed;
154
+ word-break: break-word;
155
+ }
156
+
157
+ .fanui-table--align-middle {
158
+ th, td { vertical-align: middle; }
159
+ }
160
+
161
+ .fanui-table--align-top {
162
+ th, td { vertical-align: top; }
163
+ }
164
+
165
+ .fanui-table--align-center {
166
+ th, td { text-align: center; }
167
+ th:first-child, td:first-child { text-align: start; }
168
+ }
169
+
170
+ .fanui-table--sticky-head {
171
+ > thead th {
172
+ position: sticky;
173
+ top: 0;
174
+ z-index: 2;
175
+ background-color: var(--fanui-table-head-bg);
176
+ box-shadow: inset 0 -1px 0 var(--fanui-table-border-color);
177
+ }
178
+ }
179
+
180
+ .fanui-table--sticky-col {
181
+ > thead th:first-child,
182
+ > tbody td:first-child {
183
+ position: sticky;
184
+ left: 0;
185
+ z-index: 3;
186
+ background-color: fn.fanui-var("color-surface");
187
+ box-shadow: inset -1px 0 0 var(--fanui-table-border-color);
188
+ }
189
+
190
+ > thead th:first-child { z-index: 4; background-color: var(--fanui-table-head-bg); }
191
+ }
192
+
193
+ // 表头着色
194
+ @each $name, $color in v.$fanui-theme-colors {
195
+ .fanui-table--#{$name} {
196
+ --fanui-table-head-bg: #{fn.fanui-alpha($color, 0.10)};
197
+
198
+ // C1:表头文字压在「同色系半透明底」上,直接用 --#{$name} 只有 4.27:1。
199
+ // 浅色模式统一压深一档;暗色模式改读该模式下最亮的 -ink 档。
200
+ > thead th { color: #{fn.fanui-shade($color, 22%)}; }
201
+
202
+ [data-fanui-theme="dark"] & {
203
+ > thead th { color: #{fn.fanui-var("#{$name}-ink", fn.fanui-tint($color, 32%))}; }
204
+ }
205
+ }
206
+ }
207
+
208
+ .fanui-table--selected-row,
209
+ .fanui-table > tbody > tr.is-selected > td {
210
+ background-color: fn.fanui-var("primary-soft") !important;
211
+ }
212
+
213
+ // -----------------------------------------------------------------------------
214
+ // 2. 行状态
215
+ // -----------------------------------------------------------------------------
216
+
217
+ .fanui-table > tbody > tr {
218
+ &.is-disabled { opacity: 0.55; }
219
+ &.is-danger > td { background-color: fn.fanui-alpha(v.$fanui-danger, 0.07); }
220
+ &.is-success > td { background-color: fn.fanui-alpha(v.$fanui-success, 0.07); }
221
+ &.is-warning > td { background-color: fn.fanui-alpha(v.$fanui-warning, 0.09); }
222
+ }
223
+
224
+ // -----------------------------------------------------------------------------
225
+ // 3. 列内工具
226
+ // -----------------------------------------------------------------------------
227
+
228
+ .fanui-table__actions {
229
+ display: flex;
230
+ align-items: center;
231
+ gap: fn.fanui-var("space-2");
232
+ white-space: nowrap;
233
+ }
234
+
235
+ .fanui-table__num {
236
+ text-align: end;
237
+ font-variant-numeric: tabular-nums;
238
+ }
239
+
240
+ .fanui-table__checkbox {
241
+ width: 1%;
242
+ white-space: nowrap;
243
+ padding-inline-end: 0;
244
+ }
245
+
246
+ // 空状态
247
+ .fanui-table__empty {
248
+ padding: fn.fanui-var("space-12") fn.fanui-var("space-4");
249
+ text-align: center;
250
+ color: fn.fanui-var("color-text-muted");
251
+ font-size: fn.fanui-var("font-size-base");
252
+
253
+ &-icon {
254
+ display: block;
255
+ margin: 0 auto fn.fanui-var("space-3");
256
+ font-size: 32px;
257
+ opacity: 0.5;
258
+ }
259
+ }
260
+
261
+ // 表格底部工具条(分页 / 统计)
262
+ .fanui-table-toolbar {
263
+ display: flex;
264
+ align-items: center;
265
+ justify-content: space-between;
266
+ gap: fn.fanui-var("space-4");
267
+ padding: fn.fanui-var("space-3") fn.fanui-var("space-4");
268
+ border-top: 1px solid fn.fanui-var("color-border");
269
+ background-color: fn.fanui-var("color-surface");
270
+ flex-wrap: wrap;
271
+
272
+ &__info {
273
+ font-size: fn.fanui-var("font-size-sm");
274
+ color: fn.fanui-var("color-text-muted");
275
+ }
276
+ }
@@ -0,0 +1,338 @@
1
+ // =============================================================================
2
+ // fanUI · 选项卡 Tabs / 折叠面板 Accordion / 分段
3
+ // -----------------------------------------------------------------------------
4
+ // .fanui-tabs 选项卡容器(--line 默认 / --card / --pill / --segmented)
5
+ // .fanui-tabs__list 标签条
6
+ // .fanui-tabs__item 标签(.is-active 选中)
7
+ // .fanui-tabs__panel 面板(.is-active 显示)
8
+ // .fanui-tabs--vertical 纵向
9
+ // .fanui-accordion 折叠面板
10
+ // =============================================================================
11
+
12
+ @use "sass:map";
13
+ @use "../functions" as fn;
14
+ @use "../variables" as v;
15
+ @use "../mixins" as mx;
16
+
17
+ // -----------------------------------------------------------------------------
18
+ // 1. Tabs
19
+ // -----------------------------------------------------------------------------
20
+
21
+ .fanui-tabs {
22
+ display: flex;
23
+ flex-direction: column;
24
+
25
+ &__list {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: fn.fanui-var("space-1");
29
+ position: relative;
30
+ overflow-x: auto;
31
+ overflow-y: hidden;
32
+ scrollbar-width: none;
33
+ -ms-overflow-style: none;
34
+
35
+ &::-webkit-scrollbar {
36
+ display: none;
37
+ width: 0;
38
+ height: 0;
39
+ }
40
+ }
41
+
42
+ &__item {
43
+ position: relative;
44
+ display: inline-flex;
45
+ align-items: center;
46
+ gap: 6px;
47
+ flex: 0 0 auto;
48
+ padding: 10px 14px;
49
+ font-size: fn.fanui-var("font-size-base");
50
+ font-weight: 500;
51
+ line-height: 1.4;
52
+ color: fn.fanui-var("color-text-muted");
53
+ text-decoration: none;
54
+ background: none;
55
+ border: 0;
56
+ border-bottom: 2px solid transparent;
57
+ cursor: pointer;
58
+ white-space: nowrap;
59
+ box-sizing: border-box;
60
+ @include mx.fanui-transition((color, border-color, background-color), v.$fanui-duration-fast);
61
+
62
+ &:hover {
63
+ color: fn.fanui-var("color-text-strong");
64
+ text-decoration: none;
65
+ }
66
+
67
+ &:focus-visible { @include mx.fanui-focus-ring(); }
68
+
69
+ &.is-active,
70
+ &[aria-selected="true"] {
71
+ color: fn.fanui-var("primary");
72
+ border-bottom-color: fn.fanui-var("primary");
73
+ font-weight: 600;
74
+ }
75
+
76
+ &.is-disabled,
77
+ &:disabled {
78
+ color: fn.fanui-var("color-disabled-text");
79
+ cursor: not-allowed;
80
+ pointer-events: none;
81
+ }
82
+
83
+ &__icon { display: inline-flex; font-size: 1.05em; }
84
+ &__close {
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ width: 16px; height: 16px;
89
+ margin-inline-start: 2px; margin-inline-end: -4px;
90
+ border-radius: 50%;
91
+ color: inherit; opacity: 0.6;
92
+
93
+ &:hover { opacity: 1; background-color: fn.fanui-alpha(#0f172a, 0.1); }
94
+ }
95
+ }
96
+
97
+ &__panel {
98
+ display: none;
99
+ padding-top: fn.fanui-var("space-4");
100
+
101
+ &.is-active { display: block; animation: fanui-fade-in v.$fanui-duration-base v.$fanui-ease-out both; }
102
+ }
103
+
104
+ &__badge { margin-inline-start: 4px; }
105
+
106
+ // ---- 下边框风格(默认):容器底部有一条基线 ----
107
+ &--line > .fanui-tabs__list {
108
+ border-bottom: 1px solid fn.fanui-var("color-border");
109
+ }
110
+
111
+ // ---- 卡片风格 ----
112
+ &--card {
113
+ > .fanui-tabs__list {
114
+ gap: 4px;
115
+ padding: 4px 4px 0;
116
+ border-bottom: 1px solid fn.fanui-var("color-border");
117
+ }
118
+
119
+ > .fanui-tabs__list > .fanui-tabs__item {
120
+ border: 1px solid transparent;
121
+ border-bottom: 0;
122
+ border-radius: fn.fanui-var("radius-base") fn.fanui-var("radius-base") 0 0;
123
+ margin-bottom: -1px;
124
+
125
+ &.is-active {
126
+ background-color: fn.fanui-var("color-surface");
127
+ border-color: fn.fanui-var("color-border");
128
+ border-bottom-color: fn.fanui-var("color-surface");
129
+ }
130
+ }
131
+ }
132
+
133
+ // ---- 胶囊风格 ----
134
+ &--pill {
135
+ > .fanui-tabs__list {
136
+ gap: 4px;
137
+ padding: 4px;
138
+ background-color: fn.fanui-var("color-surface-sunken");
139
+ border-radius: fn.fanui-var("radius-md");
140
+ border-bottom: 0;
141
+ }
142
+
143
+ > .fanui-tabs__list > .fanui-tabs__item {
144
+ border-bottom: 0;
145
+ border-radius: fn.fanui-var("radius-base");
146
+ padding: 7px 14px;
147
+
148
+ &.is-active {
149
+ color: fn.fanui-var("color-text-strong");
150
+ background-color: fn.fanui-var("color-surface");
151
+ box-shadow: fn.fanui-var("shadow-xs");
152
+ }
153
+ }
154
+ }
155
+
156
+ // ---- 分段控件风格 ----
157
+ &--segmented {
158
+ > .fanui-tabs__list {
159
+ gap: 0;
160
+ border-bottom: 0;
161
+ }
162
+
163
+ > .fanui-tabs__list > .fanui-tabs__item {
164
+ border: 1px solid fn.fanui-var("color-border");
165
+ border-bottom: 1px solid fn.fanui-var("color-border");
166
+ border-inline-end-width: 0;
167
+ border-radius: 0;
168
+ padding: 7px 16px;
169
+ margin-inline-start: -1px;
170
+
171
+ &:first-child { margin-inline-start: 0; border-radius: fn.fanui-var("radius-base") 0 0 fn.fanui-var("radius-base"); }
172
+ &:last-child { border-inline-end-width: 1px; border-radius: 0 fn.fanui-var("radius-base") fn.fanui-var("radius-base") 0; }
173
+
174
+ &.is-active {
175
+ color: fn.fanui-var("primary-fg");
176
+ background-color: fn.fanui-var("primary");
177
+ border-color: fn.fanui-var("primary");
178
+ z-index: 1;
179
+ }
180
+ }
181
+ }
182
+
183
+ // ---- 纵向 ----
184
+ &--vertical {
185
+ flex-direction: row;
186
+ align-items: stretch;
187
+ gap: fn.fanui-var("space-4");
188
+
189
+ > .fanui-tabs__list {
190
+ flex-direction: column;
191
+ align-items: stretch;
192
+ border-bottom: 0;
193
+ border-inline-end: 1px solid fn.fanui-var("color-border");
194
+ overflow: visible;
195
+ min-width: var(--fanui-tabs-aside-width, 160px);
196
+ }
197
+
198
+ > .fanui-tabs__list > .fanui-tabs__item {
199
+ justify-content: flex-start;
200
+ border-bottom: 0;
201
+ border-inline-end: 2px solid transparent;
202
+ border-radius: fn.fanui-var("radius-base") 0 0 fn.fanui-var("radius-base");
203
+ margin-inline-end: -1px;
204
+
205
+ &.is-active {
206
+ border-right-color: fn.fanui-var("primary");
207
+ background-color: fn.fanui-var("primary-soft");
208
+ }
209
+ }
210
+
211
+ > .fanui-tabs__panel {
212
+ flex: 1 1 auto;
213
+ min-width: 0;
214
+ padding-top: 0;
215
+ }
216
+ }
217
+ }
218
+
219
+ // -----------------------------------------------------------------------------
220
+ // 2. Accordion / Collapse
221
+ // -----------------------------------------------------------------------------
222
+
223
+ .fanui-accordion {
224
+ display: flex;
225
+ flex-direction: column;
226
+ border: 1px solid fn.fanui-var("color-border");
227
+ border-radius: fn.fanui-var("radius-lg");
228
+ overflow: hidden;
229
+ background-color: fn.fanui-var("color-surface");
230
+
231
+ &--flush { border: 0; border-radius: 0; background: transparent; }
232
+ &--separated { gap: fn.fanui-var("space-2"); border: 0; background: transparent; }
233
+
234
+ &__item {
235
+ border-bottom: 1px solid fn.fanui-var("color-border");
236
+
237
+ &:last-child { border-bottom: 0; }
238
+
239
+ .fanui-accordion--separated & {
240
+ border: 1px solid fn.fanui-var("color-border");
241
+ border-radius: fn.fanui-var("radius-md");
242
+ overflow: hidden;
243
+ background-color: fn.fanui-var("color-surface");
244
+ }
245
+ }
246
+
247
+ &__header {
248
+ margin: 0;
249
+ font-size: inherit;
250
+ font-weight: inherit;
251
+ }
252
+
253
+ &__trigger {
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: space-between;
257
+ gap: fn.fanui-var("space-3");
258
+ width: 100%;
259
+ padding: fn.fanui-var("space-4") fn.fanui-var("space-5");
260
+ font-size: fn.fanui-var("font-size-base");
261
+ font-weight: 600;
262
+ line-height: 1.5;
263
+ text-align: start;
264
+ color: fn.fanui-var("color-text-strong");
265
+ background: none;
266
+ border: 0;
267
+ cursor: pointer;
268
+ @include mx.fanui-transition((background-color, color), v.$fanui-duration-fast);
269
+
270
+ &:hover { background-color: fn.fanui-var("color-hover"); }
271
+ &:focus-visible { @include mx.fanui-focus-ring(); }
272
+
273
+ &__icon,
274
+ .fanui-accordion__icon {
275
+ flex: 0 0 auto;
276
+ display: inline-flex;
277
+ font-size: 14px;
278
+ color: fn.fanui-var("color-text-subtle");
279
+ @include mx.fanui-transition(transform, v.$fanui-duration-base);
280
+ }
281
+
282
+ &[aria-expanded="true"] .fanui-accordion__icon,
283
+ &[aria-expanded="true"] .fanui-accordion__trigger__icon {
284
+ transform: rotate(180deg);
285
+ }
286
+
287
+ &--sm { padding: fn.fanui-var("space-3") fn.fanui-var("space-4"); font-size: fn.fanui-var("font-size-sm"); }
288
+ &--lg { padding: fn.fanui-var("space-5"); font-size: fn.fanui-var("font-size-md"); }
289
+ }
290
+
291
+ &__panel {
292
+ display: none;
293
+ padding: 0 fn.fanui-var("space-5") fn.fanui-var("space-4");
294
+ font-size: fn.fanui-var("font-size-base");
295
+ line-height: fn.fanui-var("line-height-relaxed");
296
+ color: fn.fanui-var("color-text-muted");
297
+
298
+ &.is-open,
299
+ &.is-active { display: block; animation: fanui-slide-in-down v.$fanui-duration-base v.$fanui-ease-out both; }
300
+ }
301
+ }
302
+
303
+ // 折叠面板(独立 Collapse,无样式外壳)
304
+ .fanui-collapse {
305
+ &__trigger {
306
+ display: inline-flex;
307
+ align-items: center;
308
+ gap: 6px;
309
+ font-size: fn.fanui-var("font-size-base");
310
+ font-weight: 500;
311
+ color: fn.fanui-var("color-text");
312
+ background: none;
313
+ border: 0;
314
+ cursor: pointer;
315
+ padding: 0;
316
+
317
+ &__icon { @include mx.fanui-transition(transform, v.$fanui-duration-base); }
318
+ &[aria-expanded="true"] .fanui-collapse__trigger__icon { transform: rotate(90deg); }
319
+ }
320
+
321
+ &__panel {
322
+ display: none;
323
+
324
+ &.is-open { display: block; animation: fanui-slide-in-down v.$fanui-duration-base v.$fanui-ease-out both; }
325
+ }
326
+ }
327
+
328
+ // -----------------------------------------------------------------------------
329
+ // 3. 分段 / 步进(详见 _choice.scss 中的 .fanui-segmented)
330
+ // -----------------------------------------------------------------------------
331
+
332
+ .fanui-tab-scroll {
333
+ display: flex;
334
+ gap: fn.fanui-var("space-2");
335
+ overflow-x: auto;
336
+ @include mx.fanui-scrollbar(6px);
337
+ padding-bottom: 2px;
338
+ }