@danske/sapphire-css 39.0.0 → 40.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.
Files changed (78) hide show
  1. package/build/themes/cjs/default-dark.js +1 -0
  2. package/build/themes/cjs/default.js +1 -0
  3. package/build/themes/cjs/index.d.ts +1 -0
  4. package/build/themes/esm/default-dark.js +1 -0
  5. package/build/themes/esm/default.js +1 -0
  6. package/build/themes/esm/index.d.ts +1 -0
  7. package/components/accordion/accordion.module.css +26 -26
  8. package/components/avatar/avatar.module.css +55 -78
  9. package/components/avatar/avatar.module.css.d.ts +16 -21
  10. package/components/backdrop/backdrop.module.css +5 -5
  11. package/components/badge/badge.module.css +76 -324
  12. package/components/badge/badge.module.css.d.ts +16 -34
  13. package/components/button/button.module.css +180 -263
  14. package/components/button/button.module.css.d.ts +4 -8
  15. package/components/buttonGroup/buttonGroup.module.css +39 -13
  16. package/components/calendar/calendar.module.css +64 -125
  17. package/components/calendar/calendar.module.css.d.ts +0 -7
  18. package/components/checkbox/checkbox.module.css +102 -69
  19. package/components/checkbox/checkbox.module.css.d.ts +1 -1
  20. package/components/contextualHelp/contextualHelp.module.css +7 -7
  21. package/components/dateField/dateField.module.css +42 -29
  22. package/components/dateField/dateField.module.css.d.ts +3 -2
  23. package/components/dialog/dialog.module.css +3 -3
  24. package/components/dropzone/dropzone.module.css +19 -21
  25. package/components/feedbackMessage/feedbackMessage.module.css +2 -40
  26. package/components/feedbackMessage/feedbackMessage.module.css.d.ts +0 -6
  27. package/components/field/field.module.css +22 -13
  28. package/components/field/field.module.css.d.ts +2 -2
  29. package/components/fieldGroup/fieldGroup.module.css +3 -3
  30. package/components/filterDropdown/filterDropdown.module.css +1 -1
  31. package/components/flag/flag.module.css +6 -6
  32. package/components/icon/icon.module.css +31 -4
  33. package/components/icon/icon.module.css.d.ts +6 -0
  34. package/components/iconButton/iconButton.module.css +237 -189
  35. package/components/iconButton/iconButton.module.css.d.ts +2 -3
  36. package/components/label/label.module.css +4 -5
  37. package/components/link/link.module.css +24 -54
  38. package/components/link/link.module.css.d.ts +1 -4
  39. package/components/list/list.module.css +20 -33
  40. package/components/listbox/listbox.module.css +109 -131
  41. package/components/listbox/listbox.module.css.d.ts +2 -4
  42. package/components/modalLayout/modalLayout.module.css +11 -12
  43. package/components/notificationBadge/notificationBadge.module.css +18 -15
  44. package/components/pagination/pagination.module.css +9 -9
  45. package/components/panel/panel.module.css +3 -1
  46. package/components/popover/popover.module.css +3 -2
  47. package/components/radio/radio.module.css +32 -9
  48. package/components/searchField/searchField.module.css +24 -25
  49. package/components/segmentedControl/segmentedControl.module.css +15 -17
  50. package/components/select/select.module.css +34 -18
  51. package/components/select/select.module.css.d.ts +2 -0
  52. package/components/skeleton/skeleton.module.css +5 -2
  53. package/components/spinner/spinner.module.css +3 -3
  54. package/components/surface/surface.module.css +2 -2
  55. package/components/switch/switch.module.css +49 -46
  56. package/components/switch/switch.module.css.d.ts +2 -2
  57. package/components/table/table.module.css +165 -136
  58. package/components/table/table.module.css.d.ts +5 -6
  59. package/components/tabs/tabs.module.css +24 -20
  60. package/components/tag/tag.module.css +16 -30
  61. package/components/tag/tag.module.css.d.ts +1 -1
  62. package/components/text/text.module.css +69 -82
  63. package/components/text/text.module.css.d.ts +19 -14
  64. package/components/textField/textField.module.css +45 -35
  65. package/components/textField/textField.module.css.d.ts +2 -2
  66. package/components/toast/toast.module.css +33 -153
  67. package/components/toast/toast.module.css.d.ts +2 -6
  68. package/components/tooltip/tooltip.module.css +7 -6
  69. package/package.json +4 -4
  70. package/themes/default-dark.js +1 -0
  71. package/themes/default.js +1 -0
  72. package/themes/index.d.ts +1 -0
  73. package/components/heading/heading.module.css +0 -95
  74. package/components/heading/heading.module.css.d.ts +0 -12
  75. package/components/labeledValue/labeledValue.module.css +0 -10
  76. package/components/labeledValue/labeledValue.module.css.d.ts +0 -7
  77. package/components/paragraph/paragraph.module.css +0 -32
  78. package/components/paragraph/paragraph.module.css.d.ts +0 -7
