@financial-times/n-myft-ui 28.2.3 → 28.2.4

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/myft/main.scss CHANGED
@@ -239,13 +239,12 @@ $spacing-unit: 20px;
239
239
  color: oColorsByName('black-80');
240
240
 
241
241
  padding-left: 0;
242
- margin-left: -8px;
243
242
 
244
243
  &:hover {
245
244
  text-decoration: underline;
246
245
  }
247
246
 
248
- &::before {
247
+ &-collapsed::before {
249
248
  content: '';
250
249
  @include oIconsContent(
251
250
  'plus',
@@ -255,6 +254,7 @@ $spacing-unit: 20px;
255
254
  );
256
255
  vertical-align: middle;
257
256
  margin-top: -2px;
257
+ margin-left: -8px;
258
258
  }
259
259
  }
260
260
 
@@ -297,7 +297,7 @@ function ContentElement (hasDescription, onClick) {
297
297
 
298
298
  const content = `
299
299
  <div class="myft-ui-create-list-variant-footer">
300
- <button class="myft-ui-create-list-variant-add" data-trackable="add-to-new-list" text="add to new list">Add to a new list</button>
300
+ <button class="myft-ui-create-list-variant-add myft-ui-create-list-variant-add-collapsed" data-trackable="add-to-new-list" text="add to new list">Add to a new list</button>
301
301
  ${hasDescription ? `
302
302
  ${description}
303
303
  ` : ''}
@@ -321,7 +321,13 @@ function ContentElement (hasDescription, onClick) {
321
321
  }
322
322
 
323
323
  function restoreFormHandler () {
324
- return contentElement.addEventListener('click', onClick, { once: true });
324
+ contentElement.querySelector('.myft-ui-create-list-variant-add').classList.add('myft-ui-create-list-variant-add-collapsed');
325
+ return contentElement.addEventListener('click', clickHandler, { once: true });
326
+ }
327
+
328
+ function clickHandler (event) {
329
+ contentElement.querySelector('.myft-ui-create-list-variant-add').classList.remove('myft-ui-create-list-variant-add-collapsed');
330
+ onClick(event);
325
331
  }
326
332
 
327
333
  return [contentElement, removeDescription, attachDescription, restoreFormHandler];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-myft-ui",
3
- "version": "28.2.3",
3
+ "version": "28.2.4",
4
4
  "description": "Client side component for interaction with myft",
5
5
  "main": "server.js",
6
6
  "scripts": {