@db-ux/core-components 2.4.0 → 2.4.2
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/build/components/button/button.css +1 -1
- package/build/components/button/button.scss +1 -0
- package/build/components/checkbox/checkbox.css +6 -6
- package/build/components/custom-select/custom-select.css +14 -14
- package/build/components/input/input.css +14 -14
- package/build/components/input/input.scss +7 -7
- package/build/components/navigation/navigation.scss +6 -6
- package/build/components/radio/radio.css +6 -6
- package/build/components/select/select.css +14 -14
- package/build/components/switch/switch.css +6 -6
- package/build/components/tag/tag.scss +5 -5
- package/build/components/textarea/textarea.css +14 -14
- package/build/styles/absolute.css +6 -6
- package/build/styles/index.css +6 -6
- package/build/styles/internal/_form-components.scss +26 -21
- package/build/styles/relative.css +6 -6
- package/build/styles/rollup.css +6 -6
- package/build/styles/webpack.css +6 -6
- package/package.json +4 -4
|
@@ -123,12 +123,12 @@ $db-min-inline-size: var(
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
&:has(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
126
|
+
#{$selector}:focus-within,
|
|
127
|
+
#{$selector}:is(input, textarea):not(:placeholder-shown),
|
|
128
|
+
> select option:checked:not([hidden]),
|
|
129
|
+
input[type="checkbox"]:checked,
|
|
130
|
+
input[type="radio"]:checked
|
|
131
|
+
) {
|
|
132
132
|
> label {
|
|
133
133
|
@extend %db-overwrite-font-size-2xs;
|
|
134
134
|
|
|
@@ -227,6 +227,7 @@ $input-valid-types:
|
|
|
227
227
|
$validations: ":required";
|
|
228
228
|
|
|
229
229
|
@if ($selector == input) {
|
|
230
|
+
/* We use all client side form-validation for input here */
|
|
230
231
|
// https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation#using_built-in_form_validation
|
|
231
232
|
$validations: ":required, [minlength], [maxlength], [pattern]";
|
|
232
233
|
|
|
@@ -235,6 +236,7 @@ $input-valid-types:
|
|
|
235
236
|
}
|
|
236
237
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
237
238
|
} @else if($selector == textarea) {
|
|
239
|
+
/* We use all client side form-validation for textarea here */
|
|
238
240
|
$validations: ":required, [minlength], [maxlength]";
|
|
239
241
|
}
|
|
240
242
|
|
|
@@ -254,10 +256,8 @@ $input-valid-types:
|
|
|
254
256
|
$selector: input;
|
|
255
257
|
|
|
256
258
|
&:has(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
):required:#{$user}#{$key}
|
|
260
|
-
) {
|
|
259
|
+
#{$selector}:not([data-custom-validity]):required:#{$user}#{$key}
|
|
260
|
+
) {
|
|
261
261
|
@content;
|
|
262
262
|
}
|
|
263
263
|
/* stylelint-disable-next-line at-rule-empty-line-before */
|
|
@@ -279,8 +279,8 @@ $input-valid-types:
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
@mixin set-required-label($selector) {
|
|
282
|
-
&:has(#{$selector}:required)
|
|
283
|
-
&[data-required="true"]
|
|
282
|
+
&:has(#{$selector}:required),
|
|
283
|
+
&[data-required="true"] {
|
|
284
284
|
&:is(label),
|
|
285
285
|
> label {
|
|
286
286
|
&::after {
|
|
@@ -315,14 +315,17 @@ $input-valid-types:
|
|
|
315
315
|
--db-label-visible-above: 0;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
&:not([data-hide-asterisk="true"]) {
|
|
319
|
+
@include set-required-label($selector);
|
|
320
|
+
}
|
|
321
|
+
|
|
318
322
|
@include set-floating-label-overwrites($selector);
|
|
319
|
-
@include set-required-label($selector);
|
|
320
323
|
|
|
321
324
|
@include get-validity($selector) {
|
|
322
325
|
&:has(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
> .db-infotext[data-semantic="successful"],
|
|
327
|
+
> db-infotext > .db-infotext[data-semantic="successful"]
|
|
328
|
+
) {
|
|
326
329
|
@include get-validity-color($selector, "valid");
|
|
327
330
|
}
|
|
328
331
|
}
|
|
@@ -407,10 +410,10 @@ $input-valid-types:
|
|
|
407
410
|
|
|
408
411
|
// disabled
|
|
409
412
|
&:has(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
413
|
+
#{$selector}:disabled,
|
|
414
|
+
#{$selector}[data-disabled="true"],
|
|
415
|
+
#{$selector}[aria-disabled="true"]
|
|
416
|
+
) {
|
|
414
417
|
// Decided against cursor: not-allowed, compare to e.g. https://phabricator.wikimedia.org/T121960
|
|
415
418
|
opacity: variables.$db-opacity-md;
|
|
416
419
|
pointer-events: none;
|
|
@@ -492,7 +495,9 @@ $input-valid-types:
|
|
|
492
495
|
@mixin set-default-check-element() {
|
|
493
496
|
@extend %db-overwrite-font-size-md;
|
|
494
497
|
|
|
495
|
-
|
|
498
|
+
&:not([data-hide-asterisk="true"]) {
|
|
499
|
+
@include set-required-label(input);
|
|
500
|
+
}
|
|
496
501
|
|
|
497
502
|
&:has(input:disabled) {
|
|
498
503
|
opacity: variables.$db-opacity-md;
|