@ionic/core 7.5.8-dev.11701894917.1c1465bd → 7.5.8-dev.11702074871.1238046f

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 (198) hide show
  1. package/components/data.js +1 -1
  2. package/components/ion-datetime.js +39 -30
  3. package/components/ion-picker-column-option.d.ts +11 -0
  4. package/components/ion-picker-column-option.js +9 -0
  5. package/components/ion-picker-column.js +2 -2
  6. package/components/ion-picker-legacy-column.d.ts +11 -0
  7. package/components/ion-picker-legacy-column.js +9 -0
  8. package/components/{ion-picker-internal.d.ts → ion-picker-legacy.d.ts} +4 -4
  9. package/components/ion-picker-legacy.js +309 -0
  10. package/components/ion-picker.js +1 -309
  11. package/components/overlays.js +6 -3
  12. package/components/picker-column-option.js +122 -0
  13. package/components/picker-column.js +351 -322
  14. package/components/picker-column2.js +379 -0
  15. package/components/{picker-internal.js → picker.js} +29 -22
  16. package/dist/cjs/{data-36b9094e.js → data-e7526b58.js} +1 -1
  17. package/dist/cjs/index.cjs.js +1 -1
  18. package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
  19. package/dist/cjs/ion-alert.cjs.entry.js +1 -1
  20. package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-datetime_3.cjs.entry.js +29 -35
  22. package/dist/cjs/ion-loading.cjs.entry.js +1 -1
  23. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  24. package/dist/cjs/ion-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/ion-picker-column-option.cjs.entry.js +104 -0
  26. package/dist/cjs/{ion-picker-column-internal.cjs.entry.js → ion-picker-column.cjs.entry.js} +104 -87
  27. package/dist/cjs/{ion-picker-internal.cjs.entry.js → ion-picker.cjs.entry.js} +26 -19
  28. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  29. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  30. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  31. package/dist/cjs/ionic.cjs.js +1 -1
  32. package/dist/cjs/loader.cjs.js +1 -1
  33. package/dist/cjs/{overlays-2c6b1072.js → overlays-e8e05b0e.js} +6 -3
  34. package/dist/collection/collection-manifest.json +7 -6
  35. package/dist/collection/components/datetime/datetime.ios.css +8 -13
  36. package/dist/collection/components/datetime/datetime.js +19 -16
  37. package/dist/collection/components/datetime/datetime.md.css +8 -13
  38. package/dist/collection/components/datetime/test/datetime.e2e.js +2 -2
  39. package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
  40. package/dist/collection/components/datetime/test/locale/datetime.e2e.js +2 -2
  41. package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +6 -6
  42. package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +43 -41
  43. package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
  44. package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
  45. package/dist/collection/components/datetime/test/values/datetime.e2e.js +15 -12
  46. package/dist/collection/components/datetime/utils/data.js +1 -1
  47. package/dist/collection/components/picker/picker.ios.css +113 -211
  48. package/dist/collection/components/picker/picker.js +468 -743
  49. package/dist/collection/components/picker/picker.md.css +109 -198
  50. package/dist/collection/components/{picker-internal/test/a11y/picker-internal.e2e.js → picker/test/a11y/picker.e2e.js} +2 -2
  51. package/dist/collection/components/picker/test/basic/picker.e2e.js +99 -13
  52. package/dist/collection/components/picker/test/custom/picker.e2e.js +85 -0
  53. package/dist/collection/components/{picker-internal/test/keyboard-entry/picker-internal.e2e.js → picker/test/keyboard-entry/picker.e2e.js} +63 -32
  54. package/dist/collection/components/{picker-column-internal/picker-column-internal.md.css → picker-column/picker-column.css} +96 -83
  55. package/dist/collection/components/picker-column/picker-column.js +497 -335
  56. package/dist/collection/components/{picker-column-internal/test/basic/picker-column-internal.e2e.js → picker-column/test/basic/picker-column.e2e.js} +8 -8
  57. package/dist/collection/components/picker-column/test/disabled/picker-column.e2e.js +91 -0
  58. package/dist/collection/components/picker-column/test/slots/picker-column.e2e.js +39 -0
  59. package/dist/collection/components/picker-column-option/picker-column-option.ios.css +87 -0
  60. package/dist/collection/components/picker-column-option/picker-column-option.js +173 -0
  61. package/dist/collection/components/{picker-column-internal/picker-column-internal.ios.css → picker-column-option/picker-column-option.md.css} +6 -53
  62. package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +18 -0
  63. package/dist/collection/components/picker-column-option/test/basic/picker-column-option.e2e.js +37 -0
  64. package/dist/collection/components/picker-column-option/test/picker-column-option.spec.js +29 -0
  65. package/dist/collection/components/{picker-internal/picker-internal.md.css → picker-legacy/picker.ios.css} +207 -98
  66. package/dist/collection/components/picker-legacy/picker.js +817 -0
  67. package/dist/collection/components/{picker-internal/picker-internal.ios.css → picker-legacy/picker.md.css} +192 -100
  68. package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +25 -0
  69. package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
  70. package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
  71. package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
  72. package/dist/collection/components/picker-legacy-column/picker-column.js +419 -0
  73. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-aria.spec.js +3 -3
  74. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-dynamic.spec.js +2 -2
  75. package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column.spec.js +2 -2
  76. package/dist/collection/components/{picker-column → picker-legacy-column}/test/standalone/picker-column.e2e.js +3 -3
  77. package/dist/collection/utils/overlays.js +6 -3
  78. package/dist/docs.json +493 -24
  79. package/dist/esm/{data-f5c75b4e.js → data-4b9508c9.js} +1 -1
  80. package/dist/esm/index.js +1 -1
  81. package/dist/esm/ion-action-sheet.entry.js +1 -1
  82. package/dist/esm/ion-alert.entry.js +1 -1
  83. package/dist/esm/ion-datetime-button.entry.js +1 -1
  84. package/dist/esm/ion-datetime_3.entry.js +28 -34
  85. package/dist/esm/ion-loading.entry.js +1 -1
  86. package/dist/esm/ion-menu_3.entry.js +1 -1
  87. package/dist/esm/ion-modal.entry.js +1 -1
  88. package/dist/esm/ion-picker-column-option.entry.js +100 -0
  89. package/dist/esm/{ion-picker-column-internal.entry.js → ion-picker-column.entry.js} +104 -87
  90. package/dist/esm/{ion-picker-internal.entry.js → ion-picker.entry.js} +26 -19
  91. package/dist/esm/ion-popover.entry.js +1 -1
  92. package/dist/esm/ion-select_3.entry.js +1 -1
  93. package/dist/esm/ion-toast.entry.js +1 -1
  94. package/dist/esm/ionic.js +1 -1
  95. package/dist/esm/loader.js +1 -1
  96. package/dist/esm/{overlays-d23ea6e1.js → overlays-fbc5cab5.js} +6 -3
  97. package/dist/esm-es5/index.js +1 -1
  98. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  99. package/dist/esm-es5/ion-alert.entry.js +1 -1
  100. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  101. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  102. package/dist/esm-es5/ion-loading.entry.js +1 -1
  103. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  104. package/dist/esm-es5/ion-modal.entry.js +1 -1
  105. package/dist/esm-es5/ion-picker-column-option.entry.js +4 -0
  106. package/dist/esm-es5/ion-picker-column.entry.js +4 -0
  107. package/dist/esm-es5/ion-picker.entry.js +4 -0
  108. package/dist/esm-es5/ion-popover.entry.js +1 -1
  109. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  110. package/dist/esm-es5/ion-toast.entry.js +1 -1
  111. package/dist/esm-es5/ionic.js +1 -1
  112. package/dist/esm-es5/loader.js +1 -1
  113. package/dist/esm-es5/overlays-fbc5cab5.js +4 -0
  114. package/dist/html.html-data.json +152 -1
  115. package/dist/ionic/index.esm.js +1 -1
  116. package/dist/ionic/ionic.esm.js +1 -1
  117. package/dist/ionic/{p-2f300cca.entry.js → p-21c3515a.entry.js} +1 -1
  118. package/dist/ionic/{p-1f620cd4.system.entry.js → p-26798a7b.system.entry.js} +1 -1
  119. package/dist/ionic/{p-e1e5afe1.system.entry.js → p-27bcbbc7.system.entry.js} +1 -1
  120. package/dist/ionic/p-36d194c5.entry.js +4 -0
  121. package/dist/ionic/{p-3b568d18.entry.js → p-4a081ea9.entry.js} +1 -1
  122. package/dist/ionic/{p-2f2293da.system.entry.js → p-4a36430f.system.entry.js} +1 -1
  123. package/dist/ionic/{p-fff7a57e.system.js → p-54dfc9b5.system.js} +1 -1
  124. package/dist/ionic/{p-60b386c9.system.entry.js → p-563c41f0.system.entry.js} +1 -1
  125. package/dist/ionic/p-5a1aac13.system.entry.js +4 -0
  126. package/dist/ionic/{p-27ea6f4e.entry.js → p-5d42b6b4.entry.js} +1 -1
  127. package/dist/ionic/{p-2dc43d20.entry.js → p-6b7c55cd.entry.js} +1 -1
  128. package/dist/ionic/{p-f78efbd1.entry.js → p-73190c5f.entry.js} +1 -1
  129. package/dist/ionic/{p-af19a573.entry.js → p-73aa7604.entry.js} +1 -1
  130. package/dist/ionic/{p-39a335b6.system.entry.js → p-8017aad2.system.entry.js} +1 -1
  131. package/dist/ionic/{p-1e57bd24.entry.js → p-846ee227.entry.js} +1 -1
  132. package/dist/ionic/p-8e42850f.entry.js +4 -0
  133. package/dist/ionic/p-8fa6583d.system.js +4 -0
  134. package/dist/ionic/{p-4df97e3c.system.entry.js → p-96dbbac1.system.entry.js} +1 -1
  135. package/dist/ionic/p-9f1b2214.entry.js +4 -0
  136. package/dist/ionic/{p-8780cc2a.entry.js → p-a8baa23e.entry.js} +1 -1
  137. package/dist/ionic/p-afcf4620.entry.js +4 -0
  138. package/dist/ionic/{p-ddb30596.entry.js → p-b133e9b4.entry.js} +1 -1
  139. package/dist/ionic/{p-3e3d06a6.system.entry.js → p-c18de88a.system.entry.js} +1 -1
  140. package/dist/ionic/p-c41bff4e.system.entry.js +4 -0
  141. package/dist/ionic/p-ca846d0b.system.entry.js +4 -0
  142. package/dist/ionic/p-ca8938f4.js +4 -0
  143. package/dist/ionic/p-e3584231.system.js +1 -1
  144. package/dist/ionic/{p-9eec42cc.system.entry.js → p-f910cc73.system.entry.js} +1 -1
  145. package/dist/ionic/{p-e3ad9607.system.entry.js → p-fbf3a689.system.entry.js} +1 -1
  146. package/dist/ionic/p-ffd5dba4.system.entry.js +4 -0
  147. package/dist/types/components/datetime/utils/data.d.ts +11 -7
  148. package/dist/types/components/picker/picker-interfaces.d.ts +8 -0
  149. package/dist/types/components/picker/picker.d.ts +74 -131
  150. package/dist/types/components/picker-column/picker-column-interfaces.d.ts +4 -0
  151. package/dist/types/components/picker-column/picker-column.d.ts +99 -39
  152. package/dist/types/components/picker-column-option/picker-column-option.d.ts +66 -0
  153. package/dist/types/components/picker-legacy/picker.d.ts +158 -0
  154. package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
  155. package/dist/types/components.d.ts +155 -122
  156. package/dist/types/interface.d.ts +1 -1
  157. package/dist/types/utils/config.d.ts +2 -2
  158. package/dist/types/utils/overlays.d.ts +5 -2
  159. package/hydrate/index.js +1486 -1362
  160. package/package.json +1 -1
  161. package/components/ion-picker-column-internal.d.ts +0 -11
  162. package/components/ion-picker-column-internal.js +0 -9
  163. package/components/ion-picker-internal.js +0 -9
  164. package/components/picker-column-internal.js +0 -390
  165. package/dist/collection/components/picker-column-internal/picker-column-internal.js +0 -565
  166. package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +0 -162
  167. package/dist/collection/components/picker-internal/picker-internal.js +0 -544
  168. package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +0 -118
  169. package/dist/esm-es5/ion-picker-column-internal.entry.js +0 -4
  170. package/dist/esm-es5/ion-picker-internal.entry.js +0 -4
  171. package/dist/esm-es5/overlays-d23ea6e1.js +0 -4
  172. package/dist/ionic/p-60502e3f.system.entry.js +0 -4
  173. package/dist/ionic/p-67da080d.entry.js +0 -4
  174. package/dist/ionic/p-73ea8f82.system.entry.js +0 -4
  175. package/dist/ionic/p-80fa068e.entry.js +0 -4
  176. package/dist/ionic/p-ab11130c.system.js +0 -4
  177. package/dist/ionic/p-af16fe62.entry.js +0 -4
  178. package/dist/ionic/p-c14f8ac8.js +0 -4
  179. package/dist/ionic/p-cce9f61a.system.entry.js +0 -4
  180. package/dist/types/components/picker-column-internal/picker-column-internal-interfaces.d.ts +0 -5
  181. package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -102
  182. package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +0 -8
  183. package/dist/types/components/picker-internal/picker-internal.d.ts +0 -102
  184. /package/dist/collection/components/{picker-internal/picker-internal-interfaces.js → picker/picker-interfaces.js} +0 -0
  185. /package/dist/collection/components/{picker-column-internal/picker-column-internal-interfaces.js → picker-column/picker-column-interfaces.js} +0 -0
  186. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
  187. /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
  188. /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
  189. /package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.ios.css +0 -0
  190. /package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.md.css +0 -0
  191. /package/dist/collection/components/{picker-column → picker-legacy-column}/test/test.utils.js +0 -0
  192. /package/dist/esm-es5/{data-f5c75b4e.js → data-4b9508c9.js} +0 -0
  193. /package/dist/ionic/{p-2aea8b1e.js → p-368f5215.js} +0 -0
  194. /package/dist/ionic/{p-82e3d633.system.js → p-f58981c2.system.js} +0 -0
  195. /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
  196. /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
  197. /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
  198. /package/dist/types/components/{picker-column → picker-legacy-column}/test/test.utils.d.ts +0 -0
