@ogcio/design-system-react 1.32.0 → 1.34.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/accordion/accordion-item.js +62 -57
- package/dist/alert/alert.js +37 -39
- package/dist/alert/variants.d.ts +49 -52
- package/dist/alert/variants.js +17 -18
- package/dist/atoms/Button.d.ts +2 -2
- package/dist/atoms/Button.js +3 -2
- package/dist/atoms/heading/styles.js +1 -1
- package/dist/atoms/storybook/Heading.meta.d.ts +1 -1
- package/dist/atoms/storybook/Heading.meta.js +4 -4
- package/dist/atoms/storybook/Icons.meta.d.ts +1 -1
- package/dist/atoms/storybook/Icons.meta.js +7 -7
- package/dist/atoms/storybook/InsetText.meta.d.ts +1 -1
- package/dist/atoms/storybook/InsetText.meta.js +1 -1
- package/dist/atoms/storybook/Logos.meta.d.ts +1 -1
- package/dist/atoms/storybook/Logos.meta.js +1 -1
- package/dist/autocomplete/autocomplete.js +1 -1
- package/dist/autocomplete/use-autocomplete-controller.js +2 -2
- package/dist/browser-support/browser-support.js +202 -30
- package/dist/button/button.d.ts +2 -9
- package/dist/button/button.js +65 -32
- package/dist/button/helpers.d.ts +2 -1
- package/dist/button/types.d.ts +25 -8
- package/dist/button-group/button-group.js +43 -45
- package/dist/button-group/types.d.ts +5 -5
- package/dist/card/card-legacy.js +1 -1
- package/dist/card/types.d.ts +1 -1
- package/dist/chip/chip.js +1 -1
- package/dist/combo-box/dropdown-item.js +1 -1
- package/dist/cookie-banner/cookie-banner.d.ts +1 -1
- package/dist/data-table/data-table-footer.js +2 -2
- package/dist/data-table/data-table-header.js +2 -2
- package/dist/data-table/data-table-selected-rows.js +1 -1
- package/dist/data-table/editable-table-cell.js +1 -1
- package/dist/details/details.js +13 -16
- package/dist/drawer/drawer.d.ts +1 -1
- package/dist/drawer/drawer.js +18 -18
- package/dist/error-text/error-text.js +28 -27
- package/dist/forms/form-field/form-field.js +24 -25
- package/dist/header/components/header-search.js +2 -2
- package/dist/header/header-legacy.js +6 -6
- package/dist/header/header-next/header-next.js +3 -3
- package/dist/header/variants.js +1 -1
- package/dist/hint-text/hint-text.js +26 -20
- package/dist/i18n/config.js +2 -2
- package/dist/i18n/utility.js +1 -1
- package/dist/{i18nInstance-AYICsHJu.js → i18nInstance-DiZ0lVPL.js} +2 -2
- package/dist/i18next-zBkzxGW1.js +1388 -0
- package/dist/icon-button/icon-button.d.ts +3 -5
- package/dist/{index-CB-zPpNk.js → index-C7W4ssMN.js} +1 -1
- package/dist/index-DqBV2TCd.js +23108 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/label/label.d.ts +78 -30
- package/dist/label/label.js +29 -14
- package/dist/{lodash-82PmXrjJ.js → lodash-DTZaBYO8.js} +289 -272
- package/dist/modal/modal.content.js +2 -2
- package/dist/modal/modal.js +38 -38
- package/dist/modal/types.d.ts +5 -4
- package/dist/pagination/pagination.js +82 -80
- package/dist/progress-stepper/progress-stepper.js +1 -1
- package/dist/score-select/type.d.ts +2 -2
- package/dist/select/select-native.js +1 -1
- package/dist/select/select-next.js +87 -87
- package/dist/side-nav/side-nav.js +1 -1
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/table/table.js +1 -1
- package/dist/tabs/tab-item.js +53 -71
- package/dist/tabs/variants.d.ts +269 -0
- package/dist/tabs/variants.js +87 -0
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/tooltip.js +27 -35
- package/dist/tooltip/variants.d.ts +115 -0
- package/dist/tooltip/variants.js +59 -0
- package/dist/{useTranslation-DiBQuy8S.js → useTranslation-CRbS3UeG.js} +94 -85
- package/package.json +14 -7
- package/dist/i18next-Bfi2-LyH.js +0 -1370
- package/dist/index-Bh2cTIps.js +0 -33899
|
@@ -1,95 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as G, useState as V, useEffect as k, useContext as w } from "react";
|
|
4
|
-
import
|
|
4
|
+
import S from "../atoms/Button.js";
|
|
5
5
|
import { cn as g } from "../cn.js";
|
|
6
6
|
import { useDomId as j } from "../hooks/use-dom-id.js";
|
|
7
|
-
const
|
|
7
|
+
const y = G(
|
|
8
8
|
void 0
|
|
9
9
|
), D = ({
|
|
10
|
-
value:
|
|
10
|
+
value: o,
|
|
11
11
|
children: s,
|
|
12
12
|
role: d,
|
|
13
13
|
"aria-checked": e,
|
|
14
|
-
"aria-label":
|
|
15
|
-
...t
|
|
14
|
+
"aria-label": n
|
|
16
15
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
16
|
+
const t = w(y);
|
|
17
|
+
if (!t)
|
|
19
18
|
throw new Error("ButtonGroupItem must be used within a ButtonGroup");
|
|
20
19
|
const {
|
|
21
|
-
selectedValue:
|
|
22
|
-
setSelectedValue:
|
|
23
|
-
size:
|
|
24
|
-
onChange:
|
|
20
|
+
selectedValue: a,
|
|
21
|
+
setSelectedValue: u,
|
|
22
|
+
size: l,
|
|
23
|
+
onChange: r,
|
|
25
24
|
groupId: m,
|
|
26
25
|
appearance: p
|
|
27
|
-
} =
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
return /* @__PURE__ */
|
|
26
|
+
} = t, i = a === o, c = () => {
|
|
27
|
+
u(o), r == null || r(o);
|
|
28
|
+
}, b = `${m}-${o}`;
|
|
29
|
+
return /* @__PURE__ */ f(
|
|
31
30
|
S,
|
|
32
31
|
{
|
|
33
32
|
variant: i ? "primary" : "secondary",
|
|
34
|
-
size:
|
|
33
|
+
size: l,
|
|
35
34
|
appearance: p,
|
|
36
|
-
onClick:
|
|
37
|
-
id:
|
|
35
|
+
onClick: c,
|
|
36
|
+
id: b,
|
|
38
37
|
role: d || "radio",
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
ariaChecked: e === void 0 ? i : e,
|
|
39
|
+
ariaLabel: n,
|
|
41
40
|
type: "button",
|
|
42
|
-
...t,
|
|
43
41
|
children: s
|
|
44
42
|
}
|
|
45
43
|
);
|
|
46
44
|
}, N = ({
|
|
47
|
-
name:
|
|
45
|
+
name: o,
|
|
48
46
|
size: s = "medium",
|
|
49
47
|
appearance: d = "dark",
|
|
50
48
|
onChange: e,
|
|
51
|
-
defaultValue:
|
|
49
|
+
defaultValue: n,
|
|
52
50
|
value: t,
|
|
53
|
-
children:
|
|
54
|
-
role:
|
|
51
|
+
children: a,
|
|
52
|
+
role: u,
|
|
55
53
|
"aria-labelledby": l,
|
|
56
|
-
"aria-describedby":
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
54
|
+
"aria-describedby": r,
|
|
55
|
+
className: m,
|
|
56
|
+
...p
|
|
59
57
|
}) => {
|
|
60
|
-
const [
|
|
61
|
-
|
|
62
|
-
), b = t === void 0 ?
|
|
58
|
+
const [i, c] = V(
|
|
59
|
+
n
|
|
60
|
+
), b = t === void 0 ? i : t;
|
|
63
61
|
k(() => {
|
|
64
|
-
t !== void 0 &&
|
|
62
|
+
t !== void 0 && c(t);
|
|
65
63
|
}, [t]);
|
|
66
|
-
const
|
|
67
|
-
t === void 0 &&
|
|
64
|
+
const I = (x) => {
|
|
65
|
+
t === void 0 && c(x), e == null || e(x);
|
|
68
66
|
}, B = j();
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
|
|
67
|
+
return /* @__PURE__ */ f(
|
|
68
|
+
y.Provider,
|
|
71
69
|
{
|
|
72
70
|
value: {
|
|
73
71
|
selectedValue: b,
|
|
74
|
-
setSelectedValue:
|
|
75
|
-
name:
|
|
72
|
+
setSelectedValue: I,
|
|
73
|
+
name: o,
|
|
76
74
|
size: s,
|
|
77
75
|
onChange: e,
|
|
78
76
|
groupId: B,
|
|
79
77
|
appearance: d,
|
|
80
|
-
...
|
|
78
|
+
...p
|
|
81
79
|
},
|
|
82
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ f(
|
|
83
81
|
"div",
|
|
84
82
|
{
|
|
85
83
|
className: g(
|
|
86
84
|
"gi-flex gi-flex-wrap gi-gap-3 [&_button]:gi-min-w-12 [&_button]:gi-justify-center",
|
|
87
|
-
|
|
85
|
+
m
|
|
88
86
|
),
|
|
89
|
-
role:
|
|
87
|
+
role: u || "radiogroup",
|
|
90
88
|
"aria-labelledby": l,
|
|
91
|
-
"aria-describedby":
|
|
92
|
-
children:
|
|
89
|
+
"aria-describedby": r,
|
|
90
|
+
children: a
|
|
93
91
|
}
|
|
94
92
|
)
|
|
95
93
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
export type ButtonGroupProps = PropsWithChildren<{
|
|
4
4
|
name: string;
|
|
5
|
-
size?:
|
|
6
|
-
appearance?:
|
|
5
|
+
size?: ButtonProps['size'];
|
|
6
|
+
appearance?: ButtonProps['appearance'];
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
value?: string;
|
|
@@ -22,8 +22,8 @@ export type ButtonGroupContextType = {
|
|
|
22
22
|
selectedValue?: string;
|
|
23
23
|
setSelectedValue: (value: string) => void;
|
|
24
24
|
name: string;
|
|
25
|
-
size:
|
|
26
|
-
appearance?:
|
|
25
|
+
size: ButtonProps['size'];
|
|
26
|
+
appearance?: ButtonProps['appearance'];
|
|
27
27
|
onChange?: (value: string) => void;
|
|
28
28
|
groupId: string;
|
|
29
29
|
};
|
package/dist/card/card-legacy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import k from "../atoms/Button.js";
|
|
3
3
|
import { translate as c } from "../i18n/utility.js";
|
|
4
4
|
import { Link as u } from "../link/link.js";
|
|
5
5
|
import { CardNext as b, CardMedia as L, CardContainer as T, CardHeader as V, CardTitle as $, CardSubtitle as j, CardTag as A, CardDescription as B, CardAction as H } from "./card-next.js";
|
package/dist/card/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '../
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
import { IconProps } from '../icon/icon.js';
|
|
4
4
|
import { LinkProps } from '../link/link.js';
|
|
5
5
|
import { TagProps } from '../tag/tag.js';
|
package/dist/chip/chip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { useId as l } from "react";
|
|
4
|
-
import { c as p } from "../index-
|
|
4
|
+
import { c as p } from "../index-C7W4ssMN.js";
|
|
5
5
|
import { cn as g } from "../cn.js";
|
|
6
6
|
import { translate as t } from "../i18n/utility.js";
|
|
7
7
|
import { Icon as u } from "../icon/icon.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useState as u, useId as j, useEffect as q } from "react";
|
|
4
|
-
import
|
|
4
|
+
import B from "../atoms/Button.js";
|
|
5
5
|
import { cn as x } from "../cn.js";
|
|
6
6
|
import { translate as N } from "../i18n/utility.js";
|
|
7
7
|
import { Icon as D } from "../icon/icon.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import c from "react";
|
|
3
|
-
import { c as x } from "../index-
|
|
3
|
+
import { c as x } from "../index-C7W4ssMN.js";
|
|
4
4
|
import { cn as i } from "../cn.js";
|
|
5
5
|
const b = ({
|
|
6
6
|
children: e,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as A, Children as L, isValidElement as O } from "react";
|
|
3
|
-
import { c as P } from "../index-
|
|
4
|
-
import
|
|
3
|
+
import { c as P } from "../index-C7W4ssMN.js";
|
|
4
|
+
import w from "../atoms/Button.js";
|
|
5
5
|
import { Chip as S } from "../chip/chip.js";
|
|
6
6
|
import { cn as n } from "../cn.js";
|
|
7
7
|
import { translate as x } from "../i18n/utility.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as o } from "../index-
|
|
2
|
+
import { c as o } from "../index-C7W4ssMN.js";
|
|
3
3
|
import { cn as g } from "../cn.js";
|
|
4
4
|
import { translate as m } from "../i18n/utility.js";
|
|
5
5
|
const p = ({ selectedCount: e, actions: s, className: a, ...l }) => /* @__PURE__ */ r("div", { className: g(i.root(), a), ...l, children: [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { l as O } from "../lodash-
|
|
3
|
+
import { l as O } from "../lodash-DTZaBYO8.js";
|
|
4
4
|
import { useState as g, useMemo as S, useEffect as k } from "react";
|
|
5
5
|
import { InputCheckboxTableCell as V } from "../input-checkbox/input-checkbox.js";
|
|
6
6
|
import { InputTextTableCell as j } from "../input-text/input-text.js";
|
package/dist/details/details.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as t, jsx as
|
|
2
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useRef as g, useState as u, useEffect as f } from "react";
|
|
4
|
-
import { c as
|
|
5
|
-
import { Icon as
|
|
6
|
-
const w = ({ label:
|
|
7
|
-
const s = g(null), [e,
|
|
4
|
+
import { c as m } from "../index-C7W4ssMN.js";
|
|
5
|
+
import { Icon as p } from "../icon/icon.js";
|
|
6
|
+
const w = ({ label: l, name: n, children: d, ...c }) => {
|
|
7
|
+
const s = g(null), [e, o] = u(!1);
|
|
8
8
|
return f(() => {
|
|
9
9
|
var i, r;
|
|
10
|
-
((i = s.current) == null ? void 0 : i.open) !== e &&
|
|
10
|
+
((i = s.current) == null ? void 0 : i.open) !== e && o(((r = s.current) == null ? void 0 : r.open) ?? !1);
|
|
11
11
|
}, []), /* @__PURE__ */ t(
|
|
12
12
|
"details",
|
|
13
13
|
{
|
|
14
14
|
ref: s,
|
|
15
15
|
onToggle: () => {
|
|
16
16
|
var i;
|
|
17
|
-
|
|
17
|
+
o(((i = s.current) == null ? void 0 : i.open) ?? !1);
|
|
18
18
|
},
|
|
19
19
|
"data-testid": "govie-details",
|
|
20
20
|
className: "gi-block gi-text-md gi-text-gray-950",
|
|
21
21
|
"data-module": "gi-details",
|
|
22
|
-
name:
|
|
22
|
+
name: n,
|
|
23
23
|
"aria-expanded": e ? "true" : "false",
|
|
24
24
|
"aria-details": "details-content",
|
|
25
25
|
...c,
|
|
@@ -33,12 +33,12 @@ const w = ({ label: n, name: l, children: d, ...c }) => {
|
|
|
33
33
|
"aria-controls": "details-content",
|
|
34
34
|
"aria-expanded": e ? "true" : "false",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ a(p, { icon: e ? "keyboard_arrow_up" : "keyboard_arrow_down" }),
|
|
37
|
+
/* @__PURE__ */ a("span", { className: "gi-underline", children: l })
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ a(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
44
|
id: "details-content",
|
|
@@ -50,7 +50,7 @@ const w = ({ label: n, name: l, children: d, ...c }) => {
|
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
}, _ =
|
|
53
|
+
}, _ = m({
|
|
54
54
|
base: [
|
|
55
55
|
"gi-flex",
|
|
56
56
|
"gi-items-center",
|
|
@@ -64,10 +64,7 @@ const w = ({ label: n, name: l, children: d, ...c }) => {
|
|
|
64
64
|
"focus-visible:gi-shadow-[0_0_0_2px_var(--gieds-color-gray-950),0_0_0_5px_var(--gieds-color-yellow-400)]",
|
|
65
65
|
"focus-visible:gi-outline-none",
|
|
66
66
|
"[&:focus>span]:gi-no-underline",
|
|
67
|
-
"[&:focus>span]:gi-select-none"
|
|
68
|
-
"[&:hover>span]:gi-underline-offset-[0.1rem]",
|
|
69
|
-
"[&:hover>span]:[text-decoration-thickness:max(3px)]",
|
|
70
|
-
"[&:hover>span]:[text-decoration-skip-ink:none]"
|
|
67
|
+
"[&:focus>span]:gi-select-none"
|
|
71
68
|
]
|
|
72
69
|
});
|
|
73
70
|
export {
|
package/dist/drawer/drawer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '../
|
|
2
|
+
import { Props as ButtonProps } from '../atoms/Button';
|
|
3
3
|
import { ModalProps, ModalWrapperProps } from '../modal/types.js';
|
|
4
4
|
type DrawerChildren = Array<ReactElement<typeof DrawerBody | typeof DrawerBody>> | ReactElement<typeof Fragment>;
|
|
5
5
|
export type DrawerPosition = 'left' | 'right' | 'bottom';
|
package/dist/drawer/drawer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs as x, Fragment as C, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useState as D, cloneElement as O } from "react";
|
|
4
4
|
import { cn as l } from "../cn.js";
|
|
5
5
|
import { ModalBody as u, ModalFooter as j, ModalWrapper as v } from "../modal/modal.js";
|
|
6
|
-
const
|
|
6
|
+
const T = ({
|
|
7
7
|
children: o,
|
|
8
8
|
className: e,
|
|
9
9
|
...r
|
|
@@ -15,29 +15,29 @@ const h = ({
|
|
|
15
15
|
...r,
|
|
16
16
|
children: o
|
|
17
17
|
}
|
|
18
|
-
),
|
|
18
|
+
), h = ({
|
|
19
19
|
children: o,
|
|
20
20
|
triggerButton: e,
|
|
21
21
|
startsOpen: r,
|
|
22
|
-
closeButtonLabel:
|
|
22
|
+
closeButtonLabel: i,
|
|
23
23
|
position: t = "right",
|
|
24
24
|
className: f
|
|
25
25
|
}) => {
|
|
26
26
|
const [d, s] = D(!!r), m = () => s(!0), w = () => s(!1), b = O(e, {
|
|
27
|
-
|
|
27
|
+
dataTestId: "drawer-trigger-button-container",
|
|
28
28
|
onClick: (y) => {
|
|
29
|
-
var c,
|
|
30
|
-
const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (
|
|
29
|
+
var c, p;
|
|
30
|
+
const n = 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;
|
|
31
31
|
n && n(y), m();
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
return /* @__PURE__ */ x(C, { children: [
|
|
35
35
|
b,
|
|
36
36
|
/* @__PURE__ */ a(
|
|
37
|
-
|
|
37
|
+
T,
|
|
38
38
|
{
|
|
39
39
|
children: o,
|
|
40
|
-
closeButtonLabel:
|
|
40
|
+
closeButtonLabel: i,
|
|
41
41
|
position: t,
|
|
42
42
|
className: f,
|
|
43
43
|
isOpen: d,
|
|
@@ -46,12 +46,12 @@ const h = ({
|
|
|
46
46
|
)
|
|
47
47
|
] });
|
|
48
48
|
};
|
|
49
|
-
Object.defineProperty(
|
|
49
|
+
Object.defineProperty(h, "componentType", {
|
|
50
50
|
value: "Drawer",
|
|
51
51
|
writable: !1,
|
|
52
52
|
enumerable: !1
|
|
53
53
|
});
|
|
54
|
-
const
|
|
54
|
+
const k = ({ children: o, className: e }) => /* @__PURE__ */ a(
|
|
55
55
|
u,
|
|
56
56
|
{
|
|
57
57
|
includeModalClass: !1,
|
|
@@ -62,24 +62,24 @@ const F = ({ children: o, className: e }) => /* @__PURE__ */ a(
|
|
|
62
62
|
children: o
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
Object.defineProperty(
|
|
65
|
+
Object.defineProperty(k, "componentType", {
|
|
66
66
|
value: "DrawerBody",
|
|
67
67
|
writable: !1,
|
|
68
68
|
enumerable: !1
|
|
69
69
|
});
|
|
70
|
-
const
|
|
70
|
+
const F = ({
|
|
71
71
|
children: o,
|
|
72
72
|
className: e,
|
|
73
73
|
stacked: r
|
|
74
74
|
}) => /* @__PURE__ */ a(j, { stacked: r, className: l("gi-drawer-footer", e), children: o });
|
|
75
|
-
Object.defineProperty(
|
|
75
|
+
Object.defineProperty(F, "componentType", {
|
|
76
76
|
value: "DrawerFooter",
|
|
77
77
|
writable: !1,
|
|
78
78
|
enumerable: !1
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
h as Drawer,
|
|
82
|
+
k as DrawerBody,
|
|
83
|
+
F as DrawerFooter,
|
|
84
|
+
T as DrawerWrapper
|
|
85
85
|
};
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as s } from "../index-C7W4ssMN.js";
|
|
3
|
+
const l = {
|
|
4
4
|
Small: "sm",
|
|
5
5
|
Medium: "md",
|
|
6
6
|
Large: "lg"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
sm: "gi-error-text-sm",
|
|
12
|
-
md: "gi-error-text-md",
|
|
13
|
-
lg: "gi-error-text-lg"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
size: "md"
|
|
18
|
-
}
|
|
19
|
-
}), x = ({
|
|
20
|
-
text: r,
|
|
7
|
+
}, d = ({
|
|
8
|
+
text: t,
|
|
21
9
|
className: e,
|
|
22
|
-
size:
|
|
10
|
+
size: r = l.Medium,
|
|
23
11
|
dataTestid: i,
|
|
24
|
-
children:
|
|
25
|
-
...
|
|
26
|
-
}) => /* @__PURE__ */
|
|
12
|
+
children: a,
|
|
13
|
+
...o
|
|
14
|
+
}) => /* @__PURE__ */ m(
|
|
27
15
|
"div",
|
|
28
16
|
{
|
|
29
17
|
role: "alert",
|
|
30
|
-
className:
|
|
18
|
+
className: n({ size: r, className: e }),
|
|
31
19
|
"data-testid": i,
|
|
32
|
-
...
|
|
33
|
-
children:
|
|
20
|
+
...o,
|
|
21
|
+
children: a ?? t
|
|
34
22
|
}
|
|
35
23
|
);
|
|
36
|
-
|
|
24
|
+
d.displayName = "ErrorText";
|
|
25
|
+
const n = s({
|
|
26
|
+
base: "gi-font-normal gi-text-color-text-intent-error-default",
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
sm: "gi-text-sm",
|
|
30
|
+
md: "gi-text-md",
|
|
31
|
+
lg: "gi-text-lg"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
size: "md"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
l as ErrorSize,
|
|
40
|
+
d as ErrorText
|
|
40
41
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as l, jsxs as
|
|
2
|
+
import { jsx as l, jsxs as d, Fragment as x } from "react/jsx-runtime";
|
|
3
3
|
import { S as p } from "../../index-D_wwt4P0.js";
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { cn as
|
|
4
|
+
import { createContext as v, useContext as N, Children as C } from "react";
|
|
5
|
+
import { cn as s } 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
8
|
import { Label as H, styles as P } from "../../label/label.js";
|
|
9
9
|
import { getSpecialComponentType as F, isSpecialComponent as w } from "../../utils/utilities.js";
|
|
10
|
-
const f =
|
|
10
|
+
const f = v(null);
|
|
11
11
|
function b(e) {
|
|
12
|
-
|
|
12
|
+
N(f) || console.error(`[${e}] must be used within a <FormField>.`);
|
|
13
13
|
}
|
|
14
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__ */ d(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 U = (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
|
+
), m = r.find(
|
|
29
29
|
(t) => F(t) === "FormFieldHint"
|
|
30
30
|
), a = r.find(
|
|
31
31
|
(t) => F(t) === "FormFieldError"
|
|
32
|
-
),
|
|
32
|
+
), c = r.filter(
|
|
33
33
|
(t) => !w(t, [
|
|
34
34
|
"FormFieldLabel",
|
|
35
35
|
"FormFieldHint",
|
|
36
36
|
"FormFieldError"
|
|
37
37
|
])
|
|
38
38
|
);
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ d(
|
|
40
40
|
"fieldset",
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
42
|
+
className: s({ "gi-error-state": !!a }, i),
|
|
43
43
|
...o,
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ d("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
|
|
46
|
+
/* @__PURE__ */ d("div", { children: [
|
|
47
47
|
n,
|
|
48
|
-
|
|
48
|
+
m
|
|
49
49
|
] }),
|
|
50
50
|
a
|
|
51
51
|
] }),
|
|
52
|
-
/* @__PURE__ */ l(p, { children:
|
|
52
|
+
/* @__PURE__ */ l(p, { children: c })
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -59,32 +59,31 @@ const U = (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:
|
|
62
|
+
secondaryLabel: m,
|
|
63
63
|
...a
|
|
64
64
|
}) => {
|
|
65
65
|
b("FormFieldLabel");
|
|
66
|
-
const
|
|
66
|
+
const c = /* @__PURE__ */ d(x, { children: [
|
|
67
67
|
i ?? e,
|
|
68
|
-
|
|
68
|
+
m ? /* @__PURE__ */ l("span", { className: "gi-secondary-label", children: m }) : null
|
|
69
69
|
] });
|
|
70
70
|
return r ? /* @__PURE__ */ l(
|
|
71
71
|
H,
|
|
72
72
|
{
|
|
73
73
|
size: o,
|
|
74
74
|
htmlFor: r,
|
|
75
|
-
className:
|
|
75
|
+
className: s("gi-font-bold", n),
|
|
76
76
|
...a,
|
|
77
|
-
children:
|
|
77
|
+
children: c
|
|
78
78
|
}
|
|
79
79
|
) : /* @__PURE__ */ l(
|
|
80
80
|
"legend",
|
|
81
81
|
{
|
|
82
|
-
className: P({
|
|
83
|
-
|
|
84
|
-
className: d("gi-font-bold", n)
|
|
82
|
+
className: P({ size: o }).base({
|
|
83
|
+
className: s("gi-font-bold", n)
|
|
85
84
|
}),
|
|
86
85
|
...a,
|
|
87
|
-
children:
|
|
86
|
+
children: c
|
|
88
87
|
}
|
|
89
88
|
);
|
|
90
89
|
};
|
|
@@ -94,7 +93,7 @@ Object.defineProperty(u, "componentType", {
|
|
|
94
93
|
enumerable: !1
|
|
95
94
|
});
|
|
96
95
|
u.displayName = "FormFieldLabel";
|
|
97
|
-
const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className:
|
|
96
|
+
const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className: r, children: e }));
|
|
98
97
|
Object.defineProperty(h, "componentType", {
|
|
99
98
|
value: "FormFieldHint",
|
|
100
99
|
writable: !1,
|
|
@@ -112,7 +111,7 @@ const g = ({
|
|
|
112
111
|
{
|
|
113
112
|
text: i,
|
|
114
113
|
size: o,
|
|
115
|
-
className:
|
|
114
|
+
className: s("gi-mb-1", r),
|
|
116
115
|
...n,
|
|
117
116
|
children: e
|
|
118
117
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import c from "../../Heading.js";
|
|
3
|
-
import
|
|
3
|
+
import h from "../../atoms/Button.js";
|
|
4
4
|
import { translate as a } from "../../i18n/utility.js";
|
|
5
5
|
import { IconButton as d } from "../../icon-button/icon-button.js";
|
|
6
6
|
import { InputText as m } from "../../input-text/input-text.js";
|
|
@@ -35,7 +35,7 @@ function b({
|
|
|
35
35
|
/* @__PURE__ */ e("div", { className: "gi-ml-1 gi-flex-none gi-hidden md:gi-block", children: /* @__PURE__ */ e(
|
|
36
36
|
h,
|
|
37
37
|
{
|
|
38
|
-
|
|
38
|
+
ariaLabel: a("header.submitSearch", {
|
|
39
39
|
defaultValue: "Submit Search"
|
|
40
40
|
}),
|
|
41
41
|
children: a("header.search", { defaultValue: "Search" })
|