@ogcio/design-system-react 1.29.0 → 1.31.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/README.md +11 -33
- package/dist/alert/variants.d.ts +78 -2
- package/dist/atoms/DsButton.d.ts +194 -0
- package/dist/atoms/DsButton.js +330 -0
- package/dist/atoms/InsetText.d.ts +14 -0
- package/dist/atoms/InsetText.js +17 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +23 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +23 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +23 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- 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 +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +3 -0
- package/dist/atoms/index.js +16 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- 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/combo-box/dropdown-item.js +39 -40
- package/dist/cookie-banner/cookie-banner.js +28 -20
- package/dist/data-table/data-table-footer.js +57 -51
- package/dist/data-table/data-table-header.d.ts +7 -7
- package/dist/data-table/data-table-header.js +97 -110
- package/dist/data-table/data-table-selected-rows.d.ts +1 -0
- package/dist/data-table/data-table-selected-rows.js +15 -19
- package/dist/details/details.js +43 -23
- package/dist/drawer/drawer.js +35 -32
- package/dist/footer/footer.js +54 -46
- package/dist/forms/form-field/form-field.d.ts +2 -2
- package/dist/forms/form-field/form-field.js +40 -30
- package/dist/forms/form-field/types.d.ts +10 -3
- package/dist/header/components/header-slot.js +33 -32
- package/dist/header/header-legacy.js +8 -8
- package/dist/header/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-aria-hider.d.ts +1 -1
- package/dist/hooks/use-aria-hider.js +14 -13
- package/dist/hooks/use-breakpoint.js +15 -12
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.js +179 -179
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +64 -52
- package/dist/icon/icons.d.ts +1 -1
- 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/input-password/input-password.js +13 -12
- package/dist/input-text/input-text.js +18 -16
- package/dist/label/label.d.ts +43 -0
- package/dist/label/label.js +7 -6
- package/dist/logos/index.d.ts +1 -0
- package/dist/logos/index.js +14 -0
- package/dist/modal/modal.js +125 -127
- 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/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table-row.js +14 -7
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- package/dist/tabs/tab-panel.js +6 -6
- package/dist/tabs/tabs.js +19 -19
- package/dist/text-input/text-input.d.ts +1 -1
- package/dist/textarea/textarea.js +27 -28
- package/dist/toast/ds-toast.d.ts +78 -2
- package/fonts.css +10 -0
- package/package.json +17 -12
- 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
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ErrorTextProps } from '../../error-text/types.js';
|
|
2
2
|
import { HintTextProps } from '../../hint-text/types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { FormFieldLabelProps, FormFieldProps } from './types.js';
|
|
4
4
|
declare const FormField: (props: FormFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare const FormFieldLabel: {
|
|
6
|
-
({ children, text, size, htmlFor, className, secondaryLabel, ...props }:
|
|
6
|
+
({ children, text, size, htmlFor, className, secondaryLabel, ...props }: FormFieldLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
declare const FormFieldHint: {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l, jsxs as
|
|
3
|
-
import { S as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { cn as
|
|
2
|
+
import { jsx as l, jsxs as m, Fragment as x } from "react/jsx-runtime";
|
|
3
|
+
import { S as p } from "../../index-D_wwt4P0.js";
|
|
4
|
+
import { createContext as N, useContext as v, Children as C } from "react";
|
|
5
|
+
import { cn as d } from "../../cn.js";
|
|
6
6
|
import { ErrorText as L } from "../../error-text/error-text.js";
|
|
7
7
|
import { HintText as E } from "../../hint-text/hint-text.js";
|
|
8
|
-
import { Label as H } from "../../label/label.js";
|
|
9
|
-
import { getSpecialComponentType as F, isSpecialComponent as
|
|
10
|
-
const f =
|
|
8
|
+
import { Label as H, styles as P } from "../../label/label.js";
|
|
9
|
+
import { getSpecialComponentType as F, isSpecialComponent as w } from "../../utils/utilities.js";
|
|
10
|
+
const f = N(null);
|
|
11
11
|
function b(e) {
|
|
12
|
-
|
|
12
|
+
v(f) || console.error(`[${e}] must be used within a <FormField>.`);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const U = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
|
|
15
15
|
"[FormField] Using legacy props. Please migrate to the new composable API."
|
|
16
|
-
), /* @__PURE__ */ l(f.Provider, { value: !0, children: /* @__PURE__ */
|
|
16
|
+
), /* @__PURE__ */ l(f.Provider, { value: !0, children: /* @__PURE__ */ m(y, { ...e, children: [
|
|
17
17
|
e.label && /* @__PURE__ */ l(u, { ...e.label }),
|
|
18
18
|
e.hint && /* @__PURE__ */ l(h, { ...e.hint }),
|
|
19
19
|
e.error && /* @__PURE__ */ l(g, { ...e.error }),
|
|
@@ -25,31 +25,31 @@ const I = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
|
|
|
25
25
|
}) => {
|
|
26
26
|
const r = C.toArray(e), n = r.find(
|
|
27
27
|
(t) => F(t) === "FormFieldLabel"
|
|
28
|
-
),
|
|
28
|
+
), c = r.find(
|
|
29
29
|
(t) => F(t) === "FormFieldHint"
|
|
30
|
-
),
|
|
30
|
+
), a = r.find(
|
|
31
31
|
(t) => F(t) === "FormFieldError"
|
|
32
32
|
), s = r.filter(
|
|
33
|
-
(t) => !
|
|
33
|
+
(t) => !w(t, [
|
|
34
34
|
"FormFieldLabel",
|
|
35
35
|
"FormFieldHint",
|
|
36
36
|
"FormFieldError"
|
|
37
37
|
])
|
|
38
38
|
);
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ m(
|
|
40
40
|
"fieldset",
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
42
|
+
className: d({ "gi-error-state": !!a }, i),
|
|
43
43
|
...o,
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ m("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
|
|
46
|
+
/* @__PURE__ */ m("div", { children: [
|
|
47
47
|
n,
|
|
48
|
-
|
|
48
|
+
c
|
|
49
49
|
] }),
|
|
50
|
-
|
|
50
|
+
a
|
|
51
51
|
] }),
|
|
52
|
-
/* @__PURE__ */ l(
|
|
52
|
+
/* @__PURE__ */ l(p, { children: s })
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -59,21 +59,31 @@ const I = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
|
|
|
59
59
|
size: o,
|
|
60
60
|
htmlFor: r,
|
|
61
61
|
className: n,
|
|
62
|
-
secondaryLabel:
|
|
63
|
-
...
|
|
62
|
+
secondaryLabel: c,
|
|
63
|
+
...a
|
|
64
64
|
}) => {
|
|
65
65
|
b("FormFieldLabel");
|
|
66
|
-
const s = /* @__PURE__ */
|
|
66
|
+
const s = /* @__PURE__ */ m(x, { children: [
|
|
67
67
|
i ?? e,
|
|
68
|
-
|
|
68
|
+
c ? /* @__PURE__ */ l("span", { className: "gi-secondary-label", children: c }) : null
|
|
69
69
|
] });
|
|
70
|
-
return /* @__PURE__ */ l(
|
|
70
|
+
return r ? /* @__PURE__ */ l(
|
|
71
71
|
H,
|
|
72
72
|
{
|
|
73
73
|
size: o,
|
|
74
74
|
htmlFor: r,
|
|
75
|
-
className:
|
|
76
|
-
...
|
|
75
|
+
className: d("gi-font-bold", n),
|
|
76
|
+
...a,
|
|
77
|
+
children: s
|
|
78
|
+
}
|
|
79
|
+
) : /* @__PURE__ */ l(
|
|
80
|
+
"legend",
|
|
81
|
+
{
|
|
82
|
+
className: P({
|
|
83
|
+
size: o,
|
|
84
|
+
className: d("gi-font-bold", n)
|
|
85
|
+
}),
|
|
86
|
+
...a,
|
|
77
87
|
children: s
|
|
78
88
|
}
|
|
79
89
|
);
|
|
@@ -84,7 +94,7 @@ Object.defineProperty(u, "componentType", {
|
|
|
84
94
|
enumerable: !1
|
|
85
95
|
});
|
|
86
96
|
u.displayName = "FormFieldLabel";
|
|
87
|
-
const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className:
|
|
97
|
+
const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className: d("gi-mb-1", r), children: e }));
|
|
88
98
|
Object.defineProperty(h, "componentType", {
|
|
89
99
|
value: "FormFieldHint",
|
|
90
100
|
writable: !1,
|
|
@@ -102,7 +112,7 @@ const g = ({
|
|
|
102
112
|
{
|
|
103
113
|
text: i,
|
|
104
114
|
size: o,
|
|
105
|
-
className:
|
|
115
|
+
className: d("gi-mb-1", r),
|
|
106
116
|
...n,
|
|
107
117
|
children: e
|
|
108
118
|
}
|
|
@@ -114,7 +124,7 @@ Object.defineProperty(g, "componentType", {
|
|
|
114
124
|
});
|
|
115
125
|
g.displayName = "FormFieldError";
|
|
116
126
|
export {
|
|
117
|
-
|
|
127
|
+
U as FormField,
|
|
118
128
|
g as FormFieldError,
|
|
119
129
|
h as FormFieldHint,
|
|
120
130
|
u as FormFieldLabel
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { FieldsetHTMLAttributes } from 'react';
|
|
1
|
+
import { FieldsetHTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
import { ErrorTextProps } from '../../error-text/types.js';
|
|
3
3
|
import { HintTextProps } from '../../hint-text/types.js';
|
|
4
|
-
import { LabelTextProps } from '../../label/types.js';
|
|
5
|
-
export type
|
|
4
|
+
import { LabelSizeType, LabelTextProps } from '../../label/types.js';
|
|
5
|
+
export type LegendProps = PropsWithChildren<React.HTMLAttributes<HTMLLegendElement> & {
|
|
6
|
+
text?: string | React.ReactElement;
|
|
7
|
+
size?: LabelSizeType;
|
|
8
|
+
secondaryLabel?: React.ReactNode;
|
|
9
|
+
htmlFor?: never;
|
|
10
|
+
}>;
|
|
11
|
+
export type LabelProps = LabelTextProps & {
|
|
6
12
|
secondaryLabel?: React.ReactNode;
|
|
7
13
|
};
|
|
14
|
+
export type FormFieldLabelProps = LabelProps | LegendProps;
|
|
8
15
|
export type FormFieldProps = {
|
|
9
16
|
/** @deprecated Use <FormFieldError> instead */
|
|
10
17
|
error?: ErrorTextProps;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as n, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as s } from "../../cn.js";
|
|
4
4
|
import { DrawerWrapper as T, DrawerBody as b } from "../../drawer/drawer.js";
|
|
5
5
|
import { translate as c } from "../../i18n/utility.js";
|
|
6
6
|
import { Icon as i } from "../../icon/icon.js";
|
|
7
7
|
import { Input as h } from "../../primitives/input.js";
|
|
8
|
-
import { headerSlotContainerVariants as C, headerToolItemVariants as
|
|
9
|
-
const
|
|
8
|
+
import { headerSlotContainerVariants as C, headerToolItemVariants as u } from "../variants.js";
|
|
9
|
+
const y = ({
|
|
10
10
|
index: e,
|
|
11
11
|
slot: r,
|
|
12
|
-
appearance:
|
|
13
|
-
}) => /* @__PURE__ */
|
|
12
|
+
appearance: a
|
|
13
|
+
}) => /* @__PURE__ */ t(
|
|
14
14
|
"div",
|
|
15
15
|
{
|
|
16
16
|
id: `SlotContainer-${e}`,
|
|
@@ -20,24 +20,24 @@ const B = ({
|
|
|
20
20
|
index: e + 1,
|
|
21
21
|
defaultValue: `Slot Container ${e + 1}`
|
|
22
22
|
}),
|
|
23
|
-
className:
|
|
23
|
+
className: s(C({ appearance: a }), "gi-hidden"),
|
|
24
24
|
children: r
|
|
25
25
|
}
|
|
26
26
|
), A = ({
|
|
27
27
|
index: e,
|
|
28
|
-
item: { component: r, drawerPosition:
|
|
28
|
+
item: { component: r, drawerPosition: a, icon: d, label: l, ariaLabel: m, closeLabel: p },
|
|
29
29
|
appearance: I
|
|
30
30
|
}) => {
|
|
31
31
|
const [o, g] = f(!1);
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ n($, { children: [
|
|
33
|
+
/* @__PURE__ */ n(
|
|
34
34
|
"label",
|
|
35
35
|
{
|
|
36
36
|
htmlFor: `ItemActionDrawerTrigger-${e}`,
|
|
37
|
-
className:
|
|
37
|
+
className: u({ appearance: I }),
|
|
38
38
|
onClick: () => g(!0),
|
|
39
39
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ t(
|
|
41
41
|
h,
|
|
42
42
|
{
|
|
43
43
|
"data-testid": `ItemActionDrawerTrigger-${e}`,
|
|
@@ -48,7 +48,7 @@ const B = ({
|
|
|
48
48
|
type: "checkbox"
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
l && /* @__PURE__ */
|
|
51
|
+
l && /* @__PURE__ */ t(
|
|
52
52
|
"span",
|
|
53
53
|
{
|
|
54
54
|
id: `ItemActionDrawerTrigger-${e}-label`,
|
|
@@ -57,10 +57,10 @@ const B = ({
|
|
|
57
57
|
children: l
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
d && /* @__PURE__ */
|
|
60
|
+
d && /* @__PURE__ */ t(
|
|
61
61
|
i,
|
|
62
62
|
{
|
|
63
|
-
className:
|
|
63
|
+
className: s({
|
|
64
64
|
"gi-hidden": o,
|
|
65
65
|
"gi-block": !o
|
|
66
66
|
}),
|
|
@@ -69,10 +69,10 @@ const B = ({
|
|
|
69
69
|
ariaHidden: !0
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
73
|
i,
|
|
74
74
|
{
|
|
75
|
-
className:
|
|
75
|
+
className: s({
|
|
76
76
|
"gi-hidden": !o,
|
|
77
77
|
"gi-block": o
|
|
78
78
|
}),
|
|
@@ -85,25 +85,25 @@ const B = ({
|
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ t(
|
|
89
89
|
T,
|
|
90
90
|
{
|
|
91
91
|
isOpen: o,
|
|
92
92
|
onClose: () => g(!1),
|
|
93
|
-
position:
|
|
93
|
+
position: a || "right",
|
|
94
94
|
closeButtonLabel: c("header.drawer.close", {
|
|
95
|
-
defaultValue:
|
|
95
|
+
defaultValue: p || "Close"
|
|
96
96
|
}),
|
|
97
97
|
closeButtonSize: "large",
|
|
98
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ t(b, { children: r })
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
] });
|
|
102
|
-
},
|
|
102
|
+
}, B = ({
|
|
103
103
|
item: e,
|
|
104
104
|
index: r,
|
|
105
|
-
appearance:
|
|
106
|
-
}) => e.slotAppearance === "drawer" ? /* @__PURE__ */
|
|
105
|
+
appearance: a
|
|
106
|
+
}) => e.slotAppearance === "drawer" ? /* @__PURE__ */ t(A, { index: r, item: e, appearance: a }) : /* @__PURE__ */ n(
|
|
107
107
|
"label",
|
|
108
108
|
{
|
|
109
109
|
htmlFor: `ItemActionTrigger-${r}`,
|
|
@@ -111,10 +111,10 @@ const B = ({
|
|
|
111
111
|
item: e.label || `item ${r + 1}`,
|
|
112
112
|
defaultValue: `Toggle item action for ${e.label || `item ${r + 1}`}`
|
|
113
113
|
}),
|
|
114
|
-
className:
|
|
114
|
+
className: u({ appearance: a }),
|
|
115
115
|
"data-label-index": r,
|
|
116
116
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ t(
|
|
118
118
|
h,
|
|
119
119
|
{
|
|
120
120
|
"data-testid": `ItemActionTrigger-${r}`,
|
|
@@ -126,8 +126,8 @@ const B = ({
|
|
|
126
126
|
type: "button"
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
e.label && /* @__PURE__ */
|
|
130
|
-
e.icon && /* @__PURE__ */
|
|
129
|
+
e.label && /* @__PURE__ */ t("span", { className: "label", children: e.label }),
|
|
130
|
+
e.icon && /* @__PURE__ */ t(
|
|
131
131
|
i,
|
|
132
132
|
{
|
|
133
133
|
icon: e.icon,
|
|
@@ -135,20 +135,21 @@ const B = ({
|
|
|
135
135
|
id: `ItemIconActionTrigger-${r}`
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ t(
|
|
139
139
|
i,
|
|
140
140
|
{
|
|
141
141
|
className: "gi-hidden close-icon",
|
|
142
142
|
ariaHidden: !0,
|
|
143
143
|
id: `ItemCloseTrigger-${r}`,
|
|
144
144
|
icon: "close",
|
|
145
|
-
"data-testid": `ItemCloseTrigger-${r}
|
|
145
|
+
"data-testid": `ItemCloseTrigger-${r}`,
|
|
146
|
+
useFontIcon: !0
|
|
146
147
|
}
|
|
147
148
|
)
|
|
148
149
|
]
|
|
149
150
|
}
|
|
150
151
|
);
|
|
151
152
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
y as SlotContainer,
|
|
154
|
+
B as SlotItemAction
|
|
154
155
|
};
|
|
@@ -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])
|