@rhavenside/baseline-ui 1.0.4 → 1.0.6
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/dist/baseline.css +43 -15
- package/dist/baseline.css.map +1 -1
- package/dist/baseline.js +8 -2
- package/dist/baseline.js.map +2 -2
- package/dist/baseline.min.css +1 -1
- package/dist/baseline.min.js +1 -1
- package/dist/baseline.min.js.map +2 -2
- package/package.json +1 -1
- package/src/components/_modal.scss +50 -14
- package/src/components/_spinner.scss +5 -1
- package/src/icons/_icons.scss +9 -8
- package/src/js/baseline.js +11 -3
|
@@ -26,17 +26,21 @@
|
|
|
26
26
|
overflow-x: hidden;
|
|
27
27
|
overflow-y: auto;
|
|
28
28
|
outline: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
padding: var(--spacing-md);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
.bl-modal-dialog {
|
|
32
36
|
position: relative;
|
|
33
|
-
width:
|
|
34
|
-
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: 500px;
|
|
39
|
+
margin: 0;
|
|
35
40
|
pointer-events: none;
|
|
36
41
|
|
|
37
42
|
@media (min-width: 576px) {
|
|
38
43
|
max-width: 500px;
|
|
39
|
-
margin: var(--spacing-xl) auto;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
@media (min-width: 768px) {
|
|
@@ -130,28 +134,60 @@
|
|
|
130
134
|
|
|
131
135
|
// Modal Sizes
|
|
132
136
|
.bl-modal-sm {
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
.bl-modal-dialog {
|
|
138
|
+
@media (min-width: 576px) {
|
|
139
|
+
max-width: 300px;
|
|
140
|
+
}
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
.bl-modal-lg {
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
.bl-modal-dialog {
|
|
146
|
+
@media (min-width: 1024px) {
|
|
147
|
+
max-width: 1000px;
|
|
148
|
+
}
|
|
141
149
|
}
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
.bl-modal-xl {
|
|
145
|
-
|
|
146
|
-
|
|
153
|
+
.bl-modal-dialog {
|
|
154
|
+
@media (min-width: 1024px) {
|
|
155
|
+
max-width: 1200px;
|
|
156
|
+
}
|
|
147
157
|
}
|
|
148
158
|
}
|
|
149
159
|
|
|
150
|
-
//
|
|
151
|
-
.bl-modal-
|
|
160
|
+
// Modal Positions
|
|
161
|
+
.bl-modal-top {
|
|
162
|
+
align-items: flex-start;
|
|
163
|
+
padding-top: var(--spacing-xl);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.bl-modal-bottom {
|
|
167
|
+
align-items: flex-end;
|
|
168
|
+
padding-bottom: var(--spacing-xl);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.bl-modal-left {
|
|
172
|
+
justify-content: flex-start;
|
|
173
|
+
padding-left: var(--spacing-xl);
|
|
174
|
+
|
|
152
175
|
.bl-modal-dialog {
|
|
153
|
-
|
|
154
|
-
align-items: center;
|
|
155
|
-
min-height: calc(100% - (var(--spacing-xl) * 2));
|
|
176
|
+
margin-right: auto;
|
|
156
177
|
}
|
|
157
178
|
}
|
|
179
|
+
|
|
180
|
+
.bl-modal-right {
|
|
181
|
+
justify-content: flex-end;
|
|
182
|
+
padding-right: var(--spacing-xl);
|
|
183
|
+
|
|
184
|
+
.bl-modal-dialog {
|
|
185
|
+
margin-left: auto;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Centered Modal (default, can be explicitly set)
|
|
190
|
+
.bl-modal-centered {
|
|
191
|
+
align-items: center;
|
|
192
|
+
justify-content: center;
|
|
193
|
+
}
|
package/src/icons/_icons.scss
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
@use '../tokens/tokens' as *;
|
|
6
6
|
|
|
7
7
|
// Icon Font Face (to be generated from icon font files)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
// Font files are optional - icons will work without them using Unicode fallback
|
|
9
|
+
// @font-face {
|
|
10
|
+
// font-family: 'Baseline Icons';
|
|
11
|
+
// src: url('../fonts/baseline-icons.woff2') format('woff2'),
|
|
12
|
+
// url('../fonts/baseline-icons.woff') format('woff');
|
|
13
|
+
// font-weight: normal;
|
|
14
|
+
// font-style: normal;
|
|
15
|
+
// font-display: swap;
|
|
16
|
+
// }
|
|
16
17
|
|
|
17
18
|
// Base Icon Class
|
|
18
19
|
.bl-icon {
|
package/src/js/baseline.js
CHANGED
|
@@ -50,10 +50,18 @@ function autoInit() {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Initialize when DOM is ready
|
|
53
|
+
// Use requestAnimationFrame for better timing with ES modules
|
|
53
54
|
if (document.readyState === 'loading') {
|
|
54
|
-
document.addEventListener('DOMContentLoaded',
|
|
55
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
56
|
+
// Wait for next frame to ensure all elements are rendered
|
|
57
|
+
requestAnimationFrame(() => {
|
|
58
|
+
requestAnimationFrame(autoInit);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
55
61
|
} else {
|
|
56
|
-
//
|
|
57
|
-
|
|
62
|
+
// DOM already loaded, but wait for next frame to ensure everything is ready
|
|
63
|
+
requestAnimationFrame(() => {
|
|
64
|
+
requestAnimationFrame(autoInit);
|
|
65
|
+
});
|
|
58
66
|
}
|
|
59
67
|
|