@nuvoui/core 1.3.5 → 1.4.0

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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/dist/nuvoui.css +322 -258
  3. package/dist/nuvoui.css.map +1 -1
  4. package/dist/nuvoui.min.css +23 -1
  5. package/dist/nuvoui.min.css.map +1 -1
  6. package/package.json +1 -1
  7. package/src/styles/base/_base.scss +148 -147
  8. package/src/styles/base/_reset.scss +41 -49
  9. package/src/styles/build.scss +25 -1
  10. package/src/styles/components/_tooltips.scss +271 -0
  11. package/src/styles/config/_borders.scss +15 -0
  12. package/src/styles/config/_breakpoints.scss +11 -0
  13. package/src/styles/config/_colors.scss +192 -0
  14. package/src/styles/config/_constants.scss +1 -0
  15. package/src/styles/config/_container-queries.scss +1 -0
  16. package/src/styles/config/_feature-flags.scss +33 -0
  17. package/src/styles/config/_layouts.scss +13 -0
  18. package/src/styles/config/_shadows.scss +9 -0
  19. package/src/styles/config/_spacing.scss +41 -0
  20. package/src/styles/config/_theme-validation.scss +59 -0
  21. package/src/styles/config/_typography.scss +45 -0
  22. package/src/styles/functions/_breakpoints.scss +15 -0
  23. package/src/styles/functions/_colors.scss +280 -0
  24. package/src/styles/functions/_css-vars.scss +33 -0
  25. package/src/styles/functions/_feature-flags.scss +20 -0
  26. package/src/styles/functions/_math.scss +72 -0
  27. package/src/styles/functions/_strings.scss +68 -0
  28. package/src/styles/functions/_types.scss +104 -0
  29. package/src/styles/functions/_units.scss +83 -0
  30. package/src/styles/index.scss +26 -5
  31. package/src/styles/layouts/_container.scss +28 -27
  32. package/src/styles/layouts/_flex.scss +340 -337
  33. package/src/styles/layouts/_grid.scss +131 -128
  34. package/src/styles/mixins-map.json +484 -479
  35. package/src/styles/mixins-map.scss +1 -1
  36. package/src/styles/themes/_theme.scss +230 -211
  37. package/src/styles/tools/_accessibility.scss +50 -0
  38. package/src/styles/tools/_container-queries.scss +98 -0
  39. package/src/styles/tools/_feature-support.scss +46 -0
  40. package/src/styles/tools/_media-queries.scss +70 -0
  41. package/src/styles/tools/_modern-layout.scss +49 -0
  42. package/src/styles/utilities/_alignment.scss +35 -34
  43. package/src/styles/utilities/_animations.scss +312 -311
  44. package/src/styles/utilities/_backdrop-filters.scss +194 -193
  45. package/src/styles/utilities/_borders.scss +243 -237
  46. package/src/styles/utilities/_colors.scss +16 -136
  47. package/src/styles/utilities/_cursor.scss +10 -10
  48. package/src/styles/utilities/_display.scss +192 -191
  49. package/src/styles/utilities/_helpers.scss +106 -106
  50. package/src/styles/utilities/_opacity.scss +27 -25
  51. package/src/styles/utilities/_position.scss +124 -121
  52. package/src/styles/utilities/_shadows.scss +171 -169
  53. package/src/styles/utilities/_sizing.scss +197 -194
  54. package/src/styles/utilities/_spacing.scss +230 -227
  55. package/src/styles/utilities/_transforms.scss +235 -234
  56. package/src/styles/utilities/_transitions.scss +136 -135
  57. package/src/styles/utilities/_typography.scss +242 -239
  58. package/src/styles/utilities/_z-index.scss +69 -68
  59. package/src/styles/abstracts/_config.scss +0 -254
  60. package/src/styles/abstracts/_functions.scss +0 -626
  61. package/src/styles/themes/refactored_borders.ipynb +0 -37
  62. package/src/styles/utilities/_container-queries.scss +0 -95
  63. package/src/styles/utilities/_media-queries.scss +0 -189
  64. package/src/styles/utilities/_tooltips.scss +0 -258
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "1.3.5",
3
+ "version": "1.4.0",
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",
@@ -1,218 +1,219 @@
1
1
  @use "sass:map";
2
2
 
3
3
  // Import variables
4
- @use "../abstracts/config" as *;
5
- @use "../utilities/media-queries" as media;
4
+ @use "../config/typography" as config-typo;
5
+ @use "../config/feature-flags" as config-flags;
6
+ @use "../tools/accessibility" as tool-accessibility;
6
7
 
