@nuvoui/core 1.2.4 → 1.2.6

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 (41) hide show
  1. package/README.md +2 -2
  2. package/dist/nuvoui.css +27685 -22739
  3. package/dist/nuvoui.css.map +1 -1
  4. package/dist/nuvoui.min.css +1 -1
  5. package/dist/nuvoui.min.css.map +1 -1
  6. package/package.json +7 -8
  7. package/src/styles/abstracts/_config.scss +87 -34
  8. package/src/styles/abstracts/_functions.scss +70 -37
  9. package/src/styles/base/_base.scss +79 -59
  10. package/src/styles/base/_reset.scss +11 -8
  11. package/src/styles/index.scss +32 -17
  12. package/src/styles/layouts/_container.scss +1 -2
  13. package/src/styles/layouts/_flex.scss +442 -154
  14. package/src/styles/layouts/_grid.scss +145 -75
  15. package/src/styles/mixins-map.scss +1085 -1
  16. package/src/styles/themes/_theme.scss +95 -106
  17. package/src/styles/utilities/_alignment.scss +40 -13
  18. package/src/styles/utilities/_animations.scss +361 -92
  19. package/src/styles/utilities/_backdrop-filters.scss +297 -0
  20. package/src/styles/utilities/_borders.scss +360 -159
  21. package/src/styles/utilities/_colors.scss +24 -34
  22. package/src/styles/utilities/_container-queries.scss +7 -7
  23. package/src/styles/utilities/_cursor.scss +10 -17
  24. package/src/styles/utilities/_display.scss +234 -85
  25. package/src/styles/utilities/_helpers.scss +5 -5
  26. package/src/styles/utilities/_media-queries.scss +24 -27
  27. package/src/styles/utilities/_opacity.scss +15 -31
  28. package/src/styles/utilities/_position.scss +129 -66
  29. package/src/styles/utilities/_shadows.scss +23 -29
  30. package/src/styles/utilities/_sizing.scss +270 -92
  31. package/src/styles/utilities/_spacing.scss +317 -169
  32. package/src/styles/utilities/_tooltips.scss +36 -29
  33. package/src/styles/utilities/_transforms.scss +243 -154
  34. package/src/styles/utilities/_transitions.scss +129 -75
  35. package/src/styles/utilities/_typography.scss +341 -127
  36. package/src/styles/utilities/_z-index.scss +144 -0
  37. package/src/styles/abstracts/_index.scss +0 -1
  38. package/src/styles/base/_index.scss +0 -2
  39. package/src/styles/layouts/_index.scss +0 -3
  40. package/src/styles/themes/_index.scss +0 -1
  41. package/src/styles/utilities/_index.scss +0 -20
@@ -2,10 +2,11 @@
2
2
  @use "sass:color";
3
3
  @use "sass:map";
4
4
  @use "../utilities/colors" as COL;
5
- @use "../abstracts" as *;
5
+ @use "../abstracts/config" as VAR;
6
6
 
