@zonos/amino 5.1.37 → 5.1.38

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.
@@ -1 +1 @@
1
- "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var i=require("styled-components"),t=require("../../animations/DropdownAnimation.js"),o=require("../../styles/constants/theme.js"),r=require("../../utils/hooks/useDropdown.js");function a(e){return e&&e.__esModule?e:{default:e}}require("@floating-ui/react");var s,d,l=a(i),u=l.default.div(s||(s=e.__makeTemplateObject(["\n position: relative;\n display: inline-flex;\n"],["\n position: relative;\n display: inline-flex;\n"]))),c=l.default.div(d||(d=e.__makeTemplateObject(["\n background: ",";\n border: ",";\n padding: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: "," 0;\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"],["\n background: ",";\n border: ",";\n padding: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: "," 0;\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"])),o.theme.surfaceColor,o.theme.border,o.theme.space24,o.theme.radius6,o.theme.v3ShadowLarge,t.DropdownAnimation,o.theme.radius6,o.theme.space8);exports.MenuButton=function(i){var t=i.action,o=i.children,a=i.className,s=i.closeOnMouseLeave,d=void 0===s||s,l=i.closeOnSelect,m=void 0===l||l,f=r.useDropdown({offsetCrossAxis:0,offsetMainAxis:0}),h=f.floatingStyles,p=f.refs,b=f.setVisible,v=f.visibility,g=f.visible,x=f.wrapperRef,w=function(){m&&b(!1)};return n.jsxs(u,{ref:x,className:a,onMouseLeave:function(){d&&b(!1)},children:[n.jsx("div",{ref:p.setReference,onClick:function(e){e.stopPropagation(),b(!0)},onKeyDown:function(e){"Enter"===e.key&&b(!0)},role:"button",tabIndex:0,children:t}),n.jsx("div",{ref:p.setFloating,style:e.__assign(e.__assign({},h),{visibility:v}),children:g&&n.jsx(c,{onClick:w,onKeyDown:function(e){"Enter"===e.key&&w()},role:"button",tabIndex:-1,children:o})})]})};
1
+ "use strict";var e=require("../../_tslib-ccfac372.js"),n=require("react/jsx-runtime");require("react");var i=require("styled-components"),t=require("../../animations/DropdownAnimation.js"),o=require("../../styles/constants/theme.js"),r=require("../../utils/hooks/useDropdown.js");function a(e){return e&&e.__esModule?e:{default:e}}require("@floating-ui/react");var s,d,l,u=a(i),c=u.default.div(s||(s=e.__makeTemplateObject(["\n position: relative;\n display: inline-flex;\n"],["\n position: relative;\n display: inline-flex;\n"]))),m=u.default.div(d||(d=e.__makeTemplateObject(["\n z-index: 10;\n"],["\n z-index: 10;\n"]))),f=u.default.div(l||(l=e.__makeTemplateObject(["\n background: ",";\n border: ",";\n padding: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: "," 0;\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"],["\n background: ",";\n border: ",";\n padding: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: "," 0;\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"])),o.theme.surfaceColor,o.theme.border,o.theme.space24,o.theme.radius6,o.theme.v3ShadowLarge,t.DropdownAnimation,o.theme.radius6,o.theme.space8);exports.MenuButton=function(i){var t=i.action,o=i.children,a=i.className,s=i.closeOnMouseLeave,d=void 0===s||s,l=i.closeOnSelect,u=void 0===l||l,h=r.useDropdown({offsetCrossAxis:0,offsetMainAxis:0}),p=h.floatingStyles,b=h.refs,v=h.setVisible,x=h.visibility,g=h.visible,w=h.wrapperRef,_=function(){u&&v(!1)};return n.jsxs(c,{ref:w,className:a,onMouseLeave:function(){d&&v(!1)},children:[n.jsx("div",{ref:b.setReference,onClick:function(e){e.stopPropagation(),v(!0)},onKeyDown:function(e){"Enter"===e.key&&v(!0)},role:"button",tabIndex:0,children:t}),n.jsx(m,{ref:b.setFloating,style:e.__assign(e.__assign({},p),{visibility:x}),children:g&&n.jsx(f,{onClick:_,onKeyDown:function(e){"Enter"===e.key&&_()},role:"button",tabIndex:-1,children:o})})]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "5.1.37",
3
+ "version": "5.1.38",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",