@ionic/core 8.2.3-dev.11720020551.1b35ace4 → 8.2.3-dev.11721225504.1476a6ac

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 (82) hide show
  1. package/components/checkbox.js +1 -1
  2. package/components/ion-avatar.js +3 -3
  3. package/components/ion-badge.js +3 -3
  4. package/components/ion-input.js +1 -1
  5. package/components/item.js +3 -3
  6. package/components/spinner.js +33 -6
  7. package/css/ionic/bundle.ionic.css +1 -1
  8. package/css/ionic/bundle.ionic.css.map +1 -1
  9. package/css/ionic/core.ionic.css.map +1 -1
  10. package/css/ionic/global.bundle.ionic.css.map +1 -1
  11. package/css/ionic/link.ionic.css.map +1 -1
  12. package/css/ionic/typography.ionic.css.map +1 -1
  13. package/css/ionic/utils.bundle.ionic.css +1 -1
  14. package/css/ionic/utils.bundle.ionic.css.map +1 -1
  15. package/dist/cjs/ion-avatar_3.cjs.entry.js +6 -6
  16. package/dist/cjs/ion-checkbox.cjs.entry.js +1 -1
  17. package/dist/cjs/ion-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
  19. package/dist/cjs/ion-spinner.cjs.entry.js +30 -4
  20. package/dist/cjs/ionic.cjs.js +1 -1
  21. package/dist/cjs/loader.cjs.js +1 -1
  22. package/dist/collection/components/avatar/avatar.ionic.css +17 -1
  23. package/dist/collection/components/avatar/avatar.js +5 -5
  24. package/dist/collection/components/avatar/test/shape/avatar.e2e.js +7 -0
  25. package/dist/collection/components/avatar/test/size/avatar.e2e.js +27 -0
  26. package/dist/collection/components/badge/badge.ionic.css +32 -37
  27. package/dist/collection/components/badge/badge.ios.css +94 -3
  28. package/dist/collection/components/badge/badge.md.css +94 -3
  29. package/dist/collection/components/button/test/outline/button.e2e.js +1 -2
  30. package/dist/collection/components/checkbox/checkbox.ionic.css +29 -18
  31. package/dist/collection/components/checkbox/test/basic/checkbox.e2e.js +12 -1
  32. package/dist/collection/components/input/input.ionic.css +2 -1
  33. package/dist/collection/components/item/item.ionic.css +359 -65
  34. package/dist/collection/components/item/item.ios.css +94 -67
  35. package/dist/collection/components/item/item.md.css +94 -67
  36. package/dist/collection/components/spinner/spinner.common.css +199 -0
  37. package/dist/collection/components/spinner/{spinner.css → spinner.ionic.css} +55 -0
  38. package/dist/collection/components/spinner/spinner.js +40 -3
  39. package/dist/collection/components/spinner/test/size/spinner.e2e.js +47 -0
  40. package/dist/docs.json +190 -6
  41. package/dist/esm/ion-avatar_3.entry.js +6 -6
  42. package/dist/esm/ion-checkbox.entry.js +1 -1
  43. package/dist/esm/ion-input.entry.js +1 -1
  44. package/dist/esm/ion-item_8.entry.js +3 -3
  45. package/dist/esm/ion-spinner.entry.js +30 -4
  46. package/dist/esm/ionic.js +1 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  49. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  50. package/dist/esm-es5/ion-input.entry.js +1 -1
  51. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  52. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  53. package/dist/esm-es5/ionic.js +1 -1
  54. package/dist/esm-es5/loader.js +1 -1
  55. package/dist/html.html-data.json +25 -1
  56. package/dist/ionic/ionic.esm.js +1 -1
  57. package/dist/ionic/p-1be0295f.entry.js +4 -0
  58. package/dist/ionic/p-201d8768.system.entry.js +4 -0
  59. package/dist/ionic/p-3ce954c7.entry.js +4 -0
  60. package/dist/ionic/p-46fc9748.system.entry.js +4 -0
  61. package/dist/ionic/p-76ff0b6d.entry.js +4 -0
  62. package/dist/ionic/p-7b590e46.system.js +1 -1
  63. package/dist/ionic/p-85ca50a9.system.entry.js +4 -0
  64. package/dist/ionic/p-a0b51978.system.entry.js +4 -0
  65. package/dist/ionic/p-a6bb62ea.entry.js +4 -0
  66. package/dist/ionic/p-ae79f1e2.entry.js +4 -0
  67. package/dist/ionic/p-bbefc52b.system.entry.js +4 -0
  68. package/dist/types/components/avatar/avatar.d.ts +7 -4
  69. package/dist/types/components/spinner/spinner.d.ts +11 -0
  70. package/dist/types/components.d.ts +12 -4
  71. package/hydrate/index.js +44 -17
  72. package/package.json +1 -1
  73. package/dist/ionic/p-07012c84.system.entry.js +0 -4
  74. package/dist/ionic/p-2d618ba6.system.entry.js +0 -4
  75. package/dist/ionic/p-610df697.entry.js +0 -4
  76. package/dist/ionic/p-6ced0cc0.entry.js +0 -4
  77. package/dist/ionic/p-a2830649.system.entry.js +0 -4
  78. package/dist/ionic/p-ab08cad3.entry.js +0 -4
  79. package/dist/ionic/p-b0c99bd1.system.entry.js +0 -4
  80. package/dist/ionic/p-c20e6ebc.system.entry.js +0 -4
  81. package/dist/ionic/p-c47b75e3.entry.js +0 -4
  82. package/dist/ionic/p-d8893d17.entry.js +0 -4
