@robert-stackflow/oneui 0.6.8 → 0.6.16
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 +58 -0
- package/README.md +255 -188
- package/components/AccountItem.module.css +103 -103
- package/components/Alert.d.ts +2 -9
- package/components/Alert.js +2 -40
- package/components/AppShell.d.ts +7 -7
- package/components/AppShell.js +37 -33
- package/components/AppShell.module.css +223 -271
- package/components/AppearanceSettings.js +25 -32
- package/components/Badge.module.css +30 -30
- package/components/Banner.d.ts +17 -0
- package/components/Banner.js +99 -0
- package/components/Banner.module.css +143 -0
- package/components/BarChart.module.css +35 -34
- package/components/Breadcrumb.module.css +97 -97
- package/components/Button.module.css +120 -120
- package/components/Cascader.js +1 -0
- package/components/CharacterPicker.js +2 -0
- package/components/Checkbox.module.css +95 -95
- package/components/Combobox.js +1 -0
- package/components/Combobox.module.css +6 -1
- package/components/CommandPalette.js +2 -2
- package/components/ContributionCalendar.module.css +121 -121
- package/components/Control.module.css +86 -86
- package/components/DataTable.d.ts +3 -2
- package/components/DataTable.js +92 -66
- package/components/DataTable.module.css +3 -31
- package/components/DatePicker.js +1 -0
- package/components/DateRangePicker.js +1 -0
- package/components/Dialog.d.ts +3 -1
- package/components/Dialog.js +11 -4
- package/components/Dialog.module.css +139 -97
- package/components/DialogVariants.d.ts +2 -1
- package/components/DialogVariants.js +35 -7
- package/components/HierarchyPicker.module.css +185 -181
- package/components/IconPicker.js +2 -0
- package/components/Indicator.module.css +83 -83
- package/components/Layout.module.css +82 -82
- package/components/Markdown.d.ts +13 -0
- package/components/Markdown.js +164 -0
- package/components/Markdown.module.css +227 -0
- package/components/MenuItem.module.css +172 -172
- package/components/MultiSelect.js +1 -0
- package/components/MultiSelect.module.css +2 -0
- package/components/NavBar.d.ts +20 -0
- package/components/NavBar.js +197 -0
- package/components/NavBar.module.css +130 -0
- package/components/NavigationSurface.module.css +27 -0
- package/components/Picker.module.css +7 -0
- package/components/Popover.d.ts +6 -1
- package/components/Popover.js +39 -13
- package/components/Popover.module.css +8 -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/SelectSettingRow.d.ts +7 -0
- package/components/SelectSettingRow.js +58 -0
- package/components/SettingRow.d.ts +9 -3
- package/components/SettingRow.js +32 -8
- package/components/SettingRow.module.css +17 -0
- package/components/SettingsLayout.d.ts +15 -3
- package/components/SettingsLayout.js +46 -29
- package/components/SideBar.d.ts +9 -0
- package/components/SideBar.js +30 -0
- package/components/SidebarNavigation.d.ts +24 -3
- package/components/SidebarNavigation.js +274 -47
- package/components/SidebarNavigation.module.css +352 -130
- package/components/Slider.module.css +19 -19
- package/components/Steps.module.css +176 -176
- package/components/Switch.d.ts +3 -1
- package/components/Switch.js +5 -1
- package/components/Switch.module.css +59 -59
- package/components/SwitchSettingRow.d.ts +7 -0
- package/components/SwitchSettingRow.js +45 -0
- package/components/Table.d.ts +8 -1
- package/components/Table.js +34 -17
- package/components/Table.module.css +87 -48
- package/components/TableMarkup.d.ts +2 -1
- package/components/TableMarkup.js +18 -1
- package/components/TableOfContents.d.ts +22 -0
- package/components/TableOfContents.js +462 -0
- package/components/TableOfContents.module.css +252 -0
- package/components/TextAreaSettingRow.d.ts +9 -0
- package/components/TextAreaSettingRow.js +47 -0
- package/components/TextSettingRow.d.ts +9 -0
- package/components/TextSettingRow.js +45 -0
- package/components/ThemePicker.module.css +178 -178
- package/components/ThemeProvider.js +2 -0
- package/components/TimeColumns.module.css +47 -47
- package/components/Timeline.module.css +202 -202
- package/components/Toast.d.ts +8 -1
- package/components/Toast.js +49 -17
- package/components/Toast.module.css +25 -0
- package/components/ToastProvider.d.ts +4 -1
- package/components/ToastProvider.js +67 -12
- package/components/TreeSelect.js +1 -0
- package/components/TreeTable.d.ts +3 -3
- package/components/TreeTable.js +12 -2
- package/components/TreeTable.module.css +57 -53
- package/components/createToaster.d.ts +2 -1
- package/components/createToaster.js +28 -14
- package/components/index.d.ts +18 -1
- package/components/index.js +24 -0
- package/components/motion.d.ts +1 -0
- package/components/motion.js +18 -6
- package/components/settingRowControl.d.ts +7 -0
- package/components/settingRowControl.js +15 -0
- package/package.json +57 -3
- package/styles/base.css +206 -206
- package/styles/blue.css +270 -268
- package/styles/minimal.css +1 -0
|
@@ -1,271 +1,223 @@
|
|
|
1
|
-
.shell {
|
|
2
|
-
height: 100dvh;
|
|
3
|
-
display: grid;
|
|
4
|
-
grid-template-columns: 228px minmax(0, 1fr);
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
color: var(--fg);
|
|
7
|
-
background: var(--app-background, var(--canvas));
|
|
8
|
-
font: 14px/1.6 var(--ui-font, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
9
|
-
transition: grid-template-columns var(--motion-panel) var(--ease);
|
|
10
|
-
}
|
|
11
|
-
.shell[data-collapsed="true"] {
|
|
12
|
-
grid-template-columns: 76px minmax(0, 1fr);
|
|
13
|
-
}
|
|
14
|
-
.sidebar {
|
|
15
|
-
min-width: 0;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
gap: 24px;
|
|
19
|
-
padding: 24px 16px 18px;
|
|
20
|
-
background: var(--navigation);
|
|
21
|
-
border-right: 1px solid var(--line);
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
}
|
|
24
|
-
.brand {
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: 10px;
|
|
28
|
-
min-height: 38px;
|
|
29
|
-
padding: 0 10px;
|
|
30
|
-
color: var(--fg);
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
flex-shrink: 0;
|
|
33
|
-
}
|
|
34
|
-
.brand strong {
|
|
35
|
-
font-size: 16px;
|
|
36
|
-
letter-spacing: -0.4px;
|
|
37
|
-
}
|
|
38
|
-
.mark {
|
|
39
|
-
display: grid;
|
|
40
|
-
place-items: center;
|
|
41
|
-
width: 32px;
|
|
42
|
-
height: 32px;
|
|
43
|
-
flex-shrink: 0;
|
|
44
|
-
border-radius: 10px;
|
|
45
|
-
background: var(--accent);
|
|
46
|
-
color: var(--on-accent);
|
|
47
|
-
}
|
|
48
|
-
.navigation {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
gap: 4px;
|
|
52
|
-
min-height: 0;
|
|
53
|
-
overflow: auto;
|
|
54
|
-
}
|
|
55
|
-
.
|
|
56
|
-
display: flex;
|
|
57
|
-
|
|
58
|
-
gap:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
min-width: 0;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
.
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
.
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
.headerStart,
|
|
225
|
-
.headerEnd {
|
|
226
|
-
gap: 8px;
|
|
227
|
-
}
|
|
228
|
-
.page {
|
|
229
|
-
padding: 28px 24px 40px;
|
|
230
|
-
}
|
|
231
|
-
.shell[data-header="false"] .page {
|
|
232
|
-
padding-top: 64px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
@media (max-width: 540px) {
|
|
236
|
-
.page {
|
|
237
|
-
padding: 24px 16px 36px;
|
|
238
|
-
}
|
|
239
|
-
.page h1 {
|
|
240
|
-
font-size: 25px;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.page {
|
|
245
|
-
font-size: 13px;
|
|
246
|
-
line-height: 1.6;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.header[data-window-controls="true"] {
|
|
250
|
-
padding-right: 8px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.navigationGroup {
|
|
254
|
-
display: flex;
|
|
255
|
-
flex-direction: column;
|
|
256
|
-
gap: 4px;
|
|
257
|
-
}
|
|
258
|
-
.navigationGroup + .navigationGroup {
|
|
259
|
-
margin-top: 18px;
|
|
260
|
-
padding-top: 18px;
|
|
261
|
-
border-top: 1px solid var(--line);
|
|
262
|
-
}
|
|
263
|
-
.groupLabel {
|
|
264
|
-
color: var(--muted);
|
|
265
|
-
font-size: 11px;
|
|
266
|
-
padding: 0 12px 6px;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.shell[data-collapsed="true"] > .sidebar .groupLabel {
|
|
270
|
-
display: none;
|
|
271
|
-
}
|
|
1
|
+
.shell {
|
|
2
|
+
height: 100dvh;
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: 228px minmax(0, 1fr);
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
color: var(--fg);
|
|
7
|
+
background: var(--app-background, var(--canvas));
|
|
8
|
+
font: 14px/1.6 var(--ui-font, "Segoe UI", "Microsoft YaHei", sans-serif);
|
|
9
|
+
transition: grid-template-columns var(--motion-panel) var(--ease);
|
|
10
|
+
}
|
|
11
|
+
.shell[data-collapsed="true"] {
|
|
12
|
+
grid-template-columns: 76px minmax(0, 1fr);
|
|
13
|
+
}
|
|
14
|
+
.sidebar {
|
|
15
|
+
min-width: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 24px;
|
|
19
|
+
padding: 24px 16px 18px;
|
|
20
|
+
background: var(--navigation);
|
|
21
|
+
border-right: 1px solid var(--line);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
.brand {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 10px;
|
|
28
|
+
min-height: 38px;
|
|
29
|
+
padding: 0 10px;
|
|
30
|
+
color: var(--fg);
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
}
|
|
34
|
+
.brand strong {
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
letter-spacing: -0.4px;
|
|
37
|
+
}
|
|
38
|
+
.mark {
|
|
39
|
+
display: grid;
|
|
40
|
+
place-items: center;
|
|
41
|
+
width: 32px;
|
|
42
|
+
height: 32px;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
border-radius: 10px;
|
|
45
|
+
background: var(--accent);
|
|
46
|
+
color: var(--on-accent);
|
|
47
|
+
}
|
|
48
|
+
.navigation {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 4px;
|
|
52
|
+
min-height: 0;
|
|
53
|
+
overflow: auto;
|
|
54
|
+
}
|
|
55
|
+
.bottom {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 8px;
|
|
59
|
+
margin-top: auto;
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
}
|
|
62
|
+
.workspace {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
min-height: 0;
|
|
67
|
+
}
|
|
68
|
+
.header {
|
|
69
|
+
height: 60px;
|
|
70
|
+
min-height: 60px;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
gap: 16px;
|
|
75
|
+
padding: 0 8px;
|
|
76
|
+
border-bottom: 1px solid var(--line);
|
|
77
|
+
background: var(--surface);
|
|
78
|
+
color: var(--fg);
|
|
79
|
+
}
|
|
80
|
+
.header[data-draggable="true"] {
|
|
81
|
+
-webkit-app-region: drag;
|
|
82
|
+
}
|
|
83
|
+
.header button,
|
|
84
|
+
.header a,
|
|
85
|
+
.headerEnd {
|
|
86
|
+
-webkit-app-region: no-drag;
|
|
87
|
+
}
|
|
88
|
+
.headerStart,
|
|
89
|
+
.headerEnd {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 12px;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
}
|
|
95
|
+
.headerEnd {
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
.title {
|
|
99
|
+
font-size: 13px;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
}
|
|
104
|
+
.main {
|
|
105
|
+
flex: 1;
|
|
106
|
+
min-height: 0;
|
|
107
|
+
overflow: auto;
|
|
108
|
+
outline: none;
|
|
109
|
+
scrollbar-gutter: stable;
|
|
110
|
+
overscroll-behavior: contain;
|
|
111
|
+
}
|
|
112
|
+
.page {
|
|
113
|
+
width: 100%;
|
|
114
|
+
max-width: 1390px;
|
|
115
|
+
margin: 0 auto;
|
|
116
|
+
padding: 42px 40px 52px;
|
|
117
|
+
--page-max-width: none;
|
|
118
|
+
--page-margin: 0;
|
|
119
|
+
--page-inset: 0;
|
|
120
|
+
--page-wide-top: 0;
|
|
121
|
+
--page-title-size: 28px;
|
|
122
|
+
--page-title-line-height: 1.3;
|
|
123
|
+
}
|
|
124
|
+
.page h1 {
|
|
125
|
+
margin: 0;
|
|
126
|
+
font-size: 28px;
|
|
127
|
+
line-height: 1.3;
|
|
128
|
+
}
|
|
129
|
+
.shell[data-collapsed="true"] > .sidebar .brand strong,
|
|
130
|
+
.shell[data-collapsed="true"] > .sidebar .navigation a span {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
.shell[data-collapsed="true"] > .sidebar {
|
|
134
|
+
padding-inline: 12px;
|
|
135
|
+
}
|
|
136
|
+
.shell[data-collapsed="true"] > .sidebar .brand {
|
|
137
|
+
padding: 0;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
}
|
|
140
|
+
.shell[data-collapsed="true"] > .sidebar .navigation a {
|
|
141
|
+
justify-content: center;
|
|
142
|
+
padding-inline: 0;
|
|
143
|
+
}
|
|
144
|
+
.mobileToggle {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
.floatingNavigation {
|
|
148
|
+
position: fixed;
|
|
149
|
+
z-index: 50;
|
|
150
|
+
top: 12px;
|
|
151
|
+
left: 12px;
|
|
152
|
+
background: var(--surface);
|
|
153
|
+
border: 1px solid var(--line);
|
|
154
|
+
box-shadow: var(--shadow-sm);
|
|
155
|
+
}
|
|
156
|
+
.mobileNav {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: 24px;
|
|
160
|
+
min-height: 100%;
|
|
161
|
+
padding: 8px 0;
|
|
162
|
+
}
|
|
163
|
+
.mobileNav .bottom {
|
|
164
|
+
margin-top: 24px;
|
|
165
|
+
}
|
|
166
|
+
.skip {
|
|
167
|
+
position: fixed;
|
|
168
|
+
top: -60px;
|
|
169
|
+
left: 12px;
|
|
170
|
+
z-index: 5000;
|
|
171
|
+
padding: 10px 16px;
|
|
172
|
+
background: var(--surface);
|
|
173
|
+
color: var(--fg);
|
|
174
|
+
}
|
|
175
|
+
.skip:focus {
|
|
176
|
+
top: 12px;
|
|
177
|
+
}
|
|
178
|
+
@media (max-width: 800px) {
|
|
179
|
+
.shell,
|
|
180
|
+
.shell[data-collapsed="true"] {
|
|
181
|
+
grid-template-columns: minmax(0, 1fr);
|
|
182
|
+
}
|
|
183
|
+
.sidebar {
|
|
184
|
+
display: none;
|
|
185
|
+
}
|
|
186
|
+
.desktopToggle {
|
|
187
|
+
display: none;
|
|
188
|
+
}
|
|
189
|
+
.mobileToggle {
|
|
190
|
+
display: grid;
|
|
191
|
+
}
|
|
192
|
+
.header {
|
|
193
|
+
padding-inline: 8px;
|
|
194
|
+
gap: 8px;
|
|
195
|
+
}
|
|
196
|
+
.headerStart,
|
|
197
|
+
.headerEnd {
|
|
198
|
+
gap: 8px;
|
|
199
|
+
}
|
|
200
|
+
.page {
|
|
201
|
+
padding: 28px 24px 40px;
|
|
202
|
+
}
|
|
203
|
+
.shell[data-header="false"] .page {
|
|
204
|
+
padding-top: 64px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
@media (max-width: 540px) {
|
|
208
|
+
.page {
|
|
209
|
+
padding: 24px 16px 36px;
|
|
210
|
+
}
|
|
211
|
+
.page h1 {
|
|
212
|
+
font-size: 25px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.page {
|
|
217
|
+
font-size: 13px;
|
|
218
|
+
line-height: 1.6;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.header[data-window-controls="true"] {
|
|
222
|
+
padding-right: 8px;
|
|
223
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SwitchSettingRow } from "./SwitchSettingRow.js";
|
|
3
|
+
import { SelectSettingRow } from "./SelectSettingRow.js";
|
|
2
4
|
import { Check, RotateCcw } from "lucide-react";
|
|
3
5
|
import { ThemeStylePicker } from "./ThemeStylePicker.js";
|
|
4
6
|
import { ThemePicker } from "./ThemePicker.js";
|
|
5
7
|
import { ColorField } from "./ColorField.js";
|
|
6
8
|
import { SettingsCard } from "./SettingsLayout.js";
|
|
7
9
|
import { SettingRow } from "./SettingRow.js";
|
|
8
|
-
import { Select } from "./Select.js";
|
|
9
10
|
import { NumberInput } from "./NumberInput.js";
|
|
10
|
-
import { Switch } from "./Switch.js";
|
|
11
11
|
import { Button } from "./Button.js";
|
|
12
12
|
import { useToast } from "./ToastProvider.js";
|
|
13
13
|
import { appearanceDefaults } from "./appearance.js";
|
|
@@ -100,9 +100,10 @@ function AppearanceSettings({
|
|
|
100
100
|
)
|
|
101
101
|
}
|
|
102
102
|
) }),
|
|
103
|
-
/* @__PURE__ */ jsx(
|
|
104
|
-
|
|
103
|
+
/* @__PURE__ */ jsx(
|
|
104
|
+
SelectSettingRow,
|
|
105
105
|
{
|
|
106
|
+
title: "\u5B57\u4F53",
|
|
106
107
|
label: "\u5B57\u4F53",
|
|
107
108
|
value: settings.font,
|
|
108
109
|
onChange: (font) => update({ font }),
|
|
@@ -113,10 +114,11 @@ function AppearanceSettings({
|
|
|
113
114
|
{ value: "sans-serif", label: "\u65E0\u886C\u7EBF" }
|
|
114
115
|
]
|
|
115
116
|
}
|
|
116
|
-
)
|
|
117
|
-
/* @__PURE__ */ jsx(
|
|
118
|
-
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
SelectSettingRow,
|
|
119
120
|
{
|
|
121
|
+
title: "\u95F4\u8DDD",
|
|
120
122
|
label: "\u754C\u9762\u95F4\u8DDD",
|
|
121
123
|
value: settings.density,
|
|
122
124
|
onChange: (density) => update({ density }),
|
|
@@ -125,7 +127,7 @@ function AppearanceSettings({
|
|
|
125
127
|
{ value: "compact", label: "\u7D27\u51D1" }
|
|
126
128
|
]
|
|
127
129
|
}
|
|
128
|
-
)
|
|
130
|
+
),
|
|
129
131
|
/* @__PURE__ */ jsxs(SettingRow, { title: "\u5706\u89D2", children: [
|
|
130
132
|
/* @__PURE__ */ jsx(
|
|
131
133
|
NumberInput,
|
|
@@ -143,26 +145,22 @@ function AppearanceSettings({
|
|
|
143
145
|
/* @__PURE__ */ jsx("h2", { children: "\u63D0\u793A\u4E0E\u52A8\u6548" }),
|
|
144
146
|
/* @__PURE__ */ jsxs(SettingsCard, { children: [
|
|
145
147
|
/* @__PURE__ */ jsx(
|
|
146
|
-
|
|
148
|
+
SelectSettingRow,
|
|
147
149
|
{
|
|
148
150
|
title: "Tooltip \u4F4D\u7F6E",
|
|
149
151
|
description: "\u7A7A\u95F4\u4E0D\u8DB3\u65F6\u81EA\u52A8\u907F\u8BA9\u7A97\u53E3\u8FB9\u7F18\u3002",
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
tooltipPlacement
|
|
157
|
-
}),
|
|
158
|
-
options: tooltipOptions
|
|
159
|
-
}
|
|
160
|
-
)
|
|
152
|
+
label: "Tooltip \u4F4D\u7F6E",
|
|
153
|
+
value: settings.tooltipPlacement,
|
|
154
|
+
onChange: (tooltipPlacement) => update({
|
|
155
|
+
tooltipPlacement
|
|
156
|
+
}),
|
|
157
|
+
options: tooltipOptions
|
|
161
158
|
}
|
|
162
159
|
),
|
|
163
|
-
/* @__PURE__ */ jsx(
|
|
164
|
-
|
|
160
|
+
/* @__PURE__ */ jsx(
|
|
161
|
+
SelectSettingRow,
|
|
165
162
|
{
|
|
163
|
+
title: "Toast \u4F4D\u7F6E",
|
|
166
164
|
label: "Toast \u4F4D\u7F6E",
|
|
167
165
|
value: settings.toastPosition,
|
|
168
166
|
onChange: (toastPosition) => update({
|
|
@@ -170,20 +168,15 @@ function AppearanceSettings({
|
|
|
170
168
|
}),
|
|
171
169
|
options: toastOptions
|
|
172
170
|
}
|
|
173
|
-
)
|
|
171
|
+
),
|
|
174
172
|
/* @__PURE__ */ jsx(
|
|
175
|
-
|
|
173
|
+
SwitchSettingRow,
|
|
176
174
|
{
|
|
177
175
|
title: "\u754C\u9762\u52A8\u6548",
|
|
178
176
|
description: "\u540C\u65F6\u9075\u5FAA\u7CFB\u7EDF\u51CF\u5C11\u52A8\u6001\u6548\u679C\u7684\u504F\u597D\u3002",
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
label: "\u542F\u7528\u754C\u9762\u52A8\u6548",
|
|
183
|
-
checked: settings.motion,
|
|
184
|
-
onChange: (motion) => update({ motion })
|
|
185
|
-
}
|
|
186
|
-
)
|
|
177
|
+
label: "\u542F\u7528\u754C\u9762\u52A8\u6548",
|
|
178
|
+
checked: settings.motion,
|
|
179
|
+
onChange: (motion) => update({ motion })
|
|
187
180
|
}
|
|
188
181
|
)
|
|
189
182
|
] }),
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
.badge {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 5px;
|
|
5
|
-
padding: 3px 8px;
|
|
6
|
-
font-size: 10px;
|
|
7
|
-
border-radius: 5px;
|
|
8
|
-
background: var(--soft);
|
|
9
|
-
color: var(--muted);
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
}
|
|
12
|
-
.success {
|
|
13
|
-
color: var(--success);
|
|
14
|
-
background: color-mix(in srgb, var(--success) 8%, var(--surface));
|
|
15
|
-
}
|
|
16
|
-
.warning {
|
|
17
|
-
color: var(--warning);
|
|
18
|
-
background: color-mix(in srgb, var(--warning) 8%, var(--surface));
|
|
19
|
-
}
|
|
20
|
-
.neutral {
|
|
21
|
-
color: var(--muted);
|
|
22
|
-
}
|
|
23
|
-
.accent {
|
|
24
|
-
color: var(--accent);
|
|
25
|
-
background: var(--accent-soft);
|
|
26
|
-
}
|
|
27
|
-
.danger {
|
|
28
|
-
color: var(--danger);
|
|
29
|
-
background: var(--danger-soft);
|
|
30
|
-
}
|
|
1
|
+
.badge {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 5px;
|
|
5
|
+
padding: 3px 8px;
|
|
6
|
+
font-size: 10px;
|
|
7
|
+
border-radius: 5px;
|
|
8
|
+
background: var(--soft);
|
|
9
|
+
color: var(--muted);
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
}
|
|
12
|
+
.success {
|
|
13
|
+
color: var(--success);
|
|
14
|
+
background: color-mix(in srgb, var(--success) 8%, var(--surface));
|
|
15
|
+
}
|
|
16
|
+
.warning {
|
|
17
|
+
color: var(--warning);
|
|
18
|
+
background: color-mix(in srgb, var(--warning) 8%, var(--surface));
|
|
19
|
+
}
|
|
20
|
+
.neutral {
|
|
21
|
+
color: var(--muted);
|
|
22
|
+
}
|
|
23
|
+
.accent {
|
|
24
|
+
color: var(--accent-ink, var(--accent));
|
|
25
|
+
background: var(--accent-soft);
|
|
26
|
+
}
|
|
27
|
+
.danger {
|
|
28
|
+
color: var(--danger);
|
|
29
|
+
background: var(--danger-soft);
|
|
30
|
+
}
|