@nuvoui/core 1.3.0 → 1.3.1

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.
Files changed (33) hide show
  1. package/dist/nuvoui.css +230 -922
  2. package/dist/nuvoui.css.map +1 -1
  3. package/dist/nuvoui.min.css +1 -1
  4. package/dist/nuvoui.min.css.map +1 -1
  5. package/package.json +2 -2
  6. package/src/styles/abstracts/_config.scss +25 -2
  7. package/src/styles/abstracts/_functions.scss +16 -5
  8. package/src/styles/base/_base.scss +2 -2
  9. package/src/styles/base/_reset.scss +0 -2
  10. package/src/styles/build.scss +3 -0
  11. package/src/styles/layouts/_container.scss +8 -1
  12. package/src/styles/layouts/_flex.scss +125 -207
  13. package/src/styles/layouts/_grid.scss +16 -29
  14. package/src/styles/themes/_theme.scss +10 -10
  15. package/src/styles/utilities/_alignment.scss +2 -1
  16. package/src/styles/utilities/_animations.scss +20 -32
  17. package/src/styles/utilities/_backdrop-filters.scss +7 -11
  18. package/src/styles/utilities/_borders.scss +3 -5
  19. package/src/styles/utilities/_container-queries.scss +17 -21
  20. package/src/styles/utilities/_cursor.scss +2 -1
  21. package/src/styles/utilities/_display.scss +17 -37
  22. package/src/styles/utilities/_helpers.scss +1 -0
  23. package/src/styles/utilities/_media-queries.scss +3 -5
  24. package/src/styles/utilities/_opacity.scss +52 -67
  25. package/src/styles/utilities/_position.scss +104 -132
  26. package/src/styles/utilities/_shadows.scss +9 -14
  27. package/src/styles/utilities/_sizing.scss +1 -1
  28. package/src/styles/utilities/_spacing.scss +143 -205
  29. package/src/styles/utilities/_tooltips.scss +203 -200
  30. package/src/styles/utilities/_transforms.scss +9 -11
  31. package/src/styles/utilities/_transitions.scss +8 -10
  32. package/src/styles/utilities/_typography.scss +17 -22
  33. package/src/styles/utilities/_z-index.scss +12 -19
@@ -4,138 +4,110 @@
4
4
  @use "../abstracts/config" as VAR;
5
5
  @use "../abstracts/functions" as FN;
6
6
 
