@ionic/core 8.2.3-dev.11723022900.1196a7bf → 8.2.3-dev.11724345963.10ca6051

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 (139) hide show
  1. package/components/button.js +7 -6
  2. package/components/ion-card-content.js +5 -5
  3. package/components/ion-card-header.js +4 -4
  4. package/components/ion-card-subtitle.js +4 -4
  5. package/components/ion-card.js +3 -3
  6. package/components/ion-textarea.js +20 -7
  7. package/components/ion-thumbnail.js +2 -2
  8. package/components/ion-title.js +2 -2
  9. package/components/ion-toast.js +2 -2
  10. package/components/ion-toggle.js +3 -3
  11. package/components/ion-toolbar.js +2 -2
  12. package/components/item.js +11 -4
  13. package/components/ripple-effect.js +15 -5
  14. package/components/spinner.js +4 -5
  15. package/css/core.css +1 -1
  16. package/css/core.css.map +1 -1
  17. package/css/ionic/bundle.ionic.css +1 -1
  18. package/css/ionic/bundle.ionic.css.map +1 -1
  19. package/css/ionic/core.ionic.css +1 -1
  20. package/css/ionic/core.ionic.css.map +1 -1
  21. package/css/ionic.bundle.css +1 -1
  22. package/css/ionic.bundle.css.map +1 -1
  23. package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
  24. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-button_2.cjs.entry.js +6 -5
  26. package/dist/cjs/ion-card_5.cjs.entry.js +16 -16
  27. package/dist/cjs/ion-item_8.cjs.entry.js +11 -4
  28. package/dist/cjs/ion-ripple-effect.cjs.entry.js +14 -4
  29. package/dist/cjs/ion-spinner.cjs.entry.js +3 -4
  30. package/dist/cjs/ion-textarea.cjs.entry.js +19 -7
  31. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  32. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  33. package/dist/cjs/ionic.cjs.js +1 -1
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/collection/components/button/button.ionic.css +346 -211
  36. package/dist/collection/components/button/button.ios.css +87 -20
  37. package/dist/collection/components/button/button.js +4 -3
  38. package/dist/collection/components/button/button.md.css +87 -20
  39. package/dist/collection/components/button/test/basic/button.e2e.js +3 -3
  40. package/dist/collection/components/button/test/clear/button.e2e.js +1 -1
  41. package/dist/collection/components/button/test/outline/button.e2e.js +1 -1
  42. package/dist/collection/components/card/card.ionic.css +61 -10
  43. package/dist/collection/components/card/card.ios.css +37 -12
  44. package/dist/collection/components/card/card.md.css +37 -12
  45. package/dist/collection/components/card-content/card-content.ionic.css +92 -0
  46. package/dist/collection/components/card-content/card-content.ios.css +4 -1
  47. package/dist/collection/components/card-content/card-content.js +3 -3
  48. package/dist/collection/components/card-content/card-content.md.css +4 -1
  49. package/dist/collection/components/card-header/card-header.ionic.css +89 -0
  50. package/dist/collection/components/card-header/card-header.ios.css +15 -15
  51. package/dist/collection/components/card-header/card-header.js +4 -4
  52. package/dist/collection/components/card-header/card-header.md.css +15 -15
  53. package/dist/collection/components/card-subtitle/card-subtitle.ionic.css +148 -0
  54. package/dist/collection/components/card-subtitle/card-subtitle.js +4 -4
  55. package/dist/collection/components/card-title/card-title.ios.css +61 -0
  56. package/dist/collection/components/card-title/card-title.md.css +61 -0
  57. package/dist/collection/components/item/item.ionic.css +12 -0
  58. package/dist/collection/components/item/item.js +10 -3
  59. package/dist/collection/components/ripple-effect/ripple-effect.ionic.css +154 -0
  60. package/dist/collection/components/ripple-effect/ripple-effect.js +7 -3
  61. package/dist/collection/components/spinner/spinner.js +4 -5
  62. package/dist/collection/components/textarea/test/size/textarea.e2e.js +123 -0
  63. package/dist/collection/components/textarea/textarea.ionic.css +790 -0
  64. package/dist/collection/components/textarea/textarea.ios.css +175 -95
  65. package/dist/collection/components/textarea/textarea.js +35 -5
  66. package/dist/collection/components/textarea/textarea.md.css +175 -95
  67. package/dist/collection/components/thumbnail/thumbnail.js +2 -2
  68. package/dist/collection/components/title/title.js +2 -2
  69. package/dist/collection/components/toast/toast.js +2 -2
  70. package/dist/collection/components/toggle/toggle.js +3 -3
  71. package/dist/collection/components/toolbar/toolbar.js +2 -2
  72. package/dist/docs.json +191 -1
  73. package/dist/esm/ion-app_8.entry.js +4 -4
  74. package/dist/esm/ion-avatar_3.entry.js +2 -2
  75. package/dist/esm/ion-button_2.entry.js +7 -6
  76. package/dist/esm/ion-card_5.entry.js +16 -16
  77. package/dist/esm/ion-item_8.entry.js +11 -4
  78. package/dist/esm/ion-ripple-effect.entry.js +14 -4
  79. package/dist/esm/ion-spinner.entry.js +4 -5
  80. package/dist/esm/ion-textarea.entry.js +19 -7
  81. package/dist/esm/ion-toast.entry.js +2 -2
  82. package/dist/esm/ion-toggle.entry.js +3 -3
  83. package/dist/esm/ionic.js +1 -1
  84. package/dist/esm/loader.js +1 -1
  85. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  86. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  87. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  88. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  89. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  90. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  91. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  92. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  93. package/dist/esm-es5/ion-toast.entry.js +1 -1
  94. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  95. package/dist/esm-es5/ionic.js +1 -1
  96. package/dist/esm-es5/loader.js +1 -1
  97. package/dist/html.html-data.json +15 -0
  98. package/dist/ionic/ionic.esm.js +1 -1
  99. package/dist/ionic/p-13405b29.entry.js +4 -0
  100. package/dist/ionic/p-1ee206ac.entry.js +4 -0
  101. package/dist/ionic/p-22952d7a.system.entry.js +4 -0
  102. package/dist/ionic/{p-7dad531c.system.entry.js → p-31692628.system.entry.js} +1 -1
  103. package/dist/ionic/{p-b4b44bf9.system.entry.js → p-35fde411.system.entry.js} +1 -1
  104. package/dist/ionic/{p-7ab9c88c.system.entry.js → p-3a2eb448.system.entry.js} +1 -1
  105. package/dist/ionic/p-4f053633.system.entry.js +4 -0
  106. package/dist/ionic/p-6691825a.system.entry.js +4 -0
  107. package/dist/ionic/{p-39a39279.entry.js → p-6e7d4537.entry.js} +1 -1
  108. package/dist/ionic/p-7a1b640f.entry.js +4 -0
  109. package/dist/ionic/p-7b590e46.system.js +1 -1
  110. package/dist/ionic/p-8b09c4cb.system.entry.js +4 -0
  111. package/dist/ionic/p-91b33f25.entry.js +4 -0
  112. package/dist/ionic/{p-f84ea1e9.system.entry.js → p-984e02c3.system.entry.js} +1 -1
  113. package/dist/ionic/p-a0e155e1.system.entry.js +4 -0
  114. package/dist/ionic/p-a814eee1.entry.js +4 -0
  115. package/dist/ionic/{p-c11fdca2.entry.js → p-a971dec3.entry.js} +1 -1
  116. package/dist/ionic/p-c1bb715a.entry.js +4 -0
  117. package/dist/ionic/p-d3c9617d.system.entry.js +4 -0
  118. package/dist/ionic/p-d45fd591.entry.js +4 -0
  119. package/dist/ionic/p-f1aa5723.entry.js +4 -0
  120. package/dist/types/components/item/item.d.ts +5 -0
  121. package/dist/types/components/textarea/textarea.d.ts +6 -0
  122. package/dist/types/components.d.ts +8 -0
  123. package/hydrate/index.js +82 -52
  124. package/package.json +1 -1
  125. package/dist/ionic/p-01ae1aa0.entry.js +0 -4
  126. package/dist/ionic/p-128f0f15.system.entry.js +0 -4
  127. package/dist/ionic/p-1be0295f.entry.js +0 -4
  128. package/dist/ionic/p-41c9fb60.entry.js +0 -4
  129. package/dist/ionic/p-42452dc9.entry.js +0 -4
  130. package/dist/ionic/p-4346453b.entry.js +0 -4
  131. package/dist/ionic/p-4d6c2031.system.entry.js +0 -4
  132. package/dist/ionic/p-4fdbf0ef.entry.js +0 -4
  133. package/dist/ionic/p-56c72f65.system.entry.js +0 -4
  134. package/dist/ionic/p-7459eeb7.system.entry.js +0 -4
  135. package/dist/ionic/p-8ac5efa9.entry.js +0 -4
  136. package/dist/ionic/p-b1938594.entry.js +0 -4
  137. package/dist/ionic/p-bbefc52b.system.entry.js +0 -4
  138. package/dist/ionic/p-d774e194.system.entry.js +0 -4
  139. /package/dist/collection/components/ripple-effect/{ripple-effect.css → ripple-effect.common.css} +0 -0
