@nice2dev/ui 1.0.5 → 1.0.8

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 (130) hide show
  1. package/README.md +253 -207
  2. package/dist/NiceAPIFlow.doc-DnQLPUie.js +30 -0
  3. package/dist/NiceAPIFlow.doc-Dx4qw1lm.cjs +6 -0
  4. package/dist/NiceBranchManager.doc-BXjiENlD.cjs +6 -0
  5. package/dist/NiceBranchManager.doc-xLB82YwU.js +30 -0
  6. package/dist/NiceButton-B5RXLDwI.cjs +1 -0
  7. package/dist/NiceButton-CDiS45Ya.cjs +1 -0
  8. package/dist/NiceButton-D9l39Rs7.js +595 -0
  9. package/dist/NiceButton-DmTHNHet.js +450 -0
  10. package/dist/NiceCodeTemplate.doc-BWxTE4C_.cjs +6 -0
  11. package/dist/NiceCodeTemplate.doc-CA2U5F-v.js +30 -0
  12. package/dist/NiceDataBranchGraph.doc-CkitupWc.js +29 -0
  13. package/dist/NiceDataBranchGraph.doc-DDUgipqH.cjs +5 -0
  14. package/dist/NiceDataBranchManager.doc-B0ODKOs4.js +30 -0
  15. package/dist/NiceDataBranchManager.doc-CC5o8ihs.cjs +6 -0
  16. package/dist/NiceDataConflictResolver.doc-CdzScNie.cjs +5 -0
  17. package/dist/NiceDataConflictResolver.doc-V8vxYAeo.js +29 -0
  18. package/dist/NiceDataDiffViewer.doc-CR14Bq3A.cjs +6 -0
  19. package/dist/NiceDataDiffViewer.doc-w2I2QjhX.js +30 -0
  20. package/dist/NiceDataMapper.doc-C7jSyHRM.js +30 -0
  21. package/dist/NiceDataMapper.doc-DXjQHz87.cjs +6 -0
  22. package/dist/NiceDataMergeBuilder.doc-CV32WC_w.cjs +6 -0
  23. package/dist/NiceDataMergeBuilder.doc-DtuYb3nx.js +30 -0
  24. package/dist/NiceDataSnapshot.doc-CFLkY3ry.js +30 -0
  25. package/dist/NiceDataSnapshot.doc-CpZyQ17u.cjs +6 -0
  26. package/dist/NiceErrorBoundary-BAeqfoSc.cjs +1 -0
  27. package/dist/NiceErrorBoundary-D1hh5GGe.js +732 -0
  28. package/dist/NiceErrorBoundary-Dta4TGee.cjs +1 -0
  29. package/dist/NiceErrorBoundary-niMx1aSJ.js +837 -0
  30. package/dist/NiceEventOrchestrator.doc-C4SJfIDV.js +30 -0
  31. package/dist/NiceEventOrchestrator.doc-CxjsLxBG.cjs +6 -0
  32. package/dist/NiceGitBlame.doc-BG3_K9_0.cjs +6 -0
  33. package/dist/NiceGitBlame.doc-DrJABEat.js +30 -0
  34. package/dist/NiceGitConflictResolver.doc-BK7hAfz6.js +30 -0
  35. package/dist/NiceGitConflictResolver.doc-CgroGM9_.cjs +6 -0
  36. package/dist/NiceGitDiffViewer.doc-BAwgcY_3.cjs +6 -0
  37. package/dist/NiceGitDiffViewer.doc-BXKJeP-E.js +30 -0
  38. package/dist/NiceGitGraph.doc-B-WtGuzn.cjs +5 -0
  39. package/dist/NiceGitGraph.doc-DxnDPCgC.js +29 -0
  40. package/dist/NiceGitHooks.doc-BrEizvMp.js +29 -0
  41. package/dist/NiceGitHooks.doc-C4EdV5zj.cjs +5 -0
  42. package/dist/NiceMergeRequestBuilder.doc-C5p8mYuh.cjs +6 -0
  43. package/dist/NiceMergeRequestBuilder.doc-Ct9RCmU8.js +30 -0
  44. package/dist/NiceModuleLifecyclePanel-BapdidD6.js +4776 -0
  45. package/dist/NiceModuleLifecyclePanel-Brg1RLwi.cjs +1 -0
  46. package/dist/NiceModuleLifecyclePanel-CsFsm534.cjs +1 -0
  47. package/dist/NiceModuleLifecyclePanel-I_TXRiiY.js +5053 -0
  48. package/dist/NicePinCodeInput-4q8yULuo.js +13359 -0
  49. package/dist/NicePinCodeInput-CrMfdxxc.js +15287 -0
  50. package/dist/NicePinCodeInput-D0aF9MK8.cjs +692 -0
  51. package/dist/NicePinCodeInput-eD2q8nGa.cjs +692 -0
  52. package/dist/NicePinCodeInput.css +1 -0
  53. package/dist/NicePipelineEditor.doc-0eGt8zbX.cjs +5 -0
  54. package/dist/NicePipelineEditor.doc-DTmaOebn.js +29 -0
  55. package/dist/NicePipelineMonitor.doc-67CmsRcf.cjs +5 -0
  56. package/dist/NicePipelineMonitor.doc-mSMdhuG8.js +29 -0
  57. package/dist/NiceSavedQueryPanel-BZNvqSQW.cjs +596 -0
  58. package/dist/NiceSavedQueryPanel-CUAsdOjJ.js +6190 -0
  59. package/dist/NiceSavedQueryPanel-DUw8plYP.js +5666 -0
  60. package/dist/NiceSavedQueryPanel-xpk09zy1.cjs +596 -0
  61. package/dist/NiceSavedQueryPanel.css +1 -0
  62. package/dist/NiceStateDesigner.doc-B36u0hNU.js +29 -0
  63. package/dist/NiceStateDesigner.doc-MPmvNHSx.cjs +5 -0
  64. package/dist/NiceStockChart-CHlOnWzN.cjs +287 -0
  65. package/dist/NiceStockChart-Cpmv9_Cc.js +2341 -0
  66. package/dist/NiceStockChart.css +1 -0
  67. package/dist/NiceTestBuilder.doc-BFInj8GJ.js +30 -0
  68. package/dist/NiceTestBuilder.doc-CB03U_uR.cjs +6 -0
  69. package/dist/NiceToggle-C1UKGXmJ.js +209 -0
  70. package/dist/NiceToggle-CaY1u82g.js +277 -0
  71. package/dist/NiceToggle-DFJFQv_Z.cjs +1 -0
  72. package/dist/NiceToggle-lVi-ETi0.cjs +1 -0
  73. package/dist/NiceWindow-D1awkyFl.js +1636 -0
  74. package/dist/NiceWindow-IdHAcP70.cjs +1 -0
  75. package/dist/NiceWindow-SiCaREbq.js +1408 -0
  76. package/dist/NiceWindow-yARTUJsg.cjs +1 -0
  77. package/dist/charts-Bx_kNBsE.js +4280 -0
  78. package/dist/charts-DECVsCHX.cjs +754 -0
  79. package/dist/charts.cjs +1 -0
  80. package/dist/charts.css +1 -0
  81. package/dist/charts.d.ts +1043 -0
  82. package/dist/charts.mjs +23 -0
  83. package/dist/core-BZBTsGWN.cjs +96 -0
  84. package/dist/core-BpghV7Ls.js +17555 -0
  85. package/dist/core-CfXsl755.js +16305 -0
  86. package/dist/core-DGJSUW64.cjs +96 -0
  87. package/dist/data-branching-De4ExX-S.cjs +1 -0
  88. package/dist/data-branching-DiRfob1f.js +6071 -0
  89. package/dist/data-branching.cjs +1 -0
  90. package/dist/data-branching.d.ts +401 -0
  91. package/dist/data-branching.mjs +9 -0
  92. package/dist/data.cjs +1 -0
  93. package/dist/data.d.ts +2003 -0
  94. package/dist/data.mjs +21 -0
  95. package/dist/devops-BnYinjkT.cjs +17 -0
  96. package/dist/devops-Ckh57eti.js +7198 -0
  97. package/dist/devops.cjs +1 -0
  98. package/dist/devops.d.ts +758 -0
  99. package/dist/devops.mjs +12 -0
  100. package/dist/editors.cjs +1 -0
  101. package/dist/editors.d.ts +2728 -0
  102. package/dist/editors.mjs +66 -0
  103. package/dist/feedback.cjs +1 -0
  104. package/dist/feedback.d.ts +339 -0
  105. package/dist/feedback.mjs +16 -0
  106. package/dist/index-C853adw1.cjs +6199 -0
  107. package/dist/index-CBIZ6mTQ.cjs +5734 -0
  108. package/dist/index-CIl98Vbm.js +72951 -0
  109. package/dist/index-CNwVELPJ.js +62857 -0
  110. package/dist/index-CUx_-gKK.cjs +1 -0
  111. package/dist/index-x8mRM4Jc.js +17 -0
  112. package/dist/index.cjs +1 -7866
  113. package/dist/index.css +1 -0
  114. package/dist/index.d.ts +4888 -180
  115. package/dist/index.mjs +1021 -105889
  116. package/dist/lazy.cjs +1 -0
  117. package/dist/lazy.d.ts +1880 -0
  118. package/dist/lazy.mjs +98 -0
  119. package/dist/navigation.cjs +1 -0
  120. package/dist/navigation.d.ts +1862 -0
  121. package/dist/navigation.mjs +576 -0
  122. package/dist/no-code-BCuadkm4.cjs +332 -0
  123. package/dist/no-code-TL7PyulA.js +7005 -0
  124. package/dist/no-code.cjs +1 -0
  125. package/dist/no-code.d.ts +870 -0
  126. package/dist/no-code.mjs +13 -0
  127. package/dist/overlays.cjs +1 -0
  128. package/dist/overlays.d.ts +706 -0
  129. package/dist/overlays.mjs +482 -0
  130. package/package.json +51 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),k=require("./core-DGJSUW64.cjs"),i=require("react"),M={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},U=({variant:s="info",title:t,children:c,closable:r,onClose:n,icon:a,size:l="md",className:u,style:d,displayStyle:p})=>{const m=k.useComponentDisplayClass("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${m} ${u||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:a||M[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:c})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:"✕"})]})},Y=({open:s,onClose:t,title:c,size:r="md",children:n,footer:a,closeOnOverlay:l=!0,closeOnEscape:u=!0,fullscreenable:d,zIndex:p,className:m,style:N,displayStyle:x})=>{const{t:_}=k.useNiceTranslation(),v=i.useRef(null),[h,o]=i.useState(!1),w=k.useComponentDisplayStyle("modal",x),j=k.useComponentDisplayClass("modal",x);return k.useFocusTrap(v,s),i.useEffect(()=>{if(!s||!u)return;const f=y=>{y.key==="Escape"&&t()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[s,u,t]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),s?e.jsx("div",{className:"nice-modal-overlay",style:p?{zIndex:p}:void 0,onClick:l?t:void 0,children:e.jsxs("div",{ref:v,className:`nice-modal nice-modal--${h?"full":r} nice-modal--ds-${j} ${m||""}`,style:{...w,...N},role:"dialog","aria-modal":"true","aria-label":c,onClick:f=>f.stopPropagation(),children:[c&&e.jsxs("div",{className:"nice-modal__header",children:[e.jsx("h2",{className:"nice-modal__title",children:c}),e.jsxs("div",{className:"nice-modal__header-actions",children:[d&&e.jsx("button",{type:"button",className:"nice-modal__fullscreen",onClick:()=>o(f=>!f),"aria-label":h?"Exit fullscreen":"Fullscreen",children:h?"⇲":"⇱"}),e.jsx("button",{type:"button",className:"nice-modal__close",onClick:t,"aria-label":_("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]})]}),e.jsx("div",{className:"nice-modal__body",children:n}),a&&e.jsx("div",{className:"nice-modal__footer",children:a})]})}):null},W=({open:s,onClose:t,title:c,position:r="right",size:n="md",children:a,footer:l,transitionDuration:u,className:d,style:p,displayStyle:m})=>{const N=k.useComponentDisplayStyle("modal",m),x=k.useComponentDisplayClass("modal",m),{t:_}=k.useNiceTranslation(),v=i.useRef(null);return k.useFocusTrap(v,s),i.useEffect(()=>{if(!s)return;const h=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",h),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",h),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onClick:t}),e.jsxs("div",{ref:v,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${d||""}`,style:{...N,...p,...u!=null?{transitionDuration:`${u}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":c,children:[c&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:c}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":_("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]}),e.jsx("div",{className:"nice-drawer__body",children:a}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},G=({toasts:s,onDismiss:t,position:c="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${c}`,children:s.map(r=>e.jsx(J,{toast:r,onDismiss:t},r.id))}),J=({toast:s,onDismiss:t})=>{const[c,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(c){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[c,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${c?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:M[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),children:"✕"})]})};let K=0;function Q(){const[s,t]=i.useState([]),c=i.useCallback((n,a,l)=>{const u=`toast-${++K}`;return t(d=>[...d,{id:u,variant:n,message:a,title:l?.title,duration:l?.duration}]),u},[]),r=i.useCallback(n=>{t(a=>a.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,a)=>c("info",n,a),success:(n,a)=>c("success",n,a),warning:(n,a)=>c("warning",n,a),error:(n,a)=>c("error",n,a)}}const X={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},Z=({visible:s,message:t,header:c,icon:r,variant:n="warning",acceptLabel:a,rejectLabel:l,onAccept:u,onReject:d,closeOnOverlay:p=!1,closeOnEscape:m=!0,size:N="md",className:x,style:_})=>{const{t:v}=k.useNiceTranslation();if(i.useEffect(()=>{if(!s||!m)return;const j=f=>{f.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,m,d]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),!s)return null;const h=r??X[n],o=a??v("confirm.accept","Yes"),w=l??v("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:p?d:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${n} nice-confirm--${N} ${x||""}`,style:_,role:"alertdialog","aria-modal":"true","aria-label":c,"aria-describedby":"nice-confirm-message",onClick:j=>j.stopPropagation(),children:[c&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:c})}),e.jsxs("div",{className:"nice-confirm__body",children:[h&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${n}`,children:h}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:t})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:d,children:w}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${n==="error"?"error":"primary"} nice-btn--md`,onClick:u,autoFocus:!0,children:o})]})]})})},ee=({error:s,onRetry:t,retryLabel:c="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:a="error",icon:l,size:u="md",className:d,style:p,"data-testid":m})=>{const[N,x]=i.useState(n??0),_=i.useRef(),v=typeof s=="string"?s:s.message,h=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),_.current=setInterval(()=>{x(o=>o<=1?(clearInterval(_.current),t(),0):o-1)},1e3),()=>clearInterval(_.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${a} nice-retry-panel--${u} ${d||""}`,style:p,role:"alert","data-testid":m,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??"⚠️"}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:v})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:h,children:c}),n&&N>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",N,"s"]})]})]})};function se(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function ne(){return navigator.onLine}function te(){return!0}const ie=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:c,size:r="md",className:n,style:a,"data-testid":l})=>i.useSyncExternalStore(se,ne,te)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:a,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:c??"📡"}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function q({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,autoRetry:r=!1,autoRetryCount:n=3}={}){const[a,l]=i.useState(!1),[u,d]=i.useState(!1),[p,m]=i.useState(!1),[N,x]=i.useState(0),[_,v]=i.useState(0),h=i.useRef(null),o=i.useRef(null),w=i.useRef(null),j=i.useRef(0),f=i.useCallback(()=>{h.current&&clearTimeout(h.current),o.current&&clearTimeout(o.current),w.current&&clearInterval(w.current)},[]),y=i.useCallback(()=>{f(),l(!0),d(!1),m(!1),x(0),j.current=Date.now(),w.current=setInterval(()=>{x(Date.now()-j.current)},200),h.current=setTimeout(()=>{d(!0)},t),o.current=setTimeout(()=>{m(!0),l(!1),d(!1),f(),c?.()},s)},[f,t,s,c]),$=i.useCallback(()=>{f(),l(!1),d(!1)},[f]),b=i.useCallback(()=>{v(C=>C+1),m(!1),y()},[y]);return i.useEffect(()=>()=>f(),[f]),i.useEffect(()=>{if(r&&p&&_<n){const C=Math.pow(2,_)*1e3,E=setTimeout(()=>b(),C);return()=>clearTimeout(E)}},[r,n,p,_,b]),{isLoading:a,isSlow:u,isTimedOut:p,elapsed:N,retryCount:_,start:y,stop:$,retry:b}}const re=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,onRetry:r,autoRetry:n=!1,autoRetryCount:a=3,showProgress:l=!0,slowMessage:u="Operacja trwa dłużej niż zwykle…",timeoutMessage:d="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:m,size:N="md",className:x,style:_,"data-testid":v})=>{const{isSlow:h,isTimedOut:o,elapsed:w,retry:j}=q({timeoutMs:s,slowThresholdMs:t,onTimeout:c,autoRetry:n,autoRetryCount:a}),f=()=>{j(),r?.()};if(!p)return e.jsx(e.Fragment,{children:m});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${N} ${x??""}`,style:_,role:"alert","data-testid":v,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:f,type:"button",children:"Spróbuj ponownie"})]});const y=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${N} ${h?"nice-timeout-feedback--slow":""} ${x??""}`,style:_,"data-testid":v,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),h&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:u}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":y,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${y}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:c,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:a,position:l="bottom",size:u="md",policyUrl:d,showDetails:p=!1,className:m,style:N,id:x,..._},v)=>{const h=k.useControlId(x),{t:o}=k.useNiceTranslation(),[w,j]=i.useState(!0),f=s??w,[y,$]=i.useState(p),[b,C]=i.useState(()=>{const g={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return a&&Object.assign(g,a),g.necessary=!0,g}),E={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},L={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},D=i.useCallback(()=>{const g={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(g),j(!1)},[t,r]),S=i.useCallback(()=>{const g={necessary:!0,analytics:!1,marketing:!1,preferences:!1};c?.(),r?.(g),j(!1)},[c,r]),I=i.useCallback(()=>{r?.({...b,necessary:!0}),j(!1)},[b,r]);return f?e.jsx("div",{ref:v,id:h,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${u} ${m??""}`,style:N,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",..._,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),d&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:d,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),y&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(g=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:b[g],disabled:g==="necessary",onChange:R=>C(z=>({...z,[g]:R.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:E[g]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:L[g]})]})]},g))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!y&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),y&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:I,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:S,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:D,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:c,loading:r=!1,error:n,variant:a="primary",size:l="md",showRememberMe:u=!0,showForgotPassword:d=!0,showRegister:p=!1,title:m,logo:N,usernameLabel:x,passwordLabel:_,usernamePlaceholder:v,passwordPlaceholder:h,className:o,style:w,id:j,...f},y)=>{const $=k.useControlId(j),{t:b}=k.useNiceTranslation(),[C,E]=i.useState(""),[L,D]=i.useState(""),[S,I]=i.useState(!1),[g,R]=i.useState(!1),z=`${$}-user`,A=`${$}-pass`,B=`${$}-remember`,V=i.useCallback(T=>{T.preventDefault(),!r&&s?.({username:C,password:L,rememberMe:S})},[r,C,L,S,s]);return e.jsxs("form",{ref:y,id:$,className:`nice-login nice-login--${a} nice-login--${l} ${o??""}`,style:w,onSubmit:V,noValidate:!0,...f,children:[N&&e.jsx("div",{className:"nice-login__logo",children:N}),m&&e.jsx("h2",{className:"nice-login__title",children:m??b("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:z,className:"nice-login__label",children:x??b("login.username","Username")}),e.jsx("input",{id:z,className:"nice-login__input",type:"text",value:C,onChange:T=>E(T.target.value),placeholder:v??b("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:r,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:A,className:"nice-login__label",children:_??b("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:A,className:"nice-login__input",type:g?"text":"password",value:L,onChange:T=>D(T.target.value),placeholder:h??b("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:r,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>R(!g),"aria-label":g?b("login.hidePassword","Hide password"):b("login.showPassword","Show password"),tabIndex:-1,children:g?"🙈":"👁"})]})]}),e.jsxs("div",{className:"nice-login__options",children:[u&&e.jsxs("label",{className:"nice-login__remember",htmlFor:B,children:[e.jsx("input",{id:B,type:"checkbox",checked:S,onChange:T=>I(T.target.checked),disabled:r}),e.jsx("span",{children:b("login.rememberMe","Remember me")})]}),d&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:b("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${a}`,disabled:r||!C||!L,children:r?b("login.loading","Signing in..."):b("login.submit","Sign In")}),p&&c&&e.jsxs("p",{className:"nice-login__register",children:[b("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:c,disabled:r,children:b("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const P=class P extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,c){this.props.onError?.(t,c)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:c=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:"⚠️"}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),c&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};P.displayName="NiceErrorBoundary";let F=P;exports.NiceAlert=U;exports.NiceConfirmDialog=Z;exports.NiceCookieConsent=O;exports.NiceDrawer=W;exports.NiceErrorBoundary=F;exports.NiceLoginForm=H;exports.NiceModal=Y;exports.NiceOfflineBanner=ie;exports.NiceRetryPanel=ee;exports.NiceTimeoutFeedback=re;exports.NiceToastContainer=G;exports.alertIcons=M;exports.useNiceTimeout=q;exports.useNiceToast=Q;