@ogcio/design-system-react 1.29.0 → 1.30.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 +329 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +22 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +22 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +22 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +22 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +22 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- package/dist/atoms/icons/types.d.ts +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +2 -0
- package/dist/atoms/index.js +14 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- package/dist/combo-box/dropdown-item.js +39 -40
- 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/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/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-breakpoint.js +15 -12
- 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/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/modal/modal.js +8 -7
- package/dist/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- 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 +12 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as n, jsx as
|
|
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
4
|
import { Button as B } from "../button/button.js";
|
|
5
5
|
import { cn as x } from "../cn.js";
|
|
@@ -11,33 +11,33 @@ import { InputText as O } from "../input-text/input-text.js";
|
|
|
11
11
|
import { Paragraph as y } from "../paragraph/paragraph.js";
|
|
12
12
|
import { Tag as A, TagTypeEnum as F } from "../tag/tag.js";
|
|
13
13
|
import { slugify as P } from "../utilities.js";
|
|
14
|
-
const
|
|
14
|
+
const ee = ({
|
|
15
15
|
children: c,
|
|
16
16
|
noSearch: h,
|
|
17
17
|
options: p,
|
|
18
18
|
value: v,
|
|
19
|
-
defaultValue:
|
|
19
|
+
defaultValue: C = [],
|
|
20
20
|
onChange: g,
|
|
21
21
|
onSearch: l
|
|
22
22
|
}) => {
|
|
23
|
-
const [m,
|
|
23
|
+
const [m, k] = u(!1), [d, $] = u(""), [I, _] = u(!1), [T, V] = u(C), r = c ? `${P(`${c}-${j()}`)}` : "", w = v !== void 0, t = w ? v : T, z = () => [
|
|
24
24
|
...globalThis.window.document.querySelectorAll(
|
|
25
25
|
`div.gi-combobox-checkbox.gi-combobox-key-${r}`
|
|
26
26
|
)
|
|
27
27
|
];
|
|
28
28
|
q(() => {
|
|
29
|
-
var
|
|
30
|
-
let
|
|
31
|
-
const
|
|
32
|
-
for (const b of
|
|
33
|
-
const f = (
|
|
34
|
-
(i = f == null ? void 0 : f.toLowerCase()) != null && i.includes(d.toLowerCase()) ? b.style.display = "flex" : (b.style.display = "none",
|
|
29
|
+
var s, i;
|
|
30
|
+
let e = 0;
|
|
31
|
+
const o = z();
|
|
32
|
+
for (const b of o) {
|
|
33
|
+
const f = (s = b.querySelector("label")) == null ? void 0 : s.textContent;
|
|
34
|
+
(i = f == null ? void 0 : f.toLowerCase()) != null && i.includes(d.toLowerCase()) ? b.style.display = "flex" : (b.style.display = "none", e++);
|
|
35
35
|
}
|
|
36
|
-
_(
|
|
36
|
+
_(e === p.length);
|
|
37
37
|
}, [d, p.length]);
|
|
38
|
-
const R = (
|
|
39
|
-
const
|
|
40
|
-
w || V(
|
|
38
|
+
const R = (e, o) => {
|
|
39
|
+
const s = o ? [...t || [], e] : (t || []).filter((i) => i !== e);
|
|
40
|
+
w || V(s), g == null || g(s);
|
|
41
41
|
};
|
|
42
42
|
return /* @__PURE__ */ n(
|
|
43
43
|
"div",
|
|
@@ -52,18 +52,18 @@ const oo = ({
|
|
|
52
52
|
variant: "flat",
|
|
53
53
|
appearance: "dark",
|
|
54
54
|
size: "large",
|
|
55
|
-
onClick: (
|
|
56
|
-
|
|
55
|
+
onClick: (e) => {
|
|
56
|
+
e.preventDefault(), k(!m);
|
|
57
57
|
},
|
|
58
58
|
className: x("gi-combobox-toggle", {
|
|
59
59
|
"gi-combobox-toggle-open": m
|
|
60
60
|
}),
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ n("div", { className: "gi-combobox-toggle-content", children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
(t == null ? void 0 : t.length) > 0 && /* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ a(y, { size: "md", children: c }),
|
|
64
|
+
(t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ a(A, { type: F.Counter, text: t.length.toString() })
|
|
65
65
|
] }),
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ a(
|
|
67
67
|
D,
|
|
68
68
|
{
|
|
69
69
|
className: x({ "gi-rotate-180": m }),
|
|
@@ -80,19 +80,19 @@ const oo = ({
|
|
|
80
80
|
id: `${r}-search`,
|
|
81
81
|
children: [
|
|
82
82
|
!h && /* @__PURE__ */ n("div", { className: "gi-combobox-search", children: [
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ a(
|
|
84
84
|
O,
|
|
85
85
|
{
|
|
86
86
|
placeholder: N("dropdownItem.search", { defaultValue: "Search" }),
|
|
87
87
|
className: "gi-combobox-search-input",
|
|
88
88
|
value: d,
|
|
89
|
-
onChange: (
|
|
90
|
-
const
|
|
91
|
-
$(
|
|
89
|
+
onChange: (e) => {
|
|
90
|
+
const o = e.target.value;
|
|
91
|
+
$(o), l == null || l(o);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
d && /* @__PURE__ */
|
|
95
|
+
d && /* @__PURE__ */ a(
|
|
96
96
|
E,
|
|
97
97
|
{
|
|
98
98
|
variant: "flat",
|
|
@@ -102,9 +102,8 @@ const oo = ({
|
|
|
102
102
|
onClick: () => {
|
|
103
103
|
l == null || l(""), $("");
|
|
104
104
|
},
|
|
105
|
-
icon: {
|
|
106
|
-
|
|
107
|
-
}
|
|
105
|
+
icon: { icon: "close" },
|
|
106
|
+
"aria-label": "Clear input"
|
|
108
107
|
}
|
|
109
108
|
)
|
|
110
109
|
] }),
|
|
@@ -115,29 +114,29 @@ const oo = ({
|
|
|
115
114
|
"gi-h-64": !h
|
|
116
115
|
}),
|
|
117
116
|
children: [
|
|
118
|
-
I && /* @__PURE__ */
|
|
117
|
+
I && /* @__PURE__ */ a(y, { className: "gi-combobox-checkbox-paragraph", children: N("dropdownItem.noResultFound", {
|
|
119
118
|
defaultValue: "No results found."
|
|
120
119
|
}) }),
|
|
121
|
-
p.map((
|
|
122
|
-
const
|
|
123
|
-
return /* @__PURE__ */
|
|
120
|
+
p.map((e, o) => {
|
|
121
|
+
const s = t == null ? void 0 : t.includes(e.value);
|
|
122
|
+
return /* @__PURE__ */ a(
|
|
124
123
|
"div",
|
|
125
124
|
{
|
|
126
125
|
className: `gi-combobox-checkbox gi-combobox-key-${r}`,
|
|
127
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ a(
|
|
128
127
|
L,
|
|
129
128
|
{
|
|
130
|
-
onChange: (i) => R(
|
|
131
|
-
checked:
|
|
132
|
-
id: `${
|
|
133
|
-
label:
|
|
134
|
-
name: `${
|
|
135
|
-
value:
|
|
129
|
+
onChange: (i) => R(e.value, i.target.checked),
|
|
130
|
+
checked: s,
|
|
131
|
+
id: `${o}_${r}_${e.value}`,
|
|
132
|
+
label: e.label,
|
|
133
|
+
name: `${o}_${e.label}_${r}`,
|
|
134
|
+
value: e.value,
|
|
136
135
|
size: "sm"
|
|
137
136
|
}
|
|
138
137
|
)
|
|
139
138
|
},
|
|
140
|
-
`${
|
|
139
|
+
`${o}_${r}_${e.value}`
|
|
141
140
|
);
|
|
142
141
|
})
|
|
143
142
|
]
|
|
@@ -151,5 +150,5 @@ const oo = ({
|
|
|
151
150
|
);
|
|
152
151
|
};
|
|
153
152
|
export {
|
|
154
|
-
|
|
153
|
+
ee as DropdownItem
|
|
155
154
|
};
|
|
@@ -1,66 +1,72 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
{
|
|
7
|
-
className: o(
|
|
8
|
-
t,
|
|
9
|
-
s,
|
|
10
|
-
e.props.className
|
|
11
|
-
),
|
|
12
|
-
style: e.props.style,
|
|
13
|
-
children: e.props.children
|
|
14
|
-
}
|
|
15
|
-
) : null, T = ({
|
|
1
|
+
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { c as x } from "../index-CB-zPpNk.js";
|
|
4
|
+
import { cn as i } from "../cn.js";
|
|
5
|
+
const b = ({
|
|
16
6
|
children: e,
|
|
17
7
|
...t
|
|
18
|
-
}) => /* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
const
|
|
8
|
+
}) => /* @__PURE__ */ o("div", { ...t, children: e });
|
|
9
|
+
b.displayName = "DataTableFooterStart";
|
|
10
|
+
const S = ({
|
|
21
11
|
children: e,
|
|
22
12
|
...t
|
|
23
|
-
}) => /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
const
|
|
13
|
+
}) => /* @__PURE__ */ o("div", { ...t, children: e });
|
|
14
|
+
S.displayName = "DataTableFooterCenter";
|
|
15
|
+
const y = ({
|
|
26
16
|
children: e,
|
|
27
17
|
...t
|
|
28
|
-
}) => /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
const
|
|
18
|
+
}) => /* @__PURE__ */ o("div", { ...t, children: e });
|
|
19
|
+
y.displayName = "DataTableFooterEnd";
|
|
20
|
+
const C = ({
|
|
31
21
|
children: e,
|
|
32
22
|
className: t,
|
|
33
|
-
standalone:
|
|
34
|
-
...
|
|
23
|
+
standalone: F = !1,
|
|
24
|
+
...d
|
|
35
25
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
}), { start:
|
|
41
|
-
}, [e]), { start:
|
|
42
|
-
|
|
43
|
-
}),
|
|
26
|
+
const h = c.useMemo(() => {
|
|
27
|
+
let n = null, r = null, u = null;
|
|
28
|
+
return c.Children.forEach(e, (a) => {
|
|
29
|
+
l(a, b) ? n = a : l(a, S) ? r = a : l(a, y) && (u = a);
|
|
30
|
+
}), { start: n, center: r, end: u };
|
|
31
|
+
}, [e]), { start: f, center: g, end: m } = h, D = !!!f && !!!g && !!m, { footer: T, baseSection: w, centerSection: E, endSection: N } = j({
|
|
32
|
+
onlyEnd: D
|
|
33
|
+
}), s = (n, r) => n ? /* @__PURE__ */ o(
|
|
44
34
|
"div",
|
|
45
35
|
{
|
|
46
|
-
className:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
t
|
|
50
|
-
),
|
|
51
|
-
children: [
|
|
52
|
-
l(d, b),
|
|
53
|
-
l(p, C),
|
|
54
|
-
l(m, N)
|
|
55
|
-
]
|
|
36
|
+
className: i(r, n.props.className),
|
|
37
|
+
style: n.props.style,
|
|
38
|
+
children: n.props.children
|
|
56
39
|
}
|
|
57
|
-
)
|
|
58
|
-
|
|
40
|
+
) : null, p = /* @__PURE__ */ v("div", { className: i(T(), t), children: [
|
|
41
|
+
s(f, w()),
|
|
42
|
+
s(g, E()),
|
|
43
|
+
s(m, N())
|
|
44
|
+
] });
|
|
45
|
+
return F ? /* @__PURE__ */ o("div", { ...d, className: i("gi-w-full gi-p-2", t), children: p }) : /* @__PURE__ */ o("tfoot", { ...d, children: /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: 999, className: "gi-p-2", children: p }) }) });
|
|
59
46
|
};
|
|
60
|
-
|
|
47
|
+
C.displayName = "DataTableFooter";
|
|
48
|
+
const j = x({
|
|
49
|
+
slots: {
|
|
50
|
+
footer: "gi-flex gi-flex-row gi-w-full gi-items-center",
|
|
51
|
+
baseSection: "gi-grow gi-basis-0 gi-min-w-0",
|
|
52
|
+
centerSection: "gi-grow gi-basis-0 gi-min-w-0 gi-text-center",
|
|
53
|
+
endSection: "gi-min-w-0"
|
|
54
|
+
},
|
|
55
|
+
variants: {
|
|
56
|
+
onlyEnd: {
|
|
57
|
+
true: {
|
|
58
|
+
footer: "gi-justify-end"
|
|
59
|
+
},
|
|
60
|
+
false: {
|
|
61
|
+
footer: "gi-gap-2",
|
|
62
|
+
endSection: "gi-basis-1/2 gi-text-right"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}), l = (e, t) => c.isValidElement(e) && e.type === t;
|
|
61
67
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
C as DataTableFooter,
|
|
69
|
+
S as DataTableFooterCenter,
|
|
70
|
+
y as DataTableFooterEnd,
|
|
71
|
+
b as DataTableFooterStart
|
|
66
72
|
};
|
|
@@ -7,13 +7,6 @@ interface DataTableHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
showHeader?: boolean;
|
|
8
8
|
showFilter?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare const DataTableHeader: React.FC<DataTableHeaderProps>;
|
|
11
|
-
export declare const DataTableHeaderSearch: React.FC<DataTableHeaderTypeProps>;
|
|
12
|
-
export declare const DataTableHeaderActions: React.FC<DataTableHeaderTypeProps>;
|
|
13
|
-
export declare const DataTableHeaderFilter: React.FC<DataTableHeaderTypeProps>;
|
|
14
|
-
export declare const DataTableHeaderFilterContent: React.FC<DataTableHeaderTypeProps>;
|
|
15
|
-
export declare const DataTableHeaderFilterContentTitle: React.FC<DataTableHeaderTypeProps>;
|
|
16
|
-
export declare const DataTableHeaderFilterActions: React.FC<DataTableHeaderTypeProps>;
|
|
17
10
|
type DataTableHeaderFilterListProps = {
|
|
18
11
|
filters: {
|
|
19
12
|
id: string;
|
|
@@ -23,5 +16,12 @@ type DataTableHeaderFilterListProps = {
|
|
|
23
16
|
onClear?: () => void;
|
|
24
17
|
className?: string;
|
|
25
18
|
};
|
|
19
|
+
export declare const DataTableHeader: React.FC<DataTableHeaderProps>;
|
|
20
|
+
export declare const DataTableHeaderSearch: React.FC<DataTableHeaderTypeProps>;
|
|
21
|
+
export declare const DataTableHeaderActions: React.FC<DataTableHeaderTypeProps>;
|
|
22
|
+
export declare const DataTableHeaderFilter: React.FC<DataTableHeaderTypeProps>;
|
|
23
|
+
export declare const DataTableHeaderFilterContent: React.FC<DataTableHeaderTypeProps>;
|
|
24
|
+
export declare const DataTableHeaderFilterContentTitle: React.FC<DataTableHeaderTypeProps>;
|
|
25
|
+
export declare const DataTableHeaderFilterActions: React.FC<DataTableHeaderTypeProps>;
|
|
26
26
|
export declare const DataTableHeaderFilterList: React.FC<DataTableHeaderFilterListProps>;
|
|
27
27
|
export {};
|
|
@@ -1,137 +1,124 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as A, Children as L, isValidElement as O } from "react";
|
|
3
|
+
import { c as P } from "../index-CB-zPpNk.js";
|
|
4
|
+
import { Button as w } from "../button/button.js";
|
|
5
|
+
import { Chip as S } from "../chip/chip.js";
|
|
6
|
+
import { cn as n } from "../cn.js";
|
|
7
|
+
import { translate as x } from "../i18n/utility.js";
|
|
8
|
+
const N = ({
|
|
8
9
|
children: e,
|
|
9
|
-
className:
|
|
10
|
-
showHeader:
|
|
11
|
-
showFilter:
|
|
12
|
-
...
|
|
10
|
+
className: t,
|
|
11
|
+
showHeader: a = !0,
|
|
12
|
+
showFilter: c = !0,
|
|
13
|
+
...p
|
|
13
14
|
}) => {
|
|
14
|
-
const { search:
|
|
15
|
-
let
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
}), { search:
|
|
15
|
+
const { search: s, filter: j, filterList: T, actions: C } = A(() => {
|
|
16
|
+
let b = null, y = null, H = null, D = null;
|
|
17
|
+
return L.forEach(e, (r) => {
|
|
18
|
+
o(r, f) ? b = r : o(r, g) ? y = r : o(r, u) ? H = r : o(r, m) && (D = r);
|
|
19
|
+
}), { search: b, filter: y, filterList: H, actions: D };
|
|
19
20
|
}, [e]);
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
return /* @__PURE__ */ d("div", { ...p, className: n(l.root(), t), children: [
|
|
22
|
+
a && /* @__PURE__ */ d("div", { className: l.headerRow(), children: [
|
|
23
|
+
s,
|
|
23
24
|
j,
|
|
24
|
-
|
|
25
|
+
C
|
|
25
26
|
] }),
|
|
26
|
-
|
|
27
|
+
T && c && /* @__PURE__ */ i("div", { className: l.filterListWrapper(), children: T })
|
|
27
28
|
] });
|
|
28
|
-
},
|
|
29
|
+
}, f = ({
|
|
29
30
|
children: e,
|
|
30
|
-
className:
|
|
31
|
-
...
|
|
32
|
-
}) => /* @__PURE__ */
|
|
31
|
+
className: t,
|
|
32
|
+
...a
|
|
33
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.search(), t), ...a, children: e }), m = ({
|
|
33
34
|
children: e,
|
|
34
|
-
className:
|
|
35
|
-
...
|
|
36
|
-
}) => /* @__PURE__ */
|
|
35
|
+
className: t,
|
|
36
|
+
...a
|
|
37
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.actions(), t), ...a, children: e }), g = ({
|
|
37
38
|
children: e,
|
|
38
|
-
className:
|
|
39
|
-
...
|
|
40
|
-
}) => /* @__PURE__ */
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
n.id
|
|
78
|
-
)),
|
|
79
|
-
/* @__PURE__ */ l(
|
|
80
|
-
x,
|
|
81
|
-
{
|
|
82
|
-
appearance: "dark",
|
|
83
|
-
size: "medium",
|
|
84
|
-
variant: "flat",
|
|
85
|
-
onClick: () => {
|
|
86
|
-
t == null || t();
|
|
87
|
-
},
|
|
88
|
-
children: g("dataTableHeader.clearAllFilters", {
|
|
89
|
-
defaultValue: "Clear all filters"
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
);
|
|
96
|
-
h.displayName = "DataTableHeader";
|
|
97
|
-
p.displayName = "DataTableHeaderSearch";
|
|
98
|
-
b.displayName = "DataTableHeaderActions";
|
|
99
|
-
m.displayName = "DataTableHeaderFilter";
|
|
100
|
-
T.displayName = "DataTableHeaderFilterList";
|
|
101
|
-
N.displayName = "DataTableHeaderFilterContent";
|
|
102
|
-
F.displayName = "DataTableHeaderFilterContentTitle";
|
|
103
|
-
v.displayName = "DataTableHeaderFilterActions";
|
|
104
|
-
Object.defineProperty(h, "componentType", {
|
|
39
|
+
className: t,
|
|
40
|
+
...a
|
|
41
|
+
}) => /* @__PURE__ */ i("div", { className: n(l.filter(), t), ...a, children: e }), F = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterContent(), t), ...a, children: e }), v = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterContentTitle(), t), ...a, children: e }), h = ({ children: e, className: t, ...a }) => /* @__PURE__ */ i("div", { className: n(l.filterActions(), t), ...a, children: e }), u = ({ filters: e, onRemove: t, onClear: a, className: c, ...p }) => !e || e.length === 0 ? null : /* @__PURE__ */ d("div", { className: n(l.filterList(), c), ...p, children: [
|
|
42
|
+
/* @__PURE__ */ i("span", { className: "gi-text-sm", children: x("dataTableHeader.filtersApplied", {
|
|
43
|
+
length: e.length,
|
|
44
|
+
defaultValue: `Filters applied ${e.length}:`
|
|
45
|
+
}) }),
|
|
46
|
+
e.map((s) => /* @__PURE__ */ i(
|
|
47
|
+
S,
|
|
48
|
+
{
|
|
49
|
+
onClose: () => t == null ? void 0 : t(s.id),
|
|
50
|
+
label: s.label
|
|
51
|
+
},
|
|
52
|
+
s.id
|
|
53
|
+
)),
|
|
54
|
+
/* @__PURE__ */ i(
|
|
55
|
+
w,
|
|
56
|
+
{
|
|
57
|
+
appearance: "dark",
|
|
58
|
+
size: "medium",
|
|
59
|
+
variant: "flat",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
a == null || a();
|
|
62
|
+
},
|
|
63
|
+
children: x("dataTableHeader.clearAllFilters", {
|
|
64
|
+
defaultValue: "Clear all filters"
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
N.displayName = "DataTableHeader";
|
|
70
|
+
f.displayName = "DataTableHeaderSearch";
|
|
71
|
+
m.displayName = "DataTableHeaderActions";
|
|
72
|
+
g.displayName = "DataTableHeaderFilter";
|
|
73
|
+
u.displayName = "DataTableHeaderFilterList";
|
|
74
|
+
F.displayName = "DataTableHeaderFilterContent";
|
|
75
|
+
v.displayName = "DataTableHeaderFilterContentTitle";
|
|
76
|
+
h.displayName = "DataTableHeaderFilterActions";
|
|
77
|
+
Object.defineProperty(N, "componentType", {
|
|
105
78
|
value: "DataTableHeader"
|
|
106
79
|
});
|
|
107
|
-
Object.defineProperty(
|
|
80
|
+
Object.defineProperty(f, "componentType", {
|
|
108
81
|
value: "DataTableHeaderSearch"
|
|
109
82
|
});
|
|
110
|
-
Object.defineProperty(
|
|
83
|
+
Object.defineProperty(m, "componentType", {
|
|
111
84
|
value: "DataTableHeaderActions"
|
|
112
85
|
});
|
|
113
|
-
Object.defineProperty(
|
|
86
|
+
Object.defineProperty(g, "componentType", {
|
|
114
87
|
value: "DataTableHeaderFilter"
|
|
115
88
|
});
|
|
116
|
-
Object.defineProperty(
|
|
89
|
+
Object.defineProperty(u, "componentType", {
|
|
117
90
|
value: "DataTableHeaderFilterList"
|
|
118
91
|
});
|
|
119
|
-
Object.defineProperty(
|
|
92
|
+
Object.defineProperty(F, "componentType", {
|
|
120
93
|
value: "DataTableHeaderFilterContent"
|
|
121
94
|
});
|
|
122
|
-
Object.defineProperty(
|
|
95
|
+
Object.defineProperty(v, "componentType", {
|
|
123
96
|
value: "DataTableHeaderFilterContentTitle"
|
|
124
97
|
});
|
|
125
|
-
Object.defineProperty(
|
|
98
|
+
Object.defineProperty(h, "componentType", {
|
|
126
99
|
value: "DataTableHeaderFilterActions"
|
|
127
100
|
});
|
|
101
|
+
const l = P({
|
|
102
|
+
slots: {
|
|
103
|
+
root: "gi-flex gi-flex-wrap gi-items-center gi-w-full gi-gap-4 gi-mb-2",
|
|
104
|
+
headerRow: "gi-flex gi-flex-1 gi-gap-4 gi-items-center",
|
|
105
|
+
search: "gi-flex gi-flex-1",
|
|
106
|
+
filter: "gi-flex gi-items-center",
|
|
107
|
+
actions: "gi-flex gi-items-center gi-ml-auto gi-gap-4 gi-flex-shrink",
|
|
108
|
+
filterListWrapper: "gi-w-full",
|
|
109
|
+
filterList: "gi-flex gi-items-center gi-gap-2 gi-flex-wrap",
|
|
110
|
+
filterContentTitle: "gi-py-2 gi-font-medium",
|
|
111
|
+
filterContent: "gi-flex gi-flex-col gi-gap-2 gi-px-6 gi-py-4 gi-flex-1 gi-overflow-auto",
|
|
112
|
+
filterActions: "gi-flex gi-justify-end gi-gap-2 gi-p-6"
|
|
113
|
+
}
|
|
114
|
+
})(), o = (e, t) => O(e) && e.type === t;
|
|
128
115
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
116
|
+
N as DataTableHeader,
|
|
117
|
+
m as DataTableHeaderActions,
|
|
118
|
+
g as DataTableHeaderFilter,
|
|
119
|
+
h as DataTableHeaderFilterActions,
|
|
120
|
+
F as DataTableHeaderFilterContent,
|
|
121
|
+
v as DataTableHeaderFilterContentTitle,
|
|
122
|
+
u as DataTableHeaderFilterList,
|
|
123
|
+
f as DataTableHeaderSearch
|
|
137
124
|
};
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { jsxs as r, jsx as
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "../index-CB-zPpNk.js";
|
|
2
3
|
import { cn as g } from "../cn.js";
|
|
3
|
-
import { translate as
|
|
4
|
-
const
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
count: e,
|
|
15
|
-
defaultValue: ` (${e} Row${e === 1 ? "" : "s"} selected)`
|
|
16
|
-
}) }),
|
|
17
|
-
/* @__PURE__ */ i("div", { className: "gi-flex gi-gap-4", children: t })
|
|
18
|
-
]
|
|
4
|
+
import { translate as m } from "../i18n/utility.js";
|
|
5
|
+
const p = ({ selectedCount: e, actions: s, className: a, ...l }) => /* @__PURE__ */ r("div", { className: g(i.root(), a), ...l, children: [
|
|
6
|
+
/* @__PURE__ */ t("span", { className: i.label(), children: m("dataTable.selectedRows", {
|
|
7
|
+
count: e,
|
|
8
|
+
defaultValue: ` (${e} Row${e === 1 ? "" : "s"} selected)`
|
|
9
|
+
}) }),
|
|
10
|
+
/* @__PURE__ */ t("div", { className: "gi-flex gi-gap-4", children: s })
|
|
11
|
+
] }), i = o({
|
|
12
|
+
slots: {
|
|
13
|
+
root: "gi-w-full gi-flex gi-items-center gi-justify-between gi-px-3 gi-py-2 gi-bg-gray-900 gi-rounded-md",
|
|
14
|
+
label: "gi-text-sm gi-font-medium gi-text-white"
|
|
19
15
|
}
|
|
20
|
-
);
|
|
16
|
+
})();
|
|
21
17
|
export {
|
|
22
|
-
|
|
18
|
+
p as DataTableSelectedRowsBanner
|
|
23
19
|
};
|
|
@@ -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: {
|