@nuvoui/core 1.1.8 → 1.2.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 (39) hide show
  1. package/README.md +90 -35
  2. package/dist/nuvoui.css +28531 -0
  3. package/dist/nuvoui.css.map +1 -0
  4. package/dist/nuvoui.min.css +2 -1
  5. package/dist/nuvoui.min.css.map +1 -0
  6. package/package.json +48 -27
  7. package/src/styles/abstracts/_config.scss +157 -0
  8. package/src/styles/abstracts/_functions.scss +81 -0
  9. package/src/styles/abstracts/_index.scss +2 -0
  10. package/src/styles/base/_base.scss +2 -2
  11. package/src/styles/base/_index.scss +2 -0
  12. package/src/styles/base/_reset.scss +8 -6
  13. package/src/styles/index.scss +11 -30
  14. package/src/styles/layouts/_container.scss +7 -23
  15. package/src/styles/layouts/_flex.scss +116 -113
  16. package/src/styles/layouts/_grid.scss +70 -100
  17. package/src/styles/layouts/_index.scss +3 -0
  18. package/src/styles/mixins-map.scss +1 -1515
  19. package/src/styles/themes/_index.scss +1 -0
  20. package/src/styles/themes/_theme.scss +175 -55
  21. package/src/styles/utilities/_alignment.scss +9 -7
  22. package/src/styles/utilities/_animations.scss +65 -61
  23. package/src/styles/utilities/_borders.scss +283 -18
  24. package/src/styles/utilities/_colors.scss +68 -49
  25. package/src/styles/utilities/_container-queries.scss +19 -18
  26. package/src/styles/utilities/_display.scss +59 -57
  27. package/src/styles/utilities/_helpers.scss +110 -108
  28. package/src/styles/utilities/_index.scss +19 -0
  29. package/src/styles/utilities/_media-queries.scss +68 -15
  30. package/src/styles/utilities/_opacity.scss +51 -27
  31. package/src/styles/utilities/_position.scss +38 -37
  32. package/src/styles/utilities/_shadows.scss +195 -137
  33. package/src/styles/utilities/_sizing.scss +74 -71
  34. package/src/styles/utilities/_spacing.scss +117 -99
  35. package/src/styles/utilities/_tooltips.scss +153 -105
  36. package/src/styles/utilities/_transitions.scss +77 -73
  37. package/src/styles/utilities/_typography.scss +23 -26
  38. package/src/styles/utilities/_functions.scss +0 -84
  39. package/src/styles/utilities/_variables.scss +0 -126
@@ -1,5 +1,5 @@
1
1
  // _transitions.scss
2
- @use './variables' as *;
2
+ @use '../abstracts' as *;
3
3
 
