@ionic/core 7.5.3-dev.11698859252.15ac163e → 7.5.3-dev.11699994454.1cbf1283

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.
Files changed (166) hide show
  1. package/components/backdrop.js +0 -12
  2. package/components/gesture-controller.js +1 -1
  3. package/components/ion-content.js +1 -1
  4. package/components/ion-datetime.js +23 -48
  5. package/components/overlays.js +5 -1
  6. package/dist/cjs/{button-active-c0ff1915.js → button-active-b18290c5.js} +1 -1
  7. package/dist/cjs/{gesture-controller-b46721be.js → gesture-controller-d6a3f907.js} +1 -0
  8. package/dist/cjs/{index-0ee995e4.js → index-0f8b33f8.js} +1 -1
  9. package/dist/cjs/index.cjs.js +3 -3
  10. package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
  11. package/dist/cjs/ion-alert.cjs.entry.js +4 -4
  12. package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
  13. package/dist/cjs/ion-backdrop.cjs.entry.js +0 -12
  14. package/dist/cjs/ion-datetime_3.cjs.entry.js +26 -50
  15. package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-loading.cjs.entry.js +2 -1
  17. package/dist/cjs/ion-menu_3.cjs.entry.js +3 -3
  18. package/dist/cjs/ion-modal.cjs.entry.js +3 -3
  19. package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
  20. package/dist/cjs/ion-popover.cjs.entry.js +2 -1
  21. package/dist/cjs/ion-range.cjs.entry.js +1 -1
  22. package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
  23. package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-select_3.cjs.entry.js +2 -1
  26. package/dist/cjs/ion-toast.cjs.entry.js +2 -1
  27. package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
  28. package/dist/cjs/{overlays-1a734051.js → overlays-e620a639.js} +5 -1
  29. package/dist/cjs/{swipe-back-d0412fb6.js → swipe-back-a6dc6e5d.js} +2 -2
  30. package/dist/collection/components/backdrop/backdrop.js +0 -12
  31. package/dist/collection/components/content/content.css +0 -4
  32. package/dist/collection/components/datetime/datetime.ios.css +3 -23
  33. package/dist/collection/components/datetime/datetime.js +22 -47
  34. package/dist/collection/components/datetime/datetime.md.css +3 -23
  35. package/dist/collection/components/datetime/test/a11y/datetime.e2e.js +0 -66
  36. package/dist/collection/utils/gesture/gesture-controller.js +1 -1
  37. package/dist/collection/utils/overlays.js +5 -1
  38. package/dist/docs.json +2 -2
  39. package/dist/esm/{button-active-d926d4f4.js → button-active-c0672227.js} +1 -1
  40. package/dist/esm/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
  41. package/dist/esm/{index-ff313b19.js → index-32cbee52.js} +2 -2
  42. package/dist/esm/index.js +3 -3
  43. package/dist/esm/ion-action-sheet.entry.js +4 -4
  44. package/dist/esm/ion-alert.entry.js +4 -4
  45. package/dist/esm/ion-app_8.entry.js +2 -2
  46. package/dist/esm/ion-backdrop.entry.js +0 -12
  47. package/dist/esm/ion-datetime_3.entry.js +26 -50
  48. package/dist/esm/ion-item-option_3.entry.js +1 -1
  49. package/dist/esm/ion-loading.entry.js +2 -1
  50. package/dist/esm/ion-menu_3.entry.js +3 -3
  51. package/dist/esm/ion-modal.entry.js +3 -3
  52. package/dist/esm/ion-nav_2.entry.js +1 -1
  53. package/dist/esm/ion-popover.entry.js +2 -1
  54. package/dist/esm/ion-range.entry.js +1 -1
  55. package/dist/esm/ion-refresher_2.entry.js +3 -3
  56. package/dist/esm/ion-reorder_2.entry.js +1 -1
  57. package/dist/esm/ion-segment_2.entry.js +1 -1
  58. package/dist/esm/ion-select_3.entry.js +2 -1
  59. package/dist/esm/ion-toast.entry.js +2 -1
  60. package/dist/esm/ion-toggle.entry.js +1 -1
  61. package/dist/esm/{overlays-cec6bac8.js → overlays-a25f3692.js} +5 -1
  62. package/dist/esm/{swipe-back-0f3bfc8e.js → swipe-back-cc4c2bcb.js} +2 -2
  63. package/dist/esm-es5/{button-active-d926d4f4.js → button-active-c0672227.js} +1 -1
  64. package/dist/esm-es5/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
  65. package/dist/esm-es5/{index-ff313b19.js → index-32cbee52.js} +1 -1
  66. package/dist/esm-es5/index.js +1 -1
  67. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  68. package/dist/esm-es5/ion-alert.entry.js +1 -1
  69. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  70. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  71. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  72. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  73. package/dist/esm-es5/ion-loading.entry.js +1 -1
  74. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  75. package/dist/esm-es5/ion-modal.entry.js +1 -1
  76. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  77. package/dist/esm-es5/ion-popover.entry.js +1 -1
  78. package/dist/esm-es5/ion-range.entry.js +1 -1
  79. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  80. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  81. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  82. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  83. package/dist/esm-es5/ion-toast.entry.js +1 -1
  84. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  85. package/dist/esm-es5/overlays-a25f3692.js +4 -0
  86. package/dist/esm-es5/swipe-back-cc4c2bcb.js +4 -0
  87. package/dist/html.html-data.json +1 -1
  88. package/dist/ionic/index.esm.js +1 -1
  89. package/dist/ionic/ionic.esm.js +1 -1
  90. package/dist/ionic/{p-e552cf80.entry.js → p-082e6ebc.entry.js} +1 -1
  91. package/dist/ionic/p-0fb53284.system.js +1 -1
  92. package/dist/ionic/{p-e0b06b65.js → p-100ef961.js} +1 -1
  93. package/dist/ionic/{p-70263330.entry.js → p-192896f7.entry.js} +1 -1
  94. package/dist/ionic/p-1d442e7f.system.entry.js +4 -0
  95. package/dist/ionic/p-21db87fd.entry.js +4 -0
  96. package/dist/ionic/{p-ebdf4f41.entry.js → p-243c6b48.entry.js} +1 -1
  97. package/dist/ionic/p-274d8ed2.system.entry.js +4 -0
  98. package/dist/ionic/{p-fa8d4788.system.js → p-2e1794df.system.js} +1 -1
  99. package/dist/ionic/{p-e627ed84.js → p-302091ab.js} +1 -1
  100. package/dist/ionic/p-31460205.system.entry.js +4 -0
  101. package/dist/ionic/{p-79d430f7.system.entry.js → p-33ddf556.system.entry.js} +1 -1
  102. package/dist/ionic/{p-5fba0b2d.entry.js → p-428d1977.entry.js} +1 -1
  103. package/dist/ionic/{p-306d845d.system.entry.js → p-4c71f040.system.entry.js} +1 -1
  104. package/dist/ionic/p-4d315f52.entry.js +4 -0
  105. package/dist/ionic/{p-f275d76b.system.entry.js → p-5e2a8ff3.system.entry.js} +1 -1
  106. package/dist/ionic/{p-9e852ff1.system.js → p-6500b298.system.js} +1 -1
  107. package/dist/ionic/{p-83198481.entry.js → p-66a6a50f.entry.js} +1 -1
  108. package/dist/ionic/{p-fe08d5d6.system.js → p-68d3bb7a.system.js} +1 -1
  109. package/dist/ionic/p-6e631497.entry.js +4 -0
  110. package/dist/ionic/{p-372f1f80.system.entry.js → p-6f9dc7fa.system.entry.js} +1 -1
  111. package/dist/ionic/p-72b1912d.system.entry.js +4 -0
  112. package/dist/ionic/p-738dbf62.js +4 -0
  113. package/dist/ionic/p-768a68bf.entry.js +4 -0
  114. package/dist/ionic/{p-aa377971.system.js → p-78a07ba5.system.js} +1 -1
  115. package/dist/ionic/p-8a792504.system.entry.js +4 -0
  116. package/dist/ionic/{p-dcce7252.entry.js → p-9165324b.entry.js} +1 -1
  117. package/dist/ionic/{p-26d0ec66.system.entry.js → p-96c924cc.system.entry.js} +1 -1
  118. package/dist/ionic/{p-23410b18.system.entry.js → p-9ae2c66c.system.entry.js} +1 -1
  119. package/dist/ionic/p-9c2741fe.system.js +4 -0
  120. package/dist/ionic/{p-3574440a.system.entry.js → p-9ff931fd.system.entry.js} +1 -1
  121. package/dist/ionic/p-a0493a3f.system.entry.js +4 -0
  122. package/dist/ionic/{p-8b1be026.js → p-a7e2ac5c.js} +1 -1
  123. package/dist/ionic/{p-ce56d7b5.system.entry.js → p-ac8cc82a.system.entry.js} +1 -1
  124. package/dist/ionic/{p-360d0872.entry.js → p-b5f0e159.entry.js} +1 -1
  125. package/dist/ionic/{p-99eba967.entry.js → p-ba99fb46.entry.js} +1 -1
  126. package/dist/ionic/{p-f089f3b1.entry.js → p-bdad8452.entry.js} +1 -1
  127. package/dist/ionic/p-bf83f5da.js +4 -0
  128. package/dist/ionic/{p-2222b68a.system.entry.js → p-c49d44b0.system.entry.js} +2 -2
  129. package/dist/ionic/p-ced20292.entry.js +4 -0
  130. package/dist/ionic/{p-df189fa7.entry.js → p-dd289f93.entry.js} +1 -1
  131. package/dist/ionic/{p-7427a3ec.system.entry.js → p-de16430e.system.entry.js} +1 -1
  132. package/dist/ionic/p-e88ed07f.system.js +4 -0
  133. package/dist/ionic/{p-0c0d536f.system.entry.js → p-f1739380.system.entry.js} +1 -1
  134. package/dist/ionic/p-f9ed9d47.system.entry.js +4 -0
  135. package/dist/ionic/{p-db0140c0.entry.js → p-fa730d6f.entry.js} +1 -1
  136. package/dist/ionic/p-fe1c94e6.entry.js +4 -0
  137. package/dist/ionic/p-ff16ac5d.entry.js +4 -0
  138. package/dist/types/components/backdrop/backdrop.d.ts +0 -3
  139. package/dist/types/components/datetime/datetime.d.ts +1 -1
  140. package/dist/types/components/menu/menu.d.ts +1 -1
  141. package/dist/types/components.d.ts +2 -2
  142. package/dist/types/utils/gesture/gesture-controller.d.ts +1 -0
  143. package/hydrate/index.js +28 -61
  144. package/package.json +2 -2
  145. package/dist/collection/components/datetime/test/disabled/datetime.e2e.js +0 -68
  146. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +0 -113
  147. package/dist/esm-es5/overlays-cec6bac8.js +0 -4
  148. package/dist/esm-es5/swipe-back-0f3bfc8e.js +0 -4
  149. package/dist/ionic/p-0362c48a.entry.js +0 -4
  150. package/dist/ionic/p-07989b03.system.entry.js +0 -4
  151. package/dist/ionic/p-1676eeff.system.entry.js +0 -4
  152. package/dist/ionic/p-28ea45b9.js +0 -4
  153. package/dist/ionic/p-3816e896.entry.js +0 -4
  154. package/dist/ionic/p-4e70a7cc.entry.js +0 -4
  155. package/dist/ionic/p-68f78c9b.system.entry.js +0 -4
  156. package/dist/ionic/p-892710a8.entry.js +0 -4
  157. package/dist/ionic/p-8dbdb163.system.js +0 -4
  158. package/dist/ionic/p-8f01a9a2.system.js +0 -4
  159. package/dist/ionic/p-8fdd6396.system.entry.js +0 -4
  160. package/dist/ionic/p-af37e8de.system.entry.js +0 -4
  161. package/dist/ionic/p-bbf47813.entry.js +0 -4
  162. package/dist/ionic/p-cf62e1c8.js +0 -4
  163. package/dist/ionic/p-db1a1e00.entry.js +0 -4
  164. package/dist/ionic/p-db2332fe.system.entry.js +0 -4
  165. package/dist/ionic/p-f10fb4d4.system.entry.js +0 -4
  166. package/dist/ionic/p-f5e7ed0e.entry.js +0 -4
