@ogcio/design-system-react 1.12.3 → 1.13.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 +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/autocomplete/autocomplete.js +124 -198
- package/dist/autocomplete/types.d.ts +23 -5
- package/dist/autocomplete/use-autocomplete-controller.d.ts +10 -0
- package/dist/autocomplete/use-autocomplete-controller.js +125 -0
- package/dist/button/helpers.d.ts +1 -1
- package/dist/button/helpers.js +14 -12
- package/dist/button/types.d.ts +1 -1
- package/dist/button-group/button-group.d.ts +1 -0
- package/dist/button-group/button-group.js +67 -60
- package/dist/card/card-next.js +28 -28
- package/dist/checkbox/checkbox.d.ts +7 -1
- package/dist/combo-box/dropdown-item.js +30 -30
- package/dist/data-grid/editable-table-cell.d.ts +3 -0
- package/dist/data-grid/editable-table-cell.js +73 -0
- package/dist/data-grid/tanstack/tanstack-helpers.d.ts +11 -0
- package/dist/data-grid/tanstack/tanstack-helpers.js +1799 -0
- package/dist/data-grid/types.d.ts +20 -0
- package/dist/data-grid/types.js +1 -0
- package/dist/drawer/drawer.content.js +6 -6
- package/dist/drawer/drawer.js +8 -8
- package/dist/error-text/error-text.js +1 -1
- package/dist/forms/form-field/form-field.js +15 -15
- package/dist/forms/form-field-with-tag/form-field-with-tag.js +1 -1
- package/dist/header/components/header-slot.js +38 -27
- package/dist/header/header.js +5 -5
- package/dist/heading/heading.js +1 -1
- package/dist/hint-text/hint-text.js +1 -1
- package/dist/hooks/use-aria-hider.d.ts +1 -0
- package/dist/hooks/use-aria-hider.js +20 -0
- package/dist/hooks/use-focus-trap.d.ts +2 -0
- package/dist/hooks/use-focus-trap.js +678 -0
- package/dist/icon/icon.js +32 -32
- package/dist/icon/icons.d.ts +2 -2
- package/dist/icon/icons.js +5 -1
- package/dist/icon/svgs/placeholder.js +2 -2
- package/dist/icon-button/icon-button.js +17 -17
- package/dist/index-2sRBqKFV.js +78 -0
- package/dist/{index-DNkhmzZp.js → index-CB-zPpNk.js} +44 -44
- package/dist/index.d.ts +6 -4
- package/dist/index.js +135 -130
- package/dist/input-checkbox/input-checkbox.d.ts +9 -2
- package/dist/input-checkbox/input-checkbox.js +65 -42
- package/dist/input-checkbox/types.d.ts +5 -0
- package/dist/input-checkbox-group/input-checkbox-group.js +22 -16
- package/dist/input-checkbox-group/types.d.ts +1 -0
- package/dist/input-radio/input-radio.js +15 -15
- package/dist/input-radio-group/input-radio-group.js +24 -17
- package/dist/input-radio-group/types.d.ts +1 -0
- package/dist/input-text/input-text.d.ts +22 -0
- package/dist/input-text/input-text.js +121 -100
- package/dist/input-text/type.d.ts +5 -0
- package/dist/label/label.js +1 -1
- package/dist/link/link.js +1 -1
- package/dist/list/list.js +2 -2
- package/dist/lodash-D1c5hFAM.js +3677 -0
- package/dist/modal/modal.content.js +1 -1
- package/dist/modal/modal.js +141 -127
- package/dist/popover/popover.js +464 -466
- package/dist/primitives/anchor.js +1 -1
- package/dist/progress-bar/progress-bar.js +8 -8
- package/dist/progress-stepper/progress-stepper.js +12 -12
- package/dist/score-select/score-select.js +3 -3
- package/dist/select/select-menu.d.ts +1 -1
- package/dist/select/select-menu.js +96 -90
- package/dist/select/select-native.d.ts +5 -2
- package/dist/select/select-native.js +45 -15
- package/dist/select/select-next.d.ts +3 -2
- package/dist/select/select-next.js +125 -92
- package/dist/select/select-search.d.ts +3 -0
- package/dist/select/select-search.js +24 -0
- package/dist/select/select.d.ts +4 -2
- package/dist/select/select.js +3 -2
- package/dist/select/types.d.ts +22 -0
- package/dist/side-nav/side-nav.js +23 -23
- package/dist/spinner/spinner.js +1 -1
- package/dist/stack/stack.js +40 -49
- package/dist/styles.css +2 -3
- package/dist/table/index.d.ts +8 -0
- package/dist/table/index.js +19 -0
- package/dist/table/table-data.d.ts +16 -2
- package/dist/table/table-data.js +64 -17
- package/dist/table/table-header.d.ts +4 -1
- package/dist/table/table-header.js +58 -18
- package/dist/table/table-pagination.d.ts +8 -0
- package/dist/table/table-pagination.js +97 -0
- package/dist/table/table-row.js +7 -6
- package/dist/table/table.d.ts +4 -1
- package/dist/table/table.js +22 -15
- package/dist/text-input/text-input.d.ts +1 -0
- package/dist/textarea/textarea.js +18 -17
- package/dist/toast/ds-toast.js +1 -1
- package/dist/tooltip/tooltip.js +1 -1
- package/package.json +5 -5
- package/dist/index-ntYL1VRC.js +0 -64
|
@@ -1,85 +1,92 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { createContext as x,
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useDomId as
|
|
6
|
-
const
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as x, useState as B, useEffect as G, useContext as V } from "react";
|
|
4
|
+
import { Button as k } from "../button/button.js";
|
|
5
|
+
import { useDomId as S } from "../hooks/use-dom-id.js";
|
|
6
|
+
const I = x(
|
|
7
7
|
void 0
|
|
8
|
-
),
|
|
9
|
-
value:
|
|
10
|
-
children:
|
|
11
|
-
role:
|
|
12
|
-
"aria-checked":
|
|
13
|
-
"aria-label":
|
|
8
|
+
), v = ({
|
|
9
|
+
value: r,
|
|
10
|
+
children: d,
|
|
11
|
+
role: s,
|
|
12
|
+
"aria-checked": e,
|
|
13
|
+
"aria-label": a
|
|
14
14
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
15
|
+
const t = V(I);
|
|
16
|
+
if (!t)
|
|
17
17
|
throw new Error("ButtonGroupItem must be used within a ButtonGroup");
|
|
18
18
|
const {
|
|
19
|
-
selectedValue:
|
|
20
|
-
setSelectedValue:
|
|
19
|
+
selectedValue: n,
|
|
20
|
+
setSelectedValue: l,
|
|
21
21
|
size: u,
|
|
22
|
-
onChange:
|
|
23
|
-
groupId:
|
|
24
|
-
appearance:
|
|
25
|
-
} =
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
22
|
+
onChange: o,
|
|
23
|
+
groupId: p,
|
|
24
|
+
appearance: i
|
|
25
|
+
} = t, c = n === r, m = () => {
|
|
26
|
+
l(r), o == null || o(r);
|
|
27
|
+
}, b = `${p}-${r}`;
|
|
28
|
+
return /* @__PURE__ */ f(
|
|
29
|
+
k,
|
|
30
30
|
{
|
|
31
|
-
variant:
|
|
31
|
+
variant: c ? "primary" : "secondary",
|
|
32
32
|
size: u,
|
|
33
|
-
appearance:
|
|
34
|
-
onClick:
|
|
35
|
-
id:
|
|
36
|
-
role:
|
|
37
|
-
"aria-checked":
|
|
38
|
-
"aria-label":
|
|
33
|
+
appearance: i,
|
|
34
|
+
onClick: m,
|
|
35
|
+
id: b,
|
|
36
|
+
role: s || "radio",
|
|
37
|
+
"aria-checked": e === void 0 ? c : e,
|
|
38
|
+
"aria-label": a,
|
|
39
39
|
type: "button",
|
|
40
|
-
children:
|
|
40
|
+
children: d
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
},
|
|
44
|
-
name:
|
|
45
|
-
size:
|
|
46
|
-
appearance:
|
|
47
|
-
onChange:
|
|
48
|
-
defaultValue:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"aria-
|
|
43
|
+
}, z = ({
|
|
44
|
+
name: r,
|
|
45
|
+
size: d = "medium",
|
|
46
|
+
appearance: s = "dark",
|
|
47
|
+
onChange: e,
|
|
48
|
+
defaultValue: a,
|
|
49
|
+
value: t,
|
|
50
|
+
children: n,
|
|
51
|
+
role: l,
|
|
52
|
+
"aria-labelledby": u,
|
|
53
|
+
"aria-describedby": o
|
|
53
54
|
}) => {
|
|
54
|
-
const [
|
|
55
|
-
|
|
56
|
-
),
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
const [p, i] = B(
|
|
56
|
+
a
|
|
57
|
+
), c = t === void 0 ? p : t;
|
|
58
|
+
G(() => {
|
|
59
|
+
t !== void 0 && i(t);
|
|
60
|
+
}, [t]);
|
|
61
|
+
const m = (y) => {
|
|
62
|
+
t === void 0 && i(y), e == null || e(y);
|
|
63
|
+
}, b = S();
|
|
64
|
+
return /* @__PURE__ */ f(
|
|
65
|
+
I.Provider,
|
|
59
66
|
{
|
|
60
67
|
value: {
|
|
61
|
-
selectedValue:
|
|
62
|
-
setSelectedValue:
|
|
63
|
-
name:
|
|
64
|
-
size:
|
|
65
|
-
onChange:
|
|
66
|
-
groupId:
|
|
67
|
-
appearance:
|
|
68
|
+
selectedValue: c,
|
|
69
|
+
setSelectedValue: m,
|
|
70
|
+
name: r,
|
|
71
|
+
size: d,
|
|
72
|
+
onChange: e,
|
|
73
|
+
groupId: b,
|
|
74
|
+
appearance: s
|
|
68
75
|
},
|
|
69
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ f(
|
|
70
77
|
"div",
|
|
71
78
|
{
|
|
72
79
|
className: "gi-btn-group",
|
|
73
|
-
role:
|
|
74
|
-
"aria-labelledby":
|
|
75
|
-
"aria-describedby":
|
|
76
|
-
children:
|
|
80
|
+
role: l || "radiogroup",
|
|
81
|
+
"aria-labelledby": u,
|
|
82
|
+
"aria-describedby": o,
|
|
83
|
+
children: n
|
|
77
84
|
}
|
|
78
85
|
)
|
|
79
86
|
}
|
|
80
87
|
);
|
|
81
88
|
};
|
|
82
89
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
z as ButtonGroup,
|
|
91
|
+
v as ButtonGroupItem
|
|
85
92
|
};
|
package/dist/card/card-next.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as l,
|
|
3
|
+
import { createContext as l, Children as m, isValidElement as f, useContext as p, useMemo as v } from "react";
|
|
4
4
|
import { Icon as N } from "../icon/icon.js";
|
|
5
5
|
import { Paragraph as h } from "../paragraph/paragraph.js";
|
|
6
6
|
import { Tag as x } from "../tag/tag.js";
|
|
7
|
-
const u = l(!1),
|
|
8
|
-
function i(e, a,
|
|
9
|
-
if (!
|
|
10
|
-
throw new Error(`${a} must be used inside <${
|
|
7
|
+
const u = l(!1), o = l(!1), c = l(!1);
|
|
8
|
+
function i(e, a, n) {
|
|
9
|
+
if (!p(e))
|
|
10
|
+
throw new Error(`${a} must be used inside <${n}>`);
|
|
11
11
|
return !0;
|
|
12
12
|
}
|
|
13
13
|
const P = ({
|
|
14
14
|
children: e,
|
|
15
15
|
inset: a,
|
|
16
|
-
type:
|
|
17
|
-
dataTestid:
|
|
16
|
+
type: n = "vertical",
|
|
17
|
+
dataTestid: t
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
return `gi-card gi-card-${
|
|
22
|
-
}, [
|
|
23
|
-
return /* @__PURE__ */ r(u.Provider, { value: !0, children: /* @__PURE__ */ r("div", { className:
|
|
19
|
+
const s = v(() => {
|
|
20
|
+
const d = `gi-card-inset-${a || "none"}`;
|
|
21
|
+
return `gi-card gi-card-${n} ${d} gi-not-prose`;
|
|
22
|
+
}, [n, a]);
|
|
23
|
+
return /* @__PURE__ */ r(u.Provider, { value: !0, children: /* @__PURE__ */ r("div", { className: s, "data-testid": t, children: e }) });
|
|
24
24
|
}, j = ({ media: e, href: a }) => {
|
|
25
25
|
if (i(u, "CardMedia", "Card"), !e)
|
|
26
26
|
return null;
|
|
27
27
|
switch (e.type) {
|
|
28
28
|
case "image": {
|
|
29
|
-
const { src:
|
|
29
|
+
const { src: n, alt: t, aspectRatio: s } = e.config;
|
|
30
30
|
return /* @__PURE__ */ r("div", { className: "gi-card-image", children: /* @__PURE__ */ r("a", { href: a, children: /* @__PURE__ */ r(
|
|
31
31
|
"img",
|
|
32
32
|
{
|
|
33
|
-
src:
|
|
34
|
-
alt:
|
|
35
|
-
style:
|
|
36
|
-
className:
|
|
33
|
+
src: n,
|
|
34
|
+
alt: t,
|
|
35
|
+
style: s ? { aspectRatio: s } : void 0,
|
|
36
|
+
className: s ? "gi-w-full" : void 0
|
|
37
37
|
}
|
|
38
38
|
) }) });
|
|
39
39
|
}
|
|
@@ -47,29 +47,29 @@ const P = ({
|
|
|
47
47
|
}, E = ({
|
|
48
48
|
children: e,
|
|
49
49
|
inset: a = "none"
|
|
50
|
-
}) => (i(u, "CardContainer", "Card"), /* @__PURE__ */ r(
|
|
50
|
+
}) => (i(u, "CardContainer", "Card"), /* @__PURE__ */ r(c.Provider, { value: !0, children: /* @__PURE__ */ r("div", { className: `gi-card-content gi-card-inset-${a || "none"}`, children: e }) })), M = ({ children: e }) => (i(o, "CardTitle", "CardHeader"), e ? /* @__PURE__ */ r("div", { className: "gi-card-title", children: e }) : null), A = ({ children: e }) => (i(o, "CardSubtitle", "CardHeader"), e ? /* @__PURE__ */ r("div", { className: "gi-card-subheading", children: e }) : null), T = ({ text: e, type: a }) => (i(o, "CardTag", "CardHeader"), /* @__PURE__ */ r("div", { className: "gi-card-tag", children: /* @__PURE__ */ r(x, { text: e, type: a }) }));
|
|
51
51
|
Object.defineProperty(T, "componentType", {
|
|
52
52
|
value: "CardTag",
|
|
53
53
|
writable: !1,
|
|
54
54
|
enumerable: !1
|
|
55
55
|
});
|
|
56
56
|
const D = ({ children: e }) => {
|
|
57
|
-
i(
|
|
58
|
-
const a = [],
|
|
59
|
-
return
|
|
60
|
-
var
|
|
61
|
-
if (!
|
|
57
|
+
i(c, "CardHeader", "CardContainer");
|
|
58
|
+
const a = [], n = [];
|
|
59
|
+
return m.forEach(e, (t) => {
|
|
60
|
+
var d, C;
|
|
61
|
+
if (!f(t))
|
|
62
62
|
return;
|
|
63
|
-
(((
|
|
64
|
-
}), /* @__PURE__ */ r(
|
|
63
|
+
(((d = t == null ? void 0 : t.type) == null ? void 0 : d.componentType) || ((C = t.props) == null ? void 0 : C.__mdxType)) === "CardTag" ? n.push(t) : a.push(t);
|
|
64
|
+
}), /* @__PURE__ */ r(o.Provider, { value: !0, children: /* @__PURE__ */ g("div", { className: "gi-card-header", children: [
|
|
65
65
|
/* @__PURE__ */ r("div", { className: "gi-card-heading", children: a }),
|
|
66
|
-
|
|
66
|
+
n
|
|
67
67
|
] }) });
|
|
68
68
|
}, R = ({
|
|
69
69
|
children: e
|
|
70
|
-
}) => (i(
|
|
70
|
+
}) => (i(c, "CardDescription", "CardContainer"), e ? /* @__PURE__ */ r("div", { className: "gi-card-paragraph", children: /* @__PURE__ */ r(h, { size: "sm", children: e }) }) : null), S = ({
|
|
71
71
|
children: e
|
|
72
|
-
}) => (i(
|
|
72
|
+
}) => (i(c, "CardAction", "CardContainer"), /* @__PURE__ */ r("div", { className: "gi-card-action", children: e }));
|
|
73
73
|
export {
|
|
74
74
|
S as CardAction,
|
|
75
75
|
E as CardContainer,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @deprecated Use <InputCheckbox /> instead of <Checkbox />.
|
|
3
3
|
*/
|
|
4
|
-
export declare const Checkbox: import('react').
|
|
4
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<{
|
|
5
|
+
size?: import('../index.js').InputCheckboxSizeEnumType;
|
|
6
|
+
label?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
containerProps?: any;
|
|
10
|
+
} & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as n, jsx as s } 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,7 +11,7 @@ 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 oo = ({
|
|
15
15
|
children: c,
|
|
16
16
|
noSearch: h,
|
|
17
17
|
options: p,
|
|
@@ -26,40 +26,40 @@ const ee = ({
|
|
|
26
26
|
)
|
|
27
27
|
];
|
|
28
28
|
q(() => {
|
|
29
|
-
var a,
|
|
30
|
-
let
|
|
31
|
-
const
|
|
32
|
-
for (const b of
|
|
29
|
+
var a, i;
|
|
30
|
+
let o = 0;
|
|
31
|
+
const e = z();
|
|
32
|
+
for (const b of e) {
|
|
33
33
|
const f = (a = b.querySelector("label")) == null ? void 0 : a.textContent;
|
|
34
|
-
(
|
|
34
|
+
(i = f == null ? void 0 : f.toLowerCase()) != null && i.includes(d.toLowerCase()) ? b.style.display = "flex" : (b.style.display = "none", o++);
|
|
35
35
|
}
|
|
36
|
-
_(
|
|
36
|
+
_(o === p.length);
|
|
37
37
|
}, [d, p.length]);
|
|
38
|
-
const R = (
|
|
39
|
-
const a =
|
|
38
|
+
const R = (o, e) => {
|
|
39
|
+
const a = e ? [...t || [], o] : (t || []).filter((i) => i !== o);
|
|
40
40
|
w || V(a), g == null || g(a);
|
|
41
41
|
};
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ n(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
role: "group",
|
|
46
46
|
"aria-label": `${c} dropdown`,
|
|
47
47
|
className: "gi-combobox-dropdown-item",
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
50
|
B,
|
|
51
51
|
{
|
|
52
52
|
variant: "flat",
|
|
53
53
|
appearance: "dark",
|
|
54
54
|
size: "large",
|
|
55
|
-
onClick: (
|
|
56
|
-
|
|
55
|
+
onClick: (o) => {
|
|
56
|
+
o.preventDefault(), C(!m);
|
|
57
57
|
},
|
|
58
58
|
className: x("gi-combobox-toggle", {
|
|
59
59
|
"gi-combobox-toggle-open": m
|
|
60
60
|
}),
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ n("div", { className: "gi-combobox-toggle-content", children: [
|
|
63
63
|
/* @__PURE__ */ s(y, { size: "md", children: c }),
|
|
64
64
|
(t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ s(A, { type: F.Counter, text: t.length.toString() })
|
|
65
65
|
] }),
|
|
@@ -73,22 +73,22 @@ const ee = ({
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ n(
|
|
77
77
|
"div",
|
|
78
78
|
{
|
|
79
79
|
className: m ? "gi-combobox-dropdown-container-open" : "gi-hidden",
|
|
80
80
|
id: `${r}-search`,
|
|
81
81
|
children: [
|
|
82
|
-
!h && /* @__PURE__ */
|
|
82
|
+
!h && /* @__PURE__ */ n("div", { className: "gi-combobox-search", children: [
|
|
83
83
|
/* @__PURE__ */ s(
|
|
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: (o) => {
|
|
90
|
+
const e = o.target.value;
|
|
91
|
+
$(e), l == null || l(e);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
@@ -108,7 +108,7 @@ const ee = ({
|
|
|
108
108
|
}
|
|
109
109
|
)
|
|
110
110
|
] }),
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ n(
|
|
112
112
|
"div",
|
|
113
113
|
{
|
|
114
114
|
className: x("gi-combobox-checkbox-container", {
|
|
@@ -118,8 +118,8 @@ const ee = ({
|
|
|
118
118
|
I && /* @__PURE__ */ s(y, { className: "gi-combobox-checkbox-paragraph", children: N("dropdownItem.noResultFound", {
|
|
119
119
|
defaultValue: "No results found."
|
|
120
120
|
}) }),
|
|
121
|
-
p.map((
|
|
122
|
-
const a = t == null ? void 0 : t.includes(
|
|
121
|
+
p.map((o, e) => {
|
|
122
|
+
const a = t == null ? void 0 : t.includes(o.value);
|
|
123
123
|
return /* @__PURE__ */ s(
|
|
124
124
|
"div",
|
|
125
125
|
{
|
|
@@ -127,16 +127,16 @@ const ee = ({
|
|
|
127
127
|
children: /* @__PURE__ */ s(
|
|
128
128
|
L,
|
|
129
129
|
{
|
|
130
|
-
onChange: (
|
|
130
|
+
onChange: (i) => R(o.value, i.target.checked),
|
|
131
131
|
checked: a,
|
|
132
|
-
id: `${
|
|
133
|
-
label:
|
|
134
|
-
name: `${
|
|
135
|
-
value:
|
|
132
|
+
id: `${e}_${r}_${o.value}`,
|
|
133
|
+
label: o.label,
|
|
134
|
+
name: `${e}_${o.label}_${r}`,
|
|
135
|
+
value: o.value
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
138
|
},
|
|
139
|
-
`${
|
|
139
|
+
`${e}_${r}_${o.value}`
|
|
140
140
|
);
|
|
141
141
|
})
|
|
142
142
|
]
|
|
@@ -150,5 +150,5 @@ const ee = ({
|
|
|
150
150
|
);
|
|
151
151
|
};
|
|
152
152
|
export {
|
|
153
|
-
|
|
153
|
+
oo as DropdownItem
|
|
154
154
|
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { l as O } from "../lodash-D1c5hFAM.js";
|
|
4
|
+
import { useState as g, useMemo as S, useEffect as k } from "react";
|
|
5
|
+
import { InputCheckboxTableCell as V } from "../input-checkbox/input-checkbox.js";
|
|
6
|
+
import { InputTextTableCell as j } from "../input-text/input-text.js";
|
|
7
|
+
import { SelectTableCell as y } from "../select/select-native.js";
|
|
8
|
+
const A = ({
|
|
9
|
+
value: l,
|
|
10
|
+
rowIndex: h,
|
|
11
|
+
columnId: C,
|
|
12
|
+
setData: x,
|
|
13
|
+
editor: e
|
|
14
|
+
}) => {
|
|
15
|
+
var b;
|
|
16
|
+
const [t, m] = g(l), [u, T] = g(!!t), E = (s, n, a) => {
|
|
17
|
+
x(
|
|
18
|
+
(c) => c.map((r, D) => D === s ? {
|
|
19
|
+
...r,
|
|
20
|
+
[n]: a
|
|
21
|
+
} : r)
|
|
22
|
+
);
|
|
23
|
+
}, p = S(
|
|
24
|
+
() => O.debounce((s) => E(h, C, s), 500),
|
|
25
|
+
[h, C]
|
|
26
|
+
);
|
|
27
|
+
k(() => () => {
|
|
28
|
+
p.cancel();
|
|
29
|
+
}, [p]);
|
|
30
|
+
const f = (s) => {
|
|
31
|
+
var a, c;
|
|
32
|
+
const n = s.target.value;
|
|
33
|
+
m(n), p(n), (c = (a = e == null ? void 0 : e.props) == null ? void 0 : a.onChange) == null || c.call(a, s);
|
|
34
|
+
}, v = (s) => {
|
|
35
|
+
var n, a;
|
|
36
|
+
T(!u), p(!u), (a = (n = e == null ? void 0 : e.props) == null ? void 0 : n.onChange) == null || a.call(n, s);
|
|
37
|
+
};
|
|
38
|
+
switch (k(() => {
|
|
39
|
+
m(l);
|
|
40
|
+
}, [l]), e.type) {
|
|
41
|
+
case "select":
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
y,
|
|
44
|
+
{
|
|
45
|
+
...e.props,
|
|
46
|
+
defaultValue: t,
|
|
47
|
+
onChange: f,
|
|
48
|
+
options: ((b = e == null ? void 0 : e.props) == null ? void 0 : b.options) || []
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
case "checkbox":
|
|
52
|
+
return /* @__PURE__ */ o(
|
|
53
|
+
V,
|
|
54
|
+
{
|
|
55
|
+
checked: u,
|
|
56
|
+
...e == null ? void 0 : e.props,
|
|
57
|
+
onChange: v
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
default:
|
|
61
|
+
return /* @__PURE__ */ o(
|
|
62
|
+
j,
|
|
63
|
+
{
|
|
64
|
+
...e.props,
|
|
65
|
+
value: t,
|
|
66
|
+
onChange: f
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
A as EditableTableCell
|
|
73
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Person = {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
age: number;
|
|
6
|
+
city: string;
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
status: 'pending' | 'in progress' | 'accepted' | 'declined';
|
|
9
|
+
disabledFields?: string[];
|
|
10
|
+
};
|
|
11
|
+
export declare function makeData(...lens: number[]): Person[];
|