@aurodesignsystem-dev/auro-dialog 0.0.0-pr103.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 +295 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +189 -0
- package/demo/api.html +64 -0
- package/demo/api.js +33 -0
- package/demo/api.md +803 -0
- package/demo/api.min.js +219 -0
- package/demo/auro-dialog.min.js +950 -0
- package/demo/index.html +63 -0
- package/demo/index.js +24 -0
- package/demo/index.md +151 -0
- package/demo/index.min.js +41 -0
- package/dist/auro-dialog-BNnIwNXB.js +128 -0
- package/dist/index.d.ts +230 -0
- package/dist/index.js +1 -0
- package/dist/registered.js +1 -0
- package/package.json +93 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
|
|
2
|
+
import type { AuroDialog } from "src/auro-dialog.js";
|
|
3
|
+
import type { ComponentBase } from "src/componentBase.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This type can be used to create scoped tags for your components.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import type { ScopedElements } from "path/to/library/jsx-integration";
|
|
12
|
+
*
|
|
13
|
+
* declare module "my-library" {
|
|
14
|
+
* namespace JSX {
|
|
15
|
+
* interface IntrinsicElements
|
|
16
|
+
* extends ScopedElements<'test-', ''> {}
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @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.
|
|
22
|
+
*/
|
|
23
|
+
export type ScopedElements<
|
|
24
|
+
Prefix extends string = "",
|
|
25
|
+
Suffix extends string = ""
|
|
26
|
+
> = {
|
|
27
|
+
[Key in keyof CustomElements as `${Prefix}${Key}${Suffix}`]: CustomElements[Key];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type BaseProps<T extends HTMLElement> = {
|
|
31
|
+
|
|
32
|
+
/** Content added between the opening and closing tags of the element */
|
|
33
|
+
children?: any;
|
|
34
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
35
|
+
class?: string;
|
|
36
|
+
/** Used for declaratively styling one or more elements using CSS (Cascading Stylesheets) */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** 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. */
|
|
39
|
+
classList?: Record<string, boolean | undefined>;
|
|
40
|
+
/** Specifies the text direction of the element. */
|
|
41
|
+
dir?: "ltr" | "rtl";
|
|
42
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
43
|
+
exportparts?: string;
|
|
44
|
+
/** For <label> and <output>, lets you associate the label with some control. */
|
|
45
|
+
htmlFor?: string;
|
|
46
|
+
/** Specifies whether the element should be hidden. */
|
|
47
|
+
hidden?: boolean | string;
|
|
48
|
+
/** A unique identifier for the element. */
|
|
49
|
+
id?: string;
|
|
50
|
+
/** Keys tell React which array item each component corresponds to */
|
|
51
|
+
key?: string | number;
|
|
52
|
+
/** Specifies the language of the element. */
|
|
53
|
+
lang?: string;
|
|
54
|
+
/** 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. */
|
|
55
|
+
part?: string;
|
|
56
|
+
/** Use the ref attribute with a variable to assign a DOM element to the variable once the element is rendered. */
|
|
57
|
+
ref?: T | ((e: T) => void);
|
|
58
|
+
/** Adds a reference for a custom element slot */
|
|
59
|
+
slot?: string;
|
|
60
|
+
/** Prop for setting inline styles */
|
|
61
|
+
style?: Record<string, string | number>;
|
|
62
|
+
/** Overrides the default Tab button behavior. Avoid using values other than -1 and 0. */
|
|
63
|
+
tabIndex?: number;
|
|
64
|
+
/** Specifies the tooltip text for the element. */
|
|
65
|
+
title?: string;
|
|
66
|
+
/** Passing 'no' excludes the element content from being translated. */
|
|
67
|
+
translate?: "yes" | "no";
|
|
68
|
+
/** The popover global attribute is used to designate an element as a popover element. */
|
|
69
|
+
popover?: "auto" | "hint" | "manual";
|
|
70
|
+
/** Turns an element element into a popover control button; takes the ID of the popover element to control as its value. */
|
|
71
|
+
popovertarget?: "top" | "bottom" | "left" | "right" | "auto";
|
|
72
|
+
/** Specifies the action to be performed on a popover element being controlled by a control element. */
|
|
73
|
+
popovertargetaction?: "show" | "hide" | "toggle";
|
|
74
|
+
|
|
75
|
+
} ;
|
|
76
|
+
|
|
77
|
+
type BaseEvents = {
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
export type AuroDialogProps = {
|
|
85
|
+
/** Defines whether the close button should be light colored for use on dark backgrounds. */
|
|
86
|
+
"close-button-appearance"?: AuroDialog['closeButtonAppearance'];
|
|
87
|
+
/** Defines whether the close button should be light colored for use on dark backgrounds. */
|
|
88
|
+
"closeButtonAppearance"?: AuroDialog['closeButtonAppearance'];
|
|
89
|
+
/** Sets dialog box to large style. Adding both lg and sm/md will set the dialog to lg for mobile and sm/md for desktop.
|
|
90
|
+
Must be used in conjunction with sm or md to have an effect. */
|
|
91
|
+
"lg"?: AuroDialog['lg'];
|
|
92
|
+
/** Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile. */
|
|
93
|
+
"md"?: AuroDialog['md'];
|
|
94
|
+
/** Modal dialog restricts the user to take an action (no default close actions). */
|
|
95
|
+
"modal"?: AuroDialog['modal'];
|
|
96
|
+
/** DEPRECATED - use `close-button-appearance="inverse" instead. */
|
|
97
|
+
"onDark"?: AuroDialog['onDark'];
|
|
98
|
+
/** Sets state of dialog to open. */
|
|
99
|
+
"open"?: AuroDialog['open'];
|
|
100
|
+
/** Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile. */
|
|
101
|
+
"sm"?: AuroDialog['sm'];
|
|
102
|
+
/** Unformatted dialog window, edge-to-edge fill for content. */
|
|
103
|
+
"unformatted"?: AuroDialog['unformatted'];
|
|
104
|
+
/** The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened. */
|
|
105
|
+
"triggerElement"?: AuroDialog['triggerElement'];
|
|
106
|
+
|
|
107
|
+
/** Event fires when the element is closed */
|
|
108
|
+
"ontoggle"?: (e: CustomEvent<never>) => void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
export type CustomElements = {
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The `auro-dialog` appears on top of the page and presents information that requires the users immediate attention.
|
|
117
|
+
*
|
|
118
|
+
* ## Attributes & Properties
|
|
119
|
+
*
|
|
120
|
+
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
121
|
+
*
|
|
122
|
+
* - `close-button-appearance`/`closeButtonAppearance`: Defines whether the close button should be light colored for use on dark backgrounds.
|
|
123
|
+
* - `lg`: Sets dialog box to large style. Adding both lg and sm/md will set the dialog to lg for mobile and sm/md for desktop.
|
|
124
|
+
* Must be used in conjunction with sm or md to have an effect.
|
|
125
|
+
* - `md`: Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile.
|
|
126
|
+
* - `modal`: Modal dialog restricts the user to take an action (no default close actions).
|
|
127
|
+
* - `onDark`: DEPRECATED - use `close-button-appearance="inverse" instead.
|
|
128
|
+
* - `open`: Sets state of dialog to open.
|
|
129
|
+
* - `sm`: Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile.
|
|
130
|
+
* - `unformatted`: Unformatted dialog window, edge-to-edge fill for content.
|
|
131
|
+
* - `triggerElement`: The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened. (property only)
|
|
132
|
+
*
|
|
133
|
+
* ## Events
|
|
134
|
+
*
|
|
135
|
+
* Events that will be emitted by the component.
|
|
136
|
+
*
|
|
137
|
+
* - `toggle`: Event fires when the element is closed
|
|
138
|
+
*
|
|
139
|
+
* ## Slots
|
|
140
|
+
*
|
|
141
|
+
* Areas where markup can be added to the component.
|
|
142
|
+
*
|
|
143
|
+
* - `ariaLabel.dialog.close`: Text to describe the "x" icon close button for screen readers. Default: "Close".
|
|
144
|
+
* - `content`: Injects content into the body of the modal
|
|
145
|
+
* - `footer`: Used for action options, e.g. buttons
|
|
146
|
+
* - `header`: Text to display as the header of the modal
|
|
147
|
+
*
|
|
148
|
+
* ## Methods
|
|
149
|
+
*
|
|
150
|
+
* Methods that can be called to access component functionality.
|
|
151
|
+
*
|
|
152
|
+
* - `_initializeDefaults() => void`: undefined
|
|
153
|
+
* - `register(name?: string = "auro-dialog") => void`: This will register this element with the browser.
|
|
154
|
+
*
|
|
155
|
+
* ## CSS Parts
|
|
156
|
+
*
|
|
157
|
+
* Custom selectors for styling elements within the component.
|
|
158
|
+
*
|
|
159
|
+
* - `close-button`: adjust position of the close X icon in the dialog window
|
|
160
|
+
* - `dialog`: apply CSS to the entire dialog
|
|
161
|
+
* - `dialog-content`: apply CSS to the content of the dialog
|
|
162
|
+
* - `dialog-footer`: apply CSS to the footer of the dialog
|
|
163
|
+
* - `dialog-header`: apply CSS to the header of the dialog
|
|
164
|
+
* - `dialog-overlay`: apply CSS on the overlay of the dialog
|
|
165
|
+
*/
|
|
166
|
+
"auro-dialog": Partial<AuroDialogProps & BaseProps<AuroDialog> & BaseEvents>;
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export type CustomCssProperties = {
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
declare module 'react' {
|
|
176
|
+
namespace JSX {
|
|
177
|
+
interface IntrinsicElements extends CustomElements {}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare module 'preact' {
|
|
183
|
+
namespace JSX {
|
|
184
|
+
interface IntrinsicElements extends CustomElements {}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare module '@builder.io/qwik' {
|
|
190
|
+
namespace JSX {
|
|
191
|
+
interface IntrinsicElements extends CustomElements {}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
declare module '@stencil/core' {
|
|
197
|
+
namespace JSX {
|
|
198
|
+
interface IntrinsicElements extends CustomElements {}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
declare module 'hono/jsx' {
|
|
204
|
+
namespace JSX {
|
|
205
|
+
interface IntrinsicElements extends CustomElements {}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare module 'react-native' {
|
|
211
|
+
namespace JSX {
|
|
212
|
+
interface IntrinsicElements extends CustomElements {}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
declare global {
|
|
218
|
+
namespace JSX {
|
|
219
|
+
interface IntrinsicElements extends CustomElements {}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
declare global {
|
|
224
|
+
namespace svelteHTML {
|
|
225
|
+
interface IntrinsicElements extends CustomElements {}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
export { AuroDialog } from "./index.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{A as AuroDialog}from"./auro-dialog-BNnIwNXB.js";import"lit";import"lit/directives/class-map.js";import"lit/static-html.js";import"lit/directives/if-defined.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as i}from"./auro-dialog-BNnIwNXB.js";import"lit";import"lit/directives/class-map.js";import"lit/static-html.js";import"lit/directives/if-defined.js";i.register();
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
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-dialog",
|
|
10
|
+
"version": "0.0.0-pr103.0",
|
|
11
|
+
"description": "auro-dialog HTML custom element",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/AlaskaAirlines/auro-dialog"
|
|
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.1"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@aurodesignsystem/auro-button": "^12.3.0",
|
|
28
|
+
"@aurodesignsystem/auro-cli": "^3.5.0",
|
|
29
|
+
"@aurodesignsystem/auro-config": "^1.3.1",
|
|
30
|
+
"@aurodesignsystem/auro-icon": "^9.1.1",
|
|
31
|
+
"@aurodesignsystem/auro-library": "^5.5.4",
|
|
32
|
+
"@aurodesignsystem/design-tokens": "^8.7.0",
|
|
33
|
+
"@aurodesignsystem/webcorestylesheets": "^10.1.4",
|
|
34
|
+
"husky": "^9.1.7"
|
|
35
|
+
},
|
|
36
|
+
"browserslist": [
|
|
37
|
+
"last 2 Chrome versions",
|
|
38
|
+
"last 2 iOS major versions",
|
|
39
|
+
"last 2 Firefox versions",
|
|
40
|
+
"last 2 Edge versions",
|
|
41
|
+
"last 2 Safari major versions"
|
|
42
|
+
],
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"alaska airlines",
|
|
49
|
+
"auro",
|
|
50
|
+
"design system",
|
|
51
|
+
"web components"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "auro build",
|
|
55
|
+
"build:version": "node ./scripts/version.mjs",
|
|
56
|
+
"./custom-elements.json": "./custom-elements.json",
|
|
57
|
+
"dev": "auro dev -w -s",
|
|
58
|
+
"dev:open": "auro dev -w -s --open",
|
|
59
|
+
"lint": "biome check --no-errors-on-unmatched && stylelint \"./src/**/*.scss\"",
|
|
60
|
+
"lint:fix": "biome check --fix --no-errors-on-unmatched && stylelint \"./src/**/*.scss\" --fix",
|
|
61
|
+
"test": "auro test",
|
|
62
|
+
"test:watch": "auro test --watch",
|
|
63
|
+
"test:coverage": "auro test --coverage-report --open",
|
|
64
|
+
"prepare": "husky",
|
|
65
|
+
"cem": "auro docs --cem --api"
|
|
66
|
+
},
|
|
67
|
+
"exports": {
|
|
68
|
+
"./package.json": "./package.json",
|
|
69
|
+
"./readme.md": "./README.md",
|
|
70
|
+
"./custom-elements.json": "./custom-elements.json",
|
|
71
|
+
".": {
|
|
72
|
+
"module": "./dist/registered.js",
|
|
73
|
+
"types": "./dist/index.d.ts",
|
|
74
|
+
"default": "./dist/registered.js"
|
|
75
|
+
},
|
|
76
|
+
"./demo/*.md": "./demo/*.md",
|
|
77
|
+
"./demo/*.js": "./demo/*.min.js",
|
|
78
|
+
"./class": {
|
|
79
|
+
"module": "./dist/index.js",
|
|
80
|
+
"types": "./dist/index.d.ts",
|
|
81
|
+
"default": "./dist/index.js"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"files": [
|
|
85
|
+
"dist/**/*",
|
|
86
|
+
"demo/**/*",
|
|
87
|
+
"CHANGELOG.md",
|
|
88
|
+
"README.md",
|
|
89
|
+
"LICENSE",
|
|
90
|
+
"NOTICE"
|
|
91
|
+
],
|
|
92
|
+
"customElements": "custom-elements.json"
|
|
93
|
+
}
|