@@ -1,42 +1,3 @@
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
- * Convert a font size to a dynamic font size.
9
- * Fonts that participate in Dynamic Type should use
10
- * dynamic font sizes.
11
- * @param size - The initial font size including the unit (i.e. px or pt)
12
- * @param unit (optional) - The unit to convert to. Use this if you want to
13
- * convert to a unit other than $baselineUnit.
14
- */
15
- /**
16
- * Convert a font size to a dynamic font size but impose
17
- * a maximum font size.
18
- * @param size - The initial font size including the unit (i.e. px or pt)
19
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
20
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
21
- * convert to a unit other than $baselineUnit.
22
- */
23
- /**
24
- * Convert a font size to a dynamic font size but impose
25
- * a minimum font size.
26
- * @param size - The initial font size including the unit (i.e. px or pt)
27
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
28
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
29
- * convert to a unit other than $baselineUnit.
30
- */
31
- /**
32
- * Convert a font size to a dynamic font size but impose
33
- * maximum and minimum font sizes.
34
- * @param size - The initial font size including the unit (i.e. px or pt)
35
- * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
36
- * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
37
- * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
38
- * convert to a unit other than $baselineUnit.
39
- */
40
1
  /**
41
2
  * A heuristic that applies CSS to tablet
42
3
  * viewports.
@@ -130,23 +91,12 @@
130
91
  justify-content: space-between;
131
92
  outline: none;
132
93
  color: var(--color);
133
- font-family: var(--ion-font-family, inherit);
134
94
  text-align: initial;
135
95
  text-decoration: none;
136
96
  overflow: hidden;
137
97
  box-sizing: border-box;
138
98
  }
139
99
 
140
- :host(.ion-color) .item-native {
141
- background: var(--ion-color-base);
142
- color: var(--ion-color-contrast);
143
- }
144
-
145
- :host(.ion-color) .item-native,
146
- :host(.ion-color) .item-inner {
147
- border-color: var(--ion-color-shade);
148
- }
149
-
150
100
  :host(.ion-activated) .item-native {
151
101
  color: var(--color-activated);
152
102
  }
@@ -155,10 +105,6 @@
155
105
  opacity: var(--background-activated-opacity);
156
106
  }
157
107
 
158
- :host(.ion-color.ion-activated) .item-native {
159
- color: var(--ion-color-contrast);
160
- }
161
-
162
108
  :host(.ion-focused) .item-native {
163
109
  color: var(--color-focused);
164
110
  }
@@ -167,13 +113,6 @@
167
113
  opacity: var(--background-focused-opacity);
168
114
  }
169
115
 
170
- :host(.ion-color.ion-focused) .item-native {
171
- color: var(--ion-color-contrast);
172
- }
173
- :host(.ion-color.ion-focused) .item-native::after {
174
- background: var(--ion-color-contrast);
175
- }
176
-
177
116
  @media (any-hover: hover) {
178
117
  :host(.ion-activatable:not(.ion-focused):hover) .item-native {
179
118
  color: var(--color-hover);
@@ -182,12 +121,6 @@
182
121
  background: var(--background-hover);
183
122
  opacity: var(--background-hover-opacity);
184
123
  }
185
- :host(.ion-color.ion-activatable:not(.ion-focused):hover) .item-native {
186
- color: var(--ion-color-contrast);
187
- }
188
- :host(.ion-color.ion-activatable:not(.ion-focused):hover) .item-native::after {
189
- background: var(--ion-color-contrast);
190
- }
191
124
  }
192
125
  :host(.item-control-needs-pointer-cursor) {
193
126
  cursor: pointer;
@@ -412,6 +345,100 @@ ion-ripple-effect {
412
345
  color: var(--ripple-color);
413
346
  }
414
347
 
348
+ /**
349
+ * Convert a pixels given value into rem
350
+ *
351
+ * @param pixels - Value in pixels to be converted (i.e. px)
352
+ * @param context (optional) - Baseline value
353
+ */
354
+ /**
355
+ * Convert a font size to a dynamic font size.
356
+ * Fonts that participate in Dynamic Type should use
357
+ * dynamic font sizes.
358
+ * @param size - The initial font size including the unit (i.e. px or pt)
359
+ * @param unit (optional) - The unit to convert to. Use this if you want to
360
+ * convert to a unit other than $baselineUnit.
361
+ */
362
+ /**
363
+ * Convert a font size to a dynamic font size but impose
364
+ * a maximum font size.
365
+ * @param size - The initial font size including the unit (i.e. px or pt)
366
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
367
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
368
+ * convert to a unit other than $baselineUnit.
369
+ */
370
+ /**
371
+ * Convert a font size to a dynamic font size but impose
372
+ * a minimum font size.
373
+ * @param size - The initial font size including the unit (i.e. px or pt)
374
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
375
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
376
+ * convert to a unit other than $baselineUnit.
377
+ */
378
+ /**
379
+ * Convert a font size to a dynamic font size but impose
380
+ * maximum and minimum font sizes.
381
+ * @param size - The initial font size including the unit (i.e. px or pt)
382
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
383
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
384
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
385
+ * convert to a unit other than $baselineUnit.
386
+ */
387
+ /**
388
+ * A heuristic that applies CSS to tablet
389
+ * viewports.
390
+ *
391
+ * Usage:
392
+ * @include tablet-viewport() {
393
+ * :host {
394
+ * background-color: green;
395
+ * }
396
+ * }
397
+ */
398
+ /**
399
+ * A heuristic that applies CSS to mobile
400
+ * viewports (i.e. phones, not tablets).
401
+ *
402
+ * Usage:
403
+ * @include mobile-viewport() {
404
+ * :host {
405
+ * background-color: blue;
406
+ * }
407
+ * }
408
+ */
409
+ :host {
410
+ font-family: var(--ion-font-family, inherit);
411
+ }
412
+
413
+ :host(.ion-color) .item-native {
414
+ background: var(--ion-color-base);
415
+ color: var(--ion-color-contrast);
416
+ }
417
+
418
+ :host(.ion-color) .item-native,
419
+ :host(.ion-color) .item-inner {
420
+ border-color: var(--ion-color-shade);
421
+ }
422
+
423
+ :host(.ion-color.ion-activated) .item-native {
424
+ color: var(--ion-color-contrast);
425
+ }
426
+
427
+ :host(.ion-color.ion-focused) .item-native {
428
+ color: var(--ion-color-contrast);
429
+ }
430
+ :host(.ion-color.ion-focused) .item-native::after {
431
+ background: var(--ion-color-contrast);
432
+ }
433
+
434
+ @media (any-hover: hover) {
435
+ :host(.ion-color.ion-activatable:not(.ion-focused):hover) .item-native {
436
+ color: var(--ion-color-contrast);
437
+ }
438
+ :host(.ion-color.ion-activatable:not(.ion-focused):hover) .item-native::after {
439
+ background: var(--ion-color-contrast);
440
+ }
441
+ }
415
442
  /**
416
443
  * Convert a pixels given value into rem
417
444
  *
@@ -0,0 +1,199 @@
1
+ /**
2
+ * A heuristic that applies CSS to tablet
3
+ * viewports.
4
+ *
5
+ * Usage:
6
+ * @include tablet-viewport() {
7
+ * :host {
8
+ * background-color: green;
9
+ * }
10
+ * }
11
+ */
12
+ /**
13
+ * A heuristic that applies CSS to mobile
14
+ * viewports (i.e. phones, not tablets).
15
+ *
16
+ * Usage:
17
+ * @include mobile-viewport() {
18
+ * :host {
19
+ * background-color: blue;
20
+ * }
21
+ * }
22
+ */
23
+ :host {
24
+ /**
25
+ * @prop --color: Color of the spinner
26
+ */
27
+ display: inline-block;
28
+ position: relative;
29
+ width: 28px;
30
+ height: 28px;
31
+ color: var(--color);
32
+ user-select: none;
33
+ }
34
+
35
+ :host(.ion-color) {
36
+ color: var(--ion-color-base);
37
+ }
38
+
39
+ svg {
40
+ transform-origin: center;
41
+ position: absolute;
42
+ /**
43
+ * Do not use @include position
44
+ * as the alignment of the elements with
45
+ * a spinner should not be RTL aware.
46
+ */
47
+ top: 0;
48
+ /* stylelint-disable-next-line property-disallowed-list */
49
+ left: 0;
50
+ width: 100%;
51
+ height: 100%;
52
+ transform: translateZ(0);
53
+ }
54
+ :host-context([dir=rtl]) svg {
55
+ transform-origin: calc(100% - center);
56
+ }
57
+
58
+ [dir=rtl] svg {
59
+ transform-origin: calc(100% - center);
60
+ }
61
+
62
+ @supports selector(:dir(rtl)) {
63
+ svg:dir(rtl) {
64
+ transform-origin: calc(100% - center);
65
+ }
66
+ }
67
+
68
+ :host(.spinner-lines) line,
69
+ :host(.spinner-lines-small) line {
70
+ stroke-width: 7px;
71
+ }
72
+
73
+ :host(.spinner-lines-sharp) line,
74
+ :host(.spinner-lines-sharp-small) line {
75
+ stroke-width: 4px;
76
+ }
77
+
78
+ :host(.spinner-lines) line,
79
+ :host(.spinner-lines-small) line,
80
+ :host(.spinner-lines-sharp) line,
81
+ :host(.spinner-lines-sharp-small) line {
82
+ stroke-linecap: round;
83
+ stroke: currentColor;
84
+ }
85
+
86
+ :host(.spinner-lines) svg,
87
+ :host(.spinner-lines-small) svg,
88
+ :host(.spinner-lines-sharp) svg,
89
+ :host(.spinner-lines-sharp-small) svg {
90
+ animation: spinner-fade-out 1s linear infinite;
91
+ }
92
+
93
+ :host(.spinner-bubbles) svg {
94
+ animation: spinner-scale-out 1s linear infinite;
95
+ fill: currentColor;
96
+ }
97
+
98
+ :host(.spinner-circles) svg {
99
+ animation: spinner-fade-out 1s linear infinite;
100
+ fill: currentColor;
101
+ }
102
+
103
+ :host(.spinner-crescent) circle {
104
+ fill: transparent;
105
+ stroke-width: 4px;
106
+ stroke-dasharray: 128px;
107
+ stroke-dashoffset: 82px;
108
+ stroke: currentColor;
109
+ }
110
+
111
+ :host(.spinner-crescent) svg {
112
+ animation: spinner-rotate 1s linear infinite;
113
+ }
114
+
115
+ :host(.spinner-dots) circle {
116
+ stroke-width: 0;
117
+ fill: currentColor;
118
+ }
119
+
120
+ :host(.spinner-dots) svg {
121
+ animation: spinner-dots 1s linear infinite;
122
+ }
123
+
124
+ :host(.spinner-circular) svg {
125
+ animation: spinner-circular linear infinite;
126
+ }
127
+
128
+ :host(.spinner-circular) circle {
129
+ animation: spinner-circular-inner ease-in-out infinite;
130
+ stroke: currentColor;
131
+ stroke-dasharray: 80px, 200px;
132
+ stroke-dashoffset: 0px;
133
+ stroke-width: 5.6;
134
+ fill: none;
135
+ }
136
+
137
+ :host(.spinner-paused),
138
+ :host(.spinner-paused) svg,
139
+ :host(.spinner-paused) circle {
140
+ animation-play-state: paused;
141
+ }
142
+
143
+ @keyframes spinner-fade-out {
144
+ 0% {
145
+ opacity: 1;
146
+ }
147
+ 100% {
148
+ opacity: 0;
149
+ }
150
+ }
151
+ @keyframes spinner-scale-out {
152
+ 0% {
153
+ transform: scale(1, 1);
154
+ }
155
+ 100% {
156
+ transform: scale(0, 0);
157
+ }
158
+ }
159
+ @keyframes spinner-rotate {
160
+ 0% {
161
+ transform: rotate(0deg);
162
+ }
163
+ 100% {
164
+ transform: rotate(360deg);
165
+ }
166
+ }
167
+ @keyframes spinner-dots {
168
+ 0% {
169
+ transform: scale(1, 1);
170
+ opacity: 0.9;
171
+ }
172
+ 50% {
173
+ transform: scale(0.4, 0.4);
174
+ opacity: 0.3;
175
+ }
176
+ 100% {
177
+ transform: scale(1, 1);
178
+ opacity: 0.9;
179
+ }
180
+ }
181
+ @keyframes spinner-circular {
182
+ 100% {
183
+ transform: rotate(360deg);
184
+ }
185
+ }
186
+ @keyframes spinner-circular-inner {
187
+ 0% {
188
+ stroke-dasharray: 1px, 200px;
189
+ stroke-dashoffset: 0px;
190
+ }
191
+ 50% {
192
+ stroke-dasharray: 100px, 200px;
193
+ stroke-dashoffset: -15px;
194
+ }
195
+ 100% {
196
+ stroke-dasharray: 100px, 200px;
197
+ stroke-dashoffset: -125px;
198
+ }
199
+ }
@@ -4,6 +4,32 @@
4
4
  * @param pixels - Value in pixels to be converted (i.e. px)
