@zonos/amino 5.1.43 → 5.1.44
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"),
|
|
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"),a=require("../../utils/hooks/useDropdown.js");function s(e){return e&&e.__esModule?e:{default:e}}require("@floating-ui/react");var r,l,d,u=s(i),c=u.default.div(r||(r=e.__makeTemplateObject(["\n position: relative;\n display: inline-flex;\n"],["\n position: relative;\n display: inline-flex;\n"]))),m=u.default.div(l||(l=e.__makeTemplateObject(["\n z-index: 10;\n"],["\n z-index: 10;\n"]))),f=u.default.div(d||(d=e.__makeTemplateObject(["\n background: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: ",";\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"],["\n background: ",";\n border-radius: ",";\n box-shadow: ",";\n animation: "," 250ms ease-in-out;\n animation-fill-mode: both;\n padding: ",";\n margin-top: ",";\n right: 0;\n min-width: 100%;\n width: max-content;\n"])),o.theme.surfaceColor,o.theme.radius12,o.theme.v3ShadowLarge,t.DropdownAnimation,o.theme.space8,o.theme.space4);exports.MenuButton=function(i){var t=i.action,o=i.children,s=i.className,r=i.closeOnMouseLeave,l=void 0===r||r,d=i.closeOnSelect,u=void 0===d||d,h=a.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:s,onMouseLeave:function(){l&&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})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),r=require("styled-components"),t=require("../../styles/constants/theme.js");function i(n){return n&&n.__esModule?n:{default:n}}var s,a=i(r).default.li(s||(s=n.__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: ",";\n line-height: 24px;\n user-select: none;\n cursor: pointer;\n border-radius: ",";\n font-size: ",";\n\n &:hover {\n background: ",";\n }\n\n a {\n width: 100%;\n display: block;\n }\n\n svg {\n margin-right: ",";\n }\n\n [data-theme='night'] & {\n &:hover {\n background: ",";\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding: ",";\n line-height: 24px;\n user-select: none;\n cursor: pointer;\n border-radius: ",";\n font-size: ",";\n\n &:hover {\n background: ",";\n }\n\n a {\n width: 100%;\n display: block;\n }\n\n svg {\n margin-right: ",";\n }\n\n [data-theme='night'] & {\n &:hover {\n background: ",";\n }\n }\n"])),t.theme.space8,t.theme.radius6,t.theme.fontSizeBase,t.theme.hoverColor,t.theme.space8,t.theme.gray100);exports.MenuItem=function(n){var r=n.children,t=n.className,i=n.icon,s=n.onClick;return e.jsxs(a,{className:t,onClick:s,children:[i,r]})},exports.StyledListItem=a;
|