@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.
Files changed (172) hide show
  1. package/dist/components/@core/index.js +2 -2
  2. package/dist/components/accordion/accordion-content/index.js +18 -5
  3. package/dist/components/accordion/index.js +71 -14
  4. package/dist/components/alert/index.js +108 -57
  5. package/dist/components/button/index.js +64 -13
  6. package/dist/components/card/card-header/index.js +78 -9
  7. package/dist/components/card/card-with-image/index.js +88 -13
  8. package/dist/components/card/card-with-input/index.js +72 -23
  9. package/dist/components/card/card-with-selector/index.js +63 -8
  10. package/dist/components/card/card-with-switch/index.js +46 -8
  11. package/dist/components/carousel/index.js +54 -28
  12. package/dist/components/checkbox/index.js +66 -32
  13. package/dist/components/cloud-image/index.js +2 -2
  14. package/dist/components/code-snippet/index.js +64 -19
  15. package/dist/components/code-snippet/location-code/index.js +146 -100
  16. package/dist/components/colors/index.js +220 -5
  17. package/dist/components/confirm-dialog/index.js +41 -18
  18. package/dist/components/container/index.js +39 -15
  19. package/dist/components/content-card/category-tag/index.js +37 -8
  20. package/dist/components/content-card/event-date/index.js +53 -10
  21. package/dist/components/content-card/index.js +118 -13
  22. package/dist/components/content-card-carousel/index.js +87 -7
  23. package/dist/components/content-card-carousel/scroll-buttons/index.js +1 -1
  24. package/dist/components/divider/index.js +22 -7
  25. package/dist/components/empty-state/empty-button/index.js +4 -4
  26. package/dist/components/empty-state/index.js +52 -15
  27. package/dist/components/file-preview/index.js +28 -12
  28. package/dist/components/form/index.js +46 -9
  29. package/dist/components/grid-container/index.js +31 -11
  30. package/dist/components/group-selector/index.js +126 -17
  31. package/dist/components/group-selector/option-container/index.js +1 -1
  32. package/dist/components/icon/index.js +78 -18
  33. package/dist/components/icon-button/index.js +63 -14
  34. package/dist/components/indicator-card/index.js +70 -11
  35. package/dist/components/info-sidebar/index.js +107 -7
  36. package/dist/components/inputs/fields/combobox/index.js +141 -21
  37. package/dist/components/inputs/fields/combobox/option/index.js +1 -1
  38. package/dist/components/inputs/fields/date/calendar/cell/index.js +22 -11
  39. package/dist/components/inputs/fields/date/calendar/grid/index.js +21 -10
  40. package/dist/components/inputs/fields/date/calendar/header/index.js +35 -13
  41. package/dist/components/inputs/fields/date/calendar/index.js +26 -11
  42. package/dist/components/inputs/fields/date/index.js +65 -15
  43. package/dist/components/inputs/fields/date-range/calendar/index.js +29 -10
  44. package/dist/components/inputs/fields/date-range/index.js +98 -18
  45. package/dist/components/inputs/fields/date-time/calendar/index.js +44 -15
  46. package/dist/components/inputs/fields/date-time/index.js +65 -14
  47. package/dist/components/inputs/fields/editable/index.js +22 -10
  48. package/dist/components/inputs/fields/input/index.js +74 -10
  49. package/dist/components/inputs/fields/input-file/index.js +114 -21
  50. package/dist/components/inputs/fields/input-tags/index.js +60 -11
  51. package/dist/components/inputs/fields/number/index.js +54 -7
  52. package/dist/components/inputs/fields/number-range/index.js +46 -8
  53. package/dist/components/inputs/fields/phone/index.js +446 -286
  54. package/dist/components/inputs/fields/text-area/index.js +78 -10
  55. package/dist/components/inputs/label/index.js +34 -8
  56. package/dist/components/inputs/outline-container/index.js +98 -12
  57. package/dist/components/inputs/utils/action-button/index.js +28 -7
  58. package/dist/components/inputs/utils/calendar-button/index.js +34 -10
  59. package/dist/components/inputs/utils/date-selector/index.js +60 -6
  60. package/dist/components/inputs/utils/date-time-field/index.js +129 -28
  61. package/dist/components/inputs/utils/dialog/index.js +10 -7
  62. package/dist/components/inputs/utils/number-field/index.js +81 -8
  63. package/dist/components/inputs/utils/popover/index.js +41 -10
  64. package/dist/components/interactive-card/icon/index.js +1 -1
  65. package/dist/components/interactive-card/index.js +110 -7
  66. package/dist/components/language-selector/index.js +34 -10
  67. package/dist/components/language-selector/item-list/index.js +1 -1
  68. package/dist/components/link/index.js +71 -17
  69. package/dist/components/list-item/index.js +64 -13
  70. package/dist/components/little-flag/index.js +26 -9
  71. package/dist/components/loading/index.js +48 -21
  72. package/dist/components/logo/index.js +10 -4
  73. package/dist/components/logo-carousel/index.js +40 -5
  74. package/dist/components/lottie/index.js +12 -7
  75. package/dist/components/menu/index.js +53 -9
  76. package/dist/components/message-banner/index.js +79 -13
  77. package/dist/components/modal/index.js +59 -13
  78. package/dist/components/modal/modal-confirm/index.js +48 -7
  79. package/dist/components/modal/modal-footer/index.js +22 -13
  80. package/dist/components/modal/modal-header/index.js +45 -19
  81. package/dist/components/notification/index.js +65 -20
  82. package/dist/components/notification-sign/index.js +27 -10
  83. package/dist/components/number-input/index.js +58 -21
  84. package/dist/components/oauth-selector/index.js +97 -23
  85. package/dist/components/oauth-selector/option-container/index.js +68 -7
  86. package/dist/components/plan-card/index.js +99 -28
  87. package/dist/components/plan-card/recommended-tag/index.js +23 -2
  88. package/dist/components/pop-up/description/index.js +47 -9
  89. package/dist/components/pop-up/index.js +146 -17
  90. package/dist/components/premium-feature/index.js +56 -16
  91. package/dist/components/priority-score/index.js +24 -9
  92. package/dist/components/progress/index.js +30 -17
  93. package/dist/components/progress-bar/index.js +99 -41
  94. package/dist/components/radio-button/index.js +64 -27
  95. package/dist/components/scroll-button/index.js +33 -15
  96. package/dist/components/search/index.js +77 -35
  97. package/dist/components/search-bar/index.js +211 -24
  98. package/dist/components/search-bar/item-searching/index.js +1 -1
  99. package/dist/components/severity-badge/index.js +66 -6
  100. package/dist/components/severity-overview/badge/index.js +62 -11
  101. package/dist/components/severity-overview/index.js +15 -5
  102. package/dist/components/show-on-hover/index.js +16 -10
  103. package/dist/components/slide-out-menu/index.js +2611 -1164
  104. package/dist/components/slide-out-menu/menu-item/index.js +58 -6
  105. package/dist/components/slider/index.js +79 -48
  106. package/dist/components/slider/thumb/index.js +13 -6
  107. package/dist/components/step-lapse/index.js +81 -23
  108. package/dist/components/table-button/index.js +65 -24
  109. package/dist/components/tabs/fixed-tabs/index.js +24 -4
  110. package/dist/components/tabs/index.js +54 -11
  111. package/dist/components/tabs/tab/index.js +37 -6
  112. package/dist/components/tag/index.js +95 -27
  113. package/dist/components/timeline/card/index.js +1 -1
  114. package/dist/components/timeline/index.js +15 -5
  115. package/dist/components/toggle/index.js +65 -25
  116. package/dist/components/toggle-buttons/index.js +51 -22
  117. package/dist/components/tooltip/index.js +1 -1
  118. package/dist/components/tour/index.js +3897 -1829
  119. package/dist/components/typography/heading/index.js +43 -5
  120. package/dist/components/typography/span/index.js +38 -6
  121. package/dist/components/typography/text/index.js +44 -6
  122. package/dist/components/web-form/index.js +28 -19
  123. package/dist/hooks/index.js +5 -5
  124. package/dist/index-BMHVi812.mjs +234 -0
  125. package/dist/index-BzAniA2J.mjs +135 -0
  126. package/dist/index-C6LbClYh.mjs +146 -0
  127. package/dist/index-CAIe8hBv.mjs +130 -0
  128. package/dist/index-CUQBAqt_.mjs +75 -0
  129. package/dist/index-CWlrSlUk.mjs +68 -0
  130. package/dist/index-Ckmu1TfV.mjs +86 -0
  131. package/dist/index-DwznImvK.mjs +1678 -0
  132. package/dist/index-maWH3JYC.mjs +3561 -0
  133. package/dist/index.js +11 -11
  134. package/dist/styles-B2N0JLw1.mjs +114 -0
  135. package/dist/styles-B64DVBIF.mjs +115 -0
  136. package/dist/{styles-lSVV9kjn.mjs → styles-BXFVwnWT.mjs} +28 -28
  137. package/dist/styles-BZQOqe8p.mjs +141 -0
  138. package/dist/styles-Bdque9TT.mjs +65 -0
  139. package/dist/{styles-CI-I6joH.mjs → styles-BlHspTrz.mjs} +18 -18
  140. package/dist/{styles-Cx93EcVo.mjs → styles-CROOwXEH.mjs} +5 -5
  141. package/dist/styles-CplEd2kw.mjs +228 -0
  142. package/dist/styles-D1eTIklB.mjs +110 -0
  143. package/dist/styles-ePGii_9g.mjs +74 -0
  144. package/dist/use-carousel-CgAF78h3.mjs +23 -0
  145. package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
  146. package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
  147. package/dist/use-modal-CtgexKnf.mjs +14 -0
  148. package/dist/use-search-Dj47QDw9.mjs +15 -0
  149. package/dist/utils-V0EumEPM.mjs +6 -0
  150. package/package.json +1 -3
  151. package/dist/index-38JqtnAI.mjs +0 -122
  152. package/dist/index-B5yoGFs6.mjs +0 -54
  153. package/dist/index-BLbKylyw.mjs +0 -209
  154. package/dist/index-Bu448Tz2.mjs +0 -106
  155. package/dist/index-BwFnfaRh.mjs +0 -2310
  156. package/dist/index-Co_k0WFk.mjs +0 -75
  157. package/dist/index-Cu7uUMlx.mjs +0 -82
  158. package/dist/index-D-lcuEHY.mjs +0 -1018
  159. package/dist/index-DrfjITyT.mjs +0 -61
  160. package/dist/styles-7_q7nHce.mjs +0 -110
  161. package/dist/styles-BA0WIQL-.mjs +0 -74
  162. package/dist/styles-C3cZmKVJ.mjs +0 -131
  163. package/dist/styles-D85YYIjM.mjs +0 -131
  164. package/dist/styles-EIbGRPlk.mjs +0 -106
  165. package/dist/styles-Q1VXuWI7.mjs +0 -65
  166. package/dist/styles-fH2c4cfc.mjs +0 -77
  167. package/dist/use-carousel-CvRxi2FI.mjs +0 -17
  168. package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
  169. package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
  170. package/dist/use-modal-CkrZ-_-M.mjs +0 -14
  171. package/dist/use-search-DpLNvt7Q.mjs +0 -12
  172. 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 S, useCallback as l } from "react";
