carbon-react 104.58.8 → 105.0.2

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 (64) hide show
  1. package/esm/__internal__/popover/popover.component.d.ts +1 -1
  2. package/esm/__internal__/popover/popover.component.js +15 -5
  3. package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +2 -1
  4. package/esm/components/menu/menu.component.js +2 -1
  5. package/esm/components/menu/menu.context.d.ts +1 -0
  6. package/esm/components/menu/menu.context.js +2 -1
  7. package/esm/components/menu/menu.d.ts +1 -0
  8. package/esm/components/modal/modal.component.js +2 -1
  9. package/esm/components/select/__internal__/select-text/select-text.component.d.ts +1 -5
  10. package/esm/components/select/__internal__/select-text/select-text.component.js +4 -28
  11. package/esm/components/select/select-textbox/select-textbox.component.js +5 -2
  12. package/esm/components/vertical-divider/index.d.ts +1 -2
  13. package/esm/components/vertical-divider/vertical-divider.component.d.ts +11 -9
  14. package/esm/components/vertical-divider/vertical-divider.component.js +1410 -25
  15. package/esm/components/vertical-divider/vertical-divider.style.d.ts +4 -2
  16. package/esm/components/vertical-divider/vertical-divider.style.js +1 -1
  17. package/lib/__internal__/popover/popover.component.d.ts +1 -1
  18. package/lib/__internal__/popover/popover.component.js +15 -4
  19. package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +2 -1
  20. package/lib/components/menu/menu.component.js +2 -1
  21. package/lib/components/menu/menu.context.d.ts +1 -0
  22. package/lib/components/menu/menu.context.js +2 -1
  23. package/lib/components/menu/menu.d.ts +1 -0
  24. package/lib/components/modal/modal.component.js +2 -1
  25. package/lib/components/select/__internal__/select-text/select-text.component.d.ts +1 -5
  26. package/lib/components/select/__internal__/select-text/select-text.component.js +4 -33
  27. package/lib/components/select/select-textbox/select-textbox.component.js +5 -2
  28. package/lib/components/vertical-divider/index.d.ts +1 -2
  29. package/lib/components/vertical-divider/vertical-divider.component.d.ts +11 -9
  30. package/lib/components/vertical-divider/vertical-divider.component.js +1459 -28
  31. package/lib/components/vertical-divider/vertical-divider.style.d.ts +4 -2
  32. package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
  33. package/package.json +1 -1
  34. package/esm/components/row/column/column.component.d.ts +0 -30
  35. package/esm/components/row/column/column.component.js +0 -72
  36. package/esm/components/row/column/column.d.ts +0 -22
  37. package/esm/components/row/column/column.style.d.ts +0 -2
  38. package/esm/components/row/column/column.style.js +0 -32
  39. package/esm/components/row/index.d.ts +0 -2
  40. package/esm/components/row/index.js +0 -2
  41. package/esm/components/row/row.component.d.ts +0 -24
  42. package/esm/components/row/row.component.js +0 -59
  43. package/esm/components/row/row.config.d.ts +0 -11
  44. package/esm/components/row/row.config.js +0 -12
  45. package/esm/components/row/row.d.ts +0 -27
  46. package/esm/components/row/row.style.d.ts +0 -2
  47. package/esm/components/row/row.style.js +0 -53
  48. package/esm/components/vertical-divider/vertical-divider.d.ts +0 -113
  49. package/lib/components/row/column/column.component.d.ts +0 -30
  50. package/lib/components/row/column/column.component.js +0 -87
  51. package/lib/components/row/column/column.d.ts +0 -22
  52. package/lib/components/row/column/column.style.d.ts +0 -2
  53. package/lib/components/row/column/column.style.js +0 -45
  54. package/lib/components/row/index.d.ts +0 -2
  55. package/lib/components/row/index.js +0 -23
  56. package/lib/components/row/package.json +0 -6
  57. package/lib/components/row/row.component.d.ts +0 -24
  58. package/lib/components/row/row.component.js +0 -73
  59. package/lib/components/row/row.config.d.ts +0 -11
  60. package/lib/components/row/row.config.js +0 -20
  61. package/lib/components/row/row.d.ts +0 -27
  62. package/lib/components/row/row.style.d.ts +0 -2
  63. package/lib/components/row/row.style.js +0 -71
  64. package/lib/components/vertical-divider/vertical-divider.d.ts +0 -113