@@ -977,7 +977,7 @@ export class Datetime {
977
977
  const renderArray = forcePresentation === 'time-date'
978
978
  ? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
979
979
  : [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
980
- return h("ion-picker-internal", null, renderArray);
980
+ return h("ion-picker", null, renderArray);
981
981
  }
982
982
  renderDatePickerColumns(forcePresentation) {
983
983
  return forcePresentation === 'date-time' || forcePresentation === 'time-date'
@@ -1036,7 +1036,7 @@ export class Datetime {
1036
1036
  const todayString = workingParts.day !== null
1037
1037
  ? `${workingParts.year}-${workingParts.month}-${workingParts.day}`
1038
1038
  : `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;
1039
- return (h("ion-picker-column-internal", { class: "date-column", color: this.color, disabled: disabled, items: items, value: todayString, onIonChange: (ev) => {
1039
+ return (h("ion-picker-column", { class: "date-column", color: this.color, disabled: disabled, value: todayString, onIonChange: (ev) => {
1040
1040
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1041
1041
  // Due to a Safari 14 issue we need to destroy
1042
1042
  // the scroll listener before we update state
@@ -1052,7 +1052,7 @@ export class Datetime {
1052
1052
  // the working parts have been updated.
1053
1053
  this.initializeCalendarListener();
1054
1054
  ev.stopPropagation();
1055
- } }));
1055
+ } }, items.map((item) => (h("ion-picker-column-option", { part: item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: item.value, disabled: item.disabled, value: item.value }, item.text)))));
1056
1056
  }
1057
1057
  renderIndividualDatePickerColumns(forcePresentation) {
1058
1058
  const { workingParts, isDateEnabled } = this;
@@ -1120,7 +1120,8 @@ export class Datetime {
1120
1120
  }
1121
1121
  const { disabled, workingParts } = this;
1122
1122
  const activePart = this.getActivePartsWithFallback();
1123
- return (h("ion-picker-column-internal", { class: "day-column", color: this.color, disabled: disabled, items: days, value: (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined, onIonChange: (ev) => {
1123
+ const pickerColumnValue = (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined;
1124
+ return (h("ion-picker-column", { class: "day-column", color: this.color, disabled: disabled, value: pickerColumnValue, onIonChange: (ev) => {
1124
1125
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1125
1126
  // Due to a Safari 14 issue we need to destroy
1126
1127
  // the scroll listener before we update state
@@ -1134,7 +1135,7 @@ export class Datetime {
1134
1135
  // the working parts have been updated.
1135
1136
  this.initializeCalendarListener();
1136
1137
  ev.stopPropagation();
1137
- } }));
1138
+ } }, days.map((day) => (h("ion-picker-column-option", { part: day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: day.value, disabled: day.disabled, value: day.value }, day.text)))));
1138
1139
  }
1139
1140
  renderMonthPickerColumn(months) {
1140
1141
  if (months.length === 0) {
@@ -1142,7 +1143,7 @@ export class Datetime {
1142
1143
  }
1143
1144
  const { disabled, workingParts } = this;
1144
1145
  const activePart = this.getActivePartsWithFallback();
1145
- return (h("ion-picker-column-internal", { class: "month-column", color: this.color, disabled: disabled, items: months, value: workingParts.month, onIonChange: (ev) => {
1146
+ return (h("ion-picker-column", { class: "month-column", color: this.color, disabled: disabled, value: workingParts.month, onIonChange: (ev) => {
1146
1147
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1147
1148
  // Due to a Safari 14 issue we need to destroy
1148
1149
  // the scroll listener before we update state
@@ -1156,7 +1157,7 @@ export class Datetime {
1156
1157
  // the working parts have been updated.
1157
1158
  this.initializeCalendarListener();
1158
1159
  ev.stopPropagation();
1159
- } }));
1160
+ } }, months.map((month) => (h("ion-picker-column-option", { part: month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: month.value, disabled: month.disabled, value: month.value }, month.text)))));
1160
1161
  }
1161
1162
  renderYearPickerColumn(years) {
1162
1163
  if (years.length === 0) {
@@ -1164,7 +1165,7 @@ export class Datetime {
1164
1165
  }
1165
1166
  const { disabled, workingParts } = this;
1166
1167
  const activePart = this.getActivePartsWithFallback();
1167
- return (h("ion-picker-column-internal", { class: "year-column", color: this.color, disabled: disabled, items: years, value: workingParts.year, onIonChange: (ev) => {
1168
+ return (h("ion-picker-column", { class: "year-column", color: this.color, disabled: disabled, value: workingParts.year, onIonChange: (ev) => {
1168
1169
  // TODO(FW-1823) Remove this when iOS 14 support is dropped.
1169
1170
  // Due to a Safari 14 issue we need to destroy
1170
1171
  // the scroll listener before we update state
@@ -1178,7 +1179,7 @@ export class Datetime {
1178
1179
  // the working parts have been updated.
1179
1180
  this.initializeCalendarListener();
1180
1181
  ev.stopPropagation();
1181
- } }));
1182
+ } }, years.map((year) => (h("ion-picker-column-option", { part: year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: year.value, disabled: year.disabled, value: year.value }, year.text)))));
1182
1183
  }
1183
1184
  renderTimePickerColumns(forcePresentation) {
1184
1185
  if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {
@@ -1207,22 +1208,22 @@ export class Datetime {
1207
1208
  if (hoursData.length === 0)
1208
1209
  return [];
1209
1210
  const activePart = this.getActivePartsWithFallback();
1210
- return (h("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.hour, items: hoursData, numericInput: true, onIonChange: (ev) => {
1211
+ return (h("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.hour, numericInput: true, onIonChange: (ev) => {
1211
1212
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
1212
1213
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));
1213
1214
  ev.stopPropagation();
1214
- } }));
1215
+ } }, hoursData.map((hour) => (h("ion-picker-column-option", { part: hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: hour.value, disabled: hour.disabled, value: hour.value }, hour.text)))));
1215
1216
  }
1216
1217
  renderMinutePickerColumn(minutesData) {
1217
1218
  const { disabled, workingParts } = this;
1218
1219
  if (minutesData.length === 0)
1219
1220
  return [];
1220
1221
  const activePart = this.getActivePartsWithFallback();
1221
- return (h("ion-picker-column-internal", { color: this.color, disabled: disabled, value: activePart.minute, items: minutesData, numericInput: true, onIonChange: (ev) => {
1222
+ return (h("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.minute, numericInput: true, onIonChange: (ev) => {
1222
1223
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
1223
1224
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));
1224
1225
  ev.stopPropagation();
1225
- } }));
1226
+ } }, minutesData.map((minute) => (h("ion-picker-column-option", { part: minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: minute.value, disabled: minute.disabled, value: minute.value }, minute.text)))));
1226
1227
  }
1227
1228
  renderDayPeriodPickerColumn(dayPeriodData) {
1228
1229
  const { disabled, workingParts } = this;
@@ -1231,12 +1232,12 @@ export class Datetime {
1231
1232
  }
1232
1233
  const activePart = this.getActivePartsWithFallback();
1233
1234
  const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
1234
- return (h("ion-picker-column-internal", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, items: dayPeriodData, onIonChange: (ev) => {
1235
+ return (h("ion-picker-column", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, onIonChange: (ev) => {
1235
1236
  const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
1236
1237
  this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
1237
1238
  this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));
1238
1239
  ev.stopPropagation();
1239
- } }));
1240
+ } }, dayPeriodData.map((dayPeriod) => (h("ion-picker-column-option", { part: dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: dayPeriod.value, disabled: dayPeriod.disabled, value: dayPeriod.value }, dayPeriod.text)))));
1240
1241
  }
1241
1242
  renderWheelView(forcePresentation) {
1242
1243
  const { locale } = this;
@@ -1422,7 +1423,7 @@ export class Datetime {
1422
1423
  * This will correctly scroll the element position to the correct time value,
1423
1424
  * before the popover is fully presented.
1424
1425
  */
1425
- const cols = ev.target.querySelectorAll('ion-picker-column-internal');
1426
+ const cols = ev.target.querySelectorAll('ion-picker-column');
1426
1427
  // TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column
1427
1428
  cols.forEach((col) => col.scrollActiveItemIntoView());
1428
1429
  }, style: {
@@ -2350,3 +2351,5 @@ export class Datetime {
2350
2351
  }
2351
2352
  }
2352
2353
  let datetimeIds = 0;
2354
+ const WHEEL_ITEM_PART = 'wheel-item';
2355
+ const WHEEL_ITEM_ACTIVE_PART = `active`;
@@ -61,6 +61,8 @@
61
61
  *
62
62
  * @prop --wheel-highlight-background: The background of the highlight under the selected
63
63
  * item when using a wheel style layout, or in the month/year picker for grid style layouts.
64
+ * @prop --wheel-highlight-border-radius: The border radius of the highlight under the selected
65
+ * item when using a wheel style layout, or in the month/year picker for grid style layouts.
64
66
  * @prop --wheel-fade-background-rgb: The color of the gradient covering non-selected items
65
67
  * when using a wheel style layout, or in the month/year picker for grid style layouts. Must
66
68
  * be in RGB format, e.g. `255, 255, 255`.
@@ -71,19 +73,6 @@
71
73
  overflow: hidden;
72
74
  }
73
75
 
74
- /**
75
- * When using the wheel picker to switch
76
- * between months, sometimes the allowed
77
- * dates may be filtered. As a result, it
78
- * is possible to get a layout shift as
79
- * the picker column will shrink to fit the
80
- * widest item in the column. Setting a minimum
81
- * width avoids this layout shifting.
82
- */
83
- ion-picker-column-internal {
84
- min-width: 26px;
85
- }
86
-
87
76
  :host(.datetime-size-fixed) {
88
77
  width: auto;
89
78
  height: auto;
@@ -562,6 +551,12 @@ ion-picker-column-internal {
562
551
  align-items: center;
563
552
  }
564
553
 
554
+ ion-picker {
555
+ --highlight-background: var(--wheel-highlight-background);
556
+ --highlight-border-radius: var(--wheel-highlight-border-radius);
557
+ --fade-background-rgb: var(--wheel-fade-background-rgb);
558
+ }
559
+
565
560
  /**
566
561
  * Convert a font size to a dynamic font size.
567
562
  * Fonts that participate in Dynamic Type should use
@@ -13,7 +13,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
13
13
  });
14
14
  test('should switch the calendar header when moving to a month with a different number of days', async ({ page, }) => {
15
15
  const monthYearToggle = page.locator('ion-datetime .calendar-month-year');
16
- const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)');
16
+ const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
17
17
  await expect(monthYearToggle).toContainText('January 2022');
18
18
  await monthYearToggle.click();
19
19
  await page.waitForChanges();
@@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
24
24
  });
25
25
  test('should adjust the selected day when moving to a month with a different number of days', async ({ page }) => {
26
26
  const monthYearToggle = page.locator('ion-datetime .calendar-month-year');
27
- const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)');
27
+ const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
28
28
  const datetime = page.locator('ion-datetime');
29
29
  const ionChange = await page.spyOnEvent('ionChange');
30
30
  await monthYearToggle.click();
@@ -4,8 +4,8 @@
4
4
  import { h } from "@stencil/core";
5
5
  import { newSpecPage } from "@stencil/core/testing";
6
6
  import { Datetime } from "../../../datetime/datetime";
7
- import { PickerColumnInternal } from "../../../picker-column-internal/picker-column-internal";
8
- import { PickerInternal } from "../../../picker-internal/picker-internal";
7
+ import { PickerColumn } from "../../../picker-column/picker-column";
8
+ import { Picker } from "../../../picker/picker";
9
9
  describe('ion-datetime disabled', () => {
10
10
  beforeEach(() => {
11
11
  // IntersectionObserver isn't available in test environment
@@ -19,12 +19,12 @@ describe('ion-datetime disabled', () => {
19
19
  });
20
20
  it('picker should be disabled in prefer wheel mode', async () => {
21
21
  const page = await newSpecPage({
22
- components: [Datetime, PickerColumnInternal, PickerInternal],
22
+ components: [Datetime, PickerColumn, Picker],
23
23
  template: () => (h("ion-datetime", { id: "inline-datetime-wheel", disabled: true, "prefer-wheel": true, value: "2022-04-21T00:00:00" })),
24
24
  });
25
25
  await page.waitForChanges();
26
26
  const datetime = page.body.querySelector('ion-datetime');
27
- const columns = datetime.shadowRoot.querySelectorAll('ion-picker-column-internal');
27
+ const columns = datetime.shadowRoot.querySelectorAll('ion-picker-column');
28
28
  await expect(columns.length).toEqual(4);
29
29
  columns.forEach((column) => {
30
30
  expect(column.disabled).toBe(true);
@@ -85,10 +85,10 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
85
85
  });
86
86
  test('should correctly localize year column data', async ({ page }) => {
87
87
  await page.setContent(`
88
- <ion-datetime prefer-wheel="true" locale="ar-EG" presentation="date" value="2022-01-01"></ion-datetime>
88
+ <ion-datetime prefer-wheel="true" locale="ar-EG" presentation="date" value="2022-01-01" max="2022" min="2022"></ion-datetime>
89
89
  `, config);
90
90
  await page.waitForSelector('.datetime-ready');
91
- const datetimeYear = page.locator('ion-datetime .year-column .picker-item[data-value="2022"]');
91
+ const datetimeYear = page.locator('ion-datetime .year-column ion-picker-column-option').nth(0);
92
92
  await expect(datetimeYear).toHaveText('٢٠٢٢');
93
93
  });
94
94
  });
@@ -81,8 +81,8 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
81
81
  const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
82
82
  await page.click('.time-body');
83
83
  await ionPopoverDidPresent.next();
84
- const hours = page.locator('ion-popover ion-picker-column-internal:nth-child(1) .picker-item:not(.picker-item-empty)');
85
- const minutes = page.locator('ion-popover ion-picker-column-internal:nth-child(2) .picker-item:not(.picker-item-empty)');
84
+ const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option');
85
+ const minutes = page.locator('ion-popover ion-picker-column:nth-child(2) ion-picker-column-option');
86
86
  expect(await hours.count()).toBe(12);
87
87
  expect(await minutes.count()).toBe(60);
88
88
  });
@@ -159,7 +159,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
159
159
  value="2022-04-25T08:30:00"
160
160
  ></ion-datetime>
161
161
  `, config);
162
- const hourPickerItems = page.locator('ion-datetime ion-picker-column-internal:first-of-type .picker-item:not(.picker-item-empty)');
162
+ const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option');
163
163
  await expect(hourPickerItems).toHaveText(['8', '9', '10', '11']);
164
164
  });