5
5
  * @param context (optional) - Baseline value
6
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
+ */
7
33
  /**
8
34
  * Convert a font size to a dynamic font size.
9
35
  * Fonts that participate in Dynamic Type should use
@@ -235,4 +261,33 @@ svg {
235
261
  stroke-dasharray: 100px, 200px;
236
262
  stroke-dashoffset: -125px;
237
263
  }
264
+ }
265
+ /* Extra Small */
266
+ :host(.spinner-xsmall) {
267
+ width: var(--ionic-scale-600, 24px);
268
+ height: var(--ionic-scale-600, 24px);
269
+ }
270
+
271
+ /* Small */
272
+ :host(.spinner-small) {
273
+ width: var(--ionic-scale-800, 32px);
274
+ height: var(--ionic-scale-800, 32px);
275
+ }
276
+
277
+ /* Medium */
278
+ :host(.spinner-medium) {
279
+ width: var(--ionic-scale-1000, 40px);
280
+ height: var(--ionic-scale-1000, 40px);
281
+ }
282
+
283
+ /* Large */
284
+ :host(.spinner-large) {
285
+ width: var(--ionic-scale-1200, 48px);
286
+ height: var(--ionic-scale-1200, 48px);
287
+ }
288
+
289
+ /* Extra Large */
290
+ :host(.spinner-xlarge) {
291
+ width: var(--ionic-scale-1400, 56px);
292
+ height: var(--ionic-scale-1400, 56px);
238
293
  }