7
8
  :root {
8
- --font-family-base: #{$font-family};
9
+ --font-family-base: #{config-typo.$font-family};
9
10
  }
10
11
 
11
- // Base typography styles
12
+ // Base config-typo styles
12
13
  html {
13
- font-size: $base-size;
14
+ font-size: config-typo.$base-size;
14
15
  }
15
16
 
16
- body#{$parent-selector} {
17
- font-family: var(--font-family-base);
18
- font-weight: 400;
19
- line-height: 1.5;
20
- color: var(--text-default);
17
+ body#{config-flags.$parent-selector} {
18
+ font-family: var(--font-family-base);
19
+ font-weight: 400;
20
+ line-height: 1.5;
21
+ color: var(--text-default);
21
22
  }
22
23
 
23
24
  // Headings
24
- #{$parent-selector} h1,
25
- #{$parent-selector} h2,
26
- #{$parent-selector} h3,
27
- #{$parent-selector} h4,
28
- #{$parent-selector} h5,
29
- #{$parent-selector} h6 {
30
- margin-bottom: 0.5em;
31
- font-family: var(--font-family-base);
32
- font-weight: 700;
33
- line-height: 1.2;
25
+ #{config-flags.$parent-selector} h1,
26
+ #{config-flags.$parent-selector} h2,
27
+ #{config-flags.$parent-selector} h3,
28
+ #{config-flags.$parent-selector} h4,
29
+ #{config-flags.$parent-selector} h5,
30
+ #{config-flags.$parent-selector} h6 {
31
+ margin-bottom: 0.5em;
32
+ font-family: var(--font-family-base);
33
+ font-weight: 700;
34
+ line-height: 1.2;
34
35
  }
35
36
 
36
- #{$parent-selector} h1 {
37
- font-size: map.get($font-sizes, "4xl");
37
+ #{config-flags.$parent-selector} h1 {
38
+ font-size: map.get(config-typo.$font-sizes, "4xl");
38
39
  }
39
40
 
40
- #{$parent-selector} h2 {
41
- font-size: map.get($font-sizes, "3xl");
41
+ #{config-flags.$parent-selector} h2 {
42
+ font-size: map.get(config-typo.$font-sizes, "3xl");
42
43
  }
43
44
 
44
- #{$parent-selector} h3 {
45
- font-size: map.get($font-sizes, "2xl");
45
+ #{config-flags.$parent-selector} h3 {
46
+ font-size: map.get(config-typo.$font-sizes, "2xl");
46
47
  }
47
48
 
48
- #{$parent-selector} h4 {
49
- font-size: map.get($font-sizes, "xl");
49
+ #{config-flags.$parent-selector} h4 {
50
+ font-size: map.get(config-typo.$font-sizes, "xl");
50
51
  }
51
52
 
52
- #{$parent-selector} h5 {
53
- font-size: map.get($font-sizes, "lg");
53
+ #{config-flags.$parent-selector} h5 {
54
+ font-size: map.get(config-typo.$font-sizes, "lg");
54
55
  }
55
56
 
56
- #{$parent-selector} h6 {
57
- font-size: map.get($font-sizes, "base");
57
+ #{config-flags.$parent-selector} h6 {
58
+ font-size: map.get(config-typo.$font-sizes, "base");
58
59
  }
59
60
 
60
61
  // Paragraphs
61
- #{$parent-selector} p {
62
- margin-bottom: 1rem;
62
+ #{config-flags.$parent-selector} p {
63
+ margin-bottom: 1rem;
63
64
  }
64
65
 
65
66
  // Small text
66
- #{$parent-selector} small {
67
- font-size: map.get($font-sizes, "sm");
67
+ #{config-flags.$parent-selector} small {
68
+ font-size: map.get(config-typo.$font-sizes, "sm");
68
69
  }
69
70
 
70
71
  // Buttons
