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,149 @@
|
|
|
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
|
+
.table {
|
|
8
|
+
@include u.block;
|
|
9
|
+
width: auto;
|
|
10
|
+
border-collapse: collapse;
|
|
11
|
+
border-spacing: 0;
|
|
12
|
+
|
|
13
|
+
td, th {
|
|
14
|
+
padding: c.$table-cell-padding-y c.$table-cell-padding-x;
|
|
15
|
+
vertical-align: top;
|
|
16
|
+
text-align: start;
|
|
17
|
+
border-bottom: c.$table-border-width solid;
|
|
18
|
+
@include t.theme("border-bottom-color", "border");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
th {
|
|
22
|
+
@include t.theme("color", "text-highlight");
|
|
23
|
+
font-weight: c.$font-weight-bold;
|
|
24
|
+
|
|
25
|
+
&:not([align]) { text-align: inherit; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
thead th,
|
|
29
|
+
tfoot th {
|
|
30
|
+
font-weight: c.$font-weight-bold;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
thead tr:last-child {
|
|
34
|
+
td, th {
|
|
35
|
+
border-bottom-width: c.$table-border-width * 2;
|
|
36
|
+
@include t.theme("color", "text-highlight");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
tfoot {
|
|
41
|
+
tr:first-child {
|
|
42
|
+
td, th {
|
|
43
|
+
border-top: c.$table-border-width * 2 solid;
|
|
44
|
+
@include t.theme("border-top-color", "border");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
tr:last-child {
|
|
48
|
+
td, th { border-bottom: none; }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
tbody:last-child tr:last-child {
|
|
53
|
+
td, th { border-bottom: none; }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
tr {
|
|
57
|
+
&.is-selected {
|
|
58
|
+
@include t.theme("background-color", "fill-primary");
|
|
59
|
+
@include t.theme("color", "fill-text-primary");
|
|
60
|
+
td, th, a, strong { color: currentColor; }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
td, th {
|
|
65
|
+
&.is-narrow { white-space: nowrap; width: 1%; }
|
|
66
|
+
&.is-vcentered { vertical-align: middle; }
|
|
67
|
+
|
|
68
|
+
&.is-selected {
|
|
69
|
+
@include t.theme("background-color", "fill-primary");
|
|
70
|
+
@include t.theme("color", "fill-text-primary");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@each $name, $_ in c.$semantic-colors {
|
|
74
|
+
&.is-#{$name} {
|
|
75
|
+
@include t.theme("background-color", "fill-#{$name}");
|
|
76
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@each $name, $_ in c.$semantic-colors {
|
|
82
|
+
tr.is-#{$name} {
|
|
83
|
+
td, th {
|
|
84
|
+
@include t.theme("background-color", "fill-#{$name}");
|
|
85
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.is-fullwidth { width: 100%; }
|
|
91
|
+
|
|
92
|
+
&.has-border {
|
|
93
|
+
td, th {
|
|
94
|
+
border: c.$table-border-width solid;
|
|
95
|
+
@include t.theme("border-color", "border");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
thead tr:last-child td,
|
|
99
|
+
thead tr:last-child th { border-bottom-width: c.$table-border-width * 2; }
|
|
100
|
+
|
|
101
|
+
tfoot tr:first-child td,
|
|
102
|
+
tfoot tr:first-child th { border-top-width: c.$table-border-width * 2; }
|
|
103
|
+
|
|
104
|
+
tfoot tr:last-child td,
|
|
105
|
+
tfoot tr:last-child th,
|
|
106
|
+
tbody:last-child tr:last-child td,
|
|
107
|
+
tbody:last-child tr:last-child th {
|
|
108
|
+
border-bottom: c.$table-border-width solid;
|
|
109
|
+
@include t.theme("border-bottom-color", "border");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.is-striped {
|
|
114
|
+
tbody tr:nth-child(even) {
|
|
115
|
+
@include t.theme("background-color", "control-hover");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&.is-narrow {
|
|
120
|
+
td, th { padding: 0.25em 0.5em; }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.is-hover {
|
|
124
|
+
tbody tr {
|
|
125
|
+
transition: background-color c.$duration c.$easing;
|
|
126
|
+
}
|
|
127
|
+
tbody tr:not(.is-selected) {
|
|
128
|
+
@include u.on-hover {
|
|
129
|
+
@include t.theme("background-color", "control-hover");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.is-striped {
|
|
134
|
+
tbody tr:not(.is-selected) {
|
|
135
|
+
@include u.on-hover {
|
|
136
|
+
@include t.theme("background-color", "control-hover");
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.table-container {
|
|
144
|
+
@include u.block;
|
|
145
|
+
overflow-x: auto;
|
|
146
|
+
overflow-y: hidden;
|
|
147
|
+
max-width: 100%;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "../config/themes" as t;
|
|
3
|
+
@use "../config/layers" as l;
|
|
4
|
+
|
|
5
|
+
@include l.layer("components") {
|
|
6
|
+
.tag {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
user-select: none;
|
|
12
|
+
cursor: default;
|
|
13
|
+
padding-block: calc(0.25em - #{c.$control-label-y-compensation}) calc(0.25em + #{c.$control-label-y-compensation});
|
|
14
|
+
padding-inline: c.$tag-padding-x;
|
|
15
|
+
font-size: c.$font-size-xs;
|
|
16
|
+
font-weight: c.$font-weight-medium;
|
|
17
|
+
line-height: 1.5;
|
|
18
|
+
border-radius: c.$tag-radius;
|
|
19
|
+
|
|
20
|
+
@include t.theme("background-color", "surface-3");
|
|
21
|
+
@include t.theme("color", "control-text");
|
|
22
|
+
border-color: transparent;
|
|
23
|
+
|
|
24
|
+
@each $name, $_ in c.$semantic-colors {
|
|
25
|
+
&.is-#{$name} {
|
|
26
|
+
@include t.fill($name);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.is-#{$name}.is-light {
|
|
30
|
+
@include t.theme("background-color", "tint-light-#{$name}");
|
|
31
|
+
@include t.theme("color", "tint-light-text-#{$name}");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.is-#{$name}.is-dark {
|
|
35
|
+
@include t.theme("background-color", "tint-dark-#{$name}");
|
|
36
|
+
@include t.theme("color", "tint-dark-text-#{$name}");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.is-normal { font-size: c.$font-size-xs; }
|
|
41
|
+
&.is-medium { font-size: c.$font-size-sm; }
|
|
42
|
+
&.is-large { font-size: c.$font-size-base; }
|
|
43
|
+
|
|
44
|
+
&.is-pill { border-radius: c.$radius-pill; }
|
|
45
|
+
|
|
46
|
+
.icon {
|
|
47
|
+
font-size: inherit;
|
|
48
|
+
height: 1.5em;
|
|
49
|
+
width: 1.5em;
|
|
50
|
+
margin-inline-start: -0.25em;
|
|
51
|
+
margin-inline-end: 0.25em;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.has-icon-trailing .icon:last-child {
|
|
55
|
+
margin-inline-start: 0.25em;
|
|
56
|
+
margin-inline-end: -0.25em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.is-pill .icon {
|
|
60
|
+
margin-inline-start: -0.35em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.is-pill.has-icon-trailing .icon:last-child {
|
|
64
|
+
margin-inline-end: -0.35em;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tags {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: stretch;
|
|
71
|
+
|
|
72
|
+
.tag {
|
|
73
|
+
&:not(:first-child):not(:last-child) {
|
|
74
|
+
border-radius: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:first-child:not(:only-child) {
|
|
78
|
+
border-start-end-radius: 0;
|
|
79
|
+
border-end-end-radius: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:last-child:not(:only-child) {
|
|
83
|
+
border-start-start-radius: 0;
|
|
84
|
+
border-end-start-radius: 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,415 @@
|
|
|
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
|
+
// ── Base ───────────────────────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
.button {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
gap: .2em;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
|
|
17
|
+
// Asymmetric block padding rather than a transform: it shifts the centered
|
|
18
|
+
// label optically without touching the button's height or its icons.
|
|
19
|
+
padding-block: calc(#{c.$button-padding-y} - #{c.$control-label-y-compensation}) calc(#{c.$button-padding-y} + #{c.$control-label-y-compensation});
|
|
20
|
+
padding-inline: c.$button-padding-x;
|
|
21
|
+
line-height: c.$button-line-height;
|
|
22
|
+
border-style: solid;
|
|
23
|
+
border-width: c.$button-border-width;
|
|
24
|
+
border-radius: c.$button-radius;
|
|
25
|
+
|
|
26
|
+
font-size: c.$button-font-size;
|
|
27
|
+
font-weight: c.$button-font-weight;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
text-align: center;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
height: c.$input-height;
|
|
32
|
+
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
user-select: none;
|
|
35
|
+
appearance: none;
|
|
36
|
+
|
|
37
|
+
transition: background-color c.$duration c.$easing,
|
|
38
|
+
border-color c.$duration c.$easing,
|
|
39
|
+
color c.$duration c.$easing,
|
|
40
|
+
opacity c.$duration c.$easing;
|
|
41
|
+
|
|
42
|
+
@include t.theme("background-color", "control-bg");
|
|
43
|
+
@include t.theme("border-color", "control-border");
|
|
44
|
+
@include t.theme("color", "control-text");
|
|
45
|
+
|
|
46
|
+
strong {
|
|
47
|
+
color: inherit;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.icon {
|
|
51
|
+
|
|
52
|
+
&,
|
|
53
|
+
&.is-small,
|
|
54
|
+
&.is-medium,
|
|
55
|
+
&.is-large {
|
|
56
|
+
font-size: inherit;
|
|
57
|
+
height: 1.5em;
|
|
58
|
+
width: 1.5em;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
transform: translateY(c.$button-icon-y-compensation);
|
|
62
|
+
margin-inline-start: -.3em + c.$button-icon-x-compensation;
|
|
63
|
+
margin-inline-end: 0;
|
|
64
|
+
|
|
65
|
+
/* vertical compensation (yc) micro adjustments for specific icons */
|
|
66
|
+
&.yc-up1 { transform: translateY(c.$button-icon-y-compensation - .5px); }
|
|
67
|
+
&.yc-up2 { transform: translateY(c.$button-icon-y-compensation - 1px); }
|
|
68
|
+
&.yc-up3 { transform: translateY(c.$button-icon-y-compensation - 1.5px); }
|
|
69
|
+
&.yc-down1 { transform: translateY(c.$button-icon-y-compensation + .5px); }
|
|
70
|
+
&.yc-down2 { transform: translateY(c.$button-icon-y-compensation + 1px); }
|
|
71
|
+
&.yc-down3 { transform: translateY(c.$button-icon-y-compensation + 1.5px); }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.has-icon-trailing .icon:last-child {
|
|
75
|
+
margin-inline-start: 0;
|
|
76
|
+
margin-inline-end: -.3em + c.$button-icon-x-compensation;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.is-icon-only .icon {
|
|
80
|
+
margin-inline: -.4em + c.$button-icon-x-compensation;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.is-pill .icon {
|
|
84
|
+
margin-inline-start: -.5em + c.$button-icon-x-compensation;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.is-pill.has-icon-trailing .icon:last-child {
|
|
88
|
+
margin-inline-start: 0;
|
|
89
|
+
margin-inline-end: -.5em + c.$button-icon-x-compensation;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.is-pill.is-icon-only .icon {
|
|
93
|
+
margin-inline: -1em + c.$button-icon-x-compensation;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include u.on-hover {
|
|
97
|
+
@include t.theme("background-color", "control-hover");
|
|
98
|
+
@include t.theme("color", "control-text");
|
|
99
|
+
}
|
|
100
|
+
&.is-hover {
|
|
101
|
+
@include t.theme("background-color", "control-hover");
|
|
102
|
+
@include t.theme("color", "control-text");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&.is-hoverless {
|
|
106
|
+
|
|
107
|
+
@include u.on-hover {
|
|
108
|
+
@include t.theme("background-color", "control-bg");
|
|
109
|
+
@include t.theme("color", "control-text");
|
|
110
|
+
}
|
|
111
|
+
&.is-hover {
|
|
112
|
+
@include t.theme("background-color", "control-bg");
|
|
113
|
+
@include t.theme("color", "control-text");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:focus-visible,
|
|
118
|
+
&.is-focused {
|
|
119
|
+
outline: 2px solid;
|
|
120
|
+
@include t.theme("outline-color", "focus-ring");
|
|
121
|
+
outline-offset: 2px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:active,
|
|
125
|
+
&.is-active {
|
|
126
|
+
@include t.theme("background-color", "control-hover");
|
|
127
|
+
opacity: 0.85;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&[disabled],
|
|
131
|
+
fieldset[disabled] & {
|
|
132
|
+
opacity: 0.5;
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// ── Solid Color Variants ─────────────────────────────────────────────────
|
|
137
|
+
|
|
138
|
+
@each $name, $_ in c.$semantic-colors {
|
|
139
|
+
&.is-#{$name} {
|
|
140
|
+
@include t.fill($name);
|
|
141
|
+
|
|
142
|
+
@include u.on-hover {
|
|
143
|
+
@include t.theme("background-color", "fill-#{$name}-hover");
|
|
144
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
145
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
146
|
+
opacity: 1;
|
|
147
|
+
}
|
|
148
|
+
&.is-hover {
|
|
149
|
+
@include t.theme("background-color", "fill-#{$name}-hover");
|
|
150
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
151
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
152
|
+
opacity: 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:active,
|
|
156
|
+
&.is-active {
|
|
157
|
+
@include t.theme("background-color", "fill-#{$name}-active");
|
|
158
|
+
@include t.theme("border-color", "fill-#{$name}-active");
|
|
159
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
160
|
+
opacity: 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:focus-visible {
|
|
164
|
+
@include t.theme("outline-color", "fill-#{$name}");
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&[disabled],
|
|
168
|
+
fieldset[disabled] & {
|
|
169
|
+
@include t.theme("background-color", "fill-#{$name}");
|
|
170
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
171
|
+
opacity: 0.5;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.is-loading::after {
|
|
176
|
+
@include t.theme("border-color", "fill-text-#{$name}");
|
|
177
|
+
border-right-color: transparent;
|
|
178
|
+
border-top-color: transparent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&.is-hoverless {
|
|
182
|
+
|
|
183
|
+
@include u.on-hover {
|
|
184
|
+
@include t.fill($name);
|
|
185
|
+
opacity: 1;
|
|
186
|
+
}
|
|
187
|
+
&.is-hover {
|
|
188
|
+
@include t.fill($name);
|
|
189
|
+
opacity: 1;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&.is-light {
|
|
194
|
+
@include t.theme("background-color", "tint-light-#{$name}");
|
|
195
|
+
@include t.theme("border-color", "tint-light-#{$name}");
|
|
196
|
+
@include t.theme("color", "tint-light-text-#{$name}");
|
|
197
|
+
|
|
198
|
+
@include u.on-hover {
|
|
199
|
+
@include t.theme("background-color", "tint-light-#{$name}");
|
|
200
|
+
@include t.theme("color", "tint-light-text-#{$name}");
|
|
201
|
+
opacity: 0.85;
|
|
202
|
+
}
|
|
203
|
+
&.is-hover {
|
|
204
|
+
@include t.theme("background-color", "tint-light-#{$name}");
|
|
205
|
+
@include t.theme("color", "tint-light-text-#{$name}");
|
|
206
|
+
opacity: 0.85;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.is-loading::after {
|
|
210
|
+
@include t.theme("border-color", "tint-light-text-#{$name}");
|
|
211
|
+
border-right-color: transparent;
|
|
212
|
+
border-top-color: transparent;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&.is-dark {
|
|
217
|
+
@include t.theme("background-color", "tint-dark-#{$name}");
|
|
218
|
+
@include t.theme("border-color", "tint-dark-#{$name}");
|
|
219
|
+
@include t.theme("color", "tint-dark-text-#{$name}");
|
|
220
|
+
|
|
221
|
+
@include u.on-hover {
|
|
222
|
+
@include t.theme("background-color", "tint-dark-#{$name}");
|
|
223
|
+
@include t.theme("color", "tint-dark-text-#{$name}");
|
|
224
|
+
opacity: 0.85;
|
|
225
|
+
}
|
|
226
|
+
&.is-hover {
|
|
227
|
+
@include t.theme("background-color", "tint-dark-#{$name}");
|
|
228
|
+
@include t.theme("color", "tint-dark-text-#{$name}");
|
|
229
|
+
opacity: 0.85;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&.is-loading::after {
|
|
233
|
+
@include t.theme("border-color", "tint-dark-text-#{$name}");
|
|
234
|
+
border-right-color: transparent;
|
|
235
|
+
border-top-color: transparent;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// ── Outlined ─────────────────────────────────────────────────────────────
|
|
242
|
+
|
|
243
|
+
&.is-outlined {
|
|
244
|
+
background-color: transparent;
|
|
245
|
+
@include t.theme("border-color", "control-border");
|
|
246
|
+
@include t.theme("color", "control-text");
|
|
247
|
+
|
|
248
|
+
@include u.on-hover {
|
|
249
|
+
@include t.theme("background-color", "control-hover");
|
|
250
|
+
}
|
|
251
|
+
&.is-hover {
|
|
252
|
+
@include t.theme("background-color", "control-hover");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&.is-hoverless {
|
|
256
|
+
|
|
257
|
+
@include u.on-hover {
|
|
258
|
+
background-color: transparent;
|
|
259
|
+
}
|
|
260
|
+
&.is-hover {
|
|
261
|
+
background-color: transparent;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&[disabled],
|
|
266
|
+
fieldset[disabled] & {
|
|
267
|
+
background-color: transparent;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
@each $name, $_ in c.$semantic-colors {
|
|
271
|
+
&.is-#{$name} {
|
|
272
|
+
background-color: transparent;
|
|
273
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
274
|
+
@include t.theme("color", "ink-#{$name}");
|
|
275
|
+
|
|
276
|
+
@include u.on-hover {
|
|
277
|
+
@include t.theme("background-color", "fill-#{$name}-hover");
|
|
278
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
279
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
280
|
+
opacity: 1;
|
|
281
|
+
}
|
|
282
|
+
&.is-hover {
|
|
283
|
+
@include t.theme("background-color", "fill-#{$name}-hover");
|
|
284
|
+
@include t.theme("border-color", "fill-#{$name}-hover");
|
|
285
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
286
|
+
opacity: 1;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
&.is-hoverless {
|
|
290
|
+
|
|
291
|
+
@include u.on-hover {
|
|
292
|
+
background-color: transparent;
|
|
293
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
294
|
+
@include t.theme("color", "ink-#{$name}");
|
|
295
|
+
opacity: 1;
|
|
296
|
+
}
|
|
297
|
+
&.is-hover {
|
|
298
|
+
background-color: transparent;
|
|
299
|
+
@include t.theme("border-color", "fill-#{$name}");
|
|
300
|
+
@include t.theme("color", "ink-#{$name}");
|
|
301
|
+
opacity: 1;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&:active,
|
|
306
|
+
&.is-active {
|
|
307
|
+
@include t.theme("background-color", "fill-#{$name}-active");
|
|
308
|
+
@include t.theme("border-color", "fill-#{$name}-active");
|
|
309
|
+
@include t.theme("color", "fill-text-#{$name}");
|
|
310
|
+
opacity: 1;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&:focus-visible {
|
|
314
|
+
@include t.theme("outline-color", "fill-#{$name}");
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// The solid-fill spinner color would be invisible on a transparent face.
|
|
318
|
+
&.is-loading::after {
|
|
319
|
+
@include t.theme("border-color", "ink-#{$name}");
|
|
320
|
+
border-right-color: transparent;
|
|
321
|
+
border-top-color: transparent;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// ── Ghost ────────────────────────────────────────────────────────────────
|
|
328
|
+
|
|
329
|
+
&.is-ghost {
|
|
330
|
+
background: transparent;
|
|
331
|
+
border-color: transparent;
|
|
332
|
+
box-shadow: none;
|
|
333
|
+
@include t.theme("color", "ink-link");
|
|
334
|
+
text-decoration: none;
|
|
335
|
+
|
|
336
|
+
@include u.on-hover {
|
|
337
|
+
@include t.theme("color", "fill-link-hover");
|
|
338
|
+
}
|
|
339
|
+
&.is-hover {
|
|
340
|
+
@include t.theme("color", "fill-link-hover");
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&:active,
|
|
344
|
+
&.is-active {
|
|
345
|
+
@include t.theme("color", "fill-link-active");
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// Ghost keeps the link ink whatever semantic color is also set – so does its
|
|
349
|
+
// spinner; the solid-fill override would be invisible here.
|
|
350
|
+
&.is-loading::after {
|
|
351
|
+
@include t.theme("border-color", "ink-link");
|
|
352
|
+
border-right-color: transparent;
|
|
353
|
+
border-top-color: transparent;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// ── Sizes ────────────────────────────────────────────────────────────────
|
|
358
|
+
|
|
359
|
+
&.is-small {
|
|
360
|
+
font-size: c.$font-size-sm;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&.is-normal {
|
|
364
|
+
font-size: c.$button-font-size;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
&.is-medium {
|
|
368
|
+
font-size: c.$font-size-lg;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&.is-large {
|
|
372
|
+
font-size: c.$font-size-xl;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// ── Layout ───────────────────────────────────────────────────────────────
|
|
376
|
+
|
|
377
|
+
&.is-fullwidth {
|
|
378
|
+
display: flex;
|
|
379
|
+
width: 100%;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
&.is-pill {
|
|
383
|
+
border-radius: c.$radius-pill;
|
|
384
|
+
padding-inline: c.$button-padding-x + 0.25em;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// ── Loading ──────────────────────────────────────────────────────────────
|
|
388
|
+
|
|
389
|
+
&.is-loading {
|
|
390
|
+
color: transparent !important;
|
|
391
|
+
pointer-events: none;
|
|
392
|
+
position: relative;
|
|
393
|
+
|
|
394
|
+
&::after {
|
|
395
|
+
@include u.loader;
|
|
396
|
+
position: absolute !important;
|
|
397
|
+
left: calc(50% - 0.5em);
|
|
398
|
+
top: calc(50% - 0.5em);
|
|
399
|
+
@include t.theme("border-color", "control-text");
|
|
400
|
+
border-right-color: transparent;
|
|
401
|
+
border-top-color: transparent;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// ── Static ───────────────────────────────────────────────────────────────
|
|
406
|
+
|
|
407
|
+
&.is-static {
|
|
408
|
+
@include t.theme("background-color", "surface-1");
|
|
409
|
+
@include t.theme("border-color", "border");
|
|
410
|
+
@include t.theme("color", "text-muted");
|
|
411
|
+
box-shadow: none;
|
|
412
|
+
pointer-events: none;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use "../config" as c;
|
|
2
|
+
@use "../config/themes" as t;
|
|
3
|
+
@use "../config/layers" as l;
|
|
4
|
+
|
|
5
|
+
@include l.layer("components") {
|
|
6
|
+
.checkbox,
|
|
7
|
+
.radio {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: c.$checkbox-gap;
|
|
12
|
+
line-height: c.$line-height-base;
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
input {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
width: c.$checkbox-size;
|
|
18
|
+
height: c.$checkbox-size;
|
|
19
|
+
flex-shrink: 0;
|
|
20
|
+
|
|
21
|
+
// Native rendering is kept, but the ring follows the framework's focus token
|
|
22
|
+
// so it matches .toggle / .range / .button.
|
|
23
|
+
&:focus-visible {
|
|
24
|
+
outline: 2px solid;
|
|
25
|
+
outline-offset: 2px;
|
|
26
|
+
@include t.theme("outline-color", "focus-ring");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[disabled],
|
|
31
|
+
fieldset[disabled] &,
|
|
32
|
+
input[disabled] {
|
|
33
|
+
@include t.theme("color", "text-muted");
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
opacity: 0.7;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|