kdpa-components 1.0.0 → 1.2.0

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 (149) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/Accordion/index.js +17 -19
  3. package/dist/Alert/index.js +19 -20
  4. package/dist/{ArrowDropDown-4bc3084f.js → ArrowDropDown-07b9ccae.js} +19 -20
  5. package/dist/Avatar/index.js +7 -8
  6. package/dist/Badge/index.js +22 -24
  7. package/dist/{Box-af81b133.js → Box-032e9a1d.js} +25 -27
  8. package/dist/{Button-da8592f4.js → Button-9d9cc0bd.js} +18 -20
  9. package/dist/{ButtonBase-496494a5.js → ButtonBase-fa4630c8.js} +35 -37
  10. package/dist/Buttons/index.js +28 -30
  11. package/dist/{CSSTransition-5496e075.js → CSSTransition-7e2d0e80.js} +3 -3
  12. package/dist/Cards/index.d.ts +2 -0
  13. package/dist/Cards/index.d.ts.map +1 -1
  14. package/dist/Cards/index.js +150 -1
  15. package/dist/CheckBox/index.js +13 -14
  16. package/dist/Chip/index.js +17 -19
  17. package/dist/{Chip-2dfcd6e9.js → Chip-e5751770.js} +25 -27
  18. package/dist/{CircularProgress-e1f22f2a.js → CircularProgress-01a8929e.js} +19 -21
  19. package/dist/{Close-319784e1.js → Close-db7afda5.js} +2 -2
  20. package/dist/Collapse/index.js +10 -12
  21. package/dist/{Collapse-75d5ed79.js → Collapse-547e6c7a.js} +27 -30
  22. package/dist/CopyToClipboard/index.js +24 -26
  23. package/dist/{Dialog-0eadb508.js → Dialog-652a3ad4.js} +19 -21
  24. package/dist/Divider/index.js +7 -8
  25. package/dist/DropZone/index.js +34 -36
  26. package/dist/{Fade-6a96fc41.js → Fade-7ee2c0a4.js} +23 -25
  27. package/dist/FormControl/index.js +12 -13
  28. package/dist/{FormControl-c914b3de.js → FormControl-ca7447ab.js} +13 -15
  29. package/dist/FullScreenDialog/index.js +20 -22
  30. package/dist/Grid/index.js +9 -10
  31. package/dist/{Grid-4cbef6c7.js → Grid-9708b9ca.js} +65 -67
  32. package/dist/{Grow-8a97586f.js → Grow-55d0786d.js} +17 -19
  33. package/dist/{IconButton-b4e677f7.js → IconButton-48d87778.js} +30 -32
  34. package/dist/Input/index.js +27 -29
  35. package/dist/{KdpaAccordions-60fefaf0.js → KdpaAccordions-2ae65dd1.js} +126 -115
  36. package/dist/{KdpaAlertTitle-497100ba.js → KdpaAlertTitle-f1549035.js} +93 -82
  37. package/dist/{KdpaAutoComplete-9c0b8d4d.js → KdpaAutoComplete-8a11974a.js} +237 -234
  38. package/dist/{KdpaAvatar-da84b516.js → KdpaAvatar-d297ef8a.js} +75 -72
  39. package/dist/{KdpaCheckBox-d06c93b0.js → KdpaCheckBox-84d56486.js} +33 -30
  40. package/dist/KdpaChip-10899788.js +51 -0
  41. package/dist/KdpaCircularProgress-6c4605cd.js +76 -0
  42. package/dist/KdpaCollapse-2d23c312.js +12 -0
  43. package/dist/KdpaCollapse-73c03e02.js +23 -0
  44. package/dist/{KdpaCopyToClipboard-2c36d593.js → KdpaCopyToClipboard-53aa97d3.js} +196 -160
  45. package/dist/{KdpaDateTimePicker-8e9da3c8.js → KdpaDateTimePicker-cb4a16d0.js} +10530 -13197
  46. package/dist/{KdpaDivider-10de74db.js → KdpaDivider-1c62c65a.js} +95 -84
  47. package/dist/{KdpaDropZone-85943160.js → KdpaDropZone-b21d2304.js} +631 -531
  48. package/dist/KdpaFormControl-135b070d.js +10 -0
  49. package/dist/{KdpaFormControlLabel-8a6ff2a6.js → KdpaFormControlLabel-249b7622.js} +57 -54
  50. package/dist/KdpaFullScreenDialog-e56db731.js +24 -0
  51. package/dist/KdpaGrid-2a3f9346.js +12 -0
  52. package/dist/{KdpaGridBadge-d8a8e388.js → KdpaGridBadge-65b88a7a.js} +123 -104
  53. package/dist/KdpaIconButton-a0ee669c.js +35 -0
  54. package/dist/KdpaInputMultiline-231a2be1.js +68 -0
  55. package/dist/{KdpaLazyDrop-347b6e24.js → KdpaLazyDrop-1985fc75.js} +254 -217
  56. package/dist/KdpaMenuItem-99cde871.js +56 -0
  57. package/dist/{KdpaSimpleModal-6ab72b9c.js → KdpaModalImage-eb732bf0.js} +176 -185
  58. package/dist/{KdpaPaginationGrid-6e4cd782.js → KdpaPaginationGrid-97a5b164.js} +343 -283
  59. package/dist/{KdpaRadioGroup-de6c67d4.js → KdpaRadioGroup-87122ec7.js} +129 -122
  60. package/dist/{KdpaRtlProvider-d7cc5029.js → KdpaRtlProvider-495e4bb0.js} +169 -162
  61. package/dist/KdpaSecondaryButton-a70aafe5.js +44 -0
  62. package/dist/KdpaSkeleton-f8f3aefc.js +580 -0
  63. package/dist/{KdpaSlider-93a991f0.js → KdpaSlider-b7226e20.js} +196 -182
  64. package/dist/{KdpaSwitch-2f07cd38.js → KdpaSwitch-b2ba7c23.js} +50 -43
  65. package/dist/KdpaTabs-ab618f36.js +50 -0
  66. package/dist/{KdpaTooltip-e30e1eea.js → KdpaTooltip-653424c7.js} +95 -88
  67. package/dist/{KdpaTree-8428a368.js → KdpaTree-2e1df83d.js} +348 -304
  68. package/dist/{KdpaTreeSelect-7fe5581c.js → KdpaTreeSelect-0152302e.js} +625 -609
  69. package/dist/KdpaTypography-763c3238.js +10 -0
  70. package/dist/KdpaZoom-1b0f3404.js +22 -0
  71. package/dist/KpdaPrimaryButton-5416aa2c.js +79 -0
  72. package/dist/LazyDrop/index.js +24 -24
  73. package/dist/{ListItem-da6701a3.js → ListItem-ddec0b28.js} +14 -16
  74. package/dist/Loading/KdpaProgress/index.js +12 -13
  75. package/dist/Loading/index.js +11 -12
  76. package/dist/{MenuItem-b9a45c1d.js → MenuItem-057c85a3.js} +44 -46
  77. package/dist/Modal/index.d.ts +0 -2
  78. package/dist/Modal/index.d.ts.map +1 -1
  79. package/dist/Modal/index.js +3 -17
  80. package/dist/{Modal-1e4a342f.js → Modal-daf2a588.js} +18 -20
  81. package/dist/PaginationGrid/index.js +33 -34
  82. package/dist/{Paper-ad7ba238.js → Paper-00aea968.js} +16 -18
  83. package/dist/Pickers/index.d.ts +2 -1
  84. package/dist/Pickers/index.d.ts.map +1 -1
  85. package/dist/Pickers/index.js +43 -45
  86. package/dist/{Popper-20f4d1e9.js → Popper-7adcd815.js} +13 -15
  87. package/dist/{Portal-1b00a402.js → Portal-de5e310c.js} +6 -7
  88. package/dist/Radio/index.js +14 -15
  89. package/dist/Selects/index.js +39 -40
  90. package/dist/{Slide-d61a6d2b.js → Slide-803fd098.js} +17 -19
  91. package/dist/Slider/index.js +8 -9
  92. package/dist/Switch/index.js +12 -13
  93. package/dist/{SwitchBase-e8b18f94.js → SwitchBase-64e5662e.js} +14 -16
  94. package/dist/Tabs/index.js +16 -17
  95. package/dist/{Tabs-1cc5862d.js → Tabs-1140d353.js} +87 -89
  96. package/dist/{TextField-c2c0172a.js → TextField-57c51dbe.js} +52 -54
  97. package/dist/ThemeProvider/index.js +7 -8
  98. package/dist/Tooltips/index.js +16 -18
  99. package/dist/{TransitionGroup-68fd1866.js → TransitionGroup-f9877c5b.js} +2 -2
  100. package/dist/Transitions/index.js +22 -24
  101. package/dist/Tree/index.js +2 -2
  102. package/dist/TreeSelect/index.js +3 -3
  103. package/dist/Typography/index.js +8 -9
  104. package/dist/{Typography-9a28b393.js → Typography-db7e5ea2.js} +42 -44
  105. package/dist/{Zoom-64a4beac.js → Zoom-36a189bb.js} +22 -24
  106. package/dist/{createSvgIcon-5cb90f79.js → createSvgIcon-1aa1b2b2.js} +20 -22
  107. package/dist/{dividerClasses-6f4cb6be.js → dividerClasses-a9b8b1ae.js} +2 -2
  108. package/dist/{elementAcceptingRef-332a290a.js → elementAcceptingRef-bd96c731.js} +1 -1
  109. package/dist/{elementTypeAcceptingRef-05dea79e.js → elementTypeAcceptingRef-dea9e62a.js} +1 -1
  110. package/dist/{emotion-react.browser.esm-921c014a.js → emotion-react.browser.esm-3fa5f721.js} +1 -1
  111. package/dist/{exactProp-7fadf441.js → exactProp-86f148d5.js} +1 -1
  112. package/dist/{extendSxProp-eacd850e.js → extendSxProp-d294b946.js} +2 -2
  113. package/dist/{extends-393586f3.js → extends-135d7828.js} +2 -2
  114. package/dist/identifier-2647f844.js +3775 -0
  115. package/dist/{index-456f3e1b.js → index-5f8afc53.js} +5 -5
  116. package/dist/index.js +140 -142
  117. package/dist/jsx-dev-runtime-48fdc504.js +615 -0
  118. package/dist/kdpaSelect-4ed993c7.js +1 -0
  119. package/dist/{listItemTextClasses-f7759ba4.js → listItemTextClasses-da281500.js} +2 -2
  120. package/dist/{refType-7c2b090c.js → refType-450337d6.js} +1 -1
  121. package/dist/style.css +1 -1
  122. package/dist/{useSlotProps-db1ead27.js → useSlotProps-3b927bcb.js} +2 -2
  123. package/dist/{useTheme-2bb6b2df.js → useTheme-6ea322ec.js} +2 -2
  124. package/dist/{useThemeProps-114e8d66.js → useThemeProps-ea792506.js} +11 -11
  125. package/dist/{Transition-2ecbc61d.js → utils-acd98a68.js} +113 -98
  126. package/package.json +90 -87
  127. package/dist/KdpaChip-f94c5b7e.js +0 -31
  128. package/dist/KdpaCircularProgress-aed28149.js +0 -44
  129. package/dist/KdpaCollapse-73e5e40c.js +0 -8
  130. package/dist/KdpaCollapse-7f12a32a.js +0 -11
  131. package/dist/KdpaFormControl-ae8f7241.js +0 -6
  132. package/dist/KdpaFullScreenDialog-f60e21f3.js +0 -16
  133. package/dist/KdpaGrid-b93fab29.js +0 -8
  134. package/dist/KdpaIconButton-f5146164.js +0 -23
  135. package/dist/KdpaInputMultiline-71dfbfe5.js +0 -48
  136. package/dist/KdpaMenuItem-9a9ece89.js +0 -35
  137. package/dist/KdpaSecondaryButton-9b81f97d.js +0 -28
  138. package/dist/KdpaSkeleton-4696fadd.js +0 -541
  139. package/dist/KdpaTabs-a76a17a7.js +0 -38
  140. package/dist/KdpaTypography-17403558.js +0 -6
  141. package/dist/KdpaZoom-96a648cb.js +0 -10
  142. package/dist/KpdaPrimaryButton-9a5d8d6d.js +0 -47
  143. package/dist/Sanitizer/index.d.ts +0 -3
  144. package/dist/Sanitizer/index.d.ts.map +0 -1
  145. package/dist/Sanitizer/index.js +0 -492
  146. package/dist/identifier-5cabf5ae.js +0 -2481
  147. package/dist/index-f4329b29.js +0 -669
  148. package/dist/jsx-runtime-944c88e2.js +0 -631
  149. package/dist/utils-8a7b223e.js +0 -18
