@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,25 +1,51 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import { isString as d, isEmpty as p } from "lodash";
3
- import { useCallback as f, useEffect as x } from "react";
4
- import { useTheme as h } from "styled-components";
5
- import { H as u, T as w } from "../../../styles-D85YYIjM.mjs";
6
- import { IconButton as y } from "../../icon-button/index.js";
7
- import { Heading as k } from "../../typography/heading/index.js";
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 v } from "../../typography/text/index.js";
10
- const L = ({ title: i, description: o, modalRef: n, otherActions: m, onClose: e }) => {
11
- const c = h(), s = f(() => {
12
- e == null || e(), n.close();
13
- }, [n, e]);
14
- return x(() => {
15
- const a = (l) => {
16
- l.key === "Escape" && s();
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", a), () => {
19
- window.removeEventListener("keydown", a);
24
+ return window.addEventListener("keydown", s), () => {
25
+ window.removeEventListener("keydown", s);
20
26
  };
21
- }, [s]), t(u, { children: [t(w, { children: [typeof i == "string" ? r(k, { fontWeight: "bold", lineSpacing: 1.75, mr: 1, size: "sm", children: i }) : i, t("div", { className: "flex", children: [m, r(y, { icon: "close", iconColor: c.palette.gray[300], iconSize: "xs", iconType: "fa-light", id: "modal-close", onClick: s, variant: "ghost" })] })] }), o && d(o) && !p(o) ? r(v, { mt: 0.5, size: "sm", children: o }) : o] });
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
- L as ModalHeader
50
+ B as ModalHeader
25
51
  };
@@ -1,18 +1,18 @@
1
- import { jsxs as t, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
2
  import { useCallback as p } from "react";
3
- import { styled as s, useTheme as d } from "styled-components";
4
- import { Container as m } from "../container/index.js";
5
- import { Icon as a } from "../icon/index.js";
6
- import { IconButton as f } from "../icon-button/index.js";
7
- import { Heading as g } from "../typography/heading/index.js";
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 h = s.div`
11
- ${({ theme: i, $variant: n }) => `
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[n][500]};
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
- `, x = s.div`
30
- ${({ theme: i, $variant: n }) => `
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[n][50]};
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[n][200]};
53
+ color: ${i.palette[o][200]};
54
54
  }
55
55
 
56
56
  & .icon {
57
- color: ${i.palette[n][500]};
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", j = ({ description: i, onClose: n, title: r, variant: e }) => {
61
- const l = d(), c = p(() => {
62
- n == null || n();
63
- }, [n]);
64
- return t(h, { $variant: e, className: `notification notification__${e}`, role: "alertdialog", children: [t(x, { $variant: e, children: [o(a, { icon: "circle", iconClass: "ellipse-1", iconSize: "xs" }), o(a, { icon: "circle", iconClass: "ellipse-2", iconSize: "xs" }), o(a, { icon: b(e), iconClass: "icon", iconSize: "xs", iconType: "fa-light" })] }), t(m, { pr: 1.5, children: [o(g, { fontWeight: "bold", size: "xs", children: r }), o($, { size: "sm", whiteSpace: "break-spaces", wordWrap: "break-word", children: i })] }), o(f, { height: "fit-content", icon: "close", iconColor: l.palette.gray[400], iconSize: "xs", iconType: "fa-light", onClick: c, px: 0.125, py: 0.125, variant: "ghost" })] });
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
- j as Notification
112
+ N as Notification
68
113
  };
@@ -1,11 +1,13 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import { styled as i } from "styled-components";
4
- import { B as p } from "../../styles-C3cZmKVJ.mjs";
5
- const d = i(p)`
6
- ${({ theme: t, $variant: n }) => `
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: ${n === "error" ? t.palette.primary[400] : t.palette.warning[500]};
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
- `, c = i.div`
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
- `, g = s(function({ numberIndicator: t, show: n, variant: r = "error", ...a }, o) {
26
- return e(d, { $variant: r, className: n ? "flex" : "hidden", "data-testid": "notification-sign", ref: o, ...a, children: t && e(c, { children: t <= 9 ? t : 9 }) });
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
- g as NotificationSign
46
+ $ as NotificationSign
30
47
  };
@@ -1,22 +1,22 @@
1
- import { jsx as u } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import { toNumber as d, isEmpty as k } from "lodash";
3
- import { forwardRef as w, useState as T, useCallback as l } from "react";
4
- import { styled as g } from "styled-components";
5
- import { T as $ } from "../../index-D-lcuEHY.mjs";
6
- const P = g.div`
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: t }) => `1px solid ${t.palette.gray[300]}`};
8
+ border: ${({ theme: e }) => `1px solid ${e.palette.gray[300]}`};
9
9
  border-radius: 4px;
10
10
  background: none;
11
- color: ${({ theme: t }) => t.palette.black};
12
- font-family: ${({ theme: t }) => t.typography.type.primary};
13
- font-size: ${({ theme: t }) => t.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};
14
14
  height: 40px;
15
15
  display: flex;
16
16
  align-items: center;
17
17
  justify-content: center;
18
18
  padding: 0.5em;
19
- `, E = g.input`
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
- `, U = w(function({ autoUpdate: t = !1, decimalPlaces: s = 0, defaultValue: m = 0, max: r, min: o, name: b, onEnter: n, tooltipMessage: f, ...y }, h) {
40
- const a = s < 0 ? 0 : s, [c, p] = T(Number(m).toFixed(a)), x = l((e) => {
41
- const i = d(e.target.value);
42
- e.target.value.endsWith(".") ? p(e.target.value) : i >= Number(o) && i <= Number(r) && (p(String(i)), t && n(d(i.toFixed(a)))), e.stopPropagation();
43
- }, [t, a, r, o, n]), v = l((e) => {
44
- e.currentTarget.contains(e.relatedTarget) || p(Number(m).toFixed(a)), e.stopPropagation();
45
- }, [a, m]), N = l((e) => {
46
- e.stopPropagation(), e.key !== "Enter" || k(e.currentTarget.value) || n(d(e.currentTarget.value));
47
- }, [n]);
48
- return u(P, { onBlur: v, tabIndex: -1, children: u($, { id: "numberInputTooltip", tip: f, children: u(E, { ...y, "aria-label": b, "aria-valuemax": Number(r), "aria-valuemin": Number(o), "aria-valuenow": Number(c), max: r, min: o, name: b, onChange: x, onKeyUp: N, ref: h, step: 10 ** -a, type: "number", value: c }) }) });
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
- U as NumberInput
88
+ K as NumberInput
52
89
  };
@@ -1,26 +1,100 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { useState as y, useRef as x, useCallback as n } from "react";
3
- import { useTheme as O } from "styled-components";
4
- import { OptionContainer as p } from "./option-container/index.js";
5
- import { Button as I } from "../button/index.js";
6
- import { Container as d } from "../container/index.js";
7
- import { u as j } from "../../use-click-outside-BtZLIoU1.mjs";
8
- const D = ({ align: m = "end", buttonLabel: c = "Add Credential", children: u, id: b, manualOption: e, providers: r }) => {
9
- const f = O(), [h, o] = y(!1), a = x(null);
10
- j(a.current, () => {
11
- o(!1);
12
- }, !0);
13
- const C = n((i) => {
14
- e == null || e.onClick(i), o(!1);
15
- }, [e]), v = n(() => {
16
- o((i) => !i);
17
- }, [o]), g = n((i) => (k) => {
18
- var l;
19
- (l = r[i]) == null || l.onClick(k), o(!1);
20
- }, [r]);
21
- return s(d, { alignItems: m, display: "flex", flexDirection: "column", position: "relative", ref: a, width: "max-content", zIndex: 10, children: [t(I, { icon: "plus", onClick: v, variant: "primary", children: c }), s(d, { alignItems: "center", bgColor: "#fff", border: `1px solid ${f.palette.gray[200]}`, borderRadius: "4px", display: "flex", gap: 0.5, height: "78px", id: b, pb: 0.5, pl: 0.75, position: "absolute", pr: 0.75, pt: 0.5, shadow: "md", top: "40px", visibility: h ? "visible" : "hidden", zIndex: 10, children: [Object.keys(r).map((i) => t(p, { onClick: g(i), provider: i }, i)), e === void 0 ? void 0 : t(p, { icon: "square-plus", label: e.label ?? "Add manually", onClick: C }), u] })] });
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
- D as OAuthSelector,
25
- p as OptionContainer
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 s } from "styled-components";
3
- import { M as c } from "../../../index-BwFnfaRh.mjs";
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 m } from "../../icon/index.js";
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 = { Azure: "integrates/autoenrollment/azureIcon", Bitbucket: "integrates/autoenrollment/bitbucketLogo", GitHub: "integrates/autoenrollment/githubLogo", GitLab: "integrates/autoenrollment/gitlabIcon" }, L = ({ icon: o, label: a, onClick: l, onlyLabel: r = !1, provider: t = "GitLab" }) => {
10
- const n = s();
11
- return p(i, { alignItems: "center", bgColorHover: n.palette.gray[100], borderRadius: "4px", cursor: "pointer", display: "flex", flexDirection: "column", gap: 0.25, height: "62px", justify: "center", minWidth: "64px", onClick: l, pb: 0.5, pl: 0.25, pr: 0.25, pt: 0.5, children: [!r && e(i, { height: "24px", width: "24px", children: o === void 0 ? e(c, { alt: `${t} Logo`, height: "100%", publicId: h[t], width: "100%" }) : e(m, { icon: o, iconColor: "#000", iconSize: "sm", iconType: "fa-light" }) }), e(i, { alignItems: "center", display: "flex", minWidth: "24px", children: e(g, { color: n.palette.gray[800], display: "inline", size: "xs", textAlign: "center", whiteSpace: r ? "break-spaces" : "nowrap", wordWrap: "unset", children: a ?? t }) })] });
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
- L as OptionContainer
75
+ z as OptionContainer
15
76
  };