maverick-wave 4.28.0 → 5.0.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/.claude/settings.local.json +29 -1
- package/.claude/skills/mw-maverick-wave/SKILL.md +39 -24
- package/.claude/skills/mw-maverick-wave/examples/angular-services.md +16 -4
- package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +13 -4
- package/.claude/skills/mw-maverick-wave/references/components.md +42 -5
- package/.claude/skills/mw-maverick-wave/references/forms.md +14 -2
- package/.claude/skills/mw-maverick-wave/references/javascript.md +17 -4
- package/.claude/skills/mw-maverick-wave/references/layout.md +53 -19
- package/.claude/skills/mw-maverick-wave/references/theming.md +38 -1
- package/.impeccable/config.local.json +5 -0
- package/.impeccable/hook.cache.json +1 -0
- package/CHANGELOG.md +11 -0
- package/CLAUDE.md +5 -5
- package/README.md +48 -4
- package/index.html +19 -38
- package/maverick-wave.min.css +14 -12
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/scripts/verify.js +27 -2
- package/src/js/main.js +223 -83
- package/src/partials/accordions-container.html +6 -10
- package/src/partials/alerts-container.html +6 -6
- package/src/partials/announcement-container.html +5 -5
- package/src/partials/avatars-container.html +85 -17
- package/src/partials/badges-container.html +6 -6
- package/src/partials/blog-posts-container.html +11 -12
- package/src/partials/buttons-container.html +3 -3
- package/src/partials/cards-container.html +26 -9
- package/src/partials/code-container.html +5 -5
- package/src/partials/content-slider-container.html +5 -4
- package/src/partials/divider-container.html +7 -7
- package/src/partials/dropdown-container.html +2 -2
- package/src/partials/empty-state-container.html +5 -5
- package/src/partials/footer-container.html +21 -18
- package/src/partials/form-elements-container.html +14 -14
- package/src/partials/gallery-container.html +16 -8
- package/src/partials/get-started-container.html +4 -8
- package/src/partials/header-container.html +18 -7
- package/src/partials/home-container.html +10 -20
- package/src/partials/input-group-container.html +11 -2
- package/src/partials/kbd-container.html +1 -1
- package/src/partials/login-container.html +5 -1
- package/src/partials/media-container.html +2 -2
- package/src/partials/modals-container.html +22 -32
- package/src/partials/pricing-container.html +9 -9
- package/src/partials/skeleton-container.html +6 -6
- package/src/partials/stepper-container.html +2 -2
- package/src/partials/tables-container.html +12 -12
- package/src/partials/tabs-container.html +17 -27
- package/src/partials/tags-container.html +23 -17
- package/src/partials/techstack-bucket-container.html +13 -0
- package/src/partials/tiles-container.html +26 -9
- package/src/partials/typography-container.html +7 -6
- package/src/partials/utilities-container.html +35 -15
- package/src/scss/_layers.scss +10 -0
- package/src/scss/abstracts/_index.scss +6 -0
- package/src/scss/abstracts/_mixins.scss +61 -153
- package/src/scss/abstracts/_variables.scss +123 -319
- package/src/scss/base/_base.scss +170 -190
- package/src/scss/base/_reset.scss +106 -104
- package/src/scss/base/_typography.scss +153 -151
- package/src/scss/components/_accordions.scss +97 -97
- package/src/scss/components/_alerts.scss +71 -70
- package/src/scss/components/_announcement.scss +71 -70
- package/src/scss/components/_avatars.scss +130 -142
- package/src/scss/components/_badge.scss +131 -132
- package/src/scss/components/_blog-post.scss +223 -220
- package/src/scss/components/_breadcrumbs.scss +93 -92
- package/src/scss/components/_button-bar.scss +102 -110
- package/src/scss/components/_buttons.scss +319 -324
- package/src/scss/components/_calendar.scss +251 -252
- package/src/scss/components/_cards.scss +359 -386
- package/src/scss/components/_code.scss +190 -194
- package/src/scss/components/_coming-soon.scss +77 -75
- package/src/scss/components/_content-slider.scss +90 -89
- package/src/scss/components/_divider.scss +55 -53
- package/src/scss/components/_dropdown.scss +179 -185
- package/src/scss/components/_empty-state.scss +57 -57
- package/src/scss/components/_flag.scss +294 -278
- package/src/scss/components/_gallery.scss +131 -133
- package/src/scss/components/_info.scss +151 -167
- package/src/scss/components/_kanban.scss +332 -341
- package/src/scss/components/_kbd.scss +40 -38
- package/src/scss/components/_lang-switch.scss +89 -97
- package/src/scss/components/_links.scss +21 -28
- package/src/scss/components/_lists.scss +510 -514
- package/src/scss/components/_localhost-indicator.scss +26 -24
- package/src/scss/components/_media.scss +22 -20
- package/src/scss/components/_meta-info.scss +35 -33
- package/src/scss/components/_modals.scss +277 -186
- package/src/scss/components/_pagination.scss +81 -87
- package/src/scss/components/_panels.scss +99 -97
- package/src/scss/components/_pricing.scss +183 -241
- package/src/scss/components/_progress.scss +112 -89
- package/src/scss/components/_prose.scss +35 -33
- package/src/scss/components/_ratings.scss +40 -38
- package/src/scss/components/_segmented.scss +82 -84
- package/src/scss/components/_skeleton.scss +66 -72
- package/src/scss/components/_spinners.scss +155 -159
- package/src/scss/components/_stepper.scss +116 -116
- package/src/scss/components/_tables.scss +155 -148
- package/src/scss/components/_tabs.scss +232 -141
- package/src/scss/components/_tags.scss +109 -107
- package/src/scss/components/_techstack-bucket.scss +123 -122
- package/src/scss/components/_testimonial.scss +72 -70
- package/src/scss/components/_theme-toggle.scss +53 -51
- package/src/scss/components/_tiles.scss +174 -174
- package/src/scss/components/_timelines.scss +282 -280
- package/src/scss/components/_toasts.scss +66 -72
- package/src/scss/form-elements/_checkbox.scss +117 -132
- package/src/scss/form-elements/_form.scss +149 -115
- package/src/scss/form-elements/_input-group.scss +99 -103
- package/src/scss/form-elements/_input.scss +74 -74
- package/src/scss/form-elements/_login.scss +48 -48
- package/src/scss/form-elements/_prefilled.scss +53 -51
- package/src/scss/form-elements/_radio.scss +95 -107
- package/src/scss/form-elements/_select.scss +42 -42
- package/src/scss/form-elements/_slider.scss +117 -132
- package/src/scss/form-elements/_textarea.scss +68 -54
- package/src/scss/form-elements/_toggle.scss +127 -140
- package/src/scss/layout/_footer.scss +172 -171
- package/src/scss/layout/_grid.scss +268 -302
- package/src/scss/layout/_header.scss +426 -427
- package/src/scss/layout/_home.scss +28 -27
- package/src/scss/layout/_main.scss +275 -238
- package/src/scss/layout/_page-header.scss +38 -36
- package/src/scss/layout/_section.scss +150 -124
- package/src/scss/main.scss +1 -1
- package/src/scss/utilities/_accessibility.scss +46 -45
- package/src/scss/utilities/_aspect.scss +22 -20
- package/src/scss/utilities/_corner.scss +23 -5
- package/src/scss/utilities/_display.scss +76 -70
- package/src/scss/utilities/_elevation.scss +13 -11
- package/src/scss/utilities/_flex.scss +83 -85
- package/src/scss/utilities/_reveal.scss +40 -63
- package/src/scss/utilities/_spacing.scss +63 -64
- package/src/scss/utilities/_text.scss +139 -141
- package/src/scss/utilities/_touch-targets.scss +130 -147
|
@@ -1,114 +1,137 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
warning: var(--mw-warning-color),
|
|
9
|
-
danger: var(--mw-danger-color),
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
.mw-progress {
|
|
13
|
-
&-container {
|
|
14
|
-
margin: spacing('1');
|
|
15
|
-
}
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
.mw-progress {
|
|
5
|
+
&-container {
|
|
6
|
+
margin: spacing('1');
|
|
7
|
+
}
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
&-barinfo {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
margin: spacing('3') spacing('2') spacing('1');
|
|
13
|
+
font-size: font-size('sm');
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
&.mw-progress-hide-info {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
26
18
|
}
|
|
27
|
-
}
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
&-label {
|
|
21
|
+
font-weight: font-weight('medium');
|
|
22
|
+
}
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
&-value {
|
|
25
|
+
color: var(--mw-text-muted-color);
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
align-content: end;
|
|
37
28
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
@include media-down('sm') {
|
|
30
|
+
font-size: font-size('xs');
|
|
31
|
+
}
|
|
41
32
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
&.mw-progress-numeric {
|
|
34
|
+
&::after {
|
|
35
|
+
content: '/10';
|
|
36
|
+
}
|
|
46
37
|
}
|
|
47
|
-
}
|
|
48
38
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
&.mw-progress-percent {
|
|
40
|
+
&::after {
|
|
41
|
+
content: '%';
|
|
42
|
+
}
|
|
53
43
|
}
|
|
54
44
|
}
|
|
55
|
-
}
|
|
56
45
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
46
|
+
&-bar {
|
|
47
|
+
width: 100%;
|
|
48
|
+
height: 10px;
|
|
49
|
+
background: var(--mw-gray-background);
|
|
50
|
+
opacity: 0.9;
|
|
51
|
+
border-radius: radius('sm');
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
66
55
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
56
|
+
&-fill {
|
|
57
|
+
// The label sits *inside* the fill, so its ink follows whichever color
|
|
58
|
+
// variant is on the element - preset to the default fill, re-pointed by
|
|
59
|
+
// the variants at the bottom of the file
|
|
60
|
+
--mw-progress-ink: var(--mw-secondary-accent-text-color);
|
|
61
|
+
|
|
62
|
+
// How far the bar is filled. Written by the script from data-value or from
|
|
63
|
+
// an inline width, and read by the keyframe below. Declared here so it has
|
|
64
|
+
// a definition rather than only a fallback - an unset bar is an empty one.
|
|
65
|
+
--mw-progress-value: 0;
|
|
66
|
+
|
|
67
|
+
height: 100%;
|
|
68
|
+
background: var(--mw-secondary-color);
|
|
69
|
+
border-radius: radius('sm');
|
|
70
|
+
width: 0;
|
|
71
|
+
transition: width var(--mw-duration-slower) var(--mw-ease-in-out);
|
|
72
|
+
|
|
73
|
+
// The bar fills as it is scrolled into view, tied to the scroll position
|
|
74
|
+
// rather than to a one-shot transition: scroll back up and it empties
|
|
75
|
+
// again.
|
|
76
|
+
//
|
|
77
|
+
// Gated on a class the script adds, and only once it knows the target
|
|
78
|
+
// width - an animation outranks an inline style, so a bar written as
|
|
79
|
+
// `style="width: 70%"` would be animated to nothing by a keyframe that
|
|
80
|
+
// reads an unset --mw-progress-value. With the gate, a page whose script
|
|
81
|
+
// never runs keeps whatever width its markup set.
|
|
82
|
+
&.mw-progress-driven {
|
|
83
|
+
@supports (animation-timeline: view()) {
|
|
84
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
85
|
+
animation: mw-progress-fill linear both;
|
|
86
|
+
animation-timeline: view();
|
|
87
|
+
// Starts once the bar is properly on screen and finishes well
|
|
88
|
+
// before it reaches the middle, so it is full when it is read.
|
|
89
|
+
animation-range: entry 60% cover 40%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
79
94
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
95
|
+
&-sm .mw-progress-bar {
|
|
96
|
+
height: 6px;
|
|
97
|
+
border-radius: radius('sm');
|
|
98
|
+
}
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
100
|
+
&-lg .mw-progress-bar {
|
|
101
|
+
height: 15px;
|
|
102
|
+
border-radius: radius('lg');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-inline-label {
|
|
106
|
+
.mw-progress-bar {
|
|
107
|
+
height: 22px;
|
|
108
|
+
user-select: none;
|
|
109
|
+
}
|
|
90
110
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
.mw-progress-fill {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
padding-left: spacing('6');
|
|
115
|
+
font-size: font-size('xs');
|
|
116
|
+
font-weight: font-weight('medium');
|
|
117
|
+
color: var(--mw-progress-ink);
|
|
118
|
+
}
|
|
96
119
|
}
|
|
120
|
+
}
|
|
97
121
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
font-size: font-size('xs');
|
|
103
|
-
font-weight: font-weight('medium');
|
|
104
|
-
color: var(--mw-progress-ink);
|
|
122
|
+
@each $name, $col in $semantic-colors {
|
|
123
|
+
.mw-progress-#{$name} {
|
|
124
|
+
background: #{$col};
|
|
125
|
+
--mw-progress-ink: var(--mw-#{$name}-accent-text-color);
|
|
105
126
|
}
|
|
106
127
|
}
|
|
107
|
-
}
|
|
108
128
|
|
|
109
|
-
@
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
129
|
+
@keyframes mw-progress-fill {
|
|
130
|
+
from {
|
|
131
|
+
width: 0;
|
|
132
|
+
}
|
|
133
|
+
to {
|
|
134
|
+
width: var(--mw-progress-value);
|
|
135
|
+
}
|
|
113
136
|
}
|
|
114
137
|
}
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
// Long-form running text - a legal page, terms, a plain article. One class on
|
|
5
|
+
// the container instead of a utility chain on every heading: the markup inside
|
|
6
|
+
// stays bare h2/h3/p/ul, which is exactly what a CMS or a JSON-driven page
|
|
7
|
+
// produces anyway.
|
|
8
|
+
//
|
|
9
|
+
// Headings are deliberately small: in a document they structure the reading,
|
|
10
|
+
// they do not compete with the page title.
|
|
11
|
+
.mw-prose {
|
|
12
|
+
h2 {
|
|
13
|
+
font-size: font-size('lg');
|
|
14
|
+
color: var(--mw-primary-text-color);
|
|
15
|
+
margin: spacing('8') 0 spacing('3');
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
h3 {
|
|
19
|
+
font-size: font-size('md');
|
|
20
|
+
color: var(--mw-primary-text-color);
|
|
21
|
+
margin: spacing('6') 0 spacing('2');
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
ul,
|
|
25
|
+
ol {
|
|
26
|
+
margin: 0 0 spacing('3') spacing('7');
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
li {
|
|
30
|
+
margin-bottom: spacing('1');
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
// The first heading in a card already sits on the card's padding, the last
|
|
34
|
+
// paragraph on its bottom edge - without these the container carries double
|
|
35
|
+
// spacing at both ends.
|
|
36
|
+
> :first-child {
|
|
37
|
+
margin-top: 0;
|
|
38
|
+
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
> :last-child {
|
|
41
|
+
margin-bottom: 0;
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -1,49 +1,51 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
.mw-rating {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
gap: spacing('3');
|
|
9
|
+
font-size: font-size('2xl');
|
|
10
|
+
padding: spacing('2') spacing('4');
|
|
11
|
+
|
|
12
|
+
border: 1px solid var(--mw-border);
|
|
13
|
+
border-radius: radius('md');
|
|
14
|
+
|
|
15
|
+
&-container {
|
|
16
|
+
margin: spacing('1');
|
|
17
|
+
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
&-info {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
margin: spacing('1');
|
|
23
|
+
font-size: font-size('md');
|
|
24
|
+
}
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
&-sm {
|
|
27
|
+
font-size: font-size('lg');
|
|
28
|
+
padding: spacing('2') spacing('3');
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
&-lg {
|
|
32
|
+
font-size: font-size('4xl');
|
|
33
|
+
padding: spacing('3') spacing('5');
|
|
34
|
+
}
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
&-icon {
|
|
37
|
+
color: var(--mw-gray-color);
|
|
38
|
+
transition: var(--mw-transition);
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
|
-
}
|
|
41
42
|
|
|
42
|
-
// fill first N icons based on data-rating
|
|
43
|
-
@for $i from 1 through 5 {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
// fill first N icons based on data-rating
|
|
44
|
+
@for $i from 1 through 5 {
|
|
45
|
+
.mw-rating[data-rating='#{$i}'] {
|
|
46
|
+
& .mw-rating-icon:nth-child(-n + #{$i}) {
|
|
47
|
+
color: var(--mw-primary-text-color);
|
|
48
|
+
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -1,102 +1,100 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
// Two or three positions of *one* switch - income/expense on a booking form,
|
|
5
|
+
// offer/quote on a document form.
|
|
6
|
+
//
|
|
7
|
+
// Deliberately not a `.mw-button-bar`: that one stacks below 576px and gives
|
|
8
|
+
// every button 96% width, which is right for a row of independent actions and
|
|
9
|
+
// wrong here. Stacked, two positions of a switch look like two buttons you
|
|
10
|
+
// could press both of. This one stays horizontal at every width.
|
|
11
|
+
.mw-segmented {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
width: 100%;
|
|
14
|
+
gap: spacing('1');
|
|
15
|
+
padding: spacing('1');
|
|
16
|
+
background: var(--mw-surface-muted);
|
|
17
|
+
border: 1px solid var(--mw-border);
|
|
18
|
+
border-radius: radius('sm');
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
// Equal shares, so the switch reads as one control and not as a row of labels
|
|
21
|
-
.mw-segmented-item {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
transition: var(--mw-transition);
|
|
21
|
+
// Equal shares, so the switch reads as one control and not as a row of labels
|
|
22
|
+
.mw-segmented-item {
|
|
23
|
+
flex: 1 1 0;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
gap: spacing('2');
|
|
29
|
+
padding: spacing('2') spacing('3');
|
|
30
|
+
border: 1px solid transparent;
|
|
31
|
+
border-radius: radius('xs');
|
|
32
|
+
background: transparent;
|
|
33
|
+
color: var(--mw-text-muted-color);
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
font-size: font-size('sm');
|
|
36
|
+
font-weight: font-weight('medium');
|
|
37
|
+
line-height: 1.2;
|
|
38
|
+
text-align: center;
|
|
39
|
+
@include truncate;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
transition: var(--mw-transition);
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
&:hover:not(:disabled):not(.mw-active):not(.active) {
|
|
44
|
+
color: var(--mw-text-color);
|
|
45
|
+
}
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
@include tappable;
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
&:active {
|
|
50
|
+
transform: scale(0.97);
|
|
51
|
+
transition-duration: var(--mw-duration-instant);
|
|
52
|
+
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
// Inset, because an outline outside the item would be clipped by the frame
|
|
55
|
+
@include focus-ring-inset;
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
&:disabled {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
opacity: 0.6;
|
|
60
|
+
}
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
color: var(--mw-primary-accent-text-color);
|
|
62
|
+
@include active() {
|
|
63
|
+
background: var(--mw-primary-color);
|
|
64
|
+
border-color: var(--mw-primary-text-color);
|
|
65
|
+
color: var(--mw-primary-accent-text-color);
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
// A tag inside an item - the saving on a billing cycle, a count on a
|
|
68
|
+
// filter. Its colour variants mix their background from the *page*, so on
|
|
69
|
+
// the active item's fill they come out muddy: an orange pill on blue turns
|
|
70
|
+
// purple. On that one the tag borrows the item's own ink; on the others it
|
|
71
|
+
// keeps its colour, which is what makes a visitor click it in the first
|
|
72
|
+
// place.
|
|
73
|
+
.mw-tag {
|
|
74
|
+
background: transparent;
|
|
75
|
+
border-color: currentColor;
|
|
76
|
+
color: inherit;
|
|
77
|
+
}
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
|
-
}
|
|
82
80
|
|
|
83
|
-
// Secondary tone for a switch that is not the primary decision on the form
|
|
84
|
-
.mw-segmented-secondary .mw-segmented-item {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
// Secondary tone for a switch that is not the primary decision on the form
|
|
82
|
+
.mw-segmented-secondary .mw-segmented-item {
|
|
83
|
+
@include active() {
|
|
84
|
+
background: var(--mw-secondary-color);
|
|
85
|
+
border-color: var(--mw-secondary-text-color);
|
|
86
|
+
color: var(--mw-secondary-accent-text-color);
|
|
87
|
+
}
|
|
90
88
|
}
|
|
91
|
-
}
|
|
92
89
|
|
|
93
|
-
// Sits inline next to a label instead of filling the row. Equal shares are the
|
|
94
|
-
// point of the full-width control; here they would clip the longest label to
|
|
95
|
-
// the width of the shortest, so the items follow their own content instead.
|
|
96
|
-
.mw-segmented-auto {
|
|
97
|
-
|
|
90
|
+
// Sits inline next to a label instead of filling the row. Equal shares are the
|
|
91
|
+
// point of the full-width control; here they would clip the longest label to
|
|
92
|
+
// the width of the shortest, so the items follow their own content instead.
|
|
93
|
+
.mw-segmented-auto {
|
|
94
|
+
width: auto;
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
.mw-segmented-item {
|
|
97
|
+
flex: 0 1 auto;
|
|
98
|
+
}
|
|
101
99
|
}
|
|
102
100
|
}
|