@@ -94,13 +94,6 @@ export class Datetime {
94
94
  this.workingParts = Object.assign({}, parts);
95
95
  };
96
96
  this.setActiveParts = (parts, removeDate = false) => {
97
- /** if the datetime component is in readonly mode,
98
- * allow browsing of the calendar without changing
99
- * the set value
100
- */
101
- if (this.readonly) {
102
- return;
103
- }
104
97
  const { multiple, minParts, maxParts, activeParts } = this;
105
98
  /**
106
99
  * When setting the active parts, it is possible
@@ -921,13 +914,7 @@ export class Datetime {
921
914
  * are rendered independently of presentation.
922
915
  */
923
916
  renderFooter() {
924
- const { disabled, readonly, showDefaultButtons, showClearButton } = this;
925
- /**
926
- * The cancel, clear, and confirm buttons
927
- * should not be interactive if the datetime
928
- * is disabled or readonly.
929
- */
930
- const isButtonDisabled = disabled || readonly;
917
+ const { showDefaultButtons, showClearButton } = this;
931
918
  const hasSlottedButtons = this.el.querySelector('[slot="buttons"]') !== null;
932
919
  if (!hasSlottedButtons && !showDefaultButtons && !showClearButton) {
933
920
  return;
@@ -946,7 +933,7 @@ export class Datetime {
946
933
  return (h("div", { class: "datetime-footer" }, h("div", { class: "datetime-buttons" }, h("div", { class: {
947
934
  ['datetime-action-buttons']: true,
948
935
  ['has-clear-button']: this.showClearButton,
949
- } }, h("slot", { name: "buttons" }, h("ion-buttons", null, showDefaultButtons && (h("ion-button", { id: "cancel-button", color: this.color, onClick: () => this.cancel(true), disabled: isButtonDisabled }, this.cancelText)), h("div", { class: "datetime-action-buttons-container" }, showClearButton && (h("ion-button", { id: "clear-button", color: this.color, onClick: () => clearButtonClick(), disabled: isButtonDisabled }, this.clearText)), showDefaultButtons && (h("ion-button", { id: "confirm-button", color: this.color, onClick: () => this.confirm(true), disabled: isButtonDisabled }, this.doneText)))))))));
936
+ } }, h("slot", { name: "buttons" }, h("ion-buttons", null, showDefaultButtons && (h("ion-button", { id: "cancel-button", color: this.color, onClick: () => this.cancel(true) }, this.cancelText)), h("div", { class: "datetime-action-buttons-container" }, showClearButton && (h("ion-button", { id: "clear-button", color: this.color, onClick: () => clearButtonClick() }, this.clearText)), showDefaultButtons && (h("ion-button", { id: "confirm-button", color: this.color, onClick: () => this.confirm(true) }, this.doneText)))))))));
950
937
  }
