carbon-react 106.6.9 → 107.0.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 (212) hide show
  1. package/esm/__internal__/focus-trap/focus-trap-utils.js +25 -1
  2. package/esm/__internal__/focus-trap/focus-trap.component.d.ts +3 -1
  3. package/esm/__internal__/focus-trap/focus-trap.component.js +44 -12
  4. package/esm/{components/radio-button → __internal__/radio-button-mapper}/radio-button-mapper.component.d.ts +0 -0
  5. package/esm/{components/radio-button → __internal__/radio-button-mapper}/radio-button-mapper.component.js +0 -0
  6. package/esm/components/advanced-color-picker/advanced-color-picker.component.js +5 -5
  7. package/esm/components/badge/badge.style.d.ts +1 -1
  8. package/esm/components/button/button.component.d.ts +1 -3
  9. package/esm/components/button/button.component.js +1 -12
  10. package/esm/components/button/button.style.d.ts +1 -1
  11. package/esm/components/button-toggle-group/button-toggle-group.component.js +1 -1
  12. package/esm/components/confirm/confirm.component.d.ts +1 -5
  13. package/esm/components/confirm/confirm.component.js +2 -14
  14. package/esm/components/confirm/confirm.d.ts +0 -2
  15. package/esm/components/date/__internal__/date-picker/date-picker.component.js +24 -11
  16. package/esm/components/date/__internal__/date-picker/date-picker.d.ts +2 -0
  17. package/esm/components/date/date.component.js +3 -2
  18. package/esm/components/dialog/dialog.component.js +4 -3
  19. package/esm/components/dialog-full-screen/content.style.js +4 -10
  20. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +4 -3
  21. package/esm/components/heading/heading.component.d.ts +27 -52
  22. package/esm/components/heading/heading.component.js +86 -170
  23. package/esm/components/heading/heading.d.ts +5 -3
  24. package/esm/components/i18n-provider/i18n-provider.component.d.ts +0 -9
  25. package/esm/components/i18n-provider/i18n-provider.component.js +0 -9
  26. package/esm/components/menu/index.d.ts +0 -1
  27. package/esm/components/menu/index.js +0 -1
  28. package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +4 -18
  29. package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +1 -0
  30. package/esm/components/menu/menu-item/menu-item.component.js +0 -6
  31. package/esm/components/multi-action-button/multi-action-button.component.d.ts +1 -1
  32. package/esm/components/multi-action-button/multi-action-button.component.js +1 -11
  33. package/esm/components/navigation-bar/navigation-bar.component.d.ts +1 -6
  34. package/esm/components/navigation-bar/navigation-bar.component.js +1 -15
  35. package/esm/components/navigation-bar/navigation-bar.style.d.ts +0 -4
  36. package/esm/components/navigation-bar/navigation-bar.style.js +0 -8
  37. package/esm/components/radio-button/radio-button-group.component.js +1 -1
  38. package/esm/components/select/select-list/select-list.component.js +2 -2
  39. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +3 -1
  40. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +7 -2
  41. package/esm/components/sidebar/sidebar.component.js +10 -3
  42. package/esm/components/simple-color-picker/simple-color-picker.component.js +1 -1
  43. package/esm/components/split-button/split-button-toggle.style.d.ts +1 -1
  44. package/esm/components/split-button/split-button.component.d.ts +1 -4
  45. package/esm/components/split-button/split-button.component.js +3 -16
  46. package/esm/components/split-button/split-button.d.ts +0 -2
  47. package/esm/components/tile/tile.component.d.ts +1 -2
  48. package/esm/components/tile/tile.component.js +1 -13
  49. package/esm/components/tile/tile.d.ts +0 -2
  50. package/esm/components/tile-select/tile-select-group.component.js +1 -1
  51. package/esm/components/toast/toast.component.d.ts +1 -4
  52. package/esm/components/toast/toast.component.js +1 -13
  53. package/esm/components/toast/toast.d.ts +0 -2
  54. package/esm/locales/en-gb.js +0 -9
  55. package/esm/locales/locale.d.ts +0 -9
  56. package/esm/locales/pl-pl.js +0 -9
  57. package/lib/__internal__/focus-trap/focus-trap-utils.js +25 -1
  58. package/lib/__internal__/focus-trap/focus-trap.component.d.ts +3 -1
  59. package/lib/__internal__/focus-trap/focus-trap.component.js +46 -12
  60. package/lib/{components/radio-button → __internal__/radio-button-mapper}/radio-button-mapper.component.d.ts +0 -0
  61. package/lib/{components/radio-button → __internal__/radio-button-mapper}/radio-button-mapper.component.js +0 -0
  62. package/lib/components/advanced-color-picker/advanced-color-picker.component.js +5 -5
  63. package/lib/components/badge/badge.style.d.ts +1 -1
  64. package/lib/components/button/button.component.d.ts +1 -3
  65. package/lib/components/button/button.component.js +1 -14
  66. package/lib/components/button/button.style.d.ts +1 -1
  67. package/lib/components/button-toggle-group/button-toggle-group.component.js +1 -1
  68. package/lib/components/confirm/confirm.component.d.ts +1 -5
  69. package/lib/components/confirm/confirm.component.js +2 -17
  70. package/lib/components/confirm/confirm.d.ts +0 -2
  71. package/lib/components/date/__internal__/date-picker/date-picker.component.js +24 -11
  72. package/lib/components/date/__internal__/date-picker/date-picker.d.ts +2 -0
  73. package/lib/components/date/date.component.js +3 -2
  74. package/lib/components/dialog/dialog.component.js +4 -3
  75. package/lib/components/dialog-full-screen/content.style.js +4 -10
  76. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +4 -3
  77. package/lib/components/heading/heading.component.d.ts +27 -52
  78. package/lib/components/heading/heading.component.js +86 -170
  79. package/lib/components/heading/heading.d.ts +5 -3
  80. package/lib/components/i18n-provider/i18n-provider.component.d.ts +0 -9
  81. package/lib/components/i18n-provider/i18n-provider.component.js +0 -9
  82. package/lib/components/menu/index.d.ts +0 -1
  83. package/lib/components/menu/index.js +0 -8
  84. package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +3 -17
  85. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +1 -0
  86. package/lib/components/menu/menu-item/menu-item.component.js +0 -7
  87. package/lib/components/multi-action-button/multi-action-button.component.d.ts +1 -1
  88. package/lib/components/multi-action-button/multi-action-button.component.js +1 -14
  89. package/lib/components/navigation-bar/navigation-bar.component.d.ts +1 -6
  90. package/lib/components/navigation-bar/navigation-bar.component.js +1 -18
  91. package/lib/components/navigation-bar/navigation-bar.style.d.ts +0 -4
  92. package/lib/components/navigation-bar/navigation-bar.style.js +0 -8
  93. package/lib/components/radio-button/radio-button-group.component.js +1 -1
  94. package/lib/components/select/select-list/select-list.component.js +2 -2
  95. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.d.ts +3 -1
  96. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +7 -2
  97. package/lib/components/sidebar/sidebar.component.js +11 -3
  98. package/lib/components/simple-color-picker/simple-color-picker.component.js +1 -1
  99. package/lib/components/split-button/split-button-toggle.style.d.ts +1 -1
  100. package/lib/components/split-button/split-button.component.d.ts +1 -4
  101. package/lib/components/split-button/split-button.component.js +3 -18
  102. package/lib/components/split-button/split-button.d.ts +0 -2
  103. package/lib/components/tile/tile.component.d.ts +1 -2
  104. package/lib/components/tile/tile.component.js +1 -16
  105. package/lib/components/tile/tile.d.ts +0 -2
  106. package/lib/components/tile-select/tile-select-group.component.js +1 -1
  107. package/lib/components/toast/toast.component.d.ts +1 -4
  108. package/lib/components/toast/toast.component.js +1 -16
  109. package/lib/components/toast/toast.d.ts +0 -2
  110. package/lib/locales/en-gb.js +0 -9
  111. package/lib/locales/locale.d.ts +0 -9
  112. package/lib/locales/pl-pl.js +0 -9
  113. package/package.json +1 -1
  114. package/esm/components/app-wrapper/app-wrapper.component.d.ts +0 -25
  115. package/esm/components/app-wrapper/app-wrapper.component.js +0 -104
  116. package/esm/components/app-wrapper/app-wrapper.d.ts +0 -12
  117. package/esm/components/app-wrapper/app-wrapper.style.d.ts +0 -2
  118. package/esm/components/app-wrapper/app-wrapper.style.js +0 -17
  119. package/esm/components/app-wrapper/index.d.ts +0 -1
  120. package/esm/components/app-wrapper/index.js +0 -1
  121. package/esm/components/menu/submenu-block/index.d.ts +0 -2
  122. package/esm/components/menu/submenu-block/index.js +0 -1
  123. package/esm/components/menu/submenu-block/submenu-block.component.d.ts +0 -12
  124. package/esm/components/menu/submenu-block/submenu-block.component.js +0 -34
  125. package/esm/components/menu/submenu-block/submenu-block.d.ts +0 -12
  126. package/esm/components/menu/submenu-block/submenu-block.style.d.ts +0 -2
  127. package/esm/components/menu/submenu-block/submenu-block.style.js +0 -16
  128. package/esm/components/mount-in-app/__spec__.d.ts +0 -1
  129. package/esm/components/mount-in-app/__spec__.js +0 -47
  130. package/esm/components/mount-in-app/index.d.ts +0 -1
  131. package/esm/components/mount-in-app/mount-in-app.d.ts +0 -12
  132. package/esm/components/mount-in-app/mount-in-app.js +0 -90
  133. package/esm/components/mount-in-app/package.json +0 -3
  134. package/esm/components/multi-step-wizard/__spec__.d.ts +0 -1
  135. package/esm/components/multi-step-wizard/__spec__.js +0 -191
  136. package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +0 -109
  137. package/esm/components/multi-step-wizard/multi-step-wizard.js +0 -383
  138. package/esm/components/multi-step-wizard/multi-step-wizard.style.d.ts +0 -2
  139. package/esm/components/multi-step-wizard/multi-step-wizard.style.js +0 -10
  140. package/esm/components/multi-step-wizard/package.json +0 -4
  141. package/esm/components/multi-step-wizard/step/__spec__.d.ts +0 -1
  142. package/esm/components/multi-step-wizard/step/__spec__.js +0 -399
  143. package/esm/components/multi-step-wizard/step/package.json +0 -4
  144. package/esm/components/multi-step-wizard/step/step.d.ts +0 -166
  145. package/esm/components/multi-step-wizard/step/step.js +0 -407
  146. package/esm/components/multi-step-wizard/step/step.style.d.ts +0 -13
  147. package/esm/components/multi-step-wizard/step/step.style.js +0 -138
  148. package/esm/components/scrollable-list/as-scrollable-list-item.wrapper.d.ts +0 -2
  149. package/esm/components/scrollable-list/as-scrollable-list-item.wrapper.js +0 -10
  150. package/esm/components/scrollable-list/index.d.ts +0 -4
  151. package/esm/components/scrollable-list/index.js +0 -4
  152. package/esm/components/scrollable-list/scrollable-list-item.component.d.ts +0 -2
  153. package/esm/components/scrollable-list/scrollable-list-item.component.js +0 -26
  154. package/esm/components/scrollable-list/scrollable-list.component.d.ts +0 -52
  155. package/esm/components/scrollable-list/scrollable-list.component.js +0 -306
  156. package/esm/components/scrollable-list/scrollable-list.context.d.ts +0 -3
  157. package/esm/components/scrollable-list/scrollable-list.context.js +0 -2
  158. package/esm/components/scrollable-list/scrollable-list.style.d.ts +0 -2
  159. package/esm/components/scrollable-list/scrollable-list.style.js +0 -30
  160. package/esm/components/scrollable-list/test-utils.d.ts +0 -2
  161. package/esm/components/scrollable-list/test-utils.js +0 -25
  162. package/lib/components/app-wrapper/app-wrapper.component.d.ts +0 -25
  163. package/lib/components/app-wrapper/app-wrapper.component.js +0 -120
  164. package/lib/components/app-wrapper/app-wrapper.d.ts +0 -12
  165. package/lib/components/app-wrapper/app-wrapper.style.d.ts +0 -2
  166. package/lib/components/app-wrapper/app-wrapper.style.js +0 -28
  167. package/lib/components/app-wrapper/index.d.ts +0 -1
  168. package/lib/components/app-wrapper/index.js +0 -15
  169. package/lib/components/app-wrapper/package.json +0 -6
  170. package/lib/components/menu/submenu-block/index.d.ts +0 -2
  171. package/lib/components/menu/submenu-block/index.js +0 -15
  172. package/lib/components/menu/submenu-block/package.json +0 -6
  173. package/lib/components/menu/submenu-block/submenu-block.component.d.ts +0 -12
  174. package/lib/components/menu/submenu-block/submenu-block.component.js +0 -53
  175. package/lib/components/menu/submenu-block/submenu-block.d.ts +0 -12
  176. package/lib/components/menu/submenu-block/submenu-block.style.d.ts +0 -2
  177. package/lib/components/menu/submenu-block/submenu-block.style.js +0 -33
  178. package/lib/components/mount-in-app/__spec__.d.ts +0 -1
  179. package/lib/components/mount-in-app/__spec__.js +0 -55
  180. package/lib/components/mount-in-app/index.d.ts +0 -1
  181. package/lib/components/mount-in-app/mount-in-app.d.ts +0 -12
  182. package/lib/components/mount-in-app/mount-in-app.js +0 -105
  183. package/lib/components/mount-in-app/package.json +0 -3
  184. package/lib/components/multi-step-wizard/__spec__.d.ts +0 -1
  185. package/lib/components/multi-step-wizard/__spec__.js +0 -202
  186. package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +0 -109
  187. package/lib/components/multi-step-wizard/multi-step-wizard.js +0 -397
  188. package/lib/components/multi-step-wizard/multi-step-wizard.style.d.ts +0 -2
  189. package/lib/components/multi-step-wizard/multi-step-wizard.style.js +0 -21
  190. package/lib/components/multi-step-wizard/package.json +0 -4
  191. package/lib/components/multi-step-wizard/step/__spec__.d.ts +0 -1
  192. package/lib/components/multi-step-wizard/step/__spec__.js +0 -409
  193. package/lib/components/multi-step-wizard/step/package.json +0 -4
  194. package/lib/components/multi-step-wizard/step/step.d.ts +0 -166
  195. package/lib/components/multi-step-wizard/step/step.js +0 -421
  196. package/lib/components/multi-step-wizard/step/step.style.d.ts +0 -13
  197. package/lib/components/multi-step-wizard/step/step.style.js +0 -162
  198. package/lib/components/scrollable-list/as-scrollable-list-item.wrapper.d.ts +0 -2
  199. package/lib/components/scrollable-list/as-scrollable-list-item.wrapper.js +0 -21
  200. package/lib/components/scrollable-list/index.d.ts +0 -4
  201. package/lib/components/scrollable-list/index.js +0 -31
  202. package/lib/components/scrollable-list/package.json +0 -6
  203. package/lib/components/scrollable-list/scrollable-list-item.component.d.ts +0 -2
  204. package/lib/components/scrollable-list/scrollable-list-item.component.js +0 -42
  205. package/lib/components/scrollable-list/scrollable-list.component.d.ts +0 -52
  206. package/lib/components/scrollable-list/scrollable-list.component.js +0 -328
  207. package/lib/components/scrollable-list/scrollable-list.context.d.ts +0 -3
  208. package/lib/components/scrollable-list/scrollable-list.context.js +0 -14
  209. package/lib/components/scrollable-list/scrollable-list.style.d.ts +0 -2
  210. package/lib/components/scrollable-list/scrollable-list.style.js +0 -41
  211. package/lib/components/scrollable-list/test-utils.d.ts +0 -2
  212. package/lib/components/scrollable-list/test-utils.js +0 -37
