@ionic/core 7.6.7-nightly.20240130 → 7.6.7

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.
@@ -25,7 +25,7 @@ configs().forEach(({ title, screenshot, config }) => {
25
25
  await page.setContent(`
26
26
  <ion-item>
27
27
  <ion-label position="stacked">My Label</ion-label>
28
- <ion-input></ion-input>
28
+ <ion-input aria-label="My Label"></ion-input>
29
29
  </ion-item>
30
30
  `, config);
31
31
  const itemEl = page.locator('ion-item');
@@ -35,7 +35,7 @@ configs().forEach(({ title, screenshot, config }) => {
35
35
  await page.setContent(`
36
36
  <ion-item>
37
37
  <ion-label position="floating">My Label</ion-label>
38
- <ion-input></ion-input>
38
+ <ion-input aria-label="My Label"></ion-input>
39
39
  </ion-item>
40
40
  `, config);
41
41
  const itemEl = page.locator('ion-item');
@@ -40,7 +40,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
40
40
  const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent');
41
41
  await page.click('#backdrop-inactive');
42
42
  await ionModalDidPresent.next();
43
- const input = page.locator('#root-input input').first();
43
+ const input = page.locator('#root-input').first();
44
44
  await input.click();
45
45
  await expect(input).toBeFocused();
46
46
  });
@@ -8,9 +8,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
8
8
  test('should emit when selecting an unchecked radio', async ({ page }) => {
9
9
  await page.setContent(`
10
10
  <ion-radio-group value="1">
11
- <ion-radio value="1"></ion-radio>
12
- <ion-radio value="2"></ion-radio>
13
- <ion-radio value="3"></ion-radio>
11
+ <ion-radio value="1" aria-label="1"></ion-radio>
12
+ <ion-radio value="2" aria-label="2"></ion-radio>
13
+ <ion-radio value="3" aria-label="3"></ion-radio>
14
14
  </ion-radio-group>
15
15
  `, config);
16
16
  const ionChangeSpy = await page.spyOnEvent('ionChange');
@@ -22,9 +22,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
22
22
  test('should emit when the radio group does not have an initial value', async ({ page }) => {
23
23
  await page.setContent(`
24
24
  <ion-radio-group>
25
- <ion-radio value="1"></ion-radio>
26
- <ion-radio value="2"></ion-radio>
27
- <ion-radio value="3"></ion-radio>
25
+ <ion-radio value="1" aria-label="1"></ion-radio>
26
+ <ion-radio value="2" aria-label="2"></ion-radio>
27
+ <ion-radio value="3" aria-label="3"></ion-radio>
28
28
  </ion-radio-group>
29
29
  `, config);
30
30
  const ionChangeSpy = await page.spyOnEvent('ionChange');
@@ -36,9 +36,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
36
36
  test('should not emit when selecting a checked radio', async ({ page }) => {
37
37
  await page.setContent(`
38
38
  <ion-radio-group value="1">
39
- <ion-radio value="1"></ion-radio>
40
- <ion-radio value="2"></ion-radio>
41
- <ion-radio value="3"></ion-radio>
39
+ <ion-radio value="1" aria-label="1"></ion-radio>
40
+ <ion-radio value="2" aria-label="2"></ion-radio>
41
+ <ion-radio value="3" aria-label="3"></ion-radio>
42
42
  </ion-radio-group>
43
43
  `, config);
44
44
  const ionChangeSpy = await page.spyOnEvent('ionChange');
@@ -49,9 +49,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
49
49
  test('should not emit if the value is set programmatically', async ({ page }) => {
50
50
  await page.setContent(`
51
51
  <ion-radio-group value="1">
52
- <ion-radio value="1"></ion-radio>
53
- <ion-radio value="2"></ion-radio>
54
- <ion-radio value="3"></ion-radio>
52
+ <ion-radio value="1" aria-label="1"></ion-radio>
53
+ <ion-radio value="2" aria-label="2"></ion-radio>
54
+ <ion-radio value="3" aria-label="3"></ion-radio>
55
55
  </ion-radio-group>
56
56
  `, config);
57
57
  const radioGroup = page.locator('ion-radio-group');
@@ -64,9 +64,9 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
64
64
  test('should emit when selecting a checked radio', async ({ page }) => {
65
65
  await page.setContent(`
66
66
  <ion-radio-group allow-empty-selection="true" value="1">
67
- <ion-radio value="1"></ion-radio>
68
- <ion-radio value="2"></ion-radio>
69
- <ion-radio value="3"></ion-radio>
67
+ <ion-radio value="1" aria-label="1"></ion-radio>
68
+ <ion-radio value="2" aria-label="2"></ion-radio>
69
+ <ion-radio value="3" aria-label="3"></ion-radio>
70
70
  </ion-radio-group>
71
71
  `, config);
72
72
  const ionChangeSpy = await page.spyOnEvent('ionChange');
@@ -8,7 +8,7 @@ configs().forEach(({ title, screenshot, config }) => {
8
8
  test.describe('range: no start or end items', () => {
9
9
  test('should render a range with no visible label', async ({ page }) => {
10
10
  await page.setContent(`
11
- <ion-range legacy="true"></ion-range>
11
+ <ion-range style="padding-inline-start: 20px;" aria-label="Range"></ion-range>
12
12
  `, config);
13
13
  const range = page.locator('ion-range');
14
14
  await expect(range).toHaveScreenshot(screenshot(`range-no-items-no-label`));
@@ -55,7 +55,7 @@ configs().forEach(({ title, screenshot, config }) => {
55
55
  test.describe('range: start and end items', () => {
56
56
  test('should render a range with no visible label', async ({ page }) => {
57
57
  await page.setContent(`
58
- <ion-range legacy="true">
58
+ <ion-range aria-label="Range">
59
59
  <ion-icon name="volume-off" slot="start"></ion-icon>
60
60
  <ion-icon name="volume-high" slot="end"></ion-icon>
61
61
  </ion-range>
@@ -21,7 +21,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
21
21
  */
22
22
  await page.setContent(`
23
23
  <div style="padding: 0 20px">
24
- <ion-range value="20"></ion-range>
24
+ <ion-range aria-label="Range" value="20"></ion-range>
25
25
  </div>
26
26
  `, config);
27
27
  const rangeStart = await page.spyOnEvent('ionKnobMoveStart');
@@ -44,7 +44,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
44
44
  expect(rangeEnd).toHaveReceivedEventDetail({ value: 50 });
45
45
  });
46
46
  test('should emit start/end events, keyboard', async ({ page }) => {
47
- await page.setContent(`<ion-range value="20"></ion-range>`, config);
47
+ await page.setContent(`<ion-range aria-label="Range" value="20"></ion-range>`, config);
48
48
  const rangeStart = await page.spyOnEvent('ionKnobMoveStart');
49
49
  const rangeEnd = await page.spyOnEvent('ionKnobMoveEnd');
50
50
  await page.keyboard.press('Tab'); // focus first range
@@ -13,7 +13,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
13
13
  description: 'https://github.com/ionic-team/ionic-framework/issues/28284',
14
14
  });
15
15
  await page.setContent(`
16
- <ion-select interface="popover">
16
+ <ion-select aria-label="Select" interface="popover">
17
17
  <ion-select-option value="a" disabled="true">A</ion-select-option>
18
18
  <ion-select-option value="b">B</ion-select-option>
19
19
  </ion-select>
@@ -10,7 +10,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
10
10
  test.describe(title('textarea: events: ionChange'), () => {
11
11
  test.describe('when the textarea is blurred', () => {
12
12
  test('should emit if the value has changed', async ({ page }) => {
13
- await page.setContent(`<ion-textarea></ion-textarea>`, config);
13
+ await page.setContent(`<ion-textarea aria-label="textarea"></ion-textarea>`, config);
14
14
  const nativeTextarea = page.locator('ion-textarea textarea');
15
15
  const ionChangeSpy = await page.spyOnEvent('ionChange');
16
16
  await nativeTextarea.type('new value', { delay: 100 });
@@ -21,7 +21,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
21
21
  expect(ionChangeSpy).toHaveReceivedEventTimes(1);
22
22
  });
23
23
  test('should emit if the textarea is cleared with an initial value', async ({ page }) => {
24
- await page.setContent(`<ion-textarea clear-on-edit="true" value="123"></ion-textarea>`, config);
24
+ await page.setContent(`<ion-textarea aria-label="textarea" clear-on-edit="true" value="123"></ion-textarea>`, config);
25
25
  const textarea = page.locator('ion-textarea');
26
26
  const nativeTextarea = textarea.locator('textarea');
27
27
  const ionChangeSpy = await page.spyOnEvent('ionChange');
@@ -32,7 +32,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
32
32
  expect(ionChangeSpy).toHaveReceivedEventTimes(1);
33
33
  });
34
34
  test('should not emit if the value is set programmatically', async ({ page }) => {
35
- await page.setContent(`<ion-textarea></ion-textarea>`, config);
35
+ await page.setContent(`<ion-textarea aria-label="textarea"></ion-textarea>`, config);
36
36
  const textarea = page.locator('ion-textarea');
37
37
  const ionChangeSpy = await page.spyOnEvent('ionChange');
38
38
  await textarea.evaluate((el) => {
@@ -51,7 +51,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
51
51
  });
52
52
  test.describe(title('textarea: events: ionInput'), () => {
53
53
  test('should emit when the user types', async ({ page }) => {
54
- await page.setContent(`<ion-textarea value="some value"></ion-textarea>`, config);
54
+ await page.setContent(`<ion-textarea aria-label="textarea" value="some value"></ion-textarea>`, config);
55
55
  const ionInputSpy = await page.spyOnEvent('ionInput');
56
56
  const nativeTextarea = page.locator('ion-textarea textarea');
57
57
  await nativeTextarea.type('new value', { delay: 100 });
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-01-30T06:07:15",
2
+ "timestamp": "2024-01-31T14:22:18",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.12.0",
@@ -29325,7 +29325,7 @@
29325
29325
  "path": "src/interface.d.ts"
29326
29326
  },
29327
29327
  "src/components/action-sheet/action-sheet-interface.ts::ActionSheetButton": {
29328
- "declaration": "export interface ActionSheetButton<T = any> {\n text?: string;\n role?: 'cancel' | 'destructive' | 'selected' | string;\n icon?: string;\n cssClass?: string | string[];\n id?: string;\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n data?: T;\n}",
29328
+ "declaration": "export interface ActionSheetButton<T = any> {\n text?: string;\n role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>;\n icon?: string;\n cssClass?: string | string[];\n id?: string;\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n data?: T;\n}",
29329
29329
  "docstring": "",
29330
29330
  "path": "src/components/action-sheet/action-sheet-interface.ts"
29331
29331
  },
@@ -29340,7 +29340,7 @@
29340
29340
  "path": "src/utils/sanitization/index.ts"
29341
29341
  },
29342
29342
  "src/components/alert/alert-interface.ts::AlertButton": {
29343
- "declaration": "export interface AlertButton {\n text: string;\n role?: 'cancel' | 'destructive' | string;\n cssClass?: string | string[];\n id?: string;\n htmlAttributes?: { [key: string]: any };\n // TODO(FW-2832): type\n handler?: (value: any) => AlertButtonOverlayHandler | Promise<AlertButtonOverlayHandler>;\n}",
29343
+ "declaration": "export interface AlertButton {\n text: string;\n role?: LiteralUnion<'cancel' | 'destructive', string>;\n cssClass?: string | string[];\n id?: string;\n htmlAttributes?: { [key: string]: any };\n // TODO(FW-2832): type\n handler?: (value: any) => AlertButtonOverlayHandler | Promise<AlertButtonOverlayHandler>;\n}",
29344
29344
  "docstring": "",
29345
29345
  "path": "src/components/alert/alert-interface.ts"
29346
29346
  },
@@ -29690,7 +29690,7 @@
29690
29690
  "path": "src/components/toast/toast-interface.ts"
29691
29691
  },
29692
29692
  "src/components/toast/toast-interface.ts::ToastButton": {
29693
- "declaration": "export interface ToastButton {\n text?: string;\n icon?: string;\n side?: 'start' | 'end';\n role?: 'cancel' | string;\n\n /**\n * @deprecated Use the toast button's CSS Shadow Parts instead.\n */\n cssClass?: string | string[];\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n}",
29693
+ "declaration": "export interface ToastButton {\n text?: string;\n icon?: string;\n side?: 'start' | 'end';\n role?: LiteralUnion<'cancel', string>;\n /**\n * @deprecated Use the toast button's CSS Shadow Parts instead.\n */\n cssClass?: string | string[];\n htmlAttributes?: { [key: string]: any };\n handler?: () => boolean | void | Promise<boolean | void>;\n}",
29694
29694
  "docstring": "",
29695
29695
  "path": "src/components/toast/toast-interface.ts"
29696
29696
  },
@@ -1,4 +1,4 @@
1
- import type { AnimationBuilder, Mode } from '../../interface';
1
+ import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface';
2
2
  export interface ActionSheetOptions {
3
3
  header?: string;
4
4
  subHeader?: string;
@@ -18,7 +18,7 @@ export interface ActionSheetOptions {
18
18
  }
19
19
  export interface ActionSheetButton<T = any> {
20
20
  text?: string;
21
- role?: 'cancel' | 'destructive' | 'selected' | string;
21
+ role?: LiteralUnion<'cancel' | 'destructive' | 'selected', string>;
22
22
  icon?: string;
23
23
  cssClass?: string | string[];
24
24
  id?: string;
@@ -1,4 +1,4 @@
1
- import type { AnimationBuilder, Mode, TextFieldTypes } from '../../interface';
1
+ import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface';
2
2
  import type { IonicSafeString } from '../../utils/sanitization';
3
3
  export interface AlertOptions {
4
4
  header?: string;
@@ -45,7 +45,7 @@ type AlertButtonOverlayHandler = boolean | void | {
45
45
  };
46
46
  export interface AlertButton {
47
47
  text: string;
48
- role?: 'cancel' | 'destructive' | string;
48
+ role?: LiteralUnion<'cancel' | 'destructive', string>;
49
49
  cssClass?: string | string[];
50
50
  id?: string;
51
51
  htmlAttributes?: {
@@ -1,4 +1,4 @@
1
- import type { AnimationBuilder, Color, Mode } from '../../interface';
1
+ import type { AnimationBuilder, Color, LiteralUnion, Mode } from '../../interface';
2
2
  import type { IonicSafeString } from '../../utils/sanitization';
3
3
  export interface ToastOptions {
4
4
  header?: string;
@@ -28,7 +28,7 @@ export interface ToastButton {
28
28
  text?: string;
29
29
  icon?: string;
30
30
  side?: 'start' | 'end';
31
- role?: 'cancel' | string;
31
+ role?: LiteralUnion<'cancel', string>;
32
32
  /**
33
33
  * @deprecated Use the toast button's CSS Shadow Parts instead.
34
34
  */
@@ -131,7 +131,7 @@ export type PredefinedColors =
131
131
  | 'medium'
132
132
  | 'dark';
133
133
 
134
- type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
134
+ export type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);
135
135
 
136
136
  export type Color = LiteralUnion<PredefinedColors, string>;
137
137
  export type Mode = 'ios' | 'md';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "7.6.7-nightly.20240130",
3
+ "version": "7.6.7",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -40,7 +40,7 @@
40
40
  "@capacitor/core": "^5.6.0",
41
41
  "@capacitor/haptics": "^5.0.6",
42
42
  "@capacitor/keyboard": "^5.0.8",
43
- "@capacitor/status-bar": "^5.0.6",
43
+ "@capacitor/status-bar": "^5.0.7",
44
44
  "@ionic/eslint-config": "^0.3.0",
45
45
  "@ionic/prettier-config": "^2.0.0",
46
46
  "@playwright/test": "^1.39.0",