@oslokommune/punkt-react 13.15.0 → 13.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [13.15.1](https://github.com/oslokommune/punkt/compare/13.15.0...13.15.1) (2025-11-06)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * Fjern ubrukt dependency react-element-to-jsx-string (#3109).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [13.15.0](https://github.com/oslokommune/punkt/compare/13.14.0...13.15.0) (2025-11-05)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
@@ -6286,18 +6286,18 @@ let ai = class extends G {
6286
6286
  <div class=${O(this.classes)} aria-live="polite">
6287
6287
  ${Array.isArray(this.dates) && this.dates[0] ? js(
6288
6288
  ee.sortDates((this.dates ?? []).filter(Boolean)),
6289
- (i) => i,
6290
- (i) => {
6291
- var t;
6289
+ (t) => t,
6290
+ (t) => {
6291
+ var e;
6292
6292
  return u` <pkt-tag
6293
- id=${this.idBase + i + "-tag"}
6293
+ id=${this.idBase + t + "-tag"}
6294
6294
  closeTag
6295
6295
  @close=${() => {
6296
- this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: i }));
6296
+ this.dispatchEvent(new CustomEvent("date-tag-removed", { detail: t }));
6297
6297
  }}
6298
- .ariaLabel=${`${(t = this.strings) == null ? void 0 : t.calendar.deleteDate} ${$a(i, this.dateformat)}`}
6298
+ .ariaLabel=${`${(e = this.strings) == null ? void 0 : e.calendar.deleteDate} ${$a(t, this.dateformat)}`}
6299
6299
  >
6300
- <time datetime=${i}>${$a(i, this.dateformat)}</time>
6300
+ <time datetime=${t}>${$a(t, this.dateformat)}</time>
6301
6301
  </pkt-tag>`;
6302
6302
  }
6303
6303
  ) : $}
@@ -7374,7 +7374,13 @@ let tt = class extends M {
7374
7374
  this.calendarOpen ? this.hideCalendar() : this.showCalendar();
7375
7375
  }
7376
7376
  clearInputValue() {
7377
- this._value = [], this.value = "";
7377
+ this._value = [], this.value = "", this.internals.setFormValue(this.value), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.dispatchEvent(
7378
+ new CustomEvent("value-change", {
7379
+ detail: this._value,
7380
+ bubbles: !0,
7381
+ composed: !0
7382
+ })
7383
+ );
7378
7384
  }
7379
7385
  };
7380
7386
  dt([
@@ -9063,7 +9069,7 @@ const kh = Xt({
9063
9069
  displayName: "PktBackLink"
9064
9070
  });
9065
9071
  kh.displayName = "PktBackLink";
9066
- const qd = Z(
9072
+ const zd = Z(
9067
9073
  ({ breadcrumbs: i, navigationType: t, className: e, ...s }, a) => {
9068
9074
  const n = i, r = n[n.length - 2], l = [e, "pkt-breadcrumbs"].filter(Boolean).join(" ");
9069
9075
  return /* @__PURE__ */ x("nav", { ref: a, "aria-label": "brødsmulemeny", className: l, children: [
@@ -9273,7 +9279,7 @@ const Sh = Xt({
9273
9279
  ({ helptext: i, ...t }, e) => /* @__PURE__ */ h(Sh, { ref: e, ...t, children: /* @__PURE__ */ h("div", { className: "pkt-contents", slot: "helptext", children: i }) })
9274
9280
  );
9275
9281
  Ch.displayName = "PktDatepicker";
9276
- const zd = ({
9282
+ const Wd = ({
9277
9283
  columnOne: i,
9278
9284
  columnTwo: t,
9279
9285
  socialLinks: e,
@@ -9403,7 +9409,7 @@ const zd = ({
9403
9409
  ) }, `sociallinks-${L}`)) })
9404
9410
  ] })
9405
9411
  ] }) });
9406
- }, Wd = ({
9412
+ }, Kd = ({
9407
9413
  links: i = [],
9408
9414
  openLinksInNewTab: t = !1,
9409
9415
  personvernOgInfoLink: e = "https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",
@@ -9475,7 +9481,7 @@ const zd = ({
9475
9481
  }
9476
9482
  ) })
9477
9483
  ] }) }) });
