@oslokommune/punkt-vue
Advanced tools
Comparing version 11.9.4 to 11.10.0
@@ -8,2 +8,20 @@ # Changelog | ||
## [11.10.0](https://github.com/oslokommune/punkt/compare/11.9.5...11.10.0) (2024-03-18) | ||
### ⚠ BREAKING CHANGES | ||
Ingen | ||
### Features | ||
* Ny loader-variant (#1591). | ||
### Bug Fixes | ||
Ingen | ||
### Chores | ||
Ingen | ||
--- | ||
## [11.9.3](https://github.com/oslokommune/punkt/compare/11.9.2...11.9.3) (2024-03-14) | ||
@@ -10,0 +28,0 @@ |
@@ -1,5 +0,13 @@ | ||
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 { toRefs as c, ref as m, openBlock as a, createElementBlock as t, normalizeClass as o, Fragment as g, unref as k, createBlock as v, toDisplayString as f, createCommentVNode as d, renderSlot as p, createElementVNode as l } from "vue"; | ||
import { P as y } from "./Icon-f0Yu-X_2.js"; | ||
import { u as v, a as b } from "./plugins-IeJb3XDX.js"; | ||
const h = ["aria-busy"], L = { key: 0 }, S = { | ||
import { u as h, a as b } from "./plugins-IeJb3XDX.js"; | ||
const _ = ["aria-busy"], L = { | ||
key: 0, | ||
class: "egg-loader" | ||
}, B = /* @__PURE__ */ l("div", { class: "egg one" }, null, -1), S = /* @__PURE__ */ l("div", { class: "egg two" }, null, -1), P = /* @__PURE__ */ l("div", { class: "egg three" }, null, -1), $ = /* @__PURE__ */ l("div", { class: "egg four" }, null, -1), w = [ | ||
B, | ||
S, | ||
P, | ||
$ | ||
], z = { key: 2 }, C = { | ||
__name: "Loader", | ||
@@ -24,3 +32,3 @@ props: { | ||
default: "rainbow", | ||
validator: (e) => ["blue", "rainbow", "shapes"].includes(e) | ||
validator: (e) => ["blue", "rainbow", "shapes", "🐣"].includes(e) | ||
}, | ||
@@ -33,38 +41,39 @@ delay: { | ||
setup(e) { | ||
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", { | ||
const i = e, u = (s) => s === "shapes" ? "loader" : s === "blue" ? "spinner-blue" : "spinner", { delay: n } = c(i); | ||
let r = m(!(n.value > 0)); | ||
return n.value > 0 && setTimeout(() => { | ||
r.value = !0; | ||
}, n.value), (s, V) => (a(), t("div", { | ||
role: "status", | ||
"aria-live": "polite", | ||
"aria-busy": e.isLoading, | ||
class: n(`pkt-loader--${e.inline ? "inline" : "box"}`) | ||
class: o(`pkt-loader--${e.inline ? "inline" : "box"}`) | ||
}, [ | ||
e.isLoading ? (t(), l(c, { key: 0 }, [ | ||
p(i) ? (t(), l("div", { | ||
e.isLoading ? (a(), t(g, { key: 0 }, [ | ||
k(r) ? (a(), t("div", { | ||
key: 0, | ||
class: n(`pkt-loader pkt-loader--${o.size}`), | ||
class: o(`pkt-loader pkt-loader--${i.size}`), | ||
"data-testid": "pkt-loader" | ||
}, [ | ||
g(y, { | ||
name: d(e.variant), | ||
e.variant === "🐣" ? (a(), t("div", L, w)) : (a(), v(y, { | ||
key: 1, | ||
name: u(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)); | ||
class: o(`pkt-loader__svg pkt-loader__${e.variant}`) | ||
}, null, 8, ["name", "class"])), | ||
e.message ? (a(), t("p", z, f(e.message), 1)) : d("", !0) | ||
], 2)) : d("", !0) | ||
], 64)) : p(s.$slots, "default", { key: 1 }) | ||
], 10, _)); | ||
} | ||
}, B = { | ||
}, N = { | ||
install(e) { | ||
b(e, S); | ||
b(e, C); | ||
} | ||
}; | ||
v(B); | ||
h(N); | ||
export { | ||
S as PktLoader, | ||
B as default | ||
C as PktLoader, | ||
N as default | ||
}; |
{ | ||
"name": "@oslokommune/punkt-vue", | ||
"version": "11.9.4", | ||
"version": "11.10.0", | ||
"description": "Vue komponentbibliotek til Punkt, et designsystem laget av Oslo Origo", | ||
@@ -30,3 +30,3 @@ "homepage": "https://punkt.oslo.kommune.no", | ||
"@oslokommune/punkt-assets": "^11.9.4", | ||
"@oslokommune/punkt-css": "^11.9.4", | ||
"@oslokommune/punkt-css": "^11.10.0", | ||
"@vitejs/plugin-vue": "^4.5.2", | ||
@@ -69,3 +69,3 @@ "edit-json-file": "^1.7.0", | ||
"license": "MIT", | ||
"gitHead": "581930ff3415a56bce6634e14a9a76d106e2d247" | ||
"gitHead": "fdad728821188991ca5ecafbc17313e7a7f2cbb7" | ||
} |
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
261884
3194