@@ -1,45 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
-
10
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
11
-
12
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
-
14
- const StyledColumn = _styledComponents.default.div`
15
- box-sizing: border-box;
16
- float: left;
17
- min-height: 1px;
18
- width: 100%;
19
- ${({
20
- columnAlign
21
- }) => (columnAlign === "center" || columnAlign === "middle") && "text-align: center"}
22
-
23
- ${({
24
- columnAlign
25
- }) => columnAlign === "right" && "text-align: right"}
26
- ${({
27
- columns
28
- }) => (0, _styledComponents.css)`
29
- width: ${100 / columns}%;
30
- `}
31
- ${({
32
- columns,
33
- columnSpan
34
- }) => (0, _styledComponents.css)`
35
- width: ${100 / columns * +columnSpan}%;
36
- `}
37
- ${({
38
- columns,
39
- columnOffset
40
- }) => (0, _styledComponents.css)`
41
- margin-left: ${100 / columns * +columnOffset}%;
42
- `}
43
- `;
44
- var _default = StyledColumn;
45
- exports.default = _default;
@@ -1,2 +0,0 @@
1
- export { default as Row } from "./row";
2
- export { default as Column } from "./column/column";
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Row", {
7
- enumerable: true,
8
- get: function () {
9
- return _row.default;
10
- }
11
- });
12
- Object.defineProperty(exports, "Column", {
13
- enumerable: true,
14
- get: function () {
15
- return _column.default;
16
- }
17
- });
18
-
19
- var _row = _interopRequireDefault(require("./row.component"));
20
-
21
- var _column = _interopRequireDefault(require("./column/column.component"));
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -1,6 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "module": "../../../esm/components/row/index.js",
4
- "main": "./index.js",
5
- "types": "./index.d.ts"
6
- }
@@ -1,24 +0,0 @@
1
- export default Row;
2
- declare function Row({ columns, children, columnClasses, columnDivide, gutter, className, }: {
3
- columns: any;
4
- children: any;
5
- columnClasses: any;
6
- columnDivide: any;
7
- gutter: any;
8
- className: any;
9
- }): JSX.Element;
10
- declare namespace Row {
11
- namespace propTypes {
12
- const children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
13
- const className: PropTypes.Requireable<string>;
14
- const gutter: PropTypes.Requireable<string>;
15
- const columnDivide: PropTypes.Requireable<boolean>;
16
- const columns: PropTypes.Requireable<string | number>;
17
- const columnClasses: PropTypes.Requireable<string>;
18
- }
19
- namespace defaultProps {
20
- const gutter_1: string;
21
- export { gutter_1 as gutter };
22
- }
23
- }
24
- import PropTypes from "prop-types";
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
- var _row = _interopRequireDefault(require("./row.style"));
13
-
14
- var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- let deprecatedWarnTriggered = false;
19
-
20
- const Row = ({
21
- columns,
22
- children,
23
- columnClasses,
24
- columnDivide,
25
- gutter,
26
- className
27
- }) => {
28
- const columnsCount = columns || _react.default.Children.toArray(children).length;
29
-
30
- if (!deprecatedWarnTriggered) {
31
- deprecatedWarnTriggered = true; // eslint-disable-next-line max-len
32
-
33
- _logger.default.deprecate("`Row` component is deprecated and will soon be removed.");
34
- }
35
-
36
- const buildColumns = () => _react.default.Children.toArray(children).map(child => /*#__PURE__*/_react.default.cloneElement(child, {
37
- columnClasses,
38
- columns: columnsCount
39
- }, child.props.children));
40
-
41
- return /*#__PURE__*/_react.default.createElement(_row.default, {
42
- "data-component": "row",
43
- columnDivide: columnDivide,
44
- gutter: gutter,
45
- className: className,
46
- columns: columns || _react.default.Children.toArray(children).length
47
- }, buildColumns());
48
- };
49
-
50
- Row.propTypes = {
51
- /** This component supports children of type Column. */
52
- children: _propTypes.default.node.isRequired,
53
-
54
- /** Classes to apply to the component. */
55
- className: _propTypes.default.string,
56
-
57
- /** Define how wide the gutter between the rows and columns should be. */
58
- gutter: _propTypes.default.oneOf(["none", "extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large"]),
59
-
60
- /** Enable a divider between each column. */
61
- columnDivide: _propTypes.default.bool,
62
-
63
- /** Define a certain amount of columns, instead of basing it on the number of children. */
64
- columns: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
65
-
66
- /** Classes to apply to all column children. */
67
- columnClasses: _propTypes.default.string
68
- };
69
- Row.defaultProps = {
70
- gutter: "medium"
71
- };
72
- var _default = Row;
73
- exports.default = _default;
@@ -1,11 +0,0 @@
1
- export const ROW_SIZES: string[];
2
- export const ROW_SIZES_CSS: {
3
- none: number;
4
- "extra-small": number;
5
- small: number;
6
- "medium-small": number;
7
- medium: number;
8
- "medium-large": number;
9
- large: number;
10
- "extra-large": number;
11
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ROW_SIZES_CSS = exports.ROW_SIZES = void 0;
7
- // eslint-disable-next-line import/prefer-default-export
8
- const ROW_SIZES = ["extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large"];
9
- exports.ROW_SIZES = ROW_SIZES;
10
- const ROW_SIZES_CSS = {
11
- none: 0,
12
- "extra-small": 2,
13
- small: 5,
14
- "medium-small": 10,
15
- medium: 15,
16
- "medium-large": 30,
17
- large: 60,
18
- "extra-large": 90
19
- };
20
- exports.ROW_SIZES_CSS = ROW_SIZES_CSS;
@@ -1,27 +0,0 @@
1
- import * as React from "react";
2
-
3
- export interface RowProps {
4
- /** This component supports children of type Column. */
5
- children: React.ReactNode;
6
- /** Classes to apply to the component. */
7
- className?: string;
8
- /** Define how wide the gutter between the rows and columns should be. */
9
- gutter?:
10
- | "extra-small"
11
- | "small"
12
- | "medium-small"
13
- | "medium"
14
- | "medium-large"
15
- | "large"
16
- | "extra-large";
17
- /** Enable a divider between each column. */
18
- columnDivide?: boolean;
19
- /** Define a certain amount of columns, instead of basing it on the number of children. */
20
- columns?: number | string;
21
- /** Classes to apply to all column children. */
22
- columnClasses?: string;
23
- }
24
-
25
- declare function Row(props: RowProps): JSX.Element;
26
-
27
- export default Row;
@@ -1,2 +0,0 @@
1
- export default StyledRow;
2
- declare const StyledRow: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,71 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
-
10
- var _base = _interopRequireDefault(require("../../style/themes/base"));
11
-
12
- var _column = _interopRequireDefault(require("./column/column.style"));
13
-
14
- var _row = require("./row.config");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
19
-
20
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
-
22
- const StyledRow = _styledComponents.default.div`
23
- clear: both;
24
- position: relative;
25
-
26
- ${({
27
- gutter,
28
- columnDivide
29
- }) => {
30
- const size = _row.ROW_SIZES_CSS[gutter];
31
- return (0, _styledComponents.css)`
32
- margin-bottom: -${size}px;
33
- margin-left: -${size}px;
34
-
35
- ${_column.default} {
36
- margin-bottom: ${size}px;
37
- padding-left: ${size}px;
38
-
39
- ${columnDivide && (0, _styledComponents.css)`
40
- position: relative;
41
-
42
- &:before {
43
- content: "";
44
- position: absolute;
45
- width: 1px;
46
- height: 100%;
47
- background-color: ${_base.default.palette.slateTint(70)};
48
- left: ${size / 2}px;
49
- top: 0;
50
- }
51
-
52
- &:first-child:before {
53
- display: none;
54
- }
55
- `}
56
- }
57
- `;
58
- }}
59
-
60
- /* Clearfix */
61
- &:before,
62
- &:after {
63
- content: "";
64
- display: table;
65
- }
66
- &:after {
67
- clear: both;
68
- }
69
- `;
70
- var _default = StyledRow;
71
- exports.default = _default;
@@ -1,113 +0,0 @@
1
- import { SpaceProps } from "styled-system";
2
-
3
- type TintRange =
4
- | 1
5
- | 2
6
- | 3
7
- | 4
8
- | 5
9
- | 6
10
- | 7
11
- | 8
12
- | 9
13
- | 10
14
- | 11
15
- | 12
16
- | 13
17
- | 14
18
- | 15
19
- | 16
20
- | 17
21
- | 18
22
- | 19
23
- | 20
24
- | 21
25
- | 22
26
- | 23
27
- | 24
28
- | 25
29
- | 26
30
- | 27
31
- | 28
32
- | 29
33
- | 30
34
- | 31
35
- | 32
36
- | 33
37
- | 34
38
- | 35
39
- | 36
40
- | 37
41
- | 38
42
- | 39
43
- | 40
44
- | 41
45
- | 42
46
- | 43
47
- | 44
48
- | 45
49
- | 46
50
- | 47
51
- | 48
52
- | 49
53
- | 50
54
- | 51
55
- | 52
56
- | 53
57
- | 54
58
- | 55
59
- | 56
60
- | 57
61
- | 58
62
- | 59
63
- | 60
64
- | 61
65
- | 62
66
- | 63
67
- | 64
68
- | 65
69
- | 66
70
- | 67
71
- | 68
72
- | 69
73
- | 70
74
- | 71
75
- | 72
76
- | 73
77
- | 74
78
- | 75
79
- | 76
80
- | 77
81
- | 78
82
- | 79
83
- | 80
84
- | 81
85
- | 82
86
- | 83
87
- | 84
88
- | 85
89
- | 86
90
- | 87
91
- | 88
92
- | 89
93
- | 90
94
- | 91
95
- | 92
96
- | 93
97
- | 94
98
- | 95
99
- | 96
100
- | 97
101
- | 98
102
- | 99
103
- | 100;
104
- export interface VerticalDividerPropTypes extends SpaceProps {
105
- h?: number | string;
106
- displayInline?: boolean;
107
- /** the supported rage is 1-100 */
108
- tint?: TintRange;
109
- }
110
-
111
- declare function VerticalDivider(props: VerticalDividerPropTypes): JSX.Element;
112
-
113
- export default VerticalDivider;