@nuvoui/core 1.3.1 → 1.3.3

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.
@@ -40,6 +40,26 @@
40
40
  display: initial;
41
41
  }
42
42
 
43
+ // @description Establishes a grid container.
44
+ @mixin grid {
45
+ display: grid;
46
+ }
47
+
48
+ // @description Establishes a inline-grid container.
49
+ @mixin grid-inline {
50
+ display: inline-grid;
51
+ }
52
+
53
+ // @description Establishes a flex container.
54
+ @mixin flex {
55
+ display: flex;
56
+ }
57
+
58
+ // @description Establishes a flex-inline container.
59
+ @mixin flex-inline {
60
+ display: inline-flex;
61
+ }
62
+
43
63
  // @description Set display to table.
44
64
  @mixin d-tbl {
45
65
  display: table;
@@ -120,6 +140,24 @@
120
140
  @include inline-block;
121
141
  }
122
142
 
143
+ #{VAR.$parent-selector} .contents {
144
+ @include contents;
145
+ }
146
+
147
+ #{VAR.$parent-selector} .grid {
148
+ @include grid;
149
+
150
+ &.inline {
151
+ @include grid-inline;
152
+ }
153
+ }
154
+ #{VAR.$parent-selector} .flex {
155
+ @include flex;
156
+
157
+ &.inline {
158
+ @include flex-inline;
159
+ }
160
+ }
123
161
  #{VAR.$parent-selector} .visible {
124
162
  @include visible;
125
163
  }
@@ -132,10 +170,6 @@
132
170
  @include collapse;
133
171
  }
134
172
 
135
- #{VAR.$parent-selector} .contents {
136
- @include contents;
137
- }
138
-
139
173
  #{VAR.$parent-selector} .overflow-hidden {
140
174
  @include overflow-hidden;
141
175
  }
@@ -208,6 +242,24 @@
208
242
  #{VAR.$parent-selector} .inline-block\@#{$breakpoint} {
209
243
  @include inline-block;
210
244
  }
245
+
246
+ #{VAR.$parent-selector} .contents\@#{$breakpoint} {
247
+ @include contents;
248
+ }
249
+ #{VAR.$parent-selector} .grid\@#{$breakpoint} {
250
+ @include grid;
251
+
252
+ &.inline {
253
+ @include grid-inline;
254
+ }
255
+ }
256
+ #{VAR.$parent-selector} .flex\@#{$breakpoint} {
257
+ @include flex;
258
+
259
+ &.inline {
260
+ @include flex-inline;
261
+ }
262
+ }
211
263
  #{VAR.$parent-selector} .visible\@#{$breakpoint} {
212
264
  @include visible;
213
265
  }
@@ -217,9 +269,6 @@
217
269
  #{VAR.$parent-selector} .collapse\@#{$breakpoint} {
218
270
  @include collapse;
219
271
  }
220
- #{VAR.$parent-selector} .contents\@#{$breakpoint} {
221
- @include contents;
222
- }
223
272
  #{VAR.$parent-selector} .overflow-hidden\@#{$breakpoint} {
224
273
  @include overflow-hidden;
225
274
  }
@@ -34,32 +34,16 @@
34
34
  }
35
35
 
36
36
  // Font weights
