@oslokommune/punkt-vue 11.8.0 → 11.9.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/CHANGELOG.md CHANGED
@@ -5,6 +5,100 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [11.9.0](https://github.com/oslokommune/punkt/compare/11.8.2...11.9.0) (2024-03-11)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ * template for Forms (skjema mal) (#1580). * feat(react)-1406: ✨ add template for schema
15
+
16
+ - Add all example fields except upload file and datepicker (no current components available).
17
+ - Add styling classes for responsive design on text sizes & spacing
18
+ - Use stylings vars for readability
19
+ - Add regex and validation functions for address, postalCode and postalArea (only to show an example of how it can be done)
20
+ - Set transportError to true to show example of radio button group with error
21
+ - Add summary of errors
22
+
23
+ 📝 Notes:
24
+ - Would like to have an alert message box without icons.
25
+
26
+ * fix 🔧: radiobutton validation, schema --> form..
27
+ correct field id.
28
+ * feat(vue): ✨ add form template for Vue (#1555)
29
+ * ✨ Add TemplateForm for vue.
30
+ * ✨ Add path and view for TemplateForm.
31
+ * adding the rest of the form. - dependency-name: ip
32
+ dependency-type: indirect
33
+ ...
34
+
35
+ Signed-off-by: dependabot[bot] <support@github.com>
36
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
37
+
38
+ * chore(deps): bump undici from 5.28.2 to 5.28.3 (#1523)
39
+
40
+ Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
41
+ - [Release notes](https://github.com/nodejs/undici/releases)
42
+ - [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)
43
+
44
+ ---
45
+ updated-dependencies:
46
+ - dependency-name: undici
47
+ dependency-type: indirect
48
+ ...
49
+
50
+ * feat(docs): 🧾 legg til dokumentasjon for skjemamal (#1556)
51
+ * feat(docs): 🧾 Add code document for template form
52
+ * fix(docs): vis rendret eksempel av skjema mal
53
+ * Legg til skjema-mal mappe for bilder
54
+ * docs:#1525 Legg til dokumentasjon og mal
55
+
56
+
57
+ ---------
58
+
59
+ Co-authored-by: My T. Nguyen <mythng94@gmail.com>
60
+ Co-authored-by: My T. Nguyen <my.nguyen@origo.oslo.kommune.no>
61
+
62
+ ---------
63
+
64
+ Co-authored-by: julielyng <35265191+julielyng@users.noreply.github.com>
65
+
66
+ * Legge til nye bilder i svg i stedet for png
67
+ * Show svg pictures
68
+
69
+ ---------
70
+
71
+ Co-authored-by: julielyng <35265191+julielyng@users.noreply.github.com>
72
+
73
+
74
+ ### Bug Fixes
75
+ * 🔧 TextInput: Allow additional classes.
76
+
77
+
78
+ ### Chores
79
+ Ingen
80
+
81
+ ---
82
+
83
+
84
+ ## [11.8.1](https://github.com/oslokommune/punkt/compare/11.8.0...11.8.1) (2024-03-06)
85
+
86
+ ### ⚠ BREAKING CHANGES
87
+ Ingen
88
+
89
+ ### Features
90
+ Ingen
91
+
92
+ ### Bug Fixes
93
+ Ingen
94
+
95
+ ### Chores
96
+ * sort and set common formatter rules (#1571).
97
+
98
+
99
+ ---
100
+
101
+
8
102
  ## [11.8.0](https://github.com/oslokommune/punkt/compare/11.7.1...11.8.0) (2024-03-04)
9
103
 
10
104
  ### ⚠ BREAKING CHANGES
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./Button-PeCfDEXj.cjs"),g=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),l=require("./plugins-AiK__HqQ.cjs"),b={name:"PktSelect",components:{PktIcon:s.PktIcon,PktAlert:p.PktAlert,PktButton:f.PktButton,PktInputWrapper:g.PktInputWrapper},props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},modelValue:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},useWrapper:{type:Boolean,default:!0}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`}}},q=["aria-invalid","aria-errormessage","aria-labelledby","disabled","id","name","value"];function y(r,a,e,c,m,o){const u=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(u,{class:"pkt-select",forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:a[1]||(a[1]=i=>r.$emit("toggleHelpText"))},{default:t.withCtx(()=>[t.createElementVNode("select",t.mergeProps(r.$attrs,{onInput:a[0]||(a[0]=i=>r.$emit("update:modelValue",i.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth},"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":o.labelledBy,disabled:e.disabled,id:e.id,name:e.name||e.id,value:e.modelValue}),[t.renderSlot(r.$slots,"default")],16,q)]),_:3},8,["forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const n=l._export_sfc(b,[["render",y]]),d={install(r){l.registerComponent(r,n)}};l.use(d);exports.PktSelect=n;exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./Button-PeCfDEXj.cjs"),g=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),l=require("./plugins-AiK__HqQ.cjs"),b={name:"PktSelect",components:{PktIcon:s.PktIcon,PktAlert:p.PktAlert,PktButton:f.PktButton,PktInputWrapper:g.PktInputWrapper},props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},modelValue:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},useWrapper:{type:Boolean,default:!0}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`}}},q=["aria-invalid","aria-errormessage","aria-labelledby","disabled","id","name","value"];function c(r,a,e,y,m,o){const u=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(u,{class:t.normalizeClass(["pkt-select",r.$attrs.class]),forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:a[1]||(a[1]=i=>r.$emit("toggleHelpText"))},{default:t.withCtx(()=>[t.createElementVNode("select",t.mergeProps(r.$attrs,{onInput:a[0]||(a[0]=i=>r.$emit("update:modelValue",i.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth},"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":o.labelledBy,disabled:e.disabled,id:e.id,name:e.name||e.id,value:e.modelValue}),[t.renderSlot(r.$slots,"default")],16,q)]),_:3},8,["class","forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const n=l._export_sfc(b,[["render",c]]),d={install(r){l.registerComponent(r,n)}};l.use(d);exports.PktSelect=n;exports.default=d;
@@ -1,12 +1,12 @@
1
1
  import { P as d } from "./Icon-f0Yu-X_2.js";
2
2
  import { P as o } from "./Alert-p-4l9NR1.js";
3
3
  import { P as n } from "./Button-ukohjG2J.js";
4
- import { P as u } from "./InputWrapper-Hb1mKt2g.js";
5
- import { resolveComponent as s, openBlock as p, createBlock as f, withCtx as g, createElementVNode as m, mergeProps as b, renderSlot as y } from "vue";
6
- import { _ as q, u as h, a as x } from "./plugins-IeJb3XDX.js";
7
- const c = {
4
+ import { P as s } from "./InputWrapper-Hb1mKt2g.js";
5
+ import { resolveComponent as u, openBlock as p, createBlock as f, normalizeClass as m, withCtx as g, createElementVNode as b, mergeProps as y, renderSlot as q } from "vue";
6
+ import { _ as h, u as x, a as c } from "./plugins-IeJb3XDX.js";
7
+ const T = {
8
8
  name: "PktSelect",
9
- components: { PktIcon: d, PktAlert: o, PktButton: n, PktInputWrapper: u },
9
+ components: { PktIcon: d, PktAlert: o, PktButton: n, PktInputWrapper: s },
10
10
  props: {
11
11
  label: {
12
12
  type: String,
@@ -96,11 +96,11 @@ const c = {
96
96
  this.ariaLabelledby || `${this.id}`;
97
97
  }
98
98
  }
99
- }, T = ["aria-invalid", "aria-errormessage", "aria-labelledby", "disabled", "id", "name", "value"];
100
- function B(t, r, e, k, w, l) {
101
- const i = s("PktInputWrapper");
99
+ }, B = ["aria-invalid", "aria-errormessage", "aria-labelledby", "disabled", "id", "name", "value"];
100
+ function S(t, r, e, w, D, l) {
101
+ const i = u("PktInputWrapper");
102
102
  return p(), f(i, {
103
- class: "pkt-select",
103
+ class: m(["pkt-select", t.$attrs.class]),
104
104
  forId: e.id,
105
105
  label: e.label,
106
106
  helptext: e.helptext,
@@ -119,7 +119,7 @@ function B(t, r, e, k, w, l) {
119
119
  onToggleHelpText: r[1] || (r[1] = (a) => t.$emit("toggleHelpText"))
120
120
  }, {
121
121
  default: g(() => [
122
- m("select", b(t.$attrs, {
122
+ b("select", y(t.$attrs, {
123
123
  onInput: r[0] || (r[0] = (a) => t.$emit("update:modelValue", a.target.value)),
124
124
  class: {
125
125
  "pkt-input": !0,
@@ -133,19 +133,19 @@ function B(t, r, e, k, w, l) {
133
133
  name: e.name || e.id,
134
134
  value: e.modelValue
135
135
  }), [
136
- y(t.$slots, "default")
137
- ], 16, T)
136
+ q(t.$slots, "default")
137
+ ], 16, B)
138
138
  ]),
139
139
  _: 3
140
- }, 8, ["forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
140
+ }, 8, ["class", "forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
141
141
  }
142
- const S = /* @__PURE__ */ q(c, [["render", B]]), P = {
142
+ const P = /* @__PURE__ */ h(T, [["render", S]]), k = {
143
143
  install(t) {
144
- x(t, S);
144
+ c(t, P);
145
145
  }
146
146
  };
147
- h(P);
147
+ x(k);
148
148
  export {
149
- S as PktSelect,
150
- P as default
149
+ P as PktSelect,
150
+ k as default
151
151
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./Button-PeCfDEXj.cjs"),y=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),n=require("./plugins-AiK__HqQ.cjs"),m={name:"PktTextarea",components:{PktIcon:g.PktIcon,PktAlert:p.PktAlert,PktButton:f.PktButton,PktInputWrapper:y.PktInputWrapper},props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},placeholder:{type:String,required:!1},modelValue:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},counter:{type:Boolean,default:!1},counterMaxLength:{type:Number,required:!1},rows:{type:Number,required:!1},useWrapper:{type:Boolean,default:!0}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`}}},b=["aria-invalid","aria-errormessage","aria-labelledby","disabled","id","name","placeholder","rows","value"],h={key:0,class:"pkt-input__counter","aria-live":"polite","aria-atomic":"true"};function q(r,a,e,x,k,d){const s=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(s,{class:"pkt-textarea",forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:a[1]||(a[1]=l=>r.$emit("toggleHelpText"))},{default:t.withCtx(()=>{var l,i;return[t.createElementVNode("textarea",t.mergeProps(r.$attrs,{onInput:a[0]||(a[0]=c=>r.$emit("update:modelValue",c.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth,"pkt-input--counter-error":e.counterMaxLength&&((l=e.modelValue)==null?void 0:l.length)>e.counterMaxLength},"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":d.labelledBy,disabled:e.disabled,id:e.id,name:e.name||e.id,placeholder:e.placeholder,rows:e.rows,value:e.modelValue}),null,16,b),e.counter?(t.openBlock(),t.createElementBlock("div",h,[t.createTextVNode(t.toDisplayString(((i=e.modelValue)==null?void 0:i.length)||0),1),e.counterMaxLength?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("/"+t.toDisplayString(e.counterMaxLength),1)],64)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]}),_:1},8,["forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const o=n._export_sfc(m,[["render",q]]),u={install(r){n.registerComponent(r,o)}};n.use(u);exports.PktTextarea=o;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./Button-PeCfDEXj.cjs"),y=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),n=require("./plugins-AiK__HqQ.cjs"),m={name:"PktTextarea",components:{PktIcon:g.PktIcon,PktAlert:p.PktAlert,PktButton:f.PktButton,PktInputWrapper:y.PktInputWrapper},props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},placeholder:{type:String,required:!1},modelValue:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},counter:{type:Boolean,default:!1},counterMaxLength:{type:Number,required:!1},rows:{type:Number,required:!1},useWrapper:{type:Boolean,default:!0}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`}}},b=["aria-invalid","aria-errormessage","aria-labelledby","disabled","id","name","placeholder","rows","value"],h={key:0,class:"pkt-input__counter","aria-live":"polite","aria-atomic":"true"};function q(r,a,e,x,k,d){const s=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(s,{class:t.normalizeClass(["pkt-textarea",r.$attrs.class]),forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:a[1]||(a[1]=l=>r.$emit("toggleHelpText"))},{default:t.withCtx(()=>{var l,i;return[t.createElementVNode("textarea",t.mergeProps(r.$attrs,{onInput:a[0]||(a[0]=c=>r.$emit("update:modelValue",c.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth,"pkt-input--counter-error":e.counterMaxLength&&((l=e.modelValue)==null?void 0:l.length)>e.counterMaxLength},"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":d.labelledBy,disabled:e.disabled,id:e.id,name:e.name||e.id,placeholder:e.placeholder,rows:e.rows,value:e.modelValue}),null,16,b),e.counter?(t.openBlock(),t.createElementBlock("div",h,[t.createTextVNode(t.toDisplayString(((i=e.modelValue)==null?void 0:i.length)||0),1),e.counterMaxLength?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("/"+t.toDisplayString(e.counterMaxLength),1)],64)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]}),_:1},8,["class","forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const o=n._export_sfc(m,[["render",q]]),u={install(r){n.registerComponent(r,o)}};n.use(u);exports.PktTextarea=o;exports.default=u;
@@ -1,12 +1,12 @@
1
1
  import { P as m } from "./Icon-f0Yu-X_2.js";
2
2
  import { P as p } from "./Alert-p-4l9NR1.js";
3
- import { P as y } from "./Button-ukohjG2J.js";
4
- import { P as c } from "./InputWrapper-Hb1mKt2g.js";
5
- import { resolveComponent as h, openBlock as l, createBlock as x, withCtx as b, createElementVNode as q, mergeProps as T, createElementBlock as n, createTextVNode as o, toDisplayString as d, Fragment as k, createCommentVNode as u } from "vue";
6
- import { _ as B, u as w, a as P } from "./plugins-IeJb3XDX.js";
7
- const S = {
3
+ import { P as c } from "./Button-ukohjG2J.js";
4
+ import { P as y } from "./InputWrapper-Hb1mKt2g.js";
5
+ import { resolveComponent as h, openBlock as l, createBlock as x, normalizeClass as b, withCtx as q, createElementVNode as T, mergeProps as k, createElementBlock as n, createTextVNode as o, toDisplayString as d, Fragment as B, createCommentVNode as u } from "vue";
6
+ import { _ as w, u as P, a as S } from "./plugins-IeJb3XDX.js";
7
+ const D = {
8
8
  name: "PktTextarea",
9
- components: { PktIcon: m, PktAlert: p, PktButton: y, PktInputWrapper: c },
9
+ components: { PktIcon: m, PktAlert: p, PktButton: c, PktInputWrapper: y },
10
10
  props: {
11
11
  label: {
12
12
  type: String,
@@ -112,16 +112,16 @@ const S = {
112
112
  this.ariaLabelledby || `${this.id}`;
113
113
  }
114
114
  }
115
- }, D = ["aria-invalid", "aria-errormessage", "aria-labelledby", "disabled", "id", "name", "placeholder", "rows", "value"], _ = {
115
+ }, _ = ["aria-invalid", "aria-errormessage", "aria-labelledby", "disabled", "id", "name", "placeholder", "rows", "value"], v = {
116
116
  key: 0,
117
117
  class: "pkt-input__counter",
118
118
  "aria-live": "polite",
119
119
  "aria-atomic": "true"
120
120
  };
121
- function v(t, r, e, E, I, s) {
121
+ function M(t, r, e, I, L, s) {
122
122
  const f = h("PktInputWrapper");
123
123
  return l(), x(f, {
124
- class: "pkt-textarea",
124
+ class: b(["pkt-textarea", t.$attrs.class]),
125
125
  forId: e.id,
126
126
  label: e.label,
127
127
  helptext: e.helptext,
@@ -139,10 +139,10 @@ function v(t, r, e, E, I, s) {
139
139
  useWrapper: e.useWrapper,
140
140
  onToggleHelpText: r[1] || (r[1] = (a) => t.$emit("toggleHelpText"))
141
141
  }, {
142
- default: b(() => {
142
+ default: q(() => {
143
143
  var a, i;
144
144
  return [
145
- q("textarea", T(t.$attrs, {
145
+ T("textarea", k(t.$attrs, {
146
146
  onInput: r[0] || (r[0] = (g) => t.$emit("update:modelValue", g.target.value)),
147
147
  class: {
148
148
  "pkt-input": !0,
@@ -158,25 +158,25 @@ function v(t, r, e, E, I, s) {
158
158
  placeholder: e.placeholder,
159
159
  rows: e.rows,
160
160
  value: e.modelValue
161
- }), null, 16, D),
162
- e.counter ? (l(), n("div", _, [
161
+ }), null, 16, _),
162
+ e.counter ? (l(), n("div", v, [
163
163
  o(d(((i = e.modelValue) == null ? void 0 : i.length) || 0), 1),
164
- e.counterMaxLength ? (l(), n(k, { key: 0 }, [
164
+ e.counterMaxLength ? (l(), n(B, { key: 0 }, [
165
165
  o("/" + d(e.counterMaxLength), 1)
166
166
  ], 64)) : u("", !0)
167
167
  ])) : u("", !0)
168
168
  ];
169
169
  }),
170
170
  _: 1
171
- }, 8, ["forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
171
+ }, 8, ["class", "forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
172
172
  }
173
- const M = /* @__PURE__ */ B(S, [["render", v]]), V = {
173
+ const V = /* @__PURE__ */ w(D, [["render", M]]), E = {
174
174
  install(t) {
175
- P(t, M);
175
+ S(t, V);
176
176
  }
177
177
  };
178
- w(V);
178
+ P(E);
179
179
  export {
180
- M as PktTextarea,
181
- V as default
180
+ V as PktTextarea,
181
+ E as default
182
182
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),n=require("./plugins-AiK__HqQ.cjs");require("./Button-PeCfDEXj.cjs");const g={name:"PktTextinput",components:{PktIcon:c.PktIcon,PktAlert:p.PktAlert,PktInputWrapper:f.PktInputWrapper},inheritAttrs:!1,props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},placeholder:{type:String,required:!1},type:{type:String,required:!1,default:"text"},autocomplete:{type:String,required:!1,default:"off"},modelValue:{type:String,required:!1},suffix:{type:String,required:!1},prefix:{type:String,required:!1},iconNameRight:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},useWrapper:{type:Boolean,default:!0},omitSearchIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`},shouldShowSearchIcon(){return this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon}}},m={class:"pkt-input__container"},y={key:0,class:"pkt-input-prefix"},h=["type","name","id","placeholder","autocomplete","value","disabled","aria-invalid","aria-errormessage","aria-labelledby"],k={key:1,class:"pkt-input-suffix"};function x(r,a,e,q,b,i){const l=t.resolveComponent("pkt-icon"),s=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(s,{class:"pkt-textinput",forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:a[1]||(a[1]=o=>r.$emit("toggleHelpText"))},{default:t.withCtx(()=>[t.createElementVNode("div",m,[e.prefix?(t.openBlock(),t.createElementBlock("div",y,t.toDisplayString(e.prefix),1)):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps(r.$attrs,{onInput:a[0]||(a[0]=o=>r.$emit("update:modelValue",o.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth},type:e.type,name:e.name||e.id,id:e.id,placeholder:e.placeholder,autocomplete:e.autocomplete,value:e.modelValue,disabled:e.disabled,"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":i.labelledBy,ref:"input"}),null,16,h),e.suffix?(t.openBlock(),t.createElementBlock("p",k,[t.createTextVNode(t.toDisplayString(e.suffix)+" ",1),e.iconNameRight?(t.openBlock(),t.createBlock(l,{key:0,class:"pkt-input-suffix-icon",name:e.iconNameRight},null,8,["name"])):i.shouldShowSearchIcon?(t.openBlock(),t.createBlock(l,{key:1,class:"pkt-input-suffix-icon",name:"magnifying-glass-big"})):t.createCommentVNode("",!0)])):e.iconNameRight?(t.openBlock(),t.createBlock(l,{key:2,class:"pkt-input-icon",name:e.iconNameRight},null,8,["name"])):i.shouldShowSearchIcon?(t.openBlock(),t.createBlock(l,{key:3,class:"pkt-input-icon",name:"magnifying-glass-big"})):t.createCommentVNode("",!0)])]),_:1},8,["forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const u=n._export_sfc(g,[["render",x]]),d={install(r){n.registerComponent(r,u)}};n.use(d);exports.PktTextinput=u;exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./Icon-D5KXd1vV.cjs"),p=require("./Alert-4uYQ7-Zl.cjs"),f=require("./InputWrapper-u-5p8dsq.cjs"),t=require("vue"),n=require("./plugins-AiK__HqQ.cjs");require("./Button-PeCfDEXj.cjs");const g={name:"PktTextinput",components:{PktIcon:c.PktIcon,PktAlert:p.PktAlert,PktInputWrapper:f.PktInputWrapper},inheritAttrs:!1,props:{label:{type:String,required:!0,default:"input"},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,required:!1},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,required:!1},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},name:{type:String,required:!1},id:{type:String,required:!0},placeholder:{type:String,required:!1},type:{type:String,required:!1,default:"text"},autocomplete:{type:String,required:!1,default:"off"},modelValue:{type:String,required:!1},suffix:{type:String,required:!1},prefix:{type:String,required:!1},iconNameRight:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},fullwidth:{type:Boolean,default:!1},ariaLabelledby:{type:String,required:!1},ariaDescribedby:{type:String,required:!1},useWrapper:{type:Boolean,default:!0},omitSearchIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{labelledBy(){this.ariaLabelledby||`${this.id}`},shouldShowSearchIcon(){return this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon}}},m={class:"pkt-input__container"},y={key:0,class:"pkt-input-prefix"},h=["type","name","id","placeholder","autocomplete","value","disabled","aria-invalid","aria-errormessage","aria-labelledby"],k={key:1,class:"pkt-input-suffix"};function q(a,r,e,x,b,i){const l=t.resolveComponent("pkt-icon"),s=t.resolveComponent("PktInputWrapper");return t.openBlock(),t.createBlock(s,{class:t.normalizeClass(["pkt-textinput",a.$attrs.class]),forId:e.id,label:e.label,helptext:e.helptext,helptextDropdown:e.helptextDropdown,helptextDropdownButton:e.helptextDropdownButton,optionalTag:e.optionalTag,optionalText:e.optionalText,requiredTag:e.requiredTag,requiredText:e.requiredText,hasError:e.hasError,errorMessage:e.errorMessage,disabled:e.disabled,inline:e.inline,ariaDescribedby:e.ariaDescribedby,useWrapper:e.useWrapper,onToggleHelpText:r[1]||(r[1]=o=>a.$emit("toggleHelpText"))},{default:t.withCtx(()=>[t.createElementVNode("div",m,[e.prefix?(t.openBlock(),t.createElementBlock("div",y,t.toDisplayString(e.prefix),1)):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps(a.$attrs,{onInput:r[0]||(r[0]=o=>a.$emit("update:modelValue",o.target.value)),class:{"pkt-input":!0,"pkt-input--fullwidth":e.fullwidth},type:e.type,name:e.name||e.id,id:e.id,placeholder:e.placeholder,autocomplete:e.autocomplete,value:e.modelValue,disabled:e.disabled,"aria-invalid":e.hasError,"aria-errormessage":e.hasError?`${e.id}-error`:"","aria-labelledby":i.labelledBy,ref:"input"}),null,16,h),e.suffix?(t.openBlock(),t.createElementBlock("p",k,[t.createTextVNode(t.toDisplayString(e.suffix)+" ",1),e.iconNameRight?(t.openBlock(),t.createBlock(l,{key:0,class:"pkt-input-suffix-icon",name:e.iconNameRight},null,8,["name"])):i.shouldShowSearchIcon?(t.openBlock(),t.createBlock(l,{key:1,class:"pkt-input-suffix-icon",name:"magnifying-glass-big"})):t.createCommentVNode("",!0)])):e.iconNameRight?(t.openBlock(),t.createBlock(l,{key:2,class:"pkt-input-icon",name:e.iconNameRight},null,8,["name"])):i.shouldShowSearchIcon?(t.openBlock(),t.createBlock(l,{key:3,class:"pkt-input-icon",name:"magnifying-glass-big"})):t.createCommentVNode("",!0)])]),_:1},8,["class","forId","label","helptext","helptextDropdown","helptextDropdownButton","optionalTag","optionalText","requiredTag","requiredText","hasError","errorMessage","disabled","inline","ariaDescribedby","useWrapper"])}const u=n._export_sfc(g,[["render",q]]),d={install(a){n.registerComponent(a,u)}};n.use(d);exports.PktTextinput=u;exports.default=d;
@@ -1,10 +1,10 @@
1
1
  import { P as m } from "./Icon-f0Yu-X_2.js";
2
2
  import { P as g } from "./Alert-p-4l9NR1.js";
3
3
  import { P as h } from "./InputWrapper-Hb1mKt2g.js";
4
- import { resolveComponent as u, openBlock as t, createBlock as r, withCtx as y, createElementVNode as s, createElementBlock as f, toDisplayString as p, createCommentVNode as o, mergeProps as x, createTextVNode as b } from "vue";
5
- import { _ as q, u as k, a as S } from "./plugins-IeJb3XDX.js";
4
+ import { resolveComponent as u, openBlock as t, createBlock as r, normalizeClass as y, withCtx as x, createElementVNode as s, createElementBlock as f, toDisplayString as p, createCommentVNode as o, mergeProps as b, createTextVNode as q } from "vue";
5
+ import { _ as k, u as S, a as T } from "./plugins-IeJb3XDX.js";
6
6
  import "./Button-ukohjG2J.js";
7
- const T = {
7
+ const B = {
8
8
  name: "PktTextinput",
9
9
  components: { PktIcon: m, PktAlert: g, PktInputWrapper: h },
10
10
  inheritAttrs: !1,
@@ -130,17 +130,17 @@ const T = {
130
130
  return this.type === "search" && !this.iconNameRight && !this.omitSearchIcon;
131
131
  }
132
132
  }
133
- }, _ = { class: "pkt-input__container" }, B = {
133
+ }, _ = { class: "pkt-input__container" }, w = {
134
134
  key: 0,
135
135
  class: "pkt-input-prefix"
136
- }, w = ["type", "name", "id", "placeholder", "autocomplete", "value", "disabled", "aria-invalid", "aria-errormessage", "aria-labelledby"], D = {
136
+ }, D = ["type", "name", "id", "placeholder", "autocomplete", "value", "disabled", "aria-invalid", "aria-errormessage", "aria-labelledby"], I = {
137
137
  key: 1,
138
138
  class: "pkt-input-suffix"
139
139
  };
140
- function I(a, i, e, N, E, n) {
140
+ function P(a, i, e, E, V, n) {
141
141
  const l = u("pkt-icon"), c = u("PktInputWrapper");
142
142
  return t(), r(c, {
143
- class: "pkt-textinput",
143
+ class: y(["pkt-textinput", a.$attrs.class]),
144
144
  forId: e.id,
145
145
  label: e.label,
146
146
  helptext: e.helptext,
@@ -158,10 +158,10 @@ function I(a, i, e, N, E, n) {
158
158
  useWrapper: e.useWrapper,
159
159
  onToggleHelpText: i[1] || (i[1] = (d) => a.$emit("toggleHelpText"))
160
160
  }, {
161
- default: y(() => [
161
+ default: x(() => [
162
162
  s("div", _, [
163
- e.prefix ? (t(), f("div", B, p(e.prefix), 1)) : o("", !0),
164
- s("input", x(a.$attrs, {
163
+ e.prefix ? (t(), f("div", w, p(e.prefix), 1)) : o("", !0),
164
+ s("input", b(a.$attrs, {
165
165
  onInput: i[0] || (i[0] = (d) => a.$emit("update:modelValue", d.target.value)),
166
166
  class: {
167
167
  "pkt-input": !0,
@@ -178,9 +178,9 @@ function I(a, i, e, N, E, n) {
178
178
  "aria-errormessage": e.hasError ? `${e.id}-error` : "",
179
179
  "aria-labelledby": n.labelledBy,
180
180
  ref: "input"
181
- }), null, 16, w),
182
- e.suffix ? (t(), f("p", D, [
183
- b(p(e.suffix) + " ", 1),
181
+ }), null, 16, D),
182
+ e.suffix ? (t(), f("p", I, [
183
+ q(p(e.suffix) + " ", 1),
184
184
  e.iconNameRight ? (t(), r(l, {
185
185
  key: 0,
186
186
  class: "pkt-input-suffix-icon",
@@ -202,15 +202,15 @@ function I(a, i, e, N, E, n) {
202
202
  ])
203
203
  ]),
204
204
  _: 1
205
- }, 8, ["forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
205
+ }, 8, ["class", "forId", "label", "helptext", "helptextDropdown", "helptextDropdownButton", "optionalTag", "optionalText", "requiredTag", "requiredText", "hasError", "errorMessage", "disabled", "inline", "ariaDescribedby", "useWrapper"]);
206
206
  }
207
- const P = /* @__PURE__ */ q(T, [["render", I]]), v = {
207
+ const v = /* @__PURE__ */ k(B, [["render", P]]), N = {
208
208
  install(a) {
209
- S(a, P);
209
+ T(a, v);
210
210
  }
211
211
  };
212
- k(v);
212
+ S(N);
213
213
  export {
214
- P as PktTextinput,
215
- v as default
214
+ v as PktTextinput,
215
+ N as default
216
216
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-vue",
3
- "version": "11.8.0",
3
+ "version": "11.9.0",
4
4
  "description": "Vue komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@oslokommune/punkt-assets": "^11.5.0",
30
- "@oslokommune/punkt-css": "^11.7.0",
30
+ "@oslokommune/punkt-css": "^11.9.0",
31
31
  "@vitejs/plugin-vue": "^4.5.2",
32
32
  "edit-json-file": "^1.7.0",
33
33
  "sass": "^1.69.5",
@@ -65,5 +65,5 @@
65
65
  "url": "https://github.com/oslokommune/punkt/issues"
66
66
  },
67
67
  "license": "MIT",
68
- "gitHead": "510c43734ab24941a95c9e256abedbc30554bf3c"
68
+ "gitHead": "f9c10e09713a41530c52b4a836c9801dd1f527ac"
69
69
  }
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <PktInputWrapper
3
3
  class="pkt-select"
4
+ :class="$attrs.class"
4
5
  :forId="id"
5
6
  :label="label"
6
7
  :helptext="helptext"
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <PktInputWrapper
3
3
  class="pkt-textarea"
4
+ :class="$attrs.class"
4
5
  :forId="id"
5
6
  :label="label"
6
7
  :helptext="helptext"
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <PktInputWrapper
3
3
  class="pkt-textinput"
4
+ :class="$attrs.class"
4
5
  :forId="id"
5
6
  :label="label"
6
7
  :helptext="helptext"