@oslokommune/punkt-elements 16.7.1 → 16.7.4
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 +35 -0
- package/dist/accordion-BB1JrONI.cjs +34 -0
- package/dist/accordion-nNH87Y60.js +130 -0
- package/dist/alert-BEEnTiCb.cjs +33 -0
- package/dist/alert-ePJuDtmm.js +171 -0
- package/dist/async-directive-B9P1Qa0k.cjs +1 -0
- package/dist/async-directive-CaQiqjyV.js +55 -0
- package/dist/backlink-Ba03LlbB.cjs +13 -0
- package/dist/backlink-CiwXrQYD.js +38 -0
- package/dist/booleanish-BmcOU-43.js +11 -0
- package/dist/booleanish-jJLlnr6-.cjs +1 -0
- package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
- package/dist/breadcrumbs-CpuVqWhF.js +76 -0
- package/dist/button-BIpd1xJh.js +95 -0
- package/dist/button-D-TOBaJB.cjs +27 -0
- package/dist/calendar-BzEtOJla.js +2031 -0
- package/dist/calendar-E5jJLt8D.cjs +90 -0
- package/dist/card-BYJu1MYm.js +339 -0
- package/dist/card-CUFhMVim.cjs +87 -0
- package/dist/checkbox-BARDb9iV.cjs +31 -0
- package/dist/checkbox-Cspxcvt_.js +111 -0
- package/dist/class-map-C8HuhNzZ.js +27 -0
- package/dist/class-map-CJ-msbHs.cjs +1 -0
- package/dist/classutils-DEL164Ur.js +7 -0
- package/dist/classutils-z8YsPlOf.cjs +1 -0
- package/dist/combobox-BcdLZRDU.js +984 -0
- package/dist/combobox-CGbFTWq_.cjs +135 -0
- package/dist/consent-DeB_5sWH.js +197 -0
- package/dist/consent-hwu7pp3S.cjs +11 -0
- package/dist/datepicker-DpmlsnH_.cjs +273 -0
- package/dist/datepicker-OVd8pmnZ.js +1125 -0
- package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
- package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
- package/dist/directive-3THFsVew.js +28 -0
- package/dist/directive-CJ2giQBZ.cjs +1 -0
- package/dist/directive-helpers-D1QSxY17.cjs +1 -0
- package/dist/directive-helpers-Dkv2gKgs.js +25 -0
- package/dist/element-DjtxO-1r.cjs +2 -0
- package/dist/element-cZ85T_aa.js +693 -0
- package/dist/element-with-slot-4J2o3SeU.js +166 -0
- package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
- package/dist/header-DWgPgGfS.cjs +304 -0
- package/dist/header-a6ztVNp3.js +782 -0
- package/dist/heading-BgSWIRii.cjs +1 -0
- package/dist/heading-DiQLPxdf.js +73 -0
- package/dist/helptext-CCBKKLus.js +65 -0
- package/dist/helptext-D-3QfZv5.cjs +24 -0
- package/dist/icon-Co72KtgF.js +86 -0
- package/dist/icon-Dr8sfT2X.cjs +1 -0
- package/dist/if-defined-Cjj8qN-Z.js +5 -0
- package/dist/if-defined-XKOD_t_V.cjs +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/input-element-B1yxcfz4.cjs +1 -0
- package/dist/input-element-Bw1s6NlF.js +643 -0
- package/dist/input-wrapper-BRuVELpK.cjs +54 -0
- package/dist/input-wrapper-CDyHTR1V.js +164 -0
- package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
- package/dist/input-wrapper-YfTmpSSY.js +117 -0
- package/dist/link-CKAFMz9j.js +89 -0
- package/dist/link-CyTCpI0k.cjs +7 -0
- package/dist/linkcard-B0KOGaGj.js +55 -0
- package/dist/linkcard-BE4-FewK.cjs +13 -0
- package/dist/listbox-DCA2JoPV.cjs +106 -0
- package/dist/listbox-DuBgTFvH.js +397 -0
- package/dist/loader-6kFZUErT.js +66 -0
- package/dist/loader-CX2rsC01.cjs +16 -0
- package/dist/messagebox-Cwlg5sOr.js +110 -0
- package/dist/messagebox-Din9X53b.cjs +13 -0
- package/dist/modal-C_wtsh9m.js +209 -0
- package/dist/modal-DS_wUOIv.cjs +36 -0
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -7
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +2 -6
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -6
- package/dist/pkt-breadcrumbs.cjs +1 -43
- package/dist/pkt-breadcrumbs.js +2 -79
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +2 -6
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -6
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -6
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +2 -6
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +2 -6
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -6
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +5 -10
- package/dist/pkt-header.cjs +1 -304
- package/dist/pkt-header.js +2 -855
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +2 -6
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +2 -6
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -6
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +30 -66
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -6
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -6
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +2 -6
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +2 -6
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +2 -6
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +2 -6
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +2 -6
- package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
- package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -6
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +2 -6
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +2 -6
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -7
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +2 -6
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +2 -6
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +2 -6
- package/dist/pkt-timepicker.cjs +1 -191
- package/dist/pkt-timepicker.js +2 -558
- package/dist/progressbar-CdXtmOBb.cjs +17 -0
- package/dist/progressbar-Dy9AiYQz.js +113 -0
- package/dist/radiobutton-GOnpUbCW.cjs +31 -0
- package/dist/radiobutton-V_KPbup_.js +84 -0
- package/dist/ref-BaJ0mBT_.cjs +1 -0
- package/dist/ref-RS8Uv6uC.js +30 -0
- package/dist/repeat-Cepr3469.js +57 -0
- package/dist/repeat-CqcDYBxr.cjs +1 -0
- package/dist/select-BSAFd8Wa.js +164 -0
- package/dist/select-C2i8sOk5.cjs +49 -0
- package/dist/tabs-D8nL9rWx.cjs +37 -0
- package/dist/tabs-Y7utmJi9.js +318 -0
- package/dist/tag-DLthw5b4.cjs +27 -0
- package/dist/tag-VwykmuQR.js +179 -0
- package/dist/textarea-D7aGOyDf.cjs +46 -0
- package/dist/textarea-DYOBhJrN.js +115 -0
- package/dist/textinput-BUgntXnM.js +124 -0
- package/dist/textinput-DFh8_9cx.cjs +70 -0
- package/dist/timepicker-BIfE7KKJ.cjs +191 -0
- package/dist/timepicker-DaSwn1FA.js +503 -0
- package/dist/utils-CUqCKGvp.js +7 -0
- package/dist/utils-CjAbIttF.cjs +1 -0
- package/package.json +6 -6
- package/src/components/accordion/accordion.ts +6 -1
- package/src/components/accordion/accordionitem.ts +6 -1
- package/src/components/alert/alert.test.ts +1 -1
- package/src/components/alert/alert.ts +12 -7
- package/src/components/backlink/backlink.ts +6 -1
- package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
- package/src/components/button/button.ts +6 -1
- package/src/components/calendar/calendar.ts +6 -1
- package/src/components/card/card.ts +6 -1
- package/src/components/checkbox/checkbox.ts +6 -1
- package/src/components/combobox/combobox.ts +6 -1
- package/src/components/consent/consent.ts +6 -1
- package/src/components/datepicker/date-tags.ts +6 -1
- package/src/components/datepicker/datepicker-multiple.ts +6 -1
- package/src/components/datepicker/datepicker-popup.ts +6 -1
- package/src/components/datepicker/datepicker-range.ts +6 -1
- package/src/components/datepicker/datepicker-single.ts +6 -1
- package/src/components/datepicker/datepicker-utils.test.ts +16 -23
- package/src/components/datepicker/datepicker.ts +6 -1
- package/src/components/header/header-service.ts +6 -1
- package/src/components/header/header-user-menu.ts +6 -1
- package/src/components/header/header.ts +6 -1
- package/src/components/heading/heading.ts +6 -1
- package/src/components/helptext/helptext.ts +6 -1
- package/src/components/icon/icon.ts +6 -1
- package/src/components/input-wrapper/input-wrapper.ts +6 -1
- package/src/components/link/link.ts +6 -1
- package/src/components/linkcard/linkcard.ts +6 -1
- package/src/components/listbox/listbox.ts +6 -1
- package/src/components/loader/loader.ts +6 -1
- package/src/components/messagebox/messagebox.ts +6 -1
- package/src/components/modal/modal.ts +6 -1
- package/src/components/progressbar/progressbar.ts +6 -1
- package/src/components/radiobutton/radiobutton.ts +6 -1
- package/src/components/select/select.ts +6 -1
- package/src/components/tabs/tabitem.ts +6 -1
- package/src/components/tabs/tabs.ts +6 -1
- package/src/components/tag/tag.ts +6 -1
- package/src/components/textarea/textarea.ts +6 -1
- package/src/components/textinput/textinput.ts +6 -1
- package/src/components/timepicker/timepicker.ts +6 -1
- package/dist/accordionitem-D1Agl1bB.cjs +0 -34
- package/dist/accordionitem-ZlaXvjt5.js +0 -138
- package/dist/alert-BuAXrnKl.js +0 -115
- package/dist/alert-DFkFNTxh.cjs +0 -33
- package/dist/async-directive-CMzWMlZ5.js +0 -65
- package/dist/async-directive-DoMuclel.cjs +0 -5
- package/dist/backlink-EiAXUUZP.cjs +0 -13
- package/dist/backlink-V4DAt17e.js +0 -47
- package/dist/booleanish-BKVonob4.cjs +0 -1
- package/dist/booleanish-C9R0tdXH.js +0 -11
- package/dist/button-DEyvt1LI.js +0 -137
- package/dist/button-DYv5Dg4M.cjs +0 -27
- package/dist/calendar-HIE9nxcc.cjs +0 -90
- package/dist/calendar-S63oreVW.js +0 -2138
- package/dist/card-CyeH6l1c.cjs +0 -87
- package/dist/card-DDiLfuO4.js +0 -231
- package/dist/checkbox-BLlwTABj.cjs +0 -31
- package/dist/checkbox-ejBUa5qQ.js +0 -145
- package/dist/class-map-CEnykyO_.js +0 -34
- package/dist/class-map-CsENJXf1.cjs +0 -5
- package/dist/classutils-BwNK82ZQ.cjs +0 -1
- package/dist/classutils-RQs1k6D9.js +0 -7
- package/dist/combobox-BmxSecfE.js +0 -818
- package/dist/combobox-Hb2V-fPX.cjs +0 -135
- package/dist/consent-iXyx5v6J.js +0 -173
- package/dist/consent-ruWAEVXW.cjs +0 -11
- package/dist/datepicker-CZl7b8Na.js +0 -1158
- package/dist/datepicker-D2H7U6MS.cjs +0 -273
- package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
- package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
- package/dist/directive-C7oCP5Bh.cjs +0 -5
- package/dist/directive-helpers-BP2WOx60.cjs +0 -5
- package/dist/directive-helpers-rm-28gIj.js +0 -38
- package/dist/directive-oAbCiebi.js +0 -27
- package/dist/element-CPpT3rFQ.js +0 -638
- package/dist/element-gR_VtSiD.cjs +0 -27
- package/dist/element-with-slot-Dqk6-TRR.js +0 -240
- package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
- package/dist/heading-CKt7cVn7.js +0 -101
- package/dist/heading-Cvz8m1xL.cjs +0 -1
- package/dist/helptext-5Mzp65-F.cjs +0 -24
- package/dist/helptext-jIoWRcCF.js +0 -80
- package/dist/icon-BlKA8YuW.js +0 -103
- package/dist/icon-Bqj9oBbl.cjs +0 -9
- package/dist/if-defined-B0krMLad.js +0 -10
- package/dist/if-defined-BOW3ODSj.cjs +0 -5
- package/dist/input-element-8nLwuQS4.js +0 -837
- package/dist/input-element-DdVhUvva.cjs +0 -1
- package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
- package/dist/input-wrapper-B2JpK016.js +0 -179
- package/dist/input-wrapper-CDgenrYA.js +0 -6
- package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
- package/dist/link-R_lNhViF.cjs +0 -7
- package/dist/link-Z_GizclR.js +0 -53
- package/dist/linkcard-BlQvdB1a.js +0 -54
- package/dist/linkcard-C7HbSLlX.cjs +0 -13
- package/dist/listbox-BQKDZvZn.js +0 -438
- package/dist/listbox-CGgV9MAe.cjs +0 -106
- package/dist/loader-Ci3CHU8k.js +0 -93
- package/dist/loader-e2gs_1xz.cjs +0 -16
- package/dist/messagebox-Bf-XMlvW.js +0 -69
- package/dist/messagebox-D67w71VX.cjs +0 -13
- package/dist/modal-CyvEkbfQ.cjs +0 -36
- package/dist/modal-DzGe1g8Z.js +0 -154
- package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
- package/dist/pkt-options-controller-B5YalfCb.js +0 -39
- package/dist/progressbar-By7e0lEI.js +0 -162
- package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
- package/dist/radiobutton-6frNG9J_.js +0 -111
- package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
- package/dist/ref-Bg_Swj5w.js +0 -42
- package/dist/ref-CL-Xk9Xm.cjs +0 -5
- package/dist/repeat-BD8TKgJb.js +0 -61
- package/dist/repeat-Cfq8CDlf.cjs +0 -5
- package/dist/select-CXZt1nHS.js +0 -228
- package/dist/select-WFhS4Vfp.cjs +0 -49
- package/dist/state-C_1EOo3D.js +0 -12
- package/dist/state-Dg-53wQ8.cjs +0 -5
- package/dist/tabitem-CB8wkKmv.js +0 -332
- package/dist/tabitem-DZpspU4Q.cjs +0 -65
- package/dist/tag-BuCpqaks.js +0 -115
- package/dist/tag-X6xdjR0N.cjs +0 -27
- package/dist/textarea-Bzuymclz.js +0 -131
- package/dist/textarea-DoeHJ7HR.cjs +0 -50
- package/dist/textinput-9lHjs4ce.js +0 -150
- package/dist/textinput-BNsLd26i.cjs +0 -70
- package/dist/utils-DznhwRXm.js +0 -8
- package/dist/utils-byXsEz1u.cjs +0 -1
|
@@ -13,7 +13,6 @@ export interface IPktBreadcrumbs {
|
|
|
13
13
|
breadcrumbs: IBreadcrumbItem[]
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@customElement('pkt-breadcrumbs')
|
|
17
16
|
export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
|
|
18
17
|
@property({ type: Array }) breadcrumbs: IBreadcrumbItem[] = []
|
|
19
18
|
|
|
@@ -93,3 +92,9 @@ export class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
|
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
export default PktBreadcrumbs
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
customElement('pkt-breadcrumbs')(PktBreadcrumbs)
|
|
98
|
+
} catch (e) {
|
|
99
|
+
console.warn('Forsøker å definere <pkt-breadcrumbs>, men den er allerede definert')
|
|
100
|
+
}
|
|
@@ -55,7 +55,6 @@ export interface IPktButton {
|
|
|
55
55
|
disabled?: Booleanish
|
|
56
56
|
loadingAnimationPath?: string
|
|
57
57
|
}
|
|
58
|
-
@customElement('pkt-button')
|
|
59
58
|
export class PktButton extends PktElementWithSlot<IPktButton> implements IPktButton {
|
|
60
59
|
|
|
61
60
|
// Properties
|
|
@@ -183,3 +182,9 @@ export class PktButton extends PktElementWithSlot<IPktButton> implements IPktBut
|
|
|
183
182
|
}
|
|
184
183
|
|
|
185
184
|
export default PktButton
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
customElement('pkt-button')(PktButton)
|
|
188
|
+
} catch (e) {
|
|
189
|
+
console.warn('Forsøker å definere <pkt-button>, men den er allerede definert')
|
|
190
|
+
}
|
|
@@ -54,7 +54,6 @@ type TDayViewData = {
|
|
|
54
54
|
tabindex: string
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@customElement('pkt-calendar')
|
|
58
57
|
export class PktCalendar extends PktElement {
|
|
59
58
|
// Selection properties
|
|
60
59
|
@property({ converter: converters.csvToArray })
|
|
@@ -718,3 +717,9 @@ export class PktCalendar extends PktElement {
|
|
|
718
717
|
)
|
|
719
718
|
}
|
|
720
719
|
}
|
|
720
|
+
|
|
721
|
+
try {
|
|
722
|
+
customElement('pkt-calendar')(PktCalendar)
|
|
723
|
+
} catch (e) {
|
|
724
|
+
console.warn('Forsøker å definere <pkt-calendar>, men den er allerede definert')
|
|
725
|
+
}
|
|
@@ -36,7 +36,6 @@ export interface IPktCard {
|
|
|
36
36
|
tags?: (Omit<IPktTag, 'closeTag'> & { text: string })[]
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
@customElement('pkt-card')
|
|
40
39
|
export class PktCard extends PktElementWithSlot implements IPktCard {
|
|
41
40
|
// Properties
|
|
42
41
|
|
|
@@ -260,3 +259,9 @@ export class PktCard extends PktElementWithSlot implements IPktCard {
|
|
|
260
259
|
`
|
|
261
260
|
}
|
|
262
261
|
}
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
customElement('pkt-card')(PktCard)
|
|
265
|
+
} catch (e) {
|
|
266
|
+
console.warn('Forsøker å definere <pkt-card>, men den er allerede definert')
|
|
267
|
+
}
|
|
@@ -21,7 +21,6 @@ type Props = ElementProps<
|
|
|
21
21
|
| 'requiredText'
|
|
22
22
|
>
|
|
23
23
|
|
|
24
|
-
@customElement('pkt-checkbox')
|
|
25
24
|
export class PktCheckbox extends PktInputElement<Props> {
|
|
26
25
|
inputRef: Ref<HTMLInputElement> = createRef()
|
|
27
26
|
|
|
@@ -202,3 +201,9 @@ export class PktCheckbox extends PktInputElement<Props> {
|
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
203
|
}
|
|
204
|
+
|
|
205
|
+
try {
|
|
206
|
+
customElement('pkt-checkbox')(PktCheckbox)
|
|
207
|
+
} catch (e) {
|
|
208
|
+
console.warn('Forsøker å definere <pkt-checkbox>, men den er allerede definert')
|
|
209
|
+
}
|
|
@@ -62,7 +62,6 @@ declare global {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@customElement('pkt-combobox')
|
|
66
65
|
export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
|
|
67
66
|
// Bound handler for body click — stored for cleanup in disconnectedCallback
|
|
68
67
|
private handleBodyClick = (e: MouseEvent) => {
|
|
@@ -498,3 +497,9 @@ export class PktCombobox extends ComboboxHandlers implements IPktCombobox {
|
|
|
498
497
|
}
|
|
499
498
|
|
|
500
499
|
export default PktCombobox
|
|
500
|
+
|
|
501
|
+
try {
|
|
502
|
+
customElement('pkt-combobox')(PktCombobox)
|
|
503
|
+
} catch (e) {
|
|
504
|
+
console.warn('Forsøker å definere <pkt-combobox>, men den er allerede definert')
|
|
505
|
+
}
|
|
@@ -58,7 +58,6 @@ export interface IPktConsent {
|
|
|
58
58
|
triggerText?: string | null
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
@customElement('pkt-consent')
|
|
62
61
|
export class PktConsent extends PktElement<IPktConsent> implements IPktConsent {
|
|
63
62
|
private _cookieEventHandler?: (consent: any) => void
|
|
64
63
|
|
|
@@ -189,3 +188,9 @@ export class PktConsent extends PktElement<IPktConsent> implements IPktConsent {
|
|
|
189
188
|
return html`<pkt-button @click=${this.openModal}>${this.triggerText}</pkt-button>`
|
|
190
189
|
}
|
|
191
190
|
}
|
|
191
|
+
|
|
192
|
+
try {
|
|
193
|
+
customElement('pkt-consent')(PktConsent)
|
|
194
|
+
} catch (e) {
|
|
195
|
+
console.warn('Forsøker å definere <pkt-consent>, men den er allerede definert')
|
|
196
|
+
}
|
|
@@ -22,7 +22,6 @@ export type TISODate = `${TYear}-${TMonth}-${TDay}`
|
|
|
22
22
|
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
@customElement('pkt-date-tags')
|
|
26
25
|
export class PktDateTags extends PktElement {
|
|
27
26
|
@property({ type: Array }) dates: TISODate[] = []
|
|
28
27
|
@property({ type: String }) dateformat: string = 'dd.MM.yyyy' // se kommentar over
|
|
@@ -58,3 +57,9 @@ export class PktDateTags extends PktElement {
|
|
|
58
57
|
`
|
|
59
58
|
}
|
|
60
59
|
}
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
customElement('pkt-date-tags')(PktDateTags)
|
|
63
|
+
} catch (e) {
|
|
64
|
+
console.warn('Forsøker å definere <pkt-date-tags>, men den er allerede definert')
|
|
65
|
+
}
|
|
@@ -9,7 +9,6 @@ import { IDatepickerStrings, defaultSingleStrings } from './datepicker-types'
|
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
import '@/components/icon'
|
|
11
11
|
|
|
12
|
-
@customElement('pkt-datepicker-multiple')
|
|
13
12
|
export class PktDatepickerMultiple extends PktDatepickerBase {
|
|
14
13
|
@property({ type: Array })
|
|
15
14
|
value: string[] = []
|
|
@@ -94,3 +93,9 @@ export class PktDatepickerMultiple extends PktDatepickerBase {
|
|
|
94
93
|
`
|
|
95
94
|
}
|
|
96
95
|
}
|
|
96
|
+
|
|
97
|
+
try {
|
|
98
|
+
customElement('pkt-datepicker-multiple')(PktDatepickerMultiple)
|
|
99
|
+
} catch (e) {
|
|
100
|
+
console.warn('Forsøker å definere <pkt-datepicker-multiple>, men den er allerede definert')
|
|
101
|
+
}
|
|
@@ -8,7 +8,6 @@ import { formatISODate, newDate } from 'shared-utils/date-utils'
|
|
|
8
8
|
import { PktCalendar } from '../calendar/calendar'
|
|
9
9
|
import { calendarUtils } from './datepicker-utils'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-datepicker-popup')
|
|
12
11
|
export class PktDatepickerPopup extends PktElement {
|
|
13
12
|
@property({ type: Boolean, reflect: true }) open = false
|
|
14
13
|
@property({ type: Boolean }) multiple = false
|
|
@@ -178,3 +177,9 @@ export class PktDatepickerPopup extends PktElement {
|
|
|
178
177
|
`
|
|
179
178
|
}
|
|
180
179
|
}
|
|
180
|
+
|
|
181
|
+
try {
|
|
182
|
+
customElement('pkt-datepicker-popup')(PktDatepickerPopup)
|
|
183
|
+
} catch (e) {
|
|
184
|
+
console.warn('Forsøker å definere <pkt-datepicker-popup>, men den er allerede definert')
|
|
185
|
+
}
|
|
@@ -9,7 +9,6 @@ import { IDatepickerStrings, defaultRangeStrings } from './datepicker-types'
|
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
import '@/components/icon'
|
|
11
11
|
|
|
12
|
-
@customElement('pkt-datepicker-range')
|
|
13
12
|
export class PktDatepickerRange extends PktDatepickerBase {
|
|
14
13
|
@property({ type: Array })
|
|
15
14
|
value: string[] = []
|
|
@@ -164,3 +163,9 @@ export class PktDatepickerRange extends PktDatepickerBase {
|
|
|
164
163
|
`
|
|
165
164
|
}
|
|
166
165
|
}
|
|
166
|
+
|
|
167
|
+
try {
|
|
168
|
+
customElement('pkt-datepicker-range')(PktDatepickerRange)
|
|
169
|
+
} catch (e) {
|
|
170
|
+
console.warn('Forsøker å definere <pkt-datepicker-range>, men den er allerede definert')
|
|
171
|
+
}
|
|
@@ -8,7 +8,6 @@ import { keyboardUtils, formUtils } from './datepicker-utils'
|
|
|
8
8
|
import { IDatepickerStrings, defaultSingleStrings } from './datepicker-types'
|
|
9
9
|
import { isIOS } from 'shared-utils/device-utils'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-datepicker-single')
|
|
12
11
|
export class PktDatepickerSingle extends PktDatepickerBase {
|
|
13
12
|
@property({ type: String })
|
|
14
13
|
value: string = ''
|
|
@@ -89,3 +88,9 @@ export class PktDatepickerSingle extends PktDatepickerBase {
|
|
|
89
88
|
`
|
|
90
89
|
}
|
|
91
90
|
}
|
|
91
|
+
|
|
92
|
+
try {
|
|
93
|
+
customElement('pkt-datepicker-single')(PktDatepickerSingle)
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.warn('Forsøker å definere <pkt-datepicker-single>, men den er allerede definert')
|
|
96
|
+
}
|
|
@@ -11,6 +11,12 @@ import {
|
|
|
11
11
|
} from './datepicker-utils'
|
|
12
12
|
import { createRef } from 'lit/directives/ref.js'
|
|
13
13
|
|
|
14
|
+
const mockIsIOS = vi.hoisted(() => vi.fn(() => false))
|
|
15
|
+
|
|
16
|
+
vi.mock('shared-utils/device-utils', () => ({
|
|
17
|
+
isIOS: mockIsIOS,
|
|
18
|
+
}))
|
|
19
|
+
|
|
14
20
|
describe('datepicker-utils', () => {
|
|
15
21
|
describe('valueUtils', () => {
|
|
16
22
|
describe('validateRangeOrder', () => {
|
|
@@ -71,18 +77,15 @@ describe('datepicker-utils', () => {
|
|
|
71
77
|
describe('inputTypeUtils', () => {
|
|
72
78
|
describe('getInputType', () => {
|
|
73
79
|
it('should return "text" for iOS devices', () => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}))
|
|
78
|
-
// Note: This test is limited by how vitest handles module mocking
|
|
79
|
-
// In a real scenario, you'd need proper mocking setup
|
|
80
|
+
mockIsIOS.mockReturnValue(true)
|
|
81
|
+
const type = inputTypeUtils.getInputType()
|
|
82
|
+
expect(type).toBe('text')
|
|
80
83
|
})
|
|
81
84
|
|
|
82
85
|
it('should return "date" for non-iOS devices', () => {
|
|
83
|
-
|
|
86
|
+
mockIsIOS.mockReturnValue(false)
|
|
84
87
|
const type = inputTypeUtils.getInputType()
|
|
85
|
-
expect(
|
|
88
|
+
expect(type).toBe('date')
|
|
86
89
|
})
|
|
87
90
|
})
|
|
88
91
|
})
|
|
@@ -223,7 +226,9 @@ describe('datepicker-utils', () => {
|
|
|
223
226
|
it('should return early if refs are not available', () => {
|
|
224
227
|
const popupRef = createRef()
|
|
225
228
|
const inputRef = createRef()
|
|
226
|
-
expect(() =>
|
|
229
|
+
expect(() =>
|
|
230
|
+
calendarUtils.handleCalendarPosition(popupRef as any, inputRef as any),
|
|
231
|
+
).not.toThrow()
|
|
227
232
|
})
|
|
228
233
|
|
|
229
234
|
it('should position calendar below input by default', () => {
|
|
@@ -629,13 +634,7 @@ describe('datepicker-utils', () => {
|
|
|
629
634
|
const blurInput = vi.fn()
|
|
630
635
|
const event = { key: 'Enter', preventDefault: vi.fn() } as any
|
|
631
636
|
|
|
632
|
-
keyboardUtils.handleInputKeydown(
|
|
633
|
-
event,
|
|
634
|
-
toggleCalendar,
|
|
635
|
-
undefined,
|
|
636
|
-
undefined,
|
|
637
|
-
blurInput,
|
|
638
|
-
)
|
|
637
|
+
keyboardUtils.handleInputKeydown(event, toggleCalendar, undefined, undefined, blurInput)
|
|
639
638
|
expect(event.preventDefault).toHaveBeenCalled()
|
|
640
639
|
expect(blurInput).toHaveBeenCalled()
|
|
641
640
|
})
|
|
@@ -662,13 +661,7 @@ describe('datepicker-utils', () => {
|
|
|
662
661
|
const blurInput = vi.fn()
|
|
663
662
|
const event = { key: ',', preventDefault: vi.fn() } as any
|
|
664
663
|
|
|
665
|
-
keyboardUtils.handleInputKeydown(
|
|
666
|
-
event,
|
|
667
|
-
toggleCalendar,
|
|
668
|
-
undefined,
|
|
669
|
-
undefined,
|
|
670
|
-
blurInput,
|
|
671
|
-
)
|
|
664
|
+
keyboardUtils.handleInputKeydown(event, toggleCalendar, undefined, undefined, blurInput)
|
|
672
665
|
expect(event.preventDefault).toHaveBeenCalled()
|
|
673
666
|
expect(blurInput).toHaveBeenCalled()
|
|
674
667
|
})
|
|
@@ -51,7 +51,6 @@ type Props = ElementProps<
|
|
|
51
51
|
| 'timezone'
|
|
52
52
|
>
|
|
53
53
|
|
|
54
|
-
@customElement('pkt-datepicker')
|
|
55
54
|
export class PktDatepicker extends PktInputElement<Props> {
|
|
56
55
|
/**
|
|
57
56
|
* Element attributes and properties
|
|
@@ -609,3 +608,9 @@ export class PktDatepicker extends PktInputElement<Props> {
|
|
|
609
608
|
)
|
|
610
609
|
}
|
|
611
610
|
}
|
|
611
|
+
|
|
612
|
+
try {
|
|
613
|
+
customElement('pkt-datepicker')(PktDatepicker)
|
|
614
|
+
} catch (e) {
|
|
615
|
+
console.warn('Forsøker å definere <pkt-datepicker>, men den er allerede definert')
|
|
616
|
+
}
|
|
@@ -27,7 +27,6 @@ import './header-user-menu'
|
|
|
27
27
|
|
|
28
28
|
const CDN_LOGO_PATH = 'https://punkt-cdn.oslo.kommune.no/latest/logos/'
|
|
29
29
|
|
|
30
|
-
@customElement('pkt-header-service')
|
|
31
30
|
export class PktHeaderService extends PktElementWithSlot<IPktHeader> implements IPktHeader {
|
|
32
31
|
@property({ type: String, attribute: 'service-name' }) serviceName?: string
|
|
33
32
|
@property({ type: String, attribute: 'service-link' }) serviceLink?: string
|
|
@@ -756,3 +755,9 @@ declare global {
|
|
|
756
755
|
'pkt-header-service': PktHeaderService
|
|
757
756
|
}
|
|
758
757
|
}
|
|
758
|
+
|
|
759
|
+
try {
|
|
760
|
+
customElement('pkt-header-service')(PktHeaderService)
|
|
761
|
+
} catch (e) {
|
|
762
|
+
console.warn('Forsøker å definere <pkt-header-service>, men den er allerede definert')
|
|
763
|
+
}
|
|
@@ -24,7 +24,6 @@ export interface IPktHeaderUserMenu {
|
|
|
24
24
|
logoutOnClick?: Booleanish
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@customElement('pkt-header-user-menu')
|
|
28
27
|
export class PktHeaderUserMenu
|
|
29
28
|
extends PktElement<IPktHeaderUserMenu>
|
|
30
29
|
implements IPktHeaderUserMenu
|
|
@@ -213,3 +212,9 @@ declare global {
|
|
|
213
212
|
'pkt-header-user-menu': PktHeaderUserMenu
|
|
214
213
|
}
|
|
215
214
|
}
|
|
215
|
+
|
|
216
|
+
try {
|
|
217
|
+
customElement('pkt-header-user-menu')(PktHeaderUserMenu)
|
|
218
|
+
} catch (e) {
|
|
219
|
+
console.warn('Forsøker å definere <pkt-header-user-menu>, men den er allerede definert')
|
|
220
|
+
}
|
|
@@ -31,7 +31,6 @@ import './header-service'
|
|
|
31
31
|
*
|
|
32
32
|
* TODO: Add `type` prop to switch between `service` and `global` header types
|
|
33
33
|
*/
|
|
34
|
-
@customElement('pkt-header')
|
|
35
34
|
export class PktHeader extends PktElementWithSlot<IPktHeader> implements IPktHeader {
|
|
36
35
|
@property({ type: String, attribute: 'service-name' }) serviceName?: string
|
|
37
36
|
@property({ type: String, attribute: 'service-link' }) serviceLink?: string
|
|
@@ -140,3 +139,9 @@ declare global {
|
|
|
140
139
|
'pkt-header': PktHeader
|
|
141
140
|
}
|
|
142
141
|
}
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
customElement('pkt-header')(PktHeader)
|
|
145
|
+
} catch (e) {
|
|
146
|
+
console.warn('Forsøker å definere <pkt-header>, men den er allerede definert')
|
|
147
|
+
}
|
|
@@ -15,7 +15,6 @@ export interface IPktHeading {
|
|
|
15
15
|
align?: 'start' | 'center' | 'end'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@customElement('pkt-heading')
|
|
19
18
|
export class PktHeading extends PktShadowElement<IPktHeading> implements IPktHeading {
|
|
20
19
|
@property({ type: String, reflect: true }) size: TPktHeadingSize | undefined = undefined
|
|
21
20
|
@property({ type: Number, reflect: true }) level: TPktHeadingLevel = 2
|
|
@@ -151,3 +150,9 @@ export class PktHeading extends PktShadowElement<IPktHeading> implements IPktHea
|
|
|
151
150
|
return html`<slot></slot>`
|
|
152
151
|
}
|
|
153
152
|
}
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
customElement('pkt-heading')(PktHeading)
|
|
156
|
+
} catch (e) {
|
|
157
|
+
console.warn('Forsøker å definere <pkt-heading>, men den er allerede definert')
|
|
158
|
+
}
|
|
@@ -8,7 +8,6 @@ import specs from 'componentSpecs/input-wrapper.json'
|
|
|
8
8
|
import '@/components/icon'
|
|
9
9
|
import { slotContent } from '@/directives/slot-content'
|
|
10
10
|
|
|
11
|
-
@customElement('pkt-helptext')
|
|
12
11
|
export class PktHelptext extends PktElementWithSlot {
|
|
13
12
|
@property({ type: String, reflect: true })
|
|
14
13
|
forId: string = uuidish()
|
|
@@ -84,3 +83,9 @@ export class PktHelptext extends PktElementWithSlot {
|
|
|
84
83
|
return html`${helptextElement()}`
|
|
85
84
|
}
|
|
86
85
|
}
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
customElement('pkt-helptext')(PktHelptext)
|
|
89
|
+
} catch (e) {
|
|
90
|
+
console.warn('Forsøker å definere <pkt-helptext>, men den er allerede definert')
|
|
91
|
+
}
|
|
@@ -75,7 +75,6 @@ const downloadIconOrGetFromCache = async (
|
|
|
75
75
|
|
|
76
76
|
type Props = ElementProps<PktIcon, 'path' | 'name'>
|
|
77
77
|
|
|
78
|
-
@customElement('pkt-icon')
|
|
79
78
|
export class PktIcon extends PktElement<Props> {
|
|
80
79
|
@property({ type: String, reflect: false })
|
|
81
80
|
path: string | undefined = typeof window !== 'undefined' ? window.pktIconPath : defaultPath
|
|
@@ -133,3 +132,9 @@ declare global {
|
|
|
133
132
|
'pkt-icon': PktIcon
|
|
134
133
|
}
|
|
135
134
|
}
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
customElement('pkt-icon')(PktIcon)
|
|
138
|
+
} catch (e) {
|
|
139
|
+
console.warn('Forsøker å definere <pkt-icon>, men den er allerede definert')
|
|
140
|
+
}
|
|
@@ -40,7 +40,6 @@ type Props = ElementProps<
|
|
|
40
40
|
| 'role'
|
|
41
41
|
>
|
|
42
42
|
|
|
43
|
-
@customElement('pkt-input-wrapper')
|
|
44
43
|
export class PktInputWrapper extends PktElementWithSlot<Props> {
|
|
45
44
|
/**
|
|
46
45
|
* Element attributes
|
|
@@ -222,3 +221,9 @@ export class PktInputWrapper extends PktElementWithSlot<Props> {
|
|
|
222
221
|
)
|
|
223
222
|
}
|
|
224
223
|
}
|
|
224
|
+
|
|
225
|
+
try {
|
|
226
|
+
customElement('pkt-input-wrapper')(PktInputWrapper)
|
|
227
|
+
} catch (e) {
|
|
228
|
+
console.warn('Forsøker å definere <pkt-input-wrapper>, men den er allerede definert')
|
|
229
|
+
}
|
|
@@ -6,7 +6,6 @@ import { customElement, property } from 'lit/decorators.js'
|
|
|
6
6
|
import specs from 'componentSpecs/link.json'
|
|
7
7
|
import '@/components/icon'
|
|
8
8
|
|
|
9
|
-
@customElement('pkt-link')
|
|
10
9
|
export class PktLink extends PktElementWithSlot {
|
|
11
10
|
/**
|
|
12
11
|
* Element attributes
|
|
@@ -37,3 +36,9 @@ export class PktLink extends PktElementWithSlot {
|
|
|
37
36
|
>`
|
|
38
37
|
}
|
|
39
38
|
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
customElement('pkt-link')(PktLink)
|
|
42
|
+
} catch (e) {
|
|
43
|
+
console.warn('Forsøker å definere <pkt-link>, men den er allerede definert')
|
|
44
|
+
}
|
|
@@ -24,7 +24,6 @@ export interface IPktLinkCard {
|
|
|
24
24
|
skin?: TLinkCardSkin
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@customElement('pkt-linkcard')
|
|
28
27
|
export class PktLinkCard extends PktElementWithSlot implements IPktLinkCard {
|
|
29
28
|
@property({ type: String, reflect: true }) title: string = ''
|
|
30
29
|
@property({ type: String, reflect: true }) href: string = '#'
|
|
@@ -57,3 +56,9 @@ export class PktLinkCard extends PktElementWithSlot implements IPktLinkCard {
|
|
|
57
56
|
`
|
|
58
57
|
}
|
|
59
58
|
}
|
|
59
|
+
|
|
60
|
+
try {
|
|
61
|
+
customElement('pkt-linkcard')(PktLinkCard)
|
|
62
|
+
} catch (e) {
|
|
63
|
+
console.warn('Forsøker å definere <pkt-linkcard>, men den er allerede definert')
|
|
64
|
+
}
|
|
@@ -44,7 +44,6 @@ export interface IPktListbox {
|
|
|
44
44
|
userMessage: string | null
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
@customElement('pkt-listbox')
|
|
48
47
|
export class PktListbox extends PktElement implements IPktListbox {
|
|
49
48
|
@property({ type: String }) id: string = uuidish()
|
|
50
49
|
@property({ type: String }) label: string | null = null
|
|
@@ -463,3 +462,9 @@ export class PktListbox extends PktElement implements IPktListbox {
|
|
|
463
462
|
}
|
|
464
463
|
}
|
|
465
464
|
}
|
|
465
|
+
|
|
466
|
+
try {
|
|
467
|
+
customElement('pkt-listbox')(PktListbox)
|
|
468
|
+
} catch (e) {
|
|
469
|
+
console.warn('Forsøker å definere <pkt-listbox>, men den er allerede definert')
|
|
470
|
+
}
|
|
@@ -47,7 +47,6 @@ export interface IPktLoader {
|
|
|
47
47
|
loadingAnimationPath?: string
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@customElement('pkt-loader')
|
|
51
50
|
export class PktLoader extends PktElementWithSlot implements IPktLoader {
|
|
52
51
|
@property({ type: Number }) delay: number = 0
|
|
53
52
|
@property({ type: Boolean }) inline: boolean = false
|
|
@@ -129,3 +128,9 @@ export class PktLoader extends PktElementWithSlot implements IPktLoader {
|
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
export default PktLoader
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
customElement('pkt-loader')(PktLoader)
|
|
134
|
+
} catch (e) {
|
|
135
|
+
console.warn('Forsøker å definere <pkt-loader>, men den er allerede definert')
|
|
136
|
+
}
|
|
@@ -18,7 +18,6 @@ export interface IPktMessagebox {
|
|
|
18
18
|
closable?: boolean
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
@customElement('pkt-messagebox')
|
|
22
21
|
export class PktMessagebox extends PktElementWithSlot implements IPktMessagebox {
|
|
23
22
|
constructor() {
|
|
24
23
|
super()
|
|
@@ -80,3 +79,9 @@ export class PktMessagebox extends PktElementWithSlot implements IPktMessagebox
|
|
|
80
79
|
this.dispatchEvent(new CustomEvent('on-close', { detail: { origin: event }, bubbles: true }))
|
|
81
80
|
}
|
|
82
81
|
}
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
customElement('pkt-messagebox')(PktMessagebox)
|
|
85
|
+
} catch (e) {
|
|
86
|
+
console.warn('Forsøker å definere <pkt-messagebox>, men den er allerede definert')
|
|
87
|
+
}
|
|
@@ -22,7 +22,6 @@ export interface IPktModal {
|
|
|
22
22
|
transparentBackdrop?: boolean
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
@customElement('pkt-modal')
|
|
26
25
|
export class PktModal extends PktElementWithSlot implements IPktModal {
|
|
27
26
|
// Public properties
|
|
28
27
|
@property({ type: Boolean, reflect: true }) open?: boolean = false
|
|
@@ -211,3 +210,9 @@ export class PktModal extends PktElementWithSlot implements IPktModal {
|
|
|
211
210
|
`
|
|
212
211
|
}
|
|
213
212
|
}
|
|
213
|
+
|
|
214
|
+
try {
|
|
215
|
+
customElement('pkt-modal')(PktModal)
|
|
216
|
+
} catch (e) {
|
|
217
|
+
console.warn('Forsøker å definere <pkt-modal>, men den er allerede definert')
|
|
218
|
+
}
|
|
@@ -35,7 +35,6 @@ export interface IPktProgressbar {
|
|
|
35
35
|
valueMin?: number
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
@customElement('pkt-progressbar')
|
|
39
38
|
export class PktProgressbar extends PktElement implements IPktProgressbar {
|
|
40
39
|
constructor() {
|
|
41
40
|
super()
|
|
@@ -194,3 +193,9 @@ export class PktProgressbar extends PktElement implements IPktProgressbar {
|
|
|
194
193
|
}
|
|
195
194
|
|
|
196
195
|
export default PktProgressbar
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
customElement('pkt-progressbar')(PktProgressbar)
|
|
199
|
+
} catch (e) {
|
|
200
|
+
console.warn('Forsøker å definere <pkt-progressbar>, men den er allerede definert')
|
|
201
|
+
}
|
|
@@ -18,7 +18,6 @@ type Props = ElementProps<
|
|
|
18
18
|
| 'requiredText'
|
|
19
19
|
>
|
|
20
20
|
|
|
21
|
-
@customElement('pkt-radiobutton')
|
|
22
21
|
export class PktRadioButton extends PktInputElement<Props> {
|
|
23
22
|
inputRef: Ref<HTMLInputElement> = createRef()
|
|
24
23
|
|
|
@@ -129,3 +128,9 @@ export class PktRadioButton extends PktInputElement<Props> {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
}
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
customElement('pkt-radiobutton')(PktRadioButton)
|
|
134
|
+
} catch (e) {
|
|
135
|
+
console.warn('Forsøker å definere <pkt-radiobutton>, men den er allerede definert')
|
|
136
|
+
}
|
|
@@ -38,7 +38,6 @@ declare global {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
@customElement('pkt-select')
|
|
42
41
|
export class PktSelect extends PktOptionsInputElement<{}, TSelectOption> implements IPktSelect {
|
|
43
42
|
inputRef: Ref<HTMLSelectElement> = createRef()
|
|
44
43
|
|
|
@@ -260,3 +259,9 @@ export class PktSelect extends PktOptionsInputElement<{}, TSelectOption> impleme
|
|
|
260
259
|
return value
|
|
261
260
|
}
|
|
262
261
|
}
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
customElement('pkt-select')(PktSelect)
|
|
265
|
+
} catch (e) {
|
|
266
|
+
console.warn('Forsøker å definere <pkt-select>, men den er allerede definert')
|
|
267
|
+
}
|
|
@@ -19,7 +19,6 @@ export interface IPktTabItem {
|
|
|
19
19
|
index?: number
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@customElement('pkt-tab-item')
|
|
23
22
|
export class PktTabItem extends PktElementWithSlot<IPktTabItem> implements IPktTabItem {
|
|
24
23
|
@property({ type: Boolean, reflect: true }) active: boolean = false
|
|
25
24
|
@property({ type: String, reflect: true }) href: string = ''
|
|
@@ -112,3 +111,9 @@ export class PktTabItem extends PktElementWithSlot<IPktTabItem> implements IPktT
|
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
export default PktTabItem
|
|
114
|
+
|
|
115
|
+
try {
|
|
116
|
+
customElement('pkt-tab-item')(PktTabItem)
|
|
117
|
+
} catch (e) {
|
|
118
|
+
console.warn('Forsøker å definere <pkt-tab-item>, men den er allerede definert')
|
|
119
|
+
}
|
|
@@ -10,7 +10,6 @@ export interface IPktTabs {
|
|
|
10
10
|
disableArrowNav?: boolean
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
@customElement('pkt-tabs')
|
|
14
13
|
export class PktTabs extends PktElementWithSlot<IPktTabs> implements IPktTabs {
|
|
15
14
|
@property({ type: Boolean, reflect: true, attribute: 'arrow-nav' }) arrowNav: boolean = true
|
|
16
15
|
@property({ type: Boolean, reflect: true, attribute: 'disable-arrow-nav' })
|
|
@@ -92,3 +91,9 @@ export class PktTabs extends PktElementWithSlot<IPktTabs> implements IPktTabs {
|
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
export default PktTabs
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
customElement('pkt-tabs')(PktTabs)
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.warn('Forsøker å definere <pkt-tabs>, men den er allerede definert')
|
|
99
|
+
}
|
|
@@ -33,7 +33,6 @@ export interface IPktTag {
|
|
|
33
33
|
ariaLabel?: IAriaAttributes['aria-label'] | null
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
@customElement('pkt-tag')
|
|
37
36
|
export class PktTag extends PktElementWithSlot<IPktTag> implements IPktTag {
|
|
38
37
|
constructor() {
|
|
39
38
|
super()
|
|
@@ -142,3 +141,9 @@ export class PktTag extends PktElementWithSlot<IPktTag> implements IPktTag {
|
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
}
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
customElement('pkt-tag')(PktTag)
|
|
147
|
+
} catch (e) {
|
|
148
|
+
console.warn('Forsøker å definere <pkt-tag>, men den er allerede definert')
|
|
149
|
+
}
|