@oslokommune/punkt-vue 11.14.0 → 11.14.2
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 +37 -0
- package/dist/punkt-vue-index.cjs +1 -1
- package/dist/punkt-vue-index.js +36 -33
- package/dist/punkt-vue-linkcard.cjs +1 -1
- package/dist/punkt-vue-linkcard.js +1 -1
- package/dist/punkt-vue-stepper.cjs +1 -0
- package/dist/punkt-vue-stepper.js +79 -0
- package/package.json +3 -3
- package/src/components/accordion/Accordion.vue +1 -1
- package/src/components/linkcard/Linkcard.vue +1 -1
- package/src/components/stepper/Step.vue +63 -0
- package/src/components/stepper/Stepper.vue +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [11.15.0](https://github.com/oslokommune/punkt/compare/11.14.1...11.15.0) (2024-07-12)
|
|
9
|
+
|
|
10
|
+
### âš BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* update deploys 🚀 (#1788).
|
|
15
|
+
* update deploys to include "Feature*".
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
Ingen
|
|
20
|
+
|
|
21
|
+
### Chores
|
|
22
|
+
Ingen
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## [11.14.1](https://github.com/oslokommune/punkt/compare/11.14.0...11.14.1) (2024-06-26)
|
|
28
|
+
|
|
29
|
+
### âš BREAKING CHANGES
|
|
30
|
+
Ingen
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
Ingen
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
Ingen
|
|
37
|
+
|
|
38
|
+
### Chores
|
|
39
|
+
* Legg til grå variant av LinkCard, pluss hovereffekter (#1774).
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
|
|
8
45
|
## [11.14.0](https://github.com/oslokommune/punkt/compare/11.13.14...11.14.0) (2024-06-26)
|
|
9
46
|
|
|
10
47
|
### âš BREAKING CHANGES
|
package/dist/punkt-vue-index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("./punkt-vue-alert.cjs"),t=require("./punkt-vue-accordion.cjs"),a=require("./punkt-vue-backlink.cjs"),r=require("./punkt-vue-breadcrumbs.cjs"),g=require("./punkt-vue-button.cjs"),o=require("./punkt-vue-checkbox.cjs"),l=require("./punkt-vue-footer.cjs"),u=require("./punkt-vue-footersimple.cjs"),d=require("./punkt-vue-header.cjs"),x=require("./punkt-vue-icon.cjs"),m=require("./punkt-vue-inputwrapper.cjs"),n=require("./punkt-vue-messagebox.cjs"),c=require("./punkt-vue-linkcard.cjs"),i=require("./punkt-vue-loader.cjs"),k=require("./punkt-vue-progressbar.cjs"),s=require("./punkt-vue-radiobutton.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("./punkt-vue-alert.cjs"),t=require("./punkt-vue-accordion.cjs"),a=require("./punkt-vue-backlink.cjs"),r=require("./punkt-vue-breadcrumbs.cjs"),g=require("./punkt-vue-button.cjs"),o=require("./punkt-vue-checkbox.cjs"),l=require("./punkt-vue-footer.cjs"),u=require("./punkt-vue-footersimple.cjs"),d=require("./punkt-vue-header.cjs"),x=require("./punkt-vue-icon.cjs"),m=require("./punkt-vue-inputwrapper.cjs"),n=require("./punkt-vue-messagebox.cjs"),c=require("./punkt-vue-linkcard.cjs"),i=require("./punkt-vue-loader.cjs"),k=require("./punkt-vue-progressbar.cjs"),s=require("./punkt-vue-radiobutton.cjs"),P=require("./punkt-vue-select.cjs"),e=require("./punkt-vue-table.cjs"),b=require("./punkt-vue-tabs.cjs"),B=require("./punkt-vue-tag.cjs"),f=require("./punkt-vue-textarea.cjs"),p=require("./punkt-vue-textinput.cjs"),S=require("./plugins-IAlvxbZ2.cjs"),I=require("./punkt-vue-stepper.cjs"),L=require("./Alert-VmiRg_3U.cjs"),y=require("./Button-fJVVmqZU.cjs"),F=require("./Icon-7iwiZOEn.cjs"),R=require("./InputWrapper-tRopywnC.cjs"),M=require("./Tag-1MK-d3wL.cjs");require("vue");require("./_plugin-vue_export-helper-jfW5FsfF.cjs");const T=Object.freeze(Object.defineProperty({__proto__:null,Accordion:t.default,AccordionItem:t.default,Alert:q.default,BackLink:a.default,Breadcrumbs:r.default,Button:g.default,Checkbox:o.default,Footer:l.default,FooterSimple:u.default,Header:d.default,Icon:x.default,InputWrapper:m.default,Linkcard:c.default,Loader:i.default,Messagebox:n.default,Progressbar:k.default,Radiobutton:s.default,Select:P.default,Table:e.default,TableBody:e.default,TableDataCell:e.default,TableHeader:e.default,TableHeaderCell:e.default,TableRow:e.default,Tabs:b.default,Tag:B.default,Textarea:f.default,Textinput:p.default},Symbol.toStringTag,{value:"Module"})),A={install(C,h={}){for(const H in T)S.registerPlugin(C,T[H])}};S.use(A);exports.Alert=q.default;exports.Accordion=t.default;exports.AccordionItem=t.default;exports.PktAccordion=t.PktAccordion;exports.PktAccordionItem=t.PktAccordionItem;exports.BackLink=a.default;exports.PktBackLink=a.PktBackLink;exports.Breadcrumbs=r.default;exports.PktBreadcrumbs=r.PktBreadcrumbs;exports.Button=g.default;exports.Checkbox=o.default;exports.PktCheckbox=o.PktCheckbox;exports.Footer=l.default;exports.PktFooter=l.PktFooter;exports.FooterSimple=u.default;exports.PktFooterSimple=u.PktFooterSimple;exports.Header=d.default;exports.PktHeader=d.PktHeader;exports.Icon=x.default;exports.InputWrapper=m.default;exports.Messagebox=n.default;exports.PktMessagebox=n.PktMessagebox;exports.Linkcard=c.default;exports.PktLinkcard=c.PktLinkcard;exports.Loader=i.default;exports.PktLoader=i.PktLoader;exports.PktProgressbar=k.PktProgressbar;exports.Progressbar=k.default;exports.PktRadiobutton=s.PktRadiobutton;exports.Radiobutton=s.default;exports.PktSelect=P.PktSelect;exports.Select=P.default;exports.PktTable=e.PktTable;exports.PktTableBody=e.PktTableBody;exports.PktTableDataCell=e.PktTableDataCell;exports.PktTableHeader=e.PktTableHeader;exports.PktTableHeaderCell=e.PktTableHeaderCell;exports.PktTableRow=e.PktTableRow;exports.Table=e.default;exports.TableBody=e.default;exports.TableDataCell=e.default;exports.TableHeader=e.default;exports.TableHeaderCell=e.default;exports.TableRow=e.default;exports.PktTabs=b.PktTabs;exports.Tabs=b.default;exports.Tag=B.default;exports.PktTextarea=f.PktTextarea;exports.Textarea=f.default;exports.PktTextinput=p.PktTextinput;exports.Textinput=p.default;exports.PktStep=I.PktStep;exports.PktStepper=I.PktStepper;exports.PktAlert=L.PktAlert;exports.PktButton=y.PktButton;exports.PktIcon=F.PktIcon;exports.PktInputWrapper=R.PktInputWrapper;exports.PktTag=M.Tag;exports.default=A;
|
package/dist/punkt-vue-index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import m from "./punkt-vue-alert.js";
|
|
2
2
|
import r from "./punkt-vue-accordion.js";
|
|
3
|
-
import { PktAccordion as
|
|
3
|
+
import { PktAccordion as to, PktAccordionItem as eo } from "./punkt-vue-accordion.js";
|
|
4
4
|
import i from "./punkt-vue-backlink.js";
|
|
5
5
|
import { PktBackLink as mo } from "./punkt-vue-backlink.js";
|
|
6
6
|
import l from "./punkt-vue-breadcrumbs.js";
|
|
@@ -23,29 +23,30 @@ import { PktLinkcard as To } from "./punkt-vue-linkcard.js";
|
|
|
23
23
|
import g from "./punkt-vue-loader.js";
|
|
24
24
|
import { PktLoader as Bo } from "./punkt-vue-loader.js";
|
|
25
25
|
import x from "./punkt-vue-progressbar.js";
|
|
26
|
-
import { PktProgressbar as
|
|
26
|
+
import { PktProgressbar as Ao } from "./punkt-vue-progressbar.js";
|
|
27
27
|
import d from "./punkt-vue-radiobutton.js";
|
|
28
|
-
import { PktRadiobutton as
|
|
28
|
+
import { PktRadiobutton as Ho } from "./punkt-vue-radiobutton.js";
|
|
29
29
|
import T from "./punkt-vue-select.js";
|
|
30
|
-
import { PktSelect as
|
|
30
|
+
import { PktSelect as Lo } from "./punkt-vue-select.js";
|
|
31
31
|
import o from "./punkt-vue-table.js";
|
|
32
32
|
import { PktTable as Fo, PktTableBody as Ro, PktTableDataCell as ho, PktTableHeader as Mo, PktTableHeaderCell as _o, PktTableRow as jo } from "./punkt-vue-table.js";
|
|
33
33
|
import $ from "./punkt-vue-tabs.js";
|
|
34
34
|
import { PktTabs as Do } from "./punkt-vue-tabs.js";
|
|
35
35
|
import B from "./punkt-vue-tag.js";
|
|
36
|
-
import
|
|
36
|
+
import S from "./punkt-vue-textarea.js";
|
|
37
37
|
import { PktTextarea as Oo } from "./punkt-vue-textarea.js";
|
|
38
|
-
import
|
|
38
|
+
import A from "./punkt-vue-textinput.js";
|
|
39
39
|
import { PktTextinput as zo } from "./punkt-vue-textinput.js";
|
|
40
|
-
import { u as
|
|
41
|
-
import {
|
|
42
|
-
import { P as
|
|
43
|
-
import { P as
|
|
44
|
-
import { P as
|
|
45
|
-
import {
|
|
40
|
+
import { u as C, r as H } from "./plugins-UPM181Xt.js";
|
|
41
|
+
import { PktStep as qo, PktStepper as Eo } from "./punkt-vue-stepper.js";
|
|
42
|
+
import { P as Jo } from "./Alert-LNP7MGFo.js";
|
|
43
|
+
import { P as Qo } from "./Button-5obh_jeA.js";
|
|
44
|
+
import { P as Vo } from "./Icon-8MjQJfqx.js";
|
|
45
|
+
import { P as Yo } from "./InputWrapper-aBvhZpl8.js";
|
|
46
|
+
import { T as or } from "./Tag-jpZpXEPw.js";
|
|
46
47
|
import "vue";
|
|
47
48
|
import "./_plugin-vue_export-helper-hUChTQA_.js";
|
|
48
|
-
const
|
|
49
|
+
const t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
49
50
|
__proto__: null,
|
|
50
51
|
Accordion: r,
|
|
51
52
|
AccordionItem: r,
|
|
@@ -73,15 +74,15 @@ const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
73
74
|
TableRow: o,
|
|
74
75
|
Tabs: $,
|
|
75
76
|
Tag: B,
|
|
76
|
-
Textarea:
|
|
77
|
-
Textinput:
|
|
78
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
79
|
-
install(
|
|
80
|
-
for (const a in
|
|
81
|
-
|
|
77
|
+
Textarea: S,
|
|
78
|
+
Textinput: A
|
|
79
|
+
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
80
|
+
install(e, L = {}) {
|
|
81
|
+
for (const a in t)
|
|
82
|
+
H(e, t[a]);
|
|
82
83
|
}
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
+
C(I);
|
|
85
86
|
export {
|
|
86
87
|
r as Accordion,
|
|
87
88
|
r as AccordionItem,
|
|
@@ -98,24 +99,26 @@ export {
|
|
|
98
99
|
c as Linkcard,
|
|
99
100
|
g as Loader,
|
|
100
101
|
b as Messagebox,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
to as PktAccordion,
|
|
103
|
+
eo as PktAccordionItem,
|
|
104
|
+
Jo as PktAlert,
|
|
104
105
|
mo as PktBackLink,
|
|
105
106
|
lo as PktBreadcrumbs,
|
|
106
|
-
|
|
107
|
+
Qo as PktButton,
|
|
107
108
|
no as PktCheckbox,
|
|
108
109
|
Po as PktFooter,
|
|
109
110
|
uo as PktFooterSimple,
|
|
110
111
|
bo as PktHeader,
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
Vo as PktIcon,
|
|
113
|
+
Yo as PktInputWrapper,
|
|
113
114
|
To as PktLinkcard,
|
|
114
115
|
Bo as PktLoader,
|
|
115
116
|
go as PktMessagebox,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
Ao as PktProgressbar,
|
|
118
|
+
Ho as PktRadiobutton,
|
|
119
|
+
Lo as PktSelect,
|
|
120
|
+
qo as PktStep,
|
|
121
|
+
Eo as PktStepper,
|
|
119
122
|
Fo as PktTable,
|
|
120
123
|
Ro as PktTableBody,
|
|
121
124
|
ho as PktTableDataCell,
|
|
@@ -123,7 +126,7 @@ export {
|
|
|
123
126
|
_o as PktTableHeaderCell,
|
|
124
127
|
jo as PktTableRow,
|
|
125
128
|
Do as PktTabs,
|
|
126
|
-
|
|
129
|
+
or as PktTag,
|
|
127
130
|
Oo as PktTextarea,
|
|
128
131
|
zo as PktTextinput,
|
|
129
132
|
x as Progressbar,
|
|
@@ -137,7 +140,7 @@ export {
|
|
|
137
140
|
o as TableRow,
|
|
138
141
|
$ as Tabs,
|
|
139
142
|
B as Tag,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
S as Textarea,
|
|
144
|
+
A as Textinput,
|
|
145
|
+
I as default
|
|
143
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./Icon-7iwiZOEn.cjs"),e=require("vue"),c=require("./_plugin-vue_export-helper-jfW5FsfF.cjs"),l=require("./plugins-IAlvxbZ2.cjs"),s={name:"PktLinkcard",components:{PktIcon:i.PktIcon},props:{skin:{type:String,default:"normal",validator(n){return["normal","blue","beige","beige-outline","green","grey-outline"].includes(n)}},title:{type:String,default:""},href:{type:String,default:""},iconName:{type:String,default:""},openInNewTab:{type:Boolean,default:!1},external:{type:Boolean,default:!1}},methods:{}},d=["href","target","rel"],u={class:"pkt-linkcard__content"},k={class:"pkt-linkcard__text"};function _(n,p,t,f,m,g){const a=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("a",{href:t.href,class:e.normalizeClass(["pkt-linkcard pkt-link",t.skin?`pkt-linkcard--${this.skin}`:"normal"]),target:t.openInNewTab?"_blank":"_self",rel:t.openInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-link__icon",name:t.iconName},null,8,["name"]),e.createElementVNode("div",u,[e.createElementVNode("div",{class:e.normalizeClass(["pkt-linkcard__title",{"pkt-link pkt-link--external":t.external}])},e.toDisplayString(t.title),3),e.createElementVNode("div",k,[e.renderSlot(n.$slots,"default")])])],10,d)}const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./Icon-7iwiZOEn.cjs"),e=require("vue"),c=require("./_plugin-vue_export-helper-jfW5FsfF.cjs"),l=require("./plugins-IAlvxbZ2.cjs"),s={name:"PktLinkcard",components:{PktIcon:i.PktIcon},props:{skin:{type:String,default:"normal",validator(n){return["normal","blue","beige","beige-outline","green","grey","grey-outline"].includes(n)}},title:{type:String,default:""},href:{type:String,default:""},iconName:{type:String,default:""},openInNewTab:{type:Boolean,default:!1},external:{type:Boolean,default:!1}},methods:{}},d=["href","target","rel"],u={class:"pkt-linkcard__content"},k={class:"pkt-linkcard__text"};function _(n,p,t,f,m,g){const a=e.resolveComponent("PktIcon");return e.openBlock(),e.createElementBlock("a",{href:t.href,class:e.normalizeClass(["pkt-linkcard pkt-link",t.skin?`pkt-linkcard--${this.skin}`:"normal"]),target:t.openInNewTab?"_blank":"_self",rel:t.openInNewTab?"noopener noreferrer":void 0},[e.createVNode(a,{class:"pkt-link__icon",name:t.iconName},null,8,["name"]),e.createElementVNode("div",u,[e.createElementVNode("div",{class:e.normalizeClass(["pkt-linkcard__title",{"pkt-link pkt-link--external":t.external}])},e.toDisplayString(t.title),3),e.createElementVNode("div",k,[e.renderSlot(n.$slots,"default")])])],10,d)}const r=c._export_sfc(s,[["render",_]]),o={install(n){l.registerComponent(n,r)}};l.use(o);exports.PktLinkcard=r;exports.default=o;
|
|
@@ -12,7 +12,7 @@ const p = {
|
|
|
12
12
|
type: String,
|
|
13
13
|
default: "normal",
|
|
14
14
|
validator(t) {
|
|
15
|
-
return ["normal", "blue", "beige", "beige-outline", "green", "grey-outline"].includes(t);
|
|
15
|
+
return ["normal", "blue", "beige", "beige-outline", "green", "grey", "grey-outline"].includes(t);
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
title: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("./plugins-IAlvxbZ2.cjs"),e=require("vue"),i=e.defineComponent({__name:"Stepper",props:{className:{},hideNonActiveStepsContent:{type:Boolean,default:!1},orientation:{default:"vertical"}},setup(s){const t=s,n=e.ref(null),l=e.computed(()=>[t.className,"pkt-stepper",t.orientation==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"].filter(Boolean).join(" "));return e.provide("hideNonActiveStepsContent",t.hideNonActiveStepsContent),(o,r)=>(e.openBlock(),e.createElementBlock("ol",{class:e.normalizeClass(l.value),ref_key:"stepperRef",ref:n},[e.renderSlot(o.$slots,"default")],2))}}),u=e.createElementVNode("span",{class:"pkt-step__line pkt-step__line--1"},null,-1),_=e.createElementVNode("span",{class:"pkt-step__line pkt-step__line--2"},null,-1),m=["innerHTML"],h=e.createElementVNode("span",{class:"pkt-step__line pkt-step__line--3",role:"separator"},null,-1),f={class:"pkt-step__wrapper"},v={class:"pkt-step__title"},g={class:"pkt-step__content"},k='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle cx="12" cy="12" r="7" style="fill: var(--pkt-color-grays-grey-200, #CCC);" /></svg>',S='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle opacity=".15" cx="12" cy="12" r="12" fill="#2A2859" /><circle cx="12" cy="12" r="6" fill="#2A2859" /></svg>',w='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#2A2859" d="M3 3h18v18H3z" /><path d="m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z" fill="#F1FDFF" /></svg>',a=e.defineComponent({__name:"Step",props:{title:{},className:{},status:{default:"incomplete"}},setup(s){const t=s,n=e.inject("hideNonActiveStepsContent"),l=()=>!!(n&&t.status!=="current"),o=e.computed(()=>["pkt-step",t.className,`pkt-step--${t.status}`,{"pkt-step--hidden":l()}]),r=e.computed(()=>{switch(t.status){case"current":return S;case"completed":return w;default:return k}});return(c,C)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(o.value),"data-testid":"pkt-step"},[u,_,e.createElementVNode("span",{class:"pkt-step__indicator",innerHTML:r.value},null,8,m),h,e.createElementVNode("div",f,[e.createElementVNode("div",v,e.toDisplayString(c.title),1),e.createElementVNode("div",g,[e.renderSlot(c.$slots,"default")])])],2))}}),d={install(s){p.registerComponent(s,i),p.registerComponent(s,a)}};p.use(d);exports.PktStep=a;exports.PktStepper=i;exports.default=d;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { u as f, a } from "./plugins-UPM181Xt.js";
|
|
2
|
+
import { defineComponent as c, ref as m, computed as p, provide as v, openBlock as _, createElementBlock as d, normalizeClass as u, renderSlot as h, inject as k, createElementVNode as e, toDisplayString as g } from "vue";
|
|
3
|
+
const S = /* @__PURE__ */ c({
|
|
4
|
+
__name: "Stepper",
|
|
5
|
+
props: {
|
|
6
|
+
className: {},
|
|
7
|
+
hideNonActiveStepsContent: { type: Boolean, default: !1 },
|
|
8
|
+
orientation: { default: "vertical" }
|
|
9
|
+
},
|
|
10
|
+
setup(s) {
|
|
11
|
+
const t = s, n = m(null), l = p(() => [
|
|
12
|
+
t.className,
|
|
13
|
+
"pkt-stepper",
|
|
14
|
+
t.orientation === "horizontal" ? "pkt-stepper--horizontal" : "pkt-stepper--vertical"
|
|
15
|
+
].filter(Boolean).join(" "));
|
|
16
|
+
return v("hideNonActiveStepsContent", t.hideNonActiveStepsContent), (o, i) => (_(), d("ol", {
|
|
17
|
+
class: u(l.value),
|
|
18
|
+
ref_key: "stepperRef",
|
|
19
|
+
ref: n
|
|
20
|
+
}, [
|
|
21
|
+
h(o.$slots, "default")
|
|
22
|
+
], 2));
|
|
23
|
+
}
|
|
24
|
+
}), w = /* @__PURE__ */ e("span", { class: "pkt-step__line pkt-step__line--1" }, null, -1), C = /* @__PURE__ */ e("span", { class: "pkt-step__line pkt-step__line--2" }, null, -1), y = ["innerHTML"], N = /* @__PURE__ */ e("span", {
|
|
25
|
+
class: "pkt-step__line pkt-step__line--3",
|
|
26
|
+
role: "separator"
|
|
27
|
+
}, null, -1), A = { class: "pkt-step__wrapper" }, x = { class: "pkt-step__title" }, L = { class: "pkt-step__content" }, z = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle cx="12" cy="12" r="7" style="fill: var(--pkt-color-grays-grey-200, #CCC);" /></svg>', B = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle opacity=".15" cx="12" cy="12" r="12" fill="#2A2859" /><circle cx="12" cy="12" r="6" fill="#2A2859" /></svg>', F = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#2A2859" d="M3 3h18v18H3z" /><path d="m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z" fill="#F1FDFF" /></svg>', G = /* @__PURE__ */ c({
|
|
28
|
+
__name: "Step",
|
|
29
|
+
props: {
|
|
30
|
+
title: {},
|
|
31
|
+
className: {},
|
|
32
|
+
status: { default: "incomplete" }
|
|
33
|
+
},
|
|
34
|
+
setup(s) {
|
|
35
|
+
const t = s, n = k("hideNonActiveStepsContent"), l = () => !!(n && t.status !== "current"), o = p(() => [
|
|
36
|
+
"pkt-step",
|
|
37
|
+
t.className,
|
|
38
|
+
`pkt-step--${t.status}`,
|
|
39
|
+
{ "pkt-step--hidden": l() }
|
|
40
|
+
]), i = p(() => {
|
|
41
|
+
switch (t.status) {
|
|
42
|
+
case "current":
|
|
43
|
+
return B;
|
|
44
|
+
case "completed":
|
|
45
|
+
return F;
|
|
46
|
+
default:
|
|
47
|
+
return z;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return (r, V) => (_(), d("li", {
|
|
51
|
+
class: u(o.value),
|
|
52
|
+
"data-testid": "pkt-step"
|
|
53
|
+
}, [
|
|
54
|
+
w,
|
|
55
|
+
C,
|
|
56
|
+
e("span", {
|
|
57
|
+
class: "pkt-step__indicator",
|
|
58
|
+
innerHTML: i.value
|
|
59
|
+
}, null, 8, y),
|
|
60
|
+
N,
|
|
61
|
+
e("div", A, [
|
|
62
|
+
e("div", x, g(r.title), 1),
|
|
63
|
+
e("div", L, [
|
|
64
|
+
h(r.$slots, "default")
|
|
65
|
+
])
|
|
66
|
+
])
|
|
67
|
+
], 2));
|
|
68
|
+
}
|
|
69
|
+
}), H = {
|
|
70
|
+
install(s) {
|
|
71
|
+
a(s, S), a(s, G);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
f(H);
|
|
75
|
+
export {
|
|
76
|
+
G as PktStep,
|
|
77
|
+
S as PktStepper,
|
|
78
|
+
H as default
|
|
79
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-vue",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.2",
|
|
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.13.14",
|
|
30
|
-
"@oslokommune/punkt-css": "^11.14.
|
|
30
|
+
"@oslokommune/punkt-css": "^11.14.2",
|
|
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": "
|
|
68
|
+
"gitHead": "817b273dbc62a68c7c9bf259e08bacd26bc538a1"
|
|
69
69
|
}
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
type: String,
|
|
31
31
|
default: 'normal',
|
|
32
32
|
validator(value) {
|
|
33
|
-
return ['normal', 'blue', 'beige', 'beige-outline', 'green', 'grey-outline'].includes(value)
|
|
33
|
+
return ['normal', 'blue', 'beige', 'beige-outline', 'green', 'grey', 'grey-outline'].includes(value)
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
title: {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li :class="stepClasses" data-testid="pkt-step">
|
|
3
|
+
<span class="pkt-step__line pkt-step__line--1"></span>
|
|
4
|
+
<span class="pkt-step__line pkt-step__line--2"></span>
|
|
5
|
+
<span class="pkt-step__indicator" v-html="statusSVG"> </span>
|
|
6
|
+
<span class="pkt-step__line pkt-step__line--3" role="separator"></span>
|
|
7
|
+
<div class="pkt-step__wrapper">
|
|
8
|
+
<div class="pkt-step__title">{{ title }}</div>
|
|
9
|
+
<div class="pkt-step__content">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</li>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts" setup>
|
|
17
|
+
import { computed, withDefaults, inject } from 'vue'
|
|
18
|
+
|
|
19
|
+
export type TStepStatus = 'completed' | 'incomplete' | 'current'
|
|
20
|
+
|
|
21
|
+
interface IStepProps {
|
|
22
|
+
title: string
|
|
23
|
+
className?: string
|
|
24
|
+
status: TStepStatus
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props = withDefaults(defineProps<IStepProps>(), {
|
|
28
|
+
status: 'incomplete',
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// Inject hideNonActiveStepsContent from parent Stepper component to access the variable
|
|
32
|
+
const hideNonActiveStepsContent = inject<boolean>('hideNonActiveStepsContent')
|
|
33
|
+
const shouldHideContent = (): boolean => {
|
|
34
|
+
return hideNonActiveStepsContent && props.status !== 'current' ? true : false
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const incompleteStepSVG =
|
|
38
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle cx="12" cy="12" r="7" style="fill: var(--pkt-color-grays-grey-200, #CCC);" /></svg>'
|
|
39
|
+
const currentStepSVG =
|
|
40
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><circle opacity=".15" cx="12" cy="12" r="12" fill="#2A2859" /><circle cx="12" cy="12" r="6" fill="#2A2859" /></svg>'
|
|
41
|
+
const completedStepSVG =
|
|
42
|
+
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#2A2859" d="M3 3h18v18H3z" /><path d="m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z" fill="#F1FDFF" /></svg>'
|
|
43
|
+
|
|
44
|
+
const stepClasses = computed(() => [
|
|
45
|
+
'pkt-step',
|
|
46
|
+
props.className,
|
|
47
|
+
`pkt-step--${props.status}`,
|
|
48
|
+
{ 'pkt-step--hidden': shouldHideContent() },
|
|
49
|
+
])
|
|
50
|
+
|
|
51
|
+
const statusSVG = computed(() => {
|
|
52
|
+
switch (props.status) {
|
|
53
|
+
case 'current':
|
|
54
|
+
return currentStepSVG
|
|
55
|
+
case 'completed':
|
|
56
|
+
return completedStepSVG
|
|
57
|
+
default:
|
|
58
|
+
return incompleteStepSVG
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ol :class="stylingClasses" ref="stepperRef">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</ol>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { computed, ref, withDefaults, defineProps, provide } from 'vue'
|
|
9
|
+
|
|
10
|
+
interface IStepperProps {
|
|
11
|
+
className?: string
|
|
12
|
+
hideNonActiveStepsContent?: boolean
|
|
13
|
+
orientation?: 'horizontal' | 'vertical'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<IStepperProps>(), {
|
|
17
|
+
hideNonActiveStepsContent: false,
|
|
18
|
+
orientation: 'vertical',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const stepperRef = ref<HTMLOListElement | null>(null)
|
|
22
|
+
|
|
23
|
+
const stylingClasses = computed(() => {
|
|
24
|
+
return [
|
|
25
|
+
props.className,
|
|
26
|
+
'pkt-stepper',
|
|
27
|
+
props.orientation === 'horizontal' ? 'pkt-stepper--horizontal' : 'pkt-stepper--vertical',
|
|
28
|
+
]
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.join(' ')
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// Make hideNonActiveStepsContent available to all children
|
|
34
|
+
provide('hideNonActiveStepsContent', props.hideNonActiveStepsContent)
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style lang="scss"></style>
|