165
165
  test('should include 12PM when minimum is greater than 12', async ({ page }) => {
@@ -175,7 +175,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
175
175
  value="2022-07-29T12:00:00"
176
176
  ></ion-datetime>
177
177
  `, config);
178
- const hourPickerItems = page.locator('ion-datetime ion-picker-column-internal:first-of-type .picker-item:not(.picker-item-empty)');
178
+ const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option');
179
179
  await expect(hourPickerItems).toHaveText(['12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']);
180
180
  });
181
181
  test.describe('minmax value adjustment when out of bounds', () => {
@@ -218,7 +218,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
218
218
  ></ion-datetime>
219
219
  `, config);
220
220
  const datetime = page.locator('ion-datetime');
221
- const monthColumnItems = page.locator('ion-datetime .month-column .picker-item:not(.picker-item-empty)');
221
+ const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
222
222
  const ionChange = await page.spyOnEvent('ionChange');
223
223
  await page.waitForSelector('.datetime-ready');
224
224
  await monthColumnItems.nth(0).click(); // switch to January
@@ -258,7 +258,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
258
258
  const timeButton = page.locator('ion-datetime .time-body');
259
259
  await timeButton.click();
260
260
  await ionPopoverDidPresent.next();
261
- const hours = page.locator('ion-popover ion-picker-column-internal:nth-child(1) .picker-item:not(.picker-item-empty)');
261
+ const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option');
262
262
  await expect(await hours.count()).toBe(4);
263
263
  });
