se-design 0.0.106 → 0.0.108

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 (258) hide show
  1. package/dist/assets/icons/checkbox-field.svg +9 -0
  2. package/dist/assets/icons/checkmark.svg +3 -0
  3. package/dist/assets/icons/date-field.svg +9 -0
  4. package/dist/assets/icons/email-field.svg +9 -0
  5. package/dist/assets/icons/home.svg +3 -0
  6. package/dist/assets/icons/initials-field.svg +9 -0
  7. package/dist/assets/icons/name-field.svg +16 -0
  8. package/dist/assets/icons/radio-field.svg +17 -0
  9. package/dist/assets/icons/signature-field.svg +16 -0
  10. package/dist/assets/icons/stamp-field.svg +16 -0
  11. package/dist/assets/icons/text-field.svg +9 -0
  12. package/dist/assets/icons/title-field.svg +8 -0
  13. package/dist/assets/style.css +1 -1
  14. package/dist/components/AutoCompleteInput/index.d.ts +3 -2
  15. package/dist/components/CircularProgressBar/index.d.ts +10 -0
  16. package/dist/components/CustomModal/index.d.ts +9 -0
  17. package/dist/components/Icon/index.d.ts +2 -0
  18. package/dist/components/LoadingModal/index.d.ts +5 -0
  19. package/dist/components/Spinner/index.d.ts +2 -0
  20. package/dist/components/index.d.ts +4 -0
  21. package/dist/index.js +68 -60
  22. package/dist/index.js.map +1 -1
  23. package/dist/index10.js +16 -30
  24. package/dist/index10.js.map +1 -1
  25. package/dist/index100.js +148 -9
  26. package/dist/index100.js.map +1 -1
  27. package/dist/index11.js +14 -29
  28. package/dist/index11.js.map +1 -1
  29. package/dist/index116.js +1233 -5
  30. package/dist/index116.js.map +1 -1
  31. package/dist/index117.js +8 -50
  32. package/dist/index117.js.map +1 -1
  33. package/dist/index118.js +10 -2
  34. package/dist/index118.js.map +1 -1
  35. package/dist/index119.js +5 -2
  36. package/dist/index119.js.map +1 -1
  37. package/dist/index12.js +6 -19
  38. package/dist/index12.js.map +1 -1
  39. package/dist/{index102.js → index120.js} +3 -3
  40. package/dist/{index102.js.map → index120.js.map} +1 -1
  41. package/dist/index121.js +14 -0
  42. package/dist/{index103.js.map → index121.js.map} +1 -1
  43. package/dist/{index104.js → index122.js} +1 -1
  44. package/dist/{index104.js.map → index122.js.map} +1 -1
  45. package/dist/{index105.js → index123.js} +1 -1
  46. package/dist/{index105.js.map → index123.js.map} +1 -1
  47. package/dist/{index106.js → index124.js} +1 -1
  48. package/dist/{index106.js.map → index124.js.map} +1 -1
  49. package/dist/{index107.js → index125.js} +1 -1
  50. package/dist/index125.js.map +1 -0
  51. package/dist/index126.js +11 -0
  52. package/dist/{index108.js.map → index126.js.map} +1 -1
  53. package/dist/{index109.js → index127.js} +6 -6
  54. package/dist/{index109.js.map → index127.js.map} +1 -1
  55. package/dist/{index110.js → index128.js} +2 -2
  56. package/dist/{index110.js.map → index128.js.map} +1 -1
  57. package/dist/{index111.js → index129.js} +1 -1
  58. package/dist/index129.js.map +1 -0
  59. package/dist/index13.js +30 -123
  60. package/dist/index13.js.map +1 -1
  61. package/dist/{index112.js → index130.js} +2 -2
  62. package/dist/{index112.js.map → index130.js.map} +1 -1
  63. package/dist/{index113.js → index131.js} +2 -2
  64. package/dist/{index113.js.map → index131.js.map} +1 -1
  65. package/dist/{index114.js → index132.js} +1 -1
  66. package/dist/{index114.js.map → index132.js.map} +1 -1
  67. package/dist/{index115.js → index133.js} +1 -1
  68. package/dist/{index115.js.map → index133.js.map} +1 -1
  69. package/dist/index134.js +8 -0
  70. package/dist/index134.js.map +1 -0
  71. package/dist/index135.js +55 -0
  72. package/dist/index135.js.map +1 -0
  73. package/dist/index136.js +5 -0
  74. package/dist/index136.js.map +1 -0
  75. package/dist/index137.js +5 -0
  76. package/dist/index137.js.map +1 -0
  77. package/dist/index14.js +30 -28
  78. package/dist/index14.js.map +1 -1
  79. package/dist/index15.js +19 -27
  80. package/dist/index15.js.map +1 -1
  81. package/dist/index16.js +116 -71
  82. package/dist/index16.js.map +1 -1
  83. package/dist/index17.js +28 -38
  84. package/dist/index17.js.map +1 -1
  85. package/dist/index18.js +26 -22
  86. package/dist/index18.js.map +1 -1
  87. package/dist/index19.js +77 -65
  88. package/dist/index19.js.map +1 -1
  89. package/dist/index20.js +36 -132
  90. package/dist/index20.js.map +1 -1
  91. package/dist/index21.js +20 -16
  92. package/dist/index21.js.map +1 -1
  93. package/dist/index22.js +67 -44
  94. package/dist/index22.js.map +1 -1
  95. package/dist/index23.js +133 -28
  96. package/dist/index23.js.map +1 -1
  97. package/dist/index24.js +16 -61
  98. package/dist/index24.js.map +1 -1
  99. package/dist/index25.js +44 -41
  100. package/dist/index25.js.map +1 -1
  101. package/dist/index26.js +28 -97
  102. package/dist/index26.js.map +1 -1
  103. package/dist/index27.js +61 -55
  104. package/dist/index27.js.map +1 -1
  105. package/dist/index28.js +42 -38
  106. package/dist/index28.js.map +1 -1
  107. package/dist/index29.js +95 -31
  108. package/dist/index29.js.map +1 -1
  109. package/dist/index30.js +58 -33
  110. package/dist/index30.js.map +1 -1
  111. package/dist/index31.js +36 -44
  112. package/dist/index31.js.map +1 -1
  113. package/dist/index32.js +35 -38
  114. package/dist/index32.js.map +1 -1
  115. package/dist/index33.js +29 -30
  116. package/dist/index33.js.map +1 -1
  117. package/dist/index34.js +45 -50
  118. package/dist/index34.js.map +1 -1
  119. package/dist/index35.js +37 -70
  120. package/dist/index35.js.map +1 -1
  121. package/dist/index36.js +28 -48
  122. package/dist/index36.js.map +1 -1
  123. package/dist/index37.js +49 -62
  124. package/dist/index37.js.map +1 -1
  125. package/dist/index38.js +68 -84
  126. package/dist/index38.js.map +1 -1
  127. package/dist/index39.js +54 -2
  128. package/dist/index39.js.map +1 -1
  129. package/dist/index4.js +130 -97
  130. package/dist/index4.js.map +1 -1
  131. package/dist/index40.js +74 -2
  132. package/dist/index40.js.map +1 -1
  133. package/dist/index41.js +87 -2
  134. package/dist/index41.js.map +1 -1
  135. package/dist/index42.js +38 -2
  136. package/dist/index42.js.map +1 -1
  137. package/dist/index43.js +1 -1
  138. package/dist/index43.js.map +1 -1
  139. package/dist/index44.js +1 -1
  140. package/dist/index44.js.map +1 -1
  141. package/dist/index45.js +1 -1
  142. package/dist/index45.js.map +1 -1
  143. package/dist/index46.js +1 -1
  144. package/dist/index46.js.map +1 -1
  145. package/dist/index47.js +1 -1
  146. package/dist/index47.js.map +1 -1
  147. package/dist/index48.js +1 -1
  148. package/dist/index48.js.map +1 -1
  149. package/dist/index49.js +1 -1
  150. package/dist/index49.js.map +1 -1
  151. package/dist/index5.js +1 -1
  152. package/dist/index50.js +1 -1
  153. package/dist/index50.js.map +1 -1
  154. package/dist/index51.js +1 -1
  155. package/dist/index51.js.map +1 -1
  156. package/dist/index52.js +1 -1
  157. package/dist/index52.js.map +1 -1
  158. package/dist/index53.js +2 -2
  159. package/dist/index53.js.map +1 -1
  160. package/dist/index54.js +1 -1
  161. package/dist/index54.js.map +1 -1
  162. package/dist/index55.js +1 -1
  163. package/dist/index55.js.map +1 -1
  164. package/dist/index56.js +1 -1
  165. package/dist/index56.js.map +1 -1
  166. package/dist/index57.js +2 -2
  167. package/dist/index57.js.map +1 -1
  168. package/dist/index58.js +2 -2
  169. package/dist/index58.js.map +1 -1
  170. package/dist/index59.js +1 -1
  171. package/dist/index59.js.map +1 -1
  172. package/dist/index60.js +1 -1
  173. package/dist/index60.js.map +1 -1
  174. package/dist/index61.js +1 -1
  175. package/dist/index61.js.map +1 -1
  176. package/dist/index62.js +1 -1
  177. package/dist/index62.js.map +1 -1
  178. package/dist/index63.js +1 -1
  179. package/dist/index63.js.map +1 -1
  180. package/dist/index64.js +2 -2
  181. package/dist/index64.js.map +1 -1
  182. package/dist/index65.js +1 -1
  183. package/dist/index65.js.map +1 -1
  184. package/dist/index66.js +1 -1
  185. package/dist/index66.js.map +1 -1
  186. package/dist/index67.js +1 -1
  187. package/dist/index67.js.map +1 -1
  188. package/dist/index68.js +1 -1
  189. package/dist/index68.js.map +1 -1
  190. package/dist/index69.js +1 -1
  191. package/dist/index69.js.map +1 -1
  192. package/dist/index70.js +2 -2
  193. package/dist/index70.js.map +1 -1
  194. package/dist/index71.js +2 -2
  195. package/dist/index71.js.map +1 -1
  196. package/dist/index72.js +1 -1
  197. package/dist/index72.js.map +1 -1
  198. package/dist/index73.js +1 -1
  199. package/dist/index73.js.map +1 -1
  200. package/dist/index74.js +1 -1
  201. package/dist/index74.js.map +1 -1
  202. package/dist/index75.js +2 -2
  203. package/dist/index75.js.map +1 -1
  204. package/dist/index76.js +1 -1
  205. package/dist/index76.js.map +1 -1
  206. package/dist/index77.js +2 -2
  207. package/dist/index77.js.map +1 -1
  208. package/dist/index78.js +1 -1
  209. package/dist/index78.js.map +1 -1
  210. package/dist/index79.js +2 -2
  211. package/dist/index79.js.map +1 -1
  212. package/dist/index80.js +1 -1
  213. package/dist/index80.js.map +1 -1
  214. package/dist/index81.js +2 -2
  215. package/dist/index81.js.map +1 -1
  216. package/dist/index82.js +2 -2
  217. package/dist/index82.js.map +1 -1
  218. package/dist/index83.js +2 -2
  219. package/dist/index83.js.map +1 -1
  220. package/dist/index84.js +2 -149
  221. package/dist/index84.js.map +1 -1
  222. package/dist/index85.js +5 -0
  223. package/dist/index85.js.map +1 -0
  224. package/dist/index86.js +5 -0
  225. package/dist/index86.js.map +1 -0
  226. package/dist/index87.js +5 -0
  227. package/dist/index87.js.map +1 -0
  228. package/dist/index88.js +5 -0
  229. package/dist/index88.js.map +1 -0
  230. package/dist/index89.js +5 -0
  231. package/dist/index89.js.map +1 -0
  232. package/dist/index90.js +5 -0
  233. package/dist/index90.js.map +1 -0
  234. package/dist/index91.js +5 -0
  235. package/dist/index91.js.map +1 -0
  236. package/dist/index92.js +5 -0
  237. package/dist/index92.js.map +1 -0
  238. package/dist/index93.js +5 -0
  239. package/dist/index93.js.map +1 -0
  240. package/dist/index94.js +5 -0
  241. package/dist/index94.js.map +1 -0
  242. package/dist/index95.js +5 -0
  243. package/dist/index95.js.map +1 -0
  244. package/dist/index96.js +5 -0
  245. package/dist/index96.js.map +1 -0
  246. package/dist/index97.js +5 -0
  247. package/dist/index97.js.map +1 -0
  248. package/dist/index98.js +1 -1232
  249. package/dist/index98.js.map +1 -1
  250. package/dist/index99.js +2 -10
  251. package/dist/index99.js.map +1 -1
  252. package/package.json +1 -1
  253. package/dist/index101.js +0 -8
  254. package/dist/index101.js.map +0 -1
  255. package/dist/index103.js +0 -14
  256. package/dist/index107.js.map +0 -1
  257. package/dist/index108.js +0 -11
  258. package/dist/index111.js.map +0 -1
