@oardi/css-utils 0.48.0 → 0.50.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oardi/css-utils",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "author": "Ardian Shala",
5
5
  "homepage": "https://css-utils.oardi.com",
6
6
  "description": "Powerful set of semantic css classes with support for breakpoints, directions and spacings",
@@ -4,20 +4,6 @@
4
4
  @layer utilities {
5
5
  @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
6
6
  @media (min-width: #{$bp-value}) {
7
- @each $key, $value in map.get(theme.$theme, spacings) {
8
- .gap-#{$bp}-#{$key} {
9
- gap: $value;
10
- }
11
-
12
- .row-gap-#{$bp}-#{$key} {
13
- row-gap: $value;
14
- }
15
-
16
- .column-gap-#{$bp}-#{$key} {
17
- column-gap: $value;
18
- }
19
- }
20
-
21
7
  // basic
22
8
  .d-#{$bp}-flex {
23
9
  display: flex;
package/scss/flex.scss CHANGED
@@ -150,19 +150,4 @@
150
150
 
151
151
  // align-content
152
152
  // TODO
153
-
154
- // gap - move to own file?
155
- @each $key, $value in map.get(theme.$theme, spacings) {
156
- .gap-#{$key} {
157
- gap: $value;
158
- }
159
-
160
- .row-gap-#{$key} {
161
- row-gap: $value;
162
- }
163
-
164
- .column-gap-#{$key} {
165
- column-gap: $value;
166
- }
167
- }
168
153
  }
@@ -0,0 +1,22 @@
1
+ @use 'sass:map';
2
+ @use './theme.scss';
3
+
4
+ @layer utilities {
5
+ @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
6
+ @media (min-width: #{$bp-value}) {
7
+ @each $key, $value in map.get(theme.$theme, spacings) {
8
+ .gap-#{$bp}-#{$key} {
9
+ gap: $value;
10
+ }
11
+
12
+ .row-gap-#{$bp}-#{$key} {
13
+ row-gap: $value;
14
+ }
15
+
16
+ .column-gap-#{$bp}-#{$key} {
17
+ column-gap: $value;
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
package/scss/gap.scss ADDED
@@ -0,0 +1,18 @@
1
+ @use 'sass:map';
2
+ @use './theme.scss' as theme;
3
+
4
+ @layer utilities {
5
+ @each $key, $value in map.get(theme.$theme, spacings) {
6
+ .gap-#{$key} {
7
+ gap: $value;
8
+ }
9
+
10
+ .row-gap-#{$key} {
11
+ row-gap: $value;
12
+ }
13
+
14
+ .column-gap-#{$key} {
15
+ column-gap: $value;
16
+ }
17
+ }
18
+ }
package/scss/index.scss CHANGED
@@ -5,12 +5,19 @@
5
5
  @forward './text.scss';
6
6
 
7
7
  @forward './utilities.scss';
8
+
8
9
  @forward './spacings.scss';
9
10
  @forward './spacings-responsive.scss';
11
+
10
12
  @forward './flex.scss';
11
13
  @forward './flex-responsive.scss';
14
+
12
15
  @forward './grid.scss';
13
16
  @forward './grid-responsive.scss';
17
+
18
+ @forward './gap.scss';
19
+ @forward './gap-responsive.scss';
20
+
14
21
  @forward './borders.scss';
15
22
 
16
23
  @forward './components/breadcrumb.scss';
@@ -1,276 +1,278 @@
1
1
  @use 'sass:map';
2
2
  @use './theme.scss';
3
3
 
4
- // positions
5
- @each $value in map.get(theme.$theme, positions) {
6
- .position-#{$value} {
7
- position: $value;
4
+ @layer utilities {
5
+ // positions
6
+ @each $value in map.get(theme.$theme, positions) {
7
+ .position-#{$value} {
8
+ position: $value;
9
+ }
8
10
  }
9
- }
10
11
 
11
- .container {
12
- max-width: var(--container);
13
- margin-left: auto;
14
- margin-right: auto;
15
- padding-left: var(--spacer-3);
16
- padding-right: var(--spacer-3);
17
- width: 100%;
18
- }
12
+ .container {
13
+ max-width: var(--container);
14
+ margin-left: auto;
15
+ margin-right: auto;
16
+ padding-left: var(--spacer-3);
17
+ padding-right: var(--spacer-3);
18
+ width: 100%;
19
+ }
19
20
 
20
- .bg-opacity-10 {
21
- --bg-opacity: 0.1;
22
- }
21
+ .bg-opacity-10 {
22
+ --bg-opacity: 0.1;
23
+ }
23
24
 