@@ -21,204 +21,120 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
21
 
22
22
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
23
 
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
26
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
27
-
28
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
29
-
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
-
32
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
-
34
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
35
-
36
- function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
37
-
38
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
39
-
40
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
41
-
42
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
43
-
44
24
  const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
45
25
 
46
- let Heading = /*#__PURE__*/function (_React$Component) {
47
- _inherits(Heading, _React$Component);
48
-
49
- var _super = _createSuper(Heading);
50
-
51
- function Heading() {
52
- _classCallCheck(this, Heading);
53
-
54
- return _super.apply(this, arguments);
55
- }
56
-
57
- _createClass(Heading, [{
58
- key: "help",
59
- get: function () {
60
- if (!this.props.help && !this.props.helpLink) {
61
- return null;
62
- }
63
-
64
- return /*#__PURE__*/_react.default.createElement(_heading.StyledHeaderHelp, {
65
- "data-element": "help",
66
- tooltipPosition: "right",
67
- href: this.props.helpLink,
68
- ariaLabel: this.props.helpAriaLabel
69
- }, this.props.help);
70
- }
71
- }, {
72
- key: "back",
73
- get: function () {
74
- if (!this.props.backLink) {
75
- return null;
76
- }
77
-
78
- let props;
79
-
80
- if (typeof this.props.backLink === "string") {
81
- props = {
82
- href: this.props.backLink
83
- };
84
- } else {
85
- props = {
86
- onClick: this.props.backLink
87
- };
88
- }
89
-
90
- return /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingBackButton // this event allows an element to be focusable on click event on IE
91
- , _extends({
92
- onMouseDown: e => e.currentTarget.focus(),
93
- "data-element": "back"
94
- }, props), /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingIcon, {
95
- type: "chevron_left",
96
- divider: this.props.divider
97
- }));
98
- }
99
- }, {
100
- key: "subheader",
101
- get: function () {
102
- if (!this.props.subheader) {
103
- return null;
104
- }
105
-
106
- return /*#__PURE__*/_react.default.createElement(_heading.StyledSubHeader, {
107
- "data-element": "subtitle",
108
- id: this.props.subtitleId,
109
- hasBackLink: !!this.props.backLink,
110
- hasSeparator: this.props.separator
111
- }, this.props.subheader);
112
- }
113
- }, {
114
- key: "separator",
115
- get: function () {
116
- return this.props.separator ? /*#__PURE__*/_react.default.createElement(_heading.StyledSeparator, null) : null;
117
- }
118
- }, {
119
- key: "divider",
120
- get: function () {
121
- return this.props.divider ? /*#__PURE__*/_react.default.createElement(_heading.StyledDivider, {
122
- "data-element": "divider"
123
- }) : null;
124
- }
125
- }, {
126
- key: "pills",
127
- get: function () {
128
- return this.props.pills ? /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingPills, {
129
- "data-element": "pills"
130
- }, this.props.pills) : null;
131
- }
132
- }, {
133
- key: "render",
134
- value: function render() {
135
- if (!this.props.title) {
136
- return null;
137
- }
138
-
139
- const marginProps = (0, _utils.filterStyledSystemMarginProps)(this.props);
140
- return /*#__PURE__*/_react.default.createElement(_heading.StyledHeading, _extends({}, (0, _tags.default)("heading", this.props), marginProps), /*#__PURE__*/_react.default.createElement(_heading.StyledHeader, {
141
- "data-element": "header-container",
142
- divider: this.props.divider,
143
- subheader: this.props.subheader,
144
- hasBackLink: !!this.props.backLink
145
- }, this.back, /*#__PURE__*/_react.default.createElement(_heading.StyledHeaderContent, null, /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingTitle, {
146
- withMargin: this.props.pills || this.props.help,
147
- variant: "h1",
148
- "data-element": "title",
149
- id: this.props.titleId
150
- }, this.props.title), this.help, this.pills), this.separator, this.subheader), this.divider, this.props.children);
151
- }
152
- }]);
153
-
154
- return Heading;
155
- }(_react.default.Component);
26
+ const Heading = ({
27
+ children,
28
+ backLink,
29
+ divider = true,
30
+ help,
31
+ helpAriaLabel,
32
+ helpLink,
33
+ pills,
34
+ separator = false,
35
+ subheader,
36
+ subtitleId,
37
+ title,
38
+ titleId,
39
+ ...rest
40
+ }) => {
41
+ const getHelp = () => {
42
+ return /*#__PURE__*/_react.default.createElement(_heading.StyledHeaderHelp, {
43
+ "data-element": "help",
44
+ tooltipPosition: "right",
45
+ href: helpLink,
46
+ ariaLabel: helpAriaLabel
47
+ }, help);
48
+ };
49
+
50
+ const getBackButton = () => {
51
+ const backButtonProps = typeof backLink === "string" ? {
52
+ href: backLink
53
+ } : {
54
+ onClick: backLink
55
+ };
56
+ return /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingBackButton // this event allows an element to be focusable on click event on IE
57
+ , _extends({
58
+ onMouseDown: e => e.currentTarget.focus(),
59
+ "data-element": "back"
60
+ }, backButtonProps), /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingIcon, {
61
+ type: "chevron_left",
62
+ divider: divider
63
+ }));
64
+ };
65
+
66
+ const getSubheader = () => {
67
+ return /*#__PURE__*/_react.default.createElement(_heading.StyledSubHeader, {
68
+ "data-element": "subtitle",
69
+ id: subtitleId,
70
+ hasBackLink: !!backLink,
71
+ hasSeparator: separator
72
+ }, subheader);
73
+ };
74
+
75
+ const getPills = () => {
76
+ return /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingPills, {
77
+ "data-element": "pills"
78
+ }, pills);
79
+ };
80
+
81
+ const marginProps = (0, _utils.filterStyledSystemMarginProps)(rest);
82
+ const dataAttributes = {
83
+ "data-element": rest["data-element"],
84
+ "data-role": rest["data-role"]
85
+ };
86
+ return title ? /*#__PURE__*/_react.default.createElement(_heading.StyledHeading, _extends({}, (0, _tags.default)("heading", dataAttributes), marginProps), /*#__PURE__*/_react.default.createElement(_heading.StyledHeader, {
87
+ "data-element": "header-container",
88
+ divider: divider,
89
+ subheader: subheader,
90
+ hasBackLink: !!backLink
91
+ }, backLink && getBackButton(), /*#__PURE__*/_react.default.createElement(_heading.StyledHeaderContent, null, /*#__PURE__*/_react.default.createElement(_heading.StyledHeadingTitle, {
92
+ withMargin: pills || help,
93
+ variant: "h1",
94
+ "data-element": "title",
95
+ id: titleId
96
+ }, title), (help || helpLink) && getHelp(), pills && getPills()), separator && /*#__PURE__*/_react.default.createElement(_heading.StyledSeparator, null), subheader && getSubheader()), divider && /*#__PURE__*/_react.default.createElement(_heading.StyledDivider, {
97
+ "data-element": "divider"
98
+ }), children) : null;
99
+ };
156
100
 
