@oslokommune/punkt-vue 16.7.3 → 16.7.5
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 +36 -0
- package/dist/Alert-CHuVD60O.cjs +1 -0
- package/dist/Alert-oTzo9iRu.js +68 -0
- package/dist/Button-BZp49YQT.cjs +1 -0
- package/dist/Button-MGcW7Rud.js +161 -0
- package/dist/Helptext-BCSz7jKA.js +52 -0
- package/dist/Helptext-BrCCiDCr.cjs +1 -0
- package/dist/Icon-BIgZkS83.js +24 -0
- package/dist/Icon-CWAl4gIM.cjs +1 -0
- package/dist/InputWrapper-B3nYy5_K.cjs +1 -0
- package/dist/InputWrapper-_FhINEnw.js +213 -0
- package/dist/Tag-B0FbthFr.cjs +1 -0
- package/dist/Tag-CR41DHXf.js +87 -0
- package/dist/_plugin-vue_export-helper-BTgDAbhb.js +8 -0
- package/dist/_plugin-vue_export-helper-TlCYmDuq.cjs +1 -0
- package/dist/accordion-C9K5rShu.js +93 -0
- package/dist/accordion-Dr7kdoN7.cjs +1 -0
- package/dist/backlink-Byjm4TbJ.js +51 -0
- package/dist/backlink-DUevzFxu.cjs +1 -0
- package/dist/breadcrumbs-CmTHvSSO.cjs +1 -0
- package/dist/breadcrumbs-m65yseAW.js +73 -0
- package/dist/checkbox-CL_COXxh.js +104 -0
- package/dist/checkbox-cjFrzjZi.cjs +1 -0
- package/dist/components/accordion/Accordion.vue.d.ts +29 -0
- package/dist/components/accordion/AccordionItem.vue.d.ts +48 -0
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/alert/Alert.vue.d.ts +63 -0
- package/dist/components/alert/index.d.ts +6 -0
- package/dist/components/backlink/BackLink.vue.d.ts +52 -0
- package/dist/components/backlink/index.d.ts +6 -0
- package/dist/components/breadcrumbs/Breadcrumbs.vue.d.ts +56 -0
- package/dist/components/breadcrumbs/index.d.ts +6 -0
- package/dist/components/button/Button.vue.d.ts +153 -0
- package/dist/components/button/index.d.ts +6 -0
- package/dist/components/checkbox/Checkbox.vue.d.ts +109 -0
- package/dist/components/checkbox/index.d.ts +6 -0
- package/dist/components/footer/Footer.vue.d.ts +128 -0
- package/dist/components/footer/index.d.ts +6 -0
- package/dist/components/footersimple/FooterSimple.vue.d.ts +107 -0
- package/dist/components/footersimple/index.d.ts +6 -0
- package/dist/components/header/Header.vue.d.ts +297 -0
- package/dist/components/header/index.d.ts +6 -0
- package/dist/components/helptext/Helptext.vue.d.ts +44 -0
- package/dist/components/helptext/index.d.ts +6 -0
- package/dist/components/icon/Icon.vue.d.ts +25 -0
- package/dist/components/icon/index.d.ts +6 -0
- package/dist/components/index.d.ts +24 -0
- package/dist/components/inputwrapper/InputWrapper.vue.d.ts +298 -0
- package/dist/components/inputwrapper/index.d.ts +6 -0
- package/dist/components/linkcard/Linkcard.vue.d.ts +86 -0
- package/dist/components/linkcard/index.d.ts +6 -0
- package/dist/components/loader/Loader.vue.d.ts +29 -0
- package/dist/components/loader/index.d.ts +6 -0
- package/dist/components/messagebox/Messagebox.vue.d.ts +43 -0
- package/dist/components/messagebox/index.d.ts +6 -0
- package/dist/components/plugins.d.ts +24 -0
- package/dist/components/progressbar/Progressbar.vue.d.ts +35 -0
- package/dist/components/progressbar/index.d.ts +6 -0
- package/dist/components/radiobutton/Radiobutton.vue.d.ts +98 -0
- package/dist/components/radiobutton/index.d.ts +6 -0
- package/dist/components/searchinput/SearchInput.vue.d.ts +285 -0
- package/dist/components/searchinput/index.d.ts +6 -0
- package/dist/components/select/Select.vue.d.ts +715 -0
- package/dist/components/select/index.d.ts +6 -0
- package/dist/components/stepper/Step.vue.d.ts +25 -0
- package/dist/components/stepper/Stepper.vue.d.ts +31 -0
- package/dist/components/stepper/index.d.ts +7 -0
- package/dist/components/table/Table.vue.d.ts +28 -0
- package/dist/components/table/TableBody.vue.d.ts +20 -0
- package/dist/components/table/TableDataCell.vue.d.ts +21 -0
- package/dist/components/table/TableHeader.vue.d.ts +21 -0
- package/dist/components/table/TableHeaderCell.vue.d.ts +21 -0
- package/dist/components/table/TableRow.vue.d.ts +20 -0
- package/dist/components/table/index.d.ts +11 -0
- package/dist/components/tabs/Tabs.vue.d.ts +12 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tag/Tag.vue.d.ts +76 -0
- package/dist/components/tag/index.d.ts +6 -0
- package/dist/components/textarea/Textarea.vue.d.ts +748 -0
- package/dist/components/textarea/index.d.ts +6 -0
- package/dist/components/textinput/Textinput.vue.d.ts +646 -0
- package/dist/components/textinput/index.d.ts +6 -0
- package/dist/footer-CXFzikEP.cjs +1 -0
- package/dist/footer-DChb4Ilf.js +182 -0
- package/dist/footersimple-COAbCgRf.js +109 -0
- package/dist/footersimple-XWF7n0Rn.cjs +1 -0
- package/dist/header-C4IVQjWR.cjs +1 -0
- package/dist/header-DCA0z_I6.js +289 -0
- package/dist/index.d.ts +6 -0
- package/dist/linkcard-C7pFXsbv.cjs +1 -0
- package/dist/linkcard-KNc0Vtgg.js +75 -0
- package/dist/loader-0itPXctT.cjs +1 -0
- package/dist/loader-BfzCFC4O.js +65 -0
- package/dist/messagebox-C5JKiW6j.js +53 -0
- package/dist/messagebox-DOI0i62W.cjs +1 -0
- package/dist/plugins-DPVTnXnu.js +10 -0
- package/dist/plugins-Dv4f6RT9.cjs +1 -0
- package/dist/progressbar-CKm1YSia.js +129 -0
- package/dist/progressbar-D0bYOpFA.cjs +1 -0
- package/dist/punkt-vue-accordion.cjs +1 -1
- package/dist/punkt-vue-accordion.js +2 -99
- package/dist/punkt-vue-alert.cjs +1 -1
- package/dist/punkt-vue-alert.js +9 -12
- package/dist/punkt-vue-backlink.cjs +1 -1
- package/dist/punkt-vue-backlink.js +2 -73
- package/dist/punkt-vue-breadcrumbs.cjs +1 -1
- package/dist/punkt-vue-breadcrumbs.js +2 -96
- package/dist/punkt-vue-button.cjs +1 -1
- package/dist/punkt-vue-button.js +9 -12
- package/dist/punkt-vue-checkbox.cjs +1 -1
- package/dist/punkt-vue-checkbox.js +2 -118
- package/dist/punkt-vue-footer.cjs +1 -1
- package/dist/punkt-vue-footer.js +2 -215
- package/dist/punkt-vue-footersimple.cjs +1 -1
- package/dist/punkt-vue-footersimple.js +2 -123
- package/dist/punkt-vue-header.cjs +1 -1
- package/dist/punkt-vue-header.js +2 -382
- package/dist/punkt-vue-helptext.cjs +1 -1
- package/dist/punkt-vue-helptext.js +9 -12
- package/dist/punkt-vue-icon.cjs +1 -1
- package/dist/punkt-vue-icon.js +9 -12
- package/dist/punkt-vue-index.cjs +1 -1
- package/dist/punkt-vue-index.js +74 -148
- package/dist/punkt-vue-inputwrapper.cjs +1 -1
- package/dist/punkt-vue-inputwrapper.js +9 -12
- package/dist/punkt-vue-linkcard.cjs +1 -1
- package/dist/punkt-vue-linkcard.js +2 -70
- package/dist/punkt-vue-loader.cjs +1 -1
- package/dist/punkt-vue-loader.js +2 -68
- package/dist/punkt-vue-messagebox.cjs +1 -1
- package/dist/punkt-vue-messagebox.js +2 -48
- package/dist/punkt-vue-progressbar.cjs +1 -1
- package/dist/punkt-vue-progressbar.js +2 -156
- package/dist/punkt-vue-radiobutton.cjs +1 -1
- package/dist/punkt-vue-radiobutton.js +2 -103
- package/dist/punkt-vue-searchinput.cjs +1 -1
- package/dist/punkt-vue-searchinput.js +180 -166
- package/dist/punkt-vue-select.cjs +1 -1
- package/dist/punkt-vue-select.js +2 -152
- package/dist/punkt-vue-stepper.cjs +1 -1
- package/dist/punkt-vue-stepper.js +2 -87
- package/dist/punkt-vue-table.cjs +1 -1
- package/dist/punkt-vue-table.js +2 -121
- package/dist/punkt-vue-tabs.cjs +1 -1
- package/dist/punkt-vue-tabs.js +2 -125
- package/dist/punkt-vue-tag.cjs +1 -1
- package/dist/punkt-vue-tag.js +9 -12
- package/dist/punkt-vue-textarea.cjs +1 -1
- package/dist/punkt-vue-textarea.js +2 -176
- package/dist/punkt-vue-textinput.cjs +1 -1
- package/dist/punkt-vue-textinput.js +2 -232
- package/dist/radiobutton-CRO9YGqj.cjs +1 -0
- package/dist/radiobutton-CaP1tya2.js +94 -0
- package/dist/select-Bg-RVrIK.cjs +1 -0
- package/dist/select-D4-sqeFs.js +173 -0
- package/dist/stepper-CjTF-9WO.js +80 -0
- package/dist/stepper-CwL-EHUU.cjs +1 -0
- package/dist/table-BupPPZgc.js +102 -0
- package/dist/table-Vea6ecvM.cjs +1 -0
- package/dist/tabs-CWMnCZY-.cjs +1 -0
- package/dist/tabs-DEemW7hf.js +106 -0
- package/dist/textarea-XFN-R8Q8.cjs +1 -0
- package/dist/textarea-xb4qPa3q.js +200 -0
- package/dist/textinput-CjKo5Ty2.js +258 -0
- package/dist/textinput-DeSHl-64.cjs +1 -0
- package/dist/utils/plugins.d.ts +3 -0
- package/package.json +10 -5
- package/dist/Alert-BxaNh35y.cjs +0 -1
- package/dist/Alert-R-eAFCdz.js +0 -54
- package/dist/Button-BlX9N6dr.js +0 -145
- package/dist/Button-D2xQdpZo.cjs +0 -1
- package/dist/Helptext-DFu5XOhU.cjs +0 -1
- package/dist/Helptext-x_AJJvxR.js +0 -55
- package/dist/Icon-BLNK24NN.cjs +0 -1
- package/dist/Icon-DdXdUxP2.js +0 -24
- package/dist/InputWrapper-CXY8O_cJ.js +0 -214
- package/dist/InputWrapper-Na9WOvV8.cjs +0 -1
- package/dist/Tag-BpTGJPw9.js +0 -63
- package/dist/Tag-C-J-U1MJ.cjs +0 -1
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/plugins-CMydO4oi.cjs +0 -1
- package/dist/plugins-DQVoaMd9.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,42 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [16.7.5](https://github.com/oslokommune/punkt/compare/16.7.4...16.7.5) (2026-04-15)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
* export typings (#3419).
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [16.7.4](https://github.com/oslokommune/punkt/compare/16.7.3...16.7.4) (2026-04-14)
|
|
27
|
+
|
|
28
|
+
### ⚠ BREAKING CHANGES
|
|
29
|
+
Ingen
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
Ingen
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
* Vite => 8.0.8 & Vitest => 4.1.4 & TypeScript => 6.0.2 (#3418).
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
Ingen
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
|
|
8
44
|
## [16.0.4](https://github.com/oslokommune/punkt/compare/16.0.3...16.0.4) (2026-03-13)
|
|
9
45
|
|
|
10
46
|
### ⚠ BREAKING CHANGES
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`);require(`@oslokommune/punkt-elements/dist/pkt-alert`);let t=require(`vue`);var n={name:`PktAlert`,props:{skin:{type:String,default:`info`,validator(e){return[`error`,`success`,`warning`,`info`].includes(e)}},closeAlert:{type:Boolean,default:!1},title:{type:String,default:``},date:{type:String,default:``},ariaLive:{type:String,default:`polite`,validator(e){return[`off`,`polite`,`assertive`].includes(e)}},compact:{type:Boolean,default:!1}}},r=[`skin`,`closeAlert`,`title`,`date`,`ariaLive`,`compact`];function i(e,n,i,a,o,s){return(0,t.openBlock)(),(0,t.createElementBlock)(`pkt-alert`,{skin:i.skin,closeAlert:i.closeAlert,title:i.title,date:i.date,ariaLive:i.ariaLive,compact:i.compact},[(0,t.renderSlot)(e.$slots,`default`)],8,r)}var a=e.t(n,[[`render`,i]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import "@oslokommune/punkt-elements/dist/pkt-alert";
|
|
3
|
+
import { createElementBlock as t, openBlock as n, renderSlot as r } from "vue";
|
|
4
|
+
//#region src/components/alert/Alert.vue
|
|
5
|
+
var i = {
|
|
6
|
+
name: "PktAlert",
|
|
7
|
+
props: {
|
|
8
|
+
skin: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "info",
|
|
11
|
+
validator(e) {
|
|
12
|
+
return [
|
|
13
|
+
"error",
|
|
14
|
+
"success",
|
|
15
|
+
"warning",
|
|
16
|
+
"info"
|
|
17
|
+
].includes(e);
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
closeAlert: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
title: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ""
|
|
27
|
+
},
|
|
28
|
+
date: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
ariaLive: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "polite",
|
|
35
|
+
validator(e) {
|
|
36
|
+
return [
|
|
37
|
+
"off",
|
|
38
|
+
"polite",
|
|
39
|
+
"assertive"
|
|
40
|
+
].includes(e);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
compact: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, a = [
|
|
49
|
+
"skin",
|
|
50
|
+
"closeAlert",
|
|
51
|
+
"title",
|
|
52
|
+
"date",
|
|
53
|
+
"ariaLive",
|
|
54
|
+
"compact"
|
|
55
|
+
];
|
|
56
|
+
function o(e, i, o, s, c, l) {
|
|
57
|
+
return n(), t("pkt-alert", {
|
|
58
|
+
skin: o.skin,
|
|
59
|
+
closeAlert: o.closeAlert,
|
|
60
|
+
title: o.title,
|
|
61
|
+
date: o.date,
|
|
62
|
+
ariaLive: o.ariaLive,
|
|
63
|
+
compact: o.compact
|
|
64
|
+
}, [r(e.$slots, "default")], 8, a);
|
|
65
|
+
}
|
|
66
|
+
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
67
|
+
//#endregion
|
|
68
|
+
export { s as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`),t=require(`./Icon-CWAl4gIM.cjs`);let n=require(`vue`);var r={name:`PktButton`,components:{PktIcon:t.t},props:{disabled:{type:Boolean,required:!1,default:!1},iconName:{type:String,required:!1,default:`user`},secondIconName:{type:String,required:!1,default:`user`},size:{type:String,default:`medium`,validator:e=>[`small`,`medium`,`large`].includes(e)},skin:{type:String,default:`primary`,validator:e=>[`primary`,`secondary`,`tertiary`].includes(e)},color:{type:String,validator:e=>[`blue`,`blue-outline`,`green`,`green-outline`,`green-dark`,`green-dark-outline`,`beige-light`,`beige-dark-outline`,`yellow`,`yellow-outline`,`red`,`red-outline`].includes(e)},text:{type:String,required:!1,default:`Trykk her`},variant:{type:String,default:`label-only`,validator:e=>[`label-only`,`icon-left`,`icon-right`,`icon-only`,`icons-right-and-left`].includes(e)},state:{type:String,required:!1,validator:e=>[`normal`,`focus`,`hover`,`active`].includes(e)},type:{type:String,default:`button`,validator:e=>[`button`,`submit`,`reset`].includes(e)},isLoading:{type:Boolean,default:!1}},computed:{classes(){return[`pkt-btn`,this.sizeClass,this.skinClass,this.variantClass,this.colorClass,this.isLoadingClass,this.stateClass]},sizeClass(){return this.size===`medium`?``:`pkt-btn--${this.size}`},skinClass(){return this.skin===`primary`?``:`pkt-btn--${this.skin}`},colorClass(){return this.color?`pkt-btn--${this.color}`:``},stateClass(){return this.state?`pkt-btn--${this.state}`:``},variantClass(){return this.variant===`label-only`?``:`pkt-btn--${this.variant}`},isLoadingClass(){return this.isLoading===!0?`pkt-btn--active`:``}}},i=[`type`,`disabled`],a={class:`pkt-btn__text`};function o(e,t,r,o,s,c){let l=(0,n.resolveComponent)(`PktIcon`);return(0,n.openBlock)(),(0,n.createElementBlock)(`button`,(0,n.mergeProps)(e.$attrs,{type:r.type,class:c.classes,onClick:t[0]||=t=>e.$emit(`onClick`),onKeyup:t[1]||=(0,n.withKeys)(t=>e.$emit(`onClick`),[`enter`]),disabled:r.disabled}),[r.isLoading===!0?((0,n.openBlock)(),(0,n.createBlock)(l,{key:0,class:`pkt-btn__icon pkt-btn__spinner`,name:`spinner-blue`,path:`https://punkt-cdn.oslo.kommune.no/16.7/animations/`})):(0,n.createCommentVNode)(``,!0),r.variant===`label-only`?(0,n.createCommentVNode)(``,!0):((0,n.openBlock)(),(0,n.createBlock)(l,{key:1,class:`pkt-btn__icon`,name:r.iconName},null,8,[`name`])),(0,n.createElementVNode)(`span`,a,[(0,n.renderSlot)(e.$slots,`default`,{},()=>[(0,n.createTextVNode)((0,n.toDisplayString)(r.text),1)])]),r.variant===`icons-right-and-left`?((0,n.openBlock)(),(0,n.createBlock)(l,{key:2,class:`pkt-btn__icon`,name:r.secondIconName},null,8,[`name`])):(0,n.createCommentVNode)(``,!0)],16,i)}var s=e.t(r,[[`render`,o]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import { t } from "./Icon-BIgZkS83.js";
|
|
3
|
+
import { createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, mergeProps as s, openBlock as c, renderSlot as l, resolveComponent as u, toDisplayString as d, withKeys as f } from "vue";
|
|
4
|
+
//#region src/components/button/Button.vue
|
|
5
|
+
var p = {
|
|
6
|
+
name: "PktButton",
|
|
7
|
+
components: { PktIcon: t },
|
|
8
|
+
props: {
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
required: !1,
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
iconName: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: !1,
|
|
17
|
+
default: "user"
|
|
18
|
+
},
|
|
19
|
+
secondIconName: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: !1,
|
|
22
|
+
default: "user"
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "medium",
|
|
27
|
+
validator: (e) => [
|
|
28
|
+
"small",
|
|
29
|
+
"medium",
|
|
30
|
+
"large"
|
|
31
|
+
].includes(e)
|
|
32
|
+
},
|
|
33
|
+
skin: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "primary",
|
|
36
|
+
validator: (e) => [
|
|
37
|
+
"primary",
|
|
38
|
+
"secondary",
|
|
39
|
+
"tertiary"
|
|
40
|
+
].includes(e)
|
|
41
|
+
},
|
|
42
|
+
color: {
|
|
43
|
+
type: String,
|
|
44
|
+
validator: (e) => [
|
|
45
|
+
"blue",
|
|
46
|
+
"blue-outline",
|
|
47
|
+
"green",
|
|
48
|
+
"green-outline",
|
|
49
|
+
"green-dark",
|
|
50
|
+
"green-dark-outline",
|
|
51
|
+
"beige-light",
|
|
52
|
+
"beige-dark-outline",
|
|
53
|
+
"yellow",
|
|
54
|
+
"yellow-outline",
|
|
55
|
+
"red",
|
|
56
|
+
"red-outline"
|
|
57
|
+
].includes(e)
|
|
58
|
+
},
|
|
59
|
+
text: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: !1,
|
|
62
|
+
default: "Trykk her"
|
|
63
|
+
},
|
|
64
|
+
variant: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "label-only",
|
|
67
|
+
validator: (e) => [
|
|
68
|
+
"label-only",
|
|
69
|
+
"icon-left",
|
|
70
|
+
"icon-right",
|
|
71
|
+
"icon-only",
|
|
72
|
+
"icons-right-and-left"
|
|
73
|
+
].includes(e)
|
|
74
|
+
},
|
|
75
|
+
state: {
|
|
76
|
+
type: String,
|
|
77
|
+
required: !1,
|
|
78
|
+
validator: (e) => [
|
|
79
|
+
"normal",
|
|
80
|
+
"focus",
|
|
81
|
+
"hover",
|
|
82
|
+
"active"
|
|
83
|
+
].includes(e)
|
|
84
|
+
},
|
|
85
|
+
type: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: "button",
|
|
88
|
+
validator: (e) => [
|
|
89
|
+
"button",
|
|
90
|
+
"submit",
|
|
91
|
+
"reset"
|
|
92
|
+
].includes(e)
|
|
93
|
+
},
|
|
94
|
+
isLoading: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: !1
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
computed: {
|
|
100
|
+
classes() {
|
|
101
|
+
return [
|
|
102
|
+
"pkt-btn",
|
|
103
|
+
this.sizeClass,
|
|
104
|
+
this.skinClass,
|
|
105
|
+
this.variantClass,
|
|
106
|
+
this.colorClass,
|
|
107
|
+
this.isLoadingClass,
|
|
108
|
+
this.stateClass
|
|
109
|
+
];
|
|
110
|
+
},
|
|
111
|
+
sizeClass() {
|
|
112
|
+
return this.size === "medium" ? "" : `pkt-btn--${this.size}`;
|
|
113
|
+
},
|
|
114
|
+
skinClass() {
|
|
115
|
+
return this.skin === "primary" ? "" : `pkt-btn--${this.skin}`;
|
|
116
|
+
},
|
|
117
|
+
colorClass() {
|
|
118
|
+
return this.color ? `pkt-btn--${this.color}` : "";
|
|
119
|
+
},
|
|
120
|
+
stateClass() {
|
|
121
|
+
return this.state ? `pkt-btn--${this.state}` : "";
|
|
122
|
+
},
|
|
123
|
+
variantClass() {
|
|
124
|
+
return this.variant === "label-only" ? "" : `pkt-btn--${this.variant}`;
|
|
125
|
+
},
|
|
126
|
+
isLoadingClass() {
|
|
127
|
+
return this.isLoading === !0 ? "pkt-btn--active" : "";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}, m = ["type", "disabled"], h = { class: "pkt-btn__text" };
|
|
131
|
+
function g(e, t, p, g, _, v) {
|
|
132
|
+
let y = u("PktIcon");
|
|
133
|
+
return c(), i("button", s(e.$attrs, {
|
|
134
|
+
type: p.type,
|
|
135
|
+
class: v.classes,
|
|
136
|
+
onClick: t[0] ||= (t) => e.$emit("onClick"),
|
|
137
|
+
onKeyup: t[1] ||= f((t) => e.$emit("onClick"), ["enter"]),
|
|
138
|
+
disabled: p.disabled
|
|
139
|
+
}), [
|
|
140
|
+
p.isLoading === !0 ? (c(), n(y, {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: "pkt-btn__icon pkt-btn__spinner",
|
|
143
|
+
name: "spinner-blue",
|
|
144
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.7/animations/"
|
|
145
|
+
})) : r("", !0),
|
|
146
|
+
p.variant === "label-only" ? r("", !0) : (c(), n(y, {
|
|
147
|
+
key: 1,
|
|
148
|
+
class: "pkt-btn__icon",
|
|
149
|
+
name: p.iconName
|
|
150
|
+
}, null, 8, ["name"])),
|
|
151
|
+
a("span", h, [l(e.$slots, "default", {}, () => [o(d(p.text), 1)])]),
|
|
152
|
+
p.variant === "icons-right-and-left" ? (c(), n(y, {
|
|
153
|
+
key: 2,
|
|
154
|
+
class: "pkt-btn__icon",
|
|
155
|
+
name: p.secondIconName
|
|
156
|
+
}, null, 8, ["name"])) : r("", !0)
|
|
157
|
+
], 16, m);
|
|
158
|
+
}
|
|
159
|
+
var _ = /* @__PURE__ */ e(p, [["render", g]]);
|
|
160
|
+
//#endregion
|
|
161
|
+
export { _ as t };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, openBlock as i } from "vue";
|
|
3
|
+
import "@oslokommune/punkt-elements/dist/pkt-helptext";
|
|
4
|
+
//#region src/components/helptext/Helptext.vue
|
|
5
|
+
var a = {
|
|
6
|
+
name: "pktHelptext",
|
|
7
|
+
emits: ["toggleHelpText"],
|
|
8
|
+
props: {
|
|
9
|
+
forId: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: !0
|
|
12
|
+
},
|
|
13
|
+
helptext: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: !1
|
|
16
|
+
},
|
|
17
|
+
helptextDropdown: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !1
|
|
20
|
+
},
|
|
21
|
+
helptextDropdownButton: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: !1
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
data() {
|
|
27
|
+
return { isHelpTextOpen: !1 };
|
|
28
|
+
},
|
|
29
|
+
methods: { toggleHelpText(e) {
|
|
30
|
+
this.isHelpTextOpen = e.detail.isOpen, this.$emit("toggleHelpText", this.isHelpTextOpen);
|
|
31
|
+
} },
|
|
32
|
+
computed: { dropdownButton() {
|
|
33
|
+
return this.helptextDropdownButton || "Les mer <span class=\"pkt-sr-only\">om feltet</span>";
|
|
34
|
+
} }
|
|
35
|
+
}, o = { key: 0 }, s = [
|
|
36
|
+
"forId",
|
|
37
|
+
"helptext",
|
|
38
|
+
"helptextDropdown",
|
|
39
|
+
"helptextDropdownButton"
|
|
40
|
+
];
|
|
41
|
+
function c(e, a, c, l, u, d) {
|
|
42
|
+
return c.helptext || c.helptextDropdown ? (i(), n("div", o, [r("pkt-helptext", {
|
|
43
|
+
forId: c.forId,
|
|
44
|
+
helptext: c.helptext,
|
|
45
|
+
helptextDropdown: c.helptextDropdown,
|
|
46
|
+
helptextDropdownButton: d.dropdownButton,
|
|
47
|
+
"on:toggleHelpText": a[0] ||= (...e) => d.toggleHelpText && d.toggleHelpText(...e)
|
|
48
|
+
}, null, 40, s)])) : t("", !0);
|
|
49
|
+
}
|
|
50
|
+
var l = /* @__PURE__ */ e(a, [["render", c]]);
|
|
51
|
+
//#endregion
|
|
52
|
+
export { l as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`);let t=require(`vue`);require(`@oslokommune/punkt-elements/dist/pkt-helptext`);var n={name:`pktHelptext`,emits:[`toggleHelpText`],props:{forId:{type:String,required:!0},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1}},data(){return{isHelpTextOpen:!1}},methods:{toggleHelpText(e){this.isHelpTextOpen=e.detail.isOpen,this.$emit(`toggleHelpText`,this.isHelpTextOpen)}},computed:{dropdownButton(){return this.helptextDropdownButton||`Les mer <span class="pkt-sr-only">om feltet</span>`}}},r={key:0},i=[`forId`,`helptext`,`helptextDropdown`,`helptextDropdownButton`];function a(e,n,a,o,s,c){return a.helptext||a.helptextDropdown?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,r,[(0,t.createElementVNode)(`pkt-helptext`,{forId:a.forId,helptext:a.helptext,helptextDropdown:a.helptextDropdown,helptextDropdownButton:c.dropdownButton,"on:toggleHelpText":n[0]||=(...e)=>c.toggleHelpText&&c.toggleHelpText(...e)},null,40,i)])):(0,t.createCommentVNode)(``,!0)}var o=e.t(n,[[`render`,a]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import { createElementBlock as t, mergeProps as n, openBlock as r } from "vue";
|
|
3
|
+
import "@oslokommune/punkt-elements/dist/pkt-icon";
|
|
4
|
+
//#region src/components/icon/Icon.vue
|
|
5
|
+
var i = {
|
|
6
|
+
name: "PktIcon",
|
|
7
|
+
props: {
|
|
8
|
+
name: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: !0,
|
|
11
|
+
default: void 0
|
|
12
|
+
},
|
|
13
|
+
path: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: void 0
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, a = ["name"];
|
|
19
|
+
function o(e, i, o, s, c, l) {
|
|
20
|
+
return r(), t("pkt-icon", n({ name: o.name }, o.path && { path: o.path }), null, 16, a);
|
|
21
|
+
}
|
|
22
|
+
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
23
|
+
//#endregion
|
|
24
|
+
export { s as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`);let t=require(`vue`);require(`@oslokommune/punkt-elements/dist/pkt-icon`);var n={name:`PktIcon`,props:{name:{type:String,required:!0,default:void 0},path:{type:String,default:void 0}}},r=[`name`];function i(e,n,i,a,o,s){return(0,t.openBlock)(),(0,t.createElementBlock)(`pkt-icon`,(0,t.mergeProps)({name:i.name},i.path&&{path:i.path}),null,16,r)}var a=e.t(n,[[`render`,i]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`),t=require(`./Alert-CHuVD60O.cjs`),n=require(`./Helptext-BrCCiDCr.cjs`);let r=require(`vue`);var i={name:`pktInputwrapper`,emits:[`toggleHelpText`],components:{PktAlert:t.t,PktHelptext:n.t},props:{forId:{type:String,required:!0},label:{type:String,required:!0,default:`input`},helptext:{type:String,required:!1},helptextDropdown:{type:String,required:!1},helptextDropdownButton:{type:String,required:!1},counter:{type:Boolean,default:!1},counterCurrent:{type:Number,required:!1},counterMaxLength:{type:Number,required:!1},optionalTag:{type:Boolean,required:!1,default:!1},optionalText:{type:String,default:`Valgfritt`},requiredTag:{type:Boolean,required:!1,default:!1},requiredText:{type:String,default:`Må fylles ut`},hasError:{type:Boolean,required:!1},errorMessage:{type:String,required:!1},disabled:{type:Boolean,required:!1,default:!1},inline:{type:Boolean,required:!1,default:!1},ariaDescribedby:{type:String,required:!1},useWrapper:{type:Boolean,default:!0},hasFieldset:{type:Boolean,default:!1}},data(){return{isHelpTextOpen:!1}},methods:{toggleHelpText(){this.isHelpTextOpen=!this.isHelpTextOpen,this.$emit(`toggleHelpText`,this.isHelpTextOpen)}},computed:{tagText(){return this.optionalTag?this.optionalText:this.requiredTag?this.requiredText:``},tagClass(){return this.optionalTag?`pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light`:this.requiredTag?`pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige`:``},disabledClass(){return this.disabled?`pkt-inputwrapper--disabled`:``},inlineClass(){return this.inline?`pkt-inputwrapper--inline`:``},errorClass(){return this.hasError?`pkt-inputwrapper--error`:``},hasDropDown(){return!!this.helptextDropdown&&this.helptextDropdown!==``},describedBy(){this.ariaDescribedby?this.ariaDescribedby:this.helptext&&`${this.forId}`}}},a=[`for`,`aria-describedby`],o=[`for`,`aria-describedby`,`id`],s={key:2,class:`pkt-input__counter`,"aria-live":`polite`,"aria-atomic":`true`},c={key:3},l=[`innerHTML`];function u(e,t,n,i,u,d){let f=(0,r.resolveComponent)(`PktHelptext`),p=(0,r.resolveComponent)(`PktAlert`);return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`pkt-inputwrapper`,d.disabledClass,d.inlineClass,d.errorClass])},[n.useWrapper?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(n.hasFieldset?`fieldset`:d.hasDropDown?`div`:`label`),{key:0,for:n.hasFieldset?void 0:n.forId,class:(0,r.normalizeClass)([`pkt-inputwrapper__label`,{"pkt-inputwrapper__fieldset":n.hasFieldset,"pkt-inputwrapper__legend":n.hasFieldset}]),"aria-describedby":d.hasDropDown?void 0:n.ariaDescribedby},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(n.hasFieldset?`legend`:d.hasDropDown?`h2`:`span`),{class:(0,r.normalizeClass)({"pkt-inputwrapper__legend":n.hasFieldset}),id:`${n.forId}-label`},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(n.label),1),d.tagText===``?(0,r.createCommentVNode)(``,!0):((0,r.openBlock)(),(0,r.createElementBlock)(`span`,{key:0,class:(0,r.normalizeClass)(d.tagClass)},(0,r.toDisplayString)(d.tagText),3))]),_:1},8,[`class`,`id`])),(0,r.createVNode)(f,{forId:n.forId,onToggleHelpText:d.toggleHelpText,helptext:n.helptext,helptextDropdownButton:n.helptextDropdownButton,helptextDropdown:n.helptextDropdown},null,8,[`forId`,`onToggleHelpText`,`helptext`,`helptextDropdownButton`,`helptextDropdown`]),n.hasFieldset?(0,r.createCommentVNode)(``,!0):((0,r.openBlock)(),(0,r.createElementBlock)(`label`,{key:0,for:n.forId,class:`pkt-sr-only`,"aria-describedby":d.describedBy},(0,r.toDisplayString)(n.label),9,a)),(0,r.renderSlot)(e.$slots,`default`)]),_:3},8,[`for`,`class`,`aria-describedby`])):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[n.hasFieldset?(0,r.createCommentVNode)(``,!0):((0,r.openBlock)(),(0,r.createElementBlock)(`label`,{key:0,for:n.forId,class:`pkt-sr-only`,"aria-describedby":d.describedBy,id:`${n.forId}-label`},(0,r.toDisplayString)(n.label),9,o)),(0,r.renderSlot)(e.$slots,`default`)],64)),n.counter?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,s,[(0,r.createTextVNode)((0,r.toDisplayString)(n.counterCurrent||0),1),n.counterMaxLength?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createTextVNode)(`/`+(0,r.toDisplayString)(n.counterMaxLength),1)],64)):(0,r.createCommentVNode)(``,!0)])):(0,r.createCommentVNode)(``,!0),n.hasError&&n.errorMessage?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,c,[(0,r.createVNode)(p,{skin:`error`,"aria-live":`assertive`,id:`${n.forId}-error`,compact:``},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,{class:`pkt-contents`,innerHTML:n.errorMessage},null,8,l)]),_:1},8,[`id`])])):(0,r.createCommentVNode)(``,!0)],2)}var d=e.t(i,[[`render`,u]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import { t } from "./Alert-oTzo9iRu.js";
|
|
3
|
+
import { t as n } from "./Helptext-BCSz7jKA.js";
|
|
4
|
+
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, normalizeClass as u, openBlock as d, renderSlot as f, resolveComponent as p, resolveDynamicComponent as m, toDisplayString as h, withCtx as g } from "vue";
|
|
5
|
+
//#region src/components/inputwrapper/InputWrapper.vue
|
|
6
|
+
var _ = {
|
|
7
|
+
name: "pktInputwrapper",
|
|
8
|
+
emits: ["toggleHelpText"],
|
|
9
|
+
components: {
|
|
10
|
+
PktAlert: t,
|
|
11
|
+
PktHelptext: n
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
forId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: !0
|
|
17
|
+
},
|
|
18
|
+
label: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: !0,
|
|
21
|
+
default: "input"
|
|
22
|
+
},
|
|
23
|
+
helptext: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: !1
|
|
26
|
+
},
|
|
27
|
+
helptextDropdown: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: !1
|
|
30
|
+
},
|
|
31
|
+
helptextDropdownButton: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: !1
|
|
34
|
+
},
|
|
35
|
+
counter: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
counterCurrent: {
|
|
40
|
+
type: Number,
|
|
41
|
+
required: !1
|
|
42
|
+
},
|
|
43
|
+
counterMaxLength: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: !1
|
|
46
|
+
},
|
|
47
|
+
optionalTag: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
required: !1,
|
|
50
|
+
default: !1
|
|
51
|
+
},
|
|
52
|
+
optionalText: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: "Valgfritt"
|
|
55
|
+
},
|
|
56
|
+
requiredTag: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
required: !1,
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
requiredText: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "Må fylles ut"
|
|
64
|
+
},
|
|
65
|
+
hasError: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
required: !1
|
|
68
|
+
},
|
|
69
|
+
errorMessage: {
|
|
70
|
+
type: String,
|
|
71
|
+
required: !1
|
|
72
|
+
},
|
|
73
|
+
disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: !1,
|
|
76
|
+
default: !1
|
|
77
|
+
},
|
|
78
|
+
inline: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
required: !1,
|
|
81
|
+
default: !1
|
|
82
|
+
},
|
|
83
|
+
ariaDescribedby: {
|
|
84
|
+
type: String,
|
|
85
|
+
required: !1
|
|
86
|
+
},
|
|
87
|
+
useWrapper: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: !0
|
|
90
|
+
},
|
|
91
|
+
hasFieldset: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: !1
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
data() {
|
|
97
|
+
return { isHelpTextOpen: !1 };
|
|
98
|
+
},
|
|
99
|
+
methods: { toggleHelpText() {
|
|
100
|
+
this.isHelpTextOpen = !this.isHelpTextOpen, this.$emit("toggleHelpText", this.isHelpTextOpen);
|
|
101
|
+
} },
|
|
102
|
+
computed: {
|
|
103
|
+
tagText() {
|
|
104
|
+
return this.optionalTag ? this.optionalText : this.requiredTag ? this.requiredText : "";
|
|
105
|
+
},
|
|
106
|
+
tagClass() {
|
|
107
|
+
return this.optionalTag ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light" : this.requiredTag ? "pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige" : "";
|
|
108
|
+
},
|
|
109
|
+
disabledClass() {
|
|
110
|
+
return this.disabled ? "pkt-inputwrapper--disabled" : "";
|
|
111
|
+
},
|
|
112
|
+
inlineClass() {
|
|
113
|
+
return this.inline ? "pkt-inputwrapper--inline" : "";
|
|
114
|
+
},
|
|
115
|
+
errorClass() {
|
|
116
|
+
return this.hasError ? "pkt-inputwrapper--error" : "";
|
|
117
|
+
},
|
|
118
|
+
hasDropDown() {
|
|
119
|
+
return !!this.helptextDropdown && this.helptextDropdown !== "";
|
|
120
|
+
},
|
|
121
|
+
describedBy() {
|
|
122
|
+
this.ariaDescribedby ? this.ariaDescribedby : this.helptext && `${this.forId}`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, v = ["for", "aria-describedby"], y = [
|
|
126
|
+
"for",
|
|
127
|
+
"aria-describedby",
|
|
128
|
+
"id"
|
|
129
|
+
], b = {
|
|
130
|
+
key: 2,
|
|
131
|
+
class: "pkt-input__counter",
|
|
132
|
+
"aria-live": "polite",
|
|
133
|
+
"aria-atomic": "true"
|
|
134
|
+
}, x = { key: 3 }, S = ["innerHTML"];
|
|
135
|
+
function C(e, t, n, _, C, w) {
|
|
136
|
+
let T = p("PktHelptext"), E = p("PktAlert");
|
|
137
|
+
return d(), o("div", { class: u([
|
|
138
|
+
"pkt-inputwrapper",
|
|
139
|
+
w.disabledClass,
|
|
140
|
+
w.inlineClass,
|
|
141
|
+
w.errorClass
|
|
142
|
+
]) }, [
|
|
143
|
+
n.useWrapper ? (d(), i(m(n.hasFieldset ? "fieldset" : w.hasDropDown ? "div" : "label"), {
|
|
144
|
+
key: 0,
|
|
145
|
+
for: n.hasFieldset ? void 0 : n.forId,
|
|
146
|
+
class: u(["pkt-inputwrapper__label", {
|
|
147
|
+
"pkt-inputwrapper__fieldset": n.hasFieldset,
|
|
148
|
+
"pkt-inputwrapper__legend": n.hasFieldset
|
|
149
|
+
}]),
|
|
150
|
+
"aria-describedby": w.hasDropDown ? void 0 : n.ariaDescribedby
|
|
151
|
+
}, {
|
|
152
|
+
default: g(() => [
|
|
153
|
+
(d(), i(m(n.hasFieldset ? "legend" : w.hasDropDown ? "h2" : "span"), {
|
|
154
|
+
class: u({ "pkt-inputwrapper__legend": n.hasFieldset }),
|
|
155
|
+
id: `${n.forId}-label`
|
|
156
|
+
}, {
|
|
157
|
+
default: g(() => [c(h(n.label), 1), w.tagText === "" ? a("", !0) : (d(), o("span", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: u(w.tagClass)
|
|
160
|
+
}, h(w.tagText), 3))]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["class", "id"])),
|
|
163
|
+
l(T, {
|
|
164
|
+
forId: n.forId,
|
|
165
|
+
onToggleHelpText: w.toggleHelpText,
|
|
166
|
+
helptext: n.helptext,
|
|
167
|
+
helptextDropdownButton: n.helptextDropdownButton,
|
|
168
|
+
helptextDropdown: n.helptextDropdown
|
|
169
|
+
}, null, 8, [
|
|
170
|
+
"forId",
|
|
171
|
+
"onToggleHelpText",
|
|
172
|
+
"helptext",
|
|
173
|
+
"helptextDropdownButton",
|
|
174
|
+
"helptextDropdown"
|
|
175
|
+
]),
|
|
176
|
+
n.hasFieldset ? a("", !0) : (d(), o("label", {
|
|
177
|
+
key: 0,
|
|
178
|
+
for: n.forId,
|
|
179
|
+
class: "pkt-sr-only",
|
|
180
|
+
"aria-describedby": w.describedBy
|
|
181
|
+
}, h(n.label), 9, v)),
|
|
182
|
+
f(e.$slots, "default")
|
|
183
|
+
]),
|
|
184
|
+
_: 3
|
|
185
|
+
}, 8, [
|
|
186
|
+
"for",
|
|
187
|
+
"class",
|
|
188
|
+
"aria-describedby"
|
|
189
|
+
])) : (d(), o(r, { key: 1 }, [n.hasFieldset ? a("", !0) : (d(), o("label", {
|
|
190
|
+
key: 0,
|
|
191
|
+
for: n.forId,
|
|
192
|
+
class: "pkt-sr-only",
|
|
193
|
+
"aria-describedby": w.describedBy,
|
|
194
|
+
id: `${n.forId}-label`
|
|
195
|
+
}, h(n.label), 9, y)), f(e.$slots, "default")], 64)),
|
|
196
|
+
n.counter ? (d(), o("div", b, [c(h(n.counterCurrent || 0), 1), n.counterMaxLength ? (d(), o(r, { key: 0 }, [c("/" + h(n.counterMaxLength), 1)], 64)) : a("", !0)])) : a("", !0),
|
|
197
|
+
n.hasError && n.errorMessage ? (d(), o("div", x, [l(E, {
|
|
198
|
+
skin: "error",
|
|
199
|
+
"aria-live": "assertive",
|
|
200
|
+
id: `${n.forId}-error`,
|
|
201
|
+
compact: ""
|
|
202
|
+
}, {
|
|
203
|
+
default: g(() => [s("div", {
|
|
204
|
+
class: "pkt-contents",
|
|
205
|
+
innerHTML: n.errorMessage
|
|
206
|
+
}, null, 8, S)]),
|
|
207
|
+
_: 1
|
|
208
|
+
}, 8, ["id"])])) : a("", !0)
|
|
209
|
+
], 2);
|
|
210
|
+
}
|
|
211
|
+
var w = /* @__PURE__ */ e(_, [["render", C]]);
|
|
212
|
+
//#endregion
|
|
213
|
+
export { w as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_plugin-vue_export-helper-TlCYmDuq.cjs`);let t=require(`vue`);require(`@oslokommune/punkt-elements/dist/pkt-tag`);var n={name:`PktTag`,props:{skin:{type:String,default:`blue`,validator(e){return[`blue`,`blue-light`,`blue-dark`,`green`,`red`,`beige`,`yellow`,`grey`,`gray`].includes(e)}},textStyle:{type:String,default:`normal-text`,validator(e){return[`thin-text`,`normal-text`].includes(e)}},size:{type:String,default:`medium`,validator(e){return[`small`,`medium`,`large`].includes(e)}},closeTag:{type:Boolean,default:!1},iconName:{type:String,default:``},type:{type:String,default:`button`,validator:e=>[`button`,`submit`,`reset`].includes(e)},ariaLabel:{type:String,default:`close`}}},r=[`skin`,`textStyle`,`size`,`closeTag`,`iconName`,`type`,`ariaLabel`];function i(e,n,i,a,o,s){return(0,t.openBlock)(),(0,t.createElementBlock)(`pkt-tag`,{skin:i.skin,textStyle:i.textStyle,size:i.size,closeTag:i.closeTag,iconName:i.iconName,type:i.type,ariaLabel:i.ariaLabel},[(0,t.renderSlot)(e.$slots,`default`)],8,r)}var a=e.t(n,[[`render`,i]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-BTgDAbhb.js";
|
|
2
|
+
import { createElementBlock as t, openBlock as n, renderSlot as r } from "vue";
|
|
3
|
+
import "@oslokommune/punkt-elements/dist/pkt-tag";
|
|
4
|
+
//#region src/components/tag/Tag.vue
|
|
5
|
+
var i = {
|
|
6
|
+
name: "PktTag",
|
|
7
|
+
props: {
|
|
8
|
+
skin: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "blue",
|
|
11
|
+
validator(e) {
|
|
12
|
+
return [
|
|
13
|
+
"blue",
|
|
14
|
+
"blue-light",
|
|
15
|
+
"blue-dark",
|
|
16
|
+
"green",
|
|
17
|
+
"red",
|
|
18
|
+
"beige",
|
|
19
|
+
"yellow",
|
|
20
|
+
"grey",
|
|
21
|
+
"gray"
|
|
22
|
+
].includes(e);
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
textStyle: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "normal-text",
|
|
28
|
+
validator(e) {
|
|
29
|
+
return ["thin-text", "normal-text"].includes(e);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "medium",
|
|
35
|
+
validator(e) {
|
|
36
|
+
return [
|
|
37
|
+
"small",
|
|
38
|
+
"medium",
|
|
39
|
+
"large"
|
|
40
|
+
].includes(e);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
closeTag: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !1
|
|
46
|
+
},
|
|
47
|
+
iconName: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ""
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "button",
|
|
54
|
+
validator: (e) => [
|
|
55
|
+
"button",
|
|
56
|
+
"submit",
|
|
57
|
+
"reset"
|
|
58
|
+
].includes(e)
|
|
59
|
+
},
|
|
60
|
+
ariaLabel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "close"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, a = [
|
|
66
|
+
"skin",
|
|
67
|
+
"textStyle",
|
|
68
|
+
"size",
|
|
69
|
+
"closeTag",
|
|
70
|
+
"iconName",
|
|
71
|
+
"type",
|
|
72
|
+
"ariaLabel"
|
|
73
|
+
];
|
|
74
|
+
function o(e, i, o, s, c, l) {
|
|
75
|
+
return n(), t("pkt-tag", {
|
|
76
|
+
skin: o.skin,
|
|
77
|
+
textStyle: o.textStyle,
|
|
78
|
+
size: o.size,
|
|
79
|
+
closeTag: o.closeTag,
|
|
80
|
+
iconName: o.iconName,
|
|
81
|
+
type: o.type,
|
|
82
|
+
ariaLabel: o.ariaLabel
|
|
83
|
+
}, [r(e.$slots, "default")], 8, a);
|
|
84
|
+
}
|
|
85
|
+
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
86
|
+
//#endregion
|
|
87
|
+
export { s as t };
|