@ionic/core 8.2.3-dev.11721064272.19e3ddfd → 8.2.3-dev.11723022900.1196a7bf

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 (204) hide show
  1. package/components/button.js +1 -1
  2. package/components/ion-avatar.js +3 -3
  3. package/components/ion-badge.js +3 -3
  4. package/components/ion-chip.js +1 -1
  5. package/components/ion-input.js +1 -1
  6. package/components/ion-segment.js +3 -11
  7. package/components/ion-select-option.js +1 -1
  8. package/components/ion-select.js +2 -2
  9. package/components/ion-skeleton-text.js +2 -2
  10. package/components/ion-split-pane.js +2 -2
  11. package/components/ion-tab-bar.js +2 -2
  12. package/components/ion-tab-button.js +2 -2
  13. package/components/ion-tab.js +2 -2
  14. package/components/ion-tabs.js +1 -1
  15. package/components/ion-text.js +2 -2
  16. package/components/ion-textarea.js +2 -2
  17. package/components/ion-thumbnail.js +2 -2
  18. package/components/ion-title.js +2 -2
  19. package/components/ion-toast.js +2 -2
  20. package/components/ion-toggle.js +3 -3
  21. package/components/ion-toolbar.js +2 -2
  22. package/components/item.js +3 -3
  23. package/components/list.js +1 -1
  24. package/components/select-popover.js +2 -2
  25. package/components/spinner.js +33 -6
  26. package/css/core.css +1 -1
  27. package/css/core.css.map +1 -1
  28. package/css/ionic.bundle.css +1 -1
  29. package/css/ionic.bundle.css.map +1 -1
  30. package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-avatar_3.cjs.entry.js +8 -8
  32. package/dist/cjs/ion-button_2.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-chip.cjs.entry.js +1 -1
  34. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  35. package/dist/cjs/ion-item_8.cjs.entry.js +6 -6
  36. package/dist/cjs/ion-segment_2.cjs.entry.js +3 -11
  37. package/dist/cjs/ion-select_3.cjs.entry.js +5 -5
  38. package/dist/cjs/ion-spinner.cjs.entry.js +30 -4
  39. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  41. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  42. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  43. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  46. package/dist/cjs/ionic.cjs.js +1 -1
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/collection/collection-manifest.json +0 -2
  49. package/dist/collection/components/avatar/avatar.ionic.css +17 -1
  50. package/dist/collection/components/avatar/avatar.js +5 -5
  51. package/dist/collection/components/avatar/test/shape/avatar.e2e.js +7 -0
  52. package/dist/collection/components/avatar/test/size/avatar.e2e.js +27 -0
  53. package/dist/collection/components/badge/badge.ionic.css +30 -35
  54. package/dist/collection/components/badge/badge.ios.css +94 -3
  55. package/dist/collection/components/badge/badge.md.css +94 -3
  56. package/dist/collection/components/badge/test/basic/badge.e2e.js +1 -1
  57. package/dist/collection/components/button/button.ionic.css +41 -2
  58. package/dist/collection/components/button/test/outline/button.e2e.js +1 -2
  59. package/dist/collection/components/button/test/states/button.e2e.js +3 -3
  60. package/dist/collection/components/chip/chip.ionic.css +22 -1
  61. package/dist/collection/components/chip/test/basic/chip.e2e.js +28 -29
  62. package/dist/collection/components/input/input.ionic.css +2 -1
  63. package/dist/collection/components/item/item.ionic.css +346 -52
  64. package/dist/collection/components/item/item.ios.css +94 -67
  65. package/dist/collection/components/item/item.md.css +94 -67
  66. package/dist/collection/components/item-sliding/test/basic/item-sliding.e2e.js +2 -2
  67. package/dist/collection/components/list/list.ionic.css +1 -0
  68. package/dist/collection/components/segment/segment.js +3 -11
  69. package/dist/collection/components/select/select.js +2 -2
  70. package/dist/collection/components/select-option/select-option.js +1 -1
  71. package/dist/collection/components/select-popover/select-popover.js +2 -2
  72. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  73. package/dist/collection/components/spinner/spinner.common.css +199 -0
  74. package/dist/collection/components/spinner/{spinner.css → spinner.ionic.css} +55 -0
  75. package/dist/collection/components/spinner/spinner.js +40 -3
  76. package/dist/collection/components/spinner/test/size/spinner.e2e.js +47 -0
  77. package/dist/collection/components/split-pane/split-pane.js +2 -2
  78. package/dist/collection/components/tab/tab.js +2 -2
  79. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  80. package/dist/collection/components/tab-button/tab-button.js +2 -2
  81. package/dist/collection/components/tabs/tabs.js +1 -1
  82. package/dist/collection/components/text/text.js +2 -2
  83. package/dist/collection/components/textarea/textarea.js +2 -2
  84. package/dist/collection/components/thumbnail/thumbnail.js +2 -2
  85. package/dist/collection/components/title/title.js +2 -2
  86. package/dist/collection/components/toast/toast.js +2 -2
  87. package/dist/collection/components/toggle/toggle.js +3 -3
  88. package/dist/collection/components/toolbar/toolbar.js +2 -2
  89. package/dist/collection/themes/ionic/test/colors/theme.e2e.js +120 -0
  90. package/dist/docs.json +190 -48
  91. package/dist/esm/ion-app_8.entry.js +4 -4
  92. package/dist/esm/ion-avatar_3.entry.js +8 -8
  93. package/dist/esm/ion-button_2.entry.js +1 -1
  94. package/dist/esm/ion-chip.entry.js +1 -1
  95. package/dist/esm/ion-input.entry.js +1 -1
  96. package/dist/esm/ion-item_8.entry.js +6 -6
  97. package/dist/esm/ion-segment_2.entry.js +3 -11
  98. package/dist/esm/ion-select_3.entry.js +5 -5
  99. package/dist/esm/ion-spinner.entry.js +30 -4
  100. package/dist/esm/ion-split-pane.entry.js +2 -2
  101. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  102. package/dist/esm/ion-tab_2.entry.js +3 -3
  103. package/dist/esm/ion-text.entry.js +2 -2
  104. package/dist/esm/ion-textarea.entry.js +2 -2
  105. package/dist/esm/ion-toast.entry.js +2 -2
  106. package/dist/esm/ion-toggle.entry.js +3 -3
  107. package/dist/esm/ionic.js +1 -1
  108. package/dist/esm/loader.js +1 -1
  109. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  110. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  111. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  112. package/dist/esm-es5/ion-chip.entry.js +1 -1
  113. package/dist/esm-es5/ion-input.entry.js +1 -1
  114. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  115. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  116. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  117. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  118. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  119. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  120. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  121. package/dist/esm-es5/ion-text.entry.js +1 -1
  122. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  123. package/dist/esm-es5/ion-toast.entry.js +1 -1
  124. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  125. package/dist/esm-es5/ionic.js +1 -1
  126. package/dist/esm-es5/loader.js +1 -1
  127. package/dist/html.html-data.json +25 -29
  128. package/dist/ionic/ionic.esm.js +1 -1
  129. package/dist/ionic/{p-29f4100d.entry.js → p-01ae1aa0.entry.js} +1 -1
  130. package/dist/ionic/p-1be0295f.entry.js +4 -0
  131. package/dist/ionic/p-201d8768.system.entry.js +4 -0
  132. package/dist/ionic/{p-062c1cb9.system.entry.js → p-223bc7dd.system.entry.js} +1 -1
  133. package/dist/ionic/{p-0595a36c.system.entry.js → p-24592a4d.system.entry.js} +1 -1
  134. package/dist/ionic/{p-2aa6a169.entry.js → p-28649e61.entry.js} +1 -1
  135. package/dist/ionic/{p-385a361b.entry.js → p-39a39279.entry.js} +1 -1
  136. package/dist/ionic/p-40c14f53.system.entry.js +4 -0
  137. package/dist/ionic/{p-cd6d4c1d.entry.js → p-4346453b.entry.js} +1 -1
  138. package/dist/ionic/{p-1be0ed0e.system.entry.js → p-45ca3acb.system.entry.js} +2 -2
  139. package/dist/ionic/p-4b9c6418.system.entry.js +4 -0
  140. package/dist/ionic/p-4fdbf0ef.entry.js +4 -0
  141. package/dist/ionic/p-563a8d3b.entry.js +4 -0
  142. package/dist/ionic/{p-b67ed806.system.entry.js → p-56c72f65.system.entry.js} +1 -1
  143. package/dist/ionic/p-6d47fa40.entry.js +4 -0
  144. package/dist/ionic/p-7459eeb7.system.entry.js +4 -0
  145. package/dist/ionic/{p-da668343.system.entry.js → p-7ab9c88c.system.entry.js} +1 -1
  146. package/dist/ionic/p-7b590e46.system.js +1 -1
  147. package/dist/ionic/{p-c0dace15.system.entry.js → p-7dad531c.system.entry.js} +1 -1
  148. package/dist/ionic/p-81350e4b.system.entry.js +4 -0
  149. package/dist/ionic/p-8ac5efa9.entry.js +4 -0
  150. package/dist/ionic/p-a6bb62ea.entry.js +4 -0
  151. package/dist/ionic/p-b1938594.entry.js +4 -0
  152. package/dist/ionic/{p-aaf1b71f.entry.js → p-b374abe2.entry.js} +1 -1
  153. package/dist/ionic/p-b4b44bf9.system.entry.js +4 -0
  154. package/dist/ionic/{p-61f51286.system.entry.js → p-b5cc6e57.system.entry.js} +1 -1
  155. package/dist/ionic/p-bbefc52b.system.entry.js +4 -0
  156. package/dist/ionic/p-c11fdca2.entry.js +4 -0
  157. package/dist/ionic/{p-adb54d5b.entry.js → p-c23822f8.entry.js} +1 -1
  158. package/dist/ionic/{p-14ae725a.entry.js → p-d2a580db.entry.js} +1 -1
  159. package/dist/ionic/p-d774e194.system.entry.js +4 -0
  160. package/dist/ionic/p-dc8a3888.entry.js +4 -0
  161. package/dist/ionic/{p-5cc8fa7f.system.entry.js → p-f84ea1e9.system.entry.js} +1 -1
  162. package/dist/types/components/avatar/avatar.d.ts +7 -4
  163. package/dist/types/components/segment/segment.d.ts +1 -1
  164. package/dist/types/components/spinner/spinner.d.ts +11 -0
  165. package/dist/types/components.d.ts +12 -30
  166. package/hydrate/index.js +80 -154
  167. package/package.json +1 -1
  168. package/components/ion-segment-content.d.ts +0 -11
  169. package/components/ion-segment-content.js +0 -38
  170. package/components/ion-segment-view.d.ts +0 -11
  171. package/components/ion-segment-view.js +0 -86
  172. package/dist/cjs/ion-segment-content.cjs.entry.js +0 -24
  173. package/dist/cjs/ion-segment-view.cjs.entry.js +0 -72
  174. package/dist/collection/components/segment-content/segment-content.css +0 -5
  175. package/dist/collection/components/segment-content/segment-content.js +0 -22
  176. package/dist/collection/components/segment-view/segment-view.css +0 -15
  177. package/dist/collection/components/segment-view/segment-view.js +0 -81
  178. package/dist/esm/ion-segment-content.entry.js +0 -20
  179. package/dist/esm/ion-segment-view.entry.js +0 -68
  180. package/dist/esm-es5/ion-segment-content.entry.js +0 -4
  181. package/dist/esm-es5/ion-segment-view.entry.js +0 -4
  182. package/dist/ionic/p-07b804ba.entry.js +0 -4
  183. package/dist/ionic/p-405559bd.entry.js +0 -4
  184. package/dist/ionic/p-5839776e.entry.js +0 -4
  185. package/dist/ionic/p-660cf6f3.system.entry.js +0 -4
  186. package/dist/ionic/p-6ced0cc0.entry.js +0 -4
  187. package/dist/ionic/p-6d4534cb.system.entry.js +0 -4
  188. package/dist/ionic/p-72944d53.system.entry.js +0 -4
  189. package/dist/ionic/p-7813dead.system.entry.js +0 -4
  190. package/dist/ionic/p-833593dd.entry.js +0 -4
  191. package/dist/ionic/p-8ef82205.entry.js +0 -4
  192. package/dist/ionic/p-9316e014.system.entry.js +0 -4
  193. package/dist/ionic/p-935801cc.entry.js +0 -4
  194. package/dist/ionic/p-9771abb4.entry.js +0 -4
  195. package/dist/ionic/p-a2830649.system.entry.js +0 -4
  196. package/dist/ionic/p-a3b856e6.system.entry.js +0 -4
  197. package/dist/ionic/p-aa246404.entry.js +0 -4
  198. package/dist/ionic/p-aa97948b.entry.js +0 -4
  199. package/dist/ionic/p-c6e43624.entry.js +0 -4
  200. package/dist/ionic/p-dc60009b.system.entry.js +0 -4
  201. package/dist/ionic/p-f1eb1152.system.entry.js +0 -4
  202. package/dist/ionic/p-f8a16486.system.entry.js +0 -4
  203. package/dist/types/components/segment-content/segment-content.d.ts +0 -5
  204. package/dist/types/components/segment-view/segment-view.d.ts +0 -13
