@rdlabo/ionic-theme-ios26 0.3.5 → 0.4.0
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/README.md +18 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ And import the theme in your project's main CSS file (e.g., `src/styles.scss`).
|
|
|
52
52
|
### CSS Variables
|
|
53
53
|
|
|
54
54
|
To customize the library's default styles to match your design, several CSS variables are provided. See this file for details:
|
|
55
|
-
https://github.com/rdlabo-team/ionic-theme-ios26/blob/main/src/default-variables.scss
|
|
55
|
+
https://github.com/rdlabo-team/ionic-theme-ios26/blob/main/src/styles/default-variables.scss
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
## Features
|
|
@@ -74,7 +74,7 @@ Add the `.ios26-disabled` class to disable the iOS26 theme on specific component
|
|
|
74
74
|
Import the SCSS files from the main package to use the liquid glass mixin.
|
|
75
75
|
|
|
76
76
|
```scss
|
|
77
|
-
@use '@rdlabo/ionic-theme-ios26/src/utils/api';
|
|
77
|
+
@use '@rdlabo/ionic-theme-ios26/src/styles/utils/api';
|
|
78
78
|
|
|
79
79
|
ion-textarea label.textarea-wrapper {
|
|
80
80
|
@include api.glass-background;
|
|
@@ -131,7 +131,7 @@ You can see the difference in the following video. The first example shows `ion-
|
|
|
131
131
|
This is a known issue that has been shared with the Ionic team. We will update this library accordingly once Ionic Core addresses it.
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
### Experimental: Using
|
|
134
|
+
### Experimental: Using Gesture Animation with IonTabButton / IonSegmentButton
|
|
135
135
|
|
|
136
136
|
__This feature is experimental. The library can be used without this feature.__
|
|
137
137
|
|
|
@@ -140,8 +140,18 @@ By registering IonTabBar / IonSegment, you can display animation effects on IonT
|
|
|
140
140
|
```js
|
|
141
141
|
import { registerTabBarEffect, registerSegmentEffect } from '@rdlabo/ionic-theme-ios26';
|
|
142
142
|
|
|
143
|
-
registerTabBarEffect(document.querySelector<HTMLElement>('ion-tab-bar'));
|
|
144
|
-
registerSegmentEffect(document.querySelector<HTMLElement>('ion-segment'));
|
|
143
|
+
const registeredTabBarEffect = registerTabBarEffect(document.querySelector<HTMLElement>('ion-tab-bar'));
|
|
144
|
+
const registeredSegmentEffect = registerSegmentEffect(document.querySelector<HTMLElement>('ion-segment'));
|
|
145
|
+
|
|
146
|
+
const destroy = () => {
|
|
147
|
+
/**
|
|
148
|
+
* If the registered DOM element is removed (e.g., due to page navigation),
|
|
149
|
+
* make sure to destroy the gesture and animation. This will also remove the event listeners.
|
|
150
|
+
* You can re-register them if needed.
|
|
151
|
+
*/
|
|
152
|
+
registeredTabBarEffect?.destroy();
|
|
153
|
+
registeredSegmentEffect?.destroy();
|
|
154
|
+
}
|
|
145
155
|
```
|
|
146
156
|
|
|
147
157
|
|
|
@@ -166,7 +176,7 @@ When importing individual components with dark mode support, use SCSS instead of
|
|
|
166
176
|
|
|
167
177
|
Always (Always Dark Mode):
|
|
168
178
|
```scss
|
|
169
|
-
@use '@rdlabo/ionic-theme-ios26/src/utils/theme-dark';
|
|
179
|
+
@use '@rdlabo/ionic-theme-ios26/src/styles/utils/theme-dark';
|
|
170
180
|
|
|
171
181
|
:root {
|
|
172
182
|
@include theme-dark.default-variables;
|
|
@@ -178,7 +188,7 @@ Always (Always Dark Mode):
|
|
|
178
188
|
|
|
179
189
|
System (Follow System Settings):
|
|
180
190
|
```scss
|
|
181
|
-
@use '@rdlabo/ionic-theme-ios26/src/utils/theme-dark';
|
|
191
|
+
@use '@rdlabo/ionic-theme-ios26/src/styles/utils/theme-dark';
|
|
182
192
|
|
|
183
193
|
@media (prefers-color-scheme: dark) {
|
|
184
194
|
:root {
|
|
@@ -192,7 +202,7 @@ System (Follow System Settings):
|
|
|
192
202
|
|
|
193
203
|
Class (Toggle with CSS Class):
|
|
194
204
|
```scss
|
|
195
|
-
@use '@rdlabo/ionic-theme-ios26/src/utils/theme-dark';
|
|
205
|
+
@use '@rdlabo/ionic-theme-ios26/src/styles/utils/theme-dark';
|
|
196
206
|
|
|
197
207
|
.ion-palette-dark {
|
|
198
208
|
@include theme-dark.default-variables;
|