@@ -16,7 +16,9 @@ export class Spinner {
16
16
  this.duration = undefined;
17
17
  this.name = undefined;
18
18
  this.paused = false;
19
+ this.size = undefined;
19
20
  }
21
+ // TODO(ROU-10920): Switch `theme` to `mode`.
20
22
  getName() {
21
23
  const spinnerName = this.name || config.get('spinner');
22
24
  const theme = getIonTheme(this);
@@ -25,11 +27,24 @@ export class Spinner {
25
27
  }
26
28
  return theme === 'ios' ? 'lines' : 'circular';
27
29
  }
30
+ getSize() {
31
+ const theme = getIonTheme(this);
32
+ const { size } = this;
33
+ // TODO(ROU-10912): Remove theme check when sizes are defined for all themes.
34
+ if (theme !== 'ionic') {
35
+ return undefined;
36
+ }
37
+ if (size === undefined) {
38
+ return 'xsmall';
39
+ }
40
+ return size;
41
+ }
28
42
  render() {
29
43
  var _a;
30
44
  const self = this;
31
45
  const theme = getIonTheme(self);
32
46
  const spinnerName = self.getName();
47
+ const size = this.getSize();
33
48
  const spinner = (_a = SPINNERS[spinnerName]) !== null && _a !== void 0 ? _a : SPINNERS['lines'];
34
49
  const duration = typeof self.duration === 'number' && self.duration > 10 ? self.duration : spinner.dur;
35
50
  const svgs = [];
@@ -43,22 +58,27 @@ export class Spinner {
43
58
  svgs.push(buildLine(spinner, duration, i, spinner.lines));
44
59
  }
45
60
  }
