@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.
- package/CHANGELOG.md +17 -0
- package/cjs/components/avatar/Avatar.d.ts +6 -5
- package/cjs/components/avatar/Avatar.js +4 -8
- package/cjs/components/breadcrumb/Breadcrumb.d.ts +0 -6
- package/cjs/components/breadcrumb/Breadcrumb.js +1 -7
- package/cjs/components/dialog/Dialog.d.ts +2 -1
- package/cjs/components/dialog/Dialog.js +79 -51
- package/cjs/components/dialog/DialogContent.d.ts +1 -1
- package/cjs/components/dialog/DialogContent.js +50 -12
- package/cjs/components/dialog/parts/DialogAction.d.ts +34 -0
- package/cjs/components/dialog/parts/DialogAction.js +136 -0
- package/cjs/components/dialog/style/_dialog.scss +152 -72
- package/cjs/components/dialog/style/dnb-dialog.css +352 -199
- package/cjs/components/dialog/style/dnb-dialog.min.css +1 -1
- package/cjs/components/dialog/types.d.ts +20 -2
- package/cjs/components/drawer/style/dnb-drawer.css +177 -100
- package/cjs/components/drawer/style/dnb-drawer.min.css +1 -1
- package/cjs/components/form-status/FormStatus.d.ts +19 -2
- package/cjs/components/form-status/FormStatus.js +27 -3
- package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
- package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
- package/cjs/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
- package/cjs/components/info-card/InfoCard.d.ts +0 -9
- package/cjs/components/info-card/InfoCard.js +0 -9
- package/cjs/components/modal/Modal.d.ts +1 -0
- package/cjs/components/modal/Modal.js +1 -1
- package/cjs/components/modal/ModalContent.js +13 -5
- package/cjs/components/modal/parts/CloseButton.d.ts +1 -0
- package/cjs/components/modal/style/_modal.scss +1 -0
- package/cjs/components/modal/style/dnb-modal.css +177 -100
- package/cjs/components/modal/style/dnb-modal.min.css +1 -1
- package/cjs/components/modal/types.d.ts +9 -1
- package/cjs/components/number-format/NumberFormat.d.ts +7 -1
- package/cjs/components/number-format/NumberFormat.js +5 -1
- package/cjs/components/number-format/NumberUtils.d.ts +12 -3
- package/cjs/components/number-format/NumberUtils.js +106 -7
- package/cjs/components/tag/Tag.d.ts +5 -6
- package/cjs/components/tag/Tag.js +3 -8
- package/cjs/fragments/drawer-list/DrawerList.js +1 -1
- package/cjs/fragments/drawer-list/DrawerListHelpers.js +3 -1
- package/cjs/shared/Context.d.ts +2 -0
- package/cjs/shared/Context.js +1 -0
- package/cjs/shared/Eufemia.js +1 -1
- package/cjs/shared/locales/en-GB.d.ts +4 -0
- package/cjs/shared/locales/en-GB.js +4 -0
- package/cjs/shared/locales/en-US.d.ts +4 -0
- package/cjs/shared/locales/index.d.ts +8 -0
- package/cjs/shared/locales/nb-NO.d.ts +4 -0
- package/cjs/shared/locales/nb-NO.js +4 -0
- package/cjs/shared/useTranslation.d.ts +1 -0
- package/cjs/style/dnb-ui-components.css +177 -100
- package/cjs/style/dnb-ui-components.min.css +2 -2
- package/cjs/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
- 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 +16 -0
- package/cjs/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/components/avatar/Avatar.d.ts +6 -5
- package/components/avatar/Avatar.js +4 -8
- package/components/breadcrumb/Breadcrumb.d.ts +0 -6
- package/components/breadcrumb/Breadcrumb.js +1 -7
- package/components/dialog/Dialog.d.ts +2 -1
- package/components/dialog/Dialog.js +78 -52
- package/components/dialog/DialogContent.d.ts +1 -1
- package/components/dialog/DialogContent.js +46 -9
- package/components/dialog/parts/DialogAction.d.ts +34 -0
- package/components/dialog/parts/DialogAction.js +96 -0
- package/components/dialog/style/_dialog.scss +152 -72
- package/components/dialog/style/dnb-dialog.css +352 -199
- package/components/dialog/style/dnb-dialog.min.css +1 -1
- package/components/dialog/types.d.ts +20 -2
- package/components/drawer/style/dnb-drawer.css +177 -100
- package/components/drawer/style/dnb-drawer.min.css +1 -1
- package/components/form-status/FormStatus.d.ts +19 -2
- package/components/form-status/FormStatus.js +23 -2
- package/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
- package/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
- package/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
- package/components/info-card/InfoCard.d.ts +0 -9
- package/components/info-card/InfoCard.js +0 -9
- package/components/modal/Modal.d.ts +1 -0
- package/components/modal/Modal.js +1 -1
- package/components/modal/ModalContent.js +13 -5
- package/components/modal/parts/CloseButton.d.ts +1 -0
- package/components/modal/style/_modal.scss +1 -0
- package/components/modal/style/dnb-modal.css +177 -100
- package/components/modal/style/dnb-modal.min.css +1 -1
- package/components/modal/types.d.ts +9 -1
- package/components/number-format/NumberFormat.d.ts +7 -1
- package/components/number-format/NumberFormat.js +5 -1
- package/components/number-format/NumberUtils.d.ts +12 -3
- package/components/number-format/NumberUtils.js +105 -7
- package/components/tag/Tag.d.ts +5 -6
- package/components/tag/Tag.js +3 -8
- package/es/components/avatar/Avatar.d.ts +6 -5
- package/es/components/avatar/Avatar.js +5 -9
- package/es/components/breadcrumb/Breadcrumb.d.ts +0 -6
- package/es/components/breadcrumb/Breadcrumb.js +1 -7
- package/es/components/dialog/Dialog.d.ts +2 -1
- package/es/components/dialog/Dialog.js +50 -22
- package/es/components/dialog/DialogContent.d.ts +1 -1
- package/es/components/dialog/DialogContent.js +40 -8
- package/es/components/dialog/parts/DialogAction.d.ts +34 -0
- package/es/components/dialog/parts/DialogAction.js +82 -0
- package/es/components/dialog/style/_dialog.scss +152 -72
- package/es/components/dialog/style/dnb-dialog.css +352 -199
- package/es/components/dialog/style/dnb-dialog.min.css +1 -1
- package/es/components/dialog/types.d.ts +20 -2
- package/es/components/drawer/style/dnb-drawer.css +177 -100
- package/es/components/drawer/style/dnb-drawer.min.css +1 -1
- package/es/components/form-status/FormStatus.d.ts +19 -2
- package/es/components/form-status/FormStatus.js +21 -2
- package/es/components/form-status/style/themes/dnb-form-status-theme-ui.css +16 -0
- package/es/components/form-status/style/themes/dnb-form-status-theme-ui.min.css +1 -1
- package/es/components/form-status/style/themes/dnb-form-status-theme-ui.scss +7 -0
- package/es/components/info-card/InfoCard.d.ts +0 -9
- package/es/components/info-card/InfoCard.js +0 -9
- package/es/components/modal/Modal.d.ts +1 -0
- package/es/components/modal/Modal.js +1 -1
- package/es/components/modal/ModalContent.js +13 -6
- package/es/components/modal/parts/CloseButton.d.ts +1 -0
- package/es/components/modal/style/_modal.scss +1 -0
- package/es/components/modal/style/dnb-modal.css +177 -100
- package/es/components/modal/style/dnb-modal.min.css +1 -1
- package/es/components/modal/types.d.ts +9 -1
- package/es/components/number-format/NumberFormat.d.ts +7 -1
- package/es/components/number-format/NumberFormat.js +5 -1
- package/es/components/number-format/NumberUtils.d.ts +12 -3
- package/es/components/number-format/NumberUtils.js +101 -7
- package/es/components/tag/Tag.d.ts +5 -6
- package/es/components/tag/Tag.js +3 -8
- package/es/fragments/drawer-list/DrawerList.js +1 -1
- package/es/fragments/drawer-list/DrawerListHelpers.js +3 -1
- package/es/shared/Context.d.ts +2 -0
- package/es/shared/Context.js +1 -0
- package/es/shared/Eufemia.js +1 -1
- package/es/shared/locales/en-GB.d.ts +4 -0
- package/es/shared/locales/en-GB.js +4 -0
- package/es/shared/locales/en-US.d.ts +4 -0
- package/es/shared/locales/index.d.ts +8 -0
- package/es/shared/locales/nb-NO.d.ts +4 -0
- package/es/shared/locales/nb-NO.js +4 -0
- package/es/shared/useTranslation.d.ts +1 -0
- package/es/style/dnb-ui-components.css +177 -100
- package/es/style/dnb-ui-components.min.css +2 -2
- package/es/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
- 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 +16 -0
- package/es/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/esm/dnb-ui-basis.min.mjs +1 -1
- package/esm/dnb-ui-components.min.mjs +1 -1
- package/esm/dnb-ui-elements.min.mjs +1 -1
- package/esm/dnb-ui-extensions.min.mjs +3 -3
- package/esm/dnb-ui-lib.min.mjs +3 -3
- package/esm/dnb-ui-web-components.min.mjs +2 -2
- package/fragments/drawer-list/DrawerList.js +1 -1
- package/fragments/drawer-list/DrawerListHelpers.js +3 -1
- package/package.json +1 -1
- package/shared/Context.d.ts +2 -0
- package/shared/Context.js +1 -0
- package/shared/Eufemia.js +1 -1
- package/shared/locales/en-GB.d.ts +4 -0
- package/shared/locales/en-GB.js +4 -0
- package/shared/locales/en-US.d.ts +4 -0
- package/shared/locales/index.d.ts +8 -0
- package/shared/locales/nb-NO.d.ts +4 -0
- package/shared/locales/nb-NO.js +4 -0
- package/shared/useTranslation.d.ts +1 -0
- package/style/dnb-ui-components.css +177 -100
- package/style/dnb-ui-components.min.css +2 -2
- package/style/themes/theme-open-banking/dnb-theme-open-banking.css +16 -0
- package/style/themes/theme-open-banking/dnb-theme-open-banking.min.css +1 -1
- package/style/themes/theme-ui/dnb-theme-ui.css +16 -0
- package/style/themes/theme-ui/dnb-theme-ui.min.css +1 -1
- package/umd/dnb-ui-basis.min.js +1 -1
- package/umd/dnb-ui-components.min.js +1 -1
- package/umd/dnb-ui-elements.min.js +1 -1
- package/umd/dnb-ui-extensions.min.js +2 -2
- package/umd/dnb-ui-lib.min.js +4 -4
- package/umd/dnb-ui-web-components.min.js +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type extendedMouseEvent = {
|
|
3
|
+
event: React.MouseEvent<HTMLElement>;
|
|
4
|
+
close: () => void;
|
|
5
|
+
};
|
|
6
|
+
interface DialogActionProps {
|
|
7
|
+
/**
|
|
8
|
+
* For dialog actions, give a custom text for the decline button.
|
|
9
|
+
*/
|
|
10
|
+
declineText?: string;
|
|
11
|
+
/**
|
|
12
|
+
* For dialog actions, give a custom text for the confirm button.
|
|
13
|
+
*/
|
|
14
|
+
confirmText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* For variant confirmation, handle the confirm action click.
|
|
17
|
+
*/
|
|
18
|
+
onConfirm?: (event: extendedMouseEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* For variant confirmation, handle the decline action click.
|
|
21
|
+
*/
|
|
22
|
+
onDecline?: (event: extendedMouseEvent) => void;
|
|
23
|
+
/**
|
|
24
|
+
* For variant confirmation, hide the default decline button and only show the confirm button.
|
|
25
|
+
*/
|
|
26
|
+
hideDecline?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Pass in custom confirm/decline buttons for action handling. Every child of type Button will be provided with a `close` function attribute.
|
|
29
|
+
*/
|
|
30
|
+
children?: React.ReactElement | Array<React.ReactElement>;
|
|
31
|
+
}
|
|
32
|
+
declare const DialogAction: ({ declineText, confirmText, hideDecline, onConfirm, onDecline, children, }: DialogActionProps) => JSX.Element;
|
|
33
|
+
export default DialogAction;
|
|
34
|
+
export type { DialogActionProps };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
import React, { useContext } from 'react';
|
|
8
|
+
import Button from '../../button/Button';
|
|
9
|
+
import { Context } from '../../../shared';
|
|
10
|
+
import ModalContext from '../../modal/ModalContext';
|
|
11
|
+
import { dispatchCustomElementEvent } from '../../../shared/component-helper';
|
|
12
|
+
|
|
13
|
+
const fallbackCloseAction = ({
|
|
14
|
+
close
|
|
15
|
+
}) => close();
|
|
16
|
+
|
|
17
|
+
const DialogAction = ({
|
|
18
|
+
declineText = null,
|
|
19
|
+
confirmText = null,
|
|
20
|
+
hideDecline = false,
|
|
21
|
+
onConfirm = fallbackCloseAction,
|
|
22
|
+
onDecline = fallbackCloseAction,
|
|
23
|
+
children
|
|
24
|
+
}) => {
|
|
25
|
+
var _translation$Dialog, _translation$Dialog2;
|
|
26
|
+
|
|
27
|
+
const {
|
|
28
|
+
translation,
|
|
29
|
+
Button: ButtonContext
|
|
30
|
+
} = useContext(Context);
|
|
31
|
+
const {
|
|
32
|
+
close
|
|
33
|
+
} = useContext(ModalContext);
|
|
34
|
+
let childrenWithCloseFunc;
|
|
35
|
+
|
|
36
|
+
if (children) {
|
|
37
|
+
childrenWithCloseFunc = React.Children.map(children, child => {
|
|
38
|
+
if (child.type === Button) {
|
|
39
|
+
return React.cloneElement(child, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
40
|
+
on_click: event => {
|
|
41
|
+
dispatchCustomElementEvent(child.props, 'on_click', {
|
|
42
|
+
event,
|
|
43
|
+
close
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}), child.props.children);
|
|
47
|
+
} else {
|
|
48
|
+
return child;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return React.createElement("div", {
|
|
54
|
+
className: "dnb-dialog__actions"
|
|
55
|
+
}, childrenWithCloseFunc, !children && !hideDecline && React.createElement(Button, {
|
|
56
|
+
text: declineText || (translation === null || translation === void 0 ? void 0 : (_translation$Dialog = translation.Dialog) === null || _translation$Dialog === void 0 ? void 0 : _translation$Dialog.declineText),
|
|
57
|
+
variant: "secondary",
|
|
58
|
+
onClick: event => {
|
|
59
|
+
dispatchCustomElementEvent({
|
|
60
|
+
onDecline
|
|
61
|
+
}, 'onDecline', {
|
|
62
|
+
event,
|
|
63
|
+
close
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
size: (ButtonContext === null || ButtonContext === void 0 ? void 0 : ButtonContext.size) || 'large'
|
|
67
|
+
}), !children && React.createElement(Button, {
|
|
68
|
+
text: confirmText || (translation === null || translation === void 0 ? void 0 : (_translation$Dialog2 = translation.Dialog) === null || _translation$Dialog2 === void 0 ? void 0 : _translation$Dialog2.confirmText),
|
|
69
|
+
variant: "primary",
|
|
70
|
+
onClick: event => {
|
|
71
|
+
dispatchCustomElementEvent({
|
|
72
|
+
onConfirm
|
|
73
|
+
}, 'onConfirm', {
|
|
74
|
+
event,
|
|
75
|
+
close
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
size: (ButtonContext === null || ButtonContext === void 0 ? void 0 : ButtonContext.size) || 'large'
|
|
79
|
+
}));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default DialogAction;
|
|
@@ -9,28 +9,34 @@
|
|
|
9
9
|
// we do this because SCSS fails by using min(100vw, 50rem) = "Incompatible units: 'rem' and 'vw'"
|
|
10
10
|
--dialog-min-width: 320px; // use px, so larger font-size don't enlarge the min, has to be under 20rem, because of spacing and later mobile fullscreen
|
|
11
11
|
--dialog-avg-width: 60vw; // content defines the size
|
|
12
|
-
--dialog-max-width:
|
|
12
|
+
--dialog-max-width: 49rem; // because of our default width --layout-large
|
|
13
|
+
--dialog-confirm-max-width: 40rem;
|
|
13
14
|
--dialog-spacing: 2rem; // should reflect --spacing-large
|
|
14
15
|
--dialog-spacing-minus: -2rem; // should reflect --spacing-large
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.dnb-dialog {
|
|
18
19
|
position: relative;
|
|
19
|
-
|
|
20
|
-
width: var(--dialog-avg-width);
|
|
21
|
-
min-width: var(--dialog-min-width);
|
|
22
|
-
max-width: var(--dialog-max-width);
|
|
23
20
|
max-height: 100vh;
|
|
24
|
-
|
|
25
|
-
@include defaultDropShadow();
|
|
26
21
|
border-radius: 0.5rem;
|
|
22
|
+
@include defaultDropShadow();
|
|
27
23
|
|
|
28
24
|
user-select: text;
|
|
29
25
|
-webkit-user-select: text; // Safari / Touch fix
|
|
30
26
|
border: none;
|
|
31
|
-
|
|
32
27
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
33
28
|
|
|
29
|
+
&--information {
|
|
30
|
+
min-width: var(--dialog-min-width);
|
|
31
|
+
width: var(--dialog-avg-width);
|
|
32
|
+
max-width: var(--dialog-max-width);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--confirmation {
|
|
36
|
+
max-width: var(--dialog-confirm-max-width);
|
|
37
|
+
margin: 0 1rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
&--auto-fullscreen {
|
|
35
41
|
@include allBelow(small) {
|
|
36
42
|
@include modalFullscreen();
|
|
@@ -39,14 +45,43 @@
|
|
|
39
45
|
&--fullscreen {
|
|
40
46
|
@include modalFullscreen();
|
|
41
47
|
}
|
|
48
|
+
&--spacing#{&}--information &__content {
|
|
49
|
+
padding-bottom: calc(var(--dialog-spacing) * 2);
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
@include IS_SAFARI_MOBILE {
|
|
52
|
+
padding-bottom: calc(var(--dialog-spacing) * 8);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--spacing#{&}--information &__inner {
|
|
57
|
+
padding-left: calc(var(--dialog-spacing) * 1.75); // 3.5rem (56px)
|
|
58
|
+
padding-right: calc(var(--dialog-spacing) * 1.75); // 3.5rem (56px)
|
|
59
|
+
|
|
60
|
+
@include allBelow(large) {
|
|
61
|
+
padding-left: calc(var(--dialog-spacing)); // 2rem (32px)
|
|
62
|
+
padding-right: calc(var(--dialog-spacing)); // 2rem (32px)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include allBelow(small) {
|
|
66
|
+
padding-left: calc(var(--dialog-spacing) / 2); // 1rem (16px)
|
|
67
|
+
padding-right: calc(var(--dialog-spacing) / 2); // 1rem (16px)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--spacing#{&}--information &__navigation.dnb-section {
|
|
72
|
+
margin-top: calc(var(--dialog-spacing)); // 2rem (32px)
|
|
73
|
+
margin-bottom: calc(var(--dialog-spacing) / 2); // 1rem (16px)
|
|
74
|
+
|
|
75
|
+
@include allBelow(medium) {
|
|
76
|
+
margin-top: calc(var(--dialog-spacing) / 2); // 1rem (16px)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&--spacing#{&}--confirmation &__inner {
|
|
81
|
+
padding: calc(var(--dialog-spacing)); // 2rem (32px)
|
|
82
|
+
|
|
83
|
+
@include IS_SAFARI_MOBILE {
|
|
84
|
+
padding-bottom: calc(var(--dialog-spacing) * 8);
|
|
50
85
|
}
|
|
51
86
|
}
|
|
52
87
|
|
|
@@ -70,25 +105,98 @@
|
|
|
70
105
|
}
|
|
71
106
|
}
|
|
72
107
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
108
|
+
&__align--centered &__inner {
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
}
|
|
112
|
+
&__align--centered &__title,
|
|
113
|
+
&__align--centered#{&}--confirmation &__content {
|
|
114
|
+
text-align: center;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&__content {
|
|
118
|
+
position: relative;
|
|
119
|
+
z-index: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&__actions {
|
|
123
|
+
padding-top: 1.5rem;
|
|
77
124
|
|
|
78
|
-
|
|
79
|
-
|
|
125
|
+
display: flex;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
width: 100%;
|
|
128
|
+
|
|
129
|
+
> :not(:last-child) {
|
|
130
|
+
margin-right: 1rem;
|
|
80
131
|
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__align--center &__content {
|
|
135
|
+
align-items: center;
|
|
136
|
+
text-align: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__align--right &__content {
|
|
140
|
+
align-items: flex-end;
|
|
141
|
+
text-align: right;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&__title ~ &__content {
|
|
145
|
+
padding-top: calc(var(--dialog-spacing) / 2);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&__title {
|
|
81
149
|
@include allBelow(medium) {
|
|
82
|
-
|
|
150
|
+
font-size: var(--font-size-large) !important;
|
|
151
|
+
line-height: var(--line-height-medium) !important;
|
|
83
152
|
}
|
|
84
153
|
@include allBelow(small) {
|
|
85
|
-
|
|
154
|
+
font-size: var(--font-size-medium) !important;
|
|
155
|
+
line-height: calc(var(--line-height-medium) - 0.25rem) !important;
|
|
86
156
|
}
|
|
87
157
|
}
|
|
88
158
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
159
|
+
&--information &__title {
|
|
160
|
+
margin-bottom: var(--spacing-small) !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&--confirmation &__title {
|
|
164
|
+
margin-bottom: var(--spacing-x-small) !important;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&__navigation.dnb-section {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
justify-content: space-between;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&__icon {
|
|
174
|
+
// Modify the border prop from the icon component
|
|
175
|
+
&__primary.dnb-icon--border::after {
|
|
176
|
+
left: -50%;
|
|
177
|
+
right: -50%;
|
|
178
|
+
top: -50%;
|
|
179
|
+
bottom: -50%;
|
|
180
|
+
|
|
181
|
+
border: none;
|
|
182
|
+
background-color: currentColor;
|
|
183
|
+
opacity: 0.1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&__primary#{&}--warning {
|
|
187
|
+
color: var(--color-fire-red);
|
|
188
|
+
|
|
189
|
+
::after {
|
|
190
|
+
background-color: var(--color-fire-red-8);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
&__primary#{&}--info {
|
|
194
|
+
color: var(--color-emerald-green);
|
|
195
|
+
|
|
196
|
+
::after {
|
|
197
|
+
background-color: var(--color-pistachio);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
92
200
|
}
|
|
93
201
|
|
|
94
202
|
// Animation in
|
|
@@ -110,35 +218,20 @@
|
|
|
110
218
|
}
|
|
111
219
|
}
|
|
112
220
|
|
|
113
|
-
&
|
|
114
|
-
position: relative;
|
|
115
|
-
z-index: 1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&--spacing &__content {
|
|
221
|
+
&__body {
|
|
119
222
|
padding-bottom: calc(var(--dialog-spacing) * 2);
|
|
120
|
-
|
|
121
|
-
@include IS_SAFARI_MOBILE {
|
|
122
|
-
padding-bottom: calc(var(--dialog-spacing) * 8);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&__align--center &__content {
|
|
127
|
-
align-items: center;
|
|
128
|
-
text-align: center;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&__align--right &__content {
|
|
132
|
-
align-items: flex-end;
|
|
133
|
-
text-align: right;
|
|
223
|
+
margin-bottom: calc(var(--dialog-spacing-minus) * 2);
|
|
134
224
|
}
|
|
135
225
|
|
|
136
|
-
&
|
|
137
|
-
|
|
226
|
+
&__header {
|
|
227
|
+
&::after {
|
|
228
|
+
top: -500%;
|
|
229
|
+
height: 600%;
|
|
230
|
+
}
|
|
138
231
|
}
|
|
139
232
|
|
|
140
|
-
&
|
|
141
|
-
&
|
|
233
|
+
&__header [class*='dnb-h--'],
|
|
234
|
+
&__header .dnb-modal__title {
|
|
142
235
|
padding: 0;
|
|
143
236
|
&:not([class*='__top']) {
|
|
144
237
|
margin-top: 0;
|
|
@@ -148,36 +241,23 @@
|
|
|
148
241
|
}
|
|
149
242
|
}
|
|
150
243
|
|
|
151
|
-
& &__header {
|
|
152
|
-
&::after {
|
|
153
|
-
top: -500%;
|
|
154
|
-
height: 600%;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
244
|
&--spacing &__header {
|
|
159
245
|
.dnb-tabs {
|
|
160
246
|
margin-top: 3.5rem;
|
|
161
247
|
}
|
|
162
248
|
}
|
|
163
249
|
|
|
164
|
-
&
|
|
165
|
-
|
|
166
|
-
margin-bottom: calc(var(--dialog-spacing-minus) * 2);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
&__navigation.dnb-section {
|
|
170
|
-
display: flex;
|
|
171
|
-
flex-direction: row;
|
|
172
|
-
justify-content: space-between;
|
|
250
|
+
&__icon ~ &__header {
|
|
251
|
+
margin-top: 1.5rem;
|
|
173
252
|
}
|
|
174
253
|
|
|
175
|
-
|
|
176
|
-
// on
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
254
|
+
@include IS_SAFARI_MOBILE() {
|
|
255
|
+
// iOS on iPhone fix
|
|
256
|
+
// Because Safari includes the navigation bar on the height
|
|
257
|
+
@media (max-height: 40em) and (orientation: landscape) {
|
|
258
|
+
&:not(#{&}--fullscreen) {
|
|
259
|
+
max-height: 80vh;
|
|
260
|
+
}
|
|
181
261
|
}
|
|
182
262
|
}
|
|
183
263
|
}
|