@nuvoui/core 1.3.5 → 1.4.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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/nuvoui.css +878 -646
  4. package/dist/nuvoui.css.map +1 -1
  5. package/dist/nuvoui.min.css +23 -1
  6. package/dist/nuvoui.min.css.map +1 -1
  7. package/package.json +1 -1
  8. package/src/styles/base/_base.scss +148 -147
  9. package/src/styles/base/_reset.scss +41 -49
  10. package/src/styles/build.scss +25 -1
  11. package/src/styles/components/_tooltips.scss +271 -0
  12. package/src/styles/config/_borders.scss +15 -0
  13. package/src/styles/config/_breakpoints.scss +11 -0
  14. package/src/styles/config/_colors.scss +192 -0
  15. package/src/styles/config/_constants.scss +1 -0
  16. package/src/styles/config/_container-queries.scss +1 -0
  17. package/src/styles/config/_feature-flags.scss +33 -0
  18. package/src/styles/config/_layouts.scss +13 -0
  19. package/src/styles/config/_shadows.scss +9 -0
  20. package/src/styles/config/_spacing.scss +41 -0
  21. package/src/styles/config/_theme-validation.scss +59 -0
  22. package/src/styles/config/_typography.scss +45 -0
  23. package/src/styles/functions/_breakpoints.scss +15 -0
  24. package/src/styles/functions/_colors.scss +280 -0
  25. package/src/styles/functions/_css-vars.scss +33 -0
  26. package/src/styles/functions/_feature-flags.scss +20 -0
  27. package/src/styles/functions/_math.scss +72 -0
  28. package/src/styles/functions/_strings.scss +68 -0
  29. package/src/styles/functions/_types.scss +104 -0
  30. package/src/styles/functions/_units.scss +83 -0
  31. package/src/styles/index.scss +26 -5
  32. package/src/styles/layouts/_container.scss +28 -27
  33. package/src/styles/layouts/_flex.scss +343 -337
  34. package/src/styles/layouts/_grid.scss +131 -128
  35. package/src/styles/mixins-map.json +486 -479
  36. package/src/styles/mixins-map.scss +1 -1
  37. package/src/styles/themes/_theme.scss +230 -211
  38. package/src/styles/tools/_accessibility.scss +50 -0
  39. package/src/styles/tools/_container-queries.scss +98 -0
  40. package/src/styles/tools/_feature-support.scss +46 -0
  41. package/src/styles/tools/_media-queries.scss +70 -0
  42. package/src/styles/tools/_modern-layout.scss +49 -0
  43. package/src/styles/utilities/_alignment.scss +35 -34
  44. package/src/styles/utilities/_animations.scss +312 -311
  45. package/src/styles/utilities/_backdrop-filters.scss +194 -193
  46. package/src/styles/utilities/_borders.scss +243 -237
  47. package/src/styles/utilities/_colors.scss +16 -136
  48. package/src/styles/utilities/_cursor.scss +10 -10
  49. package/src/styles/utilities/_display.scss +192 -191
  50. package/src/styles/utilities/_helpers.scss +106 -106
  51. package/src/styles/utilities/_opacity.scss +27 -25
  52. package/src/styles/utilities/_position.scss +124 -121
  53. package/src/styles/utilities/_shadows.scss +171 -169
  54. package/src/styles/utilities/_sizing.scss +197 -194
  55. package/src/styles/utilities/_spacing.scss +230 -227
  56. package/src/styles/utilities/_transforms.scss +235 -234
  57. package/src/styles/utilities/_transitions.scss +136 -135
  58. package/src/styles/utilities/_typography.scss +254 -239
  59. package/src/styles/utilities/_z-index.scss +69 -68
  60. package/src/styles/abstracts/_config.scss +0 -254
  61. package/src/styles/abstracts/_functions.scss +0 -626
  62. package/src/styles/themes/refactored_borders.ipynb +0 -37
  63. package/src/styles/utilities/_container-queries.scss +0 -95
  64. package/src/styles/utilities/_media-queries.scss +0 -189
  65. package/src/styles/utilities/_tooltips.scss +0 -258
