@ogcio/design-system-react 1.12.4 → 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 +4 -4
- 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 +6 -6
- package/dist/index-ntYL1VRC.js +0 -64
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
import { translate as
|
|
2
|
+
import { cn as t } from "../cn.js";
|
|
3
|
+
import { translate as g } from "../i18n/utility.js";
|
|
4
4
|
function d({
|
|
5
5
|
value: s = 0,
|
|
6
6
|
max: e = 100,
|
|
7
7
|
isIndeterminate: r,
|
|
8
|
-
label:
|
|
8
|
+
label: o
|
|
9
9
|
}) {
|
|
10
|
-
const
|
|
10
|
+
const i = s * 100 / e;
|
|
11
11
|
return /* @__PURE__ */ l("div", { className: "gi-progress-bar-container", children: [
|
|
12
12
|
/* @__PURE__ */ a(
|
|
13
13
|
"div",
|
|
@@ -16,7 +16,7 @@ function d({
|
|
|
16
16
|
"aria-valuenow": r ? void 0 : s,
|
|
17
17
|
"aria-valuemin": 0,
|
|
18
18
|
"aria-valuemax": e,
|
|
19
|
-
"aria-label":
|
|
19
|
+
"aria-label": g("progressBar.progressBar", {
|
|
20
20
|
defaultValue: "Progress bar"
|
|
21
21
|
}),
|
|
22
22
|
"data-testid": "progress-bar",
|
|
@@ -24,15 +24,15 @@ function d({
|
|
|
24
24
|
children: /* @__PURE__ */ a(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
className:
|
|
27
|
+
className: t({
|
|
28
28
|
"gi-progress-bar-indeterminate": r
|
|
29
29
|
}),
|
|
30
|
-
style: r ? {} : { width: `${
|
|
30
|
+
style: r ? {} : { width: `${i}%` }
|
|
31
31
|
}
|
|
32
32
|
)
|
|
33
33
|
}
|
|
34
34
|
),
|
|
35
|
-
|
|
35
|
+
o && /* @__PURE__ */ a("span", { children: o })
|
|
36
36
|
] });
|
|
37
37
|
}
|
|
38
38
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Children as P } from "react";
|
|
3
3
|
import { cn as $ } from "../cn.js";
|
|
4
4
|
import { Icon as z } from "../icon/icon.js";
|
|
5
|
-
import { ProgressStepperIndicator as
|
|
5
|
+
import { ProgressStepperIndicator as f } from "./types.js";
|
|
6
6
|
const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
7
7
|
isNextStep: e,
|
|
8
8
|
orientation: t = "horizontal",
|
|
@@ -11,7 +11,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
11
11
|
verticalGap: l
|
|
12
12
|
}) => {
|
|
13
13
|
const o = t === "vertical" ? { height: j(l) } : void 0;
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ v(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
17
17
|
"data-orientation": t,
|
|
@@ -28,19 +28,19 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}, x = (e) => ({
|
|
31
|
-
[
|
|
31
|
+
[f.Hashtag]: {
|
|
32
32
|
completed: /* @__PURE__ */ r(z, { icon: "check" }),
|
|
33
33
|
current: () => "#",
|
|
34
34
|
next: () => "#"
|
|
35
35
|
},
|
|
36
|
-
[
|
|
36
|
+
[f.Number]: {
|
|
37
37
|
completed: /* @__PURE__ */ r(z, { icon: "check" }),
|
|
38
38
|
current: (s) => s,
|
|
39
39
|
next: (s) => s
|
|
40
40
|
}
|
|
41
41
|
})[e], V = (e, t, s, a) => {
|
|
42
42
|
const { current: l, completed: o, next: i } = x(
|
|
43
|
-
e ||
|
|
43
|
+
e || f.Hashtag
|
|
44
44
|
);
|
|
45
45
|
return s ? o : a ? l(t) : i(t);
|
|
46
46
|
}, B = ({
|
|
@@ -58,8 +58,8 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
58
58
|
verticalGap: h
|
|
59
59
|
}) => {
|
|
60
60
|
const m = !t && !e, c = l === "vertical" && (e || d || t), p = !!o;
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ v("div", { className: "gi-relative", children: [
|
|
62
|
+
/* @__PURE__ */ v(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
65
|
className: "gi-progress-stepper-step-container",
|
|
@@ -68,13 +68,12 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
68
68
|
"data-completed": t,
|
|
69
69
|
"data-next": m,
|
|
70
70
|
"data-indicator": i,
|
|
71
|
-
role: "listitem",
|
|
72
71
|
"aria-labelledby": `step-label-${a}`,
|
|
73
72
|
"data-testid": u || `step-label-${a}`,
|
|
74
73
|
"aria-label": p ? void 0 : g,
|
|
75
74
|
children: [
|
|
76
75
|
/* @__PURE__ */ r("div", { className: "gi-progress-stepper-step", "data-indicator": i, children: V(
|
|
77
|
-
i ||
|
|
76
|
+
i || f.Hashtag,
|
|
78
77
|
a,
|
|
79
78
|
t,
|
|
80
79
|
e
|
|
@@ -126,9 +125,10 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
126
125
|
}) => {
|
|
127
126
|
var g, h;
|
|
128
127
|
const d = (h = (g = e[t]) == null ? void 0 : g.props) == null ? void 0 : h.children, u = s === "horizontal" && d;
|
|
129
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ v(
|
|
130
129
|
"div",
|
|
131
130
|
{
|
|
131
|
+
role: "presentation",
|
|
132
132
|
className: $("gi-w-full", {
|
|
133
133
|
"gi-flex": s === "vertical"
|
|
134
134
|
}),
|
|
@@ -158,7 +158,7 @@ const j = (e) => `calc(100% + ${e * 4 - 36}px)`, k = ({
|
|
|
158
158
|
c === e.length - 1,
|
|
159
159
|
l || c < t && c !== t
|
|
160
160
|
];
|
|
161
|
-
return /* @__PURE__ */ r("div", { className: "gi-w-full", children: /* @__PURE__ */ r(
|
|
161
|
+
return /* @__PURE__ */ r("div", { className: "gi-w-full", role: "listitem", children: /* @__PURE__ */ r(
|
|
162
162
|
B,
|
|
163
163
|
{
|
|
164
164
|
stepNumber: c + 1,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs as u, jsx as d } from "react/jsx-runtime";
|
|
3
3
|
import k from "react";
|
|
4
4
|
import { ButtonGroup as y, ButtonGroupItem as N } from "../button-group/button-group.js";
|
|
5
|
-
import { FormField as
|
|
5
|
+
import { FormField as x, FormFieldLabel as f, FormFieldHint as j } from "../forms/form-field/form-field.js";
|
|
6
6
|
const _ = ({
|
|
7
7
|
name: p,
|
|
8
8
|
size: $ = "medium",
|
|
@@ -57,8 +57,8 @@ const _ = ({
|
|
|
57
57
|
break;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return /* @__PURE__ */ u(
|
|
61
|
-
/* @__PURE__ */ d(
|
|
60
|
+
return /* @__PURE__ */ u(x, { className: "gi-w-full", children: [
|
|
61
|
+
/* @__PURE__ */ d(f, { id: v, children: F }),
|
|
62
62
|
i && /* @__PURE__ */ d(j, { id: b, children: i }),
|
|
63
63
|
/* @__PURE__ */ u(
|
|
64
64
|
"div",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectMenuOptionProps, SelectMenuProps } from './types.js';
|
|
2
|
-
export declare const SelectMenu: ({ children, className, onChange, enableSearch, }: SelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const SelectMenu: ({ children, className, onChange, enableSearch, isLoading, showNoData, }: SelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare const SelectMenuOption: ({ children, value, selected, onChange, disabled, dataTestid, className, hidden, enableSearch, isHighlighted, ...props }: SelectMenuOptionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
export declare const SelectMenuGroupItem: ({ children, label, ...props }: {
|
|
5
5
|
children?: any;
|
|
@@ -1,142 +1,148 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { jsxs as N, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h, useEffect as A, Children as K, isValidElement as P, cloneElement as v } from "react";
|
|
4
|
+
import { cn as V } from "../cn.js";
|
|
5
|
+
import { translate as q } from "../i18n/utility.js";
|
|
6
|
+
import { Icon as H } from "../icon/icon.js";
|
|
7
|
+
import { InputText as J } from "../input-text/input-text.js";
|
|
8
|
+
import { Label as Q } from "../label/label.js";
|
|
9
|
+
import { Spinner as R } from "../spinner/spinner.js";
|
|
10
|
+
const re = ({
|
|
11
|
+
children: o,
|
|
12
|
+
className: i,
|
|
13
|
+
onChange: s,
|
|
14
|
+
enableSearch: r,
|
|
15
|
+
isLoading: c,
|
|
16
|
+
showNoData: m
|
|
13
17
|
}) => {
|
|
14
|
-
const [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
).
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const [l, g] = h(""), [S, f] = h(!1), [y, O] = h([]);
|
|
19
|
+
A(() => {
|
|
20
|
+
f(!1), m && setTimeout(() => f(!0), 0);
|
|
21
|
+
}, [m]), A(() => {
|
|
22
|
+
const B = K.toArray(o).filter(
|
|
23
|
+
(a) => P(a)
|
|
24
|
+
).map((a) => {
|
|
25
|
+
var D, L, M, T, I, k;
|
|
26
|
+
const F = (D = a == null ? void 0 : a.type) == null ? void 0 : D.componentType, x = l.toLowerCase();
|
|
27
|
+
switch (F) {
|
|
22
28
|
case "SelectMenuOption": {
|
|
23
|
-
const
|
|
24
|
-
if (typeof
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
return
|
|
28
|
-
onChange:
|
|
29
|
+
const e = a;
|
|
30
|
+
if (typeof e.props.value == "string") {
|
|
31
|
+
const E = ((T = (M = (L = e == null ? void 0 : e.props) == null ? void 0 : L.children) == null ? void 0 : M.toString()) == null ? void 0 : T.toLowerCase()) || "", G = (k = (I = e == null ? void 0 : e.props) == null ? void 0 : I.value) == null ? void 0 : k.toLowerCase();
|
|
32
|
+
if (E.includes(x) || G.includes(x))
|
|
33
|
+
return v(e, {
|
|
34
|
+
onChange: s,
|
|
29
35
|
enableSearch: r
|
|
30
36
|
});
|
|
31
37
|
}
|
|
32
38
|
break;
|
|
33
39
|
}
|
|
34
40
|
case "SelectMenuGroupItem": {
|
|
35
|
-
const
|
|
36
|
-
(
|
|
37
|
-
).map((
|
|
41
|
+
const e = a, j = K.toArray(e.props.children).filter(
|
|
42
|
+
(t) => P(t)
|
|
43
|
+
).map((t) => {
|
|
38
44
|
var p;
|
|
39
|
-
return ((p =
|
|
45
|
+
return ((p = t == null ? void 0 : t.type) == null ? void 0 : p.componentType) === "SelectMenuOption" ? v(t, { onChange: s }) : null;
|
|
40
46
|
}).filter(
|
|
41
|
-
(
|
|
42
|
-
).filter((
|
|
43
|
-
var
|
|
44
|
-
const p = ((
|
|
45
|
-
return (p == null ? void 0 : p.includes(
|
|
47
|
+
(t) => t !== null
|
|
48
|
+
).filter((t) => {
|
|
49
|
+
var C, $, z;
|
|
50
|
+
const p = (($ = (C = t.props.children) == null ? void 0 : C.toString()) == null ? void 0 : $.toLowerCase()) || "", d = ((z = t.props.value) == null ? void 0 : z.toLowerCase()) || "";
|
|
51
|
+
return (p == null ? void 0 : p.includes(l.toLowerCase())) || (d == null ? void 0 : d.includes(l.toLowerCase()));
|
|
46
52
|
});
|
|
47
|
-
return
|
|
48
|
-
children:
|
|
53
|
+
return j.length > 0 || l === "" ? v(e, {
|
|
54
|
+
children: j
|
|
49
55
|
}) : null;
|
|
50
56
|
}
|
|
51
57
|
default:
|
|
52
58
|
return null;
|
|
53
59
|
}
|
|
54
60
|
}).filter(Boolean);
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
r && /* @__PURE__ */
|
|
62
|
-
|
|
61
|
+
O(B);
|
|
62
|
+
}, [o, l, s]);
|
|
63
|
+
const w = (b) => {
|
|
64
|
+
g(b.target.value);
|
|
65
|
+
}, u = () => c ? /* @__PURE__ */ n("div", { className: "gi-select-menu-loading", children: /* @__PURE__ */ n(R, { size: "md" }) }) : S ? /* @__PURE__ */ n("div", { className: "gi-select-menu-option-not-found", children: q("autocomplete.noData") }) : /* @__PURE__ */ n("ul", { children: y });
|
|
66
|
+
return /* @__PURE__ */ N("div", { className: V("gi-select-menu-container", i), children: [
|
|
67
|
+
r && /* @__PURE__ */ n("div", { className: "gi-select-menu-input-container", children: /* @__PURE__ */ n(
|
|
68
|
+
J,
|
|
63
69
|
{
|
|
64
70
|
tabIndex: 0,
|
|
65
71
|
placeholder: "Search",
|
|
66
72
|
iconEnd: "search",
|
|
67
|
-
onChange:
|
|
68
|
-
value:
|
|
73
|
+
onChange: w,
|
|
74
|
+
value: l
|
|
69
75
|
}
|
|
70
76
|
) }),
|
|
71
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ n("div", { className: "gi-select-menu-option-container", children: u() })
|
|
72
78
|
] });
|
|
73
|
-
},
|
|
74
|
-
children:
|
|
75
|
-
value:
|
|
76
|
-
selected:
|
|
79
|
+
}, U = ({
|
|
80
|
+
children: o,
|
|
81
|
+
value: i,
|
|
82
|
+
selected: s,
|
|
77
83
|
onChange: r,
|
|
78
|
-
disabled:
|
|
79
|
-
dataTestid:
|
|
80
|
-
className:
|
|
84
|
+
disabled: c,
|
|
85
|
+
dataTestid: m,
|
|
86
|
+
className: l,
|
|
81
87
|
hidden: g,
|
|
82
|
-
enableSearch:
|
|
83
|
-
isHighlighted:
|
|
84
|
-
...
|
|
88
|
+
enableSearch: S,
|
|
89
|
+
isHighlighted: f,
|
|
90
|
+
...y
|
|
85
91
|
}) => {
|
|
86
|
-
const
|
|
87
|
-
(
|
|
88
|
-
},
|
|
89
|
-
|
|
92
|
+
const O = (u) => {
|
|
93
|
+
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), r == null || r(i));
|
|
94
|
+
}, w = () => {
|
|
95
|
+
c || r == null || r(i);
|
|
90
96
|
};
|
|
91
|
-
return g ? null : /* @__PURE__ */
|
|
97
|
+
return g ? null : /* @__PURE__ */ N(
|
|
92
98
|
"li",
|
|
93
99
|
{
|
|
94
100
|
role: "option",
|
|
95
|
-
tabIndex:
|
|
96
|
-
"aria-selected":
|
|
97
|
-
"aria-label":
|
|
98
|
-
"aria-disabled":
|
|
99
|
-
onKeyDown:
|
|
100
|
-
onClick:
|
|
101
|
-
className:
|
|
101
|
+
tabIndex: c ? -1 : 0,
|
|
102
|
+
"aria-selected": s,
|
|
103
|
+
"aria-label": o == null ? void 0 : o.toString(),
|
|
104
|
+
"aria-disabled": c,
|
|
105
|
+
onKeyDown: O,
|
|
106
|
+
onClick: w,
|
|
107
|
+
className: V(
|
|
102
108
|
"gi-select-option-item",
|
|
103
109
|
{
|
|
104
|
-
"gi-select-option-item-disabled":
|
|
105
|
-
"gi-select-option-item-highlighted":
|
|
110
|
+
"gi-select-option-item-disabled": c,
|
|
111
|
+
"gi-select-option-item-highlighted": f
|
|
106
112
|
},
|
|
107
|
-
|
|
113
|
+
l
|
|
108
114
|
),
|
|
109
|
-
"data-search-enabled":
|
|
110
|
-
"data-testid":
|
|
111
|
-
...
|
|
115
|
+
"data-search-enabled": S,
|
|
116
|
+
"data-testid": m || `option-${i}`,
|
|
117
|
+
...y,
|
|
112
118
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
119
|
+
/* @__PURE__ */ n("span", { className: "gi-text-sm", children: o }),
|
|
120
|
+
s && /* @__PURE__ */ n(H, { icon: "check" })
|
|
115
121
|
]
|
|
116
122
|
},
|
|
117
|
-
`${
|
|
123
|
+
`${o}-${i}`
|
|
118
124
|
);
|
|
119
125
|
};
|
|
120
|
-
Object.defineProperty(
|
|
126
|
+
Object.defineProperty(U, "componentType", {
|
|
121
127
|
value: "SelectMenuOption",
|
|
122
128
|
writable: !1,
|
|
123
129
|
enumerable: !1
|
|
124
130
|
});
|
|
125
|
-
const
|
|
126
|
-
children:
|
|
127
|
-
label:
|
|
128
|
-
...
|
|
129
|
-
}) => /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
|
|
131
|
+
const W = ({
|
|
132
|
+
children: o,
|
|
133
|
+
label: i,
|
|
134
|
+
...s
|
|
135
|
+
}) => /* @__PURE__ */ N("div", { ...s, role: "group", className: "gi-px-3", children: [
|
|
136
|
+
/* @__PURE__ */ n(Q, { text: i, size: "sm", className: "gi-font-bold gi-pb-1" }),
|
|
137
|
+
o
|
|
132
138
|
] });
|
|
133
|
-
Object.defineProperty(
|
|
139
|
+
Object.defineProperty(W, "componentType", {
|
|
134
140
|
value: "SelectMenuGroupItem",
|
|
135
141
|
writable: !1,
|
|
136
142
|
enumerable: !1
|
|
137
143
|
});
|
|
138
144
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
re as SelectMenu,
|
|
146
|
+
W as SelectMenuGroupItem,
|
|
147
|
+
U as SelectMenuOption
|
|
142
148
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectGroupItemProps, SelectItemProps, SelectProps } from './types.js';
|
|
2
|
+
import { SelectGroupItemProps, SelectItemProps, SelectTableCellProps, SelectProps } from './types.js';
|
|
3
3
|
export declare const SelectGroupItem: ({ children, ...props }: SelectGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const SelectItem: ({ children, ...props }: SelectItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const SelectNative: FC<SelectProps
|
|
5
|
+
export declare const SelectNative: FC<SelectProps & {
|
|
6
|
+
containerProps?: any;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const SelectTableCell: ({ options, defaultValue, onChange, error, ...props }: SelectTableCellProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { cn as o } from "../cn.js";
|
|
3
|
-
import { Icon as
|
|
4
|
-
const
|
|
5
|
-
children:
|
|
3
|
+
import { Icon as m } from "../icon/icon.js";
|
|
4
|
+
const b = ({
|
|
5
|
+
children: c,
|
|
6
6
|
...e
|
|
7
|
-
}) => /* @__PURE__ */
|
|
7
|
+
}) => /* @__PURE__ */ a("optgroup", { ...e, role: "group", children: c }), r = ({ children: c, ...e }) => /* @__PURE__ */ a(
|
|
8
8
|
"option",
|
|
9
9
|
{
|
|
10
10
|
className: o("gi-select-option", e.className),
|
|
11
11
|
"aria-selected": e.selected ? "true" : "false",
|
|
12
12
|
...e,
|
|
13
|
-
children:
|
|
13
|
+
children: c
|
|
14
14
|
}
|
|
15
15
|
), g = ({
|
|
16
|
-
children:
|
|
16
|
+
children: c,
|
|
17
17
|
className: e,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
containerProps: i,
|
|
19
|
+
...t
|
|
20
|
+
}) => {
|
|
21
|
+
var l;
|
|
22
|
+
return /* @__PURE__ */ d("div", { className: "gi-select-container", ...i, children: [
|
|
23
|
+
/* @__PURE__ */ a("select", { className: o("gi-select", e), ...t, children: c }),
|
|
24
|
+
/* @__PURE__ */ a(
|
|
25
|
+
m,
|
|
26
|
+
{
|
|
27
|
+
className: "gi-select-icon",
|
|
28
|
+
icon: "keyboard_arrow_down",
|
|
29
|
+
"data-disabled": (l = t == null ? void 0 : t.disabled) == null ? void 0 : l.toString()
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] });
|
|
33
|
+
}, f = ({
|
|
34
|
+
options: c,
|
|
35
|
+
defaultValue: e,
|
|
36
|
+
onChange: i,
|
|
37
|
+
error: t,
|
|
38
|
+
...l
|
|
39
|
+
}) => /* @__PURE__ */ a(
|
|
40
|
+
g,
|
|
41
|
+
{
|
|
42
|
+
...l,
|
|
43
|
+
containerProps: {
|
|
44
|
+
"data-table-cell": "true",
|
|
45
|
+
"data-table-cell-error-state": t == null ? void 0 : t.toString()
|
|
46
|
+
},
|
|
47
|
+
defaultValue: e,
|
|
48
|
+
onChange: i,
|
|
49
|
+
children: c.map(({ value: n, label: s }) => /* @__PURE__ */ a(r, { value: n, children: s }, `${n}-${s}`))
|
|
50
|
+
}
|
|
51
|
+
);
|
|
23
52
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
g as SelectNative
|
|
53
|
+
b as SelectGroupItem,
|
|
54
|
+
r as SelectItem,
|
|
55
|
+
g as SelectNative,
|
|
56
|
+
f as SelectTableCell
|
|
27
57
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { SelectNextGroupProps, SelectNextProps, SelectNextOptionProps } from './types.js';
|
|
3
|
-
export declare const SelectNext: ({ children, onChange: onSelectNextChange, onMenuClose,
|
|
2
|
+
import { SelectNextGroupProps, SelectNextProps, SelectNextOptionProps, SelectNextTableCellProps } from './types.js';
|
|
3
|
+
export declare const SelectNext: ({ children, value: controlledValue, defaultValue, onChange: onSelectNextChange, onMenuClose, enableSearch, disabled, ...props }: SelectNextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const SelectItemNext: FC<SelectNextOptionProps>;
|
|
5
5
|
export declare const SelectGroupItemNext: FC<SelectNextGroupProps>;
|
|
6
|
+
export declare const SelectNextTableCell: (props: SelectNextTableCellProps) => import("react/jsx-runtime").JSX.Element;
|