@nuvoui/core 1.3.4 → 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 +424 -342
  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 -341
  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 +231 -224
  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 -253
  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
@@ -1,95 +0,0 @@
1
- @use "sass:map";
2
- @use "sass:meta";
3
- @use "../abstracts/config" as VAR;
4
- @use "../abstracts/functions" as FN;
5
-
6
- // Container Query Mixins
7
- // Usage:
8
- // .container {
9
- // container-type: inline-size;
10
- // container-name: sidebar;
11
- // }
12
- // .item {
13
- // @include container-up('md', 'sidebar') {
14
- // // Styles for 'md' and up within 'sidebar' container
15
- // }
16
- // }
17
-
18
- // /Container Query: Up
19
- @mixin container-up($breakpoint, $containerName: null) {
20
- $bp-val: FN.get-breakpoint-value($breakpoint);
21
- @container #{$containerName} (min-width: #{$bp-val}) {
22
- @content;
23
- }
24
- }
25
-
26
- // /Container Query: Down
27
- @mixin container-down($breakpoint, $containerName: null) {
28
- $bp-val: FN.get-breakpoint-value($breakpoint);
29
- @container #{$containerName} (max-width: (#{ $bp-val } - 0.02px)) {
30
- @content;
31
- }
32
- }
33
-
34
- // /Container Query: Between
35
- @mixin container-between($lower, $upper, $containerName: null) {
36
- $min: FN.get-breakpoint-value($lower);
37
- $max: FN.get-breakpoint-value($upper);
38
- @container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $max } - 0.02px)) {
39
- @content;
40
- }
41
- }
42
-
43
- // /Container Query: Only
44
- @mixin container-only($breakpoint, $containerName: null) {
45
- $min: FN.get-breakpoint-value($breakpoint);
46
- $next-breakpoint: null;
47
-
48
- @each $name, $width in $breakpoints {
49
- @if $width > $min and (not $next-breakpoint or $width < $next-breakpoint) {
50
- $next-breakpoint: $width;
51
- }
52
- }
53
-
54
- @if $next-breakpoint {
55
- @container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $next-breakpoint } - 0.02px)) {
56
- @content;
57
- }
58
- } @else {
59
- @container #{$containerName} (min-width: #{$min}) {
60
- @content;
61
- }
62
- }
63
- }
64
-
65
- // /Container Query: Query by Size
66
- @mixin container-query($size, $containerName: null) {
67
- @container #{$containerName} (min-width: $size) {
68
- @content;
69
- }
70
- }
71
-
72
- @mixin container-type($type: inline-size) {
73
- container-type: $type;
74
- }
75
-
76
- @mixin container-name($name) {
77
- container-name: $name;
78
- }
79
-
80
- @if FN.feature-enabled("container-queries") {
81
- // Utility classes
82
- #{VAR.$parent-selector} .container-inline-size {
83
- container-type: inline-size;
84
- }
85
-
86
- #{VAR.$parent-selector} .container-size {
87
- container-type: size;
88
- }
89
-
90
- @each $name in ("main", "sidebar", "card", "section") {
91
- #{VAR.$parent-selector} .container-#{$name} {
92
- container-name: $name;
93
- }
94
- }
95
- }
@@ -1,189 +0,0 @@
1
- // Section: Utilities
2
- // Module: Media Queries
3
-
4
- @use "sass:map";
5
- @use "sass:string";
6
- @use "sass:math";
7
- @use "sass:meta";
8
- @use "../abstracts/config" as VAR;
9
- @use "../abstracts/functions" as FN;
10
-
11
- // @description Media query mixins.
12
- // @param {string|number} $breakpoint - The breakpoint value.
13
- // @param {string} $type - The media query type (e.g. 'lg', 'md').
14
- @mixin media-up($breakpoint, $debug: null) {
15
- $blueprint-value: FN.fix-units(FN.get-breakpoint-value($breakpoint, $debug));
16
- $val: $blueprint-value - 0.01;
17
- @media screen and (min-width: #{$val}) {
18
- @content;
19
- }
20
- }
21
-
22
- @mixin media-down($breakpoint) {
23
- $blueprint-value: FN.fix-units(FN.get-breakpoint-value($breakpoint));
24
- $val: $blueprint-value - 0.01;
25
- @media screen and (max-width: #{$val}) {
26
- @content;
27
- }
28
- }
29
-
30
- @mixin media-between($lower, $upper) {
31
- $lower-val: FN.fix-units(FN.get-breakpoint-value($lower));
32
- $upper-val: FN.fix-units(FN.get-breakpoint-value($upper));
33
- $upper-val: $upper-val - 0.01;
34
- @media screen and (min-width: #{$lower-val}) and (max-width: #{$upper-val}) {
35
- @content;
36
- }
37
- }
38
-
39
- // Only at specific breakpoint
40
- @mixin media-only($breakpoint) {
41
- @if meta.type-of($breakpoint) == number and math.is-unitless($breakpoint) {
42
- @error "media-only() needs a breakpoint value";
43
- }
44
-
45
- @if map.has-key(VAR.$breakpoints, $breakpoint) {
46
- $min: FN.get-breakpoint-value($breakpoint);
47
- } @else {
48
- @error "media-only() needs a valid breakpoint value #{$breakpoint} is not in your $breakpoints map";
49
- }
50
-
51
- $next-breakpoint: null;
52
-
53
- @each $name, $width in VAR.$breakpoints {
54
- @if $width > $min and (meta.type-of($next-breakpoint) == "null" or $width < $next-breakpoint) {
55
- $next-breakpoint: $width;
56
- }
57
- }
58
-
59
- @if $next-breakpoint {
60
- @media (min-width: #{$min}) and (max-width: #{$next-breakpoint - 0.02px}) {
61
- @content;
62
- }
63
- } @else {
64
- @media (min-width: #{$min}) {
65
- @content;
66
- }
67
- }
68
- }
69
-
70
- // todo: doc
71
- // Touch devices
72
- @mixin touch {
73
- @media (hover: none) and (pointer: coarse) {
74
- @content;
75
- }
76
- }
77
-
78
- // todo: doc
79
- // Print media
80
- @mixin print {
81
- @media print {
82
- @content;
83
- }
84
- }
85
-
86
- // todo: doc
87
- // Example: @include supports(display: grid) { }
88
- @mixin supports($property) {
89
- @supports (#{$property}) {
90
- @content;
91
- }
92
- }
93
-
94
- // todo: doc
95
- // System preference only
96
- @mixin prefers-dark {
97
- @media (prefers-color-scheme: dark) {
98
- @content;
99
- }
100
- }
101
-
102
- // todo: doc
103
- // User preference takes precedence
104
- @mixin dark-mode {
105
- @if VAR.$enable-dark-mode {
106
- // todo: documentation as this will fully remove the dark mode by force
107
- // Apply when user explicitly chooses dark
108
- [data-theme="dark"] & {
109
- @content;
110
- }
111
-
112
- // Apply when system is dark AND user hasn't made a choice
113
- @media (prefers-color-scheme: dark) {
114
- [data-theme="system"] & {
115
- @content;
116
- }
117
- }
118
- }
119
- }
120
-
121
- // todo: doc
122
- // Device orientation
123
- @mixin landscape {
124
- @media screen and (orientation: landscape) {
125
- @content;
126
- }
127
- }
128
-
129
- // todo: doc
130
- @mixin portrait {
131
- @media screen and (orientation: portrait) {
132
- @content;
133
- }
134
- }
135
-
136
- // todo: doc
137
- // Modern aspect ratio
138
- @mixin aspect-ratio($ratio) {
139
- aspect-ratio: #{$ratio};
140
- }
141
-
142
- // todo: doc
143
- // Dynamic viewport units (modern browsers)
144
- @mixin dvh {
145
- @supports (height: 100dvh) {
146
- height: 100dvh;
147
- }
148
-
149
- @supports not (height: 100dvh) {
150
- height: 100vh;
151
- }
152
- }
153
-
154
- // todo: doc
155
- // Safe area insets (notches, home indicators)
156
- @mixin safe-area-inset($property, $position) {
157
- #{$property}: env(safe-area-inset-#{$position});
158
- }
159
-
160
- // todo: doc
161
- @mixin reduced-motion {
162
- @media (prefers-reduced-motion: reduce) {
163
- @content;
164
- }
165
- }
166
-
167
- // todo: doc
168
- // Mouse precision detection
169
- @mixin fine-pointer {
170
- @media (pointer: fine) {
171
- @content;
172
- }
173
- }
174
-
175
- // todo: doc
176
- // Display mode for PWAs
177
- @mixin display-mode($mode: "standalone") {
178
- @media (display-mode: #{$mode}) {
179
- @content;
180
- }
181
- }
182
-
183
- // todo: doc
184
- // High contrast mode
185
- @mixin high-contrast {
186
- @media (forced-colors: active) {
187
- @content;
188
- }
189
- }
@@ -1,258 +0,0 @@
1
- @use "../abstracts/config" as VAR;
2
- @use "../abstracts/functions" as FN;
3
-
4
- @mixin tooltip-variables {
5
- // Tooltip core variables
6
- --tooltip-bg: rgba(17 17 17 / 90%);
7
- --tooltip-shadow-color: rgb(0 0 0 / 20%);
8
- --tooltip-text-color: #fff;
9
-
10
- // Animation variables
11
- --microtip-transition-duration: 0.18s;
12
- --microtip-transition-easing: ease-in-out;
13
- --microtip-transition-delay: 0s;
14
-
15
- // Typography variables
16
- --microtip-font-size: 13px;
17
- --microtip-font-weight: normal;
18
- --microtip-text-transform: none;
19
-
20
- // Sizing variables
21
- --tooltip-small-width: 80px;
22
- --tooltip-medium-width: 150px;
23
- --tooltip-large-width: 260px;
24
- --tooltip-border-radius: 4px;
25
- }
26
-
27
- @if FN.feature-enabled("tooltips") {
28
- // Apply variables based on parent selector
29
- @if VAR.$parent-selector == "" {
30
- :root {
31
- @include tooltip-variables;
32
- }
33
- } @else {
34
- #{VAR.$parent-selector} {
35
- @include tooltip-variables;
36
- }
37
- }
38
-
39
- #{VAR.$parent-selector} [data-tooltip][role~="tooltip"] {
40
- position: relative;
41
-
42
- &::before,
43
- &::after {
44
- transform: translate3d(0, 0, 0);
45
- backface-visibility: hidden;
46
- will-change: transform;
47
- opacity: 0;
48
- pointer-events: none;
49
- transition: all var(--microtip-transition-duration) var(--microtip-transition-easing) var(--microtip-transition-delay);
50
- position: absolute;
51
- box-sizing: border-box;
52
- z-index: 10;
53
- transform-origin: top;
54
- }
55
-
56
- &::before {
57
- background-size: 100% auto !important;
58
- content: "";
59
- }
60
-
61
- &::after {
62
- background: var(--tooltip-bg);
63
- box-shadow: 0 3px 7px var(--tooltip-shadow-color);
64
- border-radius: var(--tooltip-border-radius);
65
- color: var(--tooltip-text-color);
66
- content: attr(data-tooltip);
67
- font-size: var(--microtip-font-size);
68
- font-weight: var(--microtip-font-weight);
69
- text-transform: var(--microtip-text-transform);
70
- padding: 0.5em 1em;
71
- white-space: nowrap;
72
- box-sizing: content-box;
73
- }
74
-
75
- &:hover::before,
76
- &:hover::after,
77
- &:focus::before,
78
- &:focus::after {
79
- opacity: 1;
80
- pointer-events: auto;
81
- }
82
- }
83
-
84
- // Top position tooltips
85
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position|="top"] {
86
- &::before {
87
- background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A// www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
88
- height: 6px;
89
- width: 18px;
90
- margin-bottom: 6px;
91
- transform: translate3d(-50%, 0, 0);
92
- bottom: 100%;
93
- left: 50%;
94
- }
95
-
96
- &::after {
97
- margin-bottom: 11px;
98
- transform: translate3d(-50%, 0, 0);
99
- bottom: 100%;
100
- left: 50%;
101
- }
102
-
103
- &:hover::before {
104
- transform: translate3d(-50%, -5px, 0);
105
- }
106
-
107
- &:hover::after {
108
- transform: translate3d(-50%, -5px, 0);
109
- }
110
- }
111
-
112
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="top-left"] {
113
- &::after {
114
- transform: translate3d(calc(-100% + 16px), 0, 0);
115
- bottom: 100%;
116
- }
117
-
118
- &:hover::after {
119
- transform: translate3d(calc(-100% + 16px), -5px, 0);
120
- }
121
- }
122
-
123
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="top-right"] {
124
- &::after {
125
- transform: translate3d(calc(0% + -16px), 0, 0);
126
- bottom: 100%;
127
- }
128
-
129
- &:hover::after {
130
- transform: translate3d(calc(0% + -16px), -5px, 0);
131
- }
132
- }
133
-
134
- // Bottom position tooltips
135
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position|="bottom"] {
136
- &::before {
137
- background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A// www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
138
- height: 6px;
139
- width: 18px;
140
- margin-top: 5px;
141
- margin-bottom: 0;
142
- transform: translate3d(-50%, -10px, 0);
143
- bottom: auto;
144
- left: 50%;
145
- top: 100%;
146
- }
147
-
148
- &::after {
149
- margin-top: 11px;
150
- transform: translate3d(-50%, -10px, 0);
151
- top: 100%;
152
- left: 50%;
153
- }
154
-
155
- &:hover::before {
156
- transform: translate3d(-50%, 0, 0);
157
- }
158
-
159
- &:hover::after {
160
- transform: translate3d(-50%, 0, 0);
161
- }
162
- }
163
-
164
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="bottom-left"] {
165
- &::after {
166
- transform: translate3d(calc(-100% + 16px), -10px, 0);
167
- top: 100%;
168
- }
169
-
170
- &:hover::after {
171
- transform: translate3d(calc(-100% + 16px), 0, 0);
172
- }
173
- }
174
-
175
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="bottom-right"] {
176
- &::after {
177
- transform: translate3d(calc(0% + -16px), -10px, 0);
178
- top: 100%;
179
- }
180
-
181
- &:hover::after {
182
- transform: translate3d(calc(0% + -16px), 0, 0);
183
- }
184
- }
185
-
186
- // Left position tooltips
187
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="left"] {
188
- &::before,
189
- &::after {
190
- inset: auto auto auto 100%;
191
- left: auto; // Remove any left positioning
192
- right: 100%; // Position to the left of the element
193
- top: 50%;
194
- transform: translate3d(10px, -50%, 0);
195
- }
196
-
197
- &::before {
198
- background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A// www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
199
- height: 18px;
200
- width: 6px;
201
- margin-right: 5px;
202
- margin-bottom: 0;
203
- }
204
-
205
- &::after {
206
- margin-right: 11px;
207
- }
208
-
209
- &:hover::before,
210
- &:hover::after {
211
- transform: translate3d(0, -50%, 0);
212
- }
213
- }
214
-
215
- // Right position tooltips
216
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-position="right"] {
217
- &::before,
218
- &::after {
219
- bottom: auto;
220
- left: 100%;
221
- top: 50%;
222
- transform: translate3d(-10px, -50%, 0);
223
- }
224
-
225
- &::before {
226
- background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A// www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
227
- height: 18px;
228
- width: 6px;
229
- margin-bottom: 0;
230
- margin-left: 5px;
231
- }
232
-
233
- &::after {
234
- margin-left: 11px;
235
- }
236
-
237
- &:hover::before,
238
- &:hover::after {
239
- transform: translate3d(0, -50%, 0);
240
- }
241
- }
242
-
243
- // Tooltip sizes
244
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-size="small"]::after {
245
- white-space: initial;
246
- width: var(--tooltip-small-width);
247
- }
248
-
249
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-size="medium"]::after {
250
- white-space: initial;
251
- width: var(--tooltip-medium-width);
252
- }
253
-
254
- #{VAR.$parent-selector} [role~="tooltip"][data-microtip-size="large"]::after {
255
- white-space: initial;
256
- width: var(--tooltip-large-width);
257
- }
258
- }