@robert-stackflow/oneui 0.6.22 → 0.6.24
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 +37 -24
- package/README.md +270 -270
- 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/CommandPalette.d.ts +7 -1
- package/components/CommandPalette.js +22 -8
- package/components/ContextMenu.d.ts +3 -1
- package/components/ContextMenu.js +25 -4
- package/components/ContextMenuPanel.d.ts +2 -1
- package/components/ContextMenuPanel.js +3 -2
- package/components/ContributionCalendar.module.css +121 -121
- package/components/Control.module.css +86 -86
- package/components/DataTable.module.css +75 -75
- package/components/Dialog.d.ts +2 -1
- package/components/Dialog.js +3 -1
- package/components/Dialog.module.css +143 -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/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/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.d.ts +1 -0
- package/components/Segmented.js +6 -3
- package/components/Segmented.module.css +90 -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/package.json +1 -1
- package/styles/base.css +206 -206
- package/styles/blue.css +270 -270
- package/styles/minimal.css +319 -319
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
.surface {
|
|
2
|
-
height: var(--control-height);
|
|
3
|
-
min-width: 0;
|
|
4
|
-
border: 1px solid var(--control-border, var(--line));
|
|
5
|
-
border-radius: var(--field-radius);
|
|
6
|
-
background: var(--field);
|
|
7
|
-
color: var(--fg);
|
|
8
|
-
font-size: var(--field-font-size);
|
|
9
|
-
line-height: var(--field-line-height);
|
|
10
|
-
outline: none;
|
|
11
|
-
transition:
|
|
12
|
-
border-color var(--motion-hover),
|
|
13
|
-
box-shadow var(--motion-hover),
|
|
14
|
-
background-color var(--motion-hover);
|
|
15
|
-
}
|
|
16
|
-
.surface:hover:where(
|
|
17
|
-
:not(
|
|
18
|
-
:disabled,
|
|
19
|
-
[data-disabled="true"],
|
|
20
|
-
[aria-disabled="true"],
|
|
21
|
-
[readonly],
|
|
22
|
-
[aria-readonly="true"],
|
|
23
|
-
[data-readonly="true"],
|
|
24
|
-
[data-disabled="true"] *,
|
|
25
|
-
[aria-disabled="true"] *,
|
|
26
|
-
[data-readonly="true"] *,
|
|
27
|
-
fieldset:disabled *,
|
|
28
|
-
:has(input:disabled, textarea:disabled)
|
|
29
|
-
)
|
|
30
|
-
) {
|
|
31
|
-
border-color: var(
|
|
32
|
-
--field-hover-border,
|
|
33
|
-
color-mix(in srgb, var(--fg) var(--field-hover-strength), var(--surface))
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
.surface[data-focus="true"],
|
|
37
|
-
.surface:focus,
|
|
38
|
-
.surface:focus-visible,
|
|
39
|
-
.surface:focus-within,
|
|
40
|
-
.surface[aria-expanded="true"] {
|
|
41
|
-
outline: none;
|
|
42
|
-
border-color: var(--field-focus-border);
|
|
43
|
-
box-shadow: 0 0 0 var(--field-focus-width)
|
|
44
|
-
color-mix(in srgb, var(--accent-ink, var(--accent)) var(--field-focus-strength), transparent);
|
|
45
|
-
}
|
|
46
|
-
.surface[aria-invalid="true"] {
|
|
47
|
-
border-color: var(--danger);
|
|
48
|
-
}
|
|
49
|
-
.surface[aria-invalid="true"][data-focus="true"],
|
|
50
|
-
.surface[aria-invalid="true"]:focus-within {
|
|
51
|
-
box-shadow: 0 0 0 var(--field-focus-width)
|
|
52
|
-
color-mix(in srgb, var(--danger) var(--field-focus-strength), transparent);
|
|
53
|
-
}
|
|
54
|
-
.surface:disabled,
|
|
55
|
-
.surface[data-disabled="true"] {
|
|
56
|
-
opacity: var(--field-disabled-opacity);
|
|
57
|
-
cursor: not-allowed;
|
|
58
|
-
}
|
|
59
|
-
.surface[data-disabled="true"] input:disabled {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
}
|
|
62
|
-
.surface input {
|
|
63
|
-
outline: none;
|
|
64
|
-
color: inherit;
|
|
65
|
-
font-family: inherit;
|
|
66
|
-
line-height: inherit;
|
|
67
|
-
}
|
|
68
|
-
.surface input:focus-visible {
|
|
69
|
-
outline: none;
|
|
70
|
-
}
|
|
71
|
-
.surface::placeholder,
|
|
72
|
-
.surface input::placeholder {
|
|
73
|
-
color: var(--placeholder);
|
|
74
|
-
opacity: 1;
|
|
75
|
-
}
|
|
76
|
-
.surface[readonly],
|
|
77
|
-
.surface[aria-readonly="true"],
|
|
78
|
-
.surface:has(input[readonly]) {
|
|
79
|
-
background: var(--field-readonly);
|
|
80
|
-
}
|
|
81
|
-
@media (max-width: 600px) {
|
|
82
|
-
.surface:has(input),
|
|
83
|
-
.surface:is(input, textarea) {
|
|
84
|
-
font-size: 16px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
.surface {
|
|
2
|
+
height: var(--control-height);
|
|
3
|
+
min-width: 0;
|
|
4
|
+
border: 1px solid var(--control-border, var(--line));
|
|
5
|
+
border-radius: var(--field-radius);
|
|
6
|
+
background: var(--field);
|
|
7
|
+
color: var(--fg);
|
|
8
|
+
font-size: var(--field-font-size);
|
|
9
|
+
line-height: var(--field-line-height);
|
|
10
|
+
outline: none;
|
|
11
|
+
transition:
|
|
12
|
+
border-color var(--motion-hover),
|
|
13
|
+
box-shadow var(--motion-hover),
|
|
14
|
+
background-color var(--motion-hover);
|
|
15
|
+
}
|
|
16
|
+
.surface:hover:where(
|
|
17
|
+
:not(
|
|
18
|
+
:disabled,
|
|
19
|
+
[data-disabled="true"],
|
|
20
|
+
[aria-disabled="true"],
|
|
21
|
+
[readonly],
|
|
22
|
+
[aria-readonly="true"],
|
|
23
|
+
[data-readonly="true"],
|
|
24
|
+
[data-disabled="true"] *,
|
|
25
|
+
[aria-disabled="true"] *,
|
|
26
|
+
[data-readonly="true"] *,
|
|
27
|
+
fieldset:disabled *,
|
|
28
|
+
:has(input:disabled, textarea:disabled)
|
|
29
|
+
)
|
|
30
|
+
) {
|
|
31
|
+
border-color: var(
|
|
32
|
+
--field-hover-border,
|
|
33
|
+
color-mix(in srgb, var(--fg) var(--field-hover-strength), var(--surface))
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
.surface[data-focus="true"],
|
|
37
|
+
.surface:focus,
|
|
38
|
+
.surface:focus-visible,
|
|
39
|
+
.surface:focus-within,
|
|
40
|
+
.surface[aria-expanded="true"] {
|
|
41
|
+
outline: none;
|
|
42
|
+
border-color: var(--field-focus-border);
|
|
43
|
+
box-shadow: 0 0 0 var(--field-focus-width)
|
|
44
|
+
color-mix(in srgb, var(--accent-ink, var(--accent)) var(--field-focus-strength), transparent);
|
|
45
|
+
}
|
|
46
|
+
.surface[aria-invalid="true"] {
|
|
47
|
+
border-color: var(--danger);
|
|
48
|
+
}
|
|
49
|
+
.surface[aria-invalid="true"][data-focus="true"],
|
|
50
|
+
.surface[aria-invalid="true"]:focus-within {
|
|
51
|
+
box-shadow: 0 0 0 var(--field-focus-width)
|
|
52
|
+
color-mix(in srgb, var(--danger) var(--field-focus-strength), transparent);
|
|
53
|
+
}
|
|
54
|
+
.surface:disabled,
|
|
55
|
+
.surface[data-disabled="true"] {
|
|
56
|
+
opacity: var(--field-disabled-opacity);
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
59
|
+
.surface[data-disabled="true"] input:disabled {
|
|
60
|
+
opacity: 1;
|
|
61
|
+
}
|
|
62
|
+
.surface input {
|
|
63
|
+
outline: none;
|
|
64
|
+
color: inherit;
|
|
65
|
+
font-family: inherit;
|
|
66
|
+
line-height: inherit;
|
|
67
|
+
}
|
|
68
|
+
.surface input:focus-visible {
|
|
69
|
+
outline: none;
|
|
70
|
+
}
|
|
71
|
+
.surface::placeholder,
|
|
72
|
+
.surface input::placeholder {
|
|
73
|
+
color: var(--placeholder);
|
|
74
|
+
opacity: 1;
|
|
75
|
+
}
|
|
76
|
+
.surface[readonly],
|
|
77
|
+
.surface[aria-readonly="true"],
|
|
78
|
+
.surface:has(input[readonly]) {
|
|
79
|
+
background: var(--field-readonly);
|
|
80
|
+
}
|
|
81
|
+
@media (max-width: 600px) {
|
|
82
|
+
.surface:has(input),
|
|
83
|
+
.surface:is(input, textarea) {
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
min-width: 0;
|
|
3
|
-
}
|
|
4
|
-
.toolbar {
|
|
5
|
-
display: flex;
|
|
6
|
-
justify-content: flex-end;
|
|
7
|
-
align-items: center;
|
|
8
|
-
gap: 8px;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
margin-bottom: 12px;
|
|
11
|
-
}
|
|
12
|
-
.columnMenu {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
}
|
|
16
|
-
.scroll {
|
|
17
|
-
composes: scroll from "./Table.module.css";
|
|
18
|
-
}
|
|
19
|
-
.table {
|
|
20
|
-
composes: table from "./Table.module.css";
|
|
21
|
-
}
|
|
22
|
-
.heading {
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
gap: 8px;
|
|
27
|
-
}
|
|
28
|
-
.sort,
|
|
29
|
-
.filter {
|
|
30
|
-
display: inline-flex;
|
|
31
|
-
align-items: center;
|
|
32
|
-
gap: 7px;
|
|
33
|
-
border: 0;
|
|
34
|
-
background: transparent;
|
|
35
|
-
padding: 4px;
|
|
36
|
-
border-radius: 5px;
|
|
37
|
-
color: inherit;
|
|
38
|
-
}
|
|
39
|
-
.sort:hover,
|
|
40
|
-
.filter:hover {
|
|
41
|
-
background: var(--hover);
|
|
42
|
-
color: var(--fg);
|
|
43
|
-
}
|
|
44
|
-
.sort svg,
|
|
45
|
-
.filter svg {
|
|
46
|
-
width: 14px;
|
|
47
|
-
height: 14px;
|
|
48
|
-
}
|
|
49
|
-
.filter[data-active="true"] {
|
|
50
|
-
color: var(--accent-ink, var(--accent));
|
|
51
|
-
background: var(--selected);
|
|
52
|
-
}
|
|
53
|
-
.filterPanel {
|
|
54
|
-
max-height: 300px;
|
|
55
|
-
overflow: auto;
|
|
56
|
-
}
|
|
57
|
-
.selection {
|
|
58
|
-
width: 44px;
|
|
59
|
-
}
|
|
60
|
-
.selection label > span:last-child {
|
|
61
|
-
position: absolute;
|
|
62
|
-
width: 1px;
|
|
63
|
-
height: 1px;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
clip-path: inset(50%);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.filterReset {
|
|
69
|
-
display: flex;
|
|
70
|
-
justify-content: flex-end;
|
|
71
|
-
margin-top: 6px;
|
|
72
|
-
padding-top: 6px;
|
|
73
|
-
border-top: var(--separator-width) var(--separator-style)
|
|
74
|
-
var(--separator-color);
|
|
75
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
}
|
|
4
|
+
.toolbar {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: flex-end;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
margin-bottom: 12px;
|
|
11
|
+
}
|
|
12
|
+
.columnMenu {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
.scroll {
|
|
17
|
+
composes: scroll from "./Table.module.css";
|
|
18
|
+
}
|
|
19
|
+
.table {
|
|
20
|
+
composes: table from "./Table.module.css";
|
|
21
|
+
}
|
|
22
|
+
.heading {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
}
|
|
28
|
+
.sort,
|
|
29
|
+
.filter {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 7px;
|
|
33
|
+
border: 0;
|
|
34
|
+
background: transparent;
|
|
35
|
+
padding: 4px;
|
|
36
|
+
border-radius: 5px;
|
|
37
|
+
color: inherit;
|
|
38
|
+
}
|
|
39
|
+
.sort:hover,
|
|
40
|
+
.filter:hover {
|
|
41
|
+
background: var(--hover);
|
|
42
|
+
color: var(--fg);
|
|
43
|
+
}
|
|
44
|
+
.sort svg,
|
|
45
|
+
.filter svg {
|
|
46
|
+
width: 14px;
|
|
47
|
+
height: 14px;
|
|
48
|
+
}
|
|
49
|
+
.filter[data-active="true"] {
|
|
50
|
+
color: var(--accent-ink, var(--accent));
|
|
51
|
+
background: var(--selected);
|
|
52
|
+
}
|
|
53
|
+
.filterPanel {
|
|
54
|
+
max-height: 300px;
|
|
55
|
+
overflow: auto;
|
|
56
|
+
}
|
|
57
|
+
.selection {
|
|
58
|
+
width: 44px;
|
|
59
|
+
}
|
|
60
|
+
.selection label > span:last-child {
|
|
61
|
+
position: absolute;
|
|
62
|
+
width: 1px;
|
|
63
|
+
height: 1px;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
clip-path: inset(50%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.filterReset {
|
|
69
|
+
display: flex;
|
|
70
|
+
justify-content: flex-end;
|
|
71
|
+
margin-top: 6px;
|
|
72
|
+
padding-top: 6px;
|
|
73
|
+
border-top: var(--separator-width) var(--separator-style)
|
|
74
|
+
var(--separator-color);
|
|
75
|
+
}
|
package/components/Dialog.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from "react";
|
|
2
|
-
export declare function Dialog({ open: requestedOpen, onClose, title, children, footer, wide, size, role, descriptionId, busy, variant, headerIcon, tone, initialFocus, onAfterClose, className, returnFocus, fallbackFocus, portalContainer, closeLabel, }: {
|
|
2
|
+
export declare function Dialog({ open: requestedOpen, onClose, title, children, footer, wide, size, role, descriptionId, busy, variant, headerIcon, tone, initialFocus, onAfterClose, className, returnFocus, fallbackFocus, portalContainer, closeLabel, placement, }: {
|
|
3
3
|
open: boolean;
|
|
4
|
+
placement?: "center" | "top";
|
|
4
5
|
onClose(): void;
|
|
5
6
|
title: ReactNode;
|
|
6
7
|
children: ReactNode;
|
package/components/Dialog.js
CHANGED
|
@@ -41,7 +41,8 @@ function Dialog({
|
|
|
41
41
|
returnFocus,
|
|
42
42
|
fallbackFocus,
|
|
43
43
|
portalContainer,
|
|
44
|
-
closeLabel = "\u5173\u95ED\u5F39\u7A97"
|
|
44
|
+
closeLabel = "\u5173\u95ED\u5F39\u7A97",
|
|
45
|
+
placement = "center"
|
|
45
46
|
}) {
|
|
46
47
|
const defaultRoot = usePortalRoot();
|
|
47
48
|
const portalRoot = portalContainer ?? defaultRoot;
|
|
@@ -119,6 +120,7 @@ function Dialog({
|
|
|
119
120
|
"aria-busy": busy || void 0,
|
|
120
121
|
role,
|
|
121
122
|
"data-variant": variant,
|
|
123
|
+
"data-placement": placement,
|
|
122
124
|
"data-tone": content.tone,
|
|
123
125
|
"data-header-icon": !!content.headerIcon,
|
|
124
126
|
className: `${s.dialog} ${className} ${wide || size === "large" ? s.wide : ""} ${size === "small" ? s.small : ""} ${closing ? s.closing : ""}`,
|
|
@@ -1,139 +1,143 @@
|
|
|
1
|
-
.dialog {
|
|
2
|
-
width: min(var(--dialog-width), calc(100vw - 32px));
|
|
3
|
-
max-height: calc(100dvh - var(--dialog-inset));
|
|
4
|
-
padding: 0;
|
|
5
|
-
color: var(--fg);
|
|
6
|
-
background: var(--surface);
|
|
7
|
-
border: 1px solid var(--line);
|
|
8
|
-
border-radius: calc(var(--radius) + 3px);
|
|
9
|
-
box-shadow: var(--shadow-dialog);
|
|
10
|
-
overflow: auto;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dialog::backdrop {
|
|
14
|
-
background: var(--overlay);
|
|
15
|
-
backdrop-filter: blur(3px);
|
|
16
|
-
animation: fade-in var(--popup-enter);
|
|
17
|
-
}
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
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
|
-
padding:
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
1
|
+
.dialog {
|
|
2
|
+
width: min(var(--dialog-width), calc(100vw - 32px));
|
|
3
|
+
max-height: calc(100dvh - var(--dialog-inset));
|
|
4
|
+
padding: 0;
|
|
5
|
+
color: var(--fg);
|
|
6
|
+
background: var(--surface);
|
|
7
|
+
border: 1px solid var(--line);
|
|
8
|
+
border-radius: calc(var(--radius) + 3px);
|
|
9
|
+
box-shadow: var(--shadow-dialog);
|
|
10
|
+
overflow: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dialog::backdrop {
|
|
14
|
+
background: var(--overlay);
|
|
15
|
+
backdrop-filter: blur(3px);
|
|
16
|
+
animation: fade-in var(--popup-enter);
|
|
17
|
+
}
|
|
18
|
+
.dialog[data-placement="top"] {
|
|
19
|
+
margin-top: min(10dvh, 96px);
|
|
20
|
+
margin-bottom: auto;
|
|
21
|
+
}
|
|
22
|
+
.dialogHeader {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: flex-start;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: 16px;
|
|
27
|
+
padding: 24px 24px 20px;
|
|
28
|
+
}
|
|
29
|
+
.dialogHeading {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 14px;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
}
|
|
35
|
+
.dialogHeading h2 {
|
|
36
|
+
min-width: 0;
|
|
37
|
+
overflow-wrap: anywhere;
|
|
38
|
+
font-size: 18px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
}
|
|
42
|
+
.dialogHeader > button {
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
margin-top: -3px;
|
|
45
|
+
margin-right: -6px;
|
|
46
|
+
color: var(--muted);
|
|
47
|
+
}
|
|
48
|
+
.dialogIcon {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
flex: 0 0 21px;
|
|
53
|
+
width: 21px;
|
|
54
|
+
height: 25px;
|
|
55
|
+
color: var(--dialog-tone, var(--accent-ink, var(--accent)));
|
|
56
|
+
}
|
|
57
|
+
.dialogIcon > svg {
|
|
58
|
+
width: 21px;
|
|
59
|
+
height: 21px;
|
|
60
|
+
stroke-width: 1.7;
|
|
61
|
+
}
|
|
62
|
+
.dialog[data-tone="info"] {
|
|
63
|
+
--dialog-tone: var(--accent-ink, var(--accent));
|
|
64
|
+
}
|
|
65
|
+
.dialog[data-tone="success"] {
|
|
66
|
+
--dialog-tone: var(--success);
|
|
67
|
+
}
|
|
68
|
+
.dialog[data-tone="warning"] {
|
|
69
|
+
--dialog-tone: var(--warning);
|
|
70
|
+
}
|
|
71
|
+
.dialog[data-tone="danger"] {
|
|
72
|
+
--dialog-tone: var(--danger);
|
|
73
|
+
}
|
|
74
|
+
.dialogBody {
|
|
75
|
+
padding: 0 24px 24px;
|
|
76
|
+
}
|
|
77
|
+
.dialogBody > p {
|
|
78
|
+
color: var(--muted);
|
|
79
|
+
font-size: 12px;
|
|
80
|
+
line-height: 1.8;
|
|
81
|
+
}
|
|
82
|
+
.dialogFooter {
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: flex-end;
|
|
86
|
+
gap: 8px;
|
|
87
|
+
padding: 14px 24px;
|
|
88
|
+
border-top: var(--separator-width) var(--separator-style)
|
|
89
|
+
var(--separator-color);
|
|
90
|
+
background: var(--canvas);
|
|
91
|
+
}
|
|
92
|
+
.wide {
|
|
93
|
+
width: min(var(--dialog-wide-width), calc(100vw - 32px));
|
|
94
|
+
}
|
|
95
|
+
.small {
|
|
96
|
+
width: min(420px, calc(100vw - 32px));
|
|
97
|
+
}
|
|
98
|
+
.dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogHeader {
|
|
99
|
+
padding: 22px 24px 12px;
|
|
100
|
+
}
|
|
101
|
+
.dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogHeading {
|
|
102
|
+
gap: 10px;
|
|
103
|
+
}
|
|
104
|
+
.dialog:is([data-variant="message"], [data-variant="confirm"])
|
|
105
|
+
.dialogHeader
|
|
106
|
+
h2 {
|
|
107
|
+
font-size: 17px;
|
|
108
|
+
}
|
|
109
|
+
.dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogBody {
|
|
110
|
+
padding: 0 24px 24px;
|
|
111
|
+
}
|
|
112
|
+
.closing {
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
}
|
|
115
|
+
.dialog.closing::backdrop {
|
|
116
|
+
background: transparent;
|
|
117
|
+
backdrop-filter: blur(0);
|
|
118
|
+
transition:
|
|
119
|
+
background var(--popup-exit),
|
|
120
|
+
backdrop-filter var(--popup-exit);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (max-width: 600px) {
|
|
124
|
+
.dialog {
|
|
125
|
+
max-height: calc(100dvh - 24px);
|
|
126
|
+
}
|
|
127
|
+
.dialogBody {
|
|
128
|
+
padding: 0 20px 20px;
|
|
129
|
+
}
|
|
130
|
+
.dialogHeader,
|
|
131
|
+
.dialogFooter {
|
|
132
|
+
padding: 18px 20px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@keyframes fade-in {
|
|
137
|
+
from {
|
|
138
|
+
opacity: 0;
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type EditableHeadingProps = {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange(value: string): void;
|
|
4
|
+
label: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
maxLength?: number;
|
|
8
|
+
order?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
|
+
fz?: number;
|
|
10
|
+
};
|
|
11
|
+
/** A plain-text heading edited directly, without replacing it with a form field. */
|
|
12
|
+
export declare function EditableHeading({ value, onChange, label, placeholder, readOnly, maxLength, order, fz, }: EditableHeadingProps): import("react").JSX.Element;
|