@ionic/core 8.8.7-dev.11779385275.161a641b → 8.8.7-dev.11779467048.1641d05e
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/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-gallery.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/{p-B2rpt1JV.js → p-C38HUpU5.js} +1 -1
- package/components/{p-Dmuy6xyk.js → p-C4G6C9fP.js} +1 -1
- package/components/{p-B6zr9RZN.js → p-CVRxImH6.js} +1 -1
- package/components/{p-B71c6yUH.js → p-CoFDGTFO.js} +1 -1
- package/components/{p-DAv9P_LE.js → p-CykCvfXQ.js} +1 -1
- package/components/p-DHTe6lDL.js +4 -0
- package/components/{p-Di5rHO3q.js → p-qZr7hBPz.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-gallery.cjs.entry.js +7 -28
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-Hci_7vw_.js → overlays-C54DhaTC.js} +187 -10
- package/dist/collection/components/gallery/gallery.js +7 -28
- package/dist/collection/utils/overlays.js +187 -10
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-gallery.entry.js +7 -28
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-rwDDzEs4.js → overlays-ttYCMKRp.js} +187 -10
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-06bd033b.entry.js +4 -0
- package/dist/ionic/{p-c10fa162.entry.js → p-1f74b8d4.entry.js} +1 -1
- package/dist/ionic/{p-a9fb086b.entry.js → p-2f8aa0ac.entry.js} +1 -1
- package/dist/ionic/{p-2f0073af.entry.js → p-3331cfa9.entry.js} +1 -1
- package/dist/ionic/{p-35b144f5.entry.js → p-33c34361.entry.js} +1 -1
- package/dist/ionic/{p-15e3e8f5.entry.js → p-5061a8d4.entry.js} +1 -1
- package/dist/ionic/{p-4a0260e6.entry.js → p-8f04bd89.entry.js} +1 -1
- package/dist/ionic/{p-bf972309.entry.js → p-967576f8.entry.js} +1 -1
- package/dist/ionic/p-DdyNaGpi.js +4 -0
- package/dist/ionic/{p-71b6014c.entry.js → p-bb898d47.entry.js} +1 -1
- package/dist/ionic/p-dea52cb3.entry.js +4 -0
- package/dist/ionic/{p-432c5888.entry.js → p-fc796d48.entry.js} +1 -1
- package/dist/types/components/gallery/gallery.d.ts +2 -5
- package/hydrate/index.js +194 -38
- package/hydrate/index.mjs +194 -38
- package/package.json +1 -1
- package/components/p-CtiqM786.js +0 -4
- package/dist/ionic/p-0f3b4262.entry.js +0 -4
- package/dist/ionic/p-4079cee3.entry.js +0 -4
- package/dist/ionic/p-C4uUM9DM.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -8083,8 +8083,101 @@ const CoreDelegate = () => {
|
|
|
8083
8083
|
let lastOverlayIndex = 0;
|
|
8084
8084
|
let lastId = 0;
|
|
8085
8085
|
const activeAnimations = new WeakMap();
|
|
8086
|
+
const OVERLAY_FOCUS_TRAP_SELECTOR = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover';
|
|
8087
|
+
const ION_SELECT_MODAL_SELECTOR = 'ion-select-modal';
|
|
8088
|
+
const isSelectModalOptionControl = (el) => el.tagName === 'ION-RADIO' || el.tagName === 'ION-CHECKBOX';
|
|
8086
8089
|
/**
|
|
8087
|
-
*
|
|
8090
|
+
* Returns the currently focused element for keyboard focus checks.
|
|
8091
|
+
*
|
|
8092
|
+
* Starts from `document.activeElement` (non-shadow / light DOM focus).
|
|
8093
|
+
* If focus is inside one or more open shadow roots
|
|
8094
|
+
* (e.g. native control inside `ion-radio`), walks through nested
|
|
8095
|
+
* `shadowRoot.activeElement` values until the innermost focused node is reached.
|
|
8096
|
+
*/
|
|
8097
|
+
const getActiveElement = (ownerDoc) => {
|
|
8098
|
+
var _a;
|
|
8099
|
+
let active = ownerDoc.activeElement;
|
|
8100
|
+
if (!active) {
|
|
8101
|
+
return null;
|
|
8102
|
+
}
|
|
8103
|
+
while ((_a = active.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) {
|
|
8104
|
+
active = active.shadowRoot.activeElement;
|
|
8105
|
+
}
|
|
8106
|
+
return active;
|
|
8107
|
+
};
|
|
8108
|
+
/**
|
|
8109
|
+
* Walks from a focused node (possibly deep inside shadow roots)
|
|
8110
|
+
* up to the nearest `ion-radio` / `ion-checkbox` host.
|
|
8111
|
+
*/
|
|
8112
|
+
const getOptionControlHost = (active) => {
|
|
8113
|
+
let n = active;
|
|
8114
|
+
while (n) {
|
|
8115
|
+
if (isSelectModalOptionControl(n)) {
|
|
8116
|
+
return n;
|
|
8117
|
+
}
|
|
8118
|
+
const root = n.getRootNode();
|
|
8119
|
+
if (root instanceof ShadowRoot && root.host instanceof HTMLElement) {
|
|
8120
|
+
n = root.host;
|
|
8121
|
+
}
|
|
8122
|
+
else {
|
|
8123
|
+
return null;
|
|
8124
|
+
}
|
|
8125
|
+
}
|
|
8126
|
+
return null;
|
|
8127
|
+
};
|
|
8128
|
+
/**
|
|
8129
|
+
* Sheet modals can have visual order that differs from DOM order.
|
|
8130
|
+
* Without sorting, Tab can skip the handle after option traversal.
|
|
8131
|
+
*
|
|
8132
|
+
* Order: option controls (radio/checkbox) → sheet handle → end-slot
|
|
8133
|
+
* header button. Any other focusables are appended after.
|
|
8134
|
+
*/
|
|
8135
|
+
const sortSheetModalFocusables = (overlay, elements) => {
|
|
8136
|
+
const optionControls = elements.filter((el) => {
|
|
8137
|
+
return overlay.contains(el) && isSelectModalOptionControl(el) && el.tabIndex >= 0;
|
|
8138
|
+
});
|
|
8139
|
+
const cancelControl = elements.find((el) => overlay.contains(el) &&
|
|
8140
|
+
el.tagName === 'ION-BUTTON' &&
|
|
8141
|
+
el.closest('ion-header ion-buttons[slot="end"]') !== null);
|
|
8142
|
+
const handleControl = elements.find((el) => el.classList.contains('modal-handle'));
|
|
8143
|
+
const sortByGeometry = (els) => [...els].sort((a, b) => {
|
|
8144
|
+
const ra = a.getBoundingClientRect();
|
|
8145
|
+
const rb = b.getBoundingClientRect();
|
|
8146
|
+
const topDiff = ra.top - rb.top;
|
|
8147
|
+
if (Math.abs(topDiff) > 1) {
|
|
8148
|
+
return topDiff;
|
|
8149
|
+
}
|
|
8150
|
+
return ra.left - rb.left;
|
|
8151
|
+
});
|
|
8152
|
+
const ordered = [];
|
|
8153
|
+
ordered.push(...sortByGeometry(optionControls));
|
|
8154
|
+
if (handleControl) {
|
|
8155
|
+
ordered.push(handleControl);
|
|
8156
|
+
}
|
|
8157
|
+
if (cancelControl) {
|
|
8158
|
+
ordered.push(cancelControl);
|
|
8159
|
+
}
|
|
8160
|
+
const used = new Set(ordered);
|
|
8161
|
+
for (const el of elements) {
|
|
8162
|
+
if (!used.has(el)) {
|
|
8163
|
+
ordered.push(el);
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
return ordered;
|
|
8167
|
+
};
|
|
8168
|
+
/**
|
|
8169
|
+
* Option controls in groups use a tabindex pattern where only one
|
|
8170
|
+
* option is tabbable (`tabIndex="0"`) while the others are `-1`.
|
|
8171
|
+
* This returns the index of that current tabbable option.
|
|
8172
|
+
*/
|
|
8173
|
+
const getTabbableOptionControlIndex = (elements, overlay) => {
|
|
8174
|
+
return elements.findIndex((el) => {
|
|
8175
|
+
return overlay.contains(el) && isSelectModalOptionControl(el) && el.tabIndex >= 0;
|
|
8176
|
+
});
|
|
8177
|
+
};
|
|
8178
|
+
/**
|
|
8179
|
+
* Determines if the overlay's backdrop is always blocking
|
|
8180
|
+
* (no background interaction).
|
|
8088
8181
|
* Returns false if showBackdrop=false or backdropBreakpoint > 0.
|
|
8089
8182
|
*/
|
|
8090
8183
|
const isBackdropAlwaysBlocking = (el) => {
|
|
@@ -8199,7 +8292,7 @@ const focusElementInOverlay = (hostToFocus, overlay) => {
|
|
|
8199
8292
|
* Should NOT include: Toast
|
|
8200
8293
|
*/
|
|
8201
8294
|
const trapKeyboardFocus = (ev, doc) => {
|
|
8202
|
-
const lastOverlay = getPresentedOverlay(doc,
|
|
8295
|
+
const lastOverlay = getPresentedOverlay(doc, OVERLAY_FOCUS_TRAP_SELECTOR);
|
|
8203
8296
|
const target = ev.target;
|
|
8204
8297
|
/**
|
|
8205
8298
|
* If no active overlay, ignore this event.
|
|
@@ -8382,6 +8475,30 @@ const connectListeners = (doc) => {
|
|
|
8382
8475
|
doc.addEventListener('focus', (ev) => {
|
|
8383
8476
|
trapKeyboardFocus(ev, doc);
|
|
8384
8477
|
}, true);
|
|
8478
|
+
/**
|
|
8479
|
+
* Remember which option control last received focus
|
|
8480
|
+
* (arrows, click, or Tab). This pattern keeps `tabIndex=0` on the
|
|
8481
|
+
* checked/first radio, so the Tab trap uses this when wrapping back
|
|
8482
|
+
* into the list or focusing the option-group slot.
|
|
8483
|
+
*/
|
|
8484
|
+
doc.addEventListener('focusin', (ev) => {
|
|
8485
|
+
const lastOverlay = getPresentedOverlay(doc, OVERLAY_FOCUS_TRAP_SELECTOR);
|
|
8486
|
+
if (!lastOverlay || lastOverlay.classList.contains(FOCUS_TRAP_DISABLE_CLASS)) {
|
|
8487
|
+
return;
|
|
8488
|
+
}
|
|
8489
|
+
const isSheetModal = lastOverlay.classList.contains('modal-sheet');
|
|
8490
|
+
if (!isSheetModal) {
|
|
8491
|
+
return;
|
|
8492
|
+
}
|
|
8493
|
+
const target = ev.target;
|
|
8494
|
+
if (!(target instanceof HTMLElement)) {
|
|
8495
|
+
return;
|
|
8496
|
+
}
|
|
8497
|
+
const optionHost = getOptionControlHost(target);
|
|
8498
|
+
if (optionHost && lastOverlay.contains(optionHost)) {
|
|
8499
|
+
lastOverlay.trapLastSheetOptionControl = optionHost;
|
|
8500
|
+
}
|
|
8501
|
+
}, true);
|
|
8385
8502
|
// Listen for keydown events to intercept Tab navigation.
|
|
8386
8503
|
// This is needed for Safari and Firefox which may skip focusable
|
|
8387
8504
|
// elements or allow focus to escape the overlay.
|
|
@@ -8391,10 +8508,10 @@ const connectListeners = (doc) => {
|
|
|
8391
8508
|
var _a, _b, _c;
|
|
8392
8509
|
if (ev.key !== 'Tab' && ev.key !== 'Alt+Tab')
|
|
8393
8510
|
return;
|
|
8394
|
-
const lastOverlay = getPresentedOverlay(doc,
|
|
8511
|
+
const lastOverlay = getPresentedOverlay(doc, OVERLAY_FOCUS_TRAP_SELECTOR);
|
|
8395
8512
|
if (!lastOverlay || lastOverlay.classList.contains(FOCUS_TRAP_DISABLE_CLASS))
|
|
8396
8513
|
return;
|
|
8397
|
-
const activeElement = doc
|
|
8514
|
+
const activeElement = getActiveElement(doc);
|
|
8398
8515
|
if (activeElement === lastOverlay) {
|
|
8399
8516
|
ev.preventDefault();
|
|
8400
8517
|
focusFirstDescendant(lastOverlay);
|
|
@@ -8410,16 +8527,32 @@ const connectListeners = (doc) => {
|
|
|
8410
8527
|
if (!isInsideOverlay)
|
|
8411
8528
|
return;
|
|
8412
8529
|
// Get all focusable elements from both light and shadow DOM
|
|
8413
|
-
|
|
8530
|
+
let allFocusable = [
|
|
8414
8531
|
...lastOverlay.querySelectorAll(focusableQueryString),
|
|
8415
8532
|
...(((_c = lastOverlay.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll(focusableQueryString)) || []),
|
|
8416
8533
|
];
|
|
8534
|
+
const selectModalEl = lastOverlay.querySelector(ION_SELECT_MODAL_SELECTOR);
|
|
8535
|
+
const isSheetModal = lastOverlay.classList.contains('modal-sheet');
|
|
8536
|
+
/**
|
|
8537
|
+
* Some sheet modal content, including ion-select-modal,
|
|
8538
|
+
* renders option containers as `ion-item.select-interface-option`.
|
|
8539
|
+
* These can match focusable selectors in some builds but
|
|
8540
|
+
* are not intended tab stops. Keep only true interactive
|
|
8541
|
+
* controls so Tab can move from options to header
|
|
8542
|
+
* controls/handle.
|
|
8543
|
+
*/
|
|
8544
|
+
if (selectModalEl) {
|
|
8545
|
+
allFocusable = allFocusable.filter((el) => !el.matches('ion-item.select-interface-option'));
|
|
8546
|
+
}
|
|
8547
|
+
if (isSheetModal) {
|
|
8548
|
+
allFocusable = sortSheetModalFocusables(lastOverlay, allFocusable);
|
|
8549
|
+
}
|
|
8417
8550
|
if (allFocusable.length === 0) {
|
|
8418
8551
|
ev.preventDefault();
|
|
8419
8552
|
return;
|
|
8420
8553
|
}
|
|
8421
8554
|
// Find current element's index (accounting for shadow DOM)
|
|
8422
|
-
|
|
8555
|
+
let currentIndex = activeElement
|
|
8423
8556
|
? allFocusable.findIndex((el) => {
|
|
8424
8557
|
var _a;
|
|
8425
8558
|
if (el === activeElement)
|
|
@@ -8430,6 +8563,31 @@ const connectListeners = (doc) => {
|
|
|
8430
8563
|
return rootNode instanceof ShadowRoot && rootNode.host === el;
|
|
8431
8564
|
})
|
|
8432
8565
|
: -1;
|
|
8566
|
+
/**
|
|
8567
|
+
* Radio/checkbox groups can move focus onto an option with
|
|
8568
|
+
* `tabIndex=-1`, while another option still has `tabIndex=0`
|
|
8569
|
+
* in the list. `findIndex` then yields -1 and Tab incorrectly
|
|
8570
|
+
* wraps to `allFocusable[0]`.
|
|
8571
|
+
* Treat focus on any option control inside the sheet modal
|
|
8572
|
+
* as the same trap slot as the listed tabbable option
|
|
8573
|
+
* (`tabIndex >= 0`) so Tab goes handle → Cancel, not back
|
|
8574
|
+
* to the first radio.
|
|
8575
|
+
*/
|
|
8576
|
+
if (currentIndex < 0 && isSheetModal && activeElement) {
|
|
8577
|
+
const optionHost = getOptionControlHost(activeElement);
|
|
8578
|
+
if (optionHost && lastOverlay.contains(optionHost)) {
|
|
8579
|
+
const directIndex = allFocusable.indexOf(optionHost);
|
|
8580
|
+
if (directIndex >= 0) {
|
|
8581
|
+
currentIndex = directIndex;
|
|
8582
|
+
}
|
|
8583
|
+
else {
|
|
8584
|
+
const tabbableOptionIndex = getTabbableOptionControlIndex(allFocusable, lastOverlay);
|
|
8585
|
+
if (tabbableOptionIndex >= 0) {
|
|
8586
|
+
currentIndex = tabbableOptionIndex;
|
|
8587
|
+
}
|
|
8588
|
+
}
|
|
8589
|
+
}
|
|
8590
|
+
}
|
|
8433
8591
|
ev.preventDefault();
|
|
8434
8592
|
// Helper to focus an element, handling shadow DOM properly
|
|
8435
8593
|
const focusElement = (element) => {
|
|
@@ -8443,24 +8601,43 @@ const connectListeners = (doc) => {
|
|
|
8443
8601
|
}
|
|
8444
8602
|
focusVisibleElement(element);
|
|
8445
8603
|
};
|
|
8604
|
+
let nextIndex;
|
|
8446
8605
|
if (ev.shiftKey) {
|
|
8447
8606
|
// Shift+Tab: previous element, wrap to last if at first
|
|
8448
8607
|
if (currentIndex <= 0) {
|
|
8449
|
-
|
|
8608
|
+
nextIndex = allFocusable.length - 1;
|
|
8450
8609
|
}
|
|
8451
8610
|
else {
|
|
8452
|
-
|
|
8611
|
+
nextIndex = currentIndex - 1;
|
|
8453
8612
|
}
|
|
8454
8613
|
}
|
|
8455
8614
|
else {
|
|
8456
8615
|
// Tab: next element, wrap to first if at last
|
|
8457
8616
|
if (currentIndex < 0 || currentIndex >= allFocusable.length - 1) {
|
|
8458
|
-
|
|
8617
|
+
nextIndex = 0;
|
|
8459
8618
|
}
|
|
8460
8619
|
else {
|
|
8461
|
-
|
|
8620
|
+
nextIndex = currentIndex + 1;
|
|
8621
|
+
}
|
|
8622
|
+
}
|
|
8623
|
+
const nextEl = allFocusable[nextIndex];
|
|
8624
|
+
const overlayTrap = lastOverlay;
|
|
8625
|
+
const tabbableOptionIndex = isSheetModal ? getTabbableOptionControlIndex(allFocusable, lastOverlay) : -1;
|
|
8626
|
+
/**
|
|
8627
|
+
* The trap list only includes one tabbable option host
|
|
8628
|
+
* (`tabIndex >= 0`), usually the checked/first radio.
|
|
8629
|
+
* `focusin` tracks the real last-focused option; use it
|
|
8630
|
+
* whenever Tab would focus that slot (wrap from Cancel,
|
|
8631
|
+
* Shift+Tab from handle, etc.).
|
|
8632
|
+
*/
|
|
8633
|
+
let focusTarget = nextEl;
|
|
8634
|
+
if (isSheetModal && tabbableOptionIndex >= 0 && nextIndex === tabbableOptionIndex) {
|
|
8635
|
+
const saved = overlayTrap.trapLastSheetOptionControl;
|
|
8636
|
+
if ((saved === null || saved === void 0 ? void 0 : saved.isConnected) && lastOverlay.contains(saved) && saved !== nextEl) {
|
|
8637
|
+
focusTarget = saved;
|
|
8462
8638
|
}
|
|
8463
8639
|
}
|
|
8640
|
+
focusElement(focusTarget);
|
|
8464
8641
|
}, true);
|
|
8465
8642
|
// handle back-button click
|
|
8466
8643
|
doc.addEventListener('ionBackButton', (ev) => {
|
|
@@ -18745,7 +18922,6 @@ const BREAKPOINT_ORDER = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
|
18745
18922
|
class Gallery {
|
|
18746
18923
|
constructor(hostRef) {
|
|
18747
18924
|
registerInstance(this, hostRef);
|
|
18748
|
-
this.itemWrapperSelector = '[data-gallery-group]';
|
|
18749
18925
|
// Keep track of whether we've warned about invalid columns, invalid gap,
|
|
18750
18926
|
// and unused order properties to avoid duplicate warnings on screen resize.
|
|
18751
18927
|
this.hasWarnedInvalidColumns = false;
|
|
@@ -18800,9 +18976,8 @@ class Gallery {
|
|
|
18800
18976
|
const styles = getComputedStyle(this.el);
|
|
18801
18977
|
const rowHeight = parseFloat(styles.getPropertyValue('grid-auto-rows')) || 0;
|
|
18802
18978
|
const rowGap = parseFloat(styles.getPropertyValue('row-gap')) || parseFloat(styles.getPropertyValue('gap')) || 0;
|
|
18803
|
-
const itemGap = parseFloat(styles.getPropertyValue('column-gap')) || parseFloat(styles.getPropertyValue('gap')) || 0;
|
|
18804
18979
|
const items = this.getItems();
|
|
18805
|
-
this.layoutMasonry(items, rowHeight, rowGap,
|
|
18980
|
+
this.layoutMasonry(items, rowHeight, rowGap, columns);
|
|
18806
18981
|
};
|
|
18807
18982
|
}
|
|
18808
18983
|
onColumnsOrGapChanged() {
|
|
@@ -19059,28 +19234,12 @@ class Gallery {
|
|
|
19059
19234
|
const gap = this.getGapForWidth(width);
|
|
19060
19235
|
this.el.style.setProperty('--internal-gallery-gap', `${gap}`);
|
|
19061
19236
|
}
|
|
19062
|
-
isGalleryItemElement(element) {
|
|
19063
|
-
var _a;
|
|
19064
|
-
return typeof ((_a = element.style) === null || _a === void 0 ? void 0 : _a.setProperty) === 'function';
|
|
19065
|
-
}
|
|
19066
19237
|
/**
|
|
19067
|
-
* Return all gallery
|
|
19068
|
-
*
|
|
19069
|
-
* with their element children.
|
|
19238
|
+
* Return all directly slotted children of the gallery that can be grid items
|
|
19239
|
+
* with inline placement styles (HTML elements and SVG elements).
|
|
19070
19240
|
*/
|
|
19071
19241
|
getItems() {
|
|
19072
|
-
|
|
19073
|
-
const flattenedItems = [];
|
|
19074
|
-
items.forEach((itemEl) => {
|
|
19075
|
-
if (!itemEl.matches(this.itemWrapperSelector)) {
|
|
19076
|
-
flattenedItems.push(itemEl);
|
|
19077
|
-
return;
|
|
19078
|
-
}
|
|
19079
|
-
itemEl.style.display = 'contents';
|
|
19080
|
-
const wrappedItems = Array.from(itemEl.children).filter((child) => this.isGalleryItemElement(child));
|
|
19081
|
-
flattenedItems.push(...wrappedItems);
|
|
19082
|
-
});
|
|
19083
|
-
return flattenedItems;
|
|
19242
|
+
return Array.from(this.el.children).filter((child) => { var _a; return typeof ((_a = child.style) === null || _a === void 0 ? void 0 : _a.setProperty) === 'function'; });
|
|
19084
19243
|
}
|
|
19085
19244
|
/**
|
|
19086
19245
|
* Clear the item styles for the given item element.
|
|
@@ -19137,14 +19296,11 @@ class Gallery {
|
|
|
19137
19296
|
/**
|
|
19138
19297
|
* Apply masonry placement by assigning each item a column and row span.
|
|
19139
19298
|
*/
|
|
19140
|
-
layoutMasonry(items, rowHeight, rowGap,
|
|
19299
|
+
layoutMasonry(items, rowHeight, rowGap, columns) {
|
|
19141
19300
|
const columnHeights = new Array(columns).fill(0);
|
|
19142
19301
|
const lastItemsByColumn = new Array(columns).fill(undefined);
|
|
19143
19302
|
items.forEach((itemEl, i) => {
|
|
19144
19303
|
itemEl.style.marginBottom = '';
|
|
19145
|
-
if (itemEl.parentElement !== this.el) {
|
|
19146
|
-
itemEl.style.marginBottom = `${itemGap}px`;
|
|
19147
|
-
}
|
|
19148
19304
|
const span = this.calculateRowSpan(itemEl, rowHeight, rowGap);
|
|
19149
19305
|
if (span === undefined) {
|
|
19150
19306
|
this.clearItemStyles(itemEl);
|
|
@@ -19193,11 +19349,11 @@ class Gallery {
|
|
|
19193
19349
|
const { layout } = this;
|
|
19194
19350
|
const order = this.getOrder();
|
|
19195
19351
|
const theme = getIonTheme(this);
|
|
19196
|
-
return (hAsync(Host, { key: '
|
|
19352
|
+
return (hAsync(Host, { key: '1bf2973d22835c0dbddf3214b602f8c08b95e421', class: {
|
|
19197
19353
|
[theme]: true,
|
|
19198
19354
|
[`gallery-layout-${layout}`]: true,
|
|
19199
19355
|
[`gallery-order-${order}`]: layout === 'masonry' && order !== undefined,
|
|
19200
|
-
} }, hAsync("slot", { key: '
|
|
19356
|
+
} }, hAsync("slot", { key: '0dea31f609f6afdb1d73ecb2d873909ffe49203f', onSlotchange: this.onSlotChange })));
|
|
19201
19357
|
}
|
|
19202
19358
|
get el() { return getElement(this); }
|
|
19203
19359
|
static get watchers() { return {
|
package/package.json
CHANGED
package/components/p-CtiqM786.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{b as n,c as o,d as e,O as t,s as i}from"./p-CVBkx7m1.js";import{h as a,c as r,a as d,b as s,g as l}from"./p-BqDiJgC_.js";import{c,j as u,f as v}from"./p-3Ni1Z654.js";import{C as f}from"./p-XegQjlzJ.js";import{B as p}from"./p-BTEOs1at.js";const m='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',h=(n,o)=>{const e=n.querySelector(m);y(e,null!=o?o:n)},b=(n,o)=>{const e=Array.from(n.querySelectorAll(m));y(e.length>0?e[e.length-1]:null,null!=o?o:n)},y=(n,o)=>{let e=n;const t=null==n?void 0:n.shadowRoot;if(t){const o=t.querySelector(m);e=o&&"function"==typeof n.setFocus?n:o||n}if(e){const n=e.closest("ion-radio-group");n?n.setFocus():a(e)}else o.focus()};let w=0,g=0;const O=new WeakMap,k=n=>{var o;return!1!==n.showBackdrop&&!((null!==(o=n.backdropBreakpoint)&&void 0!==o?o:0)>0)},x=n=>({create:o=>P(n,o),dismiss:(o,e,t)=>R(document,o,e,n,t),getTop:async()=>$(document,n)}),T=x("ion-alert"),j=x("ion-action-sheet"),A=x("ion-loading"),S=x("ion-modal"),C=x("ion-picker-legacy"),B=x("ion-popover"),I=x("ion-toast"),N=n=>{"undefined"!=typeof document&&M(document);const o=w++;n.overlayIndex=o},D=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++g),n.id),P=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const e=document.createElement(n);return e.classList.add("overlay-hidden"),Object.assign(e,Object.assign(Object.assign({},o),{hasController:!0})),J(document).appendChild(e),new Promise((n=>r(e,n)))})):Promise.resolve(),E=(n,o)=>{let e=n;const t=null==n?void 0:n.shadowRoot;t&&(e=t.querySelector(m)||n),e?a(e):o.focus()},M=n=>{0===w&&(w=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=$(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=n.target;e&&t&&(e.classList.contains(on)||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else if("ION-TOAST"===t.tagName)E(e.lastFocus,e);else{const n=e.lastFocus;h(e),n===o.activeElement&&b(e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else if("ION-TOAST"===t.tagName)E(e.lastFocus,e);else{const n=l(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;h(i,e),n===o.activeElement&&b(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("keydown",(o=>{var e,t,i;if("Tab"!==o.key&&"Alt+Tab"!==o.key)return;const r=$(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");if(!r||r.classList.contains(on))return;const d=n.activeElement;if(d===r)return o.preventDefault(),void h(r);if(!d||!(r.contains(d)||d.getRootNode()instanceof ShadowRoot&&r.contains(d.getRootNode().host)||null!==(t=null===(e=r.shadowRoot)||void 0===e?void 0:e.contains(d))&&void 0!==t&&t))return;const s=[...r.querySelectorAll(m),...(null===(i=r.shadowRoot)||void 0===i?void 0:i.querySelectorAll(m))||[]];if(0===s.length)return void o.preventDefault();const l=d?s.findIndex((n=>{var o;if(n===d)return!0;if(null===(o=n.shadowRoot)||void 0===o?void 0:o.contains(d))return!0;const e=d.getRootNode();return e instanceof ShadowRoot&&e.host===n})):-1;o.preventDefault();const c=n=>{const o=n.shadowRoot;if(o){const e=o.querySelector(m);if(e&&"function"!=typeof n.setFocus)return void a(e)}a(n)};o.shiftKey?l<=0?b(r):c(s[l-1]):l<0||l>=s.length-1?h(r):c(s[l+1])}),!0),n.addEventListener("ionBackButton",(o=>{const e=$(n);(null==e?void 0:e.backdropDismiss)&&o.detail.register(t,(()=>{e.dismiss(void 0,H)}))})),i()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=$(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,H)}})))},R=(n,o,e,t,i)=>{const a=$(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},V=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),$=(n,o,e)=>{const t=V(n,o);return(void 0===e?t:t.filter((n=>n.id===e))).slice(-1)[0]},q=(n=!1)=>{const o=J(document).querySelector("ion-router-outlet, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},z=async(e,t,i,a,r,d)=>{var s,l;if(e.presented)return;"ION-TOAST"!==e.el.tagName&&F(e.el);const u=e.el,v="ION-TOAST"!==u.tagName&&!1!==u.focusTrap&&k(u);if(e.presented=!0,e.willPresent.emit(),v){const n=J(document).querySelector("ion-router-outlet, #ion-view-container-root");!!n&&n.contains(u)||q(!0),document.body.classList.add(p)}null===(s=e.willPresentShorthand)||void 0===s||s.emit();const f=n(e),m=o(e),h=e.enterAnimation?e.enterAnimation:c.get(t,"ios"===m?i:"ionic"===f&&r?r:a);await L(e,h,e.el,d)&&(e.didPresent.emit(),null===(l=e.didPresentShorthand)||void 0===l||l.emit()),!e.keyboardClose||null!==document.activeElement&&e.el.contains(document.activeElement)||e.el.focus(),e.el.removeAttribute("aria-hidden"),e.el.removeAttribute("inert")},F=async n=>{let o=document.activeElement;if(!o)return;o.blur();const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(m)||o),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||o.focus()},G=async(n,t,i,a,r,d,s)=>{var l,v;if(!n.presented)return!1;const f=(void 0!==e?V(e):[]).filter((n=>"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&k(n))),m=n.el;"ION-TOAST"!==m.tagName&&!1!==m.focusTrap&&k(m)&&1===f.length&&f[0].id===m.id&&(q(!1),document.body.classList.remove(p)),n.presented=!1;try{n.el.style.setProperty("pointer-events","none"),n.willDismiss.emit({data:t,role:i}),null===(l=n.willDismissShorthand)||void 0===l||l.emit({data:t,role:i});const e=o(n),u=n.leaveAnimation?n.leaveAnimation:c.get(a,"ios"===e?r:d);i!==K&&await L(n,u,n.el,s),n.didDismiss.emit({data:t,role:i}),null===(v=n.didDismissShorthand)||void 0===v||v.emit({data:t,role:i}),(O.get(n)||[]).forEach((n=>n.destroy())),O.delete(n),n.el.classList.add("overlay-hidden"),n.el.style.removeProperty("pointer-events"),void 0!==n.el.lastFocus&&(n.el.lastFocus=void 0)}catch(o){u(`[${n.el.tagName.toLowerCase()}] - `,o)}return n.el.remove(),!0},J=n=>{const o=c.get("appRootSelector","ion-app");return n.querySelector(o)||n.body},L=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const i=o(n.el,t);n.animated&&c.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const a=O.get(n)||[];return O.set(n,[...a,i]),await i.play(),!0},_=(n,o)=>{let e;const t=new Promise((n=>e=n));return Q(n,o,(n=>{e(n.detail)})),t},Q=(n,o,e)=>{const t=i=>{s(n,o,t),e(i)};d(n,o,t)},W=n=>"cancel"===n||n===H,X=n=>n(),Z=(n,o)=>{if("function"==typeof n)return c.get("_zoneGate",X)((()=>{try{return n(o)}catch(n){throw n}}))},H="backdrop",K="gesture",U=39,Y=n=>{let o,e=!1;const t=f(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:r,delegate:d}=n;return e=null!==a.parentNode&&!r,o=e?d||t:d,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},nn=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):v(`[${e.tagName.toLowerCase()}] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}},on="ion-disable-focus-trap";export{H as B,on as F,K as G,U as O,T as a,j as b,B as c,Y as d,nn as e,z as f,G as g,_ as h,W as i,N as j,D as k,A as l,S as m,h as n,$ as o,C as p,b as q,Z as s,I as t}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,f as i,h as s,d as o,g as r}from"./p-Omi_TcwW.js";import{r as e}from"./p-CHE1xWbg.js";import{c as n}from"./p-CBV-BGvD.js";import"./p-vXpMhGrs.js";const a=/^[-+]?(?:\d+\.?\d*|\.\d+)(?:%|[a-z]+)$/i,l=/^(calc|min|max|clamp)\s*\(.+\)$/i,h={xs:2,sm:3,md:4,lg:6,xl:8,xxl:10},u="16px",d={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},m=["xs","sm","md","lg","xl","xxl"],c=class{constructor(i){t(this,i),this.itemWrapperSelector="[data-gallery-group]",this.hasWarnedInvalidColumns=!1,this.hasWarnedInvalidGap=!1,this.hasWarnedUnusedOrder=!1,this.layout="uniform",this.columns=h,this.gap=u,this.onSlotChange=()=>{this.scheduleMasonryResize()},this.resizeMasonryGrid=()=>{if(this.masonryRaf=void 0,"masonry"!==this.layout)return void this.clearMasonryStyles();const t=this.el.getBoundingClientRect().width,i=this.getColumnsForWidth(t);if(void 0===i)return;const s=getComputedStyle(this.el),o=parseFloat(s.getPropertyValue("grid-auto-rows"))||0,r=parseFloat(s.getPropertyValue("row-gap"))||parseFloat(s.getPropertyValue("gap"))||0,e=parseFloat(s.getPropertyValue("column-gap"))||parseFloat(s.getPropertyValue("gap"))||0,n=this.getItems();this.layoutMasonry(n,o,r,e,i)}}onColumnsOrGapChanged(){this.syncResponsiveLayout()}onLayoutOrOrderChanged(){this.syncResponsiveLayout(),e((()=>{this.warnUnusedOrder()}))}componentDidLoad(){this.updateResponsiveStyles(!0),this.resizeObserver=new ResizeObserver((()=>{this.updateResponsiveStyles(),this.scheduleMasonryResize()})),this.resizeObserver.observe(this.el),this.scheduleMasonryResize(),this.warnUnusedOrder()}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 i=t.target;i instanceof Node&&this.el.contains(i)&&this.scheduleMasonryResize()}syncResponsiveLayout(){this.updateResponsiveStyles(!0),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 i="number"==typeof t?t:Number(t);return!Number.isFinite(i)||!Number.isInteger(i)||i<=0?void 0:i}sanitizeGap(t){if(void 0===t)return;const i="string"==typeof t?t.trim():t;if(""===i||"object"==typeof i)return;const s=Number(i);return Number.isFinite(s)?s<0?void 0:`${s}px`:"string"==typeof i&&function(t){const i=t.trim();return!!i&&(l.test(i)||a.test(i))}(i)?i:void 0}isBreakpointMap(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}hasInvalidBreakpointMap(t,i){let s=!1;for(const o of m){const r=t[o];if(void 0!==r&&(s=!0,void 0===i(r)))return!0}return!s}resolveFromBreakpoints(t,i,s,o){let r;for(const e of m){const n=i[e],a=s(n),l=o(e),h=void 0===n||void 0===a?l:a;void 0!==h&&t>=d[e]&&(r=h)}return r}getColumnsFromBreakpointMap(t,i){return this.resolveFromBreakpoints(t,i,(t=>this.sanitizeColumns(t)),(t=>this.sanitizeColumns(h[t])))}getGapFromBreakpointMap(t,i){return this.resolveFromBreakpoints(t,i,(t=>this.sanitizeGap(t)),(()=>this.sanitizeGap(u)))}warnInvalidColumns(t){this.hasWarnedInvalidColumns||(i(`[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)}warnInvalidGap(t){this.hasWarnedInvalidGap||(i(`[ion-gallery] - Invalid "gap" value (${JSON.stringify(t)}). Expected a non-negative number, CSS length string, or breakpoint map object (e.g. { xs: 8, md: "1rem" }).`,this.el),this.hasWarnedInvalidGap=!0)}warnUnusedOrder(){const{layout:t}=this;this.hasWarnedUnusedOrder||"uniform"!==t||void 0===(null==this.order?void 0:this.order)||(i('[ion-gallery] - "order" has no effect when "layout" is "uniform". Set "layout" to "masonry" for "order" to apply.',this.el),this.hasWarnedUnusedOrder=!0)}getColumnsForWidth(t){const{columns:i}=this,s=this.isBreakpointMap(i),o=s&&this.hasInvalidBreakpointMap(i,(t=>this.sanitizeColumns(t))),r=s?this.getColumnsFromBreakpointMap(t,i):this.sanitizeColumns(i);return(o||!s&&void 0===r)&&this.warnInvalidColumns(i),void 0!==r?r:this.getColumnsFromBreakpointMap(t,h)}getGapForWidth(t){const{gap:i}=this,s=null!=i?i:u,o=this.isBreakpointMap(s),r=o&&this.hasInvalidBreakpointMap(s,(t=>this.sanitizeGap(t))),e=o?this.getGapFromBreakpointMap(t,s):this.sanitizeGap(s);return(r||!o&&void 0===e)&&this.warnInvalidGap(s),void 0!==e?e:this.sanitizeGap(u)}updateResponsiveStyles(t=!1){const i=this.el.getBoundingClientRect().width;if(!i||!t&&void 0!==this.lastWidth&&Math.abs(this.lastWidth-i)<1)return;this.lastWidth=i;const s=this.getColumnsForWidth(i);this.el.style.setProperty("--internal-gallery-columns",`${s}`);const o=this.getGapForWidth(i);this.el.style.setProperty("--internal-gallery-gap",`${o}`)}isGalleryItemElement(t){var i;return"function"==typeof(null===(i=t.style)||void 0===i?void 0:i.setProperty)}getItems(){const t=Array.from(this.el.children).filter((t=>this.isGalleryItemElement(t))),i=[];return t.forEach((t=>{if(!t.matches(this.itemWrapperSelector))return void i.push(t);t.style.display="contents";const s=Array.from(t.children).filter((t=>this.isGalleryItemElement(t)));i.push(...s)})),i}clearItemStyles(t){t.style.gridRowStart="",t.style.gridRowEnd="",t.style.gridColumn="",t.style.marginBottom=""}clearMasonryStyles(){this.getItems().forEach((t=>this.clearItemStyles(t)))}calculateRowSpan(t,i,s){if(t instanceof HTMLImageElement&&(!t.complete||0===t.naturalHeight))return;const o=t.getBoundingClientRect().height,r=getComputedStyle(t),e=parseFloat(r.getPropertyValue("margin-bottom"))||0,n=i+s;return n&&Number.isFinite(n)&&Math.ceil((o+e+s)/n)||1}getColumnIndex(t,i,s){if("best-fit"===this.getOrder()){let t=0;for(let o=1;o<s;o++)i[o]<i[t]&&(t=o);return t}return t%s}layoutMasonry(t,i,s,o,r){const e=new Array(r).fill(0),n=new Array(r).fill(void 0);t.forEach(((t,a)=>{t.style.marginBottom="",t.parentElement!==this.el&&(t.style.marginBottom=`${o}px`);const l=this.calculateRowSpan(t,i,s);if(void 0===l)return void this.clearItemStyles(t);const h=this.getColumnIndex(a,e,r),u=e[h]+1;t.style.gridColumn=`${h+1}`,t.style.gridRowStart=`${u}`,t.style.gridRowEnd=`span ${l}`,e[h]=u+l-1,n[h]=t})),n.forEach((t=>{if(void 0===t)return;t.style.marginBottom="0px";const o=this.calculateRowSpan(t,i,s);void 0!==o?t.style.gridRowEnd=`span ${o}`:this.clearItemStyles(t)}))}getOrder(){const{layout:t}=this,i=null==this.order?void 0:this.order;if("uniform"!==t)return"masonry"===t&&void 0===i?"sequential":i}render(){const{layout:t}=this,i=this.getOrder(),r=n(this);return s(o,{key:"10b550a9cc0c6b6994a86ec95bc6dbfadb3e8c58",class:{[r]:!0,[`gallery-layout-${t}`]:!0,[`gallery-order-${i}`]:"masonry"===t&&void 0!==i}},s("slot",{key:"1ac472f867053973aa90975cd61901a2e8ff20aa",onSlotchange:this.onSlotChange}))}get el(){return r(this)}static get watchers(){return{columns:[{onColumnsOrGapChanged:0}],gap:[{onColumnsOrGapChanged:0}],layout:[{onLayoutOrOrderChanged:0}],order:[{onLayoutOrOrderChanged:0}]}}};c.style=":host{display:grid;grid-template-columns:repeat(var(--internal-gallery-columns, 2), minmax(0, 1fr))}:host(.gallery-layout-uniform){gap:var(--internal-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(--internal-gallery-gap, 16px);-moz-column-gap:var(--internal-gallery-gap, 16px);column-gap:var(--internal-gallery-gap, 16px);row-gap:0;grid-auto-rows:2px}:host(.gallery-layout-masonry) ::slotted(*){display:block;min-height:unset;margin-bottom:var(--internal-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{c as ion_gallery}
|
|
@@ -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}
|
package/dist/ionic/p-C4uUM9DM.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{c as n,b as o,d as e,O as t,s as i}from"./p-CBV-BGvD.js";import{o as a,c as r,f as d,m as s,g as l}from"./p-CHE1xWbg.js";import{e as c,j as u,f as v}from"./p-Omi_TcwW.js";import{C as f}from"./p-FvDKM4Ax.js";import{B as m}from"./p-BTEOs1at.js";const p='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',h=(n,o)=>{const e=n.querySelector(p);w(e,null!=o?o:n)},b=(n,o)=>{const e=Array.from(n.querySelectorAll(p));w(e.length>0?e[e.length-1]:null,null!=o?o:n)},w=(n,o)=>{let e=n;const t=null==n?void 0:n.shadowRoot;if(t){const o=t.querySelector(p);e=o&&"function"==typeof n.setFocus?n:o||n}if(e){const n=e.closest("ion-radio-group");n?n.setFocus():a(e)}else o.focus()};let y=0,g=0;const O=new WeakMap,x=n=>{var o;return!1!==n.showBackdrop&&!((null!==(o=n.backdropBreakpoint)&&void 0!==o?o:0)>0)},T=n=>({create:o=>E(n,o),dismiss:(o,e,t)=>F(document,o,e,n,t),getTop:async()=>R(document,n)}),k=T("ion-alert"),A=T("ion-action-sheet"),j=T("ion-loading"),S=T("ion-modal"),C=T("ion-picker-legacy"),B=T("ion-popover"),D=T("ion-toast"),I=n=>{"undefined"!=typeof document&&P(document);const o=y++;n.overlayIndex=o},N=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++g),n.id),E=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const e=document.createElement(n);return e.classList.add("overlay-hidden"),Object.assign(e,Object.assign(Object.assign({},o),{hasController:!0})),_(document).appendChild(e),new Promise((n=>r(e,n)))})):Promise.resolve(),M=(n,o)=>{let e=n;const t=null==n?void 0:n.shadowRoot;t&&(e=t.querySelector(p)||n),e?a(e):o.focus()},P=n=>{0===y&&(y=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=R(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=n.target;e&&t&&(e.classList.contains(on)||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else if("ION-TOAST"===t.tagName)M(e.lastFocus,e);else{const n=e.lastFocus;h(e),n===o.activeElement&&b(e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else if("ION-TOAST"===t.tagName)M(e.lastFocus,e);else{const n=l(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;h(i,e),n===o.activeElement&&b(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("keydown",(o=>{var e,t,i;if("Tab"!==o.key&&"Alt+Tab"!==o.key)return;const r=R(n,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");if(!r||r.classList.contains(on))return;const d=n.activeElement;if(d===r)return o.preventDefault(),void h(r);if(!d||!(r.contains(d)||d.getRootNode()instanceof ShadowRoot&&r.contains(d.getRootNode().host)||null!==(t=null===(e=r.shadowRoot)||void 0===e?void 0:e.contains(d))&&void 0!==t&&t))return;const s=[...r.querySelectorAll(p),...(null===(i=r.shadowRoot)||void 0===i?void 0:i.querySelectorAll(p))||[]];if(0===s.length)return void o.preventDefault();const l=d?s.findIndex((n=>{var o;if(n===d)return!0;if(null===(o=n.shadowRoot)||void 0===o?void 0:o.contains(d))return!0;const e=d.getRootNode();return e instanceof ShadowRoot&&e.host===n})):-1;o.preventDefault();const c=n=>{const o=n.shadowRoot;if(o){const e=o.querySelector(p);if(e&&"function"!=typeof n.setFocus)return void a(e)}a(n)};o.shiftKey?l<=0?b(r):c(s[l-1]):l<0||l>=s.length-1?h(r):c(s[l+1])}),!0),n.addEventListener("ionBackButton",(o=>{const e=R(n);(null==e?void 0:e.backdropDismiss)&&o.detail.register(t,(()=>{e.dismiss(void 0,U)}))})),i()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=R(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,U)}})))},F=(n,o,e,t,i)=>{const a=R(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},G=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),R=(n,o,e)=>{const t=G(n,o);return(void 0===e?t:t.filter((n=>n.id===e))).slice(-1)[0]},V=(n=!1)=>{const o=_(document).querySelector("ion-router-outlet, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},W=async(e,t,i,a,r,d)=>{var s,l;if(e.presented)return;"ION-TOAST"!==e.el.tagName&&$(e.el);const u=e.el,v="ION-TOAST"!==u.tagName&&!1!==u.focusTrap&&x(u);if(e.presented=!0,e.willPresent.emit(),v){const n=_(document).querySelector("ion-router-outlet, #ion-view-container-root");!!n&&n.contains(u)||V(!0),document.body.classList.add(m)}null===(s=e.willPresentShorthand)||void 0===s||s.emit();const f=n(e),p=o(e),h=e.enterAnimation?e.enterAnimation:c.get(t,"ios"===p?i:"ionic"===f&&r?r:a);await q(e,h,e.el,d)&&(e.didPresent.emit(),null===(l=e.didPresentShorthand)||void 0===l||l.emit()),!e.keyboardClose||null!==document.activeElement&&e.el.contains(document.activeElement)||e.el.focus(),e.el.removeAttribute("aria-hidden"),e.el.removeAttribute("inert")},$=async n=>{let o=document.activeElement;if(!o)return;o.blur();const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(p)||o),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||o.focus()},L=async(n,t,i,a,r,d,s)=>{var l,v;if(!n.presented)return!1;const f=(void 0!==e?G(e):[]).filter((n=>"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&x(n))),p=n.el;"ION-TOAST"!==p.tagName&&!1!==p.focusTrap&&x(p)&&1===f.length&&f[0].id===p.id&&(V(!1),document.body.classList.remove(m)),n.presented=!1;try{n.el.style.setProperty("pointer-events","none"),n.willDismiss.emit({data:t,role:i}),null===(l=n.willDismissShorthand)||void 0===l||l.emit({data:t,role:i});const e=o(n),u=n.leaveAnimation?n.leaveAnimation:c.get(a,"ios"===e?r:d);i!==X&&await q(n,u,n.el,s),n.didDismiss.emit({data:t,role:i}),null===(v=n.didDismissShorthand)||void 0===v||v.emit({data:t,role:i}),(O.get(n)||[]).forEach((n=>n.destroy())),O.delete(n),n.el.classList.add("overlay-hidden"),n.el.style.removeProperty("pointer-events"),void 0!==n.el.lastFocus&&(n.el.lastFocus=void 0)}catch(o){u(`[${n.el.tagName.toLowerCase()}] - `,o)}return n.el.remove(),!0},_=n=>{const o=c.get("appRootSelector","ion-app");return n.querySelector(o)||n.body},q=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const i=o(n.el,t);n.animated&&c.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const a=O.get(n)||[];return O.set(n,[...a,i]),await i.play(),!0},z=(n,o)=>{let e;const t=new Promise((n=>e=n));return H(n,o,(n=>{e(n.detail)})),t},H=(n,o,e)=>{const t=i=>{s(n,o,t),e(i)};d(n,o,t)},K=n=>"cancel"===n||n===U,J=n=>n(),Q=(n,o)=>{if("function"==typeof n)return c.get("_zoneGate",J)((()=>{try{return n(o)}catch(n){throw n}}))},U="backdrop",X="gesture",Y=39,Z=n=>{let o,e=!1;const t=f(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:r,delegate:d}=n;return e=null!==a.parentNode&&!r,o=e?d||t:d,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},nn=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):v(`[${e.tagName.toLowerCase()}] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}},on="ion-disable-focus-trap";export{U as B,on as F,X as G,Y as O,k as a,A as b,B as c,Z as d,nn as e,W as f,L as g,z as h,K as i,I as j,N as k,j as l,S as m,h as n,R as o,C as p,b as q,Q as s,D as t}
|