@soxa-ui/theme-base 0.6.0 → 0.6.1
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/README.md +8 -0
- package/package.json +3 -3
- package/src/components/file-upload.css +139 -0
- package/src/components/guide.css +43 -0
- package/src/components/sidebar.css +113 -0
- package/src/components/splitter.css +54 -0
- package/src/components/stepper.css +114 -0
- package/src/components/toasts.css +2 -0
- package/src/components/tree.css +118 -0
- package/src/index.css +10 -4
- package/src/required.css +1 -0
- package/src/settings.css +1 -0
- package/theme-contract.json +830 -14
- package/theme-variables.json +12 -1
package/README.md
CHANGED
|
@@ -449,3 +449,11 @@ Alert uses the original compact Toasts spacing as its message reference: 0.875re
|
|
|
449
449
|
padding, 1rem inline padding and 0.125rem between title and description at normal size.
|
|
450
450
|
The message scale multiplies these defaults. `--so-alert-padding` remains an exact CSS
|
|
451
451
|
padding shorthand; `--so-alert-body-gap` overrides only the title-to-description gap.
|
|
452
|
+
|
|
453
|
+
## Button press effect
|
|
454
|
+
|
|
455
|
+
Visual themes can read `--so-button-press-effect` to move the Button face down
|
|
456
|
+
with `translateY(...)` or narrow it with `scaleX(...)`. Set `none` to cancel an
|
|
457
|
+
inherited effect. Apply the effect while pressed under the library's motion
|
|
458
|
+
policy. Keep the hit target stationary so a press at the edge can still activate
|
|
459
|
+
the button on release. Theme Base leaves the setting unset.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soxa-ui/theme-base",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Общий слой тем Soxa UI: сброс частей библиотеки, знак направления письма и структура частей с числами в переменных — чистый CSS, без препроцессора, — и плагины раскладки для поведения темы",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"soxa",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"test": "vitest run"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@soxa-ui/core": "^0.
|
|
51
|
-
"@soxa-ui/plugins": "^0.
|
|
50
|
+
"@soxa-ui/core": "^1.0.0",
|
|
51
|
+
"@soxa-ui/plugins": "^1.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"postcss": "^8.5.9",
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
.so-file-upload {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: 1em;
|
|
5
|
+
inline-size: min(100%, 29rem);
|
|
6
|
+
min-inline-size: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.so-file-upload--size-sm {
|
|
10
|
+
font-size: calc(1em * var(--so-surface-scale-sm, 0.875));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.so-file-upload--size-lg {
|
|
14
|
+
font-size: calc(1em * var(--so-surface-scale-lg, 1.125));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.so-file-upload--size-xl {
|
|
18
|
+
font-size: calc(1em * var(--so-surface-scale-xl, 1.25));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.so-file-upload--size-2xl {
|
|
22
|
+
font-size: calc(1em * var(--so-surface-scale-2xl, 1.5));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.so-file-upload[data-disabled='true'] {
|
|
26
|
+
opacity: var(--so-disabled-opacity);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.so-file-upload[data-disabled='true'] > * {
|
|
30
|
+
--so-disabled-opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.so-file-upload__input {
|
|
34
|
+
position: absolute;
|
|
35
|
+
inline-size: 1px;
|
|
36
|
+
block-size: 1px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
clip-path: inset(50%);
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.so-file-upload__dropzone {
|
|
43
|
+
display: grid;
|
|
44
|
+
justify-items: center;
|
|
45
|
+
gap: 0.25em;
|
|
46
|
+
padding: 1.5em 1em;
|
|
47
|
+
text-align: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.so-file-upload__prompt {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
53
|
+
align-items: baseline;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
column-gap: 0.25em;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.so-file-upload__list {
|
|
59
|
+
display: grid;
|
|
60
|
+
gap: 0.75em;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
list-style: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.so-file-upload__item {
|
|
67
|
+
display: grid;
|
|
68
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.75em;
|
|
71
|
+
padding: 0.75em;
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.so-file-upload__preview {
|
|
76
|
+
display: grid;
|
|
77
|
+
place-items: center;
|
|
78
|
+
inline-size: 3em;
|
|
79
|
+
block-size: 3em;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.so-file-upload__preview > img {
|
|
83
|
+
inline-size: 100%;
|
|
84
|
+
block-size: 100%;
|
|
85
|
+
object-fit: cover;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.so-file-upload__details {
|
|
89
|
+
overflow-wrap: anywhere;
|
|
90
|
+
text-align: start;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.so-file-upload__size {
|
|
94
|
+
display: block;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.so-file-upload__remove {
|
|
98
|
+
aspect-ratio: 1;
|
|
99
|
+
max-height: none;
|
|
100
|
+
padding-inline: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.so-file-upload__progress {
|
|
104
|
+
grid-column: 1 / -1;
|
|
105
|
+
min-inline-size: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.so-file-upload__message:empty {
|
|
109
|
+
position: absolute;
|
|
110
|
+
inline-size: 1px;
|
|
111
|
+
block-size: 1px;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
clip-path: inset(50%);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.so-file-upload__hint:empty,
|
|
117
|
+
.so-file-upload__progress:empty,
|
|
118
|
+
.so-file-upload__list[hidden],
|
|
119
|
+
.so-file-upload__preview > [hidden] {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.so-file-upload__choose {
|
|
124
|
+
display: grid;
|
|
125
|
+
inline-size: 3.375em;
|
|
126
|
+
block-size: 3.375em;
|
|
127
|
+
box-sizing: border-box;
|
|
128
|
+
margin-block-end: 0.625em;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.so-file-upload__symbol {
|
|
132
|
+
display: grid;
|
|
133
|
+
place-items: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.so-file-upload__symbol > svg {
|
|
137
|
+
inline-size: 1.25em;
|
|
138
|
+
block-size: 1.25em;
|
|
139
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
:where(.so-guide) {
|
|
2
|
+
position: fixed;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
max-block-size: calc(100% - 2rem);
|
|
5
|
+
overflow: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(.so-guide:not([data-placement])) {
|
|
9
|
+
right: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
margin: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.so-guide__decoration) {
|
|
15
|
+
position: fixed;
|
|
16
|
+
inset: 0;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.so-guide__close) {
|
|
21
|
+
position: absolute;
|
|
22
|
+
inset-block-start: 0.5rem;
|
|
23
|
+
inset-inline-end: 0.5rem;
|
|
24
|
+
inline-size: 2rem;
|
|
25
|
+
block-size: 2rem;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where(.so-guide:has(.so-guide__close) .so-guide__content) {
|
|
30
|
+
padding-inline-end: 2.25rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.so-guide__spotlight) {
|
|
34
|
+
position: fixed;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.so-guide__actions) {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
justify-content: end;
|
|
42
|
+
gap: 0.5rem;
|
|
43
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
.so-sidebar {
|
|
2
|
+
--so-sidebar-current-width: var(--so-sidebar-width, 16rem);
|
|
3
|
+
--so-sidebar-content-width: var(--so-sidebar-current-width);
|
|
4
|
+
--so-sidebar-slide: -100%;
|
|
5
|
+
--so-sidebar-order: -1;
|
|
6
|
+
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: minmax(0, 1fr);
|
|
9
|
+
justify-items: left;
|
|
10
|
+
flex: 0 0 auto;
|
|
11
|
+
width: var(--so-sidebar-current-width);
|
|
12
|
+
min-width: 0;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
overflow: clip;
|
|
15
|
+
order: calc(var(--so-sidebar-order) * var(--so-dir-sign, 1));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.so-sidebar[data-side='right'] {
|
|
19
|
+
--so-sidebar-slide: 100%;
|
|
20
|
+
--so-sidebar-order: 1;
|
|
21
|
+
justify-items: right;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.so-sidebar[data-collapse='icon'][data-collapsed] {
|
|
25
|
+
--so-sidebar-current-width: var(--so-sidebar-icon-width, 3rem);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.so-sidebar[data-collapse='offcanvas'] {
|
|
29
|
+
--so-sidebar-content-width: var(--so-sidebar-width, 16rem);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.so-sidebar[data-collapse='offcanvas'][data-collapsed] {
|
|
33
|
+
--so-sidebar-current-width: 0px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.so-sidebar__content {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
width: var(--so-sidebar-content-width);
|
|
40
|
+
height: 100%;
|
|
41
|
+
overflow: hidden auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.so-sidebar[data-collapse='offcanvas'][data-collapsed] > .so-sidebar__content {
|
|
45
|
+
translate: var(--so-sidebar-slide) 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* The collapse state also hides blocks with a custom display value. */
|
|
49
|
+
.so-sidebar[data-collapsed] [data-so-sidebar-expanded-only] {
|
|
50
|
+
display: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.so-sidebar-group__label {
|
|
54
|
+
flex-shrink: 0;
|
|
55
|
+
padding-block: var(--so-spacing, 0.25rem);
|
|
56
|
+
padding-inline: var(
|
|
57
|
+
--so-button-padding-normal,
|
|
58
|
+
calc(var(--so-spacing, 0.25rem) * 2.5 * var(--so-control-scale-normal, 1))
|
|
59
|
+
);
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
font-size: var(--so-caption-note-font-size-normal);
|
|
62
|
+
line-height: var(--so-caption-note-line-height-normal);
|
|
63
|
+
text-overflow: ellipsis;
|
|
64
|
+
white-space: nowrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.so-sidebar-group__label:empty,
|
|
68
|
+
.so-sidebar[data-collapse='icon'][data-collapsed] .so-sidebar-group__label {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.so-sidebar-item {
|
|
73
|
+
position: relative;
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: calc(var(--so-spacing, 0.25rem) * 2);
|
|
77
|
+
inline-size: 100%;
|
|
78
|
+
min-block-size: max(var(--so-button-height-normal, 2rem), var(--so-target-size, 2rem));
|
|
79
|
+
padding-inline: var(--so-button-padding-normal, calc(var(--so-spacing, 0.25rem) * 3));
|
|
80
|
+
text-align: start;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.so-sidebar-item__leading {
|
|
84
|
+
display: inline-grid;
|
|
85
|
+
flex: none;
|
|
86
|
+
place-items: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.so-sidebar-item__leading:empty {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.so-sidebar-item__text {
|
|
94
|
+
min-inline-size: 0;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
text-overflow: ellipsis;
|
|
97
|
+
white-space: nowrap;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.so-sidebar[data-collapse='icon'][data-collapsed] .so-sidebar-item {
|
|
101
|
+
justify-content: center;
|
|
102
|
+
padding-inline: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Keep the label in the accessible name while the compact item shows its icon. */
|
|
106
|
+
.so-sidebar[data-collapse='icon'][data-collapsed]
|
|
107
|
+
.so-sidebar-item:has(> .so-sidebar-item__leading:not(:empty))
|
|
108
|
+
> .so-sidebar-item__text {
|
|
109
|
+
position: absolute;
|
|
110
|
+
inline-size: 1px;
|
|
111
|
+
block-size: 1px;
|
|
112
|
+
clip-path: inset(50%);
|
|
113
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.so-splitter {
|
|
2
|
+
--so-splitter-width: initial;
|
|
3
|
+
--so-splitter-offset: 0px;
|
|
4
|
+
|
|
5
|
+
display: flex;
|
|
6
|
+
min-inline-size: 0;
|
|
7
|
+
min-block-size: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.so-splitter[data-orientation='vertical'] {
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.so-splitter__panel {
|
|
15
|
+
flex: var(--so-splitter-panel-size, 1) 1 0px;
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
min-block-size: 0;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.so-splitter__panel[data-collapsed] {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.so-splitter__thumb {
|
|
26
|
+
--so-splitter-handle-thickness: var(--so-splitter-width, var(--so-splitter-handle-size, 8px));
|
|
27
|
+
|
|
28
|
+
display: grid;
|
|
29
|
+
flex: 0 0 var(--so-splitter-handle-thickness);
|
|
30
|
+
/* The hit area straddles the boundary. Only the offset takes space away from panels. */
|
|
31
|
+
margin-inline: calc(var(--so-splitter-offset) - var(--so-splitter-handle-thickness) / 2);
|
|
32
|
+
place-items: center;
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
touch-action: none;
|
|
36
|
+
cursor: col-resize;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.so-splitter[data-orientation='vertical'] > .so-splitter__thumb {
|
|
40
|
+
margin-inline: 0;
|
|
41
|
+
margin-block: calc(var(--so-splitter-offset) - var(--so-splitter-handle-thickness) / 2);
|
|
42
|
+
cursor: row-resize;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.so-splitter > .so-splitter__thumb[data-disabled] {
|
|
46
|
+
cursor: default;
|
|
47
|
+
touch-action: auto;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.so-splitter__grip {
|
|
51
|
+
display: grid;
|
|
52
|
+
place-items: center;
|
|
53
|
+
position: absolute;
|
|
54
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.so-stepper__list {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 0.75rem;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
list-style: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.so-stepper-item {
|
|
10
|
+
--so-stepper-indicator-size: calc(var(--so-button-height-normal) * 0.75);
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: minmax(0, max-content) minmax(1rem, 1fr);
|
|
13
|
+
gap: 0.5rem;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
min-inline-size: 0;
|
|
16
|
+
align-content: start;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.so-stepper-item--size-sm {
|
|
20
|
+
--so-stepper-indicator-size: calc(var(--so-button-height-sm) * 0.75);
|
|
21
|
+
font-size: var(--so-button-font-size-sm);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.so-stepper-item--size-lg {
|
|
25
|
+
--so-stepper-indicator-size: calc(var(--so-button-height-lg) * 0.75);
|
|
26
|
+
font-size: var(--so-button-font-size-lg);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.so-stepper-item--size-xl {
|
|
30
|
+
--so-stepper-indicator-size: calc(var(--so-button-height-xl) * 0.75);
|
|
31
|
+
font-size: var(--so-button-font-size-xl);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.so-stepper-item--size-2xl {
|
|
35
|
+
--so-stepper-indicator-size: calc(var(--so-button-height-2xl) * 0.75);
|
|
36
|
+
font-size: var(--so-button-font-size-2xl);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.so-stepper-item__leading,
|
|
40
|
+
.so-stepper-item__details {
|
|
41
|
+
grid-column: 1 / -1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.so-stepper-item__trigger {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 0.5rem;
|
|
48
|
+
min-inline-size: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border: 0;
|
|
51
|
+
background: none;
|
|
52
|
+
color: inherit;
|
|
53
|
+
font: inherit;
|
|
54
|
+
text-align: start;
|
|
55
|
+
overflow-wrap: anywhere;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
button.so-stepper-item__trigger:enabled {
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.so-stepper-item__body {
|
|
63
|
+
display: grid;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.so-stepper-item__indicator {
|
|
67
|
+
display: inline-grid;
|
|
68
|
+
place-items: center;
|
|
69
|
+
flex: none;
|
|
70
|
+
inline-size: var(--so-stepper-indicator-size);
|
|
71
|
+
block-size: var(--so-stepper-indicator-size);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.so-stepper-item__step-icon {
|
|
75
|
+
scale: var(--so-dir-sign) 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.so-stepper[data-orientation='vertical']
|
|
79
|
+
> .so-stepper__list
|
|
80
|
+
> .so-stepper-item
|
|
81
|
+
> .so-stepper-item__trigger
|
|
82
|
+
> .so-stepper-item__indicator
|
|
83
|
+
> .so-stepper-item__step-icon {
|
|
84
|
+
rotate: 90deg;
|
|
85
|
+
scale: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.so-stepper-item__separator {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-self: center;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.so-stepper[data-orientation='vertical'] > .so-stepper__list {
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.so-stepper[data-orientation='vertical'] > .so-stepper__list > .so-stepper-item {
|
|
99
|
+
grid-template-columns: minmax(0, 1fr);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.so-stepper[data-orientation='vertical']
|
|
103
|
+
> .so-stepper__list
|
|
104
|
+
> .so-stepper-item
|
|
105
|
+
> .so-stepper-item__separator {
|
|
106
|
+
order: 1;
|
|
107
|
+
margin-inline-start: calc(var(--so-stepper-indicator-size) / 2);
|
|
108
|
+
min-block-size: 1rem;
|
|
109
|
+
justify-self: start;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.so-stepper-content {
|
|
113
|
+
min-inline-size: 0;
|
|
114
|
+
}
|
|
@@ -278,6 +278,8 @@
|
|
|
278
278
|
.so-toasts-item__close {
|
|
279
279
|
flex-shrink: 0;
|
|
280
280
|
aspect-ratio: 1;
|
|
281
|
+
/* Keep the button at its normal size when a stretched cascade card has a definite height. */
|
|
282
|
+
max-height: none;
|
|
281
283
|
padding-inline: 0;
|
|
282
284
|
margin-block: calc((var(--so-toasts-line) - var(--so-button-height-normal)) / 2);
|
|
283
285
|
margin-inline-end: calc(var(--so-button-height-normal) / -4);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.so-tree {
|
|
2
|
+
--so-tree-spacing-factor: var(--so-collection-scale-normal, 1);
|
|
3
|
+
--so-tree-row-gap: calc(var(--so-tree-spacing-unit, 0px) * var(--so-tree-spacing-factor));
|
|
4
|
+
inline-size: 100%;
|
|
5
|
+
min-inline-size: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Dim the whole tree once, including open groups and disabled rows. */
|
|
9
|
+
.so-tree[data-disabled='true'] {
|
|
10
|
+
opacity: var(--so-disabled-opacity);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.so-tree[data-disabled='true'] > * {
|
|
14
|
+
--so-disabled-opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.so-tree--size-sm {
|
|
18
|
+
--so-tree-spacing-factor: var(--so-collection-scale-sm, 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.so-tree--size-lg {
|
|
22
|
+
--so-tree-spacing-factor: var(--so-collection-scale-lg, 1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.so-tree--size-xl {
|
|
26
|
+
--so-tree-spacing-factor: var(--so-collection-scale-xl, 1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.so-tree--size-2xl {
|
|
30
|
+
--so-tree-spacing-factor: var(--so-collection-scale-2xl, 1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.so-tree,
|
|
34
|
+
.so-tree-item,
|
|
35
|
+
.so-tree-item__group {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: var(--so-tree-row-gap);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.so-tree-item {
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
color: inherit;
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.so-tree-item > .so-tree-item__row {
|
|
48
|
+
display: flex;
|
|
49
|
+
inline-size: 100%;
|
|
50
|
+
justify-content: start;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.so-tree-item > .so-tree-item__row > .so-button__text {
|
|
54
|
+
min-inline-size: 0;
|
|
55
|
+
text-align: start;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where(.so-tree-item > .so-tree-item__row > .so-button__text > *) {
|
|
59
|
+
margin-inline: 0 auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.so-tree-item__group {
|
|
63
|
+
padding-inline-start: var(--so-tree-indent, 1.25rem);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.so-tree-item__group:empty {
|
|
67
|
+
display: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.so-tree[data-guides='true'] .so-tree-item__group {
|
|
71
|
+
border-inline-start: 1px solid var(--so-tree-guide-color, currentColor);
|
|
72
|
+
margin-inline-start: calc(var(--so-tree-indent, 1.25rem) / 2);
|
|
73
|
+
padding-inline-start: calc(var(--so-tree-indent, 1.25rem) / 2 - 1px);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.so-tree-item__toggle,
|
|
77
|
+
.so-tree-item__spacer {
|
|
78
|
+
display: inline-grid;
|
|
79
|
+
place-items: center;
|
|
80
|
+
inline-size: 1.25em;
|
|
81
|
+
flex: 0 0 auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.so-tree-item__selection-indicator {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
inline-size: 1em;
|
|
90
|
+
block-size: 1em;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.so-tree-item__chevron {
|
|
94
|
+
inline-size: 0.45em;
|
|
95
|
+
block-size: 0.45em;
|
|
96
|
+
border: solid currentColor;
|
|
97
|
+
border-width: 0 1px 1px 0;
|
|
98
|
+
transform: scaleX(var(--so-dir-sign, 1)) rotate(-45deg);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.so-tree-item[data-expanded='true'] > .so-tree-item__row .so-tree-item__chevron {
|
|
102
|
+
transform: rotate(45deg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.so-tree-item__accessible-name,
|
|
106
|
+
.so-tree-item[data-window-ancestor] > .so-tree-item__row {
|
|
107
|
+
position: absolute;
|
|
108
|
+
inline-size: 1px;
|
|
109
|
+
block-size: 1px;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
clip-path: inset(50%);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.so-tree__filler {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
/* The adjacent gap is already included in the skipped rows' height. */
|
|
117
|
+
block-size: max(0px, calc(var(--so-filler-height) - var(--so-tree-row-gap)));
|
|
118
|
+
}
|
package/src/index.css
CHANGED
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
|
|
46
46
|
@layer so.reset, so.settings, so.direction, so.disabled, so.caption, so.required, so.target, so.group,
|
|
47
47
|
so.anchored, so.swipe, so.place, so.icon, so.avatar, so.avatar-group, so.button, so.toggle-group, so.check-box, so.accordion, so.date-input,
|
|
48
|
-
so.modal, so.dialog, so.alert-dialog, so.drag-and-drop, so.drawer, so.input, so.badge, so.label, so.field, so.list-box,
|
|
49
|
-
so.menu, so.breadcrumbs, so.number-input, so.pagination, so.popover, so.calendar, so.date-picker,
|
|
48
|
+
so.modal, so.dialog, so.alert-dialog, so.drag-and-drop, so.drawer, so.input, so.badge, so.label, so.field, so.list-box, so.tree,
|
|
49
|
+
so.menu, so.breadcrumbs, so.number-input, so.pagination, so.popover, so.guide, so.calendar, so.date-picker,
|
|
50
50
|
so.progress-linear, so.progress-spinner, so.radio-group, so.rating, so.scroller, so.select,
|
|
51
|
-
so.separator, so.skeleton, so.slider, so.switch, so.table, so.tabs, so.tags, so.textarea, so.toasts,
|
|
52
|
-
so.tooltip, so.code-block, so.alert;
|
|
51
|
+
so.separator, so.skeleton, so.sidebar, so.slider, so.splitter, so.stepper, so.switch, so.table, so.tabs, so.tags, so.textarea, so.toasts,
|
|
52
|
+
so.tooltip, so.code-block, so.file-upload, so.alert;
|
|
53
53
|
|
|
54
54
|
@import './reset.css' layer(so.reset);
|
|
55
55
|
@import './settings.css' layer(so.settings);
|
|
@@ -80,11 +80,13 @@
|
|
|
80
80
|
@import './components/label.css' layer(so.label);
|
|
81
81
|
@import './components/field.css' layer(so.field);
|
|
82
82
|
@import './components/list-box.css' layer(so.list-box);
|
|
83
|
+
@import './components/tree.css' layer(so.tree);
|
|
83
84
|
@import './components/menu.css' layer(so.menu);
|
|
84
85
|
@import './components/breadcrumbs.css' layer(so.breadcrumbs);
|
|
85
86
|
@import './components/number-input.css' layer(so.number-input);
|
|
86
87
|
@import './components/pagination.css' layer(so.pagination);
|
|
87
88
|
@import './components/popover.css' layer(so.popover);
|
|
89
|
+
@import './components/guide.css' layer(so.guide);
|
|
88
90
|
@import './components/calendar.css' layer(so.calendar);
|
|
89
91
|
@import './components/date-picker.css' layer(so.date-picker);
|
|
90
92
|
@import './components/progress-linear.css' layer(so.progress-linear);
|
|
@@ -95,7 +97,10 @@
|
|
|
95
97
|
@import './components/select.css' layer(so.select);
|
|
96
98
|
@import './components/separator.css' layer(so.separator);
|
|
97
99
|
@import './components/skeleton.css' layer(so.skeleton);
|
|
100
|
+
@import './components/sidebar.css' layer(so.sidebar);
|
|
98
101
|
@import './components/slider.css' layer(so.slider);
|
|
102
|
+
@import './components/splitter.css' layer(so.splitter);
|
|
103
|
+
@import './components/stepper.css' layer(so.stepper);
|
|
99
104
|
@import './components/switch.css' layer(so.switch);
|
|
100
105
|
@import './components/table.css' layer(so.table);
|
|
101
106
|
@import './components/tabs.css' layer(so.tabs);
|
|
@@ -105,5 +110,6 @@
|
|
|
105
110
|
@import './components/tooltip.css' layer(so.tooltip);
|
|
106
111
|
|
|
107
112
|
@import './components/code-block.css' layer(so.code-block);
|
|
113
|
+
@import './components/file-upload.css' layer(so.file-upload);
|
|
108
114
|
|
|
109
115
|
@import './components/alert.css' layer(so.alert);
|
package/src/required.css
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
.so-input:where([data-required='true'])::after,
|
|
28
28
|
.so-number-input:where([data-required='true'])::after,
|
|
29
29
|
.so-textarea:where([data-required='true'])::after,
|
|
30
|
+
.so-file-upload:where(:has(> .so-file-upload__input:required))::after,
|
|
30
31
|
.so-date-input:where([data-required='true'])::after,
|
|
31
32
|
.so-date-picker--mode-range.so-date-picker:where([data-required='true'])::after {
|
|
32
33
|
content: '';
|