7
- /**
8
- * @component Spacing
9
- * @description Controls element margins, padding, gaps, and spacing between children
10
- *
11
- * @example
12
- * <!-- Padding -->
13
- * <div class="p-4">All sides padding</div>
14
- * <div class="px-4 py-2">Horizontal and vertical padding</div>
15
- * <div class="pt-2 pb-4">Top and bottom padding</div>
16
- *
17
- * <!-- Margins -->
18
- * <div class="m-4">All sides margin</div>
19
- * <div class="mt-4">Top margin only</div>
20
- * <div class="mx-auto">Horizontally centered</div>
21
- *
22
- * <!-- Gap (for flex/grid containers) -->
23
- * <div class="flex gap-4">
24
- * <div>Item 1</div>
25
- * <div>Item 2</div>
26
- * </div>
27
- *
28
- * <!-- Responsive spacing -->
29
- * <div class="p-2 p-4@md p-6@lg">
30
- * Padding increases at each breakpoint
31
- * </div>
32
- *
33
- * <!-- Child spacing -->
34
- * <div class="space-y-4">
35
- * <div>First child</div>
36
- * <div>Second child (margin-top: 1rem)</div>
37
- * <div>Third child (margin-top: 1rem)</div>
38
- * </div>
39
- *
40
- * @classes
41
- * Padding:
42
- * - p-{size}: Padding on all sides
43
- * - px-{size}: Horizontal padding (left and right)
44
- * - py-{size}: Vertical padding (top and bottom)
45
- * - pt-{size}, pr-{size}, pb-{size}, pl-{size}: Individual side padding
46
- *
47
- * Margin:
48
- * - m-{size}: Margin on all sides
49
- * - mx-{size}: Horizontal margin (left and right)
50
- * - my-{size}: Vertical margin (top and bottom)
51
- * - mt-{size}, mr-{size}, mb-{size}, ml-{size}: Individual side margin
52
- * - mx-auto, ml-auto, mr-auto: Auto margin for alignment
53
- *
54
- * Gap:
55
- * - gap-{size}: Gap between flex/grid children (all directions)
56
- * - gap-x-{size}: Horizontal gap between children (column-gap)
57
- * - gap-y-{size}: Vertical gap between children (row-gap)
58
- *
59
- * Child Spacing:
60
- * - space-x-{size}: Horizontal space between children
61
- * - space-y-{size}: Vertical space between children
62
- *
63
- * @responsive
64
- * All spacing classes support responsive variants using @breakpoint suffix:
65
- * - p-4@md: 1rem padding on medium screens and up
66
- * - mt-8@lg: 2rem top margin on large screens
67
- * - gap-2@xl: 0.5rem gap on extra large screens
68
- *
69
- * @customization
70
- * Spacing values are defined in the $spacings map in variables.scss
71
- * Typically follows a scale where higher numbers mean more spacing
72
- *
73
- * @see flex, grid, display
74
- */
7
+ // @component Spacing
8
+ // @description Controls element margins, padding, gaps, and spacing between children
9
+ // @example
10
+ // <!-- Padding -->
11
+ // <div class="p-4">All sides padding</div>
12
+ // <div class="px-4 py-2">Horizontal and vertical padding</div>
13
+ // <div class="pt-2 pb-4">Top and bottom padding</div>
14
+ // <!-- Margins -->
15
+ // <div class="m-4">All sides margin</div>
16
+ // <div class="mt-4">Top margin only</div>
17
+ // <div class="mx-auto">Horizontally centered</div>
18
+ // <!-- Gap (for flex/grid containers) -->
19
+ // <div class="flex gap-4">
20
+ // <div>Item 1</div>
21
+ // <div>Item 2</div>
22
+ // </div>
23
+ // <!-- Responsive spacing -->
24
+ // <div class="p-2 p-4@md p-6@lg">
25
+ // Padding increases at each breakpoint
26
+ // </div>
27
+ // <!-- Child spacing -->
28
+ // <div class="space-y-4">
29
+ // <div>First child</div>
30
+ // <div>Second child (margin-top: 1rem)</div>
31
+ // <div>Third child (margin-top: 1rem)</div>
32
+ // </div>
33
+ // @classes
34
+ // Padding:
35
+ // - p-{size}: Padding on all sides
36
+ // - px-{size}: Horizontal padding (left and right)
37
+ // - py-{size}: Vertical padding (top and bottom)
38
+ // - pt-{size}, pr-{size}, pb-{size}, pl-{size}: Individual side padding
39
+ // Margin:
40
+ // - m-{size}: Margin on all sides
41
+ // - mx-{size}: Horizontal margin (left and right)
42
+ // - my-{size}: Vertical margin (top and bottom)
43
+ // - mt-{size}, mr-{size}, mb-{size}, ml-{size}: Individual side margin
44
+ // - mx-auto, ml-auto, mr-auto: Auto margin for alignment
45
+ // Gap:
46
+ // - gap-{size}: Gap between flex/grid children (all directions)
47
+ // - gap-x-{size}: Horizontal gap between children (column-gap)
48
+ // - gap-y-{size}: Vertical gap between children (row-gap)
49
+ // Child Spacing:
50
+ // - space-x-{size}: Horizontal space between children
51
+ // - space-y-{size}: Vertical space between children
52
+ // @responsive
53
+ // All spacing classes support responsive variants using @breakpoint suffix:
54
+ // - p-4@md: 1rem padding on medium screens and up
55
+ // - mt-8@lg: 2rem top margin on large screens
56
+ // - gap-2@xl: 0.5rem gap on extra large screens
57
+ // @customization
58
+ // Spacing values are defined in the $spacings map in variables.scss
59
+ // Typically follows a scale where higher numbers mean more spacing
60
+ // @see flex, grid, display
75
61
 
76
62
  // -----------------------------------------------
77
63
  // PADDING MIXINS
