@ionic/core 7.5.2-dev.11697638908.1f04980a → 7.5.2-dev.11697810676.1a4f965d
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/checkbox.js +2 -2
- package/components/ion-accordion-group.js +1 -1
- package/components/ion-datetime.js +2 -2
- package/components/ion-fab-list.js +1 -1
- package/components/ion-fab.js +1 -1
- package/components/ion-input.js +2 -2
- package/components/ion-item-option.js +2 -2
- package/components/ion-menu.js +14 -2
- package/components/ion-modal.js +1 -1
- package/components/ion-range.js +2 -2
- package/components/ion-reorder.js +2 -2
- package/components/ion-segment.js +17 -43
- package/components/ion-select.js +2 -2
- package/components/ion-tab-button.js +2 -2
- package/components/ion-textarea.js +2 -2
- package/components/ion-title.js +1 -1
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +2 -2
- package/components/item.js +1 -1
- package/components/picker-internal.js +2 -2
- package/components/popover.js +2 -2
- package/components/radio.js +2 -2
- package/css/core.css.map +1 -1
- package/css/display.css.map +1 -1
- package/css/float-elements.css.map +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/padding.css.map +1 -1
- package/css/structure.css.map +1 -1
- package/css/text-alignment.css.map +1 -1
- package/css/text-transformation.css.map +1 -1
- package/css/typography.css.map +1 -1
- package/css/utils.bundle.css.map +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +14 -2
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-internal.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +17 -43
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/collection/components/accordion-group/accordion-group.md.css +2 -2
- package/dist/collection/components/checkbox/checkbox.ios.css +3 -3
- package/dist/collection/components/checkbox/checkbox.md.css +3 -3
- package/dist/collection/components/datetime/datetime.ios.css +1 -1
- package/dist/collection/components/datetime/datetime.md.css +1 -1
- package/dist/collection/components/fab/fab.css +2 -2
- package/dist/collection/components/fab-list/fab-list.css +2 -2
- package/dist/collection/components/input/input.ios.css +1 -1
- package/dist/collection/components/input/input.md.css +8 -10
- package/dist/collection/components/item/item.md.css +3 -3
- package/dist/collection/components/item-option/item-option.ios.css +0 -10
- package/dist/collection/components/item-option/item-option.md.css +0 -10
- package/dist/collection/components/item-sliding/test/basic/item-sliding.e2e.js +77 -0
- package/dist/collection/components/label/label.ios.css +1 -1
- package/dist/collection/components/menu/menu.ios.css +4 -4
- package/dist/collection/components/menu/menu.js +12 -0
- package/dist/collection/components/menu/menu.md.css +4 -4
- package/dist/collection/components/modal/modal.ios.css +2 -2
- package/dist/collection/components/picker/picker.ios.css +1 -1
- package/dist/collection/components/picker/picker.md.css +1 -1
- package/dist/collection/components/picker-internal/picker-internal.ios.css +2 -2
- package/dist/collection/components/picker-internal/picker-internal.md.css +2 -2
- package/dist/collection/components/popover/popover.ios.css +4 -4
- package/dist/collection/components/popover/popover.md.css +2 -2
- package/dist/collection/components/radio/radio.ios.css +4 -4
- package/dist/collection/components/radio/radio.md.css +4 -4
- package/dist/collection/components/range/range.ios.css +1 -1
- package/dist/collection/components/range/range.md.css +1 -1
- package/dist/collection/components/reorder/reorder.ios.css +1 -34
- package/dist/collection/components/reorder/reorder.md.css +1 -34
- package/dist/collection/components/segment/segment.js +17 -43
- package/dist/collection/components/select/select.ios.css +1 -1
- package/dist/collection/components/select/select.md.css +5 -7
- package/dist/collection/components/split-pane/test/multiple/split-pane.e2e.js +31 -0
- package/dist/collection/components/tab-button/tab-button.ios.css +3 -3
- package/dist/collection/components/tab-button/tab-button.md.css +3 -3
- package/dist/collection/components/textarea/textarea.ios.css +1 -1
- package/dist/collection/components/textarea/textarea.md.css +8 -10
- package/dist/collection/components/title/title.ios.css +2 -2
- package/dist/collection/components/toast/toast.ios.css +1 -1
- package/dist/collection/components/toast/toast.md.css +1 -1
- package/dist/collection/components/toggle/toggle.ios.css +3 -3
- package/dist/collection/components/toggle/toggle.md.css +3 -3
- package/dist/docs.json +1 -1
- package/dist/esm/ion-accordion_2.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +2 -2
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +14 -2
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-picker-internal.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +17 -43
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-008331e9.system.entry.js → p-017631df.system.entry.js} +1 -1
- package/dist/ionic/{p-7eaa585f.entry.js → p-0e3b9926.entry.js} +1 -1
- package/dist/ionic/{p-818b2e75.entry.js → p-28293683.entry.js} +1 -1
- package/dist/ionic/{p-5421f83c.system.entry.js → p-2a40090a.system.entry.js} +1 -1
- package/dist/ionic/{p-c105bd36.entry.js → p-2d8caacb.entry.js} +1 -1
- package/dist/ionic/p-33e10fbe.system.entry.js +4 -0
- package/dist/ionic/{p-b96e1915.system.entry.js → p-372f1f80.system.entry.js} +1 -1
- package/dist/ionic/{p-4643c356.system.entry.js → p-3bc2289f.system.entry.js} +1 -1
- package/dist/ionic/{p-fbf836a7.system.entry.js → p-3e2ddf5e.system.entry.js} +1 -1
- package/dist/ionic/p-496a045c.entry.js +4 -0
- package/dist/ionic/{p-d35217be.entry.js → p-508b65b0.entry.js} +1 -1
- package/dist/ionic/{p-c627257b.system.entry.js → p-51ec3380.system.entry.js} +1 -1
- package/dist/ionic/{p-32ff5348.system.entry.js → p-57f074a4.system.entry.js} +1 -1
- package/dist/ionic/p-5b976d70.entry.js +4 -0
- package/dist/ionic/{p-bb055450.system.entry.js → p-5db56c84.system.entry.js} +1 -1
- package/dist/ionic/p-755b2917.system.js +1 -1
- package/dist/ionic/{p-ab5f4f93.system.entry.js → p-7d3fe69c.system.entry.js} +1 -1
- package/dist/ionic/{p-19fba51c.entry.js → p-7d58a178.entry.js} +1 -1
- package/dist/ionic/{p-1edb53a1.entry.js → p-803cd5c3.entry.js} +1 -1
- package/dist/ionic/{p-a200a7fc.entry.js → p-87c3c4ec.entry.js} +1 -1
- package/dist/ionic/{p-a9c32660.entry.js → p-8b1237b9.entry.js} +1 -1
- package/dist/ionic/p-972a3bb1.system.entry.js +4 -0
- package/dist/ionic/p-97afc3e8.system.entry.js +4 -0
- package/dist/ionic/{p-ca86ce12.system.entry.js → p-9d93e024.system.entry.js} +1 -1
- package/dist/ionic/p-a38ec116.entry.js +4 -0
- package/dist/ionic/p-a3fe2e01.entry.js +4 -0
- package/dist/ionic/{p-b92bbb58.entry.js → p-a7f83510.entry.js} +1 -1
- package/dist/ionic/{p-f7566bad.entry.js → p-ad7a92f2.entry.js} +1 -1
- package/dist/ionic/p-b0f6ef25.system.entry.js +4 -0
- package/dist/ionic/{p-0ac3fb2c.entry.js → p-b998e8eb.entry.js} +1 -1
- package/dist/ionic/p-bc08029e.system.entry.js +4 -0
- package/dist/ionic/{p-e25cb483.entry.js → p-bd68ea5d.entry.js} +1 -1
- package/dist/ionic/p-c66eb2d7.system.entry.js +4 -0
- package/dist/ionic/{p-f4309ac7.entry.js → p-c9f70283.entry.js} +1 -1
- package/dist/ionic/{p-8209372c.entry.js → p-cbc8d5c6.entry.js} +1 -1
- package/dist/ionic/{p-40a0dacf.system.entry.js → p-ce4b95a8.system.entry.js} +1 -1
- package/dist/ionic/{p-c575a7b8.system.entry.js → p-d29dcf9b.system.entry.js} +1 -1
- package/dist/ionic/{p-7980e02c.system.entry.js → p-d493004e.system.entry.js} +1 -1
- package/dist/ionic/{p-5ef80480.system.entry.js → p-db6fb00c.system.entry.js} +1 -1
- package/dist/ionic/{p-38089641.entry.js → p-ebdf4f41.entry.js} +1 -1
- package/dist/ionic/{p-e65ebe96.entry.js → p-ec186377.entry.js} +1 -1
- package/dist/ionic/p-f15c9fd3.system.entry.js +4 -0
- package/dist/ionic/{p-f5bf698b.entry.js → p-fb73095c.entry.js} +1 -1
- package/hydrate/index.js +61 -75
- package/package.json +1 -1
- package/dist/ionic/p-24b1f98a.system.entry.js +0 -4
- package/dist/ionic/p-4f97c112.entry.js +0 -4
- package/dist/ionic/p-508defac.system.entry.js +0 -4
- package/dist/ionic/p-7f8844bd.system.entry.js +0 -4
- package/dist/ionic/p-82251950.system.entry.js +0 -4
- package/dist/ionic/p-965ae1f9.system.entry.js +0 -4
- package/dist/ionic/p-a6c5ccb5.system.entry.js +0 -4
- package/dist/ionic/p-bdf1db6f.system.entry.js +0 -4
- package/dist/ionic/p-d6e53e66.entry.js +0 -4
- package/dist/ionic/p-e74faf2a.entry.js +0 -4
- package/dist/ionic/p-e86d765e.entry.js +0 -4
|
@@ -43,16 +43,6 @@
|
|
|
43
43
|
font-family: var(--ion-font-family, inherit);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
:host(.in-list.item-options-end:last-child) {
|
|
47
|
-
-webkit-padding-end: calc(0.7em + var(--ion-safe-area-right));
|
|
48
|
-
padding-inline-end: calc(0.7em + var(--ion-safe-area-right));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host(.in-list.item-options-start:first-child) {
|
|
52
|
-
-webkit-padding-start: calc(0.7em + var(--ion-safe-area-left));
|
|
53
|
-
padding-inline-start: calc(0.7em + var(--ion-safe-area-left));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
46
|
:host(.ion-color) {
|
|
57
47
|
background: var(--ion-color-base);
|
|
58
48
|
color: var(--ion-color-contrast);
|
|
@@ -43,16 +43,6 @@
|
|
|
43
43
|
font-family: var(--ion-font-family, inherit);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
:host(.in-list.item-options-end:last-child) {
|
|
47
|
-
-webkit-padding-end: calc(0.7em + var(--ion-safe-area-right));
|
|
48
|
-
padding-inline-end: calc(0.7em + var(--ion-safe-area-right));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host(.in-list.item-options-start:first-child) {
|
|
52
|
-
-webkit-padding-start: calc(0.7em + var(--ion-safe-area-left));
|
|
53
|
-
padding-inline-start: calc(0.7em + var(--ion-safe-area-left));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
46
|
:host(.ion-color) {
|
|
57
47
|
background: var(--ion-color-base);
|
|
58
48
|
color: var(--ion-color-contrast);
|
|
@@ -83,3 +83,80 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, co
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
+
/**
|
|
87
|
+
* This behavior needs to be tested in both modes and directions to
|
|
88
|
+
* make sure the safe area padding is applied only to that side
|
|
89
|
+
* regardless of direction
|
|
90
|
+
*/
|
|
91
|
+
configs().forEach(({ title, screenshot, config }) => {
|
|
92
|
+
test.describe(title('item-sliding: basic'), () => {
|
|
93
|
+
test.describe('safe area left', () => {
|
|
94
|
+
test('should have padding on the left only', async ({ page }) => {
|
|
95
|
+
await page.setContent(`
|
|
96
|
+
<style>
|
|
97
|
+
:root {
|
|
98
|
+
--ion-safe-area-left: 40px;
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
<ion-item-sliding>
|
|
103
|
+
<ion-item-options side="start">
|
|
104
|
+
<ion-item-option color="primary">
|
|
105
|
+
Archive
|
|
106
|
+
</ion-item-option>
|
|
107
|
+
<ion-item-option color="danger">
|
|
108
|
+
Delete
|
|
109
|
+
</ion-item-option>
|
|
110
|
+
</ion-item-options>
|
|
111
|
+
|
|
112
|
+
<ion-item>
|
|
113
|
+
<ion-label>
|
|
114
|
+
Sliding Item
|
|
115
|
+
</ion-label>
|
|
116
|
+
</ion-item>
|
|
117
|
+
</ion-item-sliding>
|
|
118
|
+
`, config);
|
|
119
|
+
const direction = config.direction;
|
|
120
|
+
const item = page.locator('ion-item-sliding');
|
|
121
|
+
const dragByX = direction == 'rtl' ? -150 : 150;
|
|
122
|
+
await dragElementBy(item, page, dragByX);
|
|
123
|
+
await page.waitForChanges();
|
|
124
|
+
await expect(item).toHaveScreenshot(screenshot(`item-sliding-safe-area-left`));
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
test.describe('safe area right', () => {
|
|
128
|
+
test('should have padding on the right only', async ({ page }) => {
|
|
129
|
+
await page.setContent(`
|
|
130
|
+
<style>
|
|
131
|
+
:root {
|
|
132
|
+
--ion-safe-area-right: 40px;
|
|
133
|
+
}
|
|
134
|
+
</style>
|
|
135
|
+
|
|
136
|
+
<ion-item-sliding>
|
|
137
|
+
<ion-item>
|
|
138
|
+
<ion-label>
|
|
139
|
+
Sliding Item
|
|
140
|
+
</ion-label>
|
|
141
|
+
</ion-item>
|
|
142
|
+
|
|
143
|
+
<ion-item-options side="end">
|
|
144
|
+
<ion-item-option color="primary">
|
|
145
|
+
Archive
|
|
146
|
+
</ion-item-option>
|
|
147
|
+
<ion-item-option color="danger">
|
|
148
|
+
Delete
|
|
149
|
+
</ion-item-option>
|
|
150
|
+
</ion-item-options>
|
|
151
|
+
</ion-item-sliding>
|
|
152
|
+
`, config);
|
|
153
|
+
const direction = config.direction;
|
|
154
|
+
const item = page.locator('ion-item-sliding');
|
|
155
|
+
const dragByX = direction == 'rtl' ? 150 : -150;
|
|
156
|
+
await dragElementBy(item, page, dragByX);
|
|
157
|
+
await page.waitForChanges();
|
|
158
|
+
await expect(item).toHaveScreenshot(screenshot(`item-sliding-safe-area-right`));
|
|
159
|
+
});
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
});
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
right: 0;
|
|
115
115
|
}
|
|
116
116
|
@supports selector(:dir(rtl)) {
|
|
117
|
-
:host(.menu-side-start) .menu-inner
|
|
117
|
+
:host(.menu-side-start:dir(rtl)) .menu-inner {
|
|
118
118
|
left: unset;
|
|
119
119
|
right: unset;
|
|
120
120
|
left: auto;
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
@supports selector(:dir(rtl)) {
|
|
145
|
-
:host(.menu-side-start) .menu-inner
|
|
145
|
+
:host(.menu-side-start:dir(rtl)) .menu-inner {
|
|
146
146
|
/**
|
|
147
147
|
* Menu does not cover the whole screen so we need to set the safe area for the
|
|
148
148
|
* side that touches the screen edge only. Since safe area is not logical, it
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
right: auto;
|
|
198
198
|
}
|
|
199
199
|
@supports selector(:dir(rtl)) {
|
|
200
|
-
:host(.menu-side-end) .menu-inner
|
|
200
|
+
:host(.menu-side-end:dir(rtl)) .menu-inner {
|
|
201
201
|
left: unset;
|
|
202
202
|
right: unset;
|
|
203
203
|
left: 0;
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
@supports selector(:dir(rtl)) {
|
|
228
|
-
:host(.menu-side-end) .menu-inner
|
|
228
|
+
:host(.menu-side-end:dir(rtl)) .menu-inner {
|
|
229
229
|
/**
|
|
230
230
|
* Menu does not cover the whole screen so we need to set the safe area for the
|
|
231
231
|
* side that touches the screen edge only. Since safe area is not logical, it
|
|
@@ -173,6 +173,18 @@ export class Menu {
|
|
|
173
173
|
this.contentEl = undefined;
|
|
174
174
|
}
|
|
175
175
|
onSplitPaneChanged(ev) {
|
|
176
|
+
const { target } = ev;
|
|
177
|
+
const closestSplitPane = this.el.closest('ion-split-pane');
|
|
178
|
+
/**
|
|
179
|
+
* Menu listens on the body for "ionSplitPaneVisible".
|
|
180
|
+
* However, this means the callback will run any time
|
|
181
|
+
* a SplitPane changes visibility. As a result, we only want
|
|
182
|
+
* Menu's visibility state to update if its parent SplitPane
|
|
183
|
+
* changes visibility.
|
|
184
|
+
*/
|
|
185
|
+
if (target !== closestSplitPane) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
176
188
|
this.isPaneVisible = ev.detail.isPane(this.el);
|
|
177
189
|
this.updateState();
|
|
178
190
|
}
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
right: 0;
|
|
115
115
|
}
|
|
116
116
|
@supports selector(:dir(rtl)) {
|
|
117
|
-
:host(.menu-side-start) .menu-inner
|
|
117
|
+
:host(.menu-side-start:dir(rtl)) .menu-inner {
|
|
118
118
|
left: unset;
|
|
119
119
|
right: unset;
|
|
120
120
|
left: auto;
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
@supports selector(:dir(rtl)) {
|
|
145
|
-
:host(.menu-side-start) .menu-inner
|
|
145
|
+
:host(.menu-side-start:dir(rtl)) .menu-inner {
|
|
146
146
|
/**
|
|
147
147
|
* Menu does not cover the whole screen so we need to set the safe area for the
|
|
148
148
|
* side that touches the screen edge only. Since safe area is not logical, it
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
right: auto;
|
|
198
198
|
}
|
|
199
199
|
@supports selector(:dir(rtl)) {
|
|
200
|
-
:host(.menu-side-end) .menu-inner
|
|
200
|
+
:host(.menu-side-end:dir(rtl)) .menu-inner {
|
|
201
201
|
left: unset;
|
|
202
202
|
right: unset;
|
|
203
203
|
left: 0;
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
@supports selector(:dir(rtl)) {
|
|
228
|
-
:host(.menu-side-end) .menu-inner
|
|
228
|
+
:host(.menu-side-end:dir(rtl)) .menu-inner {
|
|
229
229
|
/**
|
|
230
230
|
* Menu does not cover the whole screen so we need to set the safe area for the
|
|
231
231
|
* side that touches the screen edge only. Since safe area is not logical, it
|
|
@@ -254,7 +254,7 @@ ion-backdrop {
|
|
|
254
254
|
border-bottom-left-radius: 0;
|
|
255
255
|
}
|
|
256
256
|
@supports selector(:dir(rtl)) {
|
|
257
|
-
:host(.modal-card) .modal-wrapper
|
|
257
|
+
:host(.modal-card:dir(rtl)) .modal-wrapper {
|
|
258
258
|
border-top-left-radius: var(--border-radius);
|
|
259
259
|
border-top-right-radius: var(--border-radius);
|
|
260
260
|
border-bottom-right-radius: 0;
|
|
@@ -304,7 +304,7 @@ ion-backdrop {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
@supports selector(:dir(rtl)) {
|
|
307
|
-
:host(.modal-sheet) .modal-wrapper
|
|
307
|
+
:host(.modal-sheet:dir(rtl)) .modal-wrapper {
|
|
308
308
|
border-top-left-radius: var(--border-radius);
|
|
309
309
|
border-top-right-radius: var(--border-radius);
|
|
310
310
|
border-bottom-right-radius: 0;
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
right: 0;
|
|
87
87
|
}
|
|
88
88
|
@supports selector(:dir(rtl)) {
|
|
89
|
-
:host
|
|
89
|
+
:host(:dir(rtl)) .picker-before {
|
|
90
90
|
left: unset;
|
|
91
91
|
right: unset;
|
|
92
92
|
right: 0;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
right: 0;
|
|
114
114
|
}
|
|
115
115
|
@supports selector(:dir(rtl)) {
|
|
116
|
-
:host
|
|
116
|
+
:host(:dir(rtl)) .picker-after {
|
|
117
117
|
left: unset;
|
|
118
118
|
right: unset;
|
|
119
119
|
right: 0;
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
right: 0;
|
|
87
87
|
}
|
|
88
88
|
@supports selector(:dir(rtl)) {
|
|
89
|
-
:host
|
|
89
|
+
:host(:dir(rtl)) .picker-before {
|
|
90
90
|
left: unset;
|
|
91
91
|
right: unset;
|
|
92
92
|
right: 0;
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
right: 0;
|
|
114
114
|
}
|
|
115
115
|
@supports selector(:dir(rtl)) {
|
|
116
|
-
:host
|
|
116
|
+
:host(:dir(rtl)) .picker-after {
|
|
117
117
|
left: unset;
|
|
118
118
|
right: unset;
|
|
119
119
|
right: 0;
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
@supports selector(:dir(rtl)) {
|
|
141
|
-
:host(.popover-nested.popover-side-start
|
|
141
|
+
:host(.popover-nested.popover-side-start:dir(rtl)) {
|
|
142
142
|
--offset-x: -5px;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
@supports selector(:dir(rtl)) {
|
|
154
|
-
:host(.popover-nested.popover-side-end
|
|
154
|
+
:host(.popover-nested.popover-side-end:dir(rtl)) {
|
|
155
155
|
--offset-x: 5px;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
@supports selector(:dir(rtl)) {
|
|
287
|
-
:host(.popover-side-start) .popover-arrow
|
|
287
|
+
:host(.popover-side-start:dir(rtl)) .popover-arrow {
|
|
288
288
|
transform: rotate(-90deg);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
@supports selector(:dir(rtl)) {
|
|
300
|
-
:host(.popover-side-end) .popover-arrow
|
|
300
|
+
:host(.popover-side-end:dir(rtl)) .popover-arrow {
|
|
301
301
|
transform: rotate(90deg);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
@supports selector(:dir(rtl)) {
|
|
141
|
-
:host(.popover-nested.popover-side-start
|
|
141
|
+
:host(.popover-nested.popover-side-start:dir(rtl)) {
|
|
142
142
|
--offset-x: -5px;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
@supports selector(:dir(rtl)) {
|
|
154
|
-
:host(.popover-nested.popover-side-end
|
|
154
|
+
:host(.popover-nested.popover-side-end:dir(rtl)) {
|
|
155
155
|
--offset-x: 5px;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
right: 0;
|
|
104
104
|
}
|
|
105
105
|
@supports selector(:dir(rtl)) {
|
|
106
|
-
:host(.legacy-radio
|
|
106
|
+
:host(.legacy-radio:dir(rtl)) label {
|
|
107
107
|
left: unset;
|
|
108
108
|
right: unset;
|
|
109
109
|
right: 0;
|
|
@@ -317,7 +317,7 @@ input {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
@supports selector(:dir(rtl)) {
|
|
320
|
-
:host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper
|
|
320
|
+
:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper {
|
|
321
321
|
transform-origin: right top;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -330,7 +330,7 @@ input {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
@supports selector(:dir(rtl)) {
|
|
333
|
-
:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper
|
|
333
|
+
:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper {
|
|
334
334
|
transform-origin: calc(100% - center) top;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
@@ -463,7 +463,7 @@ input {
|
|
|
463
463
|
right: -9px;
|
|
464
464
|
}
|
|
465
465
|
@supports selector(:dir(rtl)) {
|
|
466
|
-
:host(.ion-focused) .radio-icon::after
|
|
466
|
+
:host(.ion-focused:dir(rtl)) .radio-icon::after {
|
|
467
467
|
left: unset;
|
|
468
468
|
right: unset;
|
|
469
469
|
right: -9px;
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
right: 0;
|
|
104
104
|
}
|
|
105
105
|
@supports selector(:dir(rtl)) {
|
|
106
|
-
:host(.legacy-radio
|
|
106
|
+
:host(.legacy-radio:dir(rtl)) label {
|
|
107
107
|
left: unset;
|
|
108
108
|
right: unset;
|
|
109
109
|
right: 0;
|
|
@@ -317,7 +317,7 @@ input {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
@supports selector(:dir(rtl)) {
|
|
320
|
-
:host(.radio-label-placement-stacked.radio-alignment-start) .label-text-wrapper
|
|
320
|
+
:host(.radio-label-placement-stacked.radio-alignment-start:dir(rtl)) .label-text-wrapper {
|
|
321
321
|
transform-origin: right top;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -330,7 +330,7 @@ input {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
@supports selector(:dir(rtl)) {
|
|
333
|
-
:host(.radio-label-placement-stacked.radio-alignment-center) .label-text-wrapper
|
|
333
|
+
:host(.radio-label-placement-stacked.radio-alignment-center:dir(rtl)) .label-text-wrapper {
|
|
334
334
|
transform-origin: calc(100% - center) top;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
@@ -477,7 +477,7 @@ input {
|
|
|
477
477
|
right: -12px;
|
|
478
478
|
}
|
|
479
479
|
@supports selector(:dir(rtl)) {
|
|
480
|
-
:host(.ion-focused.legacy-radio) .radio-icon::after
|
|
480
|
+
:host(.ion-focused.legacy-radio:dir(rtl)) .radio-icon::after {
|
|
481
481
|
left: unset;
|
|
482
482
|
right: unset;
|
|
483
483
|
right: -12px;
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a font size to a dynamic font size.
|
|
3
|
-
* Fonts that participate in Dynamic Type should use
|
|
4
|
-
* dynamic font sizes.
|
|
5
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
6
|
-
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
7
|
-
* convert to a unit other than $baselineUnit.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Convert a font size to a dynamic font size but impose
|
|
11
|
-
* a maximum font size.
|
|
12
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
13
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
14
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
15
|
-
* convert to a unit other than $baselineUnit.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Convert a font size to a dynamic font size but impose
|
|
19
|
-
* a minimum font size.
|
|
20
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
21
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
22
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
23
|
-
* convert to a unit other than $baselineUnit.
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Convert a font size to a dynamic font size but impose
|
|
27
|
-
* maximum and minimum font sizes.
|
|
28
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
29
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
30
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
31
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
32
|
-
* convert to a unit other than $baselineUnit.
|
|
33
|
-
*/
|
|
34
1
|
:host([slot]) {
|
|
35
2
|
display: none;
|
|
36
3
|
line-height: 0;
|
|
@@ -46,7 +13,7 @@
|
|
|
46
13
|
* icons resize with Dynamic Type.
|
|
47
14
|
*/
|
|
48
15
|
::slotted(ion-icon) {
|
|
49
|
-
font-size:
|
|
16
|
+
font-size: dynamic-font(16px);
|
|
50
17
|
}
|
|
51
18
|
|
|
52
19
|
/**
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a font size to a dynamic font size.
|
|
3
|
-
* Fonts that participate in Dynamic Type should use
|
|
4
|
-
* dynamic font sizes.
|
|
5
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
6
|
-
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
7
|
-
* convert to a unit other than $baselineUnit.
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* Convert a font size to a dynamic font size but impose
|
|
11
|
-
* a maximum font size.
|
|
12
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
13
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
14
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
15
|
-
* convert to a unit other than $baselineUnit.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Convert a font size to a dynamic font size but impose
|
|
19
|
-
* a minimum font size.
|
|
20
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
21
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
22
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
23
|
-
* convert to a unit other than $baselineUnit.
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* Convert a font size to a dynamic font size but impose
|
|
27
|
-
* maximum and minimum font sizes.
|
|
28
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
29
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
30
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
31
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
32
|
-
* convert to a unit other than $baselineUnit.
|
|
33
|
-
*/
|
|
34
1
|
:host([slot]) {
|
|
35
2
|
display: none;
|
|
36
3
|
line-height: 0;
|
|
@@ -46,7 +13,7 @@
|
|
|
46
13
|
* icons resize with Dynamic Type.
|
|
47
14
|
*/
|
|
48
15
|
::slotted(ion-icon) {
|
|
49
|
-
font-size:
|
|
16
|
+
font-size: dynamic-font(16px);
|
|
50
17
|
}
|
|
51
18
|
|
|
52
19
|
/**
|
|
@@ -106,13 +106,7 @@ export class Segment {
|
|
|
106
106
|
* before we can scroll.
|
|
107
107
|
*/
|
|
108
108
|
raf(() => {
|
|
109
|
-
|
|
110
|
-
* When the segment loads for the first
|
|
111
|
-
* time we just want to snap the active button into
|
|
112
|
-
* place instead of scroll. Smooth scrolling should only
|
|
113
|
-
* happen when the user interacts with the segment.
|
|
114
|
-
*/
|
|
115
|
-
this.scrollActiveButtonIntoView(false);
|
|
109
|
+
this.scrollActiveButtonIntoView();
|
|
116
110
|
});
|
|
117
111
|
this.gesture = (await import('../../utils/gesture')).createGesture({
|
|
118
112
|
el: this.el,
|
|
@@ -242,48 +236,28 @@ export class Segment {
|
|
|
242
236
|
buttons[next].classList.add('segment-button-after-checked');
|
|
243
237
|
}
|
|
244
238
|
}
|
|
245
|
-
scrollActiveButtonIntoView(
|
|
246
|
-
const { scrollable, value
|
|
239
|
+
scrollActiveButtonIntoView() {
|
|
240
|
+
const { scrollable, value } = this;
|
|
247
241
|
if (scrollable) {
|
|
248
242
|
const buttons = this.getButtons();
|
|
249
243
|
const activeButton = buttons.find((button) => button.value === value);
|
|
250
244
|
if (activeButton !== undefined) {
|
|
251
|
-
const scrollContainerBox = el.getBoundingClientRect();
|
|
252
|
-
const activeButtonBox = activeButton.getBoundingClientRect();
|
|
253
|
-
/**
|
|
254
|
-
* Subtract the active button x position from the scroll
|
|
255
|
-
* container x position. This will give us the x position
|
|
256
|
-
* of the active button within the scroll container.
|
|
257
|
-
*/
|
|
258
|
-
const activeButtonLeft = activeButtonBox.x - scrollContainerBox.x;
|
|
259
|
-
/**
|
|
260
|
-
* If we just used activeButtonLeft, then the active button
|
|
261
|
-
* would be aligned with the left edge of the scroll container.
|
|
262
|
-
* Instead, we want the segment button to be centered. As a result,
|
|
263
|
-
* we subtract half of the scroll container width. This will position
|
|
264
|
-
* the left edge of the active button at the midpoint of the scroll container.
|
|
265
|
-
* We then add half of the active button width. This will position the active
|
|
266
|
-
* button such that the midpoint of the active button is at the midpoint of the
|
|
267
|
-
* scroll container.
|
|
268
|
-
*/
|
|
269
|
-
const centeredX = activeButtonLeft - (scrollContainerBox.width / 2) + (activeButtonBox.width / 2);
|
|
270
245
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
* segment container to jump during the transition and then snap into place.
|
|
275
|
-
* This is because scrollIntoView can potentially cause parent element
|
|
276
|
-
* containers to also scroll. scrollBy does not have this same behavior, so
|
|
277
|
-
* we use this API instead.
|
|
278
|
-
*
|
|
279
|
-
* Note that if there is not enough scrolling space to center the element
|
|
280
|
-
* within the scroll container, the browser will attempt
|
|
281
|
-
* to center by as much as it can.
|
|
246
|
+
* Scrollable segment buttons should be
|
|
247
|
+
* centered within the view including
|
|
248
|
+
* buttons that are partially offscreen.
|
|
282
249
|
*/
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
250
|
+
activeButton.scrollIntoView({
|
|
251
|
+
behavior: 'smooth',
|
|
252
|
+
inline: 'center',
|
|
253
|
+
/**
|
|
254
|
+
* Segment should scroll on the
|
|
255
|
+
* horizontal axis. `block: 'nearest'`
|
|
256
|
+
* ensures that the vertical axis
|
|
257
|
+
* does not scroll if the segment
|
|
258
|
+
* as a whole is already in view.
|
|
259
|
+
*/
|
|
260
|
+
block: 'nearest',
|
|
287
261
|
});
|
|
288
262
|
}
|
|
289
263
|
}
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
right: 0;
|
|
162
162
|
}
|
|
163
163
|
@supports selector(:dir(rtl)) {
|
|
164
|
-
:host(.legacy-select
|
|
164
|
+
:host(.legacy-select:dir(rtl)) label {
|
|
165
165
|
left: unset;
|
|
166
166
|
right: unset;
|
|
167
167
|
right: 0;
|
|
@@ -653,6 +653,7 @@ button {
|
|
|
653
653
|
--border-radius: 4px;
|
|
654
654
|
--padding-start: 16px;
|
|
655
655
|
--padding-end: 16px;
|
|
656
|
+
min-height: 56px;
|
|
656
657
|
}
|
|
657
658
|
|
|
658
659
|
/**
|
|
@@ -716,7 +717,7 @@ button {
|
|
|
716
717
|
}
|
|
717
718
|
|
|
718
719
|
@supports selector(:dir(rtl)) {
|
|
719
|
-
:host(.select-fill-solid) .select-wrapper
|
|
720
|
+
:host(.select-fill-solid:dir(rtl)) .select-wrapper {
|
|
720
721
|
border-top-left-radius: var(--border-radius);
|
|
721
722
|
border-top-right-radius: var(--border-radius);
|
|
722
723
|
border-bottom-right-radius: 0px;
|
|
@@ -773,6 +774,7 @@ button {
|
|
|
773
774
|
--border-radius: 4px;
|
|
774
775
|
--padding-start: 16px;
|
|
775
776
|
--padding-end: 16px;
|
|
777
|
+
min-height: 56px;
|
|
776
778
|
}
|
|
777
779
|
|
|
778
780
|
:host(.select-fill-outline.select-shape-round) {
|
|
@@ -1027,10 +1029,6 @@ button {
|
|
|
1027
1029
|
--padding-start: 16px;
|
|
1028
1030
|
}
|
|
1029
1031
|
|
|
1030
|
-
:host(:not(.legacy-select)) {
|
|
1031
|
-
min-height: 56px;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
1032
|
.select-icon {
|
|
1035
1033
|
width: 0.8125rem;
|
|
1036
1034
|
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -1121,7 +1119,7 @@ button {
|
|
|
1121
1119
|
right: 0;
|
|
1122
1120
|
}
|
|
1123
1121
|
@supports selector(:dir(rtl)) {
|
|
1124
|
-
:host(.in-item) .select-highlight
|
|
1122
|
+
:host(.in-item:dir(rtl)) .select-highlight {
|
|
1125
1123
|
left: unset;
|
|
1126
1124
|
right: unset;
|
|
1127
1125
|
right: 0;
|