orcs-design-system 2.1.19 → 2.1.20
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.
|
@@ -344,6 +344,7 @@ var MobileNavToggle = styled("input").withConfig({
|
|
|
344
344
|
return css({
|
|
345
345
|
opacity: "0",
|
|
346
346
|
position: "absolute",
|
|
347
|
+
visibility: "hidden",
|
|
347
348
|
margin: 0,
|
|
348
349
|
zIndex: 0,
|
|
349
350
|
width: 0,
|
|
@@ -543,6 +544,8 @@ export default function Header(_ref) {
|
|
|
543
544
|
}, appSwitcher && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Switcher, {
|
|
544
545
|
title: "Switch to...",
|
|
545
546
|
onClick: onToggle,
|
|
547
|
+
"aria-role": "navigation",
|
|
548
|
+
"aria-label": "Toggle workspace and app switcher menu",
|
|
546
549
|
ref: switcherRef
|
|
547
550
|
}, /*#__PURE__*/React.createElement(SwitcherTopLeft, null), /*#__PURE__*/React.createElement(SwitcherTopMiddle, null), /*#__PURE__*/React.createElement(SwitcherTopRight, null), /*#__PURE__*/React.createElement(SwitcherMiddleLeft, null), /*#__PURE__*/React.createElement(SwitcherMiddleMiddle, null), /*#__PURE__*/React.createElement(SwitcherMiddleRight, null), /*#__PURE__*/React.createElement(SwitcherBottomLeft, null), /*#__PURE__*/React.createElement(SwitcherBottomMiddle, null), /*#__PURE__*/React.createElement(SwitcherBottomRight, null)), /*#__PURE__*/React.createElement(AppsMenu, {
|
|
548
551
|
lightAppSwitcher: lightAppSwitcher,
|
|
@@ -593,7 +596,9 @@ export default function Header(_ref) {
|
|
|
593
596
|
theme: theme
|
|
594
597
|
}, /*#__PURE__*/React.createElement(Hamburger, {
|
|
595
598
|
id: "hamburger-menu-icon"
|
|
596
|
-
})))), /*#__PURE__*/React.createElement(MobileNavMenu,
|
|
599
|
+
})))), /*#__PURE__*/React.createElement(MobileNavMenu, {
|
|
600
|
+
"aria-hidden": "true"
|
|
601
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
597
602
|
m: "s"
|
|
598
603
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
599
604
|
borderBottomWidth: 1,
|
|
@@ -16,7 +16,9 @@ var Input = styled.input.attrs({
|
|
|
16
16
|
}).withConfig({
|
|
17
17
|
displayName: "Toggle__Input",
|
|
18
18
|
componentId: "f6l22k-1"
|
|
19
|
-
})(["opacity:0;position:absolute;margin:0;z-index:-1;width:0;height:0;pointer-events:none;&:focus{+ label{box-shadow:", ";}}:checked{+ label{background:", ";&:after{left:calc(100% - 3px);transform:translateX(-100%);}}&:focus{+ label{box-shadow:", ";}}}"], function (props) {
|
|
19
|
+
})(["opacity:0;position:absolute;visibility:", ";margin:0;z-index:-1;width:0;height:0;pointer-events:none;&:focus{+ label{box-shadow:", ";}}:checked{+ label{background:", ";&:after{left:calc(100% - 3px);transform:translateX(-100%);}}&:focus{+ label{box-shadow:", ";}}}"], function (props) {
|
|
20
|
+
return props.srHide ? "hidden" : "visible";
|
|
21
|
+
}, function (props) {
|
|
20
22
|
return themeGet("shadows.thinOutline")(props) + " " + themeGet("colors.black30")(props);
|
|
21
23
|
}, function (props) {
|
|
22
24
|
return themeGet("colors.success")(props);
|
|
@@ -73,14 +75,16 @@ export default function Toggle(_ref) {
|
|
|
73
75
|
label = _ref.label,
|
|
74
76
|
checked = _ref.checked,
|
|
75
77
|
disabled = _ref.disabled,
|
|
76
|
-
|
|
78
|
+
srHide = _ref.srHide,
|
|
79
|
+
props = _objectWithoutProperties(_ref, ["inverted", "id", "small", "theme", "label", "checked", "disabled", "srHide"]);
|
|
77
80
|
|
|
78
81
|
var component = /*#__PURE__*/React.createElement(Group, {
|
|
79
82
|
inverted: inverted
|
|
80
83
|
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
81
84
|
id: id,
|
|
82
85
|
checked: checked,
|
|
83
|
-
disabled: disabled
|
|
86
|
+
disabled: disabled,
|
|
87
|
+
srHide: srHide
|
|
84
88
|
}, props)), /*#__PURE__*/React.createElement(Item, {
|
|
85
89
|
htmlFor: id,
|
|
86
90
|
small: small,
|
|
@@ -114,6 +118,9 @@ Toggle.propTypes = {
|
|
|
114
118
|
/** Makes toggle and label smaller. */
|
|
115
119
|
small: PropTypes.bool,
|
|
116
120
|
|
|
121
|
+
/** Hides toggle from screen-reader. Only to be used when toggle alters visual presentation, not functional. */
|
|
122
|
+
srHide: PropTypes.bool,
|
|
123
|
+
|
|
117
124
|
/** Specifies the theme for component design */
|
|
118
125
|
theme: PropTypes.object
|
|
119
126
|
};
|
|
@@ -176,6 +183,13 @@ Toggle.__docgenInfo = {
|
|
|
176
183
|
"required": false,
|
|
177
184
|
"description": "Applies disabled attribute and styles"
|
|
178
185
|
},
|
|
186
|
+
"srHide": {
|
|
187
|
+
"type": {
|
|
188
|
+
"name": "bool"
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"description": "Hides toggle from screen-reader. Only to be used when toggle alters visual presentation, not functional."
|
|
192
|
+
},
|
|
179
193
|
"theme": {
|
|
180
194
|
"type": {
|
|
181
195
|
"name": "object"
|