@onereach/styles 0.1.15 → 0.1.17

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.
@@ -1,400 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $btn-prefix: initial.$base-prefix !default;
5
-
6
- $btn-min-width: px-to-rem(96) !default;
7
- $btn-padding: var(--s-2) var(--s-4) !default;
8
- $btn-cursor: pointer !default;
9
-
10
- $btn-font-size: var(--fs-1) !default;
11
- $btn-font-weight: var(--fw-1) !default;
12
- $btn-line-height: px-to-rem(22) !default;
13
-
14
- $btn-border-width: px-to-rem(1) !default;
15
- $btn-border-style: solid !default;
16
- $btn-border-radius: px-to-rem(4) !default;
17
-
18
- $btn-letter-spacing: px-to-rem(-0.15) !default;
19
-
20
- $btn-box-shadow: 0 px-to-rem(1) px-to-rem(2) 0 hsla(0, 0%, 0%, 20%) !default;
21
- $btn-box-shadow-second: 0 px-to-rem(1) px-to-rem(2) 0 hsla(0, 0%, 0%, 10%) !default;
22
-
23
- $btn-icon-font-size: calc(#{$btn-font-size} + #{px-to-rem(6)});
24
-
25
- $list-of-colors: (primary, error, neutral-3, neutral-4, neutral-5, neutral-6);
26
- $btn-types: (outline, text, icon, icon-simple);
27
-
28
- @mixin default-color-mixin() {
29
- @each $key in $list-of-colors {
30
- &.is-#{$key}-color {
31
- --btn-#{$key}-color: var(--c-white);
32
- --btn-#{$key}-bg-color: var(--c-#{$key});
33
- --btn-#{$key}-darken-3: var(--c-#{$key}-darken-3);
34
- --btn-#{$key}-darken-5: var(--c-#{$key}-darken-5);
35
- --btn-#{$key}-lighten-20: var(--c-#{$key}-lighten-20);
36
-
37
- color: var(--btn-#{$key}-color);
38
- background-color: var(--btn-#{$key}-bg-color);
39
- border-color: var(--c-#{$key});
40
-
41
- .#{$btn-prefix}-button {
42
- &--loader {
43
- &::after {
44
- border-color: var(--btn-#{$key}-color);
45
- }
46
- }
47
- }
48
-
49
- @include hover {
50
- background-color: var(--btn-#{$key}-darken-3);
51
- border-color: var(--btn-#{$key}-darken-3);
52
- }
53
-
54
- @include active {
55
- background-color: var(--btn-#{$key}-darken-5);
56
- border-color: var(--btn-#{$key}-darken-5);
57
- }
58
-
59
- @include disabled {
60
- background-color: var(--btn-#{$key}-lighten-20);
61
- border-color: var(--btn-#{$key}-lighten-20);
62
- }
63
-
64
- @include loading {
65
- background-color: var(--btn-#{$key}-lighten-20);
66
- border-color: var(--btn-#{$key}-lighten-20);
67
- }
68
- }
69
- }
70
- }
71
-
72
- @mixin outline-type() {
73
- &.outline-type {
74
- background-color: transparent;
75
- box-shadow: none;
76
-
77
- .#{$btn-prefix}-button {
78
- &--loader {
79
- &::after {
80
- border-color: inherit;
81
- }
82
- }
83
- }
84
-
85
- @each $key in $list-of-colors {
86
- &.is-#{$key}-color {
87
- --btn-#{$key}-color: var(--c-#{$key});
88
- --btn-#{$key}-darken-3: var(--c-#{$key}-darken-3);
89
- --btn-#{$key}-darken-5: var(--c-#{$key}-darken-5);
90
- --btn-#{$key}-lighten-20: var(--c-#{$key}-lighten-20);
91
-
92
- color: var(--btn-#{$key}-color);
93
- border-color: var(--btn-#{$key}-color);
94
-
95
- .#{$btn-prefix}-button {
96
- &--loader {
97
- &::after {
98
- border-color: var(--btn-#{$key}-lighten-20);
99
- }
100
- }
101
- }
102
-
103
- @include hover {
104
- color: var(--c-white);
105
- background-color: var(--btn-#{$key}-darken-3);
106
- border-color: var(--btn-#{$key}-darken-3);
107
- }
108
-
109
- @include active {
110
- color: var(--c-white);
111
- background-color: var(--btn-#{$key}-darken-5);
112
- border-color: var(--btn-#{$key}-darken-5);
113
- }
114
-
115
- @include disabled {
116
- color: var(--btn-#{$key}-lighten-20);
117
- background-color: transparent;
118
- border-color: var(--btn-#{$key}-lighten-20);
119
- }
120
-
121
- @include loading {
122
- color: var(--btn-#{$key}-lighten-20);
123
- background-color: transparent;
124
- border-color: var(--btn-#{$key}-lighten-20);
125
- }
126
- }
127
- }
128
-
129
- // states
130
- @include hover {
131
- box-shadow: $btn-box-shadow;
132
- }
133
-
134
- @include active {
135
- box-shadow: $btn-box-shadow-second;
136
- }
137
-
138
- @include loading {
139
- box-shadow: $btn-box-shadow-second;
140
- }
141
- }
142
- }
143
-
144
- @mixin text-type() {
145
- &.text-type {
146
- min-width: auto;
147
- padding: 0;
148
- background-color: transparent;
149
- border: 1px solid transparent;
150
- box-shadow: none;
151
-
152
- @each $key in $list-of-colors {
153
- &.is-#{$key}-color {
154
- --btn-#{$key}-color: var(--c-#{$key});
155
- --btn-#{$key}-darken-3: var(--c-#{$key}-darken-3);
156
- --btn-#{$key}-darken-5: var(--c-#{$key}-darken-5);
157
- --btn-#{$key}-lighten-20: var(--c-#{$key}-lighten-20);
158
-
159
- color: var(--btn-#{$key}-color);
160
- background-color: transparent;
161
- border-color: transparent;
162
-
163
- @include hover {
164
- color: var(--btn-#{$key}-darken-3);
165
- background-color: transparent;
166
- border-color: transparent;
167
- }
168
-
169
- @include active {
170
- color: var(--btn-#{$key}-darken-5);
171
- background-color: transparent;
172
- border-color: transparent;
173
- }
174
-
175
- @include disabled {
176
- color: var(--btn-#{$key}-lighten-20);
177
- background-color: transparent;
178
- border-color: transparent;
179
- }
180
-
181
- @include loading {
182
- color: var(--btn-#{$key}-lighten-20);
183
- background-color: transparent;
184
- border-color: transparent;
185
- }
186
- }
187
- }
188
- }
189
- }
190
-
191
- @mixin icon-type() {
192
- &.icon-type {
193
- min-width: auto;
194
- max-width: px-to-rem(54);
195
- padding: px-to-rem(14);
196
- border-radius: initial.$round;
197
-
198
- .material-icons {
199
- font-size: px-to-rem(24);
200
- }
201
-
202
- .#{$btn-prefix}-button {
203
- &--content {
204
- &-append,
205
- &-prepend {
206
- margin: 0;
207
- }
208
- }
209
- }
210
- }
211
- }
212
-
213
- @mixin icon-simple-type() {
214
- &.icon-simple-type {
215
- $btn-border-radius: 9999px;
216
-
217
- min-width: auto;
218
- max-width: px-to-rem(18);
219
- padding: 0;
220
- background-color: transparent;
221
- border-color: transparent;
222
- border-radius: $btn-border-radius;
223
- box-shadow: none;
224
-
225
- @each $key in $list-of-colors {
226
- &.is-#{$key}-color {
227
- --btn-#{$key}-color: var(--c-#{$key});
228
- --btn-#{$key}-darken-3: var(--c-#{$key}-darken-3);
229
- --btn-#{$key}-darken-5: var(--c-#{$key}-darken-5);
230
- --btn-#{$key}-lighten-20: var(--c-#{$key}-lighten-20);
231
-
232
- color: var(--btn-#{$key}-color);
233
- background-color: transparent;
234
- border-color: transparent;
235
-
236
- @include hover {
237
- color: var(--btn-#{$key}-darken-3);
238
- background-color: transparent;
239
- border-color: transparent;
240
- }
241
-
242
- @include active {
243
- color: var(--btn-#{$key}-darken-5);
244
- background-color: transparent;
245
- border-color: transparent;
246
- }
247
-
248
- @include disabled {
249
- color: var(--btn-#{$key}-lighten-20);
250
- background-color: transparent;
251
- border-color: transparent;
252
- }
253
-
254
- @include loading {
255
- color: var(--btn-#{$key}-lighten-20);
256
- background-color: transparent;
257
- border-color: transparent;
258
- }
259
- }
260
- }
261
-
262
- .material-icons {
263
- font-size: px-to-rem(16);
264
- }
265
-
266
- .#{$btn-prefix}-button {
267
- &--loader {
268
- &::after {
269
- width: 100%;
270
- height: 100%;
271
- }
272
- }
273
-
274
- &--content {
275
- &-append,
276
- &-prepend {
277
- margin: 0;
278
- }
279
- }
280
- }
281
- }
282
- }
283
-
284
- @mixin is-fullwidth() {
285
- &.is-fullwidth {
286
- width: 100%;
287
- }
288
- }
289
-
290
- @mixin is-block() {
291
- &.is-block {
292
- display: flex;
293
- }
294
- }
295
-
296
- .#{$btn-prefix}-button {
297
- -moz-appearance: none;
298
- -webkit-appearance: none;
299
- position: relative;
300
- box-sizing: border-box;
301
- display: inline-flex;
302
- align-items: center;
303
- justify-content: center;
304
- min-width: $btn-min-width;
305
- padding: $btn-padding;
306
- font-family: inherit;
307
- font-size: $btn-font-size;
308
- font-weight: $btn-font-weight;
309
- line-height: $btn-line-height;
310
- letter-spacing: $btn-letter-spacing;
311
- cursor: $btn-cursor;
312
- border: $btn-border-width $btn-border-style;
313
- border-radius: $btn-border-radius;
314
- box-shadow: $btn-box-shadow;
315
-
316
- @include transition(color, background-color, box-shadow, border-color);
317
-
318
- .material-icons {
319
- font-size: $btn-icon-font-size;
320
- }
321
-
322
- &--loader {
323
- position: absolute !important;
324
- top: 0;
325
- left: 0;
326
- z-index: 1;
327
- width: 100%;
328
- height: 100%;
329
- pointer-events: none;
330
- visibility: hidden;
331
- opacity: 0;
332
-
333
- @include transition(opacity);
334
-
335
- &::after {
336
- border-color: inherit;
337
- animation-play-state: paused;
338
- }
339
- }
340
-
341
- &--content {
342
- display: inline-flex;
343
- align-items: center;
344
- justify-content: center;
345
-
346
- @include transition(opacity);
347
-
348
- &-prepend,
349
- &-append {
350
- display: inline-flex;
351
- }
352
-
353
- &-prepend {
354
- margin-right: px-to-rem(8);
355
- }
356
-
357
- &-append {
358
- margin-left: px-to-rem(8);
359
- }
360
- }
361
-
362
- // sizes
363
- &.is-small {
364
- font-size: calc(#{$btn-font-size} - #{px-to-rem(2)});
365
- line-height: 1;
366
-
367
- .material-icons {
368
- font-size: calc(#{$btn-font-size} - #{px-to-rem(2)} + #{px-to-rem(4)});
369
- }
370
- }
371
-
372
- @include default-color-mixin;
373
- @include outline-type;
374
- @include text-type;
375
- @include icon-type;
376
- @include icon-simple-type;
377
- @include is-fullwidth;
378
- @include is-block;
379
-
380
- @include loading {
381
- .#{$btn-prefix}-button {
382
- &--loader {
383
- visibility: visible;
384
- opacity: 1;
385
-
386
- &::after {
387
- animation-play-state: running;
388
- }
389
- }
390
-
391
- &--content {
392
- opacity: 0;
393
- }
394
- }
395
- }
396
-
397
- @include disabled {
398
- box-shadow: none;
399
- }
400
- }
@@ -1,119 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $checkbox-prefix: initial.$base-prefix !default;
5
-
6
- $checkbox-size: px-to-rem(16) !default;
7
- $checkbox-border-radius: px-to-rem(2) !default;
8
- $checkbox-border-width: px-to-rem(1) !default;
9
- $checkbox-border-color: var(--c-neutral-2) !default;
10
- $checkbox-border-color-hover: var(--c-neutral-2-darken-3) !default;
11
- $checkbox-border-color-active: var(--c-neutral-2-darken-5) !default;
12
- $checkbox-bg-color: var(--c-white) !default;
13
- $checkbox-text-color: inherit !default;
14
- $checkbox-font-size: inherit !default;
15
- $checkbox-line-height: inherit !default;
16
- $checkbox-content-spacing: var(--s-3) !default;
17
-
18
- // checked
19
- $checkbox-icon-color-checked: var(--c-white) !default;
20
- $checkbox-border-color-checked: var(--c-primary) !default;
21
- $checkbox-border-color-checked-hover: var(--c-primary-darken-3) !default;
22
- $checkbox-border-color-checked-active: var(--c-primary-darken-5) !default;
23
- $checkbox-bg-color-checked: var(--c-primary) !default;
24
- $checkbox-bg-color-checked-hover: var(--c-primary-darken-3) !default;
25
- $checkbox-bg-color-checked-active: var(--c-primary-darken-5) !default;
26
- $checkbox-bg-color-checked-disabled: var(--c-primary-lighten-20) !default;
27
-
28
- @mixin is-checked () {
29
- &.is-checked {
30
- .#{$checkbox-prefix}-checkbox {
31
- &--checkbox {
32
- background-color: $checkbox-bg-color-checked;
33
- border-color: $checkbox-border-color-checked;
34
- }
35
- }
36
-
37
- @include hover {
38
- .#{$checkbox-prefix}-checkbox {
39
- &--checkbox {
40
- background-color: $checkbox-bg-color-checked-hover;
41
- border-color: $checkbox-border-color-checked-hover;
42
- }
43
- }
44
- }
45
-
46
- @include active {
47
- .#{$checkbox-prefix}-checkbox {
48
- &--checkbox {
49
- background-color: $checkbox-bg-color-checked-active;
50
- border-color: $checkbox-border-color-checked-active;
51
- }
52
- }
53
- }
54
-
55
- @include disabled {
56
- .#{$checkbox-prefix}-checkbox {
57
- &--checkbox {
58
- background-color: $checkbox-bg-color-checked-disabled;
59
- border-color: $checkbox-bg-color-checked-disabled;
60
- }
61
- }
62
- }
63
- }
64
- }
65
-
66
- .#{$checkbox-prefix}-checkbox {
67
- display: inline-flex;
68
- align-items: center;
69
- font-size: $checkbox-font-size;
70
- line-height: $checkbox-size;
71
- color: $checkbox-text-color;
72
- cursor: pointer;
73
-
74
- &--input {
75
- @include visually-hidden;
76
- }
77
-
78
- &--checkbox {
79
- display: inline-flex;
80
- align-items: center;
81
- justify-content: center;
82
- width: $checkbox-size;
83
- min-width: $checkbox-size;
84
- height: $checkbox-size;
85
- min-height: $checkbox-size;
86
- margin-right: $checkbox-content-spacing;
87
- background-color: $checkbox-bg-color;
88
- border: $checkbox-border-width solid $checkbox-border-color;
89
- border-radius: $checkbox-border-radius;
90
-
91
- @include transition(background-color, border-color);
92
- }
93
-
94
- &--icon {
95
- font-size: $checkbox-size;
96
- color: $checkbox-icon-color-checked;
97
-
98
- @include transition(color);
99
- }
100
-
101
- @include hover {
102
- .#{$checkbox-prefix}-checkbox {
103
- &--checkbox {
104
- border-color: $checkbox-border-color-hover;
105
- }
106
- }
107
- }
108
-
109
- @include active {
110
- .#{$checkbox-prefix}-checkbox {
111
- &--checkbox {
112
- border-color: $checkbox-border-color-active;
113
- }
114
- }
115
- }
116
-
117
- @include disabled;
118
- @include is-checked;
119
- }
@@ -1,11 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $collapse-prefix: initial.$base-prefix !default;
5
-
6
- .#{$collapse-prefix}-collapse {
7
- padding: 0;
8
- overflow: hidden;
9
-
10
- @include transition(height);
11
- }
@@ -1,13 +0,0 @@
1
- @use "../utils/functions/px-to-rem" as *;
2
- @use "../variables/initial";
3
-
4
- $error-prefix: initial.$base-prefix !default;
5
- $error-font-size: var(--fs-0) !default;
6
- $error-line-height: px-to-rem(14) !default;
7
- $error-color: var(--c-error) !default;
8
-
9
- .#{$error-prefix}-error {
10
- font-size: $error-font-size;
11
- line-height: $error-line-height;
12
- color: $error-color;
13
- }
@@ -1,13 +0,0 @@
1
- @use "../utils/functions/px-to-rem" as *;
2
- @use "../variables/initial";
3
-
4
- $hint-prefix: initial.$base-prefix !default;
5
- $hint-font-size: var(--fs-0) !default;
6
- $hint-line-height: px-to-rem(14) !default;
7
- $hint-color: var(--c-neutral-4) !default;
8
-
9
- .#{$hint-prefix}-hint {
10
- font-size: $hint-font-size;
11
- line-height: $hint-line-height;
12
- color: $hint-color;
13
- }
@@ -1,32 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $icon-prefix: initial.$base-prefix !default;
5
-
6
- $icon-size: px-to-rem(20) !default;
7
- $icon-color: inherit !default;
8
-
9
- $list-of-colors: (neutral-3, neutral-4);
10
-
11
- .#{$icon-prefix}-icon {
12
- display: inline-flex;
13
- font-size: $icon-size;
14
- color: $icon-color;
15
-
16
- @each $key in $list-of-colors {
17
- &.is-#{$key}-color {
18
- color: var(--c-#{$key});
19
-
20
- @include hover {
21
- color: var(--c-neutral-5);
22
- }
23
-
24
- @include active {
25
- color: var(--c-neutral-6);
26
- }
27
- }
28
- }
29
-
30
- @include transition(color);
31
- @include disabled;
32
- }
@@ -1,14 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $label-prefix: initial.$base-prefix !default;
5
- $label-font-size: var(--fs-0) !default;
6
- $label-line-height: px-to-rem(14) !default;
7
- $label-color: var(--c-neutral-4) !default;
8
-
9
- .#{$label-prefix}-label {
10
- width: 100%;
11
- font-size: $label-font-size;
12
- line-height: $label-line-height;
13
- color: $label-color;
14
- }
@@ -1,44 +0,0 @@
1
- @use "../utils/index" as *;
2
- @use "../variables/initial";
3
-
4
- $list-prefix: initial.$base-prefix !default;
5
-
6
- .#{$list-prefix}-list {
7
- cursor: default;
8
-
9
- &--header {
10
- margin-bottom: var(--s-2);
11
- }
12
-
13
- &--handle {
14
- margin-right: var(--s-3);
15
- cursor: move;
16
- }
17
-
18
- &--delete-btn {
19
- margin-left: var(--s-3);
20
- }
21
-
22
- &--item {
23
- display: flex;
24
- align-items: center;
25
- justify-content: flex-start;
26
- width: 100%;
27
- margin-bottom: var(--s-4);
28
-
29
- //.material-icons {
30
- // color: var(--c-neutral-4);
31
- //}
32
- }
33
-
34
- &--slot {
35
- width: 100%;
36
- transition: all initial.$transition-duration initial.$transition-function;
37
-
38
- > * {
39
- width: 100%;
40
- }
41
- }
42
-
43
- @include disabled;
44
- }