Skip to content

Commit ab86fa0

Browse files
committed
Merge branch 'main' into translation/jp
2 parents 96677eb + 51dc415 commit ab86fa0

File tree

97 files changed

+3842
-2576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3842
-2576
lines changed

docs/angular/slides.md

Lines changed: 143 additions & 257 deletions
Large diffs are not rendered by default.

docs/api/alert.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ interface AlertInput {
142142
name?: string;
143143
placeholder?: string;
144144
value?: any;
145+
/**
146+
* The label text to display next to the input, if the input type is `radio` or `checkbox`.
147+
*/
145148
label?: string;
146149
checked?: boolean;
147150
disabled?: boolean;

docs/api/datetime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ JSONオブジェクトやデータベース内でのシリアライズやパー
8686
12時間表示の時計では「00」は「午前12時」、「13」は「午後1時」、「23」は「午後3時」を意味します。
8787

8888
:::note
89-
ISO 8601 datetime フォーマットで秒とミリ秒を指定することができますが`ion-datetime` は秒とミリ秒を選択するためのインターフェースを提供しません。秒やミリ秒の値が指定されても無視されます
89+
秒、ミリ秒、タイムゾーンは ISO 8601 datetime フォーマットで指定できますが`ion-datetime` は秒、ミリ秒、タイムゾーンを選択するためのインターフェイスを提供しません。秒、ミリ秒、タイムゾーンの値を指定しても無視されます
9090
:::
9191

9292
## 基本的な使い方

docs/react/slides.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Slides
2+
title: Migrating From IonSlides to Swiper.js
33
---
44

55
<head>
@@ -16,12 +16,13 @@ title: Slides
1616

1717
:::
1818

19-
:::note
20-
This migration guide is compatible with Swiper 8. An updated guide for Swiper 9 is coming soon!
21-
:::
19+
We recommend <a href="http://swiperjs.com/" target="_blank" rel="noopener noreferrer">Swiper.js</a> if you need a modern touch slider component. This guide will go over how to get Swiper for React set up in your Ionic Framework application. It will also go over any migration information you may need to move from `IonSlides` to the official Swiper React integration.
2220

21+
:::note
22+
Swiper's React component is set to be removed in a future release of Swiper, with <a href="https://swiperjs.com/element" target="_blank" rel="noopener noreferrer">Swiper Element</a> as the replacement. However, this guide shows how to migrate to the React component because it provides the most stable experience at the time of writing. Notably, React does not have strong support for Web Components yet.
2323

24-
We recommend <a href="http://swiperjs.com/" target="_blank" rel="noopener noreferrer">Swiper.js</a> if you need a modern touch slider component. This guide will go over how to get Swiper for React set up in your Ionic Framework application. It will also go over any migration information you may need to move from `IonSlides` to the official Swiper React integration.
24+
Using Swiper's React component is **not** required to use Swiper.js with Ionic Framework.
25+
:::
2526

2627
## Getting Started
2728

@@ -34,7 +35,7 @@ npm install @ionic/react@latest @ionic/react-router@latest
3435
Once that is done, install the Swiper dependency in your project:
3536

3637
```shell
37-
npm install swiper@8
38+
npm install swiper@latest
3839
```
3940

4041
:::note
@@ -43,7 +44,7 @@ Create React App does not support pure ESM packages yet. Developers can still us
4344

4445
## Swiping with Style
4546

46-
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `ion-slides`.
47+
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `IonSlides`.
4748

4849
We recommend importing the styles in the component in which Swiper is being used. This ensures that the styles are only loaded when needed:
4950

@@ -64,13 +65,11 @@ export default Home;
6465
```
6566

6667
:::note
67-
Importing `@ionic/react/css/ionic-swiper.css'` is **not** required to use Swiper.js with Ionic. This files is used for backward-compatibility with the `ion-slides` component and can be safely omitted if you prefer not to use the CSS Variables provided in the stylesheet.
68+
Importing `@ionic/react/css/ionic-swiper.css` is **not** required to use Swiper.js with Ionic. This files is used for backward-compatibility with the `IonSlides` component and can be safely omitted if you prefer not to use the CSS Variables provided in the stylesheet.
6869
:::
6970

7071
:::note
71-
7272
Not using Create React App? You can import the Swiper CSS from `swiper/css` instead.
73-
7473
:::
7574

7675
### Updating Selectors
@@ -153,16 +152,14 @@ export default Home;
153152
```
154153

155154
:::note
156-
157155
Not using Create React App? You can import the Swiper components from `swiper/react` instead.
158-
159156
:::
160157

161158
## Using Modules
162159

163160
By default, Swiper for React does not import any additional modules. To use modules such as Navigation or Pagination, you need to import them first.
164161

165-
`ion-slides` automatically included the Pagination, Scrollbar, Autoplay, Keyboard, and Zoom modules. This part of the guide will show you how to install these modules.
162+
`IonSlides` automatically included the Pagination, Scrollbar, Autoplay, Keyboard, and Zoom modules. This part of the guide will show you how to install these modules.
166163

167164
To begin, we need to import the modules and their corresponding CSS files from the `swiper` package:
168165

@@ -197,9 +194,7 @@ export default Home;
197194
```
198195

199196
:::note
200-
201197
Not using Create React App? You can import these modules from `swiper/css/[MODULE NAME]` instead (i.e. `swiper/css/autoplay`).
202-
203198
:::
204199

205200
From here, we need to provide these modules to Swiper by using the `modules` property on the `Swiper` component:
@@ -279,7 +274,7 @@ See <a href="https://swiperjs.com/react#usage" target="_blank" rel="noopener nor
279274

280275
## The IonicSlides Module
281276

282-
With `ion-slides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
277+
With `IonSlides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
283278

284279
We can install the `IonicSlides` module by importing it from `@ionic/react` and passing it in as the last item in the `modules` array:
285280

@@ -428,7 +423,7 @@ Below is a full list of event name changes when going from `IonSlides` to Swiper
428423
| onIonSlidesDidLoad | onInit |
429424

430425
:::note
431-
All events available in Swiper React can be found at <a href="https://swiperjs.com/react#swiper-events" target="_blank" rel="noopener noreferrer">https://swiperjs.com/react#swiper-events</a>.
426+
All events available in Swiper can be found at <a href="https://swiperjs.com/swiper-api#events" target="_blank" rel="noopener noreferrer">https://swiperjs.com/swiper-api#events</a>.
432427
:::
433428

434429
## Methods
@@ -460,7 +455,7 @@ From here, if you wanted to access a property on the Swiper instance you would a
460455

461456
Below is a full list of method changes when going from `IonSlides` to Swiper React:
462457

463-
| ion-slides Method | Notes |
458+
| IonSlides Method | Notes |
464459
| ------------------ | ------------------------------------------------------------------------------------ |
465460
| getActiveIndex() | Use the `activeIndex` property instead. |
466461
| getPreviousIndex() | Use the `previousIndex` property instead. |
@@ -491,7 +486,7 @@ const Home: React.FC = () => {
491486
return (
492487
<IonPage>
493488
<IonContent>
494-
<Swiper modules={[EffectFact, IonicSlides]}>
489+
<Swiper modules={[EffectFade, IonicSlides]}>
495490
<SwiperSlide>Slide 1</SwiperSlide>
496491
<SwiperSlide>Slide 2</SwiperSlide>
497492
<SwiperSlide>Slide 3</SwiperSlide>
@@ -519,7 +514,7 @@ const Home: React.FC = () => {
519514
return (
520515
<IonPage>
521516
<IonContent>
522-
<Swiper modules={[EffectFact, IonicSlides]}>
517+
<Swiper modules={[EffectFade, IonicSlides]}>
523518
<SwiperSlide>Slide 1</SwiperSlide>
524519
<SwiperSlide>Slide 2</SwiperSlide>
525520
<SwiperSlide>Slide 3</SwiperSlide>
@@ -532,9 +527,7 @@ export default Home;
532527
```
533528

534529
:::note
535-
536530
Not using Create React App? You can import these effects from `swiper/css/[EFFECT NAME]` instead (i.e. `swiper/css/effect-fade`).
537-
538531
:::
539532

540533
After that, we can activate it by setting the `effect` property on `swiper` to `"fade"`:
@@ -553,7 +546,7 @@ const Home: React.FC = () => {
553546
return (
554547
<IonPage>
555548
<IonContent>
556-
<Swiper modules={[EffectFact, IonicSlides]} swiper="fade">
549+
<Swiper modules={[EffectFade, IonicSlides]} effect="fade">
557550
<SwiperSlide>Slide 1</SwiperSlide>
558551
<SwiperSlide>Slide 2</SwiperSlide>
559552
<SwiperSlide>Slide 3</SwiperSlide>

docs/utilities/animations.md

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import TabItem from '@theme/TabItem';
1616

1717
## Overview
1818

19-
Ionic Animations is a utility that allows developers to build complex animations in a platform agnostic manner. Developers do not need to be using a particular framework such as React or Angular, nor do they even need to be building an Ionic app. As long as developers have access to v5.0 or greater of Ionic Framework, they will have access to all of Ionic Animations.
19+
Ionic Animations is a tool that enables developers to create complex animations in a platform-agnostic manner, without requiring a specific framework or an Ionic app.
2020

21-
Building efficient animations can be tricky. Developers are often limited by the libraries available to them as well as the hardware that their apps run on. On top of that, many animation libraries use a JavaScript-driven approach to running animations where they handle the calculation of your animation's values at every step in a `requestAnimationFrame` loop. This reduces the scalability of your animations as the library is constantly computing values and using up CPU time.
21+
Creating efficient animations can be challenging, as developers are limited by the available libraries and hardware resources of the device. Moreover, many animation libraries use a JavaScript-driven approach, which can reduce the scalability of animations and use up CPU time.
2222

23-
Ionic Animations uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) to build and run your animations. In doing this, we offload all work required to compute and run your animations to the browser. As a result, this allows the browser to make any optimizations it needs and ensures your animations run as smoothly as possible. While most browsers support a basic implementation of Web Animations, we fallback to [CSS Animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations) for browsers that do not support Web Animations. The performance difference in switching between these two should typically be negligible.
23+
Ionic Animations, on the other hand, uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API), which offloads all the computation and running of animations to the browser. This approach allows the browser to optimize the animations and ensure their smooth execution. In cases where Web Animations are not supported, Ionic Animations will fall back to [CSS Animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations), which should have a negligible difference in performance.
2424

2525
## Installation
2626

@@ -1535,30 +1535,37 @@ const animation = createAnimation('my-animation-identifier')
15351535
.fromTo('opacity', '1', '0');
15361536
```
15371537

1538-
## Browser Support
1538+
## API
15391539

1540-
| Browser/Platform | Supported Versions |
1541-
| ---------------- | ------------------ |
1542-
| **Chrome** | 43+ |
1543-
| **Safari** | 9+ |
1544-
| **Firefox** | 32+ |
1545-
| **IE/Edge** | 11+ |
1546-
| **Opera** | 30+ |
1547-
| **iOS** | 9+ |
1548-
| **Android** | 5+ |
1540+
This section provides a list of all the methods and properties available on the `Animation` class.
1541+
1542+
### Interfaces
1543+
1544+
#### AnimationDirection
1545+
1546+
```tsx
1547+
type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
1548+
```
1549+
1550+
#### AnimationFill
1551+
1552+
```tsx
1553+
type AnimationFill = 'auto' | 'none' | 'forwards' | 'backwards' | 'both';
1554+
```
1555+
1556+
#### AnimationBuilder
1557+
1558+
```tsx
1559+
type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
1560+
```
15491561

15501562
:::note
1551-
Due to a bug in Safari versions 9-11, stepping through animations via `progressStep` is not supported. This is supported on Safari 12+.
1552-
:::
15531563

1554-
## Types
1564+
`opts` are additional options that are specific to the custom animation. For example, the sheet modal enter animation includes information for the current breakpoint.
15551565

1556-
| Name | Value |
1557-
| -------------------- | ------------------------------------------------------------- |
1558-
| `AnimationDirection` | `'normal' \| 'reverse' \| 'alternate' \| 'alternate-reverse'` |
1559-
| `AnimationFill` | `'auto' \| 'none' \| 'forwards' \| 'backwards' \| 'both'` |
1566+
:::
15601567

1561-
## Interfaces
1568+
#### AnimationCallbackOptions
15621569

15631570
```tsx
15641571
interface AnimationCallbackOptions {
@@ -1567,7 +1574,11 @@ interface AnimationCallbackOptions {
15671574
*/
15681575
oneTimeCallback: boolean;
15691576
}
1577+
```
15701578

1579+
#### AnimationPlayOptions
1580+
1581+
```tsx
15711582
interface AnimationPlayOptions {
15721583
/**
15731584
* If true, the animation will play synchronously.
@@ -1578,15 +1589,15 @@ interface AnimationPlayOptions {
15781589
}
15791590
```
15801591

1581-
## Properties
1592+
### Properties
15821593

15831594
| Name | Description |
15841595
| ------------------------------ | ------------------------------------------------- |
15851596
| `childAnimations: Animation[]` | All child animations of a given parent animation. |
15861597
| `elements: HTMLElement[]` | All elements attached to an animation. |
15871598
| `parentAnimation?: Animation` | The parent animation of a given animation object. |
15881599

1589-
## Methods
1600+
### Methods
15901601

15911602
| Name | Description |
15921603
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/vue/slides.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Slides
2+
title: Migrating From ion-slides to Swiper.js
33
---
44

55
<head>
@@ -11,17 +11,16 @@ title: Slides
1111
</head>
1212

1313
:::caution Looking for `ion-slides`?
14-
1514
`ion-slides` was deprecated in v6.0.0 and removed in v7.0.0. We recommend using the Swiper.js library directly. The migration process is detailed below.
16-
1715
:::
1816

19-
:::note
20-
This migration guide is compatible with Swiper 8. An updated guide for Swiper 9 is coming soon!
21-
:::
17+
We recommend <a href="http://swiperjs.com/" target="_blank" rel="noopener noreferrer">Swiper.js</a> if you need a modern touch slider component. This guide will go over how to get Swiper for Vue set up in your Ionic Framework application. It will also go over any migration information you may need to move from `ion-slides` to the official Swiper Vue integration.
2218

19+
:::note
20+
Swiper's Vue component is set to be removed in a future release of Swiper, with <a href="https://swiperjs.com/element" target="_blank" rel="noopener noreferrer">Swiper Element</a> as the replacement. However, this guide shows how to migrate to the Vue component because it provides the most stable experience at the time of writing.
2321

24-
We recommend <a href="http://swiperjs.com/" target="_blank" rel="noopener noreferrer">Swiper.js</a> if you need a modern touch slider component. This guide will go over how to get Swiper for Vue set up in your Ionic Framework application. It will also go over any migration information you may need to move from `ion-slides` to the official Swiper Vue integration.
22+
Using Swiper's Vue component is **not** required to use Swiper.js with Ionic Framework.
23+
:::
2524

2625
## Getting Started
2726

@@ -40,7 +39,7 @@ vue upgrade --next
4039
Once that is done, install the Swiper dependency in your project:
4140

4241
```shell
43-
npm install swiper@8
42+
npm install swiper@latest
4443
```
4544

4645
## Swiping with Style
@@ -63,7 +62,7 @@ We recommend importing the styles in the component in which Swiper is being used
6362
```
6463

6564
:::note
66-
Importing `@ionic/vue/css/ionic-swiper.css'` is **not** required to use Swiper.js with Ionic. This files is used for backward-compatibility with the `ion-slides` component and can be safely omitted if you prefer not to use the CSS Variables provided in the stylesheet.
65+
Importing `@ionic/vue/css/ionic-swiper.css` is **not** required to use Swiper.js with Ionic. This files is used for backward-compatibility with the `ion-slides` component and can be safely omitted if you prefer not to use the CSS Variables provided in the stylesheet.
6766
:::
6867

6968
### Updating Selectors

package-lock.json

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"@ionic/prettier-config": "^2.0.0",
7474
"@tsconfig/docusaurus": "^1.0.4",
7575
"@types/react": "^17.0.37",
76+
"deepl": "^1.0.13",
7677
"html-loader": "^3.1.0",
7778
"prettier": "^2.5.0",
7879
"ts-node": "^10.4.0",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"fromLanguage": "EN",
3+
"toLanguage": "JA",
4+
"ulr": "https://www.deepl.com/docs-api"
5+
}

0 commit comments

Comments
 (0)