carbon-react 111.5.1 → 111.5.3

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 (62) hide show
  1. package/esm/components/carbon-provider/carbon-provider.component.js +2 -1
  2. package/esm/components/carbon-provider/top-modal-context.d.ts +9 -0
  3. package/esm/components/carbon-provider/top-modal-context.js +36 -0
  4. package/esm/components/checkbox/checkbox-group.component.d.ts +29 -0
  5. package/esm/components/checkbox/checkbox-group.component.js +169 -47
  6. package/esm/components/checkbox/checkbox-group.style.d.ts +4 -0
  7. package/esm/components/checkbox/checkbox-group.style.js +46 -0
  8. package/esm/components/checkbox/checkbox-svg.component.d.ts +3 -0
  9. package/esm/components/checkbox/checkbox-svg.component.js +11 -12
  10. package/esm/components/checkbox/checkbox.component.d.ts +30 -0
  11. package/esm/components/checkbox/checkbox.component.js +519 -103
  12. package/esm/components/checkbox/checkbox.style.d.ts +13 -3
  13. package/esm/components/checkbox/checkbox.style.js +3 -61
  14. package/esm/components/checkbox/index.d.ts +4 -2
  15. package/esm/components/checkbox/index.js +2 -2
  16. package/esm/components/dialog/dialog.component.js +6 -2
  17. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +6 -2
  18. package/esm/components/modal/__internal__/modal-manager.d.ts +2 -0
  19. package/esm/components/modal/__internal__/modal-manager.js +16 -0
  20. package/esm/components/search/index.d.ts +2 -1
  21. package/esm/components/search/search-button.style.d.ts +3 -0
  22. package/esm/components/search/search-button.style.js +36 -0
  23. package/esm/components/search/search.component.d.ts +55 -0
  24. package/esm/components/search/search.component.js +202 -112
  25. package/esm/components/search/search.style.d.ts +10 -3
  26. package/esm/components/search/search.style.js +1 -32
  27. package/esm/components/sidebar/sidebar.component.js +7 -2
  28. package/lib/components/carbon-provider/carbon-provider.component.js +3 -1
  29. package/lib/components/carbon-provider/top-modal-context.d.ts +9 -0
  30. package/lib/components/carbon-provider/top-modal-context.js +52 -0
  31. package/lib/components/checkbox/checkbox-group.component.d.ts +29 -0
  32. package/lib/components/checkbox/checkbox-group.component.js +171 -51
  33. package/lib/components/checkbox/checkbox-group.style.d.ts +4 -0
  34. package/lib/components/checkbox/checkbox-group.style.js +66 -0
  35. package/lib/components/checkbox/checkbox-svg.component.d.ts +3 -0
  36. package/lib/components/checkbox/checkbox-svg.component.js +12 -12
  37. package/lib/components/checkbox/checkbox.component.d.ts +30 -0
  38. package/lib/components/checkbox/checkbox.component.js +520 -106
  39. package/lib/components/checkbox/checkbox.style.d.ts +13 -3
  40. package/lib/components/checkbox/checkbox.style.js +4 -65
  41. package/lib/components/checkbox/index.d.ts +4 -2
  42. package/lib/components/checkbox/index.js +6 -6
  43. package/lib/components/dialog/dialog.component.js +6 -1
  44. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +6 -1
  45. package/lib/components/modal/__internal__/modal-manager.d.ts +2 -0
  46. package/lib/components/modal/__internal__/modal-manager.js +16 -0
  47. package/lib/components/search/index.d.ts +2 -1
  48. package/lib/components/search/search-button.style.d.ts +3 -0
  49. package/lib/components/search/search-button.style.js +51 -0
  50. package/lib/components/search/search.component.d.ts +55 -0
  51. package/lib/components/search/search.component.js +205 -116
  52. package/lib/components/search/search.style.d.ts +10 -3
  53. package/lib/components/search/search.style.js +2 -36
  54. package/lib/components/sidebar/sidebar.component.js +6 -1
  55. package/package.json +3 -4
  56. package/esm/components/checkbox/checkbox-group.d.ts +0 -28
  57. package/esm/components/checkbox/checkbox.d.ts +0 -24
  58. package/esm/components/search/search.d.ts +0 -52
  59. package/lib/components/checkbox/checkbox-group.d.ts +0 -28
  60. package/lib/components/checkbox/checkbox.d.ts +0 -24
  61. package/lib/components/search/search.d.ts +0 -52
  62. package/scripts/check_carbon_version/check_carbon_version.js +0 -39
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- interface CheckboxGroupProps extends ValidationProps, MarginProps {
6
- /** The content for the CheckboxGroup Legend */
7
- legend?: string;
8
- /** When true, legend is placed in line with the checkboxes */
9
- legendInline?: boolean;
10
- /** Percentage width of legend (only when legend is inline) */
11
- legendWidth?: number;
12
- /** Text alignment of legend when inline */
13
- legendAlign?: "left" | "right";
14
- /** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
15
- legendSpacing?: 1 | 2;
16
- /** The Checkboxes to be rendered in the group */
17
- children: React.ReactNode;
18
- /** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */
19
- labelSpacing?: 1 | 2;
20
- /** Flag to configure component as mandatory */
21
- required?: boolean;
22
- /** Overrides the default tooltip */
23
- tooltipPosition?: "top" | "bottom" | "left" | "right";
24
- }
25
-
26
- declare function CheckboxGroup(props: CheckboxGroupProps): JSX.Element;
27
-
28
- export default CheckboxGroup;
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
4
-
5
- export interface CheckboxProps extends CommonCheckableInputProps, MarginProps {
6
- /** Identifier used for testing purposes, applied to the root element of the component. */
7
- "data-component"?: string;
8
- /** Identifier used for testing purposes, applied to the root element of the component. */
9
- "data-element"?: string;
10
- /** Identifier used for testing purposes, applied to the root element of the component. */
11
- "data-role"?: string;
12
- /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
13
- adaptiveSpacingBreakpoint?: number;
14
- /** The value of the checkbox, passed on form submit */
15
- value?: string;
16
- /** Overrides the default tooltip position */
17
- tooltipPosition?: "top" | "bottom" | "left" | "right";
18
- /** Aria label for rendered help component */
19
- helpAriaLabel?: string;
20
- }
21
-
22
- declare function Checkbox(props: CheckboxProps): JSX.Element;
23
-
24
- export { Checkbox };
@@ -1,52 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- export interface SearchProps extends ValidationProps, MarginProps {
6
- /** Prop to specify the aria-label of the search component */
7
- "aria-label"?: string;
8
- /** Prop for `uncontrolled` use */
9
- defaultValue?: string;
10
- /** Prop for `id` */
11
- id?: string;
12
- /** Prop for `name` */
13
- name?: string;
14
- /** Prop for `onBlur` events */
15
- onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
16
- /** Prop for `onChange` events */
17
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
18
- /** Prop for `onClick` events.
19
- * `onClick` events are triggered when the `searchButton` is clicked
20
- */
21
- onClick?: (
22
- ev: React.ChangeEvent<HTMLInputElement> &
23
- React.MouseEvent<HTMLButtonElement>
24
- ) => void;
25
- /** Prop for `onKeyDown` events */
26
- onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
27
- /** Prop for a placeholder */
28
- placeholder?: string;
29
- /** Prop boolean to state whether the `search` icon renders */
30
- searchButton?: boolean;
31
- /**
32
- * Prop for specifying an input width length.
33
- * Leaving the `searchWidth` prop with no value will default the width to '100%'
34
- */
35
- searchWidth?: string;
36
- /** Prop for active search threshold. This must be a positive number */
37
- threshold?: number;
38
- /** Prop for `controlled` use */
39
- value?: string;
40
- /** Prop to specify the styling of the search component */
41
- variant?: string;
42
- /** A callback to retrieve the input reference */
43
- inputRef?: React.RefObject<HTMLInputElement>;
44
- /** Input tabindex */
45
- tabIndex?: number;
46
- /** Overrides the default tooltip position */
47
- tooltipPosition?: "top" | "bottom" | "left" | "right";
48
- }
49
-
50
- declare function Search(props: SearchProps): JSX.Element;
51
-
52
- export default Search;
@@ -1,39 +0,0 @@
1
- /* eslint-disable no-console */
2
- /* istanbul ignore file */
3
- const fetch = require("node-fetch");
4
- const dotenv = require("dotenv");
5
- const chalk = require("chalk");
6
- const ci = require("ci-info");
7
- const { version } = require("../../package.json");
8
-
9
- dotenv.config();
10
- const majorVersion = version.split(".")[0];
11
-
12
- const checkCarbonVersion = () => {
13
- if (ci.isCI && process.env.NODE_ENV !== "test") {
14
- return;
15
- }
16
-
17
- fetch("https://registry.npmjs.com/carbon-react")
18
- .then((res) => res.json())
19
- .then((data) => {
20
- const { latest } = data["dist-tags"];
21
- const latestMajor = latest.split(".")[0];
22
-
23
- const diff = Number(latestMajor) - Number(majorVersion);
24
-
25
- // This is ignored as coverage will fail when run in CI without it
26
- if (diff > 1) {
27
- console.log(
28
- `carbon-react version installed is currently ${chalk.yellow(
29
- diff
30
- )} major versions behind the latest.`
31
- );
32
- }
33
- })
34
- .catch((err) => console.log(err));
35
- };
36
-
37
- checkCarbonVersion();
38
-
39
- module.exports = checkCarbonVersion;