71
- #{$parent-selector} button {
72
- padding: 0.5rem 1rem;
73
- border: 0;
74
- border-radius: 0.25rem;
75
- font-family: var(--font-family-base);
76
- cursor: pointer;
77
- transition:
78
- background-color 0.2s ease-in-out,
79
- color 0.2s ease-in-out;
80
-
81
- &:focus {
82
- outline: none;
83
- }
84
-
85
- &:disabled {
86
- background-color: #e0e0e0; // Disabled button color
87
- color: #a0a0a0; // Disabled text color
88
- cursor: not-allowed;
89
- }
90
-
91
- // Default styling when no bg-* class is present
92
- &:not([class*="bg-"]) {
93
- background-color: var(--button-bg-color, #007bff); // Default button color
94
- color: var(--button-text-color, #fff);
95
-
96
- &:hover {
97
- background-color: var(--button-bg-color-hover, #0056b3);
72
+ #{config-flags.$parent-selector} button {
73
+ padding: 0.5rem 1rem;
74
+ border: 0;
75
+ border-radius: 0.25rem;
76
+ font-family: var(--font-family-base);
77
+ cursor: pointer;
78
+ transition:
79
+ background-color 0.2s ease-in-out,
80
+ color 0.2s ease-in-out;
81
+
82
+ &:focus {
83
+ outline: none;
84
+ }
85
+
86
+ &:disabled {
87
+ background-color: #e0e0e0; // Disabled button color
88
+ color: #a0a0a0; // Disabled text color
89
+ cursor: not-allowed;
90
+ }
91
+
92
+ // Default styling when no bg-* class is present
93
+ &:not([class*="bg-"]) {
94
+ background-color: var(--button-bg-color, #007bff); // Default button color
95
+ color: var(--button-text-color, #fff);
96
+
97
+ &:hover {
98
+ background-color: var(--button-bg-color-hover, #0056b3);
99
+ }
98
100
  }
99
- }
100
101
  }
101
102
 
102
103
  // Inputs
103
- #{$parent-selector} input[type="text"],
104
- #{$parent-selector} input[type="email"],
105
- #{$parent-selector} input[type="password"],
106
- #{$parent-selector} input[type="number"],
107
- #{$parent-selector} input[type="search"],
108
- #{$parent-selector} textarea {
109
- padding: 0.5rem;
110
- border: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
111
- border-radius: 0.25rem;
112
- width: 100%; // Full width
113
- font-family: var(--font-family-base);
114
- transition: border 0.2s ease-in-out;
115
-
116
- &:focus {
117
- border-color: var(--link-color);
118
- outline: none;
119
- }
104
+ #{config-flags.$parent-selector} input[type="text"],
105
+ #{config-flags.$parent-selector} input[type="email"],
106
+ #{config-flags.$parent-selector} input[type="password"],
107
+ #{config-flags.$parent-selector} input[type="number"],
108
+ #{config-flags.$parent-selector} input[type="search"],
109
+ #{config-flags.$parent-selector} textarea {
110
+ padding: 0.5rem;
111
+ border: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
112
+ border-radius: 0.25rem;
113
+ width: 100%; // Full width
114
+ font-family: var(--font-family-base);
115
+ transition: border 0.2s ease-in-out;
116
+
117
+ &:focus {
118
+ border-color: var(--link-color);
119
+ outline: none;
120
+ }
120
121
  }
121
122
 
122
123
  // Checkboxes and Radio Buttons
123
- #{$parent-selector} input[type="checkbox"],
124
- #{$parent-selector} input[type="radio"] {
125
- margin-right: 0.5rem; // Space between input and label
124
+ #{config-flags.$parent-selector} input[type="checkbox"],
125
+ #{config-flags.$parent-selector} input[type="radio"] {
126
+ margin-right: 0.5rem; // Space between input and label
126
127
  }
127
128
 
128
129
  // Selects
129
- #{$parent-selector} select {
130
- padding: 0.5rem;
131
- border: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
132
- border-radius: 0.25rem;
133
- width: 100%; // Full width
134
- font-family: var(--font-family-base);
135
- transition: border 0.2s ease-in-out;
136
-
137
- &:focus {
138
- border-color: var(--link-color);
139
- outline: none;
140
- }
130
+ #{config-flags.$parent-selector} select {
131
+ padding: 0.5rem;
132
+ border: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
133
+ border-radius: 0.25rem;
134
+ width: 100%; // Full width
135
+ font-family: var(--font-family-base);
136
+ transition: border 0.2s ease-in-out;
137
+
138
+ &:focus {
139
+ border-color: var(--link-color);
140
+ outline: none;
141
+ }
141
142
  }
142
143
 
143
144
  // Blockquotes
144
- #{$parent-selector} blockquote {
145
- margin: 1rem 0;
146
- padding: 0.5rem 1rem;
147
- border-left: var(--border-size, 4px) var(--border-style, solid) var(--border-base, var(--secondary));
148
- font-style: italic;
145
+ #{config-flags.$parent-selector} blockquote {
146
+ margin: 1rem 0;
147
+ padding: 0.5rem 1rem;
148
+ border-left: var(--border-size, 4px) var(--border-style, solid) var(--border-base, var(--secondary));
149
+ font-style: italic;
149
150
  }
150
151
 
151
152
  // Horizontal Rule
152
- #{$parent-selector} hr {
153
- border: none;
154
- border-top: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
155
- margin: 1rem 0;
153
+ #{config-flags.$parent-selector} hr {
154
+ border: none;
155
+ border-top: var(--border-size, 1px) var(--border-style, solid) var(--border-base, var(--secondary));
156
+ margin: 1rem 0;
156
157
  }
157
158
 
158
159
  // Images
159
- #{$parent-selector} img {
160
- max-width: 100%; // Responsive images
161
- height: auto;
160
+ #{config-flags.$parent-selector} img {
161
+ max-width: 100%; // Responsive images
162
+ height: auto;
162
163
  }
