@digital-realty/ix-dialog 1.1.3 → 1.1.4
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/dist/IxDialog.d.ts +21 -21
- package/dist/IxDialog.js +43 -43
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/dialog.d.ts +107 -107
- package/dist/internal/dialog.js +391 -391
- package/dist/ix-dialog.d.ts +4 -4
- package/dist/ix-dialog.js +6 -6
- package/dist/ix-dialog.min.js +1 -1
- package/dist/md-dialog.d.ts +6 -6
- package/dist/md-dialog.js +8 -8
- package/dist/md-dialog.js.map +1 -1
- package/dist/react/IxDialog.d.ts +2 -2
- package/dist/react/IxDialog.js +9 -9
- package/package.json +4 -2
package/dist/IxDialog.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import './md-dialog.js';
|
|
3
|
-
import { Dialog } from './internal/dialog.js';
|
|
4
|
-
export declare class IxDialog extends LitElement {
|
|
5
|
-
/** @nocollapse */
|
|
6
|
-
static shadowRootOptions: {
|
|
7
|
-
delegatesFocus: boolean;
|
|
8
|
-
mode: ShadowRootMode;
|
|
9
|
-
slotAssignment?: SlotAssignmentMode | undefined;
|
|
10
|
-
customElements?: CustomElementRegistry | undefined;
|
|
11
|
-
registry?: CustomElementRegistry | undefined;
|
|
12
|
-
};
|
|
13
|
-
readonly component: Dialog;
|
|
14
|
-
open: boolean;
|
|
15
|
-
onOpen(): void;
|
|
16
|
-
onOpened(): void;
|
|
17
|
-
onClose(): void;
|
|
18
|
-
onClosed(): void;
|
|
19
|
-
onCancel(): void;
|
|
20
|
-
render(): import("lit").TemplateResult<1>;
|
|
21
|
-
}
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './md-dialog.js';
|
|
3
|
+
import { Dialog } from './internal/dialog.js';
|
|
4
|
+
export declare class IxDialog extends LitElement {
|
|
5
|
+
/** @nocollapse */
|
|
6
|
+
static shadowRootOptions: {
|
|
7
|
+
delegatesFocus: boolean;
|
|
8
|
+
mode: ShadowRootMode;
|
|
9
|
+
slotAssignment?: SlotAssignmentMode | undefined;
|
|
10
|
+
customElements?: CustomElementRegistry | undefined;
|
|
11
|
+
registry?: CustomElementRegistry | undefined;
|
|
12
|
+
};
|
|
13
|
+
readonly component: Dialog;
|
|
14
|
+
open: boolean;
|
|
15
|
+
onOpen(): void;
|
|
16
|
+
onOpened(): void;
|
|
17
|
+
onClose(): void;
|
|
18
|
+
onClosed(): void;
|
|
19
|
+
onCancel(): void;
|
|
20
|
+
render(): import("lit").TemplateResult<1>;
|
|
21
|
+
}
|
package/dist/IxDialog.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { html, LitElement } from 'lit';
|
|
3
|
-
import { property, query } from 'lit/decorators.js';
|
|
4
|
-
import './md-dialog.js';
|
|
5
|
-
import { requestUpdateOnAriaChange } from '@material/web/internal/aria/delegate.js';
|
|
6
|
-
export class IxDialog extends LitElement {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.open = false;
|
|
10
|
-
}
|
|
11
|
-
onOpen() {
|
|
12
|
-
this.dispatchEvent(new Event('open'));
|
|
13
|
-
}
|
|
14
|
-
onOpened() {
|
|
15
|
-
this.dispatchEvent(new Event('opened'));
|
|
16
|
-
}
|
|
17
|
-
onClose() {
|
|
18
|
-
this.dispatchEvent(new Event('close'));
|
|
19
|
-
}
|
|
20
|
-
onClosed() {
|
|
21
|
-
this.dispatchEvent(new Event('closed'));
|
|
22
|
-
}
|
|
23
|
-
onCancel() {
|
|
24
|
-
this.dispatchEvent(new Event('cancel'));
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
|
+
import { property, query } from 'lit/decorators.js';
|
|
4
|
+
import './md-dialog.js';
|
|
5
|
+
import { requestUpdateOnAriaChange } from '@material/web/internal/aria/delegate.js';
|
|
6
|
+
export class IxDialog extends LitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.open = false;
|
|
10
|
+
}
|
|
11
|
+
onOpen() {
|
|
12
|
+
this.dispatchEvent(new Event('open'));
|
|
13
|
+
}
|
|
14
|
+
onOpened() {
|
|
15
|
+
this.dispatchEvent(new Event('opened'));
|
|
16
|
+
}
|
|
17
|
+
onClose() {
|
|
18
|
+
this.dispatchEvent(new Event('close'));
|
|
19
|
+
}
|
|
20
|
+
onClosed() {
|
|
21
|
+
this.dispatchEvent(new Event('closed'));
|
|
22
|
+
}
|
|
23
|
+
onCancel() {
|
|
24
|
+
this.dispatchEvent(new Event('cancel'));
|
|
25
|
+
}
|
|
26
|
+
render() {
|
|
27
27
|
return html `
|
|
28
28
|
<md-dialog
|
|
29
29
|
?open=${this.open}
|
|
@@ -39,21 +39,21 @@ export class IxDialog extends LitElement {
|
|
|
39
39
|
<slot slot="actions" name="actions"></slot>
|
|
40
40
|
></md-dialog
|
|
41
41
|
>
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
(() => {
|
|
46
|
-
requestUpdateOnAriaChange(IxDialog);
|
|
47
|
-
})();
|
|
48
|
-
/** @nocollapse */
|
|
49
|
-
IxDialog.shadowRootOptions = {
|
|
50
|
-
...LitElement.shadowRootOptions,
|
|
51
|
-
delegatesFocus: true,
|
|
52
|
-
};
|
|
53
|
-
__decorate([
|
|
54
|
-
query('.dialog')
|
|
55
|
-
], IxDialog.prototype, "component", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
property({ type: Boolean, reflect: true })
|
|
58
|
-
], IxDialog.prototype, "open", void 0);
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
(() => {
|
|
46
|
+
requestUpdateOnAriaChange(IxDialog);
|
|
47
|
+
})();
|
|
48
|
+
/** @nocollapse */
|
|
49
|
+
IxDialog.shadowRootOptions = {
|
|
50
|
+
...LitElement.shadowRootOptions,
|
|
51
|
+
delegatesFocus: true,
|
|
52
|
+
};
|
|
53
|
+
__decorate([
|
|
54
|
+
query('.dialog')
|
|
55
|
+
], IxDialog.prototype, "component", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
property({ type: Boolean, reflect: true })
|
|
58
|
+
], IxDialog.prototype, "open", void 0);
|
|
59
59
|
//# sourceMappingURL=IxDialog.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IxDialog } from './IxDialog.js';
|
|
1
|
+
export { IxDialog } from './IxDialog.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { IxDialog } from './IxDialog.js';
|
|
1
|
+
export { IxDialog } from './IxDialog.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import '@material/web/divider/divider.js';
|
|
7
|
-
import { LitElement } from 'lit';
|
|
8
|
-
import { DialogAnimation } from '@material/web/dialog/internal/animations.js';
|
|
9
|
-
/**
|
|
10
|
-
* A dialog component.
|
|
11
|
-
*
|
|
12
|
-
* @fires open {Event} Dispatched when the dialog is opening before any animations.
|
|
13
|
-
* @fires opened {Event} Dispatched when the dialog has opened after any animations.
|
|
14
|
-
* @fires close {Event} Dispatched when the dialog is closing before any animations.
|
|
15
|
-
* @fires closed {Event} Dispatched when the dialog has closed after any animations.
|
|
16
|
-
* @fires cancel {Event} Dispatched when the dialog has been canceled by clicking
|
|
17
|
-
* on the scrim or pressing Escape.
|
|
18
|
-
*/
|
|
19
|
-
export declare class Dialog extends LitElement {
|
|
20
|
-
/**
|
|
21
|
-
* Opens the dialog when set to `true` and closes it when set to `false`.
|
|
22
|
-
*/
|
|
23
|
-
get open(): boolean;
|
|
24
|
-
set open(open: boolean);
|
|
25
|
-
/**
|
|
26
|
-
* Gets or sets the dialog's return value, usually to indicate which button
|
|
27
|
-
* a user pressed to close it.
|
|
28
|
-
*
|
|
29
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue
|
|
30
|
-
*/
|
|
31
|
-
returnValue: string;
|
|
32
|
-
/**
|
|
33
|
-
* The type of dialog for accessibility. Set this to `alert` to announce a
|
|
34
|
-
* dialog as an alert dialog.
|
|
35
|
-
*/
|
|
36
|
-
type?: 'alert';
|
|
37
|
-
/**
|
|
38
|
-
* Gets the opening animation for a dialog. Set to a new function to customize
|
|
39
|
-
* the animation.
|
|
40
|
-
*/
|
|
41
|
-
getOpenAnimation: () => DialogAnimation;
|
|
42
|
-
/**
|
|
43
|
-
* Gets the closing animation for a dialog. Set to a new function to customize
|
|
44
|
-
* the animation.
|
|
45
|
-
*/
|
|
46
|
-
getCloseAnimation: () => DialogAnimation;
|
|
47
|
-
private isOpen;
|
|
48
|
-
private isOpening;
|
|
49
|
-
private isConnectedPromiseResolve;
|
|
50
|
-
private isConnectedPromise;
|
|
51
|
-
private readonly dialog;
|
|
52
|
-
private readonly scrim;
|
|
53
|
-
private readonly container;
|
|
54
|
-
private readonly headline;
|
|
55
|
-
private readonly content;
|
|
56
|
-
private readonly actions;
|
|
57
|
-
private isAtScrollTop;
|
|
58
|
-
private isAtScrollBottom;
|
|
59
|
-
private readonly scroller;
|
|
60
|
-
private readonly topAnchor;
|
|
61
|
-
private readonly bottomAnchor;
|
|
62
|
-
private nextClickIsFromContent;
|
|
63
|
-
private intersectionObserver?;
|
|
64
|
-
private hasHeadline;
|
|
65
|
-
private hasActions;
|
|
66
|
-
private hasIcon;
|
|
67
|
-
private escapePressedWithoutCancel;
|
|
68
|
-
constructor();
|
|
69
|
-
/**
|
|
70
|
-
* Opens the dialog and fires a cancelable `open` event. After a dialog's
|
|
71
|
-
* animation, an `opened` event is fired.
|
|
72
|
-
*
|
|
73
|
-
* Add an `autocomplete` attribute to a child of the dialog that should
|
|
74
|
-
* receive focus after opening.
|
|
75
|
-
*
|
|
76
|
-
* @return A Promise that resolves after the animation is finished and the
|
|
77
|
-
* `opened` event was fired.
|
|
78
|
-
*/
|
|
79
|
-
show(): Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
82
|
-
* animation, a `closed` event is fired.
|
|
83
|
-
*
|
|
84
|
-
* @param returnValue A return value usually indicating which button was used
|
|
85
|
-
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
86
|
-
* pressing Escape, it will not change the return value after closing.
|
|
87
|
-
* @return A Promise that resolves after the animation is finished and the
|
|
88
|
-
* `closed` event was fired.
|
|
89
|
-
*/
|
|
90
|
-
close(returnValue?: string): Promise<void>;
|
|
91
|
-
connectedCallback(): void;
|
|
92
|
-
disconnectedCallback(): void;
|
|
93
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
94
|
-
protected firstUpdated(): void;
|
|
95
|
-
private handleDialogClick;
|
|
96
|
-
private handleContentClick;
|
|
97
|
-
private handleSubmit;
|
|
98
|
-
private handleCancel;
|
|
99
|
-
private handleClose;
|
|
100
|
-
private handleKeydown;
|
|
101
|
-
private animateDialog;
|
|
102
|
-
private handleHeadlineChange;
|
|
103
|
-
private handleActionsChange;
|
|
104
|
-
private handleIconChange;
|
|
105
|
-
private handleAnchorIntersection;
|
|
106
|
-
private getIsConnectedPromise;
|
|
107
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import '@material/web/divider/divider.js';
|
|
7
|
+
import { LitElement } from 'lit';
|
|
8
|
+
import { DialogAnimation } from '@material/web/dialog/internal/animations.js';
|
|
9
|
+
/**
|
|
10
|
+
* A dialog component.
|
|
11
|
+
*
|
|
12
|
+
* @fires open {Event} Dispatched when the dialog is opening before any animations.
|
|
13
|
+
* @fires opened {Event} Dispatched when the dialog has opened after any animations.
|
|
14
|
+
* @fires close {Event} Dispatched when the dialog is closing before any animations.
|
|
15
|
+
* @fires closed {Event} Dispatched when the dialog has closed after any animations.
|
|
16
|
+
* @fires cancel {Event} Dispatched when the dialog has been canceled by clicking
|
|
17
|
+
* on the scrim or pressing Escape.
|
|
18
|
+
*/
|
|
19
|
+
export declare class Dialog extends LitElement {
|
|
20
|
+
/**
|
|
21
|
+
* Opens the dialog when set to `true` and closes it when set to `false`.
|
|
22
|
+
*/
|
|
23
|
+
get open(): boolean;
|
|
24
|
+
set open(open: boolean);
|
|
25
|
+
/**
|
|
26
|
+
* Gets or sets the dialog's return value, usually to indicate which button
|
|
27
|
+
* a user pressed to close it.
|
|
28
|
+
*
|
|
29
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/returnValue
|
|
30
|
+
*/
|
|
31
|
+
returnValue: string;
|
|
32
|
+
/**
|
|
33
|
+
* The type of dialog for accessibility. Set this to `alert` to announce a
|
|
34
|
+
* dialog as an alert dialog.
|
|
35
|
+
*/
|
|
36
|
+
type?: 'alert';
|
|
37
|
+
/**
|
|
38
|
+
* Gets the opening animation for a dialog. Set to a new function to customize
|
|
39
|
+
* the animation.
|
|
40
|
+
*/
|
|
41
|
+
getOpenAnimation: () => DialogAnimation;
|
|
42
|
+
/**
|
|
43
|
+
* Gets the closing animation for a dialog. Set to a new function to customize
|
|
44
|
+
* the animation.
|
|
45
|
+
*/
|
|
46
|
+
getCloseAnimation: () => DialogAnimation;
|
|
47
|
+
private isOpen;
|
|
48
|
+
private isOpening;
|
|
49
|
+
private isConnectedPromiseResolve;
|
|
50
|
+
private isConnectedPromise;
|
|
51
|
+
private readonly dialog;
|
|
52
|
+
private readonly scrim;
|
|
53
|
+
private readonly container;
|
|
54
|
+
private readonly headline;
|
|
55
|
+
private readonly content;
|
|
56
|
+
private readonly actions;
|
|
57
|
+
private isAtScrollTop;
|
|
58
|
+
private isAtScrollBottom;
|
|
59
|
+
private readonly scroller;
|
|
60
|
+
private readonly topAnchor;
|
|
61
|
+
private readonly bottomAnchor;
|
|
62
|
+
private nextClickIsFromContent;
|
|
63
|
+
private intersectionObserver?;
|
|
64
|
+
private hasHeadline;
|
|
65
|
+
private hasActions;
|
|
66
|
+
private hasIcon;
|
|
67
|
+
private escapePressedWithoutCancel;
|
|
68
|
+
constructor();
|
|
69
|
+
/**
|
|
70
|
+
* Opens the dialog and fires a cancelable `open` event. After a dialog's
|
|
71
|
+
* animation, an `opened` event is fired.
|
|
72
|
+
*
|
|
73
|
+
* Add an `autocomplete` attribute to a child of the dialog that should
|
|
74
|
+
* receive focus after opening.
|
|
75
|
+
*
|
|
76
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
77
|
+
* `opened` event was fired.
|
|
78
|
+
*/
|
|
79
|
+
show(): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
82
|
+
* animation, a `closed` event is fired.
|
|
83
|
+
*
|
|
84
|
+
* @param returnValue A return value usually indicating which button was used
|
|
85
|
+
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
86
|
+
* pressing Escape, it will not change the return value after closing.
|
|
87
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
88
|
+
* `closed` event was fired.
|
|
89
|
+
*/
|
|
90
|
+
close(returnValue?: string): Promise<void>;
|
|
91
|
+
connectedCallback(): void;
|
|
92
|
+
disconnectedCallback(): void;
|
|
93
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
94
|
+
protected firstUpdated(): void;
|
|
95
|
+
private handleDialogClick;
|
|
96
|
+
private handleContentClick;
|
|
97
|
+
private handleSubmit;
|
|
98
|
+
private handleCancel;
|
|
99
|
+
private handleClose;
|
|
100
|
+
private handleKeydown;
|
|
101
|
+
private animateDialog;
|
|
102
|
+
private handleHeadlineChange;
|
|
103
|
+
private handleActionsChange;
|
|
104
|
+
private handleIconChange;
|
|
105
|
+
private handleAnchorIntersection;
|
|
106
|
+
private getIsConnectedPromise;
|
|
107
|
+
}
|