951
938
  /**
952
939
  * Wheel picker render methods
@@ -1237,14 +1224,13 @@ export class Datetime {
1237
1224
  * Grid Render Methods
1238
1225
  */
1239
1226
  renderCalendarHeader(mode) {
1240
- const { disabled } = this;
1241
1227
  const expandedIcon = mode === 'ios' ? chevronDown : caretUpSharp;
1242
1228
  const collapsedIcon = mode === 'ios' ? chevronForward : caretDownSharp;
1243
- const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);
1244
- const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);
1229
+ const prevMonthDisabled = isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);
1230
+ const nextMonthDisabled = isNextMonthDisabled(this.workingParts, this.maxParts);
1245
1231
  // don't use the inheritAttributes util because it removes dir from the host, and we still need that
1246
1232
  const hostDir = this.el.getAttribute('dir') || undefined;
1247
- return (h("div", { class: "calendar-header" }, h("div", { class: "calendar-action-buttons" }, h("div", { class: "calendar-month-year" }, h("ion-item", { part: "month-year-button", ref: (el) => (this.monthYearToggleItemRef = el), button: true, "aria-label": "Show year picker", detail: false, lines: "none", disabled: disabled, onClick: () => {
1233
+ return (h("div", { class: "calendar-header" }, h("div", { class: "calendar-action-buttons" }, h("div", { class: "calendar-month-year" }, h("ion-item", { part: "month-year-button", ref: (el) => (this.monthYearToggleItemRef = el), button: true, "aria-label": "Show year picker", detail: false, lines: "none", onClick: () => {
1248
1234
  var _a;
1249
1235
  this.toggleMonthAndYearView();
1250
1236
  /**
@@ -1268,23 +1254,20 @@ export class Datetime {
1268
1254
  }))));
1269
1255
  }
1270
1256
  renderMonth(month, year) {
1271
- const { disabled, readonly } = this;
1272
1257
  const yearAllowed = this.parsedYearValues === undefined || this.parsedYearValues.includes(year);
1273
1258
  const monthAllowed = this.parsedMonthValues === undefined || this.parsedMonthValues.includes(month);
1274
1259
  const isCalMonthDisabled = !yearAllowed || !monthAllowed;
1275
- const isDatetimeDisabled = disabled || readonly;
1276
- const swipeDisabled = disabled ||
1277
- isMonthDisabled({
1278
- month,
1279
- year,
1280
- day: null,
1281
- }, {
1282
- // The day is not used when checking if a month is disabled.
1283
- // Users should be able to access the min or max month, even if the
1284
- // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).
1285
- minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
1286
- maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
1287
- });
1260
+ const swipeDisabled = isMonthDisabled({
1261
+ month,
1262
+ year,
1263
+ day: null,
1264
+ }, {
1265
+ // The day is not used when checking if a month is disabled.
1266
+ // Users should be able to access the min or max month, even if the
1267
+ // min/max date is out of bounds (e.g. min is set to Feb 15, Feb should not be disabled).
1268
+ minParts: Object.assign(Object.assign({}, this.minParts), { day: null }),
1269
+ maxParts: Object.assign(Object.assign({}, this.maxParts), { day: null }),
1270
+ });
1288
1271
  // The working month should never have swipe disabled.
1289
1272
  // Otherwise the CSS scroll snap will not work and the user
1290
1273
  // can free-scroll the calendar.
@@ -1299,9 +1282,9 @@ export class Datetime {
1299
1282
  const { el, highlightedDates, isDateEnabled, multiple } = this;
1300
1283
  const referenceParts = { month, day, year };
1301
1284
  const isCalendarPadding = day === null;
1302
- const { isActive, isToday, ariaLabel, ariaSelected, disabled: isDayDisabled, text, } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
1285
+ const { isActive, isToday, ariaLabel, ariaSelected, disabled, text } = getCalendarDayState(this.locale, referenceParts, this.activeParts, this.todayParts, this.minParts, this.maxParts, this.parsedDayValues);
1303
1286
  const dateIsoString = convertDataToISO(referenceParts);
1304
- let isCalDayDisabled = isCalMonthDisabled || isDayDisabled;
1287
+ let isCalDayDisabled = isCalMonthDisabled || disabled;
1305
1288
  if (!isCalDayDisabled && isDateEnabled !== undefined) {
1306
1289
  try {
1307
1290
  /**
@@ -1315,13 +1298,6 @@ export class Datetime {
1315
1298
  printIonError('Exception thrown from provided `isDateEnabled` function. Please check your function and try again.', el, e);
1316
1299
  }
1317
1300
  }
1318
- /**
1319
- * Some days are constrained through max & min or allowed dates
1320
- * and also disabled because the component is readonly or disabled.
1321
- * These need to be displayed differently.
1322
- */
1323
- const isCalDayConstrained = isCalDayDisabled && isDatetimeDisabled;
1324
- const isButtonDisabled = isCalDayDisabled || isDatetimeDisabled;
1325
1301
  let dateStyle = undefined;
1326
1302
  /**
1327
1303
  * Custom highlight styles should not override the style for selected dates,
@@ -1348,11 +1324,10 @@ export class Datetime {
1348
1324
  el.style.setProperty('color', `${dateStyle ? dateStyle.textColor : ''}`, 'important');
1349
1325
  el.style.setProperty('background-color', `${dateStyle ? dateStyle.backgroundColor : ''}`, 'important');
1350
1326
  }
1351
- }, tabindex: "-1", "data-day": day, "data-month": month, "data-year": year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isButtonDisabled, class: {
1327
+ }, tabindex: "-1", "data-day": day, "data-month": month, "data-year": year, "data-index": index, "data-day-of-week": dayOfWeek, disabled: isCalDayDisabled, class: {
1352
1328
  'calendar-day-padding': isCalendarPadding,
1353
1329
  'calendar-day': true,
1354
1330
  'calendar-day-active': isActive,
1355
- 'calendar-day-constrained': isCalDayConstrained,
1356
1331
  'calendar-day-today': isToday,
1357
1332
  }, part: dateParts, "aria-hidden": isCalendarPadding ? 'true' : null, "aria-selected": ariaSelected, "aria-label": ariaLabel, onClick: () => {
1358
1333
  if (isCalendarPadding) {
@@ -1394,7 +1369,7 @@ export class Datetime {
1394
1369
  return h("slot", { name: "time-label" }, "Time");
1395
1370
  }
1396
1371
  renderTimeOverlay() {
1397
- const { disabled, hourCycle, isTimePopoverOpen, locale } = this;
1372
+ const { hourCycle, isTimePopoverOpen, locale } = this;
1398
1373
  const computedHourCycle = getHourCycle(locale, hourCycle);
1399
1374
  const activePart = this.getActivePartsWithFallback();
1400
1375
  return [
@@ -1402,7 +1377,7 @@ export class Datetime {
1402
1377
  h("button", { class: {
1403
1378
  'time-body': true,
1404
1379
  'time-body-active': isTimePopoverOpen,
1405
- }, part: `time-button${isTimePopoverOpen ? ' active' : ''}`, "aria-expanded": "false", "aria-haspopup": "true", disabled: disabled, onClick: async (ev) => {
1380
+ }, part: `time-button${isTimePopoverOpen ? ' active' : ''}`, "aria-expanded": "false", "aria-haspopup": "true", onClick: async (ev) => {
1406
1381
  const { popoverRef } = this;
1407
1382
  if (popoverRef) {
1408
1383
  this.isTimePopoverOpen = true;
@@ -1642,7 +1617,7 @@ export class Datetime {
1642
1617
  "optional": false,
1643
1618
  "docs": {
1644
1619
  "tags": [],
1645
- "text": "If `true`, the datetime appears normal but the selected date cannot be changed."
1620
+ "text": "If `true`, the datetime appears normal but is not interactive."
1646
1621
  },
1647
1622
  "attribute": "readonly",
1648
1623
  "reflect": false,
@@ -224,33 +224,13 @@ ion-picker-column-internal {
224
224
  display: none;
225
225
  }
226
226
 
227
+ :host(.datetime-readonly),
227
228
  :host(.datetime-disabled) {
228
229
  pointer-events: none;
229
230
  }
230
- :host(.datetime-disabled) .calendar-days-of-week,
231
- :host(.datetime-disabled) .datetime-time {
232
- opacity: 0.4;
233
- }
234
231
 
235
- :host(.datetime-readonly) {
236
- pointer-events: none;
237
- /**
238
- * Allow user to navigate months
239
- * while in readonly mode
240
- */
241
- /**
242
- * Disabled buttons should have full opacity
243
- * in readonly mode
244
- */
245
- }
246
- :host(.datetime-readonly) .calendar-action-buttons,
247
- :host(.datetime-readonly) .calendar-body,
248
- :host(.datetime-readonly) .datetime-year {
249
- pointer-events: initial;
250
- }
251
- :host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),
252
- :host(.datetime-readonly) .datetime-action-buttons ion-button[disabled] {
253
- opacity: 1;
232
+ :host(.datetime-disabled) {
233
+ opacity: 0.4;
254
234
  }
255
235
 
256
236
  /**
@@ -26,69 +26,3 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
26
26
  });
27
27
  });
28
28
  });
29
- /**
30
- * This behavior does not differ across
31
- * modes/directions.
32
- */
33
- configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
34
- test.describe(title('datetime: a11y'), () => {
35
- test('datetime should be keyboard navigable', async ({ page, browserName }) => {
36
- await page.setContent(`
37
- <ion-datetime value="2022-02-22T16:30:00"></ion-datetime>
38
- `, config);
39
- const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
40
- const datetime = page.locator('ion-datetime');
41
- const monthYearButton = page.locator('.calendar-month-year ion-item');
42
- const prevButton = page.locator('.calendar-next-prev ion-button:nth-child(1)');
43
- const nextButton = page.locator('.calendar-next-prev ion-button:nth-child(2)');
44
- await page.keyboard.press(tabKey);
45
- await expect(monthYearButton).toBeFocused();
46
- await page.keyboard.press(tabKey);
47
- await expect(prevButton).toBeFocused();
48
- await page.keyboard.press(tabKey);
49
- await expect(nextButton).toBeFocused();
50
- // check value before & after selecting via keyboard
51
- const initialValue = await datetime.evaluate((el) => el.value);
52
- expect(initialValue).toBe('2022-02-22T16:30:00');
53
- await page.keyboard.press(tabKey);
54
- await page.waitForChanges();
55
- await page.keyboard.press('ArrowLeft');
56
- await page.waitForChanges();
57
- await page.keyboard.press('Enter');
58
- await page.waitForChanges();
59
- const newValue = await datetime.evaluate((el) => el.value);
60
- expect(newValue).not.toBe('2022-02-22T16:30:00');
61
- });
62
- test('buttons should be keyboard navigable', async ({ page }) => {
63
- await page.setContent(`
64
-
65
- <ion-datetime value="2022-02-22T16:30:00" show-default-buttons="true" show-clear-button="true"></ion-datetime>
66
- `, config);
67
- await page.waitForSelector('.datetime-ready');
68
- const clearButton = page.locator('#clear-button button');
69
- const selectedDay = page.locator('.calendar-day-active');
70
- await expect(selectedDay).toHaveText('22');
71
- await clearButton.focus();
72
- await page.waitForChanges();
73
- await expect(clearButton).toBeFocused();
74
- await page.keyboard.press('Enter');
75
- await page.waitForChanges();
76
- await expect(selectedDay).toHaveCount(0);
77
- });
78
- test('should navigate through months via right arrow key', async ({ page }) => {
79
- await page.setContent(`
80
-
81
- <ion-datetime value="2022-02-28"></ion-datetime>
82
- `, config);
83
- await page.waitForSelector('.datetime-ready');
84
- const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
85
- const calendarBody = page.locator('.calendar-body');
86
- await expect(calendarMonthYear).toHaveText('February 2022');
87
- await calendarBody.focus();
88
- await page.waitForChanges();
89
- await page.keyboard.press('ArrowRight');
90
- await page.waitForChanges();
91
- await expect(calendarMonthYear).toHaveText('March 2022');
92
- });
93
- });
94
- });
@@ -189,5 +189,5 @@ class BlockerDelegate {
189
189
  this.ctrl = undefined;
190
190
  }
191
191
  }
192
- const BACKDROP_NO_SCROLL = 'backdrop-no-scroll';
192
+ export const BACKDROP_NO_SCROLL = 'backdrop-no-scroll';
193
193
  export const GESTURE_CONTROLLER = new GestureController();
@@ -5,6 +5,7 @@ import { doc } from "./browser/index";
5
5
  import { config } from "../global/config";
6
6
  import { getIonMode } from "../global/ionic-global";
7
7
  import { CoreDelegate } from "./framework-delegate";
8
+ import { BACKDROP_NO_SCROLL } from "./gesture/gesture-controller";
8
9
  import { OVERLAY_BACK_BUTTON_PRIORITY } from "./hardware-back-button";
9
10
  import { addEventListener, componentOnReady, focusElement, getElementRoot, removeEventListener } from "./helpers";
10
11
  import { printIonWarning } from "./logging";
@@ -389,6 +390,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
389
390
  return;
390
391
  }
391
392
  setRootAriaHidden(true);
393
+ document.body.classList.add(BACKDROP_NO_SCROLL);
392
394
  overlay.presented = true;
393
395
  overlay.willPresent.emit();
394
396
  (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
@@ -451,12 +453,14 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
451
453
  if (!overlay.presented) {
452
454
  return false;
453
455
  }
456
+ const lastOverlay = doc !== undefined && getPresentedOverlays(doc).length === 1;
454
457
  /**
455
458
  * If this is the last visible overlay then
456
459
  * we want to re-add the root to the accessibility tree.
457
460
  */
458
- if (doc !== undefined && getPresentedOverlays(doc).length === 1) {
461
+ if (lastOverlay) {
459
462
  setRootAriaHidden(false);
463
+ document.body.classList.remove(BACKDROP_NO_SCROLL);
460
464
  }
461
465
  overlay.presented = false;
462
466
  try {
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-11-01T17:23:20",
2
+ "timestamp": "2023-11-14T20:42:40",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.6.0",
@@ -7477,7 +7477,7 @@
7477
7477
  "mutable": false,
7478
7478
  "attr": "readonly",
7479
7479
  "reflectToAttr": false,
7480
- "docs": "If `true`, the datetime appears normal but the selected date cannot be changed.",
7480
+ "docs": "If `true`, the datetime appears normal but is not interactive.",
7481
7481
  "docsTags": [],
7482
7482
  "default": "false",
7483
7483
  "values": [
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { w as writeTask } from './index-b49b173c.js';
5
5
  import { h as hapticSelectionEnd, a as hapticSelectionStart, b as hapticSelectionChanged } from './haptic-1243b917.js';
6
- import { createGesture } from './index-ff313b19.js';
6
+ import { createGesture } from './index-32cbee52.js';
7
7
 
8
8
  const createButtonActiveGesture = (el, isButton) => {
9
9
  let currentTouchedButton;
@@ -192,4 +192,4 @@ class BlockerDelegate {
192
192
  const BACKDROP_NO_SCROLL = 'backdrop-no-scroll';
193
193
  const GESTURE_CONTROLLER = new GestureController();
194
194
 
195
- export { GESTURE_CONTROLLER as G };
195
+ export { BACKDROP_NO_SCROLL as B, GESTURE_CONTROLLER as G };
@@ -1,8 +1,8 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- import { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
5
- export { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
4
+ import { G as GESTURE_CONTROLLER } from './gesture-controller-3723db7c.js';
5
+ export { G as GESTURE_CONTROLLER } from './gesture-controller-3723db7c.js';
6
6
 
7
7
  const addEventListener = (el, // TODO(FW-2832): type
8
8
  eventName, callback, opts) => {
package/dist/esm/index.js CHANGED
@@ -6,16 +6,16 @@ export { a as LIFECYCLE_DID_ENTER, c as LIFECYCLE_DID_LEAVE, L as LIFECYCLE_WILL
6
6
  export { iosTransitionAnimation } from './ios.transition-f1cea7e0.js';
7
7
  export { mdTransitionAnimation } from './md.transition-1bf39c32.js';
8
8
  export { g as getTimeGivenProgression } from './cubic-bezier-66542bc5.js';
9
- export { createGesture } from './index-ff313b19.js';
9
+ export { createGesture } from './index-32cbee52.js';
10
10
  export { g as getPlatforms, i as initialize, a as isPlatform } from './ionic-global-246ca78f.js';
11
11
  export { c as componentOnReady } from './helpers-3379ba19.js';
12
12
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-96c9ace3.js';
13
13
  export { o as openURL } from './theme-17531cdf.js';
14
14
  export { m as menuController } from './index-aae132ba.js';
15
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-cec6bac8.js';
15
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-a25f3692.js';
16
16
  import './index-7a14ecec.js';
17
17
  import './index-b49b173c.js';
18
- import './gesture-controller-0fa396c4.js';
18
+ import './gesture-controller-3723db7c.js';
19
19
  import './index-595d62c9.js';
20
20
  import './hardware-back-button-39299f84.js';
21
21
  import './framework-delegate-aa433dea.js';
@@ -2,18 +2,18 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, e as readTask, h, H as Host, f as getElement } from './index-b49b173c.js';
5
- import { c as createButtonActiveGesture } from './button-active-d926d4f4.js';
5
+ import { c as createButtonActiveGesture } from './button-active-c0672227.js';
6
6
  import { r as raf } from './helpers-3379ba19.js';
7
7
  import { c as createLockController } from './lock-controller-e8c6c051.js';
8
- import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-cec6bac8.js';
8
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-a25f3692.js';
9
9
  import { g as getClassMap } from './theme-17531cdf.js';
10
10
  import { b as getIonMode } from './ionic-global-246ca78f.js';
11
11
  import { c as createAnimation } from './animation-8aa13916.js';
12
12
  import './haptic-1243b917.js';
13
13
  import './capacitor-b4979570.js';
14
14
  import './index-7a14ecec.js';
15
- import './index-ff313b19.js';
16
- import './gesture-controller-0fa396c4.js';
15
+ import './index-32cbee52.js';
16
+ import './gesture-controller-3723db7c.js';
17
17
  import './framework-delegate-aa433dea.js';
18
18
  import './hardware-back-button-39299f84.js';
19
19
  import './index-595d62c9.js';
@@ -3,18 +3,18 @@
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, i as forceUpdate, h, H as Host, f as getElement } from './index-b49b173c.js';
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-96c9ace3.js';
6
- import { c as createButtonActiveGesture } from './button-active-d926d4f4.js';
6
+ import { c as createButtonActiveGesture } from './button-active-c0672227.js';
7
7
  import { r as raf } from './helpers-3379ba19.js';
8
8
  import { c as createLockController } from './lock-controller-e8c6c051.js';
9
- 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-cec6bac8.js';
9
+ 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-a25f3692.js';
10
10
  import { g as getClassMap } from './theme-17531cdf.js';
11
11
  import { c as config, b as getIonMode } from './ionic-global-246ca78f.js';
12
12
  import { c as createAnimation } from './animation-8aa13916.js';
13
13
  import './haptic-1243b917.js';
14
14
  import './capacitor-b4979570.js';
15
15
  import './index-7a14ecec.js';
16
- import './index-ff313b19.js';
17
- import './gesture-controller-0fa396c4.js';
16
+ import './index-32cbee52.js';
17
+ import './gesture-controller-3723db7c.js';
18
18
  import './framework-delegate-aa433dea.js';
19
19
  import './hardware-back-button-39299f84.js';
20
20
  import './index-595d62c9.js';
@@ -131,7 +131,7 @@ Buttons.style = {
131
131
  md: buttonsMdCss
132
132
  };
133
133
 
134
- const contentCss = ":host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.outer-content){--background:var(--ion-color-step-50, #f2f2f2)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:\"\"}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}";
134
+ const contentCss = ":host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:\"\"}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}";
135
135
 
136
136
  const Content = class {
137
137
  constructor(hostRef) {
@@ -1010,7 +1010,7 @@ const RouterOutlet = class {
1010
1010
  this.swipeHandler.onStart();
1011
1011
  }
1012
1012
  };
1013
- this.gesture = (await import('./swipe-back-0f3bfc8e.js')).createSwipeBackGesture(this.el, () => !this.gestureOrAnimationInProgress && !!this.swipeHandler && this.swipeHandler.canStart(), () => onStart(), (step) => { var _a; return (_a = this.ani) === null || _a === void 0 ? void 0 : _a.progressStep(step); }, (shouldComplete, step, dur) => {
1013
+ this.gesture = (await import('./swipe-back-cc4c2bcb.js')).createSwipeBackGesture(this.el, () => !this.gestureOrAnimationInProgress && !!this.swipeHandler && this.swipeHandler.canStart(), () => onStart(), (step) => { var _a; return (_a = this.ani) === null || _a === void 0 ? void 0 : _a.progressStep(step); }, (shouldComplete, step, dur) => {
1014
1014
  if (this.ani) {
1015
1015
  this.ani.onFinish(() => {
1016
1016
  this.gestureOrAnimationInProgress = false;
@@ -2,7 +2,6 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, d as createEvent, h, H as Host } from './index-b49b173c.js';
5
- import { G as GESTURE_CONTROLLER } from './gesture-controller-0fa396c4.js';
6
5
  import { b as getIonMode } from './ionic-global-246ca78f.js';
7
6
 
8
7
  const backdropIosCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
@@ -13,21 +12,10 @@ const Backdrop = class {
13
12
  constructor(hostRef) {
14
13
  registerInstance(this, hostRef);
15
14
  this.ionBackdropTap = createEvent(this, "ionBackdropTap", 7);
16
- this.blocker = GESTURE_CONTROLLER.createBlocker({
17
- disableScroll: true,
18
- });
19
15
  this.visible = true;
20
16
  this.tappable = true;
21
17
  this.stopPropagation = true;
22
18
  }
23
- connectedCallback() {
24
- if (this.stopPropagation) {
25
- this.blocker.block();
26
- }
27
- }
28
- disconnectedCallback() {
29
- this.blocker.unblock();
30
- }
31
19
  onMouseDown(ev) {
32
20
  this.emitTap(ev);
33
21
  }