@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,31 +1,218 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as y, useRef as
|
|
3
|
-
import { S as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { M as
|
|
6
|
-
import { theme as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Heading as
|
|
2
|
+
import { useState as y, useRef as x, useCallback as n } from "react";
|
|
3
|
+
import { S as $, a as D, b as H, c as T, d as m, I as u } from "../../index-BMHVi812.mjs";
|
|
4
|
+
import { Button as j } from "../button/index.js";
|
|
5
|
+
import { M as V } from "../../index-maWH3JYC.mjs";
|
|
6
|
+
import { theme as d } from "../colors/index.js";
|
|
7
|
+
import { Icon as b } from "../icon/index.js";
|
|
8
|
+
import { Heading as W } from "../typography/heading/index.js";
|
|
9
9
|
import "../typography/span/index.js";
|
|
10
10
|
import { Text as h } from "../typography/text/index.js";
|
|
11
|
-
import { u as
|
|
12
|
-
const F = [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
import { u as A } from "../../use-click-outside-BUll8Ag-.mjs";
|
|
12
|
+
const F = [
|
|
13
|
+
{
|
|
14
|
+
hit: {
|
|
15
|
+
slug: "/services/continuous-hacking/",
|
|
16
|
+
title: "Continuous Hacking"
|
|
17
|
+
},
|
|
18
|
+
icon: "infinity"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
hit: {
|
|
22
|
+
slug: "/platform/",
|
|
23
|
+
title: "Platform"
|
|
24
|
+
},
|
|
25
|
+
icon: "sidebar"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
hit: {
|
|
29
|
+
slug: "/plans/",
|
|
30
|
+
title: "Plans"
|
|
31
|
+
},
|
|
32
|
+
icon: "star-christmas"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
hit: {
|
|
36
|
+
slug: "/blog/",
|
|
37
|
+
title: "Blog"
|
|
38
|
+
},
|
|
39
|
+
icon: "pen-line"
|
|
40
|
+
}
|
|
41
|
+
], z = {
|
|
42
|
+
hit: {
|
|
43
|
+
slug: "/contact-us/",
|
|
44
|
+
title: "Contact Support"
|
|
45
|
+
},
|
|
46
|
+
icon: "envelope"
|
|
47
|
+
}, Y = ({
|
|
48
|
+
items: s,
|
|
49
|
+
placeholder: C = "Search",
|
|
50
|
+
refine: p,
|
|
51
|
+
query: I
|
|
52
|
+
}) => {
|
|
53
|
+
const [l, v] = y(I), [w, f] = y(!1), g = x(null), o = x(null), a = l.length >= 2, r = n(
|
|
54
|
+
(t) => {
|
|
55
|
+
v(t), p(t);
|
|
56
|
+
},
|
|
57
|
+
[p]
|
|
58
|
+
), c = n(() => {
|
|
16
59
|
r("");
|
|
17
|
-
}, [r]),
|
|
18
|
-
|
|
19
|
-
}, []),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
60
|
+
}, [r]), k = n(() => {
|
|
61
|
+
f(!0);
|
|
62
|
+
}, []), R = n(
|
|
63
|
+
(t) => {
|
|
64
|
+
r(t.currentTarget.value);
|
|
65
|
+
},
|
|
66
|
+
[r]
|
|
67
|
+
), N = n(
|
|
68
|
+
(t) => {
|
|
69
|
+
t.preventDefault(), t.stopPropagation(), c(), o.current && o.current.focus();
|
|
70
|
+
},
|
|
71
|
+
[c]
|
|
72
|
+
), B = n(
|
|
73
|
+
(t) => {
|
|
74
|
+
t.preventDefault(), t.stopPropagation(), o.current && o.current.blur();
|
|
75
|
+
},
|
|
76
|
+
[]
|
|
77
|
+
);
|
|
78
|
+
return A(
|
|
79
|
+
g.current,
|
|
80
|
+
() => {
|
|
81
|
+
c(), f(!1);
|
|
82
|
+
},
|
|
83
|
+
!0
|
|
84
|
+
), /* @__PURE__ */ i($, { ref: g, children: [
|
|
85
|
+
/* @__PURE__ */ i(
|
|
86
|
+
D,
|
|
87
|
+
{
|
|
88
|
+
action: "",
|
|
89
|
+
noValidate: !0,
|
|
90
|
+
onReset: N,
|
|
91
|
+
onSubmit: B,
|
|
92
|
+
role: "search",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ i("div", { className: "flex gap-2 w-full", children: [
|
|
95
|
+
/* @__PURE__ */ e("div", { className: "h-10 p-2", children: /* @__PURE__ */ e(
|
|
96
|
+
b,
|
|
97
|
+
{
|
|
98
|
+
icon: "magnifying-glass",
|
|
99
|
+
iconSize: "sm",
|
|
100
|
+
iconType: "fa-light"
|
|
101
|
+
}
|
|
102
|
+
) }),
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
H,
|
|
105
|
+
{
|
|
106
|
+
autoCapitalize: "off",
|
|
107
|
+
autoComplete: "off",
|
|
108
|
+
autoCorrect: "off",
|
|
109
|
+
maxLength: 512,
|
|
110
|
+
onChange: R,
|
|
111
|
+
onFocus: k,
|
|
112
|
+
placeholder: C,
|
|
113
|
+
ref: o,
|
|
114
|
+
spellCheck: !1,
|
|
115
|
+
type: "search",
|
|
116
|
+
value: l
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }),
|
|
120
|
+
a && /* @__PURE__ */ e(T, { type: "reset", children: /* @__PURE__ */ e(b, { icon: "xmark", iconSize: "sm", iconType: "fa-light" }) })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
w && l.length < 2 && /* @__PURE__ */ i(m, { children: [
|
|
125
|
+
/* @__PURE__ */ e(
|
|
126
|
+
h,
|
|
127
|
+
{
|
|
128
|
+
color: d.palette.gray[400],
|
|
129
|
+
fontWeight: "bold",
|
|
130
|
+
lineSpacing: 1.5,
|
|
131
|
+
size: "md",
|
|
132
|
+
sizeSm: "sm",
|
|
133
|
+
children: "Suggested"
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-start self-stretch", children: F.map(({ hit: t, icon: S }, P) => /* @__PURE__ */ e(
|
|
137
|
+
u,
|
|
138
|
+
{
|
|
139
|
+
hit: t,
|
|
140
|
+
icon: S,
|
|
141
|
+
showIcon: !0
|
|
142
|
+
},
|
|
143
|
+
`${S}-${P}`
|
|
144
|
+
)) }),
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
h,
|
|
147
|
+
{
|
|
148
|
+
color: d.palette.gray[400],
|
|
149
|
+
fontWeight: "bold",
|
|
150
|
+
lineSpacing: 1.5,
|
|
151
|
+
size: "md",
|
|
152
|
+
sizeSm: "sm",
|
|
153
|
+
children: "Can’t find what you’re looking for?"
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ e(
|
|
157
|
+
u,
|
|
158
|
+
{
|
|
159
|
+
hit: z.hit,
|
|
160
|
+
icon: z.icon,
|
|
161
|
+
showIcon: !0
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] }),
|
|
165
|
+
a && s.length > 0 && /* @__PURE__ */ i(m, { $showHits: a, children: [
|
|
166
|
+
/* @__PURE__ */ e(
|
|
167
|
+
h,
|
|
168
|
+
{
|
|
169
|
+
color: d.palette.gray[400],
|
|
170
|
+
fontWeight: "bold",
|
|
171
|
+
lineSpacing: 1.5,
|
|
172
|
+
size: "md",
|
|
173
|
+
sizeSm: "sm",
|
|
174
|
+
children: "Results"
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col items-start self-stretch", children: s.map((t) => /* @__PURE__ */ e(u, { hit: t }, t.objectID)) })
|
|
178
|
+
] }),
|
|
179
|
+
a && s.length === 0 && /* @__PURE__ */ e(m, { $empty: s.length === 0, children: /* @__PURE__ */ i("div", { className: "items-center flex flex-col gap-4 py-[90px] w-full", children: [
|
|
180
|
+
/* @__PURE__ */ e(
|
|
181
|
+
V,
|
|
182
|
+
{
|
|
183
|
+
height: 96,
|
|
184
|
+
publicId: "airs/search-bar/empty-state-icon",
|
|
185
|
+
width: 96
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ e(
|
|
189
|
+
W,
|
|
190
|
+
{
|
|
191
|
+
display: "flex",
|
|
192
|
+
size: "sm",
|
|
193
|
+
sizeSm: "xs",
|
|
194
|
+
textAlign: "center",
|
|
195
|
+
children: "No results found"
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ i(
|
|
199
|
+
h,
|
|
200
|
+
{
|
|
201
|
+
display: "flex",
|
|
202
|
+
lineSpacing: 1.5,
|
|
203
|
+
size: "md",
|
|
204
|
+
sizeSm: "sm",
|
|
205
|
+
textAlign: "center",
|
|
206
|
+
children: [
|
|
207
|
+
`“${l}” did not match.`,
|
|
208
|
+
/* @__PURE__ */ e("br", {}),
|
|
209
|
+
"Please try again."
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
/* @__PURE__ */ e(j, { onClick: c, variant: "secondary", children: "Clear search" })
|
|
214
|
+
] }) })
|
|
215
|
+
] });
|
|
29
216
|
};
|
|
30
217
|
export {
|
|
31
218
|
Y as SearchBar
|
|
@@ -1,14 +1,74 @@
|
|
|
1
1
|
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme as
|
|
2
|
+
import { useTheme as g } from "styled-components";
|
|
3
3
|
import { theme as e } from "../colors/index.js";
|
|
4
|
-
import { Container as
|
|
4
|
+
import { Container as t } from "../container/index.js";
|
|
5
5
|
import "../typography/heading/index.js";
|
|
6
6
|
import "../typography/span/index.js";
|
|
7
7
|
import { Text as a } from "../typography/text/index.js";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const m = {
|
|
9
|
+
critical: {
|
|
10
|
+
bgColor: e.palette.primary[700],
|
|
11
|
+
colorL: e.palette.gray[800],
|
|
12
|
+
colorR: e.palette.white
|
|
13
|
+
},
|
|
14
|
+
disable: {
|
|
15
|
+
bgColor: e.palette.gray[200],
|
|
16
|
+
colorL: e.palette.gray[400],
|
|
17
|
+
colorR: e.palette.gray[400]
|
|
18
|
+
},
|
|
19
|
+
high: {
|
|
20
|
+
bgColor: e.palette.error[500],
|
|
21
|
+
colorL: e.palette.gray[800],
|
|
22
|
+
colorR: e.palette.white
|
|
23
|
+
},
|
|
24
|
+
low: {
|
|
25
|
+
bgColor: e.palette.warning[200],
|
|
26
|
+
colorL: e.palette.gray[800],
|
|
27
|
+
colorR: e.palette.gray[800]
|
|
28
|
+
},
|
|
29
|
+
medium: {
|
|
30
|
+
bgColor: e.palette.warning[500],
|
|
31
|
+
colorL: e.palette.gray[800],
|
|
32
|
+
colorR: e.palette.gray[800]
|
|
33
|
+
}
|
|
34
|
+
}, u = ({
|
|
35
|
+
textL: r,
|
|
36
|
+
textR: p,
|
|
37
|
+
variant: i
|
|
38
|
+
}) => {
|
|
39
|
+
const n = g(), { bgColor: l, colorL: c, colorR: s } = m[i];
|
|
40
|
+
return /* @__PURE__ */ d(t, { alignItems: "flex-start", display: "inline-flex", children: [
|
|
41
|
+
r ? /* @__PURE__ */ o(
|
|
42
|
+
t,
|
|
43
|
+
{
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
bgColor: n.palette.white,
|
|
46
|
+
border: `1px solid ${l}`,
|
|
47
|
+
borderRadius: "4px 0px 0px 4px",
|
|
48
|
+
display: "flex",
|
|
49
|
+
justify: "center",
|
|
50
|
+
padding: [0, 0.25, 0, 0.25],
|
|
51
|
+
children: /* @__PURE__ */ o(a, { color: c, size: "xs", children: r })
|
|
52
|
+
}
|
|
53
|
+
) : void 0,
|
|
54
|
+
/* @__PURE__ */ o(
|
|
55
|
+
t,
|
|
56
|
+
{
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
bgColor: l,
|
|
59
|
+
border: `1px solid ${l}`,
|
|
60
|
+
borderRadius: r ? "0px 4px 4px 0px" : "4px",
|
|
61
|
+
display: "flex",
|
|
62
|
+
padding: r ? [0, 0.25, 0, 0.125] : [0, 0.25, 0, 0.25],
|
|
63
|
+
pb: 0.125,
|
|
64
|
+
pl: 0.125,
|
|
65
|
+
pr: 0.125,
|
|
66
|
+
pt: 0.125,
|
|
67
|
+
children: /* @__PURE__ */ o(a, { color: s, size: "xs", children: p })
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] });
|
|
11
71
|
};
|
|
12
72
|
export {
|
|
13
|
-
|
|
73
|
+
u as SeverityBadge
|
|
14
74
|
};
|
|
@@ -1,18 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { capitalize as m } from "lodash";
|
|
3
3
|
import { theme as e } from "../../colors/index.js";
|
|
4
|
-
import { Container as
|
|
5
|
-
import { T as
|
|
4
|
+
import { Container as c } from "../../container/index.js";
|
|
5
|
+
import { T as x } from "../../../index-DwznImvK.mjs";
|
|
6
6
|
import "../../typography/heading/index.js";
|
|
7
7
|
import "../../typography/span/index.js";
|
|
8
|
-
import { Text as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import { Text as a } from "../../typography/text/index.js";
|
|
9
|
+
const h = (t, o) => {
|
|
10
|
+
const r = {
|
|
11
|
+
critical: e.palette.primary[700],
|
|
12
|
+
high: e.palette.error[500],
|
|
13
|
+
low: e.palette.warning[200],
|
|
14
|
+
medium: e.palette.warning[500],
|
|
15
|
+
none: e.palette.gray[200]
|
|
16
|
+
}, i = {
|
|
17
|
+
disabled: e.palette.gray[400],
|
|
18
|
+
enabled: e.palette.gray[800]
|
|
19
|
+
}, l = {
|
|
20
|
+
critical: e.palette.white,
|
|
21
|
+
high: e.palette.white,
|
|
22
|
+
low: e.palette.gray[800],
|
|
23
|
+
medium: e.palette.gray[800],
|
|
24
|
+
none: e.palette.gray[400]
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
iconColor: o < 1 ? r.none : r[t],
|
|
28
|
+
iconText: m(t.charAt(0)),
|
|
29
|
+
iconTextColor: o < 1 ? l.none : l[t],
|
|
30
|
+
textColor: o < 1 ? i.disabled : i.enabled
|
|
31
|
+
};
|
|
32
|
+
}, z = ({
|
|
33
|
+
variant: t,
|
|
34
|
+
value: o
|
|
35
|
+
}) => {
|
|
36
|
+
const { iconColor: r, iconText: i, iconTextColor: l, textColor: s } = h(
|
|
37
|
+
t,
|
|
38
|
+
o
|
|
39
|
+
), p = m(t.charAt(0)) + t.slice(1);
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
|
+
c,
|
|
42
|
+
{
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
display: "inline-flex",
|
|
45
|
+
gap: 0.5,
|
|
46
|
+
minWidth: "43px",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ n(x, { id: p, place: "top", tip: p, children: /* @__PURE__ */ n(
|
|
49
|
+
c,
|
|
50
|
+
{
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
bgColor: r,
|
|
53
|
+
borderRadius: "4px",
|
|
54
|
+
cursor: "pointer",
|
|
55
|
+
display: "flex",
|
|
56
|
+
height: "22px",
|
|
57
|
+
maxWidth: "22px",
|
|
58
|
+
minWidth: "22px",
|
|
59
|
+
children: /* @__PURE__ */ n(a, { color: l, size: "sm", textAlign: "center", children: i })
|
|
60
|
+
}
|
|
61
|
+
) }),
|
|
62
|
+
/* @__PURE__ */ n(a, { color: s, size: "sm", children: o })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
15
66
|
};
|
|
16
67
|
export {
|
|
17
|
-
|
|
68
|
+
z as SeverityOverviewBadge
|
|
18
69
|
};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { SeverityOverviewBadge as
|
|
3
|
-
import { Container as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { SeverityOverviewBadge as i } from "./badge/index.js";
|
|
3
|
+
import { Container as l } from "../container/index.js";
|
|
4
|
+
const s = ({
|
|
5
|
+
critical: r,
|
|
6
|
+
high: a,
|
|
7
|
+
medium: t,
|
|
8
|
+
low: v
|
|
9
|
+
}) => /* @__PURE__ */ n(l, { alignItems: "center", display: "inline-flex", gap: 1, children: [
|
|
10
|
+
/* @__PURE__ */ e(i, { value: r, variant: "critical" }),
|
|
11
|
+
/* @__PURE__ */ e(i, { value: a, variant: "high" }),
|
|
12
|
+
/* @__PURE__ */ e(i, { value: t, variant: "medium" }),
|
|
13
|
+
/* @__PURE__ */ e(i, { value: v, variant: "low" })
|
|
14
|
+
] });
|
|
5
15
|
export {
|
|
6
|
-
|
|
16
|
+
s as SeverityOverview
|
|
7
17
|
};
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { Container as
|
|
4
|
-
const
|
|
5
|
-
${({ theme:
|
|
6
|
-
border-radius: ${
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { styled as e } from "styled-components";
|
|
3
|
+
import { Container as t } from "../container/index.js";
|
|
4
|
+
const s = e.div`
|
|
5
|
+
${({ theme: o }) => `
|
|
6
|
+
border-radius: ${o.spacing[0.25]};
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
display: flex;
|
|
9
|
-
gap: ${
|
|
9
|
+
gap: ${o.spacing[0.5]};
|
|
10
10
|
justify-content: end;
|
|
11
11
|
position: relative;
|
|
12
12
|
z-index: 20;
|
|
13
13
|
|
|
14
14
|
&:hover {
|
|
15
|
-
background-color: ${
|
|
15
|
+
background-color: ${o.palette.gray[100]};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&:hover > div {
|
|
19
19
|
display: block;
|
|
20
20
|
}
|
|
21
21
|
`}
|
|
22
|
-
`,
|
|
22
|
+
`, l = ({
|
|
23
|
+
visibleElement: o,
|
|
24
|
+
hiddenElement: r
|
|
25
|
+
}) => /* @__PURE__ */ i(s, { children: [
|
|
26
|
+
o,
|
|
27
|
+
/* @__PURE__ */ n(t, { display: "none", position: "absolute", top: "100%", zIndex: 10, children: r })
|
|
28
|
+
] });
|
|
23
29
|
export {
|
|
24
|
-
|
|
30
|
+
l as ShowOnHover
|
|
25
31
|
};
|