@danske/sapphire-css 31.1.1 → 31.2.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.
@@ -140,7 +140,9 @@
140
140
 
141
141
  .sapphire-table__headCell.sapphire-table__headCell--sortable.is-hover
142
142
  .sapphire-table__headCell_container,
143
- .sapphire-table__headCell.sapphire-table__headCell--sortable:not(.js-hover):hover
143
+ .sapphire-table__headCell.sapphire-table__headCell--sortable:not(
144
+ .js-hover
145
+ ):hover
144
146
  .sapphire-table__headCell_container {
145
147
  background-color: var(--sapphire-table-color-background-hover);
146
148
  border-radius: var(--sapphire-table-size-radius-hover);
@@ -210,6 +212,10 @@
210
212
  width: var(--sapphire-table-size-width-selection-cell);
211
213
  }
212
214
 
215
+ .sapphire-table__selectionCell:not(:first-child) {
216
+ padding-left: var(--sapphire-table-size-spacing-cell-horizontal-default);
217
+ }
218
+
213
219
  .sapphire-table__cell:first-child {
214
220
  padding-left: var(--sapphire-table-size-spacing-cell-horizontal-end);
215
221
  }
@@ -241,25 +247,63 @@
241
247
  /**
242
248
  * Row divider. Only shown when row is not focused, because of z-index issue with the focus ring.
243
249
  */
