@carbon/web-components 2.2.0-rc.0 → 2.2.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 (190) hide show
  1. package/dist/breadcrumb.min.js +1 -1
  2. package/dist/breadcrumb.rtl.min.js +1 -1
  3. package/dist/button-91dc3bf2.js +114 -0
  4. package/dist/button-cd1d2989.js +114 -0
  5. package/dist/{button-set-3fbfb1e2.js → button-set-97d5539d.js} +1 -1
  6. package/dist/{button-set-49140585.js → button-set-df387db9.js} +1 -1
  7. package/dist/{button-skeleton-e9fdd327.js → button-skeleton-b56368e6.js} +1 -1
  8. package/dist/{button-skeleton-ebe87ee2.js → button-skeleton-e8bfd30d.js} +1 -1
  9. package/dist/button.min.js +1 -1
  10. package/dist/button.rtl.min.js +1 -1
  11. package/dist/code-snippet.min.js +2 -2
  12. package/dist/code-snippet.rtl.min.js +2 -2
  13. package/dist/combo-box.min.js +3 -3
  14. package/dist/combo-box.rtl.min.js +3 -3
  15. package/dist/content-switcher-item-891f0846.js +84 -0
  16. package/dist/content-switcher-item-a33ee871.js +84 -0
  17. package/dist/content-switcher.min.js +1 -1
  18. package/dist/content-switcher.rtl.min.js +1 -1
  19. package/dist/copy-button-c4cc0e08.js +63 -0
  20. package/dist/copy-button-d2b3776d.js +63 -0
  21. package/dist/copy-button.min.js +1 -1
  22. package/dist/copy-button.rtl.min.js +1 -1
  23. package/dist/data-table.min.js +15 -15
  24. package/dist/data-table.rtl.min.js +15 -15
  25. package/dist/date-picker.min.js +6 -6
  26. package/dist/date-picker.rtl.min.js +6 -6
  27. package/dist/dropdown-item-c9529452.js +128 -0
  28. package/dist/dropdown-item-e2dea4df.js +128 -0
  29. package/dist/dropdown.min.js +1 -1
  30. package/dist/dropdown.rtl.min.js +1 -1
  31. package/dist/file-uploader.min.js +1 -1
  32. package/dist/file-uploader.rtl.min.js +1 -1
  33. package/dist/icon-button-ad72899d.js +71 -0
  34. package/dist/icon-button-bc9a3754.js +71 -0
  35. package/dist/icon-button.min.js +1 -1
  36. package/dist/icon-button.rtl.min.js +1 -1
  37. package/dist/modal.min.js +3 -3
  38. package/dist/modal.rtl.min.js +3 -3
  39. package/dist/multi-select.min.js +2 -2
  40. package/dist/multi-select.rtl.min.js +4 -4
  41. package/dist/notification.min.js +4 -4
  42. package/dist/notification.rtl.min.js +4 -4
  43. package/dist/number-input.min.js +2 -2
  44. package/dist/number-input.rtl.min.js +2 -2
  45. package/dist/overflow-menu.min.js +2 -2
  46. package/dist/overflow-menu.rtl.min.js +2 -2
  47. package/dist/pagination.min.js +1 -1
  48. package/dist/pagination.rtl.min.js +1 -1
  49. package/dist/{popover-content-ed493819.js → popover-content-948e858f.js} +1 -1
  50. package/dist/{popover-content-707ec790.js → popover-content-e770cdaf.js} +1 -1
  51. package/dist/popover.min.js +1 -1
  52. package/dist/popover.rtl.min.js +1 -1
  53. package/dist/progress-indicator.min.js +1 -1
  54. package/dist/progress-indicator.rtl.min.js +1 -1
  55. package/dist/radio-button.min.js +1 -1
  56. package/dist/radio-button.rtl.min.js +1 -1
  57. package/dist/{search-bc0c0a50.js → search-7d2e00f9.js} +2 -2
  58. package/dist/{search-9f2e5697.js → search-b8d26957.js} +2 -2
  59. package/dist/search.min.js +1 -1
  60. package/dist/search.rtl.min.js +1 -1
  61. package/dist/select.min.js +9 -9
  62. package/dist/select.rtl.min.js +9 -9
  63. package/dist/skip-to-content.min.js +1 -1
  64. package/dist/skip-to-content.rtl.min.js +1 -1
  65. package/dist/slider.min.js +1 -1
  66. package/dist/slider.rtl.min.js +1 -1
  67. package/dist/slug.min.js +5 -5
  68. package/dist/slug.rtl.min.js +5 -5
  69. package/dist/tabs.min.js +2 -2
  70. package/dist/tabs.rtl.min.js +2 -2
  71. package/dist/{text-input-5d858bc5.js → text-input-57fd8a9e.js} +3 -3
  72. package/dist/{text-input-3e241dec.js → text-input-ccd474b5.js} +3 -3
  73. package/dist/text-input.min.js +1 -1
  74. package/dist/text-input.rtl.min.js +2 -2
  75. package/dist/textarea.min.js +1 -1
  76. package/dist/textarea.rtl.min.js +5 -5
  77. package/dist/tile.min.js +3 -3
  78. package/dist/tile.rtl.min.js +3 -3
  79. package/dist/toggle-tip.min.js +1 -1
  80. package/dist/toggle-tip.rtl.min.js +1 -1
  81. package/dist/{toggletip-71cb53c9.js → toggletip-8f50a106.js} +7 -5
  82. package/dist/{toggletip-1a1c8d7c.js → toggletip-b75019b5.js} +7 -5
  83. package/dist/{tooltip-content-fe09d503.js → tooltip-content-7b42630c.js} +1 -1
  84. package/dist/{tooltip-content-e07c0117.js → tooltip-content-87dfad64.js} +1 -1
  85. package/dist/tooltip.min.js +1 -1
  86. package/dist/tooltip.rtl.min.js +1 -1
  87. package/dist/ui-shell.min.js +1 -1
  88. package/dist/ui-shell.rtl.min.js +1 -1
  89. package/es/components/breadcrumb/breadcrumb.css.js +1 -1
  90. package/es/components/breadcrumb/breadcrumb.rtl.css.js +1 -1
  91. package/es/components/button/button.css.js +1 -1
  92. package/es/components/button/button.rtl.css.js +1 -1
  93. package/es/components/code-snippet/code-snippet.css.js +1 -1
  94. package/es/components/code-snippet/code-snippet.rtl.css.js +1 -1
  95. package/es/components/combo-box/combo-box.css.js +1 -1
  96. package/es/components/combo-box/combo-box.rtl.css.js +1 -1
  97. package/es/components/content-switcher/content-switcher.css.js +1 -1
  98. package/es/components/content-switcher/content-switcher.rtl.css.js +1 -1
  99. package/es/components/copy-button/copy-button.css.js +1 -1
  100. package/es/components/copy-button/copy-button.rtl.css.js +1 -1
  101. package/es/components/data-table/data-table.css.js +1 -1
  102. package/es/components/data-table/data-table.rtl.css.js +1 -1
  103. package/es/components/date-picker/date-picker-input.d.ts +2 -1
  104. package/es/components/date-picker/date-picker-input.js +8 -1
  105. package/es/components/date-picker/date-picker-input.js.map +1 -1
  106. package/es/components/date-picker/date-picker.css.js +1 -1
  107. package/es/components/date-picker/date-picker.rtl.css.js +1 -1
  108. package/es/components/dropdown/dropdown.css.js +1 -1
  109. package/es/components/dropdown/dropdown.d.ts +1 -1
  110. package/es/components/dropdown/dropdown.js +3 -1
  111. package/es/components/dropdown/dropdown.js.map +1 -1
  112. package/es/components/dropdown/dropdown.rtl.css.js +1 -1
  113. package/es/components/file-uploader/file-uploader.css.js +1 -1
  114. package/es/components/file-uploader/file-uploader.rtl.css.js +1 -1
  115. package/es/components/icon-button/icon-button.css.js +1 -1
  116. package/es/components/icon-button/icon-button.rtl.css.js +1 -1
  117. package/es/components/modal/modal.css.js +1 -1
  118. package/es/components/modal/modal.rtl.css.js +1 -1
  119. package/es/components/multi-select/multi-select.css.js +1 -1
  120. package/es/components/multi-select/multi-select.rtl.css.js +1 -1
  121. package/es/components/notification/actionable-notification.css.js +1 -1
  122. package/es/components/notification/actionable-notification.rtl.css.js +1 -1
  123. package/es/components/notification/inline-notification.css.js +1 -1
  124. package/es/components/notification/inline-notification.rtl.css.js +1 -1
  125. package/es/components/notification/toast-notification.css.js +1 -1
  126. package/es/components/notification/toast-notification.rtl.css.js +1 -1
  127. package/es/components/number-input/number-input.css.js +1 -1
  128. package/es/components/number-input/number-input.rtl.css.js +1 -1
  129. package/es/components/overflow-menu/overflow-menu.css.js +1 -1
  130. package/es/components/overflow-menu/overflow-menu.rtl.css.js +1 -1
  131. package/es/components/pagination/pagination.css.js +1 -1
  132. package/es/components/pagination/pagination.rtl.css.js +1 -1
  133. package/es/components/popover/popover.css.js +1 -1
  134. package/es/components/popover/popover.rtl.css.js +1 -1
  135. package/es/components/progress-indicator/progress-indicator.css.js +1 -1
  136. package/es/components/progress-indicator/progress-indicator.rtl.css.js +1 -1
  137. package/es/components/radio-button/radio-button.css.js +1 -1
  138. package/es/components/radio-button/radio-button.rtl.css.js +1 -1
  139. package/es/components/search/search.css.js +1 -1
  140. package/es/components/search/search.rtl.css.js +1 -1
  141. package/es/components/select/select.css.js +1 -1
  142. package/es/components/select/select.d.ts +1 -1
  143. package/es/components/select/select.js +3 -1
  144. package/es/components/select/select.js.map +1 -1
  145. package/es/components/select/select.rtl.css.js +1 -1
  146. package/es/components/skip-to-content/skip-to-content.css.js +1 -1
  147. package/es/components/skip-to-content/skip-to-content.rtl.css.js +1 -1
  148. package/es/components/slider/slider.css.js +1 -1
  149. package/es/components/slider/slider.rtl.css.js +1 -1
  150. package/es/components/slug/slug.css.js +1 -1
  151. package/es/components/slug/slug.d.ts +2 -1
  152. package/es/components/slug/slug.js +13 -3
  153. package/es/components/slug/slug.js.map +1 -1
  154. package/es/components/slug/slug.rtl.css.js +1 -1
  155. package/es/components/tabs/tabs.css.js +1 -1
  156. package/es/components/tabs/tabs.rtl.css.js +1 -1
  157. package/es/components/text-input/text-input.css.js +1 -1
  158. package/es/components/text-input/text-input.d.ts +2 -1
  159. package/es/components/text-input/text-input.js +8 -1
  160. package/es/components/text-input/text-input.js.map +1 -1
  161. package/es/components/text-input/text-input.rtl.css.js +1 -1
  162. package/es/components/textarea/textarea.css.js +1 -1
  163. package/es/components/textarea/textarea.rtl.css.js +1 -1
  164. package/es/components/tile/tile.css.js +1 -1
  165. package/es/components/tile/tile.rtl.css.js +1 -1
  166. package/es/components/toggle-tip/toggletip.css.js +1 -1
  167. package/es/components/toggle-tip/toggletip.d.ts +5 -1
  168. package/es/components/toggle-tip/toggletip.js +23 -9
  169. package/es/components/toggle-tip/toggletip.js.map +1 -1
  170. package/es/components/toggle-tip/toggletip.rtl.css.js +1 -1
  171. package/es/components/tooltip/tooltip.css.js +1 -1
  172. package/es/components/tooltip/tooltip.rtl.css.js +1 -1
  173. package/es/components/ui-shell/header.css.js +1 -1
  174. package/es/components/ui-shell/header.rtl.css.js +1 -1
  175. package/es/globals/scss/themes.css.js +1 -1
  176. package/es/globals/scss/themes.rtl.css.js +1 -1
  177. package/package.json +3 -3
  178. package/scss/components/modal/modal.scss +3 -1
  179. package/scss/components/popover/popover.scss +5 -5
  180. package/scss/components/slug/slug.scss +184 -176
  181. package/dist/button-52e782bf.js +0 -114
  182. package/dist/button-b9fe617d.js +0 -114
  183. package/dist/content-switcher-item-0371877f.js +0 -84
  184. package/dist/content-switcher-item-c24356d4.js +0 -84
  185. package/dist/copy-button-c25e37f0.js +0 -63
  186. package/dist/copy-button-c7367c69.js +0 -63
  187. package/dist/dropdown-item-1ce0c8c2.js +0 -128
  188. package/dist/dropdown-item-628e0373.js +0 -128
  189. package/dist/icon-button-0e614535.js +0 -71
  190. package/dist/icon-button-0ebc4b02.js +0 -71
