Skip to content

Commit fa5d868

Browse files
thetaPCmapsandappsliamdebeasiaveryjohnstonrenovate[bot]
authored
chore(): sync with main (#3405)
Co-authored-by: Shawn Taylor <[email protected]> Co-authored-by: Liam DeBeasi <[email protected]> Co-authored-by: Amanda Johnston <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ptmkenny <[email protected]> Co-authored-by: Brandy Carney <[email protected]> Co-authored-by: Matthew Harris <[email protected]> Co-authored-by: Nikita Barsukov <[email protected]>
1 parent 50546f5 commit fa5d868

File tree

332 files changed

+11753
-10557
lines changed

Some content is hidden

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

332 files changed

+11753
-10557
lines changed

.prettierignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
src/theme/DocItem
2-
src/theme/DocPage
2+
src/theme/DocRoot
33
legacy-stencil-components
44
scripts/bak
55

66
docs/api
77
docs/native
8+
versioned_docs/version-v*/native
89
docs/cli/commands
910

1011
static/code/stackblitz

docs/angular/build-options.md

+51-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Build Options
25

36
Developers have two options for using Ionic components: Standalone or Modules. This guide covers both options as well as the benefits and downsides of each approach.
@@ -28,7 +31,7 @@ See the [Standalone Migration Guide](#migrating-from-modules-to-standalone) for
2831

2932
### Usage with Standalone-based Applications
3033

31-
:::caution
34+
:::warning
3235
All Ionic imports should be imported from the `@ionic/angular/standalone` submodule. This includes imports such as components, directives, providers, and types. Importing from `@ionic/angular` may pull in lazy loaded Ionic code which can interfere with treeshaking.
3336
:::
3437

@@ -175,9 +178,32 @@ export class HomePage {}
175178
<ion-button routerLink="/foo" routerDirection="root">Go to Foo Page</ion-button>
176179
```
177180

181+
**Testing**
182+
183+
Ionic Angular's standalone components use ES Modules. As a result, developers using Jest should ensure that ES Modules are transpiled to a format that Jest can use. Developers using Jest should add the following to their Jest config:
184+
185+
<Tabs groupId="package-manager" defaultValue="npm" values={[{ value: 'npm', label: 'npm' }, { value: 'pnpm', label: 'pnpm' }]}>
186+
<TabItem value="npm">
187+
188+
```json
189+
190+
"transformIgnorePatterns": ["<rootDir>/node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"]
191+
```
192+
193+
</TabItem>
194+
<TabItem value="pnpm">
195+
196+
```json
197+
198+
"transformIgnorePatterns": ["<rootDir>/node_modules/.pnpm/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)@)"]
199+
```
200+
201+
</TabItem>
202+
</Tabs>
203+
178204
### Usage with NgModule-based Applications
179205

180-
:::caution
206+
:::warning
181207
All Ionic imports should be imported from the `@ionic/angular/standalone` submodule. This includes imports such as components, directives, providers, and types. Importing from `@ionic/angular` may pull in lazy loaded Ionic code which can interfere with treeshaking.
182208
:::
183209

@@ -315,6 +341,29 @@ export class HomePageModule {}
315341
<ion-button routerLink="/foo" routerDirection="root">Go to Foo Page</ion-button>
316342
```
317343

344+
**Testing**
345+
346+
Ionic Angular's standalone components use ES Modules. As a result, developers using Jest should ensure that ES Modules are transpiled to a format that Jest can use. Developers using Jest should add the following to their Jest config:
347+
348+
<Tabs groupId="package-manager" defaultValue="npm" values={[{ value: 'npm', label: 'npm' }, { value: 'pnpm', label: 'pnpm' }]}>
349+
<TabItem value="npm">
350+
351+
```json
352+
353+
"transformIgnorePatterns": ["<rootDir>/node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"]
354+
```
355+
356+
</TabItem>
357+
<TabItem value="pnpm">
358+
359+
```json
360+
361+
"transformIgnorePatterns": ["<rootDir>/node_modules/.pnpm/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)@)"]
362+
```
363+
364+
</TabItem>
365+
</Tabs>
366+
318367
## Modules
319368

320369
### Overview

docs/angular/navigation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Here, we have a typical Angular Module setup, along with a RouterModule import,
175175

176176
## Standalone Components
177177

178-
:::caution Experimental API
178+
:::warning Experimental API
179179

180180
Standalone components is an experimental API introduced in Angular 14.x and available in Ionic 6.3 and later. This feature may change before it is stable.
181181

docs/angular/slides.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem';
1313
/>
1414
</head>
1515

16-
:::caution Looking for `ion-slides`?
16+
:::warning Looking for `ion-slides`?
1717
`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.
1818
:::
1919

docs/angular/virtual-scroll.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Virtual Scroll
22

3-
:::caution Looking for `ion-virtual-scroll`?
3+
:::warning Looking for `ion-virtual-scroll`?
44

55
`ion-virtual-scroll` was deprecated in v6.0.0 and removed in v7.0.0. We recommend using the `@angular/cdk` package detailed below.
66

docs/angular/your-first-app.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Here’s the finished app running on all 3 platforms:
1919
width="560"
2020
height="315"
2121
src="https://www.youtube.com/embed/0ASQ13Y1Rk4"
22-
frameborder="0"
22+
frameBorder="0"
2323
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
24-
allowfullscreen
24+
allowFullScreen
2525
></iframe>
2626
2727
:::note

docs/api/input.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import Slots from '@ionic-internal/component-api/v8/input/slots.md';
1010

1111
<head>
1212
<title>ion-input: Custom Input With Styling and CSS Properties</title>
13-
<meta name="description" content="ion-input is a wrapper to the HTML input element, with custom value type styling and functionality. It works on desktops and integrates with mobile keyboards." />
13+
<meta name="description" content="ion-input is a wrapper to the HTML input element, with custom value type styling and functionality. It integrates with the keyboard on mobile devices." />
1414
</head>
1515

1616
import EncapsulationPill from '@components/page/api/EncapsulationPill';
1717

1818
<EncapsulationPill type="scoped" />
1919

2020

21-
The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML input, but works great on desktop devices and integrates with the keyboard on mobile devices.
21+
The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML input and integrates with the keyboard on mobile devices.
2222

2323

2424
## Basic Usage
@@ -148,6 +148,22 @@ Please submit bug reports with Maskito to the [Maskito Github repository](https:
148148

149149
:::
150150

151+
## Start and End Slots (experimental)
152+
153+
The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the input.
154+
155+
Note that this feature is considered experimental because it relies on a simulated version of [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots). As a result, the simulated behavior may not exactly match the native slot behavior.
156+
157+
:::note
158+
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
159+
160+
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to.
161+
:::
162+
163+
import StartEndSlots from '@site/static/usage/v7/input/start-end-slots/index.md';
164+
165+
<StartEndSlots />
166+
151167
## Theming
152168

153169
### Colors

docs/api/radio.md

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ import LabelPlacement from '@site/static/usage/v8/radio/label-placement/index.md
3636

3737
<LabelPlacement />
3838

39+
## Object Value References
40+
41+
By default, the radio group uses strict equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property.
42+
43+
import UsingComparewith from '@site/static/usage/v7/radio/using-comparewith/index.md';
44+
45+
<UsingComparewith />
46+
3947
## Alignment
4048

4149
Developers can use the `alignment` property to control how the label and control are aligned on the cross axis. This property mirrors the flexbox `align-items` property.

docs/api/select.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ import RespondingToInteractionExample from '@site/static/usage/v8/select/basic/r
119119

120120
When using objects for select values, it is possible for the identities of these objects to change if they are coming from a server or database, while the selected value's identity remains the same. For example, this can occur when an existing record with the desired object value is loaded into the select, but the newly retrieved select options now have different identities. This will result in the select appearing to have no value at all, even though the original selection in still intact.
121121

122-
By default, the select uses object equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property.
122+
By default, the select uses strict equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property.
123123

124124
### Using compareWith
125125

@@ -173,6 +173,20 @@ import InterfaceOptionsExample from '@site/static/usage/v8/select/customization/
173173

174174
<InterfaceOptionsExample />
175175

176+
## Start and End Slots
177+
178+
The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the select. If the slot content is clicked, the select will not open.
179+
180+
:::note
181+
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
182+
183+
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to.
184+
:::
185+
186+
import StartEndSlots from '@site/static/usage/v7/select/start-end-slots/index.md';
187+
188+
<StartEndSlots />
189+
176190
## Customization
177191

178192
There are two units that make up the Select component and each need to be styled separately. The `ion-select` element is represented on the view by the selected value(s), or placeholder if there is none, and dropdown icon. The interface, which is defined in the [Interfaces](#interfaces) section above, is the dialog that opens when clicking on the `ion-select`. The interface contains all of the options defined by adding `ion-select-option` elements. The following sections will go over the differences between styling these.

docs/api/textarea.md

+16
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,22 @@ import ClearOnEditPlayground from '@site/static/usage/v8/textarea/clear-on-edit/
109109

110110
<ClearOnEditPlayground />
111111

112+
## Start and End Slots (experimental)
113+
114+
The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the textarea.
115+
116+
Note that this feature is considered experimental because it relies on a simulated version of [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots). As a result, the simulated behavior may not exactly match the native slot behavior.
117+
118+
:::note
119+
In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information.
120+
121+
If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to.
122+
:::
123+
124+
import StartEndSlots from '@site/static/usage/v7/textarea/start-end-slots/index.md';
125+
126+
<StartEndSlots />
127+
112128
## Migrating from Legacy Textarea Syntax
113129

114130
A simpler textarea syntax was introduced in Ionic 7.0. This new syntax reduces the boilerplate required to setup an textarea, resolves accessibility issues, and improves the developer experience.

docs/api/toast.md

+8
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ import PositionAnchor from '@site/static/usage/v8/toast/position-anchor/index.md
7272

7373
<PositionAnchor />
7474

75+
## Swipe to Dismiss
76+
77+
Toasts can be swiped to dismiss by using the `swipeGesture` property. This feature is position-aware, meaning the direction that users need to swipe will change based on the value of the `position` property. Additionally, the distance users need to swipe may be impacted by the `positionAnchor` property.
78+
79+
import SwipeGesture from '@site/static/usage/v7/toast/swipe-gesture/index.md';
80+
81+
<SwipeGesture />
82+
7583
## Layout
7684

7785
Button containers within the toast can be displayed either on the same line as the message or stacked on separate lines using the `layout` property. The stacked layout should be used with buttons that have long text values. Additionally, buttons in a stacked toast layout can use a `side` value of either `start` or `end`, but not both.

docs/components.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ Ionic apps are made of high-level building blocks called Components, which allow
4141
</DocsCard>
4242

4343
<DocsCard header="Card" href="api/card" icon="/icons/component-card-icon.png">
44-
<p>
45-
Cards are a great way to display an important piece of content, and can contain images, buttons, text, and more.
46-
</p>
44+
<!-- prettier-ignore -->
45+
<p>Cards are a great way to display an important piece of content, and can contain images, buttons, text, and more.</p>
4746
</DocsCard>
4847

4948
<DocsCard header="Checkbox" href="api/checkbox" icon="/icons/component-checkbox-icon.png">
@@ -67,7 +66,7 @@ Ionic apps are made of high-level building blocks called Components, which allow
6766
</DocsCard>
6867

6968
<DocsCard header="Icons" href="api/icon" img="/icons/feature-component-icons-icon.png">
70-
<p>Beautifully designed icons for use in web, iOS, Android, and desktop apps.</p>
69+
<p>Beautifully designed icons for use in web, iOS, and Android apps.</p>
7170
</DocsCard>
7271

7372
<DocsCard header="Grid" href="api/grid" icon="/icons/component-grid-icon.png">

docs/core-concepts/cross-platform.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ This bit of code can be incredibly helpful when targeting environments where acc
3535

3636
Many native APIs that people use (for example, the File API), are not available in the browser. The APIs are always improving and catching up to native, so it is recommended to research them. Taking the first two points into consideration, it's fairly easy to create a nice experience that will adapt for the platform the app is running on.
3737

38-
## Desktop
38+
## Responsive UI
3939

40-
When planning to deploy an app to desktop, either using <a href="https://electronjs.org" target="_blank">Electron</a> or as a <strong>Progressive Web App</strong>, it is important to ensure the app works smoothly on larger devices.
40+
When planning to deploy an app that may be used across a variety of devices, it is important to ensure the app works smoothly on larger screen sizes.
4141

4242
### Layout
4343

@@ -63,7 +63,7 @@ Many people rarely notice the layout of an app, but it can have a massive impact
6363
</ion-content>
6464
```
6565

66-
This will render 5 items with a width of 100% each. This may look great on a mobile device, as seen below, but viewing this on a desktop browser is a different story. The items become stretched to fill the entire screen because of the wide screen width, leaving screen space unused.
66+
This will render 5 items with a width of 100% each. This may look great on a phone, but viewing this on a larger screen is a different story. The items become stretched to fill the entire screen because of the wide screen width, leaving screen space unused.
6767

6868
<img src={require('@site/static/img/building/cross-platform-items.png').default} />
6969

docs/deployment/app-store.md

+46
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ title: iOS App Store Deployment
33
sidebar_label: iOS App Store
44
---
55

6+
import Tabs from '@theme/Tabs';
7+
import TabItem from '@theme/TabItem';
8+
69
<head>
710
<title>Publish to iOS App Store: Apple App Store Deployment for Ionic</title>
811
<meta
@@ -24,6 +27,46 @@ To enroll in the Apple Developer Program, follow the instructions [listed here](
2427

2528
## Generating a release build
2629

30+
<Tabs groupId="runtime">
31+
<TabItem value="capacitor" label="Capacitor" default>
32+
33+
If the iOS platform is not already added, be sure to add it:
34+
35+
```shell
36+
ionic cap add ios
37+
```
38+
39+
With the platform added, run the build command with the `--prod` flag:
40+
41+
```shell
42+
ionic build --prod
43+
```
44+
45+
This will generate the minified code for the web portion of an app.
46+
47+
For this first build, and after you make any binary changes like adding a plugin, use the sync command:
48+
49+
```shell
50+
npx cap sync ios
51+
```
52+
53+
This will also copy the minified web code over. However, if your build is only source change then you can just copy the minified web files using:
54+
55+
```shell
56+
npx cap copy ios
57+
```
58+
59+
From here, the project is now managed as if it was a native Xcode app (because it is).
60+
61+
Open the project in `./ios/` to start Xcode:
62+
63+
```shell
64+
npx cap open ios
65+
```
66+
67+
</TabItem>
68+
<TabItem value="cordova" label="Cordova">
69+
2770
If the iOS platform is not already added, be sure to add it:
2871

2972
```shell
@@ -44,6 +87,9 @@ From here, open the `.xcworkspace` file in `./platforms/ios/` to start Xcode.
4487
You can also have a release build generated automatically by using the `--release` flag.
4588
:::
4689

90+
</TabItem>
91+
</Tabs>
92+
4793
## Generating Signing Certs
4894

4995
Generating certificates for iOS is a bit of an involved process, so be sure to check [Apple's official documentation](https://help.apple.com/xcode/mac/current/#/dev3a05256b8) on what certificates are and how to generate them.

0 commit comments

Comments
 (0)