7
- @if $generate-utility-classes {
8
- :root {
7
+ @if VAR.$generate-utility-classes {
8
+ :root,
9
+ #{VAR.$parent-selector} [data-theme="light"] {
9
10
  // Theme color CSS variables
10
11
  @each $color-name, $scale in COL.$colors {
11
12
  --#{$color-name}: #{color.adjust(map.get($scale, 500), $alpha: 1)};
@@ -22,54 +23,53 @@
22
23
  }
23
24
  }
24
25
 
26
+ @each $token in VAR.$theme-tokens {
27
+ --#{$token}: #{map.get(VAR.$light-theme, $token)};
28
+ }
29
+
30
+ --button-text-color: #{map.get(VAR.$dark-theme, "text-default")};
31
+ --inverted-text-color: #{map.get(VAR.$dark-theme, "text-default")};
32
+
25
33
  // Light theme variables
26
- --background: #{map.get($light-theme, "background")};
27
- --foreground: #{map.get($light-theme, "foreground")};
28
- --surface: #{map.get($light-theme, "surface")};
29
- --border: var(--gray-600);
30
- --text-primary: var(--gray-900);
31
- --text-secondary: var(--gray-600);
32
34
  --button-bg-color: var(--primary);
33
35
  --button-bg-color-hover: var(--primary-600);
34
- --button-text-color: var(--gray-100);
35
36
  --link-color: var(--primary);
36
37
  --link-hover-color: var(--primary-600);
37
- --inverted-text-color: var(--gray-100);
38
38
 
39
- // Scrollbar styling
40
- &::-webkit-scrollbar {
41
- width: 12px;
42
- }
39
+ // #{VAR.$parent-selector} {
40
+ // // Scrollbar styling
41
+ // &::-webkit-scrollbar {
42
+ // width: 12px;
43
+ // }
43
44
 
44
- &::-webkit-scrollbar-track {
45
- background: var(--background);
46
- }
45
+ // &::-webkit-scrollbar-track {
46
+ // background: var(--background);
47
+ // }
47
48
 
48
- &::-webkit-scrollbar-thumb {
49
- background-color: #888;
50
- border-radius: 6px;
51
- border: 3px solid var(--background);
52
- }
49
+ // &::-webkit-scrollbar-thumb {
50
+ // background-color: #888;
51
+ // border-radius: 6px;
52
+ // border: 3px solid var(--background);
53
+ // }
53
54
 
54
- scrollbar-width: thin;
55
- scrollbar-color: #888 var(--background);
55
+ // scrollbar-width: thin;
56
+ // scrollbar-color: #888 var(--background);
57
+ // }
56
58
  }
57
-
58
- @if $enable-dark-mode {
59
+
60
+ @if VAR.$enable-dark-mode {
59
61
  // Dark theme settings
60
62
  [data-theme="dark"] {
61
- --background: #{map.get($dark-theme, "background")};
62
- --foreground: #{map.get($dark-theme, "foreground")};
63
- --surface: #{map.get($dark-theme, "surface")};
64
- --border: var(--gray-400);
65
- --text-primary: var(--gray-100);
66
- --text-secondary: var(--gray-400);
63
+ @each $token in VAR.$theme-tokens {
64
+ --#{$token}: #{map.get(VAR.$dark-theme, $token)};
65
+ }
66
+
67
+ --button-text-color: #{map.get(VAR.$light-theme, "text-default")};
68
+ --inverted-text-color: #{map.get(VAR.$light-theme, "text-default")};
67
69
  --button-bg-color: var(--primary);
68
70
  --button-bg-color-hover: var(--primary-400);
69
- --button-text-color: var(--gray-200);
70
71
  --link-color: var(--primary);
71
72
  --link-hover-color: var(--primary-400);
72
- --inverted-text-color: var(--gray-900);
73
73
 
74
74
  &::-webkit-scrollbar-track {
75
75
  background: var(--background);
@@ -94,158 +94,147 @@
94
94
  @each $shade, $value in $scale {
95
95
  // Automatic text contrast for backgrounds
96
96
  // todo: documentaton may add karo issay
97
- .text-on-#{$color-name}-#{$shade} {
97
+ #{VAR.$parent-selector} .text-on-#{$color-name}-#{$shade} {
98
98
  color: COL.find-text-color($value);
99
99
  }
100
100
 
101
- .text-#{$color-name}-#{$shade},
102
- .hover\:text--#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
103
- .group:hover .group-hover\:text--#{$color-name}-#{$shade} {
101
+ #{VAR.$parent-selector} .text-#{$color-name}-#{$shade},
102
+ #{VAR.$parent-selector} .hover\:text-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
103
+ #{VAR.$parent-selector} .group:hover .group-hover\:text-#{$color-name}-#{$shade} {
104
104
  color: var(--#{$color-name}-#{$shade});
105
105
  }
106
106
 
107
- .bg-#{$color-name}-#{$shade},
108
- .hover\:bg-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
109
- .group:hover .group-hover\:bg-#{$color-name}-#{$shade} {
107
+ #{VAR.$parent-selector} .bg-#{$color-name}-#{$shade},
108
+ #{VAR.$parent-selector} .hover\:bg-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
109
+ #{VAR.$parent-selector} .group:hover .group-hover\:bg-#{$color-name}-#{$shade} {
110
110
  background-color: var(--#{$color-name}-#{$shade});
111
111
  }
112
112
 
113
- .border-#{$color-name}-#{$shade},
114
- .hover\:border-#{$color-name}-#{$shade}:hover,
115
- .group:hover .group-hover\:border-#{$color-name}-#{$shade} {
113
+ #{VAR.$parent-selector} .border-#{$color-name}-#{$shade},
114
+ #{VAR.$parent-selector} .hover\:border-#{$color-name}-#{$shade}:hover,
115
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name}-#{$shade} {
116
116
  border-color: var(--#{$color-name}-#{$shade});
117
117
  }
118
118
  }
119
119
 
120
120
  // Base color classes
121
- .text-#{$color-name},
122
- .hover\:text--#{$color-name}:hover, // todo: improve these loops to save time
123
- .group:hover .group-hover\:text--#{$color-name} {
121
+ #{VAR.$parent-selector} .text-#{$color-name},
122
+ #{VAR.$parent-selector} .hover\:text-#{$color-name}:hover, // todo: improve these loops to save time
123
+ #{VAR.$parent-selector} .group:hover .group-hover\:text-#{$color-name} {
124
124
  color: var(--#{$color-name});
125
125
  }
126
126
 
127
- .bg-#{$color-name},
128
- .hover\:bg-#{$color-name}:hover, // todo: improve these loops to save time
129
- .group:hover .group-hover\:bg-#{$color-name} {
127
+ #{VAR.$parent-selector} .bg-#{$color-name},
128
+ #{VAR.$parent-selector} .hover\:bg-#{$color-name}:hover, // todo: improve these loops to save time
129
+ #{VAR.$parent-selector} .group:hover .group-hover\:bg-#{$color-name} {
130
130
  background-color: var(--#{$color-name});
131
131
  }
132
132
 
133
- .border-#{$color-name},
134
- .hover\:border-#{$color-name}:hover,
135
- .group:hover .group-hover\:border-#{$color-name} {
133
+ #{VAR.$parent-selector} .border-#{$color-name},
134
+ #{VAR.$parent-selector} .hover\:border-#{$color-name}:hover,
135
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name} {
136
136
  border-color: var(--#{$color-name});
137
137
  }
138
138
  }
139
139
 
140
140
  // Primitive color utilities
141
- // green, purple, pink etc.
141
+ // green, purple, pink etc.
142
142
  @each $color-name, $scale in COL.$colors-primitives {
143
143
  @each $shade, $value in $scale {
144
- .text-on-#{$color-name}-#{$shade} {
144
+ #{VAR.$parent-selector} .text-on-#{$color-name}-#{$shade} {
145
145
  color: COL.find-text-color($value);
146
146
  }
147
147
 
148
- .text-#{$color-name}-#{$shade},
149
- .hover\:text--#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
150
- .group:hover .group-hover\:text--#{$color-name}-#{$shade} {
148
+ #{VAR.$parent-selector} .text-#{$color-name}-#{$shade},
149
+ #{VAR.$parent-selector} .hover\:text-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
150
+ #{VAR.$parent-selector} .group:hover .group-hover\:text-#{$color-name}-#{$shade} {
151
151
  color: var(--#{$color-name}-#{$shade});
152
152
  }
153
153
 
154
- .bg-#{$color-name}-#{$shade},
155
- .hover\:bg-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
156
- .group:hover .group-hover\:bg-#{$color-name}-#{$shade} {
154
+ #{VAR.$parent-selector} .bg-#{$color-name}-#{$shade},
155
+ #{VAR.$parent-selector} .hover\:bg-#{$color-name}-#{$shade}:hover, // todo: improve these loops to save time
156
+ #{VAR.$parent-selector} .group:hover .group-hover\:bg-#{$color-name}-#{$shade} {
157
157
  background-color: var(--#{$color-name}-#{$shade});
158
158
  }
159
159
 
160
- .border-#{$color-name}-#{$shade},
161
- .hover\:border-#{$color-name}-#{$shade}:hover,
162
- .group:hover .group-hover\:border-#{$color-name}-#{$shade} {
160
+ #{VAR.$parent-selector} .border-#{$color-name}-#{$shade},
161
+ #{VAR.$parent-selector} .hover\:border-#{$color-name}-#{$shade}:hover,
162
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name}-#{$shade} {
163
163
  border-color: var(--#{$color-name}-#{$shade});
164
164
  }
165
165
  }
166
166
 
167
167
  // Base color classes
168
- .text-#{$color-name},
169
- .hover\:text--#{$color-name}:hover, // todo: improve these loops to save time
170
- .group:hover .group-hover\:text--#{$color-name} {
168
+ #{VAR.$parent-selector} .text-#{$color-name},
169
+ #{VAR.$parent-selector} .hover\:text-#{$color-name}:hover, // todo: improve these loops to save time
170
+ #{VAR.$parent-selector} .group:hover .group-hover\:text-#{$color-name} {
171
171
  color: var(--#{$color-name});
172
172
  }
173
173
 
174
- .bg-#{$color-name},
175
- .hover\:bg-#{$color-name}:hover, // todo: improve these loops to save time
176
- .group:hover .group-hover\:bg-#{$color-name} {
174
+ #{VAR.$parent-selector} .bg-#{$color-name},
175
+ #{VAR.$parent-selector} .hover\:bg-#{$color-name}:hover, // todo: improve these loops to save time
176
+ #{VAR.$parent-selector} .group:hover .group-hover\:bg-#{$color-name} {
177
177
  background-color: var(--#{$color-name});
178
178
  }
179
179
 
180
- .border-#{$color-name},
181
- .hover\:border-#{$color-name}:hover,
182
- .group:hover .group-hover\:border-#{$color-name} {
180
+ #{VAR.$parent-selector} .border-#{$color-name},
181
+ #{VAR.$parent-selector} .hover\:border-#{$color-name}:hover,
182
+ #{VAR.$parent-selector} .group:hover .group-hover\:border-#{$color-name} {
183
183
  border-color: var(--#{$color-name});
184
184
  }
185
185
  }