24
- .bg-opacity-25 {
25
- --bg-opacity: 0.25;
26
- }
25
+ .bg-opacity-25 {
26
+ --bg-opacity: 0.25;
27
+ }
27
28
 
28
- .bg-opacity-50 {
29
- --bg-opacity: 0.5;
30
- }
29
+ .bg-opacity-50 {
30
+ --bg-opacity: 0.5;
31
+ }
31
32
 
32
- .bg-opacity-75 {
33
- --bg-opacity: 0.75;
34
- }
33
+ .bg-opacity-75 {
34
+ --bg-opacity: 0.75;
35
+ }
35
36
 
36
- @each $name, $value in map.get(theme.$theme, colors) {
37
- .bg-#{$name} {
38
- color: var(--on-#{$name});
39
- fill: var(--on-#{$name});
40
- background-color: rgba(var(--#{$name}-rgb), var(--bg-opacity));
37
+ @each $name, $value in map.get(theme.$theme, colors) {
38
+ .bg-#{$name} {
39
+ color: var(--on-#{$name});
40
+ fill: var(--on-#{$name});
41
+ background-color: rgba(var(--#{$name}-rgb), var(--bg-opacity));
42
+ }
41
43
  }
42
- }
43
44
 
44
- @each $name, $value in map.get(theme.$theme, grays) {
45
- .bg-gray-#{$name} {
46
- background-color: var(--gray-#{$name});
45
+ @each $name, $value in map.get(theme.$theme, grays) {
46
+ .bg-gray-#{$name} {
47
+ background-color: var(--gray-#{$name});
48
+ }
47
49
  }
48
- }
49
50
 
50
- .bg-white {
51
- background-color: var(--white);
52
- }
51
+ .bg-white {
52
+ background-color: var(--white);
53
+ }
53
54
 
54
- .bg-black {
55
- background-color: var(--black);
56
- }
55
+ .bg-black {
56
+ background-color: var(--black);
57
+ }
57
58
 
58
- .bg-surface {
59
- background-color: var(--bg-surface);
60
- }
59
+ .bg-surface {
60
+ background-color: var(--bg-surface);
61
+ }
61
62
 
62
- .img-responsive {
63
- width: 100%;
64
- }
63
+ .img-responsive {
64
+ width: 100%;
65
+ }
65
66
 
66
- .rounded {
67
- border-radius: var(--border-radius);
68
- }
67
+ .rounded {
68
+ border-radius: var(--border-radius);
69
+ }
69
70
 
70
- .rounded-sm {
71
- border-radius: var(--border-radius-sm);
72
- }
71
+ .rounded-sm {
72
+ border-radius: var(--border-radius-sm);
73
+ }
73
74
 
74
- .rounded-lg {
75
- border-radius: var(--border-radius-lg);
76
- }
75
+ .rounded-lg {
76
+ border-radius: var(--border-radius-lg);
77
+ }
77
78
 
78
- .rounded-pill {
79
- border-radius: 9999px;
80
- }
79
+ .rounded-pill {
80
+ border-radius: 9999px;
81
+ }
81
82
 
82
- .rounded-circle {
83
- border-radius: 50%;
84
- }
83
+ .rounded-circle {
84
+ border-radius: 50%;
85
+ }
85
86
 
86
- .rounded-top {
87
- border-top-right-radius: var(--border-radius);
88
- border-top-left-radius: var(--border-radius);
89
- }
87
+ .rounded-top {
88
+ border-top-right-radius: var(--border-radius);
89
+ border-top-left-radius: var(--border-radius);
90
+ }
90
91
 
91
- .rounded-bottom {
92
- border-bottom-right-radius: var(--border-radius);
93
- border-bottom-left-radius: var(--border-radius);
94
- }
92
+ .rounded-bottom {
93
+ border-bottom-right-radius: var(--border-radius);
94
+ border-bottom-left-radius: var(--border-radius);
95
+ }
95
96
 
96
- .rounded-start {
97
- border-top-left-radius: var(--border-radius);
98
- border-bottom-left-radius: var(--border-radius);
99
- }
97
+ .rounded-start {
98
+ border-top-left-radius: var(--border-radius);
99
+ border-bottom-left-radius: var(--border-radius);
100
+ }
100
101
 
101
- .rounded-end {
102
- border-top-right-radius: var(--border-radius);
103
- border-bottom-right-radius: var(--border-radius);
104
- }
102
+ .rounded-end {
103
+ border-top-right-radius: var(--border-radius);
104
+ border-bottom-right-radius: var(--border-radius);
105
+ }
105
106
 
106
- .rounded-0 {
107
- border-radius: 0;
108
- }
107
+ .rounded-0 {
108
+ border-radius: 0;
109
+ }
109
110
 
110
- .shadow-0 {
111
- box-shadow: none;
112
- }
111
+ .shadow-0 {
112
+ box-shadow: none;
113
+ }
113
114
 
114
- .shadow-sm {
115
- box-shadow: var(--shadow-sm);
116
- }
115
+ .shadow-sm {
116
+ box-shadow: var(--shadow-sm);
117
+ }
117
118
 
118
- .shadow {
119
- box-shadow: var(--shadow);
120
- }
119
+ .shadow {
120
+ box-shadow: var(--shadow);
121
+ }
121
122
 
122
- .shadow-lg {
123
- box-shadow: var(--shadow-lg);
124
- }
123
+ .shadow-lg {
124
+ box-shadow: var(--shadow-lg);
125
+ }
125
126
 
126
- .hover-shadow-sm {
127
- transition:
128
- box-shadow var(--transition-duration-fast) ease-out,
129
- transform var(--transition-duration-fast) ease-out;
127
+ .hover-shadow-sm {
128
+ transition:
129
+ box-shadow var(--transition-duration-fast) ease-out,
130
+ transform var(--transition-duration-fast) ease-out;
130
131
 
131
- &:hover {
132
- box-shadow: var(--shadow-sm);
132
+ &:hover {
133
+ box-shadow: var(--shadow-sm);
134
+ }
133
135
  }
134
- }
135
136
 
136
- .hover-shadow {
137
- transition:
138
- box-shadow var(--transition-duration-fast) ease-out,
139
- transform var(--transition-duration-fast) ease-out;
137
+ .hover-shadow {
138
+ transition:
139
+ box-shadow var(--transition-duration-fast) ease-out,
140
+ transform var(--transition-duration-fast) ease-out;
140
141
 
141
- &:hover {
142
- box-shadow: var(--shadow);
142
+ &:hover {
143
+ box-shadow: var(--shadow);
144
+ }
143
145
  }
144
- }
145
146
 
146
- .hover-shadow-lg {
147
- transition:
148
- box-shadow var(--transition-duration-fast) ease-out,
149
- transform var(--transition-duration-fast) ease-out;
147
+ .hover-shadow-lg {
148
+ transition:
149
+ box-shadow var(--transition-duration-fast) ease-out,
150
+ transform var(--transition-duration-fast) ease-out;
150
151
 
151
- &:hover {
152
- box-shadow: var(--shadow-lg);
152
+ &:hover {
153
+ box-shadow: var(--shadow-lg);
154
+ }
153
155
  }
154
- }
155
156
 
156
- .w-100 {
157
- width: 100%;
158
- }
157
+ .w-100 {
158
+ width: 100%;
159
+ }
159
160
 
160
- .w-60 {
161
- width: 60%;
162
- }
161
+ .w-60 {
162
+ width: 60%;
163
+ }
163
164
 
164
- .w-50 {
165
- width: 50%;
166
- }
165
+ .w-50 {
166
+ width: 50%;
167
+ }
167
168
 
168
- .w-40 {
169
- width: 40%;
170
- }
169
+ .w-40 {
170
+ width: 40%;
171
+ }
171
172
 
172
- // TODO - add several heights
173
- .h-100 {
174
- height: 100%;
175
- }
173
+ // TODO - add several heights
174
+ .h-100 {
175
+ height: 100%;
176
+ }
176
177
 
177
- // TODO - check if more classes are needed
178
- // arrange elements top, start, bottom, end
179
- .top-0 {
180
- top: 0px;
181
- }
178
+ // TODO - check if more classes are needed
179
+ // arrange elements top, start, bottom, end
180
+ .top-0 {
181
+ top: 0px;
182
+ }
182
183
 
183
- .right-0 {
184
- right: 0px;
185
- }
184
+ .right-0 {
185
+ right: 0px;
186
+ }
186
187
 
187
- .bottom-0 {
188
- bottom: 0px;
189
- }
188
+ .bottom-0 {
189
+ bottom: 0px;
190
+ }
190
191
 
191
- .left-0 {
192
- left: 0px;
193
- }
192
+ .left-0 {
193
+ left: 0px;
194
+ }
194
195
 
195
- .fixed-top {
196
- position: fixed;
197
- top: 0;
198
- right: 0;
199
- left: 0;
200
- z-index: 1030;
201
- }
196
+ .fixed-top {
197
+ position: fixed;
198
+ top: 0;
199
+ right: 0;
200
+ left: 0;
201
+ z-index: 1030;
202
+ }
202
203
 
203
- .overflow-y-scroll {
204
- overflow-y: scroll;
205
- }
204
+ .overflow-y-scroll {
205
+ overflow-y: scroll;
206
+ }
206
207
 
207
- .no-scroll {
208
- overflow: hidden;
209
- position: fixed;
210
- width: 100%;
211
- height: 100%;
212
- }
208
+ .no-scroll {
209
+ overflow: hidden;
210
+ position: fixed;
211
+ width: 100%;
212
+ height: 100%;
213
+ }
213
214
 
214
- // width, height, display with breakpoints and directions
215
- @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
216
- @media (min-width: #{$bp-value}) {
217
- .w-#{$bp}-100 {
218
- width: 100%;
219
- }
215
+ // width, height, display with breakpoints and directions
216
+ @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
217
+ @media (min-width: #{$bp-value}) {
218
+ .w-#{$bp}-100 {
219
+ width: 100%;
220
+ }
220
221
 
221
- .w-#{$bp}-60 {
222
- width: 60%;
223
- }
222
+ .w-#{$bp}-60 {
223
+ width: 60%;
224
+ }
224
225
 
225
- .w-#{$bp}-50 {
226
- width: 50%;
227
- }
226
+ .w-#{$bp}-50 {
227
+ width: 50%;
228
+ }
228
229
 
229
- .w-#{$bp}-40 {
230
- width: 40%;
231
- }
230
+ .w-#{$bp}-40 {
231
+ width: 40%;
232
+ }
232
233
 
233
- .w-#{$bp}-30 {
234
- width: 30%;
234
+ .w-#{$bp}-30 {
235
+ width: 30%;
236
+ }
235
237
  }
236
238
  }
237
- }
238
239
 
239
- // display
240
- .d-none {
241
- display: none;
242
- }
240
+ // display
241
+ .d-none {
242
+ display: none;
243
+ }
243
244
 
244
- .d-block {
245
- display: block;
246
- }
245
+ .d-block {
246
+ display: block;
247
+ }
247
248
 
248
- .d-inline-block {
249
- display: inline-block;
250
- }
249
+ .d-inline-block {
250
+ display: inline-block;
251
+ }
251
252
 
252
- .hidden {
253
- visibility: hidden;
254
- }
253
+ .hidden {
254
+ visibility: hidden;
255
+ }
255
256
 
256
- @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
257
- @media (min-width: #{$bp-value}) {
258
- .d-#{$bp}-none {
259
- display: none;
260
- }
257
+ @each $bp, $bp-value in map.get(theme.$theme, breakpoints) {
258
+ @media (min-width: #{$bp-value}) {
259
+ .d-#{$bp}-none {
260
+ display: none;
261
+ }
261
262
 
262
- .d-#{$bp}-block {
263
- display: block;
264
- }
263
+ .d-#{$bp}-block {
264
+ display: block;
265
+ }
265
266
 