264
264
  });
@@ -60,7 +60,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
60
60
  <ion-datetime presentation="date" prefer-wheel="true" min="2019-05-05" max="2023-10-01" value="2019-05-30"></ion-datetime>
61
61
  `, config);
62
62
  await page.waitForSelector('.datetime-ready');
63
- const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]');
63
+ const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option');
64
64
  expect(await dayValues.count()).toEqual(27);
65
65
  });
66
66
  test('should respect the max bounds', async ({ page }) => {
@@ -68,7 +68,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
68
68
  <ion-datetime presentation="date" prefer-wheel="true" min="2019-05-05" max="2023-10-01" value="2023-10-01"></ion-datetime>
69
69
  `, config);
70
70
  await page.waitForSelector('.datetime-ready');
71
- const dayValues = page.locator('ion-datetime .day-column .picker-item[data-value]');
71
+ const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option');
72
72
  expect(await dayValues.count()).toEqual(1);
73
73
  });
74
74
  test('should respect isDateEnabled preference', async ({ page }) => {
@@ -86,9 +86,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
86
86
  </script>
87
87
  `, config);
88
88
  await page.waitForSelector('.datetime-ready');
89
- const disabledMonths = page.locator('.month-column .picker-item[disabled]');
90
- const disabledYears = page.locator('.year-column .picker-item[disabled]');
91
- const disabledDays = page.locator('.day-column .picker-item[disabled]');
89
+ const disabledMonths = page.locator('.month-column ion-picker-column-option.option-disabled');
90
+ const disabledYears = page.locator('.year-column ion-picker-column-option.option-disabled');
91
+ const disabledDays = page.locator('.day-column ion-picker-column-option.option-disabled');
92
92
  expect(await disabledMonths.count()).toBe(0);
93
93
  expect(await disabledYears.count()).toBe(0);
94
94
  expect(await disabledDays.count()).toBe(15);
@@ -105,9 +105,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
105
105
  ></ion-datetime>
106
106
  `, config);
107
107
  await page.waitForSelector('.datetime-ready');
108
- const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
109
- const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)');
110
- const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
108
+ const monthValues = page.locator('.month-column ion-picker-column-option');
109
+ const yearValues = page.locator('.year-column ion-picker-column-option');
110
+ const dayValues = page.locator('.day-column ion-picker-column-option');
111
111
  expect(await monthValues.count()).toBe(2);
