sate-lib 2.24.0 → 2.26.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/search-input/search-input.d.ts +4 -9
- package/lib/components/search-input/search-input.d.ts.map +1 -1
- package/lib/components/search-input/search-input.js +1 -1
- package/lib/components/segmented-control/segmented-control.d.ts +4 -3
- package/lib/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/lib/components/segmented-control/segmented-control.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
|
1
2
|
type Variant = "outlined" | "filled";
|
|
2
3
|
type Size = "small" | "medium" | "large";
|
|
3
|
-
interface SearchInputProps {
|
|
4
|
-
autoComplete?: "on" | "off";
|
|
4
|
+
export interface SearchInputProps {
|
|
5
5
|
className?: string;
|
|
6
|
-
name: string;
|
|
7
|
-
placeholder?: string;
|
|
8
6
|
supportingText?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
defaultValue?: string;
|
|
11
7
|
variant?: Variant;
|
|
12
8
|
inputSize?: Size;
|
|
13
|
-
|
|
14
|
-
onValueChange?: (value: string) => void;
|
|
9
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
15
10
|
}
|
|
16
|
-
export declare function SearchInput({
|
|
11
|
+
export declare function SearchInput({ variant, inputSize, supportingText, className, inputProps, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
12
|
export {};
|
|
18
13
|
//# sourceMappingURL=search-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../../src/components/search-input/search-input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../../src/components/search-input/search-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AACrC,KAAK,IAAI,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CACnD;AAED,wBAAgB,WAAW,CAAC,EAC3B,OAAoB,EACpB,SAAmB,EACnB,cAAc,EACd,SAAS,EACT,UAAU,GACV,EAAE,gBAAgB,2CA2ElB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{cn as s}from"../../util.js";import{ButtonIcon as i}from"../button/button-icon.js";import t from"../icons/assets/Info.js";import l from"../icons/assets/MagnifyingGlass.js";import r from"../icons/assets/XCircleFill.js";import n from"./search-input.styles.module.js";function o({variant:d="outlined",inputSize:m="large",supportingText:c,className:u,inputProps:p}){let f=p?.value==null?"":String(p.value),h=!!p?.disabled,g=(()=>{switch(m){case"small":return"bodyDefault";case"medium":case"large":return"bodyLarge";default:return""}})();return a("div",{className:s(n.root,n[m],g,h&&n.disabled,u),children:[a("div",{className:n.container,children:[e(l,{"aria-hidden":"true",className:n.leftIcon,size:"large"===m?24:"medium"===m?20:16}),e("input",{...p,className:s(n.input,n[d],p?.className),disabled:h,onChange:e=>{p?.onChange?.(e)},type:p?.type??"text",value:f}),e("div",{className:n.clearButton,"data-visible":f?"true":"false",children:e(i,{"aria-hidden":!f||void 0,"aria-label":"Clear search",disabled:!f||h,icon:e(r,{size:"small"===m?16:18}),onClick:()=>{p?.onChange?.({currentTarget:{value:""},target:{value:""}})},size:"small"===m?"xSmall":"small",tabIndex:f?0:-1,variant:"text"})})]}),c&&a("div",{className:s("bodySmall",n.supportingText),children:[e(t,{"aria-hidden":"true",size:16}),c]})]})}export{o as SearchInput};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
interface
|
|
2
|
+
interface SegmentedControlOption {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
8
|
interface SegmentedControlProps {
|
|
9
|
-
options:
|
|
9
|
+
options: SegmentedControlOption[];
|
|
10
10
|
name: string;
|
|
11
11
|
defaultValue?: string;
|
|
12
12
|
onChange?: (value: string) => void;
|
|
13
13
|
className?: string;
|
|
14
|
+
ariaLabel?: string;
|
|
14
15
|
}
|
|
15
|
-
export declare function SegmentedControl({ options, name, defaultValue, onChange, className, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function SegmentedControl({ options, name, defaultValue, onChange, className, ariaLabel, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=segmented-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../src/components/segmented-control/segmented-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../../src/components/segmented-control/segmented-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,OAAO,CAAC;AAIpD,UAAU,sBAAsB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,qBAAqB;IAC9B,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,SAAS,GACT,EAAE,qBAAqB,2CAsCvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{cn as l}from"../../util.js";import
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{cn as l}from"../../util.js";import a from"./segmented-control.styles.module.js";function r({options:i,name:n,defaultValue:o,onChange:m,className:d,ariaLabel:s}){function c(e){m?.(e.currentTarget.value)}return e("fieldset",{"aria-label":s,className:l("bodyDefault",a.root,d),children:i.map(({label:r,value:i,icon:m,disabled:d})=>{let s=`${n}-${i}`;return t("div",{className:l(a.item,d&&a.disabled),children:[e("input",{className:a.itemInput,defaultChecked:i===o,disabled:d,id:s,name:n,onChange:c,type:"radio",value:i}),t("label",{className:l(a.itemLabel,!!m&&a.withIcon),htmlFor:s,children:[m,r]})]},s)})})}export{r as SegmentedControl};
|