@eccenca/gui-elements 23.2.0-rc.1 → 23.2.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 +4 -0
- package/dist/cjs/components/Dialog/SimpleDialog.js +5 -5
- package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/cjs/components/Select/Select.js +1 -0
- package/dist/cjs/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Dialog/SimpleDialog.js +7 -7
- package/dist/esm/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/esm/components/Select/Select.js +1 -0
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/types/components/Dialog/SimpleDialog.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/Application/_header.scss +49 -58
- package/src/components/Dialog/SimpleDialog.tsx +20 -33
- package/src/components/Select/Select.tsx +3 -0
- package/src/components/Select/_select.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [23.2.0] - 2023-07-14
|
|
10
|
+
|
|
9
11
|
### Added
|
|
10
12
|
|
|
11
13
|
- linting the code automatically via git hook on commit action
|
|
@@ -73,6 +75,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
73
75
|
- `<IconButton />`
|
|
74
76
|
- prevent double tab index when it comes with an extra tooltip element attached to it
|
|
75
77
|
- prevent tooltip tab selection when button is disabled or has set inactive tabindex itself
|
|
78
|
+
- `<SimpleDialog />`
|
|
79
|
+
- `enforceFocus: false` is set by default, so that searchable selects keep focus on their search input field
|
|
76
80
|
|
|
77
81
|
### Fixed
|
|
78
82
|
|
|
@@ -17,25 +17,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.SimpleDialog = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const constants_1 = require("../../configuration/constants");
|
|
20
|
+
const IconButton_1 = __importDefault(require("../Icon/IconButton"));
|
|
20
21
|
const Card_1 = require("./../Card");
|
|
21
22
|
const Divider_1 = __importDefault(require("./../Separation/Divider"));
|
|
22
23
|
const Modal_1 = __importDefault(require("./Modal"));
|
|
23
|
-
const IconButton_1 = __importDefault(require("../Icon/IconButton"));
|
|
24
24
|
/**
|
|
25
25
|
* Simplifies the dialog display by providing a direct `Card` template for the `Modal` element.
|
|
26
26
|
* Inherits all properties from `Modal`.
|
|
27
27
|
*/
|
|
28
28
|
const SimpleDialog = (_a) => {
|
|
29
29
|
var _b;
|
|
30
|
-
var { children, canOutsideClickClose = false, canEscapeKeyClose = false, title = "", actions = null, notifications = null, hasBorder = false, preventSimpleClosing = false, intent, headerOptions, showFullScreenToggler = false, startInFullScreenMode = false, size } = _a, otherProps = __rest(_a, ["children", "canOutsideClickClose", "canEscapeKeyClose", "title", "actions", "notifications", "hasBorder", "preventSimpleClosing", "intent", "headerOptions", "showFullScreenToggler", "startInFullScreenMode", "size"]);
|
|
30
|
+
var { children, canOutsideClickClose = false, canEscapeKeyClose = false, title = "", actions = null, notifications = null, hasBorder = false, preventSimpleClosing = false, enforceFocus = false, intent, headerOptions, showFullScreenToggler = false, startInFullScreenMode = false, size } = _a, otherProps = __rest(_a, ["children", "canOutsideClickClose", "canEscapeKeyClose", "title", "actions", "notifications", "hasBorder", "preventSimpleClosing", "enforceFocus", "intent", "headerOptions", "showFullScreenToggler", "startInFullScreenMode", "size"]);
|
|
31
31
|
const [displayFullscreen, setDisplayFullscreen] = react_1.default.useState(startInFullScreenMode);
|
|
32
32
|
const showToggler = startInFullScreenMode || showFullScreenToggler;
|
|
33
33
|
const intentClassName = intent ? `${constants_1.CLASSPREFIX}-intent--${intent}` : "";
|
|
34
|
-
return (react_1.default.createElement(Modal_1.default, Object.assign({}, otherProps, { "data-test-id": (_b = otherProps["data-test-id"]) !== null && _b !== void 0 ? _b : "simpleDialogWidget", canOutsideClickClose: canOutsideClickClose || !preventSimpleClosing, canEscapeKeyClose: canEscapeKeyClose || !preventSimpleClosing, size: displayFullscreen ? "fullscreen" : size }),
|
|
34
|
+
return (react_1.default.createElement(Modal_1.default, Object.assign({ enforceFocus: enforceFocus }, otherProps, { "data-test-id": (_b = otherProps["data-test-id"]) !== null && _b !== void 0 ? _b : "simpleDialogWidget", canOutsideClickClose: canOutsideClickClose || !preventSimpleClosing, canEscapeKeyClose: canEscapeKeyClose || !preventSimpleClosing, size: displayFullscreen ? "fullscreen" : size }),
|
|
35
35
|
react_1.default.createElement(Card_1.Card, { className: intentClassName },
|
|
36
|
-
|
|
36
|
+
title || headerOptions || showToggler ? (react_1.default.createElement(Card_1.CardHeader, null,
|
|
37
37
|
react_1.default.createElement(Card_1.CardTitle, { className: intentClassName }, title),
|
|
38
|
-
|
|
38
|
+
headerOptions || showToggler ? (react_1.default.createElement(Card_1.CardOptions, null,
|
|
39
39
|
headerOptions,
|
|
40
40
|
showToggler && (react_1.default.createElement(IconButton_1.default, { name: displayFullscreen ? "toggler-minimize" : "toggler-maximize", onClick: () => setDisplayFullscreen(!displayFullscreen) })))) : (react_1.default.createElement(react_1.default.Fragment, null)))) : null,
|
|
41
41
|
hasBorder && react_1.default.createElement(Divider_1.default, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/SimpleDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"SimpleDialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/SimpleDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAG1B,6DAAsE;AACtE,oEAA4C;AAG5C,oCAA+F;AAC/F,sEAA8C;AAC9C,oDAA4C;AAwC5C;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,EAgB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iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,EACjE,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC,iBAAiB,CAAC,GACzD,CACL,CACS,CACjB,CAAC,CAAC,CAAC,CACA,6DAAK,CACR,CACQ,CAChB,CAAC,CAAC,CAAC,IAAI;YACP,SAAS,IAAI,8BAAC,iBAAO,OAAG;YACzB,8BAAC,kBAAW,QAAE,QAAQ,CAAe;YACpC,SAAS,IAAI,8BAAC,iBAAO,OAAG;YACxB,CAAC,CAAC,aAAa,IAAI,CAChB,8BAAC,kBAAW,IAAC,SAAS,EAAE,GAAG,uBAAM,wBAAwB,IAAG,aAAa,CAAe,CAC3F;YACA,OAAO,IAAI,CACR,8BAAC,kBAAW,IAAC,gBAAgB,QAAC,SAAS,EAAE,eAAe,IACnD,OAAO,CACE,CACjB,CACE,CACH,CACX,CAAC;AACN,CAAC,CAAC;AA/DW,QAAA,YAAY,gBA+DvB;AAEF,kBAAe,oBAAY,CAAC"}
|
|
@@ -38,6 +38,7 @@ function Select(_a) {
|
|
|
38
38
|
exports.Select = Select;
|
|
39
39
|
/** @deprecated: instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />` */
|
|
40
40
|
function ofType() {
|
|
41
|
+
console.warn("Usage of `ofType()` is deprecated! Instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />`");
|
|
41
42
|
return (props) => react_1.default.createElement(Select, Object.assign({}, props));
|
|
42
43
|
}
|
|
43
44
|
Select.ofType = ofType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,gDAAuG;AAEvG,6DAAsE;AAEtE,yCAA6F;AAkC7F;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,EAYT;;QAZS,EACtB,mBA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ui } from "../../configuration/constants.js";
|
|
41
|
-
import
|
|
41
|
+
import IconButton from "../Icon/IconButton.js";
|
|
42
|
+
import { Card, CardActions, CardContent, CardHeader, CardOptions, CardTitle } from "./../Card/index.js";
|
|
42
43
|
import Divider from "./../Separation/Divider.js";
|
|
43
44
|
import Modal from "./Modal.js";
|
|
44
|
-
import IconButton from "../Icon/IconButton.js";
|
|
45
45
|
/**
|
|
46
46
|
* Simplifies the dialog display by providing a direct `Card` template for the `Modal` element.
|
|
47
47
|
* Inherits all properties from `Modal`.
|
|
48
48
|
*/
|
|
49
49
|
export var SimpleDialog = function (_a) {
|
|
50
50
|
var _b;
|
|
51
|
-
var children = _a.children, _c = _a.canOutsideClickClose, canOutsideClickClose = _c === void 0 ? false : _c, _d = _a.canEscapeKeyClose, canEscapeKeyClose = _d === void 0 ? false : _d, _e = _a.title, title = _e === void 0 ? "" : _e, _f = _a.actions, actions = _f === void 0 ? null : _f, _g = _a.notifications, notifications = _g === void 0 ? null : _g, _h = _a.hasBorder, hasBorder = _h === void 0 ? false : _h, _j = _a.preventSimpleClosing, preventSimpleClosing = _j === void 0 ? false : _j, intent = _a.intent, headerOptions = _a.headerOptions,
|
|
52
|
-
var
|
|
51
|
+
var children = _a.children, _c = _a.canOutsideClickClose, canOutsideClickClose = _c === void 0 ? false : _c, _d = _a.canEscapeKeyClose, canEscapeKeyClose = _d === void 0 ? false : _d, _e = _a.title, title = _e === void 0 ? "" : _e, _f = _a.actions, actions = _f === void 0 ? null : _f, _g = _a.notifications, notifications = _g === void 0 ? null : _g, _h = _a.hasBorder, hasBorder = _h === void 0 ? false : _h, _j = _a.preventSimpleClosing, preventSimpleClosing = _j === void 0 ? false : _j, _k = _a.enforceFocus, enforceFocus = _k === void 0 ? false : _k, intent = _a.intent, headerOptions = _a.headerOptions, _l = _a.showFullScreenToggler, showFullScreenToggler = _l === void 0 ? false : _l, _m = _a.startInFullScreenMode, startInFullScreenMode = _m === void 0 ? false : _m, size = _a.size, otherProps = __rest(_a, ["children", "canOutsideClickClose", "canEscapeKeyClose", "title", "actions", "notifications", "hasBorder", "preventSimpleClosing", "enforceFocus", "intent", "headerOptions", "showFullScreenToggler", "startInFullScreenMode", "size"]);
|
|
52
|
+
var _o = __read(React.useState(startInFullScreenMode), 2), displayFullscreen = _o[0], setDisplayFullscreen = _o[1];
|
|
53
53
|
var showToggler = startInFullScreenMode || showFullScreenToggler;
|
|
54
54
|
var intentClassName = intent ? eccgui + "-intent--" + intent : "";
|
|
55
|
-
return (React.createElement(Modal, __assign({}, otherProps, { "data-test-id": (_b = otherProps["data-test-id"]) !== null && _b !== void 0 ? _b : "simpleDialogWidget", canOutsideClickClose: canOutsideClickClose || !preventSimpleClosing, canEscapeKeyClose: canEscapeKeyClose || !preventSimpleClosing, size: displayFullscreen ? "fullscreen" : size }),
|
|
55
|
+
return (React.createElement(Modal, __assign({ enforceFocus: enforceFocus }, otherProps, { "data-test-id": (_b = otherProps["data-test-id"]) !== null && _b !== void 0 ? _b : "simpleDialogWidget", canOutsideClickClose: canOutsideClickClose || !preventSimpleClosing, canEscapeKeyClose: canEscapeKeyClose || !preventSimpleClosing, size: displayFullscreen ? "fullscreen" : size }),
|
|
56
56
|
React.createElement(Card, { className: intentClassName },
|
|
57
|
-
|
|
57
|
+
title || headerOptions || showToggler ? (React.createElement(CardHeader, null,
|
|
58
58
|
React.createElement(CardTitle, { className: intentClassName }, title),
|
|
59
|
-
|
|
59
|
+
headerOptions || showToggler ? (React.createElement(CardOptions, null,
|
|
60
60
|
headerOptions,
|
|
61
61
|
showToggler && (React.createElement(IconButton, { name: displayFullscreen ? "toggler-minimize" : "toggler-maximize", onClick: function () { return setDisplayFullscreen(!displayFullscreen); } })))) : (React.createElement(React.Fragment, null)))) : null,
|
|
62
62
|
hasBorder && React.createElement(Divider, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/SimpleDialog.tsx"],"names":[],"m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AC,WAAW,IAAC,SAAS,EAAK,MAAM,2BAAwB,IAAG,aAAa,CAAe,CAC3F;YACA,OAAO,IAAI,CACR,oBAAC,WAAW,IAAC,gBAAgB,QAAC,SAAS,EAAE,eAAe,IACnD,OAAO,CACE,CACjB,CACE,CACH,CACX,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -42,6 +42,7 @@ export function Select(_a) {
|
|
|
42
42
|
}
|
|
43
43
|
/** @deprecated: instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />` */
|
|
44
44
|
function ofType() {
|
|
45
|
+
console.warn("Usage of `ofType()` is deprecated! Instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />`");
|
|
45
46
|
return function (props) { return React.createElement(Select, __assign({}, props)); };
|
|
46
47
|
}
|
|
47
48
|
Select.ofType = ofType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAwC,MAAM,qBAAqB,CAAC;AAEvG,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,MAAM,EAAoC,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAkC7F;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAI,EAYT;;IAXb,IAAA,mBAAmB,yBAAA,EACnB,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,mBAA+B,EAA/B,WAAW,mBAAG,iBAAiB,KAAA,EAC/B,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,kBAAkB,wBAAA,EAClB,UAAU,gBAAA,EACV,uBAAmC,EAAnC,eAAe,mBAAG,iBAAiB,KAAA,EACh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../../common/Intent";
|
|
3
|
-
import { ModalProps } from "./Modal";
|
|
4
3
|
import { TestableComponent } from "../interfaces";
|
|
4
|
+
import { ModalProps } from "./Modal";
|
|
5
5
|
export interface SimpleDialogProps extends ModalProps, TestableComponent {
|
|
6
6
|
/**
|
|
7
7
|
* The title of the dialog.
|
|
@@ -43,5 +43,5 @@ export interface SimpleDialogProps extends ModalProps, TestableComponent {
|
|
|
43
43
|
* Simplifies the dialog display by providing a direct `Card` template for the `Modal` element.
|
|
44
44
|
* Inherits all properties from `Modal`.
|
|
45
45
|
*/
|
|
46
|
-
export declare const SimpleDialog: ({ children, canOutsideClickClose, canEscapeKeyClose, title, actions, notifications, hasBorder, preventSimpleClosing, intent, headerOptions, showFullScreenToggler, startInFullScreenMode, size, ...otherProps }: SimpleDialogProps) => React.JSX.Element;
|
|
46
|
+
export declare const SimpleDialog: ({ children, canOutsideClickClose, canEscapeKeyClose, title, actions, notifications, hasBorder, preventSimpleClosing, enforceFocus, intent, headerOptions, showFullScreenToggler, startInFullScreenMode, size, ...otherProps }: SimpleDialogProps) => React.JSX.Element;
|
|
47
47
|
export default SimpleDialog;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eccenca/gui-elements",
|
|
3
3
|
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
|
|
4
|
-
"version": "23.2.0
|
|
4
|
+
"version": "23.2.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/eccenca/gui-elements",
|
|
7
7
|
"bugs": "https://github.com/eccenca/gui-elements/issues",
|
|
@@ -5,32 +5,37 @@
|
|
|
5
5
|
own rule patches.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
@use "sass:color";
|
|
9
|
+
|
|
8
10
|
/// Header bar background
|
|
9
11
|
$shell-header-bg-01: $eccgui-color-applicationheader-background !default;
|
|
10
12
|
|
|
11
13
|
/// Header menu trigger hover, Header nav link hover
|
|
12
|
-
$shell-header-bg-02: adjust
|
|
14
|
+
$shell-header-bg-02: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%) !default;
|
|
13
15
|
|
|
14
16
|
/// Header action active background
|
|
15
|
-
$shell-header-bg-03: adjust
|
|
17
|
+
$shell-header-bg-03: color.adjust($eccgui-color-applicationheader-background, $lightness: -10%) !default;
|
|
16
18
|
|
|
17
19
|
/// Header submenu link hover
|
|
18
|
-
$shell-header-bg-04: adjust
|
|
20
|
+
$shell-header-bg-04: color.adjust(
|
|
21
|
+
$eccgui-color-applicationheader-background,
|
|
22
|
+
$lightness: -5%
|
|
23
|
+
) !default; // TODO needs color var gray-90-hover
|
|
19
24
|
|
|
20
25
|
/// Header nav link active and focus background
|
|
21
|
-
$shell-header-bg-05: adjust
|
|
26
|
+
$shell-header-bg-05: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%) !default;
|
|
22
27
|
|
|
23
28
|
/// Header nav link submenu
|
|
24
|
-
$shell-header-bg-06: adjust
|
|
29
|
+
$shell-header-bg-06: color.adjust($eccgui-color-applicationheader-background, $lightness: -10%) !default;
|
|
25
30
|
|
|
26
31
|
/// Header border bottom
|
|
27
32
|
$shell-header-border-01: transparent !default;
|
|
28
33
|
|
|
29
34
|
/// Header focus
|
|
30
|
-
$shell-header-focus: adjust
|
|
35
|
+
$shell-header-focus: color.adjust($eccgui-color-applicationheader-text, $lightness: 39%) !default;
|
|
31
36
|
|
|
32
37
|
/// Primary text in header, Title text
|
|
33
|
-
$shell-header-text-01: adjust
|
|
38
|
+
$shell-header-text-01: color.adjust($eccgui-color-applicationheader-text, $lightness: -5%) !default;
|
|
34
39
|
|
|
35
40
|
/// Secondary text in header, Menu item nav text
|
|
36
41
|
$shell-header-text-02: $eccgui-color-applicationheader-text !default;
|
|
@@ -48,7 +53,7 @@ $shell-header-icon-03: $eccgui-color-applicationheader-text !default;
|
|
|
48
53
|
$shell-header-link: $blue-60 !default;
|
|
49
54
|
|
|
50
55
|
// load library sub component
|
|
51
|
-
@import
|
|
56
|
+
@import "~@carbon/styles/scss/components/ui-shell/header/index";
|
|
52
57
|
|
|
53
58
|
// tweack original layout
|
|
54
59
|
|
|
@@ -62,11 +67,10 @@ $shell-header-link: $blue-60 !default;
|
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
.#{$prefix}--header__menu-trigger {
|
|
65
|
-
margin-right: 0;
|
|
66
70
|
flex-shrink: 0;
|
|
71
|
+
margin-right: 0;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
|
|
70
74
|
span.#{$prefix}--header__name {
|
|
71
75
|
// @extend a.#{$prefix}--header__name;
|
|
72
76
|
@extend .#{$prefix}--header__name;
|
|
@@ -79,15 +83,19 @@ span.#{$prefix}--header__name {
|
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
.#{$eccgui}-application__title--withsidebar {
|
|
82
|
-
width: mini-units(40 - 8);
|
|
83
86
|
flex-shrink: 0;
|
|
87
|
+
width: mini-units(40 - 8);
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
.#{$eccgui}-application__title--content {
|
|
87
|
-
white-space: nowrap;
|
|
88
91
|
display: inline-block;
|
|
89
92
|
overflow: hidden;
|
|
93
|
+
font-size: $eccgui-size-typo-caption;
|
|
94
|
+
font-weight: $eccgui-font-weight-bold;
|
|
95
|
+
line-height: $eccgui-size-typo-caption-lineheight;
|
|
90
96
|
text-overflow: ellipsis;
|
|
97
|
+
letter-spacing: $eccgui-font-spacing-wide;
|
|
98
|
+
white-space: nowrap;
|
|
91
99
|
}
|
|
92
100
|
|
|
93
101
|
.#{$eccgui}-application__title--depiction {
|
|
@@ -98,38 +106,23 @@ span.#{$prefix}--header__name {
|
|
|
98
106
|
display: none;
|
|
99
107
|
}
|
|
100
108
|
|
|
101
|
-
& > img,
|
|
109
|
+
& > img,
|
|
110
|
+
& > svg {
|
|
102
111
|
display: inline;
|
|
112
|
+
width: auto;
|
|
113
|
+
max-width: mini-units(5);
|
|
114
|
+
height: auto;
|
|
115
|
+
max-height: mini-units(5);
|
|
103
116
|
padding: 0;
|
|
104
117
|
margin: mini-units(1.4) 0 mini-units(1.6) 0;
|
|
105
|
-
max-height: mini-units(5);
|
|
106
|
-
max-width: mini-units(5);
|
|
107
|
-
width: auto;
|
|
108
|
-
height:auto;
|
|
109
118
|
vertical-align: middle;
|
|
110
119
|
}
|
|
111
120
|
}
|
|
112
121
|
|
|
113
|
-
.#{$prefix}--header__nav {
|
|
114
|
-
// padding-left: mini-units(2);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
a.#{$prefix}--header__menu-item {
|
|
118
|
-
// padding: 0 mini-units(2);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.#{$prefix}--header__menu-title[aria-expanded='true'] + .#{$prefix}--header__menu {
|
|
122
|
-
// width: mini-units(25);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
122
|
.#{$prefix}--header__menu .#{$prefix}--header__menu-item {
|
|
126
123
|
height: mini-units(8);
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
.#{$prefix}--header__menu-arrow {
|
|
130
|
-
// margin-left: mini-units(1);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
126
|
// tweak original colors (as long as config does not work properly)
|
|
134
127
|
|
|
135
128
|
// $shell-header-bg-01
|
|
@@ -137,38 +130,40 @@ a.#{$prefix}--header__menu-item {
|
|
|
137
130
|
.#{$prefix}--skip-to-content:focus {
|
|
138
131
|
background-color: $eccgui-color-applicationheader-background;
|
|
139
132
|
}
|
|
133
|
+
|
|
140
134
|
// $shell-header-bg-02
|
|
141
135
|
a.#{$prefix}--header__menu-item:hover {
|
|
142
|
-
background-color: adjust
|
|
136
|
+
background-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%);
|
|
143
137
|
}
|
|
144
138
|
.#{$prefix}--header__menu-trigger:hover {
|
|
145
|
-
fill: adjust
|
|
139
|
+
fill: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%);
|
|
146
140
|
}
|
|
147
141
|
|
|
148
142
|
// $shell-header-bg-03
|
|
149
143
|
.#{$prefix}--header__action:active,
|
|
150
|
-
.#{$prefix}--header__menu-title[aria-expanded=
|
|
151
|
-
.#{$prefix}--header__action:active,
|
|
144
|
+
.#{$prefix}--header__menu-title[aria-expanded="true"] + .#{$prefix}--header__menu .#{$prefix}--header__menu-item:active,
|
|
152
145
|
a.#{$prefix}--header__menu-item:active {
|
|
153
|
-
background-color: adjust
|
|
146
|
+
background-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -10%);
|
|
154
147
|
}
|
|
155
148
|
|
|
156
149
|
// $shell-header-bg-04
|
|
157
150
|
.#{$prefix}--header__action:hover,
|
|
158
|
-
.#{$prefix}--header__menu-title[aria-expanded=
|
|
159
|
-
background-color: adjust
|
|
151
|
+
.#{$prefix}--header__menu-title[aria-expanded="true"] + .#{$prefix}--header__menu .#{$prefix}--header__menu-item:hover {
|
|
152
|
+
background-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -10%);
|
|
160
153
|
}
|
|
161
154
|
|
|
162
155
|
// $shell-header-bg-05
|
|
163
156
|
.#{$prefix}--header__action--active {
|
|
164
|
-
background-color: adjust
|
|
165
|
-
border-
|
|
157
|
+
background-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%);
|
|
158
|
+
border-right-color: transparent;
|
|
159
|
+
border-bottom-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -5%);
|
|
160
|
+
border-left-color: transparent;
|
|
166
161
|
}
|
|
167
162
|
|
|
168
163
|
// $shell-header-bg-06
|
|
169
|
-
.#{$prefix}--header__menu-title[aria-expanded=
|
|
164
|
+
.#{$prefix}--header__menu-title[aria-expanded="true"],
|
|
170
165
|
.#{$prefix}--header__menu .#{$prefix}--header__menu-item:hover {
|
|
171
|
-
background-color: adjust
|
|
166
|
+
background-color: color.adjust($eccgui-color-applicationheader-background, $lightness: -10%);
|
|
172
167
|
}
|
|
173
168
|
|
|
174
169
|
// $shell-header-border-01
|
|
@@ -176,10 +171,6 @@ a.#{$prefix}--header__menu-item:active {
|
|
|
176
171
|
.#{$prefix}--header__action {
|
|
177
172
|
border-bottom: none;
|
|
178
173
|
}
|
|
179
|
-
.#{$prefix}--header__action--active {
|
|
180
|
-
border-left-color: transparent;
|
|
181
|
-
border-right-color: transparent;
|
|
182
|
-
}
|
|
183
174
|
.#{$prefix}--header__nav {
|
|
184
175
|
&::before {
|
|
185
176
|
background-color: transparent;
|
|
@@ -187,13 +178,13 @@ a.#{$prefix}--header__menu-item:active {
|
|
|
187
178
|
}
|
|
188
179
|
|
|
189
180
|
// $shell-header-focus
|
|
190
|
-
.#{$prefix}--header__action:focus
|
|
181
|
+
.#{$prefix}--header__action:focus,
|
|
191
182
|
a.#{$prefix}--header__name:focus,
|
|
192
183
|
a.#{$prefix}--header__menu-item:focus {
|
|
193
|
-
border-color: adjust
|
|
184
|
+
border-color: color.adjust($eccgui-color-applicationheader-text, $lightness: 39%);
|
|
194
185
|
}
|
|
195
|
-
.#{$prefix}--header__menu-title[aria-expanded=
|
|
196
|
-
color: adjust
|
|
186
|
+
.#{$prefix}--header__menu-title[aria-expanded="true"] {
|
|
187
|
+
color: color.adjust($eccgui-color-applicationheader-text, $lightness: 39%);
|
|
197
188
|
}
|
|
198
189
|
|
|
199
190
|
// $shell-header-text-01
|
|
@@ -205,34 +196,34 @@ a.#{$prefix}--header__menu-item:active,
|
|
|
205
196
|
a.#{$prefix}--header__menu-item:focus,
|
|
206
197
|
.#{$prefix}--header__menu .#{$prefix}--header__menu-item:hover,
|
|
207
198
|
.#{$prefix}--skip-to-content:focus {
|
|
208
|
-
|
|
199
|
+
color: color.adjust($eccgui-color-applicationheader-text, $lightness: -5%);
|
|
209
200
|
}
|
|
210
201
|
|
|
211
202
|
// $shell-header-text-02
|
|
212
203
|
a.#{$prefix}--header__menu-item {
|
|
213
|
-
|
|
204
|
+
color: $eccgui-color-applicationheader-text;
|
|
214
205
|
}
|
|
215
206
|
|
|
216
207
|
// $shell-header-icon-01
|
|
217
208
|
.#{$prefix}--header__action,
|
|
218
209
|
.#{$prefix}--header__action:hover,
|
|
219
210
|
.#{$prefix}--header__action:active,
|
|
220
|
-
|
|
211
|
+
.#{$prefix}--header__action:focus {
|
|
221
212
|
color: $eccgui-color-applicationheader-text;
|
|
222
213
|
}
|
|
223
214
|
.#{$prefix}--header__menu-trigger > svg,
|
|
224
215
|
a.#{$prefix}--header__menu-item:hover > svg,
|
|
225
216
|
a.#{$prefix}--header__menu-item:active > svg,
|
|
226
217
|
a.#{$prefix}--header__menu-item:focus > svg {
|
|
227
|
-
|
|
218
|
+
fill: $eccgui-color-applicationheader-text;
|
|
228
219
|
}
|
|
229
220
|
|
|
230
221
|
// $shell-header-icon-02
|
|
231
222
|
.#{$prefix}--header__action > svg {
|
|
232
|
-
|
|
223
|
+
fill: $eccgui-color-applicationheader-text;
|
|
233
224
|
}
|
|
234
225
|
|
|
235
226
|
// $shell-header-icon-03
|
|
236
227
|
.#{$prefix}--header__menu-arrow {
|
|
237
|
-
|
|
228
|
+
fill: $eccgui-color-applicationheader-text;
|
|
238
229
|
}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { IntentTypes } from "../../common/Intent";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
CardOptions,
|
|
10
|
-
CardTitle,
|
|
11
|
-
} from "./../Card";
|
|
4
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
5
|
+
import IconButton from "../Icon/IconButton";
|
|
6
|
+
import { TestableComponent } from "../interfaces";
|
|
7
|
+
|
|
8
|
+
import { Card, CardActions, CardContent, CardHeader, CardOptions, CardTitle } from "./../Card";
|
|
12
9
|
import Divider from "./../Separation/Divider";
|
|
13
10
|
import Modal, { ModalProps } from "./Modal";
|
|
14
|
-
import {TestableComponent} from "../interfaces";
|
|
15
|
-
import IconButton from "../Icon/IconButton";
|
|
16
11
|
|
|
17
12
|
export interface SimpleDialogProps extends ModalProps, TestableComponent {
|
|
18
13
|
/**
|
|
@@ -45,11 +40,11 @@ export interface SimpleDialogProps extends ModalProps, TestableComponent {
|
|
|
45
40
|
*/
|
|
46
41
|
intent?: IntentTypes;
|
|
47
42
|
/** Optional props for the wrapper div element inside the modal. */
|
|
48
|
-
wrapperDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement
|
|
43
|
+
wrapperDivProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
49
44
|
/** If a full screen toggler is shown that will allow to switch to full screen mode. */
|
|
50
|
-
showFullScreenToggler?: boolean
|
|
45
|
+
showFullScreenToggler?: boolean;
|
|
51
46
|
/** Starts the modal in full screen mode. The show full screen toggler will be automatically enabled. */
|
|
52
|
-
startInFullScreenMode?: boolean
|
|
47
|
+
startInFullScreenMode?: boolean;
|
|
53
48
|
}
|
|
54
49
|
|
|
55
50
|
/**
|
|
@@ -65,6 +60,7 @@ export const SimpleDialog = ({
|
|
|
65
60
|
notifications = null,
|
|
66
61
|
hasBorder = false,
|
|
67
62
|
preventSimpleClosing = false,
|
|
63
|
+
enforceFocus = false,
|
|
68
64
|
intent,
|
|
69
65
|
headerOptions,
|
|
70
66
|
showFullScreenToggler = false,
|
|
@@ -73,10 +69,11 @@ export const SimpleDialog = ({
|
|
|
73
69
|
...otherProps
|
|
74
70
|
}: SimpleDialogProps) => {
|
|
75
71
|
const [displayFullscreen, setDisplayFullscreen] = React.useState<boolean>(startInFullScreenMode);
|
|
76
|
-
const showToggler = startInFullScreenMode || showFullScreenToggler
|
|
72
|
+
const showToggler = startInFullScreenMode || showFullScreenToggler;
|
|
77
73
|
const intentClassName = intent ? `${eccgui}-intent--${intent}` : "";
|
|
78
74
|
return (
|
|
79
75
|
<Modal
|
|
76
|
+
enforceFocus={enforceFocus}
|
|
80
77
|
{...otherProps}
|
|
81
78
|
// set default test id if not given
|
|
82
79
|
data-test-id={otherProps["data-test-id"] ?? "simpleDialogWidget"}
|
|
@@ -84,18 +81,13 @@ export const SimpleDialog = ({
|
|
|
84
81
|
canEscapeKeyClose={canEscapeKeyClose || !preventSimpleClosing}
|
|
85
82
|
size={displayFullscreen ? "fullscreen" : size}
|
|
86
83
|
>
|
|
87
|
-
<Card className={intentClassName}
|
|
88
|
-
|
|
89
|
-
{(title || headerOptions || showToggler) ? (
|
|
84
|
+
<Card className={intentClassName}>
|
|
85
|
+
{title || headerOptions || showToggler ? (
|
|
90
86
|
<CardHeader>
|
|
91
|
-
<CardTitle
|
|
92
|
-
|
|
93
|
-
>
|
|
94
|
-
{title}
|
|
95
|
-
</CardTitle>
|
|
96
|
-
{(headerOptions || showToggler) ? (
|
|
87
|
+
<CardTitle className={intentClassName}>{title}</CardTitle>
|
|
88
|
+
{headerOptions || showToggler ? (
|
|
97
89
|
<CardOptions>
|
|
98
|
-
{
|
|
90
|
+
{headerOptions}
|
|
99
91
|
{showToggler && (
|
|
100
92
|
<IconButton
|
|
101
93
|
name={displayFullscreen ? "toggler-minimize" : "toggler-maximize"}
|
|
@@ -112,21 +104,16 @@ export const SimpleDialog = ({
|
|
|
112
104
|
<CardContent>{children}</CardContent>
|
|
113
105
|
{hasBorder && <Divider />}
|
|
114
106
|
{!!notifications && (
|
|
115
|
-
<CardContent className={`${eccgui}-dialog__notifications`}>
|
|
116
|
-
{notifications}
|
|
117
|
-
</CardContent>
|
|
107
|
+
<CardContent className={`${eccgui}-dialog__notifications`}>{notifications}</CardContent>
|
|
118
108
|
)}
|
|
119
109
|
{actions && (
|
|
120
|
-
<CardActions
|
|
121
|
-
inverseDirection
|
|
122
|
-
className={intentClassName}
|
|
123
|
-
>
|
|
110
|
+
<CardActions inverseDirection className={intentClassName}>
|
|
124
111
|
{actions}
|
|
125
112
|
</CardActions>
|
|
126
113
|
)}
|
|
127
114
|
</Card>
|
|
128
115
|
</Modal>
|
|
129
116
|
);
|
|
130
|
-
}
|
|
117
|
+
};
|
|
131
118
|
|
|
132
119
|
export default SimpleDialog;
|
|
@@ -105,6 +105,9 @@ export function Select<T>({
|
|
|
105
105
|
|
|
106
106
|
/** @deprecated: instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />` */
|
|
107
107
|
function ofType<U>() {
|
|
108
|
+
console.warn(
|
|
109
|
+
"Usage of `ofType()` is deprecated! Instead of `const MySelect = Select.ofType<MyType>()` use directly `<Select<MyType> {...props} />`"
|
|
110
|
+
);
|
|
108
111
|
return (props: SelectProps<U>) => <Select<U> {...props} />;
|
|
109
112
|
}
|
|
110
113
|
|