@cgi-learning-hub/ui 1.6.0-dev.1747671610 → 1.6.0-dev.1747901007
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/{Alert-DW8yCR-B.cjs → Alert-B42sqOEW.cjs} +1 -1
- package/dist/{Alert-PmI169Dq.js → Alert-DBgzh1CV.js} +1 -1
- package/dist/{Autocomplete-D9hZ2wrR.cjs → Autocomplete-DWREh3mY.cjs} +4 -4
- package/dist/{Autocomplete-BIBR54X2.js → Autocomplete-vH2Up7_E.js} +35 -41
- package/dist/{Backdrop-3TL73mAe.cjs → Backdrop-B8Ka5yhn.cjs} +1 -1
- package/dist/{Backdrop-BxgGvlLM.js → Backdrop-DUGb_yNd.js} +1 -1
- package/dist/Badge-CFFO4PIE.cjs +1 -0
- package/dist/Badge-DqMmgJeU.js +457 -0
- package/dist/{Checkbox-p-PKpEw_.js → Checkbox-TS65wodp.js} +2 -2
- package/dist/{Checkbox-XXqW_dbW.cjs → Checkbox-l0TyVwps.cjs} +1 -1
- package/dist/{CustomTreeItem-hIRSCwAW.js → CustomTreeItem-CGYxgQZu.js} +3 -3
- package/dist/{CustomTreeItem-DPyfIueW.cjs → CustomTreeItem-DkOmd2ol.cjs} +1 -1
- package/dist/{DatePicker-BMzW4v1g.js → DatePicker-Bw2Q4r7J.js} +8 -8
- package/dist/{DatePicker-CNhBoaI3.cjs → DatePicker-ehvdOpes.cjs} +1 -1
- package/dist/{Dialog-B2LKe7ZM.cjs → Dialog-D6WzY_HJ.cjs} +1 -1
- package/dist/{Dialog-BzsWl6Vl.js → Dialog-TIA9lSzZ.js} +3 -3
- package/dist/{DialogTitle-SwUSpeBT.cjs → DialogTitle-3J6aq9qI.cjs} +1 -1
- package/dist/{DialogTitle-CVvztEM0.js → DialogTitle-Dwy3CaSV.js} +1 -1
- package/dist/{ListItemText-B8jlTz59.cjs → ListItemText-C4HujomF.cjs} +1 -1
- package/dist/{ListItemText-BeyHu1da.js → ListItemText-CpNLkk9h.js} +1 -1
- package/dist/{Menu-By6cOqEO.js → Menu-B43ouCWx.js} +3 -3
- package/dist/{Menu-BjrN8rMF.cjs → Menu-DL9W9Ad_.cjs} +1 -1
- package/dist/Modal-DheFVbb9.cjs +2 -0
- package/dist/{Modal-vrLLqk9Y.js → Modal-GbNoYWDt.js} +5 -4
- package/dist/{Popper-yO_RaCbM.cjs → Popper-Bzo9-6GK.cjs} +1 -1
- package/dist/{Popper-DfwuvxaQ.js → Popper-CpecBTnq.js} +1 -1
- package/dist/{Radio-BqY-su_F.js → Radio-CcP--hXF.js} +2 -2
- package/dist/{Radio-C7zzpRFc.cjs → Radio-DyOcq-qZ.cjs} +1 -1
- package/dist/{RadioGroup-BQvlYFpE.js → RadioGroup-CYy8kuyP.js} +1 -1
- package/dist/{RadioGroup-BlUWRmLG.cjs → RadioGroup-CfxZyChX.cjs} +1 -1
- package/dist/{Select-Doay7ukI.cjs → Select-AcDK5nam.cjs} +1 -1
- package/dist/{Select-DZMwqCYA.js → Select-DaVDiPRr.js} +1 -1
- package/dist/{Switch-CEfqaD33.cjs → Switch-Bsi_5s-3.cjs} +1 -1
- package/dist/{Switch-Bg4QB4PJ.js → Switch-CFOFmdXw.js} +2 -2
- package/dist/{SwitchBase-DvCITKv8.cjs → SwitchBase-BAC5BgOW.cjs} +1 -1
- package/dist/{SwitchBase-EDFBMPd7.js → SwitchBase-BznD_7MN.js} +1 -1
- package/dist/{Tab-52AkFc9v.js → Tab-DXSeiuQu.js} +2 -2
- package/dist/{Tab-C6H241Pf.cjs → Tab-zTI8Z8pR.cjs} +1 -1
- package/dist/{TextField-bE2NUKKK.cjs → TextField-C8VKBQV3.cjs} +1 -1
- package/dist/{TextField-DG9mRp_m.js → TextField-J1kMLPQz.js} +2 -2
- package/dist/{Badge-rX7YUmBc.js → ToggleButtonGroup-BLPwuacW.js} +2492 -2937
- package/dist/ToggleButtonGroup-D5EDQM0v.cjs +138 -0
- package/dist/{Tooltip-DCgaU2em.js → Tooltip-Cl2Ew6vp.js} +2 -2
- package/dist/{Tooltip-D_w-IJoD.cjs → Tooltip-DXI1DHeO.cjs} +1 -1
- package/dist/components/Alert/Alert.cjs.js +1 -1
- package/dist/components/Alert/Alert.es.js +1 -1
- package/dist/components/Alert/index.cjs.js +1 -1
- package/dist/components/Alert/index.es.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +1 -1
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dialog/Dialog.cjs.js +1 -1
- package/dist/components/Dialog/Dialog.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.cjs.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +1 -1
- package/dist/components/TreeView/TreeView.cjs.js +1 -1
- package/dist/components/TreeView/TreeView.es.js +4 -4
- package/dist/components/TreeView/components/CustomTreeItem.cjs.js +1 -1
- package/dist/components/TreeView/components/CustomTreeItem.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.es.js +400 -399
- package/dist/components/stories/Alert.stories.cjs.js +1 -1
- package/dist/components/stories/Alert.stories.es.js +1 -1
- package/dist/components/stories/Autocomplete.stories.cjs.js +1 -1
- package/dist/components/stories/Autocomplete.stories.es.js +2 -2
- package/dist/components/stories/Badge.stories.cjs.js +1 -0
- package/dist/components/stories/Badge.stories.d.ts +17 -0
- package/dist/components/stories/Badge.stories.es.js +161 -0
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +1 -1
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
- package/dist/components/stories/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -1
- package/dist/components/stories/FormControlLabel.stories.es.js +3 -3
- package/dist/components/stories/Menu.stories.cjs.js +1 -1
- package/dist/components/stories/Menu.stories.es.js +1 -1
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
- package/dist/components/stories/RadioGroup.stories.es.js +2 -2
- package/dist/components/stories/Select.stories.cjs.js +1 -1
- package/dist/components/stories/Select.stories.es.js +1 -1
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +1 -1
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +1 -1
- package/dist/components/stories/Tooltip.stories.cjs.js +1 -1
- package/dist/components/stories/Tooltip.stories.es.js +1 -1
- package/dist/components/stories/TreeView.stories.cjs.js +1 -1
- package/dist/components/stories/TreeView.stories.es.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +400 -399
- package/dist/resolveComponentProps-DWSW1fip.cjs +1 -0
- package/dist/resolveComponentProps-GCsHjsGW.js +80 -0
- package/dist/usePreviousProps-ByGlbpJ6.js +10 -0
- package/dist/usePreviousProps-jC3PWcIp.cjs +1 -0
- package/dist/useSlot-DhqI4pZ8.cjs +1 -0
- package/dist/useSlot-WWh43uDP.js +48 -0
- package/dist/{useSlotProps-B_D8u0j-.js → useSlotProps-CSfMm_AK.js} +1 -1
- package/dist/useSlotProps-CrmlYV9C.cjs +1 -0
- package/package.json +1 -1
- package/dist/Badge-DhyDno9j.cjs +0 -138
- package/dist/Modal-DxwlW5NV.cjs +0 -2
- package/dist/useSlot-BDb1lvxu.js +0 -125
- package/dist/useSlot-W0PiuVaZ.cjs +0 -1
- package/dist/useSlotProps-OhEflPiz.cjs +0 -1
package/dist/Modal-DxwlW5NV.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const he=require("react"),n=require("./index-DLnSn8GT.cjs"),_=require("./generateUtilityClasses-CMlilM6r.cjs"),Pe=require("./memoTheme-BAbn60Cb.cjs"),V=require("./ownerWindow-DDHucZi0.cjs"),A=require("./ownerDocument-4MViGo3k.cjs"),ce=require("./useForkRef-CFhhTu-Q.cjs"),oe=require("./useEventCallback-BxpcFap0.cjs"),ne=require("./createChainedFunction-CJmlQuW8.cjs"),X=require("./useSlot-W0PiuVaZ.cjs"),F=require("react/jsx-runtime"),$=require("./DefaultPropsProvider-B1crdkTC.cjs"),J=require("./Portal-B5KqLEa0.cjs"),Q=require("./getReactElementRef-EVJnBPlV.cjs"),ge=require("./Backdrop-3TL73mAe.cjs");function Ee(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const u=Ee(he);function ae(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Re(e){const t=A.ownerDocument(e);return t.body===e?V.ownerWindow(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function B(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function re(e){return parseInt(V.ownerWindow(e).getComputedStyle(e).paddingRight,10)||0}function xe(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function se(e,t,r,o,i){const s=[t,r,...o];[].forEach.call(e.children,c=>{const a=!s.includes(c),b=!xe(c);a&&b&&B(c,i)})}function G(e,t){let r=-1;return e.some((o,i)=>t(o)?(r=i,!0):!1),r}function ve(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(Re(o)){const c=ae(V.ownerWindow(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${re(o)+c}px`;const a=A.ownerDocument(o).querySelectorAll(".mui-fixed");[].forEach.call(a,b=>{r.push({value:b.style.paddingRight,property:"padding-right",el:b}),b.style.paddingRight=`${re(b)+c}px`})}let s;if(o.parentNode instanceof DocumentFragment)s=A.ownerDocument(o).body;else{const c=o.parentElement,a=V.ownerWindow(o);s=(c==null?void 0:c.nodeName)==="HTML"&&a.getComputedStyle(c).overflowY==="scroll"?c:o}r.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{r.forEach(({value:s,el:c,property:a})=>{s?c.style.setProperty(a,s):c.style.removeProperty(a)})}}function ke(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class le{constructor(){this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&B(t.modalRef,!1);const i=ke(r);se(r,t.mount,t.modalRef,i,!0);const s=G(this.containers,c=>c.container===r);return s!==-1?(this.containers[s].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:i}),o)}mount(t,r){const o=G(this.containers,s=>s.modals.includes(t)),i=this.containers[o];i.restore||(i.restore=ve(i,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const i=G(this.containers,c=>c.modals.includes(t)),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(o,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&B(t.modalRef,r),se(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const c=s.modals[s.modals.length-1];c.modalRef&&B(c.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const we=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Ne(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Ce(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function Ie(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Ce(e))}function Se(e){const t=[],r=[];return Array.from(e.querySelectorAll(we)).forEach((o,i)=>{const s=Ne(o);s===-1||!Ie(o)||(s===0?t.push(o):r.push({documentOrder:i,tabIndex:s,node:o}))}),r.sort((o,i)=>o.tabIndex===i.tabIndex?o.documentOrder-i.documentOrder:o.tabIndex-i.tabIndex).map(o=>o.node).concat(t)}function Fe(){return!0}function U(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:s=Se,isEnabled:c=Fe,open:a}=e,b=u.useRef(!1),h=u.useRef(null),v=u.useRef(null),T=u.useRef(null),g=u.useRef(null),y=u.useRef(!1),f=u.useRef(null),M=ce.useForkRef(Q.getReactElementRef(t),f),N=u.useRef(null);u.useEffect(()=>{!a||!f.current||(y.current=!r)},[r,a]),u.useEffect(()=>{if(!a||!f.current)return;const l=A.ownerDocument(f.current);return f.current.contains(l.activeElement)||(f.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
2
|
-
`)),f.current.setAttribute("tabIndex","-1")),y.current&&f.current.focus()),()=>{i||(T.current&&T.current.focus&&(b.current=!0,T.current.focus()),T.current=null)}},[a]),u.useEffect(()=>{if(!a||!f.current)return;const l=A.ownerDocument(f.current),m=P=>{N.current=P,!(o||!c()||P.key!=="Tab")&&l.activeElement===f.current&&P.shiftKey&&(b.current=!0,v.current&&v.current.focus())},k=()=>{var E,O;const P=f.current;if(P===null)return;if(!l.hasFocus()||!c()||b.current){b.current=!1;return}if(P.contains(l.activeElement)||o&&l.activeElement!==h.current&&l.activeElement!==v.current)return;if(l.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!y.current)return;let I=[];if((l.activeElement===h.current||l.activeElement===v.current)&&(I=s(f.current)),I.length>0){const j=!!((E=N.current)!=null&&E.shiftKey&&((O=N.current)==null?void 0:O.key)==="Tab"),K=I[0],q=I[I.length-1];typeof K!="string"&&typeof q!="string"&&(j?q.focus():K.focus())}else P.focus()};l.addEventListener("focusin",k),l.addEventListener("keydown",m,!0);const D=setInterval(()=>{l.activeElement&&l.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(D),l.removeEventListener("focusin",k),l.removeEventListener("keydown",m,!0)}},[r,o,i,c,a,s]);const C=l=>{T.current===null&&(T.current=l.relatedTarget),y.current=!0,g.current=l.target;const m=t.props.onFocus;m&&m(l)},R=l=>{T.current===null&&(T.current=l.relatedTarget),y.current=!0};return F.jsxs(u.Fragment,{children:[F.jsx("div",{tabIndex:a?0:-1,onFocus:R,ref:h,"data-testid":"sentinelStart"}),u.cloneElement(t,{ref:M,onFocus:C}),F.jsx("div",{tabIndex:a?0:-1,onFocus:R,ref:v,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(U.propTypes={children:Q.elementAcceptingRef,disableAutoFocus:n.PropTypes.bool,disableEnforceFocus:n.PropTypes.bool,disableRestoreFocus:n.PropTypes.bool,getTabbable:n.PropTypes.func,isEnabled:n.PropTypes.func,open:n.PropTypes.bool.isRequired});process.env.NODE_ENV!=="production"&&(U.propTypes=J.exactProp(U.propTypes));function Me(e){return typeof e=="function"?e():e}function Oe(e){return e?e.props.hasOwnProperty("in"):!1}const ie=()=>{},z=new le;function Ae(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:c,children:a,onClose:b,open:h,rootRef:v}=e,T=u.useRef({}),g=u.useRef(null),y=u.useRef(null),f=ce.useForkRef(y,v),[M,N]=u.useState(!h),C=Oe(a);let R=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(R=!1);const l=()=>A.ownerDocument(g.current),m=()=>(T.current.modalRef=y.current,T.current.mount=g.current,T.current),k=()=>{z.mount(m(),{disableScrollLock:o}),y.current&&(y.current.scrollTop=0)},D=oe.useEventCallback(()=>{const p=Me(t)||l().body;z.add(m(),p),y.current&&k()}),P=()=>z.isTopModal(m()),I=oe.useEventCallback(p=>{g.current=p,p&&(h&&P()?k():y.current&&B(y.current,R))}),E=u.useCallback(()=>{z.remove(m(),R)},[R]);u.useEffect(()=>()=>{E()},[E]),u.useEffect(()=>{h?D():(!C||!i)&&E()},[h,E,C,i,D]);const O=p=>d=>{var x;(x=p.onKeyDown)==null||x.call(p,d),!(d.key!=="Escape"||d.which===229||!P())&&(r||(d.stopPropagation(),b&&b(d,"escapeKeyDown")))},j=p=>d=>{var x;(x=p.onClick)==null||x.call(p,d),d.target===d.currentTarget&&b&&b(d,"backdropClick")};return{getRootProps:(p={})=>{const d=X.extractEventHandlers(e);delete d.onTransitionEnter,delete d.onTransitionExited;const x={...d,...p};return{role:"presentation",...x,onKeyDown:O(x),ref:f}},getBackdropProps:(p={})=>{const d=p;return{"aria-hidden":!0,...d,onClick:j(d),open:h}},getTransitionProps:()=>{const p=()=>{N(!1),s&&s()},d=()=>{N(!0),c&&c(),i&&E()};return{onEnter:ne.createChainedFunction(p,(a==null?void 0:a.props.onEnter)??ie),onExited:ne.createChainedFunction(d,(a==null?void 0:a.props.onExited)??ie)}},rootRef:f,portalRef:I,isTopModal:P,exited:M,hasTransition:C}}function ue(e){return _.generateUtilityClass("MuiModal",e)}const De=_.generateUtilityClasses("MuiModal",["root","hidden","backdrop"]),je=e=>{const{open:t,exited:r,classes:o}=e,i={root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]};return $.composeClasses(i,ue,o)},qe=$.styled("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(Pe.memoTheme(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),Le=$.styled(ge.Backdrop,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),de=u.forwardRef(function(t,r){const o=$.useDefaultProps({name:"MuiModal",props:t}),{BackdropComponent:i=Le,BackdropProps:s,classes:c,className:a,closeAfterTransition:b=!1,children:h,container:v,component:T,components:g={},componentsProps:y={},disableAutoFocus:f=!1,disableEnforceFocus:M=!1,disableEscapeKeyDown:N=!1,disablePortal:C=!1,disableRestoreFocus:R=!1,disableScrollLock:l=!1,hideBackdrop:m=!1,keepMounted:k=!1,onClose:D,onTransitionEnter:P,onTransitionExited:I,open:E,slotProps:O={},slots:j={},theme:K,...q}=o,H={...o,closeAfterTransition:b,disableAutoFocus:f,disableEnforceFocus:M,disableEscapeKeyDown:N,disablePortal:C,disableRestoreFocus:R,disableScrollLock:l,hideBackdrop:m,keepMounted:k},{getRootProps:p,getBackdropProps:d,getTransitionProps:x,portalRef:pe,isTopModal:fe,exited:Z,hasTransition:ee}=Ae({...H,rootRef:r}),L={...H,exited:Z},w=je(L),W={};if(h.props.tabIndex===void 0&&(W.tabIndex="-1"),ee){const{onEnter:S,onExited:Y}=x();W.onEnter=S,W.onExited=Y}const te={slots:{root:g.Root,backdrop:g.Backdrop,...j},slotProps:{...y,...O}},[be,ye]=X.useSlot("root",{ref:r,elementType:qe,externalForwardedProps:{...te,...q,component:T},getSlotProps:p,ownerState:L,className:_.clsx(a,w==null?void 0:w.root,!L.open&&L.exited&&(w==null?void 0:w.hidden))}),[Te,me]=X.useSlot("backdrop",{ref:s==null?void 0:s.ref,elementType:i,externalForwardedProps:te,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:S=>d({...S,onClick:Y=>{S!=null&&S.onClick&&S.onClick(Y)}}),className:_.clsx(s==null?void 0:s.className,w==null?void 0:w.backdrop),ownerState:L});return!k&&!E&&(!ee||Z)?null:F.jsx(J.Portal,{ref:pe,container:v,disablePortal:C,children:F.jsxs(be,{...ye,children:[!m&&i?F.jsx(Te,{...me}):null,F.jsx(U,{disableEnforceFocus:M,disableAutoFocus:f,disableRestoreFocus:R,isEnabled:fe,open:E,children:u.cloneElement(h,W)})]})})});process.env.NODE_ENV!=="production"&&(de.propTypes={BackdropComponent:n.PropTypes.elementType,BackdropProps:n.PropTypes.object,children:Q.elementAcceptingRef.isRequired,classes:n.PropTypes.object,className:n.PropTypes.string,closeAfterTransition:n.PropTypes.bool,component:n.PropTypes.elementType,components:n.PropTypes.shape({Backdrop:n.PropTypes.elementType,Root:n.PropTypes.elementType}),componentsProps:n.PropTypes.shape({backdrop:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),root:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object])}),container:n.PropTypes.oneOfType([J.HTMLElementType,n.PropTypes.func]),disableAutoFocus:n.PropTypes.bool,disableEnforceFocus:n.PropTypes.bool,disableEscapeKeyDown:n.PropTypes.bool,disablePortal:n.PropTypes.bool,disableRestoreFocus:n.PropTypes.bool,disableScrollLock:n.PropTypes.bool,hideBackdrop:n.PropTypes.bool,keepMounted:n.PropTypes.bool,onClose:n.PropTypes.func,onTransitionEnter:n.PropTypes.func,onTransitionExited:n.PropTypes.func,open:n.PropTypes.bool.isRequired,slotProps:n.PropTypes.shape({backdrop:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object]),root:n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object])}),slots:n.PropTypes.shape({backdrop:n.PropTypes.elementType,root:n.PropTypes.elementType}),sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object])});exports.FocusTrap=U;exports.Modal=de;exports.ModalManager=le;exports.getModalUtilityClass=ue;exports.getScrollbarSize=ae;exports.modalClasses=De;
|
package/dist/useSlot-BDb1lvxu.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { H as C } from "./generateUtilityClasses-DngCqveO.js";
|
|
2
|
-
import { u as O } from "./useForkRef-u29GSuCu.js";
|
|
3
|
-
function R(e) {
|
|
4
|
-
return typeof e == "string";
|
|
5
|
-
}
|
|
6
|
-
function A(e, c, t) {
|
|
7
|
-
return e === void 0 || R(e) ? c : {
|
|
8
|
-
...c,
|
|
9
|
-
ownerState: {
|
|
10
|
-
...c.ownerState,
|
|
11
|
-
...t
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function T(e, c = []) {
|
|
16
|
-
if (e === void 0)
|
|
17
|
-
return {};
|
|
18
|
-
const t = {};
|
|
19
|
-
return Object.keys(e).filter((n) => n.match(/^on[A-Z]/) && typeof e[n] == "function" && !c.includes(n)).forEach((n) => {
|
|
20
|
-
t[n] = e[n];
|
|
21
|
-
}), t;
|
|
22
|
-
}
|
|
23
|
-
function E(e) {
|
|
24
|
-
if (e === void 0)
|
|
25
|
-
return {};
|
|
26
|
-
const c = {};
|
|
27
|
-
return Object.keys(e).filter((t) => !(t.match(/^on[A-Z]/) && typeof e[t] == "function")).forEach((t) => {
|
|
28
|
-
c[t] = e[t];
|
|
29
|
-
}), c;
|
|
30
|
-
}
|
|
31
|
-
function W(e) {
|
|
32
|
-
const {
|
|
33
|
-
getSlotProps: c,
|
|
34
|
-
additionalProps: t,
|
|
35
|
-
externalSlotProps: n,
|
|
36
|
-
externalForwardedProps: s,
|
|
37
|
-
className: m
|
|
38
|
-
} = e;
|
|
39
|
-
if (!c) {
|
|
40
|
-
const l = C(t == null ? void 0 : t.className, m, s == null ? void 0 : s.className, n == null ? void 0 : n.className), o = {
|
|
41
|
-
...t == null ? void 0 : t.style,
|
|
42
|
-
...s == null ? void 0 : s.style,
|
|
43
|
-
...n == null ? void 0 : n.style
|
|
44
|
-
}, i = {
|
|
45
|
-
...t,
|
|
46
|
-
...s,
|
|
47
|
-
...n
|
|
48
|
-
};
|
|
49
|
-
return l.length > 0 && (i.className = l), Object.keys(o).length > 0 && (i.style = o), {
|
|
50
|
-
props: i,
|
|
51
|
-
internalRef: void 0
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const y = T({
|
|
55
|
-
...s,
|
|
56
|
-
...n
|
|
57
|
-
}), a = E(n), g = E(s), f = c(y), u = C(f == null ? void 0 : f.className, t == null ? void 0 : t.className, m, s == null ? void 0 : s.className, n == null ? void 0 : n.className), h = {
|
|
58
|
-
...f == null ? void 0 : f.style,
|
|
59
|
-
...t == null ? void 0 : t.style,
|
|
60
|
-
...s == null ? void 0 : s.style,
|
|
61
|
-
...n == null ? void 0 : n.style
|
|
62
|
-
}, r = {
|
|
63
|
-
...f,
|
|
64
|
-
...t,
|
|
65
|
-
...g,
|
|
66
|
-
...a
|
|
67
|
-
};
|
|
68
|
-
return u.length > 0 && (r.className = u), Object.keys(h).length > 0 && (r.style = h), {
|
|
69
|
-
props: r,
|
|
70
|
-
internalRef: f.ref
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function Z(e, c, t) {
|
|
74
|
-
return typeof e == "function" ? e(c, t) : e;
|
|
75
|
-
}
|
|
76
|
-
function S(e, c) {
|
|
77
|
-
const {
|
|
78
|
-
className: t,
|
|
79
|
-
elementType: n,
|
|
80
|
-
ownerState: s,
|
|
81
|
-
externalForwardedProps: m,
|
|
82
|
-
internalForwardedProps: y,
|
|
83
|
-
shouldForwardComponentProp: a = !1,
|
|
84
|
-
...g
|
|
85
|
-
} = c, {
|
|
86
|
-
component: f,
|
|
87
|
-
slots: u = {
|
|
88
|
-
[e]: void 0
|
|
89
|
-
},
|
|
90
|
-
slotProps: h = {
|
|
91
|
-
[e]: void 0
|
|
92
|
-
},
|
|
93
|
-
...r
|
|
94
|
-
} = m, l = u[e] || n, o = Z(h[e], s), {
|
|
95
|
-
props: {
|
|
96
|
-
component: i,
|
|
97
|
-
...H
|
|
98
|
-
},
|
|
99
|
-
internalRef: d
|
|
100
|
-
} = W({
|
|
101
|
-
className: t,
|
|
102
|
-
...g,
|
|
103
|
-
externalForwardedProps: e === "root" ? r : void 0,
|
|
104
|
-
externalSlotProps: o
|
|
105
|
-
}), k = O(d, o == null ? void 0 : o.ref, c.ref), N = e === "root" ? i || f : i, v = A(l, {
|
|
106
|
-
...e === "root" && !f && !u[e] && y,
|
|
107
|
-
...e !== "root" && !u[e] && y,
|
|
108
|
-
...H,
|
|
109
|
-
...N && !a && {
|
|
110
|
-
as: N
|
|
111
|
-
},
|
|
112
|
-
...N && a && {
|
|
113
|
-
component: N
|
|
114
|
-
},
|
|
115
|
-
ref: k
|
|
116
|
-
}, s);
|
|
117
|
-
return [l, v];
|
|
118
|
-
}
|
|
119
|
-
export {
|
|
120
|
-
A as a,
|
|
121
|
-
T as e,
|
|
122
|
-
W as m,
|
|
123
|
-
Z as r,
|
|
124
|
-
S as u
|
|
125
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const C=require("./generateUtilityClasses-CMlilM6r.cjs"),w=require("./useForkRef-CFhhTu-Q.cjs");function A(e){return typeof e=="string"}function d(e,c,t){return e===void 0||A(e)?c:{...c,ownerState:{...c.ownerState,...t}}}function v(e,c=[]){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!c.includes(n)).forEach(n=>{t[n]=e[n]}),t}function E(e){if(e===void 0)return{};const c={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]=="function")).forEach(t=>{c[t]=e[t]}),c}function H(e){const{getSlotProps:c,additionalProps:t,externalSlotProps:n,externalForwardedProps:s,className:y}=e;if(!c){const i=C.clsx(t==null?void 0:t.className,y,s==null?void 0:s.className,n==null?void 0:n.className),f={...t==null?void 0:t.style,...s==null?void 0:s.style,...n==null?void 0:n.style},r={...t,...s,...n};return i.length>0&&(r.className=i),Object.keys(f).length>0&&(r.style=f),{props:r,internalRef:void 0}}const m=v({...s,...n}),a=E(n),N=E(s),o=c(m),u=C.clsx(o==null?void 0:o.className,t==null?void 0:t.className,y,s==null?void 0:s.className,n==null?void 0:n.className),g={...o==null?void 0:o.style,...t==null?void 0:t.style,...s==null?void 0:s.style,...n==null?void 0:n.style},l={...o,...t,...N,...a};return u.length>0&&(l.className=u),Object.keys(g).length>0&&(l.style=g),{props:l,internalRef:o.ref}}function k(e,c,t){return typeof e=="function"?e(c,t):e}function T(e,c){const{className:t,elementType:n,ownerState:s,externalForwardedProps:y,internalForwardedProps:m,shouldForwardComponentProp:a=!1,...N}=c,{component:o,slots:u={[e]:void 0},slotProps:g={[e]:void 0},...l}=y,i=u[e]||n,f=k(g[e],s),{props:{component:r,...O},internalRef:R}=H({className:t,...N,externalForwardedProps:e==="root"?l:void 0,externalSlotProps:f}),S=w.useForkRef(R,f==null?void 0:f.ref,c.ref),h=e==="root"?r||o:r,q=d(i,{...e==="root"&&!o&&!u[e]&&m,...e!=="root"&&!u[e]&&m,...O,...h&&!a&&{as:h},...h&&a&&{component:h},ref:S},s);return[i,q]}exports.appendOwnerState=d;exports.extractEventHandlers=v;exports.mergeSlotProps=H;exports.resolveComponentProps=k;exports.useSlot=T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const o=require("./useSlot-W0PiuVaZ.cjs"),f=require("./useForkRef-CFhhTu-Q.cjs");function P(r){var s;const{elementType:n,externalSlotProps:p,ownerState:t,skipResolvingSlotProps:l=!1,...u}=r,e=l?{}:o.resolveComponentProps(p,t),{props:c,internalRef:i}=o.mergeSlotProps({...u,externalSlotProps:e}),S=f.useForkRef(i,e==null?void 0:e.ref,(s=r.additionalProps)==null?void 0:s.ref);return o.appendOwnerState(n,{...c,ref:S},t)}exports.useSlotProps=P;
|