9478
- }, Kd = Z(
9484
+ }, Gd = Z(
9479
9485
  ({
9480
9486
  className: i,
9481
9487
  logoLink: t = "https://www.oslo.kommune.no/",
@@ -9954,7 +9960,7 @@ const Fh = Z(
9954
9960
  }
9955
9961
  );
9956
9962
  Fh.displayName = "PktRadioButton";
9957
- const Gd = Z(
9963
+ const Yd = Z(
9958
9964
  ({
9959
9965
  appearance: i = "local",
9960
9966
  disabled: t = !1,
@@ -10037,7 +10043,7 @@ const Gd = Z(
10037
10043
  ] })
10038
10044
  );
10039
10045
  }
10040
- ), Yd = Z(
10046
+ ), Zd = Z(
10041
10047
  ({
10042
10048
  ariaDescribedby: i,
10043
10049
  ariaLabelledby: t,
@@ -10105,7 +10111,7 @@ const Gd = Z(
10105
10111
  ] }), qh = /* @__PURE__ */ x("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", children: [
10106
10112
  /* @__PURE__ */ h("path", { fill: "#2A2859", d: "M3 3h18v18H3z" }),
10107
10113
  /* @__PURE__ */ h("path", { d: "m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z", fill: "#F1FDFF" })
10108
- ] }), Zd = ({ children: i, className: t, status: e = "incomplete", title: s }) => /* @__PURE__ */ x("li", { className: ht("pkt-step", t, `pkt-step--${e}`), "data-testid": "pkt-step", children: [
10114
+ ] }), Xd = ({ children: i, className: t, status: e = "incomplete", title: s }) => /* @__PURE__ */ x("li", { className: ht("pkt-step", t, `pkt-step--${e}`), "data-testid": "pkt-step", children: [
10109
10115
  /* @__PURE__ */ h("span", { className: "pkt-step__line pkt-step__line--1", "aria-hidden": !0 }),
10110
10116
  /* @__PURE__ */ h("span", { className: "pkt-step__line pkt-step__line--2", "aria-hidden": !0 }),
10111
10117
  /* @__PURE__ */ h("span", { className: ht("pkt-step__indicator"), children: e === "current" ? Hh : e === "completed" ? qh : Uh }),
@@ -10114,7 +10120,7 @@ const Gd = Z(
10114
10120
  /* @__PURE__ */ h("div", { className: "pkt-step__title", children: s }),
10115
10121
  /* @__PURE__ */ h("div", { className: "pkt-step__content", children: i })
10116
10122
  ] })
10117
- ] }), Xd = Z(
10123
+ ] }), Jd = Z(
10118
10124
  ({
10119
10125
  activeStep: i,
10120
10126
  className: t,
@@ -10136,7 +10142,7 @@ const Gd = Z(
10136
10142
  }) : g);
10137
10143
  return /* @__PURE__ */ h("ol", { "data-testid": "pkt-stepper", className: d, ref: l, ...r, children: p });
10138
10144
  }