163
164
 
164
165
  // Figures and Captions
165
- #{$parent-selector} figure {
166
- margin: 1rem 0;
166
+ #{config-flags.$parent-selector} figure {
167
+ margin: 1rem 0;
167
168
  }
168
169
 
169
- #{$parent-selector} figcaption {
170
- font-size: 0.875rem; // Smaller font for captions
171
- color: var(--text-muted, #666); // Optional secondary text color
170
+ #{config-flags.$parent-selector} figcaption {
171
+ font-size: 0.875rem; // Smaller font for captions
172
+ color: var(--text-muted, #666); // Optional secondary text color
172
173
  }
173
174
 
174
175
  // Links
175
- #{$parent-selector} a {
176
- transition: color 0.2s ease-in-out;
176
+ #{config-flags.$parent-selector} a {
177
+ transition: color 0.2s ease-in-out;
177
178
 
178
- &:not([class*="text-"]) {
179
- // document: if no hover or normal text provided it will use the default link color
180
- color: var(--link-color);
179
+ &:not([class*="text-"]) {
180
+ // document: if no hover or normal text provided it will use the default link color
181
+ color: var(--link-color);
181
182
 
182
- &:hover {
183
- color: var(--link-hover-color);
183
+ &:hover {
184
+ color: var(--link-hover-color);
185
+ }
184
186
  }
185
- }
186
187
  }
187
188
 
188
189
  // Labels
189
- #{$parent-selector} label[for] {
190
- cursor: pointer;
190
+ #{config-flags.$parent-selector} label[for] {
191
+ cursor: pointer;
191
192
  }
192
193
 
193
194
  // todo: add to doc
194
- #{$parent-selector} .sr-only {
195
- position: absolute !important;
196
- width: 1px !important;
197
- height: 1px !important;
198
- padding: 0 !important;
199
- margin: -1px !important;
200
- overflow: hidden !important;
201
- clip: rect(0, 0, 0, 0) !important;
202
- white-space: nowrap !important;
203
- border: 0 !important;
204
- }
205
-
206
- #{$parent-selector} code {
207
- font-family: "Courier New", Courier, monospace;
208
- background-color: #f8f8f8;
209
- color: #d63384;
210
- padding: 2px 6px;
211
- border-radius: 3px;
212
- white-space: nowrap;
213
-
214
- @include media.dark-mode {
215
- background-color: #333;
216
- color: #f8f8f2;
217
- }
195
+ #{config-flags.$parent-selector} .sr-only {
196
+ position: absolute !important;
197
+ width: 1px !important;
198
+ height: 1px !important;
199
+ padding: 0 !important;
200
+ margin: -1px !important;
201
+ overflow: hidden !important;
202
+ clip: rect(0, 0, 0, 0) !important;
203
+ white-space: nowrap !important;
204
+ border: 0 !important;
205
+ }
206
+
207
+ #{config-flags.$parent-selector} code {
208
+ font-family: "Courier New", Courier, monospace;
209
+ background-color: #f8f8f8;
210
+ color: #d63384;
211
+ padding: 2px 6px;
212
+ border-radius: 3px;
213
+ white-space: nowrap;
214
+
215
+ @include tool-accessibility.dark-mode {
216
+ background-color: #333;
217
+ color: #f8f8f2;
218
+ }
218
219
  }
@@ -4,9 +4,7 @@
4
4
  ::after,
5
5
  ::backdrop,
6
6
  ::file-selector-button {
7
- box-sizing: border-box;
8
- margin: 0;
9
- padding: 0;
7
+ box-sizing: border-box;
10
8
  }
11
9
 
12
10
  // Remove default margin and padding
@@ -22,28 +20,28 @@ figure,
22
20
  blockquote,
23
21
  dl,
24
22
  dd {
25
- margin: 0;
26
- padding: 0;
23
+ margin: 0;
24
+ padding: 0;
27
25
  }
28
26
 
29
27
  // Prevent font size inflation
30
28
  html {
31
- text-size-adjust: none;
29
+ text-size-adjust: none;
32
30
  }
33
31
 
34
32
  // Set core root defaults
