@ionic/core 8.2.3-dev.11718879673.1a3f486b → 8.2.3-dev.11719301373.17616928

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/components/buttons.js +6 -6
  2. package/components/ion-item-option.js +21 -5
  3. package/components/ion-item-options.js +3 -3
  4. package/components/ion-menu-button.js +6 -6
  5. package/components/ion-searchbar.js +8 -8
  6. package/components/ion-tab-bar.js +3 -3
  7. package/components/ion-tab-button.js +1 -1
  8. package/components/ion-title.js +6 -6
  9. package/components/ion-toolbar.js +11 -7
  10. package/components/list.js +22 -3
  11. package/dist/cjs/ion-app_8.cjs.entry.js +21 -18
  12. package/dist/cjs/ion-item-option_3.cjs.entry.js +22 -7
  13. package/dist/cjs/ion-item_8.cjs.entry.js +21 -3
  14. package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
  15. package/dist/cjs/ion-searchbar.cjs.entry.js +8 -8
  16. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  17. package/dist/cjs/ionic.cjs.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/components/buttons/buttons.ionic.css +101 -0
  20. package/dist/collection/components/buttons/buttons.ios.css +37 -3
  21. package/dist/collection/components/buttons/buttons.js +4 -4
  22. package/dist/collection/components/buttons/buttons.md.css +37 -3
  23. package/dist/collection/components/item-option/item-option.ionic.css +325 -0
  24. package/dist/collection/components/item-option/item-option.js +36 -4
  25. package/dist/collection/components/item-options/item-options.ionic.css +260 -0
  26. package/dist/collection/components/item-options/item-options.js +3 -3
  27. package/dist/collection/components/item-sliding/test/icons/item-sliding.e2e.js +1 -1
  28. package/dist/collection/components/item-sliding/test/shapes/item-sliding.e2e.js +28 -0
  29. package/dist/collection/components/list/list.ionic.css +174 -0
  30. package/dist/collection/components/list/list.js +38 -3
  31. package/dist/collection/components/list/list.md.css +2 -2
  32. package/dist/collection/components/list/test/shape/list.e2e.js +204 -0
  33. package/dist/collection/components/menu-button/menu-button.ionic.css +240 -0
  34. package/dist/collection/components/menu-button/menu-button.ios.css +32 -10
  35. package/dist/collection/components/menu-button/menu-button.js +4 -4
  36. package/dist/collection/components/menu-button/menu-button.md.css +32 -10
  37. package/dist/collection/components/searchbar/searchbar.ionic.css +269 -0
  38. package/dist/collection/components/searchbar/searchbar.ios.css +42 -16
  39. package/dist/collection/components/searchbar/searchbar.js +6 -6
  40. package/dist/collection/components/searchbar/searchbar.md.css +42 -16
  41. package/dist/collection/components/tab-bar/tab-bar.ionic.css +94 -57
  42. package/dist/collection/components/tab-bar/tab-bar.ios.css +46 -43
  43. package/dist/collection/components/tab-bar/tab-bar.md.css +46 -43
  44. package/dist/collection/components/tab-button/tab-button.ionic.css +2 -2
  45. package/dist/collection/components/title/test/theme-ionic/title.e2e.js +14 -0
  46. package/dist/collection/components/title/title.ionic.css +155 -0
  47. package/dist/collection/components/title/title.ios.css +26 -4
  48. package/dist/collection/components/title/title.js +4 -4
  49. package/dist/collection/components/title/title.md.css +26 -4
  50. package/dist/collection/components/toolbar/toolbar.ionic.css +233 -0
  51. package/dist/collection/components/toolbar/toolbar.ios.css +82 -51
  52. package/dist/collection/components/toolbar/toolbar.js +25 -4
  53. package/dist/collection/components/toolbar/toolbar.md.css +82 -51
  54. package/dist/docs.json +89 -1
  55. package/dist/esm/ion-app_8.entry.js +21 -18
  56. package/dist/esm/ion-item-option_3.entry.js +22 -7
  57. package/dist/esm/ion-item_8.entry.js +21 -3
  58. package/dist/esm/ion-menu_3.entry.js +6 -6
  59. package/dist/esm/ion-searchbar.entry.js +8 -8
  60. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  61. package/dist/esm/ionic.js +1 -1
  62. package/dist/esm/loader.js +1 -1
  63. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  64. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  65. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  66. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  67. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  68. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  69. package/dist/esm-es5/ionic.js +1 -1
  70. package/dist/esm-es5/loader.js +1 -1
  71. package/dist/html.html-data.json +34 -0
  72. package/dist/ionic/ionic.esm.js +1 -1
  73. package/dist/ionic/p-12a0de44.system.entry.js +4 -0
  74. package/dist/ionic/p-214631b2.system.entry.js +4 -0
  75. package/dist/ionic/p-224ad51a.entry.js +4 -0
  76. package/dist/ionic/{p-12c07c03.system.entry.js → p-663d8429.system.entry.js} +1 -1
  77. package/dist/ionic/p-7141dfca.entry.js +4 -0
  78. package/dist/ionic/p-7b590e46.system.js +1 -1
  79. package/dist/ionic/p-8052f3ad.entry.js +4 -0
  80. package/dist/ionic/p-82297db9.system.entry.js +4 -0
  81. package/dist/ionic/{p-89efe86f.entry.js → p-9a52a085.entry.js} +1 -1
  82. package/dist/ionic/p-b14d56c8.system.entry.js +4 -0
  83. package/dist/ionic/{p-59cd0dd7.system.entry.js → p-c2eece5e.system.entry.js} +1 -1
  84. package/dist/ionic/p-cd9a7c32.entry.js +4 -0
  85. package/dist/ionic/p-d718695f.entry.js +4 -0
  86. package/dist/types/components/item-option/item-option.d.ts +9 -0
  87. package/dist/types/components/list/list.d.ts +13 -0
  88. package/dist/types/components/toolbar/toolbar.d.ts +5 -0
  89. package/dist/types/components.d.ts +24 -0
  90. package/hydrate/index.js +88 -49
  91. package/package.json +1 -1
  92. package/dist/ionic/p-0116d120.entry.js +0 -4
  93. package/dist/ionic/p-24d2aea3.entry.js +0 -4
  94. package/dist/ionic/p-2fdc82b4.entry.js +0 -4
  95. package/dist/ionic/p-350462f9.system.entry.js +0 -4
  96. package/dist/ionic/p-37e801db.entry.js +0 -4
  97. package/dist/ionic/p-cdc9a11c.system.entry.js +0 -4
  98. package/dist/ionic/p-d5fc7d63.entry.js +0 -4
  99. package/dist/ionic/p-ea8c8541.system.entry.js +0 -4
  100. package/dist/ionic/p-fc0922fa.system.entry.js +0 -4