157
101
  Heading.propTypes = { ...marginPropTypes,
158
102
 
159
- /**
160
- * Children elements
161
- */
103
+ /** Child elements */
162
104
  children: _propTypes.default.node,
163
105
 
164
- /**
165
- * Defines the title for the heading.
166
- */
106
+ /** Defines the title for the heading. */
167
107
  title: _propTypes.default.node,
168
108
 
169
- /**
170
- * Defines the title id for the heading.
171
- */
109
+ /** Defines the title id for the heading. */
172
110
  titleId: _propTypes.default.string,
173
111
 
174
- /**
175
- * Defines the subheader for the heading.
176
- */
112
+ /** Defines the subheader for the heading. */
177
113
  subheader: _propTypes.default.node,
178
114
 
179
- /**
180
- * Defines the subtitle id for the heading.
181
- */
115
+ /** Defines the subtitle id for the heading. */
182
116
  subtitleId: _propTypes.default.string,
183
117
 
184
- /**
185
- * Defines the help text for the heading.
186
- */
118
+ /** Defines the help text for the heading. */
187
119
  help: _propTypes.default.string,
188
120
 
189
- /**
190
- * Defines the help link for the heading.
191
- */
121
+ /** Defines the help link for the heading. */
192
122
  helpLink: _propTypes.default.string,
193
123
 
194
- /**
195
- * Defines the a href for the back link.
196
- */
124
+ /** Defines the a href for the back link. */
197
125
  backLink: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
198
126
 
199
- /**
200
- * Adds a divider below the heading and the content.
201
- */
127
+ /** Adds a divider below the heading and the content. */
202
128
  divider: _propTypes.default.bool,
203
129
 
204
- /**
205
- * Adds a separator between the title and the subheader.
206
- */
130
+ /** Adds a separator between the title and the subheader. */
207
131
  separator: _propTypes.default.bool,
208
132
 
209
- /**
210
- * Pills that will be added after the title.
211
- */
133
+ /** Pills that will be added after the title. */
212
134
  pills: _propTypes.default.node,
213
135
 
214
- /**
215
- * Aria label for rendered help component
216
- */
136
+ /** Aria label for rendered help component */
217
137
  helpAriaLabel: _propTypes.default.string
218
138
  };
