sate-lib 1.79.0 → 1.81.0
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.
- package/lib/components/text-field/text-field.d.ts +3 -1
- package/lib/components/text-field/text-field.d.ts.map +1 -1
- package/lib/components/text-field/text-field.js +1 -1
- package/lib/components/text-field/text-field.styles.module.js +1 -1
- package/lib/components/text-field/text-field.styles_module.css +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type FieldShape = "all" | "none" | "top" | "bottom" | "left" | "right" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
|
|
1
2
|
export interface TextFieldProps {
|
|
2
3
|
name?: string;
|
|
3
4
|
type?: "text" | "password";
|
|
@@ -14,6 +15,7 @@ export interface TextFieldProps {
|
|
|
14
15
|
defaultValue?: string;
|
|
15
16
|
autoComplete?: "on" | "off";
|
|
16
17
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
shape?: FieldShape;
|
|
17
19
|
}
|
|
18
|
-
export declare function TextField({ type, variant, name, label, placeholder, error, className, supportingText, supportingIcon, tailingIcon, tailingIconHandle, disabled, defaultValue, autoComplete, onChange, ...rest }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function TextField({ type, variant, name, label, placeholder, error, className, supportingText, supportingIcon, tailingIcon, tailingIconHandle, disabled, defaultValue, autoComplete, onChange, shape, ...rest }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
//# sourceMappingURL=text-field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GACnB,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAElB,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC5D,KAAK,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,EACzB,IAAa,EACb,OAAmB,EACnB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,SAAS,EACT,cAAc,EACd,cAAqB,EACrB,WAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,YAAoB,EACpB,QAAQ,EACR,KAAa,EACb,GAAG,IAAI,EACP,EAAE,cAAc,2CAqGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l,useState as r}from"react";import{ButtonIcon as i}from"../button/button-icon.js";import{Icon as o}from"../icon/icon.js";import{Typography as t}from"../typography/typography.js";import n from"./text-field.styles.module.js";function s({type:s="text",variant:d="default",name:c,label:p,placeholder:m,error:f,className:u,supportingText:h,supportingIcon:y=!0,tailingIcon:b=!1,tailingIconHandle:x,disabled:g,defaultValue:v,autoComplete:j="off",onChange:w,...
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l,useState as r}from"react";import{ButtonIcon as i}from"../button/button-icon.js";import{Icon as o}from"../icon/icon.js";import{Typography as t}from"../typography/typography.js";import n from"./text-field.styles.module.js";function s({type:s="text",variant:d="default",name:c,label:p,placeholder:m,error:f,className:u,supportingText:h,supportingIcon:y=!0,tailingIcon:b=!1,tailingIconHandle:x,disabled:g,defaultValue:v,autoComplete:j="off",onChange:w,shape:C="all",...N}){let[k,z]=r(v??""),[I,S]=r(!1),$=l(),B=k.length>0,E=[n.root,g&&n.disabled,f&&n.error,u].filter(Boolean).join(" "),F=[n.container,(B||!!m)&&n.filled].filter(Boolean).join(" "),M="password"===s?I?"text":"password":s,T="password"!==s&&b&&!!x,H="password"===s?e(i,{"aria-label":I?"Hide password":"Show password","aria-pressed":I,disabled:g,icon:I?"EyeSlash":"Eye",onClick:()=>S(e=>!e),size:"small",variant:"text"}):T?e(i,{"aria-label":"More information",disabled:g,icon:"Info",onClick:x,size:"small",variant:"text"}):null;return a("div",{className:E,children:[a("div",{className:F,children:[p&&e("label",{className:n.label,htmlFor:$,children:p}),"currency"===d&&e("span",{className:n.currency,children:"\xa3"}),e("input",{autoComplete:j,className:`${n.input} ${n[`shape-${C}`]}`,disabled:g,id:$,inputMode:"currency"===d?"decimal":"text",name:c,onChange:e=>{z(e.target.value),w?.(e)},placeholder:m,spellCheck:"false",type:M,value:k,...N}),H&&e("div",{className:n.tailingIcon,children:H})]}),h&&a(t,{as:"span",className:n.supportingTextContainer,palette:"grey",variant:"bodySmall",children:[y&&e("span",{children:e(o,{"aria-hidden":"true",name:f?"WarningCircle-fill":"Info",size:16})}),h]})]})}export{s as TextField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./text-field.styles_module.css";let e={root:"root-b_WUZD",container:"container-QdDXv1",label:"label-SxSg48",currency:"currency-atzAmT",filled:"filled-mQaws2",input:"input-xq2uyS",tailingIcon:"tailingIcon-huRyq6",supportingTextContainer:"supportingTextContainer-KGtwwo",disabled:"disabled-KXxWok",error:"error-O6jLhD"};export{e as default};
|
|
1
|
+
import"./text-field.styles_module.css";let e={root:"root-b_WUZD",container:"container-QdDXv1",label:"label-SxSg48",currency:"currency-atzAmT",filled:"filled-mQaws2",input:"input-xq2uyS",tailingIcon:"tailingIcon-huRyq6",supportingTextContainer:"supportingTextContainer-KGtwwo",disabled:"disabled-KXxWok",error:"error-O6jLhD","shape-all":"shape-all-joZoe_",shapeAll:"shape-all-joZoe_","shape-none":"shape-none-XTJ9oh",shapeNone:"shape-none-XTJ9oh","shape-top":"shape-top-EeRKOf",shapeTop:"shape-top-EeRKOf","shape-bottom":"shape-bottom-OkBYlk",shapeBottom:"shape-bottom-OkBYlk","shape-left":"shape-left-KAUAg3",shapeLeft:"shape-left-KAUAg3","shape-right":"shape-right-Cp3obn",shapeRight:"shape-right-Cp3obn","shape-top_left":"shape-top_left-Yjjnxs",shapeTopLeft:"shape-top_left-Yjjnxs","shape-top_right":"shape-top_right-FZd6d5",shapeTopRight:"shape-top_right-FZd6d5","shape-bottom_left":"shape-bottom_left-OTZF7_",shapeBottomLeft:"shape-bottom_left-OTZF7_","shape-bottom_right":"shape-bottom_right-93OhnN",shapeBottomRight:"shape-bottom_right-93OhnN"};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.root-b_WUZD{gap:var(--spacing-size-8,.5rem);flex-direction:column;display:flex}.container-QdDXv1{display:flex;position:relative;overflow:hidden}.label-SxSg48{top:.88rem;left:var(--spacing-size-12,.75rem);text-overflow:ellipsis;width:100%;font-family:var(--typescale-text-field-input-font,"Golos UI");font-size:var(--typescale-text-field-input-font-size,1rem);font-style:normal;font-weight:400;line-height:var(--typescale-text-field-input-line-height,1.25rem);color:var(--color-interactive-primary,#646464);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem);text-wrap:nowrap;pointer-events:none;transform-origin:0 0;padding-right:1rem;transition:transform .2s ease-in-out,font-size .2s ease-in-out,line-height .2s ease-in-out,top .2s ease-in-out,color .2s ease-in-out;position:absolute;overflow:hidden}.currency-atzAmT{top:1.3rem;left:var(--spacing-size-12,.75rem);visibility:hidden;color:var(--color-interactive-primary,#646464);opacity:0;transition:opacity .2s ease-in-out;position:absolute}.container-QdDXv1:focus-within .label-SxSg48,.filled-mQaws2 .label-SxSg48{font-size:var(--typescale-text-field-label-font-size,.75rem);line-height:var(--typescale-text-field-label-line-height,.875rem);top:.44rem}.container-QdDXv1:focus-within .currency-atzAmT,.filled-mQaws2 .currency-atzAmT{visibility:visible;opacity:1;transition-delay:.1s}.input-xq2uyS{width:100%;height:3rem;padding:1.31rem var(--spacing-size-8,.5rem).44rem var(--spacing-size-12,.75rem);color:var(--color-content-primary,#202020);outline-offset:-2px;background-color:color-mix(in srgb,var(--color-background-input-secondary,#0000000a)4%,transparent);
|
|
1
|
+
.root-b_WUZD{gap:var(--spacing-size-8,.5rem);flex-direction:column;display:flex}.container-QdDXv1{display:flex;position:relative;overflow:hidden}.label-SxSg48{top:.88rem;left:var(--spacing-size-12,.75rem);text-overflow:ellipsis;width:100%;font-family:var(--typescale-text-field-input-font,"Golos UI");font-size:var(--typescale-text-field-input-font-size,1rem);font-style:normal;font-weight:400;line-height:var(--typescale-text-field-input-line-height,1.25rem);color:var(--color-interactive-primary,#646464);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem);text-wrap:nowrap;pointer-events:none;transform-origin:0 0;padding-right:1rem;transition:transform .2s ease-in-out,font-size .2s ease-in-out,line-height .2s ease-in-out,top .2s ease-in-out,color .2s ease-in-out;position:absolute;overflow:hidden}.currency-atzAmT{top:1.3rem;left:var(--spacing-size-12,.75rem);visibility:hidden;color:var(--color-interactive-primary,#646464);opacity:0;transition:opacity .2s ease-in-out;position:absolute}.container-QdDXv1:focus-within .label-SxSg48,.filled-mQaws2 .label-SxSg48{font-size:var(--typescale-text-field-label-font-size,.75rem);line-height:var(--typescale-text-field-label-line-height,.875rem);top:.44rem}.container-QdDXv1:focus-within .currency-atzAmT,.filled-mQaws2 .currency-atzAmT{visibility:visible;opacity:1;transition-delay:.1s}.input-xq2uyS{--r:var(--radius-radii-14,.875rem);width:100%;height:3rem;padding:1.31rem var(--spacing-size-8,.5rem).44rem var(--spacing-size-12,.75rem);color:var(--color-content-primary,#202020);outline-offset:-2px;background-color:color-mix(in srgb,var(--color-background-input-secondary,#0000000a)4%,transparent);box-shadow:inset 0 0 1px 0 color-mix(in srgb,var(--color-shadow-inner,#202020)14%,transparent);border:0;outline:2px solid #0000;flex-direction:column;justify-content:center;align-self:stretch;align-items:flex-start;gap:.5rem;transition:outline-color .2s ease-in-out,background-color .2s ease-in-out,color .2s ease-in-out;display:flex;&::-webkit-resizer{display:none}&:focus-visible{outline:2px solid var(--color-interactive-primary,#646464)}}.input-xq2uyS,.currency-atzAmT{font-family:var(--typescale-text-field-input-font,"Golos UI");font-size:var(--typescale-text-field-input-font-size,1rem);font-style:normal;font-weight:400;line-height:var(--typescale-text-field-input-line-height,1.25rem);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem)}.tailingIcon-huRyq6{top:50%;right:calc(var(--spacing-size-8,.5rem) + .31rem);background-color:#0000;display:flex;position:absolute;transform:translateY(-50%)}.container-QdDXv1:has(.tailingIcon-huRyq6){& .input-xq2uyS{padding-right:2.75rem}}.container-QdDXv1:has(.currency-atzAmT){& .input-xq2uyS{padding-left:1.56rem}}.supportingTextContainer-KGtwwo{gap:var(--spacing-size-8,.5rem);display:flex}.disabled-KXxWok{pointer-events:none;opacity:.38}.error-O6jLhD{& .label-SxSg48,& .supportingTextContainer-KGtwwo{color:var(--color-sentiment-negative-primary,#c62a2f)}& .input-xq2uyS{outline-color:var(--color-sentiment-negative-primary,#c62a2f);background-color:var(--color-sentiment-negative-secondary,#ffe5e5)}}.shape-all-joZoe_{border-radius:var(--r)}.shape-none-XTJ9oh{border-radius:0}.shape-top-EeRKOf{border-top-left-radius:var(--r);border-top-right-radius:var(--r)}.shape-bottom-OkBYlk{border-bottom-right-radius:var(--r);border-bottom-left-radius:var(--r)}.shape-left-KAUAg3{border-top-left-radius:var(--r);border-bottom-left-radius:var(--r)}.shape-right-Cp3obn{border-top-right-radius:var(--r);border-bottom-right-radius:var(--r)}.shape-top_left-Yjjnxs{border-top-left-radius:var(--r)}.shape-top_right-FZd6d5{border-top-right-radius:var(--r)}.shape-bottom_left-OTZF7_{border-bottom-left-radius:var(--r)}.shape-bottom_right-93OhnN{border-bottom-right-radius:var(--r)}
|