266
- .d-#{$bp}-inline-block {
267
- display: inline-block;
267
+ .d-#{$bp}-inline-block {
268
+ display: inline-block;
269
+ }
268
270
  }
269
271
  }
270
- }
271
272
 
272
- @each $name, $value in map.get(theme.$theme, zIndexLevels) {
273
- .z-index-#{$name} {
274
- z-index: $value;
273
+ @each $name, $value in map.get(theme.$theme, zIndexLevels) {
274
+ .z-index-#{$name} {
275
+ z-index: $value;
276
+ }
275
277
  }
276
278
  }
@@ -33,20 +33,20 @@
33
33
  --spacer-#{$name}: #{$value};
34
34
  }
35
35
 
36
- --line-height: 1.7;
36
+ --line-height: 1.8;
37
37
  --font-size: 16px;
38
38
  --font-weight: 400;
39
39
  --font-family: 'Inter', sans-serif;
40
40
 
41
- --body-bg-color: var(--gray-50);
41
+ --body-bg-color: #fdfdfd;
42
42
 
43
43
  --bg-surface: var(--white);
44
44
  --bg-surface-hover: var(--gray-50);
45
45
  --bg-surface-active: var(--gray-100);
46
46
 
47
- --text-color: var(--gray-900);
47
+ --text-color: var(--gray-950);
48
48
  --text-color-inverse: var(--gray-50);
49
- --text-color-muted: var(--gray-500);
49
+ --text-color-muted: var(--gray-550);
50
50
  --text-color-subtle: var(--gray-400);
51
51
 
52
52
  --highlight: rgba(0, 0, 0, 0.15);