@robert-stackflow/oneui 0.6.16 → 0.6.18

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # 0.6.18
2
+
3
+ - Add Menu iconOnly triggers backed by the shared IconButton, preserving tooltip, focus restoration and keyboard menu interaction without a normal button border or minimum height.
4
+
5
+ # 0.6.17
6
+
7
+ - Prevent the animated SideBar selection highlight from expanding scrollable overflow while a preceding group collapses; preserve group and selection motion in both themes and color modes.
8
+
1
9
  # 0.6.16
2
10
 
3
11
  - Separate readable accent ink from solid fills for badges, links, menu/radio marks, steps, progress, charts, timelines, info feedback and keyboard focus in both color modes; preserve custom accents.
package/README.md CHANGED
@@ -253,3 +253,5 @@ AccountItem 接受标题、图标、描述、元数据及操作。PasskeyItem
253
253
  扩展 Menu 的自定义触发内容、NumberInput 单位、Pagination 汇总显隐、Badge 原生属性、Tooltip 禁用选项及 Button 文字链接。修复日历月份标签碰撞和宽度适配,表格容器继承外框圆角。既有导出与默认 API 保持兼容。
254
254
 
255
255
  验证:`npm run test:sidebar-navigation`、`npm run test:visual-foundations`、`npm run test:account-forms`、`npm run test:modal-pagination`、`npm run test:package`。新增回归覆盖 React 间距覆盖、正文颜色、表格圆角与文字按钮、现有 Combobox 键盘筛选、日期标签和窄屏溢出。
256
+
257
+ Menu 支持 iconOnly:`<Menu iconOnly label="更多操作" items={items} />` 复用 IconButton,默认显示更多图标;trigger 可替换图标,variant 可设置按钮类型。
@@ -1,9 +1,10 @@
1
1
  import { type ReactNode } from "react";
