@dnb/eufemia 9.12.4 → 9.13.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 +11 -10
- package/cjs/components/autocomplete/Autocomplete.js +9 -16
- package/cjs/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +4 -0
- package/cjs/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +3 -0
- package/cjs/components/button/style/themes/_button-mixins.scss +14 -5
- package/cjs/components/button/style/themes/dnb-button-theme-open-banking.css +10 -10
- package/cjs/components/button/style/themes/dnb-button-theme-ui.css +10 -10
- package/cjs/components/button/style/themes/dnb-button-theme-ui.scss +1 -0
- package/cjs/components/date-picker/DatePickerAddon.js +1 -1
- package/cjs/components/date-picker/DatePickerCalc.js +2 -0
- package/cjs/components/date-picker/DatePickerCalendar.js +2 -2
- package/cjs/components/date-picker/DatePickerFooter.js +2 -2
- package/cjs/components/date-picker/DatePickerInput.js +18 -21
- package/cjs/components/date-picker/DatePickerProvider.js +4 -18
- package/cjs/components/dropdown/Dropdown.js +2 -0
- package/cjs/components/form-status/FormStatus.js +2 -0
- package/cjs/components/global-error/GlobalError.js +2 -0
- package/cjs/components/global-status/GlobalStatus.d.ts +1 -1
- package/cjs/components/global-status/GlobalStatus.js +2 -0
- package/cjs/components/heading/Heading.js +2 -0
- package/cjs/components/heading/HeadingCounter.js +2 -0
- package/cjs/components/heading/HeadingHelpers.js +2 -0
- package/cjs/components/heading/HeadingProvider.js +2 -0
- package/cjs/components/icon/Icon.js +2 -0
- package/cjs/components/input/Input.js +2 -0
- package/cjs/components/input-masked/InputMasked.js +25 -29
- package/cjs/components/logo/Logo.js +2 -0
- package/cjs/components/modal/Modal.js +2 -0
- package/cjs/components/modal/ModalContent.js +7 -3
- package/cjs/components/number-format/NumberUtils.js +2 -0
- package/cjs/components/pagination/PaginationInfinity.js +2 -0
- package/cjs/components/pagination/PaginationProvider.js +2 -0
- package/cjs/components/progress-indicator/ProgressIndicator.js +2 -0
- package/cjs/components/progress-indicator/ProgressIndicatorCircular.js +2 -0
- package/cjs/components/progress-indicator/ProgressIndicatorLinear.js +2 -0
- package/cjs/components/slider/Slider.js +2 -0
- package/cjs/components/space/SpacingHelper.js +2 -0
- package/cjs/components/step-indicator/StepIndicator.js +2 -0
- package/cjs/components/tabs/Tabs.js +2 -0
- package/cjs/components/textarea/Textarea.js +2 -0
- package/cjs/components/tooltip/TooltipPortal.js +2 -0
- package/cjs/components/tooltip/TooltipWithEvents.js +2 -0
- package/cjs/elements/H.js +2 -0
- package/cjs/elements/Table.js +2 -0
- package/cjs/extensions/payment-card/PaymentCard.js +2 -0
- package/cjs/fragments/drawer-list/DrawerList.js +2 -0
- package/cjs/fragments/drawer-list/DrawerListHelpers.js +2 -0
- package/cjs/fragments/drawer-list/DrawerListPortal.js +2 -0
- package/cjs/fragments/drawer-list/DrawerListProvider.js +9 -1
- package/cjs/shared/AnimateHeight.js +2 -0
- package/cjs/shared/component-helper.js +2 -0
- package/cjs/style/stylis.js +2 -0
- package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.css +24 -20
- package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +2 -2
- package/cjs/style/themes/theme-ui/dnb-theme-ui.css +14 -10
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/components/autocomplete/Autocomplete.js +8 -16
- package/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +4 -0
- package/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +3 -0
- package/components/button/style/themes/_button-mixins.scss +14 -5
- package/components/button/style/themes/dnb-button-theme-open-banking.css +10 -10
- package/components/button/style/themes/dnb-button-theme-ui.css +10 -10
- package/components/button/style/themes/dnb-button-theme-ui.scss +1 -0
- package/components/date-picker/DatePickerAddon.js +1 -1
- package/components/date-picker/DatePickerCalc.js +1 -0
- package/components/date-picker/DatePickerCalendar.js +2 -2
- package/components/date-picker/DatePickerFooter.js +2 -2
- package/components/date-picker/DatePickerInput.js +17 -21
- package/components/date-picker/DatePickerProvider.js +4 -18
- package/components/dropdown/Dropdown.js +1 -0
- package/components/form-status/FormStatus.js +1 -0
- package/components/global-error/GlobalError.js +1 -0
- package/components/global-status/GlobalStatus.d.ts +1 -1
- package/components/global-status/GlobalStatus.js +1 -0
- package/components/heading/Heading.js +2 -0
- package/components/heading/HeadingCounter.js +1 -0
- package/components/heading/HeadingHelpers.js +1 -0
- package/components/heading/HeadingProvider.js +1 -0
- package/components/icon/Icon.js +1 -0
- package/components/input/Input.js +1 -0
- package/components/input-masked/InputMasked.js +24 -29
- package/components/logo/Logo.js +2 -0
- package/components/modal/Modal.js +1 -0
- package/components/modal/ModalContent.js +6 -3
- package/components/number-format/NumberUtils.js +1 -0
- package/components/pagination/PaginationInfinity.js +1 -0
- package/components/pagination/PaginationProvider.js +1 -0
- package/components/progress-indicator/ProgressIndicator.js +1 -0
- package/components/progress-indicator/ProgressIndicatorCircular.js +2 -0
- package/components/progress-indicator/ProgressIndicatorLinear.js +2 -0
- package/components/slider/Slider.js +1 -0
- package/components/space/SpacingHelper.js +1 -0
- package/components/step-indicator/StepIndicator.js +1 -0
- package/components/tabs/Tabs.js +1 -0
- package/components/textarea/Textarea.js +2 -0
- package/components/tooltip/TooltipPortal.js +1 -0
- package/components/tooltip/TooltipWithEvents.js +2 -0
- package/elements/H.js +2 -0
- package/elements/Table.js +1 -0
- package/es/components/autocomplete/Autocomplete.js +5 -15
- package/es/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +4 -0
- package/es/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +3 -0
- package/es/components/button/style/themes/_button-mixins.scss +14 -5
- package/es/components/button/style/themes/dnb-button-theme-open-banking.css +10 -10
- package/es/components/button/style/themes/dnb-button-theme-ui.css +10 -10
- package/es/components/button/style/themes/dnb-button-theme-ui.scss +1 -0
- package/es/components/date-picker/DatePickerAddon.js +1 -1
- package/es/components/date-picker/DatePickerCalendar.js +2 -2
- package/es/components/date-picker/DatePickerFooter.js +2 -2
- package/es/components/date-picker/DatePickerInput.js +17 -21
- package/es/components/date-picker/DatePickerProvider.js +4 -14
- package/es/components/global-status/GlobalStatus.d.ts +1 -1
- package/es/components/input-masked/InputMasked.js +23 -27
- package/es/components/modal/ModalContent.js +5 -3
- package/es/fragments/drawer-list/DrawerListProvider.js +7 -1
- package/es/style/themes/theme-open-banking/dnb-theme-open-banking.css +24 -20
- package/es/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +2 -2
- package/es/style/themes/theme-ui/dnb-theme-ui.css +14 -10
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/esm/components/autocomplete/Autocomplete.js +8 -16
- package/esm/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.css +4 -0
- package/esm/components/autocomplete/style/themes/dnb-autocomplete-theme-ui.scss +3 -0
- package/esm/components/button/style/themes/_button-mixins.scss +14 -5
- package/esm/components/button/style/themes/dnb-button-theme-open-banking.css +10 -10
- package/esm/components/button/style/themes/dnb-button-theme-ui.css +10 -10
- package/esm/components/button/style/themes/dnb-button-theme-ui.scss +1 -0
- package/esm/components/date-picker/DatePickerAddon.js +1 -1
- package/esm/components/date-picker/DatePickerCalc.js +1 -0
- package/esm/components/date-picker/DatePickerCalendar.js +2 -2
- package/esm/components/date-picker/DatePickerFooter.js +2 -2
- package/esm/components/date-picker/DatePickerInput.js +17 -21
- package/esm/components/date-picker/DatePickerProvider.js +4 -18
- package/esm/components/dropdown/Dropdown.js +1 -0
- package/esm/components/form-status/FormStatus.js +1 -0
- package/esm/components/global-error/GlobalError.js +1 -0
- package/esm/components/global-status/GlobalStatus.d.ts +1 -1
- package/esm/components/global-status/GlobalStatus.js +1 -0
- package/esm/components/heading/Heading.js +2 -0
- package/esm/components/heading/HeadingCounter.js +1 -0
- package/esm/components/heading/HeadingHelpers.js +1 -0
- package/esm/components/heading/HeadingProvider.js +1 -0
- package/esm/components/icon/Icon.js +1 -0
- package/esm/components/input/Input.js +1 -0
- package/esm/components/input-masked/InputMasked.js +24 -29
- package/esm/components/logo/Logo.js +2 -0
- package/esm/components/modal/Modal.js +1 -0
- package/esm/components/modal/ModalContent.js +6 -3
- package/esm/components/number-format/NumberUtils.js +1 -0
- package/esm/components/pagination/PaginationInfinity.js +1 -0
- package/esm/components/pagination/PaginationProvider.js +1 -0
- package/esm/components/progress-indicator/ProgressIndicator.js +1 -0
- package/esm/components/progress-indicator/ProgressIndicatorCircular.js +2 -0
- package/esm/components/progress-indicator/ProgressIndicatorLinear.js +2 -0
- package/esm/components/slider/Slider.js +1 -0
- package/esm/components/space/SpacingHelper.js +1 -0
- package/esm/components/step-indicator/StepIndicator.js +1 -0
- package/esm/components/tabs/Tabs.js +1 -0
- package/esm/components/textarea/Textarea.js +2 -0
- package/esm/components/tooltip/TooltipPortal.js +1 -0
- package/esm/components/tooltip/TooltipWithEvents.js +2 -0
- package/esm/dnb-ui-basis.min.mjs +2 -2
- package/esm/dnb-ui-components.min.mjs +3 -3
- package/esm/dnb-ui-elements.min.mjs +3 -3
- package/esm/dnb-ui-extensions.min.mjs +4 -4
- package/esm/dnb-ui-lib.min.mjs +4 -4
- package/esm/dnb-ui-web-components.min.mjs +4 -4
- package/esm/elements/H.js +2 -0
- package/esm/elements/Table.js +1 -0
- package/esm/extensions/payment-card/PaymentCard.js +1 -0
- package/esm/fragments/drawer-list/DrawerList.js +1 -0
- package/esm/fragments/drawer-list/DrawerListHelpers.js +1 -0
- package/esm/fragments/drawer-list/DrawerListPortal.js +1 -0
- package/esm/fragments/drawer-list/DrawerListProvider.js +11 -3
- package/esm/shared/AnimateHeight.js +1 -0
- package/esm/shared/component-helper.js +1 -0
- package/esm/style/themes/theme-open-banking/dnb-theme-open-banking.css +24 -20
- package/esm/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +2 -2
- package/esm/style/themes/theme-ui/dnb-theme-ui.css +14 -10
- package/esm/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/extensions/payment-card/PaymentCard.js +1 -0
- package/fragments/drawer-list/DrawerList.js +1 -0
- package/fragments/drawer-list/DrawerListHelpers.js +1 -0
- package/fragments/drawer-list/DrawerListPortal.js +1 -0
- package/fragments/drawer-list/DrawerListProvider.js +11 -3
- package/package.json +8 -8
- package/shared/AnimateHeight.js +1 -0
- package/shared/component-helper.js +1 -0
- package/style/themes/theme-open-banking/dnb-theme-open-banking.css +24 -20
- package/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +2 -2
- package/style/themes/theme-ui/dnb-theme-ui.css +14 -10
- package/style/themes/theme-ui/dnb-theme-ui.min.css +2 -2
- package/umd/dnb-ui-basis.min.js +3 -3
- package/umd/dnb-ui-components.min.js +4 -4
- package/umd/dnb-ui-elements.min.js +4 -4
- package/umd/dnb-ui-extensions.min.js +5 -5
- package/umd/dnb-ui-lib.min.js +5 -5
- package/umd/dnb-ui-web-components.min.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
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
|
-
|
|
6
|
+
# [9.13.0](https://github.com/dnbexperience/eufemia/compare/v9.12.4...v9.13.0) (2021-10-04)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
10
10
|
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* fix
|
|
15
|
-
* fix
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
* ensure date-picker fires on_change event when clearing a date – but only if there has been a valid one before ([147772a](https://github.com/dnbexperience/eufemia/commit/147772ab613e02b03d360ea30e2147cabd48a854))
|
|
12
|
+
* ensure drawer-list has not animation when opening ([21dfd12](https://github.com/dnbexperience/eufemia/commit/21dfd12fc0232b902b8678e174ddbd7ac8fc198a))
|
|
13
|
+
* fix aria-modal usage ([00ab329](https://github.com/dnbexperience/eufemia/commit/00ab32930546761ef0aed9aaf98601e0c598f656))
|
|
14
|
+
* fix doc for default value of GlobalStatus's show property ([7764c83](https://github.com/dnbexperience/eufemia/commit/7764c83629fc8dd1b3f10f8b53e847f6fd461e00))
|
|
15
|
+
* fix signal button to have ocean-green outline ([9b10829](https://github.com/dnbexperience/eufemia/commit/9b1082992eb6940bb5afc64cb1719c70f8b7a08a))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **InputMasked:** revoke right alignment in favor of defaulting to left ([0bd3b5e](https://github.com/dnbexperience/eufemia/commit/0bd3b5e7d60985eeccb53ee9329b95ab846b2ad8))
|
|
@@ -45,6 +45,8 @@ require("core-js/modules/es.string.trim.js");
|
|
|
45
45
|
|
|
46
46
|
require("core-js/modules/es.array.slice.js");
|
|
47
47
|
|
|
48
|
+
require("core-js/modules/es.parse-float.js");
|
|
49
|
+
|
|
48
50
|
require("core-js/modules/es.array.includes.js");
|
|
49
51
|
|
|
50
52
|
require("core-js/modules/es.array.filter.js");
|
|
@@ -1272,22 +1274,13 @@ var AutocompleteInstance = function (_React$PureComponent2) {
|
|
|
1272
1274
|
});
|
|
1273
1275
|
} catch (e) {}
|
|
1274
1276
|
|
|
1275
|
-
|
|
1276
|
-
_this.
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
_this.setFocusOnInput();
|
|
1283
|
-
};
|
|
1284
|
-
|
|
1285
|
-
if ((0, _componentHelper.isTrue)(_this.props.no_animation)) {
|
|
1286
|
-
selectDelay();
|
|
1287
|
-
} else {
|
|
1288
|
-
clearTimeout(_this._selectTimeout);
|
|
1289
|
-
_this._selectTimeout = setTimeout(selectDelay, _DrawerListProvider.default.blurDelay);
|
|
1290
|
-
}
|
|
1277
|
+
_this.setState({
|
|
1278
|
+
inputValue: AutocompleteInstance.getCurrentDataTitle(selected_item, _this.context.drawerList.data),
|
|
1279
|
+
skipFocusDuringChange: false,
|
|
1280
|
+
_listenForPropChanges: false
|
|
1281
|
+
}, function () {
|
|
1282
|
+
return _this.setFocusOnInput();
|
|
1283
|
+
});
|
|
1291
1284
|
} else {
|
|
1292
1285
|
_this.setState({
|
|
1293
1286
|
inputValue: AutocompleteInstance.getCurrentDataTitle(selected_item, _this.context.drawerList.data),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Button mixins
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
|
-
@mixin buttonHoverStyle($color, $background-color) {
|
|
5
|
+
@mixin buttonHoverStyle($color, $background-color, $border-color) {
|
|
6
6
|
// NB: to get "over" sibling, because of the extendFakeFocus
|
|
7
7
|
// But if we would use it,
|
|
8
8
|
// then then we have to take care of places we use position="absolute", like the Modal Close button
|
|
@@ -11,12 +11,17 @@
|
|
|
11
11
|
color: $color;
|
|
12
12
|
background-color: $background-color;
|
|
13
13
|
|
|
14
|
-
@include fakeBorder(
|
|
14
|
+
@include fakeBorder($border-color, 0.125rem /*2px*/);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@mixin buttonHover(
|
|
17
|
+
@mixin buttonHover(
|
|
18
|
+
$color,
|
|
19
|
+
$background-color,
|
|
20
|
+
$border-color: var(--color-emerald-green),
|
|
21
|
+
$enable-touch: null
|
|
22
|
+
) {
|
|
18
23
|
@include hover() {
|
|
19
|
-
@include buttonHoverStyle($color, $background-color);
|
|
24
|
+
@include buttonHoverStyle($color, $background-color, $border-color);
|
|
20
25
|
|
|
21
26
|
@include IS_IE {
|
|
22
27
|
// by setting opacity to 1, we make sure we don't get the artifact of a cutted border on top and bottom
|
|
@@ -29,7 +34,11 @@
|
|
|
29
34
|
@if $enable-touch == 'touch' {
|
|
30
35
|
html[data-whatintent='touch'] & {
|
|
31
36
|
@include active() {
|
|
32
|
-
@include buttonHoverStyle(
|
|
37
|
+
@include buttonHoverStyle(
|
|
38
|
+
$color,
|
|
39
|
+
$background-color,
|
|
40
|
+
$border-color
|
|
41
|
+
);
|
|
33
42
|
}
|
|
34
43
|
}
|
|
35
44
|
}
|
|
@@ -593,16 +593,16 @@
|
|
|
593
593
|
color: var(--color-ocean-green);
|
|
594
594
|
background-color: #fdbb31;
|
|
595
595
|
background-color: var(--color-accent-yellow);
|
|
596
|
-
--border-color: var(--color-
|
|
596
|
+
--border-color: var(--color-ocean-green);
|
|
597
597
|
-webkit-box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
598
598
|
box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
599
599
|
border-color: transparent; }
|
|
600
600
|
@media screen and (-ms-high-contrast: none) {
|
|
601
601
|
html:not([data-whatintent='touch']) .dnb-button--signal:hover:not([disabled]) {
|
|
602
|
-
-webkit-box-shadow: 0 0 0 0.125rem #
|
|
603
|
-
box-shadow: 0 0 0 0.125rem #
|
|
604
|
-
-webkit-box-shadow: 0 0 0 0.125rem var(--color-
|
|
605
|
-
box-shadow: 0 0 0 0.125rem var(--color-
|
|
602
|
+
-webkit-box-shadow: 0 0 0 0.125rem #00343e;
|
|
603
|
+
box-shadow: 0 0 0 0.125rem #00343e;
|
|
604
|
+
-webkit-box-shadow: 0 0 0 0.125rem var(--color-ocean-green);
|
|
605
|
+
box-shadow: 0 0 0 0.125rem var(--color-ocean-green); } }
|
|
606
606
|
@media screen and (-ms-high-contrast: none) {
|
|
607
607
|
html:not([data-whatintent='touch']) .dnb-button--signal:hover:not([disabled]) {
|
|
608
608
|
opacity: 1; } }
|
|
@@ -615,17 +615,17 @@
|
|
|
615
615
|
color: var(--color-ocean-green);
|
|
616
616
|
background-color: #fdbb31;
|
|
617
617
|
background-color: var(--color-accent-yellow);
|
|
618
|
-
--border-color: var(--color-
|
|
618
|
+
--border-color: var(--color-ocean-green);
|
|
619
619
|
-webkit-box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
620
620
|
box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
621
621
|
border-color: transparent; }
|
|
622
622
|
@media screen and (-ms-high-contrast: none) {
|
|
623
623
|
html[data-whatintent='touch'] .dnb-button--signal:active:not([disabled]),
|
|
624
624
|
html:not([data-whatintent='touch']) html[data-whatintent='touch'] .dnb-button--signal:active:not([disabled]) {
|
|
625
|
-
-webkit-box-shadow: 0 0 0 0.125rem #
|
|
626
|
-
box-shadow: 0 0 0 0.125rem #
|
|
627
|
-
-webkit-box-shadow: 0 0 0 0.125rem var(--color-
|
|
628
|
-
box-shadow: 0 0 0 0.125rem var(--color-
|
|
625
|
+
-webkit-box-shadow: 0 0 0 0.125rem #00343e;
|
|
626
|
+
box-shadow: 0 0 0 0.125rem #00343e;
|
|
627
|
+
-webkit-box-shadow: 0 0 0 0.125rem var(--color-ocean-green);
|
|
628
|
+
box-shadow: 0 0 0 0.125rem var(--color-ocean-green); } }
|
|
629
629
|
.dnb-button--signal:focus[disabled],
|
|
630
630
|
html:not([data-whatintent='touch']) .dnb-button--signal:focus[disabled] {
|
|
631
631
|
cursor: not-allowed; }
|
|
@@ -589,16 +589,16 @@
|
|
|
589
589
|
color: var(--color-ocean-green);
|
|
590
590
|
background-color: #fdbb31;
|
|
591
591
|
background-color: var(--color-accent-yellow);
|
|
592
|
-
--border-color: var(--color-
|
|
592
|
+
--border-color: var(--color-ocean-green);
|
|
593
593
|
-webkit-box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
594
594
|
box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
595
595
|
border-color: transparent; }
|
|
596
596
|
@media screen and (-ms-high-contrast: none) {
|
|
597
597
|
html:not([data-whatintent='touch']) .dnb-button--signal:hover:not([disabled]) {
|
|
598
|
-
-webkit-box-shadow: 0 0 0 0.125rem #
|
|
599
|
-
box-shadow: 0 0 0 0.125rem #
|
|
600
|
-
-webkit-box-shadow: 0 0 0 0.125rem var(--color-
|
|
601
|
-
box-shadow: 0 0 0 0.125rem var(--color-
|
|
598
|
+
-webkit-box-shadow: 0 0 0 0.125rem #00343e;
|
|
599
|
+
box-shadow: 0 0 0 0.125rem #00343e;
|
|
600
|
+
-webkit-box-shadow: 0 0 0 0.125rem var(--color-ocean-green);
|
|
601
|
+
box-shadow: 0 0 0 0.125rem var(--color-ocean-green); } }
|
|
602
602
|
@media screen and (-ms-high-contrast: none) {
|
|
603
603
|
html:not([data-whatintent='touch']) .dnb-button--signal:hover:not([disabled]) {
|
|
604
604
|
opacity: 1; } }
|
|
@@ -611,17 +611,17 @@
|
|
|
611
611
|
color: var(--color-ocean-green);
|
|
612
612
|
background-color: #fdbb31;
|
|
613
613
|
background-color: var(--color-accent-yellow);
|
|
614
|
-
--border-color: var(--color-
|
|
614
|
+
--border-color: var(--color-ocean-green);
|
|
615
615
|
-webkit-box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
616
616
|
box-shadow: 0 0 0 0.125rem var(--border-color);
|
|
617
617
|
border-color: transparent; }
|
|
618
618
|
@media screen and (-ms-high-contrast: none) {
|
|
619
619
|
html[data-whatintent='touch'] .dnb-button--signal:active:not([disabled]),
|
|
620
620
|
html:not([data-whatintent='touch']) html[data-whatintent='touch'] .dnb-button--signal:active:not([disabled]) {
|
|
621
|
-
-webkit-box-shadow: 0 0 0 0.125rem #
|
|
622
|
-
box-shadow: 0 0 0 0.125rem #
|
|
623
|
-
-webkit-box-shadow: 0 0 0 0.125rem var(--color-
|
|
624
|
-
box-shadow: 0 0 0 0.125rem var(--color-
|
|
621
|
+
-webkit-box-shadow: 0 0 0 0.125rem #00343e;
|
|
622
|
+
box-shadow: 0 0 0 0.125rem #00343e;
|
|
623
|
+
-webkit-box-shadow: 0 0 0 0.125rem var(--color-ocean-green);
|
|
624
|
+
box-shadow: 0 0 0 0.125rem var(--color-ocean-green); } }
|
|
625
625
|
.dnb-button--signal:focus[disabled],
|
|
626
626
|
html:not([data-whatintent='touch']) .dnb-button--signal:focus[disabled] {
|
|
627
627
|
cursor: not-allowed; }
|
|
@@ -141,7 +141,7 @@ var DatePickerAddon = function (_React$PureComponent) {
|
|
|
141
141
|
_ref2$event = _ref2.event,
|
|
142
142
|
event = _ref2$event === void 0 ? null : _ref2$event;
|
|
143
143
|
|
|
144
|
-
this.context.
|
|
144
|
+
this.context.updateState({
|
|
145
145
|
startDate: startDate,
|
|
146
146
|
endDate: endDate,
|
|
147
147
|
changeMonthViews: true
|
|
@@ -233,7 +233,7 @@ var DatePickerCalendar = function (_React$PureComponent) {
|
|
|
233
233
|
|
|
234
234
|
state.changeMonthViews = true;
|
|
235
235
|
|
|
236
|
-
_this.context.
|
|
236
|
+
_this.context.updateState(state, function () {
|
|
237
237
|
_this.callOnSelect({
|
|
238
238
|
event: event,
|
|
239
239
|
nr: nr,
|
|
@@ -558,7 +558,7 @@ var DatePickerCalendar = function (_React$PureComponent) {
|
|
|
558
558
|
resetDate: resetDate,
|
|
559
559
|
event: event,
|
|
560
560
|
onSelect: function onSelect(state) {
|
|
561
|
-
return _this2.context.
|
|
561
|
+
return _this2.context.updateState(state, function () {
|
|
562
562
|
return _this2.callOnSelect({
|
|
563
563
|
event: event,
|
|
564
564
|
nr: nr,
|
|
@@ -102,7 +102,7 @@ var DatePickerFooter = function (_React$PureComponent) {
|
|
|
102
102
|
args.event.persist();
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
_this.context.
|
|
105
|
+
_this.context.updateState({
|
|
106
106
|
startDate: startDate,
|
|
107
107
|
endDate: endDate
|
|
108
108
|
}, function () {
|
|
@@ -119,7 +119,7 @@ var DatePickerFooter = function (_React$PureComponent) {
|
|
|
119
119
|
args.event.persist();
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
_this.context.
|
|
122
|
+
_this.context.updateState({
|
|
123
123
|
date: undefined,
|
|
124
124
|
startDate: undefined,
|
|
125
125
|
endDate: undefined
|
|
@@ -53,6 +53,8 @@ require("core-js/modules/es.array.reduce.js");
|
|
|
53
53
|
|
|
54
54
|
require("core-js/modules/es.string.match.js");
|
|
55
55
|
|
|
56
|
+
require("core-js/modules/es.parse-float.js");
|
|
57
|
+
|
|
56
58
|
require("core-js/modules/es.array.find-index.js");
|
|
57
59
|
|
|
58
60
|
require("core-js/modules/es.array.concat.js");
|
|
@@ -251,26 +253,22 @@ var DatePickerInput = function (_React$PureComponent) {
|
|
|
251
253
|
}());
|
|
252
254
|
|
|
253
255
|
_defineProperty(_assertThisInitialized(_this), "callOnChangeAsInvalid", function (state) {
|
|
254
|
-
var _this$context$state = _objectSpread(_objectSpread({}, _this.context), state),
|
|
255
|
-
startDate = _this$context$state.startDate,
|
|
256
|
-
endDate = _this$context$state.endDate,
|
|
257
|
-
event = _this$context$state.event;
|
|
258
|
-
|
|
259
256
|
_this.context.updateState({
|
|
260
257
|
hoverDate: null
|
|
261
|
-
})
|
|
258
|
+
}, function () {
|
|
259
|
+
if (_this.context.hasHadValidDate) {
|
|
260
|
+
var _this$context$state = _objectSpread(_objectSpread({}, _this.context), state),
|
|
261
|
+
startDate = _this$context$state.startDate,
|
|
262
|
+
endDate = _this$context$state.endDate,
|
|
263
|
+
event = _this$context$state.event;
|
|
262
264
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
_this.context.updateState({
|
|
271
|
-
hasHadValidDate: false
|
|
272
|
-
});
|
|
273
|
-
}
|
|
265
|
+
_this.context.callOnChangeHandler({
|
|
266
|
+
startDate: startDate,
|
|
267
|
+
endDate: endDate,
|
|
268
|
+
event: event
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
});
|
|
274
272
|
});
|
|
275
273
|
|
|
276
274
|
_defineProperty(_assertThisInitialized(_this), "callOnChange", function (_ref2) {
|
|
@@ -278,8 +276,7 @@ var DatePickerInput = function (_React$PureComponent) {
|
|
|
278
276
|
endDate = _ref2.endDate,
|
|
279
277
|
event = _ref2.event;
|
|
280
278
|
var state = {
|
|
281
|
-
changeMonthViews: true
|
|
282
|
-
hasHadValidDate: false
|
|
279
|
+
changeMonthViews: true
|
|
283
280
|
};
|
|
284
281
|
|
|
285
282
|
if (typeof startDate !== 'undefined' && (0, _isValid.default)(startDate)) {
|
|
@@ -294,7 +291,7 @@ var DatePickerInput = function (_React$PureComponent) {
|
|
|
294
291
|
state.endDate = endDate;
|
|
295
292
|
}
|
|
296
293
|
|
|
297
|
-
_this.context.
|
|
294
|
+
_this.context.updateState(state, function () {
|
|
298
295
|
if (typeof startDate !== 'undefined' && (0, _isValid.default)(startDate) || typeof endDate !== 'undefined' && (0, _isValid.default)(endDate)) {
|
|
299
296
|
_this.context.callOnChangeHandler({
|
|
300
297
|
event: event
|
|
@@ -607,7 +604,7 @@ var DatePickerInput = function (_React$PureComponent) {
|
|
|
607
604
|
} else {
|
|
608
605
|
var _this$callOnChangeAsI;
|
|
609
606
|
|
|
610
|
-
_this.context.
|
|
607
|
+
_this.context.updateState(_defineProperty({}, "".concat(mode, "Date"), null));
|
|
611
608
|
|
|
612
609
|
_this.context.updateState(_defineProperty({}, "__".concat(mode).concat(type), value));
|
|
613
610
|
|
|
@@ -127,23 +127,8 @@ var DatePickerProvider = function (_React$PureComponent) {
|
|
|
127
127
|
}), cb);
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
-
_defineProperty(_assertThisInitialized(_this), "setDate", function (state) {
|
|
131
|
-
var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
132
|
-
|
|
133
|
-
_this.setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
134
|
-
_listenForPropChanges: false
|
|
135
|
-
}), cb);
|
|
136
|
-
|
|
137
|
-
var startDateIsValid = Boolean(state.startDate && (0, _isValid.default)(state.startDate));
|
|
138
|
-
var endDateIsValid = Boolean(state.endDate && (0, _isValid.default)(state.endDate));
|
|
139
|
-
|
|
140
|
-
_this.setState({
|
|
141
|
-
hasHadValidDate: startDateIsValid || endDateIsValid
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
|
|
145
130
|
_defineProperty(_assertThisInitialized(_this), "callOnChangeHandler", function (args) {
|
|
146
|
-
if (_this.state.lastEventCallCache &&
|
|
131
|
+
if (_this.state.lastEventCallCache && _this.state.lastEventCallCache.startDate === _this.state.startDate && _this.state.lastEventCallCache.endDate === _this.state.endDate) {
|
|
147
132
|
return;
|
|
148
133
|
}
|
|
149
134
|
|
|
@@ -228,7 +213,6 @@ var DatePickerProvider = function (_React$PureComponent) {
|
|
|
228
213
|
value: _objectSpread(_objectSpread({
|
|
229
214
|
translation: this.context.translation,
|
|
230
215
|
setViews: this.setViews,
|
|
231
|
-
setDate: this.setDate,
|
|
232
216
|
updateState: this.updateState,
|
|
233
217
|
getReturnObject: this.getReturnObject,
|
|
234
218
|
callOnChangeHandler: this.callOnChangeHandler,
|
|
@@ -304,7 +288,7 @@ var DatePickerProvider = function (_React$PureComponent) {
|
|
|
304
288
|
}
|
|
305
289
|
}
|
|
306
290
|
|
|
307
|
-
if (state.lastEventCallCache && (
|
|
291
|
+
if (state.lastEventCallCache && (state.lastEventCallCache.startDate !== state.startDate || state.lastEventCallCache.endDate !== state.endDate)) {
|
|
308
292
|
state.lastEventCallCache = {};
|
|
309
293
|
}
|
|
310
294
|
|
|
@@ -312,6 +296,7 @@ var DatePickerProvider = function (_React$PureComponent) {
|
|
|
312
296
|
state.__startDay = pad((0, _format.default)(state.startDate, 'dd'), 2);
|
|
313
297
|
state.__startMonth = pad((0, _format.default)(state.startDate, 'MM'), 2);
|
|
314
298
|
state.__startYear = (0, _format.default)(state.startDate, 'yyyy');
|
|
299
|
+
state.hasHadValidDate = true;
|
|
315
300
|
} else if (state.startDate === undefined) {
|
|
316
301
|
state.__startDay = null;
|
|
317
302
|
state.__startMonth = null;
|
|
@@ -322,6 +307,7 @@ var DatePickerProvider = function (_React$PureComponent) {
|
|
|
322
307
|
state.__endDay = pad((0, _format.default)(state.endDate, 'dd'), 2);
|
|
323
308
|
state.__endMonth = pad((0, _format.default)(state.endDate, 'MM'), 2);
|
|
324
309
|
state.__endYear = (0, _format.default)(state.endDate, 'yyyy');
|
|
310
|
+
state.hasHadValidDate = true;
|
|
325
311
|
} else if (state.endDate === undefined) {
|
|
326
312
|
state.__endDay = null;
|
|
327
313
|
state.__endMonth = null;
|
|
@@ -52,6 +52,8 @@ require("core-js/modules/es.string.split.js");
|
|
|
52
52
|
|
|
53
53
|
require("core-js/modules/es.array.reduce.js");
|
|
54
54
|
|
|
55
|
+
require("core-js/modules/es.parse-float.js");
|
|
56
|
+
|
|
55
57
|
var _react = _interopRequireDefault(require("react"));
|
|
56
58
|
|
|
57
59
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -49,6 +49,8 @@ require("core-js/modules/es.array.map.js");
|
|
|
49
49
|
|
|
50
50
|
require("core-js/modules/es.array.filter.js");
|
|
51
51
|
|
|
52
|
+
require("core-js/modules/es.parse-float.js");
|
|
53
|
+
|
|
52
54
|
var _react = _interopRequireDefault(require("react"));
|
|
53
55
|
|
|
54
56
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -95,7 +95,7 @@ export interface GlobalStatusProps extends React.HTMLProps<HTMLElement> {
|
|
|
95
95
|
state?: GlobalStatusState;
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
|
-
* Set to `true` or `false` to manually make the global status visible. Defaults to `
|
|
98
|
+
* Set to `true` or `false` to manually make the global status visible. Defaults to `true`.
|
|
99
99
|
*/
|
|
100
100
|
show?: GlobalStatusShow;
|
|
101
101
|
|
|
@@ -57,6 +57,8 @@ Object.defineProperty(exports, "setNextLevel", {
|
|
|
57
57
|
});
|
|
58
58
|
exports.default = exports.levelResolution = void 0;
|
|
59
59
|
|
|
60
|
+
require("core-js/modules/es.parse-float.js");
|
|
61
|
+
|
|
60
62
|
var _react = _interopRequireDefault(require("react"));
|
|
61
63
|
|
|
62
64
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.Counter = exports.initCounter = void 0;
|
|
7
7
|
|
|
8
|
+
require("core-js/modules/es.parse-float.js");
|
|
9
|
+
|
|
8
10
|
var _HeadingHelpers = require("./HeadingHelpers");
|
|
9
11
|
|
|
10
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -33,6 +33,8 @@ exports.globalNextLevel = exports.globalResetNextTime = exports.correctHeadingLe
|
|
|
33
33
|
|
|
34
34
|
require("core-js/modules/es.array.find.js");
|
|
35
35
|
|
|
36
|
+
require("core-js/modules/es.parse-float.js");
|
|
37
|
+
|
|
36
38
|
require("core-js/modules/es.array.concat.js");
|
|
37
39
|
|
|
38
40
|
require("core-js/modules/es.array.filter.js");
|
|
@@ -35,6 +35,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
35
35
|
});
|
|
36
36
|
exports.default = void 0;
|
|
37
37
|
|
|
38
|
+
require("core-js/modules/es.parse-float.js");
|
|
39
|
+
|
|
38
40
|
var _react = _interopRequireDefault(require("react"));
|
|
39
41
|
|
|
40
42
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -53,6 +53,8 @@ require("core-js/modules/es.array.filter.js");
|
|
|
53
53
|
|
|
54
54
|
require("core-js/modules/es.array.includes.js");
|
|
55
55
|
|
|
56
|
+
require("core-js/modules/es.parse-float.js");
|
|
57
|
+
|
|
56
58
|
require("core-js/modules/es.string.includes.js");
|
|
57
59
|
|
|
58
60
|
require("core-js/modules/es.string.replace.js");
|
|
@@ -39,6 +39,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
39
39
|
});
|
|
40
40
|
exports.SubmitButton = exports.default = exports.inputPropTypes = void 0;
|
|
41
41
|
|
|
42
|
+
require("core-js/modules/es.parse-float.js");
|
|
43
|
+
|
|
42
44
|
require("core-js/modules/es.array.concat.js");
|
|
43
45
|
|
|
44
46
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -37,7 +37,9 @@ require("core-js/modules/es.symbol.iterator.js");
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", {
|
|
38
38
|
value: true
|
|
39
39
|
});
|
|
40
|
-
exports.
|
|
40
|
+
exports.correctPositionSelection = exports.default = void 0;
|
|
41
|
+
|
|
42
|
+
require("core-js/modules/es.parse-float.js");
|
|
41
43
|
|
|
42
44
|
require("core-js/modules/es.regexp.exec.js");
|
|
43
45
|
|
|
@@ -262,24 +264,17 @@ var InputMasked = function (_React$PureComponent) {
|
|
|
262
264
|
allowDecimal: ((_number_mask = number_mask) === null || _number_mask === void 0 ? void 0 : _number_mask.decimalLimit) > 0,
|
|
263
265
|
decimalSymbol: ','
|
|
264
266
|
}, (_this$context5 = this.context) === null || _this$context5 === void 0 ? void 0 : (_this$context5$InputM = _this$context5.InputMasked) === null || _this$context5$InputM === void 0 ? void 0 : _this$context5$InputM.number_mask), number_mask);
|
|
265
|
-
props.align = props.align || 'right';
|
|
266
267
|
} else if (currency_mask) {
|
|
267
268
|
var _this$context6, _this$context6$InputM;
|
|
268
269
|
|
|
269
270
|
show_mask = true;
|
|
270
271
|
placeholder_char = null;
|
|
271
|
-
props.align = props.align || 'right';
|
|
272
272
|
maskParams = _objectSpread(_objectSpread({
|
|
273
273
|
allowDecimal: true,
|
|
274
274
|
decimalSymbol: ','
|
|
275
275
|
}, (_this$context6 = this.context) === null || _this$context6 === void 0 ? void 0 : (_this$context6$InputM = _this$context6.InputMasked) === null || _this$context6$InputM === void 0 ? void 0 : _this$context6$InputM.currency_mask), currency_mask);
|
|
276
276
|
var fix = typeof currency_mask === 'string' ? currency_mask : typeof currency_mask.currency === 'string' ? currency_mask.currency : 'kr';
|
|
277
|
-
|
|
278
|
-
if (props.align === 'left') {
|
|
279
|
-
maskParams.prefix = "".concat(fix, " ");
|
|
280
|
-
} else {
|
|
281
|
-
maskParams.suffix = " ".concat(fix);
|
|
282
|
-
}
|
|
277
|
+
maskParams.suffix = " ".concat(fix);
|
|
283
278
|
}
|
|
284
279
|
|
|
285
280
|
if (maskParams) {
|
|
@@ -351,21 +346,21 @@ var InputMasked = function (_React$PureComponent) {
|
|
|
351
346
|
};
|
|
352
347
|
|
|
353
348
|
props.onMouseUp = function (event) {
|
|
354
|
-
|
|
349
|
+
correctPositionSelection(event, maskParams);
|
|
355
350
|
callEvent({
|
|
356
351
|
event: event
|
|
357
352
|
}, 'on_mouse_up');
|
|
358
353
|
};
|
|
359
354
|
|
|
360
355
|
props.onTouchEnd = function (event) {
|
|
361
|
-
|
|
356
|
+
correctPositionSelection(event, maskParams);
|
|
362
357
|
callEvent({
|
|
363
358
|
event: event
|
|
364
359
|
}, 'on_touch_end');
|
|
365
360
|
};
|
|
366
361
|
|
|
367
362
|
props.on_focus = function (params) {
|
|
368
|
-
|
|
363
|
+
correctPositionSelection(params.event, maskParams);
|
|
369
364
|
callEvent(params, 'on_focus');
|
|
370
365
|
};
|
|
371
366
|
|
|
@@ -470,28 +465,29 @@ process.env.NODE_ENV !== "production" ? InputMasked.propTypes = _objectSpread({
|
|
|
470
465
|
on_submit_blur: _propTypes.default.func
|
|
471
466
|
}, _Input.inputPropTypes) : void 0;
|
|
472
467
|
|
|
473
|
-
var
|
|
474
|
-
var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
475
|
-
_ref3$align = _ref3.align,
|
|
476
|
-
align = _ref3$align === void 0 ? 'right' : _ref3$align;
|
|
477
|
-
|
|
468
|
+
var correctPositionSelection = function correctPositionSelection(event, maskParams) {
|
|
478
469
|
clearTimeout(_selectionTimeout);
|
|
479
470
|
_selectionTimeout = setTimeout(function () {
|
|
480
|
-
if ((0, _NumberUtils.cleanNumber)(elem.value).length > 0) {
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
471
|
try {
|
|
485
|
-
var
|
|
472
|
+
var fix = (maskParams === null || maskParams === void 0 ? void 0 : maskParams.suffix) || (maskParams === null || maskParams === void 0 ? void 0 : maskParams.prefix);
|
|
486
473
|
|
|
487
|
-
if (
|
|
488
|
-
var
|
|
474
|
+
if (fix) {
|
|
475
|
+
var elem = event.target;
|
|
476
|
+
var start = elem.selectionStart;
|
|
477
|
+
var fixStart = elem.value.indexOf(fix);
|
|
478
|
+
var fixEnd = fixStart + fix.length;
|
|
489
479
|
|
|
490
|
-
if (
|
|
491
|
-
pos =
|
|
492
|
-
}
|
|
480
|
+
if (start >= fixStart && start <= fixEnd) {
|
|
481
|
+
var pos = 0;
|
|
493
482
|
|
|
494
|
-
|
|
483
|
+
if (fixStart === 1) {
|
|
484
|
+
pos = fixStart - 1;
|
|
485
|
+
} else {
|
|
486
|
+
pos = fixStart;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
elem.setSelectionRange(pos, pos);
|
|
490
|
+
}
|
|
495
491
|
}
|
|
496
492
|
} catch (e) {
|
|
497
493
|
(0, _componentHelper.warn)(e);
|
|
@@ -499,6 +495,6 @@ var fixPositionIssue = function fixPositionIssue(elem) {
|
|
|
499
495
|
}, 1);
|
|
500
496
|
};
|
|
501
497
|
|
|
502
|
-
exports.
|
|
498
|
+
exports.correctPositionSelection = correctPositionSelection;
|
|
503
499
|
|
|
504
500
|
var _selectionTimeout;
|