219
- Heading.defaultProps = {
220
- divider: true,
221
- separator: false
222
- };
223
139
  var _default = Heading;
224
140
  exports.default = _default;
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
 
4
4
  export interface HeadingProps extends MarginProps {
5
- /** Custom className */
6
- className?: string;
5
+ /** Child elements */
6
+ children?: React.ReactNode;
7
7
  /** Defines the title for the heading. */
8
8
  title?: React.ReactNode;
9
9
  /** Defines the title id for the heading. */
@@ -24,8 +24,10 @@ export interface HeadingProps extends MarginProps {
24
24
  separator?: boolean;
25
25
  /** Pills that will be added after the title. */
26
26
  pills?: React.ReactNode;
27
+ /** Aria label for rendered help component */
28
+ helpAriaLabel?: string;
27
29
  }
28
30
 
29
- declare class Heading extends React.Component<HeadingProps> {}
31
+ declare function Heading(props: HeadingProps): JSX.Element | null;
30
32
 
31
33
  export default Heading;
@@ -82,15 +82,6 @@ declare namespace I18nProvider {
82
82
  titleSelect: PropTypes.Requireable<PropTypes.InferProps<{
83
83
  deselect: PropTypes.Requireable<(...args: any[]) => any>;
84
84
  }>>;
85
- wizards: PropTypes.Requireable<PropTypes.InferProps<{
86
- multiStep: PropTypes.Requireable<PropTypes.InferProps<{
87
- buttons: PropTypes.Requireable<PropTypes.InferProps<{
88
- submit: PropTypes.Requireable<(...args: any[]) => any>;
89
- next: PropTypes.Requireable<(...args: any[]) => any>;
90
- back: PropTypes.Requireable<(...args: any[]) => any>;
91
- }>>;
92
- }>>;
93
- }>>;
94
85
  }>>;
95
86
  export { locale_1 as locale };
96
87
  export const children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
@@ -101,15 +101,6 @@ I18nProvider.propTypes = {
101
101
  }),
