carbon-react 116.2.0 → 116.2.1
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/esm/components/action-popover/action-popover.component.js +5 -1
- package/esm/components/modal/__internal__/modal-manager.d.ts +1 -1
- package/esm/components/modal/__internal__/modal-manager.js +2 -2
- package/esm/components/modal/modal.component.js +6 -1
- package/esm/components/progress-tracker/index.d.ts +2 -1
- package/esm/components/progress-tracker/progress-tracker.component.d.ts +46 -0
- package/esm/components/progress-tracker/progress-tracker.component.js +175 -59
- package/esm/components/progress-tracker/progress-tracker.style.d.ts +8 -0
- package/esm/components/progress-tracker/progress-tracker.style.js +47 -60
- package/esm/components/select/select-list/select-list.component.js +6 -1
- package/esm/components/toast/toast.component.js +5 -1
- package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +5 -1
- package/esm/hooks/__internal__/useModalManager/useModalManager.d.ts +8 -1
- package/esm/hooks/__internal__/useModalManager/useModalManager.js +9 -3
- package/lib/components/action-popover/action-popover.component.js +5 -1
- package/lib/components/modal/__internal__/modal-manager.d.ts +1 -1
- package/lib/components/modal/__internal__/modal-manager.js +2 -2
- package/lib/components/modal/modal.component.js +6 -1
- package/lib/components/progress-tracker/index.d.ts +2 -1
- package/lib/components/progress-tracker/progress-tracker.component.d.ts +46 -0
- package/lib/components/progress-tracker/progress-tracker.component.js +175 -62
- package/lib/components/progress-tracker/progress-tracker.style.d.ts +8 -0
- package/lib/components/progress-tracker/progress-tracker.style.js +46 -62
- package/lib/components/select/select-list/select-list.component.js +6 -1
- package/lib/components/toast/toast.component.js +5 -1
- package/lib/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +5 -1
- package/lib/hooks/__internal__/useModalManager/useModalManager.d.ts +8 -1
- package/lib/hooks/__internal__/useModalManager/useModalManager.js +9 -3
- package/package.json +2 -2
- package/scripts/check_rfcs/check_rfcs.js +27 -12
- package/esm/components/progress-tracker/progress-tracker.d.ts +0 -40
- package/lib/components/progress-tracker/progress-tracker.d.ts +0 -40
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
/* istanbul ignore file */
|
|
3
2
|
const { Octokit } = require("@octokit/rest");
|
|
4
3
|
const dotenv = require("dotenv");
|
|
5
4
|
const chalk = require("chalk");
|
|
@@ -32,26 +31,42 @@ const getOpenRfcs = async () => {
|
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
33
|
|
|
35
|
-
const
|
|
34
|
+
const getTitle = (rfc) => rfc.title.split(": ")[1];
|
|
36
35
|
|
|
37
36
|
const checkRfcs = async () => {
|
|
38
37
|
if (ci.isCI && process.env.NODE_ENV !== "test") {
|
|
39
38
|
return;
|
|
40
39
|
}
|
|
41
40
|
|
|
42
|
-
|
|
41
|
+
try {
|
|
42
|
+
const openRfcs = await getOpenRfcs();
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
console.log("\ncarbon-react currently has open RFCs:");
|
|
44
|
+
if (!openRfcs.length) return;
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
const header = chalk.bold.inverse.white(
|
|
47
|
+
" ".repeat(20),
|
|
48
|
+
"Open RFCs for carbon-react",
|
|
49
|
+
" ".repeat(20)
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const rfcText = openRfcs
|
|
53
|
+
.map((item) => {
|
|
54
|
+
const title = getTitle(item);
|
|
55
|
+
return `- ${chalk.bold(title)}: ${chalk.cyan.italic(item.html_url)}`;
|
|
56
|
+
})
|
|
57
|
+
.join("\n\n");
|
|
58
|
+
|
|
59
|
+
console.log(`${header}\n\n${rfcText}\n`);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
const rfcLink =
|
|
62
|
+
"https://github.com/Sage/carbon/pulls?q=is%3Aopen+is%3Apr+label%3ARFC";
|
|
63
|
+
const message = `Failed to retrieve open RFCs for carbon-react. Go to ${chalk.cyan.italic(
|
|
64
|
+
rfcLink
|
|
65
|
+
)} to view current RFCs.`;
|
|
66
|
+
console.log(
|
|
67
|
+
`${chalk.yellow.inverse(" WARN ")}\n${chalk.yellow(message)}\n`
|
|
68
|
+
);
|
|
52
69
|
}
|
|
53
70
|
};
|
|
54
71
|
|
|
55
|
-
checkRfcs();
|
|
56
|
-
|
|
57
72
|
module.exports = checkRfcs;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { MarginProps } from "styled-system";
|
|
2
|
-
|
|
3
|
-
export interface ProgressTrackerProps extends MarginProps {
|
|
4
|
-
/** Specifies an aria-label to the component */
|
|
5
|
-
"aria-label"?: string;
|
|
6
|
-
/** Specifies the aria-describedby for the component */
|
|
7
|
-
"aria-describedby"?: string;
|
|
8
|
-
/** The value of progress to be read out to the user. */
|
|
9
|
-
"aria-valuenow"?: number;
|
|
10
|
-
/** The minimum value of the progress tracker */
|
|
11
|
-
"aria-valuemin"?: number;
|
|
12
|
-
/** The maximum value of the progress tracker */
|
|
13
|
-
"aria-valueMax"?: number;
|
|
14
|
-
/** Prop to define the human readable text alternative of aria-valuenow
|
|
15
|
-
* if aria-valuenow is not a number */
|
|
16
|
-
"aria-valuetext"?: string;
|
|
17
|
-
/** Size of the progressBar. */
|
|
18
|
-
size?: "small" | "medium" | "large";
|
|
19
|
-
/** Length of the progress bar, any valid css string. */
|
|
20
|
-
length?: string;
|
|
21
|
-
/** Current progress (percentage). */
|
|
22
|
-
progress?: number;
|
|
23
|
-
/** Flag to control whether the default value labels (as percentages) should be rendered. */
|
|
24
|
-
showDefaultLabels?: boolean;
|
|
25
|
-
/** Value to display as current progress. */
|
|
26
|
-
currentProgressLabel?: string;
|
|
27
|
-
/** Value to display as the maximum progress limit. */
|
|
28
|
-
maxProgressLabel?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The position the value label are rendered in.
|
|
31
|
-
* Top/bottom apply to horizontal and left/right to vertical orientation.
|
|
32
|
-
*/
|
|
33
|
-
labelsPosition?: "top" | "bottom";
|
|
34
|
-
/** Value of the preposition defined between Value1 and Value2 on the label. */
|
|
35
|
-
customValuePreposition?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
declare function ProgressTracker(props: ProgressTrackerProps): JSX.Element;
|
|
39
|
-
|
|
40
|
-
export default ProgressTracker;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { MarginProps } from "styled-system";
|
|
2
|
-
|
|
3
|
-
export interface ProgressTrackerProps extends MarginProps {
|
|
4
|
-
/** Specifies an aria-label to the component */
|
|
5
|
-
"aria-label"?: string;
|
|
6
|
-
/** Specifies the aria-describedby for the component */
|
|
7
|
-
"aria-describedby"?: string;
|
|
8
|
-
/** The value of progress to be read out to the user. */
|
|
9
|
-
"aria-valuenow"?: number;
|
|
10
|
-
/** The minimum value of the progress tracker */
|
|
11
|
-
"aria-valuemin"?: number;
|
|
12
|
-
/** The maximum value of the progress tracker */
|
|
13
|
-
"aria-valueMax"?: number;
|
|
14
|
-
/** Prop to define the human readable text alternative of aria-valuenow
|
|
15
|
-
* if aria-valuenow is not a number */
|
|
16
|
-
"aria-valuetext"?: string;
|
|
17
|
-
/** Size of the progressBar. */
|
|
18
|
-
size?: "small" | "medium" | "large";
|
|
19
|
-
/** Length of the progress bar, any valid css string. */
|
|
20
|
-
length?: string;
|
|
21
|
-
/** Current progress (percentage). */
|
|
22
|
-
progress?: number;
|
|
23
|
-
/** Flag to control whether the default value labels (as percentages) should be rendered. */
|
|
24
|
-
showDefaultLabels?: boolean;
|
|
25
|
-
/** Value to display as current progress. */
|
|
26
|
-
currentProgressLabel?: string;
|
|
27
|
-
/** Value to display as the maximum progress limit. */
|
|
28
|
-
maxProgressLabel?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The position the value label are rendered in.
|
|
31
|
-
* Top/bottom apply to horizontal and left/right to vertical orientation.
|
|
32
|
-
*/
|
|
33
|
-
labelsPosition?: "top" | "bottom";
|
|
34
|
-
/** Value of the preposition defined between Value1 and Value2 on the label. */
|
|
35
|
-
customValuePreposition?: string;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
declare function ProgressTracker(props: ProgressTrackerProps): JSX.Element;
|
|
39
|
-
|
|
40
|
-
export default ProgressTracker;
|