@@ -0,0 +1,154 @@
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
+ /**
41
+ * A heuristic that applies CSS to tablet
42
+ * viewports.
43
+ *
44
+ * Usage:
45
+ * @include tablet-viewport() {
46
+ * :host {
47
+ * background-color: green;
48
+ * }
49
+ * }
50
+ */
51
+ /**
52
+ * A heuristic that applies CSS to mobile
53
+ * viewports (i.e. phones, not tablets).
54
+ *
55
+ * Usage:
56
+ * @include mobile-viewport() {
57
+ * :host {
58
+ * background-color: blue;
59
+ * }
60
+ * }
61
+ */
62
+ :host {
63
+ right: 0;
64
+ left: 0;
65
+ top: 0;
66
+ bottom: 0;
67
+ position: absolute;
68
+ contain: strict;
69
+ pointer-events: none;
70
+ }
71
+
72
+ :host(.unbounded) {
73
+ contain: layout size style;
74
+ }
75
+
76
+ .ripple-effect {
77
+ border-radius: 50%;
78
+ position: absolute;
79
+ background-color: currentColor;
80
+ color: inherit;
81
+ contain: strict;
82
+ opacity: 0;
83
+ animation: 225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;
84
+ will-change: transform, opacity;
85
+ pointer-events: none;
86
+ }
87
+
88
+ .fade-out {
89
+ transform: translate(var(--translate-end)) scale(var(--final-scale, 1));
90
+ animation: 150ms fadeOutAnimation forwards;
91
+ }
92
+
93
+ @keyframes rippleAnimation {
94
+ from {
95
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
96
+ transform: scale(1);
97
+ }
98
+ to {
99
+ transform: translate(var(--translate-end)) scale(var(--final-scale, 1));
100
+ }
101
+ }
102
+ @keyframes fadeInAnimation {
103
+ from {
104
+ animation-timing-function: linear;
105
+ opacity: 0;
106
+ }
107
+ to {
108
+ opacity: 0.16;
109
+ }
110
+ }
111
+ @keyframes fadeOutAnimation {
112
+ from {
113
+ animation-timing-function: linear;
114
+ opacity: 0.16;
115
+ }
116
+ to {
117
+ opacity: 0;
118
+ }
119
+ }
120
+ .ripple-effect {
121
+ animation-name: rippleAnimation, fadeInAnimation;
122
+ }
123
+
124
+ .fade-out {
125
+ animation-name: fadeOutAnimation;
126
+ }
127
+
128
+ @keyframes rippleAnimation {
129
+ from {
130
+ animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
131
+ transform: scale(1);
132
+ }
133
+ to {
134
+ transform: translate(var(--translate-end)) scale(var(--final-scale, 1));
135
+ }
136
+ }
137
+ @keyframes fadeInAnimation {
138
+ from {
139
+ animation-timing-function: linear;
140
+ opacity: 0;
141
+ }
142
+ to {
143
+ opacity: var(--ripple-opacity, 0.16);
144
+ }
145
+ }
146
+ @keyframes fadeOutAnimation {
147
+ from {
148
+ animation-timing-function: linear;
149
+ opacity: var(--ripple-opacity, 0.16);
150
+ }
151
+ to {
152
+ opacity: 0;
153
+ }
154
+ }
@@ -63,7 +63,7 @@ export class RippleEffect {
63
63
  }
