@arc-ui/components 11.2.0 → 11.4.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/dist/Button/Button.cjs.d.ts +1 -1
- package/dist/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.d.ts +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/Card/Card.cjs.js +1 -1
- package/dist/Card/Card.esm.js +1 -1
- package/dist/Checkbox/Checkbox.cjs.js +8 -27
- package/dist/Checkbox/Checkbox.esm.js +3 -22
- package/dist/FormControl/FormControl.cjs.d.ts +1 -1
- package/dist/FormControl/FormControl.cjs.js +1 -1
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +1 -1
- package/dist/ProgressBar/ProgressBar.cjs.d.ts +47 -0
- package/dist/ProgressBar/ProgressBar.cjs.js +113 -0
- package/dist/ProgressBar/ProgressBar.esm.d.ts +47 -0
- package/dist/ProgressBar/ProgressBar.esm.js +105 -0
- package/dist/ProgressBar/package.json +7 -0
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
- package/dist/RadioGroup/RadioGroup.esm.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.esm.js +2 -2
- package/dist/Select/Select.cjs.d.ts +2 -2
- package/dist/Select/Select.cjs.js +75 -74
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +3 -2
- package/dist/SiteHeader/SiteHeader.cjs.js +1 -1
- package/dist/SiteHeader/SiteHeader.esm.js +1 -1
- package/dist/Switch/Switch.cjs.d.ts +1 -1
- package/dist/Switch/Switch.cjs.js +13 -12
- package/dist/Switch/Switch.esm.d.ts +1 -1
- package/dist/Switch/Switch.esm.js +4 -3
- package/dist/Tag/Tag.cjs.d.ts +33 -0
- package/dist/Tag/Tag.cjs.js +73 -0
- package/dist/Tag/Tag.esm.d.ts +33 -0
- package/dist/Tag/Tag.esm.js +65 -0
- package/dist/Tag/package.json +7 -0
- package/dist/TextInput/TextInput.cjs.d.ts +2 -2
- package/dist/TextInput/TextInput.cjs.js +1 -1
- package/dist/TextInput/TextInput.esm.d.ts +2 -2
- package/dist/TextInput/TextInput.esm.js +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.js +1 -1
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -1
- package/dist/VerticalSpace/VerticalSpace.esm.js +1 -1
- package/dist/_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js +29 -0
- package/dist/_shared/cjs/{Button-b3a69953.js → Button-1af6868c.js} +1 -4
- package/dist/_shared/{esm/FormControl-84c9ace6.d.ts → cjs/FormControl-d4d9c665.d.ts} +4 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.js → FormControl-d4d9c665.js} +6 -5
- package/dist/_shared/cjs/VerticalSpace-7aed88ab.d.ts +34 -0
- package/dist/_shared/cjs/{VerticalSpace-65ad083c.js → VerticalSpace-7aed88ab.js} +6 -2
- package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
- package/dist/_shared/cjs/{BtIconTickAlt2Px-b12ecc78.js → index.module-af7c85f2.js} +34 -59
- package/dist/_shared/esm/BtIconTickAlt2Px-da97e9ae.js +23 -0
- package/dist/_shared/esm/{Button-69439f8f.js → Button-10700df4.js} +1 -4
- package/dist/_shared/{cjs/FormControl-e6b7d7c5.d.ts → esm/FormControl-2cb96de7.d.ts} +4 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.js → FormControl-2cb96de7.js} +6 -5
- package/dist/_shared/esm/VerticalSpace-3579b20e.d.ts +34 -0
- package/dist/_shared/esm/{VerticalSpace-6b4f5e50.js → VerticalSpace-3579b20e.js} +6 -2
- package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
- package/dist/_shared/esm/{BtIconTickAlt2Px-2c4ec3be.js → index.module-599b86dd.js} +2 -22
- package/dist/index.es.js +77 -38
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +77 -37
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/FormControl/FormControl.d.ts +4 -0
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +46 -0
- package/dist/types/components/ProgressBar/constants/progress-bar-icon-map.d.ts +3 -0
- package/dist/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/types/components/ProgressBar/types/progress-bar-icons.d.ts +1 -0
- package/dist/types/components/ProgressBar/types/progress-bar-state.d.ts +1 -0
- package/dist/types/components/ProgressBar/utils/get-progress-bar-props.d.ts +1 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Tag/Tag.d.ts +32 -0
- package/dist/types/components/Tag/index.d.ts +1 -0
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +17 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/styles.d.ts +2 -0
- package/package.json +4 -4
- package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +0 -18
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +0 -18
- /package/dist/_shared/cjs/{Button-b3a69953.d.ts → Button-1af6868c.d.ts} +0 -0
- /package/dist/_shared/esm/{Button-69439f8f.d.ts → Button-10700df4.d.ts} +0 -0
|
@@ -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 };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ProgressBarState } from "./types/progress-bar-state";
|
|
3
|
+
import { ProgressBarIcons } from "./types/progress-bar-icons";
|
|
4
|
+
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
5
|
+
export interface ProgressBarProps {
|
|
6
|
+
/**
|
|
7
|
+
* Label for screen readers.
|
|
8
|
+
*/
|
|
9
|
+
ariaLabel: string;
|
|
10
|
+
/**
|
|
11
|
+
* Headline for the progress bar.
|
|
12
|
+
*/
|
|
13
|
+
headline?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Title for the progress bar, (e.g. an uploading file's name).
|
|
16
|
+
*/
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Percentage value for the progress bar (negative numbers are rounded to 0, numbers over 100 are rounded to 100).
|
|
20
|
+
*/
|
|
21
|
+
value?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Provide an additional informative description for the progress bar, or brand building slot for secondary messaging which can change over time with progress.
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Value to display for the progress bar. This is fully customisable, and can be a percentage (15%) Time remaining (1m 15s remaining), proportion of data uploaded/to upload (100KB out of 256KB).
|
|
28
|
+
*/
|
|
29
|
+
displayValue?: string;
|
|
30
|
+
/**
|
|
31
|
+
* State of the progress bar.
|
|
32
|
+
*/
|
|
33
|
+
state?: ProgressBarState;
|
|
34
|
+
/**
|
|
35
|
+
* Sets progress bar to infinitely animate. Use if the progress of a given task cannot be known. The value prop will have no effect if this prop is set to true.
|
|
36
|
+
*/
|
|
37
|
+
isIndeterminate?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Action for the progress bar.
|
|
40
|
+
*/
|
|
41
|
+
action?: {
|
|
42
|
+
text: string;
|
|
43
|
+
action: () => void;
|
|
44
|
+
icon?: ProgressBarIcons;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProgressBar } from "./ProgressBar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ProgressBarIcons = "refresh" | "cross" | "tick";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type ProgressBarState = "loading" | "error" | "success";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProgressBarProps: (isIndeterminate: boolean, progressValue: number, ariaLabel: string) => React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -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;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { ArcIcon } from "../../types/arc-icon";
|
|
3
|
+
/**
|
|
4
|
+
* use `Tag` to promote features and manage filtering.
|
|
5
|
+
*/
|
|
6
|
+
export declare const Tag: FC<TagProps>;
|
|
7
|
+
export interface TagProps {
|
|
8
|
+
/**
|
|
9
|
+
* Content to render within the Tag
|
|
10
|
+
*/
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Determine if the Tag is removable.
|
|
14
|
+
*/
|
|
15
|
+
isRemovable?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Provide a link for the tag
|
|
18
|
+
*/
|
|
19
|
+
link?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Determine a icon to display within the tag.
|
|
22
|
+
*/
|
|
23
|
+
icon?: ArcIcon;
|
|
24
|
+
/**
|
|
25
|
+
* onClick Handler for Tag
|
|
26
|
+
*/
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Execute function on remove
|
|
30
|
+
*/
|
|
31
|
+
onRemove?: () => void;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tag } from "./Tag";
|
|
@@ -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
|
|
@@ -14,4 +14,20 @@ export interface VerticalSpaceProps {
|
|
|
14
14
|
* Size of the VerticalSpace.
|
|
15
15
|
*/
|
|
16
16
|
size?: VerticalSpaceSize;
|
|
17
|
+
/**
|
|
18
|
+
* Size of the VerticalSpace from the small breakpoint upwards.
|
|
19
|
+
*/
|
|
20
|
+
sizeS?: VerticalSpaceSize;
|
|
21
|
+
/**
|
|
22
|
+
* Size of the VerticalSpace from the medium breakpoint upwards.
|
|
23
|
+
*/
|
|
24
|
+
sizeM?: VerticalSpaceSize;
|
|
25
|
+
/**
|
|
26
|
+
* Size of the VerticalSpace from the large breakpoint upwards.
|
|
27
|
+
*/
|
|
28
|
+
sizeL?: VerticalSpaceSize;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the VerticalSpace from the extra large breakpoint upwards.
|
|
31
|
+
*/
|
|
32
|
+
sizeXL?: VerticalSpaceSize;
|
|
17
33
|
}
|
|
@@ -27,6 +27,7 @@ export { SiteHeader, SiteHeaderRehydrator } from "./SiteHeader";
|
|
|
27
27
|
export { Surface, SurfaceContext } from "./Surface";
|
|
28
28
|
export { Switch } from "./Switch";
|
|
29
29
|
export { Badge } from "./Badge";
|
|
30
|
+
export { Tag } from "./Tag";
|
|
30
31
|
export { Text } from "./Text";
|
|
31
32
|
export { TextInput } from "./TextInput";
|
|
32
33
|
export { Truncate } from "./Truncate";
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import "./components/Select/Select.css";
|
|
|
26
26
|
import "./components/SiteFooter/SiteFooter.css";
|
|
27
27
|
import "./components/SiteHeader/SiteHeader.css";
|
|
28
28
|
import "./components/Surface/Surface.css";
|
|
29
|
+
import "./components/Tag/Tag.css";
|
|
29
30
|
import "./components/Text/Text.css";
|
|
30
31
|
import "./components/TextInput/TextInput.css";
|
|
31
32
|
import "./components/Truncate/Truncate.css";
|
|
@@ -59,3 +60,4 @@ import "./components/TextInput/TextInput.bt.css";
|
|
|
59
60
|
import "./components/UniversalHeader/UniversalHeader.bt.css";
|
|
60
61
|
import "./components/Switch/Switch.bt.css";
|
|
61
62
|
import "./components/Modal/Modal.css";
|
|
63
|
+
import "./components/ProgressBar/ProgressBar.css";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arc-ui/components",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.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.
|
|
36
|
-
"@arc-ui/icons": "^11.
|
|
37
|
-
"@arc-ui/tokens": "^11.
|
|
35
|
+
"@arc-ui/fonts": "^11.4.0",
|
|
36
|
+
"@arc-ui/icons": "^11.4.0",
|
|
37
|
+
"@arc-ui/tokens": "^11.4.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",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Use `VerticalSpace` to create vertical space between components.
|
|
4
|
-
*/
|
|
5
|
-
declare const VerticalSpace: FC<VerticalSpaceProps>;
|
|
6
|
-
type VerticalSpaceSize = "4" | "8" | "12" | "16" | "24" | "32" | "48" | "64" | "96" | "128";
|
|
7
|
-
interface VerticalSpaceProps {
|
|
8
|
-
/**
|
|
9
|
-
* Should the VerticalSpace be visible for debugging and documentation
|
|
10
|
-
* purposes?
|
|
11
|
-
*/
|
|
12
|
-
isDebugVisible?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Size of the VerticalSpace.
|
|
15
|
-
*/
|
|
16
|
-
size?: VerticalSpaceSize;
|
|
17
|
-
}
|
|
18
|
-
export { VerticalSpace, VerticalSpaceSize, VerticalSpaceProps };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Use `VerticalSpace` to create vertical space between components.
|
|
4
|
-
*/
|
|
5
|
-
declare const VerticalSpace: FC<VerticalSpaceProps>;
|
|
6
|
-
type VerticalSpaceSize = "4" | "8" | "12" | "16" | "24" | "32" | "48" | "64" | "96" | "128";
|
|
7
|
-
interface VerticalSpaceProps {
|
|
8
|
-
/**
|
|
9
|
-
* Should the VerticalSpace be visible for debugging and documentation
|
|
10
|
-
* purposes?
|
|
11
|
-
*/
|
|
12
|
-
isDebugVisible?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Size of the VerticalSpace.
|
|
15
|
-
*/
|
|
16
|
-
size?: VerticalSpaceSize;
|
|
17
|
-
}
|
|
18
|
-
export { VerticalSpace, VerticalSpaceSize, VerticalSpaceProps };
|
|
File without changes
|
|
File without changes
|