@dnb/eufemia 9.47.1 → 9.47.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.
- package/CHANGELOG.md +16 -0
- package/cjs/components/accordion/AccordionProvider.js +1 -3
- package/cjs/components/autocomplete/Autocomplete.js +4 -1
- package/cjs/components/button/Button.d.ts +6 -1
- package/cjs/components/button/Button.js +2 -0
- package/cjs/components/dropdown/Dropdown.d.ts +2 -2
- package/cjs/components/help-button/HelpButtonInstance.js +1 -3
- package/cjs/components/icon/Icon.js +1 -3
- package/cjs/components/icon-primary/IconPrimary.js +1 -3
- package/cjs/components/logo/Logo.js +1 -3
- package/cjs/components/modal/Modal.js +1 -3
- package/cjs/components/pagination/Pagination.js +1 -3
- package/cjs/components/progress-indicator/ProgressIndicator.js +1 -3
- package/cjs/components/step-indicator/StepIndicatorContext.js +1 -3
- package/cjs/elements/Element.js +1 -3
- package/cjs/fragments/drawer-list/DrawerList.js +1 -3
- package/cjs/shared/Eufemia.js +1 -1
- package/components/accordion/AccordionProvider.js +1 -2
- package/components/autocomplete/Autocomplete.js +4 -1
- package/components/button/Button.d.ts +6 -1
- package/components/button/Button.js +2 -0
- package/components/dropdown/Dropdown.d.ts +2 -2
- package/components/help-button/HelpButtonInstance.js +1 -2
- package/components/icon/Icon.js +1 -2
- package/components/icon-primary/IconPrimary.js +1 -2
- package/components/logo/Logo.js +1 -2
- package/components/modal/Modal.js +1 -2
- package/components/pagination/Pagination.js +1 -2
- package/components/progress-indicator/ProgressIndicator.js +1 -2
- package/components/step-indicator/StepIndicatorContext.js +1 -2
- package/elements/Element.js +1 -2
- package/es/components/accordion/AccordionProvider.js +1 -2
- package/es/components/autocomplete/Autocomplete.js +4 -1
- package/es/components/button/Button.d.ts +6 -1
- package/es/components/button/Button.js +2 -0
- package/es/components/dropdown/Dropdown.d.ts +2 -2
- package/es/components/help-button/HelpButtonInstance.js +1 -2
- package/es/components/icon/Icon.js +1 -2
- package/es/components/icon-primary/IconPrimary.js +1 -2
- package/es/components/logo/Logo.js +1 -2
- package/es/components/modal/Modal.js +1 -2
- package/es/components/pagination/Pagination.js +1 -2
- package/es/components/progress-indicator/ProgressIndicator.js +1 -2
- package/es/components/step-indicator/StepIndicatorContext.js +1 -2
- package/es/elements/Element.js +1 -2
- package/es/fragments/drawer-list/DrawerList.js +1 -2
- package/es/shared/Eufemia.js +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +2 -2
- package/esm/dnb-ui-extensions.min.mjs +1 -1
- package/esm/dnb-ui-lib.min.mjs +2 -2
- package/esm/dnb-ui-web-components.min.mjs +2 -2
- package/fragments/drawer-list/DrawerList.js +1 -2
- package/package.json +1 -1
- package/shared/Eufemia.js +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +2 -2
- package/umd/dnb-ui-extensions.min.js +1 -1
- package/umd/dnb-ui-lib.min.js +2 -2
- package/umd/dnb-ui-web-components.min.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to @dnb/eufemia will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.47.3](https://github.com/dnbexperience/eufemia/compare/v9.47.2...v9.47.3) (2023-03-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **Button:** support for FormRow and FormSet ([#2147](https://github.com/dnbexperience/eufemia/issues/2147)) ([59f0a22](https://github.com/dnbexperience/eufemia/commit/59f0a2244021b7ebd78192f7b5e2d657bd3021aa))
|
|
12
|
+
|
|
13
|
+
## [9.47.2](https://github.com/dnbexperience/eufemia/compare/v9.47.1...v9.47.2) (2023-03-16)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **Autocomplete:** pass status props to SubmitButton ([#2004](https://github.com/dnbexperience/eufemia/issues/2004)) ([fb89114](https://github.com/dnbexperience/eufemia/commit/fb89114e75ff4111640bc367a10d6faa339c4fe3))
|
|
19
|
+
* **Button:** support rel property ([#1990](https://github.com/dnbexperience/eufemia/issues/1990)) ([ad029f2](https://github.com/dnbexperience/eufemia/commit/ad029f20f21154df40975a82b9b4f7019e373ebf))
|
|
20
|
+
* remove FormRow context support from components not using FormRow ([#2103](https://github.com/dnbexperience/eufemia/issues/2103)) ([3a39134](https://github.com/dnbexperience/eufemia/commit/3a39134c883e70daf6ef374c85ea8ddbce317776))
|
|
21
|
+
|
|
6
22
|
## [9.47.1](https://github.com/dnbexperience/eufemia/compare/v9.47.0...v9.47.1) (2023-02-13)
|
|
7
23
|
|
|
8
24
|
|
|
@@ -51,8 +51,6 @@ var _SpacingHelper = require("../space/SpacingHelper");
|
|
|
51
51
|
|
|
52
52
|
var _AccordionPropTypes = require("./AccordionPropTypes");
|
|
53
53
|
|
|
54
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
55
|
-
|
|
56
54
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
57
55
|
|
|
58
56
|
var _AccordionProviderContext = _interopRequireDefault(require("./AccordionProviderContext"));
|
|
@@ -123,7 +121,7 @@ var AccordionGroup = function (_React$PureComponent) {
|
|
|
123
121
|
_createClass(AccordionGroup, [{
|
|
124
122
|
key: "render",
|
|
125
123
|
value: function render() {
|
|
126
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, AccordionGroup.defaultProps,
|
|
124
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, AccordionGroup.defaultProps, this.context.Accordion, this.context.getTranslation(this.props).Accordion);
|
|
127
125
|
|
|
128
126
|
var expanded = props.expanded,
|
|
129
127
|
expanded_id = props.expanded_id,
|
|
@@ -1731,7 +1731,10 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1731
1731
|
icon_size: icon_size || (size === 'large' ? 'medium' : 'default'),
|
|
1732
1732
|
variant: "secondary",
|
|
1733
1733
|
size: size === 'default' ? 'medium' : size,
|
|
1734
|
-
type: "button"
|
|
1734
|
+
type: "button",
|
|
1735
|
+
status: status,
|
|
1736
|
+
status_state: status_state,
|
|
1737
|
+
status_props: status_props
|
|
1735
1738
|
}, triggerParams));
|
|
1736
1739
|
}
|
|
1737
1740
|
|
|
@@ -150,10 +150,15 @@ export type ButtonProps = {
|
|
|
150
150
|
href?: string;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* When button behaves as a link. Used to
|
|
153
|
+
* When button behaves as a link. Used to specify where to open the linked document, specified by `href`. Possible values are `_self`, `_blank`, `_parent` and `_top`.
|
|
154
154
|
*/
|
|
155
155
|
target?: string;
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
* When button behaves as a link. Used to specify the relationship between a linked resource and the current document. Examples(non-exhaustive list) of values are `nofollow`, `search`, and `tag`.
|
|
159
|
+
*/
|
|
160
|
+
rel?: string;
|
|
161
|
+
|
|
157
162
|
/**
|
|
158
163
|
* Use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url.
|
|
159
164
|
*/
|
|
@@ -325,6 +325,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes = _objectSpread(_object
|
|
|
325
325
|
class: _propTypes.default.string,
|
|
326
326
|
href: _propTypes.default.string,
|
|
327
327
|
target: _propTypes.default.string,
|
|
328
|
+
rel: _propTypes.default.string,
|
|
328
329
|
to: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.object, _propTypes.default.func]),
|
|
329
330
|
custom_content: _propTypes.default.node,
|
|
330
331
|
wrap: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
|
|
@@ -353,6 +354,7 @@ Button.defaultProps = {
|
|
|
353
354
|
icon_size: null,
|
|
354
355
|
href: null,
|
|
355
356
|
target: null,
|
|
357
|
+
rel: null,
|
|
356
358
|
to: null,
|
|
357
359
|
id: null,
|
|
358
360
|
class: null,
|
|
@@ -433,12 +433,12 @@ export interface DropdownProps extends React.HTMLProps<HTMLElement> {
|
|
|
433
433
|
on_hide?: (...args: any[]) => any;
|
|
434
434
|
|
|
435
435
|
/**
|
|
436
|
-
* Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes,
|
|
436
|
+
* Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }`.
|
|
437
437
|
*/
|
|
438
438
|
on_change?: (...args: any[]) => any;
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
|
-
* Will be called once the user selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes,
|
|
441
|
+
* Will be called once the user selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }`. The "active_item" property is the currently selected item by keyboard navigation
|
|
442
442
|
*/
|
|
443
443
|
on_select?: (...args: any[]) => any;
|
|
444
444
|
on_state_update?: (...args: any[]) => any;
|
|
@@ -33,8 +33,6 @@ var _componentHelper = require("../../shared/component-helper");
|
|
|
33
33
|
|
|
34
34
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
35
35
|
|
|
36
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
37
|
-
|
|
38
36
|
var _SpacingHelper = require("../space/SpacingHelper");
|
|
39
37
|
|
|
40
38
|
var _Button = _interopRequireDefault(require("../button/Button"));
|
|
@@ -63,7 +61,7 @@ var defaultProps = {
|
|
|
63
61
|
function HelpButtonInstance(localProps) {
|
|
64
62
|
var context = _react.default.useContext(_Context.default);
|
|
65
63
|
|
|
66
|
-
var props = (0, _componentHelper.extendPropsWithContext)(localProps, defaultProps,
|
|
64
|
+
var props = (0, _componentHelper.extendPropsWithContext)(localProps, defaultProps, context.HelpButton);
|
|
67
65
|
|
|
68
66
|
var size = props.size,
|
|
69
67
|
icon = props.icon,
|
|
@@ -79,8 +79,6 @@ var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
|
79
79
|
|
|
80
80
|
var _IconHelpers = require("./IconHelpers");
|
|
81
81
|
|
|
82
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
83
|
-
|
|
84
82
|
var _excluded = ["sizeAsString"],
|
|
85
83
|
_excluded2 = ["icon", "size", "width", "height", "border", "color", "inherit_color", "modifier", "alt", "title", "skeleton", "class", "className"];
|
|
86
84
|
|
|
@@ -178,7 +176,7 @@ var Icon = function (_React$PureComponent) {
|
|
|
178
176
|
|
|
179
177
|
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, Icon.defaultProps, {
|
|
180
178
|
skeleton: (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.skeleton
|
|
181
|
-
},
|
|
179
|
+
}, this.context.Icon);
|
|
182
180
|
|
|
183
181
|
var _prepareIcon = prepareIcon(props, this.context),
|
|
184
182
|
icon = _prepareIcon.icon,
|
|
@@ -49,8 +49,6 @@ var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
|
49
49
|
|
|
50
50
|
var _componentHelper = require("../../shared/component-helper");
|
|
51
51
|
|
|
52
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
53
|
-
|
|
54
52
|
var _Icon = _interopRequireWildcard(require("../icon/Icon"));
|
|
55
53
|
|
|
56
54
|
var primary_icons = _interopRequireWildcard(require("../../icons/primary_icons.js"));
|
|
@@ -109,7 +107,7 @@ var IconPrimary = function (_React$PureComponent) {
|
|
|
109
107
|
|
|
110
108
|
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, IconPrimary.defaultProps, {
|
|
111
109
|
skeleton: (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.skeleton
|
|
112
|
-
},
|
|
110
|
+
}, this.context.Icon, this.context.IconPrimary);
|
|
113
111
|
|
|
114
112
|
var _prepareIcon = (0, _Icon.prepareIcon)(props, this.context),
|
|
115
113
|
icon = _prepareIcon.icon,
|
|
@@ -49,8 +49,6 @@ var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
|
49
49
|
|
|
50
50
|
var _componentHelper = require("../../shared/component-helper");
|
|
51
51
|
|
|
52
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
53
|
-
|
|
54
52
|
var _SpacingHelper = require("../space/SpacingHelper");
|
|
55
53
|
|
|
56
54
|
var _title, _path, _path2, _path3;
|
|
@@ -105,7 +103,7 @@ var Logo = function (_React$PureComponent) {
|
|
|
105
103
|
value: function render() {
|
|
106
104
|
var _objectSpread2;
|
|
107
105
|
|
|
108
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, Logo.defaultProps, this.context.getTranslation(this.props).Logo,
|
|
106
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, Logo.defaultProps, this.context.getTranslation(this.props).Logo, this.context.Logo);
|
|
109
107
|
|
|
110
108
|
var ratio = props.ratio,
|
|
111
109
|
size = props.size,
|
|
@@ -78,8 +78,6 @@ var _ModalRoot = _interopRequireDefault(require("./ModalRoot"));
|
|
|
78
78
|
|
|
79
79
|
var _withCamelCaseProps = require("../../shared/helpers/withCamelCaseProps");
|
|
80
80
|
|
|
81
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
82
|
-
|
|
83
81
|
var _excluded = ["root_id", "content_id", "disabled", "labelled_by", "focus_selector", "header_content", "bar_content", "bypass_invalidation_selectors", "id", "open_state", "open_delay", "omit_trigger_button", "trigger", "trigger_attributes", "trigger_hidden", "trigger_disabled", "trigger_variant", "trigger_text", "trigger_title", "trigger_size", "trigger_icon", "trigger_icon_position", "trigger_class"];
|
|
84
82
|
|
|
85
83
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -385,7 +383,7 @@ var Modal = function (_React$PureComponent) {
|
|
|
385
383
|
value: function render() {
|
|
386
384
|
var _this2 = this;
|
|
387
385
|
|
|
388
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, Modal.defaultProps, this.context.getTranslation(this.props).Modal,
|
|
386
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, Modal.defaultProps, this.context.getTranslation(this.props).Modal, this.context.Modal);
|
|
389
387
|
|
|
390
388
|
var _props$root_id = props.root_id,
|
|
391
389
|
root_id = _props$root_id === void 0 ? 'root' : _props$root_id,
|
|
@@ -53,8 +53,6 @@ var _PaginationProvider = _interopRequireDefault(require("./PaginationProvider")
|
|
|
53
53
|
|
|
54
54
|
var _componentHelper = require("../../shared/component-helper");
|
|
55
55
|
|
|
56
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
57
|
-
|
|
58
56
|
var _SpacingHelper = require("../space/SpacingHelper");
|
|
59
57
|
|
|
60
58
|
var _PaginationHelpers = require("./PaginationHelpers");
|
|
@@ -232,7 +230,7 @@ var PaginationInstance = function (_React$PureComponent2) {
|
|
|
232
230
|
_createClass(PaginationInstance, [{
|
|
233
231
|
key: "render",
|
|
234
232
|
value: function render() {
|
|
235
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, paginationDefaultProps, this.context.getTranslation(this.props).Pagination,
|
|
233
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, paginationDefaultProps, this.context.getTranslation(this.props).Pagination, this.context.Pagination);
|
|
236
234
|
|
|
237
235
|
var align = props.align,
|
|
238
236
|
children = props.children,
|
|
@@ -53,8 +53,6 @@ var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
|
53
53
|
|
|
54
54
|
var _componentHelper = require("../../shared/component-helper");
|
|
55
55
|
|
|
56
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
57
|
-
|
|
58
56
|
var _SpacingHelper = require("../space/SpacingHelper");
|
|
59
57
|
|
|
60
58
|
var _ProgressIndicatorCircular = _interopRequireDefault(require("./ProgressIndicatorCircular"));
|
|
@@ -145,7 +143,7 @@ var ProgressIndicator = function (_React$PureComponent) {
|
|
|
145
143
|
}, {
|
|
146
144
|
key: "render",
|
|
147
145
|
value: function render() {
|
|
148
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, ProgressIndicator.defaultProps, this.context.getTranslation(this.props).ProgressIndicator,
|
|
146
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, ProgressIndicator.defaultProps, this.context.getTranslation(this.props).ProgressIndicator, this.context.ProgressIndicator);
|
|
149
147
|
|
|
150
148
|
var type = props.type,
|
|
151
149
|
size = props.size,
|
|
@@ -71,8 +71,6 @@ var _componentHelper = require("../../shared/component-helper");
|
|
|
71
71
|
|
|
72
72
|
var _MediaQueryUtils = require("../../shared/MediaQueryUtils");
|
|
73
73
|
|
|
74
|
-
var _FormRowHelpers = require("../form-row/FormRowHelpers");
|
|
75
|
-
|
|
76
74
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
77
75
|
|
|
78
76
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -219,7 +217,7 @@ var StepIndicatorProvider = function (_React$PureComponent) {
|
|
|
219
217
|
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.context;
|
|
220
218
|
var data = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, _StepIndicatorProps.stepIndicatorDefaultProps, {
|
|
221
219
|
skeleton: context === null || context === void 0 ? void 0 : context.skeleton
|
|
222
|
-
}, context.getTranslation(context).StepIndicator,
|
|
220
|
+
}, context.getTranslation(context).StepIndicator, context.StepIndicator);
|
|
223
221
|
return data;
|
|
224
222
|
}
|
|
225
223
|
}, {
|
package/cjs/elements/Element.js
CHANGED
|
@@ -31,8 +31,6 @@ var _SpacingHelper = require("../components/space/SpacingHelper");
|
|
|
31
31
|
|
|
32
32
|
var _SkeletonHelper = require("../components/skeleton/SkeletonHelper");
|
|
33
33
|
|
|
34
|
-
var _FormRowHelpers = require("../components/form-row/FormRowHelpers");
|
|
35
|
-
|
|
36
34
|
var _excluded = ["className", "class", "internalClass", "css", "as", "is", "innerRef", "skeleton", "skeletonMethod"];
|
|
37
35
|
|
|
38
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -59,7 +57,7 @@ function ElementInstance(localProps) {
|
|
|
59
57
|
|
|
60
58
|
var props = (0, _componentHelper.extendPropsWithContext)(localProps, defaultProps, {
|
|
61
59
|
skeleton: context === null || context === void 0 ? void 0 : context.skeleton
|
|
62
|
-
}
|
|
60
|
+
});
|
|
63
61
|
|
|
64
62
|
if (typeof props.inner_ref !== 'undefined') {
|
|
65
63
|
props.innerRef = props.inner_ref;
|
|
@@ -70,8 +70,6 @@ var _componentHelper = require("../../shared/component-helper");
|
|
|
70
70
|
|
|
71
71
|
var _SpacingHelper = require("../../components/space/SpacingHelper");
|
|
72
72
|
|
|
73
|
-
var _FormRowHelpers = require("../../components/form-row/FormRowHelpers");
|
|
74
|
-
|
|
75
73
|
var _DrawerListContext = _interopRequireDefault(require("./DrawerListContext"));
|
|
76
74
|
|
|
77
75
|
var _DrawerListProvider = _interopRequireDefault(require("./DrawerListProvider"));
|
|
@@ -265,7 +263,7 @@ var DrawerListInstance = function (_React$PureComponent2) {
|
|
|
265
263
|
value: function render() {
|
|
266
264
|
var _this3 = this;
|
|
267
265
|
|
|
268
|
-
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, DrawerList.defaultProps, this.context.getTranslation(this.props).DrawerList
|
|
266
|
+
var props = (0, _componentHelper.extendPropsWithContextInClassComponent)(this.props, DrawerList.defaultProps, this.context.getTranslation(this.props).DrawerList);
|
|
269
267
|
|
|
270
268
|
var role = props.role,
|
|
271
269
|
align_drawer = props.align_drawer,
|
package/cjs/shared/Eufemia.js
CHANGED
|
@@ -31,7 +31,6 @@ import classnames from 'classnames';
|
|
|
31
31
|
import { isTrue, makeUniqueId, extendPropsWithContextInClassComponent, registerElement, validateDOMAttributes, dispatchCustomElementEvent } from '../../shared/component-helper';
|
|
32
32
|
import { createSpacingClasses } from '../space/SpacingHelper';
|
|
33
33
|
import { accordionPropTypes, accordionDefaultProps } from './AccordionPropTypes';
|
|
34
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
35
34
|
import Context from '../../shared/Context';
|
|
36
35
|
import AccordionGroupContext from './AccordionProviderContext';
|
|
37
36
|
|
|
@@ -65,7 +64,7 @@ var AccordionGroup = function (_React$PureComponent) {
|
|
|
65
64
|
_createClass(AccordionGroup, [{
|
|
66
65
|
key: "render",
|
|
67
66
|
value: function render() {
|
|
68
|
-
var props = extendPropsWithContextInClassComponent(this.props, AccordionGroup.defaultProps,
|
|
67
|
+
var props = extendPropsWithContextInClassComponent(this.props, AccordionGroup.defaultProps, this.context.Accordion, this.context.getTranslation(this.props).Accordion);
|
|
69
68
|
|
|
70
69
|
var expanded = props.expanded,
|
|
71
70
|
expanded_id = props.expanded_id,
|
|
@@ -1647,7 +1647,10 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1647
1647
|
icon_size: icon_size || (size === 'large' ? 'medium' : 'default'),
|
|
1648
1648
|
variant: "secondary",
|
|
1649
1649
|
size: size === 'default' ? 'medium' : size,
|
|
1650
|
-
type: "button"
|
|
1650
|
+
type: "button",
|
|
1651
|
+
status: status,
|
|
1652
|
+
status_state: status_state,
|
|
1653
|
+
status_props: status_props
|
|
1651
1654
|
}, triggerParams));
|
|
1652
1655
|
}
|
|
1653
1656
|
|
|
@@ -150,10 +150,15 @@ export type ButtonProps = {
|
|
|
150
150
|
href?: string;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* When button behaves as a link. Used to
|
|
153
|
+
* When button behaves as a link. Used to specify where to open the linked document, specified by `href`. Possible values are `_self`, `_blank`, `_parent` and `_top`.
|
|
154
154
|
*/
|
|
155
155
|
target?: string;
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
* When button behaves as a link. Used to specify the relationship between a linked resource and the current document. Examples(non-exhaustive list) of values are `nofollow`, `search`, and `tag`.
|
|
159
|
+
*/
|
|
160
|
+
rel?: string;
|
|
161
|
+
|
|
157
162
|
/**
|
|
158
163
|
* Use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url.
|
|
159
164
|
*/
|
|
@@ -260,6 +260,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes = _objectSpread(_object
|
|
|
260
260
|
class: PropTypes.string,
|
|
261
261
|
href: PropTypes.string,
|
|
262
262
|
target: PropTypes.string,
|
|
263
|
+
rel: PropTypes.string,
|
|
263
264
|
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]),
|
|
264
265
|
custom_content: PropTypes.node,
|
|
265
266
|
wrap: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
@@ -288,6 +289,7 @@ Button.defaultProps = {
|
|
|
288
289
|
icon_size: null,
|
|
289
290
|
href: null,
|
|
290
291
|
target: null,
|
|
292
|
+
rel: null,
|
|
291
293
|
to: null,
|
|
292
294
|
id: null,
|
|
293
295
|
class: null,
|
|
@@ -433,12 +433,12 @@ export interface DropdownProps extends React.HTMLProps<HTMLElement> {
|
|
|
433
433
|
on_hide?: (...args: any[]) => any;
|
|
434
434
|
|
|
435
435
|
/**
|
|
436
|
-
* Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes,
|
|
436
|
+
* Will be called on state changes made by the user. Returns an object with the new selected `data` item `{ data, event, attributes, value }`.
|
|
437
437
|
*/
|
|
438
438
|
on_change?: (...args: any[]) => any;
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
|
-
* Will be called once the user selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes,
|
|
441
|
+
* Will be called once the user selects an item by a click or keyboard navigation. Returns an object with the new selected `data` item `{ data, event, attributes, value, active_item }`. The "active_item" property is the currently selected item by keyboard navigation
|
|
442
442
|
*/
|
|
443
443
|
on_select?: (...args: any[]) => any;
|
|
444
444
|
on_state_update?: (...args: any[]) => any;
|
|
@@ -19,7 +19,6 @@ import React from 'react';
|
|
|
19
19
|
import classnames from 'classnames';
|
|
20
20
|
import { convertJsxToString, extendPropsWithContext } from '../../shared/component-helper';
|
|
21
21
|
import Context from '../../shared/Context';
|
|
22
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
23
22
|
import { createSpacingClasses } from '../space/SpacingHelper';
|
|
24
23
|
import Button from '../button/Button';
|
|
25
24
|
var defaultProps = {
|
|
@@ -28,7 +27,7 @@ var defaultProps = {
|
|
|
28
27
|
};
|
|
29
28
|
export default function HelpButtonInstance(localProps) {
|
|
30
29
|
var context = React.useContext(Context);
|
|
31
|
-
var props = extendPropsWithContext(localProps, defaultProps,
|
|
30
|
+
var props = extendPropsWithContext(localProps, defaultProps, context.HelpButton);
|
|
32
31
|
|
|
33
32
|
var size = props.size,
|
|
34
33
|
icon = props.icon,
|
package/components/icon/Icon.js
CHANGED
|
@@ -44,7 +44,6 @@ import { spacingPropTypes, createSpacingClasses } from '../space/SpacingHelper';
|
|
|
44
44
|
import { createSkeletonClass } from '../skeleton/SkeletonHelper';
|
|
45
45
|
import Context from '../../shared/Context';
|
|
46
46
|
import { iconCase } from './IconHelpers';
|
|
47
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
48
47
|
export var DefaultIconSize = 16;
|
|
49
48
|
export var DefaultIconSizes = {
|
|
50
49
|
default: 16,
|
|
@@ -88,7 +87,7 @@ var Icon = function (_React$PureComponent) {
|
|
|
88
87
|
|
|
89
88
|
var props = extendPropsWithContextInClassComponent(this.props, Icon.defaultProps, {
|
|
90
89
|
skeleton: (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.skeleton
|
|
91
|
-
},
|
|
90
|
+
}, this.context.Icon);
|
|
92
91
|
|
|
93
92
|
var _prepareIcon = prepareIcon(props, this.context),
|
|
94
93
|
icon = _prepareIcon.icon,
|
|
@@ -24,7 +24,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
24
24
|
import React from 'react';
|
|
25
25
|
import Context from '../../shared/Context';
|
|
26
26
|
import { extendPropsWithContextInClassComponent } from '../../shared/component-helper';
|
|
27
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
28
27
|
import DefaultIcon, { iconPropTypes, DefaultIconSize, prerenderIcon, prepareIcon } from '../icon/Icon';
|
|
29
28
|
import * as primary_icons from '../../icons/primary_icons.js';
|
|
30
29
|
import * as primary_icons_medium from '../../icons/primary_icons_medium.js';
|
|
@@ -51,7 +50,7 @@ var IconPrimary = function (_React$PureComponent) {
|
|
|
51
50
|
|
|
52
51
|
var props = extendPropsWithContextInClassComponent(this.props, IconPrimary.defaultProps, {
|
|
53
52
|
skeleton: (_this$context = this.context) === null || _this$context === void 0 ? void 0 : _this$context.skeleton
|
|
54
|
-
},
|
|
53
|
+
}, this.context.Icon, this.context.IconPrimary);
|
|
55
54
|
|
|
56
55
|
var _prepareIcon = prepareIcon(props, this.context),
|
|
57
56
|
icon = _prepareIcon.icon,
|
package/components/logo/Logo.js
CHANGED
|
@@ -33,7 +33,6 @@ import PropTypes from 'prop-types';
|
|
|
33
33
|
import classnames from 'classnames';
|
|
34
34
|
import Context from '../../shared/Context';
|
|
35
35
|
import { validateDOMAttributes, registerElement, extendPropsWithContextInClassComponent } from '../../shared/component-helper';
|
|
36
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
37
36
|
import { spacingPropTypes, createSpacingClasses } from '../space/SpacingHelper';
|
|
38
37
|
|
|
39
38
|
var Logo = function (_React$PureComponent) {
|
|
@@ -52,7 +51,7 @@ var Logo = function (_React$PureComponent) {
|
|
|
52
51
|
value: function render() {
|
|
53
52
|
var _objectSpread2;
|
|
54
53
|
|
|
55
|
-
var props = extendPropsWithContextInClassComponent(this.props, Logo.defaultProps, this.context.getTranslation(this.props).Logo,
|
|
54
|
+
var props = extendPropsWithContextInClassComponent(this.props, Logo.defaultProps, this.context.getTranslation(this.props).Logo, this.context.Logo);
|
|
56
55
|
|
|
57
56
|
var ratio = props.ratio,
|
|
58
57
|
size = props.size,
|
|
@@ -42,7 +42,6 @@ import ModalHeaderBar from './parts/ModalHeaderBar';
|
|
|
42
42
|
import CloseButton from './parts/CloseButton';
|
|
43
43
|
import ModalRoot from './ModalRoot';
|
|
44
44
|
import { classWithCamelCaseProps } from '../../shared/helpers/withCamelCaseProps';
|
|
45
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
46
45
|
export var ANIMATION_DURATION = 300;
|
|
47
46
|
|
|
48
47
|
var Modal = function (_React$PureComponent) {
|
|
@@ -311,7 +310,7 @@ var Modal = function (_React$PureComponent) {
|
|
|
311
310
|
value: function render() {
|
|
312
311
|
var _this2 = this;
|
|
313
312
|
|
|
314
|
-
var props = extendPropsWithContextInClassComponent(this.props, Modal.defaultProps, this.context.getTranslation(this.props).Modal,
|
|
313
|
+
var props = extendPropsWithContextInClassComponent(this.props, Modal.defaultProps, this.context.getTranslation(this.props).Modal, this.context.Modal);
|
|
315
314
|
|
|
316
315
|
var _props$root_id = props.root_id,
|
|
317
316
|
root_id = _props$root_id === void 0 ? 'root' : _props$root_id,
|
|
@@ -36,7 +36,6 @@ import classnames from 'classnames';
|
|
|
36
36
|
import PaginationContext from './PaginationContext';
|
|
37
37
|
import PaginationProvider from './PaginationProvider';
|
|
38
38
|
import { registerElement, validateDOMAttributes, extendPropsWithContextInClassComponent } from '../../shared/component-helper';
|
|
39
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
40
39
|
import { spacingPropTypes, createSpacingClasses } from '../space/SpacingHelper';
|
|
41
40
|
import { PaginationIndicator } from './PaginationHelpers';
|
|
42
41
|
import InfinityScroller from './PaginationInfinity';
|
|
@@ -169,7 +168,7 @@ var PaginationInstance = function (_React$PureComponent2) {
|
|
|
169
168
|
_createClass(PaginationInstance, [{
|
|
170
169
|
key: "render",
|
|
171
170
|
value: function render() {
|
|
172
|
-
var props = extendPropsWithContextInClassComponent(this.props, paginationDefaultProps, this.context.getTranslation(this.props).Pagination,
|
|
171
|
+
var props = extendPropsWithContextInClassComponent(this.props, paginationDefaultProps, this.context.getTranslation(this.props).Pagination, this.context.Pagination);
|
|
173
172
|
|
|
174
173
|
var align = props.align,
|
|
175
174
|
children = props.children,
|
|
@@ -33,7 +33,6 @@ import PropTypes from 'prop-types';
|
|
|
33
33
|
import classnames from 'classnames';
|
|
34
34
|
import Context from '../../shared/Context';
|
|
35
35
|
import { isTrue, registerElement, validateDOMAttributes, dispatchCustomElementEvent, extendPropsWithContextInClassComponent } from '../../shared/component-helper';
|
|
36
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
37
36
|
import { spacingPropTypes, createSpacingClasses } from '../space/SpacingHelper';
|
|
38
37
|
import ProgressIndicatorCircular from './ProgressIndicatorCircular';
|
|
39
38
|
import ProgressIndicatorLinear from './ProgressIndicatorLinear';
|
|
@@ -85,7 +84,7 @@ var ProgressIndicator = function (_React$PureComponent) {
|
|
|
85
84
|
}, {
|
|
86
85
|
key: "render",
|
|
87
86
|
value: function render() {
|
|
88
|
-
var props = extendPropsWithContextInClassComponent(this.props, ProgressIndicator.defaultProps, this.context.getTranslation(this.props).ProgressIndicator,
|
|
87
|
+
var props = extendPropsWithContextInClassComponent(this.props, ProgressIndicator.defaultProps, this.context.getTranslation(this.props).ProgressIndicator, this.context.ProgressIndicator);
|
|
89
88
|
|
|
90
89
|
var type = props.type,
|
|
91
90
|
size = props.size,
|
|
@@ -38,7 +38,6 @@ import Context from '../../shared/Context';
|
|
|
38
38
|
import { stepIndicatorDefaultProps } from './StepIndicatorProps';
|
|
39
39
|
import { processChildren, extendPropsWithContextInClassComponent } from '../../shared/component-helper';
|
|
40
40
|
import { onMediaQueryChange } from '../../shared/MediaQueryUtils';
|
|
41
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
42
41
|
var filterAttributes = Object.keys(stepIndicatorDefaultProps).filter(function (item) {
|
|
43
42
|
return !['class', 'className'].includes(item);
|
|
44
43
|
}).concat(['internalId', 'isSidebar', 'hasSidebar', 'hideSidebar', 'sidebarIsVisible', 'mainTitle', 'stepsLabel', 'stepsLabelExtended', 'listOfReachedSteps', 'setActiveStep', 'activeStep', 'countSteps', 'openState', 'onChangeState', 'openHandler', 'closeHandler', 'innerRef', 'hasSkeletonData', 'filterAttributes', 'listAttributes', 'onChangeState', 'isV1', 'activeUrl']);
|
|
@@ -141,7 +140,7 @@ export var StepIndicatorProvider = function (_React$PureComponent) {
|
|
|
141
140
|
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.context;
|
|
142
141
|
var data = extendPropsWithContextInClassComponent(this.props, stepIndicatorDefaultProps, {
|
|
143
142
|
skeleton: context === null || context === void 0 ? void 0 : context.skeleton
|
|
144
|
-
}, context.getTranslation(context).StepIndicator,
|
|
143
|
+
}, context.getTranslation(context).StepIndicator, context.StepIndicator);
|
|
145
144
|
return data;
|
|
146
145
|
}
|
|
147
146
|
}, {
|
package/elements/Element.js
CHANGED
|
@@ -10,7 +10,6 @@ import Context from '../shared/Context';
|
|
|
10
10
|
import { validateDOMAttributes, extendPropsWithContext } from '../shared/component-helper';
|
|
11
11
|
import { createSpacingClasses } from '../components/space/SpacingHelper';
|
|
12
12
|
import { createSkeletonClass, skeletonDOMAttributes } from '../components/skeleton/SkeletonHelper';
|
|
13
|
-
import { includeValidProps } from '../components/form-row/FormRowHelpers';
|
|
14
13
|
export var defaultProps = {
|
|
15
14
|
skeletonMethod: 'font'
|
|
16
15
|
};
|
|
@@ -24,7 +23,7 @@ function ElementInstance(localProps) {
|
|
|
24
23
|
var context = React.useContext(Context);
|
|
25
24
|
var props = extendPropsWithContext(localProps, defaultProps, {
|
|
26
25
|
skeleton: context === null || context === void 0 ? void 0 : context.skeleton
|
|
27
|
-
}
|
|
26
|
+
});
|
|
28
27
|
|
|
29
28
|
if (typeof props.inner_ref !== 'undefined') {
|
|
30
29
|
props.innerRef = props.inner_ref;
|
|
@@ -13,7 +13,6 @@ import classnames from 'classnames';
|
|
|
13
13
|
import { isTrue, makeUniqueId, extendPropsWithContextInClassComponent, registerElement, validateDOMAttributes, dispatchCustomElementEvent } from '../../shared/component-helper';
|
|
14
14
|
import { createSpacingClasses } from '../space/SpacingHelper';
|
|
15
15
|
import { accordionPropTypes, accordionDefaultProps } from './AccordionPropTypes';
|
|
16
|
-
import { includeValidProps } from '../form-row/FormRowHelpers';
|
|
17
16
|
import Context from '../../shared/Context';
|
|
18
17
|
import AccordionGroupContext from './AccordionProviderContext';
|
|
19
18
|
export default class AccordionGroup extends React.PureComponent {
|
|
@@ -39,7 +38,7 @@ export default class AccordionGroup extends React.PureComponent {
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
render() {
|
|
42
|
-
const props = extendPropsWithContextInClassComponent(this.props, AccordionGroup.defaultProps,
|
|
41
|
+
const props = extendPropsWithContextInClassComponent(this.props, AccordionGroup.defaultProps, this.context.Accordion, this.context.getTranslation(this.props).Accordion);
|
|
43
42
|
|
|
44
43
|
const {
|
|
45
44
|
expanded,
|
|
@@ -1524,7 +1524,10 @@ class AutocompleteInstance extends React.PureComponent {
|
|
|
1524
1524
|
icon_size: icon_size || (size === 'large' ? 'medium' : 'default'),
|
|
1525
1525
|
variant: "secondary",
|
|
1526
1526
|
size: size === 'default' ? 'medium' : size,
|
|
1527
|
-
type: "button"
|
|
1527
|
+
type: "button",
|
|
1528
|
+
status: status,
|
|
1529
|
+
status_state: status_state,
|
|
1530
|
+
status_props: status_props
|
|
1528
1531
|
}, triggerParams));
|
|
1529
1532
|
}
|
|
1530
1533
|
|
|
@@ -150,10 +150,15 @@ export type ButtonProps = {
|
|
|
150
150
|
href?: string;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
* When button behaves as a link. Used to
|
|
153
|
+
* When button behaves as a link. Used to specify where to open the linked document, specified by `href`. Possible values are `_self`, `_blank`, `_parent` and `_top`.
|
|
154
154
|
*/
|
|
155
155
|
target?: string;
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
* When button behaves as a link. Used to specify the relationship between a linked resource and the current document. Examples(non-exhaustive list) of values are `nofollow`, `search`, and `tag`.
|
|
159
|
+
*/
|
|
160
|
+
rel?: string;
|
|
161
|
+
|
|
157
162
|
/**
|
|
158
163
|
* Use this prop only if you are using a router Link component as the `element` that uses the `to` property to declare the navigation url.
|
|
159
164
|
*/
|
|
@@ -226,6 +226,7 @@ process.env.NODE_ENV !== "production" ? Button.propTypes = _objectSpread(_object
|
|
|
226
226
|
class: PropTypes.string,
|
|
227
227
|
href: PropTypes.string,
|
|
228
228
|
target: PropTypes.string,
|
|
229
|
+
rel: PropTypes.string,
|
|
229
230
|
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]),
|
|
230
231
|
custom_content: PropTypes.node,
|
|
231
232
|
wrap: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
@@ -254,6 +255,7 @@ Button.defaultProps = {
|
|
|
254
255
|
icon_size: null,
|
|
255
256
|
href: null,
|
|
256
257
|
target: null,
|
|
258
|
+
rel: null,
|
|
257
259
|
to: null,
|
|
258
260
|
id: null,
|
|
259
261
|
class: null,
|