globalfy-design-system 0.91.0 → 0.93.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AlertProps } from './Alert.types';
|
|
2
2
|
|
|
3
|
-
export declare const Alert: ({ message, actions, inlineActions, toastType, icon, iconVariant, hasCloseButton, actionType }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Alert: ({ message, actions, inlineActions, toastType, icon, iconVariant, hasCloseButton, onClickCloseButton, actionType }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,7 @@ export type AlertProps = {
|
|
|
17
17
|
toastType?: ToastType;
|
|
18
18
|
icon?: React.ReactNode;
|
|
19
19
|
hasCloseButton?: boolean;
|
|
20
|
+
onClickCloseButton?: () => void;
|
|
20
21
|
iconVariant?: "neutral" | "success" | "error" | "warning" | "banner";
|
|
21
22
|
actions?: AlertAction[];
|
|
22
23
|
actionType?: ActionType;
|
|
@@ -26121,7 +26121,7 @@ const TD = ({
|
|
|
26121
26121
|
...c
|
|
26122
26122
|
}) => {
|
|
26123
26123
|
const [u, d] = se.useState(!1), f = be({
|
|
26124
|
-
base: "group flex h-12 w-full items-center rounded-lg border border-primary-grey-700 bg-white px-4 py-3",
|
|
26124
|
+
base: "group mt-[24px] flex h-12 w-full items-center rounded-lg border border-primary-grey-700 bg-white px-4 py-3",
|
|
26125
26125
|
variants: {
|
|
26126
26126
|
disabled: {
|
|
26127
26127
|
true: "border-none bg-primary-grey-500"
|
|
@@ -26174,7 +26174,7 @@ const TD = ({
|
|
|
26174
26174
|
}), T = (N) => {
|
|
26175
26175
|
d(!u), S(N);
|
|
26176
26176
|
};
|
|
26177
|
-
return /* @__PURE__ */ P.jsxs("div", {
|
|
26177
|
+
return /* @__PURE__ */ P.jsxs("div", { children: [
|
|
26178
26178
|
/* @__PURE__ */ P.jsxs(
|
|
26179
26179
|
"div",
|
|
26180
26180
|
{
|
|
@@ -30699,9 +30699,10 @@ const rD = ({
|
|
|
30699
30699
|
icon: o,
|
|
30700
30700
|
iconVariant: a = "neutral",
|
|
30701
30701
|
hasCloseButton: i = !1,
|
|
30702
|
-
|
|
30702
|
+
onClickCloseButton: s,
|
|
30703
|
+
actionType: l = qa.Link
|
|
30703
30704
|
}) => {
|
|
30704
|
-
const
|
|
30705
|
+
const c = be({
|
|
30705
30706
|
base: "flex gap-3 rounded-lg px-4 py-4 md:px-6",
|
|
30706
30707
|
variants: {
|
|
30707
30708
|
inlineActions: {
|
|
@@ -30713,7 +30714,7 @@ const rD = ({
|
|
|
30713
30714
|
banner: "rounded-2xl bg-complementary-red-500"
|
|
30714
30715
|
}
|
|
30715
30716
|
}
|
|
30716
|
-
}),
|
|
30717
|
+
}), u = be({
|
|
30717
30718
|
base: "font-satoshi text-sm",
|
|
30718
30719
|
variants: {
|
|
30719
30720
|
toastType: {
|
|
@@ -30721,7 +30722,7 @@ const rD = ({
|
|
|
30721
30722
|
banner: "text-white"
|
|
30722
30723
|
}
|
|
30723
30724
|
}
|
|
30724
|
-
}),
|
|
30725
|
+
}), d = be({
|
|
30725
30726
|
base: "mt-[1px] flex h-[34px] w-[34px] items-center justify-center self-start rounded-full font-satoshi text-sm text-white",
|
|
30726
30727
|
variants: {
|
|
30727
30728
|
iconVariant: {
|
|
@@ -30732,7 +30733,7 @@ const rD = ({
|
|
|
30732
30733
|
banner: "bg-white text-complementary-red-500"
|
|
30733
30734
|
}
|
|
30734
30735
|
}
|
|
30735
|
-
}),
|
|
30736
|
+
}), f = be({
|
|
30736
30737
|
base: "flex flex-1",
|
|
30737
30738
|
variants: {
|
|
30738
30739
|
actionType: {
|
|
@@ -30740,30 +30741,30 @@ const rD = ({
|
|
|
30740
30741
|
button: "md:justify-end"
|
|
30741
30742
|
}
|
|
30742
30743
|
}
|
|
30743
|
-
}),
|
|
30744
|
-
return /* @__PURE__ */ P.jsxs("div", { className:
|
|
30745
|
-
o && /* @__PURE__ */ P.jsx("div", { className:
|
|
30744
|
+
}), p = () => r === vc.Banner ? "secondaryNegative" : l === qa.Link ? "tertiary" : "secondary";
|
|
30745
|
+
return /* @__PURE__ */ P.jsxs("div", { className: c({ inlineActions: n, toastType: r }), children: [
|
|
30746
|
+
o && /* @__PURE__ */ P.jsx("div", { className: d({ iconVariant: a }), children: typeof o == "string" ? /* @__PURE__ */ P.jsx(lt, { name: o }) : o }),
|
|
30746
30747
|
/* @__PURE__ */ P.jsxs("div", { className: "flex flex-1 flex-col gap-3 md:flex-row", children: [
|
|
30747
|
-
/* @__PURE__ */ P.jsx("div", { className: "mt-[3px] flex items-center gap-4", children: /* @__PURE__ */ P.jsx("p", { className:
|
|
30748
|
-
t && /* @__PURE__ */ P.jsx("div", { className:
|
|
30748
|
+
/* @__PURE__ */ P.jsx("div", { className: "mt-[3px] flex items-center gap-4", children: /* @__PURE__ */ P.jsx("p", { className: u({ toastType: r }), children: e }) }),
|
|
30749
|
+
t && /* @__PURE__ */ P.jsx("div", { className: f({ actionType: l }), children: t.map(({ label: m, onClick: h }) => /* @__PURE__ */ P.jsx(
|
|
30749
30750
|
au,
|
|
30750
30751
|
{
|
|
30751
|
-
variant:
|
|
30752
|
-
onClick:
|
|
30752
|
+
variant: p(),
|
|
30753
|
+
onClick: h,
|
|
30753
30754
|
size: "small",
|
|
30754
|
-
className:
|
|
30755
|
-
children:
|
|
30755
|
+
className: l === qa.Link ? "!p-0" : "",
|
|
30756
|
+
children: m
|
|
30756
30757
|
},
|
|
30757
|
-
|
|
30758
|
+
m
|
|
30758
30759
|
)) })
|
|
30759
30760
|
] }),
|
|
30760
|
-
i && /* @__PURE__ */ P.jsx("div", { className: "flex pl-5", children: /* @__PURE__ */ P.jsx(
|
|
30761
|
+
i && /* @__PURE__ */ P.jsx("div", { className: "flex pl-5", children: /* @__PURE__ */ P.jsx("button", { onClick: s, children: /* @__PURE__ */ P.jsx(
|
|
30761
30762
|
lt,
|
|
30762
30763
|
{
|
|
30763
30764
|
name: "close",
|
|
30764
30765
|
className: "cursor-pointer text-xs text-black md:mt-[13px]"
|
|
30765
30766
|
}
|
|
30766
|
-
) })
|
|
30767
|
+
) }) })
|
|
30767
30768
|
] });
|
|
30768
30769
|
}, ND = () => ({
|
|
30769
30770
|
alert: (t) => {
|