sate-lib 1.76.0 → 1.77.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/README.md +1 -1
- package/lib/components/text-area/text-area.d.ts +2 -2
- package/lib/components/text-area/text-area.d.ts.map +1 -1
- package/lib/components/text-field/text-field.d.ts +3 -3
- package/lib/components/text-field/text-field.d.ts.map +1 -1
- package/lib/components/text-field/text-field.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A lightweight and modular React component library designed for modern web interfaces.
|
|
4
4
|
**SATE Lib** powers the [sate.menu](https://sate.menu) platform with reusable, scalable, and themeable UI components.
|
|
5
5
|
|
|
6
|
-
- [Demo](https://
|
|
6
|
+
- [Demo](https://lib.sate.menu)
|
|
7
7
|
- [NPM](https://www.npmjs.com/package/sate-lib)
|
|
8
8
|
|
|
9
9
|
## Tech Stack
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const getCharCount: (value: string | undefined, maxLength: number) => string;
|
|
2
2
|
interface TextAreaProps {
|
|
3
|
-
label?: string;
|
|
4
3
|
name: string;
|
|
5
|
-
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: boolean;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
supportingText?: string;
|
|
@@ -1 +1 @@
|
|
|
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,UAAU,aAAa;IACtB,
|
|
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,UAAU,aAAa;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,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,8 +1,8 @@
|
|
|
1
1
|
interface TextFieldProps {
|
|
2
|
-
type: "text" | "password";
|
|
3
|
-
variant: "default" | "currency";
|
|
4
|
-
label: string;
|
|
5
2
|
name: string;
|
|
3
|
+
type?: "text" | "password";
|
|
4
|
+
variant?: "default" | "currency";
|
|
5
|
+
label?: string;
|
|
6
6
|
error?: boolean;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"text-field.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/text-field.tsx"],"names":[],"mappings":"AAMA,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,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;CAC5D;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,GAAG,IAAI,EACP,EAAE,cAAc,2CAmGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as
|
|
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,...C}){let[N,k]=r(v??""),[z,I]=r(!1),S=l(),B=N.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?z?"text":"password":s,T="password"!==s&&b&&!!x,H="password"===s?e(i,{"aria-label":z?"Hide password":"Show password","aria-pressed":z,disabled:g,icon:z?"EyeSlash":"Eye",onClick:()=>I(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:[e("label",{className:n.label,htmlFor:S,children:p}),"currency"===d&&e("span",{className:n.currency,children:"\xa3"}),e("input",{autoComplete:j,className:n.input,disabled:g,id:S,inputMode:"currency"===d?"decimal":"text",name:c,onChange:e=>{k(e.target.value),w?.(e)},placeholder:m,spellCheck:"false",type:M,value:N,...C}),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};
|