@ons/design-system 72.0.0 → 72.1.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/components/autosuggest/_macro.njk +1 -0
- package/components/autosuggest/_macro.spec.js +7 -1
- package/components/autosuggest/autosuggest.spec.js +3 -1
- package/components/autosuggest/autosuggest.ui.js +39 -10
- package/components/autosuggest/example-autosuggest-country.njk +2 -1
- package/components/autosuggest/fuse-config.js +7 -2
- package/components/checkboxes/_checkbox-macro.njk +20 -0
- package/components/checkboxes/_macro.njk +5 -0
- package/components/checkboxes/_macro.spec.js +35 -0
- package/components/checkboxes/example-checkboxes-with-revealed-text-area-expanded.njk +68 -0
- package/components/checkboxes/example-checkboxes-with-revealed-text-area.njk +67 -0
- package/components/section-navigation/_section-navigation.scss +1 -2
- package/components/summary/_macro.njk +73 -78
- package/components/summary/_macro.spec.js +5 -15
- package/components/summary/_summary.scss +16 -11
- package/css/main.css +1 -1
- package/js/analytics.js +1 -1
- package/package.json +5 -6
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/objects/_page.scss +1 -1
|
@@ -399,12 +399,6 @@ describe('macro: summary', () => {
|
|
|
399
399
|
expect($('#row-id-3').length).toBe(1);
|
|
400
400
|
});
|
|
401
401
|
|
|
402
|
-
it('has the correct class for each row when there is a `valueList`', () => {
|
|
403
|
-
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
|
|
404
|
-
|
|
405
|
-
expect($('.ons-summary__row--has-values').length).toBe(5);
|
|
406
|
-
});
|
|
407
|
-
|
|
408
402
|
it('has custom row `titleAttributes`', () => {
|
|
409
403
|
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
|
|
410
404
|
|
|
@@ -462,18 +456,16 @@ describe('macro: summary', () => {
|
|
|
462
456
|
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
|
|
463
457
|
|
|
464
458
|
expect(
|
|
465
|
-
$('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-
|
|
466
|
-
.text()
|
|
467
|
-
.trim(),
|
|
459
|
+
$('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values .ons-summary__text').text().trim(),
|
|
468
460
|
).toBe('row value 1');
|
|
469
461
|
});
|
|
470
462
|
|
|
471
463
|
it('displays the `other` text', () => {
|
|
472
464
|
const $ = cheerio.load(renderComponent('summary', EXAMPLE_SUMMARY_BASIC));
|
|
473
465
|
|
|
474
|
-
expect(
|
|
475
|
-
|
|
476
|
-
)
|
|
466
|
+
expect($('.ons-summary__items .ons-summary__item:nth-of-type(1) .ons-summary__values ul li').text().trim()).toBe(
|
|
467
|
+
'other value',
|
|
468
|
+
);
|
|
477
469
|
});
|
|
478
470
|
|
|
479
471
|
it('wraps the `valueList` in a ul if multiple values provided', () => {
|
|
@@ -601,9 +593,7 @@ describe('macro: summary', () => {
|
|
|
601
593
|
}),
|
|
602
594
|
);
|
|
603
595
|
|
|
604
|
-
expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-
|
|
605
|
-
' — row value 2',
|
|
606
|
-
);
|
|
596
|
+
expect($('.ons-summary__items .ons-summary__item:nth-of-type(2) .ons-summary__item-title span').text()).toBe(' — row value 2');
|
|
607
597
|
});
|
|
608
598
|
});
|
|
609
599
|
|
|
@@ -18,12 +18,10 @@ $hub-row-spacing: 1.3rem;
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
&
|
|
21
|
+
&__item {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin: 0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
&__item {
|
|
24
|
+
flex-wrap: wrap;
|
|
27
25
|
&:not(:last-child),
|
|
28
26
|
&:not(.ons-summary__group--card .ons-summary__item):nth-of-type(1) {
|
|
29
27
|
border-bottom: 1px solid var(--ons-color-borders);
|
|
@@ -51,6 +49,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
51
49
|
&__row-title {
|
|
52
50
|
padding: $summary-row-spacing 0;
|
|
53
51
|
text-align: left;
|
|
52
|
+
flex: 0 0 100%;
|
|
54
53
|
}
|
|
55
54
|
// reduces the gap between row title and summary title when there is no group title
|
|
56
55
|
&__title + &__group &__row-title--no-group-title {
|
|
@@ -95,12 +94,13 @@ $hub-row-spacing: 1.3rem;
|
|
|
95
94
|
width: 1px;
|
|
96
95
|
}
|
|
97
96
|
|
|
98
|
-
//
|
|
97
|
+
// Row Modifiers
|
|
99
98
|
&__item--error & {
|
|
100
99
|
&__row-title--error {
|
|
101
100
|
color: var(--ons-color-errors);
|
|
102
101
|
font-weight: $font-weight-bold;
|
|
103
102
|
padding: $summary-row-spacing $summary-col-spacing;
|
|
103
|
+
flex: 0 0 100%;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&__row-title,
|
|
@@ -159,7 +159,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
&
|
|
162
|
+
&__item {
|
|
163
163
|
flex-direction: column;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -172,14 +172,19 @@ $hub-row-spacing: 1.3rem;
|
|
|
172
172
|
flex: 5 1 33%;
|
|
173
173
|
padding-top: $summary-row-spacing;
|
|
174
174
|
vertical-align: top;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&__item-title,
|
|
178
|
+
&__values {
|
|
179
|
+
padding-right: $summary-col-spacing;
|
|
178
180
|
}
|
|
179
181
|
|
|
180
182
|
&__actions {
|
|
181
183
|
display: flex;
|
|
182
184
|
justify-content: right;
|
|
185
|
+
& :not(.ons-summary__item-title--error) {
|
|
186
|
+
padding-right: 0;
|
|
187
|
+
}
|
|
183
188
|
}
|
|
184
189
|
|
|
185
190
|
&__button {
|
|
@@ -215,7 +220,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
215
220
|
}
|
|
216
221
|
.ons-summary__link {
|
|
217
222
|
padding: 0 1.25rem;
|
|
218
|
-
|
|
223
|
+
&-container {
|
|
219
224
|
padding: 1rem 0;
|
|
220
225
|
border-top: 1px solid var(--ons-color-borders-light);
|
|
221
226
|
}
|
|
@@ -225,7 +230,7 @@ $hub-row-spacing: 1.3rem;
|
|
|
225
230
|
padding: 0.5rem 1.25rem 0;
|
|
226
231
|
}
|
|
227
232
|
.ons-summary__placeholder + .ons-summary__link {
|
|
228
|
-
|
|
233
|
+
&-container {
|
|
229
234
|
border-top: 0;
|
|
230
235
|
}
|
|
231
236
|
}
|