@@ -0,0 +1,50 @@
1
+ // Section: Tools
2
+ // Module: Accessibility
3
+ // Description: Mixins for handling user preferences and accessibility
4
+
5
+ @use "../config/feature-flags" as config-flags;
6
+
7
+ // todo: doc
8
+ /// Target system dark mode preference
9
+ @mixin prefers-dark {
10
+ @media (prefers-color-scheme: dark) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ // todo: doc
16
+ /// Apply dark mode styles based on user and system preferences
17
+ /// Respects the site's theme selection system
18
+ @mixin dark-mode {
19
+ @if config-flags.$enable-dark-mode {
20
+ // Apply when user explicitly chooses dark
21
+ [data-theme="dark"] & {
22
+ @content;
23
+ }
24
+
25
+ // Apply when system is dark AND user hasn't made a choice
26
+ @media (prefers-color-scheme: dark) {
27
+ [data-theme="system"] & {
28
+ @content;
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ // todo: doc
35
+ /// Target reduced motion preference
36
+ /// @example @include reduced-motion { * { transition: none !important; } }
37
+ @mixin reduced-motion {
38
+ @media (prefers-reduced-motion: reduce) {
39
+ @content;
40
+ }
41
+ }
42
+
43
+ // todo: doc
44
+ /// Target high contrast mode
45
+ /// @example @include high-contrast { border: 1px solid; }
46
+ @mixin high-contrast {
47
+ @media (forced-colors: active) {
48
+ @content;
49
+ }
50
+ }
@@ -0,0 +1,98 @@
1
+ @use "sass:map";
2
+ @use "sass:meta";
3
+ @use "../config/feature-flags" as config-flags;
4
+ @use "../config/breakpoints" as config-breakpoint;
5
+ @use "../config/container-queries" as config-container;
6
+ @use "../functions/feature-flags" as fn-flags;
7
+ @use "../functions/breakpoints" as fn-breakpoints;
8
+
9
+ // Container Query Mixins
10
+ // Usage:
11
+ // .container {
12
+ // container-type: inline-size;
13
+ // container-name: sidebar;
14
+ // }
15
+ // .item {
16
+ // @include container-up('md', 'sidebar') {
17
+ // // Styles for 'md' and up within 'sidebar' container
18
+ // }
19
+ // }
20
+
21
+ // /Container Query: Up
22
+ @mixin container-up($breakpoint, $containerName: null) {
23
+ $bp-val: fn-breakpoints.get-breakpoint-value($breakpoint);
24
+ @container #{$containerName} (min-width: #{$bp-val}) {
25
+ @content;
26
+ }
27
+ }
28
+
29
+ // /Container Query: Down
30
+ @mixin container-down($breakpoint, $containerName: null) {
31
+ $bp-val: fn-breakpoints.get-breakpoint-value($breakpoint);
32
+ @container #{$containerName} (max-width: (#{ $bp-val } - 0.02px)) {
33
+ @content;
34
+ }
35
+ }
36
+
37
+ // /Container Query: Between
38
+ @mixin container-between($lower, $upper, $containerName: null) {
39
+ $min: fn-breakpoints.get-breakpoint-value($lower);
40
+ $max: fn-breakpoints.get-breakpoint-value($upper);
41
+ @container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $max } - 0.02px)) {
42
+ @content;
43
+ }
44
+ }
45
+
46
+ // /Container Query: Only
47
+ @mixin container-only($breakpoint, $containerName: null) {
48
+ $min: fn-breakpoints.get-breakpoint-value($breakpoint);
49
+ $next-breakpoint: null;
50
+
51
+ @each $name, $width in config-breakpoint.$breakpoints {
52
+ @if $width > $min and (not $next-breakpoint or $width < $next-breakpoint) {
53
+ $next-breakpoint: $width;
54
+ }
55
+ }
56
+
57
+ @if $next-breakpoint {
58
+ @container #{$containerName} (min-width: #{$min}) and (max-width: (#{ $next-breakpoint } - 0.02px)) {
59
+ @content;
60
+ }
61
+ } @else {
62
+ @container #{$containerName} (min-width: #{$min}) {
63
+ @content;
64
+ }
65
+ }
66
+ }
67
+
68
+ // /Container Query: Query by Size
69
+ @mixin container-query($size, $containerName: null) {
70
+ @container #{$containerName} (min-width: $size) {
71
+ @content;
72
+ }
73
+ }
74
+
75
+ @mixin container-type($type: inline-size) {
76
+ container-type: $type;
77
+ }
78
+
79
+ @mixin container-name($name) {
80
+ container-name: $name;
81
+ }
82
+
83
+ @if fn-flags.feature-enabled("container-queries") {
84
+ // Utility classes
85
+ #{config-flags.$parent-selector} .container-inline-size {
86
+ container-type: inline-size;
87
+ }
88
+
89
+ #{config-flags.$parent-selector} .container-size {
90
+ container-type: size;
91
+ }
92
+
93
+ @each $name in config-container.$container-names {
94
+ #{config-flags.$parent-selector} .container-#{$name} {
95
+ container-name: $name;
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,46 @@
1
+ // Section: Tools
2
+ // Module: Device Capabilities
3
+ // Description: Mixins for targeting device-specific capabilities
4
+
5
+ // todo: doc
6
+ /// Target touch devices
7
+ /// @example @include touch { button { padding: 12px; } }
8
+ @mixin touch {
9
+ @media (hover: none) and (pointer: coarse) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ // todo: doc
15
+ /// Target devices with precise pointing (mouse)
16
+ /// @example @include fine-pointer { .tooltip { opacity: 0; } }
17
+ @mixin fine-pointer {
18
+ @media (pointer: fine) {
19
+ @content;
20
+ }
21
+ }
22
+
23
+ // todo: doc
24
+ /// Target devices in landscape orientation
25
+ @mixin landscape {
26
+ @media screen and (orientation: landscape) {
27
+ @content;
28
+ }
29
+ }
30
+
31
+ // todo: doc
32
+ /// Target devices in portrait orientation
33
+ @mixin portrait {
34
+ @media screen and (orientation: portrait) {
35
+ @content;
36
+ }
37
+ }
38
+
39
+ // todo: doc
40
+ /// Target Progressive Web App display modes
41
+ /// @param {String} $mode - Display mode (standalone, fullscreen, minimal-ui, browser)
42
+ @mixin display-mode($mode: "standalone") {
43
+ @media (display-mode: #{$mode}) {
44
+ @content;
45
+ }
46
+ }
@@ -0,0 +1,70 @@
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 "../config/breakpoints" as config-breakpoint;
9
+ @use "../functions/feature-flags" as fn-flags;
10
+ @use "../functions/units" as fn-units;
11
+ @use "../functions/breakpoints" as fn-breakpoints;
12
+
13
+ // @description Media query mixins.
14
+ // @param {string|number} $breakpoint - The breakpoint value.
15
+ // @param {string} $type - The media query type (e.g. 'lg', 'md').
16
+ @mixin media-up($breakpoint, $debug: null) {
17
+ $blueprint-value: fn-units.fix-units(fn-breakpoints.get-breakpoint-value($breakpoint, $debug));
18
+ $val: $blueprint-value - 0.01;
19
+ @media screen and (min-width: #{$val}) {
20
+ @content;
21
+ }
22
+ }
23
+
24
+ @mixin media-down($breakpoint) {
25
+ $blueprint-value: fn-units.fix-units(fn-breakpoints.get-breakpoint-value($breakpoint));
26
+ $val: $blueprint-value - 0.01;
27
+ @media screen and (max-width: #{$val}) {
28
+ @content;
29
+ }
30
+ }
31
+
32
+ @mixin media-between($lower, $upper) {
33
+ $lower-val: fn-units.fix-units(fn-breakpoints.get-breakpoint-value($lower));
34
+ $upper-val: fn-units.fix-units(fn-breakpoints.get-breakpoint-value($upper));
35
+ $upper-val: $upper-val - 0.01;
36
+ @media screen and (min-width: #{$lower-val}) and (max-width: #{$upper-val}) {
37
+ @content;
38
+ }
39
+ }
40
+
41
+ // Only at specific breakpoint
42
+ @mixin media-only($breakpoint) {
43
+ @if meta.type-of($breakpoint) == "number" and math.is-unitless($breakpoint) {
44
+ @error "media-only() needs a breakpoint value";
45
+ }
46
+ $min: 0;
47
+ @if map.has-key(config-breakpoint.$breakpoints, $breakpoint) {
48
+ $min: fn-breakpoints.get-breakpoint-value($breakpoint);
49
+ } @else {
50
+ @error "media-only() needs a valid breakpoint value #{$breakpoint} is not in your $breakpoints map";
51
+ }
52
+
53
+ $next-breakpoint: null;
54
+
55
+ @each $name, $width in config-breakpoint.$breakpoints {
56
+ @if $width > $min and (meta.type-of($next-breakpoint) == "null" or $width < $next-breakpoint) {
57
+ $next-breakpoint: $width;
58
+ }
59
+ }
60
+
61
+ @if $next-breakpoint {
62
+ @media (min-width: #{$min}) and (max-width: #{$next-breakpoint - 0.02px}) {
63
+ @content;
64
+ }
65
+ } @else {
66
+ @media (min-width: #{$min}) {
67
+ @content;
68
+ }
69
+ }
70
+ }
@@ -0,0 +1,49 @@
1
+ // Section: Tools
2
+ // Module: Modern Layout
3
+ // Description: Mixins for modern CSS layout techniques
4
+
5
+ // todo: doc
6
+ /// Set aspect ratio with fallbacks
7
+ /// @param {String} $ratio - Aspect ratio (e.g. "16/9")
8
+ @mixin aspect-ratio($ratio) {
9
+ aspect-ratio: #{$ratio};
10
+ }
11
+
12
+ // todo: doc
13
+ /// Use dynamic viewport height with fallback
14
+ @mixin dvh {
15
+ @supports (height: 100dvh) {
16
+ height: 100dvh;
17
+ }
18
+
19
+ @supports not (height: 100dvh) {
20
+ height: 100vh;
21
+ }
22
+ }
23
+
24
+ // todo: doc
25
+ /// Handle safe area insets for notches, etc.
26
+ /// @param {String} $property - CSS property to apply inset to
27
+ /// @param {String} $position - Inset position (top, right, bottom, left)
28
+ @mixin safe-area-inset($property, $position) {
29
+ #{$property}: env(safe-area-inset-#{$position});
30
+ }
31
+
32
+ // todo: doc
33
+ /// Target print media
34
+ /// @example @include print { .nav { display: none; } }
35
+ @mixin print {
36
+ @media print {
37
+ @content;
38
+ }
39
+ }
40
+
41
+ // todo: doc
42
+ /// Check for feature support
43
+ /// @param {String} $property - CSS property to check for support
44
+ /// @example @include supports(display: grid) { .grid { display: grid; } }
45
+ @mixin supports($property) {
46
+ @supports (#{$property}) {
47
+ @content;
48
+ }
49
+ }
@@ -1,50 +1,51 @@
1
- @use "../abstracts/config" as VAR;
2
- @use "../abstracts/functions" as FN;
1
+ @use "../config/feature-flags" as config-flags;
2
+ @use "../config/breakpoints" as config-breakpoint;
3
+ @use "../functions/feature-flags" as fn-flags;
3
4
 
4
5
  @mixin align-baseline {
5
- vertical-align: baseline;
6
+ vertical-align: baseline;
6
7
  }
7
8
  @mixin align-top {
8
- vertical-align: top;
9
+ vertical-align: top;
9
10
  }
10
11
  @mixin align-middle {
11
- vertical-align: middle;
12
+ vertical-align: middle;
12
13
  }
13
14
  @mixin align-bottom {
14
- vertical-align: bottom;
15
+ vertical-align: bottom;
15
16
  }
16
17
 
17
- @if FN.feature-enabled("alignments") {
18
- #{VAR.$parent-selector} .align-baseline {
19
- @include align-baseline;
20
- }
21
-
22
- #{VAR.$parent-selector} .align-top {
23
- @include align-top;
24
- }
25
-
26
- #{VAR.$parent-selector} .align-middle {
27
- @include align-middle;
28
- }
29
-
30
- #{VAR.$parent-selector} .align-bottom {
31
- @include align-bottom;
32
- }
33
-
34
- @each $breakpoint, $width in VAR.$breakpoints {
35
- @media (min-width: #{$width}) {
36
- #{VAR.$parent-selector} .align-baseline\@#{$breakpoint} {
18
+ @if fn-flags.feature-enabled("alignments") {
19
+ #{config-flags.$parent-selector} .align-baseline {
37
20
  @include align-baseline;
38
- }
39
- #{VAR.$parent-selector} .align-top\@#{$breakpoint} {
21
+ }
22
+
23
+ #{config-flags.$parent-selector} .align-top {
40
24
  @include align-top;
41
- }
42
- #{VAR.$parent-selector} .align-middle\@#{$breakpoint} {
25
+ }
26
+
27
+ #{config-flags.$parent-selector} .align-middle {
43
28
  @include align-middle;
44
- }
45
- #{VAR.$parent-selector} .align-bottom\@#{$breakpoint} {
29
+ }
30
+
31
+ #{config-flags.$parent-selector} .align-bottom {
46
32
  @include align-bottom;
47
- }
48
33
  }
49
- }
34
+
35
+ @each $breakpoint, $width in config-breakpoint.$breakpoints {
36
+ @media (min-width: #{$width}) {
37
+ #{config-flags.$parent-selector} .align-baseline\@#{$breakpoint} {
38
+ @include align-baseline;
39
+ }
40
+ #{config-flags.$parent-selector} .align-top\@#{$breakpoint} {
41
+ @include align-top;
42
+ }
43
+ #{config-flags.$parent-selector} .align-middle\@#{$breakpoint} {
44
+ @include align-middle;
45
+ }
46
+ #{config-flags.$parent-selector} .align-bottom\@#{$breakpoint} {
47
+ @include align-bottom;
48
+ }
49
+ }
50
+ }
50
51
  }