@navikt/ds-css 8.11.0 → 8.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "8.11.0",
3
+ "version": "8.12.0",
4
4
  "description": "CSS for Nav Designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -32,7 +32,7 @@
32
32
  "css:get-version": "node config/get-version.js"
33
33
  },
34
34
  "devDependencies": {
35
- "@navikt/ds-tokens": "^8.11.0",
35
+ "@navikt/ds-tokens": "^8.12.0",
36
36
  "browserslist": "^4.25.0",
37
37
  "esbuild": "^0.28.0",
38
38
  "fast-glob": "3.3.3",
@@ -1,5 +1,19 @@
1
1
  /* --------------------------- ActionMenu content --------------------------- */
2
2
  .aksel-action-menu__content {
3
+ --__axc-action-menu-content-p-block: var(--ax-space-6);
4
+ --__axc-action-menu-content-p-inline: var(--ax-space-8);
5
+ --__axc-action-menu-item-height: 2rem;
6
+ --__axc-action-menu-item-font-size: var(--ax-font-size-medium);
7
+ --__axc-action-menu-content-group-label-pt: var(--ax-space-2);
8
+
9
+ &[data-size="medium"] {
10
+ --__axc-action-menu-content-p-block: var(--ax-space-8);
11
+ --__axc-action-menu-content-p-inline: var(--ax-space-12);
12
+ --__axc-action-menu-item-height: var(--ax-space-40);
13
+ --__axc-action-menu-item-font-size: var(--ax-font-size-large);
14
+ --__axc-action-menu-content-group-label-pt: var(--ax-space-4);
15
+ }
16
+
3
17
  overflow: hidden;
4
18
  border-radius: var(--ax-radius-12);
5
19
  border: 1px solid var(--ax-border-neutral-subtleA);
@@ -19,10 +33,8 @@
19
33
  }
20
34
 
21
35
  .aksel-action-menu__content > .aksel-action-menu__content-inner {
22
- --__axc-action-menu-content-p: var(--ax-space-8);
23
36
  --__axc-action-menu-item-pr: var(--ax-space-8);
24
37
  --__axc-action-menu-item-pl: var(--ax-space-8);
25
- --__axc-action-menu-item-height: 2rem;
26
38
 
27
39
  border-radius: var(--ax-radius-12);
28
40
  background-color: var(--ax-bg-raised);
@@ -30,7 +42,8 @@
30
42
  max-width: min(95vw, 640px);
31
43
  animation-duration: 160ms;
32
44
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
33
- padding: var(--__axc-action-menu-content-p);
45
+ padding-block: var(--__axc-action-menu-content-p-block);
46
+ padding-inline: var(--__axc-action-menu-content-p-inline);
34
47
  overflow: auto;
35
48
  /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
36
49
  max-height: var(--__axc-action-menu-content-available-height);
@@ -47,8 +60,8 @@
47
60
  position: relative;
48
61
  padding-left: var(--__axc-action-menu-item-pl);
49
62
  padding-right: var(--__axc-action-menu-item-pr);
50
- font-size: var(--ax-font-size-medium);
51
- scroll-margin-block: var(--__axc-action-menu-content-p);
63
+ font-size: var(--__axc-action-menu-item-font-size);
64
+ scroll-margin-block: var(--__axc-action-menu-content-p-block);
52
65
  line-height: 1.5;
53
66
  color: var(--ax-text-neutral);
54
67
  text-decoration: none;
@@ -68,8 +81,14 @@
68
81
  pointer-events: none;
69
82
  }
70
83
 
84
+ /* Indent items with left marker or if data-indent is set to true */
85
+ &[data-indent="true"],
71
86
  &[data-marker="left"] {
72
- --__axc-action-menu-item-pl: var(--ax-space-24);
87
+ --__axc-action-menu-item-pl: var(--ax-space-28); /* 28px */
88
+
89
+ .aksel-action-menu__content[data-size="medium"] & {
90
+ --__axc-action-menu-item-pl: var(--ax-space-32); /* 32px */
91
+ }
73
92
  }
74
93
  }
75
94
 
