@nuvoui/core 1.2.2 → 1.2.4

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.
@@ -117,7 +117,7 @@
117
117
  * @description Sets padding on all sides
118
118
  * @param {Number|String} $val - Padding value
119
119
  */
120
- @mixin p($val) { & { padding: format-unit-value($val); }}
120
+ @mixin p($val) { padding: format-unit-value($val); }
121
121
 
122
122
  /**
123
123
  * @mixin px
@@ -126,11 +126,8 @@
126
126
  */
127
127
  @mixin px($val) {
128
128
  $val: format-unit-value($val);
129
-
130
- & {
131
- padding-left: $val;
132
- padding-right: $val;
133
- }
129
+
130
+ padding-inline: $val;
134
131
  }
135
132
 
136
133
  /**
@@ -140,11 +137,8 @@
140
137
  */
141
138
  @mixin py($val) {
142
139
  $val: format-unit-value($val);
143
-
144
- & {
145
- padding-top: $val;
146
- padding-bottom: $val;
147
- }
140
+
141
+ padding-block: $val;
148
142
  }
149
143
 
150
144
  /**
@@ -153,11 +147,9 @@
153
147
  * @param {Number|String} $val - Padding value
154
148
  */
155
149
  @mixin pt($val) {
156
- & {
157
- $val: format-unit-value($val);
158
-
159
- padding-top: $val;
160
- }
150
+ $val: format-unit-value($val);
151
+
152
+ padding-top: $val;
161
153
  }
162
154
 
163
155
  /**
@@ -166,11 +158,9 @@
166
158
  * @param {Number|String} $val - Padding value
167
159
  */
168
160
  @mixin pr($val) {
169
- & {
170
- $val: format-unit-value($val);
171
-
172
- padding-right: $val;
173
- }
161
+ $val: format-unit-value($val);
162
+
163
+ padding-right: $val;
174
164
  }
175
165
 
176
166
  /**
@@ -179,11 +169,9 @@
179
169
  * @param {Number|String} $val - Padding value
180
170
  */
181
171
  @mixin pb($val) {
182
- & {
183
- $val: format-unit-value($val);
184
-
185
- padding-bottom: $val;
186
- }
172
+ $val: format-unit-value($val);
173
+
174
+ padding-bottom: $val;
187
175
  }
188
176
 
189
177
  /**
@@ -192,11 +180,9 @@
192
180
  * @param {Number|String} $val - Padding value
193
181
  */
194
182
  @mixin pl($val) {
195
- & {
196
- $val: format-unit-value($val);
197
-
198
- padding-left: $val;
199
- }
183
+ $val: format-unit-value($val);
184
+
185
+ padding-left: $val;
200
186
  }
201
187
 
202
188
  // -----------------------------------------------
@@ -209,11 +195,9 @@
209
195
  * @param {Number|String} $val - Margin value
210
196
  */
211
197
  @mixin m($val) {
212
- & {
213
- $val: format-unit-value($val);
214
-
215
- margin: $val;
216
- }
198
+ $val: format-unit-value($val);
199
+
200
+ margin: $val;
217
201
  }
218
202
 
219
203
  /**
@@ -224,10 +208,7 @@
224
208
  @mixin mx($val) {
225
209
  $val: format-unit-value($val);
226
210
 
227
- & {
228
- margin-left: $val;
229
- margin-right: $val;
230
- }
211
+ margin-inline: $val;
231
212
  }
232
213
 
233
214
  /**
@@ -236,12 +217,9 @@
236
217
  * @param {Number|String} $val - Margin value
237
218
  */
238
219
  @mixin my($val) {
239
- $val: format-unit-value($val);
220
+ $val: format-unit-value($val);
240
221
 
241
- &{
242
- margin-top: $val;
243
- margin-bottom: $val;
244
- }
222
+ margin-block: $val;
245
223
  }
246
224
 
247
225
  /**
@@ -250,11 +228,9 @@
250
228
  * @param {Number|String} $val - Margin value
251
229
  */
252
230
  @mixin mt($val) {
253
- & {
254
- $val: format-unit-value($val);
255
-
256
- margin-top: $val;
257
- }
231
+ $val: format-unit-value($val);
232
+
233
+ margin-top: $val;
258
234
  }
259
235
 
