@oslokommune/punkt-react 19.16.1 → 19.17.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 +5 -0
- package/dist/_virtual/_rolldown/runtime.js +1 -1
- package/dist/components/calendar/useCalendarState.js +1 -5
- package/dist/components/combobox/useComboboxState.js +6 -18
- package/dist/components/consent/Consent.js +1 -1
- package/dist/components/fileupload/DropZone.js +1 -5
- package/dist/components/fileupload/Subcomponents.js +2 -5
- package/dist/components/header/HeaderGlobal.js +1 -1
- package/dist/components/header/HeaderService.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/inputwrapper/InputWrapper.d.ts +2 -25
- package/dist/components/inputwrapper/InputWrapper.js +84 -83
- package/dist/components/link/Link.js +1 -1
- package/dist/components/tabs/TabItem.js +2 -10
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +1 -1
- package/dist/node_modules/date-fns/constants.js +4 -8
- package/dist/node_modules/date-fns/getISOWeek.js +1 -1
- package/dist/node_modules/date-fns/getWeek.js +1 -1
- package/dist/punkt-react.cjs +1 -1
- package/dist/shared-types/index.d.ts +2 -0
- package/dist/shared-types/input-wrapper.d.ts +59 -0
- package/dist/shared-types/input-wrapper.js +17 -0
- package/dist/shared-utils/combobox/keyboard-navigation.js +9 -10
- package/dist/shared-utils/fileupload/focus-trap.js +1 -2
- package/dist/shared-utils/scroll-lock/index.js +1 -1
- package/package.json +3 -3
- package/src/components/index.ts +1 -0
- package/src/components/inputwrapper/InputWrapper.tsx +17 -35
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [19.17.0](https://github.com/oslokommune/punkt/compare/19.16.2...19.17.0) (2026-10-20)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
## [19.16.1](https://github.com/oslokommune/punkt/compare/19.16.0...19.16.1) (2026-10-19)
|
|
9
14
|
|
|
10
15
|
### Bug Fixes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
3
|
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
4
|
get: ((e) => i[e]).bind(null, d),
|
|
5
5
|
enumerable: !(s = n(i, d)) || s.enumerable
|
|
@@ -82,11 +82,7 @@ function p(p) {
|
|
|
82
82
|
g,
|
|
83
83
|
j.length
|
|
84
84
|
]), Z = l(() => typeof j == "string" ? j.split(",") : j, [j]), Ae = l((e) => {
|
|
85
|
-
|
|
86
|
-
B(null);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
B(e), z(c(M[0], e));
|
|
85
|
+
!_ || M.length !== 1 || !ae(e, M, O, x) || M[0] >= e ? B(null) : (B(e), z(c(M[0], e)));
|
|
90
86
|
}, [
|
|
91
87
|
_,
|
|
92
88
|
M,
|
|
@@ -237,12 +237,9 @@ function ue(ue, de) {
|
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
239
|
let t = re(e.key, e.shiftKey, b);
|
|
240
|
-
if (t &&
|
|
241
|
-
if (t === "focusListbox" && e.key === "Tab" && !j.current?.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]"))
|
|
242
|
-
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
switch (e.preventDefault(), t) {
|
|
240
|
+
if (t && (e.key !== "Tab" || R)) {
|
|
241
|
+
if (t === "focusListbox" && e.key === "Tab" && !j.current?.querySelector("[role=\"option\"]:not([data-disabled]), [data-type=\"new-option\"]")) $();
|
|
242
|
+
else switch (e.preventDefault(), t) {
|
|
246
243
|
case "addValue": {
|
|
247
244
|
let e = O.current?.value.trim() || "";
|
|
248
245
|
if (V(e), e && I.includes(e)) {
|
|
@@ -276,13 +273,7 @@ function ue(ue, de) {
|
|
|
276
273
|
Q,
|
|
277
274
|
N
|
|
278
275
|
]), Tt = m(() => {
|
|
279
|
-
|
|
280
|
-
if (lt(!1), K.current) {
|
|
281
|
-
K.current = !1, G(!0);
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
!b && I[0] && O.current && O.current.type !== "hidden" && (dt(!0), O.current.value = l(I[0], L, T)), G(!0), V(""), z(!0);
|
|
285
|
-
}
|
|
276
|
+
E || (lt(!1), K.current ? (K.current = !1, G(!0)) : (!b && I[0] && O.current && O.current.type !== "hidden" && (dt(!0), O.current.value = l(I[0], L, T)), G(!0), V(""), z(!0)));
|
|
286
277
|
}, [
|
|
287
278
|
E,
|
|
288
279
|
b,
|
|
@@ -300,11 +291,8 @@ function ue(ue, de) {
|
|
|
300
291
|
R,
|
|
301
292
|
$
|
|
302
293
|
]), Ot = m((e) => {
|
|
303
|
-
if (E)
|
|
304
|
-
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
if (D) O.current?.focus();
|
|
294
|
+
if (E) e.preventDefault(), e.stopPropagation();
|
|
295
|
+
else if (D) O.current?.focus();
|
|
308
296
|
else {
|
|
309
297
|
e.stopPropagation(), e.preventDefault();
|
|
310
298
|
let t = !R;
|
|
@@ -58,7 +58,7 @@ var s = null, c = () => s || (s = new Promise((e, t) => {
|
|
|
58
58
|
cancelable: !0
|
|
59
59
|
}));
|
|
60
60
|
let r = window.cookieBanner, a = window.__cookieEvents;
|
|
61
|
-
|
|
61
|
+
r && a && r.cookieConsent.validateConsentCookie().then((o) => {
|
|
62
62
|
if (e || !o) return;
|
|
63
63
|
let s = r.cookieConsent.getConsentCookie();
|
|
64
64
|
window.clearTimeout(n), n = window.setTimeout(() => {
|
|
@@ -41,11 +41,7 @@ var h = /* @__PURE__ */ e(t(), 1), g = a(({ id: e, multiple: t, value: a, onFile
|
|
|
41
41
|
g(e.map((e) => new i(e))), D.current && (D.current.value = "");
|
|
42
42
|
}, [g]), I = (e) => {
|
|
43
43
|
let t = e.target.files;
|
|
44
|
-
|
|
45
|
-
P(a);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
F(Array.from(t));
|
|
44
|
+
t.length === 0 ? P(a) : F(Array.from(t));
|
|
49
45
|
}, L = (e) => {
|
|
50
46
|
F(e);
|
|
51
47
|
}, R = (e) => {
|
|
@@ -180,11 +180,8 @@ var _ = (e) => {
|
|
|
180
180
|
return f(() => {
|
|
181
181
|
if (!r) return;
|
|
182
182
|
let e = (e) => {
|
|
183
|
-
if (e.key === "Tab")
|
|
184
|
-
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
switch (e.key) {
|
|
183
|
+
if (e.key === "Tab") i(e, _.current);
|
|
184
|
+
else switch (e.key) {
|
|
188
185
|
case "ArrowLeft":
|
|
189
186
|
e.preventDefault(), m("prev");
|
|
190
187
|
break;
|
|
@@ -40,7 +40,7 @@ var _ = "pkt-header-global-menu", v = "pkt-header-global-menu-toggle", y = "pkt-
|
|
|
40
40
|
se(() => {
|
|
41
41
|
if (N !== "menu" && N !== "search") return;
|
|
42
42
|
let e = document.getElementById(N === "menu" ? _ : y), t = Me.current?.getBoundingClientRect();
|
|
43
|
-
|
|
43
|
+
e && t && (e.style.setProperty("--pkt-header-global-top", `${t.top}px`), e.style.setProperty("--pkt-header-global-left", `${t.left}px`), e.style.setProperty("--pkt-header-global-width", `${t.width}px`));
|
|
44
44
|
}, [
|
|
45
45
|
N,
|
|
46
46
|
z,
|
|
@@ -83,7 +83,7 @@ var g = s(({ mobileBreakpoint: e = 768, tabletBreakpoint: n = 1280, children: s,
|
|
|
83
83
|
}, [K, G]), Oe = c((e) => {
|
|
84
84
|
if (!K || R !== "slot") return;
|
|
85
85
|
let t = e.target.closest("a[href], button, [role=\"link\"], [role=\"button\"], [role=\"menuitem\"], [role=\"menuitemradio\"], [role=\"menuitemcheckbox\"]");
|
|
86
|
-
|
|
86
|
+
t && U.current?.contains(t) && (t.closest("[data-pkt-header-keep-open]") || t.disabled || t.getAttribute("aria-disabled") === "true" || z("none"));
|
|
87
87
|
}, [K, R]), $ = c((e) => {
|
|
88
88
|
R === "none" ? (Y(), z(e)) : z("none");
|
|
89
89
|
}, [R, Y]);
|
|
@@ -26,6 +26,7 @@ export { PktHelptext } from './helptext/Helptext';
|
|
|
26
26
|
export { PktIcon } from './icon/Icon';
|
|
27
27
|
export { PktInput } from './input/Input';
|
|
28
28
|
export { PktInputWrapper } from './inputwrapper/InputWrapper';
|
|
29
|
+
export type { IPktInputWrapper } from './inputwrapper/InputWrapper';
|
|
29
30
|
export { PktLink } from './link/Link';
|
|
30
31
|
export { PktLinkCard } from './linkcard/LinkCard';
|
|
31
32
|
export { PktLoader } from './loader/Loader';
|
|
@@ -1,37 +1,14 @@
|
|
|
1
1
|
import { FocusEventHandler, ReactNode, RefAttributes } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export interface IPktInputWrapper extends RefAttributes<HTMLElement>, IPktStringsProps<'forms' | 'validation'> {
|
|
2
|
+
import { IPktInputWrapperBase } from '../../shared-types';
|
|
3
|
+
export interface IPktInputWrapper extends Omit<IPktInputWrapperBase, 'helptext' | 'helptextDropdown' | 'errorMessage'>, RefAttributes<HTMLElement> {
|
|
5
4
|
id?: string;
|
|
6
5
|
forId: string;
|
|
7
6
|
label: string;
|
|
8
7
|
helptext?: string | ReactNode;
|
|
9
8
|
helptextDropdown?: string | ReactNode;
|
|
10
|
-
/** @deprecated Bruk `strings={{ forms: { readMore: '…' } }}` eller `setPktStrings()`. */
|
|
11
|
-
helptextDropdownButton?: string;
|
|
12
|
-
counter?: boolean;
|
|
13
|
-
counterCurrent?: number;
|
|
14
|
-
counterMaxLength?: number;
|
|
15
|
-
optionalTag?: boolean;
|
|
16
|
-
/** @deprecated Bruk `strings={{ forms: { optional: '…' } }}` eller `setPktStrings()`. */
|
|
17
|
-
optionalText?: string;
|
|
18
|
-
requiredTag?: boolean;
|
|
19
|
-
/** @deprecated Bruk `strings={{ forms: { required: '…' } }}` eller `setPktStrings()`. */
|
|
20
|
-
requiredText?: string;
|
|
21
|
-
tagText?: string | null;
|
|
22
|
-
hasError?: boolean;
|
|
23
9
|
errorMessage?: string | ReactNode;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
inline?: boolean;
|
|
26
|
-
ariaDescribedby?: string;
|
|
27
|
-
useWrapper?: boolean;
|
|
28
10
|
children?: ReactNode;
|
|
29
11
|
className?: string;
|
|
30
|
-
hasFieldset?: boolean;
|
|
31
|
-
layout?: TLayout;
|
|
32
|
-
role?: string;
|
|
33
|
-
counterPosition?: 'top' | 'bottom';
|
|
34
|
-
size?: 'small' | 'medium' | 'xsmall';
|
|
35
12
|
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
36
13
|
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
37
14
|
}
|
|
@@ -1,128 +1,129 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { INPUT_WRAPPER_DEFAULTS as e } from "../../shared-types/input-wrapper.js";
|
|
3
|
+
import { formatString as t } from "../../shared-strings/format.js";
|
|
4
|
+
import { usePktStrings as n } from "../../hooks/usePktStrings.js";
|
|
5
|
+
import { PktAlert as r } from "../alert/Alert.js";
|
|
6
|
+
import { useGeneratedId as i } from "../../hooks/useGeneratedId.js";
|
|
7
|
+
import { useFocusModality as a } from "../../hooks/useFocusModality.js";
|
|
8
|
+
import { counterStatusId as o, isCounterExceeded as s } from "../../shared-utils/forms/described-by.js";
|
|
9
|
+
import { PktHelptext as c } from "../helptext/Helptext.js";
|
|
10
|
+
import { forwardRef as l } from "react";
|
|
11
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
12
|
//#region src/components/inputwrapper/InputWrapper.tsx
|
|
12
|
-
var
|
|
13
|
-
let
|
|
13
|
+
var p = l(({ id: l, forId: p, label: m, helptext: h, helptextDropdown: g, helptextDropdownButton: _, counter: v, counterCurrent: y = e.counterCurrent, counterMaxLength: b, optionalTag: x = e.optionalTag, optionalText: S, requiredTag: C = e.requiredTag, requiredText: w, tagText: T = null, hasError: E = e.hasError, errorMessage: D, disabled: O = e.disabled, inline: k = e.inline, ariaDescribedby: ee, useWrapper: A = e.useWrapper, children: j, className: M = "", hasFieldset: N = e.hasFieldset, layout: P = e.layout, role: F, counterPosition: I = e.counterPosition, size: L = e.size, strings: R, onFocus: z, onBlur: B }, V) => {
|
|
14
|
+
let H = a(V), U = n(["forms", "validation"], R), W = i(p), G = [...new Set([ee || (h ? `${W}-helptext` : ""), E && D ? `${W}-error` : ""].join(" ").split(" ").filter(Boolean))].join(" ") || void 0, K = !!v, q = K && I === "top", J = K && I === "bottom", Y = [
|
|
14
15
|
"pkt-inputwrapper",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
].filter(Boolean).join(" "),
|
|
16
|
+
M,
|
|
17
|
+
E ? "pkt-inputwrapper--error" : "",
|
|
18
|
+
O ? "pkt-inputwrapper--disabled" : "",
|
|
19
|
+
k ? "pkt-inputwrapper--inline" : "",
|
|
20
|
+
L ? `pkt-inputwrapper--${L}` : ""
|
|
21
|
+
].filter(Boolean).join(" "), X = [
|
|
21
22
|
"pkt-tag",
|
|
22
23
|
"pkt-tag--small",
|
|
23
24
|
"pkt-tag--thin-text"
|
|
24
|
-
].join(" "),
|
|
25
|
+
].join(" "), Z = s(y, b), Q = K ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
|
|
25
26
|
className: "pkt-input__counter",
|
|
26
27
|
"aria-hidden": "true",
|
|
27
|
-
children: [
|
|
28
|
-
}), /* @__PURE__ */
|
|
28
|
+
children: [y, b ? `/${b}` : ""]
|
|
29
|
+
}), /* @__PURE__ */ d("div", {
|
|
29
30
|
className: "pkt-sr-only",
|
|
30
|
-
id:
|
|
31
|
+
id: o(W),
|
|
31
32
|
"aria-live": "polite",
|
|
32
|
-
children:
|
|
33
|
-
current:
|
|
34
|
-
max:
|
|
33
|
+
children: Z ? t(U.validation.counterExceeded, {
|
|
34
|
+
current: y,
|
|
35
|
+
max: b ?? 0
|
|
35
36
|
}) : ""
|
|
36
|
-
})] }) : null,
|
|
37
|
-
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
37
|
+
})] }) : null, te = () => /* @__PURE__ */ f(u, { children: [
|
|
38
|
+
T && /* @__PURE__ */ d("span", {
|
|
39
|
+
className: X + " pkt-tag--gray",
|
|
40
|
+
children: T
|
|
40
41
|
}),
|
|
41
|
-
|
|
42
|
-
className:
|
|
43
|
-
children:
|
|
42
|
+
x && /* @__PURE__ */ d("span", {
|
|
43
|
+
className: X + " pkt-tag--blue-light",
|
|
44
|
+
children: S ?? U.forms.optional
|
|
44
45
|
}),
|
|
45
|
-
|
|
46
|
-
className:
|
|
47
|
-
children:
|
|
46
|
+
C && /* @__PURE__ */ d("span", {
|
|
47
|
+
className: X + " pkt-tag--beige",
|
|
48
|
+
children: w ?? U.forms.required
|
|
48
49
|
})
|
|
49
|
-
] }),
|
|
50
|
-
let e = /* @__PURE__ */
|
|
51
|
-
|
|
50
|
+
] }), ne = () => {
|
|
51
|
+
let e = /* @__PURE__ */ f(u, { children: [
|
|
52
|
+
m,
|
|
52
53
|
" ",
|
|
53
|
-
|
|
54
|
+
te()
|
|
54
55
|
] });
|
|
55
|
-
return !
|
|
56
|
+
return !A && N ? /* @__PURE__ */ d("legend", {
|
|
56
57
|
className: "pkt-sr-only",
|
|
57
|
-
id: `${
|
|
58
|
-
children:
|
|
59
|
-
}) :
|
|
58
|
+
id: `${W}-label`,
|
|
59
|
+
children: m
|
|
60
|
+
}) : A ? N ? /* @__PURE__ */ d("legend", {
|
|
60
61
|
className: "pkt-inputwrapper__legend",
|
|
61
|
-
id: `${
|
|
62
|
+
id: `${W}-label`,
|
|
62
63
|
children: e
|
|
63
|
-
}) : /* @__PURE__ */
|
|
64
|
+
}) : /* @__PURE__ */ d("label", {
|
|
64
65
|
className: "pkt-inputwrapper__label",
|
|
65
|
-
htmlFor:
|
|
66
|
-
id: `${
|
|
66
|
+
htmlFor: W,
|
|
67
|
+
id: `${W}-label`,
|
|
67
68
|
children: e
|
|
68
|
-
}) : /* @__PURE__ */
|
|
69
|
-
htmlFor:
|
|
69
|
+
}) : /* @__PURE__ */ d("label", {
|
|
70
|
+
htmlFor: W,
|
|
70
71
|
className: "pkt-sr-only",
|
|
71
|
-
id: `${
|
|
72
|
-
children:
|
|
72
|
+
id: `${W}-label`,
|
|
73
|
+
children: m
|
|
73
74
|
});
|
|
74
|
-
},
|
|
75
|
-
let e =
|
|
76
|
-
return !e && !
|
|
77
|
-
forId:
|
|
75
|
+
}, re = () => {
|
|
76
|
+
let e = A ? h : void 0;
|
|
77
|
+
return !e && !g ? null : /* @__PURE__ */ d(c, {
|
|
78
|
+
forId: W,
|
|
78
79
|
helptext: e,
|
|
79
|
-
helptextDropdown:
|
|
80
|
-
helptextDropdownButton:
|
|
80
|
+
helptextDropdown: g,
|
|
81
|
+
helptextDropdownButton: _ ?? U.forms.readMore
|
|
81
82
|
});
|
|
82
|
-
},
|
|
83
|
-
te(),
|
|
83
|
+
}, ie = L === "medium" ? "small" : "xsmall", $ = /* @__PURE__ */ f(u, { children: [
|
|
84
84
|
ne(),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
re(),
|
|
86
|
+
q && Q,
|
|
87
|
+
N || P === "horizontal" ? /* @__PURE__ */ d("div", {
|
|
88
|
+
className: P === "horizontal" ? "pkt-inputwrapper__options pkt-inputwrapper__options--horizontal" : "pkt-inputwrapper__options",
|
|
89
|
+
children: j
|
|
90
|
+
}) : j,
|
|
91
|
+
J && Q,
|
|
92
|
+
E && D && /* @__PURE__ */ d("div", {
|
|
92
93
|
className: "pkt-inputwrapper__alert-wrapper",
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ d(r, {
|
|
94
95
|
skin: "error",
|
|
95
|
-
size:
|
|
96
|
+
size: ie,
|
|
96
97
|
"aria-live": "assertive",
|
|
97
98
|
role: "alert",
|
|
98
|
-
id: `${
|
|
99
|
-
children:
|
|
99
|
+
id: `${W}-error`,
|
|
100
|
+
children: D
|
|
100
101
|
})
|
|
101
102
|
})
|
|
102
103
|
] });
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
id:
|
|
105
|
-
className:
|
|
106
|
-
role:
|
|
107
|
-
"aria-labelledby":
|
|
108
|
-
...
|
|
104
|
+
return /* @__PURE__ */ d("div", {
|
|
105
|
+
id: l,
|
|
106
|
+
className: Y,
|
|
107
|
+
role: F,
|
|
108
|
+
"aria-labelledby": F ? `${W}-label` : void 0,
|
|
109
|
+
...H,
|
|
109
110
|
onFocus: (e) => {
|
|
110
|
-
|
|
111
|
+
H.onFocus(), z?.(e);
|
|
111
112
|
},
|
|
112
113
|
onBlur: (e) => {
|
|
113
|
-
|
|
114
|
+
H.onBlur(e), B?.(e);
|
|
114
115
|
},
|
|
115
|
-
children:
|
|
116
|
+
children: N ? /* @__PURE__ */ d("fieldset", {
|
|
116
117
|
className: "pkt-inputwrapper__fieldset",
|
|
117
|
-
"aria-describedby":
|
|
118
|
-
disabled:
|
|
118
|
+
"aria-describedby": G,
|
|
119
|
+
disabled: O || void 0,
|
|
119
120
|
children: $
|
|
120
|
-
}) : /* @__PURE__ */
|
|
121
|
+
}) : /* @__PURE__ */ d("div", {
|
|
121
122
|
className: "pkt-inputwrapper__fieldset",
|
|
122
123
|
children: $
|
|
123
124
|
})
|
|
124
125
|
});
|
|
125
126
|
});
|
|
126
|
-
|
|
127
|
+
p.displayName = "PktInputWrapper";
|
|
127
128
|
//#endregion
|
|
128
|
-
export {
|
|
129
|
+
export { p as PktInputWrapper };
|
|
@@ -6,7 +6,7 @@ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
|
6
6
|
var o = /* @__PURE__ */ e(t(), 1), s = ({ href: e, iconName: t, className: s, iconPosition: c, external: l, target: u, renderLink: d, children: f, ...p }) => {
|
|
7
7
|
let m = {
|
|
8
8
|
"pkt-link": !0,
|
|
9
|
-
"pkt-link--icon-left": !!t && c === "left" ||
|
|
9
|
+
"pkt-link--icon-left": !!t && c === "left" || !(!t || c),
|
|
10
10
|
"pkt-link--icon-right": !!t && c === "right",
|
|
11
11
|
"pkt-link--external": l
|
|
12
12
|
}, h = /* @__PURE__ */ a(r, { children: [t && /* @__PURE__ */ i(n, {
|
|
@@ -11,18 +11,10 @@ var s = r(({ children: r, active: s, disabled: c = !1, href: l, onClick: u, icon
|
|
|
11
11
|
"aria-controls": f,
|
|
12
12
|
role: _ ? "tab" : void 0,
|
|
13
13
|
onKeyDown: (e) => {
|
|
14
|
-
|
|
15
|
-
e.preventDefault(), e.stopPropagation();
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
y(h, e);
|
|
14
|
+
c && (e.key === "Enter" || e.key === " " || e.key === "Spacebar") ? (e.preventDefault(), e.stopPropagation()) : y(h, e);
|
|
19
15
|
},
|
|
20
16
|
onClick: (e) => {
|
|
21
|
-
|
|
22
|
-
e.preventDefault(), e.stopPropagation();
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
b(h), u?.(e);
|
|
17
|
+
c ? (e.preventDefault(), e.stopPropagation()) : (b(h), u?.(e));
|
|
26
18
|
},
|
|
27
19
|
tabIndex: c ? -1 : x || !_ ? void 0 : -1,
|
|
28
20
|
ref: (e) => {
|
|
@@ -2,7 +2,7 @@ import e from "../toDate.js";
|
|
|
2
2
|
//#region ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
3
3
|
function t(t) {
|
|
4
4
|
let n = e(t), r = new Date(Date.UTC(n.getFullYear(), n.getMonth(), n.getDate(), n.getHours(), n.getMinutes(), n.getSeconds(), n.getMilliseconds()));
|
|
5
|
-
return r.setUTCFullYear(n.getFullYear()), t -
|
|
5
|
+
return r.setUTCFullYear(n.getFullYear()), +t - r;
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
8
|
export { t as getTimezoneOffsetInMilliseconds };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
//#region ../../node_modules/date-fns/constants.js
|
|
2
|
-
var e =
|
|
3
|
-
-
|
|
4
|
-
var
|
|
5
|
-
a * 7;
|
|
6
|
-
var o = a * e, s = o / 12;
|
|
7
|
-
s * 3;
|
|
8
|
-
var c = Symbol.for("constructDateFrom");
|
|
2
|
+
var e = 10 ** 8 * 24 * 60 * 60 * 1e3;
|
|
3
|
+
-e;
|
|
4
|
+
var t = 6048e5, n = 864e5, r = Symbol.for("constructDateFrom");
|
|
9
5
|
//#endregion
|
|
10
|
-
export {
|
|
6
|
+
export { r as constructFromSymbol, e as maxTime, n as millisecondsInDay, t as millisecondsInWeek };
|
|
@@ -4,7 +4,7 @@ import n from "./startOfISOWeek.js";
|
|
|
4
4
|
import r from "./startOfISOWeekYear.js";
|
|
5
5
|
//#region ../../node_modules/date-fns/getISOWeek.js
|
|
6
6
|
function i(i, a) {
|
|
7
|
-
let o = t(i, a?.in), s = n(o) -
|
|
7
|
+
let o = t(i, a?.in), s = +n(o) - r(o);
|
|
8
8
|
return Math.round(s / e) + 1;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
@@ -4,7 +4,7 @@ import n from "./startOfWeek.js";
|
|
|
4
4
|
import r from "./startOfWeekYear.js";
|
|
5
5
|
//#region ../../node_modules/date-fns/getWeek.js
|
|
6
6
|
function i(i, a) {
|
|
7
|
-
let o = t(i, a?.in), s = n(o, a) -
|
|
7
|
+
let o = t(i, a?.in), s = +n(o, a) - r(o, a);
|
|
8
8
|
return Math.round(s / e) + 1;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|