@fluidattacks/design 3.1.11 → 3.1.13

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