@@ -1,13 +1,13 @@
1
- import { j as M } from "./jsx-runtime-944c88e2.js";
2
- import v, { forwardRef as Pe, useEffect as F, useReducer as Re, useState as ee, useRef as H, isValidElement as K, cloneElement as ce, useLayoutEffect as Ne } from "react";
3
- import { c as S } from "./useThemeProps-114e8d66.js";
4
- import { M as Le } from "./index.esm-b78383d3.js";
5
- import { K as De } from "./KdpaTooltip-e30e1eea.js";
1
+ import { j as M } from "./jsx-dev-runtime-48fdc504.js";
2
+ import v, { forwardRef as xe, useEffect as K, useReducer as De, useState as ee, useRef as F, isValidElement as U, cloneElement as ce, useLayoutEffect as ke } from "react";
3
+ import { c as S } from "./useThemeProps-ea792506.js";
4
+ import { M as Pe } from "./index.esm-b78383d3.js";
5
+ import { K as Re } from "./KdpaTooltip-653424c7.js";
6
6
  import "./kdpaButton-4ed993c7.js";
7
7
  import "./kdpaPrimaryButton-4ed993c7.js";
8
- import { K as ke } from "./KdpaSecondaryButton-9b81f97d.js";
9
- import { I as Me } from "./IconButton-b4e677f7.js";
10
- const W = (e) => typeof e == "number" && !isNaN(e), q = (e) => typeof e == "string", w = (e) => typeof e == "function", Z = (e) => q(e) || w(e) ? e : null, se = (e) => K(e) || q(e) || w(e) || W(e);
8
+ import { K as Le } from "./KdpaSecondaryButton-a70aafe5.js";
9
+ import { I as Me } from "./IconButton-48d87778.js";
10
+ const V = (e) => typeof e == "number" && !isNaN(e), H = (e) => typeof e == "string", N = (e) => typeof e == "function", Z = (e) => H(e) || N(e) ? e : null, se = (e) => U(e) || H(e) || N(e) || V(e);
11
11
  function Se(e, t, n) {
12
12
  n === void 0 && (n = 300);
13
13
  const { scrollHeight: o, style: a } = e;
@@ -21,24 +21,24 @@ function oe(e) {
21
21
  let { enter: t, exit: n, appendPosition: o = !1, collapse: a = !0, collapseDuration: i = 300 } = e;
22
22
  return function(r) {
23
23
  let { children: s, position: y, preventExitTransition: g, done: u, nodeRef: f, isIn: E } = r;
24
- const l = o ? `${t}--${y}` : t, p = o ? `${n}--${y}` : n, m = H(0);
25
- return Ne(() => {
26
- const c = f.current, d = l.split(" "), C = (_) => {
27
- _.target === f.current && (c.dispatchEvent(new Event("d")), c.removeEventListener("animationend", C), c.removeEventListener("animationcancel", C), m.current === 0 && _.type !== "animationcancel" && c.classList.remove(...d));
24
+ const l = o ? `${t}--${y}` : t, d = o ? `${n}--${y}` : n, m = F(0);
25
+ return ke(() => {
26
+ const c = f.current, p = l.split(" "), T = (_) => {
27
+ _.target === f.current && (c.dispatchEvent(new Event("d")), c.removeEventListener("animationend", T), c.removeEventListener("animationcancel", T), m.current === 0 && _.type !== "animationcancel" && c.classList.remove(...p));
28
28
  };
29
- c.classList.add(...d), c.addEventListener("animationend", C), c.addEventListener("animationcancel", C);
30
- }, []), F(() => {
31
- const c = f.current, d = () => {
32
- c.removeEventListener("animationend", d), a ? Se(c, u, i) : u();
29
+ c.classList.add(...p), c.addEventListener("animationend", T), c.addEventListener("animationcancel", T);
30
+ }, []), K(() => {
31
+ const c = f.current, p = () => {
32
+ c.removeEventListener("animationend", p), a ? Se(c, u, i) : u();
33
33
  };
34
- E || (g ? d() : (m.current = 1, c.className += ` ${p}`, c.addEventListener("animationend", d)));
34
+ E || (g ? p() : (m.current = 1, c.className += ` ${d}`, c.addEventListener("animationend", p)));
35
35
  }, [E]), v.createElement(v.Fragment, null, s);
36
36
  };
37
37
  }
38
38
  function me(e, t) {
39
39
  return { content: e.content, containerId: e.props.containerId, id: e.props.toastId, theme: e.props.theme, type: e.props.type, data: e.props.data || {}, isLoading: e.props.isLoading, icon: e.props.icon, status: t };
40
40
  }
41
- const R = { list: /* @__PURE__ */ new Map(), emitQueue: /* @__PURE__ */ new Map(), on(e, t) {
41
+ const D = { list: /* @__PURE__ */ new Map(), emitQueue: /* @__PURE__ */ new Map(), on(e, t) {
42
42
  return this.list.has(e) || this.list.set(e, []), this.list.get(e).push(t), this;
43
43
  }, off(e, t) {
44
44
  if (t) {
@@ -56,89 +56,89 @@ const R = { list: /* @__PURE__ */ new Map(), emitQueue: /* @__PURE__ */ new Map(
56
56
  }, 0);
57
57
  this.emitQueue.has(e) || this.emitQueue.set(e, []), this.emitQueue.get(e).push(n);
58
58
  });
59
- } }, Y = (e) => {
59
+ } }, G = (e) => {
60
60
  let { theme: t, type: n, ...o } = e;
61
61
  return v.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${n})`, ...o });
62
62
  }, ie = { info: function(e) {
63
- return v.createElement(Y, { ...e }, v.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
63
+ return v.createElement(G, { ...e }, v.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
64
64
  }, warning: function(e) {
65
- return v.createElement(Y, { ...e }, v.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
65
+ return v.createElement(G, { ...e }, v.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
66
66
  }, success: function(e) {
67
- return v.createElement(Y, { ...e }, v.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
67
+ return v.createElement(G, { ...e }, v.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
68
68
  }, error: function(e) {
69
- return v.createElement(Y, { ...e }, v.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
69
+ return v.createElement(G, { ...e }, v.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
70
70
  }, spinner: function() {
71
71
  return v.createElement("div", { className: "Toastify__spinner" });
72
72
  } };
73
73
  function je(e) {
74
- const [, t] = Re((l) => l + 1, 0), [n, o] = ee([]), a = H(null), i = H(/* @__PURE__ */ new Map()).current, r = (l) => n.indexOf(l) !== -1, s = H({ toastKey: 1, displayedToast: 0, count: 0, queue: [], props: e, containerId: null, isToastActive: r, getToast: (l) => i.get(l) }).current;
74
+ const [, t] = De((l) => l + 1, 0), [n, o] = ee([]), a = F(null), i = F(/* @__PURE__ */ new Map()).current, r = (l) => n.indexOf(l) !== -1, s = F({ toastKey: 1, displayedToast: 0, count: 0, queue: [], props: e, containerId: null, isToastActive: r, getToast: (l) => i.get(l) }).current;
75
75
  function y(l) {
76
- let { containerId: p } = l;
76
+ let { containerId: d } = l;
77
77
  const { limit: m } = s.props;
78
- !m || p && s.containerId !== p || (s.count -= s.queue.length, s.queue = []);
78
+ !m || d && s.containerId !== d || (s.count -= s.queue.length, s.queue = []);
79
79
  }
80
80
  function g(l) {
81
- o((p) => l == null ? [] : p.filter((m) => m !== l));
81
+ o((d) => l == null ? [] : d.filter((m) => m !== l));
82
82
  }
83
83
  function u() {
84
- const { toastContent: l, toastProps: p, staleId: m } = s.queue.shift();
85
- E(l, p, m);
84
+ const { toastContent: l, toastProps: d, staleId: m } = s.queue.shift();
85
+ E(l, d, m);
86
86
  }
87
- function f(l, p) {
88
- let { delay: m, staleId: c, ...d } = p;
89
- if (!se(l) || function(P) {
90
- return !a.current || s.props.enableMultiContainer && P.containerId !== s.props.containerId || i.has(P.toastId) && P.updateId == null;
91
- }(d))
87
+ function f(l, d) {
88
+ let { delay: m, staleId: c, ...p } = d;
89
+ if (!se(l) || function(x) {
90
+ return !a.current || s.props.enableMultiContainer && x.containerId !== s.props.containerId || i.has(x.toastId) && x.updateId == null;
91
+ }(p))
92
92
  return;
93
- const { toastId: C, updateId: _, data: h } = d, { props: b } = s, D = () => g(C), k = _ == null;
94
- k && s.count++;
95
- const O = { ...b, style: b.toastStyle, key: s.toastKey++, ...Object.fromEntries(Object.entries(d).filter((P) => {
96
- let [N, I] = P;
97
- return I != null;
98
- })), toastId: C, updateId: _, data: h, closeToast: D, isIn: !1, className: Z(d.className || b.toastClassName), bodyClassName: Z(d.bodyClassName || b.bodyClassName), progressClassName: Z(d.progressClassName || b.progressClassName), autoClose: !d.isLoading && (j = d.autoClose, U = b.autoClose, j === !1 || W(j) && j > 0 ? j : U), deleteToast() {
99
- const P = me(i.get(C), "removed");
100
- i.delete(C), R.emit(4, P);
101
- const N = s.queue.length;
102
- if (s.count = C == null ? s.count - s.displayedToast : s.count - 1, s.count < 0 && (s.count = 0), N > 0) {
103
- const I = C == null ? s.props.limit : 1;
104
- if (N === 1 || I === 1)
93
+ const { toastId: T, updateId: _, data: h } = p, { props: b } = s, R = () => g(T), L = _ == null;
94
+ L && s.count++;
95
+ const O = { ...b, style: b.toastStyle, key: s.toastKey++, ...Object.fromEntries(Object.entries(p).filter((x) => {
96
+ let [k, w] = x;
97
+ return w != null;
98
+ })), toastId: T, updateId: _, data: h, closeToast: R, isIn: !1, className: Z(p.className || b.toastClassName), bodyClassName: Z(p.bodyClassName || b.bodyClassName), progressClassName: Z(p.progressClassName || b.progressClassName), autoClose: !p.isLoading && (j = p.autoClose, q = b.autoClose, j === !1 || V(j) && j > 0 ? j : q), deleteToast() {
99
+ const x = me(i.get(T), "removed");
100
+ i.delete(T), D.emit(4, x);
101
+ const k = s.queue.length;
102
+ if (s.count = T == null ? s.count - s.displayedToast : s.count - 1, s.count < 0 && (s.count = 0), k > 0) {
103
+ const w = T == null ? s.props.limit : 1;
104
+ if (k === 1 || w === 1)
105
105
  s.displayedToast++, u();
106
106
  else {
107
- const A = I > N ? N : I;
107
+ const A = w > k ? k : w;
108
108
  s.displayedToast = A;
109
- for (let x = 0; x < A; x++)
109
+ for (let I = 0; I < A; I++)
110
110
  u();
111
111
  }
112
112
  } else
113
113
  t();
114
114
  } };
115
- var j, U;
116
- O.iconOut = function(P) {
117
- let { theme: N, type: I, isLoading: A, icon: x } = P, L = null;
118
- const $ = { theme: N, type: I };
119
- return x === !1 || (w(x) ? L = x($) : K(x) ? L = ce(x, $) : q(x) || W(x) ? L = x : A ? L = ie.spinner() : ((G) => G in ie)(I) && (L = ie[I]($))), L;
120
- }(O), w(d.onOpen) && (O.onOpen = d.onOpen), w(d.onClose) && (O.onClose = d.onClose), O.closeButton = b.closeButton, d.closeButton === !1 || se(d.closeButton) ? O.closeButton = d.closeButton : d.closeButton === !0 && (O.closeButton = !se(b.closeButton) || b.closeButton);
115
+ var j, q;
116
+ O.iconOut = function(x) {
117
+ let { theme: k, type: w, isLoading: A, icon: I } = x, P = null;
118
+ const $ = { theme: k, type: w };
119
+ return I === !1 || (N(I) ? P = I($) : U(I) ? P = ce(I, $) : H(I) || V(I) ? P = I : A ? P = ie.spinner() : ((X) => X in ie)(w) && (P = ie[w]($))), P;
120
+ }(O), N(p.onOpen) && (O.onOpen = p.onOpen), N(p.onClose) && (O.onClose = p.onClose), O.closeButton = b.closeButton, p.closeButton === !1 || se(p.closeButton) ? O.closeButton = p.closeButton : p.closeButton === !0 && (O.closeButton = !se(b.closeButton) || b.closeButton);
121
121
  let B = l;
122
- K(l) && !q(l.type) ? B = ce(l, { closeToast: D, toastProps: O, data: h }) : w(l) && (B = l({ closeToast: D, toastProps: O, data: h })), b.limit && b.limit > 0 && s.count > b.limit && k ? s.queue.push({ toastContent: B, toastProps: O, staleId: c }) : W(m) ? setTimeout(() => {
122
+ U(l) && !H(l.type) ? B = ce(l, { closeToast: R, toastProps: O, data: h }) : N(l) && (B = l({ closeToast: R, toastProps: O, data: h })), b.limit && b.limit > 0 && s.count > b.limit && L ? s.queue.push({ toastContent: B, toastProps: O, staleId: c }) : V(m) ? setTimeout(() => {
123
123
  E(B, O, c);
124
124
  }, m) : E(B, O, c);
125
125
  }
126
- function E(l, p, m) {
127
- const { toastId: c } = p;
126
+ function E(l, d, m) {
127
+ const { toastId: c } = d;
128
128
  m && i.delete(m);
129
- const d = { content: l, props: p };
130
- i.set(c, d), o((C) => [...C, c].filter((_) => _ !== m)), R.emit(4, me(d, d.props.updateId == null ? "added" : "updated"));
129
+ const p = { content: l, props: d };
130
+ i.set(c, p), o((T) => [...T, c].filter((_) => _ !== m)), D.emit(4, me(p, p.props.updateId == null ? "added" : "updated"));
131
131
  }
132
- return F(() => (s.containerId = e.containerId, R.cancelEmit(3).on(0, f).on(1, (l) => a.current && g(l)).on(5, y).emit(2, s), () => {
133
- i.clear(), R.emit(3, s);
134
- }), []), F(() => {
132
+ return K(() => (s.containerId = e.containerId, D.cancelEmit(3).on(0, f).on(1, (l) => a.current && g(l)).on(5, y).emit(2, s), () => {
133
+ i.clear(), D.emit(3, s);
134
+ }), []), K(() => {
135
135
  s.props = e, s.isToastActive = r, s.displayedToast = n.length;
136
136
  }), { getToastToRender: function(l) {
137
- const p = /* @__PURE__ */ new Map(), m = Array.from(i.values());
137
+ const d = /* @__PURE__ */ new Map(), m = Array.from(i.values());
138
138
  return e.newestOnTop && m.reverse(), m.forEach((c) => {
139
- const { position: d } = c.props;
140
- p.has(d) || p.set(d, []), p.get(d).push(c);
141
- }), Array.from(p, (c) => l(c[0], c[1]));
139
+ const { position: p } = c.props;
140
+ d.has(p) || d.set(p, []), d.get(p).push(c);
141
+ }), Array.from(d, (c) => l(c[0], c[1]));
142
142
  }, containerRef: a, isToastActive: r };
143
143
  }
144
144
  function ye(e) {
@@ -148,18 +148,18 @@ function ge(e) {
148
148
  return e.targetTouches && e.targetTouches.length >= 1 ? e.targetTouches[0].clientY : e.clientY;
149
149
  }
150
150
  function Be(e) {
151
- const [t, n] = ee(!1), [o, a] = ee(!1), i = H(null), r = H({ start: 0, x: 0, y: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, boundingRect: null, didMove: !1 }).current, s = H(e), { autoClose: y, pauseOnHover: g, closeToast: u, onClick: f, closeOnClick: E } = e;
151
+ const [t, n] = ee(!1), [o, a] = ee(!1), i = F(null), r = F({ start: 0, x: 0, y: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, boundingRect: null, didMove: !1 }).current, s = F(e), { autoClose: y, pauseOnHover: g, closeToast: u, onClick: f, closeOnClick: E } = e;
152
152
  function l(h) {
153
153
  if (e.draggable) {
154
- h.nativeEvent.type === "touchstart" && h.nativeEvent.preventDefault(), r.didMove = !1, document.addEventListener("mousemove", d), document.addEventListener("mouseup", C), document.addEventListener("touchmove", d), document.addEventListener("touchend", C);
154
+ h.nativeEvent.type === "touchstart" && h.nativeEvent.preventDefault(), r.didMove = !1, document.addEventListener("mousemove", p), document.addEventListener("mouseup", T), document.addEventListener("touchmove", p), document.addEventListener("touchend", T);
155
155
  const b = i.current;
156
156
  r.canCloseOnClick = !0, r.canDrag = !0, r.boundingRect = b.getBoundingClientRect(), b.style.transition = "", r.x = ye(h.nativeEvent), r.y = ge(h.nativeEvent), e.draggableDirection === "x" ? (r.start = r.x, r.removalDistance = b.offsetWidth * (e.draggablePercent / 100)) : (r.start = r.y, r.removalDistance = b.offsetHeight * (e.draggablePercent === 80 ? 1.5 * e.draggablePercent : e.draggablePercent / 100));
157
157
  }
158
158
  }
159
- function p(h) {
159
+ function d(h) {
160
160
  if (r.boundingRect) {
161
- const { top: b, bottom: D, left: k, right: O } = r.boundingRect;
162
- h.nativeEvent.type !== "touchend" && e.pauseOnHover && r.x >= k && r.x <= O && r.y >= b && r.y <= D ? c() : m();
161
+ const { top: b, bottom: R, left: L, right: O } = r.boundingRect;
162
+ h.nativeEvent.type !== "touchend" && e.pauseOnHover && r.x >= L && r.x <= O && r.y >= b && r.y <= R ? c() : m();
163
163
  }
164
164
  }
165
165
  function m() {
@@ -168,12 +168,12 @@ function Be(e) {
168
168
  function c() {
169
169
  n(!1);
170
170
  }
171
- function d(h) {
171
+ function p(h) {
172
172
  const b = i.current;
173
173
  r.canDrag && b && (r.didMove = !0, t && c(), r.x = ye(h), r.y = ge(h), r.delta = e.draggableDirection === "x" ? r.x - r.start : r.y - r.start, r.start !== r.x && (r.canCloseOnClick = !1), b.style.transform = `translate${e.draggableDirection}(${r.delta}px)`, b.style.opacity = "" + (1 - Math.abs(r.delta / r.removalDistance)));
174
174
  }
175
- function C() {
176
- document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", C), document.removeEventListener("touchmove", d), document.removeEventListener("touchend", C);
175
+ function T() {
176
+ document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", T), document.removeEventListener("touchmove", p), document.removeEventListener("touchend", T);
177
177
  const h = i.current;
178
178
  if (r.canDrag && r.didMove && h) {
179
179
  if (r.canDrag = !1, Math.abs(r.delta) > r.removalDistance)
@@ -181,15 +181,15 @@ function Be(e) {
181
181
  h.style.transition = "transform 0.2s, opacity 0.2s", h.style.transform = `translate${e.draggableDirection}(0)`, h.style.opacity = "1";
182
182
  }
183
183
  }
184
- F(() => {
184
+ K(() => {
185
185
  s.current = e;
186
- }), F(() => (i.current && i.current.addEventListener("d", m, { once: !0 }), w(e.onOpen) && e.onOpen(K(e.children) && e.children.props), () => {
186
+ }), K(() => (i.current && i.current.addEventListener("d", m, { once: !0 }), N(e.onOpen) && e.onOpen(U(e.children) && e.children.props), () => {
187
187
  const h = s.current;
188
- w(h.onClose) && h.onClose(K(h.children) && h.children.props);
189
- }), []), F(() => (e.pauseOnFocusLoss && (document.hasFocus() || c(), window.addEventListener("focus", m), window.addEventListener("blur", c)), () => {
188
+ N(h.onClose) && h.onClose(U(h.children) && h.children.props);
189
+ }), []), K(() => (e.pauseOnFocusLoss && (document.hasFocus() || c(), window.addEventListener("focus", m), window.addEventListener("blur", c)), () => {
190
190
  e.pauseOnFocusLoss && (window.removeEventListener("focus", m), window.removeEventListener("blur", c));
191
191
  }), [e.pauseOnFocusLoss]);
192
- const _ = { onMouseDown: l, onTouchStart: l, onMouseUp: p, onTouchEnd: p };
192
+ const _ = { onMouseDown: l, onTouchStart: l, onMouseUp: d, onTouchEnd: d };
193
193
  return y && g && (_.onMouseEnter = c, _.onMouseLeave = m), E && (_.onClick = (h) => {
194
194
  f && f(h), r.canCloseOnClick && u();
195
195
  }), { playToast: m, pauseToast: c, isRunning: t, preventExitTransition: o, toastRef: i, eventHandlers: _ };
@@ -202,78 +202,78 @@ function Oe(e) {
202
202
  }
203
203
  function Ae(e) {
204
204
  let { delay: t, isRunning: n, closeToast: o, type: a = "default", hide: i, className: r, style: s, controlledProgress: y, progress: g, rtl: u, isIn: f, theme: E } = e;
205
- const l = i || y && g === 0, p = { ...s, animationDuration: `${t}ms`, animationPlayState: n ? "running" : "paused", opacity: l ? 0 : 1 };
206
- y && (p.transform = `scaleX(${g})`);
207
- const m = S("Toastify__progress-bar", y ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${E}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": u }), c = w(r) ? r({ rtl: u, type: a, defaultClassName: m }) : S(m, r);
208
- return v.createElement("div", { role: "progressbar", "aria-hidden": l ? "true" : "false", "aria-label": "notification timer", className: c, style: p, [y && g >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: y && g < 1 ? null : () => {
205
+ const l = i || y && g === 0, d = { ...s, animationDuration: `${t}ms`, animationPlayState: n ? "running" : "paused", opacity: l ? 0 : 1 };
206
+ y && (d.transform = `scaleX(${g})`);
207
+ const m = S("Toastify__progress-bar", y ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${E}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": u }), c = N(r) ? r({ rtl: u, type: a, defaultClassName: m }) : S(m, r);
208
+ return v.createElement("div", { role: "progressbar", "aria-hidden": l ? "true" : "false", "aria-label": "notification timer", className: c, style: d, [y && g >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: y && g < 1 ? null : () => {
209
209
  f && o();
210
210
  } });
211
211
  }
212
212
  const $e = (e) => {
213
- const { isRunning: t, preventExitTransition: n, toastRef: o, eventHandlers: a } = Be(e), { closeButton: i, children: r, autoClose: s, onClick: y, type: g, hideProgressBar: u, closeToast: f, transition: E, position: l, className: p, style: m, bodyClassName: c, bodyStyle: d, progressClassName: C, progressStyle: _, updateId: h, role: b, progress: D, rtl: k, toastId: O, deleteToast: j, isIn: U, isLoading: B, iconOut: P, closeOnClick: N, theme: I } = e, A = S("Toastify__toast", `Toastify__toast-theme--${I}`, `Toastify__toast--${g}`, { "Toastify__toast--rtl": k }, { "Toastify__toast--close-on-click": N }), x = w(p) ? p({ rtl: k, position: l, type: g, defaultClassName: A }) : S(A, p), L = !!D || !s, $ = { closeToast: f, type: g, theme: I };
214
- let G = null;
215
- return i === !1 || (G = w(i) ? i($) : K(i) ? ce(i, $) : Oe($)), v.createElement(E, { isIn: U, done: j, position: l, preventExitTransition: n, nodeRef: o }, v.createElement("div", { id: O, onClick: y, className: x, ...a, style: m, ref: o }, v.createElement("div", { ...U && { role: b }, className: w(c) ? c({ type: g }) : S("Toastify__toast-body", c), style: d }, P != null && v.createElement("div", { className: S("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !B }) }, P), v.createElement("div", null, r)), G, v.createElement(Ae, { ...h && !L ? { key: `pb-${h}` } : {}, rtl: k, theme: I, delay: s, isRunning: t, isIn: U, closeToast: f, hide: u, type: g, style: _, className: C, controlledProgress: L, progress: D || 0 })));
213
+ const { isRunning: t, preventExitTransition: n, toastRef: o, eventHandlers: a } = Be(e), { closeButton: i, children: r, autoClose: s, onClick: y, type: g, hideProgressBar: u, closeToast: f, transition: E, position: l, className: d, style: m, bodyClassName: c, bodyStyle: p, progressClassName: T, progressStyle: _, updateId: h, role: b, progress: R, rtl: L, toastId: O, deleteToast: j, isIn: q, isLoading: B, iconOut: x, closeOnClick: k, theme: w } = e, A = S("Toastify__toast", `Toastify__toast-theme--${w}`, `Toastify__toast--${g}`, { "Toastify__toast--rtl": L }, { "Toastify__toast--close-on-click": k }), I = N(d) ? d({ rtl: L, position: l, type: g, defaultClassName: A }) : S(A, d), P = !!R || !s, $ = { closeToast: f, type: g, theme: w };
214
+ let X = null;
215
+ return i === !1 || (X = N(i) ? i($) : U(i) ? ce(i, $) : Oe($)), v.createElement(E, { isIn: q, done: j, position: l, preventExitTransition: n, nodeRef: o }, v.createElement("div", { id: O, onClick: y, className: I, ...a, style: m, ref: o }, v.createElement("div", { ...q && { role: b }, className: N(c) ? c({ type: g }) : S("Toastify__toast-body", c), style: p }, x != null && v.createElement("div", { className: S("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !B }) }, x), v.createElement("div", null, r)), X, v.createElement(Ae, { ...h && !P ? { key: `pb-${h}` } : {}, rtl: L, theme: w, delay: s, isRunning: t, isIn: q, closeToast: f, hide: u, type: g, style: _, className: T, controlledProgress: P, progress: R || 0 })));
216
216
  }, re = function(e, t) {
217
217
  return t === void 0 && (t = !1), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t };
218
218
  }, ze = oe(re("bounce", !0));
219
219
  oe(re("slide", !0));
220
220
  oe(re("zoom"));
221
- const Fe = oe(re("flip")), he = Pe((e, t) => {
221
+ const Ke = oe(re("flip")), he = xe((e, t) => {
222
222
  const { getToastToRender: n, containerRef: o, isToastActive: a } = je(e), { className: i, style: r, rtl: s, containerId: y } = e;
223
223
  function g(u) {
224
224
  const f = S("Toastify__toast-container", `Toastify__toast-container--${u}`, { "Toastify__toast-container--rtl": s });
225
- return w(i) ? i({ position: u, rtl: s, defaultClassName: f }) : S(f, Z(i));
225
+ return N(i) ? i({ position: u, rtl: s, defaultClassName: f }) : S(f, Z(i));
226
226
  }
227
- return F(() => {
227
+ return K(() => {
228
228
  t && (t.current = o.current);
229
229
  }, []), v.createElement("div", { ref: o, className: "Toastify", id: y }, n((u, f) => {
230
230
  const E = f.length ? { ...r } : { ...r, pointerEvents: "none" };
231
- return v.createElement("div", { className: g(u), style: E, key: `container-${u}` }, f.map((l, p) => {
231
+ return v.createElement("div", { className: g(u), style: E, key: `container-${u}` }, f.map((l, d) => {
232
232
  let { content: m, props: c } = l;
233
- return v.createElement($e, { ...c, isIn: a(c.toastId), style: { ...c.style, "--nth": p + 1, "--len": f.length }, key: `toast-${c.key}` }, m);
233
+ return v.createElement($e, { ...c, isIn: a(c.toastId), style: { ...c.style, "--nth": d + 1, "--len": f.length }, key: `toast-${c.key}` }, m);
234
234
  }));
235
235
  }));
236
236
  });
237
237
  he.displayName = "ToastContainer", he.defaultProps = { position: "top-right", transition: ze, autoClose: 5e3, closeButton: Oe, pauseOnHover: !0, pauseOnFocusLoss: !0, closeOnClick: !0, draggable: !0, draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
238
- let le, z = /* @__PURE__ */ new Map(), Q = [], He = 1;
238
+ let le, z = /* @__PURE__ */ new Map(), Q = [], Fe = 1;
239
239
  function _e() {
240
- return "" + He++;
240
+ return "" + Fe++;
241
241
  }
242
- function qe(e) {
243
- return e && (q(e.toastId) || W(e.toastId)) ? e.toastId : _e();
242
+ function He(e) {
243
+ return e && (H(e.toastId) || V(e.toastId)) ? e.toastId : _e();
244
244
  }
245
- function X(e, t) {
246
- return z.size > 0 ? R.emit(0, e, t) : Q.push({ content: e, options: t }), t.toastId;
245
+ function W(e, t) {
246
+ return z.size > 0 ? D.emit(0, e, t) : Q.push({ content: e, options: t }), t.toastId;
247
247
  }
248
248
  function te(e, t) {
249
- return { ...t, type: t && t.type || e, toastId: qe(t) };
249
+ return { ...t, type: t && t.type || e, toastId: He(t) };
250
250
  }
251
- function V(e) {
252
- return (t, n) => X(t, te(e, n));
251
+ function Y(e) {
252
+ return (t, n) => W(t, te(e, n));
253
253
  }
254
- function T(e, t) {
255
- return X(e, te("default", t));
254
+ function C(e, t) {
255
+ return W(e, te("default", t));
256
256
  }
257
- T.loading = (e, t) => X(e, te("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t })), T.promise = function(e, t, n) {
257
+ C.loading = (e, t) => W(e, te("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t })), C.promise = function(e, t, n) {
258
258
  let o, { pending: a, error: i, success: r } = t;
259
- a && (o = q(a) ? T.loading(a, n) : T.loading(a.render, { ...n, ...a }));
259
+ a && (o = H(a) ? C.loading(a, n) : C.loading(a.render, { ...n, ...a }));
260
260
  const s = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, y = (u, f, E) => {
261
261
  if (f == null)
262
- return void T.dismiss(o);
263
- const l = { type: u, ...s, ...n, data: E }, p = q(f) ? { render: f } : f;
264
- return o ? T.update(o, { ...l, ...p }) : T(p.render, { ...l, ...p }), E;
265
- }, g = w(e) ? e() : e;
262
+ return void C.dismiss(o);
263
+ const l = { type: u, ...s, ...n, data: E }, d = H(f) ? { render: f } : f;
264
+ return o ? C.update(o, { ...l, ...d }) : C(d.render, { ...l, ...d }), E;
265
+ }, g = N(e) ? e() : e;
266
266
  return g.then((u) => y("success", r, u)).catch((u) => y("error", i, u)), g;
267
- }, T.success = V("success"), T.info = V("info"), T.error = V("error"), T.warning = V("warning"), T.warn = T.warning, T.dark = (e, t) => X(e, te("default", { theme: "dark", ...t })), T.dismiss = (e) => {
268
- z.size > 0 ? R.emit(1, e) : Q = Q.filter((t) => e != null && t.options.toastId !== e);
269
- }, T.clearWaitingQueue = function(e) {
270
- return e === void 0 && (e = {}), R.emit(5, e);
271
- }, T.isActive = (e) => {
267
+ }, C.success = Y("success"), C.info = Y("info"), C.error = Y("error"), C.warning = Y("warning"), C.warn = C.warning, C.dark = (e, t) => W(e, te("default", { theme: "dark", ...t })), C.dismiss = (e) => {
268
+ z.size > 0 ? D.emit(1, e) : Q = Q.filter((t) => e != null && t.options.toastId !== e);
269
+ }, C.clearWaitingQueue = function(e) {
270
+ return e === void 0 && (e = {}), D.emit(5, e);
271
+ }, C.isActive = (e) => {
272
272
  let t = !1;
273
273
  return z.forEach((n) => {
274
274
  n.isToastActive && n.isToastActive(e) && (t = !0);
275
275
  }), t;
276
- }, T.update = function(e, t) {
276
+ }, C.update = function(e, t) {
277
277
  t === void 0 && (t = {}), setTimeout(() => {
278
278
  const n = function(o, a) {
279
279
  let { containerId: i } = a;
@@ -284,21 +284,21 @@ T.loading = (e, t) => X(e, te("default", { isLoading: !0, autoClose: !1, closeOn
284
284
  const { props: o, content: a } = n, i = { delay: 100, ...o, ...t, toastId: t.toastId || e, updateId: _e() };
285
285
  i.toastId !== e && (i.staleId = e);
286
286
  const r = i.render || a;
287
- delete i.render, X(r, i);
287
+ delete i.render, W(r, i);
288
288
  }
289
289
  }, 0);
290
- }, T.done = (e) => {
291
- T.update(e, { progress: 1 });
292
- }, T.onChange = (e) => (R.on(4, e), () => {
293
- R.off(4, e);
294
- }), T.POSITION = { TOP_LEFT: "top-left", TOP_RIGHT: "top-right", TOP_CENTER: "top-center", BOTTOM_LEFT: "bottom-left", BOTTOM_RIGHT: "bottom-right", BOTTOM_CENTER: "bottom-center" }, T.TYPE = { INFO: "info", SUCCESS: "success", WARNING: "warning", ERROR: "error", DEFAULT: "default" }, R.on(2, (e) => {
290
+ }, C.done = (e) => {
291
+ C.update(e, { progress: 1 });
292
+ }, C.onChange = (e) => (D.on(4, e), () => {
293
+ D.off(4, e);
294
+ }), C.POSITION = { TOP_LEFT: "top-left", TOP_RIGHT: "top-right", TOP_CENTER: "top-center", BOTTOM_LEFT: "bottom-left", BOTTOM_RIGHT: "bottom-right", BOTTOM_CENTER: "bottom-center" }, C.TYPE = { INFO: "info", SUCCESS: "success", WARNING: "warning", ERROR: "error", DEFAULT: "default" }, D.on(2, (e) => {
295
295
  le = e.containerId || e, z.set(le, e), Q.forEach((t) => {
296
- R.emit(0, t.content, t.options);
296
+ D.emit(0, t.content, t.options);
297
297
  }), Q = [];
298
298
  }).on(3, (e) => {
299
- z.delete(e.containerId || e), z.size === 0 && R.off(0).off(1).off(5);
299
+ z.delete(e.containerId || e), z.size === 0 && D.off(0).off(1).off(5);
300
300
  });
301
- var ae = {}, Ue = function() {
301
+ var ae = {}, qe = function() {
302
302
  var e = document.getSelection();
303
303
  if (!e.rangeCount)
304
304
  return function() {
@@ -319,20 +319,20 @@ var ae = {}, Ue = function() {
319
319
  e.addRange(a);
320
320
  }), t && t.focus();
321
321
  };
322
- }, Ke = Ue, ve = {
322
+ }, Ue = qe, ve = {
323
323
  "text/plain": "Text",
324
324
  "text/html": "Url",
325
325
  default: "Text"
326
326
  }, Qe = "Copy to clipboard: #{key}, Enter";
327
- function We(e) {
327
+ function Ve(e) {
328
328
  var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
329
329
  return e.replace(/#{\s*key\s*}/g, t);
330
330
  }
331
- function Xe(e, t) {
331
+ function We(e, t) {
332
332
  var n, o, a, i, r, s, y = !1;
333
333
  t || (t = {}), n = t.debug || !1;
334
334
  try {
335
- a = Ke(), i = document.createRange(), r = document.getSelection(), s = document.createElement("span"), s.textContent = e, s.ariaHidden = "true", s.style.all = "unset", s.style.position = "fixed", s.style.top = 0, s.style.clip = "rect(0, 0, 0, 0)", s.style.whiteSpace = "pre", s.style.webkitUserSelect = "text", s.style.MozUserSelect = "text", s.style.msUserSelect = "text", s.style.userSelect = "text", s.addEventListener("copy", function(u) {
335
+ a = Ue(), i = document.createRange(), r = document.getSelection(), s = document.createElement("span"), s.textContent = e, s.ariaHidden = "true", s.style.all = "unset", s.style.position = "fixed", s.style.top = 0, s.style.clip = "rect(0, 0, 0, 0)", s.style.whiteSpace = "pre", s.style.webkitUserSelect = "text", s.style.MozUserSelect = "text", s.style.msUserSelect = "text", s.style.userSelect = "text", s.addEventListener("copy", function(u) {
336
336
  if (u.stopPropagation(), t.format)
337
337
  if (u.preventDefault(), typeof u.clipboardData > "u") {
338
338
  n && console.warn("unable to use e.clipboardData"), n && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
@@ -351,14 +351,14 @@ function Xe(e, t) {
351
351
  try {
352
352
  window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), y = !0;
353
353
  } catch (f) {
354
- n && console.error("unable to copy using clipboardData: ", f), n && console.error("falling back to prompt"), o = We("message" in t ? t.message : Qe), window.prompt(o, e);
354
+ n && console.error("unable to copy using clipboardData: ", f), n && console.error("falling back to prompt"), o = Ve("message" in t ? t.message : Qe), window.prompt(o, e);
355
355
  }
356
356
  } finally {
357
357
  r && (typeof r.removeRange == "function" ? r.removeRange(i) : r.removeAllRanges()), s && document.body.removeChild(s), a();
358
358
  }
359
359
  return y;
360
360
  }
361
- var Ge = Xe;
361
+ var Xe = We;
362
362
  function ue(e) {
363
363
  return ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
364
364
  return typeof t;
@@ -370,8 +370,8 @@ Object.defineProperty(ae, "__esModule", {
370
370
  value: !0
371
371
  });
372
372
  ae.CopyToClipboard = void 0;
373
- var J = we(v), Ye = we(Ge), Ve = ["text", "onCopy", "options", "children"];
374
- function we(e) {
373
+ var J = Ne(v), Ge = Ne(Xe), Ye = ["text", "onCopy", "options", "children"];
374
+ function Ne(e) {
375
375
  return e && e.__esModule ? e : { default: e };
376
376
  }
377
377
  function be(e, t) {
@@ -384,7 +384,7 @@ function be(e, t) {
384
384
  }
385
385
  return n;
386
386
  }
387
- function Te(e) {
387
+ function Ce(e) {
388
388
  for (var t = 1; t < arguments.length; t++) {
389
389
  var n = arguments[t] != null ? arguments[t] : {};
390
390
  t % 2 ? be(Object(n), !0).forEach(function(o) {
@@ -418,24 +418,24 @@ function et(e, t) {
418
418
  if (!(e instanceof t))
419
419
  throw new TypeError("Cannot call a class as a function");
420
420
  }
421
- function Ce(e, t) {
421
+ function Te(e, t) {
422
422
  for (var n = 0; n < t.length; n++) {
423
423
  var o = t[n];
424
424
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
425
425
  }
426
426
  }
427
427
  function tt(e, t, n) {
428
- return t && Ce(e.prototype, t), n && Ce(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
428
+ return t && Te(e.prototype, t), n && Te(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
429
429
  }
430
430
  function nt(e, t) {
431
431
  if (typeof t != "function" && t !== null)
432
432
  throw new TypeError("Super expression must either be null or a function");
433
- e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && de(e, t);
433
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), t && pe(e, t);
434
434
  }
435
- function de(e, t) {
436
- return de = Object.setPrototypeOf || function(o, a) {
435
+ function pe(e, t) {
436
+ return pe = Object.setPrototypeOf || function(o, a) {
437
437
  return o.__proto__ = a, o;
438
- }, de(e, t);
438
+ }, pe(e, t);
439
439
  }
440
440
  function ot(e) {
441
441
  var t = at();
@@ -454,9 +454,9 @@ function rt(e, t) {
454
454
  return t;
455
455
  if (t !== void 0)
456
456
  throw new TypeError("Derived constructors may only return object or undefined");
457
- return Ie(e);
457
+ return we(e);
458
458
  }
459
- function Ie(e) {
459
+ function we(e) {
460
460
  if (e === void 0)
461
461
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
462
462
  return e;
@@ -481,7 +481,7 @@ function ne(e) {
481
481
  function fe(e, t, n) {
482
482
  return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
483
483
  }
484
- var xe = /* @__PURE__ */ function(e) {
484
+ var Ie = /* @__PURE__ */ function(e) {
485
485
  nt(n, e);
486
486
  var t = ot(n);
487
487
  function n() {
@@ -489,9 +489,9 @@ var xe = /* @__PURE__ */ function(e) {
489
489
  et(this, n);
490
490
  for (var a = arguments.length, i = new Array(a), r = 0; r < a; r++)
491
491
  i[r] = arguments[r];
492
- return o = t.call.apply(t, [this].concat(i)), fe(Ie(o), "onClick", function(s) {
493
- var y = o.props, g = y.text, u = y.onCopy, f = y.children, E = y.options, l = J.default.Children.only(f), p = (0, Ye.default)(g, E);
494
- u && u(g, p), l && l.props && typeof l.props.onClick == "function" && l.props.onClick(s);
492
+ return o = t.call.apply(t, [this].concat(i)), fe(we(o), "onClick", function(s) {
493
+ var y = o.props, g = y.text, u = y.onCopy, f = y.children, E = y.options, l = J.default.Children.only(f), d = (0, Ge.default)(g, E);
494
+ u && u(g, d), l && l.props && typeof l.props.onClick == "function" && l.props.onClick(s);
495
495
  }), o;
496
496
  }
497
497
  return tt(n, [{
@@ -499,21 +499,21 @@ var xe = /* @__PURE__ */ function(e) {
499
499
  value: function() {
500
500
  var a = this.props;
501
501
  a.text, a.onCopy, a.options;
502
- var i = a.children, r = Je(a, Ve), s = J.default.Children.only(i);
503
- return /* @__PURE__ */ J.default.cloneElement(s, Te(Te({}, r), {}, {
502
+ var i = a.children, r = Je(a, Ye), s = J.default.Children.only(i);
503
+ return /* @__PURE__ */ J.default.cloneElement(s, Ce(Ce({}, r), {}, {
504
504
  onClick: this.onClick
505
505
  }));
506
506
  }
507
507
  }]), n;
508
508
  }(J.default.PureComponent);
509
- ae.CopyToClipboard = xe;
510
- fe(xe, "defaultProps", {
509
+ ae.CopyToClipboard = Ie;
510
+ fe(Ie, "defaultProps", {
511
511
  onCopy: void 0,
512
512
  options: void 0
513
513
  });
514
- var st = ae, pe = st.CopyToClipboard;
515
- pe.CopyToClipboard = pe;
516
- var Ee = pe;
514
+ var st = ae, de = st.CopyToClipboard;
515
+ de.CopyToClipboard = de;
516
+ var Ee = de;
517
517
  function it({
518
518
  type: e,
519
519
  text: t,
@@ -524,25 +524,57 @@ function it({
524
524
  text: "کپی",
525
525
  disabled: !1
526
526
  }), r = (u = "اطلاع", f = {}) => {
527
- T.info(u, {
528
- position: T.POSITION.BOTTOM_CENTER,
529
- transition: Fe,
527
+ C.info(u, {
528
+ position: C.POSITION.BOTTOM_CENTER,
529
+ transition: Ke,
530
530
  style: { fontFamily: "inherit" },
531
531
  ...f
532
532
  });
533
533
  }, s = () => {
534
534
  e === "BUTTON" ? (i({ text: "کپی شد!", disabled: !0 }), setTimeout(() => i({ text: "کپی", disabled: !1 }), 2e3)) : e === "ICON" && r(o);
535
535
  }, y = {
536
- ICON: /* @__PURE__ */ M.jsx(
537
- De,
536
+ ICON: /* @__PURE__ */ M.jsxDEV(
537
+ Re,
538
538
  {
539
539
  title: n,
540
540
  placement: "bottom",
541
541
  style: { maxWidth: "max-content" },
542
- children: /* @__PURE__ */ M.jsx("span", { children: /* @__PURE__ */ M.jsx(Ee.CopyToClipboard, { onCopy: s, text: t, children: /* @__PURE__ */ M.jsx(Me, { children: /* @__PURE__ */ M.jsx(Le, { className: "cursor-pointer", size: 20 }) }) }) })
543
- }
542
+ children: /* @__PURE__ */ M.jsxDEV("span", { children: /* @__PURE__ */ M.jsxDEV(Ee.CopyToClipboard, { onCopy: s, text: t, children: /* @__PURE__ */ M.jsxDEV(Me, { children: /* @__PURE__ */ M.jsxDEV(Pe, { className: "cursor-pointer", size: 20 }, void 0, !1, {
543
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
544
+ lineNumber: 56,
545
+ columnNumber: 15
546
+ }, this) }, void 0, !1, {
547
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
548
+ lineNumber: 55,
549
+ columnNumber: 13
550
+ }, this) }, void 0, !1, {
551
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
552
+ lineNumber: 54,
553
+ columnNumber: 11
554
+ }, this) }, void 0, !1, {
555
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
556
+ lineNumber: 53,
557
+ columnNumber: 9
558
+ }, this)
559
+ },
560
+ void 0,
561
+ !1,
562
+ {
563
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
564
+ lineNumber: 48,
565
+ columnNumber: 7
566
+ },
567
+ this
544
568
  ),
545
- BUTTON: /* @__PURE__ */ M.jsx(Ee.CopyToClipboard, { onCopy: s, text: t, children: /* @__PURE__ */ M.jsx(ke, { disabled: a.disabled, children: a.text }) })
569
+ BUTTON: /* @__PURE__ */ M.jsxDEV(Ee.CopyToClipboard, { onCopy: s, text: t, children: /* @__PURE__ */ M.jsxDEV(Le, { disabled: a.disabled, children: a.text }, void 0, !1, {
570
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
571
+ lineNumber: 65,
572
+ columnNumber: 9
573
+ }, this) }, void 0, !1, {
574
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
575
+ lineNumber: 64,
576
+ columnNumber: 7
577
+ }, this)
546
578
  };
547
579
  return y[e] ?? y.ICON;
548
580
  }
@@ -551,7 +583,11 @@ const ht = ({
551
583
  tooltip: t = "کپی",
552
584
  type: n = "ICON",
553
585
  message: o = "کپی شد"
554
- }) => /* @__PURE__ */ M.jsx(it, { type: n, text: e, tooltip: t, message: o });
586
+ }) => /* @__PURE__ */ M.jsxDEV(it, { type: n, text: e, tooltip: t, message: o }, void 0, !1, {
587
+ fileName: "D:/a.dakhili/kdpa/packages/components/src/components/CopyToClipboard/KdpaCopyToClipboard.tsx",
588
+ lineNumber: 83,
589
+ columnNumber: 10
590
+ }, globalThis);
555
591
  export {
556
592
  ht as K
557
593
  };