@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 CHANGED
@@ -28,6 +28,8 @@ export declare type AriaProps = {
28
28
 
29
29
  export declare const headingLevels: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
30
30
 
31
+ export declare type ModalActionType = 'leading' | 'supporting';
32
+
31
33
  export declare type ModalProps = RTLComponentProps & {
32
34
  /**
33
35
  * The ARIA labels used for the modal close and back buttons, as well as loading state.
@@ -110,6 +112,13 @@ export declare const ON_MODAL_BACK_EVENT = "pie-modal-back";
110
112
  */
111
113
  export declare const ON_MODAL_CLOSE_EVENT = "pie-modal-close";
112
114
 
115
+ /**
116
+ * Event name for when the modal leading action is clicked.
117
+ *
118
+ * @constant
119
+ */
120
+ export declare const ON_MODAL_LEADING_ACTION_CLICK = "pie-modal-leading-action-click";
121
+
113
122
  /**
114
123
  * Event name for when the modal is opened.
115
124
  *
@@ -117,10 +126,19 @@ export declare const ON_MODAL_CLOSE_EVENT = "pie-modal-close";
117
126
  */
118
127
  export declare const ON_MODAL_OPEN_EVENT = "pie-modal-open";
119
128
 
129
+ /**
130
+ * Event name for when the modal supporting action is clicked.
131
+ *
132
+ * @constant
133
+ */
134
+ export declare const ON_MODAL_SUPPORTING_ACTION_CLICK = "pie-modal-supporting-action-click";
135
+
120
136
  /**
121
137
  * @event {CustomEvent} pie-modal-open - when the modal is opened.
122
138
  * @event {CustomEvent} pie-modal-close - when the modal is closed.
123
139
  * @event {CustomEvent} pie-modal-back - when the modal back button is clicked.
140
+ * @event {CustomEvent} pie-modal-leading-action-click - when the modal leading action is clicked.
141
+ * @event {CustomEvent} pie-modal-supporting-action-click - when the modal supporting action is clicked.
124
142
  */
125
143
  export declare class PieModal extends PieModal_base implements ModalProps {
126
144
  aria: AriaProps;
@@ -163,6 +181,7 @@ export declare class PieModal extends PieModal_base implements ModalProps {
163
181
  private _handleDialogCancelEvent;
164
182
  private _handleModalOpenStateOnFirstRender;
165
183
  private _handleModalOpenStateChanged;
184
+ private _handleActionClick;
166
185
  /**
167
186
  * Return focus to the specified element, providing the selector is valid
168
187
  * and the chosen element can be found.