35
33
  html:focus-within {
36
- scroll-behavior: smooth;
34
+ scroll-behavior: smooth;
37
35
  }
38
36
 
39
37
  // Set core body defaults
40
38
  body {
41
- min-height: 100vh;
42
- min-height: 100dvh;
43
- text-rendering: optimizespeed;
44
- line-height: 1.5;
45
- -webkit-font-smoothing: antialiased;
46
- -moz-osx-font-smoothing: grayscale;
39
+ min-height: 100vh;
40
+ min-height: 100dvh;
41
+ text-rendering: optimizespeed;
42
+ line-height: 1.5;
43
+ -webkit-font-smoothing: antialiased;
44
+ -moz-osx-font-smoothing: grayscale;
47
45
  }
48
46
 
49
47
  // Set shorter line heights on headings and interactive elements
@@ -54,7 +52,7 @@ h4,
54
52
  button,
55
53
  input,
56
54
  label {
57
- line-height: 1.1;
55
+ line-height: 1.1;
58
56
  }
59
57
 
60
58
  // Make images easier to work with
@@ -67,16 +65,16 @@ audio,
67
65
  iframe,
68
66
  embed,
69
67
  object {
70
- display: block;
71
- vertical-align: middle;
68
+ display: block;
69
+ vertical-align: middle;
72
70
  }
73
71
 
74
72
  img,
75
73
  picture,
76
74
  video,
77
75
  svg {
78
- max-width: 100%;
79
- height: auto;
76
+ max-width: 100%;
77
+ height: auto;
80
78
  }
81
79
 
82
80
  // Inherit fonts for inputs and buttons
@@ -84,57 +82,51 @@ input,
84
82
  button,
85
83
  textarea,
86
84
  select {
87
- font: inherit;
88
- cursor: pointer;
85
+ font: inherit;
86
+ cursor: pointer;
89
87
 
90
- &:disabled {
91
- cursor: not-allowed;
92
- }
88
+ &:disabled {
89
+ cursor: not-allowed;
90
+ }
93
91
  }
94
92
 
95
93
  // Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed
96
94
  ul[role="list"],
97
95
  ol[role="list"] {
98
- list-style: none;
99
- margin: 0;
100
- padding: 0;
101
-
102
- // Modern properties
103
- padding-inline-start: 0; // Replaces padding-left
104
- margin-block: 0; // Replaces margin-top/bottom
96
+ list-style: none;
97
+ padding-inline-start: 0; // Replaces padding-left
98
+ margin-block: 0; // Replaces margin-top/bottom
105
99
 
106
- & > li {
107
- margin: 0;
108
- padding: 0;
109
- margin-block: 0;
110
- }
100
+ & > li {
101
+ margin-block: 0;
102
+ }
111
103
  }
112
104
 
113
105
  // Remove underline from links
114
106
  a {
115
- text-decoration-skip-ink: auto;
116
- text-decoration: none;
117
- color: inherit;
107
+ text-decoration-skip-ink: auto;
108
+ text-decoration: none;
109
+ color: inherit;
118
110
  }
119
111
 
120
- // Make sure textareas without a rows attribute are not tiny
112
+ // Make sure text areas without a rows attribute are not tiny
121
113
  textarea:not([rows]) {
122
- min-height: 10em;
114
+ min-height: 10em;
123
115
  }
124
116
 
125
117
  // Anything that has been anchored to should have extra scroll margin
126
118
  :target {
127
- scroll-margin-block: 5ex;
119
+ scroll-margin-block: 5ex;
128
120
  }
129
121
 
130
122
  // Remove all animations and transitions for people that prefer not to see them
131
123
  @media (prefers-reduced-motion: reduce) {
132
- *,
133
- *::before,
134
- *::after {
135
- animation-duration: 0.01ms !important;
136
- animation-iteration-count: 1 !important;
137
- transition-duration: 0.01ms !important;
138
- scroll-behavior: auto !important;
139
- }
124
+ *,
125
+ *::before,
126
+ *::after {
127
+ animation-duration: 0.01ms !important;
128
+ animation-iteration-count: 1 !important;
129
+ transition-duration: 0.01ms !important;
130
+ scroll-behavior: auto !important;
131
+ }
140
132
  }
@@ -1,3 +1,27 @@
1
+ /*!
2
+ * NuvoUI SCSS Framework
3
+ * MIT License
4
+ *
5
+ * Copyright (c) 2025 NuvoUI
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ * of this software and associated documentation files (the "Software"), to deal
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
1
25
  @use "./index.scss" as NuvoUI with (
2
- $generate-utility-classes: true
26
+ $generate-utility-classes: true
3
27
  );