@zonos/amino 5.1.76 → 5.1.78
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 r=require("../../_tslib-ccfac372.js"),o=require("react/jsx-runtime"),e=require("react"),i=require("clsx"),t=require("../../utils/getAminoColor.js"),s=require("../../utils/getProductDetails.js"),n=require("../../style-inject.es-d4ddeae4.js");function c(r){return r&&r.__esModule?r:{default:r}}require("../../styles/constants/theme.js"),require("../../icons/custom/products/CheckoutColorIcon.js"),require("../../icons/flag-icon/useStableUniqueId.js"),require("uuid"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/custom/products/ClassifyColorIcon.js"),require("../../icons/custom/products/ClearColorIcon.js"),require("../../icons/custom/products/CollectColorIcon.js"),require("../../icons/custom/products/CounterCompanionColorIcon.js"),require("../../icons/custom/products/DashboardColorIcon.js"),require("../../icons/custom/products/HelloColorIcon.js"),require("../../icons/custom/products/InclusivePricingColorIcon.js"),require("../../icons/custom/products/LandedCostColorIcon.js"),require("../../icons/custom/products/PrepayColorIcon.js"),require("../../icons/custom/products/RateColorIcon.js"),require("../../icons/custom/products/RestrictColorIcon.js"),require("../../icons/custom/products/ScreenColorIcon.js"),require("../../icons/custom/products/TaxColorIcon.js");var u=c(i),a="Amino_GlowWrapper-module__wrapper--xvL8c";n.styleInject('.Amino_GlowWrapper-module__wrapper--xvL8c{border-radius:var(--amino-glow-wrapper-border-radius);box-shadow:inset 0 0 1px 1px var(--amino-gray-200);overflow:hidden;padding:var(--amino-glow-wrapper-padding);position:relative;z-index:1}.Amino_GlowWrapper-module__wrapper--xvL8c
|
|
1
|
+
"use strict";var r=require("../../_tslib-ccfac372.js"),o=require("react/jsx-runtime"),e=require("react"),i=require("clsx"),t=require("../../utils/getAminoColor.js"),s=require("../../utils/getProductDetails.js"),n=require("../../style-inject.es-d4ddeae4.js");function c(r){return r&&r.__esModule?r:{default:r}}require("../../styles/constants/theme.js"),require("../../icons/custom/products/CheckoutColorIcon.js"),require("../../icons/flag-icon/useStableUniqueId.js"),require("uuid"),require("../../icons/icon-base/_IconBase.js"),require("../../icons/custom/products/ClassifyColorIcon.js"),require("../../icons/custom/products/ClearColorIcon.js"),require("../../icons/custom/products/CollectColorIcon.js"),require("../../icons/custom/products/CounterCompanionColorIcon.js"),require("../../icons/custom/products/DashboardColorIcon.js"),require("../../icons/custom/products/HelloColorIcon.js"),require("../../icons/custom/products/InclusivePricingColorIcon.js"),require("../../icons/custom/products/LandedCostColorIcon.js"),require("../../icons/custom/products/PrepayColorIcon.js"),require("../../icons/custom/products/RateColorIcon.js"),require("../../icons/custom/products/RestrictColorIcon.js"),require("../../icons/custom/products/ScreenColorIcon.js"),require("../../icons/custom/products/TaxColorIcon.js");var u=c(i),a="Amino_GlowWrapper-module__wrapper--xvL8c";n.styleInject('.Amino_GlowWrapper-module__wrapper--xvL8c{border-radius:var(--amino-glow-wrapper-border-radius);box-shadow:inset 0 0 1px 1px var(--amino-gray-200);overflow:hidden;padding:var(--amino-glow-wrapper-padding);position:relative;z-index:1}.Amino_GlowWrapper-module__wrapper--xvL8c:after{background:var(--amino-glow-wrapper-background);content:"";-webkit-filter:blur(20px);filter:blur(20px);height:min(100%,400px);left:calc(0px - min(50%, 200px));left:calc(var(--x, 0)*1px - min(50%, 200px));opacity:0;position:absolute;top:calc(0px - min(50%, 200px));top:calc(var(--y, 0)*1px - min(50%, 200px));transition:opacity .5s;width:min(100%,400px);z-index:-1}.Amino_GlowWrapper-module__wrapper--xvL8c:hover:after{opacity:1}');exports.GlowWrapper=function(i){var n=i.children,c=i.className,l=i.glowColor,p=void 0===l?"gray600":l,d=i.product,m=i.radius,x=void 0===m?6:m,g=i.size,v=void 0===g?1:g,w=i.style,q=e.useRef(null),j=e.useMemo((function(){return d?s.getProductDetails({product:d}).gradient:null}),[d]);return e.useEffect((function(){var r=q.current,o=function(o){if(r){var e=r.getBoundingClientRect(),i=e.x,t=e.y;r.style.setProperty("--x",(o.clientX-i).toString()),r.style.setProperty("--y",(o.clientY-t).toString())}};return null==r||r.addEventListener("mousemove",o),function(){null==r||r.removeEventListener("mousemove",o)}}),[]),o.jsx("div",{ref:q,className:u.default(a,c),style:r.__assign(r.__assign({},w),{"--amino-glow-wrapper-background":j||"radial-gradient(circle, ".concat(t.getAminoColor(p)," 0%, white 70%)"),"--amino-glow-wrapper-border-radius":"".concat(x,"px"),"--amino-glow-wrapper-padding":"".concat(v,"px")}),children:n})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../../../_tslib-ccfac372.js"),a=require("react/jsx-runtime"),o=require("react"),t=require("clsx"),l=require("../../../styles/constants/theme.js"),n=require("../../../utils/getTestId.js"),i=require("../../../style-inject.es-d4ddeae4.js");function u(e){return e&&e.__esModule?e:{default:e}}var r=u(t),_="Amino__FloatLabelInput-module__styledLabelInput--uwTIv",m="Amino__FloatLabelInput-module__inputDecorator--U80eQ",p="Amino__FloatLabelInput-module__inputPrefix--ixjzG",s="Amino__FloatLabelInput-module__inputSuffix--uzCo-",d="Amino__FloatLabelInput-module__inputValuePrefix--55sKk",b="Amino__FloatLabelInput-module__aminoInput--obs5G",I="Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq";i.styleInject('.Amino__FloatLabelInput-module__styledLabelInput--uwTIv{display:block;max-height:0;order:1;pointer-events:none}.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{color:var(--amino-gray-800);content:attr(data-label);display:inline-block;-webkit-filter:blur(0);filter:blur(0);font-size:var(--amino-font-size-base);line-height:var(--amino-font-size-base);margin-left:var(--amino-space-16);position:absolute;top:calc(50% - var(--amino-font-size-base)/2);-webkit-transform-origin:left top;transform-origin:left top;transition:var(--amino-transition);z-index:1}.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:after{border-radius:var(--amino-float-label-input-border-radius);bottom:0;content:"";left:0;position:absolute;right:0;top:0}.disabled .Amino__FloatLabelInput-module__styledLabelInput--uwTIv{pointer-events:inherit}.disabled .Amino__FloatLabelInput-module__styledLabelInput--uwTIv
|
|
1
|
+
"use strict";var e=require("../../../_tslib-ccfac372.js"),a=require("react/jsx-runtime"),o=require("react"),t=require("clsx"),l=require("../../../styles/constants/theme.js"),n=require("../../../utils/getTestId.js"),i=require("../../../style-inject.es-d4ddeae4.js");function u(e){return e&&e.__esModule?e:{default:e}}var r=u(t),_="Amino__FloatLabelInput-module__styledLabelInput--uwTIv",m="Amino__FloatLabelInput-module__inputDecorator--U80eQ",p="Amino__FloatLabelInput-module__inputPrefix--ixjzG",s="Amino__FloatLabelInput-module__inputSuffix--uzCo-",d="Amino__FloatLabelInput-module__inputValuePrefix--55sKk",b="Amino__FloatLabelInput-module__aminoInput--obs5G",I="Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq";i.styleInject('.Amino__FloatLabelInput-module__styledLabelInput--uwTIv{display:block;max-height:0;order:1;pointer-events:none}.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{color:var(--amino-gray-800);content:attr(data-label);display:inline-block;-webkit-filter:blur(0);filter:blur(0);font-size:var(--amino-font-size-base);line-height:var(--amino-font-size-base);margin-left:var(--amino-space-16);position:absolute;top:calc(50% - var(--amino-font-size-base)/2);-webkit-transform-origin:left top;transform-origin:left top;transition:var(--amino-transition);z-index:1}.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:after{border-radius:var(--amino-float-label-input-border-radius);bottom:0;content:"";left:0;position:absolute;right:0;top:0}.disabled .Amino__FloatLabelInput-module__styledLabelInput--uwTIv{pointer-events:inherit}.disabled .Amino__FloatLabelInput-module__styledLabelInput--uwTIv:after{cursor:not-allowed;z-index:1}.Amino__FloatLabelInput-module__inputDecorator--U80eQ{align-items:center;background:transparent;display:flex;flex-basis:50px;font-size:var(--amino-font-size-s);font-weight:700;justify-content:center;line-height:var(--amino-font-size-s);padding:0 6px}.Amino__FloatLabelInput-module__inputDecorator--U80eQ.Amino__FloatLabelInput-module__inputPrefix--ixjzG{border-bottom-left-radius:var(--amino-radius-6);border-top-left-radius:var(--amino-radius-6)}.Amino__FloatLabelInput-module__inputDecorator--U80eQ.Amino__FloatLabelInput-module__inputSuffix--uzCo-{border-bottom-right-radius:var(--amino-radius-6);border-top-right-radius:var(--amino-radius-6);order:3}.Amino__FloatLabelInput-module__inputValuePrefix--55sKk{align-items:flex-end;color:var(--amino-gray-800);display:flex;order:2;padding-bottom:var(--amino-space-8);padding-left:var(--amino-space-16);padding-right:var(--amino-space-4);white-space:nowrap}.Amino__FloatLabelInput-module__aminoInput--obs5G{background:var(--amino-input-background);border:0;border-radius:var(--amino-float-label-input-border-radius);box-sizing:border-box;font-weight:500;height:var(--amino-float-label-input-height);order:2;outline:none;padding:0 var(--amino-space-16);position:relative;transition:var(--amino-transition);width:100%}.Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected{border-radius:var(--amino-radius-6) 0 0 var(--amino-radius-6)}.Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected+label+div{background-color:#e8f0fe}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-label{padding:var(--amino-space-16) var(--amino-space-4) var(--amino-space-8) var(--amino-space-16)}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-label.has-input-prefix{padding-left:0}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-label.has-input-prefix+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{margin-left:0}.Amino__FloatLabelInput-module__aminoInput--obs5G:not(.has-label)::-webkit-input-placeholder{opacity:.6}.Amino__FloatLabelInput-module__aminoInput--obs5G:not(.has-label)::placeholder{opacity:.6}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-value-prefix{padding-left:var(--amino-space-8)}.Amino__FloatLabelInput-module__aminoInput--obs5G::-webkit-input-placeholder{opacity:0;-webkit-transition:var(--amino-transition);transition:var(--amino-transition)}.Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder{opacity:0;transition:var(--amino-transition)}.Amino__FloatLabelInput-module__aminoInput--obs5G:focus{outline:none}.Amino__FloatLabelInput-module__aminoInput--obs5G:focus+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:after{box-shadow:var(--amino-glow-blue)}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-error+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:after{box-shadow:var(--amino-glow-error)}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-content::-webkit-input-placeholder,.Amino__FloatLabelInput-module__aminoInput--obs5G:focus::-webkit-input-placeholder{opacity:.6}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-content::placeholder,.Amino__FloatLabelInput-module__aminoInput--obs5G:focus::placeholder{opacity:.6}.Amino__FloatLabelInput-module__aminoInput--obs5G.has-content+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before,.Amino__FloatLabelInput-module__aminoInput--obs5G:focus+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{top:11px;-webkit-transform:scale(.8);transform:scale(.8)}.Amino__FloatLabelInput-module__aminoInput--obs5G:-moz-autofill,.Amino__FloatLabelInput-module__aminoInput--obs5G:-webkit-autofill{background-color:var(--amino-input-background);color:var(--amino-text-color)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq{background:var(--amino-input-background);border-radius:var(--amino-float-label-input-border-radius);display:flex;flex-direction:row;position:relative;width:100%}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label{padding-bottom:0;padding-top:13px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label.has-content+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label:focus+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{top:2px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label{padding-top:20px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label.has-content+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label:focus+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{top:6px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label.has-content+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label:focus+.Amino__FloatLabelInput-module__styledLabelInput--uwTIv:before{top:10px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.xl .Amino__FloatLabelInput-module__aminoInput--obs5G.has-label{padding-bottom:2px}');var c=o.forwardRef((function(t,i){var u=t.autoFocus,c=t.className,f=t.disabled,L=t.error,h=t.inputMode,v=t.label,F=t.onChange,A=t.onKeyDown,x=t.pattern,y=t.placeholder,g=t.prefix,w=t.readOnly,G=t.required,j=t.size,k=void 0===j?"xl":j,q=t.suffix,T=t.tabIndex,z=t.type,E=t.value,H=t.valuePrefix,W=e.__rest(t,["autoFocus","className","disabled","error","inputMode","label","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix"]),N=o.useMemo((function(){return n.getTestId({componentName:"input",name:v})}),[v]),D=!!E||!!H;return a.jsxs("div",{className:r.default(c,k,I),style:{"--amino-float-label-input-border-radius":function(){switch(k){case"sm":return"".concat(l.theme.radius6);case"lg":return"".concat(l.theme.radius10);case"xl":return"".concat(l.theme.radius12);default:return"".concat(l.theme.radius8)}}(),"--amino-float-label-input-height":"calc(var(--amino-size-".concat(k,") - 2px)")},children:[g&&a.jsx("div",{className:r.default(m,p),children:g}),H&&a.jsx("div",{className:d,children:H}),a.jsx("input",e.__assign({ref:i,"aria-label":v,autoFocus:u,className:r.default(L&&"has-error",v&&"has-label",D&&"has-content",g&&"has-input-prefix",H&&"has-value-prefix",b),"data-testid":N,disabled:f,id:v,inputMode:h,onChange:F,onKeyDown:A,pattern:x,placeholder:y,readOnly:w,required:G,tabIndex:T,type:z||"text",value:E||""},W)),a.jsx("label",{className:_,"data-label":v}),q&&a.jsx("div",{className:r.default(m,s),children:q})]})}));exports.FloatLabelInput=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),o=require("../input/SearchInput.js");require("clsx"),require("react"),require("@mui/material/Collapse"),require("../../NavigationGroup.module-0238baae.js");var a=require("../../styles/constants/theme.js"),r=require("../../style-inject.es-d4ddeae4.js");require("../../_tslib-ccfac372.js"),require("../../icons/SearchIcon.js"),require("../../icons/icon-base/_IconBase.js");var i={aminoLayout:"Amino_Layout-module__aminoLayout--k-8EW",contentGrid:"Amino_Layout-module__contentGrid--6ltoS",styledSidebar:"Amino_Layout-module__styledSidebar--dnwoo",sidebarContent:"Amino_Layout-module__sidebarContent--NXMVV",searchInputWrapper:"Amino_Layout-module__searchInputWrapper--JldDc",styledLogoSidebar:"Amino_Layout-module__styledLogoSidebar--MTiPe",styledSearchInput:"Amino_Layout-module__styledSearchInput--uJCBW",content:"Amino_Layout-module__content--LYUwT",header:"Amino_Layout-module__header--lID5Y",footer:"Amino_Layout-module__footer--5enlV"};r.styleInject(".Amino_Layout-module__aminoLayout--k-8EW{height:100vh;overflow:hidden}.Amino_Layout-module__contentGrid--6ltoS{display:grid;grid-template-columns:var(--amino-sidebar-width) 1fr;height:var(--height)}.Amino_Layout-module__styledSidebar--dnwoo{background:var(--amino-sidebar-color);border-right:var(--amino-border);box-sizing:border-box;display:grid;grid-template-rows:1fr calc(39px + var(--amino-space-24)*2);height:inherit;width:var(--amino-sidebar-width)}.Amino_Layout-module__sidebarContent--NXMVV{box-sizing:border-box;display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:var(--amino-space-16);width:100%}.Amino_Layout-module__searchInputWrapper--JldDc{margin-bottom:var(--amino-space-40)}.Amino_Layout-module__styledLogoSidebar--MTiPe{margin-bottom:var(--amino-space-24)}.Amino_Layout-module__styledSearchInput--uJCBW{border:0}.Amino_Layout-module__styledSearchInput--uJCBW svg{color:var(--amino-gray-1200)}.Amino_Layout-module__styledSearchInput--uJCBW input{background-color:var(--amino-gray-100);border:0}.Amino_Layout-module__styledSearchInput--uJCBW input
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),o=require("../input/SearchInput.js");require("clsx"),require("react"),require("@mui/material/Collapse"),require("../../NavigationGroup.module-0238baae.js");var a=require("../../styles/constants/theme.js"),r=require("../../style-inject.es-d4ddeae4.js");require("../../_tslib-ccfac372.js"),require("../../icons/SearchIcon.js"),require("../../icons/icon-base/_IconBase.js");var i={aminoLayout:"Amino_Layout-module__aminoLayout--k-8EW",contentGrid:"Amino_Layout-module__contentGrid--6ltoS",styledSidebar:"Amino_Layout-module__styledSidebar--dnwoo",sidebarContent:"Amino_Layout-module__sidebarContent--NXMVV",searchInputWrapper:"Amino_Layout-module__searchInputWrapper--JldDc",styledLogoSidebar:"Amino_Layout-module__styledLogoSidebar--MTiPe",styledSearchInput:"Amino_Layout-module__styledSearchInput--uJCBW",content:"Amino_Layout-module__content--LYUwT",header:"Amino_Layout-module__header--lID5Y",footer:"Amino_Layout-module__footer--5enlV"};r.styleInject(".Amino_Layout-module__aminoLayout--k-8EW{height:100vh;overflow:hidden}.Amino_Layout-module__contentGrid--6ltoS{display:grid;grid-template-columns:var(--amino-sidebar-width) 1fr;height:var(--height)}.Amino_Layout-module__styledSidebar--dnwoo{background:var(--amino-sidebar-color);border-right:var(--amino-border);box-sizing:border-box;display:grid;grid-template-rows:1fr calc(39px + var(--amino-space-24)*2);height:inherit;width:var(--amino-sidebar-width)}.Amino_Layout-module__sidebarContent--NXMVV{box-sizing:border-box;display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:var(--amino-space-16);width:100%}.Amino_Layout-module__searchInputWrapper--JldDc{margin-bottom:var(--amino-space-40)}.Amino_Layout-module__styledLogoSidebar--MTiPe{margin-bottom:var(--amino-space-24)}.Amino_Layout-module__styledSearchInput--uJCBW{border:0}.Amino_Layout-module__styledSearchInput--uJCBW svg{color:var(--amino-gray-1200)}.Amino_Layout-module__styledSearchInput--uJCBW input{background-color:var(--amino-gray-100);border:0}.Amino_Layout-module__styledSearchInput--uJCBW input::-webkit-input-placeholder{color:var(--amino-gray-1200)}.Amino_Layout-module__styledSearchInput--uJCBW input::placeholder{color:var(--amino-gray-1200)}.Amino_Layout-module__content--LYUwT{box-sizing:border-box;height:inherit;overflow-y:auto;padding:var(--amino-space-32)}.Amino_Layout-module__header--lID5Y{background:var(--amino-header-color);border-bottom:var(--amino-border);box-shadow:var(--amino-v3-shadow-base);box-sizing:border-box;display:flex;height:var(--amino-appbar-height);position:-webkit-sticky;position:sticky;top:0;z-index:var(--amino-appbar-elevation)}.Amino_Layout-module__footer--5enlV{box-sizing:border-box;width:var(--amino-sidebar-width)}");exports.Layout=function(r){var t=r.className,n=r.content,d=r.footer,s=r.headerContent,l=r.logoSidebar,u=r.searchInput,m=r.sidebar;return e.jsxs("main",{className:[t,i.aminoLayout].join(" "),style:{"--height":s?"calc(100vh - ".concat(a.theme.appbarHeight,")"):"100vh"},children:[!!s&&e.jsx("header",{className:i.header,children:s}),e.jsxs("div",{className:i.contentGrid,children:[e.jsxs("nav",{className:i.styledSidebar,children:[e.jsxs("div",{className:i.sidebarContent,children:[!!l&&e.jsx("div",{className:i.styledLogoSidebar,children:l}),!!u&&e.jsx("div",{className:i.searchInputWrapper,children:e.jsx(o.SearchInput,{className:i.styledSearchInput,onChange:u.onChange,value:u.value})}),m]}),e.jsx("div",{className:i.footer,children:d})]}),e.jsx("div",{className:i.content,children:n})]})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),i=require("clsx"),o=require("styled-components"),
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),i=require("clsx"),o=require("styled-components"),t=require("../checkbox/Checkbox.js"),r=require("../skeleton/Skeleton.js"),d=require("../text/Text.js"),a=require("../../styles/constants/theme.js");function l(n){return n&&n.__esModule?n:{default:n}}require("react"),require("framer-motion"),require("../../icons/CheckmarkIcon.js"),require("../../icons/icon-base/_IconBase.js"),require("../../utils/getTestId.js"),require("../../style-inject.es-d4ddeae4.js");var s,c,h=l(i),u=l(o),g=u.default.table(s||(s=n.__makeTemplateObject(["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"],["\n width: 100%;\n\n > thead {\n text-transform: uppercase;\n\n > tr {\n border-bottom: ",";\n height: 56px;\n\n > th {\n padding: ",";\n white-space: nowrap;\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n\n > tbody {\n > tr {\n height: 48px;\n\n & {\n border-bottom: ",";\n }\n\n &.withHover:hover {\n background-color: ",";\n }\n\n &.clickable {\n cursor: pointer;\n }\n\n &:not(:hover) {\n .row-hover-show {\n visibility: collapse;\n }\n }\n\n > td {\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n\n &.loading {\n text-align: center;\n }\n\n &:not(:hover) {\n .cell-hover-show {\n visibility: collapse;\n }\n }\n\n &.cellLink {\n padding: 0;\n\n > a {\n display: block;\n width: 100%;\n height: 100%;\n padding: ",";\n\n &.noPadding {\n padding: 0;\n }\n }\n }\n }\n }\n }\n"])),a.theme.border,a.theme.space16,a.theme.border,a.theme.gray50,a.theme.space12,a.theme.space12),x=u.default(t.Checkbox)(c||(c=n.__makeTemplateObject(["\n padding: ",";\n display: inline-flex;\n"],["\n padding: ",";\n display: inline-flex;\n"])),a.theme.space12);exports.SimpleTable=function(i){var o=i.className,t=i.getRowLink,a=i.headers,l=i.items,s=i.keyExtractor,c=i.loading,u=void 0!==c&&c,p=i.loadingItems,b=void 0===p?10:p,m=i.noHoverBackground,k=void 0!==m&&m,v=i.onRowClick,j=i.onRowHover,y=i.renderFooter,w=i.selectable,C=void 0===w?{enabled:!1}:w;return e.jsxs(g,{className:o,children:[e.jsxs("colgroup",{children:[!!C.onHeaderCheckboxChange&&e.jsx("col",{width:0}),a.map((function(n){return e.jsx("col",{width:void 0!==n.width?"".concat(n.width,"%"):void 0},n.key)}))]}),e.jsx("thead",{children:e.jsxs("tr",{children:[!!C.onHeaderCheckboxChange&&e.jsx("th",{className:"noPadding",children:C.renderCustomHeaderCheckbox||e.jsx(x,{checked:!u&&C.headerCheckboxValue||!1,disabled:u,onChange:C.onHeaderCheckboxChange})}),a.map((function(n){return e.jsx("th",{style:{textAlign:n.align||"start"},children:e.jsx(d.Text,{color:"gray800",type:"small-header",children:n.name})},n.key)}))]})}),e.jsx("tbody",{children:u?n.__spreadArray([],n.__read(Array(b+1).keys()),!1).map((function(n){return e.jsxs("tr",{children:[C.enabled&&e.jsx("td",{children:e.jsx(r.Skeleton,{height:30},n)}),a.map((function(i){return e.jsx("td",{className:h.default({loading:!0,noPadding:i.noPadding}),children:e.jsx(r.Skeleton,{height:30},n)},i.key)}))]},n)})):l.map((function(n,i){var o,r,d,l=!!v||!!C.anySelected&&!!C.onRowCheckboxChange;return e.jsxs("tr",{className:h.default({clickable:l,withHover:!k}),onClick:function(){var e,o,t;C.anySelected?(null===(e=C.isRowCheckboxDisabled)||void 0===e?void 0:e.call(C,n,i))||null===(o=C.onRowCheckboxChange)||void 0===o||o.call(C,!(null===(t=C.isRowChecked)||void 0===t?void 0:t.call(C,n,i)),n,i):null==v||v(n)},onMouseEnter:function(){return null==j?void 0:j(n)},children:[C.enabled&&e.jsx("td",{className:"noPadding",children:(null===(o=C.renderCustomRowCheckbox)||void 0===o?void 0:o.call(C,n,i))||e.jsx(x,{checked:(null===(r=C.isRowChecked)||void 0===r?void 0:r.call(C,n,i))||!1,disabled:(null===(d=C.isRowCheckboxDisabled)||void 0===d?void 0:d.call(C,n,i))||!1,onChange:function(e){var o;return null===(o=C.onRowCheckboxChange)||void 0===o?void 0:o.call(C,e,n,i)}})}),a.map((function(i){return function(n,i){var o=i[n.key],r=function(o){return t&&!C.anySelected?e.jsx("td",{className:"cellLink",children:e.jsx("a",{className:h.default({noPadding:n.noPadding}),href:t(i),style:{textAlign:n.align||"start"},children:o})},n.key):e.jsx("td",{className:h.default({noPadding:n.noPadding}),style:{textAlign:n.align||"start"},children:o},n.key)};return n.renderCustom?e.jsx(e.Fragment,{children:r(n.renderCustom(o,i))}):e.jsx(e.Fragment,{children:r(String(o))})}(i,n)}))]},s(n))}))}),y]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("../help-text/HelpText.js"),a=require("../../styles/constants/theme.js"),i=require("../../utils/hooks/useHeightAdjustTextarea.js");function l(n){return n&&n.__esModule?n:{default:n}}require("clsx"),require("../text/Text.js"),require("../../style-inject.es-d4ddeae4.js");var s,d,u,c,p,h=l(o),b=h.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),a.theme.radius12,a.theme.border,a.theme.gray300),f=h.default.div(d||(d=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),a.theme.radius12),m=h.default.label(u||(u=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),a.theme.gray800,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.transition,a.theme.space16),x=h.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n
|
|
1
|
+
"use strict";var n=require("../../_tslib-ccfac372.js"),e=require("react/jsx-runtime"),t=require("react"),o=require("styled-components"),r=require("../help-text/HelpText.js"),a=require("../../styles/constants/theme.js"),i=require("../../utils/hooks/useHeightAdjustTextarea.js");function l(n){return n&&n.__esModule?n:{default:n}}require("clsx"),require("../text/Text.js"),require("../../style-inject.es-d4ddeae4.js");var s,d,u,c,p,h=l(o),b=h.default.div(s||(s=n.__makeTemplateObject(["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"],["\n border-radius: ",";\n border: ",";\n position: relative;\n &:hover {\n border: 1px solid ",";\n }\n"])),a.theme.radius12,a.theme.border,a.theme.gray300),f=h.default.div(d||(d=n.__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"],["\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n border-radius: ",";\n }\n"])),a.theme.radius12),m=h.default.label(u||(u=n.__makeTemplateObject(["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"],["\n color: ",";\n font-size: ",";\n line-height: ",";\n position: absolute;\n filter: blur(0);\n top: calc("," + 6px);\n transform-origin: left top;\n transition: ",";\n left: ",";\n z-index: 3;\n"])),a.theme.gray800,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.fontSizeBase,a.theme.transition,a.theme.space16),x=h.default.textarea(c||(c=n.__makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n &::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n &::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"],["\n box-sizing: border-box;\n position: relative;\n padding: 0 ",";\n padding-top: ",";\n outline: none;\n order: 2;\n width: 100%;\n border-radius: ",";\n background: ",";\n border: 0;\n font-size: ",";\n font-weight: 500;\n z-index: 2;\n display: block;\n\n :-internal-autofill-selected {\n border-radius: "," 0 0 ",";\n && + label + div {\n background-color: #e8f0fe;\n }\n }\n &.has-label {\n margin-top: ",";\n padding: 0 4px "," ",";\n\n &::placeholder {\n opacity: 0;\n }\n\n &.has-content,\n &:focus {\n &::placeholder {\n opacity: 0.6;\n }\n & + "," {\n top: 11px;\n transform: scale(0.8);\n & + "," {\n &::before {\n content: '';\n position: absolute;\n z-index: 2;\n left: 0;\n top: 0;\n height: 25px;\n right: 0;\n background: ",";\n border-radius: ",";\n }\n }\n }\n }\n }\n\n &::placeholder {\n transition: ",";\n color: ",";\n font-weight: 400;\n opacity: 0.6;\n }\n\n :focus {\n outline: none;\n & ~ ","::after {\n box-shadow: ",";\n }\n }\n\n &.has-error ~ ","::after {\n box-shadow: ",";\n }\n"])),a.theme.space16,a.theme.space8,a.theme.radius6,a.theme.inputBackground,a.theme.fontSizeBase,a.theme.radius6,a.theme.radius6,a.theme.space24,a.theme.space8,a.theme.space16,m,f,a.theme.inputBackground,a.theme.radius6,a.theme.transition,a.theme.gray400,f,a.theme.glowBlue,f,a.theme.glowError),g=h.default.div(p||(p=n.__makeTemplateObject(["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"],["\n position: relative;\n width: ",";\n\n &.disabled {\n * {\n cursor: not-allowed;\n }\n "," {\n opacity: 0.4;\n }\n "," {\n user-select: none;\n }\n }\n"])),(function(n){return n.$width?"".concat(n.$width,"px"):"100%"}),b,x),w=t.forwardRef((function(o,a){var l=o.className,s=o.disabled,d=o.error,u=o.expandable,c=o.helpText,p=o.label,h=o.maxRows,w=o.rows,v=o.value,j=o.width,k=n.__rest(o,["className","disabled","error","expandable","helpText","label","maxRows","rows","value","width"]),z=!!v,y=t.useRef(null);return i.useHeightAdjustTextarea({maxRows:h,ref:y,shouldExpand:!!u,textareaValue:(null==v?void 0:v.toString())||""}),e.jsxs(g,{$width:j,className:"amino-input-wrapper ".concat(l||""," ").concat(s?"disabled":""),children:[e.jsxs(b,{onClick:function(){var n;return null===(n=null==y?void 0:y.current)||void 0===n?void 0:n.focus()},children:[e.jsx(x,n.__assign({ref:function(n){a&&"function"==typeof a?a(n):a&&(a.current=n),y.current=n},className:[d?"has-error":"",p?"has-label":"",z?"has-content":""].join(" "),disabled:s,label:p,rows:w,value:v},k)),e.jsx(m,{"data-label":p,onClick:function(){var n;return null===(n=null==y?void 0:y.current)||void 0===n?void 0:n.focus()},children:p}),e.jsx(f,{})]}),e.jsx(r.HelpText,{error:d,helpText:c})]})}));exports.Textarea=w;
|