4
4
  /**
5
5
  * Transition Utilities
@@ -42,18 +42,13 @@
42
42
  transition-delay: $time;
43
43
  }
44
44
 
45
- // Base transition
46
- .transition {
47
- @include transition;
48
- }
49
-
50
- // Property-specific transitions
51
- .transition-none { @include transition-none; }
52
- .transition-all { @include transition-all; }
53
- .transition-colors { @include transition-colors; }
54
- .transition-opacity { @include transition-opacity; }
55
- .transition-shadow { @include transition-shadow; }
56
- .transition-transform { @include transition-transform; }
45
+ // Timing functions
46
+ $timing-functions: (
47
+ 'linear': linear,
48
+ 'in': cubic-bezier(0.4, 0, 1, 1),
49
+ 'out': cubic-bezier(0, 0, 0.2, 1),
50
+ 'in-out': cubic-bezier(0.4, 0, 0.2, 1),
51
+ );
57
52
 
58
53
  // Durations
59
54
  $durations: (
@@ -68,31 +63,6 @@ $durations: (
68
63
  '1000': 1000ms,
69
64
  );
70
65
 
71
- @each $name, $value in $durations {
72
- .duration-#{$name} {
73
- @include duration($value);
74
- }
75
- }
76
-
77
- // Timing functions
78
- $timing-functions: (
79
- 'linear': linear,
80
- 'in': cubic-bezier(0.4, 0, 1, 1),
81
- 'out': cubic-bezier(0, 0, 0.2, 1),
82
- 'in-out': cubic-bezier(0.4, 0, 0.2, 1),
83
- );
84
-
85
- @each $name, $value in $timing-functions {
86
- .ease-#{$name} {
87
- transition-timing-function: $value;
88
- }
89
- }
90
-
91
- // Specific timing function classes
92
- .ease-linear { @include ease-linear; }
93
- .ease-in { @include ease-in; }
94
- .ease-out { @include ease-out; }
95
- .ease-in-out { @include ease-in-out; }
96
66
 
97
67
  // Delays
98
68
  $delays: (
@@ -107,45 +77,79 @@ $delays: (
107
77
  '1000': 1000ms,
108
78
  );
109
79
 
110
- @each $name, $value in $delays {
111
- .delay-#{$name} {
112
- @include delay($value);
80
+
81
+ @if $generate-utility-classes {
82
+ // Base transition
83
+ .transition {
84
+ @include transition;
113
85
  }
114
- }
115
86
 
116
- // Responsive variants
117
- @each $breakpoint, $width in $breakpoints {
118
- @media (min-width: #{$width}) {
119
- // Base transition
120
- .transition\@#{$breakpoint} {
121
- @include transition;
87
+ // Property-specific transitions
88
+ .transition-none { @include transition-none; }
89
+ .transition-all { @include transition-all; }
90
+ .transition-colors { @include transition-colors; }
91
+ .transition-opacity { @include transition-opacity; }
92
+ .transition-shadow { @include transition-shadow; }
93
+ .transition-transform { @include transition-transform; }
94
+
95
+ @each $name, $value in $durations {
96
+ .duration-#{$name} {
97
+ @include duration($value);
122
98
  }
123
-
124
- // Property-specific transitions
125
- .transition-none\@#{$breakpoint} { @include transition-none; }
126
- .transition-all\@#{$breakpoint} { @include transition-all; }
127
- .transition-colors\@#{$breakpoint} { @include transition-colors; }
128
- .transition-opacity\@#{$breakpoint} { @include transition-opacity; }
129
- .transition-shadow\@#{$breakpoint} { @include transition-shadow; }
130
- .transition-transform\@#{$breakpoint} { @include transition-transform; }
131
-
132
- // Duration responsive variants
133
- @each $name, $value in $durations {
134
- .duration-#{$name}\@#{$breakpoint} {
135
- @include duration($value);
136
- }
99
+ }
100
+
101
+ @each $name, $value in $timing-functions {
102
+ .ease-#{$name} {
103
+ transition-timing-function: $value;
104
+ }
105
+ }
106
+
107
+ // Specific timing function classes
108
+ .ease-linear { @include ease-linear; }
109
+ .ease-in { @include ease-in; }
110
+ .ease-out { @include ease-out; }
111
+ .ease-in-out { @include ease-in-out; }
112
+
113
+ @each $name, $value in $delays {
114
+ .delay-#{$name} {
115
+ @include delay($value);
137
116
  }
138
-
139
- // Timing function responsive variants
140
- .ease-linear\@#{$breakpoint} { @include ease-linear; }
141
- .ease-in\@#{$breakpoint} { @include ease-in; }
142
- .ease-out\@#{$breakpoint} { @include ease-out; }
143
- .ease-in-out\@#{$breakpoint} { @include ease-in-out; }
144
-
145
- // Delay responsive variants
146
- @each $name, $value in $delays {
147
- .delay-#{$name}\@#{$breakpoint} {
148
- @include delay($value);
117
+ }
118
+
119
+ // Responsive variants
120
+ @each $breakpoint, $width in $breakpoints {
121
+ @media (min-width: #{$width}) {
122
+ // Base transition
123
+ .transition\@#{$breakpoint} {
124
+ @include transition;
125
+ }
126
+
127
+ // Property-specific transitions
128
+ .transition-none\@#{$breakpoint} { @include transition-none; }
129
+ .transition-all\@#{$breakpoint} { @include transition-all; }
130
+ .transition-colors\@#{$breakpoint} { @include transition-colors; }
131
+ .transition-opacity\@#{$breakpoint} { @include transition-opacity; }
132
+ .transition-shadow\@#{$breakpoint} { @include transition-shadow; }
133
+ .transition-transform\@#{$breakpoint} { @include transition-transform; }
134
+
135
+ // Duration responsive variants
136
+ @each $name, $value in $durations {
137
+ .duration-#{$name}\@#{$breakpoint} {
138
+ @include duration($value);
139
+ }
140
+ }
141
+
142
+ // Timing function responsive variants
143
+ .ease-linear\@#{$breakpoint} { @include ease-linear; }
144
+ .ease-in\@#{$breakpoint} { @include ease-in; }
145
+ .ease-out\@#{$breakpoint} { @include ease-out; }
146
+ .ease-in-out\@#{$breakpoint} { @include ease-in-out; }
147
+
148
+ // Delay responsive variants
149
+ @each $name, $value in $delays {
150
+ .delay-#{$name}\@#{$breakpoint} {
151
+ @include delay($value);
152
+ }
149
153
  }
150
154
  }
151
155
  }
@@ -4,7 +4,7 @@
4
4
  @use 'sass:map';
5
5
 
6
6
  // Import variables
7
- @use '../utilities/variables' as VAR;
7
+ @use '../abstracts' as VAR;
8
8
 
9
9
 
10
10
  /**
@@ -29,12 +29,12 @@
29
29
  /**
30
30
  * Text size utility
31
31
  * @param {string} $size - The size of the text.
32
- */
32
+ */
33
33
  @mixin text-size($size) {
34
34
  @if map.has-key(VAR.$font-sizes, $size) {
35
35
  font-size: map.get(VAR.$font-sizes, $size);
36
36
  } @else {
37
- @warn "Font size '#{$size}' not found in $font-sizes map.";
37
+ font-size: $size;
38
38
  }
39
39
 
40
40
  }
