@ogcio/design-system-react 1.22.1 → 1.23.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/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/accordion/accordion-item.js +14 -15
- package/dist/alert/alert.js +19 -20
- package/dist/autocomplete/autocomplete.js +167 -169
- package/dist/autocomplete/use-autocomplete-controller.js +1 -1
- package/dist/browser-support/runtime.js +2 -3
- package/dist/button/button.js +11 -12
- package/dist/button-group/button-group.js +4 -5
- package/dist/card/card-next.js +122 -125
- package/dist/card/card.js +4 -5
- package/dist/checkbox/checkbox-group.js +3 -4
- package/dist/checkbox/checkbox.js +4 -5
- package/dist/chip/chip.js +11 -12
- package/dist/combo-box/dropdown-item.js +2 -3
- package/dist/cookie-banner/cookie-banner.js +6 -7
- package/dist/data-table/editable-table-cell.js +3 -4
- package/dist/data-table/index.d.ts +7 -0
- package/dist/data-table/index.js +20 -0
- package/dist/details/details.js +6 -7
- package/dist/drawer/drawer.js +18 -19
- package/dist/footer/footer.js +2 -3
- package/dist/forms/form-field/form-field.js +2 -3
- package/dist/header/components/header-menu.js +17 -18
- package/dist/header/header-legacy.js +2 -3
- package/dist/header/header-next/components/header-logo.js +3 -4
- package/dist/header/header-next/components/header-title.js +0 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-button.js +4 -5
- package/dist/header/header-next/components/menu/components/header-menu-item-link.js +0 -1
- package/dist/header/header-next/components/menu/components/header-menu-item-separator.js +4 -5
- package/dist/header/header-next/components/menu/components/header-menu-item-slot.js +0 -1
- package/dist/header/header-next/components/menu/header-menu-context.js +9 -10
- package/dist/header/header-next/components/menu/header-primary-menu.js +4 -5
- package/dist/header/header-next/components/menu/header-secondary-menu.js +0 -1
- package/dist/header/header-next/header-context.js +4 -5
- package/dist/header/header-next/header-next.js +2 -3
- package/dist/hooks/use-breakpoint.js +7 -8
- package/dist/hooks/use-toggle-map.js +12 -13
- package/dist/i18n/config.d.ts +1 -1
- package/dist/i18n/config.js +14 -11
- package/dist/i18n/utility.js +1 -1
- package/dist/i18nInstance-D_96ADqd.js +48 -0
- package/dist/i18next-B_GQfCrJ.js +1362 -0
- package/dist/icon/icon.js +2 -3
- package/dist/icon-button/icon-button.js +4 -5
- package/dist/index.d.ts +1 -4
- package/dist/index.js +231 -220
- package/dist/input-checkbox/input-checkbox.js +15 -16
- package/dist/input-checkbox-group/input-checkbox-group.js +9 -10
- package/dist/input-password/input-password.js +0 -1
- package/dist/input-radio/input-radio.js +11 -12
- package/dist/input-radio-group/input-radio-group.js +8 -9
- package/dist/input-text/input-text.js +2 -3
- package/dist/{lodash-D1c5hFAM.js → lodash-LsP9-6SV.js} +1343 -1342
- package/dist/modal/modal.js +4 -5
- package/dist/pagination/pagination.js +713 -58
- package/dist/phase-banner/phase-banner.js +2 -3
- package/dist/popover/popover.js +2 -3
- package/dist/radio/radio-group.js +0 -1
- package/dist/radio/radio.js +0 -1
- package/dist/score-select/score-select.js +3 -4
- package/dist/select/select-menu.js +43 -41
- package/dist/select/select-next.js +190 -161
- package/dist/select/select.js +3 -4
- package/dist/side-nav/side-nav.js +9 -10
- package/dist/spinner/spinner.js +2 -3
- package/dist/stack/stack.js +20 -21
- package/dist/styles.css +1 -1
- package/dist/summary-list/summary-list-action.js +6 -7
- package/dist/summary-list/summary-list-context.js +4 -5
- package/dist/summary-list/summary-list-header.js +12 -13
- package/dist/summary-list/summary-list-row.js +17 -18
- package/dist/summary-list/summary-list-value.js +0 -1
- package/dist/summary-list/summary-list.js +4 -5
- package/dist/table/table-data.js +11 -12
- package/dist/table/table-header.js +2 -3
- package/dist/tabs/tab-item.js +0 -1
- package/dist/tabs/tab-list.js +23 -24
- package/dist/text-input/text-input.js +0 -1
- package/dist/textarea/textarea.js +12 -13
- package/dist/toast/ds-toast.js +10 -11
- package/dist/toast/toast.js +15 -16
- package/dist/tooltip/tooltip.js +12 -13
- package/dist/utilities.d.ts +4 -1
- package/dist/utilities.js +29 -16
- package/package.json +7 -6
- package/dist/i18next-DxWa09nx.js +0 -1395
package/dist/details/details.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as l, jsx as s } from "react/jsx-runtime";
|
|
4
3
|
import { useRef as m, useState as u, useEffect as f } from "react";
|
|
5
|
-
import { Icon as
|
|
6
|
-
const
|
|
4
|
+
import { Icon as g } from "../icon/icon.js";
|
|
5
|
+
const N = ({ label: n, name: d, children: o, ...c }) => {
|
|
7
6
|
const t = m(null), [e, i] = u(!1);
|
|
8
7
|
return f(() => {
|
|
9
8
|
var a, r;
|
|
@@ -19,7 +18,7 @@ const _ = ({ label: n, name: o, children: d, ...c }) => {
|
|
|
19
18
|
"data-testid": "govie-details",
|
|
20
19
|
className: "gi-details",
|
|
21
20
|
"data-module": "gi-details",
|
|
22
|
-
name:
|
|
21
|
+
name: d,
|
|
23
22
|
"aria-expanded": e ? "true" : "false",
|
|
24
23
|
"aria-details": "details-content",
|
|
25
24
|
...c,
|
|
@@ -33,7 +32,7 @@ const _ = ({ label: n, name: o, children: d, ...c }) => {
|
|
|
33
32
|
"aria-controls": "details-content",
|
|
34
33
|
"aria-expanded": e ? "true" : "false",
|
|
35
34
|
children: [
|
|
36
|
-
/* @__PURE__ */ s(
|
|
35
|
+
/* @__PURE__ */ s(g, { icon: e ? "keyboard_arrow_up" : "keyboard_arrow_down" }),
|
|
37
36
|
/* @__PURE__ */ s("span", { className: "gi-details-summary-text", children: n })
|
|
38
37
|
]
|
|
39
38
|
}
|
|
@@ -44,7 +43,7 @@ const _ = ({ label: n, name: o, children: d, ...c }) => {
|
|
|
44
43
|
id: "details-content",
|
|
45
44
|
className: "gi-details-text",
|
|
46
45
|
"aria-hidden": e ? "false" : "true",
|
|
47
|
-
children:
|
|
46
|
+
children: o
|
|
48
47
|
}
|
|
49
48
|
)
|
|
50
49
|
]
|
|
@@ -52,5 +51,5 @@ const _ = ({ label: n, name: o, children: d, ...c }) => {
|
|
|
52
51
|
);
|
|
53
52
|
};
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
N as Details
|
|
56
55
|
};
|
package/dist/drawer/drawer.js
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import { jsx as a, jsxs as C, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as r, jsxs as C, Fragment as D } from "react/jsx-runtime";
|
|
4
3
|
import { useState as O, cloneElement as j } from "react";
|
|
5
4
|
import { cn as l } from "../cn.js";
|
|
6
5
|
import { ModalBody as u, ModalFooter as h, ModalWrapper as k } from "../modal/modal.js";
|
|
7
6
|
const v = ({
|
|
8
7
|
children: o,
|
|
9
8
|
className: e,
|
|
10
|
-
...
|
|
11
|
-
}) => /* @__PURE__ */
|
|
9
|
+
...a
|
|
10
|
+
}) => /* @__PURE__ */ r(
|
|
12
11
|
k,
|
|
13
12
|
{
|
|
14
13
|
className: l("gi-drawer-container", e),
|
|
15
14
|
closeButtonSize: "large",
|
|
16
|
-
...
|
|
15
|
+
...a,
|
|
17
16
|
children: o
|
|
18
17
|
}
|
|
19
18
|
), x = ({
|
|
20
19
|
children: o,
|
|
21
20
|
triggerButton: e,
|
|
22
|
-
startsOpen:
|
|
23
|
-
closeButtonLabel:
|
|
24
|
-
position:
|
|
25
|
-
className:
|
|
21
|
+
startsOpen: a,
|
|
22
|
+
closeButtonLabel: d,
|
|
23
|
+
position: i = "right",
|
|
24
|
+
className: t
|
|
26
25
|
}) => {
|
|
27
|
-
const [
|
|
26
|
+
const [f, n] = O(!!a), m = () => n(!0), w = () => n(!1), b = j(e, {
|
|
28
27
|
"data-testid": "drawer-trigger-button-container",
|
|
29
28
|
onClick: (y) => {
|
|
30
29
|
var c, p;
|
|
31
30
|
const s = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (p = e == null ? void 0 : e.props) == null ? void 0 : p.onClick : void 0;
|
|
32
|
-
s && s(y),
|
|
31
|
+
s && s(y), m();
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
return /* @__PURE__ */ C(D, { children: [
|
|
36
35
|
b,
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ r(
|
|
38
37
|
v,
|
|
39
38
|
{
|
|
40
39
|
children: o,
|
|
41
|
-
closeButtonLabel:
|
|
42
|
-
position:
|
|
43
|
-
className:
|
|
44
|
-
isOpen:
|
|
40
|
+
closeButtonLabel: d,
|
|
41
|
+
position: i,
|
|
42
|
+
className: t,
|
|
43
|
+
isOpen: f,
|
|
45
44
|
onClose: w
|
|
46
45
|
}
|
|
47
46
|
)
|
|
@@ -52,7 +51,7 @@ Object.defineProperty(x, "componentType", {
|
|
|
52
51
|
writable: !1,
|
|
53
52
|
enumerable: !1
|
|
54
53
|
});
|
|
55
|
-
const F = ({ children: o, className: e }) => /* @__PURE__ */
|
|
54
|
+
const F = ({ children: o, className: e }) => /* @__PURE__ */ r(
|
|
56
55
|
u,
|
|
57
56
|
{
|
|
58
57
|
includeModalClass: !1,
|
|
@@ -68,8 +67,8 @@ Object.defineProperty(F, "componentType", {
|
|
|
68
67
|
const M = ({
|
|
69
68
|
children: o,
|
|
70
69
|
className: e,
|
|
71
|
-
stacked:
|
|
72
|
-
}) => /* @__PURE__ */
|
|
70
|
+
stacked: a
|
|
71
|
+
}) => /* @__PURE__ */ r(h, { stacked: a, className: l("gi-drawer-footer", e), children: o });
|
|
73
72
|
Object.defineProperty(M, "componentType", {
|
|
74
73
|
value: "DrawerFooter",
|
|
75
74
|
writable: !1,
|
package/dist/footer/footer.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as i, jsx as t, Fragment as u } from "react/jsx-runtime";
|
|
4
3
|
import { renderToStaticMarkup as c } from "react-dom/server";
|
|
5
4
|
import h from "../assets/logos/gov-of-ireland/harp-gold-text-green.js";
|
|
@@ -25,7 +24,7 @@ function l({ logo: e }) {
|
|
|
25
24
|
)
|
|
26
25
|
] });
|
|
27
26
|
}
|
|
28
|
-
function
|
|
27
|
+
function H({
|
|
29
28
|
primarySlot: e,
|
|
30
29
|
secondarySlot: o,
|
|
31
30
|
utilitySlot: n,
|
|
@@ -105,5 +104,5 @@ function M({
|
|
|
105
104
|
);
|
|
106
105
|
}
|
|
107
106
|
export {
|
|
108
|
-
|
|
107
|
+
H as Footer
|
|
109
108
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as l, jsxs as a, Fragment as p } from "react/jsx-runtime";
|
|
4
3
|
import { S as x } from "../../index-2sRBqKFV.js";
|
|
5
4
|
import { createContext as v, useContext as N, Children as C } from "react";
|
|
@@ -12,7 +11,7 @@ const f = v(null);
|
|
|
12
11
|
function b(e) {
|
|
13
12
|
N(f) || console.error(`[${e}] must be used within a <FormField>.`);
|
|
14
13
|
}
|
|
15
|
-
const
|
|
14
|
+
const I = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
|
|
16
15
|
"[FormField] Using legacy props. Please migrate to the new composable API."
|
|
17
16
|
), /* @__PURE__ */ l(f.Provider, { value: !0, children: /* @__PURE__ */ a(y, { ...e, children: [
|
|
18
17
|
e.label && /* @__PURE__ */ l(u, { ...e.label }),
|
|
@@ -115,7 +114,7 @@ Object.defineProperty(g, "componentType", {
|
|
|
115
114
|
});
|
|
116
115
|
g.displayName = "FormFieldError";
|
|
117
116
|
export {
|
|
118
|
-
|
|
117
|
+
I as FormField,
|
|
119
118
|
g as FormFieldError,
|
|
120
119
|
h as FormFieldHint,
|
|
121
120
|
u as FormFieldLabel
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
4
3
|
import { useState as h } from "react";
|
|
5
4
|
import { cn as f } from "../../cn.js";
|
|
6
|
-
import { Icon as
|
|
5
|
+
import { Icon as g } from "../../icon/icon.js";
|
|
7
6
|
import { ListItem as s } from "../../list-item/list-item.js";
|
|
8
|
-
const
|
|
7
|
+
const p = ({ index: l, item: e }) => {
|
|
9
8
|
const [r, c] = h(!1), o = () => {
|
|
10
|
-
c((
|
|
11
|
-
},
|
|
12
|
-
(
|
|
9
|
+
c((a) => !a);
|
|
10
|
+
}, t = (a) => {
|
|
11
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), o());
|
|
13
12
|
};
|
|
14
13
|
return /* @__PURE__ */ i(
|
|
15
14
|
"div",
|
|
@@ -30,10 +29,10 @@ const g = ({ index: l, item: e }) => {
|
|
|
30
29
|
className: "gi-header-accordion-item-toggle",
|
|
31
30
|
tabIndex: 0,
|
|
32
31
|
onClick: o,
|
|
33
|
-
onKeyDown:
|
|
32
|
+
onKeyDown: t,
|
|
34
33
|
children: /* @__PURE__ */ i("div", { children: [
|
|
35
34
|
/* @__PURE__ */ n("span", { className: "gi-text-sm gi-font-bold gi-ml-1", children: e.label }),
|
|
36
|
-
/* @__PURE__ */ n(
|
|
35
|
+
/* @__PURE__ */ n(g, { icon: "chevron_right", className: "gi-accordion-item-icon" })
|
|
37
36
|
] })
|
|
38
37
|
}
|
|
39
38
|
),
|
|
@@ -52,18 +51,18 @@ const g = ({ index: l, item: e }) => {
|
|
|
52
51
|
},
|
|
53
52
|
`Accordion-item-${l}`
|
|
54
53
|
);
|
|
55
|
-
},
|
|
54
|
+
}, m = ({
|
|
56
55
|
items: l,
|
|
57
56
|
secondaryLinks: e
|
|
58
57
|
}) => /* @__PURE__ */ i("ul", { children: [
|
|
59
|
-
l == null ? void 0 : l.map(({ itemType: r, label: c, ...o },
|
|
60
|
-
const [
|
|
58
|
+
l == null ? void 0 : l.map(({ itemType: r, label: c, ...o }, t) => {
|
|
59
|
+
const [a, d] = [
|
|
61
60
|
r === "link" || r === "custom-link",
|
|
62
61
|
r === "slot"
|
|
63
62
|
];
|
|
64
63
|
if (!c)
|
|
65
64
|
return null;
|
|
66
|
-
if (
|
|
65
|
+
if (a)
|
|
67
66
|
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
68
67
|
s,
|
|
69
68
|
{
|
|
@@ -72,18 +71,18 @@ const g = ({ index: l, item: e }) => {
|
|
|
72
71
|
external: o == null ? void 0 : o.external,
|
|
73
72
|
slot: o == null ? void 0 : o.component
|
|
74
73
|
}
|
|
75
|
-
) }, `navLink-${c}-${
|
|
74
|
+
) }, `navLink-${c}-${t}`);
|
|
76
75
|
if (d)
|
|
77
76
|
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
78
|
-
|
|
77
|
+
p,
|
|
79
78
|
{
|
|
80
|
-
index:
|
|
79
|
+
index: t,
|
|
81
80
|
item: {
|
|
82
81
|
label: c,
|
|
83
82
|
slot: o == null ? void 0 : o.component
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
|
-
) }, `toolItems-${c}-${
|
|
85
|
+
) }, `toolItems-${c}-${t}`);
|
|
87
86
|
}),
|
|
88
87
|
e == null ? void 0 : e.map((r, c) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
89
88
|
s,
|
|
@@ -96,6 +95,6 @@ const g = ({ index: l, item: e }) => {
|
|
|
96
95
|
) }, `secondary-${r.label}-${c}`))
|
|
97
96
|
] });
|
|
98
97
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
p as MenuItemAccordion,
|
|
99
|
+
m as MobileHeaderMenuItems
|
|
101
100
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
4
3
|
import { useEffect as T, useMemo as I, createElement as x } from "react";
|
|
5
4
|
import { renderToStaticMarkup as v } from "react-dom/server";
|
|
@@ -85,7 +84,7 @@ const Q = (r, n, t) => [{
|
|
|
85
84
|
appearance: n
|
|
86
85
|
}
|
|
87
86
|
)) });
|
|
88
|
-
function
|
|
87
|
+
function fe({
|
|
89
88
|
title: r,
|
|
90
89
|
items: n,
|
|
91
90
|
logo: t,
|
|
@@ -219,5 +218,5 @@ function ge({
|
|
|
219
218
|
);
|
|
220
219
|
}
|
|
221
220
|
export {
|
|
222
|
-
|
|
221
|
+
fe as HeaderLegacy
|
|
223
222
|
};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
4
3
|
import { headerLogoVariants as a } from "../../variants.js";
|
|
5
4
|
import { useHeaderContext as t } from "../header-context.js";
|
|
6
|
-
const
|
|
5
|
+
const n = ({ children: r }) => {
|
|
7
6
|
const e = t();
|
|
8
7
|
if (!e)
|
|
9
8
|
throw new Error("HeaderLogo must be used within a Header");
|
|
10
9
|
return /* @__PURE__ */ o("div", { className: a({ appearance: e == null ? void 0 : e.variant }), children: r });
|
|
11
10
|
};
|
|
12
|
-
Object.defineProperty(
|
|
11
|
+
Object.defineProperty(n, "componentType", {
|
|
13
12
|
value: "HeaderLogo",
|
|
14
13
|
writable: !1,
|
|
15
14
|
enumerable: !1
|
|
16
15
|
});
|
|
17
16
|
export {
|
|
18
|
-
|
|
17
|
+
n as HeaderLogo
|
|
19
18
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as n, Fragment as s, jsxs as u } from "react/jsx-runtime";
|
|
4
3
|
import { a as c } from "../../../../../index-2sRBqKFV.js";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Icon as
|
|
4
|
+
import { cn as d } from "../../../../../cn.js";
|
|
5
|
+
import { Icon as p } from "../../../../../icon/icon.js";
|
|
7
6
|
import { Button as f } from "../../../../../primitives/button.js";
|
|
8
7
|
import { headerToolItemVariants as l } from "../../../../variants.js";
|
|
9
8
|
import { useHeaderContext as H } from "../../../header-context.js";
|
|
10
9
|
import { useHeaderMenuSection as M } from "../header-menu-context.js";
|
|
11
10
|
const h = ({ showItemMode: t, children: r, icon: e, ...o }) => /* @__PURE__ */ n(s, { children: /* @__PURE__ */ u(f, { "data-item-mode": t, ...o, children: [
|
|
12
11
|
r,
|
|
13
|
-
e && /* @__PURE__ */ n(
|
|
12
|
+
e && /* @__PURE__ */ n(p, { icon: e, ariaHidden: !0 })
|
|
14
13
|
] }) }), x = ({
|
|
15
14
|
asChild: t,
|
|
16
15
|
children: r,
|
|
@@ -26,7 +25,7 @@ const h = ({ showItemMode: t, children: r, icon: e, ...o }) => /* @__PURE__ */ n
|
|
|
26
25
|
return /* @__PURE__ */ n(
|
|
27
26
|
t ? c : h,
|
|
28
27
|
{
|
|
29
|
-
className:
|
|
28
|
+
className: d(l({ appearance: i }), e),
|
|
30
29
|
...o,
|
|
31
30
|
children: r
|
|
32
31
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { cn as
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
import { cn as p } from "../../../../../cn.js";
|
|
6
5
|
import { headerDividerVariants as d } from "../../../../variants.js";
|
|
7
6
|
import { useHeaderContext as c } from "../../../header-context.js";
|
|
8
7
|
import { useHeaderMenuSection as u } from "../header-menu-context.js";
|
|
9
|
-
const r =
|
|
8
|
+
const r = s(({ className: a, ...t }, o) => {
|
|
10
9
|
const n = c(), e = u();
|
|
11
10
|
if (!e || e === "secondary")
|
|
12
11
|
throw new Error(
|
|
@@ -18,7 +17,7 @@ const r = p(({ className: a, ...t }, o) => {
|
|
|
18
17
|
{
|
|
19
18
|
ref: o,
|
|
20
19
|
role: "separator",
|
|
21
|
-
className:
|
|
20
|
+
className: p(d({ appearance: m }), a),
|
|
22
21
|
...t
|
|
23
22
|
}
|
|
24
23
|
);
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
3
|
import { createContext as o, useContext as u } from "react";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
4
|
+
const n = o(null);
|
|
5
|
+
function d({
|
|
7
6
|
section: e,
|
|
8
|
-
children:
|
|
7
|
+
children: r
|
|
9
8
|
}) {
|
|
10
|
-
return /* @__PURE__ */ n
|
|
9
|
+
return /* @__PURE__ */ t(n.Provider, { value: e, children: r });
|
|
11
10
|
}
|
|
12
|
-
function
|
|
13
|
-
const e = u(
|
|
11
|
+
function s() {
|
|
12
|
+
const e = u(n);
|
|
14
13
|
if (!e)
|
|
15
14
|
throw new Error(
|
|
16
15
|
"useHeaderMenuSection must be used within HeaderMenuSectionProvider"
|
|
@@ -18,6 +17,6 @@ function a() {
|
|
|
18
17
|
return e;
|
|
19
18
|
}
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
d as HeaderMenuSectionProvider,
|
|
21
|
+
s as useHeaderMenuSection
|
|
23
22
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as p, Children as h } from "react";
|
|
5
4
|
import { cn as l } from "../../../../cn.js";
|
|
6
5
|
import { isSpecialComponent as y } from "../../../../utils/utilities.js";
|
|
7
6
|
import { useHeaderContext as f } from "../../header-context.js";
|
|
8
7
|
import { HeaderMenuSectionProvider as g } from "./header-menu-context.js";
|
|
9
|
-
const n =
|
|
8
|
+
const n = p(
|
|
10
9
|
({
|
|
11
10
|
children: o,
|
|
12
11
|
className: d,
|
|
@@ -31,7 +30,7 @@ const n = c(
|
|
|
31
30
|
"data-section": "primary",
|
|
32
31
|
className: l("gi-header-primary-menu", d),
|
|
33
32
|
...s,
|
|
34
|
-
children: /* @__PURE__ */ i("ul", { className: "gi-flex gi-items-center gi-gap-2", children: a.map((e,
|
|
33
|
+
children: /* @__PURE__ */ i("ul", { className: "gi-flex gi-items-center gi-gap-2", children: a.map((e, c) => {
|
|
35
34
|
var t;
|
|
36
35
|
const r = ((t = e == null ? void 0 : e.props) == null ? void 0 : t.showItemMode) ?? "desktop-only";
|
|
37
36
|
return /* @__PURE__ */ i(
|
|
@@ -45,7 +44,7 @@ const n = c(
|
|
|
45
44
|
"data-visibility": r,
|
|
46
45
|
children: e
|
|
47
46
|
},
|
|
48
|
-
`primary-item-${
|
|
47
|
+
`primary-item-${c}`
|
|
49
48
|
);
|
|
50
49
|
}) })
|
|
51
50
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
3
|
import { createContext as u, useContext as i } from "react";
|
|
5
4
|
const t = u(null);
|
|
6
|
-
function
|
|
5
|
+
function a({
|
|
7
6
|
children: e,
|
|
8
7
|
variant: r = "default",
|
|
9
8
|
fullWidth: o
|
|
@@ -19,13 +18,13 @@ function x({
|
|
|
19
18
|
}
|
|
20
19
|
);
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function x() {
|
|
23
22
|
const e = i(t);
|
|
24
23
|
if (!e)
|
|
25
24
|
throw new Error("useHeaderContext must be used within HeaderProvider");
|
|
26
25
|
return e;
|
|
27
26
|
}
|
|
28
27
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
a as HeaderProvider,
|
|
29
|
+
x as useHeaderContext
|
|
31
30
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as d, jsxs as i } from "react/jsx-runtime";
|
|
4
3
|
import { forwardRef as M, Children as N } from "react";
|
|
5
4
|
import { cn as g } from "../../cn.js";
|
|
@@ -54,7 +53,7 @@ const A = M(
|
|
|
54
53
|
}
|
|
55
54
|
) });
|
|
56
55
|
}
|
|
57
|
-
),
|
|
56
|
+
), F = ({
|
|
58
57
|
variant: o,
|
|
59
58
|
className: e,
|
|
60
59
|
...r
|
|
@@ -71,5 +70,5 @@ const A = M(
|
|
|
71
70
|
A.displayName = "HeaderNext";
|
|
72
71
|
export {
|
|
73
72
|
A as HeaderNext,
|
|
74
|
-
|
|
73
|
+
F as HeaderSlotContainer
|
|
75
74
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import { useState as i, useEffect as l } from "react";
|
|
2
|
+
import { useState as i, useEffect as o } from "react";
|
|
4
3
|
const r = {
|
|
5
4
|
ExtraSmall: "xs",
|
|
6
5
|
Small: "sm",
|
|
7
6
|
Medium: "md",
|
|
8
7
|
Large: "lg",
|
|
9
8
|
ExtraLarge: "xl"
|
|
10
|
-
}, u = (e) => e < 480 ? r.ExtraSmall : e < 640 ? r.Small : e < 768 ? r.Medium : e < 1024 ? r.Large : r.ExtraLarge,
|
|
11
|
-
const [e, a] = i(null), [
|
|
12
|
-
return
|
|
9
|
+
}, u = (e) => e < 480 ? r.ExtraSmall : e < 640 ? r.Small : e < 768 ? r.Medium : e < 1024 ? r.Large : r.ExtraLarge, c = () => {
|
|
10
|
+
const [e, a] = i(null), [s, l] = i(null);
|
|
11
|
+
return o(() => {
|
|
13
12
|
const t = () => {
|
|
14
13
|
const n = globalThis.window.innerWidth;
|
|
15
|
-
|
|
14
|
+
l(n), a(u(n));
|
|
16
15
|
};
|
|
17
16
|
return t(), globalThis.window.addEventListener("resize", t), () => {
|
|
18
17
|
globalThis.window.removeEventListener("resize", t);
|
|
19
18
|
};
|
|
20
|
-
}, []), { breakpoint: e, width:
|
|
19
|
+
}, []), { breakpoint: e, width: s };
|
|
21
20
|
};
|
|
22
21
|
export {
|
|
23
22
|
r as Breakpoint,
|
|
24
|
-
|
|
23
|
+
c as useBreakpoint
|
|
25
24
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import { useReducer as u, useMemo as E } from "react";
|
|
2
|
+
import { useReducer as p, useMemo as E } from "react";
|
|
4
3
|
const t = {
|
|
5
4
|
OPEN: "open",
|
|
6
5
|
CLOSE: "close",
|
|
@@ -8,18 +7,18 @@ const t = {
|
|
|
8
7
|
OPEN_ALL: "openAll",
|
|
9
8
|
CLOSE_ALL: "closeAll"
|
|
10
9
|
}, O = (s, L) => {
|
|
11
|
-
const l = { ...s },
|
|
12
|
-
for (const o of
|
|
10
|
+
const l = { ...s }, r = Object.keys(s);
|
|
11
|
+
for (const o of r)
|
|
13
12
|
l[o] = L;
|
|
14
13
|
return l;
|
|
15
|
-
},
|
|
14
|
+
}, k = (s) => {
|
|
16
15
|
const L = {
|
|
17
|
-
[t.OPEN]: (e,
|
|
18
|
-
[t.CLOSE]: (e,
|
|
19
|
-
[t.TOGGLE]: (e,
|
|
16
|
+
[t.OPEN]: (e, n) => ({ ...e, [n.key]: !0 }),
|
|
17
|
+
[t.CLOSE]: (e, n) => ({ ...e, [n.key]: !1 }),
|
|
18
|
+
[t.TOGGLE]: (e, n) => ({ ...e, [n.key]: !e[n.key] }),
|
|
20
19
|
[t.OPEN_ALL]: (e) => O(e, !0),
|
|
21
20
|
[t.CLOSE_ALL]: (e) => O(e, !1)
|
|
22
|
-
}, l = (e,
|
|
21
|
+
}, l = (e, n) => (L[n.type] ?? ((u) => u))(e, n), [r, o] = p(l, s), c = E(() => ({
|
|
23
22
|
open: (e) => {
|
|
24
23
|
o({ type: t.OPEN, key: e });
|
|
25
24
|
},
|
|
@@ -35,11 +34,11 @@ const t = {
|
|
|
35
34
|
closeAll: () => {
|
|
36
35
|
o({ type: t.CLOSE_ALL });
|
|
37
36
|
},
|
|
38
|
-
isOpen: (e) => !!(
|
|
39
|
-
}), [
|
|
40
|
-
return [
|
|
37
|
+
isOpen: (e) => !!(r != null && r[e])
|
|
38
|
+
}), [r]);
|
|
39
|
+
return [r, c];
|
|
41
40
|
};
|
|
42
41
|
export {
|
|
43
42
|
t as ACTIONS,
|
|
44
|
-
|
|
43
|
+
k as useToggleMap
|
|
45
44
|
};
|
package/dist/i18n/config.d.ts
CHANGED
package/dist/i18n/config.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { u as e, i as s } from "../i18next-B_GQfCrJ.js";
|
|
2
|
+
import { s as n, a } from "../i18nInstance-D_96ADqd.js";
|
|
3
|
+
const r = {
|
|
4
|
+
type: "3rdParty",
|
|
5
|
+
init(t) {
|
|
6
|
+
n(t.options.react), a(t);
|
|
7
|
+
}
|
|
8
|
+
}, l = (t) => (e(r).init({
|
|
9
|
+
resources: t.resources,
|
|
10
|
+
lng: t.lng || "en",
|
|
11
|
+
fallbackLng: t.fallbackLng || "en"
|
|
12
|
+
}), s);
|
|
10
13
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
s as i18next,
|
|
15
|
+
l as initI18n
|
|
13
16
|
};
|
package/dist/i18n/utility.js
CHANGED