186
186
 
187
187
  // Semantic color utilities
188
- .bg-page {
188
+ #{VAR.$parent-selector} .bg-page {
189
189
  background-color: var(--background);
190
190
  }
191
191
 
192
- .bg-card {
192
+ #{VAR.$parent-selector} .bg-surface {
193
193
  background-color: var(--surface);
194
194
  }
195
195
 
196
- .bg-active {
196
+ #{VAR.$parent-selector} .bg-active {
197
197
  background-color: var(--button-bg-color);
198
198
  }
199
199
 
200
- .bg-hover {
200
+ #{VAR.$parent-selector} .bg-hover {
201
201
  background-color: var(--button-bg-color-hover);
202
202
  }
203
203
 
204
- .bg-white {
204
+ #{VAR.$parent-selector} .bg-white,
205
+ .hover\:bg-white:hover {
205
206
  background-color: white;
206
207
  }
207
208
 
208
- .bg-black {
209
+ #{VAR.$parent-selector} .bg-black,
210
+ .hover\:bg-black:hover {
209
211
  background-color: black;
210
212
  }
211
213
 
212
- .text-default {
213
- color: var(--text-primary);
214
+ #{VAR.$parent-selector} .text-default {
215
+ color: var(--text-default);
214
216
  }
215
217
 
216
- .text-muted {
217
- color: var(--text-secondary);
218
+ #{VAR.$parent-selector} .text-muted {
219
+ color: var(--text-muted);
218
220
  }
219
221
 
220
- .text-subtle {
221
- color: var(--text-secondary);
222
- opacity: 0.7;
223
- }
224
-
225
- .text-inverted {
222
+ #{VAR.$parent-selector} .text-inverted {
226
223
  color: var(--inverted-text-color);
227
224
  }
228
225
 
229
- .text-white {
226
+ #{VAR.$parent-selector} .text-white,
227
+ #{VAR.$parent-selector} .hover\:text-white:hover {
230
228
  color: white;
231
229
  }
232
230
 
233
- .text-black {
231
+ #{VAR.$parent-selector} .text-black,
232
+ #{VAR.$parent-selector} .hover\:text-black:hover {
234
233
  color: black;
235
234
  }
236
- }
237
235
 
238
- // Glass effects
239
- .glass-effect {
240
- background-color: rgb(255 255 255 / 10%);
241
- border: 1px solid rgb(255 255 255 / 20%);
242
-
243
- @include COL.backdrop-filter(blur(8px));
244
- }
245
-
246
- .frosted-glass {
247
- background-color: rgb(255 255 255 / 70%);
248
- border: 1px solid rgb(255 255 255 / 80%);
249
-
250
- @include COL.backdrop-filter(blur(15px));
236
+ #{VAR.$parent-selector} .text-subtle {
237
+ color: var(--text-muted);
238
+ opacity: 0.7;
239
+ }
251
240
  }