package/dist/index10.js CHANGED
@@ -1,34 +1,20 @@
1
- import r, { useState as b, useRef as d, useEffect as a } from "react";
2
- const u = ({
3
- content: l,
4
- tooltipSrc: c,
5
- position: t = "bottom-center",
6
- displayOn: o = "hover"
7
- }) => {
8
- const [i, f] = b(o === "always-on"), s = d(null);
9
- a(() => {
10
- const e = s.current;
11
- e && (t == "bottom-center" ? (e.setAttribute("style", "left: 50%;transform: translateX(-50%);"), e.classList.add("before:left-[calc(50%-7px)]"), e.classList.add("before:top-[-7px]")) : t == "bottom-left" ? (e.classList.add("before:left-[calc(10%-7px)]"), e.classList.add("before:top-[-7px]")) : t == "bottom-right" ? (e.setAttribute("style", "right: 0;"), e.classList.add("before:right-[calc(10%+7px)]"), e.classList.add("before:top-[-7px]")) : t == "left" ? (e.setAttribute("style", "right: calc(100% + 10px);top:0;"), e.classList.add("before:right-[-6px]"), e.classList.add("before:top-0px")) : t == "right" && (e.setAttribute("style", "left: calc(100% + 10px);top:0;"), e.classList.add("before:left-[-6px]"), e.classList.add("before:top-0px")), o == "hover" && e.classList.add("group-hover:visible"));
12
- }, [l]), a(() => {
13
- const e = s.current;
14
- e && (i ? e.classList.remove("invisible") : e.classList.add("invisible"));
15
- }, [i]);
16
- const p = () => {
17
- o == "click" && f((e) => !e);
18
- };
19
- return /* @__PURE__ */ r.createElement("div", {
20
- className: "se-design-tooltip group relative",
21
- onClick: p
22
- }, /* @__PURE__ */ r.createElement("div", {
23
- className: "cursor-pointer",
24
- id: "tooltip-trigger"
25
- }, c), /* @__PURE__ */ r.createElement("div", {
26
- ref: s,
27
- id: "tooltip-content",
28
- className: "flex justify-center px-3 py-2 min-w-24 max-w-60 absolute top-[calc(100%+8px)] w-max bg-[var(--color-gray-800)] text-[var(--color-white)] text-xs rounded-[3px] before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block before:absolute before:rounded-tl-sm before:rotate-45"
29
- }, l));
1
+ import e from "react";
2
+ const l = (t) => {
3
+ const {
4
+ renderModalContent: n,
5
+ isOpen: s,
6
+ width: o = "500px"
7
+ } = t;
8
+ return /* @__PURE__ */ e.createElement("div", {
9
+ className: `se-design-modal fixed inset-0 flex items-start justify-center z-[2000] backdrop-brightness-50 ${s ? "visible" : "invisible pointer-events-none"}`
10
+ }, /* @__PURE__ */ e.createElement("div", {
11
+ className: "modal-content flex flex-col gap-3 bg-[var(--color-white)] rounded shadow-lg p-8 mt-14",
12
+ style: {
13
+ width: o
14
+ }
15
+ }, n()));
30
16
  };
31
17
  export {
32
- u as Tooltip
18
+ l as CustomModal
33
19
  };
34
20
  //# sourceMappingURL=index10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/Tooltip/index.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from \"react\";\n\nexport interface TooltipProps {\n /**\n * Tooltip contents\n */\n content: string;\n /**\n * Tooltip position\n */\n position?: \"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"right\";\n /**\n * Display tooltip on Hover, Click or Always\n */\n displayOn?: 'hover' | 'click' | 'always-on';\n /**\n * Tooltip trigger contents\n */\n tooltipSrc?: React.ReactNode;\n}\n\nexport const Tooltip = ({ content, tooltipSrc, position = 'bottom-center', displayOn = 'hover' }: TooltipProps) => {\n const [displayTooltip, setDisplayTooltip] = useState(displayOn === 'always-on');\n const tooltipContentRef = useRef<HTMLDivElement>(null);;\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if(!tooltipContent) {\n return\n }\n \n if(position == 'bottom-center') {\n tooltipContent.setAttribute(\"style\", `left: 50%;transform: translateX(-50%);`);\n tooltipContent.classList.add(`before:left-[calc(50%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if(position == 'bottom-left') {\n tooltipContent.classList.add(`before:left-[calc(10%-7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if(position == 'bottom-right') {\n tooltipContent.setAttribute(\"style\", `right: 0;`);\n tooltipContent.classList.add(`before:right-[calc(10%+7px)]`);\n tooltipContent.classList.add(`before:top-[-7px]`);\n } else if(position == 'left') {\n tooltipContent.setAttribute(\"style\", `right: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:right-[-6px]`);\n tooltipContent.classList.add(`before:top-0px`);\n } else if(position == 'right') {\n tooltipContent.setAttribute(\"style\", `left: calc(100% + 10px);top:0;`);\n tooltipContent.classList.add(`before:left-[-6px]`);\n tooltipContent.classList.add(`before:top-0px`);\n }\n\n if(displayOn == 'hover') {\n tooltipContent.classList.add(`group-hover:visible`);\n }\n }, [content]);\n\n useEffect(() => {\n const tooltipContent = tooltipContentRef.current;\n\n if(!tooltipContent) {\n return;\n }\n if(displayTooltip) {\n tooltipContent.classList.remove(`invisible`);\n } else {\n tooltipContent.classList.add(`invisible`);\n }\n }, [displayTooltip])\n\n const onTooltipSrcClick = () => {\n if(displayOn == 'click') {\n setDisplayTooltip((displayTooltip) => !displayTooltip)\n }\n }\n\n return (\n <div className=\"se-design-tooltip group relative\" onClick={onTooltipSrcClick}>\n <div className=\"cursor-pointer\" id=\"tooltip-trigger\">\n {tooltipSrc}\n </div>\n <div\n ref={tooltipContentRef}\n id=\"tooltip-content\"\n className=\"flex justify-center px-3 py-2 min-w-24 max-w-60\n absolute top-[calc(100%+8px)] w-max bg-[var(--color-gray-800)] text-[var(--color-white)] text-xs rounded-[3px]\n before:content-[' '] before:w-3.5 before:h-3.5 before:bg-[var(--color-gray-800)] before:inline-block\n before:absolute before:rounded-tl-sm before:rotate-45\"\n >\n {content}\n </div>\n </div>\n );\n};\n"],"names":["Tooltip","content","tooltipSrc","position","displayOn","displayTooltip","setDisplayTooltip","useState","tooltipContentRef","useRef","useEffect","tooltipContent","current","setAttribute","classList","add","remove","onTooltipSrcClick","React","createElement","className","onClick","id","ref"],"mappings":";AAqBO,MAAMA,IAAUA,CAAC;AAAA,EAAEC,SAAAA;AAAAA,EAASC,YAAAA;AAAAA,EAAYC,UAAAA,IAAW;AAAA,EAAiBC,WAAAA,IAAY;AAAsB,MAAM;AACjH,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAASH,MAAc,WAAW,GACxEI,IAAoBC,EAAuB,IAAI;AAErDC,EAAAA,EAAU,MAAM;AACd,UAAMC,IAAiBH,EAAkBI;AAEzC,IAAID,MAIDR,KAAY,mBACEU,EAAAA,aAAa,SAAS,wCAAwC,GAC9DC,EAAAA,UAAUC,IAAI,6BAA6B,GAC3CD,EAAAA,UAAUC,IAAI,mBAAmB,KACxCZ,KAAY,iBACLW,EAAAA,UAAUC,IAAI,6BAA6B,GAC3CD,EAAAA,UAAUC,IAAI,mBAAmB,KACxCZ,KAAY,kBACLU,EAAAA,aAAa,SAAS,WAAW,GACjCC,EAAAA,UAAUC,IAAI,8BAA8B,GAC5CD,EAAAA,UAAUC,IAAI,mBAAmB,KACxCZ,KAAY,UACLU,EAAAA,aAAa,SAAS,iCAAiC,GACvDC,EAAAA,UAAUC,IAAI,qBAAqB,GACnCD,EAAAA,UAAUC,IAAI,gBAAgB,KACrCZ,KAAY,YACLU,EAAAA,aAAa,SAAS,gCAAgC,GACtDC,EAAAA,UAAUC,IAAI,oBAAoB,GAClCD,EAAAA,UAAUC,IAAI,gBAAgB,IAG5CX,KAAa,WACCU,EAAAA,UAAUC,IAAI,qBAAqB;AAAA,EACpD,GACC,CAACd,CAAO,CAAC,GAEZS,EAAU,MAAM;AACd,UAAMC,IAAiBH,EAAkBI;AAEzC,IAAID,MAGDN,IACcS,EAAAA,UAAUE,OAAO,WAAW,IAE5BF,EAAAA,UAAUC,IAAI,WAAW;AAAA,EAC1C,GACC,CAACV,CAAc,CAAC;AAEnB,QAAMY,IAAoBA,MAAM;AAC9B,IAAGb,KAAa,WACKC,EAAAA,CAAAA,MAAmB,CAACA,CAAc;AAAA,EAEzD;AAGEa,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,IAAmCC,SAASJ;AAAAA,EAAAA,GACzDE,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,IAAiBE,IAAG;AAAA,EAChCpB,GAAAA,CACE,GACLgB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEI,KAAKf;AAAAA,IACLc,IAAG;AAAA,IACHF,WAAU;AAAA,EAG8C,GAEvDnB,CACE,CACF;AAET;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/components/CustomModal/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nexport interface CustomModalProps {\n onSubmit?: () => void;\n onClose?: () => void;\n renderModalContent: () => React.ReactNode;\n isOpen: boolean;\n width?: string;\n}\n\nexport const CustomModal: FC<CustomModalProps> = (props) => {\n const {\n renderModalContent,\n isOpen,\n width = '500px'\n } = props;\n\n return (\n <div\n className={`se-design-modal fixed inset-0 flex items-start justify-center z-[2000] backdrop-brightness-50 ${isOpen ? 'visible' : 'invisible pointer-events-none'}`}\n >\n <div\n className=\"modal-content flex flex-col gap-3 bg-[var(--color-white)] rounded shadow-lg p-8 mt-14\"\n style={{ width }}\n >\n {renderModalContent()}\n </div>\n </div>\n );\n};\n"],"names":["React__default","CustomModal","props","renderModalContent","isOpen","width","React","createElement","className","style"],"mappings":"AAUO,OAAAA,OAAA;AAAA,MAAMC,IAAqCC,CAAUA,MAAA;AACpD,QAAA;AAAA,IACJC,oBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,OAAAA,IAAQ;AAAA,EAAA,IACNH;AAGFI,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEC,WAAW,iGAAiGJ,IAAS,YAAY,+BAA+B;AAAA,EAAA,GAEhKG,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IACEC,WAAU;AAAA,IACVC,OAAO;AAAA,MAAEJ,OAAAA;AAAAA,IAAAA;AAAAA,EAAM,GAEdF,EACE,CAAA,CACF;AAET;"}
package/dist/index100.js CHANGED
@@ -1,13 +1,152 @@
1
- function e() {
2
- return e = Object.assign ? Object.assign.bind() : function(t) {
3
- for (var n = 1; n < arguments.length; n++) {
4
- var a = arguments[n];
5
- for (var r in a) ({}).hasOwnProperty.call(a, r) && (t[r] = a[r]);
1
+ import N from "./index117.js";
2
+ import R from "./index118.js";
3
+ import D from "./index119.js";
4
+ import { SVGInjector as A } from "./index120.js";
5
+ import { p as t } from "./index121.js";
6
+ import * as h from "react";
7
+ var O = function(s) {
8
+ var o = (s == null ? void 0 : s.ownerDocument) || document;
9
+ return o.defaultView || window;
10
+ }, U = function(s, o) {
11
+ for (var r in s)
12
+ if (!(r in o))
13
+ return !0;
14
+ for (var e in o)
15
+ if (s[e] !== o[e])
16
+ return !0;
17
+ return !1;
18
+ }, H = ["afterInjection", "beforeInjection", "desc", "evalScripts", "fallback", "httpRequestWithCredentials", "loading", "renumerateIRIElements", "src", "title", "useRequestCache", "wrapper"], v = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xlink", V = /* @__PURE__ */ function(c) {
19
+ function s() {
20
+ for (var r, e = arguments.length, n = new Array(e), a = 0; a < e; a++)
21
+ n[a] = arguments[a];
22
+ return r = c.call.apply(c, [this].concat(n)) || this, r.initialState = {
23
+ hasError: !1,
24
+ isLoading: !0
25
+ }, r.state = r.initialState, r._isMounted = !1, r.reactWrapper = void 0, r.nonReactWrapper = void 0, r.refCallback = function(u) {
26
+ r.reactWrapper = u;
27
+ }, r;
28
+ }
29
+ D(s, c);
30
+ var o = s.prototype;
31
+ return o.renderSVG = function() {
32
+ var e = this;
33
+ if (this.reactWrapper instanceof O(this.reactWrapper).Node) {
34
+ var n = this.props, a = n.desc, u = n.evalScripts, S = n.httpRequestWithCredentials, E = n.renumerateIRIElements, G = n.src, b = n.title, g = n.useRequestCache, w = this.props.onError, x = this.props.beforeInjection, y = this.props.afterInjection, f = this.props.wrapper, l, p;
35
+ f === "svg" ? (l = document.createElementNS(v, f), l.setAttribute("xmlns", v), l.setAttribute("xmlns:xlink", q), p = document.createElementNS(v, f)) : (l = document.createElement(f), p = document.createElement(f)), l.appendChild(p), p.dataset.src = G, this.nonReactWrapper = this.reactWrapper.appendChild(l);
36
+ var I = function(i) {
37
+ if (e.removeSVG(), !e._isMounted) {
38
+ w(i);
39
+ return;
40
+ }
41
+ e.setState(function() {
42
+ return {
43
+ hasError: !0,
44
+ isLoading: !1
45
+ };
46
+ }, function() {
47
+ w(i);
48
+ });
49
+ }, L = function(i, d) {
50
+ if (i) {
51
+ I(i);
52
+ return;
53
+ }
54
+ e._isMounted && e.setState(function() {
55
+ return {
56
+ isLoading: !1
57
+ };
58
+ }, function() {
59
+ try {
60
+ y(d);
61
+ } catch (m) {
62
+ I(m);
63
+ }
64
+ });
65
+ }, M = function(i) {
66
+ if (i.setAttribute("role", "img"), a) {
67
+ var d = i.querySelector(":scope > desc");
68
+ d && i.removeChild(d);
69
+ var m = document.createElement("desc");
70
+ m.innerHTML = a, i.prepend(m);
71
+ }
72
+ if (b) {
73
+ var j = i.querySelector(":scope > title");
74
+ j && i.removeChild(j);
75
+ var C = document.createElement("title");
76
+ C.innerHTML = b, i.prepend(C);
77
+ }
78
+ try {
79
+ x(i);
80
+ } catch (k) {
81
+ I(k);
82
+ }
83
+ };
84
+ A(p, {
85
+ afterEach: L,
86
+ beforeEach: M,
87
+ cacheRequests: g,
88
+ evalScripts: u,
89
+ httpRequestWithCredentials: S,
90
+ renumerateIRIElements: E
91
+ });
6
92
  }
7
- return t;
8
- }, e.apply(null, arguments);
9
- }
93
+ }, o.removeSVG = function() {
94
+ var e;
95
+ (e = this.nonReactWrapper) != null && e.parentNode && (this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper), this.nonReactWrapper = null);
96
+ }, o.componentDidMount = function() {
97
+ this._isMounted = !0, this.renderSVG();
98
+ }, o.componentDidUpdate = function(e) {
99
+ var n = this;
100
+ U(R({}, e), this.props) && this.setState(function() {
101
+ return n.initialState;
102
+ }, function() {
103
+ n.removeSVG(), n.renderSVG();
104
+ });
105
+ }, o.componentWillUnmount = function() {
106
+ this._isMounted = !1, this.removeSVG();
107
+ }, o.render = function() {
108
+ var e = this.props, n = e.fallback, a = e.loading, u = e.wrapper, S = N(e, H), E = u;
109
+ return /* @__PURE__ */ h.createElement(E, R({}, S, {
110
+ ref: this.refCallback
111
+ }, u === "svg" ? {
112
+ xmlns: v,
113
+ xmlnsXlink: q
114
+ } : {}), this.state.isLoading && a && /* @__PURE__ */ h.createElement(a, null), this.state.hasError && n && /* @__PURE__ */ h.createElement(n, null));
115
+ }, s;
116
+ }(h.Component);
117
+ V.defaultProps = {
118
+ afterInjection: function() {
119
+ },
120
+ beforeInjection: function() {
121
+ },
122
+ desc: "",
123
+ evalScripts: "never",
124
+ fallback: null,
125
+ httpRequestWithCredentials: !1,
126
+ loading: null,
127
+ onError: function() {
128
+ },
129
+ renumerateIRIElements: !0,
130
+ title: "",
131
+ useRequestCache: !0,
132
+ wrapper: "div"
133
+ };
134
+ V.propTypes = {
135
+ afterInjection: t.func,
136
+ beforeInjection: t.func,
137
+ desc: t.string,
138
+ evalScripts: t.oneOf(["always", "once", "never"]),
139
+ fallback: t.oneOfType([t.func, t.object, t.string]),
140
+ httpRequestWithCredentials: t.bool,
141
+ loading: t.oneOfType([t.func, t.object, t.string]),
142
+ onError: t.func,
143
+ renumerateIRIElements: t.bool,
144
+ src: t.string.isRequired,
145
+ title: t.string,
146
+ useRequestCache: t.bool,
147
+ wrapper: t.oneOf(["div", "span", "svg"])
148
+ };
10
149
  export {
11
- e as default
150
+ V as ReactSVG
12
151
  };
