@ogcio/design-system-react 1.20.0 → 1.22.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/alert/alert.d.ts +3 -90
- package/dist/alert/alert.js +43 -74
- package/dist/alert/types.d.ts +11 -0
- package/dist/alert/types.js +1 -0
- package/dist/alert/variants.d.ts +76 -0
- package/dist/alert/variants.js +36 -0
- package/dist/autocomplete/autocomplete.js +105 -97
- package/dist/card/card-legacy.d.ts +1 -1
- package/dist/card/card-legacy.js +12 -12
- package/dist/card/card-next.d.ts +2 -3
- package/dist/card/card-next.js +226 -61
- package/dist/card/card.js +17 -16
- package/dist/card/types.d.ts +20 -30
- package/dist/checkbox/types.d.ts +0 -1
- package/dist/drawer/drawer.d.ts +2 -3
- package/dist/drawer/drawer.js +59 -36
- package/dist/forms/form-field/form-field.d.ts +2 -3
- package/dist/forms/form-field/form-field.js +69 -60
- package/dist/forms/form-field/types.d.ts +3 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +235 -228
- package/dist/input-checkbox/input-checkbox.d.ts +1 -1
- package/dist/input-checkbox/input-checkbox.js +33 -35
- package/dist/input-checkbox/types.d.ts +0 -1
- package/dist/input-checkbox/types.js +2 -3
- package/dist/input-radio/input-radio.d.ts +1 -1
- package/dist/input-radio/input-radio.js +39 -40
- package/dist/input-radio/types.d.ts +0 -1
- package/dist/input-radio/types.js +0 -1
- package/dist/link/link.d.ts +2 -2
- package/dist/link/link.js +18 -19
- package/dist/modal/modal.js +158 -178
- package/dist/radio/types.d.ts +0 -1
- package/dist/select/select-next.js +151 -144
- package/dist/styles.css +1 -1
- package/dist/summary-list/index.d.ts +6 -0
- package/dist/summary-list/index.js +12 -0
- package/dist/summary-list/summary-list-action.d.ts +5 -0
- package/dist/summary-list/summary-list-action.js +18 -0
- package/dist/summary-list/summary-list-context.d.ts +2 -0
- package/dist/summary-list/summary-list-context.js +20 -0
- package/dist/summary-list/summary-list-header.d.ts +5 -0
- package/dist/summary-list/summary-list-header.js +68 -0
- package/dist/summary-list/summary-list-row.d.ts +6 -0
- package/dist/summary-list/summary-list-row.js +63 -0
- package/dist/summary-list/summary-list-value.d.ts +5 -0
- package/dist/summary-list/summary-list-value.js +17 -0
- package/dist/summary-list/summary-list.d.ts +2 -11
- package/dist/summary-list/summary-list.js +37 -43
- package/dist/summary-list/types.d.ts +15 -11
- package/dist/toast/ds-toast.d.ts +1 -1
- package/dist/toast/ds-toast.js +29 -40
- package/dist/toast/toast.d.ts +1 -1
- package/dist/toast/toast.js +65 -57
- package/dist/toast/types.d.ts +3 -2
- package/dist/utilities.d.ts +3 -0
- package/dist/utilities.js +17 -7
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SummaryListRow as o } from "./summary-list-row.js";
|
|
2
|
+
import { SummaryListAction as e } from "./summary-list-action.js";
|
|
3
|
+
import { SummaryListValue as i } from "./summary-list-value.js";
|
|
4
|
+
import { SummaryList as f } from "./summary-list.js";
|
|
5
|
+
import { SummaryListHeader as s } from "./summary-list-header.js";
|
|
6
|
+
export {
|
|
7
|
+
f as SummaryList,
|
|
8
|
+
e as SummaryListAction,
|
|
9
|
+
s as SummaryListHeader,
|
|
10
|
+
o as SummaryListRow,
|
|
11
|
+
i as SummaryListValue
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { Link as i } from "../link/link.js";
|
|
5
|
+
import { useSummaryListContext as o } from "./summary-list-context.js";
|
|
6
|
+
const t = ({
|
|
7
|
+
children: e,
|
|
8
|
+
...m
|
|
9
|
+
}) => (o(), /* @__PURE__ */ r(i, { ...m, children: e }));
|
|
10
|
+
t.displayName = "SummaryListAction";
|
|
11
|
+
Object.defineProperty(t, "componentType", {
|
|
12
|
+
value: "SummaryListAction",
|
|
13
|
+
writable: !1,
|
|
14
|
+
enumerable: !1
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
t as SummaryListAction
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as o, useContext as n } from "react";
|
|
5
|
+
const r = o(null);
|
|
6
|
+
function s({ children: t }) {
|
|
7
|
+
return /* @__PURE__ */ e(r.Provider, { value: !0, children: t });
|
|
8
|
+
}
|
|
9
|
+
function x() {
|
|
10
|
+
const t = n(r);
|
|
11
|
+
if (!t)
|
|
12
|
+
throw new Error(
|
|
13
|
+
"useSummaryListContext must be used within SummaryListProvider"
|
|
14
|
+
);
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
s as SummaryListProvider,
|
|
19
|
+
x as useSummaryListContext
|
|
20
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { Children as S } from "react";
|
|
5
|
+
import { cn as r } from "../cn.js";
|
|
6
|
+
import { useBreakpoint as A } from "../hooks/use-breakpoint.js";
|
|
7
|
+
import { useDomId as C } from "../hooks/use-dom-id.js";
|
|
8
|
+
import { translate as h } from "../i18n/utility.js";
|
|
9
|
+
import { getSpecialComponentType as b } from "../utilities.js";
|
|
10
|
+
import { useSummaryListContext as j } from "./summary-list-context.js";
|
|
11
|
+
import { ActionList as f } from "./summary-list-row.js";
|
|
12
|
+
const y = ({
|
|
13
|
+
children: g,
|
|
14
|
+
label: n,
|
|
15
|
+
id: o,
|
|
16
|
+
className: N,
|
|
17
|
+
overflow: w = "wrap",
|
|
18
|
+
maxWidth: c = "gi-w-full",
|
|
19
|
+
...L
|
|
20
|
+
}) => {
|
|
21
|
+
j();
|
|
22
|
+
const { width: m } = A(), p = C(), t = S.toArray(g).filter(
|
|
23
|
+
(s) => b(s) === "SummaryListAction"
|
|
24
|
+
), i = m != null && m <= 765, d = c ? { maxWidth: c } : void 0, u = {
|
|
25
|
+
"gi-truncate gi-block": w === "truncate"
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ l("tr", { ...L, className: r("gi-h-14", N), children: [
|
|
28
|
+
/* @__PURE__ */ l("th", { scope: "col", className: "gi-text-center gi-align-middle", children: [
|
|
29
|
+
!i && /* @__PURE__ */ e("span", { className: r(u), style: d, children: n }),
|
|
30
|
+
i ? /* @__PURE__ */ l("div", { className: r("gi-flex gi-justify-between"), children: [
|
|
31
|
+
/* @__PURE__ */ e("span", { className: r(u), style: d, children: n }),
|
|
32
|
+
/* @__PURE__ */ e("span", { className: "gi-sr-only", children: h("header.actions", {
|
|
33
|
+
defaultValue: "Actions"
|
|
34
|
+
}) }),
|
|
35
|
+
/* @__PURE__ */ e(f, { id: o, children: t.map((s, a) => /* @__PURE__ */ e(
|
|
36
|
+
"span",
|
|
37
|
+
{
|
|
38
|
+
className: r({ "gi-ml-4": a > 0 }),
|
|
39
|
+
children: s
|
|
40
|
+
},
|
|
41
|
+
`${p}-a${a}`
|
|
42
|
+
)) })
|
|
43
|
+
] }) : null
|
|
44
|
+
] }),
|
|
45
|
+
!i && t ? /* @__PURE__ */ l("th", { scope: "col", colSpan: 2, children: [
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "gi-sr-only", children: h("header.actions", {
|
|
47
|
+
defaultValue: "Actions"
|
|
48
|
+
}) }),
|
|
49
|
+
/* @__PURE__ */ e(f, { id: o, children: t.map((s, a) => /* @__PURE__ */ e(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
className: r({ "gi-ml-4": a > 0 }),
|
|
53
|
+
children: s
|
|
54
|
+
},
|
|
55
|
+
`${p}-a${a}`
|
|
56
|
+
)) })
|
|
57
|
+
] }) : null
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
y.displayName = "SummaryListHeader";
|
|
61
|
+
Object.defineProperty(y, "componentType", {
|
|
62
|
+
value: "SummaryListHeader",
|
|
63
|
+
writable: !1,
|
|
64
|
+
enumerable: !1
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
y as SummaryListHeader
|
|
68
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SummaryListActionListProps, SummaryListRowProps } from './types.js';
|
|
2
|
+
export declare const SummaryListRow: {
|
|
3
|
+
({ children, label, withBorder, className, ...props }: SummaryListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const ActionList: ({ id, children }: SummaryListActionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { Children as g } from "react";
|
|
5
|
+
import { cn as s } from "../cn.js";
|
|
6
|
+
import { useDomId as L } from "../hooks/use-dom-id.js";
|
|
7
|
+
import { translate as y } from "../i18n/utility.js";
|
|
8
|
+
import { getSpecialComponentType as p } from "../utilities.js";
|
|
9
|
+
import { useSummaryListContext as $ } from "./summary-list-context.js";
|
|
10
|
+
const f = ({
|
|
11
|
+
children: a,
|
|
12
|
+
label: l,
|
|
13
|
+
withBorder: h,
|
|
14
|
+
className: b,
|
|
15
|
+
...S
|
|
16
|
+
}) => {
|
|
17
|
+
$();
|
|
18
|
+
const n = g.toArray(a), m = n.filter(
|
|
19
|
+
(t) => p(t) === "SummaryListAction"
|
|
20
|
+
), o = n.find(
|
|
21
|
+
(t) => p(t) === "SummaryListValue"
|
|
22
|
+
), r = L(), c = `${r}-value`, d = `${r}-actions`;
|
|
23
|
+
return /* @__PURE__ */ i(
|
|
24
|
+
"tr",
|
|
25
|
+
{
|
|
26
|
+
...S,
|
|
27
|
+
className: s(
|
|
28
|
+
{
|
|
29
|
+
"gi-border-b gi-border-color-border-system-neutral-muted": h
|
|
30
|
+
},
|
|
31
|
+
b
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ e("th", { id: r, scope: "row", children: l }),
|
|
35
|
+
o ? /* @__PURE__ */ i("td", { ...o.props, "aria-labelledby": `${r} ${c}`, children: [
|
|
36
|
+
/* @__PURE__ */ e("span", { id: c, className: "gi-sr-only", children: y("summaryList.col.value", { defaultValue: "Value" }) }),
|
|
37
|
+
o.props.children
|
|
38
|
+
] }) : null,
|
|
39
|
+
m.length > 0 ? /* @__PURE__ */ e("td", { "aria-labelledby": `${r} ${d}`, children: /* @__PURE__ */ e(v, { id: d, children: m.map((t, u) => /* @__PURE__ */ e(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
className: s({ "gi-ml-4": u > 0 }),
|
|
43
|
+
children: t
|
|
44
|
+
},
|
|
45
|
+
`${r}-a${u}`
|
|
46
|
+
)) }) }) : null
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}, v = ({ id: a, children: l }) => /* @__PURE__ */ i("div", { className: s("gi-summary-list-action"), children: [
|
|
51
|
+
/* @__PURE__ */ e("span", { id: a, className: "gi-sr-only", children: y("summaryList.col.actions", { defaultValue: "Actions" }) }),
|
|
52
|
+
l
|
|
53
|
+
] });
|
|
54
|
+
f.displayName = "SummaryRow";
|
|
55
|
+
Object.defineProperty(f, "componentType", {
|
|
56
|
+
value: "SummaryListRow",
|
|
57
|
+
writable: !1,
|
|
58
|
+
enumerable: !1
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
v as ActionList,
|
|
62
|
+
f as SummaryListRow
|
|
63
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { useSummaryListContext as a } from "./summary-list-context.js";
|
|
5
|
+
const e = ({
|
|
6
|
+
children: t,
|
|
7
|
+
...m
|
|
8
|
+
}) => (a(), /* @__PURE__ */ r("td", { ...m, children: t }));
|
|
9
|
+
e.displayName = "SummaryListValue";
|
|
10
|
+
Object.defineProperty(e, "componentType", {
|
|
11
|
+
value: "SummaryListValue",
|
|
12
|
+
writable: !1,
|
|
13
|
+
enumerable: !1
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
e as SummaryListValue
|
|
17
|
+
};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const SummaryListValue: ({ children }: SummaryListValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare const SummaryListAction: {
|
|
4
|
-
({ href, children, asChild, }: SummaryListActionProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
displayName: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const SummaryListRow: {
|
|
8
|
-
({ children, label, withBorder, ...props }: SummaryListRowProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
1
|
+
import { SummaryListProps } from './types.js';
|
|
11
2
|
export declare const SummaryList: {
|
|
12
|
-
({ children,
|
|
3
|
+
({ children, className, withBorder, ...props }: SummaryListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
4
|
displayName: string;
|
|
14
5
|
};
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
u,
|
|
10
|
-
{
|
|
11
|
-
href: a,
|
|
12
|
-
"aria-label": i("summaryList.linkAction", {
|
|
13
|
-
children: m,
|
|
14
|
-
defaultValue: `Link action: ${m}`
|
|
15
|
-
}),
|
|
16
|
-
asChild: s,
|
|
17
|
-
children: m
|
|
18
|
-
}
|
|
19
|
-
) }), n = ({
|
|
1
|
+
"use client";
|
|
2
|
+
import "@ogcio/design-system-react/browser-check";
|
|
3
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { Children as u } from "react";
|
|
5
|
+
import { cn as p } from "../cn.js";
|
|
6
|
+
import { getSpecialComponentType as o } from "../utilities.js";
|
|
7
|
+
import { SummaryListProvider as y } from "./summary-list-context.js";
|
|
8
|
+
const l = ({
|
|
20
9
|
children: a,
|
|
21
|
-
|
|
22
|
-
withBorder:
|
|
23
|
-
...
|
|
24
|
-
}) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
10
|
+
className: s,
|
|
11
|
+
withBorder: n,
|
|
12
|
+
...d
|
|
13
|
+
}) => {
|
|
14
|
+
const t = u.toArray(a), i = t.filter(
|
|
15
|
+
(e) => o(e) === "SummaryListHeader"
|
|
16
|
+
), m = t.filter(
|
|
17
|
+
(e) => o(e) === "SummaryListRow"
|
|
18
|
+
);
|
|
19
|
+
return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: p("gi-summary-list", {
|
|
23
|
+
"gi-border gi-border-color-border-system-neutral-muted": n
|
|
24
|
+
}),
|
|
25
|
+
children: /* @__PURE__ */ c("table", { className: s, role: "table", ...d, children: [
|
|
26
|
+
i ? /* @__PURE__ */ r("thead", { children: i }) : null,
|
|
27
|
+
m ? /* @__PURE__ */ r("tbody", { children: m }) : null
|
|
28
|
+
] })
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
};
|
|
32
|
+
l.displayName = "SummaryList";
|
|
33
|
+
Object.defineProperty(l, "componentType", {
|
|
34
|
+
value: "SummaryList",
|
|
35
|
+
writable: !1,
|
|
36
|
+
enumerable: !1
|
|
37
|
+
});
|
|
41
38
|
export {
|
|
42
|
-
|
|
43
|
-
e as SummaryListAction,
|
|
44
|
-
n as SummaryListRow,
|
|
45
|
-
L as SummaryListValue
|
|
39
|
+
l as SummaryList
|
|
46
40
|
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactNode, TdHTMLAttributes } from 'react';
|
|
1
2
|
import { LinkProps } from '../link/link.js';
|
|
2
|
-
import { SummaryListAction, SummaryListRow, SummaryListValue } from './summary-list.js';
|
|
3
3
|
export type SummaryListItem = {
|
|
4
4
|
key: string;
|
|
5
5
|
value: string | string[];
|
|
6
6
|
actionLink: LinkProps;
|
|
7
7
|
};
|
|
8
|
-
export type SummaryListValueProps =
|
|
9
|
-
|
|
8
|
+
export type SummaryListValueProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
9
|
+
export type SummaryListActionProps = LinkProps;
|
|
10
|
+
export type SummaryListRowProps = ComponentPropsWithoutRef<'tr'> & {
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
withBorder?: boolean;
|
|
10
13
|
};
|
|
11
|
-
export type
|
|
12
|
-
export type SummaryListRowProps = {
|
|
13
|
-
label: string;
|
|
14
|
+
export type SummaryListProps = ComponentPropsWithoutRef<'table'> & {
|
|
14
15
|
withBorder?: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
};
|
|
17
|
+
export type SummaryListHeaderProps = ComponentPropsWithoutRef<'tr'> & {
|
|
18
|
+
label?: string;
|
|
19
|
+
overflow?: 'wrap' | 'truncate';
|
|
20
|
+
maxWidth?: string;
|
|
21
|
+
};
|
|
22
|
+
export type SummaryListActionListProps = ComponentPropsWithoutRef<'thead'> & {
|
|
23
|
+
label?: string;
|
|
20
24
|
};
|
package/dist/toast/ds-toast.d.ts
CHANGED
|
@@ -78,5 +78,5 @@ declare const toastVariants: import('tailwind-variants').TVReturnType<{
|
|
|
78
78
|
dismiss: string;
|
|
79
79
|
innerContainer: string;
|
|
80
80
|
}, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
|
|
81
|
-
declare function Toast({ title, description, action, variant, dismissible, onClose,
|
|
81
|
+
declare function Toast({ title, description, action, variant, showIcon, dismissible, onClose, slotAction, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
export { Toast, toastVariants };
|
package/dist/toast/ds-toast.js
CHANGED
|
@@ -63,53 +63,42 @@ function B({
|
|
|
63
63
|
description: s,
|
|
64
64
|
action: a,
|
|
65
65
|
variant: r = "info",
|
|
66
|
+
showIcon: l = !0,
|
|
66
67
|
dismissible: o,
|
|
67
|
-
onClose:
|
|
68
|
-
dataTestid: c,
|
|
68
|
+
onClose: c,
|
|
69
69
|
slotAction: t
|
|
70
70
|
}) {
|
|
71
|
-
const { base: m, heading:
|
|
71
|
+
const { base: m, heading: g, container: b, innerContainer: d, dismiss: f, baseDismissible: h } = N({
|
|
72
72
|
variant: r
|
|
73
73
|
});
|
|
74
|
-
return /* @__PURE__ */ n(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
return /* @__PURE__ */ n("div", { className: (o ? h : m)(), children: [
|
|
75
|
+
l ? /* @__PURE__ */ i(
|
|
76
|
+
p,
|
|
77
|
+
{
|
|
78
|
+
icon: C({ variant: r }),
|
|
79
|
+
className: "gi-toast-icon",
|
|
80
|
+
"data-variant": r
|
|
81
|
+
}
|
|
82
|
+
) : null,
|
|
83
|
+
/* @__PURE__ */ n("div", { className: b(), children: [
|
|
84
|
+
/* @__PURE__ */ n("div", { className: d(), children: [
|
|
85
|
+
/* @__PURE__ */ i("p", { className: g(), children: e }),
|
|
86
|
+
o && /* @__PURE__ */ i("div", { className: f(), children: /* @__PURE__ */ i(
|
|
87
|
+
v,
|
|
86
88
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
89
|
+
onClick: c,
|
|
90
|
+
size: "small",
|
|
91
|
+
appearance: "dark",
|
|
92
|
+
variant: "flat",
|
|
93
|
+
icon: { icon: "close" },
|
|
94
|
+
"aria-label": "Close toast"
|
|
90
95
|
}
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
onClick: l,
|
|
99
|
-
size: "small",
|
|
100
|
-
appearance: "dark",
|
|
101
|
-
variant: "flat",
|
|
102
|
-
icon: { icon: "close" },
|
|
103
|
-
"aria-label": "Close toast"
|
|
104
|
-
}
|
|
105
|
-
) })
|
|
106
|
-
] }),
|
|
107
|
-
/* @__PURE__ */ i(k, { ariaLabel: s, children: s }),
|
|
108
|
-
(a || t) && /* @__PURE__ */ i("div", { className: "gi-toast-action", children: /* @__PURE__ */ i(w, { href: a == null ? void 0 : a.href, noColor: !0, size: "md", asChild: !!t, children: t || (a == null ? void 0 : a.label) }) })
|
|
109
|
-
] })
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
);
|
|
96
|
+
) })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ i(k, { ariaLabel: s, children: s }),
|
|
99
|
+
(a || t) && /* @__PURE__ */ i("div", { className: "gi-toast-action", children: /* @__PURE__ */ i(w, { href: a == null ? void 0 : a.href, noColor: !0, size: "md", asChild: !!t, children: t || (a == null ? void 0 : a.label) }) })
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
113
102
|
}
|
|
114
103
|
export {
|
|
115
104
|
B as Toast,
|
package/dist/toast/toast.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export declare const ToastProvider: () => import("react/jsx-runtime").JSX.Elemen
|
|
|
3
3
|
export declare const toaster: {
|
|
4
4
|
create: ({ position, ...props }: ToastProps) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare const Toast: ({ variant, title, description, action, dismissible, duration, animation, slotAction, }: ToastProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export declare const Toast: ({ variant, title, description, action, dismissible, duration, animation, showIcon, slotAction, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element | null;
|