@danske/sapphire-css 42.1.0 → 43.1.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,50 @@
1
+ .sapphire-breadcrumbs {
2
+ display: flex;
3
+ align-items: center;
4
+ margin: 0;
5
+ padding: 0;
6
+ }
7
+
8
+ .sapphire-breadcrumbs .sapphire-breadcrumbs__item {
9
+ display: flex;
10
+ align-items: center;
11
+ min-width: 0;
12
+ white-space: nowrap;
13
+ }
14
+
15
+ .sapphire-breadcrumbs__item * {
16
+ max-width: var(--sapphire-global-size-generic-480);
17
+ }
18
+
19
+ .sapphire-breadcrumbs .sapphire-breadcrumbs__item:last-child {
20
+ padding: 0 var(--sapphire-semantic-size-spacing-lg);
21
+ }
22
+
23
+ .sapphire-breadcrumbs.sapphire-breadcrumbs--sm
24
+ .sapphire-breadcrumbs__item:last-child {
25
+ padding: 0
26
+ calc(
27
+ var(--sapphire-semantic-size-spacing-xs) +
28
+ var(--sapphire-semantic-size-spacing-2xs)
29
+ );
30
+ }
31
+
32
+ .sapphire-breadcrumbs.sapphire-breadcrumbs--lg
33
+ .sapphire-breadcrumbs__item:last-child {
34
+ padding: 0
35
+ calc(
36
+ var(--sapphire-semantic-size-spacing-xs) +
37
+ var(--sapphire-semantic-size-spacing-md)
38
+ );
39
+ }
40
+
41
+ /**
42
+ * Breadcrumb separator
43
+ */
44
+ .sapphire-breadcrumbs__separator {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ color: var(--sapphire-semantic-color-foreground-primary);
49
+ padding: 0 var(--sapphire-semantic-size-spacing-xs);
50
+ }
@@ -0,0 +1,9 @@
1
+ declare const styles: {
2
+ readonly "sapphire-breadcrumbs": string;
3
+ readonly "sapphire-breadcrumbs__item": string;
4
+ readonly "sapphire-breadcrumbs--sm": string;
5
+ readonly "sapphire-breadcrumbs--lg": string;
6
+ readonly "sapphire-breadcrumbs__separator": string;
7
+ };
8
+ export = styles;
9
+
@@ -287,7 +287,7 @@
287
287
  cursor: not-allowed;
288
288
  }
289
289
 
290
- .sapphire-checkbox.is-disabled .sapphire-checkbox__box,
291
- .sapphire-checkbox.is-disabled .sapphire-checkbox__label {
290
+ .sapphire-checkbox.is-disabled,
291
+ .sapphire-checkbox:has(:disabled) {
292
292
  opacity: var(--sapphire-semantic-opacity-disabled);
293
293
  }
@@ -107,6 +107,14 @@
107
107
  font-size: var(--sapphire-semantic-size-font-control-md);
108
108
  }
109
109
 
110
+ /**
111
+ * Disabled
112
+ */
113
+ .sapphire-date-field.is-disabled {
114
+ cursor: not-allowed;
115
+ opacity: var(--sapphire-semantic-opacity-disabled);
116
+ }
117
+
110
118
  /**
111
119
  * Editable segments
112
120
  */
@@ -7,8 +7,8 @@ declare const styles: {
7
7
  readonly "sapphire-date-field__input": string;
8
8
  readonly "sapphire-date-field__range-separator": string;
9
9
  readonly "sapphire-date-field--md": string;
10
- readonly "sapphire-date-field__segment": string;
11
10
  readonly "is-disabled": string;
11
+ readonly "sapphire-date-field__segment": string;
12
12
  readonly "is-focus": string;
13
13
  readonly "sapphire-date-field__segment--filled": string;
14
14
  readonly "sapphire-date-field__segment--separator": string;
@@ -19,8 +19,8 @@
19
19
  }
20
20
 