112
112
  expect(await yearValues.count()).toBe(3);
113
113
  expect(await dayValues.count()).toBe(5);
@@ -134,7 +134,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
134
134
  `, config);
135
135
  await page.waitForSelector('.datetime-ready');
136
136
  const ionChange = await page.spyOnEvent('ionChange');
137
- const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
137
+ const monthValues = page.locator('.month-column ion-picker-column-option');
138
138
  // Change month value
139
139
  await monthValues.nth(0).click();
140
140
  await ionChange.next();
@@ -161,7 +161,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
161
161
  `, config);
162
162
  await page.waitForSelector('.datetime-ready');
163
163
  const ionChange = await page.spyOnEvent('ionChange');
164
- const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
164
+ const dayValues = page.locator('.day-column ion-picker-column-option');
165
165
  // Change day value
166
166
  await dayValues.nth(0).click();
167
167
  await ionChange.next();
@@ -175,7 +175,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
175
175
  `, config);
176
176
  await page.waitForSelector('.datetime-ready');
177
177
  const ionChange = await page.spyOnEvent('ionChange');
178
- const yearValues = page.locator('.year-column .picker-item:not(.picker-item-empty)');
178
+ const yearValues = page.locator('.year-column ion-picker-column-option');
179
179
  /**
180
180
  * Change year value
181
181
  * The 0th index is the current
@@ -192,9 +192,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
192
192
  const datetime = page.locator('ion-datetime');
193
193
  await datetime.evaluate((el) => (el.value = '2021-05-25T12:40:00.000Z'));
194
194
  await page.waitForChanges();
195
- const selectedMonth = datetime.locator('.month-column .picker-item-active');
196
- const selectedDay = datetime.locator('.day-column .picker-item-active');
197
- const selectedYear = datetime.locator('.year-column .picker-item-active');
195
+ const selectedMonth = datetime.locator('.month-column ion-picker-column-option.option-active');
196
+ const selectedDay = datetime.locator('.day-column ion-picker-column-option.option-active');
197
+ const selectedYear = datetime.locator('.year-column ion-picker-column-option.option-active');
198
198
  await expect(selectedMonth).toHaveText(/May/);
199
199
  await expect(selectedDay).toHaveText(/25/);
200
200
  await expect(selectedYear).toHaveText(/2021/);
@@ -213,8 +213,8 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
213
213
  ></ion-datetime>
214
214
  `, config);
