@aurodesignsystem/auro-skeleton 4.1.3 → 5.0.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.
@@ -1,74 +0,0 @@
1
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2
- // See LICENSE in the project root for license information.
3
-
4
- // ---------------------------------------------------------------------
5
-
6
- // If use litElement base class
7
- import { LitElement, html } from "lit";
8
-
9
- import styleCss from "./style-css.js";
10
- import colorCss from "./color-css.js";
11
- import tokensCss from "./tokens-css.js";
12
-
13
- import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';
14
-
15
- // See https://git.io/JJ6SJ for "How to document your components using JSDoc"
16
- /**
17
- * The auro-skeleton element provides users a way to indicate the loading of asynchronous content on a page.
18
- *
19
- * @attr {String} shape - Renders a circle, oval, or rectangle loader.
20
- */
21
-
22
- // build the component class
23
- export class AuroSkeleton extends LitElement {
24
- constructor() {
25
- super();
26
-
27
- /**
28
- * @private
29
- */
30
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
31
- }
32
-
33
- // function to define props used within the scope of this component
34
- static get properties() {
35
- return {
36
- // ...super.properties,
37
- };
38
- }
39
-
40
- static get styles() {
41
- return [
42
- styleCss,
43
- colorCss,
44
- tokensCss
45
- ];
46
- }
47
-
48
- /**
49
- * This will register this element with the browser.
50
- * @param {string} [name="auro-skeleton"] - The name of element that you want to register to.
51
- *
52
- * @example
53
- * AuroSkeleton.register("custom-skeleton") // this will register this element to <custom-skeleton/>
54
- *
55
- */
56
- static register(name = "auro-skeleton") {
57
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroSkeleton);
58
- }
59
-
60
- firstUpdated() {
61
- // Add the tag name as an attribute if it is different than the component name
62
- this.runtimeUtils.handleComponentTagRename(this, 'auro-skeleton');
63
- }
64
-
65
- // When using auroElement, use the following attribute and function when hiding content from screen readers.
66
- // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
67
-
68
- // function that renders the HTML and CSS into the scope of the component
69
- render() {
70
- return html`
71
- <span class="util_displayHiddenVisually">Loading...</span>
72
- `;
73
- }
74
- }
package/src/color-css.js DELETED
@@ -1,2 +0,0 @@
1
- import { css } from 'lit';
2
- export default css`:host{background-color:var(--ds-auro-skeleton-container-color);background-image:linear-gradient(to right, var(--ds-auro-skeleton-container-gradient-color-one) 10%, var(--ds-auro-skeleton-container-gradient-color-two) 40%, var(--ds-auro-skeleton-container-gradient-color-one) 60%)}`;
package/src/style-css.js DELETED
@@ -1,2 +0,0 @@
1
- import { css } from 'lit';
2
- export default css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;animation-duration:2s;animation-fill-mode:backwards;animation-iteration-count:infinite;animation-name:place-holder-shimmer;animation-timing-function:linear;background-repeat:no-repeat;background-size:1000px 100%}:host([shape=circle]){width:auto;border-radius:50%}:host([shape=oval]){border-radius:9999px}:host([shape=rectangle]){border-radius:var(--ds-border-radius, 0.375rem)}@keyframes place-holder-shimmer{from{background-position:-1000px 0}to{background-position:1000px 0}}`;
package/src/tokens-css.js DELETED
@@ -1,2 +0,0 @@
1
- import { css } from 'lit';
2
- export default css`:host{--ds-auro-skeleton-container-color:var(--ds-advanced-color-skeleton-background, #f7f8fa);--ds-auro-skeleton-container-gradient-color-one:var(--ds-advanced-color-skeleton-background, #f7f8fa);--ds-auro-skeleton-container-gradient-color-two:var(--ds-advanced-color-skeleton-wave, #e4e8ec)}`;