@nice2dev/ui 1.0.17 → 1.0.18
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.
- package/CHANGELOG.md +252 -0
- package/dist/NiceAlertDialog.doc-BST0-aVs.cjs +14 -0
- package/dist/NiceAlertDialog.doc-GRpJU_5Y.js +38 -0
- package/dist/NiceAnimatePresence.doc-BrttRpeS.js +36 -0
- package/dist/NiceAnimatePresence.doc-IdEWrSnT.cjs +12 -0
- package/dist/NiceCalendarScheduler.doc-Cc-DFMhR.js +33 -0
- package/dist/NiceCalendarScheduler.doc-TPe0kRBN.cjs +9 -0
- package/dist/NiceCameraFeed.doc-BJl0gdWv.js +31 -0
- package/dist/NiceCameraFeed.doc-Bt4eZ8MH.cjs +7 -0
- package/dist/NiceChip.doc-Bccf4IQe.cjs +7 -0
- package/dist/NiceChip.doc-DEsqjL7z.js +31 -0
- package/dist/NiceCombobox.doc-8hMzrsdM.js +34 -0
- package/dist/NiceCombobox.doc-C5IPnVuz.cjs +10 -0
- package/dist/NiceConfigProvider.doc-CKIudO44.js +32 -0
- package/dist/NiceConfigProvider.doc-bMLQj3Zx.cjs +8 -0
- package/dist/NiceCronEditor.doc-BThdELxx.js +31 -0
- package/dist/NiceCronEditor.doc-w_TbOWFo.cjs +7 -0
- package/dist/NiceDataList.doc-DHXrpTPT.cjs +9 -0
- package/dist/NiceDataList.doc-R8SchHqZ.js +33 -0
- package/dist/NiceDiagram.doc-CASS0Tnj.cjs +8 -0
- package/dist/NiceDiagram.doc-DGX-Hwhg.js +32 -0
- package/dist/NiceDocPage.doc-BVBe27kj.cjs +1 -0
- package/dist/NiceDocPage.doc-CDcL3Sqt.js +25 -0
- package/dist/NiceDrawingCanvas.doc-DYYFKKMW.js +32 -0
- package/dist/NiceDrawingCanvas.doc-wa684gbC.cjs +8 -0
- package/dist/NiceDropdown.doc-D2NS9hBT.js +35 -0
- package/dist/NiceDropdown.doc-dAgER8da.cjs +11 -0
- package/dist/NiceDropzone.doc-CVVNc9SE.cjs +9 -0
- package/dist/NiceDropzone.doc-aeajYWqU.js +33 -0
- package/dist/NiceEnergyMonitor.doc-BBnVKuwf.js +32 -0
- package/dist/NiceEnergyMonitor.doc-lf6CCIYi.cjs +8 -0
- package/dist/NiceErrorBoundary-COY0cEsF.js +762 -0
- package/dist/NiceErrorBoundary-CR-_ZScD.cjs +1 -0
- package/dist/NiceExpressionBuilder.doc-CTjqEcZR.cjs +8 -0
- package/dist/NiceExpressionBuilder.doc-Cu_ORFhd.js +32 -0
- package/dist/NiceFileExplorer.doc-B0aN041v.js +32 -0
- package/dist/NiceFileExplorer.doc-DNHYQF_t.cjs +8 -0
- package/dist/NiceFloatingActionButton.doc-BOlJwq4S.cjs +7 -0
- package/dist/NiceFloatingActionButton.doc-oYnwvMP9.js +31 -0
- package/dist/NiceFontPicker.doc-B10vOqeF.cjs +8 -0
- package/dist/NiceFontPicker.doc-DuPp0cDP.js +32 -0
- package/dist/NiceForm-COk1rNVa.js +5357 -0
- package/dist/NiceForm-CU8Dldq-.cjs +382 -0
- package/dist/NiceGestureHandler.doc-9GGvVnM5.cjs +8 -0
- package/dist/NiceGestureHandler.doc-BduQU3SA.js +32 -0
- package/dist/NiceHeader.doc-Cxoy_f_k.cjs +6 -0
- package/dist/NiceHeader.doc-DjAVl-T4.js +30 -0
- package/dist/NiceImage.doc-COy4iVy1.js +34 -0
- package/dist/NiceImage.doc-CvnaTRj8.cjs +10 -0
- package/dist/NiceInPlaceEditor.doc-8nC6Kqvn.cjs +1 -0
- package/dist/NiceInPlaceEditor.doc-gF1XPyu5.js +25 -0
- package/dist/NiceInteractiveTimeline.doc-BTeASFR4.js +50 -0
- package/dist/NiceInteractiveTimeline.doc-WMOVQhMe.cjs +11 -0
- package/dist/NiceJsonEditor.doc-BpVa-AlY.js +31 -0
- package/dist/NiceJsonEditor.doc-DeyoVDQw.cjs +7 -0
- package/dist/NiceMegaMenu.doc-CO34gN43.cjs +7 -0
- package/dist/NiceMegaMenu.doc-DpchTBL6.js +31 -0
- package/dist/NiceMentionInput.doc-O0W58Unu.js +32 -0
- package/dist/NiceMentionInput.doc-ZSPjBsZc.cjs +8 -0
- package/dist/NiceModal-CIITx65V.cjs +1 -0
- package/dist/NiceModal-CN23FZsc.js +95 -0
- package/dist/NiceModuleLifecyclePanel-BDnsr5ZW.js +6349 -0
- package/dist/NiceModuleLifecyclePanel-F1uN0gMh.cjs +1 -0
- package/dist/NiceMotion.doc-COF5BldG.cjs +9 -0
- package/dist/NiceMotion.doc-utheTBgM.js +33 -0
- package/dist/NiceMultiColumnComboBox.doc-Ben0Q0J0.cjs +1 -0
- package/dist/NiceMultiColumnComboBox.doc-CK1DppZI.js +25 -0
- package/dist/NiceNotificationList.doc-CBWusjJX.cjs +7 -0
- package/dist/NiceNotificationList.doc-D7lQIxK0.js +31 -0
- package/dist/NiceOfflineSync.doc-BLQFyOf2.cjs +8 -0
- package/dist/NiceOfflineSync.doc-CKWFmR3b.js +32 -0
- package/dist/NicePagination-B4U0LwZy.js +171 -0
- package/dist/NicePagination-CGQf54a9.cjs +1 -0
- package/dist/NicePinCodeInput-DG_-eXXJ.cjs +419 -0
- package/dist/NicePinCodeInput-g-yUiepm.js +11875 -0
- package/dist/NicePreview.doc-Cl7_5MVR.js +30 -0
- package/dist/NicePreview.doc-atKISvmp.cjs +6 -0
- package/dist/NicePropertyGrid.doc-D6xljYe1.cjs +7 -0
- package/dist/NicePropertyGrid.doc-nX2etusg.js +31 -0
- package/dist/NiceRadio.doc-BTURz62X.js +27 -0
- package/dist/NiceRadio.doc-Cc8-1vbn.cjs +3 -0
- package/dist/NiceRecurrencePicker.doc-78HjPJm0.js +31 -0
- package/dist/NiceRecurrencePicker.doc-vC2YmCXF.cjs +7 -0
- package/dist/NiceRichTextEditor.doc-ClPCkzCd.cjs +6 -0
- package/dist/NiceRichTextEditor.doc-CtmV9UvX.js +30 -0
- package/dist/NiceSavedQueryPanel-CE3QR4RY.js +6446 -0
- package/dist/NiceSavedQueryPanel-DSnj-3Es.cjs +596 -0
- package/dist/NiceSceneSelector.doc-CY2OmaWQ.cjs +7 -0
- package/dist/NiceSceneSelector.doc-UsVgDrw1.js +31 -0
- package/dist/NiceScrollArea.doc-C6Y-odUa.js +27 -0
- package/dist/NiceScrollArea.doc-LdxDrGDY.cjs +3 -0
- package/dist/NiceSheet.doc-CsIu3Y1G.cjs +11 -0
- package/dist/NiceSheet.doc-DLfSY-MA.js +35 -0
- package/dist/NiceSpeedDial.doc-CSWvNR9n.cjs +7 -0
- package/dist/NiceSpeedDial.doc-DqnpBcMy.js +31 -0
- package/dist/NiceSplitPane.doc-Ck_FvdL6.cjs +9 -0
- package/dist/NiceSplitPane.doc-Di68JZuy.js +33 -0
- package/dist/NiceSpotlight.doc-CM4PnsHE.js +34 -0
- package/dist/NiceSpotlight.doc-Dm_B-kUJ.cjs +10 -0
- package/dist/NiceStepNavigation.doc-DXraCs7t.js +31 -0
- package/dist/NiceStepNavigation.doc-TSy2dWmf.cjs +7 -0
- package/dist/NiceSteps.doc-C_mkhnez.cjs +10 -0
- package/dist/NiceSteps.doc-PW1zubHM.js +34 -0
- package/dist/NiceSwitch.doc-CLc7OxrE.cjs +6 -0
- package/dist/NiceSwitch.doc-dGMMY4es.js +30 -0
- package/dist/NiceTabs-32xjguOv.cjs +1 -0
- package/dist/NiceTabs-Blk0h4jY.js +1624 -0
- package/dist/NiceTransition.doc-BmImVoB8.js +35 -0
- package/dist/NiceTransition.doc-GA1N91ON.cjs +11 -0
- package/dist/NiceTree.doc-D7SCXljC.js +40 -0
- package/dist/NiceTree.doc-DZx3hUwY.cjs +16 -0
- package/dist/NiceUnitConverter.doc-DmiyYOH_.cjs +10 -0
- package/dist/NiceUnitConverter.doc-YnzD3uKT.js +34 -0
- package/dist/NiceVirtualGrid.doc-DI2c9ckY.js +35 -0
- package/dist/NiceVirtualGrid.doc-rtwudxTG.cjs +11 -0
- package/dist/NiceVirtualList.doc-BpoTiXoV.js +31 -0
- package/dist/NiceVirtualList.doc-C8q-Hfl0.cjs +7 -0
- package/dist/NiceWindow-B4jA_-hi.js +1409 -0
- package/dist/NiceWindow-UpKllge7.cjs +1 -0
- package/dist/charts-0BEMJ0Xt.js +4657 -0
- package/dist/charts-CbxmU6Z2.cjs +761 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +19 -19
- package/dist/charts.mjs +1 -1
- package/dist/core-BIA5_uSq.js +22316 -0
- package/dist/core-DQYnL6uf.cjs +96 -0
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.mjs +3 -3
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +10 -10
- package/dist/feedback.mjs +2 -2
- package/dist/index-BjBsn6ad.cjs +5194 -0
- package/dist/index-C2Uoywo9.js +63852 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1631 -53
- package/dist/index.mjs +943 -895
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +4 -3
- package/dist/lazy.mjs +3 -3
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.mjs +4 -4
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.mjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),C=require("./core-DQYnL6uf.cjs"),i=require("react"),A={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},U=({variant:s="info",title:t,children:c,closable:r,onClose:n,icon:a,size:l="md",className:m,style:d,displayStyle:p})=>{const h=C.ls("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${h} ${m||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:a||A[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:c})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:"✕"})]})},Y=({open:s,onClose:t,title:c,position:r="right",size:n="md",children:a,footer:l,transitionDuration:m,className:d,style:p,displayStyle:h})=>{const g=C.cs("modal",h),x=C.ls("modal",h),{t:f}=C.$o(),v=i.useRef(null);return C.As(v,s),i.useEffect(()=>{if(!s)return;const _=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",_),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",_),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onClick:t}),e.jsxs("div",{ref:v,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${d||""}`,style:{...g,...p,...m!=null?{transitionDuration:`${m}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":c,children:[c&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:c}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":f("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]}),e.jsx("div",{className:"nice-drawer__body",children:a}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},W=({toasts:s,onDismiss:t,position:c="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${c}`,children:s.map(r=>e.jsx(G,{toast:r,onDismiss:t},r.id))}),G=({toast:s,onDismiss:t})=>{const[c,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(c){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[c,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${c?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:A[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),children:"✕"})]})};let J=0;function K(){const[s,t]=i.useState([]),c=i.useCallback((n,a,l)=>{const m=`toast-${++J}`;return t(d=>[...d,{id:m,variant:n,message:a,title:l?.title,duration:l?.duration}]),m},[]),r=i.useCallback(n=>{t(a=>a.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,a)=>c("info",n,a),success:(n,a)=>c("success",n,a),warning:(n,a)=>c("warning",n,a),error:(n,a)=>c("error",n,a)}}const Q={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},X=({visible:s,message:t,header:c,icon:r,variant:n="warning",acceptLabel:a,rejectLabel:l,onAccept:m,onReject:d,closeOnOverlay:p=!1,closeOnEscape:h=!0,size:g="md",className:x,style:f})=>{const{t:v}=C.$o();if(i.useEffect(()=>{if(!s||!h)return;const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,h,d]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),!s)return null;const _=r??Q[n],o=a??v("confirm.accept","Yes"),w=l??v("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:p?d:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${n} nice-confirm--${g} ${x||""}`,style:f,role:"alertdialog","aria-modal":"true","aria-label":c,"aria-describedby":"nice-confirm-message",onClick:j=>j.stopPropagation(),children:[c&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:c})}),e.jsxs("div",{className:"nice-confirm__body",children:[_&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${n}`,children:_}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:t})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:d,children:w}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${n==="error"?"error":"primary"} nice-btn--md`,onClick:m,autoFocus:!0,children:o})]})]})})},Z=({error:s,onRetry:t,retryLabel:c="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:a="error",icon:l,size:m="md",className:d,style:p,"data-testid":h})=>{const[g,x]=i.useState(n??0),f=i.useRef(),v=typeof s=="string"?s:s.message,_=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),f.current=setInterval(()=>{x(o=>o<=1?(clearInterval(f.current),t(),0):o-1)},1e3),()=>clearInterval(f.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${a} nice-retry-panel--${m} ${d||""}`,style:p,role:"alert","data-testid":h,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??"⚠️"}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:v})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:_,children:c}),n&&g>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",g,"s"]})]})]})};function ee(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function se(){return navigator.onLine}function ne(){return!0}const te=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:c,size:r="md",className:n,style:a,"data-testid":l})=>i.useSyncExternalStore(ee,se,ne)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:a,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:c??"📡"}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function q({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,autoRetry:r=!1,autoRetryCount:n=3}={}){const[a,l]=i.useState(!1),[m,d]=i.useState(!1),[p,h]=i.useState(!1),[g,x]=i.useState(0),[f,v]=i.useState(0),_=i.useRef(null),o=i.useRef(null),w=i.useRef(null),j=i.useRef(0),N=i.useCallback(()=>{_.current&&clearTimeout(_.current),o.current&&clearTimeout(o.current),w.current&&clearInterval(w.current)},[]),k=i.useCallback(()=>{N(),l(!0),d(!1),h(!1),x(0),j.current=Date.now(),w.current=setInterval(()=>{x(Date.now()-j.current)},200),_.current=setTimeout(()=>{d(!0)},t),o.current=setTimeout(()=>{h(!0),l(!1),d(!1),N(),c?.()},s)},[N,t,s,c]),$=i.useCallback(()=>{N(),l(!1),d(!1)},[N]),u=i.useCallback(()=>{v(y=>y+1),h(!1),k()},[k]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&f<n){const y=Math.pow(2,f)*1e3,T=setTimeout(()=>u(),y);return()=>clearTimeout(T)}},[r,n,p,f,u]),{isLoading:a,isSlow:m,isTimedOut:p,elapsed:g,retryCount:f,start:k,stop:$,retry:u}}const ie=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,onRetry:r,autoRetry:n=!1,autoRetryCount:a=3,showProgress:l=!0,slowMessage:m="Operacja trwa dłużej niż zwykle…",timeoutMessage:d="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:h,size:g="md",className:x,style:f,"data-testid":v})=>{const{isSlow:_,isTimedOut:o,elapsed:w,retry:j}=q({timeoutMs:s,slowThresholdMs:t,onTimeout:c,autoRetry:n,autoRetryCount:a}),N=()=>{j(),r?.()};if(!p)return e.jsx(e.Fragment,{children:h});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${g} ${x??""}`,style:f,role:"alert","data-testid":v,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const k=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${g} ${_?"nice-timeout-feedback--slow":""} ${x??""}`,style:f,"data-testid":v,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),_&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:m}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":k,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${k}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:c,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:a,position:l="bottom",size:m="md",policyUrl:d,showDetails:p=!1,className:h,style:g,id:x,...f},v)=>{const _=C.ks(x),{t:o}=C.$o(),[w,j]=i.useState(!0),N=s??w,[k,$]=i.useState(p),[u,y]=i.useState(()=>{const b={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return a&&Object.assign(b,a),b.necessary=!0,b}),T={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},L={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},I=i.useCallback(()=>{const b={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(b),j(!1)},[t,r]),E=i.useCallback(()=>{const b={necessary:!0,analytics:!1,marketing:!1,preferences:!1};c?.(),r?.(b),j(!1)},[c,r]),R=i.useCallback(()=>{r?.({...u,necessary:!0}),j(!1)},[u,r]);return N?e.jsx("div",{ref:v,id:_,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${m} ${h??""}`,style:g,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",...f,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),d&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:d,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),k&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(b=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:u[b],disabled:b==="necessary",onChange:D=>y(z=>({...z,[b]:D.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:T[b]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:L[b]})]})]},b))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:R,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:I,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:c,loading:r=!1,error:n,variant:a="primary",size:l="md",showRememberMe:m=!0,showForgotPassword:d=!0,showRegister:p=!1,title:h,logo:g,usernameLabel:x,passwordLabel:f,usernamePlaceholder:v,passwordPlaceholder:_,className:o,style:w,id:j,...N},k)=>{const $=C.ks(j),{t:u}=C.$o(),[y,T]=i.useState(""),[L,I]=i.useState(""),[E,R]=i.useState(!1),[b,D]=i.useState(!1),z=`${$}-user`,F=`${$}-pass`,B=`${$}-remember`,V=i.useCallback(S=>{S.preventDefault(),!r&&s?.({username:y,password:L,rememberMe:E})},[r,y,L,E,s]);return e.jsxs("form",{ref:k,id:$,className:`nice-login nice-login--${a} nice-login--${l} ${o??""}`,style:w,onSubmit:V,noValidate:!0,...N,children:[g&&e.jsx("div",{className:"nice-login__logo",children:g}),h&&e.jsx("h2",{className:"nice-login__title",children:h??u("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:z,className:"nice-login__label",children:x??u("login.username","Username")}),e.jsx("input",{id:z,className:"nice-login__input",type:"text",value:y,onChange:S=>T(S.target.value),placeholder:v??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:F,className:"nice-login__label",children:f??u("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:b?"text":"password",value:L,onChange:S=>I(S.target.value),placeholder:_??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:()=>D(!b),"aria-label":b?u("login.hidePassword","Hide password"):u("login.showPassword","Show password"),tabIndex:-1,children:b?"🙈":"👁"})]})]}),e.jsxs("div",{className:"nice-login__options",children:[m&&e.jsxs("label",{className:"nice-login__remember",htmlFor:B,children:[e.jsx("input",{id:B,type:"checkbox",checked:E,onChange:S=>R(S.target.checked),disabled:r}),e.jsx("span",{children:u("login.rememberMe","Remember me")})]}),d&&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--${a}`,disabled:r||!y||!L,children:r?u("login.loading","Signing in..."):u("login.submit","Sign In")}),p&&c&&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:c,disabled:r,children:u("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const P=class P extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,c){this.props.onError?.(t,c)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:c=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:"⚠️"}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),c&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};P.displayName="NiceErrorBoundary";let M=P;exports.NiceAlert=U;exports.NiceConfirmDialog=X;exports.NiceCookieConsent=O;exports.NiceDrawer=Y;exports.NiceErrorBoundary=M;exports.NiceLoginForm=H;exports.NiceOfflineBanner=te;exports.NiceRetryPanel=Z;exports.NiceTimeoutFeedback=ie;exports.NiceToastContainer=W;exports.alertIcons=A;exports.useNiceTimeout=q;exports.useNiceToast=K;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",s="NiceExpressionBuilder",i="Visual expression builder for formulas and conditions.",o="editors",n="1.0.0",t="planned",a=[{name:"value",type:"Expression",required:!0,description:"Expression value"},{name:"onChange",type:"(value: Expression) => void",required:!0,description:"Change callback"},{name:"fields",type:"Field[]",required:!0,description:"Available fields"},{name:"operators",type:"Operator[]",description:"Available operators"},{name:"functions",type:"Function[]",description:"Available functions"},{name:"mode",type:"'visual' | 'text' | 'both'",default:"'visual'",description:"Editor mode"},{name:"onValidate",type:"(valid: boolean) => void",description:"Validation callback"},{name:"showTestPanel",type:"boolean",default:"false",description:"Show test panel"}],r=[{title:"Expression Builder",description:"Build expressions",code:`<NiceExpressionBuilder
|
|
2
|
+
value={expression}
|
|
3
|
+
onChange={setExpression}
|
|
4
|
+
fields={availableFields}
|
|
5
|
+
operators={availableOperators}
|
|
6
|
+
functions={availableFunctions}
|
|
7
|
+
mode="visual"
|
|
8
|
+
/>`}],l={keyboard:["Tab through components"],aria:["Expression builder","Field and operator descriptions"]},c=["NiceFilterBuilder","NiceRulesEngine"],d={$schema:e,name:s,description:i,category:o,since:n,status:t,props:a,examples:r,accessibility:l,seeAlso:c};exports.$schema=e;exports.accessibility=l;exports.category=o;exports.default=d;exports.description=i;exports.examples=r;exports.name=s;exports.props=a;exports.seeAlso=c;exports.since=n;exports.status=t;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", i = "NiceExpressionBuilder", s = "Visual expression builder for formulas and conditions.", n = "editors", o = "1.0.0", a = "planned", t = [{ name: "value", type: "Expression", required: !0, description: "Expression value" }, { name: "onChange", type: "(value: Expression) => void", required: !0, description: "Change callback" }, { name: "fields", type: "Field[]", required: !0, description: "Available fields" }, { name: "operators", type: "Operator[]", description: "Available operators" }, { name: "functions", type: "Function[]", description: "Available functions" }, { name: "mode", type: "'visual' | 'text' | 'both'", default: "'visual'", description: "Editor mode" }, { name: "onValidate", type: "(valid: boolean) => void", description: "Validation callback" }, { name: "showTestPanel", type: "boolean", default: "false", description: "Show test panel" }], r = [{ title: "Expression Builder", description: "Build expressions", code: `<NiceExpressionBuilder
|
|
2
|
+
value={expression}
|
|
3
|
+
onChange={setExpression}
|
|
4
|
+
fields={availableFields}
|
|
5
|
+
operators={availableOperators}
|
|
6
|
+
functions={availableFunctions}
|
|
7
|
+
mode="visual"
|
|
8
|
+
/>` }], l = { keyboard: ["Tab through components"], aria: ["Expression builder", "Field and operator descriptions"] }, c = ["NiceFilterBuilder", "NiceRulesEngine"], d = {
|
|
9
|
+
$schema: e,
|
|
10
|
+
name: i,
|
|
11
|
+
description: s,
|
|
12
|
+
category: n,
|
|
13
|
+
since: o,
|
|
14
|
+
status: a,
|
|
15
|
+
props: t,
|
|
16
|
+
examples: r,
|
|
17
|
+
accessibility: l,
|
|
18
|
+
seeAlso: c
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
e as $schema,
|
|
22
|
+
l as accessibility,
|
|
23
|
+
n as category,
|
|
24
|
+
d as default,
|
|
25
|
+
s as description,
|
|
26
|
+
r as examples,
|
|
27
|
+
i as name,
|
|
28
|
+
t as props,
|
|
29
|
+
c as seeAlso,
|
|
30
|
+
o as since,
|
|
31
|
+
a as status
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", i = "NiceFileExplorer", o = "File explorer with tree navigation, preview, and operations.", t = "data", n = "1.0.0", a = "planned", l = [{ name: "files", type: "FileNode[]", required: !0, description: "File tree" }, { name: "currentPath", type: "string", description: "Current directory path" }, { name: "onNavigate", type: "(path: string) => void", description: "Navigate callback" }, { name: "onFileSelect", type: "(file: FileNode) => void", description: "File select callback" }, { name: "onFileOpen", type: "(file: FileNode) => void", description: "File open callback" }, { name: "onUpload", type: "(files: File[], path: string) => Promise<void>", description: "Upload callback" }, { name: "onDelete", type: "(files: FileNode[]) => Promise<void>", description: "Delete callback" }, { name: "onRename", type: "(file: FileNode, newName: string) => Promise<void>", description: "Rename callback" }, { name: "showPreview", type: "boolean", default: "true", description: "Show preview panel" }, { name: "viewMode", type: "'list' | 'grid' | 'tree'", default: "'list'", description: "View mode" }], r = [{ title: "File Explorer", description: "Browse files", code: `<NiceFileExplorer
|
|
2
|
+
files={fileTree}
|
|
3
|
+
currentPath={currentPath}
|
|
4
|
+
onNavigate={navigateToPath}
|
|
5
|
+
onFileOpen={openFile}
|
|
6
|
+
onUpload={uploadFiles}
|
|
7
|
+
viewMode="grid"
|
|
8
|
+
/>` }], s = { keyboard: ["Tab through files", "Enter to open"], aria: ["File browser", "Selection status"] }, c = ["NiceTreeView", "NiceDMS"], p = {
|
|
9
|
+
$schema: e,
|
|
10
|
+
name: i,
|
|
11
|
+
description: o,
|
|
12
|
+
category: t,
|
|
13
|
+
since: n,
|
|
14
|
+
status: a,
|
|
15
|
+
props: l,
|
|
16
|
+
examples: r,
|
|
17
|
+
accessibility: s,
|
|
18
|
+
seeAlso: c
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
e as $schema,
|
|
22
|
+
s as accessibility,
|
|
23
|
+
t as category,
|
|
24
|
+
p as default,
|
|
25
|
+
o as description,
|
|
26
|
+
r as examples,
|
|
27
|
+
i as name,
|
|
28
|
+
l as props,
|
|
29
|
+
c as seeAlso,
|
|
30
|
+
n as since,
|
|
31
|
+
a as status
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",i="NiceFileExplorer",t="File explorer with tree navigation, preview, and operations.",o="data",n="1.0.0",a="planned",l=[{name:"files",type:"FileNode[]",required:!0,description:"File tree"},{name:"currentPath",type:"string",description:"Current directory path"},{name:"onNavigate",type:"(path: string) => void",description:"Navigate callback"},{name:"onFileSelect",type:"(file: FileNode) => void",description:"File select callback"},{name:"onFileOpen",type:"(file: FileNode) => void",description:"File open callback"},{name:"onUpload",type:"(files: File[], path: string) => Promise<void>",description:"Upload callback"},{name:"onDelete",type:"(files: FileNode[]) => Promise<void>",description:"Delete callback"},{name:"onRename",type:"(file: FileNode, newName: string) => Promise<void>",description:"Rename callback"},{name:"showPreview",type:"boolean",default:"true",description:"Show preview panel"},{name:"viewMode",type:"'list' | 'grid' | 'tree'",default:"'list'",description:"View mode"}],s=[{title:"File Explorer",description:"Browse files",code:`<NiceFileExplorer
|
|
2
|
+
files={fileTree}
|
|
3
|
+
currentPath={currentPath}
|
|
4
|
+
onNavigate={navigateToPath}
|
|
5
|
+
onFileOpen={openFile}
|
|
6
|
+
onUpload={uploadFiles}
|
|
7
|
+
viewMode="grid"
|
|
8
|
+
/>`}],r={keyboard:["Tab through files","Enter to open"],aria:["File browser","Selection status"]},c=["NiceTreeView","NiceDMS"],p={$schema:e,name:i,description:t,category:o,since:n,status:a,props:l,examples:s,accessibility:r,seeAlso:c};exports.$schema=e;exports.accessibility=r;exports.category=o;exports.default=p;exports.description=t;exports.examples=s;exports.name=i;exports.props=l;exports.seeAlso=c;exports.since=n;exports.status=a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="https://nice2dev.com/schemas/component-doc-v1.json",e="NiceFloatingActionButton",o="Floating action button for primary mobile actions.",n="mobile",i="1.0.0",c="planned",s=[{name:"icon",type:"React.ReactNode",required:!0,description:"Button icon"},{name:"onClick",type:"() => void",required:!0,description:"Click callback"},{name:"position",type:"'bottom-right' | 'bottom-left' | 'bottom-center'",default:"'bottom-right'",description:"Position"},{name:"size",type:"'sm' | 'md' | 'lg'",default:"'md'",description:"Button size"},{name:"color",type:"string",default:"'primary'",description:"Button color"},{name:"extended",type:"boolean",default:"false",description:"Extended style with label"},{name:"label",type:"string",description:"Button label"},{name:"actions",type:"FABAction[]",description:"Speed dial actions"}],a=[{title:"Floating Action Button",description:"FAB button",code:`<NiceFloatingActionButton
|
|
2
|
+
icon={<AddIcon />}
|
|
3
|
+
onClick={createNew}
|
|
4
|
+
position="bottom-right"
|
|
5
|
+
size="md"
|
|
6
|
+
color="primary"
|
|
7
|
+
/>`}],r={keyboard:["Tab to focus","Enter to click"],aria:["Button role","Action description"]},l=["NiceSpeedDial","NiceButton"],d={$schema:t,name:e,description:o,category:n,since:i,status:c,props:s,examples:a,accessibility:r,seeAlso:l};exports.$schema=t;exports.accessibility=r;exports.category=n;exports.default=d;exports.description=o;exports.examples=a;exports.name=e;exports.props=s;exports.seeAlso=l;exports.since=i;exports.status=c;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const t = "https://nice2dev.com/schemas/component-doc-v1.json", o = "NiceFloatingActionButton", e = "Floating action button for primary mobile actions.", n = "mobile", i = "1.0.0", c = "planned", s = [{ name: "icon", type: "React.ReactNode", required: !0, description: "Button icon" }, { name: "onClick", type: "() => void", required: !0, description: "Click callback" }, { name: "position", type: "'bottom-right' | 'bottom-left' | 'bottom-center'", default: "'bottom-right'", description: "Position" }, { name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'", description: "Button size" }, { name: "color", type: "string", default: "'primary'", description: "Button color" }, { name: "extended", type: "boolean", default: "false", description: "Extended style with label" }, { name: "label", type: "string", description: "Button label" }, { name: "actions", type: "FABAction[]", description: "Speed dial actions" }], a = [{ title: "Floating Action Button", description: "FAB button", code: `<NiceFloatingActionButton
|
|
2
|
+
icon={<AddIcon />}
|
|
3
|
+
onClick={createNew}
|
|
4
|
+
position="bottom-right"
|
|
5
|
+
size="md"
|
|
6
|
+
color="primary"
|
|
7
|
+
/>` }], r = { keyboard: ["Tab to focus", "Enter to click"], aria: ["Button role", "Action description"] }, l = ["NiceSpeedDial", "NiceButton"], d = {
|
|
8
|
+
$schema: t,
|
|
9
|
+
name: o,
|
|
10
|
+
description: e,
|
|
11
|
+
category: n,
|
|
12
|
+
since: i,
|
|
13
|
+
status: c,
|
|
14
|
+
props: s,
|
|
15
|
+
examples: a,
|
|
16
|
+
accessibility: r,
|
|
17
|
+
seeAlso: l
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
t as $schema,
|
|
21
|
+
r as accessibility,
|
|
22
|
+
n as category,
|
|
23
|
+
d as default,
|
|
24
|
+
e as description,
|
|
25
|
+
a as examples,
|
|
26
|
+
o as name,
|
|
27
|
+
s as props,
|
|
28
|
+
l as seeAlso,
|
|
29
|
+
i as since,
|
|
30
|
+
c as status
|
|
31
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceFontPicker",o="Font picker with preview and web font support.",n="input",s="1.0.0",i="planned",c=[{name:"value",type:"string",required:!0,description:"Selected font"},{name:"onChange",type:"(font: string) => void",required:!0,description:"Change callback"},{name:"fonts",type:"Font[]",description:"Available fonts"},{name:"googleFonts",type:"boolean",default:"false",description:"Load Google Fonts"},{name:"showSearch",type:"boolean",default:"true",description:"Show search"},{name:"showPreview",type:"boolean",default:"true",description:"Show font preview"},{name:"previewText",type:"string",default:"'The quick brown fox'",description:"Preview text"},{name:"categories",type:"string[]",description:"Font categories"}],r=[{title:"Font Picker",description:"Select font",code:`<NiceFontPicker
|
|
2
|
+
value={selectedFont}
|
|
3
|
+
onChange={setSelectedFont}
|
|
4
|
+
googleFonts
|
|
5
|
+
showSearch
|
|
6
|
+
showPreview
|
|
7
|
+
categories={['sans-serif', 'serif', 'monospace']}
|
|
8
|
+
/>`}],a={keyboard:["Tab through fonts","Enter to select"],aria:["Font picker","Font previews"]},p=["NiceThemeDesigner","NiceSelect"],l={$schema:e,name:t,description:o,category:n,since:s,status:i,props:c,examples:r,accessibility:a,seeAlso:p};exports.$schema=e;exports.accessibility=a;exports.category=n;exports.default=l;exports.description=o;exports.examples=r;exports.name=t;exports.props=c;exports.seeAlso=p;exports.since=s;exports.status=i;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceFontPicker", o = "Font picker with preview and web font support.", n = "input", s = "1.0.0", i = "planned", c = [{ name: "value", type: "string", required: !0, description: "Selected font" }, { name: "onChange", type: "(font: string) => void", required: !0, description: "Change callback" }, { name: "fonts", type: "Font[]", description: "Available fonts" }, { name: "googleFonts", type: "boolean", default: "false", description: "Load Google Fonts" }, { name: "showSearch", type: "boolean", default: "true", description: "Show search" }, { name: "showPreview", type: "boolean", default: "true", description: "Show font preview" }, { name: "previewText", type: "string", default: "'The quick brown fox'", description: "Preview text" }, { name: "categories", type: "string[]", description: "Font categories" }], r = [{ title: "Font Picker", description: "Select font", code: `<NiceFontPicker
|
|
2
|
+
value={selectedFont}
|
|
3
|
+
onChange={setSelectedFont}
|
|
4
|
+
googleFonts
|
|
5
|
+
showSearch
|
|
6
|
+
showPreview
|
|
7
|
+
categories={['sans-serif', 'serif', 'monospace']}
|
|
8
|
+
/>` }], a = { keyboard: ["Tab through fonts", "Enter to select"], aria: ["Font picker", "Font previews"] }, p = ["NiceThemeDesigner", "NiceSelect"], d = {
|
|
9
|
+
$schema: e,
|
|
10
|
+
name: t,
|
|
11
|
+
description: o,
|
|
12
|
+
category: n,
|
|
13
|
+
since: s,
|
|
14
|
+
status: i,
|
|
15
|
+
props: c,
|
|
16
|
+
examples: r,
|
|
17
|
+
accessibility: a,
|
|
18
|
+
seeAlso: p
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
e as $schema,
|
|
22
|
+
a as accessibility,
|
|
23
|
+
n as category,
|
|
24
|
+
d as default,
|
|
25
|
+
o as description,
|
|
26
|
+
r as examples,
|
|
27
|
+
t as name,
|
|
28
|
+
c as props,
|
|
29
|
+
p as seeAlso,
|
|
30
|
+
s as since,
|
|
31
|
+
i as status
|
|
32
|
+
};
|