21
21
  .sapphire-dialog {
22
- border-radius: var(--sapphire-semantic-size-radius-lg);
23
- background: var(--sapphire-semantic-color-background-surface);
22
+ border-radius: var(--sapphire-semantic-size-radius-2xl);
23
+ background: var(--sapphire-semantic-color-background-popover);
24
24
  font-family: var(--sapphire-semantic-font-name-default);
25
25
  color: var(--sapphire-semantic-color-foreground-primary);
26
26
  box-sizing: border-box;
@@ -11,10 +11,11 @@
11
11
  height: var(--sapphire-global-size-generic-480);
12
12
  min-height: var(--sapphire-global-size-generic-480);
13
13
  padding: var(--sapphire-semantic-size-spacing-2xl);
14
- border-radius: var(--sapphire-semantic-size-radius-xl);
14
+ border-radius: var(--sapphire-semantic-size-radius-2xl);
15
15
  transition-property: opacity, background-color, color;
16
16
  transition-duration: var(--sapphire-semantic-time-fade-quick);
17
17
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
18
+ overflow: hidden;
18
19
  /* The below is meant to address a font rendering quirk in OSX where the text
19
20
  * looks bolder than intended due to subpixel rendering. This quirk generally
20
21
  * occurs for bold fonts on dark backgrounds but depending on the font, it
@@ -28,7 +29,7 @@
28
29
  */
29
30
  -webkit-font-smoothing: antialiased;
30
31
  -moz-osx-font-smoothing: grayscale;
31
- --mask-data: url('data:image/svg+xml,%3csvg stroke="black" width="100%25" height="100%25" xmlns="http://www.w3.org/2000/svg"%3e%3crect width="100%25" height="100%25" fill="none" rx="12" ry="12" stroke-width="2" stroke-dasharray="6 6.01126518182488" stroke-dashoffset="4" stroke-linecap="butt"/%3e%3c/svg%3e');
32
+ --mask-data: url('data:image/svg+xml,%3csvg stroke="black" width="70%25" height="70%25" xmlns="http://www.w3.org/2000/svg"%3e%3crect width="100%25" height="100%25" fill="none" rx="12" ry="12" stroke-width="2" stroke-dasharray="6 6.01126518182488" stroke-dashoffset="4" stroke-linecap="butt"/%3e%3c/svg%3e');
32
33
  }
33
34
 
34
35
  /* The before is needed because the SVG image cannot take CSS var, so the background of the ::before is set to the correct color instead */
@@ -42,8 +43,8 @@
42
43
  /* Dashed borders cannot be customised, so we use a trick with the SVG image to customise it */
43
44
  mask: var(--mask-data);
44
45
  -webkit-mask: var(--mask-data);
45
- background: var(--sapphire-semantic-color-border-primary);
46
- border-radius: var(--sapphire-semantic-size-radius-xl);
46
+ background: var(--sapphire-semantic-color-border-field-default);
47
+ border-radius: var(--sapphire-semantic-size-radius-2xl);
47
48
  transition-property: opacity, background-color, color;
48
49
  transition-duration: var(--sapphire-semantic-time-fade-quick);
49
50
  transition-timing-function: var(--sapphire-semantic-transitions-fade);
@@ -59,7 +60,7 @@
59
60
  .sapphire-dropzone:not(:disabled):not(.is-disabled):not(:active):not(
60
61
  .is-active
61
62
  ).is-hover {
62
- background: var(--sapphire-semantic-color-background-action-tertiary-hover);
63
+ background: none;
63
64
  }
64
65
 
65
66
  .sapphire-dropzone:not(:disabled):not(.is-disabled).sapphire-dropzone:active,
