diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a7e0ea0..edbd08fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.17.0 +- [add] `building`, `clip`, `truck` icons + ## 1.16.0 - [add] `ai` icon diff --git a/package-lock.json b/package-lock.json index b18319fd..622ea1cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mapbox/assembly", - "version": "1.16.0", + "version": "1.17.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mapbox/assembly", - "version": "1.16.0", + "version": "1.17.0", "license": "ISC", "dependencies": { "autoprefixer": "^10.2.5", diff --git a/package.json b/package.json index 7f4bd7fa..790a92ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mapbox/assembly", - "version": "1.16.0", + "version": "1.17.0", "description": "A CSS framework", "publishConfig": { "access": "public" diff --git a/src/svgs/building.svg b/src/svgs/building.svg new file mode 100644 index 00000000..894da5ac --- /dev/null +++ b/src/svgs/building.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/svgs/clip.svg b/src/svgs/clip.svg new file mode 100644 index 00000000..5dd1a7b3 --- /dev/null +++ b/src/svgs/clip.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/svgs/truck.svg b/src/svgs/truck.svg new file mode 100644 index 00000000..e8556e6f --- /dev/null +++ b/src/svgs/truck.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/test/__snapshots__/build-js.jest.js.snap b/test/__snapshots__/build-js.jest.js.snap index 719d00d5..382944e6 100644 --- a/test/__snapshots__/build-js.jest.js.snap +++ b/test/__snapshots__/build-js.jest.js.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`buildJs with valid svg option 1`] = `"!function(){function C(){document.body.appendChild(l.getElementById("svg-symbols"))}var o=window.Assembly=window.Assembly||{},l=(o._svgSprite='',(new DOMParser).parseFromString(o._svgSprite,"text/xml"));"loading"!==document.readyState?C():document.addEventListener("DOMContentLoaded",C)}(),function(){var C=window.Assembly=window.Assembly||{},o=!1,l="data-assembly-focus-control";function e(){!0!==o&&(o=!0,document.documentElement.setAttribute(l,"visible"))}function d(){!1!==o&&(o=!1,document.documentElement.setAttribute(l,"not-visible"))}document.documentElement.setAttribute(l,"not-visible"),document.addEventListener("mousedown",function(){d()}),document.addEventListener("keydown",function(C){"Tab"!==C.key&&9!==C.keyCode||e()}),C.setFocusState=function(C){((C=void 0===C?!o:C)?e:d)()}}(),function(){var o=window.Assembly=window.Assembly||{},e="http://www.w3.org/2000/svg",d="http://www.w3.org/1999/xlink";function i(C){if(!o.iconExists(C))throw new Error('Icon "'+C+'" does not exist')}o.iconExists=function(C){return!!/^[a-zA-Z0-9-]+$/.test(C)&&(o._svgSprite.includes('id="icon-'+C+'"')||o._svgSprite.includes("id='icon-"+C+"'"))},o.createIcon=function(C){i(C);var o=document.createElementNS(e,"svg"),l=(o.setAttributeNS(null,"class","icon"),document.createElementNS(e,"use"));return l.setAttributeNS(d,"xlink:href","#icon-"+C),o.appendChild(l),o},o.changeIcon=function(C,o){return i(o),C.firstChild.setAttributeNS(d,"xlink:href","#icon-"+o),C}}();"`; +exports[`buildJs with valid svg option 1`] = `"!function(){function C(){document.body.appendChild(l.getElementById("svg-symbols"))}var o=window.Assembly=window.Assembly||{},l=(o._svgSprite='',(new DOMParser).parseFromString(o._svgSprite,"text/xml"));"loading"!==document.readyState?C():document.addEventListener("DOMContentLoaded",C)}(),function(){var C=window.Assembly=window.Assembly||{},o=!1,l="data-assembly-focus-control";function e(){!0!==o&&(o=!0,document.documentElement.setAttribute(l,"visible"))}function d(){!1!==o&&(o=!1,document.documentElement.setAttribute(l,"not-visible"))}document.documentElement.setAttribute(l,"not-visible"),document.addEventListener("mousedown",function(){d()}),document.addEventListener("keydown",function(C){"Tab"!==C.key&&9!==C.keyCode||e()}),C.setFocusState=function(C){((C=void 0===C?!o:C)?e:d)()}}(),function(){var o=window.Assembly=window.Assembly||{},e="http://www.w3.org/2000/svg",d="http://www.w3.org/1999/xlink";function i(C){if(!o.iconExists(C))throw new Error('Icon "'+C+'" does not exist')}o.iconExists=function(C){return!!/^[a-zA-Z0-9-]+$/.test(C)&&(o._svgSprite.includes('id="icon-'+C+'"')||o._svgSprite.includes("id='icon-"+C+"'"))},o.createIcon=function(C){i(C);var o=document.createElementNS(e,"svg"),l=(o.setAttributeNS(null,"class","icon"),document.createElementNS(e,"use"));return l.setAttributeNS(d,"xlink:href","#icon-"+C),o.appendChild(l),o},o.changeIcon=function(C,o){return i(o),C.firstChild.setAttributeNS(d,"xlink:href","#icon-"+o),C}}();"`; exports[`buildJs works 1`] = ` " (function () { var Assembly = window.Assembly = window.Assembly || {}; - Assembly._svgSprite = ''; + Assembly._svgSprite = ''; var parsedSvgSprite = (new DOMParser()).parseFromString(Assembly._svgSprite, 'text/xml'); var appendSvg = function () { document.body.appendChild(parsedSvgSprite.getElementById('svg-symbols'));