sate-lib 2.24.0 → 2.25.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.
@@ -1,17 +1,18 @@
1
1
  import type { ReactNode } from "react";
2
- interface Option {
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: Option[];
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,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,MAAM;IACf,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,MAAM,EAAE,CAAC;IAClB,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;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,SAAS,GACT,EAAE,qBAAqB,2CAgCvB"}
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 r from"./segmented-control.styles.module.js";function i({options:m,name:o,defaultValue:a,onChange:n,className:d}){return e("fieldset",{className:l("bodyDefault",r.root,d),children:m.map(({label:i,value:m,icon:d,disabled:s})=>{let c=`${o}-${m}`;return t("div",{className:l(r.item,s&&r.disabled),children:[e("input",{className:r.itemInput,defaultChecked:m===a,disabled:s,id:c,name:o,onChange:()=>n?.(m),type:"radio"}),t("label",{className:l(r.itemLabel,!!d&&r.withIcon),htmlFor:c,children:[d,i]})]},c)})})}export{i as SegmentedControl};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sate-lib",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "keywords": [