@ionic/core 8.8.6-dev.11777668103.132817bd → 8.8.6-dev.11777928681.1e4919af
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-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-Di5rHO3q.js → p-BTYqyHph.js} +1 -1
- package/components/{p-BqImG3uk.js → p-BU8N7ZrK.js} +1 -1
- package/components/{p-BXcCGjEc.js → p-BfHB6wX_.js} +1 -1
- package/components/{p-CIoAIKEr.js → p-BhfW3d9j.js} +1 -1
- package/components/{p-B71c6yUH.js → p-Brxa0j7O.js} +1 -1
- package/components/{p-IMXp2Inn.js → p-BtAlyZ0b.js} +1 -1
- package/components/{p-BCFZKMI6.js → p-ByuCfbYy.js} +1 -1
- package/components/{p-DXUyXgVL.js → p-C-_EGKki.js} +1 -1
- package/components/{p-BFbsici0.js → p-C2cZvGcF.js} +1 -1
- package/components/{p-DTtRWhIZ.js → p-CdYTq34D.js} +1 -1
- package/components/{p-DH_9VCbD.js → p-CeYwuysM.js} +1 -1
- package/components/p-CnOTQxHB.js +4 -0
- package/components/{p-CoFqDNc5.js → p-CnwZE7CW.js} +1 -1
- package/components/{p-BLCuPAtN.js → p-CoarhFWH.js} +1 -1
- package/components/{p-C8ktKu9j.js → p-D5lMX0xt.js} +1 -1
- package/components/{p-TR4ubkPu.js → p-DAeMHNER.js} +1 -1
- package/components/{p-BRWWcnBq.js → p-GnGGIfCd.js} +1 -1
- package/components/{p-DAv9P_LE.js → p-TpZHKDyk.js} +1 -1
- package/components/p-XFUFdPrc.js +4 -0
- package/components/p-tYh73xQe.js +4 -0
- 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 +6 -8
- package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
- 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 +5 -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 +2 -3
- 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 +0 -6
- package/dist/collection/components/col/col.js +2 -3
- 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 +5 -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 +2 -3
- 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 +0 -1
- package/dist/docs.json +1 -212
- 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 +6 -8
- package/dist/esm/ion-datetime_3.entry.js +4 -4
- 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 +5 -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 +2 -3
- 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 +0 -70
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-83c693c4.entry.js → p-091a95ea.entry.js} +1 -1
- package/dist/ionic/{p-e3abffbe.entry.js → p-1855fcb6.entry.js} +1 -1
- package/dist/ionic/{p-15e3e8f5.entry.js → p-192e7509.entry.js} +1 -1
- package/dist/ionic/{p-a9fb086b.entry.js → p-1faf270d.entry.js} +1 -1
- package/dist/ionic/{p-d6299c37.entry.js → p-228b6a9c.entry.js} +1 -1
- package/dist/ionic/{p-8537b2fb.entry.js → p-2aa44c65.entry.js} +1 -1
- package/dist/ionic/{p-1c2c1869.entry.js → p-2bf931ae.entry.js} +1 -1
- package/dist/ionic/{p-b3c9f19c.entry.js → p-2effd05d.entry.js} +1 -1
- package/dist/ionic/p-308beb71.entry.js +4 -0
- package/dist/ionic/{p-586d4270.entry.js → p-3093958a.entry.js} +1 -1
- package/dist/ionic/{p-1c4de46b.entry.js → p-3bf01c2c.entry.js} +1 -1
- package/dist/ionic/{p-50b61fab.entry.js → p-4091ad21.entry.js} +1 -1
- package/dist/ionic/{p-e18d3fdb.entry.js → p-4610e447.entry.js} +1 -1
- package/dist/ionic/{p-fad05840.entry.js → p-4c864eb2.entry.js} +1 -1
- package/dist/ionic/{p-bd71a4a7.entry.js → p-4e46439d.entry.js} +1 -1
- package/dist/ionic/{p-5274f999.entry.js → p-50d90690.entry.js} +1 -1
- package/dist/ionic/{p-3f79f594.entry.js → p-59b4f8d0.entry.js} +1 -1
- package/dist/ionic/{p-2f0073af.entry.js → p-5a3fc28e.entry.js} +1 -1
- package/dist/ionic/{p-1709b0aa.entry.js → p-5ac21be2.entry.js} +1 -1
- package/dist/ionic/p-64341e32.entry.js +4 -0
- package/dist/ionic/{p-b653f4c2.entry.js → p-6c8c37c2.entry.js} +1 -1
- package/dist/ionic/p-76d0e7ef.entry.js +4 -0
- package/dist/ionic/{p-05a30032.entry.js → p-79ae0425.entry.js} +1 -1
- package/dist/ionic/{p-c10fa162.entry.js → p-8180abe5.entry.js} +1 -1
- package/dist/ionic/{p-50cd2d57.entry.js → p-8516eb69.entry.js} +1 -1
- package/dist/ionic/{p-00c0bd38.entry.js → p-96549175.entry.js} +1 -1
- package/dist/ionic/{p-9d789053.entry.js → p-98c34fd7.entry.js} +1 -1
- package/dist/ionic/{p-72491468.entry.js → p-9b9b1450.entry.js} +1 -1
- package/dist/ionic/p-ae4ea663.entry.js +4 -0
- package/dist/ionic/{p-d976e777.entry.js → p-b0c54b4c.entry.js} +1 -1
- package/dist/ionic/{p-71b6014c.entry.js → p-b8b20b7e.entry.js} +1 -1
- package/dist/ionic/{p-2ad79c23.entry.js → p-bc5713f7.entry.js} +1 -1
- package/dist/ionic/p-d395b5cb.entry.js +4 -0
- package/dist/ionic/{p-d4ed5710.entry.js → p-d954cd19.entry.js} +1 -1
- package/dist/ionic/{p-ae667493.entry.js → p-e7f216ae.entry.js} +1 -1
- package/dist/ionic/{p-b2fe6c1c.entry.js → p-edb0b0c8.entry.js} +1 -1
- package/dist/ionic/{p-48026d15.entry.js → p-f061fcb7.entry.js} +1 -1
- package/dist/ionic/{p-7d5057c4.entry.js → p-f740c359.entry.js} +1 -1
- package/dist/types/components.d.ts +0 -66
- package/hydrate/index.js +129 -487
- package/hydrate/index.mjs +129 -487
- package/package.json +1 -1
- package/components/ion-gallery.d.ts +0 -11
- package/components/ion-gallery.js +0 -4
- package/components/p-B2rpt1JV.js +0 -4
- package/components/p-B6zr9RZN.js +0 -4
- package/components/p-CN-WzkJE.js +0 -4
- package/dist/cjs/ion-gallery.cjs.entry.js +0 -348
- package/dist/collection/components/gallery/gallery-interface.js +0 -1
- package/dist/collection/components/gallery/gallery.css +0 -103
- package/dist/collection/components/gallery/gallery.js +0 -439
- package/dist/collection/components/gallery/test/utils.js +0 -100
- package/dist/esm/ion-gallery.entry.js +0 -346
- package/dist/ionic/p-1e1c8d61.entry.js +0 -4
- package/dist/ionic/p-2aa7567e.entry.js +0 -4
- package/dist/ionic/p-4079cee3.entry.js +0 -4
- package/dist/ionic/p-8f127a9c.entry.js +0 -4
- package/dist/ionic/p-bf972309.entry.js +0 -4
- package/dist/ionic/p-cdb5fc03.entry.js +0 -4
- package/dist/types/components/gallery/gallery-interface.d.ts +0 -9
- package/dist/types/components/gallery/gallery.d.ts +0 -125
- package/dist/types/components/gallery/test/utils.d.ts +0 -2
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import { r as registerInstance, f as printIonWarning, h, d as Host, g as getElement } from './index-Omi_TcwW.js';
|
|
5
|
-
import { c as getIonTheme } from './ionic-global-CAZb-5i-.js';
|
|
6
|
-
|
|
7
|
-
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}`;
|
|
8
|
-
|
|
9
|
-
// TODO(FW-7285): Replace with global breakpoints
|
|
10
|
-
const BREAKPOINTS = {
|
|
11
|
-
xs: 0,
|
|
12
|
-
sm: 576,
|
|
13
|
-
md: 768,
|
|
14
|
-
lg: 992,
|
|
15
|
-
xl: 1200,
|
|
16
|
-
xxl: 1400,
|
|
17
|
-
};
|
|
18
|
-
const DEFAULT_COLUMNS = {
|
|
19
|
-
xs: 2,
|
|
20
|
-
sm: 3,
|
|
21
|
-
md: 4,
|
|
22
|
-
lg: 6,
|
|
23
|
-
xl: 8,
|
|
24
|
-
xxl: 10,
|
|
25
|
-
};
|
|
26
|
-
const BREAKPOINT_ORDER = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
27
|
-
const Gallery = class {
|
|
28
|
-
constructor(hostRef) {
|
|
29
|
-
registerInstance(this, hostRef);
|
|
30
|
-
// Keep track of whether we've warned about invalid columns to avoid
|
|
31
|
-
// duplicate warnings on screen resize.
|
|
32
|
-
this.hasWarnedInvalidColumns = false;
|
|
33
|
-
/**
|
|
34
|
-
* The visual layout of the gallery. When `uniform`, rows take up the height
|
|
35
|
-
* of the tallest item and are spaced evenly across the gallery. Additionally,
|
|
36
|
-
* items will have an aspect ratio of 1/1, forcing them to be square unless a
|
|
37
|
-
* height is explicitly set. When `masonry`, items will be positioned under each
|
|
38
|
-
* other with only the specified gap between them.
|
|
39
|
-
*/
|
|
40
|
-
this.layout = 'uniform';
|
|
41
|
-
/**
|
|
42
|
-
* The order in which items are positioned. Only applies when layout is
|
|
43
|
-
* `masonry`. When `sequential`, items are positioned in the order they are
|
|
44
|
-
* placed in the DOM. When `best-fit`, items are positioned under the column
|
|
45
|
-
* with the most available space.
|
|
46
|
-
*/
|
|
47
|
-
this.order = 'sequential';
|
|
48
|
-
/**
|
|
49
|
-
* The number of columns to display. Can be set as a number or an object of
|
|
50
|
-
* breakpoint values (e.g. `{ xs: 2, sm: 3, md: 4 }`).
|
|
51
|
-
*/
|
|
52
|
-
this.columns = DEFAULT_COLUMNS;
|
|
53
|
-
/**
|
|
54
|
-
* Listen for the slotchange event on the slot.
|
|
55
|
-
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
56
|
-
* of the masonry grid when the slot changes. This is useful for when items
|
|
57
|
-
* are added or removed from the gallery.
|
|
58
|
-
*/
|
|
59
|
-
this.onSlotChange = () => {
|
|
60
|
-
this.scheduleMasonryResize();
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Measure the host and children, then compute masonry placement.
|
|
64
|
-
*/
|
|
65
|
-
this.resizeMasonryGrid = () => {
|
|
66
|
-
this.masonryRaf = undefined;
|
|
67
|
-
if (this.layout !== 'masonry') {
|
|
68
|
-
this.clearMasonryStyles();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const styles = getComputedStyle(this.el);
|
|
72
|
-
const rowHeight = parseFloat(styles.getPropertyValue('grid-auto-rows')) || 0;
|
|
73
|
-
const rowGap = parseFloat(styles.getPropertyValue('row-gap')) || parseFloat(styles.getPropertyValue('gap')) || 0;
|
|
74
|
-
const columnsStr = styles.getPropertyValue('--internal-gallery-columns');
|
|
75
|
-
// Fallback to 2 columns for masonry calculations when the resolved
|
|
76
|
-
// --internal-gallery-columns CSS value is missing or unparsable.
|
|
77
|
-
const columns = parseInt(columnsStr, 10) || 2;
|
|
78
|
-
const items = this.getItems();
|
|
79
|
-
this.layoutMasonry(items, rowHeight, rowGap, columns);
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
layoutChanged() {
|
|
83
|
-
this.updateResponsiveColumns(true);
|
|
84
|
-
this.scheduleMasonryResize();
|
|
85
|
-
}
|
|
86
|
-
componentDidLoad() {
|
|
87
|
-
this.updateResponsiveColumns(true);
|
|
88
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
89
|
-
this.updateResponsiveColumns();
|
|
90
|
-
this.scheduleMasonryResize();
|
|
91
|
-
});
|
|
92
|
-
this.resizeObserver.observe(this.el);
|
|
93
|
-
this.scheduleMasonryResize();
|
|
94
|
-
}
|
|
95
|
-
disconnectedCallback() {
|
|
96
|
-
var _a;
|
|
97
|
-
if (this.masonryRaf !== undefined) {
|
|
98
|
-
cancelAnimationFrame(this.masonryRaf);
|
|
99
|
-
this.masonryRaf = undefined;
|
|
100
|
-
}
|
|
101
|
-
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
102
|
-
this.resizeObserver = undefined;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Listen for the load event on child elements.
|
|
106
|
-
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
107
|
-
* of the masonry grid when the child elements load. This is useful for when
|
|
108
|
-
* images take time to load.
|
|
109
|
-
*/
|
|
110
|
-
onChildLoad(ev) {
|
|
111
|
-
if (this.layout !== 'masonry') {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
const target = ev.target;
|
|
115
|
-
if (target !== null && this.el.contains(target)) {
|
|
116
|
-
this.scheduleMasonryResize();
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Batch masonry measurements to a single animation frame.
|
|
121
|
-
* This avoids repeated sync layouts during rapid resize/load/slot changes.
|
|
122
|
-
*/
|
|
123
|
-
scheduleMasonryResize() {
|
|
124
|
-
if (this.layout !== 'masonry') {
|
|
125
|
-
this.clearMasonryStyles();
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (this.masonryRaf !== undefined) {
|
|
129
|
-
cancelAnimationFrame(this.masonryRaf);
|
|
130
|
-
}
|
|
131
|
-
this.masonryRaf = requestAnimationFrame(this.resizeMasonryGrid);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Normalize a columns value to a positive integer.
|
|
135
|
-
* Returns undefined when the input cannot be interpreted as a finite number.
|
|
136
|
-
*/
|
|
137
|
-
sanitizeColumns(columns) {
|
|
138
|
-
if (columns === undefined) {
|
|
139
|
-
return undefined;
|
|
140
|
-
}
|
|
141
|
-
const numericColumns = typeof columns === 'number' ? columns : Number(columns);
|
|
142
|
-
if (!Number.isFinite(numericColumns) || !Number.isInteger(numericColumns) || numericColumns <= 0) {
|
|
143
|
-
return undefined;
|
|
144
|
-
}
|
|
145
|
-
return numericColumns;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Check if the value is a breakpoint columns object.
|
|
149
|
-
*/
|
|
150
|
-
isBreakpointColumns(value) {
|
|
151
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Check if the breakpoint columns object has any invalid values.
|
|
155
|
-
* Returns true if any value is undefined or not a positive integer.
|
|
156
|
-
*/
|
|
157
|
-
hasInvalidBreakpointColumns(breakpointColumns) {
|
|
158
|
-
for (const breakpoint of BREAKPOINT_ORDER) {
|
|
159
|
-
const value = breakpointColumns[breakpoint];
|
|
160
|
-
if (value !== undefined && this.sanitizeColumns(value) === undefined) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return false;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Get the columns from a responsive breakpoint map.
|
|
168
|
-
* Returns the columns for the last matching breakpoint.
|
|
169
|
-
*/
|
|
170
|
-
getColumnsFromBreakpointColumns(width, breakpointColumns) {
|
|
171
|
-
let columns;
|
|
172
|
-
for (const bp of BREAKPOINT_ORDER) {
|
|
173
|
-
const customValue = breakpointColumns[bp];
|
|
174
|
-
const parsedCustom = this.sanitizeColumns(customValue);
|
|
175
|
-
const parsedDefault = this.sanitizeColumns(DEFAULT_COLUMNS[bp]);
|
|
176
|
-
// Use valid custom values when present; otherwise fall back to defaults per breakpoint.
|
|
177
|
-
const resolved = customValue === undefined || parsedCustom === undefined ? parsedDefault : parsedCustom;
|
|
178
|
-
if (resolved !== undefined && width >= BREAKPOINTS[bp]) {
|
|
179
|
-
columns = resolved;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return columns;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Warn about an invalid columns value when it is set to a non-positive
|
|
186
|
-
* integer or a breakpoint map object with invalid values.
|
|
187
|
-
*/
|
|
188
|
-
warnInvalidColumns(columns) {
|
|
189
|
-
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);
|
|
190
|
-
this.hasWarnedInvalidColumns = true;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Resolve the active columns value for the current width. Falls back to
|
|
194
|
-
* the default responsive columns when the provided prop is invalid.
|
|
195
|
-
*/
|
|
196
|
-
getColumnsForWidth(width) {
|
|
197
|
-
const { columns, hasWarnedInvalidColumns } = this;
|
|
198
|
-
const isBreakpointColumns = this.isBreakpointColumns(columns);
|
|
199
|
-
const hasInvalidBreakpointColumns = isBreakpointColumns && this.hasInvalidBreakpointColumns(columns);
|
|
200
|
-
const sanitizedColumns = isBreakpointColumns
|
|
201
|
-
? this.getColumnsFromBreakpointColumns(width, columns)
|
|
202
|
-
: this.sanitizeColumns(columns);
|
|
203
|
-
if (!hasWarnedInvalidColumns &&
|
|
204
|
-
(hasInvalidBreakpointColumns || (!isBreakpointColumns && sanitizedColumns === undefined))) {
|
|
205
|
-
this.warnInvalidColumns(columns);
|
|
206
|
-
}
|
|
207
|
-
if (sanitizedColumns !== undefined) {
|
|
208
|
-
return sanitizedColumns;
|
|
209
|
-
}
|
|
210
|
-
return this.getColumnsFromBreakpointColumns(width, DEFAULT_COLUMNS);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Update the responsive columns for the gallery.
|
|
214
|
-
* This is used to update the columns when the component width changes.
|
|
215
|
-
*/
|
|
216
|
-
updateResponsiveColumns(force = false) {
|
|
217
|
-
const width = this.el.getBoundingClientRect().width;
|
|
218
|
-
// Only update the columns if the component width has changed by more than
|
|
219
|
-
// 1px or if the force flag is true. This prevents unnecessary re-renders
|
|
220
|
-
// when the component width has not changed.
|
|
221
|
-
if (!width || (!force && this.lastWidth !== undefined && Math.abs(this.lastWidth - width) < 1)) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
this.lastWidth = width;
|
|
225
|
-
const columns = this.getColumnsForWidth(width);
|
|
226
|
-
this.el.style.setProperty('--internal-gallery-columns', `${columns}`);
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Return all directly slotted HTMLElement children of the gallery.
|
|
230
|
-
*/
|
|
231
|
-
getItems() {
|
|
232
|
-
return Array.from(this.el.children).filter((child) => child instanceof HTMLElement);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Clear the item styles for the given item element.
|
|
236
|
-
* This is used to switch between uniform and masonry layouts.
|
|
237
|
-
*/
|
|
238
|
-
clearItemStyles(itemEl) {
|
|
239
|
-
itemEl.style.gridRowStart = '';
|
|
240
|
-
itemEl.style.gridRowEnd = '';
|
|
241
|
-
itemEl.style.gridColumn = '';
|
|
242
|
-
itemEl.style.marginBottom = '';
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Clear placement styles for all items when leaving masonry mode.
|
|
246
|
-
*/
|
|
247
|
-
clearMasonryStyles() {
|
|
248
|
-
this.getItems().forEach((itemEl) => this.clearItemStyles(itemEl));
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Convert a rendered item height to the number of grid rows it should span.
|
|
252
|
-
* Returns undefined for images that are not fully loaded yet.
|
|
253
|
-
*/
|
|
254
|
-
calculateRowSpan(itemEl, rowHeight, rowGap) {
|
|
255
|
-
if (itemEl instanceof HTMLImageElement && (!itemEl.complete || itemEl.naturalHeight === 0)) {
|
|
256
|
-
return undefined;
|
|
257
|
-
}
|
|
258
|
-
const height = itemEl.getBoundingClientRect().height;
|
|
259
|
-
const itemStyles = getComputedStyle(itemEl);
|
|
260
|
-
const marginBottom = parseFloat(itemStyles.getPropertyValue('margin-bottom')) || 0;
|
|
261
|
-
const denominator = rowHeight + rowGap;
|
|
262
|
-
if (!denominator || !Number.isFinite(denominator)) {
|
|
263
|
-
return 1;
|
|
264
|
-
}
|
|
265
|
-
return Math.ceil((height + marginBottom + rowGap) / denominator) || 1;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Get the index of the column to position the item in.
|
|
269
|
-
* When the order is `best-fit`, the column with the shortest height is
|
|
270
|
-
* returned. Otherwise, items are placed in the column that matches their
|
|
271
|
-
* natural DOM order.
|
|
272
|
-
*/
|
|
273
|
-
getColumnIndex(index, columnHeights, columns) {
|
|
274
|
-
const { order } = this;
|
|
275
|
-
if (order === 'best-fit') {
|
|
276
|
-
let columnIndex = 0;
|
|
277
|
-
for (let i = 1; i < columns; i++) {
|
|
278
|
-
if (columnHeights[i] < columnHeights[columnIndex]) {
|
|
279
|
-
columnIndex = i;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
return columnIndex;
|
|
283
|
-
}
|
|
284
|
-
return index % columns;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Apply masonry placement by assigning each item a column and row span.
|
|
288
|
-
*/
|
|
289
|
-
layoutMasonry(items, rowHeight, rowGap, columns) {
|
|
290
|
-
const columnHeights = new Array(columns).fill(0);
|
|
291
|
-
const lastItemsByColumn = new Array(columns).fill(undefined);
|
|
292
|
-
items.forEach((itemEl, i) => {
|
|
293
|
-
itemEl.style.marginBottom = '';
|
|
294
|
-
const span = this.calculateRowSpan(itemEl, rowHeight, rowGap);
|
|
295
|
-
if (span === undefined) {
|
|
296
|
-
this.clearItemStyles(itemEl);
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
const columnIndex = this.getColumnIndex(i, columnHeights, columns);
|
|
300
|
-
const start = columnHeights[columnIndex] + 1;
|
|
301
|
-
itemEl.style.gridColumn = `${columnIndex + 1}`;
|
|
302
|
-
itemEl.style.gridRowStart = `${start}`;
|
|
303
|
-
itemEl.style.gridRowEnd = `span ${span}`;
|
|
304
|
-
columnHeights[columnIndex] = start + span - 1;
|
|
305
|
-
lastItemsByColumn[columnIndex] = itemEl;
|
|
306
|
-
});
|
|
307
|
-
// Remove trailing space from the final item in each column while preserving
|
|
308
|
-
// spacing between all non-final items.
|
|
309
|
-
lastItemsByColumn.forEach((itemEl) => {
|
|
310
|
-
if (itemEl === undefined) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
itemEl.style.marginBottom = '0px';
|
|
314
|
-
const spanWithoutTrailingGap = this.calculateRowSpan(itemEl, rowHeight, rowGap);
|
|
315
|
-
if (spanWithoutTrailingGap === undefined) {
|
|
316
|
-
this.clearItemStyles(itemEl);
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
itemEl.style.gridRowEnd = `span ${spanWithoutTrailingGap}`;
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
render() {
|
|
323
|
-
const { layout, order } = this;
|
|
324
|
-
const theme = getIonTheme(this);
|
|
325
|
-
return (h(Host, { key: '77cd21eada2c24092cc551d4e647582c820f05d9', class: {
|
|
326
|
-
[theme]: true,
|
|
327
|
-
[`gallery-layout-${layout}`]: true,
|
|
328
|
-
[`gallery-order-${order}`]: layout === 'masonry',
|
|
329
|
-
} }, h("slot", { key: 'fa311652848a526a7629476afb963bf3e68455c4', onSlotchange: this.onSlotChange })));
|
|
330
|
-
}
|
|
331
|
-
get el() { return getElement(this); }
|
|
332
|
-
static get watchers() { return {
|
|
333
|
-
"layout": [{
|
|
334
|
-
"layoutChanged": 0
|
|
335
|
-
}],
|
|
336
|
-
"order": [{
|
|
337
|
-
"layoutChanged": 0
|
|
338
|
-
}],
|
|
339
|
-
"columns": [{
|
|
340
|
-
"layoutChanged": 0
|
|
341
|
-
}]
|
|
342
|
-
}; }
|
|
343
|
-
};
|
|
344
|
-
Gallery.style = galleryCss();
|
|
345
|
-
|
|
346
|
-
export { Gallery as ion_gallery };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as o,h as s,d as r}from"./p-Omi_TcwW.js";import{c as t}from"./p-DaJxRxSQ.js";import{c as a}from"./p-CBV-BGvD.js";const c=class{constructor(s){o(this,s)}render(){const o=a(this);return s(r,{key:"4a8be0173621ab64b2849bd02b569e479890c5c4",class:t(this.color,{[o]:!0})},s("slot",{key:"af7771d2fd855b5de843f32d58cd33a89051fa8b"}))}};c.style=":host(.ion-color){color:var(--ion-color-base)}";export{c as ion_text}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,h as s,d as o}from"./p-Omi_TcwW.js";const n=class{constructor(s){e(this,s)}render(){return s(o,{key:"66e6783365c0842eb785d50191206d82321b35e7"},s("slot",{key:"21528369e7efdb93599179720b26c3f3c3e574ed"}))}};n.style=":host{scroll-snap-align:center;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%;min-height:1px;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none;}:host::-webkit-scrollbar{display:none}";export{n as ion_segment_content}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{f as t,r as o,c as e,e as a,j as i,h as n,d as r,g as s}from"./p-Omi_TcwW.js";import{E as l}from"./p-BwKpO3Is.js";import{g as d,r as p}from"./p-CHE1xWbg.js";import{c}from"./p-B-hirT0v.js";import{O as h,d as b,e as u,i as m,j as g,k as x,f as v,g as f,h as w,s as k,G as y}from"./p-C4uUM9DM.js";import{s as z}from"./p-CWJdc8f_.js";import{c as $,g as j}from"./p-DaJxRxSQ.js";import{w as T,b as D,c as C}from"./p-CBV-BGvD.js";import{c as Y}from"./p-Cb-0O4h8.js";import{createGesture as M}from"./p-Cl0B-RWe.js";import"./p-vXpMhGrs.js";import"./p-FvDKM4Ax.js";import"./p-BTEOs1at.js";const O=(t,o)=>Math.floor(t/2-o/2),W=(t,o)=>{const e=Y(),a=Y(),{position:i,top:n,bottom:r}=o,s=d(t).querySelector(".toast-wrapper");switch(a.addElement(s),i){case"top":a.fromTo("transform","translateY(-100%)",`translateY(${n})`);break;case"middle":const o=O(t.clientHeight,s.clientHeight);s.style.top=`${o}px`,a.fromTo("opacity",.01,1);break;default:a.fromTo("transform","translateY(100%)",`translateY(${r})`)}return e.easing("cubic-bezier(.155,1.105,.295,1.12)").duration(400).addAnimation(a)},B=(t,o)=>{const e=Y(),a=Y(),{position:i,top:n,bottom:r}=o,s=d(t).querySelector(".toast-wrapper");switch(a.addElement(s),i){case"top":a.fromTo("transform",`translateY(${n})`,"translateY(-100%)");break;case"middle":a.fromTo("opacity",.99,0);break;default:a.fromTo("transform",`translateY(${r})`,"translateY(100%)")}return e.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(a)},E=(t,o)=>{const e=Y(),a=Y(),{position:i,top:n,bottom:r}=o,s=d(t).querySelector(".toast-wrapper");switch(a.addElement(s),i){case"top":s.style.setProperty("transform",`translateY(${n})`),a.fromTo("opacity",.01,1);break;case"middle":const o=O(t.clientHeight,s.clientHeight);s.style.top=`${o}px`,a.fromTo("opacity",.01,1);break;default:s.style.setProperty("transform",`translateY(${r})`),a.fromTo("opacity",.01,1)}return e.easing("cubic-bezier(.36,.66,.04,1)").duration(400).addAnimation(a)},H=t=>{const o=Y(),e=Y(),a=d(t).querySelector(".toast-wrapper");return e.addElement(a).fromTo("opacity",.99,0),o.easing("cubic-bezier(.36,.66,.04,1)").duration(300).addAnimation(e)},I=class{constructor(t){o(this,t),this.didPresent=e(this,"ionToastDidPresent",7),this.willPresent=e(this,"ionToastWillPresent",7),this.willDismiss=e(this,"ionToastWillDismiss",7),this.didDismiss=e(this,"ionToastDidDismiss",7),this.didPresentShorthand=e(this,"didPresent",7),this.willPresentShorthand=e(this,"willPresent",7),this.willDismissShorthand=e(this,"willDismiss",7),this.didDismissShorthand=e(this,"didDismiss",7),this.delegateController=b(this),this.lockController=c(),this.triggerController=u(),this.customHTMLEnabled=a.get("innerHTMLTemplatesEnabled",l),this.presented=!1,this.revealContentToScreenReader=!1,this.hasController=!1,this.duration=a.getNumber("toastDuration",0),this.hue="subtle",this.layout="baseline",this.keyboardClose=!1,this.position="bottom",this.translucent=!1,this.animated=!0,this.isOpen=!1,this.dispatchCancelHandler=t=>{if(m(t.detail.role)){const t=this.getButtons().find((t=>"cancel"===t.role));this.callButtonHandler(t)}},this.createSwipeGesture=t=>{const o=this.gesture=((t,o,e)=>{const a=d(t).querySelector(".toast-wrapper"),i=t.clientHeight,n=a.getBoundingClientRect();let r=0;const s="middle"===t.position?.5:0,l="top"===t.position?-1:1,p=O(i,n.height),c=[{offset:0,transform:`translateY(-${p+n.height}px)`},{offset:.5,transform:"translateY(0px)"},{offset:1,transform:`translateY(${p+n.height}px)`}],b=Y("toast-swipe-to-dismiss-animation").addElement(a).duration(100);switch(t.position){case"middle":r=i+n.height,b.keyframes(c),b.progressStart(!0,.5);break;case"top":r=n.bottom,b.keyframes([{offset:0,transform:`translateY(${o.top})`},{offset:1,transform:"translateY(-100%)"}]),b.progressStart(!0,0);break;default:r=i-n.top,b.keyframes([{offset:0,transform:`translateY(${o.bottom})`},{offset:1,transform:"translateY(100%)"}]),b.progressStart(!0,0)}const u=t=>t*l/r,m=M({el:a,gestureName:"toast-swipe-to-dismiss",gesturePriority:h,direction:"y",onMove:t=>{const o=s+u(t.deltaY);b.progressStep(o)},onEnd:o=>{const i=o.velocityY,n=(o.deltaY+1e3*i)/r*l;m.enable(!1);let s=!0,d=1,h=0,g=0;if("middle"===t.position){s=n>=.25||n<=-.25,d=1,h=0;const t=a.getBoundingClientRect(),e=t.top-p,i=(p+t.height)*(o.deltaY<=0?-1:1);b.keyframes([{offset:0,transform:`translateY(${e}px)`},{offset:1,transform:`translateY(${s?`${i}px`:"0px"})`}]),g=i-e}else s=n>=.5,d=s?1:0,h=u(o.deltaY),g=(s?1-h:h)*r;const x=Math.min(Math.abs(g)/Math.abs(i),200);b.onFinish((()=>{s?(e(),b.destroy()):("middle"===t.position?b.keyframes(c).progressStart(!0,.5):b.progressStart(!0,0),m.enable(!0))}),{oneTimeCallback:!0}).progressEnd(d,h,x)}});return m})(this.el,t,(()=>{this.dismiss(void 0,y)}));o.enable(!0)},this.destroySwipeGesture=()=>{const{gesture:t}=this;void 0!==t&&(t.destroy(),this.gesture=void 0)},this.prefersSwipeGesture=()=>{const{swipeGesture:t}=this;return"vertical"===t}}swipeGestureChanged(){this.destroySwipeGesture(),this.presented&&this.prefersSwipeGesture()&&this.createSwipeGesture(this.lastPresentedPosition)}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:e}=this;t&&e.addClickListener(o,t)}connectedCallback(){g(this.el),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){var t;(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||x(this.el)}componentDidLoad(){!0===this.isOpen&&p((()=>this.present())),this.triggerChanged()}async present(){const o=D(this),e=await this.lockController.lock();await this.delegateController.attachViewToDom();const{el:a,position:i}=this,n=function(o,e,a,i){let n;if(n="md"===a?"top"===o?8:-8:"top"===o?10:-10,e&&T){!function(o,e){null===o.offsetParent&&t("[ion-toast] - The positionAnchor element for ion-toast was found in the DOM, but appears to be hidden. This may lead to unexpected positioning of the toast.",e)}(e,i);const a=e.getBoundingClientRect();return"top"===o?n+=a.bottom:"bottom"===o&&(n-=T.innerHeight-a.top),{top:`${n}px`,bottom:`${n}px`}}return{top:`calc(${n}px + var(--ion-safe-area-top, 0px))`,bottom:`calc(${n}px - var(--ion-safe-area-bottom, 0px))`}}(i,this.getAnchorElement(),o,a);this.lastPresentedPosition=n,await v(this,"toastEnter",W,E,void 0,{position:i,top:n.top,bottom:n.bottom}),this.revealContentToScreenReader=!0,this.duration>0&&(this.durationTimeout=setTimeout((()=>this.dismiss(void 0,"timeout")),this.duration)),this.prefersSwipeGesture()&&this.createSwipeGesture(n),e()}async dismiss(t,o){var e,a;const i=await this.lockController.lock(),{durationTimeout:n,position:r,lastPresentedPosition:s}=this;n&&clearTimeout(n);const l=await f(this,t,o,"toastLeave",B,H,{position:r,top:null!==(e=null==s?void 0:s.top)&&void 0!==e?e:"",bottom:null!==(a=null==s?void 0:s.bottom)&&void 0!==a?a:""});return l&&(this.delegateController.removeViewFromDom(),this.revealContentToScreenReader=!1),this.lastPresentedPosition=void 0,this.destroySwipeGesture(),i(),l}onDidDismiss(){return w(this.el,"ionToastDidDismiss")}onWillDismiss(){return w(this.el,"ionToastWillDismiss")}getButtons(){return this.buttons?this.buttons.map((t=>"string"==typeof t?{text:t}:t)):[]}getShape(){const{shape:t}=this;if("ionic"===C(this))return void 0===t?"round":t}getAnchorElement(){const{position:o,positionAnchor:e,el:a}=this;if(void 0!==e)if("middle"!==o||void 0===e){if("string"==typeof e){const o=document.getElementById(e);return null===o?void t(`[ion-toast] - An anchor element with an ID of "${e}" was not found in the DOM.`,a):o}if(e instanceof HTMLElement)return e;t("[ion-toast] - Invalid positionAnchor value:",e,a)}else t('[ion-toast] - The positionAnchor property is ignored when using position="middle".',this.el)}async buttonClick(t){const o=t.role;return m(o)||await this.callButtonHandler(t)?this.dismiss(void 0,o):Promise.resolve()}async callButtonHandler(t){if(null==t?void 0:t.handler)try{if(!1===await k(t.handler))return!1}catch(t){i("[ion-toast] - Exception in callButtonHandler:",t)}return!0}renderButtons(t,o){if(0===t.length)return;const e=C(this);return n("div",{class:{"toast-button-group":!0,[`toast-button-group-${o}`]:!0}},t.map((t=>n("button",Object.assign({},t.htmlAttributes,{type:"button",class:P(t),tabIndex:0,onClick:()=>this.buttonClick(t),part:A(t)}),n("div",{class:"toast-button-inner"},t.icon&&n("ion-icon",{"aria-hidden":"true",icon:t.icon,slot:void 0===t.text?"icon-only":void 0,class:"toast-button-icon"}),t.text),"md"===e&&n("ion-ripple-effect",{type:void 0!==t.icon&&void 0===t.text?"unbounded":"bounded"})))))}renderToastMessage(t,o=null){const{customHTMLEnabled:e,message:a}=this;return e?n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message",innerHTML:z(a)}):n("div",{key:t,"aria-hidden":o,class:"toast-message",part:"message"},a)}renderHeader(t,o=null){return n("div",{key:t,class:"toast-header","aria-hidden":o,part:"header"},this.header)}render(){const{layout:o,el:e,revealContentToScreenReader:a,header:i,hue:s,message:l}=this,d=this.getButtons(),p=d.filter((t=>"start"===t.side)),c=d.filter((t=>"start"!==t.side)),h=C(this),b=D(this),u=this.getShape(),m={"toast-wrapper":!0,[`toast-${this.position}`]:!0,[`toast-layout-${o}`]:!0};return"stacked"===o&&p.length>0&&c.length>0&&t("[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.",e),n(r,Object.assign({key:"f8a4c4537d421e924a58f9addbb38a4a043b9f53",tabindex:"-1"},this.htmlAttributes,{style:{zIndex:`${6e4+this.overlayIndex}`},class:$(this.color,Object.assign(Object.assign({[b]:!0,[h]:!0},j(this.cssClass)),{"overlay-hidden":!0,"toast-translucent":this.translucent,[`toast-shape-${u}`]:void 0!==u,[`toast-hue-${s}`]:void 0!==s})),onIonToastWillDismiss:this.dispatchCancelHandler}),n("div",{key:"4f0b39c8e0d7aecfe81da23c3ca1591374a8afa5",class:m,part:"wrapper"},n("div",{key:"a2cf3ea830d27b51ffe1158fb3f3bf87486401b5",class:"toast-container",part:"container"},this.renderButtons(p,"start"),void 0!==this.icon&&n("ion-icon",{key:"bee5f21ee8df2278e20bf0565495da30c2e61963",class:"toast-icon",part:"icon",icon:this.icon,lazy:!1,"aria-hidden":"true"}),n("div",{key:"40a95848e952dd587d1972487affd4b8e088209f",class:"toast-content",part:"content",role:"status","aria-atomic":"true","aria-live":"polite"},!a&&void 0!==i&&this.renderHeader("oldHeader","true"),!a&&void 0!==l&&this.renderToastMessage("oldMessage","true"),a&&void 0!==i&&this.renderHeader("header"),a&&void 0!==l&&this.renderToastMessage("header")),this.renderButtons(c,"end"))))}get el(){return s(this)}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}]}}},P=t=>({"toast-button":!0,"toast-button-icon-only":void 0!==t.icon&&void 0===t.text,[`toast-button-${t.role}`]:void 0!==t.role,"ion-focusable":!0,"ion-activatable":!0}),A=t=>m(t.role)?"button cancel":"button";I.style={ionic:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);contain:strict;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--box-shadow:var(--token-elevation-4, 0px 3px 12px 0px rgba(0, 0, 0, 0.12), 0px 15px 48px 0px rgba(0, 0, 0, 0.18));--max-width:343px;--start:var(--token-space-200, var(--token-scale-200, 8px));--end:var(--token-space-200, var(--token-scale-200, 8px));font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-600, var(--token-scale-600, 24px));text-decoration:none;text-transform:none;z-index:1001}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}:host(.md) .toast-wrapper{opacity:0.01}:host(.ios) .toast-wrapper.toast-middle{opacity:0.01}.toast-container{-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-300, var(--token-scale-300, 12px));padding-bottom:var(--token-space-300, var(--token-scale-300, 12px))}:host(.toast-shape-soft){--border-radius:var(--token-border-radius-200, var(--token-scale-200, 8px))}:host(.toast-shape-round){--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.toast-shape-rectangular){--border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}.toast-header{font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-700, var(--token-scale-700, 28px));text-decoration:none;text-transform:none}.toast-layout-baseline .toast-button-group-start{-webkit-margin-end:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-end:var(--token-space-400, var(--token-scale-400, 16px))}.toast-layout-stacked .toast-button-group-start{margin-bottom:var(--token-space-400, var(--token-scale-400, 16px))}.toast-layout-baseline .toast-button-group-end{-webkit-margin-start:var(--token-space-400, var(--token-scale-400, 16px));margin-inline-start:var(--token-space-400, var(--token-scale-400, 16px))}.toast-layout-stacked .toast-button-group-end{margin-top:var(--token-space-400, var(--token-scale-400, 16px))}.toast-button-group{gap:var(--token-space-400, var(--token-scale-400, 16px))}.toast-button{font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-600, var(--token-scale-600, 24px));text-decoration:none;text-transform:none;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:relative;background-color:transparent;text-decoration:underline;overflow:hidden}.toast-icon{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:var(--token-space-200, var(--token-scale-200, 8px));margin-inline-end:var(--token-space-200, var(--token-scale-200, 8px))}.toast-icon,.toast-button-icon{font-size:var(--token-scale-600, 24px)}:host(.toast-hue-bold){--background:var(--token-bg-neutral-boldest-default, var(--token-primitives-neutral-1200, #242424));--background-activated:var(--token-bg-neutral-boldest-press, var(--token-primitives-base-black, #111111));--color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff));--button-color:var(--token-text-inverse, var(--token-primitives-base-white, #ffffff))}:host(.toast-hue-bold.ion-color) .toast-wrapper{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.toast-hue-bold.ion-color) .toast-button{color:var(--ion-color-contrast)}:host(.toast-hue-subtle){--background:var(--token-bg-neutral-subtlest-default, var(--token-primitives-base-white, #ffffff));--background-activated:var(--token-bg-neutral-subtlest-press, var(--token-primitives-neutral-200, #eae9e9));--color:var(--token-text-default, var(--token-primitives-neutral-1200, #242424));--button-color:var(--token-text-link-default, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3)))}:host(.toast-hue-subtle) .toast-button-cancel{color:var(--token-icon-subtlest, var(--token-primitives-neutral-800, #626262))}:host(.toast-hue-subtle.ion-color) .toast-wrapper{background:var(--ion-color-subtle-base);color:var(--ion-color-subtle-contrast)}",ios:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);contain:strict;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{font-family:var(--ion-font-family, inherit);z-index:1001}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-icon,.toast-button-icon{font-size:1.4em}:host{--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-radius:14px;--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));--max-width:700px;--max-height:478px;--start:10px;--end:10px;font-size:clamp(14px, 0.875rem, 43.4px)}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}:host(.ion-color.toast-translucent) .toast-wrapper{background:rgba(var(--ion-color-base-rgb), 0.8)}}.toast-wrapper.toast-middle{opacity:0.01}.toast-content{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:15px;padding-bottom:15px}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;min-height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:clamp(17px, 1.0625rem, 21.998px);font-weight:500;overflow:hidden}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}",md:":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:normal;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);contain:strict;pointer-events:none}:host{inset-inline-start:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);pointer-events:auto}.toast-wrapper{inset-inline-start:var(--start);inset-inline-end:var(--end)}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{-ms-flex-wrap:wrap;flex-wrap:wrap}.toast-layout-baseline .toast-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-content{-ms-flex:1;flex:1;min-width:0}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-layout-stacked .toast-button-group{-ms-flex-pack:end;justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{font-family:var(--ion-font-family, inherit);z-index:1001}.toast-icon{-webkit-margin-start:16px;margin-inline-start:16px}.toast-icon,.toast-button-icon{font-size:1.4em}:host{--background:var(--ion-color-step-800, var(--ion-background-color-step-800, #333333));--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #0054e9);--color:var(--ion-color-step-50, var(--ion-text-color-step-950, #f2f2f2));--max-width:700px;--start:8px;--end:8px;font-size:0.875rem}.toast-wrapper{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}.toast-content{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:14px;padding-bottom:14px}.toast-header{margin-bottom:2px;font-weight:500;line-height:1.25rem}.toast-message{line-height:1.25rem}.toast-layout-baseline .toast-button-group-start{-webkit-margin-start:8px;margin-inline-start:8px}.toast-layout-stacked .toast-button-group-start{-webkit-margin-end:8px;margin-inline-end:8px;margin-top:8px}.toast-layout-baseline .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px}.toast-layout-stacked .toast-button-group-end{-webkit-margin-end:8px;margin-inline-end:8px;margin-bottom:8px}.toast-button{-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:0.875rem;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}.toast-button-cancel{color:var(--ion-color-step-100, var(--ion-text-color-step-900, #e6e6e6))}.toast-button-icon-only{border-radius:50%;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}"};export{I as ion_toast}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as s,h as t,d as o,g as i}from"./p-Omi_TcwW.js";import{i as l}from"./p-C53feagD.js";const n=class{constructor(t){e(this,t),this.ionSegmentViewScroll=s(this,"ionSegmentViewScroll",7),this.scrollEndTimeout=null,this.isTouching=!1,this.disabled=!1,this.swipeGesture=!0}handleScroll(e){var s;const{scrollLeft:t,scrollWidth:o,clientWidth:i}=e.target,n=o-i,a=(l(this.el)?-1:1)*(t/n);this.ionSegmentViewScroll.emit({scrollRatio:a,isManualScroll:null===(s=this.isManualScroll)||void 0===s||s}),this.resetScrollEndTimeout()}handleScrollStart(){this.scrollEndTimeout&&(clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=null),this.isTouching=!0}handleTouchEnd(){this.isTouching=!1}resetScrollEndTimeout(){this.scrollEndTimeout&&(clearTimeout(this.scrollEndTimeout),this.scrollEndTimeout=null),this.scrollEndTimeout=setTimeout((()=>{this.checkForScrollEnd()}),100)}checkForScrollEnd(){this.isTouching||(this.isManualScroll=void 0)}async setContent(e,s=!0){const t=this.getSegmentContents().findIndex((s=>s.id===e));if(-1===t)return;this.isManualScroll=!1,this.resetScrollEndTimeout();const o=t*this.el.offsetWidth;this.el.scrollTo({top:0,left:(l(this.el)?-1:1)*o,behavior:s?"smooth":"instant"})}getSegmentContents(){return Array.from(this.el.querySelectorAll("ion-segment-content"))}render(){const{disabled:e,isManualScroll:s,swipeGesture:i}=this;return t(o,{key:"f6190a42acd23c2039732b209943a5f747a51377",class:{"segment-view-disabled":e,"segment-view-scroll-disabled":!1===s,"segment-view-swipe-disabled":!1===i}},t("slot",{key:"4665ec76305f47c010eb114d2280b6a695cbb4ee"}))}get el(){return i(this)}};n.style={ionic:":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled),:host(.segment-view-swipe-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}",ios:":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled),:host(.segment-view-swipe-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}",md:":host{display:-ms-flexbox;display:flex;height:100%;overflow-x:scroll;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none}:host::-webkit-scrollbar{display:none}:host(.segment-view-disabled),:host(.segment-view-swipe-disabled){-ms-touch-action:none;touch-action:none;overflow-x:hidden}:host(.segment-view-scroll-disabled){pointer-events:none}:host(.segment-view-disabled){opacity:0.3}"};export{n as ion_segment_view}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as o,h as e,i,d as t,g as n}from"./p-Omi_TcwW.js";import{c as a,b as s}from"./p-CBV-BGvD.js";import{x as c}from"./p-BDqjX7Z_.js";import{s as l}from"./p-C4uUM9DM.js";import{r}from"./p-CFjI63GE.js";import{h as d,g as m}from"./p-DaJxRxSQ.js";import{b as p,z as h}from"./p-D2tu5BUg.js";import"./p-CHE1xWbg.js";import"./p-vXpMhGrs.js";import"./p-FvDKM4Ax.js";import"./p-BTEOs1at.js";import"./p-CWJdc8f_.js";const b=class{constructor(e){o(this,e),this.pendingEnterTarget=null,this.cancelText="Close",this.cancelIcon=!1,this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:i}=this;if(e)return i.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),i=this.getValues(o);(null==e?void 0:e.handler)&&l(e.handler,i)}setChecked(o){const{multiple:e}=this,i=this.findOptionFromEvent(o);e&&i&&(i.checked=o.detail.checked)}get cancelButtonIcon(){const o=a(this);return{ios:h,md:p,ionic:c}[o]}getModalContextClasses(){const o=this.el;return{"in-modal-default":d("ion-modal.modal-default",o),"in-modal-sheet":d("ion-modal.modal-sheet",o)}}renderRadioOptions(){const o=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return e("ion-radio-group",{value:o,onIonChange:o=>this.callOptionHandler(o)},this.options.map(((i,t)=>{const n={id:`modal-option-${t}`,label:i.text,startContent:i.startContent,endContent:i.endContent,description:i.description};return e("ion-item",{lines:"none",class:Object.assign({"item-radio-checked":i.value===o},m(i.cssClass))},e("ion-radio",{value:i.value,disabled:i.disabled,justify:"start",labelPlacement:"end",onClick:()=>this.closeModal(),onKeyDown:o=>{"Enter"!==o.key||o.repeat||(this.pendingEnterTarget=o.currentTarget)},onKeyUp:o=>{if(" "===o.key)this.closeModal();else if("Enter"===o.key){const e=this.pendingEnterTarget===o.currentTarget;this.pendingEnterTarget=null,e&&this.closeModal()}}},r(n,"select-option-label")))})))}renderCheckboxOptions(){return this.options.map(((o,t)=>{const n={id:`modal-option-${t}`,label:o.text,startContent:o.startContent,endContent:o.endContent,description:o.description};return e("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},m(o.cssClass))},e("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),i(this)}},r(n,"select-option-label")))}))}render(){return e(t,{key:"43db0bab8915e4e422acbd73d27a880935c13a38",class:Object.assign({[s(this)]:!0},this.getModalContextClasses())},e("ion-header",{key:"58f462db240eb759d7be9f090ab9fba48abdea0c"},e("ion-toolbar",{key:"dbd4722ad8c2fc21a066b89451fdc5c0a3776808"},void 0!==this.header&&e("ion-title",{key:"cefe16f3dff1a90d10875506a94fe1d737c67b44"},this.header),e("ion-buttons",{key:"750ba8ac17447906cbe020d654b943a88adf8185",slot:"end"},e("ion-button",{key:"8c075ec9d7becf25dd1307bf083bec229a0889ae","aria-label":this.cancelIcon?this.cancelText:void 0,onClick:()=>this.closeModal()},this.cancelIcon?e("ion-icon",{"aria-hidden":"true",slot:"icon-only",icon:this.cancelButtonIcon}):this.cancelText)))),e("ion-content",{key:"65dff8eab0158cdff103ade997246cea2b3c4b9e"},e("ion-list",{key:"e3556e81c97146ffda80260265294a4f8d6ebdf2"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return n(this)}};b.style={ionic:'.sc-ion-select-modal-ionic-h{height:100%}.select-option-label.sc-ion-select-modal-ionic{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.select-option-description.sc-ion-select-modal-ionic{display:block}.in-modal-default.sc-ion-select-modal-ionic-h ion-content.sc-ion-select-modal-ionic::part(scroll),.in-modal-default.sc-ion-select-modal-ionic-h ion-content.sc-ion-select-modal-ionic [part~="scroll"]{--padding-bottom:var(--token-space-400, var(--token-scale-400, 16px))}ion-item.sc-ion-select-modal-ionic{--border-width:0}ion-item.ion-focused.sc-ion-select-modal-ionic::part(native)::after,ion-item.ion-focused.sc-ion-select-modal-ionic [part~="native"]::after{border:none}ion-toolbar.sc-ion-select-modal-ionic{font-size:var(--token-font-size-450, 1.125rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-700, var(--token-scale-700, 28px));text-decoration:none;text-transform:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"],ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-checkbox.sc-ion-select-modal-ionic [part~="label"]{font-size:var(--token-font-size-400, 1rem);font-weight:var(--token-font-weight-medium, 500);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-600, var(--token-scale-600, 24px));text-decoration:none;text-transform:none}.item-radio-checked.sc-ion-select-modal-ionic,.item-checkbox-checked.sc-ion-select-modal-ionic{--background:var(--token-semantics-primary-100, var(--token-primitives-blue-100, #e9ecfc));--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}ion-content.sc-ion-select-modal-ionic{--padding-start:var(--token-space-400, var(--token-scale-400, 16px)) !important;--padding-end:var(--token-space-400, var(--token-scale-400, 16px)) !important;--padding-bottom:var(--token-space-1200, var(--token-scale-1200, 48px)) !important}ion-content.sc-ion-select-modal-ionic:has(.radio-checked) .ion-focused.sc-ion-select-modal-ionic:not(.item-radio-checked){--background-focused-opacity:1}.select-option-label.sc-ion-select-modal-ionic{gap:var(--token-space-300, var(--token-scale-300, 12px))}.select-option-description.sc-ion-select-modal-ionic{font-size:var(--token-font-size-350, 0.875rem);font-weight:var(--token-font-weight-regular, 400);letter-spacing:var(--token-font-letter-spacing-0, 0%);line-height:var(--token-font-line-height-600, var(--token-scale-600, 24px));text-decoration:none;text-transform:none;color:var(--token-text-subtle, var(--token-primitives-neutral-1000, #3b3b3b));font-size:var(--token-font-size-350, 0.875rem)}',ios:'.sc-ion-select-modal-ios-h{height:100%}.select-option-label.sc-ion-select-modal-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.select-option-description.sc-ion-select-modal-ios{display:block}.select-option-label.sc-ion-select-modal-ios{gap:12px}.select-option-description.sc-ion-select-modal-ios{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.sc-ion-select-modal-md-h{height:100%}.select-option-label.sc-ion-select-modal-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.select-option-description.sc-ion-select-modal-md{display:block}.select-option-label.sc-ion-select-modal-md{gap:12px}.select-option-description.sc-ion-select-modal-md{padding-left:0;padding-right:0;padding-top:5px;padding-bottom:0;color:var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));font-size:0.75rem}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'};export{b as ion_select_modal}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,f as s,h as o,d as i,g as e}from"./p-Omi_TcwW.js";import{c as r}from"./p-CBV-BGvD.js";const a={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},n={xs:2,sm:3,md:4,lg:6,xl:8,xxl:10},l=["xs","sm","md","lg","xl","xxl"],h=class{constructor(s){t(this,s),this.hasWarnedInvalidColumns=!1,this.layout="uniform",this.order="sequential",this.columns=n,this.onSlotChange=()=>{this.scheduleMasonryResize()},this.resizeMasonryGrid=()=>{if(this.masonryRaf=void 0,"masonry"!==this.layout)return void this.clearMasonryStyles();const t=getComputedStyle(this.el),s=parseFloat(t.getPropertyValue("grid-auto-rows"))||0,o=parseFloat(t.getPropertyValue("row-gap"))||parseFloat(t.getPropertyValue("gap"))||0,i=t.getPropertyValue("--internal-gallery-columns"),e=parseInt(i,10)||2,r=this.getItems();this.layoutMasonry(r,s,o,e)}}layoutChanged(){this.updateResponsiveColumns(!0),this.scheduleMasonryResize()}componentDidLoad(){this.updateResponsiveColumns(!0),this.resizeObserver=new ResizeObserver((()=>{this.updateResponsiveColumns(),this.scheduleMasonryResize()})),this.resizeObserver.observe(this.el),this.scheduleMasonryResize()}disconnectedCallback(){var t;void 0!==this.masonryRaf&&(cancelAnimationFrame(this.masonryRaf),this.masonryRaf=void 0),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0}onChildLoad(t){if("masonry"!==this.layout)return;const s=t.target;null!==s&&this.el.contains(s)&&this.scheduleMasonryResize()}scheduleMasonryResize(){"masonry"===this.layout?(void 0!==this.masonryRaf&&cancelAnimationFrame(this.masonryRaf),this.masonryRaf=requestAnimationFrame(this.resizeMasonryGrid)):this.clearMasonryStyles()}sanitizeColumns(t){if(void 0===t)return;const s="number"==typeof t?t:Number(t);return!Number.isFinite(s)||!Number.isInteger(s)||s<=0?void 0:s}isBreakpointColumns(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}hasInvalidBreakpointColumns(t){for(const s of l){const o=t[s];if(void 0!==o&&void 0===this.sanitizeColumns(o))return!0}return!1}getColumnsFromBreakpointColumns(t,s){let o;for(const i of l){const e=s[i],r=this.sanitizeColumns(e),l=this.sanitizeColumns(n[i]),h=void 0===e||void 0===r?l:r;void 0!==h&&t>=a[i]&&(o=h)}return o}warnInvalidColumns(t){s(`[ion-gallery] - Invalid "columns" value (${JSON.stringify(t)}). Expected a positive integer or breakpoint map object (e.g. { xs: 2, md: 4 }). Falling back to default responsive columns.`,this.el),this.hasWarnedInvalidColumns=!0}getColumnsForWidth(t){const{columns:s,hasWarnedInvalidColumns:o}=this,i=this.isBreakpointColumns(s),e=i&&this.hasInvalidBreakpointColumns(s),r=i?this.getColumnsFromBreakpointColumns(t,s):this.sanitizeColumns(s);return o||!e&&(i||void 0!==r)||this.warnInvalidColumns(s),void 0!==r?r:this.getColumnsFromBreakpointColumns(t,n)}updateResponsiveColumns(t=!1){const s=this.el.getBoundingClientRect().width;if(!s||!t&&void 0!==this.lastWidth&&Math.abs(this.lastWidth-s)<1)return;this.lastWidth=s;const o=this.getColumnsForWidth(s);this.el.style.setProperty("--internal-gallery-columns",`${o}`)}getItems(){return Array.from(this.el.children).filter((t=>t instanceof HTMLElement))}clearItemStyles(t){t.style.gridRowStart="",t.style.gridRowEnd="",t.style.gridColumn="",t.style.marginBottom=""}clearMasonryStyles(){this.getItems().forEach((t=>this.clearItemStyles(t)))}calculateRowSpan(t,s,o){if(t instanceof HTMLImageElement&&(!t.complete||0===t.naturalHeight))return;const i=t.getBoundingClientRect().height,e=getComputedStyle(t),r=parseFloat(e.getPropertyValue("margin-bottom"))||0,a=s+o;return a&&Number.isFinite(a)&&Math.ceil((i+r+o)/a)||1}getColumnIndex(t,s,o){const{order:i}=this;if("best-fit"===i){let t=0;for(let i=1;i<o;i++)s[i]<s[t]&&(t=i);return t}return t%o}layoutMasonry(t,s,o,i){const e=new Array(i).fill(0),r=new Array(i).fill(void 0);t.forEach(((t,a)=>{t.style.marginBottom="";const n=this.calculateRowSpan(t,s,o);if(void 0===n)return void this.clearItemStyles(t);const l=this.getColumnIndex(a,e,i),h=e[l]+1;t.style.gridColumn=`${l+1}`,t.style.gridRowStart=`${h}`,t.style.gridRowEnd=`span ${n}`,e[l]=h+n-1,r[l]=t})),r.forEach((t=>{if(void 0===t)return;t.style.marginBottom="0px";const i=this.calculateRowSpan(t,s,o);void 0!==i?t.style.gridRowEnd=`span ${i}`:this.clearItemStyles(t)}))}render(){const{layout:t,order:s}=this,e=r(this);return o(i,{key:"77cd21eada2c24092cc551d4e647582c820f05d9",class:{[e]:!0,[`gallery-layout-${t}`]:!0,[`gallery-order-${s}`]:"masonry"===t}},o("slot",{key:"fa311652848a526a7629476afb963bf3e68455c4",onSlotchange:this.onSlotChange}))}get el(){return e(this)}static get watchers(){return{layout:[{layoutChanged:0}],order:[{layoutChanged:0}],columns:[{layoutChanged:0}]}}};h.style=":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}";export{h as ion_gallery}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface GalleryBreakpointColumns {
|
|
2
|
-
xs?: string | number;
|
|
3
|
-
sm?: string | number;
|
|
4
|
-
md?: string | number;
|
|
5
|
-
lg?: string | number;
|
|
6
|
-
xl?: string | number;
|
|
7
|
-
xxl?: string | number;
|
|
8
|
-
}
|
|
9
|
-
export type GalleryColumns = GalleryBreakpointColumns | string | number;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
-
import type { GalleryColumns } from './gallery-interface';
|
|
3
|
-
/**
|
|
4
|
-
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
5
|
-
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
|
6
|
-
*
|
|
7
|
-
* @slot - Content is placed in a responsive gallery layout.
|
|
8
|
-
*/
|
|
9
|
-
export declare class Gallery implements ComponentInterface {
|
|
10
|
-
el: HTMLIonGalleryElement;
|
|
11
|
-
private masonryRaf?;
|
|
12
|
-
private resizeObserver?;
|
|
13
|
-
private lastWidth?;
|
|
14
|
-
private hasWarnedInvalidColumns;
|
|
15
|
-
/**
|
|
16
|
-
* The visual layout of the gallery. When `uniform`, rows take up the height
|
|
17
|
-
* of the tallest item and are spaced evenly across the gallery. Additionally,
|
|
18
|
-
* items will have an aspect ratio of 1/1, forcing them to be square unless a
|
|
19
|
-
* height is explicitly set. When `masonry`, items will be positioned under each
|
|
20
|
-
* other with only the specified gap between them.
|
|
21
|
-
*/
|
|
22
|
-
layout: 'uniform' | 'masonry';
|
|
23
|
-
/**
|
|
24
|
-
* The order in which items are positioned. Only applies when layout is
|
|
25
|
-
* `masonry`. When `sequential`, items are positioned in the order they are
|
|
26
|
-
* placed in the DOM. When `best-fit`, items are positioned under the column
|
|
27
|
-
* with the most available space.
|
|
28
|
-
*/
|
|
29
|
-
order: 'sequential' | 'best-fit';
|
|
30
|
-
/**
|
|
31
|
-
* The number of columns to display. Can be set as a number or an object of
|
|
32
|
-
* breakpoint values (e.g. `{ xs: 2, sm: 3, md: 4 }`).
|
|
33
|
-
*/
|
|
34
|
-
columns: GalleryColumns;
|
|
35
|
-
protected layoutChanged(): void;
|
|
36
|
-
componentDidLoad(): void;
|
|
37
|
-
disconnectedCallback(): void;
|
|
38
|
-
/**
|
|
39
|
-
* Listen for the load event on child elements.
|
|
40
|
-
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
41
|
-
* of the masonry grid when the child elements load. This is useful for when
|
|
42
|
-
* images take time to load.
|
|
43
|
-
*/
|
|
44
|
-
protected onChildLoad(ev: Event): void;
|
|
45
|
-
/**
|
|
46
|
-
* Listen for the slotchange event on the slot.
|
|
47
|
-
* When the layout is `masonry`, this listener is used to schedule a resize
|
|
48
|
-
* of the masonry grid when the slot changes. This is useful for when items
|
|
49
|
-
* are added or removed from the gallery.
|
|
50
|
-
*/
|
|
51
|
-
private onSlotChange;
|
|
52
|
-
/**
|
|
53
|
-
* Batch masonry measurements to a single animation frame.
|
|
54
|
-
* This avoids repeated sync layouts during rapid resize/load/slot changes.
|
|
55
|
-
*/
|
|
56
|
-
private scheduleMasonryResize;
|
|
57
|
-
/**
|
|
58
|
-
* Normalize a columns value to a positive integer.
|
|
59
|
-
* Returns undefined when the input cannot be interpreted as a finite number.
|
|
60
|
-
*/
|
|
61
|
-
private sanitizeColumns;
|
|
62
|
-
/**
|
|
63
|
-
* Check if the value is a breakpoint columns object.
|
|
64
|
-
*/
|
|
65
|
-
private isBreakpointColumns;
|
|
66
|
-
/**
|
|
67
|
-
* Check if the breakpoint columns object has any invalid values.
|
|
68
|
-
* Returns true if any value is undefined or not a positive integer.
|
|
69
|
-
*/
|
|
70
|
-
private hasInvalidBreakpointColumns;
|
|
71
|
-
/**
|
|
72
|
-
* Get the columns from a responsive breakpoint map.
|
|
73
|
-
* Returns the columns for the last matching breakpoint.
|
|
74
|
-
*/
|
|
75
|
-
private getColumnsFromBreakpointColumns;
|
|
76
|
-
/**
|
|
77
|
-
* Warn about an invalid columns value when it is set to a non-positive
|
|
78
|
-
* integer or a breakpoint map object with invalid values.
|
|
79
|
-
*/
|
|
80
|
-
private warnInvalidColumns;
|
|
81
|
-
/**
|
|
82
|
-
* Resolve the active columns value for the current width. Falls back to
|
|
83
|
-
* the default responsive columns when the provided prop is invalid.
|
|
84
|
-
*/
|
|
85
|
-
private getColumnsForWidth;
|
|
86
|
-
/**
|
|
87
|
-
* Update the responsive columns for the gallery.
|
|
88
|
-
* This is used to update the columns when the component width changes.
|
|
89
|
-
*/
|
|
90
|
-
private updateResponsiveColumns;
|
|
91
|
-
/**
|
|
92
|
-
* Return all directly slotted HTMLElement children of the gallery.
|
|
93
|
-
*/
|
|
94
|
-
private getItems;
|
|
95
|
-
/**
|
|
96
|
-
* Clear the item styles for the given item element.
|
|
97
|
-
* This is used to switch between uniform and masonry layouts.
|
|
98
|
-
*/
|
|
99
|
-
private clearItemStyles;
|
|
100
|
-
/**
|
|
101
|
-
* Clear placement styles for all items when leaving masonry mode.
|
|
102
|
-
*/
|
|
103
|
-
private clearMasonryStyles;
|
|
104
|
-
/**
|
|
105
|
-
* Convert a rendered item height to the number of grid rows it should span.
|
|
106
|
-
* Returns undefined for images that are not fully loaded yet.
|
|
107
|
-
*/
|
|
108
|
-
private calculateRowSpan;
|
|
109
|
-
/**
|
|
110
|
-
* Get the index of the column to position the item in.
|
|
111
|
-
* When the order is `best-fit`, the column with the shortest height is
|
|
112
|
-
* returned. Otherwise, items are placed in the column that matches their
|
|
113
|
-
* natural DOM order.
|
|
114
|
-
*/
|
|
115
|
-
private getColumnIndex;
|
|
116
|
-
/**
|
|
117
|
-
* Apply masonry placement by assigning each item a column and row span.
|
|
118
|
-
*/
|
|
119
|
-
private layoutMasonry;
|
|
120
|
-
/**
|
|
121
|
-
* Measure the host and children, then compute masonry placement.
|
|
122
|
-
*/
|
|
123
|
-
private resizeMasonryGrid;
|
|
124
|
-
render(): any;
|
|
125
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const sharedStyles = "\n ion-gallery {\n width: 343px;\n }\n\n div {\n color: #fff;\n height: 150px;\n }\n\n div:nth-child(1) {\n background: #ff6b6b;\n }\n\n div:nth-child(2) {\n background: #4ecdc4;\n }\n\n div:nth-child(3) {\n background: #ffe66d;\n color: #333;\n }\n\n div:nth-child(4) {\n background: #5f27cd;\n }\n\n div:nth-child(5) {\n background: #7f8c8d;\n }\n\n div:nth-child(6) {\n background: #ff9f43;\n }\n\n div:nth-child(7) {\n background: #ff3f34;\n }\n\n div:nth-child(8) {\n background: #2ecc71;\n }\n\n div:nth-child(9) {\n background: #34495e;\n }\n\n div:nth-child(10) {\n background: #1abc9c;\n }\n\n div:nth-child(11) {\n background: #e67e22;\n }\n\n div:nth-child(12) {\n background: #9b59b6;\n }\n";
|
|
2
|
-
export declare const numberToWords: (value: number) => string;
|