typescript-overlay-essentials 1.6.1 → 2.0.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/dist/ConfirmationBox.css +18 -8
- package/dist/ConfirmationBox.d.ts +2 -2
- package/dist/ConfirmationBox.js +3 -3
- package/dist/Dropdown.css +3 -3
- package/dist/Dropdown.d.ts +1 -1
- package/dist/Dropdown.js +14 -8
- package/dist/InfoOverlay.css +18 -8
- package/dist/InfoOverlay.d.ts +2 -2
- package/dist/InfoOverlay.js +4 -4
- package/dist/InfoOverlayWithInput.css +39 -12
- package/dist/InfoOverlayWithInput.d.ts +2 -2
- package/dist/InfoOverlayWithInput.js +4 -4
- package/dist/LoadingOverlay.css +15 -15
- package/dist/LoadingOverlay.d.ts +2 -2
- package/dist/LoadingOverlay.js +1 -1
- package/dist/MultipleChoiceOverlay.css +28 -26
- package/dist/MultipleChoiceOverlay.d.ts +2 -2
- package/dist/MultipleChoiceOverlay.js +8 -8
- package/dist/MultipleRadioOverlay.css +27 -25
- package/dist/MultipleRadioOverlay.d.ts +2 -2
- package/dist/MultipleRadioOverlay.js +8 -8
- package/dist/Toast.css +1 -1
- package/dist/Toast.d.ts +3 -3
- package/dist/Toast.js +1 -1
- package/dist/ToggleSwitch.css +7 -7
- package/dist/ToggleSwitch.js +1 -1
- package/dist/TutorialOverlay.css +94 -0
- package/dist/TutorialOverlay.d.ts +26 -0
- package/dist/TutorialOverlay.js +195 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.multiplechoice-overlay {
|
|
1
|
+
.overlay-essentials-multiplechoice-overlay {
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
z-index: 10000;
|
|
12
|
+
white-space: pre-line;
|
|
13
|
+
word-break: break-word;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
.multiplechoice-box {
|
|
16
|
+
.overlay-essentials-multiplechoice-box {
|
|
15
17
|
background-color: var(--Hellgrau, white);
|
|
16
18
|
color: var(--HellSchwarz,#2c2c2c);
|
|
17
19
|
padding: 2rem;
|
|
@@ -37,30 +39,30 @@
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
.multiplechoice-box .headline {
|
|
42
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-headline {
|
|
41
43
|
margin-bottom: 0.75em;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
.multiplechoice-box .information-buttons {
|
|
46
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-information-buttons {
|
|
45
47
|
display: flex;
|
|
46
48
|
justify-content: center;
|
|
47
49
|
gap: 1rem;
|
|
48
50
|
margin-top: 1.5rem;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
.multiplechoice-box .information-buttons button {
|
|
53
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-information-buttons button {
|
|
52
54
|
font-size: 85%;
|
|
53
55
|
padding: 0.5rem 1.1rem;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
/* === Stylisierte Checkbox === */
|
|
57
|
-
.multiplechoice-box .choices-input {
|
|
59
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input {
|
|
58
60
|
display: flex;
|
|
59
61
|
flex-direction: column;
|
|
60
62
|
align-items: center;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
.multiplechoice-box .choices-input input[type="checkbox"] {
|
|
65
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"] {
|
|
64
66
|
appearance: none;
|
|
65
67
|
width: 20px;
|
|
66
68
|
height: 20px;
|
|
@@ -74,22 +76,22 @@
|
|
|
74
76
|
margin-right: 0.5rem;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked {
|
|
79
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked {
|
|
78
80
|
background-color: var(--DunkelAkzent, #4aabf5) ;
|
|
79
81
|
border-color: var(--DunkelAkzent, #4aabf5) ;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:hover {
|
|
84
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:hover {
|
|
83
85
|
background-color: var(--Hellgrau, #ddd);
|
|
84
86
|
border-color: var(--Dunkelgrau, #999);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked:hover {
|
|
89
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked:hover {
|
|
88
90
|
background-color: var(--HSDAkzent, #4aabf5) ;
|
|
89
91
|
border-color: var(--HSDAkzent, #4aabf5) ;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:disabled {
|
|
94
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:disabled {
|
|
93
95
|
background-color: var(--Mittelgrau, #ddd);
|
|
94
96
|
border-color: var(--Dunkelgrau, #999);
|
|
95
97
|
cursor: auto;
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
/* Häkchen aus zwei Linien */
|
|
100
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked::after {
|
|
102
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked::after {
|
|
101
103
|
content: "";
|
|
102
104
|
position: absolute;
|
|
103
105
|
left: 5px;
|
|
@@ -109,12 +111,12 @@
|
|
|
109
111
|
transform: rotate(45deg);
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:focus {
|
|
114
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:focus {
|
|
113
115
|
outline: none;
|
|
114
116
|
box-shadow: 0 0 0 2px var(--MittelAkzent, rgba(74, 171, 245));
|
|
115
117
|
}
|
|
116
118
|
|
|
117
|
-
.multiplechoice-box .choice-label {
|
|
119
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choice-label {
|
|
118
120
|
justify-content: flex-start;
|
|
119
121
|
display: flex;
|
|
120
122
|
align-items: center;
|
|
@@ -122,7 +124,7 @@
|
|
|
122
124
|
vertical-align: middle;
|
|
123
125
|
}
|
|
124
126
|
|
|
125
|
-
.multiplechoice-box .choices-container{
|
|
127
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-container{
|
|
126
128
|
display: flex;
|
|
127
129
|
flex-direction: column;
|
|
128
130
|
align-items: flex-start;
|
|
@@ -131,52 +133,52 @@
|
|
|
131
133
|
padding: 1rem;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
/*
|
|
135
|
-
|
|
136
|
+
/* Dark Mode */
|
|
137
|
+
[visual-theme="dark"] {
|
|
136
138
|
|
|
137
|
-
.multiplechoice-box {
|
|
139
|
+
.overlay-essentials-multiplechoice-box {
|
|
138
140
|
background-color: var(--HellSchwarz,#2c2c2c);
|
|
139
141
|
color: var(--FastWeiß, white);
|
|
140
142
|
}
|
|
141
143
|
|
|
142
|
-
.multiplechoice-box .choices-input input[type="checkbox"] {
|
|
144
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"] {
|
|
143
145
|
background-color: var(--Dunkelgrau, #888);
|
|
144
146
|
background-color: var(--FastSchwarz,#222);
|
|
145
147
|
}
|
|
146
148
|
|
|
147
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked {
|
|
149
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked {
|
|
148
150
|
background-color: var(--DunkelAkzent, #4aabf5);
|
|
149
151
|
border-color: var(--DunkelAkzent, #4aabf5);
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:hover {
|
|
154
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:hover {
|
|
153
155
|
background-color: var(--Dunkelgrau, #ddd);
|
|
154
156
|
border-color: var(--Hellgrau, #999);
|
|
155
157
|
}
|
|
156
158
|
|
|
157
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked:hover {
|
|
159
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked:hover {
|
|
158
160
|
background-color: var(--HSDAkzent, #4aabf5) ;
|
|
159
161
|
border-color: var(--HSDAkzent, #4aabf5) ;
|
|
160
162
|
}
|
|
161
163
|
|
|
162
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:checked::after {
|
|
164
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:checked::after {
|
|
163
165
|
border-color: white;
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
.multiplechoice-box .choices-input input[type="checkbox"]:disabled {
|
|
168
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-choices-input input[type="checkbox"]:disabled {
|
|
167
169
|
background-color: var(--Dunkelgrau, #999);
|
|
168
170
|
border-color: var(--Mittelgrau, #ddd);
|
|
169
171
|
cursor: auto;
|
|
170
172
|
}
|
|
171
173
|
}
|
|
172
174
|
|
|
173
|
-
.multiplechoice-box .closeButton {
|
|
175
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-closeButton {
|
|
174
176
|
right: 10px;
|
|
175
177
|
top: 10px;
|
|
176
178
|
position: absolute;
|
|
177
179
|
}
|
|
178
180
|
|
|
179
|
-
.multiplechoice-box .close-icon:hover {
|
|
181
|
+
.overlay-essentials-multiplechoice-box .overlay-essentials-close-icon:hover {
|
|
180
182
|
color: var(--HSDAkzent);
|
|
181
183
|
cursor: pointer;
|
|
182
184
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { CSSProperties, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import './MultipleChoiceOverlay.css';
|
|
4
4
|
export interface MultipleChoiceOverlayState {
|
|
@@ -20,5 +20,5 @@ export interface MultipleChoiceOverlayState {
|
|
|
20
20
|
export declare const defaultMultipleChoiceState: MultipleChoiceOverlayState;
|
|
21
21
|
export declare function MultipleChoiceOverlay({ state, setState }: {
|
|
22
22
|
state: MultipleChoiceOverlayState;
|
|
23
|
-
setState:
|
|
23
|
+
setState: Dispatch<SetStateAction<MultipleChoiceOverlayState>>;
|
|
24
24
|
}): React.ReactElement;
|
|
@@ -71,31 +71,31 @@ export function MultipleChoiceOverlay({ state, setState }) {
|
|
|
71
71
|
tempState.handler(tempState.handlerArgs);
|
|
72
72
|
};
|
|
73
73
|
return showOverlay ?
|
|
74
|
-
_jsx("div", { className: "multiplechoice-overlay", children: _jsxs("div", { className: "multiplechoice-box", style: (state === null || state === void 0 ? void 0 : state.style) !== undefined ? state.style : {}, role: "dialog", "aria-modal": "true", "aria-labelledby": (state === null || state === void 0 ? void 0 : state.headline) != null ? "multiple-choice-headline" : undefined, "aria-label": (state === null || state === void 0 ? void 0 : state.headline) != null ? undefined : "Mehrfachauswahl", "aria-describedby": "multiple-choice-message", onKeyDown: (event) => { if (event.key === "Escape")
|
|
74
|
+
_jsx("div", { className: "overlay-essentials-multiplechoice-overlay", children: _jsxs("div", { className: "overlay-essentials-multiplechoice-box", style: (state === null || state === void 0 ? void 0 : state.style) !== undefined ? state.style : {}, role: "dialog", "aria-modal": "true", "aria-labelledby": (state === null || state === void 0 ? void 0 : state.headline) != null ? "multiple-choice-headline" : undefined, "aria-label": (state === null || state === void 0 ? void 0 : state.headline) != null ? undefined : "Mehrfachauswahl", "aria-describedby": "multiple-choice-message", onKeyDown: (event) => { if (event.key === "Escape")
|
|
75
75
|
handleAction(state.handlerCancel, false); }, children: [state.addCloseButton ?
|
|
76
|
-
_jsx("span", { className: "closeButton", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", tabIndex: 0, className: "close-icon", onClick: () => handleAction(undefined, false), onKeyDown: (e) => {
|
|
76
|
+
_jsx("span", { className: "overlay-essentials-closeButton", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", tabIndex: 0, className: "overlay-essentials-close-icon", onClick: () => handleAction(undefined, false), onKeyDown: (e) => {
|
|
77
77
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
78
78
|
e.preventDefault(); // Verhindert Scroll bei Space
|
|
79
79
|
handleAction(undefined, false);
|
|
80
80
|
}
|
|
81
81
|
}, role: "button", "aria-label": "Dialog schlie\u00DFen", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) }) :
|
|
82
|
-
_jsx(_Fragment, {}), _jsx("div", { className: "headline", id: "multiple-choice-headline",
|
|
82
|
+
_jsx(_Fragment, {}), _jsx("div", { className: "overlay-essentials-headline", id: "overlay-essentials-multiple-choice-headline", children: _jsx("strong", { children: (state === null || state === void 0 ? void 0 : state.headline) != null ? state.headline : "" }) }), _jsx("div", { id: "overlay-essentials-multiple-choice-message", children: (state === null || state === void 0 ? void 0 : state.message) != null ? state.message : "" }), _jsx("div", { className: "overlay-essentials-choices-input", role: "group", "aria-label": "Auswahloptionen", children: _jsx("div", { className: "overlay-essentials-choices-container", children: state === null || state === void 0 ? void 0 : state.choices.map((choice, index) => {
|
|
83
83
|
var _a;
|
|
84
|
-
return (_jsxs("label", { className: "choice-label", children: [_jsx("input", { type: "checkbox", checked: input.includes(choice), disabled: (_a = state.disabledChoices) === null || _a === void 0 ? void 0 : _a.includes(choice), onChange: () => toggle(choice), tabIndex: 0, onKeyDown: (e) => {
|
|
84
|
+
return (_jsxs("label", { className: "overlay-essentials-choice-label", children: [_jsx("input", { type: "checkbox", checked: input.includes(choice), disabled: (_a = state.disabledChoices) === null || _a === void 0 ? void 0 : _a.includes(choice), onChange: () => toggle(choice), tabIndex: 0, onKeyDown: (e) => {
|
|
85
85
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
86
86
|
e.preventDefault(); // Verhindert Scroll bei Space
|
|
87
87
|
toggle(choice);
|
|
88
88
|
}
|
|
89
|
-
} }), choice] },
|
|
90
|
-
}) }) }), _jsxs("div", { className: "information-buttons", children: [_jsx("button", { onClick: () => handleAction(state.handlerCancel, false), onKeyDown: (event) => {
|
|
89
|
+
} }), choice] }, index));
|
|
90
|
+
}) }) }), _jsxs("div", { className: "overlay-essentials-information-buttons", children: [_jsx("button", { onClick: () => handleAction(state.handlerCancel, false), onKeyDown: (event) => {
|
|
91
91
|
if (event.key === "Enter" || event.key === ' ') {
|
|
92
92
|
event.preventDefault(); // Verhindert Scroll bei Space
|
|
93
93
|
handleAction(state.handlerCancel, false);
|
|
94
94
|
}
|
|
95
|
-
}, className: "px-4 py-2 bg-gray-300 rounded", style: (state === null || state === void 0 ? void 0 : state.cancelButtonStyle) != null ? state.cancelButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.cancelButtonText) != null ? state.cancelButtonText : "Abbrechen" }), _jsx("button", { onClick: () => handleAction(state.handlerOk, true), type: "button", autoFocus: true, onKeyDown: (event) => {
|
|
95
|
+
}, className: "overlay-essentials-px-4 py-2 bg-gray-300 rounded", style: (state === null || state === void 0 ? void 0 : state.cancelButtonStyle) != null ? state.cancelButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.cancelButtonText) != null ? state.cancelButtonText : "Abbrechen" }), _jsx("button", { onClick: () => handleAction(state.handlerOk, true), type: "button", autoFocus: true, onKeyDown: (event) => {
|
|
96
96
|
if (event.key === "Enter" || event.key === ' ') {
|
|
97
97
|
event.preventDefault(); // Verhindert Scroll bei Space
|
|
98
98
|
handleAction(state.handlerOk, true);
|
|
99
99
|
}
|
|
100
|
-
}, className: "px-4 py-2 bg-blue-600 text-white rounded", style: (state === null || state === void 0 ? void 0 : state.proceedButtonStyle) != null ? state.proceedButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.proceedButtonText) != null ? state.proceedButtonText : "OK" })] })] }) }) : _jsx(_Fragment, {});
|
|
100
|
+
}, className: "overlay-essentials-px-4 py-2 bg-blue-600 text-white rounded", style: (state === null || state === void 0 ? void 0 : state.proceedButtonStyle) != null ? state.proceedButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.proceedButtonText) != null ? state.proceedButtonText : "OK" })] })] }) }) : _jsx(_Fragment, {});
|
|
101
101
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.multipleradio-overlay {
|
|
1
|
+
.overlay-essentials-multipleradio-overlay {
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
z-index: 10000;
|
|
12
|
+
white-space: pre-line;
|
|
13
|
+
word-break: break-word;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
.multipleradio-box {
|
|
16
|
+
.overlay-essentials-multipleradio-box {
|
|
15
17
|
background-color: var(--Hellgrau, white);
|
|
16
18
|
color: var(--HellSchwarz,#2c2c2c);
|
|
17
19
|
padding: 2rem;
|
|
@@ -37,30 +39,30 @@
|
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
.multipleradio-box .headline {
|
|
42
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-headline {
|
|
41
43
|
margin-bottom: 0.75em;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
.multipleradio-box .information-buttons {
|
|
46
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-information-buttons {
|
|
45
47
|
display: flex;
|
|
46
48
|
justify-content: center;
|
|
47
49
|
gap: 1rem;
|
|
48
50
|
margin-top: 1.5rem;
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
.multipleradio-box .information-buttons button {
|
|
53
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-information-buttons button {
|
|
52
54
|
font-size: 85%;
|
|
53
55
|
padding: 0.5rem 1.1rem;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
/* === Stylisierte Checkbox === */
|
|
57
|
-
.multipleradio-box .radios-input {
|
|
59
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input {
|
|
58
60
|
display: flex;
|
|
59
61
|
flex-direction: column;
|
|
60
62
|
align-items: center;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
.multipleradio-box .radios-input input[type="checkbox"] {
|
|
65
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"] {
|
|
64
66
|
appearance: none;
|
|
65
67
|
width: 20px;
|
|
66
68
|
height: 20px;
|
|
@@ -74,29 +76,29 @@
|
|
|
74
76
|
margin-right: 0.5rem;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked {
|
|
79
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked {
|
|
78
80
|
background-color: var(--DunkelAkzent, #4aabf5) ;
|
|
79
81
|
border-color: var(--DunkelAkzent, #4aabf5) ;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
.multipleradio-box .radios-input input[type="checkbox"]:hover {
|
|
84
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:hover {
|
|
83
85
|
background-color: var(--Hellgrau, #ddd);
|
|
84
86
|
border-color: var(--Dunkelgrau, #999);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked:hover {
|
|
89
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked:hover {
|
|
88
90
|
background-color: var(--HSDAkzent, #4aabf5) ;
|
|
89
91
|
border-color: var(--HSDAkzent, #4aabf5) ;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
.multipleradio-box .radios-input input[type="checkbox"]:disabled {
|
|
94
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:disabled {
|
|
93
95
|
background-color: var(--Mittelgrau, #ddd);
|
|
94
96
|
border-color: var(--Dunkelgrau, #999);
|
|
95
97
|
cursor: auto;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
/* Häkchen aus zwei Linien */
|
|
99
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked::after {
|
|
101
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked::after {
|
|
100
102
|
content: "";
|
|
101
103
|
position: absolute;
|
|
102
104
|
left: 5px;
|
|
@@ -108,12 +110,12 @@
|
|
|
108
110
|
transform: rotate(45deg);
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
.multipleradio-box .radios-input input[type="checkbox"]:focus {
|
|
113
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:focus {
|
|
112
114
|
outline: none;
|
|
113
115
|
box-shadow: 0 0 0 2px var(--MittelAkzent, rgba(74, 171, 245));
|
|
114
116
|
}
|
|
115
117
|
|
|
116
|
-
.multipleradio-box .radio-label {
|
|
118
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radio-label {
|
|
117
119
|
justify-content: flex-start;
|
|
118
120
|
display: flex;
|
|
119
121
|
align-items: center;
|
|
@@ -121,7 +123,7 @@
|
|
|
121
123
|
vertical-align: middle;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
.multipleradio-box .radios-container{
|
|
126
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-container{
|
|
125
127
|
display: flex;
|
|
126
128
|
flex-direction: column;
|
|
127
129
|
align-items: flex-start;
|
|
@@ -131,51 +133,51 @@
|
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
/* Light Mode */
|
|
134
|
-
|
|
136
|
+
[visual-theme="dark"] {
|
|
135
137
|
|
|
136
|
-
.multipleradio-box {
|
|
138
|
+
.overlay-essentials-multipleradio-box {
|
|
137
139
|
background-color: var(--HellSchwarz,#2c2c2c);
|
|
138
140
|
color: var(--FastWeiß, white);
|
|
139
141
|
}
|
|
140
142
|
|
|
141
|
-
.multipleradio-box .radios-input input[type="checkbox"] {
|
|
143
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"] {
|
|
142
144
|
background-color: var(--Dunkelgrau, #888);
|
|
143
145
|
background-color: var(--FastSchwarz,#222);
|
|
144
146
|
}
|
|
145
147
|
|
|
146
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked {
|
|
148
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked {
|
|
147
149
|
background-color: var(--DunkelAkzent, #4aabf5);
|
|
148
150
|
border-color: var(--DunkelAkzent, #4aabf5);
|
|
149
151
|
}
|
|
150
152
|
|
|
151
|
-
.multipleradio-box .radios-input input[type="checkbox"]:hover {
|
|
153
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:hover {
|
|
152
154
|
background-color: var(--Dunkelgrau, #ddd);
|
|
153
155
|
border-color: var(--Hellgrau, #999);
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked:hover {
|
|
158
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked:hover {
|
|
157
159
|
background-color: var(--HSDAkzent, #4aabf5) ;
|
|
158
160
|
border-color: var(--HSDAkzent, #4aabf5) ;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
|
-
.multipleradio-box .radios-input input[type="checkbox"]:checked::after {
|
|
163
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:checked::after {
|
|
162
164
|
border-color: white;
|
|
163
165
|
}
|
|
164
166
|
|
|
165
|
-
.multipleradio-box .radios-input input[type="checkbox"]:disabled {
|
|
167
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-radios-input input[type="checkbox"]:disabled {
|
|
166
168
|
background-color: var(--Dunkelgrau, #999);
|
|
167
169
|
border-color: var(--Mittelgrau, #ddd);
|
|
168
170
|
cursor: auto;
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
.multipleradio-box .closeButton {
|
|
174
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-closeButton {
|
|
173
175
|
right: 10px;
|
|
174
176
|
top: 10px;
|
|
175
177
|
position: absolute;
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
.multipleradio-box .close-icon:hover {
|
|
180
|
+
.overlay-essentials-multipleradio-box .overlay-essentials-close-icon:hover {
|
|
179
181
|
color: var(--HSDAkzent);
|
|
180
182
|
cursor: pointer;
|
|
181
183
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { CSSProperties, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import './MultipleRadioOverlay.css';
|
|
4
4
|
export interface MultipleRadioOverlayState {
|
|
@@ -20,5 +20,5 @@ export interface MultipleRadioOverlayState {
|
|
|
20
20
|
export declare const defaultMultipleRadioState: MultipleRadioOverlayState;
|
|
21
21
|
export declare function MultipleRadioOverlay({ state, setState }: {
|
|
22
22
|
state: MultipleRadioOverlayState;
|
|
23
|
-
setState:
|
|
23
|
+
setState: Dispatch<SetStateAction<MultipleRadioOverlayState>>;
|
|
24
24
|
}): React.ReactElement;
|
|
@@ -61,31 +61,31 @@ export function MultipleRadioOverlay({ state, setState }) {
|
|
|
61
61
|
tempState.handler(tempState.handlerArgs);
|
|
62
62
|
};
|
|
63
63
|
return showOverlay ?
|
|
64
|
-
_jsx("div", { className: "multipleradio-overlay", children: _jsxs("div", { className: "multipleradio-box", style: (state === null || state === void 0 ? void 0 : state.style) !== undefined ? state.style : {}, role: "dialog", "aria-modal": "true", "aria-labelledby": (state === null || state === void 0 ? void 0 : state.headline) != null ? "multiple-radio-headline" : undefined, "aria-label": (state === null || state === void 0 ? void 0 : state.headline) != null ? undefined : "Einfachauswahl", "aria-describedby": "multiple-radio-message", onKeyDown: (event) => { if (event.key === "Escape")
|
|
64
|
+
_jsx("div", { className: "overlay-essentials-multipleradio-overlay", children: _jsxs("div", { className: "overlay-essentials-multipleradio-box", style: (state === null || state === void 0 ? void 0 : state.style) !== undefined ? state.style : {}, role: "dialog", "aria-modal": "true", "aria-labelledby": (state === null || state === void 0 ? void 0 : state.headline) != null ? "multiple-radio-headline" : undefined, "aria-label": (state === null || state === void 0 ? void 0 : state.headline) != null ? undefined : "Einfachauswahl", "aria-describedby": "multiple-radio-message", onKeyDown: (event) => { if (event.key === "Escape")
|
|
65
65
|
handleAction(state.handlerCancel, false); }, children: [state.addCloseButton ?
|
|
66
|
-
_jsx("span", { className: "closeButton", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", tabIndex: 0, className: "close-icon", onClick: () => handleAction(undefined, false), onKeyDown: (e) => {
|
|
66
|
+
_jsx("span", { className: "overlay-essentials-closeButton", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", tabIndex: 0, className: "overlay-essentials-close-icon", onClick: () => handleAction(undefined, false), onKeyDown: (e) => {
|
|
67
67
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
68
68
|
e.preventDefault(); // Verhindert Scroll bei Space
|
|
69
69
|
handleAction(undefined, false);
|
|
70
70
|
}
|
|
71
71
|
}, role: "button", "aria-label": "Dialog schlie\u00DFen", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) }) :
|
|
72
|
-
_jsx(_Fragment, {}), _jsx("div", { className: "headline", id: "multiple-radio-headline",
|
|
72
|
+
_jsx(_Fragment, {}), _jsx("div", { className: "overlay-essentials-headline", id: "overlay-essentials-multiple-radio-headline", children: _jsx("strong", { children: (state === null || state === void 0 ? void 0 : state.headline) != null ? state.headline : "" }) }), _jsx("div", { id: "overlay-essentials-multiple-radio-message", children: (state === null || state === void 0 ? void 0 : state.message) != null ? state.message : "" }), _jsx("div", { className: "overlay-essentials-radios-input", role: "radiogroup", "aria-label": "Auswahloptionen", children: _jsx("div", { className: "overlay-essentials-radios-container", children: state === null || state === void 0 ? void 0 : state.choices.map((choice, index) => {
|
|
73
73
|
var _a;
|
|
74
|
-
return (_jsxs("label", { className: "radio-label", children: [_jsx("input", { type: "radio", name: "multiple-radio-options", checked: input === choice, disabled: (_a = state.disabledChoices) === null || _a === void 0 ? void 0 : _a.includes(choice), onChange: () => setInput(choice), tabIndex: 0, onKeyDown: (e) => {
|
|
74
|
+
return (_jsxs("label", { className: "overlay-essentials-radio-label", children: [_jsx("input", { type: "radio", name: "multiple-radio-options", checked: input === choice, disabled: (_a = state.disabledChoices) === null || _a === void 0 ? void 0 : _a.includes(choice), onChange: () => setInput(choice), tabIndex: 0, onKeyDown: (e) => {
|
|
75
75
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
76
76
|
e.preventDefault(); // Verhindert Scroll bei Space
|
|
77
77
|
setInput(choice);
|
|
78
78
|
}
|
|
79
|
-
} }), choice] },
|
|
80
|
-
}) }) }), _jsxs("div", { className: "information-buttons", children: [_jsx("button", { onClick: () => handleAction(state.handlerCancel, false), onKeyDown: (event) => {
|
|
79
|
+
} }), choice] }, index));
|
|
80
|
+
}) }) }), _jsxs("div", { className: "overlay-essentials-information-buttons", children: [_jsx("button", { onClick: () => handleAction(state.handlerCancel, false), onKeyDown: (event) => {
|
|
81
81
|
if (event.key === "Enter" || event.key === ' ') {
|
|
82
82
|
event.preventDefault(); // Verhindert Scroll bei Space
|
|
83
83
|
handleAction(state.handlerCancel, false);
|
|
84
84
|
}
|
|
85
|
-
}, className: "px-4 py-2 bg-gray-300 rounded", style: (state === null || state === void 0 ? void 0 : state.cancelButtonStyle) != null ? state.cancelButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.cancelButtonText) != null ? state.cancelButtonText : "Abbrechen" }), _jsx("button", { onClick: () => handleAction(state.handlerOk, true), type: "button", autoFocus: true, onKeyDown: (event) => {
|
|
85
|
+
}, className: "overlay-essentials-px-4 py-2 bg-gray-300 rounded", style: (state === null || state === void 0 ? void 0 : state.cancelButtonStyle) != null ? state.cancelButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.cancelButtonText) != null ? state.cancelButtonText : "Abbrechen" }), _jsx("button", { onClick: () => handleAction(state.handlerOk, true), type: "button", autoFocus: true, onKeyDown: (event) => {
|
|
86
86
|
if (event.key === "Enter" || event.key === ' ') {
|
|
87
87
|
event.preventDefault(); // Verhindert Scroll bei Space
|
|
88
88
|
handleAction(state.handlerOk, true);
|
|
89
89
|
}
|
|
90
|
-
}, className: "px-4 py-2 bg-blue-600 text-white rounded", style: (state === null || state === void 0 ? void 0 : state.proceedButtonStyle) != null ? state.proceedButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.proceedButtonText) != null ? state.proceedButtonText : "OK" })] })] }) }) : _jsx(_Fragment, {});
|
|
90
|
+
}, className: "overlay-essentials-px-4 py-2 bg-blue-600 text-white rounded", style: (state === null || state === void 0 ? void 0 : state.proceedButtonStyle) != null ? state.proceedButtonStyle : {}, children: (state === null || state === void 0 ? void 0 : state.proceedButtonText) != null ? state.proceedButtonText : "OK" })] })] }) }) : _jsx(_Fragment, {});
|
|
91
91
|
}
|
package/dist/Toast.css
CHANGED
package/dist/Toast.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ReactElement, Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import './Toast.css';
|
|
3
3
|
export declare function Toast({ state, setState }: {
|
|
4
|
-
state: string;
|
|
5
|
-
setState:
|
|
4
|
+
state: string | React.ReactElement;
|
|
5
|
+
setState: Dispatch<SetStateAction<string | React.ReactElement>>;
|
|
6
6
|
}): ReactElement;
|
package/dist/Toast.js
CHANGED
|
@@ -19,5 +19,5 @@ export function Toast({ state, setState }) {
|
|
|
19
19
|
setShowToast(false);
|
|
20
20
|
}
|
|
21
21
|
}, [toastContent, setState]);
|
|
22
|
-
return _jsx(_Fragment, { children: showToast && (_jsx("div", { className: "toast-notification", role: "status", "aria-live": "polite", "aria-atomic": "true", children: toastContent })) });
|
|
22
|
+
return _jsx(_Fragment, { children: showToast && (_jsx("div", { className: "overlay-essentials-toast-notification", role: "status", "aria-live": "polite", "aria-atomic": "true", children: toastContent })) });
|
|
23
23
|
}
|
package/dist/ToggleSwitch.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.toggleWrapper {
|
|
1
|
+
.overlay-essentials-toggleWrapper {
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
width: fit-content;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
float: right;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.toggleOption {
|
|
16
|
+
.overlay-essentials-toggleOption {
|
|
17
17
|
border: 0;
|
|
18
18
|
background: transparent;
|
|
19
19
|
font: inherit;
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
white-space: nowrap;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.toggleOption:focus-visible {
|
|
31
|
+
.overlay-essentials-toggleOption:focus-visible {
|
|
32
32
|
outline: 3px solid var(--DunkelAkzent, #8b0000);
|
|
33
33
|
outline-offset: -3px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.toggleOption.active {
|
|
36
|
+
.overlay-essentials-toggleOption.active {
|
|
37
37
|
color: black;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.toggleSlider {
|
|
40
|
+
.overlay-essentials-toggleSlider {
|
|
41
41
|
position: absolute;
|
|
42
42
|
top: 0;
|
|
43
43
|
bottom: 0;
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
z-index: 1;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.toggleSlider.left {
|
|
51
|
+
.overlay-essentials-toggleSlider.left {
|
|
52
52
|
transform: translateX(0%);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.toggleSlider.right {
|
|
55
|
+
.overlay-essentials-toggleSlider.right {
|
|
56
56
|
transform: translateX(100%);
|
|
57
57
|
}
|
package/dist/ToggleSwitch.js
CHANGED
|
@@ -23,5 +23,5 @@ export function ToggleSwitch({ optionLeft, optionRight, value, onChange }) {
|
|
|
23
23
|
width: `calc(${offsetWidth}px)`
|
|
24
24
|
});
|
|
25
25
|
}, [value, optionLeft, optionRight]);
|
|
26
|
-
return (_jsxs("div", { className: "toggleWrapper", ref: containerRef, role: "group", "aria-label": "Auswahl", children: [_jsx("button", { type: "button", className: `toggleOption ${value === optionLeft.value ? "active" : ""}`, ref: el => { optionLeftRef.current = el; }, onClick: () => onChange(optionLeft.value), "aria-pressed": value === optionLeft.value, children: optionLeft.label }), _jsx("button", { type: "button", className: `toggleOption ${value === optionRight.value ? "active" : ""}`, ref: el => { optionRightRef.current = el; }, onClick: () => onChange(optionRight.value), "aria-pressed": value === optionRight.value, children: optionRight.label }), _jsx("div", { className: `toggleSlider ${value === optionLeft.value ? "left" : "right"}`, style: sliderStyle, "aria-hidden": "true" })] }));
|
|
26
|
+
return (_jsxs("div", { className: "overlay-essentials-toggleWrapper", ref: containerRef, role: "group", "aria-label": "Auswahl", children: [_jsx("button", { type: "button", className: `overlay-essentials-toggleOption ${value === optionLeft.value ? "overlay-essentials-active" : ""}`, ref: el => { optionLeftRef.current = el; }, onClick: () => onChange(optionLeft.value), "aria-pressed": value === optionLeft.value, children: optionLeft.label }), _jsx("button", { type: "button", className: `overlay-essentials-toggleOption ${value === optionRight.value ? "overlay-essentials-active" : ""}`, ref: el => { optionRightRef.current = el; }, onClick: () => onChange(optionRight.value), "aria-pressed": value === optionRight.value, children: optionRight.label }), _jsx("div", { className: `overlay-essentials-toggleSlider ${value === optionLeft.value ? "overlay-essentials-left" : "overlay-essentials-right"}`, style: sliderStyle, "aria-hidden": "true" })] }));
|
|
27
27
|
}
|