@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
@@ -16,14 +16,13 @@
16
16
  display: inline;
17
17
 
18
18
  font-family: var(--sapphire-semantic-font-name-default);
19
- font-size: var(--sapphire-semantic-size-font-text-lg);
20
- line-height: var(--sapphire-semantic-size-line-height-md);
21
19
  cursor: pointer;
22
20
  border-radius: var(--sapphire-semantic-size-radius-xs);
23
21
 
24
22
  text-decoration-skip-ink: none;
25
23
 
26
24
  outline: none;
25
+ color: var(--sapphire-semantic-color-foreground-action-link-default);
27
26
  }
28
27
 
29
28
  /* Disabled state for all variants */
@@ -35,64 +34,35 @@
35
34
  /**
36
35
  * Skin rules
37
36
  */
38
- /* primary */
39
- .sapphire-link--primary {
40
- color: var(--sapphire-semantic-color-content-link-primary-default);
41
- }
42
- .sapphire-link--primary:not(:disabled):not(.is-disabled):not(:active):not(
43
- .is-active
44
- ):not(.js-hover):hover,
45
- .sapphire-link--primary:not(:disabled):not(.is-disabled):not(:active):not(
46
- .is-active
47
- ).is-hover {
48
- color: var(--sapphire-semantic-color-content-link-primary-hover);
37
+ .sapphire-link:not(.sapphire-link--secondary):not(:disabled):not(
38
+ .is-disabled
39
+ ):not(:active):not(.is-active):not(.js-hover):hover,
40
+ .sapphire-link:not(.sapphire-link--secondary):not(:disabled):not(
41
+ .is-disabled
42
+ ):not(:active):not(.is-active).is-hover {
43
+ color: var(--sapphire-semantic-color-foreground-action-link-hover);
49
44
  }
50
- .sapphire-link--primary.is-focus,
51
- .sapphire-link--primary:not(.js-focus):focus-visible {
52
- color: var(--sapphire-semantic-color-content-link-primary-default);
45
+ .sapphire-link.is-focus,
46
+ .sapphire-link:not(.js-focus):focus-visible {
53
47
  text-decoration-style: double;
54
48
  }
55
- .sapphire-link--primary:not(:disabled):not(.is-disabled).is-active,
56
- .sapphire-link--primary:not(:disabled):not(.is-disabled):active,
57
- .sapphire-link--primary:not(:disabled):not(.is-disabled):focus-visible:active {
58
- color: var(--sapphire-semantic-color-content-link-primary-active);
49
+ .sapphire-link:not(.sapphire-link--secondary).is-focus,
50
+ .sapphire-link:not(.sapphire-link--secondary):not(.js-focus):focus-visible {
51
+ color: var(--sapphire-semantic-color-foreground-action-link-default);
59
52
  }
60
-
61
- /* secondary */
62
- .sapphire-link--secondary {
63
- color: var(--sapphire-semantic-color-content-link-secondary-default);
64
- }
65
-
66
- .sapphire-link--secondary:not(:disabled):not(.is-disabled):not(:active):not(
67
- .is-active
68
- ):not(.js-hover):hover,
69
- .sapphire-link--secondary:not(:disabled):not(.is-disabled):not(:active):not(
70
- .is-active
71
- ).is-hover {
72
- color: var(--sapphire-semantic-color-content-link-secondary-hover);
73
- }
74
-
75
- .sapphire-link--secondary.is-focus,
76
- .sapphire-link--secondary:not(.js-focus):focus-visible {
77
- color: var(--sapphire-semantic-color-content-link-secondary-default);
78
- text-decoration-style: double;
79
- }
80
-
81
- .sapphire-link--secondary:not(:disabled):not(.is-disabled).is-active,
82
- .sapphire-link--secondary:not(:disabled):not(.is-disabled):active,
83
- .sapphire-link--secondary:not(:disabled):not(
53
+ .sapphire-link:not(.sapphire-link--secondary):not(:disabled):not(
54
+ .is-disabled
55
+ ).is-active,
56
+ .sapphire-link:not(.sapphire-link--secondary):not(:disabled):not(
57
+ .is-disabled
58
+ ):active,
59
+ .sapphire-link:not(.sapphire-link--secondary):not(:disabled):not(
84
60
  .is-disabled
85
61
  ):focus-visible:active {
86
- color: var(--sapphire-semantic-color-content-link-secondary-active);
87
- }
88
-
89
- /**
90
- * Size variations
91
- */
92
- .sapphire-link--md {
93
- font-size: var(--sapphire-semantic-size-font-text-md);
62
+ color: var(--sapphire-semantic-color-foreground-action-link-active);
94
63
  }
95
64
 
96
- .sapphire-link--sm {
97
- font-size: var(--sapphire-semantic-size-font-text-sm);
65
+ /* secondary */
66
+ .sapphire-link--secondary {
67
+ color: var(--sapphire-semantic-color-foreground-primary);
98
68
  }
@@ -1,15 +1,12 @@
1
1
  declare const styles: {
2
2
  readonly "sapphire-link": string;
3
3
  readonly "is-disabled": string;
4
- readonly "sapphire-link--primary": string;
4
+ readonly "sapphire-link--secondary": string;
5
5
  readonly "is-active": string;
6
6
  readonly "js-hover": string;
7
7
  readonly "is-hover": string;
8
8
  readonly "is-focus": string;
9
9
  readonly "js-focus": string;
10
- readonly "sapphire-link--secondary": string;
11
- readonly "sapphire-link--md": string;
12
- readonly "sapphire-link--sm": string;
13
10
  };
14
11
  export = styles;
15
12
 
@@ -26,11 +26,9 @@
26
26
  position: relative;
27
27
  display: flex;
28
28
  justify-content: space-between;
29
- padding: var(--sapphire-semantic-size-spacing-30)
30
- var(--sapphire-semantic-size-spacing-data-collection-item-horizontal-lg);
31
- background-color: var(
32
- --sapphire-semantic-color-background-action-tertiary-ghost-default
33
- );
29
+ padding: var(--sapphire-semantic-size-spacing-sm)
30
+ var(--sapphire-semantic-size-spacing-md);
31
+ background: var(--sapphire-semantic-color-background-action-tertiary-default);
34
32
  outline: none;
35
33
  font-family: var(--sapphire-semantic-font-name-default);
36
34
  }
@@ -74,12 +72,12 @@ instead of being applied on the list item itself */
74
72
  * Same as outermost element (li) as this should control padding instead
75
73
  * if element is a (href prop has value) or button (action prop has value).
76
74
  */
77
- padding: var(--sapphire-semantic-size-spacing-30)
78
- var(--sapphire-semantic-size-spacing-data-collection-item-horizontal-lg);
75
+ padding: var(--sapphire-semantic-size-spacing-sm)
76
+ var(--sapphire-semantic-size-spacing-md);
79
77
 
80
78
  /* Counterstyling anything passed as custom content wrapper */
81
79
  text-decoration: none;
82
- background-color: inherit;
80
+ background: inherit;
83
81
  color: inherit;
84
82
  font-family: inherit;
85
83
  font-size: inherit;
@@ -90,17 +88,8 @@ instead of being applied on the list item itself */
90
88
  }
91
89
 
92
90
  .sapphire-list--negative-margin-self {
93
- margin-left: calc(
94
- var(--sapphire-semantic-size-spacing-data-collection-item-horizontal-lg) *
95
- -1
96
- );
97
- width: calc(
98
- 100% +
99
- (
100
- var(--sapphire-semantic-size-spacing-data-collection-item-horizontal-lg) *
101
- 2
102
- )
103
- );
91
+ margin-left: calc(var(--sapphire-semantic-size-spacing-md) * -1);
92
+ width: calc(100% + (var(--sapphire-semantic-size-spacing-md) * 2));
104
93
  }
105
94
 
106
95
  .sapphire-list__item--interactive:disabled,
@@ -122,7 +111,7 @@ instead of being applied on the list item itself */
122
111
  */
123
112
  .sapphire-list__item--interactive:not(.is-focus, :not(.js-focus):focus),
124
113
  .sapphire-list__item:not(:has(.sapphire-list__item--interactive)) {
125
- box-shadow: inset 0px -1px 0px 0px var(--sapphire-semantic-color-border-separator-default);
114
+ box-shadow: inset 0px -1px 0px 0px var(--sapphire-semantic-color-border-secondary);
126
115
  }
127
116
  /* For not virtualized list */
128
117
  .sapphire-list--without-last-divider:not(:has([role="presentation"] > [role="presentation"]))
@@ -170,9 +159,7 @@ instead of being applied on the list item itself */
170
159
  .sapphire-list__item--interactive:not(.js-hover):not(
171
160
  [aria-disabled='true']
172
161
  ):not(:disabled):not(:active):hover {
173
- background-color: var(
174
- --sapphire-semantic-color-background-action-secondary-default
175
- );
162
+ background: var(--sapphire-semantic-color-background-action-tertiary-hover);
176
163
  }
177
164
 
178
165
  /*
@@ -209,19 +196,19 @@ instead of being applied on the list item itself */
209
196
  .sapphire-list__item-content-left {
210
197
  display: flex;
211
198
  align-items: center;
212
- margin-right: var(--sapphire-semantic-size-spacing-30);
199
+ margin-right: var(--sapphire-semantic-size-spacing-sm);
213
200
  /* This was added to accommodate nowrap + hidden text overflow situations */
214
201
  min-width: 0;
215
- gap: var(--sapphire-semantic-size-spacing-30);
202
+ gap: var(--sapphire-semantic-size-spacing-sm);
216
203
  }
217
204
 
218
205
  .sapphire-list__item-content-right {
219
206
  display: flex;
220
207
  align-items: center;
221
208
  text-align: right;
222
- margin-left: var(--sapphire-semantic-size-spacing-30);
223
- color: var(--sapphire-semantic-color-content-default-primary);
224
- gap: var(--sapphire-semantic-size-spacing-30);
209
+ margin-left: var(--sapphire-semantic-size-spacing-sm);
210
+ color: var(--sapphire-semantic-color-foreground-primary);
211
+ gap: var(--sapphire-semantic-size-spacing-sm);
225
212
  }
226
213
 
227
214
  .sapphire-list__item-text {
@@ -238,14 +225,14 @@ instead of being applied on the list item itself */
238
225
  }
239
226
 
240
227
  .sapphire-list__item-text-primary {
241
- color: var(--sapphire-semantic-color-content-default-primary);
228
+ color: var(--sapphire-semantic-color-foreground-primary);
242
229
  line-height: var(--sapphire-semantic-size-line-height-md);
243
- font-size: var(--sapphire-semantic-size-font-text-lg);
244
- font-weight: var(--sapphire-semantic-font-weight-default-semibold);
230
+ font-size: var(--sapphire-semantic-size-font-body-md);
231
+ font-weight: var(--sapphire-semantic-font-weight-default-medium);
245
232
  }
246
233
 
247
234
  .sapphire-list__item-text-secondary {
248
- color: var(--sapphire-semantic-color-content-default-secondary);
235
+ color: var(--sapphire-semantic-color-foreground-secondary);
249
236
  line-height: var(--sapphire-semantic-size-line-height-md);
250
- font-size: var(--sapphire-semantic-size-font-text-md);
237
+ font-size: var(--sapphire-semantic-size-font-body-sm);
251
238
  }
@@ -5,6 +5,15 @@
5
5
  list-style: none;
6
6
  outline: none;
7
7
  font-family: var(--sapphire-semantic-font-name-default);
8
+ /**
9
+ * spacing between container and list items
10
+ */
11
+ --sapphire-listbox-spacing-outer: var(--sapphire-semantic-size-spacing-3xs);
12
+
13
+ /**
14
+ * gap between list items
15
+ */
16
+ --sapphire-listbox-items-gap: var(--sapphire-semantic-size-spacing-4xs);
8
17
 
9
18
  /**
10
19
  * tldr; Please inspect the listbox without these adding props, it's easier
@@ -24,8 +33,7 @@
24
33
  */
25
34
 
26
35
  padding: calc(
27
- var(--sapphire-semantic-size-spacing-10) -
28
- var(--sapphire-semantic-size-spacing-5)
36
+ var(--sapphire-listbox-spacing-outer) - var(--sapphire-listbox-items-gap)
29
37
  )
30
38
  0;
31
39
 
@@ -50,9 +58,9 @@
50
58
  display: flex;
51
59
  justify-content: space-between;
52
60
  align-items: center;
53
- padding: var(--sapphire-semantic-size-spacing-5)
54
- var(--sapphire-semantic-size-spacing-10);
55
- color: var(--sapphire-semantic-color-content-selection-unselected-default);
61
+ padding: var(--sapphire-listbox-items-gap)
62
+ var(--sapphire-listbox-spacing-outer);
63
+ color: var(--sapphire-semantic-color-foreground-action-on-tertiary-default);
56
64
  outline: none;
57
65
  cursor: pointer;
58
66
  text-decoration: none;
@@ -66,17 +74,10 @@
66
74
  min-width: max-content;
67
75
  }
68
76
 
69
- .sapphire-listbox__item--danger {
70
- color: var(--sapphire-semantic-color-content-action-danger-default);
71
- }
72
-
73
- .sapphire-listbox__item--selected {
74
- color: var(--sapphire-semantic-color-content-selection-selected-default);
75
- }
76
-
77
- .sapphire-listbox__item--selected .sapphire-listbox__content {
78
- background-color: var(
79
- --sapphire-semantic-color-background-selection-selected-default
77
+ .sapphire-listbox__item--danger,
78
+ .sapphire-listbox__item--danger .sapphire-listbox__secondary-text {
79
+ color: var(
80
+ --sapphire-semantic-color-foreground-action-on-danger-tertiary-default
80
81
  );
81
82
  }
82
83
 
@@ -88,58 +89,65 @@
88
89
  * max-width set to mitigate the issue of not being able to set a max-width on the popover the
89
90
  * listbox is rendered in, in use cases like Select.
90
91
  */
91
- max-width: calc(100vw - 2 * var(--sapphire-semantic-size-icon-lg));
92
+ max-width: calc(100vw - 2 * var(--sapphire-semantic-size-icon-sm));
92
93
  display: grid;
93
94
  grid-auto-flow: column;
94
95
  align-items: center;
95
- gap: var(--sapphire-semantic-size-spacing-30);
96
+ gap: var(--sapphire-semantic-size-spacing-xs);
96
97
  /*
97
- * We want the left-side icon column to not take space if it's empty. The
98
- * right-side "checkmark" icon column should always take space even if the
99
- * checkmark isn't there. This is to make sure the listbox doesn't jump when
100
- * selecting items that add the checkmark in the last column.
98
+ * We want the left-side icon column to not take space if it's empty in the default case.
99
+ * The right-side "checkmark" icon column should always take space even if
100
+ * the checkmark isn't there. This is to make sure the listbox doesn't jump
101
+ * when selecting items that add the checkmark in the last column
101
102
  */
102
- grid-template-columns: auto 1fr var(--sapphire-semantic-size-icon-lg);
103
+ grid-template-columns: [left-icon] auto [text-content] 1fr [right-icon] auto;
103
104
  padding: calc(
104
- var(--sapphire-semantic-size-spacing-30) -
105
- var(--sapphire-semantic-size-spacing-5)
105
+ var(--sapphire-semantic-size-spacing-sm) -
106
+ var(--sapphire-semantic-size-spacing-4xs)
106
107
  )
107
- var(--sapphire-semantic-size-spacing-30);
108
+ var(--sapphire-semantic-size-spacing-sm);
108
109
  border-radius: var(--sapphire-semantic-size-radius-sm);
109
110
  transition-property: opacity, background-color, color;
110
111
  transition-duration: var(--sapphire-semantic-time-fade-quick);
111
- transition-timing-function: ease-in-out;
112
-
113
- min-height: var(--sapphire-semantic-size-height-control-xs);
114
- }
115
-
116
- .sapphire-listbox--md .sapphire-listbox__content {
117
- gap: var(--sapphire-semantic-size-spacing-25);
118
- grid-template-columns: auto 1fr var(--sapphire-semantic-size-icon-md);
119
- padding: calc(
120
- var(--sapphire-semantic-size-spacing-20) -
121
- var(--sapphire-semantic-size-spacing-5)
122
- )
123
- var(--sapphire-semantic-size-spacing-25);
112
+ transition-timing-function: var(--sapphire-semantic-transitions-fade);
124
113
  }
125
114
 
126
- .sapphire-listbox--sm .sapphire-listbox__content {
127
- gap: var(--sapphire-semantic-size-spacing-20);
128
- grid-template-columns: auto 1fr var(--sapphire-semantic-size-icon-sm);
129
- padding: calc(
130
- var(--sapphire-semantic-size-spacing-10) -
131
- var(--sapphire-semantic-size-spacing-5)
132
- )
133
- var(--sapphire-semantic-size-spacing-20);
115
+ .sapphire-listbox--selection .sapphire-listbox__content {
116
+ /*
117
+ * In this case, the right-side "checkmark" icon column should always take
118
+ * space even if the checkmark isn't there. This is to make sure the listbox
119
+ * doesn't jump when selecting items that add the checkmark in the last
120
+ * column
121
+ */
122
+ grid-template-columns: [left-icon] var(--sapphire-semantic-size-icon-sm) [text-content] 1fr [right-icon] auto;
134
123
  }
135
124
 
136
125
  /* Icon content */
137
126
  .sapphire-listbox__icon {
138
127
  line-height: 0;
128
+ align-self: start;
129
+ /* to align with the centered text even when the item has a description */
130
+ padding-top: calc(
131
+ (
132
+ (
133
+ var(--sapphire-semantic-size-font-body-sm) *
134
+ var(--sapphire-semantic-size-line-height-md)
135
+ ) - var(--sapphire-semantic-size-icon-sm)
136
+ ) / 2
137
+ );
138
+ }
139
+
140
+ .sapphire-listbox__icon:last-child {
141
+ grid-column: right-icon / span 1;
142
+ }
143
+
144
+ .sapphire-listbox__icon:first-child {
145
+ grid-column: left-icon / span 1;
139
146
  }
140
147
 
141
148
  /* Text content */
142
149
  .sapphire-listbox__text-container {
150
+ grid-column: text-content / span 1;
143
151
  line-height: var(--sapphire-semantic-size-line-height-md);
144
152
  }
145
153
 
@@ -147,40 +155,20 @@
147
155
  * When there is no icon before the content we want the content
148
156
  * to stretch 2 columns out of the 3.
149
157
  */
150
- .sapphire-listbox__text-container:first-child {
158
+ .sapphire-listbox:not(.sapphire-listbox--selection)
159
+ .sapphire-listbox__text-container:first-child {
151
160
  grid-column: span 2;
152
161
  }
153
162
 
154
163
  .sapphire-listbox__primary-text {
155
- font-weight: var(--sapphire-semantic-font-weight-default-semibold);
156
- font-size: var(--sapphire-semantic-size-font-text-lg);
164
+ font-weight: var(--sapphire-semantic-font-weight-default-regular);
165
+ font-size: var(--sapphire-semantic-size-font-body-sm);
157
166
  }
158
167
 
159
168
  .sapphire-listbox__secondary-text {
160
169
  font-weight: var(--sapphire-semantic-font-weight-default-regular);
161
- font-size: var(--sapphire-semantic-size-font-text-md);
162
- }
163
-
164
- .sapphire-listbox--md .sapphire-listbox__primary-text {
165
- font-size: var(--sapphire-semantic-size-font-text-md);
166
- }
167
- .sapphire-listbox--sm .sapphire-listbox__primary-text {
168
- font-size: var(--sapphire-semantic-size-font-text-sm);
169
- }
170
-
171
- .sapphire-listbox--md .sapphire-listbox__secondary-text {
172
- font-size: var(--sapphire-semantic-size-font-text-sm);
173
- }
174
-
175
- .sapphire-listbox--sm .sapphire-listbox__secondary-text {
176
- font-size: var(--sapphire-semantic-size-font-text-sm);
177
- }
178
-
179
- .sapphire-listbox__item:not(.sapphire-listbox__item--danger):not(
180
- .sapphire-listbox__item--selected
181
- )
182
- .sapphire-listbox__secondary-text {
183
- color: var(--sapphire-semantic-color-content-default-secondary);
170
+ font-size: var(--sapphire-semantic-size-font-body-xs);
171
+ color: var(--sapphire-semantic-color-foreground-secondary);
184
172
  }
185
173
 
186
174
  .sapphire-listbox__item.is-disabled {
@@ -194,42 +182,32 @@
194
182
  }
195
183
 
196
184
  .sapphire-listbox__section-header {
197
- font-size: var(--sapphire-semantic-size-font-text-md);
198
- color: var(--sapphire-semantic-color-content-default-secondary);
199
- padding: var(--sapphire-semantic-size-spacing-30)
200
- var(--sapphire-semantic-size-spacing-40)
201
- var(--sapphire-semantic-size-spacing-20)
202
- var(--sapphire-semantic-size-spacing-40);
203
- }
204
-
205
- .sapphire-listbox--md .sapphire-listbox__section-header {
206
- font-size: var(--sapphire-semantic-size-font-text-sm);
207
- padding: var(--sapphire-semantic-size-spacing-25)
208
- var(--sapphire-global-size-generic-35)
209
- var(--sapphire-global-size-generic-15)
210
- var(--sapphire-global-size-generic-35);
211
- }
212
-
213
- .sapphire-listbox--sm .sapphire-listbox__section-header {
214
- font-size: var(--sapphire-semantic-size-font-text-sm);
215
- padding: var(--sapphire-semantic-size-spacing-20)
216
- var(--sapphire-semantic-size-spacing-30)
217
- var(--sapphire-semantic-size-spacing-10)
218
- var(--sapphire-semantic-size-spacing-30);
185
+ font-size: var(--sapphire-semantic-size-font-body-xs);
186
+ color: var(--sapphire-semantic-color-foreground-primary);
187
+ font-weight: var(--sapphire-semantic-font-weight-default-medium);
188
+ padding: calc(
189
+ var(--sapphire-semantic-size-spacing-md) -
190
+ var(--sapphire-listbox-items-gap)
191
+ )
192
+ calc(
193
+ var(--sapphire-semantic-size-spacing-sm) +
194
+ var(--sapphire-listbox-spacing-outer)
195
+ )
196
+ var(--sapphire-semantic-size-spacing-3xs)
197
+ calc(
198
+ var(--sapphire-semantic-size-spacing-sm) +
199
+ var(--sapphire-listbox-spacing-outer)
200
+ );
219
201
  }
220
202
 
221
203
  .sapphire-listbox__separator {
222
204
  height: var(--sapphire-semantic-size-border-sm);
223
- width: 100%;
224
- background: var(--sapphire-semantic-color-border-separator-default);
225
- margin-top: calc(
226
- var(--sapphire-semantic-size-spacing-10) -
227
- var(--sapphire-semantic-size-spacing-5)
228
- );
229
- margin-bottom: calc(
230
- var(--sapphire-semantic-size-spacing-10) -
231
- var(--sapphire-semantic-size-spacing-5)
232
- );
205
+ background: var(--sapphire-semantic-color-border-secondary);
206
+ margin: var(--sapphire-listbox-items-gap)
207
+ calc(
208
+ var(--sapphire-semantic-size-spacing-sm) +
209
+ var(--sapphire-listbox-spacing-outer)
210
+ );
233
211
  }
234
212
 
235
213
  /* Focus */
@@ -247,10 +225,8 @@
247
225
  .sapphire-listbox__content,
248
226
  .sapphire-listbox__item:not(.is-disabled):not(.js-hover):not(.is-active):hover
249
227
  .sapphire-listbox__content {
250
- color: var(--sapphire-semantic-color-content-selection-unselected-hover);
251
- background-color: var(
252
- --sapphire-semantic-color-background-selection-unselected-hover
253
- );
228
+ color: var(--sapphire-semantic-color-foreground-action-on-tertiary-hover);
229
+ background: var(--sapphire-semantic-color-background-action-tertiary-hover);
254
230
  }
255
231
 
256
232
  .sapphire-listbox__item--danger:not(.is-disabled):not(.is-active).is-hover
@@ -259,45 +235,47 @@
259
235
  .is-active
260
236
  ):hover
261
237
  .sapphire-listbox__content {
262
- color: var(--sapphire-semantic-color-content-action-danger-default);
263
- background-color: var(
264
- --sapphire-semantic-color-background-action-danger-default
238
+ background: var(
239
+ --sapphire-semantic-color-background-action-danger-tertiary-hover
265
240
  );
266
241
  }
267
242
 
268
- .sapphire-listbox__item--selected:not(.is-disabled):not(.is-active).is-hover
243
+ .sapphire-listbox__item--danger:not(.is-disabled):not(.is-active).is-hover
269
244
  .sapphire-listbox__content,
270
- .sapphire-listbox__item--selected:not(.is-disabled):not(.is-active):not(
271
- .js-hover
245
+ .sapphire-listbox__item--danger:not(.is-disabled):not(.is-active).is-hover
246
+ .sapphire-listbox__secondary-text,
247
+ .sapphire-listbox__item--danger:not(.is-disabled):not(.js-hover):not(
248
+ .is-active
272
249
  ):hover
273
- .sapphire-listbox__content {
274
- color: var(--sapphire-semantic-color-content-selection-selected-hover);
275
- background-color: var(
276
- --sapphire-semantic-color-background-selection-selected-hover
250
+ .sapphire-listbox__content,
251
+ .sapphire-listbox__item--danger:not(.is-disabled):not(.js-hover):not(
252
+ .is-active
253
+ ):hover
254
+ .sapphire-listbox__secondary-text {
255
+ color: var(
256
+ --sapphire-semantic-color-foreground-action-on-danger-tertiary-hover
277
257
  );
278
258
  }
279
259
 
280
260
  /* Active */
281
261
 
282
262
  .sapphire-listbox__item:not(.is-disabled).is-active .sapphire-listbox__content {
283
- color: var(--sapphire-semantic-color-content-selection-unselected-active);
284
- background-color: var(
285
- --sapphire-semantic-color-background-selection-unselected-active
286
- );
263
+ color: var(--sapphire-semantic-color-foreground-action-on-tertiary-active);
264
+ background: var(--sapphire-semantic-color-background-action-tertiary-active);
287
265
  }
288
266
 
289
267
  .sapphire-listbox__item--danger:not(.is-disabled).is-active
290
268
  .sapphire-listbox__content {
291
- color: var(--sapphire-semantic-color-content-action-danger-active);
292
- background-color: var(
293
- --sapphire-semantic-color-background-action-danger-hover
269
+ background: var(
270
+ --sapphire-semantic-color-background-action-danger-tertiary-active
294
271
  );
295
272
  }
296
273
 
297
- .sapphire-listbox__item--selected:not(.is-disabled).is-active
298
- .sapphire-listbox__content {
299
- color: var(--sapphire-semantic-color-content-selection-selected-active);
300
- background-color: var(
301
- --sapphire-semantic-color-background-selection-selected-active
274
+ .sapphire-listbox__item--danger:not(.is-disabled).is-active
275
+ .sapphire-listbox__content,
276
+ .sapphire-listbox__item--danger:not(.is-disabled).is-active
277
+ .sapphire-listbox__secondary-text {
278
+ color: var(
279
+ --sapphire-semantic-color-foreground-action-on-danger-tertiary-active
302
280
  );
303
281
  }
@@ -2,14 +2,12 @@ declare const styles: {
2
2
  readonly "sapphire-listbox": string;
3
3
  readonly "sapphire-listbox__item": string;
4
4
  readonly "sapphire-listbox__item--danger": string;
5
- readonly "sapphire-listbox__item--selected": string;
5
+ readonly "sapphire-listbox__secondary-text": string;
6
6
  readonly "sapphire-listbox__content": string;
7
- readonly "sapphire-listbox--md": string;
8
- readonly "sapphire-listbox--sm": string;
7
+ readonly "sapphire-listbox--selection": string;
9
8
  readonly "sapphire-listbox__icon": string;
10
9
  readonly "sapphire-listbox__text-container": string;
11
10
  readonly "sapphire-listbox__primary-text": string;
12
- readonly "sapphire-listbox__secondary-text": string;
13
11
  readonly "is-disabled": string;
14
12
  readonly "sapphire-listbox__section": string;
15
13
  readonly "sapphire-listbox__section-header": string;