@@ -152,19 +171,23 @@
152
171
  .aksel-action-menu__label {
153
172
  display: flex;
154
173
  align-items: center;
155
- min-height: calc(var(--__axc-action-menu-item-height) - 6px);
174
+ min-height: var(--__axc-action-menu-item-height);
156
175
  padding-right: var(--__axc-action-menu-item-pr);
157
176
  padding-left: var(--__axc-action-menu-item-pl);
158
- color: var(--ax-text-neutral-subtle);
159
177
  border-radius: var(--ax-radius-4);
160
178
  user-select: none;
161
179
  cursor: default;
162
- font-size: var(--ax-font-size-small);
180
+ font-size: var(--ax-font-size-medium);
181
+ font-weight: var(--ax-font-weight-bold);
182
+ }
183
+
184
+ .aksel-action-menu__group:not(:first-child) .aksel-action-menu__label {
185
+ padding-top: var(--__axc-action-menu-content-group-label-pt);
163
186
  }
164
187
 
165
188
  .aksel-action-menu__divider {
166
189
  height: 1px;
167
- margin-block: var(--ax-space-8);
190
+ margin-block: var(--ax-space-4);
168
191
  background-color: var(--ax-border-neutral-subtleA);
169
192
  }
170
193
 
@@ -68,16 +68,23 @@
68
68
 
69
69
  .aksel-data-table__thead {
70
70
  background-color: var(--ax-bg-raised);
71
+ position: relative; /* Shadow ends up behind loading/empty-state without, consider after-element instead like with sticky */
72
+ box-shadow: 0 1px 0 0 var(--ax-border-neutral-subtle);
71
73
 
72
74
  .aksel-data-table[data-loading="true"] &::after {
73
75
  content: "";
74
76
  position: absolute;
75
77
  block-size: 2px;
76
- inset-block-end: -2px;
77
78
  background-color: var(--ax-bg-strong);
78
79
  animation: animateDataTableLoading 1s linear infinite;
79
80
  z-index: 11;
80
81
  }
82
+
83
+ &[data-sticky="true"] {
84
+ position: sticky;
85
+ top: 0;
86
+ z-index: 3;
87
+ }
81
88
  }
82
89
 
83
90
  .aksel-data-table__tbody {
@@ -85,12 +92,7 @@
85
92
  position: relative;
86
93
 
87
94
  &[inert] {
88
- transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
89
95
  opacity: var(--ax-opacity-disabled);
90
-
91
- @starting-style {
92
- opacity: 0.001;
93
- }
94
96
  }
95
97
 
96
98
  &[inert]::after {
@@ -98,15 +100,8 @@
98
100
  position: absolute;
99
101
  inset: 0;
100
102
  background-color: var(--ax-bg-overlay);
101
- transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
102
- z-index: 10;
103
+ z-index: 2;
103
104
  opacity: 0.2;
104
-
105
- /* iOS 26+: Ensure the backdrop covers the entire visible viewport. */
106
-
107
- @starting-style {
108
- opacity: 0.001;
109
- }
110
105
  }
111
106
  }
112
107
 
@@ -114,23 +109,6 @@
114
109
  &[data-selected="true"] {
115
110
  background-color: var(--ax-bg-softA);
116
111
  }
117
-
118
- .aksel-data-table__thead &[data-sticky="true"] {
119
- position: sticky;
120
- top: 0;
121
- z-index: 3;
122
- box-shadow: 1px 1px 0 0 var(--ax-border-neutral-subtle);
123
-
124
- /* This breaks filler-cells ⬇️. Trying box-shadow instead ⬆️ */
125
- /* &::after {
126
- content: "";
127
- position: absolute;
128
- inset-inline: 0;
129
- bottom: -1px;
130
- pointer-events: none;
131
- border-bottom: 1px solid var(--ax-border-neutral-subtle);
132
- } */
133
- }
134
112
  }
135
113
 
136
114
  /* BORDER STYLING START */
@@ -158,11 +136,6 @@
158
136
  border-bottom: 1px solid var(--ax-border-neutral-subtle);
159
137
  }
160
138
 
161
- .aksel-data-table__thead {
162
- position: relative; /* Shadow ends up behind loading/empty-state without, consider after-element instead like with sticky */
163
- box-shadow: 0 1px 0 0 var(--ax-border-neutral-subtle);
164
- }
165
-
166
139
  @keyframes scroll-shadow-fade-start {
167
140
  0% {
168
141
  opacity: 0;