@nuvoui/core 1.3.0 → 1.3.2
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.
- package/dist/nuvoui.css +775 -1406
- package/dist/nuvoui.css.map +1 -1
- package/dist/nuvoui.min.css +1 -1
- package/dist/nuvoui.min.css.map +1 -1
- package/package.json +2 -2
- package/src/styles/abstracts/_config.scss +30 -2
- package/src/styles/abstracts/_functions.scss +16 -5
- package/src/styles/base/_base.scss +6 -6
- package/src/styles/base/_reset.scss +0 -2
- package/src/styles/build.scss +3 -0
- package/src/styles/layouts/_container.scss +8 -1
- package/src/styles/layouts/_flex.scss +124 -228
- package/src/styles/layouts/_grid.scss +14 -43
- package/src/styles/themes/_theme.scss +10 -10
- package/src/styles/themes/refactored_borders.ipynb +37 -0
- package/src/styles/utilities/_alignment.scss +2 -1
- package/src/styles/utilities/_animations.scss +20 -32
- package/src/styles/utilities/_backdrop-filters.scss +7 -11
- package/src/styles/utilities/_borders.scss +80 -270
- package/src/styles/utilities/_container-queries.scss +17 -21
- package/src/styles/utilities/_cursor.scss +2 -1
- package/src/styles/utilities/_display.scss +73 -44
- package/src/styles/utilities/_helpers.scss +1 -0
- package/src/styles/utilities/_media-queries.scss +3 -5
- package/src/styles/utilities/_opacity.scss +52 -67
- package/src/styles/utilities/_position.scss +104 -132
- package/src/styles/utilities/_shadows.scss +9 -14
- package/src/styles/utilities/_sizing.scss +1 -1
- package/src/styles/utilities/_spacing.scss +143 -205
- package/src/styles/utilities/_tooltips.scss +203 -200
- package/src/styles/utilities/_transforms.scss +9 -11
- package/src/styles/utilities/_transitions.scss +8 -10
- package/src/styles/utilities/_typography.scss +17 -22
- 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.3.
|
|
3
|
+
"version": "1.3.2",
|
|
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,7 +36,7 @@
|
|
|
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/
|
|
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",
|
|
@@ -2,8 +2,31 @@
|
|
|
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:
|
|
29
|
+
$generate-utility-classes: false !default;
|
|
7
30
|
$enable-dark-mode: true !default;
|
|
8
31
|
|
|
9
32
|
$enable-debugger: false !default;
|
|
@@ -81,6 +104,11 @@ $basic-colors: (
|
|
|
81
104
|
"transparent": transparent,
|
|
82
105
|
) !default;
|
|
83
106
|
|
|
107
|
+
$semantic-colors: ("primary", "secondary", "success", "danger", "warning", "info");
|
|
108
|
+
$primitive-color-names: map.keys($color-primitives);
|
|
109
|
+
$color-names: list.join($semantic-colors, $primitive-color-names);
|
|
110
|
+
$color-names: list.join($color-names, map.keys($basic-colors));
|
|
111
|
+
|
|
84
112
|
@function validate-theme-tokens($theme-map, $required-tokens) {
|
|
85
113
|
$missing-tokens: ();
|
|
86
114
|
|
|
@@ -205,7 +233,7 @@ $border-radii: (
|
|
|
205
233
|
"lg": 0.75rem,
|
|
206
234
|
"xl": 1rem,
|
|
207
235
|
"2xl": 1.25rem,
|
|
208
|
-
"
|
|
236
|
+
"full": 50%,
|
|
209
237
|
"none": 0,
|
|
210
238
|
) !default;
|
|
211
239
|
|
|
@@ -41,11 +41,9 @@
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
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-
|
|
31
|
+
font-family: var(--font-family-base);
|
|
32
32
|
font-weight: 700;
|
|
33
33
|
line-height: 1.2;
|
|
34
34
|
}
|
|
@@ -107,7 +107,7 @@ body#{$parent-selector} {
|
|
|
107
107
|
#{$parent-selector} input[type="search"],
|
|
108
108
|
#{$parent-selector} textarea {
|
|
109
109
|
padding: 0.5rem;
|
|
110
|
-
border: 1px solid var(--border);
|
|
110
|
+
border: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
|
|
111
111
|
border-radius: 0.25rem;
|
|
112
112
|
width: 100%; // Full width
|
|
113
113
|
font-family: var(--font-family-base);
|
|
@@ -128,7 +128,7 @@ body#{$parent-selector} {
|
|
|
128
128
|
// Selects
|
|
129
129
|
#{$parent-selector} select {
|
|
130
130
|
padding: 0.5rem;
|
|
131
|
-
border: 1px solid var(--border);
|
|
131
|
+
border: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
|
|
132
132
|
border-radius: 0.25rem;
|
|
133
133
|
width: 100%; // Full width
|
|
134
134
|
font-family: var(--font-family-base);
|
|
@@ -144,14 +144,14 @@ body#{$parent-selector} {
|
|
|
144
144
|
#{$parent-selector} blockquote {
|
|
145
145
|
margin: 1rem 0;
|
|
146
146
|
padding: 0.5rem 1rem;
|
|
147
|
-
border-left: 4px solid var(--border);
|
|
147
|
+
border-left: var(--border-size, 4px) var(--border-style, solid) var(--border-color, var(--secondary));
|
|
148
148
|
font-style: italic;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// Horizontal Rule
|
|
152
152
|
#{$parent-selector} hr {
|
|
153
153
|
border: none;
|
|
154
|
-
border-top: 1px solid var(--border);
|
|
154
|
+
border-top: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--secondary));
|
|
155
155
|
margin: 1rem 0;
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -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
|
|
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
|
}
|