@oslokommune/punkt-react 16.21.1 → 16.22.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 +18 -0
- package/dist/punkt-react.es.js +9 -43
- package/dist/punkt-react.umd.js +2 -36
- package/dist/shared-types/index.d.ts +1 -0
- package/dist/shared-types/select.d.ts +12 -0
- package/package.json +2 -9
- package/src/components/breadcrumbs/Breadcrumbs.test.tsx +0 -5
- package/src/components/button/Button.tsx +4 -1
- package/src/components/icon/Icon.tsx +8 -21
- package/src/components/searchinput/SearchInput.test.tsx +0 -8
- package/src/components/select/Select.tsx +2 -6
- package/src/components/tag/Tag.test.tsx +0 -1
- package/src/components/textarea/Textarea.test.tsx +0 -1
- package/src/components/timepicker/Timepicker.test.tsx +0 -1
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
|
+
## [16.22.0](https://github.com/oslokommune/punkt/compare/16.21.1...16.22.0) (2026-05-29)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
* Fjern siste rester av Elements fra React-pakken (#3504). Pluss litt småfiksing i TypeScript-greier… Har også måtte justere litt for at Astro skal bygge uten den Lit-shimmen vi brukte for å få Astro til å akseptere bruk av `window` i en del filer.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
Ingen
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [16.21.1](https://github.com/oslokommune/punkt/compare/16.21.0...16.21.1) (2026-05-29)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -1,39 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof document === 'undefined') {
|
|
4
|
-
globalThis.document = {
|
|
5
|
-
createTreeWalker: function() {
|
|
6
|
-
return {
|
|
7
|
-
currentNode: null,
|
|
8
|
-
nextNode: function() { return null; },
|
|
9
|
-
previousNode: function() { return null; },
|
|
10
|
-
parentNode: function() { return null; },
|
|
11
|
-
firstChild: function() { return null; },
|
|
12
|
-
lastChild: function() { return null; },
|
|
13
|
-
previousSibling: function() { return null; },
|
|
14
|
-
nextSibling: function() { return null; }
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
getElementsByTagName: function() { return []; },
|
|
18
|
-
querySelectorAll: function() { return []; },
|
|
19
|
-
querySelector: function() {
|
|
20
|
-
return {
|
|
21
|
-
querySelectorAll: function() { return []; },
|
|
22
|
-
getElementsByTagName: function() { return []; }
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
if (typeof customElements === 'undefined') { globalThis.customElements = { define: function() {} }; }
|
|
28
|
-
if (typeof window === 'undefined') { globalThis.window = globalThis; }
|
|
29
|
-
if (typeof SVGElement === 'undefined') { globalThis.SVGElement = function() {} };
|
|
30
|
-
if (typeof Element === 'undefined') {
|
|
31
|
-
globalThis.Element = function() {};
|
|
32
|
-
globalThis.Element.prototype.querySelectorAll = function() {
|
|
33
|
-
return [];
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
import { Children as e, Fragment as t, cloneElement as n, createContext as r, createRef as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
1
|
+
if (typeof window === 'undefined') { globalThis.window = globalThis; }
|
|
2
|
+
import { Children as e, Fragment as t, cloneElement as n, createContext as r, createRef as i, forwardRef as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useImperativeHandle as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
37
3
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
38
4
|
import { Link as y } from "react-router-dom";
|
|
39
5
|
//#region \0rolldown/runtime.js
|
|
@@ -93,7 +59,7 @@ var j = /* @__PURE__ */ O((/* @__PURE__ */ E(((e, t) => {
|
|
|
93
59
|
return n;
|
|
94
60
|
}) : window.classNames = n;
|
|
95
61
|
})();
|
|
96
|
-
})))(), 1), M = "https://punkt-cdn.oslo.kommune.no/16.
|
|
62
|
+
})))(), 1), M = "https://punkt-cdn.oslo.kommune.no/16.22/icons/";
|
|
97
63
|
typeof window < "u" && (window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch, window.pktIconPath = window.pktIconPath || M);
|
|
98
64
|
var te = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"></svg>", ne = {}, re = 2, ie = 1500, ae = typeof Storage < "u" && typeof sessionStorage < "u", oe = typeof window < "u" ? f : l, N = (e, t) => !e || !ae ? "" : sessionStorage.getItem(t + e + ".svg") ?? "", se = (e) => window.pktFetch(e).then((t) => {
|
|
99
65
|
if (!t.ok) throw Error("Missing icon: " + e);
|
|
@@ -208,7 +174,7 @@ var I = a(({ defaultOpen: e = !1, id: t, title: n, skin: r, compact: i = !1, isO
|
|
|
208
174
|
});
|
|
209
175
|
//#endregion
|
|
210
176
|
//#region src/components/button/Button.tsx
|
|
211
|
-
I.displayName = "PktAccordionItem", window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.
|
|
177
|
+
I.displayName = "PktAccordionItem", typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.22/animations/");
|
|
212
178
|
var L = a(({ children: e, className: t, iconName: n = "user", secondIconName: r = "user", iconPath: i, secondIconPath: a, size: o = "medium", fullWidth: s = !1, fullWidthOnMobile: c = !1, skin: l = "primary", type: u = "button", variant: d = "label-only", state: f, color: p, isLoading: m = void 0, disabled: h = void 0, loadingAnimationPath: g = window.pktAnimationPath, ...y }, b) => {
|
|
213
179
|
let x = [
|
|
214
180
|
t,
|
|
@@ -1738,7 +1704,7 @@ var xt = class e extends gt {
|
|
|
1738
1704
|
};
|
|
1739
1705
|
//#endregion
|
|
1740
1706
|
//#region ../../shared-utils/date-utils.ts
|
|
1741
|
-
window.pktTz = window.pktTz === void 0 ? "Europe/Oslo" : window.pktTz;
|
|
1707
|
+
typeof window < "u" && (window.pktTz = window.pktTz === void 0 ? "Europe/Oslo" : window.pktTz);
|
|
1742
1708
|
var St = (e = window.pktTz) => {
|
|
1743
1709
|
let t = new xt((/* @__PURE__ */ new Date()).toISOString(), e);
|
|
1744
1710
|
return t.setHours(0, 0, 0, 0), isNaN(t.getTime()) ? /* @__PURE__ */ new Date() : new Date(t.getFullYear(), t.getMonth(), t.getDate());
|
|
@@ -6458,7 +6424,7 @@ var Xi = a(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
6458
6424
|
children: /* @__PURE__ */ _(F, {
|
|
6459
6425
|
name: "oslologo",
|
|
6460
6426
|
"aria-hidden": "true",
|
|
6461
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
6427
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.22/logos/"
|
|
6462
6428
|
})
|
|
6463
6429
|
}) : ne ? /* @__PURE__ */ _("button", {
|
|
6464
6430
|
"aria-label": "Tilbake til forside",
|
|
@@ -6467,12 +6433,12 @@ var Xi = a(({ mobileBreakpoint: e = 768, tabletBreakpoint: t = 1280, children: n
|
|
|
6467
6433
|
children: /* @__PURE__ */ _(F, {
|
|
6468
6434
|
name: "oslologo",
|
|
6469
6435
|
"aria-hidden": "true",
|
|
6470
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
6436
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.22/logos/"
|
|
6471
6437
|
})
|
|
6472
6438
|
}) : /* @__PURE__ */ _(F, {
|
|
6473
6439
|
name: "oslologo",
|
|
6474
6440
|
"aria-hidden": "true",
|
|
6475
|
-
path: "https://punkt-cdn.oslo.kommune.no/16.
|
|
6441
|
+
path: "https://punkt-cdn.oslo.kommune.no/16.22/logos/"
|
|
6476
6442
|
})
|
|
6477
6443
|
}), T && /* @__PURE__ */ _("span", {
|
|
6478
6444
|
className: "pkt-header-service__service-name",
|
|
@@ -6972,7 +6938,7 @@ var ya = ({ children: e, skin: t, title: n, href: r, iconName: i, openInNewTab:
|
|
|
6972
6938
|
};
|
|
6973
6939
|
//#endregion
|
|
6974
6940
|
//#region src/components/loader/Loader.tsx
|
|
6975
|
-
ya.displayName = "PktLinkCard", typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.
|
|
6941
|
+
ya.displayName = "PktLinkCard", typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/16.22/animations/");
|
|
6976
6942
|
var ba = (e) => {
|
|
6977
6943
|
switch (e) {
|
|
6978
6944
|
case "blue": return "spinner-blue";
|