@@ -1,11 +1,12 @@
1
1
  /**
2
- * @license
3
- *
4
- * Copyright IBM Corp. 2019, 2023
5
- *
6
- * This source code is licensed under the Apache-2.0 license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- */
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2019, 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ @use 'sass:map';
9
10
 
10
11
  @use '@carbon/styles/scss/config' as *;
11
12
  @use '@carbon/styles/scss/type' as *;
@@ -21,6 +22,20 @@
21
22
  // importing tag color tokens for the styling slug in tag component
22
23
  @use '@carbon/styles/scss/components/tag/index' as *;
23
24
 
25
+ $colorMap: (
26
+ 'red': $tag-color-red,
27
+ 'magenta': $tag-color-magenta,
28
+ 'purple': $tag-color-purple,
29
+ 'blue': $tag-color-blue,
30
+ 'cyan': $tag-color-cyan,
31
+ 'teal': $tag-color-teal,
32
+ 'green': $tag-color-green,
33
+ 'gray': $tag-color-gray,
34
+ 'cool-gray': $tag-color-cool-gray,
35
+ 'warm-gray': $tag-color-warm-gray,
36
+ 'high-contrast': $text-inverse,
37
+ );
38
+
24
39
  :host(#{$prefix}-slug) {
25
40
  @extend .#{$prefix}--slug;
26
41
 
@@ -33,14 +48,11 @@
33
48
  .#{$prefix}--popover-content {
34
49
  @include callout-gradient();
35
50
 
36
- border: 1px solid $border-subtle;
37
- border-radius: $spacing-05;
38
- // 84px seems to make this fully opaque?
39
- backdrop-filter: blur(25px);
40
- // box-shadow seems to match the spec better
41
- // than the same values plugged into `drop-shadow`
42
- // filter: drop-shadow(-45px 45px 100px rgba(0, 0, 0, 0.2));
43
- box-shadow: -45px 45px 100px rgba(0, 0, 0, 0.2);
51
+ border: 1px solid transparent;
52
+ border-radius: $spacing-03;
53
+ box-shadow: inset 0 -80px 70px -65px $ai-inner-shadow,
54
+ -40px 30px 100px -25px $slug-callout-shadow-outer-01,
55
+ -60px 80px 60px -45px $slug-callout-shadow-outer-02;
44
56
  color: $text-primary;
45
57
  min-inline-size: to-rem(280px);
46
58
  }
