maverick-wave 3.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/commands/mw.md +580 -0
- package/.claude/settings.local.json +11 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/maverick-wave.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierignore +6 -0
- package/.prettierrc.json +7 -0
- package/CHANGELOG.md +420 -0
- package/CLAUDE.md +53 -0
- package/LICENSE +21 -0
- package/README.md +191 -0
- package/gulpfile.js +158 -0
- package/index.html +472 -0
- package/maverick-wave.min.css +1 -0
- package/maverick-wave.min.js +1 -0
- package/package.json +52 -0
- package/release.sh +17 -0
- package/src/assets/favicon/android-chrome-192x192.png +0 -0
- package/src/assets/favicon/android-chrome-512x512.png +0 -0
- package/src/assets/favicon/apple-touch-icon.png +0 -0
- package/src/assets/favicon/favicon-16x16.png +0 -0
- package/src/assets/favicon/favicon-32x32.png +0 -0
- package/src/assets/favicon/site.webmanifest +1 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/header-logo.svg +24 -0
- package/src/js/main.js +587 -0
- package/src/partials/accordions-container.html +163 -0
- package/src/partials/alerts-container.html +120 -0
- package/src/partials/avatars-container.html +84 -0
- package/src/partials/blog-posts-container.html +157 -0
- package/src/partials/breadcrumbs-container.html +126 -0
- package/src/partials/button-bar-container.html +168 -0
- package/src/partials/buttons-container.html +133 -0
- package/src/partials/cards-container.html +508 -0
- package/src/partials/code-container.html +194 -0
- package/src/partials/colors-container.html +125 -0
- package/src/partials/coming-soon-container.html +6 -0
- package/src/partials/content-slider-container.html +47 -0
- package/src/partials/divider-container.html +52 -0
- package/src/partials/documentation-container.html +161 -0
- package/src/partials/empty-state-container.html +74 -0
- package/src/partials/footer-container.html +113 -0
- package/src/partials/form-container.html +257 -0
- package/src/partials/form-elements-container.html +595 -0
- package/src/partials/form-field-container.html +141 -0
- package/src/partials/gallery-container.html +49 -0
- package/src/partials/get-started-container.html +294 -0
- package/src/partials/grid-container.html +171 -0
- package/src/partials/header-container.html +49 -0
- package/src/partials/header-utilities-container.html +80 -0
- package/src/partials/home-container.html +48 -0
- package/src/partials/html-lists-container.html +58 -0
- package/src/partials/info-container.html +87 -0
- package/src/partials/input-group-container.html +285 -0
- package/src/partials/item-lists-container.html +413 -0
- package/src/partials/login-container.html +61 -0
- package/src/partials/meta-info-container.html +16 -0
- package/src/partials/modals-container.html +136 -0
- package/src/partials/pagination-container.html +27 -0
- package/src/partials/panels-container.html +196 -0
- package/src/partials/progress-container.html +226 -0
- package/src/partials/ratings-container.html +104 -0
- package/src/partials/skeleton-container.html +82 -0
- package/src/partials/spinners-container.html +92 -0
- package/src/partials/stepper-container.html +107 -0
- package/src/partials/tables-container.html +120 -0
- package/src/partials/tabs-container.html +263 -0
- package/src/partials/tags-container.html +168 -0
- package/src/partials/techstack-bucket-container.html +174 -0
- package/src/partials/tiles-container.html +245 -0
- package/src/partials/timelines-container.html +196 -0
- package/src/partials/typography-container.html +66 -0
- package/src/partials/utilities-container.html +85 -0
- package/src/scss/abstracts/_functions.scss +37 -0
- package/src/scss/abstracts/_index.scss +3 -0
- package/src/scss/abstracts/_mixins.scss +45 -0
- package/src/scss/abstracts/_variables.scss +222 -0
- package/src/scss/base/_base.scss +165 -0
- package/src/scss/base/_index.scss +3 -0
- package/src/scss/base/_reset.scss +75 -0
- package/src/scss/base/_typography.scss +230 -0
- package/src/scss/components/_accordions.scss +91 -0
- package/src/scss/components/_alerts.scss +105 -0
- package/src/scss/components/_avatars.scss +123 -0
- package/src/scss/components/_blog-post.scss +268 -0
- package/src/scss/components/_breadcrumbs.scss +108 -0
- package/src/scss/components/_button-bar.scss +139 -0
- package/src/scss/components/_buttons.scss +164 -0
- package/src/scss/components/_cards.scss +316 -0
- package/src/scss/components/_code.scss +252 -0
- package/src/scss/components/_coming-soon.scss +92 -0
- package/src/scss/components/_content-slider.scss +119 -0
- package/src/scss/components/_divider.scss +70 -0
- package/src/scss/components/_empty-state.scss +73 -0
- package/src/scss/components/_gallery.scss +158 -0
- package/src/scss/components/_index.scss +33 -0
- package/src/scss/components/_info.scss +143 -0
- package/src/scss/components/_lists.scss +653 -0
- package/src/scss/components/_localhost-indicator.scss +29 -0
- package/src/scss/components/_meta-info.scss +34 -0
- package/src/scss/components/_modals.scss +118 -0
- package/src/scss/components/_pagination.scss +99 -0
- package/src/scss/components/_panels.scss +112 -0
- package/src/scss/components/_progress.scss +107 -0
- package/src/scss/components/_ratings.scss +47 -0
- package/src/scss/components/_skeleton.scss +90 -0
- package/src/scss/components/_spinners.scss +208 -0
- package/src/scss/components/_stepper.scss +145 -0
- package/src/scss/components/_tables.scss +127 -0
- package/src/scss/components/_tabs.scss +146 -0
- package/src/scss/components/_tags.scss +93 -0
- package/src/scss/components/_techstack-bucket.scss +145 -0
- package/src/scss/components/_theme-toggle.scss +50 -0
- package/src/scss/components/_tiles.scss +217 -0
- package/src/scss/components/_timelines.scss +339 -0
- package/src/scss/form-elements/_checkbox.scss +174 -0
- package/src/scss/form-elements/_form.scss +122 -0
- package/src/scss/form-elements/_index.scss +10 -0
- package/src/scss/form-elements/_input-group.scss +103 -0
- package/src/scss/form-elements/_input.scss +72 -0
- package/src/scss/form-elements/_login.scss +62 -0
- package/src/scss/form-elements/_radio.scss +144 -0
- package/src/scss/form-elements/_select.scss +56 -0
- package/src/scss/form-elements/_slider.scss +174 -0
- package/src/scss/form-elements/_textarea.scss +74 -0
- package/src/scss/form-elements/_toggle.scss +174 -0
- package/src/scss/layout/_footer.scss +214 -0
- package/src/scss/layout/_grid.scss +287 -0
- package/src/scss/layout/_header.scss +441 -0
- package/src/scss/layout/_home.scss +40 -0
- package/src/scss/layout/_index.scss +6 -0
- package/src/scss/layout/_main.scss +116 -0
- package/src/scss/layout/_section.scss +89 -0
- package/src/scss/main.scss +5 -0
- package/src/scss/utilities/_display.scss +35 -0
- package/src/scss/utilities/_flex.scss +66 -0
- package/src/scss/utilities/_index.scss +3 -0
- package/src/scss/utilities/_spacing.scss +78 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
@use '../abstracts' as *;
|
|
2
|
+
|
|
3
|
+
$_border-width-big: 4px;
|
|
4
|
+
$_border-width-simple: 3px;
|
|
5
|
+
|
|
6
|
+
// shared keyframes
|
|
7
|
+
@keyframes mw-slide-in-left {
|
|
8
|
+
from {
|
|
9
|
+
opacity: 0;
|
|
10
|
+
transform: translateX(-100px);
|
|
11
|
+
}
|
|
12
|
+
to {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
transform: translateX(0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes mw-slide-in-right {
|
|
19
|
+
from {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transform: translateX(100px);
|
|
22
|
+
}
|
|
23
|
+
to {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
transform: translateX(0);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes mw-pulse-ring-big {
|
|
30
|
+
0% {
|
|
31
|
+
box-shadow: 0 0 0 0 var(--mw-primary-color);
|
|
32
|
+
}
|
|
33
|
+
70% {
|
|
34
|
+
box-shadow: 0 0 0 13px transparent;
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
box-shadow: 0 0 0 0 transparent;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@keyframes mw-pulse-ring-simple {
|
|
42
|
+
0% {
|
|
43
|
+
box-shadow: 0 0 0 0 var(--mw-primary-color);
|
|
44
|
+
}
|
|
45
|
+
70% {
|
|
46
|
+
box-shadow: 0 0 0 5px transparent;
|
|
47
|
+
}
|
|
48
|
+
100% {
|
|
49
|
+
box-shadow: 0 0 0 0 transparent;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mw-timeline-big {
|
|
54
|
+
position: relative;
|
|
55
|
+
margin: spacing('1') auto;
|
|
56
|
+
padding: spacing('5') 0;
|
|
57
|
+
width: min(96%, 900px);
|
|
58
|
+
|
|
59
|
+
&::before {
|
|
60
|
+
content: '';
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: 50%;
|
|
63
|
+
top: 0;
|
|
64
|
+
width: $_border-width-big;
|
|
65
|
+
height: 100%;
|
|
66
|
+
background: var(--mw-primary-color);
|
|
67
|
+
transform: translateX(-50%);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-step {
|
|
71
|
+
position: relative;
|
|
72
|
+
margin: spacing('7') 0;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
|
|
76
|
+
&.active {
|
|
77
|
+
.mw-timeline-big-date-container {
|
|
78
|
+
background: var(--mw-primary-color);
|
|
79
|
+
border-color: var(--mw-primary-color);
|
|
80
|
+
z-index: z-index('lift');
|
|
81
|
+
transform: translateX(-50%) scale(1.1);
|
|
82
|
+
animation: mw-pulse-ring-big 2s infinite;
|
|
83
|
+
|
|
84
|
+
.mw-timeline-big-date-main {
|
|
85
|
+
color: var(--mw-primary-text-color);
|
|
86
|
+
}
|
|
87
|
+
.mw-timeline-big-date-sub {
|
|
88
|
+
color: var(--mw-primary-text-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@include media-down('sm') {
|
|
92
|
+
transform: scale(1.05);
|
|
93
|
+
left: 2px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&-date-container {
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0;
|
|
102
|
+
left: 50%;
|
|
103
|
+
transform: translateX(-50%);
|
|
104
|
+
border: $_border-width-big solid var(--mw-primary-color);
|
|
105
|
+
background: var(--mw-card-background);
|
|
106
|
+
border-radius: radius('md');
|
|
107
|
+
padding: spacing('3') spacing('4');
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
gap: spacing('2');
|
|
112
|
+
cursor: default;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&-date-main {
|
|
116
|
+
font-size: font-size('sm');
|
|
117
|
+
color: var(--mw-text-color);
|
|
118
|
+
line-height: 1.2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&-date-sub {
|
|
122
|
+
margin-left: spacing('2');
|
|
123
|
+
font-size: font-size('xs');
|
|
124
|
+
color: var(--mw-text-muted-color);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&-content {
|
|
128
|
+
width: 48%;
|
|
129
|
+
padding: spacing('9') spacing('2') spacing('1') spacing('2');
|
|
130
|
+
opacity: 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&-event {
|
|
136
|
+
display: inline-block;
|
|
137
|
+
width: 87%;
|
|
138
|
+
margin-top: spacing('4');
|
|
139
|
+
padding: spacing('2') spacing('3');
|
|
140
|
+
background: var(--mw-card-background);
|
|
141
|
+
box-shadow: 0 2px 7px var(--mw-shadow);
|
|
142
|
+
border-radius: radius('sm');
|
|
143
|
+
position: relative;
|
|
144
|
+
clear: both;
|
|
145
|
+
cursor: default;
|
|
146
|
+
|
|
147
|
+
&-date {
|
|
148
|
+
display: block;
|
|
149
|
+
font-size: font-size('sm');
|
|
150
|
+
font-weight: font-weight('bold');
|
|
151
|
+
color: var(--mw-text-color);
|
|
152
|
+
margin-bottom: spacing('1');
|
|
153
|
+
text-transform: uppercase;
|
|
154
|
+
letter-spacing: 0.5px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&-title {
|
|
158
|
+
font-size: font-size('base');
|
|
159
|
+
font-weight: font-weight('normal');
|
|
160
|
+
line-height: 1.2;
|
|
161
|
+
color: var(--mw-text-color);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// alternate + animation…
|
|
166
|
+
@for $i from 1 through 10 {
|
|
167
|
+
&-step:nth-child(#{$i}) &-content {
|
|
168
|
+
animation-duration: 0.9s;
|
|
169
|
+
animation-fill-mode: forwards;
|
|
170
|
+
animation-delay: $i * 0.3s;
|
|
171
|
+
|
|
172
|
+
@if $i % 2 != 0 {
|
|
173
|
+
animation-name: mw-slide-in-left;
|
|
174
|
+
margin-right: auto;
|
|
175
|
+
margin-left: spacing('0');
|
|
176
|
+
text-align: right;
|
|
177
|
+
align-items: flex-end;
|
|
178
|
+
|
|
179
|
+
.mw-timeline-big-event {
|
|
180
|
+
border-right: 2px solid var(--mw-secondary-color);
|
|
181
|
+
text-align: right;
|
|
182
|
+
border-top-right-radius: radius('none');
|
|
183
|
+
border-bottom-right-radius: radius('none');
|
|
184
|
+
}
|
|
185
|
+
} @else {
|
|
186
|
+
animation-name: mw-slide-in-right;
|
|
187
|
+
margin-left: auto;
|
|
188
|
+
margin-right: spacing('0');
|
|
189
|
+
text-align: left;
|
|
190
|
+
align-items: flex-start;
|
|
191
|
+
|
|
192
|
+
.mw-timeline-big-event {
|
|
193
|
+
border-left: 2px solid var(--mw-secondary-color);
|
|
194
|
+
text-align: left;
|
|
195
|
+
border-top-left-radius: radius('none');
|
|
196
|
+
border-bottom-left-radius: radius('none');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@include media-down('sm') {
|
|
203
|
+
&::before {
|
|
204
|
+
left: 14px;
|
|
205
|
+
transform: none;
|
|
206
|
+
}
|
|
207
|
+
&-step {
|
|
208
|
+
display: block;
|
|
209
|
+
margin: spacing('6') spacing('0');
|
|
210
|
+
}
|
|
211
|
+
&-date-container {
|
|
212
|
+
position: relative;
|
|
213
|
+
left: 2px;
|
|
214
|
+
transform: none;
|
|
215
|
+
width: 310px;
|
|
216
|
+
justify-content: flex-start;
|
|
217
|
+
}
|
|
218
|
+
&-date-sub {
|
|
219
|
+
margin-left: spacing('1');
|
|
220
|
+
}
|
|
221
|
+
&-content {
|
|
222
|
+
width: auto;
|
|
223
|
+
padding: spacing('2');
|
|
224
|
+
margin-top: spacing('1');
|
|
225
|
+
margin-left: spacing('6') !important;
|
|
226
|
+
text-align: left !important;
|
|
227
|
+
align-items: flex-start !important;
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
230
|
+
&-event {
|
|
231
|
+
width: 92%;
|
|
232
|
+
border-right: none !important;
|
|
233
|
+
border-left: 2px solid var(--mw-secondary-color) !important;
|
|
234
|
+
border-radius: radius('sm') !important;
|
|
235
|
+
text-align: left !important;
|
|
236
|
+
&-date {
|
|
237
|
+
font-size: font-size('xs');
|
|
238
|
+
}
|
|
239
|
+
&-title {
|
|
240
|
+
font-size: font-size('sm');
|
|
241
|
+
line-height: 1.1;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mw-timeline-simple {
|
|
248
|
+
position: relative;
|
|
249
|
+
margin: spacing('1') auto;
|
|
250
|
+
padding: spacing('3') 0;
|
|
251
|
+
width: min(96%, 930px);
|
|
252
|
+
|
|
253
|
+
&::before {
|
|
254
|
+
content: '';
|
|
255
|
+
position: absolute;
|
|
256
|
+
left: 100px;
|
|
257
|
+
top: 0;
|
|
258
|
+
width: $_border-width-simple;
|
|
259
|
+
height: 100%;
|
|
260
|
+
background: var(--mw-primary-color);
|
|
261
|
+
transform: translateX(-50%);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&-step {
|
|
265
|
+
position: relative;
|
|
266
|
+
margin: spacing('5') spacing('0');
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: flex-start;
|
|
269
|
+
|
|
270
|
+
&.active {
|
|
271
|
+
.mw-timeline-simple-date {
|
|
272
|
+
background: var(--mw-primary-color);
|
|
273
|
+
color: var(--mw-primary-text-color);
|
|
274
|
+
z-index: z-index('lift');
|
|
275
|
+
transform: scale(1.1);
|
|
276
|
+
animation: mw-pulse-ring-simple 2s infinite;
|
|
277
|
+
|
|
278
|
+
@include media-down('sm') {
|
|
279
|
+
transform: scale(1.05);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&-date {
|
|
286
|
+
position: absolute;
|
|
287
|
+
width: 120px;
|
|
288
|
+
top: 0;
|
|
289
|
+
left: -10px;
|
|
290
|
+
text-align: center;
|
|
291
|
+
font-size: font-size('sm');
|
|
292
|
+
padding: spacing('2');
|
|
293
|
+
border-radius: radius('md');
|
|
294
|
+
border: $_border-width-simple solid var(--mw-primary-color);
|
|
295
|
+
background: var(--mw-card-background);
|
|
296
|
+
line-height: 1.1;
|
|
297
|
+
z-index: z-index('card');
|
|
298
|
+
cursor: default;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&-content {
|
|
302
|
+
display: flex;
|
|
303
|
+
flex-direction: column;
|
|
304
|
+
gap: spacing('3');
|
|
305
|
+
padding: spacing('0');
|
|
306
|
+
margin-left: 120px;
|
|
307
|
+
text-align: left;
|
|
308
|
+
opacity: 0;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// all steps slide in from right only
|
|
312
|
+
@for $i from 1 through 10 {
|
|
313
|
+
&-step:nth-child(#{$i}) &-content {
|
|
314
|
+
animation: mw-slide-in-right 0.6s forwards;
|
|
315
|
+
animation-delay: $i * 0.2s;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@include media-down('sm') {
|
|
320
|
+
&::before {
|
|
321
|
+
left: spacing('0');
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&-date {
|
|
325
|
+
position: absolute;
|
|
326
|
+
min-width: 120px;
|
|
327
|
+
width: auto;
|
|
328
|
+
max-width: 260px;
|
|
329
|
+
font-size: font-size('xs');
|
|
330
|
+
line-height: 1;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&-content {
|
|
334
|
+
margin-top: spacing('7');
|
|
335
|
+
margin-left: spacing('3');
|
|
336
|
+
width: auto;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// _checkbox.scss
|
|
2
|
+
@use '../abstracts' as *;
|
|
3
|
+
|
|
4
|
+
$_size-sm: spacing('3');
|
|
5
|
+
$_size-default: spacing('4');
|
|
6
|
+
$_size-lg: spacing('5');
|
|
7
|
+
$_size-xl: spacing('6');
|
|
8
|
+
|
|
9
|
+
// Checkmark dimensions (not from spacing map — these are shape-drawing values)
|
|
10
|
+
$_check-sm-w: 7px;
|
|
11
|
+
$_check-sm-h: 4px;
|
|
12
|
+
$_check-lg-w: 13px;
|
|
13
|
+
$_check-lg-h: 7px;
|
|
14
|
+
$_check-xl-w: 15px;
|
|
15
|
+
$_check-xl-h: 8px;
|
|
16
|
+
|
|
17
|
+
// 1) color map for checked state border & checkmark
|
|
18
|
+
$_mw-checkbox-colors: (
|
|
19
|
+
primary: var(--mw-primary-color),
|
|
20
|
+
secondary: var(--mw-secondary-color),
|
|
21
|
+
info: var(--mw-info-color),
|
|
22
|
+
success: var(--mw-success-color),
|
|
23
|
+
warning: var(--mw-warning-color),
|
|
24
|
+
danger: var(--mw-danger-color),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
.mw-checkbox-group {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: spacing('3');
|
|
31
|
+
|
|
32
|
+
&-inline {
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: spacing('2') spacing('6');
|
|
37
|
+
@include media-down('sm') {
|
|
38
|
+
gap: spacing('2') spacing('4');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mw-checkbox {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: spacing('2');
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
user-select: none;
|
|
49
|
+
position: relative;
|
|
50
|
+
|
|
51
|
+
// hide native checkbox
|
|
52
|
+
input[type='checkbox'] {
|
|
53
|
+
position: absolute;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
width: 0;
|
|
56
|
+
height: 0;
|
|
57
|
+
margin: spacing('0');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mw-checkbox-box {
|
|
61
|
+
position: relative;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
width: $_size-default;
|
|
64
|
+
height: $_size-default;
|
|
65
|
+
border: 2px solid var(--mw-border);
|
|
66
|
+
border-radius: radius('sm');
|
|
67
|
+
background: var(--mw-form-elements-background);
|
|
68
|
+
transition: var(--mw-transition);
|
|
69
|
+
|
|
70
|
+
&::after {
|
|
71
|
+
content: '';
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 50%;
|
|
74
|
+
left: 50%;
|
|
75
|
+
width: spacing('2');
|
|
76
|
+
height: spacing('1');
|
|
77
|
+
border-left: 2px solid var(--mw-primary-color);
|
|
78
|
+
border-bottom: 2px solid var(--mw-primary-color);
|
|
79
|
+
transform: translate(-50%, -60%) rotate(-45deg) scale(0);
|
|
80
|
+
transform-origin: center;
|
|
81
|
+
transition: var(--mw-transition);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// focus-visible state
|
|
86
|
+
input[type='checkbox']:focus-visible + .mw-checkbox-box {
|
|
87
|
+
box-shadow: 0 0 0 2px var(--mw-primary-background);
|
|
88
|
+
border-color: var(--mw-primary-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// checked state
|
|
92
|
+
input[type='checkbox']:checked + .mw-checkbox-box {
|
|
93
|
+
border-color: var(--mw-primary-color);
|
|
94
|
+
}
|
|
95
|
+
input[type='checkbox']:checked + .mw-checkbox-box::after {
|
|
96
|
+
transform: translate(-50%, -60%) rotate(-45deg) scale(1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.mw-checkbox-label {
|
|
100
|
+
font-size: font-size('sm');
|
|
101
|
+
color: var(--mw-text-color);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// size variants
|
|
105
|
+
&-sm {
|
|
106
|
+
.mw-checkbox-box {
|
|
107
|
+
width: $_size-sm;
|
|
108
|
+
height: $_size-sm;
|
|
109
|
+
}
|
|
110
|
+
.mw-checkbox-box::after {
|
|
111
|
+
width: $_check-sm-w;
|
|
112
|
+
height: $_check-sm-h;
|
|
113
|
+
border-width: 1.5px;
|
|
114
|
+
}
|
|
115
|
+
.mw-checkbox-label {
|
|
116
|
+
font-size: font-size('xs');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
&-lg {
|
|
120
|
+
.mw-checkbox-box {
|
|
121
|
+
width: $_size-lg;
|
|
122
|
+
height: $_size-lg;
|
|
123
|
+
}
|
|
124
|
+
.mw-checkbox-box::after {
|
|
125
|
+
width: $_check-lg-w;
|
|
126
|
+
height: $_check-lg-h;
|
|
127
|
+
border-width: 2px;
|
|
128
|
+
}
|
|
129
|
+
.mw-checkbox-label {
|
|
130
|
+
font-size: font-size('base');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
&-xl {
|
|
134
|
+
.mw-checkbox-box {
|
|
135
|
+
width: $_size-xl;
|
|
136
|
+
height: $_size-xl;
|
|
137
|
+
}
|
|
138
|
+
.mw-checkbox-box::after {
|
|
139
|
+
width: $_check-xl-w;
|
|
140
|
+
height: $_check-xl-h;
|
|
141
|
+
border-width: 2px;
|
|
142
|
+
}
|
|
143
|
+
.mw-checkbox-label {
|
|
144
|
+
font-size: font-size('md');
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// color variants
|
|
149
|
+
@each $name, $col in $_mw-checkbox-colors {
|
|
150
|
+
&-#{$name} {
|
|
151
|
+
input[type='checkbox']:checked + .mw-checkbox-box {
|
|
152
|
+
border-color: #{$col};
|
|
153
|
+
}
|
|
154
|
+
input[type='checkbox']:checked + .mw-checkbox-box::after {
|
|
155
|
+
border-color: #{$col};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// disabled state
|
|
161
|
+
&-disabled {
|
|
162
|
+
cursor: not-allowed;
|
|
163
|
+
|
|
164
|
+
input[type='checkbox'] {
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
}
|
|
167
|
+
.mw-checkbox-box {
|
|
168
|
+
background: var(--mw-gray-background);
|
|
169
|
+
}
|
|
170
|
+
.mw-checkbox-label {
|
|
171
|
+
color: var(--mw-text-muted-color);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
@use '../abstracts' as *;
|
|
2
|
+
|
|
3
|
+
.mw-form {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: spacing('4');
|
|
7
|
+
padding: spacing('1');
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
&-inline {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: spacing('4');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-group {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
padding: spacing('2');
|
|
20
|
+
gap: spacing('1');
|
|
21
|
+
border-radius: radius('sm');
|
|
22
|
+
border: 2px solid var(--mw-border);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
label {
|
|
26
|
+
font-size: font-size('md');
|
|
27
|
+
span {
|
|
28
|
+
margin-bottom: spacing('1');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-actions {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
gap: spacing('3');
|
|
36
|
+
margin-top: spacing('5');
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
position: relative;
|
|
39
|
+
text-align: right;
|
|
40
|
+
|
|
41
|
+
// hint text above the buttons
|
|
42
|
+
&-hint {
|
|
43
|
+
width: 100%;
|
|
44
|
+
font-size: font-size('sm');
|
|
45
|
+
color: var(--mw-text-muted-color);
|
|
46
|
+
margin-bottom: spacing('0');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// full-width stacked
|
|
50
|
+
&-full-width {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
> * {
|
|
53
|
+
width: 100%;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&-center {
|
|
58
|
+
justify-content: center;
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&-left {
|
|
63
|
+
justify-content: flex-start;
|
|
64
|
+
text-align: left;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&-element-error {
|
|
69
|
+
border: 3px solid var(--mw-danger-color);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// ===== Form Field — label + input + hint + error as a unit =====
|
|
74
|
+
// Designed e.g. for Angular reactive forms pattern:
|
|
75
|
+
// <div class="mw-field">
|
|
76
|
+
// <label class="mw-field-label mw-required">Email</label>
|
|
77
|
+
// <input class="mw-input" formControlName="email">
|
|
78
|
+
// <span class="mw-field-hint">We'll never share your email</span>
|
|
79
|
+
// <span class="mw-field-error">Please enter a valid email</span>
|
|
80
|
+
// </div>
|
|
81
|
+
.mw-field {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: spacing('1');
|
|
85
|
+
|
|
86
|
+
&-label {
|
|
87
|
+
font-size: font-size('sm');
|
|
88
|
+
font-weight: font-weight('medium');
|
|
89
|
+
color: var(--mw-text-color);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Required field asterisk — add class mw-required or attribute data-required
|
|
93
|
+
&-label.mw-required::after,
|
|
94
|
+
&-label[data-required='true']::after {
|
|
95
|
+
content: ' *';
|
|
96
|
+
color: var(--mw-danger-color);
|
|
97
|
+
font-weight: font-weight('bold');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-hint {
|
|
101
|
+
font-size: font-size('xs');
|
|
102
|
+
color: var(--mw-text-muted-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&-error {
|
|
106
|
+
font-size: font-size('xs');
|
|
107
|
+
color: var(--mw-danger-color);
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
gap: spacing('1');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// When the field itself is in error state
|
|
114
|
+
&.mw-field-has-error {
|
|
115
|
+
.mw-input,
|
|
116
|
+
.mw-select,
|
|
117
|
+
.mw-textarea {
|
|
118
|
+
border-color: var(--mw-danger-color);
|
|
119
|
+
box-shadow: 0 0 0 2px var(--mw-danger-info-background);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|