@@ -69,7 +70,20 @@
69
70
  .sapphire-dropzone:not(:disabled):not(
70
71
  .is-disabled
71
72
  ).sapphire-dropzone.is-active {
72
- background: var(--sapphire-semantic-color-background-action-tertiary-active);
73
+ background: none;
74
+ }
75
+
76
+ .sapphire-dropzone:not(:active):not(.is-disabled):not(
77
+ .is-active
78
+ ).is-hover::before,
79
+ .sapphire-dropzone:not(:active):not(.is-disabled):not(.is-active):not(
80
+ .js-hover
81
+ ):hover::before {
82
+ background: var(--sapphire-semantic-color-background-action-primary-hover);
83
+ }
84
+
85
+ .sapphire-dropzone.is-active::before {
86
+ background: var(--sapphire-semantic-color-background-action-primary-active);
73
87
  }
74
88
 
75
89
  .sapphire-dropzone:focus {
@@ -95,13 +109,11 @@
95
109
  }
96
110
 
97
111
  .sapphire-dropzone--dropping {
98
- background: var(
99
- --sapphire-semantic-color-background-action-select-secondary-default
100
- );
112
+ background: var(--sapphire-semantic-color-background-accent-subtle);
101
113
  }
102
114
 
103
115
  .sapphire-dropzone.sapphire-dropzone--dropping::before {
104
- background: var(--sapphire-semantic-color-border-accent);
116
+ background: var(--sapphire-semantic-color-foreground-on-accent-subtle);
105
117
  }
106
118
 
107
119
  .sapphire-dropzone__content {
@@ -116,10 +128,9 @@
116
128
  margin-bottom: var(--sapphire-semantic-size-spacing-control-vertical-lg);
117
129
  }
118
130
 
