@nuvoui/core 1.1.8 → 1.2.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/README.md +90 -35
- package/dist/nuvoui.css +28531 -0
- package/dist/nuvoui.css.map +1 -0
- package/dist/nuvoui.min.css +2 -1
- package/dist/nuvoui.min.css.map +1 -0
- package/package.json +48 -27
- package/src/styles/abstracts/_config.scss +157 -0
- package/src/styles/abstracts/_functions.scss +81 -0
- package/src/styles/abstracts/_index.scss +2 -0
- package/src/styles/base/_base.scss +2 -2
- package/src/styles/base/_index.scss +2 -0
- package/src/styles/base/_reset.scss +8 -6
- package/src/styles/index.scss +11 -30
- package/src/styles/layouts/_container.scss +2 -21
- package/src/styles/layouts/_flex.scss +4 -3
- package/src/styles/layouts/_grid.scss +3 -35
- package/src/styles/layouts/_index.scss +3 -0
- package/src/styles/mixins-map.scss +875 -1477
- package/src/styles/themes/_index.scss +1 -0
- package/src/styles/themes/_theme.scss +175 -57
- package/src/styles/utilities/_alignment.scss +1 -1
- package/src/styles/utilities/_animations.scss +65 -61
- package/src/styles/utilities/_borders.scss +280 -16
- package/src/styles/utilities/_colors.scss +68 -49
- package/src/styles/utilities/_container-queries.scss +9 -10
- package/src/styles/utilities/_display.scss +2 -2
- package/src/styles/utilities/_helpers.scss +110 -108
- package/src/styles/utilities/_index.scss +19 -0
- package/src/styles/utilities/_media-queries.scss +48 -14
- package/src/styles/utilities/_opacity.scss +33 -15
- package/src/styles/utilities/_position.scss +7 -7
- package/src/styles/utilities/_shadows.scss +147 -95
- package/src/styles/utilities/_sizing.scss +22 -21
- package/src/styles/utilities/_spacing.scss +38 -22
- package/src/styles/utilities/_tooltips.scss +153 -105
- package/src/styles/utilities/_transitions.scss +1 -1
- package/src/styles/utilities/_typography.scss +4 -4
- package/src/styles/utilities/_functions.scss +0 -84
- package/src/styles/utilities/_variables.scss +0 -126
|
@@ -1,95 +1,130 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// Tooltip core variables
|
|
3
|
+
--tooltip-bg: rgba(17 17 17 / 90%);
|
|
4
|
+
--tooltip-shadow-color: rgb(0 0 0 / 20%);
|
|
5
|
+
--tooltip-text-color: #FFF;
|
|
1
6
|
|
|
7
|
+
// Animation variables
|
|
8
|
+
--microtip-transition-duration: 0.18s;
|
|
9
|
+
--microtip-transition-easing: ease-in-out;
|
|
10
|
+
--microtip-transition-delay: 0s;
|
|
2
11
|
|
|
3
|
-
|
|
4
|
-
|
|
12
|
+
// Typography variables
|
|
13
|
+
--microtip-font-size: 13px;
|
|
14
|
+
--microtip-font-weight: normal;
|
|
15
|
+
--microtip-text-transform: none;
|
|
16
|
+
|
|
17
|
+
// Sizing variables
|
|
18
|
+
--tooltip-small-width: 80px;
|
|
19
|
+
--tooltip-medium-width: 150px;
|
|
20
|
+
--tooltip-large-width: 260px;
|
|
21
|
+
--tooltip-border-radius: 4px;
|
|
5
22
|
}
|
|
6
23
|
|
|
7
|
-
[data-tooltip][role~="tooltip"]
|
|
8
|
-
|
|
24
|
+
[data-tooltip][role~="tooltip"] {
|
|
25
|
+
position: relative;
|
|
26
|
+
|
|
27
|
+
&::before,
|
|
28
|
+
&::after {
|
|
9
29
|
transform: translate3d(0, 0, 0);
|
|
10
30
|
backface-visibility: hidden;
|
|
11
31
|
will-change: transform;
|
|
12
32
|
opacity: 0;
|
|
13
33
|
pointer-events: none;
|
|
14
|
-
transition: all var(--microtip-transition-duration
|
|
34
|
+
transition: all var(--microtip-transition-duration) var(--microtip-transition-easing)
|
|
35
|
+
var(--microtip-transition-delay);
|
|
15
36
|
position: absolute;
|
|
16
37
|
box-sizing: border-box;
|
|
17
38
|
z-index: 10;
|
|
18
|
-
transform-origin: top
|
|
19
|
-
}
|
|
39
|
+
transform-origin: top;
|
|
40
|
+
}
|
|
20
41
|
|
|
21
|
-
|
|
42
|
+
&::before {
|
|
22
43
|
background-size: 100% auto !important;
|
|
23
|
-
content: ""
|
|
24
|
-
}
|
|
44
|
+
content: "";
|
|
45
|
+
}
|
|
25
46
|
|
|
26
|
-
|
|
27
|
-
background: var(--tooltip-bg);
|
|
47
|
+
&::after {
|
|
48
|
+
background: var(--tooltip-bg);
|
|
28
49
|
box-shadow: 0 3px 7px var(--tooltip-shadow-color);
|
|
29
|
-
border-radius:
|
|
30
|
-
color:
|
|
50
|
+
border-radius: var(--tooltip-border-radius);
|
|
51
|
+
color: var(--tooltip-text-color);
|
|
31
52
|
content: attr(data-tooltip);
|
|
32
|
-
font-size: var(--microtip-font-size
|
|
33
|
-
font-weight: var(--microtip-font-weight
|
|
34
|
-
text-transform: var(--microtip-text-transform
|
|
35
|
-
padding: .5em 1em;
|
|
53
|
+
font-size: var(--microtip-font-size);
|
|
54
|
+
font-weight: var(--microtip-font-weight);
|
|
55
|
+
text-transform: var(--microtip-text-transform);
|
|
56
|
+
padding: 0.5em 1em;
|
|
36
57
|
white-space: nowrap;
|
|
37
|
-
box-sizing: content-box
|
|
38
|
-
}
|
|
58
|
+
box-sizing: content-box;
|
|
59
|
+
}
|
|
39
60
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
&:hover::before,
|
|
62
|
+
&:hover::after,
|
|
63
|
+
&:focus::before,
|
|
64
|
+
&:focus::after {
|
|
44
65
|
opacity: 1;
|
|
45
|
-
pointer-events: auto
|
|
66
|
+
pointer-events: auto;
|
|
67
|
+
}
|
|
46
68
|
}
|
|
47
69
|
|
|
48
|
-
|
|
49
|
-
|
|
70
|
+
// Top position tooltips
|
|
71
|
+
[role~="tooltip"][data-microtip-position|="top"] {
|
|
72
|
+
&::before {
|
|
73
|
+
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")
|
|
74
|
+
no-repeat;
|
|
50
75
|
height: 6px;
|
|
51
76
|
width: 18px;
|
|
52
77
|
margin-bottom: 5px;
|
|
53
78
|
transform: translate3d(-50%, 0, 0);
|
|
54
79
|
bottom: 100%;
|
|
55
|
-
left: 50
|
|
56
|
-
}
|
|
80
|
+
left: 50%;
|
|
81
|
+
}
|
|
57
82
|
|
|
58
|
-
|
|
83
|
+
&::after {
|
|
59
84
|
margin-bottom: 11px;
|
|
60
85
|
transform: translate3d(-50%, 0, 0);
|
|
61
86
|
bottom: 100%;
|
|
62
|
-
left: 50
|
|
63
|
-
}
|
|
87
|
+
left: 50%;
|
|
88
|
+
}
|
|
64
89
|
|
|
65
|
-
|
|
66
|
-
transform: translate3d(-50%, -5px, 0)
|
|
90
|
+
&:hover::before {
|
|
91
|
+
transform: translate3d(-50%, -5px, 0);
|
|
92
|
+
}
|
|
67
93
|
}
|
|
68
94
|
|
|
69
|
-
[role~="tooltip"][data-microtip-position="top"]
|
|
70
|
-
|
|
95
|
+
[role~="tooltip"][data-microtip-position="top"] {
|
|
96
|
+
&:hover::after {
|
|
97
|
+
transform: translate3d(-50%, -5px, 0);
|
|
98
|
+
}
|
|
71
99
|
}
|
|
72
100
|
|
|
73
|
-
[role~="tooltip"][data-microtip-position="top-left"]
|
|
101
|
+
[role~="tooltip"][data-microtip-position="top-left"] {
|
|
102
|
+
&::after {
|
|
74
103
|
transform: translate3d(calc(-100% + 16px), 0, 0);
|
|
75
|
-
bottom: 100
|
|
76
|
-
}
|
|
104
|
+
bottom: 100%;
|
|
105
|
+
}
|
|
77
106
|
|
|
78
|
-
|
|
79
|
-
transform: translate3d(calc(-100% + 16px), -5px, 0)
|
|
107
|
+
&:hover::after {
|
|
108
|
+
transform: translate3d(calc(-100% + 16px), -5px, 0);
|
|
109
|
+
}
|
|
80
110
|
}
|
|
81
111
|
|
|
82
|
-
[role~="tooltip"][data-microtip-position="top-right"]
|
|
112
|
+
[role~="tooltip"][data-microtip-position="top-right"] {
|
|
113
|
+
&::after {
|
|
83
114
|
transform: translate3d(calc(0% + -16px), 0, 0);
|
|
84
|
-
bottom: 100
|
|
85
|
-
}
|
|
115
|
+
bottom: 100%;
|
|
116
|
+
}
|
|
86
117
|
|
|
87
|
-
|
|
88
|
-
transform: translate3d(calc(0% + -16px), -5px, 0)
|
|
118
|
+
&:hover::after {
|
|
119
|
+
transform: translate3d(calc(0% + -16px), -5px, 0);
|
|
120
|
+
}
|
|
89
121
|
}
|
|
90
122
|
|
|
91
|
-
|
|
92
|
-
|
|
123
|
+
// Bottom position tooltips
|
|
124
|
+
[role~="tooltip"][data-microtip-position|="bottom"] {
|
|
125
|
+
&::before {
|
|
126
|
+
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")
|
|
127
|
+
no-repeat;
|
|
93
128
|
height: 6px;
|
|
94
129
|
width: 18px;
|
|
95
130
|
margin-top: 5px;
|
|
@@ -97,104 +132,117 @@
|
|
|
97
132
|
transform: translate3d(-50%, -10px, 0);
|
|
98
133
|
bottom: auto;
|
|
99
134
|
left: 50%;
|
|
100
|
-
top: 100
|
|
101
|
-
}
|
|
135
|
+
top: 100%;
|
|
136
|
+
}
|
|
102
137
|
|
|
103
|
-
|
|
138
|
+
&::after {
|
|
104
139
|
margin-top: 11px;
|
|
105
140
|
transform: translate3d(-50%, -10px, 0);
|
|
106
141
|
top: 100%;
|
|
107
|
-
left: 50
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
142
|
+
left: 50%;
|
|
143
|
+
}
|
|
111
144
|
|
|
112
|
-
|
|
113
|
-
transform: translate3d(-50%, 0, 0)
|
|
145
|
+
&:hover::before {
|
|
146
|
+
transform: translate3d(-50%, 0, 0);
|
|
147
|
+
}
|
|
114
148
|
}
|
|
115
149
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
transform: translate3d(-50%, 0, 0)
|
|
150
|
+
[role~="tooltip"][data-microtip-position="bottom"] {
|
|
151
|
+
&:hover::after {
|
|
152
|
+
transform: translate3d(-50%, 0, 0);
|
|
153
|
+
}
|
|
119
154
|
}
|
|
120
155
|
|
|
121
|
-
[role~="tooltip"][data-microtip-position="bottom-left"]
|
|
156
|
+
[role~="tooltip"][data-microtip-position="bottom-left"] {
|
|
157
|
+
&::after {
|
|
122
158
|
transform: translate3d(calc(-100% + 16px), -10px, 0);
|
|
123
|
-
top: 100
|
|
124
|
-
}
|
|
159
|
+
top: 100%;
|
|
160
|
+
}
|
|
125
161
|
|
|
126
|
-
|
|
127
|
-
transform: translate3d(calc(-100% + 16px), 0, 0)
|
|
162
|
+
&:hover::after {
|
|
163
|
+
transform: translate3d(calc(-100% + 16px), 0, 0);
|
|
164
|
+
}
|
|
128
165
|
}
|
|
129
166
|
|
|
130
|
-
[role~="tooltip"][data-microtip-position="bottom-right"]
|
|
167
|
+
[role~="tooltip"][data-microtip-position="bottom-right"] {
|
|
168
|
+
&::after {
|
|
131
169
|
transform: translate3d(calc(0% + -16px), -10px, 0);
|
|
132
|
-
top: 100
|
|
133
|
-
}
|
|
170
|
+
top: 100%;
|
|
171
|
+
}
|
|
134
172
|
|
|
135
|
-
|
|
136
|
-
transform: translate3d(calc(0% + -16px), 0, 0)
|
|
173
|
+
&:hover::after {
|
|
174
|
+
transform: translate3d(calc(0% + -16px), 0, 0);
|
|
175
|
+
}
|
|
137
176
|
}
|
|
138
177
|
|
|
139
|
-
|
|
140
|
-
[role~="tooltip"][data-microtip-position="left"]
|
|
178
|
+
// Left position tooltips
|
|
179
|
+
[role~="tooltip"][data-microtip-position="left"] {
|
|
180
|
+
&::before,
|
|
181
|
+
&::after {
|
|
141
182
|
inset: auto auto auto 100%;
|
|
142
|
-
transform: translate3d(10px, -50%, 0)
|
|
143
|
-
}
|
|
183
|
+
transform: translate3d(10px, -50%, 0);
|
|
184
|
+
}
|
|
144
185
|
|
|
145
|
-
|
|
146
|
-
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")
|
|
186
|
+
&::before {
|
|
187
|
+
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")
|
|
188
|
+
no-repeat;
|
|
147
189
|
height: 18px;
|
|
148
190
|
width: 6px;
|
|
149
191
|
margin-right: 5px;
|
|
150
|
-
margin-bottom: 0
|
|
151
|
-
}
|
|
192
|
+
margin-bottom: 0;
|
|
193
|
+
}
|
|
152
194
|
|
|
153
|
-
|
|
154
|
-
margin-right: 11px
|
|
155
|
-
}
|
|
195
|
+
&::after {
|
|
196
|
+
margin-right: 11px;
|
|
197
|
+
}
|
|
156
198
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
transform: translate3d(0, -50%, 0)
|
|
199
|
+
&:hover::before,
|
|
200
|
+
&:hover::after {
|
|
201
|
+
transform: translate3d(0, -50%, 0);
|
|
202
|
+
}
|
|
160
203
|
}
|
|
161
204
|
|
|
162
|
-
|
|
163
|
-
[role~="tooltip"][data-microtip-position="right"]
|
|
205
|
+
// Right position tooltips
|
|
206
|
+
[role~="tooltip"][data-microtip-position="right"] {
|
|
207
|
+
&::before,
|
|
208
|
+
&::after {
|
|
164
209
|
bottom: auto;
|
|
165
210
|
left: 100%;
|
|
166
211
|
top: 50%;
|
|
167
|
-
transform: translate3d(-10px, -50%, 0)
|
|
168
|
-
}
|
|
212
|
+
transform: translate3d(-10px, -50%, 0);
|
|
213
|
+
}
|
|
169
214
|
|
|
170
|
-
|
|
171
|
-
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")
|
|
215
|
+
&::before {
|
|
216
|
+
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")
|
|
217
|
+
no-repeat;
|
|
172
218
|
height: 18px;
|
|
173
219
|
width: 6px;
|
|
174
220
|
margin-bottom: 0;
|
|
175
|
-
margin-left: 5px
|
|
176
|
-
}
|
|
221
|
+
margin-left: 5px;
|
|
222
|
+
}
|
|
177
223
|
|
|
178
|
-
|
|
179
|
-
margin-left: 11px
|
|
180
|
-
}
|
|
224
|
+
&::after {
|
|
225
|
+
margin-left: 11px;
|
|
226
|
+
}
|
|
181
227
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
transform: translate3d(0, -50%, 0)
|
|
228
|
+
&:hover::before,
|
|
229
|
+
&:hover::after {
|
|
230
|
+
transform: translate3d(0, -50%, 0);
|
|
231
|
+
}
|
|
185
232
|
}
|
|
186
233
|
|
|
234
|
+
// Tooltip sizes
|
|
187
235
|
[role~="tooltip"][data-microtip-size="small"]::after {
|
|
188
|
-
|
|
189
|
-
|
|
236
|
+
white-space: initial;
|
|
237
|
+
width: var(--tooltip-small-width);
|
|
190
238
|
}
|
|
191
239
|
|
|
192
240
|
[role~="tooltip"][data-microtip-size="medium"]::after {
|
|
193
|
-
|
|
194
|
-
|
|
241
|
+
white-space: initial;
|
|
242
|
+
width: var(--tooltip-medium-width);
|
|
195
243
|
}
|
|
196
244
|
|
|
197
245
|
[role~="tooltip"][data-microtip-size="large"]::after {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
246
|
+
white-space: initial;
|
|
247
|
+
width: var(--tooltip-large-width);
|
|
248
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@use 'sass:map';
|
|
5
5
|
|
|
6
6
|
// Import variables
|
|
7
|
-
@use '../
|
|
7
|
+
@use '../abstracts' as VAR;
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
/**
|
|
30
30
|
* Text size utility
|
|
31
31
|
* @param {string} $size - The size of the text.
|
|
32
|
-
*/
|
|
32
|
+
*/
|
|
33
33
|
@mixin text-size($size) {
|
|
34
34
|
@if map.has-key(VAR.$font-sizes, $size) {
|
|
35
35
|
font-size: map.get(VAR.$font-sizes, $size);
|
|
36
36
|
} @else {
|
|
37
|
-
|
|
37
|
+
font-size: $size;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
}
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
@include responsive-typography
|
|
163
|
+
@include responsive-typography;
|
|
164
164
|
.break-normal { @include break-normal; }
|
|
165
165
|
.break-words { @include break-words; }
|
|
166
166
|
.break-all { @include break-all; }
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@use 'sass:string';
|
|
2
|
-
@use 'sass:math';
|
|
3
|
-
@use 'sass:map';
|
|
4
|
-
@use 'sass:list';
|
|
5
|
-
@use 'sass:meta';
|
|
6
|
-
@use 'variables' as *;
|
|
7
|
-
|
|
8
|
-
@function str-replace($string, $search, $replace: " ") {
|
|
9
|
-
$index: string.index($string, $search);
|
|
10
|
-
@if $index {
|
|
11
|
-
@return string.slice($string, 1, $index - 1)
|
|
12
|
-
+ $replace
|
|
13
|
-
+ str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
|
|
14
|
-
}
|
|
15
|
-
@return $string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@function get-breakpoint-value($bp) {
|
|
19
|
-
@if map.has-key($breakpoints, $bp) {
|
|
20
|
-
@return map.get($breakpoints, $bp);
|
|
21
|
-
} @else if meta.type-of($bp) == number {
|
|
22
|
-
@return $bp;
|
|
23
|
-
} @else {
|
|
24
|
-
@warn 'Invalid breakpoint: #{$bp}';
|
|
25
|
-
@return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@function strip-unit($value) {
|
|
30
|
-
@return math.div($value, ($value * 0 + 1));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@function safe-unit-name($unit) {
|
|
34
|
-
|
|
35
|
-
@if $unit == '%' {
|
|
36
|
-
@return 'per';
|
|
37
|
-
} @else if $unit == '.' {
|
|
38
|
-
@return 'dot';
|
|
39
|
-
} @else {
|
|
40
|
-
@return $unit;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@function get-unit($value) {
|
|
45
|
-
$value-str: #{$value};
|
|
46
|
-
|
|
47
|
-
// Relative length units
|
|
48
|
-
@if string.index($value-str, 'em') {
|
|
49
|
-
@return 'em';
|
|
50
|
-
} @else if string.index($value-str, 'rem') {
|
|
51
|
-
@return 'rem';
|
|
52
|
-
} @else if string.index($value-str, '%') {
|
|
53
|
-
@return '%';
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Viewport units
|
|
57
|
-
@else if string.index($value-str, 'vw') {
|
|
58
|
-
@return 'vw';
|
|
59
|
-
} @else if string.index($value-str, 'vh') {
|
|
60
|
-
@return 'vh';
|
|
61
|
-
} @else if string.index($value-str, 'vmin') {
|
|
62
|
-
@return 'vmin';
|
|
63
|
-
} @else if string.index($value-str, 'vmax') {
|
|
64
|
-
@return 'vmax';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Absolute length units
|
|
68
|
-
@else if string.index($value-str, 'px') {
|
|
69
|
-
@return 'px';
|
|
70
|
-
} @else if string.index($value-str, 'cm') {
|
|
71
|
-
@return 'cm';
|
|
72
|
-
} @else if string.index($value-str, 'mm') {
|
|
73
|
-
@return 'mm';
|
|
74
|
-
} @else if string.index($value-str, 'in') {
|
|
75
|
-
@return 'in';
|
|
76
|
-
} @else if string.index($value-str, 'pt') {
|
|
77
|
-
@return 'pt';
|
|
78
|
-
} @else if string.index($value-str, 'pc') {
|
|
79
|
-
@return 'pc';
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Return empty string if no unit found
|
|
83
|
-
@return '';
|
|
84
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:math';
|
|
3
|
-
|
|
4
|
-
$base-size: 16;
|
|
5
|
-
@function rem($px) {
|
|
6
|
-
@if $px == 0 {
|
|
7
|
-
@return 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Strip units if $px has any
|
|
11
|
-
$value: if(math.unit($px) == '', $px, math.div($px, math.unit($px)));
|
|
12
|
-
|
|
13
|
-
@return math.div($value, $base-size) * 1rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Global variables that might be used across different modules
|
|
17
|
-
$enable-debuger: false !default;
|
|
18
|
-
$enable-dark-mode: true !default;
|
|
19
|
-
$enable-rtl: true !default;;
|
|
20
|
-
$enable-reduced-motion: true !default;
|
|
21
|
-
$column-count: 12 !default;
|
|
22
|
-
|
|
23
|
-
$default-container-name: nuvoui-container !default;
|
|
24
|
-
$nuvoui-container-queries: false !default;
|
|
25
|
-
|
|
26
|
-
$primary: #007bff !default;
|
|
27
|
-
$secondary: #6c757d !default;
|
|
28
|
-
$success: #28a745 !default;
|
|
29
|
-
$danger: #dc3545 !default;
|
|
30
|
-
$warning: #ffc107 !default;
|
|
31
|
-
$info: #17a2b8 !default;
|
|
32
|
-
|
|
33
|
-
$color-primitives: (
|
|
34
|
-
'gray': #6b7280,
|
|
35
|
-
'red': #ef4444,
|
|
36
|
-
'blue': #3b82f6,
|
|
37
|
-
'green': #22c55e,
|
|
38
|
-
'yellow': #eab308,
|
|
39
|
-
'purple': #a855f7,
|
|
40
|
-
'pink': #ec4899
|
|
41
|
-
) !default;
|
|
42
|
-
|
|
43
|
-
$theme-tokens: (
|
|
44
|
-
'background',
|
|
45
|
-
'foreground',
|
|
46
|
-
'surface',
|
|
47
|
-
'border',
|
|
48
|
-
'text-primary',
|
|
49
|
-
'text-secondary'
|
|
50
|
-
) !default;
|
|
51
|
-
|
|
52
|
-
// Default theme config (can be overridden)
|
|
53
|
-
$light-theme: (
|
|
54
|
-
'background': #fff,
|
|
55
|
-
'foreground': #000,
|
|
56
|
-
'surface': #fff,
|
|
57
|
-
'border': #e5e7eb,
|
|
58
|
-
'text-primary': #000,
|
|
59
|
-
'text-secondary': #4b5563
|
|
60
|
-
) !default;
|
|
61
|
-
|
|
62
|
-
$dark-theme: (
|
|
63
|
-
'background': #000,
|
|
64
|
-
'foreground': #fff,
|
|
65
|
-
'surface': #1a1a1a,
|
|
66
|
-
'border': #2e2e2e,
|
|
67
|
-
'text-primary': #fff,
|
|
68
|
-
'text-secondary': #a3a3a3
|
|
69
|
-
) !default;
|
|
70
|
-
|
|
71
|
-
// Breakpoints
|
|
72
|
-
$breakpoints: (
|
|
73
|
-
'xs': 480px,
|
|
74
|
-
'sm': 640px,
|
|
75
|
-
'md': 768px,
|
|
76
|
-
'lg': 1024px,
|
|
77
|
-
'xl': 1280px,
|
|
78
|
-
'2xl': 1536px,
|
|
79
|
-
) !default;
|
|
80
|
-
|
|
81
|
-
$grid-item-sizes: (
|
|
82
|
-
'xs': 200px,
|
|
83
|
-
'sm': 250px,
|
|
84
|
-
'md': 300px,
|
|
85
|
-
'lg': 350px,
|
|
86
|
-
'xl': 400px
|
|
87
|
-
) !default;
|
|
88
|
-
|
|
89
|
-
// _variables.scss
|
|
90
|
-
$font-sizes: (
|
|
91
|
-
'xs': 0.75rem, // 12px
|
|
92
|
-
'sm': 0.875rem, // 14px
|
|
93
|
-
'md': 1rem, // 16px
|
|
94
|
-
'lg': 1.25rem, // 20px
|
|
95
|
-
'xl': 1.5rem, // 24px
|
|
96
|
-
'2xl': 1.75rem, // 28px
|
|
97
|
-
'3xl': 2rem, // 32px
|
|
98
|
-
'4xl': 2.5rem // 40px
|
|
99
|
-
) !default;
|
|
100
|
-
|
|
101
|
-
@debug rem(4);
|
|
102
|
-
// Updated spacing map
|
|
103
|
-
$spacings: (
|
|
104
|
-
0: 0,
|
|
105
|
-
1: rem(4), // 0.25rem
|
|
106
|
-
2: rem(8), // 0.5rem
|
|
107
|
-
3: rem(12), // 0.75rem
|
|
108
|
-
4: rem(16), // 1rem
|
|
109
|
-
5: rem(20), // 1.25rem
|
|
110
|
-
6: rem(24), // 1.5rem
|
|
111
|
-
8: rem(32), // 2rem
|
|
112
|
-
10: rem(40), // 2.5rem
|
|
113
|
-
12: rem(48), // 3rem
|
|
114
|
-
16: rem(64), // 4rem
|
|
115
|
-
20: rem(80), // 5rem
|
|
116
|
-
24: rem(96), // 6rem
|
|
117
|
-
32: rem(128), // 8rem
|
|
118
|
-
40: rem(160), // 10rem
|
|
119
|
-
48: rem(192), // 12rem
|
|
120
|
-
56: rem(224), // 14rem
|
|
121
|
-
64: rem(256) // 16rem
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
$percentages: (
|
|
125
|
-
0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 100
|
|
126
|
-
) !default;
|