37
- @mixin font-thin {
38
- font-weight: 100;
39
- }
40
- @mixin font-extralight {
41
- font-weight: 200;
42
- }
43
- @mixin font-light {
44
- font-weight: 300;
45
- }
46
- @mixin font-normal {
47
- font-weight: 400;
48
- }
49
- @mixin font-medium {
50
- font-weight: 500;
51
- }
52
- @mixin font-semibold {
53
- font-weight: 600;
54
- }
55
- @mixin font-bold {
56
- font-weight: 700;
57
- }
58
- @mixin font-extrabold {
59
- font-weight: 800;
60
- }
61
- @mixin font-black {
62
- font-weight: 900;
37
+ @mixin font($weight) {
38
+ @if map.has-key(VAR.$font-weights, #{$weight}) {
39
+ font-weight: map.get(VAR.$font-weights, $weight);
40
+ } @else if meta.type-of($weight) == number {
41
+ font-weight: $weight;
42
+ } @else {
43
+ @warn "Unknown font weight: #{$weight} setting it to default.";
44
+
45
+ font-weight: 400; // Default to normal weight
46
+ }
63
47
  }
64
48
 
65
49
  @mixin leading($value) {
@@ -86,18 +70,23 @@
86
70
  @mixin leading-none {
87
71
  @include leading(none);
88
72
  }
73
+
89
74
  @mixin leading-tight {
90
75
  @include leading(tight);
91
76
  }
77
+
92
78
  @mixin leading-snug {
93
79
  @include leading(snug);
94
80
  }
81
+
95
82
  @mixin leading-normal {
96
83
  @include leading(normal);
97
84
  }
85
+
98
86
  @mixin leading-relaxed {
99
87
  @include leading(relaxed);
100
88
  }
89
+
101
90
  @mixin leading-loose {
102
91
  @include leading(loose);
103
92
  }
@@ -106,12 +95,15 @@
106
95
  @mixin text-left {
107
96
  text-align: left;
108
97
  }
98
+
109
99
  @mixin text-center {
110
100
  text-align: center;
111
101
  }
102
+
112
103
  @mixin text-right {
113
104
  text-align: right;
114
105
  }
106
+
115
107
  @mixin text-justify {
116
108
  text-align: justify;
117
109
  }
@@ -120,12 +112,15 @@
120
112
  @mixin uppercase {
121
113
  text-transform: uppercase;
122
114
  }
115
+
123
116
  @mixin lowercase {
124
117
  text-transform: lowercase;
125
118
  }
119
+
126
120
  @mixin capitalize {
127
121
  text-transform: capitalize;
128
122
  }
123
+
129
124
  @mixin normal-case {
130
125
  text-transform: none;
131
126
  }
@@ -134,6 +129,7 @@
134
129
  @mixin italic {
135
130
  font-style: italic;
136
131
  }
132
+
137
133
  @mixin not-italic {
138
134
  font-style: normal;
139
135
  }
@@ -142,9 +138,11 @@
142
138
  @mixin underline {
143
139
  text-decoration: underline;
144
140
  }
141
+
145
142
  @mixin line-through {
146
143
  text-decoration: line-through;
147
144
  }
145
+
148
146
  @mixin no-underline {
149
147
  text-decoration: none;
150
148
  }
@@ -180,21 +178,27 @@
180
178
  @mixin break-words {
181
179
  overflow-wrap: break-word;
182
180
  }
181
+
183
182
  @mixin break-all {
184
183
  word-break: break-all;
185
184
  }
185
+
186
186
  @mixin whitespace-normal {
187
187
  white-space: normal;
188
188
  }
189
+
189
190
  @mixin whitespace-nowrap {
190
191
  white-space: nowrap;
191
192
  }
193
+
192
194
  @mixin whitespace-pre {
193
195
  white-space: pre;
194
196
  }
197
+
195
198
  @mixin whitespace-pre-line {
196
199
  white-space: pre-line;
197
200
  }
201
+
198
202
  @mixin whitespace-pre-wrap {
199
203
  white-space: pre-wrap;
200
204
  }
@@ -223,18 +227,23 @@
223
227
  @mixin tracking-tighter {
224
228
  @include tracking(tighter);
225
229
  }
230
+
226
231
  @mixin tracking-tight {
227
232
  @include tracking(tight);
228
233
  }
234
+
229
235
  @mixin tracking-normal {
230
236
  @include tracking(normal);
231
237
  }
238
+
232
239
  @mixin tracking-wide {
233
240
  @include tracking(wide);
234
241
  }
242
+
235
243
  @mixin tracking-wider {
236
244
  @include tracking(wider);
237
245
  }
246
+
238
247
  @mixin tracking-widest {
239
248
  @include tracking(widest);
240
249
  }
@@ -250,39 +259,39 @@
250
259
 
251
260
  // Generate font weight utilities
252
261
  #{VAR.$parent-selector} .font-thin#{$suffix} {
253
- @include font-thin;
262
+ @include font(thin);
254
263
  }
255
264
 
256
265
  #{VAR.$parent-selector} .font-extralight#{$suffix} {
257
- @include font-extralight;
266
+ @include font(extralight);
258
267
  }
259
268
 
260
269
  #{VAR.$parent-selector} .font-light#{$suffix} {
261
- @include font-light;
270
+ @include font(light);
262
271
  }
263
272
 
264
273
  #{VAR.$parent-selector} .font-normal#{$suffix} {
265
- @include font-normal;
274
+ @include font(normal);
266
275
  }
267
276
 
268
277
  #{VAR.$parent-selector} .font-medium#{$suffix} {
269
- @include font-medium;
278
+ @include font(medium);
270
279
  }
271
280
 
272
281
  #{VAR.$parent-selector} .font-semibold#{$suffix} {
273
- @include font-semibold;
282
+ @include font(semibold);
274
283
  }
275
284
 
276
285
  #{VAR.$parent-selector} .font-bold#{$suffix} {
277
- @include font-bold;
286
+ @include font(bold);
278
287
  }
279
288
 
280
289
  #{VAR.$parent-selector} .font-extrabold#{$suffix} {
281
- @include font-extrabold;
290
+ @include font(extrabold);
282
291
  }
283
292
 
284
293
  #{VAR.$parent-selector} .font-black#{$suffix} {
285
- @include font-black;
294
+ @include font(black);
286
295
  }
287
296
 
288
297
  // Generate line height utilities