@@ -4,39 +4,8 @@
4
4
  align-items: center;
5
5
  justify-content: center;
6
6
  margin: auto;
7
- gap: var(--sapphire-semantic-size-spacing-50);
8
7
  max-width: var(--sapphire-global-size-generic-1000);
9
- }
10
-
11
- .sapphire-feedback-message__icon {
12
- padding: var(--sapphire-semantic-size-spacing-30);
13
- border-radius: 100%; /* big enough value */
14
- line-height: 0; /* to make sure height won't exceed width */
15
- }
16
-
17
- .sapphire-feedback-message__icon--success {
18
- background-color: var(
19
- --sapphire-semantic-color-background-positive-secondary-default
20
- );
21
- color: var(--sapphire-semantic-color-content-positive-secondary-default);
22
- }
23
- .sapphire-feedback-message__icon--error {
24
- background-color: var(
25
- --sapphire-semantic-color-background-negative-secondary-default
26
- );
27
- color: var(--sapphire-semantic-color-content-negative-secondary-default);
28
- }
29
- .sapphire-feedback-message__icon--warning {
30
- background-color: var(
31
- --sapphire-semantic-color-background-warning-secondary-default
32
- );
33
- color: var(--sapphire-semantic-color-content-warning-secondary-default);
34
- }
35
- .sapphire-feedback-message__icon--informative {
36
- background-color: var(
37
- --sapphire-semantic-color-background-informative-secondary-default
38
- );
39
- color: var(--sapphire-semantic-color-content-informative-secondary-default);
8
+ gap: var(--sapphire-semantic-size-spacing-xl);
40
9
  }
41
10
 
42
11
  .sapphire-feedback-message__content {
@@ -44,12 +13,5 @@
44
13
  flex-direction: column;
45
14
  align-items: center;
46
15
  text-align: center;
47
- gap: var(--sapphire-semantic-size-spacing-30);
48
- }
49
-
50
- .sapphire-feedback-message__body {
51
- color: var(--sapphire-semantic-color-content-default-secondary);
52
- font-family: var(--sapphire-semantic-font-name-default);
53
- font-size: var(--sapphire-global-size-font-88);
54
- line-height: var(--sapphire-semantic-size-line-height-md);
16
+ gap: var(--sapphire-semantic-size-spacing-md);
55
17
  }
@@ -1,12 +1,6 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-feedback-message": string;
3
- readonly "sapphire-feedback-message__icon": string;
4
- readonly "sapphire-feedback-message__icon--success": string;
5
- readonly "sapphire-feedback-message__icon--error": string;
6
- readonly "sapphire-feedback-message__icon--warning": string;
7
- readonly "sapphire-feedback-message__icon--informative": string;
8
3
  readonly "sapphire-feedback-message__content": string;
9
- readonly "sapphire-feedback-message__body": string;
10
4
  };
11
5
  export = styles;
12
6
 