260
236
  /**
@@ -263,11 +239,9 @@
263
239
  * @param {Number|String} $val - Margin value
264
240
  */
265
241
  @mixin mr($val) {
266
- & {
267
- $val: format-unit-value($val);
268
-
269
- margin-right: $val;
270
- }
242
+ $val: format-unit-value($val);
243
+
244
+ margin-right: $val;
271
245
  }
272
246
 
273
247
  /**
@@ -276,11 +250,9 @@
276
250
  * @param {Number|String} $val - Margin value
277
251
  */
278
252
  @mixin mb($val) {
279
- & {
280
- $val: format-unit-value($val);
281
-
282
- margin-bottom: $val;
283
- }
253
+ $val: format-unit-value($val);
254
+
255
+ margin-bottom: $val;
284
256
  }
285
257
 
286
258
  /**
@@ -289,24 +261,22 @@
289
261
  * @param {Number|String} $val - Margin value
290
262
  */
291
263
  @mixin ml($val) {
292
- & {
293
- $val: format-unit-value($val);
294
-
295
- margin-left: $val;
296
- }
264
+ $val: format-unit-value($val);
265
+
266
+ margin-left: $val;
297
267
  }
298
268
 
299
269
  /**
300
270
  * @mixin ml-auto
301
271
  * @description Sets margin-left to auto
302
272
  */
303
- @mixin ml-auto { & { margin-left: auto; } }
273
+ @mixin ml-auto { margin-left: auto; }
304
274
 
305
275
  /**
306
276
  * @mixin mr-auto
307
277
  * @description Sets margin-right to auto
308
278
  */
309
- @mixin mr-auto { & { margin-right: auto; } }
279
+ @mixin mr-auto { margin-right: auto; }
310
280
 
311
281
  /**
312
282
  * @mixin mx-auto
@@ -424,39 +394,39 @@
424
394
  // -----------------------------------------------
425
395
 
426
396
  @each $breakpoint, $width in $breakpoints {
427
- @media (min-width: #{$width}) {
428
- .mx-auto\@#{$breakpoint} { @include mx-auto; }
429
- .ml-auto\@#{$breakpoint} { @include ml-auto; }
430
- .mr-auto\@#{$breakpoint} { @include mr-auto; }
431
-
432
- // Generate utilities from spacing map
433
- @each $key, $value in $spacings {
434
- // Padding classes
435
- .p-#{$key}\@#{$breakpoint} { @include p($value); }
436
- .px-#{$key}\@#{$breakpoint} { @include px($value); }
437
- .py-#{$key}\@#{$breakpoint} { @include py($value); }
438
- .pt-#{$key}\@#{$breakpoint} { @include pt($value); }
439
- .pr-#{$key}\@#{$breakpoint} { @include pr($value); }
440
- .pb-#{$key}\@#{$breakpoint} { @include pb($value); }
441
- .pl-#{$key}\@#{$breakpoint} { @include pl($value); }
442
-
443
- // Margin classes
444
- .m-#{$key}\@#{$breakpoint} { @include m($value); }
445
- .mx-#{$key}\@#{$breakpoint} { @include mx($value); }
446
- .my-#{$key}\@#{$breakpoint} { @include my($value); }
447
- .mt-#{$key}\@#{$breakpoint} { @include mt($value); }
448
- .mr-#{$key}\@#{$breakpoint} { @include mr($value); }
449
- .mb-#{$key}\@#{$breakpoint} { @include mb($value); }
450
- .ml-#{$key}\@#{$breakpoint} { @include ml($value); }
451
-
452
- .gap-#{$key}\@#{$breakpoint} { gap: $value; }
453
- .gap-x-#{$key}\@#{$breakpoint} { column-gap: $value; }
454
- .gap-y-#{$key}\@#{$breakpoint} { row-gap: $value; }
455
-
456
- // Space classes
457
- .space-x-#{$key}\@#{$breakpoint} { @include space-x($value); }
458
- .space-y-#{$key}\@#{$breakpoint} { @include space-y($value); }
459
- }
397
+ @media (min-width: #{$width}) {
398
+ .mx-auto\@#{$breakpoint} { @include mx-auto; }
399
+ .ml-auto\@#{$breakpoint} { @include ml-auto; }
400
+ .mr-auto\@#{$breakpoint} { @include mr-auto; }
401
+
402
+ // Generate utilities from spacing map
403
+ @each $key, $value in $spacings {
404
+ // Padding classes
405
+ .p-#{$key}\@#{$breakpoint} { @include p($value); }
406
+ .px-#{$key}\@#{$breakpoint} { @include px($value); }
407
+ .py-#{$key}\@#{$breakpoint} { @include py($value); }
408
+ .pt-#{$key}\@#{$breakpoint} { @include pt($value); }
409
+ .pr-#{$key}\@#{$breakpoint} { @include pr($value); }
410
+ .pb-#{$key}\@#{$breakpoint} { @include pb($value); }
411
+ .pl-#{$key}\@#{$breakpoint} { @include pl($value); }
412
+
413
+ // Margin classes
414
+ .m-#{$key}\@#{$breakpoint} { @include m($value); }
415
+ .mx-#{$key}\@#{$breakpoint} { @include mx($value); }
416
+ .my-#{$key}\@#{$breakpoint} { @include my($value); }
417
+ .mt-#{$key}\@#{$breakpoint} { @include mt($value); }
418
+ .mr-#{$key}\@#{$breakpoint} { @include mr($value); }
419
+ .mb-#{$key}\@#{$breakpoint} { @include mb($value); }
420
+ .ml-#{$key}\@#{$breakpoint} { @include ml($value); }
421
+
422
+ .gap-#{$key}\@#{$breakpoint} { gap: $value; }
423
+ .gap-x-#{$key}\@#{$breakpoint} { column-gap: $value; }
424
+ .gap-y-#{$key}\@#{$breakpoint} { row-gap: $value; }
425
+
426
+ // Space classes
427
+ .space-x-#{$key}\@#{$breakpoint} { @include space-x($value); }
428
+ .space-y-#{$key}\@#{$breakpoint} { @include space-y($value); }
460
429
  }
430
+ }
461
431
  }
462
- }
432
+ }
@@ -13,11 +13,9 @@
13
13
 
14
14
  // Base transition mixins
15
15
  @mixin transition {
16
- & {
17
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
18
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
19
- transition-duration: 150ms;
20
- }
16
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
17
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
18
+ transition-duration: 150ms;
21
19
  }
22
20
 
23
21
  // Property-specific transition mixins
@@ -155,4 +153,4 @@ $delays: (
155
153
  }
156
154
  }
157
155
  }
158
- }
156
+ }
@@ -32,135 +32,131 @@
32
32
  * @param {string} $size - The size of the text.
33
33
  */
