@financial-times/n-myft-ui 40.1.4 → 40.1.6
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/.toolkitstate/ci.json +2 -2
- package/demos/src/demo.scss +17 -0
- package/demos/templates/demo.html +36 -0
- package/myft/main.scss +17 -4
- package/myft/ui/lists.js +1 -1
- package/package.json +1 -1
package/.toolkitstate/ci.json
CHANGED
package/demos/src/demo.scss
CHANGED
|
@@ -78,3 +78,20 @@ $system-code: "n-myft-ui-demo";
|
|
|
78
78
|
margin: 12px 0;
|
|
79
79
|
color: var(--o3-color-palette-black-70);
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
.demo-save-popup {
|
|
83
|
+
padding: 12px 0 20px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.myft-ui-create-list--demo {
|
|
87
|
+
position: static;
|
|
88
|
+
top: auto;
|
|
89
|
+
left: auto;
|
|
90
|
+
width: 340px;
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
z-index: 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.myft-ui-create-list--demo .o-overlay__content {
|
|
96
|
+
overflow: visible;
|
|
97
|
+
}
|
|
@@ -120,6 +120,42 @@
|
|
|
120
120
|
{{> n-myft-ui/components/save-for-later/save-for-later isSaved=true saveButtonWithIcon=true }}
|
|
121
121
|
{{/saveButton}}
|
|
122
122
|
|
|
123
|
+
<h3 class="demo-section__title">
|
|
124
|
+
Article Save popup
|
|
125
|
+
</h3>
|
|
126
|
+
<div class="demo-save-popup">
|
|
127
|
+
<div class="o-overlay myft-ui-create-list myft-ui-create-list--demo">
|
|
128
|
+
<div class="o-overlay__heading">
|
|
129
|
+
<span class="o-overlay__title">
|
|
130
|
+
<span class="myft-ui-create-list-heading">Added to <a href="https://www.ft.com/myft/saved-articles">saved articles</a> in <span class="myft-ui-create-list-icon"><span class="myft-ui-create-list-icon-visually-hidden">my FT</span></span></span>
|
|
131
|
+
</span>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="o-overlay__content">
|
|
134
|
+
<div class="myft-ui-create-list-lists o-forms-field o-forms-field--optional" role="group" aria-labelledby="demo-add-to-list-label">
|
|
135
|
+
<span id="demo-add-to-list-label" class="myft-ui-create-list-lists-text">Add to list</span>
|
|
136
|
+
<span class="myft-ui-create-list-lists-container o-forms-input o-forms-input--checkbox">
|
|
137
|
+
<label>
|
|
138
|
+
<input type="checkbox" name="default" value="markets" checked>
|
|
139
|
+
<span class="o-forms-input__label">Markets</span>
|
|
140
|
+
</label>
|
|
141
|
+
<label>
|
|
142
|
+
<input type="checkbox" name="default" value="weekend-reads">
|
|
143
|
+
<span class="o-forms-input__label">Weekend reads</span>
|
|
144
|
+
</label>
|
|
145
|
+
<label>
|
|
146
|
+
<input type="checkbox" name="default" value="long-reads">
|
|
147
|
+
<span class="o-forms-input__label">Long reads</span>
|
|
148
|
+
</label>
|
|
149
|
+
</span>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="myft-ui-create-list-footer">
|
|
152
|
+
<button class="myft-ui-create-list-add myft-ui-create-list-add-collapsed" type="button" aria-expanded="false">Add to a new list</button>
|
|
153
|
+
<p class="myft-ui-create-list-add-description">Lists are a simple way to curate your content</p>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
123
159
|
<h3 class="demo-section__title">
|
|
124
160
|
Pin button
|
|
125
161
|
</h3>
|
package/myft/main.scss
CHANGED
|
@@ -16,6 +16,9 @@ $n-notification-is-silent: false !default;
|
|
|
16
16
|
@import '../components/jsx/follow-plus-instant-alerts/main';
|
|
17
17
|
@import '../components/jsx/preferences-modal/main';
|
|
18
18
|
|
|
19
|
+
// include oOverlay to load the overlay styles, which are used by myft lists
|
|
20
|
+
@include oOverlay();
|
|
21
|
+
|
|
19
22
|
// TODO Fix below
|
|
20
23
|
$spacing-unit: 20px;
|
|
21
24
|
|
|
@@ -198,7 +201,7 @@ $spacing-unit: 20px;
|
|
|
198
201
|
.myft-ui-create-list {
|
|
199
202
|
border-radius: 10px;
|
|
200
203
|
border: 1px solid var(--o3-color-palette-black-5);
|
|
201
|
-
background: var(--o3-color-palette-white
|
|
204
|
+
background: var(--o3-color-palette-white);
|
|
202
205
|
|
|
203
206
|
&-content {
|
|
204
207
|
display: flex;
|
|
@@ -228,11 +231,12 @@ $spacing-unit: 20px;
|
|
|
228
231
|
|
|
229
232
|
border-radius: 10px;
|
|
230
233
|
border: 1px solid var(--o3-color-palette-black-5);
|
|
231
|
-
background: var(--o3-color-palette-white
|
|
234
|
+
background: var(--o3-color-palette-white);
|
|
232
235
|
|
|
233
236
|
.o-overlay__heading {
|
|
234
237
|
border-radius: 10px 10px 0 0;
|
|
235
|
-
background: var(--o3-color-palette-white
|
|
238
|
+
background: var(--o3-color-palette-white);
|
|
239
|
+
border-bottom: 1px solid #D4D4D6;
|
|
236
240
|
|
|
237
241
|
line-height: var(--o3-font-lineheight-metric2-1);
|
|
238
242
|
font-size: var(--o3-font-size-metric2-1);
|
|
@@ -246,6 +250,7 @@ $spacing-unit: 20px;
|
|
|
246
250
|
font-size: var(--o3-font-size-metric2-negative-1);
|
|
247
251
|
font-family: var(--o3-font-family-metric);
|
|
248
252
|
color: var(--o3-color-palette-black-80);
|
|
253
|
+
background: var(--o3-color-palette-white);
|
|
249
254
|
padding: 0;
|
|
250
255
|
}
|
|
251
256
|
|
|
@@ -313,7 +318,8 @@ $spacing-unit: 20px;
|
|
|
313
318
|
}
|
|
314
319
|
|
|
315
320
|
&-footer {
|
|
316
|
-
border-top: 1px solid
|
|
321
|
+
border-top: 1px solid #D4D4D6;
|
|
322
|
+
background: var(--o3-color-palette-white);
|
|
317
323
|
padding: var(--o3-spacing-2xs);
|
|
318
324
|
}
|
|
319
325
|
|
|
@@ -387,6 +393,7 @@ $spacing-unit: 20px;
|
|
|
387
393
|
}
|
|
388
394
|
|
|
389
395
|
&-lists {
|
|
396
|
+
background: var(--o3-color-palette-white);
|
|
390
397
|
padding: var(--o3-spacing-2xs) var(--o3-spacing-2xs) 0;
|
|
391
398
|
|
|
392
399
|
line-height: var(--o3-font-lineheight-metric2-0);
|
|
@@ -410,6 +417,12 @@ $spacing-unit: 20px;
|
|
|
410
417
|
}
|
|
411
418
|
}
|
|
412
419
|
|
|
420
|
+
.o-forms-input--checkbox {
|
|
421
|
+
input[type='checkbox']:not(:checked) + .o-forms-input__label::before {
|
|
422
|
+
border-color: var(--o3-color-use-case-body-text);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
413
426
|
&-label {
|
|
414
427
|
margin-top: 10px;
|
|
415
428
|
}
|
package/myft/ui/lists.js
CHANGED
|
@@ -159,7 +159,7 @@ async function openSaveArticleToList (contentId, options = {}) {
|
|
|
159
159
|
// whenever we close the overlay we want to return the focuse to the trigger element
|
|
160
160
|
closeBtn.addEventListener('click', returnFocusToRefocusElement);
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
});
|
|
164
164
|
|
|
165
165
|
createListOverlay.wrapper.addEventListener('oOverlay.destroy', () => {
|