@aurodesignsystem-dev/auro-loader 0.0.0-pr100.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/CHANGELOG.md +269 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +135 -0
- package/demo/api.html +56 -0
- package/demo/api.js +1 -0
- package/demo/api.md +349 -0
- package/demo/api.min.js +3 -0
- package/demo/auro-loader.min.js +331 -0
- package/demo/index.html +56 -0
- package/demo/index.js +4 -0
- package/demo/index.md +48 -0
- package/demo/index.min.js +4 -0
- package/dist/auro-loader-BcZn60oi.js +17 -0
- package/dist/index.d.ts +214 -0
- package/dist/index.js +1 -0
- package/dist/registered.js +1 -0
- package/package.json +88 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
|
|
2
|
+
import type { AuroLoader } from "src/auro-loader.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This type can be used to create scoped tags for your components.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import type { ScopedElements } from "path/to/library/jsx-integration";
|
|
11
|
+
*
|
|
12
|
+
* declare module "my-library" {
|
|
13
|
+
* namespace JSX {
|
|
14
|
+
* interface IntrinsicElements
|
|
15
|
+
* extends ScopedElements<'test-', ''> {}
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Runtime scoped elements result in duplicate types and can confusing for developers. It is recommended to use the `prefix` and `suffix` options to generate new types instead.
|
|
21
|
+
*/
|
|
22
|
+
export type ScopedElements<
|
|
23
|
+
Prefix extends string = "",
|
|
24
|
+
Suffix extends string = ""
|
|
25
|
+
> = {
|
|
26
|
+
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type BaseProps<T extends HTMLElement> = {
|
|
30
|
+
|
|
31
|
+
/** Content added between the opening and closing tags of the element */
|
|
32
|
+
children?: any;
|
|
33
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
34
|
+
class?: string;
|
|
35
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Takes an object where the key is the class name(s) and the value is a boolean expression. When true, the class is applied, and when false, it is removed. */
|
|
38
|
+
classList?: Record<string, boolean | undefined>;
|
|
39
|
+
/** Specifies the text direction of the element. */
|
|
40
|
+
dir?: "ltr" | "rtl";
|
|
41
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
42
|
+
exportparts?: string;
|
|
43
|
+
/** For <label> and <output>, lets you associate the label with some control. */
|
|
44
|
+
htmlFor?: string;
|
|
45
|
+
/** Specifies whether the element should be hidden. */
|
|
46
|
+
hidden?: boolean | string;
|
|
47
|
+
/** A unique identifier for the element. */
|
|
48
|
+
id?: string;
|
|
49
|
+
/** Keys tell React which array item each component corresponds to */
|
|
50
|
+
key?: string | number;
|
|
51
|
+
/** Specifies the language of the element. */
|
|
52
|
+
lang?: string;
|
|
53
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
54
|
+
part?: string;
|
|
55
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
56
|
+
ref?: T | ((e: T) => void);
|
|
57
|
+
/** Adds a reference for a custom element slot */
|
|
58
|
+
slot?: string;
|
|
59
|
+
/** Prop for setting inline styles */
|
|
60
|
+
style?: Record<string, string | number>;
|
|
61
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
62
|
+
tabIndex?: number;
|
|
63
|
+
/** Specifies the tooltip text for the element. */
|
|
64
|
+
title?: string;
|
|
65
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
66
|
+
translate?: "yes" | "no";
|
|
67
|
+
/** The popover global attribute is used to designate an element as a popover element. */
|
|
68
|
+
popover?: "auto" | "hint" | "manual";
|
|
69
|
+
/** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
|
|
70
|
+
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
71
|
+
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
72
|
+
popovertargetaction?: "show" | "hide" | "toggle";
|
|
73
|
+
|
|
74
|
+
} ;
|
|
75
|
+
|
|
76
|
+
type BaseEvents = {
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export type AuroLoaderProps = {
|
|
84
|
+
/** Defines whether the loader is intended for lighter or darker backgrounds, or if it should use the brand color regardless of the background. */
|
|
85
|
+
"appearance"?: AuroLoader['appearance'];
|
|
86
|
+
/** Sets loader to laser type. */
|
|
87
|
+
"laser"?: AuroLoader['laser'];
|
|
88
|
+
/** Sets size to large. */
|
|
89
|
+
"lg"?: AuroLoader['lg'];
|
|
90
|
+
/** Sets size to medium. */
|
|
91
|
+
"md"?: AuroLoader['md'];
|
|
92
|
+
/** DEPRECATED - use `appearance="inverse"`. */
|
|
93
|
+
"onDark"?: AuroLoader['onDark'];
|
|
94
|
+
/** DEPRECATED - use `appearance="brand"`. */
|
|
95
|
+
"onLight"?: AuroLoader['onLight'];
|
|
96
|
+
/** Sets loader to orbit type. */
|
|
97
|
+
"orbit"?: AuroLoader['orbit'];
|
|
98
|
+
/** Sets loader to pulse type. */
|
|
99
|
+
"pulse"?: AuroLoader['pulse'];
|
|
100
|
+
/** Sets loader to ringworm type. */
|
|
101
|
+
"ringworm"?: AuroLoader['ringworm'];
|
|
102
|
+
/** Sets size to small. */
|
|
103
|
+
"sm"?: AuroLoader['sm'];
|
|
104
|
+
/** Sets size to extra small. */
|
|
105
|
+
"xs"?: AuroLoader['xs'];
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type CustomElements = {
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The `auro-loader` element displays a loading animation to indicate a loading state to users.
|
|
115
|
+
*
|
|
116
|
+
* ## Attributes & Properties
|
|
117
|
+
*
|
|
118
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
119
|
+
*
|
|
120
|
+
* - `appearance`: Defines whether the loader is intended for lighter or darker backgrounds, or if it should use the brand color regardless of the background.
|
|
121
|
+
* - `laser`: Sets loader to laser type.
|
|
122
|
+
* - `lg`: Sets size to large.
|
|
123
|
+
* - `md`: Sets size to medium.
|
|
124
|
+
* - `onDark`: DEPRECATED - use `appearance="inverse"`.
|
|
125
|
+
* - `onLight`: DEPRECATED - use `appearance="brand"`.
|
|
126
|
+
* - `orbit`: Sets loader to orbit type.
|
|
127
|
+
* - `pulse`: Sets loader to pulse type.
|
|
128
|
+
* - `ringworm`: Sets loader to ringworm type.
|
|
129
|
+
* - `sm`: Sets size to small.
|
|
130
|
+
* - `xs`: Sets size to extra small.
|
|
131
|
+
*
|
|
132
|
+
* ## Slots
|
|
133
|
+
*
|
|
134
|
+
* Areas where markup can be added to the component.
|
|
135
|
+
*
|
|
136
|
+
* - `(default)`: Default slot for text that replaces `auro-loader` component when user has the "Reduce Motion" a11y feature enabled.
|
|
137
|
+
*
|
|
138
|
+
* ## Methods
|
|
139
|
+
*
|
|
140
|
+
* Methods that can be called to access component functionality.
|
|
141
|
+
*
|
|
142
|
+
* - `_initializeDefaults() => void`: undefined
|
|
143
|
+
* - `register(name?: string = "auro-loader") => void`: This will register this element with the browser.
|
|
144
|
+
*
|
|
145
|
+
* ## CSS Parts
|
|
146
|
+
*
|
|
147
|
+
* Custom selectors for styling elements within the component.
|
|
148
|
+
*
|
|
149
|
+
* - `element`: Apply style to adjust speed of animation.
|
|
150
|
+
*/
|
|
151
|
+
"auro-loader": Partial<AuroLoaderProps & BaseProps<AuroLoader> & BaseEvents>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type CustomCssProperties = {
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
declare module 'react' {
|
|
160
|
+
namespace JSX {
|
|
161
|
+
interface IntrinsicElements extends CustomElements {}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
declare module 'preact' {
|
|
167
|
+
namespace JSX {
|
|
168
|
+
interface IntrinsicElements extends CustomElements {}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare module '@builder.io/qwik' {
|
|
174
|
+
namespace JSX {
|
|
175
|
+
interface IntrinsicElements extends CustomElements {}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare module '@stencil/core' {
|
|
181
|
+
namespace JSX {
|
|
182
|
+
interface IntrinsicElements extends CustomElements {}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare module 'hono/jsx' {
|
|
188
|
+
namespace JSX {
|
|
189
|
+
interface IntrinsicElements extends CustomElements {}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare module 'react-native' {
|
|
195
|
+
namespace JSX {
|
|
196
|
+
interface IntrinsicElements extends CustomElements {}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
declare global {
|
|
202
|
+
namespace JSX {
|
|
203
|
+
interface IntrinsicElements extends CustomElements {}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
}
|
|
207
|
+
declare global {
|
|
208
|
+
namespace svelteHTML {
|
|
209
|
+
interface IntrinsicElements extends CustomElements {}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
export { AuroLoader } from "./index.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{A as AuroLoader}from"./auro-loader-BcZn60oi.js";import"lit";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as r}from"./auro-loader-BcZn60oi.js";import"lit";r.register();
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"//": [
|
|
3
|
+
"================================================================================",
|
|
4
|
+
"# To work within the development environment, run the following tasks",
|
|
5
|
+
" 1. $ npm run dev",
|
|
6
|
+
" 2. Go to http://localhost:8000",
|
|
7
|
+
"================================================================================"
|
|
8
|
+
],
|
|
9
|
+
"name": "@aurodesignsystem-dev/auro-loader",
|
|
10
|
+
"version": "0.0.0-pr100.0",
|
|
11
|
+
"description": "auro-loader HTML custom element",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/AlaskaAirlines/auro-loader"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "dist/registered.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"lit": "^3.3.2"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@aurodesignsystem/auro-cli": "^3.5.0",
|
|
28
|
+
"@aurodesignsystem/auro-config": "^1.3.1",
|
|
29
|
+
"@aurodesignsystem/auro-library": "^5.5.4",
|
|
30
|
+
"@aurodesignsystem/design-tokens": "^8.7.0",
|
|
31
|
+
"@aurodesignsystem/webcorestylesheets": "^10.1.4",
|
|
32
|
+
"husky": "^9.1.6"
|
|
33
|
+
},
|
|
34
|
+
"browserslist": [
|
|
35
|
+
"last 2 Chrome versions",
|
|
36
|
+
"last 2 iOS major versions",
|
|
37
|
+
"last 2 Firefox versions",
|
|
38
|
+
"last 2 Edge versions",
|
|
39
|
+
"last 2 Safari major versions"
|
|
40
|
+
],
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"provenance": true
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"alaska airlines",
|
|
47
|
+
"auro",
|
|
48
|
+
"design system",
|
|
49
|
+
"web components"
|
|
50
|
+
],
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "auro build",
|
|
53
|
+
"dev": "auro dev -w -s",
|
|
54
|
+
"dev:open": "auro dev -w -s --open",
|
|
55
|
+
"lint": "biome check --no-errors-on-unmatched && stylelint \"./src/**/*.scss\"",
|
|
56
|
+
"lint:fix": "biome check --fix --no-errors-on-unmatched && stylelint \"./src/**/*.scss\" --fix",
|
|
57
|
+
"test": "auro test",
|
|
58
|
+
"test:watch": "auro test --watch",
|
|
59
|
+
"prepare": "husky",
|
|
60
|
+
"test:coverage": "auro test --coverage-report --open"
|
|
61
|
+
},
|
|
62
|
+
"exports": {
|
|
63
|
+
"./package.json": "./package.json",
|
|
64
|
+
"./readme.md": "./README.md",
|
|
65
|
+
"./custom-elements.json": "./custom-elements.json",
|
|
66
|
+
".": {
|
|
67
|
+
"module": "./dist/registered.js",
|
|
68
|
+
"types": "./dist/index.d.ts",
|
|
69
|
+
"default": "./dist/registered.js"
|
|
70
|
+
},
|
|
71
|
+
"./demo/*.md": "./demo/*.md",
|
|
72
|
+
"./demo/*.js": "./demo/*.min.js",
|
|
73
|
+
"./class": {
|
|
74
|
+
"module": "./dist/index.js",
|
|
75
|
+
"types": "./dist/index.d.ts",
|
|
76
|
+
"default": "./dist/index.js"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"files": [
|
|
80
|
+
"dist/**/*",
|
|
81
|
+
"demo/**/*",
|
|
82
|
+
"CHANGELOG.md",
|
|
83
|
+
"README.md",
|
|
84
|
+
"LICENSE",
|
|
85
|
+
"NOTICE"
|
|
86
|
+
],
|
|
87
|
+
"customElements": "custom-elements.json"
|
|
88
|
+
}
|