@oslokommune/punkt-vue
Advanced tools
Comparing version 11.5.3 to 11.6.0
@@ -8,2 +8,24 @@ # Changelog | ||
## [11.6.0](https://github.com/oslokommune/punkt/compare/11.5.4...11.6.0) (2024-02-16) | ||
### ⚠ BREAKING CHANGES | ||
Ingen | ||
### Features | ||
* PktLoader kan utsette visning (#1520). * feat(vue,react): PktLoader kan utsette visning | ||
* Fjern ReactNode | ||
* className | ||
### Bug Fixes | ||
Ingen | ||
### Chores | ||
Ingen | ||
--- | ||
## [11.5.0](https://github.com/oslokommune/punkt/compare/11.4.9...11.5.0) (2024-02-14) | ||
@@ -10,0 +32,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { openBlock as t, createElementBlock as n, normalizeClass as s, createVNode as o, toDisplayString as r, createCommentVNode as d, renderSlot as u } from "vue"; | ||
import { P as m } from "./Icon-s3ZNrtl-.js"; | ||
import { u as c, a as p } from "./plugins-IeJb3XDX.js"; | ||
const g = ["aria-busy"], k = { key: 0 }, f = { | ||
import { toRefs as u, ref as m, openBlock as t, createElementBlock as l, normalizeClass as n, Fragment as c, unref as p, createVNode as g, toDisplayString as f, createCommentVNode as r, renderSlot as k } from "vue"; | ||
import { P as y } from "./Icon-s3ZNrtl-.js"; | ||
import { u as v, a as b } from "./plugins-IeJb3XDX.js"; | ||
const h = ["aria-busy"], L = { key: 0 }, S = { | ||
__name: "Loader", | ||
@@ -25,36 +25,45 @@ props: { | ||
validator: (e) => ["blue", "rainbow", "shapes"].includes(e) | ||
}, | ||
delay: { | ||
type: Number, | ||
default: 0 | ||
} | ||
}, | ||
setup(e) { | ||
const i = e, l = (a) => a === "shapes" ? "loader" : a === "blue" ? "spinner-blue" : "spinner"; | ||
return (a, b) => (t(), n("div", { | ||
const o = e, d = (a) => a === "shapes" ? "loader" : a === "blue" ? "spinner-blue" : "spinner", { delay: s } = u(o); | ||
let i = m(!(s.value > 0)); | ||
return s.value > 0 && setTimeout(() => { | ||
i.value = !0; | ||
}, s.value), (a, P) => (t(), l("div", { | ||
role: "status", | ||
"aria-live": "polite", | ||
"aria-busy": e.isLoading, | ||
class: s(`pkt-loader--${e.inline ? "inline" : "box"}`) | ||
class: n(`pkt-loader--${e.inline ? "inline" : "box"}`) | ||
}, [ | ||
e.isLoading ? (t(), n("div", { | ||
key: 0, | ||
class: s(`pkt-loader pkt-loader--${i.size}`), | ||
"data-testid": "pkt-loader" | ||
}, [ | ||
o(m, { | ||
name: l(e.variant), | ||
"aria-label": "loading", | ||
path: "https://punkt-cdn.oslo.kommune.no/latest/animations/", | ||
class: s(`pkt-loader__svg pkt-loader__${e.variant}`) | ||
}, null, 8, ["name", "class"]), | ||
e.message ? (t(), n("p", k, r(e.message), 1)) : d("", !0) | ||
], 2)) : u(a.$slots, "default", { key: 1 }) | ||
], 10, g)); | ||
e.isLoading ? (t(), l(c, { key: 0 }, [ | ||
p(i) ? (t(), l("div", { | ||
key: 0, | ||
class: n(`pkt-loader pkt-loader--${o.size}`), | ||
"data-testid": "pkt-loader" | ||
}, [ | ||
g(y, { | ||
name: d(e.variant), | ||
"aria-label": "loading", | ||
path: "https://punkt-cdn.oslo.kommune.no/latest/animations/", | ||
class: n(`pkt-loader__svg pkt-loader__${e.variant}`) | ||
}, null, 8, ["name", "class"]), | ||
e.message ? (t(), l("p", L, f(e.message), 1)) : r("", !0) | ||
], 2)) : r("", !0) | ||
], 64)) : k(a.$slots, "default", { key: 1 }) | ||
], 10, h)); | ||
} | ||
}, y = { | ||
}, B = { | ||
install(e) { | ||
p(e, f); | ||
b(e, S); | ||
} | ||
}; | ||
c(y); | ||
v(B); | ||
export { | ||
f as PktLoader, | ||
y as default | ||
S as PktLoader, | ||
B as default | ||
}; |
{ | ||
"name": "@oslokommune/punkt-vue", | ||
"version": "11.5.3", | ||
"version": "11.6.0", | ||
"description": "Vue komponentbibliotek til Punkt, et designsystem laget av Oslo Origo", | ||
@@ -68,3 +68,3 @@ "homepage": "https://punkt.oslo.kommune.no", | ||
"license": "MIT", | ||
"gitHead": "683cde8f21abc895d5bea931ba2ae5a4eb5315ee" | ||
"gitHead": "625cf310735226cfcdae9d27c3f18c04d335ed14" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
253619
3157