@ionic/core 8.2.3-dev.11723022900.1196a7bf → 8.2.3-dev.11724326037.1eacfaff
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.
- package/components/button.js +7 -6
- package/components/ion-card-content.js +5 -5
- package/components/ion-card-header.js +4 -4
- package/components/ion-card-subtitle.js +4 -4
- package/components/ion-card.js +3 -3
- package/components/ion-input-password-toggle.js +11 -7
- package/components/item.js +11 -4
- package/components/ripple-effect.js +15 -5
- package/components/spinner.js +4 -5
- package/dist/cjs/ion-button_2.cjs.entry.js +6 -5
- package/dist/cjs/ion-card_5.cjs.entry.js +16 -16
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +11 -7
- package/dist/cjs/ion-item_8.cjs.entry.js +11 -4
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +14 -4
- package/dist/cjs/ion-spinner.cjs.entry.js +3 -4
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/button/button.ionic.css +346 -211
- package/dist/collection/components/button/button.ios.css +87 -20
- package/dist/collection/components/button/button.js +4 -3
- package/dist/collection/components/button/button.md.css +87 -20
- package/dist/collection/components/button/test/basic/button.e2e.js +3 -3
- package/dist/collection/components/button/test/clear/button.e2e.js +1 -1
- package/dist/collection/components/button/test/outline/button.e2e.js +1 -1
- package/dist/collection/components/card/card.ionic.css +61 -10
- package/dist/collection/components/card/card.ios.css +37 -12
- package/dist/collection/components/card/card.md.css +37 -12
- package/dist/collection/components/card-content/card-content.ionic.css +92 -0
- package/dist/collection/components/card-content/card-content.ios.css +4 -1
- package/dist/collection/components/card-content/card-content.js +3 -3
- package/dist/collection/components/card-content/card-content.md.css +4 -1
- package/dist/collection/components/card-header/card-header.ionic.css +89 -0
- package/dist/collection/components/card-header/card-header.ios.css +15 -15
- package/dist/collection/components/card-header/card-header.js +4 -4
- package/dist/collection/components/card-header/card-header.md.css +15 -15
- package/dist/collection/components/card-subtitle/card-subtitle.ionic.css +148 -0
- package/dist/collection/components/card-subtitle/card-subtitle.js +4 -4
- package/dist/collection/components/card-title/card-title.ios.css +61 -0
- package/dist/collection/components/card-title/card-title.md.css +61 -0
- package/dist/collection/components/input-password-toggle/input-password-toggle.common.css +61 -0
- package/dist/collection/components/input-password-toggle/input-password-toggle.ionic.css +137 -0
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +9 -7
- package/dist/collection/components/input-password-toggle/test/basic/input-password-toggle.e2e.js +1 -1
- package/dist/collection/components/item/item.ionic.css +12 -0
- package/dist/collection/components/item/item.js +10 -3
- package/dist/collection/components/ripple-effect/ripple-effect.ionic.css +154 -0
- package/dist/collection/components/ripple-effect/ripple-effect.js +7 -3
- package/dist/collection/components/spinner/spinner.js +4 -5
- package/dist/docs.json +157 -1
- package/dist/esm/ion-button_2.entry.js +7 -6
- package/dist/esm/ion-card_5.entry.js +16 -16
- package/dist/esm/ion-input-password-toggle.entry.js +11 -7
- package/dist/esm/ion-item_8.entry.js +11 -4
- package/dist/esm/ion-ripple-effect.entry.js +14 -4
- package/dist/esm/ion-spinner.entry.js +4 -5
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-22952d7a.system.entry.js +4 -0
- package/dist/ionic/p-33dd8047.system.entry.js +4 -0
- package/dist/ionic/p-3d9c39bc.entry.js +4 -0
- package/dist/ionic/p-4f053633.system.entry.js +4 -0
- package/dist/ionic/p-7b590e46.system.js +1 -1
- package/dist/ionic/p-8b09c4cb.system.entry.js +4 -0
- package/dist/ionic/p-91b33f25.entry.js +4 -0
- package/dist/ionic/p-a0e155e1.system.entry.js +4 -0
- package/dist/ionic/p-a814eee1.entry.js +4 -0
- package/dist/ionic/p-c1bb715a.entry.js +4 -0
- package/dist/ionic/p-d3c9617d.system.entry.js +4 -0
- package/dist/ionic/p-d45fd591.entry.js +4 -0
- package/dist/ionic/p-f1aa5723.entry.js +4 -0
- package/dist/types/components/item/item.d.ts +5 -0
- package/hydrate/index.js +62 -41
- package/package.json +1 -1
- package/dist/collection/components/input-password-toggle/input-password-toggle.css +0 -0
- package/dist/ionic/p-128f0f15.system.entry.js +0 -4
- package/dist/ionic/p-1be0295f.entry.js +0 -4
- package/dist/ionic/p-41c9fb60.entry.js +0 -4
- package/dist/ionic/p-42452dc9.entry.js +0 -4
- package/dist/ionic/p-4d6c2031.system.entry.js +0 -4
- package/dist/ionic/p-4fdbf0ef.entry.js +0 -4
- package/dist/ionic/p-7459eeb7.system.entry.js +0 -4
- package/dist/ionic/p-8102551e.system.entry.js +0 -4
- package/dist/ionic/p-924deb6b.entry.js +0 -4
- package/dist/ionic/p-b1938594.entry.js +0 -4
- package/dist/ionic/p-bbefc52b.system.entry.js +0 -4
- package/dist/ionic/p-d774e194.system.entry.js +0 -4
- /package/dist/collection/components/ripple-effect/{ripple-effect.css → ripple-effect.common.css} +0 -0
|
@@ -1,3 +1,64 @@
|
|
|
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
|
+
*/
|
|
1
62
|
/**
|
|
2
63
|
* Convert a pixels given value into rem
|
|
3
64
|
*
|
|
@@ -103,7 +164,6 @@
|
|
|
103
164
|
display: inline-block;
|
|
104
165
|
width: auto;
|
|
105
166
|
color: var(--color);
|
|
106
|
-
font-family: var(--ion-font-family, inherit);
|
|
107
167
|
text-align: center;
|
|
108
168
|
text-decoration: none;
|
|
109
169
|
white-space: normal;
|
|
@@ -240,28 +300,9 @@
|
|
|
240
300
|
}
|
|
241
301
|
|
|
242
302
|
::slotted(ion-icon) {
|
|
243
|
-
font-size: 1.35em;
|
|
244
303
|
pointer-events: none;
|
|
245
304
|
}
|
|
246
305
|
|
|
247
|
-
::slotted(ion-icon[slot=start]) {
|
|
248
|
-
-webkit-margin-start: -0.3em;
|
|
249
|
-
margin-inline-start: -0.3em;
|
|
250
|
-
-webkit-margin-end: 0.3em;
|
|
251
|
-
margin-inline-end: 0.3em;
|
|
252
|
-
margin-top: 0;
|
|
253
|
-
margin-bottom: 0;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
::slotted(ion-icon[slot=end]) {
|
|
257
|
-
-webkit-margin-start: 0.3em;
|
|
258
|
-
margin-inline-start: 0.3em;
|
|
259
|
-
-webkit-margin-end: -0.2em;
|
|
260
|
-
margin-inline-end: -0.2em;
|
|
261
|
-
margin-top: 0;
|
|
262
|
-
margin-bottom: 0;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
306
|
ion-ripple-effect {
|
|
266
307
|
color: var(--ripple-color);
|
|
267
308
|
}
|
|
@@ -332,6 +373,32 @@ ion-ripple-effect {
|
|
|
332
373
|
color: var(--ion-toolbar-background, var(--color));
|
|
333
374
|
}
|
|
334
375
|
|
|
376
|
+
:host {
|
|
377
|
+
font-family: var(--ion-font-family, inherit);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
::slotted(ion-icon) {
|
|
381
|
+
font-size: 1.35em;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
::slotted(ion-icon[slot=start]) {
|
|
385
|
+
-webkit-margin-start: -0.3em;
|
|
386
|
+
margin-inline-start: -0.3em;
|
|
387
|
+
-webkit-margin-end: 0.3em;
|
|
388
|
+
margin-inline-end: 0.3em;
|
|
389
|
+
margin-top: 0;
|
|
390
|
+
margin-bottom: 0;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
::slotted(ion-icon[slot=end]) {
|
|
394
|
+
-webkit-margin-start: 0.3em;
|
|
395
|
+
margin-inline-start: 0.3em;
|
|
396
|
+
-webkit-margin-end: -0.2em;
|
|
397
|
+
margin-inline-end: -0.2em;
|
|
398
|
+
margin-top: 0;
|
|
399
|
+
margin-bottom: 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
335
402
|
/**
|
|
336
403
|
* Convert a pixels given value into rem
|
|
337
404
|
*
|
|
@@ -5,7 +5,7 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
import { inheritAriaAttributes, hasShadowDom } from "../../utils/helpers";
|
|
6
6
|
import { printIonWarning } from "../../utils/logging/index";
|
|
7
7
|
import { createColorClasses, hostContext, openURL } from "../../utils/theme";
|
|
8
|
-
import { getIonTheme } from "../../global/ionic-global";
|
|
8
|
+
import { getIonTheme, getIonMode } from "../../global/ionic-global";
|
|
9
9
|
/**
|
|
10
10
|
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
|
|
11
11
|
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
|
|
@@ -209,6 +209,7 @@ export class Button {
|
|
|
209
209
|
render() {
|
|
210
210
|
const { buttonType, type, disabled, rel, target, href, color, expand, hasIconOnly, strong, inheritedAttributes } = this;
|
|
211
211
|
const theme = getIonTheme(this);
|
|
212
|
+
const mode = getIonMode(this);
|
|
212
213
|
const size = this.getSize();
|
|
213
214
|
const shape = this.getShape();
|
|
214
215
|
const TagType = href === undefined ? 'button' : 'a';
|
|
@@ -238,7 +239,7 @@ export class Button {
|
|
|
238
239
|
{
|
|
239
240
|
type !== 'button' && this.renderHiddenButton();
|
|
240
241
|
}
|
|
241
|
-
return (h(Host, { key: '
|
|
242
|
+
return (h(Host, { key: 'ab53a2de1a5ed8d54fac1b6260e92d01a4b5fe4a', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses(color, {
|
|
242
243
|
[theme]: true,
|
|
243
244
|
[buttonType]: true,
|
|
244
245
|
[`${buttonType}-${expand}`]: expand !== undefined,
|
|
@@ -253,7 +254,7 @@ export class Button {
|
|
|
253
254
|
'button-disabled': disabled,
|
|
254
255
|
'ion-activatable': true,
|
|
255
256
|
'ion-focusable': true,
|
|
256
|
-
}) }, h(TagType, Object.assign({ key: '
|
|
257
|
+
}) }, h(TagType, Object.assign({ key: 'cdecf090ea518104bb093d62edcd108fa84727b6' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), h("span", { key: 'db73f177db1ddea7f202ef6f2c6b07d41f812f04', class: "button-inner" }, h("slot", { key: '8ec45f3a34de9494972ee1753750664ef51af5f6', name: "icon-only", onSlotchange: this.slotChanged }), h("slot", { key: '313ec292c9fcea510cedb8683050145f561492b2', name: "start" }), h("slot", { key: 'e4b977f187f4308dbdb883b676c65e65e46b16eb' }), h("slot", { key: '12a14e528c13c84648a3be528275eb84d19b7d61', name: "end" })), mode === 'md' && h("ion-ripple-effect", { key: 'a7d45433eb402f3edde9830867f65bbe824c0a62', type: this.rippleType }))));
|
|
257
258
|
}
|
|
258
259
|
static get is() { return "ion-button"; }
|
|
259
260
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,3 +1,64 @@
|
|
|
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
|
+
*/
|
|
1
62
|
/**
|
|
2
63
|
* Convert a pixels given value into rem
|
|
3
64
|
*
|
|
@@ -103,7 +164,6 @@
|
|
|
103
164
|
display: inline-block;
|
|
104
165
|
width: auto;
|
|
105
166
|
color: var(--color);
|
|
106
|
-
font-family: var(--ion-font-family, inherit);
|
|
107
167
|
text-align: center;
|
|
108
168
|
text-decoration: none;
|
|
109
169
|
white-space: normal;
|
|
@@ -240,28 +300,9 @@
|
|
|
240
300
|
}
|
|
241
301
|
|
|
242
302
|
::slotted(ion-icon) {
|
|
243
|
-
font-size: 1.35em;
|
|
244
303
|
pointer-events: none;
|
|
245
304
|
}
|
|
246
305
|
|
|
247
|
-
::slotted(ion-icon[slot=start]) {
|
|
248
|
-
-webkit-margin-start: -0.3em;
|
|
249
|
-
margin-inline-start: -0.3em;
|
|
250
|
-
-webkit-margin-end: 0.3em;
|
|
251
|
-
margin-inline-end: 0.3em;
|
|
252
|
-
margin-top: 0;
|
|
253
|
-
margin-bottom: 0;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
::slotted(ion-icon[slot=end]) {
|
|
257
|
-
-webkit-margin-start: 0.3em;
|
|
258
|
-
margin-inline-start: 0.3em;
|
|
259
|
-
-webkit-margin-end: -0.2em;
|
|
260
|
-
margin-inline-end: -0.2em;
|
|
261
|
-
margin-top: 0;
|
|
262
|
-
margin-bottom: 0;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
306
|
ion-ripple-effect {
|
|
266
307
|
color: var(--ripple-color);
|
|
267
308
|
}
|
|
@@ -332,6 +373,32 @@ ion-ripple-effect {
|
|
|
332
373
|
color: var(--ion-toolbar-background, var(--color));
|
|
333
374
|
}
|
|
334
375
|
|
|
376
|
+
:host {
|
|
377
|
+
font-family: var(--ion-font-family, inherit);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
::slotted(ion-icon) {
|
|
381
|
+
font-size: 1.35em;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
::slotted(ion-icon[slot=start]) {
|
|
385
|
+
-webkit-margin-start: -0.3em;
|
|
386
|
+
margin-inline-start: -0.3em;
|
|
387
|
+
-webkit-margin-end: 0.3em;
|
|
388
|
+
margin-inline-end: 0.3em;
|
|
389
|
+
margin-top: 0;
|
|
390
|
+
margin-bottom: 0;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
::slotted(ion-icon[slot=end]) {
|
|
394
|
+
-webkit-margin-start: 0.3em;
|
|
395
|
+
margin-inline-start: 0.3em;
|
|
396
|
+
-webkit-margin-end: -0.2em;
|
|
397
|
+
margin-inline-end: -0.2em;
|
|
398
|
+
margin-top: 0;
|
|
399
|
+
margin-bottom: 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
335
402
|
/**
|
|
336
403
|
* Convert a pixels given value into rem
|
|
337
404
|
*
|
|
@@ -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: ['ios', 'md', 'ionic-md', 'ionic-ios'] }).forEach(({ config, screenshot, title }) => {
|
|
7
7
|
test.describe(title('button: basic'), () => {
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.goto(`/src/components/button/test/basic`, config);
|
|
@@ -31,9 +31,9 @@ configs({ directions: ['ltr'], modes: ['md'] }).forEach(({ config, title }) => {
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
/**
|
|
34
|
-
* Ripple effect is only available in MD mode.
|
|
34
|
+
* Ripple effect is only available in MD and Ionic mode.
|
|
35
35
|
*/
|
|
36
|
-
configs({ modes: ['md'] }).forEach(({ config, screenshot, title }) => {
|
|
36
|
+
configs({ modes: ['md', 'ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
|
37
37
|
test.describe(title('button: ripple effect'), () => {
|
|
38
38
|
test('should not have visual regressions', async ({ page }) => {
|
|
39
39
|
await page.goto(`/src/components/button/test/basic?ionic:_testing=false`, config);
|
|
@@ -6,7 +6,7 @@ import { configs, test } from "../../../../utils/test/playwright/index";
|
|
|
6
6
|
/**
|
|
7
7
|
* Fill="clear" does not render differently based on the direction.
|
|
8
8
|
*/
|
|
9
|
-
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, config, screenshot }) => {
|
|
9
|
+
configs({ directions: ['ltr'], modes: ['ios', 'md', 'ionic-md', 'ionic-ios'] }).forEach(({ title, config, screenshot }) => {
|
|
10
10
|
test.describe(title('button: fill: clear'), () => {
|
|
11
11
|
test('should not have visual regressions', async ({ page }) => {
|
|
12
12
|
await page.goto(`/src/components/button/test/clear`, config);
|
|
@@ -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({ modes: ['ios', 'md', 'ionic-md'] }).forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ modes: ['ios', 'md', 'ionic-md', 'ionic-ios'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('button: outline'), () => {
|
|
8
8
|
test('should not have visual regressions', async ({ page }) => {
|
|
9
9
|
await page.goto(`/src/components/button/test/outline`, config);
|
|
@@ -63,24 +63,75 @@
|
|
|
63
63
|
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
64
64
|
* convert to a unit other than $baselineUnit.
|
|
65
65
|
*/
|
|
66
|
+
/**
|
|
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
|
+
* }
|
|
87
|
+
*/
|
|
66
88
|
:host {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
padding-bottom: var(--ionic-space-400, 16px);
|
|
89
|
+
/**
|
|
90
|
+
* @prop --background: Background of the card
|
|
91
|
+
* @prop --color: Color of the card
|
|
92
|
+
* @prop --border-radius: Border radius of the card
|
|
93
|
+
*/
|
|
94
|
+
--ion-safe-area-left: 0px;
|
|
95
|
+
--ion-safe-area-right: 0px;
|
|
75
96
|
border-radius: var(--border-radius);
|
|
97
|
+
-moz-osx-font-smoothing: grayscale;
|
|
98
|
+
-webkit-font-smoothing: antialiased;
|
|
76
99
|
display: block;
|
|
77
|
-
|
|
100
|
+
position: relative;
|
|
78
101
|
background: var(--background);
|
|
79
102
|
color: var(--color);
|
|
103
|
+
contain: content;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:host(.ion-color) {
|
|
108
|
+
background: current-color(base);
|
|
109
|
+
color: current-color(contrast);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
button,
|
|
113
|
+
a {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
user-select: none;
|
|
116
|
+
-webkit-user-drag: none;
|
|
80
117
|
}
|
|
81
118
|
|
|
82
|
-
|
|
119
|
+
ion-ripple-effect {
|
|
120
|
+
color: var(--ripple-color);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
:host {
|
|
124
|
+
--background: var(--ionic-color-base-white, #ffffff);
|
|
83
125
|
--border-radius: var(--ionic-border-radius-400, 16px);
|
|
126
|
+
--color: var(--ionic-color-neutral-1200, #242424);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
::slotted(img) {
|
|
130
|
+
display: block;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:host(.card-soft) {
|
|
134
|
+
--border-radius: var(--ionic-border-radius-200, 8px);
|
|
84
135
|
}
|
|
85
136
|
|
|
86
137
|
:host(.card-rectangular) {
|
|
@@ -59,6 +59,28 @@
|
|
|
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
|
+
*/
|
|
62
84
|
:host {
|
|
63
85
|
/**
|
|
64
86
|
* @prop --background: Background of the card
|
|
@@ -74,7 +96,6 @@
|
|
|
74
96
|
position: relative;
|
|
75
97
|
background: var(--background);
|
|
76
98
|
color: var(--color);
|
|
77
|
-
font-family: var(--ion-font-family, inherit);
|
|
78
99
|
contain: content;
|
|
79
100
|
overflow: hidden;
|
|
80
101
|
}
|
|
@@ -84,6 +105,21 @@
|
|
|
84
105
|
color: var(--ion-color-contrast);
|
|
85
106
|
}
|
|
86
107
|
|
|
108
|
+
button,
|
|
109
|
+
a {
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
user-select: none;
|
|
112
|
+
-webkit-user-drag: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ion-ripple-effect {
|
|
116
|
+
color: var(--ripple-color);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host {
|
|
120
|
+
font-family: var(--ion-font-family, inherit);
|
|
121
|
+
}
|
|
122
|
+
|
|
87
123
|
:host(.card-disabled) {
|
|
88
124
|
cursor: default;
|
|
89
125
|
opacity: 0.3;
|
|
@@ -126,17 +162,6 @@
|
|
|
126
162
|
border: 0;
|
|
127
163
|
}
|
|
128
164
|
|
|
129
|
-
button,
|
|
130
|
-
a {
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
user-select: none;
|
|
133
|
-
-webkit-user-drag: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
ion-ripple-effect {
|
|
137
|
-
color: var(--ripple-color);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
165
|
/**
|
|
141
166
|
* Convert a pixels given value into rem
|
|
142
167
|
*
|
|
@@ -59,6 +59,28 @@
|
|
|
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
|
+
*/
|
|
62
84
|
:host {
|
|
63
85
|
/**
|
|
64
86
|
* @prop --background: Background of the card
|
|
@@ -74,7 +96,6 @@
|
|
|
74
96
|
position: relative;
|
|
75
97
|
background: var(--background);
|
|
76
98
|
color: var(--color);
|
|
77
|
-
font-family: var(--ion-font-family, inherit);
|
|
78
99
|
contain: content;
|
|
79
100
|
overflow: hidden;
|
|
80
101
|
}
|
|
@@ -84,6 +105,21 @@
|
|
|
84
105
|
color: var(--ion-color-contrast);
|
|
85
106
|
}
|
|
86
107
|
|
|
108
|
+
button,
|
|
109
|
+
a {
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
user-select: none;
|
|
112
|
+
-webkit-user-drag: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ion-ripple-effect {
|
|
116
|
+
color: var(--ripple-color);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
:host {
|
|
120
|
+
font-family: var(--ion-font-family, inherit);
|
|
121
|
+
}
|
|
122
|
+
|
|
87
123
|
:host(.card-disabled) {
|
|
88
124
|
cursor: default;
|
|
89
125
|
opacity: 0.3;
|
|
@@ -126,17 +162,6 @@
|
|
|
126
162
|
border: 0;
|
|
127
163
|
}
|
|
128
164
|
|
|
129
|
-
button,
|
|
130
|
-
a {
|
|
131
|
-
cursor: pointer;
|
|
132
|
-
user-select: none;
|
|
133
|
-
-webkit-user-drag: none;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
ion-ripple-effect {
|
|
137
|
-
color: var(--ripple-color);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
165
|
/**
|
|
141
166
|
* Convert a pixels given value into rem
|
|
142
167
|
*
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
ion-card-content {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Convert a pixels given value into rem
|
|
7
|
+
*
|
|
8
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
9
|
+
* @param context (optional) - Baseline value
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* This is an auto-generated file, please do not change it directly.
|
|
13
|
+
* Ionic Design System
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* A heuristic that applies CSS to tablet
|
|
17
|
+
* viewports.
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* @include tablet-viewport() {
|
|
21
|
+
* :host {
|
|
22
|
+
* background-color: green;
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* A heuristic that applies CSS to mobile
|
|
28
|
+
* viewports (i.e. phones, not tablets).
|
|
29
|
+
*
|
|
30
|
+
* Usage:
|
|
31
|
+
* @include mobile-viewport() {
|
|
32
|
+
* :host {
|
|
33
|
+
* background-color: blue;
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Convert a font size to a dynamic font size.
|
|
39
|
+
* Fonts that participate in Dynamic Type should use
|
|
40
|
+
* dynamic font sizes.
|
|
41
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
42
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
43
|
+
* convert to a unit other than $baselineUnit.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Convert a font size to a dynamic font size but impose
|
|
47
|
+
* a maximum font size.
|
|
48
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
49
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
50
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
51
|
+
* convert to a unit other than $baselineUnit.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Convert a font size to a dynamic font size but impose
|
|
55
|
+
* a minimum font size.
|
|
56
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
57
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
58
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
59
|
+
* convert to a unit other than $baselineUnit.
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* Convert a font size to a dynamic font size but impose
|
|
63
|
+
* maximum and minimum font sizes.
|
|
64
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
65
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
66
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
67
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
68
|
+
* convert to a unit other than $baselineUnit.
|
|
69
|
+
*/
|
|
70
|
+
.card-content-ionic {
|
|
71
|
+
-webkit-padding-start: var(--ionic-space-400, 16px);
|
|
72
|
+
padding-inline-start: var(--ionic-space-400, 16px);
|
|
73
|
+
-webkit-padding-end: var(--ionic-space-400, 16px);
|
|
74
|
+
padding-inline-end: var(--ionic-space-400, 16px);
|
|
75
|
+
padding-top: var(--ionic-space-400, 16px);
|
|
76
|
+
padding-bottom: var(--ionic-space-400, 16px);
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
font-size: var(--ionic-font-size-350, 0.875rem);
|
|
80
|
+
line-height: var(--ionic-line-height-600, 24px);
|
|
81
|
+
gap: var(--ionic-space-200, 8px);
|
|
82
|
+
}
|
|
83
|
+
.card-content-ionic img {
|
|
84
|
+
margin-left: 0;
|
|
85
|
+
margin-right: 0;
|
|
86
|
+
margin-top: var(--ionic-space-200, 8px);
|
|
87
|
+
margin-bottom: var(--ionic-space-200, 8px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
ion-card-header + .card-content-ionic {
|
|
91
|
+
padding-top: 0;
|
|
92
|
+
}
|