@oslokommune/punkt-react 13.6.2 → 13.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [13.6.4](https://github.com/oslokommune/punkt/compare/13.6.3...13.6.4) (2025-09-19)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ Ingen
15
+
16
+ ### Bug Fixes
17
+ * Update Heading-component (#2997).
18
+
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
8
26
  ## [13.5.13](https://github.com/oslokommune/punkt/compare/13.5.12...13.5.13) (2025-09-12)
9
27
 
10
28
  ### ⚠ BREAKING CHANGES
@@ -4256,7 +4256,7 @@ var WN = Object.defineProperty, YN = Object.getOwnPropertyDescriptor, Mi = (e, t
4256
4256
  };
4257
4257
  let jn = class extends Qs {
4258
4258
  constructor() {
4259
- super(...arguments), this.size = "medium", this.level = 2, this.visuallyHidden = !1, this.align = "start";
4259
+ super(...arguments), this.size = void 0, this.level = 2, this.visuallyHidden = !1, this.align = void 0;
4260
4260
  }
4261
4261
  connectedCallback() {
4262
4262
  super.connectedCallback(), this.setAttribute("role", "heading"), this.setAttribute("aria-level", String(this.level)), this.updateHostClasses();
@@ -4265,11 +4265,29 @@ let jn = class extends Qs {
4265
4265
  super.attributeChangedCallback(t, r, n), t === "level" && n && this.setLevel(Number(n)), t === "visuallyHidden" && (this.visuallyHidden = n !== null && n !== "false"), (t === "size" || t === "visuallyHidden" || t === "align") && this.updateHostClasses();
4266
4266
  }
4267
4267
  updated(t) {
4268
- super.updated(t), t.has("level") && this.setLevel(this.level), (t.has("size") || t.has("visuallyHidden") || t.has("align")) && this.updateHostClasses();
4268
+ super.updated(t), t.has("level") && (this.setLevel(this.level), this.hasAttribute("size") || (this.size = this.defaultSizeForLevel)), !this.hasAttribute("size") && (t.has("level") || this.size === void 0) && (this.size = this.defaultSizeForLevel), (t.has("size") || t.has("visuallyHidden") || t.has("align")) && this.updateHostClasses();
4269
4269
  }
4270
4270
  setLevel(t) {
4271
4271
  t >= 1 && t <= 6 ? (this.level = t, this.setAttribute("aria-level", String(t))) : console.warn(`Invalid heading level: ${t}. Must be between 1 and 6.`);
4272
4272
  }
4273
+ get defaultSizeForLevel() {
4274
+ switch (this.level) {
4275
+ case 1:
4276
+ return "xlarge";
4277
+ case 2:
4278
+ return "large";
4279
+ case 3:
4280
+ return "medium";
4281
+ case 4:
4282
+ return "small";
4283
+ case 5:
4284
+ return "xsmall";
4285
+ case 6:
4286
+ return "xsmall";
4287
+ default:
4288
+ return "medium";
4289
+ }
4290
+ }
4273
4291
  updateHostClasses() {
4274
4292
  this.classList.remove(
4275
4293
  "pkt-heading",
@@ -38598,9 +38616,9 @@ const Yg = Ke(
38598
38616
  cat: "objects"
38599
38617
  },
38600
38618
  {
38601
- id: "",
38619
+ id: "privacy",
38602
38620
  fn: "privacy.svg",
38603
- cat: "none"
38621
+ cat: "user"
38604
38622
  },
38605
38623
  {
38606
38624
  id: "process-back",