46
- return (h(Host, { key: '577bf2a998c801edc32a1d515fc930c471567e71', class: createColorClasses(self.color, {
61
+ return (h(Host, { key: '6cac09975f1088551e71b1c60033d3571438f374', class: createColorClasses(self.color, {
47
62
  [theme]: true,
48
63
  [`spinner-${spinnerName}`]: true,
49
64
  'spinner-paused': self.paused || config.getBoolean('_testing'),
65
+ [`spinner-${size}`]: size !== undefined,
50
66
  }), role: "progressbar", style: spinner.elmDuration ? { animationDuration: duration + 'ms' } : {} }, svgs));
51
67
  }
52
68
  static get is() { return "ion-spinner"; }
53
69
  static get encapsulation() { return "shadow"; }
54
70
  static get originalStyleUrls() {
55
71
  return {
56
- "$": ["spinner.scss"]
72
+ "ios": ["spinner.common.scss"],
73
+ "md": ["spinner.common.scss"],
74
+ "ionic": ["spinner.ionic.scss"]
57
75
  };
58
76
  }
59
77
  static get styleUrls() {
60
78
  return {
61
- "$": ["spinner.css"]
79
+ "ios": ["spinner.common.css"],
80
+ "md": ["spinner.common.css"],
81
+ "ionic": ["spinner.ionic.css"]
62
82
  };
63
83
  }
64
84
  static get properties() {
@@ -143,6 +163,23 @@ export class Spinner {
143
163
  "attribute": "paused",
144
164
  "reflect": false,
145
165
  "defaultValue": "false"
166
+ },
167
+ "size": {
168
+ "type": "string",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'",
172
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"xlarge\" | \"xsmall\" | undefined",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": true,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "Set to `\"xsmall\"` for the smallest size.\nSet to `\"small\"` for a smaller size.\nSet to `\"medium\"` for a medium size.\nSet to `\"large\"` for a large size.\nSet to `\"xlarge\"` for the largest size.\n\nDefaults to `\"xsmall\"` for the `ionic` theme, undefined for all other themes."
180
+ },
181
+ "attribute": "size",
182
+ "reflect": false
146
183
  }
147
184
  };
148
185
  }
@@ -0,0 +1,47 @@
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
+ /**
7
+ * This behavior does not vary across directions.
8
+ */
9
+ configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
10
+ test.describe(title('spinner: size'), () => {
11
+ test('should render xsmall spinner', async ({ page }) => {
12
+ await page.setContent(`
13
+ <ion-spinner size="xsmall"></ion-spinner>
14
+ `, config);
15
+ const spinner = page.locator('ion-spinner');
16
+ await expect(spinner).toHaveScreenshot(screenshot(`spinner-size-xsmall`));
17
+ });
18
+ test('should render small spinner', async ({ page }) => {
19
+ await page.setContent(`
20
+ <ion-spinner size="small"></ion-spinner>
21
+ `, config);
22
+ const spinner = page.locator('ion-spinner');
23
+ await expect(spinner).toHaveScreenshot(screenshot(`spinner-size-small`));
24
+ });
25
+ test('should render medium spinner', async ({ page }) => {
26
+ await page.setContent(`
27
+ <ion-spinner size="medium"></ion-spinner>
28
+ `, config);
29
+ const spinner = page.locator('ion-spinner');
30
+ await expect(spinner).toHaveScreenshot(screenshot(`spinner-size-medium`));
31
+ });
32
+ test('should render large spinner', async ({ page }) => {
33
+ await page.setContent(`
34
+ <ion-spinner size="large"></ion-spinner>
35
+ `, config);
36
+ const spinner = page.locator('ion-spinner');
37
+ await expect(spinner).toHaveScreenshot(screenshot(`spinner-size-large`));
38
+ });
39
+ test('should render xlarge spinner', async ({ page }) => {
40
+ await page.setContent(`
41
+ <ion-spinner size="xlarge"></ion-spinner>
42
+ `, config);
43
+ const spinner = page.locator('ion-spinner');
44
+ await expect(spinner).toHaveScreenshot(screenshot(`spinner-size-xlarge`));
45
+ });
46
+ });
47
+ });