@ionic/core 8.8.19-dev.11786730389.1a1927bf → 8.8.19-dev.11786735826.1fad7c0a
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-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-button.js +1 -1
- package/components/ion-card.js +1 -1
- package/components/ion-chip.js +1 -1
- package/components/ion-datetime-button.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-fab-button.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-input-otp.js +1 -1
- package/components/ion-input-password-toggle.js +1 -1
- package/components/ion-input.js +1 -1
- package/components/ion-item-divider.js +1 -1
- package/components/ion-item-group.js +1 -1
- package/components/ion-item-option.js +1 -1
- package/components/ion-item-options.js +1 -1
- package/components/ion-item-sliding.js +1 -1
- package/components/ion-item.js +1 -1
- package/components/ion-label.js +1 -1
- package/components/ion-list-header.js +1 -1
- package/components/ion-list.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-menu-toggle.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-nav-link.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-note.js +1 -1
- package/components/ion-picker-column-option.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-progress-bar.js +1 -1
- package/components/ion-radio-group.js +1 -1
- package/components/ion-radio.js +1 -1
- package/components/ion-range.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-reorder-group.js +1 -1
- package/components/ion-reorder.js +1 -1
- package/components/ion-ripple-effect.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-row.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-segment-content.js +1 -1
- package/components/ion-segment-view.js +1 -1
- package/components/ion-segment.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/{p-C1O9GEug.js → p--m5cCjbK.js} +1 -1
- package/components/{p-CfnGxjv-.js → p-B4uHHhPK.js} +1 -1
- package/components/{p-BxUIQcD9.js → p-BOvLNVKq.js} +1 -1
- package/components/{p-D_XD0pVT.js → p-BWBigMsI.js} +1 -1
- package/components/{p-xOjr4bwc.js → p-BZ4-QTes.js} +1 -1
- package/components/{p-tYCT3JGl.js → p-BjluhQMI.js} +1 -1
- package/components/{p-ClFYbgND.js → p-BlsIikdZ.js} +1 -1
- package/components/{p-Obm7si-x.js → p-Blug1Vxu.js} +1 -1
- package/components/{p-DTY4otpr.js → p-C91npEel.js} +1 -1
- package/components/{p-CVnwvOBD.js → p-CVb3x_r3.js} +1 -1
- package/components/{p-B6dUPQXq.js → p-CWLrHG8Y.js} +1 -1
- package/components/{p-0Pyit076.js → p-CfnNZz_d.js} +1 -1
- package/components/{p-DyePCNGr.js → p-DKrhJJV0.js} +1 -1
- package/components/p-DSzSbVP2.js +4 -0
- package/components/{p-BsVxQGUT.js → p-DgZOZQjJ.js} +1 -1
- package/components/{p-BO4sUqUv.js → p-Dmd2xqCe.js} +1 -1
- package/components/{p-83oP9gzn.js → p-GG5GhznE.js} +1 -1
- package/components/{p-Bc4wROfM.js → p-UQSiXX2Z.js} +1 -1
- package/components/{p-Dm7h4Nyv.js → p-qT1szVjw.js} +1 -1
- package/components/p-ypuYdSDB.js +4 -0
- package/dist/cjs/input.utils-BZdMWVrt.js +35 -0
- package/dist/cjs/ion-app_8.cjs.entry.js +5 -5
- package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ion-input.cjs.entry.js +42 -56
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +12 -12
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ion-radio_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +4 -4
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +41 -59
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +44 -55
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +4 -4
- package/dist/cjs/slot-mutation-controller-CgTGFqlW.js +397 -0
- package/dist/collection/components/input/input.ios.css +56 -24
- package/dist/collection/components/input/input.js +36 -51
- package/dist/collection/components/input/input.md.css +78 -41
- package/dist/collection/components/input-otp/input-otp.js +3 -3
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +3 -3
- package/dist/collection/components/item-divider/item-divider.js +2 -2
- package/dist/collection/components/item-group/item-group.js +1 -1
- package/dist/collection/components/item-option/item-option.js +2 -2
- package/dist/collection/components/item-options/item-options.js +1 -1
- package/dist/collection/components/item-sliding/item-sliding.js +1 -1
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list-header/list-header.js +2 -2
- package/dist/collection/components/loading/loading.js +2 -2
- package/dist/collection/components/menu/menu.js +2 -2
- package/dist/collection/components/menu-button/menu-button.js +2 -2
- package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
- package/dist/collection/components/modal/modal.js +4 -4
- package/dist/collection/components/nav/nav.js +1 -1
- package/dist/collection/components/nav-link/nav-link.js +1 -1
- package/dist/collection/components/note/note.js +2 -2
- package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio/radio.js +3 -3
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/refresher/refresher.js +1 -1
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/reorder/reorder.js +1 -1
- package/dist/collection/components/reorder-group/reorder-group.js +1 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
- package/dist/collection/components/router-link/router-link.js +2 -2
- package/dist/collection/components/router-outlet/router-outlet.js +1 -1
- package/dist/collection/components/row/row.js +1 -1
- package/dist/collection/components/searchbar/searchbar.js +4 -4
- package/dist/collection/components/segment/segment.js +2 -2
- package/dist/collection/components/segment-button/segment-button.js +2 -2
- package/dist/collection/components/segment-content/segment-content.js +1 -1
- package/dist/collection/components/segment-view/segment-view.js +2 -2
- package/dist/collection/components/select/select.ios.css +63 -69
- package/dist/collection/components/select/select.js +40 -55
- package/dist/collection/components/select/select.md.css +85 -85
- package/dist/collection/components/select-modal/select-modal.js +1 -1
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/select-popover/select-popover.js +1 -1
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.ios.css +94 -62
- package/dist/collection/components/textarea/textarea.js +39 -51
- package/dist/collection/components/textarea/textarea.md.css +103 -77
- package/dist/collection/components/thumbnail/thumbnail.js +1 -1
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/toast.js +2 -2
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/forms/index.js +1 -0
- package/dist/collection/utils/forms/start-container-controller.js +132 -0
- package/dist/docs.json +22 -6
- package/dist/esm/input.utils-B1ValN_N.js +33 -0
- package/dist/esm/ion-app_8.entry.js +5 -5
- package/dist/esm/ion-avatar_3.entry.js +1 -1
- package/dist/esm/ion-col_3.entry.js +1 -1
- package/dist/esm/ion-input-otp.entry.js +3 -3
- package/dist/esm/ion-input-password-toggle.entry.js +3 -3
- package/dist/esm/ion-input.entry.js +40 -54
- package/dist/esm/ion-item-option_3.entry.js +4 -4
- package/dist/esm/ion-item_8.entry.js +12 -12
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +4 -4
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-picker-column-option.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-progress-bar.entry.js +1 -1
- package/dist/esm/ion-radio_2.entry.js +4 -4
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +1 -1
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment-content.entry.js +1 -1
- package/dist/esm/ion-segment-view.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +40 -58
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +43 -54
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +4 -4
- package/dist/esm/slot-mutation-controller-u741eD3Z.js +393 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-dbfd2d52.entry.js → p-06533d51.entry.js} +1 -1
- package/dist/ionic/{p-a641d428.entry.js → p-141f5b47.entry.js} +1 -1
- package/dist/ionic/p-14a5e8f5.entry.js +4 -0
- package/dist/ionic/{p-12589d59.entry.js → p-19269e04.entry.js} +1 -1
- package/dist/ionic/{p-efef6788.entry.js → p-19abbc33.entry.js} +1 -1
- package/dist/ionic/{p-5394e1d4.entry.js → p-4204184c.entry.js} +1 -1
- package/dist/ionic/p-4bc3ecdb.entry.js +4 -0
- package/dist/ionic/{p-21a7fb2a.entry.js → p-4eed9ca1.entry.js} +1 -1
- package/dist/ionic/p-5521dc1f.entry.js +4 -0
- package/dist/ionic/p-5c3626de.entry.js +4 -0
- package/dist/ionic/{p-374b10cb.entry.js → p-5d3b411c.entry.js} +1 -1
- package/dist/ionic/p-60576951.entry.js +4 -0
- package/dist/ionic/{p-1d2e53e8.entry.js → p-711a8319.entry.js} +1 -1
- package/dist/ionic/{p-48b6835f.entry.js → p-71419a55.entry.js} +1 -1
- package/dist/ionic/{p-ba8a598f.entry.js → p-79325ffe.entry.js} +1 -1
- package/dist/ionic/p-84a38904.entry.js +4 -0
- package/dist/ionic/{p-bf7c1f05.entry.js → p-8f204f1e.entry.js} +1 -1
- package/dist/ionic/p-9055e897.entry.js +4 -0
- package/dist/ionic/{p-6277efba.entry.js → p-9658e083.entry.js} +1 -1
- package/dist/ionic/{p-74f30659.entry.js → p-988baee1.entry.js} +1 -1
- package/dist/ionic/p-DAztxQR0.js +4 -0
- package/dist/ionic/p-DkUB-ROc.js +4 -0
- package/dist/ionic/{p-3835a020.entry.js → p-a71232d6.entry.js} +1 -1
- package/dist/ionic/{p-08f1ed1c.entry.js → p-a73d8742.entry.js} +1 -1
- package/dist/ionic/{p-8a21bdbd.entry.js → p-a8421d18.entry.js} +1 -1
- package/dist/ionic/{p-2ce59395.entry.js → p-a8c2c343.entry.js} +1 -1
- package/dist/ionic/{p-c3f65965.entry.js → p-bc2bad5f.entry.js} +1 -1
- package/dist/ionic/{p-f622796d.entry.js → p-be08d500.entry.js} +1 -1
- package/dist/ionic/p-be9a4f51.entry.js +4 -0
- package/dist/ionic/{p-33829e94.entry.js → p-ccc5044d.entry.js} +1 -1
- package/dist/ionic/{p-3c5fdd27.entry.js → p-ce32912b.entry.js} +1 -1
- package/dist/ionic/p-ded69ceb.entry.js +4 -0
- package/dist/ionic/{p-cec87704.entry.js → p-e0c6e31e.entry.js} +1 -1
- package/dist/ionic/{p-09b47b7d.entry.js → p-e8c3e08a.entry.js} +1 -1
- package/dist/ionic/{p-8f3a1995.entry.js → p-ed5d540d.entry.js} +1 -1
- package/dist/ionic/{p-6b286c5c.entry.js → p-f2802440.entry.js} +1 -1
- package/dist/ionic/{p-62e71297.entry.js → p-fe1bfbcf.entry.js} +1 -1
- package/dist/types/components/input/input.d.ts +11 -5
- package/dist/types/components/select/select.d.ts +12 -6
- package/dist/types/components/textarea/textarea.d.ts +12 -5
- package/dist/types/utils/forms/index.d.ts +1 -0
- package/dist/types/utils/forms/start-container-controller.d.ts +34 -0
- package/hydrate/index.js +350 -267
- package/hydrate/index.mjs +350 -267
- package/package.json +4 -4
- package/components/p-DIgGHN7D.js +0 -4
- package/components/p-MCJ7HjWe.js +0 -4
- package/dist/cjs/input.utils-CP4fzrqk.js +0 -149
- package/dist/cjs/notch-controller-BEUpEgb5.js +0 -155
- package/dist/esm/input.utils-J6HWocLA.js +0 -146
- package/dist/esm/notch-controller-CrUGyHYz.js +0 -153
- package/dist/ionic/p-0266b7e1.entry.js +0 -4
- package/dist/ionic/p-214e000a.entry.js +0 -4
- package/dist/ionic/p-91c6faf1.entry.js +0 -4
- package/dist/ionic/p-9b865fe6.entry.js +0 -4
- package/dist/ionic/p-BnMQxWON.js +0 -4
- package/dist/ionic/p-ac6ef997.entry.js +0 -4
- package/dist/ionic/p-b24dc0a1.entry.js +0 -4
- package/dist/ionic/p-c8fbe544.entry.js +0 -4
- package/dist/ionic/p-cb12f6c3.entry.js +0 -4
- package/dist/ionic/p-ede019ef.entry.js +0 -4
- package/dist/ionic/p-kJA95YWg.js +0 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { Build, Host, forceUpdate, h, } from "@stencil/core";
|
|
5
|
-
import { createNotchController, checkInvalidState } from "../../utils/forms/index";
|
|
5
|
+
import { createNotchController, createStartContainerController, checkInvalidState } from "../../utils/forms/index";
|
|
6
6
|
import { inheritAriaAttributes, debounceEvent, inheritAttributes, componentOnReady } from "../../utils/helpers";
|
|
7
7
|
import { createSlotMutationController } from "../../utils/slot-mutation-controller";
|
|
8
8
|
import { createColorClasses, hostContext } from "../../utils/theme";
|
|
@@ -27,6 +27,8 @@ export class Input {
|
|
|
27
27
|
slotMutationController;
|
|
28
28
|
notchController;
|
|
29
29
|
notchSpacerEl;
|
|
30
|
+
startContainerController;
|
|
31
|
+
startContainerEl;
|
|
30
32
|
originalIonInput;
|
|
31
33
|
/**
|
|
32
34
|
* `true` if the input was cleared as a result of the user typing
|
|
@@ -321,11 +323,16 @@ export class Input {
|
|
|
321
323
|
connectedCallback() {
|
|
322
324
|
const { el } = this;
|
|
323
325
|
this.slotMutationController = createSlotMutationController(el, ['label', 'start', 'end'], () => {
|
|
326
|
+
this.startContainerController?.calculateStartContainerWidth();
|
|
324
327
|
this.setSlottedLabelId();
|
|
325
328
|
forceUpdate(this);
|
|
326
329
|
});
|
|
327
330
|
this.setSlottedLabelId();
|
|
328
331
|
this.notchController = createNotchController(el, () => this.notchSpacerEl, () => this.labelSlot);
|
|
332
|
+
this.startContainerController = createStartContainerController(el, () => this.startContainerEl, () => {
|
|
333
|
+
return Build.isBrowser && getIonMode(this) === 'md' && this.fill === 'outline';
|
|
334
|
+
});
|
|
335
|
+
this.startContainerController.calculateStartContainerWidth();
|
|
329
336
|
// Watch for class changes to update validation state
|
|
330
337
|
if (Build.isBrowser && typeof MutationObserver !== 'undefined') {
|
|
331
338
|
this.validationObserver = new MutationObserver(() => {
|
|
@@ -363,6 +370,7 @@ export class Input {
|
|
|
363
370
|
}
|
|
364
371
|
componentDidRender() {
|
|
365
372
|
this.notchController?.calculateNotchWidth();
|
|
373
|
+
this.startContainerController?.calculateStartContainerWidth();
|
|
366
374
|
}
|
|
367
375
|
disconnectedCallback() {
|
|
368
376
|
if (Build.isBrowser) {
|
|
@@ -378,6 +386,10 @@ export class Input {
|
|
|
378
386
|
this.notchController.destroy();
|
|
379
387
|
this.notchController = undefined;
|
|
380
388
|
}
|
|
389
|
+
if (this.startContainerController) {
|
|
390
|
+
this.startContainerController.destroy();
|
|
391
|
+
this.startContainerController = undefined;
|
|
392
|
+
}
|
|
381
393
|
// Clean up validation observer to prevent memory leaks
|
|
382
394
|
if (this.validationObserver) {
|
|
383
395
|
this.validationObserver.disconnect();
|
|
@@ -618,47 +630,32 @@ export class Input {
|
|
|
618
630
|
return this.label !== undefined || this.labelSlot !== null;
|
|
619
631
|
}
|
|
620
632
|
/**
|
|
621
|
-
* Stops propagation
|
|
622
|
-
*
|
|
633
|
+
* Stops propagation for clicks on the input's own content (label text,
|
|
634
|
+
* input field) to prevent double-click events. Allows clicks on slotted
|
|
635
|
+
* content to propagate so event delegation works for parent handlers.
|
|
636
|
+
*
|
|
637
|
+
* Only slots belonging directly to this input should be considered.
|
|
638
|
+
* The input itself may have a slot attribute when placed in an item
|
|
639
|
+
* or toolbar, which does not make its content slotted content.
|
|
623
640
|
*/
|
|
624
641
|
onLabelClick = (ev) => {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
if (
|
|
642
|
+
const target = ev.target;
|
|
643
|
+
const slotted = target.closest('[slot="start"], [slot="end"]');
|
|
644
|
+
if (slotted === null || slotted === this.el || !this.el.contains(slotted)) {
|
|
628
645
|
ev.stopPropagation();
|
|
629
646
|
}
|
|
630
647
|
};
|
|
631
648
|
/**
|
|
632
|
-
* Renders the border
|
|
633
|
-
* when fill="outline".
|
|
649
|
+
* Renders the outline border with a notch for the label.
|
|
634
650
|
*/
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
* The outline fill has a special outline
|
|
641
|
-
* that appears around the input and the label.
|
|
642
|
-
* Certain stacked and floating label placements cause the
|
|
643
|
-
* label to translate up and create a "cut out"
|
|
644
|
-
* inside of that border by using the notch-spacer element.
|
|
645
|
-
*/
|
|
646
|
-
return [
|
|
647
|
-
h("div", { class: "input-outline-container" }, h("div", { class: "input-outline-start" }), h("div", { class: {
|
|
648
|
-
'input-outline-notch': true,
|
|
649
|
-
'input-outline-notch-hidden': !this.hasLabel,
|
|
650
|
-
} }, h("div", { class: "notch-spacer", "aria-hidden": "true", ref: (el) => (this.notchSpacerEl = el) }, this.label)), h("div", { class: "input-outline-end" })),
|
|
651
|
-
this.renderLabel(),
|
|
652
|
-
];
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* If not using the outline style,
|
|
656
|
-
* we can render just the label.
|
|
657
|
-
*/
|
|
658
|
-
return this.renderLabel();
|
|
651
|
+
renderOutlineContainer() {
|
|
652
|
+
return (h("div", { class: "input-outline-container" }, h("div", { class: "input-outline-start" }), h("div", { class: {
|
|
653
|
+
'input-outline-notch': true,
|
|
654
|
+
'input-outline-notch-hidden': !this.hasLabel,
|
|
655
|
+
} }, h("div", { class: "notch-spacer", "aria-hidden": "true", ref: (el) => (this.notchSpacerEl = el) }, this.label)), h("div", { class: "input-outline-end" })));
|
|
659
656
|
}
|
|
660
657
|
render() {
|
|
661
|
-
const { disabled, fill, readonly, shape, inputId, labelPlacement,
|
|
658
|
+
const { disabled, fill, readonly, shape, inputId, labelPlacement, hasFocus, clearInputIcon } = this;
|
|
662
659
|
const mode = getIonMode(this);
|
|
663
660
|
const value = this.getValue();
|
|
664
661
|
const inItem = hostContext('ion-item', this.el);
|
|
@@ -666,26 +663,14 @@ export class Input {
|
|
|
666
663
|
const defaultClearIcon = mode === 'ios' ? closeCircle : closeSharp;
|
|
667
664
|
const clearIconData = clearInputIcon ?? defaultClearIcon;
|
|
668
665
|
const hasValue = this.hasValue();
|
|
669
|
-
const
|
|
666
|
+
const hasOutlineFill = mode === 'md' && fill === 'outline';
|
|
670
667
|
/**
|
|
671
668
|
* If the label is stacked, it should always sit above the input.
|
|
672
669
|
* For floating labels, the label should move above the input if
|
|
673
|
-
* the input has a value
|
|
674
|
-
* the start or end slot.
|
|
675
|
-
*
|
|
676
|
-
* If there is content in the start slot, the label would overlap
|
|
677
|
-
* it if not forced to float. This is also applied to the end slot
|
|
678
|
-
* because with the default or solid fills, the input is not
|
|
679
|
-
* vertically centered in the container, but the label is. This
|
|
680
|
-
* causes the slots and label to appear vertically offset from each
|
|
681
|
-
* other when the label isn't floating above the input. This doesn't
|
|
682
|
-
* apply to the outline fill, but this was not accounted for to keep
|
|
683
|
-
* things consistent.
|
|
684
|
-
*
|
|
685
|
-
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
670
|
+
* the input has a value or is focused.
|
|
686
671
|
*/
|
|
687
|
-
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus
|
|
688
|
-
return (h(Host, { key: '
|
|
672
|
+
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus));
|
|
673
|
+
return (h(Host, { key: '9e9495b8f962372d526343ff76b80fb9700fce19', class: createColorClasses(this.color, {
|
|
689
674
|
[mode]: true,
|
|
690
675
|
'has-value': hasValue,
|
|
691
676
|
'has-focus': hasFocus,
|
|
@@ -696,14 +681,14 @@ export class Input {
|
|
|
696
681
|
'in-item': inItem,
|
|
697
682
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
698
683
|
'input-disabled': disabled,
|
|
699
|
-
}) }, h("label", { key: '
|
|
684
|
+
}) }, h("label", { key: '7121f34ed782caf7a7b82703b94fc9d6c78ce5ba', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, hasOutlineFill && this.renderOutlineContainer(), h("div", { key: '0c1f8526d86c8a2433c23873fa64b1edc0eafe29', class: "input-start", ref: (el) => (this.startContainerEl = el) }, h("slot", { key: 'a50323fde0fb12997c2324eded132908680ea450', name: "start" })), h("div", { key: '626360c4e115a5286baab49680b2a02cd39614c8', class: "input-control" }, this.renderLabel(), h("div", { key: '1cefd9d8cd6ed96fab7b58237f8f8b0c5e1be92e', class: "native-wrapper", onClick: this.onLabelClick }, h("input", { key: '3dee5302f3a685a848fedd7e1face5095e3ac64b', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect ? 'on' : 'off', autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-labelledby": this.getLabelledById(), ...this.inheritedAttributes }))), h("div", { key: '39fff82e00e63963fe5f17794900ace2a3faa208', class: "input-end" }, this.clearInput && !readonly && !disabled && (h("button", { key: '1fa86fdb5baf4a7cd531ee0fe767a42b44fb33fc', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
700
685
|
/**
|
|
701
686
|
* This prevents mobile browsers from
|
|
702
687
|
* blurring the input when the clear
|
|
703
688
|
* button is activated.
|
|
704
689
|
*/
|
|
705
690
|
ev.preventDefault();
|
|
706
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
691
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: 'ced39304f97e56870f7480afa025ffe232010cfb', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: 'f4098769eef1cc5aa2074c369f757ccb94a98e1c', name: "end" })), shouldRenderHighlight && h("div", { key: '258fe6ff8f9f57836f2a3a0b6163bd2b7dbf0699', class: "input-highlight" })), this.renderBottomContent()));
|
|
707
692
|
}
|
|
708
693
|
static get is() { return "ion-input"; }
|
|
709
694
|
static get encapsulation() { return "scoped"; }
|
|
@@ -206,12 +206,6 @@
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
.input-clear-icon {
|
|
209
|
-
-webkit-margin-start: auto;
|
|
210
|
-
margin-inline-start: auto;
|
|
211
|
-
-webkit-margin-end: auto;
|
|
212
|
-
margin-inline-end: auto;
|
|
213
|
-
margin-top: auto;
|
|
214
|
-
margin-bottom: auto;
|
|
215
209
|
padding-left: 0;
|
|
216
210
|
padding-right: 0;
|
|
217
211
|
padding-top: 0;
|
|
@@ -269,14 +263,47 @@
|
|
|
269
263
|
line-height: normal;
|
|
270
264
|
}
|
|
271
265
|
|
|
266
|
+
.input-control {
|
|
267
|
+
display: flex;
|
|
268
|
+
flex-grow: 1;
|
|
269
|
+
width: 100%;
|
|
270
|
+
/**
|
|
271
|
+
* Allows the control to shrink below the label and input's intrinsic
|
|
272
|
+
* width, preventing the start and end slots from being pushed outside
|
|
273
|
+
* the wrapper. The label and input truncate independently, so it can
|
|
274
|
+
* use whatever space remains after accounting for the slots.
|
|
275
|
+
*/
|
|
276
|
+
min-width: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
272
279
|
.native-wrapper {
|
|
273
280
|
display: flex;
|
|
274
281
|
position: relative;
|
|
275
282
|
flex-grow: 1;
|
|
276
|
-
align-items: center;
|
|
277
283
|
width: 100%;
|
|
278
284
|
}
|
|
279
285
|
|
|
286
|
+
/**
|
|
287
|
+
* When the label sits beside the input, the label should size to its content
|
|
288
|
+
* and the input should take the remaining space. A zero flex basis prevents
|
|
289
|
+
* the input from requesting its full width and forcing the label to shrink.
|
|
290
|
+
* Stacked and floating placements use a column layout, so their flex basis
|
|
291
|
+
* controls height instead and does not need to be overridden.
|
|
292
|
+
*/
|
|
293
|
+
:host(.input-label-placement-start) .native-wrapper,
|
|
294
|
+
:host(.input-label-placement-end) .native-wrapper,
|
|
295
|
+
:host(.input-label-placement-fixed) .native-wrapper {
|
|
296
|
+
flex: 1 1 0;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.input-start,
|
|
300
|
+
.input-end {
|
|
301
|
+
display: flex;
|
|
302
|
+
position: relative;
|
|
303
|
+
flex-shrink: 0;
|
|
304
|
+
align-items: center;
|
|
305
|
+
}
|
|
306
|
+
|
|
280
307
|
:host(.ion-touched.ion-invalid) {
|
|
281
308
|
--highlight-color: var(--highlight-color-invalid);
|
|
282
309
|
}
|
|
@@ -377,6 +404,12 @@
|
|
|
377
404
|
*/
|
|
378
405
|
display: flex;
|
|
379
406
|
align-items: center;
|
|
407
|
+
/**
|
|
408
|
+
* Allows the label to shrink below its intrinsic content width.
|
|
409
|
+
* Without this the label keeps its full width and can push the
|
|
410
|
+
* input and end slot outside the wrapper.
|
|
411
|
+
*/
|
|
412
|
+
min-width: 0;
|
|
380
413
|
/**
|
|
381
414
|
* Label text should not extend
|
|
382
415
|
* beyond the bounds of the input.
|
|
@@ -395,6 +428,18 @@
|
|
|
395
428
|
pointer-events: none;
|
|
396
429
|
}
|
|
397
430
|
|
|
431
|
+
/**
|
|
432
|
+
* When start/end slots are added or removed, we temporarily
|
|
433
|
+
* disable the label transition to prevent the floating label
|
|
434
|
+
* from animating as its position is adjusted.
|
|
435
|
+
*
|
|
436
|
+
* This class is applied by the start container controller, so
|
|
437
|
+
* renaming it here requires renaming it there too.
|
|
438
|
+
*/
|
|
439
|
+
:host(.skip-label-transition) .label-text-wrapper {
|
|
440
|
+
transition: none;
|
|
441
|
+
}
|
|
442
|
+
|
|
398
443
|
/**
|
|
399
444
|
* We need to use two elements instead of
|
|
400
445
|
* one. The .label-text-wrapper is responsible
|
|
@@ -438,7 +483,7 @@
|
|
|
438
483
|
* Label is on the left of the input in LTR and
|
|
439
484
|
* on the right in RTL.
|
|
440
485
|
*/
|
|
441
|
-
:host(.input-label-placement-start) .input-
|
|
486
|
+
:host(.input-label-placement-start) .input-control {
|
|
442
487
|
flex-direction: row;
|
|
443
488
|
}
|
|
444
489
|
|
|
@@ -460,7 +505,7 @@
|
|
|
460
505
|
* Label is on the right of the input in LTR and
|
|
461
506
|
* on the left in RTL.
|
|
462
507
|
*/
|
|
463
|
-
:host(.input-label-placement-end) .input-
|
|
508
|
+
:host(.input-label-placement-end) .input-control {
|
|
464
509
|
flex-direction: row-reverse;
|
|
465
510
|
}
|
|
466
511
|
|
|
@@ -508,10 +553,9 @@
|
|
|
508
553
|
* Floating: Label sits over the input when the input has no
|
|
509
554
|
* value and is blurred. Label sits above the input and is scaled
|
|
510
555
|
* down when the input is focused or has a value.
|
|
511
|
-
*
|
|
512
556
|
*/
|
|
513
|
-
:host(.input-label-placement-stacked) .input-
|
|
514
|
-
:host(.input-label-placement-floating) .input-
|
|
557
|
+
:host(.input-label-placement-stacked) .input-control,
|
|
558
|
+
:host(.input-label-placement-floating) .input-control {
|
|
515
559
|
flex-direction: column;
|
|
516
560
|
align-items: start;
|
|
517
561
|
}
|
|
@@ -542,18 +586,6 @@
|
|
|
542
586
|
}
|
|
543
587
|
}
|
|
544
588
|
|
|
545
|
-
/**
|
|
546
|
-
* Ensures the input does not
|
|
547
|
-
* overlap the label.
|
|
548
|
-
*/
|
|
549
|
-
:host(.input-label-placement-stacked) input,
|
|
550
|
-
:host(.input-label-placement-floating) input {
|
|
551
|
-
margin-left: 0;
|
|
552
|
-
margin-right: 0;
|
|
553
|
-
margin-top: 1px;
|
|
554
|
-
margin-bottom: 0;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
589
|
/**
|
|
558
590
|
* This makes the label sit over the input
|
|
559
591
|
* when the input is blurred and has no value.
|
|
@@ -906,6 +938,14 @@
|
|
|
906
938
|
--border-radius: 4px;
|
|
907
939
|
--padding-start: 16px;
|
|
908
940
|
--padding-end: 16px;
|
|
941
|
+
/**
|
|
942
|
+
* The measured width of the start container, as a negative offset
|
|
943
|
+
* in LTR and a positive one in RTL. Written to the host by the
|
|
944
|
+
* start container controller, so renaming it here requires renaming
|
|
945
|
+
* it there too. Declared with a default so the label is positioned
|
|
946
|
+
* correctly before the first measurement runs.
|
|
947
|
+
*/
|
|
948
|
+
--internal-start-container-adjustment: 0px;
|
|
909
949
|
min-height: 56px;
|
|
910
950
|
}
|
|
911
951
|
|
|
@@ -960,15 +1000,25 @@
|
|
|
960
1000
|
border-bottom: none;
|
|
961
1001
|
}
|
|
962
1002
|
|
|
1003
|
+
/**
|
|
1004
|
+
* The resting label is positioned relative to the control so it can size to
|
|
1005
|
+
* the space between the start and end slots. When floating, the label needs
|
|
1006
|
+
* to escape the control and position itself relative to the wrapper instead.
|
|
1007
|
+
*/
|
|
1008
|
+
:host(.input-fill-outline:not(.label-floating)) .input-control {
|
|
1009
|
+
position: relative;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
963
1012
|
:host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper,
|
|
964
1013
|
:host(.input-fill-outline.input-label-placement-floating) .label-text-wrapper {
|
|
965
1014
|
transform-origin: left top;
|
|
966
1015
|
position: absolute;
|
|
967
1016
|
/**
|
|
968
|
-
*
|
|
969
|
-
*
|
|
1017
|
+
* While resting this is the width of the text input, which already
|
|
1018
|
+
* excludes the start and end slots. Once the label floats the
|
|
1019
|
+
* containing block becomes the wrapper and the rule below takes over.
|
|
970
1020
|
*/
|
|
971
|
-
max-width:
|
|
1021
|
+
max-width: 100%;
|
|
972
1022
|
}
|
|
973
1023
|
:host-context([dir=rtl]):host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper, :host-context([dir=rtl]).input-fill-outline.input-label-placement-stacked .label-text-wrapper, :host-context([dir=rtl]):host(.input-fill-outline.input-label-placement-floating) .label-text-wrapper, :host-context([dir=rtl]).input-fill-outline.input-label-placement-floating .label-text-wrapper {
|
|
974
1024
|
transform-origin: right top;
|
|
@@ -993,7 +1043,7 @@
|
|
|
993
1043
|
* This makes the label sit above the input.
|
|
994
1044
|
*/
|
|
995
1045
|
:host(.label-floating.input-fill-outline) .label-text-wrapper {
|
|
996
|
-
transform:
|
|
1046
|
+
transform: translate(var(--internal-start-container-adjustment, 0px), -32%) scale(0.75);
|
|
997
1047
|
margin-left: 0;
|
|
998
1048
|
margin-right: 0;
|
|
999
1049
|
margin-top: 0;
|
|
@@ -1005,19 +1055,6 @@
|
|
|
1005
1055
|
max-width: calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75);
|
|
1006
1056
|
}
|
|
1007
1057
|
|
|
1008
|
-
/**
|
|
1009
|
-
* This ensures that the input does not
|
|
1010
|
-
* overlap the floating label while still
|
|
1011
|
-
* remaining visually centered.
|
|
1012
|
-
*/
|
|
1013
|
-
:host(.input-fill-outline.input-label-placement-stacked) input,
|
|
1014
|
-
:host(.input-fill-outline.input-label-placement-floating) input {
|
|
1015
|
-
margin-left: 0;
|
|
1016
|
-
margin-right: 0;
|
|
1017
|
-
margin-top: 6px;
|
|
1018
|
-
margin-bottom: 6px;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
1058
|
:host(.input-fill-outline) .input-outline-container {
|
|
1022
1059
|
left: 0;
|
|
1023
1060
|
right: 0;
|
|
@@ -682,7 +682,7 @@ export class InputOTP {
|
|
|
682
682
|
const tabbableIndex = this.getTabbableIndex();
|
|
683
683
|
const pattern = this.getPattern();
|
|
684
684
|
const hasDescription = el.querySelector('.input-otp-description')?.textContent?.trim() !== '';
|
|
685
|
-
return (h(Host, { key: '
|
|
685
|
+
return (h(Host, { key: 'bd37661e13cde21feff30c663e6813ce3fff0d9a', class: createColorClasses(color, {
|
|
686
686
|
[mode]: true,
|
|
687
687
|
'has-focus': hasFocus,
|
|
688
688
|
[`input-otp-size-${size}`]: true,
|
|
@@ -690,10 +690,10 @@ export class InputOTP {
|
|
|
690
690
|
[`input-otp-fill-${fill}`]: true,
|
|
691
691
|
'input-otp-disabled': disabled,
|
|
692
692
|
'input-otp-readonly': readonly,
|
|
693
|
-
}) }, h("div", { key: '
|
|
693
|
+
}) }, h("div", { key: '5e206f870024f1ecfebda999ff31e6e815774deb', role: "group", "aria-label": "One-time password input", class: "input-otp-group", ...inheritedAttributes }, Array.from({ length }).map((_, index) => (h(Fragment, null, h("div", { class: "native-wrapper" }, h("input", { class: "native-input", id: `${inputId}-${index}`, "aria-label": `Input ${index + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index === tabbableIndex ? 0 : -1, value: inputValues[index] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index] = el), onInput: this.onInput(index), onBlur: this.onBlur, onFocus: this.onFocus(index), onKeyDown: this.onKeyDown(index), onPaste: this.onPaste })), this.showSeparator(index) && h("div", { class: "input-otp-separator" }))))), h("div", { key: 'c268f838ddab2c8d6a612a11c7d38e6ca076436d', class: {
|
|
694
694
|
'input-otp-description': true,
|
|
695
695
|
'input-otp-description-hidden': !hasDescription,
|
|
696
|
-
} }, h("slot", { key: '
|
|
696
|
+
} }, h("slot", { key: 'c0736359b26f609b795e399fc1ad9b540632af18' }))));
|
|
697
697
|
}
|
|
698
698
|
static get is() { return "ion-input-otp"; }
|
|
699
699
|
static get encapsulation() { return "scoped"; }
|
|
@@ -73,16 +73,16 @@ export class InputPasswordToggle {
|
|
|
73
73
|
const showPasswordIcon = this.showIcon ?? eye;
|
|
74
74
|
const hidePasswordIcon = this.hideIcon ?? eyeOff;
|
|
75
75
|
const isPasswordVisible = type === 'text';
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '15a29e51abc236cc21943225ed377f5edca7d103', class: createColorClasses(color, {
|
|
77
77
|
[mode]: true,
|
|
78
|
-
}) }, h("ion-button", { key: '
|
|
78
|
+
}) }, h("ion-button", { key: 'cc9c290e809db66c14aaf63eb496ccf94d3f6414', mode: mode, color: color, fill: "clear", shape: "round", "aria-label": isPasswordVisible ? 'Hide password' : 'Show password', "aria-pressed": isPasswordVisible ? 'true' : 'false', type: "button", onPointerDown: (ev) => {
|
|
79
79
|
/**
|
|
80
80
|
* This prevents mobile browsers from
|
|
81
81
|
* blurring the input when the password toggle
|
|
82
82
|
* button is activated.
|
|
83
83
|
*/
|
|
84
84
|
ev.preventDefault();
|
|
85
|
-
}, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '
|
|
85
|
+
}, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '8d1f5143bedabcff2a8792f35ef07fdac1236fd5', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? hidePasswordIcon : showPasswordIcon }))));
|
|
86
86
|
}
|
|
87
87
|
static get is() { return "ion-input-password-toggle"; }
|
|
88
88
|
static get encapsulation() { return "shadow"; }
|
|
@@ -32,11 +32,11 @@ export class ItemDivider {
|
|
|
32
32
|
sticky = false;
|
|
33
33
|
render() {
|
|
34
34
|
const mode = getIonMode(this);
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'b191727cc26c600287fd856e49216bf1ae1d5aad', class: createColorClasses(this.color, {
|
|
36
36
|
[mode]: true,
|
|
37
37
|
'item-divider-sticky': this.sticky,
|
|
38
38
|
item: true,
|
|
39
|
-
}) }, h("slot", { key: '
|
|
39
|
+
}) }, h("slot", { key: 'a8e2eb48ca858b64da8ad018fa8d1667030b7143', name: "start" }), h("div", { key: '3219e0b76ac4a96db50a67f1f2794a235111c613', class: "item-divider-inner", part: "inner" }, h("div", { key: '31a64775153cd8704458e0e2a4a512096585deb4', class: "item-divider-wrapper", part: "container" }, h("slot", { key: 'd46dfb578028790eb6ccaac5e6009a5d96aa831a' })), h("slot", { key: 'a5fc7ac27e418ea82d9dcc913a8dae7e35493760', name: "end" }))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "ion-item-divider"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6,7 +6,7 @@ import { getIonMode } from "../../global/ionic-global";
|
|
|
6
6
|
export class ItemGroup {
|
|
7
7
|
render() {
|
|
8
8
|
const mode = getIonMode(this);
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: 'd24ee9c70a99d11b7d95dfb4a8066670bdfcbc1d', role: "group", class: {
|
|
10
10
|
[mode]: true,
|
|
11
11
|
// Used internally for styling
|
|
12
12
|
[`item-group-${mode}`]: true,
|
|
@@ -78,12 +78,12 @@ export class ItemOption {
|
|
|
78
78
|
href: this.href,
|
|
79
79
|
target: this.target,
|
|
80
80
|
};
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'a10d36e60d61865141c57c03a114e4845b400a55', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
82
82
|
[mode]: true,
|
|
83
83
|
'item-option-disabled': disabled,
|
|
84
84
|
'item-option-expandable': expandable,
|
|
85
85
|
'ion-activatable': true,
|
|
86
|
-
}) }, h(TagType, { key: '
|
|
86
|
+
}) }, h(TagType, { key: '5cc49ef73318213f6202d1d0f460f629ea65f17f', ...attrs, class: "button-native", part: "native", disabled: disabled }, h("span", { key: '0643b16660b4ca00b0f3b4dbe2739e9ce076abea', class: "button-inner", part: "inner" }, h("slot", { key: '8778d6d09aa9e0db278ce00c5456a1acfe82c15f', name: "top" }), h("div", { key: '4fc849494c8cb2380015161e096b5c61cf517d90', class: "horizontal-wrapper", part: "container" }, h("slot", { key: '9d0c0a5a63d8ec636df9c85d48bbdb39fb63af5e', name: "start" }), h("slot", { key: 'a40561497c7e7d73173edd24ed335230e6eebb2b', name: "icon-only" }), h("slot", { key: 'b94f2a4aa5bf4a1104497ced1920d6ee43d33659' }), h("slot", { key: '91713dbb3e6a617c00f950857f2ed5e5ffceaa9a', name: "end" })), h("slot", { key: 'f5af33c3bfb50fc629a06e1120bba55da07b2afb', name: "bottom" })), mode === 'md' && h("ion-ripple-effect", { key: 'fc56e1644ef9c5b2e1e66683465a7fd09c05215c' }))));
|
|
87
87
|
}
|
|
88
88
|
static get is() { return "ion-item-option"; }
|
|
89
89
|
static get encapsulation() { return "shadow"; }
|
|
@@ -24,7 +24,7 @@ export class ItemOptions {
|
|
|
24
24
|
render() {
|
|
25
25
|
const mode = getIonMode(this);
|
|
26
26
|
const isEnd = isEndSide(this.side);
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '6e60ff004d48bf7701711e518ec0b21264496ae8', class: {
|
|
28
28
|
[mode]: true,
|
|
29
29
|
// Used internally for styling
|
|
30
30
|
[`item-options-${mode}`]: true,
|
|
@@ -397,7 +397,7 @@ export class ItemSliding {
|
|
|
397
397
|
}
|
|
398
398
|
render() {
|
|
399
399
|
const mode = getIonMode(this);
|
|
400
|
-
return (h(Host, { key: '
|
|
400
|
+
return (h(Host, { key: '15f6a98f8c888e86c29827cdf55d98ace08699dd', class: {
|
|
401
401
|
[mode]: true,
|
|
402
402
|
'item-sliding-active-slide': this.state !== 2 /* SlidingState.Disabled */,
|
|
403
403
|
'item-sliding-active-options-end': (this.state & 8 /* SlidingState.End */) !== 0,
|
|
@@ -78,13 +78,13 @@ export class Label {
|
|
|
78
78
|
render() {
|
|
79
79
|
const position = this.position;
|
|
80
80
|
const mode = getIonMode(this);
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '461604c1887f322dc13d7df3d5cdbb7ee1361117', class: createColorClasses(this.color, {
|
|
82
82
|
[mode]: true,
|
|
83
83
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
84
84
|
[`label-${position}`]: position !== undefined,
|
|
85
85
|
[`label-no-animate`]: this.noAnimate,
|
|
86
86
|
'label-rtl': document.dir === 'rtl',
|
|
87
|
-
}) }, h("slot", { key: '
|
|
87
|
+
}) }, h("slot", { key: 'a7005d0a217641278aa8e95144e8e4b9ae87a1c5' })));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "ion-label"; }
|
|
90
90
|
static get encapsulation() { return "scoped"; }
|
|
@@ -32,7 +32,7 @@ export class List {
|
|
|
32
32
|
render() {
|
|
33
33
|
const mode = getIonMode(this);
|
|
34
34
|
const { lines, inset } = this;
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: 'b21e063d568b07331ea9443647b3faf33265256a', role: "list", class: {
|
|
36
36
|
[mode]: true,
|
|
37
37
|
// Used internally for styling
|
|
38
38
|
[`list-${mode}`]: true,
|
|
@@ -23,10 +23,10 @@ export class ListHeader {
|
|
|
23
23
|
render() {
|
|
24
24
|
const { lines } = this;
|
|
25
25
|
const mode = getIonMode(this);
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '92ab17533e169b1a1c990285449e0546aac98021', class: createColorClasses(this.color, {
|
|
27
27
|
[mode]: true,
|
|
28
28
|
[`list-header-lines-${lines}`]: lines !== undefined,
|
|
29
|
-
}) }, h("div", { key: '
|
|
29
|
+
}) }, h("div", { key: '26639255577380a8e70b61f753aa9ed57590694f', class: "list-header-inner", part: "inner" }, h("slot", { key: 'f69055e7a7a47ae8dcbbe289e18b6630f0792714' }))));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "ion-list-header"; }
|
|
32
32
|
static get encapsulation() { return "shadow"; }
|
|
@@ -258,14 +258,14 @@ export class Loading {
|
|
|
258
258
|
* Otherwise, don't set aria-labelledby.
|
|
259
259
|
*/
|
|
260
260
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
261
|
-
return (h(Host, { key: '
|
|
261
|
+
return (h(Host, { key: '2d14122ff3081de73631a7fdd4affdd5c73b8618', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1", ...htmlAttributes, style: {
|
|
262
262
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
263
263
|
}, onIonBackdropTap: this.onBackdropTap, class: {
|
|
264
264
|
...getClassMap(this.cssClass),
|
|
265
265
|
[mode]: true,
|
|
266
266
|
'overlay-hidden': true,
|
|
267
267
|
'loading-translucent': this.translucent,
|
|
268
|
-
} }, h("ion-backdrop", { key: '
|
|
268
|
+
} }, h("ion-backdrop", { key: 'b7d5bb0d670a20c159d7f67327bf3b1489449188', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '085ce92bd2004d323ab47eb472b83826e48dc619', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '4ecd5bfc0bbd3da434d32f0f319f867a44c5e1f1', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { key: '5a4498e1421e09d01c0ee4312eae5272e95c3127', class: "loading-spinner" }, h("ion-spinner", { key: '1b3bc7d45d775195657ead3535f65e6b79f37e84', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: 'bc7c5467b9f1c6ab957f79934e97acc713bdec37', tabindex: "0", "aria-hidden": "true" })));
|
|
269
269
|
}
|
|
270
270
|
static get is() { return "ion-loading"; }
|
|
271
271
|
static get encapsulation() { return "scoped"; }
|
|
@@ -700,14 +700,14 @@ export class Menu {
|
|
|
700
700
|
* the ionBackButton listener in the menu controller
|
|
701
701
|
* will handle closing the menu when Escape is pressed.
|
|
702
702
|
*/
|
|
703
|
-
return (h(Host, { key: '
|
|
703
|
+
return (h(Host, { key: 'ca4856cbc46001fc95a47591031c00a100555dcf', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
|
|
704
704
|
[mode]: true,
|
|
705
705
|
[`menu-type-${type}`]: true,
|
|
706
706
|
'menu-enabled': !disabled,
|
|
707
707
|
[`menu-side-${side}`]: true,
|
|
708
708
|
'menu-pane-visible': isPaneVisible,
|
|
709
709
|
'split-pane-side': hostContext('ion-split-pane', el),
|
|
710
|
-
} }, h("div", { key: '
|
|
710
|
+
} }, h("div", { key: '155564ac239dba04b0b41ad194598a23c8d72d3f', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, h("slot", { key: 'b960042d1e86fd6220f1d862033e79e2dbbe7bcb' })), h("ion-backdrop", { key: '28589933d545b14d063c62fbe61116132d808adf', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
|
|
711
711
|
}
|
|
712
712
|
static get is() { return "ion-menu"; }
|
|
713
713
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,7 +62,7 @@ export class MenuButton {
|
|
|
62
62
|
type: this.type,
|
|
63
63
|
};
|
|
64
64
|
const ariaLabel = inheritedAttributes['aria-label'] || 'menu';
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'b8869377822b082c6c4d3f16135b50b733eabf65', onClick: this.onClick, "aria-disabled": disabled ? 'true' : null, "aria-hidden": hidden ? 'true' : null, class: createColorClasses(color, {
|
|
66
66
|
[mode]: true,
|
|
67
67
|
button: true, // ion-buttons target .button
|
|
68
68
|
'menu-button-hidden': hidden,
|
|
@@ -71,7 +71,7 @@ export class MenuButton {
|
|
|
71
71
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
72
72
|
'ion-activatable': true,
|
|
73
73
|
'ion-focusable': true,
|
|
74
|
-
}) }, h("button", { key: '
|
|
74
|
+
}) }, h("button", { key: '48fc0a7011414b60dd7d5136f247e937ae4bb8c8', ...attrs, disabled: disabled, class: "button-native", part: "native", "aria-label": ariaLabel }, h("span", { key: '8c712f28c5afd345e403a9afc525931112852708', class: "button-inner" }, h("slot", { key: 'dd872325e42baf435188478c8d1cfc416075089d' }, h("ion-icon", { key: 'a4f02bdb715b07792c17e12c7837873d70171f88', part: "icon", icon: menuIcon, mode: mode, lazy: false, "aria-hidden": "true" }))), mode === 'md' && h("ion-ripple-effect", { key: '564e2a8a804e14d1135502f7b17d8b7b9862e81b', type: "unbounded" }))));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "ion-menu-button"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -38,10 +38,10 @@ export class MenuToggle {
|
|
|
38
38
|
render() {
|
|
39
39
|
const mode = getIonMode(this);
|
|
40
40
|
const hidden = this.autoHide && !this.visible;
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: '76d21ea6493b8161860c941e3754fef1e20395cc', onClick: this.onClick, "aria-hidden": hidden ? 'true' : null, class: {
|
|
42
42
|
[mode]: true,
|
|
43
43
|
'menu-toggle-hidden': hidden,
|
|
44
|
-
} }, h("slot", { key: '
|
|
44
|
+
} }, h("slot", { key: '9383610fd3105e1928a38788eb596e313e2b07f8' })));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "ion-menu-toggle"; }
|
|
47
47
|
static get encapsulation() { return "shadow"; }
|