@zonos/amino 4.2.2 → 4.2.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.
@@ -3,6 +3,7 @@ declare type Props = {
3
3
  children?: ReactElement;
4
4
  xlabel: string;
5
5
  type: 'JSON' | 'GraphQL';
6
+ maxHeight?: number;
6
7
  };
7
- export declare const MdxCodeBlock: ({ children, xlabel, type }: Props) => JSX.Element;
8
+ export declare const MdxCodeBlock: ({ children, xlabel, type, maxHeight, }: Props) => JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- "use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),t=require("../badge/Badge.js"),o=require("../button/Button.js"),i=require("../stack/HStack.js"),a=require("../../icons/CopyIcon.js"),s=require("../../styles/constants/theme.js"),l=require("styled-components"),p=require("../../utils/useCopyText.js");function c(n){return n&&n.__esModule?n:{default:n}}require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var d,u,g,h,x,f,m=c(l),b=m.default.div(d||(d=n.__makeTemplateObject(["\n width: 100%;\n background-color: ",";\n border-radius: 12px;\n color: ",";\n margin-bottom: 16px;\n"],["\n width: 100%;\n background-color: ",";\n border-radius: 12px;\n color: ",";\n margin-bottom: 16px;\n"])),s.theme.gray1100,s.theme.gray0),j=m.default.div(u||(u=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: ",";\n padding: 8px 16px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n\n p {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: ",";\n padding: 8px 16px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n\n p {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n }\n"])),s.theme.gray1000),y=m.default.div(g||(g=n.__makeTemplateObject(["\n padding: 16px;\n display: flex;\n max-height: 260px;\n overflow: auto;\n height: fit-content;\n\n pre {\n white-space: pre;\n word-break: break-word;\n border-radius: 0;\n padding: 0;\n background: transparent;\n\n .hljs {\n color: ",";\n background: transparent;\n }\n\n code {\n display: block;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n line-height: 20px;\n font-weight: 600;\n font-size: 12px;\n\n .hljs- {\n &attr,\n &tag {\n color: ",";\n }\n\n &literal,\n &number {\n color: ",";\n }\n\n &string {\n color: ",";\n }\n }\n\n .key {\n color: ",";\n }\n\n div {\n height: 21px;\n }\n }\n }\n"],["\n padding: 16px;\n display: flex;\n max-height: 260px;\n overflow: auto;\n height: fit-content;\n\n pre {\n white-space: pre;\n word-break: break-word;\n border-radius: 0;\n padding: 0;\n background: transparent;\n\n .hljs {\n color: ",";\n background: transparent;\n }\n\n code {\n display: block;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n line-height: 20px;\n font-weight: 600;\n font-size: 12px;\n\n .hljs- {\n &attr,\n &tag {\n color: ",";\n }\n\n &literal,\n &number {\n color: ",";\n }\n\n &string {\n color: ",";\n }\n }\n\n .key {\n color: ",";\n }\n\n div {\n height: 21px;\n }\n }\n }\n"])),s.theme.gray100,s.theme.gray200,s.theme.blue400,s.theme.purple400,s.theme.orange500),k=m.default(t.Badge)(h||(h=n.__makeTemplateObject(["\n > div {\n background-color: ",";\n p {\n color: #fff;\n }\n }\n"],["\n > div {\n background-color: ",";\n p {\n color: #fff;\n }\n }\n"])),s.theme.gray800),w=m.default.div(x||(x=n.__makeTemplateObject(["\n min-width: 24px;\n line-height: 20px;\n padding: 4px 0;\n font-size: 10px;\n color: ",";\n font-weight: 600;\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n"],["\n min-width: 24px;\n line-height: 20px;\n padding: 4px 0;\n font-size: 10px;\n color: ",";\n font-weight: 600;\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n"])),s.theme.gray500),_=m.default(i.HStack)(f||(f=n.__makeTemplateObject(["\n align-items: center;\n"],["\n align-items: center;\n"]))),v=function(n){return n?"string"==typeof n?("".concat(n).match(/\n/g)||[]).length:Array.isArray(n)?n.reduce((function(n,e){return n+v(e)}),0):n.props.children?v(n.props.children):0:0};exports.MdxCodeBlock=function(t){var i=t.children,s=t.xlabel,l=t.type,c="pre"===(null==i?void 0:i.type)&&i.props.children,d="code"===(null==c?void 0:c.type)&&c.props.children||[],u=v(d),g=p.useCopyText(),h=g.showTooltip,x=g.copyText,f=r.useRef(null);return e.jsxs(b,{children:[e.jsxs(j,{children:[e.jsx("p",{children:s}),e.jsxs(_,n.__assign({spacing:16},{children:[l&&e.jsx(k,{children:l}),h?e.jsx("p",{children:"Copied!"}):e.jsx(o.Button,{intent:"text",icon:e.jsx(a.CopyIcon,{color:"gray100",size:20}),onClick:function(){var n;return x((null===(n=f.current)||void 0===n?void 0:n.innerText)||"Oops... Something went wrong copying the text")}})]}))]}),e.jsxs(y,{children:[e.jsx(w,{children:n.__spreadArray([],n.__read(Array(u)),!1).map((function(n,r){return e.jsx("div",{children:r+1},r)}))}),e.jsx("div",n.__assign({ref:f},{children:i}))]})]})};
1
+ "use strict";var n=require("../../_tslib-fe391a2e.js"),e=require("react/jsx-runtime"),r=require("react"),t=require("../badge/Badge.js"),o=require("../button/Button.js"),i=require("../stack/HStack.js"),a=require("../../icons/CopyIcon.js"),s=require("../../styles/constants/theme.js"),l=require("styled-components"),p=require("../../utils/useCopyText.js");function c(n){return n&&n.__esModule?n:{default:n}}require("../spinner/Spinner.js"),require("../button/RippleGroup.js"),require("framer-motion"),require("uuid"),require("../button/_Ripple.js"),require("../button/useRipple.js"),require("../stack/Stack.js"),require("../../icons/icon-base/_IconBase.js");var d,u,g,h,x,m,f=c(l),b=f.default.div(d||(d=n.__makeTemplateObject(["\n width: 100%;\n background-color: ",";\n border-radius: 12px;\n color: ",";\n margin-bottom: 16px;\n"],["\n width: 100%;\n background-color: ",";\n border-radius: 12px;\n color: ",";\n margin-bottom: 16px;\n"])),s.theme.gray1100,s.theme.gray0),j=f.default.div(u||(u=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: ",";\n padding: 8px 16px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n\n p {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: ",";\n padding: 8px 16px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n\n p {\n margin: 0;\n font-size: 12px;\n font-weight: 600;\n text-transform: uppercase;\n }\n"])),s.theme.gray1000),y=f.default.div(g||(g=n.__makeTemplateObject(["\n padding: 16px;\n display: flex;\n max-height: ","px;\n overflow: auto;\n height: fit-content;\n\n pre {\n white-space: pre;\n word-break: break-word;\n border-radius: 0;\n padding: 0;\n background: transparent;\n\n .hljs {\n color: ",";\n background: transparent;\n }\n\n code {\n display: block;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n line-height: 20px;\n font-weight: 600;\n font-size: 12px;\n\n .hljs- {\n &attr,\n &tag {\n color: ",";\n }\n\n &literal,\n &number {\n color: ",";\n }\n\n &string {\n color: ",";\n }\n }\n\n .key {\n color: ",";\n }\n\n div {\n height: 21px;\n }\n }\n }\n"],["\n padding: 16px;\n display: flex;\n max-height: ","px;\n overflow: auto;\n height: fit-content;\n\n pre {\n white-space: pre;\n word-break: break-word;\n border-radius: 0;\n padding: 0;\n background: transparent;\n\n .hljs {\n color: ",";\n background: transparent;\n }\n\n code {\n display: block;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier,\n monospace;\n line-height: 20px;\n font-weight: 600;\n font-size: 12px;\n\n .hljs- {\n &attr,\n &tag {\n color: ",";\n }\n\n &literal,\n &number {\n color: ",";\n }\n\n &string {\n color: ",";\n }\n }\n\n .key {\n color: ",";\n }\n\n div {\n height: 21px;\n }\n }\n }\n"])),(function(n){return n.maxHeight}),s.theme.gray100,s.theme.gray200,s.theme.blue400,s.theme.purple400,s.theme.orange500),k=f.default(t.Badge)(h||(h=n.__makeTemplateObject(["\n > div {\n background-color: ",";\n p {\n color: #fff;\n }\n }\n"],["\n > div {\n background-color: ",";\n p {\n color: #fff;\n }\n }\n"])),s.theme.gray800),_=f.default.div(x||(x=n.__makeTemplateObject(["\n min-width: 24px;\n line-height: 20px;\n padding: 4px 0;\n font-size: 10px;\n color: ",";\n font-weight: 600;\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n"],["\n min-width: 24px;\n line-height: 20px;\n padding: 4px 0;\n font-size: 10px;\n color: ",";\n font-weight: 600;\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n"])),s.theme.gray500),w=f.default(i.HStack)(m||(m=n.__makeTemplateObject(["\n align-items: center;\n"],["\n align-items: center;\n"]))),v=function(n){return n?"string"==typeof n?("".concat(n).match(/\n/g)||[]).length:Array.isArray(n)?n.reduce((function(n,e){return n+v(e)}),0):n.props.children?v(n.props.children):0:0};exports.MdxCodeBlock=function(t){var i=t.children,s=t.xlabel,l=t.type,c=t.maxHeight,d=void 0===c?260:c,u="pre"===(null==i?void 0:i.type)&&i.props.children,g="code"===(null==u?void 0:u.type)&&u.props.children||[],h=v(g),x=p.useCopyText(),m=x.showTooltip,f=x.copyText,q=r.useRef(null);return e.jsxs(b,{children:[e.jsxs(j,{children:[e.jsx("p",{children:s}),e.jsxs(w,n.__assign({spacing:16},{children:[l&&e.jsx(k,{children:l}),m?e.jsx("p",{children:"Copied!"}):e.jsx(o.Button,{intent:"text",icon:e.jsx(a.CopyIcon,{color:"gray100",size:20}),onClick:function(){var n;return f((null===(n=q.current)||void 0===n?void 0:n.innerText)||"Oops... Something went wrong copying the text")}})]}))]}),e.jsxs(y,n.__assign({maxHeight:d},{children:[e.jsx(_,{children:n.__spreadArray([],n.__read(Array(h)),!1).map((function(n,r){return e.jsx("div",{children:r+1},r)}))}),e.jsx("div",n.__assign({ref:q},{children:i}))]}))]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/amino",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "description": "Core UI components for Amino",
5
5
  "repository": "git@github.com:Zonos/amino.git",
6
6
  "license": "MIT",