244
- .sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible) {
250
+ .sapphire-table__row:not(
251
+ .is-focus,
252
+ :not(.js-focus):focus-visible,
253
+ .sapphire-table__row--expanded
254
+ ) {
255
+ box-shadow: inset 0px -1px 0px 0px var(--sapphire-table-color-border-separator);
256
+ }
257
+
258
+ .sapphire-table__row-expanded-view {
245
259
  box-shadow: inset 0px -1px 0px 0px var(--sapphire-table-color-border-separator);
246
260
  }
247
261
 
262
+ .sapphire-table__row-expand-button {
263
+ display: inline-flex; /* for transform to take effect */
264
+ transition: transform ease-in-out var(--sapphire-table-time-transition-arrow);
265
+ margin-left: var(--sapphire-table-size-spacing-icon-left-default);
266
+ }
267
+
268
+ .sapphire-table td:has(.sapphire-table__row-expand-button) {
269
+ width: 0; /* To prevent the cell from growing more than needed. only needed when td is used for cells */
270
+ }
271
+
272
+ .sapphire-table__row--expanded .sapphire-table__row-expand-button {
273
+ transform: rotate(180deg);
274
+ }
275
+
248
276
  .sapphire-table--without-last-divider
249
- .sapphire-table__row:not(.is-focus, :not(.js-focus):focus-visible):last-child {
277
+ .sapphire-table__row:not(
278
+ .is-focus,
279
+ :not(.js-focus):focus-visible
280
+ ):last-child {
250
281
  box-shadow: none;
251
282
  }
252
283
 
253
- .sapphire-table--interactive .sapphire-table__row {
284
+ .sapphire-table--interactive .sapphire-table__row,
285
+ .sapphire-table__row--interactive {
254
286
  cursor: default; /* by default cursor is text selection, which is unintuitive when rows are clickable */
255
287
  }
256
288
 
257
289
  .sapphire-table--interactive .sapphire-table__row.is-hover,
258
- .sapphire-table--interactive .sapphire-table__row:not(.js-hover):hover {
290
+ .sapphire-table__row--interactive.is-hover,
291
+ .sapphire-table--interactive .sapphire-table__row:not(.js-hover):hover,
292
+ .sapphire-table__row--interactive:not(.js-hover):hover {
259
293
  background-color: var(--sapphire-table-color-background-hover);
260
294
  cursor: pointer;
261
295
  }
262
296
 
297
+ .sapphire-table__row--highlighted {
298
+ background-color: var(--sapphire-table-color-background-hover);
299
+ }
300
+ .sapphire-table__row--highlighted > *:first-child /* setting the highlight style on the first cell,
301
+ since box-shadow is used for separator on rows,
302
+ and to avoid the complications of merging the two shadows */ {
303
+ box-shadow: inset var(--sapphire-table-size-width-highlight) 0px 0px 0px
304
+ var(--sapphire-table-color-background-highlight);
305
+ }
306
+
263
307
  /**
264
308
  * Selection actions. Optionally shown when a table uses multiple selection.
265
309
  */
@@ -27,8 +27,13 @@ declare const styles: {
27
27
  readonly "sapphire-table__headCell_content--ellipsed": string;
28
28
  readonly "sapphire-table__row--active": string;
29
29
  readonly "sapphire-table__row--selected": string;
30
+ readonly "sapphire-table__row--expanded": string;
31
+ readonly "sapphire-table__row-expanded-view": string;
32
+ readonly "sapphire-table__row-expand-button": string;
30
33
  readonly "sapphire-table--without-last-divider": string;
31
34
  readonly "sapphire-table--interactive": string;
35
+ readonly "sapphire-table__row--interactive": string;
36
+ readonly "sapphire-table__row--highlighted": string;
32
37
  readonly "sapphire-table__selection-action-bar": string;
33
38
  readonly "sapphire-table__footer": string;
34
39
  readonly "sapphire-table__footer--sticky": string;
@@ -127,8 +127,12 @@
127
127
  z-index: 1;
128
128
  }
129
129
 
130
- .sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,
131
- .sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover {
130
+ .sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(
131
+ .is-active
132
+ ):not(.js-hover):hover,
133
+ .sapphire-tabs__tab:not(:disabled):not(.is-disabled):not(:active):not(
134
+ .is-active
135
+ ).is-hover {
132
136
  color: var(--sapphire-tabs-color-content-inactive-hover);
133
137
  }
134
138
 
@@ -64,8 +64,12 @@
64
64
  }
65
65
 
66
66
  /* Actionable */
67
- .sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(.is-active):not(.js-hover):hover,
68
- .sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(.is-active).is-hover {
67
+ .sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(
68
+ .is-active
69
+ ):not(.js-hover):hover,
70
+ .sapphire-tag--actionable:not(:disabled):not(.is-disabled):not(:active):not(
71
+ .is-active
72
+ ).is-hover {
69
73
  background-color: var(--sapphire-tag-color-background-primary-hover);
70
74
  cursor: pointer;
71
75
  }
@@ -271,7 +271,9 @@
271
271
  color: var(--sapphire-text-field-color-content-stepper-default);
272
272
  }
273
273
 
274
- .sapphire-text-field__stepper-button:not(:active):not(.is-active):not(.js-hover):hover,
274
+ .sapphire-text-field__stepper-button:not(:active):not(.is-active):not(
275
+ .js-hover
276
+ ):hover,
275
277
  .sapphire-text-field__stepper-button:not(:active):not(.is-active).is-hover {
276
278
  background-color: var(--sapphire-text-field-color-background-stepper-hover);
277
279
  color: var(--sapphire-text-field-color-content-stepper-hover);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "31.1.1",
3
+ "version": "31.2.1",
4
4
  "description": "CSS implementation of the Sapphire Design System from Danske Bank A/S",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  "@babel/preset-react": "^7.18.6",
47
47
  "@babel/preset-typescript": "^7.18.6",
48
48
  "@danske/sapphire-icons": "^2.0.0",
49
- "@danske/sapphire-react": "3.17.0",
49
+ "@danske/sapphire-react": "^3.39.2",
50
50
  "@storybook/addon-essentials": "^6.5.13",
51
51
  "@storybook/addon-links": "^6.5.13",
52
52
  "@storybook/addons": "^6.5.13",
@@ -66,7 +66,7 @@
66
66
  "typescript": "~4.6.4"
67
67
  },
68
68
  "dependencies": {
69
- "@danske/sapphire-design-tokens": "^39.1.0"
69
+ "@danske/sapphire-design-tokens": "^39.2.0"
70
70
  },
71
- "gitHead": "5aa8a7225377aa11bab09590c0a7d631ef87c7e0"
71
+ "gitHead": "a8ebdf9b67baf003c82173820a5244a9755d7f95"
72
72
  }