13
152
  //# sourceMappingURL=index100.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index100.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };"],"names":["_extends","n","e","t"],"mappings":"AAAA,SAASA,IAAW;AAClB,SAAOA,IAAW,OAAO,SAAS,OAAO,OAAO,KAAI,IAAK,SAAUC,GAAG;AACpE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,UAAIC,IAAI,UAAUD,CAAC;AACnB,eAAS,KAAKC,EAAG,EAAC,CAAE,GAAE,eAAe,KAAKA,GAAG,CAAC,MAAMF,EAAE,CAAC,IAAIE,EAAE,CAAC;AAAA,IACpE;AACI,WAAOF;AAAA,EACR,GAAED,EAAS,MAAM,MAAM,SAAS;AACnC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index100.js","sources":["../node_modules/react-svg/dist/react-svg.esm.js"],"sourcesContent":["import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/objectWithoutPropertiesLoose';\nimport _extends from '@babel/runtime/helpers/extends';\nimport _inheritsLoose from '@babel/runtime/helpers/inheritsLoose';\nimport { SVGInjector } from '@tanem/svg-injector';\nimport * as PropTypes from 'prop-types';\nimport * as React from 'react';\n\n// Hat-tip: https://github.com/mui/material-ui/tree/master/packages/mui-utils/src.\nvar ownerWindow = function ownerWindow(node) {\n var doc = (node == null ? undefined : node.ownerDocument) || document;\n return doc.defaultView || window;\n};\n\n// Hat-tip: https://github.com/developit/preact-compat/blob/master/src/index.js#L402.\nvar shallowDiffers = function shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) {\n return true;\n }\n }\n for (var _i in b) {\n if (a[_i] !== b[_i]) {\n return true;\n }\n }\n return false;\n};\n\nvar _excluded = [\"afterInjection\", \"beforeInjection\", \"desc\", \"evalScripts\", \"fallback\", \"httpRequestWithCredentials\", \"loading\", \"renumerateIRIElements\", \"src\", \"title\", \"useRequestCache\", \"wrapper\"];\nvar svgNamespace = 'http://www.w3.org/2000/svg';\nvar xlinkNamespace = 'http://www.w3.org/1999/xlink';\nvar ReactSVG = /*#__PURE__*/function (_React$Component) {\n function ReactSVG() {\n var _this;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.initialState = {\n hasError: false,\n isLoading: true\n };\n _this.state = _this.initialState;\n _this._isMounted = false;\n _this.reactWrapper = undefined;\n _this.nonReactWrapper = undefined;\n _this.refCallback = function (reactWrapper) {\n _this.reactWrapper = reactWrapper;\n };\n return _this;\n }\n _inheritsLoose(ReactSVG, _React$Component);\n var _proto = ReactSVG.prototype;\n _proto.renderSVG = function renderSVG() {\n var _this2 = this;\n /* istanbul ignore else */\n if (this.reactWrapper instanceof ownerWindow(this.reactWrapper).Node) {\n var _this$props = this.props,\n desc = _this$props.desc,\n evalScripts = _this$props.evalScripts,\n httpRequestWithCredentials = _this$props.httpRequestWithCredentials,\n renumerateIRIElements = _this$props.renumerateIRIElements,\n src = _this$props.src,\n title = _this$props.title,\n useRequestCache = _this$props.useRequestCache;\n /* eslint-disable @typescript-eslint/no-non-null-assertion */\n var onError = this.props.onError;\n var beforeInjection = this.props.beforeInjection;\n var afterInjection = this.props.afterInjection;\n var wrapper = this.props.wrapper;\n var nonReactWrapper;\n var nonReactTarget;\n if (wrapper === 'svg') {\n nonReactWrapper = document.createElementNS(svgNamespace, wrapper);\n nonReactWrapper.setAttribute('xmlns', svgNamespace);\n nonReactWrapper.setAttribute('xmlns:xlink', xlinkNamespace);\n nonReactTarget = document.createElementNS(svgNamespace, wrapper);\n } else {\n nonReactWrapper = document.createElement(wrapper);\n nonReactTarget = document.createElement(wrapper);\n }\n nonReactWrapper.appendChild(nonReactTarget);\n nonReactTarget.dataset.src = src;\n this.nonReactWrapper = this.reactWrapper.appendChild(nonReactWrapper);\n var handleError = function handleError(error) {\n _this2.removeSVG();\n if (!_this2._isMounted) {\n onError(error);\n return;\n }\n _this2.setState(function () {\n return {\n hasError: true,\n isLoading: false\n };\n }, function () {\n onError(error);\n });\n };\n var afterEach = function afterEach(error, svg) {\n if (error) {\n handleError(error);\n return;\n }\n // TODO (Tane): It'd be better to cleanly unsubscribe from SVGInjector\n // callbacks instead of tracking a property like this.\n if (_this2._isMounted) {\n _this2.setState(function () {\n return {\n isLoading: false\n };\n }, function () {\n try {\n afterInjection(svg);\n } catch (afterInjectionError) {\n handleError(afterInjectionError);\n }\n });\n }\n };\n var beforeEach = function beforeEach(svg) {\n svg.setAttribute('role', 'img');\n if (desc) {\n var originalDesc = svg.querySelector(':scope > desc');\n if (originalDesc) {\n svg.removeChild(originalDesc);\n }\n var newDesc = document.createElement('desc');\n newDesc.innerHTML = desc;\n svg.prepend(newDesc);\n }\n if (title) {\n var originalTitle = svg.querySelector(':scope > title');\n if (originalTitle) {\n svg.removeChild(originalTitle);\n }\n var newTitle = document.createElement('title');\n newTitle.innerHTML = title;\n svg.prepend(newTitle);\n }\n try {\n beforeInjection(svg);\n } catch (error) {\n handleError(error);\n }\n };\n SVGInjector(nonReactTarget, {\n afterEach: afterEach,\n beforeEach: beforeEach,\n cacheRequests: useRequestCache,\n evalScripts: evalScripts,\n httpRequestWithCredentials: httpRequestWithCredentials,\n renumerateIRIElements: renumerateIRIElements\n });\n }\n };\n _proto.removeSVG = function removeSVG() {\n var _this$nonReactWrapper;\n if ((_this$nonReactWrapper = this.nonReactWrapper) != null && _this$nonReactWrapper.parentNode) {\n this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper);\n this.nonReactWrapper = null;\n }\n };\n _proto.componentDidMount = function componentDidMount() {\n this._isMounted = true;\n this.renderSVG();\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this3 = this;\n if (shallowDiffers(_extends({}, prevProps), this.props)) {\n this.setState(function () {\n return _this3.initialState;\n }, function () {\n _this3.removeSVG();\n _this3.renderSVG();\n });\n }\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this._isMounted = false;\n this.removeSVG();\n };\n _proto.render = function render() {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n var _this$props2 = this.props;\n _this$props2.afterInjection;\n _this$props2.beforeInjection;\n _this$props2.desc;\n _this$props2.evalScripts;\n var Fallback = _this$props2.fallback;\n _this$props2.httpRequestWithCredentials;\n var Loading = _this$props2.loading;\n _this$props2.renumerateIRIElements;\n _this$props2.src;\n _this$props2.title;\n _this$props2.useRequestCache;\n var wrapper = _this$props2.wrapper,\n rest = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n /* eslint-enable @typescript-eslint/no-unused-vars */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var Wrapper = wrapper;\n return /*#__PURE__*/React.createElement(Wrapper, _extends({}, rest, {\n ref: this.refCallback\n }, wrapper === 'svg' ? {\n xmlns: svgNamespace,\n xmlnsXlink: xlinkNamespace\n } : {}), this.state.isLoading && Loading && /*#__PURE__*/React.createElement(Loading, null), this.state.hasError && Fallback && /*#__PURE__*/React.createElement(Fallback, null));\n };\n return ReactSVG;\n}(React.Component);\nReactSVG.defaultProps = {\n afterInjection: function afterInjection() {\n return undefined;\n },\n beforeInjection: function beforeInjection() {\n return undefined;\n },\n desc: '',\n evalScripts: 'never',\n fallback: null,\n httpRequestWithCredentials: false,\n loading: null,\n onError: function onError() {\n return undefined;\n },\n renumerateIRIElements: true,\n title: '',\n useRequestCache: true,\n wrapper: 'div'\n};\nReactSVG.propTypes = {\n afterInjection: PropTypes.func,\n beforeInjection: PropTypes.func,\n desc: PropTypes.string,\n evalScripts: PropTypes.oneOf(['always', 'once', 'never']),\n fallback: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string]),\n httpRequestWithCredentials: PropTypes.bool,\n loading: PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.string]),\n onError: PropTypes.func,\n renumerateIRIElements: PropTypes.bool,\n src: PropTypes.string.isRequired,\n title: PropTypes.string,\n useRequestCache: PropTypes.bool,\n wrapper: PropTypes.oneOf(['div', 'span', 'svg'])\n} ;\n\nexport { ReactSVG };\n//# sourceMappingURL=react-svg.esm.js.map\n"],"names":["_objectWithoutPropertiesLoose","_extends","_inheritsLoose","SVGInjector","propTypesExports","React","ownerWindow","node","doc","shallowDiffers","a","b","i","_i","_excluded","svgNamespace","xlinkNamespace","ReactSVG","_React$Component","_this","_len","args","_key","reactWrapper","_proto","_this2","_this$props","desc","evalScripts","httpRequestWithCredentials","renumerateIRIElements","src","title","useRequestCache","onError","beforeInjection","afterInjection","wrapper","nonReactWrapper","nonReactTarget","handleError","error","afterEach","svg","afterInjectionError","beforeEach","originalDesc","newDesc","originalTitle","newTitle","_this$nonReactWrapper","prevProps","_this3","_this$props2","Fallback","Loading","rest","Wrapper","PropTypes.func","PropTypes.string","PropTypes.oneOf","PropTypes.oneOfType","PropTypes.object","PropTypes.bool"],"mappings":"AAOA,OAAAA,OAAA;AAAA,OAAAC,OAAA;AAAA,OAAAC,OAAA;AAAA,SAAA,eAAAC,SAAA;AAAA,SAAA,KAAAC,SAAA;AAAA,YAAAC,OAAA;AACA,IAAIC,IAAc,SAAqBC,GAAM;AAC3C,MAAIC,KAAOD,KAAQ,OAAO,SAAYA,EAAK,kBAAkB;AAC7D,SAAOC,EAAI,eAAe;AAC5B,GAGIC,IAAiB,SAAwBC,GAAGC,GAAG;AACjD,WAASC,KAAKF;AACZ,QAAI,EAAEE,KAAKD;AACT,aAAO;AAGX,WAASE,KAAMF;AACb,QAAID,EAAEG,CAAE,MAAMF,EAAEE,CAAE;AAChB,aAAO;AAGX,SAAO;AACT,GAEIC,IAAY,CAAC,kBAAkB,mBAAmB,QAAQ,eAAe,YAAY,8BAA8B,WAAW,yBAAyB,OAAO,SAAS,mBAAmB,SAAS,GACnM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,OAAOtB;AAAA,MACP,YAAYC;AAAA,IAClB,IAAQ,CAAE,CAAA,GAAG,KAAK,MAAM,aAAauC,KAAwB,gBAAAlD,EAAM,cAAckD,GAAS,IAAI,GAAG,KAAK,MAAM,YAAYD,KAAyB,gBAAAjD,EAAM,cAAciD,GAAU,IAAI,CAAC;AAAA,EACjL,GACMrC;AACT,EAAEZ,EAAM,SAAS;AACjBY,EAAS,eAAe;AAAA,EACtB,gBAAgB,WAA0B;AAAA,EAEzC;AAAA,EACD,iBAAiB,WAA2B;AAAA,EAE3C;AAAA,EACD,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,4BAA4B;AAAA,EAC5B,SAAS;AAAA,EACT,SAAS,WAAmB;AAAA,EAE3B;AAAA,EACD,uBAAuB;AAAA,EACvB,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,SAAS;AACX;AACAA,EAAS,YAAY;AAAA,EACnB,gBAAgByC,EAAc;AAAA,EAC9B,iBAAiBA,EAAc;AAAA,EAC/B,MAAMC,EAAgB;AAAA,EACtB,aAAaC,EAAAA,MAAgB,CAAC,UAAU,QAAQ,OAAO,CAAC;AAAA,EACxD,UAAUC,EAAAA,UAAoB,CAACH,EAAc,MAAEI,EAAgB,QAAEH,EAAgB,MAAA,CAAC;AAAA,EAClF,4BAA4BI,EAAc;AAAA,EAC1C,SAASF,EAAAA,UAAoB,CAACH,EAAc,MAAEI,EAAgB,QAAEH,EAAgB,MAAA,CAAC;AAAA,EACjF,SAASD,EAAc;AAAA,EACvB,uBAAuBK,EAAc;AAAA,EACrC,KAAKJ,EAAgB,OAAC;AAAA,EACtB,OAAOA,EAAgB;AAAA,EACvB,iBAAiBI,EAAc;AAAA,EAC/B,SAASH,EAAAA,MAAgB,CAAC,OAAO,QAAQ,KAAK,CAAC;AACjD;","x_google_ignoreList":[0]}