@@ -1,22 +1,49 @@
1
- @use '../abstracts' as VAR;
1
+ @use "../abstracts/config" as VAR;
2
2
 
3
- @mixin align-baseline { & { vertical-align: baseline; } }
4
- @mixin align-top { & { vertical-align: top; } }
5
- @mixin align-middle { & { vertical-align: middle; } }
6
- @mixin align-bottom { & { vertical-align: bottom; } }
3
+ @mixin align-baseline {
4
+ vertical-align: baseline;
5
+ }
6
+ @mixin align-top {
7
+ vertical-align: top;
8
+ }
9
+ @mixin align-middle {
10
+ vertical-align: middle;
11
+ }
12
+ @mixin align-bottom {
13
+ vertical-align: bottom;
14
+ }
7
15
 
8
16
  @if VAR.$generate-utility-classes {
9
- .align-baseline { @include align-baseline; }
10
- .align-top { @include align-top; }
11
- .align-middle { @include align-middle; }
12
- .align-bottom { @include align-bottom; }
17
+ #{VAR.$parent-selector} .align-baseline {
18
+ @include align-baseline;
19
+ }
20
+
21
+ #{VAR.$parent-selector} .align-top {
22
+ @include align-top;
23
+ }
24
+
25
+ #{VAR.$parent-selector} .align-middle {
26
+ @include align-middle;
27
+ }
28
+
29
+ #{VAR.$parent-selector} .align-bottom {
30
+ @include align-bottom;
31
+ }
13
32
 
14
33
  @each $breakpoint, $width in VAR.$breakpoints {
15
34
  @media (min-width: #{$width}) {
16
- .align-baseline\@#{$breakpoint} { @include align-baseline; }
17
- .align-top\@#{$breakpoint} { @include align-top; }
18
- .align-middle\@#{$breakpoint} { @include align-middle; }
19
- .align-bottom\@#{$breakpoint} { @include align-bottom; }
35
+ #{VAR.$parent-selector} .align-baseline\@#{$breakpoint} {
36
+ @include align-baseline;
37
+ }
38
+ #{VAR.$parent-selector} .align-top\@#{$breakpoint} {
39
+ @include align-top;
40
+ }
41
+ #{VAR.$parent-selector} .align-middle\@#{$breakpoint} {
42
+ @include align-middle;
43
+ }
44
+ #{VAR.$parent-selector} .align-bottom\@#{$breakpoint} {
45
+ @include align-bottom;
46
+ }
20
47
  }
21
48
  }
22
49
  }