215
215
  await page.waitForSelector('.datetime-ready');
216
- const monthValues = page.locator('.month-column .picker-item:not(.picker-item-empty)');
217
- const dayValues = page.locator('.day-column .picker-item:not(.picker-item-empty)');
216
+ const monthValues = page.locator('.month-column ion-picker-column-option');
217
+ const dayValues = page.locator('.day-column ion-picker-column-option');
218
218
  await expect(monthValues).toHaveText(['1月', '2月', '3月']);
219
219
  await expect(dayValues).toHaveText(['1日', '2日', '3日']);
220
220
  });
@@ -228,7 +228,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
228
228
  ></ion-datetime>
229
229
  `, config);
230
230
  await page.waitForSelector('.datetime-ready');
231
- const columns = page.locator('ion-picker-column-internal');
231
+ const columns = page.locator('ion-picker-column');
232
232
  await expect(columns.nth(0)).toHaveClass(/month-column/);
233
233
  await expect(columns.nth(1)).toHaveClass(/day-column/);
234
234
  await expect(columns.nth(2)).toHaveClass(/year-column/);
@@ -243,7 +243,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
243
243
  ></ion-datetime>
244
244
  `, config);
245
245
  await page.waitForSelector('.datetime-ready');
246
- const columns = page.locator('ion-picker-column-internal');
246
+ const columns = page.locator('ion-picker-column');
247
247
  await expect(columns.nth(0)).toHaveClass(/day-column/);
