@nice2dev/ui 1.0.12 → 1.0.14

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 (52) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +53 -36
  3. package/css/legacy-bg-text-aliases.css +83 -0
  4. package/dist/NiceErrorBoundary-BLTq8mPU.cjs +1 -0
  5. package/dist/NiceErrorBoundary-Bjw5U31n.js +762 -0
  6. package/dist/NiceForm-CUlhtlHw.js +5357 -0
  7. package/dist/NiceForm-DTgIGX88.cjs +382 -0
  8. package/dist/NiceForm.css +1 -1
  9. package/dist/NiceModal-C_t2qqZd.js +95 -0
  10. package/dist/NiceModal-FQqBxCij.cjs +1 -0
  11. package/dist/NiceModuleLifecyclePanel-CCFHxKIu.js +6343 -0
  12. package/dist/NiceModuleLifecyclePanel-D8cIOI8I.cjs +1 -0
  13. package/dist/NiceModuleLifecyclePanel.css +1 -1
  14. package/dist/NicePagination-BVkkePJU.js +171 -0
  15. package/dist/NicePagination-DGd3Hrh9.cjs +1 -0
  16. package/dist/NicePinCodeInput-CDtodnIM.js +11875 -0
  17. package/dist/NicePinCodeInput-DytLfqZL.cjs +419 -0
  18. package/dist/NicePinCodeInput.css +1 -1
  19. package/dist/NiceSavedQueryPanel-CbR3EDQU.cjs +596 -0
  20. package/dist/NiceSavedQueryPanel-DJqCNWYZ.js +6446 -0
  21. package/dist/NiceTabs-B-9_mzpc.js +1624 -0
  22. package/dist/NiceTabs-CHg36waF.cjs +1 -0
  23. package/dist/NiceWindow-BxGVzUs2.js +1409 -0
  24. package/dist/NiceWindow-HhPIzPzs.cjs +1 -0
  25. package/dist/charts-Us8Ep8MJ.cjs +761 -0
  26. package/dist/charts-fO6InNZd.js +4645 -0
  27. package/dist/charts.cjs +1 -1
  28. package/dist/charts.mjs +1 -1
  29. package/dist/core-B-tu8l9M.cjs +96 -0
  30. package/dist/core-BJ_UNMlX.js +22276 -0
  31. package/dist/data.cjs +1 -1
  32. package/dist/data.d.ts +7 -0
  33. package/dist/data.mjs +1 -1
  34. package/dist/editors.cjs +1 -1
  35. package/dist/editors.mjs +3 -3
  36. package/dist/feedback.cjs +1 -1
  37. package/dist/feedback.mjs +2 -2
  38. package/dist/index-DHc_KZkF.js +61311 -0
  39. package/dist/index-drIVMHeC.cjs +5194 -0
  40. package/dist/index.cjs +1 -1
  41. package/dist/index.css +1 -1
  42. package/dist/index.d.ts +1140 -63
  43. package/dist/index.mjs +833 -819
  44. package/dist/lazy.cjs +1 -1
  45. package/dist/lazy.mjs +3 -3
  46. package/dist/navigation.cjs +1 -1
  47. package/dist/navigation.d.ts +309 -70
  48. package/dist/navigation.mjs +91 -90
  49. package/dist/overlays.cjs +1 -1
  50. package/dist/overlays.mjs +2 -2
  51. package/dist/style.css +7 -0
  52. package/package.json +9 -5
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("./core-B-tu8l9M.cjs"),c=require("react"),Ie=require("react-dom"),Ce=c.forwardRef(({label:l,helperText:m,error:s,required:p,disabled:i,readOnly:n,size:d="md",name:y,id:f,className:u,style:_,accessMode:S,displayStyle:G,variant:x,value:w,defaultValue:E,onChange:h,onBlur:Q,onKeyDown:D,placeholder:$,type:F="text",maxLength:g,prefix:I,suffix:K,clearable:R,autoFocus:H,submitOnEnter:k,onSubmit:A,showKeyboardHints:V,labelPlacement:L,errorPlacement:W,loading:re,labelWidth:le,controlWidth:z,displayMode:X,...de},b)=>{const j=o.Bs(S,f),Z=j==="hidden";j==="disabled"&&(i=!0),j==="readOnly"&&(n=!0);const{t:B}=o.$o(),M=o.Ss(f),ee=o.os("input",G),ae=o.is("input",G),ue=x==="filled"?"filled":x==="underlined"?"underlined":"",J=c.useCallback(()=>h?.(""),[h]),Y=o.ds({enabled:X,readOnly:n,disabled:i}),oe=o.tc({enabled:k,onSubmit:A}),ie=c.useCallback(v=>{oe(v),D?.(v)},[oe,D]),a=c.useMemo(()=>{const v=[];return k&&v.push({key:"Enter",description:B("shortcuts.submit","Submit")}),R&&v.push({key:"Escape",description:B("shortcuts.clear","Clear")}),v},[k,R,B]);return Z?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${L==="left"?"nice-field--label-left":""} ${L==="inside"?"nice-field--label-inside":""} ${re?"nice-field--loading":""} ${u||""}`,style:{..._,...le!=null&&{"--nice-field-label-width":typeof le=="number"?`${le}px`:le},...z!=null&&{"--nice-field-control-width":typeof z=="number"?`${z}px`:z}},"aria-busy":re||void 0,"data-floating":L==="inside"&&w?"true":void 0,children:[l&&L!=="inside"&&e.jsxs("label",{htmlFor:M,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,V&&a.length>0&&e.jsx(o.Or,{shortcuts:a,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[Y.isDisplay?e.jsx(o.fs,{value:w??E??"",placeholder:$,disabled:i,readOnly:n,onActivate:Y.enterEdit,ariaLabel:l}):e.jsxs("div",{className:`nice-input nice-input--${d} nice-input--ds-${ue||ae} ${s?"nice-input--error":""} ${i?"nice-input--disabled":""} ${n?"nice-input--readonly":""}`,style:x?void 0:ee,children:[I&&e.jsx("span",{className:"nice-input__icon",children:I}),e.jsx("input",{ref:v=>{typeof b=="function"?b(v):b&&(b.current=v),Y.autoFocusRef(v)},id:M,className:"nice-input__native",type:F,name:y,value:w,defaultValue:E,placeholder:$,disabled:i||re,readOnly:n,maxLength:g,autoFocus:H,"aria-invalid":!!s,"aria-describedby":s?`${M}-error`:m?`${M}-helper`:void 0,onChange:v=>h?.(v.target.value),onBlur:v=>{X&&Y.exitEdit(),Q?.(v)},onKeyDown:ie,...de}),R&&w&&e.jsx("button",{type:"button",className:"nice-input__clear",onClick:J,"aria-label":B("controls.clear","Clear"),children:"✕"}),K&&e.jsx("span",{className:"nice-input__icon",children:K}),l&&L==="inside"&&e.jsx("label",{htmlFor:M,className:`nice-input__floating-label ${p?"nice-input__floating-label--required":""}`,children:l})]}),re&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),W==="right"&&s&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:s}),W==="right"&&!s&&m&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:m})]}),W!=="right"&&s&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:s}),W!=="right"&&!s&&m&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:m})]})});Ce.displayName="NiceTextInput";const Se=c.forwardRef(({label:l,helperText:m,error:s,required:p,disabled:i,readOnly:n,size:d="md",name:y,id:f,className:u,style:_,accessMode:S,displayStyle:G,value:x,onChange:w,onBlur:E,onKeyDown:h,placeholder:Q,min:D,max:$,step:F=1,precision:g,prefix:I,prefixType:K="label",prefixOptions:R,prefixValue:H,onPrefixChange:k,suffix:A,showStepper:V=!0,submitOnEnter:L,onSubmit:W,showKeyboardHints:re,labelPlacement:le,errorPlacement:z,loading:X,labelWidth:de,controlWidth:b,formatPreset:j,format:Z,suffixType:B="label",suffixOptions:M,suffixValue:ee,onSuffixChange:ae,displayMode:ue},J)=>{const Y=o.Bs(S,f),oe=Y==="hidden";Y==="disabled"&&(i=!0),Y==="readOnly"&&(n=!0);const{t:ie}=o.$o(),a=o.Ss(f),v=o.os("input",G),U=o.is("input",G),[C,P]=c.useState(!1),[O,xe]=c.useState(null),ve=o.ds({enabled:ue,readOnly:n,disabled:i}),pe=c.useMemo(()=>{let t=3;return $!=null&&(t=String(Math.abs(Math.floor($))).length),D!=null&&D<0&&(t+=1),g&&(t+=g+1),Math.max(3,t)+1},[$,D,g]),Ne=c.useCallback(t=>{if(Z)return Z(t);if(!j)return g!=null?t.toFixed(g):String(t);switch(j){case"integer":return Math.round(t).toLocaleString();case"decimal":return t.toLocaleString(void 0,{minimumFractionDigits:g??2,maximumFractionDigits:g??2});case"money":return t.toLocaleString(void 0,{minimumFractionDigits:g??2,maximumFractionDigits:g??2,useGrouping:!0});case"percent":return(t*100).toLocaleString(void 0,{minimumFractionDigits:g??0,maximumFractionDigits:g??2})+"%";default:return String(t)}},[Z,j,g]),ye=c.useMemo(()=>C&&O!==null?O:x==null?"":C?g!=null?x.toFixed(g):String(x):Ne(x),[x,C,O,Ne,g]),fe=x!=null&&x<0,se=!!(I||K==="select"&&R&&R.length>0),ne=fe&&se&&!C,we=ne?ye.replace(/^[-−]/,""):ye,he=c.useCallback(t=>{let N=t;return D!==void 0&&(N=Math.max(D,N)),$!==void 0&&(N=Math.min($,N)),g!==void 0&&(N=parseFloat(N.toFixed(g))),N},[D,$,g]),Me=c.useCallback(t=>{const N=t.target.value;if(xe(N),N===""||N==="-"||N==="."||N==="-."){N===""&&w?.(null);return}const ce=parseFloat(N);if(!isNaN(ce)){let _e=ce;D!==void 0&&(_e=Math.max(D,_e)),$!==void 0&&(_e=Math.min($,_e)),w?.(_e)}},[w,D,$]),ge=c.useCallback(()=>{const t=be.current,N=he((t??0)+F);be.current=N,w?.(N)},[F,w,he]),$e=c.useCallback(()=>{const t=be.current,N=he((t??0)-F);be.current=N,w?.(N)},[F,w,he]),be=c.useRef(x);be.current=x;const r=c.useRef(null),T=c.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),q=c.useCallback(t=>{T();let N=300;const ce=()=>{t(),N=Math.max(30,N*.82),r.current=setTimeout(ce,N)};r.current=setTimeout(ce,400)},[T]),me=o.tc({enabled:L,onSubmit:W}),ke=c.useCallback(t=>{me(t),t.key==="ArrowUp"?(t.preventDefault(),ge()):t.key==="ArrowDown"&&(t.preventDefault(),$e()),h?.(t)},[me,h,ge,$e]),te=c.useMemo(()=>{const t=[];return L&&t.push(o.Zs.submit),V&&(t.push({key:"ArrowUp",description:ie("shortcuts.increment","Increase value")}),t.push({key:"ArrowDown",description:ie("shortcuts.decrement","Decrease value")})),t},[L,V,ie]);return oe?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${le==="left"?"nice-field--label-left":""} ${X?"nice-field--loading":""} ${u||""}`,style:{..._,...de!=null&&{"--nice-field-label-width":typeof de=="number"?`${de}px`:de},...b!=null&&{"--nice-field-control-width":typeof b=="number"?`${b}px`:b}},"aria-busy":X||void 0,children:[l&&e.jsxs("label",{htmlFor:a,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,re&&te.length>0&&e.jsx(o.Or,{shortcuts:te,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ve.isDisplay?e.jsx(o.fs,{value:x==null?"":I?e.jsxs(e.Fragment,{children:[I,ye]}):ye,placeholder:Q,disabled:i,readOnly:n,onActivate:ve.enterEdit,ariaLabel:l}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:`nice-input nice-input--number nice-input--${d} nice-input--ds-${U} ${s?"nice-input--error":""} ${i?"nice-input--disabled":""} ${n?"nice-input--readonly":""}`,style:v,children:[V&&!n&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__minus",onClick:$e,onMouseDown:()=>q($e),onMouseUp:T,onMouseLeave:T,disabled:i,"aria-label":ie("controls.decrement","Decrement"),children:"−"}),K==="select"&&R&&R.length>0?e.jsxs(e.Fragment,{children:[ne&&e.jsx("span",{className:"nice-input__sign",children:"−"}),e.jsx("select",{className:"nice-input__suffix-select nice-input__icon--prefix",value:H??R[0]?.value,disabled:i,onChange:t=>{const N=t.target.value,ce=R.find(je=>je.value===(H??R[0]?.value)),_e=R.find(je=>je.value===N);k?.(N,ce?.weight,_e?.weight)},children:R.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))})]}):I?e.jsxs("span",{className:"nice-input__icon nice-input__icon--prefix",children:[ne&&e.jsx("span",{className:"nice-input__sign",children:"−"}),I]}):null,e.jsx("input",{ref:t=>{typeof J=="function"?J(t):J&&(J.current=t),ve.autoFocusRef(t)},id:a,className:"nice-input__native",type:!C&&(Z||j)?"text":"number",name:y,value:we,placeholder:Q,min:D,max:$,step:F,disabled:i||X,readOnly:n,"aria-invalid":!!s,onChange:Me,onFocus:t=>{P(!0),xe(null),t.target.select()},onBlur:t=>{if(P(!1),xe(null),x!=null&&g!==void 0){const N=parseFloat(x.toFixed(g));N!==x&&w?.(N)}ue&&ve.exitEdit(),E?.(t)},onKeyDown:ke,style:{width:`${pe}ch`}}),B==="select"&&M&&M.length>0?e.jsx("select",{className:"nice-input__suffix-select nice-input__icon--suffix",value:ee??M[0]?.value,disabled:i,onChange:t=>{const N=t.target.value,ce=M.find(je=>je.value===(ee??M[0]?.value)),_e=M.find(je=>je.value===N);ae?.(N,ce?.weight,_e?.weight)},children:M.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}):A?e.jsx("span",{className:"nice-input__icon nice-input__icon--suffix",children:A}):null,V&&!n&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__plus",onClick:ge,onMouseDown:()=>q(ge),onMouseUp:T,onMouseLeave:T,disabled:i,"aria-label":ie("controls.increment","Increment"),children:"+"})]})}),X&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),z==="right"&&s&&e.jsx("div",{className:"nice-field__error",role:"alert",children:s}),z==="right"&&!s&&m&&e.jsx("div",{className:"nice-field__helper",children:m})]}),z!=="right"&&s&&e.jsx("div",{className:"nice-field__error",role:"alert",children:s}),z!=="right"&&!s&&m&&e.jsx("div",{className:"nice-field__helper",children:m})]})});Se.displayName="NiceNumberInput";const Re=c.forwardRef(({label:l,helperText:m,error:s,required:p,disabled:i,size:n="md",name:d,id:y,className:f,style:u,accessMode:_,displayStyle:S,options:G,value:x,onChange:w,placeholder:E,multiple:h=!1,searchable:Q=!1,clearable:D=!1,emptyText:$,maxHeight:F=240,optionsSource:g,valueField:I,labelField:K,virtualScroll:R,optionHeight:H=36,onSearch:k,loading:A,renderOption:V,multipleAutosize:L=!1,showKeyboardHints:W,labelPlacement:re,errorPlacement:le,labelWidth:z,controlWidth:X,displayMode:de},b)=>{const j=o.Bs(_,y),Z=j==="hidden";(j==="disabled"||j==="readOnly")&&(i=!0);const{t:B}=o.$o(),M=o.os("input",S),ee=o.is("input",S),ae=o.Ss(y),ue=o.ds({enabled:de,disabled:i}),[J,Y]=c.useState(!1),[oe,ie]=c.useState(""),[a,v]=c.useState(-1),[U,C]=c.useState(0),P=c.useRef(null),O=c.useRef(null),[xe,ve]=c.useState(null);c.useLayoutEffect(()=>{!A&&O.current&&ve(O.current.offsetWidth)},[A,x,S]);const[pe,Ne]=c.useState(null);c.useLayoutEffect(()=>{h&&!L&&O.current&&pe==null&&Ne(O.current.offsetWidth)},[h,L,pe]);const ye=o.jl(g??null,I??g?.keyField??"id",K??"name"),fe=g?ye.options:(G??[]).map(r=>typeof r=="string"?{value:r,label:r}:r);o.ws(P,()=>{Y(!1),ie("")});const se=c.useMemo(()=>x?Array.isArray(x)?x:[x]:[],[x]),ne=c.useMemo(()=>{if(!oe&&!k||k)return fe;const r=oe.toLowerCase();return fe.filter(T=>T.label.toLowerCase().includes(r)||String(T.value).toLowerCase().includes(r))},[fe,oe,k]),we=c.useMemo(()=>{const r=new Map;for(const T of ne){const q=T.group||"";r.has(q)||r.set(q,[]),r.get(q).push(T)}return r},[ne]),he=c.useCallback(r=>{if(h){const T=se.includes(r)?se.filter(q=>q!==r):[...se,r];w?.(T)}else w?.(r),Y(!1),ie("")},[h,se,w]),Me=c.useCallback(r=>{if(r.key==="Escape"){Y(!1),ie("");return}if(r.key==="Enter"||r.key===" "){if(!J){Y(!0),r.preventDefault();return}a>=0&&ne[a]&&(he(ne[a].value),r.preventDefault());return}r.key==="ArrowDown"&&(r.preventDefault(),v(T=>Math.min(T+1,ne.length-1))),r.key==="ArrowUp"&&(r.preventDefault(),v(T=>Math.max(T-1,0)))},[J,a,ne,he]),ge=c.useMemo(()=>se.length===0?null:h?se.map(r=>fe.find(T=>T.value===r)?.label||r).join(", "):fe.find(r=>r.value===se[0])?.label||se[0],[se,fe,h]),$e=c.useCallback(r=>{r.stopPropagation(),w?.(h?[]:"")},[w,h]),be=c.useMemo(()=>[{key:"Enter",description:B("shortcuts.select","Select")},{key:"Space",description:B("shortcuts.openDropdown","Open dropdown")},o.Zs.moveUp,o.Zs.moveDown,o.Zs.cancel],[B]);return Z?null:e.jsxs("div",{className:`nice-field ${X==null?"nice-field--select-auto":""} nice-field--${n} ${re==="left"?"nice-field--label-left":""} ${A?"nice-field--loading":""} ${f||""}`,style:{...u,...z!=null&&{"--nice-field-label-width":typeof z=="number"?`${z}px`:z},...X!=null&&{"--nice-field-control-width":typeof X=="number"?`${X}px`:X},...A&&xe!=null&&{"--nice-select-locked-width":`${xe}px`}},"aria-busy":A||void 0,children:[l&&e.jsxs("label",{htmlFor:ae,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,W&&e.jsx(o.Or,{shortcuts:be,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ue.isDisplay?e.jsx(o.fs,{value:ge,placeholder:E||B("controls.select","Select..."),disabled:i,onActivate:()=>{ue.enterEdit(),Y(!0)},ariaLabel:l}):e.jsxs("div",{className:"nice-select",ref:P,children:[e.jsxs("button",{ref:r=>{O.current=r,typeof b=="function"?b(r):b&&(b.current=r)},type:"button",id:ae,role:"combobox","aria-expanded":J,"aria-haspopup":"listbox","aria-invalid":!!s,className:`nice-select__trigger nice-select__trigger--${n} nice-select--ds-${ee} ${J?"nice-select__trigger--open":""} ${s?"nice-select__trigger--error":""} ${i?"nice-select__trigger--disabled":""}`,style:{...M,...h&&!L&&pe!=null?{width:pe,maxWidth:pe,overflow:"hidden"}:{}},disabled:i,onClick:()=>Y(!J),onKeyDown:Me,children:[ge?e.jsx("span",{style:h&&!L?{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0,children:ge}):e.jsx("span",{className:"nice-select__placeholder",children:E||B("controls.select","Select...")}),e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[D&&se.length>0&&e.jsx("span",{className:"nice-input__clear",onClick:$e,role:"button","aria-label":B("controls.clear","Clear"),children:"✕"}),e.jsx("svg",{className:`nice-select__chevron ${J?"nice-select__chevron--open":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),J&&e.jsxs("div",{className:"nice-select__dropdown",role:"listbox",style:{maxHeight:F},onScroll:R?r=>C(r.currentTarget.scrollTop):void 0,children:[(Q||k)&&e.jsx("div",{className:"nice-select__search",children:e.jsx("input",{type:"text",value:oe,onChange:r=>{ie(r.target.value),v(0),k?.(r.target.value)},placeholder:B("controls.search","Search..."),autoFocus:!0})}),A&&e.jsx("div",{className:"nice-select__loading",children:e.jsx("div",{className:"nice-spinner nice-spinner--sm",style:{margin:"8px auto"}})}),!A&&ne.length===0?e.jsx("div",{className:"nice-select__empty",children:$||B("controls.noResults","No results found")}):R&&!Array.from(we.keys()).some(r=>r!=="")?(()=>{const T=ne.length*H,q=Math.max(0,Math.floor(U/H)-3),me=Math.min(ne.length,Math.ceil((U+F)/H)+3),ke=ne.slice(q,me);return e.jsx("div",{style:{height:T,position:"relative"},children:ke.map((te,t)=>{const N=q+t,ce=se.includes(te.value);return e.jsx("div",{role:"option","aria-selected":ce,className:`nice-select__option ${ce?"nice-select__option--selected":""} ${N===a?"nice-select__option--highlighted":""} ${te.disabled?"nice-select__option--disabled":""}`,style:{position:"absolute",top:N*H,left:0,right:0,height:H,display:"flex",alignItems:"center",padding:"0 12px"},onClick:()=>!te.disabled&&he(String(te.value)),onMouseEnter:()=>v(N),children:V?V(te,ce):e.jsxs(e.Fragment,{children:[te.icon&&e.jsx("span",{children:te.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:te.label}),te.description&&e.jsx("div",{className:"nice-select__option-desc",children:te.description})]}),ce&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},te.value)})})})():Array.from(we.entries()).map(([r,T])=>e.jsxs(c.Fragment,{children:[r&&e.jsx("div",{className:"nice-select__group-label",children:r}),T.map(q=>{const me=se.includes(q.value),ke=ne.indexOf(q);return e.jsx("div",{role:"option","aria-selected":me,className:`nice-select__option ${me?"nice-select__option--selected":""} ${ke===a?"nice-select__option--highlighted":""} ${q.disabled?"nice-select__option--disabled":""}`,onClick:()=>!q.disabled&&he(String(q.value)),onMouseEnter:()=>v(ke),children:V?V(q,me):e.jsxs(e.Fragment,{children:[q.icon&&e.jsx("span",{children:q.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{children:q.label}),q.description&&e.jsx("div",{className:"nice-select__option-desc",children:q.description})]}),me&&e.jsx("svg",{className:"nice-select__option-check",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]})},q.value)})]},r))]})]}),A&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),le==="right"&&s&&e.jsx("div",{id:`${ae}-error`,className:"nice-field__error",role:"alert",children:s}),le==="right"&&!s&&m&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:m})]}),le!=="right"&&s&&e.jsx("div",{id:`${ae}-error`,className:"nice-field__error",role:"alert",children:s}),le!=="right"&&!s&&m&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:m})]})});Re.displayName="NiceSelect";const De=c.forwardRef(({label:l,checked:m=!1,indeterminate:s=!1,onChange:p,disabled:i,readOnly:n,loading:d,required:y,size:f="md",name:u,id:_,className:S,style:G,error:x,helperText:w,accessMode:E,displayStyle:h,showKeyboardHints:Q,labelPlacement:D,errorPlacement:$,labelWidth:F,controlWidth:g},I)=>{const K=o.Bs(E,_),R=K==="hidden";(K==="disabled"||K==="readOnly")&&(i=!0);const{t:H}=o.$o(),k=o.Ss(_);o.is("toggle",h);const A=c.useMemo(()=>[{key:"Space",description:H("shortcuts.toggle","Toggle")}],[H]),V=c.useCallback(L=>{L&&(L.indeterminate=s),typeof I=="function"?I(L):I&&(I.current=L)},[s,I]);return R?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${f} ${D==="left"?"nice-field--label-left":""} ${$==="right"?"nice-field--error-right":""} ${d?"nice-field--loading":""} ${S||""}`,style:{...G,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...g!=null&&{"--nice-field-control-width":typeof g=="number"?`${g}px`:g}},"aria-busy":d||void 0,children:[D==="left"&&l&&e.jsx("span",{className:`nice-field__label ${y?"nice-field__label--required":""}`,children:l}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-checkbox ${f!=="md"?`nice-checkbox--${f}`:""} ${i||d?"nice-checkbox--disabled":""}`,htmlFor:k,children:[e.jsx("input",{ref:V,id:k,type:"checkbox",className:"nice-checkbox__input",name:u,checked:m,disabled:i||d,readOnly:n,"aria-invalid":!!x,onChange:L=>{n||d||p?.(L.target.checked)}}),e.jsx("span",{className:"nice-checkbox__box",children:e.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s?e.jsx("line",{x1:"2",y1:"6",x2:"10",y2:"6"}):e.jsx("polyline",{points:"2 6 5 9 10 3"})})}),D!=="left"&&l&&e.jsx("span",{children:l}),Q&&e.jsx(o.Or,{shortcuts:A,size:"sm"})]}),d&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),$==="right"&&x&&e.jsx("div",{id:`${k}-error`,className:"nice-field__error",role:"alert",children:x}),$==="right"&&!x&&w&&e.jsx("div",{id:`${k}-helper`,className:"nice-field__helper",children:w})]}),$!=="right"&&x&&e.jsx("div",{id:`${k}-error`,className:"nice-field__error",role:"alert",children:x}),$!=="right"&&!x&&w&&e.jsx("div",{id:`${k}-helper`,className:"nice-field__helper",children:w})]})});De.displayName="NiceCheckbox";const Fe=c.forwardRef(({label:l,checked:m=!1,onChange:s,disabled:p,readOnly:i,loading:n,required:d,size:y="md",name:f,id:u,className:_,style:S,accessMode:G,displayStyle:x,showKeyboardHints:w,error:E,helperText:h,labelPlacement:Q,errorPlacement:D,labelWidth:$,controlWidth:F},g)=>{const I=o.Bs(G,u),K=I==="hidden";(I==="disabled"||I==="readOnly")&&(p=!0);const{t:R}=o.$o(),H=o.Ss(u);o.os("toggle",x);const k=o.is("toggle",x),A=c.useMemo(()=>[{key:"Space",description:R("shortcuts.toggle","Toggle on/off")}],[R]);return K?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${y} ${Q==="left"?"nice-field--label-left":""} ${n?"nice-field--loading":""} ${_||""}`,style:{...S,...$!=null&&{"--nice-field-label-width":typeof $=="number"?`${$}px`:$},...F!=null&&{"--nice-field-control-width":typeof F=="number"?`${F}px`:F}},"aria-busy":n||void 0,children:[Q==="left"&&l&&e.jsx("span",{className:`nice-field__label ${d?"nice-field__label--required":""}`,children:l}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-toggle nice-toggle--ds-${k} ${y!=="md"?`nice-toggle--${y}`:""} ${p||n?"nice-toggle--disabled":""}`,htmlFor:H,children:[e.jsx("input",{ref:g,id:H,type:"checkbox",className:"nice-toggle__input",name:f,checked:m,disabled:p||n,readOnly:i,role:"switch","aria-checked":m,"aria-invalid":!!E,onChange:V=>{i||n||s?.(V.target.checked)}}),e.jsx("span",{className:"nice-toggle__track",children:e.jsx("span",{className:"nice-toggle__thumb"})}),Q!=="left"&&l&&e.jsx("span",{children:l}),w&&e.jsx(o.Or,{shortcuts:A,size:"sm"})]}),n&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),D==="right"&&E&&e.jsx("div",{id:`${H}-error`,className:"nice-field__error",role:"alert",children:E}),D==="right"&&!E&&h&&e.jsx("div",{id:`${H}-helper`,className:"nice-field__helper",children:h})]}),D!=="right"&&E&&e.jsx("div",{id:`${H}-error`,className:"nice-field__error",role:"alert",children:E}),D!=="right"&&!E&&h&&e.jsx("div",{id:`${H}-helper`,className:"nice-field__helper",children:h})]})});Fe.displayName="NiceToggle";const Be=["var(--nice-danger, #ef4444)","var(--nice-warning, #f97316)","var(--nice-warning, #f59e0b)","var(--nice-success, #84cc16)","var(--nice-success, #10b981)","var(--nice-info, #06b6d4)","var(--nice-primary, #3b82f6)","var(--nice-info, #6366f1)","var(--nice-accent, #8b5cf6)","var(--nice-accent-pink, #ec4899)","var(--nice-text-secondary, #64748b)","var(--nice-text, #1e293b)"];function He(){return"#"+Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}function Ae(l,m,s){const p=l/255,i=m/255,n=s/255,d=Math.max(p,i,n),y=Math.min(p,i,n),f=(d+y)/2;let u=0,_=0;if(d!==y){const S=d-y;switch(_=f>.5?S/(2-d-y):S/(d+y),d){case p:u=(i-n)/S+(i<n?6:0);break;case i:u=(n-p)/S+2;break;case n:u=(p-i)/S+4;break}u*=60}return{h:Math.round(u),s:Math.round(_*100),l:Math.round(f*100)}}function Te(l,m,s){const p=m/100,i=s/100,n=(1-Math.abs(2*i-1))*p,d=n*(1-Math.abs(l/60%2-1)),y=i-n/2;let f=0,u=0,_=0;return l<60?[f,u,_]=[n,d,0]:l<120?[f,u,_]=[d,n,0]:l<180?[f,u,_]=[0,n,d]:l<240?[f,u,_]=[0,d,n]:l<300?[f,u,_]=[d,0,n]:[f,u,_]=[n,0,d],{r:Math.round((f+y)*255),g:Math.round((u+y)*255),b:Math.round((_+y)*255)}}function qe(l,m,s){const p=l/255,i=m/255,n=s/255,d=Math.max(p,i,n),y=Math.min(p,i,n),f=d-y;let u=0;f!==0&&(d===p?u=(i-n)/f%6:d===i?u=(n-p)/f+2:u=(p-i)/f+4,u*=60,u<0&&(u+=360));const _=d===0?0:f/d;return{h:Math.round(u),s:Math.round(_*100),v:Math.round(d*100)}}function Ue(l,m,s){const p=m/100,i=s/100,n=i*p,d=n*(1-Math.abs(l/60%2-1)),y=i-n;let f=0,u=0,_=0;return l<60?[f,u,_]=[n,d,0]:l<120?[f,u,_]=[d,n,0]:l<180?[f,u,_]=[0,n,d]:l<240?[f,u,_]=[0,d,n]:l<300?[f,u,_]=[d,0,n]:[f,u,_]=[n,0,d],{r:Math.round((f+y)*255),g:Math.round((u+y)*255),b:Math.round((_+y)*255)}}function Ke(l){const m=/^#?([0-9a-f]{6})$/i.exec(l.trim()),s=/^#?([0-9a-f]{8})$/i.exec(l.trim());if(s){const p=s[1];return{r:parseInt(p.slice(0,2),16),g:parseInt(p.slice(2,4),16),b:parseInt(p.slice(4,6),16),a:parseInt(p.slice(6,8),16)/255}}if(m){const p=parseInt(m[1],16);return{r:p>>16&255,g:p>>8&255,b:p&255,a:1}}return{r:0,g:0,b:0,a:1}}function Ve(l,m,s,p,i){const n=y=>Math.max(0,Math.min(255,Math.round(y))).toString(16).padStart(2,"0"),d=`#${n(l)}${n(m)}${n(s)}`;return i?`${d}${n(p*255)}`:d}const Le=c.forwardRef(({label:l,helperText:m,error:s,required:p,disabled:i,id:n,className:d,style:y,accessMode:f,displayStyle:u,value:_="var(--nice-primary, #3b82f6)",onChange:S,presets:G=Be,showInput:x=!0,showRandom:w=!0,withAlpha:E=!1,showKeyboardHints:h,size:Q="md",labelPlacement:D,errorPlacement:$,labelWidth:F,controlWidth:g,loading:I},K)=>{const R=o.Bs(f,n),H=R==="hidden";(R==="disabled"||R==="readOnly")&&(i=!0);const{t:k}=o.$o(),A=o.Ss(n);o.is("input",u);const V=c.useCallback(()=>{i||S?.(He())},[i,S]),[L,W]=c.useState(!1),[re,le]=c.useState(null),z=c.useRef(null),X=c.useRef(null);c.useLayoutEffect(()=>{if(!L||!X.current)return;const b=()=>{const j=X.current?.getBoundingClientRect();if(!j)return;const Z=280,B=360;let M=j.left,ee=j.bottom+6;M+Z>window.innerWidth-8&&(M=Math.max(8,window.innerWidth-Z-8)),ee+B>window.innerHeight-8&&(ee=Math.max(8,j.top-B-6)),le({left:M,top:ee})};return b(),window.addEventListener("scroll",b,!0),window.addEventListener("resize",b),()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}},[L]),c.useEffect(()=>{if(!L)return;const b=Z=>{const B=Z.target;z.current?.contains(B)||X.current?.contains(B)||W(!1)},j=Z=>{Z.key==="Escape"&&W(!1)};return document.addEventListener("mousedown",b),document.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",b),document.removeEventListener("keydown",j)}},[L]);const de=c.useMemo(()=>[{key:"Enter",description:k("shortcuts.openPicker","Open color picker")},{key:"Arrow keys",description:k("shortcuts.navigatePresets","Navigate presets")}],[k]);return H?null:e.jsxs("div",{className:`nice-field nice-field--${Q} ${D==="left"?"nice-field--label-left":""} ${I?"nice-field--loading":""} ${d||""}`,style:{...y,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...g!=null&&{"--nice-field-control-width":typeof g=="number"?`${g}px`:g}},"aria-busy":I||void 0,children:[l&&e.jsxs("label",{htmlFor:A,className:`nice-field__label ${p?"nice-field__label--required":""}`,children:[l,h&&e.jsx(o.Or,{shortcuts:de,size:"sm"})]}),e.jsx("div",{className:"nice-field__control",children:e.jsxs("div",{className:"nice-color-picker",children:[e.jsxs("div",{className:"nice-color-picker__preview-row",children:[e.jsx("div",{ref:X,className:"nice-color-picker__swatch",id:A,style:{background:_},onClick:b=>{b.stopPropagation(),i||W(j=>!j)},onKeyDown:b=>{!i&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),W(j=>!j))},role:"button",tabIndex:0,"aria-label":k("colorPicker.openPalette","Open color palette"),"aria-haspopup":"dialog","aria-expanded":L,children:e.jsx("input",{ref:b=>{typeof K=="function"?K(b):K&&(K.current=b)},type:"hidden",value:_,disabled:i,readOnly:!0})}),x&&e.jsx("div",{className:"nice-input nice-input--sm",style:{width:100},children:e.jsx("input",{className:"nice-input__native",type:"text",value:_,disabled:i,onChange:b=>S?.(b.target.value),maxLength:7})}),w&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--outline nice-btn--sm nice-color-picker__random",onClick:V,disabled:i,title:k("colorPicker.random","Random"),"aria-label":k("colorPicker.random","Random"),style:{fontSize:"0.65rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:k("colorPicker.random","Random")}),I&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),$==="right"&&s&&e.jsx("div",{id:`${A}-error`,className:"nice-field__error",role:"alert",children:s}),$==="right"&&!s&&m&&e.jsx("div",{id:`${A}-helper`,className:"nice-field__helper",children:m})]}),L&&re&&typeof document<"u"&&Ie.createPortal(e.jsx("div",{ref:z,className:"nice-color-picker__popup nice-color-picker__popup--portal",role:"dialog","aria-label":k("colorPicker.palette","Color palette"),style:{position:"fixed",left:re.left,top:re.top},onClick:b=>b.stopPropagation(),children:(()=>{const b=Ke(_),j={r:b.r,g:b.g,b:b.b},Z=E?b.a:1,B=Ae(j.r,j.g,j.b),M=qe(j.r,j.g,j.b),ee=(a,v,U,C=Z)=>S?.(Ve(a,v,U,C,E)),ae=(a,v,U)=>ee(a,v,U),ue=(a,v,U)=>{const C=Te(a,v,U);ee(C.r,C.g,C.b)},J=(a,v,U)=>{const C=Ue(a,v,U);ee(C.r,C.g,C.b)},Y=a=>ee(j.r,j.g,j.b,a),oe=a=>{if(i)return;const v=a.currentTarget,U=P=>{const O=v.getBoundingClientRect(),xe=Math.max(0,Math.min(O.width,P.clientX-O.left)),ve=Math.max(0,Math.min(O.height,P.clientY-O.top)),pe=Math.round(xe/O.width*100),Ne=100-Math.round(ve/O.height*100);J(M.h,pe,Ne)};U(a);const C=()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",C)};document.addEventListener("pointermove",U),document.addEventListener("pointerup",C)},ie=`hsl(${M.h}, 100%, 50%)`;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-color-picker__popup-header",children:e.jsx("input",{type:"text",className:"nice-input__native nice-color-picker__popup-hex",value:_,disabled:i,onChange:a=>S?.(a.target.value),maxLength:E?9:7,"aria-label":k("colorPicker.hexValue","Hex value")})}),e.jsx("input",{type:"range",min:0,max:360,value:M.h,disabled:i,onChange:a=>J(Number(a.target.value),M.s,M.v),className:"nice-color-picker__hue-slider","aria-label":k("colorPicker.hue","Hue")}),e.jsx("div",{className:"nice-color-picker__sv",style:{background:`linear-gradient(to top, var(--nice-text, #000), transparent), linear-gradient(to right, var(--nice-bg, #FFF), ${ie})`},onPointerDown:oe,role:"application","aria-label":k("colorPicker.svPalette","Saturation/value palette"),children:e.jsx("span",{className:"nice-color-picker__sv-marker",style:{left:`${M.s}%`,top:`${100-M.v}%`}})}),e.jsxs("div",{className:"nice-color-picker__sliders",children:[e.jsx("div",{className:"nice-color-picker__slider-col",children:["h","s","l"].map(a=>{const v=a==="h"?360:100,U=B[a],C=P=>ue(a==="h"?P:B.h,a==="s"?P:B.s,a==="l"?P:B.l);return e.jsxs("div",{className:"nice-color-picker__slider-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:a.toUpperCase()}),e.jsx("input",{type:"range",min:0,max:v,value:U,disabled:i,onChange:P=>C(Number(P.target.value))}),e.jsx("input",{type:"number",min:0,max:v,value:U,disabled:i,onChange:P=>C(Number(P.target.value)||0),className:"nice-input__native nice-color-picker__slider-num"})]},a)})}),e.jsx("div",{className:"nice-color-picker__slider-col",children:["r","g","b"].map(a=>{const v=j[a],U=C=>ae(a==="r"?C:j.r,a==="g"?C:j.g,a==="b"?C:j.b);return e.jsxs("div",{className:"nice-color-picker__slider-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:a.toUpperCase()}),e.jsx("input",{type:"range",min:0,max:255,value:v,disabled:i,onChange:C=>U(Number(C.target.value))}),e.jsx("input",{type:"number",min:0,max:255,value:v,disabled:i,onChange:C=>U(Number(C.target.value)||0),className:"nice-input__native nice-color-picker__slider-num"})]},a)})})]}),E&&e.jsxs("div",{className:"nice-color-picker__alpha-row",children:[e.jsx("label",{className:"nice-color-picker__slider-label",children:"A"}),e.jsx("input",{type:"range",min:0,max:100,value:Math.round(Z*100),disabled:i,onChange:a=>Y(Number(a.target.value)/100),className:"nice-color-picker__alpha-slider",style:{background:`linear-gradient(to right, transparent, rgb(${j.r},${j.g},${j.b}))`},"aria-label":k("colorPicker.alpha","Alpha")}),e.jsx("input",{type:"number",min:0,max:100,value:Math.round(Z*100),disabled:i,onChange:a=>Y((Number(a.target.value)||0)/100),className:"nice-input__native nice-color-picker__slider-num"})]}),G.length>0&&e.jsx("div",{className:"nice-color-picker__popup-presets",children:G.map(a=>e.jsx("div",{className:`nice-color-picker__preset ${_===a?"nice-color-picker__preset--active":""}`,style:{background:a},onClick:()=>{S?.(a),W(!1)},role:"button",tabIndex:0,"aria-label":a,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),S?.(a),W(!1))}},a))})]})})()}),document.body)]})}),$!=="right"&&s&&e.jsx("div",{id:`${A}-error`,className:"nice-field__error",role:"alert",children:s}),$!=="right"&&!s&&m&&e.jsx("div",{id:`${A}-helper`,className:"nice-field__helper",children:m})]})});Le.displayName="NiceColorPicker";const Ee=c.forwardRef(({children:l,variant:m="primary",size:s="md",type:p="button",disabled:i,loading:n,fullWidth:d,onClick:y,leftIcon:f,rightIcon:u,error:_,errorPlacement:S="bottom",className:G,style:x,id:w,accessMode:E,displayStyle:h,...Q},D)=>{const $=o.Bs(E,w),F=$==="hidden";($==="disabled"||$==="readOnly")&&(i=!0);const g=o.os("button",h),I=o.is("button",h),K=m!=="primary"?(({background:k,color:A,...V})=>V)(g):g,R=e.jsxs("button",{ref:D,type:p,id:w,className:`nice-btn nice-btn--${m} nice-btn--${s} nice-btn--ds-${I} ${d?"nice-btn--full-width":""} ${n?"nice-btn--loading":""} ${_&&!S?"nice-btn--has-error":""} ${G||""}`,style:{...K,...x},disabled:i||n,"aria-busy":n||void 0,"aria-disabled":i||n||void 0,onClick:y,...Q,children:[n&&e.jsx("svg",{className:"nice-btn__spinner",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3","aria-hidden":"true",children:e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeLinecap:"round"})}),!n&&f&&e.jsx("span",{"aria-hidden":"true",children:f}),!n&&e.jsx("span",{children:l}),n&&e.jsx("span",{style:{visibility:"hidden"},"aria-hidden":"true",children:l}),!n&&u&&e.jsx("span",{"aria-hidden":"true",children:u})]});if(F)return null;if(!_)return R;const H=e.jsx("div",{className:"nice-field__error",role:"alert",children:_});return S==="right"?e.jsxs("span",{className:`nice-btn-field nice-btn-field--right nice-field--${s}`,style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:"8px",width:"fit-content"},children:[R,H]}):F?null:e.jsxs("span",{className:`nice-btn-field nice-btn-field--bottom nice-field--${s}`,style:{display:"inline-flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",width:"fit-content"},children:[R,H]})});Ee.displayName="NiceButton";const Ze=({tabs:l,activeTab:m,onChange:s,variant:p="default",vertical:i,size:n="md",className:d,style:y,displayStyle:f})=>{const u=o.os("tab",f),_=o.is("tab",f),[S,G]=c.useState(m||l[0]?.id),x=m??S,w=c.useCallback(h=>{G(h),s?.(h)},[s]),E=l.find(h=>h.id===x)?.content;return e.jsxs("div",{className:`nice-tabs nice-tabs--${n} nice-tabs--ds-${_} ${d||""}`,style:{...u,...y,...i?{display:"flex",gap:16}:{}},children:[e.jsx("div",{className:`nice-tabs__list ${p!=="default"?`nice-tabs__list--${p}`:""} ${i?"nice-tabs__list--vertical":""}`,role:"tablist",children:l.map(h=>e.jsxs("button",{type:"button",role:"tab","aria-selected":x===h.id,className:`nice-tabs__tab ${x===h.id?"nice-tabs__tab--active":""} ${h.disabled?"nice-tabs__tab--disabled":""}`,disabled:h.disabled,onClick:()=>w(h.id),children:[h.icon,e.jsx("span",{children:h.label}),h.badge!==void 0&&e.jsx("span",{className:"nice-tabs__badge",children:h.badge})]},h.id))}),E&&e.jsx("div",{className:"nice-tabs__panel",role:"tabpanel",children:E})]})};exports.NiceButton=Ee;exports.NiceCheckbox=De;exports.NiceColorPicker=Le;exports.NiceNumberInput=Se;exports.NiceSelect=Re;exports.NiceTabs=Ze;exports.NiceTextInput=Ce;exports.NiceToggle=Fe;