@skygraph/styles 0.2.4 → 0.6.6
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 +98 -98
- package/components/autocomplete.css +35 -35
- package/components/autofield.css +67 -67
- package/components/avatar.css +37 -37
- package/components/badge.css +102 -102
- package/components/breadcrumb.css +29 -29
- package/components/button.css +181 -181
- package/components/calendar.css +408 -408
- package/components/carousel.css +102 -102
- package/components/cascader.css +380 -380
- package/components/charts.css +408 -408
- package/components/checkbox.css +114 -114
- package/components/collapse.css +166 -166
- package/components/colorpicker.css +252 -252
- package/components/context-menu.css +95 -95
- package/components/descriptions.css +82 -82
- package/components/diagram.css +435 -435
- package/components/drawer.css +124 -124
- package/components/dropdown.css +110 -110
- package/components/empty.css +25 -25
- package/components/event-timeline.css +134 -134
- package/components/field.css +35 -35
- package/components/form.css +115 -115
- package/components/gantt.css +166 -166
- package/components/input-number.css +76 -76
- package/components/input-password.css +104 -104
- package/components/input.css +211 -211
- package/components/list.css +366 -366
- package/components/mentions.css +54 -54
- package/components/menu.css +326 -326
- package/components/modal.css +1 -0
- package/components/notification.css +128 -128
- package/components/pagination.css +162 -162
- package/components/popconfirm.css +95 -95
- package/components/progress.css +116 -116
- package/components/radio.css +95 -95
- package/components/rate.css +48 -48
- package/components/resource-calendar.css +224 -224
- package/components/result.css +45 -45
- package/components/schema-form-editor.css +433 -433
- package/components/search-input.css +112 -112
- package/components/segmented.css +76 -76
- package/components/select.css +181 -181
- package/components/skeleton.css +72 -72
- package/components/slider.css +51 -51
- package/components/spin.css +102 -102
- package/components/steps.css +194 -194
- package/components/switch.css +75 -75
- package/components/table.css +9 -1
- package/components/tabs.css +137 -137
- package/components/tag.css +61 -61
- package/components/textarea.css +22 -22
- package/components/timeline.css +169 -169
- package/components/timepicker.css +224 -224
- package/components/tooltip.css +91 -91
- package/components/transfer.css +140 -140
- package/components/tree.css +601 -601
- package/components/treeselect.css +221 -221
- package/components/upload.css +124 -124
- package/index.css +70 -70
- package/index.d.ts +9 -9
- package/package.json +1 -1
- package/print.css +88 -88
- package/reset.css +17 -17
- package/themes/dark.css +17 -17
- package/themes/default.css +14 -14
- package/tokens.css +310 -310
- package/transitions.css +158 -158
package/components/checkbox.css
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
/* Checkbox — custom box element on top of a visually-hidden native input.
|
|
2
|
-
*
|
|
3
|
-
* The native `<input type="checkbox">` is kept in the DOM (for keyboard,
|
|
4
|
-
* form-association, accessibility, indeterminate) but visually hidden.
|
|
5
|
-
* A sibling `.sg-checkbox-box` element paints the actual UI so demos
|
|
6
|
-
* can rebrand through dedicated `--sg-checkbox-*` tokens without
|
|
7
|
-
* fighting the browser's `accent-color` limitations.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
.sg-checkbox {
|
|
11
|
-
/* Component-local tokens. Override these (not the globals) to rebrand
|
|
12
|
-
* one group of checkboxes — keeps `--sg-color-primary` intact for the
|
|
13
|
-
* rest of the page. */
|
|
14
|
-
--sg-checkbox-size: 16px;
|
|
15
|
-
--sg-checkbox-radius: 4px;
|
|
16
|
-
--sg-checkbox-border: var(--sg-color-border);
|
|
17
|
-
--sg-checkbox-border-hover: var(--sg-color-primary);
|
|
18
|
-
--sg-checkbox-bg: var(--sg-color-bg);
|
|
19
|
-
--sg-checkbox-bg-checked: var(--sg-color-primary);
|
|
20
|
-
--sg-checkbox-color-checked: var(--sg-color-white);
|
|
21
|
-
|
|
22
|
-
position: relative;
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
gap: var(--sg-padding-sm);
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
font-size: var(--sg-font-size);
|
|
28
|
-
color: var(--sg-color-text);
|
|
29
|
-
line-height: var(--sg-line-height);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sg-checkbox-disabled {
|
|
33
|
-
color: var(--sg-color-text-disabled);
|
|
34
|
-
cursor: not-allowed;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Visually hide the native checkbox but keep it focusable & screen-
|
|
38
|
-
* readable. Pointer events are forwarded to the wrapping <label>. */
|
|
39
|
-
.sg-checkbox-input {
|
|
40
|
-
position: absolute;
|
|
41
|
-
width: var(--sg-checkbox-size);
|
|
42
|
-
height: var(--sg-checkbox-size);
|
|
43
|
-
margin: 0;
|
|
44
|
-
opacity: 0;
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sg-checkbox-box {
|
|
49
|
-
position: relative;
|
|
50
|
-
flex-shrink: 0;
|
|
51
|
-
display: inline-block;
|
|
52
|
-
width: var(--sg-checkbox-size);
|
|
53
|
-
height: var(--sg-checkbox-size);
|
|
54
|
-
border: 1px solid var(--sg-checkbox-border);
|
|
55
|
-
border-radius: var(--sg-checkbox-radius);
|
|
56
|
-
background: var(--sg-checkbox-bg);
|
|
57
|
-
transition:
|
|
58
|
-
background var(--sg-transition-duration) var(--sg-transition-timing),
|
|
59
|
-
border-color var(--sg-transition-duration) var(--sg-transition-timing);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.sg-checkbox:hover .sg-checkbox-box {
|
|
63
|
-
border-color: var(--sg-checkbox-border-hover);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.sg-checkbox-input:focus-visible ~ .sg-checkbox-box {
|
|
67
|
-
outline: 2px solid var(--sg-color-primary);
|
|
68
|
-
outline-offset: 2px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.sg-checkbox-input:checked ~ .sg-checkbox-box,
|
|
72
|
-
.sg-checkbox-input:indeterminate ~ .sg-checkbox-box {
|
|
73
|
-
background: var(--sg-checkbox-bg-checked);
|
|
74
|
-
border-color: var(--sg-checkbox-bg-checked);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Tick (checked) */
|
|
78
|
-
.sg-checkbox-input:checked ~ .sg-checkbox-box::after {
|
|
79
|
-
content: '';
|
|
80
|
-
position: absolute;
|
|
81
|
-
left: 5px;
|
|
82
|
-
top: 1px;
|
|
83
|
-
width: 5px;
|
|
84
|
-
height: 9px;
|
|
85
|
-
border: solid var(--sg-checkbox-color-checked);
|
|
86
|
-
border-width: 0 2px 2px 0;
|
|
87
|
-
transform: rotate(45deg);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* Bar (indeterminate) */
|
|
91
|
-
.sg-checkbox-input:indeterminate ~ .sg-checkbox-box::after {
|
|
92
|
-
content: '';
|
|
93
|
-
position: absolute;
|
|
94
|
-
left: 3px;
|
|
95
|
-
right: 3px;
|
|
96
|
-
top: 50%;
|
|
97
|
-
height: 2px;
|
|
98
|
-
background: var(--sg-checkbox-color-checked);
|
|
99
|
-
transform: translateY(-50%);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.sg-checkbox-disabled .sg-checkbox-box {
|
|
103
|
-
background: var(--sg-color-bg-disabled, var(--sg-color-bg-secondary));
|
|
104
|
-
border-color: var(--sg-color-border);
|
|
105
|
-
opacity: 0.6;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.sg-checkbox-label {
|
|
109
|
-
user-select: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.sg-checkbox-loading {
|
|
113
|
-
--sg-spin-color: var(--sg-color-text-tertiary);
|
|
114
|
-
}
|
|
1
|
+
/* Checkbox — custom box element on top of a visually-hidden native input.
|
|
2
|
+
*
|
|
3
|
+
* The native `<input type="checkbox">` is kept in the DOM (for keyboard,
|
|
4
|
+
* form-association, accessibility, indeterminate) but visually hidden.
|
|
5
|
+
* A sibling `.sg-checkbox-box` element paints the actual UI so demos
|
|
6
|
+
* can rebrand through dedicated `--sg-checkbox-*` tokens without
|
|
7
|
+
* fighting the browser's `accent-color` limitations.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.sg-checkbox {
|
|
11
|
+
/* Component-local tokens. Override these (not the globals) to rebrand
|
|
12
|
+
* one group of checkboxes — keeps `--sg-color-primary` intact for the
|
|
13
|
+
* rest of the page. */
|
|
14
|
+
--sg-checkbox-size: 16px;
|
|
15
|
+
--sg-checkbox-radius: 4px;
|
|
16
|
+
--sg-checkbox-border: var(--sg-color-border);
|
|
17
|
+
--sg-checkbox-border-hover: var(--sg-color-primary);
|
|
18
|
+
--sg-checkbox-bg: var(--sg-color-bg);
|
|
19
|
+
--sg-checkbox-bg-checked: var(--sg-color-primary);
|
|
20
|
+
--sg-checkbox-color-checked: var(--sg-color-white);
|
|
21
|
+
|
|
22
|
+
position: relative;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--sg-padding-sm);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
font-size: var(--sg-font-size);
|
|
28
|
+
color: var(--sg-color-text);
|
|
29
|
+
line-height: var(--sg-line-height);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sg-checkbox-disabled {
|
|
33
|
+
color: var(--sg-color-text-disabled);
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Visually hide the native checkbox but keep it focusable & screen-
|
|
38
|
+
* readable. Pointer events are forwarded to the wrapping <label>. */
|
|
39
|
+
.sg-checkbox-input {
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: var(--sg-checkbox-size);
|
|
42
|
+
height: var(--sg-checkbox-size);
|
|
43
|
+
margin: 0;
|
|
44
|
+
opacity: 0;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sg-checkbox-box {
|
|
49
|
+
position: relative;
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: var(--sg-checkbox-size);
|
|
53
|
+
height: var(--sg-checkbox-size);
|
|
54
|
+
border: 1px solid var(--sg-checkbox-border);
|
|
55
|
+
border-radius: var(--sg-checkbox-radius);
|
|
56
|
+
background: var(--sg-checkbox-bg);
|
|
57
|
+
transition:
|
|
58
|
+
background var(--sg-transition-duration) var(--sg-transition-timing),
|
|
59
|
+
border-color var(--sg-transition-duration) var(--sg-transition-timing);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.sg-checkbox:hover .sg-checkbox-box {
|
|
63
|
+
border-color: var(--sg-checkbox-border-hover);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.sg-checkbox-input:focus-visible ~ .sg-checkbox-box {
|
|
67
|
+
outline: 2px solid var(--sg-color-primary);
|
|
68
|
+
outline-offset: 2px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sg-checkbox-input:checked ~ .sg-checkbox-box,
|
|
72
|
+
.sg-checkbox-input:indeterminate ~ .sg-checkbox-box {
|
|
73
|
+
background: var(--sg-checkbox-bg-checked);
|
|
74
|
+
border-color: var(--sg-checkbox-bg-checked);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Tick (checked) */
|
|
78
|
+
.sg-checkbox-input:checked ~ .sg-checkbox-box::after {
|
|
79
|
+
content: '';
|
|
80
|
+
position: absolute;
|
|
81
|
+
left: 5px;
|
|
82
|
+
top: 1px;
|
|
83
|
+
width: 5px;
|
|
84
|
+
height: 9px;
|
|
85
|
+
border: solid var(--sg-checkbox-color-checked);
|
|
86
|
+
border-width: 0 2px 2px 0;
|
|
87
|
+
transform: rotate(45deg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Bar (indeterminate) */
|
|
91
|
+
.sg-checkbox-input:indeterminate ~ .sg-checkbox-box::after {
|
|
92
|
+
content: '';
|
|
93
|
+
position: absolute;
|
|
94
|
+
left: 3px;
|
|
95
|
+
right: 3px;
|
|
96
|
+
top: 50%;
|
|
97
|
+
height: 2px;
|
|
98
|
+
background: var(--sg-checkbox-color-checked);
|
|
99
|
+
transform: translateY(-50%);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sg-checkbox-disabled .sg-checkbox-box {
|
|
103
|
+
background: var(--sg-color-bg-disabled, var(--sg-color-bg-secondary));
|
|
104
|
+
border-color: var(--sg-color-border);
|
|
105
|
+
opacity: 0.6;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.sg-checkbox-label {
|
|
109
|
+
user-select: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.sg-checkbox-loading {
|
|
113
|
+
--sg-spin-color: var(--sg-color-text-tertiary);
|
|
114
|
+
}
|
package/components/collapse.css
CHANGED
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
/* === Collapse === */
|
|
2
|
-
|
|
3
|
-
.sg-collapse {
|
|
4
|
-
font-size: var(--sg-font-size);
|
|
5
|
-
color: var(--sg-color-text);
|
|
6
|
-
line-height: var(--sg-line-height);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/* --- Bordered --- */
|
|
10
|
-
|
|
11
|
-
.sg-collapse-bordered {
|
|
12
|
-
border: 1px solid var(--sg-color-border-secondary);
|
|
13
|
-
border-radius: var(--sg-border-radius-lg);
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.sg-collapse-bordered .sg-collapse-panel + .sg-collapse-panel {
|
|
18
|
-
border-top: 1px solid var(--sg-color-border-secondary);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/* --- Ghost --- */
|
|
22
|
-
|
|
23
|
-
.sg-collapse-ghost {
|
|
24
|
-
background: transparent;
|
|
25
|
-
border: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.sg-collapse-ghost .sg-collapse-header {
|
|
29
|
-
background: transparent;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.sg-collapse-ghost .sg-collapse-panel + .sg-collapse-panel {
|
|
33
|
-
border-top: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* --- Sizes --- */
|
|
37
|
-
|
|
38
|
-
.sg-collapse-small .sg-collapse-header {
|
|
39
|
-
padding: var(--sg-padding-xs) var(--sg-padding-sm);
|
|
40
|
-
min-height: var(--sg-height-sm);
|
|
41
|
-
font-size: var(--sg-font-size-sm);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.sg-collapse-small .sg-collapse-content-inner {
|
|
45
|
-
padding: var(--sg-padding-xs) var(--sg-padding-sm);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sg-collapse-middle .sg-collapse-header {
|
|
49
|
-
padding: var(--sg-padding-sm) var(--sg-padding-lg);
|
|
50
|
-
min-height: var(--sg-height-md);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.sg-collapse-middle .sg-collapse-content-inner {
|
|
54
|
-
padding: var(--sg-padding-sm) var(--sg-padding-lg);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.sg-collapse-large .sg-collapse-header {
|
|
58
|
-
padding: var(--sg-padding-md) var(--sg-padding-xl);
|
|
59
|
-
min-height: var(--sg-height-lg);
|
|
60
|
-
font-size: var(--sg-font-size-lg);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.sg-collapse-large .sg-collapse-content-inner {
|
|
64
|
-
padding: var(--sg-padding-md) var(--sg-padding-xl);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* --- Panel --- */
|
|
68
|
-
|
|
69
|
-
.sg-collapse-panel {
|
|
70
|
-
background: var(--sg-color-bg-container);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.sg-collapse-panel-disabled {
|
|
74
|
-
opacity: 0.5;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.sg-collapse-panel-disabled .sg-collapse-header {
|
|
78
|
-
cursor: not-allowed;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* --- Header --- */
|
|
82
|
-
|
|
83
|
-
.sg-collapse-header {
|
|
84
|
-
display: flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
gap: var(--sg-padding-sm);
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
background: var(--sg-color-bg-secondary);
|
|
89
|
-
font-weight: 500;
|
|
90
|
-
user-select: none;
|
|
91
|
-
transition: background var(--sg-transition-duration) var(--sg-transition-timing);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.sg-collapse-header:hover {
|
|
95
|
-
background: var(--sg-color-bg-hover);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.sg-collapse-panel-disabled .sg-collapse-header:hover {
|
|
99
|
-
background: var(--sg-color-bg-secondary);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.sg-collapse-header:focus-visible {
|
|
103
|
-
outline: 2px solid var(--sg-color-primary);
|
|
104
|
-
outline-offset: -2px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.sg-collapse-header-text {
|
|
108
|
-
flex: 1;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.sg-collapse-extra {
|
|
112
|
-
margin-left: auto;
|
|
113
|
-
color: var(--sg-color-text-secondary);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/* --- Arrow --- */
|
|
117
|
-
|
|
118
|
-
.sg-collapse-arrow {
|
|
119
|
-
display: inline-block;
|
|
120
|
-
width: 12px;
|
|
121
|
-
height: 12px;
|
|
122
|
-
flex-shrink: 0;
|
|
123
|
-
position: relative;
|
|
124
|
-
transition: transform var(--sg-transition-duration) var(--sg-transition-timing);
|
|
125
|
-
transform: rotate(0deg);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.sg-collapse-arrow::before {
|
|
129
|
-
content: '';
|
|
130
|
-
position: absolute;
|
|
131
|
-
top: 2px;
|
|
132
|
-
left: 2px;
|
|
133
|
-
width: 6px;
|
|
134
|
-
height: 6px;
|
|
135
|
-
border-right: 1.5px solid currentColor;
|
|
136
|
-
border-bottom: 1.5px solid currentColor;
|
|
137
|
-
transform: rotate(-45deg);
|
|
138
|
-
transition: transform var(--sg-transition-duration) var(--sg-transition-timing);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.sg-collapse-arrow-open {
|
|
142
|
-
transform: rotate(90deg);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* --- Content --- */
|
|
146
|
-
|
|
147
|
-
.sg-collapse-content {
|
|
148
|
-
/* Dynamic max-height is set via the `--sg-collapse-content-max-height`
|
|
149
|
-
* CSS variable, so the React component no longer has to emit an inline
|
|
150
|
-
* `overflow: hidden` either. Default `0px` keeps the content collapsed
|
|
151
|
-
* before the React state is initialised. */
|
|
152
|
-
--sg-collapse-content-max-height: 0px;
|
|
153
|
-
|
|
154
|
-
transition: max-height 0.3s var(--sg-transition-timing);
|
|
155
|
-
max-height: var(--sg-collapse-content-max-height);
|
|
156
|
-
overflow: hidden;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.sg-collapse-content-inner {
|
|
160
|
-
color: var(--sg-color-text);
|
|
161
|
-
border-top: 1px solid var(--sg-color-border-secondary);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.sg-collapse-ghost .sg-collapse-content-inner {
|
|
165
|
-
border-top: none;
|
|
166
|
-
}
|
|
1
|
+
/* === Collapse === */
|
|
2
|
+
|
|
3
|
+
.sg-collapse {
|
|
4
|
+
font-size: var(--sg-font-size);
|
|
5
|
+
color: var(--sg-color-text);
|
|
6
|
+
line-height: var(--sg-line-height);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* --- Bordered --- */
|
|
10
|
+
|
|
11
|
+
.sg-collapse-bordered {
|
|
12
|
+
border: 1px solid var(--sg-color-border-secondary);
|
|
13
|
+
border-radius: var(--sg-border-radius-lg);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.sg-collapse-bordered .sg-collapse-panel + .sg-collapse-panel {
|
|
18
|
+
border-top: 1px solid var(--sg-color-border-secondary);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* --- Ghost --- */
|
|
22
|
+
|
|
23
|
+
.sg-collapse-ghost {
|
|
24
|
+
background: transparent;
|
|
25
|
+
border: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.sg-collapse-ghost .sg-collapse-header {
|
|
29
|
+
background: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sg-collapse-ghost .sg-collapse-panel + .sg-collapse-panel {
|
|
33
|
+
border-top: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* --- Sizes --- */
|
|
37
|
+
|
|
38
|
+
.sg-collapse-small .sg-collapse-header {
|
|
39
|
+
padding: var(--sg-padding-xs) var(--sg-padding-sm);
|
|
40
|
+
min-height: var(--sg-height-sm);
|
|
41
|
+
font-size: var(--sg-font-size-sm);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.sg-collapse-small .sg-collapse-content-inner {
|
|
45
|
+
padding: var(--sg-padding-xs) var(--sg-padding-sm);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sg-collapse-middle .sg-collapse-header {
|
|
49
|
+
padding: var(--sg-padding-sm) var(--sg-padding-lg);
|
|
50
|
+
min-height: var(--sg-height-md);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.sg-collapse-middle .sg-collapse-content-inner {
|
|
54
|
+
padding: var(--sg-padding-sm) var(--sg-padding-lg);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.sg-collapse-large .sg-collapse-header {
|
|
58
|
+
padding: var(--sg-padding-md) var(--sg-padding-xl);
|
|
59
|
+
min-height: var(--sg-height-lg);
|
|
60
|
+
font-size: var(--sg-font-size-lg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sg-collapse-large .sg-collapse-content-inner {
|
|
64
|
+
padding: var(--sg-padding-md) var(--sg-padding-xl);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* --- Panel --- */
|
|
68
|
+
|
|
69
|
+
.sg-collapse-panel {
|
|
70
|
+
background: var(--sg-color-bg-container);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.sg-collapse-panel-disabled {
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.sg-collapse-panel-disabled .sg-collapse-header {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* --- Header --- */
|
|
82
|
+
|
|
83
|
+
.sg-collapse-header {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: var(--sg-padding-sm);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
background: var(--sg-color-bg-secondary);
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
user-select: none;
|
|
91
|
+
transition: background var(--sg-transition-duration) var(--sg-transition-timing);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sg-collapse-header:hover {
|
|
95
|
+
background: var(--sg-color-bg-hover);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sg-collapse-panel-disabled .sg-collapse-header:hover {
|
|
99
|
+
background: var(--sg-color-bg-secondary);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.sg-collapse-header:focus-visible {
|
|
103
|
+
outline: 2px solid var(--sg-color-primary);
|
|
104
|
+
outline-offset: -2px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.sg-collapse-header-text {
|
|
108
|
+
flex: 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.sg-collapse-extra {
|
|
112
|
+
margin-left: auto;
|
|
113
|
+
color: var(--sg-color-text-secondary);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* --- Arrow --- */
|
|
117
|
+
|
|
118
|
+
.sg-collapse-arrow {
|
|
119
|
+
display: inline-block;
|
|
120
|
+
width: 12px;
|
|
121
|
+
height: 12px;
|
|
122
|
+
flex-shrink: 0;
|
|
123
|
+
position: relative;
|
|
124
|
+
transition: transform var(--sg-transition-duration) var(--sg-transition-timing);
|
|
125
|
+
transform: rotate(0deg);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.sg-collapse-arrow::before {
|
|
129
|
+
content: '';
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 2px;
|
|
132
|
+
left: 2px;
|
|
133
|
+
width: 6px;
|
|
134
|
+
height: 6px;
|
|
135
|
+
border-right: 1.5px solid currentColor;
|
|
136
|
+
border-bottom: 1.5px solid currentColor;
|
|
137
|
+
transform: rotate(-45deg);
|
|
138
|
+
transition: transform var(--sg-transition-duration) var(--sg-transition-timing);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.sg-collapse-arrow-open {
|
|
142
|
+
transform: rotate(90deg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* --- Content --- */
|
|
146
|
+
|
|
147
|
+
.sg-collapse-content {
|
|
148
|
+
/* Dynamic max-height is set via the `--sg-collapse-content-max-height`
|
|
149
|
+
* CSS variable, so the React component no longer has to emit an inline
|
|
150
|
+
* `overflow: hidden` either. Default `0px` keeps the content collapsed
|
|
151
|
+
* before the React state is initialised. */
|
|
152
|
+
--sg-collapse-content-max-height: 0px;
|
|
153
|
+
|
|
154
|
+
transition: max-height 0.3s var(--sg-transition-timing);
|
|
155
|
+
max-height: var(--sg-collapse-content-max-height);
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.sg-collapse-content-inner {
|
|
160
|
+
color: var(--sg-color-text);
|
|
161
|
+
border-top: 1px solid var(--sg-color-border-secondary);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.sg-collapse-ghost .sg-collapse-content-inner {
|
|
165
|
+
border-top: none;
|
|
166
|
+
}
|