@oslokommune/punkt-react 20.0.3 → 20.0.5
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/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/defineProperty.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPrimitive.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/toPropertyKey.js +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.156.0}/helpers/esm/typeof.js +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/components/accordion/Accordion.js +1 -2
- package/dist/components/accordion/AccordionItem.js +9 -10
- package/dist/components/alert/Alert.js +7 -8
- package/dist/components/backlink/BackLink.js +1 -2
- package/dist/components/breadcrumbs/Breadcrumbs.js +1 -2
- package/dist/components/button/Button.js +1 -2
- package/dist/components/calendar/Calendar.js +1 -2
- package/dist/components/calendar/CalendarGrid.js +1 -2
- package/dist/components/calendar/CalendarNav.js +5 -6
- package/dist/components/calendar/calendar-utils.js +1 -2
- package/dist/components/calendar/useCalendarState.js +90 -91
- package/dist/components/card/Card.js +14 -15
- package/dist/components/checkbox/Checkbox.js +3 -8
- package/dist/components/checkboxgroup/CheckboxGroup.js +10 -11
- package/dist/components/checkboxgroup/CheckboxGroupContext.js +1 -2
- package/dist/components/combobox/Combobox.js +5 -6
- package/dist/components/combobox/ComboboxInput.js +6 -7
- package/dist/components/combobox/ComboboxTags.js +11 -12
- package/dist/components/combobox/Listbox.js +25 -26
- package/dist/components/combobox/useComboboxState.js +38 -39
- package/dist/components/consent/Consent.js +6 -7
- package/dist/components/datepicker/DateTags.js +14 -15
- package/dist/components/datepicker/Datepicker.js +1 -2
- package/dist/components/datepicker/DatepickerInputs.js +1 -2
- package/dist/components/datepicker/DatepickerPopup.js +5 -6
- package/dist/components/datepicker/useDatepickerState.js +20 -21
- package/dist/components/fileupload/DropZone.js +6 -7
- package/dist/components/fileupload/FileUpload.js +36 -37
- package/dist/components/fileupload/FileUploadContext.js +1 -2
- package/dist/components/fileupload/QueueDisplay.js +12 -13
- package/dist/components/fileupload/QueueItemContent.js +14 -15
- package/dist/components/fileupload/Subcomponents.js +70 -71
- package/dist/components/fileupload/Truncate.js +1 -2
- package/dist/components/fileupload/extensions/Comments.js +21 -22
- package/dist/components/fileupload/extensions/Remove.js +1 -2
- package/dist/components/fileupload/extensions/Rename.js +8 -9
- package/dist/components/fileupload/hooks/useFileAttributes.js +1 -2
- package/dist/components/fileupload/hooks/useImageObjectUrl.js +1 -2
- package/dist/components/fileupload/hooks/useImagePreview.js +1 -2
- package/dist/components/fileupload/hooks/useOperationState.js +1 -2
- package/dist/components/fileupload/hooks/useRequiredFormValidation.js +1 -2
- package/dist/components/fileupload/types.js +4 -5
- package/dist/components/footer/Footer.js +23 -24
- package/dist/components/footer/FooterGlobal.js +24 -25
- package/dist/components/footerSimple/FooterSimple.js +5 -6
- package/dist/components/header/Header.js +1 -2
- package/dist/components/header/HeaderGlobal.js +127 -128
- package/dist/components/header/HeaderService.js +84 -85
- package/dist/components/header-menu/HeaderMenu.js +34 -35
- package/dist/components/headerUserMenu/UserMenu.js +14 -15
- package/dist/components/heading/Heading.js +1 -2
- package/dist/components/helptext/Helptext.js +5 -6
- package/dist/components/icon/Icon.js +2 -3
- package/dist/components/input/Input.js +1 -2
- package/dist/components/inputwrapper/InputWrapper.js +12 -17
- package/dist/components/link/Link.js +1 -2
- package/dist/components/linkcard/LinkCard.js +2 -3
- package/dist/components/loader/Loader.js +2 -3
- package/dist/components/messagebox/Messagebox.js +6 -7
- package/dist/components/modal/Modal.js +13 -14
- package/dist/components/progressbar/Progressbar.js +5 -6
- package/dist/components/radio/RadioButton.js +3 -8
- package/dist/components/radiogroup/RadioGroup.js +1 -2
- package/dist/components/radiogroup/RadioGroupContext.js +1 -2
- package/dist/components/searchinput/SearchInput.js +11 -12
- package/dist/components/select/Select.js +6 -7
- package/dist/components/stepper/Step.js +1 -2
- package/dist/components/stepper/Stepper.js +1 -2
- package/dist/components/strings/PktStringsProvider.js +1 -2
- package/dist/components/table/Table.js +2 -3
- package/dist/components/table/TableBody.js +1 -2
- package/dist/components/table/TableDataCell.js +1 -2
- package/dist/components/table/TableHeader.js +1 -2
- package/dist/components/table/TableHeaderCell.js +1 -2
- package/dist/components/table/TableRow.js +1 -2
- package/dist/components/tabs/TabItem.js +1 -2
- package/dist/components/tabs/Tabs.js +5 -6
- package/dist/components/tag/Tag.js +6 -7
- package/dist/components/textarea/Textarea.js +5 -6
- package/dist/components/textinput/Textinput.js +6 -7
- package/dist/components/timepicker/Timepicker.js +6 -7
- package/dist/components/timepicker/useTimepickerState.js +27 -28
- package/dist/hooks/useElementWidth.js +1 -2
- package/dist/hooks/useFocusModality.js +1 -2
- package/dist/hooks/useGeneratedId.js +1 -2
- package/dist/hooks/useHeaderChrome.js +1 -2
- package/dist/hooks/useOptionGroupField.js +1 -2
- package/dist/hooks/useOwnerForm.js +1 -2
- package/dist/hooks/usePktStrings.js +1 -2
- package/dist/hooks/useScrollLock.js +1 -2
- package/dist/node_modules/@date-fns/tz/date/index.js +1 -2
- package/dist/node_modules/@date-fns/tz/date/mini.js +1 -2
- package/dist/node_modules/@date-fns/tz/index.js +3 -3
- package/dist/node_modules/@date-fns/tz/tzName/index.js +1 -2
- package/dist/node_modules/@date-fns/tz/tzOffset/index.js +1 -2
- package/dist/node_modules/classnames/index.js +1 -2
- package/dist/node_modules/date-fns/_lib/addLeadingZeros.js +1 -2
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +1 -2
- package/dist/node_modules/date-fns/_lib/format/formatters.js +18 -19
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +1 -2
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +1 -2
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +1 -2
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +1 -2
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +1 -2
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +1 -2
- package/dist/node_modules/date-fns/addDays.js +1 -2
- package/dist/node_modules/date-fns/constants.js +1 -2
- package/dist/node_modules/date-fns/constructFrom.js +1 -2
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +6 -7
- package/dist/node_modules/date-fns/eachDayOfInterval.js +5 -6
- package/dist/node_modules/date-fns/endOfDay.js +1 -2
- package/dist/node_modules/date-fns/format.js +15 -16
- package/dist/node_modules/date-fns/getDayOfYear.js +6 -7
- package/dist/node_modules/date-fns/getISODay.js +1 -2
- package/dist/node_modules/date-fns/getISOWeek.js +5 -6
- package/dist/node_modules/date-fns/getISOWeekYear.js +6 -7
- package/dist/node_modules/date-fns/getWeek.js +5 -6
- package/dist/node_modules/date-fns/getWeekYear.js +8 -9
- package/dist/node_modules/date-fns/isDate.js +1 -2
- package/dist/node_modules/date-fns/isValid.js +4 -5
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -2
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -2
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -2
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +1 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +1 -2
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -1
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -1
- package/dist/node_modules/date-fns/locale/en-US.js +1 -2
- package/dist/node_modules/date-fns/startOfDay.js +1 -2
- package/dist/node_modules/date-fns/startOfISOWeek.js +1 -2
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +5 -6
- package/dist/node_modules/date-fns/startOfWeek.js +4 -5
- package/dist/node_modules/date-fns/startOfWeekYear.js +7 -8
- package/dist/node_modules/date-fns/startOfYear.js +1 -2
- package/dist/node_modules/date-fns/toDate.js +1 -2
- package/dist/punkt-react.cjs +1 -1
- package/dist/shared-strings/consent.js +1 -2
- package/dist/shared-strings/format.js +1 -2
- package/dist/shared-strings/nb.js +1 -2
- package/dist/shared-strings/resolve.js +1 -2
- package/dist/shared-strings/store.js +1 -2
- package/dist/shared-types/accordion.js +1 -2
- package/dist/shared-types/calendar.js +1 -2
- package/dist/shared-types/card.js +1 -2
- package/dist/shared-types/checkbox.js +1 -2
- package/dist/shared-types/combobox.js +1 -2
- package/dist/shared-types/consent.js +1 -2
- package/dist/shared-types/footer.js +1 -2
- package/dist/shared-types/header-footer.js +1 -2
- package/dist/shared-types/icon.js +1 -2
- package/dist/shared-types/input-wrapper.js +1 -2
- package/dist/shared-types/linkcard.js +1 -2
- package/dist/shared-types/loader.js +1 -2
- package/dist/shared-types/messagebox.js +1 -2
- package/dist/shared-types/option-group.js +1 -2
- package/dist/shared-types/progressbar.js +1 -2
- package/dist/shared-types/radiobutton.js +1 -2
- package/dist/shared-types/select.js +1 -2
- package/dist/shared-types/size.js +1 -2
- package/dist/shared-types/table.js +1 -2
- package/dist/shared-types/tag.js +1 -2
- package/dist/shared-types/textarea.js +1 -2
- package/dist/shared-types/textinput.js +1 -2
- package/dist/shared-utils/calendar/calendar-grid.js +4 -5
- package/dist/shared-utils/calendar/date-validation.js +1 -2
- package/dist/shared-utils/calendar/keyboard-navigation.js +1 -2
- package/dist/shared-utils/calendar/selection-manager.js +31 -32
- package/dist/shared-utils/combobox/input-utils.js +1 -2
- package/dist/shared-utils/combobox/keyboard-navigation.js +1 -2
- package/dist/shared-utils/combobox/option-utils.js +1 -2
- package/dist/shared-utils/date-utils.js +10 -11
- package/dist/shared-utils/datepicker-utils.js +4 -5
- package/dist/shared-utils/device-utils.js +1 -2
- package/dist/shared-utils/fileupload/announcements.js +1 -2
- package/dist/shared-utils/fileupload/filename.js +1 -2
- package/dist/shared-utils/fileupload/formats.js +1 -2
- package/dist/shared-utils/fileupload/navigation.js +1 -2
- package/dist/shared-utils/fileupload/size.js +1 -2
- package/dist/shared-utils/fileupload/transfers.js +1 -2
- package/dist/shared-utils/fileupload/truncate.js +1 -2
- package/dist/shared-utils/fileupload/validation.js +8 -9
- package/dist/shared-utils/focus-trap/index.js +13 -31
- package/dist/shared-utils/forms/described-by.js +1 -2
- package/dist/shared-utils/header-footer/external-domain.js +1 -2
- package/dist/shared-utils/header-footer/fetch-header-footer-data.js +1 -2
- package/dist/shared-utils/header-footer/icon-map.js +1 -2
- package/dist/shared-utils/header-footer/select-megamenu.js +1 -2
- package/dist/shared-utils/scroll-lock/index.js +1 -2
- package/dist/shared-utils/timepicker/options.js +1 -2
- package/dist/shared-utils/timepicker/stepper.js +1 -2
- package/dist/shared-utils/timepicker/time-utils.js +1 -2
- package/dist/shared-utils/value-utils.js +1 -2
- package/dist/utils/nativeInputValue.js +1 -2
- package/dist/utils/stableKeys.js +1 -2
- package/dist/utils/stringutils.js +1 -2
- package/package.json +20 -21
- package/src/components/accordion/Accordion.test.tsx +2 -4
- package/src/components/tag/Tag.tsx +0 -1
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
|
+
## [20.0.5](https://github.com/oslokommune/punkt/compare/20.0.4...20.0.5) (2026-11-09)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
## [20.1.0](https://github.com/oslokommune/punkt/compare/20.0.2...20.1.0) (2026-11-06)
|
|
9
14
|
|
|
10
15
|
### Bug Fixes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./toPropertyKey.js";
|
|
2
|
-
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
3
3
|
function t(t, n, r) {
|
|
4
4
|
return (n = e(n)) in t ? Object.defineProperty(t, n, {
|
|
5
5
|
value: r,
|
|
@@ -8,5 +8,4 @@ function t(t, n, r) {
|
|
|
8
8
|
writable: !0
|
|
9
9
|
}) : t[n] = r, t;
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./typeof.js";
|
|
2
|
-
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
3
3
|
function t(t, n) {
|
|
4
4
|
if (e(t) != "object" || !t) return t;
|
|
5
5
|
var r = t[Symbol.toPrimitive];
|
|
@@ -10,5 +10,4 @@ function t(t, n) {
|
|
|
10
10
|
}
|
|
11
11
|
return (n === "string" ? String : Number)(t);
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
13
|
export { t as default };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import e from "./typeof.js";
|
|
2
2
|
import t from "./toPrimitive.js";
|
|
3
|
-
|
|
3
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
4
4
|
function n(n) {
|
|
5
5
|
var r = t(n, "string");
|
|
6
6
|
return e(r) == "symbol" ? r : r + "";
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
2
2
|
function e(t) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -7,5 +7,4 @@ function e(t) {
|
|
|
7
7
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
8
|
}, e(t);
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
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),
|
|
@@ -9,5 +9,4 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
9
9
|
value: n,
|
|
10
10
|
enumerable: !0
|
|
11
11
|
}) : o, n));
|
|
12
|
-
//#endregion
|
|
13
12
|
export { o as __commonJSMin, c as __toESM };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext as e, forwardRef as t, useContext as n } from "react";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/accordion/Accordion.tsx
|
|
5
5
|
var i = e({}), a = () => n(i), o = t(({ compact: e = !1, skin: t = "borderless", ariaLabelledBy: n, children: a, name: o, className: s }, c) => {
|
|
6
6
|
let l = [
|
|
7
7
|
"pkt-accordion",
|
|
@@ -24,5 +24,4 @@ var i = e({}), a = () => n(i), o = t(({ compact: e = !1, skin: t = "borderless",
|
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
o.displayName = "PktAccordion";
|
|
27
|
-
//#endregion
|
|
28
27
|
export { o as PktAccordion, a as useAccordionContext };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAccordionContext as e } from "./Accordion.js";
|
|
3
|
-
import { ACCORDION_LIGHT_ONLY_SKINS as t } from "../../shared-types/accordion.js";
|
|
4
2
|
import "../../shared-types/index.js";
|
|
5
|
-
import {
|
|
3
|
+
import { ACCORDION_LIGHT_ONLY_SKINS as e } from "../../shared-types/accordion.js";
|
|
4
|
+
import { PktIcon as t } from "../icon/Icon.js";
|
|
5
|
+
import { useAccordionContext as n } from "./Accordion.js";
|
|
6
6
|
import { forwardRef as r, useState as i } from "react";
|
|
7
7
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/accordion/AccordionItem.tsx
|
|
9
9
|
var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isOpen: f, children: p, name: m, className: h, onClick: g, onToggle: _ }, v) => {
|
|
10
|
-
let [y, b] = i(r), { name: x, skin: S } =
|
|
10
|
+
let [y, b] = i(r), { name: x, skin: S } = n(), C = m || x, w = u || S, T = f === void 0 ? y : f, E = (e) => {
|
|
11
11
|
let t = e.currentTarget.open;
|
|
12
12
|
t !== T && (f === void 0 && b(t), _?.(e));
|
|
13
13
|
}, D = (e) => {
|
|
@@ -28,19 +28,19 @@ var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isO
|
|
|
28
28
|
onClick: D,
|
|
29
29
|
name: C,
|
|
30
30
|
onToggle: E,
|
|
31
|
-
"data-mode": w &&
|
|
31
|
+
"data-mode": w && e.includes(w) ? "light" : void 0,
|
|
32
32
|
children: [/* @__PURE__ */ s("summary", {
|
|
33
33
|
className: "pkt-accordion-item__title",
|
|
34
34
|
id: `pkt-accordion-item-summary-${c}`,
|
|
35
|
-
children: [l, w === "plus-minus" ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(
|
|
35
|
+
children: [l, w === "plus-minus" ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(t, {
|
|
36
36
|
name: "plus-sign",
|
|
37
37
|
className: "pkt-accordion-item__icon pkt-accordion-item__icon--plus",
|
|
38
38
|
"aria-hidden": "true"
|
|
39
|
-
}), /* @__PURE__ */ o(
|
|
39
|
+
}), /* @__PURE__ */ o(t, {
|
|
40
40
|
name: "minus-sign",
|
|
41
41
|
className: "pkt-accordion-item__icon pkt-accordion-item__icon--minus",
|
|
42
42
|
"aria-hidden": "true"
|
|
43
|
-
})] }) : /* @__PURE__ */ o(
|
|
43
|
+
})] }) : /* @__PURE__ */ o(t, {
|
|
44
44
|
name: "chevron-thin-down",
|
|
45
45
|
className: "pkt-accordion-item__icon",
|
|
46
46
|
"aria-hidden": "true"
|
|
@@ -57,5 +57,4 @@ var c = r(({ defaultOpen: r = !1, id: c, title: l, skin: u, compact: d = !1, isO
|
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
c.displayName = "PktAccordionItem";
|
|
60
|
-
//#endregion
|
|
61
60
|
export { c as PktAccordionItem };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { require_classnames as t } from "../../node_modules/classnames/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { formatString as n } from "../../shared-strings/format.js";
|
|
5
|
+
import { PktButton as r } from "../button/Button.js";
|
|
6
|
+
import { PktIcon as i } from "../icon/Icon.js";
|
|
7
7
|
import { usePktStrings as a } from "../../hooks/usePktStrings.js";
|
|
8
8
|
import { useCallback as o, useState as s } from "react";
|
|
9
9
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/alert/Alert.tsx
|
|
11
11
|
var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d, size: f = d ? "small" : "medium", title: p, date: m, ariaLive: h, "aria-live": g = "polite", role: _ = "status", skin: v = "info", className: y, strings: b, ...x }) => {
|
|
12
12
|
let [S, C] = s(!1), w = a(["generic", "alert"], b), T = {
|
|
13
13
|
"pkt-alert": !0,
|
|
@@ -33,14 +33,14 @@ var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d
|
|
|
33
33
|
children: /* @__PURE__ */ l("div", {
|
|
34
34
|
className: (0, u.default)(E),
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ c(
|
|
36
|
+
/* @__PURE__ */ c(i, {
|
|
37
37
|
className: "pkt-alert__icon",
|
|
38
38
|
"aria-hidden": "true",
|
|
39
39
|
name: v === "info" ? "alert-information" : `alert-${v}`
|
|
40
40
|
}),
|
|
41
41
|
t && /* @__PURE__ */ c("div", {
|
|
42
42
|
className: "pkt-alert__close",
|
|
43
|
-
children: /* @__PURE__ */ c(
|
|
43
|
+
children: /* @__PURE__ */ c(r, {
|
|
44
44
|
tabIndex: 0,
|
|
45
45
|
"aria-label": w.generic.close,
|
|
46
46
|
size: f,
|
|
@@ -65,12 +65,11 @@ var u = /* @__PURE__ */ e(t(), 1), d = ({ children: e, closeAlert: t, compact: d
|
|
|
65
65
|
}),
|
|
66
66
|
m && /* @__PURE__ */ c("div", {
|
|
67
67
|
className: "pkt-alert__date",
|
|
68
|
-
children:
|
|
68
|
+
children: n(w.alert.lastUpdated, { date: m })
|
|
69
69
|
})
|
|
70
70
|
]
|
|
71
71
|
})
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
74
|
d.displayName = "PktAlert";
|
|
75
|
-
//#endregion
|
|
76
75
|
export { d as PktAlert };
|
|
@@ -3,7 +3,7 @@ import { PktIcon as e } from "../icon/Icon.js";
|
|
|
3
3
|
import { usePktStrings as t } from "../../hooks/usePktStrings.js";
|
|
4
4
|
import { forwardRef as n } from "react";
|
|
5
5
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/backlink/BackLink.tsx
|
|
7
7
|
var o = n(({ href: n = "/", text: o = "Forsiden", ariaLabel: s, renderLink: c, className: l, strings: u, ...d }, f) => {
|
|
8
8
|
let p = /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(e, {
|
|
9
9
|
className: "pkt-back-link__icon pkt-icon pkt-link__icon",
|
|
@@ -31,5 +31,4 @@ var o = n(({ href: n = "/", text: o = "Forsiden", ariaLabel: s, renderLink: c, c
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
o.displayName = "PktBackLink";
|
|
34
|
-
//#endregion
|
|
35
34
|
export { o as PktBackLink };
|
|
@@ -5,7 +5,7 @@ import { withStableKeys as n } from "../../utils/stableKeys.js";
|
|
|
5
5
|
import { forwardRef as r } from "react";
|
|
6
6
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
import { Link as s } from "react-router-dom";
|
|
8
|
-
|
|
8
|
+
// src/components/breadcrumbs/Breadcrumbs.tsx
|
|
9
9
|
var c = r(({ breadcrumbs: r, navigationType: c, renderLink: l, className: u, strings: d, ...f }, p) => {
|
|
10
10
|
let m = r, h = m[m.length - 2], g = t(["breadcrumbs"], d), _ = [u, "pkt-breadcrumbs"].filter(Boolean).join(" "), v = l || (c === "router" ? ({ href: e, className: t, children: n, props: r }) => /* @__PURE__ */ a(s, {
|
|
11
11
|
to: e,
|
|
@@ -63,5 +63,4 @@ var c = r(({ breadcrumbs: r, navigationType: c, renderLink: l, className: u, str
|
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
c.displayName = "PktBreadcrumbs";
|
|
66
|
-
//#endregion
|
|
67
66
|
export { c as PktBreadcrumbs };
|
|
@@ -4,7 +4,7 @@ import "../../shared-types/index.js";
|
|
|
4
4
|
import { PktIcon as t } from "../icon/Icon.js";
|
|
5
5
|
import { forwardRef as n } from "react";
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/button/Button.tsx
|
|
8
8
|
typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || "https://punkt-cdn.oslo.kommune.no/latest/animations/");
|
|
9
9
|
var a = n(({ children: n, className: a, iconName: o = "user", secondIconName: s = "user", iconPath: c, secondIconPath: l, size: u = "medium", fullWidth: d = !1, fullWidthOnMobile: f = !1, skin: p = "primary", type: m = "button", variant: h = "label-only", state: g, color: _, isLoading: v = void 0, disabled: y = void 0, loadingAnimationPath: b = typeof window < "u" ? window.pktAnimationPath : e, ...x }, S) => {
|
|
10
10
|
let C = [
|
|
@@ -51,5 +51,4 @@ var a = n(({ children: n, className: a, iconName: o = "user", secondIconName: s
|
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
a.displayName = "PktButton";
|
|
54
|
-
//#endregion
|
|
55
54
|
export { a as PktButton };
|
|
@@ -4,7 +4,7 @@ import { CalendarNav as t } from "./CalendarNav.js";
|
|
|
4
4
|
import { CalendarGrid as n } from "./CalendarGrid.js";
|
|
5
5
|
import { forwardRef as r, useImperativeHandle as i } from "react";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/calendar/Calendar.tsx
|
|
8
8
|
var s = r((r, s) => {
|
|
9
9
|
let c = e(r);
|
|
10
10
|
return i(s, () => ({
|
|
@@ -45,5 +45,4 @@ var s = r((r, s) => {
|
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
s.displayName = "PktCalendar";
|
|
48
|
-
//#endregion
|
|
49
48
|
export { s as PktCalendar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { calculateCalendarDimensions as e, getCellType as t } from "../../shared-utils/calendar/calendar-grid.js";
|
|
2
2
|
import { getDayButtonClasses as n, getDayCellClasses as r, getDayViewData as i } from "./calendar-utils.js";
|
|
3
3
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/calendar/CalendarGrid.tsx
|
|
5
5
|
var s = ({ state: s }) => {
|
|
6
6
|
let { strings: c, year: l, month: u, activeSelected: d, focusedDate: f, inRange: p, rangeHovered: m, range: h, multiple: g, weeknumbers: _, selectableDatesRef: v, tabIndexSetRef: y, handleDateSelect: b, handleRangeHover: x, isExcluded: S, isDayDisabled: C, setFocusedDate: w, todayDate: T } = s, E = {
|
|
7
7
|
year: l,
|
|
@@ -95,5 +95,4 @@ var s = ({ state: s }) => {
|
|
|
95
95
|
})() })]
|
|
96
96
|
});
|
|
97
97
|
};
|
|
98
|
-
//#endregion
|
|
99
98
|
export { s as CalendarGrid };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isNextMonthAllowed as e, isPrevMonthAllowed as t } from "../../shared-utils/calendar/date-validation.js";
|
|
2
|
+
import { PktIcon as n } from "../icon/Icon.js";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/calendar/CalendarNav.tsx
|
|
5
5
|
var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u, withcontrols: d, prevMonth: f, nextMonth: p, changeMonth: m }) => {
|
|
6
6
|
let h = (a) => {
|
|
7
|
-
let d = a === "prev", m = d ?
|
|
7
|
+
let d = a === "prev", m = d ? t(s, c, l) : e(s, c, u), h = d ? o.prevMonth : o.nextMonth, g = d ? "chevron-thin-left" : "chevron-thin-right", _ = d ? "pkt-calendar__prev-month" : "pkt-calendar__next-month", v = d ? f : p;
|
|
8
8
|
return /* @__PURE__ */ r("div", { children: /* @__PURE__ */ i("button", {
|
|
9
9
|
type: "button",
|
|
10
10
|
"aria-label": h,
|
|
@@ -20,7 +20,7 @@ var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u
|
|
|
20
20
|
"data-disabled": m ? void 0 : "disabled",
|
|
21
21
|
"aria-disabled": !m || void 0,
|
|
22
22
|
tabIndex: m ? 0 : -1,
|
|
23
|
-
children: [/* @__PURE__ */ r(
|
|
23
|
+
children: [/* @__PURE__ */ r(n, {
|
|
24
24
|
className: "pkt-btn__icon",
|
|
25
25
|
name: g
|
|
26
26
|
}), /* @__PURE__ */ r("span", {
|
|
@@ -85,5 +85,4 @@ var a = ({ componentId: a, strings: o, year: s, month: c, earliest: l, latest: u
|
|
|
85
85
|
]
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
|
-
//#endregion
|
|
89
88
|
export { a as CalendarNav };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __toESM as e } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { require_classnames as t } from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { formatISODate as n, formatReadableDate as r, newDateYMD as i } from "../../shared-utils/date-utils.js";
|
|
4
|
-
|
|
4
|
+
// src/components/calendar/calendar-utils.ts
|
|
5
5
|
var a = /* @__PURE__ */ e(t(), 1);
|
|
6
6
|
function o(e, t, a) {
|
|
7
7
|
let o = i(a.year, a.month, e), s = n(o), c = s === n(t), l = a.activeSelected.includes(s), u = a.isDayDisabled(o, l), d;
|
|
@@ -40,5 +40,4 @@ function c(e, t) {
|
|
|
40
40
|
"pkt-calendar__date--range-end": l
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { c as getDayButtonClasses, s as getDayCellClasses, o as getDayViewData };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { formatISODate as e, newDate as t, newDateFromDate as n, parseISODateString as r, todayInTz as i } from "../../shared-utils/date-utils.js";
|
|
2
|
+
import { CALENDAR_DEFAULTS as a } from "../../shared-types/calendar.js";
|
|
3
|
+
import { isDateExcluded as o, isDayDisabled as ee } from "../../shared-utils/calendar/date-validation.js";
|
|
4
|
+
import { addToSelection as te, convertSelectedToDates as ne, handleRangeSelection as re, isRangeAllowed as ie, removeFromSelection as ae, toggleSelection as s, updateRangeMap as c } from "../../shared-utils/calendar/selection-manager.js";
|
|
5
|
+
import { findNextSelectableDate as oe, getKeyDirection as se, shouldIgnoreKeyboardEvent as ce } from "../../shared-utils/calendar/keyboard-navigation.js";
|
|
6
|
+
import { usePktStrings as le } from "../../hooks/usePktStrings.js";
|
|
7
7
|
import { useCallback as l, useId as ue, useMemo as u, useRef as d, useState as f } from "react";
|
|
8
|
-
|
|
8
|
+
// src/components/calendar/useCalendarState.ts
|
|
9
9
|
function p(p) {
|
|
10
|
-
let { selected: m, multiple: h =
|
|
10
|
+
let { selected: m, multiple: h = a.multiple, maxMultiple: g = a.maxMultiple, range: _ = a.range, earliest: v = a.earliest, latest: y = a.latest, excludedates: b, excludeweekdays: x = [], weeknumbers: de = a.weeknumbers, withcontrols: fe = a.withcontrols, currentmonth: S, today: C, strings: pe, onDateSelected: w, onClose: T, id: me, className: he } = p, ge = ue(), _e = me ?? ge, E = le(["dates", "calendar"], pe), ve = u(() => ({
|
|
11
11
|
month: E.dates.month,
|
|
12
12
|
year: E.dates.year,
|
|
13
13
|
week: E.dates.week,
|
|
@@ -16,33 +16,33 @@ function p(p) {
|
|
|
16
16
|
months: E.dates.months,
|
|
17
17
|
prevMonth: E.calendar.prevMonth,
|
|
18
18
|
nextMonth: E.calendar.nextMonth
|
|
19
|
-
}), [E]), D = u(() => C ?
|
|
20
|
-
let e = j.length > 0 && j[0] !== "" ?
|
|
19
|
+
}), [E]), D = u(() => C ? r(C) : i(), [C]), O = u(() => b ? b.map((e) => typeof e == "string" ? r(e) : e) : [], [b]), k = m !== void 0, [ye, A] = f([]), j = k ? m : ye, M = u(() => ne(j), [j]), N = () => {
|
|
20
|
+
let e = j.length > 0 && j[0] !== "" ? r(j[j.length - 1]) : null;
|
|
21
21
|
if (e && !isNaN(e.getTime())) return e;
|
|
22
22
|
let t = null;
|
|
23
|
-
if (S instanceof Date ? t =
|
|
24
|
-
let e = typeof y == "string" ?
|
|
23
|
+
if (S instanceof Date ? t = n(S) : typeof S == "string" && (t = r(S)), (!t || isNaN(t.getTime())) && (t = n(D)), y) {
|
|
24
|
+
let e = typeof y == "string" ? r(y) : y;
|
|
25
25
|
!isNaN(e.getTime()) && t > e && (t = e);
|
|
26
26
|
}
|
|
27
27
|
if (v) {
|
|
28
|
-
let e = typeof v == "string" ?
|
|
28
|
+
let e = typeof v == "string" ? r(v) : v;
|
|
29
29
|
!isNaN(e.getTime()) && t < e && (t = e);
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
|
-
}, [P, F] = f(() => N().getFullYear()), [I, L] = f(() => N().getMonth()), [
|
|
33
|
-
if (j !==
|
|
34
|
-
let e =
|
|
32
|
+
}, [P, F] = f(() => N().getFullYear()), [I, L] = f(() => N().getMonth()), [be, R] = f(() => _ && M.length === 2 ? c(M[0], M[1]) : {}), [xe, z] = f(null), [B, V] = f(null), H = d(null), U = d([]), W = d(0), [Se, Ce] = f(!1), [we, Te] = f(j);
|
|
33
|
+
if (j !== we && (Te(j), !Se && j.length > 0 && j[0] !== "")) {
|
|
34
|
+
let e = r(j[j.length - 1]);
|
|
35
35
|
isNaN(e.getTime()) || (F(e.getFullYear()), L(e.getMonth()));
|
|
36
36
|
}
|
|
37
|
-
let [
|
|
37
|
+
let [G, Ee] = f({
|
|
38
38
|
range: _,
|
|
39
39
|
_selected: M
|
|
40
40
|
});
|
|
41
|
-
(_ !==
|
|
41
|
+
(_ !== G.range || M !== G._selected) && (Ee({
|
|
42
42
|
range: _,
|
|
43
43
|
_selected: M
|
|
44
|
-
}), _ && M.length === 2 ?
|
|
45
|
-
let
|
|
44
|
+
}), _ && M.length === 2 ? R(c(M[0], M[1])) : (!_ || M.length < 2) && R({}));
|
|
45
|
+
let K = u(() => ({
|
|
46
46
|
earliest: v,
|
|
47
47
|
latest: y,
|
|
48
48
|
excludedates: O,
|
|
@@ -52,109 +52,109 @@ function p(p) {
|
|
|
52
52
|
y,
|
|
53
53
|
O,
|
|
54
54
|
x
|
|
55
|
-
]),
|
|
55
|
+
]), q = l((e) => {
|
|
56
56
|
k || A(e), w?.(e);
|
|
57
|
-
}, [k, w]),
|
|
57
|
+
}, [k, w]), J = l(() => {
|
|
58
58
|
T?.();
|
|
59
|
-
}, [T]),
|
|
60
|
-
F(typeof e == "string" ? parseInt(e) : e), L(typeof t == "string" ? parseInt(t) : t),
|
|
61
|
-
}, []),
|
|
59
|
+
}, [T]), Y = l((e, t) => {
|
|
60
|
+
F(typeof e == "string" ? parseInt(e) : e), L(typeof t == "string" ? parseInt(t) : t), W.current = 0, V(null), U.current = [], Ce(!0);
|
|
61
|
+
}, []), De = l(() => {
|
|
62
62
|
let e = I === 0 ? 11 : I - 1, t = I === 0 ? P - 1 : P;
|
|
63
|
-
|
|
63
|
+
Y(t, e);
|
|
64
64
|
}, [
|
|
65
65
|
P,
|
|
66
66
|
I,
|
|
67
|
-
|
|
68
|
-
]),
|
|
67
|
+
Y
|
|
68
|
+
]), Oe = l(() => {
|
|
69
69
|
let e = I === 11 ? 0 : I + 1, t = I === 11 ? P + 1 : P;
|
|
70
|
-
|
|
70
|
+
Y(t, e);
|
|
71
71
|
}, [
|
|
72
72
|
P,
|
|
73
73
|
I,
|
|
74
|
-
|
|
75
|
-
]),
|
|
74
|
+
Y
|
|
75
|
+
]), ke = l((e) => o(e, K), [K]), Ae = l((e, t) => ee(e, t, K, {
|
|
76
76
|
multiple: h,
|
|
77
77
|
maxMultiple: g,
|
|
78
78
|
selectedCount: j.length
|
|
79
79
|
}), [
|
|
80
|
-
|
|
80
|
+
K,
|
|
81
81
|
h,
|
|
82
82
|
g,
|
|
83
83
|
j.length
|
|
84
|
-
]),
|
|
85
|
-
!_ || M.length !== 1 || !
|
|
84
|
+
]), X = l(() => typeof j == "string" ? j.split(",") : j, [j]), je = l((e) => {
|
|
85
|
+
!_ || M.length !== 1 || !ie(e, M, O, x) || M[0] >= e ? z(null) : (z(e), R(c(M[0], e)));
|
|
86
86
|
}, [
|
|
87
87
|
_,
|
|
88
88
|
M,
|
|
89
89
|
O,
|
|
90
90
|
x
|
|
91
|
-
]),
|
|
92
|
-
if (!
|
|
93
|
-
let
|
|
94
|
-
if (_)
|
|
91
|
+
]), Me = l((t) => {
|
|
92
|
+
if (!t) return;
|
|
93
|
+
let n;
|
|
94
|
+
if (_) n = re(t, X(), {
|
|
95
95
|
excludedates: O,
|
|
96
96
|
excludeweekdays: x
|
|
97
|
-
}), k || A(
|
|
98
|
-
else if (h)
|
|
97
|
+
}), k || A(n), n.length === 2 ? (w?.(n), J()) : (n.length === 1 && R({}), w?.(n));
|
|
98
|
+
else if (h) n = s(t, X(), g), q(n);
|
|
99
99
|
else {
|
|
100
|
-
let r =
|
|
101
|
-
|
|
100
|
+
let r = e(t);
|
|
101
|
+
n = j.includes(r) ? [] : [r], q(n), J();
|
|
102
102
|
}
|
|
103
103
|
}, [
|
|
104
104
|
_,
|
|
105
105
|
h,
|
|
106
106
|
g,
|
|
107
|
-
|
|
107
|
+
X,
|
|
108
108
|
j,
|
|
109
109
|
O,
|
|
110
110
|
x,
|
|
111
111
|
k,
|
|
112
|
+
q,
|
|
112
113
|
J,
|
|
113
|
-
Y,
|
|
114
114
|
w
|
|
115
|
-
]),
|
|
116
|
-
let t =
|
|
117
|
-
k || A(t), _ && t.length === 2 && (w?.(t),
|
|
115
|
+
]), Z = l((e) => {
|
|
116
|
+
let t = te(e, X());
|
|
117
|
+
k || A(t), _ && t.length === 2 && (w?.(t), J());
|
|
118
118
|
}, [
|
|
119
|
-
|
|
119
|
+
X,
|
|
120
120
|
k,
|
|
121
121
|
_,
|
|
122
122
|
w,
|
|
123
|
-
|
|
123
|
+
J
|
|
124
124
|
]), Ne = l((e) => {
|
|
125
|
-
let t =
|
|
125
|
+
let t = ae(e, X());
|
|
126
126
|
k || A(t);
|
|
127
|
-
}, [
|
|
128
|
-
let t = s(e,
|
|
127
|
+
}, [X, k]), Pe = l((e) => {
|
|
128
|
+
let t = s(e, X(), g);
|
|
129
129
|
k || A(t);
|
|
130
130
|
}, [
|
|
131
|
-
|
|
131
|
+
X,
|
|
132
132
|
g,
|
|
133
133
|
k
|
|
134
134
|
]), Q = l(() => {
|
|
135
|
-
let
|
|
136
|
-
if (
|
|
137
|
-
|
|
135
|
+
let t = e(n(D)), r = H.current?.querySelector(`button[data-date="${t}"]`);
|
|
136
|
+
if (r instanceof HTMLButtonElement) {
|
|
137
|
+
V(t), r.focus();
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
|
-
let
|
|
141
|
-
if (
|
|
142
|
-
let e =
|
|
143
|
-
e instanceof HTMLButtonElement && (
|
|
140
|
+
let i = U.current.find((e) => !e.isDisabled);
|
|
141
|
+
if (i) {
|
|
142
|
+
let e = H.current?.querySelector(`button[data-date="${i.currentDateISO}"]`);
|
|
143
|
+
e instanceof HTMLButtonElement && (V(i.currentDateISO), e.focus());
|
|
144
144
|
}
|
|
145
|
-
}, []), $ = l((
|
|
146
|
-
let i =
|
|
147
|
-
if (
|
|
148
|
-
if (
|
|
145
|
+
}, []), $ = l((n, r) => {
|
|
146
|
+
let i = n.target;
|
|
147
|
+
if (ce(i)) return;
|
|
148
|
+
if (n.preventDefault(), !B) {
|
|
149
149
|
Q();
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
let a =
|
|
152
|
+
let a = t(B), o = oe(a, r, H.current.querySelector.bind(H.current));
|
|
153
153
|
if (o) {
|
|
154
|
-
let
|
|
155
|
-
|
|
154
|
+
let t = H.current.querySelector(`button[data-date="${e(o)}"]`);
|
|
155
|
+
t instanceof HTMLButtonElement && !t.dataset.disabled && (V(e(o)), t.focus());
|
|
156
156
|
}
|
|
157
|
-
}, [
|
|
157
|
+
}, [B, Q]);
|
|
158
158
|
return {
|
|
159
159
|
componentId: _e,
|
|
160
160
|
strings: ve,
|
|
@@ -163,9 +163,9 @@ function p(p) {
|
|
|
163
163
|
month: I,
|
|
164
164
|
activeSelected: j,
|
|
165
165
|
_selected: M,
|
|
166
|
-
inRange:
|
|
167
|
-
rangeHovered:
|
|
168
|
-
focusedDate:
|
|
166
|
+
inRange: be,
|
|
167
|
+
rangeHovered: xe,
|
|
168
|
+
focusedDate: B,
|
|
169
169
|
range: _,
|
|
170
170
|
multiple: h,
|
|
171
171
|
weeknumbers: de,
|
|
@@ -175,36 +175,35 @@ function p(p) {
|
|
|
175
175
|
excludedates: O,
|
|
176
176
|
excludeweekdays: x,
|
|
177
177
|
className: he,
|
|
178
|
-
dateConstraints:
|
|
179
|
-
calendarRef:
|
|
180
|
-
selectableDatesRef:
|
|
181
|
-
tabIndexSetRef:
|
|
182
|
-
prevMonth:
|
|
183
|
-
nextMonth:
|
|
184
|
-
changeMonth:
|
|
185
|
-
handleDateSelect:
|
|
186
|
-
addToSelected:
|
|
178
|
+
dateConstraints: K,
|
|
179
|
+
calendarRef: H,
|
|
180
|
+
selectableDatesRef: U,
|
|
181
|
+
tabIndexSetRef: W,
|
|
182
|
+
prevMonth: De,
|
|
183
|
+
nextMonth: Oe,
|
|
184
|
+
changeMonth: Y,
|
|
185
|
+
handleDateSelect: Me,
|
|
186
|
+
addToSelected: Z,
|
|
187
187
|
removeFromSelected: Ne,
|
|
188
188
|
toggleSelectedDate: Pe,
|
|
189
|
-
handleRangeHover:
|
|
190
|
-
isExcluded:
|
|
191
|
-
isDayDisabled:
|
|
189
|
+
handleRangeHover: je,
|
|
190
|
+
isExcluded: ke,
|
|
191
|
+
isDayDisabled: Ae,
|
|
192
192
|
focusOnCurrentDate: Q,
|
|
193
193
|
handleKeydown: l((e) => {
|
|
194
194
|
if (e.key === "Escape") {
|
|
195
|
-
e.preventDefault(),
|
|
195
|
+
e.preventDefault(), J();
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
let t =
|
|
198
|
+
let t = se(e.key);
|
|
199
199
|
t !== null && $(e.nativeEvent, t);
|
|
200
|
-
}, [
|
|
200
|
+
}, [J, $]),
|
|
201
201
|
handleFocusOut: l((e) => {
|
|
202
202
|
let t = e.target, n = e.relatedTarget;
|
|
203
|
-
|
|
204
|
-
}, [
|
|
205
|
-
close:
|
|
206
|
-
setFocusedDate:
|
|
203
|
+
H.current && H.current.contains(n) || t.classList.contains("pkt-hide") || t.closest(".pkt-cal-month-picker") || J();
|
|
204
|
+
}, [J]),
|
|
205
|
+
close: J,
|
|
206
|
+
setFocusedDate: V
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
//#endregion
|
|
210
209
|
export { p as useCalendarState };
|