@nuvoui/core 0.2.1 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvoui/core",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "NuvoUI Core SCSS Library",
5
5
  "main": "dist/index.css",
6
6
  "module": "src/styles/index.scss",
@@ -12,16 +12,33 @@
12
12
  "dev": "vite",
13
13
  "build": "vite build && npm run build:scss",
14
14
  "build:scss": "sass src/styles/index.scss:dist/index.css --style compressed",
15
- "prepare": "npm run build"
15
+ "prepare": "npm run build",
16
+ "lint": "stylelint \"src/**/*.scss\"",
17
+ "format": "prettier --write \"src/**/*.{scss,js,json}\"",
18
+ "clean": "rimraf dist"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/NuvoUI/core.git"
16
23
  },
17
24
  "keywords": [
18
25
  "scss",
19
26
  "css",
20
27
  "nuvoui",
21
- "ui-library"
28
+ "ui-library",
29
+ "design-system",
30
+ "frontend",
31
+ "responsive",
32
+ "modern"
22
33
  ],
23
- "author": "AALA IT Solutions",
34
+ "author": {
35
+ "name": "AALA IT Solutions",
36
+ "url": "https://aalasolutions.com"
37
+ },
24
38
  "license": "MIT",
39
+ "bugs": {
40
+ "url": "https://github.com/NuvoUI/core/issues"
41
+ },
25
42
  "publishConfig": {
26
43
  "access": "public"
27
44
  },
package/src/logo.png ADDED
Binary file
package/src/logo.svg ADDED
@@ -0,0 +1,12 @@
1
+ <svg width="418" height="418" viewBox="0 0 418 418" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <mask id="mask0_4118_5137" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="418" height="418">
3
+ <rect width="418" height="418" fill="#F1F4D8"/>
4
+ </mask>
5
+ <g mask="url(#mask0_4118_5137)">
6
+ <rect width="418" height="418" fill="#F1F4D8"/>
7
+ <path d="M418 419H77L296.5 262.5L418 201V419Z" fill="#0476A4"/>
8
+ <path d="M316.794 -185.998L487.294 109.316L242.011 -2.52617L128 -76.9983L316.794 -185.998Z" fill="#0476A4"/>
9
+ <line x1="-17.2721" y1="410.484" x2="431.728" y2="185.484" stroke="#5FCFFF" stroke-width="28"/>
10
+ <circle cx="267" cy="183" r="66.5" stroke="#FF7B00" stroke-width="15"/>
11
+ </g>
12
+ </svg>
@@ -66,10 +66,4 @@ a {
66
66
  &:hover {
67
67
  color: var(--link-hover-color);
68
68
  }
69
- }
70
-
71
- // Lists
72
- ul, ol {
73
- margin-bottom: 1rem;
74
- padding-left: 2rem;
75
- }
69
+ }
@@ -69,9 +69,20 @@ select {
69
69
  }
70
70
 
71
71
  // Remove list styles
