@nice2dev/ui 1.1.5 → 1.1.7

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 (164) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +50 -29
  3. package/css/legacy-bg-text-aliases.css +65 -61
  4. package/dist/NiceCodeEditor-Bc81wiaN.js +1134 -0
  5. package/dist/NiceCodeEditor-D6f8KdHN.js +1134 -0
  6. package/dist/NiceCodeEditor-DE3saxyt.cjs +260 -0
  7. package/dist/NiceCodeEditor-DZM16My5.cjs +260 -0
  8. package/dist/NiceCodeEditor-HqmcJjmZ.js +1179 -0
  9. package/dist/NiceColorPicker-6EqXaDj0.cjs +1 -0
  10. package/dist/NiceColorPicker-BiEWqWnd.js +596 -0
  11. package/dist/NiceColorPicker-Cuc6YXqz.cjs +1 -0
  12. package/dist/NiceColorPicker-DMATcNWG.js +596 -0
  13. package/dist/NiceColorPicker-R3O1nemp.js +596 -0
  14. package/dist/NiceConfirmDialog-B0e10fRL.cjs +1 -0
  15. package/dist/NiceConfirmDialog-BBDgEMHv.js +81 -0
  16. package/dist/NiceConfirmDialog-C7kdr8jJ.js +81 -0
  17. package/dist/NiceConfirmDialog-DMHqPfFM.js +81 -0
  18. package/dist/NiceConfirmDialog-ZJpQLQQS.cjs +1 -0
  19. package/dist/NiceDataGrid-BzUw4dSu.cjs +10 -0
  20. package/dist/NiceDataGrid-CPKcVOVz.js +1743 -0
  21. package/dist/NiceDataGrid-DJr33WMy.cjs +10 -0
  22. package/dist/NiceDataGrid-D_4gZ1Hu.js +1736 -0
  23. package/dist/NiceDataGrid-DlUAaXhD.js +1736 -0
  24. package/dist/NiceDocumentViewer-8ghRVtfO.js +672 -0
  25. package/dist/NiceDocumentViewer-ChWtA_Ry.cjs +180 -0
  26. package/dist/NiceDocumentViewer-DwLUV7Tc.js +672 -0
  27. package/dist/NiceDocumentViewer-goMzF1w3.cjs +180 -0
  28. package/dist/NiceDocumentViewer-gt1mxzP8.js +672 -0
  29. package/dist/NiceForm-CHEAHxDw.js +4805 -0
  30. package/dist/NiceForm-CJUp1CL0.cjs +1 -0
  31. package/dist/NiceForm-Cp_RH3Yj.js +4805 -0
  32. package/dist/NiceForm-a6tGr6ss.js +4819 -0
  33. package/dist/NiceForm-jU89oe2S.cjs +1 -0
  34. package/dist/NiceGantt-BnQwyTfG.cjs +1 -0
  35. package/dist/NiceGantt-D8coFAvK.js +328 -0
  36. package/dist/NiceGantt-DOZfT6r5.js +328 -0
  37. package/dist/NiceGantt-DQzH1V-R.js +328 -0
  38. package/dist/NiceGantt-jQ8ZpXko.cjs +1 -0
  39. package/dist/NiceHtmlEditor-B1nlXJNW.cjs +10 -0
  40. package/dist/NiceHtmlEditor-Bv3VqJPG.js +862 -0
  41. package/dist/NiceHtmlEditor-CKsGj-Ei.cjs +10 -0
  42. package/dist/NiceHtmlEditor-CloMgyzg.js +841 -0
  43. package/dist/NiceHtmlEditor-DUAHmkWI.js +841 -0
  44. package/dist/NiceLoginForm-Ce_QLnLf.js +736 -0
  45. package/dist/NiceLoginForm-DLpNTQlR.cjs +1 -0
  46. package/dist/NiceLoginForm-Dg0286Cc.js +736 -0
  47. package/dist/NiceLoginForm-X05Vadeg.js +708 -0
  48. package/dist/NiceLoginForm-f_dBCnUi.cjs +1 -0
  49. package/dist/NiceMention-BByI4nFG.js +11120 -0
  50. package/dist/NiceMention-BjeLN4Jx.cjs +430 -0
  51. package/dist/NiceMention-C2TPiMph.cjs +430 -0
  52. package/dist/NiceMention-C67vT6m0.js +11145 -0
  53. package/dist/NiceMention-D1cdy63w.cjs +430 -0
  54. package/dist/NiceMention-OaCi-GNO.js +11094 -0
  55. package/dist/NiceMention-QIuggb9Y.js +11122 -0
  56. package/dist/NiceMention.css +1 -1
  57. package/dist/NiceModal-CHaan9al.js +95 -0
  58. package/dist/NiceModal-Czq6OEAT.js +95 -0
  59. package/dist/NiceModal-D-HFwawr.js +95 -0
  60. package/dist/NiceModal-DOy2XTzc.cjs +1 -0
  61. package/dist/NiceModal-DkawKzEE.cjs +1 -0
  62. package/dist/NiceModuleLifecyclePanel-1CsP8Zst.js +6997 -0
  63. package/dist/NiceModuleLifecyclePanel-Bkx4Yg-3.cjs +1 -0
  64. package/dist/NiceModuleLifecyclePanel-C5oYtczk.js +6999 -0
  65. package/dist/NiceModuleLifecyclePanel-DCcy2yYi.cjs +1 -0
  66. package/dist/NiceModuleLifecyclePanel-DqdgW-0s.js +7004 -0
  67. package/dist/NiceModuleLifecyclePanel.css +1 -1
  68. package/dist/NicePagination-7od5KUa3.cjs +1 -0
  69. package/dist/NicePagination-DMrkR8hH.cjs +1 -0
  70. package/dist/NicePagination-DQmZpsSQ.js +179 -0
  71. package/dist/NicePagination-DipQRjPq.js +172 -0
  72. package/dist/NicePagination-KhlVXYaT.js +172 -0
  73. package/dist/NicePivotGrid-B-KthuqL.cjs +152 -0
  74. package/dist/NicePivotGrid-CLCTHkKO.cjs +152 -0
  75. package/dist/NicePivotGrid-DV54FCsH.js +1174 -0
  76. package/dist/NicePivotGrid-DoWLUPUs.js +1167 -0
  77. package/dist/NicePivotGrid-etwpfccz.js +1167 -0
  78. package/dist/NiceSavedQueryPanel-BABkTNc5.js +5129 -0
  79. package/dist/NiceSavedQueryPanel-Cfeig83P.cjs +586 -0
  80. package/dist/NiceSavedQueryPanel-DTWRLseb.cjs +586 -0
  81. package/dist/NiceSavedQueryPanel-Dy154sxE.js +5129 -0
  82. package/dist/NiceSavedQueryPanel-v7AffOOe.js +5129 -0
  83. package/dist/NiceSavedQueryPanel.css +1 -1
  84. package/dist/NiceScheduler-BEgB7ZgF.cjs +5 -0
  85. package/dist/NiceScheduler-C9JprsEI.cjs +5 -0
  86. package/dist/NiceScheduler-DSP-PPh0.js +1645 -0
  87. package/dist/NiceScheduler-DuPnaA3t.js +1652 -0
  88. package/dist/NiceScheduler-Oa89YZx9.js +1645 -0
  89. package/dist/NiceSelect-A336yeLZ.js +433 -0
  90. package/dist/NiceSelect-B5hTbqi2.js +433 -0
  91. package/dist/NiceSelect-BYSgDYzq.cjs +1 -0
  92. package/dist/NiceSelect-Dudf2T5T.js +433 -0
  93. package/dist/NiceSelect-DwBAIrX7.cjs +1 -0
  94. package/dist/NiceWindow-B6zjBTl9.cjs +1 -0
  95. package/dist/NiceWindow-BKQEx7Vf.js +1623 -0
  96. package/dist/NiceWindow-BnTH7Gy0.js +1623 -0
  97. package/dist/NiceWindow-CZN9NVZw.cjs +1 -0
  98. package/dist/NiceWindow-lxtPR7yZ.js +1623 -0
  99. package/dist/NiceWindow.css +1 -1
  100. package/dist/charts-B8_V3_nq.cjs +882 -0
  101. package/dist/charts-BZgyyybE.js +31933 -0
  102. package/dist/charts-FuDk5-r6.js +31958 -0
  103. package/dist/charts-INj3yFo5.js +31946 -0
  104. package/dist/charts-NolNXKUL.cjs +882 -0
  105. package/dist/charts.cjs +1 -1
  106. package/dist/charts.css +1 -1
  107. package/dist/charts.mjs +1 -1
  108. package/dist/core-A_A6c7an.js +795 -0
  109. package/dist/core-B2iH2J_X.js +795 -0
  110. package/dist/core-BmspZEfD.js +795 -0
  111. package/dist/core-DAfLOet6.cjs +1 -0
  112. package/dist/core-ZG3bgnBR.cjs +1 -0
  113. package/dist/data-branching-B3TOqXAO.cjs +1 -0
  114. package/dist/data-branching-BUGiICDZ.js +6275 -0
  115. package/dist/data-branching-DMXmcocj.js +6275 -0
  116. package/dist/data-branching-YE8P9M5P.js +6275 -0
  117. package/dist/data-branching-t6uhAwIm.cjs +1 -0
  118. package/dist/data-branching.cjs +1 -1
  119. package/dist/data-branching.mjs +1 -1
  120. package/dist/data.cjs +1 -1
  121. package/dist/data.d.ts +7 -2
  122. package/dist/data.mjs +3 -3
  123. package/dist/devops-BhV3OmF7.js +8285 -0
  124. package/dist/devops-BqUxnbRi.cjs +17 -0
  125. package/dist/devops-Bx-Qwj9w.cjs +17 -0
  126. package/dist/devops-DYZatW45.js +8251 -0
  127. package/dist/devops-R98k2zpd.js +8251 -0
  128. package/dist/devops.cjs +1 -1
  129. package/dist/devops.d.ts +29 -16
  130. package/dist/devops.mjs +1 -1
  131. package/dist/editors.cjs +1 -1
  132. package/dist/editors.d.ts +59 -28
  133. package/dist/editors.mjs +7 -7
  134. package/dist/feedback.cjs +1 -1
  135. package/dist/feedback.mjs +3 -3
  136. package/dist/index.cjs +445 -445
  137. package/dist/index.css +1 -1
  138. package/dist/index.d.ts +214 -119
  139. package/dist/index.mjs +16635 -16351
  140. package/dist/lazy.cjs +1 -1
  141. package/dist/lazy.d.ts +31 -18
  142. package/dist/lazy.mjs +24 -24
  143. package/dist/navigation.cjs +1 -1
  144. package/dist/navigation.d.ts +17 -14
  145. package/dist/navigation.mjs +130 -130
  146. package/dist/no-code-BPaAS4wW.cjs +332 -0
  147. package/dist/no-code-CBwUVL1i.js +7447 -0
  148. package/dist/no-code-CjktkQ50.js +7447 -0
  149. package/dist/no-code-DW2NrRba.js +7447 -0
  150. package/dist/no-code-DmFxrZ5T.cjs +332 -0
  151. package/dist/no-code.cjs +1 -1
  152. package/dist/no-code.d.ts +2 -2
  153. package/dist/no-code.mjs +1 -1
  154. package/dist/overlays.cjs +1 -1
  155. package/dist/overlays.d.ts +4 -4
  156. package/dist/overlays.mjs +2 -2
  157. package/dist/pickerCommons-C4XWRUvH.cjs +1 -0
  158. package/dist/pickerCommons-C_BpYs_m.cjs +1 -0
  159. package/dist/pickerCommons-DAOXH_u5.js +1122 -0
  160. package/dist/pickerCommons-Dn4wnDco.js +1122 -0
  161. package/dist/pickerCommons-DskswPS5.js +1122 -0
  162. package/dist/pickerCommons.css +1 -1
  163. package/dist/style.css +7 -7
  164. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),g=require("./charts-NolNXKUL.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"})})},V=({variant:s="info",title:t,children:a,closable:r,onClose:n,icon:c,size:l="md",className:h,style:u,displayStyle:p})=>{const b=g.ac("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${b} ${h||""}`,style:u,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:c||M[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:a})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:e.jsx(g.oa,{name:"close",size:16})})]})},U=({open:s,onClose:t,title:a,position:r="right",size:n="md",children:c,footer:l,transitionDuration:h,className:u,style:p,displayStyle:b})=>{const j=g.rc("modal",b),x=g.ac("modal",b),{t:_}=g.Gt(),k=i.useRef(null);return g.xc(k,s),i.useEffect(()=>{if(!s)return;const f=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",f),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:f=>{f.target===f.currentTarget&&t()}}),e.jsxs("div",{ref:k,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${u||""}`,style:{...j,...p,...h!=null?{transitionDuration:`${h}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":a,children:[a&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:a}),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:c}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},W=({toasts:s,onDismiss:t,position:a="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${a}`,children:s.map(r=>e.jsx(Y,{toast:r,onDismiss:t},r.id))}),Y=({toast:s,onDismiss:t})=>{const[a,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(a){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[a,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${a?"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),"aria-label":"Close",children:e.jsx(g.oa,{name:"close",size:16})})]})};let J=0;function K(){const[s,t]=i.useState([]),a=i.useCallback((n,c,l)=>{const h=`toast-${++J}`;return t(u=>[...u,{id:h,variant:n,message:c,title:l?.title,duration:l?.duration}]),h},[]),r=i.useCallback(n=>{t(c=>c.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,c)=>a("info",n,c),success:(n,c)=>a("success",n,c),warning:(n,c)=>a("warning",n,c),error:(n,c)=>a("error",n,c)}}const A=class A 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,a){this.props.onError?.(t,a)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:a=!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(g.oa,{name:"warning",size:32})}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),a&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};A.displayName="NiceErrorBoundary";let P=A;function Q(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function X(){return navigator.onLine}function Z(){return!0}const ee=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:a,size:r="md",className:n,style:c,"data-testid":l})=>i.useSyncExternalStore(Q,X,Z)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:c,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:a??e.jsx(g.oa,{name:"wifi",size:18})}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]}),se=({error:s,onRetry:t,retryLabel:a="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:c="error",icon:l,size:h="md",className:u,style:p,"data-testid":b})=>{const[j,x]=i.useState(n??0),_=i.useRef(void 0),k=typeof s=="string"?s:s.message,f=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--${c} nice-retry-panel--${h} ${u||""}`,style:p,role:"alert","data-testid":b,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??e.jsx(g.oa,{name:"warning",size:24})}),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:k})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:f,children:a}),n&&j>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",j,"s"]})]})]})};function B({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,autoRetry:r=!1,autoRetryCount:n=3}={}){const[c,l]=i.useState(!1),[h,u]=i.useState(!1),[p,b]=i.useState(!1),[j,x]=i.useState(0),[_,k]=i.useState(0),f=i.useRef(null),o=i.useRef(null),C=i.useRef(null),w=i.useRef(0),N=i.useCallback(()=>{f.current&&clearTimeout(f.current),o.current&&clearTimeout(o.current),C.current&&clearInterval(C.current)},[]),v=i.useCallback(()=>{N(),l(!0),u(!1),b(!1),x(0),w.current=Date.now(),C.current=setInterval(()=>{x(Date.now()-w.current)},200),f.current=setTimeout(()=>{u(!0)},t),o.current=setTimeout(()=>{b(!0),l(!1),u(!1),N(),a?.()},s)},[N,t,s,a]),$=i.useCallback(()=>{N(),l(!1),u(!1)},[N]),d=i.useCallback(()=>{k(y=>y+1),b(!1),v()},[v]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&_<n){const y=Math.pow(2,_)*1e3,E=setTimeout(()=>d(),y);return()=>clearTimeout(E)}},[r,n,p,_,d]),{isLoading:c,isSlow:h,isTimedOut:p,elapsed:j,retryCount:_,start:v,stop:$,retry:d}}const ne=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,onRetry:r,autoRetry:n=!1,autoRetryCount:c=3,showProgress:l=!0,slowMessage:h="Operacja trwa dłużej niż zwykle…",timeoutMessage:u="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:b,size:j="md",className:x,style:_,"data-testid":k})=>{const{isSlow:f,isTimedOut:o,elapsed:C,retry:w}=B({timeoutMs:s,slowThresholdMs:t,onTimeout:a,autoRetry:n,autoRetryCount:c}),N=()=>{w(),r?.()};if(!p)return e.jsx(e.Fragment,{children:b});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${j} ${x??""}`,style:_,role:"alert","data-testid":k,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:u}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const v=Math.min(100,C/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${j} ${f?"nice-timeout-feedback--slow":""} ${x??""}`,style:_,"data-testid":k,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),f&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":v,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${v}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:a,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:c,position:l="bottom",size:h="md",policyUrl:u,showDetails:p=!1,className:b,style:j,id:x,..._},k)=>{const f=g.bc(x),{t:o}=g.Gt(),[C,w]=i.useState(!0),N=s??C,[v,$]=i.useState(p),[d,y]=i.useState(()=>{const m={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return c&&Object.assign(m,c),m.necessary=!0,m}),E={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},S={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.")},z=i.useCallback(()=>{const m={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(m),w(!1)},[t,r]),L=i.useCallback(()=>{const m={necessary:!0,analytics:!1,marketing:!1,preferences:!1};a?.(),r?.(m),w(!1)},[a,r]),I=i.useCallback(()=>{r?.({...d,necessary:!0}),w(!1)},[d,r]);return N?e.jsx("div",{ref:k,id:f,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${h} ${b??""}`,style:j,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."),u&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:u,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),v&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(m=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:d[m],disabled:m==="necessary",onChange:D=>y(R=>({...R,[m]:D.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:E[m]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:S[m]})]})]},m))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!v&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),v&&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:L,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:z,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:a,loading:r=!1,error:n,variant:c="primary",size:l="md",showRememberMe:h=!0,showForgotPassword:u=!0,showRegister:p=!1,title:b,logo:j,usernameLabel:x,passwordLabel:_,usernamePlaceholder:k,passwordPlaceholder:f,className:o,style:C,id:w,...N},v)=>{const $=g.bc(w),{t:d}=g.Gt(),[y,E]=i.useState(""),[S,z]=i.useState(""),[L,I]=i.useState(!1),[m,D]=i.useState(!1),R=`${$}-user`,F=`${$}-pass`,q=`${$}-remember`,G=i.useCallback(T=>{T.preventDefault(),!r&&s?.({username:y,password:S,rememberMe:L})},[r,y,S,L,s]);return e.jsxs("form",{ref:v,id:$,className:`nice-login nice-login--${c} nice-login--${l} ${o??""}`,style:C,onSubmit:G,noValidate:!0,...N,children:[j&&e.jsx("div",{className:"nice-login__logo",children:j}),b&&e.jsx("h2",{className:"nice-login__title",children:b??d("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:R,className:"nice-login__label",children:x??d("login.username","Username")}),e.jsx("input",{id:R,className:"nice-login__input",type:"text",value:y,onChange:T=>E(T.target.value),placeholder:k??d("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:F,className:"nice-login__label",children:_??d("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:m?"text":"password",value:S,onChange:T=>z(T.target.value),placeholder:f??d("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:()=>D(!m),"aria-label":m?d("login.hidePassword","Hide password"):d("login.showPassword","Show password"),tabIndex:-1,children:e.jsx(g.oa,{name:m?"eye-off":"eye",size:16})})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:q,children:[e.jsx("input",{id:q,type:"checkbox",checked:L,onChange:T=>I(T.target.checked),disabled:r}),e.jsx("span",{children:d("login.rememberMe","Remember me")})]}),u&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:d("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${c}`,disabled:r||!y||!S,children:r?d("login.loading","Signing in..."):d("login.submit","Sign In")}),p&&a&&e.jsxs("p",{className:"nice-login__register",children:[d("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:a,disabled:r,children:d("login.register","Register")})]})]})});H.displayName="NiceLoginForm";exports.NiceAlert=V;exports.NiceCookieConsent=O;exports.NiceDrawer=U;exports.NiceErrorBoundary=P;exports.NiceLoginForm=H;exports.NiceOfflineBanner=ee;exports.NiceRetryPanel=se;exports.NiceTimeoutFeedback=ne;exports.NiceToastContainer=W;exports.alertIcons=M;exports.useNiceTimeout=B;exports.useNiceToast=K;