@danske/sapphire-css 50.2.1 → 51.0.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/components/link/link.module.css +0 -1
- package/components/select/select.module.css +11 -7
- package/components/table/table.module.css +65 -10
- package/components/table/table.module.css.d.ts +5 -2
- package/components/truncate-overflow/truncate-overflow.module.css +7 -0
- package/components/truncate-overflow/truncate-overflow.module.css.d.ts +5 -0
- package/package.json +3 -3
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
border: none;
|
|
30
30
|
background: var(--sapphire-semantic-color-background-field);
|
|
31
31
|
width: 100%;
|
|
32
|
-
outline:
|
|
32
|
+
outline: solid var(--sapphire-semantic-size-border-sm)
|
|
33
|
+
var(--sapphire-semantic-color-border-field-default);
|
|
34
|
+
outline-offset: calc(0px - var(--sapphire-semantic-size-border-sm));
|
|
33
35
|
text-align: left;
|
|
34
36
|
color: inherit;
|
|
35
37
|
font-family: inherit;
|
|
36
|
-
box-shadow: inset 0px 0px 0px var(--sapphire-semantic-size-border-sm)
|
|
37
|
-
var(--sapphire-semantic-color-border-field-default);
|
|
38
38
|
border-radius: var(--sapphire-semantic-size-radius-md);
|
|
39
39
|
gap: var(--sapphire-semantic-size-spacing-sm);
|
|
40
40
|
}
|
|
@@ -127,8 +127,9 @@
|
|
|
127
127
|
* Error
|
|
128
128
|
*/
|
|
129
129
|
.sapphire-select--error:not(.is-disabled) .sapphire-select__button {
|
|
130
|
-
|
|
130
|
+
outline: solid var(--sapphire-semantic-size-border-sm)
|
|
131
131
|
var(--sapphire-semantic-color-border-negative-default);
|
|
132
|
+
outline-offset: calc(0px - var(--sapphire-semantic-size-border-sm));
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
/**
|
|
@@ -142,8 +143,9 @@
|
|
|
142
143
|
.is-disabled
|
|
143
144
|
):not(.js-hover):hover
|
|
144
145
|
.sapphire-select__button {
|
|
145
|
-
|
|
146
|
+
outline: solid var(--sapphire-semantic-size-border-sm)
|
|
146
147
|
var(--sapphire-semantic-color-border-field-hover);
|
|
148
|
+
outline-offset: calc(0px - var(--sapphire-semantic-size-border-sm));
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
.sapphire-select:not(.is-disabled).is-hover .sapphire-select__icon-container,
|
|
@@ -156,13 +158,15 @@
|
|
|
156
158
|
* Focus
|
|
157
159
|
*/
|
|
158
160
|
.sapphire-select:not(.is-disabled).is-focus .sapphire-select__button {
|
|
159
|
-
|
|
161
|
+
outline: solid var(--sapphire-semantic-size-focus-ring)
|
|
160
162
|
var(--sapphire-semantic-color-focus-ring);
|
|
163
|
+
outline-offset: calc(0px - var(--sapphire-semantic-size-focus-ring));
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
.sapphire-select--error:not(.is-disabled).is-focus .sapphire-select__button {
|
|
164
|
-
|
|
167
|
+
outline: solid var(--sapphire-semantic-size-focus-ring)
|
|
165
168
|
var(--sapphire-semantic-color-border-negative-default);
|
|
169
|
+
outline-offset: calc(-1 * var(--sapphire-semantic-size-focus-ring));
|
|
166
170
|
}
|
|
167
171
|
|
|
168
172
|
.sapphire-select.is-disabled .sapphire-select__button {
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
|
|
174
174
|
.sapphire-table__headCell.sapphire-table__headCell--sortable {
|
|
175
175
|
cursor: pointer;
|
|
176
|
+
user-select: none;
|
|
176
177
|
}
|
|
177
178
|
|
|
178
179
|
.sapphire-table__headCell--sortable:not(sapphire-table__headCell--sorted):hover
|
|
@@ -223,6 +224,7 @@
|
|
|
223
224
|
}
|
|
224
225
|
|
|
225
226
|
/* Overflow behaviour */
|
|
227
|
+
/* @deprecated in favor of TruncateOverflow */
|
|
226
228
|
.sapphire-table__cell--ellipsed,
|
|
227
229
|
.sapphire-table__headCell_content--ellipsed,
|
|
228
230
|
.sapphire-table__cell--ellipsed .sapphire-table__cell-contents {
|
|
@@ -261,6 +263,7 @@
|
|
|
261
263
|
padding: var(--sapphire-table-cell-spacing-v)
|
|
262
264
|
var(--sapphire-table-cell-spacing-h);
|
|
263
265
|
box-sizing: content-box;
|
|
266
|
+
text-align: center;
|
|
264
267
|
}
|
|
265
268
|
.sapphire-table__head .sapphire-table__selectionCell {
|
|
266
269
|
padding: var(--sapphire-semantic-size-spacing-2xs)
|
|
@@ -326,7 +329,14 @@ th.sapphire-table__selectionCell:first-child {
|
|
|
326
329
|
);
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
|
|
332
|
+
/* Applied only when the "action" on rows is disabled. If only selection is disabled, only the checkbox should be disabled */
|
|
333
|
+
.sapphire-table__row.is-disabled:not(.sapphire-table__row--selected)
|
|
334
|
+
.sapphire-table__cell {
|
|
335
|
+
opacity: var(--sapphire-semantic-opacity-disabled);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.sapphire-table--interactive .sapphire-table__row--active,
|
|
339
|
+
.sapphire-table__row--interactive.sapphire-table__row--active {
|
|
330
340
|
--sapphire-table-row-bg-active: var(
|
|
331
341
|
--sapphire-semantic-color-background-action-tertiary-active
|
|
332
342
|
);
|
|
@@ -334,7 +344,8 @@ th.sapphire-table__selectionCell:first-child {
|
|
|
334
344
|
}
|
|
335
345
|
|
|
336
346
|
.sapphire-table--interactive
|
|
337
|
-
.sapphire-table__row--selected.sapphire-table__row--active
|
|
347
|
+
.sapphire-table__row--selected.sapphire-table__row--active,
|
|
348
|
+
.sapphire-table__row--interactive.sapphire-table__row--selected.sapphire-table__row--active {
|
|
338
349
|
--sapphire-table-row-bg-active: var(
|
|
339
350
|
/* using hover color for active here is intentional, and to avoid too many color changes when selecting rows */
|
|
340
351
|
--sapphire-semantic-color-background-action-select-secondary-hover
|
|
@@ -363,16 +374,60 @@ th.sapphire-table__selectionCell:first-child {
|
|
|
363
374
|
}
|
|
364
375
|
|
|
365
376
|
.sapphire-table__row-expand-button {
|
|
366
|
-
display: inline-flex;
|
|
367
|
-
|
|
368
|
-
|
|
377
|
+
display: inline-flex;
|
|
378
|
+
height: var(--sapphire-semantic-size-icon-md);
|
|
379
|
+
width: var(--sapphire-semantic-size-icon-md);
|
|
380
|
+
vertical-align: middle;
|
|
381
|
+
justify-content: center;
|
|
382
|
+
align-items: center;
|
|
383
|
+
margin-right: var(--sapphire-semantic-size-spacing-sm);
|
|
384
|
+
}
|
|
385
|
+
/* the following rule is not yet properly supported. When that's widely supported, we can remove the specific rules */
|
|
386
|
+
.sapphire-table__row[aria-level] {
|
|
387
|
+
--sapphire-table-row-level: attr(aria-level, number);
|
|
388
|
+
}
|
|
389
|
+
.sapphire-table__row[aria-level='1'] {
|
|
390
|
+
--sapphire-table-row-level: 1;
|
|
391
|
+
}
|
|
392
|
+
.sapphire-table__row[aria-level='2'] {
|
|
393
|
+
--sapphire-table-row-level: 2;
|
|
394
|
+
}
|
|
395
|
+
.sapphire-table__row[aria-level='3'] {
|
|
396
|
+
--sapphire-table-row-level: 3;
|
|
397
|
+
}
|
|
398
|
+
.sapphire-table__row[aria-level='4'] {
|
|
399
|
+
--sapphire-table-row-level: 4;
|
|
400
|
+
}
|
|
401
|
+
.sapphire-table__row[aria-level='5'] {
|
|
402
|
+
--sapphire-table-row-level: 5;
|
|
369
403
|
}
|
|
370
404
|
|
|
371
|
-
|
|
372
|
-
|
|
405
|
+
/* tree column renders expand/collapse icon and is indented based on row level */
|
|
406
|
+
.sapphire-table__cell--tree {
|
|
407
|
+
/* the unit of indentation for nested rows. */
|
|
408
|
+
/* Important: this should match the width+margin-right of .sapphire-table__row-expand-button for expandable/non-expandable siblings to align. */
|
|
409
|
+
--sapphire-table-indent-unit: calc(
|
|
410
|
+
var(--sapphire-semantic-size-icon-md) +
|
|
411
|
+
var(--sapphire-semantic-size-spacing-sm)
|
|
412
|
+
);
|
|
413
|
+
--sapphire-table-cell-indent-count: calc(var(--sapphire-table-row-level) - 1);
|
|
414
|
+
padding-left: calc(
|
|
415
|
+
var(--sapphire-table-cell-spacing-h) +
|
|
416
|
+
calc(
|
|
417
|
+
var(--sapphire-table-cell-indent-count) *
|
|
418
|
+
var(--sapphire-table-indent-unit)
|
|
419
|
+
)
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
.sapphire-table__cell--tree:not(:has(.sapphire-table__row-expand-button)) {
|
|
423
|
+
--sapphire-table-cell-indent-count: var(--sapphire-table-row-level);
|
|
373
424
|
}
|
|
374
425
|
|
|
375
|
-
.sapphire-table__row
|
|
426
|
+
.sapphire-table__row-expand-button svg {
|
|
427
|
+
transition: transform var(--sapphire-semantic-transitions-dynamic)
|
|
428
|
+
var(--sapphire-semantic-time-motion-quick);
|
|
429
|
+
}
|
|
430
|
+
.sapphire-table__row-expand-button--expanded svg {
|
|
376
431
|
transform: rotate(180deg);
|
|
377
432
|
}
|
|
378
433
|
|
|
@@ -505,12 +560,12 @@ tbody .sapphire-table__row--highlighted > .sapphire-table__cell:first-child {
|
|
|
505
560
|
/* Making sure the button does not change the row height */
|
|
506
561
|
margin-top: calc(-1 * var(--sapphire-semantic-size-spacing-2xs));
|
|
507
562
|
margin-bottom: calc(-1 * var(--sapphire-semantic-size-spacing-2xs));
|
|
508
|
-
|
|
563
|
+
opacity: 0;
|
|
509
564
|
flex-shrink: 0;
|
|
510
565
|
}
|
|
511
566
|
|
|
512
567
|
.sapphire-table__row.is-hover .sapphire-table__edit-button,
|
|
513
568
|
.sapphire-table__row:hover .sapphire-table__edit-button,
|
|
514
569
|
.sapphire-table__row:focus-within .sapphire-table__edit-button {
|
|
515
|
-
|
|
570
|
+
opacity: 1;
|
|
516
571
|
}
|
|
@@ -32,13 +32,16 @@ declare const styles: {
|
|
|
32
32
|
readonly "sapphire-table__table--spacing-lg": string;
|
|
33
33
|
readonly "sapphire-table__table--spacing-xl": string;
|
|
34
34
|
readonly "sapphire-table__tfoot": string;
|
|
35
|
+
readonly "is-disabled": string;
|
|
36
|
+
readonly "sapphire-table__row--selected": string;
|
|
35
37
|
readonly "sapphire-table--interactive": string;
|
|
36
38
|
readonly "sapphire-table__row--active": string;
|
|
37
|
-
readonly "sapphire-table__row--
|
|
39
|
+
readonly "sapphire-table__row--interactive": string;
|
|
38
40
|
readonly "sapphire-table__row--expanded": string;
|
|
39
41
|
readonly "sapphire-table__row-expand-button": string;
|
|
42
|
+
readonly "sapphire-table__cell--tree": string;
|
|
43
|
+
readonly "sapphire-table__row-expand-button--expanded": string;
|
|
40
44
|
readonly "sapphire-table--without-last-divider": string;
|
|
41
|
-
readonly "sapphire-table__row--interactive": string;
|
|
42
45
|
readonly "sapphire-table__row--highlighted": string;
|
|
43
46
|
readonly "sapphire-table__footer": string;
|
|
44
47
|
readonly "sapphire-table__footer--sticky": string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-css",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "51.0.0",
|
|
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,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/preset-react": "^7.18.6",
|
|
48
48
|
"@babel/preset-typescript": "^7.18.6",
|
|
49
49
|
"@danske/sapphire-icons": "^3.1.0",
|
|
50
|
-
"@danske/sapphire-react": "^5.
|
|
50
|
+
"@danske/sapphire-react": "^5.17.2",
|
|
51
51
|
"@mdx-js/react": "^1.6.22",
|
|
52
52
|
"@storybook/addon-essentials": "^6.5.13",
|
|
53
53
|
"@storybook/addon-links": "^6.5.13",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@danske/sapphire-design-tokens": "^42.5.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "4903f9d28140b74e3e42467f790174d7f977f15d"
|
|
74
74
|
}
|