@@ -48,9 +60,10 @@
48
60
  .#{$prefix}--toggletip-actions {
49
61
  position: absolute;
50
62
  justify-content: flex-end;
51
- background: $layer-accent;
52
- border-end-end-radius: to-rem(15px);
53
- border-end-start-radius: to-rem(15px);
63
+ backdrop-filter: blur(85px);
64
+ background: rgba(0, 0, 0, 0.01);
65
+ border-end-end-radius: $spacing-03;
66
+ border-end-start-radius: $spacing-03;
54
67
  column-gap: 0;
55
68
  inline-size: 100%;
56
69
  inset-block-end: 0;
@@ -59,13 +72,24 @@
59
72
 
60
73
  .#{$prefix}--toggletip-content {
61
74
  // This sets the max size to the size of the action bar with 3 buttons
62
- max-inline-size: to-rem(334px);
63
- padding-block: $spacing-07 $spacing-11;
64
- padding-inline: $spacing-07;
75
+ padding-block: $spacing-06 $spacing-11;
76
+ padding-inline: $spacing-06;
65
77
  --cds-button-focus-color: var(--cds-focus);
66
78
  }
67
79
  }
68
80
 
81
+ :host(#{$prefix}-slug[enabled][with-actions]) {
82
+ .#{$prefix}--toggletip-content {
83
+ max-inline-size: to-rem(334px);
84
+ }
85
+ }
86
+
87
+ :host(#{$prefix}-slug[enabled]:not([with-actions])) {
88
+ .#{$prefix}--toggletip-content {
89
+ max-inline-size: to-rem(320px);
90
+ }
91
+ }
92
+
69
93
  :host(#{$prefix}-slug[revert-active]) {
70
94
  transform: translate($spacing-03, -50%);
71
95
  }
