@arc-ui/components 11.1.0 → 11.3.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 (54) hide show
  1. package/dist/Checkbox/Checkbox.cjs.js +8 -27
  2. package/dist/Checkbox/Checkbox.esm.js +3 -22
  3. package/dist/FormControl/FormControl.cjs.d.ts +1 -1
  4. package/dist/FormControl/FormControl.cjs.js +1 -1
  5. package/dist/FormControl/FormControl.esm.d.ts +1 -1
  6. package/dist/FormControl/FormControl.esm.js +1 -1
  7. package/dist/RadioGroup/RadioGroup.cjs.d.ts +2 -2
  8. package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
  9. package/dist/RadioGroup/RadioGroup.esm.d.ts +2 -2
  10. package/dist/RadioGroup/RadioGroup.esm.js +2 -2
  11. package/dist/Select/Select.cjs.d.ts +2 -2
  12. package/dist/Select/Select.cjs.js +209 -607
  13. package/dist/Select/Select.esm.d.ts +2 -2
  14. package/dist/Select/Select.esm.js +45 -443
  15. package/dist/Switch/Switch.cjs.d.ts +40 -0
  16. package/dist/Switch/Switch.cjs.js +211 -0
  17. package/dist/Switch/Switch.esm.d.ts +40 -0
  18. package/dist/Switch/Switch.esm.js +203 -0
  19. package/dist/Switch/package.json +7 -0
  20. package/dist/TextInput/TextInput.cjs.d.ts +2 -2
  21. package/dist/TextInput/TextInput.cjs.js +1 -1
  22. package/dist/TextInput/TextInput.esm.d.ts +2 -2
  23. package/dist/TextInput/TextInput.esm.js +1 -1
  24. package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -18
  25. package/dist/VerticalSpace/VerticalSpace.cjs.js +5 -20
  26. package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -18
  27. package/dist/VerticalSpace/VerticalSpace.esm.js +4 -19
  28. package/dist/_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js +29 -0
  29. package/dist/_shared/cjs/{FormControl-e6b7d7c5.d.ts → FormControl-d4d9c665.d.ts} +4 -0
  30. package/dist/_shared/cjs/{FormControl-e6b7d7c5.js → FormControl-d4d9c665.js} +6 -5
  31. package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +18 -0
  32. package/dist/_shared/cjs/VerticalSpace-65ad083c.js +25 -0
  33. package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
  34. package/dist/_shared/cjs/index.module-af7c85f2.js +400 -0
  35. package/dist/_shared/esm/BtIconTickAlt2Px-da97e9ae.js +23 -0
  36. package/dist/_shared/esm/{FormControl-84c9ace6.d.ts → FormControl-2cb96de7.d.ts} +4 -0
  37. package/dist/_shared/esm/{FormControl-84c9ace6.js → FormControl-2cb96de7.js} +6 -5
  38. package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +18 -0
  39. package/dist/_shared/esm/VerticalSpace-6b4f5e50.js +19 -0
  40. package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
  41. package/dist/_shared/esm/index.module-599b86dd.js +388 -0
  42. package/dist/index.es.js +285 -112
  43. package/dist/index.es.js.map +1 -1
  44. package/dist/index.js +500 -326
  45. package/dist/index.js.map +1 -1
  46. package/dist/styles.css +1 -1
  47. package/dist/types/components/FormControl/FormControl.d.ts +4 -0
  48. package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
  49. package/dist/types/components/Select/Select.d.ts +1 -1
  50. package/dist/types/components/Switch/Switch.d.ts +13 -8
  51. package/dist/types/components/TextInput/TextInput.d.ts +1 -1
  52. package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +1 -1
  53. package/dist/types/components/index.d.ts +1 -0
  54. package/package.json +4 -4
@@ -63,5 +63,9 @@ export interface FormControlProps {
63
63
  * onClick handler for FormControlDisclosure
64
64
  */
65
65
  onClickDisclosure?: () => void;
66
+ /**
67
+ * Position helper text under label. This is set to `false` by default.
68
+ */
69
+ helperUnderLabel?: boolean;
66
70
  }
67
71
  export { Context as FormControlContext };
@@ -8,7 +8,7 @@ declare type EventType = React.ChangeEvent<HTMLInputElement>;
8
8
  export declare const RadioGroup: FC<RadioGroupProps> & {
9
9
  RadioButton: typeof RadioButton;
10
10
  };
11
- export interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus"> {
11
+ export interface RadioGroupProps extends Omit<FormControlProps, "children" | "elementType" | "errorMessage" | "htmlFor" | "labelSize" | "requirementStatus" | "disclosureText" | "disclosureTitle" | "onClickDisclosure" | "helperUnderLabel"> {
12
12
  /**
13
13
  * Contents of the RadioGroup. Should only contain `RadioGroup.RadioButton`
14
14
  */
@@ -2,7 +2,7 @@ import React, { FocusEvent } from "react";
2
2
  import { FormControlProps } from "../FormControl/FormControl";
3
3
  /** Use `Select` to choose from a dropdown list of options. */
4
4
  export declare const Select: React.FC<SelectProps>;
5
- export interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id"> {
5
+ export interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id" | "helperUnderLabel"> {
6
6
  name: string;
7
7
  label: string;
8
8
  placeholder: string;
@@ -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
  */
@@ -5,7 +5,7 @@ declare type EventType = React.ChangeEvent<HTMLInputElement>;
5
5
  * Use `TextInput` to allow custom user text entry with a keyboard.
6
6
  */
7
7
  export declare const TextInput: FC<TextInputProps>;
8
- export interface TextInputProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus"> {
8
+ export interface TextInputProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "helperUnderLabel"> {
9
9
  /**
10
10
  * Uncontrolled default value of the TextInput. If the TextInput is controlled
11
11
  * via `value`/`onChange`, `defaultValue` will be ignored.
@@ -3,7 +3,7 @@ import { FC } from "react";
3
3
  * Use `VerticalSpace` to create vertical space between components.
4
4
  */
5
5
  export declare const VerticalSpace: FC<VerticalSpaceProps>;
6
- export declare type VerticalSpaceSize = "4" | "8" | "12" | "16" | "24" | "32" | "48" | "64" | "96" | "128";
6
+ export declare type VerticalSpaceSize = "4" | "8" | "12" | "16" | "20" | "24" | "28" | "32" | "40" | "48" | "64" | "96" | "128";
7
7
  export interface VerticalSpaceProps {
8
8
  /**
9
9
  * Should the VerticalSpace be visible for debugging and documentation
@@ -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.3.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.3.0",
36
+ "@arc-ui/icons": "^11.3.0",
37
+ "@arc-ui/tokens": "^11.3.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",