@fluidattacks/design 3.1.11 → 3.1.13
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/_commonjsHelpers-C6fGbg64.mjs +6 -0
- package/dist/components/@core/index.js +18 -1
- package/dist/components/accordion/accordion-content/index.js +22 -1
- package/dist/components/accordion/index.js +78 -1
- package/dist/components/alert/index.js +162 -4
- package/dist/components/button/index.js +69 -1
- package/dist/components/card/card-header/index.js +83 -1
- package/dist/components/card/card-with-image/index.js +93 -1
- package/dist/components/card/card-with-input/index.js +106 -3
- package/dist/components/card/card-with-selector/index.js +71 -1
- package/dist/components/card/card-with-switch/index.js +50 -1
- package/dist/components/card/index.js +12 -1
- package/dist/components/carousel/index.js +62 -10
- package/dist/components/checkbox/index.js +118 -3
- package/dist/components/cloud-image/index.js +8 -1
- package/dist/components/code-snippet/index.js +72 -1
- package/dist/components/code-snippet/location-code/index.js +171 -1
- package/dist/components/colors/index.js +224 -1
- package/dist/components/confirm-dialog/index.js +46 -1
- package/dist/components/container/index.js +51 -3
- package/dist/components/content-card/category-tag/index.js +42 -1
- package/dist/components/content-card/event-date/index.js +61 -1
- package/dist/components/content-card/index.js +168 -3
- package/dist/components/content-card-carousel/index.js +95 -1
- package/dist/components/content-card-carousel/scroll-buttons/index.js +9 -1
- package/dist/components/divider/index.js +25 -1
- package/dist/components/empty-state/empty-button/index.js +6 -1
- package/dist/components/empty-state/index.js +58 -8
- package/dist/components/file-preview/index.js +31 -3
- package/dist/components/form/index.js +63 -3
- package/dist/components/grid-container/index.js +46 -5
- package/dist/components/group-selector/index.js +135 -1
- package/dist/components/group-selector/option-container/index.js +12 -1
- package/dist/components/icon/index.js +102 -4
- package/dist/components/icon-button/index.js +76 -3
- package/dist/components/indicator-card/index.js +74 -1
- package/dist/components/info-sidebar/index.js +116 -1
- package/dist/components/inputs/fields/combobox/index.js +146 -1
- package/dist/components/inputs/fields/combobox/option/index.js +8 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +27 -1
- package/dist/components/inputs/fields/date/calendar/grid/index.js +26 -1
- package/dist/components/inputs/fields/date/calendar/header/index.js +38 -1
- package/dist/components/inputs/fields/date/calendar/index.js +30 -1
- package/dist/components/inputs/fields/date/index.js +68 -1
- package/dist/components/inputs/fields/date-range/calendar/index.js +35 -1
- package/dist/components/inputs/fields/date-range/index.js +108 -3
- package/dist/components/inputs/fields/date-time/calendar/index.js +60 -5
- package/dist/components/inputs/fields/date-time/index.js +69 -1
- package/dist/components/inputs/fields/editable/index.js +28 -1
- package/dist/components/inputs/fields/input/index.js +77 -1
- package/dist/components/inputs/fields/input-file/index.js +117 -4
- package/dist/components/inputs/fields/input-tags/index.js +63 -2
- package/dist/components/inputs/fields/number/index.js +57 -1
- package/dist/components/inputs/fields/number-range/index.js +49 -1
- package/dist/components/inputs/fields/phone/index.js +574 -11
- package/dist/components/inputs/fields/text-area/index.js +81 -1
- package/dist/components/inputs/index.js +28 -1
- package/dist/components/inputs/label/index.js +38 -1
- package/dist/components/inputs/outline-container/index.js +104 -1
- package/dist/components/inputs/utils/action-button/index.js +31 -1
- package/dist/components/inputs/utils/calendar-button/index.js +37 -1
- package/dist/components/inputs/utils/date-selector/index.js +62 -1
- package/dist/components/inputs/utils/date-time-field/index.js +133 -1
- package/dist/components/inputs/utils/dialog/index.js +14 -1
- package/dist/components/inputs/utils/number-field/index.js +86 -1
- package/dist/components/inputs/utils/popover/index.js +44 -1
- package/dist/components/interactive-card/icon/index.js +7 -1
- package/dist/components/interactive-card/index.js +118 -1
- package/dist/components/language-selector/index.js +37 -1
- package/dist/components/language-selector/item-list/index.js +8 -1
- package/dist/components/link/index.js +106 -7
- package/dist/components/list-item/index.js +67 -1
- package/dist/components/little-flag/index.js +32 -3
- package/dist/components/loading/index.js +55 -14
- package/dist/components/logo/index.js +13 -1
- package/dist/components/logo-carousel/index.js +45 -4
- package/dist/components/lottie/index.js +20 -3
- package/dist/components/menu/index.js +67 -1
- package/dist/components/message-banner/index.js +87 -4
- package/dist/components/modal/index.js +65 -1
- package/dist/components/modal/modal-confirm/index.js +51 -1
- package/dist/components/modal/modal-footer/index.js +25 -1
- package/dist/components/modal/modal-header/index.js +51 -1
- package/dist/components/notification/index.js +113 -5
- package/dist/components/notification-sign/index.js +43 -6
- package/dist/components/number-input/index.js +62 -7
- package/dist/components/oauth-selector/index.js +100 -1
- package/dist/components/oauth-selector/option-container/index.js +76 -1
- package/dist/components/plan-card/index.js +155 -5
- package/dist/components/plan-card/recommended-tag/index.js +31 -1
- package/dist/components/pop-up/description/index.js +51 -1
- package/dist/components/pop-up/index.js +152 -1
- package/dist/components/premium-feature/index.js +85 -3
- package/dist/components/priority-score/index.js +29 -1
- package/dist/components/progress/index.js +36 -3
- package/dist/components/progress-bar/index.js +153 -5
- package/dist/components/radio-button/index.js +125 -3
- package/dist/components/scroll-button/index.js +38 -2
- package/dist/components/search/index.js +105 -7
- package/dist/components/search-bar/index.js +219 -1
- package/dist/components/search-bar/item-searching/index.js +10 -1
- package/dist/components/severity-badge/index.js +74 -1
- package/dist/components/severity-overview/badge/index.js +69 -1
- package/dist/components/severity-overview/index.js +17 -1
- package/dist/components/show-on-hover/index.js +31 -3
- package/dist/components/slide-out-menu/index.js +3456 -3
- package/dist/components/slide-out-menu/menu-item/index.js +67 -1
- package/dist/components/slider/index.js +124 -7
- package/dist/components/slider/thumb/index.js +17 -1
- package/dist/components/step-lapse/index.js +153 -9
- package/dist/components/table-button/index.js +97 -3
- package/dist/components/tabs/fixed-tabs/index.js +29 -1
- package/dist/components/tabs/index.js +57 -1
- package/dist/components/tabs/tab/index.js +39 -1
- package/dist/components/tag/index.js +184 -3
- package/dist/components/timeline/card/index.js +9 -1
- package/dist/components/timeline/index.js +17 -1
- package/dist/components/toggle/index.js +85 -14
- package/dist/components/toggle-buttons/index.js +103 -5
- package/dist/components/tooltip/index.js +13 -1
- package/dist/components/tour/index.js +4549 -4
- package/dist/components/typography/heading/index.js +47 -1
- package/dist/components/typography/index.js +8 -1
- package/dist/components/typography/span/index.js +41 -1
- package/dist/components/typography/text/index.js +47 -1
- package/dist/components/web-form/index.js +68 -7
- package/dist/hooks/index.js +13 -1
- package/dist/index-BMHVi812.mjs +234 -0
- package/dist/index-BzAniA2J.mjs +135 -0
- package/dist/index-C6LbClYh.mjs +146 -0
- package/dist/index-CAIe8hBv.mjs +130 -0
- package/dist/index-CUQBAqt_.mjs +75 -0
- package/dist/index-CWlrSlUk.mjs +68 -0
- package/dist/index-Ckmu1TfV.mjs +86 -0
- package/dist/index-DwznImvK.mjs +1678 -0
- package/dist/index-maWH3JYC.mjs +3561 -0
- package/dist/index.js +206 -1
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-BAhpqi6C.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/styles-BlHspTrz.mjs +144 -0
- package/dist/styles-CROOwXEH.mjs +76 -0
- package/dist/styles-CplEd2kw.mjs +228 -0
- package/dist/styles-D1eTIklB.mjs +110 -0
- package/dist/styles-ePGii_9g.mjs +74 -0
- package/dist/use-carousel-CgAF78h3.mjs +23 -0
- package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
- package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
- package/dist/use-modal-CtgexKnf.mjs +14 -0
- package/dist/use-search-Dj47QDw9.mjs +15 -0
- package/dist/utils-V0EumEPM.mjs +6 -0
- package/package.json +1 -3
- package/dist/_commonjsHelpers-C37NGDzP.js +0 -1
- package/dist/_commonjsHelpers-D6CrkqQz.mjs +0 -6
- package/dist/index-BH27NQKA.mjs +0 -2311
- package/dist/index-Bcw2vW_n.mjs +0 -75
- package/dist/index-C0_LPuYU.mjs +0 -106
- package/dist/index-C8zdgAVH.mjs +0 -82
- package/dist/index-CA_9DXWd.js +0 -5
- package/dist/index-CmylnDrF.js +0 -14
- package/dist/index-DUMgwAbO.js +0 -26
- package/dist/index-DpQYiwGu.js +0 -5
- package/dist/index-Dy8ZUIYs.js +0 -5
- package/dist/index-JPf5Yzg6.js +0 -17
- package/dist/index-OBZtKZuT.mjs +0 -1021
- package/dist/index-SsXlDjK4.mjs +0 -122
- package/dist/index-TKLFHcRp.js +0 -18
- package/dist/index-TnyKqJHo.mjs +0 -61
- package/dist/index-Yr95Cb7Z.mjs +0 -54
- package/dist/index-h9-U5wxq.mjs +0 -209
- package/dist/index-qCiUU4sZ.js +0 -9
- package/dist/index-qe0nJwzl.js +0 -15
- package/dist/styles--Elze-LV.js +0 -3
- package/dist/styles-3pR4Xdvy.js +0 -33
- package/dist/styles-59h91S9m.mjs +0 -65
- package/dist/styles-BCwLWpC3.mjs +0 -126
- package/dist/styles-BJ7-0I5X.mjs +0 -74
- package/dist/styles-BKObp9bh.mjs +0 -76
- package/dist/styles-BWVdbvFu.js +0 -5
- package/dist/styles-Bl-CstrT.js +0 -5
- package/dist/styles-Bn42XCW5.js +0 -7
- package/dist/styles-C2CoGJl7.js +0 -33
- package/dist/styles-CNzziAXG.js +0 -5
- package/dist/styles-CdD9waPD.js +0 -29
- package/dist/styles-CnKTwnFk.mjs +0 -110
- package/dist/styles-D4R-eerv.mjs +0 -77
- package/dist/styles-DNIIhyRC.mjs +0 -144
- package/dist/styles-DV8yOaqV.mjs +0 -131
- package/dist/styles-DYoftbd3.js +0 -42
- package/dist/styles-DlmKLhPh.js +0 -7
- package/dist/styles-be8gOdgy.mjs +0 -106
- package/dist/use-carousel-64dKFW4E.js +0 -1
- package/dist/use-carousel-D7xeL3YZ.mjs +0 -17
- package/dist/use-click-outside-BqkLISED.js +0 -1
- package/dist/use-click-outside-C4Z4pdiW.mjs +0 -18
- package/dist/use-cloudinary-image-DKMl7jbx.mjs +0 -612
- package/dist/use-cloudinary-image-YMMafagv.js +0 -1
- package/dist/use-modal-CNbLSSQb.mjs +0 -14
- package/dist/use-modal-_bYY6M_n.js +0 -1
- package/dist/use-search-75ip5xR-.mjs +0 -12
- package/dist/use-search-DeL4UDMh.js +0 -1
- package/dist/utils-C2whpEd3.js +0 -1
- package/dist/utils-Da0qL35u.mjs +0 -4
|
@@ -1 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { isUndefined as g } from "lodash";
|
|
3
|
+
import { useTheme as x } from "styled-components";
|
|
4
|
+
import { Container as t } from "../container/index.js";
|
|
5
|
+
import { Divider as l } from "../divider/index.js";
|
|
6
|
+
import { Link as y } from "../link/index.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import { a as z } from "../../styles-Bdque9TT.mjs";
|
|
9
|
+
import "../icon/index.js";
|
|
10
|
+
import { Tag as b } from "../tag/index.js";
|
|
11
|
+
import "../typography/heading/index.js";
|
|
12
|
+
import "../typography/span/index.js";
|
|
13
|
+
import { Text as r } from "../typography/text/index.js";
|
|
14
|
+
import { u as k } from "../../use-click-outside-BUll8Ag-.mjs";
|
|
15
|
+
const R = ({
|
|
16
|
+
children: n,
|
|
17
|
+
commitSha: s,
|
|
18
|
+
commitShortSha: a,
|
|
19
|
+
parentElement: c,
|
|
20
|
+
userInfo: p,
|
|
21
|
+
setVisibility: d
|
|
22
|
+
}) => {
|
|
23
|
+
const i = x(), { userName: f, email: h, phone: m, userRole: u } = p;
|
|
24
|
+
return k(c, () => {
|
|
25
|
+
d(!1);
|
|
26
|
+
}), /* @__PURE__ */ o(z, { children: [
|
|
27
|
+
/* @__PURE__ */ e("li", { className: "user-info", children: /* @__PURE__ */ o(t, { display: "inline-flex", gap: 0.25, width: "100%", children: [
|
|
28
|
+
/* @__PURE__ */ o(
|
|
29
|
+
t,
|
|
30
|
+
{
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
gap: 0.25,
|
|
34
|
+
width: "100%",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
r,
|
|
38
|
+
{
|
|
39
|
+
color: i.palette.gray[800],
|
|
40
|
+
fontWeight: "bold",
|
|
41
|
+
size: "sm",
|
|
42
|
+
children: f
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ e(r, { color: i.palette.gray[400], size: "sm", children: h }),
|
|
46
|
+
g(m) ? void 0 : /* @__PURE__ */ e(r, { color: i.palette.gray[400], size: "sm", children: m })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(b, { tagLabel: u, variant: "role" }) })
|
|
51
|
+
] }) }),
|
|
52
|
+
/* @__PURE__ */ e(l, {}),
|
|
53
|
+
n,
|
|
54
|
+
/* @__PURE__ */ e(l, {}),
|
|
55
|
+
/* @__PURE__ */ e("li", { className: "commit-info", children: /* @__PURE__ */ e(
|
|
56
|
+
y,
|
|
57
|
+
{
|
|
58
|
+
href: `https://gitlab.com/fluidattacks/universe/-/tree/${s}`,
|
|
59
|
+
iconPosition: "hidden",
|
|
60
|
+
children: /* @__PURE__ */ e(r, { color: i.palette.gray[400], size: "xs", children: `commit : ${a}` })
|
|
61
|
+
}
|
|
62
|
+
) })
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
R as Menu
|
|
67
|
+
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useCallback as w } from "react";
|
|
3
|
+
import { styled as b, useTheme as z } from "styled-components";
|
|
4
|
+
import { theme as c } from "../colors/index.js";
|
|
5
|
+
import { Container as l } from "../container/index.js";
|
|
6
|
+
import { Icon as p } from "../icon/index.js";
|
|
7
|
+
import "../typography/heading/index.js";
|
|
8
|
+
import "../typography/span/index.js";
|
|
9
|
+
import { Text as m } from "../typography/text/index.js";
|
|
10
|
+
const S = b.button`
|
|
2
11
|
align-items: center;
|
|
3
12
|
background-color: transparent;
|
|
4
13
|
border: unset;
|
|
@@ -9,10 +18,84 @@
|
|
|
9
18
|
padding: 0;
|
|
10
19
|
|
|
11
20
|
&:hover p {
|
|
12
|
-
color: ${
|
|
21
|
+
color: ${c.palette.primary[200]};
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
&:hover span {
|
|
16
|
-
color: ${
|
|
25
|
+
color: ${c.palette.primary[200]};
|
|
17
26
|
}
|
|
18
|
-
|
|
27
|
+
`, j = (t) => t === "platform" ? { normal: "sm", small: void 0 } : { normal: "md", small: "sm" }, M = ({
|
|
28
|
+
message: t,
|
|
29
|
+
onClickButton: a,
|
|
30
|
+
buttonText: d,
|
|
31
|
+
buttonFontWeight: s = "regular",
|
|
32
|
+
icon: f,
|
|
33
|
+
onClose: i,
|
|
34
|
+
variant: h = "web"
|
|
35
|
+
}) => {
|
|
36
|
+
const e = z(), [u, g] = x(!0), y = w(() => {
|
|
37
|
+
g(!1), i == null || i();
|
|
38
|
+
}, [i]), o = j(h);
|
|
39
|
+
return /* @__PURE__ */ n(
|
|
40
|
+
l,
|
|
41
|
+
{
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
bgGradient: e.palette.gradients["01"],
|
|
44
|
+
display: u ? "flex" : "none",
|
|
45
|
+
id: "message-banner",
|
|
46
|
+
justify: "space-between",
|
|
47
|
+
padding: [0.75, 0.75, 0.75, 0.75],
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ n(l, { display: "flex", gap: 0.5, justify: "center", width: "100%", children: [
|
|
50
|
+
/* @__PURE__ */ r(l, { children: typeof t == "string" ? /* @__PURE__ */ r(
|
|
51
|
+
m,
|
|
52
|
+
{
|
|
53
|
+
color: e.palette.white,
|
|
54
|
+
display: "inline",
|
|
55
|
+
size: o.normal,
|
|
56
|
+
sizeSm: o.small,
|
|
57
|
+
children: t
|
|
58
|
+
}
|
|
59
|
+
) : t }),
|
|
60
|
+
a ? /* @__PURE__ */ n(S, { onClick: a, children: [
|
|
61
|
+
/* @__PURE__ */ r(
|
|
62
|
+
m,
|
|
63
|
+
{
|
|
64
|
+
color: e.palette.white,
|
|
65
|
+
fontWeight: s,
|
|
66
|
+
size: o.normal,
|
|
67
|
+
sizeSm: o.small,
|
|
68
|
+
textDecoration: "underline",
|
|
69
|
+
children: d
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ r(
|
|
73
|
+
p,
|
|
74
|
+
{
|
|
75
|
+
icon: f ?? "arrow-right",
|
|
76
|
+
iconColor: e.palette.white,
|
|
77
|
+
iconSize: "xs",
|
|
78
|
+
iconType: s === "bold" ? "fa-regular" : "fa-light"
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }) : void 0
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ r(
|
|
84
|
+
p,
|
|
85
|
+
{
|
|
86
|
+
clickable: !0,
|
|
87
|
+
hoverColor: e.palette.primary[200],
|
|
88
|
+
icon: "close",
|
|
89
|
+
iconColor: e.palette.white,
|
|
90
|
+
iconSize: "xs",
|
|
91
|
+
iconType: "fa-light",
|
|
92
|
+
onClick: y
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
M as MessageBanner
|
|
101
|
+
};
|
|
@@ -1 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import a from "lodash";
|
|
3
|
+
import { createPortal as M } from "react-dom";
|
|
4
|
+
import { ModalConfirm as k } from "./modal-confirm/index.js";
|
|
5
|
+
import { ModalFooter as x } from "./modal-footer/index.js";
|
|
6
|
+
import { ModalHeader as b } from "./modal-header/index.js";
|
|
7
|
+
import { M as I, a as h, I as j } from "../../styles-BZQOqe8p.mjs";
|
|
8
|
+
import { M as O } from "../../index-maWH3JYC.mjs";
|
|
9
|
+
import "../typography/heading/index.js";
|
|
10
|
+
import "../typography/span/index.js";
|
|
11
|
+
import { Text as S } from "../typography/text/index.js";
|
|
12
|
+
const P = ({
|
|
13
|
+
_portal: t = !0,
|
|
14
|
+
cancelButton: n = void 0,
|
|
15
|
+
children: p = void 0,
|
|
16
|
+
confirmButton: s = void 0,
|
|
17
|
+
content: r = void 0,
|
|
18
|
+
description: l = "",
|
|
19
|
+
modalRef: i,
|
|
20
|
+
otherActions: u = void 0,
|
|
21
|
+
onClose: f = void 0,
|
|
22
|
+
title: m = "",
|
|
23
|
+
size: g,
|
|
24
|
+
id: o = "modal-container"
|
|
25
|
+
}) => {
|
|
26
|
+
const d = () => /* @__PURE__ */ e(
|
|
27
|
+
I,
|
|
28
|
+
{
|
|
29
|
+
"aria-label": i.name,
|
|
30
|
+
"aria-modal": "true",
|
|
31
|
+
id: "modal-wrapper",
|
|
32
|
+
children: /* @__PURE__ */ c(h, { $size: g, "data-testid": o, id: o, children: [
|
|
33
|
+
!a.isEmpty(m) && /* @__PURE__ */ e(
|
|
34
|
+
b,
|
|
35
|
+
{
|
|
36
|
+
description: l,
|
|
37
|
+
modalRef: i,
|
|
38
|
+
onClose: f,
|
|
39
|
+
otherActions: u,
|
|
40
|
+
title: m
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
p,
|
|
44
|
+
a.isObject(r) && a.isString(r.imageSrc) && /* @__PURE__ */ e(j, { $framed: r.imageFramed, children: /* @__PURE__ */ e(O, { alt: "modal-img", publicId: r.imageSrc }) }),
|
|
45
|
+
a.isObject(r) && a.isString(r.imageText) && /* @__PURE__ */ e(S, { mb: 1.5, size: "sm", children: r.imageText }),
|
|
46
|
+
/* @__PURE__ */ e(
|
|
47
|
+
x,
|
|
48
|
+
{
|
|
49
|
+
cancelButton: n,
|
|
50
|
+
confirmButton: s,
|
|
51
|
+
modalRef: i
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
return t && i.isOpen ? M(
|
|
58
|
+
d(),
|
|
59
|
+
document.getElementById("portals") ?? document.body
|
|
60
|
+
) : i.isOpen ? d() : null;
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
P as Modal,
|
|
64
|
+
k as ModalConfirm
|
|
65
|
+
};
|
|
@@ -1 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Button as m } from "../../button/index.js";
|
|
3
|
+
import { Container as c } from "../../container/index.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
disabled: o,
|
|
6
|
+
id: i = "modal-confirm",
|
|
7
|
+
onCancel: t,
|
|
8
|
+
onConfirm: r = "submit",
|
|
9
|
+
txtCancel: d,
|
|
10
|
+
txtConfirm: a
|
|
11
|
+
}) => {
|
|
12
|
+
const n = r === "submit";
|
|
13
|
+
return /* @__PURE__ */ s(
|
|
14
|
+
c,
|
|
15
|
+
{
|
|
16
|
+
display: "flex",
|
|
17
|
+
gap: 0.75,
|
|
18
|
+
maxWidth: t ? "392px" : "190px",
|
|
19
|
+
mt: 1.5,
|
|
20
|
+
children: [
|
|
21
|
+
t ? /* @__PURE__ */ e(
|
|
22
|
+
m,
|
|
23
|
+
{
|
|
24
|
+
id: `${i}-cancel`,
|
|
25
|
+
justify: "center",
|
|
26
|
+
onClick: t,
|
|
27
|
+
variant: "tertiary",
|
|
28
|
+
width: "100%",
|
|
29
|
+
children: d ?? "Cancel"
|
|
30
|
+
}
|
|
31
|
+
) : void 0,
|
|
32
|
+
/* @__PURE__ */ e(
|
|
33
|
+
m,
|
|
34
|
+
{
|
|
35
|
+
disabled: o,
|
|
36
|
+
id: i,
|
|
37
|
+
justify: "center",
|
|
38
|
+
onClick: n ? void 0 : r,
|
|
39
|
+
type: n ? "submit" : "button",
|
|
40
|
+
variant: "primary",
|
|
41
|
+
width: "100%",
|
|
42
|
+
children: a ?? "Confirm"
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
l as ModalConfirm
|
|
51
|
+
};
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as s, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { isEmpty as C } from "lodash";
|
|
3
|
+
import { useCallback as d } from "react";
|
|
4
|
+
import { F as m } from "../../../styles-BZQOqe8p.mjs";
|
|
5
|
+
import { Button as h } from "../../button/index.js";
|
|
6
|
+
const j = ({
|
|
7
|
+
modalRef: l,
|
|
8
|
+
confirmButton: r = void 0,
|
|
9
|
+
cancelButton: i = void 0
|
|
10
|
+
}) => {
|
|
11
|
+
const { close: e } = l, p = d(() => {
|
|
12
|
+
i == null || i.onClick(), e();
|
|
13
|
+
}, [i, e]), a = d(() => {
|
|
14
|
+
r == null || r.onClick(), e();
|
|
15
|
+
}, [r, e]);
|
|
16
|
+
return [r, i].some(
|
|
17
|
+
(o) => !C(o)
|
|
18
|
+
) ? /* @__PURE__ */ s(m, { children: /* @__PURE__ */ x("div", { children: [
|
|
19
|
+
i && /* @__PURE__ */ s(h, { onClick: p, variant: "tertiary", width: "100%", children: i.text }),
|
|
20
|
+
r && /* @__PURE__ */ s(h, { onClick: a, variant: "primary", width: "100%", children: r.text })
|
|
21
|
+
] }) }) : null;
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
j as ModalFooter
|
|
25
|
+
};
|
|
@@ -1 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsxs as t, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { isString as l, isEmpty as f } from "lodash";
|
|
3
|
+
import { useCallback as h, useEffect as p } from "react";
|
|
4
|
+
import { useTheme as g } from "styled-components";
|
|
5
|
+
import { H as y, T as w } from "../../../styles-BZQOqe8p.mjs";
|
|
6
|
+
import { IconButton as u } from "../../icon-button/index.js";
|
|
7
|
+
import { Heading as x } from "../../typography/heading/index.js";
|
|
8
|
+
import "../../typography/span/index.js";
|
|
9
|
+
import { Text as k } from "../../typography/text/index.js";
|
|
10
|
+
const B = ({
|
|
11
|
+
title: o,
|
|
12
|
+
description: e,
|
|
13
|
+
modalRef: m,
|
|
14
|
+
otherActions: a,
|
|
15
|
+
onClose: r
|
|
16
|
+
}) => {
|
|
17
|
+
const c = g(), i = h(() => {
|
|
18
|
+
r == null || r(), m.close();
|
|
19
|
+
}, [m, r]);
|
|
20
|
+
return p(() => {
|
|
21
|
+
const s = (d) => {
|
|
22
|
+
d.key === "Escape" && i();
|
|
23
|
+
};
|
|
24
|
+
return window.addEventListener("keydown", s), () => {
|
|
25
|
+
window.removeEventListener("keydown", s);
|
|
26
|
+
};
|
|
27
|
+
}, [i]), /* @__PURE__ */ t(y, { children: [
|
|
28
|
+
/* @__PURE__ */ t(w, { children: [
|
|
29
|
+
typeof o == "string" ? /* @__PURE__ */ n(x, { fontWeight: "bold", lineSpacing: 1.75, mr: 1, size: "sm", children: o }) : o,
|
|
30
|
+
/* @__PURE__ */ t("div", { className: "flex", children: [
|
|
31
|
+
a,
|
|
32
|
+
/* @__PURE__ */ n(
|
|
33
|
+
u,
|
|
34
|
+
{
|
|
35
|
+
icon: "close",
|
|
36
|
+
iconColor: c.palette.gray[300],
|
|
37
|
+
iconSize: "xs",
|
|
38
|
+
iconType: "fa-light",
|
|
39
|
+
id: "modal-close",
|
|
40
|
+
onClick: i,
|
|
41
|
+
variant: "ghost"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] })
|
|
45
|
+
] }),
|
|
46
|
+
e && l(e) && !f(e) ? /* @__PURE__ */ n(k, { mt: 0.5, size: "sm", children: e }) : e
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
B as ModalHeader
|
|
51
|
+
};
|
|
@@ -1,5 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as p } from "react";
|
|
3
|
+
import { styled as c, useTheme as d } from "styled-components";
|
|
4
|
+
import { Container as f } from "../container/index.js";
|
|
5
|
+
import { Icon as r } from "../icon/index.js";
|
|
6
|
+
import { IconButton as g } from "../icon-button/index.js";
|
|
7
|
+
import { Heading as x } from "../typography/heading/index.js";
|
|
8
|
+
import "../typography/span/index.js";
|
|
9
|
+
import { Text as $ } from "../typography/text/index.js";
|
|
10
|
+
const u = c.div`
|
|
11
|
+
${({ theme: i, $variant: o }) => `
|
|
12
|
+
background: ${i.palette.white};
|
|
13
|
+
border: 1px solid ${i.palette.gray[200]};
|
|
14
|
+
border-radius: ${i.spacing[0.25]};
|
|
15
|
+
border-left: 4px solid ${i.palette[o][500]};
|
|
16
|
+
box-shadow: ${i.shadows.md};
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
width: 360px;
|
|
20
|
+
padding: ${i.spacing[1.25]} ${i.spacing[1]} ${i.spacing[1.25]} ${i.spacing[0.75]};
|
|
21
|
+
gap: ${i.spacing[0.5]};
|
|
22
|
+
|
|
23
|
+
button {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 20px;
|
|
26
|
+
right: 16px;
|
|
27
|
+
}
|
|
28
|
+
`}
|
|
29
|
+
`, m = c.div`
|
|
30
|
+
${({ theme: i, $variant: o }) => `
|
|
31
|
+
height: ${i.spacing[2.5]};
|
|
32
|
+
width: ${i.spacing[2.5]};
|
|
33
|
+
position: relative;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
|
|
36
|
+
& .ellipse-1,
|
|
37
|
+
& .ellipse-2,
|
|
38
|
+
& .icon {
|
|
39
|
+
top: 50%;
|
|
40
|
+
left: 50%;
|
|
41
|
+
transform: translate(-50%, -50%);
|
|
42
|
+
position: absolute;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
& .ellipse-1 {
|
|
46
|
+
transform: scale(2.5) translate(-20%, -20%);
|
|
47
|
+
color: ${i.palette[o][50]};
|
|
48
|
+
position: absolute;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& .ellipse-2 {
|
|
52
|
+
transform: scale(2) translate(-25%, -25%);
|
|
53
|
+
color: ${i.palette[o][200]};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& .icon {
|
|
57
|
+
color: ${i.palette[o][500]};
|
|
58
|
+
}
|
|
59
|
+
`}
|
|
60
|
+
`, b = (i) => i === "warning" ? "triangle-exclamation" : i === "info" ? "circle-info" : i === "success" ? "circle-check" : "circle-exclamation", N = ({
|
|
61
|
+
description: i,
|
|
62
|
+
onClose: o,
|
|
63
|
+
title: s,
|
|
64
|
+
variant: n
|
|
65
|
+
}) => {
|
|
66
|
+
const l = d(), a = p(() => {
|
|
67
|
+
o == null || o();
|
|
68
|
+
}, [o]);
|
|
69
|
+
return /* @__PURE__ */ e(
|
|
70
|
+
u,
|
|
71
|
+
{
|
|
72
|
+
$variant: n,
|
|
73
|
+
className: `notification notification__${n}`,
|
|
74
|
+
role: "alertdialog",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ e(m, { $variant: n, children: [
|
|
77
|
+
/* @__PURE__ */ t(r, { icon: "circle", iconClass: "ellipse-1", iconSize: "xs" }),
|
|
78
|
+
/* @__PURE__ */ t(r, { icon: "circle", iconClass: "ellipse-2", iconSize: "xs" }),
|
|
79
|
+
/* @__PURE__ */ t(
|
|
80
|
+
r,
|
|
81
|
+
{
|
|
82
|
+
icon: b(n),
|
|
83
|
+
iconClass: "icon",
|
|
84
|
+
iconSize: "xs",
|
|
85
|
+
iconType: "fa-light"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ e(f, { pr: 1.5, children: [
|
|
90
|
+
/* @__PURE__ */ t(x, { fontWeight: "bold", size: "xs", children: s }),
|
|
91
|
+
/* @__PURE__ */ t($, { size: "sm", whiteSpace: "break-spaces", wordWrap: "break-word", children: i })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ t(
|
|
94
|
+
g,
|
|
95
|
+
{
|
|
96
|
+
height: "fit-content",
|
|
97
|
+
icon: "close",
|
|
98
|
+
iconColor: l.palette.gray[400],
|
|
99
|
+
iconSize: "xs",
|
|
100
|
+
iconType: "fa-light",
|
|
101
|
+
onClick: a,
|
|
102
|
+
px: 0.125,
|
|
103
|
+
py: 0.125,
|
|
104
|
+
variant: "ghost"
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
export {
|
|
112
|
+
N as Notification
|
|
113
|
+
};
|
|
@@ -1,10 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { styled as n } from "styled-components";
|
|
4
|
+
import { B as c } from "../../styles-CplEd2kw.mjs";
|
|
5
|
+
const f = n(
|
|
6
|
+
c
|
|
7
|
+
)`
|
|
8
|
+
${({ theme: t, $variant: i }) => `
|
|
9
|
+
align-items: center;
|
|
10
|
+
background: ${i === "error" ? t.palette.primary[400] : t.palette.warning[500]};
|
|
11
|
+
border-radius: 100%;
|
|
12
|
+
font-family: ${t.typography.type.primary};
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding: 0;
|
|
15
|
+
position: absolute;
|
|
16
|
+
z-index: 11;
|
|
17
|
+
width: ${t.spacing[0.5]};
|
|
18
|
+
height: ${t.spacing[0.5]};
|
|
19
|
+
`}
|
|
20
|
+
`, d = n.div`
|
|
4
21
|
align-items: center;
|
|
5
|
-
color: ${({theme:
|
|
22
|
+
color: ${({ theme: t }) => t.palette.white};
|
|
6
23
|
display: flex;
|
|
7
24
|
font-size: 6px;
|
|
8
|
-
font-weight: ${({theme:
|
|
25
|
+
font-weight: ${({ theme: t }) => t.typography.weight.bold};
|
|
9
26
|
justify-content: center;
|
|
10
|
-
`,
|
|
27
|
+
`, $ = s(function({
|
|
28
|
+
numberIndicator: i,
|
|
29
|
+
show: r,
|
|
30
|
+
variant: e = "error",
|
|
31
|
+
...a
|
|
32
|
+
}, p) {
|
|
33
|
+
return /* @__PURE__ */ o(
|
|
34
|
+
f,
|
|
35
|
+
{
|
|
36
|
+
$variant: e,
|
|
37
|
+
className: r ? "flex" : "hidden",
|
|
38
|
+
"data-testid": "notification-sign",
|
|
39
|
+
ref: p,
|
|
40
|
+
...a,
|
|
41
|
+
children: i && /* @__PURE__ */ o(d, { children: i <= 9 ? i : 9 })
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
$ as NotificationSign
|
|
47
|
+
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { toNumber as d, isEmpty as k } from "lodash";
|
|
3
|
+
import { forwardRef as T, useState as C, useCallback as s } from "react";
|
|
4
|
+
import { styled as f } from "styled-components";
|
|
5
|
+
import { T as $ } from "../../index-DwznImvK.mjs";
|
|
6
|
+
const S = f.div`
|
|
2
7
|
width: fit-content;
|
|
3
|
-
border: ${({theme:e})
|
|
8
|
+
border: ${({ theme: e }) => `1px solid ${e.palette.gray[300]}`};
|
|
4
9
|
border-radius: 4px;
|
|
5
10
|
background: none;
|
|
6
|
-
color: ${({theme:e})=>e.palette.black};
|
|
7
|
-
font-family: ${({theme:e})=>e.typography.type.primary};
|
|
8
|
-
font-size: ${({theme:e})=>e.typography.text.md};
|
|
11
|
+
color: ${({ theme: e }) => e.palette.black};
|
|
12
|
+
font-family: ${({ theme: e }) => e.typography.type.primary};
|
|
13
|
+
font-size: ${({ theme: e }) => e.typography.text.md};
|
|
9
14
|
height: 40px;
|
|
10
15
|
display: flex;
|
|
11
16
|
align-items: center;
|
|
12
17
|
justify-content: center;
|
|
13
18
|
padding: 0.5em;
|
|
14
|
-
`,
|
|
19
|
+
`, F = f.input`
|
|
15
20
|
width: 4em;
|
|
16
21
|
appearance: textfield;
|
|
17
22
|
border-style: none;
|
|
@@ -31,4 +36,54 @@
|
|
|
31
36
|
&::-webkit-inner-spin-button {
|
|
32
37
|
opacity: 1;
|
|
33
38
|
}
|
|
34
|
-
`,
|
|
39
|
+
`, K = T(function({
|
|
40
|
+
autoUpdate: c = !1,
|
|
41
|
+
decimalPlaces: b = 0,
|
|
42
|
+
defaultValue: p = 0,
|
|
43
|
+
max: o,
|
|
44
|
+
min: n,
|
|
45
|
+
name: m,
|
|
46
|
+
onEnter: a,
|
|
47
|
+
tooltipMessage: y,
|
|
48
|
+
...h
|
|
49
|
+
}, x) {
|
|
50
|
+
const r = b < 0 ? 0 : b, [g, u] = C(Number(p).toFixed(r)), N = s(
|
|
51
|
+
(t) => {
|
|
52
|
+
const i = d(t.target.value);
|
|
53
|
+
t.target.value.endsWith(".") ? u(t.target.value) : i >= Number(n) && i <= Number(o) && (u(String(i)), c && a(d(i.toFixed(r)))), t.stopPropagation();
|
|
54
|
+
},
|
|
55
|
+
[c, r, o, n, a]
|
|
56
|
+
), I = s(
|
|
57
|
+
(t) => {
|
|
58
|
+
t.currentTarget.contains(t.relatedTarget) || u(Number(p).toFixed(r)), t.stopPropagation();
|
|
59
|
+
},
|
|
60
|
+
[r, p]
|
|
61
|
+
), w = s(
|
|
62
|
+
(t) => {
|
|
63
|
+
t.stopPropagation(), t.key === "Enter" && !k(t.currentTarget.value) && a(d(t.currentTarget.value));
|
|
64
|
+
},
|
|
65
|
+
[a]
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ l(S, { onBlur: I, tabIndex: -1, children: /* @__PURE__ */ l($, { id: "numberInputTooltip", tip: y, children: /* @__PURE__ */ l(
|
|
68
|
+
F,
|
|
69
|
+
{
|
|
70
|
+
...h,
|
|
71
|
+
"aria-label": m,
|
|
72
|
+
"aria-valuemax": Number(o),
|
|
73
|
+
"aria-valuemin": Number(n),
|
|
74
|
+
"aria-valuenow": Number(g),
|
|
75
|
+
max: o,
|
|
76
|
+
min: n,
|
|
77
|
+
name: m,
|
|
78
|
+
onChange: N,
|
|
79
|
+
onKeyUp: w,
|
|
80
|
+
ref: x,
|
|
81
|
+
step: 10 ** -r,
|
|
82
|
+
type: "number",
|
|
83
|
+
value: g
|
|
84
|
+
}
|
|
85
|
+
) }) });
|
|
86
|
+
});
|
|
87
|
+
export {
|
|
88
|
+
K as NumberInput
|
|
89
|
+
};
|