@@ -78,7 +102,7 @@
78
102
  @include emit-layout-tokens();
79
103
  .#{$prefix}--btn--primary {
80
104
  order: 1;
81
- border-end-end-radius: 1rem;
105
+ border-end-end-radius: to-rem(7px);
82
106
  }
83
107
  }
84
108
 
@@ -126,7 +150,30 @@
126
150
 
127
151
  :host(#{$prefix}-slug:not([kind='hollow']):not([dot-type='hollow'])) {
128
152
  .#{$prefix}--popover-caret {
129
- background: $border-subtle;
153
+ background: transparent;
154
+ clip-path: none;
155
+
156
+ &::before {
157
+ position: absolute;
158
+ display: block;
159
+ box-sizing: border-box;
160
+ border: 1px solid $ai-border-start;
161
+ background: $background;
162
+ block-size: $spacing-04;
163
+ clip-path: polygon(98% 0, 0 0, -52% 150%) border-box;
164
+ content: '';
165
+ inline-size: $spacing-04;
166
+ transform: rotate(45deg);
167
+ }
168
+
169
+ &::after {
170
+ position: absolute;
171
+ display: block;
172
+ background: $background;
173
+ block-size: to-rem(14px);
174
+ content: '';
175
+ inline-size: $spacing-01;
176
+ }
130
177
  }
