@dnb/eufemia 9.19.0 → 9.20.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/CHANGELOG.md +20 -198
- package/cjs/components/avatar/Avatar.js +14 -12
- package/cjs/components/avatar/AvatarGroup.js +11 -11
- package/cjs/components/avatar/style/_avatar.scss +2 -0
- package/cjs/components/avatar/style/dnb-avatar.css +4 -1
- package/cjs/components/avatar/style/dnb-avatar.min.css +1 -1
- package/cjs/components/breadcrumb/Breadcrumb.js +27 -52
- package/cjs/components/breadcrumb/BreadcrumbItem.js +15 -29
- package/cjs/components/button/Button.d.ts +11 -7
- package/cjs/components/icon-primary/IconPrimary.d.ts +2 -1
- package/cjs/components/info-card/InfoCard.js +22 -22
- package/cjs/components/pagination/Pagination.d.ts +6 -6
- package/cjs/components/pagination/Pagination.js +2 -2
- package/cjs/components/skeleton/Skeleton.d.ts +1 -1
- package/cjs/components/skeleton/SkeletonHelper.d.ts +2 -1
- package/cjs/components/step-indicator/StepIndicatorTriggerButton.js +4 -4
- package/cjs/components/tag/Tag.js +17 -29
- package/cjs/components/tag/TagGroup.js +10 -24
- package/cjs/components/timeline/Timeline.js +24 -64
- package/cjs/components/timeline/TimelineItem.js +16 -29
- package/cjs/elements/Div.d.ts +1 -1
- package/cjs/elements/P.d.ts +2 -1
- package/cjs/shared/AnimateHeight.js +19 -13
- package/cjs/shared/helpers.js +16 -4
- package/cjs/shared/hooks/index.js +13 -0
- package/cjs/shared/hooks/usePropsWithContext.js +92 -0
- package/cjs/style/dnb-ui-components.css +4 -1
- package/cjs/style/dnb-ui-components.min.css +1 -1
- package/cjs/style/dnb-ui-elements.css +1 -3
- package/cjs/style/dnb-ui-elements.min.css +1 -1
- package/cjs/style/dnb-ui-tags.css +2 -6
- package/cjs/style/dnb-ui-tags.min.css +2 -2
- package/cjs/style/elements/code.scss +1 -3
- package/cjs/style/stylis.d.ts +38 -0
- package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.css +1 -3
- package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +1 -3
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/components/avatar/Avatar.js +14 -13
- package/components/avatar/Avatar.tsx +8 -9
- package/components/avatar/AvatarGroup.js +20 -20
- package/components/avatar/AvatarGroup.tsx +4 -8
- package/components/avatar/style/_avatar.scss +2 -0
- package/components/avatar/style/dnb-avatar.css +4 -1
- package/components/avatar/style/dnb-avatar.min.css +1 -1
- package/components/breadcrumb/Breadcrumb.js +22 -35
- package/components/breadcrumb/Breadcrumb.tsx +10 -10
- package/components/breadcrumb/BreadcrumbItem.js +14 -25
- package/components/breadcrumb/BreadcrumbItem.tsx +8 -11
- package/components/button/Button.d.ts +11 -7
- package/components/icon-primary/IconPrimary.d.ts +2 -1
- package/components/info-card/InfoCard.js +22 -22
- package/components/info-card/InfoCard.tsx +13 -12
- package/components/modal/Modal.tsx +1 -1
- package/components/modal/ModalContent.tsx +6 -2
- package/components/modal/components/ModalHeader.tsx +2 -2
- package/components/modal/types.ts +2 -2
- package/components/pagination/Pagination.d.ts +6 -6
- package/components/pagination/Pagination.js +2 -2
- package/components/skeleton/SkeletonHelper.d.ts +2 -1
- package/components/step-indicator/StepIndicatorTriggerButton.js +4 -4
- package/components/tag/Tag.js +17 -27
- package/components/tag/Tag.tsx +15 -13
- package/components/tag/TagGroup.js +9 -22
- package/components/tag/TagGroup.tsx +6 -10
- package/components/timeline/Timeline.js +23 -27
- package/components/timeline/Timeline.tsx +24 -20
- package/components/timeline/TimelineItem.js +15 -25
- package/components/timeline/TimelineItem.tsx +8 -10
- package/elements/P.d.ts +2 -1
- package/es/components/avatar/Avatar.js +7 -6
- package/es/components/avatar/Avatar.tsx +8 -9
- package/es/components/avatar/AvatarGroup.js +6 -6
- package/es/components/avatar/AvatarGroup.tsx +4 -8
- package/es/components/avatar/style/_avatar.scss +2 -0
- package/es/components/avatar/style/dnb-avatar.css +4 -1
- package/es/components/avatar/style/dnb-avatar.min.css +1 -1
- package/es/components/breadcrumb/Breadcrumb.js +8 -14
- package/es/components/breadcrumb/Breadcrumb.tsx +10 -10
- package/es/components/breadcrumb/BreadcrumbItem.js +9 -13
- package/es/components/breadcrumb/BreadcrumbItem.tsx +8 -11
- package/es/components/button/Button.d.ts +11 -7
- package/es/components/icon-primary/IconPrimary.d.ts +2 -1
- package/es/components/info-card/InfoCard.js +8 -8
- package/es/components/info-card/InfoCard.tsx +13 -12
- package/es/components/modal/Modal.tsx +1 -1
- package/es/components/modal/ModalContent.tsx +6 -2
- package/es/components/modal/components/ModalHeader.tsx +2 -2
- package/es/components/modal/types.ts +2 -2
- package/es/components/pagination/Pagination.d.ts +6 -6
- package/es/components/pagination/Pagination.js +2 -2
- package/es/components/skeleton/Skeleton.d.ts +1 -1
- package/es/components/skeleton/SkeletonHelper.d.ts +2 -1
- package/es/components/step-indicator/StepIndicatorTriggerButton.js +4 -4
- package/es/components/tag/Tag.js +11 -14
- package/es/components/tag/Tag.tsx +15 -13
- package/es/components/tag/TagGroup.js +7 -13
- package/es/components/tag/TagGroup.tsx +6 -10
- package/es/components/timeline/Timeline.js +21 -17
- package/es/components/timeline/Timeline.tsx +24 -20
- package/es/components/timeline/TimelineItem.js +9 -12
- package/es/components/timeline/TimelineItem.tsx +8 -10
- package/es/elements/Div.d.ts +1 -1
- package/es/elements/P.d.ts +2 -1
- package/es/shared/AnimateHeight.js +15 -13
- package/es/shared/helpers.js +9 -2
- package/es/shared/hooks/index.js +1 -0
- package/es/shared/hooks/index.ts +1 -0
- package/es/shared/hooks/usePropsWithContext.js +26 -0
- package/es/shared/hooks/usePropsWithContext.ts +45 -0
- package/es/shared/interfaces.tsx +0 -2
- package/es/style/dnb-ui-components.css +4 -1
- package/es/style/dnb-ui-components.min.css +1 -1
- package/es/style/dnb-ui-elements.css +1 -3
- package/es/style/dnb-ui-elements.min.css +1 -1
- package/es/style/dnb-ui-tags.css +2 -6
- package/es/style/dnb-ui-tags.min.css +2 -2
- package/es/style/elements/code.scss +1 -3
- package/es/style/stylis.d.ts +38 -0
- package/es/style/themes/theme-open-banking/dnb-theme-open-banking.css +1 -3
- package/es/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
- package/es/style/themes/theme-ui/dnb-theme-ui.css +1 -3
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/esm/components/avatar/Avatar.js +14 -13
- package/esm/components/avatar/Avatar.tsx +8 -9
- package/esm/components/avatar/AvatarGroup.js +20 -20
- package/esm/components/avatar/AvatarGroup.tsx +4 -8
- package/esm/components/avatar/style/_avatar.scss +2 -0
- package/esm/components/avatar/style/dnb-avatar.css +4 -1
- package/esm/components/avatar/style/dnb-avatar.min.css +1 -1
- package/esm/components/breadcrumb/Breadcrumb.js +22 -35
- package/esm/components/breadcrumb/Breadcrumb.tsx +10 -10
- package/esm/components/breadcrumb/BreadcrumbItem.js +14 -25
- package/esm/components/breadcrumb/BreadcrumbItem.tsx +8 -11
- package/esm/components/button/Button.d.ts +11 -7
- package/esm/components/icon-primary/IconPrimary.d.ts +2 -1
- package/esm/components/info-card/InfoCard.js +22 -22
- package/esm/components/info-card/InfoCard.tsx +13 -12
- package/esm/components/modal/Modal.tsx +1 -1
- package/esm/components/modal/ModalContent.tsx +6 -2
- package/esm/components/modal/components/ModalHeader.tsx +2 -2
- package/esm/components/modal/types.ts +2 -2
- package/esm/components/pagination/Pagination.d.ts +6 -6
- package/esm/components/pagination/Pagination.js +2 -2
- package/esm/components/skeleton/SkeletonHelper.d.ts +2 -1
- package/esm/components/step-indicator/StepIndicatorTriggerButton.js +4 -4
- package/esm/components/tag/Tag.js +17 -27
- package/esm/components/tag/Tag.tsx +15 -13
- package/esm/components/tag/TagGroup.js +9 -22
- package/esm/components/tag/TagGroup.tsx +6 -10
- package/esm/components/timeline/Timeline.js +23 -27
- package/esm/components/timeline/Timeline.tsx +24 -20
- package/esm/components/timeline/TimelineItem.js +15 -25
- package/esm/components/timeline/TimelineItem.tsx +8 -10
- package/esm/dnb-ui-components.min.mjs +3 -3
- package/esm/dnb-ui-lib.min.mjs +3 -3
- package/esm/dnb-ui-web-components.min.mjs +4 -4
- package/esm/elements/P.d.ts +2 -1
- package/esm/shared/AnimateHeight.js +19 -13
- package/esm/shared/helpers.js +15 -4
- package/esm/shared/hooks/index.js +1 -0
- package/esm/shared/hooks/index.ts +1 -0
- package/esm/shared/hooks/usePropsWithContext.js +47 -0
- package/esm/shared/hooks/usePropsWithContext.ts +45 -0
- package/esm/shared/interfaces.tsx +0 -2
- package/esm/style/dnb-ui-components.css +4 -1
- package/esm/style/dnb-ui-components.min.css +1 -1
- package/esm/style/dnb-ui-elements.css +1 -3
- package/esm/style/dnb-ui-elements.min.css +1 -1
- package/esm/style/dnb-ui-tags.css +2 -6
- package/esm/style/dnb-ui-tags.min.css +2 -2
- package/esm/style/elements/code.scss +1 -3
- package/esm/style/stylis.d.ts +38 -0
- package/esm/style/themes/theme-open-banking/dnb-theme-open-banking.css +1 -3
- package/esm/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
- package/esm/style/themes/theme-ui/dnb-theme-ui.css +1 -3
- package/esm/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/package.json +1 -1
- package/shared/AnimateHeight.js +19 -13
- package/shared/helpers.js +15 -4
- package/shared/hooks/index.js +1 -0
- package/shared/hooks/index.ts +1 -0
- package/shared/hooks/usePropsWithContext.js +47 -0
- package/shared/hooks/usePropsWithContext.ts +45 -0
- package/shared/interfaces.tsx +0 -2
- package/style/dnb-ui-components.css +4 -1
- package/style/dnb-ui-components.min.css +1 -1
- package/style/dnb-ui-elements.css +1 -3
- package/style/dnb-ui-elements.min.css +1 -1
- package/style/dnb-ui-tags.css +2 -6
- package/style/dnb-ui-tags.min.css +2 -2
- package/style/elements/code.scss +1 -3
- package/style/stylis.d.ts +38 -0
- package/style/themes/theme-open-banking/dnb-theme-open-banking.css +1 -3
- package/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
- package/style/themes/theme-ui/dnb-theme-ui.css +1 -3
- package/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/umd/dnb-ui-components.min.js +3 -3
- package/umd/dnb-ui-lib.min.js +4 -4
- package/umd/dnb-ui-web-components.min.js +3 -3
|
@@ -1,44 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
require("core-js/modules/es.object.keys.js");
|
|
6
4
|
|
|
7
5
|
require("core-js/modules/es.array.index-of.js");
|
|
8
6
|
|
|
9
7
|
require("core-js/modules/es.symbol.js");
|
|
10
8
|
|
|
11
|
-
require("core-js/modules/es.array.filter.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.to-string.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
20
|
-
|
|
21
9
|
require("core-js/modules/es.object.assign.js");
|
|
22
10
|
|
|
23
|
-
require("core-js/modules/es.array.iterator.js");
|
|
24
|
-
|
|
25
|
-
require("core-js/modules/es.string.iterator.js");
|
|
26
|
-
|
|
27
|
-
require("core-js/modules/es.weak-map.js");
|
|
28
|
-
|
|
29
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
30
|
-
|
|
31
|
-
require("core-js/modules/es.symbol.description.js");
|
|
32
|
-
|
|
33
|
-
require("core-js/modules/es.symbol.iterator.js");
|
|
34
|
-
|
|
35
11
|
Object.defineProperty(exports, "__esModule", {
|
|
36
12
|
value: true
|
|
37
13
|
});
|
|
38
|
-
var _exportNames = {
|
|
39
|
-
defaultProps: true,
|
|
40
|
-
TimelineItem: true
|
|
41
|
-
};
|
|
42
14
|
Object.defineProperty(exports, "TimelineItem", {
|
|
43
15
|
enumerable: true,
|
|
44
16
|
get: function get() {
|
|
@@ -49,8 +21,6 @@ exports.defaultProps = exports.default = void 0;
|
|
|
49
21
|
|
|
50
22
|
require("core-js/modules/es.array.map.js");
|
|
51
23
|
|
|
52
|
-
require("core-js/modules/es.function.name.js");
|
|
53
|
-
|
|
54
24
|
var _react = _interopRequireDefault(require("react"));
|
|
55
25
|
|
|
56
26
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -59,37 +29,16 @@ var _SpacingHelper = require("../space/SpacingHelper");
|
|
|
59
29
|
|
|
60
30
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
61
31
|
|
|
62
|
-
var
|
|
32
|
+
var _hooks = require("../../shared/hooks");
|
|
63
33
|
|
|
64
|
-
var _TimelineItem =
|
|
34
|
+
var _TimelineItem = _interopRequireDefault(require("./TimelineItem"));
|
|
65
35
|
|
|
66
|
-
Object.keys(_TimelineItem).forEach(function (key) {
|
|
67
|
-
if (key === "default" || key === "__esModule") return;
|
|
68
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
69
|
-
if (key in exports && exports[key] === _TimelineItem[key]) return;
|
|
70
|
-
Object.defineProperty(exports, key, {
|
|
71
|
-
enumerable: true,
|
|
72
|
-
get: function get() {
|
|
73
|
-
return _TimelineItem[key];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
36
|
var _excluded = ["className", "skeleton", "data", "children"];
|
|
78
37
|
|
|
79
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
80
|
-
|
|
81
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
82
|
-
|
|
83
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
84
39
|
|
|
85
40
|
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); }
|
|
86
41
|
|
|
87
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
88
|
-
|
|
89
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
90
|
-
|
|
91
|
-
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; }
|
|
92
|
-
|
|
93
42
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
94
43
|
|
|
95
44
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -102,27 +51,38 @@ var defaultProps = {
|
|
|
102
51
|
};
|
|
103
52
|
exports.defaultProps = defaultProps;
|
|
104
53
|
|
|
105
|
-
function Timeline(localProps) {
|
|
54
|
+
var Timeline = function Timeline(localProps) {
|
|
106
55
|
var context = _react.default.useContext(_Context.default);
|
|
107
56
|
|
|
108
|
-
var
|
|
109
|
-
className =
|
|
110
|
-
skeleton =
|
|
111
|
-
data =
|
|
112
|
-
|
|
113
|
-
props = _objectWithoutProperties(
|
|
57
|
+
var _usePropsWithContext = (0, _hooks.usePropsWithContext)(localProps, defaultProps, context === null || context === void 0 ? void 0 : context.Timeline),
|
|
58
|
+
className = _usePropsWithContext.className,
|
|
59
|
+
skeleton = _usePropsWithContext.skeleton,
|
|
60
|
+
data = _usePropsWithContext.data,
|
|
61
|
+
childrenProp = _usePropsWithContext.children,
|
|
62
|
+
props = _objectWithoutProperties(_usePropsWithContext, _excluded);
|
|
114
63
|
|
|
115
64
|
var spacingClasses = (0, _SpacingHelper.createSpacingClasses)(props);
|
|
65
|
+
var children = childrenProp;
|
|
66
|
+
|
|
67
|
+
if (Array.isArray(childrenProp)) {
|
|
68
|
+
children = childrenProp.map(function (child, i) {
|
|
69
|
+
return _react.default.cloneElement(child, {
|
|
70
|
+
skeleton: skeleton,
|
|
71
|
+
key: i
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
116
76
|
return _react.default.createElement("div", _extends({
|
|
117
77
|
className: (0, _classnames.default)('dnb-timeline', spacingClasses, className),
|
|
118
78
|
"data-testid": "timeline"
|
|
119
|
-
}, props), data === null || data === void 0 ? void 0 : data.map(function (timelineItem) {
|
|
79
|
+
}, props), data === null || data === void 0 ? void 0 : data.map(function (timelineItem, i) {
|
|
120
80
|
return _react.default.createElement(_TimelineItem.default, _extends({
|
|
121
|
-
key:
|
|
81
|
+
key: i,
|
|
122
82
|
skeleton: skeleton
|
|
123
83
|
}, timelineItem));
|
|
124
|
-
}),
|
|
125
|
-
}
|
|
84
|
+
}), children);
|
|
85
|
+
};
|
|
126
86
|
|
|
127
87
|
Timeline.Item = _TimelineItem.default;
|
|
128
88
|
var _default = Timeline;
|
|
@@ -6,22 +6,12 @@ require("core-js/modules/es.array.index-of.js");
|
|
|
6
6
|
|
|
7
7
|
require("core-js/modules/es.symbol.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.array.filter.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.object.to-string.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
18
|
-
|
|
19
9
|
require("core-js/modules/es.object.assign.js");
|
|
20
10
|
|
|
21
11
|
Object.defineProperty(exports, "__esModule", {
|
|
22
12
|
value: true
|
|
23
13
|
});
|
|
24
|
-
exports.default =
|
|
14
|
+
exports.default = void 0;
|
|
25
15
|
|
|
26
16
|
require("core-js/modules/es.function.name.js");
|
|
27
17
|
|
|
@@ -43,7 +33,7 @@ var _pin = _interopRequireDefault(require("../../icons/pin"));
|
|
|
43
33
|
|
|
44
34
|
var _Context = _interopRequireDefault(require("../../shared/Context"));
|
|
45
35
|
|
|
46
|
-
var
|
|
36
|
+
var _hooks = require("../../shared/hooks");
|
|
47
37
|
|
|
48
38
|
var _span;
|
|
49
39
|
|
|
@@ -53,12 +43,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
53
43
|
|
|
54
44
|
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); }
|
|
55
45
|
|
|
56
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
57
|
-
|
|
58
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
59
|
-
|
|
60
|
-
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; }
|
|
61
|
-
|
|
62
46
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
63
47
|
|
|
64
48
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -73,7 +57,7 @@ var defaultProps = {
|
|
|
73
57
|
skeleton: false
|
|
74
58
|
};
|
|
75
59
|
|
|
76
|
-
function TimelineItem(localProps) {
|
|
60
|
+
var TimelineItem = function TimelineItem(localProps) {
|
|
77
61
|
var _span2, _span3, _span4, _FormStatus;
|
|
78
62
|
|
|
79
63
|
var context = _react.default.useContext(_Context.default);
|
|
@@ -83,15 +67,15 @@ function TimelineItem(localProps) {
|
|
|
83
67
|
alt_label_current = _context$translation$.alt_label_current,
|
|
84
68
|
alt_label_upcoming = _context$translation$.alt_label_upcoming;
|
|
85
69
|
|
|
86
|
-
var
|
|
87
|
-
icon =
|
|
88
|
-
iconAlt =
|
|
89
|
-
name =
|
|
90
|
-
date =
|
|
91
|
-
infoMessage =
|
|
92
|
-
state =
|
|
93
|
-
skeleton =
|
|
94
|
-
props = _objectWithoutProperties(
|
|
70
|
+
var _usePropsWithContext = (0, _hooks.usePropsWithContext)(localProps, defaultProps, context === null || context === void 0 ? void 0 : context.TimelineItem),
|
|
71
|
+
icon = _usePropsWithContext.icon,
|
|
72
|
+
iconAlt = _usePropsWithContext.iconAlt,
|
|
73
|
+
name = _usePropsWithContext.name,
|
|
74
|
+
date = _usePropsWithContext.date,
|
|
75
|
+
infoMessage = _usePropsWithContext.infoMessage,
|
|
76
|
+
state = _usePropsWithContext.state,
|
|
77
|
+
skeleton = _usePropsWithContext.skeleton,
|
|
78
|
+
props = _objectWithoutProperties(_usePropsWithContext, _excluded);
|
|
95
79
|
|
|
96
80
|
var stateIsCompleted = state === 'completed';
|
|
97
81
|
var stateIsCurrent = state === 'current';
|
|
@@ -146,4 +130,7 @@ function TimelineItem(localProps) {
|
|
|
146
130
|
"data-testid": "timeline-item",
|
|
147
131
|
"aria-current": stateIsCurrent ? 'step' : undefined
|
|
148
132
|
}, props), _react.default.createElement(TimelineItemLabel, null), _react.default.createElement(TimelineItemContent, null));
|
|
149
|
-
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var _default = TimelineItem;
|
|
136
|
+
exports.default = _default;
|
package/cjs/elements/Div.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ export type DivTop = string | number | boolean;
|
|
|
13
13
|
export type DivRight = string | number | boolean;
|
|
14
14
|
export type DivBottom = string | number | boolean;
|
|
15
15
|
export type DivLeft = string | number | boolean;
|
|
16
|
-
|
|
17
16
|
/**
|
|
18
17
|
* NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js".
|
|
19
18
|
*/
|
|
19
|
+
|
|
20
20
|
export interface DivProps extends React.HTMLProps<HTMLElement> {
|
|
21
21
|
space?: DivSpace;
|
|
22
22
|
top?: DivTop;
|
package/cjs/elements/P.d.ts
CHANGED
|
@@ -25,7 +25,8 @@ export type PSize =
|
|
|
25
25
|
* NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js".
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
export interface PProps
|
|
28
|
+
export interface PProps
|
|
29
|
+
extends Omit<React.HTMLProps<HTMLElement>, 'size'> {
|
|
29
30
|
space?: PSpace;
|
|
30
31
|
top?: PTop;
|
|
31
32
|
right?: PRight;
|
|
@@ -92,6 +92,16 @@ var AnimateHeight = function () {
|
|
|
92
92
|
this.onCloseEnd = null;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
}, {
|
|
96
|
+
key: "_emitTransitionEnd",
|
|
97
|
+
value: function _emitTransitionEnd() {
|
|
98
|
+
try {
|
|
99
|
+
var event = new CustomEvent('transitionend');
|
|
100
|
+
this.elem.dispatchEvent(event);
|
|
101
|
+
} catch (e) {
|
|
102
|
+
(0, _componentHelper.warn)(e);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
95
105
|
}, {
|
|
96
106
|
key: "setElement",
|
|
97
107
|
value: function setElement(elem) {
|
|
@@ -188,30 +198,26 @@ var AnimateHeight = function () {
|
|
|
188
198
|
}, {
|
|
189
199
|
key: "start",
|
|
190
200
|
value: function start(fromHeight, toHeight) {
|
|
191
|
-
var
|
|
201
|
+
var _window,
|
|
202
|
+
_window$location,
|
|
203
|
+
_window$location$href,
|
|
204
|
+
_this$opts,
|
|
192
205
|
_this4 = this;
|
|
193
206
|
|
|
194
207
|
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
195
208
|
_ref$animate = _ref.animate,
|
|
196
209
|
animate = _ref$animate === void 0 ? true : _ref$animate;
|
|
197
210
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
} catch (e) {}
|
|
211
|
+
if ((_window = window) !== null && _window !== void 0 && (_window$location = _window.location) !== null && _window$location !== void 0 && (_window$location$href = _window$location.href) !== null && _window$location$href !== void 0 && _window$location$href.includes('data-visual-test')) {
|
|
212
|
+
animate = false;
|
|
213
|
+
}
|
|
203
214
|
|
|
204
|
-
if (animate === false || ((_this$opts = this.opts) === null || _this$opts === void 0 ? void 0 : _this$opts.animate) === false) {
|
|
215
|
+
if (fromHeight === toHeight || animate === false || ((_this$opts = this.opts) === null || _this$opts === void 0 ? void 0 : _this$opts.animate) === false) {
|
|
205
216
|
this.elem.style.height = "".concat(toHeight, "px");
|
|
206
217
|
|
|
207
218
|
this._callOnStart();
|
|
208
219
|
|
|
209
|
-
|
|
210
|
-
var event = new CustomEvent('transitionend');
|
|
211
|
-
this.elem.dispatchEvent(event);
|
|
212
|
-
} catch (e) {
|
|
213
|
-
(0, _componentHelper.warn)(e);
|
|
214
|
-
}
|
|
220
|
+
this._emitTransitionEnd();
|
|
215
221
|
|
|
216
222
|
return;
|
|
217
223
|
}
|
package/cjs/shared/helpers.js
CHANGED
|
@@ -52,6 +52,8 @@ require("core-js/modules/es.string.replace.js");
|
|
|
52
52
|
|
|
53
53
|
require("core-js/modules/es.object.to-string.js");
|
|
54
54
|
|
|
55
|
+
require("core-js/modules/es.array.join.js");
|
|
56
|
+
|
|
55
57
|
require("core-js/modules/es.array.concat.js");
|
|
56
58
|
|
|
57
59
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
@@ -499,13 +501,23 @@ function _copyToClipboard() {
|
|
|
499
501
|
|
|
500
502
|
var warn = function warn() {
|
|
501
503
|
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof console !== 'undefined' && typeof console.log === 'function') {
|
|
502
|
-
var
|
|
504
|
+
var isBrowser = typeof window !== 'undefined';
|
|
503
505
|
|
|
504
|
-
for (var _len = arguments.length,
|
|
505
|
-
|
|
506
|
+
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
507
|
+
params[_key] = arguments[_key];
|
|
506
508
|
}
|
|
507
509
|
|
|
508
|
-
(
|
|
510
|
+
if (isBrowser) {
|
|
511
|
+
var _console;
|
|
512
|
+
|
|
513
|
+
var styles = ["padding: 0.125rem 0.5rem ".concat(IS_SAFARI ? '' : '0'), 'font-weight: bold', 'color: #00343E', 'background: #A5E1D2'].join(';');
|
|
514
|
+
|
|
515
|
+
(_console = console).log.apply(_console, ['%cEufemia', styles].concat(params));
|
|
516
|
+
} else {
|
|
517
|
+
var _console2;
|
|
518
|
+
|
|
519
|
+
(_console2 = console).log.apply(_console2, ['Eufemia:'].concat(params));
|
|
520
|
+
}
|
|
509
521
|
}
|
|
510
522
|
};
|
|
511
523
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "usePropsWithContext", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _usePropsWithContext.usePropsWithContext;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _usePropsWithContext = require("./usePropsWithContext");
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.symbol.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.array.filter.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.symbol.description.js");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
18
|
+
|
|
19
|
+
require("core-js/modules/es.array.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.string.iterator.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/es.array.slice.js");
|
|
26
|
+
|
|
27
|
+
require("core-js/modules/es.function.name.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/es.array.from.js");
|
|
30
|
+
|
|
31
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
32
|
+
|
|
33
|
+
Object.defineProperty(exports, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
});
|
|
36
|
+
exports.default = void 0;
|
|
37
|
+
exports.usePropsWithContext = usePropsWithContext;
|
|
38
|
+
|
|
39
|
+
require("core-js/modules/es.array.reduce.js");
|
|
40
|
+
|
|
41
|
+
require("core-js/modules/es.object.to-string.js");
|
|
42
|
+
|
|
43
|
+
require("core-js/modules/es.object.entries.js");
|
|
44
|
+
|
|
45
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
46
|
+
|
|
47
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
48
|
+
|
|
49
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
50
|
+
|
|
51
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
52
|
+
|
|
53
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
54
|
+
|
|
55
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
56
|
+
|
|
57
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
58
|
+
|
|
59
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
60
|
+
|
|
61
|
+
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; }
|
|
62
|
+
|
|
63
|
+
function usePropsWithContext(props) {
|
|
64
|
+
var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
65
|
+
|
|
66
|
+
for (var _len = arguments.length, contexts = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
67
|
+
contexts[_key - 2] = arguments[_key];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var context = contexts.reduce(function (acc, cur) {
|
|
71
|
+
if (cur) {
|
|
72
|
+
acc = _objectSpread(_objectSpread({}, acc), cur);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return acc;
|
|
76
|
+
}, {});
|
|
77
|
+
props = _objectSpread(_objectSpread({}, defaults), props);
|
|
78
|
+
return _objectSpread(_objectSpread({}, props), Object.entries(context).reduce(function (acc, _ref) {
|
|
79
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
80
|
+
key = _ref2[0],
|
|
81
|
+
value = _ref2[1];
|
|
82
|
+
|
|
83
|
+
if (typeof props[key] !== 'undefined' && props[key] === defaults[key]) {
|
|
84
|
+
acc[key] = value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return acc;
|
|
88
|
+
}, {}));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var _default = usePropsWithContext;
|
|
92
|
+
exports.default = _default;
|
|
@@ -1072,7 +1072,8 @@
|
|
|
1072
1072
|
.dnb-avatar__group .dnb-avatar--size-x-large {
|
|
1073
1073
|
margin-left: -1.5rem; }
|
|
1074
1074
|
.dnb-avatar__group .dnb-avatar:nth-of-type(2) {
|
|
1075
|
-
margin-left: 0;
|
|
1075
|
+
margin-left: 0;
|
|
1076
|
+
border-left: none; }
|
|
1076
1077
|
.dnb-avatar__group--elements-left {
|
|
1077
1078
|
display: -webkit-inline-box;
|
|
1078
1079
|
display: -ms-inline-flexbox;
|
|
@@ -1083,6 +1084,8 @@
|
|
|
1083
1084
|
-webkit-box-pack: center;
|
|
1084
1085
|
-ms-flex-pack: center;
|
|
1085
1086
|
justify-content: center;
|
|
1087
|
+
-ms-flex-negative: 0;
|
|
1088
|
+
flex-shrink: 0;
|
|
1086
1089
|
color: #737373;
|
|
1087
1090
|
color: var(--color-black-55); }
|
|
1088
1091
|
.dnb-avatar__group--elements-left--size-small {
|