@nice2dev/ui 1.0.25 → 1.0.26

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 (58) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/NiceErrorBoundary-B91z3IjT.cjs +1 -0
  3. package/dist/NiceErrorBoundary-DQLk-68V.js +770 -0
  4. package/dist/NiceForm-8_p8P0uJ.js +5386 -0
  5. package/dist/NiceForm-DkVFd5Z5.cjs +382 -0
  6. package/dist/NiceModal-CdiLaYTg.cjs +1 -0
  7. package/dist/NiceModal-D6Yj67eH.js +95 -0
  8. package/dist/NiceModuleLifecyclePanel-Bhd8VNjU.js +6856 -0
  9. package/dist/NiceModuleLifecyclePanel-Cn_nB4dg.cjs +1 -0
  10. package/dist/NicePagination-Dnlho_8O.cjs +1 -0
  11. package/dist/NicePagination-kokSP8ls.js +171 -0
  12. package/dist/NicePinCodeInput-1YGb7l2o.cjs +696 -0
  13. package/dist/NicePinCodeInput-CZpYON--.js +13097 -0
  14. package/dist/NiceSavedQueryPanel-C6pPtOAf.js +6893 -0
  15. package/dist/NiceSavedQueryPanel-DOixGvLP.cjs +596 -0
  16. package/dist/NiceTabs-DHiA02RD.cjs +1 -0
  17. package/dist/NiceTabs-MBVJomax.js +1657 -0
  18. package/dist/NiceWindow-DUOkdKuX.js +1592 -0
  19. package/dist/NiceWindow-ZAAUD3LJ.cjs +1 -0
  20. package/dist/charts-B_lYNVMJ.cjs +761 -0
  21. package/dist/charts-CABhvyAA.js +4657 -0
  22. package/dist/charts.cjs +1 -1
  23. package/dist/charts.mjs +1 -1
  24. package/dist/core-BHZDvnBo.js +25364 -0
  25. package/dist/core-C7PK1L9r.cjs +122 -0
  26. package/dist/data-branching-BGw7O52F.js +6133 -0
  27. package/dist/data-branching-Dz3xLUZM.cjs +1 -0
  28. package/dist/data-branching.cjs +1 -1
  29. package/dist/data-branching.mjs +1 -1
  30. package/dist/data.cjs +1 -1
  31. package/dist/data.mjs +1 -1
  32. package/dist/devops-CX538_rA.js +7684 -0
  33. package/dist/devops-JwBTMk0A.cjs +17 -0
  34. package/dist/devops.cjs +1 -1
  35. package/dist/devops.mjs +1 -1
  36. package/dist/editors.cjs +1 -1
  37. package/dist/editors.mjs +3 -3
  38. package/dist/feedback.cjs +1 -1
  39. package/dist/feedback.mjs +2 -2
  40. package/dist/index-CTe-G23X.cjs +5518 -0
  41. package/dist/index-DGjd42Q9.js +68223 -0
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.css +1 -1
  44. package/dist/index.d.ts +75 -0
  45. package/dist/index.mjs +803 -797
  46. package/dist/lazy.cjs +1 -1
  47. package/dist/lazy.mjs +24 -24
  48. package/dist/navigation.cjs +1 -1
  49. package/dist/navigation.d.ts +18 -1
  50. package/dist/navigation.mjs +4 -4
  51. package/dist/no-code-CIf6wiUc.js +7133 -0
  52. package/dist/no-code-DSa5Yn6l.cjs +332 -0
  53. package/dist/no-code.cjs +1 -1
  54. package/dist/no-code.mjs +1 -1
  55. package/dist/overlays.cjs +1 -1
  56. package/dist/overlays.mjs +55 -55
  57. package/dist/style.css +1 -1
  58. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("./core-C7PK1L9r.cjs"),l=require("react"),Ie=require("react-dom"),Ce=l.forwardRef(({label:t,helperText:p,error:s,required:u,disabled:n,readOnly:i,size:d="md",name:$,id:h,className:f,style:_,accessMode:S,displayStyle:K,variant:x,value:w,defaultValue:D,onChange:m,onBlur:O,onKeyDown:E,placeholder:k,type:F="text",maxLength:v,prefix:L,suffix:z,clearable:I,autoFocus:B,submitOnEnter:y,onSubmit:H,showKeyboardHints:Z,labelPlacement:R,errorPlacement:Y,loading:re,labelWidth:le,controlWidth:X,displayMode:P,...de},b)=>{const N=o.pc(S,h),G=N==="hidden";N==="disabled"&&(n=!0),N==="readOnly"&&(i=!0);const{t:T}=o.Zt(),M=o.Gs(h),ee=o.Fs("input",K),ae=o.Hs("input",K),ue=x==="filled"?"filled":x==="underlined"?"underlined":"",J=l.useCallback(()=>m?.(""),[m]),V=o.Bs({enabled:P,readOnly:i,disabled:n}),oe=o.Tc({enabled:y,onSubmit:H}),ie=l.useCallback(g=>{oe(g),E?.(g)},[oe,E]),a=l.useMemo(()=>{const g=[];return y&&g.push({key:"Enter",description:T("shortcuts.submit","Submit")}),I&&g.push({key:"Escape",description:T("shortcuts.clear","Clear")}),g},[y,I,T]);return G?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${R==="left"?"nice-field--label-left":""} ${R==="inside"?"nice-field--label-inside":""} ${re?"nice-field--loading":""} ${f||""}`,style:{..._,...le!=null&&{"--nice-field-label-width":typeof le=="number"?`${le}px`:le},...X!=null&&{"--nice-field-control-width":typeof X=="number"?`${X}px`:X}},"aria-busy":re||void 0,"data-floating":R==="inside"&&w?"true":void 0,children:[t&&R!=="inside"&&e.jsxs("label",{htmlFor:M,className:`nice-field__label ${u?"nice-field__label--required":""}`,children:[t,Z&&a.length>0&&e.jsx(o.ta,{shortcuts:a,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[V.isDisplay?e.jsx(o.Os,{value:w??D??"",placeholder:k,disabled:n,readOnly:i,onActivate:V.enterEdit,ariaLabel:t}):e.jsxs("div",{className:`nice-input nice-input--${d} nice-input--ds-${ue||ae} ${s?"nice-input--error":""} ${n?"nice-input--disabled":""} ${i?"nice-input--readonly":""}`,style:x?void 0:ee,children:[L&&e.jsx("span",{className:"nice-input__icon",children:L}),e.jsx("input",{ref:g=>{typeof b=="function"?b(g):b&&(b.current=g),V.autoFocusRef(g)},id:M,className:"nice-input__native",type:F,name:$,value:w,defaultValue:D,placeholder:k,disabled:n||re,readOnly:i,maxLength:v,autoFocus:B,"aria-invalid":!!s,"aria-describedby":s?`${M}-error`:p?`${M}-helper`:void 0,onChange:g=>m?.(g.target.value),onBlur:g=>{P&&V.exitEdit(),O?.(g)},onKeyDown:ie,...de}),I&&w&&e.jsx("button",{type:"button",className:"nice-input__clear",onClick:J,"aria-label":T("controls.clear","Clear"),children:"✕"}),z&&e.jsx("span",{className:"nice-input__icon",children:z}),t&&R==="inside"&&e.jsx("label",{htmlFor:M,className:`nice-input__floating-label ${u?"nice-input__floating-label--required":""}`,children:t})]}),re&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),Y==="right"&&s&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:s}),Y==="right"&&!s&&p&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:p})]}),Y!=="right"&&s&&e.jsx("div",{id:`${M}-error`,className:"nice-field__error",role:"alert",children:s}),Y!=="right"&&!s&&p&&e.jsx("div",{id:`${M}-helper`,className:"nice-field__helper",children:p})]})});Ce.displayName="NiceTextInput";const He=Object.freeze(Object.defineProperty({__proto__:null,NiceTextInput:Ce},Symbol.toStringTag,{value:"Module"})),Se=l.forwardRef(({label:t,helperText:p,error:s,required:u,disabled:n,readOnly:i,size:d="md",name:$,id:h,className:f,style:_,accessMode:S,displayStyle:K,value:x,onChange:w,onBlur:D,onKeyDown:m,placeholder:O,min:E,max:k,step:F=1,precision:v,prefix:L,prefixType:z="label",prefixOptions:I,prefixValue:B,onPrefixChange:y,suffix:H,showStepper:Z=!0,submitOnEnter:R,onSubmit:Y,showKeyboardHints:re,labelPlacement:le,errorPlacement:X,loading:P,labelWidth:de,controlWidth:b,formatPreset:N,format:G,suffixType:T="label",suffixOptions:M,suffixValue:ee,onSuffixChange:ae,displayMode:ue},J)=>{const V=o.pc(S,h),oe=V==="hidden";V==="disabled"&&(n=!0),V==="readOnly"&&(i=!0);const{t:ie}=o.Zt(),a=o.Gs(h),g=o.Fs("input",K),U=o.Hs("input",K),[C,Q]=l.useState(!1),[W,xe]=l.useState(null),ve=o.Bs({enabled:ue,readOnly:i,disabled:n}),pe=l.useMemo(()=>{let c=3;return k!=null&&(c=String(Math.abs(Math.floor(k))).length),E!=null&&E<0&&(c+=1),v&&(c+=v+1),Math.max(3,c)+1},[k,E,v]),je=l.useCallback(c=>{if(G)return G(c);if(!N)return v!=null?c.toFixed(v):String(c);switch(N){case"integer":return Math.round(c).toLocaleString();case"decimal":return c.toLocaleString(void 0,{minimumFractionDigits:v??2,maximumFractionDigits:v??2});case"money":return c.toLocaleString(void 0,{minimumFractionDigits:v??2,maximumFractionDigits:v??2,useGrouping:!0});case"percent":return(c*100).toLocaleString(void 0,{minimumFractionDigits:v??0,maximumFractionDigits:v??2})+"%";default:return String(c)}},[G,N,v]),ye=l.useMemo(()=>C&&W!==null?W:x==null?"":C?v!=null?x.toFixed(v):String(x):je(x),[x,C,W,je,v]),fe=x!=null&&x<0,se=!!(L||z==="select"&&I&&I.length>0),ne=fe&&se&&!C,we=ne?ye.replace(/^[-−]/,""):ye,he=l.useCallback(c=>{let j=c;return E!==void 0&&(j=Math.max(E,j)),k!==void 0&&(j=Math.min(k,j)),v!==void 0&&(j=parseFloat(j.toFixed(v))),j},[E,k,v]),Me=l.useCallback(c=>{const j=c.target.value;if(xe(j),j===""||j==="-"||j==="."||j==="-."){j===""&&w?.(null);return}const ce=parseFloat(j);if(!isNaN(ce)){let _e=ce;E!==void 0&&(_e=Math.max(E,_e)),k!==void 0&&(_e=Math.min(k,_e)),w?.(_e)}},[w,E,k]),ge=l.useCallback(()=>{const c=be.current,j=he((c??0)+F);be.current=j,w?.(j)},[F,w,he]),$e=l.useCallback(()=>{const c=be.current,j=he((c??0)-F);be.current=j,w?.(j)},[F,w,he]),be=l.useRef(x);be.current=x;const r=l.useRef(null),A=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),q=l.useCallback(c=>{A();let j=300;const ce=()=>{c(),j=Math.max(30,j*.82),r.current=setTimeout(ce,j)};r.current=setTimeout(ce,400)},[A]),me=o.Tc({enabled:R,onSubmit:Y}),ke=l.useCallback(c=>{me(c),c.key==="ArrowUp"?(c.preventDefault(),ge()):c.key==="ArrowDown"&&(c.preventDefault(),$e()),m?.(c)},[me,m,ge,$e]),te=l.useMemo(()=>{const c=[];return R&&c.push(o.Ec.submit),Z&&(c.push({key:"ArrowUp",description:ie("shortcuts.increment","Increase value")}),c.push({key:"ArrowDown",description:ie("shortcuts.decrement","Decrease value")})),c},[R,Z,ie]);return oe?null:e.jsxs("div",{className:`nice-field nice-field--${d} ${le==="left"?"nice-field--label-left":""} ${P?"nice-field--loading":""} ${f||""}`,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":P||void 0,children:[t&&e.jsxs("label",{htmlFor:a,className:`nice-field__label ${u?"nice-field__label--required":""}`,children:[t,re&&te.length>0&&e.jsx(o.ta,{shortcuts:te,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ve.isDisplay?e.jsx(o.Os,{value:x==null?"":L?e.jsxs(e.Fragment,{children:[L,ye]}):ye,placeholder:O,disabled:n,readOnly:i,onActivate:ve.enterEdit,ariaLabel:t}):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":""} ${n?"nice-input--disabled":""} ${i?"nice-input--readonly":""}`,style:g,children:[Z&&!i&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__minus",onClick:$e,onMouseDown:()=>q($e),onMouseUp:A,onMouseLeave:A,disabled:n,"aria-label":ie("controls.decrement","Decrement"),children:"−"}),z==="select"&&I&&I.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:B??I[0]?.value,disabled:n,onChange:c=>{const j=c.target.value,ce=I.find(Ne=>Ne.value===(B??I[0]?.value)),_e=I.find(Ne=>Ne.value===j);y?.(j,ce?.weight,_e?.weight)},children:I.map(c=>e.jsx("option",{value:c.value,children:c.label},c.value))})]}):L?e.jsxs("span",{className:"nice-input__icon nice-input__icon--prefix",children:[ne&&e.jsx("span",{className:"nice-input__sign",children:"−"}),L]}):null,e.jsx("input",{ref:c=>{typeof J=="function"?J(c):J&&(J.current=c),ve.autoFocusRef(c)},id:a,className:"nice-input__native",type:!C&&(G||N)?"text":"number",name:$,value:we,placeholder:O,min:E,max:k,step:F,disabled:n||P,readOnly:i,"aria-invalid":!!s,onChange:Me,onFocus:c=>{Q(!0),xe(null),c.target.select()},onBlur:c=>{if(Q(!1),xe(null),x!=null&&v!==void 0){const j=parseFloat(x.toFixed(v));j!==x&&w?.(j)}ue&&ve.exitEdit(),D?.(c)},onKeyDown:ke,style:{width:`${pe}ch`}}),T==="select"&&M&&M.length>0?e.jsx("select",{className:"nice-input__suffix-select nice-input__icon--suffix",value:ee??M[0]?.value,disabled:n,onChange:c=>{const j=c.target.value,ce=M.find(Ne=>Ne.value===(ee??M[0]?.value)),_e=M.find(Ne=>Ne.value===j);ae?.(j,ce?.weight,_e?.weight)},children:M.map(c=>e.jsx("option",{value:c.value,children:c.label},c.value))}):H?e.jsx("span",{className:"nice-input__icon nice-input__icon--suffix",children:H}):null,Z&&!i&&e.jsx("button",{type:"button",className:"nice-input__clear nice-input__plus",onClick:ge,onMouseDown:()=>q(ge),onMouseUp:A,onMouseLeave:A,disabled:n,"aria-label":ie("controls.increment","Increment"),children:"+"})]})}),P&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),X==="right"&&s&&e.jsx("div",{className:"nice-field__error",role:"alert",children:s}),X==="right"&&!s&&p&&e.jsx("div",{className:"nice-field__helper",children:p})]}),X!=="right"&&s&&e.jsx("div",{className:"nice-field__error",role:"alert",children:s}),X!=="right"&&!s&&p&&e.jsx("div",{className:"nice-field__helper",children:p})]})});Se.displayName="NiceNumberInput";const Te=Object.freeze(Object.defineProperty({__proto__:null,NiceNumberInput:Se},Symbol.toStringTag,{value:"Module"})),Fe=l.forwardRef(({label:t,helperText:p,error:s,required:u,disabled:n,size:i="md",name:d,id:$,className:h,style:f,accessMode:_,displayStyle:S,options:K,value:x,onChange:w,placeholder:D,multiple:m=!1,searchable:O=!1,clearable:E=!1,emptyText:k,maxHeight:F=240,optionsSource:v,valueField:L,labelField:z,virtualScroll:I,optionHeight:B=36,onSearch:y,loading:H,renderOption:Z,multipleAutosize:R=!1,showKeyboardHints:Y,labelPlacement:re,errorPlacement:le,labelWidth:X,controlWidth:P,displayMode:de},b)=>{const N=o.pc(_,$),G=N==="hidden";(N==="disabled"||N==="readOnly")&&(n=!0);const{t:T}=o.Zt(),M=o.Fs("input",S),ee=o.Hs("input",S),ae=o.Gs($),ue=o.Bs({enabled:de,disabled:n}),[J,V]=l.useState(!1),[oe,ie]=l.useState(""),[a,g]=l.useState(-1),[U,C]=l.useState(0),Q=l.useRef(null),W=l.useRef(null),[xe,ve]=l.useState(null);l.useLayoutEffect(()=>{!H&&W.current&&ve(W.current.offsetWidth)},[H,x,S]);const[pe,je]=l.useState(null);l.useLayoutEffect(()=>{m&&!R&&W.current&&pe==null&&je(W.current.offsetWidth)},[m,R,pe]);const ye=o.Nd(v??null,L??v?.keyField??"id",z??"name"),fe=v?ye.options:(K??[]).map(r=>typeof r=="string"?{value:r,label:r}:r);o.Ys(Q,()=>{V(!1),ie("")});const se=l.useMemo(()=>x?Array.isArray(x)?x:[x]:[],[x]),ne=l.useMemo(()=>{if(!oe&&!y||y)return fe;const r=oe.toLowerCase();return fe.filter(A=>A.label.toLowerCase().includes(r)||String(A.value).toLowerCase().includes(r))},[fe,oe,y]),we=l.useMemo(()=>{const r=new Map;for(const A of ne){const q=A.group||"";r.has(q)||r.set(q,[]),r.get(q).push(A)}return r},[ne]),he=l.useCallback(r=>{if(m){const A=se.includes(r)?se.filter(q=>q!==r):[...se,r];w?.(A)}else w?.(r),V(!1),ie("")},[m,se,w]),Me=l.useCallback(r=>{if(r.key==="Escape"){V(!1),ie("");return}if(r.key==="Enter"||r.key===" "){if(!J){V(!0),r.preventDefault();return}a>=0&&ne[a]&&(he(ne[a].value),r.preventDefault());return}r.key==="ArrowDown"&&(r.preventDefault(),g(A=>Math.min(A+1,ne.length-1))),r.key==="ArrowUp"&&(r.preventDefault(),g(A=>Math.max(A-1,0)))},[J,a,ne,he]),ge=l.useMemo(()=>se.length===0?null:m?se.map(r=>fe.find(A=>A.value===r)?.label||r).join(", "):fe.find(r=>r.value===se[0])?.label||se[0],[se,fe,m]),$e=l.useCallback(r=>{r.stopPropagation(),w?.(m?[]:"")},[w,m]),be=l.useMemo(()=>[{key:"Enter",description:T("shortcuts.select","Select")},{key:"Space",description:T("shortcuts.openDropdown","Open dropdown")},o.Ec.moveUp,o.Ec.moveDown,o.Ec.cancel],[T]);return G?null:e.jsxs("div",{className:`nice-field ${P==null?"nice-field--select-auto":""} nice-field--${i} ${re==="left"?"nice-field--label-left":""} ${H?"nice-field--loading":""} ${h||""}`,style:{...f,...X!=null&&{"--nice-field-label-width":typeof X=="number"?`${X}px`:X},...P!=null&&{"--nice-field-control-width":typeof P=="number"?`${P}px`:P},...H&&xe!=null&&{"--nice-select-locked-width":`${xe}px`}},"aria-busy":H||void 0,children:[t&&e.jsxs("label",{htmlFor:ae,className:`nice-field__label ${u?"nice-field__label--required":""}`,children:[t,Y&&e.jsx(o.ta,{shortcuts:be,size:"sm"})]}),e.jsxs("div",{className:"nice-field__control",children:[ue.isDisplay?e.jsx(o.Os,{value:ge,placeholder:D||T("controls.select","Select..."),disabled:n,onActivate:()=>{ue.enterEdit(),V(!0)},ariaLabel:t}):e.jsxs("div",{className:"nice-select",ref:Q,children:[e.jsxs("button",{ref:r=>{W.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--${i} nice-select--ds-${ee} ${J?"nice-select__trigger--open":""} ${s?"nice-select__trigger--error":""} ${n?"nice-select__trigger--disabled":""}`,style:{...M,...m&&!R&&pe!=null?{width:pe,maxWidth:pe,overflow:"hidden"}:{}},disabled:n,onClick:()=>V(!J),onKeyDown:Me,children:[ge?e.jsx("span",{style:m&&!R?{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:void 0,children:ge}):e.jsx("span",{className:"nice-select__placeholder",children:D||T("controls.select","Select...")}),e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[E&&se.length>0&&e.jsx("span",{className:"nice-input__clear",onClick:$e,role:"button","aria-label":T("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:I?r=>C(r.currentTarget.scrollTop):void 0,children:[(O||y)&&e.jsx("div",{className:"nice-select__search",children:e.jsx("input",{type:"text",value:oe,onChange:r=>{ie(r.target.value),g(0),y?.(r.target.value)},placeholder:T("controls.search","Search..."),autoFocus:!0})}),H&&e.jsx("div",{className:"nice-select__loading",children:e.jsx("div",{className:"nice-spinner nice-spinner--sm",style:{margin:"8px auto"}})}),!H&&ne.length===0?e.jsx("div",{className:"nice-select__empty",children:k||T("controls.noResults","No results found")}):I&&!Array.from(we.keys()).some(r=>r!=="")?(()=>{const A=ne.length*B,q=Math.max(0,Math.floor(U/B)-3),me=Math.min(ne.length,Math.ceil((U+F)/B)+3),ke=ne.slice(q,me);return e.jsx("div",{style:{height:A,position:"relative"},children:ke.map((te,c)=>{const j=q+c,ce=se.includes(te.value);return e.jsx("div",{role:"option","aria-selected":ce,className:`nice-select__option ${ce?"nice-select__option--selected":""} ${j===a?"nice-select__option--highlighted":""} ${te.disabled?"nice-select__option--disabled":""}`,style:{position:"absolute",top:j*B,left:0,right:0,height:B,display:"flex",alignItems:"center",padding:"0 12px"},onClick:()=>!te.disabled&&he(String(te.value)),onMouseEnter:()=>g(j),children:Z?Z(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,A])=>e.jsxs(l.Fragment,{children:[r&&e.jsx("div",{className:"nice-select__group-label",children:r}),A.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:()=>g(ke),children:Z?Z(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))]})]}),H&&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&&p&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:p})]}),le!=="right"&&s&&e.jsx("div",{id:`${ae}-error`,className:"nice-field__error",role:"alert",children:s}),le!=="right"&&!s&&p&&e.jsx("div",{id:`${ae}-helper`,className:"nice-field__helper",children:p})]})});Fe.displayName="NiceSelect";const Be=Object.freeze(Object.defineProperty({__proto__:null,NiceSelect:Fe},Symbol.toStringTag,{value:"Module"})),Re=l.forwardRef(({label:t,checked:p=!1,indeterminate:s=!1,onChange:u,disabled:n,readOnly:i,loading:d,required:$,size:h="md",name:f,id:_,className:S,style:K,error:x,helperText:w,accessMode:D,displayStyle:m,showKeyboardHints:O,labelPlacement:E,errorPlacement:k,labelWidth:F,controlWidth:v},L)=>{const z=o.pc(D,_),I=z==="hidden";(z==="disabled"||z==="readOnly")&&(n=!0);const{t:B}=o.Zt(),y=o.Gs(_);o.Hs("toggle",m);const H=l.useMemo(()=>[{key:"Space",description:B("shortcuts.toggle","Toggle")}],[B]),Z=l.useCallback(R=>{R&&(R.indeterminate=s),typeof L=="function"?L(R):L&&(L.current=R)},[s,L]);return I?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${h} ${E==="left"?"nice-field--label-left":""} ${k==="right"?"nice-field--error-right":""} ${d?"nice-field--loading":""} ${S||""}`,style:{...K,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...v!=null&&{"--nice-field-control-width":typeof v=="number"?`${v}px`:v}},"aria-busy":d||void 0,children:[E==="left"&&t&&e.jsx("span",{className:`nice-field__label ${$?"nice-field__label--required":""}`,children:t}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-checkbox ${h!=="md"?`nice-checkbox--${h}`:""} ${n||d?"nice-checkbox--disabled":""}`,htmlFor:y,children:[e.jsx("input",{ref:Z,id:y,type:"checkbox",className:"nice-checkbox__input",name:f,checked:p,disabled:n||d,readOnly:i,"aria-invalid":!!x,onChange:R=>{i||d||u?.(R.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"})})}),E!=="left"&&t&&e.jsx("span",{children:t}),O&&e.jsx(o.ta,{shortcuts:H,size:"sm"})]}),d&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),k==="right"&&x&&e.jsx("div",{id:`${y}-error`,className:"nice-field__error",role:"alert",children:x}),k==="right"&&!x&&w&&e.jsx("div",{id:`${y}-helper`,className:"nice-field__helper",children:w})]}),k!=="right"&&x&&e.jsx("div",{id:`${y}-error`,className:"nice-field__error",role:"alert",children:x}),k!=="right"&&!x&&w&&e.jsx("div",{id:`${y}-helper`,className:"nice-field__helper",children:w})]})});Re.displayName="NiceCheckbox";const Ae=Object.freeze(Object.defineProperty({__proto__:null,NiceCheckbox:Re},Symbol.toStringTag,{value:"Module"})),De=l.forwardRef(({label:t,checked:p=!1,onChange:s,disabled:u,readOnly:n,loading:i,required:d,size:$="md",name:h,id:f,className:_,style:S,accessMode:K,displayStyle:x,showKeyboardHints:w,error:D,helperText:m,labelPlacement:O,errorPlacement:E,labelWidth:k,controlWidth:F},v)=>{const L=o.pc(K,f),z=L==="hidden";(L==="disabled"||L==="readOnly")&&(u=!0);const{t:I}=o.Zt(),B=o.Gs(f);o.Fs("toggle",x);const y=o.Hs("toggle",x),H=l.useMemo(()=>[{key:"Space",description:I("shortcuts.toggle","Toggle on/off")}],[I]);return z?null:e.jsxs("div",{className:`nice-field nice-field--inline nice-field--${$} ${O==="left"?"nice-field--label-left":""} ${i?"nice-field--loading":""} ${_||""}`,style:{...S,...k!=null&&{"--nice-field-label-width":typeof k=="number"?`${k}px`:k},...F!=null&&{"--nice-field-control-width":typeof F=="number"?`${F}px`:F}},"aria-busy":i||void 0,children:[O==="left"&&t&&e.jsx("span",{className:`nice-field__label ${d?"nice-field__label--required":""}`,children:t}),e.jsxs("div",{className:"nice-field__control",children:[e.jsxs("label",{className:`nice-toggle nice-toggle--ds-${y} ${$!=="md"?`nice-toggle--${$}`:""} ${u||i?"nice-toggle--disabled":""}`,htmlFor:B,children:[e.jsx("input",{ref:v,id:B,type:"checkbox",className:"nice-toggle__input",name:h,checked:p,disabled:u||i,readOnly:n,role:"switch","aria-checked":p,"aria-invalid":!!D,onChange:Z=>{n||i||s?.(Z.target.checked)}}),e.jsx("span",{className:"nice-toggle__track",children:e.jsx("span",{className:"nice-toggle__thumb"})}),O!=="left"&&t&&e.jsx("span",{children:t}),w&&e.jsx(o.ta,{shortcuts:H,size:"sm"})]}),i&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),E==="right"&&D&&e.jsx("div",{id:`${B}-error`,className:"nice-field__error",role:"alert",children:D}),E==="right"&&!D&&m&&e.jsx("div",{id:`${B}-helper`,className:"nice-field__helper",children:m})]}),E!=="right"&&D&&e.jsx("div",{id:`${B}-error`,className:"nice-field__error",role:"alert",children:D}),E!=="right"&&!D&&m&&e.jsx("div",{id:`${B}-helper`,className:"nice-field__helper",children:m})]})});De.displayName="NiceToggle";const qe=["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 Ue(){return"#"+Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}function ze(t){const p=/^#?([0-9a-f]{6})$/i.exec(t.trim());if(!p)return{r:0,g:0,b:0};const s=parseInt(p[1],16);return{r:s>>16&255,g:s>>8&255,b:s&255}}function Ge(t,p,s){const u=n=>Math.max(0,Math.min(255,Math.round(n))).toString(16).padStart(2,"0");return`#${u(t)}${u(p)}${u(s)}`}function Ke(t,p,s){const u=t/255,n=p/255,i=s/255,d=Math.max(u,n,i),$=Math.min(u,n,i),h=(d+$)/2;let f=0,_=0;if(d!==$){const S=d-$;switch(_=h>.5?S/(2-d-$):S/(d+$),d){case u:f=(n-i)/S+(n<i?6:0);break;case n:f=(i-u)/S+2;break;case i:f=(u-n)/S+4;break}f*=60}return{h:Math.round(f),s:Math.round(_*100),l:Math.round(h*100)}}function Ze(t,p,s){const u=p/100,n=s/100,i=(1-Math.abs(2*n-1))*u,d=i*(1-Math.abs(t/60%2-1)),$=n-i/2;let h=0,f=0,_=0;return t<60?[h,f,_]=[i,d,0]:t<120?[h,f,_]=[d,i,0]:t<180?[h,f,_]=[0,i,d]:t<240?[h,f,_]=[0,d,i]:t<300?[h,f,_]=[d,0,i]:[h,f,_]=[i,0,d],{r:Math.round((h+$)*255),g:Math.round((f+$)*255),b:Math.round((_+$)*255)}}function Pe(t,p,s){const u=t/255,n=p/255,i=s/255,d=Math.max(u,n,i),$=Math.min(u,n,i),h=d-$;let f=0;h!==0&&(d===u?f=(n-i)/h%6:d===n?f=(i-u)/h+2:f=(u-n)/h+4,f*=60,f<0&&(f+=360));const _=d===0?0:h/d;return{h:Math.round(f),s:Math.round(_*100),v:Math.round(d*100)}}function Ve(t,p,s){const u=p/100,n=s/100,i=n*u,d=i*(1-Math.abs(t/60%2-1)),$=n-i;let h=0,f=0,_=0;return t<60?[h,f,_]=[i,d,0]:t<120?[h,f,_]=[d,i,0]:t<180?[h,f,_]=[0,i,d]:t<240?[h,f,_]=[0,d,i]:t<300?[h,f,_]=[d,0,i]:[h,f,_]=[i,0,d],{r:Math.round((h+$)*255),g:Math.round((f+$)*255),b:Math.round((_+$)*255)}}function Ye(t){const p=/^#?([0-9a-f]{6})$/i.exec(t.trim()),s=/^#?([0-9a-f]{8})$/i.exec(t.trim());if(s){const u=s[1];return{r:parseInt(u.slice(0,2),16),g:parseInt(u.slice(2,4),16),b:parseInt(u.slice(4,6),16),a:parseInt(u.slice(6,8),16)/255}}if(p){const u=parseInt(p[1],16);return{r:u>>16&255,g:u>>8&255,b:u&255,a:1}}return{r:0,g:0,b:0,a:1}}function Xe(t,p,s,u,n){const i=$=>Math.max(0,Math.min(255,Math.round($))).toString(16).padStart(2,"0"),d=`#${i(t)}${i(p)}${i(s)}`;return n?`${d}${i(u*255)}`:d}const Ee=l.forwardRef(({label:t,helperText:p,error:s,required:u,disabled:n,id:i,className:d,style:$,accessMode:h,displayStyle:f,value:_="var(--nice-primary, #3b82f6)",onChange:S,presets:K=qe,showInput:x=!0,showRandom:w=!0,withAlpha:D=!1,showKeyboardHints:m,size:O="md",labelPlacement:E,errorPlacement:k,labelWidth:F,controlWidth:v,loading:L},z)=>{const I=o.pc(h,i),B=I==="hidden";(I==="disabled"||I==="readOnly")&&(n=!0);const{t:y}=o.Zt(),H=o.Gs(i);o.Hs("input",f);const Z=l.useCallback(()=>{n||S?.(Ue())},[n,S]),[R,Y]=l.useState(!1),[re,le]=l.useState(null),X=l.useRef(null),P=l.useRef(null);l.useLayoutEffect(()=>{if(!R||!P.current)return;const b=()=>{const N=P.current?.getBoundingClientRect();if(!N)return;const G=280,T=360;let M=N.left,ee=N.bottom+6;M+G>window.innerWidth-8&&(M=Math.max(8,window.innerWidth-G-8)),ee+T>window.innerHeight-8&&(ee=Math.max(8,N.top-T-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)}},[R]),l.useEffect(()=>{if(!R)return;const b=G=>{const T=G.target;X.current?.contains(T)||P.current?.contains(T)||Y(!1)},N=G=>{G.key==="Escape"&&Y(!1)};return document.addEventListener("mousedown",b),document.addEventListener("keydown",N),()=>{document.removeEventListener("mousedown",b),document.removeEventListener("keydown",N)}},[R]);const de=l.useMemo(()=>[{key:"Enter",description:y("shortcuts.openPicker","Open color picker")},{key:"Arrow keys",description:y("shortcuts.navigatePresets","Navigate presets")}],[y]);return B?null:e.jsxs("div",{className:`nice-field nice-field--${O} ${E==="left"?"nice-field--label-left":""} ${L?"nice-field--loading":""} ${d||""}`,style:{...$,...F!=null&&{"--nice-field-label-width":typeof F=="number"?`${F}px`:F},...v!=null&&{"--nice-field-control-width":typeof v=="number"?`${v}px`:v}},"aria-busy":L||void 0,children:[t&&e.jsxs("label",{htmlFor:H,className:`nice-field__label ${u?"nice-field__label--required":""}`,children:[t,m&&e.jsx(o.ta,{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:P,className:"nice-color-picker__swatch",id:H,style:{background:_},onClick:b=>{b.stopPropagation(),n||Y(N=>!N)},onKeyDown:b=>{!n&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),Y(N=>!N))},role:"button",tabIndex:0,"aria-label":y("colorPicker.openPalette","Open color palette"),"aria-haspopup":"dialog","aria-expanded":R,children:e.jsx("input",{ref:b=>{typeof z=="function"?z(b):z&&(z.current=b)},type:"hidden",value:_,disabled:n,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:n,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:Z,disabled:n,title:y("colorPicker.random","Random"),"aria-label":y("colorPicker.random","Random"),style:{fontSize:"0.65rem",textTransform:"uppercase",letterSpacing:"0.05em"},children:y("colorPicker.random","Random")}),L&&e.jsx("span",{className:"nice-field__spinner",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),k==="right"&&s&&e.jsx("div",{id:`${H}-error`,className:"nice-field__error",role:"alert",children:s}),k==="right"&&!s&&p&&e.jsx("div",{id:`${H}-helper`,className:"nice-field__helper",children:p})]}),R&&re&&typeof document<"u"&&Ie.createPortal(e.jsx("div",{ref:X,className:"nice-color-picker__popup nice-color-picker__popup--portal",role:"dialog","aria-label":y("colorPicker.palette","Color palette"),style:{position:"fixed",left:re.left,top:re.top},onClick:b=>b.stopPropagation(),children:(()=>{const b=Ye(_),N={r:b.r,g:b.g,b:b.b},G=D?b.a:1,T=Ke(N.r,N.g,N.b),M=Pe(N.r,N.g,N.b),ee=(a,g,U,C=G)=>S?.(Xe(a,g,U,C,D)),ae=(a,g,U)=>ee(a,g,U),ue=(a,g,U)=>{const C=Ze(a,g,U);ee(C.r,C.g,C.b)},J=(a,g,U)=>{const C=Ve(a,g,U);ee(C.r,C.g,C.b)},V=a=>ee(N.r,N.g,N.b,a),oe=a=>{if(n)return;const g=a.currentTarget,U=Q=>{const W=g.getBoundingClientRect(),xe=Math.max(0,Math.min(W.width,Q.clientX-W.left)),ve=Math.max(0,Math.min(W.height,Q.clientY-W.top)),pe=Math.round(xe/W.width*100),je=100-Math.round(ve/W.height*100);J(M.h,pe,je)};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:n,onChange:a=>S?.(a.target.value),maxLength:D?9:7,"aria-label":y("colorPicker.hexValue","Hex value")})}),e.jsx("input",{type:"range",min:0,max:360,value:M.h,disabled:n,onChange:a=>J(Number(a.target.value),M.s,M.v),className:"nice-color-picker__hue-slider","aria-label":y("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":y("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 g=a==="h"?360:100,U=T[a],C=Q=>ue(a==="h"?Q:T.h,a==="s"?Q:T.s,a==="l"?Q:T.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:g,value:U,disabled:n,onChange:Q=>C(Number(Q.target.value))}),e.jsx("input",{type:"number",min:0,max:g,value:U,disabled:n,onChange:Q=>C(Number(Q.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 g=N[a],U=C=>ae(a==="r"?C:N.r,a==="g"?C:N.g,a==="b"?C:N.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:g,disabled:n,onChange:C=>U(Number(C.target.value))}),e.jsx("input",{type:"number",min:0,max:255,value:g,disabled:n,onChange:C=>U(Number(C.target.value)||0),className:"nice-input__native nice-color-picker__slider-num"})]},a)})})]}),D&&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(G*100),disabled:n,onChange:a=>V(Number(a.target.value)/100),className:"nice-color-picker__alpha-slider",style:{background:`linear-gradient(to right, transparent, rgb(${N.r},${N.g},${N.b}))`},"aria-label":y("colorPicker.alpha","Alpha")}),e.jsx("input",{type:"number",min:0,max:100,value:Math.round(G*100),disabled:n,onChange:a=>V((Number(a.target.value)||0)/100),className:"nice-input__native nice-color-picker__slider-num"})]}),K.length>0&&e.jsx("div",{className:"nice-color-picker__popup-presets",children:K.map(a=>e.jsx("div",{className:`nice-color-picker__preset ${_===a?"nice-color-picker__preset--active":""}`,style:{background:a},onClick:()=>{S?.(a),Y(!1)},role:"button",tabIndex:0,"aria-label":a,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),S?.(a),Y(!1))}},a))})]})})()}),document.body)]})}),k!=="right"&&s&&e.jsx("div",{id:`${H}-error`,className:"nice-field__error",role:"alert",children:s}),k!=="right"&&!s&&p&&e.jsx("div",{id:`${H}-helper`,className:"nice-field__helper",children:p})]})});Ee.displayName="NiceColorPicker";const Je=Object.freeze(Object.defineProperty({__proto__:null,NiceColorPicker:Ee,hexToRgb:ze,rgbToHex:Ge},Symbol.toStringTag,{value:"Module"})),Le=l.forwardRef(({children:t,variant:p="primary",size:s="md",type:u="button",disabled:n,loading:i,fullWidth:d,onClick:$,leftIcon:h,rightIcon:f,error:_,errorPlacement:S="bottom",className:K,style:x,id:w,accessMode:D,displayStyle:m,...O},E)=>{const k=o.Ls(p),F=o.Es(s),v=o.pc(D,w),L=v==="hidden";(v==="disabled"||v==="readOnly")&&(n=!0);const z=o.Fs("button",m),I=o.Hs("button",m),B=k!=="primary"?(({background:Z,color:R,...Y})=>Y)(z):z,y=e.jsxs("button",{ref:E,type:u,id:w,className:`nice-btn nice-btn--${k} nice-btn--${F} nice-btn--ds-${I} ${d?"nice-btn--full-width":""} ${i?"nice-btn--loading":""} ${_&&!S?"nice-btn--has-error":""} ${K||""}`,style:{...B,...x},disabled:n||i,"aria-busy":i||void 0,"aria-disabled":n||i||void 0,onClick:$,...O,children:[i&&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"})}),!i&&h&&e.jsx("span",{"aria-hidden":"true",children:h}),!i&&e.jsx("span",{children:t}),i&&e.jsx("span",{style:{visibility:"hidden"},"aria-hidden":"true",children:t}),!i&&f&&e.jsx("span",{"aria-hidden":"true",children:f})]});if(L)return null;if(!_)return y;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--${F}`,style:{display:"inline-flex",flexDirection:"row",alignItems:"center",gap:"8px",width:"fit-content"},children:[y,H]}):L?null:e.jsxs("span",{className:`nice-btn-field nice-btn-field--bottom nice-field--${F}`,style:{display:"inline-flex",flexDirection:"column",alignItems:"flex-start",gap:"4px",width:"fit-content"},children:[y,H]})});Le.displayName="NiceButton";const Oe=({tabs:t,activeTab:p,onChange:s,variant:u="default",vertical:n,size:i="md",className:d,style:$,displayStyle:h})=>{const f=o.Fs("tab",h),_=o.Hs("tab",h),[S,K]=l.useState(p||t[0]?.id),x=p??S,w=l.useCallback(m=>{K(m),s?.(m)},[s]),D=t.find(m=>m.id===x)?.content;return e.jsxs("div",{className:`nice-tabs nice-tabs--${i} nice-tabs--ds-${_} ${d||""}`,style:{...f,...$,...n?{display:"flex",gap:16}:{}},children:[e.jsx("div",{className:`nice-tabs__list ${u!=="default"?`nice-tabs__list--${u}`:""} ${n?"nice-tabs__list--vertical":""}`,role:"tablist",children:t.map(m=>e.jsxs("button",{type:"button",role:"tab","aria-selected":x===m.id,className:`nice-tabs__tab ${x===m.id?"nice-tabs__tab--active":""} ${m.disabled?"nice-tabs__tab--disabled":""}`,disabled:m.disabled,onClick:()=>w(m.id),children:[m.icon,e.jsx("span",{children:m.label}),m.badge!==void 0&&e.jsx("span",{className:"nice-tabs__badge",children:m.badge})]},m.id))}),D&&e.jsx("div",{className:"nice-tabs__panel",role:"tabpanel",children:D})]})};exports.NiceButton=Le;exports.NiceCheckbox=Re;exports.NiceCheckbox$1=Ae;exports.NiceColorPicker=Ee;exports.NiceColorPicker$1=Je;exports.NiceNumberInput=Se;exports.NiceNumberInput$1=Te;exports.NiceSelect=Fe;exports.NiceSelect$1=Be;exports.NiceTabs=Oe;exports.NiceTextInput=Ce;exports.NiceTextInput$1=He;exports.NiceToggle=De;