Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
42 changes: 3 additions & 39 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ repository:

# Either `true` to allow merging pull requests with a merge commit, or `false`
# to prevent merging pull requests with merge commits.
allow_merge_commit: false
allow_merge_commit: true

# Either `true` to allow rebase-merging pull requests, or `false` to prevent
# rebase-merging.
allow_rebase_merge: true
allow_rebase_merge: true

# See https://docs.github.com/en/rest/reference/teams#add-or-update-team-repository-permissions for available options
teams:
# The permission to grant the team. Can be one of:
Expand All @@ -47,39 +47,3 @@ teams:
permission: admin
- name: nonauroteamwriteaccess
permission: push

branches:
- &default_protection
# https://developer.github.com/v3/repos/branches/#update-branch-protection
# Branch Protection settings. Set to null to disable
protection:
# Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
required_pull_request_reviews:
# The number of approvals required. (1-6)
required_approving_review_count: 1
# Dismiss approved reviews automatically when a new commit is pushed.
dismiss_stale_reviews: true
# Blocks merge until code owners have reviewed.
require_code_owner_reviews: true
# Required. Require status checks to pass before merging. Set to null to disable
# Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
dismissal_restrictions:
users: ["blackfalcon"]
# Required. Require status checks to pass before merging. Set to null to disable
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: true
# Required. The list of status checks to require in order to merge into this branch
contexts: ["test (20.x)", "test (22.x)", "license/cla"]
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
enforce_admins: false
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
restrictions: null
# Prevent merge commits from being pushed to matching branches
required_linear_history: true

- name: main
<<: *default_protection