package/dist/index11.js CHANGED
@@ -1,34 +1,19 @@
1
- import t from "react";
2
- import { Badge as s } from "./index7.js";
3
- import { Icon as g } from "./index4.js";
4
- const v = (l) => {
1
+ import e from "react";
2
+ import { Spinner as n } from "./index12.js";
3
+ /* empty css */
4
+ const c = (l) => {
5
5
  const {
6
- label: a = "",
7
- icon: e,
8
- tag: r = "",
9
- iconPosition: o = "right",
10
- onClick: n,
11
- isActive: i = !1
12
- } = l, c = (m) => /* @__PURE__ */ t.createElement(g, {
13
- name: m
14
- });
15
- return /* @__PURE__ */ t.createElement("div", {
16
- className: `se-design-menu-item flex items-center justify-between p-2 text-[var(--color-gray-900)] hover:bg-[var(--color-blue-100)] cursor-pointer rounded-[6px] gap-2 ${i ? "bg-[var(--color-blue-100)]" : ""}`,
17
- onClick: () => n && n({
18
- label: a,
19
- tag: r,
20
- icon: e,
21
- iconPosition: o
22
- })
23
- }, /* @__PURE__ */ t.createElement("div", {
24
- className: "flex items-center gap-1"
25
- }, o === "left" && e && c(e), /* @__PURE__ */ t.createElement("span", {
26
- className: "text-[var(--color-gray-900)]"
27
- }, a), o === "right" && e && c(e)), r && /* @__PURE__ */ t.createElement(s, {
28
- label: r
29
- }));
6
+ message: t = ""
7
+ } = l;
8
+ return /* @__PURE__ */ e.createElement("div", {
9
+ className: "se-design-loading-modal fixed inset-0 flex items-start justify-center z-[2000] backdrop-brightness-50"
10
+ }, /* @__PURE__ */ e.createElement("div", {
11
+ className: "modal-content flex flex-col gap-3 bg-[var(--color-white)] rounded shadow-lg p-8 mt-14 w-[350px]"
12
+ }, /* @__PURE__ */ e.createElement("div", {
13
+ className: "loading-modal-content flex flex-col items-center justify-center gap-[10px]"
14
+ }, /* @__PURE__ */ e.createElement(n, null), (t == null ? void 0 : t.length) > 0 && /* @__PURE__ */ e.createElement("div", null, t))));
30
15
  };