248
248
  await expect(columns.nth(1)).toHaveClass(/month-column/);
249
249
  await expect(columns.nth(2)).toHaveClass(/year-column/);
@@ -256,7 +256,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
256
256
  <ion-datetime presentation="date-time" prefer-wheel="true" min="2019-05-05" value="2019-05-10T16:30:00"></ion-datetime>
257
257
  `, config);
258
258
  await page.waitForSelector('.datetime-ready');
259
- const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
259
+ const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
260
260
  expect(await dayValues.count()).toEqual(57);
261
261
  });
262
262
  test('should respect the max bounds', async ({ page }) => {
@@ -264,7 +264,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
264
264
  <ion-datetime presentation="date-time" prefer-wheel="true" max="2023-06-10" value="2023-06-05T16:30:00"></ion-datetime>
265
265
  `, config);
266
266
  await page.waitForSelector('.datetime-ready');
267
- const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
267
+ const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
268
268
  expect(await dayValues.count()).toEqual(41);
269
269
  });
270
270
  test('should respect isDateEnabled preference', async ({ page }) => {
@@ -282,7 +282,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
282
282
  </script>
283
283
  `, config);
284
284
  await page.waitForSelector('.datetime-ready');
285
- const disabledDates = page.locator('.date-column .picker-item[disabled]');
285
+ const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled');
286
286
  expect(await disabledDates.count()).toBe(44);
287
287
  });
288
288
  test('should respect month, day, and year preferences', async ({ page }) => {
@@ -297,7 +297,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
297
297
  ></ion-datetime>
298
298
  `, config);
299
299
  await page.waitForSelector('.datetime-ready');
300
- const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
300
+ const dateValues = page.locator('.date-column ion-picker-column-option');
301
301
  expect(await dateValues.count()).toBe(5);
302
302
  });
303
303
  test('should correctly localize the date data', async ({ page }) => {
@@ -312,7 +312,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
312
312
  ></ion-datetime>
313
313
  `, config);
314
314
  await page.waitForSelector('.datetime-ready');
315
- const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
315
+ const dateValues = page.locator('.date-column ion-picker-column-option');
316
316
  await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
317
317
  });
318
318
  test('should respect min and max bounds even across years', async ({ page }) => {
@@ -327,15 +327,16 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
327
327
  `, config);
328
328
  await page.waitForSelector('.datetime-ready');
329
329
  const dateColumn = page.locator('.date-column');
330
- const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)');
330
+ const dateColumnScrollEl = dateColumn.locator('.picker-opts');
331
+ const dateValues = dateColumn.locator('ion-picker-column-option');
331
332
  expect(await dateValues.count()).toBe(90);
332
333
  /**
333
334
  * Select 1st item to change the dates rendered
334
335
  */
335
- await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2022-1-1');
336
- await dateColumn.evaluate((el) => (el.scrollTop = 0));
336
+ await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1');
337
+ await dateColumnScrollEl.evaluate((el) => (el.scrollTop = 0));
337
338
  await page.waitForChanges();
338
- await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2021-12-1');
339
+ await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1');
339
340
  });
340
341
  test('should keep sliding window if default window is within min and max constraints', async ({ page }) => {
341
342
  await page.setContent(`
@@ -348,7 +349,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
348
349
  ></ion-datetime>
349
350
  `, config);
350
351
  await page.waitForSelector('.datetime-ready');
351
- const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
352
+ const dayValues = page.locator('.date-column ion-picker-column-option');
352
353
  expect(await dayValues.count()).toBe(92);
353
354
  });