131
178
 
132
179
  .#{$prefix}--slug__button.#{$prefix}--slug__button--mini:focus,
@@ -135,200 +182,161 @@
135
182
  }
136
183
  }
137
184
 
138
- :host(#{$prefix}-slug[tag='red']) {
139
- .#{$prefix}--slug__text {
140
- color: $tag-color-red;
141
- }
142
-
143
- .#{$prefix}--slug__text::before {
144
- background: $tag-color-red;
145
- }
146
-
147
- button:hover {
148
- border-color: $tag-color-red;
149
-
150
- .#{$prefix}--slug__text::before {
151
- background-color: $tag-color-red;
185
+ // top
186
+ :host(
187
+ #{$prefix}-slug:not([kind='hollow']):not(
188
+ [dot-type='hollow']
189
+ )[alignment^='top']
190
+ ) {
191
+ .#{$prefix}--popover-caret {
192
+ &::before {
193
+ inset-block-end: to-rem(1px);
194
+ transform: rotate(-135deg);
152
195
  }
153
- }
154
- }
155
196
 
156
- :host(#{$prefix}-slug[tag='magenta']) {
157
- .#{$prefix}--slug__text {
158
- color: $tag-color-magenta;
159
- }
160
-
161
- .#{$prefix}--slug__text::before {
162
- background: $tag-color-magenta;
163
- }
164
-
165
- button:hover {
166
- border-color: $tag-color-magenta;
167
-
168
- .#{$prefix}--slug__text::before {
169
- background-color: $tag-color-magenta;
197
+ &::after {
198
+ background: $slug-callout-caret-bottom-background;
199
+ block-size: $spacing-01;
200
+ border-end-end-radius: 50%;
201
+ border-end-start-radius: 50%;
202
+ inline-size: to-rem(14px);
203
+ inset-block-start: -$spacing-01;
204
+ inset-inline-start: to-rem(-1px);
170
205
  }
171
206
  }
172
- }
173
-
174
- :host(#{$prefix}-slug[tag='purple']) {
175
- .#{$prefix}--slug__text {
176
- color: $tag-color-purple;
177
- }
178
-
179
- .#{$prefix}--slug__text::before {
180
- background: $tag-color-purple;
181
- }
182
207
 
