@norges-domstoler/dds-components 13.6.3 → 13.6.4

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/dist/cjs/index.js CHANGED
@@ -7,8 +7,8 @@ var ddsIcons = require('@norges-domstoler/dds-icons');
7
7
  var ddsTypography = require('@norges-domstoler/dds-typography');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var styled = require('styled-components');
10
- var React = require('react');
11
10
  var ddsDesignTokens = require('@norges-domstoler/dds-design-tokens');
11
+ var React = require('react');
12
12
  var tslib = require('tslib');
13
13
  var ReactSelect = require('react-select');
14
14
  var reactDom = require('react-dom');
@@ -181,7 +181,7 @@ var navTokens = appShellTokens.navigation;
181
181
  var Sidebar = styled__default.default.div.withConfig({
182
182
  displayName: "Navigation__Sidebar",
183
183
  componentId: "sc-twhp5c-0"
184
- })(["display:flex;flex-direction:column;height:100vh;width:", ";padding:", ";color:", ";background-color:", ";position:sticky;top:0;left:0;"], navTokens.width, navTokens.padding, navTokens.color, navTokens.backgroundColor);
184
+ })(["display:flex;flex-direction:column;height:100vh;width:", ";padding:", ";color:", ";background-color:", ";box-sizing:border-box;position:sticky;top:0;left:0;"], navTokens.width, navTokens.padding, navTokens.color, navTokens.backgroundColor);
185
185
  var LogoAndVersionContainer = styled__default.default.div.withConfig({
186
186
  displayName: "Navigation__LogoAndVersionContainer",
187
187
  componentId: "sc-twhp5c-1"
@@ -226,7 +226,7 @@ var Navigation$1 = function Navigation(_ref) {
226
226
  return item;
227
227
  }), external.length > 0 && jsxRuntime.jsx(DividerWrapper, {
228
228
  children: jsxRuntime.jsx(StyledDivider$1, {})
229
- }), React.Children.map(external, function (item, i) {
229
+ }), React.Children.map(external, function (item) {
230
230
  if (item.type !== NavigationItem$1) {
231
231
  console.warn('Du bruker en React-komponent som ikke er tillat i AppShell-external. Du kan kun bruke AppShell.NavItem i AppShell-external.');
232
232
  return null;
@@ -241,6 +241,10 @@ var AppShellContainer = styled__default.default.div.withConfig({
241
241
  displayName: "AppShell__AppShellContainer",
242
242
  componentId: "sc-1c8yu5p-0"
243
243
  })(["display:flex;flex-direction:row;"]);
244
+ var MainContent = styled__default.default.main.withConfig({
245
+ displayName: "AppShell__MainContent",
246
+ componentId: "sc-1c8yu5p-1"
247
+ })(["min-width:calc(100vw - ", ");max-width:calc(100vw - ", ");"], appShellTokens.navigation.width, appShellTokens.navigation.width);
244
248
  var AppShell$1 = function AppShell(_ref) {
245
249
  var children = _ref.children,
246
250
  _ref$version = _ref.version,
@@ -255,7 +259,9 @@ var AppShell$1 = function AppShell(_ref) {
255
259
  version: version,
256
260
  internal: internal,
257
261
  external: external
258
- }), children]
262
+ }), jsxRuntime.jsx(MainContent, {
263
+ children: children
264
+ })]
259
265
  });
260
266
  };
261
267
 
@@ -1,11 +1,16 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import styled from 'styled-components';
3
+ import { appShellTokens } from './AppShell.tokens.js';
3
4
  import { Navigation } from './Navigation/Navigation.js';
4
5
 
5
6
  var AppShellContainer = styled.div.withConfig({
6
7
  displayName: "AppShell__AppShellContainer",
7
8
  componentId: "sc-1c8yu5p-0"
8
9
  })(["display:flex;flex-direction:row;"]);
10
+ var MainContent = styled.main.withConfig({
11
+ displayName: "AppShell__MainContent",
12
+ componentId: "sc-1c8yu5p-1"
13
+ })(["min-width:calc(100vw - ", ");max-width:calc(100vw - ", ");"], appShellTokens.navigation.width, appShellTokens.navigation.width);
9
14
  var AppShell = function AppShell(_ref) {
10
15
  var children = _ref.children,
11
16
  _ref$version = _ref.version,
@@ -20,7 +25,9 @@ var AppShell = function AppShell(_ref) {
20
25
  version: version,
21
26
  internal: internal,
22
27
  external: external
23
- }), children]
28
+ }), jsx(MainContent, {
29
+ children: children
30
+ })]
24
31
  });
25
32
  };
26
33
 
@@ -9,7 +9,7 @@ var navTokens = appShellTokens.navigation;
9
9
  var Sidebar = styled.div.withConfig({
10
10
  displayName: "Navigation__Sidebar",
11
11
  componentId: "sc-twhp5c-0"
12
- })(["display:flex;flex-direction:column;height:100vh;width:", ";padding:", ";color:", ";background-color:", ";position:sticky;top:0;left:0;"], navTokens.width, navTokens.padding, navTokens.color, navTokens.backgroundColor);
12
+ })(["display:flex;flex-direction:column;height:100vh;width:", ";padding:", ";color:", ";background-color:", ";box-sizing:border-box;position:sticky;top:0;left:0;"], navTokens.width, navTokens.padding, navTokens.color, navTokens.backgroundColor);
13
13
  var LogoAndVersionContainer = styled.div.withConfig({
14
14
  displayName: "Navigation__LogoAndVersionContainer",
15
15
  componentId: "sc-twhp5c-1"
@@ -54,7 +54,7 @@ var Navigation = function Navigation(_ref) {
54
54
  return item;
55
55
  }), external.length > 0 && jsx(DividerWrapper, {
56
56
  children: jsx(StyledDivider, {})
57
- }), Children.map(external, function (item, i) {
57
+ }), Children.map(external, function (item) {
58
58
  if (item.type !== NavigationItem) {
59
59
  console.warn('Du bruker en React-komponent som ikke er tillat i AppShell-external. Du kan kun bruke AppShell.NavItem i AppShell-external.');
60
60
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norges-domstoler/dds-components",
3
- "version": "13.6.3",
3
+ "version": "13.6.4",
4
4
  "description": "React components used in Elsa - domstolenes designsystem",
5
5
  "author": "Elsa team",
6
6
  "license": "MIT",