@dnb/eufemia 9.23.1 → 9.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/cjs/components/avatar/Avatar.d.ts +6 -5
  3. package/cjs/components/avatar/Avatar.js +4 -8
  4. package/cjs/components/breadcrumb/Breadcrumb.d.ts +0 -6
  5. package/cjs/components/breadcrumb/Breadcrumb.js +1 -7
  6. package/cjs/components/dialog/Dialog.d.ts +2 -1
  7. package/cjs/components/dialog/Dialog.js +79 -51
  8. package/cjs/components/dialog/DialogContent.d.ts +1 -1
  9. package/cjs/components/dialog/DialogContent.js +50 -12
  10. package/cjs/components/dialog/parts/DialogAction.d.ts +34 -0
  11. package/cjs/components/dialog/parts/DialogAction.js +136 -0
  12. package/cjs/components/dialog/style/_dialog.scss +152 -72
  13. package/cjs/components/dialog/style/dnb-dialog.css +352 -199
  14. package/cjs/components/dialog/style/dnb-dialog.min.css +1 -1
  15. package/cjs/components/dialog/types.d.ts +20 -2
  16. package/cjs/components/drawer/style/dnb-drawer.css +177 -100
  17. package/cjs/components/drawer/style/dnb-drawer.min.css +1 -1
  18. package/cjs/components/form-status/FormStatus.d.ts +19 -2
  19. package/cjs/components/form-status/FormStatus.js +27 -3
  20. package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
  21. package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
  22. package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
  23. package/cjs/components/info-card/InfoCard.d.ts +0 -9
  24. package/cjs/components/info-card/InfoCard.js +0 -9
  25. package/cjs/components/modal/Modal.d.ts +1 -0
  26. package/cjs/components/modal/Modal.js +1 -1
  27. package/cjs/components/modal/ModalContent.js +13 -5
  28. package/cjs/components/modal/parts/CloseButton.d.ts +1 -0
  29. package/cjs/components/modal/style/_modal.scss +1 -0
  30. package/cjs/components/modal/style/dnb-modal.css +177 -100
  31. package/cjs/components/modal/style/dnb-modal.min.css +1 -1
  32. package/cjs/components/modal/types.d.ts +9 -1
  33. package/cjs/components/number-format/NumberFormat.d.ts +7 -1
  34. package/cjs/components/number-format/NumberFormat.js +5 -1
  35. package/cjs/components/number-format/NumberUtils.d.ts +12 -3
  36. package/cjs/components/number-format/NumberUtils.js +106 -7
  37. package/cjs/components/tag/Tag.d.ts +5 -6
  38. package/cjs/components/tag/Tag.js +3 -8
  39. package/cjs/fragments/drawer-list/DrawerList.js +1 -1
  40. package/cjs/fragments/drawer-list/DrawerListHelpers.js +3 -1
  41. package/cjs/shared/Context.d.ts +2 -0
  42. package/cjs/shared/Context.js +1 -0
  43. package/cjs/shared/Eufemia.js +1 -1
  44. package/cjs/shared/locales/en-GB.d.ts +4 -0
  45. package/cjs/shared/locales/en-GB.js +4 -0
  46. package/cjs/shared/locales/en-US.d.ts +4 -0
  47. package/cjs/shared/locales/index.d.ts +8 -0
  48. package/cjs/shared/locales/nb-NO.d.ts +4 -0
  49. package/cjs/shared/locales/nb-NO.js +4 -0
  50. package/cjs/shared/useTranslation.d.ts +1 -0
  51. package/cjs/style/dnb-ui-components.css +177 -100
  52. package/cjs/style/dnb-ui-components.min.css +2 -2
  53. package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
  54. package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
  55. package/cjs/style/themes/theme-ui/dnb-theme-ui.css +16 -0
  56. package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
  57. package/components/avatar/Avatar.d.ts +6 -5
  58. package/components/avatar/Avatar.js +4 -8
  59. package/components/breadcrumb/Breadcrumb.d.ts +0 -6
  60. package/components/breadcrumb/Breadcrumb.js +1 -7
  61. package/components/dialog/Dialog.d.ts +2 -1
  62. package/components/dialog/Dialog.js +78 -52
  63. package/components/dialog/DialogContent.d.ts +1 -1
  64. package/components/dialog/DialogContent.js +46 -9
  65. package/components/dialog/parts/DialogAction.d.ts +34 -0
  66. package/components/dialog/parts/DialogAction.js +96 -0
  67. package/components/dialog/style/_dialog.scss +152 -72
  68. package/components/dialog/style/dnb-dialog.css +352 -199
  69. package/components/dialog/style/dnb-dialog.min.css +1 -1
  70. package/components/dialog/types.d.ts +20 -2
  71. package/components/drawer/style/dnb-drawer.css +177 -100
  72. package/components/drawer/style/dnb-drawer.min.css +1 -1
  73. package/components/form-status/FormStatus.d.ts +19 -2
  74. package/components/form-status/FormStatus.js +23 -2
  75. package/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
  76. package/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
  77. package/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
  78. package/components/info-card/InfoCard.d.ts +0 -9
  79. package/components/info-card/InfoCard.js +0 -9
  80. package/components/modal/Modal.d.ts +1 -0
  81. package/components/modal/Modal.js +1 -1
  82. package/components/modal/ModalContent.js +13 -5
  83. package/components/modal/parts/CloseButton.d.ts +1 -0
  84. package/components/modal/style/_modal.scss +1 -0
  85. package/components/modal/style/dnb-modal.css +177 -100
  86. package/components/modal/style/dnb-modal.min.css +1 -1
  87. package/components/modal/types.d.ts +9 -1
  88. package/components/number-format/NumberFormat.d.ts +7 -1
  89. package/components/number-format/NumberFormat.js +5 -1
  90. package/components/number-format/NumberUtils.d.ts +12 -3
  91. package/components/number-format/NumberUtils.js +105 -7
  92. package/components/tag/Tag.d.ts +5 -6
  93. package/components/tag/Tag.js +3 -8
  94. package/es/components/avatar/Avatar.d.ts +6 -5
  95. package/es/components/avatar/Avatar.js +5 -9
  96. package/es/components/breadcrumb/Breadcrumb.d.ts +0 -6
  97. package/es/components/breadcrumb/Breadcrumb.js +1 -7
  98. package/es/components/dialog/Dialog.d.ts +2 -1
  99. package/es/components/dialog/Dialog.js +50 -22
  100. package/es/components/dialog/DialogContent.d.ts +1 -1
  101. package/es/components/dialog/DialogContent.js +40 -8
  102. package/es/components/dialog/parts/DialogAction.d.ts +34 -0
  103. package/es/components/dialog/parts/DialogAction.js +82 -0
  104. package/es/components/dialog/style/_dialog.scss +152 -72
  105. package/es/components/dialog/style/dnb-dialog.css +352 -199
  106. package/es/components/dialog/style/dnb-dialog.min.css +1 -1
  107. package/es/components/dialog/types.d.ts +20 -2
  108. package/es/components/drawer/style/dnb-drawer.css +177 -100
  109. package/es/components/drawer/style/dnb-drawer.min.css +1 -1
  110. package/es/components/form-status/FormStatus.d.ts +19 -2
  111. package/es/components/form-status/FormStatus.js +21 -2
  112. package/es/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
  113. package/es/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
  114. package/es/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
  115. package/es/components/info-card/InfoCard.d.ts +0 -9
  116. package/es/components/info-card/InfoCard.js +0 -9
  117. package/es/components/modal/Modal.d.ts +1 -0
  118. package/es/components/modal/Modal.js +1 -1
  119. package/es/components/modal/ModalContent.js +13 -6
  120. package/es/components/modal/parts/CloseButton.d.ts +1 -0
  121. package/es/components/modal/style/_modal.scss +1 -0
  122. package/es/components/modal/style/dnb-modal.css +177 -100
  123. package/es/components/modal/style/dnb-modal.min.css +1 -1
  124. package/es/components/modal/types.d.ts +9 -1
  125. package/es/components/number-format/NumberFormat.d.ts +7 -1
  126. package/es/components/number-format/NumberFormat.js +5 -1
  127. package/es/components/number-format/NumberUtils.d.ts +12 -3
  128. package/es/components/number-format/NumberUtils.js +101 -7
  129. package/es/components/tag/Tag.d.ts +5 -6
  130. package/es/components/tag/Tag.js +3 -8
  131. package/es/fragments/drawer-list/DrawerList.js +1 -1
  132. package/es/fragments/drawer-list/DrawerListHelpers.js +3 -1
  133. package/es/shared/Context.d.ts +2 -0
  134. package/es/shared/Context.js +1 -0
  135. package/es/shared/Eufemia.js +1 -1
  136. package/es/shared/locales/en-GB.d.ts +4 -0
  137. package/es/shared/locales/en-GB.js +4 -0
  138. package/es/shared/locales/en-US.d.ts +4 -0
  139. package/es/shared/locales/index.d.ts +8 -0
  140. package/es/shared/locales/nb-NO.d.ts +4 -0
  141. package/es/shared/locales/nb-NO.js +4 -0
  142. package/es/shared/useTranslation.d.ts +1 -0
  143. package/es/style/dnb-ui-components.css +177 -100
  144. package/es/style/dnb-ui-components.min.css +2 -2
  145. package/es/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
  146. package/es/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
  147. package/es/style/themes/theme-ui/dnb-theme-ui.css +16 -0
  148. package/es/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
  149. package/esm/dnb-ui-basis.min.mjs +1 -1
  150. package/esm/dnb-ui-components.min.mjs +1 -1
  151. package/esm/dnb-ui-elements.min.mjs +1 -1
  152. package/esm/dnb-ui-extensions.min.mjs +3 -3
  153. package/esm/dnb-ui-lib.min.mjs +3 -3
  154. package/esm/dnb-ui-web-components.min.mjs +2 -2
  155. package/fragments/drawer-list/DrawerList.js +1 -1
  156. package/fragments/drawer-list/DrawerListHelpers.js +3 -1
  157. package/package.json +1 -1
  158. package/shared/Context.d.ts +2 -0
  159. package/shared/Context.js +1 -0
  160. package/shared/Eufemia.js +1 -1
  161. package/shared/locales/en-GB.d.ts +4 -0
  162. package/shared/locales/en-GB.js +4 -0
  163. package/shared/locales/en-US.d.ts +4 -0
  164. package/shared/locales/index.d.ts +8 -0
  165. package/shared/locales/nb-NO.d.ts +4 -0
  166. package/shared/locales/nb-NO.js +4 -0
  167. package/shared/useTranslation.d.ts +1 -0
  168. package/style/dnb-ui-components.css +177 -100
  169. package/style/dnb-ui-components.min.css +2 -2
  170. package/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
  171. package/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
  172. package/style/themes/theme-ui/dnb-theme-ui.css +16 -0
  173. package/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
  174. package/umd/dnb-ui-basis.min.js +1 -1
  175. package/umd/dnb-ui-components.min.js +1 -1
  176. package/umd/dnb-ui-elements.min.js +1 -1
  177. package/umd/dnb-ui-extensions.min.js +2 -2
  178. package/umd/dnb-ui-lib.min.js +4 -4
  179. package/umd/dnb-ui-web-components.min.js +2 -2