- name: beta
<<: *default_protection
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ coverage/
## Added by Auro CLI migration (github-config-and-gitignore-changes)
demo/*.md
demo/*.min.js

custom-elements.json
2 changes: 2 additions & 0 deletions apiExamples/basic-inverseAppearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<auro-hyperlink appearance="inverse">No href supplied</auro-hyperlink><br>
Welcome to <auro-hyperlink appearance="inverse" href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
2 changes: 0 additions & 2 deletions apiExamples/basic-ondark.html

This file was deleted.

5 changes: 5 additions & 0 deletions apiExamples/cta-external-link-inverseAppearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<auro-hyperlink target="_blank" type="cta" href="https://www.portseattle.org/sea-tac" appearance="inverse" variant="primary">Primary</auro-hyperlink>
<auro-hyperlink target="_blank" type="cta" href="https://www.portseattle.org/sea-tac" appearance="inverse" variant="secondary">Secondary</auro-hyperlink>
<auro-hyperlink target="_blank" type="cta" href="https://www.portseattle.org/sea-tac" appearance="inverse" variant="tertiary">Tertiary</auro-hyperlink>
<auro-hyperlink target="_blank" type="cta" href="https://www.portseattle.org/sea-tac" appearance="inverse" variant="ghost">Ghost</auro-hyperlink>
<auro-hyperlink target="_blank" type="cta" href="https://www.portseattle.org/sea-tac" appearance="inverse" variant="flat">Flat</auro-hyperlink>
5 changes: 0 additions & 5 deletions apiExamples/cta-external-link-ondark.html

This file was deleted.

5 changes: 5 additions & 0 deletions apiExamples/cta-inverseAppearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<auro-hyperlink type="cta" appearance="inverse" href="https://www.alaskaair.com" variant="primary">Primary</auro-hyperlink>
<auro-hyperlink type="cta" appearance="inverse" href="https://www.alaskaair.com" variant="secondary">Secondary</auro-hyperlink>
<auro-hyperlink type="cta" appearance="inverse" href="https://www.alaskaair.com" variant="tertiary">Tertiary</auro-hyperlink>
<auro-hyperlink type="cta" appearance="inverse" href="https://www.alaskaair.com" variant="ghost">Ghost</auro-hyperlink>
<auro-hyperlink type="cta" appearance="inverse" href="https://www.alaskaair.com" variant="flat">Flat</auro-hyperlink>
5 changes: 0 additions & 5 deletions apiExamples/cta-ondark.html

This file was deleted.

4 changes: 2 additions & 2 deletions apiExamples/cta-shape.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<auro-icon customColor category="interface" name="arrow-up"></auro-icon>
</auro-hyperlink>
<auro-hyperlink type="cta" href="https://www.alaskaair.com" shape="circle">
<auro-icon customcolor category="interface" name="account-filled" ondark></auro-icon>
</auro-hyperlink>
<auro-icon customcolor category="interface" name="account-filled" appearance="inverse"></auro-icon>
</auro-hyperlink>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Example link with
<auro-hyperlink
ondark
appearance="inverse"
target="_blank"
href="https://www.alaskaair.com">
external target
Expand All @@ -10,7 +10,7 @@
<br>
Example link with
<auro-hyperlink
ondark
appearance="inverse"
target="_blank"
href="https://www.portseattle.org/sea-tac">
external target
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Example link with
<auro-hyperlink
ondark
appearance="inverse"
target="_blank"
referrerpolicy
href="https://www.portseattle.org/sea-tac">
Expand Down
9 changes: 9 additions & 0 deletions apiExamples/navPattern-inverseAppearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<auro-hyperlink appearance="inverse" href="/last" type="nav">
<auro-icon appearance="inverse" category="interface" name="chevron-left" customColor style="line-height: 1"></auro-icon>
Click here to go back
</auro-hyperlink>

<auro-hyperlink appearance="inverse" href="/next" type="nav">
Click here to go forward
<auro-icon appearance="inverse" category="interface" name="chevron-right" customColor style="line-height: 1"></auro-icon>
</auro-hyperlink>
9 changes: 0 additions & 9 deletions apiExamples/navPattern-ondark.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<auro-hyperlink
ondark
appearance="inverse"
type="nav"
href="https://www.alaskaair.com">
Navigation style link
Expand Down
1 change: 1 addition & 0 deletions apiExamples/roleButton-inverseAppearance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<auro-hyperlink appearance="inverse" href="http://www.alaskaair.com" role="button" id="roleButton-ondark">Cancel button</auro-hyperlink>
1 change: 0 additions & 1 deletion apiExamples/roleButton-ondark.html

This file was deleted.

60 changes: 37 additions & 23 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,40 @@

`<auro-hyperlink>` is a component that wraps an HTML `<a>` element, providing additional styling and behavior.

## Properties

| Property | Attribute | Modifiers | Type | Default | Description |
|------------------|------------------|-----------|-----------|-----------|--------------------------------------------------|
| `download` | `download` | | `boolean` | false | If true, the linked resource will be downloaded when the hyperlink is clicked. |
| `fluid` | `fluid` | | `boolean` | | If true and `type="cta"`, the hyperlink will have a fluid-width UI. |
| `href` | `href` | | `string` | | Defines the URL of the linked page. |
| `ondark` | `ondark` | | `boolean` | false | If true, the hyperlink will be styled for use on a dark background. |
| `referrerpolicy` | `referrerpolicy` | | `boolean` | | If true, sets `strict-origin-when-cross-origin` to control the referrer information sent with requests. |
| `rel` | `rel` | | `string` | | Defines the relationship between the current document and the linked document. |
| `relative` | `relative` | | `boolean` | false | If true, the auto URL re-write feature will be disabled. |
| `role` | | | `String` | | Defines ARIA roles; currently supports `button` for extended experiences. |
| `safeUri` | | readonly | `string` | | Returns a safe URI based on the provided `href` and `relative` parameters.<br />If `href` is truthy, it generates a safe URL using the `safeUrl` function.<br />Otherwise, it returns an empty string. |
| `target` | `target` | | `string` | | Defines where to open the linked document. |
| `type` | `type` | | `string` | | Defines the type of hyperlink; accepts `nav` or `cta`. |
| `variant` | `variant` | | `string` | "primary" | Sets button variant option. |

## CSS Shadow Parts

| Part | Description |
|--------------|--------------------------------------------------|
| `link` | Allows styling to be applied to the `a` element. |
| `targetIcon` | Allows styling to be applied to the icon that appears next to the hyperlink. |

### Properties & Attributes

| Properties | Attributes | Type | Default | Description |
| --- | --- | --- | --- | --- |
role | | String | | Defines ARIA roles; currently supports `button` for extended experiences.
safeUri | | | | Returns a safe URI based on the provided `href` and `relative` parameters.<br>If `href` is truthy, it generates a safe URL using the `safeUrl` function.<br>Otherwise, it returns an empty string.
includesDomain | | | | Checks whether the provided URI (if available) includes the 'http' protocol.<br>If the URI is truthy, it examines whether it contains 'http'.<br>Otherwise, it returns false.
appearance | appearance | string | 'default' | Defines whether the component will be on lighter or darker backgrounds.
download | download | boolean | false | If true, the linked resource will be downloaded when the hyperlink is clicked.
relative | relative | boolean | false | If true, the auto URL re-write feature will be disabled.
ondark | ondark | boolean | false | DEPRECATED - use `appearance` instead.
variant | variant | string | "primary" | Sets button variant option.
href | href | string | | Defines the URL of the linked page.
rel | rel | string | | Defines the relationship between the current document and the linked document.
target | target | string | | Defines where to open the linked document.
type | type | string | | Defines the type of hyperlink; accepts `nav` or `cta`.
fluid | fluid | boolean | | If true and `type="cta"`, the hyperlink will have a fluid-width UI.
referrerpolicy | referrerpolicy | boolean | | If true, sets `strict-origin-when-cross-origin` to control the referrer information sent with requests.


### Methods

| Name | Parameters | Return | Description |
| --- | --- | --- | --- |
register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser.


### CSS Shadow Parts

| Name | Description |
| --- | --- |
link | Allows styling to be applied to the `a` element.
targetIcon | Allows styling to be applied to the icon that appears next to the hyperlink.



24 changes: 12 additions & 12 deletions docs/partials/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -26,7 +26,7 @@

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand All @@ -43,7 +43,7 @@ For link security purposes, when using the `target="_blank"` attribute, this imp
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/external-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/external-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -52,7 +52,7 @@ For link security purposes, when using the `target="_blank"` attribute, this imp

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand All @@ -71,7 +71,7 @@ This will also set the `rel` attribute to `external`.
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/external-referrer-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/external-referrer-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -80,7 +80,7 @@ This will also set the `rel` attribute to `external`.

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external-referrer.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external-referrer-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/external-referrer-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand All @@ -95,7 +95,7 @@ When using `auro-hyperlink` as a navigation style, use `type="nav"` for the alte
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/navStyle-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/navStyle-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -104,7 +104,7 @@ When using `auro-hyperlink` as a navigation style, use `type="nav"` for the alte

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/navStyle.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/navStyle-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/navStyle-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand Down Expand Up @@ -185,7 +185,7 @@ Call to action (CTA) buttons combine hyperlink functionality with button styling
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/cta-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/cta-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -194,7 +194,7 @@ Call to action (CTA) buttons combine hyperlink functionality with button styling

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand All @@ -212,7 +212,7 @@ CTA buttons share the same icon support as the standard hyperlink for targets th
</div>

<div class="exampleWrapper--ondark">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/cta-external-link-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/cta-external-link-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
</div>

Expand All @@ -221,7 +221,7 @@ CTA buttons share the same icon support as the standard hyperlink for targets th

<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta-external-link.html) -->
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta-external-link-ondark.html) -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/cta-external-link-inverseAppearance.html) -->
<!-- AURO-GENERATED-CONTENT:END -->

</auro-accordion>
Expand Down
Loading