@justeattakeaway/pie-modal 0.18.0 → 0.19.1
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/index.d.ts +19 -0
- package/dist/index.js +695 -692
- package/dist/react.d.ts +21 -0
- package/dist/react.js +53 -1569
- package/package.json +2 -1
- package/src/defs.ts +16 -0
- package/src/index.ts +17 -2
package/dist/react.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export declare type AriaProps = {
|
|
|
30
30
|
|
|
31
31
|
export declare const headingLevels: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
32
32
|
|
|
33
|
+
export declare type ModalActionType = 'leading' | 'supporting';
|
|
34
|
+
|
|
33
35
|
export declare type ModalProps = RTLComponentProps & {
|
|
34
36
|
/**
|
|
35
37
|
* The ARIA labels used for the modal close and back buttons, as well as loading state.
|
|
@@ -112,6 +114,13 @@ export declare const ON_MODAL_BACK_EVENT = "pie-modal-back";
|
|
|
112
114
|
*/
|
|
113
115
|
export declare const ON_MODAL_CLOSE_EVENT = "pie-modal-close";
|
|
114
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Event name for when the modal leading action is clicked.
|
|
119
|
+
*
|
|
120
|
+
* @constant
|
|
121
|
+
*/
|
|
122
|
+
export declare const ON_MODAL_LEADING_ACTION_CLICK = "pie-modal-leading-action-click";
|
|
123
|
+
|
|
115
124
|
/**
|
|
116
125
|
* Event name for when the modal is opened.
|
|
117
126
|
*
|
|
@@ -119,16 +128,27 @@ export declare const ON_MODAL_CLOSE_EVENT = "pie-modal-close";
|
|
|
119
128
|
*/
|
|
120
129
|
export declare const ON_MODAL_OPEN_EVENT = "pie-modal-open";
|
|
121
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Event name for when the modal supporting action is clicked.
|
|
133
|
+
*
|
|
134
|
+
* @constant
|
|
135
|
+
*/
|
|
136
|
+
export declare const ON_MODAL_SUPPORTING_ACTION_CLICK = "pie-modal-supporting-action-click";
|
|
137
|
+
|
|
122
138
|
export declare const PieModal: ReactWebComponent<PieModal_2, {
|
|
123
139
|
onPieModalOpen: EventName<CustomEvent<any>>;
|
|
124
140
|
onPieModalClose: EventName<CustomEvent<any>>;
|
|
125
141
|
onPieModalBack: EventName<CustomEvent<any>>;
|
|
142
|
+
onPieModalLeadingActionClick: EventName<CustomEvent<any>>;
|
|
143
|
+
onPieModalSupportingActionClick: EventName<CustomEvent<any>>;
|
|
126
144
|
}>;
|
|
127
145
|
|
|
128
146
|
/**
|
|
129
147
|
* @event {CustomEvent} pie-modal-open - when the modal is opened.
|
|
130
148
|
* @event {CustomEvent} pie-modal-close - when the modal is closed.
|
|
131
149
|
* @event {CustomEvent} pie-modal-back - when the modal back button is clicked.
|
|
150
|
+
* @event {CustomEvent} pie-modal-leading-action-click - when the modal leading action is clicked.
|
|
151
|
+
* @event {CustomEvent} pie-modal-supporting-action-click - when the modal supporting action is clicked.
|
|
132
152
|
*/
|
|
133
153
|
declare class PieModal_2 extends PieModal_base implements ModalProps {
|
|
134
154
|
aria: AriaProps;
|
|
@@ -171,6 +191,7 @@ declare class PieModal_2 extends PieModal_base implements ModalProps {
|
|
|
171
191
|
private _handleDialogCancelEvent;
|
|
172
192
|
private _handleModalOpenStateOnFirstRender;
|
|
173
193
|
private _handleModalOpenStateChanged;
|
|
194
|
+
private _handleActionClick;
|
|
174
195
|
/**
|
|
175
196
|
* Return focus to the specified element, providing the selector is valid
|
|
176
197
|
* and the chosen element can be found.
|