@nice2dev/ui 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +476 -0
  2. package/dist/NiceButton-CnAIqCbd.js +101 -0
  3. package/dist/NiceButton-DzCqkG5a.cjs +1 -0
  4. package/dist/NiceCodeEditor-C43xFG8v.cjs +260 -0
  5. package/dist/NiceCodeEditor-CK6B54mu.js +1215 -0
  6. package/dist/NiceCodeEditor-CspuYLh6.js +1174 -0
  7. package/dist/NiceCodeEditor-bJReZPDO.cjs +268 -0
  8. package/dist/NiceColorPicker-BV3olE3M.cjs +1 -0
  9. package/dist/NiceColorPicker-CyY-4q89.js +552 -0
  10. package/dist/NiceDataGrid-BQIqitMM.cjs +10 -0
  11. package/dist/NiceDataGrid-C1eI6Pso.js +2267 -0
  12. package/dist/NiceDataGrid-CrD4HPlO.cjs +10 -0
  13. package/dist/NiceDataGrid-Dfg1DVbU.js +2224 -0
  14. package/dist/NiceForm-CISJyzoW.cjs +1 -0
  15. package/dist/NiceForm-CfAPcXdX.cjs +1 -0
  16. package/dist/NiceForm-DfKYNQti.js +5017 -0
  17. package/dist/NiceForm-DmH6k1b_.js +4775 -0
  18. package/dist/NiceGantt-CHnq-n8f.cjs +1 -0
  19. package/dist/NiceGantt-CX3jVNaF.js +330 -0
  20. package/dist/NiceGantt-TEXbAELi.js +333 -0
  21. package/dist/NiceGantt-s2cgt5zD.cjs +1 -0
  22. package/dist/NiceHtmlEditor-CDZeF_zG.cjs +10 -0
  23. package/dist/NiceHtmlEditor-CdWgddg3.js +901 -0
  24. package/dist/NiceHtmlEditor-DeK0Of98.js +883 -0
  25. package/dist/NiceHtmlEditor-DvVxl4Fu.cjs +10 -0
  26. package/dist/NiceLoginForm-CHXbz0eu.js +747 -0
  27. package/dist/NiceLoginForm-DRPldHXa.js +808 -0
  28. package/dist/NiceLoginForm-IGLUCQUE.cjs +1 -0
  29. package/dist/NiceLoginForm-ix6J1adA.cjs +1 -0
  30. package/dist/NiceMention-CgDp0sl9.cjs +430 -0
  31. package/dist/NiceMention-DBvFvx71.js +11653 -0
  32. package/dist/NiceMention-DKhk3xdM.js +11321 -0
  33. package/dist/NiceMention-wp1AJ5oh.cjs +430 -0
  34. package/dist/NiceMention.css +1 -1
  35. package/dist/NiceModal-BbQwiEOp.cjs +1 -0
  36. package/dist/NiceModal-BlYhFDhP.js +80 -0
  37. package/dist/NiceModal-DQEfTcnZ.js +85 -0
  38. package/dist/NiceModal-DmWz2PDM.cjs +1 -0
  39. package/dist/NiceModuleLifecyclePanel-22CEEVbA.cjs +1 -0
  40. package/dist/NiceModuleLifecyclePanel-BCd9Wv5Y.js +6825 -0
  41. package/dist/NiceModuleLifecyclePanel-D8EoXqBy.cjs +1 -0
  42. package/dist/NiceModuleLifecyclePanel-SN6G7t64.js +7189 -0
  43. package/dist/NiceModuleLifecyclePanel.css +1 -1
  44. package/dist/NicePagination-BFGt1v0a.js +165 -0
  45. package/dist/NicePagination-BJS65foT.js +200 -0
  46. package/dist/NicePagination-D_3GfWp5.cjs +1 -0
  47. package/dist/NicePagination-DltL3-Sz.cjs +1 -0
  48. package/dist/NicePivotGrid-BD87Na7P.js +1163 -0
  49. package/dist/NicePivotGrid-BPmnvbPQ.cjs +152 -0
  50. package/dist/NicePivotGrid-D_kRF1Dt.js +1180 -0
  51. package/dist/NicePivotGrid-DqluEkCI.cjs +152 -0
  52. package/dist/NiceSavedQueryPanel-BSTiZvFg.js +5130 -0
  53. package/dist/NiceSavedQueryPanel-C2Tn1cMW.js +5311 -0
  54. package/dist/NiceSavedQueryPanel-DDKtL1AA.cjs +586 -0
  55. package/dist/NiceSavedQueryPanel-DrR3sw4T.cjs +586 -0
  56. package/dist/NiceScheduler-DvxJ8N0I.js +1698 -0
  57. package/dist/NiceScheduler-GJLvkXJ3.cjs +5 -0
  58. package/dist/NiceScheduler-TIksdF0k.cjs +5 -0
  59. package/dist/NiceScheduler-UT49u2Vq.js +1710 -0
  60. package/dist/NiceSelect-CdUHd8rj.cjs +1 -0
  61. package/dist/NiceSelect-fOelG_QB.js +495 -0
  62. package/dist/NiceWindow-CqSsTjrS.cjs +1 -0
  63. package/dist/NiceWindow-DZLPhXbR.js +2223 -0
  64. package/dist/charts-BYQwl_GS.js +4789 -0
  65. package/dist/charts-BpELGDXh.cjs +768 -0
  66. package/dist/charts-C6iOu0H6.cjs +768 -0
  67. package/dist/charts-M6LuVI7F.js +4776 -0
  68. package/dist/charts.cjs +1 -1
  69. package/dist/charts.d.ts +1 -29
  70. package/dist/charts.mjs +1 -1
  71. package/dist/core-lazy-B_laOXNf.cjs +1 -0
  72. package/dist/core-lazy-Ctin_LwS.cjs +1 -0
  73. package/dist/core-lazy-VQEjdz0L.js +351 -0
  74. package/dist/core-lazy-iDiropM6.js +351 -0
  75. package/dist/data-branching-7rpktFJ-.cjs +1 -0
  76. package/dist/data-branching-BS0aFUMu.js +6428 -0
  77. package/dist/data-branching-BgIAw01q.cjs +1 -0
  78. package/dist/data-branching-bvB9K6KS.js +6386 -0
  79. package/dist/data-branching.cjs +1 -1
  80. package/dist/data-branching.mjs +1 -1
  81. package/dist/data.cjs +1 -1
  82. package/dist/data.mjs +3 -3
  83. package/dist/devops-Bp-_aA-9.js +8682 -0
  84. package/dist/devops-CFytAJQr.cjs +18 -0
  85. package/dist/devops-CW8YY_zA.js +9122 -0
  86. package/dist/devops-CXBSjnyX.cjs +17 -0
  87. package/dist/devops.cjs +1 -1
  88. package/dist/devops.css +1 -0
  89. package/dist/devops.mjs +5 -5
  90. package/dist/editors.cjs +1 -1
  91. package/dist/editors.mjs +8 -8
  92. package/dist/feedback.cjs +1 -1
  93. package/dist/feedback.d.ts +21 -16
  94. package/dist/feedback.mjs +3 -3
  95. package/dist/index.cjs +199 -194
  96. package/dist/index.css +1 -1
  97. package/dist/index.d.ts +378 -48
  98. package/dist/index.mjs +23248 -21783
  99. package/dist/lazy.cjs +1 -1
  100. package/dist/lazy.mjs +24 -24
  101. package/dist/navigation.cjs +1 -1
  102. package/dist/navigation.d.ts +31 -0
  103. package/dist/navigation.mjs +404 -354
  104. package/dist/no-code-BNFk_BDO.js +8275 -0
  105. package/dist/no-code-BaAI_sJR.js +8318 -0
  106. package/dist/no-code-CFdTp543.cjs +331 -0
  107. package/dist/no-code-oQTeAtnW.cjs +331 -0
  108. package/dist/no-code.cjs +1 -1
  109. package/dist/no-code.mjs +1 -1
  110. package/dist/overlays.cjs +1 -1
  111. package/dist/overlays.d.ts +5 -0
  112. package/dist/overlays.mjs +1 -1
  113. package/dist/pickerCommons-BQi6IEAt.js +661 -0
  114. package/dist/pickerCommons-CMxFt9SW.js +548 -0
  115. package/dist/pickerCommons-Dc_hlz-e.cjs +1 -0
  116. package/dist/pickerCommons-DvQptSPX.cjs +1 -0
  117. package/dist/style.css +7 -4
  118. package/package.json +4 -3
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),f=require("@nice2dev/ui-core"),n=require("react"),H=require("./NiceButton-DzCqkG5a.cjs"),q={info:e.jsx(f.NiceIcon,{name:"info",size:20}),success:e.jsx(f.NiceIcon,{name:"success",size:20}),warning:e.jsx(f.NiceIcon,{name:"warning",size:20}),error:e.jsx(f.NiceIcon,{name:"error",size:20})},V=({variant:t="info",title:r,children:a,closable:c,onClose:s,icon:i,size:m="md",className:o,style:d,displayStyle:b})=>{const{t:h}=f.useNiceTranslation(),_=f.useComponentDisplayClass("card",b);return e.jsxs("div",{className:`nice-alert nice-alert--${t} nice-alert--${m} nice-alert--ds-${_} ${o||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${t}`,children:i||q[t]}),e.jsxs("div",{className:"nice-alert__content",children:[r&&e.jsx("div",{className:"nice-alert__title",children:r}),e.jsx("div",{children:a})]}),c&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:s,"aria-label":h("alert.close","Close"),children:e.jsx(f.NiceIcon,{name:"close",size:16})})]})},W=({open:t,onClose:r,title:a,position:c="right",size:s="md",children:i,footer:m,transitionDuration:o,className:d,style:b,displayStyle:h})=>{const _=f.useComponentDisplayStyle("modal",h),y=f.useComponentDisplayClass("modal",h),{t:l}=f.useNiceTranslation(),p=n.useRef(null);return f.useOverlayFocus(p,{open:t,onClose:r}),n.useEffect(()=>{if(t)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[t]),t?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:x=>{x.target===x.currentTarget&&r()}}),e.jsxs("div",{ref:p,className:`nice-drawer nice-drawer--${c} nice-drawer--${s} nice-drawer--ds-${y} ${d||""}`,style:{..._,...b,...o!=null?{transitionDuration:`${o}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:r,"aria-label":l("controls.close","Close"),children:e.jsx(f.NiceIcon,{name:"close",size:18})})]}),e.jsx("div",{className:"nice-drawer__body",children:i}),m&&e.jsx("div",{className:"nice-drawer__footer",children:m})]})]}):null},U=({toasts:t,onDismiss:r,position:a="top-right"})=>{const{t:c}=f.useNiceTranslation(),s=n.useRef(null),i=n.useRef(null);f.useInputHints(s,[{intent:"back",label:c("toast.dismiss","Dismiss")}]);const m=n.useCallback(o=>{const d=s.current;if(!d||!o.contains(document.activeElement))return;const b=[...d.querySelectorAll(".nice-toast:not(.nice-toast--exiting)")],h=b.indexOf(o),_=b[h+1]??b[h-1];(_&&_!==o?_.querySelector("button"):i.current?.isConnected?i.current:null)?.focus()},[]);return n.useEffect(()=>{const o=s.current;if(!o)return;const d=b=>{const h=b.relatedTarget;h instanceof HTMLElement&&!o.contains(h)&&(i.current=h)};return o.addEventListener("focusin",d),()=>o.removeEventListener("focusin",d)},[]),e.jsx("div",{ref:s,className:`nice-toast-container nice-toast-container--${a}`,role:"region","aria-label":c("toast.region","Notifications"),children:t.map(o=>e.jsx(K,{toast:o,onDismiss:r,onLeave:m},o.id))})},K=({toast:t,onDismiss:r,onLeave:a})=>{const{t:c}=f.useNiceTranslation(),s=n.useRef(null),[i,m]=n.useState(!1),[o,d]=n.useState(!1),[b,h]=n.useState(!1),_=o||b,y=n.useCallback(()=>{s.current&&a(s.current),m(!0)},[a]);return n.useEffect(()=>{if(_||i)return;const l=t.duration??4e3;if(l>0){const p=setTimeout(()=>m(!0),l);return()=>clearTimeout(p)}},[t.duration,_,i]),n.useEffect(()=>{if(i){const l=setTimeout(()=>r(t.id),200);return()=>clearTimeout(l)}},[i,t.id,r]),n.useEffect(()=>{const l=s.current;if(!l)return;const p=g=>{g.key==="Escape"&&!g.defaultPrevented&&(g.preventDefault(),y())},x=()=>d(!0),u=()=>d(!1),j=()=>h(!0),v=g=>{l.contains(g.relatedTarget)||h(!1)};return l.addEventListener("keydown",p),l.addEventListener("mouseenter",x),l.addEventListener("mouseleave",u),l.addEventListener("focusin",j),l.addEventListener("focusout",v),()=>{l.removeEventListener("keydown",p),l.removeEventListener("mouseenter",x),l.removeEventListener("mouseleave",u),l.removeEventListener("focusin",j),l.removeEventListener("focusout",v)}},[y]),e.jsxs("div",{ref:s,className:`nice-toast nice-toast--${t.variant} ${i?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:q[t.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[t.title&&e.jsx("div",{className:"nice-toast__title",children:t.title}),e.jsx("div",{className:"nice-toast__message",children:t.message}),t.action&&e.jsx("button",{type:"button",className:"nice-toast__action",onClick:()=>{t.action?.onClick(),y()},children:t.action.label})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:y,"aria-label":c("toast.close","Close"),children:e.jsx(f.NiceIcon,{name:"close",size:16})})]})};let Y=0;function G(){const[t,r]=n.useState([]),a=n.useCallback((s,i,m)=>{const o=`toast-${++Y}`;return r(d=>[...d,{id:o,variant:s,message:i,title:m?.title,duration:m?.duration,action:m?.action}]),o},[]),c=n.useCallback(s=>{r(i=>i.filter(m=>m.id!==s))},[]);return{toasts:t,dismiss:c,info:(s,i)=>a("info",s,i),success:(s,i)=>a("success",s,i),warning:(s,i)=>a("warning",s,i),error:(s,i)=>a("error",s,i)}}function J({error:t,showRetry:r,retryLabel:a,title:c,onReset:s}){const{t:i}=f.useNiceTranslation();return e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:e.jsx(f.NiceIcon,{name:"warning",size:32})}),e.jsx("h2",{className:"nice-error-boundary__title",children:c??i("errorBoundary.somethingWentWrong","Something went wrong")}),e.jsx("p",{className:"nice-error-boundary__message",children:t.message}),r&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:s,children:a??i("errorBoundary.retry","Retry")})]})}const A=class A extends n.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,a){this.props.onError?.(r,a)}render(){if(this.state.hasError&&this.state.error){const{fallback:r,showRetry:a=!0,retryLabel:c,title:s}=this.props;return typeof r=="function"?r(this.state.error,this.handleReset):r||e.jsx(J,{error:this.state.error,showRetry:a,retryLabel:c,title:s,onReset:this.handleReset})}return this.props.children}};A.displayName="NiceErrorBoundary";let z=A;function Q(t){return window.addEventListener("online",t),window.addEventListener("offline",t),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}function X(){return navigator.onLine}function Z(){return!0}const ee=({message:t,variant:r="warning",icon:a,online:c,size:s="md",className:i,style:m,"data-testid":o})=>{const{t:d}=f.useNiceTranslation(),b=n.useSyncExternalStore(Q,X,Z);return c??b?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${r} nice-offline-banner--${s} ${i||""}`,style:m,role:"alert","aria-live":"assertive","data-testid":o,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:a??e.jsx(f.NiceIcon,{name:"wifi",size:18})}),e.jsx("span",{className:"nice-offline-banner__message",children:t??d("offlineBanner.message","You are offline. Some features may be unavailable.")})]})},ne=({error:t,onRetry:r,retryLabel:a,title:c,autoRetrySeconds:s,variant:i="error",icon:m,size:o="md",className:d,style:b,"data-testid":h})=>{const{t:_}=f.useNiceTranslation(),y=a??_("retryPanel.retry","Retry"),l=c??_("retryPanel.operationFailed","Operation failed"),[p,x]=n.useState(s??0),u=n.useRef(void 0),j=typeof t=="string"?t:t.message,v=n.useCallback(()=>{x(s??0),r()},[r,s]);return n.useEffect(()=>{if(!(!s||s<=0))return x(s),u.current=setInterval(()=>{x(g=>g<=1?(clearInterval(u.current),r(),0):g-1)},1e3),()=>clearInterval(u.current)},[s,r]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${i} nice-retry-panel--${o} ${d||""}`,style:b,role:"alert","data-testid":h,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:m??e.jsx(f.NiceIcon,{name:"warning",size:24})}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:l}),e.jsx("p",{className:"nice-retry-panel__message",children:j})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:v,children:y}),s&&p>0&&e.jsx("span",{className:"nice-retry-panel__countdown",children:_("retryPanel.autoRetryInS","Auto-retry in {countdown}s").replace("{countdown}",String(p))})]})]})};function B({timeoutMs:t=1e4,slowThresholdMs:r=3e3,onTimeout:a,autoRetry:c=!1,autoRetryCount:s=3}={}){const[i,m]=n.useState(!1),[o,d]=n.useState(!1),[b,h]=n.useState(!1),[_,y]=n.useState(0),[l,p]=n.useState(0),x=n.useRef(null),u=n.useRef(null),j=n.useRef(null),v=n.useRef(0),g=n.useCallback(()=>{x.current&&clearTimeout(x.current),u.current&&clearTimeout(u.current),j.current&&clearInterval(j.current)},[]),C=n.useCallback(()=>{g(),m(!0),d(!1),h(!1),y(0),v.current=Date.now(),j.current=setInterval(()=>{y(Date.now()-v.current)},200),x.current=setTimeout(()=>{d(!0)},r),u.current=setTimeout(()=>{h(!0),m(!1),d(!1),g(),a?.()},t)},[g,r,t,a]),T=n.useCallback(()=>{g(),m(!1),d(!1)},[g]),N=n.useCallback(()=>{p(w=>w+1),h(!1),C()},[C]);return n.useEffect(()=>()=>g(),[g]),n.useEffect(()=>{if(c&&b&&l<s){const w=Math.pow(2,l)*1e3,I=setTimeout(()=>N(),w);return()=>clearTimeout(I)}},[c,s,b,l,N]),{isLoading:i,isSlow:o,isTimedOut:b,elapsed:_,retryCount:l,start:C,stop:T,retry:N}}const se=({timeoutMs:t=1e4,slowThresholdMs:r=3e3,onTimeout:a,onRetry:c,autoRetry:s=!1,autoRetryCount:i=3,showProgress:m=!0,slowMessage:o,timeoutMessage:d,loading:b,children:h,size:_="md",className:y,style:l,"data-testid":p})=>{const{t:x}=f.useNiceTranslation(),{isSlow:u,isTimedOut:j,elapsed:v,start:g,stop:C,retry:T}=B({timeoutMs:t,slowThresholdMs:r,onTimeout:a,autoRetry:s,autoRetryCount:i}),N=n.useRef(g);N.current=g;const w=n.useRef(C);w.current=C,n.useEffect(()=>{b?N.current():w.current()},[b]);const I=()=>{T(),c?.()};if(!b)return e.jsx(e.Fragment,{children:h});if(j)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${_} ${y??""}`,style:l,role:"alert","data-testid":p,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d??x("timeoutFeedback.timeout","The operation timed out. Please try again.")}),e.jsx(H.NiceButton,{size:"sm",className:"nice-timeout-feedback__retry-btn",onClick:I,children:x("timeoutFeedback.retry","Try again")})]});const E=Math.min(100,v/t*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${_} ${u?"nice-timeout-feedback--slow":""} ${y??""}`,style:l,role:"status","aria-busy":"true","data-testid":p,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-hidden":"true"}),u&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:o??x("timeoutFeedback.slow","This is taking longer than usual…")}),m&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-label":x("timeoutFeedback.progress","Time until timeout"),"aria-valuenow":Math.round(E),"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${E}%`}})})]})},te=Object.assign(n.forwardRef(({visible:t,onAcceptAll:r,onRejectAll:a,onSave:c,categories:s=["necessary","analytics","marketing","preferences"],defaults:i,position:m="bottom",size:o="md",policyUrl:d,showDetails:b=!1,className:h,style:_,id:y,...l},p)=>{const x=f.useControlId(y),{t:u}=f.useNiceTranslation(),[j,v]=n.useState(!0),g=t??j,[C,T]=n.useState(b),[N,w]=n.useState(()=>{const k={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return i&&Object.assign(k,i),k.necessary=!0,k}),I={necessary:u("cookie.necessary","Necessary"),analytics:u("cookie.analytics","Analytics"),marketing:u("cookie.marketing","Marketing"),preferences:u("cookie.preferences","Preferences")},E={necessary:u("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:u("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:u("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:u("cookie.preferencesDesc","Allow the website to remember your choices.")},D=n.useCallback(()=>{const k={necessary:!0,analytics:!0,marketing:!0,preferences:!0};r?.(),c?.(k),v(!1)},[r,c]),L=n.useCallback(()=>{const k={necessary:!0,analytics:!1,marketing:!1,preferences:!1};a?.(),c?.(k),v(!1)},[a,c]),P=n.useCallback(()=>{c?.({...N,necessary:!0}),v(!1)},[N,c]),$=n.useRef(null);f.useOverlayFocus($,{open:g});const O=n.useCallback(k=>{$.current=k,typeof p=="function"?p(k):p&&(p.current=k)},[p]);return g?e.jsx("div",{ref:O,id:x,className:`nice-cookie-consent nice-cookie-consent--${m} nice-cookie-consent--${o} ${h??""}`,style:_,role:"dialog","aria-label":u("cookie.label","Cookie Consent"),"aria-modal":"true",...l,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[u("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:u("cookie.learnMore","Learn more")})]})]}),C&&e.jsx("div",{className:"nice-cookie-consent__details",children:s.map(k=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:N[k],disabled:k==="necessary",onChange:R=>w(F=>({...F,[k]:R.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:I[k]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:E[k]})]})]},k))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!C&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>T(!0),children:u("cookie.customize","Customize")}),C&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:P,children:u("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:L,children:u("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:D,children:u("cookie.acceptAll","Accept all")})]})]})}):null}),{displayName:"NiceCookieConsent"}),re=Object.assign(n.forwardRef(({onSubmit:t,onForgotPassword:r,onRegister:a,loading:c=!1,error:s,variant:i="primary",size:m="md",showRememberMe:o=!0,showForgotPassword:d=!0,showRegister:b=!1,title:h,logo:_,usernameLabel:y,passwordLabel:l,usernamePlaceholder:p,passwordPlaceholder:x,className:u,style:j,id:v,...g},C)=>{const T=f.useControlId(v),{t:N}=f.useNiceTranslation(),[w,I]=n.useState(""),[E,D]=n.useState(""),[L,P]=n.useState(!1),[$,O]=n.useState(!1),k=`${T}-user`,R=`${T}-pass`,F=`${T}-remember`,M=n.useCallback(S=>{S.preventDefault(),!c&&t?.({username:w,password:E,rememberMe:L})},[c,w,E,L,t]);return e.jsxs("form",{ref:C,id:T,className:`nice-login nice-login--${i} nice-login--${m} ${u??""}`,style:j,onSubmit:M,noValidate:!0,...g,children:[_&&e.jsx("div",{className:"nice-login__logo",children:_}),h&&e.jsx("h2",{className:"nice-login__title",children:h??N("login.title","Sign In")}),s&&e.jsx("div",{className:"nice-login__error",role:"alert",children:s}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:k,className:"nice-login__label",children:y??N("login.username","Username")}),e.jsx("input",{id:k,className:"nice-login__input",type:"text",value:w,onChange:S=>I(S.target.value),placeholder:p??N("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:c,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:R,className:"nice-login__label",children:l??N("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:R,className:"nice-login__input",type:$?"text":"password",value:E,onChange:S=>D(S.target.value),placeholder:x??N("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:c,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>O(!$),"aria-label":$?N("login.hidePassword","Hide password"):N("login.showPassword","Show password"),tabIndex:-1,children:e.jsx(f.NiceIcon,{name:$?"eye-off":"eye",size:16})})]})]}),e.jsxs("div",{className:"nice-login__options",children:[o&&e.jsxs("label",{className:"nice-login__remember",htmlFor:F,children:[e.jsx("input",{id:F,type:"checkbox",checked:L,onChange:S=>P(S.target.checked),disabled:c}),e.jsx("span",{children:N("login.rememberMe","Remember me")})]}),d&&r&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:r,disabled:c,children:N("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${i}`,disabled:c||!w||!E,children:c?N("login.loading","Signing in..."):N("login.submit","Sign In")}),b&&a&&e.jsxs("p",{className:"nice-login__register",children:[N("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:a,disabled:c,children:N("login.register","Register")})]})]})}),{displayName:"NiceLoginForm"});exports.NiceAlert=V;exports.NiceCookieConsent=te;exports.NiceDrawer=W;exports.NiceErrorBoundary=z;exports.NiceLoginForm=re;exports.NiceOfflineBanner=ee;exports.NiceRetryPanel=ne;exports.NiceTimeoutFeedback=se;exports.NiceToastContainer=U;exports.alertIcons=q;exports.useNiceTimeout=B;exports.useNiceToast=G;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("@nice2dev/ui-core"),n=require("react"),V=require("./NiceButton-3AcJJ15c.cjs"),z={info:e.jsx(l.NiceIcon,{name:"info",size:20}),success:e.jsx(l.NiceIcon,{name:"success",size:20}),warning:e.jsx(l.NiceIcon,{name:"warning",size:20}),error:e.jsx(l.NiceIcon,{name:"error",size:20})},W=({variant:s="info",title:t,children:a,closable:r,onClose:i,icon:c,size:d="md",className:h,style:f,displayStyle:b})=>{const{t:N}=l.useNiceTranslation(),p=l.useComponentDisplayClass("card",b);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${d} nice-alert--ds-${p} ${h||""}`,style:f,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:c||z[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:i,"aria-label":N("alert.close","Close"),children:e.jsx(l.NiceIcon,{name:"close",size:16})})]})},H=({open:s,onClose:t,title:a,position:r="right",size:i="md",children:c,footer:d,transitionDuration:h,className:f,style:b,displayStyle:N})=>{const p=l.useComponentDisplayStyle("modal",N),j=l.useComponentDisplayClass("modal",N),{t:x}=l.useNiceTranslation(),k=n.useRef(null);return l.useFocusTrap(k,s),n.useEffect(()=>{if(!s)return;const m=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",m),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",m),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:m=>{m.target===m.currentTarget&&t()}}),e.jsxs("div",{ref:k,className:`nice-drawer nice-drawer--${r} nice-drawer--${i} nice-drawer--ds-${j} ${f||""}`,style:{...p,...b,...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":x("controls.close","Close"),children:e.jsx(l.NiceIcon,{name:"close",size:18})})]}),e.jsx("div",{className:"nice-drawer__body",children:c}),d&&e.jsx("div",{className:"nice-drawer__footer",children:d})]})]}):null},U=({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{t:a}=l.useNiceTranslation(),[r,i]=n.useState(!1);return n.useEffect(()=>{if(!s.duration&&s.duration!==0){const c=setTimeout(()=>i(!0),4e3);return()=>clearTimeout(c)}if(s.duration>0){const c=setTimeout(()=>i(!0),s.duration);return()=>clearTimeout(c)}},[s.duration]),n.useEffect(()=>{if(r){const c=setTimeout(()=>t(s.id),200);return()=>clearTimeout(c)}},[r,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${r?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:z[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:()=>i(!0),"aria-label":a("toast.close","Close"),children:e.jsx(l.NiceIcon,{name:"close",size:16})})]})};let G=0;function J(){const[s,t]=n.useState([]),a=n.useCallback((i,c,d)=>{const h=`toast-${++G}`;return t(f=>[...f,{id:h,variant:i,message:c,title:d?.title,duration:d?.duration}]),h},[]),r=n.useCallback(i=>{t(c=>c.filter(d=>d.id!==i))},[]);return{toasts:s,dismiss:r,info:(i,c)=>a("info",i,c),success:(i,c)=>a("success",i,c),warning:(i,c)=>a("warning",i,c),error:(i,c)=>a("error",i,c)}}function K({error:s,showRetry:t,retryLabel:a,title:r,onReset:i}){const{t:c}=l.useNiceTranslation();return e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:e.jsx(l.NiceIcon,{name:"warning",size:32})}),e.jsx("h2",{className:"nice-error-boundary__title",children:r??c("errorBoundary.somethingWentWrong","Something went wrong")}),e.jsx("p",{className:"nice-error-boundary__message",children:s.message}),t&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:i,children:a??c("errorBoundary.retry","Retry")})]})}const O=class O extends n.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,title:i}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsx(K,{error:this.state.error,showRetry:a,retryLabel:r,title:i,onReset:this.handleReset})}return this.props.children}};O.displayName="NiceErrorBoundary";let L=O;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,variant:t="warning",icon:a,online:r,size:i="md",className:c,style:d,"data-testid":h})=>{const{t:f}=l.useNiceTranslation(),b=n.useSyncExternalStore(Q,X,Z);return r??b?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${i} ${c||""}`,style:d,role:"alert","aria-live":"assertive","data-testid":h,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:a??e.jsx(l.NiceIcon,{name:"wifi",size:18})}),e.jsx("span",{className:"nice-offline-banner__message",children:s??f("offlineBanner.message","You are offline. Some features may be unavailable.")})]})},se=({error:s,onRetry:t,retryLabel:a,title:r,autoRetrySeconds:i,variant:c="error",icon:d,size:h="md",className:f,style:b,"data-testid":N})=>{const{t:p}=l.useNiceTranslation(),j=a??p("retryPanel.retry","Retry"),x=r??p("retryPanel.operationFailed","Operation failed"),[k,m]=n.useState(i??0),o=n.useRef(void 0),C=typeof s=="string"?s:s.message,w=n.useCallback(()=>{m(i??0),t()},[t,i]);return n.useEffect(()=>{if(!(!i||i<=0))return m(i),o.current=setInterval(()=>{m(g=>g<=1?(clearInterval(o.current),t(),0):g-1)},1e3),()=>clearInterval(o.current)},[i,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${c} nice-retry-panel--${h} ${f||""}`,style:b,role:"alert","data-testid":N,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:d??e.jsx(l.NiceIcon,{name:"warning",size:24})}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:x}),e.jsx("p",{className:"nice-retry-panel__message",children:C})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:w,children:j}),i&&k>0&&e.jsx("span",{className:"nice-retry-panel__countdown",children:p("retryPanel.autoRetryInS","Auto-retry in {countdown}s").replace("{countdown}",String(k))})]})]})};function B({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,autoRetry:r=!1,autoRetryCount:i=3}={}){const[c,d]=n.useState(!1),[h,f]=n.useState(!1),[b,N]=n.useState(!1),[p,j]=n.useState(0),[x,k]=n.useState(0),m=n.useRef(null),o=n.useRef(null),C=n.useRef(null),w=n.useRef(0),g=n.useCallback(()=>{m.current&&clearTimeout(m.current),o.current&&clearTimeout(o.current),C.current&&clearInterval(C.current)},[]),v=n.useCallback(()=>{g(),d(!0),f(!1),N(!1),j(0),w.current=Date.now(),C.current=setInterval(()=>{j(Date.now()-w.current)},200),m.current=setTimeout(()=>{f(!0)},t),o.current=setTimeout(()=>{N(!0),d(!1),f(!1),g(),a?.()},s)},[g,t,s,a]),T=n.useCallback(()=>{g(),d(!1),f(!1)},[g]),u=n.useCallback(()=>{k(y=>y+1),N(!1),v()},[v]);return n.useEffect(()=>()=>g(),[g]),n.useEffect(()=>{if(r&&b&&x<i){const y=Math.pow(2,x)*1e3,I=setTimeout(()=>u(),y);return()=>clearTimeout(I)}},[r,i,b,x,u]),{isLoading:c,isSlow:h,isTimedOut:b,elapsed:p,retryCount:x,start:v,stop:T,retry:u}}const ne=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:a,onRetry:r,autoRetry:i=!1,autoRetryCount:c=3,showProgress:d=!0,slowMessage:h,timeoutMessage:f,loading:b,children:N,size:p="md",className:j,style:x,"data-testid":k})=>{const{t:m}=l.useNiceTranslation(),{isSlow:o,isTimedOut:C,elapsed:w,start:g,stop:v,retry:T}=B({timeoutMs:s,slowThresholdMs:t,onTimeout:a,autoRetry:i,autoRetryCount:c}),u=n.useRef(g);u.current=g;const y=n.useRef(v);y.current=v,n.useEffect(()=>{b?u.current():y.current()},[b]);const I=()=>{T(),r?.()};if(!b)return e.jsx(e.Fragment,{children:N});if(C)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${p} ${j??""}`,style:x,role:"alert","data-testid":k,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:f??m("timeoutFeedback.timeout","The operation timed out. Please try again.")}),e.jsx(V.NiceButton,{size:"sm",className:"nice-timeout-feedback__retry-btn",onClick:I,children:m("timeoutFeedback.retry","Try again")})]});const $=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${p} ${o?"nice-timeout-feedback--slow":""} ${j??""}`,style:x,role:"status","aria-busy":"true","data-testid":k,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-hidden":"true"}),o&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h??m("timeoutFeedback.slow","This is taking longer than usual…")}),d&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-label":m("timeoutFeedback.progress","Time until timeout"),"aria-valuenow":Math.round($),"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${$}%`}})})]})},te=Object.assign(n.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:a,onSave:r,categories:i=["necessary","analytics","marketing","preferences"],defaults:c,position:d="bottom",size:h="md",policyUrl:f,showDetails:b=!1,className:N,style:p,id:j,...x},k)=>{const m=l.useControlId(j),{t:o}=l.useNiceTranslation(),[C,w]=n.useState(!0),g=s??C,[v,T]=n.useState(b),[u,y]=n.useState(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return c&&Object.assign(_,c),_.necessary=!0,_}),I={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},$={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=n.useCallback(()=>{const _={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(_),w(!1)},[t,r]),E=n.useCallback(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};a?.(),r?.(_),w(!1)},[a,r]),F=n.useCallback(()=>{r?.({...u,necessary:!0}),w(!1)},[u,r]);return g?e.jsx("div",{ref:k,id:m,className:`nice-cookie-consent nice-cookie-consent--${d} nice-cookie-consent--${h} ${N??""}`,style:p,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",...x,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."),f&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:f,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:i.map(_=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:u[_],disabled:_==="necessary",onChange:P=>y(R=>({...R,[_]:P.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:I[_]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:$[_]})]})]},_))}),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:()=>T(!0),children:o("cookie.customize","Customize")}),v&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:F,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:E,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}),{displayName:"NiceCookieConsent"}),ie=Object.assign(n.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:a,loading:r=!1,error:i,variant:c="primary",size:d="md",showRememberMe:h=!0,showForgotPassword:f=!0,showRegister:b=!1,title:N,logo:p,usernameLabel:j,passwordLabel:x,usernamePlaceholder:k,passwordPlaceholder:m,className:o,style:C,id:w,...g},v)=>{const T=l.useControlId(w),{t:u}=l.useNiceTranslation(),[y,I]=n.useState(""),[$,D]=n.useState(""),[E,F]=n.useState(!1),[_,P]=n.useState(!1),R=`${T}-user`,q=`${T}-pass`,A=`${T}-remember`,M=n.useCallback(S=>{S.preventDefault(),!r&&s?.({username:y,password:$,rememberMe:E})},[r,y,$,E,s]);return e.jsxs("form",{ref:v,id:T,className:`nice-login nice-login--${c} nice-login--${d} ${o??""}`,style:C,onSubmit:M,noValidate:!0,...g,children:[p&&e.jsx("div",{className:"nice-login__logo",children:p}),N&&e.jsx("h2",{className:"nice-login__title",children:N??u("login.title","Sign In")}),i&&e.jsx("div",{className:"nice-login__error",role:"alert",children:i}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:R,className:"nice-login__label",children:j??u("login.username","Username")}),e.jsx("input",{id:R,className:"nice-login__input",type:"text",value:y,onChange:S=>I(S.target.value),placeholder:k??u("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:q,className:"nice-login__label",children:x??u("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:q,className:"nice-login__input",type:_?"text":"password",value:$,onChange:S=>D(S.target.value),placeholder:m??u("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:()=>P(!_),"aria-label":_?u("login.hidePassword","Hide password"):u("login.showPassword","Show password"),tabIndex:-1,children:e.jsx(l.NiceIcon,{name:_?"eye-off":"eye",size:16})})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:A,children:[e.jsx("input",{id:A,type:"checkbox",checked:E,onChange:S=>F(S.target.checked),disabled:r}),e.jsx("span",{children:u("login.rememberMe","Remember me")})]}),f&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:u("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${c}`,disabled:r||!y||!$,children:r?u("login.loading","Signing in..."):u("login.submit","Sign In")}),b&&a&&e.jsxs("p",{className:"nice-login__register",children:[u("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:a,disabled:r,children:u("login.register","Register")})]})]})}),{displayName:"NiceLoginForm"});exports.NiceAlert=W;exports.NiceCookieConsent=te;exports.NiceDrawer=H;exports.NiceErrorBoundary=L;exports.NiceLoginForm=ie;exports.NiceOfflineBanner=ee;exports.NiceRetryPanel=se;exports.NiceTimeoutFeedback=ne;exports.NiceToastContainer=U;exports.alertIcons=z;exports.useNiceTimeout=B;exports.useNiceToast=J;