nuvio 0.0.3 → 1.2.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 +1 -1
- package/README.md +337 -6
- package/dist/nuvio-base-dark.css +1497 -0
- package/dist/nuvio-base-dark.min.css +1 -0
- package/dist/nuvio-base-light.css +1497 -0
- package/dist/nuvio-base-light.min.css +1 -0
- package/dist/nuvio-base-prefer.css +1549 -0
- package/dist/nuvio-base-prefer.min.css +1 -0
- package/dist/nuvio-base.css +1655 -0
- package/dist/nuvio-base.min.css +1 -0
- package/dist/nuvio-dark.css +9755 -0
- package/dist/nuvio-dark.min.css +1 -0
- package/dist/nuvio-light.css +9755 -0
- package/dist/nuvio-light.min.css +1 -0
- package/dist/nuvio-prefer.css +9876 -0
- package/dist/nuvio-prefer.min.css +1 -0
- package/dist/nuvio.css +10104 -17
- package/dist/nuvio.min.css +1 -1
- package/package.json +37 -22
- package/src/_config-base.scss +6 -0
- package/src/_includes-base.scss +10 -0
- package/src/_includes-full.scss +44 -0
- package/src/base/_index.scss +295 -0
- package/src/config/_index.scss +322 -0
- package/src/config/_layers.scss +27 -0
- package/src/config/themes.scss +308 -0
- package/src/config/utilities.scss +106 -0
- package/src/elements/accordion.scss +65 -0
- package/src/elements/block.scss +14 -0
- package/src/elements/box.scss +66 -0
- package/src/elements/dropdown.scss +149 -0
- package/src/elements/footer.scss +9 -0
- package/src/elements/icon.scss +63 -0
- package/src/elements/image.scss +36 -0
- package/src/elements/modal.scss +123 -0
- package/src/elements/navbar.scss +463 -0
- package/src/elements/notification.scss +53 -0
- package/src/elements/placeholder.scss +55 -0
- package/src/elements/progress.scss +85 -0
- package/src/elements/table.scss +149 -0
- package/src/elements/tag.scss +88 -0
- package/src/forms/button.scss +415 -0
- package/src/forms/checkbox-radio.scss +38 -0
- package/src/forms/controls.scss +181 -0
- package/src/forms/file.scss +237 -0
- package/src/forms/form-utilities.scss +109 -0
- package/src/forms/input.scss +27 -0
- package/src/forms/range.scss +96 -0
- package/src/forms/segmented.scss +130 -0
- package/src/forms/select.scss +100 -0
- package/src/forms/textarea.scss +26 -0
- package/src/forms/toggle.scss +106 -0
- package/src/layout/border.scss +34 -0
- package/src/layout/container.scss +36 -0
- package/src/layout/flexbox-base.scss +204 -0
- package/src/layout/flexbox-shorthands.scss +48 -0
- package/src/layout/grid.scss +72 -0
- package/src/layout/overflow.scss +23 -0
- package/src/layout/position.scss +16 -0
- package/src/layout/spacing.scss +70 -0
- package/src/layout/visibility.scss +50 -0
- package/src/main-base-auto.scss +4 -0
- package/src/main-base-dark.scss +4 -0
- package/src/main-base-light.scss +4 -0
- package/src/main-base-prefer.scss +4 -0
- package/src/main-full-auto.scss +4 -0
- package/src/main-full-dark.scss +6 -0
- package/src/main-full-light.scss +6 -0
- package/src/main-full-prefer.scss +6 -0
- package/src/typography/color.scss +25 -0
- package/src/typography/content.scss +185 -0
- package/src/typography/interaction.scss +20 -0
- package/src/typography/text.scss +71 -0
- package/src/typography/title.scss +76 -0
- package/src/_buttons.scss +0 -19
- package/src/_reset.scss +0 -5
- package/src/_typography.scss +0 -13
- package/src/_variables.scss +0 -5
- package/src/main.scss +0 -3
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "../config/themes" as t;
|
|
3
|
+
@use "../config/utilities" as u;
|
|
4
|
+
@use "../config/layers" as l;
|
|
5
|
+
|
|
6
|
+
@include l.layer("components") {
|
|
7
|
+
.label {
|
|
8
|
+
@include t.theme("color", "text-highlight");
|
|
9
|
+
display: block;
|
|
10
|
+
font-size: c.$label-font-size;
|
|
11
|
+
font-weight: c.$label-font-weight;
|
|
12
|
+
&:not(:last-child) { margin-bottom: 0.5em; }
|
|
13
|
+
&.is-small { font-size: c.$font-size-xs; }
|
|
14
|
+
&.is-medium { font-size: c.$font-size-lg; }
|
|
15
|
+
&.is-large { font-size: c.$font-size-xl; }
|
|
16
|
+
|
|
17
|
+
@each $name, $_ in c.$semantic-colors {
|
|
18
|
+
&.is-#{$name} { @include t.theme("color", "ink-#{$name}"); }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.help {
|
|
23
|
+
@include t.theme("color", "text-muted");
|
|
24
|
+
display: block;
|
|
25
|
+
font-size: c.$font-size-sm;
|
|
26
|
+
margin-top: 0.25rem;
|
|
27
|
+
|
|
28
|
+
@each $name, $_ in c.$semantic-colors {
|
|
29
|
+
&.is-#{$name} { @include t.theme("color", "ink-#{$name}"); }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.field {
|
|
34
|
+
&:not(:last-child) { margin-bottom: 0.75rem; }
|
|
35
|
+
|
|
36
|
+
&.has-addons {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: flex-start;
|
|
39
|
+
|
|
40
|
+
.control:not(:last-child) { margin-inline-end: -#{c.$input-border-width}; }
|
|
41
|
+
|
|
42
|
+
.control:not(:first-child):not(:last-child) {
|
|
43
|
+
.button, .input, .select select { border-radius: 0; }
|
|
44
|
+
}
|
|
45
|
+
.control:first-child:not(:only-child) {
|
|
46
|
+
.button, .input, .select select {
|
|
47
|
+
border-start-end-radius: 0;
|
|
48
|
+
border-end-end-radius: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
.control:last-child:not(:only-child) {
|
|
52
|
+
.button, .input, .select select {
|
|
53
|
+
border-start-start-radius: 0;
|
|
54
|
+
border-end-start-radius: 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.button, .input, .select select {
|
|
59
|
+
&:not([disabled]) {
|
|
60
|
+
@include u.on-hover { z-index: 2; }
|
|
61
|
+
&.is-hover { z-index: 2; }
|
|
62
|
+
&:focus, &.is-focused, &:active, &.is-active {
|
|
63
|
+
z-index: 3;
|
|
64
|
+
@include u.on-hover { z-index: 4; }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.control.is-expanded { flex-grow: 1; flex-shrink: 1; }
|
|
70
|
+
&.has-addons-centered { justify-content: center; }
|
|
71
|
+
&.has-addons-right { justify-content: flex-end; }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.is-horizontal {
|
|
75
|
+
@include u.bp-from("sm") { display: flex; }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.field-label {
|
|
80
|
+
.label { font-size: inherit; }
|
|
81
|
+
|
|
82
|
+
@include u.bp-below("sm") { margin-bottom: 0.5rem; }
|
|
83
|
+
|
|
84
|
+
@include u.bp-from("sm") {
|
|
85
|
+
flex-basis: 0;
|
|
86
|
+
flex-grow: 1;
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
margin-inline-end: 1.5rem;
|
|
89
|
+
text-align: end;
|
|
90
|
+
|
|
91
|
+
&.is-small { font-size: c.$font-size-xs; padding-top: 0.375em; }
|
|
92
|
+
&.is-normal { padding-top: 0.375em; }
|
|
93
|
+
&.is-medium { font-size: c.$font-size-lg; padding-top: 0.375em; }
|
|
94
|
+
&.is-large { font-size: c.$font-size-xl; padding-top: 0.375em; }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.field-body {
|
|
99
|
+
.field .field { margin-bottom: 0; }
|
|
100
|
+
|
|
101
|
+
@include u.bp-from("sm") {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-basis: 0;
|
|
104
|
+
flex-grow: 5;
|
|
105
|
+
flex-shrink: 1;
|
|
106
|
+
|
|
107
|
+
.field { margin-bottom: 0; }
|
|
108
|
+
|
|
109
|
+
& > .field {
|
|
110
|
+
flex-shrink: 1;
|
|
111
|
+
&:not(.is-narrow) { flex-grow: 1; }
|
|
112
|
+
&:not(:last-child) { margin-inline-end: 0.75rem; }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.control {
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
clear: both;
|
|
120
|
+
font-size: c.$font-size-base;
|
|
121
|
+
position: relative;
|
|
122
|
+
text-align: inherit;
|
|
123
|
+
|
|
124
|
+
&.has-icons-left,
|
|
125
|
+
&.has-icons-right {
|
|
126
|
+
.input:focus ~ .icon,
|
|
127
|
+
.select:focus ~ .icon { @include t.theme("color", "ink-link"); }
|
|
128
|
+
|
|
129
|
+
@each $name, $_ in c.$semantic-colors {
|
|
130
|
+
.input.is-#{$name} ~ .icon,
|
|
131
|
+
.select.is-#{$name} ~ .icon { @include t.theme("color", "tint-text-#{$name}"); }
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.icon {
|
|
135
|
+
@include t.theme("color", "text-muted");
|
|
136
|
+
font-size: inherit;
|
|
137
|
+
height: c.$input-height;
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: 0;
|
|
141
|
+
width: c.$input-height;
|
|
142
|
+
z-index: 4;
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.has-icons-left {
|
|
150
|
+
.input, .select select { padding-left: c.$input-height; }
|
|
151
|
+
.icon.is-left { left: 0; }
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.has-icons-right {
|
|
155
|
+
.input, .select select { padding-right: c.$input-height; }
|
|
156
|
+
.icon.is-right { right: 0; }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// The icon box and the loader size off the control, not off the input – mirror
|
|
160
|
+
// the input's size modifier here so both follow a sized field.
|
|
161
|
+
&.is-small { font-size: c.$font-size-sm; }
|
|
162
|
+
&.is-medium { font-size: c.$font-size-lg; }
|
|
163
|
+
&.is-large { font-size: c.$font-size-xl; }
|
|
164
|
+
|
|
165
|
+
&.is-loading {
|
|
166
|
+
&::after {
|
|
167
|
+
@include u.loader;
|
|
168
|
+
@include t.theme("border-color", "control-text");
|
|
169
|
+
border-right-color: transparent;
|
|
170
|
+
border-top-color: transparent;
|
|
171
|
+
inset-inline-end: 0.75em;
|
|
172
|
+
position: absolute !important;
|
|
173
|
+
top: 0.75em;
|
|
174
|
+
z-index: 4;
|
|
175
|
+
}
|
|
176
|
+
&.is-small::after { font-size: c.$font-size-sm; }
|
|
177
|
+
&.is-medium::after { font-size: c.$font-size-lg; }
|
|
178
|
+
&.is-large::after { font-size: c.$font-size-xl; }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "../config/themes" as t;
|
|
3
|
+
@use "../config/layers" as l;
|
|
4
|
+
|
|
5
|
+
@include l.layer("components") {
|
|
6
|
+
.file {
|
|
7
|
+
-webkit-touch-callout: none;
|
|
8
|
+
user-select: none;
|
|
9
|
+
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
@each $name, $_ in c.$semantic-colors {
|
|
16
|
+
&.is-#{$name} {
|
|
17
|
+
.file-cta {
|
|
18
|
+
@include t.theme("background-color", "fill-#{$name}");
|
|
19
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
20
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (hover: hover) and (pointer: fine) {
|
|
24
|
+
.file-label:hover .file-cta {
|
|
25
|
+
@include t.theme("background-color", "fill-#{$name}-hover");
|
|
26
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.file-label:active .file-cta {
|
|
31
|
+
@include t.theme("background-color", "fill-#{$name}-active");
|
|
32
|
+
@include t.theme("border-color", "fill-#{$name}-active");
|
|
33
|
+
opacity: 0.85;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.file-name {
|
|
37
|
+
@include t.theme("border-color", "ink-#{$name}");
|
|
38
|
+
@include t.theme("color", "ink-#{$name}");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.is-small {
|
|
44
|
+
font-size: c.$font-size-sm;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.is-medium {
|
|
48
|
+
font-size: c.$font-size-lg;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.is-large {
|
|
52
|
+
font-size: c.$font-size-xl;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.has-name {
|
|
56
|
+
.file-cta {
|
|
57
|
+
border-end-end-radius: 0;
|
|
58
|
+
border-start-end-radius: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.file-name {
|
|
62
|
+
border-end-start-radius: 0;
|
|
63
|
+
border-start-start-radius: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.is-empty {
|
|
67
|
+
.file-cta {
|
|
68
|
+
border-radius: c.$radius;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.file-name {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.is-boxed {
|
|
78
|
+
.file-label {
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.file-cta {
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
height: auto;
|
|
85
|
+
padding: 1em 3em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.file-name {
|
|
89
|
+
border-width: 0 c.$input-border-width c.$input-border-width;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.file-icon {
|
|
93
|
+
height: 1.5em;
|
|
94
|
+
width: 1.5em;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.has-name {
|
|
98
|
+
.file-cta {
|
|
99
|
+
border-end-end-radius: 0;
|
|
100
|
+
border-end-start-radius: 0;
|
|
101
|
+
border-start-end-radius: c.$radius;
|
|
102
|
+
border-start-start-radius: c.$radius;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.file-name {
|
|
106
|
+
border-end-end-radius: c.$radius;
|
|
107
|
+
border-end-start-radius: c.$radius;
|
|
108
|
+
border-start-end-radius: 0;
|
|
109
|
+
border-start-start-radius: 0;
|
|
110
|
+
border-width: 0 c.$input-border-width c.$input-border-width;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&.is-centered {
|
|
116
|
+
justify-content: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.is-fullwidth {
|
|
120
|
+
.file-label {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.file-name {
|
|
125
|
+
flex-grow: 1;
|
|
126
|
+
max-width: none;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// `justify-content: flex-end` already mirrors in RTL – the radii and the
|
|
131
|
+
// dropped border have to follow it, so they are flow-relative too.
|
|
132
|
+
&.is-right {
|
|
133
|
+
justify-content: flex-end;
|
|
134
|
+
|
|
135
|
+
.file-cta {
|
|
136
|
+
border-radius: 0;
|
|
137
|
+
border-start-end-radius: c.$radius;
|
|
138
|
+
border-end-end-radius: c.$radius;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.file-name {
|
|
142
|
+
border-radius: 0;
|
|
143
|
+
border-start-start-radius: c.$radius;
|
|
144
|
+
border-end-start-radius: c.$radius;
|
|
145
|
+
border-width: c.$input-border-width;
|
|
146
|
+
border-inline-end-width: 0;
|
|
147
|
+
order: -1;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.file-label {
|
|
153
|
+
align-items: stretch;
|
|
154
|
+
display: flex;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
justify-content: flex-start;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
position: relative;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.file-input {
|
|
162
|
+
height: 100%;
|
|
163
|
+
inset-inline-start: 0;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
outline: none;
|
|
166
|
+
position: absolute;
|
|
167
|
+
top: 0;
|
|
168
|
+
width: 100%;
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.file-cta,
|
|
173
|
+
.file-name {
|
|
174
|
+
@include t.theme("border-color", "control-border");
|
|
175
|
+
border-radius: c.$radius;
|
|
176
|
+
border-style: solid;
|
|
177
|
+
border-width: c.$input-border-width;
|
|
178
|
+
font-size: 1em;
|
|
179
|
+
height: c.$input-height;
|
|
180
|
+
padding: c.$input-padding-y c.$input-padding-x;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
align-items: center;
|
|
183
|
+
display: inline-flex;
|
|
184
|
+
transition: background-color c.$duration c.$easing,
|
|
185
|
+
border-color c.$duration c.$easing,
|
|
186
|
+
color c.$duration c.$easing,
|
|
187
|
+
opacity c.$duration c.$easing;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.file-cta {
|
|
191
|
+
@include t.theme("background-color", "control-bg");
|
|
192
|
+
@include t.theme("border-color", "control-border");
|
|
193
|
+
@include t.theme("color", "control-text");
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
|
|
196
|
+
@media (hover: hover) and (pointer: fine) {
|
|
197
|
+
.file-label:hover & {
|
|
198
|
+
@include t.theme("background-color", "control-hover");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.file-label:active & {
|
|
203
|
+
@include t.theme("background-color", "control-hover");
|
|
204
|
+
opacity: 0.85;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// The real input is transparent and outline-suppressed, so keyboard focus has to
|
|
209
|
+
// surface on the visible call-to-action instead.
|
|
210
|
+
.file-label:has(.file-input:focus-visible) .file-cta {
|
|
211
|
+
outline: 2px solid;
|
|
212
|
+
outline-offset: 2px;
|
|
213
|
+
@include t.theme("outline-color", "focus-ring");
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.file-name {
|
|
217
|
+
@include t.theme("border-color", "border");
|
|
218
|
+
@include t.theme("color", "text-muted");
|
|
219
|
+
// The CTA sits on the leading side, so the shared edge is dropped there.
|
|
220
|
+
border-width: c.$input-border-width;
|
|
221
|
+
border-inline-start-width: 0;
|
|
222
|
+
display: block;
|
|
223
|
+
max-width: c.$file-name-max-width;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
text-align: inherit;
|
|
226
|
+
text-overflow: ellipsis;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.file-icon {
|
|
230
|
+
align-items: center;
|
|
231
|
+
display: flex;
|
|
232
|
+
height: 1em;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
margin-inline-end: 0.5em;
|
|
235
|
+
width: 1em;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../config" as c;
|
|
3
|
+
@use "../config/themes" as t;
|
|
4
|
+
@use "../config/utilities" as u;
|
|
5
|
+
|
|
6
|
+
// Base mixin for .input, .textarea, .select select
|
|
7
|
+
@mixin control {
|
|
8
|
+
@include t.theme("background-color", "control-bg");
|
|
9
|
+
@include t.theme("border-color", "control-border");
|
|
10
|
+
@include t.theme("color", "text-highlight");
|
|
11
|
+
appearance: none;
|
|
12
|
+
border-radius: c.$input-radius;
|
|
13
|
+
border-style: solid;
|
|
14
|
+
border-width: c.$input-border-width;
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
font-size: c.$input-font-size;
|
|
19
|
+
height: c.$input-height;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
line-height: c.$input-line-height;
|
|
22
|
+
padding-block: c.$input-padding-y;
|
|
23
|
+
padding-inline: c.$input-padding-x;
|
|
24
|
+
position: relative;
|
|
25
|
+
transition: background-color c.$duration c.$easing,
|
|
26
|
+
border-color c.$duration c.$easing,
|
|
27
|
+
box-shadow c.$duration c.$easing,
|
|
28
|
+
color c.$duration c.$easing;
|
|
29
|
+
vertical-align: top;
|
|
30
|
+
width: 100%;
|
|
31
|
+
|
|
32
|
+
@include u.placeholder {
|
|
33
|
+
@include t.theme("color", "text-muted");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include u.on-hover {
|
|
37
|
+
@include t.theme("background-color", "control-hover");
|
|
38
|
+
}
|
|
39
|
+
&.is-hover {
|
|
40
|
+
@include t.theme("background-color", "control-hover");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:focus, &:focus-within, &.is-focused {
|
|
44
|
+
@include t.theme("border-color", "ink-link");
|
|
45
|
+
outline: none;
|
|
46
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-focus-ring) #{c.$focus-ring-opacity}, transparent);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:active, &.is-active {
|
|
50
|
+
@include t.theme("border-color", "ink-link");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Native validation feedback. Same specificity as the :focus rule above, so it
|
|
54
|
+
// has to come after it to win – and before the .is-#{$name} loop below, so an
|
|
55
|
+
// explicit color modifier still wins over it.
|
|
56
|
+
@if c.$form-validation-styling {
|
|
57
|
+
@if map.has-key(c.$semantic-colors, "danger") {
|
|
58
|
+
&:user-invalid {
|
|
59
|
+
@include t.theme("border-color", "fill-danger");
|
|
60
|
+
|
|
61
|
+
&:focus, &:focus-within {
|
|
62
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-fill-danger) #{c.$focus-ring-opacity}, transparent);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@if map.has-key(c.$semantic-colors, "success") {
|
|
68
|
+
&:user-valid {
|
|
69
|
+
@include t.theme("border-color", "fill-success");
|
|
70
|
+
|
|
71
|
+
&:focus, &:focus-within {
|
|
72
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-fill-success) #{c.$focus-ring-opacity}, transparent);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[disabled], fieldset[disabled] & {
|
|
79
|
+
@include t.theme("background-color", "surface-1");
|
|
80
|
+
@include t.theme("color", "text-muted");
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
opacity: 0.7;
|
|
83
|
+
|
|
84
|
+
@include u.placeholder {
|
|
85
|
+
@include t.theme("color", "text-muted");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@each $name, $_ in c.$semantic-colors {
|
|
90
|
+
&.is-#{$name} {
|
|
91
|
+
@include t.theme("background-color", "tint-#{$name}");
|
|
92
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
93
|
+
@include t.theme("color", "tint-text-#{$name}");
|
|
94
|
+
@include u.placeholder {
|
|
95
|
+
@include t.theme("color", "tint-text-#{$name}");
|
|
96
|
+
}
|
|
97
|
+
@include u.on-hover {
|
|
98
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
99
|
+
}
|
|
100
|
+
&.is-hover {
|
|
101
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
102
|
+
}
|
|
103
|
+
&:active, &.is-active {
|
|
104
|
+
@include t.theme("border-color", "fill-#{$name}-active");
|
|
105
|
+
}
|
|
106
|
+
&:focus, &.is-focused { box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-fill-#{$name}) #{c.$focus-ring-opacity}, transparent); }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "form-utilities";
|
|
3
|
+
@use "../config/layers" as l;
|
|
4
|
+
|
|
5
|
+
@include l.layer("components") {
|
|
6
|
+
.input {
|
|
7
|
+
@include form-utilities.control;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
&.is-pill {
|
|
11
|
+
border-radius: c.$radius-pill;
|
|
12
|
+
padding-inline: 1.25em;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.is-static {
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
border-color: transparent;
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
padding-inline: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.is-small { font-size: c.$font-size-sm; }
|
|
23
|
+
&.is-medium { font-size: c.$font-size-lg; }
|
|
24
|
+
&.is-large { font-size: c.$font-size-xl; }
|
|
25
|
+
&.is-fullwidth { display: block; width: 100%; }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "../config/themes" as t;
|
|
3
|
+
@use "../config/layers" as l;
|
|
4
|
+
|
|
5
|
+
@include l.layer("components") {
|
|
6
|
+
.range {
|
|
7
|
+
// --_fill: thumb color (overridden by semantic variants)
|
|
8
|
+
--_fill: var(--nv-fill-link);
|
|
9
|
+
|
|
10
|
+
appearance: none;
|
|
11
|
+
background: transparent;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
display: block;
|
|
14
|
+
height: c.$input-height;
|
|
15
|
+
margin: 0;
|
|
16
|
+
outline: none;
|
|
17
|
+
padding: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
// ── Webkit Track ─────────────────────────────────────────────────────────
|
|
21
|
+
&::-webkit-slider-runnable-track {
|
|
22
|
+
height: c.$progress-height;
|
|
23
|
+
border-radius: c.$progress-radius;
|
|
24
|
+
border: none;
|
|
25
|
+
@include t.theme("background-color", "control-bg");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ── Webkit Thumb ─────────────────────────────────────────────────────────
|
|
29
|
+
&::-webkit-slider-thumb {
|
|
30
|
+
appearance: none;
|
|
31
|
+
width: c.$range-thumb-size;
|
|
32
|
+
height: c.$range-thumb-size;
|
|
33
|
+
border-radius: c.$radius-pill;
|
|
34
|
+
border: none;
|
|
35
|
+
background: var(--_fill);
|
|
36
|
+
// Center thumb vertically over the borderless track
|
|
37
|
+
margin-top: calc((#{c.$progress-height} - #{c.$range-thumb-size}) / 2);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ── Firefox Track ────────────────────────────────────────────────────────
|
|
41
|
+
&::-moz-range-track {
|
|
42
|
+
height: c.$progress-height;
|
|
43
|
+
border-radius: c.$progress-radius;
|
|
44
|
+
border: none;
|
|
45
|
+
@include t.theme("background-color", "control-bg");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// ── Firefox Thumb ────────────────────────────────────────────────────────
|
|
49
|
+
&::-moz-range-thumb {
|
|
50
|
+
appearance: none;
|
|
51
|
+
width: c.$range-thumb-size;
|
|
52
|
+
height: c.$range-thumb-size;
|
|
53
|
+
border-radius: c.$radius-pill;
|
|
54
|
+
border: none;
|
|
55
|
+
background: var(--_fill);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ── Focus ────────────────────────────────────────────────────────────────
|
|
59
|
+
&:focus-visible {
|
|
60
|
+
&::-webkit-slider-thumb {
|
|
61
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-focus-ring) #{c.$focus-ring-opacity}, transparent);
|
|
62
|
+
}
|
|
63
|
+
&::-moz-range-thumb {
|
|
64
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-focus-ring) #{c.$focus-ring-opacity}, transparent);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ── Disabled ─────────────────────────────────────────────────────────────
|
|
69
|
+
&:disabled,
|
|
70
|
+
fieldset[disabled] & {
|
|
71
|
+
cursor: not-allowed;
|
|
72
|
+
opacity: 0.7;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ── Size Modifiers ───────────────────────────────────────────────────────
|
|
76
|
+
&.is-small { font-size: c.$font-size-sm; }
|
|
77
|
+
&.is-medium { font-size: c.$font-size-lg; }
|
|
78
|
+
&.is-large { font-size: c.$font-size-xl; }
|
|
79
|
+
|
|
80
|
+
// ── Semantic Variants ────────────────────────────────────────────────────
|
|
81
|
+
@each $name, $_ in c.$semantic-colors {
|
|
82
|
+
&.is-#{$name} {
|
|
83
|
+
--_fill: var(--nv-fill-#{$name});
|
|
84
|
+
|
|
85
|
+
&:focus-visible {
|
|
86
|
+
&::-webkit-slider-thumb {
|
|
87
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-fill-#{$name}) #{c.$focus-ring-opacity}, transparent);
|
|
88
|
+
}
|
|
89
|
+
&::-moz-range-thumb {
|
|
90
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-fill-#{$name}) #{c.$focus-ring-opacity}, transparent);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|