78
64
  // -----------------------------------------------
79
65
 
80
- /**
81
- * @mixin p
82
- * @description Sets padding on all sides
83
- * @param {Number|String} $val - Padding value
84
- */
66
+ // @mixin p
67
+ // @description Sets padding on all sides
68
+ // @param {Number|String} $val - Padding value
85
69
  @mixin p($val) {
86
70
  padding: FN.fix-units($val);
87
71
  }
88
72
 
89
- /**
90
- * @mixin px
91
- * @description Sets horizontal padding (left and right)
92
- * @param {Number|String} $val - Padding value
93
- */
73
+ // @mixin px
74
+ // @description Sets horizontal padding (left and right)
75
+ // @param {Number|String} $val - Padding value
94
76
  @mixin px($val) {
95
77
  padding-inline: FN.fix-units($val);
96
78
  }
97
79
 
98
- /**
99
- * @mixin py
100
- * @description Sets vertical padding (top and bottom)
101
- * @param {Number|String} $val - Padding value
102
- */
80
+ // @mixin py
81
+ // @description Sets vertical padding (top and bottom)
82
+ // @param {Number|String} $val - Padding value
103
83
  @mixin py($val) {
104
84
  padding-block: FN.fix-units($val);
105
85
  }
106
86
 
107
- /**
108
- * @mixin pt
109
- * @description Sets padding-top
110
- * @param {Number|String} $val - Padding value
111
- */
87
+ // @mixin pt
88
+ // @description Sets padding-top
89
+ // @param {Number|String} $val - Padding value
112
90
  @mixin pt($val) {
113
91
  padding-top: FN.fix-units($val);
114
92
  }
115
93
 
116
- /**
117
- * @mixin pr
118
- * @description Sets padding-right
119
- * @param {Number|String} $val - Padding value
120
- */
94
+ // @mixin pr
95
+ // @description Sets padding-right
96
+ // @param {Number|String} $val - Padding value
121
97
  @mixin pr($val) {
122
98
  padding-right: FN.fix-units($val);
123
99
  }
124
100
 
125
- /**
126
- * @mixin pb
127
- * @description Sets padding-bottom
128
- * @param {Number|String} $val - Padding value
129
- */
101
+ // @mixin pb
102
+ // @description Sets padding-bottom
103
+ // @param {Number|String} $val - Padding value
130
104
  @mixin pb($val) {
131
105
  padding-bottom: FN.fix-units($val);
132
106
  }
133
107
 
134
- /**
135
- * @mixin pl
136
- * @description Sets padding-left
137
- * @param {Number|String} $val - Padding value
138
- */
108
+ // @mixin pl
109
+ // @description Sets padding-left
110
+ // @param {Number|String} $val - Padding value
139
111
  @mixin pl($val) {
140
112
  padding-left: FN.fix-units($val);
141
113
  }
@@ -144,91 +116,71 @@
144
116
  // MARGIN MIXINS
145
117
  // -----------------------------------------------
146
118
 
147
- /**
148
- * @mixin m
149
- * @description Sets margin on all sides
150
- * @param {Number|String} $val - Margin value
151
- */
119
+ // @mixin m
120
+ // @description Sets margin on all sides
121
+ // @param {Number|String} $val - Margin value
152
122
  @mixin m($val) {
153
123
  margin: FN.fix-units($val);
154
124
  }
155
125
 
156
- /**
157
- * @mixin mx
158
- * @description Sets horizontal margin (left and right)
159
- * @param {Number|String} $val - Margin value
160
- */
126
+ // @mixin mx
127
+ // @description Sets horizontal margin (left and right)
128
+ // @param {Number|String} $val - Margin value
161
129
  @mixin mx($val) {
162
130
  margin-inline: FN.fix-units($val);
163
131
  }
164
132
 
165
- /**
166
- * @mixin my
167
- * @description Sets vertical margin (top and bottom)
168
- * @param {Number|String} $val - Margin value
169
- */
133
+ // @mixin my
134
+ // @description Sets vertical margin (top and bottom)
135
+ // @param {Number|String} $val - Margin value
170
136
  @mixin my($val) {
171
137
  $val: FN.fix-units($val);
172
138
 
173
139
  margin-block: FN.fix-units($val);
174
140
  }