64
64
  render() {
65
65
  const theme = getIonTheme(this);
66
- return (h(Host, { key: 'f1e6f4a3fc8ae9761f8aba243f2866721b839398', role: "presentation", class: {
66
+ return (h(Host, { key: '8ae91c86a67ffd14458eb733a207f01a64d59307', role: "presentation", class: {
67
67
  [theme]: true,
68
68
  unbounded: this.unbounded,
69
69
  } }));
@@ -72,12 +72,16 @@ export class RippleEffect {
72
72
  static get encapsulation() { return "shadow"; }
73
73
  static get originalStyleUrls() {
74
74
  return {
75
- "$": ["ripple-effect.scss"]
75
+ "ios": ["ripple-effect.common.scss"],
76
+ "md": ["ripple-effect.common.scss"],
77
+ "ionic": ["ripple-effect.ionic.scss"]
76
78
  };
77
79
  }
78
80
  static get styleUrls() {
79
81
  return {
80
- "$": ["ripple-effect.css"]
82
+ "ios": ["ripple-effect.common.css"],
83
+ "md": ["ripple-effect.common.css"],
84
+ "ionic": ["ripple-effect.ionic.css"]
81
85
  };
82
86
  }
83
87
  static get properties() {
@@ -4,7 +4,7 @@
4
4
  import { Host, h } from "@stencil/core";
5
5
  import { createColorClasses } from "../../utils/theme";
6
6
  import { config } from "../../global/config";
7
- import { getIonTheme } from "../../global/ionic-global";
7
+ import { getIonTheme, getIonMode } from "../../global/ionic-global";
8
8
  import { SPINNERS } from "./spinner-configs";
9
9
  /**
10
10
  * @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
@@ -18,14 +18,13 @@ export class Spinner {
18
18
  this.paused = false;
19
19
  this.size = undefined;
20
20
  }
21
- // TODO(ROU-10920): Switch `theme` to `mode`.
22
21
  getName() {
23
22
  const spinnerName = this.name || config.get('spinner');
24
- const theme = getIonTheme(this);
23
+ const mode = getIonMode(this);
25
24
  if (spinnerName) {
26
25
  return spinnerName;
27
26
  }
28
- return theme === 'ios' ? 'lines' : 'circular';
27
+ return mode === 'ios' ? 'lines' : 'circular';
29
28
  }
30
29
  getSize() {
31
30
  const theme = getIonTheme(this);
@@ -58,7 +57,7 @@ export class Spinner {
58
57
  svgs.push(buildLine(spinner, duration, i, spinner.lines));
59
58
  }
60
59
  }
61
- return (h(Host, { key: '6cac09975f1088551e71b1c60033d3571438f374', class: createColorClasses(self.color, {
60
+ return (h(Host, { key: '49fd776ff3793a76b111c1f0e0fc0755d1d28d6c', class: createColorClasses(self.color, {
62
61
  [theme]: true,
63
62
  [`spinner-${spinnerName}`]: true,
64
63
  'spinner-paused': self.paused || config.getBoolean('_testing'),
@@ -0,0 +1,123 @@
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
+ * Size is only available in the Ionic theme
8
+ */
9
+ configs({ modes: ['ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
10
+ test.describe(title('textarea: size'), () => {
11
+ test.describe('textarea: size small', () => {
12
+ test('should not have visual regressions', async ({ page }) => {
13
+ await page.setContent(`
14
+ <ion-textarea
15
+ size="small"
16
+ label="Email"
17
+ value="hi@ionic.io"
18
+ ></ion-textarea>
19
+ `, config);
20
+ const textarea = page.locator('ion-textarea');
21
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-small`));
22
+ });
23
+ test('should render correctly with stacked label', async ({ page }) => {
24
+ await page.setContent(`
25
+ <ion-textarea
26
+ size="small"
27
+ label="Email"
28
+ label-placement="stacked"
29
+ value="hi@ionic.io"
30
+ ></ion-textarea>
31
+ `, config);
32
+ const textarea = page.locator('ion-textarea');
33
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-small-label-stacked`));
34
+ });
35
+ test('should not have visual regressions with fill outline', async ({ page }) => {
36
+ await page.setContent(`
37
+ <ion-textarea
38
+ size="small"
39
+ fill="outline"
40
+ label="Email"
41
+ label-placement="stacked"
42
+ value="hi@ionic.io"
43
+ ></ion-textarea>
44
+ `, config);
45
+ const textarea = page.locator('ion-textarea');
46
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-small-outline`));
47
+ });
48
+ });
49
+ test.describe('textarea: size medium', () => {
50
+ test('should not have visual regressions', async ({ page }) => {
51
+ await page.setContent(`
52
+ <ion-textarea
53
+ label="Email"
54
+ value="hi@ionic.io"
55
+ ></ion-textarea>
56
+ `, config);
57
+ const textarea = page.locator('ion-textarea');
58
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-medium`));
59
+ });
60
+ test('should render correctly with stacked label', async ({ page }) => {
61
+ await page.setContent(`
62
+ <ion-textarea
63
+ label="Email"
64
+ label-placement="stacked"
65
+ value="hi@ionic.io"
66
+ ></ion-textarea>
67
+ `, config);
68
+ const textarea = page.locator('ion-textarea');
69
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-medium-label-stacked`));
70
+ });
71
+ test('should not have visual regressions with fill outline', async ({ page }) => {
72
+ await page.setContent(`
73
+ <ion-textarea
74
+ fill="outline"
75
+ label="Email"
76
+ label-placement="stacked"
77
+ value="hi@ionic.io"
78
+ ></ion-textarea>
79
+ `, config);
80
+ const textarea = page.locator('ion-textarea');
81
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-medium-outline`));
82
+ });
83
+ });
84
+ test.describe('textarea: size large', () => {
85
+ test('should not have visual regressions', async ({ page }) => {
86
+ await page.setContent(`
87
+ <ion-textarea
88
+ size="large"
89
+ label="Email"
90
+ value="hi@ionic.io"
91
+ ></ion-textarea>
92
+ `, config);
93
+ const textarea = page.locator('ion-textarea');
94
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-large`));
95
+ });
96
+ test('should render correctly with stacked label', async ({ page }) => {
97
+ await page.setContent(`
98
+ <ion-textarea
99
+ size="large"
100
+ label="Email"
101
+ label-placement="stacked"
102
+ value="hi@ionic.io"
103
+ ></ion-textarea>
104
+ `, config);
105
+ const textarea = page.locator('ion-textarea');
106
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-large-label-stacked`));
107
+ });
108
+ test('should not have visual regressions with fill outline', async ({ page }) => {
109
+ await page.setContent(`
110
+ <ion-textarea
111
+ size="large"
112
+ fill="outline"
113
+ label="Email"
114
+ label-placement="stacked"
115
+ value="hi@ionic.io"
116
+ ></ion-textarea>
117
+ `, config);
118
+ const textarea = page.locator('ion-textarea');
119
+ await expect(textarea).toHaveScreenshot(screenshot(`textarea-size-large-outline`));
120
+ });
121
+ });
122
+ });
123
+ });