@nuvoui/core 1.2.7 → 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 (35) hide show
  1. package/dist/nuvoui.css +3252 -2709
  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 +3 -3
  6. package/src/styles/abstracts/_config.scss +36 -8
  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 +230 -292
  13. package/src/styles/layouts/_grid.scss +66 -73
  14. package/src/styles/mixins-map.json +1 -0
  15. package/src/styles/mixins-map.scss +1 -1
  16. package/src/styles/themes/_theme.scss +10 -10
  17. package/src/styles/utilities/_alignment.scss +2 -1
  18. package/src/styles/utilities/_animations.scss +20 -32
  19. package/src/styles/utilities/_backdrop-filters.scss +12 -16
  20. package/src/styles/utilities/_borders.scss +3 -5
  21. package/src/styles/utilities/_container-queries.scss +17 -21
  22. package/src/styles/utilities/_cursor.scss +2 -1
  23. package/src/styles/utilities/_display.scss +18 -39
  24. package/src/styles/utilities/_helpers.scss +1 -0
  25. package/src/styles/utilities/_media-queries.scss +3 -5
  26. package/src/styles/utilities/_opacity.scss +52 -67
  27. package/src/styles/utilities/_position.scss +104 -132
  28. package/src/styles/utilities/_shadows.scss +9 -14
  29. package/src/styles/utilities/_sizing.scss +1 -1
  30. package/src/styles/utilities/_spacing.scss +143 -205
  31. package/src/styles/utilities/_tooltips.scss +203 -200
  32. package/src/styles/utilities/_transforms.scss +32 -13
  33. package/src/styles/utilities/_transitions.scss +8 -10
  34. package/src/styles/utilities/_typography.scss +17 -22
  35. package/src/styles/utilities/_z-index.scss +12 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "1.2.7",
3
+ "version": "1.3.1",
4
4
  "description": "NuvoUI is a human-friendly SCSS framework designed for simplicity, and modern responsive designs.",
5
5
  "author": {
6
6
  "name": "AALA IT Solutions",
@@ -36,12 +36,12 @@
36
36
  "lint": "stylelint \"src/**/*.scss\"",
37
37
  "format": "prettier --write \"src/**/*.{scss,js,json}\"",
38
38
  "clean": "node -e \"const fs=require('fs');if(fs.existsSync('dist')) fs.rmSync('dist',{recursive:true})\"",
39
- "build:scss": "sass src/styles/index.scss:dist/nuvoui.css --style expanded",
39
+ "build:scss": "sass src/styles/build.scss:dist/nuvoui.css --style expanded",
40
40
  "build:minify": "postcss dist/nuvoui.css -o dist/nuvoui.min.css --use cssnano --map",
41
41
  "prebuild": "npm run clean",
42
42
  "build": "npm run build:scss && npm run build:minify",
43
43
  "dev": "sass src/styles/index.scss:dist/nuvoui.css --watch",
44
- "prepublishOnly": "npm run build"
44
+ "prepublishOnly": "npm run lint && npm run format && npm run build"
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",
@@ -2,13 +2,34 @@
2
2
  @use "sass:math";
3
3
  @use "sass:list";
4
4
 
5
+ $feature-flags: (
6
+ "alignments": true,
7
+ "animations": true,
8
+ "backdrops": true,
9
+ "borders": true,
10
+ "container-queries": true,
11
+ "cursors": true,
12
+ "displays": true,
13
+ "flex": true,
14
+ "grid": true,
15
+ "opacity": true,
16
+ "position": true,
17
+ "shadows": true,
18
+ "sizing": true,
19
+ "spacing": true,
20
+ "tooltips": true,
21
+ "theme": true,
22
+ "transforms": true,
23
+ "transitions": true,
24
+ "typography": true,
25
+ "z-index": true,
26
+ ) !default;
27
+
5
28
  // Framework Configuration Options
6
- $generate-utility-classes: true !default;
29
+ $generate-utility-classes: false !default;
7
30
  $enable-dark-mode: true !default;
8
- $enable-rtl: true !default;
31
+
9
32
  $enable-debugger: false !default;
10
- $enable-reduced-motion: true !default; // todo: pending
11
- $enable-container-queries: false !default; // todo: pending
12
33
 
13
34
  // if just a number passed, it will be assumed as px
14
35
  $default-unit: px !default;
@@ -100,9 +121,16 @@ $basic-colors: (
100
121
  }
101
122
 
102
123
  // Validate both themes
103
- @debug validate-theme-tokens($light-theme, $theme-tokens);
124
+ @mixin validate-tokens {
125
+ @if not validate-theme-tokens($light-theme, $theme-tokens) {
126
+ @error "Light theme is missing required tokens.";
127
+ }
128
+ @if not validate-theme-tokens($dark-theme, $theme-tokens) {
129
+ @error "Dark theme is missing required tokens.";
130
+ }
131
+ }
104
132
 
105
- @debug validate-theme-tokens($dark-theme, $theme-tokens);
133
+ @include validate-tokens;
106
134
 
107
135
  $shadow-colors: (
108
136
  "default": rgb(0 0 0 / 10%),
@@ -187,7 +215,7 @@ $spacings: (
187
215
  64: 16rem, // 256px
188
216
  ) !default;
189
217
 
190
- $percentages: (0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100) !default;
218
+ $percentages: (0, 5, 10, 20, 25, 30, 33, 40, 50, 60, 66, 70, 75, 80, 90, 100) !default;
191
219
 
192
220
  // Common border width values that are most useful
193
221
  $border-widths: (0, 1, 2, 4, 8) !default;
@@ -200,7 +228,7 @@ $border-radii: (
200
228
  "lg": 0.75rem,
201
229
  "xl": 1rem,
202
230
  "2xl": 1.25rem,
203
- "full": 9999px,
231
+ "full": 50%,
204
232
  "none": 0,
205
233
  ) !default;
206
234
 
@@ -41,11 +41,9 @@
41
41
  }
42
42
  }
