pxt-core 7.4.15 → 7.4.19
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/built/backendutils.js +5 -6
- package/built/buildengine.js +1 -1
- package/built/cli.js +1 -1
- package/built/gdb.js +1 -1
- package/built/pxt.js +6 -7
- package/built/pxtblockly.js +29 -17
- package/built/pxtblocks.js +17 -5
- package/built/pxteditor.d.ts +7 -1
- package/built/pxteditor.js +5 -0
- package/built/pxtlib.js +5 -6
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtblockly.js +2 -2
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxteditor.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/semantic.css +1 -1
- package/built/web/skillmap/css/main.4939cd1e.chunk.css +1 -0
- package/built/web/skillmap/js/2.a7ef6059.chunk.js +2 -0
- package/built/web/skillmap/js/main.75ffd6e1.chunk.js +1 -0
- package/localtypings/pxtarget.d.ts +1 -0
- package/package.json +2 -2
- package/react-common/components/controls/Button.tsx +30 -6
- package/react-common/components/controls/FocusTrap.tsx +113 -0
- package/react-common/components/controls/MenuBar.tsx +101 -0
- package/react-common/components/controls/MenuDropdown.tsx +108 -0
- package/react-common/components/controls/Modal.tsx +6 -38
- package/react-common/components/util.tsx +9 -0
- package/react-common/styles/controls/Button.less +21 -1
- package/react-common/styles/controls/Checkbox.less +11 -0
- package/react-common/styles/controls/Input.less +19 -1
- package/react-common/styles/controls/MenuDropdown.less +55 -0
- package/react-common/styles/controls/Modal.less +30 -1
- package/react-common/styles/profile/profile.less +20 -0
- package/react-common/styles/react-common-variables.less +21 -0
- package/react-common/styles/react-common.less +1 -0
- package/theme/highcontrast.less +31 -9
- package/theme/tutorial-sidebar.less +97 -14
- package/theme/tutorial.less +16 -8
- package/webapp/public/blockly/blockly_compressed.js +6 -6
- package/webapp/public/blockly/blocks_compressed.js +6 -6
- package/webapp/public/skillmap.html +2 -2
- package/built/web/skillmap/css/main.b2b69d60.chunk.css +0 -1
- package/built/web/skillmap/js/2.fce3190c.chunk.js +0 -2
- package/built/web/skillmap/js/main.9d64b2d7.chunk.js +0 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { classList, ContainerProps } from "../util";
|
|
3
|
+
|
|
4
|
+
export interface MenuBarProps extends ContainerProps {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const MenuBar = (props: MenuBarProps) => {
|
|
8
|
+
const {
|
|
9
|
+
id,
|
|
10
|
+
className,
|
|
11
|
+
role,
|
|
12
|
+
ariaHidden,
|
|
13
|
+
ariaLabel,
|
|
14
|
+
children
|
|
15
|
+
} = props;
|
|
16
|
+
|
|
17
|
+
let focusableElements: HTMLElement[];
|
|
18
|
+
let menubar: HTMLDivElement;
|
|
19
|
+
|
|
20
|
+
const handleRef = (ref: HTMLDivElement) => {
|
|
21
|
+
if (!ref || menubar) return;
|
|
22
|
+
|
|
23
|
+
menubar = ref;
|
|
24
|
+
|
|
25
|
+
const focusable = ref.querySelectorAll(`[tabindex]:not([tabindex="-1"]),[data-isfocusable]`);
|
|
26
|
+
focusableElements = [];
|
|
27
|
+
|
|
28
|
+
for (const element of focusable.values()) {
|
|
29
|
+
focusableElements.push(element as HTMLElement);
|
|
30
|
+
|
|
31
|
+
// Remove them from the tab order, menu items are navigable using the arrow keys
|
|
32
|
+
element.setAttribute("tabindex", "-1");
|
|
33
|
+
element.setAttribute("data-isfocusable", "true");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {
|
|
38
|
+
if (!focusableElements?.length) return;
|
|
39
|
+
|
|
40
|
+
const target = document.activeElement as HTMLElement;
|
|
41
|
+
const index = focusableElements.indexOf(target);
|
|
42
|
+
|
|
43
|
+
if (index === -1 && target !== menubar) return;
|
|
44
|
+
|
|
45
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
e.stopPropagation();
|
|
48
|
+
|
|
49
|
+
if (target.click) {
|
|
50
|
+
target.click();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// SVG Elements
|
|
54
|
+
target.dispatchEvent(new Event("click"));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (e.key === "ArrowRight") {
|
|
58
|
+
if (index === focusableElements.length - 1 || target === menubar) {
|
|
59
|
+
focusableElements[0].focus();
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
focusableElements[index + 1].focus();
|
|
63
|
+
}
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
}
|
|
67
|
+
else if (e.key === "ArrowLeft") {
|
|
68
|
+
if (index === 0 || target === menubar) {
|
|
69
|
+
focusableElements[focusableElements.length - 1].focus();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
focusableElements[Math.max(index - 1, 0)].focus();
|
|
73
|
+
}
|
|
74
|
+
e.preventDefault();
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
}
|
|
77
|
+
else if (e.key === "Home") {
|
|
78
|
+
focusableElements[0].focus();
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
}
|
|
82
|
+
else if (e.key === "End") {
|
|
83
|
+
focusableElements[focusableElements.length - 1].focus();
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
e.stopPropagation();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<div id={id}
|
|
91
|
+
className={classList("common-menubar", className)}
|
|
92
|
+
role={role || "menubar"}
|
|
93
|
+
tabIndex={0}
|
|
94
|
+
onKeyDown={onKeyDown}
|
|
95
|
+
ref={handleRef}
|
|
96
|
+
aria-hidden={ariaHidden}
|
|
97
|
+
aria-label={ariaLabel}>
|
|
98
|
+
{children}
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { classList, ControlProps } from "../util";
|
|
3
|
+
import { Button, ButtonProps } from "./Button";
|
|
4
|
+
import { FocusTrap } from "./FocusTrap";
|
|
5
|
+
|
|
6
|
+
export interface MenuItem extends ButtonProps {
|
|
7
|
+
role?: "menuitem" | undefined;
|
|
8
|
+
ariaPosInSet?: undefined;
|
|
9
|
+
ariaSetSize?: undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface MenuDropdownProps extends ControlProps {
|
|
13
|
+
id: string;
|
|
14
|
+
items: MenuItem[];
|
|
15
|
+
label?: string | JSX.Element;
|
|
16
|
+
title: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const MenuDropdown = (props: MenuDropdownProps) => {
|
|
21
|
+
const {
|
|
22
|
+
id,
|
|
23
|
+
className,
|
|
24
|
+
ariaHidden,
|
|
25
|
+
ariaLabel,
|
|
26
|
+
role,
|
|
27
|
+
items,
|
|
28
|
+
label,
|
|
29
|
+
title,
|
|
30
|
+
icon
|
|
31
|
+
} = props;
|
|
32
|
+
|
|
33
|
+
const [ expanded, setExpanded ] = React.useState(false);
|
|
34
|
+
|
|
35
|
+
let container: HTMLDivElement;
|
|
36
|
+
let expandButton: HTMLButtonElement;
|
|
37
|
+
|
|
38
|
+
const handleContainerRef = (ref: HTMLDivElement) => {
|
|
39
|
+
if (!ref) return;
|
|
40
|
+
container = ref;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const handleButtonRef = (ref: HTMLButtonElement) => {
|
|
44
|
+
if (!ref) return;
|
|
45
|
+
expandButton = ref;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const onMenuButtonClick = () => {
|
|
49
|
+
setExpanded(!expanded);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const onSubpaneEscape = () => {
|
|
53
|
+
setExpanded(false);
|
|
54
|
+
if (expandButton) expandButton.focus();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const onBlur = (e: React.FocusEvent) => {
|
|
58
|
+
if (!container) return;
|
|
59
|
+
if (expanded && !container.contains(e.relatedTarget as HTMLElement)) setExpanded(false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const classes = classList("common-menu-dropdown", className);
|
|
63
|
+
const menuId = id + "-menu";
|
|
64
|
+
|
|
65
|
+
return <div className={classes} ref={handleContainerRef} onBlur={onBlur}>
|
|
66
|
+
<Button
|
|
67
|
+
id={id}
|
|
68
|
+
label={label}
|
|
69
|
+
buttonRef={handleButtonRef}
|
|
70
|
+
title={title}
|
|
71
|
+
leftIcon={icon}
|
|
72
|
+
role={role || "menuitem"}
|
|
73
|
+
className={classList("menu-button", expanded && "expanded")}
|
|
74
|
+
onClick={onMenuButtonClick}
|
|
75
|
+
ariaHasPopup="true"
|
|
76
|
+
ariaExpanded={expanded}
|
|
77
|
+
ariaControls={expanded ? menuId : undefined}
|
|
78
|
+
ariaLabel={ariaLabel}
|
|
79
|
+
ariaHidden={ariaHidden}
|
|
80
|
+
/>
|
|
81
|
+
{expanded &&
|
|
82
|
+
<div role="menu"
|
|
83
|
+
className="common-menu-dropdown-pane"
|
|
84
|
+
tabIndex={0}
|
|
85
|
+
id={menuId}
|
|
86
|
+
aria-labelledby={id}>
|
|
87
|
+
<FocusTrap arrowKeyNavigation={true} onEscape={onSubpaneEscape}>
|
|
88
|
+
<ul role="presentation">
|
|
89
|
+
{ items.map((item, index) =>
|
|
90
|
+
<li key={index} role="presentation">
|
|
91
|
+
<Button
|
|
92
|
+
{...item}
|
|
93
|
+
className={classList("common-menu-dropdown-item", item.className)}
|
|
94
|
+
onClick={() => {
|
|
95
|
+
setExpanded(false);
|
|
96
|
+
item.onClick();
|
|
97
|
+
}}
|
|
98
|
+
role="menuitem"
|
|
99
|
+
ariaPosInSet={index + 1}
|
|
100
|
+
ariaSetSize={items.length}/>
|
|
101
|
+
</li>
|
|
102
|
+
)}
|
|
103
|
+
</ul>
|
|
104
|
+
</FocusTrap>
|
|
105
|
+
</div>
|
|
106
|
+
}
|
|
107
|
+
</div>
|
|
108
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React = require("react");
|
|
2
|
+
import ReactDOM = require("react-dom");
|
|
2
3
|
import { classList, ContainerProps } from "../util";
|
|
3
4
|
import { Button } from "./Button";
|
|
5
|
+
import { FocusTrap } from "./FocusTrap";
|
|
4
6
|
|
|
5
7
|
export interface ModalAction {
|
|
6
8
|
label: string;
|
|
@@ -22,6 +24,7 @@ export interface ModalProps extends ContainerProps {
|
|
|
22
24
|
actions?: ModalAction[];
|
|
23
25
|
onClose?: () => void;
|
|
24
26
|
fullscreen?: boolean;
|
|
27
|
+
parentElement?: Element;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
export const Modal = (props: ModalProps) => {
|
|
@@ -36,6 +39,7 @@ export const Modal = (props: ModalProps) => {
|
|
|
36
39
|
title,
|
|
37
40
|
actions,
|
|
38
41
|
onClose,
|
|
42
|
+
parentElement,
|
|
39
43
|
fullscreen
|
|
40
44
|
} = props;
|
|
41
45
|
|
|
@@ -43,49 +47,13 @@ export const Modal = (props: ModalProps) => {
|
|
|
43
47
|
if (onClose) onClose();
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
let firstFocusableElement: HTMLElement;
|
|
47
|
-
let lastFocusableElement: HTMLElement;
|
|
48
|
-
|
|
49
|
-
const handleRef = (ref: HTMLDivElement) => {
|
|
50
|
-
if (!ref) return;
|
|
51
|
-
|
|
52
|
-
const focusable = ref.querySelectorAll(`[tabindex]:not([tabindex="-1"])`);
|
|
53
|
-
|
|
54
|
-
firstFocusableElement = focusable.item(0) as HTMLElement;
|
|
55
|
-
lastFocusableElement = focusable.item(focusable.length - 1) as HTMLElement;
|
|
56
|
-
|
|
57
|
-
// TODO: Add an error here? this should never happen
|
|
58
|
-
if (!firstFocusableElement) return;
|
|
59
|
-
|
|
60
|
-
if (!ref.contains(document.activeElement)) firstFocusableElement.focus();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {
|
|
64
|
-
if (e.key !== "Tab") return;
|
|
65
|
-
|
|
66
|
-
const target = e.target;
|
|
67
|
-
|
|
68
|
-
if (e.shiftKey) {
|
|
69
|
-
if (target === firstFocusableElement) {
|
|
70
|
-
lastFocusableElement.focus();
|
|
71
|
-
e.preventDefault();
|
|
72
|
-
e.stopPropagation();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
else if (target === lastFocusableElement) {
|
|
76
|
-
firstFocusableElement.focus();
|
|
77
|
-
e.preventDefault();
|
|
78
|
-
e.stopPropagation();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
50
|
const classes = classList(
|
|
83
51
|
"common-modal-container",
|
|
84
52
|
fullscreen && "fullscreen",
|
|
85
53
|
className
|
|
86
54
|
);
|
|
87
55
|
|
|
88
|
-
return <
|
|
56
|
+
return ReactDOM.createPortal(<FocusTrap className={classes} onEscape={closeClickHandler}>
|
|
89
57
|
<div id={id}
|
|
90
58
|
className="common-modal"
|
|
91
59
|
role={role || "dialog"}
|
|
@@ -139,5 +107,5 @@ export const Modal = (props: ModalProps) => {
|
|
|
139
107
|
</div>
|
|
140
108
|
}
|
|
141
109
|
</div>
|
|
142
|
-
</
|
|
110
|
+
</FocusTrap>, parentElement || document.body)
|
|
143
111
|
}
|
|
@@ -54,6 +54,15 @@ export function classList(...classes: string[]) {
|
|
|
54
54
|
.join(" ");
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
export function nodeListToArray<U extends Node>(list: NodeListOf<U>): U[] {
|
|
58
|
+
const out: U[] = [];
|
|
59
|
+
|
|
60
|
+
for (const node of list) {
|
|
61
|
+
out.push(node);
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
}
|
|
65
|
+
|
|
57
66
|
export enum CheckboxStatus {
|
|
58
67
|
Selected,
|
|
59
68
|
Unselected,
|
|
@@ -163,7 +163,11 @@
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.common-button.menu-button:hover {
|
|
166
|
-
background:
|
|
166
|
+
background: @buttonMenuBackgroundHoverColor;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.common-button.menu-button:active {
|
|
170
|
+
background: @buttonMenuBackgroundActiveColor;
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
.common-button.menu-button.inverted,
|
|
@@ -172,3 +176,19 @@
|
|
|
172
176
|
color: @buttonMenuTextColorInverted;
|
|
173
177
|
}
|
|
174
178
|
|
|
179
|
+
/****************************************************
|
|
180
|
+
* High Contrast *
|
|
181
|
+
****************************************************/
|
|
182
|
+
|
|
183
|
+
.high-contrast, .hc {
|
|
184
|
+
.common-button {
|
|
185
|
+
color: @highContrastTextColor !important;
|
|
186
|
+
background: @highContrastBackgroundColor !important;
|
|
187
|
+
border-color: @highContrastTextColor !important;
|
|
188
|
+
|
|
189
|
+
&:hover, &:focus {
|
|
190
|
+
outline: @highContrastFocusOutline !important;
|
|
191
|
+
z-index: @highContrastFocusZIndex;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -10,4 +10,15 @@
|
|
|
10
10
|
.common-checkbox:focus-within {
|
|
11
11
|
outline: @checkboxFocusOutline;
|
|
12
12
|
border-radius: 0.2em;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/****************************************************
|
|
16
|
+
* High Contrast *
|
|
17
|
+
****************************************************/
|
|
18
|
+
|
|
19
|
+
.high-contrast {
|
|
20
|
+
.common-checkbox:hover,
|
|
21
|
+
.common-checkbox:focus-within {
|
|
22
|
+
outline: @highContrastFocusOutline;
|
|
23
|
+
}
|
|
13
24
|
}
|
|
@@ -92,4 +92,22 @@
|
|
|
92
92
|
i {
|
|
93
93
|
color: @inputTextColorDisabled;
|
|
94
94
|
}
|
|
95
|
-
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/****************************************************
|
|
98
|
+
* High Contrast *
|
|
99
|
+
****************************************************/
|
|
100
|
+
|
|
101
|
+
.high-contrast {
|
|
102
|
+
.common-input {
|
|
103
|
+
color: @highContrastTextColor;
|
|
104
|
+
border-color: @highContrastTextColor;
|
|
105
|
+
background-color: @highContrastBackgroundColor;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.common-input-group:focus::after,
|
|
109
|
+
.common-input-group:focus-within::after {
|
|
110
|
+
border-color: @highContrastHighlightColor;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.common-menu-dropdown {
|
|
2
|
+
height: 100%;
|
|
3
|
+
position: relative;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.common-menu-dropdown > .menu-button.expanded {
|
|
7
|
+
background: @buttonMenuBackgroundActiveColor;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.common-menu-dropdown-pane {
|
|
11
|
+
position: absolute;
|
|
12
|
+
right: 0;
|
|
13
|
+
width: 12rem;
|
|
14
|
+
|
|
15
|
+
ul {
|
|
16
|
+
list-style: none;
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
background: @menuDropdownPaneBackground;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
li {
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.common-menu-dropdown-item {
|
|
28
|
+
background: none;
|
|
29
|
+
text-align: left;
|
|
30
|
+
width: 100%;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 1rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.common-menu-dropdown-item.common-button:focus::after {
|
|
36
|
+
outline: @buttonFocusOutlineInverted;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/****************************************************
|
|
40
|
+
* High Contrast *
|
|
41
|
+
****************************************************/
|
|
42
|
+
|
|
43
|
+
.high-contrast {
|
|
44
|
+
.common-menu-dropdown-pane {
|
|
45
|
+
color: @highContrastTextColor;
|
|
46
|
+
background-color: @highContrastBackgroundColor;
|
|
47
|
+
border: 1px solid @highContrastTextColor;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.common-menu-dropdown-item:hover,
|
|
51
|
+
.common-menu-dropdown > .menu-button.expanded {
|
|
52
|
+
outline: @highContrastFocusOutline;
|
|
53
|
+
z-index: @highContrastFocusZIndex;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
right: 0;
|
|
9
9
|
bottom: 0;
|
|
10
10
|
background-color: var(--modal-overlay-color);
|
|
11
|
-
z-index:
|
|
11
|
+
z-index: @modalDimmerZIndex;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.common-modal-container.fullscreen {
|
|
@@ -102,4 +102,33 @@
|
|
|
102
102
|
background-color: var(--body-background-color);
|
|
103
103
|
padding: 1rem;
|
|
104
104
|
max-height: unset;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/****************************************************
|
|
108
|
+
* High Contrast *
|
|
109
|
+
****************************************************/
|
|
110
|
+
|
|
111
|
+
.high-contrast, .hc {
|
|
112
|
+
.common-modal-header,
|
|
113
|
+
.common-modal-body,
|
|
114
|
+
.common-modal-footer {
|
|
115
|
+
background-color: @highContrastBackgroundColor;
|
|
116
|
+
color: @highContrastTextColor;
|
|
117
|
+
border-color: @highContrastTextColor;
|
|
118
|
+
|
|
119
|
+
.common-modal-close .common-button .fas {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
color: @highContrastTextColor;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.fullscreen > .common-modal > .common-modal-header,
|
|
126
|
+
.fullscreen > .common-modal > .common-modal-body {
|
|
127
|
+
background-color: @highContrastBackgroundColor;
|
|
128
|
+
color: @highContrastTextColor;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.common-modal {
|
|
132
|
+
border: 1px solid @highContrastTextColor;
|
|
133
|
+
}
|
|
105
134
|
}
|
|
@@ -315,6 +315,26 @@
|
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
/****************************************************
|
|
319
|
+
* High Contrast *
|
|
320
|
+
****************************************************/
|
|
321
|
+
|
|
322
|
+
.high-contrast {
|
|
323
|
+
.profile-badges .profile-badge,
|
|
324
|
+
.profile-badges-background .profile-badge,
|
|
325
|
+
.profile-badge-and-title,
|
|
326
|
+
.profile-initials-portrait,
|
|
327
|
+
.profile-badge-subtitle,
|
|
328
|
+
.profile-username {
|
|
329
|
+
color: @highContrastTextColor;
|
|
330
|
+
background-color: @highContrastBackgroundColor;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.profile-badge.clickable:hover {
|
|
334
|
+
outline: @highContrastFocusOutline;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
318
338
|
@media only screen and (max-width: 1200px) and (min-width: 992px) {
|
|
319
339
|
.profile-badges, .profile-badges-background {
|
|
320
340
|
background-size: 25%;
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
@buttonMenuBackgroundColorInverted: @buttonMenuTextColor;
|
|
17
17
|
@buttonFocusOutline: @buttonTextColorInverted solid 1px;;
|
|
18
18
|
@buttonFocusOutlineInverted: @commonBorderColor solid 1px;
|
|
19
|
+
@buttonMenuBackgroundHoverColor: rgba(0,0,0,.1);
|
|
20
|
+
@buttonMenuBackgroundActiveColor: rgba(0,0,0,.15);
|
|
19
21
|
|
|
20
22
|
/****************************************************
|
|
21
23
|
* Modals *
|
|
@@ -26,6 +28,15 @@
|
|
|
26
28
|
@modalHeaderBackgroundColor: @modalBodyBackgroundColor;
|
|
27
29
|
@modalFooterBackgroundColor: #f9fafb;
|
|
28
30
|
@modalSeparatorBorder: 1px solid rgba(34, 36, 38, .15);
|
|
31
|
+
@modalDimmerZIndex: 1000;
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
/****************************************************
|
|
35
|
+
* MenuDropdowns *
|
|
36
|
+
****************************************************/
|
|
37
|
+
|
|
38
|
+
@menuDropdownPaneBackground: #ffffff;
|
|
39
|
+
|
|
29
40
|
|
|
30
41
|
/****************************************************
|
|
31
42
|
* Checkboxes *
|
|
@@ -45,3 +56,13 @@
|
|
|
45
56
|
@inputBackgroundColorDisabled: @commonBackgroundDisabledColor;
|
|
46
57
|
@inputButtonColor: rgb(0, 120, 212);
|
|
47
58
|
@inputButtonColorHover: rgb(16, 110, 190);
|
|
59
|
+
|
|
60
|
+
/****************************************************
|
|
61
|
+
* High Contrast *
|
|
62
|
+
****************************************************/
|
|
63
|
+
|
|
64
|
+
@highContrastTextColor: #ffffff;
|
|
65
|
+
@highContrastBackgroundColor: #000000;
|
|
66
|
+
@highContrastHighlightColor: #ffff00;
|
|
67
|
+
@highContrastFocusOutline: 2px solid @highContrastHighlightColor;
|
|
68
|
+
@highContrastFocusZIndex: 1;
|
package/theme/highcontrast.less
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
@selected: yellow;
|
|
13
13
|
@disabled: #3ff23f;
|
|
14
|
+
@hyperlink: #807FFF;
|
|
14
15
|
|
|
15
16
|
/* Messages */
|
|
16
17
|
#msg .hc {
|
|
@@ -77,6 +78,10 @@
|
|
|
77
78
|
text-decoration: underline;
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
ul > li {
|
|
82
|
+
color: @HCtextColor;
|
|
83
|
+
}
|
|
84
|
+
|
|
80
85
|
#tutorialcard .prevbutton,
|
|
81
86
|
#tutorialcard .nextbutton {
|
|
82
87
|
&:hover, &:focus {
|
|
@@ -498,7 +503,7 @@
|
|
|
498
503
|
border-color: @HCtextColor;
|
|
499
504
|
border-style: solid;
|
|
500
505
|
}
|
|
501
|
-
.actions {
|
|
506
|
+
.ui.grid.stackable .actions {
|
|
502
507
|
.card-action {
|
|
503
508
|
border: 2px solid @HCtextColor;
|
|
504
509
|
.button.attached i {
|
|
@@ -509,6 +514,10 @@
|
|
|
509
514
|
.card-action-title {
|
|
510
515
|
color: @HCtextColor;
|
|
511
516
|
}
|
|
517
|
+
.card-action:hover,
|
|
518
|
+
.card-action:focus-within {
|
|
519
|
+
border-color: @selected;
|
|
520
|
+
}
|
|
512
521
|
}
|
|
513
522
|
}
|
|
514
523
|
}
|
|
@@ -666,7 +675,8 @@
|
|
|
666
675
|
#assetEditor {
|
|
667
676
|
.asset-editor-sidebar,
|
|
668
677
|
.asset-editor-sidebar-preview,
|
|
669
|
-
.asset-editor-preview
|
|
678
|
+
.asset-editor-preview,
|
|
679
|
+
.asset-editor-sidebar-temp {
|
|
670
680
|
color: @HCtextColor;
|
|
671
681
|
background-color: @HCbackground;
|
|
672
682
|
border-color: @HCtextColor;
|
|
@@ -682,7 +692,10 @@
|
|
|
682
692
|
border-bottom: 1px solid @HCtextColor;
|
|
683
693
|
}
|
|
684
694
|
|
|
685
|
-
.
|
|
695
|
+
.common-button {
|
|
696
|
+
border: 1px solid;
|
|
697
|
+
}
|
|
698
|
+
|
|
686
699
|
.asset-editor-card,
|
|
687
700
|
.create-new {
|
|
688
701
|
color: @HCtextColor;
|
|
@@ -695,10 +708,7 @@
|
|
|
695
708
|
color: @HCbackground;
|
|
696
709
|
}
|
|
697
710
|
|
|
698
|
-
.
|
|
699
|
-
border: 1px solid @red;
|
|
700
|
-
}
|
|
701
|
-
|
|
711
|
+
.asset-editor-card.selected,
|
|
702
712
|
.asset-editor-gallery-tab.selected,
|
|
703
713
|
.asset-editor-button:hover,
|
|
704
714
|
.create-new:hover {
|
|
@@ -716,7 +726,8 @@
|
|
|
716
726
|
|
|
717
727
|
/* Hyperlinks */
|
|
718
728
|
a {
|
|
719
|
-
color: @
|
|
729
|
+
color: @hyperlink !important;
|
|
730
|
+
text-decoration: underline !important;
|
|
720
731
|
}
|
|
721
732
|
|
|
722
733
|
#sidedocsbar {
|
|
@@ -809,7 +820,7 @@
|
|
|
809
820
|
}
|
|
810
821
|
}
|
|
811
822
|
|
|
812
|
-
.tutorialhint {
|
|
823
|
+
.tutorialhint, .tutorial-hint .tutorial-callout {
|
|
813
824
|
border-color: @HCtextColor;
|
|
814
825
|
background-color: @HCbackground;
|
|
815
826
|
color: @HCtextColor;
|
|
@@ -856,6 +867,17 @@
|
|
|
856
867
|
border-color: @selected !important;
|
|
857
868
|
}
|
|
858
869
|
|
|
870
|
+
.formatted-bullet {
|
|
871
|
+
background: linear-gradient(@HCtextColor, @HCtextColor) ~"no-repeat 45%/2px 100%";
|
|
872
|
+
i.icon, i.xicon {
|
|
873
|
+
color: @HCbackground;
|
|
874
|
+
background-color: @HCtextColor;
|
|
875
|
+
}
|
|
876
|
+
&:after {
|
|
877
|
+
border-color: @HCtextColor !important;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
859
881
|
|
|
860
882
|
/* Modals */
|
|
861
883
|
.ui.modal {
|