@ionic/core 9.0.3 → 9.0.4-dev.11789406216.162770a8
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/ion-input.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/p-CobW5muY.js +4 -0
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/ion-input.cjs.entry.js +8 -11
- package/dist/cjs/ion-select_3.cjs.entry.js +59 -39
- package/dist/cjs/ion-textarea.cjs.entry.js +7 -10
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{slot-mutation-controller-D6IjSEIh.js → slot-mutation-controller-yNStVQqX.js} +69 -0
- package/dist/collection/components/input/input.ios.css +6 -0
- package/dist/collection/components/input/input.js +6 -9
- package/dist/collection/components/input/input.md.css +6 -0
- package/dist/collection/components/select/select.ios.css +1 -1
- package/dist/collection/components/select/select.js +67 -38
- package/dist/collection/components/select/select.md.css +1 -1
- package/dist/collection/components/textarea/textarea.ios.css +15 -1
- package/dist/collection/components/textarea/textarea.js +5 -8
- package/dist/collection/components/textarea/textarea.md.css +15 -1
- package/dist/collection/utils/forms/click-controller.js +70 -0
- package/dist/collection/utils/forms/index.js +1 -0
- package/dist/docs.json +8 -2
- package/dist/esm/ion-input.entry.js +8 -11
- package/dist/esm/ion-select_3.entry.js +59 -39
- package/dist/esm/ion-textarea.entry.js +7 -10
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{slot-mutation-controller-B5NpUZ-N.js → slot-mutation-controller-BVnANfIt.js} +68 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-1e64f5c7.entry.js +4 -0
- package/dist/ionic/p-723f4dcd.entry.js +4 -0
- package/dist/ionic/p-DcCEP7Ss.js +4 -0
- package/dist/ionic/p-ed725cdf.entry.js +4 -0
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +11 -0
- package/dist/types/components/textarea/textarea.d.ts +1 -0
- package/dist/types/utils/forms/click-controller.d.ts +36 -0
- package/dist/types/utils/forms/index.d.ts +1 -0
- package/hydrate/index.js +139 -58
- package/hydrate/index.mjs +139 -58
- package/package.json +2 -2
- package/components/p-Cw6WocLJ.js +0 -4
- package/dist/ionic/p-7e394cc3.entry.js +0 -4
- package/dist/ionic/p-9ee9c5b6.entry.js +0 -4
- package/dist/ionic/p-CkxVYPtX.js +0 -4
- package/dist/ionic/p-f83b3e0c.entry.js +0 -4
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface ClickController {
|
|
2
|
+
handleClickCapture: (ev: Event) => void;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* The content slotted into a form control's start or end slot that a click
|
|
6
|
+
* started on, or `null` when the click did not start on slotted content.
|
|
7
|
+
*
|
|
8
|
+
* The slotted element is compared against the host in case the form control
|
|
9
|
+
* itself is slotted into, for example, an item. Without that check a control
|
|
10
|
+
* carrying slot="start"/"end" would treat every click on itself as a slotted
|
|
11
|
+
* click.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getSlottedClickContent: (ev: Event, el: HTMLElement) => HTMLElement | null;
|
|
14
|
+
/**
|
|
15
|
+
* A utility for form components that wrap their content in a <label>, such as
|
|
16
|
+
* ion-input, ion-textarea and ion-select.
|
|
17
|
+
*
|
|
18
|
+
* Clicking slotted content also clicks that label, and the browser follows it
|
|
19
|
+
* with a click on the label's control. That second click would be emitted from
|
|
20
|
+
* the host as a duplicate, so the slotted click is remembered and the click
|
|
21
|
+
* that follows it is suppressed.
|
|
22
|
+
*
|
|
23
|
+
* Browsers skip the forwarding when the click lands on interactive content,
|
|
24
|
+
* such as a slotted button, so the slotted click is remembered for a frame
|
|
25
|
+
* rather than until a forwarded click that may never arrive.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
* @param el - The host element.
|
|
29
|
+
* @param getNativeInput - A callback returning the native form control the
|
|
30
|
+
* label points at, for components that have one. Those components emit the
|
|
31
|
+
* click from the host rather than the control, so the control's click is
|
|
32
|
+
* always stopped and re-dispatched from the host. Omit it for components whose
|
|
33
|
+
* label has no `for` attribute, such as ion-select, where the browser forwards
|
|
34
|
+
* to an internal control that already re-bubbles targeting the host.
|
|
35
|
+
*/
|
|
36
|
+
export declare const createClickController: (el: HTMLElement, getNativeInput?: () => HTMLInputElement | HTMLTextAreaElement | undefined) => ClickController;
|