@carbon/web-components 2.51.1 → 2.52.0-rc.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.
- package/custom-elements.json +477 -0
- package/es/components/checkbox/checkbox.js +8 -2
- package/es/components/checkbox/checkbox.js.map +1 -1
- package/es/components/contained-list/contained-list-item.d.ts +1 -1
- package/es/components/contained-list/contained-list-item.d.ts.map +1 -1
- package/es/components/contained-list/contained-list-item.js +3 -11
- package/es/components/contained-list/contained-list-item.js.map +1 -1
- package/es/components/contained-list/contained-list.scss.js +1 -1
- package/es/components/contained-list/contained-list.scss.js.map +1 -1
- package/es/components/dropdown/dropdown.d.ts +4 -0
- package/es/components/dropdown/dropdown.d.ts.map +1 -1
- package/es/components/dropdown/dropdown.js +3 -0
- package/es/components/dropdown/dropdown.js.map +1 -1
- package/es/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
- package/es/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
- package/es/components/fluid-dropdown/fluid-dropdown-skeleton.js +47 -0
- package/es/components/fluid-dropdown/fluid-dropdown-skeleton.js.map +1 -0
- package/es/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
- package/es/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
- package/es/components/fluid-dropdown/fluid-dropdown.js +58 -0
- package/es/components/fluid-dropdown/fluid-dropdown.js.map +1 -0
- package/es/components/fluid-dropdown/fluid-dropdown.scss.js +15 -0
- package/es/components/fluid-dropdown/fluid-dropdown.scss.js.map +1 -0
- package/es/components/fluid-dropdown/index.d.ts +9 -0
- package/es/components/fluid-dropdown/index.d.ts.map +1 -0
- package/es/components/fluid-dropdown/index.js +9 -0
- package/es/components/list/list.scss.js +1 -1
- package/es-custom/components/checkbox/checkbox.js +8 -2
- package/es-custom/components/checkbox/checkbox.js.map +1 -1
- package/es-custom/components/contained-list/contained-list-item.d.ts +1 -1
- package/es-custom/components/contained-list/contained-list-item.d.ts.map +1 -1
- package/es-custom/components/contained-list/contained-list-item.js +3 -11
- package/es-custom/components/contained-list/contained-list-item.js.map +1 -1
- package/es-custom/components/contained-list/contained-list.scss.js +1 -1
- package/es-custom/components/contained-list/contained-list.scss.js.map +1 -1
- package/es-custom/components/dropdown/dropdown.d.ts +4 -0
- package/es-custom/components/dropdown/dropdown.d.ts.map +1 -1
- package/es-custom/components/dropdown/dropdown.js +3 -0
- package/es-custom/components/dropdown/dropdown.js.map +1 -1
- package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.js +47 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown-skeleton.js.map +1 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.js +58 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.js.map +1 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.scss.js +15 -0
- package/es-custom/components/fluid-dropdown/fluid-dropdown.scss.js.map +1 -0
- package/es-custom/components/fluid-dropdown/index.d.ts +9 -0
- package/es-custom/components/fluid-dropdown/index.d.ts.map +1 -0
- package/es-custom/components/fluid-dropdown/index.js +9 -0
- package/es-custom/components/list/list.scss.js +1 -1
- package/lib/components/contained-list/contained-list-item.d.ts +1 -1
- package/lib/components/contained-list/contained-list-item.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.d.ts +4 -0
- package/lib/components/dropdown/dropdown.d.ts.map +1 -1
- package/lib/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts +18 -0
- package/lib/components/fluid-dropdown/fluid-dropdown-skeleton.d.ts.map +1 -0
- package/lib/components/fluid-dropdown/fluid-dropdown.d.ts +21 -0
- package/lib/components/fluid-dropdown/fluid-dropdown.d.ts.map +1 -0
- package/lib/components/fluid-dropdown/index.d.ts +9 -0
- package/lib/components/fluid-dropdown/index.d.ts.map +1 -0
- package/package.json +6 -6
- package/scss/components/contained-list/contained-list.scss +13 -1
- package/scss/components/fluid-dropdown/fluid-dropdown.scss +234 -0
- package/telemetry.yml +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2025
|
|
2
|
+
// Copyright IBM Corp. 2025, 2026
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -20,11 +20,14 @@ $css--plex: true !default;
|
|
|
20
20
|
// CSS custom properties for slotted search component
|
|
21
21
|
--cds-search-background: #{$background};
|
|
22
22
|
--cds-search-border-bottom: 1px solid #{$border-subtle};
|
|
23
|
+
|
|
24
|
+
display: block;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
:host(#{$prefix}-contained-list-item) {
|
|
26
28
|
display: block;
|
|
27
29
|
}
|
|
30
|
+
|
|
28
31
|
:host(#{$prefix}-contained-list-description) {
|
|
29
32
|
@include type-style('label-01');
|
|
30
33
|
|
|
@@ -36,6 +39,10 @@ $css--plex: true !default;
|
|
|
36
39
|
vertical-align: baseline;
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
:host(#{$prefix}-contained-list-item:not(:first-of-type)) {
|
|
43
|
+
margin-block-start: -1px;
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
:host(#{$prefix}-contained-list-item:not(:last-of-type)) {
|
|
40
47
|
.#{$prefix}--contained-list-item::before {
|
|
41
48
|
position: absolute;
|
|
@@ -46,3 +53,8 @@ $css--plex: true !default;
|
|
|
46
53
|
inset-inline: 0;
|
|
47
54
|
}
|
|
48
55
|
}
|
|
56
|
+
|
|
57
|
+
:host(#{$prefix}-contained-list-item) ::slotted([slot='icon']) {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
margin-block-start: $spacing-01;
|
|
60
|
+
}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp.2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
$css--plex: true !default;
|
|
9
|
+
@use '@carbon/styles/scss/config' as *;
|
|
10
|
+
@use '@carbon/styles/scss/components/fluid-dropdown/index';
|
|
11
|
+
@use '@carbon/styles/scss/components/dropdown' as *;
|
|
12
|
+
@use '@carbon/styles/scss/components/list-box' as *;
|
|
13
|
+
@use '@carbon/styles/scss/layout' as *;
|
|
14
|
+
@use '@carbon/styles/scss/spacing' as *;
|
|
15
|
+
@use '@carbon/styles/scss/theme' as *;
|
|
16
|
+
@use '@carbon/styles/scss/type' as *;
|
|
17
|
+
@use '@carbon/styles/scss/utilities/skeleton' as *;
|
|
18
|
+
@use '@carbon/styles/scss/utilities' as *;
|
|
19
|
+
@use '@carbon/styles/scss/colors';
|
|
20
|
+
@use '@carbon/styles/scss/utilities/convert' as *;
|
|
21
|
+
|
|
22
|
+
:host(#{$prefix}-fluid-dropdown) {
|
|
23
|
+
@extend .#{$prefix}--list-box__wrapper;
|
|
24
|
+
@extend .#{$prefix}--list-box__wrapper--fluid;
|
|
25
|
+
|
|
26
|
+
@include emit-layout-tokens();
|
|
27
|
+
|
|
28
|
+
outline: none;
|
|
29
|
+
|
|
30
|
+
.#{$prefix}--list-box {
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.#{$prefix}--list-box--expanded {
|
|
35
|
+
border-block-end-color: $border-subtle;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.#{$prefix}--assistive-text {
|
|
39
|
+
inset-block-start: -100%;
|
|
40
|
+
// Hides screen reader cursor
|
|
41
|
+
inset-inline-start: -100%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.#{$prefix}--label[hidden] {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$prefix}--list-box__menu {
|
|
49
|
+
inset-block-start: 100%;
|
|
50
|
+
margin-block-start: 1px;
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$prefix}--list-box--disabled {
|
|
55
|
+
border-block-end-color: transparent;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Parity styles for non-condensed menu items
|
|
60
|
+
.#{$prefix}--list-box__menu-item__selected-icon {
|
|
61
|
+
inset-block-start: to-rem(20px);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.#{$prefix}--list-box__divider {
|
|
65
|
+
display: block;
|
|
66
|
+
border: none;
|
|
67
|
+
margin: 0 1rem;
|
|
68
|
+
border-block-end: 1px solid $border-subtle;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Target dropdown items inside fluid dropdown for non-condensed height
|
|
73
|
+
:host(#{$prefix}-fluid-dropdown:not([is-condensed])) {
|
|
74
|
+
::slotted(#{$prefix}-dropdown-item) {
|
|
75
|
+
block-size: $spacing-10;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host(#{$prefix}-fluid-dropdown[invalid]) {
|
|
80
|
+
@extend .#{$prefix}--list-box__wrapper--fluid--invalid;
|
|
81
|
+
@include focus-outline('invalid');
|
|
82
|
+
|
|
83
|
+
outline-offset: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Direction top
|
|
87
|
+
:host(#{$prefix}-fluid-dropdown[direction='top']) {
|
|
88
|
+
@extend .#{$prefix}--list-box--up;
|
|
89
|
+
|
|
90
|
+
.#{$prefix}--list-box__menu {
|
|
91
|
+
inset-block-start: auto;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// AI Label styles
|
|
96
|
+
:host(#{$prefix}-fluid-dropdown[ai-label]) {
|
|
97
|
+
@extend .#{$prefix}--list-box__wrapper--slug;
|
|
98
|
+
|
|
99
|
+
::slotted(#{$prefix}-ai-label),
|
|
100
|
+
::slotted(#{$prefix}-slug) {
|
|
101
|
+
position: absolute;
|
|
102
|
+
inset-block-start: 70%;
|
|
103
|
+
inset-inline-end: $spacing-09;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
::slotted(#{$prefix}-ai-label:not([revert-active])),
|
|
107
|
+
::slotted(#{$prefix}-slug:not([revert-active])) {
|
|
108
|
+
transform: translateY(-70%);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.#{$prefix}--list-box__wrapper--decorator {
|
|
112
|
+
@include ai-gradient;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// AI label dividers - always present
|
|
117
|
+
:host(#{$prefix}-fluid-dropdown[ai-label]) ::slotted(#{$prefix}-ai-label) {
|
|
118
|
+
&::after {
|
|
119
|
+
position: absolute;
|
|
120
|
+
background-color: $border-subtle-01;
|
|
121
|
+
block-size: to-rem(16px);
|
|
122
|
+
content: '';
|
|
123
|
+
inline-size: to-rem(1px);
|
|
124
|
+
inset-inline-start: calc(#{$spacing-06} - to-rem(1px));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:host(#{$prefix}-fluid-dropdown[ai-label][read-only]),
|
|
129
|
+
:host(#{$prefix}-fluid-dropdown[ai-label][disabled]) {
|
|
130
|
+
.#{$prefix}--list-box {
|
|
131
|
+
border-block-end-color: $ai-border-strong;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.#{$prefix}--list-box__field {
|
|
135
|
+
border-block-end: 1px solid $ai-border-strong;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
::slotted(#{$prefix}-ai-label)::before {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Condensed styles
|
|
144
|
+
:host(#{$prefix}-fluid-dropdown[is-condensed]) {
|
|
145
|
+
@extend .#{$prefix}--list-box__wrapper--fluid--condensed;
|
|
146
|
+
|
|
147
|
+
.#{$prefix}--list-box__menu-item__selected-icon {
|
|
148
|
+
inset-block-start: auto;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Reset menu item height for condensed mode
|
|
152
|
+
::slotted(#{$prefix}-dropdown-item) {
|
|
153
|
+
block-size: auto;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Disabled state
|
|
158
|
+
:host(#{$prefix}-fluid-dropdown[disabled]) {
|
|
159
|
+
cursor: not-allowed;
|
|
160
|
+
|
|
161
|
+
svg {
|
|
162
|
+
fill: $icon-disabled;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.#{$prefix}--list-box__field,
|
|
166
|
+
.#{$prefix}--list-box__selection {
|
|
167
|
+
pointer-events: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.#{$prefix}--list-box__field:focus,
|
|
171
|
+
.#{$prefix}--list-box__selection:focus {
|
|
172
|
+
outline: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.#{$prefix}--label {
|
|
176
|
+
color: $text-disabled;
|
|
177
|
+
cursor: not-allowed;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host(#{$prefix}-fluid-dropdown[read-only]) {
|
|
182
|
+
@extend .#{$prefix}--dropdown--readonly;
|
|
183
|
+
|
|
184
|
+
.#{$prefix}--dropdown {
|
|
185
|
+
border-block-end-color: $border-subtle;
|
|
186
|
+
}
|
|
187
|
+
.#{$prefix}--label {
|
|
188
|
+
color: inherit;
|
|
189
|
+
}
|
|
190
|
+
.#{$prefix}--list-box__field,
|
|
191
|
+
.#{$prefix}--list-box__selection {
|
|
192
|
+
pointer-events: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host(#{$prefix}-fluid-dropdown[invalid]:not([disabled]):not([read-only])),
|
|
197
|
+
:host(#{$prefix}-fluid-dropdown[warn]:not([disabled]):not([read-only])) {
|
|
198
|
+
.#{$prefix}--form__helper-text {
|
|
199
|
+
padding: to-rem(8px) 4rem to-rem(8px) $spacing-05;
|
|
200
|
+
inline-size: auto;
|
|
201
|
+
margin-block-start: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.#{$prefix}--list-box {
|
|
205
|
+
border-block-end: 1px solid transparent;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.#{$prefix}--list-box.#{$prefix}--list-box--warning
|
|
209
|
+
.#{$prefix}--list-box__invalid-icon,
|
|
210
|
+
.#{$prefix}--list-box__invalid-icon--warning {
|
|
211
|
+
inset-block-start: to-rem(81px);
|
|
212
|
+
inset-inline-end: $spacing-05;
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:host(#{$prefix}-fluid-dropdown[warn]:not([disabled]):not([read-only])) {
|
|
218
|
+
.#{$prefix}--form__helper-text {
|
|
219
|
+
color: $text-primary;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:host(#{$prefix}-fluid-dropdown[invalid]:not([disabled]):not([read-only])) {
|
|
224
|
+
.#{$prefix}--form__helper-text {
|
|
225
|
+
color: $text-error;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Skeleton
|
|
230
|
+
:host(#{$prefix}-fluid-dropdown-skeleton) {
|
|
231
|
+
@extend .#{$prefix}--list-box__wrapper--fluid;
|
|
232
|
+
|
|
233
|
+
display: block;
|
|
234
|
+
}
|
package/telemetry.yml
CHANGED