43
43
 
44
- /**
45
- * Ensures a value has a unit, adding $default-unit if none exists
46
- * @param {Number|String} $val - The value to check
47
- * @return {String} - The value with units
48
- */
44
+ // Ensures a value has a unit, adding $default-unit if none exists
45
+ // @param {Number|String} $val - The value to check
46
+ // @return {String} - The value with units
49
47
  @function fix-units($val, $unit: $default-unit, $debug: null) {
50
48
  @if meta.type-of($val) != number and meta.type-of($val) != string {
51
49
  @error "fix-units() requires a number or string value";
@@ -112,3 +110,16 @@
112
110
 
113
111
  @return list.append($result, str-trim($string));
114
112
  }
113
+
114
+ // Helper function to check if a feature is enabled
115
+ @function feature-enabled($feature) {
116
+ @if not $generate-utility-classes {
117
+ @return false;
118
+ }
119
+
120
+ @if not map.has-key($feature-flags, $feature) {
121
+ @return true; // Default to enabled if not specified
122
+ }
123
+
124
+ @return map.get($feature-flags, $feature);
125
+ }
@@ -1,6 +1,6 @@
1
1
  @use "sass:map";
2
2
 
3
- /* Import variables */
3
+ // Import variables
4
4
  @use "../abstracts/config" as *;
5
5
  @use "../utilities/media-queries" as media;
6
6
 
@@ -28,7 +28,7 @@ body#{$parent-selector} {
28
28
  #{$parent-selector} h5,
29
29
  #{$parent-selector} h6 {
30
30
  margin-bottom: 0.5em;
31
- font-family: var(--font-family-heading);
31
+ font-family: var(--font-family-base);
32
32
  font-weight: 700;
33
33
  line-height: 1.2;
34
34
  }
@@ -28,8 +28,6 @@ dd {
28
28
 
29
29
  // Prevent font size inflation
30
30
  html {
31
- -moz-text-size-adjust: none; /* stylelint-disable-line */
32
- -webkit-text-size-adjust: none; /* stylelint-disable-line */
33
31
  text-size-adjust: none;
34
32
  }
35
33
 
@@ -0,0 +1,3 @@
1
+ @use "./index.scss" as NuvoUI with (
2
+ $generate-utility-classes: true
3
+ );
@@ -1,5 +1,6 @@
1
1
  @use "sass:map";
2
2
  @use "../abstracts/config" as VAR;
3
+ @use "../abstracts/functions" as FN;
3
4
 
4
5
  // Base container styles
5
6
  @mixin container-base {
@@ -27,9 +28,15 @@
27
28
  @include container-padding(1rem);
28
29
  }
29
30
 
30
- @if VAR.$generate-utility-classes {
31
+ @if FN.feature-enabled("container-queries") {
31
32
  // Container classes
32
33
  #{VAR.$parent-selector} .container {
33
34
  @include container;
34
35
  }
36
+ #{VAR.$parent-selector} .container.flex {
37
+ @include container(flex);
38
+ }
39
+ #{VAR.$parent-selector} .container.grid {
40
+ @include container(grid);
41
+ }
35
42
  }