2
- export declare function Menu({ label, items, trigger, variant, className, }: {
2
+ export declare function Menu({ label, items, trigger, variant, className, iconOnly, }: {
3
3
  label: string;
4
4
  trigger?: ReactNode;
5
5
  variant?: "primary" | "secondary" | "ghost" | "danger";
6
6
  className?: string;
7
+ iconOnly?: boolean;
7
8
  items: {
8
9
  label: string;
9
10
  icon?: ReactNode;
@@ -1,7 +1,8 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
- import { ChevronDown } from "lucide-react";
3
+ import { ChevronDown, MoreHorizontal } from "lucide-react";
4
4
  import { Button } from "./Button.js";
5
+ import { IconButton } from "./IconButton.js";
5
6
  import { MenuItem } from "./MenuItem.js";
6
7
  import { Popover } from "./Popover.js";
7
8
  import { usePopover } from "./usePopover.js";
@@ -9,34 +10,32 @@ function Menu({
9
10
  label,
10
11
  items,
11
12
  trigger,
12
- variant = "secondary",
13
- className
13
+ variant,
14
+ className,
15
+ iconOnly = false
14
16
  }) {
15
17
  const pop = usePopover(), id = useId();
16
- return /* @__PURE__ */ jsxs(Fragment, { children: [
17
- /* @__PURE__ */ jsx(
18
- Button,
19
- {
20
- variant,
21
- className,
22
- "aria-label": label,
23
- ref: pop.anchor,
24
- "aria-haspopup": "menu",
25
- "aria-expanded": pop.open,
26
- "aria-controls": id,
27
- onClick: pop.toggle,
28
- onKeyDown: (event) => {
29
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
30
- event.preventDefault();
31
- pop.show();
32
- }
33
- },
34
- children: trigger ?? /* @__PURE__ */ jsxs(Fragment, { children: [
35
- label,
36
- /* @__PURE__ */ jsx(ChevronDown, { size: 14 })
37
- ] })
18
+ const triggerProps = {
19
+ variant: variant ?? (iconOnly ? "ghost" : "secondary"),
20
+ className,
21
+ "aria-label": label,
22
+ ref: pop.anchor,
23
+ "aria-haspopup": "menu",
24
+ "aria-expanded": pop.open,
25
+ "aria-controls": id,
26
+ onClick: pop.toggle,
27
+ onKeyDown: (event) => {
28
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
29
+ event.preventDefault();
30
+ pop.show();
38
31
  }
39
- ),
32
+ }
33
+ };
34
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
35
+ iconOnly ? /* @__PURE__ */ jsx(IconButton, { ...triggerProps, label, children: trigger ?? /* @__PURE__ */ jsx(MoreHorizontal, { size: 18 }) }) : /* @__PURE__ */ jsx(Button, { ...triggerProps, children: trigger ?? /* @__PURE__ */ jsxs(Fragment, { children: [
36
+ label,
37
+ /* @__PURE__ */ jsx(ChevronDown, { size: 14 })
38
+ ] }) }),
40
39
  /* @__PURE__ */ jsx(
41
40
  Popover,
42
41
  {
@@ -1,352 +1,354 @@
1
- .tree,
2
- .groupItems {
3
- display: flex;
4
- flex-direction: column;
5
- gap: 4px;
6
- min-width: 0;
7
- }
8
- .section,
9
- .branch {
10
- min-width: 0;
11
- }
12
- .section + .section {
13
- margin-top: var(--nav-group-gap, 16px);
14
- padding-top: var(--nav-group-inset, 0);
15
- border-top: var(--nav-group-divider, 0);
16
- }
17
- .groupLabel,
18
- .groupToggle {
19
- display: flex;
20
- align-items: center;
21
- justify-content: space-between;
22
- gap: 8px;
23
- width: 100%;
24
- min-height: 32px;
25
- margin-bottom: 5px;
26
- padding: 6px 12px;
27
- border: 0;
28
- border-radius: var(--nav-radius, 8px);
29
- color: var(--muted);
30
- background: transparent;
31
- font: inherit;
32
- font-size: 11px;
33
- text-align: left;
34
- }
35
- .groupToggle {
36
- cursor: pointer;
37
- }
38
- .groupToggle:hover {
39
- color: var(--fg);
40
- background: var(--hover);
41
- }
42
- .groupToggle > span {
43
- min-width: 0;
44
- overflow: hidden;
45
- text-overflow: ellipsis;
46
- white-space: nowrap;
47
- }
48
- .groupToggle > svg {
49
- width: 14px;
50
- height: 14px;
51
- flex-shrink: 0;
52
- transform: rotate(90deg);
53
- transition: transform var(--motion-chevron, 180ms) var(--ease);
54
- }
55
- .groupToggle[aria-expanded="false"] > svg {
56
- transform: rotate(0);
57
- }
58
- .section[data-active-within][data-collapsed] .groupToggle {
59
- color: var(--navigation-active-color, var(--fg));
60
- }
61
-
62
- .row {
63
- position: relative;
64
- display: flex;
65
- align-items: center;
66
- min-width: 0;
67
- border-radius: var(--nav-radius, 8px);
68
- transition:
69
- background var(--motion-hover),
70
- color var(--motion-hover);
71
- }
72
- .row:not(:has(> .item[aria-current="page"])):has(
73
- > .item:hover:not(:disabled):not([aria-disabled="true"])
74
- ) {
75
- background: var(--hover);
76
- }
77
- .tree:not([data-ready]) .row:has(> .item[aria-current="page"]) {
78
- background: var(--selected);
79
- }
80
- .item,
81
- .navigationButton {
82
- position: relative;
83
- display: flex;
84
- align-items: center;
85
- gap: 10px;
86
- flex: 1;
87
- min-width: 0;
88
- min-height: var(--nav-item-height, 40px);
89
- padding: 9px 12px;
90
- border: 0;
91
- border-radius: var(--nav-radius, 8px);
92
- color: var(--muted);
93
- background: transparent;
94
- font: inherit;
95
- font-size: 13px;
96
- line-height: 1.5;
97
- text-decoration: none;
98
- text-align: left;
99
- cursor: pointer;
100
- }
101
- .navigationButton {
102
- width: 100%;
103
- }
104
- .item > svg,
105
- .navigationButton > svg {
106
- width: 18px;
107
- height: 18px;
108
- flex-shrink: 0;
109
- }
110
- .item:hover:not(:disabled):not([aria-disabled="true"]),
111
- .navigationButton:hover:not(:disabled) {
112
- color: var(--fg);
113
- }
114
- .navigationButton:hover:not(:disabled) {
115
- background: var(--hover);
116
- }
117
- .item[aria-current="page"],
118
- .navigationButton[aria-current="page"] {
119
- color: var(--navigation-active-color, var(--fg));
120
- }
121
- .navigationButton[aria-current="page"] {
122
- background: var(--selected);
123
- }
124
-
125
- .item:disabled,
126
- .item[aria-disabled="true"] {
127
- opacity: 0.45;
128
- cursor: not-allowed;
129
- }
130
- .label {
131
- min-width: 0;
132
- overflow: hidden;
133
- text-overflow: ellipsis;
134
- white-space: nowrap;
135
- }
136
- .row:has(> .disclosure) > .item {
137
- padding-right: 6px;
138
- }
139
- .disclosure {
140
- flex: 0 0 28px;
141
- margin-right: 6px;
142
- display: grid;
143
- place-items: center;
144
- width: 28px;
145
- height: 28px;
146
- padding: 0;
147
- border: 0;
148
- border-radius: 6px;
149
- background: transparent;
150
- color: var(--muted);
151
- cursor: pointer;
152
- }
153
- .disclosure:hover:not(:disabled) {
154
- background: var(--hover);
155
- color: var(--fg);
156
- }
157
- .disclosure:disabled {
158
- opacity: 0.45;
159
- cursor: not-allowed;
160
- }
161
- .disclosure svg {
162
- transition: transform var(--motion-chevron, 180ms) var(--ease);
163
- }
164
- .disclosure[aria-expanded="true"] svg {
165
- transform: rotate(90deg);
166
- }
167
- .item:focus-visible,
168
- .navigationButton:focus-visible,
169
- .groupToggle:focus-visible,
170
- .disclosure:focus-visible {
171
- outline: 2px solid var(--accent-ink, var(--accent));
172
- outline-offset: -2px;
173
- }
174
- .children {
175
- margin-left: 20px;
176
- padding: 4px 0 4px 10px;
177
- border-left: 1px solid var(--line);
178
- }
179
- .children .item {
180
- min-height: 36px;
181
- padding-block: 7px;
182
- font-size: 12px;
183
- }
184
- .children .item > svg {
185
- width: 16px;
186
- height: 16px;
187
- }
188
- .branch[data-active-within] > .row > .disclosure {
189
- color: var(--navigation-active-color, var(--fg));
190
- }
191
-
192
- .tree[data-compact] .label {
193
- display: none;
194
- }
195
- .tree[data-compact] .item {
196
- justify-content: center;
197
- padding-inline: 0;
198
- }
199
- .tree[data-compact] .section + .section {
200
- margin-top: 12px;
201
- padding-top: 12px;
202
- border-top: 1px solid var(--line);
203
- }
204
- @media (prefers-reduced-motion: reduce) {
205
- .row,
206
- .groupToggle > svg,
207
- .disclosure svg {
208
- transition: none;
209
- }
210
- }
211
-
212
- .tree {
213
- position: relative;
214
- isolation: isolate;
215
- }
216
- .track {
217
- position: absolute;
218
- z-index: -1;
219
- top: 0;
220
- left: 0;
221
- right: 0;
222
- height: var(--nav-track-height, 0);
223
- border-radius: var(--nav-radius, 8px);
224
- background: var(--selected);
225
- opacity: var(--nav-track-opacity, 0);
226
- transform: translateY(var(--nav-track-y, 0));
227
- pointer-events: none;
228
- }
229
- .track::before {
230
- content: "";
231
- position: absolute;
232
- left: 4px;
233
- top: 50%;
234
- width: 3px;
235
- height: 16px;
236
- border-radius: 3px;
237
- background: var(
238
- --navigation-indicator-color,
239
- var(--navigation-active-color, var(--fg))
240
- );
241
- opacity: var(--nav-indicator-opacity, 0);
242
- transform: translateY(-50%);
243
- }
244
- .tree[data-ready] > .track {
245
- transition:
246
- transform var(--motion-segment, 240ms) var(--ease),
247
- height var(--motion-segment, 240ms) var(--ease),
248
- opacity var(--motion-hover, 160ms) var(--ease);
249
- }
250
- .collapse {
251
- display: grid;
252
- grid-template-rows: 0fr;
253
- opacity: 0;
254
- visibility: hidden;
255
- transition:
256
- grid-template-rows var(--motion-panel, 240ms) var(--ease),
257
- opacity var(--motion-panel, 240ms) var(--ease),
258
- visibility 0s var(--motion-panel, 240ms);
259
- }
260
- .collapse[data-open="true"] {
261
- grid-template-rows: 1fr;
262
- opacity: 1;
263
- visibility: visible;
264
- transition-delay: 0s;
265
- }
266
- .clip {
267
- min-height: 0;
268
- overflow: hidden;
269
- }
270
- .children > .branch > .row::before {
271
- content: "";
272
- position: absolute;
273
- left: -10px;
274
- top: 50%;
275
- width: 7px;
276
- height: 1px;
277
- background: var(--line);
278
- }
279
- .children:has([aria-current="page"]) {
280
- border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
281
- }
282
- @media (prefers-reduced-motion: reduce) {
283
- .tree[data-ready] > .track,
284
- .collapse {
285
- transition: none;
286
- }
287
- }
288
-
289
- .groupHeader {
290
- display: grid;
291
- grid-template-columns: minmax(0, 1fr) auto 14px;
292
- align-items: center;
293
- gap: 8px;
294
- padding-inline: 12px;
295
- margin-bottom: 5px;
296
- min-height: 32px;
297
- border-radius: var(--nav-radius, 8px);
298
- }
299
- .groupHeader > .groupToggle,
300
- .groupHeader > .groupLabel {
301
- display: grid;
302
- grid-template-columns: subgrid;
303
- grid-column: 1 / -1;
304
- grid-row: 1;
305
- padding: 6px 0;
306
- margin: 0;
307
- }
308
- .groupToggle > span {
309
- grid-column: 1;
310
- }
311
- .groupToggle > svg {
312
- grid-column: 3;
313
- }
314
- .groupHeader:has(.groupToggle:hover) {
315
- background: var(--hover);
316
- }
317
- .groupToggle:hover {
318
- background: transparent;
319
- }
320
- .groupTrailing {
321
- grid-column: 2;
322
- grid-row: 1;
323
- z-index: 1;
324
- }
325
- .groupTrailing,
326
- .trailing {
327
- display: inline-flex;
328
- align-items: center;
329
- justify-content: center;
330
- gap: 4px;
331
- flex-shrink: 0;
332
- }
333
- .trailing {
334
- max-width: 40%;
335
- margin-right: 12px;
336
- }
337
- .row:has(> .disclosure) > .trailing {
338
- margin-right: 4px;
339
- }
340
- .trailing > svg {
341
- width: 16px;
342
- height: 16px;
343
- }
344
-
345
- .groupHeader > :is(.groupToggle, .groupLabel) {
346
- font-weight: 400;
347
- }
348
- .section[data-header-bold="true"]
349
- > .groupHeader
350
- > :is(.groupToggle, .groupLabel) {
351
- font-weight: 600;
352
- }
1
+ .tree,
2
+ .groupItems {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 4px;
6
+ min-width: 0;
7
+ }
8
+ .section,
9
+ .branch {
10
+ min-width: 0;
11
+ }
12
+ .section + .section {
13
+ margin-top: var(--nav-group-gap, 16px);
14
+ padding-top: var(--nav-group-inset, 0);
15
+ border-top: var(--nav-group-divider, 0);
16
+ }
17
+ .groupLabel,
18
+ .groupToggle {
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ gap: 8px;
23
+ width: 100%;
24
+ min-height: 32px;
25
+ margin-bottom: 5px;
26
+ padding: 6px 12px;
27
+ border: 0;
28
+ border-radius: var(--nav-radius, 8px);
29
+ color: var(--muted);
30
+ background: transparent;
31
+ font: inherit;
32
+ font-size: 11px;
33
+ text-align: left;
34
+ }
35
+ .groupToggle {
36
+ cursor: pointer;
37
+ }
38
+ .groupToggle:hover {
39
+ color: var(--fg);
40
+ background: var(--hover);
41
+ }
42
+ .groupToggle > span {
43
+ min-width: 0;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ white-space: nowrap;
47
+ }
48
+ .groupToggle > svg {
49
+ width: 14px;
50
+ height: 14px;
51
+ flex-shrink: 0;
52
+ transform: rotate(90deg);
53
+ transition: transform var(--motion-chevron, 180ms) var(--ease);
54
+ }
55
+ .groupToggle[aria-expanded="false"] > svg {
56
+ transform: rotate(0);
57
+ }
58
+ .section[data-active-within][data-collapsed] .groupToggle {
59
+ color: var(--navigation-active-color, var(--fg));
60
+ }
61
+
62
+ .row {
63
+ position: relative;
64
+ display: flex;
65
+ align-items: center;
66
+ min-width: 0;
67
+ border-radius: var(--nav-radius, 8px);
68
+ transition:
69
+ background var(--motion-hover),
70
+ color var(--motion-hover);
71
+ }
72
+ .row:not(:has(> .item[aria-current="page"])):has(
73
+ > .item:hover:not(:disabled):not([aria-disabled="true"])
74
+ ) {
75
+ background: var(--hover);
76
+ }
77
+ .tree:not([data-ready]) .row:has(> .item[aria-current="page"]) {
78
+ background: var(--selected);
79
+ }
80
+ .item,
81
+ .navigationButton {
82
+ position: relative;
83
+ display: flex;
84
+ align-items: center;
85
+ gap: 10px;
86
+ flex: 1;
87
+ min-width: 0;
88
+ min-height: var(--nav-item-height, 40px);
89
+ padding: 9px 12px;
90
+ border: 0;
91
+ border-radius: var(--nav-radius, 8px);
92
+ color: var(--muted);
93
+ background: transparent;
94
+ font: inherit;
95
+ font-size: 13px;
96
+ line-height: 1.5;
97
+ text-decoration: none;
98
+ text-align: left;
99
+ cursor: pointer;
100
+ }
101
+ .navigationButton {
102
+ width: 100%;
103
+ }
104
+ .item > svg,
105
+ .navigationButton > svg {
106
+ width: 18px;
107
+ height: 18px;
108
+ flex-shrink: 0;
109
+ }
110
+ .item:hover:not(:disabled):not([aria-disabled="true"]),
111
+ .navigationButton:hover:not(:disabled) {
112
+ color: var(--fg);
113
+ }
114
+ .navigationButton:hover:not(:disabled) {
115
+ background: var(--hover);
116
+ }
117
+ .item[aria-current="page"],
118
+ .navigationButton[aria-current="page"] {
119
+ color: var(--navigation-active-color, var(--fg));
120
+ }
121
+ .navigationButton[aria-current="page"] {
122
+ background: var(--selected);
123
+ }
124
+
125
+ .item:disabled,
126
+ .item[aria-disabled="true"] {
127
+ opacity: 0.45;
128
+ cursor: not-allowed;
129
+ }
130
+ .label {
131
+ min-width: 0;
132
+ overflow: hidden;
133
+ text-overflow: ellipsis;
134
+ white-space: nowrap;
135
+ }
136
+ .row:has(> .disclosure) > .item {
137
+ padding-right: 6px;
138
+ }
139
+ .disclosure {
140
+ flex: 0 0 28px;
141
+ margin-right: 6px;
142
+ display: grid;
143
+ place-items: center;
144
+ width: 28px;
145
+ height: 28px;
146
+ padding: 0;
147
+ border: 0;
148
+ border-radius: 6px;
149
+ background: transparent;
150
+ color: var(--muted);
151
+ cursor: pointer;
152
+ }
153
+ .disclosure:hover:not(:disabled) {
154
+ background: var(--hover);
155
+ color: var(--fg);
156
+ }
157
+ .disclosure:disabled {
158
+ opacity: 0.45;
159
+ cursor: not-allowed;
160
+ }
161
+ .disclosure svg {
162
+ transition: transform var(--motion-chevron, 180ms) var(--ease);
163
+ }
164
+ .disclosure[aria-expanded="true"] svg {
165
+ transform: rotate(90deg);
166
+ }
167
+ .item:focus-visible,
168
+ .navigationButton:focus-visible,
169
+ .groupToggle:focus-visible,
170
+ .disclosure:focus-visible {
171
+ outline: 2px solid var(--accent-ink, var(--accent));
172
+ outline-offset: -2px;
173
+ }
174
+ .children {
175
+ margin-left: 20px;
176
+ padding: 4px 0 4px 10px;
177
+ border-left: 1px solid var(--line);
178
+ }
179
+ .children .item {
180
+ min-height: 36px;
181
+ padding-block: 7px;
182
+ font-size: 12px;
183
+ }
184
+ .children .item > svg {
185
+ width: 16px;
186
+ height: 16px;
187
+ }
188
+ .branch[data-active-within] > .row > .disclosure {
189
+ color: var(--navigation-active-color, var(--fg));
190
+ }
191
+
192
+ .tree[data-compact] .label {
193
+ display: none;
194
+ }
195
+ .tree[data-compact] .item {
196
+ justify-content: center;
197
+ padding-inline: 0;
198
+ }
199
+ .tree[data-compact] .section + .section {
200
+ margin-top: 12px;
201
+ padding-top: 12px;
202
+ border-top: 1px solid var(--line);
203
+ }
204
+ @media (prefers-reduced-motion: reduce) {
205
+ .row,
206
+ .groupToggle > svg,
207
+ .disclosure svg {
208
+ transition: none;
209
+ }
210
+ }
211
+
212
+ .tree {
213
+ position: relative;
214
+ isolation: isolate;
215
+ /* Keep the moving highlight inside the tree while groups change height. */
216
+ overflow: clip;
217
+ }
218
+ .track {
219
+ position: absolute;
220
+ z-index: -1;
221
+ top: 0;
222
+ left: 0;
223
+ right: 0;
224
+ height: var(--nav-track-height, 0);
225
+ border-radius: var(--nav-radius, 8px);
226
+ background: var(--selected);
227
+ opacity: var(--nav-track-opacity, 0);
228
+ transform: translateY(var(--nav-track-y, 0));
229
+ pointer-events: none;
230
+ }
231
+ .track::before {
232
+ content: "";
233
+ position: absolute;
234
+ left: 4px;
235
+ top: 50%;
236
+ width: 3px;
237
+ height: 16px;
238
+ border-radius: 3px;
239
+ background: var(
240
+ --navigation-indicator-color,
241
+ var(--navigation-active-color, var(--fg))
242
+ );
243
+ opacity: var(--nav-indicator-opacity, 0);
244
+ transform: translateY(-50%);
245
+ }
246
+ .tree[data-ready] > .track {
247
+ transition:
248
+ transform var(--motion-segment, 240ms) var(--ease),
249
+ height var(--motion-segment, 240ms) var(--ease),
250
+ opacity var(--motion-hover, 160ms) var(--ease);
251
+ }
252
+ .collapse {
253
+ display: grid;
254
+ grid-template-rows: 0fr;
255
+ opacity: 0;
256
+ visibility: hidden;
257
+ transition:
258
+ grid-template-rows var(--motion-panel, 240ms) var(--ease),
259
+ opacity var(--motion-panel, 240ms) var(--ease),
260
+ visibility 0s var(--motion-panel, 240ms);
261
+ }
262
+ .collapse[data-open="true"] {
263
+ grid-template-rows: 1fr;
264
+ opacity: 1;
265
+ visibility: visible;
266
+ transition-delay: 0s;
267
+ }
268
+ .clip {
269
+ min-height: 0;
270
+ overflow: hidden;
271
+ }
272
+ .children > .branch > .row::before {
273
+ content: "";
274
+ position: absolute;
275
+ left: -10px;
276
+ top: 50%;
277
+ width: 7px;
278
+ height: 1px;
279
+ background: var(--line);
280
+ }
281
+ .children:has([aria-current="page"]) {
282
+ border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
283
+ }
284
+ @media (prefers-reduced-motion: reduce) {
285
+ .tree[data-ready] > .track,
286
+ .collapse {
287
+ transition: none;
288
+ }
289
+ }
290
+
291
+ .groupHeader {
292
+ display: grid;
293
+ grid-template-columns: minmax(0, 1fr) auto 14px;
294
+ align-items: center;
295
+ gap: 8px;
296
+ padding-inline: 12px;
297
+ margin-bottom: 5px;
298
+ min-height: 32px;
299
+ border-radius: var(--nav-radius, 8px);
300
+ }
301
+ .groupHeader > .groupToggle,
302
+ .groupHeader > .groupLabel {
303
+ display: grid;
304
+ grid-template-columns: subgrid;
305
+ grid-column: 1 / -1;
306
+ grid-row: 1;
307
+ padding: 6px 0;
308
+ margin: 0;
309
+ }
310
+ .groupToggle > span {
311
+ grid-column: 1;
312
+ }
313
+ .groupToggle > svg {
314
+ grid-column: 3;
315
+ }
316
+ .groupHeader:has(.groupToggle:hover) {
317
+ background: var(--hover);
318
+ }
319
+ .groupToggle:hover {
320
+ background: transparent;
321
+ }
322
+ .groupTrailing {
323
+ grid-column: 2;
324
+ grid-row: 1;
325
+ z-index: 1;
326
+ }
327
+ .groupTrailing,
328
+ .trailing {
329
+ display: inline-flex;
330
+ align-items: center;
331
+ justify-content: center;
332
+ gap: 4px;
333
+ flex-shrink: 0;
334
+ }
335
+ .trailing {
336
+ max-width: 40%;
337
+ margin-right: 12px;
338
+ }
339
+ .row:has(> .disclosure) > .trailing {
340
+ margin-right: 4px;
341
+ }
342
+ .trailing > svg {
343
+ width: 16px;
344
+ height: 16px;
345
+ }
346
+
347
+ .groupHeader > :is(.groupToggle, .groupLabel) {
348
+ font-weight: 400;
349
+ }
350
+ .section[data-header-bold="true"]
351
+ > .groupHeader
352
+ > :is(.groupToggle, .groupLabel) {
353
+ font-weight: 600;
354
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.6.16",
3
+ "version": "0.6.18",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [