@robert-stackflow/oneui 0.6.21 → 0.6.23
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 +30 -18
- package/README.md +270 -264
- package/components/AccountItem.module.css +103 -103
- package/components/AppShell.module.css +223 -223
- package/components/Badge.module.css +30 -30
- package/components/BarChart.module.css +35 -35
- package/components/Breadcrumb.module.css +97 -97
- package/components/Button.module.css +120 -120
- package/components/Checkbox.module.css +95 -95
- package/components/ContextMenu.d.ts +3 -1
- package/components/ContextMenu.js +24 -4
- package/components/ContributionCalendar.module.css +121 -121
- package/components/Control.module.css +86 -86
- package/components/DataTable.module.css +75 -75
- package/components/Dialog.module.css +139 -139
- package/components/EditableHeading.d.ts +12 -0
- package/components/EditableHeading.js +76 -0
- package/components/EditableHeading.module.css +16 -0
- package/components/HierarchyPicker.module.css +185 -185
- package/components/IconButton.d.ts +3 -1
- package/components/IconButton.js +13 -2
- package/components/IconButton.module.css +13 -0
- package/components/Indicator.module.css +83 -83
- package/components/Layout.d.ts +1 -0
- package/components/Layout.module.css +82 -82
- package/components/Markdown.module.css +227 -227
- package/components/MenuItem.module.css +172 -172
- package/components/NavBar.module.css +130 -130
- package/components/Popover.d.ts +5 -1
- package/components/Popover.js +59 -28
- package/components/Popover.module.css +52 -0
- package/components/Progress.module.css +33 -33
- package/components/RadioGroup.module.css +87 -87
- package/components/RangeSlider.module.css +141 -141
- package/components/ResizablePanel.module.css +101 -101
- package/components/ResourceCard.module.css +98 -98
- package/components/Segmented.module.css +85 -85
- package/components/SidebarNavigation.js +4 -2
- package/components/SidebarNavigation.module.css +7 -2
- package/components/Slider.module.css +19 -19
- package/components/Steps.module.css +176 -176
- package/components/Tab.module.css +148 -148
- package/components/Table.module.css +87 -87
- package/components/TableOfContents.module.css +252 -252
- package/components/ThemePicker.module.css +178 -178
- package/components/TimeColumns.module.css +47 -47
- package/components/Timeline.module.css +202 -202
- package/components/TreeTable.module.css +57 -57
- package/components/UptimeChart.module.css +15 -15
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/motion.d.ts +1 -0
- package/components/motion.js +16 -2
- package/package.json +1 -1
- package/styles/base.css +206 -206
- package/styles/blue.css +270 -270
- package/styles/minimal.css +319 -319
|
@@ -1,172 +1,172 @@
|
|
|
1
|
-
.item {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: var(--menu-item-gap);
|
|
5
|
-
width: 100%;
|
|
6
|
-
min-width: 0;
|
|
7
|
-
min-height: var(--menu-item-height);
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: max(
|
|
10
|
-
4px,
|
|
11
|
-
calc((var(--menu-item-height) - var(--menu-item-line-height)) / 2)
|
|
12
|
-
)
|
|
13
|
-
var(--menu-item-padding-x);
|
|
14
|
-
border: 0;
|
|
15
|
-
border-radius: calc(var(--radius) - 4px);
|
|
16
|
-
background: transparent;
|
|
17
|
-
color: var(--fg);
|
|
18
|
-
text-align: left;
|
|
19
|
-
font-family: var(--ui-font);
|
|
20
|
-
font-size: var(--menu-item-font-size);
|
|
21
|
-
font-weight: 400;
|
|
22
|
-
line-height: var(--menu-item-line-height);
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
outline: none;
|
|
25
|
-
transition:
|
|
26
|
-
background-color var(--motion-hover),
|
|
27
|
-
color var(--motion-hover);
|
|
28
|
-
}
|
|
29
|
-
.item + .item {
|
|
30
|
-
margin-top: var(--menu-item-spacing);
|
|
31
|
-
}
|
|
32
|
-
@media (pointer: coarse) {
|
|
33
|
-
.item {
|
|
34
|
-
min-height: 44px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
.item[data-selected="true"] {
|
|
38
|
-
background: var(--selected);
|
|
39
|
-
}
|
|
40
|
-
.item:where(:not(:disabled):not([aria-disabled="true"])):is(
|
|
41
|
-
:hover,
|
|
42
|
-
:focus-visible,
|
|
43
|
-
[data-active="true"],
|
|
44
|
-
[aria-expanded="true"]
|
|
45
|
-
) {
|
|
46
|
-
background: var(--hover);
|
|
47
|
-
}
|
|
48
|
-
.item[data-selected="true"]:where(
|
|
49
|
-
:not(:disabled):not([aria-disabled="true"])
|
|
50
|
-
):is(:hover, :focus-visible, [data-active="true"]) {
|
|
51
|
-
background: color-mix(in srgb, var(--selected) 75%, var(--hover));
|
|
52
|
-
}
|
|
53
|
-
.item:where(:not(:disabled):not([aria-disabled="true"])):active {
|
|
54
|
-
background: var(--selected);
|
|
55
|
-
}
|
|
56
|
-
.item:disabled,
|
|
57
|
-
.item[aria-disabled="true"] {
|
|
58
|
-
opacity: var(--menu-disabled-opacity);
|
|
59
|
-
cursor: not-allowed;
|
|
60
|
-
}
|
|
61
|
-
.item[data-tone="danger"] {
|
|
62
|
-
color: var(--danger);
|
|
63
|
-
}
|
|
64
|
-
.leading,
|
|
65
|
-
.trailing {
|
|
66
|
-
display: grid;
|
|
67
|
-
place-items: center;
|
|
68
|
-
flex: 0 0 var(--menu-item-icon-size);
|
|
69
|
-
width: var(--menu-item-icon-size);
|
|
70
|
-
height: var(--menu-item-icon-size);
|
|
71
|
-
}
|
|
72
|
-
.leading {
|
|
73
|
-
color: inherit;
|
|
74
|
-
opacity: 0.8;
|
|
75
|
-
}
|
|
76
|
-
.leading svg,
|
|
77
|
-
.trailing > svg {
|
|
78
|
-
width: var(--menu-item-icon-size);
|
|
79
|
-
height: var(--menu-item-icon-size);
|
|
80
|
-
stroke-width: 1.65;
|
|
81
|
-
}
|
|
82
|
-
.copy {
|
|
83
|
-
flex: 1;
|
|
84
|
-
min-width: 0;
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
gap: 2px;
|
|
88
|
-
}
|
|
89
|
-
.label {
|
|
90
|
-
min-width: 0;
|
|
91
|
-
overflow: hidden;
|
|
92
|
-
text-overflow: ellipsis;
|
|
93
|
-
white-space: nowrap;
|
|
94
|
-
}
|
|
95
|
-
.description {
|
|
96
|
-
white-space: nowrap;
|
|
97
|
-
overflow: hidden;
|
|
98
|
-
text-overflow: ellipsis;
|
|
99
|
-
font-size: 11px;
|
|
100
|
-
font-weight: 400;
|
|
101
|
-
line-height: 14px;
|
|
102
|
-
color: var(--muted);
|
|
103
|
-
}
|
|
104
|
-
.shortcut {
|
|
105
|
-
flex-shrink: 0;
|
|
106
|
-
margin-left: auto;
|
|
107
|
-
padding: 0;
|
|
108
|
-
border: 0;
|
|
109
|
-
border-radius: 0;
|
|
110
|
-
background: transparent;
|
|
111
|
-
box-shadow: none;
|
|
112
|
-
font-family: var(--ui-font);
|
|
113
|
-
font-size: var(--menu-shortcut-font-size);
|
|
114
|
-
font-weight: 400;
|
|
115
|
-
line-height: var(--menu-shortcut-line-height);
|
|
116
|
-
font-variant-numeric: tabular-nums;
|
|
117
|
-
color: var(--muted);
|
|
118
|
-
white-space: nowrap;
|
|
119
|
-
text-align: right;
|
|
120
|
-
}
|
|
121
|
-
.shortcut ~ .trailing:empty {
|
|
122
|
-
display: none;
|
|
123
|
-
}
|
|
124
|
-
.check {
|
|
125
|
-
color: var(--accent-ink, var(--accent));
|
|
126
|
-
}
|
|
127
|
-
.checkbox,
|
|
128
|
-
.radio {
|
|
129
|
-
display: grid;
|
|
130
|
-
place-items: center;
|
|
131
|
-
width: var(--menu-item-icon-size);
|
|
132
|
-
height: var(--menu-item-icon-size);
|
|
133
|
-
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
134
|
-
background: var(--field);
|
|
135
|
-
transition:
|
|
136
|
-
background var(--motion-hover),
|
|
137
|
-
border-color var(--motion-hover);
|
|
138
|
-
}
|
|
139
|
-
.checkbox {
|
|
140
|
-
border-radius: 4px;
|
|
141
|
-
}
|
|
142
|
-
.checkbox[data-checked="true"] {
|
|
143
|
-
background: var(--accent);
|
|
144
|
-
border-color: var(--accent);
|
|
145
|
-
color: var(--on-accent);
|
|
146
|
-
}
|
|
147
|
-
.checkbox svg {
|
|
148
|
-
width: 12px;
|
|
149
|
-
height: 12px;
|
|
150
|
-
stroke-width: 2;
|
|
151
|
-
}
|
|
152
|
-
.radio {
|
|
153
|
-
border-radius: 50%;
|
|
154
|
-
}
|
|
155
|
-
.radio i {
|
|
156
|
-
width: 6px;
|
|
157
|
-
height: 6px;
|
|
158
|
-
border-radius: 50%;
|
|
159
|
-
background: var(--accent-ink, var(--accent));
|
|
160
|
-
transform: scale(0);
|
|
161
|
-
transition: transform var(--motion-press) var(--ease);
|
|
162
|
-
}
|
|
163
|
-
.radio[data-checked="true"] {
|
|
164
|
-
border-color: var(--accent-ink, var(--accent));
|
|
165
|
-
}
|
|
166
|
-
.radio[data-checked="true"] i {
|
|
167
|
-
transform: scale(1);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.item:focus-visible {
|
|
171
|
-
outline: none;
|
|
172
|
-
}
|
|
1
|
+
.item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--menu-item-gap);
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
min-height: var(--menu-item-height);
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: max(
|
|
10
|
+
4px,
|
|
11
|
+
calc((var(--menu-item-height) - var(--menu-item-line-height)) / 2)
|
|
12
|
+
)
|
|
13
|
+
var(--menu-item-padding-x);
|
|
14
|
+
border: 0;
|
|
15
|
+
border-radius: calc(var(--radius) - 4px);
|
|
16
|
+
background: transparent;
|
|
17
|
+
color: var(--fg);
|
|
18
|
+
text-align: left;
|
|
19
|
+
font-family: var(--ui-font);
|
|
20
|
+
font-size: var(--menu-item-font-size);
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
line-height: var(--menu-item-line-height);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
outline: none;
|
|
25
|
+
transition:
|
|
26
|
+
background-color var(--motion-hover),
|
|
27
|
+
color var(--motion-hover);
|
|
28
|
+
}
|
|
29
|
+
.item + .item {
|
|
30
|
+
margin-top: var(--menu-item-spacing);
|
|
31
|
+
}
|
|
32
|
+
@media (pointer: coarse) {
|
|
33
|
+
.item {
|
|
34
|
+
min-height: 44px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.item[data-selected="true"] {
|
|
38
|
+
background: var(--selected);
|
|
39
|
+
}
|
|
40
|
+
.item:where(:not(:disabled):not([aria-disabled="true"])):is(
|
|
41
|
+
:hover,
|
|
42
|
+
:focus-visible,
|
|
43
|
+
[data-active="true"],
|
|
44
|
+
[aria-expanded="true"]
|
|
45
|
+
) {
|
|
46
|
+
background: var(--hover);
|
|
47
|
+
}
|
|
48
|
+
.item[data-selected="true"]:where(
|
|
49
|
+
:not(:disabled):not([aria-disabled="true"])
|
|
50
|
+
):is(:hover, :focus-visible, [data-active="true"]) {
|
|
51
|
+
background: color-mix(in srgb, var(--selected) 75%, var(--hover));
|
|
52
|
+
}
|
|
53
|
+
.item:where(:not(:disabled):not([aria-disabled="true"])):active {
|
|
54
|
+
background: var(--selected);
|
|
55
|
+
}
|
|
56
|
+
.item:disabled,
|
|
57
|
+
.item[aria-disabled="true"] {
|
|
58
|
+
opacity: var(--menu-disabled-opacity);
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
}
|
|
61
|
+
.item[data-tone="danger"] {
|
|
62
|
+
color: var(--danger);
|
|
63
|
+
}
|
|
64
|
+
.leading,
|
|
65
|
+
.trailing {
|
|
66
|
+
display: grid;
|
|
67
|
+
place-items: center;
|
|
68
|
+
flex: 0 0 var(--menu-item-icon-size);
|
|
69
|
+
width: var(--menu-item-icon-size);
|
|
70
|
+
height: var(--menu-item-icon-size);
|
|
71
|
+
}
|
|
72
|
+
.leading {
|
|
73
|
+
color: inherit;
|
|
74
|
+
opacity: 0.8;
|
|
75
|
+
}
|
|
76
|
+
.leading svg,
|
|
77
|
+
.trailing > svg {
|
|
78
|
+
width: var(--menu-item-icon-size);
|
|
79
|
+
height: var(--menu-item-icon-size);
|
|
80
|
+
stroke-width: 1.65;
|
|
81
|
+
}
|
|
82
|
+
.copy {
|
|
83
|
+
flex: 1;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
gap: 2px;
|
|
88
|
+
}
|
|
89
|
+
.label {
|
|
90
|
+
min-width: 0;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
white-space: nowrap;
|
|
94
|
+
}
|
|
95
|
+
.description {
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
font-size: 11px;
|
|
100
|
+
font-weight: 400;
|
|
101
|
+
line-height: 14px;
|
|
102
|
+
color: var(--muted);
|
|
103
|
+
}
|
|
104
|
+
.shortcut {
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
margin-left: auto;
|
|
107
|
+
padding: 0;
|
|
108
|
+
border: 0;
|
|
109
|
+
border-radius: 0;
|
|
110
|
+
background: transparent;
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
font-family: var(--ui-font);
|
|
113
|
+
font-size: var(--menu-shortcut-font-size);
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
line-height: var(--menu-shortcut-line-height);
|
|
116
|
+
font-variant-numeric: tabular-nums;
|
|
117
|
+
color: var(--muted);
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
text-align: right;
|
|
120
|
+
}
|
|
121
|
+
.shortcut ~ .trailing:empty {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
.check {
|
|
125
|
+
color: var(--accent-ink, var(--accent));
|
|
126
|
+
}
|
|
127
|
+
.checkbox,
|
|
128
|
+
.radio {
|
|
129
|
+
display: grid;
|
|
130
|
+
place-items: center;
|
|
131
|
+
width: var(--menu-item-icon-size);
|
|
132
|
+
height: var(--menu-item-icon-size);
|
|
133
|
+
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
134
|
+
background: var(--field);
|
|
135
|
+
transition:
|
|
136
|
+
background var(--motion-hover),
|
|
137
|
+
border-color var(--motion-hover);
|
|
138
|
+
}
|
|
139
|
+
.checkbox {
|
|
140
|
+
border-radius: 4px;
|
|
141
|
+
}
|
|
142
|
+
.checkbox[data-checked="true"] {
|
|
143
|
+
background: var(--accent);
|
|
144
|
+
border-color: var(--accent);
|
|
145
|
+
color: var(--on-accent);
|
|
146
|
+
}
|
|
147
|
+
.checkbox svg {
|
|
148
|
+
width: 12px;
|
|
149
|
+
height: 12px;
|
|
150
|
+
stroke-width: 2;
|
|
151
|
+
}
|
|
152
|
+
.radio {
|
|
153
|
+
border-radius: 50%;
|
|
154
|
+
}
|
|
155
|
+
.radio i {
|
|
156
|
+
width: 6px;
|
|
157
|
+
height: 6px;
|
|
158
|
+
border-radius: 50%;
|
|
159
|
+
background: var(--accent-ink, var(--accent));
|
|
160
|
+
transform: scale(0);
|
|
161
|
+
transition: transform var(--motion-press) var(--ease);
|
|
162
|
+
}
|
|
163
|
+
.radio[data-checked="true"] {
|
|
164
|
+
border-color: var(--accent-ink, var(--accent));
|
|
165
|
+
}
|
|
166
|
+
.radio[data-checked="true"] i {
|
|
167
|
+
transform: scale(1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.item:focus-visible {
|
|
171
|
+
outline: none;
|
|
172
|
+
}
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
.bar {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 24px;
|
|
5
|
-
min-width: 0;
|
|
6
|
-
min-height: 68px;
|
|
7
|
-
padding: 12px 24px;
|
|
8
|
-
color: var(--fg);
|
|
9
|
-
background: var(--surface);
|
|
10
|
-
border-bottom: 1px solid var(--line);
|
|
11
|
-
}
|
|
12
|
-
.brand {
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
gap: 10px;
|
|
16
|
-
flex-shrink: 0;
|
|
17
|
-
color: var(--fg);
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
font-weight: 600;
|
|
20
|
-
}
|
|
21
|
-
.brand > svg {
|
|
22
|
-
width: 24px;
|
|
23
|
-
height: 24px;
|
|
24
|
-
color: var(--accent-ink, var(--accent));
|
|
25
|
-
}
|
|
26
|
-
.links {
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: flex-end;
|
|
30
|
-
gap: 6px;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
margin-left: auto;
|
|
33
|
-
}
|
|
34
|
-
.link,
|
|
35
|
-
.menuItem {
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: flex-start;
|
|
39
|
-
gap: 9px;
|
|
40
|
-
min-height: 38px;
|
|
41
|
-
padding: 8px 13px;
|
|
42
|
-
border: 0;
|
|
43
|
-
border-radius: 9px;
|
|
44
|
-
background: transparent;
|
|
45
|
-
color: var(--muted);
|
|
46
|
-
font: inherit;
|
|
47
|
-
font-size: 13px;
|
|
48
|
-
line-height: 1.5;
|
|
49
|
-
text-decoration: none;
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
cursor: pointer;
|
|
52
|
-
transition:
|
|
53
|
-
color var(--motion-hover),
|
|
54
|
-
background var(--motion-hover);
|
|
55
|
-
}
|
|
56
|
-
.link > svg,
|
|
57
|
-
.menuItem > svg {
|
|
58
|
-
flex-shrink: 0;
|
|
59
|
-
width: 17px;
|
|
60
|
-
height: 17px;
|
|
61
|
-
}
|
|
62
|
-
.link:hover:not(:disabled):not([aria-disabled]),
|
|
63
|
-
.menuItem:hover:not([aria-disabled]) {
|
|
64
|
-
color: var(--fg);
|
|
65
|
-
background: var(--hover);
|
|
66
|
-
}
|
|
67
|
-
.link[aria-current],
|
|
68
|
-
.link[data-selected],
|
|
69
|
-
.menuItem[aria-current] {
|
|
70
|
-
color: var(--navigation-active-color, var(--fg));
|
|
71
|
-
background: var(--selected);
|
|
72
|
-
}
|
|
73
|
-
.link:disabled,
|
|
74
|
-
.link[aria-disabled],
|
|
75
|
-
.menuItem[aria-disabled] {
|
|
76
|
-
opacity: 0.45;
|
|
77
|
-
cursor: not-allowed;
|
|
78
|
-
}
|
|
79
|
-
.link:focus-visible,
|
|
80
|
-
.menuItem:focus-visible,
|
|
81
|
-
.brand:focus-visible {
|
|
82
|
-
outline: 2px solid var(--accent-ink, var(--accent));
|
|
83
|
-
outline-offset: -2px;
|
|
84
|
-
}
|
|
85
|
-
.chevron {
|
|
86
|
-
transition: transform var(--motion-chevron) var(--ease);
|
|
87
|
-
}
|
|
88
|
-
.link[aria-expanded="true"] .chevron {
|
|
89
|
-
transform: rotate(180deg);
|
|
90
|
-
}
|
|
91
|
-
.menuItem {
|
|
92
|
-
min-width: 0;
|
|
93
|
-
width: 100%;
|
|
94
|
-
}
|
|
95
|
-
.menuItem > span {
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
}
|
|
99
|
-
.actions {
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
gap: 8px;
|
|
103
|
-
flex-shrink: 0;
|
|
104
|
-
}
|
|
105
|
-
.mobileToggle {
|
|
106
|
-
display: none;
|
|
107
|
-
}
|
|
108
|
-
@media (max-width: 720px) {
|
|
109
|
-
.bar {
|
|
110
|
-
min-height: 60px;
|
|
111
|
-
padding: 10px 16px;
|
|
112
|
-
gap: 12px;
|
|
113
|
-
}
|
|
114
|
-
.links {
|
|
115
|
-
display: none;
|
|
116
|
-
}
|
|
117
|
-
.actions {
|
|
118
|
-
margin-left: auto;
|
|
119
|
-
}
|
|
120
|
-
.mobileToggle {
|
|
121
|
-
display: inline-flex;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
@media (prefers-reduced-motion: reduce) {
|
|
125
|
-
.link,
|
|
126
|
-
.menuItem,
|
|
127
|
-
.chevron {
|
|
128
|
-
transition: none;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
1
|
+
.bar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
min-height: 68px;
|
|
7
|
+
padding: 12px 24px;
|
|
8
|
+
color: var(--fg);
|
|
9
|
+
background: var(--surface);
|
|
10
|
+
border-bottom: 1px solid var(--line);
|
|
11
|
+
}
|
|
12
|
+
.brand {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 10px;
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
color: var(--fg);
|
|
18
|
+
text-decoration: none;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
}
|
|
21
|
+
.brand > svg {
|
|
22
|
+
width: 24px;
|
|
23
|
+
height: 24px;
|
|
24
|
+
color: var(--accent-ink, var(--accent));
|
|
25
|
+
}
|
|
26
|
+
.links {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
gap: 6px;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
}
|
|
34
|
+
.link,
|
|
35
|
+
.menuItem {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: flex-start;
|
|
39
|
+
gap: 9px;
|
|
40
|
+
min-height: 38px;
|
|
41
|
+
padding: 8px 13px;
|
|
42
|
+
border: 0;
|
|
43
|
+
border-radius: 9px;
|
|
44
|
+
background: transparent;
|
|
45
|
+
color: var(--muted);
|
|
46
|
+
font: inherit;
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
line-height: 1.5;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
transition:
|
|
53
|
+
color var(--motion-hover),
|
|
54
|
+
background var(--motion-hover);
|
|
55
|
+
}
|
|
56
|
+
.link > svg,
|
|
57
|
+
.menuItem > svg {
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
width: 17px;
|
|
60
|
+
height: 17px;
|
|
61
|
+
}
|
|
62
|
+
.link:hover:not(:disabled):not([aria-disabled]),
|
|
63
|
+
.menuItem:hover:not([aria-disabled]) {
|
|
64
|
+
color: var(--fg);
|
|
65
|
+
background: var(--hover);
|
|
66
|
+
}
|
|
67
|
+
.link[aria-current],
|
|
68
|
+
.link[data-selected],
|
|
69
|
+
.menuItem[aria-current] {
|
|
70
|
+
color: var(--navigation-active-color, var(--fg));
|
|
71
|
+
background: var(--selected);
|
|
72
|
+
}
|
|
73
|
+
.link:disabled,
|
|
74
|
+
.link[aria-disabled],
|
|
75
|
+
.menuItem[aria-disabled] {
|
|
76
|
+
opacity: 0.45;
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
.link:focus-visible,
|
|
80
|
+
.menuItem:focus-visible,
|
|
81
|
+
.brand:focus-visible {
|
|
82
|
+
outline: 2px solid var(--accent-ink, var(--accent));
|
|
83
|
+
outline-offset: -2px;
|
|
84
|
+
}
|
|
85
|
+
.chevron {
|
|
86
|
+
transition: transform var(--motion-chevron) var(--ease);
|
|
87
|
+
}
|
|
88
|
+
.link[aria-expanded="true"] .chevron {
|
|
89
|
+
transform: rotate(180deg);
|
|
90
|
+
}
|
|
91
|
+
.menuItem {
|
|
92
|
+
min-width: 0;
|
|
93
|
+
width: 100%;
|
|
94
|
+
}
|
|
95
|
+
.menuItem > span {
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
}
|
|
99
|
+
.actions {
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 8px;
|
|
103
|
+
flex-shrink: 0;
|
|
104
|
+
}
|
|
105
|
+
.mobileToggle {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
@media (max-width: 720px) {
|
|
109
|
+
.bar {
|
|
110
|
+
min-height: 60px;
|
|
111
|
+
padding: 10px 16px;
|
|
112
|
+
gap: 12px;
|
|
113
|
+
}
|
|
114
|
+
.links {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
.actions {
|
|
118
|
+
margin-left: auto;
|
|
119
|
+
}
|
|
120
|
+
.mobileToggle {
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
.link,
|
|
126
|
+
.menuItem,
|
|
127
|
+
.chevron {
|
|
128
|
+
transition: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
package/components/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from "react";
|
|
2
2
|
import { type MenuSide } from "./motion";
|
|
3
|
-
export declare function Popover({ open: requestedOpen, onClose, anchor, children, width, maxHeight, scrollable, side, align, label, role, id, onKeyDown, descriptionId, autoFocus, matchAnchorWidth, className, portalContainer, }: {
|
|
3
|
+
export declare function Popover({ open: requestedOpen, onClose, anchor, children, width, maxHeight, scrollable, side, align, label, role, id, onKeyDown, descriptionId, autoFocus, matchAnchorWidth, className, portalContainer, arrow, offset, }: {
|
|
4
4
|
open: boolean;
|
|
5
5
|
onClose(): void;
|
|
6
6
|
anchor: RefObject<HTMLElement | null>;
|
|
@@ -21,4 +21,8 @@ export declare function Popover({ open: requestedOpen, onClose, anchor, children
|
|
|
21
21
|
matchAnchorWidth?: boolean;
|
|
22
22
|
className?: string;
|
|
23
23
|
portalContainer?: HTMLElement | null;
|
|
24
|
+
/** Show a pointer toward the anchor, with motion originating at that point. */
|
|
25
|
+
arrow?: boolean;
|
|
26
|
+
/** Space between the anchor and surface edge, in CSS pixels. */
|
|
27
|
+
offset?: number;
|
|
24
28
|
}): import("react").ReactPortal | null;
|