31
16
  export {
32
- v as MenuItem
17
+ c as LoadingModal
33
18
  };
34
19
  //# sourceMappingURL=index11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index11.js","sources":["../src/components/MenuItem/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Badge } from 'src/components/Badge';\nimport { Icon } from 'components/Icon';\n\nexport type MenuItemProps = {\n label: string;\n tag?: string;\n isDisabled?: boolean;\n isActive?: boolean;\n icon?: string;\n iconPosition?: 'left' | 'right';\n onClick?: (item: MenuItemProps) => void;\n};\n\nexport const MenuItem: FC<MenuItemProps> = (props) => {\n const { label = '', icon, tag = '', iconPosition = \"right\", onClick, isActive = false } = props;\n\n const getIconJsx = (icon: string) => {\n return <Icon name={icon} />\n }\n\n return (\n <div\n className={`se-design-menu-item flex items-center justify-between p-2 text-[var(--color-gray-900)] hover:bg-[var(--color-blue-100)] cursor-pointer rounded-[6px] gap-2 ${isActive ? 'bg-[var(--color-blue-100)]': ''}`}\n onClick={() => onClick && onClick({label, tag, icon, iconPosition})}\n >\n <div className='flex items-center gap-1'>\n {iconPosition === 'left' && icon && getIconJsx(icon)}\n <span className=\"text-[var(--color-gray-900)]\">{label}</span>\n {iconPosition === 'right' && icon && getIconJsx(icon)}\n </div>\n {tag && <Badge label={tag} />}\n </div>\n );\n};\n"],"names":["React__default","Badge","Icon","MenuItem","props","label","icon","tag","iconPosition","onClick","isActive","getIconJsx","React","createElement","name","className"],"mappings":"AAcO,OAAAA,OAAA;AAAA,SAAA,SAAAC,SAAA;AAAA,SAAA,QAAAC,SAAA;AAAA,MAAMC,IAA+BC,CAAUA,MAAA;AAC9C,QAAA;AAAA,IAAEC,OAAAA,IAAQ;AAAA,IAAIC,MAAAA;AAAAA,IAAMC,KAAAA,IAAM;AAAA,IAAIC,cAAAA,IAAe;AAAA,IAASC,SAAAA;AAAAA,IAASC,UAAAA,IAAW;AAAA,EAAA,IAAUN,GAEpFO,IAAaA,CAACL,MACXM,gBAAAA,EAAAC,cAACX,GAAI;AAAA,IAACY,MAAMR;AAAAA,EAAAA,CAAO;AAI1BM,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEE,WAAW,8JAA8JL,IAAW,+BAA8B,EAAE;AAAA,IACpND,SAASA,MAAMA,KAAWA,EAAQ;AAAA,MAACJ,OAAAA;AAAAA,MAAOE,KAAAA;AAAAA,MAAKD,MAAAA;AAAAA,MAAME,cAAAA;AAAAA,IAAa,CAAA;AAAA,EAAA,GAElEK,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKE,WAAU;AAAA,EAAA,GACZP,MAAiB,UAAUF,KAAQK,EAAWL,CAAI,GACnDO,gBAAAA,EAAAA,cAAA,QAAA;AAAA,IAAME,WAAU;AAAA,EAAgCV,GAAAA,CAAY,GAC3DG,MAAiB,WAAWF,KAAQK,EAAWL,CAAI,CACjD,GACJC,KAAOK,gBAAAA,EAAAC,cAACZ,GAAK;AAAA,IAACI,OAAOE;AAAAA,EAAAA,CAAM,CACzB;AAET;"}
