sate-lib 1.96.0 → 1.97.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.
Files changed (45) hide show
  1. package/lib/assets/styles/reset.css +1 -1
  2. package/lib/components/text-fields/text-area/text-area.d.ts +13 -0
  3. package/lib/components/text-fields/text-area/text-area.d.ts.map +1 -0
  4. package/lib/components/text-fields/text-area/text-area.js +1 -0
  5. package/lib/components/text-fields/text-area/text-area.styles.module.js +1 -0
  6. package/lib/components/text-fields/text-area/text-area.styles_module.css +1 -0
  7. package/lib/components/text-fields/text-field/text-field.d.ts +16 -0
  8. package/lib/components/text-fields/text-field/text-field.d.ts.map +1 -0
  9. package/lib/components/text-fields/text-field/text-field.js +1 -0
  10. package/lib/components/text-fields/text-field/text-field.styles.module.js +1 -0
  11. package/lib/components/text-fields/text-field/text-field.styles_module.css +1 -0
  12. package/lib/components/text-fields/text-field-password/password-check.d.ts +9 -0
  13. package/lib/components/text-fields/text-field-password/password-check.d.ts.map +1 -0
  14. package/lib/components/text-fields/text-field-password/password-check.js +1 -0
  15. package/lib/components/text-fields/text-field-password/password-check.styles.module.js +1 -0
  16. package/lib/components/text-fields/text-field-password/password-check.styles_module.css +1 -0
  17. package/lib/components/text-fields/text-field-password/text-field-password.d.ts +14 -0
  18. package/lib/components/text-fields/text-field-password/text-field-password.d.ts.map +1 -0
  19. package/lib/components/text-fields/text-field-password/text-field-password.js +1 -0
  20. package/lib/components/text-fields/text-field-password/text-field-password.styles.module.js +1 -0
  21. package/lib/components/text-fields/text-field-password/text-field-password.styles_module.css +1 -0
  22. package/lib/components/text-fields/text-field-profile/text-field-profile.d.ts +12 -0
  23. package/lib/components/text-fields/text-field-profile/text-field-profile.d.ts.map +1 -0
  24. package/lib/components/text-fields/text-field-profile/text-field-profile.js +1 -0
  25. package/lib/components/text-fields/text-field-profile/text-field-profile.styles.module.js +1 -0
  26. package/lib/components/text-fields/text-field-profile/text-field-profile.styles_module.css +1 -0
  27. package/lib/components/text-fields/text-fields.styles.module.js +1 -0
  28. package/lib/components/text-fields/text-fields.styles_module.css +1 -0
  29. package/lib/components/text-fields/types.d.ts +2 -0
  30. package/lib/components/text-fields/types.d.ts.map +1 -0
  31. package/lib/components/text-fields/types.js +0 -0
  32. package/lib/index.d.ts +4 -2
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js +1 -1
  35. package/package.json +13 -5
  36. package/lib/components/text-area/text-area.d.ts +0 -18
  37. package/lib/components/text-area/text-area.d.ts.map +0 -1
  38. package/lib/components/text-area/text-area.js +0 -1
  39. package/lib/components/text-area/text-area.styles.module.js +0 -1
  40. package/lib/components/text-area/text-area.styles_module.css +0 -1
  41. package/lib/components/text-field/text-field.d.ts +0 -21
  42. package/lib/components/text-field/text-field.d.ts.map +0 -1
  43. package/lib/components/text-field/text-field.js +0 -1
  44. package/lib/components/text-field/text-field.styles.module.js +0 -1
  45. package/lib/components/text-field/text-field.styles_module.css +0 -1
