@ionic/core 7.3.2-dev.11693321763.15a54694 → 7.3.2-dev.11693507138.1f9ed625
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/checkbox.js +6 -3
- package/components/data.js +31 -7
- package/components/framework-delegate.js +2 -21
- package/components/ion-datetime-button.js +3 -0
- package/components/ion-datetime.js +106 -81
- package/components/ion-modal.js +1 -1
- package/components/ion-range.js +2 -2
- package/components/ion-toggle.js +6 -3
- package/components/popover.js +1 -1
- package/components/radio.js +6 -3
- package/dist/cjs/{data-967b9c15.js → data-db832785.js} +31 -7
- package/dist/cjs/{framework-delegate-c0873a6f.js → framework-delegate-e8174951.js} +2 -21
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +2 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +5 -3
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +108 -84
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +3 -3
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +5 -3
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +5 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-5c1706ed.js → overlays-0ea06fcb.js} +1 -1
- package/dist/collection/components/checkbox/checkbox.ios.css +35 -0
- package/dist/collection/components/checkbox/checkbox.js +24 -4
- package/dist/collection/components/checkbox/checkbox.md.css +35 -0
- package/dist/collection/components/checkbox/test/item/checkbox.e2e.js +13 -0
- package/dist/collection/components/checkbox/test/label/checkbox.e2e.js +16 -0
- package/dist/collection/components/datetime/datetime.js +107 -84
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +15 -0
- package/dist/collection/components/datetime/test/set-value/datetime.e2e.js +9 -12
- package/dist/collection/components/datetime/utils/data.js +14 -6
- package/dist/collection/components/datetime/utils/parse.js +18 -1
- package/dist/collection/components/datetime-button/datetime-button.js +3 -0
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/radio/radio.ios.css +35 -0
- package/dist/collection/components/radio/radio.js +24 -4
- package/dist/collection/components/radio/radio.md.css +35 -0
- package/dist/collection/components/radio/test/item/radio.e2e.js +15 -0
- package/dist/collection/components/radio/test/label-placement/radio.e2e.js +20 -0
- package/dist/collection/components/range/range.ios.css +41 -1
- package/dist/collection/components/range/range.js +3 -3
- package/dist/collection/components/range/range.md.css +41 -1
- package/dist/collection/components/range/test/label/range.e2e.js +48 -0
- package/dist/collection/components/toggle/test/item/toggle.e2e.js +15 -0
- package/dist/collection/components/toggle/test/label/toggle.e2e.js +16 -0
- package/dist/collection/components/toggle/toggle.ios.css +35 -1
- package/dist/collection/components/toggle/toggle.js +24 -4
- package/dist/collection/components/toggle/toggle.md.css +35 -1
- package/dist/collection/utils/framework-delegate.js +2 -21
- package/dist/docs.json +115 -18
- package/dist/esm/{data-4b448e3a.js → data-009dbf15.js} +31 -7
- package/dist/esm/{framework-delegate-aa433dea.js → framework-delegate-2b76c681.js} +2 -21
- package/dist/esm/index.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +2 -2
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-checkbox.entry.js +5 -3
- package/dist/esm/ion-datetime-button.entry.js +4 -1
- package/dist/esm/ion-datetime_3.entry.js +108 -84
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +3 -3
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +5 -3
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +5 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-e1dadfe6.js → overlays-c3387ec0.js} +1 -1
- package/dist/esm-es5/data-009dbf15.js +4 -0
- package/dist/esm-es5/framework-delegate-2b76c681.js +4 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{overlays-e1dadfe6.js → overlays-c3387ec0.js} +1 -1
- package/dist/html.html-data.json +52 -4
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-84a95033.system.entry.js → p-06f1f560.system.entry.js} +1 -1
- package/dist/ionic/p-1f4adf06.system.entry.js +4 -0
- package/dist/ionic/{p-c759a704.entry.js → p-20087c90.entry.js} +1 -1
- package/dist/ionic/{p-98ebc376.entry.js → p-229df0d8.entry.js} +1 -1
- package/dist/ionic/{p-51669f1e.system.entry.js → p-2936ec7f.system.entry.js} +1 -1
- package/dist/ionic/{p-e44233f5.entry.js → p-29b3e70a.entry.js} +1 -1
- package/dist/ionic/{p-2bff71d5.system.entry.js → p-2bc49e5d.system.entry.js} +1 -1
- package/dist/ionic/{p-f2c667c9.system.entry.js → p-2da3e015.system.entry.js} +1 -1
- package/dist/ionic/p-2f8bea16.entry.js +4 -0
- package/dist/ionic/p-40138199.entry.js +4 -0
- package/dist/ionic/{p-7c9dd24d.entry.js → p-423d5a4d.entry.js} +1 -1
- package/dist/ionic/p-44ef7224.system.js +4 -0
- package/dist/ionic/p-4ca1ce6b.system.entry.js +4 -0
- package/dist/ionic/{p-f7faa32d.entry.js → p-5c96dc4e.entry.js} +1 -1
- package/dist/ionic/{p-582dc7c1.js → p-5ef91692.js} +1 -1
- package/dist/ionic/{p-f9708a54.entry.js → p-61769039.entry.js} +1 -1
- package/dist/ionic/{p-d3b8aebf.entry.js → p-67b891af.entry.js} +1 -1
- package/dist/ionic/{p-d1d3b740.system.entry.js → p-6b9bf14c.system.entry.js} +1 -1
- package/dist/ionic/p-6da27ab8.system.entry.js +4 -0
- package/dist/ionic/p-721933ff.system.js +1 -1
- package/dist/ionic/{p-f789b7fa.entry.js → p-74723f41.entry.js} +1 -1
- package/dist/ionic/{p-28f5715a.system.entry.js → p-74bd26b8.system.entry.js} +1 -1
- package/dist/ionic/p-7cfd253c.js +4 -0
- package/dist/ionic/{p-45ee211b.system.entry.js → p-8074bdd7.system.entry.js} +1 -1
- package/dist/ionic/{p-b32742f3.system.js → p-81b46714.system.js} +1 -1
- package/dist/ionic/p-86c5c320.entry.js +4 -0
- package/dist/ionic/{p-613d4042.system.js → p-8d9475b5.system.js} +1 -1
- package/dist/ionic/{p-d693e765.system.entry.js → p-8fa43732.system.entry.js} +1 -1
- package/dist/ionic/p-90ec5785.system.entry.js +4 -0
- package/dist/ionic/{p-091cd81e.entry.js → p-958bde76.entry.js} +1 -1
- package/dist/ionic/{p-b3a58769.entry.js → p-9b3c3564.entry.js} +1 -1
- package/dist/ionic/p-af986299.system.entry.js +4 -0
- package/dist/ionic/p-b321c999.entry.js +4 -0
- package/dist/ionic/p-b34c1ae1.js +4 -0
- package/dist/ionic/{p-5c17f888.entry.js → p-c0d1e5a1.entry.js} +1 -1
- package/dist/ionic/{p-dab7745f.system.entry.js → p-ccea9adc.system.entry.js} +1 -1
- package/dist/ionic/{p-0b68c41d.system.entry.js → p-d1356034.system.entry.js} +1 -1
- package/dist/ionic/{p-d9eb4632.system.entry.js → p-d5db0834.system.entry.js} +1 -1
- package/dist/ionic/{p-79e3f0b6.entry.js → p-d8538837.entry.js} +1 -1
- package/dist/ionic/p-d8a0267b.system.entry.js +4 -0
- package/dist/ionic/{p-8843b046.system.js → p-db46fc66.system.js} +1 -1
- package/dist/ionic/p-f5c19164.entry.js +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +8 -1
- package/dist/types/components/datetime/datetime.d.ts +17 -10
- package/dist/types/components/datetime/utils/data.d.ts +1 -1
- package/dist/types/components/datetime/utils/parse.d.ts +3 -3
- package/dist/types/components/radio/radio.d.ts +8 -1
- package/dist/types/components/range/range.d.ts +2 -1
- package/dist/types/components/toast/toast-interface.d.ts +3 -0
- package/dist/types/components/toggle/toggle.d.ts +8 -1
- package/dist/types/components.d.ts +40 -16
- package/hydrate/index.js +164 -122
- package/package.json +1 -1
- package/dist/collection/components/popover/test/async/popover.e2e.js +0 -20
- package/dist/esm-es5/data-4b448e3a.js +0 -4
- package/dist/esm-es5/framework-delegate-aa433dea.js +0 -4
- package/dist/ionic/p-0053fe81.system.entry.js +0 -4
- package/dist/ionic/p-2cdcd6f2.entry.js +0 -4
- package/dist/ionic/p-3565c8a0.entry.js +0 -4
- package/dist/ionic/p-5b88f780.entry.js +0 -4
- package/dist/ionic/p-601fd53c.js +0 -4
- package/dist/ionic/p-98b618ce.system.entry.js +0 -4
- package/dist/ionic/p-b1e8f045.entry.js +0 -4
- package/dist/ionic/p-b287ab05.js +0 -4
- package/dist/ionic/p-b3cfc6e1.system.entry.js +0 -4
- package/dist/ionic/p-b54a1fcb.system.entry.js +0 -4
- package/dist/ionic/p-cc8910e7.system.js +0 -4
- package/dist/ionic/p-e53b8af4.system.entry.js +0 -4
- package/dist/ionic/p-f78e60a5.entry.js +0 -4
- package/dist/ionic/p-fd42994b.system.entry.js +0 -4
|
@@ -6,7 +6,7 @@ import { a as addEventListener, c as componentOnReady } from './helpers-3379ba19
|
|
|
6
6
|
import { a as printIonError } from './index-595d62c9.js';
|
|
7
7
|
import { c as createColorClasses } from './theme-17531cdf.js';
|
|
8
8
|
import { b as getIonMode } from './ionic-global-1ef19007.js';
|
|
9
|
-
import { q as parseDate, t as getToday, J as is24Hour, S as getLocalizedDateTime, G as getMonthAndYear, K as getLocalizedTime, T as getMonthDayAndYear } from './data-
|
|
9
|
+
import { q as parseDate, t as getToday, J as is24Hour, S as getLocalizedDateTime, G as getMonthAndYear, K as getLocalizedTime, T as getMonthDayAndYear } from './data-009dbf15.js';
|
|
10
10
|
|
|
11
11
|
const iosDatetimeButtonCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host button{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:0px;margin-bottom:0px;position:relative;-webkit-transition:150ms color ease-in-out;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}";
|
|
12
12
|
|
|
@@ -49,6 +49,9 @@ const DatetimeButton = class {
|
|
|
49
49
|
* to today's date and time if no value is set.
|
|
50
50
|
*/
|
|
51
51
|
const parsedDatetimes = parseDate(parsedValues.length > 0 ? parsedValues : [getToday()]);
|
|
52
|
+
if (!parsedDatetimes) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
52
55
|
/**
|
|
53
56
|
* If developers incorrectly use multiple="true"
|
|
54
57
|
* with non "date" datetimes, then just select
|
|
@@ -9,11 +9,11 @@ import { i as isRTL } from './dir-912e3e13.js';
|
|
|
9
9
|
import { c as createColorClasses, g as getClassMap } from './theme-17531cdf.js';
|
|
10
10
|
import { c as chevronBack, o as chevronForward, l as chevronDown, p as caretUpSharp, q as caretDownSharp } from './index-ecfc2c9f.js';
|
|
11
11
|
import { b as getIonMode } from './ionic-global-1ef19007.js';
|
|
12
|
-
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 getDaysOfWeek, G as getMonthAndYear, 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-
|
|
13
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-
|
|
12
|
+
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 getDaysOfWeek, G as getMonthAndYear, 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-009dbf15.js';
|
|
13
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-c3387ec0.js';
|
|
14
14
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
15
15
|
import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-6447af60.js';
|
|
16
|
-
import './framework-delegate-
|
|
16
|
+
import './framework-delegate-2b76c681.js';
|
|
17
17
|
import './hardware-back-button-39299f84.js';
|
|
18
18
|
import './index-7a14ecec.js';
|
|
19
19
|
import './capacitor-b4979570.js';
|
|
@@ -201,11 +201,6 @@ const Datetime = class {
|
|
|
201
201
|
this.ionRender = createEvent(this, "ionRender", 7);
|
|
202
202
|
this.inputId = `ion-dt-${datetimeIds++}`;
|
|
203
203
|
this.prevPresentation = null;
|
|
204
|
-
/**
|
|
205
|
-
* Duplicate reference to `activeParts` that does not trigger a re-render of the component.
|
|
206
|
-
* Allows caching an instance of the `activeParts` in between render cycles.
|
|
207
|
-
*/
|
|
208
|
-
this.activePartsClone = [];
|
|
209
204
|
this.warnIfIncorrectValueUsage = () => {
|
|
210
205
|
const { multiple, value } = this;
|
|
211
206
|
if (!multiple && Array.isArray(value)) {
|
|
@@ -233,9 +228,9 @@ const Datetime = class {
|
|
|
233
228
|
* data. This should be used when rendering an
|
|
234
229
|
* interface in an environment where the `value`
|
|
235
230
|
* may not be set. This function works
|
|
236
|
-
* by returning the first selected date
|
|
237
|
-
*
|
|
238
|
-
*
|
|
231
|
+
* by returning the first selected date and then
|
|
232
|
+
* falling back to defaultParts if no active date
|
|
233
|
+
* is selected.
|
|
239
234
|
*/
|
|
240
235
|
this.getActivePartsWithFallback = () => {
|
|
241
236
|
var _a;
|
|
@@ -243,8 +238,8 @@ const Datetime = class {
|
|
|
243
238
|
return (_a = this.getActivePart()) !== null && _a !== void 0 ? _a : defaultParts;
|
|
244
239
|
};
|
|
245
240
|
this.getActivePart = () => {
|
|
246
|
-
const {
|
|
247
|
-
return Array.isArray(
|
|
241
|
+
const { activeParts } = this;
|
|
242
|
+
return Array.isArray(activeParts) ? activeParts[0] : activeParts;
|
|
248
243
|
};
|
|
249
244
|
this.closeParentOverlay = () => {
|
|
250
245
|
const popoverOrModal = this.el.closest('ion-modal, ion-popover');
|
|
@@ -256,7 +251,7 @@ const Datetime = class {
|
|
|
256
251
|
this.workingParts = Object.assign({}, parts);
|
|
257
252
|
};
|
|
258
253
|
this.setActiveParts = (parts, removeDate = false) => {
|
|
259
|
-
const { multiple, minParts, maxParts,
|
|
254
|
+
const { multiple, minParts, maxParts, activeParts } = this;
|
|
260
255
|
/**
|
|
261
256
|
* When setting the active parts, it is possible
|
|
262
257
|
* to set invalid data. For example,
|
|
@@ -270,16 +265,7 @@ const Datetime = class {
|
|
|
270
265
|
const validatedParts = validateParts(parts, minParts, maxParts);
|
|
271
266
|
this.setWorkingParts(validatedParts);
|
|
272
267
|
if (multiple) {
|
|
273
|
-
|
|
274
|
-
* We read from activePartsClone here because valueChanged() only updates that,
|
|
275
|
-
* so it's the more reliable source of truth. If we read from activeParts, then
|
|
276
|
-
* if you click July 1, manually set the value to July 2, and then click July 3,
|
|
277
|
-
* the new value would be [July 1, July 3], ignoring the value set.
|
|
278
|
-
*
|
|
279
|
-
* We can then pass the new value to activeParts (rather than activePartsClone)
|
|
280
|
-
* since the clone will be updated automatically by activePartsChanged().
|
|
281
|
-
*/
|
|
282
|
-
const activePartsArray = Array.isArray(activePartsClone) ? activePartsClone : [activePartsClone];
|
|
268
|
+
const activePartsArray = Array.isArray(activeParts) ? activeParts : [activeParts];
|
|
283
269
|
if (removeDate) {
|
|
284
270
|
this.activeParts = activePartsArray.filter((p) => !isSameDay(p, validatedParts));
|
|
285
271
|
}
|
|
@@ -496,6 +482,19 @@ const Datetime = class {
|
|
|
496
482
|
const monthBox = month.getBoundingClientRect();
|
|
497
483
|
if (Math.abs(monthBox.x - box.x) > 2)
|
|
498
484
|
return;
|
|
485
|
+
/**
|
|
486
|
+
* If we're force-rendering a month, assume we've
|
|
487
|
+
* scrolled to that and return it.
|
|
488
|
+
*
|
|
489
|
+
* If forceRenderDate is ever used in a context where the
|
|
490
|
+
* forced month is not immediately auto-scrolled to, this
|
|
491
|
+
* should be updated to also check whether `month` has the
|
|
492
|
+
* same month and year as the forced date.
|
|
493
|
+
*/
|
|
494
|
+
const { forceRenderDate } = this;
|
|
495
|
+
if (forceRenderDate !== undefined) {
|
|
496
|
+
return { month: forceRenderDate.month, year: forceRenderDate.year, day: forceRenderDate.day };
|
|
497
|
+
}
|
|
499
498
|
/**
|
|
500
499
|
* From here, we can determine if the start
|
|
501
500
|
* month or the end month was scrolled into view.
|
|
@@ -550,6 +549,9 @@ const Datetime = class {
|
|
|
550
549
|
this.setWorkingParts(Object.assign(Object.assign({}, this.workingParts), { month, day: day, year }));
|
|
551
550
|
calendarBodyRef.scrollLeft = workingMonth.clientWidth * (isRTL(this.el) ? -1 : 1);
|
|
552
551
|
calendarBodyRef.style.removeProperty('overflow');
|
|
552
|
+
if (this.resolveForceDateScrolling) {
|
|
553
|
+
this.resolveForceDateScrolling();
|
|
554
|
+
}
|
|
553
555
|
});
|
|
554
556
|
};
|
|
555
557
|
/**
|
|
@@ -604,10 +606,17 @@ const Datetime = class {
|
|
|
604
606
|
}
|
|
605
607
|
};
|
|
606
608
|
this.processValue = (value) => {
|
|
607
|
-
const hasValue = value !== null && value !== undefined;
|
|
609
|
+
const hasValue = value !== null && value !== undefined && (!Array.isArray(value) || value.length > 0);
|
|
608
610
|
const valueToProcess = hasValue ? parseDate(value) : this.defaultParts;
|
|
609
|
-
const { minParts, maxParts } = this;
|
|
611
|
+
const { minParts, maxParts, workingParts, el } = this;
|
|
610
612
|
this.warnIfIncorrectValueUsage();
|
|
613
|
+
/**
|
|
614
|
+
* Return early if the value wasn't parsed correctly, such as
|
|
615
|
+
* if an improperly formatted date string was provided.
|
|
616
|
+
*/
|
|
617
|
+
if (!valueToProcess) {
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
611
620
|
/**
|
|
612
621
|
* Datetime should only warn of out of bounds values
|
|
613
622
|
* if set by the user. If the `value` is undefined,
|
|
@@ -625,16 +634,9 @@ const Datetime = class {
|
|
|
625
634
|
* that the values don't necessarily have to be in order.
|
|
626
635
|
*/
|
|
627
636
|
const singleValue = Array.isArray(valueToProcess) ? valueToProcess[0] : valueToProcess;
|
|
628
|
-
const
|
|
637
|
+
const targetValue = clampDate(singleValue, minParts, maxParts);
|
|
638
|
+
const { month, day, year, hour, minute } = targetValue;
|
|
629
639
|
const ampm = parseAmPm(hour);
|
|
630
|
-
this.setWorkingParts({
|
|
631
|
-
month,
|
|
632
|
-
day,
|
|
633
|
-
year,
|
|
634
|
-
hour,
|
|
635
|
-
minute,
|
|
636
|
-
ampm,
|
|
637
|
-
});
|
|
638
640
|
/**
|
|
639
641
|
* Since `activeParts` indicates a value that
|
|
640
642
|
* been explicitly selected either by the
|
|
@@ -664,6 +666,62 @@ const Datetime = class {
|
|
|
664
666
|
*/
|
|
665
667
|
this.activeParts = [];
|
|
666
668
|
}
|
|
669
|
+
/**
|
|
670
|
+
* Only animate if:
|
|
671
|
+
* 1. We're using grid style (wheel style pickers should just jump to new value)
|
|
672
|
+
* 2. The month and/or year actually changed, and both are defined (otherwise there's nothing to animate to)
|
|
673
|
+
* 3. The calendar body is visible (prevents animation when in collapsed datetime-button, for example)
|
|
674
|
+
* 4. The month/year picker is not open (since you wouldn't see the animation anyway)
|
|
675
|
+
*/
|
|
676
|
+
const didChangeMonth = (month !== undefined && month !== workingParts.month) || (year !== undefined && year !== workingParts.year);
|
|
677
|
+
const bodyIsVisible = el.classList.contains('datetime-ready');
|
|
678
|
+
const { isGridStyle, showMonthAndYear } = this;
|
|
679
|
+
if (isGridStyle && didChangeMonth && bodyIsVisible && !showMonthAndYear) {
|
|
680
|
+
this.animateToDate(targetValue);
|
|
681
|
+
}
|
|
682
|
+
else {
|
|
683
|
+
/**
|
|
684
|
+
* We only need to do this if we didn't just animate to a new month,
|
|
685
|
+
* since that calls prevMonth/nextMonth which calls setWorkingParts for us.
|
|
686
|
+
*/
|
|
687
|
+
this.setWorkingParts({
|
|
688
|
+
month,
|
|
689
|
+
day,
|
|
690
|
+
year,
|
|
691
|
+
hour,
|
|
692
|
+
minute,
|
|
693
|
+
ampm,
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
this.animateToDate = async (targetValue) => {
|
|
698
|
+
const { workingParts } = this;
|
|
699
|
+
/**
|
|
700
|
+
* Tell other render functions that we need to force the
|
|
701
|
+
* target month to appear in place of the actual next/prev month.
|
|
702
|
+
* Because this is a State variable, a rerender will be triggered
|
|
703
|
+
* automatically, updating the rendered months.
|
|
704
|
+
*/
|
|
705
|
+
this.forceRenderDate = targetValue;
|
|
706
|
+
/**
|
|
707
|
+
* Flag that we've started scrolling to the forced date.
|
|
708
|
+
* The resolve function will be called by the datetime's
|
|
709
|
+
* scroll listener when it's done updating everything.
|
|
710
|
+
* This is a replacement for making prev/nextMonth async,
|
|
711
|
+
* since the logic we're waiting on is in a listener.
|
|
712
|
+
*/
|
|
713
|
+
const forceDateScrollingPromise = new Promise((resolve) => {
|
|
714
|
+
this.resolveForceDateScrolling = resolve;
|
|
715
|
+
});
|
|
716
|
+
/**
|
|
717
|
+
* Animate smoothly to the forced month. This will also update
|
|
718
|
+
* workingParts and correct the surrounding months for us.
|
|
719
|
+
*/
|
|
720
|
+
const targetMonthIsBefore = isBefore(targetValue, workingParts);
|
|
721
|
+
targetMonthIsBefore ? this.prevMonth() : this.nextMonth();
|
|
722
|
+
await forceDateScrollingPromise;
|
|
723
|
+
this.resolveForceDateScrolling = undefined;
|
|
724
|
+
this.forceRenderDate = undefined;
|
|
667
725
|
};
|
|
668
726
|
this.onFocus = () => {
|
|
669
727
|
this.ionFocus.emit();
|
|
@@ -719,6 +777,7 @@ const Datetime = class {
|
|
|
719
777
|
ampm: 'pm',
|
|
720
778
|
};
|
|
721
779
|
this.isTimePopoverOpen = false;
|
|
780
|
+
this.forceRenderDate = undefined;
|
|
722
781
|
this.color = 'primary';
|
|
723
782
|
this.name = this.inputId;
|
|
724
783
|
this.disabled = false;
|
|
@@ -758,6 +817,11 @@ const Datetime = class {
|
|
|
758
817
|
maxChanged() {
|
|
759
818
|
this.processMaxParts();
|
|
760
819
|
}
|
|
820
|
+
get isGridStyle() {
|
|
821
|
+
const { presentation, preferWheel } = this;
|
|
822
|
+
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
823
|
+
return hasDatePresentation && !preferWheel;
|
|
824
|
+
}
|
|
761
825
|
yearValuesChanged() {
|
|
762
826
|
this.parsedYearValues = convertToArrayOfNumbers(this.yearValues);
|
|
763
827
|
}
|
|
@@ -773,51 +837,13 @@ const Datetime = class {
|
|
|
773
837
|
minuteValuesChanged() {
|
|
774
838
|
this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues);
|
|
775
839
|
}
|
|
776
|
-
activePartsChanged() {
|
|
777
|
-
this.activePartsClone = this.activeParts;
|
|
778
|
-
}
|
|
779
840
|
/**
|
|
780
841
|
* Update the datetime value when the value changes
|
|
781
842
|
*/
|
|
782
|
-
valueChanged() {
|
|
783
|
-
const { value
|
|
843
|
+
async valueChanged() {
|
|
844
|
+
const { value } = this;
|
|
784
845
|
if (this.hasValue()) {
|
|
785
|
-
this.
|
|
786
|
-
/**
|
|
787
|
-
* Clones the value of the `activeParts` to the private clone, to update
|
|
788
|
-
* the date display on the current render cycle without causing another render.
|
|
789
|
-
*
|
|
790
|
-
* This allows us to update the current value's date/time display without
|
|
791
|
-
* refocusing or shifting the user's display (leaves the user in place).
|
|
792
|
-
*/
|
|
793
|
-
const valueDateParts = parseDate(value);
|
|
794
|
-
if (valueDateParts) {
|
|
795
|
-
warnIfValueOutOfBounds(valueDateParts, minParts, maxParts);
|
|
796
|
-
if (Array.isArray(valueDateParts)) {
|
|
797
|
-
this.activePartsClone = [...valueDateParts];
|
|
798
|
-
}
|
|
799
|
-
else {
|
|
800
|
-
const { month, day, year, hour, minute } = valueDateParts;
|
|
801
|
-
const ampm = hour != null ? (hour >= 12 ? 'pm' : 'am') : undefined;
|
|
802
|
-
this.activePartsClone = Object.assign(Object.assign({}, this.activeParts), { month,
|
|
803
|
-
day,
|
|
804
|
-
year,
|
|
805
|
-
hour,
|
|
806
|
-
minute,
|
|
807
|
-
ampm });
|
|
808
|
-
/**
|
|
809
|
-
* The working parts am/pm value must be updated when the value changes, to
|
|
810
|
-
* ensure the time picker hour column values are generated correctly.
|
|
811
|
-
*
|
|
812
|
-
* Note that we don't need to do this if valueDateParts is an array, since
|
|
813
|
-
* multiple="true" does not apply to time pickers.
|
|
814
|
-
*/
|
|
815
|
-
this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm }));
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
else {
|
|
819
|
-
printIonWarning(`Unable to parse date string: ${value}. Please provide a valid ISO 8601 datetime string.`);
|
|
820
|
-
}
|
|
846
|
+
this.processValue(value);
|
|
821
847
|
}
|
|
822
848
|
this.emitStyle();
|
|
823
849
|
this.ionValueChange.emit({ value });
|
|
@@ -1020,8 +1046,6 @@ const Datetime = class {
|
|
|
1020
1046
|
printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
|
|
1021
1047
|
}
|
|
1022
1048
|
}
|
|
1023
|
-
this.processMinParts();
|
|
1024
|
-
this.processMaxParts();
|
|
1025
1049
|
const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
|
|
1026
1050
|
const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
|
|
1027
1051
|
const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
|
|
@@ -1029,6 +1053,8 @@ const Datetime = class {
|
|
|
1029
1053
|
const dayValues = (this.parsedDayValues = convertToArrayOfNumbers(this.dayValues));
|
|
1030
1054
|
const todayParts = (this.todayParts = parseDate(getToday()));
|
|
1031
1055
|
this.defaultParts = getClosestValidDate(todayParts, monthValues, dayValues, yearValues, hourValues, minuteValues);
|
|
1056
|
+
this.processMinParts();
|
|
1057
|
+
this.processMaxParts();
|
|
1032
1058
|
this.processValue(this.value);
|
|
1033
1059
|
this.emitStyle();
|
|
1034
1060
|
}
|
|
@@ -1413,7 +1439,7 @@ const Datetime = class {
|
|
|
1413
1439
|
const { el, highlightedDates, isDateEnabled, multiple } = this;
|
|
1414
1440
|
const referenceParts = { month, day, year };
|
|
1415
1441
|
const isCalendarPadding = day === null;
|
|
1416
|
-
const { isActive, isToday, ariaLabel, ariaSelected, disabled, text } = getCalendarDayState(this.locale, referenceParts, this.
|
|
1442
|
+
const { isActive, isToday, ariaLabel, ariaSelected, disabled, text } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
|
|
1417
1443
|
const dateIsoString = convertDataToISO(referenceParts);
|
|
1418
1444
|
let isCalDayDisabled = isCalMonthDisabled || disabled;
|
|
1419
1445
|
if (!isCalDayDisabled && isDateEnabled !== undefined) {
|
|
@@ -1470,7 +1496,7 @@ const Datetime = class {
|
|
|
1470
1496
|
}))));
|
|
1471
1497
|
}
|
|
1472
1498
|
renderCalendarBody() {
|
|
1473
|
-
return (h("div", { class: "calendar-body ion-focusable", ref: (el) => (this.calendarBodyRef = el), tabindex: "0" }, generateMonths(this.workingParts).map(({ month, year }) => {
|
|
1499
|
+
return (h("div", { class: "calendar-body ion-focusable", ref: (el) => (this.calendarBodyRef = el), tabindex: "0" }, generateMonths(this.workingParts, this.forceRenderDate).map(({ month, year }) => {
|
|
1474
1500
|
return this.renderMonth(month, year);
|
|
1475
1501
|
})));
|
|
1476
1502
|
}
|
|
@@ -1625,14 +1651,13 @@ const Datetime = class {
|
|
|
1625
1651
|
}
|
|
1626
1652
|
}
|
|
1627
1653
|
render() {
|
|
1628
|
-
const { name, value, disabled, el, color, readonly, showMonthAndYear, preferWheel, presentation, size } = this;
|
|
1654
|
+
const { name, value, disabled, el, color, readonly, showMonthAndYear, preferWheel, presentation, size, isGridStyle, } = this;
|
|
1629
1655
|
const mode = getIonMode(this);
|
|
1630
1656
|
const isMonthAndYearPresentation = presentation === 'year' || presentation === 'month' || presentation === 'month-year';
|
|
1631
1657
|
const shouldShowMonthAndYear = showMonthAndYear || isMonthAndYearPresentation;
|
|
1632
1658
|
const monthYearPickerOpen = showMonthAndYear && !isMonthAndYearPresentation;
|
|
1633
1659
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1634
1660
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1635
|
-
const hasGrid = hasDatePresentation && !preferWheel;
|
|
1636
1661
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1637
1662
|
return (h(Host, { "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1638
1663
|
[mode]: true,
|
|
@@ -1643,7 +1668,7 @@ const Datetime = class {
|
|
|
1643
1668
|
[`datetime-presentation-${presentation}`]: true,
|
|
1644
1669
|
[`datetime-size-${size}`]: true,
|
|
1645
1670
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1646
|
-
[`datetime-grid`]:
|
|
1671
|
+
[`datetime-grid`]: isGridStyle,
|
|
1647
1672
|
})) }, this.renderDatetime(mode)));
|
|
1648
1673
|
}
|
|
1649
1674
|
get el() { return getElement(this); }
|
|
@@ -1656,7 +1681,6 @@ const Datetime = class {
|
|
|
1656
1681
|
"dayValues": ["dayValuesChanged"],
|
|
1657
1682
|
"hourValues": ["hourValuesChanged"],
|
|
1658
1683
|
"minuteValues": ["minuteValuesChanged"],
|
|
1659
|
-
"activeParts": ["activePartsChanged"],
|
|
1660
1684
|
"value": ["valueChanged"]
|
|
1661
1685
|
}; }
|
|
1662
1686
|
};
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-847f2fde.js';
|
|
5
5
|
import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
|
|
6
6
|
import { r as raf } from './helpers-3379ba19.js';
|
|
7
|
-
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-
|
|
7
|
+
import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-c3387ec0.js';
|
|
8
8
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
9
9
|
import { c as config, b as getIonMode } from './ionic-global-1ef19007.js';
|
|
10
10
|
import { c as createAnimation } from './animation-a1d9e088.js';
|
|
11
|
-
import './framework-delegate-
|
|
11
|
+
import './framework-delegate-2b76c681.js';
|
|
12
12
|
import './hardware-back-button-39299f84.js';
|
|
13
13
|
import './index-595d62c9.js';
|
|
14
14
|
import './index-7a14ecec.js';
|
|
@@ -7,13 +7,13 @@ import { d as doc } from './index-7a14ecec.js';
|
|
|
7
7
|
import { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
|
|
8
8
|
import { p as isEndSide, i as inheritAriaAttributes, o as assert, l as clamp } from './helpers-3379ba19.js';
|
|
9
9
|
import { m as menuController } from './index-b3e05099.js';
|
|
10
|
-
import { q as getOverlay } from './overlays-
|
|
10
|
+
import { q as getOverlay } from './overlays-c3387ec0.js';
|
|
11
11
|
import { c as config, b as getIonMode } from './ionic-global-1ef19007.js';
|
|
12
12
|
import { c as createColorClasses, h as hostContext } from './theme-17531cdf.js';
|
|
13
13
|
import { u as menuOutline, v as menuSharp } from './index-ecfc2c9f.js';
|
|
14
14
|
import './hardware-back-button-39299f84.js';
|
|
15
15
|
import './animation-a1d9e088.js';
|
|
16
|
-
import './framework-delegate-
|
|
16
|
+
import './framework-delegate-2b76c681.js';
|
|
17
17
|
import './index-595d62c9.js';
|
|
18
18
|
|
|
19
19
|
const menuIosCss = ":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;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);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}}@supports not (inset-inline-start: 0){:host(.menu-side-start) .menu-inner{left:0;right:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{left:unset;right:unset;left:auto;right:0}@supports selector(:dir(rtl)){:host(.menu-side-start) .menu-inner:dir(rtl){left:unset;right:unset;left:auto;right:0}}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}@supports (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}}@supports not (inset-inline-start: 0){:host(.menu-side-end) .menu-inner{left:auto;right:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{left:unset;right:unset;left:0;right:auto}@supports selector(:dir(rtl)){:host(.menu-side-end) .menu-inner:dir(rtl){left:unset;right:unset;left:0;right:auto}}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){width:var(--width);min-width:var(--min-width);max-width:var(--max-width)}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none !important;transform:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}:host(.menu-pane-visible) ion-backdrop{display:hidden !important;}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, w as writeTask, h, H as Host, f as getElement } from './index-847f2fde.js';
|
|
5
5
|
import { f as findClosestIonContent, i as isIonContent, d as disableContentScrollY, r as resetContentScrollY, a as findIonContent, p as printIonContentErrorMsg } from './index-746a238e.js';
|
|
6
|
-
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-
|
|
6
|
+
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-2b76c681.js';
|
|
7
7
|
import { g as getElementRoot, l as clamp, r as raf, k as inheritAttributes, m as hasLazyBuild } from './helpers-3379ba19.js';
|
|
8
8
|
import { p as printIonWarning } from './index-595d62c9.js';
|
|
9
9
|
import { g as getCapacitor } from './capacitor-b4979570.js';
|
|
10
|
-
import { G as GESTURE, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as activeAnimations, g as dismiss, h as eventMethod } from './overlays-
|
|
10
|
+
import { G as GESTURE, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as activeAnimations, g as dismiss, h as eventMethod } from './overlays-c3387ec0.js';
|
|
11
11
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
12
12
|
import { e as deepReady, w as waitForMount } from './index-6391de89.js';
|
|
13
13
|
import { b as getIonMode, c as config } from './ionic-global-1ef19007.js';
|
|
@@ -1298,8 +1298,8 @@ const Modal = class {
|
|
|
1298
1298
|
*/
|
|
1299
1299
|
this.currentBreakpoint = this.initialBreakpoint;
|
|
1300
1300
|
const { inline, delegate } = this.getDelegate(true);
|
|
1301
|
-
this.ionMount.emit();
|
|
1302
1301
|
this.usersElement = await attachComponent(delegate, el, this.component, ['ion-page'], this.componentProps, inline);
|
|
1302
|
+
this.ionMount.emit();
|
|
1303
1303
|
/**
|
|
1304
1304
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
1305
1305
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -6,7 +6,7 @@ import { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
|
|
|
6
6
|
import { o as assert, s as shallowEqualStringMap } from './helpers-3379ba19.js';
|
|
7
7
|
import { l as lifecycle, t as transition, s as setPageHidden, d as LIFECYCLE_WILL_UNLOAD, b as LIFECYCLE_WILL_LEAVE, c as LIFECYCLE_DID_LEAVE } from './index-6391de89.js';
|
|
8
8
|
import { b as getIonMode, c as config } from './ionic-global-1ef19007.js';
|
|
9
|
-
import { a as attachComponent } from './framework-delegate-
|
|
9
|
+
import { a as attachComponent } from './framework-delegate-2b76c681.js';
|
|
10
10
|
|
|
11
11
|
const VIEW_STATE_NEW = 1;
|
|
12
12
|
const VIEW_STATE_ATTACHED = 2;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-847f2fde.js';
|
|
5
|
-
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-
|
|
5
|
+
import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-2b76c681.js';
|
|
6
6
|
import { r as raf, g as getElementRoot, a as addEventListener, m as hasLazyBuild } from './helpers-3379ba19.js';
|
|
7
7
|
import { p as printIonWarning } from './index-595d62c9.js';
|
|
8
|
-
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, o as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-
|
|
8
|
+
import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, o as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-c3387ec0.js';
|
|
9
9
|
import { b as getIonMode, a as isPlatform } from './ionic-global-1ef19007.js';
|
|
10
10
|
import { g as getClassMap } from './theme-17531cdf.js';
|
|
11
11
|
import { e as deepReady, w as waitForMount } from './index-6391de89.js';
|
|
@@ -1172,12 +1172,12 @@ const Popover = class {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
const { el } = this;
|
|
1174
1174
|
const { inline, delegate } = this.getDelegate(true);
|
|
1175
|
-
this.ionMount.emit();
|
|
1176
1175
|
this.usersElement = await attachComponent(delegate, el, this.component, ['popover-viewport'], this.componentProps, inline);
|
|
1177
1176
|
if (!this.keyboardEvents) {
|
|
1178
1177
|
this.configureKeyboardInteraction();
|
|
1179
1178
|
}
|
|
1180
1179
|
this.configureDismissInteraction();
|
|
1180
|
+
this.ionMount.emit();
|
|
1181
1181
|
/**
|
|
1182
1182
|
* When using the lazy loaded build of Stencil, we need to wait
|
|
1183
1183
|
* for every Stencil component instance to be ready before presenting
|
|
@@ -8,9 +8,9 @@ import { p as printIonWarning } from './index-595d62c9.js';
|
|
|
8
8
|
import { h as hostContext, c as createColorClasses } from './theme-17531cdf.js';
|
|
9
9
|
import { b as getIonMode } from './ionic-global-1ef19007.js';
|
|
10
10
|
|
|
11
|
-
const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;min-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(:not(.legacy-radio)){cursor:pointer}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-radio) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-radio) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-radio) label{left:0}:host-context([dir=rtl]):host(.legacy-radio) label,:host-context([dir=rtl]).legacy-radio label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-radio) label:dir(rtl){left:unset;right:unset;right:0}}}:host(.legacy-radio) label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host(.in-item:not(.legacy-radio)){width:100%;height:100%}:host([slot=start]:not(.legacy-radio)),:host([slot=end]:not(.legacy-radio)){width:auto}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-radio)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host{--color-checked:var(--ion-color-primary, #3880ff)}:host(.legacy-radio){width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{-webkit-margin-start:0;margin-inline-start:0}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}@supports (inset-inline-start: 0){:host(.ion-focused) .radio-icon::after{inset-inline-start:-9px}}@supports not (inset-inline-start: 0){:host(.ion-focused) .radio-icon::after{left:-9px}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}@supports selector(:dir(rtl)){:host(.ion-focused) .radio-icon::after:dir(rtl){left:unset;right:unset;right:-9px}}}:host(.in-item.legacy-radio){-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:11px;margin-inline-end:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}:host(.in-item.legacy-radio[slot=start]){-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px;margin-top:8px;margin-bottom:8px}.native-wrapper .radio-icon{width:15px;height:24px}";
|
|
11
|
+
const radioIosCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;min-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(:not(.legacy-radio)){cursor:pointer}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-radio) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-radio) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-radio) label{left:0}:host-context([dir=rtl]):host(.legacy-radio) label,:host-context([dir=rtl]).legacy-radio label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-radio) label:dir(rtl){left:unset;right:unset;right:0}}}:host(.legacy-radio) label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host(.in-item:not(.legacy-radio)){width:100%;height:100%}:host([slot=start]:not(.legacy-radio)),:host([slot=end]:not(.legacy-radio)){width:auto}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-radio)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-label-placement-stacked) .label-text-wrapper{margin-left:0;margin-right:0;margin-bottom:16px}:host{--color-checked:var(--ion-color-primary, #3880ff)}:host(.legacy-radio){width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{-webkit-margin-start:0;margin-inline-start:0}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}@supports (inset-inline-start: 0){:host(.ion-focused) .radio-icon::after{inset-inline-start:-9px}}@supports not (inset-inline-start: 0){:host(.ion-focused) .radio-icon::after{left:-9px}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}@supports selector(:dir(rtl)){:host(.ion-focused) .radio-icon::after:dir(rtl){left:unset;right:unset;right:-9px}}}:host(.in-item.legacy-radio){-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:11px;margin-inline-end:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}:host(.in-item.legacy-radio[slot=start]){-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px;margin-top:8px;margin-bottom:8px}.native-wrapper .radio-icon{width:15px;height:24px}";
|
|
12
12
|
|
|
13
|
-
const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;min-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(:not(.legacy-radio)){cursor:pointer}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-radio) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-radio) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-radio) label{left:0}:host-context([dir=rtl]):host(.legacy-radio) label,:host-context([dir=rtl]).legacy-radio label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-radio) label:dir(rtl){left:unset;right:unset;right:0}}}:host(.legacy-radio) label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host(.in-item:not(.legacy-radio)){width:100%;height:100%}:host([slot=start]:not(.legacy-radio)),:host([slot=end]:not(.legacy-radio)){width:auto}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-radio)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host{--color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%}:host(.legacy-radio){width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.legacy-radio.radio-disabled),:host(.radio-disabled) .label-text-wrapper{opacity:0.38}:host(.radio-disabled) .native-wrapper{opacity:0.63}:host(.ion-focused.legacy-radio) .radio-icon::after{top:-12px}@supports (inset-inline-start: 0){:host(.ion-focused.legacy-radio) .radio-icon::after{inset-inline-start:-12px}}@supports not (inset-inline-start: 0){:host(.ion-focused.legacy-radio) .radio-icon::after{left:-12px}:host-context([dir=rtl]):host(.ion-focused.legacy-radio) .radio-icon::after,:host-context([dir=rtl]).ion-focused.legacy-radio .radio-icon::after{left:unset;right:unset;right:-12px}@supports selector(:dir(rtl)){:host(.ion-focused.legacy-radio) .radio-icon::after:dir(rtl){left:unset;right:unset;right:-12px}}}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host(.in-item.legacy-radio){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item.legacy-radio[slot=start]){-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px;margin-top:11px;margin-bottom:10px}.native-wrapper .radio-icon{width:20px;height:20px}";
|
|
13
|
+
const radioMdCss = ":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100%;min-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(:not(.legacy-radio)){cursor:pointer}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host(.legacy-radio) label{top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}@supports (inset-inline-start: 0){:host(.legacy-radio) label{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host(.legacy-radio) label{left:0}:host-context([dir=rtl]):host(.legacy-radio) label,:host-context([dir=rtl]).legacy-radio label{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(.legacy-radio) label:dir(rtl){left:unset;right:unset;right:0}}}:host(.legacy-radio) label::-moz-focus-inner{border:0}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host(:focus){outline:none}:host(.in-item:not(.legacy-radio)){width:100%;height:100%}:host([slot=start]:not(.legacy-radio)),:host([slot=end]:not(.legacy-radio)){width:auto}.radio-wrapper{display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;height:inherit;min-height:inherit;cursor:inherit}.label-text-wrapper{pointer-events:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item:not(.legacy-radio)) .label-text-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.radio-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.radio-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(.radio-justify-space-between) .radio-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.radio-justify-start) .radio-wrapper{-ms-flex-pack:start;justify-content:start}:host(.radio-justify-end) .radio-wrapper{-ms-flex-pack:end;justify-content:end}:host(.radio-alignment-start) .radio-wrapper{-ms-flex-align:start;align-items:start}:host(.radio-alignment-center) .radio-wrapper{-ms-flex-align:center;align-items:center}:host(.radio-label-placement-start) .radio-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.radio-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-end) .radio-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.radio-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.radio-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.radio-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px}:host(.radio-label-placement-stacked) .radio-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.radio-label-placement-stacked) .label-text-wrapper{margin-left:0;margin-right:0;margin-bottom:16px}:host{--color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%}:host(.legacy-radio){width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.legacy-radio.radio-disabled),:host(.radio-disabled) .label-text-wrapper{opacity:0.38}:host(.radio-disabled) .native-wrapper{opacity:0.63}:host(.ion-focused.legacy-radio) .radio-icon::after{top:-12px}@supports (inset-inline-start: 0){:host(.ion-focused.legacy-radio) .radio-icon::after{inset-inline-start:-12px}}@supports not (inset-inline-start: 0){:host(.ion-focused.legacy-radio) .radio-icon::after{left:-12px}:host-context([dir=rtl]):host(.ion-focused.legacy-radio) .radio-icon::after,:host-context([dir=rtl]).ion-focused.legacy-radio .radio-icon::after{left:unset;right:unset;right:-12px}@supports selector(:dir(rtl)){:host(.ion-focused.legacy-radio) .radio-icon::after:dir(rtl){left:unset;right:unset;right:-12px}}}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\"\";opacity:0.2}:host(.in-item.legacy-radio){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item.legacy-radio[slot=start]){-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px;margin-top:11px;margin-bottom:10px}.native-wrapper .radio-icon{width:20px;height:20px}";
|
|
14
14
|
|
|
15
15
|
const Radio = class {
|
|
16
16
|
constructor(hostRef) {
|
|
@@ -71,6 +71,7 @@ const Radio = class {
|
|
|
71
71
|
this.labelPlacement = 'start';
|
|
72
72
|
this.legacy = undefined;
|
|
73
73
|
this.justify = 'space-between';
|
|
74
|
+
this.alignment = 'center';
|
|
74
75
|
}
|
|
75
76
|
valueChanged() {
|
|
76
77
|
/**
|
|
@@ -135,7 +136,7 @@ const Radio = class {
|
|
|
135
136
|
return legacyFormController.hasLegacyControl() ? this.renderLegacyRadio() : this.renderRadio();
|
|
136
137
|
}
|
|
137
138
|
renderRadio() {
|
|
138
|
-
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex } = this;
|
|
139
|
+
const { checked, disabled, color, el, justify, labelPlacement, hasLabel, buttonTabindex, alignment } = this;
|
|
139
140
|
const mode = getIonMode(this);
|
|
140
141
|
const inItem = hostContext('ion-item', el);
|
|
141
142
|
return (h(Host, { onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.onClick, class: createColorClasses(color, {
|
|
@@ -144,6 +145,7 @@ const Radio = class {
|
|
|
144
145
|
'radio-checked': checked,
|
|
145
146
|
'radio-disabled': disabled,
|
|
146
147
|
[`radio-justify-${justify}`]: true,
|
|
148
|
+
[`radio-alignment-${alignment}`]: true,
|
|
147
149
|
[`radio-label-placement-${labelPlacement}`]: true,
|
|
148
150
|
// Focus and active styling should not apply when the radio is in an item
|
|
149
151
|
'ion-activatable': !inItem,
|