Merge remote-tracking branch 'origin/main' into sync-v7-09-09-2022

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Liam DeBeasi
2022-09-09 13:05:11 -04:00
gitea-unlock(16/)
octicon-diff(16/tw-mr-1) 47 changed files with 541 additions and 106 deletions

13
core/CHANGELOG.md
View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.2.6](https://github.com/ionic-team/ionic/compare/v6.2.5...v6.2.6) (2022-09-07)
### Bug Fixes
* **datetime:** calendar day and years are now localized ([#25847](https://github.com/ionic-team/ionic/issues/25847)) ([cbd1268](https://github.com/ionic-team/ionic/commit/cbd1268a03204f05314f2ba284ad433457a9cf33)), closes [#25843](https://github.com/ionic-team/ionic/issues/25843)
* **datetime:** hourCycle formats hour correctly ([#25869](https://github.com/ionic-team/ionic/issues/25869)) ([1a1491d](https://github.com/ionic-team/ionic/commit/1a1491df0242da1cb3c9a7f128bbd4d5ce4dbf3e)), closes [#25862](https://github.com/ionic-team/ionic/issues/25862)
* **datetime:** month grid no longer loops on ios ([#25857](https://github.com/ionic-team/ionic/issues/25857)) ([c938054](https://github.com/ionic-team/ionic/commit/c938054605dffb6c3002a64a3d8aaf36892c7a93)), closes [#25752](https://github.com/ionic-team/ionic/issues/25752)
## [6.2.5](https://github.com/ionic-team/ionic/compare/v6.2.4...v6.2.5) (2022-08-31)

4
core/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@ionic/core",
"version": "6.2.5",
"version": "6.2.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/core",
"version": "6.2.5",
"version": "6.2.6",
"license": "MIT",
"dependencies": {
"@stencil/core": "^2.17.4",

2
core/package.json
View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "6.2.5",
"version": "6.2.6",
"description": "Base components for Ionic",
"keywords": [
"ionic",

13
core/src/components/datetime/test/format.spec.ts
View File

@@ -155,4 +155,17 @@ describe('getLocalizedTime', () => {
expect(getLocalizedTime('en-US', datetimeParts, false)).toEqual('9:40 AM');
});
it('should avoid Chromium bug when using 12 hour time in a 24 hour locale', () => {
const datetimeParts = {
day: 1,
month: 1,
year: 2022,
hour: 0,
minute: 0,
tzOffset: 0,
};
expect(getLocalizedTime('en-GB', datetimeParts, false)).toEqual('12:00 am');
});
});

6
core/src/components/datetime/utils/format.ts
View File

@@ -19,7 +19,11 @@ export const getLocalizedTime = (locale: string, refParts: DatetimeParts, use24H
hour: 'numeric',
minute: 'numeric',
timeZone: 'UTC',
hour12: !use24Hour,
/**
* We use hourCycle here instead of hour12 due to:
* https://bugs.chromium.org/p/chromium/issues/detail?id=1347316&q=hour12&can=2
*/
hourCycle: use24Hour ? 'h23' : 'h12',
}).format(
new Date(
convertDataToISO({

2
core/src/components/label/label.scss
View File

@@ -6,7 +6,7 @@
:host-context(.item) {
/**
* @prop --color: Color of the label
* @prop --color: Color of the label. This property is only available when using `ion-label` inside of an `ion-item`.
*/
--color: initial;

3
core/src/components/refresher/test/basic/refresher.e2e.ts
View File

@@ -3,7 +3,8 @@ import { test } from '@utils/test/playwright';
import { pullToRefresh } from '../test.utils';
test.describe('refresher: basic', () => {
// TODO: Enable this test when touch events/gestures are better supported in Playwright: https://github.com/microsoft/playwright/issues/2903
test.skip('refresher: basic', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/src/components/refresher/test/basic');
});

3
core/src/components/refresher/test/scroll-target/refresher.e2e.ts
View File

@@ -3,7 +3,8 @@ import { test } from '@utils/test/playwright';
import { pullToRefresh } from '../test.utils';
test.describe('refresher: custom scroll target', () => {
// TODO: Enable this test when touch events/gestures are better supported in Playwright: https://github.com/microsoft/playwright/issues/2903
test.skip('refresher: custom scroll target', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/src/components/refresher/test/scroll-target');
});

4
core/src/components/tab-bar/tab-bar.tsx
View File

@@ -1,10 +1,10 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Prop, State, Watch, h } from '@stencil/core';
import type { KeyboardController } from '@utils/keyboard/keyboard-controller';
import { createKeyboardController } from '@utils/keyboard/keyboard-controller';
import { getIonMode } from '../../global/ionic-global';
import type { Color, TabBarChangedEventDetail } from '../../interface';
import type { KeyboardController } from '../../utils/keyboard/keyboard-controller';
import { createKeyboardController } from '../../utils/keyboard/keyboard-controller';
import { createColorClasses } from '../../utils/theme';
/**