@fluidattacks/design 3.1.12 → 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/components/@core/index.js +2 -2
- package/dist/components/accordion/accordion-content/index.js +18 -5
- package/dist/components/accordion/index.js +71 -14
- package/dist/components/alert/index.js +108 -57
- package/dist/components/button/index.js +64 -13
- package/dist/components/card/card-header/index.js +78 -9
- package/dist/components/card/card-with-image/index.js +88 -13
- package/dist/components/card/card-with-input/index.js +72 -23
- package/dist/components/card/card-with-selector/index.js +63 -8
- package/dist/components/card/card-with-switch/index.js +46 -8
- package/dist/components/carousel/index.js +54 -28
- package/dist/components/checkbox/index.js +66 -32
- package/dist/components/cloud-image/index.js +2 -2
- package/dist/components/code-snippet/index.js +64 -19
- package/dist/components/code-snippet/location-code/index.js +146 -100
- package/dist/components/colors/index.js +220 -5
- package/dist/components/confirm-dialog/index.js +41 -18
- package/dist/components/container/index.js +39 -15
- package/dist/components/content-card/category-tag/index.js +37 -8
- package/dist/components/content-card/event-date/index.js +53 -10
- package/dist/components/content-card/index.js +118 -13
- package/dist/components/content-card-carousel/index.js +87 -7
- package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
- package/dist/components/divider/index.js +22 -7
- package/dist/components/empty-state/empty-button/index.js +4 -4
- package/dist/components/empty-state/index.js +52 -15
- package/dist/components/file-preview/index.js +28 -12
- package/dist/components/form/index.js +46 -9
- package/dist/components/grid-container/index.js +31 -11
- package/dist/components/group-selector/index.js +126 -17
- package/dist/components/group-selector/option-container/index.js +1 -1
- package/dist/components/icon/index.js +78 -18
- package/dist/components/icon-button/index.js +63 -14
- package/dist/components/indicator-card/index.js +70 -11
- package/dist/components/info-sidebar/index.js +107 -7
- package/dist/components/inputs/fields/combobox/index.js +141 -21
- package/dist/components/inputs/fields/combobox/option/index.js +1 -1
- package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
- package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
- package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
- package/dist/components/inputs/fields/date/calendar/index.js +26 -11
- package/dist/components/inputs/fields/date/index.js +65 -15
- package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
- package/dist/components/inputs/fields/date-range/index.js +98 -18
- package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
- package/dist/components/inputs/fields/date-time/index.js +65 -14
- package/dist/components/inputs/fields/editable/index.js +22 -10
- package/dist/components/inputs/fields/input/index.js +74 -10
- package/dist/components/inputs/fields/input-file/index.js +114 -21
- package/dist/components/inputs/fields/input-tags/index.js +60 -11
- package/dist/components/inputs/fields/number/index.js +54 -7
- package/dist/components/inputs/fields/number-range/index.js +46 -8
- package/dist/components/inputs/fields/phone/index.js +446 -286
- package/dist/components/inputs/fields/text-area/index.js +78 -10
- package/dist/components/inputs/label/index.js +34 -8
- package/dist/components/inputs/outline-container/index.js +98 -12
- package/dist/components/inputs/utils/action-button/index.js +28 -7
- package/dist/components/inputs/utils/calendar-button/index.js +34 -10
- package/dist/components/inputs/utils/date-selector/index.js +60 -6
- package/dist/components/inputs/utils/date-time-field/index.js +129 -28
- package/dist/components/inputs/utils/dialog/index.js +10 -7
- package/dist/components/inputs/utils/number-field/index.js +81 -8
- package/dist/components/inputs/utils/popover/index.js +41 -10
- package/dist/components/interactive-card/icon/index.js +1 -1
- package/dist/components/interactive-card/index.js +110 -7
- package/dist/components/language-selector/index.js +34 -10
- package/dist/components/language-selector/item-list/index.js +1 -1
- package/dist/components/link/index.js +71 -17
- package/dist/components/list-item/index.js +64 -13
- package/dist/components/little-flag/index.js +26 -9
- package/dist/components/loading/index.js +48 -21
- package/dist/components/logo/index.js +10 -4
- package/dist/components/logo-carousel/index.js +40 -5
- package/dist/components/lottie/index.js +12 -7
- package/dist/components/menu/index.js +53 -9
- package/dist/components/message-banner/index.js +79 -13
- package/dist/components/modal/index.js +59 -13
- package/dist/components/modal/modal-confirm/index.js +48 -7
- package/dist/components/modal/modal-footer/index.js +22 -13
- package/dist/components/modal/modal-header/index.js +45 -19
- package/dist/components/notification/index.js +65 -20
- package/dist/components/notification-sign/index.js +27 -10
- package/dist/components/number-input/index.js +58 -21
- package/dist/components/oauth-selector/index.js +97 -23
- package/dist/components/oauth-selector/option-container/index.js +68 -7
- package/dist/components/plan-card/index.js +99 -28
- package/dist/components/plan-card/recommended-tag/index.js +23 -2
- package/dist/components/pop-up/description/index.js +47 -9
- package/dist/components/pop-up/index.js +146 -17
- package/dist/components/premium-feature/index.js +56 -16
- package/dist/components/priority-score/index.js +24 -9
- package/dist/components/progress/index.js +30 -17
- package/dist/components/progress-bar/index.js +99 -41
- package/dist/components/radio-button/index.js +64 -27
- package/dist/components/scroll-button/index.js +33 -15
- package/dist/components/search/index.js +77 -35
- package/dist/components/search-bar/index.js +211 -24
- package/dist/components/search-bar/item-searching/index.js +1 -1
- package/dist/components/severity-badge/index.js +66 -6
- package/dist/components/severity-overview/badge/index.js +62 -11
- package/dist/components/severity-overview/index.js +15 -5
- package/dist/components/show-on-hover/index.js +16 -10
- package/dist/components/slide-out-menu/index.js +2611 -1164
- package/dist/components/slide-out-menu/menu-item/index.js +58 -6
- package/dist/components/slider/index.js +79 -48
- package/dist/components/slider/thumb/index.js +13 -6
- package/dist/components/step-lapse/index.js +81 -23
- package/dist/components/table-button/index.js +65 -24
- package/dist/components/tabs/fixed-tabs/index.js +24 -4
- package/dist/components/tabs/index.js +54 -11
- package/dist/components/tabs/tab/index.js +37 -6
- package/dist/components/tag/index.js +95 -27
- package/dist/components/timeline/card/index.js +1 -1
- package/dist/components/timeline/index.js +15 -5
- package/dist/components/toggle/index.js +65 -25
- package/dist/components/toggle-buttons/index.js +51 -22
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tour/index.js +3897 -1829
- package/dist/components/typography/heading/index.js +43 -5
- package/dist/components/typography/span/index.js +38 -6
- package/dist/components/typography/text/index.js +44 -6
- package/dist/components/web-form/index.js +28 -19
- package/dist/hooks/index.js +5 -5
- 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 +11 -11
- package/dist/styles-B2N0JLw1.mjs +114 -0
- package/dist/styles-B64DVBIF.mjs +115 -0
- package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
- package/dist/styles-BZQOqe8p.mjs +141 -0
- package/dist/styles-Bdque9TT.mjs +65 -0
- package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
- package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
- 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/index-38JqtnAI.mjs +0 -122
- package/dist/index-B5yoGFs6.mjs +0 -54
- package/dist/index-BLbKylyw.mjs +0 -209
- package/dist/index-Bu448Tz2.mjs +0 -106
- package/dist/index-BwFnfaRh.mjs +0 -2310
- package/dist/index-Co_k0WFk.mjs +0 -75
- package/dist/index-Cu7uUMlx.mjs +0 -82
- package/dist/index-D-lcuEHY.mjs +0 -1018
- package/dist/index-DrfjITyT.mjs +0 -61
- package/dist/styles-7_q7nHce.mjs +0 -110
- package/dist/styles-BA0WIQL-.mjs +0 -74
- package/dist/styles-C3cZmKVJ.mjs +0 -131
- package/dist/styles-D85YYIjM.mjs +0 -131
- package/dist/styles-EIbGRPlk.mjs +0 -106
- package/dist/styles-Q1VXuWI7.mjs +0 -65
- package/dist/styles-fH2c4cfc.mjs +0 -77
- package/dist/use-carousel-CvRxi2FI.mjs +0 -17
- package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
- package/dist/use-modal-CkrZ-_-M.mjs +0 -14
- package/dist/use-search-DpLNvt7Q.mjs +0 -12
- package/dist/utils-CQvBF-wY.mjs +0 -4
|
@@ -1,25 +1,51 @@
|
|
|
1
|
-
import { jsxs as t, jsx as
|
|
2
|
-
import { isString as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { useTheme as
|
|
5
|
-
import { H as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { Heading as
|
|
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
8
|
import "../../typography/span/index.js";
|
|
9
|
-
import { Text as
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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();
|
|
17
23
|
};
|
|
18
|
-
return window.addEventListener("keydown",
|
|
19
|
-
window.removeEventListener("keydown",
|
|
24
|
+
return window.addEventListener("keydown", s), () => {
|
|
25
|
+
window.removeEventListener("keydown", s);
|
|
20
26
|
};
|
|
21
|
-
}, [
|
|
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
|
+
] });
|
|
22
48
|
};
|
|
23
49
|
export {
|
|
24
|
-
|
|
50
|
+
B as ModalHeader
|
|
25
51
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as p } from "react";
|
|
3
|
-
import { styled as
|
|
4
|
-
import { Container as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { Heading as
|
|
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
8
|
import "../typography/span/index.js";
|
|
9
9
|
import { Text as $ } from "../typography/text/index.js";
|
|
10
|
-
const
|
|
11
|
-
${({ theme: i, $variant:
|
|
10
|
+
const u = c.div`
|
|
11
|
+
${({ theme: i, $variant: o }) => `
|
|
12
12
|
background: ${i.palette.white};
|
|
13
13
|
border: 1px solid ${i.palette.gray[200]};
|
|
14
14
|
border-radius: ${i.spacing[0.25]};
|
|
15
|
-
border-left: 4px solid ${i.palette[
|
|
15
|
+
border-left: 4px solid ${i.palette[o][500]};
|
|
16
16
|
box-shadow: ${i.shadows.md};
|
|
17
17
|
position: relative;
|
|
18
18
|
display: flex;
|
|
@@ -26,8 +26,8 @@ const h = s.div`
|
|
|
26
26
|
right: 16px;
|
|
27
27
|
}
|
|
28
28
|
`}
|
|
29
|
-
`,
|
|
30
|
-
${({ theme: i, $variant:
|
|
29
|
+
`, m = c.div`
|
|
30
|
+
${({ theme: i, $variant: o }) => `
|
|
31
31
|
height: ${i.spacing[2.5]};
|
|
32
32
|
width: ${i.spacing[2.5]};
|
|
33
33
|
position: relative;
|
|
@@ -44,25 +44,70 @@ const h = s.div`
|
|
|
44
44
|
|
|
45
45
|
& .ellipse-1 {
|
|
46
46
|
transform: scale(2.5) translate(-20%, -20%);
|
|
47
|
-
color: ${i.palette[
|
|
47
|
+
color: ${i.palette[o][50]};
|
|
48
48
|
position: absolute;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
& .ellipse-2 {
|
|
52
52
|
transform: scale(2) translate(-25%, -25%);
|
|
53
|
-
color: ${i.palette[
|
|
53
|
+
color: ${i.palette[o][200]};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
& .icon {
|
|
57
|
-
color: ${i.palette[
|
|
57
|
+
color: ${i.palette[o][500]};
|
|
58
58
|
}
|
|
59
59
|
`}
|
|
60
|
-
`, b = (i) => i === "warning" ? "triangle-exclamation" : i === "info" ? "circle-info" : i === "success" ? "circle-check" : "circle-exclamation",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
);
|
|
65
110
|
};
|
|
66
111
|
export {
|
|
67
|
-
|
|
112
|
+
N as Notification
|
|
68
113
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
|
-
import { styled as
|
|
4
|
-
import { B as
|
|
5
|
-
const
|
|
6
|
-
|
|
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 }) => `
|
|
7
9
|
align-items: center;
|
|
8
|
-
background: ${
|
|
10
|
+
background: ${i === "error" ? t.palette.primary[400] : t.palette.warning[500]};
|
|
9
11
|
border-radius: 100%;
|
|
10
12
|
font-family: ${t.typography.type.primary};
|
|
11
13
|
justify-content: center;
|
|
@@ -15,16 +17,31 @@ const d = i(p)`
|
|
|
15
17
|
width: ${t.spacing[0.5]};
|
|
16
18
|
height: ${t.spacing[0.5]};
|
|
17
19
|
`}
|
|
18
|
-
`,
|
|
20
|
+
`, d = n.div`
|
|
19
21
|
align-items: center;
|
|
20
22
|
color: ${({ theme: t }) => t.palette.white};
|
|
21
23
|
display: flex;
|
|
22
24
|
font-size: 6px;
|
|
23
25
|
font-weight: ${({ theme: t }) => t.typography.weight.bold};
|
|
24
26
|
justify-content: center;
|
|
25
|
-
`,
|
|
26
|
-
|
|
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
|
+
);
|
|
27
44
|
});
|
|
28
45
|
export {
|
|
29
|
-
|
|
46
|
+
$ as NotificationSign
|
|
30
47
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { toNumber as d, isEmpty as k } from "lodash";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { styled as
|
|
5
|
-
import { T as $ } from "../../index-
|
|
6
|
-
const
|
|
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`
|
|
7
7
|
width: fit-content;
|
|
8
|
-
border: ${({ theme:
|
|
8
|
+
border: ${({ theme: e }) => `1px solid ${e.palette.gray[300]}`};
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
background: none;
|
|
11
|
-
color: ${({ theme:
|
|
12
|
-
font-family: ${({ theme:
|
|
13
|
-
font-size: ${({ theme:
|
|
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};
|
|
14
14
|
height: 40px;
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
padding: 0.5em;
|
|
19
|
-
`,
|
|
19
|
+
`, F = f.input`
|
|
20
20
|
width: 4em;
|
|
21
21
|
appearance: textfield;
|
|
22
22
|
border-style: none;
|
|
@@ -36,17 +36,54 @@ const P = g.div`
|
|
|
36
36
|
&::-webkit-inner-spin-button {
|
|
37
37
|
opacity: 1;
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
+
) }) });
|
|
49
86
|
});
|
|
50
87
|
export {
|
|
51
|
-
|
|
88
|
+
K as NumberInput
|
|
52
89
|
};
|
|
@@ -1,26 +1,100 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as y, useRef as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { OptionContainer as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Container as
|
|
7
|
-
import { u as j } from "../../use-click-outside-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
(
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as w, useCallback as n } from "react";
|
|
3
|
+
import { useTheme as I } from "styled-components";
|
|
4
|
+
import { OptionContainer as d } from "./option-container/index.js";
|
|
5
|
+
import { Button as S } from "../button/index.js";
|
|
6
|
+
import { Container as a } from "../container/index.js";
|
|
7
|
+
import { u as j } from "../../use-click-outside-BUll8Ag-.mjs";
|
|
8
|
+
const O = ({
|
|
9
|
+
align: f = "end",
|
|
10
|
+
buttonLabel: p = "Add Credential",
|
|
11
|
+
children: m,
|
|
12
|
+
id: u,
|
|
13
|
+
manualOption: t,
|
|
14
|
+
providers: i
|
|
15
|
+
}) => {
|
|
16
|
+
const h = I(), [x, o] = y(!1), s = w(null);
|
|
17
|
+
j(
|
|
18
|
+
s.current,
|
|
19
|
+
() => {
|
|
20
|
+
o(!1);
|
|
21
|
+
},
|
|
22
|
+
!0
|
|
23
|
+
);
|
|
24
|
+
const C = n(
|
|
25
|
+
(e) => {
|
|
26
|
+
t == null || t.onClick(e), o(!1);
|
|
27
|
+
},
|
|
28
|
+
[t]
|
|
29
|
+
), b = n(() => {
|
|
30
|
+
o((e) => !e);
|
|
31
|
+
}, [o]), k = n(
|
|
32
|
+
(e) => (g) => {
|
|
33
|
+
var r;
|
|
34
|
+
(r = i[e]) == null || r.onClick(g), o(!1);
|
|
35
|
+
},
|
|
36
|
+
[i]
|
|
37
|
+
);
|
|
38
|
+
return /* @__PURE__ */ c(
|
|
39
|
+
a,
|
|
40
|
+
{
|
|
41
|
+
alignItems: f,
|
|
42
|
+
display: "flex",
|
|
43
|
+
flexDirection: "column",
|
|
44
|
+
position: "relative",
|
|
45
|
+
ref: s,
|
|
46
|
+
width: "max-content",
|
|
47
|
+
zIndex: 10,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ l(S, { icon: "plus", onClick: b, variant: "primary", children: p }),
|
|
50
|
+
/* @__PURE__ */ c(
|
|
51
|
+
a,
|
|
52
|
+
{
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
bgColor: "#fff",
|
|
55
|
+
border: `1px solid ${h.palette.gray[200]}`,
|
|
56
|
+
borderRadius: "4px",
|
|
57
|
+
display: "flex",
|
|
58
|
+
gap: 0.5,
|
|
59
|
+
height: "78px",
|
|
60
|
+
id: u,
|
|
61
|
+
pb: 0.5,
|
|
62
|
+
pl: 0.75,
|
|
63
|
+
position: "absolute",
|
|
64
|
+
pr: 0.75,
|
|
65
|
+
pt: 0.5,
|
|
66
|
+
shadow: "md",
|
|
67
|
+
top: "40px",
|
|
68
|
+
visibility: x ? "visible" : "hidden",
|
|
69
|
+
zIndex: 10,
|
|
70
|
+
children: [
|
|
71
|
+
Object.keys(i).map(
|
|
72
|
+
(e) => /* @__PURE__ */ l(
|
|
73
|
+
d,
|
|
74
|
+
{
|
|
75
|
+
onClick: k(e),
|
|
76
|
+
provider: e
|
|
77
|
+
},
|
|
78
|
+
e
|
|
79
|
+
)
|
|
80
|
+
),
|
|
81
|
+
t === void 0 ? void 0 : /* @__PURE__ */ l(
|
|
82
|
+
d,
|
|
83
|
+
{
|
|
84
|
+
icon: "square-plus",
|
|
85
|
+
label: t.label ?? "Add manually",
|
|
86
|
+
onClick: C
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
m
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
22
96
|
};
|
|
23
97
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
98
|
+
O as OAuthSelector,
|
|
99
|
+
d as OptionContainer
|
|
26
100
|
};
|
|
@@ -1,15 +1,76 @@
|
|
|
1
1
|
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { M as
|
|
2
|
+
import { useTheme as m } from "styled-components";
|
|
3
|
+
import { M as s } from "../../../index-maWH3JYC.mjs";
|
|
4
4
|
import { Container as i } from "../../container/index.js";
|
|
5
|
-
import { Icon as
|
|
5
|
+
import { Icon as c } from "../../icon/index.js";
|
|
6
6
|
import "../../typography/heading/index.js";
|
|
7
7
|
import "../../typography/span/index.js";
|
|
8
8
|
import { Text as g } from "../../typography/text/index.js";
|
|
9
|
-
const h = {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const h = {
|
|
10
|
+
Azure: "integrates/autoenrollment/azureIcon",
|
|
11
|
+
Bitbucket: "integrates/autoenrollment/bitbucketLogo",
|
|
12
|
+
GitHub: "integrates/autoenrollment/githubLogo",
|
|
13
|
+
GitLab: "integrates/autoenrollment/gitlabIcon"
|
|
14
|
+
}, z = ({
|
|
15
|
+
icon: o,
|
|
16
|
+
label: a,
|
|
17
|
+
onClick: l,
|
|
18
|
+
onlyLabel: r = !1,
|
|
19
|
+
provider: t = "GitLab"
|
|
20
|
+
}) => {
|
|
21
|
+
const n = m();
|
|
22
|
+
return /* @__PURE__ */ p(
|
|
23
|
+
i,
|
|
24
|
+
{
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
bgColorHover: n.palette.gray[100],
|
|
27
|
+
borderRadius: "4px",
|
|
28
|
+
cursor: "pointer",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
gap: 0.25,
|
|
32
|
+
height: "62px",
|
|
33
|
+
justify: "center",
|
|
34
|
+
minWidth: "64px",
|
|
35
|
+
onClick: l,
|
|
36
|
+
pb: 0.5,
|
|
37
|
+
pl: 0.25,
|
|
38
|
+
pr: 0.25,
|
|
39
|
+
pt: 0.5,
|
|
40
|
+
children: [
|
|
41
|
+
r ? !1 : /* @__PURE__ */ e(i, { height: "24px", width: "24px", children: o === void 0 ? /* @__PURE__ */ e(
|
|
42
|
+
s,
|
|
43
|
+
{
|
|
44
|
+
alt: `${t} Logo`,
|
|
45
|
+
height: "100%",
|
|
46
|
+
publicId: h[t],
|
|
47
|
+
width: "100%"
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ e(
|
|
50
|
+
c,
|
|
51
|
+
{
|
|
52
|
+
icon: o,
|
|
53
|
+
iconColor: "#000",
|
|
54
|
+
iconSize: "sm",
|
|
55
|
+
iconType: "fa-light"
|
|
56
|
+
}
|
|
57
|
+
) }),
|
|
58
|
+
/* @__PURE__ */ e(i, { alignItems: "center", display: "flex", minWidth: "24px", children: /* @__PURE__ */ e(
|
|
59
|
+
g,
|
|
60
|
+
{
|
|
61
|
+
color: n.palette.gray[800],
|
|
62
|
+
display: "inline",
|
|
63
|
+
size: "xs",
|
|
64
|
+
textAlign: "center",
|
|
65
|
+
whiteSpace: r ? "break-spaces" : "nowrap",
|
|
66
|
+
wordWrap: "unset",
|
|
67
|
+
children: a ?? t
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
);
|
|
12
73
|
};
|
|
13
74
|
export {
|
|
14
|
-
|
|
75
|
+
z as OptionContainer
|
|
15
76
|
};
|