@aurodesignsystem-dev/auro-card 0.0.0-pr130.0

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/README.md ADDED
@@ -0,0 +1,174 @@
1
+ <!--
2
+ The README.md file is a compiled document. No edits should be made directly to this file.
3
+
4
+ README.md is created by running `npm run build:docs`.
5
+
6
+ This file is generated based on a template fetched from
7
+ `https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md`
8
+ and copied to `./componentDocs/README.md` each time the docs are compiled.
9
+
10
+ The following sections are editable by making changes to the following files:
11
+
12
+ | SECTION | DESCRIPTION | FILE LOCATION |
13
+ |------------------------|---------------------------------------------------|-------------------------------------|
14
+ | Description | Description of the component | `./docs/partials/description.md` |
15
+ | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
+ | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
+ -->
19
+
20
+ # Card
21
+
22
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
+ <!-- The below content is automatically added from ./docs/partials/description.md -->
24
+ `<auro-card>` is highly customizable [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) is a type of UI design component that display content and actions about a single topic.
25
+ <!-- AURO-GENERATED-CONTENT:END -->
26
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
27
+ <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
28
+ <!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
29
+ <!-- AURO-GENERATED-CONTENT:END -->
30
+
31
+ ## UI development browser support
32
+
33
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
34
+ For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
35
+
36
+ <!-- AURO-GENERATED-CONTENT:END -->
37
+
38
+ ## Install
39
+
40
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
41
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-card/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-card/actions/workflows/testPublish.yml)
42
+ [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-card?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-card)
43
+ [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-card?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
44
+ ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
45
+
46
+ ```shell
47
+ $ npm i @aurodesignsystem/auro-card
48
+ ```
49
+
50
+ <!-- AURO-GENERATED-CONTENT:END -->
51
+
52
+ ### Design Token CSS Custom Property dependency
53
+
54
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
55
+ The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
56
+
57
+ <!-- AURO-GENERATED-CONTENT:END -->
58
+
59
+ ### Define dependency in project component
60
+
61
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
62
+ Defining the component dependency within each component that is using the `<auro-card>` component.
63
+
64
+ <!-- AURO-GENERATED-CONTENT:END -->
65
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
66
+
67
+ ```js
68
+ import "@aurodesignsystem/auro-card";
69
+ ```
70
+
71
+ <!-- AURO-GENERATED-CONTENT:END -->
72
+ **Reference component in HTML**
73
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
74
+ <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
75
+
76
+ ```html
77
+ <auro-card>
78
+ <img
79
+ slot="image"
80
+ src="https://picsum.photos/300/300?random=0"
81
+ alt="Random insert"/>
82
+ <h3 slot="header">Card Title</h3>
83
+ <p slot="description">
84
+ Context goes here.
85
+ </p>
86
+ <div slot="cta">
87
+ <auro-hyperlink href="/" nav target="_blank">
88
+ More info
89
+ </auro-hyperlink>
90
+ </div>
91
+ </auro-card>
92
+ ```
93
+ <!-- AURO-GENERATED-CONTENT:END -->
94
+
95
+ ## Use CDN
96
+
97
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
98
+ In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
99
+
100
+ ```html
101
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-card@latest/+esm"></script>
102
+ ```
103
+
104
+ <!-- AURO-GENERATED-CONTENT:END -->
105
+
106
+ ## auro-card use cases
107
+
108
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
109
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
110
+ The `<auro-card>` element can be use in a variety of ways, including:
111
+
112
+ - Navigation: Cards can be used for navigation purposes.
113
+ - Featured information: Cards can be used to display featured information or related content.
114
+ - Content containers: Cards can be used to organize information consistently within a page.
115
+ - Grouping information: Cards can be used to group information.
116
+ - Providing a visual hierarchy: Cards can provide a clear visual hierarchy, organizing information into brief, self-contained units.
117
+ - Providing an overview: Cards can serve as an overview and an entry point for more detailed information.
118
+ - Providing a summary: Cards can present a summary and link to additional details.
119
+ <!-- AURO-GENERATED-CONTENT:END -->
120
+
121
+ ## API Code Examples
122
+
123
+ ### Default auro-card
124
+
125
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
126
+ <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
127
+
128
+ ```html
129
+ <auro-card>
130
+ <img
131
+ slot="image"
132
+ src="https://picsum.photos/300/300?random=0"
133
+ alt="Random insert"/>
134
+ <h3 slot="header">Card Title</h3>
135
+ <p slot="description">
136
+ Context goes here.
137
+ </p>
138
+ <div slot="cta">
139
+ <auro-hyperlink href="/" nav target="_blank">
140
+ More info
141
+ </auro-hyperlink>
142
+ </div>
143
+ </auro-card>
144
+ ```
145
+ <!-- AURO-GENERATED-CONTENT:END -->
146
+
147
+ ## Development
148
+
149
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
150
+ In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.
151
+
152
+ Please be sure to review the [contribution guidelines](https://auro.alaskaair.com/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.
153
+
154
+ <!-- AURO-GENERATED-CONTENT:END -->
155
+
156
+ ### Start development environment
157
+
158
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
159
+ Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.
160
+
161
+ ```shell
162
+ $ npm run dev
163
+ ```
164
+
165
+ Open [localhost:8000](http://localhost:8000/)
166
+
167
+ <!-- AURO-GENERATED-CONTENT:END -->
168
+
169
+ ### Testing
170
+
171
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
172
+ Automated tests are required for every Auro component. See `.\test\auro-card.test.js` for the tests for this component. Run `npm run test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
173
+
174
+ <!-- AURO-GENERATED-CONTENT:END -->
package/demo/api.html ADDED
@@ -0,0 +1,60 @@
1
+ <!--
2
+ Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3
+ See LICENSE in the project root for license information.
4
+
5
+ HTML in this document is standardized and NOT to be edited.
6
+ All demo code should be added/edited in ./demo/api.md
7
+
8
+ With the exception of adding custom elements if needed for the demo.
9
+
10
+ ----------------------- DO NOT EDIT -----------------------------
11
+
12
+ -->
13
+
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
+ <title>Auro Web Component Demo | auro-card</title>
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-card's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
34
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
+ </head>
37
+ <body class="auro-markdown">
38
+ <main></main>
39
+
40
+ <script type="module">
41
+ import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
42
+ import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
43
+ fetch('./api.md')
44
+ .then((response) => response.text())
45
+ .then((text) => {
46
+ const rawHtml = marked.parse(text);
47
+ document.querySelector('main').innerHTML = rawHtml;
48
+ Prism.highlightAll();
49
+ });
50
+ </script>
51
+ <script type="module" data-demo-script="true" src="./api.min.js"></script>
52
+
53
+ <!-- If additional elements are needed for the demo, add them here. -->
54
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
55
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/dist/auro-header__bundled.js" type="module"></script>
56
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-avatar@latest/dist/auro-avatar__bundled.js" type="module"></script>
57
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/dist/auro-hyperlink__bundled.js" type="module"></script>
58
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/dist/auro-icon__bundled.js" type="module"></script>
59
+ </body>
60
+ </html>
package/demo/api.js ADDED
@@ -0,0 +1 @@
1
+ import "../src/registered";