@@ -34,6 +34,9 @@ export interface formatOptionParams {
34
34
  /** Should the number be cleaned */
35
35
  clean?: boolean;
36
36
 
37
+ /** shortens any number or currency including an abbreviation. You can combine `compact` with `currency`. It gives you zero decimal by default `decimals={0}`. Use either a boolean, or a string with "short" or "long" */
38
+ compact?: boolean | 'short' | 'long';
39
+
37
40
  /** How many decimals */
38
41
  decimals?: number;
39
42
 
@@ -53,13 +56,19 @@ export interface formatOptionParams {
53
56
  /** Currency code (ISO 4217) or `true` to use the default, `NOK`. */
54
57
  currency?: string | boolean;
55
58
 
56
- /** Intl.NumberFormat currency option – you can use false or empty string to hide the sign/name */
57
- currency_display?: string | boolean;
59
+ /** Intl.NumberFormat currency option – you can use false or empty string to hide the sign/name. Defaults to narrowSymbol when the locale is no else we default to code. */
60
+ currency_display?:
61
+ | boolean
62
+ | ''
63
+ | 'code'
64
+ | 'name'
65
+ | 'symbol'
66
+ | 'narrowSymbol';
58
67
  /** currency option */
59
68
  currency_position?: formatCurrencyPosition;
60
69
  /** hides the currency sign */
61
70
  omit_currency_sign?: boolean;
62
- /** will remove all extra signs,like a currency sign or percent sign for the cleanedValue return when returnAria is true */
71
+ /** will remove all extra signs, like a currency sign or percent sign for the cleanedValue return when returnAria is true */
63
72
  clean_copy_value?: boolean;
64
73
 
65
74
  /** Intl.NumberFormat options (NumberFormatOptions) */
@@ -64,6 +64,8 @@ require("core-js/modules/es.string.ends-with.js");
64
64
 
65
65
  require("core-js/modules/es.array.find.js");
66
66
 
67
+ require("core-js/modules/es.parse-int.js");
68
+
67
69
  var _react = _interopRequireDefault(require("react"));
68
70
 
69
71
  var _Context = _interopRequireDefault(require("../../shared/Context"));
@@ -100,6 +102,8 @@ var format = function format(value) {
100
102
  locale = _ref$locale === void 0 ? null : _ref$locale,
101
103
  _ref$clean = _ref.clean,
102
104
  clean = _ref$clean === void 0 ? false : _ref$clean,
105
+ _ref$compact = _ref.compact,
106
+ compact = _ref$compact === void 0 ? null : _ref$compact,
103
107
  _ref$phone = _ref.phone,
104
108
  phone = _ref$phone === void 0 ? null : _ref$phone,
105
109
  _ref$org = _ref.org,
@@ -151,7 +155,7 @@ var format = function format(value) {
151
155
 
152
156
  if (parseFloat(decimals) >= 0) {
153
157
  value = formatDecimals(value, decimals, omit_rounding, opts);
154
- } else {
158
+ } else if (typeof opts.maximumFractionDigits === 'undefined') {
155
159
  opts.maximumFractionDigits = 20;
156
160
  }
157
161
 
@@ -209,6 +213,13 @@ var format = function format(value) {
209
213
  } else if ((0, _componentHelper.isTrue)(currency) || typeof currency === 'string') {
210
214
  type = 'currency';
211
215
  opts.currency = opts.currency || ((0, _componentHelper.isTrue)(currency) ? _defaults.CURRENCY : currency);
216
+ handleCompactBeforeDisplay({
217
+ value: value,
218
+ locale: locale,
219
+ compact: compact,
220
+ decimals: decimals,
221
+ opts: opts
222
+ });
212
223
 
213
224
  if (decimals === null) {
214
225
  decimals = 2;
@@ -222,7 +233,7 @@ var format = function format(value) {
222
233
  }
223
234
 
224
235
  opts.style = 'currency';
225
- opts.currencyDisplay = getFallbackCurrencyDisplay(locale, opts.currency_display || currency_display);
236
+ opts.currencyDisplay = getFallbackCurrencyDisplay(locale, opts.currencyDisplay || currency_display);
226
237
 
227
238
  if (typeof opts.minimumFractionDigits === 'undefined' && String(value).indexOf('.') === -1 && cleanedNumber % 1 === 0) {
228
239
  opts.minimumFractionDigits = 0;
@@ -271,6 +282,11 @@ var format = function format(value) {
271
282
  }
272
283
  }
273
284
 
285
+ handleCompactBeforeAria({
286
+ value: value,
287
+ compact: compact,
288
+ opts: opts
289
+ });
274
290
  aria = formatNumber(cleanedNumber, locale, _objectSpread(_objectSpread({
275
291
  minimumFractionDigits: 0,
276
292
  maximumFractionDigits: 2
@@ -286,12 +302,21 @@ var format = function format(value) {
286
302
  aria = prepareMinus(aria, locale);
287
303
  }
288
304
  } else {
305
+ handleCompactBeforeDisplay({
306
+ value: value,
307
+ locale: locale,
308
+ compact: compact,
309
+ decimals: decimals,
310
+ opts: opts
311
+ });
289
312
  display = formatNumber(value, locale, opts);
290
313
  display = prepareMinus(display, locale);
291
- aria = formatNumber(value, locale, _objectSpread(_objectSpread({}, opts), {}, {
292
- minimumFractionDigits: 1,
293
- maximumFractionDigits: 20
294
- }));
314
+ handleCompactBeforeAria({
315
+ value: value,
316
+ compact: compact,
317
+ opts: opts
318
+ });
319
+ aria = formatNumber(value, locale, opts);
295
320
  aria = enhanceSR(value, aria, locale);
296
321
  }
297
322
 
@@ -318,7 +343,7 @@ var format = function format(value) {
318
343
  });
319
344
  } else {
320
345
  var thousandsSeparator = getThousandsSeparator(locale);
321
- cleanedValue = display.replace(new RegExp("".concat(thousandsSeparator, "(?=\\d{3})"), 'g'), '');
346
+ cleanedValue = String(display).replace(new RegExp("".concat(thousandsSeparator, "(?=\\d{3})"), 'g'), '');
322
347
  }
323
348
 
324
349
  return {
@@ -965,4 +990,78 @@ function formatToParts(_ref9) {
965
990
  return [{
966
991
  value: number
967
992
  }];
993
+ }
994
+
995
+ function handleCompactBeforeDisplay() {
996
+ var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
997
+ value = _ref10.value,
998
+ locale = _ref10.locale,
999
+ compact = _ref10.compact,
1000
+ _ref10$decimals = _ref10.decimals,
1001
+ decimals = _ref10$decimals === void 0 ? 0 : _ref10$decimals,
1002
+ opts = _ref10.opts;
1003
+
1004
+ if (!canHandleCompact({
1005
+ value: value,
1006
+ compact: compact
1007
+ })) {
1008
+ return;
1009
+ }
1010
+
1011
+ value = parseInt(Math.abs(value));
1012
+ opts.notation = 'compact';
1013
+
1014
+ if ((0, _componentHelper.isTrue)(compact) && locale && /(no|nb|nn)$/i.test(locale)) {
1015
+ opts.compactDisplay = Math.abs(value) < 1000000 ? 'long' : 'short';
1016
+ } else {
1017
+ opts.compactDisplay = !(0, _componentHelper.isTrue)(compact) ? compact : 'short';
1018
+ }
1019
+
1020
+ if (typeof opts.maximumSignificantDigits === 'undefined') {
1021
+ if (isNaN(parseFloat(decimals))) {
1022
+ decimals = 0;
1023
+ } else {
1024
+ decimals = parseFloat(decimals);
1025
+ }
1026
+
1027
+ var ref = String(value).length % 3;
1028
+
1029
+ if (ref === 2) {
1030
+ decimals += 1;
1031
+ } else if (ref === 0) {
1032
+ decimals += 2;
1033
+ }
1034
+
1035
+ opts.maximumSignificantDigits = decimals + 1;
1036
+ }
1037
+ }
1038
+
1039
+ function handleCompactBeforeAria(_ref11) {
1040
+ var value = _ref11.value,
1041
+ compact = _ref11.compact,
1042
+ opts = _ref11.opts;
1043
+
1044
+ if (!canHandleCompact({
1045
+ value: value,
1046
+ compact: compact
1047
+ })) {
1048
+ return;
1049
+ }
1050
+
1051
+ opts.compactDisplay = 'long';
1052
+ }
1053
+
1054
+ function canHandleCompact(_ref12) {
1055
+ var value = _ref12.value,
1056
+ compact = _ref12.compact;
1057
+
1058
+ if (_helpers.IS_IE11) {
1059
+ return false;
1060
+ }
1061
+
1062
+ if (compact && Math.abs(value) >= 1000) {
1063
+ return true;
1064
+ }
1065
+
1066
+ return false;
968
1067
  }
@@ -13,6 +13,11 @@ export interface TagProps {
13
13
  * Default: null
14
14
  */
15
15
  icon?: IconPrimaryIcon;
16
+ /**
17
+ * If a label is given, typical inside a table or dl (definition list), then you can disable Tag.Group as a dependent of Tag. Use `true` to omit the `Tag group required:` warning.
18
+ * Default: null
19
+ */
20
+ hasLabel?: boolean;
16
21
  /**
17
22
  * Custom className on the component root
18
23
  * Default: null
@@ -45,13 +50,7 @@ export interface TagProps {
45
50
  omitOnKeyUpDeleteEvent?: boolean;
46
51
  }
47
52
  export declare const defaultProps: {
48
- className: any;
49
53
  skeleton: boolean;
50
- text: any;
51
- children: any;
52
- icon: any;
53
- onClick: any;
54
- onDelete: any;
55
54
  omitOnKeyUpDeleteEvent: boolean;
56
55
  };
57
56
  declare const Tag: {
@@ -33,7 +33,7 @@ var _TagContext = require("./TagContext");
33
33
 
34
34
  var _IconPrimary;
35
35
 
36
- var _excluded = ["className", "skeleton", "children", "text", "onClick", "onDelete", "omitOnKeyUpDeleteEvent"];
36
+ var _excluded = ["className", "skeleton", "children", "text", "hasLabel", "onClick", "onDelete", "omitOnKeyUpDeleteEvent"];
37
37
 
38
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
39
 
@@ -44,13 +44,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
44
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; }
45
45
 
46
46
  var defaultProps = {
47
- className: null,
48
47
  skeleton: false,
49
- text: null,
50
- children: null,
51
- icon: null,
52
- onClick: null,
53
- onDelete: null,
54
48
  omitOnKeyUpDeleteEvent: false
55
49
  };
56
50
  exports.defaultProps = defaultProps;
@@ -67,6 +61,7 @@ var Tag = function Tag(localProps) {
67
61
  skeleton = _usePropsWithContext.skeleton,
68
62
  children = _usePropsWithContext.children,
69
63
  text = _usePropsWithContext.text,
64
+ hasLabel = _usePropsWithContext.hasLabel,
70
65
  onClick = _usePropsWithContext.onClick,
71
66
  onDelete = _usePropsWithContext.onDelete,
72
67
  omitOnKeyUpDeleteEvent = _usePropsWithContext.omitOnKeyUpDeleteEvent,
@@ -99,7 +94,7 @@ var Tag = function Tag(localProps) {
99
94
  buttonAttr.icon = getDeleteIcon();
100
95
  }
101
96
 
102
- if (!tagGroupContext) {
97
+ if (!tagGroupContext && !hasLabel) {
103
98
  (0, _componentHelper.warn)("Tag group required: A Tag requires a Tag.Group with label description as a parent component. This is to ensure correct semantic and accessibility.");
104
99
  }
105
100
 
@@ -554,7 +554,7 @@ var ItemContent = function ItemContent(_ref3) {
554
554
  className: "dnb-drawer-list__option__item"
555
555
  }, children.render ? children.render(item, hash + n) : item);
556
556
  });
557
- } else if (children.content) {
557
+ } else if (Object.prototype.hasOwnProperty.call(children, 'content')) {
558
558
  return children.render ? children.render(children.content, hash, children) : children.content;
559
559
  }
560
560
 
@@ -274,6 +274,8 @@ var normalizeData = function normalizeData(props) {
274
274
  }
275
275
 
276
276
  return (data || []).map(function (item, __id) {
277
+ var _item;
278
+
277
279
  if (typeof item === 'number' || typeof item === 'string' || Array.isArray(item) || _react.default.isValidElement(item)) {
278
280
  item = {
279
281
  content: item,
@@ -281,7 +283,7 @@ var normalizeData = function normalizeData(props) {
281
283
  };
282
284
  }
283
285
 
284
- return typeof item.__id !== 'undefined' ? item : _objectSpread(_objectSpread({}, item), {}, {
286
+ return typeof ((_item = item) === null || _item === void 0 ? void 0 : _item.__id) !== 'undefined' ? item : _objectSpread(_objectSpread({}, item), {}, {
285
287
  __id: __id
286
288
  });
287
289
  });
@@ -3,6 +3,7 @@ export function prepareContext(props?: {}): {
3
3
  updateTranslation: (locale: any, translation: any) => void;
4
4
  getTranslation: (props: any) => any;
5
5
  locales: any;
6
+ Button: {};
6
7
  Avatar: {};
7
8
  AvatarGroup: {};
8
9
  Breadcrumb: {};
@@ -22,6 +23,7 @@ declare const Context: React.Context<{
22
23
  updateTranslation: (locale: any, translation: any) => void;
23
24
  getTranslation: (props: any) => any;
24
25
  locales: any;
26
+ Button: {};
25
27
  Avatar: {};
26
28
  AvatarGroup: {};
27
29
  Breadcrumb: {};
@@ -80,6 +80,7 @@ var prepareContext = function prepareContext() {
80
80
  return context.translation;
81
81
  },
82
82
  locales: locales,
83
+ Button: {},
83
84
  Avatar: {},
84
85
  AvatarGroup: {},
85
86
  Breadcrumb: {},
@@ -21,7 +21,7 @@ function init() {
21
21
  _createClass(Eufemia, [{
22
22
  key: "version",
23
23
  get: function get() {
24
- return '9.23.1';
24
+ return '9.24.0';
25
25
  }
26
26
  }]);
27
27
 
@@ -72,6 +72,10 @@ declare var _default: {
72
72
  dialog_title: string;
73
73
  close_title: string;
74
74
  };
75
+ Dialog: {
76
+ declineText: string;
77
+ confirmText: string;
78
+ };
75
79
  NumberFormat: {
76
80
  clipboard_copy: string;
77
81
  };
@@ -78,6 +78,10 @@ var _default = {
78
78
  dialog_title: 'Dialog Window',
79
79
  close_title: 'Close'
80
80
  },
81
+ Dialog: {
82
+ declineText: 'Cancel',
83
+ confirmText: 'Approve'
84
+ },
81
85
  NumberFormat: {
82
86
  clipboard_copy: 'Copied'
83
87
  },
@@ -73,6 +73,10 @@ declare var _default: {
73
73
  dialog_title: string;
74
74
  close_title: string;
75
75
  };
76
+ Dialog: {
77
+ declineText: string;
78
+ confirmText: string;
79
+ };
76
80
  NumberFormat: {
77
81
  clipboard_copy: string;
78
82
  };
@@ -72,6 +72,10 @@ declare var _default: {
72
72
  dialog_title: string;
73
73
  close_title: string;
74
74
  };
75
+ Dialog: {
76
+ declineText: string;
77
+ confirmText: string;
78
+ };
75
79
  NumberFormat: {
76
80
  clipboard_copy: string;
77
81
  };
@@ -188,6 +192,10 @@ declare var _default: {
188
192
  dialog_title: string;
189
193
  close_title: string;
190
194
  };
195
+ Dialog: {
196
+ declineText: string;
197
+ confirmText: string;
198
+ };
191
199
  NumberFormat: {
192
200
  clipboard_copy: string;
193
201
  };
@@ -72,6 +72,10 @@ declare var _default: {
72
72
  dialog_title: string;
73
73
  close_title: string;
74
74
  };
75
+ Dialog: {
76
+ declineText: string;
77
+ confirmText: string;
78
+ };
75
79
  NumberFormat: {
76
80
  clipboard_copy: string;
77
81
  };
@@ -78,6 +78,10 @@ var _default = {
78
78
  dialog_title: 'Separat Vindu',
79
79
  close_title: 'Lukk'
80
80
  },
81
+ Dialog: {
82
+ declineText: 'Avbryt',
83
+ confirmText: 'Godta'
84
+ },
81
85
  NumberFormat: {
82
86
  clipboard_copy: 'Kopiert'
83
87
  },
@@ -6,6 +6,7 @@ export class Translation extends React.PureComponent<any, any, any> {
6
6
  updateTranslation: (locale: any, translation: any) => void;
7
7
  getTranslation: (props: any) => any;
8
8
  locales: any;
9
+ Button: {};
9
10
  Avatar: {};
10
11
  AvatarGroup: {};
11
12
  Breadcrumb: {};