react-luminus-components 1.0.6 → 1.1.1
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/dist/.vite/manifest.json +43 -44
- package/dist/Collapse.module-DvvJlfPd.js +212 -0
- package/dist/Collapse.module-cs5hXOag.mjs +2896 -0
- package/dist/Modal-B2qKFgqh.js +1 -0
- package/dist/{Modal-DsY3WNWM.mjs → Modal-Dx5XXGby.mjs} +166 -162
- package/dist/SimpleTooltip-C9ijHgfs.js +1 -0
- package/dist/SimpleTooltip-CmA9EcfY.mjs +1622 -0
- package/dist/components/BnfTableValueFormats/UserAvatarValueFormat/UserAvatarValueFormat.d.ts +3 -0
- package/dist/components/BnfTableValueFormats/index.d.ts +1 -0
- package/dist/components/Buttons/ContextButton/ContextButton.d.ts +13 -0
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +14 -0
- package/dist/components/Buttons/index.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.d.ts +8 -0
- package/dist/components/Dropdown/comps/DropdownItem/DropdownItem.d.ts +9 -0
- package/dist/components/Dropdown/comps/DropdownToggle/DropdownToggle.d.ts +7 -0
- package/dist/components/Dropdown/comps/SimpleToggle/SimpleToggle.d.ts +10 -0
- package/dist/components/Dropdown/comps/index.d.ts +4 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Form/SelectInput/SelectInput.d.ts +2 -1
- package/dist/components/HookForm/index.d.ts +0 -1
- package/dist/components/Tabs/Tabs.d.ts +7 -0
- package/dist/components/Tabs/comps/Tab/Tab.d.ts +7 -0
- package/dist/components/Tabs/comps/index.d.ts +1 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Toaster/Toaster.d.ts +3 -0
- package/dist/components/UserAvatar/index.d.ts +0 -1
- package/dist/components/common/ApiFileDownloadButton/ApiFileDownloadButton.d.ts +2 -3
- package/dist/components/common/Badge/Badge.d.ts +9 -0
- package/dist/components/common/Collapse/Collapse.d.ts +8 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +64 -53
- package/dist/{hasClass-DABt6TfW.js → hasClass-CIO7dHdo.js} +5 -5
- package/dist/{hasClass-D3KZs5y_.mjs → hasClass-CjtZdrqe.mjs} +24 -23
- package/dist/hooks/useNotifications/useNotifications.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout/SideMenu/MenuItem/MenuItem.d.ts +2 -1
- package/dist/layout/SideMenu/SideMenu.d.ts +2 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +85 -156
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +8 -2
- package/dist/main.es.js +1689 -992
- package/dist/models/prop-types/HookFormSelectInputProps.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/{useConfirm-Yw2xz-A-.mjs → useConfirm-BiBuEjQ7.mjs} +1 -1
- package/dist/useConfirm-DSLva5Mk.js +1 -0
- package/package.json +4 -2
- package/dist/HomeDashboard.module-BI8obEZ_.js +0 -212
- package/dist/HomeDashboard.module-CuVVnp4t.mjs +0 -2664
- package/dist/Modal-DmUjIS_Q.js +0 -1
- package/dist/SimpleTooltip-C8wTRZNZ.mjs +0 -1759
- package/dist/SimpleTooltip-HYwwaCn4.js +0 -1
- package/dist/components/UserAvatar/UserAvatarDropdown/UserAvatarDropdown.d.ts +0 -7
- package/dist/useConfirm-CQCMwQlb.js +0 -1
- /package/dist/components/{HookForm → Buttons}/FloatingSubmit/FloatingFormSubmit.d.ts +0 -0
- /package/dist/components/{UserAvatar → Dropdown/comps}/UserAvatarToggle/UserAvatarToggle.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./Collapse.module-DvvJlfPd.js"),o=require("./hasClass-CIO7dHdo.js"),d=require("react"),Le=require("react-dom");function Ie(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const m=Ie(d),We=()=>n.jsxRuntimeExports.jsxs("div",{className:n.classNames("luminus-loading",n.classes$1.loading),children:[n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes$1.spinnerGrow,"text-primary"),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes$1.spinnerGrow,"text-primary",n.classes$1.second),role:"status"}),n.jsxRuntimeExports.jsx("div",{className:n.classNames("spinner-grow",n.classes$1.spinnerGrow,"text-primary",n.classes$1.third),role:"status"})]}),_e=({variant:t,className:e,children:s})=>{switch(t){case"h1":return n.jsxRuntimeExports.jsx("h1",{className:n.classNames("luminus-text-primary luminus-h1",n.classes$2.h1,e),children:s});case"h3":return n.jsxRuntimeExports.jsx("h3",{className:n.classNames("luminus-text luminus-h3",n.classes$2.h3,e),children:s});case"h6":return n.jsxRuntimeExports.jsx("h6",{className:n.classNames("luminus-text luminus-h6",n.classes$2.h6,e),children:s});case"subtitle":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text luminus-subtitle",n.classes$2.subtitle,e),children:s});case"body":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text luminus-body",n.classes$2.body,e),children:s});case"body2":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text luminus-body2",n.classes$2.body2,e),children:s});case"caption":return n.jsxRuntimeExports.jsx("div",{className:n.classNames("luminus-text-muted luminus-caption",n.classes$2.caption,e),children:s});default:return n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s})}},He=({variant:t,className:e,children:s})=>n.jsxRuntimeExports.jsx(_e,{variant:t,className:e,children:s}),Ue=t=>m.forwardRef((e,s)=>n.jsxRuntimeExports.jsx("div",{...e,ref:s,className:n.classNames(e.className,t)}));function ye(t){const e=d.useRef(null);return d.useEffect(()=>{e.current=t}),e.current}const Pe={"aria-label":o.PropTypes.string,onClick:o.PropTypes.func,variant:o.PropTypes.oneOf(["white"])},me=m.forwardRef(({className:t,variant:e,"aria-label":s="Close",...a},r)=>n.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:n.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...a}));me.displayName="CloseButton";me.propTypes=Pe;const Ke=me;var Ge=Function.prototype.bind.call(Function.prototype.call,[].slice);function j(t,e){return Ge(t.querySelectorAll(e))}const qe="data-rr-ui-",ze="rrUi";function Re(t){return`${qe}${t}`}function Ve(t){return`${ze}${t}`}var J;function ge(t){if((!J&&J!==0||t)&&o.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=o.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function Xe(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=Re("modal-open");class Ye{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:a=!1}={}){this.handleContainerOverflow=s,this.isRTL=a,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return Xe(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},a=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[a]:r.style[a]},e.scrollBarWidth&&(s[a]=`${parseInt(o.style(r,a)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),o.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ye,Je=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Qe(t,e){if(t==null)return{};var s={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Ze(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function et(t){const e=o.useWindow(),s=t||Ze(e),a=d.useRef({dialog:null,backdrop:null});return Object.assign(a.current,{add:()=>s.add(a.current),remove:()=>s.remove(a.current),isTopModal:()=>s.isTopModal(a.current),setDialogRef:d.useCallback(r=>{a.current.dialog=r},[]),setBackdropRef:d.useCallback(r=>{a.current.backdrop=r},[])})}const ve=d.forwardRef((t,e)=>{let{show:s=!1,role:a="dialog",className:r,style:l,children:E,backdrop:p=!0,keyboard:y=!0,onBackdropClick:N,onEscapeKeyDown:h,transition:S,runTransition:R,backdropTransition:b,runBackdropTransition:Q,autoFocus:_=!0,enforceFocus:Z=!0,restoreFocus:T=!0,restoreFocusOptions:ee,renderDialog:H,renderBackdrop:te=c=>n.jsxRuntimeExports.jsx("div",Object.assign({},c)),manager:se,container:ne,onShow:U,onHide:$=()=>{},onExit:oe,onExited:D,onExiting:P,onEnter:K,onEntering:G,onEntered:q}=t,ae=Qe(t,Je);const g=o.useWindow(),M=o.useWaitForDOMRef(ne),u=et(se),re=o.useMounted(),z=ye(s),[v,w]=d.useState(!s),f=d.useRef(null);d.useImperativeHandle(e,()=>u,[u]),o.canUseDOM&&!z&&s&&(f.current=ce(g==null?void 0:g.document)),s&&v&&w(!1);const x=o.useEventCallback(()=>{if(u.add(),C.current=o.listen(document,"keydown",le),L.current=o.listen(document,"focus",()=>setTimeout(ie),!0),U&&U(),_){var c,Y;const W=ce((c=(Y=u.dialog)==null?void 0:Y.ownerDocument)!=null?c:g==null?void 0:g.document);u.dialog&&W&&!o.contains(u.dialog,W)&&(f.current=W,u.dialog.focus())}}),F=o.useEventCallback(()=>{if(u.remove(),C.current==null||C.current(),L.current==null||L.current(),T){var c;(c=f.current)==null||c.focus==null||c.focus(ee),f.current=null}});d.useEffect(()=>{!s||!M||x()},[s,M,x]),d.useEffect(()=>{v&&F()},[v,F]),o.useWillUnmount(()=>{F()});const ie=o.useEventCallback(()=>{if(!Z||!re()||!u.isTopModal())return;const c=ce(g==null?void 0:g.document);u.dialog&&c&&!o.contains(u.dialog,c)&&u.dialog.focus()}),V=o.useEventCallback(c=>{c.target===c.currentTarget&&(N==null||N(c),p===!0&&$())}),le=o.useEventCallback(c=>{y&&o.isEscKey(c)&&u.isTopModal()&&(h==null||h(c),c.defaultPrevented||$())}),L=d.useRef(),C=d.useRef(),X=(...c)=>{w(!0),D==null||D(...c)};if(!M)return null;const k=Object.assign({role:a,ref:u.setDialogRef,"aria-modal":a==="dialog"?!0:void 0},ae,{style:l,className:r,tabIndex:-1});let I=H?H(k):n.jsxRuntimeExports.jsx("div",Object.assign({},k,{children:m.cloneElement(E,{role:"document"})}));I=o.renderTransition(S,R,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:P,onExited:X,onEnter:K,onEntering:G,onEntered:q,children:I});let O=null;return p&&(O=te({ref:u.setBackdropRef,onClick:V}),O=o.renderTransition(b,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:Le.createPortal(n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[O,I]}),M)})});ve.displayName="Modal";const tt=Object.assign(ve,{Manager:fe});function st(t,e){t.classList?t.classList.add(e):o.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function nt(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const A={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class ot extends fe{adjustAndStore(e,s,a){const r=s.style[e];s.dataset[e]=r,o.style(s,{[e]:`${parseFloat(o.style(s,e))+a}px`})}restore(e,s){const a=s.dataset[e];a!==void 0&&(delete s.dataset[e],o.style(s,{[e]:a}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(st(s,"modal-open"),!e.scrollBarWidth)return;const a=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,A.FIXED_CONTENT).forEach(l=>this.adjustAndStore(a,l,e.scrollBarWidth)),j(s,A.STICKY_CONTENT).forEach(l=>this.adjustAndStore(r,l,-e.scrollBarWidth)),j(s,A.NAVBAR_TOGGLER).forEach(l=>this.adjustAndStore(r,l,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();nt(s,"modal-open");const a=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";j(s,A.FIXED_CONTENT).forEach(l=>this.restore(a,l)),j(s,A.STICKY_CONTENT).forEach(l=>this.restore(r,l)),j(s,A.NAVBAR_TOGGLER).forEach(l=>this.restore(r,l))}}let ue;function at(t){return ue||(ue=new ot(t)),ue}const je=m.forwardRef(({className:t,bsPrefix:e,as:s="div",...a},r)=>(e=o.useBootstrapPrefix(e,"modal-body"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));je.displayName="ModalBody";const rt=je,it=m.createContext({onHide(){}}),Ne=it,be=m.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:a,size:r,fullscreen:l,children:E,scrollable:p,...y},N)=>{t=o.useBootstrapPrefix(t,"modal");const h=`${t}-dialog`,S=typeof l=="string"?`${t}-fullscreen-${l}`:`${t}-fullscreen`;return n.jsxRuntimeExports.jsx("div",{...y,ref:N,className:n.classNames(h,e,r&&`${t}-${r}`,a&&`${h}-centered`,p&&`${h}-scrollable`,l&&S),children:n.jsxRuntimeExports.jsx("div",{className:n.classNames(`${t}-content`,s),children:E})})});be.displayName="ModalDialog";const Te=be,Me=m.forwardRef(({className:t,bsPrefix:e,as:s="div",...a},r)=>(e=o.useBootstrapPrefix(e,"modal-footer"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));Me.displayName="ModalFooter";const lt=Me,ct=m.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:a,children:r,...l},E)=>{const p=d.useContext(Ne),y=o.useEventCallback(()=>{p==null||p.onHide(),a==null||a()});return n.jsxRuntimeExports.jsxs("div",{ref:E,...l,children:[r,s&&n.jsxRuntimeExports.jsx(Ke,{"aria-label":t,variant:e,onClick:y})]})}),dt=ct,we=m.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:a=!1,...r},l)=>(t=o.useBootstrapPrefix(t,"modal-header"),n.jsxRuntimeExports.jsx(dt,{ref:l,...r,className:n.classNames(e,t),closeLabel:s,closeButton:a})));we.displayName="ModalHeader";const ut=we,mt=Ue("h4"),Ce=m.forwardRef(({className:t,bsPrefix:e,as:s=mt,...a},r)=>(e=o.useBootstrapPrefix(e,"modal-title"),n.jsxRuntimeExports.jsx(s,{ref:r,className:n.classNames(t,e),...a})));Ce.displayName="ModalTitle";const ft=Ce;function pt(t){return n.jsxRuntimeExports.jsx(o.Fade,{...t,timeout:null})}function ht(t){return n.jsxRuntimeExports.jsx(o.Fade,{...t,timeout:null})}const ke=m.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:a,contentClassName:r,children:l,dialogAs:E=Te,"data-bs-theme":p,"aria-labelledby":y,"aria-describedby":N,"aria-label":h,show:S=!1,animation:R=!0,backdrop:b=!0,keyboard:Q=!0,onEscapeKeyDown:_,onShow:Z,onHide:T,container:ee,autoFocus:H=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:U,onExit:$,onExiting:oe,onEnter:D,onEntering:P,onExited:K,backdropClassName:G,manager:q,...ae},g)=>{const[M,u]=d.useState({}),[re,z]=d.useState(!1),v=d.useRef(!1),w=d.useRef(!1),f=d.useRef(null),[x,F]=o.useCallbackRef(),ie=o.useMergedRefs(g,F),V=o.useEventCallback(T),le=o.useIsRTL();t=o.useBootstrapPrefix(t,"modal");const L=d.useMemo(()=>({onHide:V}),[V]);function C(){return q||at({isRTL:le})}function X(i){if(!o.canUseDOM)return;const B=C().getScrollbarWidth()>0,he=i.scrollHeight>o.ownerDocument(i).documentElement.clientHeight;u({paddingRight:B&&!he?ge():void 0,paddingLeft:!B&&he?ge():void 0})}const k=o.useEventCallback(()=>{x&&X(x.dialog)});o.useWillUnmount(()=>{o.removeEventListener(window,"resize",k),f.current==null||f.current()});const I=()=>{v.current=!0},O=i=>{v.current&&x&&i.target===x.dialog&&(w.current=!0),v.current=!1},c=()=>{z(!0),f.current=o.transitionEnd(x.dialog,()=>{z(!1)})},Y=i=>{i.target===i.currentTarget&&c()},W=i=>{if(b==="static"){Y(i);return}if(w.current||i.target!==i.currentTarget){w.current=!1;return}T==null||T()},Oe=i=>{Q?_==null||_(i):(i.preventDefault(),b==="static"&&c())},Be=(i,B)=>{i&&X(i),D==null||D(i,B)},Ae=i=>{f.current==null||f.current(),$==null||$(i)},Se=(i,B)=>{P==null||P(i,B),o.addEventListener(window,"resize",k)},$e=i=>{i&&(i.style.display=""),K==null||K(i),o.removeEventListener(window,"resize",k)},De=d.useCallback(i=>n.jsxRuntimeExports.jsx("div",{...i,className:n.classNames(`${t}-backdrop`,G,!R&&"show")}),[R,G,t]),pe={...s,...M};pe.display="block";const Fe=i=>n.jsxRuntimeExports.jsx("div",{role:"dialog",...i,style:pe,className:n.classNames(e,t,re&&`${t}-static`,!R&&"show"),onClick:b?W:void 0,onMouseUp:O,"data-bs-theme":p,"aria-label":h,"aria-labelledby":y,"aria-describedby":N,children:n.jsxRuntimeExports.jsx(E,{...ae,onMouseDown:I,className:a,contentClassName:r,children:l})});return n.jsxRuntimeExports.jsx(Ne.Provider,{value:L,children:n.jsxRuntimeExports.jsx(tt,{show:S,ref:ie,backdrop:b,container:ee,keyboard:!0,autoFocus:H,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:Oe,onShow:Z,onHide:T,onEnter:Be,onEntering:Se,onEntered:U,onExit:Ae,onExiting:oe,onExited:$e,manager:C(),transition:R?pt:void 0,backdropTransition:R?ht:void 0,renderBackdrop:De,renderDialog:Fe})})});ke.displayName="Modal";const gt=Object.assign(ke,{Body:rt,Header:ut,Title:ft,Footer:lt,Dialog:Te,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});exports.Loading=We;exports.Modal=gt;exports.Typography=He;exports.dataAttr=Re;exports.dataProp=Ve;exports.qsa=j;exports.usePrevious=ye;
|