@ionic/core 7.5.8-dev.11702664817.19cab605 → 7.5.8-dev.11704294569.1abc989d
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/action-sheet.js +1 -1
- package/components/alert.js +2 -2
- package/components/button.js +2 -2
- package/components/checkbox.js +2 -2
- package/components/data.js +1 -1
- package/components/ion-back-button.js +1 -1
- package/components/ion-badge.js +2 -2
- package/components/ion-content.js +2 -3
- package/components/ion-datetime.js +30 -39
- package/components/ion-fab-button.js +2 -2
- package/components/ion-input.js +2 -2
- package/components/ion-item-option.js +2 -2
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-picker-column-internal.d.ts +11 -0
- package/components/ion-picker-column-internal.js +9 -0
- package/components/ion-picker-column.js +2 -2
- package/components/{ion-picker-legacy.d.ts → ion-picker-internal.d.ts} +4 -4
- package/components/ion-picker-internal.js +9 -0
- package/components/ion-picker.js +309 -1
- package/components/ion-progress-bar.js +2 -2
- package/components/ion-range.js +2 -2
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-select.js +2 -2
- package/components/ion-tab-bar.js +2 -2
- package/components/ion-textarea.js +2 -2
- package/components/ion-title.js +1 -22
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +2 -2
- package/components/item.js +2 -2
- package/components/label.js +1 -1
- package/components/overlays.js +3 -6
- package/components/picker-column-internal.js +390 -0
- package/components/picker-column.js +322 -351
- package/components/{picker.js → picker-internal.js} +22 -29
- package/components/radio.js +2 -2
- package/components/select-popover.js +1 -1
- package/css/core.css +35 -34
- package/css/core.css.map +1 -1
- package/css/global.bundle.css +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/themes/dark.always.css +122 -0
- package/css/themes/dark.always.css.map +1 -0
- package/css/themes/dark.class.css +122 -0
- package/css/themes/dark.class.css.map +1 -0
- package/css/themes/dark.css +3 -0
- package/css/themes/dark.css.map +1 -0
- package/css/themes/dark.system.css +124 -0
- package/css/themes/dark.system.css.map +1 -0
- package/css/typography.css +1 -1
- package/dist/cjs/{data-e7526b58.js → data-36b9094e.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -25
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +36 -30
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/{ion-picker-column.cjs.entry.js → ion-picker-column-internal.cjs.entry.js} +87 -104
- package/dist/cjs/{ion-picker.cjs.entry.js → ion-picker-internal.cjs.entry.js} +19 -26
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +1 -1
- package/dist/cjs/ion-searchbar.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 +4 -4
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-e8e05b0e.js → overlays-2c6b1072.js} +3 -6
- package/dist/collection/collection-manifest.json +8 -9
- package/dist/collection/components/action-sheet/action-sheet.ios.css +3 -3
- package/dist/collection/components/action-sheet/test/a11y/action-sheet.e2e.js +23 -14
- package/dist/collection/components/alert/alert.ios.css +6 -6
- package/dist/collection/components/alert/alert.md.css +6 -6
- package/dist/collection/components/alert/test/a11y/alert.e2e.js +22 -9
- package/dist/collection/components/back-button/back-button.ios.css +1 -1
- package/dist/collection/components/back-button/test/a11y/back-button.e2e.js +21 -0
- package/dist/collection/components/badge/badge.ios.css +1 -1
- package/dist/collection/components/badge/badge.md.css +1 -1
- package/dist/collection/components/badge/test/a11y/badge.e2e.js +18 -0
- package/dist/collection/components/button/button.ios.css +11 -11
- package/dist/collection/components/button/button.md.css +9 -9
- package/dist/collection/components/button/test/a11y/button.e2e.js +48 -0
- package/dist/collection/components/button/test/wrap/button.e2e.js +24 -12
- package/dist/collection/components/checkbox/checkbox.ios.css +2 -2
- package/dist/collection/components/checkbox/checkbox.md.css +2 -2
- package/dist/collection/components/checkbox/test/a11y/checkbox.e2e.js +11 -2
- package/dist/collection/components/content/content.js +2 -3
- package/dist/collection/components/datetime/datetime.ios.css +13 -8
- package/dist/collection/components/datetime/datetime.js +16 -19
- package/dist/collection/components/datetime/datetime.md.css +13 -8
- package/dist/collection/components/datetime/test/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
- package/dist/collection/components/datetime/test/locale/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +6 -6
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +41 -43
- package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
- package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/values/datetime.e2e.js +12 -15
- package/dist/collection/components/datetime/utils/data.js +1 -1
- package/dist/collection/components/fab-button/fab-button.ios.css +13 -13
- package/dist/collection/components/fab-button/fab-button.md.css +4 -4
- package/dist/collection/components/fab-button/test/a11y/fab-button.e2e.js +50 -0
- package/dist/collection/components/input/input.ios.css +3 -3
- package/dist/collection/components/input/input.md.css +3 -3
- package/dist/collection/components/input/test/a11y/input.e2e.js +35 -3
- package/dist/collection/components/item/item.ios.css +3 -3
- package/dist/collection/components/item/item.md.css +4 -4
- package/dist/collection/components/item-option/item-option.ios.css +2 -2
- package/dist/collection/components/item-option/item-option.md.css +1 -1
- package/dist/collection/components/item-sliding/test/a11y/item-sliding.e2e.js +28 -0
- package/dist/collection/components/label/label.md.css +1 -1
- package/dist/collection/components/label/test/a11y/label.e2e.js +20 -0
- package/dist/collection/components/loading/loading.md.css +1 -1
- package/dist/collection/components/loading/test/a11y/loading.e2e.js +21 -5
- package/dist/collection/components/menu-button/menu-button.ios.css +1 -1
- package/dist/collection/components/menu-button/test/a11y/menu-button.e2e.js +14 -0
- package/dist/collection/components/picker/picker.ios.css +211 -112
- package/dist/collection/components/picker/picker.js +744 -472
- package/dist/collection/components/picker/picker.md.css +198 -108
- package/dist/collection/components/picker/test/basic/picker.e2e.js +13 -99
- package/dist/collection/components/{picker-legacy → picker}/test/is-open/picker.e2e.js +4 -4
- package/dist/collection/components/{picker-legacy → picker}/test/picker-id.spec.js +5 -5
- package/dist/collection/components/{picker-legacy → picker}/test/trigger/picker.e2e.js +1 -1
- package/dist/collection/components/picker-column/picker-column.js +335 -497
- package/dist/collection/components/{picker-legacy-column → picker-column}/picker-column.md.css +1 -1
- package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column-aria.spec.js +3 -3
- package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column-dynamic.spec.js +2 -2
- package/dist/collection/components/{picker-legacy-column → picker-column}/test/picker-column.spec.js +2 -2
- package/dist/collection/components/{picker-legacy-column → picker-column}/test/standalone/picker-column.e2e.js +3 -3
- package/dist/collection/components/{picker-column-option/picker-column-option.md.css → picker-column-internal/picker-column-internal.ios.css} +53 -6
- package/dist/collection/components/picker-column-internal/picker-column-internal.js +565 -0
- package/dist/collection/components/{picker-column/picker-column.css → picker-column-internal/picker-column-internal.md.css} +83 -96
- package/dist/collection/components/{picker-column/test/basic/picker-column.e2e.js → picker-column-internal/test/basic/picker-column-internal.e2e.js} +8 -8
- package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +162 -0
- package/dist/collection/components/{picker-legacy/picker.md.css → picker-internal/picker-internal.ios.css} +100 -192
- package/dist/collection/components/picker-internal/picker-internal.js +544 -0
- package/dist/collection/components/{picker-legacy/picker.ios.css → picker-internal/picker-internal.md.css} +98 -207
- package/dist/collection/components/picker-internal/test/a11y/picker-internal.e2e.js +31 -0
- package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +118 -0
- package/dist/collection/components/{picker/test/keyboard-entry/picker.e2e.js → picker-internal/test/keyboard-entry/picker-internal.e2e.js} +32 -63
- package/dist/collection/components/progress-bar/progress-bar.ios.css +2 -2
- package/dist/collection/components/progress-bar/progress-bar.md.css +2 -2
- package/dist/collection/components/progress-bar/test/a11y/progress-bar.e2e.js +24 -0
- package/dist/collection/components/radio/radio.ios.css +2 -2
- package/dist/collection/components/radio/radio.md.css +2 -2
- package/dist/collection/components/radio/test/a11y/radio.e2e.js +44 -6
- package/dist/collection/components/range/range.ios.css +1 -1
- package/dist/collection/components/range/range.md.css +3 -3
- package/dist/collection/components/range/test/a11y/range.e2e.js +18 -8
- package/dist/collection/components/refresher/refresher.md.css +2 -2
- package/dist/collection/components/refresher/test/a11y/refresher.e2e.js +25 -0
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/router-link/router-link.css +1 -1
- package/dist/collection/components/router-link/test/a11y/router-link.e2e.js +23 -0
- package/dist/collection/components/searchbar/searchbar.ios.css +1 -1
- package/dist/collection/components/segment/test/a11y/segment.e2e.js +23 -0
- package/dist/collection/components/segment-button/segment-button.md.css +2 -2
- package/dist/collection/components/select/select.ios.css +3 -3
- package/dist/collection/components/select/select.md.css +3 -3
- package/dist/collection/components/select/test/a11y/select.e2e.js +59 -4
- package/dist/collection/components/select-popover/select-popover.md.css +4 -4
- package/dist/collection/components/select-popover/test/a11y/select-popover.e2e.js +32 -0
- package/dist/collection/components/tab-bar/tab-bar.ios.css +1 -1
- package/dist/collection/components/tab-bar/tab-bar.md.css +1 -1
- package/dist/collection/components/textarea/test/a11y/textarea.e2e.js +35 -3
- package/dist/collection/components/textarea/textarea.ios.css +3 -3
- package/dist/collection/components/textarea/textarea.md.css +3 -3
- package/dist/collection/components/title/test/a11y/title.e2e.js +0 -39
- package/dist/collection/components/title/title.js +1 -22
- package/dist/collection/components/toast/test/a11y/toast.e2e.js +56 -24
- package/dist/collection/components/toast/toast.ios.css +1 -1
- package/dist/collection/components/toast/toast.md.css +2 -2
- package/dist/collection/components/toggle/test/a11y/toggle.e2e.js +8 -2
- package/dist/collection/components/toggle/toggle.ios.css +1 -1
- package/dist/collection/components/toggle/toggle.md.css +2 -2
- package/dist/collection/css/test/a11y/typography.e2e.js +18 -0
- package/dist/collection/themes/test/colors/theme.e2e.js +114 -0
- package/dist/collection/utils/overlays.js +3 -6
- package/dist/collection/utils/test/playwright/generator.js +1 -0
- package/dist/collection/utils/test/playwright/page/utils/set-content.js +1 -1
- package/dist/docs.json +24 -472
- package/dist/esm/{data-4b9508c9.js → data-f5c75b4e.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +3 -3
- package/dist/esm/ion-app_8.entry.js +4 -25
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +35 -29
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +3 -3
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/{ion-picker-column.entry.js → ion-picker-column-internal.entry.js} +87 -104
- package/dist/esm/{ion-picker.entry.js → ion-picker-internal.entry.js} +19 -26
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-fbc5cab5.js → overlays-d23ea6e1.js} +3 -6
- 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-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.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-picker-column-internal.entry.js +4 -0
- package/dist/esm-es5/ion-picker-internal.entry.js +4 -0
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.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-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.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-d23ea6e1.js +4 -0
- package/dist/html.html-data.json +1 -152
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-4911a5d6.entry.js → p-023b1cf4.entry.js} +1 -1
- package/dist/ionic/{p-232d1f22.entry.js → p-02e066a0.entry.js} +1 -1
- package/dist/ionic/{p-3fd26bd6.system.entry.js → p-0339b688.system.entry.js} +1 -1
- package/dist/ionic/{p-6d72fb44.entry.js → p-0941a5d7.entry.js} +1 -1
- package/dist/ionic/{p-ab9456e9.system.entry.js → p-098f4d12.system.entry.js} +1 -1
- package/dist/ionic/{p-73190c5f.entry.js → p-0afef6b9.entry.js} +1 -1
- package/dist/ionic/{p-51a087d6.entry.js → p-0ebcff25.entry.js} +1 -1
- package/dist/ionic/{p-34c39c48.entry.js → p-1286049a.entry.js} +1 -1
- package/dist/ionic/{p-5bebc7b3.system.entry.js → p-12869199.system.entry.js} +1 -1
- package/dist/ionic/{p-fbf3a689.system.entry.js → p-193ff029.system.entry.js} +1 -1
- package/dist/ionic/{p-22e5af95.entry.js → p-1de103b7.entry.js} +1 -1
- package/dist/ionic/{p-846ee227.entry.js → p-1e57bd24.entry.js} +1 -1
- package/dist/ionic/{p-21c3515a.entry.js → p-29bf41bd.entry.js} +1 -1
- package/dist/ionic/p-2dd0355d.system.entry.js +4 -0
- package/dist/ionic/{p-4a36430f.system.entry.js → p-2f2293da.system.entry.js} +1 -1
- package/dist/ionic/{p-ea69616e.entry.js → p-31cf9613.entry.js} +1 -1
- package/dist/ionic/{p-4a081ea9.entry.js → p-3b568d18.entry.js} +1 -1
- package/dist/ionic/p-3e13501a.system.entry.js +4 -0
- package/dist/ionic/{p-93000a81.system.entry.js → p-3e625023.system.entry.js} +1 -1
- package/dist/ionic/{p-3f6270b3.entry.js → p-55a0cd33.entry.js} +1 -1
- package/dist/ionic/{p-a8baa23e.entry.js → p-57798ba6.entry.js} +1 -1
- package/dist/ionic/{p-7b725280.entry.js → p-5b20db28.entry.js} +1 -1
- package/dist/ionic/{p-5d42b6b4.entry.js → p-5b834053.entry.js} +1 -1
- package/dist/ionic/{p-8f5d30f5.entry.js → p-5fbfa8c9.entry.js} +1 -1
- package/dist/ionic/p-5ff60387.system.entry.js +4 -0
- package/dist/ionic/{p-563c41f0.system.entry.js → p-60b386c9.system.entry.js} +1 -1
- package/dist/ionic/p-67da080d.entry.js +4 -0
- package/dist/ionic/{p-2ab4e925.system.entry.js → p-6f96f7b1.system.entry.js} +1 -1
- package/dist/ionic/p-73ea8f82.system.entry.js +4 -0
- package/dist/ionic/{p-c9a21dfd.system.entry.js → p-76c94634.system.entry.js} +1 -1
- package/dist/ionic/{p-b752714f.system.entry.js → p-7828a27f.system.entry.js} +1 -1
- package/dist/ionic/{p-4bee86bd.entry.js → p-7a63e024.entry.js} +1 -1
- package/dist/ionic/{p-4a31c99f.entry.js → p-7c7e21a7.entry.js} +1 -1
- package/dist/ionic/p-80fa068e.entry.js +4 -0
- package/dist/ionic/{p-26798a7b.system.entry.js → p-8e086176.system.entry.js} +1 -1
- package/dist/ionic/{p-96dbbac1.system.entry.js → p-90483001.system.entry.js} +1 -1
- package/dist/ionic/{p-e8e86f69.system.entry.js → p-93f25d0d.system.entry.js} +1 -1
- package/dist/ionic/{p-a9a80f5b.entry.js → p-9588396d.entry.js} +1 -1
- package/dist/ionic/{p-32303650.system.entry.js → p-98c798de.system.entry.js} +1 -1
- package/dist/ionic/p-9eae578e.system.entry.js +4 -0
- package/dist/ionic/{p-f910cc73.system.entry.js → p-9eec42cc.system.entry.js} +1 -1
- package/dist/ionic/{p-a225bf0f.system.entry.js → p-a8e90d15.system.entry.js} +1 -1
- package/dist/ionic/p-ab11130c.system.js +4 -0
- package/dist/ionic/{p-6fd64e7c.system.entry.js → p-ad8bed54.system.entry.js} +1 -1
- package/dist/ionic/{p-27bcbbc7.system.entry.js → p-b1a2a195.system.entry.js} +1 -1
- package/dist/ionic/{p-a98dc0c1.entry.js → p-bcd073dd.entry.js} +1 -1
- package/dist/ionic/{p-18ba8221.entry.js → p-be6344dd.entry.js} +1 -1
- package/dist/ionic/p-c14f8ac8.js +4 -0
- package/dist/ionic/{p-73aa7604.entry.js → p-c7c7c110.entry.js} +1 -1
- package/dist/ionic/p-c9e07b2f.entry.js +4 -0
- package/dist/ionic/p-ccc2fb62.system.entry.js +4 -0
- package/dist/ionic/p-cce9f61a.system.entry.js +4 -0
- package/dist/ionic/{p-6b7c55cd.entry.js → p-cef8c5c2.entry.js} +1 -1
- package/dist/ionic/{p-6fbecbda.entry.js → p-d1025b3d.entry.js} +1 -1
- package/dist/ionic/{p-b4d31b30.system.entry.js → p-d32188f3.system.entry.js} +1 -1
- package/dist/ionic/{p-ef126ae8.system.entry.js → p-d39db09e.system.entry.js} +1 -1
- package/dist/ionic/{p-42ba3902.entry.js → p-d51019a8.entry.js} +1 -1
- package/dist/ionic/p-d7e9a0ac.entry.js +4 -0
- package/dist/ionic/{p-b133e9b4.entry.js → p-ddb30596.entry.js} +1 -1
- package/dist/ionic/{p-8017aad2.system.entry.js → p-de74582b.system.entry.js} +1 -1
- package/dist/ionic/p-e3584231.system.js +1 -1
- package/dist/ionic/p-ebcf6eca.entry.js +4 -0
- package/dist/ionic/{p-c18de88a.system.entry.js → p-ec040c06.system.entry.js} +1 -1
- package/dist/ionic/{p-464975c5.system.entry.js → p-ed25b7cc.system.entry.js} +1 -1
- package/dist/ionic/{p-e7ea9815.system.entry.js → p-f957d584.system.entry.js} +1 -1
- package/dist/ionic/{p-54dfc9b5.system.js → p-fff7a57e.system.js} +1 -1
- package/dist/types/components/datetime/utils/data.d.ts +7 -11
- package/dist/types/components/picker/picker.d.ts +129 -75
- package/dist/types/components/picker-column/picker-column.d.ts +39 -99
- package/dist/types/components/picker-column-internal/picker-column-internal-interfaces.d.ts +5 -0
- package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +102 -0
- package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +8 -0
- package/dist/types/components/picker-internal/picker-internal.d.ts +102 -0
- package/dist/types/components.d.ts +122 -154
- package/dist/types/interface.d.ts +1 -1
- package/dist/types/utils/config.d.ts +2 -2
- package/dist/types/utils/overlays.d.ts +2 -5
- package/hydrate/index.js +1205 -1350
- package/package.json +1 -1
- package/components/ion-picker-column-option.d.ts +0 -11
- package/components/ion-picker-column-option.js +0 -9
- package/components/ion-picker-legacy-column.d.ts +0 -11
- package/components/ion-picker-legacy-column.js +0 -9
- package/components/ion-picker-legacy.js +0 -309
- package/components/picker-column-option.js +0 -122
- package/components/picker-column2.js +0 -379
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +0 -104
- package/dist/collection/components/picker/test/a11y/picker.e2e.js +0 -15
- package/dist/collection/components/picker/test/custom/picker.e2e.js +0 -85
- package/dist/collection/components/picker-column/test/disabled/picker-column.e2e.js +0 -91
- package/dist/collection/components/picker-column/test/slots/picker-column.e2e.js +0 -39
- package/dist/collection/components/picker-column-option/picker-column-option.ios.css +0 -87
- package/dist/collection/components/picker-column-option/picker-column-option.js +0 -173
- package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +0 -18
- package/dist/collection/components/picker-column-option/test/basic/picker-column-option.e2e.js +0 -37
- package/dist/collection/components/picker-column-option/test/picker-column-option.spec.js +0 -29
- package/dist/collection/components/picker-legacy/picker.js +0 -817
- package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +0 -25
- package/dist/collection/components/picker-legacy-column/picker-column.js +0 -419
- package/dist/collection/components/title/test/title.spec.js +0 -132
- package/dist/esm/ion-picker-column-option.entry.js +0 -100
- package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
- package/dist/esm-es5/ion-picker-column.entry.js +0 -4
- package/dist/esm-es5/ion-picker.entry.js +0 -4
- package/dist/esm-es5/overlays-fbc5cab5.js +0 -4
- package/dist/ionic/p-17da5ed1.entry.js +0 -4
- package/dist/ionic/p-36d194c5.entry.js +0 -4
- package/dist/ionic/p-3993ae66.entry.js +0 -4
- package/dist/ionic/p-5a1aac13.system.entry.js +0 -4
- package/dist/ionic/p-6e70dd1a.system.entry.js +0 -4
- package/dist/ionic/p-8e42850f.entry.js +0 -4
- package/dist/ionic/p-8fa6583d.system.js +0 -4
- package/dist/ionic/p-91af3c52.system.entry.js +0 -4
- package/dist/ionic/p-afcf4620.entry.js +0 -4
- package/dist/ionic/p-b3d0a3d6.system.entry.js +0 -4
- package/dist/ionic/p-b7010c69.system.entry.js +0 -4
- package/dist/ionic/p-c41bff4e.system.entry.js +0 -4
- package/dist/ionic/p-ca8938f4.js +0 -4
- package/dist/ionic/p-cde52378.system.entry.js +0 -4
- package/dist/ionic/p-ea74e0c6.entry.js +0 -4
- package/dist/ionic/p-ffd5dba4.system.entry.js +0 -4
- package/dist/types/components/picker/picker-interfaces.d.ts +0 -8
- package/dist/types/components/picker-column/picker-column-interfaces.d.ts +0 -4
- package/dist/types/components/picker-column-option/picker-column-option.d.ts +0 -66
- package/dist/types/components/picker-legacy/picker.d.ts +0 -158
- package/dist/types/components/picker-legacy-column/picker-column.d.ts +0 -46
- /package/dist/collection/components/{picker-legacy → picker}/animations/ios.enter.js +0 -0
- /package/dist/collection/components/{picker-legacy → picker}/animations/ios.leave.js +0 -0
- /package/dist/collection/components/picker/{picker-interfaces.js → picker-interface.js} +0 -0
- /package/dist/collection/components/{picker-legacy-column → picker-column}/picker-column.ios.css +0 -0
- /package/dist/collection/components/{picker-legacy-column → picker-column}/test/test.utils.js +0 -0
- /package/dist/collection/components/{picker-column/picker-column-interfaces.js → picker-column-internal/picker-column-internal-interfaces.js} +0 -0
- /package/dist/collection/components/{picker-legacy/picker-interface.js → picker-internal/picker-internal-interfaces.js} +0 -0
- /package/dist/esm-es5/{data-4b9508c9.js → data-f5c75b4e.js} +0 -0
- /package/dist/ionic/{p-368f5215.js → p-2aea8b1e.js} +0 -0
- /package/dist/ionic/{p-f58981c2.system.js → p-82e3d633.system.js} +0 -0
- /package/dist/types/components/{picker-legacy → picker}/animations/ios.enter.d.ts +0 -0
- /package/dist/types/components/{picker-legacy → picker}/animations/ios.leave.d.ts +0 -0
- /package/dist/types/components/{picker-legacy → picker}/picker-interface.d.ts +0 -0
- /package/dist/types/components/{picker-legacy-column → picker-column}/test/test.utils.d.ts +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import AxeBuilder from "@axe-core/playwright";
|
|
5
4
|
import { expect } from "@playwright/test";
|
|
6
5
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
7
6
|
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
@@ -60,41 +59,3 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, screenshot, c
|
|
|
60
59
|
});
|
|
61
60
|
});
|
|
62
61
|
});
|
|
63
|
-
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
64
|
-
test.describe(title('title: level 1 heading'), () => {
|
|
65
|
-
test('should not have accessibility violations', async ({ page }) => {
|
|
66
|
-
/**
|
|
67
|
-
* Level 1 headings must be inside of a landmark (ion-header)
|
|
68
|
-
*/
|
|
69
|
-
await page.setContent(`
|
|
70
|
-
<ion-header>
|
|
71
|
-
<ion-toolbar>
|
|
72
|
-
<ion-title>My Title</ion-title>
|
|
73
|
-
</ion-toolbar>
|
|
74
|
-
</ion-header>
|
|
75
|
-
`, config);
|
|
76
|
-
const results = await new AxeBuilder({ page }).analyze();
|
|
77
|
-
expect(results.violations).toEqual([]);
|
|
78
|
-
});
|
|
79
|
-
test('should not have accessibility violations with multiple h1 elements on a hidden page', async ({ page }) => {
|
|
80
|
-
await page.setContent(`
|
|
81
|
-
<div class="ion-page ion-page-hidden">
|
|
82
|
-
<ion-header>
|
|
83
|
-
<ion-toolbar>
|
|
84
|
-
<ion-title>My Title</ion-title>
|
|
85
|
-
</ion-toolbar>
|
|
86
|
-
</ion-header>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="ion-page">
|
|
89
|
-
<ion-header>
|
|
90
|
-
<ion-toolbar>
|
|
91
|
-
<ion-title>My Title</ion-title>
|
|
92
|
-
</ion-toolbar>
|
|
93
|
-
</ion-header>
|
|
94
|
-
</div>
|
|
95
|
-
`, config);
|
|
96
|
-
const results = await new AxeBuilder({ page }).analyze();
|
|
97
|
-
expect(results.violations).toEqual([]);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
});
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
|
-
import { doc } from "../../utils/browser/index";
|
|
6
5
|
import { createColorClasses } from "../../utils/theme";
|
|
7
6
|
import { getIonMode } from "../../global/ionic-global";
|
|
8
7
|
export class ToolbarTitle {
|
|
@@ -26,29 +25,9 @@ export class ToolbarTitle {
|
|
|
26
25
|
return this.size !== undefined ? this.size : 'default';
|
|
27
26
|
}
|
|
28
27
|
render() {
|
|
29
|
-
var _a;
|
|
30
|
-
const { el } = this;
|
|
31
28
|
const mode = getIonMode(this);
|
|
32
29
|
const size = this.getSize();
|
|
33
|
-
|
|
34
|
-
* If there is already a level one heading
|
|
35
|
-
* within the context of the page then
|
|
36
|
-
* do not add another one.
|
|
37
|
-
*/
|
|
38
|
-
const root = (_a = el.closest('.ion-page')) !== null && _a !== void 0 ? _a : doc === null || doc === void 0 ? void 0 : doc.body;
|
|
39
|
-
const hasHeading = root === null || root === void 0 ? void 0 : root.querySelector('h1, [role="heading"][aria-level="1"]');
|
|
40
|
-
const hasRole = el.hasAttribute('role');
|
|
41
|
-
/**
|
|
42
|
-
* The first `ion-title` on the page is considered
|
|
43
|
-
* the heading. This can be customized by setting
|
|
44
|
-
* role="heading" aria-level="1" on another element
|
|
45
|
-
* or by using h1.
|
|
46
|
-
*
|
|
47
|
-
* Level 1 headings must be contained inside of a landmark,
|
|
48
|
-
* so we check for ion-header which is typically the landmark.
|
|
49
|
-
*/
|
|
50
|
-
const isHeading = hasRole === false && hasHeading === null && (root === null || root === void 0 ? void 0 : root.querySelector('ion-title')) === el && (el === null || el === void 0 ? void 0 : el.closest('ion-header[role]')) !== null;
|
|
51
|
-
return (h(Host, { role: isHeading ? 'heading' : null, "aria-level": isHeading ? '1' : null, class: createColorClasses(this.color, {
|
|
30
|
+
return (h(Host, { class: createColorClasses(this.color, {
|
|
52
31
|
[mode]: true,
|
|
53
32
|
[`title-${size}`]: true,
|
|
54
33
|
'title-rtl': document.dir === 'rtl',
|
|
@@ -4,6 +4,62 @@
|
|
|
4
4
|
import AxeBuilder from "@axe-core/playwright";
|
|
5
5
|
import { expect } from "@playwright/test";
|
|
6
6
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
7
|
+
configs({ directions: ['ltr'], themes: ['dark', 'light'] }).forEach(({ title, config }) => {
|
|
8
|
+
test.describe(title('toast: Axe testing'), () => {
|
|
9
|
+
test('should not have any axe violations with inline toasts', async ({ page }) => {
|
|
10
|
+
await page.setContent(`
|
|
11
|
+
<ion-toast></ion-toast>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
const toast = document.querySelector('ion-toast');
|
|
15
|
+
toast.icon = 'person';
|
|
16
|
+
toast.header = 'Inline Toast Header';
|
|
17
|
+
toast.message = 'Inline Toast Message';
|
|
18
|
+
toast.buttons = ['OK'];
|
|
19
|
+
</script>
|
|
20
|
+
`, config);
|
|
21
|
+
const ionToastDidPresent = await page.spyOnEvent('ionToastDidPresent');
|
|
22
|
+
const toast = page.locator('ion-toast');
|
|
23
|
+
await toast.evaluate((el) => el.present());
|
|
24
|
+
await ionToastDidPresent.next();
|
|
25
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
26
|
+
expect(results.violations).toEqual([]);
|
|
27
|
+
});
|
|
28
|
+
test('should not have any axe violations with controller toasts', async ({ page }) => {
|
|
29
|
+
await page.setContent(`
|
|
30
|
+
<script type="module">
|
|
31
|
+
import { toastController } from '../../../../dist/ionic/index.esm.js';
|
|
32
|
+
window.toastController = toastController;
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<ion-button onclick="presentToast()">Present</ion-button>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
const presentToast = async () => {
|
|
39
|
+
// we only want to test color contrast on the toast itself
|
|
40
|
+
const button = document.querySelector('ion-button');
|
|
41
|
+
button.style.display = 'none';
|
|
42
|
+
|
|
43
|
+
const toast = await toastController.create({
|
|
44
|
+
icon: 'person',
|
|
45
|
+
header: 'Controller Toast Header',
|
|
46
|
+
message: 'Controller Toast Message',
|
|
47
|
+
buttons: ['OK']
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
await toast.present();
|
|
51
|
+
};
|
|
52
|
+
</script>
|
|
53
|
+
`, config);
|
|
54
|
+
const ionToastDidPresent = await page.spyOnEvent('ionToastDidPresent');
|
|
55
|
+
const button = page.locator('ion-button');
|
|
56
|
+
await button.click();
|
|
57
|
+
await ionToastDidPresent.next();
|
|
58
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
59
|
+
expect(results.violations).toEqual([]);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
7
63
|
/**
|
|
8
64
|
* This test does not check LTR vs RTL layouts
|
|
9
65
|
*/
|
|
@@ -12,30 +68,6 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
12
68
|
test.beforeEach(async ({ page }) => {
|
|
13
69
|
await page.goto(`/src/components/toast/test/a11y`, config);
|
|
14
70
|
});
|
|
15
|
-
test('should not have any axe violations with inline toasts', async ({ page }) => {
|
|
16
|
-
const didPresent = await page.spyOnEvent('ionToastDidPresent');
|
|
17
|
-
await page.click('#inline-toast-trigger');
|
|
18
|
-
await didPresent.next();
|
|
19
|
-
/**
|
|
20
|
-
* IonToast overlays the entire screen, so
|
|
21
|
-
* Axe will be unable to verify color contrast
|
|
22
|
-
* on elements under the toast.
|
|
23
|
-
*/
|
|
24
|
-
const results = await new AxeBuilder({ page }).disableRules('color-contrast').analyze();
|
|
25
|
-
expect(results.violations).toEqual([]);
|
|
26
|
-
});
|
|
27
|
-
test('should not have any axe violations with controller toasts', async ({ page }) => {
|
|
28
|
-
const didPresent = await page.spyOnEvent('ionToastDidPresent');
|
|
29
|
-
await page.click('#controller-toast-trigger');
|
|
30
|
-
await didPresent.next();
|
|
31
|
-
/**
|
|
32
|
-
* IonToast overlays the entire screen, so
|
|
33
|
-
* Axe will be unable to verify color contrast
|
|
34
|
-
* on elements under the toast.
|
|
35
|
-
*/
|
|
36
|
-
const results = await new AxeBuilder({ page }).disableRules('color-contrast').analyze();
|
|
37
|
-
expect(results.violations).toEqual([]);
|
|
38
|
-
});
|
|
39
71
|
test('should have aria-labelledby and aria-label added to the button when htmlAttributes is set', async ({ page, }) => {
|
|
40
72
|
const didPresent = await page.spyOnEvent('ionToastDidPresent');
|
|
41
73
|
await page.click('#aria-label-toast-trigger');
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
:host {
|
|
314
314
|
--background: var(--ion-color-step-50, #f2f2f2);
|
|
315
315
|
--border-radius: 14px;
|
|
316
|
-
--button-color: var(--ion-color-primary, #
|
|
316
|
+
--button-color: var(--ion-color-primary, #0054e9);
|
|
317
317
|
--color: var(--ion-color-step-850, #262626);
|
|
318
318
|
--max-width: 700px;
|
|
319
319
|
--max-height: 478px;
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
--background: var(--ion-color-step-800, #333333);
|
|
315
315
|
--border-radius: 4px;
|
|
316
316
|
--box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);
|
|
317
|
-
--button-color: var(--ion-color-primary, #
|
|
317
|
+
--button-color: var(--ion-color-primary, #0054e9);
|
|
318
318
|
--color: var(--ion-color-step-50, #f2f2f2);
|
|
319
319
|
--max-width: 700px;
|
|
320
320
|
--start: 8px;
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
|
|
412
412
|
@media (any-hover: hover) {
|
|
413
413
|
.toast-button:hover {
|
|
414
|
-
background-color: rgba(var(--ion-color-primary-rgb,
|
|
414
|
+
background-color: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);
|
|
415
415
|
}
|
|
416
416
|
.toast-button-cancel:hover {
|
|
417
417
|
background-color: rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08);
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
import AxeBuilder from "@axe-core/playwright";
|
|
5
5
|
import { expect } from "@playwright/test";
|
|
6
6
|
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
7
|
-
configs({
|
|
7
|
+
configs({ directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ title, config }) => {
|
|
8
8
|
test.describe(title('toggle: a11y'), () => {
|
|
9
9
|
test('should not have accessibility violations', async ({ page }) => {
|
|
10
|
-
await page.
|
|
10
|
+
await page.setContent(`
|
|
11
|
+
<main>
|
|
12
|
+
<ion-toggle>my label</ion-toggle>
|
|
13
|
+
<ion-toggle aria-label="my aria label"></ion-toggle>
|
|
14
|
+
<ion-toggle checked="true">Checked</ion-toggle>
|
|
15
|
+
</main>
|
|
16
|
+
`, config);
|
|
11
17
|
const results = await new AxeBuilder({ page }).analyze();
|
|
12
18
|
expect(results.violations).toEqual([]);
|
|
13
19
|
});
|
|
@@ -538,7 +538,7 @@ input {
|
|
|
538
538
|
*/
|
|
539
539
|
:host {
|
|
540
540
|
--track-background: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.088);
|
|
541
|
-
--track-background-checked: var(--ion-color-primary, #
|
|
541
|
+
--track-background-checked: var(--ion-color-primary, #0054e9);
|
|
542
542
|
--border-radius: 16px;
|
|
543
543
|
--handle-background: #ffffff;
|
|
544
544
|
--handle-background-checked: #ffffff;
|
|
@@ -538,10 +538,10 @@ input {
|
|
|
538
538
|
*/
|
|
539
539
|
:host {
|
|
540
540
|
--track-background: rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.39);
|
|
541
|
-
--track-background-checked: rgba(var(--ion-color-primary-rgb,
|
|
541
|
+
--track-background-checked: rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.5);
|
|
542
542
|
--border-radius: 14px;
|
|
543
543
|
--handle-background: #ffffff;
|
|
544
|
-
--handle-background-checked: var(--ion-color-primary, #
|
|
544
|
+
--handle-background-checked: var(--ion-color-primary, #0054e9);
|
|
545
545
|
--handle-border-radius: 50%;
|
|
546
546
|
--handle-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
547
547
|
--handle-width: 20px;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
+
import AxeBuilder from "@axe-core/playwright";
|
|
4
5
|
import { expect } from "@playwright/test";
|
|
5
6
|
import { configs, test } from "../../../utils/test/playwright/index";
|
|
6
7
|
configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, screenshot, config }) => {
|
|
@@ -30,3 +31,20 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, screenshot, c
|
|
|
30
31
|
});
|
|
31
32
|
});
|
|
32
33
|
});
|
|
34
|
+
configs({ directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ config, title }) => {
|
|
35
|
+
test.describe(title('typography: a11y'), () => {
|
|
36
|
+
test('should not have accessibility violations for anchor tags', async ({ page }) => {
|
|
37
|
+
/**
|
|
38
|
+
* All page content should be contained by landmarks (main, nav, etc.)
|
|
39
|
+
* By containing the badge in a main element, we can avoid this violation.
|
|
40
|
+
*/
|
|
41
|
+
await page.setContent(`
|
|
42
|
+
<main>
|
|
43
|
+
<a href="#">Link</a>
|
|
44
|
+
</main>
|
|
45
|
+
`, config);
|
|
46
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
47
|
+
expect(results.violations).toEqual([]);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import AxeBuilder from "@axe-core/playwright";
|
|
5
|
+
import { expect } from "@playwright/test";
|
|
6
|
+
import { configs, test } from "../../../utils/test/playwright/index";
|
|
7
|
+
const styleTestHelpers = `
|
|
8
|
+
<style>
|
|
9
|
+
main {
|
|
10
|
+
background: var(--ion-color-contrast);
|
|
11
|
+
}
|
|
12
|
+
.ion-background {
|
|
13
|
+
background: var(--ion-color-base);
|
|
14
|
+
}
|
|
15
|
+
.ion-background-shade {
|
|
16
|
+
background: var(--ion-color-shade);
|
|
17
|
+
}
|
|
18
|
+
.ion-background-tint {
|
|
19
|
+
background: var(--ion-color-tint);
|
|
20
|
+
}
|
|
21
|
+
.ion-background-opacity-08 {
|
|
22
|
+
background: rgba(var(--ion-color-base-rgb), 0.08);
|
|
23
|
+
}
|
|
24
|
+
.ion-background-opacity-12 {
|
|
25
|
+
background: rgba(var(--ion-color-base-rgb), 0.12);
|
|
26
|
+
}
|
|
27
|
+
.ion-background-opacity-16 {
|
|
28
|
+
background: rgba(var(--ion-color-base-rgb), 0.16);
|
|
29
|
+
}
|
|
30
|
+
.ion-color {
|
|
31
|
+
color: var(--ion-color-base);
|
|
32
|
+
}
|
|
33
|
+
.ion-color-contrast {
|
|
34
|
+
color: var(--ion-color-contrast);
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
`;
|
|
38
|
+
/**
|
|
39
|
+
* All colors should be tested in the following scenarios:
|
|
40
|
+
* 1) The base color as the text color against the contrast color as the background color
|
|
41
|
+
* 2) The contrast color as the text color against the base color as the background color
|
|
42
|
+
* 3) The contrast color as the text color against the shade color as the background color
|
|
43
|
+
* 4) The contrast color as the text color against the tint color as the background color
|
|
44
|
+
* 5) The base color as the text color against the base color at 0.08 opacity as the background color
|
|
45
|
+
* 6) The base color as the text color against the base color at 0.12 opacity as the background color
|
|
46
|
+
* 7) The base color as the text color against the base color at 0.16 opacity as the background color
|
|
47
|
+
*/
|
|
48
|
+
configs({ modes: ['md'], directions: ['ltr'], themes: ['light', 'dark'] }).forEach(({ config, title }) => {
|
|
49
|
+
const colors = ['primary', 'secondary', 'tertiary', 'success', 'warning', 'danger', 'light', 'medium', 'dark'];
|
|
50
|
+
test.describe(title('theme'), () => {
|
|
51
|
+
test.beforeEach(({ skip }) => {
|
|
52
|
+
skip.browser('firefox', 'Color contrast ratio is consistent across browsers');
|
|
53
|
+
skip.browser('webkit', 'Color contrast ratio is consistent across browsers');
|
|
54
|
+
});
|
|
55
|
+
for (const color of colors) {
|
|
56
|
+
test(`color "${color}" should pass AA guidelines`, async ({ page }) => {
|
|
57
|
+
await page.setContent(`${styleTestHelpers}
|
|
58
|
+
<main class="ion-color-${color}">
|
|
59
|
+
<p class="ion-color">Hello World</p>
|
|
60
|
+
</main>`, config);
|
|
61
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
62
|
+
expect(results.violations).toEqual([]);
|
|
63
|
+
});
|
|
64
|
+
test(`contrast color on "${color}" background should pass AA guidelines`, async ({ page }) => {
|
|
65
|
+
await page.setContent(`${styleTestHelpers}
|
|
66
|
+
<main class="ion-color-${color}">
|
|
67
|
+
<p class="ion-color-contrast ion-background">Hello World</p>
|
|
68
|
+
</main>`, config);
|
|
69
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
70
|
+
expect(results.violations).toEqual([]);
|
|
71
|
+
});
|
|
72
|
+
test(`contrast color on "${color}" background shade should pass AA guidelines`, async ({ page }) => {
|
|
73
|
+
await page.setContent(`${styleTestHelpers}
|
|
74
|
+
<main class="ion-color-${color}">
|
|
75
|
+
<p class="ion-color-contrast ion-background-shade">Hello World</p>
|
|
76
|
+
</main>`, config);
|
|
77
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
78
|
+
expect(results.violations).toEqual([]);
|
|
79
|
+
});
|
|
80
|
+
test(`contrast color on "${color}" background tint should pass AA guidelines`, async ({ page }) => {
|
|
81
|
+
await page.setContent(`${styleTestHelpers}
|
|
82
|
+
<main class="ion-color-${color}">
|
|
83
|
+
<p class="ion-color-contrast ion-background-tint">Hello World</p>
|
|
84
|
+
</main>`, config);
|
|
85
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
86
|
+
expect(results.violations).toEqual([]);
|
|
87
|
+
});
|
|
88
|
+
test(`color "${color}" on 0.08 opacity background should pass AA guidelines`, async ({ page }) => {
|
|
89
|
+
await page.setContent(`${styleTestHelpers}
|
|
90
|
+
<main class="ion-color-${color}">
|
|
91
|
+
<p class="ion-color ion-background-opacity-08">Hello World</p>
|
|
92
|
+
</main>`, config);
|
|
93
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
94
|
+
expect(results.violations).toEqual([]);
|
|
95
|
+
});
|
|
96
|
+
test(`color "${color}" on 0.12 opacity background should pass AA guidelines`, async ({ page }) => {
|
|
97
|
+
await page.setContent(`${styleTestHelpers}
|
|
98
|
+
<main class="ion-color-${color}">
|
|
99
|
+
<p class="ion-color ion-background-opacity-12">Hello World</p>
|
|
100
|
+
</main>`, config);
|
|
101
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
102
|
+
expect(results.violations).toEqual([]);
|
|
103
|
+
});
|
|
104
|
+
test(`color "${color}" on 0.16 opacity background should pass AA guidelines`, async ({ page }) => {
|
|
105
|
+
await page.setContent(`${styleTestHelpers}
|
|
106
|
+
<main class="ion-color-${color}">
|
|
107
|
+
<p class="ion-color ion-background-opacity-16">Hello World</p>
|
|
108
|
+
</main>`, config);
|
|
109
|
+
const results = await new AxeBuilder({ page }).analyze();
|
|
110
|
+
expect(results.violations).toEqual([]);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -29,10 +29,7 @@ export const alertController = /*@__PURE__*/ createController('ion-alert');
|
|
|
29
29
|
export const actionSheetController = /*@__PURE__*/ createController('ion-action-sheet');
|
|
30
30
|
export const loadingController = /*@__PURE__*/ createController('ion-loading');
|
|
31
31
|
export const modalController = /*@__PURE__*/ createController('ion-modal');
|
|
32
|
-
|
|
33
|
-
* @deprecated Use the inline ion-picker component instead.
|
|
34
|
-
*/
|
|
35
|
-
export const pickerController = /*@__PURE__*/ createController('ion-picker-legacy');
|
|
32
|
+
export const pickerController = /*@__PURE__*/ createController('ion-picker');
|
|
36
33
|
export const popoverController = /*@__PURE__*/ createController('ion-popover');
|
|
37
34
|
export const toastController = /*@__PURE__*/ createController('ion-toast');
|
|
38
35
|
/**
|
|
@@ -142,7 +139,7 @@ const focusLastDescendant = (ref, overlay) => {
|
|
|
142
139
|
* Should NOT include: Toast
|
|
143
140
|
*/
|
|
144
141
|
const trapKeyboardFocus = (ev, doc) => {
|
|
145
|
-
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker
|
|
142
|
+
const lastOverlay = getPresentedOverlay(doc, 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover');
|
|
146
143
|
const target = ev.target;
|
|
147
144
|
/**
|
|
148
145
|
* If no active overlay, ignore this event.
|
|
@@ -327,7 +324,7 @@ export const dismissOverlay = (doc, data, role, overlayTag, id) => {
|
|
|
327
324
|
*/
|
|
328
325
|
export const getOverlays = (doc, selector) => {
|
|
329
326
|
if (selector === undefined) {
|
|
330
|
-
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker
|
|
327
|
+
selector = 'ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker,ion-popover,ion-toast';
|
|
331
328
|
}
|
|
332
329
|
return Array.from(doc.querySelectorAll(selector)).filter((c) => c.overlayIndex > 0);
|
|
333
330
|
};
|
|
@@ -39,7 +39,7 @@ export const setContent = async (page, html, testInfo, options) => {
|
|
|
39
39
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
|
40
40
|
<link href="${baseUrl}/css/ionic.bundle.css" rel="stylesheet" />
|
|
41
41
|
<link href="${baseUrl}/scripts/testing/styles.css" rel="stylesheet" />
|
|
42
|
-
${theme !== 'light' ? `<link href="${baseUrl}/
|
|
42
|
+
${theme !== 'light' ? `<link href="${baseUrl}/src/themes/test/${theme}.css" rel="stylesheet" />` : ''}
|
|
43
43
|
<script src="${baseUrl}/scripts/testing/scripts.js"></script>
|
|
44
44
|
<script type="module" src="${baseUrl}/dist/ionic/ionic.esm.js"></script>
|
|
45
45
|
<script>
|