@soxa-ui/theme-base 0.4.1 → 0.6.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/README.md +46 -0
- package/package.json +3 -3
- package/src/caption.css +10 -10
- package/src/components/accordion.css +52 -6
- package/src/components/alert-dialog.css +38 -0
- package/src/components/alert.css +37 -7
- package/src/components/avatar-group.css +42 -2
- package/src/components/avatar.css +10 -0
- package/src/components/badge.css +35 -10
- package/src/components/breadcrumbs.css +37 -0
- package/src/components/button.css +36 -21
- package/src/components/calendar.css +25 -0
- package/src/components/check-box.css +16 -0
- package/src/components/code-block.css +25 -0
- package/src/components/date-input.css +40 -10
- package/src/components/date-picker.css +57 -5
- package/src/components/dialog.css +23 -0
- package/src/components/drag-and-drop.css +37 -0
- package/src/components/drawer.css +38 -7
- package/src/components/field.css +24 -12
- package/src/components/input.css +41 -17
- package/src/components/label.css +27 -12
- package/src/components/list-box.css +74 -10
- package/src/components/menu.css +54 -9
- package/src/components/number-input.css +53 -11
- package/src/components/pagination.css +49 -6
- package/src/components/popover.css +34 -3
- package/src/components/radio-group.css +57 -5
- package/src/components/rating.css +10 -0
- package/src/components/scroller.css +33 -5
- package/src/components/select.css +63 -9
- package/src/components/skeleton.css +25 -0
- package/src/components/slider.css +31 -13
- package/src/components/switch.css +10 -0
- package/src/components/table.css +44 -10
- package/src/components/tabs.css +99 -14
- package/src/components/tags.css +79 -40
- package/src/components/textarea.css +34 -6
- package/src/components/toasts.css +65 -13
- package/src/components/toggle-group.css +49 -2
- package/src/components/tooltip.css +32 -3
- package/src/group.css +20 -5
- package/src/index.css +2 -1
- package/src/modal.css +100 -71
- package/src/settings.css +98 -0
- package/theme-contract.json +12 -40
- package/theme-variables.json +185 -90
|
@@ -185,6 +185,10 @@
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
.so-calendar--size-sm {
|
|
188
|
+
--so-calendar-spacing-factor: var(
|
|
189
|
+
--so-calendar-spacing-scale,
|
|
190
|
+
var(--so-collection-scale-sm, 1)
|
|
191
|
+
);
|
|
188
192
|
--so-calendar-day: var(--so-button-height-sm);
|
|
189
193
|
--so-calendar-column: max(var(--so-calendar-cell), 2.5 * var(--so-calendar-day-font-size-sm));
|
|
190
194
|
}
|
|
@@ -229,6 +233,10 @@
|
|
|
229
233
|
}
|
|
230
234
|
|
|
231
235
|
.so-calendar--size-lg {
|
|
236
|
+
--so-calendar-spacing-factor: var(
|
|
237
|
+
--so-calendar-spacing-scale,
|
|
238
|
+
var(--so-collection-scale-lg, 1)
|
|
239
|
+
);
|
|
232
240
|
--so-calendar-day: var(--so-button-height-lg);
|
|
233
241
|
--so-calendar-column: max(var(--so-calendar-cell), 2.5 * var(--so-calendar-day-font-size-lg));
|
|
234
242
|
}
|
|
@@ -250,6 +258,10 @@
|
|
|
250
258
|
}
|
|
251
259
|
|
|
252
260
|
.so-calendar--size-xl {
|
|
261
|
+
--so-calendar-spacing-factor: var(
|
|
262
|
+
--so-calendar-spacing-scale,
|
|
263
|
+
var(--so-collection-scale-xl, 1)
|
|
264
|
+
);
|
|
253
265
|
--so-calendar-day: var(--so-button-height-xl);
|
|
254
266
|
--so-calendar-column: max(var(--so-calendar-cell), 2.5 * var(--so-calendar-day-font-size-xl));
|
|
255
267
|
}
|
|
@@ -271,6 +283,10 @@
|
|
|
271
283
|
}
|
|
272
284
|
|
|
273
285
|
.so-calendar--size-2xl {
|
|
286
|
+
--so-calendar-spacing-factor: var(
|
|
287
|
+
--so-calendar-spacing-scale,
|
|
288
|
+
var(--so-collection-scale-2xl, 1)
|
|
289
|
+
);
|
|
274
290
|
--so-calendar-day: var(--so-button-height-2xl);
|
|
275
291
|
--so-calendar-column: max(var(--so-calendar-cell), 2.5 * var(--so-calendar-day-font-size-2xl));
|
|
276
292
|
}
|
|
@@ -592,3 +608,12 @@
|
|
|
592
608
|
overflow: hidden;
|
|
593
609
|
overflow-wrap: normal;
|
|
594
610
|
}
|
|
611
|
+
|
|
612
|
+
/* Use the normal family scale when the size modifier is absent. */
|
|
613
|
+
:where(.so-calendar),
|
|
614
|
+
.so-calendar--size-normal {
|
|
615
|
+
--so-calendar-spacing-factor: var(
|
|
616
|
+
--so-calendar-spacing-scale,
|
|
617
|
+
var(--so-collection-scale-normal, 1)
|
|
618
|
+
);
|
|
619
|
+
}
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.so-check-box--size-sm {
|
|
84
|
+
--so-check-box-spacing-factor: var(--so-check-box-spacing-scale, var(--so-control-scale-sm, 1));
|
|
84
85
|
width: var(--so-check-box-size-sm);
|
|
85
86
|
height: var(--so-check-box-size-sm);
|
|
86
87
|
}
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
.so-check-box--size-lg {
|
|
95
|
+
--so-check-box-spacing-factor: var(--so-check-box-spacing-scale, var(--so-control-scale-lg, 1));
|
|
94
96
|
width: var(--so-check-box-size-lg);
|
|
95
97
|
height: var(--so-check-box-size-lg);
|
|
96
98
|
}
|
|
@@ -101,6 +103,7 @@
|
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
.so-check-box--size-xl {
|
|
106
|
+
--so-check-box-spacing-factor: var(--so-check-box-spacing-scale, var(--so-control-scale-xl, 1));
|
|
104
107
|
width: var(--so-check-box-size-xl);
|
|
105
108
|
height: var(--so-check-box-size-xl);
|
|
106
109
|
}
|
|
@@ -111,6 +114,10 @@
|
|
|
111
114
|
}
|
|
112
115
|
|
|
113
116
|
.so-check-box--size-2xl {
|
|
117
|
+
--so-check-box-spacing-factor: var(
|
|
118
|
+
--so-check-box-spacing-scale,
|
|
119
|
+
var(--so-control-scale-2xl, 1)
|
|
120
|
+
);
|
|
114
121
|
width: var(--so-check-box-size-2xl);
|
|
115
122
|
height: var(--so-check-box-size-2xl);
|
|
116
123
|
}
|
|
@@ -119,3 +126,12 @@
|
|
|
119
126
|
width: var(--so-icon-size-2xl);
|
|
120
127
|
height: var(--so-icon-size-2xl);
|
|
121
128
|
}
|
|
129
|
+
|
|
130
|
+
/* Use the normal family scale when the size modifier is absent. */
|
|
131
|
+
:where(.so-check-box),
|
|
132
|
+
.so-check-box--size-normal {
|
|
133
|
+
--so-check-box-spacing-factor: var(
|
|
134
|
+
--so-check-box-spacing-scale,
|
|
135
|
+
var(--so-control-scale-normal, 1)
|
|
136
|
+
);
|
|
137
|
+
}
|
|
@@ -160,14 +160,39 @@
|
|
|
160
160
|
margin-block: 0;
|
|
161
161
|
}
|
|
162
162
|
.so-code-block--size-sm {
|
|
163
|
+
--so-code-block-spacing-factor: var(
|
|
164
|
+
--so-code-block-spacing-scale,
|
|
165
|
+
var(--so-surface-scale-sm, 1)
|
|
166
|
+
);
|
|
163
167
|
--so-code-block-header-height: var(--so-code-block-header-height-sm);
|
|
164
168
|
}
|
|
165
169
|
.so-code-block--size-lg {
|
|
170
|
+
--so-code-block-spacing-factor: var(
|
|
171
|
+
--so-code-block-spacing-scale,
|
|
172
|
+
var(--so-surface-scale-lg, 1)
|
|
173
|
+
);
|
|
166
174
|
--so-code-block-header-height: var(--so-code-block-header-height-lg);
|
|
167
175
|
}
|
|
168
176
|
.so-code-block--size-xl {
|
|
177
|
+
--so-code-block-spacing-factor: var(
|
|
178
|
+
--so-code-block-spacing-scale,
|
|
179
|
+
var(--so-surface-scale-xl, 1)
|
|
180
|
+
);
|
|
169
181
|
--so-code-block-header-height: var(--so-code-block-header-height-xl);
|
|
170
182
|
}
|
|
171
183
|
.so-code-block--size-2xl {
|
|
184
|
+
--so-code-block-spacing-factor: var(
|
|
185
|
+
--so-code-block-spacing-scale,
|
|
186
|
+
var(--so-surface-scale-2xl, 1)
|
|
187
|
+
);
|
|
172
188
|
--so-code-block-header-height: var(--so-code-block-header-height-2xl);
|
|
173
189
|
}
|
|
190
|
+
|
|
191
|
+
/* Use the normal family scale when the size modifier is absent. */
|
|
192
|
+
:where(.so-code-block),
|
|
193
|
+
.so-code-block--size-normal {
|
|
194
|
+
--so-code-block-spacing-factor: var(
|
|
195
|
+
--so-code-block-spacing-scale,
|
|
196
|
+
var(--so-surface-scale-normal, 1)
|
|
197
|
+
);
|
|
198
|
+
}
|
|
@@ -71,15 +71,24 @@
|
|
|
71
71
|
--so-date-input-literal-padding: 0.125em;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/* Resolve the scaled spacing unit on each consuming node to preserve local settings. */
|
|
75
|
+
.so-date-input,
|
|
76
|
+
.so-date-input__leading,
|
|
77
|
+
.so-date-input__trailing {
|
|
78
|
+
--so-date-input-space: calc(
|
|
79
|
+
var(--so-spacing, 0.25rem) * var(--so-date-input-spacing-factor, 1)
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
/* Размер без модификатора — `normal`: ядро пишет `--size-*` всегда, но блок и
|
|
75
84
|
* без него обязан выглядеть умолчанием. `relative` — опора точки
|
|
76
85
|
* обязательного поля (`required.css`). */
|
|
77
86
|
.so-date-input {
|
|
78
87
|
--so-date-input-height: var(--so-input-height-normal);
|
|
79
|
-
--so-date-input-indent: var(--so-input-indent-normal);
|
|
88
|
+
--so-date-input-indent: var(--so-input-indent-normal, calc(var(--so-date-input-space) * 2));
|
|
80
89
|
--so-date-input-slot-row: calc(
|
|
81
90
|
var(--so-date-input-height) - 2 * var(--so-date-input-border, 0px) - 2 *
|
|
82
|
-
var(--so-input-slot-gap)
|
|
91
|
+
var(--so-input-slot-gap, calc(3px * var(--so-date-input-spacing-factor, 1)))
|
|
83
92
|
);
|
|
84
93
|
position: relative;
|
|
85
94
|
display: inline-flex;
|
|
@@ -103,8 +112,9 @@
|
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
.so-date-input--size-sm {
|
|
115
|
+
--so-date-input-spacing-factor: var(--so-date-input-spacing-scale, var(--so-field-scale-sm, 1));
|
|
106
116
|
--so-date-input-height: var(--so-input-height-sm);
|
|
107
|
-
--so-date-input-indent: var(--so-input-indent-sm);
|
|
117
|
+
--so-date-input-indent: var(--so-input-indent-sm, calc(var(--so-date-input-space) * 2));
|
|
108
118
|
}
|
|
109
119
|
|
|
110
120
|
.so-date-input--size-sm .so-date-input__segments {
|
|
@@ -114,7 +124,7 @@
|
|
|
114
124
|
|
|
115
125
|
.so-date-input--size-normal {
|
|
116
126
|
--so-date-input-height: var(--so-input-height-normal);
|
|
117
|
-
--so-date-input-indent: var(--so-input-indent-normal);
|
|
127
|
+
--so-date-input-indent: var(--so-input-indent-normal, calc(var(--so-date-input-space) * 2));
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
.so-date-input--size-normal .so-date-input__segments {
|
|
@@ -122,8 +132,9 @@
|
|
|
122
132
|
}
|
|
123
133
|
|
|
124
134
|
.so-date-input--size-lg {
|
|
135
|
+
--so-date-input-spacing-factor: var(--so-date-input-spacing-scale, var(--so-field-scale-lg, 1));
|
|
125
136
|
--so-date-input-height: var(--so-input-height-lg);
|
|
126
|
-
--so-date-input-indent: var(--so-input-indent-lg);
|
|
137
|
+
--so-date-input-indent: var(--so-input-indent-lg, calc(var(--so-date-input-space) * 2));
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
.so-date-input--size-lg .so-date-input__segments {
|
|
@@ -132,8 +143,9 @@
|
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
.so-date-input--size-xl {
|
|
146
|
+
--so-date-input-spacing-factor: var(--so-date-input-spacing-scale, var(--so-field-scale-xl, 1));
|
|
135
147
|
--so-date-input-height: var(--so-input-height-xl);
|
|
136
|
-
--so-date-input-indent: var(--so-input-indent-xl);
|
|
148
|
+
--so-date-input-indent: var(--so-input-indent-xl, calc(var(--so-date-input-space) * 2));
|
|
137
149
|
}
|
|
138
150
|
|
|
139
151
|
.so-date-input--size-xl .so-date-input__segments {
|
|
@@ -142,8 +154,12 @@
|
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
.so-date-input--size-2xl {
|
|
157
|
+
--so-date-input-spacing-factor: var(
|
|
158
|
+
--so-date-input-spacing-scale,
|
|
159
|
+
var(--so-field-scale-2xl, 1)
|
|
160
|
+
);
|
|
145
161
|
--so-date-input-height: var(--so-input-height-2xl);
|
|
146
|
-
--so-date-input-indent: var(--so-input-indent-2xl);
|
|
162
|
+
--so-date-input-indent: var(--so-input-indent-2xl, calc(var(--so-date-input-space) * 2));
|
|
147
163
|
}
|
|
148
164
|
|
|
149
165
|
.so-date-input--size-2xl .so-date-input__segments {
|
|
@@ -158,18 +174,18 @@
|
|
|
158
174
|
flex-shrink: 0;
|
|
159
175
|
align-items: center;
|
|
160
176
|
justify-content: center;
|
|
161
|
-
gap: var(--so-input-slot-spacing);
|
|
177
|
+
gap: var(--so-input-slot-spacing, var(--so-date-input-space));
|
|
162
178
|
height: var(--so-date-input-slot-row);
|
|
163
179
|
cursor: default;
|
|
164
180
|
}
|
|
165
181
|
|
|
166
182
|
.so-date-input__leading {
|
|
167
|
-
padding-inline-start: var(--so-input-slot-padding);
|
|
183
|
+
padding-inline-start: var(--so-input-slot-padding, var(--so-date-input-space));
|
|
168
184
|
}
|
|
169
185
|
|
|
170
186
|
.so-date-input__trailing {
|
|
171
187
|
margin-inline-start: auto;
|
|
172
|
-
padding-inline-end: var(--so-input-slot-padding);
|
|
188
|
+
padding-inline-end: var(--so-input-slot-padding, var(--so-date-input-space));
|
|
173
189
|
}
|
|
174
190
|
|
|
175
191
|
/* Кнопка очистки — квадрат в строку слота, как у Input; кнопка календаря
|
|
@@ -222,3 +238,17 @@
|
|
|
222
238
|
.so-date-input__segment[data-type='year'] {
|
|
223
239
|
min-inline-size: calc(4ch + 2 * var(--so-date-input-segment-padding));
|
|
224
240
|
}
|
|
241
|
+
|
|
242
|
+
/* Use the normal family scale when the size modifier is absent. */
|
|
243
|
+
:where(.so-date-input),
|
|
244
|
+
.so-date-input--size-normal {
|
|
245
|
+
--so-date-input-spacing-factor: var(
|
|
246
|
+
--so-date-input-spacing-scale,
|
|
247
|
+
var(--so-field-scale-normal, 1)
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.so-date-input__clear .so-icon {
|
|
252
|
+
max-inline-size: var(--so-date-input-slot-row);
|
|
253
|
+
max-block-size: var(--so-date-input-slot-row);
|
|
254
|
+
}
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
* тема. */
|
|
72
72
|
|
|
73
73
|
:root {
|
|
74
|
-
--so-date-picker-padding:
|
|
74
|
+
--so-date-picker-padding: initial;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.so-date-picker {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--so-date-picker-height: var(--so-input-height-normal);
|
|
98
98
|
--so-date-picker-slot-row: calc(
|
|
99
99
|
var(--so-date-picker-height) - 2 * var(--so-date-picker-border, 0px) - 2 *
|
|
100
|
-
var(--so-input-slot-gap)
|
|
100
|
+
var(--so-input-slot-gap, calc(3px * var(--so-date-picker-spacing-factor, 1)))
|
|
101
101
|
);
|
|
102
102
|
--so-date-picker-button: var(--so-date-picker-slot-row);
|
|
103
103
|
position: relative;
|
|
@@ -182,11 +182,17 @@
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.so-date-picker--mode-range > .so-date-picker__clear {
|
|
185
|
-
margin-inline-end: var(
|
|
185
|
+
margin-inline-end: var(
|
|
186
|
+
--so-input-slot-spacing,
|
|
187
|
+
calc(var(--so-spacing, 0.25rem) * var(--so-date-picker-spacing-factor, 1))
|
|
188
|
+
);
|
|
186
189
|
}
|
|
187
190
|
|
|
188
191
|
.so-date-picker--mode-range > .so-date-picker__trigger {
|
|
189
|
-
margin-inline-end: var(
|
|
192
|
+
margin-inline-end: var(
|
|
193
|
+
--so-input-slot-padding,
|
|
194
|
+
calc(var(--so-spacing, 0.25rem) * var(--so-date-picker-spacing-factor, 1))
|
|
195
|
+
);
|
|
190
196
|
}
|
|
191
197
|
|
|
192
198
|
.so-date-picker__panel {
|
|
@@ -199,10 +205,56 @@
|
|
|
199
205
|
|
|
200
206
|
.so-date-picker__content {
|
|
201
207
|
min-height: 0;
|
|
202
|
-
padding: var(
|
|
208
|
+
padding: var(
|
|
209
|
+
--so-date-picker-padding,
|
|
210
|
+
calc(var(--so-spacing, 0.25rem) * 2 * var(--so-date-picker-spacing-factor, 1))
|
|
211
|
+
);
|
|
203
212
|
overflow-y: auto;
|
|
204
213
|
}
|
|
205
214
|
|
|
206
215
|
.so-date-picker__content > .so-date-picker__calendar {
|
|
207
216
|
width: max-content;
|
|
208
217
|
}
|
|
218
|
+
|
|
219
|
+
/* Resolve the family scale here; explicit length variables remain final overrides. */
|
|
220
|
+
.so-date-picker--size-sm {
|
|
221
|
+
--so-date-picker-spacing-factor: var(
|
|
222
|
+
--so-date-picker-spacing-scale,
|
|
223
|
+
var(--so-field-scale-sm, 1)
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:where(.so-date-picker),
|
|
228
|
+
.so-date-picker--size-normal {
|
|
229
|
+
--so-date-picker-spacing-factor: var(
|
|
230
|
+
--so-date-picker-spacing-scale,
|
|
231
|
+
var(--so-field-scale-normal, 1)
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.so-date-picker--size-lg {
|
|
236
|
+
--so-date-picker-spacing-factor: var(
|
|
237
|
+
--so-date-picker-spacing-scale,
|
|
238
|
+
var(--so-field-scale-lg, 1)
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.so-date-picker--size-xl {
|
|
243
|
+
--so-date-picker-spacing-factor: var(
|
|
244
|
+
--so-date-picker-spacing-scale,
|
|
245
|
+
var(--so-field-scale-xl, 1)
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.so-date-picker--size-2xl {
|
|
250
|
+
--so-date-picker-spacing-factor: var(
|
|
251
|
+
--so-date-picker-spacing-scale,
|
|
252
|
+
var(--so-field-scale-2xl, 1)
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.so-date-picker__clear .so-icon,
|
|
257
|
+
.so-date-picker__trigger .so-icon {
|
|
258
|
+
max-inline-size: var(--so-date-picker-button);
|
|
259
|
+
max-block-size: var(--so-date-picker-button);
|
|
260
|
+
}
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
/* Без кнопки её колонка пуста и ширины не занимает: колонки между собой без
|
|
46
46
|
* зазора, промежутки держат сами кнопки. */
|
|
47
47
|
.so-dialog {
|
|
48
|
+
--so-modal-spacing-factor: var(--so-dialog-spacing-factor);
|
|
48
49
|
position: fixed;
|
|
49
50
|
inset-block: var(--so-dialog-offset-top, var(--so-dialog-offset))
|
|
50
51
|
var(--so-dialog-offset-bottom, var(--so-dialog-offset));
|
|
@@ -93,3 +94,25 @@
|
|
|
93
94
|
max-width: none;
|
|
94
95
|
max-height: none;
|
|
95
96
|
}
|
|
97
|
+
|
|
98
|
+
/* Resolve the family scale here; explicit length variables remain final overrides. */
|
|
99
|
+
.so-dialog--size-sm {
|
|
100
|
+
--so-dialog-spacing-factor: var(--so-dialog-spacing-scale, var(--so-surface-scale-sm, 1));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.so-dialog),
|
|
104
|
+
.so-dialog--size-normal {
|
|
105
|
+
--so-dialog-spacing-factor: var(--so-dialog-spacing-scale, var(--so-surface-scale-normal, 1));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.so-dialog--size-lg {
|
|
109
|
+
--so-dialog-spacing-factor: var(--so-dialog-spacing-scale, var(--so-surface-scale-lg, 1));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.so-dialog--size-xl {
|
|
113
|
+
--so-dialog-spacing-factor: var(--so-dialog-spacing-scale, var(--so-surface-scale-xl, 1));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.so-dialog--size-2xl {
|
|
117
|
+
--so-dialog-spacing-factor: var(--so-dialog-spacing-scale, var(--so-surface-scale-2xl, 1));
|
|
118
|
+
}
|
|
@@ -16,3 +16,40 @@
|
|
|
16
16
|
-webkit-user-select: none;
|
|
17
17
|
user-select: none;
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
/* Resolve the family scale here; explicit length variables remain final overrides. */
|
|
21
|
+
.so-drag-and-drop--size-sm {
|
|
22
|
+
--so-drag-and-drop-spacing-factor: var(
|
|
23
|
+
--so-drag-and-drop-spacing-scale,
|
|
24
|
+
var(--so-surface-scale-sm, 1)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.so-drag-and-drop),
|
|
29
|
+
.so-drag-and-drop--size-normal {
|
|
30
|
+
--so-drag-and-drop-spacing-factor: var(
|
|
31
|
+
--so-drag-and-drop-spacing-scale,
|
|
32
|
+
var(--so-surface-scale-normal, 1)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.so-drag-and-drop--size-lg {
|
|
37
|
+
--so-drag-and-drop-spacing-factor: var(
|
|
38
|
+
--so-drag-and-drop-spacing-scale,
|
|
39
|
+
var(--so-surface-scale-lg, 1)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.so-drag-and-drop--size-xl {
|
|
44
|
+
--so-drag-and-drop-spacing-factor: var(
|
|
45
|
+
--so-drag-and-drop-spacing-scale,
|
|
46
|
+
var(--so-surface-scale-xl, 1)
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.so-drag-and-drop--size-2xl {
|
|
51
|
+
--so-drag-and-drop-spacing-factor: var(
|
|
52
|
+
--so-drag-and-drop-spacing-scale,
|
|
53
|
+
var(--so-surface-scale-2xl, 1)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -36,14 +36,11 @@
|
|
|
36
36
|
:root {
|
|
37
37
|
--so-drawer-width: 20rem;
|
|
38
38
|
--so-drawer-height: auto;
|
|
39
|
-
--so-drawer-gap:
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.so-drawer__backdrop[data-contained='true'] {
|
|
43
|
-
position: absolute;
|
|
39
|
+
--so-drawer-gap: initial;
|
|
44
40
|
}
|
|
45
41
|
|
|
46
42
|
.so-drawer {
|
|
43
|
+
--so-modal-spacing-factor: var(--so-drawer-spacing-factor);
|
|
47
44
|
position: fixed;
|
|
48
45
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
49
46
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
@@ -61,7 +58,13 @@
|
|
|
61
58
|
.so-drawer--placement-end {
|
|
62
59
|
inset-block: 0;
|
|
63
60
|
width: var(--so-drawer-width);
|
|
64
|
-
max-width: calc(
|
|
61
|
+
max-width: calc(
|
|
62
|
+
100% -
|
|
63
|
+
var(
|
|
64
|
+
--so-drawer-gap,
|
|
65
|
+
calc(var(--so-spacing, 0.25rem) * 12 * var(--so-drawer-spacing-factor, 1))
|
|
66
|
+
)
|
|
67
|
+
);
|
|
65
68
|
translate: var(--so-swipe-offset) 0;
|
|
66
69
|
}
|
|
67
70
|
|
|
@@ -69,7 +72,13 @@
|
|
|
69
72
|
.so-drawer--placement-bottom {
|
|
70
73
|
inset-inline: 0;
|
|
71
74
|
height: var(--so-drawer-height);
|
|
72
|
-
max-height: calc(
|
|
75
|
+
max-height: calc(
|
|
76
|
+
100% -
|
|
77
|
+
var(
|
|
78
|
+
--so-drawer-gap,
|
|
79
|
+
calc(var(--so-spacing, 0.25rem) * 12 * var(--so-drawer-spacing-factor, 1))
|
|
80
|
+
)
|
|
81
|
+
);
|
|
73
82
|
translate: 0 var(--so-swipe-offset);
|
|
74
83
|
}
|
|
75
84
|
|
|
@@ -169,3 +178,25 @@
|
|
|
169
178
|
> :is(.so-drawer__title, .so-drawer__body, .so-drawer__footer) {
|
|
170
179
|
padding-inline-end: 0;
|
|
171
180
|
}
|
|
181
|
+
|
|
182
|
+
/* Resolve the family scale here; explicit length variables remain final overrides. */
|
|
183
|
+
.so-drawer--size-sm {
|
|
184
|
+
--so-drawer-spacing-factor: var(--so-drawer-spacing-scale, var(--so-surface-scale-sm, 1));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:where(.so-drawer),
|
|
188
|
+
.so-drawer--size-normal {
|
|
189
|
+
--so-drawer-spacing-factor: var(--so-drawer-spacing-scale, var(--so-surface-scale-normal, 1));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.so-drawer--size-lg {
|
|
193
|
+
--so-drawer-spacing-factor: var(--so-drawer-spacing-scale, var(--so-surface-scale-lg, 1));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.so-drawer--size-xl {
|
|
197
|
+
--so-drawer-spacing-factor: var(--so-drawer-spacing-scale, var(--so-surface-scale-xl, 1));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.so-drawer--size-2xl {
|
|
201
|
+
--so-drawer-spacing-factor: var(--so-drawer-spacing-scale, var(--so-surface-scale-2xl, 1));
|
|
202
|
+
}
|
package/src/components/field.css
CHANGED
|
@@ -25,14 +25,17 @@
|
|
|
25
25
|
--so-field-required-lift: 0.5em;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/* Resolve the scaled spacing unit on each consuming node to preserve local settings. */
|
|
28
29
|
.so-field {
|
|
29
|
-
--so-field-
|
|
30
|
-
--so-field-
|
|
30
|
+
--so-field-space: calc(var(--so-spacing, 0.25rem) * var(--so-field-spacing-factor, 1));
|
|
31
|
+
--so-field-gap: var(--so-caption-gap-normal, calc(var(--so-field-space) * 2));
|
|
32
|
+
--so-field-stack: var(--so-caption-stack-normal, var(--so-field-space));
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
.so-field--size-sm {
|
|
34
|
-
--so-field-
|
|
35
|
-
--so-field-
|
|
36
|
+
--so-field-spacing-factor: var(--so-field-spacing-scale, var(--so-field-scale-sm, 1));
|
|
37
|
+
--so-field-gap: var(--so-caption-gap-sm, calc(var(--so-field-space) * 2));
|
|
38
|
+
--so-field-stack: var(--so-caption-stack-sm, var(--so-field-space));
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
.so-field--size-sm > .so-field__label,
|
|
@@ -54,8 +57,8 @@
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
.so-field--size-normal {
|
|
57
|
-
--so-field-gap: var(--so-caption-gap-normal);
|
|
58
|
-
--so-field-stack: var(--so-caption-stack-normal);
|
|
60
|
+
--so-field-gap: var(--so-caption-gap-normal, calc(var(--so-field-space) * 2));
|
|
61
|
+
--so-field-stack: var(--so-caption-stack-normal, var(--so-field-space));
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
.so-field--size-normal > .so-field__helper,
|
|
@@ -65,8 +68,9 @@
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
.so-field--size-lg {
|
|
68
|
-
--so-field-
|
|
69
|
-
--so-field-
|
|
71
|
+
--so-field-spacing-factor: var(--so-field-spacing-scale, var(--so-field-scale-lg, 1));
|
|
72
|
+
--so-field-gap: var(--so-caption-gap-lg, calc(var(--so-field-space) * 2));
|
|
73
|
+
--so-field-stack: var(--so-caption-stack-lg, var(--so-field-space));
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
.so-field--size-lg > .so-field__label,
|
|
@@ -86,8 +90,9 @@
|
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
.so-field--size-xl {
|
|
89
|
-
--so-field-
|
|
90
|
-
--so-field-
|
|
93
|
+
--so-field-spacing-factor: var(--so-field-spacing-scale, var(--so-field-scale-xl, 1));
|
|
94
|
+
--so-field-gap: var(--so-caption-gap-xl, calc(var(--so-field-space) * 2));
|
|
95
|
+
--so-field-stack: var(--so-caption-stack-xl, var(--so-field-space));
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
.so-field--size-xl > .so-field__label,
|
|
@@ -107,8 +112,9 @@
|
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
.so-field--size-2xl {
|
|
110
|
-
--so-field-
|
|
111
|
-
--so-field-
|
|
115
|
+
--so-field-spacing-factor: var(--so-field-spacing-scale, var(--so-field-scale-2xl, 1));
|
|
116
|
+
--so-field-gap: var(--so-caption-gap-2xl, calc(var(--so-field-space) * 2));
|
|
117
|
+
--so-field-stack: var(--so-caption-stack-2xl, var(--so-field-space));
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
.so-field--size-2xl > .so-field__label,
|
|
@@ -438,3 +444,9 @@
|
|
|
438
444
|
.so-field__control > .so-slider--orientation-horizontal {
|
|
439
445
|
flex: 1 1 auto;
|
|
440
446
|
}
|
|
447
|
+
|
|
448
|
+
/* Use the normal family scale when the size modifier is absent. */
|
|
449
|
+
:where(.so-field),
|
|
450
|
+
.so-field--size-normal {
|
|
451
|
+
--so-field-spacing-factor: var(--so-field-spacing-scale, var(--so-field-scale-normal, 1));
|
|
452
|
+
}
|