183
- button:hover {
184
- border-color: $tag-color-purple;
185
-
186
- .#{$prefix}--slug__text::before {
187
- background-color: $tag-color-purple;
208
+ &[has-actions] {
209
+ .#{$prefix}--popover-caret::after {
210
+ display: none;
188
211
  }
189
212
  }
190
213
  }
191
214
 
192
- :host(#{$prefix}-slug[tag='blue']) {
193
- .#{$prefix}--slug__text {
194
- color: $tag-color-blue;
195
- }
196
-
197
- .#{$prefix}--slug__text::before {
198
- background: $tag-color-blue;
199
- }
200
-
201
- button:hover {
202
- border-color: $tag-color-blue;
215
+ // right
216
+ :host(
217
+ #{$prefix}-slug:not([kind='hollow']):not(
218
+ [dot-type='hollow']
219
+ )[alignment^='right']
220
+ ) {
221
+ .#{$prefix}--popover-caret {
222
+ &::before {
223
+ content: '';
224
+ inset-inline-start: to-rem(1px);
225
+ transform: rotate(-45deg);
226
+ }
203
227
 
204
- .#{$prefix}--slug__text::before {
205
- background-color: $tag-color-blue;
228
+ &::after {
229
+ border-end-start-radius: 50%;
230
+ border-start-start-radius: 50%;
231
+ inset-block-start: to-rem(-1px);
232
+ inset-inline-start: to-rem(6px);
206
233
  }
207
234
  }
208
235
  }
209
236
 
210
- :host(#{$prefix}-slug[tag='cyan']) {
211
- .#{$prefix}--slug__text {
212
- color: $tag-color-cyan;
213
- }
214
-
215
- .#{$prefix}--slug__text::before {
216
- background: $tag-color-cyan;
217
- }
218
-
219
- button:hover {
220
- border-color: $tag-color-cyan;
237
+ // bottom
238
+ :host(
239
+ #{$prefix}-slug:not([kind='hollow']):not(
240
+ [dot-type='hollow']
241
+ )[alignment^='bottom']
242
+ ) {
243
+ .#{$prefix}--popover-caret {
244
+ &::before {
245
+ inset-block-start: to-rem(1px);
246
+ transform: rotate(45deg);
247
+ }
221
248
 
222
- .#{$prefix}--slug__text::before {
223
- background-color: $tag-color-cyan;
249
+ &::after {
250
+ block-size: $spacing-01;
251
+ border-start-end-radius: 50%;
252
+ border-start-start-radius: 50%;
253
+ inline-size: to-rem(14px);
254
+ inset-block-end: to-rem(-2.5px);
255
+ inset-inline-start: to-rem(-1px);
224
256
  }
225
257
  }
226
258
  }
227
259
 
228
- :host(#{$prefix}-slug[tag='teal']) {
229
- .#{$prefix}--slug__text {
230
- color: $tag-color-teal;
231
- }
232
-
233
- .#{$prefix}--slug__text::before {
234
- background: $tag-color-teal;
235
- }
236
-
237
- button:hover {
238
- border-color: $tag-color-teal;
260
+ //left
261
+ :host(
262
+ #{$prefix}-slug:not([kind='hollow']):not(
263
+ [dot-type='hollow']
264
+ )[alignment^='left']
265
+ ) {
266
+ .#{$prefix}--popover-caret {
267
+ &::before {
268
+ inset-inline-end: to-rem(1px);
269
+ transform: rotate(135deg);
270
+ }
239
271
 
240
- .#{$prefix}--slug__text::before {
241
- background-color: $tag-color-teal;
272
+ &::after {
273
+ border-end-end-radius: 50%;
274
+ border-start-end-radius: 50%;
275
+ inset-block-start: to-rem(-1px);
276
+ inset-inline-start: -$spacing-01;
242
277
  }
243
278
  }
244
279
  }
245
280
 
246
- :host(#{$prefix}-slug[tag='green']) {
247
- .#{$prefix}--slug__text {
248
- color: $tag-color-green;
249
- }
250
-
251
- .#{$prefix}--slug__text::before {
252
- background: $tag-color-green;
253
- }
254
-
255
- button:hover {
256
- border-color: $tag-color-green;
257
-
258
- .#{$prefix}--slug__text::before {
259
- background-color: $tag-color-green;
281
+ // override for specific alignments
282
+ /* stylelint-disable-next-line no-duplicate-selectors */
283
+ :host(#{$prefix}-slug:not([kind='hollow']):not([dot-type='hollow'])) {
284
+ &[alignment='left-bottom'],
285
+ &[alignment='right-bottom'] {
286
+ .#{$prefix}--popover-caret::after {
287
+ background: transparent;
260
288
  }
261
289
  }
262
290
  }
