@oslokommune/punkt-elements 19.8.0 → 19.10.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-CMCCpxtz.cjs +47 -0
- package/dist/{accordion-BJh6X1Ek.js → accordion-Cp2o6wTY.js} +10 -9
- package/dist/{alert-WME3geaX.js → alert-CAPiwi4F.js} +5 -5
- package/dist/{alert-CKqtC9AM.cjs → alert-QfloIr-o.cjs} +1 -1
- package/dist/{async-directive-BGoo_npW.cjs → async-directive-DpyKp6qv.cjs} +1 -1
- package/dist/{async-directive-DsdqP_X7.js → async-directive-yh8hG41Q.js} +2 -2
- package/dist/{backlink-BRqhwUr2.cjs → backlink-CsFeerTH.cjs} +1 -1
- package/dist/{backlink-BslFewn-.js → backlink-ogvv493Y.js} +3 -3
- package/dist/base-elements/input-element.d.ts +17 -0
- package/dist/base-elements/option-group-element.d.ts +61 -0
- package/dist/base-elements/polyfill-form-value.test.d.ts +0 -0
- package/dist/{breadcrumbs-Cr3GugPv.js → breadcrumbs-53QVnTFP.js} +2 -2
- package/dist/{breadcrumbs-DG4i5UCh.cjs → breadcrumbs-D03id_ha.cjs} +1 -1
- package/dist/{button-B78im4wB.js → button-CeRr7oIn.js} +5 -5
- package/dist/{button-BNVTj7nB.cjs → button-Dh97H-58.cjs} +1 -1
- package/dist/{calendar-TcxvS-1_.cjs → calendar-C5QwPrbk.cjs} +1 -1
- package/dist/{calendar-BLaRXUBl.js → calendar-D9w8M99G.js} +3 -3
- package/dist/{card-CaLEuumN.cjs → card--NuWdTbG.cjs} +1 -1
- package/dist/{card-CYKhPUNI.js → card-_PlgXmgZ.js} +6 -6
- package/dist/{checkbox-Tq8ESzwH.js → checkbox-G8k3vg85.js} +39 -35
- package/dist/checkbox-QIcdn09A.cjs +40 -0
- package/dist/checkbox-group-DoueGGi5.js +50 -0
- package/dist/checkbox-group-nLazAkcg.cjs +1 -0
- package/dist/checkbox-group.d.ts +1 -0
- package/dist/{class-map-C4hdfSfY.js → class-map-Bf-QzUpN.js} +1 -1
- package/dist/{class-map-Drv0_anQ.cjs → class-map-Bh6toDeV.cjs} +1 -1
- package/dist/{combobox-89Ohd1Oe.cjs → combobox-ClXhKwR9.cjs} +1 -1
- package/dist/{combobox-Cpb67TV0.js → combobox-Cz_rq7Mm.js} +13 -13
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/checkbox-group/checkbox-group-context.d.ts +5 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +15 -0
- package/dist/components/checkbox-group/checkbox-group.test.d.ts +0 -0
- package/dist/components/checkbox-group/index.d.ts +3 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/radio-group-context.d.ts +7 -0
- package/dist/components/radio-group/radio-group.d.ts +14 -0
- package/dist/components/radio-group/radio-group.test.d.ts +0 -0
- package/dist/components/radiobutton/index.d.ts +1 -0
- package/dist/components/radiobutton/radiobutton.d.ts +8 -2
- package/dist/{consent-CleJMbVH.js → consent-CZMxUavj.js} +2 -2
- package/dist/{consent-Dl-R0iC3.cjs → consent-DimzcQxt.cjs} +1 -1
- package/dist/consume-Bp12si68.js +61 -0
- package/dist/consume-kEjgTrAp.cjs +1 -0
- package/dist/{datepicker-DBEKa1aJ.js → datepicker-C7ABsx7H.js} +12 -12
- package/dist/{datepicker-B9NCJX4o.cjs → datepicker-usIF9WY7.cjs} +2 -2
- package/dist/{directive-helpers-BRrz3Bcj.cjs → directive-helpers-Bv70GjQh.cjs} +1 -1
- package/dist/{directive-helpers-D96YEsht.js → directive-helpers-CwxFepWh.js} +1 -1
- package/dist/directives/slot-content.d.ts +4 -3
- package/dist/docs/components/checkbox-group.d.ts +13 -0
- package/dist/docs/components/radio-group.d.ts +13 -0
- package/dist/{element-BOmr9YLv.cjs → element-C6WTyJFE.cjs} +1 -1
- package/dist/{element-mwwC2Rra.js → element-DBugHPKM.js} +1 -0
- package/dist/{element-with-slot-DQv0cbbD.js → element-with-slot-DDLS-aLw.js} +6 -3
- package/dist/element-with-slot-DhiAuSjM.cjs +1 -0
- package/dist/{fileupload-2YAbjYuU.cjs → fileupload-2uTFjd81.cjs} +1 -1
- package/dist/{fileupload-DqWCXMPz.js → fileupload-BR9H6fET.js} +8 -8
- package/dist/{footer-DdLls3F-.js → footer-B3DMvo8-.js} +4 -4
- package/dist/{footer-vy9NqT65.cjs → footer-CyxRYvT-.cjs} +1 -1
- package/dist/{header-Dp0Lq7wS.js → header-BKeSkfB7.js} +11 -11
- package/dist/{header-9Y6Q6Cfq.cjs → header-Drj3lTrv.cjs} +1 -1
- package/dist/{header-menu-BfkCp8jw.cjs → header-menu-B_5hCNUl.cjs} +1 -1
- package/dist/{header-menu-ANj5nL2M.js → header-menu-buYE90FU.js} +4 -4
- package/dist/{heading-zoz-QZJ9.cjs → heading-DUYOvlxs.cjs} +1 -1
- package/dist/{heading-CUrZvkrM.js → heading-WBB5MO9i.js} +2 -2
- package/dist/{helptext-BCkwSz1m.cjs → helptext-C7cyihnu.cjs} +1 -1
- package/dist/{helptext-DCT_9dw1.js → helptext-DadLkcoO.js} +4 -4
- package/dist/{icon-JigbxxF7.js → icon-Bao96Zb8.js} +1 -1
- package/dist/{icon-Dnv6LtPC.cjs → icon-jPhyZD1z.cjs} +1 -1
- package/dist/if-defined-CiML3MTM.cjs +1 -0
- package/dist/{if-defined-Bebu3LXY.js → if-defined-O59_I-e-.js} +1 -1
- package/dist/{input-element-lLzfwdim.js → input-element-BBygBEei.js} +54 -17
- package/dist/input-element-C4SelHLD.cjs +1 -0
- package/dist/{input-wrapper-CTMf4kCK.cjs → input-wrapper-BT6B3Kco.cjs} +6 -2
- package/dist/{input-wrapper-C9K-_7g-.js → input-wrapper-DrSCuw6U.js} +12 -8
- package/dist/{link-LO_5_La8.cjs → link-CEP7w1et.cjs} +1 -1
- package/dist/{link-CmZwAw5u.js → link-CVnIn74-.js} +4 -4
- package/dist/{linkcard-UKsxADrP.cjs → linkcard-D8vitdrQ.cjs} +1 -1
- package/dist/{linkcard-CQluSyJJ.js → linkcard-IWiVvRKy.js} +4 -4
- package/dist/{listbox-Ct9jIV_5.js → listbox-BDesthOp.js} +4 -4
- package/dist/{listbox-g-vHHLkD.cjs → listbox-CvduK_YU.cjs} +1 -1
- package/dist/{loader-C_PH05aw.cjs → loader-B0hFoBtF.cjs} +1 -1
- package/dist/{loader-DzctJ9jW.js → loader-CAsUPHjl.js} +4 -4
- package/dist/{messagebox-D17GYxb9.js → messagebox-6_iNN5F3.js} +4 -4
- package/dist/{messagebox-X01V2l_N.cjs → messagebox-C19L2Duq.cjs} +1 -1
- package/dist/{modal-BymjMIJi.cjs → modal-CoEPzt4p.cjs} +1 -1
- package/dist/{modal-CELmA0-8.js → modal-D7MolBXb.js} +5 -5
- package/dist/option-group-element-BIuotbRu.js +135 -0
- package/dist/option-group-element-BYS7s-is.cjs +23 -0
- 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-group.cjs +1 -0
- package/dist/pkt-checkbox-group.js +2 -0
- 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 +37 -35
- 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-CpEZcomb.cjs → pkt-options-controller-B3vVKnAG.cjs} +1 -1
- package/dist/{pkt-options-controller-D7l18Iw0.js → pkt-options-controller-ClFrUWZK.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +1 -1
- package/dist/pkt-radio-group.cjs +1 -0
- package/dist/pkt-radio-group.js +2 -0
- 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-CIXNSwTy.cjs → progressbar-CnX4fFfR.cjs} +1 -1
- package/dist/{progressbar-DH5lIBpx.js → progressbar-DZHiq7B0.js} +5 -5
- package/dist/provide-Cz18sYug.cjs +1 -0
- package/dist/provide-_MnlMGnw.js +111 -0
- package/dist/radio-group-BzV_JhgJ.js +52 -0
- package/dist/radio-group-C-8C0-Py.cjs +1 -0
- package/dist/radio-group.d.ts +1 -0
- package/dist/radiobutton-_089zFBB.cjs +38 -0
- package/dist/radiobutton-bkTAD5PV.js +108 -0
- package/dist/{ref-Emu5PNxk.cjs → ref-CB7e9nMY.cjs} +1 -1
- package/dist/{ref-CCSGk4MP.js → ref-y_5qv9vU.js} +2 -2
- package/dist/{repeat-CdxGS-_3.js → repeat-CV9S4zya.js} +2 -2
- package/dist/{repeat-Dh9YKoeV.cjs → repeat-CnnigVcj.cjs} +1 -1
- package/dist/{searchinput-Co8tcq-l.js → searchinput-Bkcr3Fby.js} +4 -4
- package/dist/{searchinput-CbClDE-d.cjs → searchinput-Mdc9Ihld.cjs} +1 -1
- package/dist/{select-Cz80KV3g.js → select-B6CN2Ymq.js} +7 -7
- package/dist/{select-CZk57p1_.cjs → select-BowvpCNa.cjs} +1 -1
- package/dist/shared-strings/nb.d.ts +1 -0
- package/dist/shared-types/index.d.ts +6 -2
- package/dist/shared-types/option-group.d.ts +50 -0
- package/dist/shared-types/radiobutton.d.ts +46 -0
- package/dist/{tabs-B8blHQrL.js → tabs-DZvtVA0y.js} +9 -8
- package/dist/tabs-Dm8xcPRs.cjs +40 -0
- package/dist/{tag-Bns7Xj1O.js → tag-C33BPIOm.js} +5 -5
- package/dist/{tag-B5dUg7AD.cjs → tag-DyVZrqOQ.cjs} +1 -1
- package/dist/tests/component-registry.d.ts +4 -0
- package/dist/tests/option-contexts.d.ts +7 -0
- package/dist/{textarea-Dwjx-Crl.cjs → textarea-DoH3Il8v.cjs} +1 -1
- package/dist/{textarea-Dfvx1I60.js → textarea-hW0kV5gj.js} +9 -9
- package/dist/{textinput-7zTPlXVj.js → textinput-B6G4dVuL.js} +8 -8
- package/dist/{textinput-BeraGRzb.cjs → textinput-CQknclmV.cjs} +1 -1
- package/dist/{timepicker-C0dSH4Ij.js → timepicker-Cd2QI6ua.js} +8 -8
- package/dist/{timepicker-DarB9eA6.cjs → timepicker-DB3gor6g.cjs} +1 -1
- package/package.json +2 -2
- package/src/components/checkbox/checkbox.test.ts +99 -0
- package/src/components/checkbox/checkbox.ts +14 -5
- package/src/components/checkbox-group/checkbox-group-context.ts +8 -0
- package/src/components/checkbox-group/checkbox-group.test.ts +406 -0
- package/src/components/checkbox-group/checkbox-group.ts +69 -0
- package/src/components/checkbox-group/index.ts +4 -0
- package/src/components/combobox/combobox.ts +1 -1
- package/src/components/datepicker/datepicker.ts +1 -1
- package/src/components/index.ts +3 -0
- package/src/components/input-wrapper/input-wrapper.ts +5 -1
- package/src/components/input-wrapper/wrapper-parity.test.ts +27 -2
- package/src/components/radio-group/index.ts +4 -0
- package/src/components/radio-group/radio-group-context.ts +8 -0
- package/src/components/radio-group/radio-group.test.ts +530 -0
- package/src/components/radio-group/radio-group.ts +65 -0
- package/src/components/radiobutton/index.ts +1 -0
- package/src/components/radiobutton/radiobutton.test.ts +95 -0
- package/src/components/radiobutton/radiobutton.ts +26 -11
- package/dist/accordion-5lSFQToJ.cjs +0 -47
- package/dist/checkbox-D69leWDh.cjs +0 -40
- package/dist/consume-BDnMAp2g.js +0 -167
- package/dist/consume-Le4HztPo.cjs +0 -1
- package/dist/element-with-slot-D7sTqOr3.cjs +0 -1
- package/dist/if-defined-2mkIDgOm.cjs +0 -1
- package/dist/input-element-CSfDGslx.cjs +0 -1
- package/dist/radiobutton-BPr22VmL.cjs +0 -38
- package/dist/radiobutton-l_3oGDbb.js +0 -97
- package/dist/tabs-CjX-GWvM.cjs +0 -40
package/dist/pkt-select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./select-
|
|
1
|
+
import { n as e, t } from "./select-B6CN2Ymq.js";
|
|
2
2
|
export { e as PktSelect, t as default };
|
package/dist/pkt-tabs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-Dm8xcPRs.cjs");exports.PktTabItem=e.n,exports.PktTabs=e.r,exports.default=e.t;
|
package/dist/pkt-tabs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./tabs-
|
|
1
|
+
import { n as e, r as t, t as n } from "./tabs-DZvtVA0y.js";
|
|
2
2
|
export { e as PktTabItem, t as PktTabs, n as default };
|
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-DyVZrqOQ.cjs");exports.PktTag=e.n,exports.default=e.t;
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./tag-
|
|
1
|
+
import { n as e, t } from "./tag-C33BPIOm.js";
|
|
2
2
|
export { e as PktTag, t as default };
|
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-DoH3Il8v.cjs");exports.PktTextarea=e.n,exports.default=e.t;
|
package/dist/pkt-textarea.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./textarea-
|
|
1
|
+
import { n as e, t } from "./textarea-hW0kV5gj.js";
|
|
2
2
|
export { e as PktTextarea, t as default };
|
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-CQknclmV.cjs");exports.PktTextinput=e.n,exports.default=e.t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./textinput-
|
|
1
|
+
import { n as e, t } from "./textinput-B6G4dVuL.js";
|
|
2
2
|
export { e as PktTextinput, t as default };
|
package/dist/pkt-timepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-DB3gor6g.cjs");exports.PktTimepicker=e.t;
|
package/dist/pkt-timepicker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./timepicker-
|
|
1
|
+
import { t as e } from "./timepicker-Cd2QI6ua.js";
|
|
2
2
|
export { e as PktTimepicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./class-map-Bh6toDeV.cjs");require("./icon-jPhyZD1z.cjs");const n=require("./if-defined-CiML3MTM.cjs"),r=require("./ref-CB7e9nMY.cjs"),i=require("./utils-63cRpWut.cjs");var a=`important`,o=` !`+a,s=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.ATTRIBUTE||t.name!==`style`||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r==null?t:t+`${n=n.includes(`-`)?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,`-$&`).toLowerCase()}:${r};`},``)}update(t,[n]){let{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(n)),this.render(n);for(let e of this.ft)n[e]??(this.ft.delete(e),e.includes(`-`)?r.removeProperty(e):r[e]=null);for(let e in n){let t=n[e];if(t!=null){this.ft.add(e);let n=typeof t==`string`&&t.endsWith(o);e.includes(`-`)||n?r.setProperty(e,n?t.slice(0,-11):t,n?a:``):r[e]=t}}return e.g}}),c=class extends e.t{constructor(){super(),this.ariaLabel=null,this.ariaLabelledby=null,this.ariaValueText=null,this.ariaLive=`polite`,this.id=i.n(),this.role=`progressbar`,this.skin=`dark-blue`,this.statusPlacement=`following`,this.statusType=`none`,this.title=``,this.titlePosition=`left`,this.valueCurrent=0,this.valueMax=100,this.valueMin=0,this.labelWidth=0,this.progressbarId=this.id,this.resolvedRole=`progressbar`,this.labelRef=r.t(),this.progressBarRef=r.t()}willUpdate(e){super.willUpdate(e),this.id&&(this.progressbarId=this.id);let t=this.getAttribute(`role`);t?(this.resolvedRole=t,this.removeAttribute(`role`)):this.role&&(this.resolvedRole=this.role)}updated(e){super.updated(e),e.has(`valueCurrent`)&&this.labelRef.value&&(this.labelWidth=this.labelRef.value.getBoundingClientRect().width||0)}render(){let i=this.statusType!==`none`,a=this.valueMax-this.valueMin,o=this.valueCurrent/a*100,c=this.statusType===`fraction`?Math.round(o):Math.round((this.valueCurrent-this.valueMin)/(this.valueMax-this.valueMin)*100),l=`${this.valueCurrent} av ${a}`,u=this.statusType===`fraction`&&!this.ariaValueText?`${this.valueCurrent} av ${this.valueMax-this.valueMin}`:this.ariaValueText||``,d=this.ariaLabel?void 0:this.ariaLabelledby||`${this.progressbarId}-title`,f=t.t({"pkt-progressbar__bar":!0,[`pkt-progressbar__bar--${this.skin}`]:!!this.skin}),p=t.t({"pkt-progressbar__title":!0,"pkt-progressbar__title-center":this.titlePosition===`center`}),m=t.t({"pkt-progressbar__status":!0,"pkt-progressbar__status--center":this.statusPlacement===`center`}),h=t.t({"pkt-progressbar__status-placement--following":this.statusPlacement===`following`,"pkt-progressbar__status-placement--center":this.statusPlacement===`center`,"pkt-progressbar__status-placement--left":this.statusPlacement===`left`});return e._`<div
|
|
2
2
|
${r.n(this.progressBarRef)}
|
|
3
3
|
role=${this.resolvedRole}
|
|
4
4
|
aria-live=${n.t(this.ariaLive||void 0)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, t as l, u } from "./element-
|
|
2
|
-
import { t as d } from "./class-map-
|
|
3
|
-
import "./icon-
|
|
4
|
-
import { t as f } from "./if-defined-
|
|
5
|
-
import { n as p, t as m } from "./ref-
|
|
1
|
+
import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, t as l, u } from "./element-DBugHPKM.js";
|
|
2
|
+
import { t as d } from "./class-map-Bf-QzUpN.js";
|
|
3
|
+
import "./icon-Bao96Zb8.js";
|
|
4
|
+
import { t as f } from "./if-defined-O59_I-e-.js";
|
|
5
|
+
import { n as p, t as m } from "./ref-y_5qv9vU.js";
|
|
6
6
|
import { n as h } from "./utils-BwF4QSrq.js";
|
|
7
7
|
//#region ../../node_modules/lit-html/directives/style-map.js
|
|
8
8
|
var g = "important", _ = " !" + g, v = n(class extends c {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./consume-kEjgTrAp.cjs");var t=class{get value(){return this.o}set value(e){this.setValue(e)}setValue(e,t=!1){let n=t||!Object.is(e,this.o);this.o=e,n&&this.updateObservers()}constructor(e){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:t}]of this.subscriptions)e(this.o,t)},e!==void 0&&(this.value=e)}addCallback(e,t,n){if(!n)return void e(this.value);this.subscriptions.has(e)||this.subscriptions.set(e,{disposer:()=>{this.subscriptions.delete(e)},consumerHost:t});let{disposer:r}=this.subscriptions.get(e);e(this.value,r)}clearCallbacks(){this.subscriptions.clear()}},n=class extends Event{constructor(e,t){super(`context-provider`,{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}},r=class extends t{constructor(t,n,r){super(n.context===void 0?r:n.initialValue),this.onContextRequest=e=>{if(e.context!==this.context)return;let t=e.contextTarget??e.composedPath()[0];t!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,t,e.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context||(t.contextTarget??t.composedPath()[0])===this.host)return;let n=new Set;for(let[t,{consumerHost:r}]of this.subscriptions)n.has(t)||(n.add(t),r.dispatchEvent(new e.r(this.context,r,t,!0)));t.stopPropagation()},this.host=t,this.context=n.context===void 0?n:n.context,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener(`context-request`,this.onContextRequest),this.host.addEventListener(`context-provider`,this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new n(this.context,this.host))}};function i({context:e}){return(t,n)=>{let i=new WeakMap;if(typeof n==`object`)return{get(){return t.get.call(this)},set(e){return i.get(this).setValue(e),t.set.call(this,e)},init(t){return i.set(this,new r(this,{context:e,initialValue:t})),t}};{t.constructor.addInitializer((t=>{i.set(t,new r(t,{context:e}))}));let a=Object.getOwnPropertyDescriptor(t,n),o;if(a===void 0){let e=new WeakMap;o={get(){return e.get(this)},set(t){i.get(this).setValue(t),e.set(this,t)},configurable:!0,enumerable:!0}}else{let e=a.set;o={...a,set(t){i.get(this).setValue(t),e?.call(this,t)}}}Object.defineProperty(t,n,o);return}}}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { r as e } from "./consume-Bp12si68.js";
|
|
2
|
+
//#region ../../node_modules/@lit/context/lib/value-notifier.js
|
|
3
|
+
var t = class {
|
|
4
|
+
get value() {
|
|
5
|
+
return this.o;
|
|
6
|
+
}
|
|
7
|
+
set value(e) {
|
|
8
|
+
this.setValue(e);
|
|
9
|
+
}
|
|
10
|
+
setValue(e, t = !1) {
|
|
11
|
+
let n = t || !Object.is(e, this.o);
|
|
12
|
+
this.o = e, n && this.updateObservers();
|
|
13
|
+
}
|
|
14
|
+
constructor(e) {
|
|
15
|
+
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
16
|
+
for (let [e, { disposer: t }] of this.subscriptions) e(this.o, t);
|
|
17
|
+
}, e !== void 0 && (this.value = e);
|
|
18
|
+
}
|
|
19
|
+
addCallback(e, t, n) {
|
|
20
|
+
if (!n) return void e(this.value);
|
|
21
|
+
this.subscriptions.has(e) || this.subscriptions.set(e, {
|
|
22
|
+
disposer: () => {
|
|
23
|
+
this.subscriptions.delete(e);
|
|
24
|
+
},
|
|
25
|
+
consumerHost: t
|
|
26
|
+
});
|
|
27
|
+
let { disposer: r } = this.subscriptions.get(e);
|
|
28
|
+
e(this.value, r);
|
|
29
|
+
}
|
|
30
|
+
clearCallbacks() {
|
|
31
|
+
this.subscriptions.clear();
|
|
32
|
+
}
|
|
33
|
+
}, n = class extends Event {
|
|
34
|
+
constructor(e, t) {
|
|
35
|
+
super("context-provider", {
|
|
36
|
+
bubbles: !0,
|
|
37
|
+
composed: !0
|
|
38
|
+
}), this.context = e, this.contextTarget = t;
|
|
39
|
+
}
|
|
40
|
+
}, r = class extends t {
|
|
41
|
+
constructor(t, n, r) {
|
|
42
|
+
super(n.context === void 0 ? r : n.initialValue), this.onContextRequest = (e) => {
|
|
43
|
+
if (e.context !== this.context) return;
|
|
44
|
+
let t = e.contextTarget ?? e.composedPath()[0];
|
|
45
|
+
t !== this.host && (e.stopPropagation(), this.addCallback(e.callback, t, e.subscribe));
|
|
46
|
+
}, this.onProviderRequest = (t) => {
|
|
47
|
+
if (t.context !== this.context || (t.contextTarget ?? t.composedPath()[0]) === this.host) return;
|
|
48
|
+
let n = /* @__PURE__ */ new Set();
|
|
49
|
+
for (let [t, { consumerHost: r }] of this.subscriptions) n.has(t) || (n.add(t), r.dispatchEvent(new e(this.context, r, t, !0)));
|
|
50
|
+
t.stopPropagation();
|
|
51
|
+
}, this.host = t, this.context = n.context === void 0 ? n : n.context, this.attachListeners(), this.host.addController?.(this);
|
|
52
|
+
}
|
|
53
|
+
attachListeners() {
|
|
54
|
+
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
55
|
+
}
|
|
56
|
+
hostConnected() {
|
|
57
|
+
this.host.dispatchEvent(new n(this.context, this.host));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region ../../node_modules/@lit/context/lib/decorators/provide.js
|
|
62
|
+
function i({ context: e }) {
|
|
63
|
+
return (t, n) => {
|
|
64
|
+
let i = /* @__PURE__ */ new WeakMap();
|
|
65
|
+
if (typeof n == "object") return {
|
|
66
|
+
get() {
|
|
67
|
+
return t.get.call(this);
|
|
68
|
+
},
|
|
69
|
+
set(e) {
|
|
70
|
+
return i.get(this).setValue(e), t.set.call(this, e);
|
|
71
|
+
},
|
|
72
|
+
init(t) {
|
|
73
|
+
return i.set(this, new r(this, {
|
|
74
|
+
context: e,
|
|
75
|
+
initialValue: t
|
|
76
|
+
})), t;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
{
|
|
80
|
+
t.constructor.addInitializer(((t) => {
|
|
81
|
+
i.set(t, new r(t, { context: e }));
|
|
82
|
+
}));
|
|
83
|
+
let a = Object.getOwnPropertyDescriptor(t, n), o;
|
|
84
|
+
if (a === void 0) {
|
|
85
|
+
let e = /* @__PURE__ */ new WeakMap();
|
|
86
|
+
o = {
|
|
87
|
+
get() {
|
|
88
|
+
return e.get(this);
|
|
89
|
+
},
|
|
90
|
+
set(t) {
|
|
91
|
+
i.get(this).setValue(t), e.set(this, t);
|
|
92
|
+
},
|
|
93
|
+
configurable: !0,
|
|
94
|
+
enumerable: !0
|
|
95
|
+
};
|
|
96
|
+
} else {
|
|
97
|
+
let e = a.set;
|
|
98
|
+
o = {
|
|
99
|
+
...a,
|
|
100
|
+
set(t) {
|
|
101
|
+
i.get(this).setValue(t), e?.call(this, t);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
Object.defineProperty(t, n, o);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { i as t };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { d as e, l as t, n, u as r } from "./element-DBugHPKM.js";
|
|
2
|
+
import { r as i } from "./radiobutton-bkTAD5PV.js";
|
|
3
|
+
import { i as a, n as o, t as s } from "./option-group-element-BIuotbRu.js";
|
|
4
|
+
import { t as c } from "./provide-_MnlMGnw.js";
|
|
5
|
+
//#region src/components/radio-group/radio-group.ts
|
|
6
|
+
var l = class extends s {
|
|
7
|
+
constructor(...e) {
|
|
8
|
+
super(...e), this.optionSelector = "pkt-radiobutton", this.groupContext = {
|
|
9
|
+
name: "",
|
|
10
|
+
hasTile: !1,
|
|
11
|
+
hasError: !1,
|
|
12
|
+
required: !1
|
|
13
|
+
}, this.storedValue = null;
|
|
14
|
+
}
|
|
15
|
+
get value() {
|
|
16
|
+
let e = this.options().find(o);
|
|
17
|
+
return e ? a(e) : "";
|
|
18
|
+
}
|
|
19
|
+
set value(e) {
|
|
20
|
+
let t = this.value;
|
|
21
|
+
this.storedValue = e ?? "", this.applyStoredValue(this.options()), this.requestUpdate("value", t);
|
|
22
|
+
}
|
|
23
|
+
get hasStoredValue() {
|
|
24
|
+
return this.storedValue !== null;
|
|
25
|
+
}
|
|
26
|
+
storeCurrentValue() {
|
|
27
|
+
this.storedValue = this.value;
|
|
28
|
+
}
|
|
29
|
+
applyStoredValue(e) {
|
|
30
|
+
e.forEach((e) => {
|
|
31
|
+
let t = this.storedValue !== "" && a(e) === this.storedValue;
|
|
32
|
+
o(e) !== t && (e.checked = t);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
createGroupContext() {
|
|
36
|
+
return {
|
|
37
|
+
...super.createGroupContext(),
|
|
38
|
+
required: this.required
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
n([c({ context: i }), t()], l.prototype, "groupContext", void 0), n([r({ type: String })], l.prototype, "value", null);
|
|
43
|
+
try {
|
|
44
|
+
e("pkt-radio-group")(l);
|
|
45
|
+
} catch {
|
|
46
|
+
console.warn("Forsøker å definere <pkt-radio-group>, men den er allerede definert");
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/components/radio-group/index.ts
|
|
50
|
+
var u = l;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { l as n, u as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./radiobutton-_089zFBB.cjs"),n=require("./option-group-element-BYS7s-is.cjs"),r=require("./provide-Cz18sYug.cjs");var i=class extends n.t{constructor(...e){super(...e),this.optionSelector=`pkt-radiobutton`,this.groupContext={name:``,hasTile:!1,hasError:!1,required:!1},this.storedValue=null}get value(){let e=this.options().find(n.n);return e?n.i(e):``}set value(e){let t=this.value;this.storedValue=e??``,this.applyStoredValue(this.options()),this.requestUpdate(`value`,t)}get hasStoredValue(){return this.storedValue!==null}storeCurrentValue(){this.storedValue=this.value}applyStoredValue(e){e.forEach(e=>{let t=this.storedValue!==``&&n.i(e)===this.storedValue;n.n(e)!==t&&(e.checked=t)})}createGroupContext(){return{...super.createGroupContext(),required:this.required}}};e.n([r.t({context:t.r}),e.l()],i.prototype,`groupContext`,void 0),e.n([e.u({type:String})],i.prototype,`value`,null);try{e.d(`pkt-radio-group`)(i)}catch{console.warn(`Forsøker å definere <pkt-radio-group>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./class-map-Bh6toDeV.cjs"),n=require("./consume-kEjgTrAp.cjs"),r=require("./ref-CB7e9nMY.cjs"),i=require("./input-element-C4SelHLD.cjs");var a={defaultChecked:!1,hasTile:!1,disabled:!1,hasError:!1,requiredTag:!1,optionalTag:!1},o=n.n(Symbol(`pkt-radio-group-context`)),s=class extends i.t{constructor(...e){super(...e),this.inputRef=r.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=a.defaultChecked,this.hasTile=a.hasTile,this.checked=null,this.type=`radio`,this.inputSize=void 0,this.tagText=null,this.optionalTag=a.optionalTag,this.requiredTag=a.requiredTag,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let n=this.hasTile||!!this.groupContext?.hasTile,i=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":n,"pkt-input-check__input--tile-disabled":this.isDisabled&&n}),a=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError||!!this.groupContext?.hasError}),o=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.isDisabled,"pkt-sr-only":this.hideLabel}),s=`pkt-tag pkt-tag--small pkt-tag--thin-text`,c=this.pktStrings.get(`forms`),l=()=>e._`
|
|
2
|
+
${this.tagText?e._`<span class=${s+` pkt-tag--gray`}>${this.tagText}</span>`:e.h}
|
|
3
|
+
${this.optionalTag?e._`<span class=${s+` pkt-tag--blue-light`}
|
|
4
|
+
>${this.optionalText??c.optional}</span
|
|
5
|
+
>`:e.h}
|
|
6
|
+
${this.requiredTag?e._`<span class=${s+` pkt-tag--beige`}
|
|
7
|
+
>${this.requiredText??c.required}</span
|
|
8
|
+
>`:e.h}
|
|
9
|
+
`,u=this.id+`-check-label`,d=this.id+`-check-helptext`;return e._`
|
|
10
|
+
<div class="pkt-input-check${this.inputSize?` pkt-input-check--${this.inputSize}`:``}">
|
|
11
|
+
<div class=${i}>
|
|
12
|
+
<input
|
|
13
|
+
id=${this.id+`-internal`}
|
|
14
|
+
class=${a}
|
|
15
|
+
type="radio"
|
|
16
|
+
?disabled=${this.isDisabled}
|
|
17
|
+
form=""
|
|
18
|
+
name=${this.internalName}
|
|
19
|
+
${r.n(this.inputRef)}
|
|
20
|
+
@change=${this.toggleChecked}
|
|
21
|
+
@input=${this.handleInput}
|
|
22
|
+
@blur=${this.onBlur}
|
|
23
|
+
@focus=${this.onFocus}
|
|
24
|
+
?checked=${this.checked}
|
|
25
|
+
aria-labelledby=${this.label?u:e.h}
|
|
26
|
+
aria-describedby=${this.checkHelptext?d:e.h}
|
|
27
|
+
/>
|
|
28
|
+
${e._`
|
|
29
|
+
<label class=${o} for=${this.id+`-internal`}>
|
|
30
|
+
<span id=${u}>${this.label} ${l()}</span>
|
|
31
|
+
${this.checkHelptext?e._`<div id=${d} class="pkt-input-check__input-helptext">
|
|
32
|
+
${this.checkHelptext}
|
|
33
|
+
</div>`:e.h}
|
|
34
|
+
</label>
|
|
35
|
+
`}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
`}handleInput(e){e.stopImmediatePropagation()}toggleChecked(e=null){e&&e.preventDefault(),e&&e.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this._checked=this.inputRef.value.matches(`:checked`),this.valueChecked(this._checked))}};e.n([e.u({type:String,reflect:!0})],s.prototype,`value`,void 0),e.n([e.u({type:String})],s.prototype,`checkHelptext`,void 0),e.n([e.u({type:Boolean})],s.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],s.prototype,`hasTile`,void 0),e.n([e.u({type:Boolean,reflect:!0})],s.prototype,`checked`,void 0),e.n([e.u({type:String,reflect:!0})],s.prototype,`type`,void 0),e.n([e.u({type:String,attribute:`input-size`})],s.prototype,`inputSize`,void 0),e.n([e.u({type:String})],s.prototype,`tagText`,void 0),e.n([e.u({type:Boolean})],s.prototype,`optionalTag`,void 0),e.n([e.u({type:String})],s.prototype,`optionalText`,void 0),e.n([e.u({type:Boolean})],s.prototype,`requiredTag`,void 0),e.n([e.u({type:String})],s.prototype,`requiredText`,void 0),e.n([e.l()],s.prototype,`_checked`,void 0),e.n([n.t({context:o,subscribe:!0}),e.l()],s.prototype,`groupContext`,void 0);try{e.d(`pkt-radiobutton`)(s)}catch{console.warn(`Forsøker å definere <pkt-radiobutton>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DBugHPKM.js";
|
|
2
|
+
import { t as o } from "./class-map-Bf-QzUpN.js";
|
|
3
|
+
import { n as s, t as c } from "./consume-Bp12si68.js";
|
|
4
|
+
import { n as l, t as u } from "./ref-y_5qv9vU.js";
|
|
5
|
+
import { t as d } from "./input-element-BBygBEei.js";
|
|
6
|
+
//#region ../../shared-types/radiobutton.ts
|
|
7
|
+
var f = {
|
|
8
|
+
defaultChecked: !1,
|
|
9
|
+
hasTile: !1,
|
|
10
|
+
disabled: !1,
|
|
11
|
+
hasError: !1,
|
|
12
|
+
requiredTag: !1,
|
|
13
|
+
optionalTag: !1
|
|
14
|
+
}, p = s(Symbol("pkt-radio-group-context")), m = class extends d {
|
|
15
|
+
constructor(...e) {
|
|
16
|
+
super(...e), this.inputRef = u(), this.value = "", this.checkHelptext = null, this.defaultChecked = f.defaultChecked, this.hasTile = f.hasTile, this.checked = null, this.type = "radio", this.inputSize = void 0, this.tagText = null, this.optionalTag = f.optionalTag, this.requiredTag = f.requiredTag, this._checked = !1;
|
|
17
|
+
}
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
super.connectedCallback();
|
|
20
|
+
}
|
|
21
|
+
attributeChangedCallback(e, t, n) {
|
|
22
|
+
e === "checked" && (this._checked = this.checked === "" || this.checked === "true" || this.checked === !0), super.attributeChangedCallback(e, t, n);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
let t = this.hasTile || !!this.groupContext?.hasTile, r = o({
|
|
26
|
+
"pkt-input-check__input": !0,
|
|
27
|
+
"pkt-input-check__input--tile": t,
|
|
28
|
+
"pkt-input-check__input--tile-disabled": this.isDisabled && t
|
|
29
|
+
}), i = o({
|
|
30
|
+
"pkt-input-check__input-checkbox": !0,
|
|
31
|
+
"pkt-input-check__input-checkbox--error": this.hasError || !!this.groupContext?.hasError
|
|
32
|
+
}), a = o({
|
|
33
|
+
"pkt-input-check__input-label": !0,
|
|
34
|
+
"pkt-input-check__input-label--disabled": this.isDisabled,
|
|
35
|
+
"pkt-sr-only": this.hideLabel
|
|
36
|
+
}), s = "pkt-tag pkt-tag--small pkt-tag--thin-text", c = this.pktStrings.get("forms"), u = () => e`
|
|
37
|
+
${this.tagText ? e`<span class=${s + " pkt-tag--gray"}>${this.tagText}</span>` : n}
|
|
38
|
+
${this.optionalTag ? e`<span class=${s + " pkt-tag--blue-light"}
|
|
39
|
+
>${this.optionalText ?? c.optional}</span
|
|
40
|
+
>` : n}
|
|
41
|
+
${this.requiredTag ? e`<span class=${s + " pkt-tag--beige"}
|
|
42
|
+
>${this.requiredText ?? c.required}</span
|
|
43
|
+
>` : n}
|
|
44
|
+
`, d = this.id + "-check-label", f = this.id + "-check-helptext";
|
|
45
|
+
return e`
|
|
46
|
+
<div class="pkt-input-check${this.inputSize ? ` pkt-input-check--${this.inputSize}` : ""}">
|
|
47
|
+
<div class=${r}>
|
|
48
|
+
<input
|
|
49
|
+
id=${this.id + "-internal"}
|
|
50
|
+
class=${i}
|
|
51
|
+
type="radio"
|
|
52
|
+
?disabled=${this.isDisabled}
|
|
53
|
+
form=""
|
|
54
|
+
name=${this.internalName}
|
|
55
|
+
${l(this.inputRef)}
|
|
56
|
+
@change=${this.toggleChecked}
|
|
57
|
+
@input=${this.handleInput}
|
|
58
|
+
@blur=${this.onBlur}
|
|
59
|
+
@focus=${this.onFocus}
|
|
60
|
+
?checked=${this.checked}
|
|
61
|
+
aria-labelledby=${this.label ? d : n}
|
|
62
|
+
aria-describedby=${this.checkHelptext ? f : n}
|
|
63
|
+
/>
|
|
64
|
+
${e`
|
|
65
|
+
<label class=${a} for=${this.id + "-internal"}>
|
|
66
|
+
<span id=${d}>${this.label} ${u()}</span>
|
|
67
|
+
${this.checkHelptext ? e`<div id=${f} class="pkt-input-check__input-helptext">
|
|
68
|
+
${this.checkHelptext}
|
|
69
|
+
</div>` : n}
|
|
70
|
+
</label>
|
|
71
|
+
`}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
handleInput(e) {
|
|
77
|
+
e.stopImmediatePropagation();
|
|
78
|
+
}
|
|
79
|
+
toggleChecked(e = null) {
|
|
80
|
+
e && e.preventDefault(), e && e.stopImmediatePropagation(), this.touched = !0, this.inputRef.value && (this._checked = this.inputRef.value.matches(":checked"), this.valueChecked(this._checked));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
i([a({
|
|
84
|
+
type: String,
|
|
85
|
+
reflect: !0
|
|
86
|
+
})], m.prototype, "value", void 0), i([a({ type: String })], m.prototype, "checkHelptext", void 0), i([a({ type: Boolean })], m.prototype, "defaultChecked", void 0), i([a({ type: Boolean })], m.prototype, "hasTile", void 0), i([a({
|
|
87
|
+
type: Boolean,
|
|
88
|
+
reflect: !0
|
|
89
|
+
})], m.prototype, "checked", void 0), i([a({
|
|
90
|
+
type: String,
|
|
91
|
+
reflect: !0
|
|
92
|
+
})], m.prototype, "type", void 0), i([a({
|
|
93
|
+
type: String,
|
|
94
|
+
attribute: "input-size"
|
|
95
|
+
})], m.prototype, "inputSize", void 0), i([a({ type: String })], m.prototype, "tagText", void 0), i([a({ type: Boolean })], m.prototype, "optionalTag", void 0), i([a({ type: String })], m.prototype, "optionalText", void 0), i([a({ type: Boolean })], m.prototype, "requiredTag", void 0), i([a({ type: String })], m.prototype, "requiredText", void 0), i([r()], m.prototype, "_checked", void 0), i([c({
|
|
96
|
+
context: p,
|
|
97
|
+
subscribe: !0
|
|
98
|
+
}), r()], m.prototype, "groupContext", void 0);
|
|
99
|
+
try {
|
|
100
|
+
t("pkt-radiobutton")(m);
|
|
101
|
+
} catch {
|
|
102
|
+
console.warn("Forsøker å definere <pkt-radiobutton>, men den er allerede definert");
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/radiobutton/index.ts
|
|
106
|
+
var h = m;
|
|
107
|
+
//#endregion
|
|
108
|
+
export { m as n, p as r, h as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./async-directive-DpyKp6qv.cjs");var n=()=>new r,r=class{},i=new WeakMap,a=e.f(class extends t.t{render(t){return e.h}update(t,[n]){let r=n!==this.G;return r&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=n,this.ht=t.options?.host,this.rt(this.ct=t.element)),e.h}rt(e){if(this.G!==void 0){if(this.isConnected||(e=void 0),typeof this.G==`function`){let t=this.ht??globalThis,n=i.get(t);n===void 0&&(n=new WeakMap,i.set(t,n)),n.get(this.G)!==void 0&&this.G.call(this.ht,void 0),n.set(this.G,e),e!==void 0&&this.G.call(this.ht,e)}else this.G.value=e}}get lt(){return typeof this.G==`function`?i.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e, h as t } from "./element-
|
|
2
|
-
import { t as n } from "./async-directive-
|
|
1
|
+
import { f as e, h as t } from "./element-DBugHPKM.js";
|
|
2
|
+
import { t as n } from "./async-directive-yh8hG41Q.js";
|
|
3
3
|
//#region ../../node_modules/lit-html/directives/ref.js
|
|
4
4
|
var r = () => new i(), i = class {}, a = /* @__PURE__ */ new WeakMap(), o = e(class extends n {
|
|
5
5
|
render(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as e, g as t, m as n, p as r } from "./element-
|
|
2
|
-
import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-
|
|
1
|
+
import { f as e, g as t, m as n, p as r } from "./element-DBugHPKM.js";
|
|
2
|
+
import { a as i, n as a, o, r as s, t as c } from "./directive-helpers-CwxFepWh.js";
|
|
3
3
|
//#region ../../node_modules/lit-html/directives/repeat.js
|
|
4
4
|
var l = (e, t, n) => {
|
|
5
5
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./directive-helpers-Bv70GjQh.cjs");var n=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},r=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.CHILD)throw Error(`repeat() can only be used in text expressions`)}dt(e,t,n){let r;n===void 0?n=t:t!==void 0&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(r,[i,a,o]){let s=t.t(r),{values:c,keys:l}=this.dt(i,a,o);if(!Array.isArray(s))return this.ut=l,c;let u=this.ut??=[],d=[],f,p,m=0,h=s.length-1,g=0,_=c.length-1;for(;m<=h&&g<=_;)if(s[m]===null)m++;else if(s[h]===null)h--;else if(u[m]===l[g])d[g]=t.a(s[m],c[g]),m++,g++;else if(u[h]===l[_])d[_]=t.a(s[h],c[_]),h--,_--;else if(u[m]===l[_])d[_]=t.a(s[m],c[_]),t.o(r,d[_+1],s[m]),m++,_--;else if(u[h]===l[g])d[g]=t.a(s[h],c[g]),t.o(r,s[m],s[h]),h--,g++;else if(f===void 0&&(f=n(l,g,_),p=n(u,m,h)),f.has(u[m])){if(f.has(u[h])){let e=p.get(l[g]),n=e===void 0?null:s[e];if(n===null){let e=t.o(r,s[m]);t.a(e,c[g]),d[g]=e}else d[g]=t.a(n,c[g]),t.o(r,s[m],n),s[e]=null;g++}else t.n(s[h]),h--}else t.n(s[m]),m++;for(;g<=_;){let e=t.o(r,d[_+1]);t.a(e,c[g]),d[g++]=e}for(;m<=h;){let e=s[m++];e!==null&&t.n(e)}return this.ut=l,t.r(r,d),e.g}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return r}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-
|
|
2
|
-
import { t as s } from "./class-map-
|
|
3
|
-
import "./icon-
|
|
4
|
-
import { t as c } from "./if-defined-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-DBugHPKM.js";
|
|
2
|
+
import { t as s } from "./class-map-Bf-QzUpN.js";
|
|
3
|
+
import "./icon-Bao96Zb8.js";
|
|
4
|
+
import { t as c } from "./if-defined-O59_I-e-.js";
|
|
5
5
|
import { n as l } from "./utils-BwF4QSrq.js";
|
|
6
6
|
import { t as u } from "./focus-modality-controller-Dc2S-KqR.js";
|
|
7
7
|
//#region src/components/searchinput/searchinput.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./class-map-Bh6toDeV.cjs");require("./icon-jPhyZD1z.cjs");const n=require("./if-defined-CiML3MTM.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./focus-modality-controller-C1ocyv2J.cjs");var a=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=r.n(),this.value=``,this.focusModality=new i.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e._`
|
|
2
2
|
${t.title?e._`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.h}
|
|
3
3
|
${t.text?e._`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.h}
|
|
4
4
|
`;return t.href?e._`<a
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as e, d as t, l as n, n as r, u as i } from "./element-
|
|
2
|
-
import { n as a } from "./element-with-slot-
|
|
3
|
-
import { t as o } from "./if-defined-
|
|
4
|
-
import { n as s, t as c } from "./ref-
|
|
5
|
-
import { t as l } from "./input-element-
|
|
6
|
-
import { t as u } from "./pkt-options-controller-
|
|
7
|
-
import { r as d } from "./input-wrapper-
|
|
1
|
+
import { _ as e, d as t, l as n, n as r, u as i } from "./element-DBugHPKM.js";
|
|
2
|
+
import { n as a } from "./element-with-slot-DDLS-aLw.js";
|
|
3
|
+
import { t as o } from "./if-defined-O59_I-e-.js";
|
|
4
|
+
import { n as s, t as c } from "./ref-y_5qv9vU.js";
|
|
5
|
+
import { t as l } from "./input-element-BBygBEei.js";
|
|
6
|
+
import { t as u } from "./pkt-options-controller-ClFrUWZK.js";
|
|
7
|
+
import { r as d } from "./input-wrapper-DrSCuw6U.js";
|
|
8
8
|
//#region src/base-elements/options-input-element.ts
|
|
9
9
|
var f = class extends l {
|
|
10
10
|
constructor(...e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-C6WTyJFE.cjs"),t=require("./element-with-slot-DhiAuSjM.cjs"),n=require("./if-defined-CiML3MTM.cjs"),r=require("./ref-CB7e9nMY.cjs"),i=require("./input-element-C4SelHLD.cjs"),a=require("./pkt-options-controller-B3vVKnAG.cjs"),o=require("./input-wrapper-BT6B3Kco.cjs");var s=class extends i.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=r.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new a.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}update(e){super.update(e),e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate(`_options`),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions}render(){let i=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
${t.n(this,[`helptext`])}
|
|
4
4
|
.strings=${this.strings}
|
|
@@ -14,6 +14,7 @@ export declare const nb: {
|
|
|
14
14
|
/** Valideringsmeldinger. Nøkkelnavnene følger `ValidityState` der det finnes et tilsvarende flagg. */
|
|
15
15
|
validation: {
|
|
16
16
|
valueMissing: string;
|
|
17
|
+
checkboxGroupValueMissing: string;
|
|
17
18
|
typeMismatch: string;
|
|
18
19
|
patternMismatch: string;
|
|
19
20
|
tooShort: string;
|
|
@@ -9,10 +9,14 @@ export { HEADER_MENU_LOCALES, DEFAULT_HEADER_FOOTER_URL, DEFAULT_HEADER_LOGO_LIN
|
|
|
9
9
|
export type { THeaderMenuLocale, IHeaderMenuLink, IHeaderMenuIconLink, IHeaderMenuButton, IHeaderMenuServices, IHeaderMenuSection, IMegaMenu, IHeaderFooter, IHeaderFooterLocaleData, THeaderFooterApi, IPktHeaderMenu, IPktHeaderGlobal, } from './header-footer';
|
|
10
10
|
export type { IPktFooterLink, IPktFooterColumn, IPktFooterSocialLink, IPktFooterBase, IPktFooterProps, IPktFooterSimpleProps, IFooterSimpleSpecProps, IFooterSpecProps, } from './footer';
|
|
11
11
|
export { DEFAULT_FOOTER_PERSONVERN_URL, DEFAULT_FOOTER_TILGJENGELIGHET_URL } from './footer';
|
|
12
|
-
export { CARD_SKINS, CARD_PADDINGS, CARD_IMAGE_SHAPES, CARD_IMAGE_ASPECTS, CARD_TAG_POSITIONS, CARD_TAG_SKIN_OPTIONS, CARD_DEFAULTS } from './card';
|
|
12
|
+
export { CARD_SKINS, CARD_PADDINGS, CARD_IMAGE_SHAPES, CARD_IMAGE_ASPECTS, CARD_TAG_POSITIONS, CARD_TAG_SKIN_OPTIONS, CARD_DEFAULTS, } from './card';
|
|
13
13
|
export type { TCardSkin, TCardPadding, TCardImageShape, TCardImageAspect, TCardTagPosition, ICardTag, ICardImage, IPktCardBase, ICardSpecProps, } from './card';
|
|
14
14
|
export { CHECKBOX_LABEL_POSITIONS, CHECKBOX_DEFAULTS } from './checkbox';
|
|
15
15
|
export type { TCheckboxLabelPosition, IPktCheckboxBase, ICheckboxSpecProps } from './checkbox';
|
|
16
|
+
export { RADIOBUTTON_DEFAULTS } from './radiobutton';
|
|
17
|
+
export type { IPktRadioButtonBase, IRadioButtonSpecProps } from './radiobutton';
|
|
18
|
+
export { OPTION_GROUP_DEFAULTS } from './option-group';
|
|
19
|
+
export type { IPktOptionGroupBase, IPktRadioGroupBase, IPktCheckboxGroupBase, IRadioGroupSpecProps, ICheckboxGroupSpecProps, } from './option-group';
|
|
16
20
|
export { CONSENT_TRIGGER_TYPES, CONSENT_TRIGGER_TYPE_OPTIONS, CONSENT_DEFAULTS } from './consent';
|
|
17
21
|
export type { TPktConsentTriggerType, IConsentItem, IConsentValue, ICookieConsentEvent, TConsentDetailsMap, TCookieEventHandler, ICookieEvents, ICookieBannerApi, IPktConsentBase, IConsentSpecProps, } from './consent';
|
|
18
22
|
export { ICON_DEFAULT_PATH, ICON_SIZE_CLASSES, ICON_DEFAULTS } from './icon';
|
|
@@ -48,5 +52,5 @@ export { COMBOBOX_TAG_SKINS, COMBOBOX_DISPLAY_VALUES, COMBOBOX_TAG_PLACEMENTS, C
|
|
|
48
52
|
export type { IPktComboboxOption, TPktComboboxTagSkin, TPktComboboxDisplayValue, TPktComboboxTagPlacement, IPktComboboxBase, IComboboxSpecProps, } from './combobox';
|
|
49
53
|
export type { IPktSelectOption, TSelectOption } from './select';
|
|
50
54
|
export type { TPktSearchInputAppearance, TPktSearchInputMethod, IPktSearchInputSuggestion, IPktSearchInput, } from './searchinput';
|
|
51
|
-
export { UPLOAD_STRATEGIES, FILE_UPLOAD_ITEM_RENDERERS, PREVIEW_UPLOAD_STATUS
|
|
55
|
+
export { UPLOAD_STRATEGIES, FILE_UPLOAD_ITEM_RENDERERS, PREVIEW_UPLOAD_STATUS } from './fileupload';
|
|
52
56
|
export type { TUploadStrategy as TFileUploadStrategy, TFileUploadItemRenderer, TPreviewUploadStatus, TFilesChangedReason, TFileValidator, TTransferProgress, IFileItem, IFileTransfer, IFileValidateDetail, ITransferCancelledDetail, IFilesChangedDetail, IFileUploadSpecProps, IPktFileUploadBase, } from './fileupload';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* option-group.ts
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for pkt-radio-group and pkt-checkbox-group.
|
|
5
|
+
* Used by React, Elements, and typed component specs.
|
|
6
|
+
*/
|
|
7
|
+
import type { IFormFieldCommonProps } from './form-field';
|
|
8
|
+
import type { TLayout } from './layout';
|
|
9
|
+
import type { TPktInputSize } from './size';
|
|
10
|
+
/**
|
|
11
|
+
* Props shared by the radio and checkbox groups. The group renders the input wrapper with a
|
|
12
|
+
* fieldset, so the wrapper props are passed straight through.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPktOptionGroupBase extends IFormFieldCommonProps<'forms' | 'validation'> {
|
|
15
|
+
id?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
layout?: TLayout;
|
|
18
|
+
inputSize?: TPktInputSize;
|
|
19
|
+
hasTile?: boolean;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
useWrapper?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** `value` follows `RadioNodeList.value`: the value of the checked radio, `''` when none is. */
|
|
24
|
+
export interface IPktRadioGroupBase extends IPktOptionGroupBase {
|
|
25
|
+
value?: string;
|
|
26
|
+
defaultValue?: string;
|
|
27
|
+
}
|
|
28
|
+
/** `value` follows `FormData.getAll(name)`: checked values in DOM order, disabled ones left out. */
|
|
29
|
+
export interface IPktCheckboxGroupBase extends IPktOptionGroupBase {
|
|
30
|
+
value?: string[];
|
|
31
|
+
defaultValue?: string[];
|
|
32
|
+
}
|
|
33
|
+
type TOptionGroupSpecKeys = 'id' | 'name' | 'label' | 'helptext' | 'helptextDropdown' | 'helptextDropdownButton' | 'value' | 'defaultValue' | 'layout' | 'inputSize' | 'hasTile' | 'required' | 'disabled' | 'hasError' | 'errorMessage' | 'useWrapper' | 'requiredTag' | 'requiredText' | 'optionalTag' | 'optionalText' | 'tagText';
|
|
34
|
+
/** Documented RadioGroup props, used for typed component specs. */
|
|
35
|
+
export type IRadioGroupSpecProps = Pick<IPktRadioGroupBase, TOptionGroupSpecKeys>;
|
|
36
|
+
/** Documented CheckboxGroup props, used for typed component specs. */
|
|
37
|
+
export type ICheckboxGroupSpecProps = Pick<IPktCheckboxGroupBase, TOptionGroupSpecKeys>;
|
|
38
|
+
/** Default values for both groups. Single source of truth for both frameworks. */
|
|
39
|
+
export declare const OPTION_GROUP_DEFAULTS: {
|
|
40
|
+
readonly layout: 'vertical';
|
|
41
|
+
readonly inputSize: 'medium';
|
|
42
|
+
readonly hasTile: false;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
readonly disabled: false;
|
|
45
|
+
readonly hasError: false;
|
|
46
|
+
readonly useWrapper: true;
|
|
47
|
+
readonly requiredTag: false;
|
|
48
|
+
readonly optionalTag: false;
|
|
49
|
+
};
|
|
50
|
+
export {};
|