@aurodesignsystem/auro-skeleton 5.0.0 → 5.0.2-rc-1686960.1
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/CHANGELOG.md +3 -6
- package/README.md +51 -76
- package/custom-elements.json +105 -0
- package/demo/api.html +1 -1
- package/demo/api.md +159 -65
- package/demo/api.min.js +192 -1
- package/demo/index.html +1 -1
- package/demo/index.md +28 -138
- package/demo/index.min.js +192 -1
- package/demo/readme.md +121 -0
- package/dist/auro-skeleton-DmGY_hvs.js +6 -0
- package/dist/index.d.ts +215 -8
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +23 -13
- package/demo/auro-skeleton.min.js +0 -167
- package/dist/auro-skeleton-cRSCIPzX.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [5.0.2-rc-1686960.1](https://github.com/AlaskaAirlines/auro-skeleton/compare/v5.0.1...v5.0.2-rc-1686960.1) (2026-12-01)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### BREAKING CHANGES
|
|
4
|
+
### Bug Fixes
|
|
8
5
|
|
|
9
|
-
*
|
|
6
|
+
* ship the custom-elements.json the package already exports AB[#1668029](https://github.com/AlaskaAirlines/auro-skeleton/issues/1668029) ([fd52fbd](https://github.com/AlaskaAirlines/auro-skeleton/commit/fd52fbd42e429469314eef56d51d89560e230937))
|
|
10
7
|
|
|
11
8
|
# Semantic Release Automated Changelog
|
|
12
9
|
|
package/README.md
CHANGED
|
@@ -12,135 +12,110 @@ The following sections are editable by making changes to the following files:
|
|
|
12
12
|
| SECTION | DESCRIPTION | FILE LOCATION |
|
|
13
13
|
|------------------------|---------------------------------------------------|-------------------------------------|
|
|
14
14
|
| Description | Description of the component | `./docs/partials/description.md` |
|
|
15
|
-
| Use
|
|
16
|
-
| Additional
|
|
17
|
-
| Component
|
|
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
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Skeleton
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
|
|
24
|
+
Use `<auro-skeleton>` as a placeholder for content that takes a while to load and display. It shows people that data is loading and the page isn't frozen.
|
|
25
25
|
|
|
26
|
-
[Research](https://www.nngroup.com/articles/progress-indicators/)
|
|
26
|
+
[Research by the Nielsen Norman Group](https://www.nngroup.com/articles/progress-indicators/) shows that skeleton states and [loading indicators](https://auro.alaskaair.com/components/auro/loader) improve user satisfaction.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Its shimmer animation shows that the page is still loading, which reduces uncertainty.
|
|
29
29
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
30
30
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
31
31
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
32
32
|
<!-- 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. -->
|
|
33
33
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
34
34
|
|
|
35
|
-
##
|
|
36
|
-
|
|
37
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
|
|
38
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
35
|
+
## Use cases
|
|
39
36
|
|
|
37
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
38
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
39
|
+
Use `<auro-skeleton>` to show loading content inside containers, such as `<auro-card>`, and inside structured lists.
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
41
|
|
|
42
42
|
## Install
|
|
43
43
|
|
|
44
44
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
|
|
45
|
-
[](https://github.com/AlaskaAirlines/auro-skeleton/actions/workflows/release.yml)
|
|
46
46
|
[](https://www.npmjs.com/package/@aurodesignsystem/auro-skeleton)
|
|
47
47
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
48
48
|

|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
$ npm i @aurodesignsystem/auro-skeleton
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
|
-
|
|
56
|
-
### Design Token CSS Custom Property dependency
|
|
57
|
-
|
|
58
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
|
|
59
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
50
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-skeleton</code></pre>
|
|
60
51
|
|
|
61
52
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
62
53
|
|
|
63
|
-
### Define dependency in project
|
|
54
|
+
### Define dependency in project
|
|
64
55
|
|
|
65
56
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
66
|
-
|
|
57
|
+
Import the component in each project that uses `<auro-skeleton>`.
|
|
67
58
|
|
|
68
59
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
69
60
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
70
61
|
|
|
71
|
-
|
|
72
|
-
import "@aurodesignsystem/auro-skeleton";
|
|
73
|
-
```
|
|
62
|
+
<pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-skeleton";</code></pre>
|
|
74
63
|
|
|
75
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
76
|
-
**Reference component in HTML**
|
|
77
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
78
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
79
|
-
|
|
80
|
-
```html
|
|
81
|
-
<auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
82
|
-
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
83
|
-
<auro-skeleton shape="rectangle" style="width: 400px; height: 300px"></auro-skeleton>
|
|
84
|
-
```
|
|
85
64
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
86
65
|
|
|
87
|
-
|
|
66
|
+
### Use CDN
|
|
88
67
|
|
|
89
68
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
90
|
-
|
|
69
|
+
If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
|
|
91
70
|
|
|
92
|
-
|
|
93
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-skeleton@latest/+esm"></script>
|
|
94
|
-
```
|
|
71
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-skeleton@latest/+esm"></script></code></pre>
|
|
95
72
|
|
|
96
73
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
97
74
|
|
|
98
|
-
##
|
|
99
|
-
|
|
100
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
101
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
102
|
-
The `<auro-skeleton>` element can be used on container-based components like `<auro-card>` and other structured lists.
|
|
103
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
104
|
-
|
|
105
|
-
## API Code Examples
|
|
106
|
-
|
|
107
|
-
### Default auro-skeleton
|
|
75
|
+
## Basic example
|
|
108
76
|
|
|
109
77
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
110
78
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
111
79
|
|
|
112
|
-
|
|
113
|
-
<auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
114
|
-
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
115
|
-
<auro-skeleton shape="rectangle" style="width: 400px; height: 300px"></auro-skeleton>
|
|
116
|
-
```
|
|
80
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton style="width: 400px; height: 300px"></auro-skeleton></code></pre>
|
|
117
81
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
82
|
|
|
119
|
-
##
|
|
120
|
-
|
|
121
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
|
|
122
|
-
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.
|
|
83
|
+
## Custom component registration for version management
|
|
123
84
|
|
|
124
|
-
|
|
85
|
+
Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
|
|
86
|
+
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
125
87
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
### Start development environment
|
|
88
|
+
Installing the component as described in the Install section imports the class and registers the component globally for you.
|
|
129
89
|
|
|
130
|
-
|
|
131
|
-
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**.
|
|
90
|
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), register the class manually under a custom element name to avoid conflicts.
|
|
132
91
|
|
|
133
|
-
|
|
134
|
-
$ npm run dev
|
|
135
|
-
```
|
|
92
|
+
To do this, import only the component class and call the `register(name)` method with a unique name:
|
|
136
93
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
94
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
95
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
140
96
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
97
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
98
|
+
import { AuroSkeleton } from '@aurodesignsystem/auro-skeleton/class';
|
|
99
|
+
// Register with a custom name if desired
|
|
100
|
+
AuroSkeleton.register('custom-skeleton');</code></pre>
|
|
145
101
|
|
|
102
|
+
This creates a new custom element, `<custom-skeleton>`, that works exactly like `<auro-skeleton>`, so both can be on the same page without interfering with each other.
|
|
103
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
104
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
105
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
106
|
+
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
107
|
+
<custom-skeleton shape="circle" style="width: 40px; height: 40px"></custom-skeleton>
|
|
108
|
+
<custom-skeleton shape="oval" style="width: 200px; height: 100px;"></custom-skeleton>
|
|
109
|
+
<custom-skeleton shape="rectangle" style="width: 400px; height: 300px"></custom-skeleton>
|
|
146
110
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
111
|
+
</div>
|
|
112
|
+
<auro-accordion alignRight>
|
|
113
|
+
<span slot="trigger">See code</span>
|
|
114
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
115
|
+
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
116
|
+
|
|
117
|
+
<pre class="language-html"><code class="language-html"><custom-skeleton shape="circle" style="width: 40px; height: 40px"></custom-skeleton>
|
|
118
|
+
<custom-skeleton shape="oval" style="width: 200px; height: 100px;"></custom-skeleton>
|
|
119
|
+
<custom-skeleton shape="rectangle" style="width: 400px; height: 300px"></custom-skeleton></code></pre>
|
|
120
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
121
|
+
</auro-accordion>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/auro-skeleton.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "Shows a placeholder shape with a shimmer animation while content loads, so people can tell the page is still working.\n\n**Key capabilities**\n- **Shapes**: Set `shape` to `circle`, `oval`, or `rectangle` to change the outline.\n- **Fills its container**: The skeleton always fills the width of its container unless you set a width, and it needs a height set with CSS.\n- **Screen reader text**: The skeleton always includes the hidden text \"Loading...\" for screen reader users.",
|
|
12
|
+
"name": "AuroSkeleton",
|
|
13
|
+
"members": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "method",
|
|
16
|
+
"name": "register",
|
|
17
|
+
"static": true,
|
|
18
|
+
"parameters": [
|
|
19
|
+
{
|
|
20
|
+
"name": "name",
|
|
21
|
+
"default": "\"auro-skeleton\"",
|
|
22
|
+
"description": "The tag name to register the element under.",
|
|
23
|
+
"optional": true,
|
|
24
|
+
"type": {
|
|
25
|
+
"text": "string"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"description": "Registers the element with the browser under a tag name.",
|
|
30
|
+
"type": {
|
|
31
|
+
"text": "register(name?: string = \"auro-skeleton\") => void"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "field",
|
|
36
|
+
"name": "runtimeUtils",
|
|
37
|
+
"privacy": "private",
|
|
38
|
+
"default": "new AuroLibraryRuntimeUtils()"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"kind": "field",
|
|
42
|
+
"name": "shape",
|
|
43
|
+
"privacy": "public",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "'circle' | 'oval' | 'rectangle'"
|
|
46
|
+
},
|
|
47
|
+
"description": "Sets the skeleton's outline. `circle` makes an ellipse, which is a circle when the width and height match, `oval` gives it fully rounded ends, and `rectangle` gives it slightly rounded corners. When not set, the corners are square.",
|
|
48
|
+
"attribute": "shape"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"attributes": [
|
|
52
|
+
{
|
|
53
|
+
"name": "shape",
|
|
54
|
+
"type": {
|
|
55
|
+
"text": "'circle' | 'oval' | 'rectangle'"
|
|
56
|
+
},
|
|
57
|
+
"description": "Sets the skeleton's outline. `circle` makes an ellipse, which is a circle when the width and height match, `oval` gives it fully rounded ends, and `rectangle` gives it slightly rounded corners. When not set, the corners are square.",
|
|
58
|
+
"fieldName": "shape"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"superclass": {
|
|
62
|
+
"name": "LitElement",
|
|
63
|
+
"package": "lit"
|
|
64
|
+
},
|
|
65
|
+
"tagName": "auro-skeleton",
|
|
66
|
+
"customElement": true,
|
|
67
|
+
"summary": "A loading placeholder with a shimmer animation and circle, oval, or rectangle shapes.",
|
|
68
|
+
"modulePath": "src/auro-skeleton.js"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"exports": [
|
|
72
|
+
{
|
|
73
|
+
"kind": "js",
|
|
74
|
+
"name": "AuroSkeleton",
|
|
75
|
+
"declaration": {
|
|
76
|
+
"name": "AuroSkeleton",
|
|
77
|
+
"module": "src/auro-skeleton.js"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "javascript-module",
|
|
84
|
+
"path": "src/index.js",
|
|
85
|
+
"declarations": [],
|
|
86
|
+
"exports": [
|
|
87
|
+
{
|
|
88
|
+
"kind": "js",
|
|
89
|
+
"name": "AuroSkeleton",
|
|
90
|
+
"declaration": {
|
|
91
|
+
"name": "AuroSkeleton",
|
|
92
|
+
"module": "src/index.js"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "javascript-module",
|
|
99
|
+
"path": "src/registered.js",
|
|
100
|
+
"declarations": [],
|
|
101
|
+
"exports": []
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"package": "@aurodesignsystem/auro-skeleton@5.0.2-rc-1686960.1"
|
|
105
|
+
}
|
package/demo/api.html
CHANGED
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
<script type="module" data-demo-script="true" src="./api.min.js"></script>
|
|
52
52
|
|
|
53
53
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
55
55
|
</body>
|
|
56
56
|
</html>
|
package/demo/api.md
CHANGED
|
@@ -1,100 +1,194 @@
|
|
|
1
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src
|
|
2
|
-
<!-- The below content is automatically added from
|
|
1
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
|
|
2
|
+
<!-- The below content is automatically added from ./../docs/api.md -->
|
|
3
3
|
|
|
4
4
|
# auro-skeleton
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Shows a placeholder shape with a shimmer animation while content loads, so people can tell the page is still working.
|
|
7
|
+
|
|
8
|
+
**Key capabilities**
|
|
9
|
+
- **Shapes**: Set `shape` to `circle`, `oval`, or `rectangle` to change the outline.
|
|
10
|
+
- **Fills its container**: The skeleton always fills the width of its container unless you set a width, and it needs a height set with CSS.
|
|
11
|
+
- **Screen reader text**: The skeleton always includes the hidden text "Loading..." for screen reader users.
|
|
7
12
|
|
|
8
|
-
|
|
13
|
+
### Properties and attributes
|
|
14
|
+
|
|
15
|
+
| Properties | Attributes | Modifiers | Type | Default | Description |
|
|
16
|
+
| ---------- | ---------- | --------- | --------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| shape | shape | | `circle` \| `oval` \| `rectangle` | | Sets the skeleton's outline. `circle` makes an ellipse, which is a circle when the width and height match, `oval` gives it fully rounded ends, and `rectangle` gives it slightly rounded corners. When not set, the corners are square. |
|
|
18
|
+
|
|
19
|
+
### Methods
|
|
9
20
|
|
|
10
|
-
|
|
|
11
|
-
|
|
12
|
-
|
|
|
21
|
+
| Name | Parameters | Return | Description |
|
|
22
|
+
| -------- | ------------------------------------------------------------- | ------ | -------------------------------------------------------- |
|
|
23
|
+
| register | `name` (string) - The tag name to register the element under. | | Registers the element with the browser under a tag name. |
|
|
13
24
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
14
25
|
|
|
15
|
-
##
|
|
26
|
+
## Basic
|
|
27
|
+
|
|
28
|
+
<div class="exampleWrapper">
|
|
29
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
30
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
31
|
+
<auro-skeleton style="width: 400px; height: 300px"></auro-skeleton>
|
|
32
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
33
|
+
</div>
|
|
34
|
+
<auro-accordion alignRight>
|
|
35
|
+
<span slot="trigger">See code</span>
|
|
36
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
37
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
38
|
+
|
|
39
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton style="width: 400px; height: 300px"></auro-skeleton></code></pre>
|
|
40
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
|
+
</auro-accordion>
|
|
16
42
|
|
|
17
|
-
|
|
43
|
+
## Property and attribute examples
|
|
18
44
|
|
|
19
|
-
|
|
45
|
+
### Shape
|
|
20
46
|
|
|
21
|
-
|
|
47
|
+
Use the `shape` attribute to set the skeleton's outline. `circle` makes an ellipse, which is a circle when the width and height match. `oval` gives it fully rounded ends, like a pill, and `rectangle` gives it slightly rounded corners. Without `shape`, the corners are square.
|
|
48
|
+
|
|
49
|
+
### Circle
|
|
22
50
|
|
|
23
51
|
<div class="exampleWrapper">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
27
|
-
<auro-skeleton shape="circle" style="width: 100px; height: 100px"></auro-skeleton>
|
|
28
|
-
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton>
|
|
29
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
30
|
-
</div>
|
|
31
|
-
<auro-accordion alignRight>
|
|
32
|
-
<span slot="trigger">See code</span>
|
|
33
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/api_shape_circle.html) -->
|
|
34
|
-
<!-- The below code snippet is automatically added from ../apiExamples/api_shape_circle.html -->
|
|
35
|
-
|
|
36
|
-
```html
|
|
52
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/circle.html) -->
|
|
53
|
+
<!-- The below content is automatically added from ../apiExamples/circle.html -->
|
|
37
54
|
<auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
38
55
|
<auro-skeleton shape="circle" style="width: 100px; height: 100px"></auro-skeleton>
|
|
39
|
-
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton>
|
|
40
|
-
|
|
56
|
+
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton>
|
|
57
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
|
+
</div>
|
|
59
|
+
<auro-accordion alignRight>
|
|
60
|
+
<span slot="trigger">See code</span>
|
|
61
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/circle.html) -->
|
|
62
|
+
<!-- The below code snippet is automatically added from ../apiExamples/circle.html -->
|
|
63
|
+
|
|
64
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
65
|
+
<auro-skeleton shape="circle" style="width: 100px; height: 100px"></auro-skeleton>
|
|
66
|
+
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton></code></pre>
|
|
41
67
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
42
68
|
</auro-accordion>
|
|
43
|
-
<div class="exampleWrapper">
|
|
44
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/api_shape_oval.html) -->
|
|
45
|
-
<!-- The below content is automatically added from ../apiExamples/api_shape_oval.html -->
|
|
46
|
-
<auro-skeleton shape="oval" style="width: 80px; height: 40px"></auro-skeleton>
|
|
47
|
-
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
48
|
-
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton>
|
|
49
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
50
|
-
</div>
|
|
51
|
-
<auro-accordion alignRight>
|
|
52
|
-
<span slot="trigger">See code</span>
|
|
53
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/api_shape_oval.html) -->
|
|
54
|
-
<!-- The below code snippet is automatically added from ../apiExamples/api_shape_oval.html -->
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
### Oval
|
|
71
|
+
|
|
72
|
+
<div class="exampleWrapper">
|
|
73
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/oval.html) -->
|
|
74
|
+
<!-- The below content is automatically added from ../apiExamples/oval.html -->
|
|
57
75
|
<auro-skeleton shape="oval" style="width: 80px; height: 40px"></auro-skeleton>
|
|
58
76
|
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
59
|
-
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton>
|
|
60
|
-
|
|
77
|
+
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton>
|
|
78
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
79
|
+
</div>
|
|
80
|
+
<auro-accordion alignRight>
|
|
81
|
+
<span slot="trigger">See code</span>
|
|
82
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/oval.html) -->
|
|
83
|
+
<!-- The below code snippet is automatically added from ../apiExamples/oval.html -->
|
|
84
|
+
|
|
85
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton shape="oval" style="width: 80px; height: 40px"></auro-skeleton>
|
|
86
|
+
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
87
|
+
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton></code></pre>
|
|
61
88
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
62
89
|
</auro-accordion>
|
|
63
|
-
<div class="exampleWrapper">
|
|
64
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/api_shape_rectangle.html) -->
|
|
65
|
-
<!-- The below content is automatically added from ../apiExamples/api_shape_rectangle.html -->
|
|
66
|
-
<auro-skeleton shape="rectangle" style="width: 100px; height: 50px"></auro-skeleton>
|
|
67
|
-
<auro-skeleton shape="rectangle" style="width: 400px; height: 150px"></auro-skeleton>
|
|
68
|
-
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton>
|
|
69
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
70
|
-
</div>
|
|
71
|
-
<auro-accordion alignRight>
|
|
72
|
-
<span slot="trigger">See code</span>
|
|
73
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/api_shape_rectangle.html) -->
|
|
74
|
-
<!-- The below code snippet is automatically added from ../apiExamples/api_shape_rectangle.html -->
|
|
75
90
|
|
|
76
|
-
|
|
91
|
+
### Rectangle
|
|
92
|
+
|
|
93
|
+
<div class="exampleWrapper">
|
|
94
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/rectangle.html) -->
|
|
95
|
+
<!-- The below content is automatically added from ../apiExamples/rectangle.html -->
|
|
77
96
|
<auro-skeleton shape="rectangle" style="width: 100px; height: 50px"></auro-skeleton>
|
|
78
97
|
<auro-skeleton shape="rectangle" style="width: 400px; height: 150px"></auro-skeleton>
|
|
79
|
-
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton>
|
|
80
|
-
|
|
98
|
+
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton>
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
100
|
+
</div>
|
|
101
|
+
<auro-accordion alignRight>
|
|
102
|
+
<span slot="trigger">See code</span>
|
|
103
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/rectangle.html) -->
|
|
104
|
+
<!-- The below code snippet is automatically added from ../apiExamples/rectangle.html -->
|
|
105
|
+
|
|
106
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton shape="rectangle" style="width: 100px; height: 50px"></auro-skeleton>
|
|
107
|
+
<auro-skeleton shape="rectangle" style="width: 400px; height: 150px"></auro-skeleton>
|
|
108
|
+
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton></code></pre>
|
|
81
109
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
82
110
|
</auro-accordion>
|
|
83
111
|
|
|
84
|
-
|
|
112
|
+
## Common usage patterns
|
|
113
|
+
|
|
114
|
+
## Be creative
|
|
85
115
|
|
|
86
|
-
|
|
116
|
+
Use `<auro-skeleton>` anywhere data appears once it loads. In the following example, skeletons hold the place of table rows until their data arrives.
|
|
87
117
|
|
|
88
|
-
|
|
89
|
-
<!--
|
|
118
|
+
<div class="exampleWrapper">
|
|
119
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/table-example.html) -->
|
|
120
|
+
<!-- The below content is automatically added from ../apiExamples/table-example.html -->
|
|
121
|
+
<table class="auro_table">
|
|
122
|
+
<thead>
|
|
123
|
+
<tr>
|
|
124
|
+
<th>The table header</th>
|
|
125
|
+
<th>The table header</th>
|
|
126
|
+
</tr>
|
|
127
|
+
</thead>
|
|
128
|
+
<tbody>
|
|
129
|
+
<tr>
|
|
130
|
+
<td colspan="2">
|
|
131
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
132
|
+
</td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr>
|
|
135
|
+
<td colspan="2">
|
|
136
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
137
|
+
</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td colspan="2">
|
|
141
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
</tbody>
|
|
145
|
+
</table>
|
|
146
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
147
|
+
</div>
|
|
148
|
+
<auro-accordion alignRight>
|
|
149
|
+
<span slot="trigger">See code</span>
|
|
150
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/table-example.html) -->
|
|
151
|
+
<!-- The below code snippet is automatically added from ../apiExamples/table-example.html -->
|
|
90
152
|
|
|
91
|
-
|
|
92
|
-
|
|
153
|
+
<pre class="language-html"><code class="language-html"><table class="auro_table">
|
|
154
|
+
<thead>
|
|
155
|
+
<tr>
|
|
156
|
+
<th>The table header</th>
|
|
157
|
+
<th>The table header</th>
|
|
158
|
+
</tr>
|
|
159
|
+
</thead>
|
|
160
|
+
<tbody>
|
|
161
|
+
<tr>
|
|
162
|
+
<td colspan="2">
|
|
163
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td colspan="2">
|
|
168
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
169
|
+
</td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td colspan="2">
|
|
173
|
+
<auro-skeleton shape="oval" style="height: 20px;"></auro-skeleton>
|
|
174
|
+
</td>
|
|
175
|
+
</tr>
|
|
176
|
+
</tbody>
|
|
177
|
+
</table></code></pre>
|
|
178
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
179
|
+
</auro-accordion>
|
|
180
|
+
|
|
181
|
+
## Restyle with CSS custom properties
|
|
93
182
|
|
|
94
|
-
|
|
183
|
+
Restyle the component by changing the values of the following tokens.
|
|
184
|
+
|
|
185
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
186
|
+
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
187
|
+
|
|
188
|
+
<pre class="language-scss"><code class="language-scss">@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
189
|
+
:host {
|
|
95
190
|
--ds-auro-skeleton-container-color: var(--ds-advanced-color-skeleton-background, #{v.$ds-advanced-color-skeleton-background});
|
|
96
191
|
--ds-auro-skeleton-container-gradient-color-one: var(--ds-advanced-color-skeleton-background, #{v.$ds-advanced-color-skeleton-background});
|
|
97
192
|
--ds-auro-skeleton-container-gradient-color-two: var(--ds-advanced-color-skeleton-wave, #{v.$ds-advanced-color-skeleton-wave});
|
|
98
|
-
}
|
|
99
|
-
```
|
|
193
|
+
}</code></pre>
|
|
100
194
|
<!-- AURO-GENERATED-CONTENT:END -->
|