@equisoft/design-elements-react 10.1.4-snapshot.20260420135002 → 10.1.4-snapshot.20260421164455
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/bundle.js +1 -1
- package/package.json +1 -1
package/dist/bundle.js
CHANGED
|
@@ -2501,7 +2501,7 @@
|
|
|
2501
2501
|
margin-left: var(--spacing-1x);
|
|
2502
2502
|
`,HM=({autofocus:r,buttonType:n,children:o,className:a,contentWidth:i,defaultOpen:l,disabled:s,iconName:c,iconLabel:d,inverted:u,numberOfVisibleItems:p,options:m,onMenuVisibilityChanged:h,menuPlacement:f="right",tooltip:g})=>{var b;const{t:v}=j("menu-button"),[y,_]=(0,t.useState)(!!l),k=(0,t.useRef)(null),x="right"===f?"bottom-start":"bottom-end",w=So(),M=ii({open:y,placement:x}),{x:S,y:C}=M,E=M.refs,{reference:O}=E,$=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(E,["reference"]),z=si(w),D=(0,t.useCallback)(e=>{const t=!ui(e,k.current,$.floating.current);y&&t&&_(!1)},[$.floating,y]),R=(0,t.useCallback)(()=>{_(!y)},[y]),F=(0,t.useCallback)(()=>{var e,t;y?null===(t=O.current)||void 0===t||t.blur():null===(e=O.current)||void 0===e||e.focus(),_(!y)},[y,O]);(0,t.useLayoutEffect)(()=>{null==h||h(y)},[y,h]),(0,t.useEffect)(()=>(document.addEventListener("mouseup",D),()=>document.removeEventListener("mouseup",D)),[D]);const N=c?(0,e.jsx)(Cn,{ref:$.setReference,autofocus:r,"data-testid":"menu-button",type:"button",label:null!=d?d:v("buttonAriaLabel"),"aria-haspopup":"menu","aria-expanded":y,disabled:s,buttonType:n,inverted:u,iconName:c,onClick:R}):(0,e.jsxs)(Mn,{ref:$.setReference,autofocus:r,"data-testid":"menu-button",type:"button","aria-haspopup":"menu","aria-expanded":y,disabled:s,buttonType:n,inverted:u,onClick:R,children:[o,(0,e.jsx)(VM,{"aria-hidden":"true","data-testid":"chevron-icon",name:y?"chevronUp":"chevronDown",size:"16"})]}),P=g?(0,e.jsx)(vd,Object.assign({},g,{disabled:y,children:N})):N;return(0,e.jsxs)("div",{className:a,ref:k,onKeyDown:e=>{var t;"Tab"!==e.key&&"Escape"!==e.key||(null===(t=O.current)||void 0===t||t.focus(),_(!1))},children:[P,y&&(0,so.createPortal)((0,e.jsx)(IM,{ref:$.setFloating,numberOfVisibleItems:p,options:m,onOptionSelect:F,$left:`${S}px`,$referenceWidth:null===(b=O.current)||void 0===b?void 0:b.offsetWidth,$top:`${C}px`,$width:i}),z)]})};HM.displayName="MenuButton";var UM=c(373),qM=c.n(UM),BM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function WM({$noPadding:e,isMobile:t}){return e?"0":t?"var(--spacing-2x)":"var(--spacing-4x)"}function YM({$noPadding:e,isMobile:t}){return e?"0":t?"var(--spacing-2x)":"var(--spacing-3x)"}const GM=a()(qM())`
|
|
2503
2503
|
background-color: ${({theme:e})=>e.component["modal-background-color"]};
|
|
2504
|
-
border-radius: var(--border-radius-
|
|
2504
|
+
border-radius: var(--border-radius-4x);
|
|
2505
2505
|
box-shadow: 0 6px 10px 0 rgb(0 0 0 / 10%);
|
|
2506
2506
|
box-sizing: border-box;
|
|
2507
2507
|
display: flex;
|
package/package.json
CHANGED