@ionic/core 7.3.1-nightly.20230817 → 7.3.1-nightly.20230818
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/components/button.js +16 -0
- package/dist/cjs/ion-button_2.cjs.entry.js +16 -0
- package/dist/collection/components/button/button.js +16 -0
- package/dist/docs.json +1 -1
- package/dist/esm/ion-button_2.entry.js +16 -0
- package/dist/types/components/button/button.d.ts +9 -0
- package/hydrate/index.js +16 -0
- package/package.json +1 -1
package/components/button.js
CHANGED
|
@@ -63,6 +63,15 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
|
|
|
63
63
|
this.formButtonEl.disabled = disabled;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* This is responsible for rendering a hidden native
|
|
68
|
+
* button element inside the associated form. This allows
|
|
69
|
+
* users to submit a form by pressing "Enter" when a text
|
|
70
|
+
* field inside of the form is focused. The native button
|
|
71
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
72
|
+
* and therefore does not participate in form submission
|
|
73
|
+
* which is why the following code is necessary.
|
|
74
|
+
*/
|
|
66
75
|
renderHiddenButton() {
|
|
67
76
|
const formEl = (this.formEl = this.findForm());
|
|
68
77
|
if (formEl) {
|
|
@@ -181,6 +190,13 @@ const Button = /*@__PURE__*/ proxyCustomElement(class Button extends HTMLElement
|
|
|
181
190
|
if (fill == null) {
|
|
182
191
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
183
192
|
}
|
|
193
|
+
/**
|
|
194
|
+
* We call renderHiddenButton in the render function to account
|
|
195
|
+
* for any properties being set async. For example, changing the
|
|
196
|
+
* "type" prop from "button" to "submit" after the component has
|
|
197
|
+
* loaded would warrant the hidden button being added to the
|
|
198
|
+
* associated form.
|
|
199
|
+
*/
|
|
184
200
|
{
|
|
185
201
|
type !== 'button' && this.renderHiddenButton();
|
|
186
202
|
}
|
|
@@ -184,6 +184,15 @@ const Button = class {
|
|
|
184
184
|
this.formButtonEl.disabled = disabled;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* This is responsible for rendering a hidden native
|
|
189
|
+
* button element inside the associated form. This allows
|
|
190
|
+
* users to submit a form by pressing "Enter" when a text
|
|
191
|
+
* field inside of the form is focused. The native button
|
|
192
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
193
|
+
* and therefore does not participate in form submission
|
|
194
|
+
* which is why the following code is necessary.
|
|
195
|
+
*/
|
|
187
196
|
renderHiddenButton() {
|
|
188
197
|
const formEl = (this.formEl = this.findForm());
|
|
189
198
|
if (formEl) {
|
|
@@ -302,6 +311,13 @@ const Button = class {
|
|
|
302
311
|
if (fill == null) {
|
|
303
312
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
304
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* We call renderHiddenButton in the render function to account
|
|
316
|
+
* for any properties being set async. For example, changing the
|
|
317
|
+
* "type" prop from "button" to "submit" after the component has
|
|
318
|
+
* loaded would warrant the hidden button being added to the
|
|
319
|
+
* associated form.
|
|
320
|
+
*/
|
|
305
321
|
{
|
|
306
322
|
type !== 'button' && this.renderHiddenButton();
|
|
307
323
|
}
|
|
@@ -62,6 +62,15 @@ export class Button {
|
|
|
62
62
|
this.formButtonEl.disabled = disabled;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* This is responsible for rendering a hidden native
|
|
67
|
+
* button element inside the associated form. This allows
|
|
68
|
+
* users to submit a form by pressing "Enter" when a text
|
|
69
|
+
* field inside of the form is focused. The native button
|
|
70
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
71
|
+
* and therefore does not participate in form submission
|
|
72
|
+
* which is why the following code is necessary.
|
|
73
|
+
*/
|
|
65
74
|
renderHiddenButton() {
|
|
66
75
|
const formEl = (this.formEl = this.findForm());
|
|
67
76
|
if (formEl) {
|
|
@@ -180,6 +189,13 @@ export class Button {
|
|
|
180
189
|
if (fill == null) {
|
|
181
190
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
182
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* We call renderHiddenButton in the render function to account
|
|
194
|
+
* for any properties being set async. For example, changing the
|
|
195
|
+
* "type" prop from "button" to "submit" after the component has
|
|
196
|
+
* loaded would warrant the hidden button being added to the
|
|
197
|
+
* associated form.
|
|
198
|
+
*/
|
|
183
199
|
{
|
|
184
200
|
type !== 'button' && this.renderHiddenButton();
|
|
185
201
|
}
|
package/dist/docs.json
CHANGED
|
@@ -180,6 +180,15 @@ const Button = class {
|
|
|
180
180
|
this.formButtonEl.disabled = disabled;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* This is responsible for rendering a hidden native
|
|
185
|
+
* button element inside the associated form. This allows
|
|
186
|
+
* users to submit a form by pressing "Enter" when a text
|
|
187
|
+
* field inside of the form is focused. The native button
|
|
188
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
189
|
+
* and therefore does not participate in form submission
|
|
190
|
+
* which is why the following code is necessary.
|
|
191
|
+
*/
|
|
183
192
|
renderHiddenButton() {
|
|
184
193
|
const formEl = (this.formEl = this.findForm());
|
|
185
194
|
if (formEl) {
|
|
@@ -298,6 +307,13 @@ const Button = class {
|
|
|
298
307
|
if (fill == null) {
|
|
299
308
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
300
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* We call renderHiddenButton in the render function to account
|
|
312
|
+
* for any properties being set async. For example, changing the
|
|
313
|
+
* "type" prop from "button" to "submit" after the component has
|
|
314
|
+
* loaded would warrant the hidden button being added to the
|
|
315
|
+
* associated form.
|
|
316
|
+
*/
|
|
301
317
|
{
|
|
302
318
|
type !== 'button' && this.renderHiddenButton();
|
|
303
319
|
}
|
|
@@ -111,6 +111,15 @@ export declare class Button implements ComponentInterface, AnchorInterface, Butt
|
|
|
111
111
|
* Emitted when the button loses focus.
|
|
112
112
|
*/
|
|
113
113
|
ionBlur: EventEmitter<void>;
|
|
114
|
+
/**
|
|
115
|
+
* This is responsible for rendering a hidden native
|
|
116
|
+
* button element inside the associated form. This allows
|
|
117
|
+
* users to submit a form by pressing "Enter" when a text
|
|
118
|
+
* field inside of the form is focused. The native button
|
|
119
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
120
|
+
* and therefore does not participate in form submission
|
|
121
|
+
* which is why the following code is necessary.
|
|
122
|
+
*/
|
|
114
123
|
private renderHiddenButton;
|
|
115
124
|
componentWillLoad(): void;
|
|
116
125
|
private get hasIconOnly();
|
package/hydrate/index.js
CHANGED
|
@@ -11363,6 +11363,15 @@ class Button {
|
|
|
11363
11363
|
this.formButtonEl.disabled = disabled;
|
|
11364
11364
|
}
|
|
11365
11365
|
}
|
|
11366
|
+
/**
|
|
11367
|
+
* This is responsible for rendering a hidden native
|
|
11368
|
+
* button element inside the associated form. This allows
|
|
11369
|
+
* users to submit a form by pressing "Enter" when a text
|
|
11370
|
+
* field inside of the form is focused. The native button
|
|
11371
|
+
* rendered inside of `ion-button` is in the Shadow DOM
|
|
11372
|
+
* and therefore does not participate in form submission
|
|
11373
|
+
* which is why the following code is necessary.
|
|
11374
|
+
*/
|
|
11366
11375
|
renderHiddenButton() {
|
|
11367
11376
|
const formEl = (this.formEl = this.findForm());
|
|
11368
11377
|
if (formEl) {
|
|
@@ -11481,6 +11490,13 @@ class Button {
|
|
|
11481
11490
|
if (fill == null) {
|
|
11482
11491
|
fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
|
|
11483
11492
|
}
|
|
11493
|
+
/**
|
|
11494
|
+
* We call renderHiddenButton in the render function to account
|
|
11495
|
+
* for any properties being set async. For example, changing the
|
|
11496
|
+
* "type" prop from "button" to "submit" after the component has
|
|
11497
|
+
* loaded would warrant the hidden button being added to the
|
|
11498
|
+
* associated form.
|
|
11499
|
+
*/
|
|
11484
11500
|
{
|
|
11485
11501
|
type !== 'button' && this.renderHiddenButton();
|
|
11486
11502
|
}
|