@@ -102,10 +102,6 @@
102
102
  @mixin whitespace-pre-wrap { white-space: pre-wrap; }
103
103
 
104
104
 
105
-
106
-
107
-
108
-
109
105
  @mixin responsive-typography($breakpoint: null) {
110
106
  $suffix: if($breakpoint, "\\@#{$breakpoint}", "");
111
107
 
@@ -157,25 +153,26 @@
157
153
  .truncate-3#{$suffix} { @include truncate-lines(3); }
158
154
  .truncate-4#{$suffix} { @include truncate-lines(4); }
159
155
  .truncate-5#{$suffix} { @include truncate-lines(5); }
160
-
161
156
  }
162
157
 
163
- @include responsive-typography();
164
- .break-normal { @include break-normal; }
165
- .break-words { @include break-words; }
166
- .break-all { @include break-all; }
167
- .whitespace-normal { @include whitespace-normal; }
168
- .whitespace-nowrap { @include whitespace-nowrap; }
169
- .whitespace-pre { @include whitespace-pre; }
170
- .whitespace-pre-line { @include whitespace-pre-line; }
171
- .whitespace-pre-wrap { @include whitespace-pre-wrap; }
172
-
173
- @each $breakpoint, $width in VAR.$breakpoints {
174
- @media (min-width: #{$width}) {
175
- @each $size, $val in VAR.$font-sizes {
176
- .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
177
- }
178
- @include responsive-typography($breakpoint);
179
- }
180
- }
158
+ @if VAR.$generate-utility-classes {
159
+ @include responsive-typography;
160
+ .break-normal { @include break-normal; }
161
+ .break-words { @include break-words; }
162
+ .break-all { @include break-all; }
163
+ .whitespace-normal { @include whitespace-normal; }
164
+ .whitespace-nowrap { @include whitespace-nowrap; }
165
+ .whitespace-pre { @include whitespace-pre; }
166
+ .whitespace-pre-line { @include whitespace-pre-line; }
167
+ .whitespace-pre-wrap { @include whitespace-pre-wrap; }
168
+
169
+ @each $breakpoint, $width in VAR.$breakpoints {
170
+ @media (min-width: #{$width}) {
171
+ @each $size, $val in VAR.$font-sizes {
172
+ .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
173
+ }
174
+ @include responsive-typography($breakpoint);
175
+ }
176
+ }
181
177
 
178
+ }
@@ -1,84 +0,0 @@
1
- @use 'sass:string';
2
- @use 'sass:math';
3
- @use 'sass:map';
4
- @use 'sass:list';
5
- @use 'sass:meta';
6
- @use 'variables' as *;
7
-
8
- @function str-replace($string, $search, $replace: " ") {
9
- $index: string.index($string, $search);
10
- @if $index {
11
- @return string.slice($string, 1, $index - 1)
12
- + $replace
13
- + str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
14
- }
15
- @return $string;
16
- }
17
-
18
- @function get-breakpoint-value($bp) {
19
- @if map.has-key($breakpoints, $bp) {
20
- @return map.get($breakpoints, $bp);
21
- } @else if meta.type-of($bp) == number {
22
- @return $bp;
23
- } @else {
24
- @warn 'Invalid breakpoint: #{$bp}';
25
- @return null;
26
- }
27
- }
28
-
29
- @function strip-unit($value) {
30
- @return math.div($value, ($value * 0 + 1));
31
- }
32
-
33
- @function safe-unit-name($unit) {
34
-
35
- @if $unit == '%' {
36
- @return 'per';
37
- } @else if $unit == '.' {
38
- @return 'dot';
39
- } @else {
40
- @return $unit;
41
- }
42
- }
43
-
44
- @function get-unit($value) {
45
- $value-str: #{$value};
46
-
47
- // Relative length units
48
- @if string.index($value-str, 'em') {
49
- @return 'em';
50
- } @else if string.index($value-str, 'rem') {
51
- @return 'rem';
52
- } @else if string.index($value-str, '%') {
53
- @return '%';
54
- }
55
-
56
- // Viewport units
57
- @else if string.index($value-str, 'vw') {
58
- @return 'vw';
59
- } @else if string.index($value-str, 'vh') {
60
- @return 'vh';
61
- } @else if string.index($value-str, 'vmin') {
62
- @return 'vmin';
63
- } @else if string.index($value-str, 'vmax') {
64
- @return 'vmax';
65
- }
66
-
67
- // Absolute length units
68
- @else if string.index($value-str, 'px') {
69
- @return 'px';
70
- } @else if string.index($value-str, 'cm') {
71
- @return 'cm';
72
- } @else if string.index($value-str, 'mm') {
73
- @return 'mm';
74
- } @else if string.index($value-str, 'in') {
75
- @return 'in';
76
- } @else if string.index($value-str, 'pt') {
77
- @return 'pt';
78
- } @else if string.index($value-str, 'pc') {
79
- @return 'pc';
80
- }
81
-
82
- // Return empty string if no unit found
83
- @return '';
84
- }
@@ -1,126 +0,0 @@
1
- @use 'sass:map';
2
- @use 'sass:math';
3
-
4
- $base-size: 16;
5
- @function rem($px) {
6
- @if $px == 0 {
7
- @return 0;
8
- }
9
-
10
- // Strip units if $px has any
11
- $value: if(math.unit($px) == '', $px, math.div($px, math.unit($px)));
12
-
13
- @return math.div($value, $base-size) * 1rem;
14
- }
15
-
16
- // Global variables that might be used across different modules
17
- $enable-debuger: false !default;
18
- $enable-dark-mode: true !default;
19
- $enable-rtl: true !default;;
20
- $enable-reduced-motion: true !default;
21
- $column-count: 12 !default;
22
-
23
- $default-container-name: nuvoui-container !default;
24
- $nuvoui-container-queries: false !default;
25
-
26
- $primary: #007bff !default;
27
- $secondary: #6c757d !default;
28
- $success: #28a745 !default;
29
- $danger: #dc3545 !default;
30
- $warning: #ffc107 !default;
31
- $info: #17a2b8 !default;
32
-
33
- $color-primitives: (
34
- 'gray': #6b7280,
35
- 'red': #ef4444,
36
- 'blue': #3b82f6,
37
- 'green': #22c55e,
38
- 'yellow': #eab308,
39
- 'purple': #a855f7,
40
- 'pink': #ec4899
41
- ) !default;
42
-
43
- $theme-tokens: (
44
- 'background',
45
- 'foreground',
46
- 'surface',
47
- 'border',
48
- 'text-primary',
49
- 'text-secondary'
50
- ) !default;
51
-
52
- // Default theme config (can be overridden)
53
- $light-theme: (
54
- 'background': #fff,
55
- 'foreground': #000,
56
- 'surface': #fff,
57
- 'border': #e5e7eb,
58
- 'text-primary': #000,
59
- 'text-secondary': #4b5563
60
- ) !default;
61
-
62
- $dark-theme: (
63
- 'background': #000,
64
- 'foreground': #fff,
65
- 'surface': #1a1a1a,
66
- 'border': #2e2e2e,
67
- 'text-primary': #fff,
68
- 'text-secondary': #a3a3a3
69
- ) !default;
70
-
71
- // Breakpoints
72
- $breakpoints: (
73
- 'xs': 480px,
74
- 'sm': 640px,
75
- 'md': 768px,
76
- 'lg': 1024px,
77
- 'xl': 1280px,
78
- '2xl': 1536px,
79
- ) !default;
80
-
81
- $grid-item-sizes: (
82
- 'xs': 200px,
83
- 'sm': 250px,
84
- 'md': 300px,
85
- 'lg': 350px,
86
- 'xl': 400px
87
- ) !default;
88
-
89
- // _variables.scss
90
- $font-sizes: (
91
- 'xs': 0.75rem, // 12px
92
- 'sm': 0.875rem, // 14px
93
- 'md': 1rem, // 16px
94
- 'lg': 1.25rem, // 20px
95
- 'xl': 1.5rem, // 24px
96
- '2xl': 1.75rem, // 28px
97
- '3xl': 2rem, // 32px
98
- '4xl': 2.5rem // 40px
99
- ) !default;
100
-
101
- @debug rem(4);
102
- // Updated spacing map
103
- $spacings: (
104
- 0: 0,
105
- 1: rem(4), // 0.25rem
106
- 2: rem(8), // 0.5rem
107
- 3: rem(12), // 0.75rem
108
- 4: rem(16), // 1rem
109
- 5: rem(20), // 1.25rem
110
- 6: rem(24), // 1.5rem
111
- 8: rem(32), // 2rem
112
- 10: rem(40), // 2.5rem
113
- 12: rem(48), // 3rem
114
- 16: rem(64), // 4rem
115
- 20: rem(80), // 5rem
116
- 24: rem(96), // 6rem
117
- 32: rem(128), // 8rem
118
- 40: rem(160), // 10rem
119
- 48: rem(192), // 12rem
120
- 56: rem(224), // 14rem
121
- 64: rem(256) // 16rem
122
- );
123
-
124
- $percentages: (
125
- 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
126
- ) !default;