@@ -0,0 +1,28 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { expect } from "@playwright/test";
5
+ import { configs, test, dragElementBy } from "../../../../utils/test/playwright/index";
6
+ /**
7
+ * The shapes on the `item-option` do not vary by direction
8
+ * when they are not being dragged.
9
+ */
10
+ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
11
+ test.describe(title('item-sliding: shapes'), () => {
12
+ test('should not have visual regressions when not expanded', async ({ page }) => {
13
+ await page.goto(`/src/components/item-sliding/test/shapes`, config);
14
+ const itemIDs = ['round', 'soft', 'rectangular'];
15
+ for (const itemID of itemIDs) {
16
+ const item = page.locator(`#${itemID}`);
17
+ /**
18
+ * Negative dragByX value to drag element from the right to the left
19
+ * to reveal the options on the right side.
20
+ */
21
+ const dragByX = -150;
22
+ await dragElementBy(item, page, dragByX);
23
+ await page.waitForChanges();
24
+ await expect(item).toHaveScreenshot(screenshot(`item-sliding-${itemID}`));
25
+ }
26
+ });
27
+ });
28
+ });
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Convert a pixels given value into rem
3
+ *
4
+ * @param pixels - Value in pixels to be converted (i.e. px)
5
+ * @param context (optional) - Baseline value
6
+ */
7
+ /**
8
+ * This is an auto-generated file, please do not change it directly.
9
+ * Ionic Design System
10
+ */
11
+ /**
12
+ * A heuristic that applies CSS to tablet
13
+ * viewports.
14
+ *
15
+ * Usage:
16
+ * @include tablet-viewport() {
17
+ * :host {
18
+ * background-color: green;
19
+ * }
20
+ * }
21
+ */
22
+ /**
23
+ * A heuristic that applies CSS to mobile
24
+ * viewports (i.e. phones, not tablets).
25
+ *
26
+ * Usage:
27
+ * @include mobile-viewport() {
28
+ * :host {
29
+ * background-color: blue;
30
+ * }
31
+ * }
32
+ */
33
+ /**
34
+ * Convert a font size to a dynamic font size.
35
+ * Fonts that participate in Dynamic Type should use
36
+ * dynamic font sizes.
37
+ * @param size - The initial font size including the unit (i.e. px or pt)
38
+ * @param unit (optional) - The unit to convert to. Use this if you want to
39
+ * convert to a unit other than $baselineUnit.
40
+ */
41
+ /**
42
+ * Convert a font size to a dynamic font size but impose
43
+ * a maximum font size.
44
+ * @param size - The initial font size including the unit (i.e. px or pt)
45
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
46
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
47
+ * convert to a unit other than $baselineUnit.
48
+ */
49
+ /**
50
+ * Convert a font size to a dynamic font size but impose
51
+ * a minimum font size.
52
+ * @param size - The initial font size including the unit (i.e. px or pt)
53
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
54
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
55
+ * convert to a unit other than $baselineUnit.
56
+ */
57
+ /**
58
+ * Convert a font size to a dynamic font size but impose
59
+ * maximum and minimum font sizes.
60
+ * @param size - The initial font size including the unit (i.e. px or pt)
61
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
62
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
63
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
64
+ * convert to a unit other than $baselineUnit.
65
+ */
66
+ ion-list {
67
+ margin-left: 0;
68
+ margin-right: 0;
69
+ margin-top: 0;
70
+ margin-bottom: 0;
71
+ padding-left: 0;
72
+ padding-right: 0;
73
+ padding-top: 0;
74
+ padding-bottom: 0;
75
+ display: block;
76
+ contain: content;
77
+ list-style-type: none;
78
+ }
79
+
80
+ .list-ionic.list-inset {
81
+ -webkit-margin-start: var(--ionic-space-100, 4px);
82
+ margin-inline-start: var(--ionic-space-100, 4px);
83
+ -webkit-margin-end: var(--ionic-space-100, 4px);
84
+ margin-inline-end: var(--ionic-space-100, 4px);
85
+ margin-top: var(--ionic-space-100, 4px);
86
+ margin-bottom: var(--ionic-space-100, 4px);
87
+ }
88
+
89
+ .list-ionic:has(ion-list-header) {
90
+ /* Round */
91
+ /* Soft */
92
+ /* Rectangular */
93
+ }
94
+ .list-ionic:has(ion-list-header).list-round {
95
+ /**
96
+ * Only apply the border radius to the bottom of the list.
97
+ * The top of the list should not have a border radius because
98
+ * that would include the header.
99
+ */
100
+ border-start-start-radius: initial;
101
+ border-start-end-radius: initial;
102
+ border-end-end-radius: var(--ionic-border-radius-400, 16px);
103
+ border-end-start-radius: var(--ionic-border-radius-400, 16px);
104
+ }
105
+ .list-ionic:has(ion-list-header).list-round ion-list-header + * {
106
+ /**
107
+ * Only apply the border radius to the top of the first element.
108
+ * The bottom of the first element should not have a border radius
109
+ * because that would not look connected to the rest.
110
+ */
111
+ border-start-start-radius: var(--ionic-border-radius-400, 16px);
112
+ border-start-end-radius: var(--ionic-border-radius-400, 16px);
113
+ border-end-end-radius: initial;
114
+ border-end-start-radius: initial;
115
+ }
116
+ .list-ionic:has(ion-list-header).list-soft {
117
+ /**
118
+ * Only apply the border radius to the bottom of the list.
119
+ * The top of the list should not have a border radius because
120
+ * that would include the header.
121
+ */
122
+ border-start-start-radius: initial;
123
+ border-start-end-radius: initial;
124
+ border-end-end-radius: var(--ionic-border-radius-200, 8px);
125
+ border-end-start-radius: var(--ionic-border-radius-200, 8px);
126
+ }
127
+ .list-ionic:has(ion-list-header).list-soft ion-list-header + * {
128
+ /**
129
+ * Only apply the border radius to the top of the first element.
130
+ * The bottom of the first element should not have a border radius
131
+ * because that would not look connected to the rest.
132
+ */
133
+ border-start-start-radius: var(--ionic-border-radius-200, 8px);
134
+ border-start-end-radius: var(--ionic-border-radius-200, 8px);
135
+ border-end-end-radius: initial;
136
+ border-end-start-radius: initial;
137
+ }
138
+ .list-ionic:has(ion-list-header).list-rectangular {
139
+ /**
140
+ * Only apply the border radius to the bottom of the list.
141
+ * The top of the list should not have a border radius because
142
+ * that would include the header.
143
+ */
144
+ border-start-start-radius: initial;
145
+ border-start-end-radius: initial;
146
+ border-end-end-radius: var(--ionic-border-radius-0, 0px);
147
+ border-end-start-radius: var(--ionic-border-radius-0, 0px);
148
+ }
149
+ .list-ionic:has(ion-list-header).list-rectangular ion-list-header + * {
150
+ /**
151
+ * Only apply the border radius to the top of the first element.
152
+ * The bottom of the first element should not have a border radius
153
+ * because that would not look connected to the rest.
154
+ */
155
+ border-start-start-radius: var(--ionic-border-radius-0, 0px);
156
+ border-start-end-radius: var(--ionic-border-radius-0, 0px);
157
+ border-end-end-radius: initial;
158
+ border-end-start-radius: initial;
159
+ }
160
+
161
+ .list-ionic:not(:has(ion-list-header)) {
162
+ /* Round */
163
+ /* Soft */
164
+ /* Rectangular */
165
+ }
166
+ .list-ionic:not(:has(ion-list-header)).list-round {
167
+ border-radius: var(--ionic-border-radius-400, 16px);
168
+ }
169
+ .list-ionic:not(:has(ion-list-header)).list-soft {
170
+ border-radius: var(--ionic-border-radius-200, 8px);
171
+ }
172
+ .list-ionic:not(:has(ion-list-header)).list-rectangular {
173
+ border-radius: var(--ionic-border-radius-0, 0px);
174
+ }
@@ -11,6 +11,7 @@ export class List {
11
11
  constructor() {
12
12
  this.lines = undefined;
13
13
  this.inset = false;
14
+ this.shape = undefined;
14
15
  }
15
16
  /**
16
17
  * If `ion-item-sliding` are used inside the list, this method closes
@@ -25,16 +26,33 @@ export class List {
25
26
  }
26
27
  return false;
27
28
  }
29
+ getShape() {
30
+ const theme = getIonTheme(this);
31
+ const { shape, inset } = this;
32
+ // TODO(ROU-10831): Remove theme check when shapes are defined for all themes.
33
+ if (theme !== 'ionic') {
34
+ return undefined;
35
+ }
36
+ if (shape === undefined && inset) {
37
+ return 'round';
38
+ }
39
+ if (shape === undefined) {
40
+ return 'rectangular';
41
+ }
42
+ return shape;
43
+ }
28
44
  render() {
29
45
  const theme = getIonTheme(this);
46
+ const shape = this.getShape();
30
47
  const { lines, inset } = this;
31
- return (h(Host, { key: '740f69ef6cfe4503fc7ca77dddf8ea912db8b52c', role: "list", class: {
48
+ return (h(Host, { key: '9dc48461bc98a22e3592ea35af053016a4ace586', role: "list", class: {
32
49
  [theme]: true,
33
50
  // Used internally for styling
34
51
  [`list-${theme}`]: true,
35
52
  'list-inset': inset,
36
53
  [`list-lines-${lines}`]: lines !== undefined,
37
54
  [`list-${theme}-lines-${lines}`]: lines !== undefined,
55
+ [`list-${shape}`]: shape !== undefined,
38
56
  } }));
39
57
  }
40
58
  static get is() { return "ion-list"; }
@@ -42,14 +60,14 @@ export class List {
42
60
  return {
43
61
  "ios": ["list.ios.scss"],
44
62
  "md": ["list.md.scss"],
45
- "ionic": ["list.md.scss"]
63
+ "ionic": ["list.ionic.scss"]
46
64
  };
47
65
  }
48
66
  static get styleUrls() {
49
67
  return {
50
68
  "ios": ["list.ios.css"],
51
69
  "md": ["list.md.css"],
52
- "ionic": ["list.md.css"]
70
+ "ionic": ["list.ionic.css"]
53
71
  };
54
72
  }
55
73
  static get properties() {
@@ -88,6 +106,23 @@ export class List {
88
106
  "attribute": "inset",
89
107
  "reflect": false,
90
108
  "defaultValue": "false"
109
+ },
110
+ "shape": {
111
+ "type": "string",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "'soft' | 'round' | 'rectangular'",
115
+ "resolved": "\"rectangular\" | \"round\" | \"soft\" | undefined",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": true,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": "Set to `\"soft\"` for slightly rounded corners,\n`\"round\"` for fully rounded corners,\nor `\"rectangular\"` for no rounded corners.\n\nDefaults to `\"round\"` for the `ionic` theme\nwhen inset is `true`\ndefaults to `\"rectangular\"` for the `ionic`\ntheme when inset is `false`,\nundefined for all other themes."
123
+ },
124
+ "attribute": "shape",
125
+ "reflect": false
91
126
  }
92
127
  };
93
128
  }
@@ -230,8 +230,8 @@ ion-list.list-inset {
230
230
  * These selectors ensure the last item in the list
231
231
  * has the correct border.
232
232
  * We need to consider the following scenarios:
233
- 1. The last item in a list as long as it is not the only item.
234
- 2. The item in the last item-sliding in a list.
233
+ * 1. The last item in a list as long as it is not the only item.
234
+ * 2. The item in the last item-sliding in a list.
235
235
  * Note that we do not select "ion-item-sliding ion-item:last-of-type"
236
236
  * because that will cause the borders to disappear on
237
237
  * items in an item-sliding when the item is the last
@@ -0,0 +1,204 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { expect } from "@playwright/test";
5
+ import { configs, test } from "../../../../utils/test/playwright/index";
6
+ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
7
+ test.describe(title('list: shape'), () => {
8
+ test.describe(title('shape: round'), () => {
9
+ test('should render without header', async ({ page }) => {
10
+ await page.setContent(`
11
+ <style>
12
+ ion-content {
13
+ --background: #e5e5e5;
14
+ }
15
+ </style>
16
+
17
+ <ion-content>
18
+ <div class="wrapper" style="display: flex">
19
+ <ion-list inset="true" style="width: 100%" shape="round">
20
+ <ion-item>
21
+ <ion-label>
22
+ Title
23
+ <p>Subtitle</p>
24
+ </ion-label>
25
+ </ion-item>
26
+ <ion-item>
27
+ <ion-label>
28
+ Title
29
+ <p>Subtitle</p>
30
+ </ion-label>
31
+ </ion-item>
32
+ </ion-list>
33
+ </div>
34
+ </ion-content>
35
+ `, config);
36
+ const listWrapper = page.locator('.wrapper');
37
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-round-without-header`));
38
+ });
39
+ test('should render with header', async ({ page }) => {
40
+ await page.setContent(`
41
+ <style>
42
+ ion-content {
43
+ --background: #e5e5e5;
44
+ }
45
+ </style>
46
+
47
+ <ion-content>
48
+ <div class="wrapper" style="display: flex">
49
+ <ion-list inset="true" style="width: 100%" shape="round">
50
+ <ion-list-header>
51
+ <ion-label>Header</ion-label>
52
+ </ion-list-header>
53
+ <ion-item>
54
+ <ion-label>
55
+ Title
56
+ <p>Subtitle</p>
57
+ </ion-label>
58
+ </ion-item>
59
+ <ion-item>
60
+ <ion-label>
61
+ Title
62
+ <p>Subtitle</p>
63
+ </ion-label>
64
+ </ion-item>
65
+ </ion-list>
66
+ </div>
67
+ </ion-content>
68
+ `, config);
69
+ const listWrapper = page.locator('.wrapper');
70
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-round-with-header`));
71
+ });
72
+ });
73
+ test.describe(title('shape: soft'), () => {
74
+ test('should render without header', async ({ page }) => {
75
+ await page.setContent(`
76
+ <style>
77
+ ion-content {
78
+ --background: #e5e5e5;
79
+ }
80
+ </style>
81
+
82
+ <ion-content>
83
+ <div class="wrapper" style="display: flex">
84
+ <ion-list inset="true" style="width: 100%" shape="soft">
85
+ <ion-item>
86
+ <ion-label>
87
+ Title
88
+ <p>Subtitle</p>
89
+ </ion-label>
90
+ </ion-item>
91
+ <ion-item>
92
+ <ion-label>
93
+ Title
94
+ <p>Subtitle</p>
95
+ </ion-label>
96
+ </ion-item>
97
+ </ion-list>
98
+ </div>
99
+ </ion-content>
100
+ `, config);
101
+ const listWrapper = page.locator('.wrapper');
102
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-soft-without-header`));
103
+ });
104
+ test('should render with header', async ({ page }) => {
105
+ await page.setContent(`
106
+ <style>
107
+ ion-content {
108
+ --background: #e5e5e5;
109
+ }
110
+ </style>
111
+
112
+ <ion-content>
113
+ <div class="wrapper" style="display: flex">
114
+ <ion-list inset="true" style="width: 100%" shape="soft">
115
+ <ion-list-header>
116
+ <ion-label>Header</ion-label>
117
+ </ion-list-header>
118
+ <ion-item>
119
+ <ion-label>
120
+ Title
121
+ <p>Subtitle</p>
122
+ </ion-label>
123
+ </ion-item>
124
+ <ion-item>
125
+ <ion-label>
126
+ Title
127
+ <p>Subtitle</p>
128
+ </ion-label>
129
+ </ion-item>
130
+ </ion-list>
131
+ </div>
132
+ </ion-content>
133
+ `, config);
134
+ const listWrapper = page.locator('.wrapper');
135
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-soft-with-header`));
136
+ });
137
+ });
138
+ test.describe(title('shape: rectangular'), () => {
139
+ test('should render without header', async ({ page }) => {
140
+ await page.setContent(`
141
+ <style>
142
+ ion-content {
143
+ --background: #e5e5e5;
144
+ }
145
+ </style>
146
+
147
+ <ion-content>
148
+ <div class="wrapper" style="display: flex">
149
+ <ion-list inset="true" style="width: 100%" shape="rectangular">
150
+ <ion-item>
151
+ <ion-label>
152
+ Title
153
+ <p>Subtitle</p>
154
+ </ion-label>
155
+ </ion-item>
156
+ <ion-item>
157
+ <ion-label>
158
+ Title
159
+ <p>Subtitle</p>
160
+ </ion-label>
161
+ </ion-item>
162
+ </ion-list>
163
+ </div>
164
+ </ion-content>
165
+ `, config);
166
+ const listWrapper = page.locator('.wrapper');
167
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-rectangular-without-header`));
168
+ });
169
+ test('should render with header', async ({ page }) => {
170
+ await page.setContent(`
171
+ <style>
172
+ ion-content {
173
+ --background: #e5e5e5;
174
+ }
175
+ </style>
176
+
177
+ <ion-content>
178
+ <div class="wrapper" style="display: flex">
179
+ <ion-list inset="true" style="width: 100%" shape="rectangular">
180
+ <ion-list-header>
181
+ <ion-label>Header</ion-label>
182
+ </ion-list-header>
183
+ <ion-item>
184
+ <ion-label>
185
+ Title
186
+ <p>Subtitle</p>
187
+ </ion-label>
188
+ </ion-item>
189
+ <ion-item>
190
+ <ion-label>
191
+ Title
192
+ <p>Subtitle</p>
193
+ </ion-label>
194
+ </ion-item>
195
+ </ion-list>
196
+ </div>
197
+ </ion-content>
198
+ `, config);
199
+ const listWrapper = page.locator('.wrapper');
200
+ await expect(listWrapper).toHaveScreenshot(screenshot(`list-shape-rectangular-with-header`));
201
+ });
202
+ });
203
+ });
204
+ });