@zonos/amino 5.5.9 → 5.5.10
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 a=require("../../../tslib.es6-5672428a.js"),e=require("react/jsx-runtime"),l=require("react"),o=require("clsx"),t=require("../../../styles/constants/theme.js"),n=require("../../../utils/getTestId.js"),i=require("../../../style-inject.es-d4ddeae4.js");function _(a){return a&&a.__esModule?a:{default:a}}var r=_(o),u="Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq",p="Amino__FloatLabelInput-module__inputDecorator--U80eQ",m="Amino__FloatLabelInput-module__inputPrefix--ixjzG",d="Amino__FloatLabelInput-module__inputSuffix--uzCo-",s="Amino__FloatLabelInput-module__inputValuePrefix--55sKk",b="Amino__FloatLabelInput-module__aminoInput--obs5G",L="Amino__FloatLabelInput-module__floatingLabel--7yHkN";i.styleInject('.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq{align-items:center;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 .Amino__FloatLabelInput-module__inputDecorator--U80eQ{align-items:center;background:#0000;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__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{align-items:center;color:var(--amino-gray-800);display:flex;order:2;padding-left:8px;white-space:nowrap}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected{border-radius:var(--amino-radius-6) 0 0 var(--amino-radius-6)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected+label+div{background-color:#e8f0fe}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder{opacity:0;transition:var(--amino-transition)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G:-moz-autofill,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G:-webkit-autofill{background-color:var(--amino-input-background);color:var(--amino-text-color)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN{display:block;max-height:0;order:1;pointer-events:none}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{color:var(--amino-gray-800);content:inherit;display:inline-block;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);transform-origin:left top;transition:var(--amino-transition);z-index:1}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN: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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN{pointer-events:inherit}.disabled .Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN:after{cursor:not-allowed;z-index:1}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border):has(input:focus){box-shadow:var(--amino-glow-blue)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border).has-error,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border).has-error:has(input:focus){box-shadow:var(--amino-glow-error)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-content .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:focus-within .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder{opacity:var(--amino-opacity-disabled)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-content .Amino__FloatLabelInput-module__aminoInput--obs5G+.Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:focus-within .Amino__FloatLabelInput-module__aminoInput--obs5G+.Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:11px;transform:scale(.8)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-value-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-left:var(--amino-space-8)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.has-label)::placeholder{opacity:var(--amino-opacity-disabled)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding:var(--amino-space-16) var(--amino-space-4) var(--amino-space-8) var(--amino-space-16)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{align-items:flex-end;padding-bottom:11px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label.has-input-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-left:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label.has-input-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G+.Amino__FloatLabelInput-module__floatingLabel--7yHkN span{margin-left:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-bottom:0;padding-top:13px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:2px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{margin-bottom:-1px;padding-bottom:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-top:20px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:6px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{padding-bottom:4px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-top:20px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:6px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{padding-bottom:10px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.xl.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-bottom:2px}');var I=function(a){switch(a){case"sm":return"".concat(t.theme.radius6);case"lg":return"".concat(t.theme.radius10);case"xl":return"".concat(t.theme.radius12);default:return"".concat(t.theme.radius8)}},c=l.forwardRef((function(o,t){var i=o.autoFocus,_=o.className,c=o.disabled,f=o.error,F=o.id,A=o.inputMode,h=o.label,y=o.noBorder,g=void 0!==y&&y,x=o.onChange,j=o.onKeyDown,v=o.pattern,H=o.placeholder,q=o.prefix,E=o.readOnly,W=o.required,k=o.size,N=void 0===k?"xl":k,w=o.suffix,G=o.tabIndex,z=o.type,P=o.value,K=o.valuePrefix,D=a.__rest(o,["autoFocus","className","disabled","error","id","inputMode","label","noBorder","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix"]),V=l.useId(),C=l.useMemo((function(){return n.getTestId({componentName:"input",name:h})}),[h]),M=!!P||!!K,Q=F||V;return e.jsxs("label",{className:r.default(u,N,g&&"no-border",f&&"has-error",h&&"has-label",M&&"has-content",q&&"has-input-prefix",K&&"has-value-prefix",_),htmlFor:Q,style:{"--amino-float-label-input-border-radius":I(N),"--amino-float-label-input-height":"calc(var(--amino-size-".concat(N,") - 2px)")},children:[q&&e.jsx("div",{className:r.default(p,m),children:q}),K&&e.jsx("div",{className:s,children:K}),e.jsx("input",a.__assign({ref:t,"aria-label":h,autoFocus:i,className:r.default(b),"data-testid":C,disabled:c,id:Q,inputMode:A,onChange:x,onKeyDown:j,pattern:v,placeholder:H,readOnly:E,required:W,tabIndex:G,type:z||"text",value:P||""},D)),e.jsx("div",{className:L,children:e.jsx("span",{children:h})}),w&&e.jsx("div",{className:r.default(p,d),children:w})]})}));exports.FloatLabelInput=c,exports.getFloatLabelRadius=I;
|
|
1
|
+
"use strict";var a=require("../../../tslib.es6-5672428a.js"),e=require("react/jsx-runtime"),l=require("react"),o=require("clsx"),t=require("../../../styles/constants/theme.js"),n=require("../../../utils/getTestId.js"),i=require("../../../style-inject.es-d4ddeae4.js");function _(a){return a&&a.__esModule?a:{default:a}}var r=_(o),u="Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq",p="Amino__FloatLabelInput-module__inputDecorator--U80eQ",m="Amino__FloatLabelInput-module__inputPrefix--ixjzG",d="Amino__FloatLabelInput-module__inputSuffix--uzCo-",s="Amino__FloatLabelInput-module__inputValuePrefix--55sKk",b="Amino__FloatLabelInput-module__aminoInput--obs5G",L="Amino__FloatLabelInput-module__floatingLabel--7yHkN";i.styleInject('.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq{align-items:center;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 .Amino__FloatLabelInput-module__inputDecorator--U80eQ{align-items:center;background:#0000;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__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{align-items:center;color:var(--amino-gray-800);display:flex;order:2;padding-left:8px;white-space:nowrap}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected{border-radius:var(--amino-radius-6) 0 0 var(--amino-radius-6)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G :-internal-autofill-selected+label+div{background-color:#e8f0fe}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder{opacity:0;transition:var(--amino-transition)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G:-moz-autofill,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__aminoInput--obs5G:-webkit-autofill{background-color:var(--amino-input-background);color:var(--amino-text-color)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN{display:block;max-height:0;order:1;pointer-events:none}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{color:var(--amino-gray-800);content:inherit;display:inline-block;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);transform-origin:left top;transition:var(--amino-transition);z-index:1}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN: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__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN{pointer-events:inherit}.disabled .Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq .Amino__FloatLabelInput-module__floatingLabel--7yHkN:after{cursor:not-allowed;z-index:1}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border):has(input:focus){box-shadow:var(--amino-glow-blue)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border).has-error,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.no-border).has-error:has(input:focus){box-shadow:var(--amino-glow-error)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-content .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:focus-within .Amino__FloatLabelInput-module__aminoInput--obs5G::placeholder{opacity:var(--amino-opacity-disabled)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-content .Amino__FloatLabelInput-module__aminoInput--obs5G~.Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:focus-within .Amino__FloatLabelInput-module__aminoInput--obs5G~.Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:11px;transform:scale(.8)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-value-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-left:var(--amino-space-8)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq:not(.has-label)::placeholder{opacity:var(--amino-opacity-disabled)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding:var(--amino-space-16) var(--amino-space-4) var(--amino-space-8) var(--amino-space-16)}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{align-items:flex-end;padding-bottom:11px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label.has-input-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-left:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.has-label.has-input-prefix .Amino__FloatLabelInput-module__aminoInput--obs5G~.Amino__FloatLabelInput-module__floatingLabel--7yHkN span{margin-left:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-bottom:0;padding-top:13px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:2px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.sm.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{margin-bottom:-1px;padding-bottom:0}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-top:20px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:6px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.md.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{padding-bottom:4px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-top:20px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label.has-content .Amino__FloatLabelInput-module__floatingLabel--7yHkN span,.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label:focus-within .Amino__FloatLabelInput-module__floatingLabel--7yHkN span{top:6px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.lg.has-label .Amino__FloatLabelInput-module__inputValuePrefix--55sKk{padding-bottom:10px}.Amino__FloatLabelInput-module__styledLabelWrapper--EmjHq.xl.has-label .Amino__FloatLabelInput-module__aminoInput--obs5G{padding-bottom:2px}');var I=function(a){switch(a){case"sm":return"".concat(t.theme.radius6);case"lg":return"".concat(t.theme.radius10);case"xl":return"".concat(t.theme.radius12);default:return"".concat(t.theme.radius8)}},c=l.forwardRef((function(o,t){var i=o.autoFocus,_=o.className,c=o.disabled,f=o.error,F=o.id,A=o.inputMode,h=o.label,y=o.noBorder,g=void 0!==y&&y,x=o.onChange,j=o.onKeyDown,v=o.pattern,H=o.placeholder,q=o.prefix,E=o.readOnly,W=o.required,k=o.size,N=void 0===k?"xl":k,w=o.suffix,G=o.tabIndex,z=o.type,P=o.value,K=o.valuePrefix,D=a.__rest(o,["autoFocus","className","disabled","error","id","inputMode","label","noBorder","onChange","onKeyDown","pattern","placeholder","prefix","readOnly","required","size","suffix","tabIndex","type","value","valuePrefix"]),V=l.useId(),C=l.useMemo((function(){return n.getTestId({componentName:"input",name:h})}),[h]),M=!!P||!!K,Q=F||V;return e.jsxs("label",{className:r.default(u,N,g&&"no-border",f&&"has-error",h&&"has-label",M&&"has-content",q&&"has-input-prefix",K&&"has-value-prefix",_),htmlFor:Q,style:{"--amino-float-label-input-border-radius":I(N),"--amino-float-label-input-height":"calc(var(--amino-size-".concat(N,") - 2px)")},children:[q&&e.jsx("div",{className:r.default(p,m),children:q}),K&&e.jsx("div",{className:s,children:K}),e.jsx("input",a.__assign({ref:t,"aria-label":h,autoFocus:i,className:r.default(b),"data-testid":C,disabled:c,id:Q,inputMode:A,onChange:x,onKeyDown:j,pattern:v,placeholder:H,readOnly:E,required:W,tabIndex:G,type:z||"text",value:P||""},D)),e.jsx("div",{className:L,children:e.jsx("span",{children:h})}),w&&e.jsx("div",{className:r.default(p,d),children:w})]})}));exports.FloatLabelInput=c,exports.getFloatLabelRadius=I;
|