@oslokommune/punkt-elements 17.1.3 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/{accordion-BeLvLPrB.js → accordion-CcUosZjL.js} +27 -27
- package/dist/{accordion-B3GBlvUC.cjs → accordion-k0pWTG1X.cjs} +5 -5
- package/dist/alert-BD8YVKia.cjs +35 -0
- package/dist/{alert-DKK_Tb9J.js → alert-Bmaly2Yo.js} +57 -52
- package/dist/{async-directive-BPf6K-V2.js → async-directive-COqx0IYj.js} +5 -5
- package/dist/{async-directive-Da7TJpnq.cjs → async-directive-DN2eg9gA.cjs} +1 -1
- package/dist/{backlink-D1y26pj3.js → backlink-C_ZO-ZbR.js} +9 -9
- package/dist/{backlink-CMmrKTe4.cjs → backlink-Ch64Pivx.cjs} +3 -3
- package/dist/base-elements/element.d.ts +13 -1
- package/dist/base-elements/input-element.d.ts +4 -2
- package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-CF_gAbUk.js} +16 -16
- package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-CzzbardP.cjs} +7 -7
- package/dist/{button-2-OSPJkj.js → button-C1CQSASU.js} +28 -28
- package/dist/{button-CE97NQIk.cjs → button-CF3dNKeI.cjs} +7 -7
- package/dist/{calendar-kn4SrtJy.cjs → calendar-BxF81kB9.cjs} +28 -27
- package/dist/{calendar-pOW3R5Pw.js → calendar-DRmxORMc.js} +82 -68
- package/dist/{card-CETDFkxR.cjs → card-Cg1daj05.cjs} +26 -26
- package/dist/{card-zQ0eKRMV.js → card-W_Jb0Tlo.js} +44 -44
- package/dist/{checkbox-CQNr_sEg.cjs → checkbox-BHQv8lHq.cjs} +11 -11
- package/dist/{checkbox-CH7NpINF.js → checkbox-BQw2dMSX.js} +23 -23
- package/dist/{class-map-BeimMvPv.cjs → class-map-C33ixq7O.cjs} +1 -1
- package/dist/{class-map-CnWCnBSX.js → class-map-wh4Yi3oj.js} +3 -3
- package/dist/{combobox-Bvg0UO9w.cjs → combobox-BpZow9OU.cjs} +19 -18
- package/dist/{combobox-CRdYYlxu.js → combobox-C9wwnUfM.js} +55 -54
- package/dist/components/accordion/accordion.d.ts +2 -6
- package/dist/components/accordion/accordionitem.d.ts +2 -8
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/backlink/backlink.d.ts +4 -5
- package/dist/components/backlink/backlink.test.d.ts +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +6 -7
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/calendar/calendar.d.ts +21 -6
- package/dist/components/checkbox/checkbox.d.ts +4 -2
- package/dist/components/combobox/combobox-base.d.ts +2 -1
- package/dist/components/consent/strings.d.ts +1 -85
- package/dist/components/datepicker/datepicker-base.d.ts +0 -3
- package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
- package/dist/components/datepicker/datepicker-range.d.ts +0 -2
- package/dist/components/datepicker/datepicker-single.d.ts +0 -2
- package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
- package/dist/components/fileupload/fileupload-base.d.ts +7 -4
- package/dist/components/fileupload/fileupload-types.d.ts +5 -43
- package/dist/components/header/header-service.d.ts +3 -1
- package/dist/components/header/header.d.ts +2 -1
- package/dist/components/helptext/helptext.d.ts +2 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
- package/dist/components/radiobutton/radiobutton.d.ts +4 -2
- package/dist/components/searchinput/searchinput.d.ts +2 -1
- package/dist/{consent-CyY3RyoC.cjs → consent-CPtr7cBw.cjs} +5 -5
- package/dist/{consent-DZEkhgJ1.js → consent-D8MrqGKk.js} +10 -10
- package/dist/controllers/strings-controller.d.ts +27 -0
- package/dist/{datepicker-ButIas85.js → datepicker-D4YnAtWG.js} +104 -104
- package/dist/{datepicker-VTqSDQk5.cjs → datepicker-DaoumZT9.cjs} +38 -37
- package/dist/define-component-spec-BYOSeplU.js +6 -0
- package/dist/define-component-spec-DBNd2FJY.cjs +1 -0
- package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BWSAVe00.js} +1 -1
- package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-C6J4AkFk.cjs} +1 -1
- package/dist/docs/components/alert.d.ts +2 -3
- package/dist/docs/components/fileupload.d.ts +1 -0
- package/dist/element-DiFhBcIl.cjs +2 -0
- package/dist/{element-ChsFgr_B.js → element-WEzISABa.js} +241 -100
- package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-BKYUx4gb.js} +4 -4
- package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-CBK4zrdN.cjs} +1 -1
- package/dist/{fileupload-D5IQ9HDe.js → fileupload-DEHSETw0.js} +340 -652
- package/dist/fileupload-DWu6FIMv.cjs +402 -0
- package/dist/{footer-DrR64HiK.js → footer-BJLEw6Ab.js} +91 -91
- package/dist/{footer-DbYQUYNR.cjs → footer-D_yYWkQ6.cjs} +32 -32
- package/dist/format-B8meU8Tm.cjs +1 -0
- package/dist/format-BTeSVkED.js +18 -0
- package/dist/{header-ClgIac6n.cjs → header-B7_4Cwaq.cjs} +84 -84
- package/dist/{header-KvJ1mGwA.js → header-DLVq7-dM.js} +267 -264
- package/dist/{header-menu-hVPXsb8g.js → header-menu-BsrrTjpT.js} +75 -75
- package/dist/{header-menu-BAsUNKSx.cjs → header-menu-m7nOOC1g.cjs} +24 -24
- package/dist/{heading-g-_IUB5T.js → heading-DSArgrDK.js} +16 -16
- package/dist/{heading-CFmiSuCQ.cjs → heading-_RPw2UW9.cjs} +1 -1
- package/dist/helptext-QMVsW5g6.cjs +27 -0
- package/dist/{helptext-DZng1D5i.js → helptext-dtVVufNH.js} +18 -19
- package/dist/{icon-D-LA22xD.js → icon-DEtOSWRK.js} +17 -17
- package/dist/{icon-9iwd2F2l.cjs → icon-DIavy2cB.cjs} +1 -1
- package/dist/{if-defined-CGzIlZ9-.js → if-defined-BmnvvxtR.js} +1 -1
- package/dist/if-defined-Dc3xFDaM.cjs +1 -0
- package/dist/input-element-DQY1Rpbp.cjs +1 -0
- package/dist/{input-element-DBMNBplu.js → input-element-IBypGOaV.js} +121 -120
- package/dist/input-wrapper-CQgAL1Br.js +308 -0
- package/dist/input-wrapper-mJZLVXy_.cjs +58 -0
- package/dist/link-DwLeY37f.js +131 -0
- package/dist/link-yk4IXDWm.cjs +7 -0
- package/dist/linkcard-BinKnxQF.cjs +13 -0
- package/dist/{linkcard-zqbg7Oqm.js → linkcard-D5DXpmXI.js} +16 -16
- package/dist/{listbox-Dc4rGdPi.cjs → listbox-C5zTRNAO.cjs} +15 -15
- package/dist/{listbox-va_E8afs.js → listbox-C8ooO8qZ.js} +100 -99
- package/dist/{loader-D_RDICnw.js → loader-C3HyayzL.js} +14 -14
- package/dist/{loader-CMUkVJmE.cjs → loader-DHF7M5Vn.cjs} +5 -5
- package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-DqYf6VmQ.cjs} +5 -5
- package/dist/{messagebox-Cw-OWDya.js → messagebox-u8i3R5QA.js} +15 -15
- package/dist/{modal-BtInv031.cjs → modal-CnJ9y2TQ.cjs} +8 -8
- package/dist/{modal-D0t_X2dX.js → modal-V-jEe0aY.js} +20 -20
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +35 -34
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-BhMNCWcc.cjs} +1 -1
- package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-CuQ6SClv.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{progressbar-CbcfLerF.js → progressbar-DS4i8IWq.js} +21 -21
- package/dist/{progressbar-D5MmnQId.cjs → progressbar-DY5hxImR.cjs} +5 -5
- package/dist/{radiobutton-BUnf3EPi.js → radiobutton-BhvZztMZ.js} +24 -24
- package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-BswqwRnA.cjs} +8 -8
- package/dist/{ref-CQoEIIp0.cjs → ref-DZmN5Qgj.cjs} +1 -1
- package/dist/{ref-CWD6PjVd.js → ref-OU8ryfP6.js} +2 -2
- package/dist/{repeat-sY6B7fAT.cjs → repeat-DIa_g6WL.cjs} +1 -1
- package/dist/{repeat-C02g7d5S.js → repeat-Dx2H127b.js} +4 -4
- package/dist/{searchinput-DwnjsvJ1.js → searchinput-CJo1PpM7.js} +43 -43
- package/dist/searchinput-Cl46nW0r.cjs +60 -0
- package/dist/{select-DMre80qs.js → select-CBrjauXT.js} +21 -20
- package/dist/{select-BOJi6H6T.cjs → select-Dman8Skr.cjs} +4 -3
- package/dist/shared-strings/consent.d.ts +71 -0
- package/dist/shared-strings/format.d.ts +21 -0
- package/dist/shared-strings/index.d.ts +14 -0
- package/dist/shared-strings/nb.d.ts +121 -0
- package/dist/shared-strings/resolve.d.ts +12 -0
- package/dist/shared-strings/store.d.ts +27 -0
- package/dist/shared-strings/types.d.ts +40 -0
- package/dist/shared-types/accordion.d.ts +58 -0
- package/dist/shared-types/alert.d.ts +20 -0
- package/dist/shared-types/aria.d.ts +2 -1
- package/dist/shared-types/backlink.d.ts +23 -0
- package/dist/shared-types/breadcrumbs.d.ts +33 -0
- package/dist/shared-types/fileupload.d.ts +55 -28
- package/dist/shared-types/footer.d.ts +10 -0
- package/dist/shared-types/form-field.d.ts +45 -0
- package/dist/shared-types/header-footer.d.ts +2 -0
- package/dist/shared-types/index.d.ts +15 -6
- package/dist/shared-types/render-link.d.ts +22 -0
- package/dist/shared-types/skin.d.ts +2 -9
- package/dist/shared-utils/combobox/index.d.ts +1 -0
- package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/messages.d.ts +7 -0
- package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
- package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
- package/dist/{tabs-Cf9ai0FD.cjs → tabs-C1m5rSrR.cjs} +7 -7
- package/dist/{tabs-TvxgbrCF.js → tabs-Xu3mIedh.js} +32 -32
- package/dist/{tag-Ds6n1LIs.js → tag-Azkjhkeu.js} +33 -32
- package/dist/tag-BS6dDPxY.cjs +27 -0
- package/dist/tests/strings-override.test.d.ts +0 -0
- package/dist/{textarea-vfzIcXhX.js → textarea-D4qXcVGD.js} +30 -29
- package/dist/{textarea-BydiLM9Z.cjs → textarea-DftUkR6w.cjs} +3 -2
- package/dist/{textinput-DGdicNSx.cjs → textinput-Ar-1Sbqy.cjs} +13 -12
- package/dist/{textinput-CMP2jPP_.js → textinput-iCgwwNPU.js} +28 -27
- package/dist/{timepicker-ClwgYywH.js → timepicker-W6HVWtmA.js} +67 -64
- package/dist/timepicker-dpAF7h49.cjs +196 -0
- package/package.json +3 -3
- package/src/components/accordion/accordion.ts +2 -10
- package/src/components/accordion/accordionitem.ts +2 -9
- package/src/components/alert/alert.ts +19 -10
- package/src/components/backlink/backlink.test.ts +3 -3
- package/src/components/backlink/backlink.ts +5 -7
- package/src/components/breadcrumbs/breadcrumbs.ts +9 -10
- package/src/components/breadcrumbs/index.ts +1 -1
- package/src/components/calendar/calendar.ts +56 -26
- package/src/components/checkbox/checkbox.test.ts +0 -2
- package/src/components/checkbox/checkbox.ts +8 -4
- package/src/components/combobox/combobox-base.ts +2 -1
- package/src/components/combobox/combobox-value.ts +10 -9
- package/src/components/combobox/combobox.selection.test.ts +5 -1
- package/src/components/combobox/combobox.ts +4 -1
- package/src/components/consent/strings.ts +1 -125
- package/src/components/datepicker/date-tags.ts +4 -1
- package/src/components/datepicker/datepicker-base.ts +2 -6
- package/src/components/datepicker/datepicker-multiple.ts +0 -3
- package/src/components/datepicker/datepicker-range.ts +4 -7
- package/src/components/datepicker/datepicker-single.ts +0 -3
- package/src/components/datepicker/datepicker-utils.test.ts +5 -5
- package/src/components/datepicker/datepicker-utils.ts +6 -11
- package/src/components/datepicker/datepicker.ts +8 -1
- package/src/components/fileupload/fileupload-base.ts +29 -19
- package/src/components/fileupload/fileupload-renderers.ts +2 -1
- package/src/components/fileupload/fileupload-types.ts +5 -42
- package/src/components/fileupload/fileupload.test.ts +16 -0
- package/src/components/fileupload/fileupload.ts +19 -15
- package/src/components/header/header-global.ts +3 -3
- package/src/components/header/header-service.ts +13 -8
- package/src/components/header/header.ts +2 -1
- package/src/components/helptext/helptext.test.ts +1 -1
- package/src/components/helptext/helptext.ts +3 -3
- package/src/components/index.ts +10 -1
- package/src/components/input-wrapper/input-wrapper.ts +18 -10
- package/src/components/link/link.ts +8 -3
- package/src/components/listbox/listbox.ts +3 -3
- package/src/components/radiobutton/radiobutton.ts +8 -4
- package/src/components/searchinput/searchinput.ts +5 -3
- package/src/components/select/select.ts +1 -0
- package/src/components/tag/tag.ts +2 -1
- package/src/components/textarea/textarea.ts +1 -0
- package/src/components/textinput/textinput.ts +1 -0
- package/src/components/timepicker/timepicker.ts +23 -21
- package/dist/alert-Cs4Rmq_J.cjs +0 -33
- package/dist/element-BA8v6S7z.cjs +0 -2
- package/dist/fileupload-BeWiTAoW.cjs +0 -401
- package/dist/helptext-CTtKJcML.cjs +0 -27
- package/dist/if-defined-B89_ZeCj.cjs +0 -1
- package/dist/input-element-DYmQw-fH.cjs +0 -1
- package/dist/input-wrapper-BmxNvznr.js +0 -128
- package/dist/input-wrapper-D-fPaTbY.js +0 -176
- package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
- package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
- package/dist/link-D-Eqm5KH.js +0 -98
- package/dist/link-DK7gvmnj.cjs +0 -7
- package/dist/linkcard-B29cmZqh.cjs +0 -13
- package/dist/searchinput-Bh975rjX.cjs +0 -60
- package/dist/tag-CzojNU7z.cjs +0 -27
- package/dist/timepicker-DYrnLHqN.cjs +0 -195
- package/dist/translations/no.json.d.ts +0 -94
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import { n as s } from "./element-with-slot-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { t as c } from "./if-defined-
|
|
6
|
-
import { n as l, t as u } from "./ref-
|
|
7
|
-
import "./tag-
|
|
8
|
-
import { t as d } from "./repeat-
|
|
9
|
-
import { a as f, c as p, i as m, o as h, r as g, s as _ } from "./listbox-
|
|
10
|
-
import { t as v } from "./input-element-
|
|
11
|
-
import { t as y } from "./pkt-options-controller-
|
|
12
|
-
import "./input-wrapper-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-WEzISABa.js";
|
|
2
|
+
import { t as o } from "./class-map-wh4Yi3oj.js";
|
|
3
|
+
import { n as s } from "./element-with-slot-BKYUx4gb.js";
|
|
4
|
+
import "./icon-DEtOSWRK.js";
|
|
5
|
+
import { t as c } from "./if-defined-BmnvvxtR.js";
|
|
6
|
+
import { n as l, t as u } from "./ref-OU8ryfP6.js";
|
|
7
|
+
import "./tag-Azkjhkeu.js";
|
|
8
|
+
import { t as d } from "./repeat-Dx2H127b.js";
|
|
9
|
+
import { a as f, c as p, i as m, o as h, r as g, s as _ } from "./listbox-C8ooO8qZ.js";
|
|
10
|
+
import { t as v } from "./input-element-IBypGOaV.js";
|
|
11
|
+
import { t as y } from "./pkt-options-controller-CuQ6SClv.js";
|
|
12
|
+
import "./input-wrapper-CQgAL1Br.js";
|
|
13
13
|
//#region ../../shared-utils/combobox/input-utils.ts
|
|
14
14
|
var b = (e, t, n) => {
|
|
15
15
|
switch (e) {
|
|
@@ -499,31 +499,31 @@ var b = (e, t, n) => {
|
|
|
499
499
|
}
|
|
500
500
|
valueChanged() {}
|
|
501
501
|
};
|
|
502
|
-
|
|
502
|
+
i([a({
|
|
503
503
|
type: String,
|
|
504
504
|
reflect: !0
|
|
505
|
-
})], O.prototype, "value", void 0),
|
|
505
|
+
})], O.prototype, "value", void 0), i([a({ type: Array })], O.prototype, "options", void 0), i([a({
|
|
506
506
|
type: Array,
|
|
507
507
|
attribute: "default-options"
|
|
508
|
-
})], O.prototype, "defaultOptions", void 0),
|
|
508
|
+
})], O.prototype, "defaultOptions", void 0), i([a({
|
|
509
509
|
type: Boolean,
|
|
510
510
|
attribute: "allow-user-input"
|
|
511
|
-
})], O.prototype, "allowUserInput", void 0),
|
|
511
|
+
})], O.prototype, "allowUserInput", void 0), i([a({ type: Boolean })], O.prototype, "typeahead", void 0), i([a({
|
|
512
512
|
type: Boolean,
|
|
513
513
|
attribute: "include-search"
|
|
514
|
-
})], O.prototype, "includeSearch", void 0),
|
|
514
|
+
})], O.prototype, "includeSearch", void 0), i([a({
|
|
515
515
|
type: String,
|
|
516
516
|
attribute: "search-placeholder"
|
|
517
|
-
})], O.prototype, "searchPlaceholder", void 0),
|
|
517
|
+
})], O.prototype, "searchPlaceholder", void 0), i([a({ type: Boolean })], O.prototype, "multiple", void 0), i([a({ type: Number })], O.prototype, "maxlength", void 0), i([a({
|
|
518
518
|
type: String,
|
|
519
519
|
attribute: "display-value-as"
|
|
520
|
-
})], O.prototype, "displayValueAs", void 0),
|
|
520
|
+
})], O.prototype, "displayValueAs", void 0), i([a({
|
|
521
521
|
type: String,
|
|
522
522
|
attribute: "tag-placement"
|
|
523
|
-
})], O.prototype, "tagPlacement", void 0),
|
|
523
|
+
})], O.prototype, "tagPlacement", void 0), i([a({
|
|
524
524
|
type: Boolean,
|
|
525
525
|
attribute: "open"
|
|
526
|
-
})], O.prototype, "isOpen", void 0),
|
|
526
|
+
})], O.prototype, "isOpen", void 0), i([r()], O.prototype, "_options", void 0), i([r()], O.prototype, "_value", void 0), i([r()], O.prototype, "_isOptionsOpen", void 0), i([r()], O.prototype, "_userInfoMessage", void 0), i([r()], O.prototype, "_addValueText", void 0), i([r()], O.prototype, "_maxIsReached", void 0), i([r()], O.prototype, "_search", void 0), i([r()], O.prototype, "_inputFocus", void 0);
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region src/components/combobox/combobox-value.ts
|
|
529
529
|
var k = class extends O {
|
|
@@ -531,14 +531,14 @@ var k = class extends O {
|
|
|
531
531
|
if (this.disabled) return;
|
|
532
532
|
this.touched = !0, this._userInfoMessage = "", this._addValueText = null;
|
|
533
533
|
let t = m(this.options, e)?.value || null, n = this._value.includes(e || t || ""), r = !!t, i = this._options.find((t) => t.value === e)?.disabled || !1, a = !e?.trim(), o = !this.multiple, s = this.multiple, c = p(this._value.length, this.maxlength), l = !1, u = !0, d = "", f = "";
|
|
534
|
-
i || (!r && this.allowUserInput && !a ? (this.addNewUserValue(e), d = "
|
|
534
|
+
i || (!r && this.allowUserInput && !a ? (this.addNewUserValue(e), d = "valueAdded", l = s) : !r && !this.allowUserInput ? (o && this._value[0] && this.removeValue(this._value[0]), u = !1, l = !0, d = "noResults") : n ? (this.removeValue(t), l = !0, o && this._hasTextInput && this.inputRef.value && this.inputRef.value.type !== "hidden" && (this.inputRef.value.value = "")) : a && o ? (this.removeAllSelected(), l = !0) : o ? (this._value[0] && this.removeSelected(this._value[0]), this.setSelected(t), l = !1) : s && !c ? (this.setSelected(t), l = !0) : s && c ? (d = "maxSelected", u = !1, f = e) : (o && this.removeAllSelected(), d = "noValidValue", u = !1, l = !0, f = e), this._isOptionsOpen = l, l || (o && this._hasTextInput && (this._suppressNextOpen = !0), window.setTimeout(() => {
|
|
535
535
|
this.focusTrigger();
|
|
536
536
|
}, 0)), this._userInfoMessage = d, this._search = f || "", this.resetComboboxInput(u), s && this.updateMaxReached());
|
|
537
537
|
}
|
|
538
538
|
setSelected(e) {
|
|
539
539
|
if (!this._value.includes(e)) {
|
|
540
540
|
if (this.multiple && p(this._value.length, this.maxlength)) {
|
|
541
|
-
this._userInfoMessage = "
|
|
541
|
+
this._userInfoMessage = "maxSelected";
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
544
544
|
!this.multiple && this.removeAllSelected(), this._value = e ? [...this._value, e] : this._value, w.markOptionSelected(this._options, e), this.resetComboboxInput(!0);
|
|
@@ -553,7 +553,7 @@ var k = class extends O {
|
|
|
553
553
|
addAllOptions() {
|
|
554
554
|
if (this.multiple) {
|
|
555
555
|
if (this.maxlength && this._options.length > this.maxlength) {
|
|
556
|
-
this._userInfoMessage = "
|
|
556
|
+
this._userInfoMessage = "tooManySelected";
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
559
|
this._value = this._options.map((e) => e.value), w.markAllSelected(this._options), this.requestUpdate();
|
|
@@ -565,7 +565,7 @@ var k = class extends O {
|
|
|
565
565
|
addValue() {
|
|
566
566
|
let e = this.inputRef.value?.value.trim() || "";
|
|
567
567
|
if (this._search = e, e && this._value.includes(e)) {
|
|
568
|
-
this.resetComboboxInput(!0), this._userInfoMessage = "
|
|
568
|
+
this.resetComboboxInput(!0), this._userInfoMessage = "alreadySelected";
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
571
|
this.toggleValue(e);
|
|
@@ -855,8 +855,9 @@ var k = class extends O {
|
|
|
855
855
|
super.attributeChangedCallback(e, t, n);
|
|
856
856
|
}
|
|
857
857
|
render() {
|
|
858
|
-
return
|
|
858
|
+
return e`
|
|
859
859
|
<pkt-input-wrapper
|
|
860
|
+
.strings=${this.strings}
|
|
860
861
|
.size=${this.inputSize}
|
|
861
862
|
.label=${this.label}
|
|
862
863
|
.helptext=${this.helptext}
|
|
@@ -902,12 +903,12 @@ var k = class extends O {
|
|
|
902
903
|
aria-description=${c(this._selectionDescription || void 0)}
|
|
903
904
|
tabindex=${this._hasTextInput || this.disabled ? "-1" : "0"}
|
|
904
905
|
@click=${this.handleInputClick}
|
|
905
|
-
@keydown=${this._hasTextInput ?
|
|
906
|
+
@keydown=${this._hasTextInput ? n : this.handleSelectOnlyKeydown}
|
|
906
907
|
${l(this.triggerRef)}
|
|
907
908
|
>
|
|
908
|
-
${!this._hasTextInput && this.placeholder && (!this._value.length || this.multiple && this.tagPlacement == "outside") && !this._inputFocus ?
|
|
909
|
+
${!this._hasTextInput && this.placeholder && (!this._value.length || this.multiple && this.tagPlacement == "outside") && !this._inputFocus ? e`<span class="pkt-combobox__placeholder" @click=${this.handlePlaceholderClick}
|
|
909
910
|
>${this.placeholder}</span
|
|
910
|
-
>` : this.tagPlacement === "outside" ?
|
|
911
|
+
>` : this.tagPlacement === "outside" ? n : this.renderSingleOrMultipleValues()}
|
|
911
912
|
${this.renderInputField()}
|
|
912
913
|
<pkt-icon
|
|
913
914
|
class=${o({
|
|
@@ -930,7 +931,7 @@ var k = class extends O {
|
|
|
930
931
|
?allow-user-input=${this.allowUserInput && !this._maxIsReached}
|
|
931
932
|
?max-is-reached=${this._maxIsReached}
|
|
932
933
|
.customUserInput=${c(this._addValueText)}
|
|
933
|
-
.userMessage=${this._userInfoMessage}
|
|
934
|
+
.userMessage=${this._userInfoMessage ? this.pktStrings.get("combobox")[this._userInfoMessage] : ""}
|
|
934
935
|
@search=${this.handleSearch}
|
|
935
936
|
@option-toggle=${this.handleOptionToggled}
|
|
936
937
|
@select-all=${this.addAllOptions}
|
|
@@ -942,14 +943,14 @@ var k = class extends O {
|
|
|
942
943
|
></pkt-listbox>
|
|
943
944
|
</div>
|
|
944
945
|
|
|
945
|
-
${this.tagPlacement === "outside" && this.multiple ?
|
|
946
|
+
${this.tagPlacement === "outside" && this.multiple ? e`<div class="pkt-combobox__tags-outside">
|
|
946
947
|
${this.renderSingleOrMultipleValues()}
|
|
947
|
-
</div>` :
|
|
948
|
+
</div>` : n}
|
|
948
949
|
</pkt-input-wrapper>
|
|
949
950
|
`;
|
|
950
951
|
}
|
|
951
952
|
renderInputField() {
|
|
952
|
-
return this.typeahead || this.allowUserInput ?
|
|
953
|
+
return this.typeahead || this.allowUserInput ? e`
|
|
953
954
|
<div class="pkt-combobox__input-div combobox__input">
|
|
954
955
|
<input
|
|
955
956
|
type="text"
|
|
@@ -974,7 +975,7 @@ var k = class extends O {
|
|
|
974
975
|
${l(this.inputRef)}
|
|
975
976
|
/>
|
|
976
977
|
</div>
|
|
977
|
-
` :
|
|
978
|
+
` : e`
|
|
978
979
|
<input
|
|
979
980
|
type="hidden"
|
|
980
981
|
id="${this.id}-input"
|
|
@@ -985,23 +986,23 @@ var k = class extends O {
|
|
|
985
986
|
`;
|
|
986
987
|
}
|
|
987
988
|
renderSingleOrMultipleValues() {
|
|
988
|
-
if (!this.multiple && this._hasTextInput) return
|
|
989
|
-
let
|
|
989
|
+
if (!this.multiple && this._hasTextInput) return n;
|
|
990
|
+
let t = !this.multiple, r = this.renderValueTag(m(this.options, this._value[0])), i = this.tagPlacement === "outside", a = e`
|
|
990
991
|
<ul role="list" class="pkt-combobox__tag-list">
|
|
991
|
-
${d(this._value, (e) => e, (
|
|
992
|
-
let a = m(this.options,
|
|
993
|
-
return
|
|
992
|
+
${d(this._value, (e) => e, (t, r) => {
|
|
993
|
+
let a = m(this.options, t), o = a?.tagSkinColor;
|
|
994
|
+
return e`
|
|
994
995
|
<li
|
|
995
996
|
role="listitem"
|
|
996
|
-
@click=${
|
|
997
|
-
@mousedown=${
|
|
997
|
+
@click=${i ? n : (e) => e.stopPropagation()}
|
|
998
|
+
@mousedown=${i ? n : (e) => e.preventDefault()}
|
|
998
999
|
>
|
|
999
1000
|
<pkt-tag
|
|
1000
1001
|
skin=${o || "blue-dark"}
|
|
1001
1002
|
?closeTag=${!this.disabled}
|
|
1002
|
-
.buttonTabindex=${
|
|
1003
|
-
@close=${() => this.handleTagRemove(
|
|
1004
|
-
@keydown=${
|
|
1003
|
+
.buttonTabindex=${i ? void 0 : -1}
|
|
1004
|
+
@close=${() => this.handleTagRemove(t)}
|
|
1005
|
+
@keydown=${i ? n : (e) => this.handleTagKeydown(e, r)}
|
|
1005
1006
|
>
|
|
1006
1007
|
${this.renderValueTag(a)}
|
|
1007
1008
|
</pkt-tag>
|
|
@@ -1010,25 +1011,25 @@ var k = class extends O {
|
|
|
1010
1011
|
})}
|
|
1011
1012
|
</ul>
|
|
1012
1013
|
`;
|
|
1013
|
-
return
|
|
1014
|
+
return t ? r : a;
|
|
1014
1015
|
}
|
|
1015
|
-
renderValueTag(
|
|
1016
|
-
if (!
|
|
1016
|
+
renderValueTag(t) {
|
|
1017
|
+
if (!t) return "";
|
|
1017
1018
|
switch (this.displayValueAs) {
|
|
1018
|
-
case "prefixAndValue": return
|
|
1019
|
-
>${
|
|
1019
|
+
case "prefixAndValue": return e`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
1020
|
+
>${t.prefix || ""} ${t.value}</span
|
|
1020
1021
|
>`;
|
|
1021
|
-
case "value": return
|
|
1022
|
-
>${
|
|
1022
|
+
case "value": return e`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
1023
|
+
>${t.value}</span
|
|
1023
1024
|
>`;
|
|
1024
|
-
default: return
|
|
1025
|
-
>${
|
|
1025
|
+
default: return e`<span class="pkt-combobox__value" data-focusfix=${this.id}
|
|
1026
|
+
>${t.label || t.value}</span
|
|
1026
1027
|
>`;
|
|
1027
1028
|
}
|
|
1028
1029
|
}
|
|
1029
1030
|
};
|
|
1030
1031
|
try {
|
|
1031
|
-
|
|
1032
|
+
t("pkt-combobox")(j);
|
|
1032
1033
|
} catch {
|
|
1033
1034
|
console.warn("Forsøker å definere <pkt-combobox>, men den er allerede definert");
|
|
1034
1035
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { TAccordionSkin } from '../../shared-types';
|
|
2
|
+
import { IPktAccordionBase, TAccordionSkin } from '../../shared-types';
|
|
3
3
|
export type TPktAccordionSkin = TAccordionSkin;
|
|
4
|
-
export interface IPktAccordion {
|
|
5
|
-
compact?: boolean;
|
|
6
|
-
skin?: TPktAccordionSkin;
|
|
7
|
-
ariaLabelledBy?: string;
|
|
8
|
-
name?: string;
|
|
4
|
+
export interface IPktAccordion extends IPktAccordionBase {
|
|
9
5
|
}
|
|
10
6
|
export declare class PktAccordion extends LitElement implements IPktAccordion {
|
|
11
7
|
ariaLabelledBy: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PktElementWithSlot } from '../../base-elements/element-with-slot';
|
|
2
2
|
import { PropertyValues } from 'lit';
|
|
3
3
|
import { Ref } from 'lit/directives/ref.js';
|
|
4
|
+
import { IPktAccordionItemBase } from '../../shared-types';
|
|
4
5
|
import { TPktAccordionSkin } from './accordion';
|
|
5
6
|
/**
|
|
6
7
|
* @param toggleProps
|
|
@@ -8,14 +9,7 @@ import { TPktAccordionSkin } from './accordion';
|
|
|
8
9
|
* @description Send in an "isOpen" boolean and "onToggleClick" function
|
|
9
10
|
* to override the automatic toggling
|
|
10
11
|
*/
|
|
11
|
-
export interface IPktAccordionItem {
|
|
12
|
-
defaultOpen?: boolean;
|
|
13
|
-
id: string;
|
|
14
|
-
title: string;
|
|
15
|
-
skin?: TPktAccordionSkin;
|
|
16
|
-
compact?: boolean;
|
|
17
|
-
isOpen?: boolean;
|
|
18
|
-
name?: string | undefined;
|
|
12
|
+
export interface IPktAccordionItem extends IPktAccordionItemBase {
|
|
19
13
|
}
|
|
20
14
|
export declare class PktAccordionItem extends PktElementWithSlot implements IPktAccordionItem {
|
|
21
15
|
defaultOpen: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
2
|
import { PktElementWithSlot } from '../../base-elements/element-with-slot';
|
|
3
|
-
import { TAriaLive, TAlertSkin } from '../../shared-types';
|
|
3
|
+
import { TAriaLive, TAlertSkin, TAlertSize } from '../../shared-types';
|
|
4
4
|
export type { TAlertSkin };
|
|
5
5
|
export interface IPktAlert {
|
|
6
6
|
skin?: TAlertSkin;
|
|
@@ -13,7 +13,7 @@ export interface IPktAlert {
|
|
|
13
13
|
*/
|
|
14
14
|
compact?: boolean;
|
|
15
15
|
role?: string;
|
|
16
|
-
size?:
|
|
16
|
+
size?: TAlertSize;
|
|
17
17
|
}
|
|
18
18
|
export declare class PktAlert extends PktElementWithSlot implements IPktAlert {
|
|
19
19
|
constructor();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PktElement } from '../../base-elements/element';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
text?: string;
|
|
5
|
-
ariaLabel?: string;
|
|
2
|
+
import { IPktBackLinkBase } from '../../shared-types';
|
|
3
|
+
export interface IPktBackLink extends IPktBackLinkBase {
|
|
6
4
|
}
|
|
7
5
|
export declare class PktBackLink extends PktElement<IPktBackLink> implements IPktBackLink {
|
|
8
6
|
href: string;
|
|
9
7
|
text: string;
|
|
10
|
-
|
|
8
|
+
/** @deprecated Bruk `strings={{ backlink: { label: '…' } }}` eller `setPktStrings()`. */
|
|
9
|
+
ariaLabel: string | null;
|
|
11
10
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
12
11
|
render(): import('lit-html').TemplateResult<1>;
|
|
13
12
|
}
|
|
@@ -2,7 +2,7 @@ import { BaseTestConfig } from '../../tests/test-framework';
|
|
|
2
2
|
export interface BacklinkTestConfig extends BaseTestConfig {
|
|
3
3
|
href?: string;
|
|
4
4
|
text?: string;
|
|
5
|
-
ariaLabel?: string;
|
|
5
|
+
ariaLabel?: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare const createBacklinkTest: (config?: BacklinkTestConfig) => Promise<{
|
|
8
8
|
container: HTMLElement;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { nothing } from 'lit';
|
|
2
2
|
import { PktElement } from '../../base-elements/element';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface IPktBreadcrumbs {
|
|
8
|
-
breadcrumbs: IBreadcrumbItem[];
|
|
3
|
+
import { IBreadcrumb, IPktBreadcrumbsBase } from '../../shared-types';
|
|
4
|
+
export type { IBreadcrumb };
|
|
5
|
+
/** @deprecated Use `IBreadcrumb`. */
|
|
6
|
+
export type IBreadcrumbItem = IBreadcrumb;
|
|
7
|
+
export interface IPktBreadcrumbs extends IPktBreadcrumbsBase {
|
|
9
8
|
}
|
|
10
9
|
export declare class PktBreadcrumbs extends PktElement implements IPktBreadcrumbs {
|
|
11
|
-
breadcrumbs:
|
|
10
|
+
breadcrumbs: IBreadcrumb[];
|
|
12
11
|
private handleLinkClick;
|
|
13
12
|
render(): typeof nothing | import('lit-html').TemplateResult<1>;
|
|
14
13
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { PktBreadcrumbs } from './breadcrumbs';
|
|
2
|
-
export type { IBreadcrumbItem, IPktBreadcrumbs } from './breadcrumbs';
|
|
2
|
+
export type { IBreadcrumb, IBreadcrumbItem, IPktBreadcrumbs } from './breadcrumbs';
|
|
@@ -13,12 +13,27 @@ export declare class PktCalendar extends PktElement {
|
|
|
13
13
|
withcontrols: boolean;
|
|
14
14
|
currentmonth: Date | null;
|
|
15
15
|
today: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
/** @deprecated Bruk `strings={{ dates: { daysShort: [...] } }}` eller `setPktStrings()`. */
|
|
17
|
+
dayStrings?: string[];
|
|
18
|
+
/** @deprecated Bruk `strings={{ dates: { days: [...] } }}` eller `setPktStrings()`. */
|
|
19
|
+
dayStringsLong?: string[];
|
|
20
|
+
/** @deprecated Bruk `strings={{ dates: { months: [...] } }}` eller `setPktStrings()`. */
|
|
21
|
+
monthStrings?: string[];
|
|
22
|
+
/** @deprecated Bruk `strings={{ dates: { week: '...' } }}` eller `setPktStrings()`. */
|
|
23
|
+
weekString?: string;
|
|
24
|
+
/** @deprecated Bruk `strings={{ calendar: { prevMonth: '...' } }}` eller `setPktStrings()`. */
|
|
25
|
+
prevMonthString?: string;
|
|
26
|
+
/** @deprecated Bruk `strings={{ calendar: { nextMonth: '...' } }}` eller `setPktStrings()`. */
|
|
27
|
+
nextMonthString?: string;
|
|
28
|
+
/** Datonavn og navigasjonstekster, med de utfasede enkeltpropene lagt oppå. */
|
|
29
|
+
protected get calendarStrings(): {
|
|
30
|
+
daysShort: string[];
|
|
31
|
+
days: string[];
|
|
32
|
+
months: string[];
|
|
33
|
+
week: string;
|
|
34
|
+
prevMonth: string;
|
|
35
|
+
nextMonth: string;
|
|
36
|
+
};
|
|
22
37
|
private _selected;
|
|
23
38
|
private inRange;
|
|
24
39
|
private rangeHovered;
|
|
@@ -17,9 +17,11 @@ export declare class PktCheckbox extends PktInputElement<Props> {
|
|
|
17
17
|
type: string;
|
|
18
18
|
tagText: string | null;
|
|
19
19
|
optionalTag: boolean;
|
|
20
|
-
|
|
20
|
+
/** @deprecated Bruk `strings={{ forms: { optional: '…' } }}` eller `setPktStrings()`. */
|
|
21
|
+
optionalText?: string;
|
|
21
22
|
requiredTag: boolean;
|
|
22
|
-
|
|
23
|
+
/** @deprecated Bruk `strings={{ forms: { required: '…' } }}` eller `setPktStrings()`. */
|
|
24
|
+
requiredText?: string;
|
|
23
25
|
connectedCallback(): void;
|
|
24
26
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
25
27
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
@@ -2,6 +2,7 @@ import { Ref } from 'lit/directives/ref.js';
|
|
|
2
2
|
import { PktInputElement } from '../../base-elements/input-element';
|
|
3
3
|
import { IPktComboboxOption, TPktComboboxTagPlacement } from './combobox-types';
|
|
4
4
|
import { default as PktListbox } from '../listbox';
|
|
5
|
+
import { TComboboxMessageKey } from '../../shared-utils/combobox';
|
|
5
6
|
/**
|
|
6
7
|
* Base class for PktCombobox.
|
|
7
8
|
* Declares all reactive properties, state, refs, and simple helpers.
|
|
@@ -23,7 +24,7 @@ export declare class ComboboxBase extends PktInputElement {
|
|
|
23
24
|
_options: IPktComboboxOption[];
|
|
24
25
|
protected _value: string[];
|
|
25
26
|
protected _isOptionsOpen: boolean;
|
|
26
|
-
protected _userInfoMessage:
|
|
27
|
+
protected _userInfoMessage: TComboboxMessageKey;
|
|
27
28
|
protected _addValueText: string | null;
|
|
28
29
|
protected _maxIsReached: boolean;
|
|
29
30
|
protected _search: string;
|
|
@@ -1,85 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
i18n: {
|
|
3
|
-
nb: {
|
|
4
|
-
contentPresentation: {
|
|
5
|
-
title: string;
|
|
6
|
-
description: string[];
|
|
7
|
-
buttons: {
|
|
8
|
-
accept: string;
|
|
9
|
-
reject: string;
|
|
10
|
-
settings: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
contentSettings: {
|
|
14
|
-
title: string;
|
|
15
|
-
description: string[];
|
|
16
|
-
buttons: {
|
|
17
|
-
back: string;
|
|
18
|
-
save: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
en: {
|
|
23
|
-
contentPresentation: {
|
|
24
|
-
title: string;
|
|
25
|
-
description: string[];
|
|
26
|
-
buttons: {
|
|
27
|
-
accept: string;
|
|
28
|
-
reject: string;
|
|
29
|
-
settings: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
contentSettings: {
|
|
33
|
-
title: string;
|
|
34
|
-
description: string[];
|
|
35
|
-
buttons: {
|
|
36
|
-
back: string;
|
|
37
|
-
save: string;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
cookies: ({
|
|
43
|
-
name: string;
|
|
44
|
-
defaultValue: null;
|
|
45
|
-
i18n: {
|
|
46
|
-
nb: {
|
|
47
|
-
title: string;
|
|
48
|
-
description: string;
|
|
49
|
-
buttons: {
|
|
50
|
-
yes: string;
|
|
51
|
-
no: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
en: {
|
|
55
|
-
title: string;
|
|
56
|
-
description: string;
|
|
57
|
-
buttons: {
|
|
58
|
-
yes: string;
|
|
59
|
-
no: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
} | {
|
|
64
|
-
name: string;
|
|
65
|
-
defaultValue: boolean;
|
|
66
|
-
i18n: {
|
|
67
|
-
nb: {
|
|
68
|
-
title: string;
|
|
69
|
-
description: string;
|
|
70
|
-
buttons: {
|
|
71
|
-
yes: string;
|
|
72
|
-
no: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
en: {
|
|
76
|
-
title: string;
|
|
77
|
-
description: string;
|
|
78
|
-
buttons: {
|
|
79
|
-
yes: string;
|
|
80
|
-
no: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
})[];
|
|
85
|
-
};
|
|
1
|
+
export { consentStrings } from '../../shared-strings/consent';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
2
|
import { Ref } from 'lit/directives/ref.js';
|
|
3
3
|
import { PktElement } from '../../base-elements/element';
|
|
4
|
-
import { IDatepickerStrings } from './datepicker-types';
|
|
5
4
|
import { TPktInputSize } from '../../shared-types/size';
|
|
6
5
|
/**
|
|
7
6
|
* Abstract base class for datepicker input components
|
|
@@ -10,7 +9,6 @@ import { TPktInputSize } from '../../shared-types/size';
|
|
|
10
9
|
* used by all three datepicker input types (single, multiple, range).
|
|
11
10
|
*
|
|
12
11
|
* Subclasses must implement:
|
|
13
|
-
* - `strings` property with component-specific defaults
|
|
14
12
|
* - `render()` method with component-specific template
|
|
15
13
|
*/
|
|
16
14
|
export declare abstract class PktDatepickerBase extends PktElement {
|
|
@@ -24,7 +22,6 @@ export declare abstract class PktDatepickerBase extends PktElement {
|
|
|
24
22
|
inputClasses: Record<string, boolean>;
|
|
25
23
|
inputSize: TPktInputSize;
|
|
26
24
|
internals?: ElementInternals;
|
|
27
|
-
abstract strings: IDatepickerStrings;
|
|
28
25
|
inputRef: Ref<HTMLInputElement>;
|
|
29
26
|
btnRef: Ref<HTMLButtonElement>;
|
|
30
27
|
get inputElement(): HTMLInputElement | undefined;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { PktDatepickerBase } from './datepicker-base';
|
|
2
|
-
import { IDatepickerStrings } from './datepicker-types';
|
|
3
2
|
export declare class PktDatepickerMultiple extends PktDatepickerBase {
|
|
4
3
|
value: string[];
|
|
5
4
|
maxlength?: number;
|
|
6
|
-
strings: IDatepickerStrings;
|
|
7
5
|
get isInputDisabled(): boolean;
|
|
8
6
|
private dispatchAddToSelected;
|
|
9
7
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Ref } from 'lit/directives/ref.js';
|
|
2
2
|
import { PktDatepickerBase } from './datepicker-base';
|
|
3
|
-
import { IDatepickerStrings } from './datepicker-types';
|
|
4
3
|
export declare class PktDatepickerRange extends PktDatepickerBase {
|
|
5
4
|
value: string[];
|
|
6
5
|
label: string;
|
|
7
6
|
showRangeLabels: boolean;
|
|
8
|
-
strings: IDatepickerStrings;
|
|
9
7
|
inputRefTo: Ref<HTMLInputElement>;
|
|
10
8
|
get inputElementTo(): HTMLInputElement | undefined;
|
|
11
9
|
render(): import('lit-html').TemplateResult<1>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PktDatepickerBase } from './datepicker-base';
|
|
2
|
-
import { IDatepickerStrings } from './datepicker-types';
|
|
3
2
|
export declare class PktDatepickerSingle extends PktDatepickerBase {
|
|
4
3
|
value: string;
|
|
5
|
-
strings: IDatepickerStrings;
|
|
6
4
|
private dispatchManageValidity;
|
|
7
5
|
render(): import('lit-html').TemplateResult<1>;
|
|
8
6
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'lit/directives/ref.js';
|
|
2
2
|
import { PktCalendar } from '../calendar/calendar';
|
|
3
|
+
import { TPktStrings } from '../../shared-strings';
|
|
3
4
|
/**
|
|
4
5
|
* Utility functions for PktDatepicker component
|
|
5
6
|
*
|
|
@@ -29,7 +30,7 @@ export declare const inputTypeUtils: {
|
|
|
29
30
|
export declare const formUtils: {
|
|
30
31
|
submitForm(element: HTMLElement): void;
|
|
31
32
|
submitFormOrFallback(internals: any, fallbackAction: () => void): void;
|
|
32
|
-
validateDateInput(input: HTMLInputElement, internals: any, min?: string | null, max?: string | null,
|
|
33
|
+
validateDateInput(input: HTMLInputElement, internals: any, min?: string | null, max?: string | null, messages?: Partial<TPktStrings["validation"]>): void;
|
|
33
34
|
};
|
|
34
35
|
/**
|
|
35
36
|
* Calendar interaction utilities
|
|
@@ -13,7 +13,8 @@ export declare abstract class PktFileUploadBase extends PktElement<IPktFileUploa
|
|
|
13
13
|
/** Expandable help text (dropdown) shown by `pkt-input-wrapper`. */
|
|
14
14
|
helptextDropdown: string;
|
|
15
15
|
/** Button label for expandable help text. */
|
|
16
|
-
|
|
16
|
+
/** @deprecated Bruk `strings={{ forms: { readMore: '…' } }}` eller `setPktStrings()`. */
|
|
17
|
+
helptextDropdownButton?: string;
|
|
17
18
|
/** Mark input as required in form strategy. */
|
|
18
19
|
required: boolean;
|
|
19
20
|
/** Allow selecting/dropping multiple files. */
|
|
@@ -55,11 +56,13 @@ export declare abstract class PktFileUploadBase extends PktElement<IPktFileUploa
|
|
|
55
56
|
/** Show "Valgfritt" tag in the input wrapper. */
|
|
56
57
|
optionalTag: boolean;
|
|
57
58
|
/** Label text for the optional tag. */
|
|
58
|
-
|
|
59
|
+
/** @deprecated Bruk `strings={{ forms: { optional: '…' } }}` eller `setPktStrings()`. */
|
|
60
|
+
optionalText?: string;
|
|
59
61
|
/** Show "Må fylles ut" tag in the input wrapper. */
|
|
60
62
|
requiredTag: boolean;
|
|
61
63
|
/** Label text for the required tag. */
|
|
62
|
-
|
|
64
|
+
/** @deprecated Bruk `strings={{ forms: { required: '…' } }}` eller `setPktStrings()`. */
|
|
65
|
+
requiredText?: string;
|
|
63
66
|
/** Extra tag next to the label. */
|
|
64
67
|
tagText: string | null;
|
|
65
68
|
/** Trailing characters to keep when middle-truncating long filenames. Set to `0` to disable. */
|
|
@@ -78,7 +81,7 @@ export declare abstract class PktFileUploadBase extends PktElement<IPktFileUploa
|
|
|
78
81
|
private thumbnailFileById;
|
|
79
82
|
private connectedForm;
|
|
80
83
|
private addedAnnouncementTimer;
|
|
81
|
-
private
|
|
84
|
+
private get requiredSelectionMessage();
|
|
82
85
|
protected get isControlled(): boolean;
|
|
83
86
|
/** True if the component itself wants to show an error (internal validation or external prop). */
|
|
84
87
|
protected get hasEffectiveError(): boolean;
|