carbon-react 88.0.0 → 89.3.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/lib/__internal__/input/input.component.js +2 -1
- package/lib/__spec_helper__/mock-date-helper.js +2 -1
- package/lib/components/action-toolbar/action-toolbar.component.js +6 -7
- package/lib/components/app-wrapper/app-wrapper.component.js +2 -5
- package/lib/components/configurable-items/configurable-item-row/configurable-item-row.component.js +6 -8
- package/lib/components/configurable-items/configurable-items.component.js +1 -2
- package/lib/components/content/content.component.js +1 -1
- package/lib/components/content/content.d.ts +1 -1
- package/lib/components/date/date.component.js +1 -2
- package/lib/components/date-range/date-range.component.js +1 -2
- package/lib/components/decimal/decimal.component.js +1 -2
- package/lib/components/detail/detail.component.js +2 -3
- package/lib/components/drag-and-drop/custom-drag-layer/custom-drag-layer.js +2 -3
- package/lib/components/drag-and-drop/draggable-context/draggable-context.js +10 -11
- package/lib/components/drag-and-drop/with-drag/with-drag.js +4 -6
- package/lib/components/drag-and-drop/with-drop/with-drop.js +4 -6
- package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +2 -1
- package/lib/components/heading/heading.component.js +4 -8
- package/lib/components/i18n-provider/i18n-provider.d.ts +3 -94
- package/lib/components/icon/icon.component.js +4 -3
- package/lib/components/mount-in-app/mount-in-app.js +2 -5
- package/lib/components/multi-step-wizard/multi-step-wizard.js +14 -17
- package/lib/components/multi-step-wizard/step/step.js +6 -9
- package/lib/components/pod/pod.component.js +185 -390
- package/lib/components/scrollable-list/scrollable-list.component.js +2 -3
- package/lib/components/show-edit-pod/show-edit-pod.component.js +1 -3
- package/lib/components/sidebar/sidebar.component.js +2 -1
- package/lib/components/table/table.component.js +1 -3
- package/lib/components/text-editor/text-editor.component.js +2 -1
- package/lib/components/textarea/textarea.component.js +1 -3
- package/lib/components/{pod/pod-manager.component.js → tile-select/__internal__/accordion/accordion.component.js} +30 -30
- package/lib/components/tile-select/__internal__/accordion/accordion.d.ts +13 -0
- package/lib/components/tile-select/__internal__/accordion/accordion.style.js +30 -0
- package/lib/components/tile-select/__internal__/accordion/index.js +15 -0
- package/lib/components/tile-select/tile-select.component.js +39 -10
- package/lib/components/tile-select/tile-select.d.ts +6 -0
- package/lib/components/tile-select/tile-select.style.js +17 -1
- package/lib/locales/en-gb.d.ts +5 -0
- package/lib/locales/en-gb.js +2 -3
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/locale.d.ts +96 -0
- package/lib/patterns/configurable-items/configurable-items-content/configurable-items-content.js +2 -3
- package/lib/patterns/configurable-items/configurable-items.js +2 -2
- package/lib/utils/helpers/with-unique-id-props/with-unique-id-props.hoc.js +2 -2
- package/package.json +8 -6
- package/lib/components/pod/pod-context.js +0 -12
- package/lib/components/pod/pod-manager.d.ts +0 -9
|
@@ -38,7 +38,8 @@ const Input = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
38
38
|
const context = (0, _react.useContext)(_inputBehaviour.InputContext);
|
|
39
39
|
const groupContext = (0, _react.useContext)(_inputBehaviour.InputGroupContext);
|
|
40
40
|
const deferredTimeout = (0, _react.useRef)(null);
|
|
41
|
-
|
|
41
|
+
let input = (0, _react.useRef)(null);
|
|
42
|
+
if (ref) input = ref;
|
|
42
43
|
(0, _react.useEffect)(() => {
|
|
43
44
|
if (autoFocus && input.current) input.current.focus();
|
|
44
45
|
}, [autoFocus, input]);
|
|
@@ -16,7 +16,8 @@ jest.mock("../utils/helpers/date", () => {
|
|
|
16
16
|
default: (() => {
|
|
17
17
|
const mockTodayDate = "1-1-2019";
|
|
18
18
|
const isoDateFormat = "YYYY-MM-DD";
|
|
19
|
-
const MockedDateHelper =
|
|
19
|
+
const MockedDateHelper = { ..._DateHelper.default
|
|
20
|
+
};
|
|
20
21
|
|
|
21
22
|
MockedDateHelper._parseDate = (value, options) => _DateHelper.default._parseDate(value, options).utc();
|
|
22
23
|
|
|
@@ -193,13 +193,6 @@ let ActionToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
193
193
|
return ActionToolbar;
|
|
194
194
|
}(_react.default.Component);
|
|
195
195
|
|
|
196
|
-
_defineProperty(ActionToolbar, "contextTypes", {
|
|
197
|
-
attachActionToolbar: _propTypes.default.func,
|
|
198
|
-
// tracks the action toolbar component
|
|
199
|
-
detachActionToolbar: _propTypes.default.func // tracks the action toolbar component
|
|
200
|
-
|
|
201
|
-
});
|
|
202
|
-
|
|
203
196
|
ActionToolbar.propTypes = {
|
|
204
197
|
/** The actions to display in the toolbar */
|
|
205
198
|
actions: _propTypes.default.object.isRequired,
|
|
@@ -210,5 +203,11 @@ ActionToolbar.propTypes = {
|
|
|
210
203
|
/** A function to return child components for the action toolbar. */
|
|
211
204
|
children: _propTypes.default.func
|
|
212
205
|
};
|
|
206
|
+
ActionToolbar.contextTypes = {
|
|
207
|
+
attachActionToolbar: _propTypes.default.func,
|
|
208
|
+
// tracks the action toolbar component
|
|
209
|
+
detachActionToolbar: _propTypes.default.func // tracks the action toolbar component
|
|
210
|
+
|
|
211
|
+
};
|
|
213
212
|
var _default = ActionToolbar;
|
|
214
213
|
exports.default = _default;
|
|
@@ -41,8 +41,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
41
41
|
|
|
42
42
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
45
|
-
|
|
46
44
|
/**
|
|
47
45
|
* Manages the width and containment of your application.
|
|
48
46
|
*/
|
|
@@ -89,7 +87,7 @@ let AppWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
89
87
|
return AppWrapper;
|
|
90
88
|
}(_react.default.Component);
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
AppWrapper.propTypes = {
|
|
93
91
|
/**
|
|
94
92
|
* Children elements
|
|
95
93
|
*
|
|
@@ -105,7 +103,6 @@ _defineProperty(AppWrapper, "propTypes", {
|
|
|
105
103
|
* @type {String}
|
|
106
104
|
*/
|
|
107
105
|
className: _propTypes.default.string
|
|
108
|
-
}
|
|
109
|
-
|
|
106
|
+
};
|
|
110
107
|
var _default = AppWrapper;
|
|
111
108
|
exports.default = _default;
|
package/lib/components/configurable-items/configurable-item-row/configurable-item-row.component.js
CHANGED
|
@@ -137,14 +137,6 @@ let ConfigurableItemRow = /*#__PURE__*/function (_React$Component) {
|
|
|
137
137
|
}(_react.default.Component);
|
|
138
138
|
|
|
139
139
|
exports.ConfigurableItemRowWithoutHOC = ConfigurableItemRow;
|
|
140
|
-
|
|
141
|
-
_defineProperty(ConfigurableItemRow, "contextTypes", {
|
|
142
|
-
dragDropManager: _propTypes.default.object,
|
|
143
|
-
// the React DND DragDropManager
|
|
144
|
-
dragAndDropActiveIndex: _propTypes.default.number // tracks the currently active index
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
|
|
148
140
|
ConfigurableItemRow.propTypes = {
|
|
149
141
|
/** A custom class name for the component. */
|
|
150
142
|
className: _propTypes.default.string,
|
|
@@ -167,6 +159,12 @@ ConfigurableItemRow.propTypes = {
|
|
|
167
159
|
/** An internal prop. Helpful to detect which component should be rendered */
|
|
168
160
|
theme: _propTypes.default.object
|
|
169
161
|
};
|
|
162
|
+
ConfigurableItemRow.contextTypes = {
|
|
163
|
+
dragDropManager: _propTypes.default.object,
|
|
164
|
+
// the React DND DragDropManager
|
|
165
|
+
dragAndDropActiveIndex: _propTypes.default.number // tracks the currently active index
|
|
166
|
+
|
|
167
|
+
};
|
|
170
168
|
ConfigurableItemRow.defaultProps = {
|
|
171
169
|
theme: _base.default
|
|
172
170
|
};
|
|
@@ -126,8 +126,7 @@ let ConfigurableItems = /*#__PURE__*/function (_React$Component) {
|
|
|
126
126
|
return ConfigurableItems;
|
|
127
127
|
}(_react.default.Component);
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
ConfigurableItems.contextType = _i18nContext.default;
|
|
131
130
|
ConfigurableItems.propTypes = {
|
|
132
131
|
/** Children elements. */
|
|
133
132
|
children: _propTypes.default.node,
|
|
@@ -59,7 +59,7 @@ Content.propTypes = { ...marginPropTypes,
|
|
|
59
59
|
children: _propTypes.default.node,
|
|
60
60
|
|
|
61
61
|
/** The title of the content component */
|
|
62
|
-
title: _propTypes.default.
|
|
62
|
+
title: _propTypes.default.node,
|
|
63
63
|
|
|
64
64
|
/** Displays the content inline with the title */
|
|
65
65
|
inline: _propTypes.default.bool,
|
|
@@ -14,7 +14,7 @@ export interface ContentProps extends MarginProps {
|
|
|
14
14
|
/** Displays the content inline with the title */
|
|
15
15
|
inline?: boolean;
|
|
16
16
|
/** The title of the content component */
|
|
17
|
-
title?:
|
|
17
|
+
title?: React.ReactNode;
|
|
18
18
|
/** Sets a custom width for the title element */
|
|
19
19
|
titleWidth?: string;
|
|
20
20
|
/** Applies a theme to the Content Value: primary, secondary */
|
|
@@ -627,8 +627,6 @@ let BaseDateInput = /*#__PURE__*/function (_React$Component) {
|
|
|
627
627
|
|
|
628
628
|
exports.BaseDateInput = BaseDateInput;
|
|
629
629
|
|
|
630
|
-
_defineProperty(BaseDateInput, "contextType", _i18nContext.default);
|
|
631
|
-
|
|
632
630
|
function generateAdjustedValue({
|
|
633
631
|
value,
|
|
634
632
|
defaultValue,
|
|
@@ -686,6 +684,7 @@ function canReturnValue(value, allowEmptyValue, locale, formats, format) {
|
|
|
686
684
|
}
|
|
687
685
|
|
|
688
686
|
const DateInput = (0, _withUniqueIdProps.default)(BaseDateInput);
|
|
687
|
+
BaseDateInput.contextType = _i18nContext.default;
|
|
689
688
|
BaseDateInput.propTypes = { ..._textbox.default.propTypes,
|
|
690
689
|
...marginPropTypes,
|
|
691
690
|
|
|
@@ -300,8 +300,7 @@ let DateRange = /*#__PURE__*/function (_React$Component) {
|
|
|
300
300
|
return DateRange;
|
|
301
301
|
}(_react.default.Component);
|
|
302
302
|
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
DateRange.contextType = _i18nContext.default;
|
|
305
304
|
DateRange.propTypes = {
|
|
306
305
|
/** Filtered styled system margin props */
|
|
307
306
|
...marginPropTypes,
|
|
@@ -281,10 +281,9 @@ let Decimal = /*#__PURE__*/function (_React$Component) {
|
|
|
281
281
|
return Decimal;
|
|
282
282
|
}(_react.default.Component);
|
|
283
283
|
|
|
284
|
-
_defineProperty(Decimal, "contextType", _i18nContext.default);
|
|
285
|
-
|
|
286
284
|
_defineProperty(Decimal, "maxPrecision", 15);
|
|
287
285
|
|
|
286
|
+
Decimal.contextType = _i18nContext.default;
|
|
288
287
|
Decimal.propTypes = {
|
|
289
288
|
/** Styled-system margin props */
|
|
290
289
|
...marginPropTypes,
|
|
@@ -106,7 +106,7 @@ let Detail = /*#__PURE__*/function (_React$Component) {
|
|
|
106
106
|
return Detail;
|
|
107
107
|
}(_react.default.Component);
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
Detail.propTypes = { ...marginPropTypes,
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* Custom className
|
|
@@ -129,7 +129,6 @@ _defineProperty(Detail, "propTypes", { ...marginPropTypes,
|
|
|
129
129
|
* The rendered children of the component.
|
|
130
130
|
*/
|
|
131
131
|
children: _propTypes.default.node
|
|
132
|
-
}
|
|
133
|
-
|
|
132
|
+
};
|
|
134
133
|
var _default = Detail;
|
|
135
134
|
exports.default = _default;
|
|
@@ -146,7 +146,7 @@ let CustomDragLayer = /*#__PURE__*/function (_React$Component) {
|
|
|
146
146
|
return CustomDragLayer;
|
|
147
147
|
}(_react.default.Component);
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
CustomDragLayer.propTypes = {
|
|
150
150
|
/**
|
|
151
151
|
* The dom node being dragged.
|
|
152
152
|
*/
|
|
@@ -162,8 +162,7 @@ _defineProperty(CustomDragLayer, "propTypes", {
|
|
|
162
162
|
isDragging: _propTypes.default.bool.isRequired
|
|
163
163
|
/* eslint-enable react/no-unused-prop-types */
|
|
164
164
|
|
|
165
|
-
}
|
|
166
|
-
|
|
165
|
+
};
|
|
167
166
|
const UndecoratedCustomDragLayer = CustomDragLayer;
|
|
168
167
|
exports.UndecoratedCustomDragLayer = UndecoratedCustomDragLayer;
|
|
169
168
|
|
|
@@ -56,10 +56,6 @@ let DraggableContext = /*#__PURE__*/function (_React$Component) {
|
|
|
56
56
|
|
|
57
57
|
var _super = _createSuper(DraggableContext);
|
|
58
58
|
|
|
59
|
-
/**
|
|
60
|
-
* Defines a context object for child components of the draggable context component.
|
|
61
|
-
* https://facebook.github.io/react/docs/context.html
|
|
62
|
-
*/
|
|
63
59
|
function DraggableContext(_props) {
|
|
64
60
|
var _this;
|
|
65
61
|
|
|
@@ -216,7 +212,7 @@ let DraggableContext = /*#__PURE__*/function (_React$Component) {
|
|
|
216
212
|
return DraggableContext;
|
|
217
213
|
}(_react.default.Component);
|
|
218
214
|
|
|
219
|
-
|
|
215
|
+
DraggableContext.propTypes = {
|
|
220
216
|
/**
|
|
221
217
|
* The element(s) where you want to apply drag
|
|
222
218
|
* and drop functionality
|
|
@@ -238,9 +234,13 @@ _defineProperty(DraggableContext, "propTypes", {
|
|
|
238
234
|
* Prop to enable/disable auto scroll on drag
|
|
239
235
|
*/
|
|
240
236
|
autoScroll: _propTypes.default.bool
|
|
241
|
-
}
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Defines a context object for child components of the draggable context component.
|
|
240
|
+
* https://facebook.github.io/react/docs/context.html
|
|
241
|
+
*/
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
DraggableContext.childContextTypes = {
|
|
244
244
|
dragAndDropActiveIndex: _propTypes.default.number,
|
|
245
245
|
// Tracks the currently dragged index
|
|
246
246
|
dragAndDropBeginDrag: _propTypes.default.func,
|
|
@@ -251,12 +251,11 @@ _defineProperty(DraggableContext, "childContextTypes", {
|
|
|
251
251
|
// Callback for when a hover is triggered
|
|
252
252
|
dragAndDropOnDrag: _propTypes.default.func // Callback for when order is changed
|
|
253
253
|
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
_defineProperty(DraggableContext, "defaultProps", {
|
|
254
|
+
};
|
|
255
|
+
DraggableContext.defaultProps = {
|
|
257
256
|
customDragLayer: /*#__PURE__*/_react.default.createElement(_customDragLayer.default, null),
|
|
258
257
|
autoScroll: false
|
|
259
|
-
}
|
|
258
|
+
};
|
|
260
259
|
|
|
261
260
|
var _default = (0, _reactDndLegacy.DragDropContext)((0, _reactDndTouchBackend.default)({
|
|
262
261
|
enableMouseEvents: true
|
|
@@ -94,7 +94,7 @@ let WithDrag = /*#__PURE__*/function (_React$Component) {
|
|
|
94
94
|
return WithDrag;
|
|
95
95
|
}(_react.default.Component);
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
WithDrag.propTypes = {
|
|
98
98
|
/**
|
|
99
99
|
* The component that will have drag enabled
|
|
100
100
|
*/
|
|
@@ -145,13 +145,11 @@ _defineProperty(WithDrag, "propTypes", {
|
|
|
145
145
|
|
|
146
146
|
/* eslint-enable react/no-unused-prop-types */
|
|
147
147
|
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
_defineProperty(WithDrag, "contextTypes", {
|
|
148
|
+
};
|
|
149
|
+
WithDrag.contextTypes = {
|
|
151
150
|
dragAndDropBeginDrag: _propTypes.default.func,
|
|
152
151
|
dragAndDropEndDrag: _propTypes.default.func
|
|
153
|
-
}
|
|
154
|
-
|
|
152
|
+
};
|
|
155
153
|
const ItemSource = {
|
|
156
154
|
canDrag(props, monitor) {
|
|
157
155
|
return props.canDrag ? props.canDrag(props, monitor) : true;
|
|
@@ -113,7 +113,7 @@ let WithDrop = /*#__PURE__*/function (_React$Component) {
|
|
|
113
113
|
return WithDrop;
|
|
114
114
|
}(_react.default.Component);
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
WithDrop.propTypes = {
|
|
117
117
|
/**
|
|
118
118
|
* The component that will have drop enabled
|
|
119
119
|
*/
|
|
@@ -166,13 +166,11 @@ _defineProperty(WithDrop, "propTypes", {
|
|
|
166
166
|
* @ignore
|
|
167
167
|
*/
|
|
168
168
|
didDrop: _propTypes.default.func
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
_defineProperty(WithDrop, "contextTypes", {
|
|
169
|
+
};
|
|
170
|
+
WithDrop.contextTypes = {
|
|
172
171
|
dragAndDropOnDrag: _propTypes.default.func,
|
|
173
172
|
dragAndDropHover: _propTypes.default.func
|
|
174
|
-
}
|
|
175
|
-
|
|
173
|
+
};
|
|
176
174
|
const ItemTarget = {
|
|
177
175
|
canDrop(props, monitor) {
|
|
178
176
|
return props.canDrop ? props.canDrop(props, monitor) : true;
|
|
@@ -53,7 +53,8 @@ const FlatTableRow = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
53
53
|
moveItem
|
|
54
54
|
}, ref) => {
|
|
55
55
|
const [isExpanded, setIsExpanded] = (0, _react.useState)(expanded);
|
|
56
|
-
|
|
56
|
+
let rowRef = (0, _react.useRef)();
|
|
57
|
+
if (ref) rowRef = ref;
|
|
57
58
|
const firstColumnExpandable = expandableArea === "firstColumn";
|
|
58
59
|
const [stickyCellWidths, setStickyCellWidths] = (0, _react.useState)([]);
|
|
59
60
|
const [leftPositions, setLeftPositions] = (0, _react.useState)([]);
|
|
@@ -41,8 +41,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
41
41
|
|
|
42
42
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
43
|
|
|
44
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
45
|
-
|
|
46
44
|
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
47
45
|
|
|
48
46
|
let Heading = /*#__PURE__*/function (_React$Component) {
|
|
@@ -202,7 +200,7 @@ let Heading = /*#__PURE__*/function (_React$Component) {
|
|
|
202
200
|
return Heading;
|
|
203
201
|
}(_react.default.Component);
|
|
204
202
|
|
|
205
|
-
|
|
203
|
+
Heading.propTypes = { ...marginPropTypes,
|
|
206
204
|
|
|
207
205
|
/**
|
|
208
206
|
* Children elements
|
|
@@ -258,12 +256,10 @@ _defineProperty(Heading, "propTypes", { ...marginPropTypes,
|
|
|
258
256
|
* Pills that will be added after the title.
|
|
259
257
|
*/
|
|
260
258
|
pills: _propTypes.default.node
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
_defineProperty(Heading, "defaultProps", {
|
|
259
|
+
};
|
|
260
|
+
Heading.defaultProps = {
|
|
264
261
|
divider: true,
|
|
265
262
|
separator: false
|
|
266
|
-
}
|
|
267
|
-
|
|
263
|
+
};
|
|
268
264
|
var _default = Heading;
|
|
269
265
|
exports.default = _default;
|
|
@@ -1,101 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
+
import Locale from "../../locales";
|
|
4
|
+
|
|
3
5
|
export interface I18nProviderProps {
|
|
6
|
+
locale: Locale;
|
|
4
7
|
children: React.ReactNode;
|
|
5
|
-
locale: {
|
|
6
|
-
locale: () => string;
|
|
7
|
-
actions: {
|
|
8
|
-
edit: () => string;
|
|
9
|
-
delete: () => string;
|
|
10
|
-
reset: () => string;
|
|
11
|
-
};
|
|
12
|
-
actionPopover: {
|
|
13
|
-
ariaLabel: () => string;
|
|
14
|
-
};
|
|
15
|
-
actionToolbar: {
|
|
16
|
-
selected: () => string;
|
|
17
|
-
};
|
|
18
|
-
batchSelection: {
|
|
19
|
-
selected: (count: number | string) => string;
|
|
20
|
-
};
|
|
21
|
-
confirm: {
|
|
22
|
-
no: () => string;
|
|
23
|
-
yes: () => string;
|
|
24
|
-
};
|
|
25
|
-
date: {
|
|
26
|
-
formats: {
|
|
27
|
-
inputs: () => [string];
|
|
28
|
-
javascript: () => string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
errors: {
|
|
32
|
-
messages: {
|
|
33
|
-
formSummary: (
|
|
34
|
-
errors: number,
|
|
35
|
-
warnings: number,
|
|
36
|
-
type: string
|
|
37
|
-
) => [string, string];
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
message: {
|
|
41
|
-
closeButtonAriaLabel: () => string;
|
|
42
|
-
};
|
|
43
|
-
numeralDate: {
|
|
44
|
-
validation: {
|
|
45
|
-
day: () => string;
|
|
46
|
-
month: () => string;
|
|
47
|
-
year: () => string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
pager: {
|
|
51
|
-
show: () => string;
|
|
52
|
-
records: (count: number | string, showNumber: boolean) => string;
|
|
53
|
-
first: () => string;
|
|
54
|
-
last: () => string;
|
|
55
|
-
next: () => string;
|
|
56
|
-
previous: () => string;
|
|
57
|
-
pageX: () => string;
|
|
58
|
-
ofY: (count: string | number) => string;
|
|
59
|
-
};
|
|
60
|
-
select: {
|
|
61
|
-
actionButtonText: () => string;
|
|
62
|
-
placeholder: () => string;
|
|
63
|
-
noResultsForTerm: (term: string) => string;
|
|
64
|
-
};
|
|
65
|
-
switch: {
|
|
66
|
-
on: () => string;
|
|
67
|
-
off: () => string;
|
|
68
|
-
};
|
|
69
|
-
table: {
|
|
70
|
-
noData: () => string;
|
|
71
|
-
};
|
|
72
|
-
textEditor: {
|
|
73
|
-
tooltipMessages: {
|
|
74
|
-
bold: () => string;
|
|
75
|
-
italic: () => string;
|
|
76
|
-
bulletList: () => string;
|
|
77
|
-
numberList: () => string;
|
|
78
|
-
};
|
|
79
|
-
ariaLabels: {
|
|
80
|
-
bold: () => string;
|
|
81
|
-
italic: () => string;
|
|
82
|
-
bulletList: () => string;
|
|
83
|
-
numberList: () => string;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
titleSelect: {
|
|
87
|
-
deselect: () => string;
|
|
88
|
-
};
|
|
89
|
-
wizards: {
|
|
90
|
-
multiStep: {
|
|
91
|
-
buttons: {
|
|
92
|
-
submit: () => string;
|
|
93
|
-
next: () => string;
|
|
94
|
-
back: () => string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
8
|
}
|
|
100
9
|
|
|
101
10
|
declare const I18nProvider: React.FunctionComponent<I18nProviderProps>;
|
|
@@ -113,11 +113,12 @@ const Icon = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
113
113
|
"data-element": iconType()
|
|
114
114
|
}, (0, _tags.default)("icon", rest), styleProps));
|
|
115
115
|
|
|
116
|
+
const {
|
|
117
|
+
tooltipPosition: tooltipPositionFromContext
|
|
118
|
+
} = (0, _react.useContext)(_tooltipProvider.TooltipContext);
|
|
119
|
+
|
|
116
120
|
if (tooltipMessage) {
|
|
117
121
|
const visible = disabled ? false : tooltipVisible;
|
|
118
|
-
const {
|
|
119
|
-
tooltipPosition: tooltipPositionFromContext
|
|
120
|
-
} = (0, _react.useContext)(_tooltipProvider.TooltipContext);
|
|
121
122
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
122
123
|
message: tooltipMessage,
|
|
123
124
|
position: tooltipPositionFromContext || tooltipPosition,
|
|
@@ -35,8 +35,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
35
35
|
|
|
36
36
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
37
|
|
|
38
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
|
-
|
|
40
38
|
let deprecatedWarnTriggered = false;
|
|
41
39
|
|
|
42
40
|
let MountInApp = /*#__PURE__*/function (_React$Component) {
|
|
@@ -92,7 +90,7 @@ let MountInApp = /*#__PURE__*/function (_React$Component) {
|
|
|
92
90
|
return MountInApp;
|
|
93
91
|
}(_react.default.Component);
|
|
94
92
|
|
|
95
|
-
|
|
93
|
+
MountInApp.propTypes = {
|
|
96
94
|
/**
|
|
97
95
|
* Children elements
|
|
98
96
|
*/
|
|
@@ -102,7 +100,6 @@ _defineProperty(MountInApp, "propTypes", {
|
|
|
102
100
|
* ID of the element in which the children components will be rendered.
|
|
103
101
|
*/
|
|
104
102
|
targetId: _propTypes.default.string
|
|
105
|
-
}
|
|
106
|
-
|
|
103
|
+
};
|
|
107
104
|
var _default = MountInApp;
|
|
108
105
|
exports.default = _default;
|
|
@@ -169,17 +169,17 @@ let MultiStepWizard = /*#__PURE__*/function (_React$Component) {
|
|
|
169
169
|
|
|
170
170
|
return _this;
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Returns wizard object to child components.
|
|
174
|
+
*
|
|
175
|
+
* @method getChildContext
|
|
176
|
+
* @return {void}
|
|
177
|
+
*/
|
|
178
|
+
|
|
172
179
|
|
|
173
180
|
_createClass(MultiStepWizard, [{
|
|
174
181
|
key: "getChildContext",
|
|
175
|
-
value:
|
|
176
|
-
/**
|
|
177
|
-
* Returns wizard object to child components.
|
|
178
|
-
*
|
|
179
|
-
* @method getChildContext
|
|
180
|
-
* @return {void}
|
|
181
|
-
*/
|
|
182
|
-
function getChildContext() {
|
|
182
|
+
value: function getChildContext() {
|
|
183
183
|
return {
|
|
184
184
|
wizard: {
|
|
185
185
|
nextHandler: this.props.onNext,
|
|
@@ -299,7 +299,7 @@ let MultiStepWizard = /*#__PURE__*/function (_React$Component) {
|
|
|
299
299
|
return MultiStepWizard;
|
|
300
300
|
}(_react.default.Component);
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
MultiStepWizard.propTypes = {
|
|
303
303
|
/**
|
|
304
304
|
* Individual steps
|
|
305
305
|
*
|
|
@@ -374,9 +374,8 @@ _defineProperty(MultiStepWizard, "propTypes", {
|
|
|
374
374
|
*/
|
|
375
375
|
completed: _propTypes.default.bool // eslint-disable-line react/no-unused-prop-types
|
|
376
376
|
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
_defineProperty(MultiStepWizard, "defaultProps", {
|
|
377
|
+
};
|
|
378
|
+
MultiStepWizard.defaultProps = {
|
|
380
379
|
beforeSubmitValidation: null,
|
|
381
380
|
className: "",
|
|
382
381
|
completed: false,
|
|
@@ -384,9 +383,8 @@ _defineProperty(MultiStepWizard, "defaultProps", {
|
|
|
384
383
|
enableInactiveSteps: false,
|
|
385
384
|
onNext: null,
|
|
386
385
|
onBack: null
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
_defineProperty(MultiStepWizard, "childContextTypes", {
|
|
386
|
+
};
|
|
387
|
+
MultiStepWizard.childContextTypes = {
|
|
390
388
|
/**
|
|
391
389
|
* Defines a context object for child components of this wizard.
|
|
392
390
|
*
|
|
@@ -394,7 +392,6 @@ _defineProperty(MultiStepWizard, "childContextTypes", {
|
|
|
394
392
|
* @type {Object}
|
|
395
393
|
*/
|
|
396
394
|
wizard: _propTypes.default.object
|
|
397
|
-
}
|
|
398
|
-
|
|
395
|
+
};
|
|
399
396
|
var _default = MultiStepWizard;
|
|
400
397
|
exports.default = _default;
|
|
@@ -337,7 +337,7 @@ let Step = /*#__PURE__*/function (_React$Component) {
|
|
|
337
337
|
return Step;
|
|
338
338
|
}(_react.default.Component);
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
Step.propTypes = {
|
|
341
341
|
/**
|
|
342
342
|
* Step number
|
|
343
343
|
*
|
|
@@ -404,9 +404,8 @@ _defineProperty(Step, "propTypes", {
|
|
|
404
404
|
* @type {Node}
|
|
405
405
|
*/
|
|
406
406
|
children: _propTypes.default.node
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
_defineProperty(Step, "defaultProps", {
|
|
407
|
+
};
|
|
408
|
+
Step.defaultProps = {
|
|
410
409
|
children: null,
|
|
411
410
|
className: "",
|
|
412
411
|
defaultButton: true,
|
|
@@ -414,11 +413,9 @@ _defineProperty(Step, "defaultProps", {
|
|
|
414
413
|
extraButtons: [],
|
|
415
414
|
onBack: null,
|
|
416
415
|
onNext: null
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
_defineProperty(Step, "contextTypes", {
|
|
416
|
+
};
|
|
417
|
+
Step.contextTypes = {
|
|
420
418
|
wizard: _propTypes.default.object
|
|
421
|
-
}
|
|
422
|
-
|
|
419
|
+
};
|
|
423
420
|
var _default = Step;
|
|
424
421
|
exports.default = _default;
|