3
- import { S as D, a as H, b as W, c as j, d as m, I as p } from "../../index-BLbKylyw.mjs";
4
- import { Button as A } from "../button/index.js";
5
- import { M as B } from "../../index-BwFnfaRh.mjs";
6
- import { theme as f } from "../colors/index.js";
7
- import { Icon as z } from "../icon/index.js";
8
- import { Heading as R } from "../typography/heading/index.js";
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 q } from "../../use-click-outside-BtZLIoU1.mjs";
12
- const F = [{ hit: { slug: "/services/continuous-hacking/", title: "Continuous Hacking" }, icon: "infinity" }, { hit: { slug: "/platform/", title: "Platform" }, icon: "sidebar" }, { hit: { slug: "/plans/", title: "Plans" }, icon: "star-christmas" }, { hit: { slug: "/blog/", title: "Blog" }, icon: "pen-line" }], C = { hit: { slug: "/contact-us/", title: "Contact Support" }, icon: "envelope" }, Y = ({ items: n, placeholder: b = "Search", refine: d, query: v }) => {
13
- const [o, k] = y(v), [w, u] = y(!1), g = S(null), a = S(null), s = o.length >= 2, r = l((t) => {
14
- k(t), d(t);
15
- }, [d]), c = l(() => {
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]), I = l(() => {
18
- u(!0);
19
- }, []), N = l((t) => {
20
- r(t.currentTarget.value);
21
- }, [r]), P = l((t) => {
22
- t.preventDefault(), t.stopPropagation(), c(), a.current && a.current.focus();
23
- }, [c]), $ = l((t) => {
24
- t.preventDefault(), t.stopPropagation(), a.current && a.current.blur();
25
- }, []);
26
- return q(g.current, () => {
27
- c(), u(!1);
28
- }, !0), i(D, { ref: g, children: [i(H, { action: "", noValidate: !0, onReset: P, onSubmit: $, role: "search", children: [i("div", { className: "flex gap-2 w-full", children: [e("div", { className: "h-10 p-2", children: e(z, { icon: "magnifying-glass", iconSize: "sm", iconType: "fa-light" }) }), e(W, { autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", maxLength: 512, onChange: N, onFocus: I, placeholder: b, ref: a, spellCheck: !1, type: "search", value: o })] }), s && e(j, { type: "reset", children: e(z, { icon: "xmark", iconSize: "sm", iconType: "fa-light" }) })] }), w && o.length < 2 && i(m, { children: [e(h, { color: f.palette.gray[400], fontWeight: "bold", lineSpacing: 1.5, size: "md", sizeSm: "sm", children: "Suggested" }), e("div", { className: "flex flex-col items-start self-stretch", children: F.map(({ hit: t, icon: x }, T) => e(p, { hit: t, icon: x, showIcon: !0 }, `${x}-${T}`)) }), e(h, { color: f.palette.gray[400], fontWeight: "bold", lineSpacing: 1.5, size: "md", sizeSm: "sm", children: "Can’t find what you’re looking for?" }), e(p, { hit: C.hit, icon: C.icon, showIcon: !0 })] }), s && n.length > 0 && i(m, { $showHits: s, children: [e(h, { color: f.palette.gray[400], fontWeight: "bold", lineSpacing: 1.5, size: "md", sizeSm: "sm", children: "Results" }), e("div", { className: "flex flex-col items-start self-stretch", children: n.map((t) => e(p, { hit: t }, t.objectID)) })] }), s && n.length === 0 && e(m, { $empty: n.length === 0, children: i("div", { className: "items-center flex flex-col gap-4 py-[90px] w-full", children: [e(B, { height: 96, publicId: "airs/search-bar/empty-state-icon", width: 96 }), e(R, { display: "flex", size: "sm", sizeSm: "xs", textAlign: "center", children: "No results found" }), i(h, { display: "flex", lineSpacing: 1.5, size: "md", sizeSm: "sm", textAlign: "center", children: [`“${o}” did not match.`, e("br", {}), "Please try again."] }), e(A, { onClick: c, variant: "secondary", children: "Clear search" })] }) })] });
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,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { I } from "../../../index-BLbKylyw.mjs";
2
+ import { I } from "../../../index-BMHVi812.mjs";
3
3
  import "../../colors/index.js";
4
4
  import "../../icon/index.js";
5
5
  import "../../typography/heading/index.js";
@@ -1,14 +1,74 @@
1
1
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import { useTheme as n } from "styled-components";
2
+ import { useTheme as g } from "styled-components";
3
3
  import { theme as e } from "../colors/index.js";
4
- import { Container as l } from "../container/index.js";
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 x = { critical: { bgColor: e.palette.primary[700], colorL: e.palette.gray[800], colorR: e.palette.white }, disable: { bgColor: e.palette.gray[200], colorL: e.palette.gray[400], colorR: e.palette.gray[400] }, high: { bgColor: e.palette.error[500], colorL: e.palette.gray[800], colorR: e.palette.white }, low: { bgColor: e.palette.warning[200], colorL: e.palette.gray[800], colorR: e.palette.gray[800] }, medium: { bgColor: e.palette.warning[500], colorL: e.palette.gray[800], colorR: e.palette.gray[800] } }, L = ({ textL: r, textR: p, variant: i }) => {
9
- const s = n(), { bgColor: t, colorL: c, colorR: g } = x[i];
10
- return d(l, { alignItems: "flex-start", display: "inline-flex", children: [r ? o(l, { alignItems: "center", bgColor: s.palette.white, border: `1px solid ${t}`, borderRadius: "4px 0px 0px 4px", display: "flex", justify: "center", padding: [0, 0.25, 0, 0.25], children: o(a, { color: c, size: "xs", children: r }) }) : void 0, o(l, { alignItems: "center", bgColor: t, border: `1px solid ${t}`, borderRadius: r ? "0px 4px 4px 0px" : "4px", display: "flex", padding: r ? [0, 0.25, 0, 0.125] : [0, 0.25, 0, 0.25], pb: 0.125, pl: 0.125, pr: 0.125, pt: 0.125, children: o(a, { color: g, size: "xs", children: p }) })] });
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
- L as SeverityBadge
73
+ u as SeverityBadge
14
74
  };
@@ -1,18 +1,69 @@
1
- import { jsxs as f, jsx as t } from "react/jsx-runtime";
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 s } from "../../container/index.js";
5
- import { T as C } from "../../../index-D-lcuEHY.mjs";
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 d } from "../../typography/text/index.js";
9
- const j = ({ variant: r, value: a }) => {
10
- const { iconColor: x, iconText: h, iconTextColor: g, textColor: y } = ((i, o) => {
11
- const l = { critical: e.palette.primary[700], high: e.palette.error[500], low: e.palette.warning[200], medium: e.palette.warning[500], none: e.palette.gray[200] }, p = { disabled: e.palette.gray[400], enabled: e.palette.gray[800] }, c = { critical: e.palette.white, high: e.palette.white, low: e.palette.gray[800], medium: e.palette.gray[800], none: e.palette.gray[400] };
12
- return { iconColor: o < 1 ? l.none : l[i], iconText: m(i.charAt(0)), iconTextColor: o < 1 ? c.none : c[i], textColor: o < 1 ? p.disabled : p.enabled };
13
- })(r, a), n = m(r.charAt(0)) + r.slice(1);
14
- return f(s, { alignItems: "center", display: "inline-flex", gap: 0.5, minWidth: "43px", children: [t(C, { id: n, place: "top", tip: n, children: t(s, { alignItems: "center", bgColor: x, borderRadius: "4px", cursor: "pointer", display: "flex", height: "22px", maxWidth: "22px", minWidth: "22px", children: t(d, { color: g, size: "sm", textAlign: "center", children: h }) }) }), t(d, { color: y, size: "sm", children: a })] });
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
- j as SeverityOverviewBadge
68
+ z as SeverityOverviewBadge
18
69
  };
@@ -1,7 +1,17 @@
1
- import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
- import { SeverityOverviewBadge as a } from "./badge/index.js";
3
- import { Container as n } from "../container/index.js";
4
- const c = ({ critical: e, high: r, medium: t, low: v }) => l(n, { alignItems: "center", display: "inline-flex", gap: 1, children: [i(a, { value: e, variant: "critical" }), i(a, { value: r, variant: "high" }), i(a, { value: t, variant: "medium" }), i(a, { value: v, variant: "low" })] });
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
- c as SeverityOverview
16
+ s as SeverityOverview
7
17
  };
@@ -1,25 +1,31 @@
1
- import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
- import { styled as r } from "styled-components";
3
- import { Container as s } from "../container/index.js";
4
- const t = r.div`
5
- ${({ theme: n }) => `
6
- border-radius: ${n.spacing[0.25]};
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: ${n.spacing[0.5]};
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: ${n.palette.gray[100]};
15
+ background-color: ${o.palette.gray[100]};
16
16
  }
17
17
 
18
18
  &:hover > div {
19
19
  display: block;
20
20
  }
21
21
  `}
22
- `, p = ({ visibleElement: n, hiddenElement: e }) => o(t, { children: [n, i(s, { display: "none", position: "absolute", top: "100%", zIndex: 10, children: e })] });
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
- p as ShowOnHover
30
+ l as ShowOnHover
25
31
  };