10139
- ), Jd = ({
10145
+ ), Qd = ({
10140
10146
  className: i,
10141
10147
  compact: t = !1,
10142
10148
  skin: e = "basic",
@@ -10157,7 +10163,7 @@ const Gd = Z(
10157
10163
  ...n,
10158
10164
  children: a
10159
10165
  }
10160
- ), Qd = ({ id: i, children: t, className: e, ...s }) => /* @__PURE__ */ h("tbody", { id: i, className: ht(e, "pkt-table__body", {}), ...s, role: "rowgroup", children: t }), tc = ({ children: i, className: t, dataLabel: e, ...s }) => /* @__PURE__ */ h(
10166
+ ), tc = ({ id: i, children: t, className: e, ...s }) => /* @__PURE__ */ h("tbody", { id: i, className: ht(e, "pkt-table__body", {}), ...s, role: "rowgroup", children: t }), ec = ({ children: i, className: t, dataLabel: e, ...s }) => /* @__PURE__ */ h(
10161
10167
  "td",
10162
10168
  {
10163
10169
  className: ht(t, "pkt-table__data-cell", {}),
@@ -10167,7 +10173,7 @@ const Gd = Z(
10167
10173
  ...s,
10168
10174
  children: i
10169
10175
  }
10170
- ), ec = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("thead", { className: ht(i, "pkt-table__header", {}), role: "rowgroup", ...e, children: t }), ic = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("th", { className: ht(i, "pkt-table__header-cell", {}), role: "columnheader", ...e, children: t }), sc = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("tr", { className: ht(i, "pkt-table__row", {}), role: "row", ...e, children: t }), on = Z(
10176
+ ), ic = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("thead", { className: ht(i, "pkt-table__header", {}), role: "rowgroup", ...e, children: t }), sc = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("th", { className: ht(i, "pkt-table__header-cell", {}), role: "columnheader", ...e, children: t }), ac = ({ className: i, children: t, ...e }) => /* @__PURE__ */ h("tr", { className: ht(i, "pkt-table__row", {}), role: "row", ...e, children: t }), on = Z(
10171
10177
  ({
10172
10178
  children: i,
10173
10179
  skin: t,
@@ -10256,7 +10262,7 @@ const hn = Aa(null), zh = () => {
10256
10262
  if (!i)
10257
10263
  throw new Error("TabItem must be used within a Tabs component");
10258
10264
  return i;
10259
- }, ac = Z(
10265
+ }, nc = Z(
10260
10266
  ({ arrowNav: i = !0, disableArrowNav: t = !1, tabs: e, onTabSelected: s, children: a }, n) => {
10261
10267
  const r = Oa([]), l = i && !t, p = a && Es.count(a) > 0 ? Es.count(a) : (e == null ? void 0 : e.length) || 0;
10262
10268
  as(() => {
@@ -10290,7 +10296,7 @@ const hn = Aa(null), zh = () => {
10290
10296
  });
10291
10297
  return /* @__PURE__ */ h(hn.Provider, { value: { arrowNav: l, registerTabRef: y, handleKeyPress: m, selectTab: g }, children: /* @__PURE__ */ h("div", { className: "pkt-tabs", ref: n, children: /* @__PURE__ */ h("div", { className: "pkt-tabs__list", role: l ? "tablist" : "navigation", children: a || b }) }) });
10292
10298
  }
10293
- ), nc = Z(
10299
+ ), rc = Z(
10294
10300
  ({
10295
10301
  id: i,
10296
10302
  ariaDescribedby: t,
@@ -10380,7 +10386,7 @@ const hn = Aa(null), zh = () => {
10380
10386
  }
10381
10387
  );
10382
10388
  }
10383
- ), rc = Z(
10389
+ ), oc = Z(
10384
10390
  ({
10385
10391
  id: i,
10386
10392
  ariaDescribedby: t,
@@ -10507,16 +10513,16 @@ export {
10507
10513
  fh as PktAccordionItem,
10508
10514
  rn as PktAlert,
10509
10515
  kh as PktBackLink,
10510
- qd as PktBreadcrumbs,
10516
+ zd as PktBreadcrumbs,
10511
10517
  oi as PktButton,
10512
10518
  $h as PktCard,
10513
10519
  _h as PktCheckbox,
10514
10520
  xh as PktCombobox,
10515
10521
  Fs as PktConsent,
10516
10522
  Ch as PktDatepicker,
10517
- zd as PktFooter,
10518
- Wd as PktFooterSimple,
10519
- Kd as PktHeader,
10523
+ Wd as PktFooter,
10524
+ Kd as PktFooterSimple,
10525
+ Gd as PktHeader,
10520
10526
  Nh as PktHeading,
10521
10527
  Eh as PktHelptext,
10522
10528
  R as PktIcon,
@@ -10529,19 +10535,19 @@ export {
10529
10535
  Bh as PktModal,
10530
10536
  jh as PktProgressbar,
10531
10537
  Fh as PktRadioButton,
10532
- Gd as PktSearchInput,
10533
- Yd as PktSelect,
10534
- Zd as PktStep,
10535
- Xd as PktStepper,
10538
+ Yd as PktSearchInput,
10539
+ Zd as PktSelect,
10540
+ Xd as PktStep,
10541
+ Jd as PktStepper,
10536
10542
  ln as PktTabItem,
10537
- Jd as PktTable,
10538
- Qd as PktTableBody,
10539
- tc as PktTableDataCell,
10540
- ec as PktTableHeader,
10541
- ic as PktTableHeaderCell,
10542
- sc as PktTableRow,
10543
- ac as PktTabs,
10543
+ Qd as PktTable,
10544
+ tc as PktTableBody,
10545
+ ec as PktTableDataCell,
10546
+ ic as PktTableHeader,
10547
+ sc as PktTableHeaderCell,
10548
+ ac as PktTableRow,
10549
+ nc as PktTabs,
10544
10550
  on as PktTag,
10545
- nc as PktTextarea,
10546
- rc as PktTextinput
10551
+ rc as PktTextarea,
10552
+ oc as PktTextinput
10547
10553
  };
@@ -1043,7 +1043,7 @@
1043
1043
  </div>
1044
1044
  </pkt-input-wrapper>
1045
1045
  ${this.renderCalendar()}
1046
- `}handleCalendarPosition(){const t=this.multiple&&!!this.maxlength;ni.handleCalendarPosition(this.popupRef,this.inputRef,t)}async showCalendar(){var t;const e=this.datepickerPopupRef.value;if(this.calendarOpen=!0,e&&typeof e.show=="function"){e.show(),Ie.isIOS()&&e.focusOnCurrentDate();return}await El(20),this.handleCalendarPosition(),Ie.isIOS()&&((t=this.calRef.value)==null||t.focusOnCurrentDate())}hideCalendar(){const t=this.datepickerPopupRef.value;if(this.calendarOpen=!1,t&&typeof t.hide=="function")return t.hide()}async toggleCalendar(t){t.preventDefault();const e=this.datepickerPopupRef.value;if(e&&typeof e.toggle=="function"){const i=!!e.open;e.toggle(),this.calendarOpen=!i;return}this.calendarOpen?this.hideCalendar():this.showCalendar()}clearInputValue(){this._value=[],this.value=""}};ht([o({type:String,reflect:!0})],et.prototype,"value",1),ht([o({type:Array})],et.prototype,"_value",2),ht([o({type:String,reflect:!0})],et.prototype,"label",2),ht([o({type:String})],et.prototype,"dateformat",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"multiple",2),ht([o({type:Number,reflect:!0})],et.prototype,"maxlength",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"range",2),ht([o({type:Boolean})],et.prototype,"showRangeLabels",2),ht([o({type:String,reflect:!0})],et.prototype,"min",2),ht([o({type:String,reflect:!0})],et.prototype,"max",2),ht([o({type:Boolean})],et.prototype,"weeknumbers",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"withcontrols",2),ht([o({converter:ts.csvToArray})],et.prototype,"excludedates",2),ht([o({converter:ts.csvToArray})],et.prototype,"excludeweekdays",2),ht([o({type:String})],et.prototype,"currentmonth",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"calendarOpen",2),ht([o({type:String})],et.prototype,"timezone",2),ht([F()],et.prototype,"inputClasses",2),et=ht([j("pkt-datepicker")],et);const Wl={href:{default:"#"},target:{default:"_self"}},Ra={props:Wl};var Rl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,is=(s,t,e,i)=>{for(var a=i>1?void 0:i?Kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Rl(t,e,a),a};let Be=class extends Y{constructor(){super(),this.defaultSlot=A(),this.href=Ra.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=Ra.props.target.default,this.slotController=new at(this,this.defaultSlot)}render(){const t={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return u`<a
1046
+ `}handleCalendarPosition(){const t=this.multiple&&!!this.maxlength;ni.handleCalendarPosition(this.popupRef,this.inputRef,t)}async showCalendar(){var t;const e=this.datepickerPopupRef.value;if(this.calendarOpen=!0,e&&typeof e.show=="function"){e.show(),Ie.isIOS()&&e.focusOnCurrentDate();return}await El(20),this.handleCalendarPosition(),Ie.isIOS()&&((t=this.calRef.value)==null||t.focusOnCurrentDate())}hideCalendar(){const t=this.datepickerPopupRef.value;if(this.calendarOpen=!1,t&&typeof t.hide=="function")return t.hide()}async toggleCalendar(t){t.preventDefault();const e=this.datepickerPopupRef.value;if(e&&typeof e.toggle=="function"){const i=!!e.open;e.toggle(),this.calendarOpen=!i;return}this.calendarOpen?this.hideCalendar():this.showCalendar()}clearInputValue(){this._value=[],this.value="",this.internals.setFormValue(this.value),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:this._value,bubbles:!0,composed:!0}))}};ht([o({type:String,reflect:!0})],et.prototype,"value",1),ht([o({type:Array})],et.prototype,"_value",2),ht([o({type:String,reflect:!0})],et.prototype,"label",2),ht([o({type:String})],et.prototype,"dateformat",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"multiple",2),ht([o({type:Number,reflect:!0})],et.prototype,"maxlength",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"range",2),ht([o({type:Boolean})],et.prototype,"showRangeLabels",2),ht([o({type:String,reflect:!0})],et.prototype,"min",2),ht([o({type:String,reflect:!0})],et.prototype,"max",2),ht([o({type:Boolean})],et.prototype,"weeknumbers",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"withcontrols",2),ht([o({converter:ts.csvToArray})],et.prototype,"excludedates",2),ht([o({converter:ts.csvToArray})],et.prototype,"excludeweekdays",2),ht([o({type:String})],et.prototype,"currentmonth",2),ht([o({type:Boolean,reflect:!0})],et.prototype,"calendarOpen",2),ht([o({type:String})],et.prototype,"timezone",2),ht([F()],et.prototype,"inputClasses",2),et=ht([j("pkt-datepicker")],et);const Wl={href:{default:"#"},target:{default:"_self"}},Ra={props:Wl};var Rl=Object.defineProperty,Kl=Object.getOwnPropertyDescriptor,is=(s,t,e,i)=>{for(var a=i>1?void 0:i?Kl(t,e):t,n=s.length-1,r;n>=0;n--)(r=s[n])&&(a=(i?r(t,e,a):r(a))||a);return i&&a&&Rl(t,e,a),a};let Be=class extends Y{constructor(){super(),this.defaultSlot=A(),this.href=Ra.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=!1,this.target=Ra.props.target.default,this.slotController=new at(this,this.defaultSlot)}render(){const t={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return u`<a
1047
1047
  class=${O(t)}
1048
1048
  href=${this.href}
1049
1049
  .target=${this.target}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "13.15.0",
3
+ "version": "13.15.2",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -39,12 +39,10 @@
39
39
  "dependencies": {
40
40
  "@lit-labs/ssr-dom-shim": "^1.2.1",
41
41
  "@lit/react": "^1.0.7",
42
- "@oslokommune/punkt-elements": "^13.13.2",
42
+ "@oslokommune/punkt-elements": "^13.15.2",
43
43
  "classnames": "^2.5.1",
44
44
  "prettier": "^3.3.3",
45
- "react-element-to-jsx-string": "^15.0.0",
46
- "react-hook-form": "^7.53.0",
47
- "react-syntax-highlighter": "^15.6.6"
45
+ "react-hook-form": "^7.53.0"
48
46
  },
49
47
  "devDependencies": {
50
48
  "@babel/plugin-transform-private-property-in-object": "^7.25.9",
@@ -58,7 +56,6 @@
58
56
  "@types/node": "^20.12.10",
59
57
  "@types/react": "^18.3.5",
60
58
  "@types/react-dom": "^18.3.0",
61
- "@types/react-syntax-highlighter": "^15.5.13",
62
59
  "@vitejs/plugin-react": "^4.3.1",
63
60
  "eslint": "^9.37.0",
64
61
  "eslint-config-prettier": "^9.1.0",
@@ -106,5 +103,5 @@
106
103
  "url": "https://github.com/oslokommune/punkt/issues"
107
104
  },
108
105
  "license": "MIT",
109
- "gitHead": "4fdac01524382592f47b2a77735477a5a0aa6d1e"
106
+ "gitHead": "b9f90e34e22049d0504e4583f464e86f288af2e8"
110
107
  }