@@ -1,12 +1,12 @@
1
1
  .sapphire-field {
2
2
  display: inline-grid;
3
3
  grid-template-columns: auto; /* One column by default */
4
- row-gap: var(--sapphire-semantic-size-spacing-20);
5
- column-gap: var(--sapphire-semantic-size-spacing-40);
4
+ row-gap: var(--sapphire-semantic-size-spacing-2xs);
5
+ column-gap: var(--sapphire-semantic-size-spacing-md);
6
6
  font-family: var(--sapphire-semantic-font-name-default);
7
7
  grid-auto-rows: min-content;
8
8
  /* default width */
9
- width: var(--sapphire-semantic-size-width-control-default);
9
+ width: var(--sapphire-semantic-size-width-field);
10
10
 
11
11
  /* The below is meant to address a font rendering quirk in OSX where the text
12
12
  * looks bolder than intended due to subpixel rendering. This quirk generally
@@ -57,6 +57,12 @@ legend.sapphire-field__label {
57
57
  order: 2;
58
58
  width: 100%;
59
59
  min-width: 0;
60
+ line-height: var(--sapphire-semantic-size-line-height-md);
61
+ font-size: var(--sapphire-semantic-size-font-control-lg);
62
+ }
63
+
64
+ .sapphire-field--md .sapphire-field__control {
65
+ font-size: var(--sapphire-semantic-size-font-control-md);
60
66
  }
61
67
 
62
68
  /**
@@ -96,29 +102,32 @@ legend.sapphire-field__label {
96
102
  */
97
103
  .sapphire-field__note-row {
98
104
  display: flex;
99
- align-items: top;
105
+ align-items: flex-start;
106
+ gap: var(--sapphire-semantic-size-spacing-xs);
100
107
  font-size: var(--sapphire-semantic-size-font-label-md);
101
108
  line-height: var(--sapphire-semantic-size-line-height-md);
102
- color: var(--sapphire-semantic-color-content-default-secondary);
109
+ color: var(--sapphire-semantic-color-foreground-secondary);
103
110
  }
104
111
 
105
112
  .sapphire-field--md .sapphire-field__note-row {
106
113
  font-size: var(--sapphire-semantic-size-font-label-sm);
107
- line-height: var(--sapphire-semantic-size-line-height-sm);
108
114
  }
109
115
 
110
116
  .sapphire-field__note {
111
117
  flex: 1;
112
118
  }
113
119
 
114
- .sapphire-field--error .sapphire-field__note {
115
- color: var(--sapphire-semantic-color-content-negative-secondary-default);
120
+ .sapphire-field__note-icon {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ /** For alignment with text */
124
+ height: calc(1em * var(--sapphire-semantic-size-line-height-md));
116
125
  }
117
126
 
118
127
  /**
119
128
  * Disabled
120
129
  */
121
- .sapphire-field.is-disabled {
130
+ .sapphire-field.is-disabled .sapphire-field__control {
122
131
  opacity: var(--sapphire-semantic-opacity-disabled);
123
132
  cursor: not-allowed;
124
133
  }
@@ -136,7 +145,7 @@ legend.sapphire-field__label {
136
145
  .sapphire-field--label-placement-side:not(.sapphire-field--no-width)
137
146
  .sapphire-field__control {
138
147
  /* default width */
139
- width: var(--sapphire-semantic-size-width-control-default);
148
+ width: var(--sapphire-semantic-size-width-field);
140
149
  }
141
150
  .sapphire-field--label-placement-side .sapphire-field__message {
142
151
  grid-column: 2;
@@ -147,12 +156,12 @@ legend.sapphire-field__label {
147
156
  /* label is center aligned with control by default. But if the control is too long (e.g. textarea)
148
157
  * the label stays at the top (max-height)
149
158
  */
150
- max-height: var(--sapphire-semantic-size-height-input-lg);
159
+ max-height: var(--sapphire-semantic-size-height-control-lg);
151
160
  }
152
161
 
153
162
  .sapphire-field--label-placement-side.sapphire-field--md
154
163
  .sapphire-field__label {
155
- max-height: var(--sapphire-semantic-size-height-input-md);
164
+ max-height: var(--sapphire-semantic-size-height-control-md);
156
165
  }
157
166
 
158
167
  .sapphire-field--label-placement-side.sapphire-field--label-alignment-top
@@ -169,7 +178,7 @@ legend.sapphire-field__label {
169
178
  display: inline-flex;
170
179
  flex-direction: column;
171
180
  width: min-content; /* this is needed to have the labels column shrunk to the largest one */
172
- gap: var(--sapphire-semantic-size-spacing-50);
181
+ gap: var(--sapphire-semantic-size-spacing-lg);
173
182
  }
174
183
 
175
184
  .sapphire-fieldset .sapphire-field--label-placement-side {
@@ -3,13 +3,13 @@ declare const styles: {
3
3
  readonly "sapphire-field--no-width": string;
4
4
  readonly "sapphire-field__label": string;
5
5
  readonly "sapphire-field__control": string;
6
+ readonly "sapphire-field--md": string;
6
7
  readonly "sapphire-field__control--group": string;
7
8
  readonly "sapphire-field--no-shrink": string;
8
9
  readonly "sapphire-field__message": string;
9
10
  readonly "sapphire-field__note-row": string;
10
- readonly "sapphire-field--md": string;
11
11
  readonly "sapphire-field__note": string;
12
- readonly "sapphire-field--error": string;
12
+ readonly "sapphire-field__note-icon": string;
13
13
  readonly "is-disabled": string;
14
14
  readonly "sapphire-field--label-placement-side": string;
15
15
  readonly "sapphire-field--label-alignment-top": string;
@@ -1,8 +1,8 @@
1
1
  .sapphire-field-group {
2
2
  display: flex;
3
3
  flex-wrap: wrap;
4
- column-gap: var(--sapphire-semantic-size-spacing-50);
5
- row-gap: var(--sapphire-semantic-size-spacing-30);
4
+ column-gap: var(--sapphire-semantic-size-spacing-lg);
5
+ row-gap: var(--sapphire-semantic-size-spacing-sm);
6
6
  }
7
7
 
8
8
  .sapphire-field-group--horizontal {
@@ -14,5 +14,5 @@
14
14
  }
15
15
 
16
16
  .sapphire-field-group--md {
17
- row-gap: var(--sapphire-semantic-size-spacing-20);
17
+ row-gap: var(--sapphire-semantic-size-spacing-2xs);
18
18
  }
@@ -13,6 +13,6 @@
13
13
 
14
14
  .sapphire-filter-dropdown__footer {
15
15
  display: flex;
16
- justify-content: space-between;
16
+ justify-content: end;
17
17
  padding: var(--sapphire-semantic-size-spacing-container-horizontal-sm);
18
18
  }
@@ -1,7 +1,7 @@
1
1
  .sapphire-flag {
2
2
  flex-shrink: 0;
3
3
  border: var(--sapphire-semantic-size-border-sm) solid
4
- var(--sapphire-semantic-color-border-separator-default);
4
+ var(--sapphire-semantic-color-border-secondary);
5
5
  }
6
6
 
7
7
  .sapphire-flag.sapphire-flag--xs {
@@ -20,13 +20,13 @@
20
20
  }
21
21
 
22
22
  .sapphire-flag.sapphire-flag--lg {
23
- height: var(--sapphire-global-size-generic-100);
24
- width: var(--sapphire-global-size-generic-100);
23
+ height: var(--sapphire-semantic-size-height-control-md);
24
+ width: var(--sapphire-semantic-size-height-control-md);
25
25
  }
26
26
 
27
27
  .sapphire-flag.sapphire-flag--xl {
28
- height: var(--sapphire-global-size-generic-120);
29
- width: var(--sapphire-global-size-generic-120);
28
+ height: var(--sapphire-semantic-size-height-control-lg);
29
+ width: var(--sapphire-semantic-size-height-control-lg);
30
30
  }
31
31
 
32
32
  .sapphire-flag.sapphire-flag--rounded {
@@ -34,5 +34,5 @@
34
34
  * This is a hack to fix the antialiasing issue when some flag are rendered rounded.
35
35
  */
36
36
  transform: rotate(0.01deg);
37
- border-radius: var(--sapphire-semantic-size-radius-xl);
37
+ border-radius: 50%;
38
38
  }
@@ -2,22 +2,49 @@
2
2
  flex-shrink: 0;
3
3
  }
4
4
 
5
- .sapphire-icon.sapphire-icon--sm {
5
+ /* sizes */
6
+
7
+ .sapphire-icon--sm {
6
8
  height: var(--sapphire-semantic-size-icon-sm);
7
9
  width: var(--sapphire-semantic-size-icon-sm);
8
10
  }
9
11
 
10
- .sapphire-icon.sapphire-icon--md {
12
+ .sapphire-icon--md {
11
13
  height: var(--sapphire-semantic-size-icon-md);
12
14
  width: var(--sapphire-semantic-size-icon-md);
13
15
  }
14
16
 
15
- .sapphire-icon.sapphire-icon--lg {
17
+ .sapphire-icon--lg {
16
18
  height: var(--sapphire-semantic-size-icon-lg);
17
19
  width: var(--sapphire-semantic-size-icon-lg);
18
20
  }
19
21
 
20
- .sapphire-icon.sapphire-icon--xl {
22
+ .sapphire-icon--xl {
21
23
  height: var(--sapphire-semantic-size-icon-xl);
22
24
  width: var(--sapphire-semantic-size-icon-xl);
23
25
  }
26
+
27
+ /* Semantic Colors */
28
+ .sapphire-icon--primary {
29
+ color: var(--sapphire-semantic-color-foreground-primary);
30
+ }
31
+
32
+ .sapphire-icon--secondary {
33
+ color: var(--sapphire-semantic-color-foreground-secondary);
34
+ }
35
+
36
+ .sapphire-icon--informative {
37
+ color: var(--sapphire-semantic-color-foreground-accent);
38
+ }
39
+
40
+ .sapphire-icon--positive {
41
+ color: var(--sapphire-semantic-color-foreground-positive);
42
+ }
43
+
44
+ .sapphire-icon--warning {
45
+ color: var(--sapphire-semantic-color-foreground-warning);
46
+ }
47
+
48
+ .sapphire-icon--negative {
49
+ color: var(--sapphire-semantic-color-foreground-negative);
50
+ }
@@ -4,6 +4,12 @@ declare const styles: {
4
4
  readonly "sapphire-icon--md": string;
5
5
  readonly "sapphire-icon--lg": string;
6
6
  readonly "sapphire-icon--xl": string;
7
+ readonly "sapphire-icon--primary": string;
8
+ readonly "sapphire-icon--secondary": string;
9
+ readonly "sapphire-icon--informative": string;
10
+ readonly "sapphire-icon--positive": string;
11
+ readonly "sapphire-icon--warning": string;
12
+ readonly "sapphire-icon--negative": string;
7
13
  };
8
14
  export = styles;
9
15