ingred-ui 33.14.2 → 33.14.3
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/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -741,7 +741,7 @@ var lr=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[hr
|
|
|
741
741
|
transparent 100%
|
|
742
742
|
);
|
|
743
743
|
z-index: 1;
|
|
744
|
-
`,to=e.forwardRef((({open:t,trigger:n,width:r,minWidth:a,maxHeight:i,children:o,onOpenChange:l,stickyHeader:s,stickyFooter:d,placement:u,middleware:p},f)=>{const m=L(),{isRoot:h,close:g}=e.useContext(Ue),[b,v]=e.useState(!1),x=e.useRef(null),w=e.useRef(null),[C,E]=e.useState(!1),[I,k]=e.useState(!1),M=Ua(`(max-width: ${y.MOBILE}px)`),$=e.useCallback((()=>{const e=x.current;e&&E((({scrollTop:e,scrollHeight:t,clientHeight:n,epsilon:r=1})=>!(n<=0)&&t>n&&e<t-n-r)({scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight}))}),[]),A=$,S=e.useMemo((()=>!!I||(void 0!==t?t:b)),[t,b,I]),V=e.useCallback((()=>{g(),v(!1),k(!1),null==l||l(!1)}),[g,v,k,l]),H=function(e){const t=Fr(),n=Jr(),r=Xr();return Tr((()=>{const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,r]),t}(),{refs:O,floatingStyles:D,context:R}=Ra({nodeId:H,open:S,onOpenChange:e=>{v(e),null==l||l(e)},placement:u,middleware:null!=p?p:[Nn({mainAxis:5,crossAxis:0}),Rn((()=>h?{allowedPlacements:["bottom-start","bottom-end","top-start","top-end"]}:{allowedPlacements:M?["bottom-start"]:["right-start","left-start"],autoAlignment:!1})),Zn({apply({availableWidth:e,availableHeight:t,elements:n}){let a=Math.max(0,t);if(i)if("number"==typeof i)a=Math.min(a,i);else{if(!/[a-z%]+$/i.test(i)){const e=parseFloat(i);isNaN(e)||(a=Math.min(a,e))}}Object.assign(n.floating.style,Object.assign({maxWidth:`${Math.max(0,e)}px`,maxHeight:`${a}px`},null!=r&&{width:`${r}px`}))}})],whileElementsMounted:Kn}),N=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:a,elements:{domReference:i}}=e,{enabled:o=!0,event:l="click",toggle:s=!0,ignoreMouse:d=!1,keyboardHandlers:u=!0}=t,p=c.useRef(),f=c.useRef(!1);return c.useMemo((()=>o?{reference:{onPointerDown(e){p.current=e.pointerType},onMouseDown(e){0===e.button&&(nn(p.current,!0)&&d||"click"!==l&&(!n||!s||a.current.openEvent&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){"mousedown"===l&&p.current?p.current=void 0:nn(p.current,!0)&&d||(!n||!s||a.current.openEvent&&"click"!==a.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!u||Aa(e)||(" "!==e.key||Sa(i)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&r(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||Aa(e)||Sa(i)||" "===e.key&&f.current&&(f.current=!1,r(!n||!s,e.nativeEvent,"click"))}}}:{}),[o,a,l,d,u,i,s,n,r])}(R),T=na(R,{enabled:!h,mouseOnly:!0,delay:{open:100,close:I?999999:100},restMs:100,handleClose:Ya()}),Z=Oa(R),[B,P]=e.useState(null),_=Ga(R),F=e.useRef([]),G=Fa(R,{listRef:F,activeIndex:B,onNavigate:P,loop:!0,nested:!h}),j=Xa(F,[]),{getReferenceProps:Y,getFloatingProps:W,getItemProps:X}=Na([N,T,Z,_,G]),J=[to.displayName,rt.displayName,ni.displayName,ci.displayName,mi.displayName,_i.displayName,Gi.displayName];e.useEffect((()=>{ji(n)&&O.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:n.x,y:n.y,top:n.y,left:n.x,right:n.x,bottom:n.y})})}),[n,f,O]),e.useLayoutEffect((()=>{if(!S)return
|
|
744
|
+
`,to=e.forwardRef((({open:t,trigger:n,width:r,minWidth:a,maxHeight:i,children:o,onOpenChange:l,stickyHeader:s,stickyFooter:d,placement:u,middleware:p},f)=>{const m=L(),{isRoot:h,close:g}=e.useContext(Ue),[b,v]=e.useState(!1),x=e.useRef(null),w=e.useRef(null),[C,E]=e.useState(!1),[I,k]=e.useState(!1),M=Ua(`(max-width: ${y.MOBILE}px)`),$=e.useCallback((()=>{const e=x.current;e&&E((({scrollTop:e,scrollHeight:t,clientHeight:n,epsilon:r=1})=>!(n<=0)&&t>n&&e<t-n-r)({scrollTop:e.scrollTop,scrollHeight:e.scrollHeight,clientHeight:e.clientHeight}))}),[]),A=$,S=e.useMemo((()=>!!I||(void 0!==t?t:b)),[t,b,I]),V=e.useCallback((()=>{g(),v(!1),k(!1),null==l||l(!1)}),[g,v,k,l]),H=function(e){const t=Fr(),n=Jr(),r=Xr();return Tr((()=>{const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}}),[n,t,r]),t}(),{refs:O,floatingStyles:D,context:R}=Ra({nodeId:H,open:S,onOpenChange:e=>{v(e),null==l||l(e)},placement:u,middleware:null!=p?p:[Nn({mainAxis:5,crossAxis:0}),Rn((()=>h?{allowedPlacements:["bottom-start","bottom-end","top-start","top-end"]}:{allowedPlacements:M?["bottom-start"]:["right-start","left-start"],autoAlignment:!1})),Zn({apply({availableWidth:e,availableHeight:t,elements:n}){let a=Math.max(0,t);if(i)if("number"==typeof i)a=Math.min(a,i);else{if(!/[a-z%]+$/i.test(i)){const e=parseFloat(i);isNaN(e)||(a=Math.min(a,e))}}Object.assign(n.floating.style,Object.assign({maxWidth:`${Math.max(0,e)}px`,maxHeight:`${a}px`},null!=r&&{width:`${r}px`}))}})],whileElementsMounted:Kn}),N=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:a,elements:{domReference:i}}=e,{enabled:o=!0,event:l="click",toggle:s=!0,ignoreMouse:d=!1,keyboardHandlers:u=!0}=t,p=c.useRef(),f=c.useRef(!1);return c.useMemo((()=>o?{reference:{onPointerDown(e){p.current=e.pointerType},onMouseDown(e){0===e.button&&(nn(p.current,!0)&&d||"click"!==l&&(!n||!s||a.current.openEvent&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){"mousedown"===l&&p.current?p.current=void 0:nn(p.current,!0)&&d||(!n||!s||a.current.openEvent&&"click"!==a.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!u||Aa(e)||(" "!==e.key||Sa(i)||(e.preventDefault(),f.current=!0),"Enter"===e.key&&r(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||Aa(e)||Sa(i)||" "===e.key&&f.current&&(f.current=!1,r(!n||!s,e.nativeEvent,"click"))}}}:{}),[o,a,l,d,u,i,s,n,r])}(R),T=na(R,{enabled:!h,mouseOnly:!0,delay:{open:100,close:I?999999:100},restMs:100,handleClose:Ya()}),Z=Oa(R),[B,P]=e.useState(null),_=Ga(R),F=e.useRef([]),G=Fa(R,{listRef:F,activeIndex:B,onNavigate:P,loop:!0,nested:!h}),j=Xa(F,[]),{getReferenceProps:Y,getFloatingProps:W,getItemProps:X}=Na([N,T,Z,_,G]),J=[to.displayName,rt.displayName,ni.displayName,ci.displayName,mi.displayName,_i.displayName,Gi.displayName];e.useEffect((()=>{ji(n)&&O.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:n.x,y:n.y,top:n.y,left:n.x,right:n.x,bottom:n.y})})}),[n,f,O]),e.useLayoutEffect((()=>{S||E((e=>!e&&e))}),[S]),e.useLayoutEffect((()=>{if(!S)return;const e=requestAnimationFrame((()=>{$()}));return()=>cancelAnimationFrame(e)}),[S,o,$]),e.useEffect((()=>{if(!S)return;if(!window.ResizeObserver)return;const e=x.current,t=w.current;if(!e)return;const n=new window.ResizeObserver((()=>{$()}));return n.observe(e),t&&n.observe(t),()=>{n.disconnect()}}),[S,$]);const U=e.isValidElement(n)?n.props.ref:void 0,Q=function(e){return c.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}([f,O.setReference,U]),q=!ji(n)&&e.isValidElement(n)?(()=>{const e=Object.assign({},n.props);return delete e.ref,e})():{};return c.default.createElement(c.default.Fragment,null,ji(n)?null:e.cloneElement(n,Object.assign(Object.assign(Object.assign({},q),Y()),{ref:Q})),c.default.createElement(Ur,{id:H},S&&c.default.createElement(Ia,null,c.default.createElement($a,{context:R,modal:!1,initialFocus:-1,returnFocus:!1},c.default.createElement(Wi,Object.assign({ref:O.setFloating,$maxHeight:i,style:Object.assign(Object.assign(Object.assign({},D),null!=p&&null!=r&&{width:`${r}px`}),{minWidth:null!=a?a:"auto"})},W()),c.default.createElement(Xi,null,c.default.createElement(Ue.Provider,{value:{isRoot:!1,activeIndex:B,maxActiveIndex:j,setActiveIndex:P,close:V}},c.default.createElement(hi.Provider,{value:{isSorting:I,setIsSorting:k}},s&&c.default.createElement(Ji,null,s),c.default.createElement(Qi,null,c.default.createElement(qi,{ref:x,onScroll:A},c.default.createElement(Ki,{ref:w,$hasStickyHeader:!!s,$hasStickyFooter:!!d},((e,t=!0)=>c.default.Children.toArray(e).filter((e=>{if(!c.default.isValidElement(e))return!1;const n=e.type;if(n===c.default.Fragment)return!0;const r="function"==typeof n||"object"==typeof n?n.displayName:void 0;return"ContextMenu2TriggerItem"===r||"DataTable2MenuCountControl"===r||"DataTable2MenuSpaceControl"===r||"DataTable2MenuOrderControl"===r||("ContextMenu2Container"===r||(t||("function"==typeof n||"object"==typeof n)&&J.includes(n.displayName)))})).map((e=>c.default.isValidElement(e)?c.default.cloneElement(e,Object.assign(Object.assign(Object.assign({tabIndex:B===e.key?0:-1,ref:t=>{F.current[e.key]=t}},X()),e.props),{key:e.key})):e)))(o))),C&&c.default.createElement(eo,{"aria-hidden":"true"},c.default.createElement(z,{name:"skip_down",type:"fill",size:"md",color:m.palette.black}))),d&&c.default.createElement(Ui,null,d)))))))))}));to.displayName="ContextMenu2";const no=({children:t})=>{if(!e.isValidElement(t)||"string"==typeof t.type||"function"!=typeof t.type&&"object"!=typeof t.type||!("displayName"in t.type)||t.type.displayName!==to.displayName)throw new Error("ContextMenu2Container には 1 つの ContextMenu2 しか入れられません");return c.default.createElement(Ue.Provider,{value:{isRoot:!0,close:()=>{},activeIndex:null,maxActiveIndex:-1,setActiveIndex:()=>{}}},c.default.createElement(Qr,null,t))},ro=d.default.p`
|
|
745
745
|
border-radius: 4px;
|
|
746
746
|
padding: 4px 8px;
|
|
747
747
|
margin-bottom: 8px;
|