@aurodesignsystem/auro-skeleton 5.0.1 → 5.0.2
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 -3
- package/README.md +35 -48
- package/custom-elements.json +105 -0
- package/demo/api.md +112 -120
- package/demo/api.min.js +192 -1
- package/demo/index.md +17 -19
- package/demo/index.min.js +192 -1
- package/demo/readme.md +121 -0
- package/dist/index.d.ts +92 -46
- package/package.json +7 -5
- package/demo/auro-skeleton.min.js +0 -185
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## [5.0.
|
|
1
|
+
## [5.0.2](https://github.com/AlaskaAirlines/auro-skeleton/compare/v5.0.1...v5.0.2) (2026-12-01)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
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))
|
|
7
7
|
|
|
8
8
|
# Semantic Release Automated Changelog
|
|
9
9
|
|
package/README.md
CHANGED
|
@@ -12,31 +12,31 @@ 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
|
-
## Use
|
|
35
|
+
## Use cases
|
|
36
36
|
|
|
37
37
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
38
38
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
39
|
-
|
|
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
|
|
@@ -47,88 +47,75 @@ The `<auro-skeleton>` element can be used on container-based components like `<a
|
|
|
47
47
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
48
48
|

|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
$ npm i @aurodesignsystem/auro-skeleton
|
|
52
|
-
```
|
|
50
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-skeleton</code></pre>
|
|
53
51
|
|
|
54
52
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
53
|
|
|
56
|
-
### Define
|
|
54
|
+
### Define dependency in project
|
|
57
55
|
|
|
58
56
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
59
|
-
|
|
57
|
+
Import the component in each project that uses `<auro-skeleton>`.
|
|
60
58
|
|
|
61
59
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
62
60
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
import "@aurodesignsystem/auro-skeleton";
|
|
66
|
-
```
|
|
62
|
+
<pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-skeleton";</code></pre>
|
|
67
63
|
|
|
68
64
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
69
65
|
|
|
70
66
|
### Use CDN
|
|
71
67
|
|
|
72
68
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
73
|
-
|
|
69
|
+
If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-skeleton@latest/+esm"></script>
|
|
77
|
-
```
|
|
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>
|
|
78
72
|
|
|
79
73
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
74
|
|
|
81
|
-
## Basic
|
|
75
|
+
## Basic example
|
|
82
76
|
|
|
83
77
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
84
78
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
85
79
|
|
|
86
|
-
|
|
87
|
-
<auro-skeleton style="width: 400px; height: 300px"></auro-skeleton>
|
|
88
|
-
```
|
|
80
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton style="width: 400px; height: 300px"></auro-skeleton></code></pre>
|
|
89
81
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
90
82
|
|
|
91
|
-
## Custom
|
|
83
|
+
## Custom component registration for version management
|
|
92
84
|
|
|
93
|
-
|
|
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.
|
|
94
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.
|
|
95
87
|
|
|
96
|
-
|
|
88
|
+
Installing the component as described in the Install section imports the class and registers the component globally for you.
|
|
97
89
|
|
|
98
|
-
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),
|
|
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.
|
|
99
91
|
|
|
100
|
-
|
|
92
|
+
To do this, import only the component class and call the `register(name)` method with a unique name:
|
|
101
93
|
|
|
102
94
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
103
95
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
104
96
|
|
|
105
|
-
|
|
106
|
-
// Import the class only
|
|
97
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
107
98
|
import { AuroSkeleton } from '@aurodesignsystem/auro-skeleton/class';
|
|
99
|
+
// Register with a custom name if desired
|
|
100
|
+
AuroSkeleton.register('custom-skeleton');</code></pre>
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
AuroSkeleton.register('custom-skeleton');
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
This will create a new custom element `<custom-skeleton>` that behaves exactly like `<auro-skeleton>`, allowing both to coexist on the same page without interfering with each other.
|
|
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.
|
|
114
103
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
115
104
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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>
|
|
110
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
111
|
</div>
|
|
123
112
|
<auro-accordion alignRight>
|
|
124
|
-
|
|
113
|
+
<span slot="trigger">See code</span>
|
|
125
114
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
126
115
|
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
127
116
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<custom-skeleton shape="rectangle" style="width: 400px; height: 300px"></custom-skeleton>
|
|
132
|
-
```
|
|
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>
|
|
133
120
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
134
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"
|
|
105
|
+
}
|
package/demo/api.md
CHANGED
|
@@ -3,200 +3,192 @@
|
|
|
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
|
-
### Properties
|
|
13
|
+
### Properties and attributes
|
|
9
14
|
|
|
10
|
-
| Properties | Attributes | Modifiers | Type | Default | Description
|
|
11
|
-
| ---------- | ---------- | --------- | --------------------------------- | ------- |
|
|
12
|
-
| shape | shape | | `circle` \| `oval` \| `rectangle` | |
|
|
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. |
|
|
13
18
|
|
|
14
19
|
### Methods
|
|
15
20
|
|
|
16
|
-
| Name | Parameters
|
|
17
|
-
| -------- |
|
|
18
|
-
| register | `name` (string) - The name
|
|
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. |
|
|
19
24
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
20
25
|
|
|
21
26
|
## Basic
|
|
22
27
|
|
|
23
28
|
<div class="exampleWrapper">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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 -->
|
|
28
33
|
</div>
|
|
29
34
|
<auro-accordion alignRight>
|
|
30
|
-
|
|
35
|
+
<span slot="trigger">See code</span>
|
|
31
36
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
32
37
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
<auro-skeleton style="width: 400px; height: 300px"></auro-skeleton>
|
|
36
|
-
```
|
|
39
|
+
<pre class="language-html"><code class="language-html"><auro-skeleton style="width: 400px; height: 300px"></auro-skeleton></code></pre>
|
|
37
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
38
41
|
</auro-accordion>
|
|
39
42
|
|
|
40
|
-
## Property
|
|
43
|
+
## Property and attribute examples
|
|
41
44
|
|
|
42
45
|
### Shape
|
|
43
46
|
|
|
44
|
-
|
|
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.
|
|
45
48
|
|
|
46
49
|
### Circle
|
|
47
50
|
|
|
48
51
|
<div class="exampleWrapper">
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/circle.html) -->
|
|
53
|
+
<!-- The below content is automatically added from ../apiExamples/circle.html -->
|
|
54
|
+
<auro-skeleton shape="circle" style="width: 40px; height: 40px"></auro-skeleton>
|
|
55
|
+
<auro-skeleton shape="circle" style="width: 100px; height: 100px"></auro-skeleton>
|
|
56
|
+
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton>
|
|
57
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
58
|
</div>
|
|
56
59
|
<auro-accordion alignRight>
|
|
57
|
-
|
|
60
|
+
<span slot="trigger">See code</span>
|
|
58
61
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/circle.html) -->
|
|
59
62
|
<!-- The below code snippet is automatically added from ../apiExamples/circle.html -->
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<auro-skeleton shape="circle" style="width: 300px; height: 300px"></auro-skeleton>
|
|
65
|
-
```
|
|
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>
|
|
66
67
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
67
68
|
</auro-accordion>
|
|
68
69
|
|
|
69
70
|
### Oval
|
|
70
71
|
|
|
71
72
|
<div class="exampleWrapper">
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/oval.html) -->
|
|
74
|
+
<!-- The below content is automatically added from ../apiExamples/oval.html -->
|
|
75
|
+
<auro-skeleton shape="oval" style="width: 80px; height: 40px"></auro-skeleton>
|
|
76
|
+
<auro-skeleton shape="oval" style="width: 200px; height: 100px;"></auro-skeleton>
|
|
77
|
+
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton>
|
|
78
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
78
79
|
</div>
|
|
79
80
|
<auro-accordion alignRight>
|
|
80
|
-
|
|
81
|
+
<span slot="trigger">See code</span>
|
|
81
82
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/oval.html) -->
|
|
82
83
|
<!-- The below code snippet is automatically added from ../apiExamples/oval.html -->
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<auro-skeleton shape="oval" style="width: 600px; height: 300px"></auro-skeleton>
|
|
88
|
-
```
|
|
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>
|
|
89
88
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
90
89
|
</auro-accordion>
|
|
91
90
|
|
|
92
91
|
### Rectangle
|
|
93
92
|
|
|
94
93
|
<div class="exampleWrapper">
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/rectangle.html) -->
|
|
95
|
+
<!-- The below content is automatically added from ../apiExamples/rectangle.html -->
|
|
96
|
+
<auro-skeleton shape="rectangle" style="width: 100px; height: 50px"></auro-skeleton>
|
|
97
|
+
<auro-skeleton shape="rectangle" style="width: 400px; height: 150px"></auro-skeleton>
|
|
98
|
+
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton>
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
101
100
|
</div>
|
|
102
101
|
<auro-accordion alignRight>
|
|
103
|
-
|
|
102
|
+
<span slot="trigger">See code</span>
|
|
104
103
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/rectangle.html) -->
|
|
105
104
|
<!-- The below code snippet is automatically added from ../apiExamples/rectangle.html -->
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<auro-skeleton shape="rectangle" style="width: 800px; height: 300px"></auro-skeleton>
|
|
111
|
-
```
|
|
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>
|
|
112
109
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
110
|
</auro-accordion>
|
|
114
111
|
|
|
115
|
-
## Common
|
|
112
|
+
## Common usage patterns
|
|
116
113
|
|
|
117
114
|
## Be creative
|
|
118
115
|
|
|
119
|
-
Use
|
|
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.
|
|
120
117
|
|
|
121
118
|
<div class="exampleWrapper">
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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 -->
|
|
150
147
|
</div>
|
|
151
148
|
<auro-accordion alignRight>
|
|
152
|
-
|
|
149
|
+
<span slot="trigger">See code</span>
|
|
153
150
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/table-example.html) -->
|
|
154
151
|
<!-- The below code snippet is automatically added from ../apiExamples/table-example.html -->
|
|
155
152
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
</table>
|
|
182
|
-
```
|
|
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>
|
|
183
178
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
184
179
|
</auro-accordion>
|
|
185
180
|
|
|
186
|
-
## Restyle
|
|
181
|
+
## Restyle with CSS custom properties
|
|
187
182
|
|
|
188
|
-
|
|
183
|
+
Restyle the component by changing the values of the following tokens.
|
|
189
184
|
|
|
190
185
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
191
186
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
192
187
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
:host {
|
|
188
|
+
<pre class="language-scss"><code class="language-scss">@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
189
|
+
:host {
|
|
197
190
|
--ds-auro-skeleton-container-color: var(--ds-advanced-color-skeleton-background, #{v.$ds-advanced-color-skeleton-background});
|
|
198
191
|
--ds-auro-skeleton-container-gradient-color-one: var(--ds-advanced-color-skeleton-background, #{v.$ds-advanced-color-skeleton-background});
|
|
199
192
|
--ds-auro-skeleton-container-gradient-color-two: var(--ds-advanced-color-skeleton-wave, #{v.$ds-advanced-color-skeleton-wave});
|
|
200
|
-
}
|
|
201
|
-
```
|
|
193
|
+
}</code></pre>
|
|
202
194
|
<!-- AURO-GENERATED-CONTENT:END -->
|