34
34
  @mixin text-size($size) {
35
- & {
36
35
  @if map.has-key(VAR.$font-sizes, $size) {
37
36
  font-size: map.get(VAR.$font-sizes, $size);
38
37
  } @else {
39
38
  font-size: $size;
40
39
  }
41
- }
42
40
  }
43
41
 
44
42
  // Font weights
45
- @mixin font-thin { & { font-weight: 100; } }
46
- @mixin font-extralight { & { font-weight: 200; } }
47
- @mixin font-light { & { font-weight: 300; } }
48
- @mixin font-normal { & { font-weight: 400; } }
49
- @mixin font-medium { & { font-weight: 500; } }
50
- @mixin font-semibold { & { font-weight: 600; } }
51
- @mixin font-bold { & { font-weight: 700; } }
52
- @mixin font-extrabold { & { font-weight: 800; } }
53
- @mixin font-black { & { font-weight: 900; } }
43
+ @mixin font-thin { font-weight: 100; }
44
+ @mixin font-extralight { font-weight: 200; }
45
+ @mixin font-light { font-weight: 300; }
46
+ @mixin font-normal { font-weight: 400; }
47
+ @mixin font-medium { font-weight: 500; }
48
+ @mixin font-semibold { font-weight: 600; }
49
+ @mixin font-bold { font-weight: 700; }
50
+ @mixin font-extrabold { font-weight: 800; }
51
+ @mixin font-black { font-weight: 900; }
54
52
 
55
53
 
