@canonical/react-ds-global-form 0.37.0 → 0.38.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 +40 -0
- package/dist/esm/density.css +320 -302
- package/dist/esm/docs/examples/density-examples.css +19 -14
- package/dist/esm/index.css +361 -335
- package/dist/esm/lib/_work_in_progress/DensityTestbed/baseline-system.css +71 -64
- package/dist/esm/lib/_work_in_progress/DensityTestbed/density.testbed.css +127 -123
- package/dist/esm/lib/common/Wrapper/ToggleWrapper.css +73 -54
- package/dist/esm/lib/common/Wrapper/styles.css +35 -31
- package/dist/esm/lib/component/ChoicesField/common/Option/Option.js +4 -1
- package/dist/esm/lib/component/ChoicesField/common/Option/Option.js.map +1 -1
- package/dist/esm/lib/component/ChoicesField/styles.css +195 -163
- package/dist/esm/lib/component/RangeField/common/RangeControl/styles.css +39 -35
- package/dist/esm/lib/component/RichChoicesField/styles.css +93 -89
- package/dist/esm/lib/subcomponent/CheckboxInput/styles.css +115 -111
- package/dist/esm/lib/subcomponent/ColorInput/styles.css +177 -173
- package/dist/esm/lib/subcomponent/ComboboxInput/SingleCombobox.js.map +1 -1
- package/dist/esm/lib/subcomponent/ComboboxInput/common/List/styles.css +33 -29
- package/dist/esm/lib/subcomponent/ComboboxInput/common/ResetButton/styles.css +21 -17
- package/dist/esm/lib/subcomponent/ComboboxInput/styles.css +59 -55
- package/dist/esm/lib/subcomponent/DateInput/styles.css +23 -19
- package/dist/esm/lib/subcomponent/DateTimeInput/styles.css +24 -20
- package/dist/esm/lib/subcomponent/Field/Description/styles.css +9 -5
- package/dist/esm/lib/subcomponent/Field/Error/styles.css +9 -5
- package/dist/esm/lib/subcomponent/Field/Label/Label.js +2 -2
- package/dist/esm/lib/subcomponent/Field/Label/Label.js.map +1 -1
- package/dist/esm/lib/subcomponent/Field/Label/styles.css +25 -21
- package/dist/esm/lib/subcomponent/FileUploadInput/styles.css +125 -119
- package/dist/esm/lib/subcomponent/NumberInput/styles.css +32 -28
- package/dist/esm/lib/subcomponent/PasswordInput/styles.css +58 -54
- package/dist/esm/lib/subcomponent/PhoneInput/styles.css +53 -49
- package/dist/esm/lib/subcomponent/RadioInput/styles.css +70 -66
- package/dist/esm/lib/subcomponent/RangeInput/styles.css +74 -70
- package/dist/esm/lib/subcomponent/RatingInput/styles.css +132 -128
- package/dist/esm/lib/subcomponent/SelectInput/styles.css +44 -40
- package/dist/esm/lib/subcomponent/SwitchInput/styles.css +90 -86
- package/dist/esm/lib/subcomponent/TextInput/styles.css +30 -26
- package/dist/esm/lib/subcomponent/TextareaInput/styles.css +14 -10
- package/dist/esm/lib/subcomponent/TimeInput/styles.css +19 -15
- package/dist/esm/lib/utils/middleware/addRESTValidation.js +1 -1
- package/dist/esm/lib/utils/middleware/addRESTValidation.js.map +1 -1
- package/dist/types/lib/component/ChoicesField/common/Option/Option.d.ts.map +1 -1
- package/dist/types/lib/subcomponent/ComboboxInput/SingleCombobox.d.ts.map +1 -1
- package/package.json +17 -16
|
@@ -1,66 +1,70 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* from @canonical/ds-assets, masked so they take `currentColor`. */
|
|
6
|
-
.ds.input.password {
|
|
7
|
-
direction: inherit;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: stretch;
|
|
10
|
-
position: relative;
|
|
11
|
-
padding: 0;
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
12
5
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: inherit;
|
|
19
|
-
font-family: inherit;
|
|
20
|
-
outline: none;
|
|
21
|
-
/* Baseline engine provides font-size, line-height, padding via `.p` */
|
|
22
|
-
padding-inline: var(--form-input-padding-inline);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
& > .reveal-toggle {
|
|
6
|
+
/* Masked secret entry with a reveal/mask (eye) toggle in the suffix position;
|
|
7
|
+
* no prefix. Chrome mirrors the text input; the toggle uses the show/hide icons
|
|
8
|
+
* from @canonical/ds-assets, masked so they take `currentColor`. */
|
|
9
|
+
.ds.input.password {
|
|
10
|
+
direction: inherit;
|
|
26
11
|
display: flex;
|
|
27
|
-
align-items:
|
|
28
|
-
|
|
29
|
-
padding
|
|
30
|
-
border: none;
|
|
31
|
-
background: transparent;
|
|
32
|
-
color: var(--color-icon);
|
|
33
|
-
cursor: pointer;
|
|
12
|
+
align-items: stretch;
|
|
13
|
+
position: relative;
|
|
14
|
+
padding: 0;
|
|
34
15
|
|
|
35
|
-
& >
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
16
|
+
& > input {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
border: none;
|
|
20
|
+
background: transparent;
|
|
21
|
+
color: inherit;
|
|
22
|
+
font-family: inherit;
|
|
23
|
+
outline: none;
|
|
24
|
+
/* Baseline engine provides font-size, line-height, padding via `.p` */
|
|
25
|
+
padding-inline: var(--form-input-padding-inline);
|
|
26
|
+
}
|
|
45
27
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
28
|
+
& > .reveal-toggle {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
padding-inline: var(--form-field-inline-gap);
|
|
33
|
+
border: none;
|
|
34
|
+
background: transparent;
|
|
35
|
+
color: var(--color-icon);
|
|
36
|
+
cursor: pointer;
|
|
50
37
|
|
|
51
|
-
&
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
& > .reveal-icon {
|
|
39
|
+
width: var(--dimension-200); /* 16px */
|
|
40
|
+
height: var(--dimension-200);
|
|
41
|
+
background-color: currentColor;
|
|
42
|
+
mask-repeat: no-repeat;
|
|
43
|
+
mask-position: center;
|
|
44
|
+
mask-size: contain;
|
|
45
|
+
-webkit-mask-repeat: no-repeat;
|
|
46
|
+
-webkit-mask-position: center;
|
|
47
|
+
-webkit-mask-size: contain;
|
|
48
|
+
|
|
49
|
+
&[data-state="masked"] {
|
|
50
|
+
mask-image: url("/icons/show.svg#show");
|
|
51
|
+
-webkit-mask-image: url("/icons/show.svg#show");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-state="revealed"] {
|
|
55
|
+
mask-image: url("/icons/hide.svg#hide");
|
|
56
|
+
-webkit-mask-image: url("/icons/hide.svg#hide");
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
|
-
}
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
/* No hover colour change: the reveal toggle keeps `--color-icon` in all
|
|
61
|
+
* pointer states (per design review). */
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
&:focus-visible {
|
|
64
|
+
outline: none;
|
|
65
|
+
box-shadow: 0 0 0 1px var(--color-focus-ring);
|
|
66
|
+
border-radius: var(--form-input-border-radius);
|
|
67
|
+
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
}
|
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The .chrome class on the wrapper provides shared border/focus styling.
|
|
3
|
-
* Internal elements share the visual space.
|
|
4
|
-
*/
|
|
5
|
-
.ds.input.phone {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: stretch;
|
|
8
|
-
padding: 0;
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
padding
|
|
19
|
-
border-inline-end: var(--form-input-border-width) solid
|
|
20
|
-
var(--form-input-border-color);
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
white-space: nowrap;
|
|
23
|
-
min-width: 5.5rem;
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Phone — composite input: country selector + telephone number.
|
|
5
|
+
* The .chrome class on the wrapper provides shared border/focus styling.
|
|
6
|
+
* Internal elements share the visual space.
|
|
7
|
+
*/
|
|
8
|
+
.ds.input.phone {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
padding: 0;
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
& > .country-select {
|
|
14
|
+
appearance: none;
|
|
15
|
+
border: none;
|
|
16
|
+
background: transparent;
|
|
17
|
+
color: inherit;
|
|
18
|
+
font-family: inherit;
|
|
19
|
+
/* .p class provides font-size, line-height, baseline nudges */
|
|
20
|
+
padding-inline: var(--form-input-padding-inline);
|
|
21
|
+
padding-inline-end: var(--form-field-inline-gap);
|
|
22
|
+
border-inline-end: var(--form-input-border-width) solid
|
|
23
|
+
var(--form-input-border-color);
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
min-width: 5.5rem;
|
|
27
|
+
|
|
28
|
+
&:focus-visible {
|
|
29
|
+
outline: none;
|
|
30
|
+
background-color: var(
|
|
31
|
+
--hover--color-foreground-input,
|
|
32
|
+
var(--color-foreground-input-hover)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
&:disabled {
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
color: var(--form-input-color-disabled);
|
|
39
|
+
/* The separator ("middle bar") between the two controls must adopt the
|
|
40
|
+
* disabled border colour too. */
|
|
41
|
+
border-inline-end-color: var(--form-input-border-color-disabled);
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
|
-
}
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
& > .number-input {
|
|
46
|
+
flex: 1;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
border: none;
|
|
49
|
+
background: transparent;
|
|
50
|
+
color: inherit;
|
|
51
|
+
font-family: inherit;
|
|
52
|
+
outline: none;
|
|
53
|
+
/* .p class provides font-size, line-height, baseline nudges */
|
|
54
|
+
padding-inline: var(--form-input-padding-inline);
|
|
52
55
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
&:disabled {
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
color: var(--form-input-color-disabled);
|
|
59
|
+
}
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
}
|
|
@@ -1,75 +1,79 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.ds.form-radio {
|
|
6
|
-
appearance: none;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
margin-inline: var(--form-input-padding-inline);
|
|
9
|
-
/* 16px control — a fixed element size, not a baseline multiple (the 4px-baseline
|
|
10
|
-
spike halved the old `--space-baseline × 2`). Stable --dimension-200 (16px). */
|
|
11
|
-
width: var(--dimension-200);
|
|
12
|
-
height: var(--dimension-200);
|
|
13
|
-
border: var(--dimension-stroke-thickness-medium) solid var(--color-border);
|
|
14
|
-
border-radius: 50%;
|
|
15
|
-
background-color: var(
|
|
16
|
-
--surface-color-foreground-radio-unselected,
|
|
17
|
-
var(--color-foreground-radio-unselected)
|
|
18
|
-
);
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
transition:
|
|
21
|
-
background-color 150ms ease,
|
|
22
|
-
border-color 150ms ease;
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
/* Generated by @canonical/summon-component:react v0.1.0 */
|
|
23
5
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
6
|
+
/* The atomic radio control: a circular native input with the design-system
|
|
7
|
+
* selection chrome. Carries no label — the host supplies it. */
|
|
8
|
+
.ds.form-radio {
|
|
9
|
+
appearance: none;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
margin-inline: var(--form-input-padding-inline);
|
|
12
|
+
/* 16px control — a fixed element size, not a baseline multiple (the 4px-baseline
|
|
13
|
+
spike halved the old `--space-baseline × 2`). Stable --dimension-200 (16px). */
|
|
14
|
+
width: var(--dimension-200);
|
|
15
|
+
height: var(--dimension-200);
|
|
16
|
+
border: var(--dimension-stroke-thickness-medium) solid var(--color-border);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
background-color: var(
|
|
19
|
+
--surface-color-foreground-radio-unselected,
|
|
20
|
+
var(--color-foreground-radio-unselected)
|
|
30
21
|
);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
)
|
|
36
|
-
40%,
|
|
37
|
-
var(
|
|
38
|
-
--surface-color-foreground-radio-unselected,
|
|
39
|
-
var(--color-foreground-radio-unselected)
|
|
40
|
-
)
|
|
41
|
-
41%
|
|
42
|
-
);
|
|
43
|
-
}
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
transition:
|
|
24
|
+
background-color var(--motion-duration-fast) ease,
|
|
25
|
+
border-color var(--motion-duration-fast) ease;
|
|
44
26
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
&:checked {
|
|
28
|
+
/* Dot = selected token, ring fill = unselected token; both surface-provided
|
|
29
|
+
* (flat fallback) so the control adapts to OnSurface stepping. */
|
|
30
|
+
border-color: var(
|
|
31
|
+
--surface-color-foreground-radio-selected,
|
|
32
|
+
var(--color-foreground-radio-selected)
|
|
33
|
+
);
|
|
34
|
+
background: radial-gradient(
|
|
35
|
+
var(
|
|
36
|
+
--surface-color-foreground-radio-selected,
|
|
37
|
+
var(--color-foreground-radio-selected)
|
|
38
|
+
)
|
|
39
|
+
40%,
|
|
40
|
+
var(
|
|
41
|
+
--surface-color-foreground-radio-unselected,
|
|
42
|
+
var(--color-foreground-radio-unselected)
|
|
43
|
+
)
|
|
44
|
+
41%
|
|
45
|
+
);
|
|
46
|
+
}
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
&:checked:hover:not(:disabled) {
|
|
53
|
-
border-color: var(--hover--color-foreground-radio-selected);
|
|
54
|
-
background: radial-gradient(
|
|
55
|
-
var(--hover--color-foreground-radio-selected) 40%,
|
|
56
|
-
var(
|
|
57
|
-
--surface-color-foreground-radio-unselected,
|
|
58
|
-
var(--color-foreground-radio-unselected)
|
|
59
|
-
)
|
|
60
|
-
41%
|
|
61
|
-
);
|
|
62
|
-
}
|
|
48
|
+
&:hover:not(:disabled):not(:checked) {
|
|
49
|
+
background-color: var(--color-foreground-radio-unselected-hover);
|
|
50
|
+
}
|
|
63
51
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
52
|
+
/* Hover on a selected radio shifts only the dot's fill, not via a whole-element
|
|
53
|
+
* brightness filter (which would also dim the ring). Re-paint the gradient with
|
|
54
|
+
* the hovered selected shade from the `--hover--…-selected` channel. */
|
|
55
|
+
&:checked:hover:not(:disabled) {
|
|
56
|
+
border-color: var(--hover--color-foreground-radio-selected);
|
|
57
|
+
background: radial-gradient(
|
|
58
|
+
var(--hover--color-foreground-radio-selected) 40%,
|
|
59
|
+
var(
|
|
60
|
+
--surface-color-foreground-radio-unselected,
|
|
61
|
+
var(--color-foreground-radio-unselected)
|
|
62
|
+
)
|
|
63
|
+
41%
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:focus-visible {
|
|
68
|
+
outline: none;
|
|
69
|
+
border-color: var(--color-focus-ring);
|
|
70
|
+
box-shadow: 0 0 0 1px var(--color-focus-ring);
|
|
71
|
+
}
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
&:disabled {
|
|
74
|
+
border-color: var(--color-border-disabled);
|
|
75
|
+
background-color: var(--color-foreground-radio-unselected-disabled);
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
}
|
|
@@ -1,93 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
appearance: none;
|
|
3
|
-
width: 100%;
|
|
4
|
-
/* Element box is as tall as the THUMB (16px), so the thumb and its focus
|
|
5
|
-
* ring are never clipped in a flex row; the visible 8px track is painted by
|
|
6
|
-
* the track pseudo-elements below, vertically centred within this box. */
|
|
7
|
-
height: var(--dimension-200); /* 16px */
|
|
8
|
-
background: transparent;
|
|
9
|
-
border: none;
|
|
10
|
-
outline: none;
|
|
11
|
-
cursor: pointer;
|
|
1
|
+
/* Layer: ds.components.global (@canonical/styles README, "Cascade layers"). */
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* border. Style the track here: flat, no border, 8px tall. */
|
|
16
|
-
&::-webkit-slider-runnable-track {
|
|
17
|
-
height: var(--dimension-100); /* 8px */
|
|
18
|
-
background: var(--color-foreground-slider-track);
|
|
19
|
-
border: none;
|
|
20
|
-
border-radius: var(--dimension-radius-small);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Firefox draws the track via its own pseudo-element with its own UA border —
|
|
24
|
-
* zero it and paint the flat track here to match WebKit. */
|
|
25
|
-
&::-moz-range-track {
|
|
26
|
-
height: var(--dimension-100); /* 8px */
|
|
27
|
-
background: var(--color-foreground-slider-track);
|
|
28
|
-
border: none;
|
|
29
|
-
border-radius: var(--dimension-radius-small);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&::-webkit-slider-thumb {
|
|
3
|
+
@layer ds.components.global {
|
|
4
|
+
.ds.range {
|
|
33
5
|
appearance: none;
|
|
34
|
-
width:
|
|
6
|
+
width: 100%;
|
|
7
|
+
/* Element box is as tall as the THUMB (16px), so the thumb and its focus
|
|
8
|
+
* ring are never clipped in a flex row; the visible 8px track is painted by
|
|
9
|
+
* the track pseudo-elements below, vertically centred within this box. */
|
|
35
10
|
height: var(--dimension-200); /* 16px */
|
|
36
|
-
|
|
37
|
-
Derived from the actual track/thumb dimension tokens, not the baseline unit. */
|
|
38
|
-
margin-top: calc((var(--dimension-100) - var(--dimension-200)) / 2);
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
background: var(--color-foreground-slider-progress);
|
|
11
|
+
background: transparent;
|
|
41
12
|
border: none;
|
|
13
|
+
outline: none;
|
|
42
14
|
cursor: pointer;
|
|
43
|
-
}
|
|
44
15
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
16
|
+
/* WebKit/Chromium paints the bar via this pseudo-element, which keeps a UA
|
|
17
|
+
* border even after `appearance: none` on the element — THIS is the visible
|
|
18
|
+
* border. Style the track here: flat, no border, 8px tall. */
|
|
19
|
+
&::-webkit-slider-runnable-track {
|
|
20
|
+
height: var(--dimension-100); /* 8px */
|
|
21
|
+
background: var(--color-foreground-slider-track);
|
|
22
|
+
border: none;
|
|
23
|
+
border-radius: var(--dimension-radius-small);
|
|
24
|
+
}
|
|
53
25
|
|
|
54
|
-
|
|
55
|
-
|
|
26
|
+
/* Firefox draws the track via its own pseudo-element with its own UA border —
|
|
27
|
+
* zero it and paint the flat track here to match WebKit. */
|
|
28
|
+
&::-moz-range-track {
|
|
29
|
+
height: var(--dimension-100); /* 8px */
|
|
30
|
+
background: var(--color-foreground-slider-track);
|
|
31
|
+
border: none;
|
|
32
|
+
border-radius: var(--dimension-radius-small);
|
|
33
|
+
}
|
|
56
34
|
|
|
57
35
|
&::-webkit-slider-thumb {
|
|
58
|
-
|
|
36
|
+
appearance: none;
|
|
37
|
+
width: var(--dimension-200); /* 16px */
|
|
38
|
+
height: var(--dimension-200); /* 16px */
|
|
39
|
+
/* Re-centre the 16px thumb on the 8px runnable-track: (8 − 16) / 2 = −4px.
|
|
40
|
+
Derived from the actual track/thumb dimension tokens, not the baseline unit. */
|
|
41
|
+
margin-top: calc((var(--dimension-100) - var(--dimension-200)) / 2);
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background: var(--color-foreground-slider-progress);
|
|
44
|
+
border: none;
|
|
45
|
+
cursor: pointer;
|
|
59
46
|
}
|
|
60
47
|
|
|
61
48
|
&::-moz-range-thumb {
|
|
62
|
-
|
|
49
|
+
width: var(--dimension-200); /* 16px */
|
|
50
|
+
height: var(--dimension-200); /* 16px */
|
|
51
|
+
border-radius: 50%;
|
|
52
|
+
background: var(--color-foreground-slider-progress);
|
|
53
|
+
border: none;
|
|
54
|
+
cursor: pointer;
|
|
63
55
|
}
|
|
64
|
-
}
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
&:focus-visible {
|
|
58
|
+
outline: none;
|
|
68
59
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
60
|
+
&::-webkit-slider-thumb {
|
|
61
|
+
box-shadow: 0 0 0 2px var(--color-focus-ring);
|
|
62
|
+
}
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
&::-moz-range-thumb {
|
|
65
|
+
box-shadow: 0 0 0 2px var(--color-focus-ring);
|
|
66
|
+
}
|
|
76
67
|
}
|
|
77
68
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
69
|
+
&:disabled {
|
|
70
|
+
cursor: not-allowed;
|
|
81
71
|
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
/* Track colour lives on the pseudo-elements (the element box is transparent). */
|
|
73
|
+
&::-webkit-slider-runnable-track {
|
|
74
|
+
background: var(--color-foreground-slider-track-disabled);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&::-moz-range-track {
|
|
78
|
+
background: var(--color-foreground-slider-track-disabled);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&::-webkit-slider-thumb {
|
|
82
|
+
background: var(--color-foreground-slider-progress-disabled);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::-moz-range-thumb {
|
|
86
|
+
background: var(--color-foreground-slider-progress-disabled);
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
|
-
}
|
|
87
90
|
|
|
88
|
-
.ds.range-output {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
.ds.range-output {
|
|
92
|
+
display: block;
|
|
93
|
+
text-align: center;
|
|
94
|
+
/* .p class provides font-size, line-height, baseline nudges */
|
|
95
|
+
color: var(--color-text-muted);
|
|
96
|
+
}
|
|
93
97
|
}
|