@@ -1 +1 @@
1
- *,:before,:after{box-sizing:border-box}*{scrollbar-width:thin;margin:0;padding:0}@supports (scrollbar-color:auto){*{scrollbar-color:#d0d0d0 #f9f9f6}}html{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Golos UI,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}button{cursor:pointer;border-color:#0000}a{text-decoration:none}button,a{color:inherit;outline:none;transition:box-shadow .2s ease-in-out;&:focus-visible{box-shadow:0 0 0 2px var(--color-background-screen,#fff0),0 0 0 4px var(--color-content-primary,#202020)}}fieldset{border-color:#0000}img{max-width:100%;display:block}h1,h2,h3,h4,h5,h6{text-wrap:balance}
1
+ *,:before,:after{box-sizing:border-box}*{scrollbar-width:thin;margin:0;padding:0}@supports (scrollbar-color:auto){*{scrollbar-color:#d0d0d0 #f9f9f6}}html{scroll-behavior:smooth}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Golos UI,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}button{cursor:pointer;border-color:#0000}a{text-decoration:none}button,a{color:inherit;outline:none;transition:box-shadow .2s ease-in-out;&:focus-visible{box-shadow:0 0 0 2px var(--color-background-screen,#fff0),0 0 0 4px var(--color-content-primary,#202020)}}fieldset,input,textarea{border:0 #0000;outline:none}img{max-width:100%;display:block}h1,h2,h3,h4,h5,h6{text-wrap:balance}
@@ -0,0 +1,13 @@
1
+ import { type TextareaHTMLAttributes } from "react";
2
+ export declare const getCharCount: (value: string | undefined, maxLength: number) => string;
3
+ export interface TextAreaProps {
4
+ name: string;
5
+ label?: string;
6
+ error?: boolean;
7
+ className?: string;
8
+ supportingText?: string;
9
+ resize?: boolean;
10
+ inputProps?: TextareaHTMLAttributes<HTMLTextAreaElement>;
11
+ }
12
+ export declare function TextArea({ name, label, error, className, supportingText, resize, inputProps, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=text-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-area.d.ts","sourceRoot":"","sources":["../../../../src/components/text-fields/text-area/text-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAmB,MAAM,OAAO,CAAC;AAMrE,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,SAAS,EAAE,WAAW,MAAM,WAGxE,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;CACzD;AAED,wBAAgB,QAAQ,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,cAAc,EACd,MAAM,EACN,UAAU,GACV,EAAE,aAAa,2CA+Ef"}
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as r,useState as t}from"react";import{Icon as l}from"../../icon/icon.js";import{Typography as n}from"../../typography/typography.js";import i from"../text-fields.styles.module.js";import o from"./text-area.styles.module.js";let s=(e,a)=>{let r=e?.length??0;return`${r}/${a}`};function m({name:m,label:d,error:c,className:p,supportingText:h,resize:u,inputProps:f}){let[g,y]=t(f?.defaultValue??""),x=r(),N=g.length>0;return a("div",{className:[i.root,f?.disabled&&i.disabled,u&&o.resize,c&&i.error,p].filter(Boolean).join(" "),children:[a("div",{className:[i.baseContainer,o.containerArea,(N||!!f?.placeholder)&&i.filled].filter(Boolean).join(" "),children:[d&&e("label",{className:i.label,htmlFor:x,children:d}),e("textarea",{...f,className:`${i.baseInput} ${o.inputArea}`,id:x,name:m,onChange:e=>{y(e.target.value),f?.onChange?.(e)},value:g}),u&&e(l,{className:o.handle,name:"Notches",size:16})]}),a("div",{className:o.supportingTextContainer,children:[h&&a(n,{as:"span",className:i.supportText,palette:"grey",variant:"bodySmall",children:[e("span",{children:e(l,{"aria-hidden":"true",name:c?"WarningCircle-fill":"Info",size:16})}),h]}),e(n,{as:"span",className:o.counter,palette:"grey",variant:"bodySmall",children:s(g,f?.maxLength??250)})]})]})}export{m as TextArea,s as getCharCount};
@@ -0,0 +1 @@
1
+ import"./text-area.styles_module.css";let e={containerArea:"containerArea-Ut0Hzq",inputArea:"inputArea-nSKT9i",handle:"handle-tLhJ3r",resize:"resize-KL6uAC",supportingTextContainer:"supportingTextContainer-tNnjs_",counter:"counter-VN9TIh"};export{e as default};
@@ -0,0 +1 @@
1
+ .containerArea-Ut0Hzq{padding:1.31rem var(--spacing-size-8,.5rem).44rem var(--spacing-size-12,.75rem);border-radius:var(--r)}.inputArea-nSKT9i{resize:none;min-height:6rem;&::-webkit-resizer{display:none}}.handle-tLhJ3r{right:var(--spacing-size-4,.25rem);bottom:var(--spacing-size-4,.25rem);position:absolute}.resize-KL6uAC{& .inputArea-nSKT9i{resize:vertical}}.supportingTextContainer-tNnjs_{gap:var(--spacing-size-8,.5rem);justify-content:space-between;align-items:flex-start;display:flex}.counter-VN9TIh{margin-left:auto}
@@ -0,0 +1,16 @@
1
+ import type { InputHTMLAttributes } from "react";
2
+ import type { FieldShape } from "../types";
3
+ export interface TextFieldProps {
4
+ name: string;
5
+ label?: string;
6
+ error?: boolean;
7
+ className?: string;
8
+ supportingText?: string;
9
+ tailingIcon?: boolean;
10
+ tailingIconHandle?: () => void;
11
+ shape?: FieldShape;
12
+ prefix?: boolean;
13
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
14
+ }
15
+ export declare function TextField({ name, label, error, className, supportingText, tailingIcon, tailingIconHandle, shape, prefix, inputProps, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=text-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../../src/components/text-fields/text-field/text-field.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAMjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,wBAAgB,SAAS,CAAC,EACzB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,cAAc,EACd,WAAmB,EACnB,iBAAiB,EACjB,KAAa,EACb,MAAM,EACN,UAAU,GACV,EAAE,cAAc,2CAiFhB"}
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l,useState as i}from"react";import{ButtonIcon as t}from"../../button/button-icon.js";import{Icon as r}from"../../icon/icon.js";import{Typography as o}from"../../typography/typography.js";import n from"../text-fields.styles.module.js";import s from"./text-field.styles.module.js";function d({name:d,label:m,error:c,className:p,supportingText:f,tailingIcon:u=!1,tailingIconHandle:h,shape:b="all",prefix:g,inputProps:y}){let[j,x]=i("string"==typeof y?.defaultValue?y.defaultValue:""),v=l(),N=j.length>0;return a("div",{className:[n.root,y?.disabled&&n.disabled,c&&n.error,p].filter(Boolean).join(" "),children:[a("div",{className:[n.baseContainer,n[`shape-${b}`],(N||!!y?.placeholder)&&n.filled].filter(Boolean).join(" "),children:[m&&e("label",{className:n.label,htmlFor:v,children:m}),g&&e("span",{className:n.prefix,children:"\xa3"}),e("input",{...y,className:`${n.baseInput} ${s.input}`,id:v,name:d,onChange:e=>{x(e.target.value),y?.onChange?.(e)},value:j}),u&&e("div",{className:n.tailingIcon,children:e(t,{"aria-label":"More information",disabled:!!y?.disabled,icon:"Info",onClick:h,size:"small",variant:"text"})})]}),f&&a(o,{as:"span",className:n.supportText,palette:"grey",variant:"bodySmall",children:[e("span",{children:e(r,{"aria-hidden":"true",name:c?"WarningCircle-fill":"Info",size:16})}),f]})]})}export{d as TextField};
@@ -0,0 +1 @@
1
+ import"./text-field.styles_module.css";let e={input:"input-XeHXoi"};export{e as default};
@@ -0,0 +1 @@
1
+ .input-XeHXoi{padding-top:1.31rem;padding-bottom:.44rem;&[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}&[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}&[type=number]{-moz-appearance:textfield}}
@@ -0,0 +1,9 @@
1
+ import type { Status } from "./text-field-password";
2
+ interface PasswordCheckProps {
3
+ supportingText?: string;
4
+ status: Status;
5
+ style: string;
6
+ }
7
+ export declare function PasswordCheck({ supportingText, style, status, }: PasswordCheckProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=password-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-check.d.ts","sourceRoot":"","sources":["../../../../src/components/text-fields/text-field-password/password-check.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,UAAU,kBAAkB;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,aAAa,CAAC,EAC7B,cAAc,EACd,KAAK,EACL,MAAkB,GAClB,EAAE,kBAAkB,2CAkCpB"}
@@ -0,0 +1 @@
1
+ import{jsx as a,jsxs as e}from"react/jsx-runtime";import{Typography as r}from"../../typography/typography.js";import s from"./password-check.styles.module.js";function t({supportingText:t,style:o,status:c="default"}){return e(r,{as:"span",className:o,palette:"grey",variant:"bodySmall",children:[a("span",{children:e("svg",{"aria-hidden":"true",className:s.svg,"data-status":c,height:"16",viewBox:"0 0 24 24",width:"16",children:[a("circle",{className:s.background,cx:"12",cy:"12",r:"12"}),a("path",{className:s.ring,d:"M12 2.25 a9.75 9.75 0 1 1 0 23 a9.75 9.75 0 1 1 0 -23",pathLength:"100"}),a("path",{className:s.check,d:"M17.1 8.7L10.8 16.2L7 12.3",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})]})}),t]})}export{t as PasswordCheck};
@@ -0,0 +1 @@
1
+ import"./password-check.styles_module.css";let s={background:"background-LDgDY6",ring:"ring-_B09dI",check:"check-pZ_rrm",svg:"svg-ZItE89"};export{s as default};
@@ -0,0 +1 @@
1
+ .background-LDgDY6{fill:#0000;transition:fill .2s ease-in-out}.ring-_B09dI{fill:none;stroke-width:1.5px;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100px;transform-origin:11px 13px;transition:stroke .2s ease-in-out,stroke-dashoffset .2s ease-in-out;transform:rotate(-90deg)}.check-pZ_rrm{stroke:#fff}.svg-ZItE89{overflow:visible;&[data-status=default]{& .ring-_B09dI{stroke:color-mix(in srgb,var(--color-background-neutral-active,#00000014)8%,transparent);stroke-dashoffset:0}& .background-LDgDY6{fill:color-mix(in srgb,var(--color-background-neutral,#0000000a)4%,transparent)}}&[data-status=weak]{& .ring-_B09dI{stroke:var(--color-sentiment-negative-primary,#c62a2f);stroke-dashoffset:70px}& .background-LDgDY6{fill:var(--color-sentiment-negative-secondary,#ffe5e5)}}&[data-status=mid]{& .ring-_B09dI{stroke:var(--color-sentiment-warning-content,#775f28);stroke-dashoffset:30px}& .background-LDgDY6{fill:var(--color-sentiment-warning-secondary,#fff3d0)}}&[data-status=valid]{& .ring-_B09dI{stroke:#0000;stroke-dashoffset:0}& .background-LDgDY6{fill:var(--color-sentiment-positive-primary,#006d43)}}}
@@ -0,0 +1,14 @@
1
+ import type { InputHTMLAttributes } from "react";
2
+ export type Status = "default" | "weak" | "mid" | "valid";
3
+ export interface TextFieldPasswordProps {
4
+ name: string;
5
+ label?: string;
6
+ error?: boolean;
7
+ className?: string;
8
+ supportingText?: string;
9
+ action?: "create" | "default";
10
+ status?: Status;
11
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
12
+ }
13
+ export declare function TextFieldPassword({ name, label, error, className, supportingText, action, status, inputProps, }: TextFieldPasswordProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=text-field-password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-field-password.d.ts","sourceRoot":"","sources":["../../../../src/components/text-fields/text-field-password/text-field-password.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAcjD,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,cAAc,EACd,MAAkB,EAClB,MAAkB,EAClB,UAAU,GACV,EAAE,sBAAsB,2CAwFxB"}
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{Suspense as t,lazy as r,useId as l,useState as o}from"react";import{ButtonIcon as s}from"../../button/button-icon.js";import{Icon as i}from"../../icon/icon.js";import{Typography as n}from"../../typography/typography.js";import d from"../text-fields.styles.module.js";import p from"./text-field-password.styles.module.js";let c=r(()=>import("./password-check.js").then(e=>({default:e.PasswordCheck})));function m({name:r,label:m,error:u,className:h,supportingText:f,action:y="default",status:b="default",inputProps:g}){let[x,j]=o(""),[w,v]=o(!1),C=l(),N=x.length>0;return a("div",{className:[d.root,g?.disabled&&d.disabled,u&&d.error,h].filter(Boolean).join(" "),children:[a("div",{className:[d.baseContainer,p.container,(N||!!g?.placeholder)&&d.filled].filter(Boolean).join(" "),children:[m&&e("label",{className:d.label,htmlFor:C,children:m}),e("input",{...g,className:`${d.baseInput} ${p.input}`,id:C,name:r,onChange:e=>{j(e.target.value),g?.onChange?.(e)},type:w?"text":"password",value:x}),e("div",{className:d.tailingIcon,children:e(s,{"aria-label":w?"Hide password":"Show password","aria-pressed":w,icon:w?"EyeSlash":"Eye",onClick:()=>v(e=>!e),size:"small",variant:"text"})})]}),"create"===y&&e(t,{children:e(c,{status:b,style:d.supportText,supportingText:f})}),"default"===y&&f&&a(n,{as:"span",className:d.supportText,palette:"grey",variant:"bodySmall",children:[e("span",{children:e(i,{"aria-hidden":"true",name:u?"WarningCircle-fill":"Info",size:16})}),f]})]})}export{m as TextFieldPassword};
@@ -0,0 +1 @@
1
+ import"./text-field-password.styles_module.css";let t={input:"input-iU0q3E",container:"container-j_pkVK"};export{t as default};
@@ -0,0 +1 @@
1
+ .input-iU0q3E{padding-top:1.31rem;padding-bottom:.44rem}.container-j_pkVK{border-radius:var(--r)}
@@ -0,0 +1,12 @@
1
+ import type { InputHTMLAttributes } from "react";
2
+ export interface TextFieldProfileProps {
3
+ name: string;
4
+ error?: boolean;
5
+ className?: string;
6
+ supportingText?: string;
7
+ status?: "loading" | "valid" | null;
8
+ prefix?: string;
9
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
10
+ }
11
+ export declare function TextFieldProfile({ name, error, className, supportingText, status, prefix, inputProps, }: TextFieldProfileProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=text-field-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-field-profile.d.ts","sourceRoot":"","sources":["../../../../src/components/text-fields/text-field-profile/text-field-profile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAQjD,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,wBAAgB,gBAAgB,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,SAAS,EACT,cAAc,EACd,MAAM,EACN,MAAqB,EACrB,UAAU,GACV,EAAE,qBAAqB,2CAyEvB"}
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as i,useState as r}from"react";import{Icon as n}from"../../icon/icon.js";import t from"../../progress-indicator/progress-indicator.js";import{Typography as l}from"../../typography/typography.js";import o from"../text-fields.styles.module.js";import s from"./text-field-profile.styles.module.js";function d({name:d,error:c,className:m,supportingText:p,status:f,prefix:u="sate.menu/",inputProps:h}){let[g,y]=r("string"==typeof h?.defaultValue?h.defaultValue:""),j=i();return a("div",{className:[o.root,h?.disabled&&o.disabled,c&&o.error,m].filter(Boolean).join(" "),children:[a("div",{className:[o.baseContainer,s.container].filter(Boolean).join(" "),children:[e("span",{className:s.prefix,children:u}),e("input",{...h,className:`${o.baseInput} ${s.input}`,id:j,name:d,onChange:e=>{y(e.target.value),h?.onChange?.(e)},value:g}),a("div",{className:s.tailingIcon,"data-status":f??"idle",children:[e("span",{"aria-hidden":"true",className:s.iconValid,children:e(n,{name:"CheckCircle-fill",size:18})}),e("span",{"aria-hidden":"true",className:s.iconLoading,children:e(t,{size:18})})]})]}),p&&a(l,{as:"span",className:o.supportText,palette:"grey",variant:"bodySmall",children:[e("span",{children:e(n,{"aria-hidden":"true",name:c?"WarningCircle-fill":"Info",size:16})}),p]})]})}export{d as TextFieldProfile};
@@ -0,0 +1 @@
1
+ import"./text-field-profile.styles_module.css";let i={container:"container-ctS0J6",prefix:"prefix-TcpNSA",iconValid:"iconValid-vxcWpy",tailingIcon:"tailingIcon-LU_89N",iconLoading:"iconLoading-d3Dc2o"};export{i as default};
@@ -0,0 +1 @@
1
+ .container-ctS0J6{border-radius:var(--r)}.prefix-TcpNSA{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-content-tertiary,gray);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem)}.iconValid-vxcWpy{color:var(--color-sentiment-positive-primary,#006d43)}.tailingIcon-LU_89N{width:18px;height:18px;display:block;position:relative;& .iconValid-vxcWpy,& .iconLoading-d3Dc2o{visibility:hidden;pointer-events:none;opacity:0;justify-content:center;align-items:center;transition:opacity .2s ease-in-out,transform .2s ease-in-out,visibility .2s ease-in-out .1s;display:flex;position:absolute;inset:0;transform:scale(.8)}&[data-status=valid] .iconValid-vxcWpy,&[data-status=loading] .iconLoading-d3Dc2o{visibility:visible;opacity:1;transform:scale(1)}}
@@ -0,0 +1 @@
1
+ import"./text-fields.styles_module.css";let e={root:"root-ptgWHu",label:"label-oNE7iK",baseContainer:"baseContainer-f_HXrT",prefix:"prefix-fHZx0a",filled:"filled-l6Gkez",baseInput:"baseInput-m_MI8c",supportText:"supportText-Zbxe5O",disabled:"disabled-Nvy7EK",tailingIcon:"tailingIcon-EfoylM",error:"error-wzeFZr","shape-all":"shape-all-uuXBui",shapeAll:"shape-all-uuXBui","shape-none":"shape-none-GPw0Vd",shapeNone:"shape-none-GPw0Vd","shape-top":"shape-top-zdQa9W",shapeTop:"shape-top-zdQa9W","shape-bottom":"shape-bottom-hBBE1m",shapeBottom:"shape-bottom-hBBE1m","shape-left":"shape-left-Jg7MgK",shapeLeft:"shape-left-Jg7MgK","shape-right":"shape-right-fXeJdX",shapeRight:"shape-right-fXeJdX","shape-top_left":"shape-top_left-omJPnb",shapeTopLeft:"shape-top_left-omJPnb","shape-top_right":"shape-top_right-AXvVzj",shapeTopRight:"shape-top_right-AXvVzj","shape-bottom_left":"shape-bottom_left-JlSu1Y",shapeBottomLeft:"shape-bottom_left-JlSu1Y","shape-bottom_right":"shape-bottom_right-OyzqgI",shapeBottomRight:"shape-bottom_right-OyzqgI"};export{e as default};
@@ -0,0 +1 @@
1
+ .root-ptgWHu{gap:var(--spacing-size-8,.5rem);flex-direction:column;display:flex}.label-oNE7iK{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;will-change:transform;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}.baseContainer-f_HXrT{--r:var(--radius-radii-14,.875rem);width:100%;padding:0 var(--spacing-size-8,.5rem)0 var(--spacing-size-12,.75rem);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);outline:2px solid #0000;align-items:center;transition:outline-color .2s ease-in-out,background-color .2s ease-in-out,box-shadow .2s ease-in-out;display:flex;position:relative;overflow:hidden}.prefix-fHZx0a{visibility:hidden;padding-top:1.31rem;padding-right:var(--spacing-size-4,.25rem);color:var(--color-interactive-primary,#646464);opacity:0;padding-bottom:.44rem;transition:opacity .2s ease-in-out,visibility 0s ease-in-out .2s}.baseContainer-f_HXrT:focus-within .prefix-fHZx0a,.filled-l6Gkez .prefix-fHZx0a{visibility:visible;opacity:1;transition:opacity .2s ease-in-out,visibility}.baseContainer-f_HXrT:focus-within{outline-color:var(--color-interactive-primary,#646464)}.baseContainer-f_HXrT:focus-within .label-oNE7iK,.filled-l6Gkez .label-oNE7iK{font-size:var(--typescale-text-field-label-font-size,.75rem);line-height:var(--typescale-text-field-label-line-height,.875rem);top:.44rem}@supports selector(.baseContainer:has(.baseInput:focus-visible)){.baseContainer-f_HXrT:focus-within{outline-color:#0000}.baseContainer-f_HXrT:has(.baseInput-m_MI8c:focus-visible){outline-color:var(--color-interactive-primary,#646464)}}.baseInput-m_MI8c{height:3rem;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-content-primary,#202020);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem);background:0 0;flex:1;&::placeholder{color:var(--color-content-tertiary,gray)}}.supportText-Zbxe5O{gap:var(--spacing-size-8,.5rem);padding-left:var(--spacing-size-8,.5rem);text-wrap:balance;display:flex}.disabled-Nvy7EK{pointer-events:none;opacity:.38}.tailingIcon-EfoylM{display:flex}.error-wzeFZr{& .label-oNE7iK,& .supportText-Zbxe5O{color:var(--color-sentiment-negative-primary,#c62a2f)}& .baseContainer-f_HXrT,& .baseContainer-f_HXrT:has(.baseInput-m_MI8c:focus-visible){outline-color:var(--color-sentiment-negative-primary,#c62a2f);background-color:var(--color-sentiment-negative-secondary,#ffe5e5)}}.shape-all-uuXBui{border-radius:var(--r)}.shape-none-GPw0Vd{border-radius:0}.shape-top-zdQa9W{border-top-left-radius:var(--r);border-top-right-radius:var(--r)}.shape-bottom-hBBE1m{border-bottom-right-radius:var(--r);border-bottom-left-radius:var(--r)}.shape-left-Jg7MgK{border-top-left-radius:var(--r);border-bottom-left-radius:var(--r)}.shape-right-fXeJdX{border-top-right-radius:var(--r);border-bottom-right-radius:var(--r)}.shape-top_left-omJPnb{border-top-left-radius:var(--r)}.shape-top_right-AXvVzj{border-top-right-radius:var(--r)}.shape-bottom_left-JlSu1Y{border-bottom-left-radius:var(--r)}.shape-bottom_right-OyzqgI{border-bottom-right-radius:var(--r)}
@@ -0,0 +1,2 @@
1
+ export type FieldShape = "all" | "none" | "top" | "bottom" | "left" | "right" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
2
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/text-fields/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GACnB,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC"}
File without changes
package/lib/index.d.ts CHANGED
@@ -15,7 +15,9 @@ export { SearchInput } from "./components/search-input/search-input";
15
15
  export { SegmentedControl } from "./components/segmented-control/segmented-control";
16
16
  export { Skeleton } from "./components/skeleton/skeleton";
17
17
  export { Tabs } from "./components/tabs/tabs";
18
- export { TextArea } from "./components/text-area/text-area";
19
- export { TextField } from "./components/text-field/text-field";
18
+ export { TextArea } from "./components/text-fields/text-area/text-area";
19
+ export { TextField } from "./components/text-fields/text-field/text-field";
20
+ export { TextFieldPassword } from "./components/text-fields/text-field-password/text-field-password";
21
+ export { TextFieldProfile } from "./components/text-fields/text-field-profile/text-field-profile";
20
22
  export { Typography } from "./components/typography/typography";
21
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8CAA8C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,gEAAgE,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC"}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- import{Avatar as o}from"./components/avatar/avatar.js";import{Badge as t}from"./components/badge/badge.js";import{Button as r}from"./components/button/button.js";import{ButtonIcon as n}from"./components/button/button-icon.js";import{ButtonLink as e}from"./components/button/button-link.js";import{Drawer as m,DrawerGallery as p,DrawerMenu as s}from"./components/drawer/index.js";import{FilterChipGroup as i}from"./components/filter-chip/filter-chip.js";import{Icon as a}from"./components/icon/icon.js";import{Logo as c}from"./components/logo/logo.js";import{MapMarker as f}from"./components/map-marker/map-marker.js";import{MenuItem as j}from"./components/menu-item/menu-item.js";import{Notification as l}from"./components/notification/notification.js";import{ProgressIndicator as u}from"./components/progress-indicator/progress-indicator.js";import{SearchInput as g}from"./components/search-input/search-input.js";import{SegmentedControl as d}from"./components/segmented-control/segmented-control.js";import{Skeleton as b}from"./components/skeleton/skeleton.js";import{Tabs as h}from"./components/tabs/tabs.js";import{TextArea as k}from"./components/text-area/text-area.js";import{TextField as x}from"./components/text-field/text-field.js";import{Typography as y}from"./components/typography/typography.js";export{o as Avatar,t as Badge,r as Button,n as ButtonIcon,e as ButtonLink,m as Drawer,p as DrawerGallery,s as DrawerMenu,i as FilterChipGroup,a as Icon,c as Logo,f as MapMarker,j as MenuItem,l as Notification,u as ProgressIndicator,g as SearchInput,d as SegmentedControl,b as Skeleton,h as Tabs,k as TextArea,x as TextField,y as Typography};
1
+ import{Avatar as o}from"./components/avatar/avatar.js";import{Badge as t}from"./components/badge/badge.js";import{Button as e}from"./components/button/button.js";import{ButtonIcon as r}from"./components/button/button-icon.js";import{ButtonLink as n}from"./components/button/button-link.js";import{Drawer as m,DrawerGallery as s,DrawerMenu as i}from"./components/drawer/index.js";import{FilterChipGroup as p}from"./components/filter-chip/filter-chip.js";import{Icon as a}from"./components/icon/icon.js";import{Logo as c}from"./components/logo/logo.js";import{MapMarker as f}from"./components/map-marker/map-marker.js";import{MenuItem as l}from"./components/menu-item/menu-item.js";import{Notification as d}from"./components/notification/notification.js";import{ProgressIndicator as j}from"./components/progress-indicator/progress-indicator.js";import{SearchInput as x}from"./components/search-input/search-input.js";import{SegmentedControl as u}from"./components/segmented-control/segmented-control.js";import{Skeleton as g}from"./components/skeleton/skeleton.js";import{Tabs as b}from"./components/tabs/tabs.js";import{TextArea as h}from"./components/text-fields/text-area/text-area.js";import{TextField as k}from"./components/text-fields/text-field/text-field.js";import{TextFieldPassword as w}from"./components/text-fields/text-field-password/text-field-password.js";import{TextFieldProfile as y}from"./components/text-fields/text-field-profile/text-field-profile.js";import{Typography as T}from"./components/typography/typography.js";export{o as Avatar,t as Badge,e as Button,r as ButtonIcon,n as ButtonLink,m as Drawer,s as DrawerGallery,i as DrawerMenu,p as FilterChipGroup,a as Icon,c as Logo,f as MapMarker,l as MenuItem,d as Notification,j as ProgressIndicator,x as SearchInput,u as SegmentedControl,g as Skeleton,b as Tabs,h as TextArea,k as TextField,w as TextFieldPassword,y as TextFieldProfile,T as Typography};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "1.96.0",
3
+ "version": "1.97.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "keywords": [
@@ -94,12 +94,20 @@
94
94
  "types": "./lib/components/search-input/search-input.d.ts"
95
95
  },
96
96
  "./text-area": {
97
- "import": "./lib/components/text-area/text-area.js",
98
- "types": "./lib/components/text-area/text-area.d.ts"
97
+ "import": "./lib/components/text-fields/text-area/text-area.js",
98
+ "types": "./lib/components/text-fields/text-area/text-area.d.ts"
99
99
  },
100
100
  "./text-field": {
101
- "import": "./lib/components/text-field/text-field.js",
102
- "types": "./lib/components/text-field/text-field.d.ts"
101
+ "import": "./lib/components/text-fields/text-field/text-field.js",
102
+ "types": "./lib/components/text-fields/text-field/text-field.d.ts"
103
+ },
104
+ "./text-field-password": {
105
+ "import": "./lib/components/text-fields/text-field-password/text-field-password.js",
106
+ "types": "./lib/components/text-fields/text-field-password/text-field-password.d.ts"
107
+ },
108
+ "./text-field-profile": {
109
+ "import": "./lib/components/text-fields/text-field-profile/text-field-profile.js",
110
+ "types": "./lib/components/text-fields/text-field-profile/text-field-profile.d.ts"
103
111
  },
104
112
  "./logo": {
105
113
  "import": "./lib/components/logo/logo.js",
@@ -1,18 +0,0 @@
1
- export declare const getCharCount: (value: string | undefined, maxLength: number) => string;
2
- export interface TextAreaProps {
3
- name?: string;
4
- label?: string;
5
- error?: boolean;
6
- placeholder?: string;
7
- className?: string;
8
- supportingText?: string;
9
- supportingIcon?: boolean;
10
- disabled?: boolean;
11
- defaultValue?: string;
12
- autoComplete?: "on" | "off";
13
- onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
14
- maxLength?: number;
15
- resize?: boolean;
16
- }
17
- export declare function TextArea({ name, label, placeholder, error, className, supportingText, supportingIcon, disabled, defaultValue, autoComplete, onChange, maxLength, resize, ...rest }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
18
- //# sourceMappingURL=text-area.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text-area.d.ts","sourceRoot":"","sources":["../../../src/components/text-area/text-area.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,GAAG,SAAS,EAAE,WAAW,MAAM,WAGxE,CAAC;AAEF,MAAM,WAAW,aAAa;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,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,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,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,SAAS,EACT,cAAc,EACd,cAAqB,EACrB,QAAQ,EACR,YAAY,EACZ,YAAoB,EACpB,QAAQ,EACR,SAAe,EACf,MAAc,EACd,GAAG,IAAI,EACP,EAAE,aAAa,2CA+Ef"}
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as r,useState as t}from"react";import{Icon as l}from"../icon/icon.js";import{Typography as n}from"../typography/typography.js";import o from"./text-area.styles.module.js";let i=(e,a)=>{let r=e?.length??0;return`${r}/${a}`};function s({name:s,label:m,placeholder:c,error:d,className:p,supportingText:h,supportingIcon:f=!0,disabled:u,defaultValue:g,autoComplete:x="off",onChange:y,maxLength:N=250,resize:v=!1,...b}){let[j,C]=t(g??""),z=r(),T=j.length>0;return a("div",{className:[o.root,u&&o.disabled,v&&o.resize,d&&o.error,p].filter(Boolean).join(" "),children:[a("div",{className:[o.container,(T||!!c)&&o.filled].filter(Boolean).join(" "),children:[m&&e("label",{className:o.label,htmlFor:z,children:m}),e("textarea",{autoComplete:x,className:o.textArea,disabled:u,id:z,maxLength:N,name:s,onChange:e=>{C(e.target.value),y?.(e)},placeholder:c,value:j,...b}),!v&&e(l,{className:o.handle,name:"Notches",size:16})]}),a("div",{className:o.supportingTextContainer,children:[h&&a(n,{as:"span",className:o.supportText,palette:"grey",variant:"bodySmall",children:[f&&e("span",{children:e(l,{"aria-hidden":"true",name:d?"WarningCircle-fill":"Info",size:16})}),h]}),e(n,{as:"span",className:o.counter,palette:"grey",variant:"bodySmall",children:i(j,N)})]})]})}export{s as TextArea,i as getCharCount};
@@ -1 +0,0 @@
1
- import"./text-area.styles_module.css";let e={root:"root-T3Rwwi",container:"container-n5Qln_",label:"label-_mNs6L",filled:"filled-VPuHVw",textArea:"textArea-gndPPt",handle:"handle-NwKya6",resize:"resize-OoojW3",supportingTextContainer:"supportingTextContainer-Uc3rlw",supportText:"supportText-BUMRVx",counter:"counter-QwHB4k",disabled:"disabled-ngZ0PN",error:"error-_6v7UT"};export{e as default};
@@ -1 +0,0 @@
1
- .root-T3Rwwi{gap:var(--spacing-size-8,.5rem);flex-direction:column;display:flex}.container-n5Qln_{display:flex;position:relative;overflow:hidden}.label-_mNs6L{top:.875rem;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}.container-n5Qln_:focus-within .label-_mNs6L,.filled-VPuHVw .label-_mNs6L{font-size:var(--typescale-text-field-label-font-size,.75rem);line-height:var(--typescale-text-field-label-line-height,.875rem);top:.4375rem}.textArea-gndPPt{width:100%;min-height:6rem;padding:1.31rem var(--spacing-size-24,1.5rem).625rem var(--spacing-size-12,.75rem);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-content-primary,#202020);letter-spacing:var(--typescale-text-field-input-letter-spacing,-.0125rem);resize:vertical;outline-offset:-2px;background-color:color-mix(in srgb,var(--color-background-input-secondary,#0000000a)4%,transparent);border-radius:var(--radius-radii-14,.875rem);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)}}.container-n5Qln_:not(:has(.label-_mNs6L)){& .textArea-gndPPt{padding:.875rem var(--spacing-size-24,1.5rem).625rem var(--spacing-size-12,.75rem)}}.handle-NwKya6{right:var(--spacing-size-4,.25rem);bottom:var(--spacing-size-4,.25rem);position:absolute}.resize-OoojW3{& textarea{resize:none}}.supportingTextContainer-Uc3rlw{gap:var(--spacing-size-8,.5rem);justify-content:space-between;align-items:flex-start;display:flex}.supportText-BUMRVx{gap:var(--spacing-size-8,.5rem);display:flex}.counter-QwHB4k{margin-left:auto}.disabled-ngZ0PN{pointer-events:none;opacity:.38}.error-_6v7UT{& .label-_mNs6L,& .supportText-BUMRVx{color:var(--color-sentiment-negative-primary,#c62a2f)}& .textArea-gndPPt{outline-color:var(--color-sentiment-negative-primary,#c62a2f);background-color:var(--color-sentiment-negative-secondary,#ffe5e5)}}
@@ -1,21 +0,0 @@
1
- export type FieldShape = "all" | "none" | "top" | "bottom" | "left" | "right" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
2
- export interface TextFieldProps {
3
- name?: string;
4
- type?: "text" | "password";
5
- variant?: "default" | "currency";
6
- label?: string;
7
- error?: boolean;
8
- placeholder?: string;
9
- className?: string;
10
- supportingText?: string;
11
- supportingIcon?: boolean;
12
- tailingIcon?: boolean;
13
- tailingIconHandle?: () => void;
14
- disabled?: boolean;
15
- defaultValue?: string;
16
- autoComplete?: "on" | "off";
17
- onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
18
- shape?: FieldShape;
19
- }
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;
21
- //# sourceMappingURL=text-field.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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)}