@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.
@@ -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: auto;
34
- margin: var(--spacing-md);
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
- @media (min-width: 576px) {
134
- max-width: 300px;
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
- @media (min-width: 1024px) {
140
- max-width: 1000px;
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
- @media (min-width: 1024px) {
146
- max-width: 1200px;
153
+ .bl-modal-dialog {
154
+ @media (min-width: 1024px) {
155
+ max-width: 1200px;
156
+ }
147
157
  }
148
158
  }
149
159
 
150
- // Centered Modal
151
- .bl-modal-centered {
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
- display: flex;
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
+ }
@@ -115,4 +115,8 @@
115
115
  border-width: var(--border-width-base);
116
116
  }
117
117
 
118
- // Spinner Grow (Alternative Style - removed, using square frame only)
118
+ .bl-spinner-xl {
119
+ width: 4rem;
120
+ height: 4rem;
121
+ border-width: var(--border-width-base);
122
+ }
@@ -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
- @font-face {
9
- font-family: 'Baseline Icons';
10
- src: url('../fonts/baseline-icons.woff2') format('woff2'),
11
- url('../fonts/baseline-icons.woff') format('woff');
12
- font-weight: normal;
13
- font-style: normal;
14
- font-display: swap;
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 {
@@ -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', autoInit);
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
- // Use setTimeout to ensure DOM is fully ready
57
- setTimeout(autoInit, 0);
62
+ // DOM already loaded, but wait for next frame to ensure everything is ready
63
+ requestAnimationFrame(() => {
64
+ requestAnimationFrame(autoInit);
65
+ });
58
66
  }
59
67