dibk-design 3.0.0 → 3.0.1

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.
@@ -22,7 +22,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
22
22
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
24
  var NavigationBar = function NavigationBar(props) {
25
- var _props$primaryListIte, _props$secondaryListI;
25
+ var _props$primaryListIte, _props$secondaryListI, _props$mainContentId;
26
26
  var _useState = (0, _react.useState)(false),
27
27
  _useState2 = _slicedToArray(_useState, 2),
28
28
  active = _useState2[0],
@@ -108,16 +108,17 @@ var NavigationBar = function NavigationBar(props) {
108
108
  };
109
109
  var hasListItems = !!((_props$primaryListIte = props.primaryListItems) !== null && _props$primaryListIte !== void 0 && _props$primaryListIte.length) || !!((_props$secondaryListI = props.secondaryListItems) !== null && _props$secondaryListI !== void 0 && _props$secondaryListI.length);
110
110
  return _react.default.createElement("div", {
111
- className: _NavigationBarModule.default.isPresent
112
- }, _react.default.createElement("div", {
113
- className: _NavigationBarModule.default.navigationBar,
114
- style: navigationBarThemeStyle
115
- }, _react.default.createElement("a", {
111
+ className: _NavigationBarModule.default.navigationBarContainer
112
+ }, ((_props$mainContentId = props.mainContentId) === null || _props$mainContentId === void 0 ? void 0 : _props$mainContentId.length) && _react.default.createElement("a", {
116
113
  id: "main-content-link",
117
- class: "main-content-link"
114
+ href: "#".concat(props.mainContentId),
115
+ class: _NavigationBarModule.default.mainContentLink
118
116
  }, _react.default.createElement("span", {
119
117
  id: "main-content-link-text"
120
118
  }, "Hopp til hovedinnhold")), _react.default.createElement("div", {
119
+ className: _NavigationBarModule.default.navigationBar,
120
+ style: navigationBarThemeStyle
121
+ }, _react.default.createElement("div", {
121
122
  className: _NavigationBarModule.default.logoContainer
122
123
  }, renderLogo(props.logoLink)), !!props.children && _react.default.createElement("div", {
123
124
  className: _NavigationBarModule.default.childElements
@@ -1,9 +1,39 @@
1
1
  @import "../style/global.scss";
2
2
 
3
- .isPresent {
3
+ .navigationBarContainer {
4
4
  @include box-shadow(0 2px 4px -2px rgba(0, 0, 0, 0.2));
5
5
  position: relative;
6
6
  z-index: 1;
7
+ .mainContentLink {
8
+ display: block;
9
+ background-color: #072938;
10
+ padding: 8px;
11
+ text-align: center;
12
+ text-decoration: none;
13
+ font-size: 19px;
14
+ color: #fff;
15
+ position: absolute;
16
+ overflow: hidden;
17
+ clip: rect(1px, 1px, 1px, 1px);
18
+ width: 1px;
19
+ height: 1px;
20
+ word-wrap: normal;
21
+ &:focus,
22
+ &:active {
23
+ position: static;
24
+ overflow: visible;
25
+ clip: auto;
26
+ width: auto;
27
+ height: auto;
28
+ span {
29
+ z-index: 100;
30
+ outline: 3px solid #005fca;
31
+ outline-offset: 2px;
32
+ transition: none;
33
+ text-decoration: none;
34
+ }
35
+ }
36
+ }
7
37
  .navigationBar {
8
38
  background-color: $color-dark-blue;
9
39
  height: 54px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibk-design",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "files": [