@rdlabo/ionic-theme-ios27 1.0.3 → 1.0.4-beta.pr183.shaedc618dbeda8
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/dist/css/components/ion-segment.css +1 -1
- package/dist/css/ionic-theme-ios27-dark-always.css +1 -1
- package/dist/css/ionic-theme-ios27-dark-class.css +1 -1
- package/dist/css/ionic-theme-ios27-dark-system.css +1 -1
- package/dist/css/ionic-theme-ios27.css +1 -1
- package/dist/native/runtime.d.ts.map +1 -1
- package/dist/native/runtime.js +73 -7
- package/dist/native/shared/crossfade.d.ts +2 -2
- package/dist/native/shared/crossfade.d.ts.map +1 -1
- package/dist/native/shared/crossfade.js +3 -3
- package/dist/segment/index.d.ts.map +1 -1
- package/dist/segment/index.js +7 -0
- package/docs/native-ui-shell.md +2 -0
- package/node_modules/@rdlabo/ionic-theme-utils/dist/transition/ios.transition.d.ts.map +1 -1
- package/node_modules/@rdlabo/ionic-theme-utils/dist/transition/ios.transition.js +8 -3
- package/node_modules/@rdlabo/ionic-theme-utils/dist/transition/ios.transition.js.map +1 -1
- package/node_modules/@rdlabo/ionic-theme-utils/src/transition/ios.transition.spec.ts +54 -1
- package/node_modules/@rdlabo/ionic-theme-utils/src/transition/ios.transition.ts +9 -3
- package/package.json +2 -2
- package/src/native/runtime.ts +81 -6
- package/src/native/shared/crossfade.ts +4 -3
- package/src/segment/index.ts +11 -0
- package/src/styles/components/ion-segment.scss +11 -2
- package/src/styles/utils/dark/ion-segment.scss +3 -0
package/src/segment/index.ts
CHANGED
|
@@ -119,6 +119,17 @@ export const registerSegmentEffect = (targetElement: HTMLElement): registeredEff
|
|
|
119
119
|
animation?.cancel();
|
|
120
120
|
handoff.forEach((effect) => effect.cancel());
|
|
121
121
|
handoff = [];
|
|
122
|
+
// WebKit can paint the newly unhidden element once at its underlying
|
|
123
|
+
// top-left position before the replacement WAAPI effect is sampled.
|
|
124
|
+
// Prime that underlying style so interrupted/reversed selections always
|
|
125
|
+
// hand off from the first frame instead of briefly flashing at (0, 0).
|
|
126
|
+
const first = frames[0];
|
|
127
|
+
if (first) {
|
|
128
|
+
lens.style.transform = String(first['transform']);
|
|
129
|
+
lens.style.width = String(first['width']);
|
|
130
|
+
lens.style.height = String(first['height']);
|
|
131
|
+
lens.style.backgroundColor = String(first['backgroundColor']);
|
|
132
|
+
}
|
|
122
133
|
segment.classList.add('ios27-animated');
|
|
123
134
|
lens.hidden = false;
|
|
124
135
|
const running = lens.animate(frames, { duration, easing: 'linear', fill: 'forwards' });
|
|
@@ -82,8 +82,12 @@ ion-segment.ios:not(.ios-theme-disabled, .ios26-disabled) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
ion-segment-button
|
|
86
|
-
// Ionic sets a direct background for color contexts, bypassing --indicator-color.
|
|
85
|
+
ion-segment-button.in-segment-color::part(indicator-background) {
|
|
86
|
+
// Ionic sets a direct background for segment color contexts, bypassing --indicator-color.
|
|
87
|
+
background: var(--indicator-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
ion-segment-button.in-toolbar-color:not(.in-segment-color)::part(indicator-background) {
|
|
87
91
|
background: var(--indicator-color);
|
|
88
92
|
}
|
|
89
93
|
|
|
@@ -195,3 +199,8 @@ ion-segment-button.ios:not(.ios-theme-disabled, .ios26-disabled) {
|
|
|
195
199
|
:where(ion-segment.ios:not(.ios-theme-disabled, .ios26-disabled) ion-segment-button) {
|
|
196
200
|
--indicator-color: var(--ion-background-color, #fff);
|
|
197
201
|
}
|
|
202
|
+
:where(ion-segment.ios:not(.ios-theme-disabled, .ios26-disabled) ion-segment-button.in-toolbar-color:not(.in-segment-color)) {
|
|
203
|
+
// Match Ionic's colored-toolbar contract while preserving its public
|
|
204
|
+
// toolbar and segment-button customization properties.
|
|
205
|
+
--indicator-color: var(--ion-toolbar-segment-indicator-color, var(--ion-color-contrast));
|
|
206
|
+
}
|
|
@@ -35,4 +35,7 @@
|
|
|
35
35
|
:where(ion-segment.ios:not(.ios-theme-disabled, .ios26-disabled) ion-segment-button) {
|
|
36
36
|
--indicator-color: color-mix(in srgb, rgb(var(--ion-color-medium-rgb, 152, 154, 162)) 59%, var(--ion-background-color, #000));
|
|
37
37
|
}
|
|
38
|
+
:where(ion-segment.ios:not(.ios-theme-disabled, .ios26-disabled) ion-segment-button.in-toolbar-color:not(.in-segment-color)) {
|
|
39
|
+
--indicator-color: var(--ion-toolbar-segment-indicator-color, var(--ion-color-contrast));
|
|
40
|
+
}
|
|
38
41
|
}
|