354
355
  test('should narrow sliding window if default window is not within min and max constraints', async ({ page }) => {
@@ -362,7 +363,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
362
363
  ></ion-datetime>
363
364
  `, config);
364
365
  await page.waitForSelector('.datetime-ready');
365
- const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
366
+ const dayValues = page.locator('.date-column ion-picker-column-option');
366
367
  expect(await dayValues.count()).toBe(15);
367
368
  });
368
369
  test('selecting date should update value when no value is set', async ({ page }) => {
@@ -374,7 +375,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
374
375
  `, config);
375
376
  await page.waitForSelector('.datetime-ready');
376
377
  const ionChange = await page.spyOnEvent('ionChange');
377
- const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
378
+ const dayValues = page.locator('.date-column ion-picker-column-option');
378
379
  // Change day/month value
379
380
  await dayValues.nth(0).click();
380
381
  await ionChange.next();
@@ -386,7 +387,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
386
387
  <ion-datetime presentation="time-date" prefer-wheel="true" min="2019-05-05" value="2019-05-10T16:30:00"></ion-datetime>
387
388
  `, config);
388
389
  await page.waitForSelector('.datetime-ready');
389
- const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
390
+ const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
390
391
  expect(await dayValues.count()).toEqual(57);
391
392
  });
392
393
  test('should respect the max bounds', async ({ page }) => {
@@ -394,7 +395,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
394
395
  <ion-datetime presentation="time-date" prefer-wheel="true" max="2023-06-10" value="2023-06-05T16:30:00"></ion-datetime>
395
396
  `, config);
396
397
  await page.waitForSelector('.datetime-ready');
397
- const dayValues = page.locator('ion-datetime .date-column .picker-item[data-value]');
398
+ const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
398
399
  expect(await dayValues.count()).toEqual(41);
399
400
  });
400
401
  test('should respect isDateEnabled preference', async ({ page }) => {
@@ -412,7 +413,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
412
413
  </script>
413
414
  `, config);
414
415
  await page.waitForSelector('.datetime-ready');
415
- const disabledDates = page.locator('.date-column .picker-item[disabled]');
416
+ const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled');
416
417
  expect(await disabledDates.count()).toBe(44);
417
418
  });
418
419
  test('should respect month, day, and year preferences', async ({ page }) => {
@@ -427,7 +428,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
427
428
  ></ion-datetime>
428
429
  `, config);
429
430
  await page.waitForSelector('.datetime-ready');
430
- const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
431
+ const dateValues = page.locator('.date-column ion-picker-column-option');
431
432
  expect(await dateValues.count()).toBe(5);
432
433
  });
433
434
  test('should correctly localize the date data', async ({ page }) => {
@@ -442,7 +443,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
442
443
  ></ion-datetime>
443
444
  `, config);
444
445
  await page.waitForSelector('.datetime-ready');
445
- const dateValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
446
+ const dateValues = page.locator('.date-column ion-picker-column-option');
446
447
  await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
447
448
  });
448
449
  test('should respect min and max bounds even across years', async ({ page }) => {
@@ -457,15 +458,16 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
457
458
  `, config);
458
459
  await page.waitForSelector('.datetime-ready');
459
460
  const dateColumn = page.locator('.date-column');
460
- const dateValues = dateColumn.locator('.picker-item:not(.picker-item-empty)');
461
+ const dateColumnScrollEl = dateColumn.locator('.picker-opts');
462
+ const dateValues = dateColumn.locator('ion-picker-column-option');
461
463
  expect(await dateValues.count()).toBe(90);
462
464
  /**
463
465
  * Select 1st item to change the dates rendered
464
466
  */
465
- await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2022-1-1');
466
- await dateColumn.evaluate((el) => (el.scrollTop = 0));
467
+ await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1');
468
+ await dateColumnScrollEl.evaluate((el) => (el.scrollTop = 0));
467
469
  await page.waitForChanges();
468
- await expect(dateValues.nth(0)).toHaveAttribute('data-value', '2021-12-1');
470
+ await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1');
469
471
  });
470
472
  test('should keep sliding window if default window is within min and max constraints', async ({ page }) => {
471
473
  await page.setContent(`
@@ -478,7 +480,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
478
480
  ></ion-datetime>
479
481
  `, config);
480
482
  await page.waitForSelector('.datetime-ready');
481
- const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
483
+ const dayValues = page.locator('.date-column ion-picker-column-option');
482
484
  expect(await dayValues.count()).toBe(92);
483
485
  });
484
486
  test('should narrow sliding window if default window is not within min and max constraints', async ({ page }) => {
@@ -492,7 +494,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
492
494
  ></ion-datetime>
493
495
  `, config);
494
496
  await page.waitForSelector('.datetime-ready');
495
- const dayValues = page.locator('.date-column .picker-item:not(.picker-item-empty)');
497
+ const dayValues = page.locator('.date-column ion-picker-column-option');
496
498
  expect(await dayValues.count()).toBe(15);
497
499
  });
498
500
  });
@@ -161,7 +161,7 @@ class TimePickerFixture {
161
161
  await this.page.waitForChanges();
162
162
  }
163
163
  async expectTime(hour, minute, ampm) {
164
- const pickerColumns = this.timePicker.locator('ion-picker-column-internal');
164
+ const pickerColumns = this.timePicker.locator('ion-picker-column');
165
165
  await expect(pickerColumns.nth(0)).toHaveJSProperty('value', hour);
166
166
  await expect(pickerColumns.nth(1)).toHaveJSProperty('value', minute);
167
167
  await expect(pickerColumns.nth(2)).toHaveJSProperty('value', ampm);
@@ -34,7 +34,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
34
34
  await expect(calendarMonthYear).toHaveText('February 2022');
35
35
  await calendarMonthYear.click();
36
36
  await page.waitForChanges();
37
- await page.locator('.month-column .picker-item[data-value="3"]').click();
37
+ await page.locator('.month-column ion-picker-column-option').nth(2).click();
38
38
  await page.waitForChanges();
39
39
  await expect(calendarMonthYear).toHaveText('March 2022');
40
40
  await expect(ionChange).not.toHaveReceivedEvent();
@@ -53,7 +53,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
53
53
  await page.waitForChanges();
54
54
  await page.keyboard.press('Enter');
55
55
  await page.waitForChanges();
56
- const marchPickerItem = page.locator('.month-column .picker-item[data-value="3"]');
56
+ const marchPickerItem = page.locator('.month-column ion-picker-column-option').nth(2);
57
57
  await expect(marchPickerItem).toBeVisible();
58
58
  });
59
59
  test('should view next month via next button', async ({ page }) => {