@cfpb/cfpb-design-system 3.1.7 → 3.1.8
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/dist/components/cfpb-expandables/index.css +1 -1
- package/dist/components/cfpb-expandables/index.css.map +2 -2
- package/dist/components/cfpb-expandables/index.js +1 -1
- package/dist/components/cfpb-expandables/index.js.map +2 -2
- package/dist/components/cfpb-forms/index.css +1 -1
- package/dist/components/cfpb-forms/index.css.map +2 -2
- package/dist/components/cfpb-forms/index.js +1 -1
- package/dist/components/cfpb-forms/index.js.map +2 -2
- package/dist/components/cfpb-typography/index.css.map +2 -2
- package/dist/components/cfpb-typography/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/utilities/index.css +1 -1
- package/dist/utilities/index.css.map +2 -2
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/index.js.map +2 -2
- package/package.json +2 -2
- package/src/components/cfpb-forms/multiselect.js +2 -1
- package/src/components/cfpb-forms/multiselect.scss +0 -76
- package/src/components/cfpb-forms/multiselect.spec.js +6 -2
- package/src/components/cfpb-forms/tag.scss +8 -0
- package/src/components/cfpb-typography/mixins.scss +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfpb/cfpb-design-system",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
4
4
|
"description": "CFPB's UI framework",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/cfpb/design-system/issues"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "ce63bfcdecf687e9b96ab2420db225649b65db4b",
|
|
23
23
|
"type": "module"
|
|
24
24
|
}
|
|
@@ -265,6 +265,7 @@ function Multiselect(element) {
|
|
|
265
265
|
|
|
266
266
|
const selectionsItemLabelDom = create('button', selectionsItemDom, {
|
|
267
267
|
type: 'button',
|
|
268
|
+
class: 'a-tag-filter',
|
|
268
269
|
innerHTML:
|
|
269
270
|
'<label for=' + optionId + '>' + option.text + closeIcon + '</label>',
|
|
270
271
|
});
|
|
@@ -464,7 +465,7 @@ function Multiselect(element) {
|
|
|
464
465
|
|
|
465
466
|
// Create all our markup but wait to manipulate the DOM just once
|
|
466
467
|
_selectionsDom = create('ul', null, {
|
|
467
|
-
className:
|
|
468
|
+
className: 'm-tag-group',
|
|
468
469
|
});
|
|
469
470
|
|
|
470
471
|
_headerDom = create('header', _containerDom, {
|
|
@@ -148,80 +148,4 @@ select.o-multiselect {
|
|
|
148
148
|
width: 100%;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
&__choices {
|
|
153
|
-
padding-left: 0;
|
|
154
|
-
|
|
155
|
-
// The following is required to make side-by-side LI
|
|
156
|
-
// have a space between them.
|
|
157
|
-
margin-right: math.div(-10px, $base-font-size-px) + em;
|
|
158
|
-
margin-bottom: 0;
|
|
159
|
-
|
|
160
|
-
li {
|
|
161
|
-
display: inline-block;
|
|
162
|
-
|
|
163
|
-
// The following is required to make side-by-side LI
|
|
164
|
-
// have a space between them.
|
|
165
|
-
margin-right: math.div(10px, $base-font-size-px) + em;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
li:last-child {
|
|
169
|
-
margin-bottom: math.div(10px, $base-font-size-px) + em;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
button {
|
|
173
|
-
border: none;
|
|
174
|
-
background: none;
|
|
175
|
-
padding: 0;
|
|
176
|
-
text-align: left;
|
|
177
|
-
|
|
178
|
-
&:focus {
|
|
179
|
-
border-radius: math.div(3px, $size-v) + em;
|
|
180
|
-
outline: 1px dotted var(--teal);
|
|
181
|
-
outline-offset: 1px;
|
|
182
|
-
|
|
183
|
-
label {
|
|
184
|
-
background-color: var(--teal-20);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&:hover label {
|
|
189
|
-
background-color: var(--teal-40);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&:active label {
|
|
193
|
-
background-color: var(--teal-60);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
label {
|
|
198
|
-
display: inline-block;
|
|
199
|
-
padding: 4px 10px;
|
|
200
|
-
padding-right: 25px;
|
|
201
|
-
|
|
202
|
-
background-color: var(--teal-20);
|
|
203
|
-
border-radius: math.div(3px, $size-v) + em;
|
|
204
|
-
border: 1px solid var(--teal);
|
|
205
|
-
color: var(--black);
|
|
206
|
-
cursor: pointer;
|
|
207
|
-
font-size: math.div(16px, $base-font-size-px) + em;
|
|
208
|
-
position: relative;
|
|
209
|
-
|
|
210
|
-
&:hover {
|
|
211
|
-
background-color: var(--teal-40);
|
|
212
|
-
|
|
213
|
-
&::after {
|
|
214
|
-
color: var(--white);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.cf-icon-svg {
|
|
219
|
-
position: absolute;
|
|
220
|
-
top: 4px;
|
|
221
|
-
right: 5px;
|
|
222
|
-
margin-left: 10px;
|
|
223
|
-
fill: var(--black);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
151
|
}
|
|
@@ -37,7 +37,9 @@ describe('Multiselect', () => {
|
|
|
37
37
|
const option = document.querySelector('option');
|
|
38
38
|
option.defaultSelected = true;
|
|
39
39
|
multiselect.init();
|
|
40
|
-
const choices = document.querySelectorAll(
|
|
40
|
+
const choices = document.querySelectorAll(
|
|
41
|
+
'.o-multiselect .m-tag-group li',
|
|
42
|
+
);
|
|
41
43
|
|
|
42
44
|
expect(choices.length).toBe(1);
|
|
43
45
|
expect(choices[0].innerHTML).toContain('Debt collection');
|
|
@@ -52,7 +54,9 @@ describe('Multiselect', () => {
|
|
|
52
54
|
expect(multiselect.getModel().isAtMaxSelections()).toBe(true);
|
|
53
55
|
|
|
54
56
|
// renderTags
|
|
55
|
-
const choices = document.querySelectorAll(
|
|
57
|
+
const choices = document.querySelectorAll(
|
|
58
|
+
'.o-multiselect .m-tag-group li',
|
|
59
|
+
);
|
|
56
60
|
expect(choices.length).toBe(0);
|
|
57
61
|
});
|
|
58
62
|
});
|
|
@@ -36,6 +36,12 @@
|
|
|
36
36
|
.cf-icon-svg {
|
|
37
37
|
pointer-events: none;
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
// If the contents are wrapped in a label, negate the label's display.
|
|
41
|
+
> label {
|
|
42
|
+
display: contents;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
a.a-tag-filter {
|
|
@@ -54,6 +60,7 @@ a.a-tag-filter {
|
|
|
54
60
|
display: flex;
|
|
55
61
|
gap: math.div(5px, $btn-font-size) + rem;
|
|
56
62
|
}
|
|
63
|
+
|
|
57
64
|
@include u-jump-link(
|
|
58
65
|
$jump-link-class: 'a-tag-topic',
|
|
59
66
|
$jump-link-text-class: 'a-tag-topic__text',
|
|
@@ -140,6 +147,7 @@ a.a-tag-filter {
|
|
|
140
147
|
html[lang='ar'] {
|
|
141
148
|
.m-tag-group {
|
|
142
149
|
direction: rtl;
|
|
150
|
+
|
|
143
151
|
// This is needed for right-to-left (RTL) lists.
|
|
144
152
|
padding-right: 0;
|
|
145
153
|
}
|