@lanaco/lnc-react-ui 4.0.2 → 4.0.5

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 (233) hide show
  1. package/dist/Accordion.cjs +1 -1
  2. package/dist/Accordion.js +55 -50
  3. package/dist/AccordionDetails.cjs +1 -1
  4. package/dist/AccordionDetails.js +15 -15
  5. package/dist/AccordionSummary.cjs +1 -1
  6. package/dist/AccordionSummary.js +11 -11
  7. package/dist/ActionsToolbar.cjs +2 -2
  8. package/dist/ActionsToolbar.js +16 -16
  9. package/dist/Alert.cjs +1 -1
  10. package/dist/Alert.js +23 -23
  11. package/dist/Avatar.cjs +2 -2
  12. package/dist/Avatar.js +18 -21
  13. package/dist/Badge.cjs +1 -1
  14. package/dist/Badge.js +21 -14
  15. package/dist/Breadcrumbs.cjs +1 -1
  16. package/dist/Breadcrumbs.js +28 -28
  17. package/dist/Button.cjs +2 -2
  18. package/dist/Button.js +21 -22
  19. package/dist/ButtonGroup.cjs +1 -1
  20. package/dist/ButtonGroup.js +10 -6
  21. package/dist/CheckBoxInput.cjs +1 -1
  22. package/dist/CheckBoxInput.js +6 -6
  23. package/dist/Chip.cjs +1 -1
  24. package/dist/Chip.js +9 -9
  25. package/dist/ColorInput.cjs +1 -1
  26. package/dist/ColorInput.js +20 -20
  27. package/dist/ConfirmationForm.cjs +1 -1
  28. package/dist/ConfirmationForm.js +58 -58
  29. package/dist/Content.cjs +1 -1
  30. package/dist/Content.js +8 -8
  31. package/dist/{CustomStyles-nfD3J1mi.js → CustomStyles-BUSJ8bZt.js} +5 -5
  32. package/dist/{CustomStyles-CqlCjTgU.cjs → CustomStyles-Dlqxic2X.cjs} +1 -1
  33. package/dist/DataView.cjs +1 -1
  34. package/dist/DataView.js +35 -35
  35. package/dist/DateInput.cjs +4 -4
  36. package/dist/DateInput.js +491 -491
  37. package/dist/DecimalInput.cjs +1 -1
  38. package/dist/DecimalInput.js +43 -43
  39. package/dist/DetailsView.cjs +4 -4
  40. package/dist/DetailsView.js +40 -40
  41. package/dist/DoubleRangeSlider.cjs +1 -1
  42. package/dist/DoubleRangeSlider.js +33 -33
  43. package/dist/DragAndDropFile.cjs +1 -1
  44. package/dist/DragAndDropFile.js +165 -165
  45. package/dist/DragDropFiles.cjs +1 -1
  46. package/dist/DragDropFiles.js +31 -31
  47. package/dist/Drawer.cjs +1 -1
  48. package/dist/Drawer.js +47 -47
  49. package/dist/Dropdown.cjs +1 -1
  50. package/dist/Dropdown.js +39 -39
  51. package/dist/DropdownItem.cjs +1 -1
  52. package/dist/DropdownItem.js +23 -23
  53. package/dist/DropdownLookup.cjs +1 -1
  54. package/dist/DropdownLookup.js +36 -36
  55. package/dist/DropdownMenu.cjs +7 -1
  56. package/dist/DropdownMenu.js +192 -10
  57. package/dist/EditableTable.cjs +1 -1
  58. package/dist/EditableTable.js +4 -4
  59. package/dist/FileInput.cjs +1 -1
  60. package/dist/FileInput.js +24 -24
  61. package/dist/FlexBox.cjs +1 -1
  62. package/dist/FlexBox.js +14 -14
  63. package/dist/FlexGrid.cjs +1 -1
  64. package/dist/FlexGrid.js +30 -30
  65. package/dist/FlexGridItem.cjs +1 -1
  66. package/dist/FlexGridItem.js +16 -16
  67. package/dist/Footer.cjs +1 -1
  68. package/dist/Footer.js +5 -5
  69. package/dist/FormField.cjs +1 -1
  70. package/dist/FormField.js +8 -9
  71. package/dist/FormView.cjs +1 -1
  72. package/dist/FormView.js +31 -31
  73. package/dist/Grid.cjs +2 -3
  74. package/dist/Grid.js +38 -10
  75. package/dist/GridItem.cjs +2 -2
  76. package/dist/GridItem.js +29 -9
  77. package/dist/Header.cjs +1 -1
  78. package/dist/Header.js +7 -7
  79. package/dist/Icon.cjs +2 -2
  80. package/dist/Icon.js +35 -13
  81. package/dist/IconButton.cjs +1 -1
  82. package/dist/IconButton.js +51 -52
  83. package/dist/Kanban.cjs +12 -12
  84. package/dist/Kanban.js +891 -879
  85. package/dist/KanbanActionsToolbar.cjs +2 -2
  86. package/dist/KanbanActionsToolbar.js +28 -28
  87. package/dist/{KanbanCard-D9OhU8C6.js → KanbanCard-CHZ_C9kk.js} +50 -50
  88. package/dist/KanbanCard-DV3VnSUi.cjs +30 -0
  89. package/dist/KanbanCard.cjs +1 -1
  90. package/dist/KanbanCard.js +5 -5
  91. package/dist/KanbanFooter.cjs +1 -1
  92. package/dist/KanbanFooter.js +40 -40
  93. package/dist/KanbanHeader.cjs +2 -2
  94. package/dist/KanbanHeader.js +46 -46
  95. package/dist/KanbanView.cjs +1 -1
  96. package/dist/KanbanView.js +27 -27
  97. package/dist/Link.cjs +1 -1
  98. package/dist/Link.js +9 -9
  99. package/dist/MenuItem.cjs +1 -1
  100. package/dist/MenuItem.js +39 -39
  101. package/dist/Modal.cjs +1 -1
  102. package/dist/Modal.js +42 -42
  103. package/dist/MultiSelectDropdown.cjs +1 -1
  104. package/dist/MultiSelectDropdown.js +6 -6
  105. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  106. package/dist/MultiSelectDropdownLookup.js +6 -6
  107. package/dist/NestedDropdownItem.cjs +1 -1
  108. package/dist/NestedDropdownItem.js +40 -40
  109. package/dist/NestedMenuItem.cjs +1 -1
  110. package/dist/NestedMenuItem.js +45 -45
  111. package/dist/Notification.cjs +1 -83
  112. package/dist/Notification.js +3 -1077
  113. package/dist/NotificationContainer.cjs +37 -0
  114. package/dist/NotificationContainer.js +162 -0
  115. package/dist/NotificationMessage.cjs +47 -0
  116. package/dist/NotificationMessage.js +133 -0
  117. package/dist/NumberInput.cjs +1 -1
  118. package/dist/NumberInput.js +17 -17
  119. package/dist/PageLayout.cjs +1 -1
  120. package/dist/PageLayout.js +32 -32
  121. package/dist/Pagination.cjs +12 -0
  122. package/dist/Pagination.js +248 -0
  123. package/dist/PasswordInput.cjs +1 -1
  124. package/dist/PasswordInput.js +33 -33
  125. package/dist/Popover.cjs +1 -0
  126. package/dist/Popover.js +36 -0
  127. package/dist/PopoverClose.cjs +1 -0
  128. package/dist/PopoverClose.js +15 -0
  129. package/dist/PopoverContent.cjs +10 -0
  130. package/dist/PopoverContent.js +68 -0
  131. package/dist/PopoverContext.cjs +1 -0
  132. package/dist/PopoverContext.js +5 -0
  133. package/dist/PopoverDescription.cjs +1 -0
  134. package/dist/PopoverDescription.js +16 -0
  135. package/dist/PopoverHeading.cjs +1 -0
  136. package/dist/PopoverHeading.js +16 -0
  137. package/dist/PopoverTrigger.cjs +1 -0
  138. package/dist/PopoverTrigger.js +38 -0
  139. package/dist/ProgressBar.cjs +1 -1
  140. package/dist/ProgressBar.js +35 -24
  141. package/dist/RadioGroup.cjs +1 -1
  142. package/dist/RadioGroup.js +13 -13
  143. package/dist/RadioInput.cjs +1 -1
  144. package/dist/RadioInput.js +10 -10
  145. package/dist/RangeSlider.cjs +1 -1
  146. package/dist/RangeSlider.js +27 -27
  147. package/dist/SearchBar.cjs +1 -1
  148. package/dist/SearchBar.js +77 -77
  149. package/dist/Separator.cjs +1 -1
  150. package/dist/Separator.js +9 -9
  151. package/dist/Sidebar.cjs +1 -1
  152. package/dist/Sidebar.js +13 -13
  153. package/dist/Spinner.cjs +1 -1
  154. package/dist/Spinner.js +25 -20
  155. package/dist/Surface.cjs +2 -2
  156. package/dist/Surface.js +14 -15
  157. package/dist/SwipeableDrawer.cjs +1 -1
  158. package/dist/SwipeableDrawer.js +18 -18
  159. package/dist/TabItem.cjs +26 -0
  160. package/dist/TabItem.js +210 -0
  161. package/dist/Table.cjs +20 -20
  162. package/dist/Table.js +13 -12
  163. package/dist/TableView.cjs +8 -1
  164. package/dist/TableView.js +238 -9
  165. package/dist/Tabs.cjs +1 -1
  166. package/dist/Tabs.js +33 -27
  167. package/dist/TextAreaInput.cjs +1 -1
  168. package/dist/TextAreaInput.js +35 -35
  169. package/dist/TextInput.cjs +1 -1
  170. package/dist/TextInput.js +24 -24
  171. package/dist/ThemeProvider.cjs +1 -1
  172. package/dist/ThemeProvider.js +85 -85
  173. package/dist/TimeInput.cjs +1 -1
  174. package/dist/TimeInput.js +13 -13
  175. package/dist/Toggle.cjs +1 -1
  176. package/dist/Toggle.js +4 -5
  177. package/dist/TreeMenu.cjs +1 -1
  178. package/dist/TreeMenu.js +57 -57
  179. package/dist/TreeMenuSeparator.cjs +3 -3
  180. package/dist/TreeMenuSeparator.js +11 -11
  181. package/dist/UploadedFile.cjs +1 -1
  182. package/dist/UploadedFile.js +29 -29
  183. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  184. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  185. package/dist/{defineProperty-BHpTtkhC.js → defineProperty-B5pLF6px.js} +8 -8
  186. package/dist/{emotion-element-5486c51c.browser.esm-CSejtOeT.js → emotion-element-5486c51c.browser.esm-Bb4VkP8U.js} +4 -4
  187. package/dist/{emotion-is-prop-valid.esm-BzFBwmJz.js → emotion-is-prop-valid.esm-DkbeH1Xy.js} +1 -1
  188. package/dist/{emotion-react.browser.esm-OWM-uG8Q.js → emotion-react.browser.esm-CN-s34fZ.js} +6 -6
  189. package/dist/{emotion-react.browser.esm-DQBL7Wls.cjs → emotion-react.browser.esm-D7h2t2Bz.cjs} +1 -1
  190. package/dist/{emotion-styled.browser.esm-BZSYYThs.js → emotion-styled.browser.esm-BiK8DcgW.js} +12 -12
  191. package/dist/floating-ui.react.esm-72DKnou_.js +1198 -0
  192. package/dist/floating-ui.react.esm-C4vrBVJU.cjs +4 -0
  193. package/dist/{hoist-non-react-statics.cjs-Drf1aBlk.js → hoist-non-react-statics.cjs-CAHiRNzQ.js} +1 -1
  194. package/dist/{hoist-non-react-statics.cjs-B8r9S_ak.cjs → hoist-non-react-statics.cjs-Dr-ytKVG.cjs} +3 -3
  195. package/dist/{index-CZJEA84h.js → index--Kmch3aI.js} +1 -1
  196. package/dist/index-BIlhCoy2.cjs +20 -0
  197. package/dist/{index-BLQWNy78.js → index-BUChtubz.js} +4 -4
  198. package/dist/{index-Ds9PUTwb.js → index-BYnWp42a.js} +208 -213
  199. package/dist/{index-D5vEbKUT.js → index-CNBqQrtK.js} +1 -1
  200. package/dist/{index-IO9v6o0I.cjs → index-CSXL784P.cjs} +2 -2
  201. package/dist/{index-C29T0m2a.cjs → index-Ct1N7fF4.cjs} +1 -1
  202. package/dist/{index-BklgDeu4.js → index-Cu0xwYjD.js} +1 -1
  203. package/dist/{index-Cdkz-XH-.js → index-CvebWhtp.js} +1 -1
  204. package/dist/index-DAOBjHnD.cjs +1 -0
  205. package/dist/index-DBXXH_TD.cjs +1 -0
  206. package/dist/{index-B_da1uvD.js → index-DLVVKJXD.js} +1 -1
  207. package/dist/index-DaiUAQVF.cjs +1 -0
  208. package/dist/index.cjs +1 -26
  209. package/dist/index.js +180 -376
  210. package/dist/{motion-CtkUpWEn.js → motion-ecIGZGwI.js} +1 -1
  211. package/dist/react-toastify.esm-CkXGwKXL.js +798 -0
  212. package/dist/react-toastify.esm-Dqcb4SQT.cjs +1 -0
  213. package/dist/{setPrototypeOf-a891FLQJ.js → setPrototypeOf-CttqfWo1.js} +2 -2
  214. package/dist/style.css +1 -5
  215. package/dist/{tslib.es6-ZNVz5r_T.js → tslib.es6-DQ-SzcmG.js} +5 -5
  216. package/dist/usePopover.cjs +1 -0
  217. package/dist/usePopover.js +44 -0
  218. package/dist/{utils-DEke8iwo.js → utils-C52T57HO.js} +73 -73
  219. package/dist/{utils-hdRGTsQ7.cjs → utils-DTAPpJXU.cjs} +1 -1
  220. package/package.json +17 -5
  221. package/vite.config.js +16 -0
  222. package/custom-addons/ThemeSelector.js +0 -111
  223. package/custom-addons/register.js +0 -16
  224. package/custom-addons/theme-selector.css +0 -17
  225. package/dist/DropdownMenu-B6qr13ik.cjs +0 -19
  226. package/dist/DropdownMenu-DZi3TJ8Q.js +0 -1547
  227. package/dist/KanbanCard-ConTmu3w.cjs +0 -30
  228. package/dist/TableView-Cj5_fbSR.js +0 -481
  229. package/dist/TableView-D8ex512p.cjs +0 -19
  230. package/dist/index-BjdOz5Ok.cjs +0 -1
  231. package/dist/index-DXnSjbfJ.cjs +0 -20
  232. package/dist/index-Dzkd2i4n.cjs +0 -1
  233. package/dist/index-P-naJISQ.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react"),Oe=require("./index-Ct1N7fF4.cjs");function ge(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ge(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function j(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ge(e))&&(r&&(r+=" "),r+=t);return r}function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}function ye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,u;for(u=0;u<r.length;u++)i=r[u],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function K(e){return typeof e=="number"&&!isNaN(e)}function G(e){return typeof e=="boolean"}function H(e){return typeof e=="string"}function x(e){return typeof e=="function"}function $(e){return H(e)||x(e)?e:null}function oe(e){return e===0||e}function Ne(e,t){return e===!1||K(e)&&e>0?e:t}var Te=!!(typeof window<"u"&&window.document&&window.document.createElement);function re(e){return s.isValidElement(e)||H(e)||x(e)||K(e)}var he={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},k={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function Pe(e,t,n){n===void 0&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame(function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame(function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Re(e){var t=e.enter,n=e.exit,r=e.appendPosition,i=r===void 0?!1:r,u=e.collapse,g=u===void 0?!0:u,m=e.collapseDuration,o=m===void 0?300:m;return function(c){var b=c.children,C=c.position,h=c.preventExitTransition,R=c.done,I=c.nodeRef,P=c.isIn,D=i?t+"--"+C:t,L=i?n+"--"+C:n,A=s.useRef(),l=s.useRef(0);s.useLayoutEffect(function(){d()},[]),s.useEffect(function(){P||(h?O():T())},[P]);function d(){var a=I.current;A.current=a.className,a.className+=" "+D,a.addEventListener("animationend",y)}function y(a){if(a.target===I.current){var v=I.current;v.removeEventListener("animationend",y),l.current===0&&(v.className=A.current)}}function T(){l.current=1;var a=I.current;a.className+=" "+L,a.addEventListener("animationend",O)}function O(){var a=I.current;a.removeEventListener("animationend",O),g?Pe(a,R,o):R()}return s.createElement(s.Fragment,null,b)}}var w={list:new Map,emitQueue:new Map,on:function(t,n){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(n),this},off:function(t,n){if(n){var r=this.list.get(t).filter(function(i){return i!==n});return this.list.set(t,r),this}return this.list.delete(t),this},cancelEmit:function(t){var n=this.emitQueue.get(t);return n&&(n.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit:function(t){for(var n=this,r=arguments.length,i=new Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];this.list.has(t)&&this.list.get(t).forEach(function(g){var m=setTimeout(function(){g.apply(void 0,i)},0);n.emitQueue.has(t)||n.emitQueue.set(t,[]),n.emitQueue.get(t).push(m)})}};function q(e,t){t===void 0&&(t=!1);var n=s.useRef(e);return s.useEffect(function(){t&&(n.current=e)}),n.current}function Le(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter(function(n){return n!==t.staleId});case 1:return oe(t.toastId)?e.filter(function(n){return n!==t.toastId}):[]}}var De=["delay","staleId"];function xe(e){var t=s.useReducer(function(l){return l+1},0),n=t[1],r=s.useReducer(Le,[]),i=r[0],u=r[1],g=s.useRef(null),m=q(0),o=q([]),E=q({}),c=q({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:b,getToast:function(d){return E[d]||null}});s.useEffect(function(){return c.containerId=e.containerId,w.cancelEmit(3).on(0,P).on(1,function(l){return g.current&&h(l)}).on(5,C).emit(2,c),function(){return w.emit(3,c)}},[]),s.useEffect(function(){c.isToastActive=b,c.displayedToast=i.length,w.emit(4,i.length,e.containerId)},[i]),s.useEffect(function(){c.props=e});function b(l){return i.indexOf(l)!==-1}function C(l){var d=l.containerId,y=c.props.limit;y&&(!d||c.containerId===d)&&(m-=o.length,o=[])}function h(l){u({type:1,toastId:l})}function R(){var l=o.shift(),d=l.toastContent,y=l.toastProps,T=l.staleId;D(d,y,T)}function I(l){var d=l.containerId,y=l.toastId,T=l.updateId;return!!(!g.current||c.props.enableMultiContainer&&d!==c.props.containerId||E[y]&&T==null)}function P(l,d){var y,T=d.delay,O=d.staleId,a=ye(d,De);if(!(!re(l)||I(a))){var v=a.toastId,B=a.updateId,U=a.data,f=c.props,_=function(){return h(v)},V=a.updateId==null;V&&m++;var N={toastId:v,updateId:B,isLoading:a.isLoading,theme:a.theme||f.theme,icon:(y=a.icon)!=null?y:f.icon,isIn:!1,key:a.key||c.toastKey++,type:a.type,closeToast:_,closeButton:a.closeButton,rtl:f.rtl,position:a.position||f.position,transition:a.transition||f.transition,className:$(a.className||f.toastClassName),bodyClassName:$(a.bodyClassName||f.bodyClassName),style:a.style||f.toastStyle,bodyStyle:a.bodyStyle||f.bodyStyle,onClick:a.onClick||f.onClick,pauseOnHover:G(a.pauseOnHover)?a.pauseOnHover:f.pauseOnHover,pauseOnFocusLoss:G(a.pauseOnFocusLoss)?a.pauseOnFocusLoss:f.pauseOnFocusLoss,draggable:G(a.draggable)?a.draggable:f.draggable,draggablePercent:K(a.draggablePercent)?a.draggablePercent:f.draggablePercent,draggableDirection:a.draggableDirection||f.draggableDirection,closeOnClick:G(a.closeOnClick)?a.closeOnClick:f.closeOnClick,progressClassName:$(a.progressClassName||f.progressClassName),progressStyle:a.progressStyle||f.progressStyle,autoClose:a.isLoading?!1:Ne(a.autoClose,f.autoClose),hideProgressBar:G(a.hideProgressBar)?a.hideProgressBar:f.hideProgressBar,progress:a.progress,role:H(a.role)?a.role:f.role,deleteToast:function(){L(v)}};x(a.onOpen)&&(N.onOpen=a.onOpen),x(a.onClose)&&(N.onClose=a.onClose),N.draggableDirection==="y"&&N.draggablePercent===80&&(N.draggablePercent*=1.5);var F=f.closeButton;a.closeButton===!1||re(a.closeButton)?F=a.closeButton:a.closeButton===!0&&(F=re(f.closeButton)?f.closeButton:!0),N.closeButton=F;var M=l;s.isValidElement(l)&&!H(l.type)?M=s.cloneElement(l,{closeToast:_,toastProps:N,data:U}):x(l)&&(M=l({closeToast:_,toastProps:N,data:U})),f.limit&&f.limit>0&&m>f.limit&&V?o.push({toastContent:M,toastProps:N,staleId:O}):K(T)&&T>0?setTimeout(function(){D(M,N,O)},T):D(M,N,O)}}function D(l,d,y){var T=d.toastId;y&&delete E[y],E[T]={content:l,props:d},u({type:0,toastId:T,staleId:y})}function L(l){delete E[l];var d=o.length;if(m=oe(l)?m-1:m-c.displayedToast,m<0&&(m=0),d>0){var y=oe(l)?1:c.props.limit;if(d===1||y===1)c.displayedToast++,R();else{var T=y>d?d:y;c.displayedToast=T;for(var O=0;O<T;O++)R()}}else n()}function A(l){for(var d={},y=e.newestOnTop?Object.keys(E).reverse():Object.keys(E),T=0;T<y.length;T++){var O=E[y[T]],a=O.props.position;d[a]||(d[a]=[]),d[a].push(O)}return Object.keys(d).map(function(v){return l(v,d[v])})}return{getToastToRender:A,collection:E,containerRef:g,isToastActive:b}}function fe(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function ve(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Be(e){var t=s.useState(!0),n=t[0],r=t[1],i=s.useState(!1),u=i[0],g=i[1],m=s.useRef(null),o=q({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),E=q(e,!0),c=e.autoClose,b=e.pauseOnHover,C=e.closeToast,h=e.onClick,R=e.closeOnClick;s.useEffect(function(){return x(e.onOpen)&&e.onOpen(s.isValidElement(e.children)&&e.children.props),function(){x(E.onClose)&&E.onClose(s.isValidElement(E.children)&&E.children.props)}},[]),s.useEffect(function(){return e.draggable&&d(),function(){e.draggable&&y()}},[e.draggable]),s.useEffect(function(){return e.pauseOnFocusLoss&&A(),function(){e.pauseOnFocusLoss&&l()}},[e.pauseOnFocusLoss]);function I(v){if(e.draggable){var B=m.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=B.getBoundingClientRect(),B.style.transition="",o.x=fe(v.nativeEvent),o.y=ve(v.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=B.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=B.offsetHeight*(e.draggablePercent/100))}}function P(){if(o.boundingRect){var v=o.boundingRect,B=v.top,U=v.bottom,f=v.left,_=v.right;e.pauseOnHover&&o.x>=f&&o.x<=_&&o.y>=B&&o.y<=U?L():D()}}function D(){r(!0)}function L(){r(!1)}function A(){document.hasFocus()||L(),window.addEventListener("focus",D),window.addEventListener("blur",L)}function l(){window.removeEventListener("focus",D),window.removeEventListener("blur",L)}function d(){document.addEventListener("mousemove",T),document.addEventListener("mouseup",O),document.addEventListener("touchmove",T),document.addEventListener("touchend",O)}function y(){document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",O),document.removeEventListener("touchmove",T),document.removeEventListener("touchend",O)}function T(v){if(o.canDrag){v.preventDefault();var B=m.current;n&&L(),o.x=fe(v),o.y=ve(v),e.draggableDirection==="x"?o.delta=o.x-o.start:o.delta=o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),B.style.transform="translate"+e.draggableDirection+"("+o.delta+"px)",B.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance))}}function O(){var v=m.current;if(o.canDrag){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance){g(!0),e.closeToast();return}v.style.transition="transform 0.2s, opacity 0.2s",v.style.transform="translate"+e.draggableDirection+"(0)",v.style.opacity="1"}}var a={onMouseDown:I,onTouchStart:I,onMouseUp:P,onTouchEnd:P};return c&&b&&(a.onMouseEnter=L,a.onMouseLeave=D),R&&(a.onClick=function(v){h&&h(v),o.canCloseOnClick&&C()}),{playToast:D,pauseToast:L,isRunning:n,preventExitTransition:u,toastRef:m,eventHandlers:a}}function Ee(e){var t=e.closeToast,n=e.theme,r=e.ariaLabel,i=r===void 0?"close":r;return s.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(g){g.stopPropagation(),t(g)},"aria-label":i},s.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},s.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function pe(e){var t,n,r=e.delay,i=e.isRunning,u=e.closeToast,g=e.type,m=e.hide,o=e.className,E=e.style,c=e.controlledProgress,b=e.progress,C=e.rtl,h=e.isIn,R=e.theme,I=S({},E,{animationDuration:r+"ms",animationPlayState:i?"running":"paused",opacity:m?0:1});c&&(I.transform="scaleX("+b+")");var P=j("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+R,"Toastify__progress-bar--"+g,(t={},t["Toastify__progress-bar--rtl"]=C,t)),D=x(o)?o({rtl:C,type:g,defaultClassName:P}):j(P,o),L=(n={},n[c&&b>=1?"onTransitionEnd":"onAnimationEnd"]=c&&b<1?null:function(){h&&u()},n);return s.createElement("div",Object.assign({role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:D,style:I},L))}pe.defaultProps={type:k.DEFAULT,hide:!1};var Se=["theme","type"],J=function(t){var n=t.theme,r=t.type,i=ye(t,Se);return s.createElement("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":"var(--toastify-icon-color-"+r+")"},i))};function we(e){return s.createElement(J,Object.assign({},e),s.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"}))}function _e(e){return s.createElement(J,Object.assign({},e),s.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"}))}function ke(e){return s.createElement(J,Object.assign({},e),s.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"}))}function Ae(e){return s.createElement(J,Object.assign({},e),s.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"}))}function Fe(){return s.createElement("div",{className:"Toastify__spinner"})}var me={info:_e,warning:we,success:ke,error:Ae,spinner:Fe},Me=function(t){var n,r,i=Be(t),u=i.isRunning,g=i.preventExitTransition,m=i.toastRef,o=i.eventHandlers,E=t.closeButton,c=t.children,b=t.autoClose,C=t.onClick,h=t.type,R=t.hideProgressBar,I=t.closeToast,P=t.transition,D=t.position,L=t.className,A=t.style,l=t.bodyClassName,d=t.bodyStyle,y=t.progressClassName,T=t.progressStyle,O=t.updateId,a=t.role,v=t.progress,B=t.rtl,U=t.toastId,f=t.deleteToast,_=t.isIn,V=t.isLoading,N=t.icon,F=t.theme,M=j("Toastify__toast","Toastify__toast-theme--"+F,"Toastify__toast--"+h,(n={},n["Toastify__toast--rtl"]=B,n)),te=x(L)?L({rtl:B,position:D,type:h,defaultClassName:M}):j(M,L),ne=!!v,ue=me[h],ae={theme:F,type:h},z=ue&&ue(ae);N===!1?z=void 0:x(N)?z=N(ae):s.isValidElement(N)?z=s.cloneElement(N,ae):H(N)?z=N:V&&(z=me.spinner());function Ie(W){if(W){var de={closeToast:I,type:h,theme:F};if(x(W))return W(de);if(s.isValidElement(W))return s.cloneElement(W,de)}}return s.createElement(P,{isIn:_,done:f,position:D,preventExitTransition:g,nodeRef:m},s.createElement("div",Object.assign({id:U,onClick:C,className:te},o,{style:A,ref:m}),s.createElement("div",Object.assign({},_&&{role:a},{className:x(l)?l({type:h}):j("Toastify__toast-body",l),style:d}),z&&s.createElement("div",{className:j("Toastify__toast-icon",(r={},r["Toastify--animate-icon Toastify__zoom-enter"]=!V,r))},z),s.createElement("div",null,c)),Ie(E),(b||ne)&&s.createElement(pe,Object.assign({},O&&!ne?{key:"pb-"+O}:{},{rtl:B,theme:F,delay:b,isRunning:u,isIn:_,closeToast:I,hide:R,type:h,style:T,className:y,controlledProgress:ne,progress:v}))))},je=Re({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),ce=function(t){var n=xe(t),r=n.getToastToRender,i=n.containerRef,u=n.isToastActive,g=t.className,m=t.style,o=t.rtl,E=t.containerId;function c(b){var C,h=j("Toastify__toast-container","Toastify__toast-container--"+b,(C={},C["Toastify__toast-container--rtl"]=o,C));return x(g)?g({position:b,rtl:o,defaultClassName:h}):j(h,$(g))}return s.createElement("div",{ref:i,className:"Toastify",id:E},r(function(b,C){var h=C.length===0?S({},m,{pointerEvents:"none"}):S({},m);return s.createElement("div",{className:c(b),style:h,key:"container-"+b},C.map(function(R){var I=R.content,P=R.props;return s.createElement(Me,Object.assign({},P,{isIn:u(P.toastId),key:"toast-"+P.key,closeButton:P.closeButton===!0?Ee:P.closeButton}),I)}))}))};ce.defaultProps={position:he.TOP_RIGHT,transition:je,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Ee,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Q=new Map,se,Y,be,ie=[],le=!1;function He(){return Q.size>0}function ze(e,t){var n=t.containerId,r=Q.get(n||se);return r?r.getToast(e):null}function Ce(){return Math.random().toString(36).substr(2,9)}function Ue(e){return e&&(H(e.toastId)||K(e.toastId))?e.toastId:Ce()}function X(e,t){return He()?w.emit(0,e,t):(ie.push({content:e,options:t}),le&&Te&&(le=!1,Y=document.createElement("div"),document.body.appendChild(Y),Oe.reactDomExports.render(s.createElement(ce,Object.assign({},be)),Y))),t.toastId}function Z(e,t){return S({},t,{type:t&&t.type||e,toastId:Ue(t)})}var ee=function(t){return function(n,r){return X(n,Z(t,r))}},p=function(t,n){return X(t,Z(k.DEFAULT,n))};p.loading=function(e,t){return X(e,Z(k.DEFAULT,S({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))};function qe(e,t,n){var r=t.pending,i=t.error,u=t.success,g;r&&(g=H(r)?p.loading(r,n):p.loading(r.render,S({},n,r)));var m={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},o=function(b,C,h){var R=S({type:b},m,n,{data:h}),I=H(C)?{render:C}:C;return g?p.update(g,S({},R,I)):p(I.render,S({},R,I)),h},E=x(e)?e():e;return E.then(function(c){return u&&o("success",u,c)}).catch(function(c){return i&&o("error",i,c)}),E}p.promise=qe;p.success=ee(k.SUCCESS);p.info=ee(k.INFO);p.error=ee(k.ERROR);p.warning=ee(k.WARNING);p.warn=p.warning;p.dark=function(e,t){return X(e,Z(k.DEFAULT,S({theme:"dark"},t)))};p.dismiss=function(e){return w.emit(1,e)};p.clearWaitingQueue=function(e){return e===void 0&&(e={}),w.emit(5,e)};p.isActive=function(e){var t=!1;return Q.forEach(function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t};p.update=function(e,t){t===void 0&&(t={}),setTimeout(function(){var n=ze(e,t);if(n){var r=n.props,i=n.content,u=S({},r,t,{toastId:t.toastId||e,updateId:Ce()});u.toastId!==e&&(u.staleId=e);var g=u.render||i;delete u.render,X(g,u)}},0)};p.done=function(e){p.update(e,{progress:1})};p.onChange=function(e){return x(e)&&w.on(4,e),function(){x(e)&&w.off(4,e)}};p.configure=function(e){e===void 0&&(e={}),le=!0,be=e};p.POSITION=he;p.TYPE=k;w.on(2,function(e){se=e.containerId||e,Q.set(se,e),ie.forEach(function(t){w.emit(0,t.content,t.options)}),ie=[]}).on(3,function(e){Q.delete(e.containerId||e),Q.size===0&&w.off(0).off(1).off(5),Te&&Y&&document.body.removeChild(Y)});exports.ToastContainer=ce;exports.toast=p;
@@ -8,6 +8,6 @@ function n(e, r) {
8
8
  }, n(e, r);
9
9
  }
10
10
  export {
11
- o as _,
12
- n as a
11
+ n as _,
12
+ o as a
13
13
  };