119
- .sapphire-dropzone--dropping .sapphire-dropzone__icon {
120
- color: var(
121
- --sapphire-semantic-color-foreground-action-on-select-secondary-default
122
- );
131
+ .sapphire-dropzone--dropping .sapphire-dropzone__icon,
132
+ .sapphire-dropzone--dropping .sapphire-dropzone__content * {
133
+ color: var(--sapphire-semantic-color-foreground-on-accent-subtle);
123
134
  }
124
135
 
125
136
  .sapphire-dropzone__heading {
@@ -14,9 +14,12 @@
14
14
  .sapphire-modal-layout__header {
15
15
  display: flex;
16
16
  justify-content: space-between;
17
- padding: var(--sapphire-semantic-size-spacing-lg)
18
- var(--sapphire-semantic-size-spacing-container-horizontal-md);
17
+ padding: var(--sapphire-semantic-size-spacing-xl)
18
+ var(--sapphire-semantic-size-spacing-xl)
19
+ var(--sapphire-semantic-size-spacing-xl)
20
+ var(--sapphire-semantic-size-spacing-2xl);
19
21
  gap: var(--sapphire-semantic-size-spacing-sm);
22
+ min-height: var(--sapphire-semantic-size-height-control-md);
20
23
  }
21
24
 
22
25
  .sapphire-modal-layout__body {
@@ -41,10 +44,11 @@
41
44
  var(--sapphire-semantic-size-spacing-container-horizontal-md);
42
45
  }
43
46
 
44
- /** Container for heading and subheading **/
47
+ /**
48
+ * Container for heading and subheading
49
+ **/
45
50
  .sapphire-modal-layout__heading-container {
46
51
  flex: 1;
47
- padding: var(--sapphire-semantic-size-spacing-3xs) 0;
48
52
  display: flex;
49
53
  flex-direction: column;
50
54
  justify-content: center;
@@ -9,7 +9,7 @@
9
9
  var(--sapphire-semantic-transitions-standard);
10
10
  transform: translateX(100%);
11
11
  width: var(--sapphire-semantic-size-width-panel-lg);
12
- background: var(--sapphire-semantic-color-background-surface);
12
+ background: var(--sapphire-semantic-color-background-popover);
13
13
  }
14
14
 
15
15
  .sapphire-panel--visible {
@@ -159,11 +159,7 @@
159
159
  cursor: not-allowed;
160
160
  }
161
161
 
162
- .sapphire-radio:not(.sapphire-radio--no-disabled)
163
- .sapphire-radio__input:disabled
164
- ~ .sapphire-radio__box,
165
- .sapphire-radio:not(.sapphire-radio--no-disabled)
166
- .sapphire-radio__input:disabled
167
- ~ .sapphire-radio__label {
162
+ .sapphire-radio .sapphire-radio__input:disabled ~ .sapphire-radio__box,
163
+ .sapphire-radio .sapphire-radio__input:disabled ~ .sapphire-radio__label {
168
164
  opacity: var(--sapphire-semantic-opacity-disabled);
169
165
  }
@@ -10,7 +10,6 @@ declare const styles: {
10
10
  readonly "js-hover": string;
11
11
  readonly "is-focus": string;
12
12
  readonly "js-focus": string;
13
- readonly "sapphire-radio--no-disabled": string;
14
13
  };
15
14
  export = styles;
16
15
 
@@ -160,4 +160,5 @@
160
160
 
161
161
  .sapphire-select.is-disabled .sapphire-select__button {
162
162
  cursor: not-allowed;
163
+ opacity: var(--sapphire-semantic-opacity-disabled);
163
164
  }
@@ -420,15 +420,28 @@ th.sapphire-table__selectionCell:first-child {
420
420
  --sapphire-semantic-color-background-action-highlight
421
421
  );
422
422
  }
423
- .sapphire-table__row--highlighted::after {
423
+
424
+ /* TODO remove tbody in v6 */
425
+ .sapphire-table :has(> .sapphire-table__row--highlighted):not(tbody)::before {
424
426
  content: '';
425
- position: absolute;
426
- z-index: 2;
427
- left: 0;
427
+ position: sticky;
428
+ float: inline-start;
428
429
  height: 100%;
429
430
  width: var(--sapphire-semantic-size-border-md);
431
+ /* counter the shift for the checkbox */
432
+ margin-left: calc(-1 * var(--sapphire-semantic-size-border-md));
433
+ inset-inline-start: 0;
430
434
  background: var(--sapphire-semantic-color-border-accent);
431
435
  pointer-events: none;
436
+ z-index: 2;
437
+ }
438
+
439
+ /* TODO remove in v6 */
440
+ /* Targets non-virtualised tables */
441
+ tbody .sapphire-table__row--highlighted .sapphire-table__selectionCell,
442
+ tbody .sapphire-table__row--highlighted > .sapphire-table__cell:first-child {
443
+ box-shadow: inset var(--sapphire-semantic-size-border-md) 0 0 0
444
+ var(--sapphire-semantic-color-border-accent);
432
445
  }
433
446
 
434
447
  .sapphire-table__tfoot {
@@ -463,7 +476,6 @@ th.sapphire-table__selectionCell:first-child {
463
476
  .sapphire-table__footer {
464
477
  position: relative;
465
478
  z-index: 2; /* Setting to two because body rows are positioned relative */
466
- margin-top: var(--sapphire-semantic-size-spacing-2xs);
467
479
  }
468
480
 
469
481
  .sapphire-table__footer--sticky {
@@ -194,6 +194,14 @@
194
194
  var(--sapphire-semantic-color-border-negative-default);
195
195
  }
196
196
 
197
+ /**
198
+ * Disabled
199
+ */
200
+ .sapphire-text-field:has([disabled]) {
201
+ cursor: not-allowed;
202
+ opacity: var(--sapphire-semantic-opacity-disabled);
203
+ }
204
+
197
205
  /**
198
206
  * Hover
199
207
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "42.1.0",
3
+ "version": "43.1.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,
@@ -67,7 +67,7 @@
67
67
  "typescript": "~4.6.4"
68
68
  },
69
69
  "dependencies": {
70
- "@danske/sapphire-design-tokens": "^42.2.0"
70
+ "@danske/sapphire-design-tokens": "^42.2.1"
71
71
  },
72
- "gitHead": "1eefb683b16687ab3fc99c15fffb03a3eca522c5"
72
+ "gitHead": "fcf8d5c8a3962dcc624ffd02cc607673cb91bd96"
73
73
  }