@oslokommune/punkt-vue
Advanced tools
Comparing version
@@ -8,2 +8,20 @@ # Changelog | ||
## [11.13.7](https://github.com/oslokommune/punkt/compare/11.13.6...11.13.7) (2024-05-30) | ||
### ⚠ BREAKING CHANGES | ||
Ingen | ||
### Features | ||
Ingen | ||
### Bug Fixes | ||
* Bruker v-model oppdatering av radiobutton verdi (#1722). Co-authored-by: Peter Motzfeldt <peter.motzfeldt@origo.oslo.kommune.no> | ||
### Chores | ||
Ingen | ||
--- | ||
## [11.13.4](https://github.com/oslokommune/punkt/compare/11.13.3...11.13.4) (2024-05-30) | ||
@@ -10,0 +28,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { openBlock as n, createElementBlock as d, createElementVNode as a, normalizeClass as u, mergeProps as c, createTextVNode as o, toDisplayString as r, createCommentVNode as h } from "vue"; | ||
import { _ as m } from "./_plugin-vue_export-helper-hUChTQA_.js"; | ||
import { u as k, a as _ } from "./plugins-UPM181Xt.js"; | ||
const p = { | ||
import { openBlock as r, createElementBlock as d, createElementVNode as l, normalizeClass as c, withDirectives as o, mergeProps as s, vModelRadio as h, createTextVNode as p, toDisplayString as u, createCommentVNode as m } from "vue"; | ||
import { _ as k } from "./_plugin-vue_export-helper-hUChTQA_.js"; | ||
import { u as _, a as f } from "./plugins-UPM181Xt.js"; | ||
const b = { | ||
name: "PktRadioButton", | ||
@@ -19,2 +19,6 @@ props: { | ||
}, | ||
value: { | ||
type: String, | ||
required: !0 | ||
}, | ||
modelValue: { | ||
@@ -46,17 +50,25 @@ type: String, | ||
emits: ["update:modelValue", "onChange"], | ||
methods: { | ||
handleChange() { | ||
this.$emit("update:modelValue", this.label), this.$emit("onChange", this.label); | ||
computed: { | ||
valueOrLabel() { | ||
return this.value || this.label; | ||
}, | ||
computedChecked: { | ||
get() { | ||
return this.modelValue; | ||
}, | ||
set(t) { | ||
this.$emit("update:modelValue", t), this.$emit("onChange", t); | ||
} | ||
} | ||
} | ||
}, f = { class: "pkt-input-check" }, b = ["id", "name", "value", "checked", "disabled"], g = ["for"], y = { | ||
}, g = { class: "pkt-input-check" }, v = ["id", "name", "value", "checked", "disabled"], y = ["for"], q = { | ||
key: 0, | ||
class: "pkt-input-check__input-helptext" | ||
}; | ||
function x(t, l, e, V, B, i) { | ||
return n(), d("div", f, [ | ||
a("div", { | ||
class: u([{ "pkt-input-check__input--tile": e.hasTile }, "pkt-input-check__input"]) | ||
function x(t, i, e, S, B, a) { | ||
return r(), d("div", g, [ | ||
l("div", { | ||
class: c([{ "pkt-input-check__input--tile": e.hasTile }, "pkt-input-check__input"]) | ||
}, [ | ||
a("input", c({ | ||
o(l("input", s({ | ||
class: ["pkt-input-check__input-checkbox", { "pkt-input-check__input-checkbox--error": e.hasError }], | ||
@@ -67,26 +79,28 @@ type: "radio" | ||
name: e.name, | ||
value: e.label, | ||
checked: e.label === e.modelValue, | ||
onChange: l[0] || (l[0] = (...s) => i.handleChange && i.handleChange(...s)), | ||
value: a.valueOrLabel, | ||
checked: a.valueOrLabel === e.modelValue, | ||
"onUpdate:modelValue": i[0] || (i[0] = (n) => a.computedChecked = n), | ||
disabled: e.disabled | ||
}), null, 16, b), | ||
a("label", { | ||
}), null, 16, v), [ | ||
[h, a.computedChecked] | ||
]), | ||
l("label", { | ||
class: "pkt-input-check__input-label", | ||
for: e.id | ||
}, [ | ||
o(r(e.label) + " ", 1), | ||
e.checkHelptext ? (n(), d("div", y, r(e.checkHelptext), 1)) : h("", !0) | ||
], 8, g) | ||
p(u(e.label) + " ", 1), | ||
e.checkHelptext ? (r(), d("div", q, u(e.checkHelptext), 1)) : m("", !0) | ||
], 8, y) | ||
], 2) | ||
]); | ||
} | ||
const C = /* @__PURE__ */ m(p, [["render", x]]), q = { | ||
const C = /* @__PURE__ */ k(b, [["render", x]]), V = { | ||
install(t) { | ||
_(t, C); | ||
f(t, C); | ||
} | ||
}; | ||
k(q); | ||
_(V); | ||
export { | ||
C as PktRadiobutton, | ||
q as default | ||
V as default | ||
}; |
{ | ||
"name": "@oslokommune/punkt-vue", | ||
"version": "11.13.4", | ||
"version": "11.13.7", | ||
"description": "Vue komponentbibliotek til Punkt, et designsystem laget av Oslo Origo", | ||
@@ -68,3 +68,3 @@ "homepage": "https://punkt.oslo.kommune.no", | ||
"license": "MIT", | ||
"gitHead": "1a00241fb69e0b141a971e2dfd97091a851c3505" | ||
"gitHead": "51ae64e189bb8ffe8488a3e37793ee8e04fff348" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
291223
0.34%3534
0.43%