Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions packages/components/addon/components/hds/link-to/standalone.hbs

This file was deleted.

151 changes: 0 additions & 151 deletions packages/components/addon/components/hds/link-to/standalone.js

This file was deleted.

20 changes: 15 additions & 5 deletions packages/components/addon/components/hds/link/standalone.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{{! template-lint-disable link-href-attributes }}
{{! we can disable this linting rule because the developer will add the html attribute themselves }}
<a class={{this.classNames}} target="_blank" rel="noopener noreferrer" ...attributes>
<Hds::Interactive
class={{this.classNames}}
@current-when={{@current-when}}
@models={{hds-link-to-models @model @models}}
@query={{hds-link-to-query @query}}
@replace={{@replace}}
@route={{@route}}
@isRouteExternal={{@isRouteExternal}}
@href={{@href}}
@isHrefExternal={{@isHrefExternal}}
target="_blank"
rel="noopener noreferrer"
...attributes
>
{{#if (eq this.iconPosition "leading")}}
<div class="hds-link-standalone__icon">
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
Expand All @@ -16,5 +27,4 @@
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
</div>
{{/if}}
</a>
{{! template-lint-enable link-href-attributes }}
</Hds::Interactive>
7 changes: 7 additions & 0 deletions packages/components/addon/components/hds/link/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ export const COLORS = ['primary', 'secondary'];
export const SIZES = ['small', 'medium', 'large'];

export default class HdsLinkStandaloneComponent extends Component {
constructor() {
super(...arguments);
if (!(this.args.href || this.args.route)) {
assert('@href or @route must be defined for <Hds::Link::Standalone>');
}
}

/**
* @param text
* @type {string}
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions packages/components/tests/acceptance/percy-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ module('Acceptance | Percy test', function (hooks) {
await visit('/components/link/standalone');
await percySnapshot('Link Standalone');

await visit('/components/link-to/standalone');
await percySnapshot('LinkTo Standalone');

assert.ok(true);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<code>Link::Inline</code>
[soon available] within a body of text and
<LinkTo @route="components.link.standalone"><code>Link::Standalone</code></LinkTo>
or
<LinkTo @route="components.link-to.standalone"><code>LinkTo::Standalone</code></LinkTo>
outside of a body of text, ie. on its own or in a list.</p>
<h4>When to use a CTA</h4>
<p>A CTA is a link that looks like a button. It navigates the user to a new destination via a URL or route, but has
Expand Down
1 change: 0 additions & 1 deletion packages/components/tests/dummy/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Router.map(function () {
this.route('cta');
});
this.route('link-to', function () {
this.route('standalone');
this.route('cta');
});
this.route('dropdown');
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/components/tests/dummy/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@import "./pages/db-focus-ring";
@import "./pages/db-icon-tile";
@import "./pages/db-interactive";
@import "./pages/db-link";
@import "./pages/db-link-standalone";
@import "./pages/db-tokens";
@import "./pages/db-typography";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// LINK > STANDALONE

.dummy-link-base-sample {
.dummy-link-standalone-base-sample {
align-items: flex-start;
display: flex;
gap: 0.5rem;
Expand All @@ -11,19 +11,25 @@

}

.dummy-link-max-width-container {
.dummy-link-standalone-max-width-container {
width: 200px;
}

.dummy-link-states-grid {
.dummy-link-standalone-generated-list {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}

.dummy-link-standalone-states-grid {
display: grid;
grid-gap: 0.5rem;
grid-template-columns: repeat(4, 1fr);;
margin: 0;
padding: 0;
width: fit-content;

.dummy-link-states-grid__title {
.dummy-link-standalone-states-grid__title {
grid-column: 1 / 5;
}
}
Loading