@@ -163,15 +163,27 @@
163
163
  border: var(--ionic-border-size-025, 1px) var(--ionic-border-style-solid, solid) var(--ionic-color-neutral-800, #626262);
164
164
  }
165
165
 
166
+ /* 2-Extra Small */
167
+ :host(.avatar-xxsmall) {
168
+ --padding-end: var(--ionic-space-050, 2px);
169
+ --padding-start: var(--ionic-space-050, 2px);
170
+ width: var(--ionic-scale-400, 16px);
171
+ height: var(--ionic-scale-400, 16px);
172
+ font-size: var(--ionic-font-size-300, 0.75rem);
173
+ line-height: var(--ionic-line-height-500, 20px);
174
+ }
175
+
176
+ /* Extra Small */
166
177
  :host(.avatar-xsmall) {
167
178
  --padding-end: var(--ionic-space-050, 2px);
168
179
  --padding-start: var(--ionic-space-050, 2px);
169
180
  width: var(--ionic-scale-600, 24px);
170
181
  height: var(--ionic-scale-600, 24px);
171
182
  font-size: var(--ionic-font-size-300, 0.75rem);
172
- line-height: var(--ionic-line-height-400, 16px);
183
+ line-height: var(--ionic-line-height-500, 20px);
173
184
  }
