@robert-stackflow/oneui 0.6.8 → 0.6.17
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 +62 -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 +266 -42
- 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
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
.tree {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
color: var(--muted);
|
|
4
|
+
font-size: 13px;
|
|
5
|
+
}
|
|
6
|
+
.title {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 8px;
|
|
10
|
+
min-height: 28px;
|
|
11
|
+
margin-bottom: 8px;
|
|
12
|
+
padding-left: 3px;
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
}
|
|
15
|
+
.scroll {
|
|
16
|
+
min-height: 0;
|
|
17
|
+
max-height: min(480px, 65vh);
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
overscroll-behavior: contain;
|
|
20
|
+
}
|
|
21
|
+
.list {
|
|
22
|
+
position: relative;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
}
|
|
25
|
+
.guides {
|
|
26
|
+
position: absolute;
|
|
27
|
+
left: 0;
|
|
28
|
+
top: 0;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
}
|
|
32
|
+
.guides > path {
|
|
33
|
+
fill: none;
|
|
34
|
+
stroke: var(--line);
|
|
35
|
+
stroke-width: 1;
|
|
36
|
+
}
|
|
37
|
+
.list[data-ready="true"] .activeGuide {
|
|
38
|
+
transition: clip-path var(--motion-segment, 240ms) var(--ease);
|
|
39
|
+
}
|
|
40
|
+
.activeGuide > path {
|
|
41
|
+
stroke: var(--fg);
|
|
42
|
+
stroke-linecap: round;
|
|
43
|
+
}
|
|
44
|
+
.thumb {
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: 0;
|
|
47
|
+
top: 0;
|
|
48
|
+
width: 4px;
|
|
49
|
+
height: 4px;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
background: var(--fg);
|
|
52
|
+
offset-anchor: center;
|
|
53
|
+
offset-rotate: 0deg;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
.link {
|
|
57
|
+
position: relative;
|
|
58
|
+
display: block;
|
|
59
|
+
min-height: 32px;
|
|
60
|
+
padding: 6px 8px 6px calc(20px + var(--toc-depth) * 8px);
|
|
61
|
+
color: var(--muted);
|
|
62
|
+
font: inherit;
|
|
63
|
+
line-height: 1.6;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
overflow-wrap: anywhere;
|
|
66
|
+
transition: color var(--motion-hover);
|
|
67
|
+
}
|
|
68
|
+
.link:hover,
|
|
69
|
+
.link[data-active="true"] {
|
|
70
|
+
color: var(--fg);
|
|
71
|
+
}
|
|
72
|
+
.link:focus-visible {
|
|
73
|
+
outline: 2px solid var(--accent-ink, var(--accent));
|
|
74
|
+
outline-offset: -2px;
|
|
75
|
+
border-radius: 5px;
|
|
76
|
+
}
|
|
77
|
+
.rail {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
}
|
|
81
|
+
.trigger {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
align-items: flex-end;
|
|
85
|
+
gap: 0;
|
|
86
|
+
padding: 8px 5px;
|
|
87
|
+
border: 0;
|
|
88
|
+
border-radius: 8px;
|
|
89
|
+
background: transparent;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
.railItem {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: flex-end;
|
|
96
|
+
width: 26px;
|
|
97
|
+
height: 8px;
|
|
98
|
+
padding-right: 3px;
|
|
99
|
+
text-decoration: none;
|
|
100
|
+
}
|
|
101
|
+
.railItem > i {
|
|
102
|
+
width: var(--toc-line-length, 12px);
|
|
103
|
+
height: 2px;
|
|
104
|
+
border-radius: 999px;
|
|
105
|
+
background: var(--muted);
|
|
106
|
+
opacity: 0.22;
|
|
107
|
+
transform-origin: right center;
|
|
108
|
+
transform: scaleX(var(--toc-line-scale, 1));
|
|
109
|
+
transition:
|
|
110
|
+
transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
|
|
111
|
+
opacity 180ms var(--ease),
|
|
112
|
+
background-color 180ms var(--ease);
|
|
113
|
+
}
|
|
114
|
+
.railItem[data-active="true"] > i {
|
|
115
|
+
background: var(--fg);
|
|
116
|
+
opacity: 1;
|
|
117
|
+
}
|
|
118
|
+
.railItem:not([data-active="true"]):hover > i {
|
|
119
|
+
opacity: 0.65;
|
|
120
|
+
}
|
|
121
|
+
.trigger:focus-visible {
|
|
122
|
+
outline: 2px solid var(--accent-ink, var(--accent));
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
}
|
|
125
|
+
.card {
|
|
126
|
+
padding: 12px;
|
|
127
|
+
min-height: 0;
|
|
128
|
+
flex-shrink: 1;
|
|
129
|
+
}
|
|
130
|
+
.card .scroll {
|
|
131
|
+
max-height: min(440px, calc(100dvh - 110px));
|
|
132
|
+
}
|
|
133
|
+
@media (prefers-reduced-motion: reduce) {
|
|
134
|
+
.activeGuide,
|
|
135
|
+
.thumb,
|
|
136
|
+
.link,
|
|
137
|
+
.railItem > i {
|
|
138
|
+
transition: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.flatMenu {
|
|
143
|
+
min-width: 0;
|
|
144
|
+
color: var(--fg);
|
|
145
|
+
font-size: 13px;
|
|
146
|
+
}
|
|
147
|
+
.flatMenu .title {
|
|
148
|
+
padding: 0 8px;
|
|
149
|
+
margin-bottom: 10px;
|
|
150
|
+
}
|
|
151
|
+
.flatList {
|
|
152
|
+
position: relative;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
gap: 3px;
|
|
156
|
+
}
|
|
157
|
+
.flatLink {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: baseline;
|
|
160
|
+
gap: 12px;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
padding: 9px 10px;
|
|
163
|
+
border-radius: 7px;
|
|
164
|
+
color: var(--muted);
|
|
165
|
+
line-height: 1.5;
|
|
166
|
+
text-decoration: none;
|
|
167
|
+
transition:
|
|
168
|
+
background-color var(--motion-hover),
|
|
169
|
+
color var(--motion-hover);
|
|
170
|
+
}
|
|
171
|
+
.flatLink:hover {
|
|
172
|
+
background: var(--hover);
|
|
173
|
+
color: var(--fg);
|
|
174
|
+
}
|
|
175
|
+
.flatLink[data-active="true"] {
|
|
176
|
+
color: var(--fg);
|
|
177
|
+
}
|
|
178
|
+
.flatLink[aria-current] {
|
|
179
|
+
background: var(--selected);
|
|
180
|
+
}
|
|
181
|
+
.flatLink:focus-visible {
|
|
182
|
+
outline: 2px solid var(--accent-ink, var(--accent));
|
|
183
|
+
outline-offset: -2px;
|
|
184
|
+
}
|
|
185
|
+
.number {
|
|
186
|
+
flex: 0 0 18px;
|
|
187
|
+
color: var(--muted);
|
|
188
|
+
font-size: 10px;
|
|
189
|
+
font-variant-numeric: tabular-nums;
|
|
190
|
+
opacity: 0.7;
|
|
191
|
+
}
|
|
192
|
+
.flatLink > span:last-child {
|
|
193
|
+
min-width: 0;
|
|
194
|
+
overflow-wrap: anywhere;
|
|
195
|
+
}
|
|
196
|
+
.card .flatMenu .scroll {
|
|
197
|
+
max-height: min(380px, calc(100dvh - 110px));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.list[data-ready="true"] .thumb {
|
|
201
|
+
transition:
|
|
202
|
+
offset-distance var(--motion-segment, 240ms) var(--ease),
|
|
203
|
+
opacity var(--motion-hover);
|
|
204
|
+
}
|
|
205
|
+
@media (prefers-reduced-motion: reduce) {
|
|
206
|
+
.list[data-ready="true"] .thumb,
|
|
207
|
+
.list[data-ready="true"] .activeGuide {
|
|
208
|
+
transition: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.railItem:focus-visible {
|
|
213
|
+
outline: 2px solid var(--accent-ink, var(--accent));
|
|
214
|
+
outline-offset: 1px;
|
|
215
|
+
border-radius: 4px;
|
|
216
|
+
}
|
|
217
|
+
.excerpt {
|
|
218
|
+
display: -webkit-box;
|
|
219
|
+
-webkit-box-orient: vertical;
|
|
220
|
+
-webkit-line-clamp: 3;
|
|
221
|
+
overflow: hidden;
|
|
222
|
+
margin-top: 6px;
|
|
223
|
+
color: var(--muted);
|
|
224
|
+
font-size: 12px;
|
|
225
|
+
line-height: 1.6;
|
|
226
|
+
font-weight: 400;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.previewSurface[data-motion-phase="visible"] {
|
|
230
|
+
transition:
|
|
231
|
+
top 160ms var(--ease),
|
|
232
|
+
left 160ms var(--ease);
|
|
233
|
+
}
|
|
234
|
+
.previewTitle {
|
|
235
|
+
display: -webkit-box;
|
|
236
|
+
-webkit-box-orient: vertical;
|
|
237
|
+
-webkit-line-clamp: 2;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
color: var(--fg);
|
|
240
|
+
font-size: 13px;
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
line-height: 1.5;
|
|
243
|
+
}
|
|
244
|
+
.flatMenu[data-preview-mode="single"] .flatLink {
|
|
245
|
+
padding: 2px;
|
|
246
|
+
background: transparent;
|
|
247
|
+
}
|
|
248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
249
|
+
.previewSurface[data-motion-phase="visible"] {
|
|
250
|
+
transition: none;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Textarea } from "./Textarea";
|
|
3
|
+
import { type SettingControlOptions } from "./settingRowControl";
|
|
4
|
+
export type TextAreaSettingRowProps = SettingControlOptions & Omit<ComponentProps<typeof Textarea>, "title" | "label" | "value" | "defaultValue" | "onChange"> & {
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?(value: string): void;
|
|
8
|
+
};
|
|
9
|
+
export declare function TextAreaSettingRow({ title, description, divider, titleBold, align, controlWidth, id, rows, onChange, "aria-describedby": describedBy, ...textarea }: TextAreaSettingRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Textarea } from "./Textarea.js";
|
|
3
|
+
import { SettingRow } from "./SettingRow.js";
|
|
4
|
+
import {
|
|
5
|
+
useSettingRowControl
|
|
6
|
+
} from "./settingRowControl.js";
|
|
7
|
+
function TextAreaSettingRow({
|
|
8
|
+
title,
|
|
9
|
+
description,
|
|
10
|
+
divider,
|
|
11
|
+
titleBold,
|
|
12
|
+
align = "start",
|
|
13
|
+
controlWidth = 400,
|
|
14
|
+
id,
|
|
15
|
+
rows = 3,
|
|
16
|
+
onChange,
|
|
17
|
+
"aria-describedby": describedBy,
|
|
18
|
+
...textarea
|
|
19
|
+
}) {
|
|
20
|
+
const control = useSettingRowControl(id, description, describedBy);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
SettingRow,
|
|
23
|
+
{
|
|
24
|
+
title,
|
|
25
|
+
description,
|
|
26
|
+
divider,
|
|
27
|
+
titleBold,
|
|
28
|
+
align,
|
|
29
|
+
controlWidth,
|
|
30
|
+
controlId: control.controlId,
|
|
31
|
+
descriptionId: control.descriptionId,
|
|
32
|
+
children: /* @__PURE__ */ jsx(
|
|
33
|
+
Textarea,
|
|
34
|
+
{
|
|
35
|
+
...textarea,
|
|
36
|
+
rows,
|
|
37
|
+
id: control.controlId,
|
|
38
|
+
"aria-describedby": control.describedBy,
|
|
39
|
+
onChange: onChange ? (event) => onChange(event.target.value) : void 0
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
TextAreaSettingRow
|
|
47
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Input } from "./Input";
|
|
3
|
+
import { type SettingControlOptions } from "./settingRowControl";
|
|
4
|
+
export type TextSettingRowProps = SettingControlOptions & Omit<ComponentProps<typeof Input>, "title" | "label" | "value" | "defaultValue" | "onChange"> & {
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?(value: string): void;
|
|
8
|
+
};
|
|
9
|
+
export declare function TextSettingRow({ title, description, divider, titleBold, align, controlWidth, id, onChange, "aria-describedby": describedBy, ...input }: TextSettingRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from "./Input.js";
|
|
3
|
+
import { SettingRow } from "./SettingRow.js";
|
|
4
|
+
import {
|
|
5
|
+
useSettingRowControl
|
|
6
|
+
} from "./settingRowControl.js";
|
|
7
|
+
function TextSettingRow({
|
|
8
|
+
title,
|
|
9
|
+
description,
|
|
10
|
+
divider,
|
|
11
|
+
titleBold,
|
|
12
|
+
align,
|
|
13
|
+
controlWidth = 320,
|
|
14
|
+
id,
|
|
15
|
+
onChange,
|
|
16
|
+
"aria-describedby": describedBy,
|
|
17
|
+
...input
|
|
18
|
+
}) {
|
|
19
|
+
const control = useSettingRowControl(id, description, describedBy);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
SettingRow,
|
|
22
|
+
{
|
|
23
|
+
title,
|
|
24
|
+
description,
|
|
25
|
+
divider,
|
|
26
|
+
titleBold,
|
|
27
|
+
align,
|
|
28
|
+
controlWidth,
|
|
29
|
+
controlId: control.controlId,
|
|
30
|
+
descriptionId: control.descriptionId,
|
|
31
|
+
children: /* @__PURE__ */ jsx(
|
|
32
|
+
Input,
|
|
33
|
+
{
|
|
34
|
+
...input,
|
|
35
|
+
id: control.controlId,
|
|
36
|
+
"aria-describedby": control.describedBy,
|
|
37
|
+
onChange: onChange ? (event) => onChange(event.target.value) : void 0
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
TextSettingRow
|
|
45
|
+
};
|