@arc-ui/components 11.1.0 → 11.2.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,20 +1,25 @@
1
1
  import { FC } from "react";
2
2
  import { SwitchProps as RadixSwitchProps } from "@radix-ui/react-switch";
3
- /** `WIP`: Use `Switch` to toggle between checked and not checked. */
3
+ import { FormControlProps } from "../FormControl/FormControl";
4
+ /** Use `Switch` to toggle between checked and not checked. */
4
5
  export declare const Switch: FC<SwitchProps>;
5
- export interface SwitchProps {
6
+ export interface SwitchProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "disclosureText" | "disclosureTitle" | "onClickDisclosure" | "helper"> {
6
7
  /**
7
- * label for screen readers to announce
8
+ * Hide Label above toggle?
8
9
  */
9
- label: string;
10
+ hideLabel?: boolean;
10
11
  /**
11
- * handler for blur
12
+ * Text to display next to `Switch`
12
13
  */
13
- onBlur?: RadixSwitchProps["onBlur"];
14
+ statusText?: string;
15
+ /**
16
+ * Should the `Switch` be disabled?
17
+ */
18
+ isDisabled?: FormControlProps["isDisabled"];
14
19
  /**
15
- * show rendered label above input, useful for forms
20
+ * handler for blur
16
21
  */
17
- showLabel?: boolean;
22
+ onBlur?: RadixSwitchProps["onBlur"];
18
23
  /**
19
24
  * set the switch to be checked by default
20
25
  */
@@ -25,6 +25,7 @@ export { Select } from "./Select";
25
25
  export { SiteFooter, SiteFooterRehydrator } from "./SiteFooter";
26
26
  export { SiteHeader, SiteHeaderRehydrator } from "./SiteHeader";
27
27
  export { Surface, SurfaceContext } from "./Surface";
28
+ export { Switch } from "./Switch";
28
29
  export { Badge } from "./Badge";
29
30
  export { Text } from "./Text";
30
31
  export { TextInput } from "./TextInput";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arc-ui/components",
3
- "version": "11.1.0",
3
+ "version": "11.2.0",
4
4
  "homepage": "https://ui.digital-ent-int.bt.com",
5
5
  "author": "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
6
6
  "main": "./dist/index.js",
@@ -32,9 +32,9 @@
32
32
  "@radix-ui/react-switch": "^1.0.1"
33
33
  },
34
34
  "devDependencies": {
35
- "@arc-ui/fonts": "^11.1.0",
36
- "@arc-ui/icons": "^11.1.0",
37
- "@arc-ui/tokens": "^11.1.0",
35
+ "@arc-ui/fonts": "^11.2.0",
36
+ "@arc-ui/icons": "^11.2.0",
37
+ "@arc-ui/tokens": "^11.2.0",
38
38
  "@babel/core": "^7.14.3",
39
39
  "@babel/helper-define-map": "^7.14.3",
40
40
  "@storybook/addon-essentials": "^6.3.6",