@ionic/core 7.5.7-dev.11700601419.1c57af2e → 7.5.7-dev.11701113479.149fdab6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/alert.js +1 -1
- package/components/backdrop.js +0 -12
- package/components/gesture-controller.js +1 -1
- package/components/ion-content.js +1 -1
- package/components/ion-datetime.js +29 -62
- package/components/ion-infinite-scroll.js +3 -11
- package/components/ion-picker-legacy-column.d.ts +11 -0
- package/components/{ion-picker-column.js → ion-picker-legacy-column.js} +2 -2
- package/components/{ion-picker-column.d.ts → ion-picker-legacy.d.ts} +4 -4
- package/components/ion-picker-legacy.js +309 -0
- package/components/overlays.js +11 -4
- package/components/picker-column-internal.js +12 -7
- package/components/picker-column.js +3 -3
- package/dist/cjs/{button-active-af897e0e.js → button-active-cd07b55b.js} +1 -1
- package/dist/cjs/{gesture-controller-b46721be.js → gesture-controller-d6a3f907.js} +1 -0
- package/dist/cjs/{index-0ee995e4.js → index-0f8b33f8.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +5 -5
- package/dist/cjs/ion-app_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +0 -12
- package/dist/cjs/ion-datetime_3.cjs.entry.js +30 -43
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +3 -11
- package/dist/cjs/ion-item-option_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +2 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-modal.cjs.entry.js +3 -3
- package/dist/cjs/ion-nav_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +11 -7
- package/dist/cjs/ion-popover.cjs.entry.js +2 -1
- package/dist/cjs/ion-range.cjs.entry.js +1 -1
- package/dist/cjs/ion-refresher_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -1
- package/dist/cjs/ion-toast.cjs.entry.js +2 -1
- package/dist/cjs/ion-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-2ffc5f27.js → overlays-dbb71984.js} +11 -4
- package/dist/cjs/{swipe-back-d0412fb6.js → swipe-back-a6dc6e5d.js} +2 -2
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/alert/alert.ios.css +10 -0
- package/dist/collection/components/backdrop/backdrop.js +0 -12
- package/dist/collection/components/content/content.css +0 -4
- package/dist/collection/components/datetime/datetime.ios.css +83 -24
- package/dist/collection/components/datetime/datetime.js +19 -34
- package/dist/collection/components/datetime/datetime.md.css +88 -24
- package/dist/collection/components/datetime/test/a11y/datetime.e2e.js +1 -1
- package/dist/collection/components/datetime/test/a11y/datetime.spec.js +6 -9
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +10 -0
- package/dist/collection/components/datetime/test/disabled/datetime.spec.js +33 -0
- package/dist/collection/components/datetime/test/month-year-picker/datetime.e2e.js +1 -1
- package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +3 -11
- package/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +11 -3
- package/dist/collection/components/picker-column-internal/picker-column-internal.js +27 -5
- package/dist/collection/components/picker-column-internal/picker-column-internal.md.css +11 -3
- package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +34 -5
- package/dist/collection/components/{picker-column → picker-column-legacy}/picker-column.js +5 -5
- package/dist/collection/components/{picker-column → picker-column-legacy}/test/picker-column-aria.spec.js +3 -3
- package/dist/collection/components/{picker-column → picker-column-legacy}/test/picker-column-dynamic.spec.js +2 -2
- package/dist/collection/components/{picker-column → picker-column-legacy}/test/picker-column.spec.js +2 -2
- package/dist/collection/components/{picker-column → picker-column-legacy}/test/standalone/picker-column.e2e.js +3 -3
- package/dist/collection/components/{picker → picker-legacy}/picker.js +7 -5
- package/dist/collection/components/{picker → picker-legacy}/test/basic/picker.e2e.js +2 -2
- package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
- package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
- package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
- package/dist/collection/utils/gesture/gesture-controller.js +1 -1
- package/dist/collection/utils/overlays.js +11 -4
- package/dist/collection/utils/test/overlays/overlays-scroll-blocking.spec.js +65 -0
- package/dist/docs.json +32 -43
- package/dist/esm/{button-active-ce5cba4c.js → button-active-5b0516e7.js} +1 -1
- package/dist/esm/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
- package/dist/esm/{index-ff313b19.js → index-32cbee52.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +5 -5
- package/dist/esm/ion-app_8.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +0 -12
- package/dist/esm/ion-datetime_3.entry.js +29 -42
- package/dist/esm/ion-infinite-scroll_2.entry.js +3 -11
- package/dist/esm/ion-item-option_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +2 -1
- package/dist/esm/ion-menu_3.entry.js +3 -3
- package/dist/esm/ion-modal.entry.js +3 -3
- package/dist/esm/ion-nav_2.entry.js +1 -1
- package/dist/esm/ion-picker-column-internal.entry.js +11 -7
- package/dist/esm/ion-popover.entry.js +2 -1
- package/dist/esm/ion-range.entry.js +1 -1
- package/dist/esm/ion-refresher_2.entry.js +3 -3
- package/dist/esm/ion-reorder_2.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +2 -1
- package/dist/esm/ion-toast.entry.js +2 -1
- package/dist/esm/ion-toggle.entry.js +1 -1
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-6c9feb7e.js → overlays-789cd7a7.js} +11 -4
- package/dist/esm/{swipe-back-0f3bfc8e.js → swipe-back-cc4c2bcb.js} +2 -2
- package/dist/esm-es5/{button-active-ce5cba4c.js → button-active-5b0516e7.js} +1 -1
- package/dist/esm-es5/{gesture-controller-0fa396c4.js → gesture-controller-3723db7c.js} +1 -1
- package/dist/esm-es5/{index-ff313b19.js → index-32cbee52.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/overlays-789cd7a7.js +4 -0
- package/dist/esm-es5/swipe-back-cc4c2bcb.js +4 -0
- package/dist/html.html-data.json +2 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-02d8fdba.system.entry.js +4 -0
- package/dist/ionic/{p-f3c82f74.system.entry.js → p-06e6d235.system.entry.js} +2 -2
- package/dist/ionic/p-0c244faf.entry.js +4 -0
- package/dist/ionic/{p-e0b06b65.js → p-100ef961.js} +1 -1
- package/dist/ionic/p-1a368f2e.system.entry.js +4 -0
- package/dist/ionic/{p-34d2de14.system.entry.js → p-22813b28.system.entry.js} +1 -1
- package/dist/ionic/p-234b9617.system.entry.js +4 -0
- package/dist/ionic/p-25c34422.system.entry.js +4 -0
- package/dist/ionic/p-2804781b.entry.js +4 -0
- package/dist/ionic/p-29fe18ef.entry.js +4 -0
- package/dist/ionic/p-2ad38423.system.entry.js +4 -0
- package/dist/ionic/{p-7176cea3.entry.js → p-2ba9414e.entry.js} +1 -1
- package/dist/ionic/{p-fa8d4788.system.js → p-2e1794df.system.js} +1 -1
- package/dist/ionic/{p-e627ed84.js → p-302091ab.js} +1 -1
- package/dist/ionic/{p-67ed452a.system.entry.js → p-3f88eab8.system.entry.js} +1 -1
- package/dist/ionic/p-40903d34.system.js +1 -1
- package/dist/ionic/{p-0dc0d9b5.entry.js → p-477a182e.entry.js} +1 -1
- package/dist/ionic/{p-377c636c.system.entry.js → p-4f3e2767.system.entry.js} +1 -1
- package/dist/ionic/{p-3de79805.entry.js → p-56224549.entry.js} +1 -1
- package/dist/ionic/{p-965677f1.entry.js → p-5ce11143.entry.js} +1 -1
- package/dist/ionic/{p-9e852ff1.system.js → p-6500b298.system.js} +1 -1
- package/dist/ionic/p-6893f6e4.entry.js +4 -0
- package/dist/ionic/{p-b2a74a72.entry.js → p-835e0346.entry.js} +1 -1
- package/dist/ionic/{p-39044fe6.system.entry.js → p-878c7aa5.system.entry.js} +1 -1
- package/dist/ionic/p-8b4ab236.entry.js +4 -0
- package/dist/ionic/{p-f37b4b79.entry.js → p-939d903b.entry.js} +1 -1
- package/dist/ionic/{p-6d812360.system.entry.js → p-966cf574.system.entry.js} +1 -1
- package/dist/ionic/p-992d3bad.entry.js +4 -0
- package/dist/ionic/{p-1cb5f2f8.system.entry.js → p-9b5301cc.system.entry.js} +1 -1
- package/dist/ionic/p-9c967a65.system.entry.js +4 -0
- package/dist/ionic/{p-8e1bded3.entry.js → p-9e6bf9ed.entry.js} +1 -1
- package/dist/ionic/{p-6e23777e.system.entry.js → p-a4cda7a8.system.entry.js} +1 -1
- package/dist/ionic/{p-09d142b3.system.js → p-a57f223c.system.js} +1 -1
- package/dist/ionic/{p-8b1be026.js → p-a7e2ac5c.js} +1 -1
- package/dist/ionic/p-af016cd3.entry.js +4 -0
- package/dist/ionic/{p-bed722c4.system.entry.js → p-b3e79338.system.entry.js} +1 -1
- package/dist/ionic/p-b4cbb736.js +4 -0
- package/dist/ionic/{p-4fa201a7.entry.js → p-b6a8588f.entry.js} +1 -1
- package/dist/ionic/{p-73411c1b.entry.js → p-c1229981.entry.js} +1 -1
- package/dist/ionic/{p-db5043df.system.entry.js → p-c31fc05f.system.entry.js} +1 -1
- package/dist/ionic/p-c56b6570.system.entry.js +4 -0
- package/dist/ionic/p-c59d068a.entry.js +4 -0
- package/dist/ionic/{p-a936d224.system.js → p-c7fd81ba.system.js} +1 -1
- package/dist/ionic/p-dc565ca3.js +4 -0
- package/dist/ionic/p-dd837fa8.entry.js +4 -0
- package/dist/ionic/p-e8400078.system.entry.js +4 -0
- package/dist/ionic/p-e88ed07f.system.js +4 -0
- package/dist/ionic/p-eb07ec1a.system.entry.js +4 -0
- package/dist/ionic/p-eb5697b5.system.js +4 -0
- package/dist/ionic/{p-3ce8c3e3.entry.js → p-ee800093.entry.js} +1 -1
- package/dist/ionic/p-f0559c5d.system.entry.js +4 -0
- package/dist/ionic/p-fdd22426.entry.js +4 -0
- package/dist/types/components/backdrop/backdrop.d.ts +0 -3
- package/dist/types/components/datetime/datetime.d.ts +0 -1
- package/dist/types/components/infinite-scroll/infinite-scroll.d.ts +0 -7
- package/dist/types/components/menu/menu.d.ts +1 -1
- package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +4 -0
- package/dist/types/components/{picker-column → picker-column-legacy}/picker-column.d.ts +1 -1
- package/dist/types/components/{picker → picker-legacy}/picker.d.ts +1 -1
- package/dist/types/components.d.ts +138 -130
- package/dist/types/interface.d.ts +1 -1
- package/dist/types/utils/config.d.ts +2 -2
- package/dist/types/utils/gesture/gesture-controller.d.ts +1 -0
- package/dist/types/utils/overlays.d.ts +5 -2
- package/hydrate/index.js +50 -75
- package/package.json +1 -1
- package/components/ion-picker.d.ts +0 -11
- package/components/ion-picker.js +0 -307
- package/dist/collection/components/infinite-scroll/test/small-dom-update/infinite-scroll.e2e.js +0 -31
- package/dist/esm-es5/overlays-6c9feb7e.js +0 -4
- package/dist/esm-es5/swipe-back-0f3bfc8e.js +0 -4
- package/dist/ionic/p-0d8e9393.entry.js +0 -4
- package/dist/ionic/p-18e01b30.system.entry.js +0 -4
- package/dist/ionic/p-1e5165db.system.entry.js +0 -4
- package/dist/ionic/p-4794e0ac.system.entry.js +0 -4
- package/dist/ionic/p-4dbac22d.entry.js +0 -4
- package/dist/ionic/p-64296b15.entry.js +0 -4
- package/dist/ionic/p-6eec9c40.entry.js +0 -4
- package/dist/ionic/p-6f4fbf04.entry.js +0 -4
- package/dist/ionic/p-800ef057.js +0 -4
- package/dist/ionic/p-8dbdb163.system.js +0 -4
- package/dist/ionic/p-8f8bc519.system.entry.js +0 -4
- package/dist/ionic/p-97e31c0a.system.js +0 -4
- package/dist/ionic/p-a5c1e6ce.entry.js +0 -4
- package/dist/ionic/p-a9c3699b.system.entry.js +0 -4
- package/dist/ionic/p-ad61e508.entry.js +0 -4
- package/dist/ionic/p-b203659a.system.entry.js +0 -4
- package/dist/ionic/p-b91fe549.entry.js +0 -4
- package/dist/ionic/p-c919498d.entry.js +0 -4
- package/dist/ionic/p-cf425ec5.system.entry.js +0 -4
- package/dist/ionic/p-d91e93ac.system.entry.js +0 -4
- package/dist/ionic/p-ddfc4ef4.system.entry.js +0 -4
- package/dist/ionic/p-e6b240a0.js +0 -4
- package/dist/ionic/p-eae972be.system.entry.js +0 -4
- package/dist/ionic/p-f54ddd19.entry.js +0 -4
- /package/dist/collection/components/{picker-column → picker-column-legacy}/picker-column.ios.css +0 -0
- /package/dist/collection/components/{picker-column → picker-column-legacy}/picker-column.md.css +0 -0
- /package/dist/collection/components/{picker-column → picker-column-legacy}/test/test.utils.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/picker.ios.css +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/picker.md.css +0 -0
- /package/dist/types/components/{picker-column → picker-column-legacy}/test/test.utils.d.ts +0 -0
- /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
- /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
- /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
|
@@ -94,7 +94,7 @@ ion-picker-column-internal {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* This ensures that the picker is
|
|
97
|
+
* This ensures that the picker is appropriately
|
|
98
98
|
* sized and never truncates the text.
|
|
99
99
|
*/
|
|
100
100
|
:host(.datetime-size-fixed.datetime-prefer-wheel) {
|
|
@@ -317,23 +317,8 @@ ion-picker-column-internal {
|
|
|
317
317
|
justify-content: space-between;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
:host .calendar-action-buttons ion-item,
|
|
321
320
|
:host .calendar-action-buttons ion-button {
|
|
322
|
-
--background:
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
:host .calendar-action-buttons ion-item ion-label {
|
|
326
|
-
display: flex;
|
|
327
|
-
align-items: center;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
:host .calendar-action-buttons ion-item ion-icon {
|
|
331
|
-
-webkit-padding-start: 4px;
|
|
332
|
-
padding-inline-start: 4px;
|
|
333
|
-
-webkit-padding-end: 0;
|
|
334
|
-
padding-inline-end: 0;
|
|
335
|
-
padding-top: 0;
|
|
336
|
-
padding-bottom: 0;
|
|
321
|
+
--background: transparent;
|
|
337
322
|
}
|
|
338
323
|
|
|
339
324
|
:host .calendar-days-of-week {
|
|
@@ -515,8 +500,66 @@ ion-picker-column-internal {
|
|
|
515
500
|
position: static;
|
|
516
501
|
}
|
|
517
502
|
|
|
518
|
-
:host(.show-month-and-year) .calendar-action-buttons
|
|
519
|
-
|
|
503
|
+
:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle {
|
|
504
|
+
color: var(--ion-color-base);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.calendar-month-year {
|
|
508
|
+
min-width: 0;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.calendar-month-year-toggle {
|
|
512
|
+
font-family: inherit;
|
|
513
|
+
font-size: inherit;
|
|
514
|
+
font-style: inherit;
|
|
515
|
+
font-weight: inherit;
|
|
516
|
+
letter-spacing: inherit;
|
|
517
|
+
text-decoration: inherit;
|
|
518
|
+
text-indent: inherit;
|
|
519
|
+
text-overflow: inherit;
|
|
520
|
+
text-transform: inherit;
|
|
521
|
+
text-align: inherit;
|
|
522
|
+
white-space: inherit;
|
|
523
|
+
color: inherit;
|
|
524
|
+
position: relative;
|
|
525
|
+
border: 0;
|
|
526
|
+
outline: none;
|
|
527
|
+
background: transparent;
|
|
528
|
+
cursor: pointer;
|
|
529
|
+
z-index: 1;
|
|
530
|
+
}
|
|
531
|
+
.calendar-month-year-toggle::after {
|
|
532
|
+
left: 0;
|
|
533
|
+
right: 0;
|
|
534
|
+
top: 0;
|
|
535
|
+
bottom: 0;
|
|
536
|
+
position: absolute;
|
|
537
|
+
content: "";
|
|
538
|
+
opacity: 0;
|
|
539
|
+
transition: opacity 15ms linear, background-color 15ms linear;
|
|
540
|
+
z-index: -1;
|
|
541
|
+
}
|
|
542
|
+
.calendar-month-year-toggle.ion-focused::after {
|
|
543
|
+
background: currentColor;
|
|
544
|
+
}
|
|
545
|
+
.calendar-month-year-toggle:disabled {
|
|
546
|
+
opacity: 0.3;
|
|
547
|
+
pointer-events: none;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.calendar-month-year-toggle ion-icon {
|
|
551
|
+
-webkit-padding-start: 4px;
|
|
552
|
+
padding-inline-start: 4px;
|
|
553
|
+
-webkit-padding-end: 0;
|
|
554
|
+
padding-inline-end: 0;
|
|
555
|
+
padding-top: 0;
|
|
556
|
+
padding-bottom: 0;
|
|
557
|
+
flex-shrink: 0;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.calendar-month-year-toggle #toggle-wrapper {
|
|
561
|
+
display: inline-flex;
|
|
562
|
+
align-items: center;
|
|
520
563
|
}
|
|
521
564
|
|
|
522
565
|
/**
|
|
@@ -600,15 +643,36 @@ ion-picker-column-internal {
|
|
|
600
643
|
font-size: 2.125rem;
|
|
601
644
|
}
|
|
602
645
|
|
|
603
|
-
:host .datetime-calendar .calendar-action-buttons ion-item {
|
|
604
|
-
--padding-start: 20px;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
:host .calendar-action-buttons ion-item,
|
|
608
646
|
:host .calendar-action-buttons ion-button {
|
|
609
647
|
--color: var(--ion-color-step-650, #595959);
|
|
610
648
|
}
|
|
611
649
|
|
|
650
|
+
.calendar-month-year-toggle {
|
|
651
|
+
-webkit-padding-start: 20px;
|
|
652
|
+
padding-inline-start: 20px;
|
|
653
|
+
-webkit-padding-end: 16px;
|
|
654
|
+
padding-inline-end: 16px;
|
|
655
|
+
padding-top: 12px;
|
|
656
|
+
padding-bottom: 12px;
|
|
657
|
+
min-height: 48px;
|
|
658
|
+
background: transparent;
|
|
659
|
+
color: var(--ion-color-step-650, #595959);
|
|
660
|
+
z-index: 1;
|
|
661
|
+
}
|
|
662
|
+
.calendar-month-year-toggle.ion-focused::after {
|
|
663
|
+
opacity: 0.04;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.calendar-month-year-toggle ion-ripple-effect {
|
|
667
|
+
color: currentColor;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
@media (any-hover: hover) {
|
|
671
|
+
.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after {
|
|
672
|
+
background: currentColor;
|
|
673
|
+
opacity: 0.04;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
612
676
|
:host .calendar-days-of-week {
|
|
613
677
|
-webkit-padding-start: 10px;
|
|
614
678
|
padding-inline-start: 10px;
|
|
@@ -38,7 +38,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
38
38
|
`, config);
|
|
39
39
|
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
|
|
40
40
|
const datetime = page.locator('ion-datetime');
|
|
41
|
-
const monthYearButton = page.locator('.calendar-month-year
|
|
41
|
+
const monthYearButton = page.locator('.calendar-month-year-toggle');
|
|
42
42
|
const prevButton = page.locator('.calendar-next-prev ion-button:nth-child(1)');
|
|
43
43
|
const nextButton = page.locator('.calendar-next-prev ion-button:nth-child(2)');
|
|
44
44
|
await page.keyboard.press(tabKey);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { newSpecPage } from "@stencil/core/testing";
|
|
5
|
-
import { Item } from "../../../item/item";
|
|
6
5
|
import { Datetime } from "../../datetime";
|
|
7
6
|
describe('datetime', () => {
|
|
8
7
|
beforeEach(() => {
|
|
@@ -18,25 +17,23 @@ describe('datetime', () => {
|
|
|
18
17
|
let page;
|
|
19
18
|
beforeEach(async () => {
|
|
20
19
|
page = await newSpecPage({
|
|
21
|
-
components: [Datetime
|
|
20
|
+
components: [Datetime],
|
|
22
21
|
html: `<ion-datetime></ion-datetime>`,
|
|
23
22
|
});
|
|
24
23
|
});
|
|
25
24
|
it('should have aria-label "Show year picker" when collapsed', async () => {
|
|
26
25
|
const datetime = page.body.querySelector('ion-datetime');
|
|
27
|
-
const
|
|
28
|
-
const monthYearToggleBtn = item.shadowRoot.querySelector('button');
|
|
26
|
+
const monthYearToggleBtn = datetime.shadowRoot.querySelector('.calendar-month-year .calendar-month-year-toggle');
|
|
29
27
|
const ariaLabel = monthYearToggleBtn.getAttribute('aria-label');
|
|
30
28
|
expect(ariaLabel).toContain('Show year picker');
|
|
31
29
|
});
|
|
32
30
|
it('should have aria-label "Hide year picker" when expanded', async () => {
|
|
33
31
|
const datetime = page.body.querySelector('ion-datetime');
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
const monthYearToggleBtn = datetime.shadowRoot.querySelector('.calendar-month-year .calendar-month-year-toggle');
|
|
33
|
+
monthYearToggleBtn.click();
|
|
36
34
|
await page.waitForChanges();
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const ariaLabel = monthYearToggleBtn.getAttribute('aria-label');
|
|
35
|
+
const monthYearToggleBtnAfter = datetime.shadowRoot.querySelector('.calendar-month-year .calendar-month-year-toggle');
|
|
36
|
+
const ariaLabel = monthYearToggleBtnAfter.getAttribute('aria-label');
|
|
40
37
|
expect(ariaLabel).toContain('Hide year picker');
|
|
41
38
|
});
|
|
42
39
|
});
|
|
@@ -372,4 +372,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
372
372
|
await expect(datetime).toHaveScreenshot(screenshot(`datetime-focus-calendar-day`));
|
|
373
373
|
});
|
|
374
374
|
});
|
|
375
|
+
test.describe(title('datetime: calendar month toggle'), () => {
|
|
376
|
+
test('should have focus styles', async ({ page }) => {
|
|
377
|
+
await page.setContent('<ion-datetime value="2021-01-01"></ion-datetime>', config);
|
|
378
|
+
const datetime = page.locator('ion-datetime');
|
|
379
|
+
await page.waitForSelector('.datetime-ready');
|
|
380
|
+
const monthYearToggle = datetime.locator('.calendar-month-year-toggle');
|
|
381
|
+
monthYearToggle.evaluate((el) => el.classList.add('ion-focused'));
|
|
382
|
+
await expect(datetime).toHaveScreenshot(screenshot(`date-month-toggle-focused`));
|
|
383
|
+
});
|
|
384
|
+
});
|
|
375
385
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { h } from "@stencil/core";
|
|
5
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
6
|
+
import { Datetime } from "../../../datetime/datetime";
|
|
7
|
+
import { PickerColumnInternal } from "../../../picker-column-internal/picker-column-internal";
|
|
8
|
+
import { PickerInternal } from "../../../picker-internal/picker-internal";
|
|
9
|
+
describe('ion-datetime disabled', () => {
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
// IntersectionObserver isn't available in test environment
|
|
12
|
+
const mockIntersectionObserver = jest.fn();
|
|
13
|
+
mockIntersectionObserver.mockReturnValue({
|
|
14
|
+
observe: () => null,
|
|
15
|
+
unobserve: () => null,
|
|
16
|
+
disconnect: () => null,
|
|
17
|
+
});
|
|
18
|
+
global.IntersectionObserver = mockIntersectionObserver;
|
|
19
|
+
});
|
|
20
|
+
it('picker should be disabled in prefer wheel mode', async () => {
|
|
21
|
+
const page = await newSpecPage({
|
|
22
|
+
components: [Datetime, PickerColumnInternal, PickerInternal],
|
|
23
|
+
template: () => (h("ion-datetime", { id: "inline-datetime-wheel", disabled: true, "prefer-wheel": true, value: "2022-04-21T00:00:00" })),
|
|
24
|
+
});
|
|
25
|
+
await page.waitForChanges();
|
|
26
|
+
const datetime = page.body.querySelector('ion-datetime');
|
|
27
|
+
const columns = datetime.shadowRoot.querySelectorAll('ion-picker-column-internal');
|
|
28
|
+
await expect(columns.length).toEqual(4);
|
|
29
|
+
columns.forEach((column) => {
|
|
30
|
+
expect(column.disabled).toBe(true);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -16,7 +16,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
16
16
|
test('should hide the footer when picker is open', async ({ page }) => {
|
|
17
17
|
const datetimeFooter = page.locator('#date-time .datetime-footer');
|
|
18
18
|
await expect(datetimeFooter).toBeVisible();
|
|
19
|
-
const pickerButton = page.locator('#date-time .calendar-month-year >
|
|
19
|
+
const pickerButton = page.locator('#date-time .calendar-month-year > .calendar-month-year-toggle');
|
|
20
20
|
await pickerButton.click();
|
|
21
21
|
await page.waitForChanges();
|
|
22
22
|
await expect(datetimeFooter).not.toBeVisible();
|
|
@@ -46,7 +46,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
|
|
|
46
46
|
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
|
|
47
47
|
await page.waitForSelector('.datetime-ready');
|
|
48
48
|
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
|
|
49
|
-
const monthYearButton = page.locator('.calendar-month-year
|
|
49
|
+
const monthYearButton = page.locator('.calendar-month-year-toggle');
|
|
50
50
|
await expect(calendarMonthYear).toHaveText('February 2022');
|
|
51
51
|
await page.keyboard.press(tabKey);
|
|
52
52
|
await expect(monthYearButton).toBeFocused();
|
|
@@ -75,7 +75,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
|
|
|
75
75
|
`, config);
|
|
76
76
|
const tabKey = browserName === 'webkit' ? 'Alt+Tab' : 'Tab';
|
|
77
77
|
const datetime = page.locator('ion-datetime');
|
|
78
|
-
const monthYearButton = page.locator('.calendar-month-year
|
|
78
|
+
const monthYearButton = page.locator('.calendar-month-year-toggle');
|
|
79
79
|
const prevButton = page.locator('.calendar-next-prev ion-button:nth-child(1)');
|
|
80
80
|
const nextButton = page.locator('.calendar-next-prev ion-button:nth-child(2)');
|
|
81
81
|
const calendarMonthYear = page.locator('ion-datetime .calendar-month-year');
|
|
@@ -8,13 +8,6 @@ export class InfiniteScroll {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.thrPx = 0;
|
|
10
10
|
this.thrPc = 0;
|
|
11
|
-
/**
|
|
12
|
-
* didFire exists so that ionInfinite
|
|
13
|
-
* does not fire multiple times if
|
|
14
|
-
* users continue to scroll after
|
|
15
|
-
* scrolling into the infinite
|
|
16
|
-
* scroll threshold.
|
|
17
|
-
*/
|
|
18
11
|
this.didFire = false;
|
|
19
12
|
this.isBusy = false;
|
|
20
13
|
this.onScroll = () => {
|
|
@@ -42,6 +35,9 @@ export class InfiniteScroll {
|
|
|
42
35
|
return 3;
|
|
43
36
|
}
|
|
44
37
|
}
|
|
38
|
+
else {
|
|
39
|
+
this.didFire = false;
|
|
40
|
+
}
|
|
45
41
|
return 4;
|
|
46
42
|
};
|
|
47
43
|
this.isLoading = false;
|
|
@@ -141,15 +137,11 @@ export class InfiniteScroll {
|
|
|
141
137
|
writeTask(() => {
|
|
142
138
|
scrollEl.scrollTop = newScrollTop;
|
|
143
139
|
this.isBusy = false;
|
|
144
|
-
this.didFire = false;
|
|
145
140
|
});
|
|
146
141
|
});
|
|
147
142
|
});
|
|
148
143
|
});
|
|
149
144
|
}
|
|
150
|
-
else {
|
|
151
|
-
this.didFire = false;
|
|
152
|
-
}
|
|
153
145
|
}
|
|
154
146
|
canStart() {
|
|
155
147
|
return !this.disabled && !this.isBusy && !!this.scrollEl && !this.isLoading;
|
|
@@ -109,12 +109,20 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
:host .picker-item-empty,
|
|
112
|
-
:host .picker-item
|
|
113
|
-
scroll-snap-align: none;
|
|
112
|
+
:host .picker-item[disabled] {
|
|
114
113
|
cursor: default;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
:host .picker-item
|
|
116
|
+
:host .picker-item-empty,
|
|
117
|
+
:host(:not([disabled])) .picker-item[disabled] {
|
|
118
|
+
scroll-snap-align: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([disabled]) {
|
|
122
|
+
overflow-y: hidden;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host .picker-item[disabled] {
|
|
118
126
|
opacity: 0.4;
|
|
119
127
|
}
|
|
120
128
|
|
|
@@ -221,6 +221,7 @@ export class PickerColumnInternal {
|
|
|
221
221
|
this.el.classList.remove('picker-column-active');
|
|
222
222
|
};
|
|
223
223
|
this.isActive = false;
|
|
224
|
+
this.disabled = false;
|
|
224
225
|
this.items = [];
|
|
225
226
|
this.value = undefined;
|
|
226
227
|
this.color = 'primary';
|
|
@@ -318,10 +319,13 @@ export class PickerColumnInternal {
|
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
get activeItem() {
|
|
321
|
-
|
|
322
|
+
// If the whole picker column is disabled, the current value should appear active
|
|
323
|
+
// If the current value item is specifically disabled, it should not appear active
|
|
324
|
+
const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
|
|
325
|
+
return getElementRoot(this.el).querySelector(selector);
|
|
322
326
|
}
|
|
323
327
|
render() {
|
|
324
|
-
const { items, color, isActive, numericInput } = this;
|
|
328
|
+
const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
|
|
325
329
|
const mode = getIonMode(this);
|
|
326
330
|
/**
|
|
327
331
|
* exportparts is needed so ion-datetime can expose the parts
|
|
@@ -329,11 +333,12 @@ export class PickerColumnInternal {
|
|
|
329
333
|
* the attribute can be moved to datetime.tsx and set on every
|
|
330
334
|
* instance of ion-picker-column-internal there instead.
|
|
331
335
|
*/
|
|
332
|
-
return (h(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, tabindex: 0, class: createColorClasses(color, {
|
|
336
|
+
return (h(Host, { exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: createColorClasses(color, {
|
|
333
337
|
[mode]: true,
|
|
334
338
|
['picker-column-active']: isActive,
|
|
335
339
|
['picker-column-numeric-input']: numericInput,
|
|
336
340
|
}) }, h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index) => {
|
|
341
|
+
const isItemDisabled = pickerDisabled || item.disabled || false;
|
|
337
342
|
{
|
|
338
343
|
/*
|
|
339
344
|
Users should be able to tab
|
|
@@ -346,10 +351,9 @@ export class PickerColumnInternal {
|
|
|
346
351
|
}
|
|
347
352
|
return (h("button", { tabindex: "-1", class: {
|
|
348
353
|
'picker-item': true,
|
|
349
|
-
'picker-item-disabled': item.disabled || false,
|
|
350
354
|
}, "data-value": item.value, "data-index": index, onClick: (ev) => {
|
|
351
355
|
this.centerPickerItemInView(ev.target, true);
|
|
352
|
-
}, disabled:
|
|
356
|
+
}, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
|
|
353
357
|
}), h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
|
|
354
358
|
}
|
|
355
359
|
static get is() { return "ion-picker-column-internal"; }
|
|
@@ -368,6 +372,24 @@ export class PickerColumnInternal {
|
|
|
368
372
|
}
|
|
369
373
|
static get properties() {
|
|
370
374
|
return {
|
|
375
|
+
"disabled": {
|
|
376
|
+
"type": "boolean",
|
|
377
|
+
"mutable": false,
|
|
378
|
+
"complexType": {
|
|
379
|
+
"original": "boolean",
|
|
380
|
+
"resolved": "boolean",
|
|
381
|
+
"references": {}
|
|
382
|
+
},
|
|
383
|
+
"required": false,
|
|
384
|
+
"optional": false,
|
|
385
|
+
"docs": {
|
|
386
|
+
"tags": [],
|
|
387
|
+
"text": "If `true`, the user cannot interact with the picker."
|
|
388
|
+
},
|
|
389
|
+
"attribute": "disabled",
|
|
390
|
+
"reflect": false,
|
|
391
|
+
"defaultValue": "false"
|
|
392
|
+
},
|
|
371
393
|
"items": {
|
|
372
394
|
"type": "unknown",
|
|
373
395
|
"mutable": false,
|
|
@@ -109,12 +109,20 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
:host .picker-item-empty,
|
|
112
|
-
:host .picker-item
|
|
113
|
-
scroll-snap-align: none;
|
|
112
|
+
:host .picker-item[disabled] {
|
|
114
113
|
cursor: default;
|
|
115
114
|
}
|
|
116
115
|
|
|
117
|
-
:host .picker-item
|
|
116
|
+
:host .picker-item-empty,
|
|
117
|
+
:host(:not([disabled])) .picker-item[disabled] {
|
|
118
|
+
scroll-snap-align: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host([disabled]) {
|
|
122
|
+
overflow-y: hidden;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:host .picker-item[disabled] {
|
|
118
126
|
opacity: 0.4;
|
|
119
127
|
}
|
|
120
128
|
|
|
@@ -32,7 +32,7 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
32
32
|
* This behavior does not vary across modes/directions.
|
|
33
33
|
*/
|
|
34
34
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
35
|
-
test.describe(title('picker-column-internal: disabled'), () => {
|
|
35
|
+
test.describe(title('picker-column-internal: disabled items'), () => {
|
|
36
36
|
test('all picker items should be enabled by default', async ({ page }) => {
|
|
37
37
|
await page.setContent(`
|
|
38
38
|
<ion-picker-internal>
|
|
@@ -48,7 +48,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
48
48
|
]
|
|
49
49
|
</script>
|
|
50
50
|
`, config);
|
|
51
|
-
const pickerItems = page.locator('ion-picker-column-internal .picker-item:not(.picker-item-empty,
|
|
51
|
+
const pickerItems = page.locator('ion-picker-column-internal .picker-item:not(.picker-item-empty, [disabled])');
|
|
52
52
|
expect(await pickerItems.count()).toBe(3);
|
|
53
53
|
});
|
|
54
54
|
test('disabled picker item should not be interactive', async ({ page }) => {
|
|
@@ -66,7 +66,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
66
66
|
]
|
|
67
67
|
</script>
|
|
68
68
|
`, config);
|
|
69
|
-
const disabledItem = page.locator('ion-picker-column-internal .picker-item
|
|
69
|
+
const disabledItem = page.locator('ion-picker-column-internal .picker-item[disabled]');
|
|
70
70
|
await expect(disabledItem).not.toBeEnabled();
|
|
71
71
|
});
|
|
72
72
|
test('disabled picker item should not be considered active', async ({ page }) => {
|
|
@@ -106,7 +106,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
106
106
|
await pickerColumn.evaluate((el) => (el.value = 'b'));
|
|
107
107
|
await page.waitForChanges();
|
|
108
108
|
const disabledItem = page.locator('ion-picker-column-internal .picker-item[data-value="b"]');
|
|
109
|
-
await expect(disabledItem).
|
|
109
|
+
await expect(disabledItem).toBeDisabled();
|
|
110
110
|
await expect(disabledItem).not.toHaveClass(/picker-item-active/);
|
|
111
111
|
});
|
|
112
112
|
test('defaulting the value to a disabled item should not cause that item to be active', async ({ page }) => {
|
|
@@ -126,8 +126,37 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
126
126
|
</script>
|
|
127
127
|
`, config);
|
|
128
128
|
const disabledItem = page.locator('ion-picker-column-internal .picker-item[data-value="b"]');
|
|
129
|
-
await expect(disabledItem).
|
|
129
|
+
await expect(disabledItem).toBeDisabled();
|
|
130
130
|
await expect(disabledItem).not.toHaveClass(/picker-item-active/);
|
|
131
131
|
});
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
|
+
/**
|
|
135
|
+
* This behavior does not vary across directions.
|
|
136
|
+
*/
|
|
137
|
+
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
138
|
+
test.describe(title('picker-column-internal: disabled column rendering'), () => {
|
|
139
|
+
test.beforeEach(async ({ page }) => {
|
|
140
|
+
await page.goto('/src/components/picker-column-internal/test/disabled', config);
|
|
141
|
+
});
|
|
142
|
+
test('disabled column should not have visual regressions', async ({ page }) => {
|
|
143
|
+
const disabledColumn = page.locator('#column-disabled');
|
|
144
|
+
await page.waitForChanges();
|
|
145
|
+
await expect(disabledColumn).toHaveScreenshot(screenshot('picker-internal-disabled-column'));
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* This behavior does not vary across modes/directions.
|
|
151
|
+
*/
|
|
152
|
+
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
153
|
+
test.describe(title('picker-column-internal: disabled column'), () => {
|
|
154
|
+
test.beforeEach(async ({ page }) => {
|
|
155
|
+
await page.goto('/src/components/picker-column-internal/test/disabled', config);
|
|
156
|
+
});
|
|
157
|
+
test('item in disabled column should not be interactive', async ({ page }) => {
|
|
158
|
+
const secondItem = page.locator('#column-disabled .picker-item:not(.picker-item-empty)').nth(1);
|
|
159
|
+
await expect(secondItem).toBeDisabled();
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
});
|
|
@@ -340,7 +340,7 @@ export class PickerColumnCmp {
|
|
|
340
340
|
'max-width': this.col.columnWidth,
|
|
341
341
|
} }, col.prefix && (h("div", { class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
|
|
342
342
|
}
|
|
343
|
-
static get is() { return "ion-picker-column"; }
|
|
343
|
+
static get is() { return "ion-picker-legacy-column"; }
|
|
344
344
|
static get originalStyleUrls() {
|
|
345
345
|
return {
|
|
346
346
|
"ios": ["picker-column.ios.scss"],
|
|
@@ -364,8 +364,8 @@ export class PickerColumnCmp {
|
|
|
364
364
|
"references": {
|
|
365
365
|
"PickerColumn": {
|
|
366
366
|
"location": "import",
|
|
367
|
-
"path": "../picker/picker-interface",
|
|
368
|
-
"id": "src/components/picker/picker-interface.ts::PickerColumn"
|
|
367
|
+
"path": "../picker-legacy/picker-interface",
|
|
368
|
+
"id": "src/components/picker-legacy/picker-interface.ts::PickerColumn"
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
},
|
|
@@ -398,8 +398,8 @@ export class PickerColumnCmp {
|
|
|
398
398
|
"references": {
|
|
399
399
|
"PickerColumn": {
|
|
400
400
|
"location": "import",
|
|
401
|
-
"path": "../picker/picker-interface",
|
|
402
|
-
"id": "src/components/picker/picker-interface.ts::PickerColumn"
|
|
401
|
+
"path": "../picker-legacy/picker-interface",
|
|
402
|
+
"id": "src/components/picker-legacy/picker-interface.ts::PickerColumn"
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
}
|
|
@@ -25,10 +25,10 @@ describe('picker-column', () => {
|
|
|
25
25
|
};
|
|
26
26
|
const page = await newSpecPage({
|
|
27
27
|
components: [PickerColumnCmp],
|
|
28
|
-
template: () => h("ion-picker-column", { col: col }),
|
|
28
|
+
template: () => h("ion-picker-legacy-column", { col: col }),
|
|
29
29
|
});
|
|
30
|
-
const firstOption = page.body.querySelector('ion-picker-column .picker-opt:nth-child(1)');
|
|
31
|
-
const secondOption = page.body.querySelector('ion-picker-column .picker-opt:nth-child(2)');
|
|
30
|
+
const firstOption = page.body.querySelector('ion-picker-legacy-column .picker-opt:nth-child(1)');
|
|
31
|
+
const secondOption = page.body.querySelector('ion-picker-legacy-column .picker-opt:nth-child(2)');
|
|
32
32
|
expect(firstOption.getAttribute('aria-label')).toBe('C Sharp');
|
|
33
33
|
expect(secondOption.getAttribute('aria-label')).toBe(null);
|
|
34
34
|
});
|
|
@@ -15,9 +15,9 @@ describe('picker-column: dynamic options', () => {
|
|
|
15
15
|
];
|
|
16
16
|
const page = await newSpecPage({
|
|
17
17
|
components: [PickerColumnCmp],
|
|
18
|
-
template: () => h("ion-picker-column", { col: { options: defaultOptions, name: 'animals' } }),
|
|
18
|
+
template: () => (h("ion-picker-legacy-column", { col: { options: defaultOptions, name: 'animals' } })),
|
|
19
19
|
});
|
|
20
|
-
const pickerCol = page.body.querySelector('ion-picker-column');
|
|
20
|
+
const pickerCol = page.body.querySelector('ion-picker-legacy-column');
|
|
21
21
|
pickerCol.col = {
|
|
22
22
|
options: [...defaultOptions, { text: 'Carrot', value: 'carrot' }],
|
|
23
23
|
name: 'vegetables',
|
package/dist/collection/components/{picker-column → picker-column-legacy}/test/picker-column.spec.js
RENAMED
|
@@ -9,9 +9,9 @@ describe('picker-column', () => {
|
|
|
9
9
|
const col = { cssClass: 'test-class', options: [], name: 'col' };
|
|
10
10
|
const page = await newSpecPage({
|
|
11
11
|
components: [PickerColumnCmp],
|
|
12
|
-
template: () => h("ion-picker-column", { col: col }),
|
|
12
|
+
template: () => h("ion-picker-legacy-column", { col: col }),
|
|
13
13
|
});
|
|
14
|
-
const pickerCol = page.body.querySelector('ion-picker-column');
|
|
14
|
+
const pickerCol = page.body.querySelector('ion-picker-legacy-column');
|
|
15
15
|
expect(pickerCol.classList.contains('test-class')).toBe(true);
|
|
16
16
|
});
|
|
17
17
|
});
|
|
@@ -6,11 +6,11 @@ import { configs, test } from "../../../../utils/test/playwright/index";
|
|
|
6
6
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
7
7
|
test.describe(title('picker-column'), () => {
|
|
8
8
|
test.beforeEach(async ({ page }) => {
|
|
9
|
-
await page.goto(`/src/components/picker-column/test/standalone`, config);
|
|
9
|
+
await page.goto(`/src/components/picker-column-legacy/test/standalone`, config);
|
|
10
10
|
});
|
|
11
11
|
test('should present picker without ion-app', async ({ page }) => {
|
|
12
12
|
const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent');
|
|
13
|
-
const picker = page.locator('ion-picker');
|
|
13
|
+
const picker = page.locator('ion-picker-legacy');
|
|
14
14
|
await page.click('#single-column-button');
|
|
15
15
|
await ionPickerDidPresent.next();
|
|
16
16
|
await expect(picker).toBeVisible();
|
|
@@ -22,7 +22,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
22
22
|
});
|
|
23
23
|
const ionPickerDidPresent = await page.spyOnEvent('ionPickerDidPresent');
|
|
24
24
|
const ionPickerColChangeEvent = await page.spyOnEvent('ionPickerColChange');
|
|
25
|
-
const column = page.locator('ion-picker-column');
|
|
25
|
+
const column = page.locator('ion-picker-legacy-column');
|
|
26
26
|
const secondOption = column.locator('.picker-opt').nth(1);
|
|
27
27
|
await page.click('#single-column-button');
|
|
28
28
|
await ionPickerDidPresent.next();
|