orcs-design-system 2.0.84 → 2.0.85
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.
|
@@ -269,16 +269,32 @@ var ExternalAppSwitcher = styled("div").withConfig({
|
|
|
269
269
|
}
|
|
270
270
|
});
|
|
271
271
|
});
|
|
272
|
+
var Theme = styled("div").withConfig({
|
|
273
|
+
displayName: "Header__Theme",
|
|
274
|
+
componentId: "yf04b-9"
|
|
275
|
+
})(function (props) {
|
|
276
|
+
return css({
|
|
277
|
+
borderTop: "solid 1px rgba(255,255,255,0.3)",
|
|
278
|
+
padding: "r",
|
|
279
|
+
paddingTop: "s",
|
|
280
|
+
marginTop: "s",
|
|
281
|
+
"[class^='Small'], [class*=' Small']": {
|
|
282
|
+
display: "block",
|
|
283
|
+
fontWeight: themeGet("fontWeights.1")(props),
|
|
284
|
+
marginTop: "xs"
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
});
|
|
272
288
|
var RightAligned = styled("div").withConfig({
|
|
273
289
|
displayName: "Header__RightAligned",
|
|
274
|
-
componentId: "yf04b-
|
|
290
|
+
componentId: "yf04b-10"
|
|
275
291
|
})(css({
|
|
276
292
|
marginLeft: "auto",
|
|
277
293
|
marginRight: "r"
|
|
278
294
|
}));
|
|
279
295
|
var Overlay = styled("label").withConfig({
|
|
280
296
|
displayName: "Header__Overlay",
|
|
281
|
-
componentId: "yf04b-
|
|
297
|
+
componentId: "yf04b-11"
|
|
282
298
|
})(function (props) {
|
|
283
299
|
return css({
|
|
284
300
|
position: "fixed",
|
|
@@ -312,7 +328,8 @@ export default function Header(_ref) {
|
|
|
312
328
|
searchComponent = _ref.searchComponent,
|
|
313
329
|
dataTestId = _ref.dataTestId,
|
|
314
330
|
theme = _ref.theme,
|
|
315
|
-
variant = _ref.variant
|
|
331
|
+
variant = _ref.variant,
|
|
332
|
+
themeSwitcherContent = _ref.themeSwitcherContent;
|
|
316
333
|
var component = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MobileNavToggle, {
|
|
317
334
|
type: "checkbox",
|
|
318
335
|
id: "mobileMenuToggle"
|
|
@@ -379,7 +396,12 @@ export default function Header(_ref) {
|
|
|
379
396
|
px: "r",
|
|
380
397
|
py: "s",
|
|
381
398
|
display: "block"
|
|
382
|
-
}, "External apps:"), externalAppSwitcherContent)
|
|
399
|
+
}, "External apps:"), externalAppSwitcherContent), themeSwitcherContent && /*#__PURE__*/React.createElement(Theme, null, /*#__PURE__*/React.createElement(Small, {
|
|
400
|
+
color: "white60",
|
|
401
|
+
pt: "s",
|
|
402
|
+
pb: "r",
|
|
403
|
+
display: "block"
|
|
404
|
+
}, "Switch theme:"), themeSwitcherContent))), /*#__PURE__*/React.createElement(Overlay, {
|
|
383
405
|
htmlFor: "mobileMenuToggle"
|
|
384
406
|
}));
|
|
385
407
|
return theme ? /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
@@ -430,7 +452,10 @@ Header.propTypes = {
|
|
|
430
452
|
variant: PropTypes.oneOf(["search"]),
|
|
431
453
|
|
|
432
454
|
/** Allows for use of the `data-testid` attribute for testing. */
|
|
433
|
-
dataTestId: PropTypes.string
|
|
455
|
+
dataTestId: PropTypes.string,
|
|
456
|
+
|
|
457
|
+
/** Theme related props **/
|
|
458
|
+
themeSwitcherContent: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)])
|
|
434
459
|
};
|
|
435
460
|
Header.__docgenInfo = {
|
|
436
461
|
"description": "Header component for global app navigation.\n\nAt screen sizes less than 1100px the links are instead moved into a mobile menu toggled by a burger icon button to play nice with smaller devices.",
|
|
@@ -585,6 +610,21 @@ Header.__docgenInfo = {
|
|
|
585
610
|
},
|
|
586
611
|
"required": false,
|
|
587
612
|
"description": "Allows for use of the `data-testid` attribute for testing."
|
|
613
|
+
},
|
|
614
|
+
"themeSwitcherContent": {
|
|
615
|
+
"type": {
|
|
616
|
+
"name": "union",
|
|
617
|
+
"value": [{
|
|
618
|
+
"name": "node"
|
|
619
|
+
}, {
|
|
620
|
+
"name": "arrayOf",
|
|
621
|
+
"value": {
|
|
622
|
+
"name": "node"
|
|
623
|
+
}
|
|
624
|
+
}]
|
|
625
|
+
},
|
|
626
|
+
"required": false,
|
|
627
|
+
"description": "Theme related props *"
|
|
588
628
|
}
|
|
589
629
|
}
|
|
590
630
|
};
|