@navikt/ds-css 8.4.0 → 8.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "CSS for Nav Designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "css:get-version": "node config/get-version.js"
31
31
  },
32
32
  "devDependencies": {
33
- "@navikt/ds-tokens": "^8.4.0",
33
+ "@navikt/ds-tokens": "^8.4.1",
34
34
  "browserslist": "^4.25.0",
35
35
  "esbuild": "^0.27.2",
36
36
  "fast-glob": "3.3.3",
@@ -44,7 +44,7 @@
44
44
  }
45
45
 
46
46
  .aksel-data-table--truncate-content {
47
- .aksel-data-table__td > div {
47
+ .aksel-data-table__td > div:not(:has(> .aksel-checkbox)) {
48
48
  text-overflow: ellipsis;
49
49
  white-space: nowrap;
50
50
  overflow: hidden;
@@ -66,6 +66,24 @@
66
66
  border: none;
67
67
  }
68
68
 
69
+ .aksel-data-table__tr--selected {
70
+ background-color: var(--ax-bg-softA);
71
+ box-shadow:
72
+ inset 1px 0 0 0 var(--ax-border-default),
73
+ inset -1px 0 0 0 var(--ax-border-default);
74
+
75
+ &:first-of-type {
76
+ box-shadow:
77
+ inset 1px 0 0 0 var(--ax-border-default),
78
+ inset -1px 0 0 0 var(--ax-border-default),
79
+ inset 0 1px 0 0 var(--ax-border-default);
80
+ }
81
+
82
+ & :is(.aksel-data-table__td, .aksel-data-table__th) {
83
+ border-color: var(--ax-border-default);
84
+ }
85
+ }
86
+
69
87
  .aksel-data-table__th {
70
88
  position: relative;
71
89
  background-color: var(--ax-bg-neutral-soft);
@@ -73,14 +91,13 @@
73
91
  padding: var(--ax-space-8) var(--ax-space-16);
74
92
  text-align: start;
75
93
  border-block-end: 1px solid var(--ax-border-neutral-subtle);
76
- overflow: hidden;
77
94
 
78
95
  &:not(:first-child) {
79
96
  border-inline-start: 1px solid var(--ax-border-neutral-subtle);
80
97
  }
81
98
  }
82
99
 
83
- .aksel-data-table__th-content {
100
+ .aksel-data-table__th-content:not(:has(> .aksel-checkbox)) {
84
101
  text-overflow: ellipsis;
85
102
  white-space: nowrap;
86
103
  overflow: hidden;
@@ -89,30 +106,31 @@
89
106
  .aksel-data-table__th-resize-handle {
90
107
  z-index: 2;
91
108
  position: absolute;
92
- inset-block: 0;
93
- inset-inline-end: 0; /* TODO: See if we can make the handle appear right between the columns */
94
109
  cursor: col-resize;
95
110
  margin: 0;
96
111
  padding: 0;
97
- width: 12px; /* TODO: Violation of WCAG SC 2.5.8 Target Size https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html */
98
112
  border: none;
99
113
  background: transparent;
114
+ display: flex;
115
+ justify-content: center;
116
+ inset-block: 0;
117
+ inset-inline-end: -10px;
118
+ width: 19px; /* TODO: Violation of WCAG SC 2.5.8 Target Size? https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html */
100
119
 
101
120
  &::after {
102
121
  content: "";
103
122
  position: absolute;
104
123
  inset-block: 0;
105
- inset-inline-end: 0;
106
- width: 4px;
124
+ width: 3px;
107
125
  }
108
126
 
109
127
  &:hover::after {
110
128
  /* TODO: Consider if the resize-handle should be visible already when hovering the column header */
111
- background: var(--ax-bg-accent-strong);
129
+ background: var(--ax-bg-strong);
112
130
  }
113
131
 
114
132
  &:active::after {
115
- background: var(--ax-bg-accent-strong-pressed);
133
+ background: var(--ax-bg-strong-pressed);
116
134
  }
117
135
  }
118
136
 
@@ -126,7 +144,8 @@
126
144
  transition: none;
127
145
  }
128
146
 
129
- &:not(.aksel-data-table__th:is(:hover, :focus-within) &, &:focus-visible, &[data-expanded="true"]) {
147
+ &:not(.aksel-data-table__th:is(:hover, :focus-within) &, &:focus-visible, &[data-expanded="true"]),
148
+ .aksel-data-table__th:has(.aksel-data-table__th-resize-handle:hover:not(:focus)) & {
130
149
  opacity: 0;
131
150
  min-width: 0;
132
151
  max-width: 0;
@@ -143,7 +162,6 @@
143
162
  color: var(--ax-text-neutral-subtle);
144
163
  padding: var(--__axc-data-table-density);
145
164
  padding-inline: 1rem;
146
- overflow: hidden;
147
165
 
148
166
  &:not(:first-child) {
149
167
  border-inline-start: 1px solid var(--ax-border-neutral-subtle);
@@ -153,7 +171,7 @@
153
171
  border-block-end: none;
154
172
  }
155
173
 
156
- .aksel-data-table:not(:has(.aksel-data-table__tfoot)) .aksel-data-table__tr:last-child & {
174
+ .aksel-data-table:not(:has(.aksel-data-table__tfoot)) .aksel-data-table__tr:not(.aksel-data-table__tr--selected):last-child & {
157
175
  border-block-end: none;
158
176
  }
159
177
  }
@@ -157,6 +157,11 @@
157
157
  line-height: var(--ax-font-line-height-large);
158
158
  margin: 0;
159
159
  padding-left: 0.25rem;
160
+
161
+ .aksel-form-field--small & {
162
+ font-size: var(--ax-font-size-medium);
163
+ line-height: var(--ax-font-line-height-medium);
164
+ }
160
165
  }
161
166
 
162
167
  .aksel-combobox__input-wrapper {