263
291
 
264
- :host(#{$prefix}-slug[tag='gray']) {
265
- .#{$prefix}--slug__text {
266
- color: $tag-color-gray;
267
- }
268
-
269
- .#{$prefix}--slug__text::before {
270
- background: $tag-color-gray;
271
- }
272
-
273
- button:hover {
274
- border-color: $tag-color-gray;
275
-
276
- .#{$prefix}--slug__text::before {
277
- background-color: $tag-color-gray;
292
+ // Change caret color / border when it is near the bottom of the callout
293
+ /* stylelint-disable-next-line no-duplicate-selectors */
294
+ :host(#{$prefix}-slug:not([kind='hollow']):not([dot-type='hollow'])) {
295
+ &[alignment='left-bottom'],
296
+ &[alignment='right-bottom'],
297
+ &[alignment='top'],
298
+ &[alignment='top-right'],
299
+ &[alignment='top-left'] {
300
+ .#{$prefix}--popover-caret::before {
301
+ border-color: $slug-callout-caret-bottom;
302
+ background: $slug-callout-caret-bottom-background;
303
+ }
304
+ // Adjust background if actions are present
305
+ &[has-actions] {
306
+ .#{$prefix}--popover-caret::before {
307
+ background: $slug-callout-caret-bottom-background-actions;
308
+ }
278
309
  }
279
310
  }
280
311
  }
281
312
 
282
- :host(#{$prefix}-slug[tag='cool-gray']) {
283
- .#{$prefix}--slug__text {
284
- color: $tag-color-cool-gray;
285
- }
286
-
287
- .#{$prefix}--slug__text::before {
288
- background: $tag-color-cool-gray;
289
- }
290
-
291
- button:hover {
292
- border-color: $tag-color-cool-gray;
293
-
294
- .#{$prefix}--slug__text::before {
295
- background-color: $tag-color-cool-gray;
313
+ // Change the caret border when it is near the middle of the callout
314
+ /* stylelint-disable-next-line no-duplicate-selectors */
315
+ :host(#{$prefix}-slug:not([kind='hollow']):not([dot-type='hollow'])) {
316
+ &[alignment='left'],
317
+ &[alignment='right'] {
318
+ .#{$prefix}--popover-caret::before {
319
+ border-color: $slug-callout-caret-center;
296
320
  }
297
321
  }
298
322
  }
299
323
 
300
- :host(#{$prefix}-slug[tag='warm-gray']) {
301
- .#{$prefix}--slug__text {
302
- color: $tag-color-warm-gray;
303
- }
304
-
305
- .#{$prefix}--slug__text::before {
306
- background: $tag-color-warm-gray;
307
- }
308
-
309
- button:hover {
310
- border-color: $tag-color-warm-gray;
324
+ @each $color, $token in $colorMap {
325
+ :host(#{$prefix}-slug[tag='#{$color}']) {
326
+ .#{$prefix}--slug__text {
327
+ color: $token;
328
+ }
311
329
 
312
330
  .#{$prefix}--slug__text::before {
313
- background-color: $tag-color-warm-gray;
331
+ background: $token;
314
332
  }
315
- }
316
- }
317
333
 
318
- :host(#{$prefix}-slug[tag='high-contrast']) {
319
- .#{$prefix}--slug__text {
320
- color: $text-inverse;
321
- }
322
-
323
- .#{$prefix}--slug__text::before {
324
- background: $text-inverse;
325
- }
326
-
327
- button:hover {
328
- border-color: $text-inverse;
334
+ button:hover {
335
+ border-color: $token;
329
336
 
330
- .#{$prefix}--slug__text::before {
331
- background-color: $text-inverse;
337
+ .#{$prefix}--slug__text::before {
338
+ background-color: $token;
339
+ }
332
340
  }
333
341
  }
334
342
  }