@robert-stackflow/oneui 0.6.39 → 0.6.41
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 +14 -0
- package/README.md +347 -329
- 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/Card.d.ts +2 -1
- package/components/Card.js +3 -1
- package/components/Card.module.css +6 -1
- package/components/Checkbox.module.css +95 -95
- package/components/Control.module.css +86 -86
- package/components/DataTable.module.css +75 -75
- package/components/Descriptions.module.css +4 -3
- package/components/Form.d.ts +5 -1
- package/components/Form.js +5 -1
- package/components/FormField.js +1 -0
- package/components/FormField.module.css +11 -3
- package/components/HierarchyPicker.module.css +185 -185
- package/components/IconButton.module.css +6 -10
- package/components/Indicator.module.css +83 -83
- package/components/Layout.module.css +82 -82
- package/components/Markdown.module.css +227 -227
- package/components/NativeForm.d.ts +10 -0
- package/components/NativeForm.js +155 -0
- package/components/NavBar.module.css +130 -130
- package/components/Popover.js +12 -5
- 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/Section.d.ts +7 -4
- package/components/Section.js +24 -8
- package/components/Section.module.css +24 -5
- package/components/SettingRow.js +1 -1
- package/components/SettingRow.module.css +8 -6
- package/components/SettingsLayout.module.css +3 -2
- package/components/Slider.module.css +19 -19
- package/components/SplitButton.d.ts +14 -3
- package/components/SplitButton.js +76 -40
- package/components/SplitButton.module.css +34 -8
- package/components/Steps.module.css +176 -176
- package/components/Tab.module.css +148 -148
- 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/field.d.ts +1 -1
- package/components/field.js +2 -1
- package/components/form-validation.d.ts +4 -0
- package/components/form-validation.js +22 -0
- package/components/index.d.ts +5 -3
- package/components/index.js +9 -3
- package/package.json +1 -1
- package/styles/base.css +9 -0
- package/styles/blue.css +270 -270
- package/styles/minimal.css +2 -2
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
.checkbox {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 9px;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
position: relative;
|
|
7
|
-
user-select: none;
|
|
8
|
-
}
|
|
9
|
-
.checkbox input[type="checkbox"] {
|
|
10
|
-
position: absolute;
|
|
11
|
-
left: 0;
|
|
12
|
-
width: 18px;
|
|
13
|
-
height: 18px;
|
|
14
|
-
margin: 0;
|
|
15
|
-
opacity: 0;
|
|
16
|
-
}
|
|
17
|
-
.checkMark {
|
|
18
|
-
width: 18px;
|
|
19
|
-
height: 18px;
|
|
20
|
-
flex-shrink: 0;
|
|
21
|
-
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
22
|
-
border-radius: 5px;
|
|
23
|
-
background: var(--field);
|
|
24
|
-
display: grid;
|
|
25
|
-
place-items: center;
|
|
26
|
-
pointer-events: none;
|
|
27
|
-
transition:
|
|
28
|
-
background-color var(--motion-hover),
|
|
29
|
-
border-color var(--motion-hover),
|
|
30
|
-
box-shadow var(--motion-hover),
|
|
31
|
-
transform var(--motion-press);
|
|
32
|
-
}
|
|
33
|
-
.checkMark svg {
|
|
34
|
-
width: 16px;
|
|
35
|
-
height: 16px;
|
|
36
|
-
fill: none;
|
|
37
|
-
stroke: currentColor;
|
|
38
|
-
stroke-width: 1.8;
|
|
39
|
-
stroke-linecap: round;
|
|
40
|
-
stroke-linejoin: round;
|
|
41
|
-
}
|
|
42
|
-
.checkMark path {
|
|
43
|
-
stroke-dasharray: 1;
|
|
44
|
-
stroke-dashoffset: 1;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
transition:
|
|
47
|
-
stroke-dashoffset var(--motion-panel) var(--ease),
|
|
48
|
-
opacity var(--motion-hover);
|
|
49
|
-
}
|
|
50
|
-
.checkbox:hover input:not(:disabled) + .checkMark {
|
|
51
|
-
border-color: var(--muted);
|
|
52
|
-
}
|
|
53
|
-
.checkbox:active input:not(:disabled) + .checkMark {
|
|
54
|
-
transform: scale(0.92);
|
|
55
|
-
}
|
|
56
|
-
.checkbox input:checked + .checkMark {
|
|
57
|
-
background: var(--accent-fill, var(--accent));
|
|
58
|
-
color: var(--on-accent-fill, var(--on-accent));
|
|
59
|
-
border-color: var(--accent-fill, var(--accent));
|
|
60
|
-
}
|
|
61
|
-
.checkbox input:checked + .checkMark path {
|
|
62
|
-
stroke-dashoffset: 0;
|
|
63
|
-
opacity: 1;
|
|
64
|
-
}
|
|
65
|
-
.checkbox input:focus-visible + .checkMark {
|
|
66
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink, var(--accent)) 14%, transparent);
|
|
67
|
-
border-color: var(--accent-ink, var(--accent));
|
|
68
|
-
}
|
|
69
|
-
.checkbox[data-disabled="true"] {
|
|
70
|
-
cursor: not-allowed;
|
|
71
|
-
}
|
|
72
|
-
.checkbox input:disabled ~ span {
|
|
73
|
-
opacity: 0.4;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.checkbox[data-indeterminate="true"] .checkMark {
|
|
77
|
-
background: var(--accent);
|
|
78
|
-
border-color: var(--accent);
|
|
79
|
-
color: var(--on-accent);
|
|
80
|
-
}
|
|
81
|
-
.checkbox[data-indeterminate="true"] .checkMark svg {
|
|
82
|
-
opacity: 1;
|
|
83
|
-
transform: scale(1);
|
|
84
|
-
}
|
|
85
|
-
.checkbox[data-indeterminate="true"] .checkMark path {
|
|
86
|
-
stroke-dashoffset: 0;
|
|
87
|
-
opacity: 1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.checkbox input[aria-invalid="true"] + .checkMark {
|
|
91
|
-
border-color: var(--danger);
|
|
92
|
-
}
|
|
93
|
-
.checkbox input[aria-invalid="true"]:focus-visible + .checkMark {
|
|
94
|
-
box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 12%, transparent);
|
|
95
|
-
}
|
|
1
|
+
.checkbox {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 9px;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
position: relative;
|
|
7
|
+
user-select: none;
|
|
8
|
+
}
|
|
9
|
+
.checkbox input[type="checkbox"] {
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
width: 18px;
|
|
13
|
+
height: 18px;
|
|
14
|
+
margin: 0;
|
|
15
|
+
opacity: 0;
|
|
16
|
+
}
|
|
17
|
+
.checkMark {
|
|
18
|
+
width: 18px;
|
|
19
|
+
height: 18px;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
22
|
+
border-radius: 5px;
|
|
23
|
+
background: var(--field);
|
|
24
|
+
display: grid;
|
|
25
|
+
place-items: center;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
transition:
|
|
28
|
+
background-color var(--motion-hover),
|
|
29
|
+
border-color var(--motion-hover),
|
|
30
|
+
box-shadow var(--motion-hover),
|
|
31
|
+
transform var(--motion-press);
|
|
32
|
+
}
|
|
33
|
+
.checkMark svg {
|
|
34
|
+
width: 16px;
|
|
35
|
+
height: 16px;
|
|
36
|
+
fill: none;
|
|
37
|
+
stroke: currentColor;
|
|
38
|
+
stroke-width: 1.8;
|
|
39
|
+
stroke-linecap: round;
|
|
40
|
+
stroke-linejoin: round;
|
|
41
|
+
}
|
|
42
|
+
.checkMark path {
|
|
43
|
+
stroke-dasharray: 1;
|
|
44
|
+
stroke-dashoffset: 1;
|
|
45
|
+
opacity: 0;
|
|
46
|
+
transition:
|
|
47
|
+
stroke-dashoffset var(--motion-panel) var(--ease),
|
|
48
|
+
opacity var(--motion-hover);
|
|
49
|
+
}
|
|
50
|
+
.checkbox:hover input:not(:disabled) + .checkMark {
|
|
51
|
+
border-color: var(--muted);
|
|
52
|
+
}
|
|
53
|
+
.checkbox:active input:not(:disabled) + .checkMark {
|
|
54
|
+
transform: scale(0.92);
|
|
55
|
+
}
|
|
56
|
+
.checkbox input:checked + .checkMark {
|
|
57
|
+
background: var(--accent-fill, var(--accent));
|
|
58
|
+
color: var(--on-accent-fill, var(--on-accent));
|
|
59
|
+
border-color: var(--accent-fill, var(--accent));
|
|
60
|
+
}
|
|
61
|
+
.checkbox input:checked + .checkMark path {
|
|
62
|
+
stroke-dashoffset: 0;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
.checkbox input:focus-visible + .checkMark {
|
|
66
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink, var(--accent)) 14%, transparent);
|
|
67
|
+
border-color: var(--accent-ink, var(--accent));
|
|
68
|
+
}
|
|
69
|
+
.checkbox[data-disabled="true"] {
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
.checkbox input:disabled ~ span {
|
|
73
|
+
opacity: 0.4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.checkbox[data-indeterminate="true"] .checkMark {
|
|
77
|
+
background: var(--accent);
|
|
78
|
+
border-color: var(--accent);
|
|
79
|
+
color: var(--on-accent);
|
|
80
|
+
}
|
|
81
|
+
.checkbox[data-indeterminate="true"] .checkMark svg {
|
|
82
|
+
opacity: 1;
|
|
83
|
+
transform: scale(1);
|
|
84
|
+
}
|
|
85
|
+
.checkbox[data-indeterminate="true"] .checkMark path {
|
|
86
|
+
stroke-dashoffset: 0;
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.checkbox input[aria-invalid="true"] + .checkMark {
|
|
91
|
+
border-color: var(--danger);
|
|
92
|
+
}
|
|
93
|
+
.checkbox input[aria-invalid="true"]:focus-visible + .checkMark {
|
|
94
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 12%, transparent);
|
|
95
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
container-type: inline-size;
|
|
4
4
|
}
|
|
5
5
|
.title {
|
|
6
|
-
margin-bottom:
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
font-weight: 600;
|
|
6
|
+
margin-bottom: var(--section-title-gap, 12px);
|
|
7
|
+
font-size: var(--section-title-size, 14px);
|
|
8
|
+
font-weight: var(--section-title-weight, 600);
|
|
9
|
+
line-height: var(--section-title-line-height, 1.5);
|
|
9
10
|
}
|
|
10
11
|
.list {
|
|
11
12
|
display: grid;
|
package/components/Form.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { FormHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { type NativeFormProps } from "./NativeForm";
|
|
3
|
+
export type { NativeFormProps } from "./NativeForm";
|
|
2
4
|
import type { FormController } from "./useFormState";
|
|
3
5
|
import { type FormLayoutOptions } from "./FormLayout";
|
|
4
|
-
|
|
6
|
+
declare function ControlledForm<T extends Record<string, unknown>>({ controller, onSubmit, children, layout, labelWidth, ...props }: Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit" | "onReset" | "children"> & FormLayoutOptions & {
|
|
5
7
|
controller: FormController<T>;
|
|
6
8
|
onSubmit(values: T): void | Promise<void>;
|
|
7
9
|
children: ReactNode;
|
|
8
10
|
}): import("react").JSX.Element;
|
|
11
|
+
export declare function Form<T extends Record<string, unknown>>(props: Parameters<typeof ControlledForm<T>>[0]): ReactNode;
|
|
12
|
+
export declare function Form(props: NativeFormProps): ReactNode;
|
package/components/Form.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { NativeForm } from "./NativeForm.js";
|
|
3
4
|
import s from "./Form.module.css";
|
|
4
5
|
import { FormLayoutContext } from "./FormLayout.js";
|
|
5
|
-
function
|
|
6
|
+
function ControlledForm({
|
|
6
7
|
controller,
|
|
7
8
|
onSubmit,
|
|
8
9
|
children,
|
|
@@ -25,6 +26,9 @@ function Form({
|
|
|
25
26
|
}
|
|
26
27
|
) });
|
|
27
28
|
}
|
|
29
|
+
function Form(props) {
|
|
30
|
+
return props.controller ? /* @__PURE__ */ jsx(ControlledForm, { ...props }) : /* @__PURE__ */ jsx(NativeForm, { ...props });
|
|
31
|
+
}
|
|
28
32
|
export {
|
|
29
33
|
Form
|
|
30
34
|
};
|
package/components/FormField.js
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
align-items: baseline;
|
|
10
10
|
gap: 5px;
|
|
11
|
-
font-size:
|
|
11
|
+
font-size: var(--field-label-size, 13px);
|
|
12
|
+
font-weight: var(--field-label-weight, 400);
|
|
12
13
|
color: var(--fg);
|
|
13
14
|
}
|
|
14
15
|
.required {
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
}
|
|
19
20
|
.optional {
|
|
20
21
|
color: var(--muted);
|
|
21
|
-
font-size:
|
|
22
|
+
font-size: var(--field-message-size, 12px);
|
|
22
23
|
}
|
|
23
24
|
.hint,
|
|
24
25
|
.error {
|
|
@@ -56,7 +57,14 @@
|
|
|
56
57
|
}
|
|
57
58
|
.group > legend {
|
|
58
59
|
padding: 0;
|
|
59
|
-
margin-bottom:
|
|
60
|
+
margin-bottom: var(--section-title-gap, 12px);
|
|
61
|
+
color: var(--fg);
|
|
62
|
+
font-size: var(--section-title-size, 14px);
|
|
63
|
+
font-weight: var(--section-title-weight, 600);
|
|
64
|
+
line-height: var(--section-title-line-height, 1.5);
|
|
65
|
+
}
|
|
66
|
+
.group > legend > span {
|
|
67
|
+
font: inherit;
|
|
60
68
|
}
|
|
61
69
|
|
|
62
70
|
.labelRow {
|