@ionic/core 8.8.6-dev.11777559143.1d1ad1ad → 8.8.6-dev.11777569278.1613db2e
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-col.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-gallery.d.ts +11 -0
- package/components/ion-gallery.js +4 -0
- package/components/ion-grid.js +1 -1
- package/components/ion-header.js +1 -1
- package/components/ion-img.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-infinite-scroll.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-picker-legacy-column.js +1 -1
- package/components/ion-picker-legacy.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-B2rpt1JV.js +4 -0
- package/components/p-B6zr9RZN.js +4 -0
- package/components/{p-Brxa0j7O.js → p-B71c6yUH.js} +1 -1
- package/components/{p-ByuCfbYy.js → p-BCFZKMI6.js} +1 -1
- package/components/{p-C2cZvGcF.js → p-BFbsici0.js} +1 -1
- package/components/{p-CoarhFWH.js → p-BLCuPAtN.js} +1 -1
- package/components/{p-GnGGIfCd.js → p-BRWWcnBq.js} +1 -1
- package/components/{p-BfHB6wX_.js → p-BXcCGjEc.js} +1 -1
- package/components/{p-BU8N7ZrK.js → p-BqImG3uk.js} +1 -1
- package/components/{p-D5lMX0xt.js → p-C8ktKu9j.js} +1 -1
- package/components/{p-BhfW3d9j.js → p-CIoAIKEr.js} +1 -1
- package/components/p-CN-WzkJE.js +4 -0
- package/components/{p-CnwZE7CW.js → p-CoFqDNc5.js} +1 -1
- package/components/{p-TpZHKDyk.js → p-DAv9P_LE.js} +1 -1
- package/components/{p-CeYwuysM.js → p-DH_9VCbD.js} +1 -1
- package/components/{p-CdYTq34D.js → p-DTtRWhIZ.js} +1 -1
- package/components/{p-C-_EGKki.js → p-DXUyXgVL.js} +1 -1
- package/components/{p-BTYqyHph.js → p-Di5rHO3q.js} +1 -1
- package/components/{p-BtAlyZ0b.js → p-IMXp2Inn.js} +1 -1
- package/components/{p-DAeMHNER.js → p-TR4ubkPu.js} +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +7 -7
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +8 -6
- package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-gallery.cjs.entry.js +330 -0
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +3 -3
- 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 +4 -4
- 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 +5 -5
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-reorder_2.cjs.entry.js +3 -3
- 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 +6 -6
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +3 -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 +3 -3
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/col/col.js +3 -2
- package/dist/collection/components/gallery/gallery-interface.js +1 -0
- package/dist/collection/components/gallery/gallery.css +103 -0
- package/dist/collection/components/gallery/gallery.js +421 -0
- package/dist/collection/components/gallery/test/utils.js +100 -0
- package/dist/collection/components/grid/grid.js +2 -2
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/img/img.js +2 -2
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +1 -1
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +2 -2
- package/dist/collection/components/input/input.js +4 -4
- 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/picker-legacy/picker.js +2 -2
- package/dist/collection/components/picker-legacy-column/picker-column.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 +2 -2
- 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 +2 -2
- package/dist/collection/components/reorder/reorder.js +2 -2
- 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 +2 -2
- 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.js +3 -3
- 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 +2 -2
- 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 +3 -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.js +3 -3
- package/dist/collection/components/thumbnail/thumbnail.js +2 -2
- 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/media.js +1 -0
- package/dist/docs.json +212 -1
- package/dist/esm/ion-app_8.entry.js +7 -7
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +8 -6
- package/dist/esm/ion-datetime_3.entry.js +4 -4
- package/dist/esm/ion-gallery.entry.js +328 -0
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +3 -3
- 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 +4 -4
- 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 +5 -5
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-refresher_2.entry.js +3 -3
- package/dist/esm/ion-reorder_2.entry.js +3 -3
- 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 +6 -6
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +3 -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 +3 -3
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +70 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-96549175.entry.js → p-00c0bd38.entry.js} +1 -1
- package/dist/ionic/{p-79ae0425.entry.js → p-05a30032.entry.js} +1 -1
- package/dist/ionic/{p-192e7509.entry.js → p-15e3e8f5.entry.js} +1 -1
- package/dist/ionic/{p-5ac21be2.entry.js → p-1709b0aa.entry.js} +1 -1
- package/dist/ionic/{p-2bf931ae.entry.js → p-1c2c1869.entry.js} +1 -1
- package/dist/ionic/{p-3bf01c2c.entry.js → p-1c4de46b.entry.js} +1 -1
- package/dist/ionic/p-1e1c8d61.entry.js +4 -0
- package/dist/ionic/p-24b35f99.entry.js +4 -0
- package/dist/ionic/p-2aa7567e.entry.js +4 -0
- package/dist/ionic/{p-bc5713f7.entry.js → p-2ad79c23.entry.js} +1 -1
- package/dist/ionic/{p-5a3fc28e.entry.js → p-2f0073af.entry.js} +1 -1
- package/dist/ionic/{p-59b4f8d0.entry.js → p-3f79f594.entry.js} +1 -1
- package/dist/ionic/p-4079cee3.entry.js +4 -0
- package/dist/ionic/{p-f061fcb7.entry.js → p-48026d15.entry.js} +1 -1
- package/dist/ionic/{p-4091ad21.entry.js → p-50b61fab.entry.js} +1 -1
- package/dist/ionic/{p-8516eb69.entry.js → p-50cd2d57.entry.js} +1 -1
- package/dist/ionic/{p-50d90690.entry.js → p-5274f999.entry.js} +1 -1
- package/dist/ionic/{p-3093958a.entry.js → p-586d4270.entry.js} +1 -1
- package/dist/ionic/{p-b8b20b7e.entry.js → p-71b6014c.entry.js} +1 -1
- package/dist/ionic/{p-9b9b1450.entry.js → p-72491468.entry.js} +1 -1
- package/dist/ionic/{p-f740c359.entry.js → p-7d5057c4.entry.js} +1 -1
- package/dist/ionic/{p-091a95ea.entry.js → p-83c693c4.entry.js} +1 -1
- package/dist/ionic/{p-2aa44c65.entry.js → p-8537b2fb.entry.js} +1 -1
- package/dist/ionic/{p-a53a3ecc.entry.js → p-8f127a9c.entry.js} +1 -1
- package/dist/ionic/{p-98c34fd7.entry.js → p-9d789053.entry.js} +1 -1
- package/dist/ionic/{p-1faf270d.entry.js → p-a9fb086b.entry.js} +1 -1
- package/dist/ionic/{p-e7f216ae.entry.js → p-ae667493.entry.js} +1 -1
- package/dist/ionic/{p-edb0b0c8.entry.js → p-b2fe6c1c.entry.js} +1 -1
- package/dist/ionic/{p-2effd05d.entry.js → p-b3c9f19c.entry.js} +1 -1
- package/dist/ionic/{p-6c8c37c2.entry.js → p-b653f4c2.entry.js} +1 -1
- package/dist/ionic/{p-4e46439d.entry.js → p-bd71a4a7.entry.js} +1 -1
- package/dist/ionic/p-bf972309.entry.js +4 -0
- package/dist/ionic/{p-8180abe5.entry.js → p-c10fa162.entry.js} +1 -1
- package/dist/ionic/{p-d954cd19.entry.js → p-d4ed5710.entry.js} +1 -1
- package/dist/ionic/{p-228b6a9c.entry.js → p-d6299c37.entry.js} +1 -1
- package/dist/ionic/{p-b0c54b4c.entry.js → p-d976e777.entry.js} +1 -1
- package/dist/ionic/{p-4610e447.entry.js → p-e18d3fdb.entry.js} +1 -1
- package/dist/ionic/{p-1855fcb6.entry.js → p-e3abffbe.entry.js} +1 -1
- package/dist/ionic/{p-4c864eb2.entry.js → p-fad05840.entry.js} +1 -1
- package/dist/types/components/gallery/gallery-interface.d.ts +9 -0
- package/dist/types/components/gallery/gallery.d.ts +125 -0
- package/dist/types/components/gallery/test/utils.d.ts +2 -0
- package/dist/types/components.d.ts +66 -0
- package/hydrate/index.js +469 -126
- package/hydrate/index.mjs +469 -126
- package/package.json +1 -1
- package/components/p-CnOTQxHB.js +0 -4
- package/components/p-XFUFdPrc.js +0 -4
- package/components/p-tYh73xQe.js +0 -4
- package/dist/ionic/p-308beb71.entry.js +0 -4
- package/dist/ionic/p-64341e32.entry.js +0 -4
- package/dist/ionic/p-76d0e7ef.entry.js +0 -4
- package/dist/ionic/p-ae4ea663.entry.js +0 -4
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
var index = require('./index-CzcLEdQ5.js');
|
|
7
|
+
var ionicGlobal = require('./ionic-global-CSEbHD_F.js');
|
|
8
|
+
|
|
9
|
+
const galleryCss = () => `:host{display:grid;grid-template-columns:repeat(var(--internal-gallery-columns, 2), minmax(0, 1fr))}:host(.gallery-layout-uniform){gap:var(--ion-gallery-gap, 16px)}:host(.gallery-layout-uniform) ::slotted(*){aspect-ratio:1/1}:host(.gallery-layout-masonry){-ms-flex-align:start;align-items:start;-webkit-column-gap:var(--ion-gallery-gap, 16px);-moz-column-gap:var(--ion-gallery-gap, 16px);column-gap:var(--ion-gallery-gap, 16px);row-gap:0;grid-auto-rows:2px}:host(.gallery-layout-masonry) ::slotted(*){display:block;min-height:unset;margin-bottom:var(--ion-gallery-gap, 16px)}::slotted(*){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%}::slotted(img){display:block;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}`;
|
|
10
|
+
|
|
11
|
+
// TODO(FW-7285): Replace with global breakpoints
|
|
12
|
+
const BREAKPOINTS = {
|
|
13
|
+
xs: 0,
|
|
14
|
+
sm: 576,
|
|
15
|
+
md: 768,
|
|
16
|
+
lg: 992,
|
|
17
|
+
xl: 1200,
|
|
18
|
+
xxl: 1400,
|
|
19
|
+
};
|
|
20
|
+
const DEFAULT_COLUMNS = {
|
|
21
|
+
xs: 2,
|
|
22
|
+
sm: 3,
|
|
23
|
+
md: 4,
|
|
24
|
+
lg: 6,
|
|
25
|
+
xl: 8,
|
|
26
|
+
xxl: 10,
|
|
27
|
+
};
|
|
28
|
+
const BREAKPOINT_ORDER = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
29
|
+
const Gallery = class {
|
|
30
|
+
constructor(hostRef) {
|
|
31
|
+
index.registerInstance(this, hostRef);
|
|
32
|
+
// Keep track of whether we've warned about invalid columns to avoid
|
|
33
|
+
// duplicate warnings on screen resize.
|
|
34
|
+
this.hasWarnedInvalidColumns = false;
|
|
35
|
+
/**
|
|
36
|
+
* The visual layout of the gallery. When `uniform`, rows take up the height
|
|
37
|
+
* of the tallest item and are spaced evenly across the gallery. Additionally,
|
|
38
|
+
* items will have an aspect ratio of 1/1, forcing them to be square unless a
|
|
39
|
+
* height is explicitly set. When `masonry`, items will be positioned under each
|
|
40
|
+
* other with only the specified gap between them.
|
|
41
|
+
*/
|
|
42
|
+
this.layout = 'uniform';
|
|
43
|
+
/**
|
|
44
|
+
* The order in which items are positioned. Only applies when layout is
|
|
45
|
+
* `masonry`. When `sequential`, items are positioned in the order they are
|
|
46
|
+
* placed in the DOM. When `best-fit`, items are positioned under the column
|
|
47
|
+
* with the most available space.
|
|
48
|
+
*/
|
|
49
|
+
this.order = 'sequential';
|
|
50
|
+
/**
|
|
51
|
+
* The number of columns to display. Can be set as a number or an object of
|
|
52
|
+
* breakpoint values (e.g. `{ xs: 2, sm: 3, md: 4 }`).
|
|
53
|
+
*/
|
|
54
|
+
this.columns = DEFAULT_COLUMNS;
|
|
55
|
+
/**
|
|
56
|
+
* Listen for the slotchange event on the slot.
|
|
57
|
+
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
58
|
+
* of the masonry grid when the slot changes. This is useful for when items
|
|
59
|
+
* are added or removed from the gallery.
|
|
60
|
+
*/
|
|
61
|
+
this.onSlotChange = () => {
|
|
62
|
+
this.scheduleMasonryResize();
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Measure the host and children, then compute masonry placement.
|
|
66
|
+
*/
|
|
67
|
+
this.resizeMasonryGrid = () => {
|
|
68
|
+
this.masonryRaf = undefined;
|
|
69
|
+
if (this.layout !== 'masonry') {
|
|
70
|
+
this.clearMasonryStyles();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const styles = getComputedStyle(this.el);
|
|
74
|
+
const rowHeight = parseFloat(styles.getPropertyValue('grid-auto-rows')) || 0;
|
|
75
|
+
const rowGap = parseFloat(styles.getPropertyValue('row-gap')) || parseFloat(styles.getPropertyValue('gap')) || 0;
|
|
76
|
+
const columnsStr = styles.getPropertyValue('--internal-gallery-columns');
|
|
77
|
+
// Fallback to 2 columns for masonry calculations when the resolved
|
|
78
|
+
// --internal-gallery-columns CSS value is missing or unparsable.
|
|
79
|
+
const columns = parseInt(columnsStr, 10) || 2;
|
|
80
|
+
const items = this.getItems();
|
|
81
|
+
this.layoutMasonry(items, rowHeight, rowGap, columns);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
layoutChanged() {
|
|
85
|
+
this.updateResponsiveColumns(true);
|
|
86
|
+
this.scheduleMasonryResize();
|
|
87
|
+
}
|
|
88
|
+
componentDidLoad() {
|
|
89
|
+
this.updateResponsiveColumns(true);
|
|
90
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
91
|
+
this.updateResponsiveColumns();
|
|
92
|
+
this.scheduleMasonryResize();
|
|
93
|
+
});
|
|
94
|
+
this.resizeObserver.observe(this.el);
|
|
95
|
+
this.scheduleMasonryResize();
|
|
96
|
+
}
|
|
97
|
+
disconnectedCallback() {
|
|
98
|
+
var _a;
|
|
99
|
+
if (this.masonryRaf !== undefined) {
|
|
100
|
+
cancelAnimationFrame(this.masonryRaf);
|
|
101
|
+
this.masonryRaf = undefined;
|
|
102
|
+
}
|
|
103
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
104
|
+
this.resizeObserver = undefined;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Listen for the load event on child elements.
|
|
108
|
+
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
109
|
+
* of the masonry grid when the child elements load. This is useful for when
|
|
110
|
+
* images take time to load.
|
|
111
|
+
*/
|
|
112
|
+
onChildLoad(ev) {
|
|
113
|
+
if (this.layout !== 'masonry') {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const target = ev.target;
|
|
117
|
+
if (target !== null && this.el.contains(target)) {
|
|
118
|
+
this.scheduleMasonryResize();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Batch masonry measurements to a single animation frame.
|
|
123
|
+
* This avoids repeated sync layouts during rapid resize/load/slot changes.
|
|
124
|
+
*/
|
|
125
|
+
scheduleMasonryResize() {
|
|
126
|
+
if (this.layout !== 'masonry') {
|
|
127
|
+
this.clearMasonryStyles();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (this.masonryRaf !== undefined) {
|
|
131
|
+
cancelAnimationFrame(this.masonryRaf);
|
|
132
|
+
}
|
|
133
|
+
this.masonryRaf = requestAnimationFrame(this.resizeMasonryGrid);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Normalize a columns value to a positive integer.
|
|
137
|
+
* Returns undefined when the input cannot be interpreted as a finite number.
|
|
138
|
+
*/
|
|
139
|
+
sanitizeColumns(columns) {
|
|
140
|
+
if (columns === undefined) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
const numericColumns = typeof columns === 'number' ? columns : Number(columns);
|
|
144
|
+
if (!Number.isFinite(numericColumns) || !Number.isInteger(numericColumns) || numericColumns <= 0) {
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
return numericColumns;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Check if the value is a breakpoint columns object.
|
|
151
|
+
*/
|
|
152
|
+
isBreakpointColumns(value) {
|
|
153
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Check if the breakpoint columns object has any invalid values.
|
|
157
|
+
* Returns true if any value is undefined or not a positive integer.
|
|
158
|
+
*/
|
|
159
|
+
hasInvalidBreakpointColumns(breakpointColumns) {
|
|
160
|
+
for (const breakpoint of BREAKPOINT_ORDER) {
|
|
161
|
+
const value = breakpointColumns[breakpoint];
|
|
162
|
+
if (value !== undefined && this.sanitizeColumns(value) === undefined) {
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get the columns from a responsive breakpoint map.
|
|
170
|
+
* Returns the columns for the last matching breakpoint.
|
|
171
|
+
*/
|
|
172
|
+
getColumnsFromBreakpointColumns(width, breakpointColumns) {
|
|
173
|
+
let columns;
|
|
174
|
+
for (const bp of BREAKPOINT_ORDER) {
|
|
175
|
+
const customValue = breakpointColumns[bp];
|
|
176
|
+
const parsedCustom = this.sanitizeColumns(customValue);
|
|
177
|
+
const parsedDefault = this.sanitizeColumns(DEFAULT_COLUMNS[bp]);
|
|
178
|
+
// Use valid custom values when present; otherwise fall back to defaults per breakpoint.
|
|
179
|
+
const resolved = customValue === undefined || parsedCustom === undefined ? parsedDefault : parsedCustom;
|
|
180
|
+
if (resolved !== undefined && width >= BREAKPOINTS[bp]) {
|
|
181
|
+
columns = resolved;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return columns;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Warn about an invalid columns value when it is set to a non-positive
|
|
188
|
+
* integer or a breakpoint map object with invalid values.
|
|
189
|
+
*/
|
|
190
|
+
warnInvalidColumns(columns) {
|
|
191
|
+
index.printIonWarning(`[ion-gallery] - Invalid "columns" value (${JSON.stringify(columns)}). Expected a positive integer or breakpoint map object (e.g. { xs: 2, md: 4 }). Falling back to default responsive columns.`, this.el);
|
|
192
|
+
this.hasWarnedInvalidColumns = true;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Resolve the active columns value for the current width. Falls back to
|
|
196
|
+
* the default responsive columns when the provided prop is invalid.
|
|
197
|
+
*/
|
|
198
|
+
getColumnsForWidth(width) {
|
|
199
|
+
const { columns, hasWarnedInvalidColumns } = this;
|
|
200
|
+
const isBreakpointColumns = this.isBreakpointColumns(columns);
|
|
201
|
+
const hasInvalidBreakpointColumns = isBreakpointColumns && this.hasInvalidBreakpointColumns(columns);
|
|
202
|
+
const sanitizedColumns = isBreakpointColumns
|
|
203
|
+
? this.getColumnsFromBreakpointColumns(width, columns)
|
|
204
|
+
: this.sanitizeColumns(columns);
|
|
205
|
+
if (!hasWarnedInvalidColumns &&
|
|
206
|
+
(hasInvalidBreakpointColumns || (!isBreakpointColumns && sanitizedColumns === undefined))) {
|
|
207
|
+
this.warnInvalidColumns(columns);
|
|
208
|
+
}
|
|
209
|
+
if (sanitizedColumns !== undefined) {
|
|
210
|
+
return sanitizedColumns;
|
|
211
|
+
}
|
|
212
|
+
return this.getColumnsFromBreakpointColumns(width, DEFAULT_COLUMNS);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Update the responsive columns for the gallery.
|
|
216
|
+
* This is used to update the columns when the component width changes.
|
|
217
|
+
*/
|
|
218
|
+
updateResponsiveColumns(force = false) {
|
|
219
|
+
const width = this.el.getBoundingClientRect().width;
|
|
220
|
+
// Only update the columns if the component width has changed by more than
|
|
221
|
+
// 1px or if the force flag is true. This prevents unnecessary re-renders
|
|
222
|
+
// when the component width has not changed.
|
|
223
|
+
if (!width || (!force && this.lastWidth !== undefined && Math.abs(this.lastWidth - width) < 1)) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this.lastWidth = width;
|
|
227
|
+
const columns = this.getColumnsForWidth(width);
|
|
228
|
+
this.el.style.setProperty('--internal-gallery-columns', `${columns}`);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Return all directly slotted HTMLElement children of the gallery.
|
|
232
|
+
*/
|
|
233
|
+
getItems() {
|
|
234
|
+
return Array.from(this.el.children).filter((child) => child instanceof HTMLElement);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Clear the item styles for the given item element.
|
|
238
|
+
* This is used to switch between uniform and masonry layouts.
|
|
239
|
+
*/
|
|
240
|
+
clearItemStyles(itemEl) {
|
|
241
|
+
itemEl.style.gridRowStart = '';
|
|
242
|
+
itemEl.style.gridRowEnd = '';
|
|
243
|
+
itemEl.style.gridColumn = '';
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Clear placement styles for all items when leaving masonry mode.
|
|
247
|
+
*/
|
|
248
|
+
clearMasonryStyles() {
|
|
249
|
+
this.getItems().forEach((itemEl) => this.clearItemStyles(itemEl));
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Convert a rendered item height to the number of grid rows it should span.
|
|
253
|
+
* Returns undefined for images that are not fully loaded yet.
|
|
254
|
+
*/
|
|
255
|
+
calculateRowSpan(itemEl, rowHeight, rowGap) {
|
|
256
|
+
if (itemEl instanceof HTMLImageElement && (!itemEl.complete || itemEl.naturalHeight === 0)) {
|
|
257
|
+
return undefined;
|
|
258
|
+
}
|
|
259
|
+
const height = itemEl.getBoundingClientRect().height;
|
|
260
|
+
const itemStyles = getComputedStyle(itemEl);
|
|
261
|
+
const marginBottom = parseFloat(itemStyles.getPropertyValue('margin-bottom')) || 0;
|
|
262
|
+
const denominator = rowHeight + rowGap;
|
|
263
|
+
if (!denominator || !Number.isFinite(denominator)) {
|
|
264
|
+
return 1;
|
|
265
|
+
}
|
|
266
|
+
return Math.ceil((height + marginBottom + rowGap) / denominator) || 1;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Get the index of the column to position the item in.
|
|
270
|
+
* When the order is `best-fit`, the column with the shortest height is
|
|
271
|
+
* returned. Otherwise, items are placed in the column that matches their
|
|
272
|
+
* natural DOM order.
|
|
273
|
+
*/
|
|
274
|
+
getColumnIndex(index, columnHeights, columns) {
|
|
275
|
+
const { order } = this;
|
|
276
|
+
if (order === 'best-fit') {
|
|
277
|
+
let columnIndex = 0;
|
|
278
|
+
for (let i = 1; i < columns; i++) {
|
|
279
|
+
if (columnHeights[i] < columnHeights[columnIndex]) {
|
|
280
|
+
columnIndex = i;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return columnIndex;
|
|
284
|
+
}
|
|
285
|
+
return index % columns;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Apply masonry placement by assigning each item a column and row span.
|
|
289
|
+
*/
|
|
290
|
+
layoutMasonry(items, rowHeight, rowGap, columns) {
|
|
291
|
+
const columnHeights = new Array(columns).fill(0);
|
|
292
|
+
items.forEach((itemEl, i) => {
|
|
293
|
+
const span = this.calculateRowSpan(itemEl, rowHeight, rowGap);
|
|
294
|
+
if (span === undefined) {
|
|
295
|
+
this.clearItemStyles(itemEl);
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
const columnIndex = this.getColumnIndex(i, columnHeights, columns);
|
|
299
|
+
const start = columnHeights[columnIndex] + 1;
|
|
300
|
+
itemEl.style.gridColumn = `${columnIndex + 1}`;
|
|
301
|
+
itemEl.style.gridRowStart = `${start}`;
|
|
302
|
+
itemEl.style.gridRowEnd = `span ${span}`;
|
|
303
|
+
columnHeights[columnIndex] = start + span - 1;
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
render() {
|
|
307
|
+
const { layout, order } = this;
|
|
308
|
+
const theme = ionicGlobal.getIonTheme(this);
|
|
309
|
+
return (index.h(index.Host, { key: 'c8e3d332f3bf28671cd960571c7752bdacb503eb', class: {
|
|
310
|
+
[theme]: true,
|
|
311
|
+
[`gallery-layout-${layout}`]: true,
|
|
312
|
+
[`gallery-order-${order}`]: layout === 'masonry',
|
|
313
|
+
} }, index.h("slot", { key: 'ee0509845dfa77e0257bc01852f6b96cb78bee45', onSlotchange: this.onSlotChange })));
|
|
314
|
+
}
|
|
315
|
+
get el() { return index.getElement(this); }
|
|
316
|
+
static get watchers() { return {
|
|
317
|
+
"layout": [{
|
|
318
|
+
"layoutChanged": 0
|
|
319
|
+
}],
|
|
320
|
+
"order": [{
|
|
321
|
+
"layoutChanged": 0
|
|
322
|
+
}],
|
|
323
|
+
"columns": [{
|
|
324
|
+
"layoutChanged": 0
|
|
325
|
+
}]
|
|
326
|
+
}; }
|
|
327
|
+
};
|
|
328
|
+
Gallery.style = galleryCss();
|
|
329
|
+
|
|
330
|
+
exports.ion_gallery = Gallery;
|
|
@@ -84,9 +84,9 @@ const Img = class {
|
|
|
84
84
|
const { loadSrc, alt, onLoad, loadError, inheritedAttributes } = this;
|
|
85
85
|
const { draggable } = inheritedAttributes;
|
|
86
86
|
const theme = ionicGlobal.getIonTheme(this);
|
|
87
|
-
return (index.h(index.Host, { key: '
|
|
87
|
+
return (index.h(index.Host, { key: '91de170493b31d6260e975b440beceb6906b6d5a', class: {
|
|
88
88
|
[theme]: true,
|
|
89
|
-
} }, index.h("img", { key: '
|
|
89
|
+
} }, index.h("img", { key: 'ac1f41afbece34a3e38e656733f3e55cce385b4c', decoding: "async", src: loadSrc, alt: alt, onLoad: onLoad, onError: loadError, part: "image", draggable: isDraggable(draggable) })));
|
|
90
90
|
}
|
|
91
91
|
get el() { return index.getElement(this); }
|
|
92
92
|
static get watchers() { return {
|
|
@@ -271,7 +271,7 @@ const InfiniteScroll = class {
|
|
|
271
271
|
render() {
|
|
272
272
|
const theme = ionicGlobal.getIonTheme(this);
|
|
273
273
|
const disabled = this.disabled;
|
|
274
|
-
return (index.h(index.Host, { key: '
|
|
274
|
+
return (index.h(index.Host, { key: '02beca21d668e4e605532ad5ca5a67a08c71eebb', class: {
|
|
275
275
|
[theme]: true,
|
|
276
276
|
'infinite-scroll-loading': this.isLoading,
|
|
277
277
|
'infinite-scroll-enabled': !disabled,
|
|
@@ -315,11 +315,11 @@ const InfiniteScrollContent = class {
|
|
|
315
315
|
}
|
|
316
316
|
render() {
|
|
317
317
|
const theme = ionicGlobal.getIonTheme(this);
|
|
318
|
-
return (index.h(index.Host, { key: '
|
|
318
|
+
return (index.h(index.Host, { key: 'b51954f829eeafd5ec304b3e66e330776485ffc8', class: {
|
|
319
319
|
[theme]: true,
|
|
320
320
|
// Used internally for styling
|
|
321
321
|
[`infinite-scroll-content-${theme}`]: true,
|
|
322
|
-
} }, index.h("div", { key: '
|
|
322
|
+
} }, index.h("div", { key: '047da7f15fe38deed592dd66d1c97e12da4545bb', class: "infinite-loading" }, this.loadingSpinner && (index.h("div", { key: '1c05820f091052b8ee9e9ca20054495a676c21aa', class: "infinite-loading-spinner" }, index.h("ion-spinner", { key: 'ff801e3486f3c1a4605d2a2de9b47bd7bd536698', name: this.loadingSpinner }))), this.loadingText !== undefined && this.renderLoadingText())));
|
|
323
323
|
}
|
|
324
324
|
};
|
|
325
325
|
InfiniteScrollContent.style = {
|
|
@@ -692,7 +692,7 @@ const InputOTP = class {
|
|
|
692
692
|
const tabbableIndex = this.getTabbableIndex();
|
|
693
693
|
const pattern = this.getPattern();
|
|
694
694
|
const hasDescription = ((_b = (_a = el.querySelector('.input-otp-description')) === null || _a === void 0 ? void 0 : _a.textContent) === null || _b === void 0 ? void 0 : _b.trim()) !== '';
|
|
695
|
-
return (index.h(index.Host, { key: '
|
|
695
|
+
return (index.h(index.Host, { key: '7a5c5dbb7e1880bd94d4b00e579af941366b1cb2', class: theme.createColorClasses(color, {
|
|
696
696
|
[mode]: true,
|
|
697
697
|
'has-focus': hasFocus,
|
|
698
698
|
[`input-otp-size-${size}`]: true,
|
|
@@ -700,10 +700,10 @@ const InputOTP = class {
|
|
|
700
700
|
[`input-otp-fill-${fill}`]: true,
|
|
701
701
|
'input-otp-disabled': disabled,
|
|
702
702
|
'input-otp-readonly': readonly,
|
|
703
|
-
}) }, index.h("div", Object.assign({ key: '
|
|
703
|
+
}) }, index.h("div", Object.assign({ key: 'a4427602ea1894d53e4d0f502dbb972c93a86bff', role: "group", "aria-label": "One-time password input", class: "input-otp-group", part: "group" }, inheritedAttributes), Array.from({ length }).map((_, index$1) => (index.h(index.Fragment, null, index.h("div", { class: "native-wrapper", part: "container" }, index.h("input", { class: "native-input", part: "native", id: `${inputId}-${index$1}`, "aria-label": `Input ${index$1 + 1} of ${length}`, type: "text", autoCapitalize: autocapitalize, inputmode: inputmode, pattern: pattern, disabled: disabled, readOnly: readonly, tabIndex: index$1 === tabbableIndex ? 0 : -1, value: inputValues[index$1] || '', autocomplete: "one-time-code", ref: (el) => (inputRefs[index$1] = el), onInput: this.onInput(index$1), onBlur: this.onBlur, onFocus: this.onFocus(index$1), onKeyDown: this.onKeyDown(index$1), onPaste: this.onPaste })), this.showSeparator(index$1) && index.h("div", { class: "input-otp-separator", part: "separator" }))))), index.h("div", { key: '7ee9d8dfd2e52875f1bfe3e3dea0494c18c12f4a', class: {
|
|
704
704
|
'input-otp-description': true,
|
|
705
705
|
'input-otp-description-hidden': !hasDescription,
|
|
706
|
-
}, part: "description" }, index.h("slot", { key: '
|
|
706
|
+
}, part: "description" }, index.h("slot", { key: '163c374e7ae5dbdb1dc12483161e5aca919a50d5' }))));
|
|
707
707
|
}
|
|
708
708
|
static get formAssociated() { return true; }
|
|
709
709
|
get el() { return index.getElement(this); }
|
|
@@ -101,16 +101,16 @@ const InputPasswordToggle = class {
|
|
|
101
101
|
const { color, inputPasswordHideIcon, inputPasswordShowIcon, type } = this;
|
|
102
102
|
const mode = ionicGlobal.getIonMode(this);
|
|
103
103
|
const isPasswordVisible = type === 'text';
|
|
104
|
-
return (index.h(index.Host, { key: '
|
|
104
|
+
return (index.h(index.Host, { key: 'c7f0805958b284005806a0cb3ed0b5cba42cecd1', class: theme.createColorClasses(color, {
|
|
105
105
|
[mode]: true,
|
|
106
|
-
}) }, index.h("ion-button", { key: '
|
|
106
|
+
}) }, index.h("ion-button", { key: 'dee2bdeb169d1fa4943c9a8b0164b8fbb4cdfe06', mode: mode, color: color, fill: "clear", shape: "round", "aria-label": isPasswordVisible ? 'Hide password' : 'Show password', "aria-pressed": isPasswordVisible ? 'true' : 'false', type: "button", onPointerDown: (ev) => {
|
|
107
107
|
/**
|
|
108
108
|
* This prevents mobile browsers from
|
|
109
109
|
* blurring the input when the password toggle
|
|
110
110
|
* button is activated.
|
|
111
111
|
*/
|
|
112
112
|
ev.preventDefault();
|
|
113
|
-
}, onClick: this.togglePasswordVisibility }, index.h("ion-icon", { key: '
|
|
113
|
+
}, onClick: this.togglePasswordVisibility }, index.h("ion-icon", { key: 'be752db7186a7cd6fc033c7002fcb1683d93c162', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? inputPasswordHideIcon : inputPasswordShowIcon }))));
|
|
114
114
|
}
|
|
115
115
|
get el() { return index.getElement(this); }
|
|
116
116
|
static get watchers() { return {
|
|
@@ -622,7 +622,7 @@ const Input = class {
|
|
|
622
622
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
623
623
|
*/
|
|
624
624
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
625
|
-
return (index.h(index.Host, { key: '
|
|
625
|
+
return (index.h(index.Host, { key: 'beeeca9939e7e416783425f67d3c9e2be6bbae99', class: theme.createColorClasses(this.color, {
|
|
626
626
|
[theme$1]: true,
|
|
627
627
|
'has-value': hasValue,
|
|
628
628
|
'has-focus': hasFocus,
|
|
@@ -635,7 +635,7 @@ const Input = class {
|
|
|
635
635
|
'in-item-color': theme.hostContext('ion-item.ion-color', this.el),
|
|
636
636
|
'input-disabled': disabled,
|
|
637
637
|
'input-readonly': readonly,
|
|
638
|
-
}) }, index.h("label", { key: '
|
|
638
|
+
}) }, index.h("label", { key: 'f227df52a6ad60344f16261a82c0d0566bb8cd5b', class: "input-wrapper", htmlFor: inputId, onClick: this.onLabelClick }, this.renderLabelContainer(), index.h("div", { key: 'ae6da554ce21f805361a7704139b776a9344dcb2', class: "native-wrapper", onClick: this.onLabelClick },
|
|
639
639
|
/**
|
|
640
640
|
* For the ionic theme, we render the outline container here
|
|
641
641
|
* instead of higher up, so it can be positioned relative to
|
|
@@ -645,14 +645,14 @@ const Input = class {
|
|
|
645
645
|
* <label> element, ensuring that clicking the label text
|
|
646
646
|
* focuses the input.
|
|
647
647
|
*/
|
|
648
|
-
theme$1 === 'ionic' && index.h("div", { key: '
|
|
648
|
+
theme$1 === 'ionic' && index.h("div", { key: '83aa5e7ad97b0c964e31966c1d2b8771d1ecfc53', class: "input-outline" }), index.h("slot", { key: '1931003f2b0d19508acaaffab58fee644d1f6158', name: "start" }), index.h("input", Object.assign({ key: '33a06efb4ce0b6e67c12e77f131effb113fba73f', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, 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)), clearInput && !readonly && !disabled && (index.h("button", { key: 'd350f26cf6927ee089373ea8903db2479a0a404c', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
649
649
|
/**
|
|
650
650
|
* This prevents mobile browsers from
|
|
651
651
|
* blurring the input when the clear
|
|
652
652
|
* button is activated.
|
|
653
653
|
*/
|
|
654
654
|
ev.preventDefault();
|
|
655
|
-
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '
|
|
655
|
+
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '972a2d94dcf599e63aac1d73e34873a9c3d0bf94', "aria-hidden": "true", icon: inputClearIcon }))), index.h("slot", { key: 'fac4dcaabb02f647e46276e92e3f341557170aec', name: "end" })), shouldRenderHighlight && index.h("div", { key: 'a10e519d8d1f0dcd81ffc43b8e4086797476f753', class: "input-highlight" })), this.renderBottomContent()));
|
|
656
656
|
}
|
|
657
657
|
get el() { return index.getElement(this); }
|
|
658
658
|
static get watchers() { return {
|
|
@@ -70,14 +70,14 @@ const ItemOption = class {
|
|
|
70
70
|
href: this.href,
|
|
71
71
|
target: this.target,
|
|
72
72
|
};
|
|
73
|
-
return (index.h(index.Host, { key: '
|
|
73
|
+
return (index.h(index.Host, { key: 'bfade0042108ff525077dfbdfd45169ccfd6b920', onClick: this.onClick, class: theme.createColorClasses(this.color, {
|
|
74
74
|
[theme$1]: true,
|
|
75
75
|
[`item-option-${shape}`]: shape !== undefined,
|
|
76
76
|
[`item-option-${hue}`]: hue !== undefined,
|
|
77
77
|
'item-option-disabled': disabled,
|
|
78
78
|
'item-option-expandable': expandable,
|
|
79
79
|
'ion-activatable': true,
|
|
80
|
-
}) }, index.h(TagType, Object.assign({ key: '
|
|
80
|
+
}) }, index.h(TagType, Object.assign({ key: '38466b511f4a20a3728f37dbf6779b852eba531a' }, attrs, { class: "button-native", part: "native", disabled: disabled }), index.h("span", { key: 'bb8f1b332afa2f575bcc69b340bd8f1faa5ca925', class: "button-inner", part: "inner" }, index.h("slot", { key: '41d627511e1615283956712e1b9519bae92460f6', name: "top" }), index.h("div", { key: 'bb949a43a586a8996933ee7528e5491beb647aa5', class: "horizontal-wrapper", part: "container" }, index.h("slot", { key: 'c0d6a73ef49082bfbdf0f542f7465d044ccb6521', name: "start" }), index.h("slot", { key: '79c6103e680983b2c1a17f1f11dbc41224cd4016', name: "icon-only" }), index.h("slot", { key: '6c7f17723544d3f6e8b9689b84ddf6196f1897a5' }), index.h("slot", { key: 'e15d0e02fde71bad8ff7bab0eded7d49508a926e', name: "end" })), index.h("slot", { key: 'c509d54d44ce33f5a34597b9d0ec29960bbcff62', name: "bottom" })), theme$1 === 'md' && index.h("ion-ripple-effect", { key: '412d4dc645c941d0b4356cf982be3d5bc2686f13' }))));
|
|
81
81
|
}
|
|
82
82
|
get el() { return index.getElement(this); }
|
|
83
83
|
};
|
|
@@ -112,7 +112,7 @@ const ItemOptions = class {
|
|
|
112
112
|
render() {
|
|
113
113
|
const theme = ionicGlobal.getIonTheme(this);
|
|
114
114
|
const isEnd = helpers.isEndSide(this.side);
|
|
115
|
-
return (index.h(index.Host, { key: '
|
|
115
|
+
return (index.h(index.Host, { key: 'f3bb726a28c571101791d33d946df9017f47e5ec', class: {
|
|
116
116
|
[theme]: true,
|
|
117
117
|
// Used internally for styling
|
|
118
118
|
[`item-options-${theme}`]: true,
|
|
@@ -660,7 +660,7 @@ const ItemSliding = class {
|
|
|
660
660
|
}
|
|
661
661
|
render() {
|
|
662
662
|
const theme = ionicGlobal.getIonTheme(this);
|
|
663
|
-
return (index.h(index.Host, { key: '
|
|
663
|
+
return (index.h(index.Host, { key: '321925e5582cc08b14031231603b1f1c49828b0a', class: {
|
|
664
664
|
[theme]: true,
|
|
665
665
|
'item-sliding-active-slide': this.state !== 2 /* SlidingState.Disabled */,
|
|
666
666
|
'item-sliding-active-options-end': (this.state & 8 /* SlidingState.End */) !== 0,
|
|
@@ -310,11 +310,11 @@ const ItemDivider = class {
|
|
|
310
310
|
}
|
|
311
311
|
render() {
|
|
312
312
|
const theme$1 = ionicGlobal.getIonTheme(this);
|
|
313
|
-
return (index.h(index.Host, { key: '
|
|
313
|
+
return (index.h(index.Host, { key: 'ede65c17ec8e42e4096f8753116923d6b8d2cc14', class: theme.createColorClasses(this.color, {
|
|
314
314
|
[theme$1]: true,
|
|
315
315
|
'item-divider-sticky': this.sticky,
|
|
316
316
|
item: true,
|
|
317
|
-
}) }, index.h("slot", { key: '
|
|
317
|
+
}) }, index.h("slot", { key: '4e16384a4481326490dab1ad31218c19eb9108db', name: "start" }), index.h("div", { key: '0bddbea071781e3372b5c7147c2fdd3ba0e29ffe', class: "item-divider-inner", part: "inner" }, index.h("div", { key: 'dfa603352f7cc58aaa717a32507b1dbbd7b79757', class: "item-divider-wrapper", part: "container" }, index.h("slot", { key: '4b1b67cfe72266645943f88ede9f8c61a344967d' })), index.h("slot", { key: '6ddd72a410c449e281f5344d02324e7461ba29e8', name: "end" }))));
|
|
318
318
|
}
|
|
319
319
|
get el() { return index.getElement(this); }
|
|
320
320
|
};
|
|
@@ -336,7 +336,7 @@ const ItemGroup = class {
|
|
|
336
336
|
}
|
|
337
337
|
render() {
|
|
338
338
|
const theme = ionicGlobal.getIonTheme(this);
|
|
339
|
-
return (index.h(index.Host, { key: '
|
|
339
|
+
return (index.h(index.Host, { key: '66ad8ce335cd97703e884538bdf6ea1927a30889', role: "group", class: {
|
|
340
340
|
[theme]: true,
|
|
341
341
|
// Used internally for styling
|
|
342
342
|
[`item-group-${theme}`]: true,
|
|
@@ -410,13 +410,13 @@ const Label = class {
|
|
|
410
410
|
render() {
|
|
411
411
|
const position = this.position;
|
|
412
412
|
const theme$1 = ionicGlobal.getIonTheme(this);
|
|
413
|
-
return (index.h(index.Host, { key: '
|
|
413
|
+
return (index.h(index.Host, { key: '7cbec4c1b8fe8925f44255e02cee78bc1873fd70', class: theme.createColorClasses(this.color, {
|
|
414
414
|
[theme$1]: true,
|
|
415
415
|
'in-item-color': theme.hostContext('ion-item.ion-color', this.el),
|
|
416
416
|
[`label-${position}`]: position !== undefined,
|
|
417
417
|
[`label-no-animate`]: this.noAnimate,
|
|
418
418
|
'label-rtl': document.dir === 'rtl',
|
|
419
|
-
}) }, index.h("slot", { key: '
|
|
419
|
+
}) }, index.h("slot", { key: '6d8b4a7ab396792d7a7c0b7e259c622840b7ef9b' })));
|
|
420
420
|
}
|
|
421
421
|
get el() { return index.getElement(this); }
|
|
422
422
|
static get watchers() { return {
|
|
@@ -480,7 +480,7 @@ const List = class {
|
|
|
480
480
|
const theme = ionicGlobal.getIonTheme(this);
|
|
481
481
|
const shape = this.getShape();
|
|
482
482
|
const { lines, inset } = this;
|
|
483
|
-
return (index.h(index.Host, { key: '
|
|
483
|
+
return (index.h(index.Host, { key: 'f17f7af20c567ea0098b362ea04d051b44aa151a', role: "list", class: {
|
|
484
484
|
[theme]: true,
|
|
485
485
|
// Used internally for styling
|
|
486
486
|
[`list-${theme}`]: true,
|
|
@@ -511,10 +511,10 @@ const ListHeader = class {
|
|
|
511
511
|
render() {
|
|
512
512
|
const { lines } = this;
|
|
513
513
|
const theme$1 = ionicGlobal.getIonTheme(this);
|
|
514
|
-
return (index.h(index.Host, { key: '
|
|
514
|
+
return (index.h(index.Host, { key: '90c594b0290949b159f35bd36c86c3231a1b8e44', class: theme.createColorClasses(this.color, {
|
|
515
515
|
[theme$1]: true,
|
|
516
516
|
[`list-header-lines-${lines}`]: lines !== undefined,
|
|
517
|
-
}) }, index.h("div", { key: '
|
|
517
|
+
}) }, index.h("div", { key: '9d1bde129787263edb79bc921cdf0168a2935a27', class: "list-header-inner", part: "inner" }, index.h("slot", { key: 'fe157b5ff88355adfb09209ee92fd03c82e067ff' }))));
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
520
|
ListHeader.style = {
|
|
@@ -535,9 +535,9 @@ const Note = class {
|
|
|
535
535
|
}
|
|
536
536
|
render() {
|
|
537
537
|
const theme$1 = ionicGlobal.getIonTheme(this);
|
|
538
|
-
return (index.h(index.Host, { key: '
|
|
538
|
+
return (index.h(index.Host, { key: '34a74796fc2e41549100c6611a5900d60c8d688d', class: theme.createColorClasses(this.color, {
|
|
539
539
|
[theme$1]: true,
|
|
540
|
-
}) }, index.h("slot", { key: '
|
|
540
|
+
}) }, index.h("slot", { key: 'ea4c2e3b5666d10ca312e175db200134d8a30382' })));
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
Note.style = {
|
|
@@ -573,11 +573,11 @@ const SkeletonText = class {
|
|
|
573
573
|
const animated = this.animated && index.config.getBoolean('animated', true);
|
|
574
574
|
const inMedia = theme.hostContext('ion-avatar', this.el) || theme.hostContext('ion-thumbnail', this.el);
|
|
575
575
|
const theme$1 = ionicGlobal.getIonTheme(this);
|
|
576
|
-
return (index.h(index.Host, { key: '
|
|
576
|
+
return (index.h(index.Host, { key: 'aa94213767105077047a369d4e4861027af96060', class: {
|
|
577
577
|
[theme$1]: true,
|
|
578
578
|
'skeleton-text-animated': animated,
|
|
579
579
|
'in-media': inMedia,
|
|
580
|
-
} }, index.h("span", { key: '
|
|
580
|
+
} }, index.h("span", { key: 'c5dab0fb89d524827936aef5345cc0c7eda9e274' }, "\u00A0")));
|
|
581
581
|
}
|
|
582
582
|
get el() { return index.getElement(this); }
|
|
583
583
|
};
|
|
@@ -280,9 +280,9 @@ const Loading = class {
|
|
|
280
280
|
* Otherwise, don't set aria-labelledby.
|
|
281
281
|
*/
|
|
282
282
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
283
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
283
|
+
return (index.h(index.Host, Object.assign({ key: 'b1e84a0d078fac04c0736a19d067d8d49e339323', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
284
284
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
285
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: '
|
|
285
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [theme$1]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: '19884fd6f8bf6f704bff388ecfa245d1cd98156c', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: 'ecd47d503a9805a5c18f1b0d48989e54b4cb8f78', tabindex: "0", "aria-hidden": "true" }), index.h("div", { key: '231821576b812ffaa90ed9ced4437e456908ad53', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { key: 'e18d21751a73f408bd058aa4270f245285cd57fa', class: "loading-spinner" }, index.h("ion-spinner", { key: '478761b8a000191951e9902138483b389e1b76c4', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: '968be6c72872ce5bc8706fa37f242dcdc38efb33', tabindex: "0", "aria-hidden": "true" })));
|
|
286
286
|
}
|
|
287
287
|
get el() { return index.getElement(this); }
|
|
288
288
|
static get watchers() { return {
|