@ogcio/design-system-react 1.22.1 → 1.24.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.d.ts +3 -5
- package/dist/accordion/accordion-item.js +32 -28
- package/dist/accordion/accordion.d.ts +3 -5
- package/dist/accordion/accordion.js +22 -33
- 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/clsx-OuTLNxxd.js +16 -0
- package/dist/cn.js +4 -16
- 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.d.ts +16 -4
- package/dist/icon/icon.js +79 -167
- package/dist/icon-button/icon-button.js +4 -5
- package/dist/index.d.ts +2 -5
- 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 +193 -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.d.ts +1 -1
- package/dist/tabs/tab-item.js +0 -1
- package/dist/tabs/tab-list.js +23 -24
- package/dist/tag/tag.d.ts +9 -3
- package/dist/tag/tag.js +35 -18
- 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 +6 -5
- package/dist/i18next-DxWa09nx.js +0 -1395
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as c,
|
|
7
|
+
l as g
|
|
8
|
+
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
1
|
+
import { default as React, ComponentPropsWithRef } from 'react';
|
|
2
2
|
export type AccordionItemProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
label: string;
|
|
5
5
|
defaultExpanded?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
-
dataTestid?: string;
|
|
8
|
-
iconStart?: boolean;
|
|
9
7
|
variant?: 'default' | 'small';
|
|
10
|
-
}
|
|
11
|
-
export declare const AccordionItem: ({ defaultExpanded, children, label, disabled,
|
|
8
|
+
} & ComponentPropsWithRef<'div'>;
|
|
9
|
+
export declare const AccordionItem: ({ defaultExpanded, children, label, disabled, className, variant, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
2
|
+
import { jsxs as r, Fragment as u, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as t } from "../clsx-OuTLNxxd.js";
|
|
4
4
|
import { useState as y, useRef as b } from "react";
|
|
5
5
|
import { c as h } from "../index-CB-zPpNk.js";
|
|
6
|
-
import { cn as d } from "../cn.js";
|
|
7
6
|
import { Icon as w } from "../icon/icon.js";
|
|
8
7
|
const I = h({
|
|
9
8
|
variants: {
|
|
@@ -13,40 +12,45 @@ const I = h({
|
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
}), j = ({
|
|
16
|
-
defaultExpanded:
|
|
17
|
-
children:
|
|
18
|
-
label:
|
|
19
|
-
disabled:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
defaultExpanded: s,
|
|
16
|
+
children: c,
|
|
17
|
+
label: i,
|
|
18
|
+
disabled: n,
|
|
19
|
+
className: l,
|
|
20
|
+
variant: e = "default",
|
|
21
|
+
...m
|
|
23
22
|
}) => {
|
|
24
|
-
const [o,
|
|
23
|
+
const [o, d] = y(s), g = b(null), p = `${i}-button`, f = `${i}-panel`;
|
|
25
24
|
return /* @__PURE__ */ r(u, { children: [
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ a(
|
|
27
26
|
"div",
|
|
28
27
|
{
|
|
28
|
+
...m,
|
|
29
29
|
ref: g,
|
|
30
|
-
"data-
|
|
31
|
-
|
|
32
|
-
"data-icon-start": !!m,
|
|
33
|
-
onClick: () => !e && a(!o),
|
|
30
|
+
"data-disabled": !!n,
|
|
31
|
+
onClick: () => !n && d(!o),
|
|
34
32
|
onKeyDown: (x) => {
|
|
35
|
-
x.key === "Enter" && !
|
|
33
|
+
x.key === "Enter" && !n && d(!o);
|
|
36
34
|
},
|
|
37
35
|
tabIndex: 0,
|
|
38
|
-
className: "gi-accordion",
|
|
36
|
+
className: t("gi-accordion", l),
|
|
39
37
|
children: /* @__PURE__ */ r(
|
|
40
38
|
"div",
|
|
41
39
|
{
|
|
42
|
-
className:
|
|
40
|
+
className: t(
|
|
41
|
+
"gi-accordion-header",
|
|
42
|
+
I({ variant: e })
|
|
43
|
+
),
|
|
43
44
|
children: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ n(
|
|
45
|
+
i,
|
|
46
|
+
/* @__PURE__ */ a(
|
|
47
47
|
w,
|
|
48
48
|
{
|
|
49
|
-
icon: o ? "keyboard_arrow_up" : "keyboard_arrow_down"
|
|
49
|
+
icon: o ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
50
|
+
size: "md",
|
|
51
|
+
className: t({
|
|
52
|
+
"gi-pt-[1.5px]": e === "default"
|
|
53
|
+
})
|
|
50
54
|
}
|
|
51
55
|
)
|
|
52
56
|
]
|
|
@@ -54,19 +58,19 @@ const I = h({
|
|
|
54
58
|
)
|
|
55
59
|
}
|
|
56
60
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ a(
|
|
58
62
|
"div",
|
|
59
63
|
{
|
|
60
64
|
id: f,
|
|
61
65
|
role: "region",
|
|
62
66
|
"aria-labelledby": p,
|
|
63
|
-
className:
|
|
67
|
+
className: t("gi-px-2 gi-pb-4 gi-pt-2 gi-font-normal", {
|
|
64
68
|
"gi-block": o,
|
|
65
69
|
"gi-hidden": !o,
|
|
66
|
-
"gi-text-md":
|
|
67
|
-
"gi-text-sm":
|
|
70
|
+
"gi-text-md": e === "default",
|
|
71
|
+
"gi-text-sm": e === "small"
|
|
68
72
|
}),
|
|
69
|
-
children:
|
|
73
|
+
children: c
|
|
70
74
|
}
|
|
71
75
|
)
|
|
72
76
|
] });
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ComponentPropsWithRef, ReactElement } from 'react';
|
|
2
2
|
import { AccordionItem } from './accordion-item.js';
|
|
3
3
|
export type AccordionProps = {
|
|
4
4
|
children: ReactElement<typeof AccordionItem>[];
|
|
5
|
-
iconStart?: boolean;
|
|
6
|
-
dataTestid?: string;
|
|
7
5
|
className?: string;
|
|
8
6
|
variant?: 'default' | 'small';
|
|
9
|
-
}
|
|
10
|
-
export declare const Accordion: ({ children,
|
|
7
|
+
} & ComponentPropsWithRef<'div'>;
|
|
8
|
+
export declare const Accordion: ({ children, className, variant, ...props }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +1,28 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Children as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
2
|
+
import { Children as t, isValidElement as c, cloneElement as d } from "react";
|
|
3
|
+
import { cn as i } from "../cn.js";
|
|
4
|
+
const b = ({
|
|
5
5
|
children: r,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return c(e) ? /* @__PURE__ */ o(
|
|
20
|
-
"div",
|
|
6
|
+
className: n,
|
|
7
|
+
variant: l = "default",
|
|
8
|
+
...m
|
|
9
|
+
}) => /* @__PURE__ */ o("div", { ...m, role: "presentation", className: i("gi-w-full", n), children: t.map(r, (e, s) => {
|
|
10
|
+
const a = s === t.count(r) - 1;
|
|
11
|
+
return c(e) ? /* @__PURE__ */ o(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: i("gi-border-t", {
|
|
15
|
+
"gi-border-b": a
|
|
16
|
+
}),
|
|
17
|
+
children: d(
|
|
18
|
+
e,
|
|
21
19
|
{
|
|
22
|
-
|
|
23
|
-
"gi-border-b": m
|
|
24
|
-
}),
|
|
25
|
-
children: p(
|
|
26
|
-
e,
|
|
27
|
-
{
|
|
28
|
-
variant: s,
|
|
29
|
-
iconStart: t
|
|
30
|
-
}
|
|
31
|
-
)
|
|
20
|
+
variant: l
|
|
32
21
|
}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
);
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
) : null;
|
|
25
|
+
}) });
|
|
37
26
|
export {
|
|
38
|
-
|
|
27
|
+
b as Accordion
|
|
39
28
|
};
|
package/dist/alert/alert.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import { jsxs as n, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
4
3
|
import { useState as v } from "react";
|
|
5
4
|
import { cn as c } from "../cn.js";
|
|
6
5
|
import { translate as D } from "../i18n/utility.js";
|
|
7
6
|
import { Icon as w } from "../icon/icon.js";
|
|
8
7
|
import { IconButton as x } from "../icon-button/icon-button.js";
|
|
9
8
|
import { alertVariants as I } from "./variants.js";
|
|
10
|
-
const V = ({ variant:
|
|
9
|
+
const V = ({ variant: e }) => {
|
|
11
10
|
let a;
|
|
12
|
-
switch (
|
|
11
|
+
switch (e) {
|
|
13
12
|
case "warning": {
|
|
14
13
|
a = "warning";
|
|
15
14
|
break;
|
|
@@ -27,53 +26,53 @@ const V = ({ variant: r }) => {
|
|
|
27
26
|
}
|
|
28
27
|
return a;
|
|
29
28
|
};
|
|
30
|
-
function
|
|
31
|
-
title:
|
|
29
|
+
function q({
|
|
30
|
+
title: e,
|
|
32
31
|
children: a,
|
|
33
|
-
variant:
|
|
34
|
-
showIcon:
|
|
32
|
+
variant: r = "info",
|
|
33
|
+
showIcon: l = !0,
|
|
35
34
|
dismissible: t,
|
|
36
|
-
onClose:
|
|
37
|
-
className:
|
|
35
|
+
onClose: s,
|
|
36
|
+
className: o,
|
|
38
37
|
...m
|
|
39
38
|
}) {
|
|
40
39
|
const [d, u] = v(!1), { base: f, heading: p, container: g, dismiss: b, baseDismissible: h } = I({
|
|
41
|
-
variant:
|
|
40
|
+
variant: r
|
|
42
41
|
}), k = t ? h : f;
|
|
43
42
|
return d ? null : /* @__PURE__ */ n(
|
|
44
43
|
"div",
|
|
45
44
|
{
|
|
46
|
-
className: c(k(),
|
|
45
|
+
className: c(k(), o, "gi-not-prose"),
|
|
47
46
|
role: "alert",
|
|
48
47
|
"aria-live": "assertive",
|
|
49
48
|
...m,
|
|
50
49
|
children: [
|
|
51
|
-
|
|
50
|
+
l ? /* @__PURE__ */ i(
|
|
52
51
|
w,
|
|
53
52
|
{
|
|
54
|
-
icon: V({ variant:
|
|
53
|
+
icon: V({ variant: r }),
|
|
55
54
|
ariaHidden: !0,
|
|
56
55
|
className: "gi-alert-icon",
|
|
57
|
-
"data-variant":
|
|
56
|
+
"data-variant": r
|
|
58
57
|
}
|
|
59
58
|
) : null,
|
|
60
59
|
/* @__PURE__ */ n(
|
|
61
60
|
"div",
|
|
62
61
|
{
|
|
63
62
|
className: c(g(), {
|
|
64
|
-
"gi-gap-1":
|
|
63
|
+
"gi-gap-1": e
|
|
65
64
|
}),
|
|
66
65
|
children: [
|
|
67
|
-
|
|
66
|
+
e && /* @__PURE__ */ i("p", { className: p(), children: e }),
|
|
68
67
|
a
|
|
69
68
|
]
|
|
70
69
|
}
|
|
71
70
|
),
|
|
72
|
-
t && /* @__PURE__ */
|
|
71
|
+
t && /* @__PURE__ */ i(
|
|
73
72
|
x,
|
|
74
73
|
{
|
|
75
74
|
onClick: (N) => {
|
|
76
|
-
u(!0),
|
|
75
|
+
u(!0), s == null || s(N);
|
|
77
76
|
},
|
|
78
77
|
className: b(),
|
|
79
78
|
size: "small",
|
|
@@ -90,5 +89,5 @@ function y({
|
|
|
90
89
|
);
|
|
91
90
|
}
|
|
92
91
|
export {
|
|
93
|
-
|
|
92
|
+
q as Alert
|
|
94
93
|
};
|