wave-ui 3.24.0 → 3.25.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": "wave-ui",
3
- "version": "3.24.0",
3
+ "version": "3.25.0",
4
4
  "description": "A UI framework for Vue.js 3 (and 2) with only the bright side. :sunny:",
5
5
  "author": "Antoni Andre <antoniandre.web@gmail.com>",
6
6
  "homepage": "https://antoniandre.github.io/wave-ui",
@@ -59,6 +59,11 @@
59
59
  .ovv {overflow: visible;}
60
60
  .ova {overflow: auto;}
61
61
 
62
+ .por {position: relative;}
63
+ .poa {position: absolute;}
64
+ .pof {position: fixed;}
65
+ .pos {position: sticky;}
66
+
62
67
  .op05 {opacity: 0.05;}
63
68
  @for $i from 0 through 9 {
64
69
  .op#{$i} {opacity: $i * 0.1;}
@@ -10,6 +10,7 @@ const config = reactive({
10
10
  xl: 9999 // Xl only needs a greater value than lg but starts from lg and goes to infinity.
11
11
  },
12
12
  css: {
13
+ prepend: false, // Prepend the CSS to the head instead of appending it.
13
14
  // Generate shades for custom colors and status colors.
14
15
  // Note: the color palette shades are always generated separately from SCSS.
15
16
  colorShades: true,
@@ -156,6 +156,10 @@ const genBreakpointLayoutClasses = breakpoints => {
156
156
  'd-iflex{display:inline-flex}',
157
157
  'd-block{display:block}',
158
158
  'd-iblock{display:inline-block}',
159
+ 'por{position:relative}',
160
+ 'poa{position:absolute}',
161
+ 'pof{position:fixed}',
162
+ 'pos{position:sticky}',
159
163
  'text-left{text-align:left}',
160
164
  'text-center{text-align:center}',
161
165
  'text-right{text-align:right}',
@@ -171,6 +175,8 @@ const genBreakpointLayoutClasses = breakpoints => {
171
175
  'no-wrap{flex-wrap: nowrap}',
172
176
  'fill-width{width:100%}',
173
177
  'fill-height{height:100%}',
178
+ 'h-auto{height:auto}',
179
+ 'h-screen{height:100vh}',
174
180
  'basis-zero{flex-basis:0}',
175
181
  'align-start{align-items:flex-start}',
176
182
  'align-center{align-items:center}',
@@ -265,9 +271,18 @@ export const injectCSSInDOM = $waveui => {
265
271
  css.id = 'wave-ui-styles'
266
272
  css.innerHTML = doDynamicCSS(config)
267
273
 
268
- const firstStyle = document.head.querySelectorAll('style,link[rel="stylesheet"]')[0]
269
- if (firstStyle) firstStyle.before(css)
270
- else document.head.appendChild(css)
274
+ // Prepend or append the CSS to the head based on the config.css.prependCss option.
275
+ const stylesheets = document.head.querySelectorAll('style,link[rel="stylesheet"]')
276
+ if (config.css.prependCss) {
277
+ const firstStyle = stylesheets[0]
278
+ if (firstStyle) firstStyle.before(css)
279
+ else document.head.prepend(css)
280
+ }
281
+ else {
282
+ const lastStyle = stylesheets[stylesheets.length - 1]
283
+ if (lastStyle) lastStyle.after(css)
284
+ else document.head.appendChild(css)
285
+ }
271
286
  }
272
287
 
273
288
  getBreakpoint($waveui)