@danske/sapphire-css 27.0.1 → 27.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.
@@ -55,6 +55,13 @@
55
55
  font-size: var(--sapphire-avatar-size-font-l);
56
56
  }
57
57
 
58
+ .sapphire-avatar--extra-large {
59
+ height: var(--sapphire-avatar-size-height-xl);
60
+ width: var(--sapphire-avatar-size-height-xl);
61
+ border-radius: var(--sapphire-avatar-size-radius-xl);
62
+ font-size: var(--sapphire-avatar-size-font-xl);
63
+ }
64
+
58
65
  /* Colors and variants */
59
66
  .sapphire-avatar--positive {
60
67
  color: var(--sapphire-avatar-color-content-positive);
@@ -3,6 +3,7 @@ declare const styles: {
3
3
  readonly "sapphire-avatar--extra-small": string;
4
4
  readonly "sapphire-avatar--small": string;
5
5
  readonly "sapphire-avatar--large": string;
6
+ readonly "sapphire-avatar--extra-large": string;
6
7
  readonly "sapphire-avatar--positive": string;
7
8
  readonly "sapphire-avatar--negative": string;
8
9
  readonly "sapphire-avatar--warning": string;
@@ -1,8 +1,43 @@
1
1
  .sapphire-button-group {
2
2
  display: flex;
3
+ flex-direction: row;
4
+ flex-wrap: wrap;
5
+ justify-content: stretch;
3
6
  gap: var(--sapphire-button-group-size-spacing-m);
4
7
  }
5
8
 
9
+ /*
10
+ The initial idea of buttons that stack on top of each other if the container width is too small was to use @container queries.
11
+ There was an attempt to make use of the query based on ".sapphire-button-group" when it was under 320px, but we encountered certain limitations.
12
+ For the query to work, the CSS property `container-type: inline-size;` should be set, but due to how the container query works, the width of the button group would always collapse (read more: https://developer.mozilla.org/en-US/docs/Web/CSS/container-type)
13
+ It was decided that, in order to fulfill the requirements, a new modifier (--stretch) needs to be added.
14
+ This enables, if desired, conditional rendering of button group as stretch, overcoming the limitations of container queries.
15
+ */
16
+ .sapphire-button-group--stretch {
17
+ flex-wrap: wrap-reverse;
18
+ justify-content: normal;
19
+ align-items: normal;
20
+ }
21
+
22
+ /**
23
+ TODO: note - this used to work without !important. Worth checking later if that can be removed.
24
+ Added !important because of Angular implementation, and how the extra attribute selector that's added for emulated style encapsulation increases the default button styles priority.
25
+ */
26
+ .sapphire-button-group--stretch > * {
27
+ min-width: fit-content !important;
28
+ max-width: 100% !important;
29
+ flex-grow: 1 !important;
30
+ }
31
+
32
+ .sapphire-button-group--stretch.sapphire-button-group--vertical {
33
+ flex-direction: column-reverse;
34
+ flex-wrap: nowrap;
35
+ }
36
+
37
+ .sapphire-button-group--stretch.sapphire-button-group--stretch-auto-vertical.sapphire-button-group:has(> *:nth-child(3)) {
38
+ flex-direction: column-reverse;
39
+ }
40
+
6
41
  .sapphire-button-group--large {
7
42
  gap: var(--sapphire-button-group-size-spacing-l);
8
43
  }
@@ -1,11 +1,13 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-button-group": string;
3
+ readonly "sapphire-button-group--stretch": string;
4
+ readonly "sapphire-button-group--vertical": string;
5
+ readonly "sapphire-button-group--stretch-auto-vertical": string;
3
6
  readonly "sapphire-button-group--large": string;
4
7
  readonly "sapphire-button-group--dense": string;
5
8
  readonly "sapphire-button-group--align-center": string;
6
9
  readonly "sapphire-button-group--align-right": string;
7
10
  readonly "sapphire-button-group--align-left": string;
8
- readonly "sapphire-button-group--vertical": string;
9
11
  };
10
12
  export = styles;
11
13
 
@@ -43,6 +43,10 @@
43
43
  animation-name: fade-out;
44
44
  }
45
45
 
46
+ .sapphire-dialog--extra-small {
47
+ width: var(--sapphire-dialog-size-width-xs);
48
+ }
49
+
46
50
  .sapphire-dialog--small {
47
51
  width: var(--sapphire-dialog-size-width-s);
48
52
  }
@@ -3,6 +3,7 @@ declare const styles: {
3
3
  readonly "fade-in": string;
4
4
  readonly "sapphire-dialog--exiting": string;
5
5
  readonly "fade-out": string;
6
+ readonly "sapphire-dialog--extra-small": string;
6
7
  readonly "sapphire-dialog--small": string;
7
8
  readonly "sapphire-dialog--medium": string;
8
9
  readonly "sapphire-dialog--large": string;
@@ -26,6 +26,18 @@
26
26
  );
27
27
  color: var(--sapphire-feedback-message-color-content-icon-error);
28
28
  }
29
+ .sapphire-feedback-message__icon--warning {
30
+ background-color: var(
31
+ --sapphire-feedback-message-color-background-icon-warning
32
+ );
33
+ color: var(--sapphire-feedback-message-color-content-icon-warning);
34
+ }
35
+ .sapphire-feedback-message__icon--informative {
36
+ background-color: var(
37
+ --sapphire-feedback-message-color-background-icon-informative
38
+ );
39
+ color: var(--sapphire-feedback-message-color-content-icon-informative);
40
+ }
29
41
 
30
42
  .sapphire-feedback-message__content {
31
43
  display: flex;
@@ -3,6 +3,8 @@ declare const styles: {
3
3
  readonly "sapphire-feedback-message__icon": string;
4
4
  readonly "sapphire-feedback-message__icon--success": string;
5
5
  readonly "sapphire-feedback-message__icon--error": string;
6
+ readonly "sapphire-feedback-message__icon--warning": string;
7
+ readonly "sapphire-feedback-message__icon--informative": string;
6
8
  readonly "sapphire-feedback-message__content": string;
7
9
  readonly "sapphire-feedback-message__body": string;
8
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danske/sapphire-css",
3
- "version": "27.0.1",
3
+ "version": "27.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,
@@ -68,5 +68,5 @@
68
68
  "dependencies": {
69
69
  "@danske/sapphire-design-tokens": "^37.0.0"
70
70
  },
71
- "gitHead": "ed8a61f0521fe4e7601d6b962e677cd9e151a401"
71
+ "gitHead": "b32c314ce39dda19db3c38304864b4e63c0f9470"
72
72
  }