@ionic/core 8.8.4-dev.11776186452.1cc0af05 → 8.8.4-dev.11776246162.138c2737
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/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-option.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-skeleton-text.js +1 -1
- package/components/ion-spinner.js +1 -1
- package/components/ion-split-pane.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-tab-button.js +1 -1
- package/components/ion-tab.js +1 -1
- package/components/ion-tabs.js +1 -1
- package/components/ion-text.js +1 -1
- package/components/ion-textarea.js +1 -1
- package/components/ion-thumbnail.js +1 -1
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/ion-toggle.js +1 -1
- package/components/ion-toolbar.js +1 -1
- package/components/p-B36-MWK0.js +4 -0
- package/components/p-BDPU2685.js +4 -0
- package/components/p-BrNzoF1U.js +4 -0
- package/components/{p-B0orUoaV.js → p-C-_EGKki.js} +1 -1
- package/components/{p-qhBzWoOF.js → p-C2cZvGcF.js} +1 -1
- package/components/p-CEUppJkx.js +4 -0
- package/components/p-CSexRbnt.js +4 -0
- package/components/{p-ZRp3l6Dk.js → p-CoarhFWH.js} +1 -1
- package/components/p-DNdBtsfu.js +4 -0
- package/components/p-Njik5v4C.js +4 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +34 -25
- package/dist/cjs/ion-alert.cjs.entry.js +51 -44
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +28 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +29 -4
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +176 -79
- package/dist/cjs/ion-popover.cjs.entry.js +90 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +27 -60
- package/dist/cjs/ion-select_3.cjs.entry.js +48 -191
- package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ion-toast.cjs.entry.js +32 -4
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-BbhewSIQ.js} +4 -4
- package/dist/collection/components/action-sheet/action-sheet.ios.css +0 -84
- package/dist/collection/components/action-sheet/action-sheet.js +8 -22
- package/dist/collection/components/action-sheet/action-sheet.md.css +0 -84
- package/dist/collection/components/action-sheet/animations/ionic.enter.js +27 -0
- package/dist/collection/components/action-sheet/animations/ionic.leave.js +21 -0
- package/dist/collection/components/alert/alert.ios.css +0 -83
- package/dist/collection/components/alert/alert.js +24 -41
- package/dist/collection/components/alert/alert.md.css +0 -83
- package/dist/collection/components/alert/animations/ionic.enter.js +28 -0
- package/dist/collection/components/alert/animations/ionic.leave.js +19 -0
- package/dist/collection/components/loading/animations/ionic.enter.js +28 -0
- package/dist/collection/components/loading/animations/ionic.leave.js +22 -0
- package/dist/collection/components/loading/loading.js +4 -3
- package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
- package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
- package/dist/collection/components/modal/gestures/sheet.js +71 -9
- package/dist/collection/components/modal/modal.ionic.css +1 -1
- package/dist/collection/components/modal/modal.js +6 -5
- package/dist/collection/components/picker-legacy/animations/ionic.enter.js +27 -0
- package/dist/collection/components/picker-legacy/animations/ionic.leave.js +23 -0
- package/dist/collection/components/picker-legacy/picker.js +4 -3
- package/dist/collection/components/popover/animations/ionic.enter.js +91 -0
- package/dist/collection/components/popover/animations/ionic.leave.js +29 -0
- package/dist/collection/components/popover/popover.js +4 -3
- package/dist/collection/components/select/select.ionic.css +0 -31
- package/dist/collection/components/select/select.ios.css +0 -31
- package/dist/collection/components/select/select.js +14 -125
- package/dist/collection/components/select/select.md.css +0 -31
- package/dist/collection/components/select-modal/select-modal.ionic.css +0 -24
- package/dist/collection/components/select-modal/select-modal.ios.css +0 -77
- package/dist/collection/components/select-modal/select-modal.js +23 -56
- package/dist/collection/components/select-modal/select-modal.md.css +1 -80
- package/dist/collection/components/select-option/select-option.js +2 -21
- package/dist/collection/components/select-popover/select-popover.ios.css +0 -77
- package/dist/collection/components/select-popover/select-popover.js +26 -59
- package/dist/collection/components/select-popover/select-popover.md.css +0 -77
- package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
- package/dist/collection/components/spinner/spinner.js +1 -1
- package/dist/collection/components/split-pane/split-pane.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-bar/tab-bar.js +2 -2
- package/dist/collection/components/tab-button/tab-button.js +2 -2
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text/text.js +2 -2
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/title/title.js +2 -2
- package/dist/collection/components/toast/animations/ionic.enter.js +33 -0
- package/dist/collection/components/toast/animations/ionic.leave.js +16 -0
- package/dist/collection/components/toast/toast.js +4 -3
- package/dist/collection/components/toggle/toggle.js +3 -3
- package/dist/collection/components/toolbar/toolbar.js +2 -2
- package/dist/collection/utils/overlays.js +5 -5
- package/dist/docs.json +1 -135
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +34 -25
- package/dist/esm/ion-alert.entry.js +51 -44
- package/dist/esm/ion-app_8.entry.js +4 -4
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +28 -4
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +29 -4
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +177 -80
- package/dist/esm/ion-popover.entry.js +90 -4
- package/dist/esm/ion-select-modal.entry.js +27 -60
- package/dist/esm/ion-select_3.entry.js +49 -192
- package/dist/esm/ion-spinner.entry.js +1 -1
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ion-tab_2.entry.js +3 -3
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +3 -3
- package/dist/esm/ion-toast.entry.js +32 -4
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-CvFHfO3y.js → overlays-VA-4NWjf.js} +5 -5
- package/dist/html.html-data.json +0 -4
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-07b129d5.entry.js +4 -0
- package/dist/ionic/p-0cb50208.entry.js +4 -0
- package/dist/ionic/{p-db4f4eaf.entry.js → p-1efe83c8.entry.js} +1 -1
- package/dist/ionic/{p-d2fe6791.entry.js → p-2193e875.entry.js} +1 -1
- package/dist/ionic/{p-69033ad6.entry.js → p-2bf931ae.entry.js} +1 -1
- package/dist/ionic/{p-26595044.entry.js → p-3bf01c2c.entry.js} +1 -1
- package/dist/ionic/p-3d4c8528.entry.js +4 -0
- package/dist/ionic/{p-9e71982e.entry.js → p-49799a34.entry.js} +1 -1
- package/dist/ionic/p-64341e32.entry.js +4 -0
- package/dist/ionic/p-6992d9d6.entry.js +4 -0
- package/dist/ionic/{p-aa8c1e64.entry.js → p-6c8c37c2.entry.js} +1 -1
- package/dist/ionic/{p-a94016be.entry.js → p-91e242e4.entry.js} +1 -1
- package/dist/ionic/{p-96ec9a10.entry.js → p-9b9b1450.entry.js} +1 -1
- package/dist/ionic/p-9dd4276b.entry.js +4 -0
- package/dist/ionic/p-BExfzy0B.js +4 -0
- package/dist/ionic/p-a3d794ba.entry.js +4 -0
- package/dist/ionic/p-ba9f8cbb.entry.js +4 -0
- package/dist/ionic/{p-2095969c.entry.js → p-bae3ebe5.entry.js} +1 -1
- package/dist/ionic/{p-a1c8ba8c.entry.js → p-bc5713f7.entry.js} +1 -1
- package/dist/ionic/{p-71f28573.entry.js → p-cdfbe4cc.entry.js} +1 -1
- package/dist/ionic/p-fa701753.entry.js +4 -0
- package/dist/types/components/action-sheet/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/action-sheet/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/alert/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/alert/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/loading/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/picker-legacy/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/picker-legacy/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.enter.d.ts +5 -0
- package/dist/types/components/popover/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components/select/select-interface.d.ts +0 -21
- package/dist/types/components/select/select.d.ts +0 -7
- package/dist/types/components/select-option/select-option.d.ts +0 -4
- package/dist/types/components/toast/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/toast/animations/ionic.leave.d.ts +5 -0
- package/dist/types/components.d.ts +0 -9
- package/dist/types/utils/overlays.d.ts +1 -1
- package/hydrate/index.js +534 -489
- package/hydrate/index.mjs +534 -489
- package/package.json +1 -1
- package/components/p-B6czg-mf.js +0 -4
- package/components/p-BObmvbuR.js +0 -4
- package/components/p-C8Dne7pI.js +0 -4
- package/components/p-Cm7hjN9B.js +0 -4
- package/components/p-DQY5lHUa.js +0 -4
- package/components/p-D_uMZULz.js +0 -4
- package/components/p-GytrfCp8.js +0 -4
- package/components/p-ZeIAjDcZ.js +0 -4
- package/dist/cjs/select-option-render-qQf4xz8P.js +0 -67
- package/dist/collection/components/action-sheet/action-sheet.ionic.css +0 -834
- package/dist/collection/components/alert/alert.ionic.css +0 -1165
- package/dist/collection/components/select-popover/select-popover.ionic.css +0 -489
- package/dist/collection/utils/select-option-render.js +0 -62
- package/dist/esm/select-option-render-BQUT9Aqa.js +0 -65
- package/dist/ionic/p-003b40fc.entry.js +0 -4
- package/dist/ionic/p-35aa95dc.entry.js +0 -4
- package/dist/ionic/p-37f895a8.entry.js +0 -4
- package/dist/ionic/p-3884bfa4.entry.js +0 -4
- package/dist/ionic/p-38897781.entry.js +0 -4
- package/dist/ionic/p-575061c0.entry.js +0 -4
- package/dist/ionic/p-6bffc700.entry.js +0 -4
- package/dist/ionic/p-BYtS2rae.js +0 -4
- package/dist/ionic/p-Dr3N4o63.js +0 -4
- package/dist/ionic/p-c3335fe0.entry.js +0 -4
- package/dist/ionic/p-ef0c281a.entry.js +0 -4
- package/dist/types/utils/select-option-render.d.ts +0 -26
|
@@ -17,9 +17,9 @@ export class SelectOption {
|
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
const theme = getIonTheme(this);
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '39af595655b3645c923617fe4d4fa64112008273', class: {
|
|
21
21
|
[theme]: true,
|
|
22
|
-
}, role: "option", id: this.inputId }
|
|
22
|
+
}, role: "option", id: this.inputId }));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "ion-select-option"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -73,25 +73,6 @@ export class SelectOption {
|
|
|
73
73
|
"setter": false,
|
|
74
74
|
"reflect": false,
|
|
75
75
|
"attribute": "value"
|
|
76
|
-
},
|
|
77
|
-
"description": {
|
|
78
|
-
"type": "string",
|
|
79
|
-
"mutable": false,
|
|
80
|
-
"complexType": {
|
|
81
|
-
"original": "string",
|
|
82
|
-
"resolved": "string | undefined",
|
|
83
|
-
"references": {}
|
|
84
|
-
},
|
|
85
|
-
"required": false,
|
|
86
|
-
"optional": true,
|
|
87
|
-
"docs": {
|
|
88
|
-
"tags": [],
|
|
89
|
-
"text": "Text that is placed underneath the option text to provide additional details about the option."
|
|
90
|
-
},
|
|
91
|
-
"getter": false,
|
|
92
|
-
"setter": false,
|
|
93
|
-
"reflect": false,
|
|
94
|
-
"attribute": "description"
|
|
95
76
|
}
|
|
96
77
|
};
|
|
97
78
|
}
|
|
@@ -1,58 +1,3 @@
|
|
|
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
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size.
|
|
25
|
-
* Fonts that participate in Dynamic Type should use
|
|
26
|
-
* dynamic font sizes.
|
|
27
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
28
|
-
* @param unit (optional) - The unit to convert 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
|
-
* a maximum font size.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
36
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
37
|
-
* convert to a unit other than $baselineUnit.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Convert a font size to a dynamic font size but impose
|
|
41
|
-
* a minimum font size.
|
|
42
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
43
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
44
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
45
|
-
* convert to a unit other than $baselineUnit.
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* Convert a font size to a dynamic font size but impose
|
|
49
|
-
* maximum and minimum font sizes.
|
|
50
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
51
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
52
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
53
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
54
|
-
* convert to a unit other than $baselineUnit.
|
|
55
|
-
*/
|
|
56
1
|
/**
|
|
57
2
|
* Convert a pixels given value into rem
|
|
58
3
|
*
|
|
@@ -139,28 +84,6 @@ ion-label {
|
|
|
139
84
|
overflow-y: auto;
|
|
140
85
|
}
|
|
141
86
|
|
|
142
|
-
.select-option-label {
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.select-option-description {
|
|
148
|
-
display: block;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.select-option-label {
|
|
152
|
-
gap: 12px;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.select-option-description {
|
|
156
|
-
padding-left: 0;
|
|
157
|
-
padding-right: 0;
|
|
158
|
-
padding-top: 5px;
|
|
159
|
-
padding-bottom: 0;
|
|
160
|
-
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
161
|
-
font-size: 0.75rem;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
87
|
/**
|
|
165
88
|
* Convert a pixels given value into rem
|
|
166
89
|
*
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import { safeCall } from "../../utils/overlays";
|
|
6
|
-
import { renderOptionLabel } from "../../utils/select-option-render";
|
|
7
6
|
import { getClassMap } from "../../utils/theme";
|
|
8
7
|
import { getIonTheme } from "../../global/ionic-global";
|
|
9
8
|
/**
|
|
@@ -76,71 +75,39 @@ export class SelectPopover {
|
|
|
76
75
|
}
|
|
77
76
|
}
|
|
78
77
|
renderCheckboxOptions(options) {
|
|
79
|
-
return options.map((option
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
id: `popover-option-${index}`,
|
|
89
|
-
label: richOption.text,
|
|
90
|
-
startContent: richOption.startContent,
|
|
91
|
-
endContent: richOption.endContent,
|
|
92
|
-
description: richOption.description,
|
|
93
|
-
};
|
|
94
|
-
return (h("ion-item", { class: Object.assign({
|
|
95
|
-
// TODO FW-4784
|
|
96
|
-
'item-checkbox-checked': option.checked
|
|
97
|
-
}, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
98
|
-
this.setChecked(ev);
|
|
99
|
-
this.callOptionHandler(ev);
|
|
100
|
-
// TODO FW-4784
|
|
101
|
-
forceUpdate(this);
|
|
102
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
103
|
-
});
|
|
78
|
+
return options.map((option) => (h("ion-item", { class: Object.assign({
|
|
79
|
+
// TODO FW-4784
|
|
80
|
+
'item-checkbox-checked': option.checked
|
|
81
|
+
}, getClassMap(option.cssClass)) }, h("ion-checkbox", { value: option.value, disabled: option.disabled, checked: option.checked, justify: "start", labelPlacement: "end", onIonChange: (ev) => {
|
|
82
|
+
this.setChecked(ev);
|
|
83
|
+
this.callOptionHandler(ev);
|
|
84
|
+
// TODO FW-4784
|
|
85
|
+
forceUpdate(this);
|
|
86
|
+
} }, option.text))));
|
|
104
87
|
}
|
|
105
88
|
renderRadioOptions(options) {
|
|
106
89
|
const checked = options.filter((o) => o.checked).map((o) => o.value)[0];
|
|
107
|
-
return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
description: richOption.description,
|
|
121
|
-
};
|
|
122
|
-
return (h("ion-item", { class: Object.assign({
|
|
123
|
-
// TODO FW-4784
|
|
124
|
-
'item-radio-checked': option.value === checked
|
|
125
|
-
}, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, onClick: () => this.dismissParentPopover(), onKeyUp: (ev) => {
|
|
126
|
-
if (ev.key === ' ') {
|
|
127
|
-
/**
|
|
128
|
-
* Selecting a radio option with keyboard navigation,
|
|
129
|
-
* either through the Enter or Space keys, should
|
|
130
|
-
* dismiss the popover.
|
|
131
|
-
*/
|
|
132
|
-
this.dismissParentPopover();
|
|
133
|
-
}
|
|
134
|
-
} }, renderOptionLabel(optionLabelOptions, 'select-option-label'))));
|
|
135
|
-
})));
|
|
90
|
+
return (h("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option) => (h("ion-item", { class: Object.assign({
|
|
91
|
+
// TODO FW-4784
|
|
92
|
+
'item-radio-checked': option.value === checked
|
|
93
|
+
}, getClassMap(option.cssClass)) }, h("ion-radio", { value: option.value, disabled: option.disabled, onClick: () => this.dismissParentPopover(), onKeyUp: (ev) => {
|
|
94
|
+
if (ev.key === ' ') {
|
|
95
|
+
/**
|
|
96
|
+
* Selecting a radio option with keyboard navigation,
|
|
97
|
+
* either through the Enter or Space keys, should
|
|
98
|
+
* dismiss the popover.
|
|
99
|
+
*/
|
|
100
|
+
this.dismissParentPopover();
|
|
101
|
+
}
|
|
102
|
+
} }, option.text))))));
|
|
136
103
|
}
|
|
137
104
|
render() {
|
|
138
105
|
const { header, message, options, subHeader } = this;
|
|
139
106
|
const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
|
|
140
107
|
const theme = getIonTheme(this);
|
|
141
|
-
return (h(Host, { key: '
|
|
108
|
+
return (h(Host, { key: '9b5160e6657620038fb4167ab7d08e2687be554b', class: {
|
|
142
109
|
[theme]: true,
|
|
143
|
-
} }, h("ion-list", { key: '
|
|
110
|
+
} }, h("ion-list", { key: '5f015bcc53bf96de3da98f05a73c6e1e7bc3250c' }, header !== undefined && h("ion-list-header", { key: 'e7275a4b3b0b8706b6a89ed9fd4bf1bb6cf274a8' }, header), hasSubHeaderOrMessage && (h("ion-item", { key: 'ca5750144abaf01d613f7ff4923939e6d6f4c0c8' }, h("ion-label", { key: '299735684f529e05f08405b6587dec23fb8d2851', class: "ion-text-wrap" }, subHeader !== undefined && h("h3", { key: 'af85ac2c17050eca4902811a886e7001b92701fe' }, subHeader), message !== undefined && h("p", { key: 'f64006af8f2ffaf41d6d21701efa2d40580796e0' }, message)))), this.renderOptions(options))));
|
|
144
111
|
}
|
|
145
112
|
static get is() { return "ion-select-popover"; }
|
|
146
113
|
static get encapsulation() { return "scoped"; }
|
|
@@ -148,14 +115,14 @@ export class SelectPopover {
|
|
|
148
115
|
return {
|
|
149
116
|
"ios": ["select-popover.ios.scss"],
|
|
150
117
|
"md": ["select-popover.md.scss"],
|
|
151
|
-
"ionic": ["select-popover.
|
|
118
|
+
"ionic": ["select-popover.md.scss"]
|
|
152
119
|
};
|
|
153
120
|
}
|
|
154
121
|
static get styleUrls() {
|
|
155
122
|
return {
|
|
156
123
|
"ios": ["select-popover.ios.css"],
|
|
157
124
|
"md": ["select-popover.md.css"],
|
|
158
|
-
"ionic": ["select-popover.
|
|
125
|
+
"ionic": ["select-popover.md.css"]
|
|
159
126
|
};
|
|
160
127
|
}
|
|
161
128
|
static get properties() {
|
|
@@ -1,58 +1,3 @@
|
|
|
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
|
-
/**
|
|
24
|
-
* Convert a font size to a dynamic font size.
|
|
25
|
-
* Fonts that participate in Dynamic Type should use
|
|
26
|
-
* dynamic font sizes.
|
|
27
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
28
|
-
* @param unit (optional) - The unit to convert 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
|
-
* a maximum font size.
|
|
34
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
35
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
36
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
37
|
-
* convert to a unit other than $baselineUnit.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Convert a font size to a dynamic font size but impose
|
|
41
|
-
* a minimum font size.
|
|
42
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
43
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
44
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
45
|
-
* convert to a unit other than $baselineUnit.
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* Convert a font size to a dynamic font size but impose
|
|
49
|
-
* maximum and minimum font sizes.
|
|
50
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
51
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
52
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
53
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
54
|
-
* convert to a unit other than $baselineUnit.
|
|
55
|
-
*/
|
|
56
1
|
/**
|
|
57
2
|
* Convert a pixels given value into rem
|
|
58
3
|
*
|
|
@@ -139,28 +84,6 @@ ion-label {
|
|
|
139
84
|
overflow-y: auto;
|
|
140
85
|
}
|
|
141
86
|
|
|
142
|
-
.select-option-label {
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.select-option-description {
|
|
148
|
-
display: block;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.select-option-label {
|
|
152
|
-
gap: 12px;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.select-option-description {
|
|
156
|
-
padding-left: 0;
|
|
157
|
-
padding-right: 0;
|
|
158
|
-
padding-top: 5px;
|
|
159
|
-
padding-bottom: 0;
|
|
160
|
-
color: var(--ion-color-step-700, var(--ion-text-color-step-300, #4d4d4d));
|
|
161
|
-
font-size: 0.75rem;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
87
|
/**
|
|
165
88
|
* Convert a pixels given value into rem
|
|
166
89
|
*
|
|
@@ -32,11 +32,11 @@ export class SkeletonText {
|
|
|
32
32
|
const animated = this.animated && config.getBoolean('animated', true);
|
|
33
33
|
const inMedia = hostContext('ion-avatar', this.el) || hostContext('ion-thumbnail', this.el);
|
|
34
34
|
const theme = getIonTheme(this);
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '5014563646b6c5213750d503babce3013b66ec96', class: {
|
|
36
36
|
[theme]: true,
|
|
37
37
|
'skeleton-text-animated': animated,
|
|
38
38
|
'in-media': inMedia,
|
|
39
|
-
} }, h("span", { key: '
|
|
39
|
+
} }, h("span", { key: '4b816883b1c71bb1db66d8b2b084559f7cb489bd' }, "\u00A0")));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "ion-skeleton-text"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,7 +56,7 @@ export class Spinner {
|
|
|
56
56
|
svgs.push(buildLine(spinner, duration, i, spinner.lines));
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '0b3ce4b99c2c828d05b507c4f073811ebbe17d0f', class: createColorClasses(self.color, {
|
|
60
60
|
[theme]: true,
|
|
61
61
|
[`spinner-${spinnerName}`]: true,
|
|
62
62
|
'spinner-paused': self.paused || config.getBoolean('_testing'),
|
|
@@ -130,12 +130,12 @@ export class SplitPane {
|
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
132
|
const theme = getIonTheme(this);
|
|
133
|
-
return (h(Host, { key: '
|
|
133
|
+
return (h(Host, { key: '9d0c67f1f81b09bb9a6f14a66053e5cc7431a286', class: {
|
|
134
134
|
[theme]: true,
|
|
135
135
|
// Used internally for styling
|
|
136
136
|
[`split-pane-${theme}`]: true,
|
|
137
137
|
'split-pane-visible': this.visible,
|
|
138
|
-
} }, h("slot", { key: '
|
|
138
|
+
} }, h("slot", { key: 'ab7b3050d3c5484bd00949cf57efa4396b4d5bc3' })));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "ion-split-pane"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,10 +51,10 @@ export class Tab {
|
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
53
|
const { tab, active, component } = this;
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: 'b249545a5adfcef4616afe79aa0f215bab464d0a', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
55
55
|
'ion-page': component === undefined,
|
|
56
56
|
'tab-hidden': !active,
|
|
57
|
-
} }, h("slot", { key: '
|
|
57
|
+
} }, h("slot", { key: '19e2a406d96d20d8d4af8c3ff900e975d06021f6' })));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "ion-tab"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|
|
@@ -111,13 +111,13 @@ export class TabBar {
|
|
|
111
111
|
const theme = getIonTheme(this);
|
|
112
112
|
const shape = this.getShape();
|
|
113
113
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
114
|
-
return (h(Host, { key: '
|
|
114
|
+
return (h(Host, { key: 'e6466b90b72ed2e62c8c20fee2bc0b262ca4ccae', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses(color, {
|
|
115
115
|
[theme]: true,
|
|
116
116
|
'tab-bar-translucent': translucent,
|
|
117
117
|
'tab-bar-hidden': shouldHide,
|
|
118
118
|
[`tab-bar-${expand}`]: true,
|
|
119
119
|
[`tab-bar-${shape}`]: shape !== undefined,
|
|
120
|
-
}) }, h("slot", { key: '
|
|
120
|
+
}) }, h("slot", { key: '6801f9523822178692d9091b0132f1b1dd41892d' })));
|
|
121
121
|
}
|
|
122
122
|
static get is() { return "ion-tab-bar"; }
|
|
123
123
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,7 +93,7 @@ export class TabButton {
|
|
|
93
93
|
rel,
|
|
94
94
|
target,
|
|
95
95
|
};
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '5a32785eaf0570cdc3444d52ce8bba8174c3e0b9', onClick: this.onClick, onKeyup: this.onKeyUp, id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
97
97
|
[theme]: true,
|
|
98
98
|
'tab-selected': selected,
|
|
99
99
|
'tab-disabled': disabled,
|
|
@@ -106,7 +106,7 @@ export class TabButton {
|
|
|
106
106
|
'ion-selectable': true,
|
|
107
107
|
[`tab-button-shape-${shape}`]: shape !== undefined,
|
|
108
108
|
'ion-focusable': true,
|
|
109
|
-
} }, h("a", Object.assign({ key: '
|
|
109
|
+
} }, h("a", Object.assign({ key: '1441f409b4a60823a57f27b90f6840b557b7d65a' }, attrs, { class: "button-native", part: "native", role: "tab", "aria-selected": selected ? 'true' : null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? '-1' : undefined }, inheritedAttributes), h("span", { key: '1566ca0af66b6e51068aca221a89133d2af061ed', class: "button-inner" }, h("slot", { key: '757878091cfe3768107eb0a53b8d1c895ce43399' })), theme === 'md' && h("ion-ripple-effect", { key: '28dde3e7127bdc9d5e1477b47458a5a4ab71328e', type: "unbounded" }))));
|
|
110
110
|
}
|
|
111
111
|
static get is() { return "ion-tab-button"; }
|
|
112
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -165,7 +165,7 @@ export class Tabs {
|
|
|
165
165
|
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
166
166
|
}
|
|
167
167
|
render() {
|
|
168
|
-
return (h(Host, { key: '
|
|
168
|
+
return (h(Host, { key: '9c05f69a72ab24897f1febab0928783d08224734', onIonTabButtonClick: this.onTabClicked }, h("slot", { key: '56407c9562bfd095e0259e430879151b824287fd', name: "top" }), h("div", { key: '6a86ceff372b8a60342040d9361ad31bf05e80ec', class: "tabs-inner" }, h("slot", { key: 'a554d3e835236a87686a0a53bd16d3124e77c0c5' })), h("slot", { key: 'd241d4cfba26a7ce3a3f93703dae18b8857bd9ee', name: "bottom" })));
|
|
169
169
|
}
|
|
170
170
|
static get is() { return "ion-tabs"; }
|
|
171
171
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,9 +11,9 @@ import { getIonTheme } from "../../global/ionic-global";
|
|
|
11
11
|
export class Text {
|
|
12
12
|
render() {
|
|
13
13
|
const theme = getIonTheme(this);
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '7a3f31d6e219207a1ff98ac441357caa512012e5', class: createColorClasses(this.color, {
|
|
15
15
|
[theme]: true,
|
|
16
|
-
}) }, h("slot", { key: '
|
|
16
|
+
}) }, h("slot", { key: '392d48d6a5e0e5d1b44e762ec96fb8b53b3ebd49' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "ion-text"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -565,7 +565,7 @@ export class Textarea {
|
|
|
565
565
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
566
566
|
*/
|
|
567
567
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
568
|
-
return (h(Host, { key: '
|
|
568
|
+
return (h(Host, { key: 'b31341357553adac08f518e48d83127415f36500', class: createColorClasses(this.color, {
|
|
569
569
|
[theme]: true,
|
|
570
570
|
'has-value': hasValue,
|
|
571
571
|
'has-focus': hasFocus,
|
|
@@ -577,7 +577,7 @@ export class Textarea {
|
|
|
577
577
|
'in-item': inItem,
|
|
578
578
|
'textarea-disabled': disabled,
|
|
579
579
|
'textarea-readonly': readonly,
|
|
580
|
-
}) }, h("label", { key: '
|
|
580
|
+
}) }, h("label", { key: '406cb6739da3382da1f723c42f4ea5aee86e09d4', class: "textarea-wrapper", htmlFor: inputId, onClick: this.onLabelClick, part: "wrapper" }, this.renderLabelContainer(), h("div", { key: '69056191d5f1036bcb88a31d44bc61e3a98f9ebc', class: "textarea-wrapper-inner" },
|
|
581
581
|
/**
|
|
582
582
|
* For the ionic theme, we render the outline container here
|
|
583
583
|
* instead of higher up, so it can be positioned relative to
|
|
@@ -587,7 +587,7 @@ export class Textarea {
|
|
|
587
587
|
* <label> element, ensuring that clicking the label text
|
|
588
588
|
* focuses the textarea.
|
|
589
589
|
*/
|
|
590
|
-
theme === 'ionic' && fill === 'outline' && h("div", { key: '
|
|
590
|
+
theme === 'ionic' && fill === 'outline' && h("div", { key: 'eff37b99e2f47f1973cc61611647c28ae7271a4d', class: "textarea-outline" }), h("div", { key: '9c70d10b3d2cce601f670cd86bfc19fff10233da', class: "start-slot-wrapper" }, h("slot", { key: 'b0c92cc7941a0810faabfb1acf177c019e200a5d', name: "start" })), h("div", { key: 'a6f9a2c06a009c322d29aa3a6e2b5a79f3532c5b', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el), part: "container" }, h("textarea", Object.assign({ key: 'eb6bf7370fa3047ed475680111d3e232f0c0644c', class: "native-textarea", part: "native", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.isInvalid ? 'true' : undefined }, this.inheritedAttributes), value)), h("div", { key: 'e869ef964514267c0d419d474c16303c01d26cec', class: "end-slot-wrapper" }, h("slot", { key: '8e9905fe7caaf4be904f9cfbc3d9d7f9c48deb50', name: "end" }))), shouldRenderHighlight && h("div", { key: '4287784c6b896b13a4205f5f959aebbbcdd49db3', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
591
591
|
}
|
|
592
592
|
static get is() { return "ion-textarea"; }
|
|
593
593
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,9 +10,9 @@ import { getIonTheme } from "../../global/ionic-global";
|
|
|
10
10
|
export class Thumbnail {
|
|
11
11
|
render() {
|
|
12
12
|
const theme = getIonTheme(this);
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '6053cf163155d4268dad4fc81ffc6bbc70d75659', class: {
|
|
14
14
|
[theme]: true,
|
|
15
|
-
} }, h("slot", { key: '
|
|
15
|
+
} }, h("slot", { key: 'b7afb5835bce7c7ed9e5cf44758bbe2d802e1271' })));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "ion-thumbnail"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -27,11 +27,11 @@ export class ToolbarTitle {
|
|
|
27
27
|
render() {
|
|
28
28
|
const theme = getIonTheme(this);
|
|
29
29
|
const size = this.getSize();
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '8db3e5f9dbd8b1762a9919eaeef29c98649dfb25', class: createColorClasses(this.color, {
|
|
31
31
|
[theme]: true,
|
|
32
32
|
[`title-${size}`]: true,
|
|
33
33
|
'title-rtl': document.dir === 'rtl',
|
|
34
|
-
}) }, h("div", { key: '
|
|
34
|
+
}) }, h("div", { key: 'a31ebae2c494a51d2145eec69d0b1bc635108a01', class: "toolbar-title" }, h("slot", { key: 'f5975b44b3e3afbf98dcbdb53fc78447b49407b3' }))));
|
|
35
35
|
}
|
|
36
36
|
static get is() { return "ion-title"; }
|
|
37
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { createAnimation } from "../../../utils/animation/animation";
|
|
5
|
+
import { getElementRoot } from "../../../utils/helpers";
|
|
6
|
+
import { getOffsetForMiddlePosition } from "./utils";
|
|
7
|
+
/**
|
|
8
|
+
* Ionic Toast Enter Animation
|
|
9
|
+
*/
|
|
10
|
+
export const ionicEnterAnimation = (baseEl, opts) => {
|
|
11
|
+
const baseAnimation = createAnimation();
|
|
12
|
+
const wrapperAnimation = createAnimation();
|
|
13
|
+
const { position, top, bottom } = opts;
|
|
14
|
+
const root = getElementRoot(baseEl);
|
|
15
|
+
const wrapperEl = root.querySelector('.toast-wrapper');
|
|
16
|
+
wrapperAnimation.addElement(wrapperEl);
|
|
17
|
+
switch (position) {
|
|
18
|
+
case 'top':
|
|
19
|
+
wrapperEl.style.setProperty('transform', `translateY(${top})`);
|
|
20
|
+
wrapperAnimation.fromTo('opacity', 0.01, 1);
|
|
21
|
+
break;
|
|
22
|
+
case 'middle':
|
|
23
|
+
const topPosition = getOffsetForMiddlePosition(baseEl.clientHeight, wrapperEl.clientHeight);
|
|
24
|
+
wrapperEl.style.top = `${topPosition}px`;
|
|
25
|
+
wrapperAnimation.fromTo('opacity', 0.01, 1);
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
wrapperEl.style.setProperty('transform', `translateY(${bottom})`);
|
|
29
|
+
wrapperAnimation.fromTo('opacity', 0.01, 1);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(400).addAnimation(wrapperAnimation);
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { createAnimation } from "../../../utils/animation/animation";
|
|
5
|
+
import { getElementRoot } from "../../../utils/helpers";
|
|
6
|
+
/**
|
|
7
|
+
* Ionic Toast Leave Animation
|
|
8
|
+
*/
|
|
9
|
+
export const ionicLeaveAnimation = (baseEl) => {
|
|
10
|
+
const baseAnimation = createAnimation();
|
|
11
|
+
const wrapperAnimation = createAnimation();
|
|
12
|
+
const root = getElementRoot(baseEl);
|
|
13
|
+
const wrapperEl = root.querySelector('.toast-wrapper');
|
|
14
|
+
wrapperAnimation.addElement(wrapperEl).fromTo('opacity', 0.99, 0);
|
|
15
|
+
return baseAnimation.easing('cubic-bezier(.36,.66,.04,1)').duration(300).addAnimation(wrapperAnimation);
|
|
16
|
+
};
|
|
@@ -11,6 +11,7 @@ import { sanitizeDOMString } from "../../utils/sanitization/index";
|
|
|
11
11
|
import { createColorClasses, getClassMap } from "../../utils/theme";
|
|
12
12
|
import { config } from "../../global/config";
|
|
13
13
|
import { getIonMode, getIonTheme } from "../../global/ionic-global";
|
|
14
|
+
import { ionicEnterAnimation } from "./animations/ionic.enter";
|
|
14
15
|
import { iosEnterAnimation } from "./animations/ios.enter";
|
|
15
16
|
import { iosLeaveAnimation } from "./animations/ios.leave";
|
|
16
17
|
import { mdEnterAnimation } from "./animations/md.enter";
|
|
@@ -224,7 +225,7 @@ export class Toast {
|
|
|
224
225
|
* in the dismiss animation.
|
|
225
226
|
*/
|
|
226
227
|
this.lastPresentedPosition = animationPosition;
|
|
227
|
-
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
228
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation, {
|
|
228
229
|
position,
|
|
229
230
|
top: animationPosition.top,
|
|
230
231
|
bottom: animationPosition.bottom,
|
|
@@ -439,9 +440,9 @@ export class Toast {
|
|
|
439
440
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
440
441
|
printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
441
442
|
}
|
|
442
|
-
return (h(Host, Object.assign({ key: '
|
|
443
|
+
return (h(Host, Object.assign({ key: 'e83590dd87745fc9579319513eb22c0db5d3e53f', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
443
444
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
444
|
-
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true, [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent, [`toast-shape-${shape}`]: shape !== undefined, [`toast-hue-${hue}`]: hue !== undefined })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '
|
|
445
|
+
}, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true, [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent, [`toast-shape-${shape}`]: shape !== undefined, [`toast-hue-${hue}`]: hue !== undefined })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'b4c4d4565138cc76ffa9fd5cebc4e489b82cea55', class: wrapperClass, part: "wrapper" }, h("div", { key: '14228286e4c4f6738b14816938e1edb75014f322', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { key: '3403984f86018dedb3cc32b3bd5541a6d0db154f', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '0965413313935e3fe90ce0789d2d029af91f3124', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
445
446
|
}
|
|
446
447
|
static get is() { return "ion-toast"; }
|
|
447
448
|
static get encapsulation() { return "shadow"; }
|
|
@@ -338,7 +338,7 @@ export class Toggle {
|
|
|
338
338
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
339
339
|
const isIonicTheme = theme === 'ionic';
|
|
340
340
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
341
|
-
return (h(Host, { key: '
|
|
341
|
+
return (h(Host, { key: 'b12951146a79d3839e6263e91e747398a0fa901d', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, "aria-required": required ? 'true' : undefined, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {
|
|
342
342
|
[theme]: true,
|
|
343
343
|
'in-item': hostContext('ion-item', el),
|
|
344
344
|
'toggle-activated': activated,
|
|
@@ -350,10 +350,10 @@ export class Toggle {
|
|
|
350
350
|
[`toggle-${rtl}`]: true,
|
|
351
351
|
'ion-activatable': isIonicTheme,
|
|
352
352
|
'ion-focusable': isIonicTheme,
|
|
353
|
-
}) }, h("label", { key: '
|
|
353
|
+
}) }, h("label", { key: 'cf1d27243bf9bdd5bafaf6d86b76beb311b5e01c', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: 'b3eb0f146836f5994c15bf1fd67a79f72b9414f7', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, required: required }, inheritedAttributes)), h("div", { key: '56ddcfd6452f30fd6b38d0fd85be3ec966aa120b', class: {
|
|
354
354
|
'label-text-wrapper': true,
|
|
355
355
|
'label-text-wrapper-hidden': !hasLabel,
|
|
356
|
-
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '
|
|
356
|
+
}, part: "label", id: inputLabelId, onClick: this.onDivLabelClick }, h("slot", { key: '706e5b667ee242fb1afb3e4afa613f9798fbe25b' }), this.renderHintText()), h("div", { key: '255ccd7d60f7d78b4eba8d380b303a72093e9d16', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
357
357
|
}
|
|
358
358
|
static get is() { return "ion-toggle"; }
|
|
359
359
|
static get encapsulation() { return "shadow"; }
|