@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
@@ -1,83 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime"),i=require("react"),P=require("./index-DXnSjbfJ.cjs"),Te=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),we=require("./index-C29T0m2a.cjs"),S=require("./utils-hdRGTsQ7.cjs"),Be=require("./ThemeProvider.cjs"),_e=require("./Icon.cjs"),Se=require("./Avatar.cjs"),De=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs");function he(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=he(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function H(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=he(e))&&(a&&(a+=" "),a+=t);return a}function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},D.apply(this,arguments)}function be(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function J(e){return typeof e=="number"&&!isNaN(e)}function K(e){return typeof e=="boolean"}function V(e){return typeof e=="string"}function B(e){return typeof e=="function"}function ee(e){return V(e)||B(e)?e:null}function le(e){return e===0||e}function ke(e,t){return e===!1||J(e)&&e>0?e:t}var Ce=!!(typeof window<"u"&&window.document&&window.document.createElement);function re(e){return i.isValidElement(e)||V(e)||B(e)||J(e)}var Ee={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},M={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function je(e,t,n){n===void 0&&(n=300);var a=e.scrollHeight,r=e.style;requestAnimationFrame(function(){r.minHeight="initial",r.height=a+"px",r.transition="all "+n+"ms",requestAnimationFrame(function(){r.height="0",r.padding="0",r.margin="0",setTimeout(t,n)})})}function Ae(e){var t=e.enter,n=e.exit,a=e.appendPosition,r=a===void 0?!1:a,u=e.collapse,m=u===void 0?!0:u,d=e.collapseDuration,s=d===void 0?300:d;return function(l){var T=l.children,h=l.position,p=l.preventExitTransition,I=l.done,E=l.nodeRef,O=l.isIn,w=r?t+"--"+h:t,R=r?n+"--"+h:n,F=i.useRef(),c=i.useRef(0);i.useLayoutEffect(function(){f()},[]),i.useEffect(function(){O||(p?x():C())},[O]);function f(){var o=E.current;F.current=o.className,o.className+=" "+w,o.addEventListener("animationend",b)}function b(o){if(o.target===E.current){var y=E.current;y.removeEventListener("animationend",b),c.current===0&&(y.className=F.current)}}function C(){c.current=1;var o=E.current;o.className+=" "+R,o.addEventListener("animationend",x)}function x(){var o=E.current;o.removeEventListener("animationend",x),m?je(o,I,s):I()}return i.createElement(i.Fragment,null,T)}}var k={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 a=this.list.get(t).filter(function(r){return r!==n});return this.list.set(t,a),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,a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];this.list.has(t)&&this.list.get(t).forEach(function(m){var d=setTimeout(function(){m.apply(void 0,r)},0);n.emitQueue.has(t)||n.emitQueue.set(t,[]),n.emitQueue.get(t).push(d)})}};function W(e,t){t===void 0&&(t=!1);var n=i.useRef(e);return i.useEffect(function(){t&&(n.current=e)}),n.current}function Me(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter(function(n){return n!==t.staleId});case 1:return le(t.toastId)?e.filter(function(n){return n!==t.toastId}):[]}}var Fe=["delay","staleId"];function $e(e){var t=i.useReducer(function(c){return c+1},0),n=t[1],a=i.useReducer(Me,[]),r=a[0],u=a[1],m=i.useRef(null),d=W(0),s=W([]),v=W({}),l=W({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:T,getToast:function(f){return v[f]||null}});i.useEffect(function(){return l.containerId=e.containerId,k.cancelEmit(3).on(0,O).on(1,function(c){return m.current&&p(c)}).on(5,h).emit(2,l),function(){return k.emit(3,l)}},[]),i.useEffect(function(){l.isToastActive=T,l.displayedToast=r.length,k.emit(4,r.length,e.containerId)},[r]),i.useEffect(function(){l.props=e});function T(c){return r.indexOf(c)!==-1}function h(c){var f=c.containerId,b=l.props.limit;b&&(!f||l.containerId===f)&&(d-=s.length,s=[])}function p(c){u({type:1,toastId:c})}function I(){var c=s.shift(),f=c.toastContent,b=c.toastProps,C=c.staleId;w(f,b,C)}function E(c){var f=c.containerId,b=c.toastId,C=c.updateId;return!!(!m.current||l.props.enableMultiContainer&&f!==l.props.containerId||v[b]&&C==null)}function O(c,f){var b,C=f.delay,x=f.staleId,o=be(f,Fe);if(!(!re(c)||E(o))){var y=o.toastId,_=o.updateId,U=o.data,g=l.props,A=function(){return p(y)},G=o.updateId==null;G&&d++;var L={toastId:y,updateId:_,isLoading:o.isLoading,theme:o.theme||g.theme,icon:(b=o.icon)!=null?b:g.icon,isIn:!1,key:o.key||l.toastKey++,type:o.type,closeToast:A,closeButton:o.closeButton,rtl:g.rtl,position:o.position||g.position,transition:o.transition||g.transition,className:ee(o.className||g.toastClassName),bodyClassName:ee(o.bodyClassName||g.bodyClassName),style:o.style||g.toastStyle,bodyStyle:o.bodyStyle||g.bodyStyle,onClick:o.onClick||g.onClick,pauseOnHover:K(o.pauseOnHover)?o.pauseOnHover:g.pauseOnHover,pauseOnFocusLoss:K(o.pauseOnFocusLoss)?o.pauseOnFocusLoss:g.pauseOnFocusLoss,draggable:K(o.draggable)?o.draggable:g.draggable,draggablePercent:J(o.draggablePercent)?o.draggablePercent:g.draggablePercent,draggableDirection:o.draggableDirection||g.draggableDirection,closeOnClick:K(o.closeOnClick)?o.closeOnClick:g.closeOnClick,progressClassName:ee(o.progressClassName||g.progressClassName),progressStyle:o.progressStyle||g.progressStyle,autoClose:o.isLoading?!1:ke(o.autoClose,g.autoClose),hideProgressBar:K(o.hideProgressBar)?o.hideProgressBar:g.hideProgressBar,progress:o.progress,role:V(o.role)?o.role:g.role,deleteToast:function(){R(y)}};B(o.onOpen)&&(L.onOpen=o.onOpen),B(o.onClose)&&(L.onClose=o.onClose),L.draggableDirection==="y"&&L.draggablePercent===80&&(L.draggablePercent*=1.5);var $=g.closeButton;o.closeButton===!1||re(o.closeButton)?$=o.closeButton:o.closeButton===!0&&($=re(g.closeButton)?g.closeButton:!0),L.closeButton=$;var z=c;i.isValidElement(c)&&!V(c.type)?z=i.cloneElement(c,{closeToast:A,toastProps:L,data:U}):B(c)&&(z=c({closeToast:A,toastProps:L,data:U})),g.limit&&g.limit>0&&d>g.limit&&G?s.push({toastContent:z,toastProps:L,staleId:x}):J(C)&&C>0?setTimeout(function(){w(z,L,x)},C):w(z,L,x)}}function w(c,f,b){var C=f.toastId;b&&delete v[b],v[C]={content:c,props:f},u({type:0,toastId:C,staleId:b})}function R(c){delete v[c];var f=s.length;if(d=le(c)?d-1:d-l.displayedToast,d<0&&(d=0),f>0){var b=le(c)?1:l.props.limit;if(f===1||b===1)l.displayedToast++,I();else{var C=b>f?f:b;l.displayedToast=C;for(var x=0;x<C;x++)I()}}else n()}function F(c){for(var f={},b=e.newestOnTop?Object.keys(v).reverse():Object.keys(v),C=0;C<b.length;C++){var x=v[b[C]],o=x.props.position;f[o]||(f[o]=[]),f[o].push(x)}return Object.keys(f).map(function(y){return c(y,f[y])})}return{getToastToRender:F,collection:v,containerRef:m,isToastActive:T}}function ve(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function ye(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function ze(e){var t=i.useState(!0),n=t[0],a=t[1],r=i.useState(!1),u=r[0],m=r[1],d=i.useRef(null),s=W({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),v=W(e,!0),l=e.autoClose,T=e.pauseOnHover,h=e.closeToast,p=e.onClick,I=e.closeOnClick;i.useEffect(function(){return B(e.onOpen)&&e.onOpen(i.isValidElement(e.children)&&e.children.props),function(){B(v.onClose)&&v.onClose(i.isValidElement(v.children)&&v.children.props)}},[]),i.useEffect(function(){return e.draggable&&f(),function(){e.draggable&&b()}},[e.draggable]),i.useEffect(function(){return e.pauseOnFocusLoss&&F(),function(){e.pauseOnFocusLoss&&c()}},[e.pauseOnFocusLoss]);function E(y){if(e.draggable){var _=d.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=_.getBoundingClientRect(),_.style.transition="",s.x=ve(y.nativeEvent),s.y=ye(y.nativeEvent),e.draggableDirection==="x"?(s.start=s.x,s.removalDistance=_.offsetWidth*(e.draggablePercent/100)):(s.start=s.y,s.removalDistance=_.offsetHeight*(e.draggablePercent/100))}}function O(){if(s.boundingRect){var y=s.boundingRect,_=y.top,U=y.bottom,g=y.left,A=y.right;e.pauseOnHover&&s.x>=g&&s.x<=A&&s.y>=_&&s.y<=U?R():w()}}function w(){a(!0)}function R(){a(!1)}function F(){document.hasFocus()||R(),window.addEventListener("focus",w),window.addEventListener("blur",R)}function c(){window.removeEventListener("focus",w),window.removeEventListener("blur",R)}function f(){document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.addEventListener("touchmove",C),document.addEventListener("touchend",x)}function b(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",x)}function C(y){if(s.canDrag){y.preventDefault();var _=d.current;n&&R(),s.x=ve(y),s.y=ye(y),e.draggableDirection==="x"?s.delta=s.x-s.start:s.delta=s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),_.style.transform="translate"+e.draggableDirection+"("+s.delta+"px)",_.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance))}}function x(){var y=d.current;if(s.canDrag){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){m(!0),e.closeToast();return}y.style.transition="transform 0.2s, opacity 0.2s",y.style.transform="translate"+e.draggableDirection+"(0)",y.style.opacity="1"}}var o={onMouseDown:E,onTouchStart:E,onMouseUp:O,onTouchEnd:O};return l&&T&&(o.onMouseEnter=R,o.onMouseLeave=w),I&&(o.onClick=function(y){p&&p(y),s.canCloseOnClick&&h()}),{playToast:w,pauseToast:R,isRunning:n,preventExitTransition:u,toastRef:d,eventHandlers:o}}function Ne(e){var t=e.closeToast,n=e.theme,a=e.ariaLabel,r=a===void 0?"close":a;return i.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(m){m.stopPropagation(),t(m)},"aria-label":r},i.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},i.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,a=e.delay,r=e.isRunning,u=e.closeToast,m=e.type,d=e.hide,s=e.className,v=e.style,l=e.controlledProgress,T=e.progress,h=e.rtl,p=e.isIn,I=e.theme,E=D({},v,{animationDuration:a+"ms",animationPlayState:r?"running":"paused",opacity:d?0:1});l&&(E.transform="scaleX("+T+")");var O=H("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+I,"Toastify__progress-bar--"+m,(t={},t["Toastify__progress-bar--rtl"]=h,t)),w=B(s)?s({rtl:h,type:m,defaultClassName:O}):H(O,s),R=(n={},n[l&&T>=1?"onTransitionEnd":"onAnimationEnd"]=l&&T<1?null:function(){p&&u()},n);return i.createElement("div",Object.assign({role:"progressbar","aria-hidden":d?"true":"false","aria-label":"notification timer",className:w,style:E},R))}Pe.defaultProps={type:M.DEFAULT,hide:!1};var He=["theme","type"],te=function(t){var n=t.theme,a=t.type,r=be(t,He);return i.createElement("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":"var(--toastify-icon-color-"+a+")"},r))};function Ve(e){return i.createElement(te,Object.assign({},e),i.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 qe(e){return i.createElement(te,Object.assign({},e),i.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 Ue(e){return i.createElement(te,Object.assign({},e),i.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 We(e){return i.createElement(te,Object.assign({},e),i.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 Qe(){return i.createElement("div",{className:"Toastify__spinner"})}var pe={info:qe,warning:Ve,success:Ue,error:We,spinner:Qe},Ge=function(t){var n,a,r=ze(t),u=r.isRunning,m=r.preventExitTransition,d=r.toastRef,s=r.eventHandlers,v=t.closeButton,l=t.children,T=t.autoClose,h=t.onClick,p=t.type,I=t.hideProgressBar,E=t.closeToast,O=t.transition,w=t.position,R=t.className,F=t.style,c=t.bodyClassName,f=t.bodyStyle,b=t.progressClassName,C=t.progressStyle,x=t.updateId,o=t.role,y=t.progress,_=t.rtl,U=t.toastId,g=t.deleteToast,A=t.isIn,G=t.isLoading,L=t.icon,$=t.theme,z=H("Toastify__toast","Toastify__toast-theme--"+$,"Toastify__toast--"+p,(n={},n["Toastify__toast--rtl"]=_,n)),ae=B(R)?R({rtl:_,position:w,type:p,defaultClassName:z}):H(z,R),se=!!y,me=pe[p],ie={theme:$,type:p},q=me&&me(ie);L===!1?q=void 0:B(L)?q=L(ie):i.isValidElement(L)?q=i.cloneElement(L,ie):V(L)?q=L:G&&(q=pe.spinner());function Le(Y){if(Y){var ge={closeToast:E,type:p,theme:$};if(B(Y))return Y(ge);if(i.isValidElement(Y))return i.cloneElement(Y,ge)}}return i.createElement(O,{isIn:A,done:g,position:w,preventExitTransition:m,nodeRef:d},i.createElement("div",Object.assign({id:U,onClick:h,className:ae},s,{style:F,ref:d}),i.createElement("div",Object.assign({},A&&{role:o},{className:B(c)?c({type:p}):H("Toastify__toast-body",c),style:f}),q&&i.createElement("div",{className:H("Toastify__toast-icon",(a={},a["Toastify--animate-icon Toastify__zoom-enter"]=!G,a))},q),i.createElement("div",null,l)),Le(v),(T||se)&&i.createElement(Pe,Object.assign({},x&&!se?{key:"pb-"+x}:{},{rtl:_,theme:$,delay:T,isRunning:u,isIn:A,closeToast:E,hide:I,type:p,style:C,className:b,controlledProgress:se,progress:y}))))},Ye=Ae({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),fe=function(t){var n=$e(t),a=n.getToastToRender,r=n.containerRef,u=n.isToastActive,m=t.className,d=t.style,s=t.rtl,v=t.containerId;function l(T){var h,p=H("Toastify__toast-container","Toastify__toast-container--"+T,(h={},h["Toastify__toast-container--rtl"]=s,h));return B(m)?m({position:T,rtl:s,defaultClassName:p}):H(p,ee(m))}return i.createElement("div",{ref:r,className:"Toastify",id:v},a(function(T,h){var p=h.length===0?D({},d,{pointerEvents:"none"}):D({},d);return i.createElement("div",{className:l(T),style:p,key:"container-"+T},h.map(function(I){var E=I.content,O=I.props;return i.createElement(Ge,Object.assign({},O,{isIn:u(O.toastId),key:"toast-"+O.key,closeButton:O.closeButton===!0?Ne:O.closeButton}),E)}))}))};fe.defaultProps={position:Ee.TOP_RIGHT,transition:Ye,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Ne,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Q=new Map,ce,X,Oe,ue=[],de=!1;function Ke(){return Q.size>0}function Xe(e,t){var n=t.containerId,a=Q.get(n||ce);return a?a.getToast(e):null}function Ie(){return Math.random().toString(36).substr(2,9)}function Je(e){return e&&(V(e.toastId)||J(e.toastId))?e.toastId:Ie()}function Z(e,t){return Ke()?k.emit(0,e,t):(ue.push({content:e,options:t}),de&&Ce&&(de=!1,X=document.createElement("div"),document.body.appendChild(X),we.reactDomExports.render(i.createElement(fe,Object.assign({},Oe)),X))),t.toastId}function ne(e,t){return D({},t,{type:t&&t.type||e,toastId:Je(t)})}var oe=function(t){return function(n,a){return Z(n,ne(t,a))}},N=function(t,n){return Z(t,ne(M.DEFAULT,n))};N.loading=function(e,t){return Z(e,ne(M.DEFAULT,D({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))};function Ze(e,t,n){var a=t.pending,r=t.error,u=t.success,m;a&&(m=V(a)?N.loading(a,n):N.loading(a.render,D({},n,a)));var d={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=function(T,h,p){var I=D({type:T},d,n,{data:p}),E=V(h)?{render:h}:h;return m?N.update(m,D({},I,E)):N(E.render,D({},I,E)),p},v=B(e)?e():e;return v.then(function(l){return u&&s("success",u,l)}).catch(function(l){return r&&s("error",r,l)}),v}N.promise=Ze;N.success=oe(M.SUCCESS);N.info=oe(M.INFO);N.error=oe(M.ERROR);N.warning=oe(M.WARNING);N.warn=N.warning;N.dark=function(e,t){return Z(e,ne(M.DEFAULT,D({theme:"dark"},t)))};N.dismiss=function(e){return k.emit(1,e)};N.clearWaitingQueue=function(e){return e===void 0&&(e={}),k.emit(5,e)};N.isActive=function(e){var t=!1;return Q.forEach(function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t};N.update=function(e,t){t===void 0&&(t={}),setTimeout(function(){var n=Xe(e,t);if(n){var a=n.props,r=n.content,u=D({},a,t,{toastId:t.toastId||e,updateId:Ie()});u.toastId!==e&&(u.staleId=e);var m=u.render||r;delete u.render,Z(m,u)}},0)};N.done=function(e){N.update(e,{progress:1})};N.onChange=function(e){return B(e)&&k.on(4,e),function(){B(e)&&k.off(4,e)}};N.configure=function(e){e===void 0&&(e={}),de=!0,Oe=e};N.POSITION=Ee;N.TYPE=M;k.on(2,function(e){ce=e.containerId||e,Q.set(ce,e),ue.forEach(function(t){k.emit(0,t.content,t.options)}),ue=[]}).on(3,function(e){Q.delete(e.containerId||e),Q.size===0&&k.off(0).off(1).off(5),Ce&&X&&document.body.removeChild(X)});const et=Te.newStyled.div`
2
- ${e=>S.getComponentTypographyCss(e.theme,"Notification","small","enabled")};
3
-
4
- word-wrap: break-word;
5
- box-sizing: border-box;
6
- display: flex;
7
- gap: 1rem;
8
- justify-content: space-between;
9
-
10
- & .notification-actions {
11
- align-items: center;
12
- ${e=>e.sideButtons&&"margin: -14px"};
13
- flex-direction: ${e=>e.sideButtons?"column":"row"};
14
- ${e=>e.sideButtons&&"margin-left: auto"};
15
- ${e=>e.inlineActions==!1&&e.sideButtons==!1&&"padding-top: 4px"};
16
- gap: ${e=>e.sideButtons?"0":"1rem"};
17
- display: flex;
18
-
19
- color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","action")};
20
-
21
- & > button {
22
- ${e=>e.sideButtons&&"flex: 1; width: 100%;"}
23
- }
24
- }
25
- & .notification-main {
26
- word-wrap: break-word;
27
- box-sizing: border-box;
28
- display: flex;
29
- gap: 1rem;
30
- }
31
- & .notification-content {
32
- display: flex;
33
- flex-direction: column;
34
- gap: 0.25rem;
35
- color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","text")};
36
- }
37
- & .notification-icon {
38
- align-items: flex-start;
39
- & i {
40
- font-size: 1.25rem;
41
- }
42
- }
43
- & .notification-title {
44
- font-weight: ${e=>S.getComponentPropValue(e.theme,"Notification",e.color,"enabled","fontWeightTitle")};
45
- color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","title")};
46
- }
47
- `,xe=i.forwardRef((e,t)=>{const{title:n,icon:a,className:r,style:u={},size:m="small",avatar:d=!1,actions:s,inlineActions:v=!1,sideButtons:l=!1,iconProps:T,avatarProps:h,children:p,...I}=e,O={theme:De.useTheme(),className:r,style:u,size:m,inlineActions:v,sideButtons:l};return j.jsxs(et,{ref:t,...O,...I,children:[j.jsxs("div",{className:"notification-main",children:[d?j.jsx(Se,{sizeInUnits:"2.75rem",...h}):a&&j.jsx(_e,{className:"notification-icon",icon:a,...T}),j.jsxs("div",{className:"notification-content",children:[j.jsx("div",{className:"notification-title",children:n}),p,!v&&!l&&j.jsx("div",{className:"notification-actions",children:s})]})]}),(v||l)&&j.jsx("div",{className:"notification-actions",children:s})]})});xe.propTypes={avatar:P.PropTypes.bool,title:P.PropTypes.string,icon:P.PropTypes.string,actions:P.PropTypes.element,inlineActions:P.PropTypes.bool,sideButtons:P.PropTypes.bool,className:P.PropTypes.string,style:P.PropTypes.object,iconProps:P.PropTypes.any,avatarProps:P.PropTypes.any};const tt=Te.newStyled.div`
48
- & .lnc-notification {
49
- & > div {
50
- background-color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","background","backgroundOpacity")};
51
-
52
- box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
53
- 0px 4px 6px -2px rgba(0, 0, 0, 0.05);
54
- border: ${e=>`1px solid ${S.getColorRgbaValue(e.theme,"Notification","default","enabled","border")}`};
55
- border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,"regular")};
56
- }
57
- & .Toastify__close-button {
58
- & svg {
59
- fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","default","enabled","icon")};
60
- }
61
- }
62
- & .Toastify__toast--success {
63
- & svg {
64
- fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","success","enabled","icon")};
65
- }
66
- }
67
- & .Toastify__toast--information {
68
- & svg {
69
- fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","information","enabled","icon")};
70
- }
71
- }
72
- & .Toastify__toast--danger {
73
- & svg {
74
- fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","warning","enabled","icon")};
75
- }
76
- }
77
- & .Toastify__toast--error {
78
- & svg {
79
- fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","danger","enabled","icon")};
80
- }
81
- }
82
- }
83
- `,Re=i.forwardRef((e,t)=>{const{position:n="top-right",autoClose:a=5e5,hideProgressBar:r=!0,newestOnTop:u=!0,closeOnClick:m=!0,rtl:d=!1,pauseOnFocusLoss:s=!1,draggable:v=!1,pauseOnHover:l=!1,closeButton:T=!0,className:h="",style:p={},toastContainerProps:I,children:E,...O}=e,{theme:w}=Be.useTheme(),R={theme:w,className:"lnc-ui-notification "+h,style:p};return j.jsx(tt,{ref:t,...R,...O,children:j.jsx(fe,{position:n,autoClose:a,hideProgressBar:r,newestOnTop:u,closeOnClick:m,rtl:d,pauseOnFocusLoss:s,draggable:v,pauseOnHover:l,closeButton:T,className:"lnc-notification",...I})})});Re.propTypes={position:P.PropTypes.oneOf(["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]),autoClose:P.PropTypes.number,hideProgressBar:P.PropTypes.bool,newestOnTop:P.PropTypes.bool,closeOnClick:P.PropTypes.bool,rtl:P.PropTypes.bool,pauseOnFocusLoss:P.PropTypes.bool,draggable:P.PropTypes.bool,pauseOnHover:P.PropTypes.bool,closeButton:P.PropTypes.bool,className:P.PropTypes.string,style:P.PropTypes.object,toastContainerProps:P.PropTypes.any};exports.NotificationContainer=Re;exports.NotificationMessage=xe;exports.notification=N;
1
+ "use strict";const t=require("./react-toastify.esm-Dqcb4SQT.cjs"),s=t.toast;module.exports=s;