72
- ul[role='list'],
73
- ol[role='list'] {
72
+ ul,
73
+ ol {
74
74
  list-style: none;
75
+ margin: 0;
76
+ padding: 0;
77
+ // Modern properties
78
+ padding-inline-start: 0; // Replaces padding-left
79
+ margin-block: 0; // Replaces margin-top/bottom
80
+ }
81
+
82
+ li {
83
+ margin: 0;
84
+ padding: 0;
85
+ margin-block: 0;
75
86
  }
76
87
 
77
88
  // Set core root defaults
@@ -83,7 +83,7 @@
83
83
  @mixin form-select {
84
84
  @include form-input;
85
85
  appearance: none;
86
- background-image: url("data:image/svg+xml,...");
86
+ background-image: url("data:image/svg+xml,..."); // todo: colored arrow svg
87
87
  background-repeat: no-repeat;
88
88
  background-position: right 1rem center;
89
89
  padding-right: 2.5rem;
@@ -110,7 +110,7 @@
110
110
  &:checked {
111
111
  background-color: var(--primary);
112
112
  border-color: var(--primary);
113
- background-image: url("data:image/svg+xml,...");
113
+ background-image: url("data:image/svg+xml,..."); // todo: colored arrow svg
114
114
  }
115
115
  }
116
116
 
@@ -1,35 +1,24 @@
1
1
  // _navbar.scss
2
2
 
3
- @use '../utilities/variables' as *;
3
+ @use '../utilities/responsive' as Responsive;
4
4
  @use '../utilities/shadows' as *;
5
+ @use '../utilities/variables' as *;
5
6
  @use '../layouts/container' as Container;
6
7
  @use '../layouts/flex' as Flex;
7
- @use '../layouts/grid' as Grid;
8
-
9
- :root {
10
- --shadow-color: 255, 0, 0;
11
- }
12
8
 
13
9
  .navbar {
14
-
15
- @include Flex.between;
16
10
  @include Container.container-flex;
17
11
 
18
- // @include Grid.grid-flow-row;
19
- // @include Grid.grid-flow-col;
20
- // @include Grid.grid-cols(2);
21
- // @include Container.container-grid;
22
-
23
12
  & {
24
13
  @include Flex.align-center;
25
- // @include shadow('md', 'colored');
26
-
27
- background-color: var(--nav-bg);
14
+ @include Flex.between;
28
15
 
29
16
  &:hover {
30
17
  @include shadow('lg', 'dark');
31
18
  }
32
19
 
20
+ background-color: var(--nav-bg);
21
+
33
22
  .logo {
34
23
  img {
35
24
  max-height: 40px;
@@ -103,23 +92,50 @@
103
92
  }
104
93
  }
105
94
 
106
- @media (max-width: 768px) {
107
- flex-direction: column;
108
-
95
+ // Responsive styles
96
+ @include Responsive.media-down(md) {
109
97
  .menu {
98
+ transition: all 1.3s ease;
99
+ display: none;
110
100
  flex-direction: column;
101
+ background-color: var(--nav-bg);
102
+ position: absolute;
103
+ top: 100%;
104
+ left: 0;
111
105
  width: 100%;
112
106
 
113
- .submenu {
114
- position: static;
115
- display: none;
107
+ &[data-visible="true"] {
108
+ display: flex;
109
+ }
110
+
111
+ li {
116
112
  width: 100%;
113
+ text-align: left;
114
+
115
+ .submenu {
116
+ position: relative;
117
+ left: 0;
118
+ top: 0;
119
+ display: none;
120
+ visibility: visible;
121
+ opacity: 1;
122
+ pointer-events: auto;
123
+ box-shadow: none;
124
+ background-color: var(--nav-hover);
117
125
 
118
- li a {
119
- padding-left: 2rem;
126
+ &[data-visible="true"] {
127
+ display: flex;
128
+ flex-direction: column;
129
+ }
120
130
  }
121
131
  }
122
132
  }
133
+
134
+ .navbar__cta {
135
+ width: 100%;
136
+ justify-content: center;
137
+ padding: 1rem 0;
138
+ }
123
139
  }
124
140
  }
125
141
  }
@@ -9,7 +9,10 @@
9
9
  // Utilities
10
10
  @forward 'utilities/animations';
11
11
  @forward 'utilities/colors';
12
+ @forward 'utilities/display';
13
+ @forward 'utilities/hamburger';
12
14
  @forward 'utilities/position';
15
+ @forward 'utilities/responsive';
13
16
  @forward 'utilities/shadows';
14
17
  @forward 'utilities/spacing';
15
18
  @forward 'utilities/typography';
@@ -41,6 +41,12 @@
41
41
  // Flex Child Mixins
42
42
  @mixin w-full {flex: 0 0 100%;}
43
43
  @mixin w-auto {flex: 1 1 auto;}
44
+ @mixin grow { flex: 1 1 0%; }
45
+ @mixin no-grow { flex: none; }
46
+
47
+ @mixin w-col($size) {
48
+ flex: 0 0 math.percentage(math.div($size, $column-count));
49
+ }
44
50
 
45
51
  // Base flex container
46
52
  .flex {
@@ -72,19 +78,14 @@
72
78
  &.items-baseline { align-items: baseline; }
73
79
  &.items-stretch { align-items: stretch; }
74
80
 
75
- // Gap modifiers
76
- @for $i from 0 through 8 {
77
- &.gap-#{$i} { gap: #{$i * 0.25}rem; }
78
- }
79
-
80
81
  // Child flex items (using column count)
81
- > .w-auto { flex: 1 1 auto; }
82
- > .w-full { flex: 0 0 100%; }
83
-
82
+ > .w-auto { @include w-auto }
83
+ > .w-full { @include w-full }
84
+ > .grow { @include grow; }
85
+ > .no-grow { @include no-grow; }
84
86
  @for $i from 1 through $column-count {
85
- > .w-#{$i} {
86
- flex: 0 0 math.percentage( math.div($i, $column-count));
87
- }
87
+ > .w-#{$i} { @include w-col($i) }
88
+ > .order-#{$i} { order: $i; }
88
89
  }
89
90
  }
90
91
 
@@ -92,46 +93,41 @@
92
93
  // Responsive variants
93
94
  @each $breakpoint, $width in $breakpoints {
94
95
  @media (min-width: $width) {
95
- .#{$breakpoint}\: {
96
+ .flex {
96
97
  // Direction
97
- &row { flex-direction: row; }
98
- &row-reverse { flex-direction: row-reverse; }
99
- &col { flex-direction: column; }
100
- &col-reverse { flex-direction: column-reverse; }
98
+ &.row\@#{$breakpoint} { flex-direction: row; }
99
+ &.row-reverse\@#{$breakpoint} { flex-direction: row-reverse; }
100
+ &.col\@#{$breakpoint} { flex-direction: column; }
101
+ &.col-reverse\@#{$breakpoint} { flex-direction: column-reverse; }
101
102
 
102
103
  // Wrap
103
- &wrap { flex-wrap: wrap; }
104
- &nowrap { flex-wrap: nowrap; }
105
- &wrap-reverse { flex-wrap: wrap-reverse; }
104
+ &.wrap\@#{$breakpoint} { flex-wrap: wrap; }
105
+ &.nowrap\@#{$breakpoint} { flex-wrap: nowrap; }
106
+ &.wrap-reverse\@#{$breakpoint} { flex-wrap: wrap-reverse; }
106
107
 
107
108
  // Justify
108
- &start { justify-content: flex-start; }
109
- &end { justify-content: flex-end; }
110
- &center { justify-content: center; }
111
- &between { justify-content: space-between; }
112
- &around { justify-content: space-around; }
113
- &evenly { justify-content: space-evenly; }
114
-
109
+ &.start\@#{$breakpoint} { justify-content: flex-start; }
110
+ &.end\@#{$breakpoint} { justify-content: flex-end; }
111
+ &.center\@#{$breakpoint} { justify-content: center; }
112
+ &.between\@#{$breakpoint} { justify-content: space-between; }
113
+ &.around\@#{$breakpoint} { justify-content: space-around; }
114
+ &.evenly\@#{$breakpoint} { justify-content: space-evenly; }
115
+
115
116
  // Align
116
- &items-start { align-items: flex-start; }
117
- &items-end { align-items: flex-end; }
118
- &items-center { align-items: center; }
119
- &items-baseline { align-items: baseline; }
120
- &items-stretch { align-items: stretch; }
121
-
117
+ &.items-start\@#{$breakpoint} { align-items: flex-start; }
118
+ &.items-end\@#{$breakpoint} { align-items: flex-end; }
119
+ &.items-center\@#{$breakpoint} { align-items: center; }
120
+ &.items-baseline\@#{$breakpoint} { align-items: baseline; }
121
+ &.items-stretch\@#{$breakpoint} { align-items: stretch; }
122
+
122
123
  // Width (using column count)
123
- &w-auto { flex: 1 1 auto; }
124
- &w-full { flex: 0 0 100%; }
125
-
124
+ & > .w-auto\@#{$breakpoint} { flex: 1 1 auto; }
125
+ & > .w-full\@#{$breakpoint} { flex: 0 0 100%; }
126
+ & > .grow\@#{$breakpoint} { @include grow; }
127
+ & > .no-grow\@#{$breakpoint} { @include no-grow; }
126
128
  @for $i from 1 through $column-count {
127
- &w-#{$i} {
128
- flex: 0 0 math.percentage(math.div($i, $column-count));
129
- }
130
- }
131
-
132
- // Gap
133
- @for $i from 0 through 8 {
134
- &gap-#{$i} { gap: #{$i * 0.25}rem; }
129
+ & > .w-#{$i}\@#{$breakpoint} { @include w-col($i) }
130
+ & > .order-#{$i}\@#{$breakpoint} { order: $i; }
135
131
  }
136
132
  }
137
133
  }
@@ -24,8 +24,7 @@ $generated-keyframes: ();
24
24
  }
25
25
  }
26
26
 
27
-
28
- @mixin animate-move($props) {
27
+ @mixin animate-bounce($props) {
29
28
  $defaults: (
30
29
  vertical: 0%,
31
30
  horizontal: 0%,
@@ -36,8 +35,8 @@ $generated-keyframes: ();
36
35
  // Merge with defaults
37
36
  $props: map.merge($defaults, $props);
38
37
 
39
- $x: map.get($props, 'vertical');
40
- $y: map.get($props, 'horizontal');
38
+ $x: map.get($props, 'horizontal');
39
+ $y: map.get($props, 'vertical');
41
40
  $duration: map.get($props, 'duration');
42
41
  $easing: map.get($props, 'timing');
43
42
  $iteration: map.get($props, 'iteration');
@@ -144,15 +144,3 @@
144
144
  @include backdrop-filter(blur(5px) saturate(180%));
145
145
  background-color: rgba(255, 255, 255, 0.8);
146
146
  }
147
-
148
- // <div class="bg-primary-0">Lightest shade</div>
149
- // <div class="bg-primary-4">Middle shade</div>
150
- // <div class="bg-primary-8">Darkest shade</div>
151
-
152
- // <div class="brand-complementary">Complementary colors</div>
153
-
154
- // <div class="text-on-background">Accessible text</div>
155
-
156
- // <div class="glass-effect">
157
- // Blurred backdrop
158
- // </div>
@@ -0,0 +1,42 @@
1
+ @use "sass:math";
2
+ @use 'sass:color';
3
+ @use 'sass:map';
4
+
5
+ @use './variables' as *;
6
+
7
+
8
+
9
+ // Display Mixins
10
+ @mixin d-none { display: none; }
11
+ @mixin d-block { display: block; }
12
+ @mixin d-inline { display: inline; }
13
+ @mixin d-inline-block { display: inline-block; }
14
+ @mixin d-table { display: table; }
15
+ @mixin d-table-row { display: table-row; }
16
+ @mixin d-table-cell { display: table-cell; }
17
+
18
+ // Base Classes
19
+ .hide { @include d-none; }
20
+ .block { @include d-block; }
21
+ .inline { @include d-inline; }
22
+ .inline-block { @include d-inline-block; }
23
+ .d {
24
+ &-table { @include d-table; }
25
+ &-table-row { @include d-table-row; }
26
+ &-table-cell { @include d-table-cell; }
27
+ }
28
+
29
+ // Responsive Variants
30
+ @each $breakpoint, $width in $breakpoints {
31
+ @media (min-width: $width) {
32
+ .hide\@#{$breakpoint} { @include d-none; }
33
+ .block\@#{$breakpoint} { @include d-block; }
34
+ .inline\@#{$breakpoint} { @include d-inline; }
35
+ .inline-block\@#{$breakpoint} { @include d-inline-block; }
36
+ .d {
37
+ &-table\@#{$breakpoint} { @include d-table; }
38
+ &-table-row\@#{$breakpoint} { @include d-table-row; }
39
+ &-table-cell\@#{$breakpoint} { @include d-table-cell; }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,74 @@
1
+ @use "sass:math";
2
+ @use 'sass:color';
3
+ @use 'sass:map';
4
+ @use '../utilities/responsive' as Responsive;
5
+
6
+ @use './variables' as *;
7
+
8
+ // _mixins.scss
9
+ @mixin hamburger($color: currentColor, $size: 24px, $thickness: 2px) {
10
+ .hamburger {
11
+ @include Responsive.media-up('md') {
12
+ display: none;
13
+ }
14
+
15
+ & {
16
+ --hamburger-color: #{$color};
17
+ --hamburger-size: #{$size};
18
+ --hamburger-thickness: #{$thickness};
19
+
20
+ &:focus {
21
+ outline: none;
22
+ box-shadow: none;
23
+ }
24
+
25
+ // display: none;
26
+ cursor: pointer;
27
+ width: var(--hamburger-size);
28
+ height: var(--hamburger-size);
29
+ position: relative;
30
+ border: 0;
31
+ background: transparent;
32
+ padding: 0;
33
+
34
+ &[aria-expanded="true"] span {
35
+ &:first-child {
36
+ transform: translateY(7px) rotate(45deg);
37
+ }
38
+
39
+ &:nth-child(2) {
40
+ opacity: 0;
41
+ }
42
+
43
+ &:last-child {
44
+ transform: translateY(-7px) rotate(-45deg);
45
+ }
46
+ }
47
+
48
+ span {
49
+ display: block;
50
+ position: absolute;
51
+ left: 0;
52
+ right: 0;
53
+ height: var(--hamburger-thickness);
54
+ background-color: var(--hamburger-color);
55
+ transform-origin: center;
56
+ transition: transform 0.2s ease,
57
+ opacity 0.2s ease;
58
+
59
+ &:first-child {
60
+ top: 20%;
61
+ }
62
+
63
+ &:nth-child(2) {
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ }
67
+
68
+ &:last-child {
69
+ bottom: 20%;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -44,19 +44,19 @@
44
44
  // Responsive Position Classes
45
45
  @each $breakpoint, $width in $breakpoints {
46
46
  @media (min-width: $width) {
47
- .#{$breakpoint}\:p-static {
47
+ .p-static\@#{$breakpoint} {
48
48
  @include p-static;
49
49
  }
50
- .#{$breakpoint}\:p-relative {
50
+ .p-relative\@#{$breakpoint} {
51
51
  @include p-relative;
52
52
  }
53
- .#{$breakpoint}\:p-absolute {
53
+ .p-absolute\@#{$breakpoint} {
54
54
  @include p-absolute;
55
55
  }
56
- .#{$breakpoint}\:p-fixed {
56
+ .p-fixed\@#{$breakpoint} {
57
57
  @include p-fixed;
58
58
  }
59
- .#{$breakpoint}\:p-sticky {
59
+ .p-sticky\@#{$breakpoint} {
60
60
  @include p-sticky;
61
61
  }
62
62
  }