175
141
 
176
- /**
177
- * @mixin mt
178
- * @description Sets margin-top
179
- * @param {Number|String} $val - Margin value
180
- */
142
+ // @mixin mt
143
+ // @description Sets margin-top
144
+ // @param {Number|String} $val - Margin value
181
145
  @mixin mt($val) {
182
146
  margin-top: FN.fix-units($val, VAR.$default-unit);
183
147
  }
184
148
 
185
- /**
186
- * @mixin mr
187
- * @description Sets margin-right
188
- * @param {Number|String} $val - Margin value
189
- */
149
+ // @mixin mr
150
+ // @description Sets margin-right
151
+ // @param {Number|String} $val - Margin value
190
152
  @mixin mr($val) {
191
153
  margin-right: FN.fix-units($val);
192
154
  }
193
155
 
194
- /**
195
- * @mixin mb
196
- * @description Sets margin-bottom
197
- * @param {Number|String} $val - Margin value
198
- */
156
+ // @mixin mb
157
+ // @description Sets margin-bottom
158
+ // @param {Number|String} $val - Margin value
199
159
  @mixin mb($val) {
200
160
  margin-bottom: FN.fix-units($val);
201
161
  }
202
162
 
203
- /**
204
- * @mixin ml
205
- * @description Sets margin-left
206
- * @param {Number|String} $val - Margin value
207
- */
163
+ // @mixin ml
164
+ // @description Sets margin-left
165
+ // @param {Number|String} $val - Margin value
208
166
  @mixin ml($val) {
209
167
  margin-left: FN.fix-units($val);
210
168
  }
211
169
 
212
- /**
213
- * @mixin ml-auto
214
- * @description Sets margin-left to auto
215
- */
170
+ // @mixin ml-auto
171
+ // @description Sets margin-left to auto
216
172
  @mixin ml-auto {
217
173
  margin-left: auto;
218
174
  }
219
175
 
220
- /**
221
- * @mixin mr-auto
222
- * @description Sets margin-right to auto
223
- */
176
+ // @mixin mr-auto
177
+ // @description Sets margin-right to auto
224
178
  @mixin mr-auto {
225
179
  margin-right: auto;
226
180
  }
227
181
 
