@ogcio/design-system-react 1.30.0 → 1.31.1
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/atoms/DsButton.js +3 -2
- package/dist/atoms/InsetText.d.ts +14 -0
- package/dist/atoms/InsetText.js +17 -0
- package/dist/atoms/icons/Close.js +9 -8
- package/dist/atoms/icons/KeyboardArrowDown.js +6 -5
- package/dist/atoms/icons/KeyboardArrowUp.js +6 -5
- package/dist/atoms/icons/Visibility.js +15 -14
- package/dist/atoms/icons/VisibilityOff.js +9 -8
- package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoBlack.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
- package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
- package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
- package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
- package/dist/atoms/icons/logos/LogoWhite.js +327 -0
- package/dist/atoms/icons/logos/index.d.ts +6 -0
- package/dist/atoms/icons/logos/index.js +14 -0
- package/dist/atoms/icons/types.d.ts +5 -5
- package/dist/atoms/index.d.ts +1 -0
- package/dist/atoms/index.js +12 -10
- package/dist/blockquote/blockquote.d.ts +4 -1
- package/dist/blockquote/blockquote.js +18 -4
- package/dist/breadcrumbs/breadcrumbs.js +54 -33
- package/dist/button-group/button-group.js +31 -28
- package/dist/character-count/character-count.js +5 -5
- package/dist/chip/chip.js +41 -19
- package/dist/combo-box/combo-box.js +6 -13
- package/dist/cookie-banner/cookie-banner.js +28 -20
- package/dist/details/details.js +43 -23
- package/dist/drawer/drawer.js +35 -32
- package/dist/footer/footer.js +54 -46
- package/dist/header/header-legacy.js +8 -8
- package/dist/hooks/use-aria-hider.d.ts +1 -1
- package/dist/hooks/use-aria-hider.js +14 -13
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.js +179 -179
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +144 -142
- package/dist/input-file/input-file.js +15 -12
- package/dist/logos/index.d.ts +1 -0
- package/dist/logos/index.js +14 -0
- package/dist/modal/modal.js +125 -128
- package/dist/popover/popover.js +67 -64
- package/dist/score-select/score-select.js +20 -20
- package/dist/select/select-next.js +45 -45
- package/dist/styles.css +1 -1
- package/dist/table/table-row.js +14 -7
- package/dist/tabs/tab-panel.js +6 -6
- package/dist/tabs/tabs.js +19 -19
- package/package.json +10 -10
- package/dist/assets/logos/LogoBlack.d.ts +0 -3
- package/dist/assets/logos/LogoBlack.js +0 -322
- package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
- package/dist/assets/logos/LogoGoldGreen.js +0 -322
- package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
- package/dist/assets/logos/LogoGoldWhite.js +0 -82
- package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
- package/dist/assets/logos/LogoHarpWhite.js +0 -60
- package/dist/assets/logos/LogoWhite.d.ts +0 -3
- package/dist/assets/logos/LogoWhite.js +0 -322
- package/dist/assets/logos/index.d.ts +0 -6
- package/dist/assets/logos/index.js +0 -14
package/dist/footer/footer.js
CHANGED
|
@@ -1,102 +1,110 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { renderToStaticMarkup as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Container as
|
|
8
|
-
import { translate as
|
|
9
|
-
import
|
|
10
|
-
import { SectionBreak as
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
|
|
2
|
+
import { jsxs as a, jsx as t, Fragment as u } from "react/jsx-runtime";
|
|
3
|
+
import { renderToStaticMarkup as l } from "react-dom/server";
|
|
4
|
+
import g from "../atoms/icons/logos/LogoGoldGreen.js";
|
|
5
|
+
import h from "../atoms/icons/logos/LogoHarpWhite.js";
|
|
6
|
+
import { cn as p } from "../cn.js";
|
|
7
|
+
import { Container as v } from "../container/container.js";
|
|
8
|
+
import { translate as i } from "../i18n/utility.js";
|
|
9
|
+
import b from "../primitives/anchor.js";
|
|
10
|
+
import { SectionBreak as x } from "../section-break/section-break.js";
|
|
11
|
+
function c({ logo: e }) {
|
|
12
|
+
const o = `data:image/svg+xml;base64,${btoa(l(/* @__PURE__ */ t(h, {})))}`, n = `data:image/svg+xml;base64,${btoa(
|
|
13
|
+
l(/* @__PURE__ */ t(g, {}))
|
|
14
14
|
)}`;
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ t("source", { srcSet: (e == null ? void 0 : e.imageLarge) ||
|
|
15
|
+
return /* @__PURE__ */ a("picture", { children: [
|
|
16
|
+
/* @__PURE__ */ t("source", { srcSet: (e == null ? void 0 : e.imageLarge) || n }),
|
|
17
17
|
/* @__PURE__ */ t(
|
|
18
18
|
"img",
|
|
19
19
|
{
|
|
20
20
|
className: "gi-h-16",
|
|
21
|
-
src: (e == null ? void 0 : e.imageSmall) ||
|
|
22
|
-
alt: (e == null ? void 0 : e.alt) ||
|
|
21
|
+
src: (e == null ? void 0 : e.imageSmall) || o,
|
|
22
|
+
alt: (e == null ? void 0 : e.alt) || i("logo.govieLogo", { defaultValue: "Gov.ie Logo" })
|
|
23
23
|
}
|
|
24
24
|
)
|
|
25
25
|
] });
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function j({
|
|
28
28
|
primarySlot: e,
|
|
29
|
-
secondarySlot:
|
|
30
|
-
utilitySlot:
|
|
29
|
+
secondarySlot: s,
|
|
30
|
+
utilitySlot: o,
|
|
31
31
|
logo: r,
|
|
32
|
-
className:
|
|
33
|
-
dataTestid:
|
|
34
|
-
...
|
|
32
|
+
className: n = "",
|
|
33
|
+
dataTestid: m,
|
|
34
|
+
...d
|
|
35
35
|
}) {
|
|
36
|
-
const f = () => /* @__PURE__ */
|
|
36
|
+
const f = () => /* @__PURE__ */ a(u, { children: [
|
|
37
37
|
(r == null ? void 0 : r.href) && /* @__PURE__ */ t(
|
|
38
|
-
|
|
38
|
+
b,
|
|
39
39
|
{
|
|
40
40
|
href: r.href,
|
|
41
|
-
"aria-label":
|
|
41
|
+
"aria-label": i("footer.goToHomePage", {
|
|
42
42
|
defaultValue: "Go to Home Page"
|
|
43
43
|
}),
|
|
44
44
|
"data-testid": "logo-link",
|
|
45
45
|
external: r.external,
|
|
46
|
-
children:
|
|
46
|
+
children: c({ logo: r })
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
!(r != null && r.href) &&
|
|
49
|
+
!(r != null && r.href) && c({ logo: r })
|
|
50
50
|
] });
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ a(
|
|
52
52
|
"footer",
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
54
|
+
className: p("gi-bg-color-surface-system-neutral-layer1", n),
|
|
55
55
|
"data-module": "gieds-footer",
|
|
56
56
|
role: "contentinfo",
|
|
57
|
-
"aria-label":
|
|
58
|
-
"data-testid":
|
|
59
|
-
...
|
|
57
|
+
"aria-label": i("footer.footer", { defaultValue: "Footer" }),
|
|
58
|
+
"data-testid": m,
|
|
59
|
+
...d,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */ t("div", { className: "gi-
|
|
61
|
+
/* @__PURE__ */ t("div", { className: "gi-py-10", children: /* @__PURE__ */ a(v, { children: [
|
|
62
62
|
e && /* @__PURE__ */ t(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
"aria-label":
|
|
65
|
+
"aria-label": i("footer.primarySlot", {
|
|
66
66
|
defaultValue: "Footer Primary Slot"
|
|
67
67
|
}),
|
|
68
68
|
children: e
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
e &&
|
|
72
|
-
|
|
71
|
+
e && s && /* @__PURE__ */ t(
|
|
72
|
+
x,
|
|
73
73
|
{
|
|
74
74
|
color: "gi-border-color-border-system-neutral-subtle",
|
|
75
75
|
size: "lg"
|
|
76
76
|
}
|
|
77
77
|
),
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ a(
|
|
79
79
|
"div",
|
|
80
80
|
{
|
|
81
|
-
className: "gi-
|
|
82
|
-
"aria-label":
|
|
81
|
+
className: "gi-flex gi-flex-row-reverse gi-flex-wrap-reverse gi-justify-between gi-justify-items-stretch",
|
|
82
|
+
"aria-label": i("footer.secondarySlot", {
|
|
83
83
|
defaultValue: "Footer Secondary Slot"
|
|
84
84
|
}),
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */ t(
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ t(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: `
|
|
90
|
+
gi-w-fit gi-mt-8 md:gi-mt-0 lg:gi-ml-auto lg:gi-flex-none gi-rounded-sm
|
|
91
|
+
gi-focus-state-outline gi-focus-within-state-outline gi-focus-visible-state-outline`,
|
|
92
|
+
children: f()
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
s && /* @__PURE__ */ t("div", { className: "gi-grow md:gi-max-w-[calc(100%_-_var(--gieds-space-80))]", children: s })
|
|
88
96
|
]
|
|
89
97
|
}
|
|
90
98
|
)
|
|
91
99
|
] }) }),
|
|
92
|
-
|
|
100
|
+
o && /* @__PURE__ */ t(
|
|
93
101
|
"div",
|
|
94
102
|
{
|
|
95
|
-
className: "gi-
|
|
96
|
-
"aria-label":
|
|
103
|
+
className: "gi-py-4 gi-px-8 gi-bg-color-surface-system-neutral-layer2",
|
|
104
|
+
"aria-label": i("footer.utilityLinks", {
|
|
97
105
|
defaultValue: "Footer Utility Links"
|
|
98
106
|
}),
|
|
99
|
-
children:
|
|
107
|
+
children: o
|
|
100
108
|
}
|
|
101
109
|
)
|
|
102
110
|
]
|
|
@@ -104,5 +112,5 @@ function M({
|
|
|
104
112
|
);
|
|
105
113
|
}
|
|
106
114
|
export {
|
|
107
|
-
|
|
115
|
+
j as Footer
|
|
108
116
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect as $, useMemo as H, createElement as I } from "react";
|
|
4
4
|
import { renderToStaticMarkup as v } from "react-dom/server";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import x from "../atoms/icons/logos/LogoBlack.js";
|
|
6
|
+
import D from "../atoms/icons/logos/LogoHarpBlack.js";
|
|
7
|
+
import C from "../atoms/icons/logos/LogoHarpWhite.js";
|
|
8
|
+
import A from "../atoms/icons/logos/LogoWhite.js";
|
|
9
9
|
import { cn as k } from "../cn.js";
|
|
10
10
|
import { Container as y } from "../container/container.js";
|
|
11
11
|
import { translate as h } from "../i18n/utility.js";
|
|
@@ -18,12 +18,12 @@ import { headerVariants as O, headerMenuVariants as P, headerLogoVariants as U,
|
|
|
18
18
|
function S({ logo: r, appearance: n = "default" }) {
|
|
19
19
|
const t = {
|
|
20
20
|
harp: {
|
|
21
|
-
default: /* @__PURE__ */ e(
|
|
22
|
-
light: /* @__PURE__ */ e(
|
|
21
|
+
default: /* @__PURE__ */ e(C, {}),
|
|
22
|
+
light: /* @__PURE__ */ e(D, {})
|
|
23
23
|
},
|
|
24
24
|
withText: {
|
|
25
|
-
default: /* @__PURE__ */ e(
|
|
26
|
-
light: /* @__PURE__ */ e(
|
|
25
|
+
default: /* @__PURE__ */ e(A, {}),
|
|
26
|
+
light: /* @__PURE__ */ e(x, {})
|
|
27
27
|
}
|
|
28
28
|
}, s = `data:image/svg+xml;base64,${btoa(v(t.harp[n]))}`, g = `data:image/svg+xml;base64,${btoa(
|
|
29
29
|
v(t.withText[n])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useAriaHider: (
|
|
1
|
+
export declare const useAriaHider: (ref: React.RefObject<HTMLElement | null>, shouldActivate: boolean) => void;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { useLayoutEffect as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useLayoutEffect as s } from "react";
|
|
2
|
+
const f = (n, o) => {
|
|
3
|
+
s(() => {
|
|
4
|
+
var t, u;
|
|
5
|
+
if (o !== !0 || !n.current)
|
|
5
6
|
return;
|
|
6
|
-
const r =
|
|
7
|
-
const
|
|
8
|
-
return !
|
|
7
|
+
const i = n.current, r = i.ownerDocument ?? document, c = [...r.body.children].filter((e) => {
|
|
8
|
+
const d = e === i, m = e.getAttribute("aria-hidden") === "true";
|
|
9
|
+
return !d && !m;
|
|
9
10
|
});
|
|
10
|
-
for (const
|
|
11
|
-
t.setAttribute("aria-hidden", "true");
|
|
11
|
+
for (const e of c)
|
|
12
|
+
e.contains(r.activeElement) && ((u = (t = r.activeElement) == null ? void 0 : t.blur) == null || u.call(t)), e.setAttribute("aria-hidden", "true");
|
|
12
13
|
return () => {
|
|
13
|
-
for (const
|
|
14
|
-
|
|
14
|
+
for (const e of c)
|
|
15
|
+
e.removeAttribute("aria-hidden");
|
|
15
16
|
};
|
|
16
|
-
}, [
|
|
17
|
+
}, [o, n.current]);
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
f as useAriaHider
|
|
20
21
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Options as FocusTrapOptions } from 'focus-trap';
|
|
2
|
-
export declare const useFocusTrap: (
|
|
2
|
+
export declare const useFocusTrap: (ref: React.RefObject<HTMLElement | null>, isActive: boolean, options?: FocusTrapOptions) => void;
|