@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
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a pixels given value into rem
|
|
3
|
+
*
|
|
4
|
+
* @param pixels - Value in pixels to be converted (i.e. px)
|
|
5
|
+
* @param context (optional) - Baseline value
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* This is an auto-generated file, please do not change it directly.
|
|
9
|
+
* Ionic Design System
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A heuristic that applies CSS to tablet
|
|
13
|
+
* viewports.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* @include tablet-viewport() {
|
|
17
|
+
* :host {
|
|
18
|
+
* background-color: green;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* A heuristic that applies CSS to mobile
|
|
24
|
+
* viewports (i.e. phones, not tablets).
|
|
25
|
+
*
|
|
26
|
+
* Usage:
|
|
27
|
+
* @include mobile-viewport() {
|
|
28
|
+
* :host {
|
|
29
|
+
* background-color: blue;
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Convert a font size to a dynamic font size.
|
|
35
|
+
* Fonts that participate in Dynamic Type should use
|
|
36
|
+
* dynamic font sizes.
|
|
37
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
38
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
39
|
+
* convert to a unit other than $baselineUnit.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Convert a font size to a dynamic font size but impose
|
|
43
|
+
* a maximum font size.
|
|
44
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
45
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
46
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
47
|
+
* convert to a unit other than $baselineUnit.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Convert a font size to a dynamic font size but impose
|
|
51
|
+
* a minimum font size.
|
|
52
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
53
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
54
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
55
|
+
* convert to a unit other than $baselineUnit.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Convert a font size to a dynamic font size but impose
|
|
59
|
+
* maximum and minimum font sizes.
|
|
60
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
61
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
62
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
63
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
64
|
+
* convert to a unit other than $baselineUnit.
|
|
65
|
+
*/
|
|
66
|
+
/**
|
|
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
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* Convert a font size to a dynamic font size.
|
|
74
|
+
* Fonts that participate in Dynamic Type should use
|
|
75
|
+
* dynamic font sizes.
|
|
76
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
77
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
78
|
+
* convert to a unit other than $baselineUnit.
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* Convert a font size to a dynamic font size but impose
|
|
82
|
+
* a maximum font size.
|
|
83
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
84
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
85
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
86
|
+
* convert to a unit other than $baselineUnit.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Convert a font size to a dynamic font size but impose
|
|
90
|
+
* a minimum font size.
|
|
91
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
92
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
93
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
94
|
+
* convert to a unit other than $baselineUnit.
|
|
95
|
+
*/
|
|
96
|
+
/**
|
|
97
|
+
* Convert a font size to a dynamic font size but impose
|
|
98
|
+
* maximum and minimum font sizes.
|
|
99
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
100
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
101
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
102
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
103
|
+
* convert to a unit other than $baselineUnit.
|
|
104
|
+
*/
|
|
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
|
+
:host ion-button.button-has-icon-only {
|
|
128
|
+
--padding-end: inherit;
|
|
129
|
+
--color: var(--ionic-color-neutral-500, #a2a2a2);
|
|
130
|
+
--margin-end: calc(-1 * var(--padding-end));
|
|
131
|
+
-webkit-margin-start: 0;
|
|
132
|
+
margin-inline-start: 0;
|
|
133
|
+
-webkit-margin-end: var(--margin-end);
|
|
134
|
+
margin-inline-end: var(--margin-end);
|
|
135
|
+
margin-top: 0;
|
|
136
|
+
margin-bottom: 0;
|
|
137
|
+
}
|
|
@@ -94,29 +94,31 @@ export class InputPasswordToggle {
|
|
|
94
94
|
const { color, inputPasswordHideIcon, inputPasswordShowIcon, type } = this;
|
|
95
95
|
const mode = getIonMode(this);
|
|
96
96
|
const isPasswordVisible = type === 'text';
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: '140bda3fc0a5a4dda16c9dfcf1254cc94c60206e', class: createColorClasses(color, {
|
|
98
98
|
[mode]: true,
|
|
99
|
-
}) }, h("ion-button", { key: '
|
|
99
|
+
}) }, h("ion-button", { key: 'ec84dcf19d488f9454eadc860e10be8f8a306f0b', mode: mode, color: color, fill: "clear", shape: "round", "aria-checked": isPasswordVisible ? 'true' : 'false', "aria-label": "show password", role: "switch", type: "button", onPointerDown: (ev) => {
|
|
100
100
|
/**
|
|
101
101
|
* This prevents mobile browsers from
|
|
102
102
|
* blurring the input when the password toggle
|
|
103
103
|
* button is activated.
|
|
104
104
|
*/
|
|
105
105
|
ev.preventDefault();
|
|
106
|
-
}, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '
|
|
106
|
+
}, onClick: this.togglePasswordVisibility }, h("ion-icon", { key: '40d2804ffafda8cb18c4f55af8cb6f7916c7c466', slot: "icon-only", "aria-hidden": "true", icon: isPasswordVisible ? inputPasswordHideIcon : inputPasswordShowIcon }))));
|
|
107
107
|
}
|
|
108
108
|
static get is() { return "ion-input-password-toggle"; }
|
|
109
109
|
static get encapsulation() { return "shadow"; }
|
|
110
110
|
static get originalStyleUrls() {
|
|
111
111
|
return {
|
|
112
|
-
"ios": ["input-password-toggle.scss"],
|
|
113
|
-
"md": ["input-password-toggle.scss"]
|
|
112
|
+
"ios": ["input-password-toggle.common.scss"],
|
|
113
|
+
"md": ["input-password-toggle.common.scss"],
|
|
114
|
+
"ionic": ["input-password-toggle.ionic.scss"]
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
117
|
static get styleUrls() {
|
|
117
118
|
return {
|
|
118
|
-
"ios": ["input-password-toggle.css"],
|
|
119
|
-
"md": ["input-password-toggle.css"]
|
|
119
|
+
"ios": ["input-password-toggle.common.css"],
|
|
120
|
+
"md": ["input-password-toggle.common.css"],
|
|
121
|
+
"ionic": ["input-password-toggle.ionic.css"]
|
|
120
122
|
};
|
|
121
123
|
}
|
|
122
124
|
static get properties() {
|
package/dist/collection/components/input-password-toggle/test/basic/input-password-toggle.e2e.js
CHANGED
|
@@ -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'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
6
|
+
configs({ modes: ['md', 'ios', 'ionic-md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
7
7
|
test.describe(title('input password toggle: states'), () => {
|
|
8
8
|
test('should be hidden when inside of a readonly input', async ({ page }) => {
|
|
9
9
|
await page.setContent(`
|
|
@@ -416,6 +416,9 @@ ion-ripple-effect {
|
|
|
416
416
|
--border-color: var(--ionic-color-neutral-300, #cfcfcf);
|
|
417
417
|
--border-style: var(--ionic-border-style-solid, solid);
|
|
418
418
|
--border-width: 0 0 var(--ionic-border-size-025, 1px) 0;
|
|
419
|
+
--detail-icon-color: var(--ionic-color-neutral-800, #626262);
|
|
420
|
+
--detail-icon-font-size: var(--ionic-scale-600, 24px);
|
|
421
|
+
--detail-icon-opacity: 1;
|
|
419
422
|
--min-height: var(--ionic-scale-1800, 72px);
|
|
420
423
|
--padding-top: var(--ionic-space-200, 8px);
|
|
421
424
|
--padding-end: var(--ionic-space-400, 16px);
|
|
@@ -428,6 +431,10 @@ ion-ripple-effect {
|
|
|
428
431
|
min-height: initial;
|
|
429
432
|
}
|
|
430
433
|
|
|
434
|
+
.item-detail-icon {
|
|
435
|
+
margin-inline-end: 0;
|
|
436
|
+
}
|
|
437
|
+
|
|
431
438
|
slot[name=start]::slotted(*) {
|
|
432
439
|
-webkit-margin-end: var(--ionic-space-400, 16px);
|
|
433
440
|
margin-inline-end: var(--ionic-space-400, 16px);
|
|
@@ -438,6 +445,11 @@ slot[name=end]::slotted(*) {
|
|
|
438
445
|
margin-inline-start: var(--ionic-space-400, 16px);
|
|
439
446
|
}
|
|
440
447
|
|
|
448
|
+
::slotted(ion-icon:not(.item-detail-icon)) {
|
|
449
|
+
color: var(--ionic-color-neutral-1000, #3b3b3b);
|
|
450
|
+
font-size: var(--ionic-scale-1000, 40px);
|
|
451
|
+
}
|
|
452
|
+
|
|
441
453
|
:host(.item-disabled) {
|
|
442
454
|
opacity: 0.6;
|
|
443
455
|
}
|
|
@@ -155,8 +155,15 @@ export class Item {
|
|
|
155
155
|
// Return the configured item detail icon or the default icon
|
|
156
156
|
return config.get('itemDetailIcon', defaultIcon);
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* The icon should be flipped when the app is RTL and
|
|
160
|
+
* the icon is a variation of chevron.
|
|
161
|
+
*/
|
|
162
|
+
get shouldFlipIcon() {
|
|
163
|
+
return this.itemDetailIcon === chevronForward || this.itemDetailIcon === caretRightRegular;
|
|
164
|
+
}
|
|
158
165
|
render() {
|
|
159
|
-
const { detail, download, labelColorStyles, lines, disabled, href, itemDetailIcon, rel, target, routerAnimation, routerDirection, inheritedAriaAttributes, multipleInputs, } = this;
|
|
166
|
+
const { detail, download, labelColorStyles, lines, disabled, href, itemDetailIcon, shouldFlipIcon, rel, target, routerAnimation, routerDirection, inheritedAriaAttributes, multipleInputs, } = this;
|
|
160
167
|
const childStyles = {};
|
|
161
168
|
const theme = getIonTheme(this);
|
|
162
169
|
const clickable = this.isClickable();
|
|
@@ -222,7 +229,7 @@ export class Item {
|
|
|
222
229
|
* However, other form controls such as checkboxes and radios do.
|
|
223
230
|
*/
|
|
224
231
|
const firstInteractiveNeedsPointerCursor = firstInteractive !== undefined && !['ION-INPUT', 'ION-TEXTAREA'].includes(firstInteractive.tagName);
|
|
225
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '52b074f43aeb2638edd202fefcace85393ef9236', "aria-disabled": ariaDisabled, class: Object.assign(Object.assign(Object.assign({}, childStyles), labelColorStyles), createColorClasses(this.color, {
|
|
226
233
|
item: true,
|
|
227
234
|
[theme]: true,
|
|
228
235
|
'item-lines-default': lines === undefined,
|
|
@@ -234,7 +241,7 @@ export class Item {
|
|
|
234
241
|
'ion-activatable': canActivate,
|
|
235
242
|
'ion-focusable': this.focusable,
|
|
236
243
|
'item-rtl': document.dir === 'rtl',
|
|
237
|
-
})), role: inList ? 'listitem' : null }, h(TagType, Object.assign({ key: '
|
|
244
|
+
})), role: inList ? 'listitem' : null }, h(TagType, Object.assign({ key: '6e2b795279107f00dd4cb69b613a0a1b11c6ef58' }, attrs, inheritedAriaAttributes, { class: "item-native", part: "native", disabled: disabled }, clickFn), h("slot", { key: '91ac9ed7a36349c145e2a1b406bdc6a1f4995d2c', name: "start" }), h("div", { key: '5a11561024c18e69ef50e7bd30ceb4b169f799bb', class: "item-inner" }, h("div", { key: 'd670580211c19ab39ee85d74242d899ffe77407a', class: "input-wrapper" }, h("slot", { key: 'c2eaf2eb884b85f971d387f21eadda17f1dacc2b' })), h("slot", { key: 'cbf98a93c4e009a0e7ebb9b8f83a99b148da4e6f', name: "end" }), showDetail && (h("ion-icon", { key: 'b8f1ff2d0f79515eec726bd1c67dbab2e70e0b9f', icon: itemDetailIcon, lazy: false, class: "item-detail-icon", part: "detail-icon", "aria-hidden": "true", "flip-rtl": shouldFlipIcon }))), canActivate && theme === 'md' && h("ion-ripple-effect", { key: 'e094623c360e6ae89b01f3aa940ada51a9d16349' }))));
|
|
238
245
|
}
|
|
239
246
|
static get is() { return "ion-item"; }
|
|
240
247
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
|
23
|
+
const mode = getIonMode(this);
|
|
25
24
|
if (spinnerName) {
|
|
26
25
|
return spinnerName;
|
|
27
26
|
}
|
|
28
|
-
return
|
|
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: '
|
|
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'),
|