228
- /**
229
- * @mixin mx-auto
230
- * @description Centers element horizontally using auto margins
231
- */
182
+ // @mixin mx-auto
183
+ // @description Centers element horizontally using auto margins
232
184
  @mixin mx-auto {
233
185
  @include ml-auto;
234
186
  @include mr-auto;
@@ -238,22 +190,18 @@
238
190
  // INSET MIXINS
239
191
  // -----------------------------------------------
240
192
 
241
- /**
242
- * @mixin inset
243
- * @description Sets all inset properties (top, right, bottom, left)
244
- * @param {Number|String} $val - Inset value
245
- */
193
+ // @mixin inset
194
+ // @description Sets all inset properties (top, right, bottom, left)
195
+ // @param {Number|String} $val - Inset value
246
196
  @mixin inset($val) {
247
197
  $val: FN.fix-units($val);
248
198
 
249
199
  inset: FN.fix-units($val);
250
200
  }
251
201
 
252
- /**
253
- * @mixin inset-x
254
- * @description Sets horizontal inset properties (left and right)
255
- * @param {Number|String} $val - Inset value
256
- */
202
+ // @mixin inset-x
203
+ // @description Sets horizontal inset properties (left and right)
204
+ // @param {Number|String} $val - Inset value
257
205
  @mixin inset-x($val) {
258
206
  $val: FN.fix-units($val);
259
207
 
@@ -261,11 +209,9 @@
261
209
  right: $val;
262
210
  }
263
211
 
264
- /**
265
- * @mixin inset-y
266
- * @description Sets vertical inset properties (top and bottom)
267
- * @param {Number|String} $val - Inset value
268
- */
212
+ // @mixin inset-y
213
+ // @description Sets vertical inset properties (top and bottom)
214
+ // @param {Number|String} $val - Inset value
269
215
  @mixin inset-y($val) {
270
216
  $val: FN.fix-units($val);
271
217
 
@@ -273,27 +219,21 @@
273
219
  bottom: $val;
274
220
  }
275
221
 
276
- /**
277
- * @mixin inset-auto
278
- * @description Sets all inset properties to auto
279
- */
222
+ // @mixin inset-auto
223
+ // @description Sets all inset properties to auto
280
224
  @mixin inset-auto {
281
225
  inset: auto;
282
226
  }
283
227
 
284
- /**
285
- * @mixin inset-x-auto
286
- * @description Sets horizontal inset properties to auto
287
- */
228
+ // @mixin inset-x-auto
229
+ // @description Sets horizontal inset properties to auto
288
230
  @mixin inset-x-auto {
289
231
  left: auto;
290
232
  right: auto;
291
233
  }
292
234
 
293
- /**
294
- * @mixin inset-y-auto
295
- * @description Sets vertical inset properties to auto
296
- */
235
+ // @mixin inset-y-auto
236
+ // @description Sets vertical inset properties to auto
297
237
  @mixin inset-y-auto {
298
238
  top: auto;
299
239
  bottom: auto;
@@ -303,22 +243,18 @@
303
243
  // SPACING MIXINS
304
244
  // -----------------------------------------------
305
245
 
306
- /**
307
- * @mixin space-y
308
- * @description Adds vertical spacing between direct children
309
- * @param {Number|String} $i - Space amount
310
- */
246
+ // @mixin space-y
247
+ // @description Adds vertical spacing between direct children
248
+ // @param {Number|String} $i - Space amount
311
249
  @mixin space-y($i) {
312
250
  & > * + * {
313
251
  margin-top: FN.fix-units($i);
314
252
  }
315
253
  }
316
254
 
317
- /**
318
- * @mixin space-x
319
- * @description Adds horizontal spacing between direct children
320
- * @param {Number|String} $i - Space amount
321
- */
255
+ // @mixin space-x
256
+ // @description Adds horizontal spacing between direct children
257
+ // @param {Number|String} $i - Space amount
322
258
  @mixin space-x($i) {
323
259
  & > * + * {
324
260
  margin-left: FN.fix-units($i);
@@ -329,34 +265,36 @@
329
265
  // GAP MIXINS
330
266
  // -----------------------------------------------
331
267
 
332
- /**
333
- * @mixin gap
334
- * @description Sets gap between grid/flex children
335
- * @param {Number|String} $val - Gap value
336
- */
268
+ // @mixin gap
269
+ // @description Sets gap between grid/flex children
270
+ // @param {Number|String} $val - Gap value
337
271
  @mixin gap($val) {
338
- gap: FN.fix-units($val);
272
+ $val: FN.fix-units($val);
273
+
274
+ gap: $val;
275
+
276
+ --flex-gap: #{$val};
339
277
  }
340
278
 
341
- /**
342
- * @mixin gap-x
343
- * @description Sets horizontal gap between grid/flex children
344
- * @param {Number|String} $val - Gap value
345
- */
279
+ // @mixin gap-x
280
+ // @description Sets horizontal gap between grid/flex children
281
+ // @param {Number|String} $val - Gap value
346
282
  @mixin gap-x($val) {
347
- column-gap: FN.fix-units($val);
283
+ $val: FN.fix-units($val);
284
+
285
+ column-gap: $val;
286
+
287
+ --flex-gap: #{$val};
348
288
  }
349
289
 
350
- /**
351
- * @mixin gap-y
352
- * @description Sets vertical gap between grid/flex children
353
- * @param {Number|String} $val - Gap value
354
- */
290
+ // @mixin gap-y
291
+ // @description Sets vertical gap between grid/flex children
292
+ // @param {Number|String} $val - Gap value
355
293
  @mixin gap-y($val) {
356
294
  row-gap: FN.fix-units($val);
357
295
  }
358
296
 
359
- @if VAR.$generate-utility-classes {
297
+ @if FN.feature-enabled("spacing") {
360
298
  // -----------------------------------------------
361
299
  // AUTO MARGIN UTILITY CLASSES
362
300
  // -----------------------------------------------