@pod-os/elements 0.11.1-e89c280.0 → 0.12.0
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/dist/cjs/{data-0c9489d7.js → data-5be6ab7b.js} +19 -2
- package/dist/cjs/elements.cjs.js +2 -2
- package/dist/cjs/{index-91d3ff9c.js → index-8c116b24.js} +8463 -446
- package/dist/cjs/ion-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet_3.cjs.entry.js +1 -1
- package/dist/cjs/{ion-app_25.cjs.entry.js → ion-app_26.cjs.entry.js} +42 -4
- package/dist/cjs/ion-badge_12.cjs.entry.js +36 -10
- package/dist/cjs/ion-buttons_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-checkbox_4.cjs.entry.js +9 -0
- package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime.cjs.entry.js +107 -56
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu.cjs.entry.js +18 -15
- package/dist/cjs/ion-modal.cjs.entry.js +35 -26
- package/dist/cjs/ion-picker-column.cjs.entry.js +1 -2
- package/dist/cjs/ion-picker.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-select.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/ion-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +23 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{overlays-56226483.js → overlays-5d99746a.js} +9 -0
- package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
- package/dist/collection/apps/pos-app-browser/pos-app-browser.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/pos-add-literal-value/pos-add-literal-value.js +34 -10
- package/dist/collection/components/pos-error-toast/pos-error-toast.js +35 -0
- package/dist/collection/components/pos-literals/pos-literals.js +17 -1
- package/dist/components/button.js +3 -3
- package/dist/components/buttons.js +1 -1
- package/dist/components/content.js +9 -0
- package/dist/components/data.js +20 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index4.js +1 -1
- package/dist/components/index8.js +8464 -446
- package/dist/components/ion-accordion.js +2 -2
- package/dist/components/ion-datetime-button.js +1 -1
- package/dist/components/ion-datetime.js +60 -8
- package/dist/components/ion-menu.js +17 -14
- package/dist/components/ion-modal.js +35 -26
- package/dist/components/ion-range.js +1 -1
- package/dist/components/ion-split-pane.js +1 -1
- package/dist/components/ion-textarea.js +1 -1
- package/dist/components/ion-toast.js +21 -2
- package/dist/components/item.js +1 -1
- package/dist/components/overlays.js +9 -1
- package/dist/components/picker-column.js +1 -2
- package/dist/components/popover.js +1 -1
- package/dist/components/pos-add-literal-value2.js +19 -9
- package/dist/components/pos-app-browser.js +39 -33
- package/dist/components/pos-error-toast.d.ts +11 -0
- package/dist/components/pos-error-toast.js +6 -0
- package/dist/components/pos-error-toast2.js +45 -0
- package/dist/components/pos-literals2.js +17 -1
- package/dist/components/radio.js +9 -0
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-3088881f.js → p-0243a87a.js} +1 -1
- package/dist/elements/{p-1f4a3457.entry.js → p-036e382c.entry.js} +1 -1
- package/dist/elements/{p-8d726c51.entry.js → p-04bb69f5.entry.js} +2 -2
- package/dist/elements/{p-e0f4deae.js → p-07b61827.js} +2 -2
- package/dist/elements/{p-1244c9d7.entry.js → p-185506fc.entry.js} +2 -2
- package/dist/elements/{p-13a6f7bc.entry.js → p-21387f7c.entry.js} +1 -1
- package/dist/elements/p-228d64ab.entry.js +1 -0
- package/dist/elements/{p-b1ba08d2.js → p-3082941e.js} +1 -1
- package/dist/elements/p-33a17bf9.js +7 -0
- package/dist/elements/{p-4e60709f.js → p-387a310a.js} +2 -2
- package/dist/elements/p-446a00fa.entry.js +1 -0
- package/dist/elements/{p-20204cd6.entry.js → p-485c278b.entry.js} +1 -1
- package/dist/elements/{p-0169a9df.js → p-4deca788.js} +2 -2
- package/dist/elements/p-5d9b5890.entry.js +1 -0
- package/dist/elements/{p-2cfcee5f.entry.js → p-61d5e682.entry.js} +1 -1
- package/dist/elements/{p-5949c98f.entry.js → p-674fc19d.entry.js} +1 -1
- package/dist/elements/p-6b7c2114.entry.js +9 -0
- package/dist/elements/{p-a589651d.entry.js → p-6cc24956.entry.js} +2 -2
- package/dist/elements/{p-673fe601.entry.js → p-6e2e72c7.entry.js} +1 -1
- package/dist/elements/{p-928b90ab.entry.js → p-70d8e941.entry.js} +1 -1
- package/dist/elements/{p-3cc9c581.entry.js → p-7120b5f1.entry.js} +1 -1
- package/dist/elements/p-746b8d20.js +4 -0
- package/dist/elements/{p-216a955e.entry.js → p-7eafab7c.entry.js} +1 -1
- package/dist/elements/{p-20cec807.entry.js → p-81937d27.entry.js} +2 -2
- package/dist/elements/p-864b27a7.js +4 -0
- package/dist/elements/p-88c6dc94.entry.js +4 -0
- package/dist/elements/{p-3c8a5a30.entry.js → p-899550d8.entry.js} +1 -1
- package/dist/elements/{p-6b15aaeb.js → p-8f253089.js} +1 -1
- package/dist/elements/{p-48f46efa.entry.js → p-9074ecd7.entry.js} +1 -1
- package/dist/elements/p-957dc323.js +4 -0
- package/dist/elements/{p-4d8b9f45.entry.js → p-988e4192.entry.js} +1 -1
- package/dist/elements/{p-efabbb0d.js → p-995ec23e.js} +2 -2
- package/dist/elements/{p-2f09ba32.entry.js → p-9b2880ae.entry.js} +1 -1
- package/dist/elements/{p-827125bb.entry.js → p-a6c55fcb.entry.js} +1 -1
- package/dist/elements/p-af558048.entry.js +1 -0
- package/dist/elements/{p-7884f255.js → p-b003ddd8.js} +1 -1
- package/dist/elements/{p-ada8cc4e.entry.js → p-b3f2cc07.entry.js} +1 -1
- package/dist/elements/{p-26b4768e.entry.js → p-b8243f9f.entry.js} +1 -1
- package/dist/elements/p-c1bcf425.entry.js +7 -0
- package/dist/elements/{p-6937adab.entry.js → p-c1e9bc5e.entry.js} +1 -1
- package/dist/elements/{p-4ee1b070.entry.js → p-c218101a.entry.js} +1 -1
- package/dist/elements/{p-af4ba42f.entry.js → p-ce4f5b1f.entry.js} +1 -1
- package/dist/elements/{p-41a159a6.entry.js → p-d0772d6b.entry.js} +1 -1
- package/dist/elements/{p-2bb1928f.js → p-d3860378.js} +2 -2
- package/dist/elements/{p-078fbb91.entry.js → p-d43bc78d.entry.js} +2 -2
- package/dist/elements/{p-dd84e91a.entry.js → p-d6b522ec.entry.js} +1 -1
- package/dist/elements/{p-7710fe29.entry.js → p-da1f80aa.entry.js} +1 -1
- package/dist/elements/p-da85c9fc.js +119 -0
- package/dist/elements/{p-cae34530.entry.js → p-da86ba7e.entry.js} +1 -1
- package/dist/elements/{p-fb9f4444.entry.js → p-dbcb55b8.entry.js} +1 -1
- package/dist/elements/{p-e81498f1.entry.js → p-e7872214.entry.js} +1 -1
- package/dist/elements/p-e7fc7473.js +4 -0
- package/dist/elements/{p-f16106d1.entry.js → p-ec130fe7.entry.js} +1 -1
- package/dist/elements/{p-a617e741.entry.js → p-f0b0274f.entry.js} +1 -1
- package/dist/elements/p-f3a6519e.js +4 -0
- package/dist/elements/{p-15138093.entry.js → p-f796e16d.entry.js} +3 -3
- package/dist/elements/p-faafaf1a.entry.js +1 -0
- package/dist/elements/p-fd3b5d19.entry.js +1 -0
- package/dist/elements/{p-64c4e33d.entry.js → p-fe26ffc1.entry.js} +1 -1
- package/dist/esm/{animation-be5f711f.js → animation-b5940eb7.js} +1 -1
- package/dist/esm/{data-2c0eab05.js → data-0c8397b1.js} +19 -2
- package/dist/esm/elements.js +2 -2
- package/dist/esm/{framework-delegate-e3d3514b.js → framework-delegate-df4b1d47.js} +1 -1
- package/dist/esm/{helpers-516c51e1.js → helpers-dc474de0.js} +1 -1
- package/dist/esm/{index-975a559a.js → index-3ca7ca42.js} +2 -2
- package/dist/esm/{index-f53834ea.js → index-3f9a18ba.js} +1 -1
- package/dist/esm/{index-487ee567.js → index-8b7a635c.js} +1 -1
- package/dist/esm/{index-5b4bb310.js → index-8da653e3.js} +3 -3
- package/dist/esm/{index-c4158e4a.js → index-9e91fad4.js} +8464 -446
- package/dist/esm/{input-shims-14aa5c3b.js → input-shims-aedf5b0c.js} +2 -2
- package/dist/esm/ion-accordion.entry.js +3 -3
- package/dist/esm/ion-action-sheet_3.entry.js +3 -3
- package/dist/esm/{ion-app_25.entry.js → ion-app_26.entry.js} +47 -10
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-badge_12.entry.js +37 -11
- package/dist/esm/ion-breadcrumb.entry.js +1 -1
- package/dist/esm/ion-buttons_3.entry.js +2 -2
- package/dist/esm/ion-checkbox_4.entry.js +10 -1
- package/dist/esm/ion-datetime-button.entry.js +2 -2
- package/dist/esm/ion-datetime.entry.js +61 -10
- package/dist/esm/ion-fab-button.entry.js +1 -1
- package/dist/esm/ion-img.entry.js +1 -1
- package/dist/esm/ion-infinite-scroll.entry.js +2 -2
- package/dist/esm/ion-item-options.entry.js +1 -1
- package/dist/esm/ion-item-sliding.entry.js +2 -2
- package/dist/esm/ion-item_4.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu-button.entry.js +4 -4
- package/dist/esm/ion-menu-toggle.entry.js +4 -4
- package/dist/esm/ion-menu.entry.js +21 -18
- package/dist/esm/ion-modal.entry.js +40 -31
- package/dist/esm/ion-nav.entry.js +4 -4
- package/dist/esm/ion-picker-column.entry.js +2 -3
- package/dist/esm/ion-picker.entry.js +3 -3
- package/dist/esm/ion-popover.entry.js +5 -5
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher.entry.js +3 -3
- package/dist/esm/ion-reorder-group.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +4 -4
- package/dist/esm/ion-router.entry.js +1 -1
- package/dist/esm/ion-segment-button.entry.js +1 -1
- package/dist/esm/ion-segment.entry.js +1 -1
- package/dist/esm/ion-select.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +1 -1
- package/dist/esm/ion-tab-button.entry.js +1 -1
- package/dist/esm/ion-tab.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +23 -5
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ion-virtual-scroll.entry.js +1 -1
- package/dist/esm/{ios.transition-e4f590ed.js → ios.transition-fc8a45f6.js} +3 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{md.transition-f82b8ec5.js → md.transition-a33cfe2d.js} +3 -3
- package/dist/esm/{menu-toggle-util-c4c92fb3.js → menu-toggle-util-d434cd99.js} +1 -1
- package/dist/esm/{overlays-9f558e5d.js → overlays-3bfecc84.js} +10 -2
- package/dist/esm/pos-container-contents.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +1 -1
- package/dist/esm/{status-tap-9bc89ae6.js → status-tap-c468a2d0.js} +2 -2
- package/dist/esm/{swipe-back-4cf55049.js → swipe-back-3b3f43fc.js} +1 -1
- package/dist/types/components/pos-add-literal-value/pos-add-literal-value.d.ts +10 -1
- package/dist/types/components/pos-error-toast/pos-error-toast.d.ts +4 -0
- package/dist/types/components/pos-literals/pos-literals.d.ts +1 -0
- package/dist/types/components.d.ts +20 -0
- package/package.json +6 -6
- package/dist/cjs/jsonld-HFR6RJUN-008ea20f.js +0 -8425
- package/dist/components/jsonld-HFR6RJUN.js +0 -8423
- package/dist/elements/p-011e627f.js +0 -4
- package/dist/elements/p-1949ecba.entry.js +0 -9
- package/dist/elements/p-195c8b60.js +0 -32
- package/dist/elements/p-37c43290.js +0 -4
- package/dist/elements/p-3f05b00a.js +0 -4
- package/dist/elements/p-6c05b99e.js +0 -7
- package/dist/elements/p-6dfca133.entry.js +0 -7
- package/dist/elements/p-6e75e3e5.entry.js +0 -1
- package/dist/elements/p-843c25a6.entry.js +0 -1
- package/dist/elements/p-8a5fdd45.entry.js +0 -1
- package/dist/elements/p-a8083674.js +0 -4
- package/dist/elements/p-b5e115b1.js +0 -90
- package/dist/elements/p-c12d7195.entry.js +0 -1
- package/dist/elements/p-c29ec519.entry.js +0 -4
- package/dist/elements/p-dc89477c.js +0 -4
- package/dist/elements/p-e0574155.entry.js +0 -1
- package/dist/elements/p-efa41d7d.entry.js +0 -1
- package/dist/esm/jsonld-HFR6RJUN-519a9242.js +0 -8423
|
@@ -4,9 +4,9 @@ import { c as config, g as getIonMode } from './ionic-global.js';
|
|
|
4
4
|
import { r as raf, a as addEventListener, b as removeEventListener, g as getElementRoot, t as transitionEndAsync } from './helpers.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
6
6
|
|
|
7
|
-
const accordionIosCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";
|
|
7
|
+
const accordionIosCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";
|
|
8
8
|
|
|
9
|
-
const accordionMdCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{transition:none !important}}";
|
|
9
|
+
const accordionMdCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{transition:none !important}}";
|
|
10
10
|
|
|
11
11
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { g as getIonMode } from './ionic-global.js';
|
|
3
3
|
import { a as addEventListener, d as componentOnReady } from './helpers.js';
|
|
4
|
-
import {
|
|
4
|
+
import { p as printIonError } from './index4.js';
|
|
5
5
|
import { c as createColorClasses } from './theme.js';
|
|
6
6
|
import { q as parseDate, t as getToday, J as is24Hour, S as getLocalizedDateTime, F as getMonthAndYear, K as getLocalizedTime, T as getMonthDayAndYear } from './data.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './ripple-effect.js';
|
|
@@ -3,7 +3,7 @@ import { a as chevronBack, f as chevronForward, c as chevronDown, g as caretUpSh
|
|
|
3
3
|
import { g as getIonMode } from './ionic-global.js';
|
|
4
4
|
import { startFocusVisible } from './focus-visible.js';
|
|
5
5
|
import { r as raf, c as renderHiddenInput, g as getElementRoot } from './helpers.js';
|
|
6
|
-
import { p as
|
|
6
|
+
import { p as printIonError, a as printIonWarning } from './index4.js';
|
|
7
7
|
import { i as isRTL } from './dir.js';
|
|
8
8
|
import { c as createColorClasses } from './theme.js';
|
|
9
9
|
import { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getEndOfWeek, j as getStartOfWeek, k as getPreviousDay, l as getNextDay, m as getPreviousWeek, n as getNextWeek, p as parseMinParts, o as parseMaxParts, q as parseDate, w as warnIfValueOutOfBounds, r as convertToArrayOfNumbers, s as convertDataToISO, t as getToday, u as getClosestValidDate, x as getNumDaysInMonth, y as getCombinedDateColumnData, z as getMonthColumnData, A as getDayColumnData, B as getYearColumnData, C as isMonthFirstLocale, D as getTimeColumnsData, E as isLocaleDayPeriodRTL, F as getMonthAndYear, G as getDaysOfWeek, H as getDaysOfMonth, I as generateMonths, J as is24Hour, K as getLocalizedTime, L as getMonthAndDay, M as formatValue, N as getNextYear, O as getPreviousYear, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data.js';
|
|
@@ -158,10 +158,40 @@ const isNextMonthDisabled = (refParts, maxParts) => {
|
|
|
158
158
|
maxParts,
|
|
159
159
|
});
|
|
160
160
|
};
|
|
161
|
+
/**
|
|
162
|
+
* Given the value of the highlightedDates property
|
|
163
|
+
* and an ISO string, return the styles to use for
|
|
164
|
+
* that date, or undefined if none are found.
|
|
165
|
+
*/
|
|
166
|
+
const getHighlightStyles = (highlightedDates, dateIsoString, el) => {
|
|
167
|
+
if (Array.isArray(highlightedDates)) {
|
|
168
|
+
const dateStringWithoutTime = dateIsoString.split('T')[0];
|
|
169
|
+
const matchingHighlight = highlightedDates.find((hd) => hd.date === dateStringWithoutTime);
|
|
170
|
+
if (matchingHighlight) {
|
|
171
|
+
return {
|
|
172
|
+
textColor: matchingHighlight.textColor,
|
|
173
|
+
backgroundColor: matchingHighlight.backgroundColor,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
/**
|
|
179
|
+
* Wrap in a try-catch to prevent exceptions in the user's function
|
|
180
|
+
* from interrupting the calendar's rendering.
|
|
181
|
+
*/
|
|
182
|
+
try {
|
|
183
|
+
return highlightedDates(dateIsoString);
|
|
184
|
+
}
|
|
185
|
+
catch (e) {
|
|
186
|
+
printIonError('Exception thrown from provided `highlightedDates` callback. Please check your function and try again.', el, e);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return undefined;
|
|
190
|
+
};
|
|
161
191
|
|
|
162
|
-
const datetimeIosCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}
|
|
192
|
+
const datetimeIosCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day-highlight{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:32px;height:32px;z-index:-1}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.calendar-day-highlight{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-light, #ffffff);--background-rgb:var(--ion-color-light-rgb);--title-color:var(--ion-color-step-600, #666666)}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{padding-left:16px;padding-right:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, #cccccc);font-size:14px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}:host .calendar-action-buttons ion-item{--padding-start:16px;--background-hover:transparent;--background-activated:transparent;font-size:16px;font-weight:600}:host .calendar-action-buttons ion-item ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{padding-left:0;padding-right:0;padding-top:8px;padding-bottom:0}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, #b3b3b3);font-size:12px;font-weight:600;line-height:24px;text-transform:uppercase}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;height:calc(100% - 16px)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .calendar-day{font-size:20px}.calendar-day:focus .calendar-day-highlight,.calendar-day.calendar-day-active .calendar-day-highlight{opacity:0.2}.calendar-day.calendar-day-active .calendar-day-highlight{background:var(--ion-color-base)}.calendar-day:focus .calendar-day-highlight{background:var(--ion-color-base) !important}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-base);font-weight:600}:host .calendar-day.calendar-day-today.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-today.calendar-day-active .calendar-day-highlight{background:var(--ion-color-base);opacity:1}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:16px;font-size:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, #cccccc)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:flex;align-items:center;justify-content:space-between}:host .datetime-action-buttons{width:100%}";
|
|
163
193
|
|
|
164
|
-
const datetimeMdCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}
|
|
194
|
+
const datetimeMdCss = ":host{display:flex;flex-flow:column;background:var(--background);overflow:hidden}ion-picker-column-internal{min-width:26px}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{order:3;text-align:end}:host .wheel-order-year-first .month-column{order:2;text-align:end}:host .wheel-order-year-first .year-column{order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:flex;flex:1 1 auto;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:flex}@supports (background: -webkit-named-image(apple-pay-logo-black)) and (not (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{left:-99999px;position:absolute;visibility:hidden;pointer-events:none}:host-context([dir=rtl]):host(.show-month-and-year) .calendar-next-prev,:host-context([dir=rtl]).show-month-and-year .calendar-next-prev,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-days-of-week,:host-context([dir=rtl]).show-month-and-year .calendar-days-of-week,:host-context([dir=rtl]):host(.show-month-and-year) .calendar-body,:host-context([dir=rtl]).show-month-and-year .calendar-body,:host-context([dir=rtl]):host(.show-month-and-year) .datetime-time,:host-context([dir=rtl]).show-month-and-year .datetime-time{left:unset;right:unset;right:-99999px}}@supports (not (background: -webkit-named-image(apple-pay-logo-black))) or ((background: -webkit-named-image(apple-pay-logo-black)) and (aspect-ratio: 1/1)){:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-readonly),:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled){opacity:0.4}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons{display:flex;justify-content:space-between}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{--background:translucent}:host .calendar-action-buttons ion-item ion-label{display:flex;align-items:center}:host .calendar-action-buttons ion-item ion-icon{padding-left:4px;padding-right:0;padding-top:0;padding-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-action-buttons ion-item ion-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0}}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}:host .calendar-body{display:flex;flex-grow:1;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{scroll-snap-align:start;scroll-snap-stop:always;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day{padding-left:0px;padding-right:0px;padding-top:0px;padding-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;display:flex;position:relative;align-items:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;appearance:none;z-index:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px}}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{margin-left:unset;margin-right:unset;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px}}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day-highlight{border-radius:32px;padding-left:4px;padding-right:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:32px;height:32px;z-index:-1}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.calendar-day-highlight{padding-left:unset;padding-right:unset;-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px}}:host .datetime-time{display:flex;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:flex;align-items:center}:host .time-body{border-radius:8px;padding-left:12px;padding-right:12px;padding-top:6px;padding-bottom:6px;display:flex;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .time-body{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons ion-item{--color:var(--ion-color-base)}:host{--background:var(--ion-color-step-100, #ffffff);--title-color:var(--ion-color-contrast)}:host .datetime-header{padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-base);color:var(--title-color)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-header{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}:host .datetime-header .datetime-title{font-size:12px;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:34px}:host .datetime-calendar .calendar-action-buttons ion-item{--padding-start:20px}:host .calendar-action-buttons ion-item,:host .calendar-action-buttons ion-button{color:var(--ion-color-step-650, #595959)}:host .calendar-days-of-week{padding-left:10px;padding-right:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, gray);font-size:14px;line-height:36px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-days-of-week{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-body .calendar-month .calendar-month-grid{padding-left:10px;padding-right:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-body .calendar-month .calendar-month-grid{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .calendar-day{padding-left:0px;padding-right:0;padding-top:13px;padding-bottom:13px;font-size:14px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .calendar-day{padding-left:unset;padding-right:unset;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0;padding-inline-end:0}}.calendar-day:focus .calendar-day-highlight{background:rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-base)}.calendar-day.calendar-day-today .calendar-day-highlight{border:1px solid var(--ion-color-base)}:host .calendar-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active .calendar-day-highlight{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .datetime-time{padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-time{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host .time-header{color:var(--ion-color-step-650, #595959)}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{padding-left:10px;padding-right:10px;padding-top:10px;padding-bottom:10px;display:flex;align-items:center;justify-content:flex-end}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host .datetime-buttons{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}:host .datetime-view-buttons ion-button{color:var(--ion-color-step-800, #333333)}";
|
|
165
195
|
|
|
166
196
|
const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
167
197
|
constructor() {
|
|
@@ -1069,7 +1099,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1069
1099
|
});
|
|
1070
1100
|
}
|
|
1071
1101
|
componentWillLoad() {
|
|
1072
|
-
const { el, multiple, presentation, preferWheel } = this;
|
|
1102
|
+
const { el, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
1073
1103
|
if (multiple) {
|
|
1074
1104
|
if (presentation !== 'date') {
|
|
1075
1105
|
printIonWarning('Multiple date selection is only supported for presentation="date".', el);
|
|
@@ -1078,6 +1108,14 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1078
1108
|
printIonWarning('Multiple date selection is not supported with preferWheel="true".', el);
|
|
1079
1109
|
}
|
|
1080
1110
|
}
|
|
1111
|
+
if (highlightedDates !== undefined) {
|
|
1112
|
+
if (presentation !== 'date' && presentation !== 'date-time' && presentation !== 'time-date') {
|
|
1113
|
+
printIonWarning('The highlightedDates property is only supported with the date, date-time, and time-date presentations.', el);
|
|
1114
|
+
}
|
|
1115
|
+
if (preferWheel) {
|
|
1116
|
+
printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1081
1119
|
this.processMinParts();
|
|
1082
1120
|
this.processMaxParts();
|
|
1083
1121
|
const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
|
|
@@ -1449,10 +1487,11 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1449
1487
|
'calendar-month-disabled': !isWorkingMonth && swipeDisabled,
|
|
1450
1488
|
} }, h("div", { class: "calendar-month-grid" }, getDaysOfMonth(month, year, this.firstDayOfWeek % 7).map((dateObject, index) => {
|
|
1451
1489
|
const { day, dayOfWeek } = dateObject;
|
|
1452
|
-
const { isDateEnabled, multiple } = this;
|
|
1490
|
+
const { el, highlightedDates, isDateEnabled, multiple } = this;
|
|
1453
1491
|
const referenceParts = { month, day, year };
|
|
1454
1492
|
const isCalendarPadding = day === null;
|
|
1455
1493
|
const { isActive, isToday, ariaLabel, ariaSelected, disabled, text } = getCalendarDayState(this.locale, referenceParts, this.activePartsClone, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
|
|
1494
|
+
const dateIsoString = convertDataToISO(referenceParts);
|
|
1456
1495
|
let isCalDayDisabled = isCalMonthDisabled || disabled;
|
|
1457
1496
|
if (!isCalDayDisabled && isDateEnabled !== undefined) {
|
|
1458
1497
|
try {
|
|
@@ -1461,17 +1500,27 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1461
1500
|
* to prevent exceptions in the user's function from
|
|
1462
1501
|
* interrupting the calendar rendering.
|
|
1463
1502
|
*/
|
|
1464
|
-
isCalDayDisabled = !isDateEnabled(
|
|
1503
|
+
isCalDayDisabled = !isDateEnabled(dateIsoString);
|
|
1465
1504
|
}
|
|
1466
1505
|
catch (e) {
|
|
1467
|
-
printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', e);
|
|
1506
|
+
printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', el, e);
|
|
1468
1507
|
}
|
|
1469
1508
|
}
|
|
1509
|
+
let dateStyle = undefined;
|
|
1510
|
+
/**
|
|
1511
|
+
* Custom highlight styles should not override the style for selected dates,
|
|
1512
|
+
* nor apply to "filler days" at the start of the grid.
|
|
1513
|
+
*/
|
|
1514
|
+
if (highlightedDates !== undefined && !isActive && day !== null) {
|
|
1515
|
+
dateStyle = getHighlightStyles(highlightedDates, dateIsoString, el);
|
|
1516
|
+
}
|
|
1470
1517
|
return (h("button", { tabindex: "-1", "data-day": day, "data-month": month, "data-year": year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isCalDayDisabled, class: {
|
|
1471
1518
|
'calendar-day-padding': isCalendarPadding,
|
|
1472
1519
|
'calendar-day': true,
|
|
1473
1520
|
'calendar-day-active': isActive,
|
|
1474
1521
|
'calendar-day-today': isToday,
|
|
1522
|
+
}, style: dateStyle && {
|
|
1523
|
+
color: dateStyle.textColor,
|
|
1475
1524
|
}, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": ariaSelected, "aria-label": ariaLabel, onClick: () => {
|
|
1476
1525
|
if (isCalendarPadding) {
|
|
1477
1526
|
return;
|
|
@@ -1492,7 +1541,9 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1492
1541
|
day,
|
|
1493
1542
|
year }));
|
|
1494
1543
|
}
|
|
1495
|
-
} },
|
|
1544
|
+
} }, h("div", { class: "calendar-day-highlight", style: {
|
|
1545
|
+
backgroundColor: dateStyle === null || dateStyle === void 0 ? void 0 : dateStyle.backgroundColor,
|
|
1546
|
+
} }), text));
|
|
1496
1547
|
}))));
|
|
1497
1548
|
}
|
|
1498
1549
|
renderCalendarBody() {
|
|
@@ -1710,6 +1761,7 @@ const Datetime = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1710
1761
|
"firstDayOfWeek": [2, "first-day-of-week"],
|
|
1711
1762
|
"titleSelectedDatesFormatter": [16],
|
|
1712
1763
|
"multiple": [4],
|
|
1764
|
+
"highlightedDates": [16],
|
|
1713
1765
|
"value": [1025],
|
|
1714
1766
|
"showDefaultTitle": [4, "show-default-title"],
|
|
1715
1767
|
"showDefaultButtons": [4, "show-default-buttons"],
|
|
@@ -96,7 +96,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
96
96
|
async connectedCallback() {
|
|
97
97
|
// TODO: connectedCallback is fired in CE build
|
|
98
98
|
// before WC is defined. This needs to be fixed in Stencil.
|
|
99
|
-
if (typeof customElements !== 'undefined') {
|
|
99
|
+
if (typeof customElements !== 'undefined' && customElements != null) {
|
|
100
100
|
await customElements.whenDefined('ion-menu');
|
|
101
101
|
}
|
|
102
102
|
if (this.type === undefined) {
|
|
@@ -433,6 +433,22 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
433
433
|
if (this.backdropEl) {
|
|
434
434
|
this.backdropEl.classList.add(SHOW_BACKDROP);
|
|
435
435
|
}
|
|
436
|
+
// add css class and hide content behind menu from screen readers
|
|
437
|
+
if (this.contentEl) {
|
|
438
|
+
this.contentEl.classList.add(MENU_CONTENT_OPEN);
|
|
439
|
+
/**
|
|
440
|
+
* When the menu is open and overlaying the main
|
|
441
|
+
* content, the main content should not be announced
|
|
442
|
+
* by the screenreader as the menu is the main
|
|
443
|
+
* focus. This is useful with screenreaders that have
|
|
444
|
+
* "read from top" gestures that read the entire
|
|
445
|
+
* page from top to bottom when activated.
|
|
446
|
+
* This should be done before the animation starts
|
|
447
|
+
* so that users cannot accidentally scroll
|
|
448
|
+
* the content while dragging a menu open.
|
|
449
|
+
*/
|
|
450
|
+
this.contentEl.setAttribute('aria-hidden', 'true');
|
|
451
|
+
}
|
|
436
452
|
this.blocker.block();
|
|
437
453
|
this.isAnimating = true;
|
|
438
454
|
if (shouldOpen) {
|
|
@@ -455,19 +471,6 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
455
471
|
this.blocker.unblock();
|
|
456
472
|
}
|
|
457
473
|
if (isOpen) {
|
|
458
|
-
// add css class and hide content behind menu from screen readers
|
|
459
|
-
if (this.contentEl) {
|
|
460
|
-
this.contentEl.classList.add(MENU_CONTENT_OPEN);
|
|
461
|
-
/**
|
|
462
|
-
* When the menu is open and overlaying the main
|
|
463
|
-
* content, the main content should not be announced
|
|
464
|
-
* by the screenreader as the menu is the main
|
|
465
|
-
* focus. This is useful with screenreaders that have
|
|
466
|
-
* "read from top" gestures that read the entire
|
|
467
|
-
* page from top to bottom when activated.
|
|
468
|
-
*/
|
|
469
|
-
this.contentEl.setAttribute('aria-hidden', 'true');
|
|
470
|
-
}
|
|
471
474
|
// emit open event
|
|
472
475
|
this.ionDidOpen.emit();
|
|
473
476
|
/**
|
|
@@ -4,7 +4,7 @@ import { f as findClosestIonContent, i as isIonContent, d as disableContentScrol
|
|
|
4
4
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate.js';
|
|
5
5
|
import { g as getElementRoot, j as clamp, r as raf, e as inheritAttributes } from './helpers.js';
|
|
6
6
|
import { KEYBOARD_DID_OPEN } from './keyboard.js';
|
|
7
|
-
import {
|
|
7
|
+
import { a as printIonWarning } from './index4.js';
|
|
8
8
|
import { w as win } from './index10.js';
|
|
9
9
|
import { G as GESTURE, B as BACKDROP, p as prepareOverlay, a as present, b as activeAnimations, d as dismiss, e as eventMethod } from './overlays.js';
|
|
10
10
|
import { g as getClassMap } from './theme.js';
|
|
@@ -1280,7 +1280,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1280
1280
|
this.gesture.enable(enable);
|
|
1281
1281
|
}
|
|
1282
1282
|
else if (enable) {
|
|
1283
|
-
|
|
1283
|
+
this.initSwipeToClose();
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
breakpointsChanged(breakpoints) {
|
|
@@ -1409,6 +1409,37 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1409
1409
|
currentBreakpoint: this.initialBreakpoint,
|
|
1410
1410
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
1411
1411
|
});
|
|
1412
|
+
/* tslint:disable-next-line */
|
|
1413
|
+
if (typeof window !== 'undefined') {
|
|
1414
|
+
/**
|
|
1415
|
+
* This needs to be setup before any
|
|
1416
|
+
* non-transition async work so it can be dereferenced
|
|
1417
|
+
* in the dismiss method. The dismiss method
|
|
1418
|
+
* only waits for the entering transition
|
|
1419
|
+
* to finish. It does not wait for all of the `present`
|
|
1420
|
+
* method to resolve.
|
|
1421
|
+
*/
|
|
1422
|
+
this.keyboardOpenCallback = () => {
|
|
1423
|
+
if (this.gesture) {
|
|
1424
|
+
/**
|
|
1425
|
+
* When the native keyboard is opened and the webview
|
|
1426
|
+
* is resized, the gesture implementation will become unresponsive
|
|
1427
|
+
* and enter a free-scroll mode.
|
|
1428
|
+
*
|
|
1429
|
+
* When the keyboard is opened, we disable the gesture for
|
|
1430
|
+
* a single frame and re-enable once the contents have repositioned
|
|
1431
|
+
* from the keyboard placement.
|
|
1432
|
+
*/
|
|
1433
|
+
this.gesture.enable(false);
|
|
1434
|
+
raf(() => {
|
|
1435
|
+
if (this.gesture) {
|
|
1436
|
+
this.gesture.enable(true);
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1442
|
+
}
|
|
1412
1443
|
/**
|
|
1413
1444
|
* TODO (FW-937) - In the next major release of Ionic, all card modals
|
|
1414
1445
|
* will be swipeable by default. canDismiss will be used to determine if the
|
|
@@ -1434,30 +1465,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1434
1465
|
this.initSheetGesture();
|
|
1435
1466
|
}
|
|
1436
1467
|
else if (hasCardModal) {
|
|
1437
|
-
|
|
1438
|
-
}
|
|
1439
|
-
/* tslint:disable-next-line */
|
|
1440
|
-
if (typeof window !== 'undefined') {
|
|
1441
|
-
this.keyboardOpenCallback = () => {
|
|
1442
|
-
if (this.gesture) {
|
|
1443
|
-
/**
|
|
1444
|
-
* When the native keyboard is opened and the webview
|
|
1445
|
-
* is resized, the gesture implementation will become unresponsive
|
|
1446
|
-
* and enter a free-scroll mode.
|
|
1447
|
-
*
|
|
1448
|
-
* When the keyboard is opened, we disable the gesture for
|
|
1449
|
-
* a single frame and re-enable once the contents have repositioned
|
|
1450
|
-
* from the keyboard placement.
|
|
1451
|
-
*/
|
|
1452
|
-
this.gesture.enable(false);
|
|
1453
|
-
raf(() => {
|
|
1454
|
-
if (this.gesture) {
|
|
1455
|
-
this.gesture.enable(true);
|
|
1456
|
-
}
|
|
1457
|
-
});
|
|
1458
|
-
}
|
|
1459
|
-
};
|
|
1460
|
-
window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1468
|
+
this.initSwipeToClose();
|
|
1461
1469
|
}
|
|
1462
1470
|
this.currentTransition = undefined;
|
|
1463
1471
|
}
|
|
@@ -1570,6 +1578,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
1570
1578
|
/* tslint:disable-next-line */
|
|
1571
1579
|
if (typeof window !== 'undefined' && this.keyboardOpenCallback) {
|
|
1572
1580
|
window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
|
|
1581
|
+
this.keyboardOpenCallback = undefined;
|
|
1573
1582
|
}
|
|
1574
1583
|
/**
|
|
1575
1584
|
* When using an inline modal
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { g as getIonMode } from './ionic-global.js';
|
|
3
3
|
import { f as findClosestIonContent, d as disableContentScrollY, r as resetContentScrollY } from './index5.js';
|
|
4
4
|
import { j as clamp, k as debounceEvent, i as inheritAriaAttributes, l as getAriaLabel, c as renderHiddenInput } from './helpers.js';
|
|
5
|
-
import {
|
|
5
|
+
import { a as printIonWarning } from './index4.js';
|
|
6
6
|
import { i as isRTL } from './dir.js';
|
|
7
7
|
import { c as createColorClasses, h as hostContext } from './theme.js';
|
|
8
8
|
|
|
@@ -41,7 +41,7 @@ const SplitPane = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
41
41
|
async connectedCallback() {
|
|
42
42
|
// TODO: connectedCallback is fired in CE build
|
|
43
43
|
// before WC is defined. This needs to be fixed in Stencil.
|
|
44
|
-
if (typeof customElements !== 'undefined') {
|
|
44
|
+
if (typeof customElements !== 'undefined' && customElements != null) {
|
|
45
45
|
await customElements.whenDefined('ion-split-pane');
|
|
46
46
|
}
|
|
47
47
|
this.styleChildren();
|
|
@@ -136,7 +136,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
componentWillLoad() {
|
|
139
|
-
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['data-form-type', 'title']));
|
|
139
|
+
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['data-form-type', 'title', 'tabindex']));
|
|
140
140
|
}
|
|
141
141
|
componentDidLoad() {
|
|
142
142
|
this.runAutoGrow();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as config, g as getIonMode } from './ionic-global.js';
|
|
3
|
+
import { a as printIonWarning } from './index4.js';
|
|
3
4
|
import { i as isCancel, p as prepareOverlay, a as present, d as dismiss, e as eventMethod, s as safeCall } from './overlays.js';
|
|
4
5
|
import { s as sanitizeDOMString } from './index3.js';
|
|
5
6
|
import { g as getClassMap, c as createColorClasses } from './theme.js';
|
|
@@ -113,9 +114,9 @@ const mdLeaveAnimation = (baseEl) => {
|
|
|
113
114
|
return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);
|
|
114
115
|
};
|
|
115
116
|
|
|
116
|
-
const toastIosCss = ":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;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right: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);left:var(--start);right:var(--end);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);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-icon{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--start:10px;--end:10px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}@supports (backdrop-filter: blur(0)){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-middle{opacity:0.01}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-content{padding-left:15px;padding-right:15px;padding-top:15px;padding-bottom:15px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;height:44px;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:17px;font-weight:500;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";
|
|
117
|
+
const toastIosCss = ":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;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right: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);left:var(--start);right:var(--end);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);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-icon{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--start:10px;--end:10px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}@supports (backdrop-filter: blur(0)){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);backdrop-filter:saturate(180%) blur(20px)}}.toast-wrapper.toast-top{transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-middle{opacity:0.01}.toast-wrapper.toast-bottom{transform:translate3d(0, 100%, 0);bottom:0}.toast-content{padding-left:15px;padding-right:15px;padding-top:15px;padding-bottom:15px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;height:44px;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:17px;font-weight:500;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}";
|
|
117
118
|
|
|
118
|
-
const toastMdCss = ":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;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right: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);left:var(--start);right:var(--end);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);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-icon{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-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, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.toast-content{padding-left:16px;padding-right:16px;padding-top:14px;padding-bottom:14px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.toast-header{margin-bottom:2px;font-weight:500;line-height:20px}.toast-message{line-height:20px}.toast-button-group-start{margin-left:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button-group-start{margin-left:unset;-webkit-margin-start:8px;margin-inline-start:8px}}.toast-button-group-end{margin-right:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button-group-end{margin-right:unset;-webkit-margin-end:8px;margin-inline-end:8px}}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:14px;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;padding-left:9px;padding-right:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button-icon-only{padding-left:unset;padding-right:unset;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px}}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";
|
|
119
|
+
const toastMdCss = ":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;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right: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);left:var(--start);right:var(--end);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);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:flex;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-layout-stacked .toast-container{flex-wrap:wrap}.toast-layout-baseline .toast-content{display:flex;flex:1;flex-direction:column;justify-content:center}.toast-icon{margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-icon{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}.toast-message{flex:1;white-space:var(--white-space)}.toast-button-group{display:flex}.toast-layout-stacked .toast-button-group{justify-content:end;width:100%}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon,.toast-button-icon{font-size:1.4em}.toast-button-inner{display:flex;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-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, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.toast-content{padding-left:16px;padding-right:16px;padding-top:14px;padding-bottom:14px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.toast-header{margin-bottom:2px;font-weight:500;line-height:20px}.toast-message{line-height:20px}.toast-layout-baseline .toast-button-group-start{margin-left:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-layout-baseline .toast-button-group-start{margin-left:unset;-webkit-margin-start:8px;margin-inline-start:8px}}.toast-layout-stacked .toast-button-group-start{margin-right:8px;margin-top:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-layout-stacked .toast-button-group-start{margin-right:unset;-webkit-margin-end:8px;margin-inline-end:8px}}.toast-layout-baseline .toast-button-group-end{margin-right:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-layout-baseline .toast-button-group-end{margin-right:unset;-webkit-margin-end:8px;margin-inline-end:8px}}.toast-layout-stacked .toast-button-group-end{margin-right:8px;margin-bottom:8px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-layout-stacked .toast-button-group-end{margin-right:unset;-webkit-margin-end:8px;margin-inline-end:8px}}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:14px;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;padding-left:9px;padding-right:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toast-button-icon-only{padding-left:unset;padding-right:unset;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px}}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}";
|
|
119
120
|
|
|
120
121
|
const Toast = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
121
122
|
constructor() {
|
|
@@ -132,6 +133,14 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
132
133
|
* until `dismiss()` is called.
|
|
133
134
|
*/
|
|
134
135
|
this.duration = config.getNumber('toastDuration', 0);
|
|
136
|
+
/**
|
|
137
|
+
* Defines how the message and buttons are laid out in the toast.
|
|
138
|
+
* 'baseline': The message and the buttons will appear on the same line.
|
|
139
|
+
* Message text may wrap within the message container.
|
|
140
|
+
* 'stacked': The buttons containers and message will stack on top
|
|
141
|
+
* of each other. Use this if you have long text in your buttons.
|
|
142
|
+
*/
|
|
143
|
+
this.layout = 'baseline';
|
|
135
144
|
/**
|
|
136
145
|
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
137
146
|
*/
|
|
@@ -245,6 +254,7 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
245
254
|
return (h("div", { class: buttonGroupsClasses }, buttons.map((b) => (h("button", { type: "button", class: buttonClass(b), tabIndex: 0, onClick: () => this.buttonClick(b), part: "button" }, h("div", { class: "toast-button-inner" }, b.icon && (h("ion-icon", { icon: b.icon, slot: b.text === undefined ? 'icon-only' : undefined, class: "toast-button-icon" })), b.text), mode === 'md' && (h("ion-ripple-effect", { type: b.icon !== undefined && b.text === undefined ? 'unbounded' : 'bounded' })))))));
|
|
246
255
|
}
|
|
247
256
|
render() {
|
|
257
|
+
const { layout, el } = this;
|
|
248
258
|
const allButtons = this.getButtons();
|
|
249
259
|
const startButtons = allButtons.filter((b) => b.side === 'start');
|
|
250
260
|
const endButtons = allButtons.filter((b) => b.side !== 'start');
|
|
@@ -252,8 +262,16 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
252
262
|
const wrapperClass = {
|
|
253
263
|
'toast-wrapper': true,
|
|
254
264
|
[`toast-${this.position}`]: true,
|
|
265
|
+
[`toast-layout-${layout}`]: true,
|
|
255
266
|
};
|
|
256
267
|
const role = allButtons.length > 0 ? 'dialog' : 'status';
|
|
268
|
+
/**
|
|
269
|
+
* Stacked buttons are only meant to be
|
|
270
|
+
* used with one type of button.
|
|
271
|
+
*/
|
|
272
|
+
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
273
|
+
printIonWarning('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.', el);
|
|
274
|
+
}
|
|
257
275
|
return (h(Host, Object.assign({ "aria-live": "polite", "aria-atomic": "true", role: role, tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
258
276
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
259
277
|
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { class: wrapperClass }, h("div", { class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { class: "toast-content" }, this.header !== undefined && (h("div", { class: "toast-header", part: "header" }, this.header)), this.message !== undefined && (h("div", { class: "toast-message", part: "message", innerHTML: sanitizeDOMString(this.message) }))), this.renderButtons(endButtons, 'end')))));
|
|
@@ -271,6 +289,7 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
271
289
|
"cssClass": [1, "css-class"],
|
|
272
290
|
"duration": [2],
|
|
273
291
|
"header": [1],
|
|
292
|
+
"layout": [1],
|
|
274
293
|
"message": [1],
|
|
275
294
|
"keyboardClose": [4, "keyboard-close"],
|
|
276
295
|
"position": [1],
|
package/dist/components/item.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/
|
|
|
2
2
|
import { f as chevronForward } from './index2.js';
|
|
3
3
|
import { g as getIonMode } from './ionic-global.js';
|
|
4
4
|
import { e as inheritAttributes, r as raf } from './helpers.js';
|
|
5
|
-
import {
|
|
5
|
+
import { p as printIonError } from './index4.js';
|
|
6
6
|
import { h as hostContext, c as createColorClasses, o as openURL } from './theme.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './icon.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './note.js';
|
|
@@ -23,6 +23,7 @@ const createController = (tagName) => {
|
|
|
23
23
|
const alertController = /*@__PURE__*/ createController('ion-alert');
|
|
24
24
|
const actionSheetController = /*@__PURE__*/ createController('ion-action-sheet');
|
|
25
25
|
const popoverController = /*@__PURE__*/ createController('ion-popover');
|
|
26
|
+
const toastController = /*@__PURE__*/ createController('ion-toast');
|
|
26
27
|
const prepareOverlay = (el) => {
|
|
27
28
|
if (typeof document !== 'undefined') {
|
|
28
29
|
connectListeners(document);
|
|
@@ -425,6 +426,13 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
425
426
|
*/
|
|
426
427
|
overlay.el.classList.add('overlay-hidden');
|
|
427
428
|
overlay.el.style.removeProperty('pointer-events');
|
|
429
|
+
/**
|
|
430
|
+
* Clear any focus trapping references
|
|
431
|
+
* when the overlay is dismissed.
|
|
432
|
+
*/
|
|
433
|
+
if (overlay.el.lastFocus !== undefined) {
|
|
434
|
+
overlay.el.lastFocus = undefined;
|
|
435
|
+
}
|
|
428
436
|
}
|
|
429
437
|
catch (err) {
|
|
430
438
|
console.error(err);
|
|
@@ -499,4 +507,4 @@ const safeCall = (handler, arg) => {
|
|
|
499
507
|
const BACKDROP = 'backdrop';
|
|
500
508
|
const GESTURE = 'gesture';
|
|
501
509
|
|
|
502
|
-
export { BACKDROP as B, GESTURE as G, present as a, activeAnimations as b, popoverController as c, dismiss as d, eventMethod as e, actionSheetController as f, getOverlay as g, alertController as h, isCancel as i, focusFirstDescendant as j, prepareOverlay as p, safeCall as s };
|
|
510
|
+
export { BACKDROP as B, GESTURE as G, present as a, activeAnimations as b, popoverController as c, dismiss as d, eventMethod as e, actionSheetController as f, getOverlay as g, alertController as h, isCancel as i, focusFirstDescendant as j, prepareOverlay as p, safeCall as s, toastController as t };
|
|
@@ -305,11 +305,10 @@ const PickerColumnCmp = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
305
305
|
}
|
|
306
306
|
render() {
|
|
307
307
|
const col = this.col;
|
|
308
|
-
const Button = 'button';
|
|
309
308
|
const mode = getIonMode(this);
|
|
310
309
|
return (h(Host, { class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
|
|
311
310
|
'max-width': this.col.columnWidth,
|
|
312
|
-
} }, col.prefix && (h("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h(
|
|
311
|
+
} }, col.prefix && (h("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
|
|
313
312
|
}
|
|
314
313
|
get el() { return this; }
|
|
315
314
|
static get watchers() { return {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { g as getIonMode, a as isPlatform } from './ionic-global.js';
|
|
3
3
|
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate.js';
|
|
4
4
|
import { r as raf, g as getElementRoot, a as addEventListener } from './helpers.js';
|
|
5
|
-
import {
|
|
5
|
+
import { a as printIonWarning } from './index4.js';
|
|
6
6
|
import { B as BACKDROP, p as prepareOverlay, d as dismiss, e as eventMethod, a as present, j as focusFirstDescendant } from './overlays.js';
|
|
7
7
|
import { g as getClassMap } from './theme.js';
|
|
8
8
|
import { d as deepReady } from './index7.js';
|