@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/button/button.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef as l } from "react";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
5
4
|
import { cn as u } from "../cn.js";
|
|
6
5
|
import { getSizeClass as c, isButtonDisabled as b, getVariantAppearanceClass as B } from "./helpers.js";
|
|
7
|
-
const r =
|
|
6
|
+
const r = p(
|
|
8
7
|
({
|
|
9
8
|
variant: e,
|
|
10
9
|
appearance: o,
|
|
11
10
|
size: a,
|
|
12
11
|
disabled: t,
|
|
13
12
|
className: n,
|
|
14
|
-
children:
|
|
15
|
-
dataTestid:
|
|
16
|
-
...
|
|
17
|
-
},
|
|
13
|
+
children: s,
|
|
14
|
+
dataTestid: i,
|
|
15
|
+
...m
|
|
16
|
+
}, f) => /* @__PURE__ */ l(
|
|
18
17
|
"button",
|
|
19
18
|
{
|
|
20
|
-
"data-testid":
|
|
21
|
-
...
|
|
22
|
-
ref:
|
|
19
|
+
"data-testid": i,
|
|
20
|
+
...m,
|
|
21
|
+
ref: f,
|
|
23
22
|
"aria-disabled": t,
|
|
24
23
|
disabled: t,
|
|
25
24
|
className: u(
|
|
@@ -29,7 +28,7 @@ const r = l(
|
|
|
29
28
|
c(a),
|
|
30
29
|
n
|
|
31
30
|
),
|
|
32
|
-
children:
|
|
31
|
+
children: s
|
|
33
32
|
}
|
|
34
33
|
)
|
|
35
34
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as y } from "react/jsx-runtime";
|
|
4
3
|
import { createContext as G, useState as V, useEffect as k, useContext as S } from "react";
|
|
5
4
|
import { Button as w } from "../button/button.js";
|
|
@@ -7,7 +6,7 @@ import { cn as E } from "../cn.js";
|
|
|
7
6
|
import { useDomId as $ } from "../hooks/use-dom-id.js";
|
|
8
7
|
const x = G(
|
|
9
8
|
void 0
|
|
10
|
-
),
|
|
9
|
+
), P = ({
|
|
11
10
|
value: r,
|
|
12
11
|
children: d,
|
|
13
12
|
role: s,
|
|
@@ -44,7 +43,7 @@ const x = G(
|
|
|
44
43
|
children: d
|
|
45
44
|
}
|
|
46
45
|
);
|
|
47
|
-
},
|
|
46
|
+
}, q = ({
|
|
48
47
|
name: r,
|
|
49
48
|
size: d = "medium",
|
|
50
49
|
appearance: s = "dark",
|
|
@@ -94,6 +93,6 @@ const x = G(
|
|
|
94
93
|
);
|
|
95
94
|
};
|
|
96
95
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
q as ButtonGroup,
|
|
97
|
+
P as ButtonGroupItem
|
|
99
98
|
};
|
package/dist/card/card-next.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import { createContext as y, useId as M, useContext as N, Children as P, isValidElement as B, useState as S, useMemo as q, useEffect as F, cloneElement as O } from "react";
|
|
2
|
+
import { jsx as a, jsxs as B } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as y, useId as P, useContext as N, useEffect as I, Children as E, isValidElement as O, useState as M, useMemo as F, cloneElement as k } from "react";
|
|
5
4
|
import { cn as d } from "../cn.js";
|
|
6
|
-
import { useBreakpoint as G, Breakpoint as
|
|
5
|
+
import { useBreakpoint as G, Breakpoint as L } from "../hooks/use-breakpoint.js";
|
|
7
6
|
import { Icon as J } from "../icon/icon.js";
|
|
8
7
|
import { Paragraph as K } from "../paragraph/paragraph.js";
|
|
9
8
|
import { Tag as Q } from "../tag/tag.js";
|
|
10
|
-
import { isSpecialComponent as U, getSpecialComponentType as
|
|
11
|
-
const
|
|
12
|
-
function
|
|
9
|
+
import { isSpecialComponent as U, getSpecialComponentType as $ } from "../utils/utilities.js";
|
|
10
|
+
const A = (e) => e.ariaLabel ?? e.label ?? e.title ?? e.alt ?? "", j = y(!1), w = y(!1), x = y(!1), T = y(null);
|
|
11
|
+
function C(e, r, t) {
|
|
13
12
|
if (!N(e))
|
|
14
|
-
throw new Error(`${
|
|
13
|
+
throw new Error(`${r} must be used inside <${t}>`);
|
|
15
14
|
return !0;
|
|
16
15
|
}
|
|
17
|
-
const W = (e,
|
|
16
|
+
const W = (e, r) => e === "full" ? { padding: r } : {}, X = (e, r, t) => {
|
|
18
17
|
if (e === "body")
|
|
19
|
-
return
|
|
20
|
-
},
|
|
18
|
+
return t === "horizontal" ? { paddingBlock: r, paddingRight: r } : { paddingInline: r, paddingBottom: r };
|
|
19
|
+
}, de = ({
|
|
21
20
|
inset: e = "none",
|
|
22
|
-
insetSpace:
|
|
23
|
-
type:
|
|
24
|
-
background:
|
|
21
|
+
insetSpace: r = 16,
|
|
22
|
+
type: t = "vertical",
|
|
23
|
+
background: n = "white",
|
|
25
24
|
className: o,
|
|
26
|
-
role:
|
|
25
|
+
role: i,
|
|
27
26
|
children: l,
|
|
28
27
|
...g
|
|
29
28
|
}) => {
|
|
30
|
-
var
|
|
31
|
-
const { breakpoint:
|
|
29
|
+
var H, z;
|
|
30
|
+
const { breakpoint: s } = G(), b = s === L.ExtraSmall || s === L.Small, [m, f] = M(t), [c, v] = M(), [p, R] = M([]), V = F(
|
|
32
31
|
() => ({
|
|
33
|
-
setLabelId: (
|
|
34
|
-
addDescId: (
|
|
35
|
-
(
|
|
32
|
+
setLabelId: (u) => v(u),
|
|
33
|
+
addDescId: (u) => R(
|
|
34
|
+
(S) => S.includes(u) ? S : [...S, u]
|
|
36
35
|
),
|
|
37
|
-
labelId:
|
|
38
|
-
descIds:
|
|
36
|
+
labelId: c,
|
|
37
|
+
descIds: p
|
|
39
38
|
}),
|
|
40
|
-
[
|
|
41
|
-
),
|
|
42
|
-
(
|
|
43
|
-
),
|
|
44
|
-
(
|
|
39
|
+
[c, p]
|
|
40
|
+
), D = E.toArray(l), h = D.find(
|
|
41
|
+
(u) => $(u) === "CardContainer"
|
|
42
|
+
), q = D.find(
|
|
43
|
+
(u) => $(u) === "CardMedia"
|
|
45
44
|
);
|
|
46
|
-
return
|
|
47
|
-
if (b ||
|
|
48
|
-
|
|
45
|
+
return I(() => {
|
|
46
|
+
if (b || t === "vertical") {
|
|
47
|
+
f("vertical");
|
|
49
48
|
return;
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
}, [b]), /* @__PURE__ */
|
|
50
|
+
f("horizontal");
|
|
51
|
+
}, [b, t]), /* @__PURE__ */ a(j.Provider, { value: !0, children: /* @__PURE__ */ a(T.Provider, { value: V, children: /* @__PURE__ */ B(
|
|
53
52
|
"div",
|
|
54
53
|
{
|
|
55
54
|
className: d(
|
|
@@ -57,51 +56,51 @@ const W = (e, t) => e === "full" ? { padding: t } : {}, X = (e, t, a) => {
|
|
|
57
56
|
{
|
|
58
57
|
"gi-card-vertical": m === "vertical",
|
|
59
58
|
"gi-card-horizontal": m === "horizontal",
|
|
60
|
-
"gi-bg-white":
|
|
61
|
-
"gi-bg-color-surface-system-neutral-layer1":
|
|
59
|
+
"gi-bg-white": n === "white",
|
|
60
|
+
"gi-bg-color-surface-system-neutral-layer1": n === "grey"
|
|
62
61
|
},
|
|
63
62
|
o
|
|
64
63
|
),
|
|
65
|
-
style: W(e,
|
|
66
|
-
role:
|
|
67
|
-
"aria-labelledby":
|
|
68
|
-
"aria-describedby":
|
|
64
|
+
style: W(e, r),
|
|
65
|
+
role: i ?? "article",
|
|
66
|
+
"aria-labelledby": c,
|
|
67
|
+
"aria-describedby": p != null && p.length ? p.join(" ") : void 0,
|
|
69
68
|
...g,
|
|
70
69
|
children: [
|
|
71
|
-
|
|
72
|
-
h ?
|
|
73
|
-
className: d((
|
|
70
|
+
q,
|
|
71
|
+
h ? k(h, {
|
|
72
|
+
className: d((H = h.props) == null ? void 0 : H.className),
|
|
74
73
|
style: {
|
|
75
|
-
...(
|
|
76
|
-
...X(e,
|
|
74
|
+
...(z = h.props) == null ? void 0 : z.style,
|
|
75
|
+
...X(e, r, m)
|
|
77
76
|
}
|
|
78
77
|
}) : null
|
|
79
78
|
]
|
|
80
79
|
}
|
|
81
80
|
) }) });
|
|
82
|
-
}, Y = ({ media: e, href:
|
|
83
|
-
if (
|
|
81
|
+
}, Y = ({ media: e, href: r }) => {
|
|
82
|
+
if (C(j, "CardMedia", "Card"), !e)
|
|
84
83
|
return null;
|
|
85
84
|
switch (e.type) {
|
|
86
85
|
case "image": {
|
|
87
|
-
const { src:
|
|
88
|
-
return /* @__PURE__ */
|
|
86
|
+
const { src: t, alt: n, aspectRatio: o } = e.config ?? {}, i = A(e.config);
|
|
87
|
+
return /* @__PURE__ */ a("div", { className: "gi-card-image", children: /* @__PURE__ */ a("a", { href: r, "aria-label": i, title: i, children: /* @__PURE__ */ a(
|
|
89
88
|
"img",
|
|
90
89
|
{
|
|
91
|
-
src:
|
|
92
|
-
alt:
|
|
90
|
+
src: t,
|
|
91
|
+
alt: n ?? "",
|
|
93
92
|
style: o ? { aspectRatio: o } : void 0,
|
|
94
93
|
className: o ? "gi-w-full" : void 0
|
|
95
94
|
}
|
|
96
95
|
) }) });
|
|
97
96
|
}
|
|
98
97
|
case "icon": {
|
|
99
|
-
const
|
|
100
|
-
return /* @__PURE__ */
|
|
98
|
+
const t = A(e.config);
|
|
99
|
+
return /* @__PURE__ */ a("div", { className: "gi-card-icon", children: /* @__PURE__ */ a("a", { href: r, "aria-label": t, title: t, children: /* @__PURE__ */ a(J, { ...e.config, "aria-hidden": "true" }) }) });
|
|
101
100
|
}
|
|
102
101
|
case "iframe": {
|
|
103
|
-
const { title:
|
|
104
|
-
return /* @__PURE__ */
|
|
102
|
+
const { title: t } = e.config ?? "Embedded content";
|
|
103
|
+
return /* @__PURE__ */ a("div", { className: "gi-card-iframe", children: /* @__PURE__ */ a("iframe", { ...e.config, title: t }) });
|
|
105
104
|
}
|
|
106
105
|
default:
|
|
107
106
|
return null;
|
|
@@ -114,85 +113,89 @@ Object.defineProperty(Y, "componentType", {
|
|
|
114
113
|
});
|
|
115
114
|
const Z = ({
|
|
116
115
|
children: e,
|
|
117
|
-
className:
|
|
118
|
-
...
|
|
119
|
-
}) => (
|
|
116
|
+
className: r,
|
|
117
|
+
...t
|
|
118
|
+
}) => (C(j, "CardContainer", "Card"), /* @__PURE__ */ a(x.Provider, { value: !0, children: /* @__PURE__ */ a("div", { className: d("gi-card-content", r), ...t, children: e }) }));
|
|
120
119
|
Object.defineProperty(Z, "componentType", {
|
|
121
120
|
value: "CardContainer",
|
|
122
121
|
writable: !1,
|
|
123
122
|
enumerable: !1
|
|
124
123
|
});
|
|
125
|
-
const
|
|
124
|
+
const se = ({
|
|
126
125
|
children: e,
|
|
127
|
-
className:
|
|
128
|
-
truncate:
|
|
129
|
-
id:
|
|
126
|
+
className: r,
|
|
127
|
+
truncate: t,
|
|
128
|
+
id: n,
|
|
130
129
|
["aria-level"]: o = 2,
|
|
131
|
-
...
|
|
130
|
+
...i
|
|
132
131
|
}) => {
|
|
133
|
-
|
|
134
|
-
const l = typeof e == "string", g = (
|
|
132
|
+
C(w, "CardTitle", "CardHeader");
|
|
133
|
+
const l = typeof e == "string", g = (c) => {
|
|
135
134
|
var v;
|
|
136
|
-
return
|
|
137
|
-
className: d((v =
|
|
138
|
-
}) :
|
|
139
|
-
},
|
|
140
|
-
return
|
|
135
|
+
return t && O(c) ? k(c, {
|
|
136
|
+
className: d((v = c.props) == null ? void 0 : v.className, "gi-card-truncate-text")
|
|
137
|
+
}) : c;
|
|
138
|
+
}, s = t && !l ? E.map(e, g) : e, b = P(), m = n ?? `card-title-${b}`, f = N(T);
|
|
139
|
+
return I(() => {
|
|
140
|
+
f == null || f.setLabelId(m);
|
|
141
|
+
}, [f, m]), /* @__PURE__ */ a(
|
|
141
142
|
"div",
|
|
142
143
|
{
|
|
143
144
|
className: d(
|
|
144
145
|
"gi-card-title",
|
|
145
146
|
{
|
|
146
|
-
"gi-card-truncate-text": !!
|
|
147
|
+
"gi-card-truncate-text": !!t && l
|
|
147
148
|
},
|
|
148
|
-
|
|
149
|
+
r
|
|
149
150
|
),
|
|
150
151
|
id: m,
|
|
151
152
|
role: "heading",
|
|
152
153
|
"aria-level": o,
|
|
153
|
-
title: l &&
|
|
154
|
-
...
|
|
155
|
-
children:
|
|
154
|
+
title: l && t ? e.toString() : void 0,
|
|
155
|
+
...i,
|
|
156
|
+
children: s
|
|
156
157
|
}
|
|
157
158
|
);
|
|
158
|
-
},
|
|
159
|
+
}, ce = ({
|
|
159
160
|
children: e,
|
|
160
|
-
className:
|
|
161
|
-
truncate:
|
|
162
|
-
id:
|
|
161
|
+
className: r,
|
|
162
|
+
truncate: t,
|
|
163
|
+
id: n,
|
|
163
164
|
...o
|
|
164
165
|
}) => {
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
return
|
|
166
|
+
C(w, "CardSubtitle", "CardHeader");
|
|
167
|
+
const i = typeof e == "string" && t ? e : void 0, l = P(), g = n ?? `card-subtitle-${l}`, s = N(T);
|
|
168
|
+
return I(() => {
|
|
169
|
+
s == null || s.addDescId(g);
|
|
170
|
+
}, [s, g]), /* @__PURE__ */ a(
|
|
168
171
|
"div",
|
|
169
172
|
{
|
|
170
173
|
className: d(
|
|
171
174
|
"gi-card-subheading",
|
|
172
175
|
{
|
|
173
|
-
"gi-card-truncate-text":
|
|
176
|
+
"gi-card-truncate-text": t
|
|
174
177
|
},
|
|
175
|
-
|
|
178
|
+
r
|
|
176
179
|
),
|
|
177
180
|
id: g,
|
|
178
|
-
title:
|
|
181
|
+
title: i,
|
|
179
182
|
...o,
|
|
180
183
|
children: e
|
|
181
184
|
}
|
|
182
185
|
);
|
|
183
186
|
}, _ = ({
|
|
184
187
|
text: e,
|
|
185
|
-
type:
|
|
186
|
-
className:
|
|
187
|
-
...
|
|
188
|
-
}) => (
|
|
188
|
+
type: r,
|
|
189
|
+
className: t,
|
|
190
|
+
...n
|
|
191
|
+
}) => (C(w, "CardTag", "CardHeader"), /* @__PURE__ */ a(
|
|
189
192
|
"div",
|
|
190
193
|
{
|
|
191
194
|
role: "note",
|
|
192
195
|
"aria-label": typeof e == "string" ? e : void 0,
|
|
193
|
-
className: d("gi-card-tag",
|
|
194
|
-
...
|
|
195
|
-
children: /* @__PURE__ */
|
|
196
|
+
className: d("gi-card-tag", t),
|
|
197
|
+
...n,
|
|
198
|
+
children: /* @__PURE__ */ a(Q, { text: e, type: r })
|
|
196
199
|
}
|
|
197
200
|
));
|
|
198
201
|
Object.defineProperty(_, "componentType", {
|
|
@@ -200,51 +203,45 @@ Object.defineProperty(_, "componentType", {
|
|
|
200
203
|
writable: !1,
|
|
201
204
|
enumerable: !1
|
|
202
205
|
});
|
|
203
|
-
const
|
|
206
|
+
const ue = ({
|
|
204
207
|
children: e,
|
|
205
|
-
className:
|
|
206
|
-
...
|
|
208
|
+
className: r,
|
|
209
|
+
...t
|
|
207
210
|
}) => {
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
return
|
|
211
|
-
|
|
212
|
-
}), /* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
211
|
+
C(x, "CardHeader", "CardContainer");
|
|
212
|
+
const n = [], o = [];
|
|
213
|
+
return E.forEach(e, (i) => {
|
|
214
|
+
O(i) && (U(i, ["CardTag"]) ? o.push(i) : n.push(i));
|
|
215
|
+
}), /* @__PURE__ */ a(w.Provider, { value: !0, children: /* @__PURE__ */ B("div", { className: d("gi-card-header", r), role: "group", ...t, children: [
|
|
216
|
+
/* @__PURE__ */ a("div", { className: "gi-card-heading", children: n }),
|
|
214
217
|
o
|
|
215
218
|
] }) });
|
|
216
|
-
},
|
|
219
|
+
}, Ce = ({
|
|
217
220
|
children: e,
|
|
218
|
-
className:
|
|
219
|
-
id:
|
|
220
|
-
...
|
|
221
|
+
className: r,
|
|
222
|
+
id: t,
|
|
223
|
+
...n
|
|
221
224
|
}) => {
|
|
222
|
-
if (
|
|
225
|
+
if (C(x, "CardDescription", "CardContainer"), !e)
|
|
223
226
|
return null;
|
|
224
|
-
const o =
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
+
const o = P(), i = t ?? `card-desc-${o}`, l = N(T);
|
|
228
|
+
return I(() => {
|
|
229
|
+
l == null || l.addDescId(i);
|
|
230
|
+
}, [l, i]), /* @__PURE__ */ a("div", { className: d("gi-card-paragraph", r), id: i, ...n, children: /* @__PURE__ */ a(K, { size: "sm", children: e }) });
|
|
231
|
+
}, ge = ({
|
|
227
232
|
children: e,
|
|
228
|
-
className:
|
|
229
|
-
...
|
|
230
|
-
}) => (
|
|
231
|
-
"div",
|
|
232
|
-
{
|
|
233
|
-
className: d("gi-card-action", t),
|
|
234
|
-
role: "group",
|
|
235
|
-
...a,
|
|
236
|
-
children: e
|
|
237
|
-
}
|
|
238
|
-
));
|
|
233
|
+
className: r,
|
|
234
|
+
...t
|
|
235
|
+
}) => (C(x, "CardAction", "CardContainer"), /* @__PURE__ */ a("div", { className: d("gi-card-action", r), role: "group", ...t, children: e }));
|
|
239
236
|
export {
|
|
240
|
-
|
|
237
|
+
ge as CardAction,
|
|
241
238
|
Z as CardContainer,
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
Ce as CardDescription,
|
|
240
|
+
ue as CardHeader,
|
|
244
241
|
Y as CardMedia,
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
de as CardNext,
|
|
243
|
+
ce as CardSubtitle,
|
|
247
244
|
_ as CardTag,
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
se as CardTitle,
|
|
246
|
+
C as useRequiredContext
|
|
250
247
|
};
|
package/dist/card/card.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
3
|
import { CardLegacy as m } from "./card-legacy.js";
|
|
5
4
|
import { CardNext as g } from "./card-next.js";
|
|
@@ -12,16 +11,16 @@ const n = [
|
|
|
12
11
|
"content",
|
|
13
12
|
"action",
|
|
14
13
|
"titleAsChild"
|
|
15
|
-
],
|
|
14
|
+
], h = (e) => {
|
|
16
15
|
if (n.some((t) => t in e))
|
|
17
16
|
return console.warn(
|
|
18
17
|
"[Card] Using legacy props. Please migrate to the new composable API."
|
|
19
18
|
), /* @__PURE__ */ r(m, { ...e });
|
|
20
|
-
const { inset:
|
|
19
|
+
const { inset: s, background: c, type: o, children: i, ...a } = e, d = new Set(n), l = Object.fromEntries(
|
|
21
20
|
Object.entries(a).filter(([t]) => !d.has(t))
|
|
22
21
|
);
|
|
23
|
-
return /* @__PURE__ */ r(g, { inset:
|
|
22
|
+
return /* @__PURE__ */ r(g, { inset: s, type: o, background: c, ...l, children: i });
|
|
24
23
|
};
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
h as Card
|
|
27
26
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { InputCheckboxGroup as o } from "../input-checkbox-group/input-checkbox-group.js";
|
|
4
|
-
const
|
|
5
|
-
|
|
3
|
+
const e = o;
|
|
4
|
+
e.displayName = "CheckboxGroup";
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
e as CheckboxGroup
|
|
8
7
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e.displayName = "Checkbox";
|
|
2
|
+
import { InputCheckbox as e } from "../input-checkbox/input-checkbox.js";
|
|
3
|
+
const o = e;
|
|
4
|
+
o.displayName = "Checkbox";
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
o as Checkbox
|
|
8
7
|
};
|
package/dist/chip/chip.js
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { cn as l } from "../cn.js";
|
|
2
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useId as l } from "react";
|
|
4
|
+
import { cn as p } from "../cn.js";
|
|
6
5
|
import { translate as c } from "../i18n/utility.js";
|
|
7
6
|
import { Icon as s } from "../icon/icon.js";
|
|
8
|
-
const m = ({ label: i, className: t, onClose:
|
|
9
|
-
const
|
|
10
|
-
["Enter", " "].includes(e.key) && (e.preventDefault(),
|
|
7
|
+
const m = ({ label: i, className: t, onClose: n = () => null }) => {
|
|
8
|
+
const o = `chip-description-${l()}`, a = (e) => {
|
|
9
|
+
["Enter", " "].includes(e.key) && (e.preventDefault(), n(e));
|
|
11
10
|
};
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ d(
|
|
13
12
|
"div",
|
|
14
13
|
{
|
|
15
|
-
className:
|
|
14
|
+
className: p(t, "gi-chip"),
|
|
16
15
|
"aria-label": c("chip.label", { label: i, defaultValue: `chip: ${i}` }),
|
|
17
|
-
"aria-describedby":
|
|
16
|
+
"aria-describedby": o,
|
|
18
17
|
tabIndex: 0,
|
|
19
18
|
onKeyDown: a,
|
|
20
19
|
children: [
|
|
21
|
-
/* @__PURE__ */ r("span", { id:
|
|
20
|
+
/* @__PURE__ */ r("span", { id: o, children: i }),
|
|
22
21
|
/* @__PURE__ */ r(
|
|
23
22
|
"div",
|
|
24
23
|
{
|
|
25
24
|
role: "button",
|
|
26
25
|
"aria-label": c("chip.removeChip", { defaultValue: "remove chip" }),
|
|
27
|
-
onClick:
|
|
26
|
+
onClick: n,
|
|
28
27
|
children: /* @__PURE__ */ r(s, { icon: "close", size: "sm" })
|
|
29
28
|
}
|
|
30
29
|
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsxs as n, jsx as s } from "react/jsx-runtime";
|
|
4
3
|
import { useState as u, useId as j, useEffect as q } from "react";
|
|
5
4
|
import { Button as B } from "../button/button.js";
|
|
@@ -12,7 +11,7 @@ import { InputText as O } from "../input-text/input-text.js";
|
|
|
12
11
|
import { Paragraph as y } from "../paragraph/paragraph.js";
|
|
13
12
|
import { Tag as A, TagTypeEnum as F } from "../tag/tag.js";
|
|
14
13
|
import { slugify as P } from "../utilities.js";
|
|
15
|
-
const
|
|
14
|
+
const oo = ({
|
|
16
15
|
children: c,
|
|
17
16
|
noSearch: h,
|
|
18
17
|
options: p,
|
|
@@ -151,5 +150,5 @@ const eo = ({
|
|
|
151
150
|
);
|
|
152
151
|
};
|
|
153
152
|
export {
|
|
154
|
-
|
|
153
|
+
oo as DropdownItem
|
|
155
154
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as e, Fragment as s, jsxs as o } from "react/jsx-runtime";
|
|
4
3
|
import { Container as c } from "../container/container.js";
|
|
5
|
-
const
|
|
4
|
+
const m = ({
|
|
6
5
|
showConsent: a = !0,
|
|
7
6
|
children: d,
|
|
8
7
|
accept: i,
|
|
9
|
-
reject:
|
|
10
|
-
cookieLink:
|
|
8
|
+
reject: n,
|
|
9
|
+
cookieLink: r,
|
|
11
10
|
dataTestid: t
|
|
12
11
|
}) => /* @__PURE__ */ e(s, { children: a && /* @__PURE__ */ e(
|
|
13
12
|
"div",
|
|
@@ -21,12 +20,12 @@ const p = ({
|
|
|
21
20
|
/* @__PURE__ */ e("div", { id: "cookie-banner-description", children: d }),
|
|
22
21
|
/* @__PURE__ */ o("div", { className: "gi-cookie-banner-buttons", children: [
|
|
23
22
|
i && i,
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
n && n,
|
|
24
|
+
r && r
|
|
26
25
|
] })
|
|
27
26
|
] }) })
|
|
28
27
|
}
|
|
29
28
|
) });
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
m as CookieBanner
|
|
32
31
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "@ogcio/design-system-react/browser-check";
|
|
3
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
-
import { l as O } from "../lodash-
|
|
3
|
+
import { l as O } from "../lodash-LsP9-6SV.js";
|
|
5
4
|
import { useState as g, useMemo as S, useEffect as k } from "react";
|
|
6
5
|
import { InputCheckboxTableCell as V } from "../input-checkbox/input-checkbox.js";
|
|
7
6
|
import { InputTextTableCell as j } from "../input-text/input-text.js";
|
|
8
7
|
import { SelectTableCell as y } from "../select/select-native.js";
|
|
9
|
-
const
|
|
8
|
+
const A = ({
|
|
10
9
|
value: l,
|
|
11
10
|
rowIndex: h,
|
|
12
11
|
columnId: C,
|
|
@@ -70,5 +69,5 @@ const B = ({
|
|
|
70
69
|
}
|
|
71
70
|
};
|
|
72
71
|
export {
|
|
73
|
-
|
|
72
|
+
A as EditableTableCell
|
|
74
73
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { DataTableFooterProps, DataTableFooterTypeProps, } from './data-table-footer.js';
|
|
2
|
+
export { DataTableFooter, DataTableFooterStart, DataTableFooterCenter, DataTableFooterEnd, } from './data-table-footer.js';
|
|
3
|
+
export { DataTableHeader, DataTableHeaderSearch, DataTableHeaderActions, DataTableHeaderFilter, DataTableHeaderFilterList, DataTableHeaderFilterContent, DataTableHeaderFilterContentTitle, DataTableHeaderFilterActions, } from './data-table-header.js';
|
|
4
|
+
export { DataTableSelectedRowsBanner } from './data-table-selected-rows.js';
|
|
5
|
+
export type { DataTableSelectedRowsBannerProps } from './data-table-selected-rows.js';
|
|
6
|
+
export { EditableTableCell } from './editable-table-cell.js';
|
|
7
|
+
export type { EditorTableCellConfig, EditorTableCellProps } from './types.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DataTableFooter as t, DataTableFooterCenter as r, DataTableFooterEnd as l, DataTableFooterStart as o } from "./data-table-footer.js";
|
|
2
|
+
import { DataTableHeader as T, DataTableHeaderActions as D, DataTableHeaderFilter as d, DataTableHeaderFilterActions as i, DataTableHeaderFilterContent as n, DataTableHeaderFilterContentTitle as F, DataTableHeaderFilterList as H, DataTableHeaderSearch as c } from "./data-table-header.js";
|
|
3
|
+
import { DataTableSelectedRowsBanner as m } from "./data-table-selected-rows.js";
|
|
4
|
+
import { EditableTableCell as s } from "./editable-table-cell.js";
|
|
5
|
+
export {
|
|
6
|
+
t as DataTableFooter,
|
|
7
|
+
r as DataTableFooterCenter,
|
|
8
|
+
l as DataTableFooterEnd,
|
|
9
|
+
o as DataTableFooterStart,
|
|
10
|
+
T as DataTableHeader,
|
|
11
|
+
D as DataTableHeaderActions,
|
|
12
|
+
d as DataTableHeaderFilter,
|
|
13
|
+
i as DataTableHeaderFilterActions,
|
|
14
|
+
n as DataTableHeaderFilterContent,
|
|
15
|
+
F as DataTableHeaderFilterContentTitle,
|
|
16
|
+
H as DataTableHeaderFilterList,
|
|
17
|
+
c as DataTableHeaderSearch,
|
|
18
|
+
m as DataTableSelectedRowsBanner,
|
|
19
|
+
s as EditableTableCell
|
|
20
|
+
};
|