102
102
  titleSelect: _propTypes.default.shape({
103
103
  deselect: _propTypes.default.func
104
- }),
105
- wizards: _propTypes.default.shape({
106
- multiStep: _propTypes.default.shape({
107
- buttons: _propTypes.default.shape({
108
- submit: _propTypes.default.func,
109
- next: _propTypes.default.func,
110
- back: _propTypes.default.func
111
- })
112
- })
113
104
  })
114
105
  }),
115
106
  children: _propTypes.default.node.isRequired
@@ -1,6 +1,5 @@
1
1
  export { default as Menu } from "./menu";
2
2
  export { default as MenuItem } from "./menu-item/menu-item";
3
3
  export { default as ScrollableBlock } from "./scrollable-block/scrollable-block";
4
- export { default as SubmenuBlock } from "./submenu-block/submenu-block";
5
4
  export { default as MenuDivider } from "./menu-divider/menu-divider";
6
5
  export { default as MenuSegmentTitle } from "./menu-segment-title/menu-segment-title";
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "MenuItem", {
15
15
  return _menuItem.default;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "SubmenuBlock", {
19
- enumerable: true,
20
- get: function () {
21
- return _submenuBlock.default;
22
- }
23
- });
24
18
  Object.defineProperty(exports, "MenuDivider", {
25
19
  enumerable: true,
26
20
  get: function () {
@@ -50,8 +44,6 @@ var _menu = _interopRequireDefault(require("./menu.component"));
50
44
 
51
45
  var _menuItem = _interopRequireDefault(require("./menu-item/menu-item.component"));
52
46
 
53
- var _submenuBlock = _interopRequireDefault(require("./submenu-block/submenu-block.component"));
54
-
55
47
  var _menuDivider = _interopRequireDefault(require("./menu-divider/menu-divider.component"));
56
48
 
57
49
  var _menuSegmentTitle = _interopRequireDefault(require("./menu-segment-title/menu-segment-title.component"));
@@ -57,19 +57,6 @@ const MenuFullscreen = ({
57
57
  }
58
58
  };
59
59
 
60
- (0, _react.useLayoutEffect)(() => {
61
- const checkTransitionEnd = () => {
62
- menuContentRef.current.focus();
63
- };
64
-
65
- const wrapperRef = menuWrapperRef.current;
66
-
67
- if (isOpen) {
68
- wrapperRef.addEventListener("transitionend", checkTransitionEnd);
69
- } else {
70
- wrapperRef.removeEventListener("transitionend", checkTransitionEnd);
71
- }
72
- }, [isOpen]);
73
60
  const scrollVariants = {
74
61
  light: "light",
75
62
  dark: "dark",
@@ -85,8 +72,8 @@ const MenuFullscreen = ({
85
72
  return /*#__PURE__*/_react.default.createElement("li", {
86
73
  "aria-label": "menu-fullscreen"
87
74
  }, /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_focusTrap.default, {
88
- autoFocus: false,
89
- wrapperRef: menuWrapperRef
75
+ wrapperRef: menuWrapperRef,
76
+ isOpen: isOpen
90
77
  }, /*#__PURE__*/_react.default.createElement(_menuFullScreen.StyledMenuFullscreen, _extends({
91
78
  "data-component": "menu-fullscreen",
92
79
  ref: menuWrapperRef,
@@ -117,8 +104,7 @@ const MenuFullscreen = ({
117
104
  display: "flex",
118
105
  flexDirection: "column",
119
106
  role: "list",
120
- inFullscreenView: true,
121
- tabIndex: -1
107
+ inFullscreenView: true
122
108
  }, _react.default.Children.map(children, (child, index) => /*#__PURE__*/_react.default.createElement(_menu2.default.Provider, {
123
109
  value: {
124
110
  inFullscreenView: true,
@@ -33,6 +33,7 @@ const StyledMenuFullscreen = _styledComponents.default.div`
33
33
  bottom: 0;
34
34
  height: 100vh;
35
35
  width: 100%;
36
+ outline: none;
36
37
 
37
38
  a,
38
39
  button,
@@ -25,8 +25,6 @@ var _submenu = _interopRequireDefault(require("../__internal__/submenu/submenu.c
25
25
 
26
26
  var _submenu2 = _interopRequireDefault(require("../__internal__/submenu/submenu.context"));
27
27
 
28
- var _submenuBlock = _interopRequireDefault(require("../submenu-block/submenu-block.component"));
29
-
30
28
  var _menu2 = require("../menu.style");
31
29
 
32
30
  var _search = _interopRequireDefault(require("../../search"));
@@ -71,11 +69,6 @@ const MenuItem = ({
71
69
  } = menuContext;
72
70
 
73
71
  const childrenItems = _react.default.Children.map(children, child => {
74
- if (child && child.type === _submenuBlock.default) {
75
- const childArray = Array.isArray(child.props.children) ? child.props.children : [child.props.children];
76
- return [...childArray.map(innerChild => innerChild)];
77
- }
78
-
79
72
  if ((child === null || child === void 0 ? void 0 : child.type) === _search.default) {
80
73
  isChildSearch.current = true;
81
74
  }
@@ -6,5 +6,5 @@ export interface MultiActionButtonProps extends Omit<SplitButtonProps, "buttonTy
6
6
  /** Second text child, renders under main text, only when size is "large" */
7
7
  subtext?: string;
8
8
  }
9
- export declare const MultiActionButton: ({ align, disabled, as, buttonType, size, children, text, subtext, "data-element": dataElement, "data-role": dataRole, ...rest }: MultiActionButtonProps) => JSX.Element;
9
+ export declare const MultiActionButton: ({ align, disabled, buttonType, size, children, text, subtext, "data-element": dataElement, "data-role": dataRole, ...rest }: MultiActionButtonProps) => JSX.Element;
10
10
  export default MultiActionButton;
@@ -21,8 +21,6 @@ var _utils = require("../../style/utils");
21
21
 
22
22
  var _focusTrapUtils = require("../../__internal__/focus-trap/focus-trap-utils");
23
23
 
24
- var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
25
-
26
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
25
 
28
26
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
@@ -31,12 +29,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
31
29
 
32
30
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
31
 
34
- let deprecatedWarnTriggered = false;
35
-
36
32
  const MultiActionButton = ({
37
33
  align = "left",
38
34
  disabled,
39
- as,
40
35
  buttonType,
41
36
  size,
42
37
  children,
@@ -46,13 +41,6 @@ const MultiActionButton = ({
46
41
  "data-role": dataRole,
47
42
  ...rest
48
43
  }) => {
49
- if (!deprecatedWarnTriggered && as) {
50
- deprecatedWarnTriggered = true;
51
-
52
- _logger.default.deprecate( // eslint-disable-next-line max-len
53
- "The `as` prop is deprecated and will soon be removed from the `MultiActionButton` component interface. You should use the `buttonType` prop to achieve the same styling. The following codemod is available to help with updating your code https://github.com/Sage/carbon-codemod/tree/master/transforms/rename-prop");
54
- }
55
-
56
44
  const ref = (0, _react.useRef)(null);
57
45
  const buttonRef = (0, _react.useRef)(null);
58
46
  const buttonContainer = (0, _react.useRef)(null);
@@ -211,7 +199,7 @@ const MultiActionButton = ({
211
199
  onFocus: focusMainButton,
212
200
  onBlur: blurMainButton,
213
201
  onKeyDown: handleMainButtonKeyDown,
214
- buttonType: buttonType || as,
202
+ buttonType,
215
203
  size,
216
204
  subtext,
217
205
  ...(!disabled && {
@@ -306,7 +294,6 @@ MultiActionButton.propTypes = {
306
294
  "aria-valuemin": _propTypes.default.number,
307
295
  "aria-valuenow": _propTypes.default.number,
308
296
  "aria-valuetext": _propTypes.default.string,
309
- "as": _propTypes.default.oneOf(["primary", "secondary"]),
310
297
  "autoCapitalize": _propTypes.default.string,
311
298
  "autoCorrect": _propTypes.default.string,
312
299
  "autoFocus": _propTypes.default.bool,
@@ -3,7 +3,6 @@ import { PaddingProps, FlexboxProps } from "styled-system";
3
3
  export declare type Position = "sticky" | "fixed";
4
4
  export declare type Orientation = "top" | "bottom";
5
5
  export declare type NavigationType = "light" | "dark" | "white" | "black";
6
- export declare type StickyPosition = "top" | "bottom";
7
6
  export interface NavigationBarProps extends PaddingProps, FlexboxProps {
8
7
  children?: React.ReactNode;
9
8
  ariaLabel?: string;
@@ -11,10 +10,6 @@ export interface NavigationBarProps extends PaddingProps, FlexboxProps {
11
10
  navigationType?: NavigationType;
12
11
  /** If 'true' the children will not be visible */
13
12
  isLoading?: boolean;
14
- /** Defines the position of sticky navigation bar */
15
- stickyPosition?: StickyPosition;
16
- /** Defines the offset of sticky navigation bar */
17
- stickyOffset?: string;
18
13
  /** Defines whether the navigation bar should be positioned fixed or sticky */
19
14
  position?: Position;
20
15
  /** Defines the offset of navigation bar */
@@ -22,5 +17,5 @@ export interface NavigationBarProps extends PaddingProps, FlexboxProps {
22
17
  /** Defines whether the navigation bar should be positioned top or bottom */
23
18
  orientation?: Orientation;
24
19
  }
25
- export declare const NavigationBar: ({ navigationType, isLoading, children, ariaLabel, stickyOffset, stickyPosition, position, offset, orientation, ...props }: NavigationBarProps) => JSX.Element;
20
+ export declare const NavigationBar: ({ navigationType, isLoading, children, ariaLabel, position, offset, orientation, ...props }: NavigationBarProps) => JSX.Element;
26
21
  export default NavigationBar;
@@ -11,40 +11,25 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _navigationBar = _interopRequireDefault(require("./navigation-bar.style"));
13
13
 
14
- var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
15
-
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
17
 
20
- let deprecatedWarnTriggered = false;
21
-
22
18
  const NavigationBar = ({
23
19
  navigationType = "light",
24
20
  isLoading = false,
25
21
  children,
26
22
  ariaLabel,
27
- stickyOffset = "0",
28
- stickyPosition,
29
23
  position,
30
24
  offset = "0",
31
25
  orientation,
32
26
  ...props
33
27
  }) => {
34
- if (!deprecatedWarnTriggered && stickyPosition) {
35
- deprecatedWarnTriggered = true;
36
-
37
- _logger.default.deprecate( // eslint-disable-next-line max-len
38
- "The `stickyPosition` and `stickyOffset` props are deprecated and will soon be removed. You should use the `position`, `offset` and `orientation` props to achieve the same layout. The following codemods are available to help with updating your code: https://github.com/Sage/carbon-codemod/tree/master/transforms/remove-prop and https://github.com/Sage/carbon-codemod/tree/master/transforms/add-prop");
39
- }
40
-
41
28
  return /*#__PURE__*/_react.default.createElement(_navigationBar.default, _extends({
42
29
  role: "navigation",
43
30
  "aria-label": ariaLabel,
44
31
  navigationType: navigationType,
45
32
  "data-component": "navigation-bar",
46
- stickyOffset: stickyOffset,
47
- stickyPosition: stickyPosition,
48
33
  position: position,
49
34
  offset: offset,
50
35
  orientation: orientation
@@ -1052,9 +1037,7 @@ NavigationBar.propTypes = {
1052
1037
  "description": _propTypes.default.string,
1053
1038
  "toString": _propTypes.default.func.isRequired,
1054
1039
  "valueOf": _propTypes.default.func.isRequired
1055
- }), _propTypes.default.string]),
1056
- "stickyOffset": _propTypes.default.string,
1057
- "stickyPosition": _propTypes.default.oneOf(["bottom", "top"])
1040
+ }), _propTypes.default.string])
1058
1041
  };
1059
1042
  var _default = NavigationBar;
1060
1043
  exports.default = _default;
@@ -3,10 +3,6 @@ import { Position, Orientation, NavigationType } from "./navigation-bar.componen
3
3
  declare const StyledNavigationBar: import("styled-components").StyledComponent<"nav", any, PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
4
4
  /** Color scheme of navigation component */
5
5
  navigationType?: NavigationType | undefined;
6
- /** Defines the position of sticky navigation bar */
7
- stickyPosition?: Orientation | undefined;
8
- /** Defines the offset of sticky navigation bar */
9
- stickyOffset?: string | undefined;
10
6
  /** Defines whether the navigation bar should be positioned fixed or sticky */
11
7
  position?: Position | undefined;
12
8
  /** Defines the offset of navigation bar */
@@ -49,14 +49,6 @@ const StyledNavigationBar = _styledComponents.default.nav`
49
49
  margin-right: 10px;
50
50
  }
51
51
 
52
- ${({
53
- stickyPosition,
54
- stickyOffset
55
- }) => stickyPosition && (0, _styledComponents.css)`
56
- position: sticky;
57
- ${stickyPosition}: ${stickyOffset};
58
- `}
59
-
60
52
  ${({
61
53
  position,
62
54
  orientation,
@@ -17,7 +17,7 @@ var _fieldset = _interopRequireDefault(require("../../__internal__/fieldset"));
17
17
 
18
18
  var _radioButtonGroup = _interopRequireDefault(require("./radio-button-group.style"));
19
19
 
20
- var _radioButtonMapper = _interopRequireDefault(require("./radio-button-mapper.component"));
20
+ var _radioButtonMapper = _interopRequireDefault(require("../../__internal__/radio-button-mapper/radio-button-mapper.component"));
21
21
 
22
22
  var _useIsAboveBreakpoint = _interopRequireDefault(require("../../hooks/__internal__/useIsAboveBreakpoint"));
23
23
 
@@ -258,7 +258,7 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
258
258
  }
259
259
 
260
260
  setListHeight(`${newHeight}px`);
261
- }, [children, listRef.current]);
261
+ }, [children]);
262
262
  (0, _react.useEffect)(() => {
263
263
  const keyboardEvent = "keydown";
264
264
  const listElement = listRef.current;
@@ -365,7 +365,7 @@ SelectList.propTypes = {
365
365
  /** The Id of the label */
366
366
  labelId: _propTypes.default.string,
367
367
 
368
- /** Child components (such as <Option>) for the <ScrollableList> */
368
+ /** Child components (such as <Option>) */
369
369
  children: _propTypes.default.node,
370
370
 
371
371
  /** Boolean to toggle where DatePicker is rendered in relation to the Date Input */