@geoffcox/sterling-svelte-themes 1.0.0
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/LICENSE +21 -0
- package/README.md +13 -0
- package/css/sterling/Button.base.css +54 -0
- package/css/sterling/Button.colorful.css +17 -0
- package/css/sterling/Button.css +8 -0
- package/css/sterling/Button.disabled.css +22 -0
- package/css/sterling/Button.secondary.colorful.css +15 -0
- package/css/sterling/Button.secondary.css +11 -0
- package/css/sterling/Button.shapes.css +14 -0
- package/css/sterling/Button.tool.colorful.css +13 -0
- package/css/sterling/Button.tool.css +18 -0
- package/css/sterling/Callout.base.css +59 -0
- package/css/sterling/Callout.colorful.css +5 -0
- package/css/sterling/Callout.css +2 -0
- package/css/sterling/Checkbox.base.css +121 -0
- package/css/sterling/Checkbox.colorful.css +17 -0
- package/css/sterling/Checkbox.css +3 -0
- package/css/sterling/Checkbox.disabled.css +28 -0
- package/css/sterling/Dialog.base.css +114 -0
- package/css/sterling/Dialog.css +1 -0
- package/css/sterling/Dropdown.base.css +105 -0
- package/css/sterling/Dropdown.colorful.css +23 -0
- package/css/sterling/Dropdown.composed.css +11 -0
- package/css/sterling/Dropdown.css +4 -0
- package/css/sterling/Dropdown.disabled.css +32 -0
- package/css/sterling/Input.base.css +72 -0
- package/css/sterling/Input.colorful.css +22 -0
- package/css/sterling/Input.composed.css +12 -0
- package/css/sterling/Input.css +4 -0
- package/css/sterling/Input.disabled.css +36 -0
- package/css/sterling/Label.base.css +116 -0
- package/css/sterling/Label.boxed.colorful.css +21 -0
- package/css/sterling/Label.boxed.css +31 -0
- package/css/sterling/Label.colorful.css +3 -0
- package/css/sterling/Label.css +5 -0
- package/css/sterling/Label.disabled.css +9 -0
- package/css/sterling/Link.base.css +43 -0
- package/css/sterling/Link.colorful.css +15 -0
- package/css/sterling/Link.css +11 -0
- package/css/sterling/Link.disabled.css +10 -0
- package/css/sterling/Link.ghost.colorful.css +7 -0
- package/css/sterling/Link.ghost.css +11 -0
- package/css/sterling/Link.text-underline.css +8 -0
- package/css/sterling/Link.text-underline.ghost.css +13 -0
- package/css/sterling/Link.undecorated.colorful.css +8 -0
- package/css/sterling/Link.undecorated.css +8 -0
- package/css/sterling/Link.undecorated.ghost.css +8 -0
- package/css/sterling/Link.undecorated.underline.css +8 -0
- package/css/sterling/List.base.css +84 -0
- package/css/sterling/List.composed.css +8 -0
- package/css/sterling/List.css +3 -0
- package/css/sterling/List.disabled.css +7 -0
- package/css/sterling/ListItem.base.css +33 -0
- package/css/sterling/ListItem.css +2 -0
- package/css/sterling/ListItem.disabled.css +28 -0
- package/css/sterling/Menu.base.css +21 -0
- package/css/sterling/Menu.css +1 -0
- package/css/sterling/MenuBar.base.css +9 -0
- package/css/sterling/MenuBar.css +1 -0
- package/css/sterling/MenuButton.base.css +13 -0
- package/css/sterling/MenuButton.css +1 -0
- package/css/sterling/MenuItem.base.css +48 -0
- package/css/sterling/MenuItem.css +1 -0
- package/css/sterling/MenuItemDisplay.base.css +84 -0
- package/css/sterling/MenuItemDisplay.css +2 -0
- package/css/sterling/MenuItemDisplay.disabled.css +28 -0
- package/css/sterling/MenuSeparator.base.css +5 -0
- package/css/sterling/MenuSeparator.css +1 -0
- package/css/sterling/Popover.css +21 -0
- package/css/sterling/Progress.base.css +93 -0
- package/css/sterling/Progress.css +2 -0
- package/css/sterling/Progress.disabled.css +17 -0
- package/css/sterling/Radio.base.css +109 -0
- package/css/sterling/Radio.colorful.css +18 -0
- package/css/sterling/Radio.css +3 -0
- package/css/sterling/Radio.disabled.css +28 -0
- package/css/sterling/Select.base.css +101 -0
- package/css/sterling/Select.colorful.css +24 -0
- package/css/sterling/Select.composed.css +12 -0
- package/css/sterling/Select.css +4 -0
- package/css/sterling/Select.disabled.css +28 -0
- package/css/sterling/Slider.base.css +153 -0
- package/css/sterling/Slider.colorful.css +11 -0
- package/css/sterling/Slider.composed.css +8 -0
- package/css/sterling/Slider.css +4 -0
- package/css/sterling/Slider.disabled.css +30 -0
- package/css/sterling/Switch.base.css +175 -0
- package/css/sterling/Switch.colorful.css +45 -0
- package/css/sterling/Switch.css +3 -0
- package/css/sterling/Switch.disabled.css +30 -0
- package/css/sterling/Tab.base.css +96 -0
- package/css/sterling/Tab.colorful.css +13 -0
- package/css/sterling/Tab.css +3 -0
- package/css/sterling/Tab.disabled.css +36 -0
- package/css/sterling/TabList.base.css +34 -0
- package/css/sterling/TabList.css +1 -0
- package/css/sterling/TextArea.base.css +62 -0
- package/css/sterling/TextArea.colorful.css +17 -0
- package/css/sterling/TextArea.composed.css +8 -0
- package/css/sterling/TextArea.css +4 -0
- package/css/sterling/TextArea.disabled.css +28 -0
- package/css/sterling/Tooltip.base.css +6 -0
- package/css/sterling/Tooltip.css +1 -0
- package/css/sterling/Tree.base.css +49 -0
- package/css/sterling/Tree.composed.css +8 -0
- package/css/sterling/Tree.css +3 -0
- package/css/sterling/Tree.disabled.css +27 -0
- package/css/sterling/TreeChevron.base.css +86 -0
- package/css/sterling/TreeChevron.css +1 -0
- package/css/sterling/TreeItem.base.css +41 -0
- package/css/sterling/TreeItem.colorful.css +9 -0
- package/css/sterling/TreeItem.css +3 -0
- package/css/sterling/TreeItem.disabled.css +34 -0
- package/css/sterling/dark-mode.css +134 -0
- package/css/sterling/light-mode.css +134 -0
- package/css/sterling.css +32 -0
- package/package.json +35 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.sterling-tab {
|
|
2
|
+
align-content: center;
|
|
3
|
+
align-items: center;
|
|
4
|
+
background-color: var(--stsv-common__background-color);
|
|
5
|
+
border-color: transparent;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-width: 0;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
color: var(--stsv-common__color);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
display: grid;
|
|
13
|
+
font: inherit;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: 0.5em 1em 0.25em 1em;
|
|
16
|
+
position: relative;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
transition:
|
|
20
|
+
background-color 250ms,
|
|
21
|
+
color 250ms,
|
|
22
|
+
border-color 250ms;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sterling-tab:not(.vertical) {
|
|
27
|
+
grid-template-columns: 1fr;
|
|
28
|
+
grid-template-rows: 1fr 1em;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
justify-items: center;
|
|
31
|
+
row-gap: 0.15em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.sterling-tab.vertical {
|
|
35
|
+
grid-template-columns: 1fr 1em;
|
|
36
|
+
grid-template-rows: 1fr;
|
|
37
|
+
justify-content: flex-start;
|
|
38
|
+
justify-items: flex-start;
|
|
39
|
+
align-content: center;
|
|
40
|
+
align-items: center;
|
|
41
|
+
column-gap: 0.15em;
|
|
42
|
+
padding: 0.25em 1em;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.sterling-tab.using-keyboard:focus-visible {
|
|
46
|
+
outline-color: var(--stsv-common__outline-color);
|
|
47
|
+
outline-offset: 0;
|
|
48
|
+
outline-style: solid;
|
|
49
|
+
outline-width: 2px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ----- content -----*/
|
|
53
|
+
|
|
54
|
+
.sterling-tab .content {
|
|
55
|
+
padding: 0 0.2em;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ----- indicator -----*/
|
|
59
|
+
|
|
60
|
+
.sterling-tab .indicator {
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
border-radius: 10000px;
|
|
63
|
+
transition: background-color 500ms;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sterling-tab:not(.vertical) .indicator {
|
|
67
|
+
justify-self: stretch;
|
|
68
|
+
height: 0.4em;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sterling-tab.vertical .indicator {
|
|
72
|
+
align-self: stretch;
|
|
73
|
+
width: 0.4em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.sterling-tab:not(.selected):not(:active):hover .indicator {
|
|
77
|
+
background-color: var(--stsv-common__color--subtle);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.sterling-tab:active .indicator {
|
|
81
|
+
background-color: var(--stsv-input__border-color--selected);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.sterling-tab.selected .indicator {
|
|
85
|
+
background-color: var(--stsv-input__border-color--selected);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ----- reduced motion -----*/
|
|
89
|
+
|
|
90
|
+
@media (prefers-reduced-motion) {
|
|
91
|
+
.sterling-tab,
|
|
92
|
+
.sterling-tab::after,
|
|
93
|
+
.sterling-tab .indicator {
|
|
94
|
+
transition: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* ----- indicator -----*/
|
|
2
|
+
|
|
3
|
+
.sterling-tab.colorful:not(.selected):not(:active):hover .indicator {
|
|
4
|
+
background-color: var(--stsv-input--colorful__border-color--hover);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sterling-tab.colorful:active .indicator {
|
|
8
|
+
background-color: var(--stsv-input--colorful__border-color--selected);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.sterling-tab.colorful.selected .indicator {
|
|
12
|
+
background-color: var(--stsv-input--colorful__border-color--selected);
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.sterling-tab:disabled {
|
|
2
|
+
cursor: not-allowed;
|
|
3
|
+
outline: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.sterling-tab::after {
|
|
7
|
+
background: repeating-linear-gradient(
|
|
8
|
+
var(--stsv-common--disabled__stripe-angle),
|
|
9
|
+
var(--stsv-common--disabled__stripe-color),
|
|
10
|
+
var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
|
|
11
|
+
var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
|
|
12
|
+
var(--stsv-common--disabled__stripe-color--alt)
|
|
13
|
+
calc(2 * var(--stsv-common--disabled__stripe-width))
|
|
14
|
+
);
|
|
15
|
+
bottom: 0;
|
|
16
|
+
content: '';
|
|
17
|
+
left: 0;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
transition: opacity 250ms;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sterling-tab:disabled::after {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ----- indicator disabled -----*/
|
|
31
|
+
|
|
32
|
+
.sterling-tab:disabled:not(.selected) .indicator,
|
|
33
|
+
.sterling-tab:disabled:not(.selected):hover .indicator,
|
|
34
|
+
.sterling-tab:disabled:not(.selected):active .indicator {
|
|
35
|
+
background-color: transparent;
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.sterling-tab-list {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
display: grid;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: calc(2 * 2px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.sterling-tab-list:not(.vertical) {
|
|
9
|
+
column-gap: 0.5em;
|
|
10
|
+
grid-auto-flow: column;
|
|
11
|
+
grid-template-columns: repeat(auto-fill, auto);
|
|
12
|
+
grid-template-rows: 1fr;
|
|
13
|
+
overflow-x: auto;
|
|
14
|
+
overflow-y: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.sterling-tab-list.vertical {
|
|
18
|
+
grid-auto-flow: row;
|
|
19
|
+
grid-template-rows: auto;
|
|
20
|
+
grid-template-columns: 1fr;
|
|
21
|
+
overflow-x: hidden;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
row-gap: 0.5em;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sterling-tab-list:hover {
|
|
27
|
+
color: var(--stsv-common__color--hover);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion) {
|
|
31
|
+
.sterling-tab-list {
|
|
32
|
+
transition: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('./TabList.base.css');
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.sterling-text-area {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sterling-text-area textarea {
|
|
8
|
+
background-color: var(--stsv-input__background-color);
|
|
9
|
+
border-color: var(--stsv-input__border-color);
|
|
10
|
+
border-radius: 3px;
|
|
11
|
+
border-style: solid;
|
|
12
|
+
border-width: 2px;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
color: var(--stsv-input__color);
|
|
15
|
+
display: block;
|
|
16
|
+
font: inherit;
|
|
17
|
+
line-height: inherit;
|
|
18
|
+
height: 100%;
|
|
19
|
+
outline: none;
|
|
20
|
+
padding: 0.5em;
|
|
21
|
+
margin: 0;
|
|
22
|
+
min-height: 3em;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
resize: var(--TextArea__resize, none);
|
|
25
|
+
transition:
|
|
26
|
+
background-color 250ms,
|
|
27
|
+
color 250ms,
|
|
28
|
+
border-color 250ms;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sterling-text-area textarea:hover {
|
|
33
|
+
background-color: var(--stsv-input__background-color--hover);
|
|
34
|
+
border-color: var(--stsv-input__border-color--hover);
|
|
35
|
+
color: var(--stsv-input__color--hover);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.sterling-text-area textarea:focus {
|
|
39
|
+
background-color: var(--stsv-input__background-color--focus);
|
|
40
|
+
border-color: var(--stsv-input__border-color--focus);
|
|
41
|
+
color: var(--stsv-input__color--focus);
|
|
42
|
+
outline-color: var(--stsv-common__outline-color);
|
|
43
|
+
outline-offset: 0;
|
|
44
|
+
outline-style: solid;
|
|
45
|
+
outline-width: 2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sterling-text-area textarea::placeholder {
|
|
49
|
+
color: var(--stsv-common__color--subtle);
|
|
50
|
+
transition:
|
|
51
|
+
background-color 250ms,
|
|
52
|
+
color 250ms,
|
|
53
|
+
border-color 250ms;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (prefers-reduced-motion) {
|
|
57
|
+
.sterling-text-area,
|
|
58
|
+
.sterling-text-area::after,
|
|
59
|
+
.sterling-text-area textarea {
|
|
60
|
+
transition: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.sterling-text-area.colorful textarea {
|
|
2
|
+
background-color: var(--stsv-input--colorful__background-color);
|
|
3
|
+
border-color: var(--stsv-input--colorful__border-color);
|
|
4
|
+
color: var(--stsv-input--colorful__color);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sterling-text-area.colorful textarea:hover {
|
|
8
|
+
background-color: var(--stsv-input--colorful__background-color--hover);
|
|
9
|
+
border-color: var(--stsv-input--colorful__border-color--hover);
|
|
10
|
+
color: var(--stsv-input--colorful__color--hover);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.sterling-text-area.colorful textarea:focus {
|
|
14
|
+
background-color: var(--stsv-input--colorful__background-color--focus);
|
|
15
|
+
border-color: var(--stsv-input--colorful__border-color--focus);
|
|
16
|
+
color: var(--stsv-input--colorful__color--focus);
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
.sterling-text-area.composed textarea,
|
|
2
|
+
.sterling-text-area.composed:hover textarea,
|
|
3
|
+
.sterling-text-area.composed textarea:focus,
|
|
4
|
+
.sterling-text-area.composed:hover textarea:focus {
|
|
5
|
+
background-color: transparent;
|
|
6
|
+
border-color: transparent;
|
|
7
|
+
outline: none;
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.sterling-text-area:disabled {
|
|
2
|
+
cursor: not-allowed;
|
|
3
|
+
outline: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.sterling-text-area::after {
|
|
7
|
+
background: repeating-linear-gradient(
|
|
8
|
+
var(--stsv-common--disabled__stripe-angle),
|
|
9
|
+
var(--stsv-common--disabled__stripe-color),
|
|
10
|
+
var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
|
|
11
|
+
var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
|
|
12
|
+
var(--stsv-common--disabled__stripe-color--alt)
|
|
13
|
+
calc(2 * var(--stsv-common--disabled__stripe-width))
|
|
14
|
+
);
|
|
15
|
+
bottom: 0;
|
|
16
|
+
content: '';
|
|
17
|
+
left: 0;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
position: absolute;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
transition: opacity 250ms;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sterling-text-area.disabled::after {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('./Tooltip.base.css');
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.sterling-tree {
|
|
2
|
+
background-color: var(--stsv-common__background-color);
|
|
3
|
+
border-color: var(--stsv-common__border-color);
|
|
4
|
+
border-radius: 0;
|
|
5
|
+
border-style: solid;
|
|
6
|
+
border-width: 2px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
color: var(--stsv-common__color);
|
|
9
|
+
height: 100%;
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
margin: 0;
|
|
13
|
+
transition:
|
|
14
|
+
background-color 250ms,
|
|
15
|
+
color 250ms,
|
|
16
|
+
border-color 250ms;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sterling-tree:hover {
|
|
20
|
+
border-color: var(--stsv-input__border-color--hover);
|
|
21
|
+
color: var(--stsv-input__color--hover);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sterling-tree.using-keyboard:focus-within {
|
|
25
|
+
border-color: var(--stsv-button__border-color--focus);
|
|
26
|
+
color: var(--stsv-input__color--focus);
|
|
27
|
+
outline-color: var(--stsv-common__outline-color);
|
|
28
|
+
outline-offset: 0;
|
|
29
|
+
outline-style: solid;
|
|
30
|
+
outline-width: 2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ----- container - a layout panel that grows with the items ----- */
|
|
34
|
+
|
|
35
|
+
.sterling-tree .container {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex-wrap: nowrap;
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ----- media queries ----- */
|
|
43
|
+
|
|
44
|
+
@media (prefers-reduced-motion) {
|
|
45
|
+
.sterling-tree,
|
|
46
|
+
.sterling-tree .container::after {
|
|
47
|
+
transition: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.sterling-tree.disabled * {
|
|
2
|
+
cursor: not-allowed;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.sterling-tree .container::after {
|
|
6
|
+
background: repeating-linear-gradient(
|
|
7
|
+
var(--stsv-common--disabled__stripe-angle),
|
|
8
|
+
var(--stsv-common--disabled__stripe-color),
|
|
9
|
+
var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
|
|
10
|
+
var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
|
|
11
|
+
var(--stsv-common--disabled__stripe-color--alt)
|
|
12
|
+
calc(2 * var(--stsv-common--disabled__stripe-width))
|
|
13
|
+
);
|
|
14
|
+
bottom: 0;
|
|
15
|
+
content: '';
|
|
16
|
+
left: 0;
|
|
17
|
+
opacity: 0;
|
|
18
|
+
position: absolute;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
right: 0;
|
|
21
|
+
top: 0;
|
|
22
|
+
transition: opacity 250ms;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sterling-tree.disabled .container::after {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
.sterling-tree-chevron {
|
|
2
|
+
position: relative;
|
|
3
|
+
border: none;
|
|
4
|
+
background: none;
|
|
5
|
+
height: 1em;
|
|
6
|
+
width: 1em;
|
|
7
|
+
transform-origin: 50% 50%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.sterling-tree-chevron::after {
|
|
11
|
+
position: absolute;
|
|
12
|
+
content: '';
|
|
13
|
+
top: 50%;
|
|
14
|
+
left: 50%;
|
|
15
|
+
width: 7px;
|
|
16
|
+
height: 7px;
|
|
17
|
+
border-right: 3px solid currentColor;
|
|
18
|
+
border-top: 3px solid currentColor;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sterling-tree-chevron:not(.leaf):not(.expanded):not(.animate)::after {
|
|
22
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sterling-tree-chevron:not(.leaf).expanded:not(.animate)::after {
|
|
26
|
+
transform: translate(-50%, -70%) rotate(135deg);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes tree-chevron-collapse {
|
|
30
|
+
from {
|
|
31
|
+
transform: translate(-50%, -70%) rotate(135deg);
|
|
32
|
+
}
|
|
33
|
+
to {
|
|
34
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes tree-chevron-expand {
|
|
39
|
+
from {
|
|
40
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
41
|
+
}
|
|
42
|
+
to {
|
|
43
|
+
transform: translate(-50%, -70%) rotate(135deg);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sterling-tree-chevron:not(.leaf):not(.expanded).animate::after {
|
|
48
|
+
animation-name: tree-chevron-collapse;
|
|
49
|
+
animation-duration: 100ms;
|
|
50
|
+
animation-iteration-count: 1;
|
|
51
|
+
animation-timing-function: linear;
|
|
52
|
+
animation-fill-mode: forwards;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.sterling-tree-chevron:not(.leaf).expanded.animate::after {
|
|
56
|
+
animation-name: tree-chevron-expand;
|
|
57
|
+
animation-duration: 100ms;
|
|
58
|
+
animation-iteration-count: 1;
|
|
59
|
+
animation-timing-function: linear;
|
|
60
|
+
animation-fill-mode: forwards;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sterling-tree-chevron.leaf::after {
|
|
64
|
+
animation: none;
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
font: inherit;
|
|
68
|
+
left: 50%;
|
|
69
|
+
top: 50%;
|
|
70
|
+
width: 0.35em;
|
|
71
|
+
height: 0.35em;
|
|
72
|
+
background: currentColor;
|
|
73
|
+
border-radius: 50%;
|
|
74
|
+
transform: translate(-50%, -50%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (prefers-reduced-motion) {
|
|
78
|
+
.sterling-tree-chevron:not(.leaf):not(.expanded).animate::after {
|
|
79
|
+
animation: none;
|
|
80
|
+
transform: translate(-50%, -50%) rotate(45deg);
|
|
81
|
+
}
|
|
82
|
+
.sterling-tree-chevron:not(.leaf).expanded.animate::after {
|
|
83
|
+
animation: none;
|
|
84
|
+
transform: translate(-50%, -70%) rotate(135deg);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import url('./TreeChevron.base.css');
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.sterling-tree-item {
|
|
2
|
+
outline: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.sterling-tree-item > .item {
|
|
6
|
+
align-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
color: var(--stsv-input__color);
|
|
11
|
+
display: grid;
|
|
12
|
+
grid-template-columns: auto 1fr;
|
|
13
|
+
column-gap: 0.25em;
|
|
14
|
+
margin: 0;
|
|
15
|
+
outline: none;
|
|
16
|
+
padding: 0.5em;
|
|
17
|
+
position: relative;
|
|
18
|
+
padding-left: calc(0.2em + (0.5em * var(--sterling-tree-item-depth)));
|
|
19
|
+
text-overflow: ellipsis;
|
|
20
|
+
transition:
|
|
21
|
+
background-color 250ms,
|
|
22
|
+
color 250ms,
|
|
23
|
+
border-color 250ms;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.sterling-tree-item:not(.disabled):not(.selected) > .item:hover {
|
|
28
|
+
background-color: var(--stsv-button__background-color--hover);
|
|
29
|
+
color: var(--stsv-button__color--hover);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sterling-tree-item:not(.disabled).selected > .item {
|
|
33
|
+
background-color: var(--stsv-button__background-color--active);
|
|
34
|
+
color: var(--stsv-button__color--active);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion) {
|
|
38
|
+
.sterling-tree-item > .item {
|
|
39
|
+
transition: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
.sterling-tree-item.colorful:not(.disabled):not(.selected) > .item:hover {
|
|
2
|
+
background-color: var(--stsv-button--colorful__background-color--hover);
|
|
3
|
+
color: var(--stsv-button--colorful__color--hover);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.sterling-tree-item.colorful:not(.disabled).selected > .item {
|
|
7
|
+
background-color: var(--stsv-button--colorful__background-color--active);
|
|
8
|
+
color: var(--stsv-button--colorful__color--active);
|
|
9
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.sterling-tree-item.disabled > .item {
|
|
2
|
+
cursor: not-allowed;
|
|
3
|
+
outline: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.sterling-tree-item > .item::after {
|
|
7
|
+
background: repeating-linear-gradient(
|
|
8
|
+
var(--stsv-common--disabled__stripe-angle),
|
|
9
|
+
var(--stsv-common--disabled__stripe-color),
|
|
10
|
+
var(--stsv-common--disabled__stripe-color) var(--stsv-common--disabled__stripe-width),
|
|
11
|
+
var(--stsv-common--disabled__stripe-color--alt) var(--stsv-common--disabled__stripe-width),
|
|
12
|
+
var(--stsv-common--disabled__stripe-color--alt)
|
|
13
|
+
calc(2 * var(--stsv-common--disabled__stripe-width))
|
|
14
|
+
);
|
|
15
|
+
bottom: 0;
|
|
16
|
+
content: '';
|
|
17
|
+
left: 0;
|
|
18
|
+
opacity: 0;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
transition: opacity 250ms;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sterling-tree-item.disabled > .item::after {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion) {
|
|
31
|
+
.sterling-tree-item > .item::after {
|
|
32
|
+
transition: none;
|
|
33
|
+
}
|
|
34
|
+
}
|