1
+ {"version":3,"file":"index11.js","sources":["../src/components/LoadingModal/index.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Spinner } from 'components/Spinner';\n\nimport './style.scss';\n\nexport interface LoadingModalProps {\n message?: string;\n}\n\nexport const LoadingModal: FC<LoadingModalProps> = (props) => {\n const { message = ''} = props;\n\n return (\n <div\n className={`se-design-loading-modal fixed inset-0 flex items-start justify-center z-[2000] backdrop-brightness-50`}\n >\n <div\n className=\"modal-content flex flex-col gap-3 bg-[var(--color-white)] rounded shadow-lg p-8 mt-14 w-[350px]\"\n >\n <div className=\"loading-modal-content flex flex-col items-center justify-center gap-[10px]\">\n <Spinner />\n {message?.length > 0 && <div>{message}</div>}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["React__default","Spinner","LoadingModal","props","message","React","createElement","className","length"],"mappings":"AASO,OAAAA,OAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAuCC,CAAUA,MAAA;AACtD,QAAA;AAAA,IAAEC,SAAAA,IAAU;AAAA,EAAA,IAAMD;AAGtBE,SAAAA,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IACEC,WAAW;AAAA,EAAA,GAEXD,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IACEC,WAAU;AAAA,EAAA,GAEVD,gBAAAA,EAAAA,cAAA,OAAA;AAAA,IAAKC,WAAU;AAAA,EAAA,GACbD,gBAAAA,EAAAA,cAACL,GAAS,IAAA,IACTG,KAAAA,gBAAAA,EAASI,UAAS,KAAKH,gBAAAA,EAAAC,2BAAMF,CAAa,CACxC,CACF,CACF;AAET;"}