@statsbygg/layout 0.1.24 → 0.2.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.
@@ -0,0 +1,103 @@
1
+ :root {
2
+ /* Heading font weights (override Digdir defaults) */
3
+ --ds-heading-2xl-font-weight: var(--ds-font-weight-bold);
4
+ --ds-heading-xl-font-weight: var(--ds-font-weight-bold);
5
+ --ds-heading-lg-font-weight: var(--ds-font-weight-bold);
6
+ --ds-heading-md-font-weight: var(--ds-font-weight-bold);
7
+ --ds-heading-sm-font-weight: var(--ds-font-weight-bold);
8
+ --ds-heading-xs-font-weight: var(--ds-font-weight-semibold);
9
+ --ds-heading-2xs-font-weight: var(--ds-font-weight-bold);
10
+ }
11
+
12
+ [data-background] {
13
+ --layout-background: var(--ds-color-background-tinted);
14
+ }
15
+
16
+ [data-background="default"] {
17
+ --layout-background: var(--ds-color-background-tinted);
18
+ }
19
+
20
+ [data-background="white"] {
21
+ --layout-background: var(--ds-color-background-default);
22
+ }
23
+
24
+ /* Not used yet. This exists as an example for how to add more potential background colors. */
25
+ [data-background="alternative"] {
26
+ --layout-background: pink;
27
+ }
28
+
29
+ html {
30
+ height: 100%;
31
+ overflow: visible !important;
32
+ }
33
+
34
+ main {
35
+ background-color: var(--layout-background, var(--ds-color-background-tinted));
36
+ padding-inline: var(--ds-size-4);
37
+ }
38
+
39
+ main > * {
40
+ max-width: 90rem;
41
+ margin-inline: auto;
42
+ }
43
+
44
+ body {
45
+ height: 100%;
46
+ margin: 0;
47
+ font-family: var(--ds-font-family);
48
+ color: var(--ds-color-neutral-text-default);
49
+ line-height: 1.6;
50
+ overflow: visible !important;
51
+ -webkit-font-smoothing: antialiased;
52
+ -moz-osx-font-smoothing: grayscale;
53
+ --font-quaternary: IBM Plex mono;
54
+ --font-tertiary: IBM Plex Sans Condensed;
55
+ }
56
+
57
+ h1,
58
+ h2,
59
+ h3,
60
+ h4,
61
+ h5,
62
+ h6 {
63
+ font-family: var(--font-tertiary);
64
+ }
65
+
66
+ a {
67
+ color: inherit;
68
+ text-decoration: none;
69
+ transition: color 0.2s ease;
70
+ }
71
+
72
+ a:hover {
73
+ color: var(--ds-color-accent-text-default);
74
+ }
75
+
76
+ img {
77
+ max-width: 100%;
78
+ height: auto;
79
+ }
80
+
81
+ .ds-details:not([open]) > :is(summary, u-summary)::before {
82
+ --dsc-details-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' fill='none' viewBox='0 0 24 24' focusable='false' role='img'%3E%3Cpath fill='currentColor' d='M12.75 5.5a.75.75 0 0 0-1.5 0v5.75H5.5a.75.75 0 0 0 0 1.5h5.75v5.75a.75.75 0 0 0 1.5 0v-5.75h5.75a.75.75 0 0 0 0-1.5h-5.75z'%3E%3C/path%3E%3C/svg%3E");
83
+ }
84
+
85
+ .ds-details[open] > :is(summary, u-summary)::before {
86
+ --dsc-details-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' fill='none' viewBox='0 0 24 24' focusable='false' role='img'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M4.75 12a.75.75 0 0 1 .75-.75h13a.75.75 0 1 1 0 1.5h-13a.75.75 0 0 1-.75-.75' clip-rule='evenodd'%3E%3C/path%3E%3C/svg%3E");
87
+ }
88
+
89
+ .ds-fieldset > * + * {
90
+ margin-block-start: 0;
91
+ }
92
+
93
+ @media (min-width: 768px) {
94
+ main {
95
+ padding-inline: var(--ds-size-8);
96
+ }
97
+ }
98
+
99
+ @media (min-width: 1024px) {
100
+ main {
101
+ padding-inline: 2.5rem;
102
+ }
103
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statsbygg/layout",
3
- "version": "0.1.24",
3
+ "version": "0.2.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -12,7 +12,8 @@
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
14
  "default": "./dist/index.js"
15
- }
15
+ },
16
+ "./base.css": "./dist/styles/base.css"
16
17
  },
17
18
  "files": [
18
19
  "dist/**"
@@ -20,13 +21,6 @@
20
21
  "sideEffects": [
21
22
  "**/*.css"
22
23
  ],
23
- "scripts": {
24
- "build": "tsup && node scripts/copy-css.js",
25
- "dev": "tsup --watch --onSuccess \"node scripts/copy-css.js\"",
26
- "lint": "eslint src --ext .ts,.tsx",
27
- "type-check": "tsc --noEmit",
28
- "clean": "rm -rf dist"
29
- },
30
24
  "peerDependencies": {
31
25
  "next": ">=14.0.0",
32
26
  "react": ">=18.0.0",
@@ -36,6 +30,7 @@
36
30
  },
37
31
  "dependencies": {
38
32
  "@digdir/designsystemet-react": "1.12.1",
33
+ "@navikt/aksel-icons": "^8.8.0",
39
34
  "clsx": "^2.0.0",
40
35
  "lucide-react": "^0.514.0"
41
36
  },
@@ -47,5 +42,12 @@
47
42
  "glob": "^10.3.10",
48
43
  "tsup": "^8.0.0",
49
44
  "typescript": "^5.0.0"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup && node scripts/copy-css.js",
48
+ "dev": "tsup --watch --onSuccess \"node scripts/copy-css.js\"",
49
+ "lint": "eslint src --ext .ts,.tsx",
50
+ "type-check": "tsc --noEmit",
51
+ "clean": "rm -rf dist"
50
52
  }
51
- }
53
+ }