174
185
 
186
+ /* Small */
175
187
  :host(.avatar-small) {
176
188
  --padding-end: var(--ionic-space-150, 6px);
177
189
  --padding-start: var(--ionic-space-150, 6px);
@@ -181,6 +193,7 @@
181
193
  line-height: var(--ionic-line-height-600, 24px);
182
194
  }
183
195
 
196
+ /* Medium */
184
197
  :host(.avatar-medium) {
185
198
  --padding-end: var(--ionic-space-200, 8px);
186
199
  --padding-start: var(--ionic-space-200, 8px);
@@ -189,6 +202,7 @@
189
202
  font-size: var(--ionic-font-size-450, 1.125rem);
190
203
  }
191
204
 
205
+ /* Large */
192
206
  :host(.avatar-large) {
193
207
  --padding-end: var(--ionic-space-250, 10px);
194
208
  --padding-start: var(--ionic-space-250, 10px);
@@ -197,6 +211,7 @@
197
211
  font-size: var(--ionic-font-size-500, 1.25rem);
198
212
  }
199
213
 
214
+ /* Extra Large */
200
215
  :host(.avatar-xlarge) {
201
216
  --padding-end: var(--ionic-space-300, 12px);
202
217
  --padding-start: var(--ionic-space-300, 12px);
@@ -205,6 +220,7 @@
205
220
  font-size: var(--ionic-font-size-550, 1.375rem);
206
221
  }
