chore: 🤖 remove last usage of structure-icons

This commit is contained in:
Randall Morey committed 2021-08-18 13:33:40 -04:00
1 parent 6b9c8192a9
commit 5cdc7af588
34 files changed
+56 -56

No files matched your search

@@ -12,7 +12,7 @@ to trigger actions or to submit forms. Avoid using buttons as simple links to
other routes. For accessibility, use links instead.
```htmlbars
<Rose::Button @style="primary" @iconRight="chevron-right">
<Rose::Button @style="primary" @iconRight="flight/arrow-right-circle-16">
Action
</Rose::Button>
```
@@ -7,9 +7,7 @@ import { text, boolean, select } from '@storybook/addon-knobs';
# Icon
Renders a simple icon from [Structure Icons][structure-icons].
[structure-icons]: https://github.com/hashicorp/structure-icons
Renders a simple icon.
```htmlbars
<Rose::Icon @name={{name}} @size={{size}} />
@@ -26,8 +24,6 @@ Renders a simple icon from [Structure Icons][structure-icons].
{
'flight/check-circle-16': 'flight/check-circle-16',
'flight/clipboard-copy-16': 'flight/clipboard-copy-16',
'unfold-more': 'unfold-more',
'unfold-less': 'unfold-less',
},
'flight/check-circle-16'
),
@@ -12,7 +12,7 @@ Styles supported: primary, secondary, warning, and ghost.
Disabling link button is not supported as it is an action on form components only.
```html
<Rose::LinkButton @route="index" @style="primary" @iconRight="chevron-right">
<Rose::LinkButton @route="index" @style="primary" @iconRight="flight/arrow-right-circle-16">
Content
</Rose::LinkButton>
```
-19
View File
@@ -10,7 +10,6 @@ module.exports = {
this._super.included.apply(this, arguments);
this.includeStyles(app);
this.includeIcons(app);
this.includePublic(app);
this.setupSVGO(app);
},
@@ -41,24 +40,6 @@ module.exports = {
app.options.sassOptions.includePaths.push(styleTree);
},
/**
* Finds the structure-icons folder and includes it into the
* ember-inline-svg addon.
*/
includeIcons(app) {
const iconPackagePath = require.resolve('@hashicorp/structure-icons');
const iconsPath = path.resolve(iconPackagePath, '..');
app.options.svg = app.options.svg || {};
app.options.svg.paths = app.options.svg.paths || [];
app.options.svg.paths.push(iconsPath);
this.addons.forEach((addon) => {
if (addon.name === 'ember-inline-svg') addon.included(app);
});
},
/**
* Finds the public folder and includes it into the ember-inline-svg addon.
*/
-1
View File
@@ -43,7 +43,6 @@
"@ember/test-helpers": "^2.2.8",
"@glimmer/component": "^1.0.3",
"@glimmer/tracking": "^1.0.3",
"@hashicorp/structure-icons": "^1.9.0-0",
"@storybook/addon-actions": "^6.3.1",
"@storybook/addon-docs": "^6.3.1",
"@storybook/addon-knobs": "^6.3.0",
+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.705 16.885L11.125 12.295L15.705 7.705L14.295 6.295L8.295 12.295L14.295 18.295L15.705 16.885Z" />
</svg>

After

Width:  |  Height:  |  Size: 261 B

+3
View File
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.295 7.705L12.875 12.295L8.295 16.885L9.705 18.295L15.705 12.295L9.705 6.295L8.295 7.705Z" />
</svg>

After

Width:  |  Height:  |  Size: 256 B

@@ -0,0 +1,5 @@
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(11.000001907348633, 2.999998092651367)">
<path d="M0.235034 0.204742C0.536173 -0.0796667 1.01085 -0.0661045 1.29526 0.235034L5 4.1577L8.70474 0.235034C8.98915 -0.0661045 9.46383 -0.0796667 9.76497 0.204742C10.0661 0.489151 10.0797 0.963831 9.79526 1.26497L5.54526 5.76497C5.40358 5.91499 5.20635 6 5 6C4.79366 6 4.59642 5.91499 4.45474 5.76497L0.204742 1.26497C-0.0796667 0.963831 -0.0661045 0.489151 0.235034 0.204742Z" fill-rule="EVENODD"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 592 B

+6
View File
@@ -0,0 +1,6 @@
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0, 2)">
<path d="M8 3C6.34315 3 5 4.34315 5 6C5 7.65685 6.34315 9 8 9C9.65685 9 11 7.65685 11 6C11 4.34315 9.65685 3 8 3ZM6.5 6C6.5 5.17157 7.17157 4.5 8 4.5C8.82843 4.5 9.5 5.17157 9.5 6C9.5 6.82843 8.82843 7.5 8 7.5C7.17157 7.5 6.5 6.82843 6.5 6Z" fill-rule="EVENODD"></path>
<path d="M8 0C5.42229 0 3.42961 1.32094 2.11219 2.65017C1.45041 3.31788 0.942159 4.00359 0.595948 4.56404C0.423041 4.84394 0.285811 5.10026 0.18885 5.3148C0.140638 5.42148 0.0984587 5.52645 0.0668514 5.62458C0.041248 5.70407 0 5.84529 0 6C0 6.15471 0.041248 6.29593 0.0668514 6.37542C0.0984587 6.47355 0.140638 6.57852 0.18885 6.6852C0.285811 6.89974 0.423041 7.15606 0.595948 7.43596C0.942159 7.99641 1.45041 8.68212 2.11219 9.34983C3.42961 10.6791 5.42229 12 8 12C10.5777 12 12.5704 10.6791 13.8878 9.34983C14.5496 8.68212 15.0578 7.99641 15.4041 7.43596C15.577 7.15606 15.7142 6.89974 15.8111 6.6852C15.8594 6.57852 15.9015 6.47355 15.9331 6.37542C15.9588 6.29593 16 6.15471 16 6C16 5.84529 15.9588 5.70407 15.9331 5.62458C15.9015 5.52645 15.8594 5.42148 15.8111 5.3148C15.7142 5.10026 15.577 4.84394 15.4041 4.56404C15.0578 4.00359 14.5496 3.31788 13.8878 2.65017C12.5704 1.32094 10.5777 0 8 0ZM1.55573 5.93256C1.54437 5.9577 1.53467 5.98017 1.52646 6C1.53467 6.01983 1.54437 6.0423 1.55573 6.06744C1.62097 6.21178 1.72575 6.41074 1.87209 6.64763C2.16438 7.12078 2.60356 7.71476 3.17758 8.29392C4.33175 9.45844 5.96407 10.5 8 10.5C10.0359 10.5 11.6682 9.45844 12.8224 8.29392C13.3964 7.71476 13.8356 7.12078 14.1279 6.64763C14.2742 6.41074 14.379 6.21178 14.4443 6.06744C14.4556 6.0423 14.4653 6.01983 14.4735 6C14.4653 5.98017 14.4556 5.9577 14.4443 5.93256C14.379 5.78821 14.2742 5.58926 14.1279 5.35237C13.8356 4.87922 13.3964 4.28524 12.8224 3.70608C11.6682 2.54156 10.0359 1.5 8 1.5C5.96407 1.5 4.33175 2.54156 3.17758 3.70608C2.60356 4.28524 2.16438 4.87922 1.87209 5.35237C1.72575 5.58926 1.62097 5.78821 1.55573 5.93256Z" fill-rule="EVENODD"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0, 1)">
<path d="M2.28033 0.21967C1.98744 -0.0732233 1.51256 -0.0732233 1.21967 0.21967C0.926777 0.512563 0.926777 0.987437 1.21967 1.28033L2.88393 2.94459C2.07712 3.61057 1.43871 4.34951 0.976635 4.99386C0.682311 5.4043 0.453137 5.78525 0.294023 6.09686C0.214849 6.25191 0.14874 6.39816 0.100392 6.52818C0.0631165 6.62842 0 6.81065 0 7C0 7.15471 0.041248 7.29593 0.0668514 7.37542C0.0984587 7.47355 0.140638 7.57852 0.18885 7.6852C0.285811 7.89974 0.423041 8.15606 0.595948 8.43596C0.942159 8.99641 1.45041 9.68212 2.11219 10.3498C3.42961 11.6791 5.42229 13 8 13C9.48935 13 10.7863 12.5576 11.8679 11.9286L13.7197 13.7803C14.0126 14.0732 14.4874 14.0732 14.7803 13.7803C15.0732 13.4874 15.0732 13.0126 14.7803 12.7197L10.1346 8.07389C10.1322 8.07147 10.1298 8.06907 10.1273 8.06668C10.127 8.06632 10.1266 8.06596 10.1263 8.06561L6.93749 4.87683C6.93611 4.87541 6.93472 4.87399 6.93332 4.87258C6.92989 4.86911 6.92644 4.86568 6.92295 4.86229L2.28033 0.21967ZM5.40689 5.46756L3.95029 4.01095C3.21115 4.60031 2.62036 5.27568 2.19561 5.86799C1.94039 6.22389 1.7515 6.54093 1.62994 6.779C1.584 6.86898 1.55006 6.94301 1.52646 7C1.53467 7.01982 1.54437 7.04229 1.55573 7.06744C1.62097 7.21178 1.72575 7.41074 1.87209 7.64763C2.16438 8.12078 2.60356 8.71476 3.17758 9.29392C4.33175 10.4584 5.96407 11.5 8 11.5C9.02798 11.5 9.95079 11.2355 10.7626 10.8232L9.53241 9.59307C9.07856 9.85768 8.55257 9.99993 8 9.99993C6.34315 9.99993 5 8.65679 5 6.99993C5 6.44735 5.14228 5.92138 5.40689 5.46756ZM8.39213 8.45279L6.54715 6.60781C6.51636 6.73134 6.5 6.86257 6.5 6.99993C6.5 7.82836 7.17157 8.49993 8 8.49993C8.13738 8.49993 8.26861 8.48358 8.39213 8.45279Z" fill-rule="EVENODD"></path>
<path d="M8 2.5C7.69393 2.5 7.39818 2.52339 7.11269 2.56678C6.70318 2.62902 6.32075 2.3475 6.25851 1.93799C6.19628 1.52848 6.47779 1.14605 6.88731 1.08381C7.24608 1.02928 7.61717 1 8 1C10.5777 1 12.5704 2.32094 13.8878 3.65017C14.5496 4.31788 15.0578 5.00359 15.4041 5.56404C15.577 5.84394 15.7142 6.10026 15.8111 6.3148C15.8594 6.42148 15.9015 6.52645 15.9331 6.62458C15.9588 6.70407 16 6.84529 16 7C16 7.21005 15.9212 7.42007 15.8744 7.53715C15.8127 7.69134 15.7273 7.86911 15.6227 8.06071C15.4128 8.44535 15.1081 8.91815 14.7143 9.41635C14.4574 9.74129 13.9858 9.79647 13.6608 9.5396C13.3359 9.28273 13.2807 8.81107 13.5376 8.48612C13.8808 8.052 14.1381 7.64977 14.306 7.34216C14.384 7.19931 14.4389 7.08369 14.4735 7C14.4653 6.98017 14.4556 6.95771 14.4443 6.93256C14.379 6.78822 14.2742 6.58926 14.1279 6.35237C13.8356 5.87922 13.3964 5.28524 12.8224 4.70608C11.6682 3.54156 10.0359 2.5 8 2.5ZM14.511 7.10403C14.5109 7.10392 14.5101 7.10128 14.509 7.09635L14.5104 7.10133C14.5109 7.10322 14.5111 7.10409 14.511 7.10403Z" fill-rule="EVENODD"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

@@ -0,0 +1,6 @@
<svg viewBox="0 0 16 16" width="16" height="16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0, 0)">
<path d="M7.75 4C8.16421 4 8.5 4.33579 8.5 4.75L8.5 7L10.75 7C11.1642 7 11.5 7.33579 11.5 7.75C11.5 8.16421 11.1642 8.5 10.75 8.5L8.5 8.5L8.5 10.75C8.5 11.1642 8.16421 11.5 7.75 11.5C7.33579 11.5 7 11.1642 7 10.75L7 8.5L4.75 8.5C4.33579 8.5 4 8.16421 4 7.75C4 7.33579 4.33579 7 4.75 7L7 7L7 4.75C7 4.33579 7.33579 4 7.75 4Z" fill-rule="NONZERO"></path>
<path d="M0 7.75C0 3.46979 3.46979 0 7.75 0C12.0302 0 15.5 3.46979 15.5 7.75C15.5 12.0302 12.0302 15.5 7.75 15.5C3.46979 15.5 0 12.0302 0 7.75ZM7.75 1.5C4.29822 1.5 1.5 4.29822 1.5 7.75C1.5 11.2018 4.29822 14 7.75 14C11.2018 14 14 11.2018 14 7.75C14 4.29822 11.2018 1.5 7.75 1.5Z" fill-rule="EVENODD"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 815 B

@@ -17,7 +17,7 @@ module('Integration | Component | rose/badge', function (hooks) {
});
test('it renders an icon using @icon', async function (assert) {
await render(hbs`<Rose::Badge @icon="chevron-right" />`);
await render(hbs`<Rose::Badge @icon="flight/arrow-right-circle-16" />`);
assert.ok(find('.rose-icon'));
});
@@ -7,12 +7,12 @@ module('Integration | Component | rose/icon', function (hooks) {
setupRenderingTest(hooks);
test('it renders', async function (assert) {
await render(hbs`<Rose::Icon @name="unfold-more" />`);
await render(hbs`<Rose::Icon @name="flight/globe-16" />`);
assert.ok(find('svg'));
});
test('it supports optional @size', async function (assert) {
await render(hbs`<Rose::Icon @name="unfold-more" @size="small" />`);
await render(hbs`<Rose::Icon @name="flight/globe-16" @size="small" />`);
assert.ok(find('.small'));
});
});
@@ -43,7 +43,7 @@ module('Integration | Component | rose/link-button', function (hooks) {
test('it supports left icon with @iconRight', async function (assert) {
await render(
hbs`<Rose::LinkButton @route="index" @iconRight="chevron-right" />`
hbs`<Rose::LinkButton @route="index" @iconRight="flight/arrow-right-circle-16" />`
);
assert.ok(find('.rose-icon'));
assert.ok(find('.has-icon-right'));
@@ -115,7 +115,7 @@
{{t 'resources.account.messages.welcome.description'}}
</message.description>
<message.link @route='scopes.scope.auth-methods.auth-method.accounts.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.account.actions.create'}}
</message.link>
</Rose::Message>
@@ -165,7 +165,7 @@
@route='scopes.scope.auth-methods.new'
@query={{hash type='password'}}
>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -58,7 +58,7 @@
<message.link
@route='scopes.scope.credential-stores.credential-store.credential-libraries.new'
>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -78,7 +78,7 @@
{{t 'resources.credential-store.description'}}
</message.description>
<message.link @route='scopes.scope.credential-stores.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -58,7 +58,7 @@
{{t 'resources.group.messages.members.description'}}
</message.description>
<message.link @route='scopes.scope.groups.group.add-members'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.group.actions.add-members'}}
</message.link>
</Rose::Message>
@@ -72,7 +72,7 @@
{{t 'resources.group.description'}}
</message.description>
<message.link @route='scopes.scope.groups.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -70,7 +70,7 @@
</message.description>
{{!--
<message.link @route="scopes.scope.host-catalogs.host-catalog.host-sets.host-set.create-and-add-host">
<Rose::Icon @name="plus-circle-outline" />
<Rose::Icon @name="flight/plus-circle-16" />
{{t "resources.host-set.actions.create-and-add-host"}}
</message.link>
--}}
@@ -52,7 +52,7 @@
<message.link
@route='scopes.scope.host-catalogs.host-catalog.host-sets.new'
>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -54,7 +54,7 @@
{{t 'resources.host.description'}}
</message.description>
<message.link @route='scopes.scope.host-catalogs.host-catalog.hosts.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -81,7 +81,7 @@
{{t 'resources.host-catalog.description'}}
</message.description>
<message.link @route='scopes.scope.host-catalogs.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -67,7 +67,7 @@
{{t 'resources.role.description'}}
</message.description>
<message.link @route='scopes.scope.roles.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -62,7 +62,7 @@
{{t 'resources.role.principal.messages.welcome.description'}}
</message.description>
<message.link @route='scopes.scope.roles.role.add-principals'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.role.principal.actions.add-principals'}}
</message.link>
</Rose::Message>
@@ -62,7 +62,7 @@
{{t 'resources.org.description'}}
</message.description>
<message.link @route='scopes.scope.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -79,7 +79,7 @@
{{t 'resources.project.description'}}
</message.description>
<message.link @route='scopes.scope.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -82,7 +82,7 @@
{{t 'resources.target.description'}}
</message.description>
<message.link @route='scopes.scope.targets.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -82,7 +82,7 @@
<message.link
@route='scopes.scope.targets.target.add-credential-libraries'
>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.target.actions.add-credential-libraries'}}
</message.link>
</Rose::Message>
@@ -68,7 +68,7 @@
{{t 'resources.target.host-set.messages.welcome.description'}}
</message.description>
<message.link @route='scopes.scope.targets.target.add-host-sets'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.target.actions.add-host-sets'}}
</message.link>
</Rose::Message>
@@ -71,7 +71,7 @@
{{t 'resources.user.description'}}
</message.description>
<message.link @route='scopes.scope.users.new'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
</Rose::Message>
@@ -68,7 +68,7 @@
{{t 'resources.user.messages.accounts.description'}}
</message.description>
<message.link @route='scopes.scope.users.user.add-accounts'>
<Rose::Icon @name='plus-circle-outline' />
<Rose::Icon @name='flight/plus-circle-16' />
{{t 'resources.user.actions.add-accounts'}}
</message.link>
</Rose::Message>
@@ -1,7 +1,7 @@
<div class='hidden-secret'>
<Rose::Button
@style='ghost'
@iconOnly={{if this.isHidden 'visibility-show' 'visibility-hide'}}
@iconOnly={{if this.isHidden 'flight/eye-16' 'flight/eye-off-16'}}
{{on 'click' this.toggleSecretVisibility}}
>
{{t 'actions.toggle-secret'}}
-5
View File
@@ -2066,11 +2066,6 @@
resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-1.1.0.tgz#d6dbc7574774b238114582410e8fee0dc3532bdf"
integrity sha512-rR7tJoSwJ2eooOpYGxGGW95sLq6GXUaS1UtWvN7pei6n2/okYvCGld9vsUTvkl2migxbkszsycwtMf/GEc1k1A==
"@hashicorp/structure-icons@^1.9.0-0":
version "1.9.2"
resolved "https://registry.yarnpkg.com/@hashicorp/structure-icons/-/structure-icons-1.9.2.tgz#c75f955b2eec414ecb92f3926c79b4ca01731d3c"
integrity sha512-AffJv0V9npr1EWlM1XrpaKPG9PzddV48OE+jspqy7aRoFZB5++oNnPx4MZQKmFInOljnzNwfktVRkJiQHy7haw==
"@humanwhocodes/config-array@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"