@sis-cc/dotstatsuite-visions 12.33.0 → 12.34.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/es/CollapseButtons/CollapseButtons.js +24 -4
- package/es/CollapseButtons/Item.js +7 -0
- package/es/Logo/Logo.js +1 -1
- package/es/Spotlight/Spotlight.js +0 -1
- package/es/theme.js +9 -9
- package/lib/CollapseButtons/CollapseButtons.js +27 -4
- package/lib/CollapseButtons/Item.js +7 -0
- package/lib/Logo/Logo.js +1 -1
- package/lib/Spotlight/Spotlight.js +0 -1
- package/lib/theme.js +9 -9
- package/package.json +1 -1
- package/umd/@sis-cc/dotstatsuite-visions.js +2437 -2140
- package/umd/@sis-cc/dotstatsuite-visions.min.js +22 -22
- package/umd/@sis-cc/dotstatsuite-visions.min.js.map +1 -1
|
@@ -2,6 +2,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
2
2
|
|
|
3
3
|
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
+
import cx from 'classnames';
|
|
5
6
|
import * as R from 'ramda';
|
|
6
7
|
import makeStyles from '@mui/styles/makeStyles';
|
|
7
8
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
@@ -15,15 +16,25 @@ import Paper from './Paper';
|
|
|
15
16
|
export var MAX_COLUMNS = 12;
|
|
16
17
|
export var COLUMNS = [12, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1];
|
|
17
18
|
|
|
18
|
-
var useStyles = makeStyles(function () {
|
|
19
|
+
var useStyles = makeStyles(function (theme) {
|
|
19
20
|
return {
|
|
20
21
|
collapseContainer: {
|
|
21
22
|
width: '100%'
|
|
23
|
+
},
|
|
24
|
+
container: {
|
|
25
|
+
'&:focus': {
|
|
26
|
+
outlineColor: theme.palette.highlight.hl1,
|
|
27
|
+
outlineWidth: 2,
|
|
28
|
+
outlineStyle: 'auto',
|
|
29
|
+
paddingBottom: 16
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
};
|
|
24
33
|
});
|
|
25
34
|
|
|
26
35
|
var CollapseButtons = function CollapseButtons(props) {
|
|
36
|
+
var _cx;
|
|
37
|
+
|
|
27
38
|
var _props$items = props.items,
|
|
28
39
|
items = _props$items === undefined ? [] : _props$items,
|
|
29
40
|
_props$action = props.action,
|
|
@@ -43,7 +54,8 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
43
54
|
_props$textTransform = props.textTransform,
|
|
44
55
|
textTransform = _props$textTransform === undefined ? 'none' : _props$textTransform,
|
|
45
56
|
_props$labelAccessor = props.labelAccessor,
|
|
46
|
-
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor
|
|
57
|
+
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor,
|
|
58
|
+
accessibility = props.accessibility;
|
|
47
59
|
|
|
48
60
|
|
|
49
61
|
var classes = useStyles();
|
|
@@ -76,7 +88,14 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
76
88
|
|
|
77
89
|
return React.createElement(
|
|
78
90
|
Grid,
|
|
79
|
-
{
|
|
91
|
+
{
|
|
92
|
+
container: true,
|
|
93
|
+
spacing: 2,
|
|
94
|
+
'data-testid': testId,
|
|
95
|
+
justifyContent: justify,
|
|
96
|
+
className: cx((_cx = {}, _cx[classes.container] = accessibility, _cx)),
|
|
97
|
+
tabIndex: 0
|
|
98
|
+
},
|
|
80
99
|
R.map(function (_ref) {
|
|
81
100
|
var id = _ref.id,
|
|
82
101
|
label = _ref.label,
|
|
@@ -164,7 +183,8 @@ CollapseButtons.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
164
183
|
gridButtonsProps: PropTypes.object,
|
|
165
184
|
justify: PropTypes.string,
|
|
166
185
|
textTransform: PropTypes.string,
|
|
167
|
-
labelAccessor: PropTypes.func
|
|
186
|
+
labelAccessor: PropTypes.func,
|
|
187
|
+
accessibility: PropTypes.bool
|
|
168
188
|
} : {};
|
|
169
189
|
|
|
170
190
|
export default CollapseButtons;
|
|
@@ -106,6 +106,13 @@ var Item = function Item(_ref) {
|
|
|
106
106
|
action(parentId, id);
|
|
107
107
|
e.stopPropagation();
|
|
108
108
|
},
|
|
109
|
+
onKeyDown: function onKeyDown(e) {
|
|
110
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
111
|
+
if (R.not(R.is(Function)(action))) return;
|
|
112
|
+
action(parentId, id);
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
},
|
|
109
116
|
tabIndex: 0,
|
|
110
117
|
underline: 'none',
|
|
111
118
|
style: { display: 'list-item' }
|
package/es/Logo/Logo.js
CHANGED
|
@@ -31,7 +31,7 @@ var Logo = function Logo(_ref) {
|
|
|
31
31
|
var classes = useStyles();
|
|
32
32
|
return React.createElement(
|
|
33
33
|
'span',
|
|
34
|
-
{ className: classes.container, role: '
|
|
34
|
+
{ className: classes.container, role: 'presentation' },
|
|
35
35
|
React.createElement('img', {
|
|
36
36
|
className: cx(classes.logo, classes.alternativeBrowserLogo),
|
|
37
37
|
style: { maxHeight: maxHeight },
|
|
@@ -102,7 +102,6 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
102
102
|
R.gt(size(R.prop('fields', spotlight)), 1) ? React.createElement(
|
|
103
103
|
Fragment,
|
|
104
104
|
null,
|
|
105
|
-
React.createElement(Divider, { className: classes.divider, 'aria-hidden': 'true' }),
|
|
106
105
|
React.createElement(Field, {
|
|
107
106
|
spotlight: spotlight,
|
|
108
107
|
onChangeField: onChangeField,
|
package/es/theme.js
CHANGED
|
@@ -55,9 +55,9 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
55
55
|
},
|
|
56
56
|
styleOverrides: {
|
|
57
57
|
root: _extends({
|
|
58
|
-
'&:focus': {
|
|
59
|
-
outline: 'none'
|
|
60
|
-
}
|
|
58
|
+
'&:focus': _extends({
|
|
59
|
+
outline: !isA11y && 'none'
|
|
60
|
+
}, isA11y && focus)
|
|
61
61
|
}, buttonBaseFocus)
|
|
62
62
|
}
|
|
63
63
|
},
|
|
@@ -103,9 +103,9 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
103
103
|
styleOverrides: {
|
|
104
104
|
root: {
|
|
105
105
|
textTransform: 'none',
|
|
106
|
-
'&:focus': {
|
|
107
|
-
outline: 'none'
|
|
108
|
-
}
|
|
106
|
+
'&:focus': _extends({
|
|
107
|
+
outline: !isA11y && 'none'
|
|
108
|
+
}, isA11y && focus)
|
|
109
109
|
},
|
|
110
110
|
textPrimary: {
|
|
111
111
|
'&:hover': {
|
|
@@ -142,14 +142,14 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
142
142
|
MuiOutlinedInput: {
|
|
143
143
|
styleOverrides: {
|
|
144
144
|
root: {
|
|
145
|
-
'&.Mui-
|
|
145
|
+
'&.Mui-focusVisible': isA11y && focus
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
MuiTypography: {
|
|
150
150
|
styleOverrides: {
|
|
151
151
|
root: {
|
|
152
|
-
'
|
|
152
|
+
'&:focus': isA11y && focus
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
},
|
|
@@ -164,7 +164,7 @@ export var sisccTheme = function sisccTheme(_ref) {
|
|
|
164
164
|
color: outerPalette.primaryLight || innerPalette.primaryLight,
|
|
165
165
|
textDecoration: 'underline'
|
|
166
166
|
},
|
|
167
|
-
'
|
|
167
|
+
'&:focus': isA11y && focus
|
|
168
168
|
},
|
|
169
169
|
button: {
|
|
170
170
|
'&:focus': isA11y && focus
|
|
@@ -13,6 +13,10 @@ var _propTypes = require('prop-types');
|
|
|
13
13
|
|
|
14
14
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
15
15
|
|
|
16
|
+
var _classnames = require('classnames');
|
|
17
|
+
|
|
18
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
19
|
+
|
|
16
20
|
var _ramda = require('ramda');
|
|
17
21
|
|
|
18
22
|
var R = _interopRequireWildcard(_ramda);
|
|
@@ -54,15 +58,25 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
54
58
|
var MAX_COLUMNS = exports.MAX_COLUMNS = 12;
|
|
55
59
|
var COLUMNS = exports.COLUMNS = [12, 12, 6, 4, 3, 3, 2, 2, 2, 2, 2, 2, 1];
|
|
56
60
|
|
|
57
|
-
var useStyles = (0, _makeStyles2.default)(function () {
|
|
61
|
+
var useStyles = (0, _makeStyles2.default)(function (theme) {
|
|
58
62
|
return {
|
|
59
63
|
collapseContainer: {
|
|
60
64
|
width: '100%'
|
|
65
|
+
},
|
|
66
|
+
container: {
|
|
67
|
+
'&:focus': {
|
|
68
|
+
outlineColor: theme.palette.highlight.hl1,
|
|
69
|
+
outlineWidth: 2,
|
|
70
|
+
outlineStyle: 'auto',
|
|
71
|
+
paddingBottom: 16
|
|
72
|
+
}
|
|
61
73
|
}
|
|
62
74
|
};
|
|
63
75
|
});
|
|
64
76
|
|
|
65
77
|
var CollapseButtons = function CollapseButtons(props) {
|
|
78
|
+
var _cx;
|
|
79
|
+
|
|
66
80
|
var _props$items = props.items,
|
|
67
81
|
items = _props$items === undefined ? [] : _props$items,
|
|
68
82
|
_props$action = props.action,
|
|
@@ -82,7 +96,8 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
82
96
|
_props$textTransform = props.textTransform,
|
|
83
97
|
textTransform = _props$textTransform === undefined ? 'none' : _props$textTransform,
|
|
84
98
|
_props$labelAccessor = props.labelAccessor,
|
|
85
|
-
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor
|
|
99
|
+
labelAccessor = _props$labelAccessor === undefined ? R.prop('label') : _props$labelAccessor,
|
|
100
|
+
accessibility = props.accessibility;
|
|
86
101
|
|
|
87
102
|
|
|
88
103
|
var classes = useStyles();
|
|
@@ -115,7 +130,14 @@ var CollapseButtons = function CollapseButtons(props) {
|
|
|
115
130
|
|
|
116
131
|
return _react2.default.createElement(
|
|
117
132
|
_Grid2.default,
|
|
118
|
-
{
|
|
133
|
+
{
|
|
134
|
+
container: true,
|
|
135
|
+
spacing: 2,
|
|
136
|
+
'data-testid': testId,
|
|
137
|
+
justifyContent: justify,
|
|
138
|
+
className: (0, _classnames2.default)((_cx = {}, _cx[classes.container] = accessibility, _cx)),
|
|
139
|
+
tabIndex: 0
|
|
140
|
+
},
|
|
119
141
|
R.map(function (_ref) {
|
|
120
142
|
var id = _ref.id,
|
|
121
143
|
label = _ref.label,
|
|
@@ -203,7 +225,8 @@ CollapseButtons.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
203
225
|
gridButtonsProps: _propTypes2.default.object,
|
|
204
226
|
justify: _propTypes2.default.string,
|
|
205
227
|
textTransform: _propTypes2.default.string,
|
|
206
|
-
labelAccessor: _propTypes2.default.func
|
|
228
|
+
labelAccessor: _propTypes2.default.func,
|
|
229
|
+
accessibility: _propTypes2.default.bool
|
|
207
230
|
} : {};
|
|
208
231
|
|
|
209
232
|
exports.default = CollapseButtons;
|
|
@@ -137,6 +137,13 @@ var Item = function Item(_ref) {
|
|
|
137
137
|
action(parentId, id);
|
|
138
138
|
e.stopPropagation();
|
|
139
139
|
},
|
|
140
|
+
onKeyDown: function onKeyDown(e) {
|
|
141
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
142
|
+
if (R.not(R.is(Function)(action))) return;
|
|
143
|
+
action(parentId, id);
|
|
144
|
+
e.stopPropagation();
|
|
145
|
+
}
|
|
146
|
+
},
|
|
140
147
|
tabIndex: 0,
|
|
141
148
|
underline: 'none',
|
|
142
149
|
style: { display: 'list-item' }
|
package/lib/Logo/Logo.js
CHANGED
|
@@ -48,7 +48,7 @@ var Logo = function Logo(_ref) {
|
|
|
48
48
|
var classes = useStyles();
|
|
49
49
|
return _react2.default.createElement(
|
|
50
50
|
'span',
|
|
51
|
-
{ className: classes.container, role: '
|
|
51
|
+
{ className: classes.container, role: 'presentation' },
|
|
52
52
|
_react2.default.createElement('img', {
|
|
53
53
|
className: (0, _classnames2.default)(classes.logo, classes.alternativeBrowserLogo),
|
|
54
54
|
style: { maxHeight: maxHeight },
|
|
@@ -149,7 +149,6 @@ var Spotlight = function Spotlight(_ref) {
|
|
|
149
149
|
R.gt(size(R.prop('fields', spotlight)), 1) ? _react2.default.createElement(
|
|
150
150
|
_react.Fragment,
|
|
151
151
|
null,
|
|
152
|
-
_react2.default.createElement(_Divider2.default, { className: classes.divider, 'aria-hidden': 'true' }),
|
|
153
152
|
_react2.default.createElement(_Fields.Field, {
|
|
154
153
|
spotlight: spotlight,
|
|
155
154
|
onChangeField: onChangeField,
|
package/lib/theme.js
CHANGED
|
@@ -59,9 +59,9 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
59
59
|
},
|
|
60
60
|
styleOverrides: {
|
|
61
61
|
root: _extends({
|
|
62
|
-
'&:focus': {
|
|
63
|
-
outline: 'none'
|
|
64
|
-
}
|
|
62
|
+
'&:focus': _extends({
|
|
63
|
+
outline: !isA11y && 'none'
|
|
64
|
+
}, isA11y && focus)
|
|
65
65
|
}, buttonBaseFocus)
|
|
66
66
|
}
|
|
67
67
|
},
|
|
@@ -107,9 +107,9 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
107
107
|
styleOverrides: {
|
|
108
108
|
root: {
|
|
109
109
|
textTransform: 'none',
|
|
110
|
-
'&:focus': {
|
|
111
|
-
outline: 'none'
|
|
112
|
-
}
|
|
110
|
+
'&:focus': _extends({
|
|
111
|
+
outline: !isA11y && 'none'
|
|
112
|
+
}, isA11y && focus)
|
|
113
113
|
},
|
|
114
114
|
textPrimary: {
|
|
115
115
|
'&:hover': {
|
|
@@ -146,14 +146,14 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
146
146
|
MuiOutlinedInput: {
|
|
147
147
|
styleOverrides: {
|
|
148
148
|
root: {
|
|
149
|
-
'&.Mui-
|
|
149
|
+
'&.Mui-focusVisible': isA11y && focus
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
MuiTypography: {
|
|
154
154
|
styleOverrides: {
|
|
155
155
|
root: {
|
|
156
|
-
'
|
|
156
|
+
'&:focus': isA11y && focus
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
},
|
|
@@ -168,7 +168,7 @@ var sisccTheme = exports.sisccTheme = function sisccTheme(_ref) {
|
|
|
168
168
|
color: outerPalette.primaryLight || innerPalette.primaryLight,
|
|
169
169
|
textDecoration: 'underline'
|
|
170
170
|
},
|
|
171
|
-
'
|
|
171
|
+
'&:focus': isA11y && focus
|
|
172
172
|
},
|
|
173
173
|
button: {
|
|
174
174
|
'&:focus': isA11y && focus
|