207
222
 
223
+ :host(.avatar-xxsmall.avatar-soft),
208
224
  :host(.avatar-xsmall.avatar-soft),
209
225
  :host(.avatar-small.avatar-soft) {
210
226
  --border-radius: var(--ionic-border-radius-100, 4px);
@@ -46,13 +46,13 @@ export class Avatar {
46
46
  const theme = getIonTheme(this);
47
47
  const size = this.getSize();
48
48
  const shape = this.getShape();
49
- return (h(Host, { key: 'ce0752a14af73eb2731d916be9522db4312bd8f8', class: {
49
+ return (h(Host, { key: '169f3e804c30f9eedc8c3cf064af9871bead2f5f', class: {
50
50
  [theme]: true,
51
51
  [`avatar-${size}`]: size !== undefined,
52
52
  [`avatar-${shape}`]: shape !== undefined,
53
53
  [`avatar-image`]: this.hasImage,
54
54
  [`avatar-icon`]: this.hasIcon,
55
- } }, h("slot", { key: '9cd3c8e0d4ced7896b8496b75208c938735af1b2' })));
55
+ } }, h("slot", { key: '67bb5a3c1a6bd33af37141df05663f1685c84286' })));
56
56
  }
57
57
  static get is() { return "ion-avatar"; }
58
58
  static get encapsulation() { return "shadow"; }
@@ -76,15 +76,15 @@ export class Avatar {
76
76
  "type": "string",
77
77
  "mutable": false,
78
78
  "complexType": {
79
- "original": "`xsmall` | 'small' | 'medium' | 'large' | 'xlarge'",
80
- "resolved": "\"large\" | \"medium\" | \"small\" | \"xlarge\" | \"xsmall\" | undefined",
79
+ "original": "'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'",
80
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"xlarge\" | \"xsmall\" | \"xxsmall\" | undefined",
81
81
  "references": {}
82
82
  },
83
83
  "required": false,
84
84
  "optional": true,
85
85
  "docs": {
86
86
  "tags": [],
87
- "text": "Set to `\"xsmall\"` for the smallest size, `\"small\"` for a compact size, `\"medium\"`\nfor the default height and width, `\"large\"` for a larger size, or `\"xlarge\"` for\nthe largest dimensions.\n\nDefaults to `\"medium\"` for the `ionic` theme, undefined for all other themes."
87
+ "text": "Set to `\"xxsmall\"` for the smallest size.\nSet to `\"xsmall\"` for a very small size.\nSet to `\"small\"` for a compact size.\nSet to `\"medium\"` for the default height and width.\nSet to `\"large\"` for a larger size.\nSet to `\"xlarge\"` for the largest dimensions.\n\nDefaults to `\"medium\"` for the `ionic` theme, undefined for all other themes."
88
88
  },
89
89
  "attribute": "size",
90
90
  "reflect": false
@@ -73,6 +73,7 @@ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screens
73
73
  </style>
74
74
 
75
75
  <div id="container">
76
+ <ion-avatar shape="soft" size="xxsmall">A</ion-avatar>
76
77
  <ion-avatar shape="soft" size="xsmall">AB</ion-avatar>
77
78
  <ion-avatar shape="soft" size="small">AB</ion-avatar>
78
79
  <ion-avatar shape="soft">AB</ion-avatar>
@@ -91,6 +92,9 @@ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screens
91
92
  </style>
92
93
 
93
94
  <div id="container">
95
+ <ion-avatar shape="soft" size="xxsmall">
96
+ <ion-icon name="person-outline"></ion-icon>
97
+ </ion-avatar>
94
98
  <ion-avatar shape="soft" size="xsmall">
95
99
  <ion-icon name="person-outline"></ion-icon>
96
100
  </ion-avatar>
@@ -115,6 +119,9 @@ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screens
115
119
  </style>
116
120
 
117
121
  <div id="container">
122
+ <ion-avatar shape="soft" size="xxsmall">
123
+ <img src="/src/components/avatar/test/avatar.svg"/>
124
+ </ion-avatar>
118
125
  <ion-avatar shape="soft" size="xsmall">
119
126
  <img src="/src/components/avatar/test/avatar.svg"/>
120
127
  </ion-avatar>
@@ -8,6 +8,33 @@ import { configs, test } from "../../../../utils/test/playwright/index";
8
8
  */
9
9
  configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
10
10
  test.describe(title('avatar: size'), () => {
11
+ test.describe('xxsmall', () => {
12
+ test('should not have visual regressions when containing text', async ({ page }) => {
13
+ await page.setContent(`
14
+ <ion-avatar size="xxsmall">A</ion-avatar>
15
+ `, config);
16
+ const avatar = page.locator('ion-avatar');
17
+ await expect(avatar).toHaveScreenshot(screenshot(`avatar-size-xxsmall-text`));
18
+ });
19
+ test('should not have visual regressions when containing an icon', async ({ page }) => {
20
+ await page.setContent(`
21
+ <ion-avatar size="xxsmall">
22
+ <ion-icon name="person-outline"></ion-icon>
23
+ </ion-avatar>
24
+ `, config);
25
+ const avatar = page.locator('ion-avatar');
26
+ await expect(avatar).toHaveScreenshot(screenshot(`avatar-size-xxsmall-icon`));
27
+ });
28
+ test('should not have visual regressions when containing an image', async ({ page }) => {
29
+ await page.setContent(`
30
+ <ion-avatar size="xxsmall">
31
+ <img src="/src/components/avatar/test/avatar.svg"/>
32
+ </ion-avatar>
33
+ `, config);
34
+ const avatar = page.locator('ion-avatar');
35
+ await expect(avatar).toHaveScreenshot(screenshot(`avatar-size-xxsmall-image`));
36
+ });
37
+ });
11
38
  test.describe('xsmall', () => {
12
39
  test('should not have visual regressions when containing text', async ({ page }) => {
13
40
  await page.setContent(`
@@ -64,10 +64,26 @@
64
64
  * convert to a unit other than $baselineUnit.
65
65
  */
66
66
  /**
67
- * Convert a pixels given value into rem
68
- *
69
- * @param pixels - Value in pixels to be converted (i.e. px)
70
- * @param context (optional) - Baseline value
67
+ * A heuristic that applies CSS to tablet
68
+ * viewports.
69
+ *
70
+ * Usage:
71
+ * @include tablet-viewport() {
72
+ * :host {
73
+ * background-color: green;
74
+ * }
75
+ * }
76
+ */
77
+ /**
78
+ * A heuristic that applies CSS to mobile
79
+ * viewports (i.e. phones, not tablets).
80
+ *
81
+ * Usage:
82
+ * @include mobile-viewport() {
83
+ * :host {
84
+ * background-color: blue;
85
+ * }
86
+ * }
71
87
  */
72
88
  /**
73
89
  * Convert a font size to a dynamic font size.
@@ -102,28 +118,6 @@
102
118
  * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
103
119
  * convert to a unit other than $baselineUnit.
104
120
  */
105
- /**
106
- * A heuristic that applies CSS to tablet
107
- * viewports.
108
- *
109
- * Usage:
110
- * @include tablet-viewport() {
111
- * :host {
112
- * background-color: green;
113
- * }
114
- * }
115
- */
116
- /**
117
- * A heuristic that applies CSS to mobile
118
- * viewports (i.e. phones, not tablets).
119
- *
120
- * Usage:
121
- * @include mobile-viewport() {
122
- * :host {
123
- * background-color: blue;
124
- * }
125
- * }
126
- */
127
121
  :host {
128
122
  /**
129
123
  * @prop --background: Background of the badge
@@ -134,8 +128,6 @@
134
128
  * @prop --padding-bottom: Bottom padding of the badge
135
129
  * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge
136
130
  */
137
- --background: var(--ion-color-primary, #0054e9);
138
- --color: var(--ion-color-primary-contrast, #fff);
139
131
  --padding-top: 3px;
140
132
  --padding-end: 8px;
141
133
  --padding-bottom: 3px;
@@ -152,7 +144,6 @@
152
144
  min-width: 10px;
153
145
  background: var(--background);
154
146
  color: var(--color);
155
- font-family: var(--ion-font-family, inherit);
156
147
  font-size: 0.8125rem;
157
148
  font-weight: bold;
158
149
  line-height: 1;
@@ -172,8 +163,10 @@
172
163
  }
173
164
 
174
165
  :host {
175
- --padding-start: var(--ionic-space-100, 4px);
176
- --padding-end: var(--ionic-space-100, 4px);
166
+ --background: var(--ion-color-primary, #105cef);
167
+ --color: var(--ion-color-primary-contrast, #fff);
168
+ --padding-start: var(--ionic-space-200, 8px);
169
+ --padding-end: var(--ionic-space-200, 8px);
177
170
  --padding-top: var(--ionic-space-0, 0px);
178
171
  --padding-bottom: var(--ionic-space-0, 0px);
179
172
  display: inline-flex;
@@ -205,6 +198,8 @@
205
198
 
206
199
  /* 2-Extra Small Badge */
207
200
  :host(.badge-xxsmall) {
201
+ --padding-start: var(--ionic-space-050, 2px);
202
+ --padding-end: var(--ionic-space-050, 2px);
208
203
  min-width: var(--ionic-scale-400, 16px);
209
204
  height: var(--ionic-scale-400, 16px);
210
205
  font-size: var(--ionic-font-size-300, 0.75rem);
@@ -213,6 +208,8 @@
213
208
 
214
209
  /* Extra Small Badge */
215
210
  :host(.badge-xsmall) {
211
+ --padding-start: var(--ionic-space-100, 4px);
212
+ --padding-end: var(--ionic-space-100, 4px);
216
213
  min-width: var(--ionic-scale-600, 24px);
217
214
  height: var(--ionic-scale-600, 24px);
218
215
  font-size: var(--ionic-font-size-350, 0.875rem);
@@ -221,6 +218,8 @@
221
218
 
222
219
  /* Small Badge */
223
220
  :host(.badge-small) {
221
+ --padding-start: var(--ionic-space-100, 4px);
222
+ --padding-end: var(--ionic-space-100, 4px);
224
223
  min-width: var(--ionic-scale-800, 32px);
225
224
  height: var(--ionic-scale-800, 32px);
226
225
  font-size: var(--ionic-font-size-400, 1rem);
@@ -237,8 +236,6 @@
237
236
 
238
237
  /* Large Badge */
239
238
  :host(.badge-large) {
240
- --padding-start: var(--ionic-space-200, 8px);
241
- --padding-end: var(--ionic-space-200, 8px);
242
239
  min-width: var(--ionic-scale-1200, 48px);
243
240
  height: var(--ionic-scale-1200, 48px);
244
241
  font-size: var(--ionic-font-size-500, 1.25rem);
@@ -247,8 +244,6 @@
247
244
 
248
245
  /* Extra Large Badge */
249
246
  :host(.badge-xlarge) {
250
- --padding-start: var(--ionic-space-200, 8px);
251
- --padding-end: var(--ionic-space-200, 8px);
252
247
  min-width: var(--ionic-scale-1400, 56px);
253
248
  height: var(--ionic-scale-1400, 56px);
254
249
  font-size: var(--ionic-font-size-550, 1.375rem);
@@ -59,6 +59,61 @@
59
59
  * }
60
60
  * }
61
61
  */
62
+ /**
63
+ * A heuristic that applies CSS to tablet
64
+ * viewports.
65
+ *
66
+ * Usage:
67
+ * @include tablet-viewport() {
68
+ * :host {
69
+ * background-color: green;
70
+ * }
71
+ * }
72
+ */
73
+ /**
74
+ * A heuristic that applies CSS to mobile
75
+ * viewports (i.e. phones, not tablets).
76
+ *
77
+ * Usage:
78
+ * @include mobile-viewport() {
79
+ * :host {
80
+ * background-color: blue;
81
+ * }
82
+ * }
83
+ */
84
+ /**
85
+ * Convert a font size to a dynamic font size.
86
+ * Fonts that participate in Dynamic Type should use
87
+ * dynamic font sizes.
88
+ * @param size - The initial font size including the unit (i.e. px or pt)
89
+ * @param unit (optional) - The unit to convert to. Use this if you want to
90
+ * convert to a unit other than $baselineUnit.
91
+ */
92
+ /**
93
+ * Convert a font size to a dynamic font size but impose
94
+ * a maximum font size.
95
+ * @param size - The initial font size including the unit (i.e. px or pt)
96
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
97
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
98
+ * convert to a unit other than $baselineUnit.
99
+ */
100
+ /**
101
+ * Convert a font size to a dynamic font size but impose
102
+ * a minimum font size.
103
+ * @param size - The initial font size including the unit (i.e. px or pt)
104
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
105
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
106
+ * convert to a unit other than $baselineUnit.
107
+ */
108
+ /**
109
+ * Convert a font size to a dynamic font size but impose
110
+ * maximum and minimum font sizes.
111
+ * @param size - The initial font size including the unit (i.e. px or pt)
112
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
113
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
114
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
115
+ * convert to a unit other than $baselineUnit.
116
+ */
62
117
  :host {
63
118
  /**
64
119
  * @prop --background: Background of the badge
@@ -69,8 +124,6 @@
69
124
  * @prop --padding-bottom: Bottom padding of the badge
70
125
  * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge
71
126
  */
72
- --background: var(--ion-color-primary, #0054e9);
73
- --color: var(--ion-color-primary-contrast, #fff);
74
127
  --padding-top: 3px;
75
128
  --padding-end: 8px;
76
129
  --padding-bottom: 3px;
@@ -87,7 +140,6 @@
87
140
  min-width: 10px;
88
141
  background: var(--background);
89
142
  color: var(--color);
90
- font-family: var(--ion-font-family, inherit);
91
143
  font-size: 0.8125rem;
92
144
  font-weight: bold;
93
145
  line-height: 1;
@@ -106,6 +158,45 @@
106
158
  display: none;
107
159
  }
108
160
 
161
+ /**
162
+ * Convert a font size to a dynamic font size.
163
+ * Fonts that participate in Dynamic Type should use
164
+ * dynamic font sizes.
165
+ * @param size - The initial font size including the unit (i.e. px or pt)
166
+ * @param unit (optional) - The unit to convert to. Use this if you want to
167
+ * convert to a unit other than $baselineUnit.
168
+ */
169
+ /**
170
+ * Convert a font size to a dynamic font size but impose
171
+ * a maximum font size.
172
+ * @param size - The initial font size including the unit (i.e. px or pt)
173
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
174
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
175
+ * convert to a unit other than $baselineUnit.
176
+ */
177
+ /**
178
+ * Convert a font size to a dynamic font size but impose
179
+ * a minimum font size.
180
+ * @param size - The initial font size including the unit (i.e. px or pt)
181
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
182
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
183
+ * convert to a unit other than $baselineUnit.
184
+ */
185
+ /**
186
+ * Convert a font size to a dynamic font size but impose
187
+ * maximum and minimum font sizes.
188
+ * @param size - The initial font size including the unit (i.e. px or pt)
189
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
190
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
191
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
192
+ * convert to a unit other than $baselineUnit.
193
+ */
194
+ :host {
195
+ --background: var(--ion-color-primary, #0054e9);
196
+ --color: var(--ion-color-primary-contrast, #fff);
197
+ font-family: var(--ion-font-family, inherit);
198
+ }
199
+
109
200
  /**
110
201
  * Convert a pixels given value into rem
111
202
  *
@@ -59,6 +59,61 @@
59
59
  * }
60
60
  * }
61
61
  */
62
+ /**
63
+ * A heuristic that applies CSS to tablet
64
+ * viewports.
65
+ *
66
+ * Usage:
67
+ * @include tablet-viewport() {
68
+ * :host {
69
+ * background-color: green;
70
+ * }
71
+ * }
72
+ */
73
+ /**
74
+ * A heuristic that applies CSS to mobile
75
+ * viewports (i.e. phones, not tablets).
76
+ *
77
+ * Usage:
78
+ * @include mobile-viewport() {
79
+ * :host {
80
+ * background-color: blue;
81
+ * }
82
+ * }
83
+ */
84
+ /**
85
+ * Convert a font size to a dynamic font size.
86
+ * Fonts that participate in Dynamic Type should use
87
+ * dynamic font sizes.
88
+ * @param size - The initial font size including the unit (i.e. px or pt)
89
+ * @param unit (optional) - The unit to convert to. Use this if you want to
90
+ * convert to a unit other than $baselineUnit.
91
+ */
92
+ /**
93
+ * Convert a font size to a dynamic font size but impose
94
+ * a maximum font size.
95
+ * @param size - The initial font size including the unit (i.e. px or pt)
96
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
97
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
98
+ * convert to a unit other than $baselineUnit.
99
+ */
100
+ /**
101
+ * Convert a font size to a dynamic font size but impose
102
+ * a minimum font size.
103
+ * @param size - The initial font size including the unit (i.e. px or pt)
104
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
105
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
106
+ * convert to a unit other than $baselineUnit.
107
+ */
108
+ /**
109
+ * Convert a font size to a dynamic font size but impose
110
+ * maximum and minimum font sizes.
111
+ * @param size - The initial font size including the unit (i.e. px or pt)
112
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
113
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
114
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
115
+ * convert to a unit other than $baselineUnit.
116
+ */
62
117
  :host {
63
118
  /**
64
119
  * @prop --background: Background of the badge
@@ -69,8 +124,6 @@
69
124
  * @prop --padding-bottom: Bottom padding of the badge
70
125
  * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the badge
71
126
  */
72
- --background: var(--ion-color-primary, #0054e9);
73
- --color: var(--ion-color-primary-contrast, #fff);
74
127
  --padding-top: 3px;
75
128
  --padding-end: 8px;
76
129
  --padding-bottom: 3px;
@@ -87,7 +140,6 @@
87
140
  min-width: 10px;
88
141
  background: var(--background);
89
142
  color: var(--color);
90
- font-family: var(--ion-font-family, inherit);
91
143
  font-size: 0.8125rem;
92
144
  font-weight: bold;
93
145
  line-height: 1;
@@ -106,6 +158,45 @@
106
158
  display: none;
107
159
  }
108
160
 
161
+ /**
162
+ * Convert a font size to a dynamic font size.
163
+ * Fonts that participate in Dynamic Type should use
164
+ * dynamic font sizes.
165
+ * @param size - The initial font size including the unit (i.e. px or pt)
166
+ * @param unit (optional) - The unit to convert to. Use this if you want to
167
+ * convert to a unit other than $baselineUnit.
168
+ */
169
+ /**
170
+ * Convert a font size to a dynamic font size but impose
171
+ * a maximum font size.
172
+ * @param size - The initial font size including the unit (i.e. px or pt)
173
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
174
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
175
+ * convert to a unit other than $baselineUnit.
176
+ */
177
+ /**
178
+ * Convert a font size to a dynamic font size but impose
179
+ * a minimum font size.
180
+ * @param size - The initial font size including the unit (i.e. px or pt)
181
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
182
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
183
+ * convert to a unit other than $baselineUnit.
184
+ */
185
+ /**
186
+ * Convert a font size to a dynamic font size but impose
187
+ * maximum and minimum font sizes.
188
+ * @param size - The initial font size including the unit (i.e. px or pt)
189
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
190
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
191
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
192
+ * convert to a unit other than $baselineUnit.
193
+ */
194
+ :host {
195
+ --background: var(--ion-color-primary, #0054e9);
196
+ --color: var(--ion-color-primary-contrast, #fff);
197
+ font-family: var(--ion-font-family, inherit);
198
+ }
199
+
109
200
  /**
110
201
  * Convert a pixels given value into rem
111
202
  *
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { expect } from "@playwright/test";
5
5
  import { configs, test } from "../../../../utils/test/playwright/index";
6
- configs().forEach(({ config, screenshot, title }) => {
6
+ configs({ modes: ['md', 'ios', 'ionic-md'] }).forEach(({ config, screenshot, title }) => {
7
7
  test.describe(title('badge: rendering'), () => {
8
8
  test('should not have visual regressions', async ({ page }) => {
9
9
  await page.goto('/src/components/badge/test/basic', config);
@@ -114,6 +114,22 @@
114
114
  margin-inline-start: var(--ionic-space-200, 8px);
115
115
  }
116
116
 
117
+ :host(.button-solid.ion-color) .button-native {
118
+ background: var(--ion-color-base);
119
+ color: var(--ion-color-contrast);
120
+ }
121
+
122
+ :host(.button-outline.ion-color) .button-native {
123
+ border-color: var(--ion-color-base);
124
+ background: transparent;
125
+ color: var(--ion-color-base);
126
+ }
127
+
128
+ :host(.button-clear.ion-color) .button-native {
129
+ background: transparent;
130
+ color: var(--ion-color-base);
131
+ }
132
+
117
133
  /* Extra Small and Small Button */
118
134
  :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
119
135
  :host(.button-small) ::slotted(ion-icon[slot=start]) {
@@ -246,6 +262,29 @@
246
262
  --background-hover: var(--ionic-color-neutral-100, #f1f1f1);
247
263
  }
248
264
 
265
+ /**
266
+ * Only allow overriding of opacity here
267
+ * as developers should not be overriding
268
+ * colors when using the color prop.
269
+ */
270
+ :host(.button-solid.ion-color.ion-focused) .button-native::after {
271
+ background: current-color(contrast);
272
+ }
273
+
274
+ :host(.button-clear.ion-color.ion-focused) .button-native::after,
275
+ :host(.button-outline.ion-color.ion-focused) .button-native::after {
276
+ background: current-color(base);
277
+ }
278
+
279
+ @media (any-hover: hover) {
280
+ :host(.button-solid.ion-color:hover) .button-native::after {
281
+ background: current-color(contrast);
282
+ }
283
+ :host(.button-clear.ion-color:hover) .button-native::after,
284
+ :host(.button-outline.ion-color:hover) .button-native::after {
285
+ background: current-color(base);
286
+ }
287
+ }
249
288
  :host(.button-disabled) {
250
289
  --background: var(--ionic-state-disabled, rgba(255, 255, 255, 0.6));
251
290
  --border-color: var(--color);
@@ -260,9 +299,9 @@
260
299
  }
261
300
 
262
301
  :host(.button-outline) {
263
- --border-color: var(--ionic-color-primary-base, #105cef);
302
+ --border-color: var(--ion-color-primary, #105cef);
264
303
  --background: var(--ionic-color-base-white, #ffffff);
265
- --color: var(--ionic-color-primary-base, #105cef);
304
+ --color: var(--ion-color-primary, #105cef);
266
305
  }
267
306
 
268
307
  :host(.button-clear) {
@@ -3,8 +3,7 @@
3
3
  */
4
4
  import { expect } from "@playwright/test";
5
5
  import { configs, test } from "../../../../utils/test/playwright/index";
6
- // TODO(ROU-5474): add tests for ionic theme
7
- configs().forEach(({ title, screenshot, config }) => {
6
+ configs({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
8
7
  test.describe(title('button: outline'), () => {
9
8
  test('should not have visual regressions', async ({ page }) => {
10
9
  await page.goto(`/src/components/button/test/outline`, config);
@@ -14,7 +14,7 @@ configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ ti
14
14
  });
15
15
  test('should render solid button with color', async ({ page }) => {
16
16
  await page.setContent(`
17
- <ion-button color="tertiary" class="ion-activated">Button</ion-button>
17
+ <ion-button color="warning" class="ion-activated">Button</ion-button>
18
18
  `, config);
19
19
  const button = page.locator('ion-button');
20
20
  await expect(button).toHaveScreenshot(screenshot(`button-activated-solid-color`));
@@ -28,7 +28,7 @@ configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ ti
28
28
  });
29
29
  test('should render outline button with color', async ({ page }) => {
30
30
  await page.setContent(`
31
- <ion-button color="tertiary" fill="outline" class="ion-activated">Button</ion-button>
31
+ <ion-button color="warning" fill="outline" class="ion-activated">Button</ion-button>
32
32
  `, config);
33
33
  const button = page.locator('ion-button');
34
34
  await expect(button).toHaveScreenshot(screenshot(`button-activated-outline-color`));
@@ -42,7 +42,7 @@ configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ ti
42
42
  });
43
43
  test('should render clear button with color', async ({ page }) => {
44
44
  await page.setContent(`
45
- <ion-button color="tertiary" fill="clear" class="ion-activated">Button</ion-button>
45
+ <ion-button color="warning" fill="clear" class="ion-activated">Button</ion-button>
46
46
  `, config);
47
47
  const button = page.locator('ion-button');
48
48
  await expect(button).toHaveScreenshot(screenshot(`button-activated-clear-color`));