56
54
  @mixin leading($value){
57
- & {
58
- @if meta.type-of($value) == 'number' {
59
- line-height: $value;
60
- } @else if $value == 'none' {
61
- line-height: 1;
62
- } @else if $value == 'tight' {
63
- line-height: 1.25;
64
- } @else if $value == 'snug' {
65
- line-height: 1.375;
66
- } @else if $value == 'normal' {
67
- line-height: 1.5;
68
- } @else if $value == 'relaxed' {
69
- line-height: 1.625;
70
- } @else if $value == 'loose' {
71
- line-height: 2;
72
- } @else {
73
- line-height: $value;
74
- }
55
+ @if meta.type-of($value) == 'number' {
56
+ line-height: $value;
57
+ } @else if $value == 'none' {
58
+ line-height: 1;
59
+ } @else if $value == 'tight' {
60
+ line-height: 1.25;
61
+ } @else if $value == 'snug' {
62
+ line-height: 1.375;
63
+ } @else if $value == 'normal' {
64
+ line-height: 1.5;
65
+ } @else if $value == 'relaxed' {
66
+ line-height: 1.625;
67
+ } @else if $value == 'loose' {
68
+ line-height: 2;
69
+ } @else {
70
+ line-height: $value;
75
71
  }
76
72
  }
77
73
 
78
74
  // Line heights
79
- @mixin leading-none { & { @include leading(none);} }
80
- @mixin leading-tight { & { @include leading(tight);} }
81
- @mixin leading-snug { & { @include leading(snug);} }
82
- @mixin leading-normal { & { @include leading(normal);} }
83
- @mixin leading-relaxed { & { @include leading(relaxed);} }
84
- @mixin leading-loose { & { @include leading(loose);} }
75
+ @mixin leading-none { @include leading(none);}
76
+ @mixin leading-tight { @include leading(tight);}
77
+ @mixin leading-snug { @include leading(snug);}
78
+ @mixin leading-normal { @include leading(normal);}
79
+ @mixin leading-relaxed { @include leading(relaxed);}
80
+ @mixin leading-loose { @include leading(loose);}
85
81
 
86
82
  // Text alignment
87
- @mixin text-left { & { text-align: left; } }
88
- @mixin text-center { & { text-align: center; } }
89
- @mixin text-right { & { text-align: right; } }
90
- @mixin text-justify { & { text-align: justify; } }
83
+ @mixin text-left { text-align: left; }
84
+ @mixin text-center { text-align: center; }
85
+ @mixin text-right { text-align: right; }
86
+ @mixin text-justify { text-align: justify; }
91
87
 
92
88
 
93
89
  // Text transform mixins
94
- @mixin uppercase { & { text-transform: uppercase; } }
95
- @mixin lowercase { & { text-transform: lowercase; } }
96
- @mixin capitalize { & { text-transform: capitalize; } }
97
- @mixin normal-case { & { text-transform: none; } }
90
+ @mixin uppercase { text-transform: uppercase; }
91
+ @mixin lowercase { text-transform: lowercase; }
92
+ @mixin capitalize { text-transform: capitalize; }
93
+ @mixin normal-case { text-transform: none; }
98
94
 
99
95
  // Font style mixins
100
- @mixin italic { & { font-style: italic; } }
101
- @mixin not-italic { & { font-style: normal; } }
96
+ @mixin italic { font-style: italic; }
97
+ @mixin not-italic { font-style: normal; }
102
98
 
103
99
  // Text decoration mixins
104
- @mixin underline { & { text-decoration: underline; } }
105
- @mixin line-through { & { text-decoration: line-through; } }
106
- @mixin no-underline { & { text-decoration: none; } }
100
+ @mixin underline { text-decoration: underline; }
101
+ @mixin line-through { text-decoration: line-through; }
102
+ @mixin no-underline { text-decoration: none; }
107
103
 
108
104
  // Text overflow mixin
109
105
  @mixin truncate {
110
- & {
111
- overflow: hidden;
112
- text-overflow: ellipsis;
113
- white-space: nowrap;
114
- }
106
+ overflow: hidden;
107
+ text-overflow: ellipsis;
108
+ white-space: nowrap;
109
+ }
110
+
111
+ @mixin overflow-label {
112
+ white-space: nowrap;
113
+ word-break: break-all;
114
+ text-overflow: ellipsis;
115
+ overflow: hidden;
116
+ min-width: 0;
115
117
  }
116
118
 
117
119
  @mixin truncate-lines($lines: 2) {
118
- & {
119
- display: -webkit-box;
120
- -webkit-line-clamp: $lines;
121
- -webkit-box-orient: vertical;
122
- overflow: hidden;
123
- text-overflow: ellipsis;
124
- }
120
+ display: -webkit-box;
121
+ -webkit-line-clamp: $lines;
122
+ -webkit-box-orient: vertical;
123
+ overflow: hidden;
124
+ text-overflow: ellipsis;
125
125
  }
126
126
 
127
127
 
128
128
  @mixin break-normal {
129
- & {
130
- overflow-wrap: normal;
131
- word-break: normal;
132
- }
129
+ overflow-wrap: normal;
130
+ word-break: normal;
133
131
  }
134
132
 
135
- @mixin break-words { & {overflow-wrap: break-word; }}
136
- @mixin break-all { & {word-break: break-all; }}
137
- @mixin whitespace-normal { & {white-space: normal; }}
138
- @mixin whitespace-nowrap { & {white-space: nowrap; }}
139
- @mixin whitespace-pre { & {white-space: pre; }}
140
- @mixin whitespace-pre-line { & {white-space: pre-line; }}
141
- @mixin whitespace-pre-wrap { & {white-space: pre-wrap; }}
133
+ @mixin break-words { overflow-wrap: break-word; }
134
+ @mixin break-all { word-break: break-all; }
135
+ @mixin whitespace-normal { white-space: normal; }
136
+ @mixin whitespace-nowrap { white-space: nowrap; }
137
+ @mixin whitespace-pre { white-space: pre; }
138
+ @mixin whitespace-pre-line { white-space: pre-line; }
139
+ @mixin whitespace-pre-wrap { white-space: pre-wrap; }
142
140
 
143
141
 
144
142
  // Custom letter spacing mixin with value
145
143
  @mixin tracking($value) {
146
- & {
147
- @if meta.type-of($value) == 'number' {
148
- letter-spacing: $value;
149
- } @else if $value == 'tighter' {
150
- letter-spacing: -0.05em;
151
- } @else if $value == 'tight' {
152
- letter-spacing: -0.025em;
153
- } @else if $value == 'normal' {
154
- letter-spacing: 0;
155
- } @else if $value == 'wide' {
156
- letter-spacing: 0.025em;
157
- } @else if $value == 'wider' {
158
- letter-spacing: 0.05em;
159
- } @else if $value == 'widest' {
160
- letter-spacing: 0.1em;
161
- } @else {
162
- letter-spacing: $value;
163
- }
144
+ @if meta.type-of($value) == 'number' {
145
+ letter-spacing: $value;
146
+ } @else if $value == 'tighter' {
147
+ letter-spacing: -0.05em;
148
+ } @else if $value == 'tight' {
149
+ letter-spacing: -0.025em;
150
+ } @else if $value == 'normal' {
151
+ letter-spacing: 0;
152
+ } @else if $value == 'wide' {
153
+ letter-spacing: 0.025em;
154
+ } @else if $value == 'wider' {
155
+ letter-spacing: 0.05em;
156
+ } @else if $value == 'widest' {
157
+ letter-spacing: 0.1em;
158
+ } @else {
159
+ letter-spacing: $value;
164
160
  }
165
161
  }
166
162
 
@@ -230,6 +226,8 @@
230
226
  .tracking-wide#{$suffix} { @include tracking(wide) };
231
227
  .tracking-wider#{$suffix} { @include tracking(wider) };
232
228
  .tracking-widest#{$suffix} { @include tracking(widest) };
229
+
230
+ .overflow-label#{$suffix}{@include overflow-label};
233
231
  }
234
232
 
235
233
  @if VAR.$generate-utility-classes {
@@ -244,12 +242,11 @@
244
242
  .whitespace-pre-wrap { @include whitespace-pre-wrap; }
245
243
 
246
244
  @each $breakpoint, $width in VAR.$breakpoints {
247
- @media (min-width: #{$width}) {
248
- @each $size, $val in VAR.$font-sizes {
249
- .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
250
- }
251
- @include responsive-typography($breakpoint);
245
+ @media (min-width: #{$width}) {
246
+ @each $size, $val in VAR.$font-sizes {
247
+ .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
252
248
  }
249
+ @include responsive-typography($breakpoint);
250
+ }
253
251
  }
254
-
255
252
  }